{"version":3,"sources":["theme.js"],"names":["document","addEventListener","headers","querySelectorAll","bodies","forEach","body","style","display","header","index","bodyIndex","classList","add","setAttribute","remove","nextElem","nextElementSibling","contains","querySelector"],"mappings":"AAEAA,SAAAC,iBAAA,mBAAA,WAGI,IAAIC,EAAUF,SAASG,iBAAiB,mBAAmB,EADvDC,EAACH,SAAiBE,iBAAA,iBAAgC,EAKtDC,EAAOC,QAAQ,SAAUC,GADzBA,EAAAC,MAAAC,QAAA,MACAJ,CAAAA,EAcAF,EAAQG,QAAQ,SAAUI,EAAQC,GADlCD,EAAAR,iBAAA,QAAA,WAEWA,EAAAA,QAAgB,SAAUK,EAAAK,GAC7BA,IAAAD,IACcJ,EAACC,MAAUD,QAAMK,OACvBA,EAAcD,GAAOE,UAAAC,IAAA,WAAA,EACXX,EAAQS,GAASG,aAAA,gBAAA,OAAA,EACnBH,EAAUA,GAAWE,cAAI,mBAAY,EAAAD,UAAAG,OAAA,QAAA,EAE7Cb,CAAAA,EAIR,IACA,IAAIc,EAAWP,EAAOQ,mBADtBD,GAAA,CAAAA,EAAAJ,UAAAM,SAAA,gBAAA,GACIF,EAAiBA,EAACC,mBAGtBD,GAAA,SAAAA,EAAAT,MAAAC,SAEIQ,EAAYA,MAAST,QAAMC,QACnBC,EAAOD,UAAUO,OAAO,WAAA,EACzBH,EAAAA,aAAiB,gBAAY,MAAA,EAC7BE,EAAAA,cAAa,mBAAwB,EAAAF,UAAAC,IAAA,QAAA,GACrCM,IACJH,EAAYT,MAAEC,QAAA,OACTC,EAAOD,UAAUK,IAAA,WAAM,EACxBD,EAAAA,aAAc,gBAAY,OAAA,EAC1BE,EAAAA,cAAa,mBAAyB,EAAAF,UAAAG,OAAA,QAAA,EAEjD,CAAA,CACJ,CAAC,CAET,CAAC","file":"theme.min.js","sourcesContent":["/* ****************************************\r\nEnqueue thy scripts in here\r\n**************************************** */\r\n\r\ndocument.addEventListener('DOMContentLoaded', function () {\r\n var headers = document.querySelectorAll('.accordion-header');\r\n var bodies = document.querySelectorAll('.accordion-body');\r\n\r\n // Initially collapse all accordion bodies\r\n bodies.forEach(function (body) {\r\n body.style.display = 'none';\r\n });\r\n\r\n /* Open the first item by default\r\n if (headers.length > 0 && bodies.length > 0) {\r\n headers[0].classList.remove('collapsed');\r\n headers[0].setAttribute('aria-expanded', 'true');\r\n headers[0].querySelector('.accordion-button').classList.add('active');\r\n bodies[0].style.display = 'block';\r\n }\r\n */\r\n\r\n // Add click event listener to each header\r\n headers.forEach(function (header, index) {\r\n header.addEventListener('click', function () {\r\n // Collapse all bodies\r\n bodies.forEach(function (body, bodyIndex) {\r\n if (bodyIndex !== index) {\r\n body.style.display = 'none';\r\n headers[bodyIndex].classList.add('collapsed');\r\n headers[bodyIndex].setAttribute('aria-expanded', 'false');\r\n headers[bodyIndex].querySelector('.accordion-button').classList.remove('active');\r\n }\r\n });\r\n\r\n // Toggle the display of the clicked header's body\r\n var nextElem = header.nextElementSibling;\r\n while (nextElem && !nextElem.classList.contains('accordion-body')) {\r\n nextElem = nextElem.nextElementSibling;\r\n }\r\n\r\n if (nextElem && nextElem.style.display === 'none') {\r\n nextElem.style.display = 'block';\r\n header.classList.remove('collapsed');\r\n header.setAttribute('aria-expanded', 'true');\r\n header.querySelector('.accordion-button').classList.add('active');\r\n } else if (nextElem) {\r\n nextElem.style.display = 'none';\r\n header.classList.add('collapsed');\r\n header.setAttribute('aria-expanded', 'false');\r\n header.querySelector('.accordion-button').classList.remove('active');\r\n }\r\n });\r\n });\r\n});\r\n"]}