@leaflink/stash 50.0.4 → 50.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { ref as V, getCurrentInstance as C, version as R, computed as E, watch as x, defineComponent as $, useAttrs as A, openBlock as L, createBlock as T, mergeProps as G, withCtx as w, createVNode as k } from "vue";
1
+ import { ref as V, getCurrentInstance as R, version as C, computed as E, watch as x, defineComponent as $, useAttrs as A, openBlock as L, createBlock as T, mergeProps as G, withCtx as w, createVNode as k } from "vue";
2
2
  import W from "lodash-es/isEmpty";
3
3
  import z from "./Icon.js";
4
4
  import B from "./Input.js";
@@ -23,8 +23,8 @@ const D = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), N = (s) => s.replace(
23
23
  ], _ = "(0|[1-9]\\d*)";
24
24
  class X {
25
25
  constructor(i) {
26
- var t, e, n, d, u, c;
27
- const { currency: m, currencyDisplay: p, locale: r, precision: a, accountingSign: h, useGrouping: l } = i;
26
+ var t, e, n, d, a, c;
27
+ const { currency: m, currencyDisplay: p, locale: r, precision: u, accountingSign: h, useGrouping: l } = i;
28
28
  this.locale = r, this.options = {
29
29
  currency: m,
30
30
  useGrouping: l,
@@ -33,7 +33,7 @@ class X {
33
33
  currencyDisplay: p !== v.hidden ? p : void 0
34
34
  };
35
35
  const o = new Intl.NumberFormat(r, this.options), y = o.formatToParts(123456);
36
- this.currency = (t = y.find(({ type: g }) => g === "currency")) === null || t === void 0 ? void 0 : t.value, this.digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((g) => g.toLocaleString(r)), this.decimalSymbol = (e = y.find(({ type: g }) => g === "decimal")) === null || e === void 0 ? void 0 : e.value, this.groupingSymbol = (n = y.find(({ type: g }) => g === "group")) === null || n === void 0 ? void 0 : n.value, this.minusSign = (d = o.formatToParts(-1).find(({ type: g }) => g === "minusSign")) === null || d === void 0 ? void 0 : d.value, this.decimalSymbol === void 0 ? this.minimumFractionDigits = this.maximumFractionDigits = 0 : typeof a == "number" ? this.minimumFractionDigits = this.maximumFractionDigits = a : (this.minimumFractionDigits = (u = a == null ? void 0 : a.min) !== null && u !== void 0 ? u : o.resolvedOptions().minimumFractionDigits, this.maximumFractionDigits = (c = a == null ? void 0 : a.max) !== null && c !== void 0 ? c : o.resolvedOptions().maximumFractionDigits);
36
+ this.currency = (t = y.find(({ type: g }) => g === "currency")) === null || t === void 0 ? void 0 : t.value, this.digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((g) => g.toLocaleString(r)), this.decimalSymbol = (e = y.find(({ type: g }) => g === "decimal")) === null || e === void 0 ? void 0 : e.value, this.groupingSymbol = (n = y.find(({ type: g }) => g === "group")) === null || n === void 0 ? void 0 : n.value, this.minusSign = (d = o.formatToParts(-1).find(({ type: g }) => g === "minusSign")) === null || d === void 0 ? void 0 : d.value, this.decimalSymbol === void 0 ? this.minimumFractionDigits = this.maximumFractionDigits = 0 : typeof u == "number" ? this.minimumFractionDigits = this.maximumFractionDigits = u : (this.minimumFractionDigits = (a = u == null ? void 0 : u.min) !== null && a !== void 0 ? a : o.resolvedOptions().minimumFractionDigits, this.maximumFractionDigits = (c = u == null ? void 0 : u.max) !== null && c !== void 0 ? c : o.resolvedOptions().maximumFractionDigits);
37
37
  const S = (g) => j(g, this.digits[1]), f = (g) => g.substring(g.lastIndexOf(this.decimalSymbol ? this.digits[0] : this.digits[1]) + 1);
38
38
  this.prefix = S(o.format(1)), this.suffix = f(o.format(1)), this.negativePrefix = S(o.format(-1)), this.negativeSuffix = f(o.format(-1));
39
39
  }
@@ -116,15 +116,15 @@ class U extends P {
116
116
  }
117
117
  return null;
118
118
  };
119
- let u = i;
120
- u = this.currencyFormat.stripCurrency(u, e), u = this.currencyFormat.stripSignLiterals(u);
121
- const c = d(u);
119
+ let a = i;
120
+ a = this.currencyFormat.stripCurrency(a, e), a = this.currencyFormat.stripSignLiterals(a);
121
+ const c = d(a);
122
122
  if (c != null)
123
123
  return this.currencyFormat.insertCurrency(c, e);
124
- const [m, ...p] = u.split(this.currencyFormat.decimalSymbol), r = N(this.currencyFormat.onlyDigits(m)), a = this.currencyFormat.onlyDigits(p.join("")).substring(0, this.currencyFormat.maximumFractionDigits), h = p.length > 0 && a.length === 0, l = r === "" && e && (this.currencyFormat.minusSign === void 0 ? t === i.slice(0, -2) + this.currencyFormat.negativeSuffix : t === i.slice(0, -1));
124
+ const [m, ...p] = a.split(this.currencyFormat.decimalSymbol), r = N(this.currencyFormat.onlyDigits(m)), u = this.currencyFormat.onlyDigits(p.join("")).substring(0, this.currencyFormat.maximumFractionDigits), h = p.length > 0 && u.length === 0, l = r === "" && e && (this.currencyFormat.minusSign === void 0 ? t === i.slice(0, -2) + this.currencyFormat.negativeSuffix : t === i.slice(0, -1));
125
125
  return h || l || n(r) ? t : r.match(/\d+/) ? {
126
- numberValue: +`${e ? "-" : ""}${r}.${a}`,
127
- fractionDigits: a
126
+ numberValue: +`${e ? "-" : ""}${r}.${u}`,
127
+ fractionDigits: u
128
128
  } : "";
129
129
  }
130
130
  }
