!function(e,u){"use strict";let v=!1,f=[];const m={duration:300,easing:(e,t,i,o)=>(e/=o/2)<1?i/2*e*e+t:-i/2*(--e*(e-2)-1)+t},k={OPEN:1,CLOSE:2},w=(t,i)=>{let o=!1;for(let e=0;e<t.length;e++){var n=t[e][0],a=t[e][1],c=(a.startTime||(a.startTime=i),i-a.startTime);(o=c<a.duration)&&(c=a.easing(c,a.startingHeight,a.distanceHeight,a.duration),n.style.height=c.toFixed(2)+"px")}if(o)window.requestAnimationFrame(e=>w(t,e));else{for(let e=0;e<t.length;e++){var r=t[e][0],l=t[e][1];l.direction===k.CLOSE&&(r.style.display="none"),l.direction===k.OPEN&&(r.style.display="block"),r.style.height=null,r.style.overflow=null,r.style.marginTop=null,r.style.marginBottom=null,r.style.paddingTop=null,r.style.paddingBottom=null}f=[],v=!1}};e.behaviors.ckeditorAccordion={attach:function(e,t){var i=once("ckeditorAccordions",".ckeditor-accordion",e),o=u.ckeditorAccordion.accordionStyle.animateAccordionOpenAndClose??!0,n=u.ckeditorAccordion.accordionStyle.openTabsWithHash??!1;for(let e=0;e<i.length;e++){var a=i[e],c=(u.ckeditorAccordion.accordionStyle.collapseAll||(a.querySelector("dt:first-child").classList.add("active"),(h=a.querySelector("dd:first-of-type")).classList.add("active"),h.style.display="block"),Array.from(a.children).filter(function(e){return"dt"==e.tagName.toLowerCase()}));for(let t=0;t<c.length;t++){var r,l=c[t],s=l.innerText.trim(),d=l.classList.contains("active")?" active":"";let e='href="#"';n&&(r=encodeURIComponent(s.replace(/[^A-Za-z0-9]/g,"")),e='href="#'+r+'" id="'+r+'" onclick="return false;"'),l.innerHTML='<a class="ckeditor-accordion-toggler" '+e+'><span class="ckeditor-accordion-toggle'+d+'"></span>'+s+"</a>"}a.classList.add("styled"),a.classList.remove("ckeditor-accordion");var h=document.createElement("div"),g=(h.classList.add("ckeditor-accordion-container"),o||h.classList.add("no-animations"),a.after(h),h.appendChild(a),new Event("ckeditorAccordionAttached")),p=(a.dispatchEvent(g),a.querySelectorAll(".ckeditor-accordion-toggler"));for(let e=0;e<p.length;e++)p[e].addEventListener("click",function(e){var t=this.parentNode,i=t.nextElementSibling,n=t.parentNode;if(!v)if(v=!0,t.classList.contains("active")?(t.classList.remove("active"),i.classList.remove("active"),f.push(["slideUp",i])):(u.ckeditorAccordion.accordionStyle.keepRowsOpen||Array.from(n.children).filter(function(e){return e.classList.contains("active")}).forEach(function(e){e.classList.remove("active"),"dd"==e.tagName.toLowerCase()&&f.push(["slideUp",e])}),t.classList.add("active"),i.classList.add("active"),f.push(["slideDown",i])),n=f,u.ckeditorAccordion.accordionStyle.animateAccordionOpenAndClose??!0){let o=[];n.forEach(e=>{var t=e[1],i=Object.assign({},m);"slideUp"==e[0]?(i.direction=k.CLOSE,i.to=0,i.startingHeight=t.scrollHeight,i.distanceHeight=-i.startingHeight,t.style.display="block",t.style.overflow="hidden",t.style.marginTop="0",t.style.marginBottom="0",t.style.paddingTop="0",t.style.paddingBottom="0"):(t.style.height="0px",t.style.display="block",t.style.overflow="hidden",t.style.marginTop="0",t.style.marginBottom="0",t.style.paddingTop="0",t.style.paddingBottom="0",i.direction=k.OPEN,i.to=t.scrollHeight,i.startingHeight=0,i.distanceHeight=i.to),delete i.startTime,o.push([t,i])}),window.requestAnimationFrame(e=>w(o,e))}else n.forEach(e=>{var t=e[1];"slideUp"==e[0]?t.style.display="none":t.style.display="block"}),v=!1;e.preventDefault()});if(n){var y=document.querySelectorAll('a[href*="#"]:not(.ckeditor-accordion-toggler):not(.visually-hidden)');for(let e=0;e<y.length;e++)y[e].addEventListener("click",function(e){var t=document.createElement("a"),i=!1;t.href=this.getAttribute("href"),(t=t.hash)&&null!=document.querySelector('a.ckeditor-accordion-toggler[href="'+t+'"]')&&(window.location.hash===t?window.dispatchEvent(new Event("hashchange")):window.location.hash=t,i=!0),i&&e.preventDefault()});window.addEventListener("hashchange",function(){var e=document.querySelector('a.ckeditor-accordion-toggler[href="'+window.location.hash+'"]');null==e||e.parentNode.classList.contains("active")||e.click()}),window.dispatchEvent(new Event("hashchange"))}}}}}(Drupal,drupalSettings);