sevago-sso-fe 1.0.11 → 1.0.13

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.
package/dist/index.esm.js CHANGED
@@ -3,12 +3,13 @@ import { createAsyncThunk, createSlice, configureStore, combineReducers } from "
3
3
  import { useDispatch, useSelector } from "react-redux";
4
4
  import * as React from "react";
5
5
  import React__default, { useMemo, useState, createContext, useContext, useEffect, useCallback, forwardRef, useImperativeHandle, createElement, Children, useRef, useLayoutEffect, Fragment as Fragment$1, useId, useInsertionEffect, Component as Component$1 } from "react";
6
- import { useLocation, useNavigate, Outlet, Route, Navigate } from "react-router-dom";
6
+ import { useLocation, useNavigate, Outlet, Link, Route, Navigate } from "react-router-dom";
7
7
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
8
- import { Stack as Stack$1, styled as styled$2, TableCell, tableCellClasses, LinearProgress, linearProgressClasses, useTheme as useTheme$2, Skeleton, Box, Icon, Tooltip, tooltipClasses, Avatar, Typography, ClickAwayListener, Fade, Badge, List, ListItem, FormControl, InputLabel, RadioGroup, FormControlLabel, Radio, Menu, Divider, MenuItem, Button, IconButton, TextField, InputAdornment } from "@mui/material";
8
+ import { Alert, Stack as Stack$1, styled as styled$2, TableCell, tableCellClasses, LinearProgress, linearProgressClasses, useTheme as useTheme$2, Skeleton, Box, Icon, Tooltip, tooltipClasses, Avatar, Typography, ClickAwayListener as ClickAwayListener$1, Fade, Badge, List, ListItem, FormControl, InputLabel, RadioGroup, FormControlLabel, Radio, Menu, Divider, MenuItem, Button, IconButton, TextField, InputAdornment } from "@mui/material";
9
9
  import { unstable_createGetCssVar, createSpacing as createSpacing$1, useTheme as useTheme$1, unstable_memoTheme, Stack as Stack$2, css, keyframes as keyframes$1 } from "@mui/system";
10
10
  import emStyled from "@emotion/styled";
11
11
  import "@emotion/react";
12
+ import ReactDOM from "react-dom";
12
13
  const accountActions = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
13
14
  __proto__: null,
