{"version":3,"file":"vue-currency-input.esm-BPTolIKF.js","sources":["../../../node_modules/vue-currency-input/dist/vue-currency-input.esm.js"],"sourcesContent":["/**\n * Vue Currency Input 1.18.3\n * (c) 2020 Matthias Stiller\n * @license MIT\n */\nimport Vue from 'vue';\n\nvar formatToParts = function (number, numberFormat) {\n var parts = numberFormat.formatToParts(number);\n var types = parts.map(function (p) { return p.type; });\n var digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map(function (i) { return i.toLocaleString(numberFormat.resolvedOptions().locale); });\n var prefix = parts.slice(0, types.indexOf('integer')).map(function (p) { return p.value; }).join('');\n var suffix = parts.slice(Math.max(types.lastIndexOf('integer'), types.indexOf('fraction')) + 1).map(function (p) { return p.value; }).join('');\n var groupingSymbol = types.indexOf('group') !== -1 ? parts[types.indexOf('group')].value : undefined;\n var decimalSymbol = types.indexOf('decimal') !== -1 ? parts[types.indexOf('decimal')].value : undefined;\n var minusSymbol = types.indexOf('minusSign') !== -1 ? parts[types.indexOf('minusSign')].value : undefined;\n return {\n digits: digits,\n prefix: prefix,\n suffix: suffix,\n groupingSymbol: groupingSymbol,\n decimalSymbol: decimalSymbol,\n minusSymbol: minusSymbol\n }\n};\nfunction createCurrencyFormat (ref) {\n var locale = ref.locale;\n var currency = ref.currency;\n var precision = ref.precision;\n var autoDecimalMode = ref.autoDecimalMode;\n var valueAsInteger = ref.valueAsInteger;\n var options = typeof currency === 'string' ? { currency: currency, style: 'currency' } : { minimumFractionDigits: 1 };\n var numberFormat = new Intl.NumberFormat(locale, options);\n var ref$1 = formatToParts(-1, numberFormat);\n var minusSymbol = ref$1.minusSymbol;\n var negativePrefix = ref$1.prefix;\n var currencyFormat = Object.assign({}, formatToParts(123456, numberFormat),\n {minusSymbol: minusSymbol,\n negativePrefix: negativePrefix});\n var minimumFractionDigits = 2;\n var maximumFractionDigits = 2;\n if (currencyFormat.decimalSymbol === undefined) {\n minimumFractionDigits = maximumFractionDigits = 0;\n } else if (typeof precision === 'number') {\n minimumFractionDigits = maximumFractionDigits = precision;\n } else if (typeof precision === 'object' && !autoDecimalMode && !valueAsInteger) {\n minimumFractionDigits = precision.min || 0;\n maximumFractionDigits = precision.max !== undefined ? precision.max : 20;\n } else if (typeof currency === 'string') {\n minimumFractionDigits = numberFormat.resolvedOptions().minimumFractionDigits;\n maximumFractionDigits = numberFormat.resolvedOptions().maximumFractionDigits;\n }\n if (currency != null && typeof currency === 'object') {\n currencyFormat.prefix = currency.prefix || '';\n currencyFormat.negativePrefix = \"\" + (currencyFormat.minusSymbol) + (currency.prefix || '');\n currencyFormat.suffix = currency.suffix || '';\n }\n return Object.assign({}, currencyFormat, {minimumFractionDigits: minimumFractionDigits, maximumFractionDigits: maximumFractionDigits})\n}\n\nvar toInteger = function (number, valueAsInteger, fractionDigits) {\n return valueAsInteger && number != null ? Number(number.toFixed(fractionDigits).split('.').join('')) : number\n};\nvar toFloat = function (number, valueAsInteger, fractionDigits) {\n return valueAsInteger && number != null ? number / Math.pow(10, fractionDigits) : number\n};\n\nvar removeLeadingZeros = function (str) { return str.replace(/^0+(0$|[^0])/, '$1'); };\nvar onlyDigits = function (str, digits) { return normalizeDigits(str, digits).replace(/\\D+/g, ''); };\nvar count = function (str, search) { return (str.match(new RegExp((\"\\\\\" + search), 'g')) || []).length; };\nvar endsWith = function (str, search) {\n return str.substring(str.length - search.length, str.length) === search\n};\nvar startsWith = function (str, search) {\n return str.substring(0, search.length) === search\n};\nvar insertCurrencySymbol = function (value, currencyFormat, negative, hideCurrencySymbol) {\n var prefix = currencyFormat.prefix;\n var negativePrefix = currencyFormat.negativePrefix;\n var suffix = currencyFormat.suffix;\n if (hideCurrencySymbol) {\n prefix = suffix = '';\n negativePrefix = currencyFormat.minusSymbol;\n }\n return (\"\" + (negative ? negativePrefix : prefix) + value + suffix)\n};\nvar stripCurrencySymbol = function (str, ref) {\n var prefix = ref.prefix;\n var suffix = ref.suffix;\n if (prefix) {\n str = str.replace(prefix, '').replace(prefix.trim(), '');\n }\n if (suffix) {\n str = str.replace(suffix, '').replace(suffix.trim(), '');\n }\n return str.trim()\n};\nvar normalizeMinusSymbol = function (str) {\n return str.replace(new RegExp((\"^\" + (['−', '-', '‐'].join('|'))), 'g'), '-')\n};\nvar isNegative = function (str) { return normalizeMinusSymbol(str).charAt(0) === '-'; };\nvar isNumber = function (str) { return normalizeMinusSymbol(str).match(new RegExp(\"^-?\\\\d+(\\\\.\\\\d+)?$\")); };\nvar normalizeDigits = function (str, digits) {\n digits.forEach(function (digit, index) {\n str = str.replace(new RegExp(digit, 'g'), index);\n });\n return str\n};\n\nfunction parse (str, currencyFormat, valueAsInteger) {\n if ( valueAsInteger === void 0 ) valueAsInteger = false;\n if (typeof str === 'string') {\n str = normalizeDigits(str, currencyFormat.digits);\n var value = stripCurrencySymbol(str, currencyFormat);\n var numberParts = value.split(currencyFormat.decimalSymbol);\n if (numberParts.length > 2) {\n return null\n }\n var integer = numberParts[0].replace(new RegExp((\"\\\\\" + (currencyFormat.groupingSymbol)), 'g'), '');\n if (!isNumber(integer)) {\n return null\n }\n var number = integer;\n if (numberParts.length === 2) {\n var fraction = numberParts[1];\n if (fraction.length && !fraction.match(/^\\d+$/g)) {\n return null\n }\n number += \".\" + fraction;\n }\n return toInteger(Number(normalizeMinusSymbol(number)), valueAsInteger, currencyFormat.minimumFractionDigits)\n }\n return null\n}\n\nfunction dispatchEvent (el, eventName, data) {\n var event = document.createEvent('CustomEvent');\n event.initCustomEvent(eventName, true, true, data);\n el.dispatchEvent(event);\n}\n\nvar DEFAULT_OPTIONS = {\n locale: undefined,\n currency: 'EUR',\n valueAsInteger: false,\n distractionFree: true,\n precision: undefined,\n autoDecimalMode: false,\n valueRange: undefined,\n allowNegative: true\n};\nvar parseCurrency = function (formattedValue, options) { return parse(formattedValue, createCurrencyFormat(Object.assign({}, DEFAULT_OPTIONS, options)), options.valueAsInteger); };\nvar setValue = function (el, value) { return dispatchEvent(el, 'format', { value: value }); };\n\nvar setCaretPosition = function (el, position) { return el.setSelectionRange(position, position); };\nvar getCaretPositionAfterFormat = function (newValue, inputtedValue, caretPosition, currencyFormat, options) {\n var prefix = currencyFormat.prefix;\n var suffix = currencyFormat.suffix;\n var decimalSymbol = currencyFormat.decimalSymbol;\n var maximumFractionDigits = currencyFormat.maximumFractionDigits;\n var groupingSymbol = currencyFormat.groupingSymbol;\n var digits = currencyFormat.digits;\n var decimalSymbolPosition = inputtedValue.indexOf(decimalSymbol) + 1;\n var caretPositionFromLeft = inputtedValue.length - caretPosition;\n if (Math.abs(newValue.length - inputtedValue.length) > 1 && caretPosition <= decimalSymbolPosition) {\n return newValue.indexOf(decimalSymbol) + 1\n } else if (newValue.substr(caretPosition, 1) === groupingSymbol && count(newValue, groupingSymbol) === count(inputtedValue, groupingSymbol) + 1) {\n return newValue.length - caretPositionFromLeft - 1\n } else {\n if (!options.autoDecimalMode && decimalSymbolPosition !== 0 && caretPosition > decimalSymbolPosition) {\n if (onlyDigits(inputtedValue.substr(decimalSymbolPosition), digits).length - 1 === maximumFractionDigits) {\n caretPositionFromLeft -= 1;\n }\n }\n return options.distractionFree.hideCurrencySymbol\n ? newValue.length - caretPositionFromLeft\n : Math.max(newValue.length - Math.max(caretPositionFromLeft, suffix.length), prefix.length === 0 ? 0 : prefix.length + 1)\n }\n};\nvar getDistractionFreeCaretPosition = function (currencyFormat, options, value, caretPosition) {\n var result = caretPosition;\n if (options.distractionFree.hideCurrencySymbol) {\n result -= currencyFormat.prefix.length;\n }\n if (options.distractionFree.hideGroupingSymbol) {\n result -= count(value.substring(0, caretPosition), currencyFormat.groupingSymbol);\n }\n return Math.max(0, result)\n};\n\nvar isValidInteger = function (integer, groupingSymbol) { return integer.match(new RegExp((\"^(0|[1-9]\\\\d{0,2}(\\\\\" + groupingSymbol + \"?\\\\d{3})*)$\"))); };\nvar isFractionIncomplete = function (value, ref) {\n var digits = ref.digits;\n var decimalSymbol = ref.decimalSymbol;\n var groupingSymbol = ref.groupingSymbol;\n var numberParts = value.split(decimalSymbol);\n return endsWith(value, decimalSymbol) && numberParts.length === 2 && isValidInteger(normalizeDigits(numberParts[0], digits), groupingSymbol)\n};\nvar checkIncompleteValue = function (value, negative, previousConformedValue, currencyFormat, hideCurrencySymbol) {\n var digits = currencyFormat.digits;\n var negativePrefix = currencyFormat.negativePrefix;\n var decimalSymbol = currencyFormat.decimalSymbol;\n var maximumFractionDigits = currencyFormat.maximumFractionDigits;\n if (value === '' && negative && previousConformedValue !== (hideCurrencySymbol ? currencyFormat.minusSymbol : negativePrefix)) {\n return insertCurrencySymbol('', currencyFormat, negative, hideCurrencySymbol)\n } else if (maximumFractionDigits > 0) {\n if (isFractionIncomplete(value, currencyFormat)) {\n return insertCurrencySymbol(value, currencyFormat, negative, hideCurrencySymbol)\n } else if (startsWith(value, decimalSymbol)) {\n return insertCurrencySymbol((\"\" + (digits[0]) + decimalSymbol + ((onlyDigits(value.substr(1), digits).substr(0, maximumFractionDigits)))), currencyFormat, negative, hideCurrencySymbol)\n }\n }\n return null\n};\nvar getAutoDecimalModeConformedValue = function (str, ref, allowNegative) {\n var minimumFractionDigits = ref.minimumFractionDigits;\n var digits = ref.digits;\n if (str === '') {\n return { conformedValue: '' }\n } else {\n var negative = isNegative(str) && allowNegative;\n var conformedValue = (allowNegative && str === '-')\n ? -0\n : Number((\"\" + (negative ? '-' : '') + (removeLeadingZeros(onlyDigits(str, digits))))) / Math.pow(10, minimumFractionDigits);\n return {\n conformedValue: conformedValue,\n fractionDigits: conformedValue.toFixed(minimumFractionDigits).slice(-minimumFractionDigits)\n }\n }\n};\nfunction conformToMask (str, currencyFormat, previousConformedValue, hideCurrencySymbol, autoDecimalMode, allowNegative) {\n if ( previousConformedValue === void 0 ) previousConformedValue = '';\n if (typeof str === 'string') {\n var value = stripCurrencySymbol(str, currencyFormat);\n if (currencyFormat.minimumFractionDigits > 0 && autoDecimalMode) {\n return getAutoDecimalModeConformedValue(value, currencyFormat, allowNegative)\n }\n var negative = isNegative(value);\n if (negative) {\n value = value.substring(1);\n negative &= allowNegative;\n }\n var incompleteValue = checkIncompleteValue(value, negative, previousConformedValue, currencyFormat, hideCurrencySymbol);\n if (incompleteValue != null) {\n return { conformedValue: incompleteValue }\n }\n var ref = value.split(currencyFormat.decimalSymbol);\n var integer = ref[0];\n var fraction = ref.slice(1);\n var integerDigits = removeLeadingZeros(onlyDigits(integer, currencyFormat.digits));\n var fractionDigits = onlyDigits(fraction.join(''), currencyFormat.digits).substr(0, currencyFormat.maximumFractionDigits);\n var invalidFraction = fraction.length > 0 && fractionDigits.length === 0;\n var invalidNegativeValue = integerDigits === '' && negative && (previousConformedValue === str.slice(0, -1) || previousConformedValue !== currencyFormat.negativePrefix);\n if (invalidFraction || invalidNegativeValue) {\n return { conformedValue: previousConformedValue }\n } else if (isNumber(integerDigits)) {\n return {\n conformedValue: Number((\"\" + (negative ? '-' : '') + integerDigits + \".\" + fractionDigits)),\n fractionDigits: fractionDigits\n }\n } else {\n return { conformedValue: '' }\n }\n }\n return { conformedValue: previousConformedValue }\n}\n\nvar equal = function (a, b) {\n if (a === b) {\n return true\n }\n if (!a || !b || typeof a !== 'object' || typeof b !== 'object') {\n return false\n }\n var keys = Object.keys(a);\n if (keys.length !== Object.keys(b).length) {\n return false\n }\n if (!keys.every(Object.prototype.hasOwnProperty.bind(b))) {\n return false\n }\n return keys.every(function (key) { return equal(a[key], b[key]); })\n};\n\nvar init = function (el, optionsFromBinding, ref) {\n var $CI_DEFAULT_OPTIONS = ref.$CI_DEFAULT_OPTIONS;\n var inputElement = el.tagName.toLowerCase() === 'input' ? el : el.querySelector('input');\n if (!inputElement) {\n throw new Error('No input element found')\n }\n var options = Object.assign({}, ($CI_DEFAULT_OPTIONS || DEFAULT_OPTIONS), optionsFromBinding);\n var distractionFree = options.distractionFree;\n var autoDecimalMode = options.autoDecimalMode;\n if (typeof distractionFree === 'boolean') {\n options.distractionFree = {\n hideCurrencySymbol: distractionFree,\n hideNegligibleDecimalDigits: distractionFree,\n hideGroupingSymbol: distractionFree\n };\n }\n if (autoDecimalMode) {\n options.distractionFree.hideNegligibleDecimalDigits = false;\n inputElement.setAttribute('inputmode', 'numeric');\n } else {\n inputElement.setAttribute('inputmode', 'decimal');\n }\n var currencyFormat = createCurrencyFormat(options);\n inputElement.$ci = Object.assign({}, inputElement.$ci || {},\n {options: options,\n currencyFormat: currencyFormat});\n return inputElement\n};\nvar validateValueRange = function (value, valueRange) {\n if (valueRange) {\n var min = valueRange.min;\n var max = valueRange.max;\n if (min !== undefined && value < min) {\n value = min;\n }\n if (max !== undefined && value > max) {\n value = max;\n }\n }\n return value\n};\nvar applyFixedFractionFormat = function (el, value, forcedChange) {\n var ref = el.$ci.options;\n var valueRange = ref.valueRange;\n var locale = ref.locale;\n var valueAsInteger = ref.valueAsInteger;\n var ref$1 = el.$ci.currencyFormat;\n var maximumFractionDigits = ref$1.maximumFractionDigits;\n var minimumFractionDigits = ref$1.minimumFractionDigits;\n if (value != null) {\n value = validateValueRange(value, valueRange);\n value = new Intl.NumberFormat(locale, { minimumFractionDigits: minimumFractionDigits, maximumFractionDigits: maximumFractionDigits }).format(value);\n }\n format(el, value);\n if (forcedChange) {\n dispatchEvent(el, 'change', { numberValue: toInteger(el.$ci.numberValue, valueAsInteger, maximumFractionDigits) });\n }\n};\nvar updateInputValue = function (el, value, hideNegligibleDecimalDigits) {\n if (value != null) {\n var ref = el.$ci;\n var focus = ref.focus;\n var ref_options = ref.options;\n var allowNegative = ref_options.allowNegative;\n var autoDecimalMode = ref_options.autoDecimalMode;\n var distractionFree = ref_options.distractionFree;\n var locale = ref_options.locale;\n var currencyFormat = ref.currencyFormat;\n var previousConformedValue = ref.previousConformedValue;\n var hideCurrencySymbol = focus && distractionFree.hideCurrencySymbol;\n var ref$1 = conformToMask(value, currencyFormat, previousConformedValue, hideCurrencySymbol, autoDecimalMode, allowNegative);\n var conformedValue = ref$1.conformedValue;\n var fractionDigits = ref$1.fractionDigits;\n if (typeof conformedValue === 'number') {\n var maximumFractionDigits = currencyFormat.maximumFractionDigits;\n var minimumFractionDigits = currencyFormat.minimumFractionDigits;\n if (focus) {\n minimumFractionDigits = maximumFractionDigits;\n }\n minimumFractionDigits = hideNegligibleDecimalDigits\n ? fractionDigits.replace(/0+$/, '').length\n : Math.min(minimumFractionDigits, fractionDigits.length);\n var formattedValue = new Intl.NumberFormat(locale, {\n useGrouping: !(focus && distractionFree.hideGroupingSymbol),\n minimumFractionDigits: minimumFractionDigits,\n maximumFractionDigits: maximumFractionDigits\n }).format(Math.abs(conformedValue));\n var isNegativeZero = conformedValue === 0 && (1 / conformedValue < 0);\n el.value = insertCurrencySymbol(formattedValue, currencyFormat, isNegativeZero || conformedValue < 0, hideCurrencySymbol);\n el.$ci.numberValue = conformedValue;\n } else {\n el.value = conformedValue;\n el.$ci.numberValue = parse(el.value, currencyFormat);\n }\n } else {\n el.value = el.$ci.numberValue = null;\n }\n el.$ci.previousConformedValue = el.value;\n};\nvar format = function (el, value, hideNegligibleDecimalDigits) {\n if ( hideNegligibleDecimalDigits === void 0 ) hideNegligibleDecimalDigits = false;\n updateInputValue(el, value, hideNegligibleDecimalDigits);\n var ref = el.$ci;\n var numberValue = ref.numberValue;\n var currencyFormat = ref.currencyFormat;\n var options = ref.options;\n numberValue = toInteger(numberValue, options.valueAsInteger, currencyFormat.maximumFractionDigits);\n dispatchEvent(el, 'input', { numberValue: numberValue });\n};\nvar addEventListener = function (el) {\n el.addEventListener('input', function (e) {\n if (!e.detail) {\n var value = el.value;\n var selectionStart = el.selectionStart;\n var el_$ci = el.$ci;\n var currencyFormat = el_$ci.currencyFormat;\n var options = el_$ci.options;\n format(el, value);\n if (el.$ci.focus) {\n setCaretPosition(el, getCaretPositionAfterFormat(el.value, value, selectionStart, currencyFormat, options));\n }\n }\n }, { capture: true });\n el.addEventListener('format', function (e) {\n var ref = el.$ci;\n var currencyFormat = ref.currencyFormat;\n var options = ref.options;\n var numberValue = ref.numberValue;\n var value = toFloat(e.detail.value, options.valueAsInteger, currencyFormat.maximumFractionDigits);\n if (value !== numberValue) {\n applyFixedFractionFormat(el, value);\n }\n });\n el.addEventListener('focus', function () {\n el.$ci.oldValue = el.$ci.numberValue;\n el.$ci.focus = true;\n var ref = el.$ci.options.distractionFree;\n var hideCurrencySymbol = ref.hideCurrencySymbol;\n var hideGroupingSymbol = ref.hideGroupingSymbol;\n var hideNegligibleDecimalDigits = ref.hideNegligibleDecimalDigits;\n if (hideCurrencySymbol || hideGroupingSymbol || hideNegligibleDecimalDigits) {\n setTimeout(function () {\n var value = el.value;\n var selectionStart = el.selectionStart;\n var selectionEnd = el.selectionEnd;\n format(el, el.value, hideNegligibleDecimalDigits);\n if (Math.abs(selectionStart - selectionEnd) > 0) {\n el.setSelectionRange(0, el.value.length);\n } else {\n setCaretPosition(el, getDistractionFreeCaretPosition(el.$ci.currencyFormat, el.$ci.options, value, selectionStart));\n }\n });\n }\n });\n el.addEventListener('blur', function () {\n el.$ci.focus = false;\n applyFixedFractionFormat(el, el.$ci.numberValue, el.$ci.oldValue !== el.$ci.numberValue);\n });\n};\nvar directive = {\n bind: function bind (el, ref, ref$1) {\n var options = ref.value;\n var context = ref$1.context;\n var inputElement = init(el, options, context);\n Vue.nextTick(function () {\n var value = inputElement.value;\n var inputElement_$ci = inputElement.$ci;\n var currencyFormat = inputElement_$ci.currencyFormat;\n var options = inputElement_$ci.options;\n if (value) {\n applyFixedFractionFormat(inputElement, toFloat(parse(value, currencyFormat), options.valueAsInteger, currencyFormat.maximumFractionDigits));\n }\n });\n addEventListener(inputElement);\n },\n componentUpdated: function componentUpdated (el, ref, ref$1) {\n var value = ref.value;\n var oldValue = ref.oldValue;\n var context = ref$1.context;\n if (!equal(value, oldValue)) {\n var inputElement = init(el, value, context);\n applyFixedFractionFormat(inputElement, inputElement.$ci.numberValue, value.valueAsInteger !== oldValue.valueAsInteger);\n }\n }\n};\n\nvar component = {\n render: function render (h) {\n var this$1 = this;\n return h('input', {\n domProps: {\n value: this.formattedValue\n },\n directives: [{\n name: 'currency',\n value: this.options\n }],\n on: Object.assign({}, this.$listeners,\n {change: function (e) {\n if (e.detail) {\n this$1.$emit('change', e.detail.numberValue);\n }\n this$1.formattedValue = this$1.$el.value;\n },\n input: function (e) {\n if (e.detail && this$1.value !== e.detail.numberValue) {\n this$1.$emit('input', e.detail.numberValue);\n }\n this$1.formattedValue = this$1.$el.value;\n }})\n })\n },\n directives: {\n currency: directive\n },\n name: 'CurrencyInput',\n props: {\n value: {\n type: Number,\n default: null\n },\n locale: {\n type: String,\n default: undefined\n },\n currency: {\n type: [String, Object],\n default: undefined\n },\n distractionFree: {\n type: [Boolean, Object],\n default: undefined\n },\n precision: {\n type: [Number, Object],\n default: undefined\n },\n autoDecimalMode: {\n type: Boolean,\n default: undefined\n },\n valueAsInteger: {\n type: Boolean,\n default: undefined\n },\n valueRange: {\n type: Object,\n default: undefined\n },\n allowNegative: {\n type: Boolean,\n default: undefined\n }\n },\n data: function data () {\n return {\n formattedValue: null\n }\n },\n created: function created () {\n var ref = createCurrencyFormat(this.options);\n var minimumFractionDigits = ref.minimumFractionDigits;\n var maximumFractionDigits = ref.maximumFractionDigits;\n this.formattedValue = typeof this.value === 'number' ? this.value.toLocaleString(this.options.locale, { minimumFractionDigits: minimumFractionDigits, maximumFractionDigits: maximumFractionDigits }) : null;\n },\n computed: {\n options: function options () {\n var this$1 = this;\n var options = Object.assign({}, this.$CI_DEFAULT_OPTIONS || DEFAULT_OPTIONS);\n Object.keys(DEFAULT_OPTIONS).forEach(function (key) {\n if (this$1[key] !== undefined) {\n options[key] = this$1[key];\n }\n });\n return options\n }\n },\n watch: {\n value: 'setValue'\n },\n methods: {\n setValue: function setValue$1 (value) {\n setValue(this.$el, value);\n }\n }\n};\n\nvar plugin = {\n install: function install (Vue, ref) {\n if ( ref === void 0 ) ref = {};\n var componentName = ref.componentName; if ( componentName === void 0 ) componentName = component.name;\n var directiveName = ref.directiveName; if ( directiveName === void 0 ) directiveName = 'currency';\n var globalOptions = ref.globalOptions; if ( globalOptions === void 0 ) globalOptions = {};\n Vue.prototype.$CI_DEFAULT_OPTIONS = Object.assign({}, DEFAULT_OPTIONS, globalOptions);\n Vue.component(componentName, component);\n Vue.directive(directiveName, directive);\n Vue.prototype.$parseCurrency = function (str, options) {\n if ( options === void 0 ) options = {};\n return parseCurrency(str, Object.assign({}, globalOptions, options));\n };\n }\n};\n\nif (typeof window !== 'undefined' && window.Vue) {\n window.Vue.use(plugin);\n}\n\nexport default plugin;\nexport { directive as CurrencyDirective, component as CurrencyInput, parseCurrency, setValue };\n"],"names":["formatToParts","number","numberFormat","parts","types","p","digits","i","prefix","suffix","groupingSymbol","decimalSymbol","minusSymbol","createCurrencyFormat","ref","locale","currency","precision","autoDecimalMode","valueAsInteger","options","ref$1","negativePrefix","currencyFormat","minimumFractionDigits","maximumFractionDigits","toInteger","fractionDigits","toFloat","removeLeadingZeros","str","onlyDigits","normalizeDigits","count","search","endsWith","startsWith","insertCurrencySymbol","value","negative","hideCurrencySymbol","stripCurrencySymbol","normalizeMinusSymbol","isNegative","isNumber","digit","index","parse","numberParts","integer","fraction","dispatchEvent","el","eventName","data","event","DEFAULT_OPTIONS","parseCurrency","formattedValue","setValue","setCaretPosition","position","getCaretPositionAfterFormat","newValue","inputtedValue","caretPosition","decimalSymbolPosition","caretPositionFromLeft","getDistractionFreeCaretPosition","result","isValidInteger","isFractionIncomplete","checkIncompleteValue","previousConformedValue","getAutoDecimalModeConformedValue","allowNegative","conformedValue","conformToMask","incompleteValue","integerDigits","invalidFraction","invalidNegativeValue","equal","a","b","keys","key","init","optionsFromBinding","$CI_DEFAULT_OPTIONS","inputElement","distractionFree","validateValueRange","valueRange","min","max","applyFixedFractionFormat","forcedChange","format","updateInputValue","hideNegligibleDecimalDigits","focus","ref_options","isNegativeZero","numberValue","addEventListener","selectionStart","el_$ci","hideGroupingSymbol","selectionEnd","directive","context","Vue","inputElement_$ci","oldValue","component","h","this$1","e","plugin","componentName","directiveName","globalOptions"],"mappings":"0DAAA;AAAA;AAAA;AAA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