(()=>{"use strict";var e,t={105(){const e=(e,t=0)=>{const n=Number.parseInt(String(e),10);return Number.isFinite(n)?n:t},t=e=>"yes"===e||"true"===e||"1"===e||!0===e,n=n=>{n.querySelectorAll(".calio-image-flow").forEach(n=>{"function"==typeof n.__calioImageFlowDestroy&&n.__calioImageFlowDestroy();const o=n.querySelector(".calio-image-flow-viewport"),a=n.querySelector(".calio-image-flow-track"),r=n.querySelector(".calio-image-flow-media");if(!(o instanceof HTMLElement&&a instanceof HTMLElement&&r instanceof HTMLImageElement))return;const i=String(n.dataset.direction||"bottom-top"),l=t(n.dataset.autoScroll),s=t(n.dataset.dragBar),c=t(n.dataset.dragReverse),d=t(n.dataset.pauseOnHover),u=Math.max(300,e(n.dataset.scrollSpeed,3800)),m=Math.max(0,e(n.dataset.loopPause,600)),f=n.querySelector(".calio-image-flow-drag-range");n.style.setProperty("--calio-flow-speed",`${u}ms`);let v=null,w=!1,p=!1,y=0,h=null,g=null,E=null,L={xStart:0,yStart:0,xEnd:0,yEnd:0};const x=()=>{null!==v&&(window.clearTimeout(v),v=null)},b=e=>{n.classList.toggle("is-active",Boolean(e))},M=e=>{const t=Math.max(0,Math.min(1,e)),n=L.xStart+(L.xEnd-L.xStart)*t,o=L.yStart+(L.yEnd-L.yStart)*t;a.style.transform=`translate3d(${n}px, ${o}px, 0)`},S=e=>{if(!(f instanceof HTMLInputElement))return;const t=Math.max(0,Math.min(100,Math.round(100*e)));f.value=String(t),f.style.setProperty("--calio-flow-drag-progress",String(t))},I=()=>{x(),!l||w||n.classList.contains("has-no-distance")||(v=window.setTimeout(()=>{p=!p,b(p),I()},u+m))},O=()=>{if(x(),b(!1),p=!1,!((()=>{const e=(e=>"bottom-top"===e||"top-bottom"===e)(i)?Math.max(0,r.offsetHeight-o.clientHeight):Math.max(0,r.offsetWidth-o.clientWidth);let t=0,a=0,l=0,s=0;switch(i){case"top-bottom":a=-e,s=0;break;case"left-right":t=-e,l=0;break;case"right-left":t=0,l=-e;break;default:a=0,s=-e}return n.style.setProperty("--calio-flow-x-start",`${t}px`),n.style.setProperty("--calio-flow-y-start",`${a}px`),n.style.setProperty("--calio-flow-x-end",`${l}px`),n.style.setProperty("--calio-flow-y-end",`${s}px`),n.classList.toggle("has-no-distance",e<=0),L={xStart:t,yStart:a,xEnd:l,yEnd:s},e})()<=0))return s&&!l&&f instanceof HTMLInputElement?(S(y),void M(y)):void(l&&(v=window.setTimeout(()=>{w||(p=!0,b(!0),I())},120)));s&&!l&&f instanceof HTMLInputElement&&S(0)},T=()=>{if(l){if(!d)return;return w=!0,void x()}s||n.classList.contains("has-no-distance")||b(!0)},H=()=>{if(l){if(!d)return;return w=!1,void I()}s||b(!1)},k=()=>{null!==h&&window.cancelAnimationFrame(h),h=window.requestAnimationFrame(()=>{h=null,O()})};n.addEventListener("mouseenter",T),n.addEventListener("mouseleave",H);const _=()=>{if(!(f instanceof HTMLInputElement))return;const t=Math.max(0,Math.min(1,e(f.value,0)/100));y=c?1-t:t,b(!1),S(t),M(y)};s&&!l&&f instanceof HTMLInputElement&&(f.addEventListener("input",_),f.addEventListener("change",_),S(c?1:0),y=c?1:0),"function"==typeof window.ResizeObserver?(g=new window.ResizeObserver(()=>k()),g.observe(o),g.observe(r)):(E=()=>k(),window.addEventListener("resize",E)),r.complete||r.addEventListener("load",O,{once:!0}),O(),n.__calioImageFlowDestroy=()=>{x(),null!==h&&window.cancelAnimationFrame(h),n.removeEventListener("mouseenter",T),n.removeEventListener("mouseleave",H),s&&!l&&f instanceof HTMLInputElement&&(f.removeEventListener("input",_),f.removeEventListener("change",_)),null!==g&&"function"==typeof g.disconnect&&g.disconnect(),null!==E&&window.removeEventListener("resize",E),n.__calioImageFlowDestroy=null}})},o=(e=document)=>{n(e)};document.addEventListener("DOMContentLoaded",()=>{o(document)});let a=!1;const r=()=>!!a||!!window.elementorFrontend?.hooks&&(window.elementorFrontend.hooks.addAction("frontend/element_ready/calio-image-flow.default",e=>{const t=e?.[0]||document;o(t)}),a=!0,!0);if(window.addEventListener("elementor/frontend/init",r),!r()){let e=0;const t=window.setInterval(()=>{e+=1,(r()||e>=40)&&window.clearInterval(t)},250)}}},n={};function o(e){var a=n[e];if(void 0!==a)return a.exports;var r=n[e]={exports:{}};return t[e](r,r.exports,o),r.exports}o.m=t,e=[],o.O=(t,n,a,r)=>{if(!n){var i=1/0;for(d=0;d<e.length;d++){for(var[n,a,r]=e[d],l=!0,s=0;s<n.length;s++)(!1&r||i>=r)&&Object.keys(o.O).every(e=>o.O[e](n[s]))?n.splice(s--,1):(l=!1,r<i&&(i=r));if(l){e.splice(d--,1);var c=a();void 0!==c&&(t=c)}}return t}r=r||0;for(var d=e.length;d>0&&e[d-1][2]>r;d--)e[d]=e[d-1];e[d]=[n,a,r]},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={8548:0,4556:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var a,r,[i,l,s]=n,c=0;if(i.some(t=>0!==e[t])){for(a in l)o.o(l,a)&&(o.m[a]=l[a]);if(s)var d=s(o)}for(t&&t(n);c<i.length;c++)r=i[c],o.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return o.O(d)},n=globalThis.webpackChunkcalio_addon=globalThis.webpackChunkcalio_addon||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var a=o.O(void 0,[4556],()=>o(105));a=o.O(a)})();