{"version":3,"sources":["webpack:///./Scripts/Components/Vanilla/QuantityInput.js"],"names":["quantityIncreaseElements","document","getElementsByClassName","quantityDecreaseElements","quantityIncreaseElement","addEventListener","increaseInput","quantityDecreaseElement","decreaseInput","elem","inputId","dataset","inputElem","getElementById","value","parseInt","Math","max"],"mappings":"iEAAA,MAAMA,EAA2BC,SAASC,uBAAuB,2BAC3DC,EAA2BF,SAASC,uBAAuB,2BAEjE,GAAGF,EACC,IAAI,IAAII,KAA2BJ,EAC/BI,EAAwBC,iBAAiB,SAAQ,IAAMC,EAAcF,KAG7E,GAAGD,EACC,IAAI,IAAII,KAA2BJ,EAC/BI,EAAwBF,iBAAiB,SAAS,IAAMG,EAAcD,KAI9E,SAASD,EAAcG,GACnB,MAAMC,EAAUD,EAAKE,QAAL,QACVC,EAAYX,SAASY,eAAeH,GAC1CE,EAAUE,MAAQC,SAASH,EAAUE,OAAS,EAElD,SAASN,EAAcC,GACnB,MAAMC,EAAUD,EAAKE,QAAL,QACVC,EAAYX,SAASY,eAAeH,GAC1CE,EAAUE,MAAQE,KAAKC,IAAIF,SAASH,EAAUE,OAAS,EAAG","file":"894.85175842d8dd093770cf.js","sourcesContent":["const quantityIncreaseElements = document.getElementsByClassName(\"quantity-input-increase\");\r\nconst quantityDecreaseElements = document.getElementsByClassName(\"quantity-input-decrease\");\r\n\r\nif(quantityIncreaseElements) {\r\n for(let quantityIncreaseElement of quantityIncreaseElements) {\r\n quantityIncreaseElement.addEventListener(\"click\",() => increaseInput(quantityIncreaseElement))\r\n }\r\n}\r\nif(quantityDecreaseElements) {\r\n for(let quantityDecreaseElement of quantityDecreaseElements) {\r\n quantityDecreaseElement.addEventListener(\"click\", () => decreaseInput(quantityDecreaseElement))\r\n }\r\n}\r\n\r\nfunction increaseInput(elem) {\r\n const inputId = elem.dataset[\"inputId\"];\r\n const inputElem = document.getElementById(inputId);\r\n inputElem.value = parseInt(inputElem.value) + 1;\r\n}\r\nfunction decreaseInput(elem) {\r\n const inputId = elem.dataset[\"inputId\"];\r\n const inputElem = document.getElementById(inputId);\r\n inputElem.value = Math.max(parseInt(inputElem.value) - 1, 1);\r\n}"],"sourceRoot":""}