@amateescu/portal-ui-components 0.0.47 → 0.0.49

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 (90) hide show
  1. package/dist/Box-DU079Glg.js +57 -0
  2. package/dist/{Button-Bx3LbSbV.js → Button-BgsadnaR.js} +13 -13
  3. package/dist/{ButtonBase-DV7q7wxh.js → ButtonBase-ugYh038t.js} +8 -8
  4. package/dist/{CheckBox-YBX2j1qt.js → CheckBox-D9YmAV-l.js} +1 -1
  5. package/dist/{CircularProgress-BXi3nXc9.js → CircularProgress-D1FWO7Cz.js} +1 -1
  6. package/dist/{Clear-Bz9hw2Wj.js → Clear-B32X2R1T.js} +1 -1
  7. package/dist/Close-IqnCWZPM.js +8 -0
  8. package/dist/{DefaultPropsProvider-ByENA_w0.js → DefaultPropsProvider-BQx1AiAq.js} +20 -19
  9. package/dist/ExpandMore-CHNJSd5N.js +8 -0
  10. package/dist/ListItem-1DiNy9oq.js +422 -0
  11. package/dist/ListItemText-VX0lo95z.js +434 -0
  12. package/dist/Modal-BnD35xWv.js +1325 -0
  13. package/dist/{Search-D_9Ptbky.js → Search-DnJ3yLMg.js} +1 -1
  14. package/dist/assets/PassportDateRangeWrapper.css +1 -1
  15. package/dist/assets/PassportFilter.css +1 -0
  16. package/dist/assets/PassportFilterDrawer.css +1 -0
  17. package/dist/assets/PassportFilterFreeTextFilter.css +1 -0
  18. package/dist/components/LoadingAnimation/LoadingAnimation.js +8 -60
  19. package/dist/components/Login/Login.js +1 -1
  20. package/dist/components/PassportButton/PassportButton.js +1 -1
  21. package/dist/components/PassportDatePicker/PassportDatePicker.js +21 -20
  22. package/dist/components/PassportDateTimePicker/PassportDateTimePicker.js +298 -291
  23. package/dist/components/PassportDatesFilter/PassportDatesFilter.js +24 -26
  24. package/dist/components/PassportFilter/PassportFilter.d.ts +5 -0
  25. package/dist/components/PassportFilter/PassportFilter.d.ts.map +1 -0
  26. package/dist/components/PassportFilter/PassportFilter.js +154 -0
  27. package/dist/components/PassportFilter/PassportFilter.stories.d.ts +13 -0
  28. package/dist/components/PassportFilter/PassportFilter.stories.d.ts.map +1 -0
  29. package/dist/components/PassportFilter/PassportFilter.types.d.ts +61 -0
  30. package/dist/components/PassportFilter/PassportFilter.types.d.ts.map +1 -0
  31. package/dist/components/PassportFilter/PassportFilter.types.js +5 -0
  32. package/dist/components/PassportFilter/PassportFilterDrawer/PassportFilterDrawer.d.ts +5 -0
  33. package/dist/components/PassportFilter/PassportFilterDrawer/PassportFilterDrawer.d.ts.map +1 -0
  34. package/dist/components/PassportFilter/PassportFilterDrawer/PassportFilterDrawer.js +756 -0
  35. package/dist/components/PassportFilter/PassportFilterDrawer/PassportFilterDrawer.types.d.ts +28 -0
  36. package/dist/components/PassportFilter/PassportFilterDrawer/PassportFilterDrawer.types.d.ts.map +1 -0
  37. package/dist/components/PassportFilter/PassportFilterDrawer/PassportFilterDrawer.types.js +1 -0
  38. package/dist/components/PassportFilter/PassportFilterFreeTextButtons/PassportFilterFreeTextButtons.d.ts +4 -0
  39. package/dist/components/PassportFilter/PassportFilterFreeTextButtons/PassportFilterFreeTextButtons.d.ts.map +1 -0
  40. package/dist/components/PassportFilter/PassportFilterFreeTextButtons/PassportFilterFreeTextButtons.js +94 -0
  41. package/dist/components/PassportFilter/PassportFilterFreeTextButtons/PassportFilterFreeTextButtons.types.d.ts +16 -0
  42. package/dist/components/PassportFilter/PassportFilterFreeTextButtons/PassportFilterFreeTextButtons.types.d.ts.map +1 -0
  43. package/dist/components/PassportFilter/PassportFilterFreeTextButtons/PassportFilterFreeTextButtons.types.js +1 -0
  44. package/dist/components/PassportFilter/PassportFilterFreeTextFilter/PassportFilterFreeTextFilter.d.ts +4 -0
  45. package/dist/components/PassportFilter/PassportFilterFreeTextFilter/PassportFilterFreeTextFilter.d.ts.map +1 -0
  46. package/dist/components/PassportFilter/PassportFilterFreeTextFilter/PassportFilterFreeTextFilter.js +736 -0
  47. package/dist/components/PassportFilter/PassportFilterFreeTextFilter/PassportFilterFreeTextFilter.types.d.ts +37 -0
  48. package/dist/components/PassportFilter/PassportFilterFreeTextFilter/PassportFilterFreeTextFilter.types.d.ts.map +1 -0
  49. package/dist/components/PassportFilter/PassportFilterFreeTextFilter/PassportFilterFreeTextFilter.types.js +1 -0
  50. package/dist/components/PassportFilter/PassportFilterSelectionList/PassportFilterSelectionList.d.ts +4 -0
  51. package/dist/components/PassportFilter/PassportFilterSelectionList/PassportFilterSelectionList.d.ts.map +1 -0
  52. package/dist/components/PassportFilter/PassportFilterSelectionList/PassportFilterSelectionList.js +180 -0
  53. package/dist/components/PassportFilter/PassportFilterSelectionList/PassportFilterSelectionList.types.d.ts +17 -0
  54. package/dist/components/PassportFilter/PassportFilterSelectionList/PassportFilterSelectionList.types.d.ts.map +1 -0
  55. package/dist/components/PassportFilter/PassportFilterSelectionList/PassportFilterSelectionList.types.js +1 -0
  56. package/dist/components/PassportInput/PassportInput.js +2 -2
  57. package/dist/components/PassportMultiSelect/PassportMultiSelect.js +1 -1
  58. package/dist/components/PassportPagination/PassportPagination.js +96 -94
  59. package/dist/components/PassportSearchableMultiSelect/PassportSearchableMultiSelect.js +1 -1
  60. package/dist/components/PassportSearchableMultiSelectDetailed/PassportSearchableMultiSelectDetailed.js +1 -1
  61. package/dist/components/PassportTreeSelect/PassportTreeSelect.js +82 -79
  62. package/dist/components/index.d.ts +1 -0
  63. package/dist/components/index.d.ts.map +1 -1
  64. package/dist/components/index.js +4 -2
  65. package/dist/{createSvgIcon-D5xeIEZ_.js → createSvgIcon-Crk7qT6j.js} +1 -1
  66. package/dist/{extendSxProp-BtJlbIOl.js → extendSxProp-BHclE0DL.js} +1 -1
  67. package/dist/getReactElementRef-CIbXfZbo.js +45 -0
  68. package/dist/index-DfCFE9GG.js +9 -0
  69. package/dist/listItemButtonClasses-BLTBU8Yh.js +476 -0
  70. package/dist/listItemIconClasses-B_UAYnw7.js +9 -0
  71. package/dist/listItemTextClasses-D5in-Wsc.js +9 -0
  72. package/dist/main.js +41 -37
  73. package/dist/portal-utils/arrays.d.ts +2 -0
  74. package/dist/portal-utils/arrays.d.ts.map +1 -0
  75. package/dist/portal-utils/arrays.js +10 -0
  76. package/dist/portal-utils/index.d.ts +1 -0
  77. package/dist/portal-utils/index.d.ts.map +1 -1
  78. package/dist/portal-utils/index.js +17 -15
  79. package/dist/types/index.d.ts +1 -0
  80. package/dist/types/index.d.ts.map +1 -1
  81. package/dist/useControlled-D1L5tREc.js +31 -0
  82. package/dist/useFormControl-Ivp9nwoj.js +53 -0
  83. package/dist/{useMobilePicker-CFsW9hUG.js → useMobilePicker-BombQ5QA.js} +5381 -7587
  84. package/dist/useSlot-B1oIMjd_.js +126 -0
  85. package/dist/useTheme-9dlwNzrD.js +10 -0
  86. package/dist/{useTheme-Cz8ZipjJ.js → useTheme-Dxbczges.js} +3 -3
  87. package/dist/useThemeProps-j6Er0aGl.js +27 -0
  88. package/dist/{useFormControl-MVwkyimi.js → utils-6k-H8qFR.js} +155 -231
  89. package/package.json +1 -1
  90. package/dist/useSlot-Bm5YJQBR.js +0 -160
