function e(){window.scrollTo({top:0,behavior:`smooth`})}function t(e){let t=e=>{if(!e)return!1;let t=window.getComputedStyle(e);if(t.display===`none`||t.visibility===`hidden`)return!1;if(e.offsetParent===null){if(t.position===`fixed`)return!0;let n=e.getBoundingClientRect();return n.width>0&&n.height>0}return!0};return e===null?!1:e instanceof NodeList?Array.from(e).every(e=>t(e)):t(e)}var n={};function r(e){let t=e.nodeName,r=n[t];if(r)return r;let i=document.createElement(t);return document.body.appendChild(i),r=window.getComputedStyle(i).display,document.body.removeChild(i),r===`none`&&(r=`block`),n[t]=r,r}function i(e){if(e.style.display===`none`){let t=e.dataset.originalDisplay||null;t?e.style.display=t:e.style.display=``}e.style.display===``&&!t(e)&&(e.style.display=r(e))}function a(e){let t=e.style.display;t!==`none`&&(e.dataset.originalDisplay=t||window.getComputedStyle(e).display,e.style.display=`none`)}function o(e,t,n){return()=>{e.classList.remove(t),e.style.animationDuration=``,n?.()}}function s(e,t,n,r){e.classList.add(t),e.style.animationDuration=`${n}ms`;let i=o(e,t,r);e.addEventListener(`animationend`,i,{once:!0})}function c(e,t){let n;return n=e instanceof HTMLElement?[e]:e instanceof NodeList?Array.from(e):e,n.forEach(e=>{!e||!e.style||(t?i(e):a(e))}),e instanceof HTMLElement||e instanceof NodeList?e:e[0]||e[0]}function l(e){return c(typeof e==`string`?document.querySelectorAll(e):e,!0)}function u(e){return c(typeof e==`string`?document.querySelectorAll(e):e,!1)}function d(e,n){let r=typeof e==`string`?document.querySelectorAll(e):e;if(typeof n==`boolean`)return n?l(r):u(r);let i;return i=r instanceof HTMLElement?[r]:r instanceof NodeList?Array.from(r):r,i.forEach(function(e){t(e)?u(e):l(e)}),r}export{l as a,s as i,t as n,i as o,e as r,d as s,a as t};