(()=>{"use strict";const t={};function o(i){if(t[i])return t[i];let e={};if(Array.isArray(i)&&(e=[]),"object"==typeof i)return Object.keys(i).forEach((t=>{e[o(t)]=o(i[t])})),e;if(e=i,"string"==typeof e)try{e=decodeURIComponent(e),e=e.replace(/_u002d__u002d_/gm,"--")}catch(t){console.warn(t)}return t[i]=e,e}const{location:i,GHOSTKIT:e,Motion:{animate:n},requestAnimationFrame:c}=window,{events:a}=e;let r=i.hash;function d(t){t.style.display="",t.style.overflow="",t.style.height="",t.style.paddingTop="",t.style.paddingBottom=""}function s(t,o=400,i=!1){const e=t.closest(".ghostkit-accordion"),r=t.closest(".ghostkit-accordion-item"),g=r.classList.contains("ghostkit-accordion-item-active"),l=!i&&e.classList.contains("ghostkit-accordion-collapse-one");r?.gktAccordion||(r.gktAccordion={animation:null}),r.gktAccordion.animation&&r.gktAccordion.animation.stop(),c((()=>{var t;g?(a.trigger(e,"hide.accordion.gkt",{relatedTarget:r}),function(t,o,i){const e=t.querySelector(".ghostkit-accordion-item-heading > button"),c=t.querySelector(".ghostkit-accordion-item-content");c.style.display="block",c.style.overflow="hidden";const a=n(c,{height:0,paddingTop:0,paddingBottom:0},{duration:o/1e3,ease:[.6,0,.3,1]});a.then((()=>{t.gktAccordion.animation?.animations?.[0]?.isStopped||d(c),t.gktAccordion.animation=null,i()})),t.gktAccordion.animation=a,t.classList.remove("ghostkit-accordion-item-active"),e&&e.setAttribute("aria-expanded","false")}(r,o,(()=>{a.trigger(e,"hidden.accordion.gkt",{relatedTarget:r})}))):(a.trigger(e,"show.accordion.gkt",{relatedTarget:r}),function(t,o,i){const e=t.querySelector(".ghostkit-accordion-item-heading > button"),c=t.querySelector(".ghostkit-accordion-item-content");t.classList.add("ghostkit-accordion-item-active"),e&&e.setAttribute("aria-expanded","true");const a={display:(r=c).style.display,overflow:r.style.overflow,height:r.style.height,paddingTop:r.style.paddingTop,paddingBottom:r.style.paddingBottom};var r;d(c);const s=window.getComputedStyle(c),g=s.height,l=s.paddingTop,h=s.paddingBottom;c.style.display="block",c.style.overflow="hidden",c.style.height=a.height||0,c.style.paddingTop=a.paddingTop||0,c.style.paddingBottom=a.paddingBottom||0;const p=n(c,{height:g,paddingTop:l,paddingBottom:h},{duration:o/1e3,ease:[.6,0,.3,1]});p.then((()=>{t.gktAccordion.animation?.animations?.[0]?.isStopped||d(c),t.gktAccordion.animation=null,i()})),t.gktAccordion.animation=p}(r,o,(()=>{a.trigger(e,"shown.accordion.gkt",{relatedTarget:r})}))),l&&!g&&(t=r,[...t.parentNode.children].filter((o=>o!==t))).forEach((t=>{t.classList.contains("ghostkit-accordion-item-active")&&s(t,o,!0)}))}))}a.on(document,"init.blocks.gkt",(()=>{document.querySelectorAll(".ghostkit-accordion:not(.ghostkit-accordion-ready)").forEach((t=>{if(t.classList.add("ghostkit-accordion-ready"),a.trigger(t,"prepare.accordion.gkt"),r){const i=o(r);let e=t.querySelector(`:scope > [data-accordion="${i.replace("#","")}"]:not(.ghostkit-accordion-item-active) > .ghostkit-accordion-item-heading > button`);e||(e=t.querySelector(`:scope > :not(.ghostkit-accordion-item-active) > .ghostkit-accordion-item-heading > [href="${i}"]`)),e&&s(e,0)}a.trigger(t,"prepared.accordion.gkt")}))})),a.on(document,"click",".ghostkit-accordion-item .ghostkit-accordion-item-heading",(t=>{t.preventDefault(),s(t.delegateTarget,400)})),a.on(window,"hashchange",(()=>{if(window.location.hash===r)return;if(r=window.location.hash,!r)return;const t=o(r);document.querySelectorAll(`.ghostkit-accordion-ready > [data-accordion="${t.replace("#","")}"]:not(.ghostkit-accordion-item-active) > .ghostkit-accordion-item-heading > button,\n\t\t\t.ghostkit-accordion-ready > :not(.ghostkit-accordion-item-active) > .ghostkit-accordion-item-heading > [href="${t}"]`).forEach((t=>{s(t,400)}))}))})();