@hai-dev/ui-kit 1.2.1 → 1.2.2

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 (46) hide show
  1. package/dist/assets/button.css +1 -1
  2. package/dist/assets/circular-progress-loader.css +1 -1
  3. package/dist/assets/code-input.css +1 -1
  4. package/dist/assets/error-upload-dialog.css +1 -1
  5. package/dist/assets/upload-dialog-errors.css +1 -1
  6. package/dist/button.module-BnTmlu-U.js +40 -0
  7. package/dist/components/button/button-content.js +8 -8
  8. package/dist/components/button/button.js +21 -22
  9. package/dist/components/button/utils/get-button-classnames.js +10 -10
  10. package/dist/components/circular-progress-loader/circular-progress-loader.js +25 -28
  11. package/dist/components/code-input/code-input.js +114 -915
  12. package/dist/components/code-input/types.d.ts +1 -0
  13. package/dist/components/photo-crop-uploader/components/error-upload-dialog/error-upload-dialog.js +25 -93
  14. package/dist/components/photo-crop-uploader/components/photo-list/photo-list.js +38 -120
  15. package/dist/components/photo-crop-uploader/components/upload-button/upload-button.js +16 -16
  16. package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog-errors.js +4 -5
  17. package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog.js +111 -403
  18. package/dist/components/photo-crop-uploader/photo-crop-uploader.js +12 -12
  19. package/dist/components/photo-crop-uploader/utils/draw-cropped-image.js +8 -8
  20. package/dist/components/photo-crop-uploader/utils/get-cropped-source.js +10 -10
  21. package/dist/components/photo-crop-uploader/utils/get-default-cropped-photo.js +10 -10
  22. package/dist/components/photo-crop-uploader/utils/get-photo-crop.js +18 -18
  23. package/dist/upload-dialog-errors-B7V0G-Ey.js +71 -0
  24. package/package.json +1 -1
  25. package/dist/Box-BgNAyP2L.js +0 -56
  26. package/dist/Button-DTV8ztWw.js +0 -660
  27. package/dist/ButtonBase-C4krg_zd.js +0 -913
  28. package/dist/CircularProgress-BoaEg4rF.js +0 -274
  29. package/dist/Dialog-BK9lMUKV.js +0 -2632
  30. package/dist/DialogTitle-ByUfLB5M.js +0 -254
  31. package/dist/Typography-BMyz0ZCh.js +0 -255
  32. package/dist/assets/inter.css +0 -1
  33. package/dist/button.module-C0UNQnBk.js +0 -40
  34. package/dist/chainPropTypes-DgqFdXGi.js +0 -532
  35. package/dist/createSimplePaletteValueFilter-B7--0ryQ.js +0 -17
  36. package/dist/createTheme-BoOmbNvy.js +0 -4119
  37. package/dist/extendSxProp-BaUCVMKV.js +0 -50
  38. package/dist/index-CcueJ2sD.js +0 -432
  39. package/dist/index-YnD2EP-S.js +0 -43
  40. package/dist/index-h5oTv8GF.js +0 -91
  41. package/dist/isHostComponent-Dm_U9uOy.js +0 -14
  42. package/dist/memoTheme-BYBJ2Fe6.js +0 -15
  43. package/dist/refType-CsohaiiT.js +0 -60
  44. package/dist/upload-dialog-errors-BwQsTOc3.js +0 -367
  45. package/dist/useEnhancedEffect-CJGo-L3B.js +0 -5
  46. package/dist/useId-CK6Kn3Tn.js +0 -21