@@ -204,9 +204,9 @@ class Z {
204
204
  const e = this.numberMask.conformToMask(i, this.formattedValue);
205
205
  let n;
206
206
  if (typeof e == "object") {
207
- const { numberValue: d, fractionDigits: u } = e;
207
+ const { numberValue: d, fractionDigits: a } = e;
208
208
  let { maximumFractionDigits: c, minimumFractionDigits: m } = this.currencyFormat;
209
- this.focus ? m = t ? u.replace(/0+$/, "").length : Math.min(c, u.length) : Number.isInteger(d) && !this.options.autoDecimalDigits && (this.options.precision === void 0 || m === 0) && (m = c = 0), n = this.toInteger(Math.abs(d)) > Number.MAX_SAFE_INTEGER ? this.formattedValue : this.currencyFormat.format(d, {
209
+ this.focus ? m = t ? a.replace(/0+$/, "").length : Math.min(c, a.length) : Number.isInteger(d) && !this.options.autoDecimalDigits && (this.options.precision === void 0 || m === 0) && (m = c = 0), n = this.toInteger(Math.abs(d)) > Number.MAX_SAFE_INTEGER ? this.formattedValue : this.currencyFormat.format(d, {
210
210
  useGrouping: this.options.useGrouping !== !1 && !(this.focus && this.options.hideGroupingSeparatorOnFocus),
211
211
  minimumFractionDigits: m,
212
212
  maximumFractionDigits: c
@@ -223,22 +223,22 @@ class Z {
223
223
  const { value: t, selectionStart: e } = this.el, n = i;
224
224
  if (e && n.data && M.includes(n.data) && (this.decimalSymbolInsertedAt = e - 1), this.format(t), this.focus && e != null) {
225
225
  const d = () => {
226
- const { prefix: u, suffix: c, decimalSymbol: m, maximumFractionDigits: p, groupingSymbol: r } = this.currencyFormat;
227
- let a = t.length - e;
226
+ const { prefix: a, suffix: c, decimalSymbol: m, maximumFractionDigits: p, groupingSymbol: r } = this.currencyFormat;
227
+ let u = t.length - e;
228
228
  const h = this.formattedValue.length;
229
229
  if (this.currencyFormat.minusSign === void 0 && (t.startsWith("(") || t.startsWith("-")) && !t.endsWith(")"))
230
230
  return h - this.currencyFormat.negativeSuffix.length > 1 ? this.formattedValue.substring(e).length : 1;
231
231
  if (this.formattedValue.substring(e, 1) === r && O(this.formattedValue, r) === O(t, r) + 1)
232
- return h - a - 1;
233
- if (h < a)
232
+ return h - u - 1;
233
+ if (h < u)
234
234
  return e;
235
235
  if (m !== void 0 && t.indexOf(m) !== -1) {
236
236
  const l = t.indexOf(m) + 1;
237
237
  if (Math.abs(h - t.length) > 1 && e <= l)
238
238
  return this.formattedValue.indexOf(m) + 1;
239
- !this.options.autoDecimalDigits && e > l && this.currencyFormat.onlyDigits(t.substring(l)).length - 1 === p && (a -= 1);
239
+ !this.options.autoDecimalDigits && e > l && this.currencyFormat.onlyDigits(t.substring(l)).length - 1 === p && (u -= 1);
240
240
  }
241
- return this.options.hideCurrencySymbolOnFocus || this.options.currencyDisplay === v.hidden ? h - a : Math.max(h - Math.max(a, c.length), u.length);
241
+ return this.options.hideCurrencySymbolOnFocus || this.options.currencyDisplay === v.hidden ? h - u : Math.max(h - Math.max(u, c.length), a.length);
242
242
  };
243
243
  this.setCaretPosition(d());
244
244
  }
@@ -259,7 +259,7 @@ class Z {
259
259
  getCaretPositionOnFocus(i, t) {
260
260
  if (this.numberValue == null)
261
261
  return t;
262
- const { prefix: e, negativePrefix: n, suffix: d, negativeSuffix: u, groupingSymbol: c, currency: m } = this.currencyFormat, p = this.numberValue < 0, r = p ? n : e, a = r.length;
262
+ const { prefix: e, negativePrefix: n, suffix: d, negativeSuffix: a, groupingSymbol: c, currency: m } = this.currencyFormat, p = this.numberValue < 0, r = p ? n : e, u = r.length;
263
263
  if (this.options.hideCurrencySymbolOnFocus || this.options.currencyDisplay === v.hidden) {
264
264
  if (p) {
265
265
  if (t <= 1)
@@ -268,14 +268,14 @@ class Z {
268
268
  return this.formattedValue.length - 1;
269
269
  }
270
270
  } else {
271
- const l = p ? u.length : d.length;
271
+ const l = p ? a.length : d.length;
272
272
  if (t >= i.length - l)
273
273
  return this.formattedValue.length - l;
274
- if (t < a)
275
- return a;
274
+ if (t < u)
275
+ return u;
276
276
  }
277
277
  let h = t;
278
- return this.options.hideCurrencySymbolOnFocus && this.options.currencyDisplay !== v.hidden && t >= a && m !== void 0 && r.includes(m) && (h -= a, p && (h += 1)), this.options.hideGroupingSeparatorOnFocus && c !== void 0 && (h -= O(i.substring(0, t), c)), h;
278
+ return this.options.hideCurrencySymbolOnFocus && this.options.currencyDisplay !== v.hidden && t >= u && m !== void 0 && r.includes(m) && (h -= u, p && (h += 1)), this.options.hideGroupingSeparatorOnFocus && c !== void 0 && (h -= O(i.substring(0, t), c)), h;
279
279
  }
280
280
  setCaretPosition(i, t = i) {
281
281
  this.el.setSelectionRange(i, t);
@@ -284,29 +284,29 @@ class Z {
284
284
  const H = (s) => s != null && s.matches("input") ? s : s == null ? void 0 : s.querySelector("input");
285
285
  function J(s, i) {
286
286
  var t, e, n, d;
287
- let u;
288
- const c = V(null), m = V(null), p = V(null), r = C(), a = (r == null ? void 0 : r.emit) || ((e = (t = r == null ? void 0 : r.proxy) === null || t === void 0 ? void 0 : t.$emit) === null || e === void 0 ? void 0 : e.bind(r == null ? void 0 : r.proxy)), h = (r == null ? void 0 : r.props) || ((n = r == null ? void 0 : r.proxy) === null || n === void 0 ? void 0 : n.$props), l = R.startsWith("3"), o = l && ((d = r == null ? void 0 : r.attrs.modelModifiers) === null || d === void 0 ? void 0 : d.lazy), y = E(() => h == null ? void 0 : h[l ? "modelValue" : "value"]), S = l ? "update:modelValue" : "input";
287
+ let a;
288
+ const c = V(null), m = V(null), p = V(null), r = R(), u = (r == null ? void 0 : r.emit) || ((e = (t = r == null ? void 0 : r.proxy) === null || t === void 0 ? void 0 : t.$emit) === null || e === void 0 ? void 0 : e.bind(r == null ? void 0 : r.proxy)), h = (r == null ? void 0 : r.props) || ((n = r == null ? void 0 : r.proxy) === null || n === void 0 ? void 0 : n.$props), l = C.startsWith("3"), o = l && ((d = r == null ? void 0 : r.attrs.modelModifiers) === null || d === void 0 ? void 0 : d.lazy), y = E(() => h == null ? void 0 : h[l ? "modelValue" : "value"]), S = l ? "update:modelValue" : "input";
289
289
  return x(c, (f) => {
290
290
  var g;
291
291
  if (f) {
292
292
  const I = H((g = f == null ? void 0 : f.$el) !== null && g !== void 0 ? g : f);
293
- I ? (u = new Z({
293
+ I ? (a = new Z({
294
294
  el: I,
295
295
  options: s,
296
296
  onInput: (b) => {
297
- !o && i !== !1 && y.value !== b.number && (a == null || a(S, b.number)), p.value = b.number, m.value = b.formatted;
297
+ !o && i !== !1 && y.value !== b.number && (u == null || u(S, b.number)), p.value = b.number, m.value = b.formatted;
298
298
  },
299
299
  onChange: (b) => {
300
300
  }
301
- }), u.setValue(y.value)) : console.error('No input element found. Please make sure that the "inputRef" template ref is properly assigned.');
301
+ }), a.setValue(y.value)) : console.error('No input element found. Please make sure that the "inputRef" template ref is properly assigned.');
302
302
  } else
303
- u = null;
303
+ a = null;
304
304
  }), {
305
305
  inputRef: c,
306
306
  numberValue: p,
307
307
  formattedValue: m,
308
- setValue: (f) => u == null ? void 0 : u.setValue(f),
309
- setOptions: (f) => u == null ? void 0 : u.setOptions(f)
308
+ setValue: (f) => a == null ? void 0 : a.setValue(f),
309
+ setOptions: (f) => a == null ? void 0 : a.setOptions(f)
310
310
  };
311
311
  }
312
312
  const ei = /* @__PURE__ */ $({
@@ -323,7 +323,8 @@ const ei = /* @__PURE__ */ $({
323
323
  autocomplete: {},
324
324
  value: {},
325
325
  placeholder: {},
326
- disabled: { type: Boolean }
326
+ disabled: { type: Boolean },
327
+ isReadOnly: { type: Boolean }
327
328
  },
328
329
  emits: ["update:model-value"],
329
330
  setup(s, { expose: i, emit: t }) {
@@ -337,12 +338,12 @@ const ei = /* @__PURE__ */ $({
337
338
  autoDecimalDigits: !0,
338
339
  useGrouping: !0,
339
340
  accountingSign: !1
340
- }, n = s, d = t, u = A(), c = E(() => ({
341
+ }, n = s, d = t, a = A(), c = E(() => ({
341
342
  ...e,
342
343
  ...W(n.inputOptions) ? {} : n.inputOptions
343
- })), { inputRef: m, setOptions: p, setValue: r, numberValue: a } = J(c.value, !1);
344
+ })), { inputRef: m, setOptions: p, setValue: r, numberValue: u } = J(c.value, !1);
344
345
  i({ inputEl: m }), x(
345
- () => a.value,
346
+ () => u.value,
346
347
  (l) => {
347
348
  var y;
348
349
  let o;
@@ -362,7 +363,7 @@ const ei = /* @__PURE__ */ $({
362
363
  );
363
364
  const h = E(() => {
364
365
  const { inputOptions: l, ...o } = n;
365
- return { ...o, ...u };
366
+ return { ...o, ...a };
366
367
  });
367
368
  return (l, o) => (L(), T(B, G(h.value, {
368
369
  ref_key: "inputEl",
@@ -1 +1 @@
1
- {"version":3,"file":"CurrencyInput.js","sources":["../node_modules/vue-currency-input/dist/index.mjs","../src/components/CurrencyInput/CurrencyInput.vue"],"sourcesContent":["/**\n * Vue Currency Input 3.1.0\n * (c) 2018-2024 Matthias Stiller\n * @license MIT\n */\nimport { ref, getCurrentInstance, version, computed, watch } from 'vue';\n\nvar CurrencyDisplay;\n(function (CurrencyDisplay) {\n CurrencyDisplay[\"symbol\"] = \"symbol\";\n CurrencyDisplay[\"narrowSymbol\"] = \"narrowSymbol\";\n CurrencyDisplay[\"code\"] = \"code\";\n CurrencyDisplay[\"name\"] = \"name\";\n CurrencyDisplay[\"hidden\"] = \"hidden\";\n})(CurrencyDisplay || (CurrencyDisplay = {}));\nvar ValueScaling;\n(function (ValueScaling) {\n ValueScaling[\"precision\"] = \"precision\";\n ValueScaling[\"thousands\"] = \"thousands\";\n ValueScaling[\"millions\"] = \"millions\";\n ValueScaling[\"billions\"] = \"billions\";\n})(ValueScaling || (ValueScaling = {}));\n\nconst escapeRegExp = (str) => {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n};\nconst removeLeadingZeros = (str) => {\n return str.replace(/^0+(0$|[^0])/, '$1');\n};\nconst count = (str, search) => {\n return (str.match(new RegExp(escapeRegExp(search), 'g')) || []).length;\n};\nconst substringBefore = (str, search) => {\n return str.substring(0, str.indexOf(search));\n};\n\nconst DECIMAL_SEPARATORS = [\n ',',\n '.',\n '٫',\n '。'\n];\nconst INTEGER_PATTERN = '(0|[1-9]\\\\d*)';\nclass CurrencyFormat {\n constructor(options) {\n var _a, _b, _c, _d, _e, _f;\n const { currency, currencyDisplay, locale, precision, accountingSign, useGrouping } = options;\n this.locale = locale;\n this.options = {\n currency,\n useGrouping,\n style: 'currency',\n currencySign: accountingSign ? 'accounting' : undefined,\n currencyDisplay: currencyDisplay !== CurrencyDisplay.hidden ? currencyDisplay : undefined\n };\n const numberFormat = new Intl.NumberFormat(locale, this.options);\n const formatParts = numberFormat.formatToParts(123456);\n this.currency = (_a = formatParts.find(({ type }) => type === 'currency')) === null || _a === void 0 ? void 0 : _a.value;\n this.digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((i) => i.toLocaleString(locale));\n this.decimalSymbol = (_b = formatParts.find(({ type }) => type === 'decimal')) === null || _b === void 0 ? void 0 : _b.value;\n this.groupingSymbol = (_c = formatParts.find(({ type }) => type === 'group')) === null || _c === void 0 ? void 0 : _c.value;\n this.minusSign = (_d = numberFormat.formatToParts(-1).find(({ type }) => type === 'minusSign')) === null || _d === void 0 ? void 0 : _d.value;\n if (this.decimalSymbol === undefined) {\n this.minimumFractionDigits = this.maximumFractionDigits = 0;\n }\n else if (typeof precision === 'number') {\n this.minimumFractionDigits = this.maximumFractionDigits = precision;\n }\n else {\n this.minimumFractionDigits = (_e = precision === null || precision === void 0 ? void 0 : precision.min) !== null && _e !== void 0 ? _e : numberFormat.resolvedOptions().minimumFractionDigits;\n this.maximumFractionDigits = (_f = precision === null || precision === void 0 ? void 0 : precision.max) !== null && _f !== void 0 ? _f : numberFormat.resolvedOptions().maximumFractionDigits;\n }\n const getPrefix = (str) => {\n return substringBefore(str, this.digits[1]);\n };\n const getSuffix = (str) => {\n return str.substring(str.lastIndexOf(this.decimalSymbol ? this.digits[0] : this.digits[1]) + 1);\n };\n this.prefix = getPrefix(numberFormat.format(1));\n this.suffix = getSuffix(numberFormat.format(1));\n this.negativePrefix = getPrefix(numberFormat.format(-1));\n this.negativeSuffix = getSuffix(numberFormat.format(-1));\n }\n parse(str) {\n if (str) {\n const negative = this.isNegative(str);\n str = this.normalizeDigits(str);\n str = this.stripCurrency(str, negative);\n str = this.stripSignLiterals(str);\n const fraction = this.decimalSymbol ? `(?:${escapeRegExp(this.decimalSymbol)}(\\\\d*))?` : '';\n const match = this.stripGroupingSeparator(str).match(new RegExp(`^${INTEGER_PATTERN}${fraction}$`));\n if (match && this.isValidIntegerFormat(this.decimalSymbol ? str.split(this.decimalSymbol)[0] : str, Number(match[1]))) {\n return Number(`${negative ? '-' : ''}${this.onlyDigits(match[1])}.${this.onlyDigits(match[2] || '')}`);\n }\n }\n return null;\n }\n isValidIntegerFormat(formattedNumber, integerNumber) {\n const options = { ...this.options, minimumFractionDigits: 0 };\n return [\n this.stripCurrency(this.normalizeDigits(integerNumber.toLocaleString(this.locale, { ...options, useGrouping: true })), false),\n this.stripCurrency(this.normalizeDigits(integerNumber.toLocaleString(this.locale, { ...options, useGrouping: false })), false)\n ].includes(formattedNumber);\n }\n format(value, options = {\n minimumFractionDigits: this.minimumFractionDigits,\n maximumFractionDigits: this.maximumFractionDigits\n }) {\n return value != null ? value.toLocaleString(this.locale, { ...this.options, ...options }) : '';\n }\n toFraction(str) {\n return `${this.digits[0]}${this.decimalSymbol}${this.onlyLocaleDigits(str.substring(1)).substring(0, this.maximumFractionDigits)}`;\n }\n isFractionIncomplete(str) {\n return !!this.normalizeDigits(this.stripGroupingSeparator(str)).match(new RegExp(`^${INTEGER_PATTERN}${escapeRegExp(this.decimalSymbol)}$`));\n }\n isNegative(str) {\n return (str.startsWith(this.negativePrefix) ||\n (this.minusSign === undefined && (str.startsWith('(') || str.startsWith('-'))) ||\n (this.minusSign !== undefined && str.replace('-', this.minusSign).startsWith(this.minusSign)));\n }\n insertCurrency(str, negative) {\n return `${negative ? this.negativePrefix : this.prefix}${str}${negative ? this.negativeSuffix : this.suffix}`;\n }\n stripGroupingSeparator(str) {\n return this.groupingSymbol !== undefined ? str.replace(new RegExp(escapeRegExp(this.groupingSymbol), 'g'), '') : str;\n }\n stripSignLiterals(str) {\n if (this.minusSign !== undefined) {\n return str.replace('-', this.minusSign).replace(this.minusSign, '');\n }\n else {\n return str.replace(/[-()]/g, '');\n }\n }\n stripCurrency(str, negative) {\n return str.replace(negative ? this.negativePrefix : this.prefix, '').replace(negative ? this.negativeSuffix : this.suffix, '');\n }\n normalizeDecimalSeparator(str, from) {\n DECIMAL_SEPARATORS.forEach((s) => {\n str = str.substring(0, from) + str.substring(from).replace(s, this.decimalSymbol);\n });\n return str;\n }\n normalizeDigits(str) {\n if (this.digits[0] !== '0') {\n this.digits.forEach((digit, index) => {\n str = str.replace(new RegExp(digit, 'g'), String(index));\n });\n }\n return str;\n }\n onlyDigits(str) {\n return this.normalizeDigits(str).replace(/\\D+/g, '');\n }\n onlyLocaleDigits(str) {\n return str.replace(new RegExp(`[^${this.digits.join('')}]*`, 'g'), '');\n }\n}\n\nclass AbstractInputMask {\n constructor(currencyFormat) {\n this.currencyFormat = currencyFormat;\n }\n}\nclass DefaultInputMask extends AbstractInputMask {\n conformToMask(str, previousConformedValue = '') {\n const negative = this.currencyFormat.isNegative(str);\n const isEmptyNegativeValue = (str) => str === '' &&\n negative &&\n !(this.currencyFormat.minusSign === undefined\n ? previousConformedValue === this.currencyFormat.negativePrefix + this.currencyFormat.negativeSuffix\n : previousConformedValue === this.currencyFormat.negativePrefix);\n const checkIncompleteValue = (str) => {\n if (isEmptyNegativeValue(str)) {\n return '';\n }\n else if (this.currencyFormat.maximumFractionDigits > 0) {\n if (this.currencyFormat.isFractionIncomplete(str)) {\n return str;\n }\n else if (str.startsWith(this.currencyFormat.decimalSymbol)) {\n return this.currencyFormat.toFraction(str);\n }\n }\n return null;\n };\n let value = str;\n value = this.currencyFormat.stripCurrency(value, negative);\n value = this.currencyFormat.stripSignLiterals(value);\n const incompleteValue = checkIncompleteValue(value);\n if (incompleteValue != null) {\n return this.currencyFormat.insertCurrency(incompleteValue, negative);\n }\n const [integer, ...fraction] = value.split(this.currencyFormat.decimalSymbol);\n const integerDigits = removeLeadingZeros(this.currencyFormat.onlyDigits(integer));\n const fractionDigits = this.currencyFormat.onlyDigits(fraction.join('')).substring(0, this.currencyFormat.maximumFractionDigits);\n const invalidFraction = fraction.length > 0 && fractionDigits.length === 0;\n const invalidNegativeValue = integerDigits === '' &&\n negative &&\n (this.currencyFormat.minusSign === undefined\n ? previousConformedValue === str.slice(0, -2) + this.currencyFormat.negativeSuffix\n : previousConformedValue === str.slice(0, -1));\n if (invalidFraction || invalidNegativeValue || isEmptyNegativeValue(integerDigits)) {\n return previousConformedValue;\n }\n else if (integerDigits.match(/\\d+/)) {\n return {\n numberValue: Number(`${negative ? '-' : ''}${integerDigits}.${fractionDigits}`),\n fractionDigits\n };\n }\n else {\n return '';\n }\n }\n}\nclass AutoDecimalDigitsInputMask extends AbstractInputMask {\n conformToMask(str, previousConformedValue = '') {\n if (str === '' ||\n (this.currencyFormat.parse(previousConformedValue) === 0 &&\n this.currencyFormat.stripCurrency(previousConformedValue, true).slice(0, -1) === this.currencyFormat.stripCurrency(str, true))) {\n return '';\n }\n const negative = this.currencyFormat.isNegative(str);\n const numberValue = this.currencyFormat.stripSignLiterals(str) === ''\n ? -0\n : Number(`${negative ? '-' : ''}${removeLeadingZeros(this.currencyFormat.onlyDigits(str))}`) / Math.pow(10, this.currencyFormat.maximumFractionDigits);\n return {\n numberValue,\n fractionDigits: numberValue.toFixed(this.currencyFormat.maximumFractionDigits).slice(-this.currencyFormat.maximumFractionDigits)\n };\n }\n}\n\nconst DEFAULT_OPTIONS = {\n locale: undefined,\n currency: undefined,\n currencyDisplay: undefined,\n hideGroupingSeparatorOnFocus: true,\n hideCurrencySymbolOnFocus: true,\n hideNegligibleDecimalDigitsOnFocus: true,\n precision: undefined,\n autoDecimalDigits: false,\n valueRange: undefined,\n useGrouping: undefined,\n valueScaling: undefined\n};\nclass CurrencyInput {\n constructor(args) {\n this.el = args.el;\n this.onInput = args.onInput;\n this.onChange = args.onChange;\n this.addEventListener();\n this.init(args.options);\n }\n setOptions(options) {\n this.init(options);\n this.format(this.currencyFormat.format(this.validateValueRange(this.numberValue)));\n this.onChange(this.getValue());\n }\n getValue() {\n const numberValue = this.valueScaling && this.numberValue != null ? this.toInteger(this.numberValue, this.valueScaling) : this.numberValue;\n return { number: numberValue, formatted: this.formattedValue };\n }\n setValue(value) {\n const newValue = this.valueScaling !== undefined && value != null ? this.toFloat(value, this.valueScaling) : value;\n if (newValue !== this.numberValue) {\n this.format(this.currencyFormat.format(this.validateValueRange(newValue)));\n this.onChange(this.getValue());\n }\n }\n init(options) {\n this.options = {\n ...DEFAULT_OPTIONS,\n ...options\n };\n if (this.options.autoDecimalDigits) {\n this.options.hideNegligibleDecimalDigitsOnFocus = false;\n }\n if (!this.el.getAttribute('inputmode')) {\n this.el.setAttribute('inputmode', this.options.autoDecimalDigits ? 'numeric' : 'decimal');\n }\n this.currencyFormat = new CurrencyFormat(this.options);\n this.numberMask = this.options.autoDecimalDigits ? new AutoDecimalDigitsInputMask(this.currencyFormat) : new DefaultInputMask(this.currencyFormat);\n const valueScalingOptions = {\n [ValueScaling.precision]: this.currencyFormat.maximumFractionDigits,\n [ValueScaling.thousands]: 3,\n [ValueScaling.millions]: 6,\n [ValueScaling.billions]: 9\n };\n this.valueScaling = this.options.valueScaling ? valueScalingOptions[this.options.valueScaling] : undefined;\n this.valueScalingFractionDigits =\n this.valueScaling !== undefined && this.options.valueScaling !== ValueScaling.precision\n ? this.valueScaling + this.currencyFormat.maximumFractionDigits\n : this.currencyFormat.maximumFractionDigits;\n this.minValue = this.getMinValue();\n this.maxValue = this.getMaxValue();\n }\n getMinValue() {\n var _a, _b;\n let min = this.toFloat(-Number.MAX_SAFE_INTEGER);\n if (((_a = this.options.valueRange) === null || _a === void 0 ? void 0 : _a.min) !== undefined) {\n min = Math.max((_b = this.options.valueRange) === null || _b === void 0 ? void 0 : _b.min, this.toFloat(-Number.MAX_SAFE_INTEGER));\n }\n return min;\n }\n getMaxValue() {\n var _a, _b;\n let max = this.toFloat(Number.MAX_SAFE_INTEGER);\n if (((_a = this.options.valueRange) === null || _a === void 0 ? void 0 : _a.max) !== undefined) {\n max = Math.min((_b = this.options.valueRange) === null || _b === void 0 ? void 0 : _b.max, this.toFloat(Number.MAX_SAFE_INTEGER));\n }\n return max;\n }\n toFloat(value, maxFractionDigits) {\n return value / Math.pow(10, maxFractionDigits !== null && maxFractionDigits !== void 0 ? maxFractionDigits : this.valueScalingFractionDigits);\n }\n toInteger(value, maxFractionDigits) {\n return Number(value\n .toFixed(maxFractionDigits !== null && maxFractionDigits !== void 0 ? maxFractionDigits : this.valueScalingFractionDigits)\n .split('.')\n .join(''));\n }\n validateValueRange(value) {\n return value != null ? Math.min(Math.max(value, this.minValue), this.maxValue) : value;\n }\n format(value, hideNegligibleDecimalDigits = false) {\n if (value != null) {\n if (this.decimalSymbolInsertedAt !== undefined) {\n value = this.currencyFormat.normalizeDecimalSeparator(value, this.decimalSymbolInsertedAt);\n this.decimalSymbolInsertedAt = undefined;\n }\n const conformedValue = this.numberMask.conformToMask(value, this.formattedValue);\n let formattedValue;\n if (typeof conformedValue === 'object') {\n const { numberValue, fractionDigits } = conformedValue;\n let { maximumFractionDigits, minimumFractionDigits } = this.currencyFormat;\n if (this.focus) {\n minimumFractionDigits = hideNegligibleDecimalDigits\n ? fractionDigits.replace(/0+$/, '').length\n : Math.min(maximumFractionDigits, fractionDigits.length);\n }\n else if (Number.isInteger(numberValue) && !this.options.autoDecimalDigits && (this.options.precision === undefined || minimumFractionDigits === 0)) {\n minimumFractionDigits = maximumFractionDigits = 0;\n }\n formattedValue =\n this.toInteger(Math.abs(numberValue)) > Number.MAX_SAFE_INTEGER\n ? this.formattedValue\n : this.currencyFormat.format(numberValue, {\n useGrouping: this.options.useGrouping !== false && !(this.focus && this.options.hideGroupingSeparatorOnFocus),\n minimumFractionDigits,\n maximumFractionDigits\n });\n }\n else {\n formattedValue = conformedValue;\n }\n if (this.maxValue <= 0 && !this.currencyFormat.isNegative(formattedValue) && this.currencyFormat.parse(formattedValue) !== 0) {\n formattedValue = formattedValue.replace(this.currencyFormat.prefix, this.currencyFormat.negativePrefix);\n }\n if (this.minValue >= 0) {\n formattedValue = formattedValue.replace(this.currencyFormat.negativePrefix, this.currencyFormat.prefix);\n }\n if (this.options.currencyDisplay === CurrencyDisplay.hidden || (this.focus && this.options.hideCurrencySymbolOnFocus)) {\n formattedValue = formattedValue\n .replace(this.currencyFormat.negativePrefix, this.currencyFormat.minusSign !== undefined ? this.currencyFormat.minusSign : '(')\n .replace(this.currencyFormat.negativeSuffix, this.currencyFormat.minusSign !== undefined ? '' : ')')\n .replace(this.currencyFormat.prefix, '')\n .replace(this.currencyFormat.suffix, '');\n }\n this.el.value = formattedValue;\n this.numberValue = this.currencyFormat.parse(formattedValue);\n }\n else {\n this.el.value = '';\n this.numberValue = null;\n }\n this.formattedValue = this.el.value;\n this.onInput(this.getValue());\n }\n addEventListener() {\n this.el.addEventListener('input', (e) => {\n const { value, selectionStart } = this.el;\n const inputEvent = e;\n if (selectionStart && inputEvent.data && DECIMAL_SEPARATORS.includes(inputEvent.data)) {\n this.decimalSymbolInsertedAt = selectionStart - 1;\n }\n this.format(value);\n if (this.focus && selectionStart != null) {\n const getCaretPositionAfterFormat = () => {\n const { prefix, suffix, decimalSymbol, maximumFractionDigits, groupingSymbol } = this.currencyFormat;\n let caretPositionFromLeft = value.length - selectionStart;\n const newValueLength = this.formattedValue.length;\n if (this.currencyFormat.minusSign === undefined && (value.startsWith('(') || value.startsWith('-')) && !value.endsWith(')')) {\n return newValueLength - this.currencyFormat.negativeSuffix.length > 1 ? this.formattedValue.substring(selectionStart).length : 1;\n }\n if (this.formattedValue.substring(selectionStart, 1) === groupingSymbol &&\n count(this.formattedValue, groupingSymbol) === count(value, groupingSymbol) + 1) {\n return newValueLength - caretPositionFromLeft - 1;\n }\n if (newValueLength < caretPositionFromLeft) {\n return selectionStart;\n }\n if (decimalSymbol !== undefined && value.indexOf(decimalSymbol) !== -1) {\n const decimalSymbolPosition = value.indexOf(decimalSymbol) + 1;\n if (Math.abs(newValueLength - value.length) > 1 && selectionStart <= decimalSymbolPosition) {\n return this.formattedValue.indexOf(decimalSymbol) + 1;\n }\n else {\n if (!this.options.autoDecimalDigits && selectionStart > decimalSymbolPosition) {\n if (this.currencyFormat.onlyDigits(value.substring(decimalSymbolPosition)).length - 1 === maximumFractionDigits) {\n caretPositionFromLeft -= 1;\n }\n }\n }\n }\n return this.options.hideCurrencySymbolOnFocus || this.options.currencyDisplay === CurrencyDisplay.hidden\n ? newValueLength - caretPositionFromLeft\n : Math.max(newValueLength - Math.max(caretPositionFromLeft, suffix.length), prefix.length);\n };\n this.setCaretPosition(getCaretPositionAfterFormat());\n }\n });\n this.el.addEventListener('focus', () => {\n this.focus = true;\n this.numberValueOnFocus = this.numberValue;\n setTimeout(() => {\n const { value, selectionStart, selectionEnd } = this.el;\n this.format(value, this.options.hideNegligibleDecimalDigitsOnFocus);\n if (selectionStart != null && selectionEnd != null && Math.abs(selectionStart - selectionEnd) > 0) {\n this.setCaretPosition(0, this.el.value.length);\n }\n else if (selectionStart != null) {\n const caretPositionOnFocus = this.getCaretPositionOnFocus(value, selectionStart);\n this.setCaretPosition(caretPositionOnFocus);\n }\n });\n });\n this.el.addEventListener('blur', () => {\n this.focus = false;\n this.format(this.currencyFormat.format(this.validateValueRange(this.numberValue)));\n if (this.numberValueOnFocus !== this.numberValue) {\n this.onChange(this.getValue());\n }\n });\n }\n getCaretPositionOnFocus(value, selectionStart) {\n if (this.numberValue == null) {\n return selectionStart;\n }\n const { prefix, negativePrefix, suffix, negativeSuffix, groupingSymbol, currency } = this.currencyFormat;\n const isNegative = this.numberValue < 0;\n const currentPrefix = isNegative ? negativePrefix : prefix;\n const prefixLength = currentPrefix.length;\n if (this.options.hideCurrencySymbolOnFocus || this.options.currencyDisplay === CurrencyDisplay.hidden) {\n if (isNegative) {\n if (selectionStart <= 1) {\n return 1;\n }\n else if (value.endsWith(')') && selectionStart > value.indexOf(')')) {\n return this.formattedValue.length - 1;\n }\n }\n }\n else {\n const suffixLength = isNegative ? negativeSuffix.length : suffix.length;\n if (selectionStart >= value.length - suffixLength) {\n return this.formattedValue.length - suffixLength;\n }\n else if (selectionStart < prefixLength) {\n return prefixLength;\n }\n }\n let result = selectionStart;\n if (this.options.hideCurrencySymbolOnFocus &&\n this.options.currencyDisplay !== CurrencyDisplay.hidden &&\n selectionStart >= prefixLength &&\n currency !== undefined &&\n currentPrefix.includes(currency)) {\n result -= prefixLength;\n if (isNegative) {\n result += 1;\n }\n }\n if (this.options.hideGroupingSeparatorOnFocus && groupingSymbol !== undefined) {\n result -= count(value.substring(0, selectionStart), groupingSymbol);\n }\n return result;\n }\n setCaretPosition(start, end = start) {\n this.el.setSelectionRange(start, end);\n }\n}\n\nconst findInput = (el) => ((el === null || el === void 0 ? void 0 : el.matches('input')) ? el : el === null || el === void 0 ? void 0 : el.querySelector('input'));\nfunction useCurrencyInput(options, autoEmit) {\n var _a, _b, _c, _d;\n let currencyInput;\n const inputRef = ref(null);\n const formattedValue = ref(null);\n const numberValue = ref(null);\n const vm = getCurrentInstance();\n const emit = (vm === null || vm === void 0 ? void 0 : vm.emit) || ((_b = (_a = vm === null || vm === void 0 ? void 0 : vm.proxy) === null || _a === void 0 ? void 0 : _a.$emit) === null || _b === void 0 ? void 0 : _b.bind(vm === null || vm === void 0 ? void 0 : vm.proxy));\n const props = ((vm === null || vm === void 0 ? void 0 : vm.props) || ((_c = vm === null || vm === void 0 ? void 0 : vm.proxy) === null || _c === void 0 ? void 0 : _c.$props));\n const isVue3 = version.startsWith('3');\n const lazyModel = isVue3 && ((_d = vm === null || vm === void 0 ? void 0 : vm.attrs.modelModifiers) === null || _d === void 0 ? void 0 : _d.lazy);\n const modelValue = computed(() => props === null || props === void 0 ? void 0 : props[isVue3 ? 'modelValue' : 'value']);\n const inputEvent = isVue3 ? 'update:modelValue' : 'input';\n const changeEvent = lazyModel ? 'update:modelValue' : 'change';\n watch(inputRef, (value) => {\n var _a;\n if (value) {\n const el = findInput((_a = value === null || value === void 0 ? void 0 : value.$el) !== null && _a !== void 0 ? _a : value);\n if (el) {\n currencyInput = new CurrencyInput({\n el,\n options,\n onInput: (value) => {\n if (!lazyModel && autoEmit !== false && modelValue.value !== value.number) {\n emit === null || emit === void 0 ? void 0 : emit(inputEvent, value.number);\n }\n numberValue.value = value.number;\n formattedValue.value = value.formatted;\n },\n onChange: (value) => {\n if (autoEmit !== false) {\n emit === null || emit === void 0 ? void 0 : emit(changeEvent, value.number);\n }\n }\n });\n currencyInput.setValue(modelValue.value);\n }\n else {\n console.error('No input element found. Please make sure that the \"inputRef\" template ref is properly assigned.');\n }\n }\n else {\n currencyInput = null;\n }\n });\n return {\n inputRef,\n numberValue,\n formattedValue,\n setValue: (value) => currencyInput === null || currencyInput === void 0 ? void 0 : currencyInput.setValue(value),\n setOptions: (options) => currencyInput === null || currencyInput === void 0 ? void 0 : currencyInput.setOptions(options)\n };\n}\n\nexport { CurrencyDisplay, ValueScaling, useCurrencyInput };\n","<script lang=\"ts\" setup>\n import isEmpty from 'lodash-es/isEmpty';\n import { computed, useAttrs, watch } from 'vue';\n import { CurrencyDisplay, CurrencyInputOptions, useCurrencyInput } from 'vue-currency-input';\n\n import Icon from '../Icon/Icon.vue';\n import Input, { InputProps } from '../Input/Input.vue';\n\n const CURRENCY_INPUT_BASE_OPTIONS: CurrencyInputOptions = {\n currency: 'USD',\n currencyDisplay: CurrencyDisplay.hidden,\n precision: 2,\n hideCurrencySymbolOnFocus: true,\n hideGroupingSeparatorOnFocus: true,\n hideNegligibleDecimalDigitsOnFocus: false,\n autoDecimalDigits: true,\n useGrouping: true,\n accountingSign: false,\n };\n\n export interface CurrencyInputProps extends Omit<InputProps, 'modelValue' | 'type'> {\n inputOptions?: Partial<CurrencyInputOptions>;\n modelValue: string | null;\n }\n\n const props = withDefaults(defineProps<CurrencyInputProps>(), {\n // Todo: this default should be removed if its a required prop...\n modelValue: '',\n errorText: undefined,\n hintText: undefined,\n label: undefined,\n id: undefined,\n inputOptions: undefined,\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the input value changes.\n */\n (e: 'update:model-value', v: CurrencyInputProps['modelValue']): void;\n }>();\n\n const attrs = useAttrs();\n\n const currencyInputOptions = computed(() => {\n return {\n ...CURRENCY_INPUT_BASE_OPTIONS,\n ...(!isEmpty(props.inputOptions) ? props.inputOptions : {}),\n };\n });\n\n const { inputRef: inputEl, setOptions, setValue, numberValue } = useCurrencyInput(currencyInputOptions.value, false);\n\n defineExpose({ inputEl });\n\n watch(\n () => numberValue.value,\n (newValue: number | null | string) => {\n let stringValue: string | null;\n\n if (Object.is(newValue, -0)) {\n if (typeof currencyInputOptions.value.precision === 'number') {\n stringValue = '-0.' + '0'.repeat(currencyInputOptions.value.precision);\n } else {\n stringValue = '-0.' + '0'.repeat(currencyInputOptions.value.precision?.min || 0);\n }\n } else {\n stringValue = typeof newValue === 'number' ? newValue.toFixed(2) : newValue;\n }\n\n emit('update:model-value', stringValue);\n },\n );\n\n watch(\n () => props.modelValue,\n (newValue: number | null | string) => {\n let numberValue: number | null;\n\n if (typeof newValue === 'string') {\n numberValue = parseFloat(newValue || '0');\n } else {\n numberValue = newValue;\n }\n\n setValue(numberValue);\n },\n );\n\n watch(\n () => props.inputOptions,\n () => {\n setOptions(currencyInputOptions.value);\n },\n );\n\n const inputAttrs = computed(() => {\n const { inputOptions: _, ...propsWithoutCurrencyInputOptions } = props;\n\n return { ...propsWithoutCurrencyInputOptions, ...attrs } as typeof attrs & InputProps;\n });\n</script>\n\n<template>\n <Input\n v-bind=\"inputAttrs\"\n ref=\"inputEl\"\n class=\"stash-currency-input\"\n type=\"text\"\n data-test=\"stash-currency-input\"\n inputmode=\"decimal\"\n >\n <template #prepend>\n <Icon name=\"sign-dollar\" />\n </template>\n </Input>\n</template>\n"],"names":["CurrencyDisplay","ValueScaling","escapeRegExp","str","removeLeadingZeros","count","search","substringBefore","DECIMAL_SEPARATORS","INTEGER_PATTERN","CurrencyFormat","options","_a","_b","_c","_d","_e","_f","currency","currencyDisplay","locale","precision","accountingSign","useGrouping","numberFormat","formatParts","type","i","getPrefix","getSuffix","negative","fraction","match","formattedNumber","integerNumber","value","from","s","digit","index","AbstractInputMask","currencyFormat","DefaultInputMask","previousConformedValue","isEmptyNegativeValue","checkIncompleteValue","incompleteValue","integer","integerDigits","fractionDigits","invalidFraction","invalidNegativeValue","AutoDecimalDigitsInputMask","numberValue","DEFAULT_OPTIONS","CurrencyInput","args","newValue","valueScalingOptions","min","max","maxFractionDigits","hideNegligibleDecimalDigits","conformedValue","formattedValue","maximumFractionDigits","minimumFractionDigits","e","selectionStart","inputEvent","getCaretPositionAfterFormat","prefix","suffix","decimalSymbol","groupingSymbol","caretPositionFromLeft","newValueLength","decimalSymbolPosition","selectionEnd","caretPositionOnFocus","negativePrefix","negativeSuffix","isNegative","currentPrefix","prefixLength","suffixLength","result","start","end","findInput","el","useCurrencyInput","autoEmit","currencyInput","inputRef","ref","vm","getCurrentInstance","emit","props","isVue3","version","lazyModel","modelValue","computed","watch","CURRENCY_INPUT_BASE_OPTIONS","__props","__emit","attrs","useAttrs","currencyInputOptions","isEmpty","inputEl","setOptions","setValue","__expose","stringValue","inputAttrs","_","propsWithoutCurrencyInputOptions"],"mappings":";;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,IAAIA;AAAA,CACH,SAAUA,GAAiB;AACxB,EAAAA,EAAgB,SAAY,UAC5BA,EAAgB,eAAkB,gBAClCA,EAAgB,OAAU,QAC1BA,EAAgB,OAAU,QAC1BA,EAAgB,SAAY;AAChC,GAAGA,MAAoBA,IAAkB,CAAE,EAAC;AAC5C,IAAIC;AAAA,CACH,SAAUA,GAAc;AACrB,EAAAA,EAAa,YAAe,aAC5BA,EAAa,YAAe,aAC5BA,EAAa,WAAc,YAC3BA,EAAa,WAAc;AAC/B,GAAGA,MAAiBA,IAAe,CAAE,EAAC;AAEtC,MAAMC,IAAe,CAACC,MACXA,EAAI,QAAQ,uBAAuB,MAAM,GAE9CC,IAAqB,CAACD,MACjBA,EAAI,QAAQ,gBAAgB,IAAI,GAErCE,IAAQ,CAACF,GAAKG,OACRH,EAAI,MAAM,IAAI,OAAOD,EAAaI,CAAM,GAAG,GAAG,CAAC,KAAK,CAAA,GAAI,QAE9DC,IAAkB,CAACJ,GAAKG,MACnBH,EAAI,UAAU,GAAGA,EAAI,QAAQG,CAAM,CAAC,GAGzCE,IAAqB;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ,GACMC,IAAkB;AACxB,MAAMC,EAAe;AAAA,EACjB,YAAYC,GAAS;AACjB,QAAIC,GAAIC,GAAIC,GAAIC,GAAIC,GAAIC;AACxB,UAAM,EAAE,UAAAC,GAAU,iBAAAC,GAAiB,QAAAC,GAAQ,WAAAC,GAAW,gBAAAC,GAAgB,aAAAC,EAAa,IAAGZ;AACtF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AA,MACE,MAAMpD,EAAY;AAAA,MAClB,CAACI,MAAqC;;AAChC,YAAA4D;AAEJ,QAAI,OAAO,GAAG5D,GAAU,EAAE,IACpB,OAAOsD,EAAqB,MAAM,aAAc,WAClDM,IAAc,QAAQ,IAAI,OAAON,EAAqB,MAAM,SAAS,IAErEM,IAAc,QAAQ,IAAI,SAAOzG,IAAAmG,EAAqB,MAAM,cAA3B,gBAAAnG,EAAsC,QAAO,CAAC,IAGjFyG,IAAc,OAAO5D,KAAa,WAAWA,EAAS,QAAQ,CAAC,IAAIA,GAGrEyC,EAAK,sBAAsBmB,CAAW;AAAA,MACxC;AAAA,IAAA,GAGFZ;AAAA,MACE,MAAMN,EAAM;AAAA,MACZ,CAAC1C,MAAqC;AAChCJ,YAAAA;AAEA,QAAA,OAAOI,KAAa,WACtBJ,IAAc,WAAWI,KAAY,GAAG,IAExCJ,IAAcI,GAGhB0D,EAAS9D,CAAW;AAAA,MACtB;AAAA,IAAA,GAGFoD;AAAA,MACE,MAAMN,EAAM;AAAA,MACZ,MAAM;AACJ,QAAAe,EAAWH,EAAqB,KAAK;AAAA,MACvC;AAAA,IAAA;AAGI,UAAAO,IAAad,EAAS,MAAM;AAChC,YAAM,EAAE,cAAce,GAAG,GAAGC,MAAqCrB;AAEjE,aAAO,EAAE,GAAGqB,GAAkC,GAAGX;IAAM,CACxD;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"CurrencyInput.js","sources":["../node_modules/vue-currency-input/dist/index.mjs","../src/components/CurrencyInput/CurrencyInput.vue"],"sourcesContent":["/**\n * Vue Currency Input 3.1.0\n * (c) 2018-2024 Matthias Stiller\n * @license MIT\n */\nimport { ref, getCurrentInstance, version, computed, watch } from 'vue';\n\nvar CurrencyDisplay;\n(function (CurrencyDisplay) {\n CurrencyDisplay[\"symbol\"] = \"symbol\";\n CurrencyDisplay[\"narrowSymbol\"] = \"narrowSymbol\";\n CurrencyDisplay[\"code\"] = \"code\";\n CurrencyDisplay[\"name\"] = \"name\";\n CurrencyDisplay[\"hidden\"] = \"hidden\";\n})(CurrencyDisplay || (CurrencyDisplay = {}));\nvar ValueScaling;\n(function (ValueScaling) {\n ValueScaling[\"precision\"] = \"precision\";\n ValueScaling[\"thousands\"] = \"thousands\";\n ValueScaling[\"millions\"] = \"millions\";\n ValueScaling[\"billions\"] = \"billions\";\n})(ValueScaling || (ValueScaling = {}));\n\nconst escapeRegExp = (str) => {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n};\nconst removeLeadingZeros = (str) => {\n return str.replace(/^0+(0$|[^0])/, '$1');\n};\nconst count = (str, search) => {\n return (str.match(new RegExp(escapeRegExp(search), 'g')) || []).length;\n};\nconst substringBefore = (str, search) => {\n return str.substring(0, str.indexOf(search));\n};\n\nconst DECIMAL_SEPARATORS = [\n ',',\n '.',\n '٫',\n '。'\n];\nconst INTEGER_PATTERN = '(0|[1-9]\\\\d*)';\nclass CurrencyFormat {\n constructor(options) {\n var _a, _b, _c, _d, _e, _f;\n const { currency, currencyDisplay, locale, precision, accountingSign, useGrouping } = options;\n this.locale = locale;\n this.options = {\n currency,\n useGrouping,\n style: 'currency',\n currencySign: accountingSign ? 'accounting' : undefined,\n currencyDisplay: currencyDisplay !== CurrencyDisplay.hidden ? currencyDisplay : undefined\n };\n const numberFormat = new Intl.NumberFormat(locale, this.options);\n const formatParts = numberFormat.formatToParts(123456);\n this.currency = (_a = formatParts.find(({ type }) => type === 'currency')) === null || _a === void 0 ? void 0 : _a.value;\n this.digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((i) => i.toLocaleString(locale));\n this.decimalSymbol = (_b = formatParts.find(({ type }) => type === 'decimal')) === null || _b === void 0 ? void 0 : _b.value;\n this.groupingSymbol = (_c = formatParts.find(({ type }) => type === 'group')) === null || _c === void 0 ? void 0 : _c.value;\n this.minusSign = (_d = numberFormat.formatToParts(-1).find(({ type }) => type === 'minusSign')) === null || _d === void 0 ? void 0 : _d.value;\n if (this.decimalSymbol === undefined) {\n this.minimumFractionDigits = this.maximumFractionDigits = 0;\n }\n else if (typeof precision === 'number') {\n this.minimumFractionDigits = this.maximumFractionDigits = precision;\n }\n else {\n this.minimumFractionDigits = (_e = precision === null || precision === void 0 ? void 0 : precision.min) !== null && _e !== void 0 ? _e : numberFormat.resolvedOptions().minimumFractionDigits;\n this.maximumFractionDigits = (_f = precision === null || precision === void 0 ? void 0 : precision.max) !== null && _f !== void 0 ? _f : numberFormat.resolvedOptions().maximumFractionDigits;\n }\n const getPrefix = (str) => {\n return substringBefore(str, this.digits[1]);\n };\n const getSuffix = (str) => {\n return str.substring(str.lastIndexOf(this.decimalSymbol ? this.digits[0] : this.digits[1]) + 1);\n };\n this.prefix = getPrefix(numberFormat.format(1));\n this.suffix = getSuffix(numberFormat.format(1));\n this.negativePrefix = getPrefix(numberFormat.format(-1));\n this.negativeSuffix = getSuffix(numberFormat.format(-1));\n }\n parse(str) {\n if (str) {\n const negative = this.isNegative(str);\n str = this.normalizeDigits(str);\n str = this.stripCurrency(str, negative);\n str = this.stripSignLiterals(str);\n const fraction = this.decimalSymbol ? `(?:${escapeRegExp(this.decimalSymbol)}(\\\\d*))?` : '';\n const match = this.stripGroupingSeparator(str).match(new RegExp(`^${INTEGER_PATTERN}${fraction}$`));\n if (match && this.isValidIntegerFormat(this.decimalSymbol ? str.split(this.decimalSymbol)[0] : str, Number(match[1]))) {\n return Number(`${negative ? '-' : ''}${this.onlyDigits(match[1])}.${this.onlyDigits(match[2] || '')}`);\n }\n }\n return null;\n }\n isValidIntegerFormat(formattedNumber, integerNumber) {\n const options = { ...this.options, minimumFractionDigits: 0 };\n return [\n this.stripCurrency(this.normalizeDigits(integerNumber.toLocaleString(this.locale, { ...options, useGrouping: true })), false),\n this.stripCurrency(this.normalizeDigits(integerNumber.toLocaleString(this.locale, { ...options, useGrouping: false })), false)\n ].includes(formattedNumber);\n }\n format(value, options = {\n minimumFractionDigits: this.minimumFractionDigits,\n maximumFractionDigits: this.maximumFractionDigits\n }) {\n return value != null ? value.toLocaleString(this.locale, { ...this.options, ...options }) : '';\n }\n toFraction(str) {\n return `${this.digits[0]}${this.decimalSymbol}${this.onlyLocaleDigits(str.substring(1)).substring(0, this.maximumFractionDigits)}`;\n }\n isFractionIncomplete(str) {\n return !!this.normalizeDigits(this.stripGroupingSeparator(str)).match(new RegExp(`^${INTEGER_PATTERN}${escapeRegExp(this.decimalSymbol)}$`));\n }\n isNegative(str) {\n return (str.startsWith(this.negativePrefix) ||\n (this.minusSign === undefined && (str.startsWith('(') || str.startsWith('-'))) ||\n (this.minusSign !== undefined && str.replace('-', this.minusSign).startsWith(this.minusSign)));\n }\n insertCurrency(str, negative) {\n return `${negative ? this.negativePrefix : this.prefix}${str}${negative ? this.negativeSuffix : this.suffix}`;\n }\n stripGroupingSeparator(str) {\n return this.groupingSymbol !== undefined ? str.replace(new RegExp(escapeRegExp(this.groupingSymbol), 'g'), '') : str;\n }\n stripSignLiterals(str) {\n if (this.minusSign !== undefined) {\n return str.replace('-', this.minusSign).replace(this.minusSign, '');\n }\n else {\n return str.replace(/[-()]/g, '');\n }\n }\n stripCurrency(str, negative) {\n return str.replace(negative ? this.negativePrefix : this.prefix, '').replace(negative ? this.negativeSuffix : this.suffix, '');\n }\n normalizeDecimalSeparator(str, from) {\n DECIMAL_SEPARATORS.forEach((s) => {\n str = str.substring(0, from) + str.substring(from).replace(s, this.decimalSymbol);\n });\n return str;\n }\n normalizeDigits(str) {\n if (this.digits[0] !== '0') {\n this.digits.forEach((digit, index) => {\n str = str.replace(new RegExp(digit, 'g'), String(index));\n });\n }\n return str;\n }\n onlyDigits(str) {\n return this.normalizeDigits(str).replace(/\\D+/g, '');\n }\n onlyLocaleDigits(str) {\n return str.replace(new RegExp(`[^${this.digits.join('')}]*`, 'g'), '');\n }\n}\n\nclass AbstractInputMask {\n constructor(currencyFormat) {\n this.currencyFormat = currencyFormat;\n }\n}\nclass DefaultInputMask extends AbstractInputMask {\n conformToMask(str, previousConformedValue = '') {\n const negative = this.currencyFormat.isNegative(str);\n const isEmptyNegativeValue = (str) => str === '' &&\n negative &&\n !(this.currencyFormat.minusSign === undefined\n ? previousConformedValue === this.currencyFormat.negativePrefix + this.currencyFormat.negativeSuffix\n : previousConformedValue === this.currencyFormat.negativePrefix);\n const checkIncompleteValue = (str) => {\n if (isEmptyNegativeValue(str)) {\n return '';\n }\n else if (this.currencyFormat.maximumFractionDigits > 0) {\n if (this.currencyFormat.isFractionIncomplete(str)) {\n return str;\n }\n else if (str.startsWith(this.currencyFormat.decimalSymbol)) {\n return this.currencyFormat.toFraction(str);\n }\n }\n return null;\n };\n let value = str;\n value = this.currencyFormat.stripCurrency(value, negative);\n value = this.currencyFormat.stripSignLiterals(value);\n const incompleteValue = checkIncompleteValue(value);\n if (incompleteValue != null) {\n return this.currencyFormat.insertCurrency(incompleteValue, negative);\n }\n const [integer, ...fraction] = value.split(this.currencyFormat.decimalSymbol);\n const integerDigits = removeLeadingZeros(this.currencyFormat.onlyDigits(integer));\n const fractionDigits = this.currencyFormat.onlyDigits(fraction.join('')).substring(0, this.currencyFormat.maximumFractionDigits);\n const invalidFraction = fraction.length > 0 && fractionDigits.length === 0;\n const invalidNegativeValue = integerDigits === '' &&\n negative &&\n (this.currencyFormat.minusSign === undefined\n ? previousConformedValue === str.slice(0, -2) + this.currencyFormat.negativeSuffix\n : previousConformedValue === str.slice(0, -1));\n if (invalidFraction || invalidNegativeValue || isEmptyNegativeValue(integerDigits)) {\n return previousConformedValue;\n }\n else if (integerDigits.match(/\\d+/)) {\n return {\n numberValue: Number(`${negative ? '-' : ''}${integerDigits}.${fractionDigits}`),\n fractionDigits\n };\n }\n else {\n return '';\n }\n }\n}\nclass AutoDecimalDigitsInputMask extends AbstractInputMask {\n conformToMask(str, previousConformedValue = '') {\n if (str === '' ||\n (this.currencyFormat.parse(previousConformedValue) === 0 &&\n this.currencyFormat.stripCurrency(previousConformedValue, true).slice(0, -1) === this.currencyFormat.stripCurrency(str, true))) {\n return '';\n }\n const negative = this.currencyFormat.isNegative(str);\n const numberValue = this.currencyFormat.stripSignLiterals(str) === ''\n ? -0\n : Number(`${negative ? '-' : ''}${removeLeadingZeros(this.currencyFormat.onlyDigits(str))}`) / Math.pow(10, this.currencyFormat.maximumFractionDigits);\n return {\n numberValue,\n fractionDigits: numberValue.toFixed(this.currencyFormat.maximumFractionDigits).slice(-this.currencyFormat.maximumFractionDigits)\n };\n }\n}\n\nconst DEFAULT_OPTIONS = {\n locale: undefined,\n currency: undefined,\n currencyDisplay: undefined,\n hideGroupingSeparatorOnFocus: true,\n hideCurrencySymbolOnFocus: true,\n hideNegligibleDecimalDigitsOnFocus: true,\n precision: undefined,\n autoDecimalDigits: false,\n valueRange: undefined,\n useGrouping: undefined,\n valueScaling: undefined\n};\nclass CurrencyInput {\n constructor(args) {\n this.el = args.el;\n this.onInput = args.onInput;\n this.onChange = args.onChange;\n this.addEventListener();\n this.init(args.options);\n }\n setOptions(options) {\n this.init(options);\n this.format(this.currencyFormat.format(this.validateValueRange(this.numberValue)));\n this.onChange(this.getValue());\n }\n getValue() {\n const numberValue = this.valueScaling && this.numberValue != null ? this.toInteger(this.numberValue, this.valueScaling) : this.numberValue;\n return { number: numberValue, formatted: this.formattedValue };\n }\n setValue(value) {\n const newValue = this.valueScaling !== undefined && value != null ? this.toFloat(value, this.valueScaling) : value;\n if (newValue !== this.numberValue) {\n this.format(this.currencyFormat.format(this.validateValueRange(newValue)));\n this.onChange(this.getValue());\n }\n }\n init(options) {\n this.options = {\n ...DEFAULT_OPTIONS,\n ...options\n };\n if (this.options.autoDecimalDigits) {\n this.options.hideNegligibleDecimalDigitsOnFocus = false;\n }\n if (!this.el.getAttribute('inputmode')) {\n this.el.setAttribute('inputmode', this.options.autoDecimalDigits ? 'numeric' : 'decimal');\n }\n this.currencyFormat = new CurrencyFormat(this.options);\n this.numberMask = this.options.autoDecimalDigits ? new AutoDecimalDigitsInputMask(this.currencyFormat) : new DefaultInputMask(this.currencyFormat);\n const valueScalingOptions = {\n [ValueScaling.precision]: this.currencyFormat.maximumFractionDigits,\n [ValueScaling.thousands]: 3,\n [ValueScaling.millions]: 6,\n [ValueScaling.billions]: 9\n };\n this.valueScaling = this.options.valueScaling ? valueScalingOptions[this.options.valueScaling] : undefined;\n this.valueScalingFractionDigits =\n this.valueScaling !== undefined && this.options.valueScaling !== ValueScaling.precision\n ? this.valueScaling + this.currencyFormat.maximumFractionDigits\n : this.currencyFormat.maximumFractionDigits;\n this.minValue = this.getMinValue();\n this.maxValue = this.getMaxValue();\n }\n getMinValue() {\n var _a, _b;\n let min = this.toFloat(-Number.MAX_SAFE_INTEGER);\n if (((_a = this.options.valueRange) === null || _a === void 0 ? void 0 : _a.min) !== undefined) {\n min = Math.max((_b = this.options.valueRange) === null || _b === void 0 ? void 0 : _b.min, this.toFloat(-Number.MAX_SAFE_INTEGER));\n }\n return min;\n }\n getMaxValue() {\n var _a, _b;\n let max = this.toFloat(Number.MAX_SAFE_INTEGER);\n if (((_a = this.options.valueRange) === null || _a === void 0 ? void 0 : _a.max) !== undefined) {\n max = Math.min((_b = this.options.valueRange) === null || _b === void 0 ? void 0 : _b.max, this.toFloat(Number.MAX_SAFE_INTEGER));\n }\n return max;\n }\n toFloat(value, maxFractionDigits) {\n return value / Math.pow(10, maxFractionDigits !== null && maxFractionDigits !== void 0 ? maxFractionDigits : this.valueScalingFractionDigits);\n }\n toInteger(value, maxFractionDigits) {\n return Number(value\n .toFixed(maxFractionDigits !== null && maxFractionDigits !== void 0 ? maxFractionDigits : this.valueScalingFractionDigits)\n .split('.')\n .join(''));\n }\n validateValueRange(value) {\n return value != null ? Math.min(Math.max(value, this.minValue), this.maxValue) : value;\n }\n format(value, hideNegligibleDecimalDigits = false) {\n if (value != null) {\n if (this.decimalSymbolInsertedAt !== undefined) {\n value = this.currencyFormat.normalizeDecimalSeparator(value, this.decimalSymbolInsertedAt);\n this.decimalSymbolInsertedAt = undefined;\n }\n const conformedValue = this.numberMask.conformToMask(value, this.formattedValue);\n let formattedValue;\n if (typeof conformedValue === 'object') {\n const { numberValue, fractionDigits } = conformedValue;\n let { maximumFractionDigits, minimumFractionDigits } = this.currencyFormat;\n if (this.focus) {\n minimumFractionDigits = hideNegligibleDecimalDigits\n ? fractionDigits.replace(/0+$/, '').length\n : Math.min(maximumFractionDigits, fractionDigits.length);\n }\n else if (Number.isInteger(numberValue) && !this.options.autoDecimalDigits && (this.options.precision === undefined || minimumFractionDigits === 0)) {\n minimumFractionDigits = maximumFractionDigits = 0;\n }\n formattedValue =\n this.toInteger(Math.abs(numberValue)) > Number.MAX_SAFE_INTEGER\n ? this.formattedValue\n : this.currencyFormat.format(numberValue, {\n useGrouping: this.options.useGrouping !== false && !(this.focus && this.options.hideGroupingSeparatorOnFocus),\n minimumFractionDigits,\n maximumFractionDigits\n });\n }\n else {\n formattedValue = conformedValue;\n }\n if (this.maxValue <= 0 && !this.currencyFormat.isNegative(formattedValue) && this.currencyFormat.parse(formattedValue) !== 0) {\n formattedValue = formattedValue.replace(this.currencyFormat.prefix, this.currencyFormat.negativePrefix);\n }\n if (this.minValue >= 0) {\n formattedValue = formattedValue.replace(this.currencyFormat.negativePrefix, this.currencyFormat.prefix);\n }\n if (this.options.currencyDisplay === CurrencyDisplay.hidden || (this.focus && this.options.hideCurrencySymbolOnFocus)) {\n formattedValue = formattedValue\n .replace(this.currencyFormat.negativePrefix, this.currencyFormat.minusSign !== undefined ? this.currencyFormat.minusSign : '(')\n .replace(this.currencyFormat.negativeSuffix, this.currencyFormat.minusSign !== undefined ? '' : ')')\n .replace(this.currencyFormat.prefix, '')\n .replace(this.currencyFormat.suffix, '');\n }\n this.el.value = formattedValue;\n this.numberValue = this.currencyFormat.parse(formattedValue);\n }\n else {\n this.el.value = '';\n this.numberValue = null;\n }\n this.formattedValue = this.el.value;\n this.onInput(this.getValue());\n }\n addEventListener() {\n this.el.addEventListener('input', (e) => {\n const { value, selectionStart } = this.el;\n const inputEvent = e;\n if (selectionStart && inputEvent.data && DECIMAL_SEPARATORS.includes(inputEvent.data)) {\n this.decimalSymbolInsertedAt = selectionStart - 1;\n }\n this.format(value);\n if (this.focus && selectionStart != null) {\n const getCaretPositionAfterFormat = () => {\n const { prefix, suffix, decimalSymbol, maximumFractionDigits, groupingSymbol } = this.currencyFormat;\n let caretPositionFromLeft = value.length - selectionStart;\n const newValueLength = this.formattedValue.length;\n if (this.currencyFormat.minusSign === undefined && (value.startsWith('(') || value.startsWith('-')) && !value.endsWith(')')) {\n return newValueLength - this.currencyFormat.negativeSuffix.length > 1 ? this.formattedValue.substring(selectionStart).length : 1;\n }\n if (this.formattedValue.substring(selectionStart, 1) === groupingSymbol &&\n count(this.formattedValue, groupingSymbol) === count(value, groupingSymbol) + 1) {\n return newValueLength - caretPositionFromLeft - 1;\n }\n if (newValueLength < caretPositionFromLeft) {\n return selectionStart;\n }\n if (decimalSymbol !== undefined && value.indexOf(decimalSymbol) !== -1) {\n const decimalSymbolPosition = value.indexOf(decimalSymbol) + 1;\n if (Math.abs(newValueLength - value.length) > 1 && selectionStart <= decimalSymbolPosition) {\n return this.formattedValue.indexOf(decimalSymbol) + 1;\n }\n else {\n if (!this.options.autoDecimalDigits && selectionStart > decimalSymbolPosition) {\n if (this.currencyFormat.onlyDigits(value.substring(decimalSymbolPosition)).length - 1 === maximumFractionDigits) {\n caretPositionFromLeft -= 1;\n }\n }\n }\n }\n return this.options.hideCurrencySymbolOnFocus || this.options.currencyDisplay === CurrencyDisplay.hidden\n ? newValueLength - caretPositionFromLeft\n : Math.max(newValueLength - Math.max(caretPositionFromLeft, suffix.length), prefix.length);\n };\n this.setCaretPosition(getCaretPositionAfterFormat());\n }\n });\n this.el.addEventListener('focus', () => {\n this.focus = true;\n this.numberValueOnFocus = this.numberValue;\n setTimeout(() => {\n const { value, selectionStart, selectionEnd } = this.el;\n this.format(value, this.options.hideNegligibleDecimalDigitsOnFocus);\n if (selectionStart != null && selectionEnd != null && Math.abs(selectionStart - selectionEnd) > 0) {\n this.setCaretPosition(0, this.el.value.length);\n }\n else if (selectionStart != null) {\n const caretPositionOnFocus = this.getCaretPositionOnFocus(value, selectionStart);\n this.setCaretPosition(caretPositionOnFocus);\n }\n });\n });\n this.el.addEventListener('blur', () => {\n this.focus = false;\n this.format(this.currencyFormat.format(this.validateValueRange(this.numberValue)));\n if (this.numberValueOnFocus !== this.numberValue) {\n this.onChange(this.getValue());\n }\n });\n }\n getCaretPositionOnFocus(value, selectionStart) {\n if (this.numberValue == null) {\n return selectionStart;\n }\n const { prefix, negativePrefix, suffix, negativeSuffix, groupingSymbol, currency } = this.currencyFormat;\n const isNegative = this.numberValue < 0;\n const currentPrefix = isNegative ? negativePrefix : prefix;\n const prefixLength = currentPrefix.length;\n if (this.options.hideCurrencySymbolOnFocus || this.options.currencyDisplay === CurrencyDisplay.hidden) {\n if (isNegative) {\n if (selectionStart <= 1) {\n return 1;\n }\n else if (value.endsWith(')') && selectionStart > value.indexOf(')')) {\n return this.formattedValue.length - 1;\n }\n }\n }\n else {\n const suffixLength = isNegative ? negativeSuffix.length : suffix.length;\n if (selectionStart >= value.length - suffixLength) {\n return this.formattedValue.length - suffixLength;\n }\n else if (selectionStart < prefixLength) {\n return prefixLength;\n }\n }\n let result = selectionStart;\n if (this.options.hideCurrencySymbolOnFocus &&\n this.options.currencyDisplay !== CurrencyDisplay.hidden &&\n selectionStart >= prefixLength &&\n currency !== undefined &&\n currentPrefix.includes(currency)) {\n result -= prefixLength;\n if (isNegative) {\n result += 1;\n }\n }\n if (this.options.hideGroupingSeparatorOnFocus && groupingSymbol !== undefined) {\n result -= count(value.substring(0, selectionStart), groupingSymbol);\n }\n return result;\n }\n setCaretPosition(start, end = start) {\n this.el.setSelectionRange(start, end);\n }\n}\n\nconst findInput = (el) => ((el === null || el === void 0 ? void 0 : el.matches('input')) ? el : el === null || el === void 0 ? void 0 : el.querySelector('input'));\nfunction useCurrencyInput(options, autoEmit) {\n var _a, _b, _c, _d;\n let currencyInput;\n const inputRef = ref(null);\n const formattedValue = ref(null);\n const numberValue = ref(null);\n const vm = getCurrentInstance();\n const emit = (vm === null || vm === void 0 ? void 0 : vm.emit) || ((_b = (_a = vm === null || vm === void 0 ? void 0 : vm.proxy) === null || _a === void 0 ? void 0 : _a.$emit) === null || _b === void 0 ? void 0 : _b.bind(vm === null || vm === void 0 ? void 0 : vm.proxy));\n const props = ((vm === null || vm === void 0 ? void 0 : vm.props) || ((_c = vm === null || vm === void 0 ? void 0 : vm.proxy) === null || _c === void 0 ? void 0 : _c.$props));\n const isVue3 = version.startsWith('3');\n const lazyModel = isVue3 && ((_d = vm === null || vm === void 0 ? void 0 : vm.attrs.modelModifiers) === null || _d === void 0 ? void 0 : _d.lazy);\n const modelValue = computed(() => props === null || props === void 0 ? void 0 : props[isVue3 ? 'modelValue' : 'value']);\n const inputEvent = isVue3 ? 'update:modelValue' : 'input';\n const changeEvent = lazyModel ? 'update:modelValue' : 'change';\n watch(inputRef, (value) => {\n var _a;\n if (value) {\n const el = findInput((_a = value === null || value === void 0 ? void 0 : value.$el) !== null && _a !== void 0 ? _a : value);\n if (el) {\n currencyInput = new CurrencyInput({\n el,\n options,\n onInput: (value) => {\n if (!lazyModel && autoEmit !== false && modelValue.value !== value.number) {\n emit === null || emit === void 0 ? void 0 : emit(inputEvent, value.number);\n }\n numberValue.value = value.number;\n formattedValue.value = value.formatted;\n },\n onChange: (value) => {\n if (autoEmit !== false) {\n emit === null || emit === void 0 ? void 0 : emit(changeEvent, value.number);\n }\n }\n });\n currencyInput.setValue(modelValue.value);\n }\n else {\n console.error('No input element found. Please make sure that the \"inputRef\" template ref is properly assigned.');\n }\n }\n else {\n currencyInput = null;\n }\n });\n return {\n inputRef,\n numberValue,\n formattedValue,\n setValue: (value) => currencyInput === null || currencyInput === void 0 ? void 0 : currencyInput.setValue(value),\n setOptions: (options) => currencyInput === null || currencyInput === void 0 ? void 0 : currencyInput.setOptions(options)\n };\n}\n\nexport { CurrencyDisplay, ValueScaling, useCurrencyInput };\n","<script lang=\"ts\" setup>\n import isEmpty from 'lodash-es/isEmpty';\n import { computed, useAttrs, watch } from 'vue';\n import { CurrencyDisplay, CurrencyInputOptions, useCurrencyInput } from 'vue-currency-input';\n\n import Icon from '../Icon/Icon.vue';\n import Input, { InputProps } from '../Input/Input.vue';\n\n const CURRENCY_INPUT_BASE_OPTIONS: CurrencyInputOptions = {\n currency: 'USD',\n currencyDisplay: CurrencyDisplay.hidden,\n precision: 2,\n hideCurrencySymbolOnFocus: true,\n hideGroupingSeparatorOnFocus: true,\n hideNegligibleDecimalDigitsOnFocus: false,\n autoDecimalDigits: true,\n useGrouping: true,\n accountingSign: false,\n };\n\n export interface CurrencyInputProps extends Omit<InputProps, 'modelValue' | 'type'> {\n inputOptions?: Partial<CurrencyInputOptions>;\n modelValue: string | null;\n }\n\n const props = withDefaults(defineProps<CurrencyInputProps>(), {\n // Todo: this default should be removed if its a required prop...\n modelValue: '',\n errorText: undefined,\n hintText: undefined,\n label: undefined,\n id: undefined,\n inputOptions: undefined,\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the input value changes.\n */\n (e: 'update:model-value', v: CurrencyInputProps['modelValue']): void;\n }>();\n\n const attrs = useAttrs();\n\n const currencyInputOptions = computed(() => {\n return {\n ...CURRENCY_INPUT_BASE_OPTIONS,\n ...(!isEmpty(props.inputOptions) ? props.inputOptions : {}),\n };\n });\n\n const { inputRef: inputEl, setOptions, setValue, numberValue } = useCurrencyInput(currencyInputOptions.value, false);\n\n defineExpose({ inputEl });\n\n watch(\n () => numberValue.value,\n (newValue: number | null | string) => {\n let stringValue: string | null;\n\n if (Object.is(newValue, -0)) {\n if (typeof currencyInputOptions.value.precision === 'number') {\n stringValue = '-0.' + '0'.repeat(currencyInputOptions.value.precision);\n } else {\n stringValue = '-0.' + '0'.repeat(currencyInputOptions.value.precision?.min || 0);\n }\n } else {\n stringValue = typeof newValue === 'number' ? newValue.toFixed(2) : newValue;\n }\n\n emit('update:model-value', stringValue);\n },\n );\n\n watch(\n () => props.modelValue,\n (newValue: number | null | string) => {\n let numberValue: number | null;\n\n if (typeof newValue === 'string') {\n numberValue = parseFloat(newValue || '0');\n } else {\n numberValue = newValue;\n }\n\n setValue(numberValue);\n },\n );\n\n watch(\n () => props.inputOptions,\n () => {\n setOptions(currencyInputOptions.value);\n },\n );\n\n const inputAttrs = computed(() => {\n const { inputOptions: _, ...propsWithoutCurrencyInputOptions } = props;\n\n return { ...propsWithoutCurrencyInputOptions, ...attrs } as typeof attrs & InputProps;\n });\n</script>\n\n<template>\n <Input\n v-bind=\"inputAttrs\"\n ref=\"inputEl\"\n class=\"stash-currency-input\"\n type=\"text\"\n data-test=\"stash-currency-input\"\n inputmode=\"decimal\"\n >\n <template #prepend>\n <Icon name=\"sign-dollar\" />\n </template>\n </Input>\n</template>\n"],"names":["CurrencyDisplay","ValueScaling","escapeRegExp","str","removeLeadingZeros","count","search","substringBefore","DECIMAL_SEPARATORS","INTEGER_PATTERN","CurrencyFormat","options","_a","_b","_c","_d","_e","_f","currency","currencyDisplay","locale","precision","accountingSign","useGrouping","numberFormat","formatParts","type","i","getPrefix","getSuffix","negative","fraction","match","formattedNumber","integerNumber","value","from","s","digit","index","AbstractInputMask","currencyFormat","DefaultInputMask","previousConformedValue","isEmptyNegativeValue","checkIncompleteValue","incompleteValue","integer","integerDigits","fractionDigits","invalidFraction","invalidNegativeValue","AutoDecimalDigitsInputMask","numberValue","DEFAULT_OPTIONS","CurrencyInput","args","newValue","valueScalingOptions","min","max","maxFractionDigits","hideNegligibleDecimalDigits","conformedValue","formattedValue","maximumFractionDigits","minimumFractionDigits","e","selectionStart","inputEvent","getCaretPositionAfterFormat","prefix","suffix","decimalSymbol","groupingSymbol","caretPositionFromLeft","newValueLength","decimalSymbolPosition","selectionEnd","caretPositionOnFocus","negativePrefix","negativeSuffix","isNegative","currentPrefix","prefixLength","suffixLength","result","start","end","findInput","el","useCurrencyInput","autoEmit","currencyInput","inputRef","ref","vm","getCurrentInstance","emit","props","isVue3","version","lazyModel","modelValue","computed","watch","CURRENCY_INPUT_BASE_OPTIONS","__props","__emit","attrs","useAttrs","currencyInputOptions","isEmpty","inputEl","setOptions","setValue","__expose","stringValue","inputAttrs","_","propsWithoutCurrencyInputOptions"],"mappings":";;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,IAAIA;AAAA,CACH,SAAUA,GAAiB;AACxB,EAAAA,EAAgB,SAAY,UAC5BA,EAAgB,eAAkB,gBAClCA,EAAgB,OAAU,QAC1BA,EAAgB,OAAU,QAC1BA,EAAgB,SAAY;AAChC,GAAGA,MAAoBA,IAAkB,CAAE,EAAC;AAC5C,IAAIC;AAAA,CACH,SAAUA,GAAc;AACrB,EAAAA,EAAa,YAAe,aAC5BA,EAAa,YAAe,aAC5BA,EAAa,WAAc,YAC3BA,EAAa,WAAc;AAC/B,GAAGA,MAAiBA,IAAe,CAAE,EAAC;AAEtC,MAAMC,IAAe,CAACC,MACXA,EAAI,QAAQ,uBAAuB,MAAM,GAE9CC,IAAqB,CAACD,MACjBA,EAAI,QAAQ,gBAAgB,IAAI,GAErCE,IAAQ,CAACF,GAAKG,OACRH,EAAI,MAAM,IAAI,OAAOD,EAAaI,CAAM,GAAG,GAAG,CAAC,KAAK,CAAA,GAAI,QAE9DC,IAAkB,CAACJ,GAAKG,MACnBH,EAAI,UAAU,GAAGA,EAAI,QAAQG,CAAM,CAAC,GAGzCE,IAAqB;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ,GACMC,IAAkB;AACxB,MAAMC,EAAe;AAAA,EACjB,YAAYC,GAAS;AACjB,QAAIC,GAAIC,GAAIC,GAAIC,GAAIC,GAAIC;AACxB,UAAM,EAAE,UAAAC,GAAU,iBAAAC,GAAiB,QAAAC,GAAQ,WAAAC,GAAW,gBAAAC,GAAgB,aAAAC,EAAa,IAAGZ;AACtF,SAAK,SAASS,GACd,KAAK,UAAU;AAAA,MACX,UAAAF;AAAA,MACA,aAAAK;AAAA,MACA,OAA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AO,GAAG5D,GAAU,EAAE,IACpB,OAAOsD,EAAqB,MAAM,aAAc,WAClDM,IAAc,QAAQ,IAAI,OAAON,EAAqB,MAAM,SAAS,IAErEM,IAAc,QAAQ,IAAI,SAAOzG,IAAAmG,EAAqB,MAAM,cAA3B,gBAAAnG,EAAsC,QAAO,CAAC,IAGjFyG,IAAc,OAAO5D,KAAa,WAAWA,EAAS,QAAQ,CAAC,IAAIA,GAGrEyC,EAAK,sBAAsBmB,CAAW;AAAA,MACxC;AAAA,IAAA,GAGFZ;AAAA,MACE,MAAMN,EAAM;AAAA,MACZ,CAAC1C,MAAqC;AAChCJ,YAAAA;AAEA,QAAA,OAAOI,KAAa,WACtBJ,IAAc,WAAWI,KAAY,GAAG,IAExCJ,IAAcI,GAGhB0D,EAAS9D,CAAW;AAAA,MACtB;AAAA,IAAA,GAGFoD;AAAA,MACE,MAAMN,EAAM;AAAA,MACZ,MAAM;AACJ,QAAAe,EAAWH,EAAqB,KAAK;AAAA,MACvC;AAAA,IAAA;AAGI,UAAAO,IAAad,EAAS,MAAM;AAChC,YAAM,EAAE,cAAce,GAAG,GAAGC,MAAqCrB;AAEjE,aAAO,EAAE,GAAGqB,GAAkC,GAAGX;IAAM,CACxD;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
@@ -116,6 +116,10 @@ declare interface InputProps {
116
116
  * Indicates whether the input is disabled.
117
117
  */
118
118
  disabled?: boolean;
119
+ /**
120
+ * Indicates whether the input is read-only.
121
+ */
122
+ isReadOnly?: boolean;
119
123
  }
120
124
 
121
125
  export { }
@@ -8415,7 +8415,7 @@ const tM = /* @__PURE__ */ _t(J_, [["render", eM]]), rM = ["id"], nM = { class:
8415
8415
  "model-value": P,
8416
8416
  name: p.name,
8417
8417
  placeholder: M.value,
8418
- readonly: p.isInputReadonly
8418
+ "is-read-only": p.isInputReadonly
8419
8419
  }, to({ keyup: A, focusin: F, focusout: B }), {
8420
8420
  onBlur: D[1] || (D[1] = (R) => a("blur")),
8421
8421
  onChange: (R) => I({ dateString: R, inputChangeCb: j })
@@ -8447,7 +8447,7 @@ const tM = /* @__PURE__ */ _t(J_, [["render", eM]]), rM = ["id"], nM = { class:
8447
8447
  ]),
8448
8448
  key: "0"
8449
8449
  } : void 0
8450
- ]), 1040, ["id", "aria-describedby", "add-bottom-space", "class", "disabled", "error-text", "hint-text", "label", "model-value", "name", "placeholder", "readonly", "onChange"])
8450
+ ]), 1040, ["id", "aria-describedby", "add-bottom-space", "class", "disabled", "error-text", "hint-text", "label", "model-value", "name", "placeholder", "is-read-only", "onChange"])
8451
8451
  ];
8452
8452
  }),
8453
8453
  footer: J(() => [
@@ -8468,12 +8468,12 @@ const tM = /* @__PURE__ */ _t(J_, [["render", eM]]), rM = ["id"], nM = { class:
8468
8468
  }, 8, ["available-dates", "disabled-dates", "max-date", "min-date", "max-page", "min-page", "mode", "model-value", "popover", "hide-time-header"])
8469
8469
  ], 2));
8470
8470
  }
8471
- }), sM = "_input_1w1jz_144", oM = {
8472
- "vc-overrides": "_vc-overrides_1w1jz_2",
8473
- "close-button": "_close-button_1w1jz_117",
8474
- "button-today": "_button-today_1w1jz_123",
8471
+ }), sM = "_input_1x29w_144", oM = {
8472
+ "vc-overrides": "_vc-overrides_1x29w_2",
8473
+ "close-button": "_close-button_1x29w_117",
8474
+ "button-today": "_button-today_1x29w_123",
8475
8475
  input: sM,
8476
- "calendar-icon": "_calendar-icon_1w1jz_150"
8476
+ "calendar-icon": "_calendar-icon_1x29w_152"
8477
8477
  }, iM = {
8478
8478
  $style: oM
8479
8479
  }, _M = /* @__PURE__ */ ul(aM, [["__cssModules", iM]]);