1class HistoryTimeline{constructor(t){this.timelineContainer=t,this.yearButtons=null,this.activeBox=null,this.contentItems=null,this.currentYear=null,this.isAnimating=!1,this.animationTimeout=null,this.currentAnimationCleanup=null,this.init()}init(){this.timelineContainer&&(this.yearButtons=this.timelineContainer.querySelectorAll(".history__timeline__years__year"),this.activeBox=this.timelineContainer.querySelector(".history__timeline__content__box"),this.contentItems=this.timelineContainer.querySelectorAll(".history__timeline__content__box__item"),this.currentYear=this.timelineContainer.querySelector(".history__timeline__years__year")?.dataset.year??null,this.attachEventListeners(),this.initAnimations())}attachEventListeners(){this.yearButtons.forEach(t=>{t.addEventListener("click",e=>{e.preventDefault();const i=t.dataset.year;i&&i!==this.currentYear&&this.switchYear(i)})})}switchYear(t){if(t===this.currentYear)return;this.isAnimating&&(this.animationTimeout&&(clearTimeout(this.animationTimeout),this.animationTimeout=null),this.currentAnimationCleanup&&(this.currentAnimationCleanup(),this.currentAnimationCleanup=null),this.isAnimating=!1),this.yearButtons.forEach(t=>{t.classList.remove("is-active")});const e=Array.from(this.yearButtons).find(e=>e.dataset.year===t);e&&e.classList.add("is-active");let i=null,n=null;i=Array.from(this.contentItems).find(t=>{const e=window.getComputedStyle(t);return"none"!==e.display&&parseFloat(e.opacity)>0}),i||(i=Array.from(this.contentItems).find(t=>t.dataset.year===this.currentYear)),n=Array.from(this.contentItems).find(e=>e.dataset.year===t),n&&this.activeBox&&i?this.animateTextTransition(i,n,t):this.currentYear=t}animateTextTransition(t,e,i){if(!e||!this.activeBox||!t)return void(this.currentYear=i);this.isAnimating=!0;const n=parseInt(this.currentYear,10),s=parseInt(i,10)>n;t.classList.remove("selected","enter-right","enter-left","leave-right","leave-left"),e.classList.remove("selected","enter-right","enter-left","leave-right","leave-left"),e.style.display="block",e.style.position="absolute",e.style.willChange="transform, opacity",t.style.willChange="transform, opacity";const a=t.offsetHeight;e.style.visibility="hidden",e.offsetHeight;const r=e.offsetHeight;e.style.visibility="";const l=Math.max(a,r),o=this.activeBox.style.minHeight;this.activeBox.style.minHeight=l+"px";const h=s?"enter-right":"enter-left",c=s?"leave-left":"leave-right";requestAnimationFrame(()=>{e.classList.add("selected",h),t.classList.add(c)});const m=()=>{this.cleanupAnimation(t,e,i,o)};this.currentAnimationCleanup=m,this.animationTimeout=setTimeout(()=>{this.currentAnimationCleanup===m&&this.isAnimating&&(m(),this.animationTimeout=null)},550)}cleanupAnimation(t,e,i,n){t&&(t.classList.remove("selected","enter-right","enter-left","leave-right","leave-left"),t.style.display="none",t.style.position="",t.style.willChange=""),e&&(e.classList.remove("enter-right","enter-left","leave-right","leave-left"),e.classList.add("selected"),e.style.position="relative",e.style.willChange=""),this.activeBox&&(this.activeBox.style.minHeight=n||""),this.currentYear=i,this.isAnimating=!1,this.animationTimeout=null,this.currentAnimationCleanup=null}initAnimations(){this.contentItems.forEach(t=>{const e=t.dataset.year;t.classList.remove("selected","enter-right","enter-left","leave-right","leave-left"),e===this.currentYear?(t.classList.add("selected"),t.style.display="block",t.style.position="relative"):(t.style.display="none",t.style.position="absolute")})}}export const newHistoryTimeline=()=>{document.querySelectorAll(".history__timeline").forEach(t=>new HistoryTimeline(t))};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.