everest-npm-features 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/README.md +3 -0
  2. package/dist/ArrowRight-C6tjImpU.js +300 -0
  3. package/dist/Box-wAem3MQD.js +58 -0
  4. package/dist/Button-fWdSk-yh.js +451 -0
  5. package/dist/ButtonBase-SYP7klDp.js +876 -0
  6. package/dist/CircularProgress-DcXA6nAu.js +249 -0
  7. package/dist/Close-CdRA3xUs.js +75 -0
  8. package/dist/Container-CIMHcpEe.js +181 -0
  9. package/dist/ContentCopy-CexUUXuC.js +8 -0
  10. package/dist/DefaultPropsProvider-Y8MI-J-I.js +555 -0
  11. package/dist/DialogContent-JgT9A6nk.js +501 -0
  12. package/dist/FormControl-D4QuPCnV.js +249 -0
  13. package/dist/GlobalStyles-BOnEiMUE.js +23 -0
  14. package/dist/Grid-dtT_MVn3.js +501 -0
  15. package/dist/Grow-B3Swdn2Z.js +215 -0
  16. package/dist/IconButton-CRGy76pJ.js +237 -0
  17. package/dist/Modal-0q_y4zbS.js +1170 -0
  18. package/dist/Select-BNAaKK32.js +4046 -0
  19. package/dist/Slide-BlS6unRJ.js +229 -0
  20. package/dist/TextField-CPZo0_di.js +963 -0
  21. package/dist/TransitionGroupContext-VwpFXTPO.js +43 -0
  22. package/dist/Typography-kyxogyUq.js +256 -0
  23. package/dist/__vite-browser-external-DYxpcVy9-DYxpcVy9.js +4 -0
  24. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  25. package/dist/assets/documents.css +1 -0
  26. package/dist/assets/index.css +1 -0
  27. package/dist/assets/index2.css +1 -0
  28. package/dist/assets/keyboard.css +1 -0
  29. package/dist/assets/styles.css +1 -0
  30. package/dist/assets/styles2.css +1 -0
  31. package/dist/assets/tokenRow.css +1 -0
  32. package/dist/assets/withThemeProvider.css +1 -0
  33. package/dist/auth-Cj5FKr_m.js +19 -0
  34. package/dist/axios-xPiQW9EP.js +118114 -0
  35. package/dist/components/Profile/documents.d.ts +6 -0
  36. package/dist/components/Profile/documents.js +24 -0
  37. package/dist/components/Profile/index.d.ts +6 -0
  38. package/dist/components/Profile/index.js +592 -0
  39. package/dist/components/Receive/index.d.ts +2 -0
  40. package/dist/components/Receive/index.js +75 -0
  41. package/dist/components/Send/index.d.ts +6 -0
  42. package/dist/components/Send/index.js +387 -0
  43. package/dist/components/Shared/Keyboard/index.d.ts +1 -0
  44. package/dist/components/Shared/Keyboard/index.js +4 -0
  45. package/dist/components/Shared/Keyboard/keyboard.d.ts +8 -0
  46. package/dist/components/Shared/Keyboard/keyboard.js +152 -0
  47. package/dist/components/Shared/button.d.ts +11 -0
  48. package/dist/components/Shared/button.js +64 -0
  49. package/dist/components/Shared/incode.d.ts +20 -0
  50. package/dist/components/Shared/incode.js +202 -0
  51. package/dist/components/Shared/inputField.d.ts +7 -0
  52. package/dist/components/Shared/inputField.js +48 -0
  53. package/dist/components/Shared/pin.d.ts +9 -0
  54. package/dist/components/Shared/pin.js +96 -0
  55. package/dist/components/Shared/step.d.ts +8 -0
  56. package/dist/components/Shared/step.js +48 -0
  57. package/dist/components/Shared/transition.d.ts +7 -0
  58. package/dist/components/Shared/transition.js +11 -0
  59. package/dist/components/SignIn/index.d.ts +4 -0
  60. package/dist/components/SignIn/index.js +266 -0
  61. package/dist/components/SignIn/types.d.ts +7 -0
  62. package/dist/components/SignIn/types.js +1 -0
  63. package/dist/components/SignUp/biometric.d.ts +3 -0
  64. package/dist/components/SignUp/biometric.js +77 -0
  65. package/dist/components/SignUp/index.d.ts +3 -0
  66. package/dist/components/SignUp/index.js +393 -0
  67. package/dist/components/SignUp/pin.d.ts +3 -0
  68. package/dist/components/SignUp/pin.js +950 -0
  69. package/dist/components/SignUp/privacy.d.ts +2 -0
  70. package/dist/components/SignUp/privacy.js +259 -0
  71. package/dist/components/SignUp/terms.d.ts +2 -0
  72. package/dist/components/SignUp/terms.js +524 -0
  73. package/dist/components/SignUp/types.d.ts +54 -0
  74. package/dist/components/SignUp/types.js +1 -0
  75. package/dist/components/SignUp/userInfo.d.ts +3 -0
  76. package/dist/components/SignUp/userInfo.js +47 -0
  77. package/dist/components/WalletPortfolio/index.d.ts +3 -0
  78. package/dist/components/WalletPortfolio/index.js +557 -0
  79. package/dist/components/WalletPortfolio/tokenRow.d.ts +17 -0
  80. package/dist/components/WalletPortfolio/tokenRow.js +11 -0
  81. package/dist/components/WalletPortfolio/types.d.ts +10 -0
  82. package/dist/components/WalletPortfolio/types.js +1 -0
  83. package/dist/createSimplePaletteValueFilter-CsgjlRAs.js +659 -0
  84. package/dist/createSvgIcon-CAZr4ukt.js +249 -0
  85. package/dist/createTheme-NrBCWesw.js +3386 -0
  86. package/dist/debounce-46wSf_lW.js +15 -0
  87. package/dist/defaultTheme-OIfL8Ia7.js +5 -0
  88. package/dist/dialog-success-BDNJV4Tk.js +4 -0
  89. package/dist/dividerClasses-Z7VLlu5C.js +10 -0
  90. package/dist/documents-CL4Ajr_B.js +569 -0
  91. package/dist/exactProp-C1Lmtwf_.js +13 -0
  92. package/dist/extendSxProp-CuERe1TA.js +37 -0
  93. package/dist/hoc/withThemeProvider.d.ts +6 -0
  94. package/dist/hoc/withThemeProvider.js +635 -0
  95. package/dist/hooks/useDialog/index.d.ts +5 -0
  96. package/dist/hooks/useDialog/index.js +78 -0
  97. package/dist/hooks/useDialog/types.d.ts +14 -0
  98. package/dist/hooks/useDialog/types.js +1 -0
  99. package/dist/hooks/useSnackBar.d.ts +14 -0
  100. package/dist/hooks/useSnackBar.js +968 -0
  101. package/dist/index-CAoLi5Qq.js +827 -0
  102. package/dist/index-Cq3eHOnB.js +22 -0
  103. package/dist/index-DKTkUdik.js +6 -0
  104. package/dist/index-iAyNk1r6.js +72 -0
  105. package/dist/main.d.ts +7 -0
  106. package/dist/main.js +16 -0
  107. package/dist/pin-empty-D9665KFr.js +6 -0
  108. package/dist/react-redux-VW99uJjf.js +5908 -0
  109. package/dist/react-webcam-Cov1TP0q.js +639 -0
  110. package/dist/styled-Da6GnxEE.js +5 -0
  111. package/dist/styles.module-Ctfaq7f2.js +10 -0
  112. package/dist/styles.module-KeND8lCR.js +9 -0
  113. package/dist/tokenRow-Cdd_jFjp.js +206 -0
  114. package/dist/useFormControl-Bo6Tf_xo.js +46 -0
  115. package/dist/useSlot-CURNJ3JC.js +306 -0
  116. package/dist/useTheme-DWRMvRU8.js +9 -0
  117. package/dist/useTheme-nlj1B_-c.js +11 -0
  118. package/dist/useThemeProps-BqWuFW3z.js +40 -0
  119. package/dist/useThemeWithoutDefault-BdYkMk0o.js +12 -0
  120. package/dist/useTimeout-lr7ryrda.js +75 -0
  121. package/dist/util/constants.d.ts +20 -0
  122. package/dist/util/constants.js +23 -0
  123. package/dist/util/conversions.d.ts +9 -0
  124. package/dist/util/conversions.js +22284 -0
  125. package/dist/util/functions.d.ts +15 -0
  126. package/dist/util/functions.js +94 -0
  127. package/dist/utils-_FXWkn40.js +19473 -0
  128. package/dist/wallet-DN7ej6mj.js +273 -0
  129. package/package.json +59 -0