14
15
  get changeNotificationCount() {
@@ -450,7 +451,7 @@ const toObjectSet = (arrayOrString, delimiter) => {
450
451
  isArray$1(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
451
452
  return obj;
452
453
  };
453
- const noop$1 = () => {
454
+ const noop$2 = () => {
454
455
  };
455
456
  const toFiniteNumber = (value2, defaultValue) => {
456
457
  return value2 != null && Number.isFinite(value2 = +value2) ? value2 : defaultValue;
@@ -553,7 +554,7 @@ const utils$1 = {
553
554
  freezeMethods,
554
555
  toObjectSet,
555
556
  toCamelCase,
556
- noop: noop$1,
557
+ noop: noop$2,
557
558
  toFiniteNumber,
558
559
  findKey,
559
560
  global: _global,
@@ -566,7 +567,7 @@ const utils$1 = {
566
567
  asap,
567
568
  isIterable
568
569
  };
569
- function AxiosError$1(message, code, config, request, response) {
570
+ function AxiosError$1(message, code, config2, request, response) {
570
571
  Error.call(this);
571
572
  if (Error.captureStackTrace) {
572
573
  Error.captureStackTrace(this, this.constructor);
@@ -576,7 +577,7 @@ function AxiosError$1(message, code, config, request, response) {
576
577
  this.message = message;
577
578
  this.name = "AxiosError";
578
579
  code && (this.code = code);
579
- config && (this.config = config);
580
+ config2 && (this.config = config2);
580
581
  request && (this.request = request);
581
582
  if (response) {
582
583
  this.response = response;
@@ -625,7 +626,7 @@ const descriptors = {};
625
626
  });
626
627
  Object.defineProperties(AxiosError$1, descriptors);
627
628
  Object.defineProperty(prototype$1, "isAxiosError", { value: true });
628
- AxiosError$1.from = (error, code, config, request, response, customProps) => {
629
+ AxiosError$1.from = (error, code, config2, request, response, customProps) => {
629
630
  const axiosError = Object.create(prototype$1);
630
631
  utils$1.toFlatObject(error, axiosError, function filter3(obj) {
631
632
  return obj !== Error.prototype;
@@ -634,7 +635,7 @@ AxiosError$1.from = (error, code, config, request, response, customProps) => {
634
635
  });
635
636
  const msg = error && error.message ? error.message : "Error";
636
637
  const errCode = code == null && error ? error.code : code;
637
- AxiosError$1.call(axiosError, msg, errCode, config, request, response);
638
+ AxiosError$1.call(axiosError, msg, errCode, config2, request, response);
638
639
  if (error && axiosError.cause == null) {
639
640
  Object.defineProperty(axiosError, "cause", { value: error, configurable: true });
640
641
  }
@@ -1350,12 +1351,12 @@ utils$1.reduceDescriptors(AxiosHeaders$1.prototype, ({ value: value2 }, key) =>
1350
1351
  });
1351
1352
  utils$1.freezeMethods(AxiosHeaders$1);
1352
1353
  function transformData(fns, response) {
1353
- const config = this || defaults;
1354
- const context = response || config;
1354
+ const config2 = this || defaults;
1355
+ const context = response || config2;
1355
1356
  const headers = AxiosHeaders$1.from(context.headers);
1356
1357
  let data = context.data;
1357
1358
  utils$1.forEach(fns, function transform(fn) {
1358
- data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
1359
+ data = fn.call(config2, data, headers.normalize(), response ? response.status : void 0);
1359
1360
  });
1360
1361
  headers.normalize();
1361
1362
  return data;
@@ -1363,8 +1364,8 @@ function transformData(fns, response) {
1363
1364
  function isCancel$1(value2) {
1364
1365
  return !!(value2 && value2.__CANCEL__);
1365
1366
  }
1366
- function CanceledError$1(message, config, request) {
1367
- AxiosError$1.call(this, message == null ? "canceled" : message, AxiosError$1.ERR_CANCELED, config, request);
1367
+ function CanceledError$1(message, config2, request) {
1368
+ AxiosError$1.call(this, message == null ? "canceled" : message, AxiosError$1.ERR_CANCELED, config2, request);
1368
1369
  this.name = "CanceledError";
1369
1370
  }
1370
1371
  utils$1.inherits(CanceledError$1, AxiosError$1, {
@@ -1540,7 +1541,7 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
1540
1541
  const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
1541
1542
  function mergeConfig$1(config1, config2) {
1542
1543
  config2 = config2 || {};
1543
- const config = {};
1544
+ const config3 = {};
1544
1545
  function getMergedValue(target, source, prop, caseless) {
1545
1546
  if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
1546
1547
  return utils$1.merge.call({ caseless }, target, source);
@@ -1611,15 +1612,15 @@ function mergeConfig$1(config1, config2) {
1611
1612
  utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
1612
1613
  const merge2 = mergeMap[prop] || mergeDeepProperties;
1613
1614
  const configValue = merge2(config1[prop], config2[prop], prop);
1614
- utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
1615
+ utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config3[prop] = configValue);
1615
1616
  });
1616
- return config;
1617
+ return config3;
1617
1618
  }
1618
- const resolveConfig = (config) => {
1619
- const newConfig = mergeConfig$1({}, config);
1619
+ const resolveConfig = (config2) => {
1620
+ const newConfig = mergeConfig$1({}, config2);
1620
1621
  let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
1621
1622
  newConfig.headers = headers = AxiosHeaders$1.from(headers);
1622
- newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
1623
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config2.params, config2.paramsSerializer);
1623
1624
  if (auth) {
1624
1625
  headers.set(
1625
1626
  "Authorization",
@@ -1651,9 +1652,9 @@ const resolveConfig = (config) => {
1651
1652
  return newConfig;
1652
1653
  };
1653
1654
  const isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
1654
- const xhrAdapter = isXHRAdapterSupported && function(config) {
1655
+ const xhrAdapter = isXHRAdapterSupported && function(config2) {
1655
1656
  return new Promise(function dispatchXhrRequest(resolve, reject) {
1656
- const _config = resolveConfig(config);
1657
+ const _config = resolveConfig(config2);
1657
1658
  let requestData = _config.data;
1658
1659
  const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
1659
1660
  let { responseType, onUploadProgress, onDownloadProgress } = _config;
@@ -1682,7 +1683,7 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
1682
1683
  status: request.status,
1683
1684
  statusText: request.statusText,
1684
1685
  headers: responseHeaders,
1685
- config,
1686
+ config: config2,
1686
1687
  request
1687
1688
  };
1688
1689
  settle(function _resolve(value2) {
@@ -1711,12 +1712,12 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
1711
1712
  if (!request) {
1712
1713
  return;
1713
1714
  }
1714
- reject(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, config, request));
1715
+ reject(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, config2, request));
1715
1716
  request = null;
1716
1717
  };
1717
1718
  request.onerror = function handleError(event) {
1718
1719
  const msg = event && event.message ? event.message : "Network Error";
1719
- const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
1720
+ const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config2, request);
1720
1721
  err.event = event || null;
1721
1722
  reject(err);
1722
1723
  request = null;
@@ -1730,7 +1731,7 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
1730
1731
  reject(new AxiosError$1(
1731
1732
  timeoutErrorMessage,
1732
1733
  transitional2.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
1733
- config,
1734
+ config2,
1734
1735
  request
1735
1736
  ));
1736
1737
  request = null;
@@ -1761,7 +1762,7 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
1761
1762
  if (!request) {
1762
1763
  return;
1763
1764
  }
1764
- reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
1765
+ reject(!cancel || cancel.type ? new CanceledError$1(null, config2, request) : cancel);
1765
1766
  request.abort();
1766
1767
  request = null;
1767
1768
  };
@@ -1772,15 +1773,15 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
1772
1773
  }
1773
1774
  const protocol2 = parseProtocol(_config.url);
1774
1775
  if (protocol2 && platform.protocols.indexOf(protocol2) === -1) {
1775
- reject(new AxiosError$1("Unsupported protocol " + protocol2 + ":", AxiosError$1.ERR_BAD_REQUEST, config));
1776
+ reject(new AxiosError$1("Unsupported protocol " + protocol2 + ":", AxiosError$1.ERR_BAD_REQUEST, config2));
1776
1777
  return;
1777
1778
  }
1778
1779
  request.send(requestData || null);
1779
1780
  });
1780
1781
  };
1781
- const composeSignals = (signals, timeout) => {
1782
+ const composeSignals = (signals, timeout2) => {
1782
1783
  const { length } = signals = signals ? signals.filter(Boolean) : [];
1783
- if (timeout || length) {
1784
+ if (timeout2 || length) {
1784
1785
  let controller = new AbortController();
1785
1786
  let aborted;
1786
1787
  const onabort = function(reason) {
@@ -1791,10 +1792,10 @@ const composeSignals = (signals, timeout) => {
1791
1792
  controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
1792
1793
  }
1793
1794
  };
1794
- let timer = timeout && setTimeout(() => {
1795
+ let timer = timeout2 && setTimeout(() => {
1795
1796
  timer = null;
1796
- onabort(new AxiosError$1(`timeout ${timeout} of ms exceeded`, AxiosError$1.ETIMEDOUT));
1797
- }, timeout);
1797
+ onabort(new AxiosError$1(`timeout ${timeout2} of ms exceeded`, AxiosError$1.ETIMEDOUT));
1798
+ }, timeout2);
1798
1799
  const unsubscribe = () => {
1799
1800
  if (signals) {
1800
1801
  timer && clearTimeout(timer);
@@ -1934,12 +1935,12 @@ const factory = (env) => {
1934
1935
  };
1935
1936
  isFetchSupported && (() => {
1936
1937
  ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
1937
- !resolvers[type] && (resolvers[type] = (res, config) => {
1938
+ !resolvers[type] && (resolvers[type] = (res, config2) => {
1938
1939
  let method = res && res[type];
1939
1940
  if (method) {
1940
1941
  return method.call(res);
1941
1942
  }
1942
- throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
1943
+ throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config2);
1943
1944
  });
1944
1945
  });
1945
1946
  })();
@@ -1971,24 +1972,24 @@ const factory = (env) => {
1971
1972
  const length = utils$1.toFiniteNumber(headers.getContentLength());
1972
1973
  return length == null ? getBodyLength(body) : length;
1973
1974
  };
1974
- return async (config) => {
1975
+ return async (config2) => {
1975
1976
  let {
1976
1977
  url: url2,
1977
1978
  method,
1978
1979
  data,
1979
1980
  signal,
1980
1981
  cancelToken,
1981
- timeout,
1982
+ timeout: timeout2,
1982
1983
  onDownloadProgress,
1983
1984
  onUploadProgress,
1984
1985
  responseType,
1985
1986
  headers,
1986
1987
  withCredentials = "same-origin",
1987
1988
  fetchOptions
1988
- } = resolveConfig(config);
1989
+ } = resolveConfig(config2);
1989
1990
  let _fetch = envFetch || fetch;
1990
1991
  responseType = responseType ? (responseType + "").toLowerCase() : "text";
1991
- let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
1992
+ let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout2);
1992
1993
  let request = null;
1993
1994
  const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
1994
1995
  composedSignal.unsubscribe();
@@ -2048,7 +2049,7 @@ const factory = (env) => {
2048
2049
  );
2049
2050
  }
2050
2051
  responseType = responseType || "text";
2051
- let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config);
2052
+ let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config2);
2052
2053
  !isStreamResponse && unsubscribe && unsubscribe();
2053
2054
  return await new Promise((resolve, reject) => {
2054
2055
  settle(resolve, reject, {
@@ -2056,7 +2057,7 @@ const factory = (env) => {
2056
2057
  headers: AxiosHeaders$1.from(response.headers),
2057
2058
  status: response.status,
2058
2059
  statusText: response.statusText,
2059
- config,
2060
+ config: config2,
2060
2061
  request
2061
2062
  });
2062
2063
  });
@@ -2064,19 +2065,19 @@ const factory = (env) => {
2064
2065
  unsubscribe && unsubscribe();
2065
2066
  if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
2066
2067
  throw Object.assign(
2067
- new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config, request),
2068
+ new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config2, request),
2068
2069
  {
2069
2070
  cause: err.cause || err
2070
2071
  }
2071
2072
  );
2072
2073
  }
2073
- throw AxiosError$1.from(err, err && err.code, config, request);
2074
+ throw AxiosError$1.from(err, err && err.code, config2, request);
2074
2075
  }
2075
2076
  };
2076
2077
  };
2077
2078
  const seedCache = /* @__PURE__ */ new Map();
2078
- const getFetch = (config) => {
2079
- let env = config ? config.env : {};
2079
+ const getFetch = (config2) => {
2080
+ let env = config2 ? config2.env : {};
2080
2081
  const { fetch: fetch2, Request: Request2, Response } = env;
2081
2082
  const seeds = [
2082
2083
  Request2,
@@ -2112,7 +2113,7 @@ utils$1.forEach(knownAdapters, (fn, value2) => {
2112
2113
  const renderReason = (reason) => `- ${reason}`;
2113
2114
  const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
2114
2115
  const adapters = {
2115
- getAdapter: (adapters2, config) => {
2116
+ getAdapter: (adapters2, config2) => {
2116
2117
  adapters2 = utils$1.isArray(adapters2) ? adapters2 : [adapters2];
2117
2118
  const { length } = adapters2;
2118
2119
  let nameOrAdapter;
@@ -2128,7 +2129,7 @@ const adapters = {
2128
2129
  throw new AxiosError$1(`Unknown adapter '${id2}'`);
2129
2130
  }
2130
2131
  }
2131
- if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
2132
+ if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config2)))) {
2132
2133
  break;
2133
2134
  }
2134
2135
  rejectedReasons[id2 || "#" + i] = adapter;
@@ -2147,41 +2148,41 @@ const adapters = {
2147
2148
  },
2148
2149
  adapters: knownAdapters
2149
2150
  };
2150
- function throwIfCancellationRequested(config) {
2151
- if (config.cancelToken) {
2152
- config.cancelToken.throwIfRequested();
2151
+ function throwIfCancellationRequested(config2) {
2152
+ if (config2.cancelToken) {
2153
+ config2.cancelToken.throwIfRequested();
2153
2154
  }
2154
- if (config.signal && config.signal.aborted) {
2155
- throw new CanceledError$1(null, config);
2155
+ if (config2.signal && config2.signal.aborted) {
2156
+ throw new CanceledError$1(null, config2);
2156
2157
  }
2157
2158
  }
2158
- function dispatchRequest(config) {
2159
- throwIfCancellationRequested(config);
2160
- config.headers = AxiosHeaders$1.from(config.headers);
2161
- config.data = transformData.call(
2162
- config,
2163
- config.transformRequest
2159
+ function dispatchRequest(config2) {
2160
+ throwIfCancellationRequested(config2);
2161
+ config2.headers = AxiosHeaders$1.from(config2.headers);
2162
+ config2.data = transformData.call(
2163
+ config2,
2164
+ config2.transformRequest
2164
2165
  );
2165
- if (["post", "put", "patch"].indexOf(config.method) !== -1) {
2166
- config.headers.setContentType("application/x-www-form-urlencoded", false);
2166
+ if (["post", "put", "patch"].indexOf(config2.method) !== -1) {
2167
+ config2.headers.setContentType("application/x-www-form-urlencoded", false);
2167
2168
  }
2168
- const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);
2169
- return adapter(config).then(function onAdapterResolution(response) {
2170
- throwIfCancellationRequested(config);
2169
+ const adapter = adapters.getAdapter(config2.adapter || defaults.adapter, config2);
2170
+ return adapter(config2).then(function onAdapterResolution(response) {
2171
+ throwIfCancellationRequested(config2);
2171
2172
  response.data = transformData.call(
2172
- config,
2173
- config.transformResponse,
2173
+ config2,
2174
+ config2.transformResponse,
2174
2175
  response
2175
2176
  );
2176
2177
  response.headers = AxiosHeaders$1.from(response.headers);
2177
2178
  return response;
2178
2179
  }, function onAdapterRejection(reason) {
2179
2180
  if (!isCancel$1(reason)) {
2180
- throwIfCancellationRequested(config);
2181
+ throwIfCancellationRequested(config2);
2181
2182
  if (reason && reason.response) {
2182
2183
  reason.response.data = transformData.call(
2183
- config,
2184
- config.transformResponse,
2184
+ config2,
2185
+ config2.transformResponse,
2185
2186
  reason.response
2186
2187
  );
2187
2188
  reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
@@ -2249,11 +2250,11 @@ function assertOptions(options, schema, allowUnknown) {
2249
2250
  }
2250
2251
  }
2251
2252
  }
2252
- const validator = {
2253
+ const validator$1 = {
2253
2254
  assertOptions,
2254
2255
  validators: validators$1
2255
2256
  };
2256
- const validators = validator.validators;
2257
+ const validators = validator$1.validators;
2257
2258
  let Axios$1 = class Axios {
2258
2259
  constructor(instanceConfig) {
2259
2260
  this.defaults = instanceConfig || {};
@@ -2270,9 +2271,9 @@ let Axios$1 = class Axios {
2270
2271
  *
2271
2272
  * @returns {Promise} The Promise to be fulfilled
2272
2273
  */
2273
- async request(configOrUrl, config) {
2274
+ async request(configOrUrl, config2) {
2274
2275
  try {
2275
- return await this._request(configOrUrl, config);
2276
+ return await this._request(configOrUrl, config2);
2276
2277
  } catch (err) {
2277
2278
  if (err instanceof Error) {
2278
2279
  let dummy = {};
@@ -2290,17 +2291,17 @@ let Axios$1 = class Axios {
2290
2291
  throw err;
2291
2292
  }
2292
2293
  }
2293
- _request(configOrUrl, config) {
2294
+ _request(configOrUrl, config2) {
2294
2295
  if (typeof configOrUrl === "string") {
2295
- config = config || {};
2296
- config.url = configOrUrl;
2296
+ config2 = config2 || {};
2297
+ config2.url = configOrUrl;
2297
2298
  } else {
2298
- config = configOrUrl || {};
2299
+ config2 = configOrUrl || {};
2299
2300
  }
2300
- config = mergeConfig$1(this.defaults, config);
2301
- const { transitional: transitional2, paramsSerializer, headers } = config;
2301
+ config2 = mergeConfig$1(this.defaults, config2);
2302
+ const { transitional: transitional2, paramsSerializer, headers } = config2;
2302
2303
  if (transitional2 !== void 0) {
2303
- validator.assertOptions(transitional2, {
2304
+ validator$1.assertOptions(transitional2, {
2304
2305
  silentJSONParsing: validators.transitional(validators.boolean),
2305
2306
  forcedJSONParsing: validators.transitional(validators.boolean),
2306
2307
  clarifyTimeoutError: validators.transitional(validators.boolean)
@@ -2308,30 +2309,30 @@ let Axios$1 = class Axios {
2308
2309
  }
2309
2310
  if (paramsSerializer != null) {
2310
2311
  if (utils$1.isFunction(paramsSerializer)) {
2311
- config.paramsSerializer = {
2312
+ config2.paramsSerializer = {
2312
2313
  serialize: paramsSerializer
2313
2314
  };
2314
2315
  } else {
2315
- validator.assertOptions(paramsSerializer, {
2316
+ validator$1.assertOptions(paramsSerializer, {
2316
2317
  encode: validators.function,
2317
2318
  serialize: validators.function
2318
2319
  }, true);
2319
2320
  }
2320
2321
  }
2321
- if (config.allowAbsoluteUrls !== void 0) ;
2322
+ if (config2.allowAbsoluteUrls !== void 0) ;
2322
2323
  else if (this.defaults.allowAbsoluteUrls !== void 0) {
2323
- config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
2324
+ config2.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
2324
2325
  } else {
2325
- config.allowAbsoluteUrls = true;
2326
+ config2.allowAbsoluteUrls = true;
2326
2327
  }
2327
- validator.assertOptions(config, {
2328
+ validator$1.assertOptions(config2, {
2328
2329
  baseUrl: validators.spelling("baseURL"),
2329
2330
  withXsrfToken: validators.spelling("withXSRFToken")
2330
2331
  }, true);
2331
- config.method = (config.method || this.defaults.method || "get").toLowerCase();
2332
+ config2.method = (config2.method || this.defaults.method || "get").toLowerCase();
2332
2333
  let contextHeaders = headers && utils$1.merge(
2333
2334
  headers.common,
2334
- headers[config.method]
2335
+ headers[config2.method]
2335
2336
  );
2336
2337
  headers && utils$1.forEach(
2337
2338
  ["delete", "get", "head", "post", "put", "patch", "common"],
@@ -2339,11 +2340,11 @@ let Axios$1 = class Axios {
2339
2340
  delete headers[method];
2340
2341
  }
2341
2342
  );
2342
- config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
2343
+ config2.headers = AxiosHeaders$1.concat(contextHeaders, headers);
2343
2344
  const requestInterceptorChain = [];
2344
2345
  let synchronousRequestInterceptors = true;
2345
2346
  this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
2346
- if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) {
2347
+ if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config2) === false) {
2347
2348
  return;
2348
2349
  }
2349
2350
  synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
@@ -2361,14 +2362,14 @@ let Axios$1 = class Axios {
2361
2362
  chain.unshift(...requestInterceptorChain);
2362
2363
  chain.push(...responseInterceptorChain);
2363
2364
  len = chain.length;
2364
- promise = Promise.resolve(config);
2365
+ promise = Promise.resolve(config2);
2365
2366
  while (i < len) {
2366
2367
  promise = promise.then(chain[i++], chain[i++]);
2367
2368
  }
2368
2369
  return promise;
2369
2370
  }
2370
2371
  len = requestInterceptorChain.length;
2371
- let newConfig = config;
2372
+ let newConfig = config2;
2372
2373
  while (i < len) {
2373
2374
  const onFulfilled = requestInterceptorChain[i++];
2374
2375
  const onRejected = requestInterceptorChain[i++];
@@ -2391,25 +2392,25 @@ let Axios$1 = class Axios {
2391
2392
  }
2392
2393
  return promise;
2393
2394
  }
2394
- getUri(config) {
2395
- config = mergeConfig$1(this.defaults, config);
2396
- const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
2397
- return buildURL(fullPath, config.params, config.paramsSerializer);
2395
+ getUri(config2) {
2396
+ config2 = mergeConfig$1(this.defaults, config2);
2397
+ const fullPath = buildFullPath(config2.baseURL, config2.url, config2.allowAbsoluteUrls);
2398
+ return buildURL(fullPath, config2.params, config2.paramsSerializer);
2398
2399
  }
2399
2400
  };
2400
2401
  utils$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
2401
- Axios$1.prototype[method] = function(url2, config) {
2402
- return this.request(mergeConfig$1(config || {}, {
2402
+ Axios$1.prototype[method] = function(url2, config2) {
2403
+ return this.request(mergeConfig$1(config2 || {}, {
2403
2404
  method,
2404
2405
  url: url2,
2405
- data: (config || {}).data
2406
+ data: (config2 || {}).data
2406
2407
  }));
2407
2408
  };
2408
2409
  });
2409
2410
  utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
2410
2411
  function generateHTTPMethod(isForm) {
2411
- return function httpMethod(url2, data, config) {
2412
- return this.request(mergeConfig$1(config || {}, {
2412
+ return function httpMethod(url2, data, config2) {
2413
+ return this.request(mergeConfig$1(config2 || {}, {
2413
2414
  method,
2414
2415
  headers: isForm ? {
2415
2416
  "Content-Type": "multipart/form-data"
@@ -2451,11 +2452,11 @@ let CancelToken$1 = class CancelToken {
2451
2452
  };
2452
2453
  return promise;
2453
2454
  };
2454
- executor(function cancel(message, config, request) {
2455
+ executor(function cancel(message, config2, request) {
2455
2456
  if (token.reason) {
2456
2457
  return;
2457
2458
  }
2458
- token.reason = new CanceledError$1(message, config, request);
2459
+ token.reason = new CanceledError$1(message, config2, request);
2459
2460
  resolvePromise(token.reason);
2460
2461
  });
2461
2462
  }
@@ -3336,12 +3337,12 @@ const axiosRequest = axios.create({
3336
3337
  headers: { "Content-Type": "application/json", "X-CSRF-TOKEN": "CSRF-Token" },
3337
3338
  withCredentials: true
3338
3339
  });
3339
- axiosRequest.interceptors.request.use(async (config) => {
3340
+ axiosRequest.interceptors.request.use(async (config2) => {
3340
3341
  const { userUnitPositionId, accessToken } = store.getState().account;
3341
- if (accessToken) config.headers.Authorization = `Bearer ${accessToken}`;
3342
+ if (accessToken) config2.headers.Authorization = `Bearer ${accessToken}`;
3342
3343
  if (userUnitPositionId)
3343
- config.headers["userUnitPositionId"] = userUnitPositionId;
3344
- return config;
3344
+ config2.headers["userUnitPositionId"] = userUnitPositionId;
3345
+ return config2;
3345
3346
  });
3346
3347
  let refreshingToken = null;
3347
3348
  axiosRequest.interceptors.response.use(
@@ -4836,12 +4837,12 @@ const ERROR_FACTORY$2 = new ErrorFactory("app", "Firebase", ERRORS);
4836
4837
  * limitations under the License.
4837
4838
  */
4838
4839
  class FirebaseAppImpl {
4839
- constructor(options, config, container) {
4840
+ constructor(options, config2, container) {
4840
4841
  this._isDeleted = false;
4841
4842
  this._options = { ...options };
4842
- this._config = { ...config };
4843
- this._name = config.name;
4844
- this._automaticDataCollectionEnabled = config.automaticDataCollectionEnabled;
4843
+ this._config = { ...config2 };
4844
+ this._name = config2.name;
4845
+ this._automaticDataCollectionEnabled = config2.automaticDataCollectionEnabled;
4845
4846
  this._container = container;
4846
4847
  this.container.addComponent(new Component(
4847
4848
  "app",
@@ -4895,12 +4896,12 @@ function initializeApp(_options, rawConfig = {}) {
4895
4896
  const name3 = rawConfig;
4896
4897
  rawConfig = { name: name3 };
4897
4898
  }
4898
- const config = {
4899
+ const config2 = {
4899
4900
  name: DEFAULT_ENTRY_NAME,
4900
4901
  automaticDataCollectionEnabled: true,
4901
4902
  ...rawConfig
4902
4903
  };
4903
- const name2 = config.name;
4904
+ const name2 = config2.name;
4904
4905
  if (typeof name2 !== "string" || !name2) {
4905
4906
  throw ERROR_FACTORY$2.create("bad-app-name", {
4906
4907
  appName: String(name2)
@@ -4915,7 +4916,7 @@ function initializeApp(_options, rawConfig = {}) {
4915
4916
  }
4916
4917
  const existingApp = _apps.get(name2);
4917
4918
  if (existingApp) {
4918
- if (deepEqual(options, existingApp.options) && deepEqual(config, existingApp.config)) {
4919
+ if (deepEqual(options, existingApp.options) && deepEqual(config2, existingApp.config)) {
4919
4920
  return existingApp;
4920
4921
  } else {
4921
4922
  throw ERROR_FACTORY$2.create("duplicate-app", { appName: name2 });
@@ -4925,7 +4926,7 @@ function initializeApp(_options, rawConfig = {}) {
4925
4926
  for (const component of _components.values()) {
4926
4927
  container.addComponent(component);
4927
4928
  }
4928
- const newApp = new FirebaseAppImpl(options, config, container);
4929
+ const newApp = new FirebaseAppImpl(options, config2, container);
4929
4930
  _apps.set(name2, newApp);
4930
4931
  return newApp;
4931
4932
  }
@@ -9521,8 +9522,8 @@ class Socket2 extends Emitter {
9521
9522
  */
9522
9523
  _registerAckCallback(id2, ack) {
9523
9524
  var _a;
9524
- const timeout = (_a = this.flags.timeout) !== null && _a !== void 0 ? _a : this._opts.ackTimeout;
9525
- if (timeout === void 0) {
9525
+ const timeout2 = (_a = this.flags.timeout) !== null && _a !== void 0 ? _a : this._opts.ackTimeout;
9526
+ if (timeout2 === void 0) {
9526
9527
  this.acks[id2] = ack;
9527
9528
  return;
9528
9529
  }
@@ -9534,7 +9535,7 @@ class Socket2 extends Emitter {
9534
9535
  }
9535
9536
  }
9536
9537
  ack.call(this, new Error("operation has timed out"));
9537
- }, timeout);
9538
+ }, timeout2);
9538
9539
  const fn = (...args) => {
9539
9540
  this.io.clearTimeoutFn(timer);
9540
9541
  ack.apply(this, args);
@@ -9932,8 +9933,8 @@ class Socket2 extends Emitter {
9932
9933
  *
9933
9934
  * @returns self
9934
9935
  */
9935
- timeout(timeout) {
9936
- this.flags.timeout = timeout;
9936
+ timeout(timeout2) {
9937
+ this.flags.timeout = timeout2;
9937
9938
  return this;
9938
9939
  }
9939
9940
  /**
@@ -10254,12 +10255,12 @@ class Manager extends Emitter {
10254
10255
  };
10255
10256
  const errorSub = on(socket, "error", onError);
10256
10257
  if (false !== this._timeout) {
10257
- const timeout = this._timeout;
10258
+ const timeout2 = this._timeout;
10258
10259
  const timer = this.setTimeoutFn(() => {
10259
10260
  openSubDestroy();
10260
10261
  onError(new Error("timeout"));
10261
10262
  socket.close();
10262
- }, timeout);
10263
+ }, timeout2);
10263
10264
  if (this.opts.autoUnref) {
10264
10265
  timer.unref();
10265
10266
  }
@@ -13807,6 +13808,214 @@ function composeClasses(slots, getUtilityClass, classes = void 0) {
13807
13808
  }
13808
13809
  return output;
13809
13810
  }
13811
+ const useEnhancedEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
13812
+ function useEventCallback$1(fn) {
13813
+ const ref = React.useRef(fn);
13814
+ useEnhancedEffect(() => {
13815
+ ref.current = fn;
13816
+ });
13817
+ return React.useRef((...args) => (
13818
+ // @ts-expect-error hide `this`
13819
+ (0, ref.current)(...args)
13820
+ )).current;
13821
+ }
13822
+ const UNINITIALIZED = {};
13823
+ function useLazyRef(init, initArg) {
13824
+ const ref = React.useRef(UNINITIALIZED);
13825
+ if (ref.current === UNINITIALIZED) {
13826
+ ref.current = init(initArg);
13827
+ }
13828
+ return ref;
13829
+ }
13830
+ const EMPTY = [];
13831
+ function useOnMount(fn) {
13832
+ React.useEffect(fn, EMPTY);
13833
+ }
13834
+ class Timeout {
13835
+ static create() {
13836
+ return new Timeout();
13837
+ }
13838
+ currentId = null;
13839
+ /**
13840
+ * Executes `fn` after `delay`, clearing any previously scheduled call.
13841
+ */
13842
+ start(delay2, fn) {
13843
+ this.clear();
13844
+ this.currentId = setTimeout(() => {
13845
+ this.currentId = null;
13846
+ fn();
13847
+ }, delay2);
13848
+ }
13849
+ clear = () => {
13850
+ if (this.currentId !== null) {
13851
+ clearTimeout(this.currentId);
13852
+ this.currentId = null;
13853
+ }
13854
+ };
13855
+ disposeEffect = () => {
13856
+ return this.clear;
13857
+ };
13858
+ }
13859
+ function useTimeout() {
13860
+ const timeout2 = useLazyRef(Timeout.create).current;
13861
+ useOnMount(timeout2.disposeEffect);
13862
+ return timeout2;
13863
+ }
13864
+ function extractEventHandlers(object2, excludeKeys = []) {
13865
+ if (object2 === void 0) {
13866
+ return {};
13867
+ }
13868
+ const result = {};
13869
+ Object.keys(object2).filter((prop) => prop.match(/^on[A-Z]/) && typeof object2[prop] === "function" && !excludeKeys.includes(prop)).forEach((prop) => {
13870
+ result[prop] = object2[prop];
13871
+ });
13872
+ return result;
13873
+ }
13874
+ function useSnackbar$1(parameters = {}) {
13875
+ const {
13876
+ autoHideDuration = null,
13877
+ disableWindowBlurListener = false,
13878
+ onClose,
13879
+ open,
13880
+ resumeHideDuration
13881
+ } = parameters;
13882
+ const timerAutoHide = useTimeout();
13883
+ React.useEffect(() => {
13884
+ if (!open) {
13885
+ return void 0;
13886
+ }
13887
+ function handleKeyDown(nativeEvent) {
13888
+ if (!nativeEvent.defaultPrevented) {
13889
+ if (nativeEvent.key === "Escape") {
13890
+ onClose?.(nativeEvent, "escapeKeyDown");
13891
+ }
13892
+ }
13893
+ }
13894
+ document.addEventListener("keydown", handleKeyDown);
13895
+ return () => {
13896
+ document.removeEventListener("keydown", handleKeyDown);
13897
+ };
13898
+ }, [open, onClose]);
13899
+ const handleClose = useEventCallback$1((event, reason) => {
13900
+ onClose?.(event, reason);
13901
+ });
13902
+ const setAutoHideTimer = useEventCallback$1((autoHideDurationParam) => {
13903
+ if (!onClose || autoHideDurationParam == null) {
13904
+ return;
13905
+ }
13906
+ timerAutoHide.start(autoHideDurationParam, () => {
13907
+ handleClose(null, "timeout");
13908
+ });
13909
+ });
13910
+ React.useEffect(() => {
13911
+ if (open) {
13912
+ setAutoHideTimer(autoHideDuration);
13913
+ }
13914
+ return timerAutoHide.clear;
13915
+ }, [open, autoHideDuration, setAutoHideTimer, timerAutoHide]);
13916
+ const handleClickAway = (event) => {
13917
+ onClose?.(event, "clickaway");
13918
+ };
13919
+ const handlePause = timerAutoHide.clear;
13920
+ const handleResume = React.useCallback(() => {
13921
+ if (autoHideDuration != null) {
13922
+ setAutoHideTimer(resumeHideDuration != null ? resumeHideDuration : autoHideDuration * 0.5);
13923
+ }
13924
+ }, [autoHideDuration, resumeHideDuration, setAutoHideTimer]);
13925
+ const createHandleBlur = (otherHandlers) => (event) => {
13926
+ const onBlurCallback = otherHandlers.onBlur;
13927
+ onBlurCallback?.(event);
13928
+ handleResume();
13929
+ };
13930
+ const createHandleFocus = (otherHandlers) => (event) => {
13931
+ const onFocusCallback = otherHandlers.onFocus;
13932
+ onFocusCallback?.(event);
13933
+ handlePause();
13934
+ };
13935
+ const createMouseEnter = (otherHandlers) => (event) => {
13936
+ const onMouseEnterCallback = otherHandlers.onMouseEnter;
13937
+ onMouseEnterCallback?.(event);
13938
+ handlePause();
13939
+ };
13940
+ const createMouseLeave = (otherHandlers) => (event) => {
13941
+ const onMouseLeaveCallback = otherHandlers.onMouseLeave;
13942
+ onMouseLeaveCallback?.(event);
13943
+ handleResume();
13944
+ };
13945
+ React.useEffect(() => {
13946
+ if (!disableWindowBlurListener && open) {
13947
+ window.addEventListener("focus", handleResume);
13948
+ window.addEventListener("blur", handlePause);
13949
+ return () => {
13950
+ window.removeEventListener("focus", handleResume);
13951
+ window.removeEventListener("blur", handlePause);
13952
+ };
13953
+ }
13954
+ return void 0;
13955
+ }, [disableWindowBlurListener, open, handleResume, handlePause]);
13956
+ const getRootProps = (externalProps = {}) => {
13957
+ const externalEventHandlers = {
13958
+ ...extractEventHandlers(parameters),
13959
+ ...extractEventHandlers(externalProps)
13960
+ };
13961
+ return {
13962
+ // ClickAwayListener adds an `onClick` prop which results in the alert not being announced.
13963
+ // See https://github.com/mui/material-ui/issues/29080
13964
+ role: "presentation",
13965
+ ...externalProps,
13966
+ ...externalEventHandlers,
13967
+ onBlur: createHandleBlur(externalEventHandlers),
13968
+ onFocus: createHandleFocus(externalEventHandlers),
13969
+ onMouseEnter: createMouseEnter(externalEventHandlers),
13970
+ onMouseLeave: createMouseLeave(externalEventHandlers)
13971
+ };
13972
+ };
13973
+ return {
13974
+ getRootProps,
13975
+ onClickAway: handleClickAway
13976
+ };
13977
+ }
13978
+ function ownerDocument(node) {
13979
+ return node && node.ownerDocument || document;
13980
+ }
13981
+ function useForkRef(...refs) {
13982
+ const cleanupRef = React.useRef(void 0);
13983
+ const refEffect = React.useCallback((instance) => {
13984
+ const cleanups = refs.map((ref) => {
13985
+ if (ref == null) {
13986
+ return null;
13987
+ }
13988
+ if (typeof ref === "function") {
13989
+ const refCallback = ref;
13990
+ const refCleanup = refCallback(instance);
13991
+ return typeof refCleanup === "function" ? refCleanup : () => {
13992
+ refCallback(null);
13993
+ };
13994
+ }
13995
+ ref.current = instance;
13996
+ return () => {
13997
+ ref.current = null;
13998
+ };
13999
+ });
14000
+ return () => {
14001
+ cleanups.forEach((refCleanup) => refCleanup?.());
14002
+ };
14003
+ }, refs);
14004
+ return React.useMemo(() => {
14005
+ if (refs.every((ref) => ref == null)) {
14006
+ return null;
14007
+ }
14008
+ return (value2) => {
14009
+ if (cleanupRef.current) {
14010
+ cleanupRef.current();
14011
+ cleanupRef.current = void 0;
14012
+ }
14013
+ if (value2 != null) {
14014
+ cleanupRef.current = refEffect(value2);
14015
+ }
14016
+ };
14017
+ }, refs);
14018
+ }
13810
14019
  function chainPropTypes(propType1, propType2) {
13811
14020
  if (process.env.NODE_ENV === "production") {
13812
14021
  return () => null;
@@ -13815,6 +14024,188 @@ function chainPropTypes(propType1, propType2) {
13815
14024
  return propType1(...args) || propType2(...args);
13816
14025
  };
13817
14026
  }
14027
+ function isClassComponent(elementType) {
14028
+ const {
14029
+ prototype: prototype2 = {}
14030
+ } = elementType;
14031
+ return Boolean(prototype2.isReactComponent);
14032
+ }
14033
+ function acceptingRef(props, propName, componentName, location2, propFullName) {
14034
+ const element = props[propName];
14035
+ const safePropName = propFullName || propName;
14036
+ if (element == null || // When server-side rendering React doesn't warn either.
14037
+ // This is not an accurate check for SSR.
14038
+ // This is only in place for Emotion compat.
14039
+ // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
14040
+ typeof window === "undefined") {
14041
+ return null;
14042
+ }
14043
+ let warningHint;
14044
+ const elementType = element.type;
14045
+ if (typeof elementType === "function" && !isClassComponent(elementType)) {
14046
+ warningHint = "Did you accidentally use a plain function component for an element instead?";
14047
+ }
14048
+ if (warningHint !== void 0) {
14049
+ return new Error(`Invalid ${location2} \`${safePropName}\` supplied to \`${componentName}\`. Expected an element that can hold a ref. ${warningHint} For more information see https://mui.com/r/caveat-with-refs-guide`);
14050
+ }
14051
+ return null;
14052
+ }
14053
+ const elementAcceptingRef = chainPropTypes(PropTypes.element, acceptingRef);
14054
+ elementAcceptingRef.isRequired = chainPropTypes(PropTypes.element.isRequired, acceptingRef);
14055
+ const specialProperty = "exact-prop: ​";
14056
+ function exactProp(propTypes2) {
14057
+ if (process.env.NODE_ENV === "production") {
14058
+ return propTypes2;
14059
+ }
14060
+ return {
14061
+ ...propTypes2,
14062
+ [specialProperty]: (props) => {
14063
+ const unsupportedProps = Object.keys(props).filter((prop) => !propTypes2.hasOwnProperty(prop));
14064
+ if (unsupportedProps.length > 0) {
14065
+ return new Error(`The following props are not supported: ${unsupportedProps.map((prop) => `\`${prop}\``).join(", ")}. Please remove them.`);
14066
+ }
14067
+ return null;
14068
+ }
14069
+ };
14070
+ }
14071
+ function getReactElementRef(element) {
14072
+ if (parseInt(React.version, 10) >= 19) {
14073
+ return element?.props?.ref || null;
14074
+ }
14075
+ return element?.ref || null;
14076
+ }
14077
+ function mapEventPropToEvent(eventProp) {
14078
+ return eventProp.substring(2).toLowerCase();
14079
+ }
14080
+ function clickedRootScrollbar(event, doc) {
14081
+ return doc.documentElement.clientWidth < event.clientX || doc.documentElement.clientHeight < event.clientY;
14082
+ }
14083
+ function ClickAwayListener(props) {
14084
+ const {
14085
+ children,
14086
+ disableReactTree = false,
14087
+ mouseEvent = "onClick",
14088
+ onClickAway,
14089
+ touchEvent = "onTouchEnd"
14090
+ } = props;
14091
+ const movedRef = React.useRef(false);
14092
+ const nodeRef = React.useRef(null);
14093
+ const activatedRef = React.useRef(false);
14094
+ const syntheticEventRef = React.useRef(false);
14095
+ React.useEffect(() => {
14096
+ setTimeout(() => {
14097
+ activatedRef.current = true;
14098
+ }, 0);
14099
+ return () => {
14100
+ activatedRef.current = false;
14101
+ };
14102
+ }, []);
14103
+ const handleRef = useForkRef(getReactElementRef(children), nodeRef);
14104
+ const handleClickAway = useEventCallback$1((event) => {
14105
+ const insideReactTree = syntheticEventRef.current;
14106
+ syntheticEventRef.current = false;
14107
+ const doc = ownerDocument(nodeRef.current);
14108
+ if (!activatedRef.current || !nodeRef.current || "clientX" in event && clickedRootScrollbar(event, doc)) {
14109
+ return;
14110
+ }
14111
+ if (movedRef.current) {
14112
+ movedRef.current = false;
14113
+ return;
14114
+ }
14115
+ let insideDOM;
14116
+ if (event.composedPath) {
14117
+ insideDOM = event.composedPath().includes(nodeRef.current);
14118
+ } else {
14119
+ insideDOM = !doc.documentElement.contains(
14120
+ // @ts-expect-error returns `false` as intended when not dispatched from a Node
14121
+ event.target
14122
+ ) || nodeRef.current.contains(
14123
+ // @ts-expect-error returns `false` as intended when not dispatched from a Node
14124
+ event.target
14125
+ );
14126
+ }
14127
+ if (!insideDOM && (disableReactTree || !insideReactTree)) {
14128
+ onClickAway(event);
14129
+ }
14130
+ });
14131
+ const createHandleSynthetic = (handlerName) => (event) => {
14132
+ syntheticEventRef.current = true;
14133
+ const childrenPropsHandler = children.props[handlerName];
14134
+ if (childrenPropsHandler) {
14135
+ childrenPropsHandler(event);
14136
+ }
14137
+ };
14138
+ const childrenProps = {
14139
+ ref: handleRef
14140
+ };
14141
+ if (touchEvent !== false) {
14142
+ childrenProps[touchEvent] = createHandleSynthetic(touchEvent);
14143
+ }
14144
+ React.useEffect(() => {
14145
+ if (touchEvent !== false) {
14146
+ const mappedTouchEvent = mapEventPropToEvent(touchEvent);
14147
+ const doc = ownerDocument(nodeRef.current);
14148
+ const handleTouchMove = () => {
14149
+ movedRef.current = true;
14150
+ };
14151
+ doc.addEventListener(mappedTouchEvent, handleClickAway);
14152
+ doc.addEventListener("touchmove", handleTouchMove);
14153
+ return () => {
14154
+ doc.removeEventListener(mappedTouchEvent, handleClickAway);
14155
+ doc.removeEventListener("touchmove", handleTouchMove);
14156
+ };
14157
+ }
14158
+ return void 0;
14159
+ }, [handleClickAway, touchEvent]);
14160
+ if (mouseEvent !== false) {
14161
+ childrenProps[mouseEvent] = createHandleSynthetic(mouseEvent);
14162
+ }
14163
+ React.useEffect(() => {
14164
+ if (mouseEvent !== false) {
14165
+ const mappedMouseEvent = mapEventPropToEvent(mouseEvent);
14166
+ const doc = ownerDocument(nodeRef.current);
14167
+ doc.addEventListener(mappedMouseEvent, handleClickAway);
14168
+ return () => {
14169
+ doc.removeEventListener(mappedMouseEvent, handleClickAway);
14170
+ };
14171
+ }
14172
+ return void 0;
14173
+ }, [handleClickAway, mouseEvent]);
14174
+ return /* @__PURE__ */ React.cloneElement(children, childrenProps);
14175
+ }
14176
+ process.env.NODE_ENV !== "production" ? ClickAwayListener.propTypes = {
14177
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
14178
+ // │ These PropTypes are generated from the TypeScript type definitions. │
14179
+ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
14180
+ // └─────────────────────────────────────────────────────────────────────┘
14181
+ /**
14182
+ * The wrapped element.
14183
+ */
14184
+ children: elementAcceptingRef.isRequired,
14185
+ /**
14186
+ * If `true`, the React tree is ignored and only the DOM tree is considered.
14187
+ * This prop changes how portaled elements are handled.
14188
+ * @default false
14189
+ */
14190
+ disableReactTree: PropTypes.bool,
14191
+ /**
14192
+ * The mouse event to listen to. You can disable the listener by providing `false`.
14193
+ * @default 'onClick'
14194
+ */
14195
+ mouseEvent: PropTypes.oneOf(["onClick", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerUp", false]),
14196
+ /**
14197
+ * Callback fired when a "click away" event is detected.
14198
+ */
14199
+ onClickAway: PropTypes.func.isRequired,
14200
+ /**
14201
+ * The touch event to listen to. You can disable the listener by providing `false`.
14202
+ * @default 'onTouchEnd'
14203
+ */
14204
+ touchEvent: PropTypes.oneOf(["onTouchEnd", "onTouchStart", false])
14205
+ } : void 0;
14206
+ if (process.env.NODE_ENV !== "production") {
14207
+ ClickAwayListener["propTypes"] = exactProp(ClickAwayListener.propTypes);
14208
+ }
13818
14209
  function formatMuiErrorMessage(code, ...args) {
13819
14210
  const url2 = new URL(`https://mui.com/production-error/?code=${code}`);
13820
14211
  args.forEach((arg) => url2.searchParams.append("args[]", arg));
@@ -14443,8 +14834,8 @@ process.env.NODE_ENV !== "production" ? spacingKeys.reduce((obj, key) => {
14443
14834
  obj[key] = responsivePropType;
14444
14835
  return obj;
14445
14836
  }, {}) : {};
14446
- function compose(...styles) {
14447
- const handlers = styles.reduce((acc, style2) => {
14837
+ function compose(...styles2) {
14838
+ const handlers = styles2.reduce((acc, style2) => {
14448
14839
  style2.filterProps.forEach((prop) => {
14449
14840
  acc[prop] = style2;
14450
14841
  });
@@ -14458,8 +14849,8 @@ function compose(...styles) {
14458
14849
  return acc;
14459
14850
  }, {});
14460
14851
  };
14461
- fn.propTypes = process.env.NODE_ENV !== "production" ? styles.reduce((acc, style2) => Object.assign(acc, style2.propTypes), {}) : {};
14462
- fn.filterProps = styles.reduce((acc, style2) => acc.concat(style2.filterProps), []);
14852
+ fn.propTypes = process.env.NODE_ENV !== "production" ? styles2.reduce((acc, style2) => Object.assign(acc, style2.propTypes), {}) : {};
14853
+ fn.filterProps = styles2.reduce((acc, style2) => acc.concat(style2.filterProps), []);
14463
14854
  return fn;
14464
14855
  }
14465
14856
  function borderTransform(value2) {
@@ -14952,12 +15343,12 @@ function callIfFn(maybeFn, arg) {
14952
15343
  return typeof maybeFn === "function" ? maybeFn(arg) : maybeFn;
14953
15344
  }
14954
15345
  function unstable_createStyleFunctionSx() {
14955
- function getThemeValue(prop, val, theme, config) {
15346
+ function getThemeValue(prop, val, theme, config2) {
14956
15347
  const props = {
14957
15348
  [prop]: val,
14958
15349
  theme
14959
15350
  };
14960
- const options = config[prop];
15351
+ const options = config2[prop];
14961
15352
  if (!options) {
14962
15353
  return {
14963
15354
  [prop]: val
@@ -15004,7 +15395,7 @@ function unstable_createStyleFunctionSx() {
15004
15395
  if (!sx) {
15005
15396
  return null;
15006
15397
  }
15007
- const config = theme.unstable_sxConfig ?? defaultSxConfig;
15398
+ const config2 = theme.unstable_sxConfig ?? defaultSxConfig;
15008
15399
  function traverse(sxInput) {
15009
15400
  let sxObject = sxInput;
15010
15401
  if (typeof sxInput === "function") {
@@ -15022,8 +15413,8 @@ function unstable_createStyleFunctionSx() {
15022
15413
  const value2 = callIfFn(sxObject[styleKey], theme);
15023
15414
  if (value2 !== null && value2 !== void 0) {
15024
15415
  if (typeof value2 === "object") {
15025
- if (config[styleKey]) {
15026
- css2 = merge(css2, getThemeValue(styleKey, value2, theme, config));
15416
+ if (config2[styleKey]) {
15417
+ css2 = merge(css2, getThemeValue(styleKey, value2, theme, config2));
15027
15418
  } else {
15028
15419
  const breakpointsValues = handleBreakpoints({
15029
15420
  theme
@@ -15041,7 +15432,7 @@ function unstable_createStyleFunctionSx() {
15041
15432
  }
15042
15433
  }
15043
15434
  } else {
15044
- css2 = merge(css2, getThemeValue(styleKey, value2, theme, config));
15435
+ css2 = merge(css2, getThemeValue(styleKey, value2, theme, config2));
15045
15436
  }
15046
15437
  }
15047
15438
  });
@@ -15815,8 +16206,8 @@ function handleInterpolation(mergedProps, registered, interpolation) {
15815
16206
  next = next.next;
15816
16207
  }
15817
16208
  }
15818
- var styles = serializedStyles.styles + ";";
15819
- return styles;
16209
+ var styles2 = serializedStyles.styles + ";";
16210
+ return styles2;
15820
16211
  }
15821
16212
  return createStringFromObject(mergedProps, registered, interpolation);
15822
16213
  }
@@ -15872,33 +16263,33 @@ function serializeStyles(args, registered, mergedProps) {
15872
16263
  return args[0];
15873
16264
  }
15874
16265
  var stringMode = true;
15875
- var styles = "";
16266
+ var styles2 = "";
15876
16267
  cursor = void 0;
15877
16268
  var strings = args[0];
15878
16269
  if (strings == null || strings.raw === void 0) {
15879
16270
  stringMode = false;
15880
- styles += handleInterpolation(mergedProps, registered, strings);
16271
+ styles2 += handleInterpolation(mergedProps, registered, strings);
15881
16272
  } else {
15882
16273
  var asTemplateStringsArr = strings;
15883
- styles += asTemplateStringsArr[0];
16274
+ styles2 += asTemplateStringsArr[0];
15884
16275
  }
15885
16276
  for (var i = 1; i < args.length; i++) {
15886
- styles += handleInterpolation(mergedProps, registered, args[i]);
16277
+ styles2 += handleInterpolation(mergedProps, registered, args[i]);
15887
16278
  if (stringMode) {
15888
16279
  var templateStringsArr = strings;
15889
- styles += templateStringsArr[i];
16280
+ styles2 += templateStringsArr[i];
15890
16281
  }
15891
16282
  }
15892
16283
  labelPattern.lastIndex = 0;
15893
16284
  var identifierName = "";
15894
16285
  var match;
15895
- while ((match = labelPattern.exec(styles)) !== null) {
16286
+ while ((match = labelPattern.exec(styles2)) !== null) {
15896
16287
  identifierName += "-" + match[1];
15897
16288
  }
15898
- var name2 = murmur2(styles) + identifierName;
16289
+ var name2 = murmur2(styles2) + identifierName;
15899
16290
  return {
15900
16291
  name: name2,
15901
- styles,
16292
+ styles: styles2,
15902
16293
  next: cursor
15903
16294
  };
15904
16295
  }
@@ -15912,14 +16303,14 @@ function serializeStyles(args, registered, mergedProps) {
15912
16303
  function styled$1(tag, options) {
15913
16304
  const stylesFactory = emStyled(tag, options);
15914
16305
  if (process.env.NODE_ENV !== "production") {
15915
- return (...styles) => {
16306
+ return (...styles2) => {
15916
16307
  const component = typeof tag === "string" ? `"${tag}"` : "component";
15917
- if (styles.length === 0) {
16308
+ if (styles2.length === 0) {
15918
16309
  console.error([`MUI: Seems like you called \`styled(${component})()\` without a \`style\` argument.`, 'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n"));
15919
- } else if (styles.some((style2) => style2 === void 0)) {
16310
+ } else if (styles2.some((style2) => style2 === void 0)) {
15920
16311
  console.error(`MUI: the styled(${component})(...args) API requires all its args to be defined.`);
15921
16312
  }
15922
- return stylesFactory(...styles);
16313
+ return stylesFactory(...styles2);
15923
16314
  };
15924
16315
  }
15925
16316
  return stylesFactory;
@@ -15930,8 +16321,8 @@ function internal_mutateStyles(tag, processor) {
15930
16321
  }
15931
16322
  }
15932
16323
  const wrapper = [];
15933
- function internal_serializeStyles(styles) {
15934
- wrapper[0] = styles;
16324
+ function internal_serializeStyles(styles2) {
16325
+ wrapper[0] = styles2;
15935
16326
  return serializeStyles(wrapper);
15936
16327
  }
15937
16328
  function r(e) {
@@ -16015,12 +16406,12 @@ function getThemeProps(params) {
16015
16406
  if (!theme || !theme.components || !theme.components[name2]) {
16016
16407
  return props;
16017
16408
  }
16018
- const config = theme.components[name2];
16019
- if (config.defaultProps) {
16020
- return resolveProps(config.defaultProps, props, theme.components.mergeClassNameAndStyle);
16409
+ const config2 = theme.components[name2];
16410
+ if (config2.defaultProps) {
16411
+ return resolveProps(config2.defaultProps, props, theme.components.mergeClassNameAndStyle);
16021
16412
  }
16022
- if (!config.styleOverrides && !config.variants) {
16023
- return resolveProps(config, props, theme.components.mergeClassNameAndStyle);
16413
+ if (!config2.styleOverrides && !config2.variants) {
16414
+ return resolveProps(config2, props, theme.components.mergeClassNameAndStyle);
16024
16415
  }
16025
16416
  return props;
16026
16417
  }
@@ -16136,7 +16527,7 @@ function createSpacing(spacingInput = 8, transform = createUnarySpacing({
16136
16527
  spacing.mui = true;
16137
16528
  return spacing;
16138
16529
  }
16139
- function applyStyles(key, styles) {
16530
+ function applyStyles(key, styles2) {
16140
16531
  const theme = this;
16141
16532
  if (theme.vars) {
16142
16533
  if (!theme.colorSchemes?.[key] || typeof theme.getColorSchemeSelector !== "function") {
@@ -16144,17 +16535,17 @@ function applyStyles(key, styles) {
16144
16535
  }
16145
16536
  let selector = theme.getColorSchemeSelector(key);
16146
16537
  if (selector === "&") {
16147
- return styles;
16538
+ return styles2;
16148
16539
  }
16149
16540
  if (selector.includes("data-") || selector.includes(".")) {
16150
16541
  selector = `*:where(${selector.replace(/\s*&$/, "")}) &`;
16151
16542
  }
16152
16543
  return {
16153
- [selector]: styles
16544
+ [selector]: styles2
16154
16545
  };
16155
16546
  }
16156
16547
  if (theme.palette.mode === key) {
16157
- return styles;
16548
+ return styles2;
16158
16549
  }
16159
16550
  return {};
16160
16551
  }
@@ -17501,7 +17892,7 @@ function defaultOverridesResolver(slot) {
17501
17892
  if (!slot) {
17502
17893
  return null;
17503
17894
  }
17504
- return (_props, styles) => styles[slot];
17895
+ return (_props, styles2) => styles2[slot];
17505
17896
  }
17506
17897
  function attachTheme(props, themeId, defaultTheme2) {
17507
17898
  props.theme = isObjectEmpty(props.theme) ? defaultTheme2 : props.theme[themeId] || props.theme;
@@ -17573,7 +17964,7 @@ function createStyled(input = {}) {
17573
17964
  attachTheme(props, themeId, defaultTheme2);
17574
17965
  }
17575
17966
  const styled2 = (tag, inputOptions = {}) => {
17576
- internal_mutateStyles(tag, (styles) => styles.filter((style2) => style2 !== styleFunctionSx));
17967
+ internal_mutateStyles(tag, (styles2) => styles2.filter((style2) => style2 !== styleFunctionSx));
17577
17968
  const {
17578
17969
  name: componentName,
17579
17970
  slot: componentSlot,
@@ -17726,31 +18117,1611 @@ const styled = createStyled({
17726
18117
  defaultTheme,
17727
18118
  rootShouldForwardProp
17728
18119
  });
17729
- const memoTheme = unstable_memoTheme;
17730
- process.env.NODE_ENV !== "production" ? {
18120
+ const memoTheme = unstable_memoTheme;
18121
+ process.env.NODE_ENV !== "production" ? {
18122
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
18123
+ // │ These PropTypes are generated from the TypeScript type definitions. │
18124
+ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
18125
+ // └─────────────────────────────────────────────────────────────────────┘
18126
+ /**
18127
+ * @ignore
18128
+ */
18129
+ children: PropTypes.node,
18130
+ /**
18131
+ * @ignore
18132
+ */
18133
+ value: PropTypes.object.isRequired
18134
+ } : void 0;
18135
+ function useDefaultProps(params) {
18136
+ return useDefaultProps$1(params);
18137
+ }
18138
+ function _objectWithoutPropertiesLoose$1(r2, e) {
18139
+ if (null == r2) return {};
18140
+ var t = {};
18141
+ for (var n in r2) if ({}.hasOwnProperty.call(r2, n)) {
18142
+ if (-1 !== e.indexOf(n)) continue;
18143
+ t[n] = r2[n];
18144
+ }
18145
+ return t;
18146
+ }
18147
+ function _setPrototypeOf(t, e) {
18148
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e2) {
18149
+ return t2.__proto__ = e2, t2;
18150
+ }, _setPrototypeOf(t, e);
18151
+ }
18152
+ function _inheritsLoose(t, o) {
18153
+ t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
18154
+ }
18155
+ const config = {
18156
+ disabled: false
18157
+ };
18158
+ var timeoutsShape = process.env.NODE_ENV !== "production" ? PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
18159
+ enter: PropTypes.number,
18160
+ exit: PropTypes.number,
18161
+ appear: PropTypes.number
18162
+ }).isRequired]) : null;
18163
+ process.env.NODE_ENV !== "production" ? PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
18164
+ enter: PropTypes.string,
18165
+ exit: PropTypes.string,
18166
+ active: PropTypes.string
18167
+ }), PropTypes.shape({
18168
+ enter: PropTypes.string,
18169
+ enterDone: PropTypes.string,
18170
+ enterActive: PropTypes.string,
18171
+ exit: PropTypes.string,
18172
+ exitDone: PropTypes.string,
18173
+ exitActive: PropTypes.string
18174
+ })]) : null;
18175
+ const TransitionGroupContext = React__default.createContext(null);
18176
+ var forceReflow = function forceReflow2(node) {
18177
+ return node.scrollTop;
18178
+ };
18179
+ var UNMOUNTED = "unmounted";
18180
+ var EXITED = "exited";
18181
+ var ENTERING = "entering";
18182
+ var ENTERED = "entered";
18183
+ var EXITING = "exiting";
18184
+ var Transition = /* @__PURE__ */ (function(_React$Component) {
18185
+ _inheritsLoose(Transition2, _React$Component);
18186
+ function Transition2(props, context) {
18187
+ var _this;
18188
+ _this = _React$Component.call(this, props, context) || this;
18189
+ var parentGroup = context;
18190
+ var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
18191
+ var initialStatus;
18192
+ _this.appearStatus = null;
18193
+ if (props.in) {
18194
+ if (appear) {
18195
+ initialStatus = EXITED;
18196
+ _this.appearStatus = ENTERING;
18197
+ } else {
18198
+ initialStatus = ENTERED;
18199
+ }
18200
+ } else {
18201
+ if (props.unmountOnExit || props.mountOnEnter) {
18202
+ initialStatus = UNMOUNTED;
18203
+ } else {
18204
+ initialStatus = EXITED;
18205
+ }
18206
+ }
18207
+ _this.state = {
18208
+ status: initialStatus
18209
+ };
18210
+ _this.nextCallback = null;
18211
+ return _this;
18212
+ }
18213
+ Transition2.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {
18214
+ var nextIn = _ref.in;
18215
+ if (nextIn && prevState.status === UNMOUNTED) {
18216
+ return {
18217
+ status: EXITED
18218
+ };
18219
+ }
18220
+ return null;
18221
+ };
18222
+ var _proto = Transition2.prototype;
18223
+ _proto.componentDidMount = function componentDidMount() {
18224
+ this.updateStatus(true, this.appearStatus);
18225
+ };
18226
+ _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
18227
+ var nextStatus = null;
18228
+ if (prevProps !== this.props) {
18229
+ var status = this.state.status;
18230
+ if (this.props.in) {
18231
+ if (status !== ENTERING && status !== ENTERED) {
18232
+ nextStatus = ENTERING;
18233
+ }
18234
+ } else {
18235
+ if (status === ENTERING || status === ENTERED) {
18236
+ nextStatus = EXITING;
18237
+ }
18238
+ }
18239
+ }
18240
+ this.updateStatus(false, nextStatus);
18241
+ };
18242
+ _proto.componentWillUnmount = function componentWillUnmount() {
18243
+ this.cancelNextCallback();
18244
+ };
18245
+ _proto.getTimeouts = function getTimeouts() {
18246
+ var timeout2 = this.props.timeout;
18247
+ var exit, enter, appear;
18248
+ exit = enter = appear = timeout2;
18249
+ if (timeout2 != null && typeof timeout2 !== "number") {
18250
+ exit = timeout2.exit;
18251
+ enter = timeout2.enter;
18252
+ appear = timeout2.appear !== void 0 ? timeout2.appear : enter;
18253
+ }
18254
+ return {
18255
+ exit,
18256
+ enter,
18257
+ appear
18258
+ };
18259
+ };
18260
+ _proto.updateStatus = function updateStatus(mounting, nextStatus) {
18261
+ if (mounting === void 0) {
18262
+ mounting = false;
18263
+ }
18264
+ if (nextStatus !== null) {
18265
+ this.cancelNextCallback();
18266
+ if (nextStatus === ENTERING) {
18267
+ if (this.props.unmountOnExit || this.props.mountOnEnter) {
18268
+ var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);
18269
+ if (node) forceReflow(node);
18270
+ }
18271
+ this.performEnter(mounting);
18272
+ } else {
18273
+ this.performExit();
18274
+ }
18275
+ } else if (this.props.unmountOnExit && this.state.status === EXITED) {
18276
+ this.setState({
18277
+ status: UNMOUNTED
18278
+ });
18279
+ }
18280
+ };
18281
+ _proto.performEnter = function performEnter(mounting) {
18282
+ var _this2 = this;
18283
+ var enter = this.props.enter;
18284
+ var appearing = this.context ? this.context.isMounting : mounting;
18285
+ var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing], maybeNode = _ref2[0], maybeAppearing = _ref2[1];
18286
+ var timeouts = this.getTimeouts();
18287
+ var enterTimeout = appearing ? timeouts.appear : timeouts.enter;
18288
+ if (!mounting && !enter || config.disabled) {
18289
+ this.safeSetState({
18290
+ status: ENTERED
18291
+ }, function() {
18292
+ _this2.props.onEntered(maybeNode);
18293
+ });
18294
+ return;
18295
+ }
18296
+ this.props.onEnter(maybeNode, maybeAppearing);
18297
+ this.safeSetState({
18298
+ status: ENTERING
18299
+ }, function() {
18300
+ _this2.props.onEntering(maybeNode, maybeAppearing);
18301
+ _this2.onTransitionEnd(enterTimeout, function() {
18302
+ _this2.safeSetState({
18303
+ status: ENTERED
18304
+ }, function() {
18305
+ _this2.props.onEntered(maybeNode, maybeAppearing);
18306
+ });
18307
+ });
18308
+ });
18309
+ };
18310
+ _proto.performExit = function performExit() {
18311
+ var _this3 = this;
18312
+ var exit = this.props.exit;
18313
+ var timeouts = this.getTimeouts();
18314
+ var maybeNode = this.props.nodeRef ? void 0 : ReactDOM.findDOMNode(this);
18315
+ if (!exit || config.disabled) {
18316
+ this.safeSetState({
18317
+ status: EXITED
18318
+ }, function() {
18319
+ _this3.props.onExited(maybeNode);
18320
+ });
18321
+ return;
18322
+ }
18323
+ this.props.onExit(maybeNode);
18324
+ this.safeSetState({
18325
+ status: EXITING
18326
+ }, function() {
18327
+ _this3.props.onExiting(maybeNode);
18328
+ _this3.onTransitionEnd(timeouts.exit, function() {
18329
+ _this3.safeSetState({
18330
+ status: EXITED
18331
+ }, function() {
18332
+ _this3.props.onExited(maybeNode);
18333
+ });
18334
+ });
18335
+ });
18336
+ };
18337
+ _proto.cancelNextCallback = function cancelNextCallback() {
18338
+ if (this.nextCallback !== null) {
18339
+ this.nextCallback.cancel();
18340
+ this.nextCallback = null;
18341
+ }
18342
+ };
18343
+ _proto.safeSetState = function safeSetState(nextState, callback) {
18344
+ callback = this.setNextCallback(callback);
18345
+ this.setState(nextState, callback);
18346
+ };
18347
+ _proto.setNextCallback = function setNextCallback(callback) {
18348
+ var _this4 = this;
18349
+ var active = true;
18350
+ this.nextCallback = function(event) {
18351
+ if (active) {
18352
+ active = false;
18353
+ _this4.nextCallback = null;
18354
+ callback(event);
18355
+ }
18356
+ };
18357
+ this.nextCallback.cancel = function() {
18358
+ active = false;
18359
+ };
18360
+ return this.nextCallback;
18361
+ };
18362
+ _proto.onTransitionEnd = function onTransitionEnd(timeout2, handler) {
18363
+ this.setNextCallback(handler);
18364
+ var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);
18365
+ var doesNotHaveTimeoutOrListener = timeout2 == null && !this.props.addEndListener;
18366
+ if (!node || doesNotHaveTimeoutOrListener) {
18367
+ setTimeout(this.nextCallback, 0);
18368
+ return;
18369
+ }
18370
+ if (this.props.addEndListener) {
18371
+ var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback], maybeNode = _ref3[0], maybeNextCallback = _ref3[1];
18372
+ this.props.addEndListener(maybeNode, maybeNextCallback);
18373
+ }
18374
+ if (timeout2 != null) {
18375
+ setTimeout(this.nextCallback, timeout2);
18376
+ }
18377
+ };
18378
+ _proto.render = function render() {
18379
+ var status = this.state.status;
18380
+ if (status === UNMOUNTED) {
18381
+ return null;
18382
+ }
18383
+ var _this$props = this.props, children = _this$props.children;
18384
+ _this$props.in;
18385
+ _this$props.mountOnEnter;
18386
+ _this$props.unmountOnExit;
18387
+ _this$props.appear;
18388
+ _this$props.enter;
18389
+ _this$props.exit;
18390
+ _this$props.timeout;
18391
+ _this$props.addEndListener;
18392
+ _this$props.onEnter;
18393
+ _this$props.onEntering;
18394
+ _this$props.onEntered;
18395
+ _this$props.onExit;
18396
+ _this$props.onExiting;
18397
+ _this$props.onExited;
18398
+ _this$props.nodeRef;
18399
+ var childProps = _objectWithoutPropertiesLoose$1(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
18400
+ return (
18401
+ // allows for nested Transitions
18402
+ /* @__PURE__ */ React__default.createElement(TransitionGroupContext.Provider, {
18403
+ value: null
18404
+ }, typeof children === "function" ? children(status, childProps) : React__default.cloneElement(React__default.Children.only(children), childProps))
18405
+ );
18406
+ };
18407
+ return Transition2;
18408
+ })(React__default.Component);
18409
+ Transition.contextType = TransitionGroupContext;
18410
+ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
18411
+ /**
18412
+ * A React reference to DOM element that need to transition:
18413
+ * https://stackoverflow.com/a/51127130/4671932
18414
+ *
18415
+ * - When `nodeRef` prop is used, `node` is not passed to callback functions
18416
+ * (e.g. `onEnter`) because user already has direct access to the node.
18417
+ * - When changing `key` prop of `Transition` in a `TransitionGroup` a new
18418
+ * `nodeRef` need to be provided to `Transition` with changed `key` prop
18419
+ * (see
18420
+ * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
18421
+ */
18422
+ nodeRef: PropTypes.shape({
18423
+ current: typeof Element === "undefined" ? PropTypes.any : function(propValue, key, componentName, location2, propFullName, secret) {
18424
+ var value2 = propValue[key];
18425
+ return PropTypes.instanceOf(value2 && "ownerDocument" in value2 ? value2.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location2, propFullName, secret);
18426
+ }
18427
+ }),
18428
+ /**
18429
+ * A `function` child can be used instead of a React element. This function is
18430
+ * called with the current transition status (`'entering'`, `'entered'`,
18431
+ * `'exiting'`, `'exited'`), which can be used to apply context
18432
+ * specific props to a component.
18433
+ *
18434
+ * ```jsx
18435
+ * <Transition in={this.state.in} timeout={150}>
18436
+ * {state => (
18437
+ * <MyComponent className={`fade fade-${state}`} />
18438
+ * )}
18439
+ * </Transition>
18440
+ * ```
18441
+ */
18442
+ children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
18443
+ /**
18444
+ * Show the component; triggers the enter or exit states
18445
+ */
18446
+ in: PropTypes.bool,
18447
+ /**
18448
+ * By default the child component is mounted immediately along with
18449
+ * the parent `Transition` component. If you want to "lazy mount" the component on the
18450
+ * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
18451
+ * mounted, even on "exited", unless you also specify `unmountOnExit`.
18452
+ */
18453
+ mountOnEnter: PropTypes.bool,
18454
+ /**
18455
+ * By default the child component stays mounted after it reaches the `'exited'` state.
18456
+ * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
18457
+ */
18458
+ unmountOnExit: PropTypes.bool,
18459
+ /**
18460
+ * By default the child component does not perform the enter transition when
18461
+ * it first mounts, regardless of the value of `in`. If you want this
18462
+ * behavior, set both `appear` and `in` to `true`.
18463
+ *
18464
+ * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop
18465
+ * > only adds an additional enter transition. However, in the
18466
+ * > `<CSSTransition>` component that first enter transition does result in
18467
+ * > additional `.appear-*` classes, that way you can choose to style it
18468
+ * > differently.
18469
+ */
18470
+ appear: PropTypes.bool,
18471
+ /**
18472
+ * Enable or disable enter transitions.
18473
+ */
18474
+ enter: PropTypes.bool,
18475
+ /**
18476
+ * Enable or disable exit transitions.
18477
+ */
18478
+ exit: PropTypes.bool,
18479
+ /**
18480
+ * The duration of the transition, in milliseconds.
18481
+ * Required unless `addEndListener` is provided.
18482
+ *
18483
+ * You may specify a single timeout for all transitions:
18484
+ *
18485
+ * ```jsx
18486
+ * timeout={500}
18487
+ * ```
18488
+ *
18489
+ * or individually:
18490
+ *
18491
+ * ```jsx
18492
+ * timeout={{
18493
+ * appear: 500,
18494
+ * enter: 300,
18495
+ * exit: 500,
18496
+ * }}
18497
+ * ```
18498
+ *
18499
+ * - `appear` defaults to the value of `enter`
18500
+ * - `enter` defaults to `0`
18501
+ * - `exit` defaults to `0`
18502
+ *
18503
+ * @type {number | { enter?: number, exit?: number, appear?: number }}
18504
+ */
18505
+ timeout: function timeout(props) {
18506
+ var pt = timeoutsShape;
18507
+ if (!props.addEndListener) pt = pt.isRequired;
18508
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
18509
+ args[_key - 1] = arguments[_key];
18510
+ }
18511
+ return pt.apply(void 0, [props].concat(args));
18512
+ },
18513
+ /**
18514
+ * Add a custom transition end trigger. Called with the transitioning
18515
+ * DOM node and a `done` callback. Allows for more fine grained transition end
18516
+ * logic. Timeouts are still used as a fallback if provided.
18517
+ *
18518
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
18519
+ *
18520
+ * ```jsx
18521
+ * addEndListener={(node, done) => {
18522
+ * // use the css transitionend event to mark the finish of a transition
18523
+ * node.addEventListener('transitionend', done, false);
18524
+ * }}
18525
+ * ```
18526
+ */
18527
+ addEndListener: PropTypes.func,
18528
+ /**
18529
+ * Callback fired before the "entering" status is applied. An extra parameter
18530
+ * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
18531
+ *
18532
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
18533
+ *
18534
+ * @type Function(node: HtmlElement, isAppearing: bool) -> void
18535
+ */
18536
+ onEnter: PropTypes.func,
18537
+ /**
18538
+ * Callback fired after the "entering" status is applied. An extra parameter
18539
+ * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
18540
+ *
18541
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
18542
+ *
18543
+ * @type Function(node: HtmlElement, isAppearing: bool)
18544
+ */
18545
+ onEntering: PropTypes.func,
18546
+ /**
18547
+ * Callback fired after the "entered" status is applied. An extra parameter
18548
+ * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
18549
+ *
18550
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
18551
+ *
18552
+ * @type Function(node: HtmlElement, isAppearing: bool) -> void
18553
+ */
18554
+ onEntered: PropTypes.func,
18555
+ /**
18556
+ * Callback fired before the "exiting" status is applied.
18557
+ *
18558
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
18559
+ *
18560
+ * @type Function(node: HtmlElement) -> void
18561
+ */
18562
+ onExit: PropTypes.func,
18563
+ /**
18564
+ * Callback fired after the "exiting" status is applied.
18565
+ *
18566
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
18567
+ *
18568
+ * @type Function(node: HtmlElement) -> void
18569
+ */
18570
+ onExiting: PropTypes.func,
18571
+ /**
18572
+ * Callback fired after the "exited" status is applied.
18573
+ *
18574
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed
18575
+ *
18576
+ * @type Function(node: HtmlElement) -> void
18577
+ */
18578
+ onExited: PropTypes.func
18579
+ } : {};
18580
+ function noop$1() {
18581
+ }
18582
+ Transition.defaultProps = {
18583
+ in: false,
18584
+ mountOnEnter: false,
18585
+ unmountOnExit: false,
18586
+ appear: false,
18587
+ enter: true,
18588
+ exit: true,
18589
+ onEnter: noop$1,
18590
+ onEntering: noop$1,
18591
+ onEntered: noop$1,
18592
+ onExit: noop$1,
18593
+ onExiting: noop$1,
18594
+ onExited: noop$1
18595
+ };
18596
+ Transition.UNMOUNTED = UNMOUNTED;
18597
+ Transition.EXITED = EXITED;
18598
+ Transition.ENTERING = ENTERING;
18599
+ Transition.ENTERED = ENTERED;
18600
+ Transition.EXITING = EXITING;
18601
+ const reflow = (node) => node.scrollTop;
18602
+ function getTransitionProps(props, options) {
18603
+ const {
18604
+ timeout: timeout2,
18605
+ easing: easing2,
18606
+ style: style2 = {}
18607
+ } = props;
18608
+ return {
18609
+ duration: style2.transitionDuration ?? (typeof timeout2 === "number" ? timeout2 : timeout2[options.mode] || 0),
18610
+ easing: style2.transitionTimingFunction ?? (typeof easing2 === "object" ? easing2[options.mode] : easing2),
18611
+ delay: style2.transitionDelay
18612
+ };
18613
+ }
18614
+ function getScale(value2) {
18615
+ return `scale(${value2}, ${value2 ** 2})`;
18616
+ }
18617
+ const styles = {
18618
+ entering: {
18619
+ opacity: 1,
18620
+ transform: getScale(1)
18621
+ },
18622
+ entered: {
18623
+ opacity: 1,
18624
+ transform: "none"
18625
+ }
18626
+ };
18627
+ const isWebKit154 = typeof navigator !== "undefined" && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)4/i.test(navigator.userAgent);
18628
+ const Grow = /* @__PURE__ */ React.forwardRef(function Grow2(props, ref) {
18629
+ const {
18630
+ addEndListener,
18631
+ appear = true,
18632
+ children,
18633
+ easing: easing2,
18634
+ in: inProp,
18635
+ onEnter,
18636
+ onEntered,
18637
+ onEntering,
18638
+ onExit,
18639
+ onExited,
18640
+ onExiting,
18641
+ style: style2,
18642
+ timeout: timeout2 = "auto",
18643
+ // eslint-disable-next-line react/prop-types
18644
+ TransitionComponent = Transition,
18645
+ ...other
18646
+ } = props;
18647
+ const timer = useTimeout();
18648
+ const autoTimeout = React.useRef();
18649
+ const theme = useTheme();
18650
+ const nodeRef = React.useRef(null);
18651
+ const handleRef = useForkRef(nodeRef, getReactElementRef(children), ref);
18652
+ const normalizedTransitionCallback = (callback) => (maybeIsAppearing) => {
18653
+ if (callback) {
18654
+ const node = nodeRef.current;
18655
+ if (maybeIsAppearing === void 0) {
18656
+ callback(node);
18657
+ } else {
18658
+ callback(node, maybeIsAppearing);
18659
+ }
18660
+ }
18661
+ };
18662
+ const handleEntering = normalizedTransitionCallback(onEntering);
18663
+ const handleEnter = normalizedTransitionCallback((node, isAppearing) => {
18664
+ reflow(node);
18665
+ const {
18666
+ duration: transitionDuration,
18667
+ delay: delay2,
18668
+ easing: transitionTimingFunction
18669
+ } = getTransitionProps({
18670
+ style: style2,
18671
+ timeout: timeout2,
18672
+ easing: easing2
18673
+ }, {
18674
+ mode: "enter"
18675
+ });
18676
+ let duration2;
18677
+ if (timeout2 === "auto") {
18678
+ duration2 = theme.transitions.getAutoHeightDuration(node.clientHeight);
18679
+ autoTimeout.current = duration2;
18680
+ } else {
18681
+ duration2 = transitionDuration;
18682
+ }
18683
+ node.style.transition = [theme.transitions.create("opacity", {
18684
+ duration: duration2,
18685
+ delay: delay2
18686
+ }), theme.transitions.create("transform", {
18687
+ duration: isWebKit154 ? duration2 : duration2 * 0.666,
18688
+ delay: delay2,
18689
+ easing: transitionTimingFunction
18690
+ })].join(",");
18691
+ if (onEnter) {
18692
+ onEnter(node, isAppearing);
18693
+ }
18694
+ });
18695
+ const handleEntered = normalizedTransitionCallback(onEntered);
18696
+ const handleExiting = normalizedTransitionCallback(onExiting);
18697
+ const handleExit = normalizedTransitionCallback((node) => {
18698
+ const {
18699
+ duration: transitionDuration,
18700
+ delay: delay2,
18701
+ easing: transitionTimingFunction
18702
+ } = getTransitionProps({
18703
+ style: style2,
18704
+ timeout: timeout2,
18705
+ easing: easing2
18706
+ }, {
18707
+ mode: "exit"
18708
+ });
18709
+ let duration2;
18710
+ if (timeout2 === "auto") {
18711
+ duration2 = theme.transitions.getAutoHeightDuration(node.clientHeight);
18712
+ autoTimeout.current = duration2;
18713
+ } else {
18714
+ duration2 = transitionDuration;
18715
+ }
18716
+ node.style.transition = [theme.transitions.create("opacity", {
18717
+ duration: duration2,
18718
+ delay: delay2
18719
+ }), theme.transitions.create("transform", {
18720
+ duration: isWebKit154 ? duration2 : duration2 * 0.666,
18721
+ delay: isWebKit154 ? delay2 : delay2 || duration2 * 0.333,
18722
+ easing: transitionTimingFunction
18723
+ })].join(",");
18724
+ node.style.opacity = 0;
18725
+ node.style.transform = getScale(0.75);
18726
+ if (onExit) {
18727
+ onExit(node);
18728
+ }
18729
+ });
18730
+ const handleExited = normalizedTransitionCallback(onExited);
18731
+ const handleAddEndListener = (next) => {
18732
+ if (timeout2 === "auto") {
18733
+ timer.start(autoTimeout.current || 0, next);
18734
+ }
18735
+ if (addEndListener) {
18736
+ addEndListener(nodeRef.current, next);
18737
+ }
18738
+ };
18739
+ return /* @__PURE__ */ jsx(TransitionComponent, {
18740
+ appear,
18741
+ in: inProp,
18742
+ nodeRef,
18743
+ onEnter: handleEnter,
18744
+ onEntered: handleEntered,
18745
+ onEntering: handleEntering,
18746
+ onExit: handleExit,
18747
+ onExited: handleExited,
18748
+ onExiting: handleExiting,
18749
+ addEndListener: handleAddEndListener,
18750
+ timeout: timeout2 === "auto" ? null : timeout2,
18751
+ ...other,
18752
+ children: (state, {
18753
+ ownerState,
18754
+ ...restChildProps
18755
+ }) => {
18756
+ return /* @__PURE__ */ React.cloneElement(children, {
18757
+ style: {
18758
+ opacity: 0,
18759
+ transform: getScale(0.75),
18760
+ visibility: state === "exited" && !inProp ? "hidden" : void 0,
18761
+ ...styles[state],
18762
+ ...style2,
18763
+ ...children.props.style
18764
+ },
18765
+ ref: handleRef,
18766
+ ...restChildProps
18767
+ });
18768
+ }
18769
+ });
18770
+ });
18771
+ process.env.NODE_ENV !== "production" ? Grow.propTypes = {
18772
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
18773
+ // │ These PropTypes are generated from the TypeScript type definitions. │
18774
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
18775
+ // └─────────────────────────────────────────────────────────────────────┘
18776
+ /**
18777
+ * Add a custom transition end trigger. Called with the transitioning DOM
18778
+ * node and a done callback. Allows for more fine grained transition end
18779
+ * logic. Note: Timeouts are still used as a fallback if provided.
18780
+ */
18781
+ addEndListener: PropTypes.func,
18782
+ /**
18783
+ * Perform the enter transition when it first mounts if `in` is also `true`.
18784
+ * Set this to `false` to disable this behavior.
18785
+ * @default true
18786
+ */
18787
+ appear: PropTypes.bool,
18788
+ /**
18789
+ * A single child content element.
18790
+ */
18791
+ children: elementAcceptingRef.isRequired,
18792
+ /**
18793
+ * The transition timing function.
18794
+ * You may specify a single easing or a object containing enter and exit values.
18795
+ */
18796
+ easing: PropTypes.oneOfType([PropTypes.shape({
18797
+ enter: PropTypes.string,
18798
+ exit: PropTypes.string
18799
+ }), PropTypes.string]),
18800
+ /**
18801
+ * If `true`, the component will transition in.
18802
+ */
18803
+ in: PropTypes.bool,
18804
+ /**
18805
+ * @ignore
18806
+ */
18807
+ onEnter: PropTypes.func,
18808
+ /**
18809
+ * @ignore
18810
+ */
18811
+ onEntered: PropTypes.func,
18812
+ /**
18813
+ * @ignore
18814
+ */
18815
+ onEntering: PropTypes.func,
18816
+ /**
18817
+ * @ignore
18818
+ */
18819
+ onExit: PropTypes.func,
18820
+ /**
18821
+ * @ignore
18822
+ */
18823
+ onExited: PropTypes.func,
18824
+ /**
18825
+ * @ignore
18826
+ */
18827
+ onExiting: PropTypes.func,
18828
+ /**
18829
+ * @ignore
18830
+ */
18831
+ style: PropTypes.object,
18832
+ /**
18833
+ * The duration for the transition, in milliseconds.
18834
+ * You may specify a single timeout for all transitions, or individually with an object.
18835
+ *
18836
+ * Set to 'auto' to automatically calculate transition time based on height.
18837
+ * @default 'auto'
18838
+ */
18839
+ timeout: PropTypes.oneOfType([PropTypes.oneOf(["auto"]), PropTypes.number, PropTypes.shape({
18840
+ appear: PropTypes.number,
18841
+ enter: PropTypes.number,
18842
+ exit: PropTypes.number
18843
+ })])
18844
+ } : void 0;
18845
+ if (Grow) {
18846
+ Grow.muiSupportAuto = true;
18847
+ }
18848
+ function getTypeByValue(value2) {
18849
+ const valueType = typeof value2;
18850
+ switch (valueType) {
18851
+ case "number":
18852
+ if (Number.isNaN(value2)) {
18853
+ return "NaN";
18854
+ }
18855
+ if (!Number.isFinite(value2)) {
18856
+ return "Infinity";
18857
+ }
18858
+ if (value2 !== Math.floor(value2)) {
18859
+ return "float";
18860
+ }
18861
+ return "number";
18862
+ case "object":
18863
+ if (value2 === null) {
18864
+ return "null";
18865
+ }
18866
+ return value2.constructor.name;
18867
+ default:
18868
+ return valueType;
18869
+ }
18870
+ }
18871
+ function requiredInteger(props, propName, componentName, location2) {
18872
+ const propValue = props[propName];
18873
+ if (propValue == null || !Number.isInteger(propValue)) {
18874
+ const propType = getTypeByValue(propValue);
18875
+ return new RangeError(`Invalid ${location2} \`${propName}\` of type \`${propType}\` supplied to \`${componentName}\`, expected \`integer\`.`);
18876
+ }
18877
+ return null;
18878
+ }
18879
+ function validator(props, propName, componentName, location2) {
18880
+ const propValue = props[propName];
18881
+ if (propValue === void 0) {
18882
+ return null;
18883
+ }
18884
+ return requiredInteger(props, propName, componentName, location2);
18885
+ }
18886
+ function validatorNoop() {
18887
+ return null;
18888
+ }
18889
+ validator.isRequired = requiredInteger;
18890
+ validatorNoop.isRequired = validatorNoop;
18891
+ const integerPropType = process.env.NODE_ENV === "production" ? validatorNoop : validator;
18892
+ function generateUtilityClasses(componentName, slots, globalStatePrefix = "Mui") {
18893
+ const result = {};
18894
+ slots.forEach((slot) => {
18895
+ result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);
18896
+ });
18897
+ return result;
18898
+ }
18899
+ function getPaperUtilityClass(slot) {
18900
+ return generateUtilityClass("MuiPaper", slot);
18901
+ }
18902
+ generateUtilityClasses("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"]);
18903
+ const useUtilityClasses$3 = (ownerState) => {
18904
+ const {
18905
+ square,
18906
+ elevation,
18907
+ variant,
18908
+ classes
18909
+ } = ownerState;
18910
+ const slots = {
18911
+ root: ["root", variant, !square && "rounded", variant === "elevation" && `elevation${elevation}`]
18912
+ };
18913
+ return composeClasses(slots, getPaperUtilityClass, classes);
18914
+ };
18915
+ const PaperRoot = styled("div", {
18916
+ name: "MuiPaper",
18917
+ slot: "Root",
18918
+ overridesResolver: (props, styles2) => {
18919
+ const {
18920
+ ownerState
18921
+ } = props;
18922
+ return [styles2.root, styles2[ownerState.variant], !ownerState.square && styles2.rounded, ownerState.variant === "elevation" && styles2[`elevation${ownerState.elevation}`]];
18923
+ }
18924
+ })(memoTheme(({
18925
+ theme
18926
+ }) => ({
18927
+ backgroundColor: (theme.vars || theme).palette.background.paper,
18928
+ color: (theme.vars || theme).palette.text.primary,
18929
+ transition: theme.transitions.create("box-shadow"),
18930
+ variants: [{
18931
+ props: ({
18932
+ ownerState
18933
+ }) => !ownerState.square,
18934
+ style: {
18935
+ borderRadius: theme.shape.borderRadius
18936
+ }
18937
+ }, {
18938
+ props: {
18939
+ variant: "outlined"
18940
+ },
18941
+ style: {
18942
+ border: `1px solid ${(theme.vars || theme).palette.divider}`
18943
+ }
18944
+ }, {
18945
+ props: {
18946
+ variant: "elevation"
18947
+ },
18948
+ style: {
18949
+ boxShadow: "var(--Paper-shadow)",
18950
+ backgroundImage: "var(--Paper-overlay)"
18951
+ }
18952
+ }]
18953
+ })));
18954
+ const Paper = /* @__PURE__ */ React.forwardRef(function Paper2(inProps, ref) {
18955
+ const props = useDefaultProps({
18956
+ props: inProps,
18957
+ name: "MuiPaper"
18958
+ });
18959
+ const theme = useTheme();
18960
+ const {
18961
+ className,
18962
+ component = "div",
18963
+ elevation = 1,
18964
+ square = false,
18965
+ variant = "elevation",
18966
+ ...other
18967
+ } = props;
18968
+ const ownerState = {
18969
+ ...props,
18970
+ component,
18971
+ elevation,
18972
+ square,
18973
+ variant
18974
+ };
18975
+ const classes = useUtilityClasses$3(ownerState);
18976
+ if (process.env.NODE_ENV !== "production") {
18977
+ if (theme.shadows[elevation] === void 0) {
18978
+ console.error([`MUI: The elevation provided <Paper elevation={${elevation}}> is not available in the theme.`, `Please make sure that \`theme.shadows[${elevation}]\` is defined.`].join("\n"));
18979
+ }
18980
+ }
18981
+ return /* @__PURE__ */ jsx(PaperRoot, {
18982
+ as: component,
18983
+ ownerState,
18984
+ className: clsx(classes.root, className),
18985
+ ref,
18986
+ ...other,
18987
+ style: {
18988
+ ...variant === "elevation" && {
18989
+ "--Paper-shadow": (theme.vars || theme).shadows[elevation],
18990
+ ...theme.vars && {
18991
+ "--Paper-overlay": theme.vars.overlays?.[elevation]
18992
+ },
18993
+ ...!theme.vars && theme.palette.mode === "dark" && {
18994
+ "--Paper-overlay": `linear-gradient(${alpha$1("#fff", getOverlayAlpha(elevation))}, ${alpha$1("#fff", getOverlayAlpha(elevation))})`
18995
+ }
18996
+ },
18997
+ ...other.style
18998
+ }
18999
+ });
19000
+ });
19001
+ process.env.NODE_ENV !== "production" ? Paper.propTypes = {
19002
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
19003
+ // │ These PropTypes are generated from the TypeScript type definitions. │
19004
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
19005
+ // └─────────────────────────────────────────────────────────────────────┘
19006
+ /**
19007
+ * The content of the component.
19008
+ */
19009
+ children: PropTypes.node,
19010
+ /**
19011
+ * Override or extend the styles applied to the component.
19012
+ */
19013
+ classes: PropTypes.object,
19014
+ /**
19015
+ * @ignore
19016
+ */
19017
+ className: PropTypes.string,
19018
+ /**
19019
+ * The component used for the root node.
19020
+ * Either a string to use a HTML element or a component.
19021
+ */
19022
+ component: PropTypes.elementType,
19023
+ /**
19024
+ * Shadow depth, corresponds to `dp` in the spec.
19025
+ * It accepts values between 0 and 24 inclusive.
19026
+ * @default 1
19027
+ */
19028
+ elevation: chainPropTypes(integerPropType, (props) => {
19029
+ const {
19030
+ elevation,
19031
+ variant
19032
+ } = props;
19033
+ if (elevation > 0 && variant === "outlined") {
19034
+ return new Error(`MUI: Combining \`elevation={${elevation}}\` with \`variant="${variant}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`);
19035
+ }
19036
+ return null;
19037
+ }),
19038
+ /**
19039
+ * If `true`, rounded corners are disabled.
19040
+ * @default false
19041
+ */
19042
+ square: PropTypes.bool,
19043
+ /**
19044
+ * @ignore
19045
+ */
19046
+ style: PropTypes.object,
19047
+ /**
19048
+ * The system prop that allows defining system overrides as well as additional CSS styles.
19049
+ */
19050
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
19051
+ /**
19052
+ * The variant to use.
19053
+ * @default 'elevation'
19054
+ */
19055
+ variant: PropTypes.oneOfType([PropTypes.oneOf(["elevation", "outlined"]), PropTypes.string])
19056
+ } : void 0;
19057
+ function getSnackbarContentUtilityClass(slot) {
19058
+ return generateUtilityClass("MuiSnackbarContent", slot);
19059
+ }
19060
+ generateUtilityClasses("MuiSnackbarContent", ["root", "message", "action"]);
19061
+ const useUtilityClasses$2 = (ownerState) => {
19062
+ const {
19063
+ classes
19064
+ } = ownerState;
19065
+ const slots = {
19066
+ root: ["root"],
19067
+ action: ["action"],
19068
+ message: ["message"]
19069
+ };
19070
+ return composeClasses(slots, getSnackbarContentUtilityClass, classes);
19071
+ };
19072
+ const SnackbarContentRoot = styled(Paper, {
19073
+ name: "MuiSnackbarContent",
19074
+ slot: "Root"
19075
+ })(memoTheme(({
19076
+ theme
19077
+ }) => {
19078
+ const emphasis = theme.palette.mode === "light" ? 0.8 : 0.98;
19079
+ return {
19080
+ ...theme.typography.body2,
19081
+ color: theme.vars ? theme.vars.palette.SnackbarContent.color : theme.palette.getContrastText(emphasize(theme.palette.background.default, emphasis)),
19082
+ backgroundColor: theme.vars ? theme.vars.palette.SnackbarContent.bg : emphasize(theme.palette.background.default, emphasis),
19083
+ display: "flex",
19084
+ alignItems: "center",
19085
+ flexWrap: "wrap",
19086
+ padding: "6px 16px",
19087
+ flexGrow: 1,
19088
+ [theme.breakpoints.up("sm")]: {
19089
+ flexGrow: "initial",
19090
+ minWidth: 288
19091
+ }
19092
+ };
19093
+ }));
19094
+ const SnackbarContentMessage = styled("div", {
19095
+ name: "MuiSnackbarContent",
19096
+ slot: "Message"
19097
+ })({
19098
+ padding: "8px 0"
19099
+ });
19100
+ const SnackbarContentAction = styled("div", {
19101
+ name: "MuiSnackbarContent",
19102
+ slot: "Action"
19103
+ })({
19104
+ display: "flex",
19105
+ alignItems: "center",
19106
+ marginLeft: "auto",
19107
+ paddingLeft: 16,
19108
+ marginRight: -8
19109
+ });
19110
+ const SnackbarContent = /* @__PURE__ */ React.forwardRef(function SnackbarContent2(inProps, ref) {
19111
+ const props = useDefaultProps({
19112
+ props: inProps,
19113
+ name: "MuiSnackbarContent"
19114
+ });
19115
+ const {
19116
+ action,
19117
+ className,
19118
+ message,
19119
+ role = "alert",
19120
+ ...other
19121
+ } = props;
19122
+ const ownerState = props;
19123
+ const classes = useUtilityClasses$2(ownerState);
19124
+ return /* @__PURE__ */ jsxs(SnackbarContentRoot, {
19125
+ role,
19126
+ elevation: 6,
19127
+ className: clsx(classes.root, className),
19128
+ ownerState,
19129
+ ref,
19130
+ ...other,
19131
+ children: [/* @__PURE__ */ jsx(SnackbarContentMessage, {
19132
+ className: classes.message,
19133
+ ownerState,
19134
+ children: message
19135
+ }), action ? /* @__PURE__ */ jsx(SnackbarContentAction, {
19136
+ className: classes.action,
19137
+ ownerState,
19138
+ children: action
19139
+ }) : null]
19140
+ });
19141
+ });
19142
+ process.env.NODE_ENV !== "production" ? SnackbarContent.propTypes = {
19143
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
19144
+ // │ These PropTypes are generated from the TypeScript type definitions. │
19145
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
19146
+ // └─────────────────────────────────────────────────────────────────────┘
19147
+ /**
19148
+ * The action to display. It renders after the message, at the end of the snackbar.
19149
+ */
19150
+ action: PropTypes.node,
19151
+ /**
19152
+ * Override or extend the styles applied to the component.
19153
+ */
19154
+ classes: PropTypes.object,
19155
+ /**
19156
+ * @ignore
19157
+ */
19158
+ className: PropTypes.string,
19159
+ /**
19160
+ * The message to display.
19161
+ */
19162
+ message: PropTypes.node,
19163
+ /**
19164
+ * The ARIA role attribute of the element.
19165
+ * @default 'alert'
19166
+ */
19167
+ role: PropTypes.string,
19168
+ /**
19169
+ * The system prop that allows defining system overrides as well as additional CSS styles.
19170
+ */
19171
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
19172
+ } : void 0;
19173
+ function getSnackbarUtilityClass(slot) {
19174
+ return generateUtilityClass("MuiSnackbar", slot);
19175
+ }
19176
+ generateUtilityClasses("MuiSnackbar", ["root", "anchorOriginTopCenter", "anchorOriginBottomCenter", "anchorOriginTopRight", "anchorOriginBottomRight", "anchorOriginTopLeft", "anchorOriginBottomLeft"]);
19177
+ function isHostComponent(element) {
19178
+ return typeof element === "string";
19179
+ }
19180
+ function appendOwnerState(elementType, otherProps, ownerState) {
19181
+ if (elementType === void 0 || isHostComponent(elementType)) {
19182
+ return otherProps;
19183
+ }
19184
+ return {
19185
+ ...otherProps,
19186
+ ownerState: {
19187
+ ...otherProps.ownerState,
19188
+ ...ownerState
19189
+ }
19190
+ };
19191
+ }
19192
+ function resolveComponentProps(componentProps, ownerState, slotState) {
19193
+ if (typeof componentProps === "function") {
19194
+ return componentProps(ownerState, slotState);
19195
+ }
19196
+ return componentProps;
19197
+ }
19198
+ function omitEventHandlers(object2) {
19199
+ if (object2 === void 0) {
19200
+ return {};
19201
+ }
19202
+ const result = {};
19203
+ Object.keys(object2).filter((prop) => !(prop.match(/^on[A-Z]/) && typeof object2[prop] === "function")).forEach((prop) => {
19204
+ result[prop] = object2[prop];
19205
+ });
19206
+ return result;
19207
+ }
19208
+ function mergeSlotProps(parameters) {
19209
+ const {
19210
+ getSlotProps,
19211
+ additionalProps,
19212
+ externalSlotProps,
19213
+ externalForwardedProps,
19214
+ className
19215
+ } = parameters;
19216
+ if (!getSlotProps) {
19217
+ const joinedClasses2 = clsx(additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);
19218
+ const mergedStyle2 = {
19219
+ ...additionalProps?.style,
19220
+ ...externalForwardedProps?.style,
19221
+ ...externalSlotProps?.style
19222
+ };
19223
+ const props2 = {
19224
+ ...additionalProps,
19225
+ ...externalForwardedProps,
19226
+ ...externalSlotProps
19227
+ };
19228
+ if (joinedClasses2.length > 0) {
19229
+ props2.className = joinedClasses2;
19230
+ }
19231
+ if (Object.keys(mergedStyle2).length > 0) {
19232
+ props2.style = mergedStyle2;
19233
+ }
19234
+ return {
19235
+ props: props2,
19236
+ internalRef: void 0
19237
+ };
19238
+ }
19239
+ const eventHandlers = extractEventHandlers({
19240
+ ...externalForwardedProps,
19241
+ ...externalSlotProps
19242
+ });
19243
+ const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps);
19244
+ const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps);
19245
+ const internalSlotProps = getSlotProps(eventHandlers);
19246
+ const joinedClasses = clsx(internalSlotProps?.className, additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);
19247
+ const mergedStyle = {
19248
+ ...internalSlotProps?.style,
19249
+ ...additionalProps?.style,
19250
+ ...externalForwardedProps?.style,
19251
+ ...externalSlotProps?.style
19252
+ };
19253
+ const props = {
19254
+ ...internalSlotProps,
19255
+ ...additionalProps,
19256
+ ...otherPropsWithoutEventHandlers,
19257
+ ...componentsPropsWithoutEventHandlers
19258
+ };
19259
+ if (joinedClasses.length > 0) {
19260
+ props.className = joinedClasses;
19261
+ }
19262
+ if (Object.keys(mergedStyle).length > 0) {
19263
+ props.style = mergedStyle;
19264
+ }
19265
+ return {
19266
+ props,
19267
+ internalRef: internalSlotProps.ref
19268
+ };
19269
+ }
19270
+ function useSlot(name2, parameters) {
19271
+ const {
19272
+ className,
19273
+ elementType: initialElementType,
19274
+ ownerState,
19275
+ externalForwardedProps,
19276
+ internalForwardedProps,
19277
+ shouldForwardComponentProp = false,
19278
+ ...useSlotPropsParams
19279
+ } = parameters;
19280
+ const {
19281
+ component: rootComponent,
19282
+ slots = {
19283
+ [name2]: void 0
19284
+ },
19285
+ slotProps = {
19286
+ [name2]: void 0
19287
+ },
19288
+ ...other
19289
+ } = externalForwardedProps;
19290
+ const elementType = slots[name2] || initialElementType;
19291
+ const resolvedComponentsProps = resolveComponentProps(slotProps[name2], ownerState);
19292
+ const {
19293
+ props: {
19294
+ component: slotComponent,
19295
+ ...mergedProps
19296
+ },
19297
+ internalRef
19298
+ } = mergeSlotProps({
19299
+ className,
19300
+ ...useSlotPropsParams,
19301
+ externalForwardedProps: name2 === "root" ? other : void 0,
19302
+ externalSlotProps: resolvedComponentsProps
19303
+ });
19304
+ const ref = useForkRef(internalRef, resolvedComponentsProps?.ref, parameters.ref);
19305
+ const LeafComponent = name2 === "root" ? slotComponent || rootComponent : slotComponent;
19306
+ const props = appendOwnerState(elementType, {
19307
+ ...name2 === "root" && !rootComponent && !slots[name2] && internalForwardedProps,
19308
+ ...name2 !== "root" && !slots[name2] && internalForwardedProps,
19309
+ ...mergedProps,
19310
+ ...LeafComponent && !shouldForwardComponentProp && {
19311
+ as: LeafComponent
19312
+ },
19313
+ ...LeafComponent && shouldForwardComponentProp && {
19314
+ component: LeafComponent
19315
+ },
19316
+ ref
19317
+ }, ownerState);
19318
+ return [elementType, props];
19319
+ }
19320
+ const useUtilityClasses$1 = (ownerState) => {
19321
+ const {
19322
+ classes,
19323
+ anchorOrigin
19324
+ } = ownerState;
19325
+ const slots = {
19326
+ root: ["root", `anchorOrigin${capitalize(anchorOrigin.vertical)}${capitalize(anchorOrigin.horizontal)}`]
19327
+ };
19328
+ return composeClasses(slots, getSnackbarUtilityClass, classes);
19329
+ };
19330
+ const SnackbarRoot = styled("div", {
19331
+ name: "MuiSnackbar",
19332
+ slot: "Root",
19333
+ overridesResolver: (props, styles2) => {
19334
+ const {
19335
+ ownerState
19336
+ } = props;
19337
+ return [styles2.root, styles2[`anchorOrigin${capitalize(ownerState.anchorOrigin.vertical)}${capitalize(ownerState.anchorOrigin.horizontal)}`]];
19338
+ }
19339
+ })(memoTheme(({
19340
+ theme
19341
+ }) => ({
19342
+ zIndex: (theme.vars || theme).zIndex.snackbar,
19343
+ position: "fixed",
19344
+ display: "flex",
19345
+ left: 8,
19346
+ right: 8,
19347
+ justifyContent: "center",
19348
+ alignItems: "center",
19349
+ variants: [{
19350
+ props: ({
19351
+ ownerState
19352
+ }) => ownerState.anchorOrigin.vertical === "top",
19353
+ style: {
19354
+ top: 8,
19355
+ [theme.breakpoints.up("sm")]: {
19356
+ top: 24
19357
+ }
19358
+ }
19359
+ }, {
19360
+ props: ({
19361
+ ownerState
19362
+ }) => ownerState.anchorOrigin.vertical !== "top",
19363
+ style: {
19364
+ bottom: 8,
19365
+ [theme.breakpoints.up("sm")]: {
19366
+ bottom: 24
19367
+ }
19368
+ }
19369
+ }, {
19370
+ props: ({
19371
+ ownerState
19372
+ }) => ownerState.anchorOrigin.horizontal === "left",
19373
+ style: {
19374
+ justifyContent: "flex-start",
19375
+ [theme.breakpoints.up("sm")]: {
19376
+ left: 24,
19377
+ right: "auto"
19378
+ }
19379
+ }
19380
+ }, {
19381
+ props: ({
19382
+ ownerState
19383
+ }) => ownerState.anchorOrigin.horizontal === "right",
19384
+ style: {
19385
+ justifyContent: "flex-end",
19386
+ [theme.breakpoints.up("sm")]: {
19387
+ right: 24,
19388
+ left: "auto"
19389
+ }
19390
+ }
19391
+ }, {
19392
+ props: ({
19393
+ ownerState
19394
+ }) => ownerState.anchorOrigin.horizontal === "center",
19395
+ style: {
19396
+ [theme.breakpoints.up("sm")]: {
19397
+ left: "50%",
19398
+ right: "auto",
19399
+ transform: "translateX(-50%)"
19400
+ }
19401
+ }
19402
+ }]
19403
+ })));
19404
+ const Snackbar = /* @__PURE__ */ React.forwardRef(function Snackbar2(inProps, ref) {
19405
+ const props = useDefaultProps({
19406
+ props: inProps,
19407
+ name: "MuiSnackbar"
19408
+ });
19409
+ const theme = useTheme();
19410
+ const defaultTransitionDuration = {
19411
+ enter: theme.transitions.duration.enteringScreen,
19412
+ exit: theme.transitions.duration.leavingScreen
19413
+ };
19414
+ const {
19415
+ action,
19416
+ anchorOrigin: {
19417
+ vertical,
19418
+ horizontal
19419
+ } = {
19420
+ vertical: "bottom",
19421
+ horizontal: "left"
19422
+ },
19423
+ autoHideDuration = null,
19424
+ children,
19425
+ className,
19426
+ ClickAwayListenerProps: ClickAwayListenerPropsProp,
19427
+ ContentProps: ContentPropsProp,
19428
+ disableWindowBlurListener = false,
19429
+ message,
19430
+ onBlur,
19431
+ onClose,
19432
+ onFocus,
19433
+ onMouseEnter,
19434
+ onMouseLeave,
19435
+ open,
19436
+ resumeHideDuration,
19437
+ slots = {},
19438
+ slotProps = {},
19439
+ TransitionComponent: TransitionComponentProp,
19440
+ transitionDuration = defaultTransitionDuration,
19441
+ TransitionProps: {
19442
+ onEnter,
19443
+ onExited,
19444
+ ...TransitionPropsProp
19445
+ } = {},
19446
+ ...other
19447
+ } = props;
19448
+ const ownerState = {
19449
+ ...props,
19450
+ anchorOrigin: {
19451
+ vertical,
19452
+ horizontal
19453
+ },
19454
+ autoHideDuration,
19455
+ disableWindowBlurListener,
19456
+ TransitionComponent: TransitionComponentProp,
19457
+ transitionDuration
19458
+ };
19459
+ const classes = useUtilityClasses$1(ownerState);
19460
+ const {
19461
+ getRootProps,
19462
+ onClickAway
19463
+ } = useSnackbar$1({
19464
+ ...ownerState
19465
+ });
19466
+ const [exited, setExited] = React.useState(true);
19467
+ const handleExited = (node) => {
19468
+ setExited(true);
19469
+ if (onExited) {
19470
+ onExited(node);
19471
+ }
19472
+ };
19473
+ const handleEnter = (node, isAppearing) => {
19474
+ setExited(false);
19475
+ if (onEnter) {
19476
+ onEnter(node, isAppearing);
19477
+ }
19478
+ };
19479
+ const externalForwardedProps = {
19480
+ slots: {
19481
+ transition: TransitionComponentProp,
19482
+ ...slots
19483
+ },
19484
+ slotProps: {
19485
+ content: ContentPropsProp,
19486
+ clickAwayListener: ClickAwayListenerPropsProp,
19487
+ transition: TransitionPropsProp,
19488
+ ...slotProps
19489
+ }
19490
+ };
19491
+ const [Root, rootProps] = useSlot("root", {
19492
+ ref,
19493
+ className: [classes.root, className],
19494
+ elementType: SnackbarRoot,
19495
+ getSlotProps: getRootProps,
19496
+ externalForwardedProps: {
19497
+ ...externalForwardedProps,
19498
+ ...other
19499
+ },
19500
+ ownerState
19501
+ });
19502
+ const [ClickAwaySlot, {
19503
+ ownerState: clickAwayOwnerStateProp,
19504
+ ...clickAwayListenerProps
19505
+ }] = useSlot("clickAwayListener", {
19506
+ elementType: ClickAwayListener,
19507
+ externalForwardedProps,
19508
+ getSlotProps: (handlers) => ({
19509
+ onClickAway: (...params) => {
19510
+ const event = params[0];
19511
+ handlers.onClickAway?.(...params);
19512
+ if (event?.defaultMuiPrevented) {
19513
+ return;
19514
+ }
19515
+ onClickAway(...params);
19516
+ }
19517
+ }),
19518
+ ownerState
19519
+ });
19520
+ const [ContentSlot, contentSlotProps] = useSlot("content", {
19521
+ elementType: SnackbarContent,
19522
+ shouldForwardComponentProp: true,
19523
+ externalForwardedProps,
19524
+ additionalProps: {
19525
+ message,
19526
+ action
19527
+ },
19528
+ ownerState
19529
+ });
19530
+ const [TransitionSlot, transitionProps] = useSlot("transition", {
19531
+ elementType: Grow,
19532
+ externalForwardedProps,
19533
+ getSlotProps: (handlers) => ({
19534
+ onEnter: (...params) => {
19535
+ handlers.onEnter?.(...params);
19536
+ handleEnter(...params);
19537
+ },
19538
+ onExited: (...params) => {
19539
+ handlers.onExited?.(...params);
19540
+ handleExited(...params);
19541
+ }
19542
+ }),
19543
+ additionalProps: {
19544
+ appear: true,
19545
+ in: open,
19546
+ timeout: transitionDuration,
19547
+ direction: vertical === "top" ? "down" : "up"
19548
+ },
19549
+ ownerState
19550
+ });
19551
+ if (!open && exited) {
19552
+ return null;
19553
+ }
19554
+ return /* @__PURE__ */ jsx(ClickAwaySlot, {
19555
+ ...clickAwayListenerProps,
19556
+ ...slots.clickAwayListener && {
19557
+ ownerState: clickAwayOwnerStateProp
19558
+ },
19559
+ children: /* @__PURE__ */ jsx(Root, {
19560
+ ...rootProps,
19561
+ children: /* @__PURE__ */ jsx(TransitionSlot, {
19562
+ ...transitionProps,
19563
+ children: children || /* @__PURE__ */ jsx(ContentSlot, {
19564
+ ...contentSlotProps
19565
+ })
19566
+ })
19567
+ })
19568
+ });
19569
+ });
19570
+ process.env.NODE_ENV !== "production" ? Snackbar.propTypes = {
17731
19571
  // ┌────────────────────────────── Warning ──────────────────────────────┐
17732
19572
  // │ These PropTypes are generated from the TypeScript type definitions. │
17733
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`.
19573
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`.
17734
19574
  // └─────────────────────────────────────────────────────────────────────┘
19575
+ /**
19576
+ * The action to display. It renders after the message, at the end of the snackbar.
19577
+ */
19578
+ action: PropTypes.node,
19579
+ /**
19580
+ * The anchor of the `Snackbar`.
19581
+ * On smaller screens, the component grows to occupy all the available width,
19582
+ * the horizontal alignment is ignored.
19583
+ * @default { vertical: 'bottom', horizontal: 'left' }
19584
+ */
19585
+ anchorOrigin: PropTypes.shape({
19586
+ horizontal: PropTypes.oneOf(["center", "left", "right"]).isRequired,
19587
+ vertical: PropTypes.oneOf(["bottom", "top"]).isRequired
19588
+ }),
19589
+ /**
19590
+ * The number of milliseconds to wait before automatically calling the
19591
+ * `onClose` function. `onClose` should then set the state of the `open`
19592
+ * prop to hide the Snackbar. This behavior is disabled by default with
19593
+ * the `null` value.
19594
+ * @default null
19595
+ */
19596
+ autoHideDuration: PropTypes.number,
19597
+ /**
19598
+ * Replace the `SnackbarContent` component.
19599
+ */
19600
+ children: PropTypes.element,
19601
+ /**
19602
+ * Override or extend the styles applied to the component.
19603
+ */
19604
+ classes: PropTypes.object,
17735
19605
  /**
17736
19606
  * @ignore
17737
19607
  */
17738
- children: PropTypes.node,
19608
+ className: PropTypes.string,
19609
+ /**
19610
+ * Props applied to the `ClickAwayListener` element.
19611
+ * @deprecated Use `slotProps.clickAwayListener` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
19612
+ */
19613
+ ClickAwayListenerProps: PropTypes.object,
19614
+ /**
19615
+ * Props applied to the [`SnackbarContent`](https://mui.com/material-ui/api/snackbar-content/) element.
19616
+ * @deprecated Use `slotProps.content` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
19617
+ */
19618
+ ContentProps: PropTypes.object,
19619
+ /**
19620
+ * If `true`, the `autoHideDuration` timer will expire even if the window is not focused.
19621
+ * @default false
19622
+ */
19623
+ disableWindowBlurListener: PropTypes.bool,
19624
+ /**
19625
+ * When displaying multiple consecutive snackbars using a single parent-rendered
19626
+ * `<Snackbar/>`, add the `key` prop to ensure independent treatment of each message.
19627
+ * For instance, use `<Snackbar key={message} />`. Otherwise, messages might update
19628
+ * in place, and features like `autoHideDuration` could be affected.
19629
+ */
19630
+ key: () => null,
19631
+ /**
19632
+ * The message to display.
19633
+ */
19634
+ message: PropTypes.node,
17739
19635
  /**
17740
19636
  * @ignore
17741
19637
  */
17742
- value: PropTypes.object.isRequired
19638
+ onBlur: PropTypes.func,
19639
+ /**
19640
+ * Callback fired when the component requests to be closed.
19641
+ * Typically `onClose` is used to set state in the parent component,
19642
+ * which is used to control the `Snackbar` `open` prop.
19643
+ * The `reason` parameter can optionally be used to control the response to `onClose`,
19644
+ * for example ignoring `clickaway`.
19645
+ *
19646
+ * @param {React.SyntheticEvent<any> | Event} event The event source of the callback.
19647
+ * @param {string} reason Can be: `"timeout"` (`autoHideDuration` expired), `"clickaway"`, or `"escapeKeyDown"`.
19648
+ */
19649
+ onClose: PropTypes.func,
19650
+ /**
19651
+ * @ignore
19652
+ */
19653
+ onFocus: PropTypes.func,
19654
+ /**
19655
+ * @ignore
19656
+ */
19657
+ onMouseEnter: PropTypes.func,
19658
+ /**
19659
+ * @ignore
19660
+ */
19661
+ onMouseLeave: PropTypes.func,
19662
+ /**
19663
+ * If `true`, the component is shown.
19664
+ */
19665
+ open: PropTypes.bool,
19666
+ /**
19667
+ * The number of milliseconds to wait before dismissing after user interaction.
19668
+ * If `autoHideDuration` prop isn't specified, it does nothing.
19669
+ * If `autoHideDuration` prop is specified but `resumeHideDuration` isn't,
19670
+ * we default to `autoHideDuration / 2` ms.
19671
+ */
19672
+ resumeHideDuration: PropTypes.number,
19673
+ /**
19674
+ * The props used for each slot inside.
19675
+ * @default {}
19676
+ */
19677
+ slotProps: PropTypes.shape({
19678
+ clickAwayListener: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
19679
+ content: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
19680
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
19681
+ transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
19682
+ }),
19683
+ /**
19684
+ * The components used for each slot inside.
19685
+ * @default {}
19686
+ */
19687
+ slots: PropTypes.shape({
19688
+ clickAwayListener: PropTypes.elementType,
19689
+ content: PropTypes.elementType,
19690
+ root: PropTypes.elementType,
19691
+ transition: PropTypes.elementType
19692
+ }),
19693
+ /**
19694
+ * The system prop that allows defining system overrides as well as additional CSS styles.
19695
+ */
19696
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
19697
+ /**
19698
+ * The component used for the transition.
19699
+ * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
19700
+ * @deprecated Use `slots.transition` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
19701
+ * @default Grow
19702
+ */
19703
+ TransitionComponent: PropTypes.elementType,
19704
+ /**
19705
+ * The duration for the transition, in milliseconds.
19706
+ * You may specify a single timeout for all transitions, or individually with an object.
19707
+ * @default {
19708
+ * enter: theme.transitions.duration.enteringScreen,
19709
+ * exit: theme.transitions.duration.leavingScreen,
19710
+ * }
19711
+ */
19712
+ transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
19713
+ appear: PropTypes.number,
19714
+ enter: PropTypes.number,
19715
+ exit: PropTypes.number
19716
+ })]),
19717
+ /**
19718
+ * Props applied to the transition element.
19719
+ * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
19720
+ * @deprecated Use `slotProps.transition` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
19721
+ * @default {}
19722
+ */
19723
+ TransitionProps: PropTypes.object
17743
19724
  } : void 0;
17744
- function useDefaultProps(params) {
17745
- return useDefaultProps$1(params);
17746
- }
17747
- function generateUtilityClasses(componentName, slots, globalStatePrefix = "Mui") {
17748
- const result = {};
17749
- slots.forEach((slot) => {
17750
- result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);
17751
- });
17752
- return result;
17753
- }
17754
19725
  var SnackbarType = /* @__PURE__ */ ((SnackbarType2) => {
17755
19726
  SnackbarType2["INFO"] = "info";
17756
19727
  SnackbarType2["SUCCESS"] = "success";
@@ -17758,10 +19729,61 @@ var SnackbarType = /* @__PURE__ */ ((SnackbarType2) => {
17758
19729
  SnackbarType2["WARNING"] = "warning";
17759
19730
  return SnackbarType2;
17760
19731
  })(SnackbarType || {});
17761
- const SnackbarContext = createContext(void 0);
19732
+ const SnackbarContext = createContext(
19733
+ void 0
19734
+ );
19735
+ const SnackbarProvider = ({
19736
+ children
19737
+ }) => {
19738
+ const [snackbar, setSnackbar] = useState(
19739
+ {
19740
+ open: false,
19741
+ message: "",
19742
+ type: "info"
19743
+ /* INFO */
19744
+ }
19745
+ );
19746
+ const showSnackbar = (params) => {
19747
+ setSnackbar({
19748
+ open: true,
19749
+ ...params
19750
+ });
19751
+ };
19752
+ const handleClose = () => {
19753
+ setSnackbar({ ...snackbar, open: false });
19754
+ };
19755
+ return /* @__PURE__ */ jsxs(SnackbarContext.Provider, { value: { showSnackbar }, children: [
19756
+ children,
19757
+ /* @__PURE__ */ jsx(
19758
+ Snackbar,
19759
+ {
19760
+ anchorOrigin: { vertical: "bottom", horizontal: "right" },
19761
+ sx: {
19762
+ "&.MuiSnackbar-root": {
19763
+ bottom: STYLE.PADDING_GAP_LAYOUT,
19764
+ right: STYLE.PADDING_GAP_LAYOUT
19765
+ }
19766
+ },
19767
+ open: snackbar.open,
19768
+ autoHideDuration: 6e3,
19769
+ onClose: handleClose,
19770
+ children: /* @__PURE__ */ jsx(
19771
+ Alert,
19772
+ {
19773
+ sx: { borderRadius: STYLE.BORDER_RADIUS_ELEMENT, boxShadow: 1 },
19774
+ onClose: handleClose,
19775
+ severity: snackbar.type,
19776
+ children: snackbar.message
19777
+ }
19778
+ )
19779
+ }
19780
+ )
19781
+ ] });
19782
+ };
17762
19783
  const useSnackbar = () => {
17763
19784
  const context = useContext(SnackbarContext);
17764
- if (!context) throw new Error("useSnackbar must be used within a SnackbarProvider");
19785
+ if (!context)
19786
+ throw new Error("useSnackbar must be used within a SnackbarProvider");
17765
19787
  return context;
17766
19788
  };
17767
19789
  const useTagSelector = (movementId) => {
@@ -17775,11 +19797,15 @@ const useTagSelector = (movementId) => {
17775
19797
  const { showSnackbar } = useSnackbar();
17776
19798
  useEffect(() => {
17777
19799
  if (searchQuery.trim()) {
17778
- const filtered = users.filter((user) => user.name.toLowerCase().includes(searchQuery.toLowerCase())).filter((user) => !taggedUserIds.has(user.id));
19800
+ const filtered = users.filter(
19801
+ (user) => user.name.toLowerCase().includes(searchQuery.toLowerCase())
19802
+ ).filter((user) => !taggedUserIds.has(user.id));
17779
19803
  setFilteredUsers(filtered);
17780
19804
  setSelectedUserIndex(0);
17781
19805
  } else {
17782
- const availableUsers = users.filter((user) => !taggedUserIds.has(user?.id));
19806
+ const availableUsers = users.filter(
19807
+ (user) => !taggedUserIds.has(user?.id)
19808
+ );
17783
19809
  setFilteredUsers(availableUsers);
17784
19810
  setSelectedUserIndex(0);
17785
19811
  }
@@ -17795,7 +19821,10 @@ const useTagSelector = (movementId) => {
17795
19821
  const spaceIndex = afterAt?.indexOf(" ");
17796
19822
  if (spaceIndex === -1) {
17797
19823
  setSearchQuery(afterAt);
17798
- setTagPosition({ start: lastAtSymbol, end: lastAtSymbol + afterAt.length + 1 });
19824
+ setTagPosition({
19825
+ start: lastAtSymbol,
19826
+ end: lastAtSymbol + afterAt.length + 1
19827
+ });
17799
19828
  setShowTagSelector(true);
17800
19829
  return;
17801
19830
  }
@@ -17882,7 +19911,9 @@ const useUpdateCurrentAccess = () => {
17882
19911
  async (pathname) => {
17883
19912
  const currentAccess = findCurrentAccessByPath(pathname);
17884
19913
  if (currentAccess) {
17885
- await dispatch(ACTION_ACCOUNT.updateCurrentAccess(currentAccess)).unwrap();
19914
+ await dispatch(
19915
+ ACTION_ACCOUNT.updateCurrentAccess(currentAccess)
19916
+ ).unwrap();
17886
19917
  }
17887
19918
  },
17888
19919
  [dispatch]
@@ -17919,6 +19950,44 @@ const useVersionCheck = (options) => {
17919
19950
  }
17920
19951
  }, [options?.interval]);
17921
19952
  };
19953
+ const SidebarContext = createContext(
19954
+ void 0
19955
+ );
19956
+ const SidebarProvider = ({
19957
+ children
19958
+ }) => {
19959
+ const [isCollapsed, setIsCollapsed] = useState(false);
19960
+ const [activeExpandMenu, setActiveExpandMenu] = useState(
19961
+ null
19962
+ );
19963
+ const { current_access } = useSelector(
19964
+ (state) => state.account
19965
+ );
19966
+ useEffect(() => {
19967
+ setActiveExpandMenu(null);
19968
+ }, [current_access]);
19969
+ const sidebarWidth = activeExpandMenu ? isCollapsed ? STYLE.WIDTH_COLLAPSE + STYLE.WIDTH_SIDEBAR_EXPAND : STYLE.WIDTH_SIDEBAR + STYLE.WIDTH_SIDEBAR_EXPAND : isCollapsed ? STYLE.WIDTH_COLLAPSE : STYLE.WIDTH_SIDEBAR;
19970
+ return /* @__PURE__ */ jsx(
19971
+ SidebarContext.Provider,
19972
+ {
19973
+ value: {
19974
+ isCollapsed,
19975
+ setIsCollapsed,
19976
+ activeExpandMenu,
19977
+ setActiveExpandMenu,
19978
+ sidebarWidth: `${sidebarWidth}px`
19979
+ },
19980
+ children
19981
+ }
19982
+ );
19983
+ };
19984
+ const useSidebar = () => {
19985
+ const context = useContext(SidebarContext);
19986
+ if (context === void 0) {
19987
+ throw new Error("useSidebar must be used within a SidebarProvider");
19988
+ }
19989
+ return context;
19990
+ };
17922
19991
  const AuthLayout = ({ children }) => {
17923
19992
  return /* @__PURE__ */ jsx(
17924
19993
  Stack$1,
@@ -18268,7 +20337,7 @@ const TooltipOnClickElement = ({
18268
20337
  }) => {
18269
20338
  return (
18270
20339
  // Chỗ này có thể là bug, onClickAway apply ngay cả khi component chưa được render
18271
- /* @__PURE__ */ jsx(ClickAwayListener, { onClickAway, children: /* @__PURE__ */ jsx(
20340
+ /* @__PURE__ */ jsx(ClickAwayListener$1, { onClickAway, children: /* @__PURE__ */ jsx(
18272
20341
  Tooltip,
18273
20342
  {
18274
20343
  PopperProps: { disablePortal: true },
@@ -18373,11 +20442,11 @@ const useUtilityClasses = (ownerState) => {
18373
20442
  const CircularProgressRoot = styled("span", {
18374
20443
  name: "MuiCircularProgress",
18375
20444
  slot: "Root",
18376
- overridesResolver: (props, styles) => {
20445
+ overridesResolver: (props, styles2) => {
18377
20446
  const {
18378
20447
  ownerState
18379
20448
  } = props;
18380
- return [styles.root, styles[ownerState.variant], styles[`color${capitalize(ownerState.color)}`]];
20449
+ return [styles2.root, styles2[ownerState.variant], styles2[`color${capitalize(ownerState.color)}`]];
18381
20450
  }
18382
20451
  })(memoTheme(({
18383
20452
  theme
@@ -18416,11 +20485,11 @@ const CircularProgressSVG = styled("svg", {
18416
20485
  const CircularProgressCircle = styled("circle", {
18417
20486
  name: "MuiCircularProgress",
18418
20487
  slot: "Circle",
18419
- overridesResolver: (props, styles) => {
20488
+ overridesResolver: (props, styles2) => {
18420
20489
  const {
18421
20490
  ownerState
18422
20491
  } = props;
18423
- return [styles.circle, styles[`circle${capitalize(ownerState.variant)}`], ownerState.disableShrink && styles.circleDisableShrink];
20492
+ return [styles2.circle, styles2[`circle${capitalize(ownerState.variant)}`], ownerState.disableShrink && styles2.circleDisableShrink];
18424
20493
  }
18425
20494
  })(memoTheme(({
18426
20495
  theme
@@ -19175,8 +21244,32 @@ const MonitorPart = ({
19175
21244
  const DashboardLayout = ({
19176
21245
  children
19177
21246
  }) => {
19178
- useUpdateCurrentAccess();
19179
- return /* @__PURE__ */ jsx(MonitorPart, { children });
21247
+ const isSystemMonitor = useIsSystemMonitor();
21248
+ const { sidebarWidth } = useSidebar();
21249
+ if (isSystemMonitor) return /* @__PURE__ */ jsx(MonitorPart, { children });
21250
+ return /* @__PURE__ */ jsx(
21251
+ Stack$1,
21252
+ {
21253
+ sx: {
21254
+ minHeight: "100vh",
21255
+ width: "100%"
21256
+ },
21257
+ children: /* @__PURE__ */ jsx(Stack$1, { p: 0, gap: 0, children: /* @__PURE__ */ jsx(StackRow, { children: /* @__PURE__ */ jsx(
21258
+ Stack$1,
21259
+ {
21260
+ sx: {
21261
+ overflowY: "auto",
21262
+ marginLeft: sidebarWidth,
21263
+ width: "100%",
21264
+ transition: "margin-left 0.3s ease",
21265
+ background: "#F5F6F8",
21266
+ minHeight: `calc(100vh - ${STYLE.HEIGHT_HEADER}px)`
21267
+ },
21268
+ children
21269
+ }
21270
+ ) }) })
21271
+ }
21272
+ );
19180
21273
  };
19181
21274
  const DefaultLayout = ({ children }) => {
19182
21275
  return /* @__PURE__ */ jsx(
@@ -22098,13 +24191,13 @@ Object.assign(/* @__PURE__ */ Object.create(null), {
22098
24191
  });
22099
24192
  const isSchema = (obj) => obj && obj.__isYupSchema__;
22100
24193
  class Condition {
22101
- static fromOptions(refs, config) {
22102
- if (!config.then && !config.otherwise) throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");
24194
+ static fromOptions(refs, config2) {
24195
+ if (!config2.then && !config2.otherwise) throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");
22103
24196
  let {
22104
24197
  is,
22105
24198
  then,
22106
24199
  otherwise
22107
- } = config;
24200
+ } = config2;
22108
24201
  let check = typeof is === "function" ? is : (...values2) => values2.every((value2) => value2 === is);
22109
24202
  return new Condition(refs, (values2, schema) => {
22110
24203
  var _branch;
@@ -22190,7 +24283,7 @@ class Reference {
22190
24283
  }
22191
24284
  Reference.prototype.__isYupRef = true;
22192
24285
  const isAbsent = (value2) => value2 == null;
22193
- function createValidation(config) {
24286
+ function createValidation(config2) {
22194
24287
  function validate({
22195
24288
  value: value2,
22196
24289
  path = "",
@@ -22204,7 +24297,7 @@ function createValidation(config) {
22204
24297
  params,
22205
24298
  message,
22206
24299
  skipAbsent
22207
- } = config;
24300
+ } = config2;
22208
24301
  let {
22209
24302
  parent,
22210
24303
  context,
@@ -22272,7 +24365,7 @@ function createValidation(config) {
22272
24365
  }
22273
24366
  handleResult(result);
22274
24367
  }
22275
- validate.OPTIONS = config;
24368
+ validate.OPTIONS = config2;
22276
24369
  return validate;
22277
24370
  }
22278
24371
  function resolveParams(params, options) {
@@ -24153,37 +26246,6 @@ const NotFoundPage = ({}) => {
24153
26246
  /* @__PURE__ */ jsx(ButtonElement, { content: "Quay lại trang chủ", fullWidth: false, onClick: () => navigate(PAGE.AUTH.path) })
24154
26247
  ] });
24155
26248
  };
24156
- const SidebarContext = createContext(
24157
- void 0
24158
- );
24159
- const SidebarProvider = ({
24160
- children
24161
- }) => {
24162
- const [isCollapsed, setIsCollapsed] = useState(false);
24163
- const [activeExpandMenu, setActiveExpandMenu] = useState(
24164
- null
24165
- );
24166
- const { current_access } = useSelector(
24167
- (state) => state.account
24168
- );
24169
- useEffect(() => {
24170
- setActiveExpandMenu(null);
24171
- }, [current_access]);
24172
- const sidebarWidth = activeExpandMenu ? isCollapsed ? STYLE.WIDTH_COLLAPSE + STYLE.WIDTH_SIDEBAR_EXPAND : STYLE.WIDTH_SIDEBAR + STYLE.WIDTH_SIDEBAR_EXPAND : isCollapsed ? STYLE.WIDTH_COLLAPSE : STYLE.WIDTH_SIDEBAR;
24173
- return /* @__PURE__ */ jsx(
24174
- SidebarContext.Provider,
24175
- {
24176
- value: {
24177
- isCollapsed,
24178
- setIsCollapsed,
24179
- activeExpandMenu,
24180
- setActiveExpandMenu,
24181
- sidebarWidth: `${sidebarWidth}px`
24182
- },
24183
- children
24184
- }
24185
- );
24186
- };
24187
26249
  const LayoutGroupContext = createContext({});
24188
26250
  function useConstant(init) {
24189
26251
  const ref = useRef(null);
@@ -27508,10 +29570,10 @@ function makeLatestValues(props, context, presenceContext, scrapeMotionValues) {
27508
29570
  }
27509
29571
  return values2;
27510
29572
  }
27511
- const makeUseVisualState = (config) => (props, isStatic) => {
29573
+ const makeUseVisualState = (config2) => (props, isStatic) => {
27512
29574
  const context = useContext(MotionContext);
27513
29575
  const presenceContext = useContext(PresenceContext);
27514
- const make = () => makeState(config, props, context, presenceContext);
29576
+ const make = () => makeState(config2, props, context, presenceContext);
27515
29577
  return isStatic ? make() : useConstant(make);
27516
29578
  };
27517
29579
  function scrapeMotionValuesFromProps$1(props, prevProps, visualElement) {
@@ -29843,13 +31905,13 @@ class FlatTree {
29843
31905
  this.children.forEach(callback);
29844
31906
  }
29845
31907
  }
29846
- function delay(callback, timeout) {
31908
+ function delay(callback, timeout2) {
29847
31909
  const start = time.now();
29848
31910
  const checkElapsed = ({ timestamp }) => {
29849
31911
  const elapsed = timestamp - start;
29850
- if (elapsed >= timeout) {
31912
+ if (elapsed >= timeout2) {
29851
31913
  cancelFrame(checkElapsed);
29852
- callback(elapsed - timeout);
31914
+ callback(elapsed - timeout2);
29853
31915
  }
29854
31916
  };
29855
31917
  frame.setup(checkElapsed, true);
@@ -30835,10 +32897,10 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
30835
32897
  }
30836
32898
  const stack = this.sharedNodes.get(layoutId);
30837
32899
  stack.add(node);
30838
- const config = node.options.initialPromotionConfig;
32900
+ const config2 = node.options.initialPromotionConfig;
30839
32901
  node.promote({
30840
- transition: config ? config.transition : void 0,
30841
- preserveFollowOpacity: config && config.shouldPreserveFollowOpacity ? config.shouldPreserveFollowOpacity(node) : void 0
32902
+ transition: config2 ? config2.transition : void 0,
32903
+ preserveFollowOpacity: config2 && config2.shouldPreserveFollowOpacity ? config2.shouldPreserveFollowOpacity(node) : void 0
30842
32904
  });
30843
32905
  }
30844
32906
  isLead() {
@@ -31459,7 +33521,7 @@ const MotionBox = ({
31459
33521
  } : {};
31460
33522
  return /* @__PURE__ */ jsx(motion.div, { ...motionProps, ...getAnimationProps(), ...hoverProps, onClick, style: { ...sx }, children });
31461
33523
  };
31462
- const IconRight = (props) => /* @__PURE__ */ jsx(
33524
+ const IconLeft = (props) => /* @__PURE__ */ jsx(
31463
33525
  "svg",
31464
33526
  {
31465
33527
  width: "20",
@@ -31471,7 +33533,7 @@ const IconRight = (props) => /* @__PURE__ */ jsx(
31471
33533
  children: /* @__PURE__ */ jsx(
31472
33534
  "path",
31473
33535
  {
31474
- d: "M12 1L19 8M19 8L12 15M19 8L1 8",
33536
+ d: "M8 15L1 8M1 8L8 1M1 8L19 8",
31475
33537
  stroke: "currentColor",
31476
33538
  "stroke-width": "2",
31477
33539
  "stroke-linecap": "round",
@@ -31480,7 +33542,7 @@ const IconRight = (props) => /* @__PURE__ */ jsx(
31480
33542
  )
31481
33543
  }
31482
33544
  );
31483
- const IconLeft = (props) => /* @__PURE__ */ jsx(
33545
+ const IconRight = (props) => /* @__PURE__ */ jsx(
31484
33546
  "svg",
31485
33547
  {
31486
33548
  width: "20",
@@ -31492,7 +33554,7 @@ const IconLeft = (props) => /* @__PURE__ */ jsx(
31492
33554
  children: /* @__PURE__ */ jsx(
31493
33555
  "path",
31494
33556
  {
31495
- d: "M8 15L1 8M1 8L8 1M1 8L19 8",
33557
+ d: "M12 1L19 8M19 8L12 15M19 8L1 8",
31496
33558
  stroke: "currentColor",
31497
33559
  "stroke-width": "2",
31498
33560
  "stroke-linecap": "round",
@@ -31521,12 +33583,25 @@ const AppGrid = ({
31521
33583
  const pageSize = Math.max(1, columns * Math.max(1, rows));
31522
33584
  const totalPages = Math.max(1, Math.ceil(apps.length / pageSize));
31523
33585
  const [page, setPage] = React__default.useState(0);
33586
+ const { user } = useSelector((state) => state.account);
31524
33587
  React__default.useEffect(() => {
31525
33588
  setPage((prev) => prev >= totalPages ? totalPages - 1 : prev);
31526
33589
  }, [totalPages, columns, rows, apps.length]);
31527
33590
  const start = page * pageSize;
31528
33591
  const end = start + pageSize;
31529
33592
  const visibleApps = totalPages > 1 ? apps.slice(start, end) : apps;
33593
+ const findLink = (app2) => {
33594
+ if (!app2.children?.length) {
33595
+ return app2.path;
33596
+ }
33597
+ for (const i of app2.children || []) {
33598
+ if (user?.type && i.allowUserTypes.includes(user?.type)) {
33599
+ if (i.path) {
33600
+ return `${i.path}`;
33601
+ }
33602
+ }
33603
+ }
33604
+ };
31530
33605
  return /* @__PURE__ */ jsxs(Box, { sx: { position: "relative" }, children: [
31531
33606
  /* @__PURE__ */ jsx(
31532
33607
  Box,
@@ -31538,62 +33613,73 @@ const AppGrid = ({
31538
33613
  },
31539
33614
  children: visibleApps.map((app2, index) => {
31540
33615
  const isSelected = selectedAppId === app2.key;
31541
- return /* @__PURE__ */ jsxs(
31542
- MotionBox,
33616
+ return /* @__PURE__ */ jsx(
33617
+ Link,
31543
33618
  {
31544
- preset: "staggerItem",
31545
- index,
31546
- hover: true,
31547
- onClick: () => onClickItem?.(app2),
31548
- sx: {
31549
- cursor: "pointer",
31550
- display: "flex",
31551
- flex: 1,
31552
- alignItems: "center",
31553
- flexDirection: "column"
33619
+ to: findLink(app2) || "#",
33620
+ style: {
33621
+ textDecoration: "none",
33622
+ color: "inherit",
33623
+ width: "100%"
31554
33624
  },
31555
- children: [
31556
- /* @__PURE__ */ jsx(
31557
- Box,
31558
- {
31559
- sx: {
31560
- width: iconSize,
31561
- height: iconSize,
31562
- borderRadius: iconRadius,
31563
- mb: 1.5,
31564
- display: "flex",
31565
- alignItems: "center",
31566
- justifyContent: "center",
31567
- background: getAppColor(app2.category),
31568
- boxShadow: isSelected ? `0 0 0 1px ${theme.palette.primary.main}, ${iconShadow}` : iconShadow
31569
- },
31570
- children: app2.icon.startsWith("/") && /* @__PURE__ */ jsx(
31571
- ImageElement,
33625
+ children: /* @__PURE__ */ jsxs(
33626
+ MotionBox,
33627
+ {
33628
+ preset: "staggerItem",
33629
+ index,
33630
+ hover: true,
33631
+ onClick: () => onClickItem?.(app2),
33632
+ sx: {
33633
+ cursor: "pointer",
33634
+ display: "flex",
33635
+ flex: 1,
33636
+ alignItems: "center",
33637
+ flexDirection: "column"
33638
+ },
33639
+ children: [
33640
+ /* @__PURE__ */ jsx(
33641
+ Box,
31572
33642
  {
31573
- sx: { width: iconSize * 0.56, height: iconSize * 0.56 },
31574
- url: app2.icon,
31575
- sizeType: ImageSizeType.SQUARE
33643
+ sx: {
33644
+ width: iconSize,
33645
+ height: iconSize,
33646
+ borderRadius: iconRadius,
33647
+ mb: 1.5,
33648
+ display: "flex",
33649
+ alignItems: "center",
33650
+ justifyContent: "center",
33651
+ background: getAppColor(app2.category),
33652
+ boxShadow: isSelected ? `0 0 0 1px ${theme.palette.primary.main}, ${iconShadow}` : iconShadow
33653
+ },
33654
+ children: app2.icon.startsWith("/") && /* @__PURE__ */ jsx(
33655
+ ImageElement,
33656
+ {
33657
+ sx: { width: iconSize * 0.56, height: iconSize * 0.56 },
33658
+ url: app2.icon,
33659
+ sizeType: ImageSizeType.SQUARE
33660
+ }
33661
+ )
33662
+ }
33663
+ ),
33664
+ /* @__PURE__ */ jsx(
33665
+ Typography,
33666
+ {
33667
+ variant: titleVariant,
33668
+ sx: { color: titleColor ?? theme.palette.common.white },
33669
+ children: app2.title
33670
+ }
33671
+ ),
33672
+ /* @__PURE__ */ jsx(
33673
+ Typography,
33674
+ {
33675
+ variant: captionVariant,
33676
+ sx: { color: captionColor ?? theme.palette.common.white },
33677
+ children: app2.caption
31576
33678
  }
31577
33679
  )
31578
- }
31579
- ),
31580
- /* @__PURE__ */ jsx(
31581
- Typography,
31582
- {
31583
- variant: titleVariant,
31584
- sx: { color: titleColor ?? theme.palette.common.white },
31585
- children: app2.title
31586
- }
31587
- ),
31588
- /* @__PURE__ */ jsx(
31589
- Typography,
31590
- {
31591
- variant: captionVariant,
31592
- sx: { color: captionColor ?? theme.palette.common.white },
31593
- children: app2.caption
31594
- }
31595
- )
31596
- ]
33680
+ ]
33681
+ }
33682
+ )
31597
33683
  },
31598
33684
  app2.key
31599
33685
  );
@@ -31813,13 +33899,6 @@ const routes = [
31813
33899
  ]
31814
33900
  }
31815
33901
  ];
31816
- const useSidebar = () => {
31817
- const context = useContext(SidebarContext);
31818
- if (context === void 0) {
31819
- throw new Error("useSidebar must be used within a SidebarProvider");
31820
- }
31821
- return context;
31822
- };
31823
33902
  const AppsSidebar = ({
31824
33903
  isOpen,
31825
33904
  onClose
@@ -32148,6 +34227,8 @@ export {
32148
34227
  SidebarContext,
32149
34228
  SidebarProvider,
32150
34229
  SmallIcon,
34230
+ SnackbarProvider,
34231
+ SnackbarType,
32151
34232
  SocketNamespace,
32152
34233
  SocketSystemEvent,
32153
34234
  SocketSystemRoom,
@@ -32278,6 +34359,7 @@ export {
32278
34359
  useAllApps,
32279
34360
  useApps,
32280
34361
  useIsSystemMonitor,
34362
+ useSidebar,
32281
34363
  useSidebarState,
32282
34364
  useSnackbar,
32283
34365
  useTagSelector,