{"version":3,"file":"animations-preventAnimationsAboveFold.chunk.d8a63097d58be8839846.js","mappings":"yIAqBA,UArBmC,SAACA,GAChC,IACMC,EADM,IAAIC,IAAIC,OAAOC,SAASC,MACfC,SAASC,SAAS,QAEjCC,EAAqBC,SAASC,cAA2B,YACzDC,EAAiBH,EACjBI,MAAMC,KAAKL,EAAmBM,UAC9B,GAENd,EAAIe,SAAQ,SAAAC,GACR,IAAMC,EAAcD,EAAGE,QAAqB,iCACtCC,EAAiBR,EAAeS,WAAU,SAAAJ,GAAE,OAAIA,IAAOC,CAAW,KACpDE,GAAkB,GAEnBlB,KACfe,EAAGK,gBAAgB,uBACnBJ,SAAAA,EAAaI,gBAAgB,+BAErC,GACJ,C","sources":["webpack:///./html/wp-content/themes/ls/src/js/main/components/animations/preventAnimationsAboveFold.ts"],"sourcesContent":["const preventAnimationsAboveFold = (els: HTMLElement[]) => {\n    const url = new URL(window.location.href);\n    const isPCPage = url.pathname.includes('/pc/');\n\n    const pageContentWrapper = document.querySelector<HTMLElement>('#content');\n    const allPageModules = pageContentWrapper\n        ? Array.from(pageContentWrapper.children)\n        : [];\n\n    els.forEach(el => {\n        const containerEl = el.closest<HTMLElement>('[data-animation-container-el]');\n        const modulePosition = allPageModules.findIndex(el => el === containerEl);\n        const isAboveFold = modulePosition <= 1;\n\n        if (isAboveFold || isPCPage) {\n            el.removeAttribute('data-load-animation');\n            containerEl?.removeAttribute('data-animation-container-el');\n        }\n    });\n};\n\nexport default preventAnimationsAboveFold;\n"],"names":["els","isPCPage","URL","window","location","href","pathname","includes","pageContentWrapper","document","querySelector","allPageModules","Array","from","children","forEach","el","containerEl","closest","modulePosition","findIndex","removeAttribute"],"sourceRoot":""}