((t,e,a,l)=>{"use strict";let o,r,s=0,i=null;const n={opacity(t,e){t.opacity=e},translate(t,e){t.transform+=` translate(${e}px, ${e}px)`},"translate-x"(t,e){t.transform+=` translateX(${e}px)`},"translate-y"(t,e){t.transform+=` translateY(${e}px)`},scale(t,e){t.transform+=` scale(${e})`},"scale-x"(t,e){t.transform+=` scaleX(${e})`},"scale-y"(t,e){t.transform+=` scaleY(${e})`},skew(t,e){t.transform+=` skew(${e}deg, ${e}deg)`},"skew-x"(t,e){t.transform+=` skewX(${e}deg)`},"skew-y"(t,e){t.transform+=` skewY(${e}deg)`},rotate(t,e){t.transform+=` rotate(${e}deg)`},"rotate-x"(t,e){t.transform+=` rotateX(${e}deg)`},"rotate-y"(t,e){t.transform+=` rotateY(${e}deg)`},"hue-rotate"(t,e){t.filter+=` hue-rotate(${e}deg)`},blur(t,e){t.filter+=` blur(${e}px)`}},d=[],f=(t,e)=>{let a=0;for(;t[a][0]<=e&&void 0!==t[a+1];)a+=1;const l=t[a][0],o=void 0===t[a-1]?l:t[a-1][0],r=t[a][1],s=void 0===t[a-1]?r:t[a-1][1];return Math.min(Math.max((e-o)/(l-o),0),1)*(r-s)+s},c=t=>"("===t[0]?Function("return "+t)():parseFloat(t),x=e=>{const l=e.getBoundingClientRect(),o={el:e,originalStyle:{transform:e.style.transform,filter:e.style.filter},transforms:{}};if(e.attributes["data-lax-anchor-top"]||(o.top=~~l.top+a.scrollY,e.removeAttribute("data-lax-anchor-top")),e.attributes["data-lax-optimize"]){const a=e.getBoundingClientRect();e.setAttribute("data-lax-opacity",`${-a.height-1} 0, ${-a.height} 1, ${t.h} 1, ${t.h+1} 0`)}for(let a=e.attributes.length-1;-1<a;--a){let r=e.attributes[a],s=r.name;if(0===s.indexOf("data-lax")&&(s=s.replace("data-lax-",""),void 0!==n[s])){let e=r.value.replace(/\s+/g," ").replaceAll("vw",t.w).replaceAll("vh",t.h).replaceAll("elh",l.height).replaceAll("elw",l.width);o.transforms[s]=e.split(",").map((t=>t.trim().split(" ").map(c))).sort(((t,e)=>t[0]-e[0]))}}d.push(o),p(o)},p=t=>{const{originalStyle:e,top:a,transforms:l,el:o}=t,r={transform:e.transform,filter:e.filter},i=a?a-s:s;for(let t in l)n[t](r,f(l[t],i));if(0===r.opacity)o.style.opacity=0;else for(let t in r)o.style[t]=r[t]},u=()=>{for(let t=d.length-1;-1<t;--t)p(d[t])};t.on("tf_lax_init",(n=>{void 0===n.length&&(n=[n]);const f=t.h,c=["scale","rotate","blur","opacity","translate-x","translate-y"];let p=e.body.getBoundingClientRect().top;for(let t=n.length-1;t>-1;--t){let e=n[t];if(!e.hasAttribute("data-lax"))continue;e.removeAttribute("data-lax");let a=e.cloneNode(!1),l=getComputedStyle(e),o=a.dataset.boxPosition,r=l.getPropertyValue("z-index");a.className="tf_lax_done tf_rel",a.removeAttribute("style"),r&&"auto"!==r&&(a.style.zIndex=r),o&&(a.style.transformOrigin=o,e.removeAttribute("data-box-position")),a.hasAttribute("data-lax-opacity")&&(a.className+=" tf_opacity",e.removeAttribute("data-lax-opacity")),a.hasAttribute("data-lax-rotate")&&(a.style.width=l.getPropertyValue("width"),null===i&&(i=new ResizeObserver((t=>{for(let e=t.length-1;e>-1;--e){let a=t[e].target.parentNode,l=parseInt(t[e].contentRect.width);parseInt(a.style.width)!==l&&(a.style.width=l+"px")}})),i.observe(e)));let s=e.getBoundingClientRect().top-p;if(s+130<f){s=s<0?f:~~s,a.dataset.laxAnchorTop=1;for(let t=5;t>-1;--t){let e="data-lax-"+c[t],l=a.getAttribute(e);if(l){l=l.split(",");let t=l[1].split(" ");a.setAttribute(e,t[0]+" "+l[0].split(" ")[1]+","+s+" "+t[1])}}}e.before(a),a.appendChild(e),x(a)}if(!0!==r){r=!0;const e=()=>{if(!0===t.is_builder_active)return;const e=a.scrollY;s!==e&&(s=e,u()),i()},i=()=>{requestAnimationFrame(e)};a.tfOn("scroll",i,{once:!0,passive:!0}),t.on("tfsmartresize",(t=>{let e="desktop";if(t.w<=l.breakpoints.mobile?e="mobile":t.w<=l.breakpoints.tablet[1]?e="tablet":t.w<=l.breakpoints.tablet_landscape[1]&&(e="tablet_landscape"),o!==e){o=e;for(let t=d.length-1;t>-1;--t){let e=d[t],l=e.el,o=getComputedStyle(l.firstChild),r=o.getPropertyValue("z-index"),s=l.style;if(s.zIndex!==r&&(s.zIndex=r),l.hasAttribute("data-lax-rotate")){let t=o.getPropertyValue("width");s.width!==t&&(s.width=t)}void 0!==e.top&&(e.top=~~l.getBoundingClientRect().top+a.scrollY)}}u()}))}}))})(Themify,document,window,themify_vars);