{ "version": 3, "sources": ["../../src/js/vertical-slider-card.js"], "sourcesContent": ["document.addEventListener('DOMContentLoaded', () => {\n\tlet sliders = document.querySelectorAll('.vertical-slider-card .keen-slider')\n\n\tsliders.forEach(sliderSection => {\n\t\tvar slider = new KeenSlider(\n\t\t\tsliderSection,\n\t\t\t{\n\t\t\t\tloop: true,\n\t\t\t\tslides: {\n\t\t\t\t\torigin: 'center',\n\t\t\t\t\tperView: 1.3,\n\t\t\t\t\tspacing: 24,\n\t\t\t\t},\n\t\t\t\tbreakpoints: {\n\t\t\t\t\t'(min-width: 768px)': {\n\t\t\t\t\t\tvertical: true,\n\t\t\t\t\t\tslides: {\n\t\t\t\t\t\t\torigin: 'center',\n\t\t\t\t\t\t\tperView: 'auto',\n\t\t\t\t\t\t\tspacing: 32,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t[\n\t\t\t\tslider => {\n\t\t\t\t\tvar touchTimeout\n\t\t\t\t\tvar position\n\t\t\t\t\tvar wheelActive\n\t\t\t\t\tlet timeout\n\t\t\t\t\tlet mouseOver = false\n\n\t\t\t\t\tfunction clearNextTimeout() {\n\t\t\t\t\t\tclearTimeout(timeout)\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction nextTimeout() {\n\t\t\t\t\t\tclearTimeout(timeout)\n\t\t\t\t\t\tif (mouseOver) return\n\t\t\t\t\t\ttimeout = setTimeout(() => {\n\t\t\t\t\t\t\tslider.next()\n\t\t\t\t\t\t}, 7000)\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction updateClasses() {\n\t\t\t\t\t\tsliderSection\n\t\t\t\t\t\t\t.querySelector('.keen-slider__slide.active')\n\t\t\t\t\t\t\t?.classList.remove('active')\n\t\t\t\t\t\tslider.slides[slider.track.details.rel].classList.add('active')\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction dispatch(e, name) {\n\t\t\t\t\t\tposition.x -= e.deltaX\n\t\t\t\t\t\tposition.y -= e.deltaY\n\t\t\t\t\t\tslider.container.dispatchEvent(\n\t\t\t\t\t\t\tnew CustomEvent(name, {\n\t\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\t\tx: position.x,\n\t\t\t\t\t\t\t\t\ty: position.y,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction wheelStart(e) {\n\t\t\t\t\t\tposition = {\n\t\t\t\t\t\t\tx: e.pageX,\n\t\t\t\t\t\t\ty: e.pageY,\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdispatch(e, 'ksDragStart')\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction wheel(e) {\n\t\t\t\t\t\tdispatch(e, 'ksDrag')\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction wheelEnd(e) {\n\t\t\t\t\t\tdispatch(e, 'ksDragEnd')\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction eventWheel(e) {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\tif (!wheelActive) {\n\t\t\t\t\t\t\twheelStart(e)\n\t\t\t\t\t\t\twheelActive = true\n\t\t\t\t\t\t}\n\t\t\t\t\t\twheel(e)\n\t\t\t\t\t\tclearTimeout(touchTimeout)\n\t\t\t\t\t\ttouchTimeout = setTimeout(() => {\n\t\t\t\t\t\t\twheelActive = false\n\t\t\t\t\t\t\twheelEnd(e)\n\t\t\t\t\t\t}, 50)\n\t\t\t\t\t}\n\n\t\t\t\t\tslider.on('created', () => {\n\t\t\t\t\t\tslider.container.addEventListener('wheel', eventWheel, {\n\t\t\t\t\t\t\tpassive: false,\n\t\t\t\t\t\t})\n\t\t\t\t\t\tslider.container.addEventListener('mouseover', () => {\n\t\t\t\t\t\t\tmouseOver = true\n\t\t\t\t\t\t\tclearNextTimeout()\n\t\t\t\t\t\t})\n\t\t\t\t\t\tslider.container.addEventListener('mouseout', () => {\n\t\t\t\t\t\t\tmouseOver = false\n\t\t\t\t\t\t\tnextTimeout()\n\t\t\t\t\t\t})\n\t\t\t\t\t\tnextTimeout()\n\t\t\t\t\t})\n\n\t\t\t\t\tslider.on('slideChanged', updateClasses)\n\t\t\t\t\tslider.on('dragStarted', clearNextTimeout)\n\t\t\t\t\tslider.on('animationEnded', nextTimeout)\n\t\t\t\t\tslider.on('updated', nextTimeout)\n\t\t\t\t},\n\t\t\t]\n\t\t)\n\t})\n})\n"], "mappings": "mBAAA,SAAS,iBAAiB,mBAAoB,IAAM,CACrC,SAAS,iBAAiB,oCAAoC,EAEpE,QAAQA,GAAiB,CAChC,IAAIC,EAAS,IAAI,WAChBD,EACA,CACC,KAAM,GACN,OAAQ,CACP,OAAQ,SACR,QAAS,IACT,QAAS,EACV,EACA,YAAa,CACZ,qBAAsB,CACrB,SAAU,GACV,OAAQ,CACP,OAAQ,SACR,QAAS,OACT,QAAS,EACV,CACD,CACD,CACD,EACA,CACCC,GAAU,CACT,IAAIC,EACAC,EACAC,EACJ,IAAIC,EACAC,EAAY,GAEhB,SAASC,GAAmB,CAC3B,aAAaF,CAAO,CACrB,CAEA,SAASG,GAAc,CACtB,aAAaH,CAAO,EAChB,CAAAC,IACJD,EAAU,WAAW,IAAM,CAC1BJ,EAAO,KAAK,CACb,EAAG,GAAI,EACR,CAEA,SAASQ,GAAgB,CA5C9B,IAAAC,GA6CMA,EAAAV,EACE,cAAc,4BAA4B,IAD5C,MAAAU,EAEG,UAAU,OAAO,UACpBT,EAAO,OAAOA,EAAO,MAAM,QAAQ,GAAG,EAAE,UAAU,IAAI,QAAQ,CAC/D,CAEA,SAASU,EAAS,EAAGC,EAAM,CAC1BT,EAAS,GAAK,EAAE,OAChBA,EAAS,GAAK,EAAE,OAChBF,EAAO,UAAU,cAChB,IAAI,YAAYW,EAAM,CACrB,OAAQ,CACP,EAAGT,EAAS,EACZ,EAAGA,EAAS,CACb,CACD,CAAC,CACF,CACD,CAEA,SAASU,EAAW,EAAG,CACtBV,EAAW,CACV,EAAG,EAAE,MACL,EAAG,EAAE,KACN,EACAQ,EAAS,EAAG,aAAa,CAC1B,CAEA,SAASG,EAAM,EAAG,CACjBH,EAAS,EAAG,QAAQ,CACrB,CAEA,SAASI,EAAS,EAAG,CACpBJ,EAAS,EAAG,WAAW,CACxB,CAEA,SAASK,EAAW,EAAG,CACtB,EAAE,eAAe,EACZZ,IACJS,EAAW,CAAC,EACZT,EAAc,IAEfU,EAAM,CAAC,EACP,aAAaZ,CAAY,EACzBA,EAAe,WAAW,IAAM,CAC/BE,EAAc,GACdW,EAAS,CAAC,CACX,EAAG,EAAE,CACN,CAEAd,EAAO,GAAG,UAAW,IAAM,CAC1BA,EAAO,UAAU,iBAAiB,QAASe,EAAY,CACtD,QAAS,EACV,CAAC,EACDf,EAAO,UAAU,iBAAiB,YAAa,IAAM,CACpDK,EAAY,GACZC,EAAiB,CAClB,CAAC,EACDN,EAAO,UAAU,iBAAiB,WAAY,IAAM,CACnDK,EAAY,GACZE,EAAY,CACb,CAAC,EACDA,EAAY,CACb,CAAC,EAEDP,EAAO,GAAG,eAAgBQ,CAAa,EACvCR,EAAO,GAAG,cAAeM,CAAgB,EACzCN,EAAO,GAAG,iBAAkBO,CAAW,EACvCP,EAAO,GAAG,UAAWO,CAAW,CACjC,CACD,CACD,CACD,CAAC,CACF,CAAC", "names": ["sliderSection", "slider", "touchTimeout", "position", "wheelActive", "timeout", "mouseOver", "clearNextTimeout", "nextTimeout", "updateClasses", "_a", "dispatch", "name", "wheelStart", "wheel", "wheelEnd", "eventWheel"] }