@evolver-fi/evolver-basics-admin-components 0.0.21 → 8.2.2-alpha.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 (209) hide show
  1. package/dist/EnumSelectFilter-DDWIjz5i.js +35 -0
  2. package/dist/EnumSelectFilter-DDWIjz5i.js.map +1 -0
  3. package/dist/FilterLink-OxQDWR5G.js +29 -0
  4. package/dist/FilterLink-OxQDWR5G.js.map +1 -0
  5. package/dist/Table-IciQttr3.js +79 -0
  6. package/dist/Table-IciQttr3.js.map +1 -0
  7. package/dist/TableMetadataDisplay-BM61EulC.js +49 -0
  8. package/dist/TableMetadataDisplay-BM61EulC.js.map +1 -0
  9. package/dist/TextFilter-CLOKjiSd.js +54 -0
  10. package/dist/TextFilter-CLOKjiSd.js.map +1 -0
  11. package/dist/api-CMiZYkfc.js +32 -0
  12. package/dist/api-CMiZYkfc.js.map +1 -0
  13. package/dist/breadcrumbs/index.js +2 -5
  14. package/dist/breadcrumbs-BAwnKRxL.js +32 -0
  15. package/dist/breadcrumbs-BAwnKRxL.js.map +1 -0
  16. package/dist/breadcrumbs.css +1 -0
  17. package/dist/client/index.js +341 -0
  18. package/dist/client/index.js.map +1 -0
  19. package/dist/configuration-values/index.js +2 -0
  20. package/dist/configuration-values-CjOfmPRq.js +3464 -0
  21. package/dist/configuration-values-CjOfmPRq.js.map +1 -0
  22. package/dist/control-values/index.js +2 -0
  23. package/dist/control-values-CzQOB4WJ.js +144 -0
  24. package/dist/control-values-CzQOB4WJ.js.map +1 -0
  25. package/dist/exhaustiveValues-BYWkg9M1.js +6 -0
  26. package/dist/exhaustiveValues-BYWkg9M1.js.map +1 -0
  27. package/dist/filter/index.js +4 -11
  28. package/dist/formData-BO275hRZ.js +43 -0
  29. package/dist/formData-BO275hRZ.js.map +1 -0
  30. package/dist/jwt-tokens/index.js +2 -7
  31. package/dist/jwt-tokens-DnKsHei4.js +71 -0
  32. package/dist/jwt-tokens-DnKsHei4.js.map +1 -0
  33. package/dist/main/index.js +17 -51
  34. package/dist/message-log/index.js +2 -10
  35. package/dist/message-log-BdrJtbsP.js +337 -0
  36. package/dist/message-log-BdrJtbsP.js.map +1 -0
  37. package/dist/message-sending/index.js +2 -10
  38. package/dist/message-sending-dvTw2fFm.js +181 -0
  39. package/dist/message-sending-dvTw2fFm.js.map +1 -0
  40. package/dist/message-targets/index.js +2 -0
  41. package/dist/message-targets-8EppIJde.js +406 -0
  42. package/dist/message-targets-8EppIJde.js.map +1 -0
  43. package/dist/pagination-C4QUYRMf.js +20 -0
  44. package/dist/pagination-C4QUYRMf.js.map +1 -0
  45. package/dist/scheduled-tasks/index.js +2 -14
  46. package/dist/scheduled-tasks-BtBnBrE7.js +647 -0
  47. package/dist/scheduled-tasks-BtBnBrE7.js.map +1 -0
  48. package/dist/schemas-D-8_LuND.js +2986 -0
  49. package/dist/schemas-D-8_LuND.js.map +1 -0
  50. package/dist/table/index.js +2 -6
  51. package/dist/triggerables/index.js +3 -9
  52. package/dist/triggerables-DgrIeQMi.js +51 -0
  53. package/dist/triggerables-DgrIeQMi.js.map +1 -0
  54. package/dist/types/breadcrumbs.d.ts +1 -1
  55. package/dist/types/client/index.d.ts +5 -0
  56. package/dist/types/client.d.ts +2 -0
  57. package/dist/types/common/exhaustiveValues.d.ts +5 -0
  58. package/dist/types/common/formData.d.ts +20 -0
  59. package/dist/types/common/pagination.d.ts +8 -0
  60. package/dist/types/{admin-components/src/components → components}/breadcrumbs/BreadCrumbs.d.ts +1 -1
  61. package/dist/types/{admin-components/src/components → components}/filter/EnumSelectFilter.d.ts +0 -4
  62. package/dist/types/{admin-components/src/components → components}/filter/FilterHelperTexts.d.ts +1 -1
  63. package/dist/types/{admin-components/src/components → components}/filter/FilterLink.d.ts +1 -1
  64. package/dist/types/{admin-components/src/components → components}/filter/TextFilter.d.ts +1 -1
  65. package/dist/types/components/filter/createEnumSelectFilter.d.ts +5 -0
  66. package/dist/types/components/metadata/TableMetadataDisplay.d.ts +2 -0
  67. package/dist/types/{admin-components/src/components → components}/table/Pagination.d.ts +1 -1
  68. package/dist/types/{admin-components/src/components → components}/table/Table.d.ts +1 -1
  69. package/dist/types/configuration-values.d.ts +2 -0
  70. package/dist/types/control-values.d.ts +2 -0
  71. package/dist/types/filter.d.ts +1 -1
  72. package/dist/types/{admin-components/src/index.d.ts → index.d.ts} +3 -0
  73. package/dist/types/jwt-tokens.d.ts +1 -1
  74. package/dist/types/main.d.ts +1 -1
  75. package/dist/types/message-log.d.ts +1 -1
  76. package/dist/types/message-sending.d.ts +1 -1
  77. package/dist/types/message-targets.d.ts +2 -0
  78. package/dist/types/routes/configuration-values/ConfigurationValueFormRoute.d.ts +2 -0
  79. package/dist/types/routes/configuration-values/ConfigurationValuesRoute.d.ts +2 -0
  80. package/dist/types/routes/configuration-values/action.d.ts +8 -0
  81. package/dist/types/routes/configuration-values/api.d.ts +53 -0
  82. package/dist/types/routes/configuration-values/configurationValueColumns.d.ts +4 -0
  83. package/dist/types/routes/configuration-values/index.d.ts +5 -0
  84. package/dist/types/routes/configuration-values/loader.d.ts +52 -0
  85. package/dist/types/routes/control-values/ControlValuesRoute.d.ts +2 -0
  86. package/dist/types/routes/control-values/SingleControlValueRoute.d.ts +2 -0
  87. package/dist/types/routes/control-values/api.d.ts +43 -0
  88. package/dist/types/routes/control-values/controlValueColumns.d.ts +4 -0
  89. package/dist/types/routes/control-values/index.d.ts +4 -0
  90. package/dist/types/routes/control-values/loader.d.ts +43 -0
  91. package/dist/types/routes/jwt-tokens/JwtTokensRoute.d.ts +6 -0
  92. package/dist/types/routes/jwt-tokens/api.d.ts +41 -0
  93. package/dist/types/routes/jwt-tokens/index.d.ts +3 -0
  94. package/dist/types/routes/jwt-tokens/loader.d.ts +35 -0
  95. package/dist/types/routes/message-log/LogBodyLink.d.ts +6 -0
  96. package/dist/types/routes/message-log/MessageLogRoute.d.ts +2 -0
  97. package/dist/types/routes/message-log/SingleLogMessageRoute.d.ts +6 -0
  98. package/dist/types/routes/message-log/api.d.ts +88 -0
  99. package/dist/types/routes/message-log/index.d.ts +4 -0
  100. package/dist/types/routes/message-log/loader.d.ts +53 -0
  101. package/dist/types/routes/message-sending/MessageSendingRoute.d.ts +2 -0
  102. package/dist/types/routes/message-sending/SingleMessageRoute.d.ts +2 -0
  103. package/dist/types/routes/message-sending/api.d.ts +92 -0
  104. package/dist/types/routes/message-sending/index.d.ts +4 -0
  105. package/dist/types/routes/message-sending/loader.d.ts +34 -0
  106. package/dist/types/{admin-components/src/routes → routes}/message-sending/types.d.ts +4 -2
  107. package/dist/types/routes/message-targets/MessageTargetFormRoute.d.ts +2 -0
  108. package/dist/types/routes/message-targets/MessageTargetsRoute.d.ts +2 -0
  109. package/dist/types/routes/message-targets/action.d.ts +8 -0
  110. package/dist/types/routes/message-targets/api.d.ts +12 -0
  111. package/dist/types/routes/message-targets/index.d.ts +5 -0
  112. package/dist/types/routes/message-targets/loader.d.ts +15 -0
  113. package/dist/types/routes/scheduled-tasks/ScheduledTaskFormRoute.d.ts +2 -0
  114. package/dist/types/routes/scheduled-tasks/ScheduledTasksRoute.d.ts +2 -0
  115. package/dist/types/routes/scheduled-tasks/action.d.ts +21 -0
  116. package/dist/types/routes/scheduled-tasks/api.d.ts +75 -0
  117. package/dist/types/routes/scheduled-tasks/index.d.ts +5 -0
  118. package/dist/types/routes/scheduled-tasks/loader.d.ts +57 -0
  119. package/dist/types/routes/scheduled-tasks/parseScheduledTask.d.ts +15 -0
  120. package/dist/types/routes/triggerables/TriggerablesRoute.d.ts +2 -0
  121. package/dist/types/routes/triggerables/action.d.ts +6 -0
  122. package/dist/types/routes/triggerables/api.d.ts +33 -0
  123. package/dist/types/routes/triggerables/index.d.ts +4 -0
  124. package/dist/types/routes/triggerables/loader.d.ts +3 -0
  125. package/dist/types/scheduled-tasks.d.ts +1 -1
  126. package/dist/types/table.d.ts +1 -1
  127. package/dist/types/triggerables.d.ts +1 -1
  128. package/dist/types/types/openapiTypes.d.ts +3321 -0
  129. package/package.json +60 -29
  130. package/dist/BreadCrumbs-BzG2oi8Z.js +0 -19
  131. package/dist/BreadCrumbs-BzG2oi8Z.js.map +0 -1
  132. package/dist/BreadCrumbs.css +0 -1
  133. package/dist/ConfirmButton-jayUa8_J.js +0 -16
  134. package/dist/ConfirmButton-jayUa8_J.js.map +0 -1
  135. package/dist/EnumSelectFilter-DiJhYa2m.js +0 -40
  136. package/dist/EnumSelectFilter-DiJhYa2m.js.map +0 -1
  137. package/dist/ExpandMore-D6gf2UVG.js +0 -14
  138. package/dist/ExpandMore-D6gf2UVG.js.map +0 -1
  139. package/dist/FilterLink-CHw7-m82.js +0 -43
  140. package/dist/FilterLink-CHw7-m82.js.map +0 -1
  141. package/dist/JwtTokensRoute-B3SgLM0q.js +0 -2335
  142. package/dist/JwtTokensRoute-B3SgLM0q.js.map +0 -1
  143. package/dist/ScheduledTasksRoute-CNhOAAKd.js +0 -1152
  144. package/dist/ScheduledTasksRoute-CNhOAAKd.js.map +0 -1
  145. package/dist/SingleLogMessageRoute-BT4ghiqv.js +0 -305
  146. package/dist/SingleLogMessageRoute-BT4ghiqv.js.map +0 -1
  147. package/dist/SingleMessageRoute-DaaWvgfS.js +0 -293
  148. package/dist/SingleMessageRoute-DaaWvgfS.js.map +0 -1
  149. package/dist/Table-DgRqEB1x.js +0 -154
  150. package/dist/Table-DgRqEB1x.js.map +0 -1
  151. package/dist/TableMetadataDisplay-C7RP2ZrM.js +0 -122
  152. package/dist/TableMetadataDisplay-C7RP2ZrM.js.map +0 -1
  153. package/dist/TextFilter-BKUfkFQe.js +0 -70
  154. package/dist/TextFilter-BKUfkFQe.js.map +0 -1
  155. package/dist/TriggerablesRoute-opCAjNCv.js +0 -3556
  156. package/dist/TriggerablesRoute-opCAjNCv.js.map +0 -1
  157. package/dist/breadcrumbs/index.js.map +0 -1
  158. package/dist/createSvgIcon-Cf1cru4R.js +0 -3945
  159. package/dist/createSvgIcon-Cf1cru4R.js.map +0 -1
  160. package/dist/evolverClient-B_TZXnpV.js +0 -1602
  161. package/dist/evolverClient-B_TZXnpV.js.map +0 -1
  162. package/dist/filter/index.js.map +0 -1
  163. package/dist/jsx-runtime-B6kdoens.js +0 -635
  164. package/dist/jsx-runtime-B6kdoens.js.map +0 -1
  165. package/dist/jwt-tokens/index.js.map +0 -1
  166. package/dist/main/index.js.map +0 -1
  167. package/dist/message-log/index.js.map +0 -1
  168. package/dist/message-sending/index.js.map +0 -1
  169. package/dist/parser-Bj3mcA83.js +0 -6096
  170. package/dist/parser-Bj3mcA83.js.map +0 -1
  171. package/dist/scheduled-tasks/index.js.map +0 -1
  172. package/dist/table/index.js.map +0 -1
  173. package/dist/triggerables/index.js.map +0 -1
  174. package/dist/types/admin-components/src/components/metadata/TableMetadataDisplay.d.ts +0 -2
  175. package/dist/types/admin-components/src/routes/jwt-tokens/JwtTokensRoute.d.ts +0 -2
  176. package/dist/types/admin-components/src/routes/jwt-tokens/index.d.ts +0 -2
  177. package/dist/types/admin-components/src/routes/jwt-tokens/loader.d.ts +0 -11
  178. package/dist/types/admin-components/src/routes/message-log/MessageLogRoute.d.ts +0 -2
  179. package/dist/types/admin-components/src/routes/message-log/SingleLogMessageRoute.d.ts +0 -2
  180. package/dist/types/admin-components/src/routes/message-log/index.d.ts +0 -3
  181. package/dist/types/admin-components/src/routes/message-log/loader.d.ts +0 -7
  182. package/dist/types/admin-components/src/routes/message-sending/MessageSendingRoute.d.ts +0 -2
  183. package/dist/types/admin-components/src/routes/message-sending/SingleMessageRoute.d.ts +0 -2
  184. package/dist/types/admin-components/src/routes/message-sending/index.d.ts +0 -3
  185. package/dist/types/admin-components/src/routes/message-sending/loader.d.ts +0 -6
  186. package/dist/types/admin-components/src/routes/scheduled-tasks/ScheduledTaskFormRoute.d.ts +0 -2
  187. package/dist/types/admin-components/src/routes/scheduled-tasks/ScheduledTasksRoute.d.ts +0 -2
  188. package/dist/types/admin-components/src/routes/scheduled-tasks/action.d.ts +0 -20
  189. package/dist/types/admin-components/src/routes/scheduled-tasks/index.d.ts +0 -4
  190. package/dist/types/admin-components/src/routes/scheduled-tasks/loader.d.ts +0 -9
  191. package/dist/types/admin-components/src/routes/triggerables/TriggerablesRoute.d.ts +0 -2
  192. package/dist/types/admin-components/src/routes/triggerables/action.d.ts +0 -10
  193. package/dist/types/admin-components/src/routes/triggerables/index.d.ts +0 -3
  194. package/dist/types/admin-components/src/routes/triggerables/loader.d.ts +0 -9
  195. package/dist/types/admin-ui/src/front-page/FrontPage.d.ts +0 -2
  196. package/dist/validation-DStiilqx.js +0 -22
  197. package/dist/validation-DStiilqx.js.map +0 -1
  198. /package/dist/types/{admin-components/src/common → common}/format.d.ts +0 -0
  199. /package/dist/types/{admin-components/src/common → common}/types.d.ts +0 -0
  200. /package/dist/types/{admin-components/src/common → common}/validation.d.ts +0 -0
  201. /package/dist/types/{admin-components/src/components → components}/breadcrumbs/index.d.ts +0 -0
  202. /package/dist/types/{admin-components/src/components → components}/filter/index.d.ts +0 -0
  203. /package/dist/types/{admin-components/src/components → components}/filter/types.d.ts +0 -0
  204. /package/dist/types/{admin-components/src/components → components}/metadata/utils.d.ts +0 -0
  205. /package/dist/types/{admin-components/src/components → components}/table/index.d.ts +0 -0
  206. /package/dist/types/{admin-components/src/components → components}/table/types.d.ts +0 -0
  207. /package/dist/types/{admin-components/src/routes → routes}/message-log/messageLogColumns.d.ts +0 -0
  208. /package/dist/types/{admin-components/src/routes → routes}/message-log/types.d.ts +0 -0
  209. /package/dist/types/{admin-components/src/routes → routes}/message-sending/messageSendingColumns.d.ts +0 -0