@@ -0,0 +1,1325 @@
1
+ import * as c from "react";
2
+ import { P as e, b as ee, g as te, u as ne, s as Y, q as ce, c as q, t as de, f as oe, m as ye } from "./DefaultPropsProvider-BQx1AiAq.js";
3
+ import { u as ge } from "./useTheme-9dlwNzrD.js";
4
+ import { jsx as M, jsxs as Te } from "react/jsx-runtime";
5
+ import { a as Ie } from "./createSimplePaletteValueFilter-Bz8RuRaa.js";
6
+ import { i as Fe } from "./integerPropType-BihGt2aU.js";
7
+ import { o as A, g as re, e as se, a as xe } from "./getReactElementRef-CIbXfZbo.js";
8
+ import { a as G, u as ue, d as pe } from "./ButtonBase-ugYh038t.js";
9
+ import { u as K, e as Ae } from "./useSlot-B1oIMjd_.js";
10
+ import * as De from "react-dom";
11
+ import { T as Be, g as fe, r as je } from "./utils-6k-H8qFR.js";
12
+ function be(...t) {
13
+ return t.reduce((n, r) => r == null ? n : function(...i) {
14
+ n.apply(this, i), r.apply(this, i);
15
+ }, () => {
16
+ });
17
+ }
18
+ function xt(t, n = 166) {
19
+ let r;
20
+ function o(...i) {
21
+ const s = () => {
22
+ t.apply(this, i);
23
+ };
24
+ clearTimeout(r), r = setTimeout(s, n);
25
+ }
26
+ return o.clear = () => {
27
+ clearTimeout(r);
28
+ }, o;
29
+ }
30
+ function _(t) {
31
+ return A(t).defaultView || window;
32
+ }
33
+ function me(t, n) {
34
+ typeof t == "function" ? t(n) : t && (t.current = n);
35
+ }
36
+ const Le = {
37
+ entering: {
38
+ opacity: 1
39
+ },
40
+ entered: {
41
+ opacity: 1
42
+ }
43
+ }, Re = /* @__PURE__ */ c.forwardRef(function(n, r) {
44
+ const o = ge(), i = {
45
+ enter: o.transitions.duration.enteringScreen,
46
+ exit: o.transitions.duration.leavingScreen
47
+ }, {
48
+ addEndListener: s,
49
+ appear: a = !0,
50
+ children: l,
51
+ easing: u,
52
+ in: h,
53
+ onEnter: T,
54
+ onEntered: v,
55
+ onEntering: x,
56
+ onExit: y,
57
+ onExited: b,
58
+ onExiting: S,
59
+ style: R,
60
+ timeout: k = i,
61
+ // eslint-disable-next-line react/prop-types
62
+ TransitionComponent: N = Be,
63
+ ...f
64
+ } = n, m = c.useRef(null), C = G(m, re(l), r), w = (E) => (p) => {
65
+ if (E) {
66
+ const d = m.current;
67
+ p === void 0 ? E(d) : E(d, p);
68
+ }
69
+ }, g = w(x), O = w((E, p) => {
70
+ je(E);
71
+ const d = fe({
72
+ style: R,
73
+ timeout: k,
74
+ easing: u
75
+ }, {
76
+ mode: "enter"
77
+ });
78
+ E.style.webkitTransition = o.transitions.create("opacity", d), E.style.transition = o.transitions.create("opacity", d), T && T(E, p);
79
+ }), P = w(v), F = w(S), I = w((E) => {
80
+ const p = fe({
81
+ style: R,
82
+ timeout: k,
83
+ easing: u
84
+ }, {
85
+ mode: "exit"
86
+ });
87
+ E.style.webkitTransition = o.transitions.create("opacity", p), E.style.transition = o.transitions.create("opacity", p), y && y(E);
88
+ }), D = w(b);
89
+ return /* @__PURE__ */ M(N, {
90
+ appear: a,
91
+ in: h,
92
+ nodeRef: m,
93
+ onEnter: O,
94
+ onEntered: P,
95
+ onEntering: g,
96
+ onExit: I,
97
+ onExited: D,
98
+ onExiting: F,
99
+ addEndListener: (E) => {
100
+ s && s(m.current, E);
101
+ },
102
+ timeout: k,
103
+ ...f,
104
+ children: (E, {
105
+ ownerState: p,
106
+ ...d
107
+ }) => /* @__PURE__ */ c.cloneElement(l, {
108
+ style: {
109
+ opacity: 0,
110
+ visibility: E === "exited" && !h ? "hidden" : void 0,
111
+ ...Le[E],
112
+ ...R,
113
+ ...l.props.style
114
+ },
115
+ ref: C,
116
+ ...d
117
+ })
118
+ });
119
+ });
120
+ process.env.NODE_ENV !== "production" && (Re.propTypes = {
121
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
122
+ // │ These PropTypes are generated from the TypeScript type definitions. │
123
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
124
+ // └─────────────────────────────────────────────────────────────────────┘
125
+ /**
126
+ * Add a custom transition end trigger. Called with the transitioning DOM
127
+ * node and a done callback. Allows for more fine grained transition end
128
+ * logic. Note: Timeouts are still used as a fallback if provided.
129
+ */
130
+ addEndListener: e.func,
131
+ /**
132
+ * Perform the enter transition when it first mounts if `in` is also `true`.
133
+ * Set this to `false` to disable this behavior.
134
+ * @default true
135
+ */
136
+ appear: e.bool,
137
+ /**
138
+ * A single child content element.
139
+ */
140
+ children: se.isRequired,
141
+ /**
142
+ * The transition timing function.
143
+ * You may specify a single easing or a object containing enter and exit values.
144
+ */
145
+ easing: e.oneOfType([e.shape({
146
+ enter: e.string,
147
+ exit: e.string
148
+ }), e.string]),
149
+ /**
150
+ * If `true`, the component will transition in.
151
+ */
152
+ in: e.bool,
153
+ /**
154
+ * @ignore
155
+ */
156
+ onEnter: e.func,
157
+ /**
158
+ * @ignore
159
+ */
160
+ onEntered: e.func,
161
+ /**
162
+ * @ignore
163
+ */
164
+ onEntering: e.func,
165
+ /**
166
+ * @ignore
167
+ */
168
+ onExit: e.func,
169
+ /**
170
+ * @ignore
171
+ */
172
+ onExited: e.func,
173
+ /**
174
+ * @ignore
175
+ */
176
+ onExiting: e.func,
177
+ /**
178
+ * @ignore
179
+ */
180
+ style: e.object,
181
+ /**
182
+ * The duration for the transition, in milliseconds.
183
+ * You may specify a single timeout for all transitions, or individually with an object.
184
+ * @default {
185
+ * enter: theme.transitions.duration.enteringScreen,
186
+ * exit: theme.transitions.duration.leavingScreen,
187
+ * }
188
+ */
189
+ timeout: e.oneOfType([e.number, e.shape({
190
+ appear: e.number,
191
+ enter: e.number,
192
+ exit: e.number
193
+ })])
194
+ });
195
+ function $e(t) {
196
+ return ee("MuiPaper", t);
197
+ }
198
+ te("MuiPaper", ["root", "rounded", "outlined", "elevation", "elevation0", "elevation1", "elevation2", "elevation3", "elevation4", "elevation5", "elevation6", "elevation7", "elevation8", "elevation9", "elevation10", "elevation11", "elevation12", "elevation13", "elevation14", "elevation15", "elevation16", "elevation17", "elevation18", "elevation19", "elevation20", "elevation21", "elevation22", "elevation23", "elevation24"]);
199
+ const He = (t) => {
200
+ const {
201
+ square: n,
202
+ elevation: r,
203
+ variant: o,
204
+ classes: i
205
+ } = t, s = {
206
+ root: ["root", o, !n && "rounded", o === "elevation" && `elevation${r}`]
207
+ };
208
+ return oe(s, $e, i);
209
+ }, Ue = Y("div", {
210
+ name: "MuiPaper",
211
+ slot: "Root",
212
+ overridesResolver: (t, n) => {
213
+ const {
214
+ ownerState: r
215
+ } = t;
216
+ return [n.root, n[r.variant], !r.square && n.rounded, r.variant === "elevation" && n[`elevation${r.elevation}`]];
217
+ }
218
+ })(ye(({
219
+ theme: t
220
+ }) => ({
221
+ backgroundColor: (t.vars || t).palette.background.paper,
222
+ color: (t.vars || t).palette.text.primary,
223
+ transition: t.transitions.create("box-shadow"),
224
+ variants: [{
225
+ props: ({
226
+ ownerState: n
227
+ }) => !n.square,
228
+ style: {
229
+ borderRadius: t.shape.borderRadius
230
+ }
231
+ }, {
232
+ props: {
233
+ variant: "outlined"
234
+ },
235
+ style: {
236
+ border: `1px solid ${(t.vars || t).palette.divider}`
237
+ }
238
+ }, {
239
+ props: {
240
+ variant: "elevation"
241
+ },
242
+ style: {
243
+ boxShadow: "var(--Paper-shadow)",
244
+ backgroundImage: "var(--Paper-overlay)"
245
+ }
246
+ }]
247
+ }))), Ve = /* @__PURE__ */ c.forwardRef(function(n, r) {
248
+ const o = ne({
249
+ props: n,
250
+ name: "MuiPaper"
251
+ }), i = ge(), {
252
+ className: s,
253
+ component: a = "div",
254
+ elevation: l = 1,
255
+ square: u = !1,
256
+ variant: h = "elevation",
257
+ ...T
258
+ } = o, v = {
259
+ ...o,
260
+ component: a,
261
+ elevation: l,
262
+ square: u,
263
+ variant: h
264
+ }, x = He(v);
265
+ return process.env.NODE_ENV !== "production" && i.shadows[l] === void 0 && console.error([`MUI: The elevation provided <Paper elevation={${l}}> is not available in the theme.`, `Please make sure that \`theme.shadows[${l}]\` is defined.`].join(`
266
+ `)), /* @__PURE__ */ M(Ue, {
267
+ as: a,
268
+ ownerState: v,
269
+ className: q(x.root, s),
270
+ ref: r,
271
+ ...T,
272
+ style: {
273
+ ...h === "elevation" && {
274
+ "--Paper-shadow": (i.vars || i).shadows[l],
275
+ ...i.vars && {
276
+ "--Paper-overlay": i.vars.overlays?.[l]
277
+ },
278
+ ...!i.vars && i.palette.mode === "dark" && {
279
+ "--Paper-overlay": `linear-gradient(${ce("#fff", de(l))}, ${ce("#fff", de(l))})`
280
+ }
281
+ },
282
+ ...T.style
283
+ }
284
+ });
285
+ });
286
+ process.env.NODE_ENV !== "production" && (Ve.propTypes = {
287
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
288
+ // │ These PropTypes are generated from the TypeScript type definitions. │
289
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
290
+ // └─────────────────────────────────────────────────────────────────────┘
291
+ /**
292
+ * The content of the component.
293
+ */
294
+ children: e.node,
295
+ /**
296
+ * Override or extend the styles applied to the component.
297
+ */
298
+ classes: e.object,
299
+ /**
300
+ * @ignore
301
+ */
302
+ className: e.string,
303
+ /**
304
+ * The component used for the root node.
305
+ * Either a string to use a HTML element or a component.
306
+ */
307
+ component: e.elementType,
308
+ /**
309
+ * Shadow depth, corresponds to `dp` in the spec.
310
+ * It accepts values between 0 and 24 inclusive.
311
+ * @default 1
312
+ */
313
+ elevation: Ie(Fe, (t) => {
314
+ const {
315
+ elevation: n,
316
+ variant: r
317
+ } = t;
318
+ return n > 0 && r === "outlined" ? new Error(`MUI: Combining \`elevation={${n}}\` with \`variant="${r}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`) : null;
319
+ }),
320
+ /**
321
+ * If `true`, rounded corners are disabled.
322
+ * @default false
323
+ */
324
+ square: e.bool,
325
+ /**
326
+ * @ignore
327
+ */
328
+ style: e.object,
329
+ /**
330
+ * The system prop that allows defining system overrides as well as additional CSS styles.
331
+ */
332
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
333
+ /**
334
+ * The variant to use.
335
+ * @default 'elevation'
336
+ */
337
+ variant: e.oneOfType([e.oneOf(["elevation", "outlined"]), e.string])
338
+ });
339
+ function Pe(t, n, r, o, i) {
340
+ if (process.env.NODE_ENV === "production")
341
+ return null;
342
+ const s = t[n], a = i || n;
343
+ return s == null ? null : s && s.nodeType !== 1 ? new Error(`Invalid ${o} \`${a}\` supplied to \`${r}\`. Expected an HTMLElement.`) : null;
344
+ }
345
+ function qe(t) {
346
+ return typeof t == "function" ? t() : t;
347
+ }
348
+ const W = /* @__PURE__ */ c.forwardRef(function(n, r) {
349
+ const {
350
+ children: o,
351
+ container: i,
352
+ disablePortal: s = !1
353
+ } = n, [a, l] = c.useState(null), u = G(/* @__PURE__ */ c.isValidElement(o) ? re(o) : null, r);
354
+ if (ue(() => {
355
+ s || l(qe(i) || document.body);
356
+ }, [i, s]), ue(() => {
357
+ if (a && !s)
358
+ return me(r, a), () => {
359
+ me(r, null);
360
+ };
361
+ }, [r, a, s]), s) {
362
+ if (/* @__PURE__ */ c.isValidElement(o)) {
363
+ const h = {
364
+ ref: u
365
+ };
366
+ return /* @__PURE__ */ c.cloneElement(o, h);
367
+ }
368
+ return o;
369
+ }
370
+ return a && /* @__PURE__ */ De.createPortal(o, a);
371
+ });
372
+ process.env.NODE_ENV !== "production" && (W.propTypes = {
373
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
374
+ // │ These PropTypes are generated from the TypeScript type definitions. │
375
+ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
376
+ // └─────────────────────────────────────────────────────────────────────┘
377
+ /**
378
+ * The children to render into the `container`.
379
+ */
380
+ children: e.node,
381
+ /**
382
+ * An HTML element or function that returns one.
383
+ * The `container` will have the portal children appended to it.
384
+ *
385
+ * You can also provide a callback, which is called in a React layout effect.
386
+ * This lets you set the container from a ref, and also makes server-side rendering possible.
387
+ *
388
+ * By default, it uses the body of the top-level document object,
389
+ * so it's simply `document.body` most of the time.
390
+ */
391
+ container: e.oneOfType([Pe, e.func]),
392
+ /**
393
+ * The `children` will be under the DOM hierarchy of the parent component.
394
+ * @default false
395
+ */
396
+ disablePortal: e.bool
397
+ });
398
+ process.env.NODE_ENV !== "production" && (W.propTypes = xe(W.propTypes));
399
+ function U(t) {
400
+ let n = t.activeElement;
401
+ for (; n?.shadowRoot?.activeElement != null; )
402
+ n = n.shadowRoot.activeElement;
403
+ return n;
404
+ }
405
+ const Ke = ["input", "select", "textarea", "a[href]", "button", "[tabindex]", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])'].join(",");
406
+ function _e(t) {
407
+ const n = parseInt(t.getAttribute("tabindex") || "", 10);
408
+ return Number.isNaN(n) ? t.contentEditable === "true" || (t.nodeName === "AUDIO" || t.nodeName === "VIDEO" || t.nodeName === "DETAILS") && t.getAttribute("tabindex") === null ? 0 : t.tabIndex : n;
409
+ }
410
+ function We(t) {
411
+ if (t.tagName !== "INPUT" || t.type !== "radio" || !t.name)
412
+ return !1;
413
+ const n = (o) => t.ownerDocument.querySelector(`input[type="radio"]${o}`);
414
+ let r = n(`[name="${t.name}"]:checked`);
415
+ return r || (r = n(`[name="${t.name}"]`)), r !== t;
416
+ }
417
+ function ze(t) {
418
+ return !(t.disabled || t.tagName === "INPUT" && t.type === "hidden" || We(t));
419
+ }
420
+ function Ye(t) {
421
+ const n = [], r = [];
422
+ return Array.from(t.querySelectorAll(Ke)).forEach((o, i) => {
423
+ const s = _e(o);
424
+ s === -1 || !ze(o) || (s === 0 ? n.push(o) : r.push({
425
+ documentOrder: i,
426
+ tabIndex: s,
427
+ node: o
428
+ }));
429
+ }), r.sort((o, i) => o.tabIndex === i.tabIndex ? o.documentOrder - i.documentOrder : o.tabIndex - i.tabIndex).map((o) => o.node).concat(n);
430
+ }
431
+ function Ge() {
432
+ return !0;
433
+ }
434
+ function z(t) {
435
+ const {
436
+ children: n,
437
+ disableAutoFocus: r = !1,
438
+ disableEnforceFocus: o = !1,
439
+ disableRestoreFocus: i = !1,
440
+ getTabbable: s = Ye,
441
+ isEnabled: a = Ge,
442
+ open: l
443
+ } = t, u = c.useRef(!1), h = c.useRef(null), T = c.useRef(null), v = c.useRef(null), x = c.useRef(null), y = c.useRef(!1), b = c.useRef(null), S = G(re(n), b), R = c.useRef(null);
444
+ c.useEffect(() => {
445
+ !l || !b.current || (y.current = !r);
446
+ }, [r, l]), c.useEffect(() => {
447
+ if (!l || !b.current)
448
+ return;
449
+ const f = A(b.current), m = U(f);
450
+ return b.current.contains(m) || (b.current.hasAttribute("tabIndex") || (process.env.NODE_ENV !== "production" && console.error(["MUI: The modal content node does not accept focus.", 'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
451
+ `)), b.current.setAttribute("tabIndex", "-1")), y.current && b.current.focus()), () => {
452
+ i || (v.current && v.current.focus && (u.current = !0, v.current.focus()), v.current = null);
453
+ };
454
+ }, [l]), c.useEffect(() => {
455
+ if (!l || !b.current)
456
+ return;
457
+ const f = A(b.current), m = (g) => {
458
+ if (R.current = g, o || !a() || g.key !== "Tab")
459
+ return;
460
+ U(f) === b.current && g.shiftKey && (u.current = !0, T.current && T.current.focus());
461
+ }, C = () => {
462
+ const g = b.current;
463
+ if (g === null)
464
+ return;
465
+ const O = U(f);
466
+ if (!f.hasFocus() || !a() || u.current) {
467
+ u.current = !1;
468
+ return;
469
+ }
470
+ if (g.contains(O) || o && O !== h.current && O !== T.current)
471
+ return;
472
+ if (O !== x.current)
473
+ x.current = null;
474
+ else if (x.current !== null)
475
+ return;
476
+ if (!y.current)
477
+ return;
478
+ let P = [];
479
+ if ((O === h.current || O === T.current) && (P = s(b.current)), P.length > 0) {
480
+ const F = !!(R.current?.shiftKey && R.current?.key === "Tab"), I = P[0], D = P[P.length - 1];
481
+ typeof I != "string" && typeof D != "string" && (F ? D.focus() : I.focus());
482
+ } else
483
+ g.focus();
484
+ };
485
+ f.addEventListener("focusin", C), f.addEventListener("keydown", m, !0);
486
+ const w = setInterval(() => {
487
+ const g = U(f);
488
+ g && g.tagName === "BODY" && C();
489
+ }, 50);
490
+ return () => {
491
+ clearInterval(w), f.removeEventListener("focusin", C), f.removeEventListener("keydown", m, !0);
492
+ };
493
+ }, [r, o, i, a, l, s]);
494
+ const k = (f) => {
495
+ v.current === null && (v.current = f.relatedTarget), y.current = !0, x.current = f.target;
496
+ const m = n.props.onFocus;
497
+ m && m(f);
498
+ }, N = (f) => {
499
+ v.current === null && (v.current = f.relatedTarget), y.current = !0;
500
+ };
501
+ return /* @__PURE__ */ Te(c.Fragment, {
502
+ children: [/* @__PURE__ */ M("div", {
503
+ tabIndex: l ? 0 : -1,
504
+ onFocus: N,
505
+ ref: h,
506
+ "data-testid": "sentinelStart"
507
+ }), /* @__PURE__ */ c.cloneElement(n, {
508
+ ref: S,
509
+ onFocus: k
510
+ }), /* @__PURE__ */ M("div", {
511
+ tabIndex: l ? 0 : -1,
512
+ onFocus: N,
513
+ ref: T,
514
+ "data-testid": "sentinelEnd"
515
+ })]
516
+ });
517
+ }
518
+ process.env.NODE_ENV !== "production" && (z.propTypes = {
519
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
520
+ // │ These PropTypes are generated from the TypeScript type definitions. │
521
+ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
522
+ // └─────────────────────────────────────────────────────────────────────┘
523
+ /**
524
+ * A single child content element.
525
+ */
526
+ children: se,
527
+ /**
528
+ * If `true`, the focus trap will not automatically shift focus to itself when it opens, and
529
+ * replace it to the last focused element when it closes.
530
+ * This also works correctly with any focus trap children that have the `disableAutoFocus` prop.
531
+ *
532
+ * Generally this should never be set to `true` as it makes the focus trap less
533
+ * accessible to assistive technologies, like screen readers.
534
+ * @default false
535
+ */
536
+ disableAutoFocus: e.bool,
537
+ /**
538
+ * If `true`, the focus trap will not prevent focus from leaving the focus trap while open.
539
+ *
540
+ * Generally this should never be set to `true` as it makes the focus trap less
541
+ * accessible to assistive technologies, like screen readers.
542
+ * @default false
543
+ */
544
+ disableEnforceFocus: e.bool,
545
+ /**
546
+ * If `true`, the focus trap will not restore focus to previously focused element once
547
+ * focus trap is hidden or unmounted.
548
+ * @default false
549
+ */
550
+ disableRestoreFocus: e.bool,
551
+ /**
552
+ * Returns an array of ordered tabbable nodes (i.e. in tab order) within the root.
553
+ * For instance, you can provide the "tabbable" npm dependency.
554
+ * @param {HTMLElement} root
555
+ */
556
+ getTabbable: e.func,
557
+ /**
558
+ * This prop extends the `open` prop.
559
+ * It allows to toggle the open state without having to wait for a rerender when changing the `open` prop.
560
+ * This prop should be memoized.
561
+ * It can be used to support multiple focus trap mounted at the same time.
562
+ * @default function defaultIsEnabled(): boolean {
563
+ * return true;
564
+ * }
565
+ */
566
+ isEnabled: e.func,
567
+ /**
568
+ * If `true`, focus is locked.
569
+ */
570
+ open: e.bool.isRequired
571
+ });
572
+ process.env.NODE_ENV !== "production" && (z.propTypes = xe(z.propTypes));
573
+ function Xe(t = window) {
574
+ const n = t.document.documentElement.clientWidth;
575
+ return t.innerWidth - n;
576
+ }
577
+ function Je(t) {
578
+ const n = A(t);
579
+ return n.body === t ? _(t).innerWidth > n.documentElement.clientWidth : t.scrollHeight > t.clientHeight;
580
+ }
581
+ function L(t, n) {
582
+ n ? t.setAttribute("aria-hidden", "true") : t.removeAttribute("aria-hidden");
583
+ }
584
+ function he(t) {
585
+ return parseFloat(_(t).getComputedStyle(t).paddingRight) || 0;
586
+ }
587
+ function Qe(t) {
588
+ const r = ["TEMPLATE", "SCRIPT", "STYLE", "LINK", "MAP", "META", "NOSCRIPT", "PICTURE", "COL", "COLGROUP", "PARAM", "SLOT", "SOURCE", "TRACK"].includes(t.tagName), o = t.tagName === "INPUT" && t.getAttribute("type") === "hidden";
589
+ return r || o;
590
+ }
591
+ function ve(t, n, r, o, i) {
592
+ const s = [n, r, ...o];
593
+ [].forEach.call(t.children, (a) => {
594
+ const l = !s.includes(a), u = !Qe(a);
595
+ l && u && L(a, i);
596
+ });
597
+ }
598
+ function Z(t, n) {
599
+ let r = -1;
600
+ return t.some((o, i) => n(o) ? (r = i, !0) : !1), r;
601
+ }
602
+ function Ze(t, n) {
603
+ const r = [], o = t.container;
604
+ if (!n.disableScrollLock) {
605
+ if (Je(o)) {
606
+ const a = Xe(_(o));
607
+ r.push({
608
+ value: o.style.paddingRight,
609
+ property: "padding-right",
610
+ el: o
611
+ }), o.style.paddingRight = `${he(o) + a}px`;
612
+ const l = A(o).querySelectorAll(".mui-fixed");
613
+ [].forEach.call(l, (u) => {
614
+ r.push({
615
+ value: u.style.paddingRight,
616
+ property: "padding-right",
617
+ el: u
618
+ }), u.style.paddingRight = `${he(u) + a}px`;
619
+ });
620
+ }
621
+ let s;
622
+ if (o.parentNode instanceof DocumentFragment)
623
+ s = A(o).body;
624
+ else {
625
+ const a = o.parentElement, l = _(o);
626
+ s = a?.nodeName === "HTML" && l.getComputedStyle(a).overflowY === "scroll" ? a : o;
627
+ }
628
+ r.push({
629
+ value: s.style.overflow,
630
+ property: "overflow",
631
+ el: s
632
+ }, {
633
+ value: s.style.overflowX,
634
+ property: "overflow-x",
635
+ el: s
636
+ }, {
637
+ value: s.style.overflowY,
638
+ property: "overflow-y",
639
+ el: s
640
+ }), s.style.overflow = "hidden";
641
+ }
642
+ return () => {
643
+ r.forEach(({
644
+ value: s,
645
+ el: a,
646
+ property: l
647
+ }) => {
648
+ s ? a.style.setProperty(l, s) : a.style.removeProperty(l);
649
+ });
650
+ };
651
+ }
652
+ function et(t) {
653
+ const n = [];
654
+ return [].forEach.call(t.children, (r) => {
655
+ r.getAttribute("aria-hidden") === "true" && n.push(r);
656
+ }), n;
657
+ }
658
+ class tt {
659
+ constructor() {
660
+ this.modals = [], this.containers = [];
661
+ }
662
+ add(n, r) {
663
+ let o = this.modals.indexOf(n);
664
+ if (o !== -1)
665
+ return o;
666
+ o = this.modals.length, this.modals.push(n), n.modalRef && L(n.modalRef, !1);
667
+ const i = et(r);
668
+ ve(r, n.mount, n.modalRef, i, !0);
669
+ const s = Z(this.containers, (a) => a.container === r);
670
+ return s !== -1 ? (this.containers[s].modals.push(n), o) : (this.containers.push({
671
+ modals: [n],
672
+ container: r,
673
+ restore: null,
674
+ hiddenSiblings: i
675
+ }), o);
676
+ }
677
+ mount(n, r) {
678
+ const o = Z(this.containers, (s) => s.modals.includes(n)), i = this.containers[o];
679
+ i.restore || (i.restore = Ze(i, r));
680
+ }
681
+ remove(n, r = !0) {
682
+ const o = this.modals.indexOf(n);
683
+ if (o === -1)
684
+ return o;
685
+ const i = Z(this.containers, (a) => a.modals.includes(n)), s = this.containers[i];
686
+ if (s.modals.splice(s.modals.indexOf(n), 1), this.modals.splice(o, 1), s.modals.length === 0)
687
+ s.restore && s.restore(), n.modalRef && L(n.modalRef, r), ve(s.container, n.mount, n.modalRef, s.hiddenSiblings, !1), this.containers.splice(i, 1);
688
+ else {
689
+ const a = s.modals[s.modals.length - 1];
690
+ a.modalRef && L(a.modalRef, !1);
691
+ }
692
+ return o;
693
+ }
694
+ isTopModal(n) {
695
+ return this.modals.length > 0 && this.modals[this.modals.length - 1] === n;
696
+ }
697
+ }
698
+ function nt(t) {
699
+ return ee("MuiBackdrop", t);
700
+ }
701
+ te("MuiBackdrop", ["root", "invisible"]);
702
+ const ot = (t) => {
703
+ const {
704
+ classes: n,
705
+ invisible: r
706
+ } = t;
707
+ return oe({
708
+ root: ["root", r && "invisible"]
709
+ }, nt, n);
710
+ }, rt = Y("div", {
711
+ name: "MuiBackdrop",
712
+ slot: "Root",
713
+ overridesResolver: (t, n) => {
714
+ const {
715
+ ownerState: r
716
+ } = t;
717
+ return [n.root, r.invisible && n.invisible];
718
+ }
719
+ })({
720
+ position: "fixed",
721
+ display: "flex",
722
+ alignItems: "center",
723
+ justifyContent: "center",
724
+ right: 0,
725
+ bottom: 0,
726
+ top: 0,
727
+ left: 0,
728
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
729
+ WebkitTapHighlightColor: "transparent",
730
+ variants: [{
731
+ props: {
732
+ invisible: !0
733
+ },
734
+ style: {
735
+ backgroundColor: "transparent"
736
+ }
737
+ }]
738
+ }), ke = /* @__PURE__ */ c.forwardRef(function(n, r) {
739
+ const o = ne({
740
+ props: n,
741
+ name: "MuiBackdrop"
742
+ }), {
743
+ children: i,
744
+ className: s,
745
+ component: a = "div",
746
+ invisible: l = !1,
747
+ open: u,
748
+ components: h = {},
749
+ componentsProps: T = {},
750
+ slotProps: v = {},
751
+ slots: x = {},
752
+ TransitionComponent: y,
753
+ transitionDuration: b,
754
+ ...S
755
+ } = o, R = {
756
+ ...o,
757
+ component: a,
758
+ invisible: l
759
+ }, k = ot(R), N = {
760
+ transition: y,
761
+ root: h.Root,
762
+ ...x
763
+ }, f = {
764
+ ...T,
765
+ ...v
766
+ }, m = {
767
+ component: a,
768
+ slots: N,
769
+ slotProps: f
770
+ }, [C, w] = K("root", {
771
+ elementType: rt,
772
+ externalForwardedProps: m,
773
+ className: q(k.root, s),
774
+ ownerState: R
775
+ }), [g, O] = K("transition", {
776
+ elementType: Re,
777
+ externalForwardedProps: m,
778
+ ownerState: R
779
+ });
780
+ return /* @__PURE__ */ M(g, {
781
+ in: u,
782
+ timeout: b,
783
+ ...S,
784
+ ...O,
785
+ children: /* @__PURE__ */ M(C, {
786
+ "aria-hidden": !0,
787
+ ...w,
788
+ ref: r,
789
+ children: i
790
+ })
791
+ });
792
+ });
793
+ process.env.NODE_ENV !== "production" && (ke.propTypes = {
794
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
795
+ // │ These PropTypes are generated from the TypeScript type definitions. │
796
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
797
+ // └─────────────────────────────────────────────────────────────────────┘
798
+ /**
799
+ * The content of the component.
800
+ */
801
+ children: e.node,
802
+ /**
803
+ * Override or extend the styles applied to the component.
804
+ */
805
+ classes: e.object,
806
+ /**
807
+ * @ignore
808
+ */
809
+ className: e.string,
810
+ /**
811
+ * The component used for the root node.
812
+ * Either a string to use a HTML element or a component.
813
+ */
814
+ component: e.elementType,
815
+ /**
816
+ * The components used for each slot inside.
817
+ *
818
+ * @deprecated Use the `slots` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
819
+ *
820
+ * @default {}
821
+ */
822
+ components: e.shape({
823
+ Root: e.elementType
824
+ }),
825
+ /**
826
+ * The extra props for the slot components.
827
+ * You can override the existing props or add new ones.
828
+ *
829
+ * @deprecated Use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
830
+ *
831
+ * @default {}
832
+ */
833
+ componentsProps: e.shape({
834
+ root: e.object
835
+ }),
836
+ /**
837
+ * If `true`, the backdrop is invisible.
838
+ * It can be used when rendering a popover or a custom select component.
839
+ * @default false
840
+ */
841
+ invisible: e.bool,
842
+ /**
843
+ * If `true`, the component is shown.
844
+ */
845
+ open: e.bool.isRequired,
846
+ /**
847
+ * The props used for each slot inside.
848
+ * @default {}
849
+ */
850
+ slotProps: e.shape({
851
+ root: e.oneOfType([e.func, e.object]),
852
+ transition: e.oneOfType([e.func, e.object])
853
+ }),
854
+ /**
855
+ * The components used for each slot inside.
856
+ * @default {}
857
+ */
858
+ slots: e.shape({
859
+ root: e.elementType,
860
+ transition: e.elementType
861
+ }),
862
+ /**
863
+ * The system prop that allows defining system overrides as well as additional CSS styles.
864
+ */
865
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
866
+ /**
867
+ * The component used for the transition.
868
+ * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
869
+ * @default Fade
870
+ * @deprecated Use `slots.transition` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
871
+ */
872
+ TransitionComponent: e.elementType,
873
+ /**
874
+ * The duration for the transition, in milliseconds.
875
+ * You may specify a single timeout for all transitions, or individually with an object.
876
+ */
877
+ transitionDuration: e.oneOfType([e.number, e.shape({
878
+ appear: e.number,
879
+ enter: e.number,
880
+ exit: e.number
881
+ })])
882
+ });
883
+ function st(t) {
884
+ return typeof t == "function" ? t() : t;
885
+ }
886
+ function it(t) {
887
+ return t ? t.props.hasOwnProperty("in") : !1;
888
+ }
889
+ const Ee = () => {
890
+ }, V = new tt();
891
+ function at(t) {
892
+ const {
893
+ container: n,
894
+ disableEscapeKeyDown: r = !1,
895
+ disableScrollLock: o = !1,
896
+ closeAfterTransition: i = !1,
897
+ onTransitionEnter: s,
898
+ onTransitionExited: a,
899
+ children: l,
900
+ onClose: u,
901
+ open: h,
902
+ rootRef: T
903
+ } = t, v = c.useRef({}), x = c.useRef(null), y = c.useRef(null), b = G(y, T), [S, R] = c.useState(!h), k = it(l);
904
+ let N = !0;
905
+ (t["aria-hidden"] === "false" || t["aria-hidden"] === !1) && (N = !1);
906
+ const f = () => A(x.current), m = () => (v.current.modalRef = y.current, v.current.mount = x.current, v.current), C = () => {
907
+ V.mount(m(), {
908
+ disableScrollLock: o
909
+ }), y.current && (y.current.scrollTop = 0);
910
+ }, w = pe(() => {
911
+ const p = st(n) || f().body;
912
+ V.add(m(), p), y.current && C();
913
+ }), g = () => V.isTopModal(m()), O = pe((p) => {
914
+ x.current = p, p && (h && g() ? C() : y.current && L(y.current, N));
915
+ }), P = c.useCallback(() => {
916
+ V.remove(m(), N);
917
+ }, [N]);
918
+ c.useEffect(() => () => {
919
+ P();
920
+ }, [P]), c.useEffect(() => {
921
+ h ? w() : (!k || !i) && P();
922
+ }, [h, P, k, i, w]);
923
+ const F = (p) => (d) => {
924
+ p.onKeyDown?.(d), !(d.key !== "Escape" || d.which === 229 || // Wait until IME is settled.
925
+ !g()) && (r || (d.stopPropagation(), u && u(d, "escapeKeyDown")));
926
+ }, I = (p) => (d) => {
927
+ p.onClick?.(d), d.target === d.currentTarget && u && u(d, "backdropClick");
928
+ };
929
+ return {
930
+ getRootProps: (p = {}) => {
931
+ const d = Ae(t);
932
+ delete d.onTransitionEnter, delete d.onTransitionExited;
933
+ const $ = {
934
+ ...d,
935
+ ...p
936
+ };
937
+ return {
938
+ /*
939
+ * Marking an element with the role presentation indicates to assistive technology
940
+ * that this element should be ignored; it exists to support the web application and
941
+ * is not meant for humans to interact with directly.
942
+ * https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md
943
+ */
944
+ role: "presentation",
945
+ ...$,
946
+ onKeyDown: F($),
947
+ ref: b
948
+ };
949
+ },
950
+ getBackdropProps: (p = {}) => {
951
+ const d = p;
952
+ return {
953
+ "aria-hidden": !0,
954
+ ...d,
955
+ onClick: I(d),
956
+ open: h
957
+ };
958
+ },
959
+ getTransitionProps: () => {
960
+ const p = () => {
961
+ R(!1), s && s();
962
+ }, d = () => {
963
+ R(!0), a && a(), i && P();
964
+ };
965
+ return {
966
+ onEnter: be(p, l?.props.onEnter ?? Ee),
967
+ onExited: be(d, l?.props.onExited ?? Ee)
968
+ };
969
+ },
970
+ rootRef: b,
971
+ portalRef: O,
972
+ isTopModal: g,
973
+ exited: S,
974
+ hasTransition: k
975
+ };
976
+ }
977
+ function lt(t) {
978
+ return ee("MuiModal", t);
979
+ }
980
+ te("MuiModal", ["root", "hidden", "backdrop"]);
981
+ const ct = (t) => {
982
+ const {
983
+ open: n,
984
+ exited: r,
985
+ classes: o
986
+ } = t;
987
+ return oe({
988
+ root: ["root", !n && r && "hidden"],
989
+ backdrop: ["backdrop"]
990
+ }, lt, o);
991
+ }, dt = Y("div", {
992
+ name: "MuiModal",
993
+ slot: "Root",
994
+ overridesResolver: (t, n) => {
995
+ const {
996
+ ownerState: r
997
+ } = t;
998
+ return [n.root, !r.open && r.exited && n.hidden];
999
+ }
1000
+ })(ye(({
1001
+ theme: t
1002
+ }) => ({
1003
+ position: "fixed",
1004
+ zIndex: (t.vars || t).zIndex.modal,
1005
+ right: 0,
1006
+ bottom: 0,
1007
+ top: 0,
1008
+ left: 0,
1009
+ variants: [{
1010
+ props: ({
1011
+ ownerState: n
1012
+ }) => !n.open && n.exited,
1013
+ style: {
1014
+ visibility: "hidden"
1015
+ }
1016
+ }]
1017
+ }))), ut = Y(ke, {
1018
+ name: "MuiModal",
1019
+ slot: "Backdrop"
1020
+ })({
1021
+ zIndex: -1
1022
+ }), pt = /* @__PURE__ */ c.forwardRef(function(n, r) {
1023
+ const o = ne({
1024
+ name: "MuiModal",
1025
+ props: n
1026
+ }), {
1027
+ BackdropComponent: i = ut,
1028
+ BackdropProps: s,
1029
+ classes: a,
1030
+ className: l,
1031
+ closeAfterTransition: u = !1,
1032
+ children: h,
1033
+ container: T,
1034
+ component: v,
1035
+ components: x = {},
1036
+ componentsProps: y = {},
1037
+ disableAutoFocus: b = !1,
1038
+ disableEnforceFocus: S = !1,
1039
+ disableEscapeKeyDown: R = !1,
1040
+ disablePortal: k = !1,
1041
+ disableRestoreFocus: N = !1,
1042
+ disableScrollLock: f = !1,
1043
+ hideBackdrop: m = !1,
1044
+ keepMounted: C = !1,
1045
+ onClose: w,
1046
+ onTransitionEnter: g,
1047
+ onTransitionExited: O,
1048
+ open: P,
1049
+ slotProps: F = {},
1050
+ slots: I = {},
1051
+ // eslint-disable-next-line react/prop-types
1052
+ theme: D,
1053
+ ...X
1054
+ } = o, E = {
1055
+ ...o,
1056
+ closeAfterTransition: u,
1057
+ disableAutoFocus: b,
1058
+ disableEnforceFocus: S,
1059
+ disableEscapeKeyDown: R,
1060
+ disablePortal: k,
1061
+ disableRestoreFocus: N,
1062
+ disableScrollLock: f,
1063
+ hideBackdrop: m,
1064
+ keepMounted: C
1065
+ }, {
1066
+ getRootProps: p,
1067
+ getBackdropProps: d,
1068
+ getTransitionProps: $,
1069
+ portalRef: Ne,
1070
+ isTopModal: we,
1071
+ exited: ie,
1072
+ hasTransition: ae
1073
+ } = at({
1074
+ ...E,
1075
+ rootRef: r
1076
+ }), B = {
1077
+ ...E,
1078
+ exited: ie
1079
+ }, J = ct(B), H = {};
1080
+ if (h.props.tabIndex === void 0 && (H.tabIndex = "-1"), ae) {
1081
+ const {
1082
+ onEnter: j,
1083
+ onExited: Q
1084
+ } = $();
1085
+ H.onEnter = j, H.onExited = Q;
1086
+ }
1087
+ const le = {
1088
+ slots: {
1089
+ root: x.Root,
1090
+ backdrop: x.Backdrop,
1091
+ ...I
1092
+ },
1093
+ slotProps: {
1094
+ ...y,
1095
+ ...F
1096
+ }
1097
+ }, [Oe, Ce] = K("root", {
1098
+ ref: r,
1099
+ elementType: dt,
1100
+ externalForwardedProps: {
1101
+ ...le,
1102
+ ...X,
1103
+ component: v
1104
+ },
1105
+ getSlotProps: p,
1106
+ ownerState: B,
1107
+ className: q(l, J?.root, !B.open && B.exited && J?.hidden)
1108
+ }), [Se, Me] = K("backdrop", {
1109
+ ref: s?.ref,
1110
+ elementType: i,
1111
+ externalForwardedProps: le,
1112
+ shouldForwardComponentProp: !0,
1113
+ additionalProps: s,
1114
+ getSlotProps: (j) => d({
1115
+ ...j,
1116
+ onClick: (Q) => {
1117
+ j?.onClick && j.onClick(Q);
1118
+ }
1119
+ }),
1120
+ className: q(s?.className, J?.backdrop),
1121
+ ownerState: B
1122
+ });
1123
+ return !C && !P && (!ae || ie) ? null : /* @__PURE__ */ M(W, {
1124
+ ref: Ne,
1125
+ container: T,
1126
+ disablePortal: k,
1127
+ children: /* @__PURE__ */ Te(Oe, {
1128
+ ...Ce,
1129
+ children: [!m && i ? /* @__PURE__ */ M(Se, {
1130
+ ...Me
1131
+ }) : null, /* @__PURE__ */ M(z, {
1132
+ disableEnforceFocus: S,
1133
+ disableAutoFocus: b,
1134
+ disableRestoreFocus: N,
1135
+ isEnabled: we,
1136
+ open: P,
1137
+ children: /* @__PURE__ */ c.cloneElement(h, H)
1138
+ })]
1139
+ })
1140
+ });
1141
+ });
1142
+ process.env.NODE_ENV !== "production" && (pt.propTypes = {
1143
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
1144
+ // │ These PropTypes are generated from the TypeScript type definitions. │
1145
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1146
+ // └─────────────────────────────────────────────────────────────────────┘
1147
+ /**
1148
+ * A backdrop component. This prop enables custom backdrop rendering.
1149
+ * @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.
1150
+ * Use the `slots.backdrop` prop to make your application ready for the next version of Material UI.
1151
+ * @default styled(Backdrop, {
1152
+ * name: 'MuiModal',
1153
+ * slot: 'Backdrop',
1154
+ * })({
1155
+ * zIndex: -1,
1156
+ * })
1157
+ */
1158
+ BackdropComponent: e.elementType,
1159
+ /**
1160
+ * Props applied to the [`Backdrop`](https://mui.com/material-ui/api/backdrop/) element.
1161
+ * @deprecated Use `slotProps.backdrop` instead.
1162
+ */
1163
+ BackdropProps: e.object,
1164
+ /**
1165
+ * A single child content element.
1166
+ */
1167
+ children: se.isRequired,
1168
+ /**
1169
+ * Override or extend the styles applied to the component.
1170
+ */
1171
+ classes: e.object,
1172
+ /**
1173
+ * @ignore
1174
+ */
1175
+ className: e.string,
1176
+ /**
1177
+ * When set to true the Modal waits until a nested Transition is completed before closing.
1178
+ * @default false
1179
+ */
1180
+ closeAfterTransition: e.bool,
1181
+ /**
1182
+ * The component used for the root node.
1183
+ * Either a string to use a HTML element or a component.
1184
+ */
1185
+ component: e.elementType,
1186
+ /**
1187
+ * The components used for each slot inside.
1188
+ *
1189
+ * @deprecated Use the `slots` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
1190
+ *
1191
+ * @default {}
1192
+ */
1193
+ components: e.shape({
1194
+ Backdrop: e.elementType,
1195
+ Root: e.elementType
1196
+ }),
1197
+ /**
1198
+ * The extra props for the slot components.
1199
+ * You can override the existing props or add new ones.
1200
+ *
1201
+ * @deprecated Use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
1202
+ *
1203
+ * @default {}
1204
+ */
1205
+ componentsProps: e.shape({
1206
+ backdrop: e.oneOfType([e.func, e.object]),
1207
+ root: e.oneOfType([e.func, e.object])
1208
+ }),
1209
+ /**
1210
+ * An HTML element or function that returns one.
1211
+ * The `container` will have the portal children appended to it.
1212
+ *
1213
+ * You can also provide a callback, which is called in a React layout effect.
1214
+ * This lets you set the container from a ref, and also makes server-side rendering possible.
1215
+ *
1216
+ * By default, it uses the body of the top-level document object,
1217
+ * so it's simply `document.body` most of the time.
1218
+ */
1219
+ container: e.oneOfType([Pe, e.func]),
1220
+ /**
1221
+ * If `true`, the modal will not automatically shift focus to itself when it opens, and
1222
+ * replace it to the last focused element when it closes.
1223
+ * This also works correctly with any modal children that have the `disableAutoFocus` prop.
1224
+ *
1225
+ * Generally this should never be set to `true` as it makes the modal less
1226
+ * accessible to assistive technologies, like screen readers.
1227
+ * @default false
1228
+ */
1229
+ disableAutoFocus: e.bool,
1230
+ /**
1231
+ * If `true`, the modal will not prevent focus from leaving the modal while open.
1232
+ *
1233
+ * Generally this should never be set to `true` as it makes the modal less
1234
+ * accessible to assistive technologies, like screen readers.
1235
+ * @default false
1236
+ */
1237
+ disableEnforceFocus: e.bool,
1238
+ /**
1239
+ * If `true`, hitting escape will not fire the `onClose` callback.
1240
+ * @default false
1241
+ */
1242
+ disableEscapeKeyDown: e.bool,
1243
+ /**
1244
+ * The `children` will be under the DOM hierarchy of the parent component.
1245
+ * @default false
1246
+ */
1247
+ disablePortal: e.bool,
1248
+ /**
1249
+ * If `true`, the modal will not restore focus to previously focused element once
1250
+ * modal is hidden or unmounted.
1251
+ * @default false
1252
+ */
1253
+ disableRestoreFocus: e.bool,
1254
+ /**
1255
+ * Disable the scroll lock behavior.
1256
+ * @default false
1257
+ */
1258
+ disableScrollLock: e.bool,
1259
+ /**
1260
+ * If `true`, the backdrop is not rendered.
1261
+ * @default false
1262
+ */
1263
+ hideBackdrop: e.bool,
1264
+ /**
1265
+ * Always keep the children in the DOM.
1266
+ * This prop can be useful in SEO situation or
1267
+ * when you want to maximize the responsiveness of the Modal.
1268
+ * @default false
1269
+ */
1270
+ keepMounted: e.bool,
1271
+ /**
1272
+ * Callback fired when the component requests to be closed.
1273
+ * The `reason` parameter can optionally be used to control the response to `onClose`.
1274
+ *
1275
+ * @param {object} event The event source of the callback.
1276
+ * @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`.
1277
+ */
1278
+ onClose: e.func,
1279
+ /**
1280
+ * A function called when a transition enters.
1281
+ */
1282
+ onTransitionEnter: e.func,
1283
+ /**
1284
+ * A function called when a transition has exited.
1285
+ */
1286
+ onTransitionExited: e.func,
1287
+ /**
1288
+ * If `true`, the component is shown.
1289
+ */
1290
+ open: e.bool.isRequired,
1291
+ /**
1292
+ * The props used for each slot inside the Modal.
1293
+ * @default {}
1294
+ */
1295
+ slotProps: e.shape({
1296
+ backdrop: e.oneOfType([e.func, e.object]),
1297
+ root: e.oneOfType([e.func, e.object])
1298
+ }),
1299
+ /**
1300
+ * The components used for each slot inside the Modal.
1301
+ * Either a string to use a HTML element or a component.
1302
+ * @default {}
1303
+ */
1304
+ slots: e.shape({
1305
+ backdrop: e.elementType,
1306
+ root: e.elementType
1307
+ }),
1308
+ /**
1309
+ * The system prop that allows defining system overrides as well as additional CSS styles.
1310
+ */
1311
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
1312
+ });
1313
+ export {
1314
+ ke as B,
1315
+ Re as F,
1316
+ Pe as H,
1317
+ pt as M,
1318
+ Ve as P,
1319
+ U as a,
1320
+ W as b,
1321
+ z as c,
1322
+ xt as d,
1323
+ Xe as g,
1324
+ _ as o
1325
+ };