@notificationapi/react 1.4.1 → 1.5.1

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.
Files changed (44) hide show
  1. package/dist/assets/Badge.js +1 -1
  2. package/dist/assets/Box.js +13 -13
  3. package/dist/assets/Button.js +781 -0
  4. package/dist/assets/ButtonBase.js +409 -622
  5. package/dist/assets/DefaultPropsProvider.js +220 -215
  6. package/dist/assets/Divider.js +105 -154
  7. package/dist/assets/Grow.js +201 -0
  8. package/dist/assets/IconButton.js +1 -1
  9. package/dist/assets/List.js +142 -0
  10. package/dist/assets/Modal.js +1094 -0
  11. package/dist/assets/Notification.js +71 -71
  12. package/dist/assets/Paper.js +1 -1
  13. package/dist/assets/Popover.js +8 -6
  14. package/dist/assets/Portal.js +2 -2
  15. package/dist/assets/Stack.js +216 -0
  16. package/dist/assets/Typography.js +193 -117
  17. package/dist/assets/WebPushOptInMessage.js +40 -814
  18. package/dist/assets/createSvgIcon.js +5 -5
  19. package/dist/assets/dividerClasses.js +56 -0
  20. package/dist/assets/index.js +151 -0
  21. package/dist/assets/useTheme2.js +253 -11
  22. package/dist/assets/utils.js +4 -4
  23. package/dist/components/Notifications/Inbox.js +2927 -9
  24. package/dist/components/Notifications/InboxHeader.js +2146 -7
  25. package/dist/components/Notifications/NotificationFeed.js +13 -13
  26. package/dist/components/Notifications/NotificationLauncher.js +2 -2
  27. package/dist/components/Notifications/NotificationPopup.js +7 -7
  28. package/dist/components/Preferences/NotificationPreferencesPopup.js +608 -7
  29. package/dist/components/Preferences/PreferenceInput.js +1451 -6
  30. package/dist/components/Preferences/Preferences.js +368 -515
  31. package/dist/components/Preferences/index.js +1 -1
  32. package/dist/components/Provider/index.js +226 -202
  33. package/dist/components/Slack/SlackConnect.d.ts +12 -0
  34. package/dist/components/Slack/SlackConnect.js +4826 -0
  35. package/dist/components/Slack/index.d.ts +1 -0
  36. package/dist/components/Slack/index.js +4 -0
  37. package/dist/components/WebPush/WebPushOptInMessage.js +3 -2
  38. package/dist/main.d.ts +1 -0
  39. package/dist/main.js +5 -3
  40. package/package.json +4 -4
  41. package/dist/assets/Inbox.js +0 -3061
  42. package/dist/assets/InboxHeader.js +0 -2338
  43. package/dist/assets/NotificationPreferencesPopup.js +0 -1694
  44. package/dist/assets/PreferenceInput.js +0 -1657
