!function(){function e(){document.querySelectorAll(".fb-back-to-top-main-wrapper").forEach(e=>{if(e.dataset.initialized)return;e.dataset.initialized="true";const t=e.querySelector(".fb-back-to-top-inner-wrapper"),o=()=>{window.scrollY>100?e.classList.add("fb-show"):e.classList.remove("fb-show")};o(),window.addEventListener("scroll",o,{passive:!0}),e.addEventListener("click",function(e){e.preventDefault(),t&&t.classList.add("active");const o=window.scrollY||window.pageYOffset,n=performance.now();requestAnimationFrame(function e(){const i=performance.now(),a=Math.min(1,(i-n)/600),r=a*(2-a);window.scroll(0,Math.ceil(r*(0-o)+o)),window.scrollY>0&&a<1?requestAnimationFrame(e):(window.scroll(0,0),t&&t.classList.remove("active"))})})})}window.reinitBackToTop=e,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e(),new MutationObserver(t=>{t.forEach(t=>{(t.addedNodes.length||t.removedNodes.length)&&e()})}).observe(document.body,{childList:!0,subtree:!0})}();