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KjB,QAAU4B,EAAAA,GAAAA,OAAkBX,EAAKf,MAAM2B,O,+VAAMC,CAAA,CAC9CC,MAAOJ,EACPK,SAAS,EACTnB,KAAMI,EAAKJ,KACXoB,MAAO,CACH9B,IAAKc,EAAKd,IACVC,IAAKa,EAAKb,KAEd8B,OAAQ,CACJC,GAAI,SAACtC,GACD,OAAO2B,OAAO3B,EAClB,EACAuC,KAAM,SAACvC,GACH,OAAO2B,OAAO3B,EAClB,IAEDS,KAGHW,EAAKf,MAAMC,KAAOc,EAAKf,MAAME,OAC7Ba,EAAKjB,QAAQqC,GAAG,UAAU,SAACC,EAAQC,GAC/B,IAAM1C,EAAQyC,EAAOC,GAEN,IAAXA,GAAgBtB,EAAKf,MAAMC,IAC3Bc,EAAKf,MAAMC,IAAIN,MAAQA,EACL,IAAX0C,GAAgBtB,EAAKf,MAAME,MAClCa,EAAKf,MAAME,IAAIP,MAAQA,EAE/B,IAKAoB,EAAKjB,QAAQqC,GAAG,UAAU,SAACxC,EAAO0C,GAC9B,IAAMC,EAAc,IAAIC,MAAM,SAAU,CACpCC,SAAS,IAGE,IAAXH,GAAgBtB,EAAKf,MAAMC,IAC3Bc,EAAKf,MAAMC,IAAIwC,cAAcH,GACX,IAAXD,GAAgBtB,EAAKf,MAAME,KAClCa,EAAKf,MAAME,IAAIuC,cAAcH,EAErC,IAER,GACJ,EAEA5B,MAAK,WACDb,KAAKC,QAAQY,OACjB,EAER,GAER,CAnGYgC,CAAWlD,EAAIJ,EAAQM,EAASH,EAAUoD,YAIlD,IAAGC,OAAO,OACd,IDFAC,SAASC,iBAAiB,oBAAoB,WAC1C1D,EAAAA,EAAOyC,OACX,G","sources":["webpack:///./js/app.js","webpack:///./js/alpine-plugins/multi-range-slider/index.js"],"sourcesContent":["import Alpine from 'alpinejs';\nimport persist from \"@alpinejs/persist\";\nimport multiRangeSlider from \"./alpine-plugins/multi-range-slider\";\n\nwindow.Alpine = Alpine;\nAlpine.plugin(persist);\nAlpine.plugin(multiRangeSlider);\n\ndocument.addEventListener('DOMContentLoaded', () => {\n Alpine.start();\n});\n","import noUiSlider from \"nouislider\";\n\nexport default function(Alpine) {\n Alpine.directive(\"multi-range-slider\", (el, directive, { evaluate }) => {\n if (!directive.value) {\n handleRoot(el, Alpine, evaluate(directive.expression));\n } else if (directive.value === \"input\") {\n handleInput(el, Alpine);\n }\n }).before(\"bind\");\n}\n\nfunction handleRoot(el, Alpine, settings) {\n settings = settings || {};\n\n Alpine.bind(el, {\n \"@reset.window\"(e) {\n const parentEl = this.$el.closest(\"form[x-data]\");\n\n if (!parentEl || e.target !== parentEl) {\n return;\n }\n\n this.reset();\n },\n \"x-data\"() {\n return {\n $slider: null,\n step: 100,\n min: null,\n max: null,\n minStart: null,\n maxStart: null,\n\n init() {\n const numberFormatter = new Intl.NumberFormat(\"en-US\", {\n style: \"currency\",\n currency: \"USD\",\n minimumFractionDigits: 0,\n maximumFractionDigits: 0,\n });\n\n this.step = Number(this.$el.dataset.step) || this.step;\n\n this.$nextTick(() => {\n this.min = Number(this.$el.dataset.min);\n this.max = Number(this.$el.dataset.max);\n\n const startValues = [Number(this.$el.dataset.minStart || this.min), Number(this.$el.dataset.maxStart || this.max)];\n\n this.$slider = noUiSlider.create(this.$refs.slider, {\n start: startValues,\n connect: true,\n step: this.step,\n range: {\n min: this.min,\n max: this.max\n },\n format: {\n to: (value) => {\n return Number(value);\n },\n from: (value) => {\n return Number(value);\n }\n },\n ...settings,\n });\n\n if (this.$refs.min || this.$refs.max) {\n this.$slider.on(\"update\", (values, handle) => {\n const value = values[handle];\n\n if (handle === 0 && this.$refs.min) {\n this.$refs.min.value = value;\n } else if (handle === 1 && this.$refs.max) {\n this.$refs.max.value = value;\n }\n });\n\n // This makes sure a change event is triggered when the slider values have changed\n // so it can bubble up as a form change event for the parent component to know\n // when filters have changed and trigger an update.\n this.$slider.on(\"change\", (value, handle) => {\n const changeEvent = new Event(\"change\", {\n bubbles: true\n });\n\n if (handle === 0 && this.$refs.min) {\n this.$refs.min.dispatchEvent(changeEvent);\n } else if (handle === 1 && this.$refs.max) {\n this.$refs.max.dispatchEvent(changeEvent);\n }\n });\n }\n });\n },\n\n reset() {\n this.$slider.reset();\n },\n };\n }\n });\n}\n\nfunction handleInput(el, Alpine) {\n Alpine.bind(el, {\n \":step\": \"step\",\n \":min\": \"min\",\n \":max\": \"max\",\n \"@input.debounce.400ms\"() {\n this.$slider.set([this.$refs.min.value, this.$refs.max.value], false);\n }\n });\n}\n\nfunction handleTooltip(el, Alpine) {\n\n}\n"],"names":["window","Alpine","plugin","persist","directive","el","_ref","evaluate","value","bind","this","$slider","set","$refs","min","max","handleInput","settings","e","parentEl","$el","closest","target","reset","step","minStart","maxStart","init","_this","Intl","NumberFormat","style","currency","minimumFractionDigits","maximumFractionDigits","Number","dataset","$nextTick","startValues","noUiSlider","slider","_objectSpread","start","connect","range","format","to","from","on","values","handle","changeEvent","Event","bubbles","dispatchEvent","handleRoot","expression","before","document","addEventListener"],"sourceRoot":""}