jQuery(document).ready((function(t){let e=t(".betterdocs-tabs-nav-wrapper");e?.map((a=>{t(t(e[a]).children("a:first-child")).addClass("active"),t(t(t(e[a])).next()).children("div:first-child").addClass("active"),t(t(e[a]).children()).on("click",(function(e){e.preventDefault();let a=t(this).parent().children(),r=t(this).attr("data-toggle-target"),s=t(t(t(this).parent()).next());a?.map((e=>{t(a[e]).hasClass("active")&&t(a[e]).removeClass("active")})),t(this).addClass("active"),s.children(`.betterdocs-tabgrid-content-wrapper[data-tab_target="${r}"]`).addClass("active").siblings().removeClass("active")}))})),t(".betterdocs-tabgrid-contents-wrapper .betterdocs-tabgrid-content-wrapper .betterdocs-category-grid-inner-wrapper .betterdocs-single-category-wrapper .betterdocs-category-link-btn").on("click",(function(e){let a=t(this)?.parents(".betterdocs-tabgrid-content-wrapper")?.attr("data-mkb-slug");if(a?.length>0){var r=new Date,s=r.setDate(r.getDate()+30).toString();document.cookie=`last_knowledge_base=${a}; expires=${s}; path=/;`}})),t(".betterdocs-tabgrid-contents-wrapper .betterdocs-tabgrid-content-wrapper .betterdocs-category-grid-inner-wrapper .betterdocs-single-category-wrapper .betterdocs-body .betterdocs-articles-list li a").on("click",(function(e){let a=t(this)?.parents(".betterdocs-tabgrid-content-wrapper")?.attr("data-mkb-slug");if(a?.length>0){var r=new Date,s=r.setDate(r.getDate()+30).toString();document.cookie=`last_knowledge_base=${a}; expires=${s}; path=/;`}}))}));