{"version":3,"file":"home-animation-072OiVCi.js","sources":["../../../app/javascript/entrypoints/home-animation.js"],"sourcesContent":["document.addEventListener(\"DOMContentLoaded\", () => {\n const animationButton = document.getElementById(\"animation-button\");\n const animationCursor = document.getElementById(\"animation-cursor\");\n const animationNetwork = document.querySelector(\".animation-network\");\n const animationHeader = document.querySelector(\".animation-header\");\n const animationPosts = document.querySelectorAll(\".animation-post\");\n const animationAvatars = document.querySelectorAll(\".animation-post-avatar\");\n\n function animateNetwork() {\n animationNetwork.style.opacity = \"1\";\n\n setTimeout(() => {\n animationHeader.style.transform = \"translateY(0)\";\n }, 200);\n\n animationPosts.forEach((post, index) => {\n setTimeout(() => {\n post.style.opacity = \"1\";\n post.style.transform = \"translateY(0)\";\n\n const postElements = post.querySelectorAll(\n \".animation-post-avatar, .animation-username, .animation-post-content, .animation-action\"\n );\n postElements.forEach((element, elementIndex) => {\n setTimeout(() => {\n element.style.opacity = \"1\";\n }, elementIndex * 100);\n });\n }, 1000 + index * 300);\n });\n }\n\n function resetAnimation() {\n animationButton.style.opacity = \"1\";\n animationButton.style.transform = \"translate(-50%, -50%)\";\n animationNetwork.style.opacity = \"0\";\n animationHeader.style.transform = \"translateY(-100%)\";\n\n animationPosts.forEach((post) => {\n post.style.opacity = \"0\";\n post.style.transform = \"translateY(20px)\";\n const postElements = post.querySelectorAll(\n \".animation-post-avatar, .animation-username, .animation-post-content, .animation-action\"\n );\n postElements.forEach((element) => {\n element.style.opacity = \"0\";\n });\n });\n }\n\n function runAnimation() {\n animationCursor.style.animation = \"animation-cursor-move 2s forwards\";\n\n setTimeout(() => {\n animationCursor.style.animation = \"animation-cursor-click 0.2s\";\n animationButton.style.animation = \"animation-click 0.2s\";\n }, 1000);\n\n setTimeout(() => {\n animationButton.style.opacity = \"0\";\n animationButton.style.transform = \"translate(-50%, -50%) scale(0)\";\n animationCursor.style.opacity = \"0\";\n animateNetwork();\n }, 1500);\n\n setTimeout(resetAnimation, 5000);\n setTimeout(runAnimation, 5500);\n }\n\n runAnimation();\n});\n"],"names":["animationButton","animationCursor","animationNetwork","animationHeader","animationPosts","animateNetwork","post","index","element","elementIndex","resetAnimation","runAnimation"],"mappings":"AAAA,SAAS,iBAAiB,mBAAoB,IAAM,CAClD,MAAMA,EAAkB,SAAS,eAAe,kBAAkB,EAC5DC,EAAkB,SAAS,eAAe,kBAAkB,EAC5DC,EAAmB,SAAS,cAAc,oBAAoB,EAC9DC,EAAkB,SAAS,cAAc,mBAAmB,EAC5DC,EAAiB,SAAS,iBAAiB,iBAAiB,EACzC,SAAS,iBAAiB,wBAAwB,EAE3E,SAASC,GAAiB,CACxBH,EAAiB,MAAM,QAAU,IAEjC,WAAW,IAAM,CACfC,EAAgB,MAAM,UAAY,eACnC,EAAE,GAAG,EAENC,EAAe,QAAQ,CAACE,EAAMC,IAAU,CACtC,WAAW,IAAM,CACfD,EAAK,MAAM,QAAU,IACrBA,EAAK,MAAM,UAAY,gBAEFA,EAAK,iBACxB,yFACV,EACqB,QAAQ,CAACE,EAASC,IAAiB,CAC9C,WAAW,IAAM,CACfD,EAAQ,MAAM,QAAU,GACpC,EAAaC,EAAe,GAAG,CAC/B,CAAS,CACT,EAAS,IAAOF,EAAQ,GAAG,CAC3B,CAAK,CACF,CAED,SAASG,GAAiB,CACxBV,EAAgB,MAAM,QAAU,IAChCA,EAAgB,MAAM,UAAY,wBAClCE,EAAiB,MAAM,QAAU,IACjCC,EAAgB,MAAM,UAAY,oBAElCC,EAAe,QAASE,GAAS,CAC/BA,EAAK,MAAM,QAAU,IACrBA,EAAK,MAAM,UAAY,mBACFA,EAAK,iBACxB,yFACR,EACmB,QAASE,GAAY,CAChCA,EAAQ,MAAM,QAAU,GAChC,CAAO,CACP,CAAK,CACF,CAED,SAASG,GAAe,CACtBV,EAAgB,MAAM,UAAY,oCAElC,WAAW,IAAM,CACfA,EAAgB,MAAM,UAAY,8BAClCD,EAAgB,MAAM,UAAY,sBACnC,EAAE,GAAI,EAEP,WAAW,IAAM,CACfA,EAAgB,MAAM,QAAU,IAChCA,EAAgB,MAAM,UAAY,iCAClCC,EAAgB,MAAM,QAAU,IAChCI,GACD,EAAE,IAAI,EAEP,WAAWK,EAAgB,GAAI,EAC/B,WAAWC,EAAc,IAAI,CAC9B,CAEDA,GACF,CAAC"}