{"version":3,"file":"tabs.3b17d3510c59a8833125.js","mappings":"mBAEAA,SAASC,iBAAiB,oBAAoB,KCD7BD,SAASE,iBAAiB,YAClCC,SAAQC,IACT,MAAMC,EAAMD,EAAIE,cAAc,gBAC9BD,EAAIJ,iBAAiB,SAASM,IAC1BA,EAAEC,iBACF,MAAMC,EAASF,EAAEE,OACjB,GAAyB,iBAArBA,EAAOC,UAA8B,CACrC,MAAMC,EAAOP,EAAIE,cAAcG,EAAOG,MAChCC,EAAWR,EAAIC,cAAc,WAC7BQ,EAAWV,EAAIE,cAAc,SAEnCG,EAAOM,UAAUC,IAAI,UACrBL,EAAKI,UAAUC,IAAI,QAEnBH,EAASE,UAAUE,OAAO,UAC1BH,EAASC,UAAUE,OAAO,mB","sources":["webpack://globus/./src/scripts/tabs.js","webpack://globus/./src/scripts/modules/tabs.js"],"sourcesContent":["import {tabs} from \"./modules/tabs\";\n\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n tabs();\n});\n","export function tabs() {\n const tabs = document.querySelectorAll(\".tabs-js\");\n tabs.forEach(tab => {\n const nav = tab.querySelector(\".b-tabs__nav\");\n nav.addEventListener(\"click\", e => {\n e.preventDefault();\n const target = e.target;\n if (target.className === \"b-tabs__link\") {\n const item = tab.querySelector(target.hash);\n const prevLink = nav.querySelector(\".active\");\n const prevItem = tab.querySelector(\".show\");\n\n target.classList.add(\"active\");\n item.classList.add(\"show\");\n\n prevLink.classList.remove(\"active\");\n prevItem.classList.remove(\"show\");\n }\n });\n });\n}\n"],"names":["document","addEventListener","querySelectorAll","forEach","tab","nav","querySelector","e","preventDefault","target","className","item","hash","prevLink","prevItem","classList","add","remove"],"sourceRoot":""}