{"remainingRequest":"C:\\wamp64\\www\\free-energie\\wp-content\\themes\\digitalcover\\node_modules\\babel-loader\\lib\\index.js??ruleSet[1].rules[0].use[1]!C:\\wamp64\\www\\free-energie\\wp-content\\themes\\digitalcover\\resources\\assets\\scripts\\blocks\\FaqFooter.js","dependencies":[{"path":"C:\\wamp64\\www\\free-energie\\wp-content\\themes\\digitalcover\\resources\\assets\\scripts\\blocks\\FaqFooter.js","mtime":1726850626296},{"path":"C:\\wamp64\\www\\free-energie\\wp-content\\themes\\digitalcover\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1726651497274},{"path":"C:\\wamp64\\www\\free-energie\\wp-content\\themes\\digitalcover\\node_modules\\babel-loader\\lib\\index.js","mtime":1726651482652}],"contextDependencies":[],"result":["/* eslint-disable  no-alert */\nimport Block from './Block';\nexport default class FaqFooter extends Block {\n  getElems() {\n    alert('test');\n    this.faqItems = Array.from(this.el.querySelectorAll('.b-faqFooter__item'));\n  }\n  events() {\n    if (this.faqItems) {\n      this.faqItems.forEach((item, index) => {\n        const question = item.querySelector('.b-faqFooter__question');\n        const answer = item.querySelector('.b-faqFooter__answer');\n        if (index === 0) {\n          answer.style.maxHeight = answer.scrollHeight + 'px';\n        }\n        question.addEventListener('click', () => {\n          const currentlyOpen = this.el.querySelector('.b-faqFooter__item.open');\n          if (currentlyOpen && currentlyOpen !== item) {\n            currentlyOpen.querySelector('.b-faqFooter__answer').style.maxHeight = null;\n            currentlyOpen.classList.remove('open');\n          }\n          item.classList.toggle('open');\n          if (item.classList.contains('open')) {\n            answer.style.maxHeight = answer.scrollHeight + 'px';\n          } else {\n            answer.style.maxHeight = null;\n          }\n        });\n      });\n    }\n  }\n}",{"version":3,"names":["Block","FaqFooter","getElems","alert","faqItems","Array","from","el","querySelectorAll","events","forEach","item","index","question","querySelector","answer","style","maxHeight","scrollHeight","addEventListener","currentlyOpen","classList","remove","toggle","contains"],"sources":["C:/wamp64/www/free-energie/wp-content/themes/digitalcover/resources/assets/scripts/blocks/FaqFooter.js"],"sourcesContent":["/* eslint-disable  no-alert */\nimport Block from './Block'\n\nexport default class FaqFooter extends Block {\n  \n  getElems() {\n    alert('test')\n    this.faqItems = Array.from(this.el.querySelectorAll('.b-faqFooter__item'))\n  }\n\n  events() {\n    if (this.faqItems) {\n      this.faqItems.forEach((item, index) => {\n        const question = item.querySelector('.b-faqFooter__question')\n        const answer = item.querySelector('.b-faqFooter__answer')\n\n        if (index === 0) {\n          answer.style.maxHeight = answer.scrollHeight + 'px'\n        }\n\n        question.addEventListener('click', () => {\n          const currentlyOpen = this.el.querySelector('.b-faqFooter__item.open')\n\n\n          if (currentlyOpen && currentlyOpen !== item) {\n            currentlyOpen.querySelector('.b-faqFooter__answer').style.maxHeight = null\n            currentlyOpen.classList.remove('open')\n          }\n\n          item.classList.toggle('open')\n\n          if (item.classList.contains('open')) {\n            answer.style.maxHeight = answer.scrollHeight + 'px'\n          } else {\n            answer.style.maxHeight = null\n          }\n        })\n      })\n    }\n  }\n}\n"],"mappings":"AAAA;AACA,OAAOA,KAAK,MAAM,SAAS;AAE3B,eAAe,MAAMC,SAAS,SAASD,KAAK,CAAC;EAE3CE,QAAQ,GAAG;IACTC,KAAK,CAAC,MAAM,CAAC;IACb,IAAI,CAACC,QAAQ,GAAGC,KAAK,CAACC,IAAI,CAAC,IAAI,CAACC,EAAE,CAACC,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;EAC5E;EAEAC,MAAM,GAAG;IACP,IAAI,IAAI,CAACL,QAAQ,EAAE;MACjB,IAAI,CAACA,QAAQ,CAACM,OAAO,CAAC,CAACC,IAAI,EAAEC,KAAK,KAAK;QACrC,MAAMC,QAAQ,GAAGF,IAAI,CAACG,aAAa,CAAC,wBAAwB,CAAC;QAC7D,MAAMC,MAAM,GAAGJ,IAAI,CAACG,aAAa,CAAC,sBAAsB,CAAC;QAEzD,IAAIF,KAAK,KAAK,CAAC,EAAE;UACfG,MAAM,CAACC,KAAK,CAACC,SAAS,GAAGF,MAAM,C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