@@ -0,0 +1,968 @@
1
+ import { jsx as a, jsxs as ne } from "react/jsx-runtime";
2
+ import * as b from "react";
3
+ import { useState as R, useCallback as j } from "react";
4
+ import { g as F, e as T, k as X, l as K, P as e, m as be } from "../createTheme-NrBCWesw.js";
5
+ import { c as W, u as Ce } from "../useTimeout-lr7ryrda.js";
6
+ import { P as re, u as Z, e as Y } from "../useSlot-CURNJ3JC.js";
7
+ import { u as Se } from "../useTheme-nlj1B_-c.js";
8
+ import { g as U, s as O, m as V, d as $, u as _, a as se, b as q } from "../createSimplePaletteValueFilter-CsgjlRAs.js";
9
+ import { u as ke, G as we } from "../Grow-B3Swdn2Z.js";
10
+ import { u as Ee } from "../TransitionGroupContext-VwpFXTPO.js";
11
+ import { g as Oe, c as H, e as Te } from "../utils-_FXWkn40.js";
12
+ import { e as Re } from "../exactProp-C1Lmtwf_.js";
13
+ import { c as M } from "../createSvgIcon-CAZr4ukt.js";
14
+ import { I as Me } from "../IconButton-CRGy76pJ.js";
15
+ import { S as z } from "../Slide-BlS6unRJ.js";
16
+ function Ae(o) {
17
+ return F("MuiAlert", o);
18
+ }
19
+ const J = U("MuiAlert", ["root", "action", "icon", "message", "filled", "colorSuccess", "colorInfo", "colorWarning", "colorError", "filledSuccess", "filledInfo", "filledWarning", "filledError", "outlined", "outlinedSuccess", "outlinedInfo", "outlinedWarning", "outlinedError", "standard", "standardSuccess", "standardInfo", "standardWarning", "standardError"]), xe = M(/* @__PURE__ */ a("path", {
20
+ 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"
21
+ }), "SuccessOutlined"), Le = M(/* @__PURE__ */ a("path", {
22
+ d: "M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"
23
+ }), "ReportProblemOutlined"), Pe = M(/* @__PURE__ */ a("path", {
24
+ 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"
25
+ }), "ErrorOutline"), Ie = M(/* @__PURE__ */ a("path", {
26
+ 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"
27
+ }), "InfoOutlined"), ze = M(/* @__PURE__ */ a("path", {
28
+ 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"
29
+ }), "Close"), De = (o) => {
30
+ const {
31
+ variant: t,
32
+ color: r,
33
+ severity: n,
34
+ classes: u
35
+ } = o, p = {
36
+ root: ["root", `color${T(r || n)}`, `${t}${T(r || n)}`, `${t}`],
37
+ icon: ["icon"],
38
+ message: ["message"],
39
+ action: ["action"]
40
+ };
41
+ return q(p, Ae, u);
42
+ }, Ne = O(re, {
43
+ name: "MuiAlert",
44
+ slot: "Root",
45
+ overridesResolver: (o, t) => {
46
+ const {
47
+ ownerState: r
48
+ } = o;
49
+ return [t.root, t[r.variant], t[`${r.variant}${T(r.color || r.severity)}`]];
50
+ }
51
+ })(V(({
52
+ theme: o
53
+ }) => {
54
+ const t = o.palette.mode === "light" ? X : K, r = o.palette.mode === "light" ? K : X;
55
+ return {
56
+ ...o.typography.body2,
57
+ backgroundColor: "transparent",
58
+ display: "flex",
59
+ padding: "6px 16px",
60
+ variants: [...Object.entries(o.palette).filter($(["light"])).map(([n]) => ({
61
+ props: {
62
+ colorSeverity: n,
63
+ variant: "standard"
64
+ },
65
+ style: {
66
+ color: o.vars ? o.vars.palette.Alert[`${n}Color`] : t(o.palette[n].light, 0.6),
67
+ backgroundColor: o.vars ? o.vars.palette.Alert[`${n}StandardBg`] : r(o.palette[n].light, 0.9),
68
+ [`& .${J.icon}`]: o.vars ? {
69
+ color: o.vars.palette.Alert[`${n}IconColor`]
70
+ } : {
71
+ color: o.palette[n].main
72
+ }
73
+ }
74
+ })), ...Object.entries(o.palette).filter($(["light"])).map(([n]) => ({
75
+ props: {
76
+ colorSeverity: n,
77
+ variant: "outlined"
78
+ },
79
+ style: {
80
+ color: o.vars ? o.vars.palette.Alert[`${n}Color`] : t(o.palette[n].light, 0.6),
81
+ border: `1px solid ${(o.vars || o).palette[n].light}`,
82
+ [`& .${J.icon}`]: o.vars ? {
83
+ color: o.vars.palette.Alert[`${n}IconColor`]
84
+ } : {
85
+ color: o.palette[n].main
86
+ }
87
+ }
88
+ })), ...Object.entries(o.palette).filter($(["dark"])).map(([n]) => ({
89
+ props: {
90
+ colorSeverity: n,
91
+ variant: "filled"
92
+ },
93
+ style: {
94
+ fontWeight: o.typography.fontWeightMedium,
95
+ ...o.vars ? {
96
+ color: o.vars.palette.Alert[`${n}FilledColor`],
97
+ backgroundColor: o.vars.palette.Alert[`${n}FilledBg`]
98
+ } : {
99
+ backgroundColor: o.palette.mode === "dark" ? o.palette[n].dark : o.palette[n].main,
100
+ color: o.palette.getContrastText(o.palette[n].main)
101
+ }
102
+ }
103
+ }))]
104
+ };
105
+ })), Be = O("div", {
106
+ name: "MuiAlert",
107
+ slot: "Icon",
108
+ overridesResolver: (o, t) => t.icon
109
+ })({
110
+ marginRight: 12,
111
+ padding: "7px 0",
112
+ display: "flex",
113
+ fontSize: 22,
114
+ opacity: 0.9
115
+ }), je = O("div", {
116
+ name: "MuiAlert",
117
+ slot: "Message",
118
+ overridesResolver: (o, t) => t.message
119
+ })({
120
+ padding: "8px 0",
121
+ minWidth: 0,
122
+ overflow: "auto"
123
+ }), Q = O("div", {
124
+ name: "MuiAlert",
125
+ slot: "Action",
126
+ overridesResolver: (o, t) => t.action
127
+ })({
128
+ display: "flex",
129
+ alignItems: "flex-start",
130
+ padding: "4px 0 0 16px",
131
+ marginLeft: "auto",
132
+ marginRight: -8
133
+ }), ee = {
134
+ success: /* @__PURE__ */ a(xe, {
135
+ fontSize: "inherit"
136
+ }),
137
+ warning: /* @__PURE__ */ a(Le, {
138
+ fontSize: "inherit"
139
+ }),
140
+ error: /* @__PURE__ */ a(Pe, {
141
+ fontSize: "inherit"
142
+ }),
143
+ info: /* @__PURE__ */ a(Ie, {
144
+ fontSize: "inherit"
145
+ })
146
+ }, ae = /* @__PURE__ */ b.forwardRef(function(t, r) {
147
+ const n = _({
148
+ props: t,
149
+ name: "MuiAlert"
150
+ }), {
151
+ action: u,
152
+ children: p,
153
+ className: C,
154
+ closeText: f = "Close",
155
+ color: h,
156
+ components: y = {},
157
+ componentsProps: g = {},
158
+ icon: m,
159
+ iconMapping: k = ee,
160
+ onClose: S,
161
+ role: l = "alert",
162
+ severity: i = "success",
163
+ slotProps: v = {},
164
+ slots: s = {},
165
+ variant: c = "standard",
166
+ ...d
167
+ } = n, w = {
168
+ ...n,
169
+ color: h,
170
+ severity: i,
171
+ variant: c,
172
+ colorSeverity: h || i
173
+ }, E = De(w), D = {
174
+ slots: {
175
+ closeButton: y.CloseButton,
176
+ closeIcon: y.CloseIcon,
177
+ ...s
178
+ },
179
+ slotProps: {
180
+ ...g,
181
+ ...v
182
+ }
183
+ }, [A, x] = Z("closeButton", {
184
+ elementType: Me,
185
+ externalForwardedProps: D,
186
+ ownerState: w
187
+ }), [L, P] = Z("closeIcon", {
188
+ elementType: ze,
189
+ externalForwardedProps: D,
190
+ ownerState: w
191
+ });
192
+ return /* @__PURE__ */ ne(Ne, {
193
+ role: l,
194
+ elevation: 0,
195
+ ownerState: w,
196
+ className: se(E.root, C),
197
+ ref: r,
198
+ ...d,
199
+ children: [m !== !1 ? /* @__PURE__ */ a(Be, {
200
+ ownerState: w,
201
+ className: E.icon,
202
+ children: m || k[i] || ee[i]
203
+ }) : null, /* @__PURE__ */ a(je, {
204
+ ownerState: w,
205
+ className: E.message,
206
+ children: p
207
+ }), u != null ? /* @__PURE__ */ a(Q, {
208
+ ownerState: w,
209
+ className: E.action,
210
+ children: u
211
+ }) : null, u == null && S ? /* @__PURE__ */ a(Q, {
212
+ ownerState: w,
213
+ className: E.action,
214
+ children: /* @__PURE__ */ a(A, {
215
+ size: "small",
216
+ "aria-label": f,
217
+ title: f,
218
+ color: "inherit",
219
+ onClick: S,
220
+ ...x,
221
+ children: /* @__PURE__ */ a(L, {
222
+ fontSize: "small",
223
+ ...P
224
+ })
225
+ })
226
+ }) : null]
227
+ });
228
+ });
229
+ process.env.NODE_ENV !== "production" && (ae.propTypes = {
230
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
231
+ // │ These PropTypes are generated from the TypeScript type definitions. │
232
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
233
+ // └─────────────────────────────────────────────────────────────────────┘
234
+ /**
235
+ * The action to display. It renders after the message, at the end of the alert.
236
+ */
237
+ action: e.node,
238
+ /**
239
+ * The content of the component.
240
+ */
241
+ children: e.node,
242
+ /**
243
+ * Override or extend the styles applied to the component.
244
+ */
245
+ classes: e.object,
246
+ /**
247
+ * @ignore
248
+ */
249
+ className: e.string,
250
+ /**
251
+ * Override the default label for the *close popup* icon button.
252
+ *
253
+ * For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
254
+ * @default 'Close'
255
+ */
256
+ closeText: e.string,
257
+ /**
258
+ * The color of the component. Unless provided, the value is taken from the `severity` prop.
259
+ * It supports both default and custom theme colors, which can be added as shown in the
260
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
261
+ */
262
+ color: e.oneOfType([e.oneOf(["error", "info", "success", "warning"]), e.string]),
263
+ /**
264
+ * The components used for each slot inside.
265
+ *
266
+ * @deprecated use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
267
+ *
268
+ * @default {}
269
+ */
270
+ components: e.shape({
271
+ CloseButton: e.elementType,
272
+ CloseIcon: e.elementType
273
+ }),
274
+ /**
275
+ * The extra props for the slot components.
276
+ * You can override the existing props or add new ones.
277
+ *
278
+ * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
279
+ *
280
+ * @default {}
281
+ */
282
+ componentsProps: e.shape({
283
+ closeButton: e.object,
284
+ closeIcon: e.object
285
+ }),
286
+ /**
287
+ * Override the icon displayed before the children.
288
+ * Unless provided, the icon is mapped to the value of the `severity` prop.
289
+ * Set to `false` to remove the `icon`.
290
+ */
291
+ icon: e.node,
292
+ /**
293
+ * The component maps the `severity` prop to a range of different icons,
294
+ * for instance success to `<SuccessOutlined>`.
295
+ * If you wish to change this mapping, you can provide your own.
296
+ * Alternatively, you can use the `icon` prop to override the icon displayed.
297
+ */
298
+ iconMapping: e.shape({
299
+ error: e.node,
300
+ info: e.node,
301
+ success: e.node,
302
+ warning: e.node
303
+ }),
304
+ /**
305
+ * Callback fired when the component requests to be closed.
306
+ * When provided and no `action` prop is set, a close icon button is displayed that triggers the callback when clicked.
307
+ * @param {React.SyntheticEvent} event The event source of the callback.
308
+ */
309
+ onClose: e.func,
310
+ /**
311
+ * The ARIA role attribute of the element.
312
+ * @default 'alert'
313
+ */
314
+ role: e.string,
315
+ /**
316
+ * The severity of the alert. This defines the color and icon used.
317
+ * @default 'success'
318
+ */
319
+ severity: e.oneOfType([e.oneOf(["error", "info", "success", "warning"]), e.string]),
320
+ /**
321
+ * The props used for each slot inside.
322
+ * @default {}
323
+ */
324
+ slotProps: e.shape({
325
+ closeButton: e.oneOfType([e.func, e.object]),
326
+ closeIcon: e.oneOfType([e.func, e.object])
327
+ }),
328
+ /**
329
+ * The components used for each slot inside.
330
+ * @default {}
331
+ */
332
+ slots: e.shape({
333
+ closeButton: e.elementType,
334
+ closeIcon: e.elementType
335
+ }),
336
+ /**
337
+ * The system prop that allows defining system overrides as well as additional CSS styles.
338
+ */
339
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
340
+ /**
341
+ * The variant to use.
342
+ * @default 'standard'
343
+ */
344
+ variant: e.oneOfType([e.oneOf(["filled", "outlined", "standard"]), e.string])
345
+ });
346
+ function oe(o) {
347
+ return o.substring(2).toLowerCase();
348
+ }
349
+ function $e(o, t) {
350
+ return t.documentElement.clientWidth < o.clientX || t.documentElement.clientHeight < o.clientY;
351
+ }
352
+ function I(o) {
353
+ const {
354
+ children: t,
355
+ disableReactTree: r = !1,
356
+ mouseEvent: n = "onClick",
357
+ onClickAway: u,
358
+ touchEvent: p = "onTouchEnd"
359
+ } = o, C = b.useRef(!1), f = b.useRef(null), h = b.useRef(!1), y = b.useRef(!1);
360
+ b.useEffect(() => (setTimeout(() => {
361
+ h.current = !0;
362
+ }, 0), () => {
363
+ h.current = !1;
364
+ }), []);
365
+ const g = Ee(Oe(t), f), m = W((l) => {
366
+ const i = y.current;
367
+ y.current = !1;
368
+ const v = H(f.current);
369
+ if (!h.current || !f.current || "clientX" in l && $e(l, v))
370
+ return;
371
+ if (C.current) {
372
+ C.current = !1;
373
+ return;
374
+ }
375
+ let s;
376
+ l.composedPath ? s = l.composedPath().includes(f.current) : s = !v.documentElement.contains(
377
+ // @ts-expect-error returns `false` as intended when not dispatched from a Node
378
+ l.target
379
+ ) || f.current.contains(
380
+ // @ts-expect-error returns `false` as intended when not dispatched from a Node
381
+ l.target
382
+ ), !s && (r || !i) && u(l);
383
+ }), k = (l) => (i) => {
384
+ y.current = !0;
385
+ const v = t.props[l];
386
+ v && v(i);
387
+ }, S = {
388
+ ref: g
389
+ };
390
+ return p !== !1 && (S[p] = k(p)), b.useEffect(() => {
391
+ if (p !== !1) {
392
+ const l = oe(p), i = H(f.current), v = () => {
393
+ C.current = !0;
394
+ };
395
+ return i.addEventListener(l, m), i.addEventListener("touchmove", v), () => {
396
+ i.removeEventListener(l, m), i.removeEventListener("touchmove", v);
397
+ };
398
+ }
399
+ }, [m, p]), n !== !1 && (S[n] = k(n)), b.useEffect(() => {
400
+ if (n !== !1) {
401
+ const l = oe(n), i = H(f.current);
402
+ return i.addEventListener(l, m), () => {
403
+ i.removeEventListener(l, m);
404
+ };
405
+ }
406
+ }, [m, n]), /* @__PURE__ */ a(b.Fragment, {
407
+ children: /* @__PURE__ */ b.cloneElement(t, S)
408
+ });
409
+ }
410
+ process.env.NODE_ENV !== "production" && (I.propTypes = {
411
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
412
+ // │ These PropTypes are generated from the TypeScript type definitions. │
413
+ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
414
+ // └─────────────────────────────────────────────────────────────────────┘
415
+ /**
416
+ * The wrapped element.
417
+ */
418
+ children: Te.isRequired,
419
+ /**
420
+ * If `true`, the React tree is ignored and only the DOM tree is considered.
421
+ * This prop changes how portaled elements are handled.
422
+ * @default false
423
+ */
424
+ disableReactTree: e.bool,
425
+ /**
426
+ * The mouse event to listen to. You can disable the listener by providing `false`.
427
+ * @default 'onClick'
428
+ */
429
+ mouseEvent: e.oneOf(["onClick", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerUp", !1]),
430
+ /**
431
+ * Callback fired when a "click away" event is detected.
432
+ */
433
+ onClickAway: e.func.isRequired,
434
+ /**
435
+ * The touch event to listen to. You can disable the listener by providing `false`.
436
+ * @default 'onTouchEnd'
437
+ */
438
+ touchEvent: e.oneOf(["onTouchEnd", "onTouchStart", !1])
439
+ });
440
+ process.env.NODE_ENV !== "production" && (I.propTypes = Re(I.propTypes));
441
+ function He(o = {}) {
442
+ const {
443
+ autoHideDuration: t = null,
444
+ disableWindowBlurListener: r = !1,
445
+ onClose: n,
446
+ open: u,
447
+ resumeHideDuration: p
448
+ } = o, C = Ce();
449
+ b.useEffect(() => {
450
+ if (!u)
451
+ return;
452
+ function s(c) {
453
+ c.defaultPrevented || c.key === "Escape" && (n == null || n(c, "escapeKeyDown"));
454
+ }
455
+ return document.addEventListener("keydown", s), () => {
456
+ document.removeEventListener("keydown", s);
457
+ };
458
+ }, [u, n]);
459
+ const f = W((s, c) => {
460
+ n == null || n(s, c);
461
+ }), h = W((s) => {
462
+ !n || s == null || C.start(s, () => {
463
+ f(null, "timeout");
464
+ });
465
+ });
466
+ b.useEffect(() => (u && h(t), C.clear), [u, t, h, C]);
467
+ const y = (s) => {
468
+ n == null || n(s, "clickaway");
469
+ }, g = C.clear, m = b.useCallback(() => {
470
+ t != null && h(p ?? t * 0.5);
471
+ }, [t, p, h]), k = (s) => (c) => {
472
+ const d = s.onBlur;
473
+ d == null || d(c), m();
474
+ }, S = (s) => (c) => {
475
+ const d = s.onFocus;
476
+ d == null || d(c), g();
477
+ }, l = (s) => (c) => {
478
+ const d = s.onMouseEnter;
479
+ d == null || d(c), g();
480
+ }, i = (s) => (c) => {
481
+ const d = s.onMouseLeave;
482
+ d == null || d(c), m();
483
+ };
484
+ return b.useEffect(() => {
485
+ if (!r && u)
486
+ return window.addEventListener("focus", m), window.addEventListener("blur", g), () => {
487
+ window.removeEventListener("focus", m), window.removeEventListener("blur", g);
488
+ };
489
+ }, [r, u, m, g]), {
490
+ getRootProps: (s = {}) => {
491
+ const c = {
492
+ ...Y(o),
493
+ ...Y(s)
494
+ };
495
+ return {
496
+ // ClickAwayListener adds an `onClick` prop which results in the alert not being announced.
497
+ // See https://github.com/mui/material-ui/issues/29080
498
+ role: "presentation",
499
+ ...s,
500
+ ...c,
501
+ onBlur: k(c),
502
+ onFocus: S(c),
503
+ onMouseEnter: l(c),
504
+ onMouseLeave: i(c)
505
+ };
506
+ },
507
+ onClickAway: y
508
+ };
509
+ }
510
+ function We(o) {
511
+ return F("MuiSnackbarContent", o);
512
+ }
513
+ U("MuiSnackbarContent", ["root", "message", "action"]);
514
+ const Fe = (o) => {
515
+ const {
516
+ classes: t
517
+ } = o;
518
+ return q({
519
+ root: ["root"],
520
+ action: ["action"],
521
+ message: ["message"]
522
+ }, We, t);
523
+ }, Ue = O(re, {
524
+ name: "MuiSnackbarContent",
525
+ slot: "Root",
526
+ overridesResolver: (o, t) => t.root
527
+ })(V(({
528
+ theme: o
529
+ }) => {
530
+ const t = o.palette.mode === "light" ? 0.8 : 0.98, r = be(o.palette.background.default, t);
531
+ return {
532
+ ...o.typography.body2,
533
+ color: o.vars ? o.vars.palette.SnackbarContent.color : o.palette.getContrastText(r),
534
+ backgroundColor: o.vars ? o.vars.palette.SnackbarContent.bg : r,
535
+ display: "flex",
536
+ alignItems: "center",
537
+ flexWrap: "wrap",
538
+ padding: "6px 16px",
539
+ borderRadius: (o.vars || o).shape.borderRadius,
540
+ flexGrow: 1,
541
+ [o.breakpoints.up("sm")]: {
542
+ flexGrow: "initial",
543
+ minWidth: 288
544
+ }
545
+ };
546
+ })), Ve = O("div", {
547
+ name: "MuiSnackbarContent",
548
+ slot: "Message",
549
+ overridesResolver: (o, t) => t.message
550
+ })({
551
+ padding: "8px 0"
552
+ }), _e = O("div", {
553
+ name: "MuiSnackbarContent",
554
+ slot: "Action",
555
+ overridesResolver: (o, t) => t.action
556
+ })({
557
+ display: "flex",
558
+ alignItems: "center",
559
+ marginLeft: "auto",
560
+ paddingLeft: 16,
561
+ marginRight: -8
562
+ }), ie = /* @__PURE__ */ b.forwardRef(function(t, r) {
563
+ const n = _({
564
+ props: t,
565
+ name: "MuiSnackbarContent"
566
+ }), {
567
+ action: u,
568
+ className: p,
569
+ message: C,
570
+ role: f = "alert",
571
+ ...h
572
+ } = n, y = n, g = Fe(y);
573
+ return /* @__PURE__ */ ne(Ue, {
574
+ role: f,
575
+ square: !0,
576
+ elevation: 6,
577
+ className: se(g.root, p),
578
+ ownerState: y,
579
+ ref: r,
580
+ ...h,
581
+ children: [/* @__PURE__ */ a(Ve, {
582
+ className: g.message,
583
+ ownerState: y,
584
+ children: C
585
+ }), u ? /* @__PURE__ */ a(_e, {
586
+ className: g.action,
587
+ ownerState: y,
588
+ children: u
589
+ }) : null]
590
+ });
591
+ });
592
+ process.env.NODE_ENV !== "production" && (ie.propTypes = {
593
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
594
+ // │ These PropTypes are generated from the TypeScript type definitions. │
595
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
596
+ // └─────────────────────────────────────────────────────────────────────┘
597
+ /**
598
+ * The action to display. It renders after the message, at the end of the snackbar.
599
+ */
600
+ action: e.node,
601
+ /**
602
+ * Override or extend the styles applied to the component.
603
+ */
604
+ classes: e.object,
605
+ /**
606
+ * @ignore
607
+ */
608
+ className: e.string,
609
+ /**
610
+ * The message to display.
611
+ */
612
+ message: e.node,
613
+ /**
614
+ * The ARIA role attribute of the element.
615
+ * @default 'alert'
616
+ */
617
+ role: e.string,
618
+ /**
619
+ * The system prop that allows defining system overrides as well as additional CSS styles.
620
+ */
621
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
622
+ });
623
+ function qe(o) {
624
+ return F("MuiSnackbar", o);
625
+ }
626
+ U("MuiSnackbar", ["root", "anchorOriginTopCenter", "anchorOriginBottomCenter", "anchorOriginTopRight", "anchorOriginBottomRight", "anchorOriginTopLeft", "anchorOriginBottomLeft"]);
627
+ const Ge = (o) => {
628
+ const {
629
+ classes: t,
630
+ anchorOrigin: r
631
+ } = o, n = {
632
+ root: ["root", `anchorOrigin${T(r.vertical)}${T(r.horizontal)}`]
633
+ };
634
+ return q(n, qe, t);
635
+ }, te = O("div", {
636
+ name: "MuiSnackbar",
637
+ slot: "Root",
638
+ overridesResolver: (o, t) => {
639
+ const {
640
+ ownerState: r
641
+ } = o;
642
+ return [t.root, t[`anchorOrigin${T(r.anchorOrigin.vertical)}${T(r.anchorOrigin.horizontal)}`]];
643
+ }
644
+ })(V(({
645
+ theme: o
646
+ }) => ({
647
+ zIndex: (o.vars || o).zIndex.snackbar,
648
+ position: "fixed",
649
+ display: "flex",
650
+ left: 8,
651
+ right: 8,
652
+ justifyContent: "center",
653
+ alignItems: "center",
654
+ variants: [{
655
+ props: ({
656
+ ownerState: t
657
+ }) => t.anchorOrigin.vertical === "top",
658
+ style: {
659
+ top: 8,
660
+ [o.breakpoints.up("sm")]: {
661
+ top: 24
662
+ }
663
+ }
664
+ }, {
665
+ props: ({
666
+ ownerState: t
667
+ }) => t.anchorOrigin.vertical !== "top",
668
+ style: {
669
+ bottom: 8,
670
+ [o.breakpoints.up("sm")]: {
671
+ bottom: 24
672
+ }
673
+ }
674
+ }, {
675
+ props: ({
676
+ ownerState: t
677
+ }) => t.anchorOrigin.horizontal === "left",
678
+ style: {
679
+ justifyContent: "flex-start",
680
+ [o.breakpoints.up("sm")]: {
681
+ left: 24,
682
+ right: "auto"
683
+ }
684
+ }
685
+ }, {
686
+ props: ({
687
+ ownerState: t
688
+ }) => t.anchorOrigin.horizontal === "right",
689
+ style: {
690
+ justifyContent: "flex-end",
691
+ [o.breakpoints.up("sm")]: {
692
+ right: 24,
693
+ left: "auto"
694
+ }
695
+ }
696
+ }, {
697
+ props: ({
698
+ ownerState: t
699
+ }) => t.anchorOrigin.horizontal === "center",
700
+ style: {
701
+ [o.breakpoints.up("sm")]: {
702
+ left: "50%",
703
+ right: "auto",
704
+ transform: "translateX(-50%)"
705
+ }
706
+ }
707
+ }]
708
+ }))), ce = /* @__PURE__ */ b.forwardRef(function(t, r) {
709
+ const n = _({
710
+ props: t,
711
+ name: "MuiSnackbar"
712
+ }), u = Se(), p = {
713
+ enter: u.transitions.duration.enteringScreen,
714
+ exit: u.transitions.duration.leavingScreen
715
+ }, {
716
+ action: C,
717
+ anchorOrigin: {
718
+ vertical: f,
719
+ horizontal: h
720
+ } = {
721
+ vertical: "bottom",
722
+ horizontal: "left"
723
+ },
724
+ autoHideDuration: y = null,
725
+ children: g,
726
+ className: m,
727
+ ClickAwayListenerProps: k,
728
+ ContentProps: S,
729
+ disableWindowBlurListener: l = !1,
730
+ message: i,
731
+ onBlur: v,
732
+ onClose: s,
733
+ onFocus: c,
734
+ onMouseEnter: d,
735
+ onMouseLeave: w,
736
+ open: E,
737
+ resumeHideDuration: D,
738
+ TransitionComponent: A = we,
739
+ transitionDuration: x = p,
740
+ TransitionProps: {
741
+ onEnter: L,
742
+ onExited: P,
743
+ ...le
744
+ } = {},
745
+ ...ue
746
+ } = n, N = {
747
+ ...n,
748
+ anchorOrigin: {
749
+ vertical: f,
750
+ horizontal: h
751
+ },
752
+ autoHideDuration: y,
753
+ disableWindowBlurListener: l,
754
+ TransitionComponent: A,
755
+ transitionDuration: x
756
+ }, pe = Ge(N), {
757
+ getRootProps: de,
758
+ onClickAway: fe
759
+ } = He({
760
+ ...N
761
+ }), [ge, G] = b.useState(!0), me = ke({
762
+ elementType: te,
763
+ getSlotProps: de,
764
+ externalForwardedProps: ue,
765
+ ownerState: N,
766
+ additionalProps: {
767
+ ref: r
768
+ },
769
+ className: [pe.root, m]
770
+ }), ve = (B) => {
771
+ G(!0), P && P(B);
772
+ }, he = (B, ye) => {
773
+ G(!1), L && L(B, ye);
774
+ };
775
+ return !E && ge ? null : /* @__PURE__ */ a(I, {
776
+ onClickAway: fe,
777
+ ...k,
778
+ children: /* @__PURE__ */ a(te, {
779
+ ...me,
780
+ children: /* @__PURE__ */ a(A, {
781
+ appear: !0,
782
+ in: E,
783
+ timeout: x,
784
+ direction: f === "top" ? "down" : "up",
785
+ onEnter: he,
786
+ onExited: ve,
787
+ ...le,
788
+ children: g || /* @__PURE__ */ a(ie, {
789
+ message: i,
790
+ action: C,
791
+ ...S
792
+ })
793
+ })
794
+ })
795
+ });
796
+ });
797
+ process.env.NODE_ENV !== "production" && (ce.propTypes = {
798
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
799
+ // │ These PropTypes are generated from the TypeScript type definitions. │
800
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
801
+ // └─────────────────────────────────────────────────────────────────────┘
802
+ /**
803
+ * The action to display. It renders after the message, at the end of the snackbar.
804
+ */
805
+ action: e.node,
806
+ /**
807
+ * The anchor of the `Snackbar`.
808
+ * On smaller screens, the component grows to occupy all the available width,
809
+ * the horizontal alignment is ignored.
810
+ * @default { vertical: 'bottom', horizontal: 'left' }
811
+ */
812
+ anchorOrigin: e.shape({
813
+ horizontal: e.oneOf(["center", "left", "right"]).isRequired,
814
+ vertical: e.oneOf(["bottom", "top"]).isRequired
815
+ }),
816
+ /**
817
+ * The number of milliseconds to wait before automatically calling the
818
+ * `onClose` function. `onClose` should then set the state of the `open`
819
+ * prop to hide the Snackbar. This behavior is disabled by default with
820
+ * the `null` value.
821
+ * @default null
822
+ */
823
+ autoHideDuration: e.number,
824
+ /**
825
+ * Replace the `SnackbarContent` component.
826
+ */
827
+ children: e.element,
828
+ /**
829
+ * Override or extend the styles applied to the component.
830
+ */
831
+ classes: e.object,
832
+ /**
833
+ * @ignore
834
+ */
835
+ className: e.string,
836
+ /**
837
+ * Props applied to the `ClickAwayListener` element.
838
+ */
839
+ ClickAwayListenerProps: e.object,
840
+ /**
841
+ * Props applied to the [`SnackbarContent`](https://mui.com/material-ui/api/snackbar-content/) element.
842
+ */
843
+ ContentProps: e.object,
844
+ /**
845
+ * If `true`, the `autoHideDuration` timer will expire even if the window is not focused.
846
+ * @default false
847
+ */
848
+ disableWindowBlurListener: e.bool,
849
+ /**
850
+ * When displaying multiple consecutive snackbars using a single parent-rendered
851
+ * `<Snackbar/>`, add the `key` prop to ensure independent treatment of each message.
852
+ * For instance, use `<Snackbar key={message} />`. Otherwise, messages might update
853
+ * in place, and features like `autoHideDuration` could be affected.
854
+ */
855
+ key: () => null,
856
+ /**
857
+ * The message to display.
858
+ */
859
+ message: e.node,
860
+ /**
861
+ * @ignore
862
+ */
863
+ onBlur: e.func,
864
+ /**
865
+ * Callback fired when the component requests to be closed.
866
+ * Typically `onClose` is used to set state in the parent component,
867
+ * which is used to control the `Snackbar` `open` prop.
868
+ * The `reason` parameter can optionally be used to control the response to `onClose`,
869
+ * for example ignoring `clickaway`.
870
+ *
871
+ * @param {React.SyntheticEvent<any> | Event} event The event source of the callback.
872
+ * @param {string} reason Can be: `"timeout"` (`autoHideDuration` expired), `"clickaway"`, or `"escapeKeyDown"`.
873
+ */
874
+ onClose: e.func,
875
+ /**
876
+ * @ignore
877
+ */
878
+ onFocus: e.func,
879
+ /**
880
+ * @ignore
881
+ */
882
+ onMouseEnter: e.func,
883
+ /**
884
+ * @ignore
885
+ */
886
+ onMouseLeave: e.func,
887
+ /**
888
+ * If `true`, the component is shown.
889
+ */
890
+ open: e.bool,
891
+ /**
892
+ * The number of milliseconds to wait before dismissing after user interaction.
893
+ * If `autoHideDuration` prop isn't specified, it does nothing.
894
+ * If `autoHideDuration` prop is specified but `resumeHideDuration` isn't,
895
+ * we default to `autoHideDuration / 2` ms.
896
+ */
897
+ resumeHideDuration: e.number,
898
+ /**
899
+ * The system prop that allows defining system overrides as well as additional CSS styles.
900
+ */
901
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
902
+ /**
903
+ * The component used for the transition.
904
+ * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
905
+ * @default Grow
906
+ */
907
+ TransitionComponent: e.elementType,
908
+ /**
909
+ * The duration for the transition, in milliseconds.
910
+ * You may specify a single timeout for all transitions, or individually with an object.
911
+ * @default {
912
+ * enter: theme.transitions.duration.enteringScreen,
913
+ * exit: theme.transitions.duration.leavingScreen,
914
+ * }
915
+ */
916
+ transitionDuration: e.oneOfType([e.number, e.shape({
917
+ appear: e.number,
918
+ enter: e.number,
919
+ exit: e.number
920
+ })]),
921
+ /**
922
+ * Props applied to the transition element.
923
+ * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
924
+ * @default {}
925
+ */
926
+ TransitionProps: e.object
927
+ });
928
+ const Xe = (o) => /* @__PURE__ */ a(z, { ...o, direction: "left" }), Ke = (o) => /* @__PURE__ */ a(z, { ...o, direction: "right" }), Ze = (o) => /* @__PURE__ */ a(z, { ...o, direction: "up" }), Ye = (o) => /* @__PURE__ */ a(z, { ...o, direction: "down" }), fo = () => {
929
+ const [o, t] = R(!1), [r, n] = R(""), [u, p] = R(2e3), [C, f] = R("error"), [h, y] = R({ vertical: "top", horizontal: "right" }), [g, m] = R("left"), k = j(
930
+ ({
931
+ message: i,
932
+ type: v = "error",
933
+ duration: s = 3e3,
934
+ animationDirection: c = "left",
935
+ position: d = { vertical: "top", horizontal: "right" }
936
+ }) => {
937
+ n(i), f(v), p(s), y(d), m(c), t(!0);
938
+ },
939
+ []
940
+ ), S = j(
941
+ (i, v) => {
942
+ v !== "clickaway" && t(!1);
943
+ },
944
+ []
945
+ ), l = j(
946
+ (i, v) => {
947
+ v !== "clickaway" && t(!1);
948
+ },
949
+ []
950
+ );
951
+ return {
952
+ showAlertMessage: k,
953
+ snackBar: /* @__PURE__ */ a(
954
+ ce,
955
+ {
956
+ anchorOrigin: h,
957
+ autoHideDuration: u,
958
+ open: o,
959
+ onClose: l,
960
+ TransitionComponent: g === "left" ? Xe : g === "right" ? Ke : g === "up" ? Ze : Ye,
961
+ children: /* @__PURE__ */ a(ae, { variant: "filled", onClose: S, severity: C, children: /* @__PURE__ */ a("div", { dangerouslySetInnerHTML: { __html: r } }) })
962
+ }
963
+ )
964
+ };
965
+ };
966
+ export {
967
+ fo as useSnackBar
968
+ };