(()=>{"use strict";const t=t=>{t.querySelectorAll(".background_slide_style").forEach(t=>((t,e)=>{let a,r;t?(a=t?.target.closest(".gkit-nav-link"),r=a?.closest(".gkit-tab-nav")):(a=e.querySelector(".gkit-nav-link.active"),r=a?.closest(".gkit-tab-nav")),(()=>{const{offsetWidth:t,offsetLeft:e,offsetHeight:i,offsetTop:l}=a;r.style.setProperty("--left",`${e}px`),r.style.setProperty("--width",`${t}px`),r.style.setProperty("--top",`${l}px`),r.style.setProperty("--height",`${i}px`)})()})(null,t))},e=e=>{const a=e.target.closest(".gkit-nav-link");if(!a)return;const r=a.closest(".gkit-tab-wraper"),i="true"===r.getAttribute("data-url"),l=r.querySelector(".gkit-tab-nav"),c=Array.from(l.children).flatMap(t=>Array.from(t.querySelectorAll(".gkit-nav-link")));c.forEach(t=>t.classList.remove("active")),a.classList.add("active"),i&&(window.location.hash=a.getAttribute("data-hash"));const o=r.querySelector(".gkit-tab-content"),s=Array.from(o.children),n=Array.from(c).indexOf(a);s.forEach((t,e)=>t.classList.toggle("active",e===n)),t(r)};window.addEventListener("load",()=>{document.querySelectorAll(".gkit-tab-wraper").forEach(a=>{var r;(t=>{const e="true"===t.getAttribute("data-url"),a=window.location.hash,r=t.querySelector(".gkit-tab-content"),i=Array.from(r.children),l=t.querySelector(".gkit-tab-nav"),c=Array.from(l.children).flatMap(t=>Array.from(t.querySelectorAll(".gkit-nav-link")));let o=0;const s=c.findIndex(t=>"true"===t.getAttribute("data-active-nav-item"));if(-1!==s&&(o=s),!e||!a)return i.forEach((t,e)=>{t.classList.toggle("active",e===o)}),void c.forEach((t,e)=>{t.classList.toggle("active",e===o)});t.querySelectorAll(".active").forEach(t=>t.classList.remove("active"));let n=-1;c.forEach((t,e)=>{t.dataset.hash===a&&(t.classList.add("active"),n=e)}),-1!==n?i[n]?.classList.add("active"):(i[o]?.classList.add("active"),c[o]?.classList.add("active"))})(r=a),t(r),(t=>{const a=t.querySelector(".gkit-tab-nav"),r=Array.from(a.children).flatMap(t=>Array.from(t.querySelectorAll(".gkit-nav-link"))),i=t.getAttribute("data-event")||"click";r.forEach(t=>{t.addEventListener(i,e)})})(r)})})})();