{"version":3,"file":"moveSmoothly-Ditc9ZM8.js","sources":["../../../app/javascript/components/lib/moveSmoothly.js"],"sourcesContent":["export default (targetObserver, targetLocation, offset = 0) => {\n\n  Object.assign([], document.querySelectorAll(targetObserver)).map(el => {\n    el.addEventListener('click', e => {\n      const targetAnchor = document.querySelector(targetLocation);\n      e.preventDefault();\n      window.scroll({\n        top: targetAnchor.offsetTop - offset,\n        behavior: 'smooth'\n      });\n    });\n  });\n};\n"],"names":["moveSmoothly","targetObserver","targetLocation","offset","el","e","targetAnchor"],"mappings":"AAAA,MAAeA,EAAA,CAACC,EAAgBC,EAAgBC,EAAS,IAAM,CAE7D,OAAO,OAAO,CAAA,EAAI,SAAS,iBAAiBF,CAAc,CAAC,EAAE,IAAIG,GAAM,CACrEA,EAAG,iBAAiB,QAASC,GAAK,CAChC,MAAMC,EAAe,SAAS,cAAcJ,CAAc,EAC1DG,EAAE,eAAc,EAChB,OAAO,OAAO,CACZ,IAAKC,EAAa,UAAYH,EAC9B,SAAU,QAClB,CAAO,CACP,CAAK,CACL,CAAG,CACH"}