alrdy-animate
Version:
A library to handle animations on scroll with GSAP integration.
2 lines • 51.8 kB
JavaScript
/*! For license information please see AlrdyAnimate.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.AlrdyAnimate=e():t.AlrdyAnimate=e()}(this,(()=>(()=>{var t,e,r={543:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function o(t,e,r){return(e=function(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,{I:()=>u,l:()=>s});var l={duration:1,delay:0};function s(t){l=i(i({},l),t)}function u(t,e){var r="reverse"===e?2:1;t.forEach((function(t){var n=parseFloat(t.getAttribute("aa-delay"))||l.delay,a=parseFloat(t.getAttribute("aa-duration"))||l.duration,i=n/r,o=a/r;t.timeline||(t.style.setProperty("--aa-duration","".concat(o,"s")),t.style.setProperty("--aa-delay","".concat(i,"s"))),t.dispatchEvent(new CustomEvent("aa-event-trigger",{detail:{action:e}}))}))}},181:(t,e,r)=>{var n=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt,s="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,u="object"==typeof self&&self&&self.Object===Object&&self,c=s||u||Function("return this")(),d=Object.prototype.toString,f=Math.max,p=Math.min,b=function(){return c.Date.now()};function y(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function m(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==d.call(t)}(t))return NaN;if(y(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=y(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(n,"");var r=i.test(t);return r||o.test(t)?l(t.slice(2),r?2:8):a.test(t)?NaN:+t}t.exports=function(t,e,r){var n,a,i,o,l,s,u=0,c=!1,d=!1,g=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function v(e){var r=n,i=a;return n=a=void 0,u=e,o=t.apply(i,r)}function h(t){var r=t-s;return void 0===s||r>=e||r<0||d&&t-u>=i}function A(){var t=b();if(h(t))return w(t);l=setTimeout(A,function(t){var r=e-(t-s);return d?p(r,i-(t-u)):r}(t))}function w(t){return l=void 0,g&&n?v(t):(n=a=void 0,o)}function S(){var t=b(),r=h(t);if(n=arguments,a=this,s=t,r){if(void 0===l)return function(t){return u=t,l=setTimeout(A,e),c?v(t):o}(s);if(d)return l=setTimeout(A,e),v(s)}return void 0===l&&(l=setTimeout(A,e)),o}return e=m(e)||0,y(r)&&(c=!!r.leading,i=(d="maxWait"in r)?f(m(r.maxWait)||0,e):i,g="trailing"in r?!!r.trailing:g),S.cancel=function(){void 0!==l&&clearTimeout(l),u=0,n=s=a=l=void 0},S.flush=function(){return void 0===l?o:w(b())},S}}},n={};function a(t){var e=n[t];if(void 0!==e)return e.exports;var i=n[t]={exports:{}};return r[t](i,i.exports,a),i.exports}a.m=r,a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var r in e)a.o(e,r)&&!a.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},a.f={},a.e=t=>Promise.all(Object.keys(a.f).reduce(((e,r)=>(a.f[r](t,e),e)),[])),a.u=t=>"chunks/"+({151:"gsap-accordion",267:"gsap-hover",297:"gsap-modal",298:"gsap-nav",332:"lenis",336:"gsap-appear",478:"gsap-text",525:"gsap-marquee",638:"gsap-flip",678:"gsap-core",704:"gsap-draggable",955:"gsap-section"}[t]||t)+"."+{151:"52e378095c2cc99a2cfb",267:"3bfaf7c9bc70980c0949",297:"3f5d4ce36c5e823b6a48",298:"e88e13cba4c3d051bcea",332:"1025e3d9e1e1950c0c79",336:"11e46b4ef68c1d90eaa2",357:"eb4ae3d28bdca5fe0e48",478:"6ca36cd578b8aa1fb312",525:"08bc70596fa3f6731cc0",638:"b8b47ddd29764d257005",678:"4fc5abe61d7e7044090b",704:"9a84d3f6783219ac34ca",955:"bd6d6f11de3c24eb20b9"}[t]+".js",a.miniCssF=t=>{},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="AlrdyAnimate:",a.l=(r,n,i,o)=>{if(t[r])t[r].push(n);else{var l,s;if(void 0!==i)for(var u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var d=u[c];if(d.getAttribute("src")==r||d.getAttribute("data-webpack")==e+i){l=d;break}}l||(s=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,a.nc&&l.setAttribute("nonce",a.nc),l.setAttribute("data-webpack",e+i),l.src=r),t[r]=[n];var f=(e,n)=>{l.onerror=l.onload=null,clearTimeout(p);var a=t[r];if(delete t[r],l.parentNode&&l.parentNode.removeChild(l),a&&a.forEach((t=>t(n))),e)return e(n)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=f.bind(null,l.onerror),l.onload=f.bind(null,l.onload),s&&document.head.appendChild(l)}},a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;a.g.importScripts&&(t=a.g.location+"");var e=a.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=r[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=t})(),(()=>{var t={792:0};a.f.j=(e,r)=>{var n=a.o(t,e)?t[e]:void 0;if(0!==n)if(n)r.push(n[2]);else{var i=new Promise(((r,a)=>n=t[e]=[r,a]));r.push(n[2]=i);var o=a.p+a.u(e),l=new Error;a.l(o,(r=>{if(a.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;l.message="Loading chunk "+e+" failed.\n("+i+": "+o+")",l.name="ChunkLoadError",l.type=i,l.request=o,n[1](l)}}),"chunk-"+e,e)}};var e=(e,r)=>{var n,i,[o,l,s]=r,u=0;if(o.some((e=>0!==t[e]))){for(n in l)a.o(l,n)&&(a.m[n]=l[n]);s&&s(a)}for(e&&e(r);u<o.length;u++)i=o[u],a.o(t,i)&&t[i]&&t[i][0](),t[i]=0},r=this.webpackChunkAlrdyAnimate=this.webpackChunkAlrdyAnimate||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))})();var i={};return(()=>{"use strict";a.d(i,{AlrdyAnimate:()=>rt});var t=a(181),e=a.n(t);function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){l(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function l(t,e,n){return(e=function(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==e);s=!0);}catch(t){u=!0,a=t}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}(t,e)||u(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){if(t){if("string"==typeof t)return c(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function d(t){if(!t)return null;var e,r=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=u(t))){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,o=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return i=t.done,t},e:function(t){o=!0,a=t},f:function(){try{i||null==e.return||e.return()}finally{if(o)throw a}}}}(t.split("&"));try{for(r.s();!(e=r.n()).done;){var n=e.value;if(n.startsWith("bg-")){var a=n.split("-");if(a.length>=3){var i=a.slice(2).join("-");if(["all","vertical","horizontal","top","bottom","left","right","up","down","up-right","up-left","down-right","down-left"].includes(i))return i}}}}catch(t){r.e(t)}finally{r.f()}return null}function f(t,e,r){if(!t)return e;if(t.includes("|")){var n=s(t.split("|"),2),a=n[0],i=n[1];return r?i.trim():a.trim()}return t.trim()}function p(t,e,r,n,a){var i={},l=t.getAttribute("aa-animate-original")||t.getAttribute("aa-animate");if(l&&l.includes("|")&&(t.hasAttribute("aa-animate-original")||t.setAttribute("aa-animate-original",l),i.animationType=f(l,null,n),t.setAttribute("aa-animate",i.animationType)),null!=a&&a.isSlider&&(i.sliderType=f(t.getAttribute("aa-slider"),"basic",n)),null!=a&&a.isAccordion&&(i.accordionType=f(t.getAttribute("aa-accordion"),"basic",n)),null!=a&&a.isMarquee&&(i.marqueeType=f(t.getAttribute("aa-marquee"),null,n)),i.scrollStart=f(t.getAttribute("aa-scroll-start"),r.scrollStart||"top 80%",n),i.scrollEnd=f(t.getAttribute("aa-scroll-end"),r.scrollEnd||"bottom 70%",n),t.hasAttribute("aa-viewport")&&!t.hasAttribute("aa-scroll-start")){var s=parseFloat(t.getAttribute("aa-viewport"));i.scrollStart="top ".concat(100*s,"%")}return o(o({},e),i)}var b={blur:{"heading-style-h2":{animationType:"text-blur",split:"chars|3",ease:"power1.out",duration:.8,stagger:.1},"heading-style-h3":{animationType:"text-blur",split:"words",ease:"power1.out",duration:.6,stagger:.08},"text-size-medium":{animationType:"text-fade",split:"lines&words",ease:"power2.out",duration:1,stagger:.02}},tilt:{"heading-style-h2":{animationType:"text-tilt-up-lines",split:"lines",ease:"power4.out",duration:.9,stagger:.1},"heading-style-h3":{animationType:"text-tilt-up-lines",split:"lines",ease:"power4.out",duration:.7,stagger:.1},"text-size-medium":{animationType:"text-slide-up-lines",split:"lines",ease:"power4.out",duration:.5,stagger:.02}}},y={};function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function v(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function h(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?v(Object(r),!0).forEach((function(e){A(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function A(t,e,r){return(e=function(t){var e=function(t){if("object"!=m(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==m(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var w=null;function S(t){if(!t.templates)return null;var e,r=t.templates,n=r.theme,a=r.custom,i={};if(n){var o=y[e=n]||b[e]||null;o&&(i=h({},o))}return a&&(i=h(h({},i),a)),w=i,i}function T(t,e,r){if(t.hasAttribute("aa-animate")||t.hasAttribute("aa-slider")||t.hasAttribute("aa-accordion")||t.hasAttribute("aa-marquee"))return null;var n=function(t,e){var r;if(!w)return null;var n=t.className,a=w[n];if(!a)return null;var i,o,l=h({},a);if(null!==(r=l.animationType)&&void 0!==r&&r.startsWith("aa-")&&(t.classList.add(l.animationType),l.duration&&t.style.setProperty("--aa-duration","".concat(l.duration,"s")),l.delay&&t.style.setProperty("--aa-delay","".concat(l.delay,"s")),l.distance&&t.style.setProperty("--aa-distance",l.distance),void 0!==l.opacity&&t.style.setProperty("--aa-opacity",l.opacity)),l.animationType&&l.animationType.includes("|")){var s=(i=l.animationType.split("|"),o=2,function(t){if(Array.isArray(t))return t}(i)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==e);s=!0);}catch(t){u=!0,a=t}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}(i,o)||function(t,e){if(t){if("string"==typeof t)return g(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(t,e):void 0}}(i,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=s[0],c=s[1];l.animationType=e?c:u}return l.anchorElement=t,l}(t,r);return n?h(h(h({},e),n),{},{anchorElement:t,anchorSelector:null}):null}function O(t,r,n,a){var i=window.innerWidth,o=window.innerHeight,l=e()((function(){var e=window.innerWidth,l=window.innerHeight,s=e!==i,u=e<768;if(!u||s){if(!s&&l!==o&&r.gsapFeatures.includes("section"))return document.querySelectorAll('[aa-animate="pin-stack"]').forEach((function(e){var r;null!==(r=t.animations)&&void 0!==r&&r.updatePinStackOnResize&&t.animations.updatePinStackOnResize(e)})),t.ScrollTrigger&&t.ScrollTrigger.refresh(!0),void(o=l);if(s){var c;if(n=u,null!==(c=t.animations)&&void 0!==c&&c.slider&&t.animations.cleanupSliders(),document.querySelectorAll("[aa-animate], [aa-animate-original]").forEach((function(e){var i=e.getAttribute("aa-animate"),o=e.getAttribute("aa-animate-original");if(i&&i.includes("|")||o){var l=e._aaAttributeType,s=p(e,e.settings,r,n,l);e.settings=s,a(e,s,r,n,t)}})),document.querySelectorAll("[aa-slider]").forEach((function(e){var a,i=e._aaAttributeType,o=p(e,e.settings,r,n,i);e.settings=o,null!==(a=t.animations)&&void 0!==a&&a.slider&&o.sliderType&&"none"!==o.sliderType&&t.animations.slider(e,o.sliderType,o.duration,o.ease,o.delay)})),r.templates){var d=S(r);if(d){var b=Object.keys(d).map((function(t){return".".concat(t,":not([aa-animate]):not([aa-load])")})).join(",");document.querySelectorAll(b).forEach((function(e){if(e.settings){var i=function(t,e,r){var n;if(!w)return null;var a=t.className,i=w[a];if(!i)return null;var o={};return i.animationType&&i.animationType.includes("|")&&(o.animationType=f(i.animationType,null,r)),(null===(n=i.animationType)||void 0===n?void 0:n.startsWith("text-"))||Object.keys(o).length>0?h(h({},e),o):e}(e,e.settings,n);if(i){var o,l,s=null===(o=i.animationType)||void 0===o?void 0:o.startsWith("text-"),u=null===(l=i.animationType)||void 0===l?void 0:l.includes("|");(s||u)&&(e.settings=i,a(e,e.settings,r,n,t))}}}))}}t.ScrollTrigger&&t.ScrollTrigger.refresh(!0),i=e,o=l}}else o=l}),250);window.matchMedia("(hover: none)").matches?window.addEventListener("orientationchange",(function(){setTimeout((function(){l()}),100)})):window.addEventListener("resize",l)}function j(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.lazy,n=void 0===r||r,a=e.timeout,i=void 0===a?.5:a,o=e.forceEagerAboveViewport,l=void 0===o||o,s=e.excludeNavTriggers,u=void 0===s||s,c=function(){u?t.getAll().forEach((function(t){var e=t.vars.trigger;e&&"function"==typeof e.hasAttribute&&e.hasAttribute("aa-nav")||t.refresh()})):t.refresh()},d=gsap.utils.toArray("img[loading='lazy']");if(d.length){if(l&&window.scrollY>0){var f=window.scrollY;d.forEach((function(t){t.getBoundingClientRect().top+f<f&&(t.loading="eager")}))}var p=gsap.delayedCall(i,c).pause(),b=d.length,y=function(){n?p.restart(!0):--b||c()};d.forEach((function(t){n||(t.loading="eager"),t.naturalWidth?y():t.addEventListener("load",y,{once:!0})}))}}function E(t,e){if(t){if("string"==typeof t)return x(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(t,e):void 0}}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function P(){var t=0,e=null,r=null,n=!1;requestAnimationFrame((function(){document.body.hasAttribute("data-scroll-direction")?e=document.body.getAttribute("data-scroll-direction"):(document.body.setAttribute("data-scroll-direction","down"),e="down");var t=window.scrollY>50?"true":"false";document.body.setAttribute("data-scroll-started",t),r=t})),window.addEventListener("scroll",(function(){n||(requestAnimationFrame((function(){var a=window.scrollY;if(Math.abs(a-t)>=5){var i=a>t?"down":"up",o=a>50?"true":"false";i!==e&&(document.body.setAttribute("data-scroll-direction",i),e=i),o!==r&&(document.body.setAttribute("data-scroll-started",o),r=o),t=a}n=!1})),n=!0)}),{passive:!0})}function k(){var t=new IntersectionObserver((function(t){t.forEach((function(t){var e=t.target.children;Array.from(e).forEach((function(e){var r=e.getAnimations();r.length>0&&r.forEach((function(e){t.isIntersecting?e.play():e.pause()}))}))}))}));document.querySelectorAll("[aa-toggle-playstate]").forEach((function(e){t.observe(e)}))}function F(){"fetch"in window&&document.querySelectorAll("[aa-submit-button]").forEach((function(t,e){var r=t.closest("form");if(r){var n=t.tagName.toLowerCase(),a="a"===n,i="button"===n;if(a)t.removeAttribute("href"),t.setAttribute("role","button"),t.hasAttribute("tabindex")||t.setAttribute("tabindex","0");else{if(!i)return void console.warn("[AlrdyAnimate] Unsupported element type for form submit:",n);t.hasAttribute("type")||t.setAttribute("type","button")}var o=t.hasAttribute("aa-submit-loading-duration")?parseFloat(t.getAttribute("aa-submit-loading-duration")):.3,l=t.hasAttribute("aa-submit-success-duration")?parseFloat(t.getAttribute("aa-submit-success-duration")):1.2,s=t.hasAttribute("aa-submit-error-duration")?parseFloat(t.getAttribute("aa-submit-error-duration")):1.2,u=t.getAttribute("aa-submit-logic")||"default",c=t.hasAttribute("aa-submit-debug");c&&console.log("[AlrdyAnimate] Button configuration:",{loadingDuration:o,successDuration:l,errorDuration:s,submitLogic:u});var d="is-loading",f="is-success",p="is-error",b=r.closest(".w-form"),y=null==b?void 0:b.querySelector(".w-form-done"),m=null==b?void 0:b.querySelector(".w-form-fail");c&&console.log("[AlrdyAnimate] Webflow elements found:",{formWrapper:!!b,successMessage:!!y,errorMessage:!!m}),a?(t.addEventListener("click",h),t.addEventListener("keydown",(function(t){!a||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),h(t))}))):i&&(t.addEventListener("click",h),r.addEventListener("submit",(function(e){e.submitter===t&&h(e)})))}else console.warn("[AlrdyAnimate] Submit button is not inside a <form>.",t);function g(){t.classList.remove(f,p),a?(t.style.pointerEvents="auto",t.removeAttribute("aria-disabled")):t.disabled=!1}function v(t){return c&&console.log("[AlrdyAnimate] Form response:",{status:t.status,statusText:t.statusText,contentType:t.headers.get("content-type")||"unknown"}),t.ok?t.json().catch((function(){return c&&console.log("[AlrdyAnimate] Non-JSON response, treating as success"),{success:!0}})):t.json().catch((function(){return{success:!1}})).then((function(e){throw c&&console.log("[AlrdyAnimate] Error response:",e),{networkError:!0,data:e,statusText:t.statusText}}))}function h(e){if(!r.checkValidity())return e.preventDefault(),void r.reportValidity();var n=r.getAttribute("action");if(!n||""===n.trim()){c&&console.log("[AlrdyAnimate] No form action - delegating to Webflow native submission"),t.classList.add(d),a?(t.style.pointerEvents="none",t.setAttribute("aria-disabled","true")):t.disabled=!0;var i=r.querySelector('input[type="submit"]');return i||((i=document.createElement("input")).type="submit",i.style.display="none",r.appendChild(i)),void i.click()}e.preventDefault(),"default"===u?(r.style.display="block",null==y||y.style.setProperty("display","none"),null==m||m.style.setProperty("display","none")):(null==b||b.classList.remove(d,f,p),null==y||y.classList.remove(f),null==m||m.classList.remove(p)),g(),a?(t.style.pointerEvents="none",t.setAttribute("aria-disabled","true")):t.disabled=!0,t.classList.add(d),t.setAttribute("aria-busy","true"),b&&b.classList.add(d),function(){var e=r.getAttribute("action"),n=(r.getAttribute("method")||"POST").toUpperCase();c&&console.log("[AlrdyAnimate] Form submission:",{action:e,method:n});var a,i,h=new FormData(r),A={method:n,headers:{Accept:"application/json"}},w=e;if("GET"===n){var S,T=new URLSearchParams,O=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=E(t))){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,o=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return i=t.done,t},e:function(t){o=!0,a=t},f:function(){try{i||null==e.return||e.return()}finally{if(o)throw a}}}}(h.entries());try{for(O.s();!(S=O.n()).done;){var j=(a=S.value,i=2,function(t){if(Array.isArray(t))return t}(a)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==e);s=!0);}catch(t){u=!0,a=t}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}(a,i)||E(a,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),x=j[0],P=j[1];T.append(x,P)}}catch(t){O.e(t)}finally{O.f()}var k=e.includes("?")?"&":"?";w="".concat(e).concat(k).concat(T.toString())}else A.body=h;var F=!1,L=!1,I=null,q=function(){F&&L&&(t.classList.remove(d),t.removeAttribute("aria-busy"),b&&b.classList.remove(d),I?(t.classList.add(f),"default"===u?(r.style.display="none",null==y||y.style.setProperty("display","block")):(null==b||b.classList.remove(d,p),null==b||b.classList.add(f),null==y||y.classList.add(f)),setTimeout((function(){return g()}),1e3*l)):(t.classList.add(p),"default"===u?null==m||m.style.setProperty("display","block"):(null==b||b.classList.remove(d,f),null==b||b.classList.add(p),null==m||m.classList.add(p)),setTimeout((function(){return g()}),1e3*s)))};fetch(w,A).then(v).then((function(t){F=!0,I=t,q()})).catch((function(t){F=!0,I=null,q()})),setTimeout((function(){L=!0,q()}),1e3*o)}()}}))}var L=a(543);function I(t){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},I(t)}function q(){q=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function s(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(e,r,n,a){var i=r&&r.prototype instanceof f?r:f,o=Object.create(i.prototype);return s(o,"_invoke",function(e,r,n){var a=1;return function(i,o){if(3===a)throw Error("Generator is already running");if(4===a){if("throw"===i)throw o;return{value:t,done:!0}}for(n.method=i,n.arg=o;;){var l=n.delegate;if(l){var s=w(l,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===a)throw a=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=3;var u=c(e,r,n);if("normal"===u.type){if(a=n.done?4:2,u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(a=4,n.method="throw",n.arg=u.arg)}}}(e,n,new O(a||[])),!0),o}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var d={};function f(){}function p(){}function b(){}var y={};s(y,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(j([])));g&&g!==r&&n.call(g,i)&&(y=g);var v=b.prototype=f.prototype=Object.create(y);function h(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function r(a,i,o,l){var s=c(t[a],t,i);if("throw"!==s.type){var u=s.arg,d=u.value;return d&&"object"==I(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){r("next",t,o,l)}),(function(t){r("throw",t,o,l)})):e.resolve(d).then((function(t){u.value=t,o(u)}),(function(t){return r("throw",t,o,l)}))}l(s.arg)}var a;s(this,"_invoke",(function(t,n){function i(){return new e((function(e,a){r(t,n,e,a)}))}return a=a?a.then(i,i):i()}),!0)}function w(e,r){var n=r.method,a=e.i[n];if(a===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=c(a,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var o=i.arg;return o?o.done?(r[e.r]=o.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){this.tryEntries.push(t)}function T(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function O(t){this.tryEntries=[[-1]],t.forEach(S,this),this.reset(!0)}function j(e){if(null!=e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,o=function r(){for(;++a<e.length;)if(n.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(I(e)+" is not iterable")}return p.prototype=b,s(v,"constructor",b),s(b,"constructor",p),p.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(v),t},e.awrap=function(t){return{__await:t}},h(A.prototype),s(A.prototype,o,(function(){return this})),e.AsyncIterator=A,e.async=function(t,r,n,a,i){void 0===i&&(i=Promise);var o=new A(u(t,r,n,a),i);return e.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},h(v),s(v,l,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=j,O.prototype={constructor:O,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){o.type="throw",o.arg=e,r.next=t}for(var a=r.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],o=i[4],l=this.prev,s=i[1],u=i[2];if(-1===i[0])return n("end"),!1;if(!s&&!u)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=l){if(l<s)return this.method="next",this.arg=t,n(s),!0;if(l<u)return n(u),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var a=n;break}}a&&("break"===t||"continue"===t)&&a[0]<=e&&e<=a[2]&&(a=null);var i=a?a[4]:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a[2],d):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var a=n.arg;T(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:j(e),r,n},"next"===this.method&&(this.arg=t),d}},e}function D(t,e){return G(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==e);s=!0);}catch(t){u=!0,a=t}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}(t,e)||N(t,e)||C()}function M(t){return function(t){if(Array.isArray(t))return z(t)}(t)||_(t)||N(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function N(t,e){if(t){if("string"==typeof t)return z(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?z(t,e):void 0}}function z(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function _(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function G(t){if(Array.isArray(t))return t}function W(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function H(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?W(Object(r),!0).forEach((function(e){$(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):W(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function $(t,e,r){return(e=function(t){var e=function(t){if("object"!=I(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=I(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==I(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function B(t,e,r,n,a,i,o){try{var l=t[i](o),s=l.value}catch(t){return void r(t)}l.done?e(s):Promise.resolve(s).then(n,a)}function R(t){return function(){var e=this,r=arguments;return new Promise((function(n,a){var i=t.apply(e,r);function o(t){B(i,n,a,o,l,"next",t)}function l(t){B(i,n,a,o,l,"throw",t)}o(void 0)}))}}var U=null,Y=!1,V=!1,J=null,K={ease:"ease-in-out",again:!0,scrollStart:"top 80%",scrollEnd:"bottom 70%",duration:1,delay:0,distance:1,hoverDuration:.3,hoverDelay:0,hoverEase:"power3.out",hoverDistance:.1,gsapFeatures:[],includeGSAP:!1,smoothScroll:{enabled:!0,options:{}},lazyLoadHandler:!1,debug:!1,templates:null,initTimeout:3,reducedMotionDuration:.5,reducedMotionEase:"ease",loadGracePeriod:.35};function Q(t,e){document.querySelectorAll("[aa-animate], [aa-children], [aa-hover]").forEach((function(r){if(!r.hasAttribute("aa-accordion-content")&&!r.hasAttribute("aa-accordion")){var n=r.getAttribute("aa-animate");n&&["background","clip","stack"].includes(n)||(r.hasAttribute("aa-load")&&r.hasAttribute("aa-animate")&&r.removeAttribute("aa-animate"),r.hasAttribute("aa-animate")&&r.setAttribute("aa-animate","fade"),r.hasAttribute("aa-children")&&r.setAttribute("aa-children","fade"),r.hasAttribute("aa-hover")&&r.setAttribute("aa-hover","none"),r.setAttribute("aa-duration",String(t)),r.setAttribute("aa-ease",e))}}))}function X(){return X=R(q().mark((function t(){var e,r,n,i,o,l,s,u,c,d=arguments;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=d.length>0&&void 0!==d[0]?d[0]:{},r=H(H({},K),e),n=null,window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches&&(console.log("AlrdyAnimate: Reduced motion detected, replacing animations with fade-only"),Q(r.reducedMotionDuration,r.reducedMotionEase),r.templates=null),window.alrdyInitialized=!1,setTimeout((function(){document.body.hasAttribute("aa-js-ready")||(document.body.setAttribute("aa-load-grace-expired","true"),console.warn("AlrdyAnimate: Loading grace period expired (".concat(r.loadGracePeriod,"s) - hybrid loading elements will use CSS animations")))}),1e3*r.loadGracePeriod),J=setTimeout((function(){window.alrdyInitialized||(console.warn("AlrdyAnimate initialization taking longer than expected - showing elements temporarily"),et(null,U))}),1e3*r.initTimeout),t.prev=8,P(),k(),F(),(0,L.l)({duration:r.duration,delay:r.delay}),i=S(r),o=M(document.querySelectorAll("[aa-animate], [aa-children], [aa-hover], [aa-slider], [aa-accordion], [aa-marquee]")),i&&(l=Object.keys(i).map((function(t){return".".concat(t,":not([aa-animate]):not([aa-load]):not([aa-slider]):not([aa-accordion]):not([aa-marquee])")})).join(","),s=document.querySelectorAll(l),o=[].concat(M(o),M(s))),o.forEach((function(t){t._aaAttributeType={isAnimate:t.hasAttribute("aa-animate"),isChildren:t.hasAttribute("aa-children"),isHover:t.hasAttribute("aa-hover"),isSlider:t.hasAttribute("aa-slider"),isAccordion:t.hasAttribute("aa-accordion"),isMarquee:t.hasAttribute("aa-marquee")}})),U=o,Y=window.innerWidth<768,V=r.gsapFeatures.length>0,"IntersectionObserver"in window||V){t.next=23;break}return et("No IntersectionObserver support found",U),t.abrupt("return");case 23:return document.body.style.setProperty("--aa-default-duration","".concat(r.duration,"s")),document.body.style.setProperty("--aa-default-delay","".concat(r.delay,"s")),document.body.style.setProperty("--aa-default-distance","".concat(r.distance)),document.body.style.setProperty("--aa-default-hover-duration","".concat(r.hoverDuration,"s")),document.body.style.setProperty("--aa-default-hover-delay","".concat(r.hoverDelay,"s")),document.body.style.setProperty("--aa-default-hover-distance","".concat(r.distance)),document.body.setAttribute("aa-ease",r.ease),u=null,c=null,V&&(u=R(q().mark((function t(){var e,i,o,l,s,u,c,d,f,p,b,y,m,g,v,h,A,w;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,a.e(357).then(a.bind(a,357));case 3:return i=t.sent,o=i.getGSAPModules,l=i.gsapBundles,t.next=8,o(r.includeGSAP);case 8:return s=t.sent,u=s.gsap,c=s.ScrollTrigger,d={gsap:u,ScrollTrigger:c},f={},u.registerPlugin(c),window.gsap=u,window.ScrollTrigger=c,t.prev=16,t.next=19,Promise.all(r.gsapFeatures.map(function(){var t=R(q().mark((function t(e){var n,a,i,o;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,n=l[e]){t.next=4;break}return t.abrupt("return");case 4:if(!n.plugins){t.next=9;break}return t.next=7,n.plugins(r.includeGSAP);case 7:t.sent.forEach((function(t){try{Object.entries(t).forEach((function(t){var e=D(t,2),n=e[0],a=e[1];a?(u.registerPlugin(a),window[n]=a):console.warn("Plugin ".concat(n," not available from ").concat(r.includeGSAP?"bundle":"Webflow"))})),Object.assign(d,t)}catch(t){console.warn("Failed to register plugin for feature ".concat(e,":"),t)}}));case 9:if(!n.dependencies){t.next=15;break}return t.next=12,n.dependencies();case 12:a=t.sent,Object.assign(d,a),a.splitText&&(window.splitText=a.splitText);case 15:if(!n.animations){t.next=40;break}return t.next=18,n.animations();case 18:i=t.sent,o={},t.t0=e,t.next="text"===t.t0?23:"section"===t.t0?25:"appear"===t.t0?27:"marquee"===t.t0?29:"slider"===t.t0?31:"hover"===t.t0?33:"nav"===t.t0?35:"accordion"===t.t0?37:39;break;case 23:return o=i.createTextAnimations(d.gsap),t.abrupt("break",39);case 25:return o=i.createSectionAnimations(d.gsap,d.ScrollTrigger),t.abrupt("break",39);case 27:return o=i.createAppearAnimations(d.gsap,d.ScrollTrigger),t.abrupt("break",39);case 29:return o=i.createMarqueeAnimations(d.gsap,d.ScrollTrigger),t.abrupt("break",39);case 31:return o=i.createSliderAnimations(d.gsap,d.Draggable),t.abrupt("break",39);case 33:return o=i.createHoverAnimations(d.gsap,d.splitText),t.abrupt("break",39);case 35:return o=i.createNavAnimations(d.gsap),t.abrupt("break",39);case 37:return o=i.createAccordionAnimations(d.gsap,r.duration),t.abrupt("break",39);case 39:Object.assign(f,o);case 40:t.next=45;break;case 42:t.prev=42,t.t1=t.catch(0),console.warn("Failed to load feature ".concat(e,":"),t.t1);case 45:case"end":return t.stop()}}),t,null,[[0,42]])})));return function(e){return t.apply(this,arguments)}}()));case 19:t.next=24;break;case 21:t.prev=21,t.t0=t.catch(16),console.warn("Failed to load some GSAP features:",t.t0);case 24:if(d.animations=f,null===(e=r.smoothScroll)||void 0===e||!e.enabled){t.next=45;break}return t.prev=26,t.next=29,a.e(357).then(a.bind(a,357));case 29:return p=t.sent,b=p.coreBundles,y=b.smoothScroll,t.next=34,Promise.all([y.plugins(),y.setup()]);case 34:m=t.sent,g=D(m,2),v=g[0].default,h=g[1].initializeSmoothScroll,n=h(v,d.gsap,d.ScrollTrigger,r.smoothScroll.options),window.lenis=n,t.next=45;break;case 42:t.prev=42,t.t1=t.catch(26),console.warn("Failed to initialize smooth scroll:",t.t1);case 45:if(!r.gsapFeatures.includes("modal")){t.next=57;break}return t.prev=46,t.next=49,l.modal.animations();case 49:A=t.sent,w=A.createModalAnimations(d.gsap,n,r.duration),d.animations.modal=function(t){if(null!=w&&w.modal&&"function"==typeof w.modal)return w.modal(t)},t.next=57;break;case 54:t.prev=54,t.t2=t.catch(46),console.warn("Failed to initialize modal animations:",t.t2);case 57:return t.abrupt("return",d);case 60:return t.prev=60,t.t3=t.catch(0),console.warn("Failed to load GSAP core:",t.t3),t.abrupt("return",null);case 64:case"end":return t.stop()}}),t,null,[[0,60],[16,21],[26,42],[46,54]])})))()),t.abrupt("return",new Promise((function(t){window.addEventListener("load",R(q().mark((function e(){var a,i,o;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!V){e.next=7;break}return e.next=3,u;case 3:(c=e.sent)?(r.gsapFeatures.includes("nav")&&(c.animations.nav(c.ScrollTrigger),c.animations.initNavigationTracking(c.ScrollTrigger)),r.gsapFeatures.includes("modal")&&(o=document.querySelectorAll("[aa-modal-group]")).length>0&&o.forEach((function(t){c.animations.modal(t)})),Z(U,r,Y,c),O(c,r,Y,tt),c.ScrollTrigger&&c.ScrollTrigger.refresh(!0),r.lazyLoadHandler&&j(c.ScrollTrigger)):(V=!1,U.forEach((function(t){t.style.visibility="visible",t.style.opacity=1})),Z(U,r,Y,{gsap:null,ScrollTrigger:null})),e.next=8;break;case 7:Z(U,r,Y,{gsap:null,ScrollTrigger:null});case 8:w=null,document.body.setAttribute("aa-js-ready","true"),clearTimeout(J),window.alrdyInitialized=!0,document.dispatchEvent(new Event("alrdy-init-complete")),t({gsap:(null===(a=c)||void 0===a?void 0:a.gsap)||null,ScrollTrigger:(null===(i=c)||void 0===i?void 0:i.ScrollTrigger)||null,lenis:n});case 14:case"end":return e.stop()}}),e)}))))})));case 36:throw t.prev=36,t.t0=t.catch(8),window.alrdyInitialized||(et(t.t0,U),document.dispatchEvent(new Event("alrdy-init-failed"))),t.t0;case 40:case"end":return t.stop()}}),t,null,[[8,36]])}))),X.apply(this,arguments)}function Z(t,e,r,n){t.forEach((function(t){var a=t._aaAttributeType||{isAnimate:t.hasAttribute("aa-animate"),isChildren:t.hasAttribute("aa-children"),isHover:t.hasAttribute("aa-hover"),isSlider:t.hasAttribute("aa-slider"),isAccordion:t.hasAttribute("aa-accordion"),isMarquee:t.hasAttribute("aa-marquee")};if(a.isChildren){var i=function(t){var e=Array.from(t.children),r=t.hasAttribute("aa-delay")?parseFloat(t.getAttribute("aa-delay")):0,n=t.hasAttribute("aa-stagger")?parseFloat(t.getAttribute("aa-stagger")):0,a=t.getAttribute("aa-children");return e.forEach((function(e,i){if(!e.hasAttribute("aa-animate")){a&&"true"!==a&&e.setAttribute("aa-animate",a),Array.from(t.attributes).filter((function(t){return t.name.startsWith("aa-")&&!["aa-children","aa-stagger","aa-delay","aa-accordion","aa-modal","aa-hover","aa-slider","aa-marquee","aa-nav"].includes(t.name)})).forEach((function(t){e.setAttribute(t.name,t.value)}));var o=r+i*n;e.setAttribute("aa-delay",o.toString())}})),t.style.opacity="1",e}(t);if(Z(i,e,r,n),!a.isSlider&&!a.isAccordion&&!a.isMarquee)return}var l=T(t,e,r),u=l||function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=t.getAttribute("aa-animate-original")||t.getAttribute("aa-animate"),l=i;i&&i.includes("|")&&(t.hasAttribute("aa-animate-original")||t.setAttribute("aa-animate-original",i),l=f(i,null,r),t.setAttribute("aa-animate",l));var u,c,p=t.getAttribute("aa-hover"),b=null!=a&&a.isSlider?f(t.getAttribute("aa-slider"),"basic",r):null,y=null!=a&&a.isAccordion?f(t.getAttribute("aa-accordion"),"basic",r):null,m=null!=a&&a.isMarquee?f(t.getAttribute("aa-marquee"),null,r):null,g=t.getAttribute("aa-anchor"),v=g?document.querySelector(g):t,h=(u=t.getAttribute("aa-color"))?u.split(" ").reduce((function(t,e){var r=s(e.split(":").map((function(t){return t.trim()})),2),n=r[0],a=r[1];if(n&&a){var i={bg:"backgroundColor",text:"color",border:"borderColor"};i[n]&&(t[i[n]]=a)}return t}),{}):{},A=h.backgroundColor,w=f(t.getAttribute("aa-scroll-start"),e.scrollStart||"top 80%",r),S=f(t.getAttribute("aa-scroll-end"),e.scrollEnd||"bottom 70%",r),T=w;if(t.hasAttribute("aa-viewport")&&!t.hasAttribute("aa-scroll-start")){var O=parseFloat(t.getAttribute("aa-viewport"));T="top ".concat(100*O,"%")}return o(o({animationType:l,ease:t.hasAttribute("aa-ease")?t.getAttribute("aa-ease"):e.ease,split:t.getAttribute("aa-split"),scrub:t.getAttribute("aa-scrub"),distance:t.hasAttribute("aa-distance")?parseFloat(t.getAttribute("aa-distance")):e.distance},null!=a&&a.isHover?{hoverType:p,hoverDirection:p&&(d(p)||t.getAttribute("aa-hover-direction"))||"all",isReverse:!!p&&p.includes("reverse"),hoverDuration:t.hasAttribute("aa-duration")?parseFloat(t.getAttribute("aa-duration")):e.hoverDuration,hoverDelay:t.hasAttribute("aa-delay")?parseFloat(t.getAttribute("aa-delay")):e.hoverDelay,hoverEase:t.hasAttribute("aa-ease")?t.getAttribute("aa-ease"):e.hoverEase,hoverDistance:t.hasAttribute("aa-distance")?parseFloat(t.getAttribute("aa-distance")):e.hoverDistance,hoverStagger:t.hasAttribute("aa-stagger")?parseFloat(t.getAttribute("aa-stagger")):.03,bg:t.querySelector("[aa-hover-bg]")}:{}),{},{sliderType:b,accordionType:y,marqueeType:m,duration:t.hasAttribute("aa-duration")?parseFloat(t.getAttribute("aa-duration")):e.duration,delay:(c=t.hasAttribute("aa-delay")?parseFloat(t.getAttribute("aa-delay")):e.delay,t.hasAttribute("aa-load")&&t.hasAttribute("aa-animate")&&n>0?c+n:c),delayMobile:t.hasAttribute("aa-delay-mobile")?parseFloat(t.getAttribute("aa-delay-mobile")):void 0,stagger:t.hasAttribute("aa-stagger")?parseFloat(t.getAttribute("aa-stagger")):void 0,opacity:t.hasAttribute("aa-opacity")?parseFloat(t.getAttribute("aa-opacity")):1,colors:h,pseudoColor:A,scrollStart:T,scrollEnd:S,anchorSelector:g,anchorElement:v,isParent:(null==a?void 0:a.isChildren)||t.hasAttribute("aa-children"),childrenAnimation:t.getAttribute("aa-children")})}(t,e,r,e.loadGracePeriod,a);u&&(t.settings=u,function(t,e,r){var n=e.duration,a=e.delay,i=e.distance,o=e.delayMobile,l=(e.color,e.opacity),s=e.pseudoColor;if(t.hasAttribute("aa-duration")&&t.style.setProperty("--aa-duration","".concat(n,"s")),t.hasAttribute("aa-delay")||t.hasAttribute("aa-load")&&t.hasAttribute("aa-animate")){var u=r&&void 0!==o?o:a;t.style.setProperty("--aa-delay","".concat(u,"s"))}t.hasAttribute("aa-distance")&&t.style.setProperty("--aa-distance","".concat(i)),t.hasAttribute("aa-opacity")&&t.style.setProperty("--aa-opacity","".concat(l)),s&&t.style.setProperty("--aa-pseudo-color",s)}(t,u,r),a.isHover&&window.matchMedia("(hover: hover)").matches&&V&&e.gsapFeatures.includes("hover")&&function(t,e,r){e.hoverType.split("&").forEach((function(n){var a,i=G(a=n.split("-"))||_(a)||N(a)||C(),o=i[0],l=i.slice(1);switch(o){case"text":r.animations.initializeTextHover(t,H(H({},e),{},{hoverType:n}));break;case"bg":var s=l[0];r.animations.initializeBackgroundHover(t,H(H({},e),{},{hoverType:n}),s);break;case"icon":r.animations.initializeIconHover(t,H(H({},e),{},{hoverType:n}))}}))}(t,u,n),(a.isSlider||a.isAccordion||a.isMarquee)&&V&&function(t,e,r,n,a){var i=e.sliderType,o=e.accordionType,l=e.marqueeType;if(a.isSlider){if("none"===i)return;if(n.gsapFeatures.includes("slider")){var s=e.duration,u=e.ease,c=e.delay;r.animations.slider(t,i,s,u,c)}}if(a.isAccordion){if("none"===o)return;n.gsapFeatures.includes("accordion")&&r.animations.accordion(t,o)}if(a.isMarquee){if("none"===l)return;if(n.gsapFeatures.includes("marquee")){var d=e.duration,f=e.scrub;r.animations.marquee(t,d,f,l)}}}(t,u,n,e,a),(a.isAnimate||l)&&(V?tt(t,u,e,0,n):(t.style.visibility="visible",function(t,e,r){var n=e.anchorElement,a=e.anchorSelector,i=20,o=e.scrollStart.match(/top\s+(\d+)%/);o&&(i=100-parseFloat(o[1]));var l="0px 0px -".concat(i,"% 0px"),s=new IntersectionObserver((function(e){e.forEach((function(e){e.isIntersecting&&t.classList.add("in-view")}))}),{threshold:[0,1],rootMargin:l}),u=new IntersectionObserver((function(e){e.forEach((function(e){var n=e.target.getBoundingClientRect();!e.isIntersecting&&n.top>=window.innerHeight&&(r.again||a)&&t.classList.remove("in-view")}))}),{threshold:0,rootMargin:"0px"});s.observe(n),u.observe(n)}(t,u,e))))}))}function tt(t,e,r,n,a){var i=e.animationType,o=e.split,l=e.scrub,s=e.duration,u=e.stagger,c=e.delay,d=e.ease,f=e.opacity,p=e.distance,b=e.anchorElement,y=e.anchorSelector,m=e.scrollStart,g=e.scrollEnd,v=t.hasAttribute("aa-load")&&t.hasAttribute("aa-animate"),h=document.body.hasAttribute("aa-load-grace-expired");if(v&&h)return r.debug&&console.log("AlrdyAnimate: Loading grace period expired, CSS load animations run instead of GSAP"),void(t.style.visibility="visible");var A=i.includes("-")?i.split("-")[0]:i,w=["appear","reveal","counter","grow","text","background","parallax","clip","stack","pin"].includes(A),S=["clip","stack","background","parallax","pin"].includes(A);t.timeline&&t.timeline.kill(),t.splitInstance&&t.splitInstance.revert(),t.scrollTriggers&&(t.scrollTriggers.forEach((function(t){return t.kill()})),t.scrollTriggers=[]);var T=null;if(w&&!S&&(T=a.gsap.timeline({paused:!l}),t.timeline=T),!S)if(t.hasAttribute("aa-event-trigger"))t.timeline&&t.timeline.pause(),t.scrollTriggers=[],t.addEventListener("aa-event-trigger",(function(e){var r=e.detail.action;"play"===r?(t.classList.add("in-view"),t.style.visibility="visible",t.timeline&&t.timeline.timeScale(1).play()):"reverse"===r&&(t.classList.remove("in-view"),t.timeline&&t.timeline.timeScale(2).reverse())}));else{var O=t.getAttribute("aa-pinned-container"),j=O?document.getElementById(O):null,E=a.ScrollTrigger.create(H(H(H(H({trigger:b},j?{pinnedContainer:j}:{}),l?{start:m,end:g,stagger:u,scrub:!!l&&(parseFloat(l)||!0),invalidateOnRefresh:!l}:{start:m}),T?{animation:T}:{}),{},{onEnter:function(){t.classList.add("in-view"),l||(a.gsap.set(t,{visibility:"visible"}),T&&T.play())},markers:r.debug})),x=a.ScrollTrigger.create(H(H({trigger:b},j?{pinnedContainer:j}:{}),{},{start:"top 100%",onLeaveBack:function(){(r