(()=>{"use strict";const t=(t,e)=>t?.classList.add(e),e=(t,e)=>t?.classList.remove(e),c=(c,o,r=!1)=>{const n=c.querySelectorAll(`#tabMenu-${c.id} > li`),a=c.querySelectorAll(`#tabContent-${c.id} >${r?" .block-editor-inner-blocks > .block-editor-block-list__layout >":""} .wp-block-tcb-tab`);n.forEach((t=>{e(t,"active")})),a.forEach((t=>{e(t,"active"),e(t,"activeContent")})),t(o,"active");const i=a[(l=o,Array.from(l?.parentElement?.children||[])?.indexOf(l))];var l;t(i,"active");const d=setTimeout((()=>{t(i,"activeContent"),clearTimeout(d)}),50)};document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-tcb-tabs").forEach((t=>{const e=t.querySelector(`#tabMenu-${t.id}`),o=t.querySelectorAll(`#tabMenu-${t.id} > li`);c(t,e.children[0]),o.forEach((e=>{e.addEventListener("click",(function(){c(t,e)}))})),t?.removeAttribute("data-attributes")}))}))})();