PageSourceSearch

https://app.avify.com/assets/chunks/chunk-u9YFYmBR.js

js avify.com collected 2026-09-24 19:18:38 UTC 40,296 bytes, 805 lines download raw bytes

1import { r as reactExports, ct as requireReact, cn as getDefaultExportFromCjs, j as jsxRuntimeExports } from "./chunk-BU8s67O7.js";
2import { S as SvgChevronDown } from "./chunk-CFfcpioo.js";
3import { S as SvgChevronUp } from "./chunk-kJ10tzea.js";
4import { S as Select, I as IconLinkButton, a as SvgCreditCard, M as Modal } from "./chunk-BiNlXSaw.js";
5import { a as SvgSearch, S as SvgEye, b as SvgEyeSlash } from "./chunk-BeNMa6z1.js";
6import { S as SvgPlusCircle } from "./chunk-DrRAm4uK.js";
7import { h as SvgX } from "./chunk-DGoQ4NCQ.js";
8import { P as Plus } from "./chunk-itWYynQu.js";
9import { L as Label, a as useTranslate } from "./chunk-40h3_QsV.js";
10import { c as cn } from "./chunk-BXp0u1a1.js";
11import { L as Loader, T as Text } from "./chunk-BK1F59BV.js";
12import { C as Component } from "./chunk-kkQLXJ9B.js";
13const SvgExclamationCircleFill = (props) => /* @__PURE__ */ reactExports.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "currentColor", className: "bi bi-exclamation-circle-fill", viewBox: "0 0 16 16", ...props }, /* @__PURE__ */ reactExports.createElement("path", { d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4zm.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2z" }));
14var reactTextMask$1 = { exports: {} };
15var reactTextMask = reactTextMask$1.exports;
16var hasRequiredReactTextMask;
17function requireReactTextMask() {
18  if (hasRequiredReactTextMask) return reactTextMask$1.exports;
19  hasRequiredReactTextMask = 1;
20  (function(module, exports$1) {
21    !(function(e, t) {
22      module.exports = t(requireReact());
23    })(reactTextMask, function(e) {
24      return (function(e2) {
25        function t(n) {
26          if (r[n]) return r[n].exports;
27          var o = r[n] = { exports: {}, id: n, loaded: false };
28          return e2[n].call(o.exports, o, o.exports, t), o.loaded = true, o.exports;
29        }
30        var r = {};
31        return t.m = e2, t.c = r, t.p = "", t(0);
32      })([function(e2, t, r) {
33        function n(e3) {
34          return e3 && e3.__esModule ? e3 : { default: e3 };
35        }
36        function o(e3, t2) {
37          var r2 = {};
38          for (var n2 in e3) t2.indexOf(n2) >= 0 || Object.prototype.hasOwnProperty.call(e3, n2) && (r2[n2] = e3[n2]);
39          return r2;
40        }
41        function i(e3, t2) {
42          if (!(e3 instanceof t2)) throw new TypeError("Cannot call a class as a function");
43        }
44        function a(e3, t2) {
45          if (!e3) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
46          return !t2 || "object" != typeof t2 && "function" != typeof t2 ? e3 : t2;
47        }
48        function u(e3, t2) {
49          if ("function" != typeof t2 && null !== t2) throw new TypeError("Super expression must either be null or a function, not " + typeof t2);
50          e3.prototype = Object.create(t2 && t2.prototype, { constructor: { value: e3, enumerable: false, writable: true, configurable: true } }), t2 && (Object.setPrototypeOf ? Object.setPrototypeOf(e3, t2) : e3.__proto__ = t2);
51        }
52        Object.defineProperty(t, "__esModule", { value: true }), t.conformToMask = void 0;
53        var s = Object.assign || function(e3) {
54          for (var t2 = 1; t2 < arguments.length; t2++) {
55            var r2 = arguments[t2];
56            for (var n2 in r2) Object.prototype.hasOwnProperty.call(r2, n2) && (e3[n2] = r2[n2]);
57          }
58          return e3;
59        }, l = /* @__PURE__ */ (function() {
60          function e3(e4, t2) {
61            for (var r2 = 0; r2 < t2.length; r2++) {
62              var n2 = t2[r2];
63              n2.enumerable = n2.enumerable || false, n2.configurable = true, "value" in n2 && (n2.writable = true), Object.defineProperty(e4, n2.key, n2);
64            }
65          }
66          return function(t2, r2, n2) {
67            return r2 && e3(t2.prototype, r2), n2 && e3(t2, n2), t2;
68          };
69        })(), f = r(3);
70        Object.defineProperty(t, "conformToMask", { enumerable: true, get: function() {
71          return n(f).default;
72        } });
73        var c = r(11), p = n(c), d = r(9), h = n(d), v = r(5), y = n(v), m = r(2), b = (function(e3) {
74          function t2() {
75            var e4;
76            i(this, t2);
77            for (var r2 = arguments.length, n2 = Array(r2), o2 = 0; o2 < r2; o2++) n2[o2] = arguments[o2];
78            var u2 = a(this, (e4 = t2.__proto__ || Object.getPrototypeOf(t2)).call.apply(e4, [this].concat(n2)));
79            return u2.setRef = u2.setRef.bind(u2), u2.onBlur = u2.onBlur.bind(u2), u2.onChange = u2.onChange.bind(u2), u2;
80          }
81          return u(t2, e3), l(t2, [{ key: "setRef", value: function(e4) {
82            this.inputElement = e4;
83          } }, { key: "initTextMask", value: function() {
84            var e4 = this.props, t3 = this.props.value;
85            this.textMaskInputElement = (0, y.default)(s({ inputElement: this.inputElement }, e4)), this.textMaskInputElement.update(t3);
86          } }, { key: "componentDidMount", value: function() {
87            this.initTextMask();
88          } }, { key: "componentDidUpdate", value: function(e4) {
89            var t3 = this.props, r2 = t3.value, n2 = t3.pipe, o2 = t3.mask, i2 = t3.guide, a2 = t3.placeholderChar, u2 = t3.showMask, s2 = { guide: i2, placeholderChar: a2, showMask: u2 }, l2 = "function" == typeof n2 && "function" == typeof e4.pipe ? n2.toString() !== e4.pipe.toString() : (0, m.isNil)(n2) && !(0, m.isNil)(e4.pipe) || !(0, m.isNil)(n2) && (0, m.isNil)(e4.pipe), f2 = o2.toString() !== e4.mask.toString(), c2 = Object.keys(s2).some(function(t4) {
90              return s2[t4] !== e4[t4];
91            }) || f2 || l2, p2 = r2 !== this.inputElement.value;
92            (p2 || c2) && this.initTextMask();
93          } }, { key: "render", value: function e4() {
94            var t3 = this.props, e5 = t3.render, r2 = o(t3, ["render"]);
95            return delete r2.mask, delete r2.guide, delete r2.pipe, delete r2.placeholderChar, delete r2.keepCharPositions, delete r2.value, delete r2.onBlur, delete r2.onCh
95ange, delete r2.showMask, e5(this.setRef, s({ onBlur: this.onBlur, onChange: this.onChange, defaultValue: this.props.value }, r2));
96          } }, { key: "onChange", value: function(e4) {
97            this.textMaskInputElement.update(), "function" == typeof this.props.onChange && this.props.onChange(e4);
98          } }, { key: "onBlur", value: function(e4) {
99            "function" == typeof this.props.onBlur && this.props.onBlur(e4);
100          } }]), t2;
101        })(p.default.PureComponent);
102        t.default = b, b.propTypes = { mask: h.default.oneOfType([h.default.array, h.default.func, h.default.bool, h.default.shape({ mask: h.default.oneOfType([h.default.array, h.default.func]), pipe: h.default.func })]).isRequired, guide: h.default.bool, value: h.default.oneOfType([h.default.string, h.default.number]), pipe: h.default.func, placeholderChar: h.default.string, keepCharPositions: h.default.bool, showMask: h.default.bool }, b.defaultProps = { render: function(e3, t2) {
103          return p.default.createElement("input", s({ ref: e3 }, t2));
104        } };
105      }, function(e2, t) {
106        Object.defineProperty(t, "__esModule", { value: true }), t.placeholderChar = "_", t.strFunction = "function";
107      }, function(e2, t, r) {
108        function n() {
109          var e3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : f, t2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : l.placeholderChar;
110          if (!o(e3)) throw new Error("Text-mask:convertMaskToPlaceholder; The mask property must be an array.");
111          if (e3.indexOf(t2) !== -1) throw new Error("Placeholder character must not be used as part of the mask. Please specify a character that is not present in your mask as your placeholder character.\n\n" + ("The placeholder character that was received is: " + JSON.stringify(t2) + "\n\n") + ("The mask that was received is: " + JSON.stringify(e3)));
112          return e3.map(function(e4) {
113            return e4 instanceof RegExp ? t2 : e4;
114          }).join("");
115        }
116        function o(e3) {
117          return Array.isArray && Array.isArray(e3) || e3 instanceof Array;
118        }
119        function i(e3) {
120          return "string" == typeof e3 || e3 instanceof String;
121        }
122        function a(e3) {
123          return "number" == typeof e3 && void 0 === e3.length && !isNaN(e3);
124        }
125        function u(e3) {
126          return "undefined" == typeof e3 || null === e3;
127        }
128        function s(e3) {
129          for (var t2 = [], r2 = void 0; r2 = e3.indexOf(c), r2 !== -1; ) t2.push(r2), e3.splice(r2, 1);
130          return { maskWithoutCaretTraps: e3, indexes: t2 };
131        }
132        Object.defineProperty(t, "__esModule", { value: true }), t.convertMaskToPlaceholder = n, t.isArray = o, t.isString = i, t.isNumber = a, t.isNil = u, t.processCaretTraps = s;
133        var l = r(1), f = [], c = "[]";
134      }, function(e2, t, r) {
135        function n() {
136          var e3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : s, t2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : u, r2 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
137          if (!(0, i.isArray)(t2)) {
138            if (("undefined" == typeof t2 ? "undefined" : o(t2)) !== a.strFunction) throw new Error("Text-mask:conformToMask; The mask property must be an array.");
139            t2 = t2(e3, r2), t2 = (0, i.processCaretTraps)(t2).maskWithoutCaretTraps;
140          }
141          var n2 = r2.guide, l = void 0 === n2 || n2, f = r2.previousConformedValue, c = void 0 === f ? s : f, p = r2.placeholderChar, d = void 0 === p ? a.placeholderChar : p, h = r2.placeholder, v = void 0 === h ? (0, i.convertMaskToPlaceholder)(t2, d) : h, y = r2.currentCaretPosition, m = r2.keepCharPositions, b = l === false && void 0 !== c, g = e3.length, k = c.length, C = v.length, O = t2.length, T = g - k, P = T > 0, x = y + (P ? -T : 0), w = x + Math.abs(T);
142          if (m === true && !P) {
143            for (var S = s, _ = x; _ < w; _++) v[_] === d && (S += d);
144            e3 = e3.slice(0, x) + S + e3.slice(x, g);
145          }
146          for (var M = e3.split(s).map(function(e4, t3) {
147            return { char: e4, isNew: t3 >= x && t3 < w };
148          }), j = g - 1; j >= 0; j--) {
149            var E = M[j].char;
150            if (E !== d) {
151              var R = j >= x && k === O;
152              E === v[R ? j - T : j] && M.splice(j, 1);
153            }
154          }
155          var V = s, N = false;
156          e: for (var A = 0; A < C; A++) {
157            var B = v[A];
158            if (B === d) {
159              if (M.length > 0) for (; M.length > 0; ) {
160                var I = M.shift(), F = I.char, q = I.isNew;
161                if (F === d && b !== true) {
162                  V += d;
163                  continue e;
164                }
165                if (t2[A].test(F)) {
166                  if (m === true && q !== false && c !== s && l !== false && P) {
167                    for (var D = M.length, L = null, W = 0; W < D; W++) {
168                      var J = M[W];
169                      if (J.char !== d && J.isNew === false) break;
170                      if (J.char === d) {
171                        L = W;
172                        break;
173                      }
174                    }
175                    null !== L ? (V += F, M.splice(L, 1)) : A--;
176                  } else V += F;
177                  continue e;
178                }
179                N = true;
180              }
181              b === false && (V += v.substr(A, C));
182              break;
183            }
184            V += B;
185          }
186          if (b && P === false) {
187            for (var U = null, H = 0; H < V.length; H++) v[H] === d && (U = H);
188            V = null !== U ? V.substr(0, U + 1) : s;
189          }
190          return { conformedValue: V, meta: { someCharsRejected: N } };
191        }
192        Object.defineProperty(t, "__esModule", { value: true });
193        var o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e3) {
194          return typeof e3;
195        } : function(e3) {
196          return e3 && "function" == typeof Symbol && e3.constructor === Symbol && e3 !== Symbol.prototype ? "symbol" : typeof e3;
197        };
198        t.default = n;
199        var i = r(2), a = r(1), u = [], s = "";
200      }, function(e2, t) {
201        function r(e3) {
202          var t2 = e3.previousConformedValue, r2 = void 0 === t2 ? o : t2, i = e3.previousPlaceholder, a = void 0 === i ? o : i, u = e3.currentCaretPosition, s = void 0 === u ? 0 : u, l = e3.conformedValue, f = e3.rawValue, c = e3.placeholderChar, p = e3.placeholder, d = e3.indexesOfPipedChars, h = void 0 === d ? n : d, v = e3.caretTrapIndexes, y = void 0 === v ? n : v;
203          if (0 === s || !f.length) return 0;
204          var m = f.length, b = r2.length, g = p.length, k = l.length, C = m - b, O = C > 0, T = 0 === b, P = C > 1 && !O && !T;
205          if (P) return s;
206          var x = O && (r2 === l || l === p), w = 0, S = void 0, _ = void 0;
207          if (x) w = s - C;
208          else {
209            var M = l.toLowerCase(), j = f.toLowerCase(), E = j.substr(0, s).split(o), R = E.filter(function(e4) {
210              return M.indexOf(e4) !== -1;
211            });
212            _ = R[R.length - 1];
213            var V = a.substr(0, R.length).split(o).filter(function(e4) {
214              return e4 !== c;
215            }).length, N = p.substr(0, R.length).split(o).filter(function(e4) {
216              return e4 !== c;
217            }).length, A = N !== V, B = void 0 !== a[R.length - 1] && void 0 !== p[R.length - 2] && a[R.length - 1] !== c && a[R.length - 1] !== p[R.length - 1] && a[R.length - 1] === p[R.length - 2];
218            !O && (A || B) && V > 0 && p.indexOf(_) > -1 && void 0 !== f[s] && (S = true, _ = f[s]);
219            for (var I = h.map(function(e4) {
220              return M[e4];
221            }), F = I.filter(function(e4) {
222              return e4 === _;
223            }).length, q = R.filter(function(e4) {
224              return e4 === _;
225            }).length, D = p.substr(0, p.indexOf(c)).split(o).filter(function(e4, t3) {
226              return e4 === _ && f[t3] !== e4;
227            }).length, L = D + q + F + (S ? 1 : 0), W = 0, J = 0; J < k; J++) {
228              var U = M[J];
229              if (w = J + 1, U === _ && W++, W >= L) break;
230            }
231          }
232          if (O) {
233            for (var H = w, Y = w; Y <= g; Y++) if (p[Y] === c && (H = Y), p[Y] === c || y.indexOf(Y) !== -1 || Y === g) return H;
234          } else if (S) {
235            for (var z = w - 1; z >= 0; z--) if (l[z] === _ || y.indexOf(z) !== -1 || 0 === z) return z;
236          } else for (var G = w; G >= 0; G--) if (p[G - 1] === c || y.indexOf(G) !== -1 || 0 === G) return G;
237        }
238        Object.defineProperty(t, "__esModule", { value: true }), t.default = r;
239        var n = [], o = "";
240      }, function(e2, t, r) {
241        function n(e3) {
242          return e3 && e3.__esModule ? e3 : { default: e3 };
243        }
244        function o(e3) {
245          var t2 = { previousConformedValue: void 0, previousPlaceholder: void 0 };
246          return { state: t2, update: function(r2) {
247            var n2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : e3, o2 = n2.inputElement, l2 = n2.mask, c2 = n2.guide, y2 = n2.pipe, b2 = n2.placeholderChar, g2 = void 0 === b2 ? h.placeholderChar : b2, k = n2.keepCharPositions, C = void 0 !== k && k, O = n2.showMask, T = void 0 !== O && O;
248            if ("undefined" == typeof r2 && (r2 = o2.value), r2 !== t2.previousConformedValue) {
249              ("undefined" == typeof l2 ? "undefined" : s(l2)) === m && void 0 !== l2.pipe && void 0 !== l2.mask && (y2 = l2.pipe, l2 = l2.mask);
250              var P = void 0, x = void 0;
251              if (l2 instanceof Array && (P = (0, d.convertMaskToPlaceholder)(l2, g2)), l2 !== false) {
252                var w = a(r2), S = o2.selectionEnd, _ = t2.previousConformedValue, M = t2.previousPlaceholder, j = void 0;
253                if (("undefined" == typeof l2 ? "undefined" : s(l2)) === h.strFunction) {
254                  if (x = l2(w, { currentCaretPosition: S, previousConformedValue: _, placeholderChar: g2 }), x === false) return;
255                  var E = (0, d.processCaretTraps)(x), R = E.maskWithoutCaretTraps, V = E.indexes;
256                  x = R, j = V, P = (0, d.convertMaskToPlaceholder)(x, g2);
257                } else x = l2;
258                var N = { previousConformedValue: _, guide: c2, placeholderChar: g2, pipe: y2, placeholder: P, currentCaretPosition: S, keepCharPositions: C }, A = (0, p.default)(w, x, N), B = A.conformedValue, I = ("undefined" == typeof y2 ? "undefined" : s(y2)) === h.strFunction, F = {};
259                I && (F = y2(B, u({ rawValue: w }, N)), F === false ? F = { value: _, rejected: true } : (0, d.isString)(F) && (F = { value: F }));
260                var q = I ? F.value : B, D = (0, f.default)({ previousConformedValue: _, previousPlaceholder: M, conformedValue: q, placeholder: P, rawValue: w, currentCaretPosition: S, placeholderChar: g2, indexesOfPipedChars: F.indexesOfPipedChars, caretTrapIndexes: j }), L = q === P && 0 === D, W = T ? P : v, J = L ? W : q;
261                t2.previousConformedValue = J, t2.previousPlaceholder = P, o2.value !== J && (o2.value = J, i(o2, D));
262              }
263            }
264          } };
265        }
266        function i(e3, t2) {
267          document.activeElement === e3 && (b ? g(function() {
268            return e3.setSelectionRange(t2, t2, y);
269          }, 0) : e3.setSelectionRange(t2, t2, y));
270        }
271        function a(e3) {
272          if ((0, d.isString)(e3)) return e3;
273          if ((0, d.isNumber)(e3)) return String(e3);
274          if (void 0 === e3 || null === e3) return v;
275          throw new Error("The 'value' provided to Text Mask needs to be a string or a number. The value received was:\n\n " + JSON.stringify(e3));
276        }
277        Object.defineProperty(t, "__esModule", { value: true });
278        var u = Object.assign || function(e3) {
279          for (var t2 = 1; t2 < arguments.length; t2++) {
280            var r2 = arguments[t2];
281            for (var n2 in r2) Object.prototype.hasOwnProperty.call(r2, n2) && (e3[n2] = r2[n2]);
282          }
283          return e3;
284        }, s = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e3) {
285          return typeof e3;
286        } : function(e3) {
287          return e3 && "function" == typeof Symbol && e3.constructor === Symbol && e3 !== Symbol.prototype ? "symbol" : typeof e3;
288        };
289        t.default = o;
290        var l = r(4), f = n(l), c = r(3), p = n(c), d = r(2), h = r(1), v = "", y = "none", m = "object", b = "undefined" != typeof navigator && /Android/i.test(navigator.userAgent), g = "undefined" != typeof requestAnimationFrame ? requestAnimationFrame : setTimeout;
291      }, function(e2, t) {
292        function r(e3) {
293          return function() {
294            return e3;
295          };
296        }
297        var n = function() {
298        };
299        n.thatReturns = r, n.thatReturnsFalse = r(false), n.thatReturnsTrue = r(true), n.thatReturnsNull = r(null), n.thatReturnsThis = function() {
300          return this;
301        }, n.thatReturnsArgument = function(e3) {
302          return e3;
303        }, e2.exports = n;
304      }, function(e2, t, r) {
305        function n(e3, t2, r2, n2, i, a, u, s) {
306          if (!e3) {
307            var l;
308            if (void 0 === t2) l = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");
309            else {
310              var f = [r2, n2, i, a, u, s], c = 0;
311              l = new Error(t2.replace(/%s/g, function() {
312                return f[c++];
313              })), l.name = "Invariant Violation";
314            }
315            throw l.framesToPop = 1, l;
316          }
317        }
318        e2.exports = n;
319      }, function(e2, t, r) {
320        var n = r(6), o = r(7), i = r(10);
321        e2.exports = function() {
322          function e3(e4, t3, r3, n2, a, u) {
323            u !== i && o(false, "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");
324          }
325          function t2() {
326            return e3;
327          }
328          e3.isRequired = e3;
329          var r2 = { array: e3, bool: e3, func: e3, number: e3, object: e3, string: e3, symbol: e3, any: e3, arrayOf: t2, element: e3, instanceOf: t2, node: e3, objectOf: t2, oneOf: t2, oneOfType: t2, shape: t2, exact: t2 };
330          return r2.checkPropTypes = n, r2.PropTypes = r2, r2;
331        };
332      }, function(e2, t, r) {
333        e2.exports = r(8)();
334      }, function(e2, t) {
335        var r = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
336        e2.exports = r;
337      }, function(t, r) {
338        t.exports = e;
339      }]);
340    });
341  })(reactTextMask$1);
342  return reactTextMask$1.exports;
343}
344var reactTextMaskExports = requireReactTextMask();
345const MaskedInput = /* @__PURE__ */ getDefaultExportFromCjs(reactTextMaskExports);
346const fieldsetIconSizeClasses = {
347  mobile: "w-full",
348  xsmall: "w-[5.75rem]",
349  small: "w-[8.75rem]",
350  medium: "w-[350px]",
351  large: "w-[460px]",
352  xlarge: "w-[654px]"
353};
354const TextField = ({
355  autoFocus = false,
356  bordersType = "all-borders",
357  className,
358  disabled,
359  displaySearchIcon,
360  dropdownOptions,
361  errorText,
362  hasError,
363  hasWarning,
364  helperText,
365  id = "",
366  initialStaticText,
367  inputClassName = "",
368  inputRef,
369  isLoading,
370  label,
371  labelSize = "md",
372  mask,
373  placeholder,
374  required = false,
375  size,
376  tooltipText,
377  type = "text",
378  value,
379  onBlur,
380  onChange,
381  onDecrement,
382  onEnter,
383  onIncrement,
384  selectAllOnFocus = false,
385  onFocus,
386  onKeyDown,
387  selectModalUtils,
388  autoComplete = true,
389  fieldsetClassName,
390  ...props
391}) => {
392  var _a;
393  const [focus, setFocus] = reactExports.useState(false);
394  const [showPassword, setShowPassword] = reactExports.useState(false);
395  const [showModal, setShowModal] = reactExports.useState(false);
396  const [modalNewItem, setModalNewItem] = reactExports.useState("");
397  const isCounterEnabled = type === "number" && !!onDecrement && !!onIncrement;
398  const addModalNewItem = () => {
399    if (modalNewItem && selectModalUtils) {
400      selectModalUtils.updateSelectedItems(
401        {
402          key: "new",
403          value: modalNewItem
404        },
405        false
406      );
407      setModalNewItem("");
408    }
409  };
410  const onKeyPress = (e) => {
411    if (e.key === "Enter") {
412      if (onEnter) {
413        e.preventDefault();
414        onEnter();
415      }
416    }
417  };
418  const inputBaseClasses = "flex py-[7px] pr-3 pl-0 w-full rounded-[0.3125rem] border-0 indent-[0.7606rem] leading-[1.1rem] h-input-h focus:outline-none placeholder:font-normal placeholder:text-[0.8125rem] placeholder:leading-[1.125rem] bg-transparent";
419  const getVariantColor = (errorVal, warningVal, defaultVal) => {
420    if (hasError) return errorVal;
421    if (hasWarning) return warningVal;
422    return defaultVal;
423  };
424  const variantPlaceholderColor = getVariantColor(
425    "placeholder:text-error",
426    "placeholder:text-warning",
427    "placeholder:text-dark-gray/50"
428  );
429  const variantInputTextColor = hasError ? "text-error" : "";
430  const variantHelperTextColor = getVariantColor("text-error", "text-warning", "text-gray-500");
431  const variantIconColor = getVariantColor("text-error", "text-warning", "text-gray-500");
432  const getFieldsetClasses = () => {
433    const bgClass = (fieldsetClassName == null ? void 0 : fieldsetClassName.includes("bg-")) ? "" : "bg-white";
434    const base = `box-border ${bgClass} relative [&_input::-webkit-outer-spin-button]:appearance-none [&_input::-webkit-inner-spin-button]:appearance-none [&_input::-webkit-outer-spin-button]:m-0 [&_input::-webkit-inner-spin-button]:m-0 [&_input[type=number]]:[-moz-appearance:textfield]`;
435    if (bordersType === "all-borders") {
436      const borderColor2 = getVariantColor("border-error", "border-warning", "border-input-border");
437      const getFocusShadow2 = () => {
438        if (focus && hasError) return "shadow-[0_0_0_2px_rgba(242,33,10,0.5)]";
439        if (focus) return "shadow-[0_0_0_2px_rgba(64,84,216,0.5)]";
440        if (hasError) return "shadow-[0_0_0_2px_rgba(242,33,10,0.5)]";
441        return "";
442      };
443      const focusBorder2 = focus && !hasError && !hasWarning ? "border-primary-500" : "";
444      return cn(
445        base,
446        "border border-solid rounded-[0.3125rem]",
447        borderColor2,
448        getFocusShadow2(),
449        focusBorder2
450      );
451    }
452    const borderColor = getVariantColor(
453      "border-b-error",
454      "border-b-warning",
455      "border-b-input-border"
456    );
457    const getFocusShadow = () => {
458      if (focus && hasError) return "shadow-[0_2px_0_0_rgba(242,33,10,0.5)]";
459      if (focus) return "shadow-[0_2px_0_0_rgba(64,84,216,0.5)]";
460      if (hasError) return "shadow-[0_2px_0_0_rgba(242,33,10,0.5)]";
461      return "";
462    };
463    const focusBorder = focus && !hasError && !hasWarning ? "border-b-primary-500" : "";
464    return cn(
465      base,
466      "border-b border-solid rounded-none",
467      borderColor,
468      getFocusShadow(),
469      focusBorder
470    );
471  };
472  const getInputTypeClasses = (inputType) => {
473    if (inputType === "search" || displaySearchIcon) return "pr-[0.625rem] pl-5";
474    if (inputType === "password") return "pr-[2.1875rem]";
475    return "";
476  };
477  const svgBaseClasses = "absolute top-1/2 -translate-y-1/2 right-4 w-[0.9375rem] h-[0.9375rem]";
478  const handlePasswordIcon = () => {
479    if (type === "password") {
480      const iconClasses = cn(
481        svgBaseClasses,
482        "cursor-pointer text-input-border",
483        hasError && "text-error"
484      );
485      return showPassword ? /* @__PURE__ */ jsxRuntimeExports.jsx(SvgEye, { className: iconClasses, onClick: () => setShowPassword(false) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(SvgEyeSlash, { className: iconClasses, onClick: () => setShowPassword(true) });
486    }
487    return null;
488  };
489  const getSelectedItem = (i) => {
490    var _a2;
491    return (_a2 = selectModalUtils == null ? void 0 : selectModalUtils.selectedItems) == null ? void 0 : _a2.find((si) => si.key === i.key);
492  };
493  const getSelectedSubItem = (i) => {
494    var _a2;
495    return i ? (_a2 = selectModalUtils == null ? void 0 : selectModalUtils.subItems) == null ? void 0 : _a2.find((si) => si.key === i.key) : void 0;
496  };
497  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full inline-flex flex-col", disabled && "opacity-50", className), children: [
498    label && /* @__PURE__ */ jsxRuntimeExports.jsx(
499      Label,
500      {
501        idIntl: label,
502        required,
503        htmlFor: id,
504        size: labelSize,
505        tooltipText
506      }
507    ),
508    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
509      /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("relative", size && fieldsetIconSizeClasses[size]), children: [
510        /* @__PURE__ */ jsxRuntimeExports.jsx(
511          "fieldset",
512          {
513            className: cn(getFieldsetClasses(), !!dropdownOptions && "flex", fieldsetClassName),
514            children: mask && mask.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
515              MaskedInput,
516              {
517                mask,
518                className: cn(
519                  inputBaseClasses,
520                  "input__txt",
521                  variantPlaceholderColor,
522                  variantInputTextColor,
523                  getInputTypeClasses(type),
524                  bordersType === "bottom-border" && "max-h-[1.875rem] pb-[0.3rem]"
525                ),
526                placeholder: useTranslate(placeholder || ""),
527                onChange
528              }
529            ) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
530              selectModalUtils && /* @__PURE__ */ jsxRuntimeExports.jsxs(
531                "div",
532                {
533                  tabIndex: 0,
534                  role: "button",
535                  onFocus: () => setShowModal(true),
536                  onClick: () => setShowModal(true),
537                  onKeyPress: () => setShowModal(true),
538                  className: cn(
539                    "pointer clickable",
540                    inputBaseClasses,
541                    "input__txt",
542                    variantPlaceholderColor,
543                    variantInputTextColor,
544                    getInputTypeClasses(type),
545                    bordersType === "bottom-border" && "max-h-[1.875rem] pb-[0.3rem]",
546                    inputClassName,
547                    "!pl-[12px] !pr-[50px] !h-fit min-h-[45px]"
548                  ),
549                  children: [
550                    placeholder && (!selectModalUtils.selectedItems || ((_a = selectModalUtils.selectedItems) == null ? void 0 : _a.length) === 0) && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "indent-0 pt-[3px] text-gray-400", children: useTranslate(placeholder || "") }),
551                    selectModalUtils.selectedItems && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: selectModalUtils.selectedItems.map((si) => {
552                      return /* @__PURE__ */ jsxRuntimeExports.jsxs(
553                        "p",
554                        {
555                          className: "relative bg-gray-150 rounded-[4px] px-[10px] py-[3px] indent-0 gap-1 flex float-left ml-[5px] mb-[5px]",
556                          children: [
557                            useTranslate(si.value),
558                            /* @__PURE__ */ jsxRuntimeExports.jsx(
559                              "button",
560                              {
561                                className: "rounded-xl border-[0px] h-[15]",
562                                type: "button",
563                                onClick: (e) => {
564                                  e.stopPropagation();
565                                  selectModalUtils.updateSelectedItems(si);
566                                  if (si.key === "new") {
567                                    setModalNewItem("");
568                                  }
569                                },
570                                onFocus: (e) => {
571                                  e.stopPropagation();
572                                  selectModalUtils.updateSelectedItems(si);
573                                  if (si.key === "new") {
574                                    setModalNewItem("");
575                                  }
576                                },
577                                children: /* @__PURE__ */ jsxRuntimeExports.jsx(SvgX, { className: "h-[15] min-w-[15] pointer p-[1.5px] rounded-xl border-[1px] border-gray-800 border-solid text-gray-800 mt-[1px]" })
578                              }
579                            )
580                          ]
581                        },
582                        si.key
583                      );
584                    }) }),
585                    /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "clickable absolute right-[15px] top-[15px] bg-transparent border-0 p-0 pointer icon text-black w-[15px] h-[15px]" })
586                  ]
587                }
588              ),
589              initialStaticText && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-4 text-gray-500 opacity-80 absolute top-[0.6875rem] input__txt", children: initialStaticText }),
590              !selectModalUtils && /* @__PURE__ */ jsxRuntimeExports.jsx(
591                "input",
592                {
593                  autoComplete: autoComplete ? "on" : "off",
594                  autoFocus,
595                  ref: inputRef,
596                  type: showPassword ? "text" : type,
597                  onFocus: (e) => {
598                    setFocus(true);
599                    if (onFocus) onFocus(e);
600                    if (selectAllOnFocus) {
601                      e.target.select();
602                    }
603                  },
604                  onBlur: (e) => {
605                    setFocus(false);
606                    if (onBlur) onBlur(e);
607                  },
608                  id,
609                  className: cn(
610                    inputBaseClasses,
611                    "input__txt",
612                    variantPlaceholderColor,
613                    variantInputTextColor,
614                    getInputTypeClasses(displaySearchIcon ? "search" : type),
615                    bordersType === "bottom-border" && "max-h-[1.875rem] pb-[0.3rem]",
616                    inputClassName,
617                    !!dropdownOptions && "flex-1",
618                    isCounterEnabled && "!pr-8"
619                  ),
620                  disabled,
621                  placeholder: useTranslate(placeholder || ""),
622                  onChange,
623                  onKeyPress,
624                  onKeyDown,
625                  onWheel: (e) => type === "number" && e.currentTarget.blur(),
626                  value,
627                  ...props
628                }
629              ),
630              !!dropdownOptions && /* @__PURE__ */ jsxRuntimeExports.jsx(
631                Select,
632                {
633                  className: "!w-[inherit] flex-2",
634                  containerClassName: "!pr-10 !border-y-0 !border-r-0 !rounded-l-none",
635                  items: dropdownOptions.options,
636                  value: dropdownOptions.selectedOption,
637                  onChange: dropdownOptions.onSelect
638                }
639              ),
640              isCounterEnabled && /* @__PURE__ */ jsxRuntimeExports.jsxs(
641                "div",
642                {
643                  className: cn(
644                    "grid absolute right-0 top-0 bottom-0",
645                    "[&>button]:border-0 [&>button]:border-l [&>button]:border-solid",
646                    "[&>button]:border-input-border [&>button]:bg-gray-50",
647                    disabled && "[&>button]:cursor-default"
648                  ),
649                  children: [
650                    /* @__PURE__ */ jsxRuntimeExports.jsx(
651                      IconLinkButton,
652                      {
653                        className: "text-green-success-500 gap-0 rounded-tr-[5px] !border-b rounded-l-none rounded-br-none",
654                        onClick: () => !disabled && onIncrement(),
655                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(SvgChevronUp, {})
656                      }
657                    ),
658                    /* @__PURE__ */ jsxRuntimeExports.jsx(
659                      IconLinkButton,
660                      {
661                        className: "text-red-500 gap-0 rounded-tr-none rounded-br-[5px] rounded-l-none",
662                        onClick: () => !disabled && onDecrement(),
663                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(SvgChevronDown, {})
664                      }
665                    )
666                  ]
667                }
668              )
669            ] })
670          }
671        ),
672        isLoading && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute right-0 top-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Loader, { height: 45, width: 45, type: "round-gradient", isLoading: true }) }),
673        hasError && type === "text" && !selectModalUtils && /* @__PURE__ */ jsxRuntimeExports.jsx(SvgExclamationCircleFill, { className: cn(svgBaseClasses, "text-error") }),
674        (type === "search" || displaySearchIcon) && /* @__PURE__ */ jsxRuntimeExports.jsx(SvgSearch, { className: cn(svgBaseClasses, "right-0 left-3", variantIconColor) }),
675        type === "credit-card" && /* @__PURE__ */ jsxRuntimeExports.jsx(SvgCreditCard, { className: cn(svgBaseClasses, variantIconColor) }),
676        type === "password" && /* @__PURE__ */ jsxRuntimeExports.jsx(
677          "div",
678          {
679            tabIndex: 0,
680            role: "button",
681            onClick: () => setShowPassword(!showPassword),
682            onKeyPress: () => setShowPassword(!showPassword),
683            children: handlePasswordIcon()
684          }
685        ),
686        type === "add" && /* @__PURE__ */ jsxRuntimeExports.jsxs(
687          "div",
688          {
689            className: "flex absolute right-[10px] top-[15px]",
690            tabIndex: 0,
691            role: "button",
692            onClick: () => onEnter && onEnter(),
693            onKeyPress: () => onEnter && onEnter(),
694            children: [
695              /* @__PURE__ */ jsxRuntimeExports.jsx(
696                SvgPlusCircle,
697                {
698                  className: cn(
699                    "transform-none static cursor-pointer text-primary-500 w-[0.9375rem] h-[0.9375rem]",
700                    "mr-1 pt-[2px]"
701                  )
702                }
703              ),
704              /* @__PURE__ */ jsxRuntimeExports.jsx(
705                Text,
706                {
707                  idIntl: "Add",
708                  className: "underline cursor-pointer h-auto w-auto transform-none static",
709                  typography: "typography--variant-b3",
710                  color: "primary"
711                }
712              )
713            ]
714          }
715        )
716      ] }),
717      hasError && !!errorText && /* @__PURE__ */ jsxRuntimeExports.jsx(
718        Text,
719        {
720          idIntl: errorText,
721          content: errorText,
722          typography: "body-five__txt",
723          color: "error-red",
724          className: cn("mb-[0.3125rem] w-fit relative top-1", variantHelperTextColor)
725        }
726      ),
727      !!helperText && /* @__PURE__ */ jsxRuntimeExports.jsx(
728        Text,
729        {
730          idIntl: helperText,
731          content: helperText,
732          typography: "body-five__txt",
733          className: cn("mb-[0.3125rem] w-fit relative top-1", variantHelperTextColor)
734        }
735      )
736    ] }) }),
737    selectModalUtils && /* @__PURE__ */ jsxRuntimeExports.jsx(Modal, { className: "!overflow-visible", isOpen: showModal, onClose: () => setShowModal(false), children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-[300px] p-[10px]", children: [
738      selectModalUtils.items.map((i) => {
739        var _a2, _b;
740        return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-2 gap-2.5 mb-2.5", children: [
741          /* @__PURE__ */ jsxRuntimeExports.jsx(
742            Component,
743            {
744              onClick: () => selectModalUtils.updateSelectedItems(i),
745              value: !!getSelectedItem(i),
746              className: "mt-2",
747              label: i.value
748            }
749          ),
750          selectModalUtils.subItems && !!getSelectedItem(i) && /* @__PURE__ */ jsxRuntimeExports.jsx(
751            Select,
752            {
753              medium: true,
754              items: selectModalUtils.subItems,
755              value: getSelectedSubItem((_b = (_a2 = getSelectedItem(i)) == null ? void 0 : _a2.extra) == null ? void 0 : _b.subItem) ?? selectModalUtils.subItems[0],
756              onChange: (subi) => {
757                if (selectModalUtils.updateSubSelectedItem) {
758                  selectModalUtils.updateSubSelectedItem(i, subi);
759                }
760              }
761            }
762          )
763        ] }, i.key);
764      }),
765      selectModalUtils.allowNewItem && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", children: [
766        /* @__PURE__ */ jsxRuntimeExports.jsx(
767          "input",
768          {
769            autoComplete: autoComplete ? "on" : "off",
770            value: modalNewItem,
771            placeholder: useTranslate(selectModalUtils.newItemPlaceHolder || ""),
772            onChange: (e) => {
773              setModalNewItem(e.target.value);
774            },
775            onKeyPress: (e) => {
776              if (e.key === "Enter") {
777                e.preventDefault();
778                addModalNewItem();
779              }
780            },
781            type: "text",
782            className: cn(
783              "box-border bg-white relative border border-solid border-input-border rounded-[0.3125rem]",
784              inputBaseClasses,
785              "input__txt mt-5"
786            )
787          }
788        ),
789        /* @__PURE__ */ jsxRuntimeExports.jsx(
790          IconLinkButton,
791          {
792            idIntl: "Add",
793            className: "absolute top-[13px] right-[10px]",
794            onClick: addModalNewItem,
795            children: /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "icon" })
796          }
797        )
798      ] })
799    ] }) })
800  ] });
801};
802export {
803  SvgExclamationCircleFill as S,
804  TextField as T
805};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.