{ "version": 3, "sources": ["../src/js/property-gallery-slider.js"], "sourcesContent": ["document.addEventListener('DOMContentLoaded', function () {\n\tdocument.querySelectorAll('.properties .property').forEach((property) => {\n\t\tconst gallery = property.querySelector('.gallery')\n\t\tif (!gallery) return\n\n\t\tconst sliderEl = gallery.querySelector('.keen-slider')\n\t\tconst prevBtn = gallery.querySelector('.prev')\n\t\tconst nextBtn = gallery.querySelector('.next')\n\t\tconst dots = gallery.querySelectorAll('button.dot')\n\n\t\tnew KeenSlider(\n\t\t\tsliderEl,\n\t\t\t{\n\t\t\t\tloop: true,\n\t\t\t\tslides: {\n\t\t\t\t\tperView: 1,\n\t\t\t\t},\n\t\t\t},\n\t\t\t[\n\t\t\t\t(slider) => {\n\t\t\t\t\tfunction updateClasses() {\n\t\t\t\t\t\tlet slide = slider.track.details.rel\n\t\t\t\t\t\tdots.forEach((dot) => {\n\t\t\t\t\t\t\tdot.classList.remove('active')\n\t\t\t\t\t\t})\n\t\t\t\t\t\tdots[slide].classList.add('active')\n\t\t\t\t\t}\n\n\t\t\t\t\tprevBtn.addEventListener('click', () => slider.prev())\n\t\t\t\t\tnextBtn.addEventListener('click', () => slider.next())\n\n\t\t\t\t\tdots.forEach((dot) => {\n\t\t\t\t\t\tdot.addEventListener('click', () => {\n\t\t\t\t\t\t\tlet targetIndex = parseInt(dot.dataset.index)\n\t\t\t\t\t\t\tslider.moveToIdx(targetIndex)\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\n\t\t\t\t\tslider.on('slideChanged', () => {\n\t\t\t\t\t\tupdateClasses()\n\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t]\n\t\t)\n\t})\n})\n"], "mappings": "MAAA,SAAS,iBAAiB,mBAAoB,UAAY,CACzD,SAAS,iBAAiB,yBAAyB,QAAQ,AAAC,GAAa,CACxE,GAAM,GAAU,EAAS,cAAc,YACvC,GAAI,CAAC,EAAS,OAEd,GAAM,GAAW,EAAQ,cAAc,gBACjC,EAAU,EAAQ,cAAc,SAChC,EAAU,EAAQ,cAAc,SAChC,EAAO,EAAQ,iBAAiB,cAEtC,GAAI,YACH,EACA,CACC,KAAM,GACN,OAAQ,CACP,QAAS,IAGX,CACC,AAAC,GAAW,CACX,YAAyB,CACxB,GAAI,GAAQ,EAAO,MAAM,QAAQ,IACjC,EAAK,QAAQ,AAAC,GAAQ,CACrB,EAAI,UAAU,OAAO,YAEtB,EAAK,GAAO,UAAU,IAAI,UAG3B,EAAQ,iBAAiB,QAAS,IAAM,EAAO,QAC/C,EAAQ,iBAAiB,QAAS,IAAM,EAAO,QAE/C,EAAK,QAAQ,AAAC,GAAQ,CACrB,EAAI,iBAAiB,QAAS,IAAM,CACnC,GAAI,GAAc,SAAS,EAAI,QAAQ,OACvC,EAAO,UAAU,OAInB,EAAO,GAAG,eAAgB,IAAM,CAC/B", "names": [] }