{"version":3,"file":"/acf-blocks/quick-links.js","mappings":";;;;;AAAA,IAAIA,OAAO,GAAG,KAAK;AAEnB,IAAMC,yBAAyB,GAAG,SAA5BA,yBAAyBA,CAAIC,CAAC,EAAK;EACxC,IAAIA,CAAC,CAACC,IAAI,KAAK,UAAU,EAAE;IAC1BH,OAAO,GAAG,IAAI;IACdI,kBAAkB,CAACF,CAAC,CAACG,MAAM,CAAC;EAC7B,CAAC,MAAM,IAAIH,CAAC,CAACC,IAAI,KAAK,SAAS,IAAI,CAACH,OAAO,EAAE;IAC5CI,kBAAkB,CAACF,CAAC,CAACG,MAAM,CAAC;EAC7B,CAAC,MAAM;IACNL,OAAO,GAAG,KAAK;EAChB;AACD,CAAC;AAED,IAAMI,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIE,cAAc,EAAK;EAC9C;EACA,IAAMC,aAAa,GAAGD,cAAc,CAACE,OAAO,CAC3C,kCACD,CAAC;EACD,IAAID,aAAa,EAAE;IAClB;IACAE,QAAQ,CACNC,gBAAgB,CAAC,0CAA0C,CAAC,CAC5DC,OAAO,CAAC,UAACC,EAAE,EAAK;MAChBA,EAAE,CAACC,SAAS,CAACC,MAAM,CAAC,SAAS,CAAC;IAC/B,CAAC,CAAC;;IAEH;IACAP,aAAa,CAACM,SAAS,CAACE,GAAG,CAAC,SAAS,CAAC;EACvC;AACD,CAAC;AAEDN,QAAQ,CAACO,gBAAgB,CAAC,SAAS,EAAEf,yBAAyB,CAAC;AAC/DQ,QAAQ,CAACO,gBAAgB,CAAC,UAAU,EAAEf,yBAAyB,CAAC,C","sources":["webpack://propel/./blocks/acf-blocks/quick-links/script.js"],"sourcesContent":["let handled = false;\n\nconst handleMouseAndTouchEvents = (e) => {\n\tif (e.type === 'touchend') {\n\t\thandled = true;\n\t\tupdateCurrentClass(e.target);\n\t} else if (e.type === 'mouseup' && !handled) {\n\t\tupdateCurrentClass(e.target);\n\t} else {\n\t\thandled = false;\n\t}\n};\n\nconst updateCurrentClass = (clickedElement) => {\n\t// Check if the clicked element or its parent has a specific class\n\tconst targetElement = clickedElement.closest(\n\t\t'.block-quick-links__link-wrapper'\n\t);\n\tif (targetElement) {\n\t\t// Remove 'current' class from all elements\n\t\tdocument\n\t\t\t.querySelectorAll('.block-quick-links__link-wrapper.current')\n\t\t\t.forEach((el) => {\n\t\t\t\tel.classList.remove('current');\n\t\t\t});\n\n\t\t// Add 'current' class to the clicked element\n\t\ttargetElement.classList.add('current');\n\t}\n};\n\ndocument.addEventListener('mouseup', handleMouseAndTouchEvents);\ndocument.addEventListener('touchend', handleMouseAndTouchEvents);\n"],"names":["handled","handleMouseAndTouchEvents","e","type","updateCurrentClass","target","clickedElement","targetElement","closest","document","querySelectorAll","forEach","el","classList","remove","add","addEventListener"],"sourceRoot":""}