(()=>{"use strict";var t,e={134(){const t=t=>{if(!t||"none"===t.dataset.pagination)return;const e=Array.from(t.querySelectorAll(".calio-post-grid-card")),a=t.querySelector(".calio-post-grid-load-more"),n=t.querySelector(".calio-post-grid-pagination"),o=t.querySelector(".calio-post-grid-status"),r=t.dataset.pagination||"none",i=Number.parseInt(t.dataset.initialItems||"6",10),d=Number.parseInt(t.dataset.pageSize||"6",10),s=Number.parseInt(t.dataset.loadMoreStep||"3",10),l=Number.parseInt(t.dataset.totalItems||String(e.length),10),c=o?.dataset.showingTemplate||"Showing {visible} of {total} posts";if(!o||0===e.length)return;let p=i,u=1;const m=Math.max(1,Math.ceil(l/Math.max(1,d))),g=t=>{o.textContent=t>=l&&"load_more"===r?o.dataset.allLoadedText||"":c.replace("{visible}",String(Math.min(t,l))).replace("{total}",String(l))},h=t=>{u=Math.min(Math.max(t,1),m);const a=(u-1)*d,n=a+d;e.forEach((t,e)=>{t.hidden=e<a||e>=n}),g(Math.min(n,l)),v()},v=()=>{if(!n)return;const t=n.dataset.prevText||"Previous",e=n.dataset.nextText||"Next";n.replaceChildren();const a=document.createElement("button");a.className="calio-post-grid-page-nav",a.type="button",a.dataset.pageNav="prev",a.disabled=1===u,a.textContent=t,n.appendChild(a);for(let t=1;t<=m;t+=1){const e=document.createElement("button");e.className="calio-post-grid-page-number"+(t===u?" is-current":""),e.type="button",e.dataset.page=String(t),e.setAttribute("aria-current",t===u?"page":"false"),e.textContent=String(t),n.appendChild(e)}const o=document.createElement("button");o.className="calio-post-grid-page-nav",o.type="button",o.dataset.pageNav="next",o.disabled=u===m,o.textContent=e,n.appendChild(o)},f=()=>{e.forEach((t,e)=>{t.hidden=e>=p}),g(Math.min(p,l)),a&&p>=l&&(a.hidden=!0)};if("load_more"===r){if(!a||e.length<=i)return;return a.addEventListener("click",()=>{p=Math.min(p+s,l),f()}),void f()}if("numbers"===r){if(!n||e.length<=d)return;n.addEventListener("click",t=>{const e=t.target;e instanceof HTMLButtonElement&&(e.dataset.page&&h(Number.parseInt(e.dataset.page,10)),"prev"===e.dataset.pageNav&&h(u-1),"next"===e.dataset.pageNav&&h(u+1))}),h(1)}},e=(e=document)=>{(e instanceof HTMLElement||e instanceof Document?e:document).querySelectorAll(".calio-post-grid-wrap").forEach(t)};document.addEventListener("DOMContentLoaded",()=>{e(document)});let a=!1;const n=()=>!!a||!!window.elementorFrontend?.hooks&&(window.elementorFrontend.hooks.addAction("frontend/element_ready/calio-post-grid.default",t=>{const a=t?.[0]||document;e(a)}),a=!0,!0);if(window.addEventListener("elementor/frontend/init",n),!n()){let t=0;const e=window.setInterval(()=>{t+=1,(n()||t>=40)&&window.clearInterval(e)},250)}}},a={};function n(t){var o=a[t];if(void 0!==o)return o.exports;var r=a[t]={exports:{}};return e[t](r,r.exports,n),r.exports}n.m=e,t=[],n.O=(e,a,o,r)=>{if(!a){var i=1/0;for(c=0;c<t.length;c++){for(var[a,o,r]=t[c],d=!0,s=0;s<a.length;s++)(!1&r||i>=r)&&Object.keys(n.O).every(t=>n.O[t](a[s]))?a.splice(s--,1):(d=!1,r<i&&(i=r));if(d){t.splice(c--,1);var l=o();void 0!==l&&(e=l)}}return e}r=r||0;for(var c=t.length;c>0&&t[c-1][2]>r;c--)t[c]=t[c-1];t[c]=[a,o,r]},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t={7597:0,7953:0};n.O.j=e=>0===t[e];var e=(e,a)=>{var o,r,[i,d,s]=a,l=0;if(i.some(e=>0!==t[e])){for(o in d)n.o(d,o)&&(n.m[o]=d[o]);if(s)var c=s(n)}for(e&&e(a);l<i.length;l++)r=i[l],n.o(t,r)&&t[r]&&t[r][0](),t[r]=0;return n.O(c)},a=globalThis.webpackChunkcalio_addon=globalThis.webpackChunkcalio_addon||[];a.forEach(e.bind(null,0)),a.push=e.bind(null,a.push.bind(a))})();var o=n.O(void 0,[7953],()=>n(134));o=n.O(o)})();