import{a as T,b as u,c as L,d as I}from"./dom.js";import{e as R}from"./nombres.js";import{a as m,b as p}from"./utils.js";import"./dom2.js";import"./erreurs.js";import"./exports.BOrjxC8q.js";import"./pipe.CtTFdEz3.js";import"./Either.DDEPhGsy.js";const S=()=>{const i=m(T),s=m(".storytelling__conteneur"),e=p(u);let t=e.at(0)?.getBoundingClientRect().height??0,r=0;const E=(o,n)=>{o.toggleAttribute(L,n),o.toggleAttribute(I,n)},l=()=>{t=e.at(0)?.getBoundingClientRect().height??0,s.style.minHeight=`${String(t*e.length+61)}px`,s.style.maxHeight=`${String(t*e.length+61)}px`},a=()=>{r=i.scrollTop,e.forEach((o,n)=>{const c=t*n,g=t*(n+1);E(o,!R(r,c,g))})};new ResizeObserver(()=>{l(),a()}).observe(i),i.addEventListener("scroll",()=>a())};document.addEventListener("DOMContentLoaded",()=>{S()});