@@ -1,3556 +0,0 @@
1
- import { j as p } from "./jsx-runtime-B6kdoens.js";
2
- import * as h from "react";
3
- import Z, { Children as an, isValidElement as Se, cloneElement as Re, useState as Fe } from "react";
4
- import { g as we, c as $e, a as Nt } from "./evolverClient-B_TZXnpV.js";
5
- import { Card as ln, CardHeader as cn, CircularProgress as un, CardContent as ct, Typography as ce, CardActions as pn, Tooltip as ut, IconButton as pt, Collapse as dn, Box as fn, TextField as gn, Button as mn } from "@mui/material";
6
- import { P as n, _ as f, b as $, d as hn, e as V, u as Ne, T as bn, f as vn, h as X, j as J, s as P, k as Oe, l as Y, m as Q, n as Ot, o as xn, p as Te, q as K, c as be, t as dt, v as ft, w as jt, x as yn, y as Me, z as Ye, r as Tn, i as En, A as Cn, B as Sn, C as Rn } from "./createSvgIcon-Cf1cru4R.js";
7
- import { ThemeContext as Nn, keyframes as Ze } from "@emotion/react";
8
- import { d as wt } from "./ExpandMore-D6gf2UVG.js";
9
- import Ee from "react-dom";
10
- import "axios";
11
- import { useNavigate as On, useSubmit as jn, useLoaderData as wn, useActionData as $n } from "react-router";
12
- function ke(e, t) {
13
- return process.env.NODE_ENV === "production" ? () => null : function(...r) {
14
- return e(...r) || t(...r);
15
- };
16
- }
17
- function Mn(e) {
18
- const {
19
- prototype: t = {}
20
- } = e;
21
- return !!t.isReactComponent;
22
- }
23
- function kn(e, t, o, r, i) {
24
- const s = e[t], a = i || t;
25
- if (s == null || // When server-side rendering React doesn't warn either.
26
- // This is not an accurate check for SSR.
27
- // This is only in place for emotion compat.
28
- // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
29
- typeof window > "u")
30
- return null;
31
- let l;
32
- return typeof s == "function" && !Mn(s) && (l = "Did you accidentally provide a plain function component instead?"), l !== void 0 ? new Error(`Invalid ${r} \`${a}\` supplied to \`${o}\`. Expected an element type that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
33
- }
34
- const $t = ke(n.elementType, kn), Pn = n.oneOfType([n.func, n.object]);
35
- function In(e) {
36
- const t = typeof e;
37
- switch (t) {
38
- case "number":
39
- return Number.isNaN(e) ? "NaN" : Number.isFinite(e) ? e !== Math.floor(e) ? "float" : "number" : "Infinity";
40
- case "object":
41
- return e === null ? "null" : e.constructor.name;
42
- default:
43
- return t;
44
- }
45
- }
46
- function An(e) {
47
- return typeof e == "number" && isFinite(e) && Math.floor(e) === e;
48
- }
49
- const Vn = Number.isInteger || An;
50
- function Mt(e, t, o, r) {
51
- const i = e[t];
52
- if (i == null || !Vn(i)) {
53
- const s = In(i);
54
- return new RangeError(`Invalid ${r} \`${t}\` of type \`${s}\` supplied to \`${o}\`, expected \`integer\`.`);
55
- }
56
- return null;
57
- }
58
- function kt(e, t, ...o) {
59
- return e[t] === void 0 ? null : Mt(e, t, ...o);
60
- }
61
- function Ue() {
62
- return null;
63
- }
64
- kt.isRequired = Mt;
65
- Ue.isRequired = Ue;
66
- const Dn = process.env.NODE_ENV === "production" ? Ue : kt;
67
- function Bn(e) {
68
- return typeof e == "string";
69
- }
70
- function zn(e, t, o) {
71
- return e === void 0 || Bn(e) ? t : f({}, t, {
72
- ownerState: f({}, t.ownerState, o)
73
- });
74
- }
75
- function _n(e, t = []) {
76
- if (e === void 0)
77
- return {};
78
- const o = {};
79
- return Object.keys(e).filter((r) => r.match(/^on[A-Z]/) && typeof e[r] == "function" && !t.includes(r)).forEach((r) => {
80
- o[r] = e[r];
81
- }), o;
82
- }
83
- function gt(e) {
84
- if (e === void 0)
85
- return {};
86
- const t = {};
87
- return Object.keys(e).filter((o) => !(o.match(/^on[A-Z]/) && typeof e[o] == "function")).forEach((o) => {
88
- t[o] = e[o];
89
- }), t;
90
- }
91
- function Ln(e) {
92
- const {
93
- getSlotProps: t,
94
- additionalProps: o,
95
- externalSlotProps: r,
96
- externalForwardedProps: i,
97
- className: s
98
- } = e;
99
- if (!t) {
100
- const x = $(o == null ? void 0 : o.className, s, i == null ? void 0 : i.className, r == null ? void 0 : r.className), y = f({}, o == null ? void 0 : o.style, i == null ? void 0 : i.style, r == null ? void 0 : r.style), T = f({}, o, i, r);
101
- return x.length > 0 && (T.className = x), Object.keys(y).length > 0 && (T.style = y), {
102
- props: T,
103
- internalRef: void 0
104
- };
105
- }
106
- const a = _n(f({}, i, r)), l = gt(r), u = gt(i), c = t(a), d = $(c == null ? void 0 : c.className, o == null ? void 0 : o.className, s, i == null ? void 0 : i.className, r == null ? void 0 : r.className), g = f({}, c == null ? void 0 : c.style, o == null ? void 0 : o.style, i == null ? void 0 : i.style, r == null ? void 0 : r.style), m = f({}, c, o, u, l);
107
- return d.length > 0 && (m.className = d), Object.keys(g).length > 0 && (m.style = g), {
108
- props: m,
109
- internalRef: c.ref
110
- };
111
- }
112
- function Wn(e, t, o) {
113
- return typeof e == "function" ? e(t, o) : e;
114
- }
115
- const Pt = (e) => (e || we()).get("trigger"), Fn = (e) => new URLSearchParams(e), It = (e, t, o) => {
116
- const r = o || we(), i = Fn(t), s = i.toString() ? `?${i.toString()}` : "";
117
- return r.post(`trigger/${e}/async${s}`);
118
- }, _e = $e("triggerables/fetchTriggerables", async (e, t) => {
119
- const o = await Pt();
120
- return o.status !== 200 ? t.rejectWithValue({
121
- message: "Failed to fetch triggerables"
122
- }) : o.data;
123
- }), Le = $e("triggerables/trigger", async ({ triggerName: e, triggerParams: t }, o) => {
124
- const r = await It(e, t);
125
- return r.status !== 200 ? o.rejectWithValue({
126
- message: "Failed to fetch triggerables"
127
- }) : r.data;
128
- }), Un = {
129
- triggerables: {},
130
- fetchStatus: "loading"
131
- };
132
- Nt({
133
- name: "triggerable",
134
- initialState: Un,
135
- reducers: {},
136
- extraReducers: (e) => {
137
- e.addCase(_e.pending, (t) => {
138
- t.fetchStatus = "loading", t.fetchError = "undefined";
139
- }), e.addCase(_e.fulfilled, (t, { payload: o }) => {
140
- t.triggerables = o, t.fetchStatus = "succeeded";
141
- }), e.addCase(_e.rejected, (t, { payload: o }) => {
142
- o && (t.fetchError = o.message), t.fetchStatus = "failed";
143
- }), e.addCase(Le.pending, (t) => {
144
- t.triggerStatus = "loading";
145
- }), e.addCase(Le.fulfilled, (t, { payload: o }) => {
146
- t.triggerResponse = o, t.triggerStatus = "succeeded";
147
- }), e.addCase(Le.rejected, (t, { payload: o }) => {
148
- o && (t.triggerError = o.message), t.triggerStatus = "failed";
149
- });
150
- }
151
- });
152
- const At = (e) => (e || we()).get("task/list/active"), Gn = (e, t) => we().get(`task/${e}`), We = $e("task/fetchActiveTasks", async (e, t) => {
153
- const o = await At();
154
- return o.status !== 200 ? t.rejectWithValue({
155
- message: "Failed to fetch task statuses"
156
- }) : o.data;
157
- }), qn = $e("task/fetchTaskStatus", async (e, t) => {
158
- const o = await Gn(e);
159
- return o.status !== 200 ? t.rejectWithValue({
160
- message: `Failed to fetch task status for ${e}`
161
- }) : o.data;
162
- }), Hn = {
163
- fetchStatus: "loading"
164
- };
165
- Nt({
166
- name: "taskStatus",
167
- initialState: Hn,
168
- reducers: {},
169
- extraReducers: (e) => {
170
- e.addCase(We.pending, (t) => {
171
- t.fetchStatus = "loading", t.fetchError = "undefined";
172
- }), e.addCase(We.fulfilled, (t, { payload: o }) => {
173
- let r = {};
174
- t.triggeredTaskStatuses && (r = { ...t.triggeredTaskStatuses }), o.forEach((i) => {
175
- r[i.id] = i;
176
- }), t.activeTaskStatuses = r, t.fetchStatus = "succeeded";
177
- }), e.addCase(We.rejected, (t, { payload: o }) => {
178
- o && (t.fetchError = o.message), t.fetchStatus = "failed", t.activeTaskStatuses = void 0;
179
- }), e.addCase(qn.fulfilled, (t, { payload: o }) => {
180
- t.triggeredTaskStatuses ? t.triggeredTaskStatuses[o.id] = o : t.triggeredTaskStatuses = { [o.id]: o }, t.activeTaskStatuses ? t.activeTaskStatuses[o.id] = o : t.activeTaskStatuses = { [o.id]: o };
181
- });
182
- }
183
- });
184
- function Kn(e) {
185
- return Object.keys(e).length === 0;
186
- }
187
- function Xn(e = null) {
188
- const t = h.useContext(Nn);
189
- return !t || Kn(t) ? e : t;
190
- }
191
- const Yn = hn();
192
- function Zn(e = Yn) {
193
- return Xn(e);
194
- }
195
- const Jn = ["className", "elementType", "ownerState", "externalForwardedProps", "getSlotOwnerState", "internalForwardedProps"], Qn = ["component", "slots", "slotProps"], eo = ["component"];
196
- function Ge(e, t) {
197
- const {
198
- className: o,
199
- elementType: r,
200
- ownerState: i,
201
- externalForwardedProps: s,
202
- getSlotOwnerState: a,
203
- internalForwardedProps: l
204
- } = t, u = V(t, Jn), {
205
- component: c,
206
- slots: d = {
207
- [e]: void 0
208
- },
209
- slotProps: g = {
210
- [e]: void 0
211
- }
212
- } = s, m = V(s, Qn), x = d[e] || r, y = Wn(g[e], i), T = Ln(f({
213
- className: o
214
- }, u, {
215
- externalForwardedProps: e === "root" ? m : void 0,
216
- externalSlotProps: y
217
- })), {
218
- props: {
219
- component: j
220
- },
221
- internalRef: C
222
- } = T, M = V(T.props, eo), w = Ne(C, y == null ? void 0 : y.ref, t.ref), b = a ? a(M) : {}, N = f({}, i, b), R = e === "root" ? j || c : j, O = zn(x, f({}, e === "root" && !c && !d[e] && l, e !== "root" && !d[e] && l, M, R && {
223
- as: R
224
- }, {
225
- ref: w
226
- }), N);
227
- return Object.keys(b).forEach((k) => {
228
- delete O[k];
229
- }), [x, O];
230
- }
231
- const mt = (e) => {
232
- let t;
233
- return e < 1 ? t = 5.11916 * e ** 2 : t = 4.5 * Math.log(e + 1) + 2, (t / 100).toFixed(2);
234
- };
235
- function Je() {
236
- const e = Zn(vn);
237
- return process.env.NODE_ENV !== "production" && h.useDebugValue(e), e[bn] || e;
238
- }
239
- function to(e) {
240
- return J("MuiPaper", e);
241
- }
242
- X("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"]);
243
- const no = ["className", "component", "elevation", "square", "variant"], oo = (e) => {
244
- const {
245
- square: t,
246
- elevation: o,
247
- variant: r,
248
- classes: i
249
- } = e, s = {
250
- root: ["root", r, !t && "rounded", r === "elevation" && `elevation${o}`]
251
- };
252
- return Q(s, to, i);
253
- }, ro = P("div", {
254
- name: "MuiPaper",
255
- slot: "Root",
256
- overridesResolver: (e, t) => {
257
- const {
258
- ownerState: o
259
- } = e;
260
- return [t.root, t[o.variant], !o.square && t.rounded, o.variant === "elevation" && t[`elevation${o.elevation}`]];
261
- }
262
- })(({
263
- theme: e,
264
- ownerState: t
265
- }) => {
266
- var o;
267
- return f({
268
- backgroundColor: (e.vars || e).palette.background.paper,
269
- color: (e.vars || e).palette.text.primary,
270
- transition: e.transitions.create("box-shadow")
271
- }, !t.square && {
272
- borderRadius: e.shape.borderRadius
273
- }, t.variant === "outlined" && {
274
- border: `1px solid ${(e.vars || e).palette.divider}`
275
- }, t.variant === "elevation" && f({
276
- boxShadow: (e.vars || e).shadows[t.elevation]
277
- }, !e.vars && e.palette.mode === "dark" && {
278
- backgroundImage: `linear-gradient(${Oe("#fff", mt(t.elevation))}, ${Oe("#fff", mt(t.elevation))})`
279
- }, e.vars && {
280
- backgroundImage: (o = e.vars.overlays) == null ? void 0 : o[t.elevation]
281
- }));
282
- }), Qe = /* @__PURE__ */ h.forwardRef(function(t, o) {
283
- const r = Y({
284
- props: t,
285
- name: "MuiPaper"
286
- }), {
287
- className: i,
288
- component: s = "div",
289
- elevation: a = 1,
290
- square: l = !1,
291
- variant: u = "elevation"
292
- } = r, c = V(r, no), d = f({}, r, {
293
- component: s,
294
- elevation: a,
295
- square: l,
296
- variant: u
297
- }), g = oo(d);
298
- return process.env.NODE_ENV !== "production" && Je().shadows[a] === void 0 && console.error([`MUI: The elevation provided <Paper elevation={${a}}> is not available in the theme.`, `Please make sure that \`theme.shadows[${a}]\` is defined.`].join(`
299
- `)), /* @__PURE__ */ p.jsx(ro, f({
300
- as: s,
301
- ownerState: d,
302
- className: $(g.root, i),
303
- ref: o
304
- }, c));
305
- });
306
- process.env.NODE_ENV !== "production" && (Qe.propTypes = {
307
- // ┌────────────────────────────── Warning ──────────────────────────────┐
308
- // │ These PropTypes are generated from the TypeScript type definitions. │
309
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
310
- // └─────────────────────────────────────────────────────────────────────┘
311
- /**
312
- * The content of the component.
313
- */
314
- children: n.node,
315
- /**
316
- * Override or extend the styles applied to the component.
317
- */
318
- classes: n.object,
319
- /**
320
- * @ignore
321
- */
322
- className: n.string,
323
- /**
324
- * The component used for the root node.
325
- * Either a string to use a HTML element or a component.
326
- */
327
- component: n.elementType,
328
- /**
329
- * Shadow depth, corresponds to `dp` in the spec.
330
- * It accepts values between 0 and 24 inclusive.
331
- * @default 1
332
- */
333
- elevation: ke(Dn, (e) => {
334
- const {
335
- elevation: t,
336
- variant: o
337
- } = e;
338
- return t > 0 && o === "outlined" ? new Error(`MUI: Combining \`elevation={${t}}\` with \`variant="${o}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`) : null;
339
- }),
340
- /**
341
- * If `true`, rounded corners are disabled.
342
- * @default false
343
- */
344
- square: n.bool,
345
- /**
346
- * The system prop that allows defining system overrides as well as additional CSS styles.
347
- */
348
- sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
349
- /**
350
- * The variant to use.
351
- * @default 'elevation'
352
- */
353
- variant: n.oneOfType([n.oneOf(["elevation", "outlined"]), n.string])
354
- });
355
- function so(e) {
356
- return J("MuiAlert", e);
357
- }
358
- const ht = X("MuiAlert", ["root", "action", "icon", "message", "filled", "colorSuccess", "colorInfo", "colorWarning", "colorError", "filledSuccess", "filledInfo", "filledWarning", "filledError", "outlined", "outlinedSuccess", "outlinedInfo", "outlinedWarning", "outlinedError", "standard", "standardSuccess", "standardInfo", "standardWarning", "standardError"]);
359
- function qe(e, t) {
360
- return qe = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(o, r) {
361
- return o.__proto__ = r, o;
362
- }, qe(e, t);
363
- }
364
- function Vt(e, t) {
365
- e.prototype = Object.create(t.prototype), e.prototype.constructor = e, qe(e, t);
366
- }
367
- const bt = {
368
- disabled: !1
369
- };
370
- var io = process.env.NODE_ENV !== "production" ? n.oneOfType([n.number, n.shape({
371
- enter: n.number,
372
- exit: n.number,
373
- appear: n.number
374
- }).isRequired]) : null;
375
- process.env.NODE_ENV !== "production" && n.oneOfType([n.string, n.shape({
376
- enter: n.string,
377
- exit: n.string,
378
- active: n.string
379
- }), n.shape({
380
- enter: n.string,
381
- enterDone: n.string,
382
- enterActive: n.string,
383
- exit: n.string,
384
- exitDone: n.string,
385
- exitActive: n.string
386
- })]);
387
- const je = Z.createContext(null);
388
- var ao = function(t) {
389
- return t.scrollTop;
390
- }, me = "unmounted", ne = "exited", oe = "entering", le = "entered", He = "exiting", te = /* @__PURE__ */ function(e) {
391
- Vt(t, e);
392
- function t(r, i) {
393
- var s;
394
- s = e.call(this, r, i) || this;
395
- var a = i, l = a && !a.isMounting ? r.enter : r.appear, u;
396
- return s.appearStatus = null, r.in ? l ? (u = ne, s.appearStatus = oe) : u = le : r.unmountOnExit || r.mountOnEnter ? u = me : u = ne, s.state = {
397
- status: u
398
- }, s.nextCallback = null, s;
399
- }
400
- t.getDerivedStateFromProps = function(i, s) {
401
- var a = i.in;
402
- return a && s.status === me ? {
403
- status: ne
404
- } : null;
405
- };
406
- var o = t.prototype;
407
- return o.componentDidMount = function() {
408
- this.updateStatus(!0, this.appearStatus);
409
- }, o.componentDidUpdate = function(i) {
410
- var s = null;
411
- if (i !== this.props) {
412
- var a = this.state.status;
413
- this.props.in ? a !== oe && a !== le && (s = oe) : (a === oe || a === le) && (s = He);
414
- }
415
- this.updateStatus(!1, s);
416
- }, o.componentWillUnmount = function() {
417
- this.cancelNextCallback();
418
- }, o.getTimeouts = function() {
419
- var i = this.props.timeout, s, a, l;
420
- return s = a = l = i, i != null && typeof i != "number" && (s = i.exit, a = i.enter, l = i.appear !== void 0 ? i.appear : a), {
421
- exit: s,
422
- enter: a,
423
- appear: l
424
- };
425
- }, o.updateStatus = function(i, s) {
426
- if (i === void 0 && (i = !1), s !== null)
427
- if (this.cancelNextCallback(), s === oe) {
428
- if (this.props.unmountOnExit || this.props.mountOnEnter) {
429
- var a = this.props.nodeRef ? this.props.nodeRef.current : Ee.findDOMNode(this);
430
- a && ao(a);
431
- }
432
- this.performEnter(i);
433
- } else
434
- this.performExit();
435
- else this.props.unmountOnExit && this.state.status === ne && this.setState({
436
- status: me
437
- });
438
- }, o.performEnter = function(i) {
439
- var s = this, a = this.props.enter, l = this.context ? this.context.isMounting : i, u = this.props.nodeRef ? [l] : [Ee.findDOMNode(this), l], c = u[0], d = u[1], g = this.getTimeouts(), m = l ? g.appear : g.enter;
440
- if (!i && !a || bt.disabled) {
441
- this.safeSetState({
442
- status: le
443
- }, function() {
444
- s.props.onEntered(c);
445
- });
446
- return;
447
- }
448
- this.props.onEnter(c, d), this.safeSetState({
449
- status: oe
450
- }, function() {
451
- s.props.onEntering(c, d), s.onTransitionEnd(m, function() {
452
- s.safeSetState({
453
- status: le
454
- }, function() {
455
- s.props.onEntered(c, d);
456
- });
457
- });
458
- });
459
- }, o.performExit = function() {
460
- var i = this, s = this.props.exit, a = this.getTimeouts(), l = this.props.nodeRef ? void 0 : Ee.findDOMNode(this);
461
- if (!s || bt.disabled) {
462
- this.safeSetState({
463
- status: ne
464
- }, function() {
465
- i.props.onExited(l);
466
- });
467
- return;
468
- }
469
- this.props.onExit(l), this.safeSetState({
470
- status: He
471
- }, function() {
472
- i.props.onExiting(l), i.onTransitionEnd(a.exit, function() {
473
- i.safeSetState({
474
- status: ne
475
- }, function() {
476
- i.props.onExited(l);
477
- });
478
- });
479
- });
480
- }, o.cancelNextCallback = function() {
481
- this.nextCallback !== null && (this.nextCallback.cancel(), this.nextCallback = null);
482
- }, o.safeSetState = function(i, s) {
483
- s = this.setNextCallback(s), this.setState(i, s);
484
- }, o.setNextCallback = function(i) {
485
- var s = this, a = !0;
486
- return this.nextCallback = function(l) {
487
- a && (a = !1, s.nextCallback = null, i(l));
488
- }, this.nextCallback.cancel = function() {
489
- a = !1;
490
- }, this.nextCallback;
491
- }, o.onTransitionEnd = function(i, s) {
492
- this.setNextCallback(s);
493
- var a = this.props.nodeRef ? this.props.nodeRef.current : Ee.findDOMNode(this), l = i == null && !this.props.addEndListener;
494
- if (!a || l) {
495
- setTimeout(this.nextCallback, 0);
496
- return;
497
- }
498
- if (this.props.addEndListener) {
499
- var u = this.props.nodeRef ? [this.nextCallback] : [a, this.nextCallback], c = u[0], d = u[1];
500
- this.props.addEndListener(c, d);
501
- }
502
- i != null && setTimeout(this.nextCallback, i);
503
- }, o.render = function() {
504
- var i = this.state.status;
505
- if (i === me)
506
- return null;
507
- var s = this.props, a = s.children;
508
- 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;
509
- var l = V(s, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
510
- return (
511
- // allows for nested Transitions
512
- /* @__PURE__ */ Z.createElement(je.Provider, {
513
- value: null
514
- }, typeof a == "function" ? a(i, l) : Z.cloneElement(Z.Children.only(a), l))
515
- );
516
- }, t;
517
- }(Z.Component);
518
- te.contextType = je;
519
- te.propTypes = process.env.NODE_ENV !== "production" ? {
520
- /**
521
- * A React reference to DOM element that need to transition:
522
- * https://stackoverflow.com/a/51127130/4671932
523
- *
524
- * - When `nodeRef` prop is used, `node` is not passed to callback functions
525
- * (e.g. `onEnter`) because user already has direct access to the node.
526
- * - When changing `key` prop of `Transition` in a `TransitionGroup` a new
527
- * `nodeRef` need to be provided to `Transition` with changed `key` prop
528
- * (see
529
- * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
530
- */
531
- nodeRef: n.shape({
532
- current: typeof Element > "u" ? n.any : function(e, t, o, r, i, s) {
533
- var a = e[t];
534
- return n.instanceOf(a && "ownerDocument" in a ? a.ownerDocument.defaultView.Element : Element)(e, t, o, r, i, s);
535
- }
536
- }),
537
- /**
538
- * A `function` child can be used instead of a React element. This function is
539
- * called with the current transition status (`'entering'`, `'entered'`,
540
- * `'exiting'`, `'exited'`), which can be used to apply context
541
- * specific props to a component.
542
- *
543
- * ```jsx
544
- * <Transition in={this.state.in} timeout={150}>
545
- * {state => (
546
- * <MyComponent className={`fade fade-${state}`} />
547
- * )}
548
- * </Transition>
549
- * ```
550
- */
551
- children: n.oneOfType([n.func.isRequired, n.element.isRequired]).isRequired,
552
- /**
553
- * Show the component; triggers the enter or exit states
554
- */
555
- in: n.bool,
556
- /**
557
- * By default the child component is mounted immediately along with
558
- * the parent `Transition` component. If you want to "lazy mount" the component on the
559
- * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
560
- * mounted, even on "exited", unless you also specify `unmountOnExit`.
561
- */
562
- mountOnEnter: n.bool,
563
- /**
564
- * By default the child component stays mounted after it reaches the `'exited'` state.
565
- * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
566
- */
567
- unmountOnExit: n.bool,
568
- /**
569
- * By default the child component does not perform the enter transition when
570
- * it first mounts, regardless of the value of `in`. If you want this
571
- * behavior, set both `appear` and `in` to `true`.
572
- *
573
- * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop
574
- * > only adds an additional enter transition. However, in the
575
- * > `<CSSTransition>` component that first enter transition does result in
576
- * > additional `.appear-*` classes, that way you can choose to style it
577
- * > differently.
578
- */
579
- appear: n.bool,
580
- /**
581
- * Enable or disable enter transitions.
582
- */
583
- enter: n.bool,
584
- /**
585
- * Enable or disable exit transitions.
586
- */
587
- exit: n.bool,
588
- /**
589
- * The duration of the transition, in milliseconds.
590
- * Required unless `addEndListener` is provided.
591
- *
592
- * You may specify a single timeout for all transitions:
593
- *
594
- * ```jsx
595
- * timeout={500}
596
- * ```
597
- *
598
- * or individually:
599
- *
600
- * ```jsx
601
- * timeout={{
602
- * appear: 500,
603
- * enter: 300,
604
- * exit: 500,
605
- * }}
606
- * ```
607
- *
608
- * - `appear` defaults to the value of `enter`
609
- * - `enter` defaults to `0`
610
- * - `exit` defaults to `0`
611
- *
612
- * @type {number | { enter?: number, exit?: number, appear?: number }}
613
- */
614
- timeout: function(t) {
615
- var o = io;
616
- t.addEndListener || (o = o.isRequired);
617
- for (var r = arguments.length, i = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++)
618
- i[s - 1] = arguments[s];
619
- return o.apply(void 0, [t].concat(i));
620
- },
621
- /**
622
- * Add a custom transition end trigger. Called with the transitioning
623
- * DOM node and a `done` callback. Allows for more fine grained transition end
624
- * logic. Timeouts are still used as a fallback if provided.
625
- *
626
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
627
- *
628
- * ```jsx
629
- * addEndListener={(node, done) => {
630
- * // use the css transitionend event to mark the finish of a transition
631
- * node.addEventListener('transitionend', done, false);
632
- * }}
633
- * ```
634
- */
635
- addEndListener: n.func,
636
- /**
637
- * Callback fired before the "entering" status is applied. An extra parameter
638
- * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
639
- *
640
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
641
- *
642
- * @type Function(node: HtmlElement, isAppearing: bool) -> void
643
- */
644
- onEnter: n.func,
645
- /**
646
- * Callback fired after the "entering" status is applied. An extra parameter
647
- * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
648
- *
649
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
650
- *
651
- * @type Function(node: HtmlElement, isAppearing: bool)
652
- */
653
- onEntering: n.func,
654
- /**
655
- * Callback fired after the "entered" status is applied. An extra parameter
656
- * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
657
- *
658
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
659
- *
660
- * @type Function(node: HtmlElement, isAppearing: bool) -> void
661
- */
662
- onEntered: n.func,
663
- /**
664
- * Callback fired before the "exiting" status is applied.
665
- *
666
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
667
- *
668
- * @type Function(node: HtmlElement) -> void
669
- */
670
- onExit: n.func,
671
- /**
672
- * Callback fired after the "exiting" status is applied.
673
- *
674
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
675
- *
676
- * @type Function(node: HtmlElement) -> void
677
- */
678
- onExiting: n.func,
679
- /**
680
- * Callback fired after the "exited" status is applied.
681
- *
682
- * **Note**: when `nodeRef` prop is passed, `node` is not passed
683
- *
684
- * @type Function(node: HtmlElement) -> void
685
- */
686
- onExited: n.func
687
- } : {};
688
- function ae() {
689
- }
690
- te.defaultProps = {
691
- in: !1,
692
- mountOnEnter: !1,
693
- unmountOnExit: !1,
694
- appear: !1,
695
- enter: !0,
696
- exit: !0,
697
- onEnter: ae,
698
- onEntering: ae,
699
- onEntered: ae,
700
- onExit: ae,
701
- onExiting: ae,
702
- onExited: ae
703
- };
704
- te.UNMOUNTED = me;
705
- te.EXITED = ne;
706
- te.ENTERING = oe;
707
- te.ENTERED = le;
708
- te.EXITING = He;
709
- function lo(e) {
710
- if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
711
- return e;
712
- }
713
- function et(e, t) {
714
- var o = function(s) {
715
- return t && Se(s) ? t(s) : s;
716
- }, r = /* @__PURE__ */ Object.create(null);
717
- return e && an.map(e, function(i) {
718
- return i;
719
- }).forEach(function(i) {
720
- r[i.key] = o(i);
721
- }), r;
722
- }
723
- function co(e, t) {
724
- e = e || {}, t = t || {};
725
- function o(d) {
726
- return d in t ? t[d] : e[d];
727
- }
728
- var r = /* @__PURE__ */ Object.create(null), i = [];
729
- for (var s in e)
730
- s in t ? i.length && (r[s] = i, i = []) : i.push(s);
731
- var a, l = {};
732
- for (var u in t) {
733
- if (r[u])
734
- for (a = 0; a < r[u].length; a++) {
735
- var c = r[u][a];
736
- l[r[u][a]] = o(c);
737
- }
738
- l[u] = o(u);
739
- }
740
- for (a = 0; a < i.length; a++)
741
- l[i[a]] = o(i[a]);
742
- return l;
743
- }
744
- function re(e, t, o) {
745
- return o[t] != null ? o[t] : e.props[t];
746
- }
747
- function uo(e, t) {
748
- return et(e.children, function(o) {
749
- return Re(o, {
750
- onExited: t.bind(null, o),
751
- in: !0,
752
- appear: re(o, "appear", e),
753
- enter: re(o, "enter", e),
754
- exit: re(o, "exit", e)
755
- });
756
- });
757
- }
758
- function po(e, t, o) {
759
- var r = et(e.children), i = co(t, r);
760
- return Object.keys(i).forEach(function(s) {
761
- var a = i[s];
762
- if (Se(a)) {
763
- var l = s in t, u = s in r, c = t[s], d = Se(c) && !c.props.in;
764
- u && (!l || d) ? i[s] = Re(a, {
765
- onExited: o.bind(null, a),
766
- in: !0,
767
- exit: re(a, "exit", e),
768
- enter: re(a, "enter", e)
769
- }) : !u && l && !d ? i[s] = Re(a, {
770
- in: !1
771
- }) : u && l && Se(c) && (i[s] = Re(a, {
772
- onExited: o.bind(null, a),
773
- in: c.props.in,
774
- exit: re(a, "exit", e),
775
- enter: re(a, "enter", e)
776
- }));
777
- }
778
- }), i;
779
- }
780
- var fo = Object.values || function(e) {
781
- return Object.keys(e).map(function(t) {
782
- return e[t];
783
- });
784
- }, go = {
785
- component: "div",
786
- childFactory: function(t) {
787
- return t;
788
- }
789
- }, tt = /* @__PURE__ */ function(e) {
790
- Vt(t, e);
791
- function t(r, i) {
792
- var s;
793
- s = e.call(this, r, i) || this;
794
- var a = s.handleExited.bind(lo(s));
795
- return s.state = {
796
- contextValue: {
797
- isMounting: !0
798
- },
799
- handleExited: a,
800
- firstRender: !0
801
- }, s;
802
- }
803
- var o = t.prototype;
804
- return o.componentDidMount = function() {
805
- this.mounted = !0, this.setState({
806
- contextValue: {
807
- isMounting: !1
808
- }
809
- });
810
- }, o.componentWillUnmount = function() {
811
- this.mounted = !1;
812
- }, t.getDerivedStateFromProps = function(i, s) {
813
- var a = s.children, l = s.handleExited, u = s.firstRender;
814
- return {
815
- children: u ? uo(i, l) : po(i, a, l),
816
- firstRender: !1
817
- };
818
- }, o.handleExited = function(i, s) {
819
- var a = et(this.props.children);
820
- i.key in a || (i.props.onExited && i.props.onExited(s), this.mounted && this.setState(function(l) {
821
- var u = f({}, l.children);
822
- return delete u[i.key], {
823
- children: u
824
- };
825
- }));
826
- }, o.render = function() {
827
- var i = this.props, s = i.component, a = i.childFactory, l = V(i, ["component", "childFactory"]), u = this.state.contextValue, c = fo(this.state.children).map(a);
828
- return delete l.appear, delete l.enter, delete l.exit, s === null ? /* @__PURE__ */ Z.createElement(je.Provider, {
829
- value: u
830
- }, c) : /* @__PURE__ */ Z.createElement(je.Provider, {
831
- value: u
832
- }, /* @__PURE__ */ Z.createElement(s, l, c));
833
- }, t;
834
- }(Z.Component);
835
- tt.propTypes = process.env.NODE_ENV !== "production" ? {
836
- /**
837
- * `<TransitionGroup>` renders a `<div>` by default. You can change this
838
- * behavior by providing a `component` prop.
839
- * If you use React v16+ and would like to avoid a wrapping `<div>` element
840
- * you can pass in `component={null}`. This is useful if the wrapping div
841
- * borks your css styles.
842
- */
843
- component: n.any,
844
- /**
845
- * A set of `<Transition>` components, that are toggled `in` and out as they
846
- * leave. the `<TransitionGroup>` will inject specific transition props, so
847
- * remember to spread them through if you are wrapping the `<Transition>` as
848
- * with our `<Fade>` example.
849
- *
850
- * While this component is meant for multiple `Transition` or `CSSTransition`
851
- * children, sometimes you may want to have a single transition child with
852
- * content that you want to be transitioned out and in when you change it
853
- * (e.g. routes, images etc.) In that case you can change the `key` prop of
854
- * the transition child as you change its content, this will cause
855
- * `TransitionGroup` to transition the child out and back in.
856
- */
857
- children: n.node,
858
- /**
859
- * A convenience prop that enables or disables appear animations
860
- * for all children. Note that specifying this will override any defaults set
861
- * on individual children Transitions.
862
- */
863
- appear: n.bool,
864
- /**
865
- * A convenience prop that enables or disables enter animations
866
- * for all children. Note that specifying this will override any defaults set
867
- * on individual children Transitions.
868
- */
869
- enter: n.bool,
870
- /**
871
- * A convenience prop that enables or disables exit animations
872
- * for all children. Note that specifying this will override any defaults set
873
- * on individual children Transitions.
874
- */
875
- exit: n.bool,
876
- /**
877
- * You may need to apply reactive updates to a child as it is exiting.
878
- * This is generally done by using `cloneElement` however in the case of an exiting
879
- * child the element has already been removed and not accessible to the consumer.
880
- *
881
- * If you do need to update a child as it leaves you can provide a `childFactory`
882
- * to wrap every child, even the ones that are leaving.
883
- *
884
- * @type Function(child: ReactElement) -> ReactElement
885
- */
886
- childFactory: n.func
887
- } : {};
888
- tt.defaultProps = go;
889
- function Dt(e) {
890
- const {
891
- className: t,
892
- classes: o,
893
- pulsate: r = !1,
894
- rippleX: i,
895
- rippleY: s,
896
- rippleSize: a,
897
- in: l,
898
- onExited: u,
899
- timeout: c
900
- } = e, [d, g] = h.useState(!1), m = $(t, o.ripple, o.rippleVisible, r && o.ripplePulsate), x = {
901
- width: a,
902
- height: a,
903
- top: -(a / 2) + s,
904
- left: -(a / 2) + i
905
- }, y = $(o.child, d && o.childLeaving, r && o.childPulsate);
906
- return !l && !d && g(!0), h.useEffect(() => {
907
- if (!l && u != null) {
908
- const T = setTimeout(u, c);
909
- return () => {
910
- clearTimeout(T);
911
- };
912
- }
913
- }, [u, l, c]), /* @__PURE__ */ p.jsx("span", {
914
- className: m,
915
- style: x,
916
- children: /* @__PURE__ */ p.jsx("span", {
917
- className: y
918
- })
919
- });
920
- }
921
- process.env.NODE_ENV !== "production" && (Dt.propTypes = {
922
- /**
923
- * Override or extend the styles applied to the component.
924
- */
925
- classes: n.object.isRequired,
926
- className: n.string,
927
- /**
928
- * @ignore - injected from TransitionGroup
929
- */
930
- in: n.bool,
931
- /**
932
- * @ignore - injected from TransitionGroup
933
- */
934
- onExited: n.func,
935
- /**
936
- * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.
937
- */
938
- pulsate: n.bool,
939
- /**
940
- * Diameter of the ripple.
941
- */
942
- rippleSize: n.number,
943
- /**
944
- * Horizontal position of the ripple center.
945
- */
946
- rippleX: n.number,
947
- /**
948
- * Vertical position of the ripple center.
949
- */
950
- rippleY: n.number,
951
- /**
952
- * exit delay
953
- */
954
- timeout: n.number.isRequired
955
- });
956
- const q = X("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsate", "child", "childLeaving", "childPulsate"]), mo = ["center", "classes", "className"];
957
- let Pe = (e) => e, vt, xt, yt, Tt;
958
- const Ke = 550, ho = 80, bo = Ze(vt || (vt = Pe`
959
- 0% {
960
- transform: scale(0);
961
- opacity: 0.1;
962
- }
963
-
964
- 100% {
965
- transform: scale(1);
966
- opacity: 0.3;
967
- }
968
- `)), vo = Ze(xt || (xt = Pe`
969
- 0% {
970
- opacity: 1;
971
- }
972
-
973
- 100% {
974
- opacity: 0;
975
- }
976
- `)), xo = Ze(yt || (yt = Pe`
977
- 0% {
978
- transform: scale(1);
979
- }
980
-
981
- 50% {
982
- transform: scale(0.92);
983
- }
984
-
985
- 100% {
986
- transform: scale(1);
987
- }
988
- `)), yo = P("span", {
989
- name: "MuiTouchRipple",
990
- slot: "Root"
991
- })({
992
- overflow: "hidden",
993
- pointerEvents: "none",
994
- position: "absolute",
995
- zIndex: 0,
996
- top: 0,
997
- right: 0,
998
- bottom: 0,
999
- left: 0,
1000
- borderRadius: "inherit"
1001
- }), To = P(Dt, {
1002
- name: "MuiTouchRipple",
1003
- slot: "Ripple"
1004
- })(Tt || (Tt = Pe`
1005
- opacity: 0;
1006
- position: absolute;
1007
-
1008
- &.${0} {
1009
- opacity: 0.3;
1010
- transform: scale(1);
1011
- animation-name: ${0};
1012
- animation-duration: ${0}ms;
1013
- animation-timing-function: ${0};
1014
- }
1015
-
1016
- &.${0} {
1017
- animation-duration: ${0}ms;
1018
- }
1019
-
1020
- & .${0} {
1021
- opacity: 1;
1022
- display: block;
1023
- width: 100%;
1024
- height: 100%;
1025
- border-radius: 50%;
1026
- background-color: currentColor;
1027
- }
1028
-
1029
- & .${0} {
1030
- opacity: 0;
1031
- animation-name: ${0};
1032
- animation-duration: ${0}ms;
1033
- animation-timing-function: ${0};
1034
- }
1035
-
1036
- & .${0} {
1037
- position: absolute;
1038
- /* @noflip */
1039
- left: 0px;
1040
- top: 0;
1041
- animation-name: ${0};
1042
- animation-duration: 2500ms;
1043
- animation-timing-function: ${0};
1044
- animation-iteration-count: infinite;
1045
- animation-delay: 200ms;
1046
- }
1047
- `), q.rippleVisible, bo, Ke, ({
1048
- theme: e
1049
- }) => e.transitions.easing.easeInOut, q.ripplePulsate, ({
1050
- theme: e
1051
- }) => e.transitions.duration.shorter, q.child, q.childLeaving, vo, Ke, ({
1052
- theme: e
1053
- }) => e.transitions.easing.easeInOut, q.childPulsate, xo, ({
1054
- theme: e
1055
- }) => e.transitions.easing.easeInOut), Bt = /* @__PURE__ */ h.forwardRef(function(t, o) {
1056
- const r = Y({
1057
- props: t,
1058
- name: "MuiTouchRipple"
1059
- }), {
1060
- center: i = !1,
1061
- classes: s = {},
1062
- className: a
1063
- } = r, l = V(r, mo), [u, c] = h.useState([]), d = h.useRef(0), g = h.useRef(null);
1064
- h.useEffect(() => {
1065
- g.current && (g.current(), g.current = null);
1066
- }, [u]);
1067
- const m = h.useRef(!1), x = Ot(), y = h.useRef(null), T = h.useRef(null), j = h.useCallback((b) => {
1068
- const {
1069
- pulsate: N,
1070
- rippleX: R,
1071
- rippleY: O,
1072
- rippleSize: k,
1073
- cb: W
1074
- } = b;
1075
- c((S) => [...S, /* @__PURE__ */ p.jsx(To, {
1076
- classes: {
1077
- ripple: $(s.ripple, q.ripple),
1078
- rippleVisible: $(s.rippleVisible, q.rippleVisible),
1079
- ripplePulsate: $(s.ripplePulsate, q.ripplePulsate),
1080
- child: $(s.child, q.child),
1081
- childLeaving: $(s.childLeaving, q.childLeaving),
1082
- childPulsate: $(s.childPulsate, q.childPulsate)
1083
- },
1084
- timeout: Ke,
1085
- pulsate: N,
1086
- rippleX: R,
1087
- rippleY: O,
1088
- rippleSize: k
1089
- }, d.current)]), d.current += 1, g.current = W;
1090
- }, [s]), C = h.useCallback((b = {}, N = {}, R = () => {
1091
- }) => {
1092
- const {
1093
- pulsate: O = !1,
1094
- center: k = i || N.pulsate,
1095
- fakeElement: W = !1
1096
- // For test purposes
1097
- } = N;
1098
- if ((b == null ? void 0 : b.type) === "mousedown" && m.current) {
1099
- m.current = !1;
1100
- return;
1101
- }
1102
- (b == null ? void 0 : b.type) === "touchstart" && (m.current = !0);
1103
- const S = W ? null : T.current, z = S ? S.getBoundingClientRect() : {
1104
- width: 0,
1105
- height: 0,
1106
- left: 0,
1107
- top: 0
1108
- };
1109
- let I, A, _;
1110
- if (k || b === void 0 || b.clientX === 0 && b.clientY === 0 || !b.clientX && !b.touches)
1111
- I = Math.round(z.width / 2), A = Math.round(z.height / 2);
1112
- else {
1113
- const {
1114
- clientX: U,
1115
- clientY: H
1116
- } = b.touches && b.touches.length > 0 ? b.touches[0] : b;
1117
- I = Math.round(U - z.left), A = Math.round(H - z.top);
1118
- }
1119
- if (k)
1120
- _ = Math.sqrt((2 * z.width ** 2 + z.height ** 2) / 3), _ % 2 === 0 && (_ += 1);
1121
- else {
1122
- const U = Math.max(Math.abs((S ? S.clientWidth : 0) - I), I) * 2 + 2, H = Math.max(Math.abs((S ? S.clientHeight : 0) - A), A) * 2 + 2;
1123
- _ = Math.sqrt(U ** 2 + H ** 2);
1124
- }
1125
- b != null && b.touches ? y.current === null && (y.current = () => {
1126
- j({
1127
- pulsate: O,
1128
- rippleX: I,
1129
- rippleY: A,
1130
- rippleSize: _,
1131
- cb: R
1132
- });
1133
- }, x.start(ho, () => {
1134
- y.current && (y.current(), y.current = null);
1135
- })) : j({
1136
- pulsate: O,
1137
- rippleX: I,
1138
- rippleY: A,
1139
- rippleSize: _,
1140
- cb: R
1141
- });
1142
- }, [i, j, x]), M = h.useCallback(() => {
1143
- C({}, {
1144
- pulsate: !0
1145
- });
1146
- }, [C]), w = h.useCallback((b, N) => {
1147
- if (x.clear(), (b == null ? void 0 : b.type) === "touchend" && y.current) {
1148
- y.current(), y.current = null, x.start(0, () => {
1149
- w(b, N);
1150
- });
1151
- return;
1152
- }
1153
- y.current = null, c((R) => R.length > 0 ? R.slice(1) : R), g.current = N;
1154
- }, [x]);
1155
- return h.useImperativeHandle(o, () => ({
1156
- pulsate: M,
1157
- start: C,
1158
- stop: w
1159
- }), [M, C, w]), /* @__PURE__ */ p.jsx(yo, f({
1160
- className: $(q.root, s.root, a),
1161
- ref: T
1162
- }, l, {
1163
- children: /* @__PURE__ */ p.jsx(tt, {
1164
- component: null,
1165
- exit: !0,
1166
- children: u
1167
- })
1168
- }));
1169
- });
1170
- process.env.NODE_ENV !== "production" && (Bt.propTypes = {
1171
- /**
1172
- * If `true`, the ripple starts at the center of the component
1173
- * rather than at the point of interaction.
1174
- */
1175
- center: n.bool,
1176
- /**
1177
- * Override or extend the styles applied to the component.
1178
- */
1179
- classes: n.object,
1180
- /**
1181
- * @ignore
1182
- */
1183
- className: n.string
1184
- });
1185
- function Eo(e) {
1186
- return J("MuiButtonBase", e);
1187
- }
1188
- const Co = X("MuiButtonBase", ["root", "disabled", "focusVisible"]), So = ["action", "centerRipple", "children", "className", "component", "disabled", "disableRipple", "disableTouchRipple", "focusRipple", "focusVisibleClassName", "LinkComponent", "onBlur", "onClick", "onContextMenu", "onDragLeave", "onFocus", "onFocusVisible", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseLeave", "onMouseUp", "onTouchEnd", "onTouchMove", "onTouchStart", "tabIndex", "TouchRippleProps", "touchRippleRef", "type"], Ro = (e) => {
1189
- const {
1190
- disabled: t,
1191
- focusVisible: o,
1192
- focusVisibleClassName: r,
1193
- classes: i
1194
- } = e, a = Q({
1195
- root: ["root", t && "disabled", o && "focusVisible"]
1196
- }, Eo, i);
1197
- return o && r && (a.root += ` ${r}`), a;
1198
- }, No = P("button", {
1199
- name: "MuiButtonBase",
1200
- slot: "Root",
1201
- overridesResolver: (e, t) => t.root
1202
- })({
1203
- display: "inline-flex",
1204
- alignItems: "center",
1205
- justifyContent: "center",
1206
- position: "relative",
1207
- boxSizing: "border-box",
1208
- WebkitTapHighlightColor: "transparent",
1209
- backgroundColor: "transparent",
1210
- // Reset default value
1211
- // We disable the focus ring for mouse, touch and keyboard users.
1212
- outline: 0,
1213
- border: 0,
1214
- margin: 0,
1215
- // Remove the margin in Safari
1216
- borderRadius: 0,
1217
- padding: 0,
1218
- // Remove the padding in Firefox
1219
- cursor: "pointer",
1220
- userSelect: "none",
1221
- verticalAlign: "middle",
1222
- MozAppearance: "none",
1223
- // Reset
1224
- WebkitAppearance: "none",
1225
- // Reset
1226
- textDecoration: "none",
1227
- // So we take precedent over the style of a native <a /> element.
1228
- color: "inherit",
1229
- "&::-moz-focus-inner": {
1230
- borderStyle: "none"
1231
- // Remove Firefox dotted outline.
1232
- },
1233
- [`&.${Co.disabled}`]: {
1234
- pointerEvents: "none",
1235
- // Disable link interactions
1236
- cursor: "default"
1237
- },
1238
- "@media print": {
1239
- colorAdjust: "exact"
1240
- }
1241
- }), nt = /* @__PURE__ */ h.forwardRef(function(t, o) {
1242
- const r = Y({
1243
- props: t,
1244
- name: "MuiButtonBase"
1245
- }), {
1246
- action: i,
1247
- centerRipple: s = !1,
1248
- children: a,
1249
- className: l,
1250
- component: u = "button",
1251
- disabled: c = !1,
1252
- disableRipple: d = !1,
1253
- disableTouchRipple: g = !1,
1254
- focusRipple: m = !1,
1255
- LinkComponent: x = "a",
1256
- onBlur: y,
1257
- onClick: T,
1258
- onContextMenu: j,
1259
- onDragLeave: C,
1260
- onFocus: M,
1261
- onFocusVisible: w,
1262
- onKeyDown: b,
1263
- onKeyUp: N,
1264
- onMouseDown: R,
1265
- onMouseLeave: O,
1266
- onMouseUp: k,
1267
- onTouchEnd: W,
1268
- onTouchMove: S,
1269
- onTouchStart: z,
1270
- tabIndex: I = 0,
1271
- TouchRippleProps: A,
1272
- touchRippleRef: _,
1273
- type: U
1274
- } = r, H = V(r, So), G = h.useRef(null), D = h.useRef(null), Ie = Ne(D, _), {
1275
- isFocusVisibleRef: ve,
1276
- onFocus: Ae,
1277
- onBlur: Ve,
1278
- ref: De
1279
- } = xn(), [ee, se] = h.useState(!1);
1280
- c && ee && se(!1), h.useImperativeHandle(i, () => ({
1281
- focusVisible: () => {
1282
- se(!0), G.current.focus();
1283
- }
1284
- }), []);
1285
- const [E, L] = h.useState(!1);
1286
- h.useEffect(() => {
1287
- L(!0);
1288
- }, []);
1289
- const F = E && !d && !c;
1290
- h.useEffect(() => {
1291
- ee && m && !d && E && D.current.pulsate();
1292
- }, [d, m, ee, E]);
1293
- function B(v, at, sn = g) {
1294
- return Te((lt) => (at && at(lt), !sn && D.current && D.current[v](lt), !0));
1295
- }
1296
- const ie = B("start", R), xe = B("stop", j), Ht = B("stop", C), Kt = B("stop", k), Xt = B("stop", (v) => {
1297
- ee && v.preventDefault(), O && O(v);
1298
- }), Yt = B("start", z), Zt = B("stop", W), Jt = B("stop", S), Qt = B("stop", (v) => {
1299
- Ve(v), ve.current === !1 && se(!1), y && y(v);
1300
- }, !1), en = Te((v) => {
1301
- G.current || (G.current = v.currentTarget), Ae(v), ve.current === !0 && (se(!0), w && w(v)), M && M(v);
1302
- }), Be = () => {
1303
- const v = G.current;
1304
- return u && u !== "button" && !(v.tagName === "A" && v.href);
1305
- }, ze = h.useRef(!1), tn = Te((v) => {
1306
- m && !ze.current && ee && D.current && v.key === " " && (ze.current = !0, D.current.stop(v, () => {
1307
- D.current.start(v);
1308
- })), v.target === v.currentTarget && Be() && v.key === " " && v.preventDefault(), b && b(v), v.target === v.currentTarget && Be() && v.key === "Enter" && !c && (v.preventDefault(), T && T(v));
1309
- }), nn = Te((v) => {
1310
- m && v.key === " " && D.current && ee && !v.defaultPrevented && (ze.current = !1, D.current.stop(v, () => {
1311
- D.current.pulsate(v);
1312
- })), N && N(v), T && v.target === v.currentTarget && Be() && v.key === " " && !v.defaultPrevented && T(v);
1313
- });
1314
- let ye = u;
1315
- ye === "button" && (H.href || H.to) && (ye = x);
1316
- const fe = {};
1317
- ye === "button" ? (fe.type = U === void 0 ? "button" : U, fe.disabled = c) : (!H.href && !H.to && (fe.role = "button"), c && (fe["aria-disabled"] = c));
1318
- const on = Ne(o, De, G);
1319
- process.env.NODE_ENV !== "production" && h.useEffect(() => {
1320
- F && !D.current && console.error(["MUI: The `component` prop provided to ButtonBase is invalid.", "Please make sure the children prop is rendered in this custom component."].join(`
1321
- `));
1322
- }, [F]);
1323
- const it = f({}, r, {
1324
- centerRipple: s,
1325
- component: u,
1326
- disabled: c,
1327
- disableRipple: d,
1328
- disableTouchRipple: g,
1329
- focusRipple: m,
1330
- tabIndex: I,
1331
- focusVisible: ee
1332
- }), rn = Ro(it);
1333
- return /* @__PURE__ */ p.jsxs(No, f({
1334
- as: ye,
1335
- className: $(rn.root, l),
1336
- ownerState: it,
1337
- onBlur: Qt,
1338
- onClick: T,
1339
- onContextMenu: xe,
1340
- onFocus: en,
1341
- onKeyDown: tn,
1342
- onKeyUp: nn,
1343
- onMouseDown: ie,
1344
- onMouseLeave: Xt,
1345
- onMouseUp: Kt,
1346
- onDragLeave: Ht,
1347
- onTouchEnd: Zt,
1348
- onTouchMove: Jt,
1349
- onTouchStart: Yt,
1350
- ref: on,
1351
- tabIndex: c ? -1 : I,
1352
- type: U
1353
- }, fe, H, {
1354
- children: [a, F ? (
1355
- /* TouchRipple is only needed client-side, x2 boost on the server. */
1356
- /* @__PURE__ */ p.jsx(Bt, f({
1357
- ref: Ie,
1358
- center: s
1359
- }, A))
1360
- ) : null]
1361
- }));
1362
- });
1363
- process.env.NODE_ENV !== "production" && (nt.propTypes = {
1364
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1365
- // │ These PropTypes are generated from the TypeScript type definitions. │
1366
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1367
- // └─────────────────────────────────────────────────────────────────────┘
1368
- /**
1369
- * A ref for imperative actions.
1370
- * It currently only supports `focusVisible()` action.
1371
- */
1372
- action: Pn,
1373
- /**
1374
- * If `true`, the ripples are centered.
1375
- * They won't start at the cursor interaction position.
1376
- * @default false
1377
- */
1378
- centerRipple: n.bool,
1379
- /**
1380
- * The content of the component.
1381
- */
1382
- children: n.node,
1383
- /**
1384
- * Override or extend the styles applied to the component.
1385
- */
1386
- classes: n.object,
1387
- /**
1388
- * @ignore
1389
- */
1390
- className: n.string,
1391
- /**
1392
- * The component used for the root node.
1393
- * Either a string to use a HTML element or a component.
1394
- */
1395
- component: $t,
1396
- /**
1397
- * If `true`, the component is disabled.
1398
- * @default false
1399
- */
1400
- disabled: n.bool,
1401
- /**
1402
- * If `true`, the ripple effect is disabled.
1403
- *
1404
- * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
1405
- * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
1406
- * @default false
1407
- */
1408
- disableRipple: n.bool,
1409
- /**
1410
- * If `true`, the touch ripple effect is disabled.
1411
- * @default false
1412
- */
1413
- disableTouchRipple: n.bool,
1414
- /**
1415
- * If `true`, the base button will have a keyboard focus ripple.
1416
- * @default false
1417
- */
1418
- focusRipple: n.bool,
1419
- /**
1420
- * This prop can help identify which element has keyboard focus.
1421
- * The class name will be applied when the element gains the focus through keyboard interaction.
1422
- * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
1423
- * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
1424
- * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
1425
- * if needed.
1426
- */
1427
- focusVisibleClassName: n.string,
1428
- /**
1429
- * @ignore
1430
- */
1431
- href: n.any,
1432
- /**
1433
- * The component used to render a link when the `href` prop is provided.
1434
- * @default 'a'
1435
- */
1436
- LinkComponent: n.elementType,
1437
- /**
1438
- * @ignore
1439
- */
1440
- onBlur: n.func,
1441
- /**
1442
- * @ignore
1443
- */
1444
- onClick: n.func,
1445
- /**
1446
- * @ignore
1447
- */
1448
- onContextMenu: n.func,
1449
- /**
1450
- * @ignore
1451
- */
1452
- onDragLeave: n.func,
1453
- /**
1454
- * @ignore
1455
- */
1456
- onFocus: n.func,
1457
- /**
1458
- * Callback fired when the component is focused with a keyboard.
1459
- * We trigger a `onFocus` callback too.
1460
- */
1461
- onFocusVisible: n.func,
1462
- /**
1463
- * @ignore
1464
- */
1465
- onKeyDown: n.func,
1466
- /**
1467
- * @ignore
1468
- */
1469
- onKeyUp: n.func,
1470
- /**
1471
- * @ignore
1472
- */
1473
- onMouseDown: n.func,
1474
- /**
1475
- * @ignore
1476
- */
1477
- onMouseLeave: n.func,
1478
- /**
1479
- * @ignore
1480
- */
1481
- onMouseUp: n.func,
1482
- /**
1483
- * @ignore
1484
- */
1485
- onTouchEnd: n.func,
1486
- /**
1487
- * @ignore
1488
- */
1489
- onTouchMove: n.func,
1490
- /**
1491
- * @ignore
1492
- */
1493
- onTouchStart: n.func,
1494
- /**
1495
- * The system prop that allows defining system overrides as well as additional CSS styles.
1496
- */
1497
- sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
1498
- /**
1499
- * @default 0
1500
- */
1501
- tabIndex: n.number,
1502
- /**
1503
- * Props applied to the `TouchRipple` element.
1504
- */
1505
- TouchRippleProps: n.object,
1506
- /**
1507
- * A ref that points to the `TouchRipple` element.
1508
- */
1509
- touchRippleRef: n.oneOfType([n.func, n.shape({
1510
- current: n.shape({
1511
- pulsate: n.func.isRequired,
1512
- start: n.func.isRequired,
1513
- stop: n.func.isRequired
1514
- })
1515
- })]),
1516
- /**
1517
- * @ignore
1518
- */
1519
- type: n.oneOfType([n.oneOf(["button", "reset", "submit"]), n.string])
1520
- });
1521
- function Oo(e) {
1522
- return J("MuiIconButton", e);
1523
- }
1524
- const jo = X("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "edgeStart", "edgeEnd", "sizeSmall", "sizeMedium", "sizeLarge"]), wo = ["edge", "children", "className", "color", "disabled", "disableFocusRipple", "size"], $o = (e) => {
1525
- const {
1526
- classes: t,
1527
- disabled: o,
1528
- color: r,
1529
- edge: i,
1530
- size: s
1531
- } = e, a = {
1532
- root: ["root", o && "disabled", r !== "default" && `color${K(r)}`, i && `edge${K(i)}`, `size${K(s)}`]
1533
- };
1534
- return Q(a, Oo, t);
1535
- }, Mo = P(nt, {
1536
- name: "MuiIconButton",
1537
- slot: "Root",
1538
- overridesResolver: (e, t) => {
1539
- const {
1540
- ownerState: o
1541
- } = e;
1542
- return [t.root, o.color !== "default" && t[`color${K(o.color)}`], o.edge && t[`edge${K(o.edge)}`], t[`size${K(o.size)}`]];
1543
- }
1544
- })(({
1545
- theme: e,
1546
- ownerState: t
1547
- }) => f({
1548
- textAlign: "center",
1549
- flex: "0 0 auto",
1550
- fontSize: e.typography.pxToRem(24),
1551
- padding: 8,
1552
- borderRadius: "50%",
1553
- overflow: "visible",
1554
- // Explicitly set the default value to solve a bug on IE11.
1555
- color: (e.vars || e).palette.action.active,
1556
- transition: e.transitions.create("background-color", {
1557
- duration: e.transitions.duration.shortest
1558
- })
1559
- }, !t.disableRipple && {
1560
- "&:hover": {
1561
- backgroundColor: e.vars ? `rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})` : Oe(e.palette.action.active, e.palette.action.hoverOpacity),
1562
- // Reset on touch devices, it doesn't add specificity
1563
- "@media (hover: none)": {
1564
- backgroundColor: "transparent"
1565
- }
1566
- }
1567
- }, t.edge === "start" && {
1568
- marginLeft: t.size === "small" ? -3 : -12
1569
- }, t.edge === "end" && {
1570
- marginRight: t.size === "small" ? -3 : -12
1571
- }), ({
1572
- theme: e,
1573
- ownerState: t
1574
- }) => {
1575
- var o;
1576
- const r = (o = (e.vars || e).palette) == null ? void 0 : o[t.color];
1577
- return f({}, t.color === "inherit" && {
1578
- color: "inherit"
1579
- }, t.color !== "inherit" && t.color !== "default" && f({
1580
- color: r == null ? void 0 : r.main
1581
- }, !t.disableRipple && {
1582
- "&:hover": f({}, r && {
1583
- backgroundColor: e.vars ? `rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})` : Oe(r.main, e.palette.action.hoverOpacity)
1584
- }, {
1585
- // Reset on touch devices, it doesn't add specificity
1586
- "@media (hover: none)": {
1587
- backgroundColor: "transparent"
1588
- }
1589
- })
1590
- }), t.size === "small" && {
1591
- padding: 5,
1592
- fontSize: e.typography.pxToRem(18)
1593
- }, t.size === "large" && {
1594
- padding: 12,
1595
- fontSize: e.typography.pxToRem(28)
1596
- }, {
1597
- [`&.${jo.disabled}`]: {
1598
- backgroundColor: "transparent",
1599
- color: (e.vars || e).palette.action.disabled
1600
- }
1601
- });
1602
- }), zt = /* @__PURE__ */ h.forwardRef(function(t, o) {
1603
- const r = Y({
1604
- props: t,
1605
- name: "MuiIconButton"
1606
- }), {
1607
- edge: i = !1,
1608
- children: s,
1609
- className: a,
1610
- color: l = "default",
1611
- disabled: u = !1,
1612
- disableFocusRipple: c = !1,
1613
- size: d = "medium"
1614
- } = r, g = V(r, wo), m = f({}, r, {
1615
- edge: i,
1616
- color: l,
1617
- disabled: u,
1618
- disableFocusRipple: c,
1619
- size: d
1620
- }), x = $o(m);
1621
- return /* @__PURE__ */ p.jsx(Mo, f({
1622
- className: $(x.root, a),
1623
- centerRipple: !0,
1624
- focusRipple: !c,
1625
- disabled: u,
1626
- ref: o
1627
- }, g, {
1628
- ownerState: m,
1629
- children: s
1630
- }));
1631
- });
1632
- process.env.NODE_ENV !== "production" && (zt.propTypes = {
1633
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1634
- // │ These PropTypes are generated from the TypeScript type definitions. │
1635
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1636
- // └─────────────────────────────────────────────────────────────────────┘
1637
- /**
1638
- * The icon to display.
1639
- */
1640
- children: ke(n.node, (e) => h.Children.toArray(e.children).some((o) => /* @__PURE__ */ h.isValidElement(o) && o.props.onClick) ? new Error(["MUI: You are providing an onClick event listener to a child of a button element.", "Prefer applying it to the IconButton directly.", "This guarantees that the whole <button> will be responsive to click events."].join(`
1641
- `)) : null),
1642
- /**
1643
- * Override or extend the styles applied to the component.
1644
- */
1645
- classes: n.object,
1646
- /**
1647
- * @ignore
1648
- */
1649
- className: n.string,
1650
- /**
1651
- * The color of the component.
1652
- * It supports both default and custom theme colors, which can be added as shown in the
1653
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
1654
- * @default 'default'
1655
- */
1656
- color: n.oneOfType([n.oneOf(["inherit", "default", "primary", "secondary", "error", "info", "success", "warning"]), n.string]),
1657
- /**
1658
- * If `true`, the component is disabled.
1659
- * @default false
1660
- */
1661
- disabled: n.bool,
1662
- /**
1663
- * If `true`, the keyboard focus ripple is disabled.
1664
- * @default false
1665
- */
1666
- disableFocusRipple: n.bool,
1667
- /**
1668
- * If `true`, the ripple effect is disabled.
1669
- *
1670
- * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
1671
- * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
1672
- * @default false
1673
- */
1674
- disableRipple: n.bool,
1675
- /**
1676
- * If given, uses a negative margin to counteract the padding on one
1677
- * side (this is often helpful for aligning the left or right
1678
- * side of the icon with content above or below, without ruining the border
1679
- * size and shape).
1680
- * @default false
1681
- */
1682
- edge: n.oneOf(["end", "start", !1]),
1683
- /**
1684
- * The size of the component.
1685
- * `small` is equivalent to the dense button styling.
1686
- * @default 'medium'
1687
- */
1688
- size: n.oneOfType([n.oneOf(["small", "medium", "large"]), n.string]),
1689
- /**
1690
- * The system prop that allows defining system overrides as well as additional CSS styles.
1691
- */
1692
- sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object])
1693
- });
1694
- const ko = be(/* @__PURE__ */ p.jsx("path", {
1695
- d: "M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"
1696
- }), "SuccessOutlined"), Po = be(/* @__PURE__ */ p.jsx("path", {
1697
- d: "M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"
1698
- }), "ReportProblemOutlined"), Io = be(/* @__PURE__ */ p.jsx("path", {
1699
- d: "M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
1700
- }), "ErrorOutline"), Ao = be(/* @__PURE__ */ p.jsx("path", {
1701
- d: "M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"
1702
- }), "InfoOutlined"), Vo = be(/* @__PURE__ */ p.jsx("path", {
1703
- d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
1704
- }), "Close"), Do = ["action", "children", "className", "closeText", "color", "components", "componentsProps", "icon", "iconMapping", "onClose", "role", "severity", "slotProps", "slots", "variant"], Bo = (e) => {
1705
- const {
1706
- variant: t,
1707
- color: o,
1708
- severity: r,
1709
- classes: i
1710
- } = e, s = {
1711
- root: ["root", `color${K(o || r)}`, `${t}${K(o || r)}`, `${t}`],
1712
- icon: ["icon"],
1713
- message: ["message"],
1714
- action: ["action"]
1715
- };
1716
- return Q(s, so, i);
1717
- }, zo = P(Qe, {
1718
- name: "MuiAlert",
1719
- slot: "Root",
1720
- overridesResolver: (e, t) => {
1721
- const {
1722
- ownerState: o
1723
- } = e;
1724
- return [t.root, t[o.variant], t[`${o.variant}${K(o.color || o.severity)}`]];
1725
- }
1726
- })(({
1727
- theme: e
1728
- }) => {
1729
- const t = e.palette.mode === "light" ? dt : ft, o = e.palette.mode === "light" ? ft : dt;
1730
- return f({}, e.typography.body2, {
1731
- backgroundColor: "transparent",
1732
- display: "flex",
1733
- padding: "6px 16px",
1734
- variants: [...Object.entries(e.palette).filter(([, r]) => r.main && r.light).map(([r]) => ({
1735
- props: {
1736
- colorSeverity: r,
1737
- variant: "standard"
1738
- },
1739
- style: {
1740
- color: e.vars ? e.vars.palette.Alert[`${r}Color`] : t(e.palette[r].light, 0.6),
1741
- backgroundColor: e.vars ? e.vars.palette.Alert[`${r}StandardBg`] : o(e.palette[r].light, 0.9),
1742
- [`& .${ht.icon}`]: e.vars ? {
1743
- color: e.vars.palette.Alert[`${r}IconColor`]
1744
- } : {
1745
- color: e.palette[r].main
1746
- }
1747
- }
1748
- })), ...Object.entries(e.palette).filter(([, r]) => r.main && r.light).map(([r]) => ({
1749
- props: {
1750
- colorSeverity: r,
1751
- variant: "outlined"
1752
- },
1753
- style: {
1754
- color: e.vars ? e.vars.palette.Alert[`${r}Color`] : t(e.palette[r].light, 0.6),
1755
- border: `1px solid ${(e.vars || e).palette[r].light}`,
1756
- [`& .${ht.icon}`]: e.vars ? {
1757
- color: e.vars.palette.Alert[`${r}IconColor`]
1758
- } : {
1759
- color: e.palette[r].main
1760
- }
1761
- }
1762
- })), ...Object.entries(e.palette).filter(([, r]) => r.main && r.dark).map(([r]) => ({
1763
- props: {
1764
- colorSeverity: r,
1765
- variant: "filled"
1766
- },
1767
- style: f({
1768
- fontWeight: e.typography.fontWeightMedium
1769
- }, e.vars ? {
1770
- color: e.vars.palette.Alert[`${r}FilledColor`],
1771
- backgroundColor: e.vars.palette.Alert[`${r}FilledBg`]
1772
- } : {
1773
- backgroundColor: e.palette.mode === "dark" ? e.palette[r].dark : e.palette[r].main,
1774
- color: e.palette.getContrastText(e.palette[r].main)
1775
- })
1776
- }))]
1777
- });
1778
- }), _o = P("div", {
1779
- name: "MuiAlert",
1780
- slot: "Icon",
1781
- overridesResolver: (e, t) => t.icon
1782
- })({
1783
- marginRight: 12,
1784
- padding: "7px 0",
1785
- display: "flex",
1786
- fontSize: 22,
1787
- opacity: 0.9
1788
- }), Lo = P("div", {
1789
- name: "MuiAlert",
1790
- slot: "Message",
1791
- overridesResolver: (e, t) => t.message
1792
- })({
1793
- padding: "8px 0",
1794
- minWidth: 0,
1795
- overflow: "auto"
1796
- }), Et = P("div", {
1797
- name: "MuiAlert",
1798
- slot: "Action",
1799
- overridesResolver: (e, t) => t.action
1800
- })({
1801
- display: "flex",
1802
- alignItems: "flex-start",
1803
- padding: "4px 0 0 16px",
1804
- marginLeft: "auto",
1805
- marginRight: -8
1806
- }), Ct = {
1807
- success: /* @__PURE__ */ p.jsx(ko, {
1808
- fontSize: "inherit"
1809
- }),
1810
- warning: /* @__PURE__ */ p.jsx(Po, {
1811
- fontSize: "inherit"
1812
- }),
1813
- error: /* @__PURE__ */ p.jsx(Io, {
1814
- fontSize: "inherit"
1815
- }),
1816
- info: /* @__PURE__ */ p.jsx(Ao, {
1817
- fontSize: "inherit"
1818
- })
1819
- }, _t = /* @__PURE__ */ h.forwardRef(function(t, o) {
1820
- const r = Y({
1821
- props: t,
1822
- name: "MuiAlert"
1823
- }), {
1824
- action: i,
1825
- children: s,
1826
- className: a,
1827
- closeText: l = "Close",
1828
- color: u,
1829
- components: c = {},
1830
- componentsProps: d = {},
1831
- icon: g,
1832
- iconMapping: m = Ct,
1833
- onClose: x,
1834
- role: y = "alert",
1835
- severity: T = "success",
1836
- slotProps: j = {},
1837
- slots: C = {},
1838
- variant: M = "standard"
1839
- } = r, w = V(r, Do), b = f({}, r, {
1840
- color: u,
1841
- severity: T,
1842
- variant: M,
1843
- colorSeverity: u || T
1844
- }), N = Bo(b), R = {
1845
- slots: f({
1846
- closeButton: c.CloseButton,
1847
- closeIcon: c.CloseIcon
1848
- }, C),
1849
- slotProps: f({}, d, j)
1850
- }, [O, k] = Ge("closeButton", {
1851
- elementType: zt,
1852
- externalForwardedProps: R,
1853
- ownerState: b
1854
- }), [W, S] = Ge("closeIcon", {
1855
- elementType: Vo,
1856
- externalForwardedProps: R,
1857
- ownerState: b
1858
- });
1859
- return /* @__PURE__ */ p.jsxs(zo, f({
1860
- role: y,
1861
- elevation: 0,
1862
- ownerState: b,
1863
- className: $(N.root, a),
1864
- ref: o
1865
- }, w, {
1866
- children: [g !== !1 ? /* @__PURE__ */ p.jsx(_o, {
1867
- ownerState: b,
1868
- className: N.icon,
1869
- children: g || m[T] || Ct[T]
1870
- }) : null, /* @__PURE__ */ p.jsx(Lo, {
1871
- ownerState: b,
1872
- className: N.message,
1873
- children: s
1874
- }), i != null ? /* @__PURE__ */ p.jsx(Et, {
1875
- ownerState: b,
1876
- className: N.action,
1877
- children: i
1878
- }) : null, i == null && x ? /* @__PURE__ */ p.jsx(Et, {
1879
- ownerState: b,
1880
- className: N.action,
1881
- children: /* @__PURE__ */ p.jsx(O, f({
1882
- size: "small",
1883
- "aria-label": l,
1884
- title: l,
1885
- color: "inherit",
1886
- onClick: x
1887
- }, k, {
1888
- children: /* @__PURE__ */ p.jsx(W, f({
1889
- fontSize: "small"
1890
- }, S))
1891
- }))
1892
- }) : null]
1893
- }));
1894
- });
1895
- process.env.NODE_ENV !== "production" && (_t.propTypes = {
1896
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1897
- // │ These PropTypes are generated from the TypeScript type definitions. │
1898
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1899
- // └─────────────────────────────────────────────────────────────────────┘
1900
- /**
1901
- * The action to display. It renders after the message, at the end of the alert.
1902
- */
1903
- action: n.node,
1904
- /**
1905
- * The content of the component.
1906
- */
1907
- children: n.node,
1908
- /**
1909
- * Override or extend the styles applied to the component.
1910
- */
1911
- classes: n.object,
1912
- /**
1913
- * @ignore
1914
- */
1915
- className: n.string,
1916
- /**
1917
- * Override the default label for the *close popup* icon button.
1918
- *
1919
- * For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).
1920
- * @default 'Close'
1921
- */
1922
- closeText: n.string,
1923
- /**
1924
- * The color of the component. Unless provided, the value is taken from the `severity` prop.
1925
- * It supports both default and custom theme colors, which can be added as shown in the
1926
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
1927
- */
1928
- color: n.oneOfType([n.oneOf(["error", "info", "success", "warning"]), n.string]),
1929
- /**
1930
- * The components used for each slot inside.
1931
- *
1932
- * @deprecated use the `slots` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
1933
- *
1934
- * @default {}
1935
- */
1936
- components: n.shape({
1937
- CloseButton: n.elementType,
1938
- CloseIcon: n.elementType
1939
- }),
1940
- /**
1941
- * The extra props for the slot components.
1942
- * You can override the existing props or add new ones.
1943
- *
1944
- * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
1945
- *
1946
- * @default {}
1947
- */
1948
- componentsProps: n.shape({
1949
- closeButton: n.object,
1950
- closeIcon: n.object
1951
- }),
1952
- /**
1953
- * Override the icon displayed before the children.
1954
- * Unless provided, the icon is mapped to the value of the `severity` prop.
1955
- * Set to `false` to remove the `icon`.
1956
- */
1957
- icon: n.node,
1958
- /**
1959
- * The component maps the `severity` prop to a range of different icons,
1960
- * for instance success to `<SuccessOutlined>`.
1961
- * If you wish to change this mapping, you can provide your own.
1962
- * Alternatively, you can use the `icon` prop to override the icon displayed.
1963
- */
1964
- iconMapping: n.shape({
1965
- error: n.node,
1966
- info: n.node,
1967
- success: n.node,
1968
- warning: n.node
1969
- }),
1970
- /**
1971
- * Callback fired when the component requests to be closed.
1972
- * When provided and no `action` prop is set, a close icon button is displayed that triggers the callback when clicked.
1973
- * @param {React.SyntheticEvent} event The event source of the callback.
1974
- */
1975
- onClose: n.func,
1976
- /**
1977
- * The ARIA role attribute of the element.
1978
- * @default 'alert'
1979
- */
1980
- role: n.string,
1981
- /**
1982
- * The severity of the alert. This defines the color and icon used.
1983
- * @default 'success'
1984
- */
1985
- severity: n.oneOfType([n.oneOf(["error", "info", "success", "warning"]), n.string]),
1986
- /**
1987
- * The props used for each slot inside.
1988
- * @default {}
1989
- */
1990
- slotProps: n.shape({
1991
- closeButton: n.oneOfType([n.func, n.object]),
1992
- closeIcon: n.oneOfType([n.func, n.object])
1993
- }),
1994
- /**
1995
- * The components used for each slot inside.
1996
- * @default {}
1997
- */
1998
- slots: n.shape({
1999
- closeButton: n.elementType,
2000
- closeIcon: n.elementType
2001
- }),
2002
- /**
2003
- * The system prop that allows defining system overrides as well as additional CSS styles.
2004
- */
2005
- sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
2006
- /**
2007
- * The variant to use.
2008
- * @default 'standard'
2009
- */
2010
- variant: n.oneOfType([n.oneOf(["filled", "outlined", "standard"]), n.string])
2011
- });
2012
- const Wo = ({ triggerResponse: e, showNotification: t, onClose: o }) => e && t ? p.jsxs(_t, { onClose: o, sx: { marginBottom: 20 }, elevation: 6, severity: "success", variant: "filled", children: ["Backend response: ", e] }) : null, Xe = /* @__PURE__ */ h.createContext();
2013
- process.env.NODE_ENV !== "production" && (Xe.displayName = "GridContext");
2014
- function Fo(e) {
2015
- return J("MuiGrid", e);
2016
- }
2017
- const Uo = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], Go = ["column-reverse", "column", "row-reverse", "row"], qo = ["nowrap", "wrap-reverse", "wrap"], ge = ["auto", !0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], he = X("MuiGrid", [
2018
- "root",
2019
- "container",
2020
- "item",
2021
- "zeroMinWidth",
2022
- // spacings
2023
- ...Uo.map((e) => `spacing-xs-${e}`),
2024
- // direction values
2025
- ...Go.map((e) => `direction-xs-${e}`),
2026
- // wrap values
2027
- ...qo.map((e) => `wrap-xs-${e}`),
2028
- // grid sizes for all breakpoints
2029
- ...ge.map((e) => `grid-xs-${e}`),
2030
- ...ge.map((e) => `grid-sm-${e}`),
2031
- ...ge.map((e) => `grid-md-${e}`),
2032
- ...ge.map((e) => `grid-lg-${e}`),
2033
- ...ge.map((e) => `grid-xl-${e}`)
2034
- ]), Ho = ["className", "columns", "columnSpacing", "component", "container", "direction", "item", "rowSpacing", "spacing", "wrap", "zeroMinWidth"];
2035
- function pe(e) {
2036
- const t = parseFloat(e);
2037
- return `${t}${String(e).replace(String(t), "") || "px"}`;
2038
- }
2039
- function Ko({
2040
- theme: e,
2041
- ownerState: t
2042
- }) {
2043
- let o;
2044
- return e.breakpoints.keys.reduce((r, i) => {
2045
- let s = {};
2046
- if (t[i] && (o = t[i]), !o)
2047
- return r;
2048
- if (o === !0)
2049
- s = {
2050
- flexBasis: 0,
2051
- flexGrow: 1,
2052
- maxWidth: "100%"
2053
- };
2054
- else if (o === "auto")
2055
- s = {
2056
- flexBasis: "auto",
2057
- flexGrow: 0,
2058
- flexShrink: 0,
2059
- maxWidth: "none",
2060
- width: "auto"
2061
- };
2062
- else {
2063
- const a = Me({
2064
- values: t.columns,
2065
- breakpoints: e.breakpoints.values
2066
- }), l = typeof a == "object" ? a[i] : a;
2067
- if (l == null)
2068
- return r;
2069
- const u = `${Math.round(o / l * 1e8) / 1e6}%`;
2070
- let c = {};
2071
- if (t.container && t.item && t.columnSpacing !== 0) {
2072
- const d = e.spacing(t.columnSpacing);
2073
- if (d !== "0px") {
2074
- const g = `calc(${u} + ${pe(d)})`;
2075
- c = {
2076
- flexBasis: g,
2077
- maxWidth: g
2078
- };
2079
- }
2080
- }
2081
- s = f({
2082
- flexBasis: u,
2083
- flexGrow: 0,
2084
- maxWidth: u
2085
- }, c);
2086
- }
2087
- return e.breakpoints.values[i] === 0 ? Object.assign(r, s) : r[e.breakpoints.up(i)] = s, r;
2088
- }, {});
2089
- }
2090
- function Xo({
2091
- theme: e,
2092
- ownerState: t
2093
- }) {
2094
- const o = Me({
2095
- values: t.direction,
2096
- breakpoints: e.breakpoints.values
2097
- });
2098
- return Ye({
2099
- theme: e
2100
- }, o, (r) => {
2101
- const i = {
2102
- flexDirection: r
2103
- };
2104
- return r.indexOf("column") === 0 && (i[`& > .${he.item}`] = {
2105
- maxWidth: "none"
2106
- }), i;
2107
- });
2108
- }
2109
- function Lt({
2110
- breakpoints: e,
2111
- values: t
2112
- }) {
2113
- let o = "";
2114
- Object.keys(t).forEach((i) => {
2115
- o === "" && t[i] !== 0 && (o = i);
2116
- });
2117
- const r = Object.keys(e).sort((i, s) => e[i] - e[s]);
2118
- return r.slice(0, r.indexOf(o));
2119
- }
2120
- function Yo({
2121
- theme: e,
2122
- ownerState: t
2123
- }) {
2124
- const {
2125
- container: o,
2126
- rowSpacing: r
2127
- } = t;
2128
- let i = {};
2129
- if (o && r !== 0) {
2130
- const s = Me({
2131
- values: r,
2132
- breakpoints: e.breakpoints.values
2133
- });
2134
- let a;
2135
- typeof s == "object" && (a = Lt({
2136
- breakpoints: e.breakpoints.values,
2137
- values: s
2138
- })), i = Ye({
2139
- theme: e
2140
- }, s, (l, u) => {
2141
- var c;
2142
- const d = e.spacing(l);
2143
- return d !== "0px" ? {
2144
- marginTop: `-${pe(d)}`,
2145
- [`& > .${he.item}`]: {
2146
- paddingTop: pe(d)
2147
- }
2148
- } : (c = a) != null && c.includes(u) ? {} : {
2149
- marginTop: 0,
2150
- [`& > .${he.item}`]: {
2151
- paddingTop: 0
2152
- }
2153
- };
2154
- });
2155
- }
2156
- return i;
2157
- }
2158
- function Zo({
2159
- theme: e,
2160
- ownerState: t
2161
- }) {
2162
- const {
2163
- container: o,
2164
- columnSpacing: r
2165
- } = t;
2166
- let i = {};
2167
- if (o && r !== 0) {
2168
- const s = Me({
2169
- values: r,
2170
- breakpoints: e.breakpoints.values
2171
- });
2172
- let a;
2173
- typeof s == "object" && (a = Lt({
2174
- breakpoints: e.breakpoints.values,
2175
- values: s
2176
- })), i = Ye({
2177
- theme: e
2178
- }, s, (l, u) => {
2179
- var c;
2180
- const d = e.spacing(l);
2181
- return d !== "0px" ? {
2182
- width: `calc(100% + ${pe(d)})`,
2183
- marginLeft: `-${pe(d)}`,
2184
- [`& > .${he.item}`]: {
2185
- paddingLeft: pe(d)
2186
- }
2187
- } : (c = a) != null && c.includes(u) ? {} : {
2188
- width: "100%",
2189
- marginLeft: 0,
2190
- [`& > .${he.item}`]: {
2191
- paddingLeft: 0
2192
- }
2193
- };
2194
- });
2195
- }
2196
- return i;
2197
- }
2198
- function Jo(e, t, o = {}) {
2199
- if (!e || e <= 0)
2200
- return [];
2201
- if (typeof e == "string" && !Number.isNaN(Number(e)) || typeof e == "number")
2202
- return [o[`spacing-xs-${String(e)}`]];
2203
- const r = [];
2204
- return t.forEach((i) => {
2205
- const s = e[i];
2206
- Number(s) > 0 && r.push(o[`spacing-${i}-${String(s)}`]);
2207
- }), r;
2208
- }
2209
- const Qo = P("div", {
2210
- name: "MuiGrid",
2211
- slot: "Root",
2212
- overridesResolver: (e, t) => {
2213
- const {
2214
- ownerState: o
2215
- } = e, {
2216
- container: r,
2217
- direction: i,
2218
- item: s,
2219
- spacing: a,
2220
- wrap: l,
2221
- zeroMinWidth: u,
2222
- breakpoints: c
2223
- } = o;
2224
- let d = [];
2225
- r && (d = Jo(a, c, t));
2226
- const g = [];
2227
- return c.forEach((m) => {
2228
- const x = o[m];
2229
- x && g.push(t[`grid-${m}-${String(x)}`]);
2230
- }), [t.root, r && t.container, s && t.item, u && t.zeroMinWidth, ...d, i !== "row" && t[`direction-xs-${String(i)}`], l !== "wrap" && t[`wrap-xs-${String(l)}`], ...g];
2231
- }
2232
- })(({
2233
- ownerState: e
2234
- }) => f({
2235
- boxSizing: "border-box"
2236
- }, e.container && {
2237
- display: "flex",
2238
- flexWrap: "wrap",
2239
- width: "100%"
2240
- }, e.item && {
2241
- margin: 0
2242
- // For instance, it's useful when used with a `figure` element.
2243
- }, e.zeroMinWidth && {
2244
- minWidth: 0
2245
- }, e.wrap !== "wrap" && {
2246
- flexWrap: e.wrap
2247
- }), Xo, Yo, Zo, Ko);
2248
- function er(e, t) {
2249
- if (!e || e <= 0)
2250
- return [];
2251
- if (typeof e == "string" && !Number.isNaN(Number(e)) || typeof e == "number")
2252
- return [`spacing-xs-${String(e)}`];
2253
- const o = [];
2254
- return t.forEach((r) => {
2255
- const i = e[r];
2256
- if (Number(i) > 0) {
2257
- const s = `spacing-${r}-${String(i)}`;
2258
- o.push(s);
2259
- }
2260
- }), o;
2261
- }
2262
- const tr = (e) => {
2263
- const {
2264
- classes: t,
2265
- container: o,
2266
- direction: r,
2267
- item: i,
2268
- spacing: s,
2269
- wrap: a,
2270
- zeroMinWidth: l,
2271
- breakpoints: u
2272
- } = e;
2273
- let c = [];
2274
- o && (c = er(s, u));
2275
- const d = [];
2276
- u.forEach((m) => {
2277
- const x = e[m];
2278
- x && d.push(`grid-${m}-${String(x)}`);
2279
- });
2280
- const g = {
2281
- root: ["root", o && "container", i && "item", l && "zeroMinWidth", ...c, r !== "row" && `direction-xs-${String(r)}`, a !== "wrap" && `wrap-xs-${String(a)}`, ...d]
2282
- };
2283
- return Q(g, Fo, t);
2284
- }, de = /* @__PURE__ */ h.forwardRef(function(t, o) {
2285
- const r = Y({
2286
- props: t,
2287
- name: "MuiGrid"
2288
- }), {
2289
- breakpoints: i
2290
- } = Je(), s = jt(r), {
2291
- className: a,
2292
- columns: l,
2293
- columnSpacing: u,
2294
- component: c = "div",
2295
- container: d = !1,
2296
- direction: g = "row",
2297
- item: m = !1,
2298
- rowSpacing: x,
2299
- spacing: y = 0,
2300
- wrap: T = "wrap",
2301
- zeroMinWidth: j = !1
2302
- } = s, C = V(s, Ho), M = x || y, w = u || y, b = h.useContext(Xe), N = d ? l || 12 : b, R = {}, O = f({}, C);
2303
- i.keys.forEach((S) => {
2304
- C[S] != null && (R[S] = C[S], delete O[S]);
2305
- });
2306
- const k = f({}, s, {
2307
- columns: N,
2308
- container: d,
2309
- direction: g,
2310
- item: m,
2311
- rowSpacing: M,
2312
- columnSpacing: w,
2313
- wrap: T,
2314
- zeroMinWidth: j,
2315
- spacing: y
2316
- }, R, {
2317
- breakpoints: i.keys
2318
- }), W = tr(k);
2319
- return /* @__PURE__ */ p.jsx(Xe.Provider, {
2320
- value: N,
2321
- children: /* @__PURE__ */ p.jsx(Qo, f({
2322
- ownerState: k,
2323
- className: $(W.root, a),
2324
- as: c,
2325
- ref: o
2326
- }, O))
2327
- });
2328
- });
2329
- process.env.NODE_ENV !== "production" && (de.propTypes = {
2330
- // ┌────────────────────────────── Warning ──────────────────────────────┐
2331
- // │ These PropTypes are generated from the TypeScript type definitions. │
2332
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
2333
- // └─────────────────────────────────────────────────────────────────────┘
2334
- /**
2335
- * The content of the component.
2336
- */
2337
- children: n.node,
2338
- /**
2339
- * Override or extend the styles applied to the component.
2340
- */
2341
- classes: n.object,
2342
- /**
2343
- * @ignore
2344
- */
2345
- className: n.string,
2346
- /**
2347
- * The number of columns.
2348
- * @default 12
2349
- */
2350
- columns: n.oneOfType([n.arrayOf(n.number), n.number, n.object]),
2351
- /**
2352
- * Defines the horizontal space between the type `item` components.
2353
- * It overrides the value of the `spacing` prop.
2354
- */
2355
- columnSpacing: n.oneOfType([n.arrayOf(n.oneOfType([n.number, n.string])), n.number, n.object, n.string]),
2356
- /**
2357
- * The component used for the root node.
2358
- * Either a string to use a HTML element or a component.
2359
- */
2360
- component: n.elementType,
2361
- /**
2362
- * If `true`, the component will have the flex *container* behavior.
2363
- * You should be wrapping *items* with a *container*.
2364
- * @default false
2365
- */
2366
- container: n.bool,
2367
- /**
2368
- * Defines the `flex-direction` style property.
2369
- * It is applied for all screen sizes.
2370
- * @default 'row'
2371
- */
2372
- direction: n.oneOfType([n.oneOf(["column-reverse", "column", "row-reverse", "row"]), n.arrayOf(n.oneOf(["column-reverse", "column", "row-reverse", "row"])), n.object]),
2373
- /**
2374
- * If `true`, the component will have the flex *item* behavior.
2375
- * You should be wrapping *items* with a *container*.
2376
- * @default false
2377
- */
2378
- item: n.bool,
2379
- /**
2380
- * If a number, it sets the number of columns the grid item uses.
2381
- * It can't be greater than the total number of columns of the container (12 by default).
2382
- * If 'auto', the grid item's width matches its content.
2383
- * If false, the prop is ignored.
2384
- * If true, the grid item's width grows to use the space available in the grid container.
2385
- * The value is applied for the `lg` breakpoint and wider screens if not overridden.
2386
- * @default false
2387
- */
2388
- lg: n.oneOfType([n.oneOf(["auto"]), n.number, n.bool]),
2389
- /**
2390
- * If a number, it sets the number of columns the grid item uses.
2391
- * It can't be greater than the total number of columns of the container (12 by default).
2392
- * If 'auto', the grid item's width matches its content.
2393
- * If false, the prop is ignored.
2394
- * If true, the grid item's width grows to use the space available in the grid container.
2395
- * The value is applied for the `md` breakpoint and wider screens if not overridden.
2396
- * @default false
2397
- */
2398
- md: n.oneOfType([n.oneOf(["auto"]), n.number, n.bool]),
2399
- /**
2400
- * Defines the vertical space between the type `item` components.
2401
- * It overrides the value of the `spacing` prop.
2402
- */
2403
- rowSpacing: n.oneOfType([n.arrayOf(n.oneOfType([n.number, n.string])), n.number, n.object, n.string]),
2404
- /**
2405
- * If a number, it sets the number of columns the grid item uses.
2406
- * It can't be greater than the total number of columns of the container (12 by default).
2407
- * If 'auto', the grid item's width matches its content.
2408
- * If false, the prop is ignored.
2409
- * If true, the grid item's width grows to use the space available in the grid container.
2410
- * The value is applied for the `sm` breakpoint and wider screens if not overridden.
2411
- * @default false
2412
- */
2413
- sm: n.oneOfType([n.oneOf(["auto"]), n.number, n.bool]),
2414
- /**
2415
- * Defines the space between the type `item` components.
2416
- * It can only be used on a type `container` component.
2417
- * @default 0
2418
- */
2419
- spacing: n.oneOfType([n.arrayOf(n.oneOfType([n.number, n.string])), n.number, n.object, n.string]),
2420
- /**
2421
- * The system prop that allows defining system overrides as well as additional CSS styles.
2422
- */
2423
- sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
2424
- /**
2425
- * Defines the `flex-wrap` style property.
2426
- * It's applied for all screen sizes.
2427
- * @default 'wrap'
2428
- */
2429
- wrap: n.oneOf(["nowrap", "wrap-reverse", "wrap"]),
2430
- /**
2431
- * If a number, it sets the number of columns the grid item uses.
2432
- * It can't be greater than the total number of columns of the container (12 by default).
2433
- * If 'auto', the grid item's width matches its content.
2434
- * If false, the prop is ignored.
2435
- * If true, the grid item's width grows to use the space available in the grid container.
2436
- * The value is applied for the `xl` breakpoint and wider screens if not overridden.
2437
- * @default false
2438
- */
2439
- xl: n.oneOfType([n.oneOf(["auto"]), n.number, n.bool]),
2440
- /**
2441
- * If a number, it sets the number of columns the grid item uses.
2442
- * It can't be greater than the total number of columns of the container (12 by default).
2443
- * If 'auto', the grid item's width matches its content.
2444
- * If false, the prop is ignored.
2445
- * If true, the grid item's width grows to use the space available in the grid container.
2446
- * The value is applied for all the screen sizes with the lowest priority.
2447
- * @default false
2448
- */
2449
- xs: n.oneOfType([n.oneOf(["auto"]), n.number, n.bool]),
2450
- /**
2451
- * If `true`, it sets `min-width: 0` on the item.
2452
- * Refer to the limitations section of the documentation to better understand the use case.
2453
- * @default false
2454
- */
2455
- zeroMinWidth: n.bool
2456
- });
2457
- if (process.env.NODE_ENV !== "production") {
2458
- const e = yn("Grid", de);
2459
- de.propTypes = f({}, de.propTypes, {
2460
- direction: e("container"),
2461
- lg: e("item"),
2462
- md: e("item"),
2463
- sm: e("item"),
2464
- spacing: e("container"),
2465
- wrap: e("container"),
2466
- xs: e("item"),
2467
- zeroMinWidth: e("item")
2468
- });
2469
- }
2470
- var ot = {}, nr = En;
2471
- Object.defineProperty(ot, "__esModule", {
2472
- value: !0
2473
- });
2474
- var Wt = ot.default = void 0, or = nr(Tn()), rr = p;
2475
- Wt = ot.default = (0, or.default)(/* @__PURE__ */ (0, rr.jsx)("path", {
2476
- d: "M17 10H7v2h10zm2-7h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V8h14zm-5-5H7v2h7z"
2477
- }), "EventNote");
2478
- const sr = ({ taskStatus: e, openMessageChain: t }) => {
2479
- const [o, r] = Z.useState(!1), i = () => {
2480
- r(!o);
2481
- };
2482
- return p.jsxs(ln, { children: [p.jsx(cn, { title: `#${e.id} ${e.group}`, subheader: e.description, avatar: e.state === "RUNNING" || e.state === "CANCELLING" ? p.jsx(un, {}) : void 0 }), p.jsxs(ct, { children: [p.jsx(ce, { variant: "body2", color: "textSecondary", component: "p", children: `Task state is ${e.state}. ${e.durationMs ? `Run took ${e.durationMs / 1e3} seconds.` : ""}` }), p.jsx(ce, { variant: "body2", color: "textSecondary", component: "p", children: e.message })] }), p.jsxs(pn, { disableSpacing: !0, children: [p.jsx(ut, { title: "Show message chain", children: p.jsx(pt, { "aria-label": "show message chain", onClick: () => {
2483
- const s = e.metadata.find((a) => a.key === "MessageChainId");
2484
- s && t(Number(s.value));
2485
- }, children: p.jsx(Wt, {}) }) }), p.jsx(ut, { title: o ? "Hide metadata" : "Show metadata", children: p.jsx(pt, { sx: {
2486
- transform: o ? "rotate(180deg)" : "rotate(0deg)",
2487
- marginLeft: "auto",
2488
- transition: "transform duration.shortest",
2489
- // TODO: create a story and test this
2490
- display: e.metadata.length ? "flex" : "none"
2491
- }, onClick: i, "aria-expanded": o, "aria-label": "show metadata", children: p.jsx(wt, {}) }) })] }), p.jsx(dn, { in: o, timeout: "auto", unmountOnExit: !0, children: p.jsxs(ct, { children: [p.jsx(ce, { paragraph: !0, children: "Metadata:" }), e.metadata.map((s) => p.jsxs(ce, { children: [s.key, ": ", s.value] }, `task-status-md-${e.id}-${s.key}`))] }) })] });
2492
- }, ir = ({ activeTaskStatuses: e, openMessageChain: t }) => e ? p.jsx(de, { container: !0, spacing: 2, sx: {
2493
- marginBottom: 20
2494
- }, children: Object.values(e).map((o) => p.jsx(de, { item: !0, xs: 6, children: p.jsx(sr, { taskStatus: o, openMessageChain: t }) }, `task-status-grid-item-${o.id}`)) }) : null;
2495
- function St(e, t) {
2496
- var o, r;
2497
- const {
2498
- timeout: i,
2499
- easing: s,
2500
- style: a = {}
2501
- } = e;
2502
- return {
2503
- duration: (o = a.transitionDuration) != null ? o : typeof i == "number" ? i : i[t.mode] || 0,
2504
- easing: (r = a.transitionTimingFunction) != null ? r : typeof s == "object" ? s[t.mode] : s,
2505
- delay: a.transitionDelay
2506
- };
2507
- }
2508
- function ar(e) {
2509
- return J("MuiCollapse", e);
2510
- }
2511
- X("MuiCollapse", ["root", "horizontal", "vertical", "entered", "hidden", "wrapper", "wrapperInner"]);
2512
- const lr = ["addEndListener", "children", "className", "collapsedSize", "component", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "orientation", "style", "timeout", "TransitionComponent"], cr = (e) => {
2513
- const {
2514
- orientation: t,
2515
- classes: o
2516
- } = e, r = {
2517
- root: ["root", `${t}`],
2518
- entered: ["entered"],
2519
- hidden: ["hidden"],
2520
- wrapper: ["wrapper", `${t}`],
2521
- wrapperInner: ["wrapperInner", `${t}`]
2522
- };
2523
- return Q(r, ar, o);
2524
- }, ur = P("div", {
2525
- name: "MuiCollapse",
2526
- slot: "Root",
2527
- overridesResolver: (e, t) => {
2528
- const {
2529
- ownerState: o
2530
- } = e;
2531
- return [t.root, t[o.orientation], o.state === "entered" && t.entered, o.state === "exited" && !o.in && o.collapsedSize === "0px" && t.hidden];
2532
- }
2533
- })(({
2534
- theme: e,
2535
- ownerState: t
2536
- }) => f({
2537
- height: 0,
2538
- overflow: "hidden",
2539
- transition: e.transitions.create("height")
2540
- }, t.orientation === "horizontal" && {
2541
- height: "auto",
2542
- width: 0,
2543
- transition: e.transitions.create("width")
2544
- }, t.state === "entered" && f({
2545
- height: "auto",
2546
- overflow: "visible"
2547
- }, t.orientation === "horizontal" && {
2548
- width: "auto"
2549
- }), t.state === "exited" && !t.in && t.collapsedSize === "0px" && {
2550
- visibility: "hidden"
2551
- })), pr = P("div", {
2552
- name: "MuiCollapse",
2553
- slot: "Wrapper",
2554
- overridesResolver: (e, t) => t.wrapper
2555
- })(({
2556
- ownerState: e
2557
- }) => f({
2558
- // Hack to get children with a negative margin to not falsify the height computation.
2559
- display: "flex",
2560
- width: "100%"
2561
- }, e.orientation === "horizontal" && {
2562
- width: "auto",
2563
- height: "100%"
2564
- })), dr = P("div", {
2565
- name: "MuiCollapse",
2566
- slot: "WrapperInner",
2567
- overridesResolver: (e, t) => t.wrapperInner
2568
- })(({
2569
- ownerState: e
2570
- }) => f({
2571
- width: "100%"
2572
- }, e.orientation === "horizontal" && {
2573
- width: "auto",
2574
- height: "100%"
2575
- })), rt = /* @__PURE__ */ h.forwardRef(function(t, o) {
2576
- const r = Y({
2577
- props: t,
2578
- name: "MuiCollapse"
2579
- }), {
2580
- addEndListener: i,
2581
- children: s,
2582
- className: a,
2583
- collapsedSize: l = "0px",
2584
- component: u,
2585
- easing: c,
2586
- in: d,
2587
- onEnter: g,
2588
- onEntered: m,
2589
- onEntering: x,
2590
- onExit: y,
2591
- onExited: T,
2592
- onExiting: j,
2593
- orientation: C = "vertical",
2594
- style: M,
2595
- timeout: w = Cn.standard,
2596
- // eslint-disable-next-line react/prop-types
2597
- TransitionComponent: b = te
2598
- } = r, N = V(r, lr), R = f({}, r, {
2599
- orientation: C,
2600
- collapsedSize: l
2601
- }), O = cr(R), k = Je(), W = Ot(), S = h.useRef(null), z = h.useRef(), I = typeof l == "number" ? `${l}px` : l, A = C === "horizontal", _ = A ? "width" : "height", U = h.useRef(null), H = Ne(o, U), G = (E) => (L) => {
2602
- if (E) {
2603
- const F = U.current;
2604
- L === void 0 ? E(F) : E(F, L);
2605
- }
2606
- }, D = () => S.current ? S.current[A ? "clientWidth" : "clientHeight"] : 0, Ie = G((E, L) => {
2607
- S.current && A && (S.current.style.position = "absolute"), E.style[_] = I, g && g(E, L);
2608
- }), ve = G((E, L) => {
2609
- const F = D();
2610
- S.current && A && (S.current.style.position = "");
2611
- const {
2612
- duration: B,
2613
- easing: ie
2614
- } = St({
2615
- style: M,
2616
- timeout: w,
2617
- easing: c
2618
- }, {
2619
- mode: "enter"
2620
- });
2621
- if (w === "auto") {
2622
- const xe = k.transitions.getAutoHeightDuration(F);
2623
- E.style.transitionDuration = `${xe}ms`, z.current = xe;
2624
- } else
2625
- E.style.transitionDuration = typeof B == "string" ? B : `${B}ms`;
2626
- E.style[_] = `${F}px`, E.style.transitionTimingFunction = ie, x && x(E, L);
2627
- }), Ae = G((E, L) => {
2628
- E.style[_] = "auto", m && m(E, L);
2629
- }), Ve = G((E) => {
2630
- E.style[_] = `${D()}px`, y && y(E);
2631
- }), De = G(T), ee = G((E) => {
2632
- const L = D(), {
2633
- duration: F,
2634
- easing: B
2635
- } = St({
2636
- style: M,
2637
- timeout: w,
2638
- easing: c
2639
- }, {
2640
- mode: "exit"
2641
- });
2642
- if (w === "auto") {
2643
- const ie = k.transitions.getAutoHeightDuration(L);
2644
- E.style.transitionDuration = `${ie}ms`, z.current = ie;
2645
- } else
2646
- E.style.transitionDuration = typeof F == "string" ? F : `${F}ms`;
2647
- E.style[_] = I, E.style.transitionTimingFunction = B, j && j(E);
2648
- }), se = (E) => {
2649
- w === "auto" && W.start(z.current || 0, E), i && i(U.current, E);
2650
- };
2651
- return /* @__PURE__ */ p.jsx(b, f({
2652
- in: d,
2653
- onEnter: Ie,
2654
- onEntered: Ae,
2655
- onEntering: ve,
2656
- onExit: Ve,
2657
- onExited: De,
2658
- onExiting: ee,
2659
- addEndListener: se,
2660
- nodeRef: U,
2661
- timeout: w === "auto" ? null : w
2662
- }, N, {
2663
- children: (E, L) => /* @__PURE__ */ p.jsx(ur, f({
2664
- as: u,
2665
- className: $(O.root, a, {
2666
- entered: O.entered,
2667
- exited: !d && I === "0px" && O.hidden
2668
- }[E]),
2669
- style: f({
2670
- [A ? "minWidth" : "minHeight"]: I
2671
- }, M),
2672
- ref: H
2673
- }, L, {
2674
- // `ownerState` is set after `childProps` to override any existing `ownerState` property in `childProps`
2675
- // that might have been forwarded from the Transition component.
2676
- ownerState: f({}, R, {
2677
- state: E
2678
- }),
2679
- children: /* @__PURE__ */ p.jsx(pr, {
2680
- ownerState: f({}, R, {
2681
- state: E
2682
- }),
2683
- className: O.wrapper,
2684
- ref: S,
2685
- children: /* @__PURE__ */ p.jsx(dr, {
2686
- ownerState: f({}, R, {
2687
- state: E
2688
- }),
2689
- className: O.wrapperInner,
2690
- children: s
2691
- })
2692
- })
2693
- }))
2694
- }));
2695
- });
2696
- process.env.NODE_ENV !== "production" && (rt.propTypes = {
2697
- // ┌────────────────────────────── Warning ──────────────────────────────┐
2698
- // │ These PropTypes are generated from the TypeScript type definitions. │
2699
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
2700
- // └─────────────────────────────────────────────────────────────────────┘
2701
- /**
2702
- * Add a custom transition end trigger. Called with the transitioning DOM
2703
- * node and a done callback. Allows for more fine grained transition end
2704
- * logic. Note: Timeouts are still used as a fallback if provided.
2705
- */
2706
- addEndListener: n.func,
2707
- /**
2708
- * The content node to be collapsed.
2709
- */
2710
- children: n.node,
2711
- /**
2712
- * Override or extend the styles applied to the component.
2713
- */
2714
- classes: n.object,
2715
- /**
2716
- * @ignore
2717
- */
2718
- className: n.string,
2719
- /**
2720
- * The width (horizontal) or height (vertical) of the container when collapsed.
2721
- * @default '0px'
2722
- */
2723
- collapsedSize: n.oneOfType([n.number, n.string]),
2724
- /**
2725
- * The component used for the root node.
2726
- * Either a string to use a HTML element or a component.
2727
- */
2728
- component: $t,
2729
- /**
2730
- * The transition timing function.
2731
- * You may specify a single easing or a object containing enter and exit values.
2732
- */
2733
- easing: n.oneOfType([n.shape({
2734
- enter: n.string,
2735
- exit: n.string
2736
- }), n.string]),
2737
- /**
2738
- * If `true`, the component will transition in.
2739
- */
2740
- in: n.bool,
2741
- /**
2742
- * @ignore
2743
- */
2744
- onEnter: n.func,
2745
- /**
2746
- * @ignore
2747
- */
2748
- onEntered: n.func,
2749
- /**
2750
- * @ignore
2751
- */
2752
- onEntering: n.func,
2753
- /**
2754
- * @ignore
2755
- */
2756
- onExit: n.func,
2757
- /**
2758
- * @ignore
2759
- */
2760
- onExited: n.func,
2761
- /**
2762
- * @ignore
2763
- */
2764
- onExiting: n.func,
2765
- /**
2766
- * The transition orientation.
2767
- * @default 'vertical'
2768
- */
2769
- orientation: n.oneOf(["horizontal", "vertical"]),
2770
- /**
2771
- * @ignore
2772
- */
2773
- style: n.object,
2774
- /**
2775
- * The system prop that allows defining system overrides as well as additional CSS styles.
2776
- */
2777
- sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
2778
- /**
2779
- * The duration for the transition, in milliseconds.
2780
- * You may specify a single timeout for all transitions, or individually with an object.
2781
- *
2782
- * Set to 'auto' to automatically calculate transition time based on height.
2783
- * @default duration.standard
2784
- */
2785
- timeout: n.oneOfType([n.oneOf(["auto"]), n.number, n.shape({
2786
- appear: n.number,
2787
- enter: n.number,
2788
- exit: n.number
2789
- })])
2790
- });
2791
- rt.muiSupportAuto = !0;
2792
- const st = /* @__PURE__ */ h.createContext({});
2793
- process.env.NODE_ENV !== "production" && (st.displayName = "AccordionContext");
2794
- function fr(e) {
2795
- return J("MuiAccordion", e);
2796
- }
2797
- const Ce = X("MuiAccordion", ["root", "rounded", "expanded", "disabled", "gutters", "region"]), gr = ["children", "className", "defaultExpanded", "disabled", "disableGutters", "expanded", "onChange", "square", "slots", "slotProps", "TransitionComponent", "TransitionProps"], mr = (e) => {
2798
- const {
2799
- classes: t,
2800
- square: o,
2801
- expanded: r,
2802
- disabled: i,
2803
- disableGutters: s
2804
- } = e;
2805
- return Q({
2806
- root: ["root", !o && "rounded", r && "expanded", i && "disabled", !s && "gutters"],
2807
- region: ["region"]
2808
- }, fr, t);
2809
- }, hr = P(Qe, {
2810
- name: "MuiAccordion",
2811
- slot: "Root",
2812
- overridesResolver: (e, t) => {
2813
- const {
2814
- ownerState: o
2815
- } = e;
2816
- return [{
2817
- [`& .${Ce.region}`]: t.region
2818
- }, t.root, !o.square && t.rounded, !o.disableGutters && t.gutters];
2819
- }
2820
- })(({
2821
- theme: e
2822
- }) => {
2823
- const t = {
2824
- duration: e.transitions.duration.shortest
2825
- };
2826
- return {
2827
- position: "relative",
2828
- transition: e.transitions.create(["margin"], t),
2829
- overflowAnchor: "none",
2830
- // Keep the same scrolling position
2831
- "&::before": {
2832
- position: "absolute",
2833
- left: 0,
2834
- top: -1,
2835
- right: 0,
2836
- height: 1,
2837
- content: '""',
2838
- opacity: 1,
2839
- backgroundColor: (e.vars || e).palette.divider,
2840
- transition: e.transitions.create(["opacity", "background-color"], t)
2841
- },
2842
- "&:first-of-type": {
2843
- "&::before": {
2844
- display: "none"
2845
- }
2846
- },
2847
- [`&.${Ce.expanded}`]: {
2848
- "&::before": {
2849
- opacity: 0
2850
- },
2851
- "&:first-of-type": {
2852
- marginTop: 0
2853
- },
2854
- "&:last-of-type": {
2855
- marginBottom: 0
2856
- },
2857
- "& + &": {
2858
- "&::before": {
2859
- display: "none"
2860
- }
2861
- }
2862
- },
2863
- [`&.${Ce.disabled}`]: {
2864
- backgroundColor: (e.vars || e).palette.action.disabledBackground
2865
- }
2866
- };
2867
- }, ({
2868
- theme: e
2869
- }) => ({
2870
- variants: [{
2871
- props: (t) => !t.square,
2872
- style: {
2873
- borderRadius: 0,
2874
- "&:first-of-type": {
2875
- borderTopLeftRadius: (e.vars || e).shape.borderRadius,
2876
- borderTopRightRadius: (e.vars || e).shape.borderRadius
2877
- },
2878
- "&:last-of-type": {
2879
- borderBottomLeftRadius: (e.vars || e).shape.borderRadius,
2880
- borderBottomRightRadius: (e.vars || e).shape.borderRadius,
2881
- // Fix a rendering issue on Edge
2882
- "@supports (-ms-ime-align: auto)": {
2883
- borderBottomLeftRadius: 0,
2884
- borderBottomRightRadius: 0
2885
- }
2886
- }
2887
- }
2888
- }, {
2889
- props: (t) => !t.disableGutters,
2890
- style: {
2891
- [`&.${Ce.expanded}`]: {
2892
- margin: "16px 0"
2893
- }
2894
- }
2895
- }]
2896
- })), Ft = /* @__PURE__ */ h.forwardRef(function(t, o) {
2897
- const r = Y({
2898
- props: t,
2899
- name: "MuiAccordion"
2900
- }), {
2901
- children: i,
2902
- className: s,
2903
- defaultExpanded: a = !1,
2904
- disabled: l = !1,
2905
- disableGutters: u = !1,
2906
- expanded: c,
2907
- onChange: d,
2908
- square: g = !1,
2909
- slots: m = {},
2910
- slotProps: x = {},
2911
- TransitionComponent: y,
2912
- TransitionProps: T
2913
- } = r, j = V(r, gr), [C, M] = Sn({
2914
- controlled: c,
2915
- default: a,
2916
- name: "Accordion",
2917
- state: "expanded"
2918
- }), w = h.useCallback((A) => {
2919
- M(!C), d && d(A, !C);
2920
- }, [C, d, M]), [b, ...N] = h.Children.toArray(i), R = h.useMemo(() => ({
2921
- expanded: C,
2922
- disabled: l,
2923
- disableGutters: u,
2924
- toggle: w
2925
- }), [C, l, u, w]), O = f({}, r, {
2926
- square: g,
2927
- disabled: l,
2928
- disableGutters: u,
2929
- expanded: C
2930
- }), k = mr(O), W = f({
2931
- transition: y
2932
- }, m), S = f({
2933
- transition: T
2934
- }, x), [z, I] = Ge("transition", {
2935
- elementType: rt,
2936
- externalForwardedProps: {
2937
- slots: W,
2938
- slotProps: S
2939
- },
2940
- ownerState: O
2941
- });
2942
- return /* @__PURE__ */ p.jsxs(hr, f({
2943
- className: $(k.root, s),
2944
- ref: o,
2945
- ownerState: O,
2946
- square: g
2947
- }, j, {
2948
- children: [/* @__PURE__ */ p.jsx(st.Provider, {
2949
- value: R,
2950
- children: b
2951
- }), /* @__PURE__ */ p.jsx(z, f({
2952
- in: C,
2953
- timeout: "auto"
2954
- }, I, {
2955
- children: /* @__PURE__ */ p.jsx("div", {
2956
- "aria-labelledby": b.props.id,
2957
- id: b.props["aria-controls"],
2958
- role: "region",
2959
- className: k.region,
2960
- children: N
2961
- })
2962
- }))]
2963
- }));
2964
- });
2965
- process.env.NODE_ENV !== "production" && (Ft.propTypes = {
2966
- // ┌────────────────────────────── Warning ──────────────────────────────┐
2967
- // │ These PropTypes are generated from the TypeScript type definitions. │
2968
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
2969
- // └─────────────────────────────────────────────────────────────────────┘
2970
- /**
2971
- * The content of the component.
2972
- */
2973
- children: ke(n.node.isRequired, (e) => {
2974
- const t = h.Children.toArray(e.children)[0];
2975
- return Rn.isFragment(t) ? new Error("MUI: The Accordion doesn't accept a Fragment as a child. Consider providing an array instead.") : /* @__PURE__ */ h.isValidElement(t) ? null : new Error("MUI: Expected the first child of Accordion to be a valid element.");
2976
- }),
2977
- /**
2978
- * Override or extend the styles applied to the component.
2979
- */
2980
- classes: n.object,
2981
- /**
2982
- * @ignore
2983
- */
2984
- className: n.string,
2985
- /**
2986
- * If `true`, expands the accordion by default.
2987
- * @default false
2988
- */
2989
- defaultExpanded: n.bool,
2990
- /**
2991
- * If `true`, the component is disabled.
2992
- * @default false
2993
- */
2994
- disabled: n.bool,
2995
- /**
2996
- * If `true`, it removes the margin between two expanded accordion items and the increase of height.
2997
- * @default false
2998
- */
2999
- disableGutters: n.bool,
3000
- /**
3001
- * If `true`, expands the accordion, otherwise collapse it.
3002
- * Setting this prop enables control over the accordion.
3003
- */
3004
- expanded: n.bool,
3005
- /**
3006
- * Callback fired when the expand/collapse state is changed.
3007
- *
3008
- * @param {React.SyntheticEvent} event The event source of the callback. **Warning**: This is a generic event not a change event.
3009
- * @param {boolean} expanded The `expanded` state of the accordion.
3010
- */
3011
- onChange: n.func,
3012
- /**
3013
- * The props used for each slot inside.
3014
- * @default {}
3015
- */
3016
- slotProps: n.shape({
3017
- transition: n.oneOfType([n.func, n.object])
3018
- }),
3019
- /**
3020
- * The components used for each slot inside.
3021
- * @default {}
3022
- */
3023
- slots: n.shape({
3024
- transition: n.elementType
3025
- }),
3026
- /**
3027
- * If `true`, rounded corners are disabled.
3028
- * @default false
3029
- */
3030
- square: n.bool,
3031
- /**
3032
- * The system prop that allows defining system overrides as well as additional CSS styles.
3033
- */
3034
- sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
3035
- /**
3036
- * The component used for the transition.
3037
- * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
3038
- * @deprecated Use `slots.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
3039
- */
3040
- TransitionComponent: n.elementType,
3041
- /**
3042
- * Props applied to the transition element.
3043
- * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
3044
- * @deprecated Use `slotProps.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
3045
- */
3046
- TransitionProps: n.object
3047
- });
3048
- function br(e) {
3049
- return J("MuiAccordionDetails", e);
3050
- }
3051
- X("MuiAccordionDetails", ["root"]);
3052
- const vr = ["className"], xr = (e) => {
3053
- const {
3054
- classes: t
3055
- } = e;
3056
- return Q({
3057
- root: ["root"]
3058
- }, br, t);
3059
- }, yr = P("div", {
3060
- name: "MuiAccordionDetails",
3061
- slot: "Root",
3062
- overridesResolver: (e, t) => t.root
3063
- })(({
3064
- theme: e
3065
- }) => ({
3066
- padding: e.spacing(1, 2, 2)
3067
- })), Ut = /* @__PURE__ */ h.forwardRef(function(t, o) {
3068
- const r = Y({
3069
- props: t,
3070
- name: "MuiAccordionDetails"
3071
- }), {
3072
- className: i
3073
- } = r, s = V(r, vr), a = r, l = xr(a);
3074
- return /* @__PURE__ */ p.jsx(yr, f({
3075
- className: $(l.root, i),
3076
- ref: o,
3077
- ownerState: a
3078
- }, s));
3079
- });
3080
- process.env.NODE_ENV !== "production" && (Ut.propTypes = {
3081
- // ┌────────────────────────────── Warning ──────────────────────────────┐
3082
- // │ These PropTypes are generated from the TypeScript type definitions. │
3083
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
3084
- // └─────────────────────────────────────────────────────────────────────┘
3085
- /**
3086
- * The content of the component.
3087
- */
3088
- children: n.node,
3089
- /**
3090
- * Override or extend the styles applied to the component.
3091
- */
3092
- classes: n.object,
3093
- /**
3094
- * @ignore
3095
- */
3096
- className: n.string,
3097
- /**
3098
- * The system prop that allows defining system overrides as well as additional CSS styles.
3099
- */
3100
- sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object])
3101
- });
3102
- function Tr(e) {
3103
- return J("MuiAccordionSummary", e);
3104
- }
3105
- const ue = X("MuiAccordionSummary", ["root", "expanded", "focusVisible", "disabled", "gutters", "contentGutters", "content", "expandIconWrapper"]), Er = ["children", "className", "expandIcon", "focusVisibleClassName", "onClick"], Cr = (e) => {
3106
- const {
3107
- classes: t,
3108
- expanded: o,
3109
- disabled: r,
3110
- disableGutters: i
3111
- } = e;
3112
- return Q({
3113
- root: ["root", o && "expanded", r && "disabled", !i && "gutters"],
3114
- focusVisible: ["focusVisible"],
3115
- content: ["content", o && "expanded", !i && "contentGutters"],
3116
- expandIconWrapper: ["expandIconWrapper", o && "expanded"]
3117
- }, Tr, t);
3118
- }, Sr = P(nt, {
3119
- name: "MuiAccordionSummary",
3120
- slot: "Root",
3121
- overridesResolver: (e, t) => t.root
3122
- })(({
3123
- theme: e
3124
- }) => {
3125
- const t = {
3126
- duration: e.transitions.duration.shortest
3127
- };
3128
- return {
3129
- display: "flex",
3130
- minHeight: 48,
3131
- padding: e.spacing(0, 2),
3132
- transition: e.transitions.create(["min-height", "background-color"], t),
3133
- [`&.${ue.focusVisible}`]: {
3134
- backgroundColor: (e.vars || e).palette.action.focus
3135
- },
3136
- [`&.${ue.disabled}`]: {
3137
- opacity: (e.vars || e).palette.action.disabledOpacity
3138
- },
3139
- [`&:hover:not(.${ue.disabled})`]: {
3140
- cursor: "pointer"
3141
- },
3142
- variants: [{
3143
- props: (o) => !o.disableGutters,
3144
- style: {
3145
- [`&.${ue.expanded}`]: {
3146
- minHeight: 64
3147
- }
3148
- }
3149
- }]
3150
- };
3151
- }), Rr = P("div", {
3152
- name: "MuiAccordionSummary",
3153
- slot: "Content",
3154
- overridesResolver: (e, t) => t.content
3155
- })(({
3156
- theme: e
3157
- }) => ({
3158
- display: "flex",
3159
- flexGrow: 1,
3160
- margin: "12px 0",
3161
- variants: [{
3162
- props: (t) => !t.disableGutters,
3163
- style: {
3164
- transition: e.transitions.create(["margin"], {
3165
- duration: e.transitions.duration.shortest
3166
- }),
3167
- [`&.${ue.expanded}`]: {
3168
- margin: "20px 0"
3169
- }
3170
- }
3171
- }]
3172
- })), Nr = P("div", {
3173
- name: "MuiAccordionSummary",
3174
- slot: "ExpandIconWrapper",
3175
- overridesResolver: (e, t) => t.expandIconWrapper
3176
- })(({
3177
- theme: e
3178
- }) => ({
3179
- display: "flex",
3180
- color: (e.vars || e).palette.action.active,
3181
- transform: "rotate(0deg)",
3182
- transition: e.transitions.create("transform", {
3183
- duration: e.transitions.duration.shortest
3184
- }),
3185
- [`&.${ue.expanded}`]: {
3186
- transform: "rotate(180deg)"
3187
- }
3188
- })), Gt = /* @__PURE__ */ h.forwardRef(function(t, o) {
3189
- const r = Y({
3190
- props: t,
3191
- name: "MuiAccordionSummary"
3192
- }), {
3193
- children: i,
3194
- className: s,
3195
- expandIcon: a,
3196
- focusVisibleClassName: l,
3197
- onClick: u
3198
- } = r, c = V(r, Er), {
3199
- disabled: d = !1,
3200
- disableGutters: g,
3201
- expanded: m,
3202
- toggle: x
3203
- } = h.useContext(st), y = (C) => {
3204
- x && x(C), u && u(C);
3205
- }, T = f({}, r, {
3206
- expanded: m,
3207
- disabled: d,
3208
- disableGutters: g
3209
- }), j = Cr(T);
3210
- return /* @__PURE__ */ p.jsxs(Sr, f({
3211
- focusRipple: !1,
3212
- disableRipple: !0,
3213
- disabled: d,
3214
- component: "div",
3215
- "aria-expanded": m,
3216
- className: $(j.root, s),
3217
- focusVisibleClassName: $(j.focusVisible, l),
3218
- onClick: y,
3219
- ref: o,
3220
- ownerState: T
3221
- }, c, {
3222
- children: [/* @__PURE__ */ p.jsx(Rr, {
3223
- className: j.content,
3224
- ownerState: T,
3225
- children: i
3226
- }), a && /* @__PURE__ */ p.jsx(Nr, {
3227
- className: j.expandIconWrapper,
3228
- ownerState: T,
3229
- children: a
3230
- })]
3231
- }));
3232
- });
3233
- process.env.NODE_ENV !== "production" && (Gt.propTypes = {
3234
- // ┌────────────────────────────── Warning ──────────────────────────────┐
3235
- // │ These PropTypes are generated from the TypeScript type definitions. │
3236
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
3237
- // └─────────────────────────────────────────────────────────────────────┘
3238
- /**
3239
- * The content of the component.
3240
- */
3241
- children: n.node,
3242
- /**
3243
- * Override or extend the styles applied to the component.
3244
- */
3245
- classes: n.object,
3246
- /**
3247
- * @ignore
3248
- */
3249
- className: n.string,
3250
- /**
3251
- * The icon to display as the expand indicator.
3252
- */
3253
- expandIcon: n.node,
3254
- /**
3255
- * This prop can help identify which element has keyboard focus.
3256
- * The class name will be applied when the element gains the focus through keyboard interaction.
3257
- * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
3258
- * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
3259
- * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
3260
- * if needed.
3261
- */
3262
- focusVisibleClassName: n.string,
3263
- /**
3264
- * @ignore
3265
- */
3266
- onClick: n.func,
3267
- /**
3268
- * The system prop that allows defining system overrides as well as additional CSS styles.
3269
- */
3270
- sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object])
3271
- });
3272
- function Or(e) {
3273
- return J("MuiTypography", e);
3274
- }
3275
- X("MuiTypography", ["root", "h1", "h2", "h3", "h4", "h5", "h6", "subtitle1", "subtitle2", "body1", "body2", "inherit", "button", "caption", "overline", "alignLeft", "alignRight", "alignCenter", "alignJustify", "noWrap", "gutterBottom", "paragraph"]);
3276
- const jr = ["align", "className", "component", "gutterBottom", "noWrap", "paragraph", "variant", "variantMapping"], wr = (e) => {
3277
- const {
3278
- align: t,
3279
- gutterBottom: o,
3280
- noWrap: r,
3281
- paragraph: i,
3282
- variant: s,
3283
- classes: a
3284
- } = e, l = {
3285
- root: ["root", s, e.align !== "inherit" && `align${K(t)}`, o && "gutterBottom", r && "noWrap", i && "paragraph"]
3286
- };
3287
- return Q(l, Or, a);
3288
- }, $r = P("span", {
3289
- name: "MuiTypography",
3290
- slot: "Root",
3291
- overridesResolver: (e, t) => {
3292
- const {
3293
- ownerState: o
3294
- } = e;
3295
- return [t.root, o.variant && t[o.variant], o.align !== "inherit" && t[`align${K(o.align)}`], o.noWrap && t.noWrap, o.gutterBottom && t.gutterBottom, o.paragraph && t.paragraph];
3296
- }
3297
- })(({
3298
- theme: e,
3299
- ownerState: t
3300
- }) => f({
3301
- margin: 0
3302
- }, t.variant === "inherit" && {
3303
- // Some elements, like <button> on Chrome have default font that doesn't inherit, reset this.
3304
- font: "inherit"
3305
- }, t.variant !== "inherit" && e.typography[t.variant], t.align !== "inherit" && {
3306
- textAlign: t.align
3307
- }, t.noWrap && {
3308
- overflow: "hidden",
3309
- textOverflow: "ellipsis",
3310
- whiteSpace: "nowrap"
3311
- }, t.gutterBottom && {
3312
- marginBottom: "0.35em"
3313
- }, t.paragraph && {
3314
- marginBottom: 16
3315
- })), Rt = {
3316
- h1: "h1",
3317
- h2: "h2",
3318
- h3: "h3",
3319
- h4: "h4",
3320
- h5: "h5",
3321
- h6: "h6",
3322
- subtitle1: "h6",
3323
- subtitle2: "h6",
3324
- body1: "p",
3325
- body2: "p",
3326
- inherit: "p"
3327
- }, Mr = {
3328
- primary: "primary.main",
3329
- textPrimary: "text.primary",
3330
- secondary: "secondary.main",
3331
- textSecondary: "text.secondary",
3332
- error: "error.main"
3333
- }, kr = (e) => Mr[e] || e, qt = /* @__PURE__ */ h.forwardRef(function(t, o) {
3334
- const r = Y({
3335
- props: t,
3336
- name: "MuiTypography"
3337
- }), i = kr(r.color), s = jt(f({}, r, {
3338
- color: i
3339
- })), {
3340
- align: a = "inherit",
3341
- className: l,
3342
- component: u,
3343
- gutterBottom: c = !1,
3344
- noWrap: d = !1,
3345
- paragraph: g = !1,
3346
- variant: m = "body1",
3347
- variantMapping: x = Rt
3348
- } = s, y = V(s, jr), T = f({}, s, {
3349
- align: a,
3350
- color: i,
3351
- className: l,
3352
- component: u,
3353
- gutterBottom: c,
3354
- noWrap: d,
3355
- paragraph: g,
3356
- variant: m,
3357
- variantMapping: x
3358
- }), j = u || (g ? "p" : x[m] || Rt[m]) || "span", C = wr(T);
3359
- return /* @__PURE__ */ p.jsx($r, f({
3360
- as: j,
3361
- ref: o,
3362
- ownerState: T,
3363
- className: $(C.root, l)
3364
- }, y));
3365
- });
3366
- process.env.NODE_ENV !== "production" && (qt.propTypes = {
3367
- // ┌────────────────────────────── Warning ──────────────────────────────┐
3368
- // │ These PropTypes are generated from the TypeScript type definitions. │
3369
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
3370
- // └─────────────────────────────────────────────────────────────────────┘
3371
- /**
3372
- * Set the text-align on the component.
3373
- * @default 'inherit'
3374
- */
3375
- align: n.oneOf(["center", "inherit", "justify", "left", "right"]),
3376
- /**
3377
- * The content of the component.
3378
- */
3379
- children: n.node,
3380
- /**
3381
- * Override or extend the styles applied to the component.
3382
- */
3383
- classes: n.object,
3384
- /**
3385
- * @ignore
3386
- */
3387
- className: n.string,
3388
- /**
3389
- * The component used for the root node.
3390
- * Either a string to use a HTML element or a component.
3391
- */
3392
- component: n.elementType,
3393
- /**
3394
- * If `true`, the text will have a bottom margin.
3395
- * @default false
3396
- */
3397
- gutterBottom: n.bool,
3398
- /**
3399
- * If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.
3400
- *
3401
- * Note that text overflow can only happen with block or inline-block level elements
3402
- * (the element needs to have a width in order to overflow).
3403
- * @default false
3404
- */
3405
- noWrap: n.bool,
3406
- /**
3407
- * If `true`, the element will be a paragraph element.
3408
- * @default false
3409
- */
3410
- paragraph: n.bool,
3411
- /**
3412
- * The system prop that allows defining system overrides as well as additional CSS styles.
3413
- */
3414
- sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
3415
- /**
3416
- * Applies the theme typography styles.
3417
- * @default 'body1'
3418
- */
3419
- variant: n.oneOfType([n.oneOf(["body1", "body2", "button", "caption", "h1", "h2", "h3", "h4", "h5", "h6", "inherit", "overline", "subtitle1", "subtitle2"]), n.string]),
3420
- /**
3421
- * The component maps the variant prop to a range of different HTML element types.
3422
- * For instance, subtitle1 to `<h6>`.
3423
- * If you wish to change that mapping, you can provide your own.
3424
- * Alternatively, you can use the `component` prop.
3425
- * @default {
3426
- * h1: 'h1',
3427
- * h2: 'h2',
3428
- * h3: 'h3',
3429
- * h4: 'h4',
3430
- * h5: 'h5',
3431
- * h6: 'h6',
3432
- * subtitle1: 'h6',
3433
- * subtitle2: 'h6',
3434
- * body1: 'p',
3435
- * body2: 'p',
3436
- * inherit: 'p',
3437
- * }
3438
- */
3439
- variantMapping: n.object
3440
- });
3441
- const Pr = (e) => !isNaN(parseFloat(e)) && !isNaN(Number(e) - 0), Ir = {
3442
- "java.lang.Integer": !0,
3443
- "java.lang.Long": !0,
3444
- "java.lang.Double": !0,
3445
- "java.lang.Float": !0
3446
- }, Ar = (e, t) => {
3447
- if (!t.required && !e)
3448
- return;
3449
- if (t.required && (!e || e.trim().length === 0))
3450
- return `${t.name} is mandatory!`;
3451
- if (Ir[t.type]) {
3452
- if (!Pr(e))
3453
- return "Value must be numeric!";
3454
- const i = Number(e);
3455
- if (t.type === "java.lang.Integer" && !Number.isInteger(i))
3456
- return "Value must be an Integer!";
3457
- const s = t.minValue || Number.MIN_VALUE, a = t.maxValue || Number.MAX_VALUE;
3458
- if (i < s)
3459
- return `Value too small, must be >= ${s}`;
3460
- if (i > a)
3461
- return `Value too large, must be <= ${a}`;
3462
- }
3463
- const o = t.minLength || 0, r = t.maxLength;
3464
- if (e.length < o)
3465
- return `Value too short, must at least ${o} characters`;
3466
- if (r && e.length > r)
3467
- return `Value too long, must be at most ${r} characters`;
3468
- }, Vr = (e) => {
3469
- const t = {};
3470
- return e.forEach((o) => {
3471
- o.required && (t[o.name] = "");
3472
- }), t;
3473
- }, Dr = ({ triggerName: e, triggerParams: t, triggerAction: o }) => {
3474
- const [r, i] = Fe({}), [s, a] = Fe(Vr(t)), l = (c) => {
3475
- const d = { ...s };
3476
- delete d[c], a(d);
3477
- }, u = (c, d) => {
3478
- const { name: g } = c;
3479
- i({
3480
- ...r,
3481
- [g]: d.target.value
3482
- });
3483
- const m = Ar(d.target.value, c);
3484
- m ? a({
3485
- ...s,
3486
- [g]: m
3487
- }) : l(g);
3488
- };
3489
- return p.jsx("form", { onSubmit: (c) => {
3490
- c.preventDefault(), o(e, r);
3491
- }, children: p.jsxs(fn, { display: "flex", flexWrap: "wrap", gap: 4, rowGap: 4, children: [t.length === 0 ? p.jsx(ce, { children: "Trigger does not support additional parameters" }) : p.jsxs(p.Fragment, { children: [p.jsx(ce, { minWidth: "100%", children: "Trigger parameters" }), t.map((c) => {
3492
- const { name: d } = c, g = s ? s[d] : void 0;
3493
- return p.jsx(gn, { sx: { marginBottom: 10 }, error: !!g, id: `${e}-${d}-input`, helperText: g || "", required: c.required, label: d, onChange: (m) => u(c, m) }, `${e}-${d}-input`);
3494
- })] }), p.jsx(mn, { id: `${e}-submit-btn`, variant: "contained", type: "submit", disabled: s ? Object.keys(s).length > 0 : !1, sx: { marginTop: 10, float: "right", marginLeft: "auto", height: "fit-content" }, children: "Trigger" })] }) });
3495
- }, Br = ({ triggerables: e, triggerAction: t }) => p.jsx(p.Fragment, { children: Object.entries(e).map(([o, r]) => p.jsxs(Ft, { sx: { width: "100%", marginBottom: "5px" }, children: [p.jsx(Gt, { expandIcon: p.jsx(wt, {}), "aria-controls": `${o}-content`, id: `${o}-header`, children: p.jsx(qt, { sx: { fontSize: 18, flexBasis: "33.33%", flexShrink: 0 }, children: o }) }), p.jsx(Ut, { sx: { flexDirection: "column" }, children: p.jsx(Dr, { triggerName: o, triggerParams: r, triggerAction: t }) })] }, `${o}-container`)) }), zr = ({ activeTaskStatuses: e, triggerables: t, triggerResponse: o, openMessageChain: r, handleTriggerAction: i }) => {
3496
- const [s, a] = Fe(!0);
3497
- return p.jsxs(p.Fragment, { children: [p.jsx(Wo, { triggerResponse: o, showNotification: s, onClose: () => a(!1) }), p.jsx(ir, { activeTaskStatuses: e, openMessageChain: r }), p.jsx(Br, { triggerables: t, triggerAction: i })] });
3498
- }, _r = (e) => async ({
3499
- request: t
3500
- }) => {
3501
- try {
3502
- const { triggerName: o, params: r } = await t.json(), i = await It(
3503
- o,
3504
- r,
3505
- e
3506
- );
3507
- return {
3508
- status: i.status,
3509
- data: i.data
3510
- };
3511
- } catch (o) {
3512
- return console.error(o), {
3513
- status: 500,
3514
- data: "Failed to trigger"
3515
- };
3516
- }
3517
- }, Qr = _r(), Lr = (e) => async () => {
3518
- try {
3519
- const t = await Pt(e), o = await At(
3520
- e
3521
- ), { data: r } = t, { data: i } = o;
3522
- return { triggerables: r, activeTaskStatuses: i };
3523
- } catch (t) {
3524
- throw console.error(t), new Error("Failed to fetch triggerables");
3525
- }
3526
- }, es = Lr(), ts = () => {
3527
- const e = On(), t = jn(), o = wn(), { activeTaskStatuses: r, triggerables: i } = o, s = r.reduce((u, c) => (u[c.id] = c, u), {}), { data: a } = $n() || {}, l = (u, c) => {
3528
- t(
3529
- { triggerName: u, params: c },
3530
- {
3531
- method: "POST",
3532
- encType: "application/json"
3533
- }
3534
- );
3535
- };
3536
- return /* @__PURE__ */ p.jsx(
3537
- zr,
3538
- {
3539
- triggerResponse: a,
3540
- activeTaskStatuses: s,
3541
- triggerables: i,
3542
- openMessageChain: (u) => {
3543
- e(`/message-log/${u}`);
3544
- },
3545
- handleTriggerAction: l
3546
- }
3547
- );
3548
- };
3549
- export {
3550
- ts as T,
3551
- Lr as a,
3552
- _r as g,
3553
- es as l,
3554
- Qr as t
3555
- };
3556
- //# sourceMappingURL=TriggerablesRoute-opCAjNCv.js.map