@@ -1,2632 +0,0 @@
1
- import * as h from "react";
2
- import Y from "react";
3
- import { T as lt, P as e, g as ge, a as he, v as Le, c as B, x as Fe, b as X } from "./createTheme-BoOmbNvy.js";
4
- import { c as ct } from "./DialogTitle-ByUfLB5M.js";
5
- import { d as ut, u as be, c as ve, s as H, b as we } from "./chainPropTypes-DgqFdXGi.js";
6
- import { u as dt } from "./extendSxProp-BaUCVMKV.js";
7
- import { jsx as M, jsxs as Ze } from "react/jsx-runtime";
8
- import { m as _e } from "./memoTheme-BYBJ2Fe6.js";
9
- import { u as ie, a as je } from "./refType-CsohaiiT.js";
10
- import { i as pt, o as pe, a as Z } from "./isHostComponent-Dm_U9uOy.js";
11
- import { _ as ft, a as mt, T as Je } from "./ButtonBase-C4krg_zd.js";
12
- import { g as yt } from "./index-YnD2EP-S.js";
13
- import { u as gt } from "./useId-CK6Kn3Tn.js";
14
- import { u as $e } from "./useEnhancedEffect-CJGo-L3B.js";
15
- const ht = "exact-prop: ​";
16
- function Qe(t) {
17
- return process.env.NODE_ENV === "production" ? t : {
18
- ...t,
19
- [ht]: (n) => {
20
- const i = Object.keys(n).filter((r) => !t.hasOwnProperty(r));
21
- return i.length > 0 ? new Error(`The following props are not supported: ${i.map((r) => `\`${r}\``).join(", ")}. Please remove them.`) : null;
22
- }
23
- };
24
- }
25
- function Ce() {
26
- const t = dt(ut);
27
- return process.env.NODE_ENV !== "production" && h.useDebugValue(t), t[lt] || t;
28
- }
29
- function Be(...t) {
30
- return t.reduce((n, i) => i == null ? n : function(...a) {
31
- n.apply(this, a), i.apply(this, a);
32
- }, () => {
33
- });
34
- }
35
- function He(t, n) {
36
- typeof t == "function" ? t(n) : t && (t.current = n);
37
- }
38
- var ce = { exports: {} }, k = {};
39
- var We;
40
- function bt() {
41
- if (We) return k;
42
- We = 1;
43
- var t = Y;
44
- function n(u) {
45
- var l = "https://react.dev/errors/" + u;
46
- if (1 < arguments.length) {
47
- l += "?args[]=" + encodeURIComponent(arguments[1]);
48
- for (var m = 2; m < arguments.length; m++)
49
- l += "&args[]=" + encodeURIComponent(arguments[m]);
50
- }
51
- return "Minified React error #" + u + "; visit " + l + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
52
- }
53
- function i() {
54
- }
55
- var r = {
56
- d: {
57
- f: i,
58
- r: function() {
59
- throw Error(n(522));
60
- },
61
- D: i,
62
- C: i,
63
- L: i,
64
- m: i,
65
- X: i,
66
- S: i,
67
- M: i
68
- },
69
- p: 0,
70
- findDOMNode: null
71
- }, a = /* @__PURE__ */ Symbol.for("react.portal");
72
- function s(u, l, m) {
73
- var c = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
74
- return {
75
- $$typeof: a,
76
- key: c == null ? null : "" + c,
77
- children: u,
78
- containerInfo: l,
79
- implementation: m
80
- };
81
- }
82
- var d = t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
83
- function p(u, l) {
84
- if (u === "font") return "";
85
- if (typeof l == "string")
86
- return l === "use-credentials" ? l : "";
87
- }
88
- return k.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = r, k.createPortal = function(u, l) {
89
- var m = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
90
- if (!l || l.nodeType !== 1 && l.nodeType !== 9 && l.nodeType !== 11)
91
- throw Error(n(299));
92
- return s(u, l, null, m);
93
- }, k.flushSync = function(u) {
94
- var l = d.T, m = r.p;
95
- try {
96
- if (d.T = null, r.p = 2, u) return u();
97
- } finally {
98
- d.T = l, r.p = m, r.d.f();
99
- }
100
- }, k.preconnect = function(u, l) {
101
- typeof u == "string" && (l ? (l = l.crossOrigin, l = typeof l == "string" ? l === "use-credentials" ? l : "" : void 0) : l = null, r.d.C(u, l));
102
- }, k.prefetchDNS = function(u) {
103
- typeof u == "string" && r.d.D(u);
104
- }, k.preinit = function(u, l) {
105
- if (typeof u == "string" && l && typeof l.as == "string") {
106
- var m = l.as, c = p(m, l.crossOrigin), o = typeof l.integrity == "string" ? l.integrity : void 0, f = typeof l.fetchPriority == "string" ? l.fetchPriority : void 0;
107
- m === "style" ? r.d.S(
108
- u,
109
- typeof l.precedence == "string" ? l.precedence : void 0,
110
- {
111
- crossOrigin: c,
112
- integrity: o,
113
- fetchPriority: f
114
- }
115
- ) : m === "script" && r.d.X(u, {
116
- crossOrigin: c,
117
- integrity: o,
118
- fetchPriority: f,
119
- nonce: typeof l.nonce == "string" ? l.nonce : void 0
120
- });
121
- }
122
- }, k.preinitModule = function(u, l) {
123
- if (typeof u == "string")
124
- if (typeof l == "object" && l !== null) {
125
- if (l.as == null || l.as === "script") {
126
- var m = p(
127
- l.as,
128
- l.crossOrigin
129
- );
130
- r.d.M(u, {
131
- crossOrigin: m,
132
- integrity: typeof l.integrity == "string" ? l.integrity : void 0,
133
- nonce: typeof l.nonce == "string" ? l.nonce : void 0
134
- });
135
- }
136
- } else l == null && r.d.M(u);
137
- }, k.preload = function(u, l) {
138
- if (typeof u == "string" && typeof l == "object" && l !== null && typeof l.as == "string") {
139
- var m = l.as, c = p(m, l.crossOrigin);
140
- r.d.L(u, m, {
141
- crossOrigin: c,
142
- integrity: typeof l.integrity == "string" ? l.integrity : void 0,
143
- nonce: typeof l.nonce == "string" ? l.nonce : void 0,
144
- type: typeof l.type == "string" ? l.type : void 0,
145
- fetchPriority: typeof l.fetchPriority == "string" ? l.fetchPriority : void 0,
146
- referrerPolicy: typeof l.referrerPolicy == "string" ? l.referrerPolicy : void 0,
147
- imageSrcSet: typeof l.imageSrcSet == "string" ? l.imageSrcSet : void 0,
148
- imageSizes: typeof l.imageSizes == "string" ? l.imageSizes : void 0,
149
- media: typeof l.media == "string" ? l.media : void 0
150
- });
151
- }
152
- }, k.preloadModule = function(u, l) {
153
- if (typeof u == "string")
154
- if (l) {
155
- var m = p(l.as, l.crossOrigin);
156
- r.d.m(u, {
157
- as: typeof l.as == "string" && l.as !== "script" ? l.as : void 0,
158
- crossOrigin: m,
159
- integrity: typeof l.integrity == "string" ? l.integrity : void 0
160
- });
161
- } else r.d.m(u);
162
- }, k.requestFormReset = function(u) {
163
- r.d.r(u);
164
- }, k.unstable_batchedUpdates = function(u, l) {
165
- return u(l);
166
- }, k.useFormState = function(u, l, m) {
167
- return d.H.useFormState(u, l, m);
168
- }, k.useFormStatus = function() {
169
- return d.H.useHostTransitionStatus();
170
- }, k.version = "19.2.3", k;
171
- }
172
- var w = {};
173
- var Ue;
174
- function vt() {
175
- return Ue || (Ue = 1, process.env.NODE_ENV !== "production" && (function() {
176
- function t() {
177
- }
178
- function n(c) {
179
- return "" + c;
180
- }
181
- function i(c, o, f) {
182
- var y = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
183
- try {
184
- n(y);
185
- var E = !1;
186
- } catch {
187
- E = !0;
188
- }
189
- return E && (console.error(
190
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
191
- typeof Symbol == "function" && Symbol.toStringTag && y[Symbol.toStringTag] || y.constructor.name || "Object"
192
- ), n(y)), {
193
- $$typeof: l,
194
- key: y == null ? null : "" + y,
195
- children: c,
196
- containerInfo: o,
197
- implementation: f
198
- };
199
- }
200
- function r(c, o) {
201
- if (c === "font") return "";
202
- if (typeof o == "string")
203
- return o === "use-credentials" ? o : "";
204
- }
205
- function a(c) {
206
- return c === null ? "`null`" : c === void 0 ? "`undefined`" : c === "" ? "an empty string" : 'something with type "' + typeof c + '"';
207
- }
208
- function s(c) {
209
- return c === null ? "`null`" : c === void 0 ? "`undefined`" : c === "" ? "an empty string" : typeof c == "string" ? JSON.stringify(c) : typeof c == "number" ? "`" + c + "`" : 'something with type "' + typeof c + '"';
210
- }
211
- function d() {
212
- var c = m.H;
213
- return c === null && console.error(
214
- `Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
215
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
216
- 2. You might be breaking the Rules of Hooks
217
- 3. You might have more than one copy of React in the same app
218
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
219
- ), c;
220
- }
221
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
222
- var p = Y, u = {
223
- d: {
224
- f: t,
225
- r: function() {
226
- throw Error(
227
- "Invalid form element. requestFormReset must be passed a form that was rendered by React."
228
- );
229
- },
230
- D: t,
231
- C: t,
232
- L: t,
233
- m: t,
234
- X: t,
235
- S: t,
236
- M: t
237
- },
238
- p: 0,
239
- findDOMNode: null
240
- }, l = /* @__PURE__ */ Symbol.for("react.portal"), m = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
241
- typeof Map == "function" && Map.prototype != null && typeof Map.prototype.forEach == "function" && typeof Set == "function" && Set.prototype != null && typeof Set.prototype.clear == "function" && typeof Set.prototype.forEach == "function" || console.error(
242
- "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
243
- ), w.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = u, w.createPortal = function(c, o) {
244
- var f = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
245
- if (!o || o.nodeType !== 1 && o.nodeType !== 9 && o.nodeType !== 11)
246
- throw Error("Target container is not a DOM element.");
247
- return i(c, o, null, f);
248
- }, w.flushSync = function(c) {
249
- var o = m.T, f = u.p;
250
- try {
251
- if (m.T = null, u.p = 2, c)
252
- return c();
253
- } finally {
254
- m.T = o, u.p = f, u.d.f() && console.error(
255
- "flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
256
- );
257
- }
258
- }, w.preconnect = function(c, o) {
259
- typeof c == "string" && c ? o != null && typeof o != "object" ? console.error(
260
- "ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",
261
- s(o)
262
- ) : o != null && typeof o.crossOrigin != "string" && console.error(
263
- "ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",
264
- a(o.crossOrigin)
265
- ) : console.error(
266
- "ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
267
- a(c)
268
- ), typeof c == "string" && (o ? (o = o.crossOrigin, o = typeof o == "string" ? o === "use-credentials" ? o : "" : void 0) : o = null, u.d.C(c, o));
269
- }, w.prefetchDNS = function(c) {
270
- if (typeof c != "string" || !c)
271
- console.error(
272
- "ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
273
- a(c)
274
- );
275
- else if (1 < arguments.length) {
276
- var o = arguments[1];
277
- typeof o == "object" && o.hasOwnProperty("crossOrigin") ? console.error(
278
- "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
279
- s(o)
280
- ) : console.error(
281
- "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
282
- s(o)
283
- );
284
- }
285
- typeof c == "string" && u.d.D(c);
286
- }, w.preinit = function(c, o) {
287
- if (typeof c == "string" && c ? o == null || typeof o != "object" ? console.error(
288
- "ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
289
- s(o)
290
- ) : o.as !== "style" && o.as !== "script" && console.error(
291
- 'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',
292
- s(o.as)
293
- ) : console.error(
294
- "ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
295
- a(c)
296
- ), typeof c == "string" && o && typeof o.as == "string") {
297
- var f = o.as, y = r(f, o.crossOrigin), E = typeof o.integrity == "string" ? o.integrity : void 0, O = typeof o.fetchPriority == "string" ? o.fetchPriority : void 0;
298
- f === "style" ? u.d.S(
299
- c,
300
- typeof o.precedence == "string" ? o.precedence : void 0,
301
- {
302
- crossOrigin: y,
303
- integrity: E,
304
- fetchPriority: O
305
- }
306
- ) : f === "script" && u.d.X(c, {
307
- crossOrigin: y,
308
- integrity: E,
309
- fetchPriority: O,
310
- nonce: typeof o.nonce == "string" ? o.nonce : void 0
311
- });
312
- }
313
- }, w.preinitModule = function(c, o) {
314
- var f = "";
315
- typeof c == "string" && c || (f += " The `href` argument encountered was " + a(c) + "."), o !== void 0 && typeof o != "object" ? f += " The `options` argument encountered was " + a(o) + "." : o && "as" in o && o.as !== "script" && (f += " The `as` option encountered was " + s(o.as) + "."), f ? console.error(
316
- "ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",
317
- f
318
- ) : (f = o && typeof o.as == "string" ? o.as : "script", f) === "script" || (f = s(f), console.error(
319
- 'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',
320
- f,
321
- c
322
- )), typeof c == "string" && (typeof o == "object" && o !== null ? (o.as == null || o.as === "script") && (f = r(
323
- o.as,
324
- o.crossOrigin
325
- ), u.d.M(c, {
326
- crossOrigin: f,
327
- integrity: typeof o.integrity == "string" ? o.integrity : void 0,
328
- nonce: typeof o.nonce == "string" ? o.nonce : void 0
329
- })) : o == null && u.d.M(c));
330
- }, w.preload = function(c, o) {
331
- var f = "";
332
- if (typeof c == "string" && c || (f += " The `href` argument encountered was " + a(c) + "."), o == null || typeof o != "object" ? f += " The `options` argument encountered was " + a(o) + "." : typeof o.as == "string" && o.as || (f += " The `as` option encountered was " + a(o.as) + "."), f && console.error(
333
- 'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',
334
- f
335
- ), typeof c == "string" && typeof o == "object" && o !== null && typeof o.as == "string") {
336
- f = o.as;
337
- var y = r(
338
- f,
339
- o.crossOrigin
340
- );
341
- u.d.L(c, f, {
342
- crossOrigin: y,
343
- integrity: typeof o.integrity == "string" ? o.integrity : void 0,
344
- nonce: typeof o.nonce == "string" ? o.nonce : void 0,
345
- type: typeof o.type == "string" ? o.type : void 0,
346
- fetchPriority: typeof o.fetchPriority == "string" ? o.fetchPriority : void 0,
347
- referrerPolicy: typeof o.referrerPolicy == "string" ? o.referrerPolicy : void 0,
348
- imageSrcSet: typeof o.imageSrcSet == "string" ? o.imageSrcSet : void 0,
349
- imageSizes: typeof o.imageSizes == "string" ? o.imageSizes : void 0,
350
- media: typeof o.media == "string" ? o.media : void 0
351
- });
352
- }
353
- }, w.preloadModule = function(c, o) {
354
- var f = "";
355
- typeof c == "string" && c || (f += " The `href` argument encountered was " + a(c) + "."), o !== void 0 && typeof o != "object" ? f += " The `options` argument encountered was " + a(o) + "." : o && "as" in o && typeof o.as != "string" && (f += " The `as` option encountered was " + a(o.as) + "."), f && console.error(
356
- 'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',
357
- f
358
- ), typeof c == "string" && (o ? (f = r(
359
- o.as,
360
- o.crossOrigin
361
- ), u.d.m(c, {
362
- as: typeof o.as == "string" && o.as !== "script" ? o.as : void 0,
363
- crossOrigin: f,
364
- integrity: typeof o.integrity == "string" ? o.integrity : void 0
365
- })) : u.d.m(c));
366
- }, w.requestFormReset = function(c) {
367
- u.d.r(c);
368
- }, w.unstable_batchedUpdates = function(c, o) {
369
- return c(o);
370
- }, w.useFormState = function(c, o, f) {
371
- return d().useFormState(c, o, f);
372
- }, w.useFormStatus = function() {
373
- return d().useHostTransitionStatus();
374
- }, w.version = "19.2.3", typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
375
- })()), w;
376
- }
377
- var Ve;
378
- function Et() {
379
- if (Ve) return ce.exports;
380
- Ve = 1;
381
- function t() {
382
- if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function")) {
383
- if (process.env.NODE_ENV !== "production")
384
- throw new Error("^_^");
385
- try {
386
- __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t);
387
- } catch (n) {
388
- console.error(n);
389
- }
390
- }
391
- }
392
- return process.env.NODE_ENV === "production" ? (t(), ce.exports = bt()) : ce.exports = vt(), ce.exports;
393
- }
394
- var et = Et();
395
- const ue = /* @__PURE__ */ yt(et), qe = {
396
- disabled: !1
397
- };
398
- var Tt = process.env.NODE_ENV !== "production" ? e.oneOfType([e.number, e.shape({
399
- enter: e.number,
400
- exit: e.number,
401
- appear: e.number
402
- }).isRequired]) : null;
403
- process.env.NODE_ENV !== "production" && e.oneOfType([e.string, e.shape({
404
- enter: e.string,
405
- exit: e.string,
406
- active: e.string
407
- }), e.shape({
408
- enter: e.string,
409
- enterDone: e.string,
410
- enterActive: e.string,
411
- exit: e.string,
412
- exitDone: e.string,
413
- exitActive: e.string
414
- })]);
415
- var xt = function(n) {
416
- return n.scrollTop;
417
- }, re = "unmounted", U = "exited", V = "entering", z = "entered", De = "exiting", $ = /* @__PURE__ */ (function(t) {
418
- ft(n, t);
419
- function n(r, a) {
420
- var s;
421
- s = t.call(this, r, a) || this;
422
- var d = a, p = d && !d.isMounting ? r.enter : r.appear, u;
423
- return s.appearStatus = null, r.in ? p ? (u = U, s.appearStatus = V) : u = z : r.unmountOnExit || r.mountOnEnter ? u = re : u = U, s.state = {
424
- status: u
425
- }, s.nextCallback = null, s;
426
- }
427
- n.getDerivedStateFromProps = function(a, s) {
428
- var d = a.in;
429
- return d && s.status === re ? {
430
- status: U
431
- } : null;
432
- };
433
- var i = n.prototype;
434
- return i.componentDidMount = function() {
435
- this.updateStatus(!0, this.appearStatus);
436
- }, i.componentDidUpdate = function(a) {
437
- var s = null;
438
- if (a !== this.props) {
439
- var d = this.state.status;
440
- this.props.in ? d !== V && d !== z && (s = V) : (d === V || d === z) && (s = De);
441
- }
442
- this.updateStatus(!1, s);
443
- }, i.componentWillUnmount = function() {
444
- this.cancelNextCallback();
445
- }, i.getTimeouts = function() {
446
- var a = this.props.timeout, s, d, p;
447
- return s = d = p = a, a != null && typeof a != "number" && (s = a.exit, d = a.enter, p = a.appear !== void 0 ? a.appear : d), {
448
- exit: s,
449
- enter: d,
450
- appear: p
451
- };
452
- }, i.updateStatus = function(a, s) {
453
- if (a === void 0 && (a = !1), s !== null)
454
- if (this.cancelNextCallback(), s === V) {
455
- if (this.props.unmountOnExit || this.props.mountOnEnter) {
456
- var d = this.props.nodeRef ? this.props.nodeRef.current : ue.findDOMNode(this);
457
- d && xt(d);
458
- }
459
- this.performEnter(a);
460
- } else
461
- this.performExit();
462
- else this.props.unmountOnExit && this.state.status === U && this.setState({
463
- status: re
464
- });
465
- }, i.performEnter = function(a) {
466
- var s = this, d = this.props.enter, p = this.context ? this.context.isMounting : a, u = this.props.nodeRef ? [p] : [ue.findDOMNode(this), p], l = u[0], m = u[1], c = this.getTimeouts(), o = p ? c.appear : c.enter;
467
- if (!a && !d || qe.disabled) {
468
- this.safeSetState({
469
- status: z
470
- }, function() {
471
- s.props.onEntered(l);
472
- });
473
- return;
474
- }
475
- this.props.onEnter(l, m), this.safeSetState({
476
- status: V
477
- }, function() {
478
- s.props.onEntering(l, m), s.onTransitionEnd(o, function() {
479
- s.safeSetState({
480
- status: z
481
- }, function() {
482
- s.props.onEntered(l, m);
483
- });
484
- });
485
- });
486
- }, i.performExit = function() {
487
- var a = this, s = this.props.exit, d = this.getTimeouts(), p = this.props.nodeRef ? void 0 : ue.findDOMNode(this);
488
- if (!s || qe.disabled) {
489
- this.safeSetState({
490
- status: U
491
- }, function() {
492
- a.props.onExited(p);
493
- });
494
- return;
495
- }
496
- this.props.onExit(p), this.safeSetState({
497
- status: De
498
- }, function() {
499
- a.props.onExiting(p), a.onTransitionEnd(d.exit, function() {
500
- a.safeSetState({
501
- status: U
502
- }, function() {
503
- a.props.onExited(p);
504
- });
505
- });
506
- });
507
- }, i.cancelNextCallback = function() {
508
- this.nextCallback !== null && (this.nextCallback.cancel(), this.nextCallback = null);
509
- }, i.safeSetState = function(a, s) {
510
- s = this.setNextCallback(s), this.setState(a, s);
511
- }, i.setNextCallback = function(a) {
512
- var s = this, d = !0;
513
- return this.nextCallback = function(p) {
514
- d && (d = !1, s.nextCallback = null, a(p));
515
- }, this.nextCallback.cancel = function() {
516
- d = !1;
517
- }, this.nextCallback;
518
- }, i.onTransitionEnd = function(a, s) {
519
- this.setNextCallback(s);
520
- var d = this.props.nodeRef ? this.props.nodeRef.current : ue.findDOMNode(this), p = a == null && !this.props.addEndListener;
521
- if (!d || p) {
522
- setTimeout(this.nextCallback, 0);
523
- return;
524
- }
525
- if (this.props.addEndListener) {
526
- var u = this.props.nodeRef ? [this.nextCallback] : [d, this.nextCallback], l = u[0], m = u[1];
527
- this.props.addEndListener(l, m);
528
- }
529
- a != null && setTimeout(this.nextCallback, a);
530
- }, i.render = function() {
531
- var a = this.state.status;
532
- if (a === re)
533
- return null;
534
- var s = this.props, d = s.children;
535
- s.in, s.mountOnEnter, s.unmountOnExit, s.appear, s.enter, s.exit, s.timeout, s.addEndListener, s.onEnter, s.onEntering, s.onEntered, s.onExit, s.onExiting, s.onExited, s.nodeRef;
536
- var p = mt(s, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
537
- return (
538
- // allows for nested Transitions
539
- /* @__PURE__ */ Y.createElement(Je.Provider, {
540
- value: null
541
- }, typeof d == "function" ? d(a, p) : Y.cloneElement(Y.Children.only(d), p))
542
- );
543
- }, n;
544
- })(Y.Component);
545
- $.contextType = Je;
546
- $.propTypes = process.env.NODE_ENV !== "production" ? {
547
- /**
548
- * A React reference to DOM element that need to transition:
549
- * https://stackoverflow.com/a/51127130/4671932
550
- *
551
- * - When `nodeRef` prop is used, `node` is not passed to callback functions
552
- * (e.g. `onEnter`) because user already has direct access to the node.
553
- * - When changing `key` prop of `Transition` in a `TransitionGroup` a new
554
- * `nodeRef` need to be provided to `Transition` with changed `key` prop
555
- * (see
556
- * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
557
- */
558
- nodeRef: e.shape({
559
- current: typeof Element > "u" ? e.any : function(t, n, i, r, a, s) {
560
- var d = t[n];
561
- return e.instanceOf(d && "ownerDocument" in d ? d.ownerDocument.defaultView.Element : Element)(t, n, i, r, a, s);
562
- }
563
- }),
564
- /**
565
- * A `function` child can be used instead of a React element. This function is
566
- * called with the current transition status (`'entering'`, `'entered'`,
567
- * `'exiting'`, `'exited'`), which can be used to apply context
568
- * specific props to a component.
569
- *
570
- * ```jsx
571
- * <Transition in={this.state.in} timeout={150}>
572
- * {state => (
573
- * <MyComponent className={`fade fade-${state}`} />
574
- * )}
575
- * </Transition>
576
- * ```
577
- */
578
- children: e.oneOfType([e.func.isRequired, e.element.isRequired]).isRequired,
579
- /**
580
- * Show the component; triggers the enter or exit states
581
- */
582
- in: e.bool,
583
- /**
584
- * By default the child component is mounted immediately along with
585
- * the parent `Transition` component. If you want to "lazy mount" the component on the
586
- * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
587
- * mounted, even on "exited", unless you also specify `unmountOnExit`.
588
- */
589
- mountOnEnter: e.bool,
590
- /**
591
- * By default the child component stays mounted after it reaches the `'exited'` state.
592
- * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
593
- */
594
- unmountOnExit: e.bool,
595
- /**
596
- * By default the child component does not perform the enter transition when
597
- * it first mounts, regardless of the value of `in`. If you want this
598
- * behavior, set both `appear` and `in` to `true`.
599
- *
600
- * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop
601
- * > only adds an additional enter transition. However, in the
602
- * > `<CSSTransition>` component that first enter transition does result in
603
- * > additional `.appear-*` classes, that way you can choose to style it
604
- * > differently.
605
- */
606
- appear: e.bool,
607
- /**
608
- * Enable or disable enter transitions.
609
- */
610
- enter: e.bool,
611
- /**
612
- * Enable or disable exit transitions.
613
- */
614
- exit: e.bool,
615
- /**
616
- * The duration of the transition, in milliseconds.
617
- * Required unless `addEndListener` is provided.
618
- *
619
- * You may specify a single timeout for all transitions:
620
- *
621
- * ```jsx
622
- * timeout={500}
623
- * ```
624
- *
625
- * or individually:
626
- *
627
- * ```jsx
628
- * timeout={{
629
- * appear: 500,
630
- * enter: 300,
631
- * exit: 500,
632
- * }}
633
- * ```
634
- *
635
- * - `appear` defaults to the value of `enter`
636
- * - `enter` defaults to `0`
637
- * - `exit` defaults to `0`
638
- *
639
- * @type {number | { enter?: number, exit?: number, appear?: number }}
640
- */
641
- timeout: function(n) {
642
- var i = Tt;
643
- n.addEndListener || (i = i.isRequired);
644
- for (var r = arguments.length, a = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++)
645
- a[s - 1] = arguments[s];
646
- return i.apply(void 0, [n].concat(a));
647
- },
648
- /**
649
- * Add a custom transition end trigger. Called with the transitioning
650
- * DOM node and a `done` callback. Allows for more fine grained transition end
651
- * logic. Timeouts are still used as a fallback if provided.
652
- *
653
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
654
- *
655
- * ```jsx
656
- * addEndListener={(node, done) => {
657
- * // use the css transitionend event to mark the finish of a transition
658
- * node.addEventListener('transitionend', done, false);
659
- * }}
660
- * ```
661
- */
662
- addEndListener: e.func,
663
- /**
664
- * Callback fired before the "entering" status is applied. An extra parameter
665
- * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
666
- *
667
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
668
- *
669
- * @type Function(node: HtmlElement, isAppearing: bool) -> void
670
- */
671
- onEnter: e.func,
672
- /**
673
- * Callback fired after the "entering" status is applied. An extra parameter
674
- * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
675
- *
676
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
677
- *
678
- * @type Function(node: HtmlElement, isAppearing: bool)
679
- */
680
- onEntering: e.func,
681
- /**
682
- * Callback fired after the "entered" status is applied. An extra parameter
683
- * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
684
- *
685
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
686
- *
687
- * @type Function(node: HtmlElement, isAppearing: bool) -> void
688
- */
689
- onEntered: e.func,
690
- /**
691
- * Callback fired before the "exiting" status is applied.
692
- *
693
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
694
- *
695
- * @type Function(node: HtmlElement) -> void
696
- */
697
- onExit: e.func,
698
- /**
699
- * Callback fired after the "exiting" status is applied.
700
- *
701
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
702
- *
703
- * @type Function(node: HtmlElement) -> void
704
- */
705
- onExiting: e.func,
706
- /**
707
- * Callback fired after the "exited" status is applied.
708
- *
709
- * **Note**: when `nodeRef` prop is passed, `node` is not passed
710
- *
711
- * @type Function(node: HtmlElement) -> void
712
- */
713
- onExited: e.func
714
- } : {};
715
- function G() {
716
- }
717
- $.defaultProps = {
718
- in: !1,
719
- mountOnEnter: !1,
720
- unmountOnExit: !1,
721
- appear: !1,
722
- enter: !0,
723
- exit: !0,
724
- onEnter: G,
725
- onEntering: G,
726
- onEntered: G,
727
- onExit: G,
728
- onExiting: G,
729
- onExited: G
730
- };
731
- $.UNMOUNTED = re;
732
- $.EXITED = U;
733
- $.ENTERING = V;
734
- $.ENTERED = z;
735
- $.EXITING = De;
736
- const Ot = (t) => t.scrollTop;
737
- function Ke(t, n) {
738
- const {
739
- timeout: i,
740
- easing: r,
741
- style: a = {}
742
- } = t;
743
- return {
744
- duration: a.transitionDuration ?? (typeof i == "number" ? i : i[n.mode] || 0),
745
- easing: a.transitionTimingFunction ?? (typeof r == "object" ? r[n.mode] : r),
746
- delay: a.transitionDelay
747
- };
748
- }
749
- function St(t) {
750
- const n = typeof t;
751
- switch (n) {
752
- case "number":
753
- return Number.isNaN(t) ? "NaN" : Number.isFinite(t) ? t !== Math.floor(t) ? "float" : "number" : "Infinity";
754
- case "object":
755
- return t === null ? "null" : t.constructor.name;
756
- default:
757
- return n;
758
- }
759
- }
760
- function tt(t, n, i, r) {
761
- const a = t[n];
762
- if (a == null || !Number.isInteger(a)) {
763
- const s = St(a);
764
- return new RangeError(`Invalid ${r} \`${n}\` of type \`${s}\` supplied to \`${i}\`, expected \`integer\`.`);
765
- }
766
- return null;
767
- }
768
- function nt(t, n, i, r) {
769
- return t[n] === void 0 ? null : tt(t, n, i, r);
770
- }
771
- function ke() {
772
- return null;
773
- }
774
- nt.isRequired = tt;
775
- ke.isRequired = ke;
776
- const Rt = process.env.NODE_ENV === "production" ? ke : nt;
777
- function Pt(t) {
778
- return ge("MuiPaper", t);
779
- }
780
- he("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"]);
781
- const Nt = (t) => {
782
- const {
783
- square: n,
784
- elevation: i,
785
- variant: r,
786
- classes: a
787
- } = t, s = {
788
- root: ["root", r, !n && "rounded", r === "elevation" && `elevation${i}`]
789
- };
790
- return ve(s, Pt, a);
791
- }, Dt = H("div", {
792
- name: "MuiPaper",
793
- slot: "Root",
794
- overridesResolver: (t, n) => {
795
- const {
796
- ownerState: i
797
- } = t;
798
- return [n.root, n[i.variant], !i.square && n.rounded, i.variant === "elevation" && n[`elevation${i.elevation}`]];
799
- }
800
- })(_e(({
801
- theme: t
802
- }) => ({
803
- backgroundColor: (t.vars || t).palette.background.paper,
804
- color: (t.vars || t).palette.text.primary,
805
- transition: t.transitions.create("box-shadow"),
806
- variants: [{
807
- props: ({
808
- ownerState: n
809
- }) => !n.square,
810
- style: {
811
- borderRadius: t.shape.borderRadius
812
- }
813
- }, {
814
- props: {
815
- variant: "outlined"
816
- },
817
- style: {
818
- border: `1px solid ${(t.vars || t).palette.divider}`
819
- }
820
- }, {
821
- props: {
822
- variant: "elevation"
823
- },
824
- style: {
825
- boxShadow: "var(--Paper-shadow)",
826
- backgroundImage: "var(--Paper-overlay)"
827
- }
828
- }]
829
- }))), Me = /* @__PURE__ */ h.forwardRef(function(n, i) {
830
- const r = be({
831
- props: n,
832
- name: "MuiPaper"
833
- }), a = Ce(), {
834
- className: s,
835
- component: d = "div",
836
- elevation: p = 1,
837
- square: u = !1,
838
- variant: l = "elevation",
839
- ...m
840
- } = r, c = {
841
- ...r,
842
- component: d,
843
- elevation: p,
844
- square: u,
845
- variant: l
846
- }, o = Nt(c);
847
- return process.env.NODE_ENV !== "production" && a.shadows[p] === void 0 && console.error([`MUI: The elevation provided <Paper elevation={${p}}> is not available in the theme.`, `Please make sure that \`theme.shadows[${p}]\` is defined.`].join(`
848
- `)), /* @__PURE__ */ M(Dt, {
849
- as: d,
850
- ownerState: c,
851
- className: B(o.root, s),
852
- ref: i,
853
- ...m,
854
- style: {
855
- ...l === "elevation" && {
856
- "--Paper-shadow": (a.vars || a).shadows[p],
857
- ...a.vars && {
858
- "--Paper-overlay": a.vars.overlays?.[p]
859
- },
860
- ...!a.vars && a.palette.mode === "dark" && {
861
- "--Paper-overlay": `linear-gradient(${Le("#fff", Fe(p))}, ${Le("#fff", Fe(p))})`
862
- }
863
- },
864
- ...m.style
865
- }
866
- });
867
- });
868
- process.env.NODE_ENV !== "production" && (Me.propTypes = {
869
- // ┌────────────────────────────── Warning ──────────────────────────────┐
870
- // │ These PropTypes are generated from the TypeScript type definitions. │
871
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
872
- // └─────────────────────────────────────────────────────────────────────┘
873
- /**
874
- * The content of the component.
875
- */
876
- children: e.node,
877
- /**
878
- * Override or extend the styles applied to the component.
879
- */
880
- classes: e.object,
881
- /**
882
- * @ignore
883
- */
884
- className: e.string,
885
- /**
886
- * The component used for the root node.
887
- * Either a string to use a HTML element or a component.
888
- */
889
- component: e.elementType,
890
- /**
891
- * Shadow depth, corresponds to `dp` in the spec.
892
- * It accepts values between 0 and 24 inclusive.
893
- * @default 1
894
- */
895
- elevation: we(Rt, (t) => {
896
- const {
897
- elevation: n,
898
- variant: i
899
- } = t;
900
- return n > 0 && i === "outlined" ? new Error(`MUI: Combining \`elevation={${n}}\` with \`variant="${i}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`) : null;
901
- }),
902
- /**
903
- * If `true`, rounded corners are disabled.
904
- * @default false
905
- */
906
- square: e.bool,
907
- /**
908
- * @ignore
909
- */
910
- style: e.object,
911
- /**
912
- * The system prop that allows defining system overrides as well as additional CSS styles.
913
- */
914
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
915
- /**
916
- * The variant to use.
917
- * @default 'elevation'
918
- */
919
- variant: e.oneOfType([e.oneOf(["elevation", "outlined"]), e.string])
920
- });
921
- function kt(t, n, i) {
922
- return t === void 0 || pt(t) ? n : {
923
- ...n,
924
- ownerState: {
925
- ...n.ownerState,
926
- ...i
927
- }
928
- };
929
- }
930
- function wt(t, n, i) {
931
- return typeof t == "function" ? t(n, i) : t;
932
- }
933
- function rt(t, n = []) {
934
- if (t === void 0)
935
- return {};
936
- const i = {};
937
- return Object.keys(t).filter((r) => r.match(/^on[A-Z]/) && typeof t[r] == "function" && !n.includes(r)).forEach((r) => {
938
- i[r] = t[r];
939
- }), i;
940
- }
941
- function Ge(t) {
942
- if (t === void 0)
943
- return {};
944
- const n = {};
945
- return Object.keys(t).filter((i) => !(i.match(/^on[A-Z]/) && typeof t[i] == "function")).forEach((i) => {
946
- n[i] = t[i];
947
- }), n;
948
- }
949
- function _t(t) {
950
- const {
951
- getSlotProps: n,
952
- additionalProps: i,
953
- externalSlotProps: r,
954
- externalForwardedProps: a,
955
- className: s
956
- } = t;
957
- if (!n) {
958
- const f = B(i?.className, s, a?.className, r?.className), y = {
959
- ...i?.style,
960
- ...a?.style,
961
- ...r?.style
962
- }, E = {
963
- ...i,
964
- ...a,
965
- ...r
966
- };
967
- return f.length > 0 && (E.className = f), Object.keys(y).length > 0 && (E.style = y), {
968
- props: E,
969
- internalRef: void 0
970
- };
971
- }
972
- const d = rt({
973
- ...a,
974
- ...r
975
- }), p = Ge(r), u = Ge(a), l = n(d), m = B(l?.className, i?.className, s, a?.className, r?.className), c = {
976
- ...l?.style,
977
- ...i?.style,
978
- ...a?.style,
979
- ...r?.style
980
- }, o = {
981
- ...l,
982
- ...i,
983
- ...u,
984
- ...p
985
- };
986
- return m.length > 0 && (o.className = m), Object.keys(c).length > 0 && (o.style = c), {
987
- props: o,
988
- internalRef: l.ref
989
- };
990
- }
991
- function j(t, n) {
992
- const {
993
- className: i,
994
- elementType: r,
995
- ownerState: a,
996
- externalForwardedProps: s,
997
- internalForwardedProps: d,
998
- shouldForwardComponentProp: p = !1,
999
- ...u
1000
- } = n, {
1001
- component: l,
1002
- slots: m = {
1003
- [t]: void 0
1004
- },
1005
- slotProps: c = {
1006
- [t]: void 0
1007
- },
1008
- ...o
1009
- } = s, f = m[t] || r, y = wt(c[t], a), {
1010
- props: {
1011
- component: E,
1012
- ...O
1013
- },
1014
- internalRef: S
1015
- } = _t({
1016
- className: i,
1017
- ...u,
1018
- externalForwardedProps: t === "root" ? o : void 0,
1019
- externalSlotProps: y
1020
- }), R = ie(S, y?.ref, n.ref), g = t === "root" ? E || l : E, T = kt(f, {
1021
- ...t === "root" && !l && !m[t] && d,
1022
- ...t !== "root" && !m[t] && d,
1023
- ...O,
1024
- ...g && !p && {
1025
- as: g
1026
- },
1027
- ...g && p && {
1028
- component: g
1029
- },
1030
- ref: R
1031
- }, a);
1032
- return [f, T];
1033
- }
1034
- function ot(t, n, i, r, a) {
1035
- if (process.env.NODE_ENV === "production")
1036
- return null;
1037
- const s = t[n], d = a || n;
1038
- return s == null ? null : s && s.nodeType !== 1 ? new Error(`Invalid ${r} \`${d}\` supplied to \`${i}\`. Expected an HTMLElement.`) : null;
1039
- }
1040
- function Ie(t) {
1041
- return parseInt(h.version, 10) >= 19 ? t?.props?.ref || null : t?.ref || null;
1042
- }
1043
- function Ct(t) {
1044
- return typeof t == "function" ? t() : t;
1045
- }
1046
- const fe = /* @__PURE__ */ h.forwardRef(function(n, i) {
1047
- const {
1048
- children: r,
1049
- container: a,
1050
- disablePortal: s = !1
1051
- } = n, [d, p] = h.useState(null), u = ie(/* @__PURE__ */ h.isValidElement(r) ? Ie(r) : null, i);
1052
- if ($e(() => {
1053
- s || p(Ct(a) || document.body);
1054
- }, [a, s]), $e(() => {
1055
- if (d && !s)
1056
- return He(i, d), () => {
1057
- He(i, null);
1058
- };
1059
- }, [i, d, s]), s) {
1060
- if (/* @__PURE__ */ h.isValidElement(r)) {
1061
- const l = {
1062
- ref: u
1063
- };
1064
- return /* @__PURE__ */ h.cloneElement(r, l);
1065
- }
1066
- return r;
1067
- }
1068
- return d && /* @__PURE__ */ et.createPortal(r, d);
1069
- });
1070
- process.env.NODE_ENV !== "production" && (fe.propTypes = {
1071
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1072
- // │ These PropTypes are generated from the TypeScript type definitions. │
1073
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
1074
- // └─────────────────────────────────────────────────────────────────────┘
1075
- /**
1076
- * The children to render into the `container`.
1077
- */
1078
- children: e.node,
1079
- /**
1080
- * An HTML element or function that returns one.
1081
- * The `container` will have the portal children appended to it.
1082
- *
1083
- * You can also provide a callback, which is called in a React layout effect.
1084
- * This lets you set the container from a ref, and also makes server-side rendering possible.
1085
- *
1086
- * By default, it uses the body of the top-level document object,
1087
- * so it's simply `document.body` most of the time.
1088
- */
1089
- container: e.oneOfType([ot, e.func]),
1090
- /**
1091
- * The `children` will be under the DOM hierarchy of the parent component.
1092
- * @default false
1093
- */
1094
- disablePortal: e.bool
1095
- });
1096
- process.env.NODE_ENV !== "production" && (fe.propTypes = Qe(fe.propTypes));
1097
- function Mt(t) {
1098
- const {
1099
- prototype: n = {}
1100
- } = t;
1101
- return !!n.isReactComponent;
1102
- }
1103
- function it(t, n, i, r, a) {
1104
- const s = t[n], d = a || n;
1105
- if (s == null || // When server-side rendering React doesn't warn either.
1106
- // This is not an accurate check for SSR.
1107
- // This is only in place for Emotion compat.
1108
- // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
1109
- typeof window > "u")
1110
- return null;
1111
- let p;
1112
- const u = s.type;
1113
- return typeof u == "function" && !Mt(u) && (p = "Did you accidentally use a plain function component for an element instead?"), p !== void 0 ? new Error(`Invalid ${r} \`${d}\` supplied to \`${i}\`. Expected an element that can hold a ref. ${p} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
1114
- }
1115
- const Ee = we(e.element, it);
1116
- Ee.isRequired = we(e.element.isRequired, it);
1117
- const It = {
1118
- entering: {
1119
- opacity: 1
1120
- },
1121
- entered: {
1122
- opacity: 1
1123
- }
1124
- }, me = /* @__PURE__ */ h.forwardRef(function(n, i) {
1125
- const r = Ce(), a = {
1126
- enter: r.transitions.duration.enteringScreen,
1127
- exit: r.transitions.duration.leavingScreen
1128
- }, {
1129
- addEndListener: s,
1130
- appear: d = !0,
1131
- children: p,
1132
- easing: u,
1133
- in: l,
1134
- onEnter: m,
1135
- onEntered: c,
1136
- onEntering: o,
1137
- onExit: f,
1138
- onExited: y,
1139
- onExiting: E,
1140
- style: O,
1141
- timeout: S = a,
1142
- // eslint-disable-next-line react/prop-types
1143
- TransitionComponent: R = $,
1144
- ...g
1145
- } = n, T = h.useRef(null), N = ie(T, Ie(p), i), D = (x) => (v) => {
1146
- if (x) {
1147
- const b = T.current;
1148
- v === void 0 ? x(b) : x(b, v);
1149
- }
1150
- }, P = D(o), _ = D((x, v) => {
1151
- Ot(x);
1152
- const b = Ke({
1153
- style: O,
1154
- timeout: S,
1155
- easing: u
1156
- }, {
1157
- mode: "enter"
1158
- });
1159
- x.style.webkitTransition = r.transitions.create("opacity", b), x.style.transition = r.transitions.create("opacity", b), m && m(x, v);
1160
- }), C = D(c), I = D(E), L = D((x) => {
1161
- const v = Ke({
1162
- style: O,
1163
- timeout: S,
1164
- easing: u
1165
- }, {
1166
- mode: "exit"
1167
- });
1168
- x.style.webkitTransition = r.transitions.create("opacity", v), x.style.transition = r.transitions.create("opacity", v), f && f(x);
1169
- }), J = D(y);
1170
- return /* @__PURE__ */ M(R, {
1171
- appear: d,
1172
- in: l,
1173
- nodeRef: T,
1174
- onEnter: _,
1175
- onEntered: C,
1176
- onEntering: P,
1177
- onExit: L,
1178
- onExited: J,
1179
- onExiting: I,
1180
- addEndListener: (x) => {
1181
- s && s(T.current, x);
1182
- },
1183
- timeout: S,
1184
- ...g,
1185
- children: (x, {
1186
- ownerState: v,
1187
- ...b
1188
- }) => /* @__PURE__ */ h.cloneElement(p, {
1189
- style: {
1190
- opacity: 0,
1191
- visibility: x === "exited" && !l ? "hidden" : void 0,
1192
- ...It[x],
1193
- ...O,
1194
- ...p.props.style
1195
- },
1196
- ref: N,
1197
- ...b
1198
- })
1199
- });
1200
- });
1201
- process.env.NODE_ENV !== "production" && (me.propTypes = {
1202
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1203
- // │ These PropTypes are generated from the TypeScript type definitions. │
1204
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1205
- // └─────────────────────────────────────────────────────────────────────┘
1206
- /**
1207
- * Add a custom transition end trigger. Called with the transitioning DOM
1208
- * node and a done callback. Allows for more fine grained transition end
1209
- * logic. Note: Timeouts are still used as a fallback if provided.
1210
- */
1211
- addEndListener: e.func,
1212
- /**
1213
- * Perform the enter transition when it first mounts if `in` is also `true`.
1214
- * Set this to `false` to disable this behavior.
1215
- * @default true
1216
- */
1217
- appear: e.bool,
1218
- /**
1219
- * A single child content element.
1220
- */
1221
- children: Ee.isRequired,
1222
- /**
1223
- * The transition timing function.
1224
- * You may specify a single easing or a object containing enter and exit values.
1225
- */
1226
- easing: e.oneOfType([e.shape({
1227
- enter: e.string,
1228
- exit: e.string
1229
- }), e.string]),
1230
- /**
1231
- * If `true`, the component will transition in.
1232
- */
1233
- in: e.bool,
1234
- /**
1235
- * @ignore
1236
- */
1237
- onEnter: e.func,
1238
- /**
1239
- * @ignore
1240
- */
1241
- onEntered: e.func,
1242
- /**
1243
- * @ignore
1244
- */
1245
- onEntering: e.func,
1246
- /**
1247
- * @ignore
1248
- */
1249
- onExit: e.func,
1250
- /**
1251
- * @ignore
1252
- */
1253
- onExited: e.func,
1254
- /**
1255
- * @ignore
1256
- */
1257
- onExiting: e.func,
1258
- /**
1259
- * @ignore
1260
- */
1261
- style: e.object,
1262
- /**
1263
- * The duration for the transition, in milliseconds.
1264
- * You may specify a single timeout for all transitions, or individually with an object.
1265
- * @default {
1266
- * enter: theme.transitions.duration.enteringScreen,
1267
- * exit: theme.transitions.duration.leavingScreen,
1268
- * }
1269
- */
1270
- timeout: e.oneOfType([e.number, e.shape({
1271
- appear: e.number,
1272
- enter: e.number,
1273
- exit: e.number
1274
- })])
1275
- });
1276
- function At(t) {
1277
- return ge("MuiBackdrop", t);
1278
- }
1279
- he("MuiBackdrop", ["root", "invisible"]);
1280
- const Lt = (t) => {
1281
- const {
1282
- classes: n,
1283
- invisible: i
1284
- } = t;
1285
- return ve({
1286
- root: ["root", i && "invisible"]
1287
- }, At, n);
1288
- }, Ft = H("div", {
1289
- name: "MuiBackdrop",
1290
- slot: "Root",
1291
- overridesResolver: (t, n) => {
1292
- const {
1293
- ownerState: i
1294
- } = t;
1295
- return [n.root, i.invisible && n.invisible];
1296
- }
1297
- })({
1298
- position: "fixed",
1299
- display: "flex",
1300
- alignItems: "center",
1301
- justifyContent: "center",
1302
- right: 0,
1303
- bottom: 0,
1304
- top: 0,
1305
- left: 0,
1306
- backgroundColor: "rgba(0, 0, 0, 0.5)",
1307
- WebkitTapHighlightColor: "transparent",
1308
- variants: [{
1309
- props: {
1310
- invisible: !0
1311
- },
1312
- style: {
1313
- backgroundColor: "transparent"
1314
- }
1315
- }]
1316
- }), Ae = /* @__PURE__ */ h.forwardRef(function(n, i) {
1317
- const r = be({
1318
- props: n,
1319
- name: "MuiBackdrop"
1320
- }), {
1321
- children: a,
1322
- className: s,
1323
- component: d = "div",
1324
- invisible: p = !1,
1325
- open: u,
1326
- components: l = {},
1327
- componentsProps: m = {},
1328
- slotProps: c = {},
1329
- slots: o = {},
1330
- TransitionComponent: f,
1331
- transitionDuration: y,
1332
- ...E
1333
- } = r, O = {
1334
- ...r,
1335
- component: d,
1336
- invisible: p
1337
- }, S = Lt(O), R = {
1338
- transition: f,
1339
- root: l.Root,
1340
- ...o
1341
- }, g = {
1342
- ...m,
1343
- ...c
1344
- }, T = {
1345
- component: d,
1346
- slots: R,
1347
- slotProps: g
1348
- }, [N, D] = j("root", {
1349
- elementType: Ft,
1350
- externalForwardedProps: T,
1351
- className: B(S.root, s),
1352
- ownerState: O
1353
- }), [P, _] = j("transition", {
1354
- elementType: me,
1355
- externalForwardedProps: T,
1356
- ownerState: O
1357
- });
1358
- return /* @__PURE__ */ M(P, {
1359
- in: u,
1360
- timeout: y,
1361
- ...E,
1362
- ..._,
1363
- children: /* @__PURE__ */ M(N, {
1364
- "aria-hidden": !0,
1365
- ...D,
1366
- classes: S,
1367
- ref: i,
1368
- children: a
1369
- })
1370
- });
1371
- });
1372
- process.env.NODE_ENV !== "production" && (Ae.propTypes = {
1373
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1374
- // │ These PropTypes are generated from the TypeScript type definitions. │
1375
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1376
- // └─────────────────────────────────────────────────────────────────────┘
1377
- /**
1378
- * The content of the component.
1379
- */
1380
- children: e.node,
1381
- /**
1382
- * Override or extend the styles applied to the component.
1383
- */
1384
- classes: e.object,
1385
- /**
1386
- * @ignore
1387
- */
1388
- className: e.string,
1389
- /**
1390
- * The component used for the root node.
1391
- * Either a string to use a HTML element or a component.
1392
- */
1393
- component: e.elementType,
1394
- /**
1395
- * The components used for each slot inside.
1396
- *
1397
- * @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.
1398
- *
1399
- * @default {}
1400
- */
1401
- components: e.shape({
1402
- Root: e.elementType
1403
- }),
1404
- /**
1405
- * The extra props for the slot components.
1406
- * You can override the existing props or add new ones.
1407
- *
1408
- * @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.
1409
- *
1410
- * @default {}
1411
- */
1412
- componentsProps: e.shape({
1413
- root: e.object
1414
- }),
1415
- /**
1416
- * If `true`, the backdrop is invisible.
1417
- * It can be used when rendering a popover or a custom select component.
1418
- * @default false
1419
- */
1420
- invisible: e.bool,
1421
- /**
1422
- * If `true`, the component is shown.
1423
- */
1424
- open: e.bool.isRequired,
1425
- /**
1426
- * The props used for each slot inside.
1427
- * @default {}
1428
- */
1429
- slotProps: e.shape({
1430
- root: e.oneOfType([e.func, e.object]),
1431
- transition: e.oneOfType([e.func, e.object])
1432
- }),
1433
- /**
1434
- * The components used for each slot inside.
1435
- * @default {}
1436
- */
1437
- slots: e.shape({
1438
- root: e.elementType,
1439
- transition: e.elementType
1440
- }),
1441
- /**
1442
- * The system prop that allows defining system overrides as well as additional CSS styles.
1443
- */
1444
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
1445
- /**
1446
- * The component used for the transition.
1447
- * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
1448
- * @default Fade
1449
- * @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.
1450
- */
1451
- TransitionComponent: e.elementType,
1452
- /**
1453
- * The duration for the transition, in milliseconds.
1454
- * You may specify a single timeout for all transitions, or individually with an object.
1455
- */
1456
- transitionDuration: e.oneOfType([e.number, e.shape({
1457
- appear: e.number,
1458
- enter: e.number,
1459
- exit: e.number
1460
- })])
1461
- });
1462
- function jt(t = window) {
1463
- const n = t.document.documentElement.clientWidth;
1464
- return t.innerWidth - n;
1465
- }
1466
- function $t(t) {
1467
- const n = Z(t);
1468
- return n.body === t ? pe(t).innerWidth > n.documentElement.clientWidth : t.scrollHeight > t.clientHeight;
1469
- }
1470
- function oe(t, n) {
1471
- n ? t.setAttribute("aria-hidden", "true") : t.removeAttribute("aria-hidden");
1472
- }
1473
- function ze(t) {
1474
- return parseInt(pe(t).getComputedStyle(t).paddingRight, 10) || 0;
1475
- }
1476
- function Bt(t) {
1477
- const i = ["TEMPLATE", "SCRIPT", "STYLE", "LINK", "MAP", "META", "NOSCRIPT", "PICTURE", "COL", "COLGROUP", "PARAM", "SLOT", "SOURCE", "TRACK"].includes(t.tagName), r = t.tagName === "INPUT" && t.getAttribute("type") === "hidden";
1478
- return i || r;
1479
- }
1480
- function Ye(t, n, i, r, a) {
1481
- const s = [n, i, ...r];
1482
- [].forEach.call(t.children, (d) => {
1483
- const p = !s.includes(d), u = !Bt(d);
1484
- p && u && oe(d, a);
1485
- });
1486
- }
1487
- function Pe(t, n) {
1488
- let i = -1;
1489
- return t.some((r, a) => n(r) ? (i = a, !0) : !1), i;
1490
- }
1491
- function Ht(t, n) {
1492
- const i = [], r = t.container;
1493
- if (!n.disableScrollLock) {
1494
- if ($t(r)) {
1495
- const d = jt(pe(r));
1496
- i.push({
1497
- value: r.style.paddingRight,
1498
- property: "padding-right",
1499
- el: r
1500
- }), r.style.paddingRight = `${ze(r) + d}px`;
1501
- const p = Z(r).querySelectorAll(".mui-fixed");
1502
- [].forEach.call(p, (u) => {
1503
- i.push({
1504
- value: u.style.paddingRight,
1505
- property: "padding-right",
1506
- el: u
1507
- }), u.style.paddingRight = `${ze(u) + d}px`;
1508
- });
1509
- }
1510
- let s;
1511
- if (r.parentNode instanceof DocumentFragment)
1512
- s = Z(r).body;
1513
- else {
1514
- const d = r.parentElement, p = pe(r);
1515
- s = d?.nodeName === "HTML" && p.getComputedStyle(d).overflowY === "scroll" ? d : r;
1516
- }
1517
- i.push({
1518
- value: s.style.overflow,
1519
- property: "overflow",
1520
- el: s
1521
- }, {
1522
- value: s.style.overflowX,
1523
- property: "overflow-x",
1524
- el: s
1525
- }, {
1526
- value: s.style.overflowY,
1527
- property: "overflow-y",
1528
- el: s
1529
- }), s.style.overflow = "hidden";
1530
- }
1531
- return () => {
1532
- i.forEach(({
1533
- value: s,
1534
- el: d,
1535
- property: p
1536
- }) => {
1537
- s ? d.style.setProperty(p, s) : d.style.removeProperty(p);
1538
- });
1539
- };
1540
- }
1541
- function Wt(t) {
1542
- const n = [];
1543
- return [].forEach.call(t.children, (i) => {
1544
- i.getAttribute("aria-hidden") === "true" && n.push(i);
1545
- }), n;
1546
- }
1547
- class Ut {
1548
- constructor() {
1549
- this.modals = [], this.containers = [];
1550
- }
1551
- add(n, i) {
1552
- let r = this.modals.indexOf(n);
1553
- if (r !== -1)
1554
- return r;
1555
- r = this.modals.length, this.modals.push(n), n.modalRef && oe(n.modalRef, !1);
1556
- const a = Wt(i);
1557
- Ye(i, n.mount, n.modalRef, a, !0);
1558
- const s = Pe(this.containers, (d) => d.container === i);
1559
- return s !== -1 ? (this.containers[s].modals.push(n), r) : (this.containers.push({
1560
- modals: [n],
1561
- container: i,
1562
- restore: null,
1563
- hiddenSiblings: a
1564
- }), r);
1565
- }
1566
- mount(n, i) {
1567
- const r = Pe(this.containers, (s) => s.modals.includes(n)), a = this.containers[r];
1568
- a.restore || (a.restore = Ht(a, i));
1569
- }
1570
- remove(n, i = !0) {
1571
- const r = this.modals.indexOf(n);
1572
- if (r === -1)
1573
- return r;
1574
- const a = Pe(this.containers, (d) => d.modals.includes(n)), s = this.containers[a];
1575
- if (s.modals.splice(s.modals.indexOf(n), 1), this.modals.splice(r, 1), s.modals.length === 0)
1576
- s.restore && s.restore(), n.modalRef && oe(n.modalRef, i), Ye(s.container, n.mount, n.modalRef, s.hiddenSiblings, !1), this.containers.splice(a, 1);
1577
- else {
1578
- const d = s.modals[s.modals.length - 1];
1579
- d.modalRef && oe(d.modalRef, !1);
1580
- }
1581
- return r;
1582
- }
1583
- isTopModal(n) {
1584
- return this.modals.length > 0 && this.modals[this.modals.length - 1] === n;
1585
- }
1586
- }
1587
- const Vt = ["input", "select", "textarea", "a[href]", "button", "[tabindex]", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])'].join(",");
1588
- function qt(t) {
1589
- const n = parseInt(t.getAttribute("tabindex") || "", 10);
1590
- return Number.isNaN(n) ? t.contentEditable === "true" || (t.nodeName === "AUDIO" || t.nodeName === "VIDEO" || t.nodeName === "DETAILS") && t.getAttribute("tabindex") === null ? 0 : t.tabIndex : n;
1591
- }
1592
- function Kt(t) {
1593
- if (t.tagName !== "INPUT" || t.type !== "radio" || !t.name)
1594
- return !1;
1595
- const n = (r) => t.ownerDocument.querySelector(`input[type="radio"]${r}`);
1596
- let i = n(`[name="${t.name}"]:checked`);
1597
- return i || (i = n(`[name="${t.name}"]`)), i !== t;
1598
- }
1599
- function Gt(t) {
1600
- return !(t.disabled || t.tagName === "INPUT" && t.type === "hidden" || Kt(t));
1601
- }
1602
- function zt(t) {
1603
- const n = [], i = [];
1604
- return Array.from(t.querySelectorAll(Vt)).forEach((r, a) => {
1605
- const s = qt(r);
1606
- s === -1 || !Gt(r) || (s === 0 ? n.push(r) : i.push({
1607
- documentOrder: a,
1608
- tabIndex: s,
1609
- node: r
1610
- }));
1611
- }), i.sort((r, a) => r.tabIndex === a.tabIndex ? r.documentOrder - a.documentOrder : r.tabIndex - a.tabIndex).map((r) => r.node).concat(n);
1612
- }
1613
- function Yt() {
1614
- return !0;
1615
- }
1616
- function ye(t) {
1617
- const {
1618
- children: n,
1619
- disableAutoFocus: i = !1,
1620
- disableEnforceFocus: r = !1,
1621
- disableRestoreFocus: a = !1,
1622
- getTabbable: s = zt,
1623
- isEnabled: d = Yt,
1624
- open: p
1625
- } = t, u = h.useRef(!1), l = h.useRef(null), m = h.useRef(null), c = h.useRef(null), o = h.useRef(null), f = h.useRef(!1), y = h.useRef(null), E = ie(Ie(n), y), O = h.useRef(null);
1626
- h.useEffect(() => {
1627
- !p || !y.current || (f.current = !i);
1628
- }, [i, p]), h.useEffect(() => {
1629
- if (!p || !y.current)
1630
- return;
1631
- const g = Z(y.current);
1632
- return y.current.contains(g.activeElement) || (y.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(`
1633
- `)), y.current.setAttribute("tabIndex", "-1")), f.current && y.current.focus()), () => {
1634
- a || (c.current && c.current.focus && (u.current = !0, c.current.focus()), c.current = null);
1635
- };
1636
- }, [p]), h.useEffect(() => {
1637
- if (!p || !y.current)
1638
- return;
1639
- const g = Z(y.current), T = (P) => {
1640
- O.current = P, !(r || !d() || P.key !== "Tab") && g.activeElement === y.current && P.shiftKey && (u.current = !0, m.current && m.current.focus());
1641
- }, N = () => {
1642
- const P = y.current;
1643
- if (P === null)
1644
- return;
1645
- if (!g.hasFocus() || !d() || u.current) {
1646
- u.current = !1;
1647
- return;
1648
- }
1649
- if (P.contains(g.activeElement) || r && g.activeElement !== l.current && g.activeElement !== m.current)
1650
- return;
1651
- if (g.activeElement !== o.current)
1652
- o.current = null;
1653
- else if (o.current !== null)
1654
- return;
1655
- if (!f.current)
1656
- return;
1657
- let _ = [];
1658
- if ((g.activeElement === l.current || g.activeElement === m.current) && (_ = s(y.current)), _.length > 0) {
1659
- const C = !!(O.current?.shiftKey && O.current?.key === "Tab"), I = _[0], L = _[_.length - 1];
1660
- typeof I != "string" && typeof L != "string" && (C ? L.focus() : I.focus());
1661
- } else
1662
- P.focus();
1663
- };
1664
- g.addEventListener("focusin", N), g.addEventListener("keydown", T, !0);
1665
- const D = setInterval(() => {
1666
- g.activeElement && g.activeElement.tagName === "BODY" && N();
1667
- }, 50);
1668
- return () => {
1669
- clearInterval(D), g.removeEventListener("focusin", N), g.removeEventListener("keydown", T, !0);
1670
- };
1671
- }, [i, r, a, d, p, s]);
1672
- const S = (g) => {
1673
- c.current === null && (c.current = g.relatedTarget), f.current = !0, o.current = g.target;
1674
- const T = n.props.onFocus;
1675
- T && T(g);
1676
- }, R = (g) => {
1677
- c.current === null && (c.current = g.relatedTarget), f.current = !0;
1678
- };
1679
- return /* @__PURE__ */ Ze(h.Fragment, {
1680
- children: [/* @__PURE__ */ M("div", {
1681
- tabIndex: p ? 0 : -1,
1682
- onFocus: R,
1683
- ref: l,
1684
- "data-testid": "sentinelStart"
1685
- }), /* @__PURE__ */ h.cloneElement(n, {
1686
- ref: E,
1687
- onFocus: S
1688
- }), /* @__PURE__ */ M("div", {
1689
- tabIndex: p ? 0 : -1,
1690
- onFocus: R,
1691
- ref: m,
1692
- "data-testid": "sentinelEnd"
1693
- })]
1694
- });
1695
- }
1696
- process.env.NODE_ENV !== "production" && (ye.propTypes = {
1697
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1698
- // │ These PropTypes are generated from the TypeScript type definitions. │
1699
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
1700
- // └─────────────────────────────────────────────────────────────────────┘
1701
- /**
1702
- * A single child content element.
1703
- */
1704
- children: Ee,
1705
- /**
1706
- * If `true`, the focus trap will not automatically shift focus to itself when it opens, and
1707
- * replace it to the last focused element when it closes.
1708
- * This also works correctly with any focus trap children that have the `disableAutoFocus` prop.
1709
- *
1710
- * Generally this should never be set to `true` as it makes the focus trap less
1711
- * accessible to assistive technologies, like screen readers.
1712
- * @default false
1713
- */
1714
- disableAutoFocus: e.bool,
1715
- /**
1716
- * If `true`, the focus trap will not prevent focus from leaving the focus trap while open.
1717
- *
1718
- * Generally this should never be set to `true` as it makes the focus trap less
1719
- * accessible to assistive technologies, like screen readers.
1720
- * @default false
1721
- */
1722
- disableEnforceFocus: e.bool,
1723
- /**
1724
- * If `true`, the focus trap will not restore focus to previously focused element once
1725
- * focus trap is hidden or unmounted.
1726
- * @default false
1727
- */
1728
- disableRestoreFocus: e.bool,
1729
- /**
1730
- * Returns an array of ordered tabbable nodes (i.e. in tab order) within the root.
1731
- * For instance, you can provide the "tabbable" npm dependency.
1732
- * @param {HTMLElement} root
1733
- */
1734
- getTabbable: e.func,
1735
- /**
1736
- * This prop extends the `open` prop.
1737
- * It allows to toggle the open state without having to wait for a rerender when changing the `open` prop.
1738
- * This prop should be memoized.
1739
- * It can be used to support multiple focus trap mounted at the same time.
1740
- * @default function defaultIsEnabled(): boolean {
1741
- * return true;
1742
- * }
1743
- */
1744
- isEnabled: e.func,
1745
- /**
1746
- * If `true`, focus is locked.
1747
- */
1748
- open: e.bool.isRequired
1749
- });
1750
- process.env.NODE_ENV !== "production" && (ye.propTypes = Qe(ye.propTypes));
1751
- function Xt(t) {
1752
- return typeof t == "function" ? t() : t;
1753
- }
1754
- function Zt(t) {
1755
- return t ? t.props.hasOwnProperty("in") : !1;
1756
- }
1757
- const Xe = () => {
1758
- }, de = new Ut();
1759
- function Jt(t) {
1760
- const {
1761
- container: n,
1762
- disableEscapeKeyDown: i = !1,
1763
- disableScrollLock: r = !1,
1764
- closeAfterTransition: a = !1,
1765
- onTransitionEnter: s,
1766
- onTransitionExited: d,
1767
- children: p,
1768
- onClose: u,
1769
- open: l,
1770
- rootRef: m
1771
- } = t, c = h.useRef({}), o = h.useRef(null), f = h.useRef(null), y = ie(f, m), [E, O] = h.useState(!l), S = Zt(p);
1772
- let R = !0;
1773
- (t["aria-hidden"] === "false" || t["aria-hidden"] === !1) && (R = !1);
1774
- const g = () => Z(o.current), T = () => (c.current.modalRef = f.current, c.current.mount = o.current, c.current), N = () => {
1775
- de.mount(T(), {
1776
- disableScrollLock: r
1777
- }), f.current && (f.current.scrollTop = 0);
1778
- }, D = je(() => {
1779
- const v = Xt(n) || g().body;
1780
- de.add(T(), v), f.current && N();
1781
- }), P = () => de.isTopModal(T()), _ = je((v) => {
1782
- o.current = v, v && (l && P() ? N() : f.current && oe(f.current, R));
1783
- }), C = h.useCallback(() => {
1784
- de.remove(T(), R);
1785
- }, [R]);
1786
- h.useEffect(() => () => {
1787
- C();
1788
- }, [C]), h.useEffect(() => {
1789
- l ? D() : (!S || !a) && C();
1790
- }, [l, C, S, a, D]);
1791
- const I = (v) => (b) => {
1792
- v.onKeyDown?.(b), !(b.key !== "Escape" || b.which === 229 || // Wait until IME is settled.
1793
- !P()) && (i || (b.stopPropagation(), u && u(b, "escapeKeyDown")));
1794
- }, L = (v) => (b) => {
1795
- v.onClick?.(b), b.target === b.currentTarget && u && u(b, "backdropClick");
1796
- };
1797
- return {
1798
- getRootProps: (v = {}) => {
1799
- const b = rt(t);
1800
- delete b.onTransitionEnter, delete b.onTransitionExited;
1801
- const q = {
1802
- ...b,
1803
- ...v
1804
- };
1805
- return {
1806
- /*
1807
- * Marking an element with the role presentation indicates to assistive technology
1808
- * that this element should be ignored; it exists to support the web application and
1809
- * is not meant for humans to interact with directly.
1810
- * https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md
1811
- */
1812
- role: "presentation",
1813
- ...q,
1814
- onKeyDown: I(q),
1815
- ref: y
1816
- };
1817
- },
1818
- getBackdropProps: (v = {}) => {
1819
- const b = v;
1820
- return {
1821
- "aria-hidden": !0,
1822
- ...b,
1823
- onClick: L(b),
1824
- open: l
1825
- };
1826
- },
1827
- getTransitionProps: () => {
1828
- const v = () => {
1829
- O(!1), s && s();
1830
- }, b = () => {
1831
- O(!0), d && d(), a && C();
1832
- };
1833
- return {
1834
- onEnter: Be(v, p?.props.onEnter ?? Xe),
1835
- onExited: Be(b, p?.props.onExited ?? Xe)
1836
- };
1837
- },
1838
- rootRef: y,
1839
- portalRef: _,
1840
- isTopModal: P,
1841
- exited: E,
1842
- hasTransition: S
1843
- };
1844
- }
1845
- function Qt(t) {
1846
- return ge("MuiModal", t);
1847
- }
1848
- he("MuiModal", ["root", "hidden", "backdrop"]);
1849
- const en = (t) => {
1850
- const {
1851
- open: n,
1852
- exited: i,
1853
- classes: r
1854
- } = t;
1855
- return ve({
1856
- root: ["root", !n && i && "hidden"],
1857
- backdrop: ["backdrop"]
1858
- }, Qt, r);
1859
- }, tn = H("div", {
1860
- name: "MuiModal",
1861
- slot: "Root",
1862
- overridesResolver: (t, n) => {
1863
- const {
1864
- ownerState: i
1865
- } = t;
1866
- return [n.root, !i.open && i.exited && n.hidden];
1867
- }
1868
- })(_e(({
1869
- theme: t
1870
- }) => ({
1871
- position: "fixed",
1872
- zIndex: (t.vars || t).zIndex.modal,
1873
- right: 0,
1874
- bottom: 0,
1875
- top: 0,
1876
- left: 0,
1877
- variants: [{
1878
- props: ({
1879
- ownerState: n
1880
- }) => !n.open && n.exited,
1881
- style: {
1882
- visibility: "hidden"
1883
- }
1884
- }]
1885
- }))), nn = H(Ae, {
1886
- name: "MuiModal",
1887
- slot: "Backdrop"
1888
- })({
1889
- zIndex: -1
1890
- }), st = /* @__PURE__ */ h.forwardRef(function(n, i) {
1891
- const r = be({
1892
- name: "MuiModal",
1893
- props: n
1894
- }), {
1895
- BackdropComponent: a = nn,
1896
- BackdropProps: s,
1897
- classes: d,
1898
- className: p,
1899
- closeAfterTransition: u = !1,
1900
- children: l,
1901
- container: m,
1902
- component: c,
1903
- components: o = {},
1904
- componentsProps: f = {},
1905
- disableAutoFocus: y = !1,
1906
- disableEnforceFocus: E = !1,
1907
- disableEscapeKeyDown: O = !1,
1908
- disablePortal: S = !1,
1909
- disableRestoreFocus: R = !1,
1910
- disableScrollLock: g = !1,
1911
- hideBackdrop: T = !1,
1912
- keepMounted: N = !1,
1913
- onClose: D,
1914
- onTransitionEnter: P,
1915
- onTransitionExited: _,
1916
- open: C,
1917
- slotProps: I = {},
1918
- slots: L = {},
1919
- // eslint-disable-next-line react/prop-types
1920
- theme: J,
1921
- ...F
1922
- } = r, x = {
1923
- ...r,
1924
- closeAfterTransition: u,
1925
- disableAutoFocus: y,
1926
- disableEnforceFocus: E,
1927
- disableEscapeKeyDown: O,
1928
- disablePortal: S,
1929
- disableRestoreFocus: R,
1930
- disableScrollLock: g,
1931
- hideBackdrop: T,
1932
- keepMounted: N
1933
- }, {
1934
- getRootProps: v,
1935
- getBackdropProps: b,
1936
- getTransitionProps: q,
1937
- portalRef: Q,
1938
- isTopModal: Te,
1939
- exited: se,
1940
- hasTransition: ae
1941
- } = Jt({
1942
- ...x,
1943
- rootRef: i
1944
- }), A = {
1945
- ...x,
1946
- exited: se
1947
- }, ee = en(A), K = {};
1948
- if (l.props.tabIndex === void 0 && (K.tabIndex = "-1"), ae) {
1949
- const {
1950
- onEnter: W,
1951
- onExited: te
1952
- } = q();
1953
- K.onEnter = W, K.onExited = te;
1954
- }
1955
- const le = {
1956
- slots: {
1957
- root: o.Root,
1958
- backdrop: o.Backdrop,
1959
- ...L
1960
- },
1961
- slotProps: {
1962
- ...f,
1963
- ...I
1964
- }
1965
- }, [xe, Oe] = j("root", {
1966
- ref: i,
1967
- elementType: tn,
1968
- externalForwardedProps: {
1969
- ...le,
1970
- ...F,
1971
- component: c
1972
- },
1973
- getSlotProps: v,
1974
- ownerState: A,
1975
- className: B(p, ee?.root, !A.open && A.exited && ee?.hidden)
1976
- }), [Se, Re] = j("backdrop", {
1977
- ref: s?.ref,
1978
- elementType: a,
1979
- externalForwardedProps: le,
1980
- shouldForwardComponentProp: !0,
1981
- additionalProps: s,
1982
- getSlotProps: (W) => b({
1983
- ...W,
1984
- onClick: (te) => {
1985
- W?.onClick && W.onClick(te);
1986
- }
1987
- }),
1988
- className: B(s?.className, ee?.backdrop),
1989
- ownerState: A
1990
- });
1991
- return !N && !C && (!ae || se) ? null : /* @__PURE__ */ M(fe, {
1992
- ref: Q,
1993
- container: m,
1994
- disablePortal: S,
1995
- children: /* @__PURE__ */ Ze(xe, {
1996
- ...Oe,
1997
- children: [!T && a ? /* @__PURE__ */ M(Se, {
1998
- ...Re
1999
- }) : null, /* @__PURE__ */ M(ye, {
2000
- disableEnforceFocus: E,
2001
- disableAutoFocus: y,
2002
- disableRestoreFocus: R,
2003
- isEnabled: Te,
2004
- open: C,
2005
- children: /* @__PURE__ */ h.cloneElement(l, K)
2006
- })]
2007
- })
2008
- });
2009
- });
2010
- process.env.NODE_ENV !== "production" && (st.propTypes = {
2011
- // ┌────────────────────────────── Warning ──────────────────────────────┐
2012
- // │ These PropTypes are generated from the TypeScript type definitions. │
2013
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
2014
- // └─────────────────────────────────────────────────────────────────────┘
2015
- /**
2016
- * A backdrop component. This prop enables custom backdrop rendering.
2017
- * @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.
2018
- * Use the `slots.backdrop` prop to make your application ready for the next version of Material UI.
2019
- * @default styled(Backdrop, {
2020
- * name: 'MuiModal',
2021
- * slot: 'Backdrop',
2022
- * })({
2023
- * zIndex: -1,
2024
- * })
2025
- */
2026
- BackdropComponent: e.elementType,
2027
- /**
2028
- * Props applied to the [`Backdrop`](https://mui.com/material-ui/api/backdrop/) element.
2029
- * @deprecated Use `slotProps.backdrop` instead.
2030
- */
2031
- BackdropProps: e.object,
2032
- /**
2033
- * A single child content element.
2034
- */
2035
- children: Ee.isRequired,
2036
- /**
2037
- * Override or extend the styles applied to the component.
2038
- */
2039
- classes: e.object,
2040
- /**
2041
- * @ignore
2042
- */
2043
- className: e.string,
2044
- /**
2045
- * When set to true the Modal waits until a nested Transition is completed before closing.
2046
- * @default false
2047
- */
2048
- closeAfterTransition: e.bool,
2049
- /**
2050
- * The component used for the root node.
2051
- * Either a string to use a HTML element or a component.
2052
- */
2053
- component: e.elementType,
2054
- /**
2055
- * The components used for each slot inside.
2056
- *
2057
- * @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.
2058
- *
2059
- * @default {}
2060
- */
2061
- components: e.shape({
2062
- Backdrop: e.elementType,
2063
- Root: e.elementType
2064
- }),
2065
- /**
2066
- * The extra props for the slot components.
2067
- * You can override the existing props or add new ones.
2068
- *
2069
- * @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.
2070
- *
2071
- * @default {}
2072
- */
2073
- componentsProps: e.shape({
2074
- backdrop: e.oneOfType([e.func, e.object]),
2075
- root: e.oneOfType([e.func, e.object])
2076
- }),
2077
- /**
2078
- * An HTML element or function that returns one.
2079
- * The `container` will have the portal children appended to it.
2080
- *
2081
- * You can also provide a callback, which is called in a React layout effect.
2082
- * This lets you set the container from a ref, and also makes server-side rendering possible.
2083
- *
2084
- * By default, it uses the body of the top-level document object,
2085
- * so it's simply `document.body` most of the time.
2086
- */
2087
- container: e.oneOfType([ot, e.func]),
2088
- /**
2089
- * If `true`, the modal will not automatically shift focus to itself when it opens, and
2090
- * replace it to the last focused element when it closes.
2091
- * This also works correctly with any modal children that have the `disableAutoFocus` prop.
2092
- *
2093
- * Generally this should never be set to `true` as it makes the modal less
2094
- * accessible to assistive technologies, like screen readers.
2095
- * @default false
2096
- */
2097
- disableAutoFocus: e.bool,
2098
- /**
2099
- * If `true`, the modal will not prevent focus from leaving the modal while open.
2100
- *
2101
- * Generally this should never be set to `true` as it makes the modal less
2102
- * accessible to assistive technologies, like screen readers.
2103
- * @default false
2104
- */
2105
- disableEnforceFocus: e.bool,
2106
- /**
2107
- * If `true`, hitting escape will not fire the `onClose` callback.
2108
- * @default false
2109
- */
2110
- disableEscapeKeyDown: e.bool,
2111
- /**
2112
- * The `children` will be under the DOM hierarchy of the parent component.
2113
- * @default false
2114
- */
2115
- disablePortal: e.bool,
2116
- /**
2117
- * If `true`, the modal will not restore focus to previously focused element once
2118
- * modal is hidden or unmounted.
2119
- * @default false
2120
- */
2121
- disableRestoreFocus: e.bool,
2122
- /**
2123
- * Disable the scroll lock behavior.
2124
- * @default false
2125
- */
2126
- disableScrollLock: e.bool,
2127
- /**
2128
- * If `true`, the backdrop is not rendered.
2129
- * @default false
2130
- */
2131
- hideBackdrop: e.bool,
2132
- /**
2133
- * Always keep the children in the DOM.
2134
- * This prop can be useful in SEO situation or
2135
- * when you want to maximize the responsiveness of the Modal.
2136
- * @default false
2137
- */
2138
- keepMounted: e.bool,
2139
- /**
2140
- * Callback fired when the component requests to be closed.
2141
- * The `reason` parameter can optionally be used to control the response to `onClose`.
2142
- *
2143
- * @param {object} event The event source of the callback.
2144
- * @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`.
2145
- */
2146
- onClose: e.func,
2147
- /**
2148
- * A function called when a transition enters.
2149
- */
2150
- onTransitionEnter: e.func,
2151
- /**
2152
- * A function called when a transition has exited.
2153
- */
2154
- onTransitionExited: e.func,
2155
- /**
2156
- * If `true`, the component is shown.
2157
- */
2158
- open: e.bool.isRequired,
2159
- /**
2160
- * The props used for each slot inside the Modal.
2161
- * @default {}
2162
- */
2163
- slotProps: e.shape({
2164
- backdrop: e.oneOfType([e.func, e.object]),
2165
- root: e.oneOfType([e.func, e.object])
2166
- }),
2167
- /**
2168
- * The components used for each slot inside the Modal.
2169
- * Either a string to use a HTML element or a component.
2170
- * @default {}
2171
- */
2172
- slots: e.shape({
2173
- backdrop: e.elementType,
2174
- root: e.elementType
2175
- }),
2176
- /**
2177
- * The system prop that allows defining system overrides as well as additional CSS styles.
2178
- */
2179
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
2180
- });
2181
- function rn(t) {
2182
- return ge("MuiDialog", t);
2183
- }
2184
- const Ne = he("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]), on = H(Ae, {
2185
- name: "MuiDialog",
2186
- slot: "Backdrop",
2187
- overrides: (t, n) => n.backdrop
2188
- })({
2189
- // Improve scrollable dialog support.
2190
- zIndex: -1
2191
- }), sn = (t) => {
2192
- const {
2193
- classes: n,
2194
- scroll: i,
2195
- maxWidth: r,
2196
- fullWidth: a,
2197
- fullScreen: s
2198
- } = t, d = {
2199
- root: ["root"],
2200
- container: ["container", `scroll${X(i)}`],
2201
- paper: ["paper", `paperScroll${X(i)}`, `paperWidth${X(String(r))}`, a && "paperFullWidth", s && "paperFullScreen"]
2202
- };
2203
- return ve(d, rn, n);
2204
- }, an = H(st, {
2205
- name: "MuiDialog",
2206
- slot: "Root"
2207
- })({
2208
- "@media print": {
2209
- // Use !important to override the Modal inline-style.
2210
- position: "absolute !important"
2211
- }
2212
- }), ln = H("div", {
2213
- name: "MuiDialog",
2214
- slot: "Container",
2215
- overridesResolver: (t, n) => {
2216
- const {
2217
- ownerState: i
2218
- } = t;
2219
- return [n.container, n[`scroll${X(i.scroll)}`]];
2220
- }
2221
- })({
2222
- height: "100%",
2223
- "@media print": {
2224
- height: "auto"
2225
- },
2226
- // We disable the focus ring for mouse, touch and keyboard users.
2227
- outline: 0,
2228
- variants: [{
2229
- props: {
2230
- scroll: "paper"
2231
- },
2232
- style: {
2233
- display: "flex",
2234
- justifyContent: "center",
2235
- alignItems: "center"
2236
- }
2237
- }, {
2238
- props: {
2239
- scroll: "body"
2240
- },
2241
- style: {
2242
- overflowY: "auto",
2243
- overflowX: "hidden",
2244
- textAlign: "center",
2245
- "&::after": {
2246
- content: '""',
2247
- display: "inline-block",
2248
- verticalAlign: "middle",
2249
- height: "100%",
2250
- width: "0"
2251
- }
2252
- }
2253
- }]
2254
- }), cn = H(Me, {
2255
- name: "MuiDialog",
2256
- slot: "Paper",
2257
- overridesResolver: (t, n) => {
2258
- const {
2259
- ownerState: i
2260
- } = t;
2261
- return [n.paper, n[`scrollPaper${X(i.scroll)}`], n[`paperWidth${X(String(i.maxWidth))}`], i.fullWidth && n.paperFullWidth, i.fullScreen && n.paperFullScreen];
2262
- }
2263
- })(_e(({
2264
- theme: t
2265
- }) => ({
2266
- margin: 32,
2267
- position: "relative",
2268
- overflowY: "auto",
2269
- "@media print": {
2270
- overflowY: "visible",
2271
- boxShadow: "none"
2272
- },
2273
- variants: [{
2274
- props: {
2275
- scroll: "paper"
2276
- },
2277
- style: {
2278
- display: "flex",
2279
- flexDirection: "column",
2280
- maxHeight: "calc(100% - 64px)"
2281
- }
2282
- }, {
2283
- props: {
2284
- scroll: "body"
2285
- },
2286
- style: {
2287
- display: "inline-block",
2288
- verticalAlign: "middle",
2289
- textAlign: "initial"
2290
- }
2291
- }, {
2292
- props: ({
2293
- ownerState: n
2294
- }) => !n.maxWidth,
2295
- style: {
2296
- maxWidth: "calc(100% - 64px)"
2297
- }
2298
- }, {
2299
- props: {
2300
- maxWidth: "xs"
2301
- },
2302
- style: {
2303
- maxWidth: t.breakpoints.unit === "px" ? Math.max(t.breakpoints.values.xs, 444) : `max(${t.breakpoints.values.xs}${t.breakpoints.unit}, 444px)`,
2304
- [`&.${Ne.paperScrollBody}`]: {
2305
- [t.breakpoints.down(Math.max(t.breakpoints.values.xs, 444) + 64)]: {
2306
- maxWidth: "calc(100% - 64px)"
2307
- }
2308
- }
2309
- }
2310
- }, ...Object.keys(t.breakpoints.values).filter((n) => n !== "xs").map((n) => ({
2311
- props: {
2312
- maxWidth: n
2313
- },
2314
- style: {
2315
- maxWidth: `${t.breakpoints.values[n]}${t.breakpoints.unit}`,
2316
- [`&.${Ne.paperScrollBody}`]: {
2317
- [t.breakpoints.down(t.breakpoints.values[n] + 64)]: {
2318
- maxWidth: "calc(100% - 64px)"
2319
- }
2320
- }
2321
- }
2322
- })), {
2323
- props: ({
2324
- ownerState: n
2325
- }) => n.fullWidth,
2326
- style: {
2327
- width: "calc(100% - 64px)"
2328
- }
2329
- }, {
2330
- props: ({
2331
- ownerState: n
2332
- }) => n.fullScreen,
2333
- style: {
2334
- margin: 0,
2335
- width: "100%",
2336
- maxWidth: "100%",
2337
- height: "100%",
2338
- maxHeight: "none",
2339
- borderRadius: 0,
2340
- [`&.${Ne.paperScrollBody}`]: {
2341
- margin: 0,
2342
- maxWidth: "100%"
2343
- }
2344
- }
2345
- }]
2346
- }))), un = /* @__PURE__ */ h.forwardRef(function(n, i) {
2347
- const r = be({
2348
- props: n,
2349
- name: "MuiDialog"
2350
- }), a = Ce(), s = {
2351
- enter: a.transitions.duration.enteringScreen,
2352
- exit: a.transitions.duration.leavingScreen
2353
- }, {
2354
- "aria-describedby": d,
2355
- "aria-labelledby": p,
2356
- "aria-modal": u = !0,
2357
- BackdropComponent: l,
2358
- BackdropProps: m,
2359
- children: c,
2360
- className: o,
2361
- disableEscapeKeyDown: f = !1,
2362
- fullScreen: y = !1,
2363
- fullWidth: E = !1,
2364
- maxWidth: O = "sm",
2365
- onClick: S,
2366
- onClose: R,
2367
- open: g,
2368
- PaperComponent: T = Me,
2369
- PaperProps: N = {},
2370
- scroll: D = "paper",
2371
- slots: P = {},
2372
- slotProps: _ = {},
2373
- TransitionComponent: C = me,
2374
- transitionDuration: I = s,
2375
- TransitionProps: L,
2376
- ...J
2377
- } = r, F = {
2378
- ...r,
2379
- disableEscapeKeyDown: f,
2380
- fullScreen: y,
2381
- fullWidth: E,
2382
- maxWidth: O,
2383
- scroll: D
2384
- }, x = sn(F), v = h.useRef(), b = (ne) => {
2385
- v.current = ne.target === ne.currentTarget;
2386
- }, q = (ne) => {
2387
- S && S(ne), v.current && (v.current = null, R && R(ne, "backdropClick"));
2388
- }, Q = gt(p), Te = h.useMemo(() => ({
2389
- titleId: Q
2390
- }), [Q]), se = {
2391
- transition: C,
2392
- ...P
2393
- }, ae = {
2394
- transition: L,
2395
- paper: N,
2396
- backdrop: m,
2397
- ..._
2398
- }, A = {
2399
- slots: se,
2400
- slotProps: ae
2401
- }, [ee, K] = j("root", {
2402
- elementType: an,
2403
- shouldForwardComponentProp: !0,
2404
- externalForwardedProps: A,
2405
- ownerState: F,
2406
- className: B(x.root, o),
2407
- ref: i
2408
- }), [le, xe] = j("backdrop", {
2409
- elementType: on,
2410
- shouldForwardComponentProp: !0,
2411
- externalForwardedProps: A,
2412
- ownerState: F
2413
- }), [Oe, Se] = j("paper", {
2414
- elementType: cn,
2415
- shouldForwardComponentProp: !0,
2416
- externalForwardedProps: A,
2417
- ownerState: F,
2418
- className: B(x.paper, N.className)
2419
- }), [Re, W] = j("container", {
2420
- elementType: ln,
2421
- externalForwardedProps: A,
2422
- ownerState: F,
2423
- className: x.container
2424
- }), [te, at] = j("transition", {
2425
- elementType: me,
2426
- externalForwardedProps: A,
2427
- ownerState: F,
2428
- additionalProps: {
2429
- appear: !0,
2430
- in: g,
2431
- timeout: I,
2432
- role: "presentation"
2433
- }
2434
- });
2435
- return /* @__PURE__ */ M(ee, {
2436
- closeAfterTransition: !0,
2437
- slots: {
2438
- backdrop: le
2439
- },
2440
- slotProps: {
2441
- backdrop: {
2442
- transitionDuration: I,
2443
- as: l,
2444
- ...xe
2445
- }
2446
- },
2447
- disableEscapeKeyDown: f,
2448
- onClose: R,
2449
- open: g,
2450
- onClick: q,
2451
- ...K,
2452
- ...J,
2453
- children: /* @__PURE__ */ M(te, {
2454
- ...at,
2455
- children: /* @__PURE__ */ M(Re, {
2456
- onMouseDown: b,
2457
- ...W,
2458
- children: /* @__PURE__ */ M(Oe, {
2459
- as: T,
2460
- elevation: 24,
2461
- role: "dialog",
2462
- "aria-describedby": d,
2463
- "aria-labelledby": Q,
2464
- "aria-modal": u,
2465
- ...Se,
2466
- children: /* @__PURE__ */ M(ct.Provider, {
2467
- value: Te,
2468
- children: c
2469
- })
2470
- })
2471
- })
2472
- })
2473
- });
2474
- });
2475
- process.env.NODE_ENV !== "production" && (un.propTypes = {
2476
- // ┌────────────────────────────── Warning ──────────────────────────────┐
2477
- // │ These PropTypes are generated from the TypeScript type definitions. │
2478
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
2479
- // └─────────────────────────────────────────────────────────────────────┘
2480
- /**
2481
- * The id(s) of the element(s) that describe the dialog.
2482
- */
2483
- "aria-describedby": e.string,
2484
- /**
2485
- * The id(s) of the element(s) that label the dialog.
2486
- */
2487
- "aria-labelledby": e.string,
2488
- /**
2489
- * Informs assistive technologies that the element is modal.
2490
- * It's added on the element with role="dialog".
2491
- * @default true
2492
- */
2493
- "aria-modal": e.oneOfType([e.oneOf(["false", "true"]), e.bool]),
2494
- /**
2495
- * A backdrop component. This prop enables custom backdrop rendering.
2496
- * @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.
2497
- * Use the `slots.backdrop` prop to make your application ready for the next version of Material UI.
2498
- * @default styled(Backdrop, {
2499
- * name: 'MuiModal',
2500
- * slot: 'Backdrop',
2501
- * })({
2502
- * zIndex: -1,
2503
- * })
2504
- */
2505
- BackdropComponent: e.elementType,
2506
- /**
2507
- * @ignore
2508
- */
2509
- BackdropProps: e.object,
2510
- /**
2511
- * Dialog children, usually the included sub-components.
2512
- */
2513
- children: e.node,
2514
- /**
2515
- * Override or extend the styles applied to the component.
2516
- */
2517
- classes: e.object,
2518
- /**
2519
- * @ignore
2520
- */
2521
- className: e.string,
2522
- /**
2523
- * If `true`, hitting escape will not fire the `onClose` callback.
2524
- * @default false
2525
- */
2526
- disableEscapeKeyDown: e.bool,
2527
- /**
2528
- * If `true`, the dialog is full-screen.
2529
- * @default false
2530
- */
2531
- fullScreen: e.bool,
2532
- /**
2533
- * If `true`, the dialog stretches to `maxWidth`.
2534
- *
2535
- * Notice that the dialog width grow is limited by the default margin.
2536
- * @default false
2537
- */
2538
- fullWidth: e.bool,
2539
- /**
2540
- * Determine the max-width of the dialog.
2541
- * The dialog width grows with the size of the screen.
2542
- * Set to `false` to disable `maxWidth`.
2543
- * @default 'sm'
2544
- */
2545
- maxWidth: e.oneOfType([e.oneOf(["xs", "sm", "md", "lg", "xl", !1]), e.string]),
2546
- /**
2547
- * @ignore
2548
- */
2549
- onClick: e.func,
2550
- /**
2551
- * Callback fired when the component requests to be closed.
2552
- *
2553
- * @param {object} event The event source of the callback.
2554
- * @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`.
2555
- */
2556
- onClose: e.func,
2557
- /**
2558
- * If `true`, the component is shown.
2559
- */
2560
- open: e.bool.isRequired,
2561
- /**
2562
- * The component used to render the body of the dialog.
2563
- * @default Paper
2564
- */
2565
- PaperComponent: e.elementType,
2566
- /**
2567
- * Props applied to the [`Paper`](https://mui.com/material-ui/api/paper/) element.
2568
- * @default {}
2569
- * @deprecated Use `slotProps.paper` 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.
2570
- */
2571
- PaperProps: e.object,
2572
- /**
2573
- * Determine the container for scrolling the dialog.
2574
- * @default 'paper'
2575
- */
2576
- scroll: e.oneOf(["body", "paper"]),
2577
- /**
2578
- * The props used for each slot inside.
2579
- * @default {}
2580
- */
2581
- slotProps: e.shape({
2582
- backdrop: e.oneOfType([e.func, e.object]),
2583
- container: e.oneOfType([e.func, e.object]),
2584
- paper: e.oneOfType([e.func, e.object]),
2585
- root: e.oneOfType([e.func, e.object]),
2586
- transition: e.oneOfType([e.func, e.object])
2587
- }),
2588
- /**
2589
- * The components used for each slot inside.
2590
- * @default {}
2591
- */
2592
- slots: e.shape({
2593
- backdrop: e.elementType,
2594
- container: e.elementType,
2595
- paper: e.elementType,
2596
- root: e.elementType,
2597
- transition: e.elementType
2598
- }),
2599
- /**
2600
- * The system prop that allows defining system overrides as well as additional CSS styles.
2601
- */
2602
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
2603
- /**
2604
- * The component used for the transition.
2605
- * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
2606
- * @default Fade
2607
- * @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.
2608
- */
2609
- TransitionComponent: e.elementType,
2610
- /**
2611
- * The duration for the transition, in milliseconds.
2612
- * You may specify a single timeout for all transitions, or individually with an object.
2613
- * @default {
2614
- * enter: theme.transitions.duration.enteringScreen,
2615
- * exit: theme.transitions.duration.leavingScreen,
2616
- * }
2617
- */
2618
- transitionDuration: e.oneOfType([e.number, e.shape({
2619
- appear: e.number,
2620
- enter: e.number,
2621
- exit: e.number
2622
- })]),
2623
- /**
2624
- * Props applied to the transition element.
2625
- * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
2626
- * @deprecated Use `slotProps.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.
2627
- */
2628
- TransitionProps: e.object
2629
- });
2630
- export {
2631
- un as D
2632
- };