import{g as r,S as a}from"./ScrollTrigger.C8IefbVz.js";r.registerPlugin(a);function g(){r.utils.toArray(".fade-up").forEach(t=>{r.fromTo(t,{opacity:0,y:50},{opacity:1,y:0,duration:.8,ease:"power2.out",scrollTrigger:{trigger:t,start:"top 85%",end:"bottom 60%",toggleActions:"play none none reverse"}})}),r.utils.toArray(".fade-left").forEach(t=>{r.fromTo(t,{opacity:0,x:-80},{opacity:1,x:0,duration:.8,ease:"power2.out",scrollTrigger:{trigger:t,start:"top 85%",toggleActions:"play none none reverse"}})}),r.utils.toArray(".fade-right").forEach(t=>{r.fromTo(t,{opacity:0,x:80},{opacity:1,x:0,duration:.8,ease:"power2.out",scrollTrigger:{trigger:t,start:"top 85%",toggleActions:"play none none reverse"}})}),r.utils.toArray(".scale-up").forEach(t=>{r.fromTo(t,{opacity:0,scale:.8},{opacity:1,scale:1,duration:.6,ease:"back.out(0.3)",scrollTrigger:{trigger:t,start:"top 85%",toggleActions:"play none none reverse"}})}),r.utils.toArray(".parallax").forEach(t=>{r.to(t,{y:(c,e)=>{const o=e.dataset.speed||.5;return parseFloat(o)*100},ease:"none",scrollTrigger:{trigger:t,start:"top bottom",end:"bottom top",scrub:!0}})}),document.querySelector(".sticky-parallax")&&r.to(".parallax-bg",{y:"30%",ease:"none",scrollTrigger:{trigger:".sticky-parallax",start:"top top",end:"bottom top",scrub:!0,pin:!0}});const n=document.querySelector(".scroll-progress");n&&r.to(n,{scaleX:1,transformOrigin:"0%",ease:"none",scrollTrigger:{trigger:document.body,start:"top top",end:"bottom bottom",scrub:.3}}),r.utils.toArray(".text-reveal").forEach(t=>{const c=t.textContent?.split(" ")||[];t.innerHTML=c.map(o=>`<span class="reveal-word" style="display:inline-block; opacity:0; transform:translateY(20px);">${o}</span>`).join(" ");const e=r.utils.toArray(".reveal-word",t);r.to(e,{opacity:1,y:0,stagger:.03,duration:.5,ease:"power2.out",scrollTrigger:{trigger:t,start:"top 85%",toggleActions:"play none none reverse"}})});const l=r.utils.toArray(".kingdom-card");l.length&&r.fromTo(l,{opacity:0,y:60},{opacity:1,y:0,stagger:.1,duration:.6,ease:"power2.out",scrollTrigger:{trigger:".kingdoms-grid",start:"top 80%"}});const i=document.querySelector(".timeline-line");i&&r.fromTo(i,{scaleY:0},{scaleY:1,duration:2,ease:"power2.out",scrollTrigger:{trigger:".timeline-container",start:"top 70%",end:"bottom 30%",scrub:!0}})}document.addEventListener("astro:page-load",()=>{g(),a.refresh()});document.addEventListener("astro:before-swap",()=>{a.getAll().forEach(s=>s.kill())});