@@ -0,0 +1,4826 @@
1
+ import { jsxs as q, jsx as y } from "react/jsx-runtime";
2
+ import * as l from "react";
3
+ import { useContext as at, useState as ye, useCallback as Io, useEffect as Ro } from "react";
4
+ import { NotificationAPIContext as it } from "../Provider/context.js";
5
+ import { B as qe } from "../../assets/Box.js";
6
+ import { P as e, g as G, e as Z, h as H, s as M, m as _, u as ee, c as Y, b as J, N as Uo, K as ne, w as mo, a as _e, O as lt } from "../../assets/DefaultPropsProvider.js";
7
+ import { c as ze } from "../../assets/createSimplePaletteValueFilter.js";
8
+ import { k as Vo, c as Ho } from "../../assets/useTheme2.js";
9
+ import { b as Be, e as ct, r as ke, c as dt, B as ut } from "../../assets/ButtonBase.js";
10
+ import { A as ko, B as Ie } from "../../assets/Button.js";
11
+ import { u as We, f as Ue, F as qo, S as io } from "../../assets/Stack.js";
12
+ import { g as pt, T as Ke } from "../../assets/Typography.js";
13
+ import { i as To, a as lo, L as ft, b as Mo } from "../../assets/List.js";
14
+ import { r as bo } from "../../assets/index.js";
15
+ import { u as mt } from "../../assets/Grow.js";
16
+ import { d as bt, P as yt, a as gt } from "../../assets/Popover.js";
17
+ import { o as uo, g as ht } from "../../assets/Modal.js";
18
+ import { u as Te } from "../../assets/resolveComponentProps.js";
19
+ import { o as _o, H as vt, g as Ct } from "../../assets/Portal.js";
20
+ import { u as Eo } from "../../assets/useSlotProps.js";
21
+ import { d as No, a as Po, u as St } from "../../assets/dividerClasses.js";
22
+ import { c as wt } from "../../assets/createSvgIcon.js";
23
+ function Ge(o) {
24
+ return parseInt(o, 10) || 0;
25
+ }
26
+ const Ot = {
27
+ shadow: {
28
+ // Visibility needed to hide the extra text area on iPads
29
+ visibility: "hidden",
30
+ // Remove from the content flow
31
+ position: "absolute",
32
+ // Ignore the scrollbar width
33
+ overflow: "hidden",
34
+ height: 0,
35
+ top: 0,
36
+ left: 0,
37
+ // Create a new layer, increase the isolation of the computed values
38
+ transform: "translateZ(0)"
39
+ }
40
+ };
41
+ function xt(o) {
42
+ return o == null || Object.keys(o).length === 0 || o.outerHeightStyle === 0 && !o.overflowing;
43
+ }
44
+ const Ko = /* @__PURE__ */ l.forwardRef(function(t, n) {
45
+ const {
46
+ onChange: r,
47
+ maxRows: i,
48
+ minRows: d = 1,
49
+ style: a,
50
+ value: c,
51
+ ...f
52
+ } = t, {
53
+ current: u
54
+ } = l.useRef(c != null), m = l.useRef(null), C = Te(n, m), S = l.useRef(null), v = l.useRef(null), x = l.useCallback(() => {
55
+ const p = m.current, s = uo(p).getComputedStyle(p);
56
+ if (s.width === "0px")
57
+ return {
58
+ outerHeightStyle: 0,
59
+ overflowing: !1
60
+ };
61
+ const b = v.current;
62
+ b.style.width = s.width, b.value = p.value || t.placeholder || "x", b.value.slice(-1) === `
63
+ ` && (b.value += " ");
64
+ const R = s.boxSizing, L = Ge(s.paddingBottom) + Ge(s.paddingTop), N = Ge(s.borderBottomWidth) + Ge(s.borderTopWidth), k = b.scrollHeight;
65
+ b.value = "x";
66
+ const j = b.scrollHeight;
67
+ let P = k;
68
+ d && (P = Math.max(Number(d) * j, P)), i && (P = Math.min(Number(i) * j, P)), P = Math.max(P, j);
69
+ const B = P + (R === "border-box" ? L + N : 0), z = Math.abs(P - k) <= 1;
70
+ return {
71
+ outerHeightStyle: B,
72
+ overflowing: z
73
+ };
74
+ }, [i, d, t.placeholder]), I = l.useCallback(() => {
75
+ const p = x();
76
+ if (xt(p))
77
+ return;
78
+ const h = p.outerHeightStyle, s = m.current;
79
+ S.current !== h && (S.current = h, s.style.height = `${h}px`), s.style.overflow = p.overflowing ? "hidden" : "";
80
+ }, [x]);
81
+ Be(() => {
82
+ const p = () => {
83
+ I();
84
+ };
85
+ let h;
86
+ const s = () => {
87
+ cancelAnimationFrame(h), h = requestAnimationFrame(() => {
88
+ p();
89
+ });
90
+ }, b = bt(p), R = m.current, L = uo(R);
91
+ L.addEventListener("resize", b);
92
+ let N;
93
+ return typeof ResizeObserver < "u" && (N = new ResizeObserver(process.env.NODE_ENV === "test" ? s : p), N.observe(R)), () => {
94
+ b.clear(), cancelAnimationFrame(h), L.removeEventListener("resize", b), N && N.disconnect();
95
+ };
96
+ }, [x, I]), Be(() => {
97
+ I();
98
+ });
99
+ const O = (p) => {
100
+ u || I(), r && r(p);
101
+ };
102
+ return /* @__PURE__ */ q(l.Fragment, {
103
+ children: [/* @__PURE__ */ y("textarea", {
104
+ value: c,
105
+ onChange: O,
106
+ ref: C,
107
+ rows: d,
108
+ style: a,
109
+ ...f
110
+ }), /* @__PURE__ */ y("textarea", {
111
+ "aria-hidden": !0,
112
+ className: t.className,
113
+ readOnly: !0,
114
+ ref: v,
115
+ tabIndex: -1,
116
+ style: {
117
+ ...Ot.shadow,
118
+ ...a,
119
+ paddingTop: 0,
120
+ paddingBottom: 0
121
+ }
122
+ })]
123
+ });
124
+ });
125
+ process.env.NODE_ENV !== "production" && (Ko.propTypes = {
126
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
127
+ // │ These PropTypes are generated from the TypeScript type definitions. │
128
+ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
129
+ // └─────────────────────────────────────────────────────────────────────┘
130
+ /**
131
+ * @ignore
132
+ */
133
+ className: e.string,
134
+ /**
135
+ * Maximum number of rows to display.
136
+ */
137
+ maxRows: e.oneOfType([e.number, e.string]),
138
+ /**
139
+ * Minimum number of rows to display.
140
+ * @default 1
141
+ */
142
+ minRows: e.oneOfType([e.number, e.string]),
143
+ /**
144
+ * @ignore
145
+ */
146
+ onChange: e.func,
147
+ /**
148
+ * @ignore
149
+ */
150
+ placeholder: e.string,
151
+ /**
152
+ * @ignore
153
+ */
154
+ style: e.object,
155
+ /**
156
+ * @ignore
157
+ */
158
+ value: e.oneOfType([e.arrayOf(e.string), e.number, e.string])
159
+ });
160
+ function Fo(o) {
161
+ return o != null && !(Array.isArray(o) && o.length === 0);
162
+ }
163
+ function Ye(o, t = !1) {
164
+ return o && (Fo(o.value) && o.value !== "" || t && Fo(o.defaultValue) && o.defaultValue !== "");
165
+ }
166
+ function It(o) {
167
+ return o.startAdornment;
168
+ }
169
+ function Rt(o) {
170
+ return Z("MuiInputBase", o);
171
+ }
172
+ const Re = G("MuiInputBase", ["root", "formControl", "focused", "disabled", "adornedStart", "adornedEnd", "error", "sizeSmall", "multiline", "colorSecondary", "fullWidth", "hiddenLabel", "readOnly", "input", "inputSizeSmall", "inputMultiline", "inputTypeSearch", "inputAdornedStart", "inputAdornedEnd", "inputHiddenLabel"]);
173
+ var $o;
174
+ const Ze = (o, t) => {
175
+ const {
176
+ ownerState: n
177
+ } = o;
178
+ return [t.root, n.formControl && t.formControl, n.startAdornment && t.adornedStart, n.endAdornment && t.adornedEnd, n.error && t.error, n.size === "small" && t.sizeSmall, n.multiline && t.multiline, n.color && t[`color${H(n.color)}`], n.fullWidth && t.fullWidth, n.hiddenLabel && t.hiddenLabel];
179
+ }, Je = (o, t) => {
180
+ const {
181
+ ownerState: n
182
+ } = o;
183
+ return [t.input, n.size === "small" && t.inputSizeSmall, n.multiline && t.inputMultiline, n.type === "search" && t.inputTypeSearch, n.startAdornment && t.inputAdornedStart, n.endAdornment && t.inputAdornedEnd, n.hiddenLabel && t.inputHiddenLabel];
184
+ }, kt = (o) => {
185
+ const {
186
+ classes: t,
187
+ color: n,
188
+ disabled: r,
189
+ error: i,
190
+ endAdornment: d,
191
+ focused: a,
192
+ formControl: c,
193
+ fullWidth: f,
194
+ hiddenLabel: u,
195
+ multiline: m,
196
+ readOnly: C,
197
+ size: S,
198
+ startAdornment: v,
199
+ type: x
200
+ } = o, I = {
201
+ root: ["root", `color${H(n)}`, r && "disabled", i && "error", f && "fullWidth", a && "focused", c && "formControl", S && S !== "medium" && `size${H(S)}`, m && "multiline", v && "adornedStart", d && "adornedEnd", u && "hiddenLabel", C && "readOnly"],
202
+ input: ["input", r && "disabled", x === "search" && "inputTypeSearch", m && "inputMultiline", S === "small" && "inputSizeSmall", u && "inputHiddenLabel", v && "inputAdornedStart", d && "inputAdornedEnd", C && "readOnly"]
203
+ };
204
+ return J(I, Rt, t);
205
+ }, Qe = M("div", {
206
+ name: "MuiInputBase",
207
+ slot: "Root",
208
+ overridesResolver: Ze
209
+ })(_(({
210
+ theme: o
211
+ }) => ({
212
+ ...o.typography.body1,
213
+ color: (o.vars || o).palette.text.primary,
214
+ lineHeight: "1.4375em",
215
+ // 23px
216
+ boxSizing: "border-box",
217
+ // Prevent padding issue with fullWidth.
218
+ position: "relative",
219
+ cursor: "text",
220
+ display: "inline-flex",
221
+ alignItems: "center",
222
+ [`&.${Re.disabled}`]: {
223
+ color: (o.vars || o).palette.text.disabled,
224
+ cursor: "default"
225
+ },
226
+ variants: [{
227
+ props: ({
228
+ ownerState: t
229
+ }) => t.multiline,
230
+ style: {
231
+ padding: "4px 0 5px"
232
+ }
233
+ }, {
234
+ props: ({
235
+ ownerState: t,
236
+ size: n
237
+ }) => t.multiline && n === "small",
238
+ style: {
239
+ paddingTop: 1
240
+ }
241
+ }, {
242
+ props: ({
243
+ ownerState: t
244
+ }) => t.fullWidth,
245
+ style: {
246
+ width: "100%"
247
+ }
248
+ }]
249
+ }))), eo = M("input", {
250
+ name: "MuiInputBase",
251
+ slot: "Input",
252
+ overridesResolver: Je
253
+ })(_(({
254
+ theme: o
255
+ }) => {
256
+ const t = o.palette.mode === "light", n = {
257
+ color: "currentColor",
258
+ ...o.vars ? {
259
+ opacity: o.vars.opacity.inputPlaceholder
260
+ } : {
261
+ opacity: t ? 0.42 : 0.5
262
+ },
263
+ transition: o.transitions.create("opacity", {
264
+ duration: o.transitions.duration.shorter
265
+ })
266
+ }, r = {
267
+ opacity: "0 !important"
268
+ }, i = o.vars ? {
269
+ opacity: o.vars.opacity.inputPlaceholder
270
+ } : {
271
+ opacity: t ? 0.42 : 0.5
272
+ };
273
+ return {
274
+ font: "inherit",
275
+ letterSpacing: "inherit",
276
+ color: "currentColor",
277
+ padding: "4px 0 5px",
278
+ border: 0,
279
+ boxSizing: "content-box",
280
+ background: "none",
281
+ height: "1.4375em",
282
+ // Reset 23pxthe native input line-height
283
+ margin: 0,
284
+ // Reset for Safari
285
+ WebkitTapHighlightColor: "transparent",
286
+ display: "block",
287
+ // Make the flex item shrink with Firefox
288
+ minWidth: 0,
289
+ width: "100%",
290
+ "&::-webkit-input-placeholder": n,
291
+ "&::-moz-placeholder": n,
292
+ // Firefox 19+
293
+ "&::-ms-input-placeholder": n,
294
+ // Edge
295
+ "&:focus": {
296
+ outline: 0
297
+ },
298
+ // Reset Firefox invalid required input style
299
+ "&:invalid": {
300
+ boxShadow: "none"
301
+ },
302
+ "&::-webkit-search-decoration": {
303
+ // Remove the padding when type=search.
304
+ WebkitAppearance: "none"
305
+ },
306
+ // Show and hide the placeholder logic
307
+ [`label[data-shrink=false] + .${Re.formControl} &`]: {
308
+ "&::-webkit-input-placeholder": r,
309
+ "&::-moz-placeholder": r,
310
+ // Firefox 19+
311
+ "&::-ms-input-placeholder": r,
312
+ // Edge
313
+ "&:focus::-webkit-input-placeholder": i,
314
+ "&:focus::-moz-placeholder": i,
315
+ // Firefox 19+
316
+ "&:focus::-ms-input-placeholder": i
317
+ // Edge
318
+ },
319
+ [`&.${Re.disabled}`]: {
320
+ opacity: 1,
321
+ // Reset iOS opacity
322
+ WebkitTextFillColor: (o.vars || o).palette.text.disabled
323
+ // Fix opacity Safari bug
324
+ },
325
+ variants: [{
326
+ props: ({
327
+ ownerState: d
328
+ }) => !d.disableInjectingGlobalStyles,
329
+ style: {
330
+ animationName: "mui-auto-fill-cancel",
331
+ animationDuration: "10ms",
332
+ "&:-webkit-autofill": {
333
+ animationDuration: "5000s",
334
+ animationName: "mui-auto-fill"
335
+ }
336
+ }
337
+ }, {
338
+ props: {
339
+ size: "small"
340
+ },
341
+ style: {
342
+ paddingTop: 1
343
+ }
344
+ }, {
345
+ props: ({
346
+ ownerState: d
347
+ }) => d.multiline,
348
+ style: {
349
+ height: "auto",
350
+ resize: "none",
351
+ padding: 0,
352
+ paddingTop: 0
353
+ }
354
+ }, {
355
+ props: {
356
+ type: "search"
357
+ },
358
+ style: {
359
+ MozAppearance: "textfield"
360
+ // Improve type search style.
361
+ }
362
+ }]
363
+ };
364
+ })), Lo = pt({
365
+ "@keyframes mui-auto-fill": {
366
+ from: {
367
+ display: "block"
368
+ }
369
+ },
370
+ "@keyframes mui-auto-fill-cancel": {
371
+ from: {
372
+ display: "block"
373
+ }
374
+ }
375
+ }), oo = /* @__PURE__ */ l.forwardRef(function(t, n) {
376
+ const r = ee({
377
+ props: t,
378
+ name: "MuiInputBase"
379
+ }), {
380
+ "aria-describedby": i,
381
+ autoComplete: d,
382
+ autoFocus: a,
383
+ className: c,
384
+ color: f,
385
+ components: u = {},
386
+ componentsProps: m = {},
387
+ defaultValue: C,
388
+ disabled: S,
389
+ disableInjectingGlobalStyles: v,
390
+ endAdornment: x,
391
+ error: I,
392
+ fullWidth: O = !1,
393
+ id: p,
394
+ inputComponent: h = "input",
395
+ inputProps: s = {},
396
+ inputRef: b,
397
+ margin: R,
398
+ maxRows: L,
399
+ minRows: N,
400
+ multiline: k = !1,
401
+ name: j,
402
+ onBlur: P,
403
+ onChange: B,
404
+ onClick: z,
405
+ onFocus: U,
406
+ onKeyDown: W,
407
+ onKeyUp: g,
408
+ placeholder: E,
409
+ readOnly: F,
410
+ renderSuffix: Q,
411
+ rows: $,
412
+ size: he,
413
+ slotProps: Me = {},
414
+ slots: Ve = {},
415
+ startAdornment: ae,
416
+ type: oe = "text",
417
+ value: re,
418
+ ...to
419
+ } = r, ie = s.value != null ? s.value : re, {
420
+ current: Ee
421
+ } = l.useRef(ie != null), se = l.useRef(), no = l.useCallback((D) => {
422
+ process.env.NODE_ENV !== "production" && D && D.nodeName !== "INPUT" && !D.focus && console.error(["MUI: You have provided a `inputComponent` to the input component", "that does not correctly handle the `ref` prop.", "Make sure the `ref` prop is called with a HTMLInputElement."].join(`
423
+ `));
424
+ }, []), ro = Te(se, b, s.ref, no), [le, ce] = l.useState(!1), A = We();
425
+ process.env.NODE_ENV !== "production" && l.useEffect(() => {
426
+ if (A)
427
+ return A.registerEffect();
428
+ }, [A]);
429
+ const X = Ue({
430
+ props: r,
431
+ muiFormControl: A,
432
+ states: ["color", "disabled", "error", "hiddenLabel", "size", "required", "filled"]
433
+ });
434
+ X.focused = A ? A.focused : le, l.useEffect(() => {
435
+ !A && S && le && (ce(!1), P && P());
436
+ }, [A, S, le, P]);
437
+ const de = A && A.onFilled, Ne = A && A.onEmpty, fe = l.useCallback((D) => {
438
+ Ye(D) ? de && de() : Ne && Ne();
439
+ }, [de, Ne]);
440
+ Be(() => {
441
+ Ee && fe({
442
+ value: ie
443
+ });
444
+ }, [ie, fe, Ee]);
445
+ const so = (D) => {
446
+ U && U(D), s.onFocus && s.onFocus(D), A && A.onFocus ? A.onFocus(D) : ce(!0);
447
+ }, ve = (D) => {
448
+ P && P(D), s.onBlur && s.onBlur(D), A && A.onBlur ? A.onBlur(D) : ce(!1);
449
+ }, ao = (D, ...we) => {
450
+ if (!Ee) {
451
+ const Oe = D.target || se.current;
452
+ if (Oe == null)
453
+ throw new Error(process.env.NODE_ENV !== "production" ? "MUI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info." : Uo(1));
454
+ fe({
455
+ value: Oe.value
456
+ });
457
+ }
458
+ s.onChange && s.onChange(D, ...we), B && B(D, ...we);
459
+ };
460
+ l.useEffect(() => {
461
+ fe(se.current);
462
+ }, []);
463
+ const ue = (D) => {
464
+ se.current && D.currentTarget === D.target && se.current.focus(), z && z(D);
465
+ };
466
+ let Ce = h, K = s;
467
+ k && Ce === "input" && ($ ? (process.env.NODE_ENV !== "production" && (N || L) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), K = {
468
+ type: void 0,
469
+ minRows: $,
470
+ maxRows: $,
471
+ ...K
472
+ }) : K = {
473
+ type: void 0,
474
+ maxRows: L,
475
+ minRows: N,
476
+ ...K
477
+ }, Ce = Ko);
478
+ const Se = (D) => {
479
+ fe(D.animationName === "mui-auto-fill-cancel" ? se.current : {
480
+ value: "x"
481
+ });
482
+ };
483
+ l.useEffect(() => {
484
+ A && A.setAdornedStart(!!ae);
485
+ }, [A, ae]);
486
+ const me = {
487
+ ...r,
488
+ color: X.color || "primary",
489
+ disabled: X.disabled,
490
+ endAdornment: x,
491
+ error: X.error,
492
+ focused: X.focused,
493
+ formControl: A,
494
+ fullWidth: O,
495
+ hiddenLabel: X.hiddenLabel,
496
+ multiline: k,
497
+ size: X.size,
498
+ startAdornment: ae,
499
+ type: oe
500
+ }, He = kt(me), Pe = Ve.root || u.Root || Qe, be = Me.root || m.root || {}, Fe = Ve.input || u.Input || eo;
501
+ return K = {
502
+ ...K,
503
+ ...Me.input ?? m.input
504
+ }, /* @__PURE__ */ q(l.Fragment, {
505
+ children: [!v && typeof Lo == "function" && // For Emotion/Styled-components, InputGlobalStyles will be a function
506
+ // For Pigment CSS, this has no effect because the InputGlobalStyles will be null.
507
+ ($o || ($o = /* @__PURE__ */ y(Lo, {}))), /* @__PURE__ */ q(Pe, {
508
+ ...be,
509
+ ref: n,
510
+ onClick: ue,
511
+ ...to,
512
+ ...!To(Pe) && {
513
+ ownerState: {
514
+ ...me,
515
+ ...be.ownerState
516
+ }
517
+ },
518
+ className: Y(He.root, be.className, c, F && "MuiInputBase-readOnly"),
519
+ children: [ae, /* @__PURE__ */ y(qo.Provider, {
520
+ value: null,
521
+ children: /* @__PURE__ */ y(Fe, {
522
+ "aria-invalid": X.error,
523
+ "aria-describedby": i,
524
+ autoComplete: d,
525
+ autoFocus: a,
526
+ defaultValue: C,
527
+ disabled: X.disabled,
528
+ id: p,
529
+ onAnimationStart: Se,
530
+ name: j,
531
+ placeholder: E,
532
+ readOnly: F,
533
+ required: X.required,
534
+ rows: $,
535
+ value: ie,
536
+ onKeyDown: W,
537
+ onKeyUp: g,
538
+ type: oe,
539
+ ...K,
540
+ ...!To(Fe) && {
541
+ as: Ce,
542
+ ownerState: {
543
+ ...me,
544
+ ...K.ownerState
545
+ }
546
+ },
547
+ ref: ro,
548
+ className: Y(He.input, K.className, F && "MuiInputBase-readOnly"),
549
+ onBlur: ve,
550
+ onChange: ao,
551
+ onFocus: so
552
+ })
553
+ }), x, Q ? Q({
554
+ ...X,
555
+ startAdornment: ae
556
+ }) : null]
557
+ })]
558
+ });
559
+ });
560
+ process.env.NODE_ENV !== "production" && (oo.propTypes = {
561
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
562
+ // │ These PropTypes are generated from the TypeScript type definitions. │
563
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
564
+ // └─────────────────────────────────────────────────────────────────────┘
565
+ /**
566
+ * @ignore
567
+ */
568
+ "aria-describedby": e.string,
569
+ /**
570
+ * This prop helps users to fill forms faster, especially on mobile devices.
571
+ * The name can be confusing, as it's more like an autofill.
572
+ * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).
573
+ */
574
+ autoComplete: e.string,
575
+ /**
576
+ * If `true`, the `input` element is focused during the first mount.
577
+ */
578
+ autoFocus: e.bool,
579
+ /**
580
+ * Override or extend the styles applied to the component.
581
+ */
582
+ classes: e.object,
583
+ /**
584
+ * @ignore
585
+ */
586
+ className: e.string,
587
+ /**
588
+ * The color of the component.
589
+ * It supports both default and custom theme colors, which can be added as shown in the
590
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
591
+ * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.
592
+ */
593
+ color: e.oneOfType([e.oneOf(["primary", "secondary", "error", "info", "success", "warning"]), e.string]),
594
+ /**
595
+ * The components used for each slot inside.
596
+ *
597
+ * @deprecated use the `slots` 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.
598
+ *
599
+ * @default {}
600
+ */
601
+ components: e.shape({
602
+ Input: e.elementType,
603
+ Root: e.elementType
604
+ }),
605
+ /**
606
+ * The extra props for the slot components.
607
+ * You can override the existing props or add new ones.
608
+ *
609
+ * @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.
610
+ *
611
+ * @default {}
612
+ */
613
+ componentsProps: e.shape({
614
+ input: e.object,
615
+ root: e.object
616
+ }),
617
+ /**
618
+ * The default value. Use when the component is not controlled.
619
+ */
620
+ defaultValue: e.any,
621
+ /**
622
+ * If `true`, the component is disabled.
623
+ * The prop defaults to the value (`false`) inherited from the parent FormControl component.
624
+ */
625
+ disabled: e.bool,
626
+ /**
627
+ * If `true`, GlobalStyles for the auto-fill keyframes will not be injected/removed on mount/unmount. Make sure to inject them at the top of your application.
628
+ * This option is intended to help with boosting the initial rendering performance if you are loading a big amount of Input components at once.
629
+ * @default false
630
+ */
631
+ disableInjectingGlobalStyles: e.bool,
632
+ /**
633
+ * End `InputAdornment` for this component.
634
+ */
635
+ endAdornment: e.node,
636
+ /**
637
+ * If `true`, the `input` will indicate an error.
638
+ * The prop defaults to the value (`false`) inherited from the parent FormControl component.
639
+ */
640
+ error: e.bool,
641
+ /**
642
+ * If `true`, the `input` will take up the full width of its container.
643
+ * @default false
644
+ */
645
+ fullWidth: e.bool,
646
+ /**
647
+ * The id of the `input` element.
648
+ */
649
+ id: e.string,
650
+ /**
651
+ * The component used for the `input` element.
652
+ * Either a string to use a HTML element or a component.
653
+ * @default 'input'
654
+ */
655
+ inputComponent: ct,
656
+ /**
657
+ * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
658
+ * @default {}
659
+ */
660
+ inputProps: e.object,
661
+ /**
662
+ * Pass a ref to the `input` element.
663
+ */
664
+ inputRef: ke,
665
+ /**
666
+ * If `dense`, will adjust vertical spacing. This is normally obtained via context from
667
+ * FormControl.
668
+ * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.
669
+ */
670
+ margin: e.oneOf(["dense", "none"]),
671
+ /**
672
+ * Maximum number of rows to display when multiline option is set to true.
673
+ */
674
+ maxRows: e.oneOfType([e.number, e.string]),
675
+ /**
676
+ * Minimum number of rows to display when multiline option is set to true.
677
+ */
678
+ minRows: e.oneOfType([e.number, e.string]),
679
+ /**
680
+ * If `true`, a [TextareaAutosize](https://mui.com/material-ui/react-textarea-autosize/) element is rendered.
681
+ * @default false
682
+ */
683
+ multiline: e.bool,
684
+ /**
685
+ * Name attribute of the `input` element.
686
+ */
687
+ name: e.string,
688
+ /**
689
+ * Callback fired when the `input` is blurred.
690
+ *
691
+ * Notice that the first argument (event) might be undefined.
692
+ */
693
+ onBlur: e.func,
694
+ /**
695
+ * Callback fired when the value is changed.
696
+ *
697
+ * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.
698
+ * You can pull out the new value by accessing `event.target.value` (string).
699
+ */
700
+ onChange: e.func,
701
+ /**
702
+ * @ignore
703
+ */
704
+ onClick: e.func,
705
+ /**
706
+ * @ignore
707
+ */
708
+ onFocus: e.func,
709
+ /**
710
+ * Callback fired when the `input` doesn't satisfy its constraints.
711
+ */
712
+ onInvalid: e.func,
713
+ /**
714
+ * @ignore
715
+ */
716
+ onKeyDown: e.func,
717
+ /**
718
+ * @ignore
719
+ */
720
+ onKeyUp: e.func,
721
+ /**
722
+ * The short hint displayed in the `input` before the user enters a value.
723
+ */
724
+ placeholder: e.string,
725
+ /**
726
+ * It prevents the user from changing the value of the field
727
+ * (not from interacting with the field).
728
+ */
729
+ readOnly: e.bool,
730
+ /**
731
+ * @ignore
732
+ */
733
+ renderSuffix: e.func,
734
+ /**
735
+ * If `true`, the `input` element is required.
736
+ * The prop defaults to the value (`false`) inherited from the parent FormControl component.
737
+ */
738
+ required: e.bool,
739
+ /**
740
+ * Number of rows to display when multiline option is set to true.
741
+ */
742
+ rows: e.oneOfType([e.number, e.string]),
743
+ /**
744
+ * The size of the component.
745
+ */
746
+ size: e.oneOfType([e.oneOf(["medium", "small"]), e.string]),
747
+ /**
748
+ * The extra props for the slot components.
749
+ * You can override the existing props or add new ones.
750
+ *
751
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
752
+ *
753
+ * @default {}
754
+ */
755
+ slotProps: e.shape({
756
+ input: e.object,
757
+ root: e.object
758
+ }),
759
+ /**
760
+ * The components used for each slot inside.
761
+ *
762
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
763
+ *
764
+ * @default {}
765
+ */
766
+ slots: e.shape({
767
+ input: e.elementType,
768
+ root: e.elementType
769
+ }),
770
+ /**
771
+ * Start `InputAdornment` for this component.
772
+ */
773
+ startAdornment: e.node,
774
+ /**
775
+ * The system prop that allows defining system overrides as well as additional CSS styles.
776
+ */
777
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
778
+ /**
779
+ * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).
780
+ * @default 'text'
781
+ */
782
+ type: e.string,
783
+ /**
784
+ * The value of the `input` element, required for a controlled component.
785
+ */
786
+ value: e.any
787
+ });
788
+ function Tt(o) {
789
+ return Z("MuiInput", o);
790
+ }
791
+ const $e = {
792
+ ...Re,
793
+ ...G("MuiInput", ["root", "underline", "input"])
794
+ };
795
+ function Mt(o) {
796
+ return Z("MuiOutlinedInput", o);
797
+ }
798
+ const te = {
799
+ ...Re,
800
+ ...G("MuiOutlinedInput", ["root", "notchedOutline", "input"])
801
+ };
802
+ function Et(o) {
803
+ return Z("MuiFilledInput", o);
804
+ }
805
+ const ge = {
806
+ ...Re,
807
+ ...G("MuiFilledInput", ["root", "underline", "input", "adornedStart", "adornedEnd", "sizeSmall", "multiline", "hiddenLabel"])
808
+ }, Nt = wt(/* @__PURE__ */ y("path", {
809
+ d: "M7 10l5 5 5-5z"
810
+ }), "ArrowDropDown");
811
+ function Pt(o) {
812
+ return Z("MuiCircularProgress", o);
813
+ }
814
+ G("MuiCircularProgress", ["root", "determinate", "indeterminate", "colorPrimary", "colorSecondary", "svg", "circle", "circleDeterminate", "circleIndeterminate", "circleDisableShrink"]);
815
+ const pe = 44, po = Vo`
816
+ 0% {
817
+ transform: rotate(0deg);
818
+ }
819
+
820
+ 100% {
821
+ transform: rotate(360deg);
822
+ }
823
+ `, fo = Vo`
824
+ 0% {
825
+ stroke-dasharray: 1px, 200px;
826
+ stroke-dashoffset: 0;
827
+ }
828
+
829
+ 50% {
830
+ stroke-dasharray: 100px, 200px;
831
+ stroke-dashoffset: -15px;
832
+ }
833
+
834
+ 100% {
835
+ stroke-dasharray: 100px, 200px;
836
+ stroke-dashoffset: -125px;
837
+ }
838
+ `, Ft = typeof po != "string" ? Ho`
839
+ animation: ${po} 1.4s linear infinite;
840
+ ` : null, $t = typeof fo != "string" ? Ho`
841
+ animation: ${fo} 1.4s ease-in-out infinite;
842
+ ` : null, Lt = (o) => {
843
+ const {
844
+ classes: t,
845
+ variant: n,
846
+ color: r,
847
+ disableShrink: i
848
+ } = o, d = {
849
+ root: ["root", n, `color${H(r)}`],
850
+ svg: ["svg"],
851
+ circle: ["circle", `circle${H(n)}`, i && "circleDisableShrink"]
852
+ };
853
+ return J(d, Pt, t);
854
+ }, Dt = M("span", {
855
+ name: "MuiCircularProgress",
856
+ slot: "Root",
857
+ overridesResolver: (o, t) => {
858
+ const {
859
+ ownerState: n
860
+ } = o;
861
+ return [t.root, t[n.variant], t[`color${H(n.color)}`]];
862
+ }
863
+ })(_(({
864
+ theme: o
865
+ }) => ({
866
+ display: "inline-block",
867
+ variants: [{
868
+ props: {
869
+ variant: "determinate"
870
+ },
871
+ style: {
872
+ transition: o.transitions.create("transform")
873
+ }
874
+ }, {
875
+ props: {
876
+ variant: "indeterminate"
877
+ },
878
+ style: Ft || {
879
+ animation: `${po} 1.4s linear infinite`
880
+ }
881
+ }, ...Object.entries(o.palette).filter(ze()).map(([t]) => ({
882
+ props: {
883
+ color: t
884
+ },
885
+ style: {
886
+ color: (o.vars || o).palette[t].main
887
+ }
888
+ }))]
889
+ }))), At = M("svg", {
890
+ name: "MuiCircularProgress",
891
+ slot: "Svg",
892
+ overridesResolver: (o, t) => t.svg
893
+ })({
894
+ display: "block"
895
+ // Keeps the progress centered
896
+ }), jt = M("circle", {
897
+ name: "MuiCircularProgress",
898
+ slot: "Circle",
899
+ overridesResolver: (o, t) => {
900
+ const {
901
+ ownerState: n
902
+ } = o;
903
+ return [t.circle, t[`circle${H(n.variant)}`], n.disableShrink && t.circleDisableShrink];
904
+ }
905
+ })(_(({
906
+ theme: o
907
+ }) => ({
908
+ stroke: "currentColor",
909
+ variants: [{
910
+ props: {
911
+ variant: "determinate"
912
+ },
913
+ style: {
914
+ transition: o.transitions.create("stroke-dashoffset")
915
+ }
916
+ }, {
917
+ props: {
918
+ variant: "indeterminate"
919
+ },
920
+ style: {
921
+ // Some default value that looks fine waiting for the animation to kicks in.
922
+ strokeDasharray: "80px, 200px",
923
+ strokeDashoffset: 0
924
+ // Add the unit to fix a Edge 16 and below bug.
925
+ }
926
+ }, {
927
+ props: ({
928
+ ownerState: t
929
+ }) => t.variant === "indeterminate" && !t.disableShrink,
930
+ style: $t || {
931
+ // At runtime for Pigment CSS, `bufferAnimation` will be null and the generated keyframe will be used.
932
+ animation: `${fo} 1.4s ease-in-out infinite`
933
+ }
934
+ }]
935
+ }))), Xe = /* @__PURE__ */ l.forwardRef(function(t, n) {
936
+ const r = ee({
937
+ props: t,
938
+ name: "MuiCircularProgress"
939
+ }), {
940
+ className: i,
941
+ color: d = "primary",
942
+ disableShrink: a = !1,
943
+ size: c = 40,
944
+ style: f,
945
+ thickness: u = 3.6,
946
+ value: m = 0,
947
+ variant: C = "indeterminate",
948
+ ...S
949
+ } = r, v = {
950
+ ...r,
951
+ color: d,
952
+ disableShrink: a,
953
+ size: c,
954
+ thickness: u,
955
+ value: m,
956
+ variant: C
957
+ }, x = Lt(v), I = {}, O = {}, p = {};
958
+ if (C === "determinate") {
959
+ const h = 2 * Math.PI * ((pe - u) / 2);
960
+ I.strokeDasharray = h.toFixed(3), p["aria-valuenow"] = Math.round(m), I.strokeDashoffset = `${((100 - m) / 100 * h).toFixed(3)}px`, O.transform = "rotate(-90deg)";
961
+ }
962
+ return /* @__PURE__ */ y(Dt, {
963
+ className: Y(x.root, i),
964
+ style: {
965
+ width: c,
966
+ height: c,
967
+ ...O,
968
+ ...f
969
+ },
970
+ ownerState: v,
971
+ ref: n,
972
+ role: "progressbar",
973
+ ...p,
974
+ ...S,
975
+ children: /* @__PURE__ */ y(At, {
976
+ className: x.svg,
977
+ ownerState: v,
978
+ viewBox: `${pe / 2} ${pe / 2} ${pe} ${pe}`,
979
+ children: /* @__PURE__ */ y(jt, {
980
+ className: x.circle,
981
+ style: I,
982
+ ownerState: v,
983
+ cx: pe,
984
+ cy: pe,
985
+ r: (pe - u) / 2,
986
+ fill: "none",
987
+ strokeWidth: u
988
+ })
989
+ })
990
+ });
991
+ });
992
+ process.env.NODE_ENV !== "production" && (Xe.propTypes = {
993
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
994
+ // │ These PropTypes are generated from the TypeScript type definitions. │
995
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
996
+ // └─────────────────────────────────────────────────────────────────────┘
997
+ /**
998
+ * Override or extend the styles applied to the component.
999
+ */
1000
+ classes: e.object,
1001
+ /**
1002
+ * @ignore
1003
+ */
1004
+ className: e.string,
1005
+ /**
1006
+ * The color of the component.
1007
+ * It supports both default and custom theme colors, which can be added as shown in the
1008
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
1009
+ * @default 'primary'
1010
+ */
1011
+ color: e.oneOfType([e.oneOf(["inherit", "primary", "secondary", "error", "info", "success", "warning"]), e.string]),
1012
+ /**
1013
+ * If `true`, the shrink animation is disabled.
1014
+ * This only works if variant is `indeterminate`.
1015
+ * @default false
1016
+ */
1017
+ disableShrink: dt(e.bool, (o) => o.disableShrink && o.variant && o.variant !== "indeterminate" ? new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect.") : null),
1018
+ /**
1019
+ * The size of the component.
1020
+ * If using a number, the pixel unit is assumed.
1021
+ * If using a string, you need to provide the CSS unit, for example '3rem'.
1022
+ * @default 40
1023
+ */
1024
+ size: e.oneOfType([e.number, e.string]),
1025
+ /**
1026
+ * @ignore
1027
+ */
1028
+ style: e.object,
1029
+ /**
1030
+ * The system prop that allows defining system overrides as well as additional CSS styles.
1031
+ */
1032
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
1033
+ /**
1034
+ * The thickness of the circle.
1035
+ * @default 3.6
1036
+ */
1037
+ thickness: e.number,
1038
+ /**
1039
+ * The value of the progress indicator for the determinate variant.
1040
+ * Value between 0 and 100.
1041
+ * @default 0
1042
+ */
1043
+ value: e.number,
1044
+ /**
1045
+ * The variant to use.
1046
+ * Use indeterminate when there is no progress value.
1047
+ * @default 'indeterminate'
1048
+ */
1049
+ variant: e.oneOf(["determinate", "indeterminate"])
1050
+ });
1051
+ const Bt = (o) => {
1052
+ const {
1053
+ classes: t,
1054
+ disableUnderline: n,
1055
+ startAdornment: r,
1056
+ endAdornment: i,
1057
+ size: d,
1058
+ hiddenLabel: a,
1059
+ multiline: c
1060
+ } = o, f = {
1061
+ root: ["root", !n && "underline", r && "adornedStart", i && "adornedEnd", d === "small" && `size${H(d)}`, a && "hiddenLabel", c && "multiline"],
1062
+ input: ["input"]
1063
+ }, u = J(f, Et, t);
1064
+ return {
1065
+ ...t,
1066
+ // forward classes to the InputBase
1067
+ ...u
1068
+ };
1069
+ }, zt = M(Qe, {
1070
+ shouldForwardProp: (o) => ne(o) || o === "classes",
1071
+ name: "MuiFilledInput",
1072
+ slot: "Root",
1073
+ overridesResolver: (o, t) => {
1074
+ const {
1075
+ ownerState: n
1076
+ } = o;
1077
+ return [...Ze(o, t), !n.disableUnderline && t.underline];
1078
+ }
1079
+ })(_(({
1080
+ theme: o
1081
+ }) => {
1082
+ const t = o.palette.mode === "light", n = t ? "rgba(0, 0, 0, 0.42)" : "rgba(255, 255, 255, 0.7)", r = t ? "rgba(0, 0, 0, 0.06)" : "rgba(255, 255, 255, 0.09)", i = t ? "rgba(0, 0, 0, 0.09)" : "rgba(255, 255, 255, 0.13)", d = t ? "rgba(0, 0, 0, 0.12)" : "rgba(255, 255, 255, 0.12)";
1083
+ return {
1084
+ position: "relative",
1085
+ backgroundColor: o.vars ? o.vars.palette.FilledInput.bg : r,
1086
+ borderTopLeftRadius: (o.vars || o).shape.borderRadius,
1087
+ borderTopRightRadius: (o.vars || o).shape.borderRadius,
1088
+ transition: o.transitions.create("background-color", {
1089
+ duration: o.transitions.duration.shorter,
1090
+ easing: o.transitions.easing.easeOut
1091
+ }),
1092
+ "&:hover": {
1093
+ backgroundColor: o.vars ? o.vars.palette.FilledInput.hoverBg : i,
1094
+ // Reset on touch devices, it doesn't add specificity
1095
+ "@media (hover: none)": {
1096
+ backgroundColor: o.vars ? o.vars.palette.FilledInput.bg : r
1097
+ }
1098
+ },
1099
+ [`&.${ge.focused}`]: {
1100
+ backgroundColor: o.vars ? o.vars.palette.FilledInput.bg : r
1101
+ },
1102
+ [`&.${ge.disabled}`]: {
1103
+ backgroundColor: o.vars ? o.vars.palette.FilledInput.disabledBg : d
1104
+ },
1105
+ variants: [{
1106
+ props: ({
1107
+ ownerState: a
1108
+ }) => !a.disableUnderline,
1109
+ style: {
1110
+ "&::after": {
1111
+ left: 0,
1112
+ bottom: 0,
1113
+ content: '""',
1114
+ position: "absolute",
1115
+ right: 0,
1116
+ transform: "scaleX(0)",
1117
+ transition: o.transitions.create("transform", {
1118
+ duration: o.transitions.duration.shorter,
1119
+ easing: o.transitions.easing.easeOut
1120
+ }),
1121
+ pointerEvents: "none"
1122
+ // Transparent to the hover style.
1123
+ },
1124
+ [`&.${ge.focused}:after`]: {
1125
+ // translateX(0) is a workaround for Safari transform scale bug
1126
+ // See https://github.com/mui/material-ui/issues/31766
1127
+ transform: "scaleX(1) translateX(0)"
1128
+ },
1129
+ [`&.${ge.error}`]: {
1130
+ "&::before, &::after": {
1131
+ borderBottomColor: (o.vars || o).palette.error.main
1132
+ }
1133
+ },
1134
+ "&::before": {
1135
+ borderBottom: `1px solid ${o.vars ? `rgba(${o.vars.palette.common.onBackgroundChannel} / ${o.vars.opacity.inputUnderline})` : n}`,
1136
+ left: 0,
1137
+ bottom: 0,
1138
+ content: '"\\00a0"',
1139
+ position: "absolute",
1140
+ right: 0,
1141
+ transition: o.transitions.create("border-bottom-color", {
1142
+ duration: o.transitions.duration.shorter
1143
+ }),
1144
+ pointerEvents: "none"
1145
+ // Transparent to the hover style.
1146
+ },
1147
+ [`&:hover:not(.${ge.disabled}, .${ge.error}):before`]: {
1148
+ borderBottom: `1px solid ${(o.vars || o).palette.text.primary}`
1149
+ },
1150
+ [`&.${ge.disabled}:before`]: {
1151
+ borderBottomStyle: "dotted"
1152
+ }
1153
+ }
1154
+ }, ...Object.entries(o.palette).filter(ze()).map(([a]) => {
1155
+ var c;
1156
+ return {
1157
+ props: {
1158
+ disableUnderline: !1,
1159
+ color: a
1160
+ },
1161
+ style: {
1162
+ "&::after": {
1163
+ borderBottom: `2px solid ${(c = (o.vars || o).palette[a]) == null ? void 0 : c.main}`
1164
+ }
1165
+ }
1166
+ };
1167
+ }), {
1168
+ props: ({
1169
+ ownerState: a
1170
+ }) => a.startAdornment,
1171
+ style: {
1172
+ paddingLeft: 12
1173
+ }
1174
+ }, {
1175
+ props: ({
1176
+ ownerState: a
1177
+ }) => a.endAdornment,
1178
+ style: {
1179
+ paddingRight: 12
1180
+ }
1181
+ }, {
1182
+ props: ({
1183
+ ownerState: a
1184
+ }) => a.multiline,
1185
+ style: {
1186
+ padding: "25px 12px 8px"
1187
+ }
1188
+ }, {
1189
+ props: ({
1190
+ ownerState: a,
1191
+ size: c
1192
+ }) => a.multiline && c === "small",
1193
+ style: {
1194
+ paddingTop: 21,
1195
+ paddingBottom: 4
1196
+ }
1197
+ }, {
1198
+ props: ({
1199
+ ownerState: a
1200
+ }) => a.multiline && a.hiddenLabel,
1201
+ style: {
1202
+ paddingTop: 16,
1203
+ paddingBottom: 17
1204
+ }
1205
+ }, {
1206
+ props: ({
1207
+ ownerState: a
1208
+ }) => a.multiline && a.hiddenLabel && a.size === "small",
1209
+ style: {
1210
+ paddingTop: 8,
1211
+ paddingBottom: 9
1212
+ }
1213
+ }]
1214
+ };
1215
+ })), Wt = M(eo, {
1216
+ name: "MuiFilledInput",
1217
+ slot: "Input",
1218
+ overridesResolver: Je
1219
+ })(_(({
1220
+ theme: o
1221
+ }) => ({
1222
+ paddingTop: 25,
1223
+ paddingRight: 12,
1224
+ paddingBottom: 8,
1225
+ paddingLeft: 12,
1226
+ ...!o.vars && {
1227
+ "&:-webkit-autofill": {
1228
+ WebkitBoxShadow: o.palette.mode === "light" ? null : "0 0 0 100px #266798 inset",
1229
+ WebkitTextFillColor: o.palette.mode === "light" ? null : "#fff",
1230
+ caretColor: o.palette.mode === "light" ? null : "#fff",
1231
+ borderTopLeftRadius: "inherit",
1232
+ borderTopRightRadius: "inherit"
1233
+ }
1234
+ },
1235
+ ...o.vars && {
1236
+ "&:-webkit-autofill": {
1237
+ borderTopLeftRadius: "inherit",
1238
+ borderTopRightRadius: "inherit"
1239
+ },
1240
+ [o.getColorSchemeSelector("dark")]: {
1241
+ "&:-webkit-autofill": {
1242
+ WebkitBoxShadow: "0 0 0 100px #266798 inset",
1243
+ WebkitTextFillColor: "#fff",
1244
+ caretColor: "#fff"
1245
+ }
1246
+ }
1247
+ },
1248
+ variants: [{
1249
+ props: {
1250
+ size: "small"
1251
+ },
1252
+ style: {
1253
+ paddingTop: 21,
1254
+ paddingBottom: 4
1255
+ }
1256
+ }, {
1257
+ props: ({
1258
+ ownerState: t
1259
+ }) => t.hiddenLabel,
1260
+ style: {
1261
+ paddingTop: 16,
1262
+ paddingBottom: 17
1263
+ }
1264
+ }, {
1265
+ props: ({
1266
+ ownerState: t
1267
+ }) => t.startAdornment,
1268
+ style: {
1269
+ paddingLeft: 0
1270
+ }
1271
+ }, {
1272
+ props: ({
1273
+ ownerState: t
1274
+ }) => t.endAdornment,
1275
+ style: {
1276
+ paddingRight: 0
1277
+ }
1278
+ }, {
1279
+ props: ({
1280
+ ownerState: t
1281
+ }) => t.hiddenLabel && t.size === "small",
1282
+ style: {
1283
+ paddingTop: 8,
1284
+ paddingBottom: 9
1285
+ }
1286
+ }, {
1287
+ props: ({
1288
+ ownerState: t
1289
+ }) => t.multiline,
1290
+ style: {
1291
+ paddingTop: 0,
1292
+ paddingBottom: 0,
1293
+ paddingLeft: 0,
1294
+ paddingRight: 0
1295
+ }
1296
+ }]
1297
+ }))), yo = /* @__PURE__ */ l.forwardRef(function(t, n) {
1298
+ const r = ee({
1299
+ props: t,
1300
+ name: "MuiFilledInput"
1301
+ }), {
1302
+ disableUnderline: i = !1,
1303
+ components: d = {},
1304
+ componentsProps: a,
1305
+ fullWidth: c = !1,
1306
+ hiddenLabel: f,
1307
+ // declare here to prevent spreading to DOM
1308
+ inputComponent: u = "input",
1309
+ multiline: m = !1,
1310
+ slotProps: C,
1311
+ slots: S = {},
1312
+ type: v = "text",
1313
+ ...x
1314
+ } = r, I = {
1315
+ ...r,
1316
+ disableUnderline: i,
1317
+ fullWidth: c,
1318
+ inputComponent: u,
1319
+ multiline: m,
1320
+ type: v
1321
+ }, O = Bt(r), p = {
1322
+ root: {
1323
+ ownerState: I
1324
+ },
1325
+ input: {
1326
+ ownerState: I
1327
+ }
1328
+ }, h = C ?? a ? mo(p, C ?? a) : p, s = S.root ?? d.Root ?? zt, b = S.input ?? d.Input ?? Wt;
1329
+ return /* @__PURE__ */ y(oo, {
1330
+ slots: {
1331
+ root: s,
1332
+ input: b
1333
+ },
1334
+ slotProps: h,
1335
+ fullWidth: c,
1336
+ inputComponent: u,
1337
+ multiline: m,
1338
+ ref: n,
1339
+ type: v,
1340
+ ...x,
1341
+ classes: O
1342
+ });
1343
+ });
1344
+ process.env.NODE_ENV !== "production" && (yo.propTypes = {
1345
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
1346
+ // │ These PropTypes are generated from the TypeScript type definitions. │
1347
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1348
+ // └─────────────────────────────────────────────────────────────────────┘
1349
+ /**
1350
+ * This prop helps users to fill forms faster, especially on mobile devices.
1351
+ * The name can be confusing, as it's more like an autofill.
1352
+ * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).
1353
+ */
1354
+ autoComplete: e.string,
1355
+ /**
1356
+ * If `true`, the `input` element is focused during the first mount.
1357
+ */
1358
+ autoFocus: e.bool,
1359
+ /**
1360
+ * Override or extend the styles applied to the component.
1361
+ */
1362
+ classes: e.object,
1363
+ /**
1364
+ * The color of the component.
1365
+ * It supports both default and custom theme colors, which can be added as shown in the
1366
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
1367
+ * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.
1368
+ */
1369
+ color: e.oneOfType([e.oneOf(["primary", "secondary"]), e.string]),
1370
+ /**
1371
+ * The components used for each slot inside.
1372
+ *
1373
+ * @deprecated use the `slots` 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.
1374
+ *
1375
+ * @default {}
1376
+ */
1377
+ components: e.shape({
1378
+ Input: e.elementType,
1379
+ Root: e.elementType
1380
+ }),
1381
+ /**
1382
+ * The extra props for the slot components.
1383
+ * You can override the existing props or add new ones.
1384
+ *
1385
+ * @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.
1386
+ *
1387
+ * @default {}
1388
+ */
1389
+ componentsProps: e.shape({
1390
+ input: e.object,
1391
+ root: e.object
1392
+ }),
1393
+ /**
1394
+ * The default value. Use when the component is not controlled.
1395
+ */
1396
+ defaultValue: e.any,
1397
+ /**
1398
+ * If `true`, the component is disabled.
1399
+ * The prop defaults to the value (`false`) inherited from the parent FormControl component.
1400
+ */
1401
+ disabled: e.bool,
1402
+ /**
1403
+ * If `true`, the input will not have an underline.
1404
+ * @default false
1405
+ */
1406
+ disableUnderline: e.bool,
1407
+ /**
1408
+ * End `InputAdornment` for this component.
1409
+ */
1410
+ endAdornment: e.node,
1411
+ /**
1412
+ * If `true`, the `input` will indicate an error.
1413
+ * The prop defaults to the value (`false`) inherited from the parent FormControl component.
1414
+ */
1415
+ error: e.bool,
1416
+ /**
1417
+ * If `true`, the `input` will take up the full width of its container.
1418
+ * @default false
1419
+ */
1420
+ fullWidth: e.bool,
1421
+ /**
1422
+ * If `true`, the label is hidden.
1423
+ * This is used to increase density for a `FilledInput`.
1424
+ * Be sure to add `aria-label` to the `input` element.
1425
+ * @default false
1426
+ */
1427
+ hiddenLabel: e.bool,
1428
+ /**
1429
+ * The id of the `input` element.
1430
+ */
1431
+ id: e.string,
1432
+ /**
1433
+ * The component used for the `input` element.
1434
+ * Either a string to use a HTML element or a component.
1435
+ * @default 'input'
1436
+ */
1437
+ inputComponent: e.elementType,
1438
+ /**
1439
+ * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
1440
+ * @default {}
1441
+ */
1442
+ inputProps: e.object,
1443
+ /**
1444
+ * Pass a ref to the `input` element.
1445
+ */
1446
+ inputRef: ke,
1447
+ /**
1448
+ * If `dense`, will adjust vertical spacing. This is normally obtained via context from
1449
+ * FormControl.
1450
+ * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.
1451
+ */
1452
+ margin: e.oneOf(["dense", "none"]),
1453
+ /**
1454
+ * Maximum number of rows to display when multiline option is set to true.
1455
+ */
1456
+ maxRows: e.oneOfType([e.number, e.string]),
1457
+ /**
1458
+ * Minimum number of rows to display when multiline option is set to true.
1459
+ */
1460
+ minRows: e.oneOfType([e.number, e.string]),
1461
+ /**
1462
+ * If `true`, a [TextareaAutosize](https://mui.com/material-ui/react-textarea-autosize/) element is rendered.
1463
+ * @default false
1464
+ */
1465
+ multiline: e.bool,
1466
+ /**
1467
+ * Name attribute of the `input` element.
1468
+ */
1469
+ name: e.string,
1470
+ /**
1471
+ * Callback fired when the value is changed.
1472
+ *
1473
+ * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.
1474
+ * You can pull out the new value by accessing `event.target.value` (string).
1475
+ */
1476
+ onChange: e.func,
1477
+ /**
1478
+ * The short hint displayed in the `input` before the user enters a value.
1479
+ */
1480
+ placeholder: e.string,
1481
+ /**
1482
+ * It prevents the user from changing the value of the field
1483
+ * (not from interacting with the field).
1484
+ */
1485
+ readOnly: e.bool,
1486
+ /**
1487
+ * If `true`, the `input` element is required.
1488
+ * The prop defaults to the value (`false`) inherited from the parent FormControl component.
1489
+ */
1490
+ required: e.bool,
1491
+ /**
1492
+ * Number of rows to display when multiline option is set to true.
1493
+ */
1494
+ rows: e.oneOfType([e.number, e.string]),
1495
+ /**
1496
+ * The extra props for the slot components.
1497
+ * You can override the existing props or add new ones.
1498
+ *
1499
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
1500
+ *
1501
+ * @default {}
1502
+ */
1503
+ slotProps: e.shape({
1504
+ input: e.object,
1505
+ root: e.object
1506
+ }),
1507
+ /**
1508
+ * The components used for each slot inside.
1509
+ *
1510
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
1511
+ *
1512
+ * @default {}
1513
+ */
1514
+ slots: e.shape({
1515
+ input: e.elementType,
1516
+ root: e.elementType
1517
+ }),
1518
+ /**
1519
+ * Start `InputAdornment` for this component.
1520
+ */
1521
+ startAdornment: e.node,
1522
+ /**
1523
+ * The system prop that allows defining system overrides as well as additional CSS styles.
1524
+ */
1525
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
1526
+ /**
1527
+ * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).
1528
+ * @default 'text'
1529
+ */
1530
+ type: e.string,
1531
+ /**
1532
+ * The value of the `input` element, required for a controlled component.
1533
+ */
1534
+ value: e.any
1535
+ });
1536
+ yo.muiName = "Input";
1537
+ function Ut(o) {
1538
+ return Z("MuiFormControl", o);
1539
+ }
1540
+ G("MuiFormControl", ["root", "marginNone", "marginNormal", "marginDense", "fullWidth", "disabled"]);
1541
+ const Vt = (o) => {
1542
+ const {
1543
+ classes: t,
1544
+ margin: n,
1545
+ fullWidth: r
1546
+ } = o, i = {
1547
+ root: ["root", n !== "none" && `margin${H(n)}`, r && "fullWidth"]
1548
+ };
1549
+ return J(i, Ut, t);
1550
+ }, Ht = M("div", {
1551
+ name: "MuiFormControl",
1552
+ slot: "Root",
1553
+ overridesResolver: (o, t) => {
1554
+ const {
1555
+ ownerState: n
1556
+ } = o;
1557
+ return [t.root, t[`margin${H(n.margin)}`], n.fullWidth && t.fullWidth];
1558
+ }
1559
+ })({
1560
+ display: "inline-flex",
1561
+ flexDirection: "column",
1562
+ position: "relative",
1563
+ // Reset fieldset default style.
1564
+ minWidth: 0,
1565
+ padding: 0,
1566
+ margin: 0,
1567
+ border: 0,
1568
+ verticalAlign: "top",
1569
+ // Fix alignment issue on Safari.
1570
+ variants: [{
1571
+ props: {
1572
+ margin: "normal"
1573
+ },
1574
+ style: {
1575
+ marginTop: 16,
1576
+ marginBottom: 8
1577
+ }
1578
+ }, {
1579
+ props: {
1580
+ margin: "dense"
1581
+ },
1582
+ style: {
1583
+ marginTop: 8,
1584
+ marginBottom: 4
1585
+ }
1586
+ }, {
1587
+ props: {
1588
+ fullWidth: !0
1589
+ },
1590
+ style: {
1591
+ width: "100%"
1592
+ }
1593
+ }]
1594
+ }), Go = /* @__PURE__ */ l.forwardRef(function(t, n) {
1595
+ const r = ee({
1596
+ props: t,
1597
+ name: "MuiFormControl"
1598
+ }), {
1599
+ children: i,
1600
+ className: d,
1601
+ color: a = "primary",
1602
+ component: c = "div",
1603
+ disabled: f = !1,
1604
+ error: u = !1,
1605
+ focused: m,
1606
+ fullWidth: C = !1,
1607
+ hiddenLabel: S = !1,
1608
+ margin: v = "none",
1609
+ required: x = !1,
1610
+ size: I = "medium",
1611
+ variant: O = "outlined",
1612
+ ...p
1613
+ } = r, h = {
1614
+ ...r,
1615
+ color: a,
1616
+ component: c,
1617
+ disabled: f,
1618
+ error: u,
1619
+ fullWidth: C,
1620
+ hiddenLabel: S,
1621
+ margin: v,
1622
+ required: x,
1623
+ size: I,
1624
+ variant: O
1625
+ }, s = Vt(h), [b, R] = l.useState(() => {
1626
+ let W = !1;
1627
+ return i && l.Children.forEach(i, (g) => {
1628
+ if (!lo(g, ["Input", "Select"]))
1629
+ return;
1630
+ const E = lo(g, ["Select"]) ? g.props.input : g;
1631
+ E && It(E.props) && (W = !0);
1632
+ }), W;
1633
+ }), [L, N] = l.useState(() => {
1634
+ let W = !1;
1635
+ return i && l.Children.forEach(i, (g) => {
1636
+ lo(g, ["Input", "Select"]) && (Ye(g.props, !0) || Ye(g.props.inputProps, !0)) && (W = !0);
1637
+ }), W;
1638
+ }), [k, j] = l.useState(!1);
1639
+ f && k && j(!1);
1640
+ const P = m !== void 0 && !f ? m : k;
1641
+ let B;
1642
+ const z = l.useRef(!1);
1643
+ process.env.NODE_ENV !== "production" && (B = () => (z.current && console.error(["MUI: There are multiple `InputBase` components inside a FormControl.", "This creates visual inconsistencies, only use one `InputBase`."].join(`
1644
+ `)), z.current = !0, () => {
1645
+ z.current = !1;
1646
+ }));
1647
+ const U = l.useMemo(() => ({
1648
+ adornedStart: b,
1649
+ setAdornedStart: R,
1650
+ color: a,
1651
+ disabled: f,
1652
+ error: u,
1653
+ filled: L,
1654
+ focused: P,
1655
+ fullWidth: C,
1656
+ hiddenLabel: S,
1657
+ size: I,
1658
+ onBlur: () => {
1659
+ j(!1);
1660
+ },
1661
+ onEmpty: () => {
1662
+ N(!1);
1663
+ },
1664
+ onFilled: () => {
1665
+ N(!0);
1666
+ },
1667
+ onFocus: () => {
1668
+ j(!0);
1669
+ },
1670
+ registerEffect: B,
1671
+ required: x,
1672
+ variant: O
1673
+ }), [b, a, f, u, L, P, C, S, B, x, I, O]);
1674
+ return /* @__PURE__ */ y(qo.Provider, {
1675
+ value: U,
1676
+ children: /* @__PURE__ */ y(Ht, {
1677
+ as: c,
1678
+ ownerState: h,
1679
+ className: Y(s.root, d),
1680
+ ref: n,
1681
+ ...p,
1682
+ children: i
1683
+ })
1684
+ });
1685
+ });
1686
+ process.env.NODE_ENV !== "production" && (Go.propTypes = {
1687
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
1688
+ // │ These PropTypes are generated from the TypeScript type definitions. │
1689
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1690
+ // └─────────────────────────────────────────────────────────────────────┘
1691
+ /**
1692
+ * The content of the component.
1693
+ */
1694
+ children: e.node,
1695
+ /**
1696
+ * Override or extend the styles applied to the component.
1697
+ */
1698
+ classes: e.object,
1699
+ /**
1700
+ * @ignore
1701
+ */
1702
+ className: e.string,
1703
+ /**
1704
+ * The color of the component.
1705
+ * It supports both default and custom theme colors, which can be added as shown in the
1706
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
1707
+ * @default 'primary'
1708
+ */
1709
+ color: e.oneOfType([e.oneOf(["primary", "secondary", "error", "info", "success", "warning"]), e.string]),
1710
+ /**
1711
+ * The component used for the root node.
1712
+ * Either a string to use a HTML element or a component.
1713
+ */
1714
+ component: e.elementType,
1715
+ /**
1716
+ * If `true`, the label, input and helper text should be displayed in a disabled state.
1717
+ * @default false
1718
+ */
1719
+ disabled: e.bool,
1720
+ /**
1721
+ * If `true`, the label is displayed in an error state.
1722
+ * @default false
1723
+ */
1724
+ error: e.bool,
1725
+ /**
1726
+ * If `true`, the component is displayed in focused state.
1727
+ */
1728
+ focused: e.bool,
1729
+ /**
1730
+ * If `true`, the component will take up the full width of its container.
1731
+ * @default false
1732
+ */
1733
+ fullWidth: e.bool,
1734
+ /**
1735
+ * If `true`, the label is hidden.
1736
+ * This is used to increase density for a `FilledInput`.
1737
+ * Be sure to add `aria-label` to the `input` element.
1738
+ * @default false
1739
+ */
1740
+ hiddenLabel: e.bool,
1741
+ /**
1742
+ * If `dense` or `normal`, will adjust vertical spacing of this and contained components.
1743
+ * @default 'none'
1744
+ */
1745
+ margin: e.oneOf(["dense", "none", "normal"]),
1746
+ /**
1747
+ * If `true`, the label will indicate that the `input` is required.
1748
+ * @default false
1749
+ */
1750
+ required: e.bool,
1751
+ /**
1752
+ * The size of the component.
1753
+ * @default 'medium'
1754
+ */
1755
+ size: e.oneOfType([e.oneOf(["medium", "small"]), e.string]),
1756
+ /**
1757
+ * The system prop that allows defining system overrides as well as additional CSS styles.
1758
+ */
1759
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
1760
+ /**
1761
+ * The variant to use.
1762
+ * @default 'outlined'
1763
+ */
1764
+ variant: e.oneOf(["filled", "outlined", "standard"])
1765
+ });
1766
+ function qt(o) {
1767
+ return Z("MuiFormLabel", o);
1768
+ }
1769
+ const je = G("MuiFormLabel", ["root", "colorSecondary", "focused", "disabled", "error", "filled", "required", "asterisk"]), _t = (o) => {
1770
+ const {
1771
+ classes: t,
1772
+ color: n,
1773
+ focused: r,
1774
+ disabled: i,
1775
+ error: d,
1776
+ filled: a,
1777
+ required: c
1778
+ } = o, f = {
1779
+ root: ["root", `color${H(n)}`, i && "disabled", d && "error", a && "filled", r && "focused", c && "required"],
1780
+ asterisk: ["asterisk", d && "error"]
1781
+ };
1782
+ return J(f, qt, t);
1783
+ }, Kt = M("label", {
1784
+ name: "MuiFormLabel",
1785
+ slot: "Root",
1786
+ overridesResolver: (o, t) => {
1787
+ const {
1788
+ ownerState: n
1789
+ } = o;
1790
+ return [t.root, n.color === "secondary" && t.colorSecondary, n.filled && t.filled];
1791
+ }
1792
+ })(_(({
1793
+ theme: o
1794
+ }) => ({
1795
+ color: (o.vars || o).palette.text.secondary,
1796
+ ...o.typography.body1,
1797
+ lineHeight: "1.4375em",
1798
+ padding: 0,
1799
+ position: "relative",
1800
+ variants: [...Object.entries(o.palette).filter(ze()).map(([t]) => ({
1801
+ props: {
1802
+ color: t
1803
+ },
1804
+ style: {
1805
+ [`&.${je.focused}`]: {
1806
+ color: (o.vars || o).palette[t].main
1807
+ }
1808
+ }
1809
+ })), {
1810
+ props: {},
1811
+ style: {
1812
+ [`&.${je.disabled}`]: {
1813
+ color: (o.vars || o).palette.text.disabled
1814
+ },
1815
+ [`&.${je.error}`]: {
1816
+ color: (o.vars || o).palette.error.main
1817
+ }
1818
+ }
1819
+ }]
1820
+ }))), Gt = M("span", {
1821
+ name: "MuiFormLabel",
1822
+ slot: "Asterisk",
1823
+ overridesResolver: (o, t) => t.asterisk
1824
+ })(_(({
1825
+ theme: o
1826
+ }) => ({
1827
+ [`&.${je.error}`]: {
1828
+ color: (o.vars || o).palette.error.main
1829
+ }
1830
+ }))), Xo = /* @__PURE__ */ l.forwardRef(function(t, n) {
1831
+ const r = ee({
1832
+ props: t,
1833
+ name: "MuiFormLabel"
1834
+ }), {
1835
+ children: i,
1836
+ className: d,
1837
+ color: a,
1838
+ component: c = "label",
1839
+ disabled: f,
1840
+ error: u,
1841
+ filled: m,
1842
+ focused: C,
1843
+ required: S,
1844
+ ...v
1845
+ } = r, x = We(), I = Ue({
1846
+ props: r,
1847
+ muiFormControl: x,
1848
+ states: ["color", "required", "focused", "disabled", "error", "filled"]
1849
+ }), O = {
1850
+ ...r,
1851
+ color: I.color || "primary",
1852
+ component: c,
1853
+ disabled: I.disabled,
1854
+ error: I.error,
1855
+ filled: I.filled,
1856
+ focused: I.focused,
1857
+ required: I.required
1858
+ }, p = _t(O);
1859
+ return /* @__PURE__ */ q(Kt, {
1860
+ as: c,
1861
+ ownerState: O,
1862
+ className: Y(p.root, d),
1863
+ ref: n,
1864
+ ...v,
1865
+ children: [i, I.required && /* @__PURE__ */ q(Gt, {
1866
+ ownerState: O,
1867
+ "aria-hidden": !0,
1868
+ className: p.asterisk,
1869
+ children: [" ", "*"]
1870
+ })]
1871
+ });
1872
+ });
1873
+ process.env.NODE_ENV !== "production" && (Xo.propTypes = {
1874
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
1875
+ // │ These PropTypes are generated from the TypeScript type definitions. │
1876
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1877
+ // └─────────────────────────────────────────────────────────────────────┘
1878
+ /**
1879
+ * The content of the component.
1880
+ */
1881
+ children: e.node,
1882
+ /**
1883
+ * Override or extend the styles applied to the component.
1884
+ */
1885
+ classes: e.object,
1886
+ /**
1887
+ * @ignore
1888
+ */
1889
+ className: e.string,
1890
+ /**
1891
+ * The color of the component.
1892
+ * It supports both default and custom theme colors, which can be added as shown in the
1893
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
1894
+ */
1895
+ color: e.oneOfType([e.oneOf(["error", "info", "primary", "secondary", "success", "warning"]), e.string]),
1896
+ /**
1897
+ * The component used for the root node.
1898
+ * Either a string to use a HTML element or a component.
1899
+ */
1900
+ component: e.elementType,
1901
+ /**
1902
+ * If `true`, the label should be displayed in a disabled state.
1903
+ */
1904
+ disabled: e.bool,
1905
+ /**
1906
+ * If `true`, the label is displayed in an error state.
1907
+ */
1908
+ error: e.bool,
1909
+ /**
1910
+ * If `true`, the label should use filled classes key.
1911
+ */
1912
+ filled: e.bool,
1913
+ /**
1914
+ * If `true`, the input of this label is focused (used by `FormGroup` components).
1915
+ */
1916
+ focused: e.bool,
1917
+ /**
1918
+ * If `true`, the label will indicate that the `input` is required.
1919
+ */
1920
+ required: e.bool,
1921
+ /**
1922
+ * The system prop that allows defining system overrides as well as additional CSS styles.
1923
+ */
1924
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
1925
+ });
1926
+ const Xt = (o) => {
1927
+ const {
1928
+ classes: t,
1929
+ disableUnderline: n
1930
+ } = o, i = J({
1931
+ root: ["root", !n && "underline"],
1932
+ input: ["input"]
1933
+ }, Tt, t);
1934
+ return {
1935
+ ...t,
1936
+ // forward classes to the InputBase
1937
+ ...i
1938
+ };
1939
+ }, Yt = M(Qe, {
1940
+ shouldForwardProp: (o) => ne(o) || o === "classes",
1941
+ name: "MuiInput",
1942
+ slot: "Root",
1943
+ overridesResolver: (o, t) => {
1944
+ const {
1945
+ ownerState: n
1946
+ } = o;
1947
+ return [...Ze(o, t), !n.disableUnderline && t.underline];
1948
+ }
1949
+ })(_(({
1950
+ theme: o
1951
+ }) => {
1952
+ let n = o.palette.mode === "light" ? "rgba(0, 0, 0, 0.42)" : "rgba(255, 255, 255, 0.7)";
1953
+ return o.vars && (n = `rgba(${o.vars.palette.common.onBackgroundChannel} / ${o.vars.opacity.inputUnderline})`), {
1954
+ position: "relative",
1955
+ variants: [{
1956
+ props: ({
1957
+ ownerState: r
1958
+ }) => r.formControl,
1959
+ style: {
1960
+ "label + &": {
1961
+ marginTop: 16
1962
+ }
1963
+ }
1964
+ }, {
1965
+ props: ({
1966
+ ownerState: r
1967
+ }) => !r.disableUnderline,
1968
+ style: {
1969
+ "&::after": {
1970
+ left: 0,
1971
+ bottom: 0,
1972
+ content: '""',
1973
+ position: "absolute",
1974
+ right: 0,
1975
+ transform: "scaleX(0)",
1976
+ transition: o.transitions.create("transform", {
1977
+ duration: o.transitions.duration.shorter,
1978
+ easing: o.transitions.easing.easeOut
1979
+ }),
1980
+ pointerEvents: "none"
1981
+ // Transparent to the hover style.
1982
+ },
1983
+ [`&.${$e.focused}:after`]: {
1984
+ // translateX(0) is a workaround for Safari transform scale bug
1985
+ // See https://github.com/mui/material-ui/issues/31766
1986
+ transform: "scaleX(1) translateX(0)"
1987
+ },
1988
+ [`&.${$e.error}`]: {
1989
+ "&::before, &::after": {
1990
+ borderBottomColor: (o.vars || o).palette.error.main
1991
+ }
1992
+ },
1993
+ "&::before": {
1994
+ borderBottom: `1px solid ${n}`,
1995
+ left: 0,
1996
+ bottom: 0,
1997
+ content: '"\\00a0"',
1998
+ position: "absolute",
1999
+ right: 0,
2000
+ transition: o.transitions.create("border-bottom-color", {
2001
+ duration: o.transitions.duration.shorter
2002
+ }),
2003
+ pointerEvents: "none"
2004
+ // Transparent to the hover style.
2005
+ },
2006
+ [`&:hover:not(.${$e.disabled}, .${$e.error}):before`]: {
2007
+ borderBottom: `2px solid ${(o.vars || o).palette.text.primary}`,
2008
+ // Reset on touch devices, it doesn't add specificity
2009
+ "@media (hover: none)": {
2010
+ borderBottom: `1px solid ${n}`
2011
+ }
2012
+ },
2013
+ [`&.${$e.disabled}:before`]: {
2014
+ borderBottomStyle: "dotted"
2015
+ }
2016
+ }
2017
+ }, ...Object.entries(o.palette).filter(ze()).map(([r]) => ({
2018
+ props: {
2019
+ color: r,
2020
+ disableUnderline: !1
2021
+ },
2022
+ style: {
2023
+ "&::after": {
2024
+ borderBottom: `2px solid ${(o.vars || o).palette[r].main}`
2025
+ }
2026
+ }
2027
+ }))]
2028
+ };
2029
+ })), Zt = M(eo, {
2030
+ name: "MuiInput",
2031
+ slot: "Input",
2032
+ overridesResolver: Je
2033
+ })({}), go = /* @__PURE__ */ l.forwardRef(function(t, n) {
2034
+ const r = ee({
2035
+ props: t,
2036
+ name: "MuiInput"
2037
+ }), {
2038
+ disableUnderline: i = !1,
2039
+ components: d = {},
2040
+ componentsProps: a,
2041
+ fullWidth: c = !1,
2042
+ inputComponent: f = "input",
2043
+ multiline: u = !1,
2044
+ slotProps: m,
2045
+ slots: C = {},
2046
+ type: S = "text",
2047
+ ...v
2048
+ } = r, x = Xt(r), O = {
2049
+ root: {
2050
+ ownerState: {
2051
+ disableUnderline: i
2052
+ }
2053
+ }
2054
+ }, p = m ?? a ? mo(m ?? a, O) : O, h = C.root ?? d.Root ?? Yt, s = C.input ?? d.Input ?? Zt;
2055
+ return /* @__PURE__ */ y(oo, {
2056
+ slots: {
2057
+ root: h,
2058
+ input: s
2059
+ },
2060
+ slotProps: p,
2061
+ fullWidth: c,
2062
+ inputComponent: f,
2063
+ multiline: u,
2064
+ ref: n,
2065
+ type: S,
2066
+ ...v,
2067
+ classes: x
2068
+ });
2069
+ });
2070
+ process.env.NODE_ENV !== "production" && (go.propTypes = {
2071
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
2072
+ // │ These PropTypes are generated from the TypeScript type definitions. │
2073
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
2074
+ // └─────────────────────────────────────────────────────────────────────┘
2075
+ /**
2076
+ * This prop helps users to fill forms faster, especially on mobile devices.
2077
+ * The name can be confusing, as it's more like an autofill.
2078
+ * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).
2079
+ */
2080
+ autoComplete: e.string,
2081
+ /**
2082
+ * If `true`, the `input` element is focused during the first mount.
2083
+ */
2084
+ autoFocus: e.bool,
2085
+ /**
2086
+ * Override or extend the styles applied to the component.
2087
+ */
2088
+ classes: e.object,
2089
+ /**
2090
+ * The color of the component.
2091
+ * It supports both default and custom theme colors, which can be added as shown in the
2092
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
2093
+ * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.
2094
+ */
2095
+ color: e.oneOfType([e.oneOf(["primary", "secondary"]), e.string]),
2096
+ /**
2097
+ * The components used for each slot inside.
2098
+ *
2099
+ * @deprecated use the `slots` 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.
2100
+ *
2101
+ * @default {}
2102
+ */
2103
+ components: e.shape({
2104
+ Input: e.elementType,
2105
+ Root: e.elementType
2106
+ }),
2107
+ /**
2108
+ * The extra props for the slot components.
2109
+ * You can override the existing props or add new ones.
2110
+ *
2111
+ * @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.
2112
+ *
2113
+ * @default {}
2114
+ */
2115
+ componentsProps: e.shape({
2116
+ input: e.object,
2117
+ root: e.object
2118
+ }),
2119
+ /**
2120
+ * The default value. Use when the component is not controlled.
2121
+ */
2122
+ defaultValue: e.any,
2123
+ /**
2124
+ * If `true`, the component is disabled.
2125
+ * The prop defaults to the value (`false`) inherited from the parent FormControl component.
2126
+ */
2127
+ disabled: e.bool,
2128
+ /**
2129
+ * If `true`, the `input` will not have an underline.
2130
+ * @default false
2131
+ */
2132
+ disableUnderline: e.bool,
2133
+ /**
2134
+ * End `InputAdornment` for this component.
2135
+ */
2136
+ endAdornment: e.node,
2137
+ /**
2138
+ * If `true`, the `input` will indicate an error.
2139
+ * The prop defaults to the value (`false`) inherited from the parent FormControl component.
2140
+ */
2141
+ error: e.bool,
2142
+ /**
2143
+ * If `true`, the `input` will take up the full width of its container.
2144
+ * @default false
2145
+ */
2146
+ fullWidth: e.bool,
2147
+ /**
2148
+ * The id of the `input` element.
2149
+ */
2150
+ id: e.string,
2151
+ /**
2152
+ * The component used for the `input` element.
2153
+ * Either a string to use a HTML element or a component.
2154
+ * @default 'input'
2155
+ */
2156
+ inputComponent: e.elementType,
2157
+ /**
2158
+ * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
2159
+ * @default {}
2160
+ */
2161
+ inputProps: e.object,
2162
+ /**
2163
+ * Pass a ref to the `input` element.
2164
+ */
2165
+ inputRef: ke,
2166
+ /**
2167
+ * If `dense`, will adjust vertical spacing. This is normally obtained via context from
2168
+ * FormControl.
2169
+ * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.
2170
+ */
2171
+ margin: e.oneOf(["dense", "none"]),
2172
+ /**
2173
+ * Maximum number of rows to display when multiline option is set to true.
2174
+ */
2175
+ maxRows: e.oneOfType([e.number, e.string]),
2176
+ /**
2177
+ * Minimum number of rows to display when multiline option is set to true.
2178
+ */
2179
+ minRows: e.oneOfType([e.number, e.string]),
2180
+ /**
2181
+ * If `true`, a [TextareaAutosize](https://mui.com/material-ui/react-textarea-autosize/) element is rendered.
2182
+ * @default false
2183
+ */
2184
+ multiline: e.bool,
2185
+ /**
2186
+ * Name attribute of the `input` element.
2187
+ */
2188
+ name: e.string,
2189
+ /**
2190
+ * Callback fired when the value is changed.
2191
+ *
2192
+ * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.
2193
+ * You can pull out the new value by accessing `event.target.value` (string).
2194
+ */
2195
+ onChange: e.func,
2196
+ /**
2197
+ * The short hint displayed in the `input` before the user enters a value.
2198
+ */
2199
+ placeholder: e.string,
2200
+ /**
2201
+ * It prevents the user from changing the value of the field
2202
+ * (not from interacting with the field).
2203
+ */
2204
+ readOnly: e.bool,
2205
+ /**
2206
+ * If `true`, the `input` element is required.
2207
+ * The prop defaults to the value (`false`) inherited from the parent FormControl component.
2208
+ */
2209
+ required: e.bool,
2210
+ /**
2211
+ * Number of rows to display when multiline option is set to true.
2212
+ */
2213
+ rows: e.oneOfType([e.number, e.string]),
2214
+ /**
2215
+ * The extra props for the slot components.
2216
+ * You can override the existing props or add new ones.
2217
+ *
2218
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
2219
+ *
2220
+ * @default {}
2221
+ */
2222
+ slotProps: e.shape({
2223
+ input: e.object,
2224
+ root: e.object
2225
+ }),
2226
+ /**
2227
+ * The components used for each slot inside.
2228
+ *
2229
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
2230
+ *
2231
+ * @default {}
2232
+ */
2233
+ slots: e.shape({
2234
+ input: e.elementType,
2235
+ root: e.elementType
2236
+ }),
2237
+ /**
2238
+ * Start `InputAdornment` for this component.
2239
+ */
2240
+ startAdornment: e.node,
2241
+ /**
2242
+ * The system prop that allows defining system overrides as well as additional CSS styles.
2243
+ */
2244
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
2245
+ /**
2246
+ * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).
2247
+ * @default 'text'
2248
+ */
2249
+ type: e.string,
2250
+ /**
2251
+ * The value of the `input` element, required for a controlled component.
2252
+ */
2253
+ value: e.any
2254
+ });
2255
+ go.muiName = "Input";
2256
+ function Jt(o) {
2257
+ return Z("MuiInputLabel", o);
2258
+ }
2259
+ G("MuiInputLabel", ["root", "focused", "disabled", "error", "required", "asterisk", "formControl", "sizeSmall", "shrink", "animated", "standard", "filled", "outlined"]);
2260
+ const Qt = (o) => {
2261
+ const {
2262
+ classes: t,
2263
+ formControl: n,
2264
+ size: r,
2265
+ shrink: i,
2266
+ disableAnimation: d,
2267
+ variant: a,
2268
+ required: c
2269
+ } = o, f = {
2270
+ root: ["root", n && "formControl", !d && "animated", i && "shrink", r && r !== "normal" && `size${H(r)}`, a],
2271
+ asterisk: [c && "asterisk"]
2272
+ }, u = J(f, Jt, t);
2273
+ return {
2274
+ ...t,
2275
+ // forward the focused, disabled, etc. classes to the FormLabel
2276
+ ...u
2277
+ };
2278
+ }, en = M(Xo, {
2279
+ shouldForwardProp: (o) => ne(o) || o === "classes",
2280
+ name: "MuiInputLabel",
2281
+ slot: "Root",
2282
+ overridesResolver: (o, t) => {
2283
+ const {
2284
+ ownerState: n
2285
+ } = o;
2286
+ return [{
2287
+ [`& .${je.asterisk}`]: t.asterisk
2288
+ }, t.root, n.formControl && t.formControl, n.size === "small" && t.sizeSmall, n.shrink && t.shrink, !n.disableAnimation && t.animated, n.focused && t.focused, t[n.variant]];
2289
+ }
2290
+ })(_(({
2291
+ theme: o
2292
+ }) => ({
2293
+ display: "block",
2294
+ transformOrigin: "top left",
2295
+ whiteSpace: "nowrap",
2296
+ overflow: "hidden",
2297
+ textOverflow: "ellipsis",
2298
+ maxWidth: "100%",
2299
+ variants: [{
2300
+ props: ({
2301
+ ownerState: t
2302
+ }) => t.formControl,
2303
+ style: {
2304
+ position: "absolute",
2305
+ left: 0,
2306
+ top: 0,
2307
+ // slight alteration to spec spacing to match visual spec result
2308
+ transform: "translate(0, 20px) scale(1)"
2309
+ }
2310
+ }, {
2311
+ props: {
2312
+ size: "small"
2313
+ },
2314
+ style: {
2315
+ // Compensation for the `Input.inputSizeSmall` style.
2316
+ transform: "translate(0, 17px) scale(1)"
2317
+ }
2318
+ }, {
2319
+ props: ({
2320
+ ownerState: t
2321
+ }) => t.shrink,
2322
+ style: {
2323
+ transform: "translate(0, -1.5px) scale(0.75)",
2324
+ transformOrigin: "top left",
2325
+ maxWidth: "133%"
2326
+ }
2327
+ }, {
2328
+ props: ({
2329
+ ownerState: t
2330
+ }) => !t.disableAnimation,
2331
+ style: {
2332
+ transition: o.transitions.create(["color", "transform", "max-width"], {
2333
+ duration: o.transitions.duration.shorter,
2334
+ easing: o.transitions.easing.easeOut
2335
+ })
2336
+ }
2337
+ }, {
2338
+ props: {
2339
+ variant: "filled"
2340
+ },
2341
+ style: {
2342
+ // Chrome's autofill feature gives the input field a yellow background.
2343
+ // Since the input field is behind the label in the HTML tree,
2344
+ // the input field is drawn last and hides the label with an opaque background color.
2345
+ // zIndex: 1 will raise the label above opaque background-colors of input.
2346
+ zIndex: 1,
2347
+ pointerEvents: "none",
2348
+ transform: "translate(12px, 16px) scale(1)",
2349
+ maxWidth: "calc(100% - 24px)"
2350
+ }
2351
+ }, {
2352
+ props: {
2353
+ variant: "filled",
2354
+ size: "small"
2355
+ },
2356
+ style: {
2357
+ transform: "translate(12px, 13px) scale(1)"
2358
+ }
2359
+ }, {
2360
+ props: ({
2361
+ variant: t,
2362
+ ownerState: n
2363
+ }) => t === "filled" && n.shrink,
2364
+ style: {
2365
+ userSelect: "none",
2366
+ pointerEvents: "auto",
2367
+ transform: "translate(12px, 7px) scale(0.75)",
2368
+ maxWidth: "calc(133% - 24px)"
2369
+ }
2370
+ }, {
2371
+ props: ({
2372
+ variant: t,
2373
+ ownerState: n,
2374
+ size: r
2375
+ }) => t === "filled" && n.shrink && r === "small",
2376
+ style: {
2377
+ transform: "translate(12px, 4px) scale(0.75)"
2378
+ }
2379
+ }, {
2380
+ props: {
2381
+ variant: "outlined"
2382
+ },
2383
+ style: {
2384
+ // see comment above on filled.zIndex
2385
+ zIndex: 1,
2386
+ pointerEvents: "none",
2387
+ transform: "translate(14px, 16px) scale(1)",
2388
+ maxWidth: "calc(100% - 24px)"
2389
+ }
2390
+ }, {
2391
+ props: {
2392
+ variant: "outlined",
2393
+ size: "small"
2394
+ },
2395
+ style: {
2396
+ transform: "translate(14px, 9px) scale(1)"
2397
+ }
2398
+ }, {
2399
+ props: ({
2400
+ variant: t,
2401
+ ownerState: n
2402
+ }) => t === "outlined" && n.shrink,
2403
+ style: {
2404
+ userSelect: "none",
2405
+ pointerEvents: "auto",
2406
+ // Theoretically, we should have (8+5)*2/0.75 = 34px
2407
+ // but it feels a better when it bleeds a bit on the left, so 32px.
2408
+ maxWidth: "calc(133% - 32px)",
2409
+ transform: "translate(14px, -9px) scale(0.75)"
2410
+ }
2411
+ }]
2412
+ }))), Yo = /* @__PURE__ */ l.forwardRef(function(t, n) {
2413
+ const r = ee({
2414
+ name: "MuiInputLabel",
2415
+ props: t
2416
+ }), {
2417
+ disableAnimation: i = !1,
2418
+ margin: d,
2419
+ shrink: a,
2420
+ variant: c,
2421
+ className: f,
2422
+ ...u
2423
+ } = r, m = We();
2424
+ let C = a;
2425
+ typeof C > "u" && m && (C = m.filled || m.focused || m.adornedStart);
2426
+ const S = Ue({
2427
+ props: r,
2428
+ muiFormControl: m,
2429
+ states: ["size", "variant", "required", "focused"]
2430
+ }), v = {
2431
+ ...r,
2432
+ disableAnimation: i,
2433
+ formControl: m,
2434
+ shrink: C,
2435
+ size: S.size,
2436
+ variant: S.variant,
2437
+ required: S.required,
2438
+ focused: S.focused
2439
+ }, x = Qt(v);
2440
+ return /* @__PURE__ */ y(en, {
2441
+ "data-shrink": C,
2442
+ ref: n,
2443
+ className: Y(x.root, f),
2444
+ ...u,
2445
+ ownerState: v,
2446
+ classes: x
2447
+ });
2448
+ });
2449
+ process.env.NODE_ENV !== "production" && (Yo.propTypes = {
2450
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
2451
+ // │ These PropTypes are generated from the TypeScript type definitions. │
2452
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
2453
+ // └─────────────────────────────────────────────────────────────────────┘
2454
+ /**
2455
+ * The content of the component.
2456
+ */
2457
+ children: e.node,
2458
+ /**
2459
+ * Override or extend the styles applied to the component.
2460
+ */
2461
+ classes: e.object,
2462
+ /**
2463
+ * @ignore
2464
+ */
2465
+ className: e.string,
2466
+ /**
2467
+ * The color of the component.
2468
+ * It supports both default and custom theme colors, which can be added as shown in the
2469
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
2470
+ */
2471
+ color: e.oneOfType([e.oneOf(["error", "info", "primary", "secondary", "success", "warning"]), e.string]),
2472
+ /**
2473
+ * If `true`, the transition animation is disabled.
2474
+ * @default false
2475
+ */
2476
+ disableAnimation: e.bool,
2477
+ /**
2478
+ * If `true`, the component is disabled.
2479
+ */
2480
+ disabled: e.bool,
2481
+ /**
2482
+ * If `true`, the label is displayed in an error state.
2483
+ */
2484
+ error: e.bool,
2485
+ /**
2486
+ * If `true`, the `input` of this label is focused.
2487
+ */
2488
+ focused: e.bool,
2489
+ /**
2490
+ * If `dense`, will adjust vertical spacing. This is normally obtained via context from
2491
+ * FormControl.
2492
+ */
2493
+ margin: e.oneOf(["dense"]),
2494
+ /**
2495
+ * if `true`, the label will indicate that the `input` is required.
2496
+ */
2497
+ required: e.bool,
2498
+ /**
2499
+ * If `true`, the label is shrunk.
2500
+ */
2501
+ shrink: e.bool,
2502
+ /**
2503
+ * The size of the component.
2504
+ * @default 'normal'
2505
+ */
2506
+ size: e.oneOfType([e.oneOf(["normal", "small"]), e.string]),
2507
+ /**
2508
+ * The system prop that allows defining system overrides as well as additional CSS styles.
2509
+ */
2510
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
2511
+ /**
2512
+ * The variant to use.
2513
+ */
2514
+ variant: e.oneOf(["filled", "outlined", "standard"])
2515
+ });
2516
+ const Do = G("MuiListItemIcon", ["root", "alignItemsFlexStart"]), Ao = G("MuiListItemText", ["root", "multiline", "dense", "inset", "primary", "secondary"]);
2517
+ function co(o, t, n) {
2518
+ return o === t ? o.firstChild : t && t.nextElementSibling ? t.nextElementSibling : n ? null : o.firstChild;
2519
+ }
2520
+ function jo(o, t, n) {
2521
+ return o === t ? n ? o.firstChild : o.lastChild : t && t.previousElementSibling ? t.previousElementSibling : n ? null : o.lastChild;
2522
+ }
2523
+ function Zo(o, t) {
2524
+ if (t === void 0)
2525
+ return !0;
2526
+ let n = o.innerText;
2527
+ return n === void 0 && (n = o.textContent), n = n.trim().toLowerCase(), n.length === 0 ? !1 : t.repeating ? n[0] === t.keys[0] : n.startsWith(t.keys.join(""));
2528
+ }
2529
+ function Le(o, t, n, r, i, d) {
2530
+ let a = !1, c = i(o, t, t ? n : !1);
2531
+ for (; c; ) {
2532
+ if (c === o.firstChild) {
2533
+ if (a)
2534
+ return !1;
2535
+ a = !0;
2536
+ }
2537
+ const f = r ? !1 : c.disabled || c.getAttribute("aria-disabled") === "true";
2538
+ if (!c.hasAttribute("tabindex") || !Zo(c, d) || f)
2539
+ c = i(o, c, n);
2540
+ else
2541
+ return c.focus(), !0;
2542
+ }
2543
+ return !1;
2544
+ }
2545
+ const Jo = /* @__PURE__ */ l.forwardRef(function(t, n) {
2546
+ const {
2547
+ // private
2548
+ // eslint-disable-next-line react/prop-types
2549
+ actions: r,
2550
+ autoFocus: i = !1,
2551
+ autoFocusItem: d = !1,
2552
+ children: a,
2553
+ className: c,
2554
+ disabledItemsFocusable: f = !1,
2555
+ disableListWrap: u = !1,
2556
+ onKeyDown: m,
2557
+ variant: C = "selectedMenu",
2558
+ ...S
2559
+ } = t, v = l.useRef(null), x = l.useRef({
2560
+ keys: [],
2561
+ repeating: !0,
2562
+ previousKeyMatched: !0,
2563
+ lastTime: null
2564
+ });
2565
+ Be(() => {
2566
+ i && v.current.focus();
2567
+ }, [i]), l.useImperativeHandle(r, () => ({
2568
+ adjustStyleForScrollbar: (s, {
2569
+ direction: b
2570
+ }) => {
2571
+ const R = !v.current.style.width;
2572
+ if (s.clientHeight < v.current.clientHeight && R) {
2573
+ const L = `${ht(uo(s))}px`;
2574
+ v.current.style[b === "rtl" ? "paddingLeft" : "paddingRight"] = L, v.current.style.width = `calc(100% + ${L})`;
2575
+ }
2576
+ return v.current;
2577
+ }
2578
+ }), []);
2579
+ const I = (s) => {
2580
+ const b = v.current, R = s.key;
2581
+ if (s.ctrlKey || s.metaKey || s.altKey) {
2582
+ m && m(s);
2583
+ return;
2584
+ }
2585
+ const N = _o(b).activeElement;
2586
+ if (R === "ArrowDown")
2587
+ s.preventDefault(), Le(b, N, u, f, co);
2588
+ else if (R === "ArrowUp")
2589
+ s.preventDefault(), Le(b, N, u, f, jo);
2590
+ else if (R === "Home")
2591
+ s.preventDefault(), Le(b, null, u, f, co);
2592
+ else if (R === "End")
2593
+ s.preventDefault(), Le(b, null, u, f, jo);
2594
+ else if (R.length === 1) {
2595
+ const k = x.current, j = R.toLowerCase(), P = performance.now();
2596
+ k.keys.length > 0 && (P - k.lastTime > 500 ? (k.keys = [], k.repeating = !0, k.previousKeyMatched = !0) : k.repeating && j !== k.keys[0] && (k.repeating = !1)), k.lastTime = P, k.keys.push(j);
2597
+ const B = N && !k.repeating && Zo(N, k);
2598
+ k.previousKeyMatched && (B || Le(b, N, !1, f, co, k)) ? s.preventDefault() : k.previousKeyMatched = !1;
2599
+ }
2600
+ m && m(s);
2601
+ }, O = Te(v, n);
2602
+ let p = -1;
2603
+ l.Children.forEach(a, (s, b) => {
2604
+ if (!/* @__PURE__ */ l.isValidElement(s)) {
2605
+ p === b && (p += 1, p >= a.length && (p = -1));
2606
+ return;
2607
+ }
2608
+ process.env.NODE_ENV !== "production" && bo.isFragment(s) && console.error(["MUI: The Menu component doesn't accept a Fragment as a child.", "Consider providing an array instead."].join(`
2609
+ `)), s.props.disabled || (C === "selectedMenu" && s.props.selected || p === -1) && (p = b), p === b && (s.props.disabled || s.props.muiSkipListHighlight || s.type.muiSkipListHighlight) && (p += 1, p >= a.length && (p = -1));
2610
+ });
2611
+ const h = l.Children.map(a, (s, b) => {
2612
+ if (b === p) {
2613
+ const R = {};
2614
+ return d && (R.autoFocus = !0), s.props.tabIndex === void 0 && C === "selectedMenu" && (R.tabIndex = 0), /* @__PURE__ */ l.cloneElement(s, R);
2615
+ }
2616
+ return s;
2617
+ });
2618
+ return /* @__PURE__ */ y(ft, {
2619
+ role: "menu",
2620
+ ref: O,
2621
+ className: c,
2622
+ onKeyDown: I,
2623
+ tabIndex: i ? 0 : -1,
2624
+ ...S,
2625
+ children: h
2626
+ });
2627
+ });
2628
+ process.env.NODE_ENV !== "production" && (Jo.propTypes = {
2629
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
2630
+ // │ These PropTypes are generated from the TypeScript type definitions. │
2631
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
2632
+ // └─────────────────────────────────────────────────────────────────────┘
2633
+ /**
2634
+ * If `true`, will focus the `[role="menu"]` container and move into tab order.
2635
+ * @default false
2636
+ */
2637
+ autoFocus: e.bool,
2638
+ /**
2639
+ * If `true`, will focus the first menuitem if `variant="menu"` or selected item
2640
+ * if `variant="selectedMenu"`.
2641
+ * @default false
2642
+ */
2643
+ autoFocusItem: e.bool,
2644
+ /**
2645
+ * MenuList contents, normally `MenuItem`s.
2646
+ */
2647
+ children: e.node,
2648
+ /**
2649
+ * @ignore
2650
+ */
2651
+ className: e.string,
2652
+ /**
2653
+ * If `true`, will allow focus on disabled items.
2654
+ * @default false
2655
+ */
2656
+ disabledItemsFocusable: e.bool,
2657
+ /**
2658
+ * If `true`, the menu items will not wrap focus.
2659
+ * @default false
2660
+ */
2661
+ disableListWrap: e.bool,
2662
+ /**
2663
+ * @ignore
2664
+ */
2665
+ onKeyDown: e.func,
2666
+ /**
2667
+ * The variant to use. Use `menu` to prevent selected items from impacting the initial focus
2668
+ * and the vertical alignment relative to the anchor element.
2669
+ * @default 'selectedMenu'
2670
+ */
2671
+ variant: e.oneOf(["menu", "selectedMenu"])
2672
+ });
2673
+ function on(o) {
2674
+ return Z("MuiMenu", o);
2675
+ }
2676
+ G("MuiMenu", ["root", "paper", "list"]);
2677
+ const tn = {
2678
+ vertical: "top",
2679
+ horizontal: "right"
2680
+ }, nn = {
2681
+ vertical: "top",
2682
+ horizontal: "left"
2683
+ }, rn = (o) => {
2684
+ const {
2685
+ classes: t
2686
+ } = o;
2687
+ return J({
2688
+ root: ["root"],
2689
+ paper: ["paper"],
2690
+ list: ["list"]
2691
+ }, on, t);
2692
+ }, sn = M(yt, {
2693
+ shouldForwardProp: (o) => ne(o) || o === "classes",
2694
+ name: "MuiMenu",
2695
+ slot: "Root",
2696
+ overridesResolver: (o, t) => t.root
2697
+ })({}), an = M(gt, {
2698
+ name: "MuiMenu",
2699
+ slot: "Paper",
2700
+ overridesResolver: (o, t) => t.paper
2701
+ })({
2702
+ // specZ: The maximum height of a simple menu should be one or more rows less than the view
2703
+ // height. This ensures a tappable area outside of the simple menu with which to dismiss
2704
+ // the menu.
2705
+ maxHeight: "calc(100% - 96px)",
2706
+ // Add iOS momentum scrolling for iOS < 13.0
2707
+ WebkitOverflowScrolling: "touch"
2708
+ }), ln = M(Jo, {
2709
+ name: "MuiMenu",
2710
+ slot: "List",
2711
+ overridesResolver: (o, t) => t.list
2712
+ })({
2713
+ // We disable the focus ring for mouse, touch and keyboard users.
2714
+ outline: 0
2715
+ }), Qo = /* @__PURE__ */ l.forwardRef(function(t, n) {
2716
+ const r = ee({
2717
+ props: t,
2718
+ name: "MuiMenu"
2719
+ }), {
2720
+ autoFocus: i = !0,
2721
+ children: d,
2722
+ className: a,
2723
+ disableAutoFocusItem: c = !1,
2724
+ MenuListProps: f = {},
2725
+ onClose: u,
2726
+ open: m,
2727
+ PaperProps: C = {},
2728
+ PopoverClasses: S,
2729
+ transitionDuration: v = "auto",
2730
+ TransitionProps: {
2731
+ onEntering: x,
2732
+ ...I
2733
+ } = {},
2734
+ variant: O = "selectedMenu",
2735
+ slots: p = {},
2736
+ slotProps: h = {},
2737
+ ...s
2738
+ } = r, b = mt(), R = {
2739
+ ...r,
2740
+ autoFocus: i,
2741
+ disableAutoFocusItem: c,
2742
+ MenuListProps: f,
2743
+ onEntering: x,
2744
+ PaperProps: C,
2745
+ transitionDuration: v,
2746
+ TransitionProps: I,
2747
+ variant: O
2748
+ }, L = rn(R), N = i && !c && m, k = l.useRef(null), j = (E, F) => {
2749
+ k.current && k.current.adjustStyleForScrollbar(E, {
2750
+ direction: b ? "rtl" : "ltr"
2751
+ }), x && x(E, F);
2752
+ }, P = (E) => {
2753
+ E.key === "Tab" && (E.preventDefault(), u && u(E, "tabKeyDown"));
2754
+ };
2755
+ let B = -1;
2756
+ l.Children.map(d, (E, F) => {
2757
+ /* @__PURE__ */ l.isValidElement(E) && (process.env.NODE_ENV !== "production" && bo.isFragment(E) && console.error(["MUI: The Menu component doesn't accept a Fragment as a child.", "Consider providing an array instead."].join(`
2758
+ `)), E.props.disabled || (O === "selectedMenu" && E.props.selected || B === -1) && (B = F));
2759
+ });
2760
+ const z = p.paper ?? an, U = h.paper ?? C, W = Eo({
2761
+ elementType: p.root,
2762
+ externalSlotProps: h.root,
2763
+ ownerState: R,
2764
+ className: [L.root, a]
2765
+ }), g = Eo({
2766
+ elementType: z,
2767
+ externalSlotProps: U,
2768
+ ownerState: R,
2769
+ className: L.paper
2770
+ });
2771
+ return /* @__PURE__ */ y(sn, {
2772
+ onClose: u,
2773
+ anchorOrigin: {
2774
+ vertical: "bottom",
2775
+ horizontal: b ? "right" : "left"
2776
+ },
2777
+ transformOrigin: b ? tn : nn,
2778
+ slots: {
2779
+ paper: z,
2780
+ root: p.root
2781
+ },
2782
+ slotProps: {
2783
+ root: W,
2784
+ paper: g
2785
+ },
2786
+ open: m,
2787
+ ref: n,
2788
+ transitionDuration: v,
2789
+ TransitionProps: {
2790
+ onEntering: j,
2791
+ ...I
2792
+ },
2793
+ ownerState: R,
2794
+ ...s,
2795
+ classes: S,
2796
+ children: /* @__PURE__ */ y(ln, {
2797
+ onKeyDown: P,
2798
+ actions: k,
2799
+ autoFocus: i && (B === -1 || c),
2800
+ autoFocusItem: N,
2801
+ variant: O,
2802
+ ...f,
2803
+ className: Y(L.list, f.className),
2804
+ children: d
2805
+ })
2806
+ });
2807
+ });
2808
+ process.env.NODE_ENV !== "production" && (Qo.propTypes = {
2809
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
2810
+ // │ These PropTypes are generated from the TypeScript type definitions. │
2811
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
2812
+ // └─────────────────────────────────────────────────────────────────────┘
2813
+ /**
2814
+ * An HTML element, or a function that returns one.
2815
+ * It's used to set the position of the menu.
2816
+ */
2817
+ anchorEl: e.oneOfType([vt, e.func]),
2818
+ /**
2819
+ * If `true` (Default) will focus the `[role="menu"]` if no focusable child is found. Disabled
2820
+ * children are not focusable. If you set this prop to `false` focus will be placed
2821
+ * on the parent modal container. This has severe accessibility implications
2822
+ * and should only be considered if you manage focus otherwise.
2823
+ * @default true
2824
+ */
2825
+ autoFocus: e.bool,
2826
+ /**
2827
+ * Menu contents, normally `MenuItem`s.
2828
+ */
2829
+ children: e.node,
2830
+ /**
2831
+ * Override or extend the styles applied to the component.
2832
+ */
2833
+ classes: e.object,
2834
+ /**
2835
+ * @ignore
2836
+ */
2837
+ className: e.string,
2838
+ /**
2839
+ * When opening the menu will not focus the active item but the `[role="menu"]`
2840
+ * unless `autoFocus` is also set to `false`. Not using the default means not
2841
+ * following WAI-ARIA authoring practices. Please be considerate about possible
2842
+ * accessibility implications.
2843
+ * @default false
2844
+ */
2845
+ disableAutoFocusItem: e.bool,
2846
+ /**
2847
+ * Props applied to the [`MenuList`](https://mui.com/material-ui/api/menu-list/) element.
2848
+ * @default {}
2849
+ */
2850
+ MenuListProps: e.object,
2851
+ /**
2852
+ * Callback fired when the component requests to be closed.
2853
+ *
2854
+ * @param {object} event The event source of the callback.
2855
+ * @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`, `"tabKeyDown"`.
2856
+ */
2857
+ onClose: e.func,
2858
+ /**
2859
+ * If `true`, the component is shown.
2860
+ */
2861
+ open: e.bool.isRequired,
2862
+ /**
2863
+ * @ignore
2864
+ */
2865
+ PaperProps: e.object,
2866
+ /**
2867
+ * `classes` prop applied to the [`Popover`](https://mui.com/material-ui/api/popover/) element.
2868
+ */
2869
+ PopoverClasses: e.object,
2870
+ /**
2871
+ * The props used for each slot inside.
2872
+ * @default {}
2873
+ */
2874
+ slotProps: e.shape({
2875
+ paper: e.oneOfType([e.func, e.object]),
2876
+ root: e.oneOfType([e.func, e.object])
2877
+ }),
2878
+ /**
2879
+ * The components used for each slot inside.
2880
+ * @default {}
2881
+ */
2882
+ slots: e.shape({
2883
+ paper: e.elementType,
2884
+ root: e.elementType
2885
+ }),
2886
+ /**
2887
+ * The system prop that allows defining system overrides as well as additional CSS styles.
2888
+ */
2889
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
2890
+ /**
2891
+ * The length of the transition in `ms`, or 'auto'
2892
+ * @default 'auto'
2893
+ */
2894
+ transitionDuration: e.oneOfType([e.oneOf(["auto"]), e.number, e.shape({
2895
+ appear: e.number,
2896
+ enter: e.number,
2897
+ exit: e.number
2898
+ })]),
2899
+ /**
2900
+ * Props applied to the transition element.
2901
+ * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
2902
+ * @default {}
2903
+ */
2904
+ TransitionProps: e.object,
2905
+ /**
2906
+ * The variant to use. Use `menu` to prevent selected items from impacting the initial focus.
2907
+ * @default 'selectedMenu'
2908
+ */
2909
+ variant: e.oneOf(["menu", "selectedMenu"])
2910
+ });
2911
+ function cn(o) {
2912
+ return Z("MuiMenuItem", o);
2913
+ }
2914
+ const De = G("MuiMenuItem", ["root", "focusVisible", "dense", "disabled", "divider", "gutters", "selected"]), dn = (o, t) => {
2915
+ const {
2916
+ ownerState: n
2917
+ } = o;
2918
+ return [t.root, n.dense && t.dense, n.divider && t.divider, !n.disableGutters && t.gutters];
2919
+ }, un = (o) => {
2920
+ const {
2921
+ disabled: t,
2922
+ dense: n,
2923
+ divider: r,
2924
+ disableGutters: i,
2925
+ selected: d,
2926
+ classes: a
2927
+ } = o, f = J({
2928
+ root: ["root", n && "dense", t && "disabled", !i && "gutters", r && "divider", d && "selected"]
2929
+ }, cn, a);
2930
+ return {
2931
+ ...a,
2932
+ ...f
2933
+ };
2934
+ }, pn = M(ut, {
2935
+ shouldForwardProp: (o) => ne(o) || o === "classes",
2936
+ name: "MuiMenuItem",
2937
+ slot: "Root",
2938
+ overridesResolver: dn
2939
+ })(_(({
2940
+ theme: o
2941
+ }) => ({
2942
+ ...o.typography.body1,
2943
+ display: "flex",
2944
+ justifyContent: "flex-start",
2945
+ alignItems: "center",
2946
+ position: "relative",
2947
+ textDecoration: "none",
2948
+ minHeight: 48,
2949
+ paddingTop: 6,
2950
+ paddingBottom: 6,
2951
+ boxSizing: "border-box",
2952
+ whiteSpace: "nowrap",
2953
+ "&:hover": {
2954
+ textDecoration: "none",
2955
+ backgroundColor: (o.vars || o).palette.action.hover,
2956
+ // Reset on touch devices, it doesn't add specificity
2957
+ "@media (hover: none)": {
2958
+ backgroundColor: "transparent"
2959
+ }
2960
+ },
2961
+ [`&.${De.selected}`]: {
2962
+ backgroundColor: o.vars ? `rgba(${o.vars.palette.primary.mainChannel} / ${o.vars.palette.action.selectedOpacity})` : _e(o.palette.primary.main, o.palette.action.selectedOpacity),
2963
+ [`&.${De.focusVisible}`]: {
2964
+ backgroundColor: o.vars ? `rgba(${o.vars.palette.primary.mainChannel} / calc(${o.vars.palette.action.selectedOpacity} + ${o.vars.palette.action.focusOpacity}))` : _e(o.palette.primary.main, o.palette.action.selectedOpacity + o.palette.action.focusOpacity)
2965
+ }
2966
+ },
2967
+ [`&.${De.selected}:hover`]: {
2968
+ backgroundColor: o.vars ? `rgba(${o.vars.palette.primary.mainChannel} / calc(${o.vars.palette.action.selectedOpacity} + ${o.vars.palette.action.hoverOpacity}))` : _e(o.palette.primary.main, o.palette.action.selectedOpacity + o.palette.action.hoverOpacity),
2969
+ // Reset on touch devices, it doesn't add specificity
2970
+ "@media (hover: none)": {
2971
+ backgroundColor: o.vars ? `rgba(${o.vars.palette.primary.mainChannel} / ${o.vars.palette.action.selectedOpacity})` : _e(o.palette.primary.main, o.palette.action.selectedOpacity)
2972
+ }
2973
+ },
2974
+ [`&.${De.focusVisible}`]: {
2975
+ backgroundColor: (o.vars || o).palette.action.focus
2976
+ },
2977
+ [`&.${De.disabled}`]: {
2978
+ opacity: (o.vars || o).palette.action.disabledOpacity
2979
+ },
2980
+ [`& + .${No.root}`]: {
2981
+ marginTop: o.spacing(1),
2982
+ marginBottom: o.spacing(1)
2983
+ },
2984
+ [`& + .${No.inset}`]: {
2985
+ marginLeft: 52
2986
+ },
2987
+ [`& .${Ao.root}`]: {
2988
+ marginTop: 0,
2989
+ marginBottom: 0
2990
+ },
2991
+ [`& .${Ao.inset}`]: {
2992
+ paddingLeft: 36
2993
+ },
2994
+ [`& .${Do.root}`]: {
2995
+ minWidth: 36
2996
+ },
2997
+ variants: [{
2998
+ props: ({
2999
+ ownerState: t
3000
+ }) => !t.disableGutters,
3001
+ style: {
3002
+ paddingLeft: 16,
3003
+ paddingRight: 16
3004
+ }
3005
+ }, {
3006
+ props: ({
3007
+ ownerState: t
3008
+ }) => t.divider,
3009
+ style: {
3010
+ borderBottom: `1px solid ${(o.vars || o).palette.divider}`,
3011
+ backgroundClip: "padding-box"
3012
+ }
3013
+ }, {
3014
+ props: ({
3015
+ ownerState: t
3016
+ }) => !t.dense,
3017
+ style: {
3018
+ [o.breakpoints.up("sm")]: {
3019
+ minHeight: "auto"
3020
+ }
3021
+ }
3022
+ }, {
3023
+ props: ({
3024
+ ownerState: t
3025
+ }) => t.dense,
3026
+ style: {
3027
+ minHeight: 32,
3028
+ // https://m2.material.io/components/menus#specs > Dense
3029
+ paddingTop: 4,
3030
+ paddingBottom: 4,
3031
+ ...o.typography.body2,
3032
+ [`& .${Do.root} svg`]: {
3033
+ fontSize: "1.25rem"
3034
+ }
3035
+ }
3036
+ }]
3037
+ }))), et = /* @__PURE__ */ l.forwardRef(function(t, n) {
3038
+ const r = ee({
3039
+ props: t,
3040
+ name: "MuiMenuItem"
3041
+ }), {
3042
+ autoFocus: i = !1,
3043
+ component: d = "li",
3044
+ dense: a = !1,
3045
+ divider: c = !1,
3046
+ disableGutters: f = !1,
3047
+ focusVisibleClassName: u,
3048
+ role: m = "menuitem",
3049
+ tabIndex: C,
3050
+ className: S,
3051
+ ...v
3052
+ } = r, x = l.useContext(Mo), I = l.useMemo(() => ({
3053
+ dense: a || x.dense || !1,
3054
+ disableGutters: f
3055
+ }), [x.dense, a, f]), O = l.useRef(null);
3056
+ Be(() => {
3057
+ i && (O.current ? O.current.focus() : process.env.NODE_ENV !== "production" && console.error("MUI: Unable to set focus to a MenuItem whose component has not been rendered."));
3058
+ }, [i]);
3059
+ const p = {
3060
+ ...r,
3061
+ dense: I.dense,
3062
+ divider: c,
3063
+ disableGutters: f
3064
+ }, h = un(r), s = Te(O, n);
3065
+ let b;
3066
+ return r.disabled || (b = C !== void 0 ? C : -1), /* @__PURE__ */ y(Mo.Provider, {
3067
+ value: I,
3068
+ children: /* @__PURE__ */ y(pn, {
3069
+ ref: s,
3070
+ role: m,
3071
+ tabIndex: b,
3072
+ component: d,
3073
+ focusVisibleClassName: Y(h.focusVisible, u),
3074
+ className: Y(h.root, S),
3075
+ ...v,
3076
+ ownerState: p,
3077
+ classes: h
3078
+ })
3079
+ });
3080
+ });
3081
+ process.env.NODE_ENV !== "production" && (et.propTypes = {
3082
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
3083
+ // │ These PropTypes are generated from the TypeScript type definitions. │
3084
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
3085
+ // └─────────────────────────────────────────────────────────────────────┘
3086
+ /**
3087
+ * If `true`, the list item is focused during the first mount.
3088
+ * Focus will also be triggered if the value changes from false to true.
3089
+ * @default false
3090
+ */
3091
+ autoFocus: e.bool,
3092
+ /**
3093
+ * The content of the component.
3094
+ */
3095
+ children: e.node,
3096
+ /**
3097
+ * Override or extend the styles applied to the component.
3098
+ */
3099
+ classes: e.object,
3100
+ /**
3101
+ * @ignore
3102
+ */
3103
+ className: e.string,
3104
+ /**
3105
+ * The component used for the root node.
3106
+ * Either a string to use a HTML element or a component.
3107
+ */
3108
+ component: e.elementType,
3109
+ /**
3110
+ * If `true`, compact vertical padding designed for keyboard and mouse input is used.
3111
+ * The prop defaults to the value inherited from the parent Menu component.
3112
+ * @default false
3113
+ */
3114
+ dense: e.bool,
3115
+ /**
3116
+ * @ignore
3117
+ */
3118
+ disabled: e.bool,
3119
+ /**
3120
+ * If `true`, the left and right padding is removed.
3121
+ * @default false
3122
+ */
3123
+ disableGutters: e.bool,
3124
+ /**
3125
+ * If `true`, a 1px light border is added to the bottom of the menu item.
3126
+ * @default false
3127
+ */
3128
+ divider: e.bool,
3129
+ /**
3130
+ * This prop can help identify which element has keyboard focus.
3131
+ * The class name will be applied when the element gains the focus through keyboard interaction.
3132
+ * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
3133
+ * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
3134
+ * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
3135
+ * if needed.
3136
+ */
3137
+ focusVisibleClassName: e.string,
3138
+ /**
3139
+ * @ignore
3140
+ */
3141
+ role: e.string,
3142
+ /**
3143
+ * If `true`, the component is selected.
3144
+ * @default false
3145
+ */
3146
+ selected: e.bool,
3147
+ /**
3148
+ * The system prop that allows defining system overrides as well as additional CSS styles.
3149
+ */
3150
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
3151
+ /**
3152
+ * @default 0
3153
+ */
3154
+ tabIndex: e.number
3155
+ });
3156
+ function fn(o) {
3157
+ return Z("MuiNativeSelect", o);
3158
+ }
3159
+ const ho = G("MuiNativeSelect", ["root", "select", "multiple", "filled", "outlined", "standard", "disabled", "icon", "iconOpen", "iconFilled", "iconOutlined", "iconStandard", "nativeInput", "error"]), mn = (o) => {
3160
+ const {
3161
+ classes: t,
3162
+ variant: n,
3163
+ disabled: r,
3164
+ multiple: i,
3165
+ open: d,
3166
+ error: a
3167
+ } = o, c = {
3168
+ select: ["select", n, r && "disabled", i && "multiple", a && "error"],
3169
+ icon: ["icon", `icon${H(n)}`, d && "iconOpen", r && "disabled"]
3170
+ };
3171
+ return J(c, fn, t);
3172
+ }, ot = M("select")(({
3173
+ theme: o
3174
+ }) => ({
3175
+ // Reset
3176
+ MozAppearance: "none",
3177
+ // Reset
3178
+ WebkitAppearance: "none",
3179
+ // When interacting quickly, the text can end up selected.
3180
+ // Native select can't be selected either.
3181
+ userSelect: "none",
3182
+ // Reset
3183
+ borderRadius: 0,
3184
+ cursor: "pointer",
3185
+ "&:focus": {
3186
+ // Reset Chrome style
3187
+ borderRadius: 0
3188
+ },
3189
+ [`&.${ho.disabled}`]: {
3190
+ cursor: "default"
3191
+ },
3192
+ "&[multiple]": {
3193
+ height: "auto"
3194
+ },
3195
+ "&:not([multiple]) option, &:not([multiple]) optgroup": {
3196
+ backgroundColor: (o.vars || o).palette.background.paper
3197
+ },
3198
+ variants: [{
3199
+ props: ({
3200
+ ownerState: t
3201
+ }) => t.variant !== "filled" && t.variant !== "outlined",
3202
+ style: {
3203
+ // Bump specificity to allow extending custom inputs
3204
+ "&&&": {
3205
+ paddingRight: 24,
3206
+ minWidth: 16
3207
+ // So it doesn't collapse.
3208
+ }
3209
+ }
3210
+ }, {
3211
+ props: {
3212
+ variant: "filled"
3213
+ },
3214
+ style: {
3215
+ "&&&": {
3216
+ paddingRight: 32
3217
+ }
3218
+ }
3219
+ }, {
3220
+ props: {
3221
+ variant: "outlined"
3222
+ },
3223
+ style: {
3224
+ borderRadius: (o.vars || o).shape.borderRadius,
3225
+ "&:focus": {
3226
+ borderRadius: (o.vars || o).shape.borderRadius
3227
+ // Reset the reset for Chrome style
3228
+ },
3229
+ "&&&": {
3230
+ paddingRight: 32
3231
+ }
3232
+ }
3233
+ }]
3234
+ })), bn = M(ot, {
3235
+ name: "MuiNativeSelect",
3236
+ slot: "Select",
3237
+ shouldForwardProp: ne,
3238
+ overridesResolver: (o, t) => {
3239
+ const {
3240
+ ownerState: n
3241
+ } = o;
3242
+ return [t.select, t[n.variant], n.error && t.error, {
3243
+ [`&.${ho.multiple}`]: t.multiple
3244
+ }];
3245
+ }
3246
+ })({}), tt = M("svg")(({
3247
+ theme: o
3248
+ }) => ({
3249
+ // We use a position absolute over a flexbox in order to forward the pointer events
3250
+ // to the input and to support wrapping tags..
3251
+ position: "absolute",
3252
+ right: 0,
3253
+ // Center vertically, height is 1em
3254
+ top: "calc(50% - .5em)",
3255
+ // Don't block pointer events on the select under the icon.
3256
+ pointerEvents: "none",
3257
+ color: (o.vars || o).palette.action.active,
3258
+ [`&.${ho.disabled}`]: {
3259
+ color: (o.vars || o).palette.action.disabled
3260
+ },
3261
+ variants: [{
3262
+ props: ({
3263
+ ownerState: t
3264
+ }) => t.open,
3265
+ style: {
3266
+ transform: "rotate(180deg)"
3267
+ }
3268
+ }, {
3269
+ props: {
3270
+ variant: "filled"
3271
+ },
3272
+ style: {
3273
+ right: 7
3274
+ }
3275
+ }, {
3276
+ props: {
3277
+ variant: "outlined"
3278
+ },
3279
+ style: {
3280
+ right: 7
3281
+ }
3282
+ }]
3283
+ })), yn = M(tt, {
3284
+ name: "MuiNativeSelect",
3285
+ slot: "Icon",
3286
+ overridesResolver: (o, t) => {
3287
+ const {
3288
+ ownerState: n
3289
+ } = o;
3290
+ return [t.icon, n.variant && t[`icon${H(n.variant)}`], n.open && t.iconOpen];
3291
+ }
3292
+ })({}), nt = /* @__PURE__ */ l.forwardRef(function(t, n) {
3293
+ const {
3294
+ className: r,
3295
+ disabled: i,
3296
+ error: d,
3297
+ IconComponent: a,
3298
+ inputRef: c,
3299
+ variant: f = "standard",
3300
+ ...u
3301
+ } = t, m = {
3302
+ ...t,
3303
+ disabled: i,
3304
+ variant: f,
3305
+ error: d
3306
+ }, C = mn(m);
3307
+ return /* @__PURE__ */ q(l.Fragment, {
3308
+ children: [/* @__PURE__ */ y(bn, {
3309
+ ownerState: m,
3310
+ className: Y(C.select, r),
3311
+ disabled: i,
3312
+ ref: c || n,
3313
+ ...u
3314
+ }), t.multiple ? null : /* @__PURE__ */ y(yn, {
3315
+ as: a,
3316
+ ownerState: m,
3317
+ className: C.icon
3318
+ })]
3319
+ });
3320
+ });
3321
+ process.env.NODE_ENV !== "production" && (nt.propTypes = {
3322
+ /**
3323
+ * The option elements to populate the select with.
3324
+ * Can be some `<option>` elements.
3325
+ */
3326
+ children: e.node,
3327
+ /**
3328
+ * Override or extend the styles applied to the component.
3329
+ */
3330
+ classes: e.object,
3331
+ /**
3332
+ * The CSS class name of the select element.
3333
+ */
3334
+ className: e.string,
3335
+ /**
3336
+ * If `true`, the select is disabled.
3337
+ */
3338
+ disabled: e.bool,
3339
+ /**
3340
+ * If `true`, the `select input` will indicate an error.
3341
+ */
3342
+ error: e.bool,
3343
+ /**
3344
+ * The icon that displays the arrow.
3345
+ */
3346
+ IconComponent: e.elementType.isRequired,
3347
+ /**
3348
+ * Use that prop to pass a ref to the native select element.
3349
+ * @deprecated
3350
+ */
3351
+ inputRef: ke,
3352
+ /**
3353
+ * @ignore
3354
+ */
3355
+ multiple: e.bool,
3356
+ /**
3357
+ * Name attribute of the `select` or hidden `input` element.
3358
+ */
3359
+ name: e.string,
3360
+ /**
3361
+ * Callback fired when a menu item is selected.
3362
+ *
3363
+ * @param {object} event The event source of the callback.
3364
+ * You can pull out the new value by accessing `event.target.value` (string).
3365
+ */
3366
+ onChange: e.func,
3367
+ /**
3368
+ * The input value.
3369
+ */
3370
+ value: e.any,
3371
+ /**
3372
+ * The variant to use.
3373
+ */
3374
+ variant: e.oneOf(["standard", "outlined", "filled"])
3375
+ });
3376
+ var Bo;
3377
+ const gn = M("fieldset", {
3378
+ shouldForwardProp: ne
3379
+ })({
3380
+ textAlign: "left",
3381
+ position: "absolute",
3382
+ bottom: 0,
3383
+ right: 0,
3384
+ top: -5,
3385
+ left: 0,
3386
+ margin: 0,
3387
+ padding: "0 8px",
3388
+ pointerEvents: "none",
3389
+ borderRadius: "inherit",
3390
+ borderStyle: "solid",
3391
+ borderWidth: 1,
3392
+ overflow: "hidden",
3393
+ minWidth: "0%"
3394
+ }), hn = M("legend", {
3395
+ shouldForwardProp: ne
3396
+ })(_(({
3397
+ theme: o
3398
+ }) => ({
3399
+ float: "unset",
3400
+ // Fix conflict with bootstrap
3401
+ width: "auto",
3402
+ // Fix conflict with bootstrap
3403
+ overflow: "hidden",
3404
+ // Fix Horizontal scroll when label too long
3405
+ variants: [{
3406
+ props: ({
3407
+ ownerState: t
3408
+ }) => !t.withLabel,
3409
+ style: {
3410
+ padding: 0,
3411
+ lineHeight: "11px",
3412
+ // sync with `height` in `legend` styles
3413
+ transition: o.transitions.create("width", {
3414
+ duration: 150,
3415
+ easing: o.transitions.easing.easeOut
3416
+ })
3417
+ }
3418
+ }, {
3419
+ props: ({
3420
+ ownerState: t
3421
+ }) => t.withLabel,
3422
+ style: {
3423
+ display: "block",
3424
+ // Fix conflict with normalize.css and sanitize.css
3425
+ padding: 0,
3426
+ height: 11,
3427
+ // sync with `lineHeight` in `legend` styles
3428
+ fontSize: "0.75em",
3429
+ visibility: "hidden",
3430
+ maxWidth: 0.01,
3431
+ transition: o.transitions.create("max-width", {
3432
+ duration: 50,
3433
+ easing: o.transitions.easing.easeOut
3434
+ }),
3435
+ whiteSpace: "nowrap",
3436
+ "& > span": {
3437
+ paddingLeft: 5,
3438
+ paddingRight: 5,
3439
+ display: "inline-block",
3440
+ opacity: 0,
3441
+ visibility: "visible"
3442
+ }
3443
+ }
3444
+ }, {
3445
+ props: ({
3446
+ ownerState: t
3447
+ }) => t.withLabel && t.notched,
3448
+ style: {
3449
+ maxWidth: "100%",
3450
+ transition: o.transitions.create("max-width", {
3451
+ duration: 100,
3452
+ easing: o.transitions.easing.easeOut,
3453
+ delay: 50
3454
+ })
3455
+ }
3456
+ }]
3457
+ })));
3458
+ function rt(o) {
3459
+ const {
3460
+ children: t,
3461
+ classes: n,
3462
+ className: r,
3463
+ label: i,
3464
+ notched: d,
3465
+ ...a
3466
+ } = o, c = i != null && i !== "", f = {
3467
+ ...o,
3468
+ notched: d,
3469
+ withLabel: c
3470
+ };
3471
+ return /* @__PURE__ */ y(gn, {
3472
+ "aria-hidden": !0,
3473
+ className: r,
3474
+ ownerState: f,
3475
+ ...a,
3476
+ children: /* @__PURE__ */ y(hn, {
3477
+ ownerState: f,
3478
+ children: c ? /* @__PURE__ */ y("span", {
3479
+ children: i
3480
+ }) : (
3481
+ // notranslate needed while Google Translate will not fix zero-width space issue
3482
+ Bo || (Bo = /* @__PURE__ */ y("span", {
3483
+ className: "notranslate",
3484
+ "aria-hidden": !0,
3485
+ children: "​"
3486
+ }))
3487
+ )
3488
+ })
3489
+ });
3490
+ }
3491
+ process.env.NODE_ENV !== "production" && (rt.propTypes = {
3492
+ /**
3493
+ * The content of the component.
3494
+ */
3495
+ children: e.node,
3496
+ /**
3497
+ * Override or extend the styles applied to the component.
3498
+ */
3499
+ classes: e.object,
3500
+ /**
3501
+ * @ignore
3502
+ */
3503
+ className: e.string,
3504
+ /**
3505
+ * The label.
3506
+ */
3507
+ label: e.node,
3508
+ /**
3509
+ * If `true`, the outline is notched to accommodate the label.
3510
+ */
3511
+ notched: e.bool.isRequired,
3512
+ /**
3513
+ * @ignore
3514
+ */
3515
+ style: e.object
3516
+ });
3517
+ const vn = (o) => {
3518
+ const {
3519
+ classes: t
3520
+ } = o, r = J({
3521
+ root: ["root"],
3522
+ notchedOutline: ["notchedOutline"],
3523
+ input: ["input"]
3524
+ }, Mt, t);
3525
+ return {
3526
+ ...t,
3527
+ // forward classes to the InputBase
3528
+ ...r
3529
+ };
3530
+ }, Cn = M(Qe, {
3531
+ shouldForwardProp: (o) => ne(o) || o === "classes",
3532
+ name: "MuiOutlinedInput",
3533
+ slot: "Root",
3534
+ overridesResolver: Ze
3535
+ })(_(({
3536
+ theme: o
3537
+ }) => {
3538
+ const t = o.palette.mode === "light" ? "rgba(0, 0, 0, 0.23)" : "rgba(255, 255, 255, 0.23)";
3539
+ return {
3540
+ position: "relative",
3541
+ borderRadius: (o.vars || o).shape.borderRadius,
3542
+ [`&:hover .${te.notchedOutline}`]: {
3543
+ borderColor: (o.vars || o).palette.text.primary
3544
+ },
3545
+ // Reset on touch devices, it doesn't add specificity
3546
+ "@media (hover: none)": {
3547
+ [`&:hover .${te.notchedOutline}`]: {
3548
+ borderColor: o.vars ? `rgba(${o.vars.palette.common.onBackgroundChannel} / 0.23)` : t
3549
+ }
3550
+ },
3551
+ [`&.${te.focused} .${te.notchedOutline}`]: {
3552
+ borderWidth: 2
3553
+ },
3554
+ variants: [...Object.entries(o.palette).filter(ze()).map(([n]) => ({
3555
+ props: {
3556
+ color: n
3557
+ },
3558
+ style: {
3559
+ [`&.${te.focused} .${te.notchedOutline}`]: {
3560
+ borderColor: (o.vars || o).palette[n].main
3561
+ }
3562
+ }
3563
+ })), {
3564
+ props: {},
3565
+ // to overide the above style
3566
+ style: {
3567
+ [`&.${te.error} .${te.notchedOutline}`]: {
3568
+ borderColor: (o.vars || o).palette.error.main
3569
+ },
3570
+ [`&.${te.disabled} .${te.notchedOutline}`]: {
3571
+ borderColor: (o.vars || o).palette.action.disabled
3572
+ }
3573
+ }
3574
+ }, {
3575
+ props: ({
3576
+ ownerState: n
3577
+ }) => n.startAdornment,
3578
+ style: {
3579
+ paddingLeft: 14
3580
+ }
3581
+ }, {
3582
+ props: ({
3583
+ ownerState: n
3584
+ }) => n.endAdornment,
3585
+ style: {
3586
+ paddingRight: 14
3587
+ }
3588
+ }, {
3589
+ props: ({
3590
+ ownerState: n
3591
+ }) => n.multiline,
3592
+ style: {
3593
+ padding: "16.5px 14px"
3594
+ }
3595
+ }, {
3596
+ props: ({
3597
+ ownerState: n,
3598
+ size: r
3599
+ }) => n.multiline && r === "small",
3600
+ style: {
3601
+ padding: "8.5px 14px"
3602
+ }
3603
+ }]
3604
+ };
3605
+ })), Sn = M(rt, {
3606
+ name: "MuiOutlinedInput",
3607
+ slot: "NotchedOutline",
3608
+ overridesResolver: (o, t) => t.notchedOutline
3609
+ })(_(({
3610
+ theme: o
3611
+ }) => {
3612
+ const t = o.palette.mode === "light" ? "rgba(0, 0, 0, 0.23)" : "rgba(255, 255, 255, 0.23)";
3613
+ return {
3614
+ borderColor: o.vars ? `rgba(${o.vars.palette.common.onBackgroundChannel} / 0.23)` : t
3615
+ };
3616
+ })), wn = M(eo, {
3617
+ name: "MuiOutlinedInput",
3618
+ slot: "Input",
3619
+ overridesResolver: Je
3620
+ })(_(({
3621
+ theme: o
3622
+ }) => ({
3623
+ padding: "16.5px 14px",
3624
+ ...!o.vars && {
3625
+ "&:-webkit-autofill": {
3626
+ WebkitBoxShadow: o.palette.mode === "light" ? null : "0 0 0 100px #266798 inset",
3627
+ WebkitTextFillColor: o.palette.mode === "light" ? null : "#fff",
3628
+ caretColor: o.palette.mode === "light" ? null : "#fff",
3629
+ borderRadius: "inherit"
3630
+ }
3631
+ },
3632
+ ...o.vars && {
3633
+ "&:-webkit-autofill": {
3634
+ borderRadius: "inherit"
3635
+ },
3636
+ [o.getColorSchemeSelector("dark")]: {
3637
+ "&:-webkit-autofill": {
3638
+ WebkitBoxShadow: "0 0 0 100px #266798 inset",
3639
+ WebkitTextFillColor: "#fff",
3640
+ caretColor: "#fff"
3641
+ }
3642
+ }
3643
+ },
3644
+ variants: [{
3645
+ props: {
3646
+ size: "small"
3647
+ },
3648
+ style: {
3649
+ padding: "8.5px 14px"
3650
+ }
3651
+ }, {
3652
+ props: ({
3653
+ ownerState: t
3654
+ }) => t.multiline,
3655
+ style: {
3656
+ padding: 0
3657
+ }
3658
+ }, {
3659
+ props: ({
3660
+ ownerState: t
3661
+ }) => t.startAdornment,
3662
+ style: {
3663
+ paddingLeft: 0
3664
+ }
3665
+ }, {
3666
+ props: ({
3667
+ ownerState: t
3668
+ }) => t.endAdornment,
3669
+ style: {
3670
+ paddingRight: 0
3671
+ }
3672
+ }]
3673
+ }))), vo = /* @__PURE__ */ l.forwardRef(function(t, n) {
3674
+ var r;
3675
+ const i = ee({
3676
+ props: t,
3677
+ name: "MuiOutlinedInput"
3678
+ }), {
3679
+ components: d = {},
3680
+ fullWidth: a = !1,
3681
+ inputComponent: c = "input",
3682
+ label: f,
3683
+ multiline: u = !1,
3684
+ notched: m,
3685
+ slots: C = {},
3686
+ type: S = "text",
3687
+ ...v
3688
+ } = i, x = vn(i), I = We(), O = Ue({
3689
+ props: i,
3690
+ muiFormControl: I,
3691
+ states: ["color", "disabled", "error", "focused", "hiddenLabel", "size", "required"]
3692
+ }), p = {
3693
+ ...i,
3694
+ color: O.color || "primary",
3695
+ disabled: O.disabled,
3696
+ error: O.error,
3697
+ focused: O.focused,
3698
+ formControl: I,
3699
+ fullWidth: a,
3700
+ hiddenLabel: O.hiddenLabel,
3701
+ multiline: u,
3702
+ size: O.size,
3703
+ type: S
3704
+ }, h = C.root ?? d.Root ?? Cn, s = C.input ?? d.Input ?? wn;
3705
+ return /* @__PURE__ */ y(oo, {
3706
+ slots: {
3707
+ root: h,
3708
+ input: s
3709
+ },
3710
+ renderSuffix: (b) => /* @__PURE__ */ y(Sn, {
3711
+ ownerState: p,
3712
+ className: x.notchedOutline,
3713
+ label: f != null && f !== "" && O.required ? r || (r = /* @__PURE__ */ q(l.Fragment, {
3714
+ children: [f, " ", "*"]
3715
+ })) : f,
3716
+ notched: typeof m < "u" ? m : !!(b.startAdornment || b.filled || b.focused)
3717
+ }),
3718
+ fullWidth: a,
3719
+ inputComponent: c,
3720
+ multiline: u,
3721
+ ref: n,
3722
+ type: S,
3723
+ ...v,
3724
+ classes: {
3725
+ ...x,
3726
+ notchedOutline: null
3727
+ }
3728
+ });
3729
+ });
3730
+ process.env.NODE_ENV !== "production" && (vo.propTypes = {
3731
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
3732
+ // │ These PropTypes are generated from the TypeScript type definitions. │
3733
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
3734
+ // └─────────────────────────────────────────────────────────────────────┘
3735
+ /**
3736
+ * This prop helps users to fill forms faster, especially on mobile devices.
3737
+ * The name can be confusing, as it's more like an autofill.
3738
+ * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).
3739
+ */
3740
+ autoComplete: e.string,
3741
+ /**
3742
+ * If `true`, the `input` element is focused during the first mount.
3743
+ */
3744
+ autoFocus: e.bool,
3745
+ /**
3746
+ * Override or extend the styles applied to the component.
3747
+ */
3748
+ classes: e.object,
3749
+ /**
3750
+ * The color of the component.
3751
+ * It supports both default and custom theme colors, which can be added as shown in the
3752
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
3753
+ * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.
3754
+ */
3755
+ color: e.oneOfType([e.oneOf(["primary", "secondary"]), e.string]),
3756
+ /**
3757
+ * The components used for each slot inside.
3758
+ *
3759
+ * @deprecated use the `slots` 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.
3760
+ *
3761
+ * @default {}
3762
+ */
3763
+ components: e.shape({
3764
+ Input: e.elementType,
3765
+ Root: e.elementType
3766
+ }),
3767
+ /**
3768
+ * The default value. Use when the component is not controlled.
3769
+ */
3770
+ defaultValue: e.any,
3771
+ /**
3772
+ * If `true`, the component is disabled.
3773
+ * The prop defaults to the value (`false`) inherited from the parent FormControl component.
3774
+ */
3775
+ disabled: e.bool,
3776
+ /**
3777
+ * End `InputAdornment` for this component.
3778
+ */
3779
+ endAdornment: e.node,
3780
+ /**
3781
+ * If `true`, the `input` will indicate an error.
3782
+ * The prop defaults to the value (`false`) inherited from the parent FormControl component.
3783
+ */
3784
+ error: e.bool,
3785
+ /**
3786
+ * If `true`, the `input` will take up the full width of its container.
3787
+ * @default false
3788
+ */
3789
+ fullWidth: e.bool,
3790
+ /**
3791
+ * The id of the `input` element.
3792
+ */
3793
+ id: e.string,
3794
+ /**
3795
+ * The component used for the `input` element.
3796
+ * Either a string to use a HTML element or a component.
3797
+ * @default 'input'
3798
+ */
3799
+ inputComponent: e.elementType,
3800
+ /**
3801
+ * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
3802
+ * @default {}
3803
+ */
3804
+ inputProps: e.object,
3805
+ /**
3806
+ * Pass a ref to the `input` element.
3807
+ */
3808
+ inputRef: ke,
3809
+ /**
3810
+ * The label of the `input`. It is only used for layout. The actual labelling
3811
+ * is handled by `InputLabel`.
3812
+ */
3813
+ label: e.node,
3814
+ /**
3815
+ * If `dense`, will adjust vertical spacing. This is normally obtained via context from
3816
+ * FormControl.
3817
+ * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.
3818
+ */
3819
+ margin: e.oneOf(["dense", "none"]),
3820
+ /**
3821
+ * Maximum number of rows to display when multiline option is set to true.
3822
+ */
3823
+ maxRows: e.oneOfType([e.number, e.string]),
3824
+ /**
3825
+ * Minimum number of rows to display when multiline option is set to true.
3826
+ */
3827
+ minRows: e.oneOfType([e.number, e.string]),
3828
+ /**
3829
+ * If `true`, a [TextareaAutosize](https://mui.com/material-ui/react-textarea-autosize/) element is rendered.
3830
+ * @default false
3831
+ */
3832
+ multiline: e.bool,
3833
+ /**
3834
+ * Name attribute of the `input` element.
3835
+ */
3836
+ name: e.string,
3837
+ /**
3838
+ * If `true`, the outline is notched to accommodate the label.
3839
+ */
3840
+ notched: e.bool,
3841
+ /**
3842
+ * Callback fired when the value is changed.
3843
+ *
3844
+ * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.
3845
+ * You can pull out the new value by accessing `event.target.value` (string).
3846
+ */
3847
+ onChange: e.func,
3848
+ /**
3849
+ * The short hint displayed in the `input` before the user enters a value.
3850
+ */
3851
+ placeholder: e.string,
3852
+ /**
3853
+ * It prevents the user from changing the value of the field
3854
+ * (not from interacting with the field).
3855
+ */
3856
+ readOnly: e.bool,
3857
+ /**
3858
+ * If `true`, the `input` element is required.
3859
+ * The prop defaults to the value (`false`) inherited from the parent FormControl component.
3860
+ */
3861
+ required: e.bool,
3862
+ /**
3863
+ * Number of rows to display when multiline option is set to true.
3864
+ */
3865
+ rows: e.oneOfType([e.number, e.string]),
3866
+ /**
3867
+ * The components used for each slot inside.
3868
+ *
3869
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
3870
+ *
3871
+ * @default {}
3872
+ */
3873
+ slots: e.shape({
3874
+ input: e.elementType,
3875
+ root: e.elementType
3876
+ }),
3877
+ /**
3878
+ * Start `InputAdornment` for this component.
3879
+ */
3880
+ startAdornment: e.node,
3881
+ /**
3882
+ * The system prop that allows defining system overrides as well as additional CSS styles.
3883
+ */
3884
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
3885
+ /**
3886
+ * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).
3887
+ * @default 'text'
3888
+ */
3889
+ type: e.string,
3890
+ /**
3891
+ * The value of the `input` element, required for a controlled component.
3892
+ */
3893
+ value: e.any
3894
+ });
3895
+ vo.muiName = "Input";
3896
+ function On(o) {
3897
+ return Z("MuiSelect", o);
3898
+ }
3899
+ const Ae = G("MuiSelect", ["root", "select", "multiple", "filled", "outlined", "standard", "disabled", "focused", "icon", "iconOpen", "iconFilled", "iconOutlined", "iconStandard", "nativeInput", "error"]);
3900
+ var zo;
3901
+ const xn = M(ot, {
3902
+ name: "MuiSelect",
3903
+ slot: "Select",
3904
+ overridesResolver: (o, t) => {
3905
+ const {
3906
+ ownerState: n
3907
+ } = o;
3908
+ return [
3909
+ // Win specificity over the input base
3910
+ {
3911
+ [`&.${Ae.select}`]: t.select
3912
+ },
3913
+ {
3914
+ [`&.${Ae.select}`]: t[n.variant]
3915
+ },
3916
+ {
3917
+ [`&.${Ae.error}`]: t.error
3918
+ },
3919
+ {
3920
+ [`&.${Ae.multiple}`]: t.multiple
3921
+ }
3922
+ ];
3923
+ }
3924
+ })({
3925
+ // Win specificity over the input base
3926
+ [`&.${Ae.select}`]: {
3927
+ height: "auto",
3928
+ // Resets for multiple select with chips
3929
+ minHeight: "1.4375em",
3930
+ // Required for select\text-field height consistency
3931
+ textOverflow: "ellipsis",
3932
+ whiteSpace: "nowrap",
3933
+ overflow: "hidden"
3934
+ }
3935
+ }), In = M(tt, {
3936
+ name: "MuiSelect",
3937
+ slot: "Icon",
3938
+ overridesResolver: (o, t) => {
3939
+ const {
3940
+ ownerState: n
3941
+ } = o;
3942
+ return [t.icon, n.variant && t[`icon${H(n.variant)}`], n.open && t.iconOpen];
3943
+ }
3944
+ })({}), Rn = M("input", {
3945
+ shouldForwardProp: (o) => lt(o) && o !== "classes",
3946
+ name: "MuiSelect",
3947
+ slot: "NativeInput",
3948
+ overridesResolver: (o, t) => t.nativeInput
3949
+ })({
3950
+ bottom: 0,
3951
+ left: 0,
3952
+ position: "absolute",
3953
+ opacity: 0,
3954
+ pointerEvents: "none",
3955
+ width: "100%",
3956
+ boxSizing: "border-box"
3957
+ });
3958
+ function Wo(o, t) {
3959
+ return typeof t == "object" && t !== null ? o === t : String(o) === String(t);
3960
+ }
3961
+ function kn(o) {
3962
+ return o == null || typeof o == "string" && !o.trim();
3963
+ }
3964
+ const Tn = (o) => {
3965
+ const {
3966
+ classes: t,
3967
+ variant: n,
3968
+ disabled: r,
3969
+ multiple: i,
3970
+ open: d,
3971
+ error: a
3972
+ } = o, c = {
3973
+ select: ["select", n, r && "disabled", i && "multiple", a && "error"],
3974
+ icon: ["icon", `icon${H(n)}`, d && "iconOpen", r && "disabled"],
3975
+ nativeInput: ["nativeInput"]
3976
+ };
3977
+ return J(c, On, t);
3978
+ }, st = /* @__PURE__ */ l.forwardRef(function(t, n) {
3979
+ var Oo;
3980
+ const {
3981
+ "aria-describedby": r,
3982
+ "aria-label": i,
3983
+ autoFocus: d,
3984
+ autoWidth: a,
3985
+ children: c,
3986
+ className: f,
3987
+ defaultOpen: u,
3988
+ defaultValue: m,
3989
+ disabled: C,
3990
+ displayEmpty: S,
3991
+ error: v = !1,
3992
+ IconComponent: x,
3993
+ inputRef: I,
3994
+ labelId: O,
3995
+ MenuProps: p = {},
3996
+ multiple: h,
3997
+ name: s,
3998
+ onBlur: b,
3999
+ onChange: R,
4000
+ onClose: L,
4001
+ onFocus: N,
4002
+ onOpen: k,
4003
+ open: j,
4004
+ readOnly: P,
4005
+ renderValue: B,
4006
+ required: z,
4007
+ SelectDisplayProps: U = {},
4008
+ tabIndex: W,
4009
+ // catching `type` from Input which makes no sense for SelectInput
4010
+ type: g,
4011
+ value: E,
4012
+ variant: F = "standard",
4013
+ ...Q
4014
+ } = t, [$, he] = Po({
4015
+ controlled: E,
4016
+ default: m,
4017
+ name: "Select"
4018
+ }), [Me, Ve] = Po({
4019
+ controlled: j,
4020
+ default: u,
4021
+ name: "Select"
4022
+ }), ae = l.useRef(null), oe = l.useRef(null), [re, to] = l.useState(null), {
4023
+ current: ie
4024
+ } = l.useRef(j != null), [Ee, se] = l.useState(), no = Te(n, I), ro = l.useCallback((w) => {
4025
+ oe.current = w, w && to(w);
4026
+ }, []), le = re == null ? void 0 : re.parentNode;
4027
+ l.useImperativeHandle(no, () => ({
4028
+ focus: () => {
4029
+ oe.current.focus();
4030
+ },
4031
+ node: ae.current,
4032
+ value: $
4033
+ }), [$]), l.useEffect(() => {
4034
+ u && Me && re && !ie && (se(a ? null : le.clientWidth), oe.current.focus());
4035
+ }, [re, a]), l.useEffect(() => {
4036
+ d && oe.current.focus();
4037
+ }, [d]), l.useEffect(() => {
4038
+ if (!O)
4039
+ return;
4040
+ const w = _o(oe.current).getElementById(O);
4041
+ if (w) {
4042
+ const T = () => {
4043
+ getSelection().isCollapsed && oe.current.focus();
4044
+ };
4045
+ return w.addEventListener("click", T), () => {
4046
+ w.removeEventListener("click", T);
4047
+ };
4048
+ }
4049
+ }, [O]);
4050
+ const ce = (w, T) => {
4051
+ w ? k && k(T) : L && L(T), ie || (se(a ? null : le.clientWidth), Ve(w));
4052
+ }, A = (w) => {
4053
+ w.button === 0 && (w.preventDefault(), oe.current.focus(), ce(!0, w));
4054
+ }, X = (w) => {
4055
+ ce(!1, w);
4056
+ }, de = l.Children.toArray(c), Ne = (w) => {
4057
+ const T = de.find((V) => V.props.value === w.target.value);
4058
+ T !== void 0 && (he(T.props.value), R && R(w, T));
4059
+ }, fe = (w) => (T) => {
4060
+ let V;
4061
+ if (T.currentTarget.hasAttribute("tabindex")) {
4062
+ if (h) {
4063
+ V = Array.isArray($) ? $.slice() : [];
4064
+ const xe = $.indexOf(w.props.value);
4065
+ xe === -1 ? V.push(w.props.value) : V.splice(xe, 1);
4066
+ } else
4067
+ V = w.props.value;
4068
+ if (w.props.onClick && w.props.onClick(T), $ !== V && (he(V), R)) {
4069
+ const xe = T.nativeEvent || T, xo = new xe.constructor(xe.type, xe);
4070
+ Object.defineProperty(xo, "target", {
4071
+ writable: !0,
4072
+ value: {
4073
+ value: V,
4074
+ name: s
4075
+ }
4076
+ }), R(xo, w);
4077
+ }
4078
+ h || ce(!1, T);
4079
+ }
4080
+ }, so = (w) => {
4081
+ P || [
4082
+ " ",
4083
+ "ArrowUp",
4084
+ "ArrowDown",
4085
+ // The native select doesn't respond to enter on macOS, but it's recommended by
4086
+ // https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/
4087
+ "Enter"
4088
+ ].includes(w.key) && (w.preventDefault(), ce(!0, w));
4089
+ }, ve = re !== null && Me, ao = (w) => {
4090
+ !ve && b && (Object.defineProperty(w, "target", {
4091
+ writable: !0,
4092
+ value: {
4093
+ value: $,
4094
+ name: s
4095
+ }
4096
+ }), b(w));
4097
+ };
4098
+ delete Q["aria-invalid"];
4099
+ let ue, Ce;
4100
+ const K = [];
4101
+ let Se = !1, me = !1;
4102
+ (Ye({
4103
+ value: $
4104
+ }) || S) && (B ? ue = B($) : Se = !0);
4105
+ const He = de.map((w) => {
4106
+ if (!/* @__PURE__ */ l.isValidElement(w))
4107
+ return null;
4108
+ process.env.NODE_ENV !== "production" && bo.isFragment(w) && console.error(["MUI: The Select component doesn't accept a Fragment as a child.", "Consider providing an array instead."].join(`
4109
+ `));
4110
+ let T;
4111
+ if (h) {
4112
+ if (!Array.isArray($))
4113
+ throw new Error(process.env.NODE_ENV !== "production" ? "MUI: The `value` prop must be an array when using the `Select` component with `multiple`." : Uo(2));
4114
+ T = $.some((V) => Wo(V, w.props.value)), T && Se && K.push(w.props.children);
4115
+ } else
4116
+ T = Wo($, w.props.value), T && Se && (Ce = w.props.children);
4117
+ return T && (me = !0), /* @__PURE__ */ l.cloneElement(w, {
4118
+ "aria-selected": T ? "true" : "false",
4119
+ onClick: fe(w),
4120
+ onKeyUp: (V) => {
4121
+ V.key === " " && V.preventDefault(), w.props.onKeyUp && w.props.onKeyUp(V);
4122
+ },
4123
+ role: "option",
4124
+ selected: T,
4125
+ value: void 0,
4126
+ // The value is most likely not a valid HTML attribute.
4127
+ "data-value": w.props.value
4128
+ // Instead, we provide it as a data attribute.
4129
+ });
4130
+ });
4131
+ process.env.NODE_ENV !== "production" && l.useEffect(() => {
4132
+ if (!me && !h && $ !== "") {
4133
+ const w = de.map((T) => T.props.value);
4134
+ console.warn([`MUI: You have provided an out-of-range value \`${$}\` for the select ${s ? `(name="${s}") ` : ""}component.`, "Consider providing a value that matches one of the available options or ''.", `The available values are ${w.filter((T) => T != null).map((T) => `\`${T}\``).join(", ") || '""'}.`].join(`
4135
+ `));
4136
+ }
4137
+ }, [me, de, h, s, $]), Se && (h ? K.length === 0 ? ue = null : ue = K.reduce((w, T, V) => (w.push(T), V < K.length - 1 && w.push(", "), w), []) : ue = Ce);
4138
+ let Pe = Ee;
4139
+ !a && ie && re && (Pe = le.clientWidth);
4140
+ let be;
4141
+ typeof W < "u" ? be = W : be = C ? null : 0;
4142
+ const Fe = U.id || (s ? `mui-component-select-${s}` : void 0), D = {
4143
+ ...t,
4144
+ variant: F,
4145
+ value: $,
4146
+ open: ve,
4147
+ error: v
4148
+ }, we = Tn(D), Oe = {
4149
+ ...p.PaperProps,
4150
+ ...(Oo = p.slotProps) == null ? void 0 : Oo.paper
4151
+ }, wo = St();
4152
+ return /* @__PURE__ */ q(l.Fragment, {
4153
+ children: [/* @__PURE__ */ y(xn, {
4154
+ as: "div",
4155
+ ref: ro,
4156
+ tabIndex: be,
4157
+ role: "combobox",
4158
+ "aria-controls": wo,
4159
+ "aria-disabled": C ? "true" : void 0,
4160
+ "aria-expanded": ve ? "true" : "false",
4161
+ "aria-haspopup": "listbox",
4162
+ "aria-label": i,
4163
+ "aria-labelledby": [O, Fe].filter(Boolean).join(" ") || void 0,
4164
+ "aria-describedby": r,
4165
+ "aria-required": z ? "true" : void 0,
4166
+ "aria-invalid": v ? "true" : void 0,
4167
+ onKeyDown: so,
4168
+ onMouseDown: C || P ? null : A,
4169
+ onBlur: ao,
4170
+ onFocus: N,
4171
+ ...U,
4172
+ ownerState: D,
4173
+ className: Y(U.className, we.select, f),
4174
+ id: Fe,
4175
+ children: kn(ue) ? (
4176
+ // notranslate needed while Google Translate will not fix zero-width space issue
4177
+ zo || (zo = /* @__PURE__ */ y("span", {
4178
+ className: "notranslate",
4179
+ "aria-hidden": !0,
4180
+ children: "​"
4181
+ }))
4182
+ ) : ue
4183
+ }), /* @__PURE__ */ y(Rn, {
4184
+ "aria-invalid": v,
4185
+ value: Array.isArray($) ? $.join(",") : $,
4186
+ name: s,
4187
+ ref: ae,
4188
+ "aria-hidden": !0,
4189
+ onChange: Ne,
4190
+ tabIndex: -1,
4191
+ disabled: C,
4192
+ className: we.nativeInput,
4193
+ autoFocus: d,
4194
+ required: z,
4195
+ ...Q,
4196
+ ownerState: D
4197
+ }), /* @__PURE__ */ y(In, {
4198
+ as: x,
4199
+ className: we.icon,
4200
+ ownerState: D
4201
+ }), /* @__PURE__ */ y(Qo, {
4202
+ id: `menu-${s || ""}`,
4203
+ anchorEl: le,
4204
+ open: ve,
4205
+ onClose: X,
4206
+ anchorOrigin: {
4207
+ vertical: "bottom",
4208
+ horizontal: "center"
4209
+ },
4210
+ transformOrigin: {
4211
+ vertical: "top",
4212
+ horizontal: "center"
4213
+ },
4214
+ ...p,
4215
+ MenuListProps: {
4216
+ "aria-labelledby": O,
4217
+ role: "listbox",
4218
+ "aria-multiselectable": h ? "true" : void 0,
4219
+ disableListWrap: !0,
4220
+ id: wo,
4221
+ ...p.MenuListProps
4222
+ },
4223
+ slotProps: {
4224
+ ...p.slotProps,
4225
+ paper: {
4226
+ ...Oe,
4227
+ style: {
4228
+ minWidth: Pe,
4229
+ ...Oe != null ? Oe.style : null
4230
+ }
4231
+ }
4232
+ },
4233
+ children: He
4234
+ })]
4235
+ });
4236
+ });
4237
+ process.env.NODE_ENV !== "production" && (st.propTypes = {
4238
+ /**
4239
+ * @ignore
4240
+ */
4241
+ "aria-describedby": e.string,
4242
+ /**
4243
+ * @ignore
4244
+ */
4245
+ "aria-label": e.string,
4246
+ /**
4247
+ * @ignore
4248
+ */
4249
+ autoFocus: e.bool,
4250
+ /**
4251
+ * If `true`, the width of the popover will automatically be set according to the items inside the
4252
+ * menu, otherwise it will be at least the width of the select input.
4253
+ */
4254
+ autoWidth: e.bool,
4255
+ /**
4256
+ * The option elements to populate the select with.
4257
+ * Can be some `<MenuItem>` elements.
4258
+ */
4259
+ children: e.node,
4260
+ /**
4261
+ * Override or extend the styles applied to the component.
4262
+ */
4263
+ classes: e.object,
4264
+ /**
4265
+ * The CSS class name of the select element.
4266
+ */
4267
+ className: e.string,
4268
+ /**
4269
+ * If `true`, the component is toggled on mount. Use when the component open state is not controlled.
4270
+ * You can only use it when the `native` prop is `false` (default).
4271
+ */
4272
+ defaultOpen: e.bool,
4273
+ /**
4274
+ * The default value. Use when the component is not controlled.
4275
+ */
4276
+ defaultValue: e.any,
4277
+ /**
4278
+ * If `true`, the select is disabled.
4279
+ */
4280
+ disabled: e.bool,
4281
+ /**
4282
+ * If `true`, the selected item is displayed even if its value is empty.
4283
+ */
4284
+ displayEmpty: e.bool,
4285
+ /**
4286
+ * If `true`, the `select input` will indicate an error.
4287
+ */
4288
+ error: e.bool,
4289
+ /**
4290
+ * The icon that displays the arrow.
4291
+ */
4292
+ IconComponent: e.elementType.isRequired,
4293
+ /**
4294
+ * Imperative handle implementing `{ value: T, node: HTMLElement, focus(): void }`
4295
+ * Equivalent to `ref`
4296
+ */
4297
+ inputRef: ke,
4298
+ /**
4299
+ * The ID of an element that acts as an additional label. The Select will
4300
+ * be labelled by the additional label and the selected value.
4301
+ */
4302
+ labelId: e.string,
4303
+ /**
4304
+ * Props applied to the [`Menu`](/material-ui/api/menu/) element.
4305
+ */
4306
+ MenuProps: e.object,
4307
+ /**
4308
+ * If `true`, `value` must be an array and the menu will support multiple selections.
4309
+ */
4310
+ multiple: e.bool,
4311
+ /**
4312
+ * Name attribute of the `select` or hidden `input` element.
4313
+ */
4314
+ name: e.string,
4315
+ /**
4316
+ * @ignore
4317
+ */
4318
+ onBlur: e.func,
4319
+ /**
4320
+ * Callback fired when a menu item is selected.
4321
+ *
4322
+ * @param {object} event The event source of the callback.
4323
+ * You can pull out the new value by accessing `event.target.value` (any).
4324
+ * @param {object} [child] The react element that was selected.
4325
+ */
4326
+ onChange: e.func,
4327
+ /**
4328
+ * Callback fired when the component requests to be closed.
4329
+ * Use in controlled mode (see open).
4330
+ *
4331
+ * @param {object} event The event source of the callback.
4332
+ */
4333
+ onClose: e.func,
4334
+ /**
4335
+ * @ignore
4336
+ */
4337
+ onFocus: e.func,
4338
+ /**
4339
+ * Callback fired when the component requests to be opened.
4340
+ * Use in controlled mode (see open).
4341
+ *
4342
+ * @param {object} event The event source of the callback.
4343
+ */
4344
+ onOpen: e.func,
4345
+ /**
4346
+ * If `true`, the component is shown.
4347
+ */
4348
+ open: e.bool,
4349
+ /**
4350
+ * @ignore
4351
+ */
4352
+ readOnly: e.bool,
4353
+ /**
4354
+ * Render the selected value.
4355
+ *
4356
+ * @param {any} value The `value` provided to the component.
4357
+ * @returns {ReactNode}
4358
+ */
4359
+ renderValue: e.func,
4360
+ /**
4361
+ * If `true`, the component is required.
4362
+ */
4363
+ required: e.bool,
4364
+ /**
4365
+ * Props applied to the clickable div element.
4366
+ */
4367
+ SelectDisplayProps: e.object,
4368
+ /**
4369
+ * @ignore
4370
+ */
4371
+ tabIndex: e.oneOfType([e.number, e.string]),
4372
+ /**
4373
+ * @ignore
4374
+ */
4375
+ type: e.any,
4376
+ /**
4377
+ * The input value.
4378
+ */
4379
+ value: e.any,
4380
+ /**
4381
+ * The variant to use.
4382
+ */
4383
+ variant: e.oneOf(["standard", "outlined", "filled"])
4384
+ });
4385
+ const Mn = (o) => {
4386
+ const {
4387
+ classes: t
4388
+ } = o;
4389
+ return t;
4390
+ }, Co = {
4391
+ name: "MuiSelect",
4392
+ overridesResolver: (o, t) => t.root,
4393
+ shouldForwardProp: (o) => ne(o) && o !== "variant",
4394
+ slot: "Root"
4395
+ }, En = M(go, Co)(""), Nn = M(vo, Co)(""), Pn = M(yo, Co)(""), So = /* @__PURE__ */ l.forwardRef(function(t, n) {
4396
+ const r = ee({
4397
+ name: "MuiSelect",
4398
+ props: t
4399
+ }), {
4400
+ autoWidth: i = !1,
4401
+ children: d,
4402
+ classes: a = {},
4403
+ className: c,
4404
+ defaultOpen: f = !1,
4405
+ displayEmpty: u = !1,
4406
+ IconComponent: m = Nt,
4407
+ id: C,
4408
+ input: S,
4409
+ inputProps: v,
4410
+ label: x,
4411
+ labelId: I,
4412
+ MenuProps: O,
4413
+ multiple: p = !1,
4414
+ native: h = !1,
4415
+ onClose: s,
4416
+ onOpen: b,
4417
+ open: R,
4418
+ renderValue: L,
4419
+ SelectDisplayProps: N,
4420
+ variant: k = "outlined",
4421
+ ...j
4422
+ } = r, P = h ? nt : st, B = We(), z = Ue({
4423
+ props: r,
4424
+ muiFormControl: B,
4425
+ states: ["variant", "error"]
4426
+ }), U = z.variant || k, W = {
4427
+ ...r,
4428
+ variant: U,
4429
+ classes: a
4430
+ }, g = Mn(W), {
4431
+ root: E,
4432
+ ...F
4433
+ } = g, Q = S || {
4434
+ standard: /* @__PURE__ */ y(En, {
4435
+ ownerState: W
4436
+ }),
4437
+ outlined: /* @__PURE__ */ y(Nn, {
4438
+ label: x,
4439
+ ownerState: W
4440
+ }),
4441
+ filled: /* @__PURE__ */ y(Pn, {
4442
+ ownerState: W
4443
+ })
4444
+ }[U], $ = Te(n, Ct(Q));
4445
+ return /* @__PURE__ */ y(l.Fragment, {
4446
+ children: /* @__PURE__ */ l.cloneElement(Q, {
4447
+ // Most of the logic is implemented in `SelectInput`.
4448
+ // The `Select` component is a simple API wrapper to expose something better to play with.
4449
+ inputComponent: P,
4450
+ inputProps: {
4451
+ children: d,
4452
+ error: z.error,
4453
+ IconComponent: m,
4454
+ variant: U,
4455
+ type: void 0,
4456
+ // We render a select. We can ignore the type provided by the `Input`.
4457
+ multiple: p,
4458
+ ...h ? {
4459
+ id: C
4460
+ } : {
4461
+ autoWidth: i,
4462
+ defaultOpen: f,
4463
+ displayEmpty: u,
4464
+ labelId: I,
4465
+ MenuProps: O,
4466
+ onClose: s,
4467
+ onOpen: b,
4468
+ open: R,
4469
+ renderValue: L,
4470
+ SelectDisplayProps: {
4471
+ id: C,
4472
+ ...N
4473
+ }
4474
+ },
4475
+ ...v,
4476
+ classes: v ? mo(F, v.classes) : F,
4477
+ ...S ? S.props.inputProps : {}
4478
+ },
4479
+ ...(p && h || u) && U === "outlined" ? {
4480
+ notched: !0
4481
+ } : {},
4482
+ ref: $,
4483
+ className: Y(Q.props.className, c, g.root),
4484
+ // If a custom input is provided via 'input' prop, do not allow 'variant' to be propagated to it's root element. See https://github.com/mui/material-ui/issues/33894.
4485
+ ...!S && {
4486
+ variant: U
4487
+ },
4488
+ ...j
4489
+ })
4490
+ });
4491
+ });
4492
+ process.env.NODE_ENV !== "production" && (So.propTypes = {
4493
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
4494
+ // │ These PropTypes are generated from the TypeScript type definitions. │
4495
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
4496
+ // └─────────────────────────────────────────────────────────────────────┘
4497
+ /**
4498
+ * If `true`, the width of the popover will automatically be set according to the items inside the
4499
+ * menu, otherwise it will be at least the width of the select input.
4500
+ * @default false
4501
+ */
4502
+ autoWidth: e.bool,
4503
+ /**
4504
+ * The option elements to populate the select with.
4505
+ * Can be some `MenuItem` when `native` is false and `option` when `native` is true.
4506
+ *
4507
+ * ⚠️The `MenuItem` elements **must** be direct descendants when `native` is false.
4508
+ */
4509
+ children: e.node,
4510
+ /**
4511
+ * Override or extend the styles applied to the component.
4512
+ * @default {}
4513
+ */
4514
+ classes: e.object,
4515
+ /**
4516
+ * @ignore
4517
+ */
4518
+ className: e.string,
4519
+ /**
4520
+ * If `true`, the component is initially open. Use when the component open state is not controlled (i.e. the `open` prop is not defined).
4521
+ * You can only use it when the `native` prop is `false` (default).
4522
+ * @default false
4523
+ */
4524
+ defaultOpen: e.bool,
4525
+ /**
4526
+ * The default value. Use when the component is not controlled.
4527
+ */
4528
+ defaultValue: e.any,
4529
+ /**
4530
+ * If `true`, a value is displayed even if no items are selected.
4531
+ *
4532
+ * In order to display a meaningful value, a function can be passed to the `renderValue` prop which
4533
+ * returns the value to be displayed when no items are selected.
4534
+ *
4535
+ * ⚠️ When using this prop, make sure the label doesn't overlap with the empty displayed value.
4536
+ * The label should either be hidden or forced to a shrunk state.
4537
+ * @default false
4538
+ */
4539
+ displayEmpty: e.bool,
4540
+ /**
4541
+ * The icon that displays the arrow.
4542
+ * @default ArrowDropDownIcon
4543
+ */
4544
+ IconComponent: e.elementType,
4545
+ /**
4546
+ * The `id` of the wrapper element or the `select` element when `native`.
4547
+ */
4548
+ id: e.string,
4549
+ /**
4550
+ * An `Input` element; does not have to be a material-ui specific `Input`.
4551
+ */
4552
+ input: e.element,
4553
+ /**
4554
+ * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
4555
+ * When `native` is `true`, the attributes are applied on the `select` element.
4556
+ */
4557
+ inputProps: e.object,
4558
+ /**
4559
+ * See [OutlinedInput#label](https://mui.com/material-ui/api/outlined-input/#props)
4560
+ */
4561
+ label: e.node,
4562
+ /**
4563
+ * The ID of an element that acts as an additional label. The Select will
4564
+ * be labelled by the additional label and the selected value.
4565
+ */
4566
+ labelId: e.string,
4567
+ /**
4568
+ * Props applied to the [`Menu`](https://mui.com/material-ui/api/menu/) element.
4569
+ */
4570
+ MenuProps: e.object,
4571
+ /**
4572
+ * If `true`, `value` must be an array and the menu will support multiple selections.
4573
+ * @default false
4574
+ */
4575
+ multiple: e.bool,
4576
+ /**
4577
+ * If `true`, the component uses a native `select` element.
4578
+ * @default false
4579
+ */
4580
+ native: e.bool,
4581
+ /**
4582
+ * Callback fired when a menu item is selected.
4583
+ *
4584
+ * @param {SelectChangeEvent<Value>} event The event source of the callback.
4585
+ * You can pull out the new value by accessing `event.target.value` (any).
4586
+ * **Warning**: This is a generic event, not a change event, unless the change event is caused by browser autofill.
4587
+ * @param {object} [child] The react element that was selected when `native` is `false` (default).
4588
+ */
4589
+ onChange: e.func,
4590
+ /**
4591
+ * Callback fired when the component requests to be closed.
4592
+ * Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select collapses).
4593
+ *
4594
+ * @param {object} event The event source of the callback.
4595
+ */
4596
+ onClose: e.func,
4597
+ /**
4598
+ * Callback fired when the component requests to be opened.
4599
+ * Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select expands).
4600
+ *
4601
+ * @param {object} event The event source of the callback.
4602
+ */
4603
+ onOpen: e.func,
4604
+ /**
4605
+ * If `true`, the component is shown.
4606
+ * You can only use it when the `native` prop is `false` (default).
4607
+ */
4608
+ open: e.bool,
4609
+ /**
4610
+ * Render the selected value.
4611
+ * You can only use it when the `native` prop is `false` (default).
4612
+ *
4613
+ * @param {any} value The `value` provided to the component.
4614
+ * @returns {ReactNode}
4615
+ */
4616
+ renderValue: e.func,
4617
+ /**
4618
+ * Props applied to the clickable div element.
4619
+ */
4620
+ SelectDisplayProps: e.object,
4621
+ /**
4622
+ * The system prop that allows defining system overrides as well as additional CSS styles.
4623
+ */
4624
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
4625
+ /**
4626
+ * The `input` value. Providing an empty string will select no options.
4627
+ * Set to an empty string `''` if you don't want any of the available options to be selected.
4628
+ *
4629
+ * If the value is an object it must have reference equality with the option in order to be selected.
4630
+ * If the value is not an object, the string representation must match with the string representation of the option in order to be selected.
4631
+ */
4632
+ value: e.oneOfType([e.oneOf([""]), e.any]),
4633
+ /**
4634
+ * The variant to use.
4635
+ * @default 'outlined'
4636
+ */
4637
+ variant: e.oneOf(["filled", "outlined", "standard"])
4638
+ });
4639
+ So.muiName = "Select";
4640
+ function er({
4641
+ description: o = "Connect your Slack workspace to receive notifications directly in Slack.",
4642
+ connectButtonText: t = "Connect Slack",
4643
+ editButtonText: n = "Edit Channel",
4644
+ disconnectButtonText: r = "Disconnect",
4645
+ saveButtonText: i = "Save",
4646
+ cancelButtonText: d = "Cancel",
4647
+ connectedText: a = "Slack notifications will be sent to:",
4648
+ selectChannelText: c = "Choose a channel or user to receive notifications:"
4649
+ } = {}) {
4650
+ const f = at(it), u = f == null ? void 0 : f.getClient(), [m, C] = ye(), [S, v] = ye(), [x, I] = ye([]), [O, p] = ye(""), [h, s] = ye(!1), [b, R] = ye(null), [L, N] = ye(!1), k = Io(async () => {
4651
+ if (u)
4652
+ try {
4653
+ s(!0);
4654
+ const g = await u.user.get();
4655
+ g.slackToken && C(g.slackToken), g.slackChannel && v(g.slackChannel);
4656
+ } catch (g) {
4657
+ console.error("Error fetching Slack status:", g);
4658
+ } finally {
4659
+ s(!1);
4660
+ }
4661
+ }, [u]), j = Io(async () => {
4662
+ if (!u || !m) return [];
4663
+ try {
4664
+ s(!0), R(null);
4665
+ const g = await u.slack.getChannels(), E = [
4666
+ ...(g.channels || []).filter((F) => F.id && F.name).map((F) => ({
4667
+ id: F.id,
4668
+ name: F.name,
4669
+ type: "channel"
4670
+ })),
4671
+ ...(g.users || []).filter((F) => F.id && F.name).map((F) => ({
4672
+ id: F.id,
4673
+ name: F.name,
4674
+ type: "user"
4675
+ }))
4676
+ ];
4677
+ return I(E), E;
4678
+ } catch (g) {
4679
+ return console.error("Error loading channels and users:", g), R("Failed to load Slack channels and users. Please try again."), [];
4680
+ } finally {
4681
+ s(!1);
4682
+ }
4683
+ }, [u, m]);
4684
+ Ro(() => {
4685
+ k();
4686
+ }, [k]), Ro(() => {
4687
+ m && !S && !L && j();
4688
+ }, [m, S, L, j]);
4689
+ const P = async () => {
4690
+ if (u)
4691
+ try {
4692
+ s(!0), R(null);
4693
+ const g = await u.slack.getOAuthUrl();
4694
+ window.location.href = g;
4695
+ } catch (g) {
4696
+ console.error("Error connecting to Slack:", g), R("Failed to connect to Slack. Please try again.");
4697
+ } finally {
4698
+ s(!1);
4699
+ }
4700
+ }, B = async () => {
4701
+ if (!(!u || !O))
4702
+ try {
4703
+ s(!0), R(null);
4704
+ const g = x.find((F) => F.id === O);
4705
+ if (!g) {
4706
+ R("Channel not found. Please try again.");
4707
+ return;
4708
+ }
4709
+ const E = `${g.type === "channel" ? "#" : "@"}${g.name}`;
4710
+ await u.slack.setChannel(E), v(E), N(!1), R(null);
4711
+ } catch (g) {
4712
+ console.error("Error saving channel:", g), R("Failed to save channel. Please try again.");
4713
+ } finally {
4714
+ s(!1);
4715
+ }
4716
+ }, z = async () => {
4717
+ if (u)
4718
+ try {
4719
+ s(!0), R(null), await u.identify({
4720
+ // @ts-expect-error - null is not assignable to type string
4721
+ slackToken: null,
4722
+ // @ts-expect-error - null is not assignable to type string
4723
+ slackChannel: null
4724
+ }), C(void 0), v(void 0), p(""), I([]), N(!1);
4725
+ } catch (g) {
4726
+ console.error("Error disconnecting Slack:", g), R("Failed to disconnect Slack. Please try again.");
4727
+ } finally {
4728
+ s(!1);
4729
+ }
4730
+ }, U = async () => {
4731
+ N(!0);
4732
+ let g = x;
4733
+ if (x.length === 0 && (g = await j()), S) {
4734
+ const E = S.startsWith("#"), F = S.substring(1), Q = E ? "channel" : "user", $ = g.find(
4735
+ (he) => he.name === F && he.type === Q
4736
+ );
4737
+ $ && p($.id);
4738
+ }
4739
+ }, W = () => {
4740
+ N(!1), p("");
4741
+ };
4742
+ return u ? h && !m && !x.length ? /* @__PURE__ */ y(qe, { display: "flex", justifyContent: "center", alignItems: "center", p: 3, children: /* @__PURE__ */ y(Xe, {}) }) : m ? !S || L ? /* @__PURE__ */ q(qe, { children: [
4743
+ b && /* @__PURE__ */ y(ko, { severity: "error", sx: { mb: 2 }, children: b }),
4744
+ h ? /* @__PURE__ */ y(qe, { display: "flex", justifyContent: "center", p: 2, children: /* @__PURE__ */ y(Xe, {}) }) : /* @__PURE__ */ q(io, { direction: "row", spacing: 2, alignItems: "center", children: [
4745
+ /* @__PURE__ */ y(Ke, { variant: "body2", color: "text.secondary", children: c }),
4746
+ /* @__PURE__ */ q(Go, { sx: { minWidth: 200 }, size: "small", children: [
4747
+ /* @__PURE__ */ y(Yo, { id: "slack-channel-label", children: "Channel or User" }),
4748
+ /* @__PURE__ */ y(
4749
+ So,
4750
+ {
4751
+ labelId: "slack-channel-label",
4752
+ value: O,
4753
+ label: "Channel or User",
4754
+ onChange: (g) => p(g.target.value),
4755
+ children: x.sort((g, E) => g.type === E.type ? g.name.localeCompare(E.name) : g.type === "channel" ? -1 : 1).map((g) => /* @__PURE__ */ q(et, { value: g.id, children: [
4756
+ g.type === "channel" ? "#" : "@",
4757
+ g.name
4758
+ ] }, g.id))
4759
+ }
4760
+ )
4761
+ ] }),
4762
+ /* @__PURE__ */ y(
4763
+ Ie,
4764
+ {
4765
+ variant: "contained",
4766
+ color: "primary",
4767
+ onClick: B,
4768
+ disabled: !O || h,
4769
+ children: i
4770
+ }
4771
+ ),
4772
+ L && /* @__PURE__ */ y(
4773
+ Ie,
4774
+ {
4775
+ variant: "outlined",
4776
+ onClick: W,
4777
+ disabled: h,
4778
+ children: d
4779
+ }
4780
+ ),
4781
+ /* @__PURE__ */ y(
4782
+ Ie,
4783
+ {
4784
+ variant: "text",
4785
+ color: "error",
4786
+ onClick: z,
4787
+ disabled: h,
4788
+ size: "small",
4789
+ children: r
4790
+ }
4791
+ )
4792
+ ] })
4793
+ ] }) : /* @__PURE__ */ q(io, { direction: "row", spacing: 2, alignItems: "center", children: [
4794
+ /* @__PURE__ */ y(Ke, { variant: "body2", color: "text.secondary", children: a }),
4795
+ /* @__PURE__ */ y(Ke, { variant: "body1", fontWeight: "medium", children: S }),
4796
+ /* @__PURE__ */ y(Ie, { variant: "outlined", onClick: U, disabled: h, children: n }),
4797
+ /* @__PURE__ */ y(
4798
+ Ie,
4799
+ {
4800
+ variant: "text",
4801
+ color: "error",
4802
+ onClick: z,
4803
+ disabled: h,
4804
+ children: r
4805
+ }
4806
+ )
4807
+ ] }) : /* @__PURE__ */ q(qe, { children: [
4808
+ b && /* @__PURE__ */ y(ko, { severity: "error", sx: { mb: 2 }, children: b }),
4809
+ /* @__PURE__ */ q(io, { direction: "row", spacing: 2, alignItems: "center", children: [
4810
+ /* @__PURE__ */ y(Ke, { variant: "body2", color: "text.secondary", children: o }),
4811
+ /* @__PURE__ */ y(
4812
+ Ie,
4813
+ {
4814
+ variant: "contained",
4815
+ color: "primary",
4816
+ onClick: P,
4817
+ disabled: h,
4818
+ children: h ? /* @__PURE__ */ y(Xe, { size: 24 }) : t
4819
+ }
4820
+ )
4821
+ ] })
4822
+ ] }) : null;
4823
+ }
4824
+ export {
4825
+ er as SlackConnect
4826
+ };