{"version":3,"sources":["webpack:///./src/feature/accordion/accordion.js","webpack:///./node_modules/core-js/modules/es.object.get-prototype-of.js","webpack:///./node_modules/core-js/modules/es.object.set-prototype-of.js"],"names":["Accordion","element","_this","_classCallCheck","this","_possibleConstructorReturn","_getPrototypeOf","call","initDomCache","el","accordion","body","window","features","dom","accrodionContent","querySelector","accrodionTrigger","querySelectorAll","addClick","BaseFeature","forEach","addEventListener","elementState","getAttribute","setAttribute","e","document","activeElement","keyCode","preventDefault","click","$","__webpack_require__","fails","toObject","nativeGetPrototypeOf","CORRECT_PROTOTYPE_GETTER","target","stat","forced","sham","getPrototypeOf","it","setPrototypeOf"],"mappings":"m+BAEMA,cACL,SAAAA,EAAYC,GAAS,IAAAC,EAAA,mGAAAC,CAAAC,KAAAJ,IACpBE,EAAAG,EAAAD,KAAAE,EAAAN,GAAAO,KAAAH,KAAMH,KACDO,eAELN,EAAKO,GAAKR,EACVC,EAAKQ,UAAYR,EAAKO,GACtBP,EAAKS,KAAOC,OAAOC,SAASC,IAAIH,KAChCT,EAAKa,iBAAmBb,EAAKO,GAAGO,cAAc,gCAC9Cd,EAAKe,iBAAmBf,EAAKO,GAAGS,iBAAiB,gCACjDhB,EAAKiB,WATejB,wPADEkB,iDActBhB,KAAKa,iBAAiBI,QAAQ,SAACZ,GAC9BA,EAAGa,iBAAiB,QAAS,WAC5B,IAAIC,EAAed,EAAGe,aAAa,iBAElCD,EADoB,SAAjBA,EACY,QAEA,OAEhBd,EAAGgB,aAAa,gBAAiBF,KAGlCX,OAAOU,iBAAiB,QAAS,SAACI,GACfC,SAASC,gBAAkBnB,GACd,KAAdiB,EAAEG,UAClBH,EAAEI,iBAEFrB,EAAGsB,kDAOO/B,iCCvCf,IAAAgC,EAAQC,EAAQ,GAChBC,EAAYD,EAAQ,GACpBE,EAAeF,EAAQ,IACvBG,EAA2BH,EAAQ,IACnCI,EAA+BJ,EAAQ,KAKvCD,EAAA,CAAGM,OAAA,SAAAC,MAAA,EAAAC,OAJHN,EAAA,WAA6CE,EAAA,KAI1CK,MAAAJ,GAA6F,CAChGK,eAAA,SAAAC,GACA,OAAAP,EAAAD,EAAAQ,4BCXQV,EAAQ,EAKhBD,CAAA,CAAGM,OAAA,SAAAC,MAAA,GAA+B,CAClCK,eALqBX,EAAQ","file":"21-a7cbea85.pkg.js","sourcesContent":["import BaseFeature from '../../foundation/base/base';\r\n\r\nclass Accordion extends BaseFeature {\r\n\tconstructor(element) {\r\n\t\tsuper(element);\r\n\t\tthis.initDomCache();\r\n\r\n\t\tthis.el = element;\r\n\t\tthis.accordion = this.el;\r\n\t\tthis.body = window.features.dom.body;\r\n\t\tthis.accrodionContent = this.el.querySelector('[data-js=\"accrodionContent\"]');\r\n\t\tthis.accrodionTrigger = this.el.querySelectorAll('[data-js=\"accrodionTrigger\"]');\r\n\t\tthis.addClick();\r\n\t}\r\n\r\n\taddClick() {\r\n\t\tthis.accrodionTrigger.forEach((el) => {\r\n\t\t\tel.addEventListener('click', () => {\r\n\t\t\t\tlet elementState = el.getAttribute('aria-expanded');\r\n\t\t\t\tif (elementState === 'true') {\r\n\t\t\t\t\telementState = 'false';\r\n\t\t\t\t} else {\r\n\t\t\t\t\telementState = 'true';\r\n\t\t\t\t}\r\n\t\t\t\tel.setAttribute('aria-expanded', elementState);\r\n\t\t\t});\r\n\r\n\t\t\twindow.addEventListener('keyup', (e) => {\r\n\t\t\t\tconst isFocused = document.activeElement === el;\r\n\t\t\t\tif (isFocused && e.keyCode === 13) {\r\n\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t// Trigger the button element with a click\r\n\t\t\t\t\tel.click();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n}\r\n\r\nexport default Accordion;\r\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar toObject = require('../internals/to-object');\nvar nativeGetPrototypeOf = require('../internals/object-get-prototype-of');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); });\n\n// `Object.getPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.getprototypeof\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, {\n getPrototypeOf: function getPrototypeOf(it) {\n return nativeGetPrototypeOf(toObject(it));\n }\n});\n\n","var $ = require('../internals/export');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\n\n// `Object.setPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.setprototypeof\n$({ target: 'Object', stat: true }, {\n setPrototypeOf: setPrototypeOf\n});\n"],"sourceRoot":""}