1var l=Object.defineProperty;var c=(o,s,t)=>s in o?l(o,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[s]=t;var a=(o,s,t)=>(c(o,typeof s!="symbol"?s+"":s,t),t);import{C as n}from"./vendor-B8v9NfwB.js";class u extends n{constructor(t,e){super(t);a(this,"layout","block");e&&(this.layout=e)}setupDefaults(){this.dom={triggers:this.el.querySelectorAll(".accordion__item-trigger"),panels:this.el.querySelectorAll(".accordion__item-panel")},this.initAccordion()}addListeners(){this.dom.triggers.forEach(t=>t.addEventListener("click",this.handleClick.bind(this)))}initAccordion(){this.dom.triggers.forEach(t=>{t.getAttribute("aria-expanded")==="true"&&this.openItem(t)})}handleClick(t){const e=this.el.dataset.isCollapsable==="true",i=t.currentTarget;e?this.dom.triggers.forEach(r=>{r.getAttribute("aria-expanded")==="true"?this.closeItem(r):r.getAttribute("aria-expanded")==="false"&&r===i&&this.openItem(r)}):i.getAttribute("aria-expanded")==="true"?this.closeItem(i):this.openItem(i)}openItem(t){t.setAttribute("aria-expanded","true");const e=document.getElementById(t.getAttribute("aria-controls"));if(e){e.removeAttribute("style"),e.style.display=this.layout;const i=e.querySelector(".accordion__item-content");e.style.height=`${i==null?void 0:i.offsetHeight}px`,setTimeout(()=>{e.style.height="auto",e.style.display=this.layout},250)}}closeItem(t){t.setAttribute("aria-expanded","false");const e=document.getElementById(t.getAttribute("aria-controls"));if(e){const i=e.querySelector(".accordion__item-content");e.style.height=`${i==null?void 0:i.offsetHeight}px`,setTimeout(()=>e.style.height="0px"),setTimeout(()=>e.style.display="none",500)}}}export{u as default}; 2//# sourceMappingURL=accordion-C-6hS4T_.js.map
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.