(()=>{"use strict";var e,t={548(){const e=e=>{const t=e.querySelector(".calio-post-carousel-track"),a=e.querySelector(".calio-post-carousel-viewport"),n=Array.from(e.querySelectorAll(".calio-post-carousel-card")),o=e.querySelector(".calio-post-carousel-arrow.is-prev"),s=e.querySelector(".calio-post-carousel-arrow.is-next"),r=e.querySelector(".calio-post-carousel-dots");if(!t||0===n.length)return;let i=0,l=1,d=null,c=null,u=!1,p=0,h=0,m=1;const v=()=>{d&&(window.clearInterval(d),d=null)},w=()=>{c&&(window.clearTimeout(c),c=null)},f=()=>Number.parseInt(e.dataset.autoplaySpeed||"3500",10),y=()=>"yes"===(e.dataset.centerMode||""),g=()=>window.matchMedia("(max-width: 767px)").matches?Number.parseInt(e.dataset.slidesMobile||"1",10):window.matchMedia("(max-width: 1024px)").matches?Number.parseInt(e.dataset.slidesTablet||"2",10):Number.parseInt(e.dataset.slidesDesktop||"3",10),b=()=>{const d=Math.max(1,g()),c=Number.parseFloat(getComputedStyle(t).gap||"0"),u=n[0]?.getBoundingClientRect().width||0,p=Math.max(0,t.scrollWidth-a.clientWidth);if(l=y()?Math.max(1,n.length-d+1):Math.max(1,Math.ceil(n.length/d)),i=Math.min(i,l-1),m=d,e.style.setProperty("--calio-carousel-slides",String(d)),y()){const e=i*(u+c)-(a.clientWidth-u)/2,n=Math.min(Math.max(e,0),p);t.style.transform=`translate3d(-${n}px, 0, 0)`}else t.style.transform=`translate3d(-${e.clientWidth*i}px, 0, 0)`;(t=>{const a="yes"===(e.dataset.highlightActiveSlide||"yes");if(n.forEach(e=>e.classList.remove("is-active-slide")),!a)return;const o=y()?i:i*t,s=Math.min(o+t,n.length),r=n.slice(o,s),l=Math.floor((r.length-1)/2);r[l]&&r[l].classList.add("is-active-slide")})(d),o&&(o.disabled=0===i||1===l),s&&(s.disabled=i>=l-1||1===l),(()=>{if(r){if("yes"!==(e.dataset.showDots||"yes")||l<=1)return r.replaceChildren(),void(r.hidden=!0);r.hidden=!1,r.replaceChildren();for(let e=0;e<l;e+=1){const t=document.createElement("button");t.type="button",t.className="calio-post-carousel-dot"+(e===i?" is-active":""),t.setAttribute("aria-label",`Go to slide set ${e+1}`),t.dataset.page=String(e),r.appendChild(t)}}})()},M=e=>{i=Math.min(Math.max(e,0),l-1),b()},x=(t=!1)=>{if(v(),w(),"yes"!==(e.dataset.autoplay||"")||l<=1)return;const a=()=>{d=window.setInterval(()=>{i=i>=l-1?0:i+1,b()},Math.max(1500,f()))};t&&"yes"===(e.dataset.pauseOnInteraction||"yes")?c=window.setTimeout(a,Math.max(2e3,f())):a()};o?.addEventListener("click",()=>{M(i-1),x(!0)}),s?.addEventListener("click",()=>{M(i+1),x(!0)}),r?.addEventListener("click",e=>{const t=e.target;t instanceof HTMLButtonElement&&t.dataset.page&&(M(Number.parseInt(t.dataset.page,10)),x(!0))}),a?.addEventListener("pointerdown",t=>{u=!0,p=t.clientX,h=0,a.setPointerCapture?.(t.pointerId),e.classList.add("is-dragging"),v()}),a?.addEventListener("pointermove",e=>{u&&(h=e.clientX-p)});const L=()=>{u&&(u=!1,e.classList.remove("is-dragging"),Math.abs(h)>50?M(h<0?i+1:i-1):b(),x(!0))};a?.addEventListener("pointerup",L),a?.addEventListener("pointercancel",L),a?.addEventListener("pointerleave",()=>{u&&L()}),"yes"===(e.dataset.pauseOnHover||"yes")&&(e.addEventListener("mouseenter",()=>{v(),w()}),e.addEventListener("mouseleave",x)),window.addEventListener("resize",()=>{Math.max(1,g())!==m&&(i=0),b()},{passive:!0}),b(),x()},t=(t=document)=>{(t instanceof HTMLElement||t instanceof Document?t:document).querySelectorAll(".calio-post-carousel").forEach(e)};document.addEventListener("DOMContentLoaded",()=>{t(document)});let a=!1;const n=()=>!!a||!!window.elementorFrontend?.hooks&&(window.elementorFrontend.hooks.addAction("frontend/element_ready/calio-post-carousel.default",e=>{const a=e?.[0]||document;t(a)}),a=!0,!0);if(window.addEventListener("elementor/frontend/init",n),!n()){let e=0;const t=window.setInterval(()=>{e+=1,(n()||e>=40)&&window.clearInterval(t)},250)}}},a={};function n(e){var o=a[e];if(void 0!==o)return o.exports;var s=a[e]={exports:{}};return t[e](s,s.exports,n),s.exports}n.m=t,e=[],n.O=(t,a,o,s)=>{if(!a){var r=1/0;for(c=0;c<e.length;c++){for(var[a,o,s]=e[c],i=!0,l=0;l<a.length;l++)(!1&s||r>=s)&&Object.keys(n.O).every(e=>n.O[e](a[l]))?a.splice(l--,1):(i=!1,s<r&&(r=s));if(i){e.splice(c--,1);var d=o();void 0!==d&&(t=d)}}return t}s=s||0;for(var c=e.length;c>0&&e[c-1][2]>s;c--)e[c]=e[c-1];e[c]=[a,o,s]},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={8195:0,4859:0};n.O.j=t=>0===e[t];var t=(t,a)=>{var o,s,[r,i,l]=a,d=0;if(r.some(t=>0!==e[t])){for(o in i)n.o(i,o)&&(n.m[o]=i[o]);if(l)var c=l(n)}for(t&&t(a);d<r.length;d++)s=r[d],n.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return n.O(c)},a=globalThis.webpackChunkcalio_addon=globalThis.webpackChunkcalio_addon||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})();var o=n.O(void 0,[4859],()=>n(548));o=n.O(o)})();