{"version":3,"file":"animations-loadAnimation.chunk.bfa7bc0a304dd6ef4610.js","mappings":"kMAEe,SAASA,EAAcC,GAClC,IAAMC,EAAM,IAAIC,IAAIC,OAAOC,SAASC,MAE9BC,EAAiE,SADrD,IAAIC,gBAAgBN,EAAIO,QACPC,IAAI,4BAEvCT,EAAIU,SAAQ,SAAAC,GACR,IAAMC,EAAcD,EAAGE,QAAqB,iCAGtB,uBADAF,EAAGG,aAAa,yBAElCC,EAAAA,EAAAA,SAAiBJ,EAAIC,EAAaN,EAG1C,GACJ,C,4FCbe,SAASS,EACpBJ,EACAC,EACAN,GAEAU,EAAAA,GAAAA,eAAoBC,EAAAA,GAEpB,IAAMC,EAAYN,GAAeD,EAE3BQ,EAAuB,CACzBC,QAASF,EACTG,MAAO,EACPC,MAAO,kBACPC,IAAK,iBACLC,QAASlB,EACTmB,cAAe,0BAGnBT,EAAAA,GAAAA,SAAa,WACEA,EAAAA,GAAAA,WACRU,KAAKR,EAAW,CAAES,UAAW,IAAKD,KAAKf,EAAGiB,SAAU,CACnDC,EAAG,IACHC,QAAS,GACTC,QAAS,GACTC,SAAU,GACVC,cAAed,GAEvB,GACJ,C","sources":["webpack:///./html/wp-content/themes/ls/src/js/main/components/animations/loadAnimation.ts","webpack:///./html/wp-content/themes/ls/src/js/main/components/animations/staggeredSlideUp.ts"],"sourcesContent":["import staggeredSlideUp from './staggeredSlideUp';\n\nexport default function loadAnimation(els: HTMLElement[]) {\n const url = new URL(window.location.href);\n const urlParams = new URLSearchParams(url.search);\n const isMarkersEnabled = urlParams.get('enable_animation_markers') === 'true';\n\n els.forEach(el => {\n const containerEl = el.closest('[data-animation-container-el]');\n\n const animationType = el.getAttribute('data-load-animation');\n if (animationType === 'staggered-slide-up') {\n staggeredSlideUp(el, containerEl, isMarkersEnabled);\n }\n return;\n });\n}\n","import { gsap } from 'gsap';\nimport { ScrollTrigger } from 'gsap/ScrollTrigger';\n\nexport default function staggeredSlideUp(\n el: Element,\n containerEl: HTMLElement | null,\n isMarkersEnabled: boolean\n): void {\n gsap.registerPlugin(ScrollTrigger);\n\n const triggerEl = containerEl || el;\n\n const scrollTriggerOptions = {\n trigger: triggerEl,\n scrub: 1,\n start: 'clamp(top 100%)',\n end: 'clamp(60% 80%)',\n markers: isMarkersEnabled,\n toggleActions: 'restart none none none',\n };\n\n gsap.context(() => {\n const tl = gsap.timeline();\n tl.from(triggerEl, { autoAlpha: 0 }).from(el.children, {\n y: 150,\n opacity: 0.5,\n stagger: 0.1,\n duration: 0.5,\n scrollTrigger: scrollTriggerOptions,\n });\n });\n}\n"],"names":["loadAnimation","els","url","URL","window","location","href","isMarkersEnabled","URLSearchParams","search","get","forEach","el","containerEl","closest","getAttribute","staggeredSlideUp","gsap","ScrollTrigger","triggerEl","scrollTriggerOptions","trigger","scrub","start","end","markers","toggleActions","from","autoAlpha","children","y","opacity","stagger","duration","scrollTrigger"],"sourceRoot":""}