jcicl 0.0.193 → 0.0.197

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,269 +1,2577 @@
1
- import { jsx as c, jsxs as I } from "react/jsx-runtime";
2
- import { n as D } from "../.chunks/emotion-styled.browser.esm.js";
3
- import { c as V } from "../.chunks/emotion-react.browser.esm.js";
4
- import N from "../theme.js";
5
- import { L as $, F, S as P } from "../.chunks/Select.js";
6
- import * as p from "react";
7
- import { g as f, a as E, s as U, r as G, d as u, u as z, c as w, P as t, b as H } from "../.chunks/DefaultPropsProvider.js";
8
- import { m as W } from "../.chunks/memoTheme.js";
9
- import { B as _ } from "../.chunks/ButtonBase.js";
10
- import { d as M } from "../.chunks/dividerClasses.js";
11
- import { a as q, u as A } from "../.chunks/TransitionGroupContext.js";
12
- const O = f("MuiListItemIcon", ["root", "alignItemsFlexStart"]), h = f("MuiListItemText", ["root", "multiline", "dense", "inset", "primary", "secondary"]);
13
- function J(e) {
14
- return E("MuiMenuItem", e);
1
+ import { jsx as T, jsxs as Ne } from "react/jsx-runtime";
2
+ import { n as qo } from "../.chunks/emotion-styled.browser.esm.js";
3
+ import { c as Yo } from "../.chunks/emotion-react.browser.esm.js";
4
+ import jo from "../theme.js";
5
+ import * as b from "react";
6
+ import { g as po, a as co, s as F, c as d, u as uo, b as J, P as o, d as fo, e as V } from "../.chunks/DefaultPropsProvider.js";
7
+ import { i as Io, a as be, b as No, f as Ae, P as Bo, A as Jo, T as Xo } from "../.chunks/TextField.js";
8
+ import { c as Uo } from "../.chunks/createSvgIcon.js";
9
+ import { m as ee } from "../.chunks/memoTheme.js";
10
+ import { u as Oo, i as Qo } from "../.chunks/useSlot.js";
11
+ import { c as De } from "../.chunks/createSimplePaletteValueFilter.js";
12
+ import { B as So } from "../.chunks/ButtonBase.js";
13
+ import { c as wo } from "../.chunks/chainPropTypes.js";
14
+ import { P as Ho } from "../.chunks/Popper.js";
15
+ import { a as Zo } from "../.chunks/Portal.js";
16
+ import { u as Po } from "../.chunks/useControlled.js";
17
+ import { b as io, s as et, u as ot } from "../.chunks/TransitionGroupContext.js";
18
+ function tt(e, n, a, i, f) {
19
+ if (process.env.NODE_ENV === "production")
20
+ return null;
21
+ const $ = f || n;
22
+ return typeof e[n] < "u" ? new Error(`The prop \`${$}\` is not supported. Please remove it.`) : null;
15
23
  }
16
- const d = f("MuiMenuItem", ["root", "focusVisible", "dense", "disabled", "divider", "gutters", "selected"]), K = (e, o) => {
24
+ const nt = (e) => {
25
+ const n = b.useRef({});
26
+ return b.useEffect(() => {
27
+ n.current = e;
28
+ }), n.current;
29
+ };
30
+ function Mo(e) {
31
+ return e.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
32
+ }
33
+ function rt(e = {}) {
17
34
  const {
18
- ownerState: s
35
+ ignoreAccents: n = !0,
36
+ ignoreCase: a = !0,
37
+ limit: i,
38
+ matchFrom: f = "any",
39
+ stringify: $,
40
+ trim: y = !1
19
41
  } = e;
20
- return [o.root, s.dense && o.dense, s.divider && o.divider, !s.disableGutters && o.gutters];
21
- }, Q = (e) => {
42
+ return (m, {
43
+ inputValue: C,
44
+ getOptionLabel: I
45
+ }) => {
46
+ let k = y ? C.trim() : C;
47
+ a && (k = k.toLowerCase()), n && (k = Mo(k));
48
+ const L = k ? m.filter((X) => {
49
+ let A = ($ || I)(X);
50
+ return a && (A = A.toLowerCase()), n && (A = Mo(A)), f === "start" ? A.startsWith(k) : A.includes(k);
51
+ }) : m;
52
+ return typeof i == "number" ? L.slice(0, i) : L;
53
+ };
54
+ }
55
+ const at = rt(), Eo = 5, lt = (e) => {
56
+ var n;
57
+ return e.current !== null && ((n = e.current.parentElement) == null ? void 0 : n.contains(document.activeElement));
58
+ }, it = [];
59
+ function st(e) {
22
60
  const {
23
- disabled: o,
24
- dense: s,
25
- divider: r,
26
- disableGutters: n,
27
- selected: i,
28
- classes: a
29
- } = e, l = H({
30
- root: ["root", s && "dense", o && "disabled", !n && "gutters", r && "divider", i && "selected"]
31
- }, J, a);
32
- return {
33
- ...a,
34
- ...l
61
+ // eslint-disable-next-line @typescript-eslint/naming-convention
62
+ unstable_isActiveElementInListbox: n = lt,
63
+ // eslint-disable-next-line @typescript-eslint/naming-convention
64
+ unstable_classNamePrefix: a = "Mui",
65
+ autoComplete: i = !1,
66
+ autoHighlight: f = !1,
67
+ autoSelect: $ = !1,
68
+ blurOnSelect: y = !1,
69
+ clearOnBlur: m = !e.freeSolo,
70
+ clearOnEscape: C = !1,
71
+ componentName: I = "useAutocomplete",
72
+ defaultValue: k = e.multiple ? it : null,
73
+ disableClearable: L = !1,
74
+ disableCloseOnSelect: X = !1,
75
+ disabled: A,
76
+ disabledItemsFocusable: E = !1,
77
+ disableListWrap: ue = !1,
78
+ filterOptions: Me = at,
79
+ filterSelectedOptions: me = !1,
80
+ freeSolo: le = !1,
81
+ getOptionDisabled: H,
82
+ getOptionKey: he,
83
+ getOptionLabel: Ee = (r) => r.label ?? r,
84
+ groupBy: oe,
85
+ handleHomeEndKeys: ze = !e.freeSolo,
86
+ id: Ve,
87
+ includeInputInList: de = !1,
88
+ inputValue: ye,
89
+ isOptionEqualToValue: W = (r, t) => r === t,
90
+ multiple: v = !1,
91
+ onChange: fe,
92
+ onClose: _,
93
+ onHighlightChange: ve,
94
+ onInputChange: q,
95
+ onOpen: ie,
96
+ open: xe,
97
+ openOnFocus: D = !1,
98
+ options: ko,
99
+ readOnly: $e = !1,
100
+ selectOnFocus: Fe = !e.freeSolo,
101
+ value: go
102
+ } = e, U = Zo(Ve);
103
+ let N = Ee;
104
+ N = (r) => {
105
+ const t = Ee(r);
106
+ if (typeof t != "string") {
107
+ if (process.env.NODE_ENV !== "production") {
108
+ const l = t === void 0 ? "undefined" : `${typeof t} (${t})`;
109
+ console.error(`MUI: The \`getOptionLabel\` method of ${I} returned ${l} instead of a string for ${JSON.stringify(r)}.`);
110
+ }
111
+ return String(t);
112
+ }
113
+ return t;
114
+ };
115
+ const je = b.useRef(!1), Be = b.useRef(!0), w = b.useRef(null), K = b.useRef(null), [Ue, Ro] = b.useState(null), [G, Xe] = b.useState(-1), bo = f ? 0 : -1, z = b.useRef(bo), [s, Lo] = Po({
116
+ controlled: go,
117
+ default: k,
118
+ name: I
119
+ }), [P, Ce] = Po({
120
+ controlled: ye,
121
+ default: "",
122
+ name: I,
123
+ state: "inputValue"
124
+ }), [Ie, He] = b.useState(!1), Oe = b.useCallback((r, t, l) => {
125
+ if (!(v ? s.length < t.length : t !== null) && !m)
126
+ return;
127
+ let c;
128
+ if (v)
129
+ c = "";
130
+ else if (t == null)
131
+ c = "";
132
+ else {
133
+ const O = N(t);
134
+ c = typeof O == "string" ? O : "";
135
+ }
136
+ P !== c && (Ce(c), q && q(r, c, l));
137
+ }, [N, P, v, q, Ce, m, s]), [se, Qe] = Po({
138
+ controlled: xe,
139
+ default: !1,
140
+ name: I,
141
+ state: "open"
142
+ }), [Ze, mo] = b.useState(!0), Pe = !v && s != null && P === N(s), j = se && !$e, S = j ? Me(
143
+ ko.filter((r) => !(me && (v ? s : [s]).some((t) => t !== null && W(r, t)))),
144
+ // we use the empty string to manipulate `filterOptions` to not filter any options
145
+ // i.e. the filter predicate always returns true
146
+ {
147
+ inputValue: Pe && Ze ? "" : P,
148
+ getOptionLabel: N
149
+ }
150
+ ) : [], Q = nt({
151
+ filteredOptions: S,
152
+ value: s,
153
+ inputValue: P
154
+ });
155
+ b.useEffect(() => {
156
+ const r = s !== Q.value;
157
+ Ie && !r || le && !r || Oe(null, s, "reset");
158
+ }, [s, Oe, Ie, Q.value, le]);
159
+ const We = se && S.length > 0 && !$e, Se = io((r) => {
160
+ r === -1 ? w.current.focus() : Ue.querySelector(`[data-tag-index="${r}"]`).focus();
161
+ });
162
+ b.useEffect(() => {
163
+ v && G > s.length - 1 && (Xe(-1), Se(-1));
164
+ }, [s, v, G, Se]);
165
+ function eo(r, t) {
166
+ if (!K.current || r < 0 || r >= S.length)
167
+ return -1;
168
+ let l = r;
169
+ for (; ; ) {
170
+ const p = K.current.querySelector(`[data-option-index="${l}"]`), c = E ? !1 : !p || p.disabled || p.getAttribute("aria-disabled") === "true";
171
+ if (p && p.hasAttribute("tabindex") && !c)
172
+ return l;
173
+ if (t === "next" ? l = (l + 1) % S.length : l = (l - 1 + S.length) % S.length, l === r)
174
+ return -1;
175
+ }
176
+ }
177
+ const te = io(({
178
+ event: r,
179
+ index: t,
180
+ reason: l = "auto"
181
+ }) => {
182
+ if (z.current = t, t === -1 ? w.current.removeAttribute("aria-activedescendant") : w.current.setAttribute("aria-activedescendant", `${U}-option-${t}`), ve && ve(r, t === -1 ? null : S[t], l), !K.current)
183
+ return;
184
+ const p = K.current.querySelector(`[role="option"].${a}-focused`);
185
+ p && (p.classList.remove(`${a}-focused`), p.classList.remove(`${a}-focusVisible`));
186
+ let c = K.current;
187
+ if (K.current.getAttribute("role") !== "listbox" && (c = K.current.parentElement.querySelector('[role="listbox"]')), !c)
188
+ return;
189
+ if (t === -1) {
190
+ c.scrollTop = 0;
191
+ return;
192
+ }
193
+ const O = K.current.querySelector(`[data-option-index="${t}"]`);
194
+ if (O && (O.classList.add(`${a}-focused`), l === "keyboard" && O.classList.add(`${a}-focusVisible`), c.scrollHeight > c.clientHeight && l !== "mouse" && l !== "touch")) {
195
+ const x = O, B = c.clientHeight + c.scrollTop, Le = x.offsetTop + x.offsetHeight;
196
+ Le > B ? c.scrollTop = Le - c.clientHeight : x.offsetTop - x.offsetHeight * (oe ? 1.3 : 0) < c.scrollTop && (c.scrollTop = x.offsetTop - x.offsetHeight * (oe ? 1.3 : 0));
197
+ }
198
+ }), Y = io(({
199
+ event: r,
200
+ diff: t,
201
+ direction: l = "next",
202
+ reason: p = "auto"
203
+ }) => {
204
+ if (!j)
205
+ return;
206
+ const O = eo((() => {
207
+ const x = S.length - 1;
208
+ if (t === "reset")
209
+ return bo;
210
+ if (t === "start")
211
+ return 0;
212
+ if (t === "end")
213
+ return x;
214
+ const B = z.current + t;
215
+ return B < 0 ? B === -1 && de ? -1 : ue && z.current !== -1 || Math.abs(t) > 1 ? 0 : x : B > x ? B === x + 1 && de ? -1 : ue || Math.abs(t) > 1 ? x : 0 : B;
216
+ })(), l);
217
+ if (te({
218
+ index: O,
219
+ reason: p,
220
+ event: r
221
+ }), i && t !== "reset")
222
+ if (O === -1)
223
+ w.current.value = P;
224
+ else {
225
+ const x = N(S[O]);
226
+ w.current.value = x, x.toLowerCase().indexOf(P.toLowerCase()) === 0 && P.length > 0 && w.current.setSelectionRange(P.length, x.length);
227
+ }
228
+ }), ho = () => {
229
+ const r = (t, l) => {
230
+ const p = t ? N(t) : "", c = l ? N(l) : "";
231
+ return p === c;
232
+ };
233
+ if (z.current !== -1 && Q.filteredOptions && Q.filteredOptions.length !== S.length && Q.inputValue === P && (v ? s.length === Q.value.length && Q.value.every((t, l) => N(s[l]) === N(t)) : r(Q.value, s))) {
234
+ const t = Q.filteredOptions[z.current];
235
+ if (t)
236
+ return S.findIndex((l) => N(l) === N(t));
237
+ }
238
+ return -1;
239
+ }, Ke = b.useCallback(() => {
240
+ if (!j)
241
+ return;
242
+ const r = ho();
243
+ if (r !== -1) {
244
+ z.current = r;
245
+ return;
246
+ }
247
+ const t = v ? s[0] : s;
248
+ if (S.length === 0 || t == null) {
249
+ Y({
250
+ diff: "reset"
251
+ });
252
+ return;
253
+ }
254
+ if (K.current) {
255
+ if (t != null) {
256
+ const l = S[z.current];
257
+ if (v && l && s.findIndex((c) => W(l, c)) !== -1)
258
+ return;
259
+ const p = S.findIndex((c) => W(c, t));
260
+ p === -1 ? Y({
261
+ diff: "reset"
262
+ }) : te({
263
+ index: p
264
+ });
265
+ return;
266
+ }
267
+ if (z.current >= S.length - 1) {
268
+ te({
269
+ index: S.length - 1
270
+ });
271
+ return;
272
+ }
273
+ te({
274
+ index: z.current
275
+ });
276
+ }
277
+ }, [
278
+ // Only sync the highlighted index when the option switch between empty and not
279
+ S.length,
280
+ // Don't sync the highlighted index with the value when multiple
281
+ // eslint-disable-next-line react-hooks/exhaustive-deps
282
+ v ? !1 : s,
283
+ me,
284
+ Y,
285
+ te,
286
+ j,
287
+ P,
288
+ v
289
+ ]), yo = io((r) => {
290
+ et(K, r), r && Ke();
291
+ });
292
+ process.env.NODE_ENV !== "production" && b.useEffect(() => {
293
+ (!w.current || w.current.nodeName !== "INPUT") && (w.current && w.current.nodeName === "TEXTAREA" ? console.warn([`A textarea element was provided to ${I} where input was expected.`, "This is not a supported scenario but it may work under certain conditions.", "A textarea keyboard navigation may conflict with Autocomplete controls (for example enter and arrow keys).", "Make sure to test keyboard navigation and add custom event handlers if necessary."].join(`
294
+ `)) : console.error([`MUI: Unable to find the input element. It was resolved to ${w.current} while an HTMLInputElement was expected.`, `Instead, ${I} expects an input element.`, "", I === "useAutocomplete" ? "Make sure you have bound getInputProps correctly and that the normal ref/effect resolutions order is guaranteed." : "Make sure you have customized the input component correctly."].join(`
295
+ `)));
296
+ }, [I]), b.useEffect(() => {
297
+ Ke();
298
+ }, [Ke]);
299
+ const ne = (r) => {
300
+ se || (Qe(!0), mo(!0), ie && ie(r));
301
+ }, re = (r, t) => {
302
+ se && (Qe(!1), _ && _(r, t));
303
+ }, pe = (r, t, l, p) => {
304
+ if (v) {
305
+ if (s.length === t.length && s.every((c, O) => c === t[O]))
306
+ return;
307
+ } else if (s === t)
308
+ return;
309
+ fe && fe(r, t, l, p), Lo(t);
310
+ }, we = b.useRef(!1), ge = (r, t, l = "selectOption", p = "options") => {
311
+ let c = l, O = t;
312
+ if (v) {
313
+ if (O = Array.isArray(s) ? s.slice() : [], process.env.NODE_ENV !== "production") {
314
+ const B = O.filter((Le) => W(t, Le));
315
+ B.length > 1 && console.error([`MUI: The \`isOptionEqualToValue\` method of ${I} does not handle the arguments correctly.`, `The component expects a single value to match a given option but found ${B.length} matches.`].join(`
316
+ `));
317
+ }
318
+ const x = O.findIndex((B) => W(t, B));
319
+ x === -1 ? O.push(t) : p !== "freeSolo" && (O.splice(x, 1), c = "removeOption");
320
+ }
321
+ Oe(r, O, c), pe(r, O, c, {
322
+ option: t
323
+ }), !X && (!r || !r.ctrlKey && !r.metaKey) && re(r, c), (y === !0 || y === "touch" && we.current || y === "mouse" && !we.current) && w.current.blur();
35
324
  };
36
- }, X = U(_, {
37
- shouldForwardProp: (e) => G(e) || e === "classes",
38
- name: "MuiMenuItem",
325
+ function Te(r, t) {
326
+ if (r === -1)
327
+ return -1;
328
+ let l = r;
329
+ for (; ; ) {
330
+ if (t === "next" && l === s.length || t === "previous" && l === -1)
331
+ return -1;
332
+ const p = Ue.querySelector(`[data-tag-index="${l}"]`);
333
+ if (!p || !p.hasAttribute("tabindex") || p.disabled || p.getAttribute("aria-disabled") === "true")
334
+ l += t === "next" ? 1 : -1;
335
+ else
336
+ return l;
337
+ }
338
+ }
339
+ const Ge = (r, t) => {
340
+ if (!v)
341
+ return;
342
+ P === "" && re(r, "toggleInput");
343
+ let l = G;
344
+ G === -1 ? P === "" && t === "previous" && (l = s.length - 1) : (l += t === "next" ? 1 : -1, l < 0 && (l = 0), l === s.length && (l = -1)), l = Te(l, t), Xe(l), Se(l);
345
+ }, oo = (r) => {
346
+ je.current = !0, Ce(""), q && q(r, "", "clear"), pe(r, v ? [] : null, "clear");
347
+ }, ke = (r) => (t) => {
348
+ if (r.onKeyDown && r.onKeyDown(t), !t.defaultMuiPrevented && (G !== -1 && !["ArrowLeft", "ArrowRight"].includes(t.key) && (Xe(-1), Se(-1)), t.which !== 229))
349
+ switch (t.key) {
350
+ case "Home":
351
+ j && ze && (t.preventDefault(), Y({
352
+ diff: "start",
353
+ direction: "next",
354
+ reason: "keyboard",
355
+ event: t
356
+ }));
357
+ break;
358
+ case "End":
359
+ j && ze && (t.preventDefault(), Y({
360
+ diff: "end",
361
+ direction: "previous",
362
+ reason: "keyboard",
363
+ event: t
364
+ }));
365
+ break;
366
+ case "PageUp":
367
+ t.preventDefault(), Y({
368
+ diff: -Eo,
369
+ direction: "previous",
370
+ reason: "keyboard",
371
+ event: t
372
+ }), ne(t);
373
+ break;
374
+ case "PageDown":
375
+ t.preventDefault(), Y({
376
+ diff: Eo,
377
+ direction: "next",
378
+ reason: "keyboard",
379
+ event: t
380
+ }), ne(t);
381
+ break;
382
+ case "ArrowDown":
383
+ t.preventDefault(), Y({
384
+ diff: 1,
385
+ direction: "next",
386
+ reason: "keyboard",
387
+ event: t
388
+ }), ne(t);
389
+ break;
390
+ case "ArrowUp":
391
+ t.preventDefault(), Y({
392
+ diff: -1,
393
+ direction: "previous",
394
+ reason: "keyboard",
395
+ event: t
396
+ }), ne(t);
397
+ break;
398
+ case "ArrowLeft":
399
+ Ge(t, "previous");
400
+ break;
401
+ case "ArrowRight":
402
+ Ge(t, "next");
403
+ break;
404
+ case "Enter":
405
+ if (z.current !== -1 && j) {
406
+ const l = S[z.current], p = H ? H(l) : !1;
407
+ if (t.preventDefault(), p)
408
+ return;
409
+ ge(t, l, "selectOption"), i && w.current.setSelectionRange(w.current.value.length, w.current.value.length);
410
+ } else le && P !== "" && Pe === !1 && (v && t.preventDefault(), ge(t, P, "createOption", "freeSolo"));
411
+ break;
412
+ case "Escape":
413
+ j ? (t.preventDefault(), t.stopPropagation(), re(t, "escape")) : C && (P !== "" || v && s.length > 0) && (t.preventDefault(), t.stopPropagation(), oo(t));
414
+ break;
415
+ case "Backspace":
416
+ if (v && !$e && P === "" && s.length > 0) {
417
+ const l = G === -1 ? s.length - 1 : G, p = s.slice();
418
+ p.splice(l, 1), pe(t, p, "removeOption", {
419
+ option: s[l]
420
+ });
421
+ }
422
+ break;
423
+ case "Delete":
424
+ if (v && !$e && P === "" && s.length > 0 && G !== -1) {
425
+ const l = G, p = s.slice();
426
+ p.splice(l, 1), pe(t, p, "removeOption", {
427
+ option: s[l]
428
+ });
429
+ }
430
+ break;
431
+ }
432
+ }, vo = (r) => {
433
+ He(!0), D && !je.current && ne(r);
434
+ }, to = (r) => {
435
+ if (n(K)) {
436
+ w.current.focus();
437
+ return;
438
+ }
439
+ He(!1), Be.current = !0, je.current = !1, $ && z.current !== -1 && j ? ge(r, S[z.current], "blur") : $ && le && P !== "" ? ge(r, P, "blur", "freeSolo") : m && Oe(r, s, "blur"), re(r, "blur");
440
+ }, Re = (r) => {
441
+ const t = r.target.value;
442
+ P !== t && (Ce(t), mo(!1), q && q(r, t, "input")), t === "" ? !L && !v && pe(r, null, "clear") : ne(r);
443
+ }, _e = (r) => {
444
+ const t = Number(r.currentTarget.getAttribute("data-option-index"));
445
+ z.current !== t && te({
446
+ event: r,
447
+ index: t,
448
+ reason: "mouse"
449
+ });
450
+ }, qe = (r) => {
451
+ te({
452
+ event: r,
453
+ index: Number(r.currentTarget.getAttribute("data-option-index")),
454
+ reason: "touch"
455
+ }), we.current = !0;
456
+ }, xo = (r) => {
457
+ const t = Number(r.currentTarget.getAttribute("data-option-index"));
458
+ ge(r, S[t], "selectOption"), we.current = !1;
459
+ }, $o = (r) => (t) => {
460
+ const l = s.slice();
461
+ l.splice(r, 1), pe(t, l, "removeOption", {
462
+ option: s[r]
463
+ });
464
+ }, no = (r) => {
465
+ se ? re(r, "toggleInput") : ne(r);
466
+ }, Ao = (r) => {
467
+ r.currentTarget.contains(r.target) && r.target.getAttribute("id") !== U && r.preventDefault();
468
+ }, Ye = (r) => {
469
+ r.currentTarget.contains(r.target) && (w.current.focus(), Fe && Be.current && w.current.selectionEnd - w.current.selectionStart === 0 && w.current.select(), Be.current = !1);
470
+ }, M = (r) => {
471
+ !A && (P === "" || !se) && (no(r), r.stopPropagation());
472
+ };
473
+ let R = le && P.length > 0;
474
+ R = R || (v ? s.length > 0 : s !== null);
475
+ let ae = S;
476
+ if (oe) {
477
+ const r = /* @__PURE__ */ new Map();
478
+ let t = !1;
479
+ ae = S.reduce((l, p, c) => {
480
+ const O = oe(p);
481
+ return l.length > 0 && l[l.length - 1].group === O ? l[l.length - 1].options.push(p) : (process.env.NODE_ENV !== "production" && (r.get(O) && !t && (console.warn(`MUI: The options provided combined with the \`groupBy\` method of ${I} returns duplicated headers.`, "You can solve the issue by sorting the options with the output of `groupBy`."), t = !0), r.set(O, !0)), l.push({
482
+ key: c,
483
+ index: c,
484
+ group: O,
485
+ options: [p]
486
+ })), l;
487
+ }, []);
488
+ }
489
+ return A && Ie && to(), {
490
+ getRootProps: (r = {}) => ({
491
+ "aria-owns": We ? `${U}-listbox` : null,
492
+ ...r,
493
+ onKeyDown: ke(r),
494
+ onMouseDown: Ao,
495
+ onClick: Ye
496
+ }),
497
+ getInputLabelProps: () => ({
498
+ id: `${U}-label`,
499
+ htmlFor: U
500
+ }),
501
+ getInputProps: () => ({
502
+ id: U,
503
+ value: P,
504
+ onBlur: to,
505
+ onFocus: vo,
506
+ onChange: Re,
507
+ onMouseDown: M,
508
+ // if open then this is handled imperatively so don't let react override
509
+ // only have an opinion about this when closed
510
+ "aria-activedescendant": j ? "" : null,
511
+ "aria-autocomplete": i ? "both" : "list",
512
+ "aria-controls": We ? `${U}-listbox` : void 0,
513
+ "aria-expanded": We,
514
+ // Disable browser's suggestion that might overlap with the popup.
515
+ // Handle autocomplete but not autofill.
516
+ autoComplete: "off",
517
+ ref: w,
518
+ autoCapitalize: "none",
519
+ spellCheck: "false",
520
+ role: "combobox",
521
+ disabled: A
522
+ }),
523
+ getClearProps: () => ({
524
+ tabIndex: -1,
525
+ type: "button",
526
+ onClick: oo
527
+ }),
528
+ getPopupIndicatorProps: () => ({
529
+ tabIndex: -1,
530
+ type: "button",
531
+ onClick: no,
532
+ onMouseDown: (r) => r.stopPropagation()
533
+ }),
534
+ getTagProps: ({
535
+ index: r
536
+ }) => ({
537
+ key: r,
538
+ "data-tag-index": r,
539
+ tabIndex: -1,
540
+ ...!$e && {
541
+ onDelete: $o(r)
542
+ }
543
+ }),
544
+ getListboxProps: () => ({
545
+ role: "listbox",
546
+ id: `${U}-listbox`,
547
+ "aria-labelledby": `${U}-label`,
548
+ ref: yo,
549
+ onMouseDown: (r) => {
550
+ r.preventDefault();
551
+ }
552
+ }),
553
+ getOptionProps: ({
554
+ index: r,
555
+ option: t
556
+ }) => {
557
+ const l = (v ? s : [s]).some((c) => c != null && W(t, c)), p = H ? H(t) : !1;
558
+ return {
559
+ key: (he == null ? void 0 : he(t)) ?? N(t),
560
+ tabIndex: -1,
561
+ role: "option",
562
+ id: `${U}-option-${r}`,
563
+ onMouseMove: _e,
564
+ onClick: xo,
565
+ onTouchStart: qe,
566
+ "data-option-index": r,
567
+ "aria-disabled": p,
568
+ "aria-selected": l
569
+ };
570
+ },
571
+ id: U,
572
+ inputValue: P,
573
+ value: s,
574
+ dirty: R,
575
+ expanded: j && Ue,
576
+ popupOpen: j,
577
+ focused: Ie || G !== -1,
578
+ anchorEl: Ue,
579
+ setAnchorEl: Ro,
580
+ focusedTag: G,
581
+ groupedOptions: ae
582
+ };
583
+ }
584
+ function pt(e) {
585
+ return po("MuiListSubheader", e);
586
+ }
587
+ co("MuiListSubheader", ["root", "colorPrimary", "colorInherit", "gutters", "inset", "sticky"]);
588
+ const ct = (e) => {
589
+ const {
590
+ classes: n,
591
+ color: a,
592
+ disableGutters: i,
593
+ inset: f,
594
+ disableSticky: $
595
+ } = e, y = {
596
+ root: ["root", a !== "default" && `color${d(a)}`, !i && "gutters", f && "inset", !$ && "sticky"]
597
+ };
598
+ return fo(y, pt, n);
599
+ }, ut = F("li", {
600
+ name: "MuiListSubheader",
39
601
  slot: "Root",
40
- overridesResolver: K
41
- })(W(({
602
+ overridesResolver: (e, n) => {
603
+ const {
604
+ ownerState: a
605
+ } = e;
606
+ return [n.root, a.color !== "default" && n[`color${d(a.color)}`], !a.disableGutters && n.gutters, a.inset && n.inset, !a.disableSticky && n.sticky];
607
+ }
608
+ })(ee(({
42
609
  theme: e
43
610
  }) => ({
44
- ...e.typography.body1,
45
- display: "flex",
46
- justifyContent: "flex-start",
47
- alignItems: "center",
48
- position: "relative",
49
- textDecoration: "none",
50
- minHeight: 48,
51
- paddingTop: 6,
52
- paddingBottom: 6,
53
611
  boxSizing: "border-box",
54
- whiteSpace: "nowrap",
55
- "&:hover": {
612
+ lineHeight: "48px",
613
+ listStyle: "none",
614
+ color: (e.vars || e).palette.text.secondary,
615
+ fontFamily: e.typography.fontFamily,
616
+ fontWeight: e.typography.fontWeightMedium,
617
+ fontSize: e.typography.pxToRem(14),
618
+ variants: [{
619
+ props: {
620
+ color: "primary"
621
+ },
622
+ style: {
623
+ color: (e.vars || e).palette.primary.main
624
+ }
625
+ }, {
626
+ props: {
627
+ color: "inherit"
628
+ },
629
+ style: {
630
+ color: "inherit"
631
+ }
632
+ }, {
633
+ props: ({
634
+ ownerState: n
635
+ }) => !n.disableGutters,
636
+ style: {
637
+ paddingLeft: 16,
638
+ paddingRight: 16
639
+ }
640
+ }, {
641
+ props: ({
642
+ ownerState: n
643
+ }) => n.inset,
644
+ style: {
645
+ paddingLeft: 72
646
+ }
647
+ }, {
648
+ props: ({
649
+ ownerState: n
650
+ }) => !n.disableSticky,
651
+ style: {
652
+ position: "sticky",
653
+ top: 0,
654
+ zIndex: 1,
655
+ backgroundColor: (e.vars || e).palette.background.paper
656
+ }
657
+ }]
658
+ }))), so = /* @__PURE__ */ b.forwardRef(function(n, a) {
659
+ const i = uo({
660
+ props: n,
661
+ name: "MuiListSubheader"
662
+ }), {
663
+ className: f,
664
+ color: $ = "default",
665
+ component: y = "li",
666
+ disableGutters: m = !1,
667
+ disableSticky: C = !1,
668
+ inset: I = !1,
669
+ ...k
670
+ } = i, L = {
671
+ ...i,
672
+ color: $,
673
+ component: y,
674
+ disableGutters: m,
675
+ disableSticky: C,
676
+ inset: I
677
+ }, X = ct(L);
678
+ return /* @__PURE__ */ T(ut, {
679
+ as: y,
680
+ className: J(X.root, f),
681
+ ref: a,
682
+ ownerState: L,
683
+ ...k
684
+ });
685
+ });
686
+ so && (so.muiSkipListHighlight = !0);
687
+ process.env.NODE_ENV !== "production" && (so.propTypes = {
688
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
689
+ // │ These PropTypes are generated from the TypeScript type definitions. │
690
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
691
+ // └─────────────────────────────────────────────────────────────────────┘
692
+ /**
693
+ * The content of the component.
694
+ */
695
+ children: o.node,
696
+ /**
697
+ * Override or extend the styles applied to the component.
698
+ */
699
+ classes: o.object,
700
+ /**
701
+ * @ignore
702
+ */
703
+ className: o.string,
704
+ /**
705
+ * The color of the component. It supports those theme colors that make sense for this component.
706
+ * @default 'default'
707
+ */
708
+ color: o.oneOf(["default", "inherit", "primary"]),
709
+ /**
710
+ * The component used for the root node.
711
+ * Either a string to use a HTML element or a component.
712
+ */
713
+ component: o.elementType,
714
+ /**
715
+ * If `true`, the List Subheader will not have gutters.
716
+ * @default false
717
+ */
718
+ disableGutters: o.bool,
719
+ /**
720
+ * If `true`, the List Subheader will not stick to the top during scroll.
721
+ * @default false
722
+ */
723
+ disableSticky: o.bool,
724
+ /**
725
+ * If `true`, the List Subheader is indented.
726
+ * @default false
727
+ */
728
+ inset: o.bool,
729
+ /**
730
+ * The system prop that allows defining system overrides as well as additional CSS styles.
731
+ */
732
+ sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object])
733
+ });
734
+ function dt(e) {
735
+ return po("MuiIconButton", e);
736
+ }
737
+ const ft = co("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "edgeStart", "edgeEnd", "sizeSmall", "sizeMedium", "sizeLarge"]), gt = (e) => {
738
+ const {
739
+ classes: n,
740
+ disabled: a,
741
+ color: i,
742
+ edge: f,
743
+ size: $
744
+ } = e, y = {
745
+ root: ["root", a && "disabled", i !== "default" && `color${d(i)}`, f && `edge${d(f)}`, `size${d($)}`]
746
+ };
747
+ return fo(y, dt, n);
748
+ }, bt = F(So, {
749
+ name: "MuiIconButton",
750
+ slot: "Root",
751
+ overridesResolver: (e, n) => {
752
+ const {
753
+ ownerState: a
754
+ } = e;
755
+ return [n.root, a.color !== "default" && n[`color${d(a.color)}`], a.edge && n[`edge${d(a.edge)}`], n[`size${d(a.size)}`]];
756
+ }
757
+ })(ee(({
758
+ theme: e
759
+ }) => ({
760
+ textAlign: "center",
761
+ flex: "0 0 auto",
762
+ fontSize: e.typography.pxToRem(24),
763
+ padding: 8,
764
+ borderRadius: "50%",
765
+ color: (e.vars || e).palette.action.active,
766
+ transition: e.transitions.create("background-color", {
767
+ duration: e.transitions.duration.shortest
768
+ }),
769
+ variants: [{
770
+ props: {
771
+ disableRipple: !1
772
+ },
773
+ style: {
774
+ "&:hover": {
775
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})` : V(e.palette.action.active, e.palette.action.hoverOpacity),
776
+ // Reset on touch devices, it doesn't add specificity
777
+ "@media (hover: none)": {
778
+ backgroundColor: "transparent"
779
+ }
780
+ }
781
+ }
782
+ }, {
783
+ props: {
784
+ edge: "start"
785
+ },
786
+ style: {
787
+ marginLeft: -12
788
+ }
789
+ }, {
790
+ props: {
791
+ edge: "start",
792
+ size: "small"
793
+ },
794
+ style: {
795
+ marginLeft: -3
796
+ }
797
+ }, {
798
+ props: {
799
+ edge: "end"
800
+ },
801
+ style: {
802
+ marginRight: -12
803
+ }
804
+ }, {
805
+ props: {
806
+ edge: "end",
807
+ size: "small"
808
+ },
809
+ style: {
810
+ marginRight: -3
811
+ }
812
+ }]
813
+ })), ee(({
814
+ theme: e
815
+ }) => ({
816
+ variants: [{
817
+ props: {
818
+ color: "inherit"
819
+ },
820
+ style: {
821
+ color: "inherit"
822
+ }
823
+ }, ...Object.entries(e.palette).filter(De()).map(([n]) => ({
824
+ props: {
825
+ color: n
826
+ },
827
+ style: {
828
+ color: (e.vars || e).palette[n].main
829
+ }
830
+ })), ...Object.entries(e.palette).filter(De()).map(([n]) => ({
831
+ props: {
832
+ color: n,
833
+ disableRipple: !1
834
+ },
835
+ style: {
836
+ "&:hover": {
837
+ backgroundColor: e.vars ? `rgba(${(e.vars || e).palette[n].mainChannel} / ${e.vars.palette.action.hoverOpacity})` : V((e.vars || e).palette[n].main, e.palette.action.hoverOpacity),
838
+ // Reset on touch devices, it doesn't add specificity
839
+ "@media (hover: none)": {
840
+ backgroundColor: "transparent"
841
+ }
842
+ }
843
+ }
844
+ })), {
845
+ props: {
846
+ size: "small"
847
+ },
848
+ style: {
849
+ padding: 5,
850
+ fontSize: e.typography.pxToRem(18)
851
+ }
852
+ }, {
853
+ props: {
854
+ size: "large"
855
+ },
856
+ style: {
857
+ padding: 12,
858
+ fontSize: e.typography.pxToRem(28)
859
+ }
860
+ }],
861
+ [`&.${ft.disabled}`]: {
862
+ backgroundColor: "transparent",
863
+ color: (e.vars || e).palette.action.disabled
864
+ }
865
+ }))), To = /* @__PURE__ */ b.forwardRef(function(n, a) {
866
+ const i = uo({
867
+ props: n,
868
+ name: "MuiIconButton"
869
+ }), {
870
+ edge: f = !1,
871
+ children: $,
872
+ className: y,
873
+ color: m = "default",
874
+ disabled: C = !1,
875
+ disableFocusRipple: I = !1,
876
+ disableRipple: k = !1,
877
+ size: L = "medium",
878
+ ...X
879
+ } = i, A = {
880
+ ...i,
881
+ edge: f,
882
+ color: m,
883
+ disabled: C,
884
+ disableFocusRipple: I,
885
+ disableRipple: k,
886
+ size: L
887
+ }, E = gt(A);
888
+ return /* @__PURE__ */ T(bt, {
889
+ className: J(E.root, y),
890
+ centerRipple: !0,
891
+ focusRipple: !I,
892
+ disabled: C,
893
+ disableRipple: k,
894
+ ref: a,
895
+ ...X,
896
+ ownerState: A,
897
+ children: $
898
+ });
899
+ });
900
+ process.env.NODE_ENV !== "production" && (To.propTypes = {
901
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
902
+ // │ These PropTypes are generated from the TypeScript type definitions. │
903
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
904
+ // └─────────────────────────────────────────────────────────────────────┘
905
+ /**
906
+ * The icon to display.
907
+ */
908
+ children: wo(o.node, (e) => b.Children.toArray(e.children).some((a) => /* @__PURE__ */ b.isValidElement(a) && a.props.onClick) ? new Error(["MUI: You are providing an onClick event listener to a child of a button element.", "Prefer applying it to the IconButton directly.", "This guarantees that the whole <button> will be responsive to click events."].join(`
909
+ `)) : null),
910
+ /**
911
+ * Override or extend the styles applied to the component.
912
+ */
913
+ classes: o.object,
914
+ /**
915
+ * @ignore
916
+ */
917
+ className: o.string,
918
+ /**
919
+ * The color of the component.
920
+ * It supports both default and custom theme colors, which can be added as shown in the
921
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
922
+ * @default 'default'
923
+ */
924
+ color: o.oneOfType([o.oneOf(["inherit", "default", "primary", "secondary", "error", "info", "success", "warning"]), o.string]),
925
+ /**
926
+ * If `true`, the component is disabled.
927
+ * @default false
928
+ */
929
+ disabled: o.bool,
930
+ /**
931
+ * If `true`, the keyboard focus ripple is disabled.
932
+ * @default false
933
+ */
934
+ disableFocusRipple: o.bool,
935
+ /**
936
+ * If `true`, the ripple effect is disabled.
937
+ *
938
+ * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
939
+ * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
940
+ * @default false
941
+ */
942
+ disableRipple: o.bool,
943
+ /**
944
+ * If given, uses a negative margin to counteract the padding on one
945
+ * side (this is often helpful for aligning the left or right
946
+ * side of the icon with content above or below, without ruining the border
947
+ * size and shape).
948
+ * @default false
949
+ */
950
+ edge: o.oneOf(["end", "start", !1]),
951
+ /**
952
+ * The size of the component.
953
+ * `small` is equivalent to the dense button styling.
954
+ * @default 'medium'
955
+ */
956
+ size: o.oneOfType([o.oneOf(["small", "medium", "large"]), o.string]),
957
+ /**
958
+ * The system prop that allows defining system overrides as well as additional CSS styles.
959
+ */
960
+ sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object])
961
+ });
962
+ const mt = Uo(/* @__PURE__ */ T("path", {
963
+ d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"
964
+ }), "Cancel");
965
+ function ht(e) {
966
+ return po("MuiChip", e);
967
+ }
968
+ const g = co("MuiChip", ["root", "sizeSmall", "sizeMedium", "colorDefault", "colorError", "colorInfo", "colorPrimary", "colorSecondary", "colorSuccess", "colorWarning", "disabled", "clickable", "clickableColorPrimary", "clickableColorSecondary", "deletable", "deletableColorPrimary", "deletableColorSecondary", "outlined", "filled", "outlinedPrimary", "outlinedSecondary", "filledPrimary", "filledSecondary", "avatar", "avatarSmall", "avatarMedium", "avatarColorPrimary", "avatarColorSecondary", "icon", "iconSmall", "iconMedium", "iconColorPrimary", "iconColorSecondary", "label", "labelSmall", "labelMedium", "deleteIcon", "deleteIconSmall", "deleteIconMedium", "deleteIconColorPrimary", "deleteIconColorSecondary", "deleteIconOutlinedColorPrimary", "deleteIconOutlinedColorSecondary", "deleteIconFilledColorPrimary", "deleteIconFilledColorSecondary", "focusVisible"]), yt = (e) => {
969
+ const {
970
+ classes: n,
971
+ disabled: a,
972
+ size: i,
973
+ color: f,
974
+ iconColor: $,
975
+ onDelete: y,
976
+ clickable: m,
977
+ variant: C
978
+ } = e, I = {
979
+ root: ["root", C, a && "disabled", `size${d(i)}`, `color${d(f)}`, m && "clickable", m && `clickableColor${d(f)}`, y && "deletable", y && `deletableColor${d(f)}`, `${C}${d(f)}`],
980
+ label: ["label", `label${d(i)}`],
981
+ avatar: ["avatar", `avatar${d(i)}`, `avatarColor${d(f)}`],
982
+ icon: ["icon", `icon${d(i)}`, `iconColor${d($)}`],
983
+ deleteIcon: ["deleteIcon", `deleteIcon${d(i)}`, `deleteIconColor${d(f)}`, `deleteIcon${d(C)}Color${d(f)}`]
984
+ };
985
+ return fo(I, ht, n);
986
+ }, vt = F("div", {
987
+ name: "MuiChip",
988
+ slot: "Root",
989
+ overridesResolver: (e, n) => {
990
+ const {
991
+ ownerState: a
992
+ } = e, {
993
+ color: i,
994
+ iconColor: f,
995
+ clickable: $,
996
+ onDelete: y,
997
+ size: m,
998
+ variant: C
999
+ } = a;
1000
+ return [{
1001
+ [`& .${g.avatar}`]: n.avatar
1002
+ }, {
1003
+ [`& .${g.avatar}`]: n[`avatar${d(m)}`]
1004
+ }, {
1005
+ [`& .${g.avatar}`]: n[`avatarColor${d(i)}`]
1006
+ }, {
1007
+ [`& .${g.icon}`]: n.icon
1008
+ }, {
1009
+ [`& .${g.icon}`]: n[`icon${d(m)}`]
1010
+ }, {
1011
+ [`& .${g.icon}`]: n[`iconColor${d(f)}`]
1012
+ }, {
1013
+ [`& .${g.deleteIcon}`]: n.deleteIcon
1014
+ }, {
1015
+ [`& .${g.deleteIcon}`]: n[`deleteIcon${d(m)}`]
1016
+ }, {
1017
+ [`& .${g.deleteIcon}`]: n[`deleteIconColor${d(i)}`]
1018
+ }, {
1019
+ [`& .${g.deleteIcon}`]: n[`deleteIcon${d(C)}Color${d(i)}`]
1020
+ }, n.root, n[`size${d(m)}`], n[`color${d(i)}`], $ && n.clickable, $ && i !== "default" && n[`clickableColor${d(i)})`], y && n.deletable, y && i !== "default" && n[`deletableColor${d(i)}`], n[C], n[`${C}${d(i)}`]];
1021
+ }
1022
+ })(ee(({
1023
+ theme: e
1024
+ }) => {
1025
+ const n = e.palette.mode === "light" ? e.palette.grey[700] : e.palette.grey[300];
1026
+ return {
1027
+ maxWidth: "100%",
1028
+ fontFamily: e.typography.fontFamily,
1029
+ fontSize: e.typography.pxToRem(13),
1030
+ display: "inline-flex",
1031
+ alignItems: "center",
1032
+ justifyContent: "center",
1033
+ height: 32,
1034
+ color: (e.vars || e).palette.text.primary,
1035
+ backgroundColor: (e.vars || e).palette.action.selected,
1036
+ borderRadius: 32 / 2,
1037
+ whiteSpace: "nowrap",
1038
+ transition: e.transitions.create(["background-color", "box-shadow"]),
1039
+ // reset cursor explicitly in case ButtonBase is used
1040
+ cursor: "unset",
1041
+ // We disable the focus ring for mouse, touch and keyboard users.
1042
+ outline: 0,
56
1043
  textDecoration: "none",
57
- backgroundColor: (e.vars || e).palette.action.hover,
58
- // Reset on touch devices, it doesn't add specificity
59
- "@media (hover: none)": {
60
- backgroundColor: "transparent"
1044
+ border: 0,
1045
+ // Remove `button` border
1046
+ padding: 0,
1047
+ // Remove `button` padding
1048
+ verticalAlign: "middle",
1049
+ boxSizing: "border-box",
1050
+ [`&.${g.disabled}`]: {
1051
+ opacity: (e.vars || e).palette.action.disabledOpacity,
1052
+ pointerEvents: "none"
1053
+ },
1054
+ [`& .${g.avatar}`]: {
1055
+ marginLeft: 5,
1056
+ marginRight: -6,
1057
+ width: 24,
1058
+ height: 24,
1059
+ color: e.vars ? e.vars.palette.Chip.defaultAvatarColor : n,
1060
+ fontSize: e.typography.pxToRem(12)
1061
+ },
1062
+ [`& .${g.avatarColorPrimary}`]: {
1063
+ color: (e.vars || e).palette.primary.contrastText,
1064
+ backgroundColor: (e.vars || e).palette.primary.dark
1065
+ },
1066
+ [`& .${g.avatarColorSecondary}`]: {
1067
+ color: (e.vars || e).palette.secondary.contrastText,
1068
+ backgroundColor: (e.vars || e).palette.secondary.dark
1069
+ },
1070
+ [`& .${g.avatarSmall}`]: {
1071
+ marginLeft: 4,
1072
+ marginRight: -4,
1073
+ width: 18,
1074
+ height: 18,
1075
+ fontSize: e.typography.pxToRem(10)
1076
+ },
1077
+ [`& .${g.icon}`]: {
1078
+ marginLeft: 5,
1079
+ marginRight: -6
1080
+ },
1081
+ [`& .${g.deleteIcon}`]: {
1082
+ WebkitTapHighlightColor: "transparent",
1083
+ color: e.vars ? `rgba(${e.vars.palette.text.primaryChannel} / 0.26)` : V(e.palette.text.primary, 0.26),
1084
+ fontSize: 22,
1085
+ cursor: "pointer",
1086
+ margin: "0 5px 0 -6px",
1087
+ "&:hover": {
1088
+ color: e.vars ? `rgba(${e.vars.palette.text.primaryChannel} / 0.4)` : V(e.palette.text.primary, 0.4)
1089
+ }
1090
+ },
1091
+ variants: [{
1092
+ props: {
1093
+ size: "small"
1094
+ },
1095
+ style: {
1096
+ height: 24,
1097
+ [`& .${g.icon}`]: {
1098
+ fontSize: 18,
1099
+ marginLeft: 4,
1100
+ marginRight: -4
1101
+ },
1102
+ [`& .${g.deleteIcon}`]: {
1103
+ fontSize: 16,
1104
+ marginRight: 4,
1105
+ marginLeft: -4
1106
+ }
1107
+ }
1108
+ }, ...Object.entries(e.palette).filter(De(["contrastText"])).map(([a]) => ({
1109
+ props: {
1110
+ color: a
1111
+ },
1112
+ style: {
1113
+ backgroundColor: (e.vars || e).palette[a].main,
1114
+ color: (e.vars || e).palette[a].contrastText,
1115
+ [`& .${g.deleteIcon}`]: {
1116
+ color: e.vars ? `rgba(${e.vars.palette[a].contrastTextChannel} / 0.7)` : V(e.palette[a].contrastText, 0.7),
1117
+ "&:hover, &:active": {
1118
+ color: (e.vars || e).palette[a].contrastText
1119
+ }
1120
+ }
1121
+ }
1122
+ })), {
1123
+ props: (a) => a.iconColor === a.color,
1124
+ style: {
1125
+ [`& .${g.icon}`]: {
1126
+ color: e.vars ? e.vars.palette.Chip.defaultIconColor : n
1127
+ }
1128
+ }
1129
+ }, {
1130
+ props: (a) => a.iconColor === a.color && a.color !== "default",
1131
+ style: {
1132
+ [`& .${g.icon}`]: {
1133
+ color: "inherit"
1134
+ }
1135
+ }
1136
+ }, {
1137
+ props: {
1138
+ onDelete: !0
1139
+ },
1140
+ style: {
1141
+ [`&.${g.focusVisible}`]: {
1142
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : V(e.palette.action.selected, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
1143
+ }
1144
+ }
1145
+ }, ...Object.entries(e.palette).filter(De(["dark"])).map(([a]) => ({
1146
+ props: {
1147
+ color: a,
1148
+ onDelete: !0
1149
+ },
1150
+ style: {
1151
+ [`&.${g.focusVisible}`]: {
1152
+ background: (e.vars || e).palette[a].dark
1153
+ }
1154
+ }
1155
+ })), {
1156
+ props: {
1157
+ clickable: !0
1158
+ },
1159
+ style: {
1160
+ userSelect: "none",
1161
+ WebkitTapHighlightColor: "transparent",
1162
+ cursor: "pointer",
1163
+ "&:hover": {
1164
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` : V(e.palette.action.selected, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity)
1165
+ },
1166
+ [`&.${g.focusVisible}`]: {
1167
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : V(e.palette.action.selected, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
1168
+ },
1169
+ "&:active": {
1170
+ boxShadow: (e.vars || e).shadows[1]
1171
+ }
1172
+ }
1173
+ }, ...Object.entries(e.palette).filter(De(["dark"])).map(([a]) => ({
1174
+ props: {
1175
+ color: a,
1176
+ clickable: !0
1177
+ },
1178
+ style: {
1179
+ [`&:hover, &.${g.focusVisible}`]: {
1180
+ backgroundColor: (e.vars || e).palette[a].dark
1181
+ }
1182
+ }
1183
+ })), {
1184
+ props: {
1185
+ variant: "outlined"
1186
+ },
1187
+ style: {
1188
+ backgroundColor: "transparent",
1189
+ border: e.vars ? `1px solid ${e.vars.palette.Chip.defaultBorder}` : `1px solid ${e.palette.mode === "light" ? e.palette.grey[400] : e.palette.grey[700]}`,
1190
+ [`&.${g.clickable}:hover`]: {
1191
+ backgroundColor: (e.vars || e).palette.action.hover
1192
+ },
1193
+ [`&.${g.focusVisible}`]: {
1194
+ backgroundColor: (e.vars || e).palette.action.focus
1195
+ },
1196
+ [`& .${g.avatar}`]: {
1197
+ marginLeft: 4
1198
+ },
1199
+ [`& .${g.avatarSmall}`]: {
1200
+ marginLeft: 2
1201
+ },
1202
+ [`& .${g.icon}`]: {
1203
+ marginLeft: 4
1204
+ },
1205
+ [`& .${g.iconSmall}`]: {
1206
+ marginLeft: 2
1207
+ },
1208
+ [`& .${g.deleteIcon}`]: {
1209
+ marginRight: 5
1210
+ },
1211
+ [`& .${g.deleteIconSmall}`]: {
1212
+ marginRight: 3
1213
+ }
1214
+ }
1215
+ }, ...Object.entries(e.palette).filter(De()).map(([a]) => ({
1216
+ props: {
1217
+ variant: "outlined",
1218
+ color: a
1219
+ },
1220
+ style: {
1221
+ color: (e.vars || e).palette[a].main,
1222
+ border: `1px solid ${e.vars ? `rgba(${e.vars.palette[a].mainChannel} / 0.7)` : V(e.palette[a].main, 0.7)}`,
1223
+ [`&.${g.clickable}:hover`]: {
1224
+ backgroundColor: e.vars ? `rgba(${e.vars.palette[a].mainChannel} / ${e.vars.palette.action.hoverOpacity})` : V(e.palette[a].main, e.palette.action.hoverOpacity)
1225
+ },
1226
+ [`&.${g.focusVisible}`]: {
1227
+ backgroundColor: e.vars ? `rgba(${e.vars.palette[a].mainChannel} / ${e.vars.palette.action.focusOpacity})` : V(e.palette[a].main, e.palette.action.focusOpacity)
1228
+ },
1229
+ [`& .${g.deleteIcon}`]: {
1230
+ color: e.vars ? `rgba(${e.vars.palette[a].mainChannel} / 0.7)` : V(e.palette[a].main, 0.7),
1231
+ "&:hover, &:active": {
1232
+ color: (e.vars || e).palette[a].main
1233
+ }
1234
+ }
1235
+ }
1236
+ }))]
1237
+ };
1238
+ })), xt = F("span", {
1239
+ name: "MuiChip",
1240
+ slot: "Label",
1241
+ overridesResolver: (e, n) => {
1242
+ const {
1243
+ ownerState: a
1244
+ } = e, {
1245
+ size: i
1246
+ } = a;
1247
+ return [n.label, n[`label${d(i)}`]];
1248
+ }
1249
+ })({
1250
+ overflow: "hidden",
1251
+ textOverflow: "ellipsis",
1252
+ paddingLeft: 12,
1253
+ paddingRight: 12,
1254
+ whiteSpace: "nowrap",
1255
+ variants: [{
1256
+ props: {
1257
+ variant: "outlined"
1258
+ },
1259
+ style: {
1260
+ paddingLeft: 11,
1261
+ paddingRight: 11
1262
+ }
1263
+ }, {
1264
+ props: {
1265
+ size: "small"
1266
+ },
1267
+ style: {
1268
+ paddingLeft: 8,
1269
+ paddingRight: 8
1270
+ }
1271
+ }, {
1272
+ props: {
1273
+ size: "small",
1274
+ variant: "outlined"
1275
+ },
1276
+ style: {
1277
+ paddingLeft: 7,
1278
+ paddingRight: 7
1279
+ }
1280
+ }]
1281
+ });
1282
+ function zo(e) {
1283
+ return e.key === "Backspace" || e.key === "Delete";
1284
+ }
1285
+ const Wo = /* @__PURE__ */ b.forwardRef(function(n, a) {
1286
+ const i = uo({
1287
+ props: n,
1288
+ name: "MuiChip"
1289
+ }), {
1290
+ avatar: f,
1291
+ className: $,
1292
+ clickable: y,
1293
+ color: m = "default",
1294
+ component: C,
1295
+ deleteIcon: I,
1296
+ disabled: k = !1,
1297
+ icon: L,
1298
+ label: X,
1299
+ onClick: A,
1300
+ onDelete: E,
1301
+ onKeyDown: ue,
1302
+ onKeyUp: Me,
1303
+ size: me = "medium",
1304
+ variant: le = "filled",
1305
+ tabIndex: H,
1306
+ skipFocusWhenDisabled: he = !1,
1307
+ // TODO v6: Rename to `focusableWhenDisabled`.
1308
+ ...Ee
1309
+ } = i, oe = b.useRef(null), ze = ot(oe, a), Ve = (D) => {
1310
+ D.stopPropagation(), E && E(D);
1311
+ }, de = (D) => {
1312
+ D.currentTarget === D.target && zo(D) && D.preventDefault(), ue && ue(D);
1313
+ }, ye = (D) => {
1314
+ D.currentTarget === D.target && E && zo(D) && E(D), Me && Me(D);
1315
+ }, W = y !== !1 && A ? !0 : y, v = W || E ? So : C || "div", fe = {
1316
+ ...i,
1317
+ component: v,
1318
+ disabled: k,
1319
+ size: me,
1320
+ color: m,
1321
+ iconColor: /* @__PURE__ */ b.isValidElement(L) && L.props.color || m,
1322
+ onDelete: !!E,
1323
+ clickable: W,
1324
+ variant: le
1325
+ }, _ = yt(fe), ve = v === So ? {
1326
+ component: C || "div",
1327
+ focusVisibleClassName: _.focusVisible,
1328
+ ...E && {
1329
+ disableRipple: !0
1330
+ }
1331
+ } : {};
1332
+ let q = null;
1333
+ E && (q = I && /* @__PURE__ */ b.isValidElement(I) ? /* @__PURE__ */ b.cloneElement(I, {
1334
+ className: J(I.props.className, _.deleteIcon),
1335
+ onClick: Ve
1336
+ }) : /* @__PURE__ */ T(mt, {
1337
+ className: J(_.deleteIcon),
1338
+ onClick: Ve
1339
+ }));
1340
+ let ie = null;
1341
+ f && /* @__PURE__ */ b.isValidElement(f) && (ie = /* @__PURE__ */ b.cloneElement(f, {
1342
+ className: J(_.avatar, f.props.className)
1343
+ }));
1344
+ let xe = null;
1345
+ return L && /* @__PURE__ */ b.isValidElement(L) && (xe = /* @__PURE__ */ b.cloneElement(L, {
1346
+ className: J(_.icon, L.props.className)
1347
+ })), process.env.NODE_ENV !== "production" && ie && xe && console.error("MUI: The Chip component can not handle the avatar and the icon prop at the same time. Pick one."), /* @__PURE__ */ Ne(vt, {
1348
+ as: v,
1349
+ className: J(_.root, $),
1350
+ disabled: W && k ? !0 : void 0,
1351
+ onClick: A,
1352
+ onKeyDown: de,
1353
+ onKeyUp: ye,
1354
+ ref: ze,
1355
+ tabIndex: he && k ? -1 : H,
1356
+ ownerState: fe,
1357
+ ...ve,
1358
+ ...Ee,
1359
+ children: [ie || xe, /* @__PURE__ */ T(xt, {
1360
+ className: J(_.label),
1361
+ ownerState: fe,
1362
+ children: X
1363
+ }), q]
1364
+ });
1365
+ });
1366
+ process.env.NODE_ENV !== "production" && (Wo.propTypes = {
1367
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
1368
+ // │ These PropTypes are generated from the TypeScript type definitions. │
1369
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1370
+ // └─────────────────────────────────────────────────────────────────────┘
1371
+ /**
1372
+ * The Avatar element to display.
1373
+ */
1374
+ avatar: o.element,
1375
+ /**
1376
+ * This prop isn't supported.
1377
+ * Use the `component` prop if you need to change the children structure.
1378
+ */
1379
+ children: tt,
1380
+ /**
1381
+ * Override or extend the styles applied to the component.
1382
+ */
1383
+ classes: o.object,
1384
+ /**
1385
+ * @ignore
1386
+ */
1387
+ className: o.string,
1388
+ /**
1389
+ * If `true`, the chip will appear clickable, and will raise when pressed,
1390
+ * even if the onClick prop is not defined.
1391
+ * If `false`, the chip will not appear clickable, even if onClick prop is defined.
1392
+ * This can be used, for example,
1393
+ * along with the component prop to indicate an anchor Chip is clickable.
1394
+ * Note: this controls the UI and does not affect the onClick event.
1395
+ */
1396
+ clickable: o.bool,
1397
+ /**
1398
+ * The color of the component.
1399
+ * It supports both default and custom theme colors, which can be added as shown in the
1400
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
1401
+ * @default 'default'
1402
+ */
1403
+ color: o.oneOfType([o.oneOf(["default", "primary", "secondary", "error", "info", "success", "warning"]), o.string]),
1404
+ /**
1405
+ * The component used for the root node.
1406
+ * Either a string to use a HTML element or a component.
1407
+ */
1408
+ component: o.elementType,
1409
+ /**
1410
+ * Override the default delete icon element. Shown only if `onDelete` is set.
1411
+ */
1412
+ deleteIcon: o.element,
1413
+ /**
1414
+ * If `true`, the component is disabled.
1415
+ * @default false
1416
+ */
1417
+ disabled: o.bool,
1418
+ /**
1419
+ * Icon element.
1420
+ */
1421
+ icon: o.element,
1422
+ /**
1423
+ * The content of the component.
1424
+ */
1425
+ label: o.node,
1426
+ /**
1427
+ * @ignore
1428
+ */
1429
+ onClick: o.func,
1430
+ /**
1431
+ * Callback fired when the delete icon is clicked.
1432
+ * If set, the delete icon will be shown.
1433
+ */
1434
+ onDelete: o.func,
1435
+ /**
1436
+ * @ignore
1437
+ */
1438
+ onKeyDown: o.func,
1439
+ /**
1440
+ * @ignore
1441
+ */
1442
+ onKeyUp: o.func,
1443
+ /**
1444
+ * The size of the component.
1445
+ * @default 'medium'
1446
+ */
1447
+ size: o.oneOfType([o.oneOf(["medium", "small"]), o.string]),
1448
+ /**
1449
+ * If `true`, allows the disabled chip to escape focus.
1450
+ * If `false`, allows the disabled chip to receive focus.
1451
+ * @default false
1452
+ */
1453
+ skipFocusWhenDisabled: o.bool,
1454
+ /**
1455
+ * The system prop that allows defining system overrides as well as additional CSS styles.
1456
+ */
1457
+ sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
1458
+ /**
1459
+ * @ignore
1460
+ */
1461
+ tabIndex: o.number,
1462
+ /**
1463
+ * The variant to use.
1464
+ * @default 'filled'
1465
+ */
1466
+ variant: o.oneOfType([o.oneOf(["filled", "outlined"]), o.string])
1467
+ });
1468
+ const $t = Uo(/* @__PURE__ */ T("path", {
1469
+ d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
1470
+ }), "Close");
1471
+ function Ct(e) {
1472
+ return po("MuiAutocomplete", e);
1473
+ }
1474
+ const u = co("MuiAutocomplete", ["root", "expanded", "fullWidth", "focused", "focusVisible", "tag", "tagSizeSmall", "tagSizeMedium", "hasPopupIcon", "hasClearIcon", "inputRoot", "input", "inputFocused", "endAdornment", "clearIndicator", "popupIndicator", "popupIndicatorOpen", "popper", "popperDisablePortal", "paper", "listbox", "loading", "noOptions", "option", "groupLabel", "groupUl"]);
1475
+ var Vo, Fo;
1476
+ const It = (e) => {
1477
+ const {
1478
+ classes: n,
1479
+ disablePortal: a,
1480
+ expanded: i,
1481
+ focused: f,
1482
+ fullWidth: $,
1483
+ hasClearIcon: y,
1484
+ hasPopupIcon: m,
1485
+ inputFocused: C,
1486
+ popupOpen: I,
1487
+ size: k
1488
+ } = e, L = {
1489
+ root: ["root", i && "expanded", f && "focused", $ && "fullWidth", y && "hasClearIcon", m && "hasPopupIcon"],
1490
+ inputRoot: ["inputRoot"],
1491
+ input: ["input", C && "inputFocused"],
1492
+ tag: ["tag", `tagSize${d(k)}`],
1493
+ endAdornment: ["endAdornment"],
1494
+ clearIndicator: ["clearIndicator"],
1495
+ popupIndicator: ["popupIndicator", I && "popupIndicatorOpen"],
1496
+ popper: ["popper", a && "popperDisablePortal"],
1497
+ paper: ["paper"],
1498
+ listbox: ["listbox"],
1499
+ loading: ["loading"],
1500
+ noOptions: ["noOptions"],
1501
+ option: ["option"],
1502
+ groupLabel: ["groupLabel"],
1503
+ groupUl: ["groupUl"]
1504
+ };
1505
+ return fo(L, Ct, n);
1506
+ }, Ot = F("div", {
1507
+ name: "MuiAutocomplete",
1508
+ slot: "Root",
1509
+ overridesResolver: (e, n) => {
1510
+ const {
1511
+ ownerState: a
1512
+ } = e, {
1513
+ fullWidth: i,
1514
+ hasClearIcon: f,
1515
+ hasPopupIcon: $,
1516
+ inputFocused: y,
1517
+ size: m
1518
+ } = a;
1519
+ return [{
1520
+ [`& .${u.tag}`]: n.tag
1521
+ }, {
1522
+ [`& .${u.tag}`]: n[`tagSize${d(m)}`]
1523
+ }, {
1524
+ [`& .${u.inputRoot}`]: n.inputRoot
1525
+ }, {
1526
+ [`& .${u.input}`]: n.input
1527
+ }, {
1528
+ [`& .${u.input}`]: y && n.inputFocused
1529
+ }, n.root, i && n.fullWidth, $ && n.hasPopupIcon, f && n.hasClearIcon];
1530
+ }
1531
+ })({
1532
+ [`&.${u.focused} .${u.clearIndicator}`]: {
1533
+ visibility: "visible"
1534
+ },
1535
+ /* Avoid double tap issue on iOS */
1536
+ "@media (pointer: fine)": {
1537
+ [`&:hover .${u.clearIndicator}`]: {
1538
+ visibility: "visible"
61
1539
  }
62
1540
  },
63
- [`&.${d.selected}`]: {
64
- backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : u(e.palette.primary.main, e.palette.action.selectedOpacity),
65
- [`&.${d.focusVisible}`]: {
66
- backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : u(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
1541
+ [`& .${u.tag}`]: {
1542
+ margin: 3,
1543
+ maxWidth: "calc(100% - 6px)"
1544
+ },
1545
+ [`& .${u.inputRoot}`]: {
1546
+ [`.${u.hasPopupIcon}&, .${u.hasClearIcon}&`]: {
1547
+ paddingRight: 30
1548
+ },
1549
+ [`.${u.hasPopupIcon}.${u.hasClearIcon}&`]: {
1550
+ paddingRight: 56
1551
+ },
1552
+ [`& .${u.input}`]: {
1553
+ width: 0,
1554
+ minWidth: 30
1555
+ }
1556
+ },
1557
+ [`& .${Io.root}`]: {
1558
+ paddingBottom: 1,
1559
+ "& .MuiInput-input": {
1560
+ padding: "4px 4px 4px 0px"
67
1561
  }
68
1562
  },
69
- [`&.${d.selected}:hover`]: {
70
- backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` : u(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity),
71
- // Reset on touch devices, it doesn't add specificity
72
- "@media (hover: none)": {
73
- backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : u(e.palette.primary.main, e.palette.action.selectedOpacity)
1563
+ [`& .${Io.root}.${be.sizeSmall}`]: {
1564
+ [`& .${Io.input}`]: {
1565
+ padding: "2px 4px 3px 0"
74
1566
  }
75
1567
  },
76
- [`&.${d.focusVisible}`]: {
77
- backgroundColor: (e.vars || e).palette.action.focus
1568
+ [`& .${No.root}`]: {
1569
+ padding: 9,
1570
+ [`.${u.hasPopupIcon}&, .${u.hasClearIcon}&`]: {
1571
+ paddingRight: 39
1572
+ },
1573
+ [`.${u.hasPopupIcon}.${u.hasClearIcon}&`]: {
1574
+ paddingRight: 65
1575
+ },
1576
+ [`& .${u.input}`]: {
1577
+ padding: "7.5px 4px 7.5px 5px"
1578
+ },
1579
+ [`& .${u.endAdornment}`]: {
1580
+ right: 9
1581
+ }
78
1582
  },
79
- [`&.${d.disabled}`]: {
80
- opacity: (e.vars || e).palette.action.disabledOpacity
1583
+ [`& .${No.root}.${be.sizeSmall}`]: {
1584
+ // Don't specify paddingRight, as it overrides the default value set when there is only
1585
+ // one of the popup or clear icon as the specificity is equal so the latter one wins
1586
+ paddingTop: 6,
1587
+ paddingBottom: 6,
1588
+ paddingLeft: 6,
1589
+ [`& .${u.input}`]: {
1590
+ padding: "2.5px 4px 2.5px 8px"
1591
+ }
1592
+ },
1593
+ [`& .${Ae.root}`]: {
1594
+ paddingTop: 19,
1595
+ paddingLeft: 8,
1596
+ [`.${u.hasPopupIcon}&, .${u.hasClearIcon}&`]: {
1597
+ paddingRight: 39
1598
+ },
1599
+ [`.${u.hasPopupIcon}.${u.hasClearIcon}&`]: {
1600
+ paddingRight: 65
1601
+ },
1602
+ [`& .${Ae.input}`]: {
1603
+ padding: "7px 4px"
1604
+ },
1605
+ [`& .${u.endAdornment}`]: {
1606
+ right: 9
1607
+ }
81
1608
  },
82
- [`& + .${M.root}`]: {
83
- marginTop: e.spacing(1),
84
- marginBottom: e.spacing(1)
1609
+ [`& .${Ae.root}.${be.sizeSmall}`]: {
1610
+ paddingBottom: 1,
1611
+ [`& .${Ae.input}`]: {
1612
+ padding: "2.5px 4px"
1613
+ }
85
1614
  },
86
- [`& + .${M.inset}`]: {
87
- marginLeft: 52
1615
+ [`& .${be.hiddenLabel}`]: {
1616
+ paddingTop: 8
88
1617
  },
89
- [`& .${h.root}`]: {
90
- marginTop: 0,
91
- marginBottom: 0
1618
+ [`& .${Ae.root}.${be.hiddenLabel}`]: {
1619
+ paddingTop: 0,
1620
+ paddingBottom: 0,
1621
+ [`& .${u.input}`]: {
1622
+ paddingTop: 16,
1623
+ paddingBottom: 17
1624
+ }
92
1625
  },
93
- [`& .${h.inset}`]: {
94
- paddingLeft: 36
1626
+ [`& .${Ae.root}.${be.hiddenLabel}.${be.sizeSmall}`]: {
1627
+ [`& .${u.input}`]: {
1628
+ paddingTop: 8,
1629
+ paddingBottom: 9
1630
+ }
95
1631
  },
96
- [`& .${O.root}`]: {
97
- minWidth: 36
1632
+ [`& .${u.input}`]: {
1633
+ flexGrow: 1,
1634
+ textOverflow: "ellipsis",
1635
+ opacity: 0
98
1636
  },
99
1637
  variants: [{
100
- props: ({
101
- ownerState: o
102
- }) => !o.disableGutters,
1638
+ props: {
1639
+ fullWidth: !0
1640
+ },
103
1641
  style: {
104
- paddingLeft: 16,
105
- paddingRight: 16
1642
+ width: "100%"
106
1643
  }
107
1644
  }, {
108
- props: ({
109
- ownerState: o
110
- }) => o.divider,
1645
+ props: {
1646
+ size: "small"
1647
+ },
111
1648
  style: {
112
- borderBottom: `1px solid ${(e.vars || e).palette.divider}`,
113
- backgroundClip: "padding-box"
1649
+ [`& .${u.tag}`]: {
1650
+ margin: 2,
1651
+ maxWidth: "calc(100% - 4px)"
1652
+ }
114
1653
  }
115
1654
  }, {
116
- props: ({
117
- ownerState: o
118
- }) => !o.dense,
1655
+ props: {
1656
+ inputFocused: !0
1657
+ },
119
1658
  style: {
120
- [e.breakpoints.up("sm")]: {
121
- minHeight: "auto"
1659
+ [`& .${u.input}`]: {
1660
+ opacity: 1
122
1661
  }
123
1662
  }
124
1663
  }, {
125
- props: ({
126
- ownerState: o
127
- }) => o.dense,
1664
+ props: {
1665
+ multiple: !0
1666
+ },
128
1667
  style: {
129
- minHeight: 32,
130
- // https://m2.material.io/components/menus#specs > Dense
131
- paddingTop: 4,
132
- paddingBottom: 4,
133
- ...e.typography.body2,
134
- [`& .${O.root} svg`]: {
135
- fontSize: "1.25rem"
1668
+ [`& .${u.inputRoot}`]: {
1669
+ flexWrap: "wrap"
136
1670
  }
137
1671
  }
138
1672
  }]
139
- }))), T = /* @__PURE__ */ p.forwardRef(function(o, s) {
140
- const r = z({
141
- props: o,
142
- name: "MuiMenuItem"
1673
+ }), Pt = F("div", {
1674
+ name: "MuiAutocomplete",
1675
+ slot: "EndAdornment",
1676
+ overridesResolver: (e, n) => n.endAdornment
1677
+ })({
1678
+ // We use a position absolute to support wrapping tags.
1679
+ position: "absolute",
1680
+ right: 0,
1681
+ top: "50%",
1682
+ transform: "translate(0, -50%)"
1683
+ }), St = F(To, {
1684
+ name: "MuiAutocomplete",
1685
+ slot: "ClearIndicator",
1686
+ overridesResolver: (e, n) => n.clearIndicator
1687
+ })({
1688
+ marginRight: -2,
1689
+ padding: 4,
1690
+ visibility: "hidden"
1691
+ }), wt = F(To, {
1692
+ name: "MuiAutocomplete",
1693
+ slot: "PopupIndicator",
1694
+ overridesResolver: ({
1695
+ ownerState: e
1696
+ }, n) => ({
1697
+ ...n.popupIndicator,
1698
+ ...e.popupOpen && n.popupIndicatorOpen
1699
+ })
1700
+ })({
1701
+ padding: 2,
1702
+ marginRight: -2,
1703
+ variants: [{
1704
+ props: {
1705
+ popupOpen: !0
1706
+ },
1707
+ style: {
1708
+ transform: "rotate(180deg)"
1709
+ }
1710
+ }]
1711
+ }), Tt = F(Ho, {
1712
+ name: "MuiAutocomplete",
1713
+ slot: "Popper",
1714
+ overridesResolver: (e, n) => {
1715
+ const {
1716
+ ownerState: a
1717
+ } = e;
1718
+ return [{
1719
+ [`& .${u.option}`]: n.option
1720
+ }, n.popper, a.disablePortal && n.popperDisablePortal];
1721
+ }
1722
+ })(ee(({
1723
+ theme: e
1724
+ }) => ({
1725
+ zIndex: (e.vars || e).zIndex.modal,
1726
+ variants: [{
1727
+ props: {
1728
+ disablePortal: !0
1729
+ },
1730
+ style: {
1731
+ position: "absolute"
1732
+ }
1733
+ }]
1734
+ }))), kt = F(Bo, {
1735
+ name: "MuiAutocomplete",
1736
+ slot: "Paper",
1737
+ overridesResolver: (e, n) => n.paper
1738
+ })(ee(({
1739
+ theme: e
1740
+ }) => ({
1741
+ ...e.typography.body1,
1742
+ overflow: "auto"
1743
+ }))), Rt = F("div", {
1744
+ name: "MuiAutocomplete",
1745
+ slot: "Loading",
1746
+ overridesResolver: (e, n) => n.loading
1747
+ })(ee(({
1748
+ theme: e
1749
+ }) => ({
1750
+ color: (e.vars || e).palette.text.secondary,
1751
+ padding: "14px 16px"
1752
+ }))), Lt = F("div", {
1753
+ name: "MuiAutocomplete",
1754
+ slot: "NoOptions",
1755
+ overridesResolver: (e, n) => n.noOptions
1756
+ })(ee(({
1757
+ theme: e
1758
+ }) => ({
1759
+ color: (e.vars || e).palette.text.secondary,
1760
+ padding: "14px 16px"
1761
+ }))), At = F("div", {
1762
+ name: "MuiAutocomplete",
1763
+ slot: "Listbox",
1764
+ overridesResolver: (e, n) => n.listbox
1765
+ })(ee(({
1766
+ theme: e
1767
+ }) => ({
1768
+ listStyle: "none",
1769
+ margin: 0,
1770
+ padding: "8px 0",
1771
+ maxHeight: "40vh",
1772
+ overflow: "auto",
1773
+ position: "relative",
1774
+ [`& .${u.option}`]: {
1775
+ minHeight: 48,
1776
+ display: "flex",
1777
+ overflow: "hidden",
1778
+ justifyContent: "flex-start",
1779
+ alignItems: "center",
1780
+ cursor: "pointer",
1781
+ paddingTop: 6,
1782
+ boxSizing: "border-box",
1783
+ outline: "0",
1784
+ WebkitTapHighlightColor: "transparent",
1785
+ paddingBottom: 6,
1786
+ paddingLeft: 16,
1787
+ paddingRight: 16,
1788
+ [e.breakpoints.up("sm")]: {
1789
+ minHeight: "auto"
1790
+ },
1791
+ [`&.${u.focused}`]: {
1792
+ backgroundColor: (e.vars || e).palette.action.hover,
1793
+ // Reset on touch devices, it doesn't add specificity
1794
+ "@media (hover: none)": {
1795
+ backgroundColor: "transparent"
1796
+ }
1797
+ },
1798
+ '&[aria-disabled="true"]': {
1799
+ opacity: (e.vars || e).palette.action.disabledOpacity,
1800
+ pointerEvents: "none"
1801
+ },
1802
+ [`&.${u.focusVisible}`]: {
1803
+ backgroundColor: (e.vars || e).palette.action.focus
1804
+ },
1805
+ '&[aria-selected="true"]': {
1806
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : V(e.palette.primary.main, e.palette.action.selectedOpacity),
1807
+ [`&.${u.focused}`]: {
1808
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` : V(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity),
1809
+ // Reset on touch devices, it doesn't add specificity
1810
+ "@media (hover: none)": {
1811
+ backgroundColor: (e.vars || e).palette.action.selected
1812
+ }
1813
+ },
1814
+ [`&.${u.focusVisible}`]: {
1815
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : V(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
1816
+ }
1817
+ }
1818
+ }
1819
+ }))), Dt = F(so, {
1820
+ name: "MuiAutocomplete",
1821
+ slot: "GroupLabel",
1822
+ overridesResolver: (e, n) => n.groupLabel
1823
+ })(ee(({
1824
+ theme: e
1825
+ }) => ({
1826
+ backgroundColor: (e.vars || e).palette.background.paper,
1827
+ top: -8
1828
+ }))), Nt = F("ul", {
1829
+ name: "MuiAutocomplete",
1830
+ slot: "GroupUl",
1831
+ overridesResolver: (e, n) => n.groupUl
1832
+ })({
1833
+ padding: 0,
1834
+ [`& .${u.option}`]: {
1835
+ paddingLeft: 24
1836
+ }
1837
+ }), Ko = /* @__PURE__ */ b.forwardRef(function(n, a) {
1838
+ const i = uo({
1839
+ props: n,
1840
+ name: "MuiAutocomplete"
143
1841
  }), {
144
- autoFocus: n = !1,
145
- component: i = "li",
146
- dense: a = !1,
147
- divider: g = !1,
148
- disableGutters: l = !1,
149
- focusVisibleClassName: L,
150
- role: R = "menuitem",
151
- tabIndex: v,
152
- className: S,
153
- ...k
154
- } = r, y = p.useContext($), x = p.useMemo(() => ({
155
- dense: a || y.dense || !1,
156
- disableGutters: l
157
- }), [y.dense, a, l]), m = p.useRef(null);
158
- q(() => {
159
- n && (m.current ? m.current.focus() : process.env.NODE_ENV !== "production" && console.error("MUI: Unable to set focus to a MenuItem whose component has not been rendered."));
160
- }, [n]);
161
- const B = {
162
- ...r,
163
- dense: x.dense,
164
- divider: g,
165
- disableGutters: l
166
- }, b = Q(r), j = A(m, s);
167
- let C;
168
- return r.disabled || (C = v !== void 0 ? v : -1), /* @__PURE__ */ c($.Provider, {
169
- value: x,
170
- children: /* @__PURE__ */ c(X, {
171
- ref: j,
172
- role: R,
173
- tabIndex: C,
174
- component: i,
175
- focusVisibleClassName: w(b.focusVisible, L),
176
- className: w(b.root, S),
177
- ...k,
178
- ownerState: B,
179
- classes: b
1842
+ autoComplete: f = !1,
1843
+ autoHighlight: $ = !1,
1844
+ autoSelect: y = !1,
1845
+ blurOnSelect: m = !1,
1846
+ ChipProps: C,
1847
+ className: I,
1848
+ clearIcon: k = Vo || (Vo = /* @__PURE__ */ T($t, {
1849
+ fontSize: "small"
1850
+ })),
1851
+ clearOnBlur: L = !i.freeSolo,
1852
+ clearOnEscape: X = !1,
1853
+ clearText: A = "Clear",
1854
+ closeText: E = "Close",
1855
+ componentsProps: ue,
1856
+ defaultValue: Me = i.multiple ? [] : null,
1857
+ disableClearable: me = !1,
1858
+ disableCloseOnSelect: le = !1,
1859
+ disabled: H = !1,
1860
+ disabledItemsFocusable: he = !1,
1861
+ disableListWrap: Ee = !1,
1862
+ disablePortal: oe = !1,
1863
+ filterOptions: ze,
1864
+ filterSelectedOptions: Ve = !1,
1865
+ forcePopupIcon: de = "auto",
1866
+ freeSolo: ye = !1,
1867
+ fullWidth: W = !1,
1868
+ getLimitTagsText: v = (h) => `+${h}`,
1869
+ getOptionDisabled: fe,
1870
+ getOptionKey: _,
1871
+ getOptionLabel: ve,
1872
+ isOptionEqualToValue: q,
1873
+ groupBy: ie,
1874
+ handleHomeEndKeys: xe = !i.freeSolo,
1875
+ id: D,
1876
+ includeInputInList: ko = !1,
1877
+ inputValue: $e,
1878
+ limitTags: Fe = -1,
1879
+ ListboxComponent: go,
1880
+ ListboxProps: U,
1881
+ loading: N = !1,
1882
+ loadingText: je = "Loading…",
1883
+ multiple: Be = !1,
1884
+ noOptionsText: w = "No options",
1885
+ onChange: K,
1886
+ onClose: Ue,
1887
+ onHighlightChange: Ro,
1888
+ onInputChange: G,
1889
+ onOpen: Xe,
1890
+ open: bo,
1891
+ openOnFocus: z = !1,
1892
+ openText: s = "Open",
1893
+ options: Lo,
1894
+ PaperComponent: P,
1895
+ PopperComponent: Ce,
1896
+ popupIcon: Ie = Fo || (Fo = /* @__PURE__ */ T(Jo, {})),
1897
+ readOnly: He = !1,
1898
+ renderGroup: Oe,
1899
+ renderInput: se,
1900
+ renderOption: Qe,
1901
+ renderTags: Ze,
1902
+ selectOnFocus: mo = !i.freeSolo,
1903
+ size: Pe = "medium",
1904
+ slots: j = {},
1905
+ slotProps: S = {},
1906
+ value: Q,
1907
+ ...We
1908
+ } = i, {
1909
+ getRootProps: Se,
1910
+ getInputProps: eo,
1911
+ getInputLabelProps: te,
1912
+ getPopupIndicatorProps: Y,
1913
+ getClearProps: ho,
1914
+ getTagProps: Ke,
1915
+ getListboxProps: yo,
1916
+ getOptionProps: ne,
1917
+ value: re,
1918
+ dirty: pe,
1919
+ expanded: we,
1920
+ id: ge,
1921
+ popupOpen: Te,
1922
+ focused: Ge,
1923
+ focusedTag: oo,
1924
+ anchorEl: ke,
1925
+ setAnchorEl: vo,
1926
+ inputValue: to,
1927
+ groupedOptions: Re
1928
+ } = st({
1929
+ ...i,
1930
+ componentName: "Autocomplete"
1931
+ }), _e = !me && !H && pe && !He, qe = (!ye || de === !0) && de !== !1, {
1932
+ onMouseDown: xo
1933
+ } = eo(), {
1934
+ ref: $o,
1935
+ ...no
1936
+ } = yo(), Ye = ve || ((h) => h.label ?? h), M = {
1937
+ ...i,
1938
+ disablePortal: oe,
1939
+ expanded: we,
1940
+ focused: Ge,
1941
+ fullWidth: W,
1942
+ getOptionLabel: Ye,
1943
+ hasClearIcon: _e,
1944
+ hasPopupIcon: qe,
1945
+ inputFocused: oo === -1,
1946
+ popupOpen: Te,
1947
+ size: Pe
1948
+ }, R = It(M), ae = {
1949
+ slots: {
1950
+ listbox: go,
1951
+ paper: P,
1952
+ popper: Ce,
1953
+ ...j
1954
+ },
1955
+ slotProps: {
1956
+ chip: C,
1957
+ listbox: U,
1958
+ ...ue,
1959
+ ...S
1960
+ }
1961
+ }, [r, t] = Oo("listbox", {
1962
+ elementType: "ul",
1963
+ externalForwardedProps: ae,
1964
+ ownerState: M,
1965
+ className: R.listbox,
1966
+ additionalProps: no,
1967
+ ref: $o
1968
+ }), [l, p] = Oo("paper", {
1969
+ elementType: Bo,
1970
+ externalForwardedProps: ae,
1971
+ ownerState: M,
1972
+ className: R.paper
1973
+ }), [c, O] = Oo("popper", {
1974
+ elementType: Ho,
1975
+ externalForwardedProps: ae,
1976
+ ownerState: M,
1977
+ className: R.popper,
1978
+ additionalProps: {
1979
+ disablePortal: oe,
1980
+ style: {
1981
+ width: ke ? ke.clientWidth : null
1982
+ },
1983
+ role: "presentation",
1984
+ anchorEl: ke,
1985
+ open: Te
1986
+ }
1987
+ });
1988
+ let x;
1989
+ if (Be && re.length > 0) {
1990
+ const h = (Z) => ({
1991
+ className: R.tag,
1992
+ disabled: H,
1993
+ ...Ke(Z)
1994
+ });
1995
+ Ze ? x = Ze(re, h, M) : x = re.map((Z, ce) => {
1996
+ const {
1997
+ key: Je,
1998
+ ..._o
1999
+ } = h({
2000
+ index: ce
2001
+ });
2002
+ return /* @__PURE__ */ T(Wo, {
2003
+ label: Ye(Z),
2004
+ size: Pe,
2005
+ ..._o,
2006
+ ...ae.slotProps.chip
2007
+ }, Je);
2008
+ });
2009
+ }
2010
+ if (Fe > -1 && Array.isArray(x)) {
2011
+ const h = x.length - Fe;
2012
+ !Ge && h > 0 && (x = x.splice(0, Fe), x.push(/* @__PURE__ */ T("span", {
2013
+ className: R.tag,
2014
+ children: v(h)
2015
+ }, x.length)));
2016
+ }
2017
+ const Le = Oe || ((h) => /* @__PURE__ */ Ne("li", {
2018
+ children: [/* @__PURE__ */ T(Dt, {
2019
+ className: R.groupLabel,
2020
+ ownerState: M,
2021
+ component: "div",
2022
+ children: h.group
2023
+ }), /* @__PURE__ */ T(Nt, {
2024
+ className: R.groupUl,
2025
+ ownerState: M,
2026
+ children: h.children
2027
+ })]
2028
+ }, h.key)), Go = Qe || ((h, Z) => {
2029
+ const {
2030
+ key: ce,
2031
+ ...Je
2032
+ } = h;
2033
+ return /* @__PURE__ */ T("li", {
2034
+ ...Je,
2035
+ children: Ye(Z)
2036
+ }, ce);
2037
+ }), Do = (h, Z) => {
2038
+ const ce = ne({
2039
+ option: h,
2040
+ index: Z
2041
+ });
2042
+ return Go({
2043
+ ...ce,
2044
+ className: R.option
2045
+ }, h, {
2046
+ selected: ce["aria-selected"],
2047
+ index: Z,
2048
+ inputValue: to
2049
+ }, M);
2050
+ }, ro = ae.slotProps.clearIndicator, ao = ae.slotProps.popupIndicator, Co = (h) => /* @__PURE__ */ T(Tt, {
2051
+ as: c,
2052
+ ...O,
2053
+ children: /* @__PURE__ */ T(kt, {
2054
+ as: l,
2055
+ ...p,
2056
+ children: h
180
2057
  })
181
2058
  });
2059
+ let lo = null;
2060
+ return Re.length > 0 ? lo = Co(/* @__PURE__ */ T(At, {
2061
+ as: r,
2062
+ ...t,
2063
+ children: Re.map((h, Z) => ie ? Le({
2064
+ key: h.key,
2065
+ group: h.group,
2066
+ children: h.options.map((ce, Je) => Do(ce, h.index + Je))
2067
+ }) : Do(h, Z))
2068
+ })) : N && Re.length === 0 ? lo = Co(/* @__PURE__ */ T(Rt, {
2069
+ className: R.loading,
2070
+ ownerState: M,
2071
+ children: je
2072
+ })) : Re.length === 0 && !ye && !N && (lo = Co(/* @__PURE__ */ T(Lt, {
2073
+ className: R.noOptions,
2074
+ ownerState: M,
2075
+ role: "presentation",
2076
+ onMouseDown: (h) => {
2077
+ h.preventDefault();
2078
+ },
2079
+ children: w
2080
+ }))), /* @__PURE__ */ Ne(b.Fragment, {
2081
+ children: [/* @__PURE__ */ T(Ot, {
2082
+ ref: a,
2083
+ className: J(R.root, I),
2084
+ ownerState: M,
2085
+ ...Se(We),
2086
+ children: se({
2087
+ id: ge,
2088
+ disabled: H,
2089
+ fullWidth: !0,
2090
+ size: Pe === "small" ? "small" : void 0,
2091
+ InputLabelProps: te(),
2092
+ InputProps: {
2093
+ ref: vo,
2094
+ className: R.inputRoot,
2095
+ startAdornment: x,
2096
+ onMouseDown: (h) => xo(h),
2097
+ ...(_e || qe) && {
2098
+ endAdornment: /* @__PURE__ */ Ne(Pt, {
2099
+ className: R.endAdornment,
2100
+ ownerState: M,
2101
+ children: [_e ? /* @__PURE__ */ T(St, {
2102
+ ...ho(),
2103
+ "aria-label": A,
2104
+ title: A,
2105
+ ownerState: M,
2106
+ ...ro,
2107
+ className: J(R.clearIndicator, ro == null ? void 0 : ro.className),
2108
+ children: k
2109
+ }) : null, qe ? /* @__PURE__ */ T(wt, {
2110
+ ...Y(),
2111
+ disabled: H,
2112
+ "aria-label": Te ? E : s,
2113
+ title: Te ? E : s,
2114
+ ownerState: M,
2115
+ ...ao,
2116
+ className: J(R.popupIndicator, ao == null ? void 0 : ao.className),
2117
+ children: Ie
2118
+ }) : null]
2119
+ })
2120
+ }
2121
+ },
2122
+ inputProps: {
2123
+ className: R.input,
2124
+ disabled: H,
2125
+ readOnly: He,
2126
+ ...eo()
2127
+ }
2128
+ })
2129
+ }), ke ? lo : null]
2130
+ });
182
2131
  });
183
- process.env.NODE_ENV !== "production" && (T.propTypes = {
2132
+ process.env.NODE_ENV !== "production" && (Ko.propTypes = {
184
2133
  // ┌────────────────────────────── Warning ──────────────────────────────┐
185
2134
  // │ These PropTypes are generated from the TypeScript type definitions. │
186
2135
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
187
2136
  // └─────────────────────────────────────────────────────────────────────┘
188
2137
  /**
189
- * If `true`, the list item is focused during the first mount.
190
- * Focus will also be triggered if the value changes from false to true.
2138
+ * If `true`, the portion of the selected suggestion that the user hasn't typed,
2139
+ * known as the completion string, appears inline after the input cursor in the textbox.
2140
+ * The inline completion string is visually highlighted and has a selected state.
191
2141
  * @default false
192
2142
  */
193
- autoFocus: t.bool,
2143
+ autoComplete: o.bool,
194
2144
  /**
195
- * The content of the component.
2145
+ * If `true`, the first option is automatically highlighted.
2146
+ * @default false
2147
+ */
2148
+ autoHighlight: o.bool,
2149
+ /**
2150
+ * If `true`, the selected option becomes the value of the input
2151
+ * when the Autocomplete loses focus unless the user chooses
2152
+ * a different option or changes the character string in the input.
2153
+ *
2154
+ * When using the `freeSolo` mode, the typed value will be the input value
2155
+ * if the Autocomplete loses focus without highlighting an option.
2156
+ * @default false
2157
+ */
2158
+ autoSelect: o.bool,
2159
+ /**
2160
+ * Control if the input should be blurred when an option is selected:
2161
+ *
2162
+ * - `false` the input is not blurred.
2163
+ * - `true` the input is always blurred.
2164
+ * - `touch` the input is blurred after a touch event.
2165
+ * - `mouse` the input is blurred after a mouse event.
2166
+ * @default false
196
2167
  */
197
- children: t.node,
2168
+ blurOnSelect: o.oneOfType([o.oneOf(["mouse", "touch"]), o.bool]),
2169
+ /**
2170
+ * Props applied to the [`Chip`](https://mui.com/material-ui/api/chip/) element.
2171
+ */
2172
+ ChipProps: o.object,
198
2173
  /**
199
2174
  * Override or extend the styles applied to the component.
200
2175
  */
201
- classes: t.object,
2176
+ classes: o.object,
202
2177
  /**
203
2178
  * @ignore
204
2179
  */
205
- className: t.string,
2180
+ className: o.string,
206
2181
  /**
207
- * The component used for the root node.
208
- * Either a string to use a HTML element or a component.
2182
+ * The icon to display in place of the default clear icon.
2183
+ * @default <ClearIcon fontSize="small" />
209
2184
  */
210
- component: t.elementType,
2185
+ clearIcon: o.node,
211
2186
  /**
212
- * If `true`, compact vertical padding designed for keyboard and mouse input is used.
213
- * The prop defaults to the value inherited from the parent Menu component.
2187
+ * If `true`, the input's text is cleared on blur if no value is selected.
2188
+ *
2189
+ * Set it to `true` if you want to help the user enter a new value.
2190
+ * Set it to `false` if you want to help the user resume their search.
2191
+ * @default !props.freeSolo
2192
+ */
2193
+ clearOnBlur: o.bool,
2194
+ /**
2195
+ * If `true`, clear all values when the user presses escape and the popup is closed.
214
2196
  * @default false
215
2197
  */
216
- dense: t.bool,
2198
+ clearOnEscape: o.bool,
217
2199
  /**
218
- * @ignore
2200
+ * Override the default text for the *clear* icon button.
2201
+ *
2202
+ * For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
2203
+ * @default 'Clear'
2204
+ */
2205
+ clearText: o.string,
2206
+ /**
2207
+ * Override the default text for the *close popup* icon button.
2208
+ *
2209
+ * For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
2210
+ * @default 'Close'
2211
+ */
2212
+ closeText: o.string,
2213
+ /**
2214
+ * The props used for each slot inside.
2215
+ * @deprecated Use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
2216
+ */
2217
+ componentsProps: o.shape({
2218
+ clearIndicator: o.object,
2219
+ paper: o.object,
2220
+ popper: o.object,
2221
+ popupIndicator: o.object
2222
+ }),
2223
+ /**
2224
+ * The default value. Use when the component is not controlled.
2225
+ * @default props.multiple ? [] : null
2226
+ */
2227
+ defaultValue: wo(o.any, (e) => e.multiple && e.defaultValue !== void 0 && !Array.isArray(e.defaultValue) ? new Error(["MUI: The Autocomplete expects the `defaultValue` prop to be an array when `multiple={true}` or undefined.", `However, ${e.defaultValue} was provided.`].join(`
2228
+ `)) : null),
2229
+ /**
2230
+ * If `true`, the input can't be cleared.
2231
+ * @default false
2232
+ */
2233
+ disableClearable: o.bool,
2234
+ /**
2235
+ * If `true`, the popup won't close when a value is selected.
2236
+ * @default false
2237
+ */
2238
+ disableCloseOnSelect: o.bool,
2239
+ /**
2240
+ * If `true`, the component is disabled.
2241
+ * @default false
2242
+ */
2243
+ disabled: o.bool,
2244
+ /**
2245
+ * If `true`, will allow focus on disabled items.
2246
+ * @default false
2247
+ */
2248
+ disabledItemsFocusable: o.bool,
2249
+ /**
2250
+ * If `true`, the list box in the popup will not wrap focus.
2251
+ * @default false
2252
+ */
2253
+ disableListWrap: o.bool,
2254
+ /**
2255
+ * If `true`, the `Popper` content will be under the DOM hierarchy of the parent component.
2256
+ * @default false
2257
+ */
2258
+ disablePortal: o.bool,
2259
+ /**
2260
+ * A function that determines the filtered options to be rendered on search.
2261
+ *
2262
+ * @default createFilterOptions()
2263
+ * @param {Value[]} options The options to render.
2264
+ * @param {object} state The state of the component.
2265
+ * @returns {Value[]}
219
2266
  */
220
- disabled: t.bool,
2267
+ filterOptions: o.func,
221
2268
  /**
222
- * If `true`, the left and right padding is removed.
2269
+ * If `true`, hide the selected options from the list box.
223
2270
  * @default false
224
2271
  */
225
- disableGutters: t.bool,
2272
+ filterSelectedOptions: o.bool,
2273
+ /**
2274
+ * Force the visibility display of the popup icon.
2275
+ * @default 'auto'
2276
+ */
2277
+ forcePopupIcon: o.oneOfType([o.oneOf(["auto"]), o.bool]),
2278
+ /**
2279
+ * If `true`, the Autocomplete is free solo, meaning that the user input is not bound to provided options.
2280
+ * @default false
2281
+ */
2282
+ freeSolo: o.bool,
2283
+ /**
2284
+ * If `true`, the input will take up the full width of its container.
2285
+ * @default false
2286
+ */
2287
+ fullWidth: o.bool,
2288
+ /**
2289
+ * The label to display when the tags are truncated (`limitTags`).
2290
+ *
2291
+ * @param {number} more The number of truncated tags.
2292
+ * @returns {ReactNode}
2293
+ * @default (more) => `+${more}`
2294
+ */
2295
+ getLimitTagsText: o.func,
2296
+ /**
2297
+ * Used to determine the disabled state for a given option.
2298
+ *
2299
+ * @param {Value} option The option to test.
2300
+ * @returns {boolean}
2301
+ */
2302
+ getOptionDisabled: o.func,
2303
+ /**
2304
+ * Used to determine the key for a given option.
2305
+ * This can be useful when the labels of options are not unique (since labels are used as keys by default).
2306
+ *
2307
+ * @param {Value} option The option to get the key for.
2308
+ * @returns {string | number}
2309
+ */
2310
+ getOptionKey: o.func,
2311
+ /**
2312
+ * Used to determine the string value for a given option.
2313
+ * It's used to fill the input (and the list box options if `renderOption` is not provided).
2314
+ *
2315
+ * If used in free solo mode, it must accept both the type of the options and a string.
2316
+ *
2317
+ * @param {Value} option
2318
+ * @returns {string}
2319
+ * @default (option) => option.label ?? option
2320
+ */
2321
+ getOptionLabel: o.func,
2322
+ /**
2323
+ * If provided, the options will be grouped under the returned string.
2324
+ * The groupBy value is also used as the text for group headings when `renderGroup` is not provided.
2325
+ *
2326
+ * @param {Value} options The options to group.
2327
+ * @returns {string}
2328
+ */
2329
+ groupBy: o.func,
2330
+ /**
2331
+ * If `true`, the component handles the "Home" and "End" keys when the popup is open.
2332
+ * It should move focus to the first option and last option, respectively.
2333
+ * @default !props.freeSolo
2334
+ */
2335
+ handleHomeEndKeys: o.bool,
2336
+ /**
2337
+ * This prop is used to help implement the accessibility logic.
2338
+ * If you don't provide an id it will fall back to a randomly generated one.
2339
+ */
2340
+ id: o.string,
2341
+ /**
2342
+ * If `true`, the highlight can move to the input.
2343
+ * @default false
2344
+ */
2345
+ includeInputInList: o.bool,
2346
+ /**
2347
+ * The input value.
2348
+ */
2349
+ inputValue: o.string,
2350
+ /**
2351
+ * Used to determine if the option represents the given value.
2352
+ * Uses strict equality by default.
2353
+ * ⚠️ Both arguments need to be handled, an option can only match with one value.
2354
+ *
2355
+ * @param {Value} option The option to test.
2356
+ * @param {Value} value The value to test against.
2357
+ * @returns {boolean}
2358
+ */
2359
+ isOptionEqualToValue: o.func,
2360
+ /**
2361
+ * The maximum number of tags that will be visible when not focused.
2362
+ * Set `-1` to disable the limit.
2363
+ * @default -1
2364
+ */
2365
+ limitTags: Qo,
2366
+ /**
2367
+ * The component used to render the listbox.
2368
+ * @default 'ul'
2369
+ */
2370
+ ListboxComponent: o.elementType,
2371
+ /**
2372
+ * Props applied to the Listbox element.
2373
+ */
2374
+ ListboxProps: o.object,
2375
+ /**
2376
+ * If `true`, the component is in a loading state.
2377
+ * This shows the `loadingText` in place of suggestions (only if there are no suggestions to show, for example `options` are empty).
2378
+ * @default false
2379
+ */
2380
+ loading: o.bool,
2381
+ /**
2382
+ * Text to display when in a loading state.
2383
+ *
2384
+ * For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
2385
+ * @default 'Loading…'
2386
+ */
2387
+ loadingText: o.node,
226
2388
  /**
227
- * If `true`, a 1px light border is added to the bottom of the menu item.
2389
+ * If `true`, `value` must be an array and the menu will support multiple selections.
228
2390
  * @default false
229
2391
  */
230
- divider: t.bool,
2392
+ multiple: o.bool,
231
2393
  /**
232
- * This prop can help identify which element has keyboard focus.
233
- * The class name will be applied when the element gains the focus through keyboard interaction.
234
- * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
235
- * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
236
- * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
237
- * if needed.
2394
+ * Text to display when there are no options.
2395
+ *
2396
+ * For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
2397
+ * @default 'No options'
238
2398
  */
239
- focusVisibleClassName: t.string,
2399
+ noOptionsText: o.node,
2400
+ /**
2401
+ * Callback fired when the value changes.
2402
+ *
2403
+ * @param {React.SyntheticEvent} event The event source of the callback.
2404
+ * @param {Value|Value[]} value The new value of the component.
2405
+ * @param {string} reason One of "createOption", "selectOption", "removeOption", "blur" or "clear".
2406
+ * @param {string} [details]
2407
+ */
2408
+ onChange: o.func,
2409
+ /**
2410
+ * Callback fired when the popup requests to be closed.
2411
+ * Use in controlled mode (see open).
2412
+ *
2413
+ * @param {React.SyntheticEvent} event The event source of the callback.
2414
+ * @param {string} reason Can be: `"toggleInput"`, `"escape"`, `"selectOption"`, `"removeOption"`, `"blur"`.
2415
+ */
2416
+ onClose: o.func,
2417
+ /**
2418
+ * Callback fired when the highlight option changes.
2419
+ *
2420
+ * @param {React.SyntheticEvent} event The event source of the callback.
2421
+ * @param {Value} option The highlighted option.
2422
+ * @param {string} reason Can be: `"keyboard"`, `"auto"`, `"mouse"`, `"touch"`.
2423
+ */
2424
+ onHighlightChange: o.func,
2425
+ /**
2426
+ * Callback fired when the input value changes.
2427
+ *
2428
+ * @param {React.SyntheticEvent} event The event source of the callback.
2429
+ * @param {string} value The new value of the text input.
2430
+ * @param {string} reason Can be: `"input"` (user input), `"reset"` (programmatic change), `"clear"`, `"blur"`, `"selectOption"`, `"removeOption"`
2431
+ */
2432
+ onInputChange: o.func,
240
2433
  /**
241
2434
  * @ignore
242
2435
  */
243
- role: t.string,
2436
+ onKeyDown: o.func,
244
2437
  /**
245
- * If `true`, the component is selected.
2438
+ * Callback fired when the popup requests to be opened.
2439
+ * Use in controlled mode (see open).
2440
+ *
2441
+ * @param {React.SyntheticEvent} event The event source of the callback.
2442
+ */
2443
+ onOpen: o.func,
2444
+ /**
2445
+ * If `true`, the component is shown.
2446
+ */
2447
+ open: o.bool,
2448
+ /**
2449
+ * If `true`, the popup will open on input focus.
246
2450
  * @default false
247
2451
  */
248
- selected: t.bool,
2452
+ openOnFocus: o.bool,
2453
+ /**
2454
+ * Override the default text for the *open popup* icon button.
2455
+ *
2456
+ * For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
2457
+ * @default 'Open'
2458
+ */
2459
+ openText: o.string,
2460
+ /**
2461
+ * A list of options that will be shown in the Autocomplete.
2462
+ */
2463
+ options: o.array.isRequired,
2464
+ /**
2465
+ * The component used to render the body of the popup.
2466
+ * @default Paper
2467
+ */
2468
+ PaperComponent: o.elementType,
2469
+ /**
2470
+ * The component used to position the popup.
2471
+ * @default Popper
2472
+ */
2473
+ PopperComponent: o.elementType,
2474
+ /**
2475
+ * The icon to display in place of the default popup icon.
2476
+ * @default <ArrowDropDownIcon />
2477
+ */
2478
+ popupIcon: o.node,
2479
+ /**
2480
+ * If `true`, the component becomes readonly. It is also supported for multiple tags where the tag cannot be deleted.
2481
+ * @default false
2482
+ */
2483
+ readOnly: o.bool,
2484
+ /**
2485
+ * Render the group.
2486
+ *
2487
+ * @param {AutocompleteRenderGroupParams} params The group to render.
2488
+ * @returns {ReactNode}
2489
+ */
2490
+ renderGroup: o.func,
2491
+ /**
2492
+ * Render the input.
2493
+ *
2494
+ * @param {object} params
2495
+ * @returns {ReactNode}
2496
+ */
2497
+ renderInput: o.func.isRequired,
2498
+ /**
2499
+ * Render the option, use `getOptionLabel` by default.
2500
+ *
2501
+ * @param {object} props The props to apply on the li element.
2502
+ * @param {Value} option The option to render.
2503
+ * @param {object} state The state of each option.
2504
+ * @param {object} ownerState The state of the Autocomplete component.
2505
+ * @returns {ReactNode}
2506
+ */
2507
+ renderOption: o.func,
2508
+ /**
2509
+ * Render the selected value.
2510
+ *
2511
+ * @param {Value[]} value The `value` provided to the component.
2512
+ * @param {function} getTagProps A tag props getter.
2513
+ * @param {object} ownerState The state of the Autocomplete component.
2514
+ * @returns {ReactNode}
2515
+ */
2516
+ renderTags: o.func,
2517
+ /**
2518
+ * If `true`, the input's text is selected on focus.
2519
+ * It helps the user clear the selected value.
2520
+ * @default !props.freeSolo
2521
+ */
2522
+ selectOnFocus: o.bool,
2523
+ /**
2524
+ * The size of the component.
2525
+ * @default 'medium'
2526
+ */
2527
+ size: o.oneOfType([o.oneOf(["small", "medium"]), o.string]),
2528
+ /**
2529
+ * The props used for each slot inside.
2530
+ * @default {}
2531
+ */
2532
+ slotProps: o.shape({
2533
+ chip: o.oneOfType([o.func, o.object]),
2534
+ clearIndicator: o.oneOfType([o.func, o.object]),
2535
+ listbox: o.oneOfType([o.func, o.object]),
2536
+ paper: o.oneOfType([o.func, o.object]),
2537
+ popper: o.oneOfType([o.func, o.object]),
2538
+ popupIndicator: o.oneOfType([o.func, o.object])
2539
+ }),
2540
+ /**
2541
+ * The components used for each slot inside.
2542
+ * @default {}
2543
+ */
2544
+ slots: o.shape({
2545
+ listbox: o.elementType,
2546
+ paper: o.elementType,
2547
+ popper: o.elementType
2548
+ }),
249
2549
  /**
250
2550
  * The system prop that allows defining system overrides as well as additional CSS styles.
251
2551
  */
252
- sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
2552
+ sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
253
2553
  /**
254
- * @default 0
2554
+ * The value of the autocomplete.
2555
+ *
2556
+ * The value must have reference equality with the option in order to be selected.
2557
+ * You can customize the equality behavior with the `isOptionEqualToValue` prop.
255
2558
  */
256
- tabIndex: t.number
2559
+ value: wo(o.any, (e) => e.multiple && e.value !== void 0 && !Array.isArray(e.value) ? new Error(["MUI: The Autocomplete expects the `value` prop to be an array when `multiple={true}` or undefined.", `However, ${e.value} was provided.`].join(`
2560
+ `)) : null)
257
2561
  });
258
- const Y = D("div")(
259
- ({ borderFocusColor: e, minWidth: o = "130px" }) => ({
260
- ...V`
2562
+ const Mt = qo("div")(
2563
+ ({ borderFocusColor: e, minWidth: n = "180px" }) => ({
2564
+ ...Yo`
261
2565
  display: flex;
262
2566
  flex-wrap: nowrap;
263
2567
  align-items: center;
264
2568
  gap: 9px;
265
2569
  font-family: 'Roboto', sans-serif;
266
- min-width: ${o};
2570
+ min-width: ${n};
2571
+
2572
+ fieldset {
2573
+ border: none !important;
2574
+ }
267
2575
 
268
2576
  .jcDropdownLabel {
269
2577
  white-space: nowrap;
@@ -271,6 +2579,11 @@ const Y = D("div")(
271
2579
  text-transform: capitalize;
272
2580
  }
273
2581
 
2582
+ .MuiAutocomplete-root {
2583
+ width: 100%;
2584
+ flex-grow: 1;
2585
+ }
2586
+
274
2587
  .MuiInputBase-input {
275
2588
  padding: 0;
276
2589
  padding-right: 0px !important;
@@ -279,16 +2592,16 @@ const Y = D("div")(
279
2592
 
280
2593
  .MuiInputBase-root {
281
2594
  height: 18px;
282
- padding: 2px 0;
2595
+ padding: 0 !important;
283
2596
 
284
- ::before,
285
- ::after {
286
- border: none !important;
2597
+ input {
2598
+ padding: 0 !important;
2599
+ width: 100%;
287
2600
  }
288
2601
 
289
2602
  transition: 313ms all ease-out;
290
2603
  border-radius: 0;
291
- border-bottom: 1px solid ${N.colors.gray};
2604
+ border-bottom: 1px solid ${jo.colors.gray};
292
2605
  width: 100%;
293
2606
 
294
2607
  .Mui-select {
@@ -302,29 +2615,59 @@ const Y = D("div")(
302
2615
  }
303
2616
  }
304
2617
 
2618
+ .MuiAutocomplete-endAdornment {
2619
+ right: -7px !important;
2620
+ }
2621
+
2622
+ .MuiAutocomplete-clearIndicator {
2623
+ font-size: 13px;
2624
+ height: 19px;
2625
+ width: 19px;
2626
+
2627
+ svg {
2628
+ height: 15px;
2629
+ width: 15px;
2630
+ }
2631
+ }
2632
+
2633
+ .MuiButtonBase-root {
2634
+ padding: 2px;
2635
+ }
2636
+
305
2637
  svg {
306
2638
  height: 19px;
307
2639
  width: 19px;
308
- margin-right: -6px;
309
2640
  }
310
2641
  `
311
2642
  })
312
- ), de = ({
2643
+ ), Zt = ({
313
2644
  label: e,
314
- colon: o = !0,
315
- options: s = [],
316
- borderFocusColor: r = N.colors.green,
2645
+ colon: n = !0,
2646
+ options: a = [],
2647
+ borderFocusColor: i = jo.colors.green,
317
2648
  // border primary
318
- minWidth: n,
319
- ...i
320
- }) => /* @__PURE__ */ I(Y, { className: "jcLabeledDropdown", borderFocusColor: r, minWidth: n, children: [
321
- /* @__PURE__ */ I("span", { className: "jcDropdownLabel", children: [
2649
+ onChange: f,
2650
+ minWidth: $,
2651
+ ...y
2652
+ }) => /* @__PURE__ */ Ne(Mt, { className: "jcLabeledDropdown", borderFocusColor: i, minWidth: $, children: [
2653
+ /* @__PURE__ */ Ne("span", { className: "jcDropdownLabel", children: [
322
2654
  e,
323
- o && ":"
2655
+ n && ":"
324
2656
  ] }),
325
- /* @__PURE__ */ c(F, { variant: "standard", fullWidth: !0, children: /* @__PURE__ */ c(P, { ...i, children: s.map((a) => /* @__PURE__ */ c(T, { value: a.value, children: a.label }, a.value)) }) })
2657
+ /* @__PURE__ */ T(
2658
+ Ko,
2659
+ {
2660
+ options: a,
2661
+ onChange: (m, C) => (
2662
+ // @ts-ignore
2663
+ f && f({ ...m, target: { ...m.target, value: `${C == null ? void 0 : C.value}` || "" } })
2664
+ ),
2665
+ ...y,
2666
+ renderInput: (m) => /* @__PURE__ */ T(Xo, { ...m })
2667
+ }
2668
+ )
326
2669
  ] });
327
2670
  export {
328
- de as LabeledDropdown,
329
- de as default
2671
+ Zt as LabeledDropdown,
2672
+ Zt as default
330
2673
  };