| 1 |
!function(){function e(){document.querySelectorAll(".blockspare-block-accordion:not(.blockspare-accordion-ready)").forEach(function(e){const o=e.getAttribute("data-item-toggle");e.classList.add("blockspare-accordion-ready"),e.addEventListener("click",function(c){const r=c.target.closest(".blockspare-accordion-item .blockspare-accordion-panel");if(!r)return;c.preventDefault();const a=r.closest(".blockspare-accordion-item"),n=a.querySelector(".blockspare-accordion-body"),i=a.classList.contains("blockspare-accordion-active"),l=e.querySelector(".blockspare-type-fill");if(l){const t=l.getAttribute("data-pan"),o=l.getAttribute("data-txt-color");e.querySelectorAll(".blockspare-accordion-panel").forEach(function(e){e.style.backgroundColor=t}),e.querySelectorAll(".blockspare-accordion-panel-handler").forEach(function(e){e.style.color=o})}if(i)t(n,150),a.classList.remove("blockspare-accordion-active");else{if(l){const e=l.getAttribute("data-active"),t=l.getAttribute("data-act-color"),o=a.querySelector(".blockspare-accordion-panel"),c=a.querySelector(".blockspare-accordion-panel-handler");o&&(o.style.backgroundColor=e),c&&(c.style.color=t)}!function(e){if(!e)return;e.style.display="block",e.style.overflow="hidden",e.style.height="0px",e.offsetHeight;const t=e.scrollHeight+"px";e.style.transition="height 150ms ease",requestAnimationFrame(function(){requestAnimationFrame(function(){e.style.height=t})}),setTimeout(function(){e.style.height="",e.style.transition="",e.style.overflow=""},150)}(n),a.classList.add("blockspare-accordion-active")}"true"===o&&e.querySelectorAll(".blockspare-accordion-active").forEach(function(e){e!==a&&(t(e.querySelector(".blockspare-accordion-body"),150),e.classList.remove("blockspare-accordion-active"))})})})}function t(e,t){e&&(e.style.overflow="hidden",e.style.height=e.scrollHeight+"px",e.offsetHeight,e.style.transition="height "+t+"ms ease",requestAnimationFrame(function(){requestAnimationFrame(function(){e.style.height="0px"})}),setTimeout(function(){e.style.display="none",e.style.height="",e.style.transition="",e.style.overflow=""},t))}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e()}(); |