function splitTextIntoLinesAndWords(){let t=document.querySelectorAll(".gs-split-words, [data-aos-split]");t.forEach(t=>{let e=t.innerText.split(/\s+/),s=t.offsetWidth,n=[],i=[],a=document.createElement("span");a.style.visibility="hidden",a.style.position="absolute",a.style.whiteSpace="nowrap",t.appendChild(a),e.forEach(t=>{i.push(t),a.textContent=i.join(" "),a.offsetWidth>s&&(i.length>1?(i.pop(),n.push(i),i=[t]):(n.push(i),i=[]))}),i.length>0&&n.push(i),t.removeChild(a);let o=0,l=n.map(t=>{let e=t.map(t=>`<span class="gs-words" style="transition-delay: calc(var(--gs-root-transition-delay, var(--gs-root-animation-delay, 0.01s)) + calc(var(--gs-root-transition-delay-multiplier, var(--gs-root-animation-delay-multiplier, 0.1s)) * ${++o-1}));">${t}</span>`).join(" ");return`<span class="gs-lines">${e}</span>`}).join("");t.innerHTML=l})}document.addEventListener("DOMContentLoaded",splitTextIntoLinesAndWords),window.addEventListener("resize",splitTextIntoLinesAndWords);