@choc-ui/chakra-autocomplete 5.7.2 → 5.8.0
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.
- package/dist/index.es.js +541 -1170
- package/dist/index.js +1 -30
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,811 +1,182 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
Et = 1;
|
|
18
|
-
var t = Re, r = Symbol.for("react.element"), o = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, a = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
19
|
-
function c(f, g, R) {
|
|
20
|
-
var y, m = {}, A = null, w = null;
|
|
21
|
-
R !== void 0 && (A = "" + R), g.key !== void 0 && (A = "" + g.key), g.ref !== void 0 && (w = g.ref);
|
|
22
|
-
for (y in g) s.call(g, y) && !l.hasOwnProperty(y) && (m[y] = g[y]);
|
|
23
|
-
if (f && f.defaultProps) for (y in g = f.defaultProps, g) m[y] === void 0 && (m[y] = g[y]);
|
|
24
|
-
return { $$typeof: r, type: f, key: A, ref: w, props: m, _owner: a.current };
|
|
1
|
+
import { jsx as p, jsxs as K, Fragment as it } from "react/jsx-runtime";
|
|
2
|
+
import * as fe from "react";
|
|
3
|
+
import ee, { useMemo as ue, useRef as te, useState as Le, useEffect as D, useImperativeHandle as ut, memo as at } from "react";
|
|
4
|
+
import { useDisclosure as ct, useControllableState as ft, useUpdateEffect as pt, forwardRef as B, Popover as dt, chakra as gt, useMergeRefs as Pe, Flex as pe, Box as Xe, Divider as Qe, InputGroup as mt, Input as vt, InputRightElement as ht, Spinner as Ze, useMultiStyleConfig as yt, Wrap as bt, WrapItem as qe, PopoverAnchor as Ct, PopoverContent as St, Center as xt, Tag as At, TagLabel as It, TagCloseButton as wt } from "@chakra-ui/react";
|
|
5
|
+
const [Ot, W] = Et();
|
|
6
|
+
function Et() {
|
|
7
|
+
const e = fe.createContext(void 0);
|
|
8
|
+
e.displayName = "AutoCompleteContext";
|
|
9
|
+
function t() {
|
|
10
|
+
var o;
|
|
11
|
+
const n = fe.useContext(e), r = "useAutoCompleteContext: `context` is undefined. Seems you forgot to wrap all autoomplete components within `<AutoComplete />`";
|
|
12
|
+
if (!n) {
|
|
13
|
+
const l = new Error(r);
|
|
14
|
+
throw l.name = "ContextError", (o = Error.captureStackTrace) == null || o.call(Error, l, t), l;
|
|
15
|
+
}
|
|
16
|
+
return n;
|
|
25
17
|
}
|
|
26
|
-
return
|
|
18
|
+
return [e.Provider, t, e];
|
|
27
19
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
* @license React
|
|
31
|
-
* react-jsx-runtime.development.js
|
|
32
|
-
*
|
|
33
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
34
|
-
*
|
|
35
|
-
* This source code is licensed under the MIT license found in the
|
|
36
|
-
* LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/
|
|
38
|
-
var xt;
|
|
39
|
-
function ur() {
|
|
40
|
-
return xt || (xt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
41
|
-
var t = Re, r = Symbol.for("react.element"), o = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), f = Symbol.for("react.context"), g = Symbol.for("react.forward_ref"), R = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), A = Symbol.for("react.lazy"), w = Symbol.for("react.offscreen"), L = Symbol.iterator, ie = "@@iterator";
|
|
42
|
-
function te(e) {
|
|
43
|
-
if (e === null || typeof e != "object")
|
|
44
|
-
return null;
|
|
45
|
-
var n = L && e[L] || e[ie];
|
|
46
|
-
return typeof n == "function" ? n : null;
|
|
47
|
-
}
|
|
48
|
-
var X = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
49
|
-
function P(e) {
|
|
50
|
-
{
|
|
51
|
-
for (var n = arguments.length, i = new Array(n > 1 ? n - 1 : 0), d = 1; d < n; d++)
|
|
52
|
-
i[d - 1] = arguments[d];
|
|
53
|
-
_e("error", e, i);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
function _e(e, n, i) {
|
|
57
|
-
{
|
|
58
|
-
var d = X.ReactDebugCurrentFrame, b = d.getStackAddendum();
|
|
59
|
-
b !== "" && (n += "%s", i = i.concat([b]));
|
|
60
|
-
var x = i.map(function(h) {
|
|
61
|
-
return String(h);
|
|
62
|
-
});
|
|
63
|
-
x.unshift("Warning: " + n), Function.prototype.apply.call(console[e], console, x);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
var me = !1, Ie = !1, Fe = !1, we = !1, re = !1, ue;
|
|
67
|
-
ue = Symbol.for("react.module.reference");
|
|
68
|
-
function M(e) {
|
|
69
|
-
return !!(typeof e == "string" || typeof e == "function" || e === s || e === l || re || e === a || e === R || e === y || we || e === w || me || Ie || Fe || typeof e == "object" && e !== null && (e.$$typeof === A || e.$$typeof === m || e.$$typeof === c || e.$$typeof === f || e.$$typeof === g || // This needs to include all possible module reference object
|
|
70
|
-
// types supported by any Flight configuration anywhere since
|
|
71
|
-
// we don't know which Flight build this will end up being used
|
|
72
|
-
// with.
|
|
73
|
-
e.$$typeof === ue || e.getModuleId !== void 0));
|
|
74
|
-
}
|
|
75
|
-
function Z(e, n, i) {
|
|
76
|
-
var d = e.displayName;
|
|
77
|
-
if (d)
|
|
78
|
-
return d;
|
|
79
|
-
var b = n.displayName || n.name || "";
|
|
80
|
-
return b !== "" ? i + "(" + b + ")" : i;
|
|
81
|
-
}
|
|
82
|
-
function ne(e) {
|
|
83
|
-
return e.displayName || "Context";
|
|
84
|
-
}
|
|
85
|
-
function G(e) {
|
|
86
|
-
if (e == null)
|
|
87
|
-
return null;
|
|
88
|
-
if (typeof e.tag == "number" && P("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
89
|
-
return e.displayName || e.name || null;
|
|
90
|
-
if (typeof e == "string")
|
|
91
|
-
return e;
|
|
92
|
-
switch (e) {
|
|
93
|
-
case s:
|
|
94
|
-
return "Fragment";
|
|
95
|
-
case o:
|
|
96
|
-
return "Portal";
|
|
97
|
-
case l:
|
|
98
|
-
return "Profiler";
|
|
99
|
-
case a:
|
|
100
|
-
return "StrictMode";
|
|
101
|
-
case R:
|
|
102
|
-
return "Suspense";
|
|
103
|
-
case y:
|
|
104
|
-
return "SuspenseList";
|
|
105
|
-
}
|
|
106
|
-
if (typeof e == "object")
|
|
107
|
-
switch (e.$$typeof) {
|
|
108
|
-
case f:
|
|
109
|
-
var n = e;
|
|
110
|
-
return ne(n) + ".Consumer";
|
|
111
|
-
case c:
|
|
112
|
-
var i = e;
|
|
113
|
-
return ne(i._context) + ".Provider";
|
|
114
|
-
case g:
|
|
115
|
-
return Z(e, e.render, "ForwardRef");
|
|
116
|
-
case m:
|
|
117
|
-
var d = e.displayName || null;
|
|
118
|
-
return d !== null ? d : G(e.type) || "Memo";
|
|
119
|
-
case A: {
|
|
120
|
-
var b = e, x = b._payload, h = b._init;
|
|
121
|
-
try {
|
|
122
|
-
return G(h(x));
|
|
123
|
-
} catch {
|
|
124
|
-
return null;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
return null;
|
|
129
|
-
}
|
|
130
|
-
var I = Object.assign, N = 0, ke, le, oe, De, he, ye, H;
|
|
131
|
-
function ce() {
|
|
132
|
-
}
|
|
133
|
-
ce.__reactDisabledLog = !0;
|
|
134
|
-
function Le() {
|
|
135
|
-
{
|
|
136
|
-
if (N === 0) {
|
|
137
|
-
ke = console.log, le = console.info, oe = console.warn, De = console.error, he = console.group, ye = console.groupCollapsed, H = console.groupEnd;
|
|
138
|
-
var e = {
|
|
139
|
-
configurable: !0,
|
|
140
|
-
enumerable: !0,
|
|
141
|
-
value: ce,
|
|
142
|
-
writable: !0
|
|
143
|
-
};
|
|
144
|
-
Object.defineProperties(console, {
|
|
145
|
-
info: e,
|
|
146
|
-
log: e,
|
|
147
|
-
warn: e,
|
|
148
|
-
error: e,
|
|
149
|
-
group: e,
|
|
150
|
-
groupCollapsed: e,
|
|
151
|
-
groupEnd: e
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
N++;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
function Ge() {
|
|
158
|
-
{
|
|
159
|
-
if (N--, N === 0) {
|
|
160
|
-
var e = {
|
|
161
|
-
configurable: !0,
|
|
162
|
-
enumerable: !0,
|
|
163
|
-
writable: !0
|
|
164
|
-
};
|
|
165
|
-
Object.defineProperties(console, {
|
|
166
|
-
log: I({}, e, {
|
|
167
|
-
value: ke
|
|
168
|
-
}),
|
|
169
|
-
info: I({}, e, {
|
|
170
|
-
value: le
|
|
171
|
-
}),
|
|
172
|
-
warn: I({}, e, {
|
|
173
|
-
value: oe
|
|
174
|
-
}),
|
|
175
|
-
error: I({}, e, {
|
|
176
|
-
value: De
|
|
177
|
-
}),
|
|
178
|
-
group: I({}, e, {
|
|
179
|
-
value: he
|
|
180
|
-
}),
|
|
181
|
-
groupCollapsed: I({}, e, {
|
|
182
|
-
value: ye
|
|
183
|
-
}),
|
|
184
|
-
groupEnd: I({}, e, {
|
|
185
|
-
value: H
|
|
186
|
-
})
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
N < 0 && P("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
var O = X.ReactCurrentDispatcher, z;
|
|
193
|
-
function fe(e, n, i) {
|
|
194
|
-
{
|
|
195
|
-
if (z === void 0)
|
|
196
|
-
try {
|
|
197
|
-
throw Error();
|
|
198
|
-
} catch (b) {
|
|
199
|
-
var d = b.stack.trim().match(/\n( *(at )?)/);
|
|
200
|
-
z = d && d[1] || "";
|
|
201
|
-
}
|
|
202
|
-
return `
|
|
203
|
-
` + z + e;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
var q = !1, K;
|
|
207
|
-
{
|
|
208
|
-
var tt = typeof WeakMap == "function" ? WeakMap : Map;
|
|
209
|
-
K = new tt();
|
|
210
|
-
}
|
|
211
|
-
function Oe(e, n) {
|
|
212
|
-
if (!e || q)
|
|
213
|
-
return "";
|
|
214
|
-
{
|
|
215
|
-
var i = K.get(e);
|
|
216
|
-
if (i !== void 0)
|
|
217
|
-
return i;
|
|
218
|
-
}
|
|
219
|
-
var d;
|
|
220
|
-
q = !0;
|
|
221
|
-
var b = Error.prepareStackTrace;
|
|
222
|
-
Error.prepareStackTrace = void 0;
|
|
223
|
-
var x;
|
|
224
|
-
x = O.current, O.current = null, Le();
|
|
225
|
-
try {
|
|
226
|
-
if (n) {
|
|
227
|
-
var h = function() {
|
|
228
|
-
throw Error();
|
|
229
|
-
};
|
|
230
|
-
if (Object.defineProperty(h.prototype, "props", {
|
|
231
|
-
set: function() {
|
|
232
|
-
throw Error();
|
|
233
|
-
}
|
|
234
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
235
|
-
try {
|
|
236
|
-
Reflect.construct(h, []);
|
|
237
|
-
} catch (B) {
|
|
238
|
-
d = B;
|
|
239
|
-
}
|
|
240
|
-
Reflect.construct(e, [], h);
|
|
241
|
-
} else {
|
|
242
|
-
try {
|
|
243
|
-
h.call();
|
|
244
|
-
} catch (B) {
|
|
245
|
-
d = B;
|
|
246
|
-
}
|
|
247
|
-
e.call(h.prototype);
|
|
248
|
-
}
|
|
249
|
-
} else {
|
|
250
|
-
try {
|
|
251
|
-
throw Error();
|
|
252
|
-
} catch (B) {
|
|
253
|
-
d = B;
|
|
254
|
-
}
|
|
255
|
-
e();
|
|
256
|
-
}
|
|
257
|
-
} catch (B) {
|
|
258
|
-
if (B && d && typeof B.stack == "string") {
|
|
259
|
-
for (var v = B.stack.split(`
|
|
260
|
-
`), U = d.stack.split(`
|
|
261
|
-
`), T = v.length - 1, F = U.length - 1; T >= 1 && F >= 0 && v[T] !== U[F]; )
|
|
262
|
-
F--;
|
|
263
|
-
for (; T >= 1 && F >= 0; T--, F--)
|
|
264
|
-
if (v[T] !== U[F]) {
|
|
265
|
-
if (T !== 1 || F !== 1)
|
|
266
|
-
do
|
|
267
|
-
if (T--, F--, F < 0 || v[T] !== U[F]) {
|
|
268
|
-
var J = `
|
|
269
|
-
` + v[T].replace(" at new ", " at ");
|
|
270
|
-
return e.displayName && J.includes("<anonymous>") && (J = J.replace("<anonymous>", e.displayName)), typeof e == "function" && K.set(e, J), J;
|
|
271
|
-
}
|
|
272
|
-
while (T >= 1 && F >= 0);
|
|
273
|
-
break;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
} finally {
|
|
277
|
-
q = !1, O.current = x, Ge(), Error.prepareStackTrace = b;
|
|
278
|
-
}
|
|
279
|
-
var Pe = e ? e.displayName || e.name : "", xe = Pe ? fe(Pe) : "";
|
|
280
|
-
return typeof e == "function" && K.set(e, xe), xe;
|
|
281
|
-
}
|
|
282
|
-
function Ne(e, n, i) {
|
|
283
|
-
return Oe(e, !1);
|
|
284
|
-
}
|
|
285
|
-
function We(e) {
|
|
286
|
-
var n = e.prototype;
|
|
287
|
-
return !!(n && n.isReactComponent);
|
|
288
|
-
}
|
|
289
|
-
function $(e, n, i) {
|
|
290
|
-
if (e == null)
|
|
291
|
-
return "";
|
|
292
|
-
if (typeof e == "function")
|
|
293
|
-
return Oe(e, We(e));
|
|
294
|
-
if (typeof e == "string")
|
|
295
|
-
return fe(e);
|
|
296
|
-
switch (e) {
|
|
297
|
-
case R:
|
|
298
|
-
return fe("Suspense");
|
|
299
|
-
case y:
|
|
300
|
-
return fe("SuspenseList");
|
|
301
|
-
}
|
|
302
|
-
if (typeof e == "object")
|
|
303
|
-
switch (e.$$typeof) {
|
|
304
|
-
case g:
|
|
305
|
-
return Ne(e.render);
|
|
306
|
-
case m:
|
|
307
|
-
return $(e.type, n, i);
|
|
308
|
-
case A: {
|
|
309
|
-
var d = e, b = d._payload, x = d._init;
|
|
310
|
-
try {
|
|
311
|
-
return $(x(b), n, i);
|
|
312
|
-
} catch {
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
return "";
|
|
317
|
-
}
|
|
318
|
-
var ae = Object.prototype.hasOwnProperty, Me = {}, je = X.ReactDebugCurrentFrame;
|
|
319
|
-
function be(e) {
|
|
320
|
-
if (e) {
|
|
321
|
-
var n = e._owner, i = $(e.type, e._source, n ? n.type : null);
|
|
322
|
-
je.setExtraStackFrame(i);
|
|
323
|
-
} else
|
|
324
|
-
je.setExtraStackFrame(null);
|
|
325
|
-
}
|
|
326
|
-
function rt(e, n, i, d, b) {
|
|
327
|
-
{
|
|
328
|
-
var x = Function.call.bind(ae);
|
|
329
|
-
for (var h in e)
|
|
330
|
-
if (x(e, h)) {
|
|
331
|
-
var v = void 0;
|
|
332
|
-
try {
|
|
333
|
-
if (typeof e[h] != "function") {
|
|
334
|
-
var U = Error((d || "React class") + ": " + i + " type `" + h + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[h] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
335
|
-
throw U.name = "Invariant Violation", U;
|
|
336
|
-
}
|
|
337
|
-
v = e[h](n, h, d, i, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
338
|
-
} catch (T) {
|
|
339
|
-
v = T;
|
|
340
|
-
}
|
|
341
|
-
v && !(v instanceof Error) && (be(b), P("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", d || "React class", i, h, typeof v), be(null)), v instanceof Error && !(v.message in Me) && (Me[v.message] = !0, be(b), P("Failed %s type: %s", i, v.message), be(null));
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
var Be = Array.isArray;
|
|
346
|
-
function ze(e) {
|
|
347
|
-
return Be(e);
|
|
348
|
-
}
|
|
349
|
-
function vt(e) {
|
|
350
|
-
{
|
|
351
|
-
var n = typeof Symbol == "function" && Symbol.toStringTag, i = n && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
352
|
-
return i;
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
function gt(e) {
|
|
356
|
-
try {
|
|
357
|
-
return nt(e), !1;
|
|
358
|
-
} catch {
|
|
359
|
-
return !0;
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
function nt(e) {
|
|
363
|
-
return "" + e;
|
|
364
|
-
}
|
|
365
|
-
function $e(e) {
|
|
366
|
-
if (gt(e))
|
|
367
|
-
return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", vt(e)), nt(e);
|
|
368
|
-
}
|
|
369
|
-
var u = X.ReactCurrentOwner, p = {
|
|
370
|
-
key: !0,
|
|
371
|
-
ref: !0,
|
|
372
|
-
__self: !0,
|
|
373
|
-
__source: !0
|
|
374
|
-
}, S, Y, V;
|
|
375
|
-
V = {};
|
|
376
|
-
function W(e) {
|
|
377
|
-
if (ae.call(e, "ref")) {
|
|
378
|
-
var n = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
379
|
-
if (n && n.isReactWarning)
|
|
380
|
-
return !1;
|
|
381
|
-
}
|
|
382
|
-
return e.ref !== void 0;
|
|
383
|
-
}
|
|
384
|
-
function de(e) {
|
|
385
|
-
if (ae.call(e, "key")) {
|
|
386
|
-
var n = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
387
|
-
if (n && n.isReactWarning)
|
|
388
|
-
return !1;
|
|
389
|
-
}
|
|
390
|
-
return e.key !== void 0;
|
|
391
|
-
}
|
|
392
|
-
function Q(e, n) {
|
|
393
|
-
if (typeof e.ref == "string" && u.current && n && u.current.stateNode !== n) {
|
|
394
|
-
var i = G(u.current.type);
|
|
395
|
-
V[i] || (P('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', G(u.current.type), e.ref), V[i] = !0);
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
function E(e, n) {
|
|
399
|
-
{
|
|
400
|
-
var i = function() {
|
|
401
|
-
S || (S = !0, P("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", n));
|
|
402
|
-
};
|
|
403
|
-
i.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
404
|
-
get: i,
|
|
405
|
-
configurable: !0
|
|
406
|
-
});
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
function D(e, n) {
|
|
410
|
-
{
|
|
411
|
-
var i = function() {
|
|
412
|
-
Y || (Y = !0, P("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", n));
|
|
413
|
-
};
|
|
414
|
-
i.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
415
|
-
get: i,
|
|
416
|
-
configurable: !0
|
|
417
|
-
});
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
var _ = function(e, n, i, d, b, x, h) {
|
|
421
|
-
var v = {
|
|
422
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
423
|
-
$$typeof: r,
|
|
424
|
-
// Built-in properties that belong on the element
|
|
425
|
-
type: e,
|
|
426
|
-
key: n,
|
|
427
|
-
ref: i,
|
|
428
|
-
props: h,
|
|
429
|
-
// Record the component responsible for creating this element.
|
|
430
|
-
_owner: x
|
|
431
|
-
};
|
|
432
|
-
return v._store = {}, Object.defineProperty(v._store, "validated", {
|
|
433
|
-
configurable: !1,
|
|
434
|
-
enumerable: !1,
|
|
435
|
-
writable: !0,
|
|
436
|
-
value: !1
|
|
437
|
-
}), Object.defineProperty(v, "_self", {
|
|
438
|
-
configurable: !1,
|
|
439
|
-
enumerable: !1,
|
|
440
|
-
writable: !1,
|
|
441
|
-
value: d
|
|
442
|
-
}), Object.defineProperty(v, "_source", {
|
|
443
|
-
configurable: !1,
|
|
444
|
-
enumerable: !1,
|
|
445
|
-
writable: !1,
|
|
446
|
-
value: b
|
|
447
|
-
}), Object.freeze && (Object.freeze(v.props), Object.freeze(v)), v;
|
|
448
|
-
};
|
|
449
|
-
function se(e, n, i, d, b) {
|
|
450
|
-
{
|
|
451
|
-
var x, h = {}, v = null, U = null;
|
|
452
|
-
i !== void 0 && ($e(i), v = "" + i), de(n) && ($e(n.key), v = "" + n.key), W(n) && (U = n.ref, Q(n, b));
|
|
453
|
-
for (x in n)
|
|
454
|
-
ae.call(n, x) && !p.hasOwnProperty(x) && (h[x] = n[x]);
|
|
455
|
-
if (e && e.defaultProps) {
|
|
456
|
-
var T = e.defaultProps;
|
|
457
|
-
for (x in T)
|
|
458
|
-
h[x] === void 0 && (h[x] = T[x]);
|
|
459
|
-
}
|
|
460
|
-
if (v || U) {
|
|
461
|
-
var F = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
462
|
-
v && E(h, F), U && D(h, F);
|
|
463
|
-
}
|
|
464
|
-
return _(e, v, U, b, d, u.current, h);
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
var pe = X.ReactCurrentOwner, Te = X.ReactDebugCurrentFrame;
|
|
468
|
-
function j(e) {
|
|
469
|
-
if (e) {
|
|
470
|
-
var n = e._owner, i = $(e.type, e._source, n ? n.type : null);
|
|
471
|
-
Te.setExtraStackFrame(i);
|
|
472
|
-
} else
|
|
473
|
-
Te.setExtraStackFrame(null);
|
|
474
|
-
}
|
|
475
|
-
var Ce;
|
|
476
|
-
Ce = !1;
|
|
477
|
-
function Ee(e) {
|
|
478
|
-
return typeof e == "object" && e !== null && e.$$typeof === r;
|
|
479
|
-
}
|
|
480
|
-
function Ae() {
|
|
481
|
-
{
|
|
482
|
-
if (pe.current) {
|
|
483
|
-
var e = G(pe.current.type);
|
|
484
|
-
if (e)
|
|
485
|
-
return `
|
|
486
|
-
|
|
487
|
-
Check the render method of \`` + e + "`.";
|
|
488
|
-
}
|
|
489
|
-
return "";
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
function Ke(e) {
|
|
493
|
-
return "";
|
|
494
|
-
}
|
|
495
|
-
var ve = {};
|
|
496
|
-
function He(e) {
|
|
497
|
-
{
|
|
498
|
-
var n = Ae();
|
|
499
|
-
if (!n) {
|
|
500
|
-
var i = typeof e == "string" ? e : e.displayName || e.name;
|
|
501
|
-
i && (n = `
|
|
502
|
-
|
|
503
|
-
Check the top-level render call using <` + i + ">.");
|
|
504
|
-
}
|
|
505
|
-
return n;
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
function mt(e, n) {
|
|
509
|
-
{
|
|
510
|
-
if (!e._store || e._store.validated || e.key != null)
|
|
511
|
-
return;
|
|
512
|
-
e._store.validated = !0;
|
|
513
|
-
var i = He(n);
|
|
514
|
-
if (ve[i])
|
|
515
|
-
return;
|
|
516
|
-
ve[i] = !0;
|
|
517
|
-
var d = "";
|
|
518
|
-
e && e._owner && e._owner !== pe.current && (d = " It was passed a child from " + G(e._owner.type) + "."), j(e), P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', i, d), j(null);
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
function ht(e, n) {
|
|
522
|
-
{
|
|
523
|
-
if (typeof e != "object")
|
|
524
|
-
return;
|
|
525
|
-
if (ze(e))
|
|
526
|
-
for (var i = 0; i < e.length; i++) {
|
|
527
|
-
var d = e[i];
|
|
528
|
-
Ee(d) && mt(d, n);
|
|
529
|
-
}
|
|
530
|
-
else if (Ee(e))
|
|
531
|
-
e._store && (e._store.validated = !0);
|
|
532
|
-
else if (e) {
|
|
533
|
-
var b = te(e);
|
|
534
|
-
if (typeof b == "function" && b !== e.entries)
|
|
535
|
-
for (var x = b.call(e), h; !(h = x.next()).done; )
|
|
536
|
-
Ee(h.value) && mt(h.value, n);
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
function Dt(e) {
|
|
541
|
-
{
|
|
542
|
-
var n = e.type;
|
|
543
|
-
if (n == null || typeof n == "string")
|
|
544
|
-
return;
|
|
545
|
-
var i;
|
|
546
|
-
if (typeof n == "function")
|
|
547
|
-
i = n.propTypes;
|
|
548
|
-
else if (typeof n == "object" && (n.$$typeof === g || // Note: Memo only checks outer props here.
|
|
549
|
-
// Inner props are checked in the reconciler.
|
|
550
|
-
n.$$typeof === m))
|
|
551
|
-
i = n.propTypes;
|
|
552
|
-
else
|
|
553
|
-
return;
|
|
554
|
-
if (i) {
|
|
555
|
-
var d = G(n);
|
|
556
|
-
rt(i, e.props, "prop", d, e);
|
|
557
|
-
} else if (n.PropTypes !== void 0 && !Ce) {
|
|
558
|
-
Ce = !0;
|
|
559
|
-
var b = G(n);
|
|
560
|
-
P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", b || "Unknown");
|
|
561
|
-
}
|
|
562
|
-
typeof n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved && P("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
function Lt(e) {
|
|
566
|
-
{
|
|
567
|
-
for (var n = Object.keys(e.props), i = 0; i < n.length; i++) {
|
|
568
|
-
var d = n[i];
|
|
569
|
-
if (d !== "children" && d !== "key") {
|
|
570
|
-
j(e), P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", d), j(null);
|
|
571
|
-
break;
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
e.ref !== null && (j(e), P("Invalid attribute `ref` supplied to `React.Fragment`."), j(null));
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
var yt = {};
|
|
578
|
-
function bt(e, n, i, d, b, x) {
|
|
579
|
-
{
|
|
580
|
-
var h = M(e);
|
|
581
|
-
if (!h) {
|
|
582
|
-
var v = "";
|
|
583
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (v += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
584
|
-
var U = Ke();
|
|
585
|
-
U ? v += U : v += Ae();
|
|
586
|
-
var T;
|
|
587
|
-
e === null ? T = "null" : ze(e) ? T = "array" : e !== void 0 && e.$$typeof === r ? (T = "<" + (G(e.type) || "Unknown") + " />", v = " Did you accidentally export a JSX literal instead of a component?") : T = typeof e, P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", T, v);
|
|
588
|
-
}
|
|
589
|
-
var F = se(e, n, i, b, x);
|
|
590
|
-
if (F == null)
|
|
591
|
-
return F;
|
|
592
|
-
if (h) {
|
|
593
|
-
var J = n.children;
|
|
594
|
-
if (J !== void 0)
|
|
595
|
-
if (d)
|
|
596
|
-
if (ze(J)) {
|
|
597
|
-
for (var Pe = 0; Pe < J.length; Pe++)
|
|
598
|
-
ht(J[Pe], e);
|
|
599
|
-
Object.freeze && Object.freeze(J);
|
|
600
|
-
} else
|
|
601
|
-
P("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
602
|
-
else
|
|
603
|
-
ht(J, e);
|
|
604
|
-
}
|
|
605
|
-
if (ae.call(n, "key")) {
|
|
606
|
-
var xe = G(e), B = Object.keys(n).filter(function(Vt) {
|
|
607
|
-
return Vt !== "key";
|
|
608
|
-
}), ot = B.length > 0 ? "{key: someKey, " + B.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
609
|
-
if (!yt[xe + ot]) {
|
|
610
|
-
var Yt = B.length > 0 ? "{" + B.join(": ..., ") + ": ...}" : "{}";
|
|
611
|
-
P(`A props object containing a "key" prop is being spread into JSX:
|
|
612
|
-
let props = %s;
|
|
613
|
-
<%s {...props} />
|
|
614
|
-
React keys must be passed directly to JSX without using spread:
|
|
615
|
-
let props = %s;
|
|
616
|
-
<%s key={someKey} {...props} />`, ot, xe, Yt, xe), yt[xe + ot] = !0;
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
return e === s ? Lt(F) : Dt(F), F;
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
function Nt(e, n, i) {
|
|
623
|
-
return bt(e, n, i, !0);
|
|
624
|
-
}
|
|
625
|
-
function Wt(e, n, i) {
|
|
626
|
-
return bt(e, n, i, !1);
|
|
627
|
-
}
|
|
628
|
-
var Mt = Wt, $t = Nt;
|
|
629
|
-
Ve.Fragment = s, Ve.jsx = Mt, Ve.jsxs = $t;
|
|
630
|
-
}()), Ve;
|
|
20
|
+
function Ft(e) {
|
|
21
|
+
return e == null ? void 0 : e[0];
|
|
631
22
|
}
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
const [lr, ge] = cr();
|
|
635
|
-
function cr() {
|
|
636
|
-
const t = Ze.createContext(void 0);
|
|
637
|
-
t.displayName = "AutoCompleteContext";
|
|
638
|
-
function r() {
|
|
639
|
-
var a;
|
|
640
|
-
const o = Ze.useContext(t), s = "useAutoCompleteContext: `context` is undefined. Seems you forgot to wrap all autoomplete components within `<AutoComplete />`";
|
|
641
|
-
if (!o) {
|
|
642
|
-
const l = new Error(s);
|
|
643
|
-
throw l.name = "ContextError", (a = Error.captureStackTrace) == null || a.call(Error, l, r), l;
|
|
644
|
-
}
|
|
645
|
-
return o;
|
|
646
|
-
}
|
|
647
|
-
return [t.Provider, r, t];
|
|
23
|
+
function Ne(e) {
|
|
24
|
+
return e != null && e.length ? e[e.length - 1] : void 0;
|
|
648
25
|
}
|
|
649
|
-
function
|
|
650
|
-
|
|
26
|
+
function et(e, t, n = 1, r = !0) {
|
|
27
|
+
if (t === 0) return -1;
|
|
28
|
+
let o = e + n;
|
|
29
|
+
return e === -1 && (o = n > 0 ? 0 : t - 1), r ? o = (o % t + t) % t : o = Math.max(0, Math.min(o, t - 1)), o;
|
|
651
30
|
}
|
|
652
|
-
function
|
|
653
|
-
return
|
|
31
|
+
function Lt(e, t, n = !0) {
|
|
32
|
+
return et(e, t, -1, n);
|
|
654
33
|
}
|
|
655
|
-
function
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
return t === -1 && (a = o > 0 ? 0 : r - 1), s ? a = (a % r + r) % r : a = Math.max(0, Math.min(a, r - 1)), a;
|
|
34
|
+
function Nt(e, t, n = !0) {
|
|
35
|
+
const r = et(e, t.length, 1, n);
|
|
36
|
+
return t[r];
|
|
659
37
|
}
|
|
660
|
-
function
|
|
661
|
-
|
|
38
|
+
function Pt(e, t, n = !0) {
|
|
39
|
+
const r = Lt(e, t.length, n);
|
|
40
|
+
return t[r];
|
|
662
41
|
}
|
|
663
|
-
function
|
|
664
|
-
|
|
665
|
-
return r[s];
|
|
42
|
+
function De(e) {
|
|
43
|
+
return Array.isArray(e);
|
|
666
44
|
}
|
|
667
|
-
function
|
|
668
|
-
|
|
669
|
-
return r[s];
|
|
45
|
+
function Dt(e) {
|
|
46
|
+
return De(e) && e.length === 0;
|
|
670
47
|
}
|
|
671
|
-
function
|
|
672
|
-
return
|
|
48
|
+
function Re(e) {
|
|
49
|
+
return e !== null && typeof e == "object" && !De(e);
|
|
673
50
|
}
|
|
674
|
-
function
|
|
675
|
-
return
|
|
51
|
+
function Rt(e) {
|
|
52
|
+
return Re(e) && Object.keys(e).length === 0;
|
|
676
53
|
}
|
|
677
|
-
function
|
|
678
|
-
return
|
|
54
|
+
function Te(e) {
|
|
55
|
+
return De(e) ? Dt(e) : Re(e) ? Rt(e) : e == null || e === "";
|
|
679
56
|
}
|
|
680
|
-
function
|
|
681
|
-
return
|
|
57
|
+
function ce(e) {
|
|
58
|
+
return typeof e > "u";
|
|
682
59
|
}
|
|
683
|
-
function
|
|
684
|
-
return
|
|
60
|
+
function tt(e) {
|
|
61
|
+
return typeof e < "u";
|
|
685
62
|
}
|
|
686
|
-
function
|
|
687
|
-
|
|
63
|
+
function Tt(e, t) {
|
|
64
|
+
const n = {};
|
|
65
|
+
return t.forEach((r) => {
|
|
66
|
+
r in e && (n[r] = e[r]);
|
|
67
|
+
}), n;
|
|
688
68
|
}
|
|
689
|
-
function
|
|
690
|
-
|
|
69
|
+
function Me(e, t) {
|
|
70
|
+
const n = { ...e };
|
|
71
|
+
return t.forEach((r) => {
|
|
72
|
+
delete n[r];
|
|
73
|
+
}), n;
|
|
691
74
|
}
|
|
692
|
-
function
|
|
693
|
-
|
|
694
|
-
return r.forEach((s) => {
|
|
695
|
-
s in t && (o[s] = t[s]);
|
|
696
|
-
}), o;
|
|
75
|
+
function Mt(e) {
|
|
76
|
+
return typeof e == "function";
|
|
697
77
|
}
|
|
698
|
-
function
|
|
699
|
-
|
|
700
|
-
return r.forEach((s) => {
|
|
701
|
-
delete o[s];
|
|
702
|
-
}), o;
|
|
78
|
+
function m(e, ...t) {
|
|
79
|
+
return Mt(e) ? e(...t) : e;
|
|
703
80
|
}
|
|
704
|
-
function
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
var
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
if (r(c))
|
|
714
|
-
return c;
|
|
715
|
-
if (!((o = c.props) === null || o === void 0) && o.children) {
|
|
716
|
-
var f = et(c.props.children, r);
|
|
717
|
-
if (f)
|
|
718
|
-
return f;
|
|
81
|
+
var de = function(e, t) {
|
|
82
|
+
for (var n, r = fe.Children.toArray(e), o = 0, l = r; o < l.length; o++) {
|
|
83
|
+
var i = l[o];
|
|
84
|
+
if (t(i))
|
|
85
|
+
return i;
|
|
86
|
+
if (!((n = i.props) === null || n === void 0) && n.children) {
|
|
87
|
+
var u = de(i.props.children, t);
|
|
88
|
+
if (u)
|
|
89
|
+
return u;
|
|
719
90
|
}
|
|
720
91
|
}
|
|
721
|
-
},
|
|
722
|
-
for (var
|
|
723
|
-
|
|
724
|
-
return
|
|
725
|
-
},
|
|
726
|
-
for (var
|
|
727
|
-
var
|
|
728
|
-
|
|
92
|
+
}, ae = function(e, t) {
|
|
93
|
+
for (var n = 0, r = t.length, o = e.length; n < r; n++, o++)
|
|
94
|
+
e[o] = t[n];
|
|
95
|
+
return e;
|
|
96
|
+
}, nt = function(e, t) {
|
|
97
|
+
for (var n, r = fe.Children.toArray(e), o = [], l = 0, i = r; l < i.length; l++) {
|
|
98
|
+
var u = i[l];
|
|
99
|
+
t(u) && (o = ae(ae([], o), [u])), !((n = u.props) === null || n === void 0) && n.children && (o = ae(ae([], o), nt(u.props.children, t)));
|
|
729
100
|
}
|
|
730
|
-
return
|
|
101
|
+
return o;
|
|
731
102
|
};
|
|
732
|
-
function
|
|
733
|
-
function
|
|
734
|
-
|
|
735
|
-
let
|
|
736
|
-
for (let
|
|
737
|
-
|
|
738
|
-
return
|
|
103
|
+
function $e(e, t, n = 2) {
|
|
104
|
+
function r(c, O) {
|
|
105
|
+
c = " ".repeat(O - 1) + c.toLowerCase() + " ".repeat(O - 1);
|
|
106
|
+
let C = new Array(c.length - O + 1);
|
|
107
|
+
for (let I = 0; I < C.length; I++)
|
|
108
|
+
C[I] = c.slice(I, I + O);
|
|
109
|
+
return C;
|
|
739
110
|
}
|
|
740
|
-
if (!(
|
|
111
|
+
if (!(e != null && e.length) || !(t != null && t.length))
|
|
741
112
|
return 0;
|
|
742
|
-
let
|
|
743
|
-
for (let
|
|
744
|
-
|
|
745
|
-
return
|
|
113
|
+
let o = e.length < t.length ? e : t, l = e.length < t.length ? t : e, i = r(o, n), u = r(l, n), v = new Set(i), h = u.length, b = 0;
|
|
114
|
+
for (let c of u)
|
|
115
|
+
v.delete(c) && b++;
|
|
116
|
+
return b / h;
|
|
746
117
|
}
|
|
747
|
-
const
|
|
748
|
-
var
|
|
749
|
-
return (
|
|
750
|
-
},
|
|
751
|
-
new RegExp(
|
|
752
|
-
(
|
|
753
|
-
),
|
|
754
|
-
|
|
755
|
-
(
|
|
756
|
-
var
|
|
757
|
-
return ((
|
|
118
|
+
const _e = (e) => {
|
|
119
|
+
var t;
|
|
120
|
+
return (t = typeof e == "string" || typeof e == "number" ? e : e[Object.keys(e)[0]]) == null ? void 0 : t.toString();
|
|
121
|
+
}, _t = (e, t) => typeof e != "string" || Te(t) ? e : e.toString().replace(
|
|
122
|
+
new RegExp(kt(t), "gi"),
|
|
123
|
+
(r) => `<mark>${r}</mark>`
|
|
124
|
+
), Gt = (e) => nt(
|
|
125
|
+
e,
|
|
126
|
+
(n) => {
|
|
127
|
+
var r;
|
|
128
|
+
return ((r = n == null ? void 0 : n.type) == null ? void 0 : r.displayName) === "AutoCompleteItem";
|
|
758
129
|
}
|
|
759
|
-
).map((
|
|
760
|
-
const
|
|
761
|
-
return { ...
|
|
762
|
-
}),
|
|
130
|
+
).map((n) => {
|
|
131
|
+
const r = Tt(n.props, ["value", "label", "fixed", "disabled"]), { getValue: o = _e } = n.props, l = o(r.value);
|
|
132
|
+
return { ...tt(r.label) ? r : { ...r, label: l }, value: l, originalValue: r.value };
|
|
133
|
+
}), Wt = () => ({
|
|
763
134
|
bg: "whiteAlpha.100",
|
|
764
135
|
_light: {
|
|
765
136
|
bg: "gray.200"
|
|
766
137
|
}
|
|
767
|
-
}),
|
|
768
|
-
function
|
|
769
|
-
return
|
|
138
|
+
}), jt = (e, t, n) => (t == null ? void 0 : t.toLowerCase().indexOf(e == null ? void 0 : e.toLowerCase())) >= 0 || (n == null ? void 0 : n.toLowerCase().indexOf(e == null ? void 0 : e.toLowerCase())) >= 0 || $e(e, t) >= 0.5 || $e(e, n) >= 0.5;
|
|
139
|
+
function kt(e) {
|
|
140
|
+
return e.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
770
141
|
}
|
|
771
|
-
const
|
|
772
|
-
|
|
773
|
-
(
|
|
774
|
-
var
|
|
775
|
-
return ((
|
|
142
|
+
const zt = (e, t) => de(
|
|
143
|
+
e,
|
|
144
|
+
(r) => {
|
|
145
|
+
var o;
|
|
146
|
+
return ((o = r == null ? void 0 : r.type) == null ? void 0 : o.displayName) === "AutoCompleteItem" && r.props.value === (t == null ? void 0 : t.value);
|
|
776
147
|
}
|
|
777
|
-
),
|
|
778
|
-
|
|
779
|
-
(
|
|
780
|
-
var
|
|
781
|
-
return ((
|
|
148
|
+
), Bt = (e, t) => de(
|
|
149
|
+
e,
|
|
150
|
+
(r) => {
|
|
151
|
+
var o;
|
|
152
|
+
return ((o = r == null ? void 0 : r.type) == null ? void 0 : o.displayName) === "AutoCompleteItem" && r.props.value === (t == null ? void 0 : t.value);
|
|
782
153
|
}
|
|
783
|
-
),
|
|
784
|
-
|
|
785
|
-
var
|
|
786
|
-
const
|
|
787
|
-
((
|
|
788
|
-
((l =
|
|
154
|
+
), Ht = (e, t) => tt(
|
|
155
|
+
de(e, (n) => {
|
|
156
|
+
var o, l;
|
|
157
|
+
const r = m(
|
|
158
|
+
((o = n.props) == null ? void 0 : o.getValue) || _e,
|
|
159
|
+
((l = n.props) == null ? void 0 : l.value) || {}
|
|
789
160
|
);
|
|
790
|
-
return
|
|
161
|
+
return t.some((i) => i.value === r);
|
|
791
162
|
})
|
|
792
|
-
),
|
|
793
|
-
const
|
|
794
|
-
return
|
|
163
|
+
), Ut = (e, t) => {
|
|
164
|
+
const n = {}, r = {}, { field: o } = e;
|
|
165
|
+
return o && Object.keys(o).forEach((l) => {
|
|
795
166
|
if (l.startsWith("--input") === !1)
|
|
796
|
-
|
|
167
|
+
n[l] = o[l];
|
|
797
168
|
else {
|
|
798
|
-
let
|
|
799
|
-
const
|
|
800
|
-
return
|
|
169
|
+
let i = o[l];
|
|
170
|
+
const v = l.replace("--input-", "").replace(/-([a-z])/g, function(h) {
|
|
171
|
+
return h[1].toUpperCase();
|
|
801
172
|
});
|
|
802
|
-
|
|
173
|
+
i.indexOf(".") !== -1 && (i = i.substring(i.indexOf(".") + 1)), r[v] = i;
|
|
803
174
|
}
|
|
804
175
|
}), {
|
|
805
|
-
...
|
|
806
|
-
...
|
|
807
|
-
...
|
|
808
|
-
_focusWithin:
|
|
176
|
+
...t && {
|
|
177
|
+
...n,
|
|
178
|
+
...r,
|
|
179
|
+
_focusWithin: e.field._focus,
|
|
809
180
|
pos: "relative",
|
|
810
181
|
minH: 9,
|
|
811
182
|
// px: 3,
|
|
@@ -817,542 +188,542 @@ const Sr = (t, r) => et(
|
|
|
817
188
|
// w: "full",
|
|
818
189
|
};
|
|
819
190
|
};
|
|
820
|
-
function
|
|
821
|
-
var
|
|
191
|
+
function Vt(e) {
|
|
192
|
+
var He;
|
|
822
193
|
let {
|
|
823
|
-
prefocusFirstItem:
|
|
824
|
-
closeOnBlur:
|
|
825
|
-
creatable:
|
|
826
|
-
emphasize:
|
|
194
|
+
prefocusFirstItem: t = !0,
|
|
195
|
+
closeOnBlur: n = !0,
|
|
196
|
+
creatable: r,
|
|
197
|
+
emphasize: o,
|
|
827
198
|
emptyState: l = !0,
|
|
828
|
-
defaultEmptyStateProps:
|
|
829
|
-
freeSolo:
|
|
830
|
-
isReadOnly:
|
|
831
|
-
listAllValuesOnFocus:
|
|
832
|
-
maxSuggestions:
|
|
833
|
-
multiple:
|
|
834
|
-
closeOnSelect:
|
|
835
|
-
defaultValue:
|
|
836
|
-
defaultValues:
|
|
837
|
-
onReady:
|
|
838
|
-
defaultIsOpen:
|
|
839
|
-
disableFilter:
|
|
840
|
-
isLoading:
|
|
841
|
-
placement:
|
|
842
|
-
restoreOnBlurIfEmpty:
|
|
843
|
-
shouldRenderSuggestions:
|
|
844
|
-
submitKeys:
|
|
845
|
-
suggestWhenEmpty:
|
|
846
|
-
value:
|
|
847
|
-
values:
|
|
848
|
-
} =
|
|
849
|
-
|
|
850
|
-
const { isOpen:
|
|
851
|
-
() =>
|
|
852
|
-
isOpen:
|
|
853
|
-
onClose:
|
|
854
|
-
onOpen:
|
|
199
|
+
defaultEmptyStateProps: i = {},
|
|
200
|
+
freeSolo: u,
|
|
201
|
+
isReadOnly: v,
|
|
202
|
+
listAllValuesOnFocus: h,
|
|
203
|
+
maxSuggestions: b,
|
|
204
|
+
multiple: c,
|
|
205
|
+
closeOnSelect: O = !c,
|
|
206
|
+
defaultValue: C,
|
|
207
|
+
defaultValues: I = C ? [C] : [],
|
|
208
|
+
onReady: H,
|
|
209
|
+
defaultIsOpen: j,
|
|
210
|
+
disableFilter: ne,
|
|
211
|
+
isLoading: ge = !1,
|
|
212
|
+
placement: oe = "bottom",
|
|
213
|
+
restoreOnBlurIfEmpty: Y = !u,
|
|
214
|
+
shouldRenderSuggestions: me = () => !0,
|
|
215
|
+
submitKeys: ve = [],
|
|
216
|
+
suggestWhenEmpty: re,
|
|
217
|
+
value: k,
|
|
218
|
+
values: J = k ? typeof k == "string" ? [k] : [...k] : void 0
|
|
219
|
+
} = e;
|
|
220
|
+
u = u || (c ? !0 : e.freeSolo);
|
|
221
|
+
const { isOpen: w, onClose: _, onOpen: U } = ct({ defaultIsOpen: j }), he = ue(
|
|
222
|
+
() => m(e.children, {
|
|
223
|
+
isOpen: w,
|
|
224
|
+
onClose: _,
|
|
225
|
+
onOpen: U
|
|
855
226
|
}),
|
|
856
|
-
[
|
|
857
|
-
),
|
|
858
|
-
let
|
|
859
|
-
|
|
860
|
-
const [
|
|
861
|
-
() =>
|
|
862
|
-
(
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
) ||
|
|
227
|
+
[e.children, w]
|
|
228
|
+
), E = ue(() => Gt(he), [he]), N = te(null), Ge = te(null), X = te(null), V = te(null), [We, se] = Le(!1);
|
|
229
|
+
let le = "";
|
|
230
|
+
c ? le = "" : ce(I) ? ce(J) || (le = J[0]) : le = I[0];
|
|
231
|
+
const [R, Z] = Le(le ?? ""), ye = ue(
|
|
232
|
+
() => ne ? E : E.filter(
|
|
233
|
+
(s) => s.fixed || m(
|
|
234
|
+
e.filter || jt,
|
|
235
|
+
R,
|
|
236
|
+
s.value,
|
|
237
|
+
s.label
|
|
238
|
+
) || We
|
|
868
239
|
).filter(
|
|
869
|
-
(
|
|
240
|
+
(s, a) => b ? s.fixed || a < b : !0
|
|
870
241
|
),
|
|
871
|
-
[
|
|
872
|
-
),
|
|
873
|
-
defaultValue:
|
|
874
|
-
value:
|
|
875
|
-
onChange: (
|
|
876
|
-
const
|
|
877
|
-
if (!
|
|
878
|
-
const
|
|
879
|
-
(
|
|
242
|
+
[R, E, We, b, ne]
|
|
243
|
+
), je = r ? [{ value: R, noFilter: !0, creatable: !0 }] : [], y = ue(() => [...ye, ...je], [ye, je]), [T, be] = ft({
|
|
244
|
+
defaultValue: I.map((s) => s == null ? void 0 : s.toString()),
|
|
245
|
+
value: J,
|
|
246
|
+
onChange: (s) => {
|
|
247
|
+
const a = y.find((F) => F.value === s[0]);
|
|
248
|
+
if (!a) return;
|
|
249
|
+
const d = s.map(
|
|
250
|
+
(F) => y.find((L) => L.value === F)
|
|
880
251
|
);
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
252
|
+
m(
|
|
253
|
+
e.onChange,
|
|
254
|
+
c ? s : s[0],
|
|
255
|
+
c ? d : a
|
|
885
256
|
);
|
|
886
257
|
}
|
|
887
258
|
});
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
}, [
|
|
891
|
-
const [
|
|
892
|
-
|
|
893
|
-
),
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
!!
|
|
897
|
-
),
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
!!
|
|
901
|
-
),
|
|
902
|
-
(
|
|
259
|
+
D(() => {
|
|
260
|
+
y.length === 0 && !l && w && _();
|
|
261
|
+
}, [y.length, l, w]);
|
|
262
|
+
const [Q, G] = Le(
|
|
263
|
+
t ? (He = E[0]) == null ? void 0 : He.value : null
|
|
264
|
+
), st = e.maxSelections || T.length + 1, Ce = y.findIndex((s) => s.value === Q), Se = Nt(
|
|
265
|
+
Ce,
|
|
266
|
+
y,
|
|
267
|
+
!!e.rollNavigation
|
|
268
|
+
), xe = Pt(
|
|
269
|
+
Ce,
|
|
270
|
+
y,
|
|
271
|
+
!!e.rollNavigation
|
|
272
|
+
), P = Ft(y), Ae = Ne(y), ke = !y.some(
|
|
273
|
+
(s) => s.value === Q
|
|
903
274
|
);
|
|
904
|
-
|
|
905
|
-
var
|
|
906
|
-
|
|
907
|
-
}, [
|
|
908
|
-
|
|
909
|
-
}, [
|
|
910
|
-
var
|
|
911
|
-
!
|
|
912
|
-
}, [
|
|
913
|
-
|
|
914
|
-
}, [
|
|
915
|
-
const
|
|
916
|
-
|
|
917
|
-
item:
|
|
918
|
-
focusMethod:
|
|
919
|
-
isNewInput:
|
|
275
|
+
D(() => {
|
|
276
|
+
var s;
|
|
277
|
+
ke && G(t ? (s = E[0]) == null ? void 0 : s.value : null);
|
|
278
|
+
}, [ke]), pt(() => {
|
|
279
|
+
t && G(P == null ? void 0 : P.value);
|
|
280
|
+
}, [R, P == null ? void 0 : P.value]), D(() => {
|
|
281
|
+
var s;
|
|
282
|
+
!w && t && G((s = E[0]) == null ? void 0 : s.value);
|
|
283
|
+
}, [w]), D(() => {
|
|
284
|
+
w && h && se(!0);
|
|
285
|
+
}, [w, h, se]), D(() => {
|
|
286
|
+
const s = E.find((a) => a.value === Q);
|
|
287
|
+
m(e.onOptionFocus, {
|
|
288
|
+
item: s,
|
|
289
|
+
focusMethod: V.current,
|
|
290
|
+
isNewInput: s == null ? void 0 : s.creatable
|
|
920
291
|
});
|
|
921
|
-
}, [
|
|
922
|
-
const
|
|
923
|
-
var
|
|
924
|
-
const
|
|
925
|
-
|
|
926
|
-
item:
|
|
927
|
-
selectMethod:
|
|
928
|
-
isNewInput:
|
|
929
|
-
}),
|
|
930
|
-
item:
|
|
931
|
-
selectMethod:
|
|
932
|
-
}),
|
|
933
|
-
},
|
|
934
|
-
var
|
|
935
|
-
|
|
936
|
-
const
|
|
937
|
-
return
|
|
292
|
+
}, [Q, e.onOptionFocus]);
|
|
293
|
+
const Ie = (s) => {
|
|
294
|
+
var F, L;
|
|
295
|
+
const a = y.find((x) => x.value === s), d = (a == null ? void 0 : a.label) || (a == null ? void 0 : a.value);
|
|
296
|
+
Z(() => c ? "" : d ?? ""), !T.includes(s) && T.length < st && be((x) => c ? [...x, s] : [s]), c && ((F = N.current) == null || F.focus()), e.focusInputOnSelect && ((L = N.current) == null || L.focus()), m(e.onSelectOption, {
|
|
297
|
+
item: a,
|
|
298
|
+
selectMethod: V.current,
|
|
299
|
+
isNewInput: a == null ? void 0 : a.creatable
|
|
300
|
+
}), a != null && a.creatable && m(e.onCreateOption, {
|
|
301
|
+
item: Me(a, ["noFilter"]),
|
|
302
|
+
selectMethod: V.current
|
|
303
|
+
}), O && _();
|
|
304
|
+
}, ze = (s, a) => {
|
|
305
|
+
var L;
|
|
306
|
+
be((x) => {
|
|
307
|
+
const $ = E.find((M) => M.value === s);
|
|
308
|
+
return $ ? (m(e.onTagRemoved, s, $, x), x.filter((M) => M !== s)) : x;
|
|
938
309
|
});
|
|
939
|
-
const
|
|
940
|
-
|
|
941
|
-
},
|
|
942
|
-
var
|
|
943
|
-
|
|
944
|
-
}, Be =
|
|
945
|
-
var
|
|
310
|
+
const d = E.find((x) => x.value === s), F = (d == null ? void 0 : d.label) || (d == null ? void 0 : d.value);
|
|
311
|
+
R === F && Z(""), a && ((L = N.current) == null || L.focus());
|
|
312
|
+
}, lt = (s) => {
|
|
313
|
+
var a;
|
|
314
|
+
be([]), s && ((a = N.current) == null || a.focus());
|
|
315
|
+
}, Be = c ? T.map((s) => {
|
|
316
|
+
var a;
|
|
946
317
|
return {
|
|
947
|
-
label: ((
|
|
948
|
-
onRemove: () =>
|
|
318
|
+
label: ((a = E.find((d) => d.value === (s == null ? void 0 : s.toString()))) == null ? void 0 : a.label) || s,
|
|
319
|
+
onRemove: () => ze(s)
|
|
949
320
|
};
|
|
950
321
|
}) : [];
|
|
951
|
-
return
|
|
952
|
-
|
|
953
|
-
}, [
|
|
954
|
-
autoCompleteProps:
|
|
955
|
-
children:
|
|
956
|
-
filteredList:
|
|
957
|
-
filteredResults:
|
|
958
|
-
focusedValue:
|
|
959
|
-
defaultEmptyStateProps:
|
|
960
|
-
getEmptyStateProps: (
|
|
961
|
-
if (
|
|
962
|
-
return typeof l == "boolean" ?
|
|
322
|
+
return D(() => {
|
|
323
|
+
m(H, { tags: Be });
|
|
324
|
+
}, [T]), {
|
|
325
|
+
autoCompleteProps: e,
|
|
326
|
+
children: he,
|
|
327
|
+
filteredList: y,
|
|
328
|
+
filteredResults: ye,
|
|
329
|
+
focusedValue: Q,
|
|
330
|
+
defaultEmptyStateProps: i,
|
|
331
|
+
getEmptyStateProps: (s) => {
|
|
332
|
+
if (y.every((d) => d.noFilter) && l && !r)
|
|
333
|
+
return typeof l == "boolean" ? s : m(l, { query: R });
|
|
963
334
|
},
|
|
964
|
-
getGroupProps: (
|
|
965
|
-
const
|
|
335
|
+
getGroupProps: (s) => {
|
|
336
|
+
const a = Ht(s.children, y);
|
|
966
337
|
return {
|
|
967
338
|
divider: {
|
|
968
|
-
hasFirstChild:
|
|
969
|
-
hasLastChild:
|
|
970
|
-
|
|
971
|
-
|
|
339
|
+
hasFirstChild: zt(s.children, P),
|
|
340
|
+
hasLastChild: Bt(
|
|
341
|
+
s.children,
|
|
342
|
+
Ne(y.filter((d) => ce(d == null ? void 0 : d.noFilter)))
|
|
972
343
|
)
|
|
973
344
|
},
|
|
974
345
|
group: {
|
|
975
|
-
display:
|
|
346
|
+
display: a ? "initial" : "none"
|
|
976
347
|
}
|
|
977
348
|
};
|
|
978
349
|
},
|
|
979
|
-
getInputProps: (
|
|
980
|
-
const { onBlur:
|
|
350
|
+
getInputProps: (s, a) => {
|
|
351
|
+
const { onBlur: d, onChange: F, onFocus: L, onKeyDown: x, variant: $, ...M } = s;
|
|
981
352
|
return {
|
|
982
353
|
wrapper: {
|
|
983
|
-
ref:
|
|
354
|
+
ref: Ge,
|
|
984
355
|
onClick: () => {
|
|
985
|
-
var
|
|
986
|
-
(
|
|
356
|
+
var f;
|
|
357
|
+
(f = N == null ? void 0 : N.current) == null || f.focus();
|
|
987
358
|
},
|
|
988
|
-
...
|
|
989
|
-
...
|
|
359
|
+
...Ut(a, c),
|
|
360
|
+
...M
|
|
990
361
|
},
|
|
991
362
|
input: {
|
|
992
|
-
isReadOnly:
|
|
993
|
-
onFocus: (
|
|
994
|
-
|
|
363
|
+
isReadOnly: v,
|
|
364
|
+
onFocus: (f) => {
|
|
365
|
+
m(L, f), e.openOnFocus && !v && U(), e.selectOnFocus && f.target.select(), h && se(!0);
|
|
995
366
|
},
|
|
996
|
-
onBlur: (
|
|
997
|
-
var
|
|
998
|
-
|
|
999
|
-
const
|
|
1000
|
-
|
|
367
|
+
onBlur: (f) => {
|
|
368
|
+
var z, ie;
|
|
369
|
+
m(d, f);
|
|
370
|
+
const S = f.relatedTarget === (X == null ? void 0 : X.current) || ((z = X.current) == null ? void 0 : z.contains(f.relatedTarget)), g = (ie = Ge.current) == null ? void 0 : ie.contains(
|
|
371
|
+
f.relatedTarget
|
|
1001
372
|
);
|
|
1002
|
-
if (!
|
|
1003
|
-
const
|
|
1004
|
-
(Ee) => Ee.value ===
|
|
1005
|
-
),
|
|
1006
|
-
|
|
373
|
+
if (!S && !g && (n && _(), !T.includes(f.target.value) && Y)) {
|
|
374
|
+
const we = Ne(T), A = E.find(
|
|
375
|
+
(Ee) => Ee.value === we
|
|
376
|
+
), Oe = (A == null ? void 0 : A.label) || (A == null ? void 0 : A.value) || "";
|
|
377
|
+
Z(Oe);
|
|
1007
378
|
}
|
|
1008
379
|
},
|
|
1009
|
-
onChange: (
|
|
1010
|
-
const
|
|
1011
|
-
|
|
1012
|
-
const
|
|
1013
|
-
|
|
380
|
+
onChange: (f) => {
|
|
381
|
+
const S = f.target.value;
|
|
382
|
+
m(F, f), Z(S);
|
|
383
|
+
const g = Te(S);
|
|
384
|
+
m(me, S) && (!g || re) ? U() : _(), se(!1);
|
|
1014
385
|
},
|
|
1015
|
-
onKeyDown: (
|
|
1016
|
-
var
|
|
1017
|
-
|
|
1018
|
-
const { key:
|
|
1019
|
-
if (["Enter", ...
|
|
1020
|
-
|
|
386
|
+
onKeyDown: (f) => {
|
|
387
|
+
var z;
|
|
388
|
+
m(x, f), V.current = "keyboard";
|
|
389
|
+
const { key: S } = f, g = y[Ce];
|
|
390
|
+
if (["Enter", ...ve].includes(S)) {
|
|
391
|
+
g && !(g != null && g.disabled) && w ? Ie(g == null ? void 0 : g.value) : (z = N.current) == null || z.focus(), f.preventDefault();
|
|
1021
392
|
return;
|
|
1022
393
|
}
|
|
1023
|
-
if (
|
|
1024
|
-
|
|
394
|
+
if (S === "ArrowDown") {
|
|
395
|
+
w ? G(Se == null ? void 0 : Se.value) : U(), f.preventDefault();
|
|
1025
396
|
return;
|
|
1026
397
|
}
|
|
1027
|
-
if (
|
|
1028
|
-
|
|
398
|
+
if (S === "ArrowUp") {
|
|
399
|
+
w ? G(xe == null ? void 0 : xe.value) : U(), f.preventDefault();
|
|
1029
400
|
return;
|
|
1030
401
|
}
|
|
1031
|
-
if (
|
|
1032
|
-
|
|
402
|
+
if (S === "Tab") {
|
|
403
|
+
w && g && !(g != null && g.disabled) ? Ie(g == null ? void 0 : g.value) : _();
|
|
1033
404
|
return;
|
|
1034
405
|
}
|
|
1035
|
-
if (
|
|
1036
|
-
|
|
406
|
+
if (S === "Home") {
|
|
407
|
+
G(P == null ? void 0 : P.value), f.preventDefault();
|
|
1037
408
|
return;
|
|
1038
409
|
}
|
|
1039
|
-
if (
|
|
1040
|
-
|
|
410
|
+
if (S === "End") {
|
|
411
|
+
G(Ae == null ? void 0 : Ae.value), f.preventDefault();
|
|
1041
412
|
return;
|
|
1042
413
|
}
|
|
1043
|
-
|
|
414
|
+
S === "Escape" && (_(), f.preventDefault());
|
|
1044
415
|
},
|
|
1045
|
-
value:
|
|
1046
|
-
variant:
|
|
1047
|
-
...
|
|
416
|
+
value: R,
|
|
417
|
+
variant: c ? "unstyled" : $,
|
|
418
|
+
...M
|
|
1048
419
|
}
|
|
1049
420
|
};
|
|
1050
421
|
},
|
|
1051
|
-
getItemProps: (
|
|
1052
|
-
var
|
|
422
|
+
getItemProps: (s, a) => {
|
|
423
|
+
var Ue;
|
|
1053
424
|
const {
|
|
1054
|
-
_fixed:
|
|
1055
|
-
_focus:
|
|
1056
|
-
children:
|
|
1057
|
-
disabled:
|
|
1058
|
-
label:
|
|
1059
|
-
value:
|
|
1060
|
-
fixed:
|
|
1061
|
-
getValue:
|
|
1062
|
-
onClick:
|
|
1063
|
-
onMouseOver:
|
|
1064
|
-
sx:
|
|
1065
|
-
...
|
|
1066
|
-
} =
|
|
425
|
+
_fixed: d,
|
|
426
|
+
_focus: F,
|
|
427
|
+
children: L,
|
|
428
|
+
disabled: x,
|
|
429
|
+
label: $,
|
|
430
|
+
value: M,
|
|
431
|
+
fixed: f,
|
|
432
|
+
getValue: S = _e,
|
|
433
|
+
onClick: g,
|
|
434
|
+
onMouseOver: z,
|
|
435
|
+
sx: ie,
|
|
436
|
+
...we
|
|
437
|
+
} = s, A = a ? M : (Ue = S(M)) == null ? void 0 : Ue.toString(), Oe = A === Q, Ee = y.findIndex((q) => q.value === A) >= 0, Fe = L || $ || A;
|
|
1067
438
|
return {
|
|
1068
439
|
item: {
|
|
1069
|
-
...typeof
|
|
440
|
+
...typeof Fe != "string" || !o ? { children: Fe } : {
|
|
1070
441
|
dangerouslySetInnerHTML: {
|
|
1071
|
-
__html:
|
|
442
|
+
__html: _t(Fe, R)
|
|
1072
443
|
}
|
|
1073
444
|
},
|
|
1074
|
-
"aria-selected":
|
|
1075
|
-
"aria-disabled":
|
|
445
|
+
"aria-selected": T.includes(A),
|
|
446
|
+
"aria-disabled": x,
|
|
1076
447
|
_disabled: { opacity: 0.4, cursor: "not-allowed", userSelect: "none" },
|
|
1077
|
-
onClick: (
|
|
1078
|
-
var
|
|
1079
|
-
|
|
448
|
+
onClick: (q) => {
|
|
449
|
+
var Ve;
|
|
450
|
+
m(g, q), x ? (Ve = N.current) == null || Ve.focus() : Ie(A);
|
|
1080
451
|
},
|
|
1081
|
-
onMouseOver: (
|
|
1082
|
-
|
|
452
|
+
onMouseOver: (q) => {
|
|
453
|
+
m(z, q), G(A), V.current = "mouse";
|
|
1083
454
|
},
|
|
1084
455
|
sx: {
|
|
1085
|
-
...
|
|
456
|
+
...ie,
|
|
1086
457
|
mark: {
|
|
1087
458
|
color: "inherit",
|
|
1088
459
|
bg: "transparent",
|
|
1089
|
-
...
|
|
1090
|
-
fontWeight:
|
|
460
|
+
...Re(o) ? o : {
|
|
461
|
+
fontWeight: o ? "extrabold" : "inherit"
|
|
1091
462
|
}
|
|
1092
463
|
}
|
|
1093
464
|
},
|
|
1094
|
-
...
|
|
1095
|
-
...
|
|
1096
|
-
...
|
|
465
|
+
...Oe && (F || Wt()),
|
|
466
|
+
...f && d,
|
|
467
|
+
...we
|
|
1097
468
|
},
|
|
1098
469
|
root: {
|
|
1099
470
|
isValidSuggestion: Ee,
|
|
1100
|
-
value:
|
|
471
|
+
value: A
|
|
1101
472
|
}
|
|
1102
473
|
};
|
|
1103
474
|
},
|
|
1104
475
|
inputRef: N,
|
|
1105
|
-
interactionRef:
|
|
1106
|
-
isLoading:
|
|
1107
|
-
isOpen:
|
|
1108
|
-
itemList:
|
|
1109
|
-
listRef:
|
|
1110
|
-
onClose:
|
|
1111
|
-
onOpen:
|
|
1112
|
-
placement:
|
|
1113
|
-
query:
|
|
1114
|
-
removeItem:
|
|
1115
|
-
resetItems:
|
|
1116
|
-
setQuery:
|
|
476
|
+
interactionRef: V,
|
|
477
|
+
isLoading: ge,
|
|
478
|
+
isOpen: w,
|
|
479
|
+
itemList: E,
|
|
480
|
+
listRef: X,
|
|
481
|
+
onClose: _,
|
|
482
|
+
onOpen: U,
|
|
483
|
+
placement: oe,
|
|
484
|
+
query: R,
|
|
485
|
+
removeItem: ze,
|
|
486
|
+
resetItems: lt,
|
|
487
|
+
setQuery: Z,
|
|
1117
488
|
tags: Be,
|
|
1118
|
-
value:
|
|
1119
|
-
values:
|
|
489
|
+
value: k,
|
|
490
|
+
values: T
|
|
1120
491
|
};
|
|
1121
492
|
}
|
|
1122
|
-
const
|
|
1123
|
-
(
|
|
1124
|
-
const
|
|
1125
|
-
children:
|
|
1126
|
-
isOpen:
|
|
493
|
+
const Qt = B(
|
|
494
|
+
(e, t) => {
|
|
495
|
+
const n = Vt(e), {
|
|
496
|
+
children: r,
|
|
497
|
+
isOpen: o,
|
|
1127
498
|
onClose: l,
|
|
1128
|
-
onOpen:
|
|
1129
|
-
placement:
|
|
1130
|
-
resetItems:
|
|
1131
|
-
removeItem:
|
|
1132
|
-
} =
|
|
1133
|
-
|
|
1134
|
-
resetItems:
|
|
1135
|
-
removeItem:
|
|
499
|
+
onOpen: i,
|
|
500
|
+
placement: u,
|
|
501
|
+
resetItems: v,
|
|
502
|
+
removeItem: h
|
|
503
|
+
} = n;
|
|
504
|
+
ut(t, () => ({
|
|
505
|
+
resetItems: v,
|
|
506
|
+
removeItem: h
|
|
1136
507
|
}));
|
|
1137
|
-
const { matchWidth:
|
|
1138
|
-
return /* @__PURE__ */
|
|
1139
|
-
|
|
508
|
+
const { matchWidth: b = !0 } = n.autoCompleteProps;
|
|
509
|
+
return /* @__PURE__ */ p(Ot, { value: n, children: /* @__PURE__ */ p(
|
|
510
|
+
dt,
|
|
1140
511
|
{
|
|
1141
512
|
isLazy: !0,
|
|
1142
|
-
isOpen:
|
|
513
|
+
isOpen: o,
|
|
1143
514
|
onClose: l,
|
|
1144
|
-
onOpen:
|
|
515
|
+
onOpen: i,
|
|
1145
516
|
autoFocus: !1,
|
|
1146
|
-
placement:
|
|
517
|
+
placement: u,
|
|
1147
518
|
closeOnBlur: !0,
|
|
1148
|
-
matchWidth:
|
|
1149
|
-
children: /* @__PURE__ */
|
|
519
|
+
matchWidth: b,
|
|
520
|
+
children: /* @__PURE__ */ p(gt.div, { w: "full", ref: t, children: r })
|
|
1150
521
|
}
|
|
1151
522
|
) });
|
|
1152
523
|
}
|
|
1153
524
|
);
|
|
1154
|
-
|
|
1155
|
-
const
|
|
1156
|
-
(
|
|
525
|
+
Qt.displayName = "AutoComplete";
|
|
526
|
+
const $t = B(
|
|
527
|
+
(e, t) => {
|
|
1157
528
|
const {
|
|
1158
|
-
focusedValue:
|
|
1159
|
-
getItemProps:
|
|
1160
|
-
interactionRef:
|
|
1161
|
-
} =
|
|
1162
|
-
|
|
1163
|
-
var
|
|
1164
|
-
|
|
529
|
+
focusedValue: n,
|
|
530
|
+
getItemProps: r,
|
|
531
|
+
interactionRef: o
|
|
532
|
+
} = W(), l = te(), i = Pe(t, l), u = r(e), { isValidSuggestion: v, value: h } = u.root, b = n === h;
|
|
533
|
+
D(() => {
|
|
534
|
+
var H;
|
|
535
|
+
b && o.current === "keyboard" && ((H = l == null ? void 0 : l.current) == null || H.scrollIntoView({
|
|
1165
536
|
behavior: "smooth",
|
|
1166
537
|
block: "nearest"
|
|
1167
538
|
}));
|
|
1168
|
-
}, [
|
|
1169
|
-
typeof
|
|
539
|
+
}, [b, o]), D(() => {
|
|
540
|
+
typeof h != "string" && console.warn("wow"), typeof h != "string" && ce(e.getValue) && console.error(
|
|
1170
541
|
"You must define the `getValue` prop, when an Item's value is not a string"
|
|
1171
542
|
);
|
|
1172
543
|
}, []);
|
|
1173
|
-
const { children:
|
|
1174
|
-
return
|
|
544
|
+
const { children: c, dangerouslySetInnerHTML: O, ...C } = u.item, I = Me(C, ["groupId"]);
|
|
545
|
+
return v ? /* @__PURE__ */ p(pe, { ref: i, ...ot, ...I, children: c || /* @__PURE__ */ p("span", { dangerouslySetInnerHTML: O }) }) : null;
|
|
1175
546
|
}
|
|
1176
547
|
);
|
|
1177
|
-
|
|
1178
|
-
const
|
|
548
|
+
$t.displayName = "AutoCompleteItem";
|
|
549
|
+
const ot = {
|
|
1179
550
|
mx: "2",
|
|
1180
551
|
px: "2",
|
|
1181
552
|
py: "2",
|
|
1182
553
|
rounded: "md",
|
|
1183
554
|
cursor: "pointer"
|
|
1184
555
|
};
|
|
1185
|
-
function
|
|
1186
|
-
const { alwaysDisplay:
|
|
1187
|
-
autoCompleteProps:
|
|
556
|
+
function Kt(e) {
|
|
557
|
+
const { alwaysDisplay: t, children: n, ...r } = e, {
|
|
558
|
+
autoCompleteProps: o,
|
|
1188
559
|
getItemProps: l,
|
|
1189
|
-
query:
|
|
1190
|
-
filteredResults:
|
|
1191
|
-
} =
|
|
560
|
+
query: i,
|
|
561
|
+
filteredResults: u
|
|
562
|
+
} = W(), { children: v, ...h } = l(
|
|
1192
563
|
{
|
|
1193
|
-
...
|
|
1194
|
-
value:
|
|
1195
|
-
children:
|
|
1196
|
-
value:
|
|
564
|
+
...e,
|
|
565
|
+
value: i,
|
|
566
|
+
children: m(n, {
|
|
567
|
+
value: i
|
|
1197
568
|
})
|
|
1198
569
|
},
|
|
1199
570
|
!0
|
|
1200
|
-
).item,
|
|
1201
|
-
return
|
|
571
|
+
).item, b = u.some((C) => C.value === i), c = Te(i) ? t : !0;
|
|
572
|
+
return o.creatable && c && !b ? /* @__PURE__ */ p(pe, { ...ot, ...h, ...r, children: v || `Add ${i}` }) : null;
|
|
1202
573
|
}
|
|
1203
|
-
|
|
1204
|
-
const
|
|
1205
|
-
(
|
|
1206
|
-
const { children:
|
|
1207
|
-
return /* @__PURE__ */
|
|
1208
|
-
/* @__PURE__ */
|
|
1209
|
-
|
|
1210
|
-
/* @__PURE__ */
|
|
574
|
+
Kt.displayName = "AutoCompleteCreatable";
|
|
575
|
+
const Yt = B(
|
|
576
|
+
(e, t) => {
|
|
577
|
+
const { children: n, showDivider: r, ...o } = e, l = Me(o, ["groupSibling"]), { getGroupProps: i } = W(), { group: u } = i(e), v = Zt(e);
|
|
578
|
+
return /* @__PURE__ */ K(Xe, { ref: t, ...u, ...l, children: [
|
|
579
|
+
/* @__PURE__ */ p(Qe, { ...v.top }),
|
|
580
|
+
n,
|
|
581
|
+
/* @__PURE__ */ p(Qe, { ...v.bottom })
|
|
1211
582
|
] });
|
|
1212
583
|
}
|
|
1213
|
-
),
|
|
1214
|
-
(
|
|
584
|
+
), Jt = B(
|
|
585
|
+
(e, t) => /* @__PURE__ */ p(pe, { ...Xt, ...e, ref: t })
|
|
1215
586
|
);
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
const
|
|
587
|
+
Yt.displayName = "AutoCompleteGroup";
|
|
588
|
+
Jt.displayName = "AutoCompleteGroupTitle";
|
|
589
|
+
const Xt = {
|
|
1219
590
|
ml: 5,
|
|
1220
591
|
my: 1,
|
|
1221
592
|
fontSize: "xs",
|
|
1222
593
|
letterSpacing: "wider",
|
|
1223
594
|
fontWeight: "extrabold",
|
|
1224
595
|
textTransform: "uppercase"
|
|
1225
|
-
},
|
|
1226
|
-
const { getGroupProps:
|
|
1227
|
-
divider: { hasFirstChild:
|
|
1228
|
-
} =
|
|
596
|
+
}, Zt = (e) => {
|
|
597
|
+
const { getGroupProps: t } = W(), n = e.groupSibling, {
|
|
598
|
+
divider: { hasFirstChild: r, hasLastChild: o }
|
|
599
|
+
} = t(e), l = {
|
|
1229
600
|
my: 2,
|
|
1230
|
-
borderColor:
|
|
1231
|
-
},
|
|
601
|
+
borderColor: e.dividerColor
|
|
602
|
+
}, i = {
|
|
1232
603
|
...l,
|
|
1233
604
|
mb: 4,
|
|
1234
|
-
display: !
|
|
1235
|
-
},
|
|
605
|
+
display: !e.showDivider || r ? "none" : ""
|
|
606
|
+
}, u = {
|
|
1236
607
|
...l,
|
|
1237
|
-
display: !
|
|
608
|
+
display: !e.showDivider || o || n ? "none" : ""
|
|
1238
609
|
};
|
|
1239
|
-
return { top:
|
|
1240
|
-
},
|
|
1241
|
-
const { isLoading:
|
|
1242
|
-
return /* @__PURE__ */
|
|
1243
|
-
/* @__PURE__ */
|
|
1244
|
-
|
|
610
|
+
return { top: i, bottom: u };
|
|
611
|
+
}, Ke = B((e, t) => {
|
|
612
|
+
const { isLoading: n } = W(), { loadingIcon: r, ...o } = e;
|
|
613
|
+
return /* @__PURE__ */ K(mt, { children: [
|
|
614
|
+
/* @__PURE__ */ p(vt, { ...o, ref: t }),
|
|
615
|
+
n && /* @__PURE__ */ p(ht, { children: r || /* @__PURE__ */ p(Ze, {}) })
|
|
1245
616
|
] });
|
|
1246
|
-
}),
|
|
1247
|
-
(
|
|
617
|
+
}), rt = B(
|
|
618
|
+
(e, t) => {
|
|
1248
619
|
const {
|
|
1249
|
-
autoCompleteProps:
|
|
1250
|
-
inputRef:
|
|
1251
|
-
getInputProps:
|
|
620
|
+
autoCompleteProps: n,
|
|
621
|
+
inputRef: r,
|
|
622
|
+
getInputProps: o,
|
|
1252
623
|
tags: l,
|
|
1253
|
-
setQuery:
|
|
1254
|
-
value:
|
|
1255
|
-
itemList:
|
|
1256
|
-
} =
|
|
1257
|
-
children:
|
|
1258
|
-
isInvalid:
|
|
1259
|
-
hidePlaceholder:
|
|
1260
|
-
...
|
|
1261
|
-
} =
|
|
1262
|
-
|
|
1263
|
-
if (
|
|
1264
|
-
const
|
|
1265
|
-
|
|
624
|
+
setQuery: i,
|
|
625
|
+
value: u,
|
|
626
|
+
itemList: v
|
|
627
|
+
} = W(), {
|
|
628
|
+
children: h,
|
|
629
|
+
isInvalid: b,
|
|
630
|
+
hidePlaceholder: c,
|
|
631
|
+
...O
|
|
632
|
+
} = e, { value: C } = O;
|
|
633
|
+
D(() => {
|
|
634
|
+
if (u !== void 0 && (typeof u == "string" || u instanceof String)) {
|
|
635
|
+
const re = v.find((J) => J.value === u), k = re === void 0 ? u : re.label;
|
|
636
|
+
i(k);
|
|
1266
637
|
}
|
|
1267
|
-
}, [
|
|
1268
|
-
|
|
1269
|
-
}, [
|
|
1270
|
-
const
|
|
1271
|
-
let { wrapper:
|
|
1272
|
-
const { ref:
|
|
1273
|
-
|
|
1274
|
-
...
|
|
1275
|
-
placeholder: Array.isArray(
|
|
638
|
+
}, [u]), D(() => {
|
|
639
|
+
C !== void 0 && (typeof C == "string" || C instanceof String) && i(C);
|
|
640
|
+
}, [C]);
|
|
641
|
+
const I = yt("Input", e);
|
|
642
|
+
let { wrapper: H, input: j } = o(O, I);
|
|
643
|
+
const { ref: ne, ...ge } = H, oe = Pe(t, r), Y = m(h, { tags: l });
|
|
644
|
+
c && (j = {
|
|
645
|
+
...j,
|
|
646
|
+
placeholder: Array.isArray(Y) && Y.length ? void 0 : j.placeholder
|
|
1276
647
|
});
|
|
1277
|
-
const
|
|
1278
|
-
|
|
648
|
+
const me = /* @__PURE__ */ p(
|
|
649
|
+
Ke,
|
|
1279
650
|
{
|
|
1280
|
-
isInvalid:
|
|
1281
|
-
...
|
|
1282
|
-
ref:
|
|
651
|
+
isInvalid: b,
|
|
652
|
+
...j,
|
|
653
|
+
ref: oe
|
|
1283
654
|
}
|
|
1284
|
-
),
|
|
1285
|
-
|
|
1286
|
-
/* @__PURE__ */
|
|
1287
|
-
|
|
655
|
+
), ve = /* @__PURE__ */ K(bt, { "aria-invalid": b, ...ge, ref: ne, children: [
|
|
656
|
+
Y,
|
|
657
|
+
/* @__PURE__ */ p(
|
|
658
|
+
qe,
|
|
1288
659
|
{
|
|
1289
|
-
as:
|
|
1290
|
-
...
|
|
1291
|
-
ref:
|
|
660
|
+
as: Ke,
|
|
661
|
+
...j,
|
|
662
|
+
ref: oe
|
|
1292
663
|
}
|
|
1293
664
|
)
|
|
1294
665
|
] });
|
|
1295
|
-
return /* @__PURE__ */
|
|
666
|
+
return /* @__PURE__ */ p(Ct, { children: n.multiple ? ve : me });
|
|
1296
667
|
}
|
|
1297
668
|
);
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
const
|
|
1301
|
-
const { getEmptyStateProps:
|
|
1302
|
-
/* @__PURE__ */
|
|
669
|
+
rt.displayName = "Input";
|
|
670
|
+
rt.id = "Input";
|
|
671
|
+
const qt = (e) => {
|
|
672
|
+
const { getEmptyStateProps: t, defaultEmptyStateProps: n } = W(), r = t(
|
|
673
|
+
/* @__PURE__ */ p(pe, { ...en, ...n, children: "No options found!" })
|
|
1303
674
|
);
|
|
1304
|
-
return /* @__PURE__ */
|
|
1305
|
-
},
|
|
675
|
+
return /* @__PURE__ */ p(Xe, { ...e, children: r });
|
|
676
|
+
}, en = {
|
|
1306
677
|
fontSize: "sm",
|
|
1307
678
|
align: "center",
|
|
1308
679
|
justify: "center",
|
|
1309
680
|
fontWeight: "bold",
|
|
1310
681
|
fontStyle: "italic"
|
|
1311
|
-
},
|
|
682
|
+
}, Ye = [
|
|
1312
683
|
"AutoCompleteGroup",
|
|
1313
684
|
"AutoCompleteItem",
|
|
1314
685
|
"AutoCompleteCreatable"
|
|
1315
|
-
],
|
|
1316
|
-
const
|
|
1317
|
-
var
|
|
1318
|
-
if (((
|
|
1319
|
-
const
|
|
1320
|
-
return
|
|
1321
|
-
groupSibling:
|
|
686
|
+
], tn = (e) => {
|
|
687
|
+
const t = ee.Children.map(e, (o, l) => {
|
|
688
|
+
var i;
|
|
689
|
+
if (((i = o == null ? void 0 : o.type) == null ? void 0 : i.displayName) === "AutoCompleteGroup") {
|
|
690
|
+
const u = ee.Children.toArray(e)[l + 1];
|
|
691
|
+
return ee.cloneElement(o, {
|
|
692
|
+
groupSibling: u ? u.type.displayName === "AutoCompleteGroup" : !1
|
|
1322
693
|
});
|
|
1323
694
|
}
|
|
1324
|
-
return
|
|
1325
|
-
}),
|
|
1326
|
-
(
|
|
695
|
+
return o;
|
|
696
|
+
}), n = ee.Children.toArray(t).filter(
|
|
697
|
+
(o) => {
|
|
1327
698
|
var l;
|
|
1328
|
-
return !
|
|
1329
|
-
(l =
|
|
699
|
+
return !Ye.includes(
|
|
700
|
+
(l = o == null ? void 0 : o.type) == null ? void 0 : l.displayName
|
|
1330
701
|
);
|
|
1331
702
|
}
|
|
1332
703
|
);
|
|
1333
|
-
return [
|
|
1334
|
-
(
|
|
704
|
+
return [ee.Children.toArray(t).filter(
|
|
705
|
+
(o) => {
|
|
1335
706
|
var l;
|
|
1336
|
-
return
|
|
1337
|
-
(l =
|
|
707
|
+
return Ye.includes(
|
|
708
|
+
(l = o == null ? void 0 : o.type) == null ? void 0 : l.displayName
|
|
1338
709
|
);
|
|
1339
710
|
}
|
|
1340
|
-
),
|
|
1341
|
-
},
|
|
1342
|
-
(
|
|
1343
|
-
const { children:
|
|
1344
|
-
return /* @__PURE__ */
|
|
1345
|
-
|
|
1346
|
-
!
|
|
1347
|
-
|
|
1348
|
-
/* @__PURE__ */
|
|
1349
|
-
|
|
711
|
+
), n];
|
|
712
|
+
}, nn = B(
|
|
713
|
+
(e, t) => {
|
|
714
|
+
const { children: n, loadingState: r, ...o } = e, { listRef: l, isLoading: i } = W(), u = Pe(t, l), [v, h] = tn(n);
|
|
715
|
+
return /* @__PURE__ */ K(St, { ref: u, w: "inherit", ...on, ...o, children: [
|
|
716
|
+
i && /* @__PURE__ */ p(xt, { children: r || /* @__PURE__ */ p(Ze, { size: "md" }) }),
|
|
717
|
+
!i && /* @__PURE__ */ K(it, { children: [
|
|
718
|
+
v,
|
|
719
|
+
/* @__PURE__ */ p(qt, {}),
|
|
720
|
+
h
|
|
1350
721
|
] })
|
|
1351
722
|
] });
|
|
1352
723
|
}
|
|
1353
724
|
);
|
|
1354
|
-
|
|
1355
|
-
const
|
|
725
|
+
nn.displayName = "AutoCompleteList";
|
|
726
|
+
const on = {
|
|
1356
727
|
py: "4",
|
|
1357
728
|
opacity: "0",
|
|
1358
729
|
bg: "#232934",
|
|
@@ -1368,46 +739,46 @@ const $r = {
|
|
|
1368
739
|
_focus: {
|
|
1369
740
|
boxShadow: "none"
|
|
1370
741
|
}
|
|
1371
|
-
},
|
|
1372
|
-
const { label:
|
|
1373
|
-
return /* @__PURE__ */
|
|
1374
|
-
|
|
742
|
+
}, pn = at((e) => {
|
|
743
|
+
const { label: t, onRemove: n, disabled: r, ...o } = e;
|
|
744
|
+
return /* @__PURE__ */ p(qe, { children: /* @__PURE__ */ K(
|
|
745
|
+
At,
|
|
1375
746
|
{
|
|
1376
747
|
borderRadius: "md",
|
|
1377
748
|
fontWeight: "normal",
|
|
1378
|
-
...
|
|
1379
|
-
...
|
|
749
|
+
...r && Je,
|
|
750
|
+
...o,
|
|
1380
751
|
children: [
|
|
1381
|
-
/* @__PURE__ */
|
|
1382
|
-
/* @__PURE__ */
|
|
1383
|
-
|
|
752
|
+
/* @__PURE__ */ p(It, { children: t }),
|
|
753
|
+
/* @__PURE__ */ p(
|
|
754
|
+
wt,
|
|
1384
755
|
{
|
|
1385
|
-
onClick: () => !
|
|
756
|
+
onClick: () => !r && m(n),
|
|
1386
757
|
cursor: "pointer",
|
|
1387
|
-
...
|
|
758
|
+
...r && Je
|
|
1388
759
|
}
|
|
1389
760
|
)
|
|
1390
761
|
]
|
|
1391
762
|
}
|
|
1392
763
|
) });
|
|
1393
|
-
}),
|
|
764
|
+
}), Je = {
|
|
1394
765
|
cursor: "text",
|
|
1395
766
|
userSelect: "none",
|
|
1396
767
|
opacity: 0.4,
|
|
1397
768
|
_focus: { boxShadow: "none" }
|
|
1398
769
|
};
|
|
1399
770
|
export {
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
771
|
+
Qt as AutoComplete,
|
|
772
|
+
Kt as AutoCompleteCreatable,
|
|
773
|
+
Yt as AutoCompleteGroup,
|
|
774
|
+
Jt as AutoCompleteGroupTitle,
|
|
775
|
+
rt as AutoCompleteInput,
|
|
776
|
+
$t as AutoCompleteItem,
|
|
777
|
+
nn as AutoCompleteList,
|
|
778
|
+
Ot as AutoCompleteProvider,
|
|
779
|
+
pn as AutoCompleteTag,
|
|
780
|
+
ot as baseItemStyles,
|
|
781
|
+
Et as createContext,
|
|
782
|
+
Vt as useAutoComplete,
|
|
783
|
+
W as useAutoCompleteContext
|
|
1413
784
|
};
|