var e=document.querySelector(`[data-mobile-toggle]`),t=document.querySelector(`[data-mobile-menu]`),n=document.querySelector(`[data-icon-open]`),r=document.querySelector(`[data-icon-close]`);e&&t&&e.addEventListener(`click`,()=>{let e=t.classList.toggle(`hidden`);n?.classList.toggle(`hidden`,!e),r?.classList.toggle(`hidden`,e)}),document.querySelectorAll(`[data-dropdown]`).forEach(e=>{let t=e.querySelector(`[data-dropdown-trigger]`),n=e.querySelector(`[data-dropdown-menu]`),r=e.querySelector(`[data-dropdown-caret]`);if(!t||!n)return;let i=()=>{n.classList.remove(`invisible`,`opacity-0`,`translate-y-2`),r?.classList.add(`rot`)},a=()=>{n.classList.add(`invisible`,`opacity-0`,`translate-y-2`),r?.classList.remove(`rot`)},o=!1,s=e=>{o=e,setTimeout(()=>o?i():a(),60)};e.addEventListener(`mouseenter`,()=>s(!0)),e.addEventListener(`mouseleave`,()=>s(!1)),t.addEventListener(`click`,e=>{e.stopPropagation(),n.classList.contains(`invisible`)?i():a()}),document.addEventListener(`click`,t=>{e.contains(t.target)||a()})});var i=document.getElementById(`site-header`);if(i){let e=()=>i.classList.toggle(`shadow-lg`,window.scrollY>8);window.addEventListener(`scroll`,e,{passive:!0}),e()}var a=document.querySelector(`[data-help-card]`),o=document.querySelector(`[data-help-close]`);a&&(setTimeout(()=>{a.classList.remove(`hidden`),a.classList.add(`flex`)},1600),o?.addEventListener(`click`,()=>{a.classList.add(`hidden`),a.classList.remove(`flex`)})),document.querySelectorAll(`[data-accordion-item]`).forEach(e=>{let t=e.querySelector(`[data-accordion-trigger]`),n=e.querySelector(`[data-accordion-panel]`),r=e.querySelector(`[data-accordion-icon]`);!t||!n||t.addEventListener(`click`,()=>{let t=n.classList.contains(`grid-rows-[1fr]`);e.parentElement.querySelectorAll(`[data-accordion-panel]`).forEach(e=>{e.classList.remove(`grid-rows-[1fr]`),e.classList.add(`grid-rows-[0fr]`)}),e.parentElement.querySelectorAll(`[data-accordion-icon]`).forEach(e=>e.classList.remove(`rot`)),t||(n.classList.remove(`grid-rows-[0fr]`),n.classList.add(`grid-rows-[1fr]`),r?.classList.add(`rot`))})});var s=document.querySelector(`[data-admin-toggle]`),c=document.querySelector(`[data-admin-sidebar]`),l=document.querySelector(`[data-admin-backdrop]`);if(s&&c){let e=()=>{c.classList.remove(`hidden`,`-translate-x-full`),c.classList.add(`flex`),l?.classList.remove(`hidden`)},t=()=>{c.classList.add(`-translate-x-full`),l?.classList.add(`hidden`)};s.addEventListener(`click`,()=>{c.classList.contains(`-translate-x-full`)?e():t()}),l?.addEventListener(`click`,t)}var u=document.querySelectorAll(`.reveal`);if(`IntersectionObserver`in window&&u.length){let e=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&(t.target.classList.add(`is-visible`),e.unobserve(t.target))})},{threshold:.12,rootMargin:`0px 0px -40px 0px`});u.forEach(t=>e.observe(t))}else u.forEach(e=>e.classList.add(`is-visible`));