mytek-components 2.0.9 → 2.1.0

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/main.es.js CHANGED
@@ -1,6 +1,3 @@
1
- var __defProp = Object.defineProperty;
2
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
1
  import * as React from "react";
5
2
  import React__default, { useState, useRef, useEffect, useCallback, useContext, useMemo, useLayoutEffect, createContext, cloneElement, forwardRef, createElement } from "react";
6
3
  import emStyled from "@emotion/styled";
@@ -16,20 +13,11 @@ function getDefaultExportFromCjs(x) {
16
13
  }
17
14
  var jsxRuntime = { exports: {} };
18
15
  var reactJsxRuntime_production = {};
19
- /**
20
- * @license React
21
- * react-jsx-runtime.production.js
22
- *
23
- * Copyright (c) Meta Platforms, Inc. and affiliates.
24
- *
25
- * This source code is licensed under the MIT license found in the
26
- * LICENSE file in the root directory of this source tree.
27
- */
28
16
  var hasRequiredReactJsxRuntime_production;
29
17
  function requireReactJsxRuntime_production() {
30
18
  if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
31
19
  hasRequiredReactJsxRuntime_production = 1;
32
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
20
+ var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
33
21
  function jsxProd(type, config2, maybeKey) {
34
22
  var key = null;
35
23
  void 0 !== maybeKey && (key = "" + maybeKey);
@@ -54,15 +42,6 @@ function requireReactJsxRuntime_production() {
54
42
  return reactJsxRuntime_production;
55
43
  }
56
44
  var reactJsxRuntime_development = {};
57
- /**
58
- * @license React
59
- * react-jsx-runtime.development.js
60
- *
61
- * Copyright (c) Meta Platforms, Inc. and affiliates.
62
- *
63
- * This source code is licensed under the MIT license found in the
64
- * LICENSE file in the root directory of this source tree.
65
- */
66
45
  var hasRequiredReactJsxRuntime_development;
67
46
  function requireReactJsxRuntime_development() {
68
47
  if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
@@ -277,7 +256,7 @@ function requireReactJsxRuntime_development() {
277
256
  function isValidElement(object) {
278
257
  return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
279
258
  }
280
- var React2 = React__default, REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
259
+ var React2 = React__default, REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), ReactSharedInternals = React2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
281
260
  return null;
282
261
  };
283
262
  React2 = {
@@ -552,7 +531,6 @@ const Button = ({
552
531
  disabled = false,
553
532
  ...rest
554
533
  }) => {
555
- var _a;
556
534
  const isDisabled = loader || disabled;
557
535
  const className = clsx(
558
536
  "flex items-center justify-center transition-opacity",
@@ -569,7 +547,7 @@ const Button = ({
569
547
  backgroundColor: backgroundColor2,
570
548
  height: height2,
571
549
  // ✅ Only apply width if w-full is NOT passed via className
572
- width: ((_a = rest.className) == null ? void 0 : _a.includes("w-full")) ? void 0 : width2,
550
+ width: rest.className?.includes("w-full") ? void 0 : width2,
573
551
  border: border2,
574
552
  borderRadius: borderRadius2,
575
553
  padding: padding2,
@@ -751,19 +729,11 @@ function capitalize(string) {
751
729
  var propTypes$2 = { exports: {} };
752
730
  var reactIs$1 = { exports: {} };
753
731
  var reactIs_production_min = {};
754
- /** @license React v16.13.1
755
- * react-is.production.min.js
756
- *
757
- * Copyright (c) Facebook, Inc. and its affiliates.
758
- *
759
- * This source code is licensed under the MIT license found in the
760
- * LICENSE file in the root directory of this source tree.
761
- */
762
732
  var hasRequiredReactIs_production_min;
763
733
  function requireReactIs_production_min() {
764
734
  if (hasRequiredReactIs_production_min) return reactIs_production_min;
765
735
  hasRequiredReactIs_production_min = 1;
766
- var b = "function" === typeof Symbol && Symbol.for, c = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e = b ? Symbol.for("react.fragment") : 60107, f = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k = b ? Symbol.for("react.context") : 60110, l = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r2 = b ? Symbol.for("react.memo") : 60115, t = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119;
736
+ var b = "function" === typeof Symbol && Symbol.for, c = b ? /* @__PURE__ */ Symbol.for("react.element") : 60103, d = b ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, e = b ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, f = b ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, g = b ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, h = b ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, k = b ? /* @__PURE__ */ Symbol.for("react.context") : 60110, l = b ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, m = b ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, n = b ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, p = b ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, q = b ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, r2 = b ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, t = b ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, v = b ? /* @__PURE__ */ Symbol.for("react.block") : 60121, w = b ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, x = b ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, y = b ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
767
737
  function z(a) {
768
738
  if ("object" === typeof a && null !== a) {
769
739
  var u = a.$$typeof;
@@ -854,14 +824,6 @@ function requireReactIs_production_min() {
854
824
  return reactIs_production_min;
855
825
  }
856
826
  var reactIs_development$1 = {};
857
- /** @license React v16.13.1
858
- * react-is.development.js
859
- *
860
- * Copyright (c) Facebook, Inc. and its affiliates.
861
- *
862
- * This source code is licensed under the MIT license found in the
863
- * LICENSE file in the root directory of this source tree.
864
- */
865
827
  var hasRequiredReactIs_development$1;
866
828
  function requireReactIs_development$1() {
867
829
  if (hasRequiredReactIs_development$1) return reactIs_development$1;
@@ -869,24 +831,24 @@ function requireReactIs_development$1() {
869
831
  if (process.env.NODE_ENV !== "production") {
870
832
  (function() {
871
833
  var hasSymbol = typeof Symbol === "function" && Symbol.for;
872
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
873
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
874
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
875
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
876
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
877
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
878
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
879
- var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
880
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
881
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
882
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
883
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
884
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
885
- var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
886
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
887
- var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
888
- var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
889
- var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
834
+ var REACT_ELEMENT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
835
+ var REACT_PORTAL_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.portal") : 60106;
836
+ var REACT_FRAGMENT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107;
837
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108;
838
+ var REACT_PROFILER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114;
839
+ var REACT_PROVIDER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.provider") : 60109;
840
+ var REACT_CONTEXT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.context") : 60110;
841
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111;
842
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111;
843
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112;
844
+ var REACT_SUSPENSE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113;
845
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120;
846
+ var REACT_MEMO_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.memo") : 60115;
847
+ var REACT_LAZY_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116;
848
+ var REACT_BLOCK_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.block") : 60121;
849
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117;
850
+ var REACT_RESPONDER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.responder") : 60118;
851
+ var REACT_SCOPE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
890
852
  function isValidElementType(type) {
891
853
  return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
892
854
  type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
@@ -1026,11 +988,6 @@ function requireReactIs$1() {
1026
988
  }
1027
989
  return reactIs$1.exports;
1028
990
  }
1029
- /*
1030
- object-assign
1031
- (c) Sindre Sorhus
1032
- @license MIT
1033
- */
1034
991
  var objectAssign;
1035
992
  var hasRequiredObjectAssign;
1036
993
  function requireObjectAssign() {
@@ -1715,20 +1672,11 @@ function composeClasses(slots, getUtilityClass, classes = void 0) {
1715
1672
  }
1716
1673
  var reactIs = { exports: {} };
1717
1674
  var reactIs_production = {};
1718
- /**
1719
- * @license React
1720
- * react-is.production.js
1721
- *
1722
- * Copyright (c) Meta Platforms, Inc. and affiliates.
1723
- *
1724
- * This source code is licensed under the MIT license found in the
1725
- * LICENSE file in the root directory of this source tree.
1726
- */
1727
1675
  var hasRequiredReactIs_production;
1728
1676
  function requireReactIs_production() {
1729
1677
  if (hasRequiredReactIs_production) return reactIs_production;
1730
1678
  hasRequiredReactIs_production = 1;
1731
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
1679
+ var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_VIEW_TRANSITION_TYPE = /* @__PURE__ */ Symbol.for("react.view_transition"), REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference");
1732
1680
  function typeOf3(object) {
1733
1681
  if ("object" === typeof object && null !== object) {
1734
1682
  var $$typeof = object.$$typeof;
@@ -1815,15 +1763,6 @@ function requireReactIs_production() {
1815
1763
  return reactIs_production;
1816
1764
  }
1817
1765
  var reactIs_development = {};
1818
- /**
1819
- * @license React
1820
- * react-is.development.js
1821
- *
1822
- * Copyright (c) Meta Platforms, Inc. and affiliates.
1823
- *
1824
- * This source code is licensed under the MIT license found in the
1825
- * LICENSE file in the root directory of this source tree.
1826
- */
1827
1766
  var hasRequiredReactIs_development;
1828
1767
  function requireReactIs_development() {
1829
1768
  if (hasRequiredReactIs_development) return reactIs_development;
@@ -1860,7 +1799,7 @@ function requireReactIs_development() {
1860
1799
  }
1861
1800
  }
1862
1801
  }
1863
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
1802
+ var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_VIEW_TRANSITION_TYPE = /* @__PURE__ */ Symbol.for("react.view_transition"), REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference");
1864
1803
  reactIs_development.ContextConsumer = REACT_CONSUMER_TYPE;
1865
1804
  reactIs_development.ContextProvider = REACT_CONTEXT_TYPE;
1866
1805
  reactIs_development.Element = REACT_ELEMENT_TYPE;
@@ -1982,9 +1921,8 @@ function sortContainerQueries(theme, css) {
1982
1921
  return css;
1983
1922
  }
1984
1923
  const sorted = Object.keys(css).filter((key) => key.startsWith("@container")).sort((a, b) => {
1985
- var _a, _b;
1986
1924
  const regex = /min-width:\s*([0-9.]+)/;
1987
- return +(((_a = a.match(regex)) == null ? void 0 : _a[1]) || 0) - +(((_b = b.match(regex)) == null ? void 0 : _b[1]) || 0);
1925
+ return +(a.match(regex)?.[1] || 0) - +(b.match(regex)?.[1] || 0);
1988
1926
  });
1989
1927
  if (!sorted.length) {
1990
1928
  return css;
@@ -2100,8 +2038,7 @@ function handleBreakpoints(props, propValue, styleFromPropValue) {
2100
2038
  return output;
2101
2039
  }
2102
2040
  function createEmptyBreakpointObject(breakpointsInput = {}) {
2103
- var _a;
2104
- const breakpointsInOrder = (_a = breakpointsInput.keys) == null ? void 0 : _a.reduce((acc, key) => {
2041
+ const breakpointsInOrder = breakpointsInput.keys?.reduce((acc, key) => {
2105
2042
  const breakpointStyleKey = breakpointsInput.up(key);
2106
2043
  acc[breakpointStyleKey] = {};
2107
2044
  return acc;
@@ -2494,14 +2431,13 @@ const width = style$2({
2494
2431
  const maxWidth = (props) => {
2495
2432
  if (props.maxWidth !== void 0 && props.maxWidth !== null) {
2496
2433
  const styleFromPropValue = (propValue) => {
2497
- var _a, _b, _c, _d, _e;
2498
- const breakpoint = ((_c = (_b = (_a = props.theme) == null ? void 0 : _a.breakpoints) == null ? void 0 : _b.values) == null ? void 0 : _c[propValue]) || values[propValue];
2434
+ const breakpoint = props.theme?.breakpoints?.values?.[propValue] || values[propValue];
2499
2435
  if (!breakpoint) {
2500
2436
  return {
2501
2437
  maxWidth: sizingTransform(propValue)
2502
2438
  };
2503
2439
  }
2504
- if (((_e = (_d = props.theme) == null ? void 0 : _d.breakpoints) == null ? void 0 : _e.unit) !== "px") {
2440
+ if (props.theme?.breakpoints?.unit !== "px") {
2505
2441
  return {
2506
2442
  maxWidth: `${breakpoint}${props.theme.breakpoints.unit}`
2507
2443
  };
@@ -3187,13 +3123,6 @@ function serializeStyles(args, registered, mergedProps) {
3187
3123
  next: cursor
3188
3124
  };
3189
3125
  }
3190
- /**
3191
- * @mui/styled-engine v7.3.7
3192
- *
3193
- * @license MIT
3194
- * This source code is licensed under the MIT license found in the
3195
- * LICENSE file in the root directory of this source tree.
3196
- */
3197
3126
  function styled$1(tag, options) {
3198
3127
  const stylesFactory = emStyled(tag, options);
3199
3128
  if (process.env.NODE_ENV !== "production") {
@@ -3319,10 +3248,9 @@ function createSpacing(spacingInput = 8, transform = createUnarySpacing({
3319
3248
  return spacing;
3320
3249
  }
3321
3250
  function applyStyles(key, styles) {
3322
- var _a;
3323
3251
  const theme = this;
3324
3252
  if (theme.vars) {
3325
- if (!((_a = theme.colorSchemes) == null ? void 0 : _a[key]) || typeof theme.getColorSchemeSelector !== "function") {
3253
+ if (!theme.colorSchemes?.[key] || typeof theme.getColorSchemeSelector !== "function") {
3326
3254
  return {};
3327
3255
  }
3328
3256
  let selector = theme.getColorSchemeSelector(key);
@@ -3371,7 +3299,7 @@ function createTheme$1(options = {}, ...args) {
3371
3299
  muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);
3372
3300
  muiTheme.unstable_sxConfig = {
3373
3301
  ...defaultSxConfig,
3374
- ...other == null ? void 0 : other.unstable_sxConfig
3302
+ ...other?.unstable_sxConfig
3375
3303
  };
3376
3304
  muiTheme.unstable_sx = function sx(props) {
3377
3305
  return styleFunctionSx({
@@ -3481,7 +3409,7 @@ function processStyle(props, style2, layerName) {
3481
3409
  if (Array.isArray(resolvedStyle)) {
3482
3410
  return resolvedStyle.flatMap((subStyle) => processStyle(props, subStyle, layerName));
3483
3411
  }
3484
- if (Array.isArray(resolvedStyle == null ? void 0 : resolvedStyle.variants)) {
3412
+ if (Array.isArray(resolvedStyle?.variants)) {
3485
3413
  let rootStyle;
3486
3414
  if (resolvedStyle.isProcessed) {
3487
3415
  rootStyle = layerName ? shallowLayer(resolvedStyle.style, layerName) : resolvedStyle.style;
@@ -3494,38 +3422,37 @@ function processStyle(props, style2, layerName) {
3494
3422
  }
3495
3423
  return processStyleVariants(props, resolvedStyle.variants, [rootStyle], layerName);
3496
3424
  }
3497
- if (resolvedStyle == null ? void 0 : resolvedStyle.isProcessed) {
3425
+ if (resolvedStyle?.isProcessed) {
3498
3426
  return layerName ? shallowLayer(internal_serializeStyles(resolvedStyle.style), layerName) : resolvedStyle.style;
3499
3427
  }
3500
3428
  return layerName ? shallowLayer(internal_serializeStyles(resolvedStyle), layerName) : resolvedStyle;
3501
3429
  }
3502
3430
  function processStyleVariants(props, variants, results = [], layerName = void 0) {
3503
- var _a;
3504
3431
  let mergedState;
3505
3432
  variantLoop: for (let i = 0; i < variants.length; i += 1) {
3506
3433
  const variant = variants[i];
3507
3434
  if (typeof variant.props === "function") {
3508
- mergedState ?? (mergedState = {
3435
+ mergedState ??= {
3509
3436
  ...props,
3510
3437
  ...props.ownerState,
3511
3438
  ownerState: props.ownerState
3512
- });
3439
+ };
3513
3440
  if (!variant.props(mergedState)) {
3514
3441
  continue;
3515
3442
  }
3516
3443
  } else {
3517
3444
  for (const key in variant.props) {
3518
- if (props[key] !== variant.props[key] && ((_a = props.ownerState) == null ? void 0 : _a[key]) !== variant.props[key]) {
3445
+ if (props[key] !== variant.props[key] && props.ownerState?.[key] !== variant.props[key]) {
3519
3446
  continue variantLoop;
3520
3447
  }
3521
3448
  }
3522
3449
  }
3523
3450
  if (typeof variant.style === "function") {
3524
- mergedState ?? (mergedState = {
3451
+ mergedState ??= {
3525
3452
  ...props,
3526
3453
  ...props.ownerState,
3527
3454
  ownerState: props.ownerState
3528
- });
3455
+ };
3529
3456
  results.push(layerName ? shallowLayer(internal_serializeStyles(variant.style(mergedState)), layerName) : variant.style(mergedState));
3530
3457
  } else {
3531
3458
  results.push(layerName ? shallowLayer(internal_serializeStyles(variant.style), layerName) : variant.style);
@@ -3602,9 +3529,8 @@ function createStyled(input = {}) {
3602
3529
  expressionsHead.push(styleAttachTheme);
3603
3530
  if (componentName && overridesResolver) {
3604
3531
  expressionsTail.push(function styleThemeOverrides(props) {
3605
- var _a, _b;
3606
3532
  const theme = props.theme;
3607
- const styleOverrides = (_b = (_a = theme.components) == null ? void 0 : _a[componentName]) == null ? void 0 : _b.styleOverrides;
3533
+ const styleOverrides = theme.components?.[componentName]?.styleOverrides;
3608
3534
  if (!styleOverrides) {
3609
3535
  return null;
3610
3536
  }
@@ -3617,9 +3543,8 @@ function createStyled(input = {}) {
3617
3543
  }
3618
3544
  if (componentName && !skipVariantsResolver) {
3619
3545
  expressionsTail.push(function styleThemeVariants(props) {
3620
- var _a, _b;
3621
3546
  const theme = props.theme;
3622
- const themeVariants = (_b = (_a = theme == null ? void 0 : theme.components) == null ? void 0 : _a[componentName]) == null ? void 0 : _b.variants;
3547
+ const themeVariants = theme?.components?.[componentName]?.variants;
3623
3548
  if (!themeVariants) {
3624
3549
  return null;
3625
3550
  }
@@ -3721,11 +3646,11 @@ function resolveProps(defaultProps, props, mergeClassNameAndStyle = false) {
3721
3646
  }
3722
3647
  }
3723
3648
  } else if (propName === "className" && mergeClassNameAndStyle && props.className) {
3724
- output.className = clsx(defaultProps == null ? void 0 : defaultProps.className, props == null ? void 0 : props.className);
3649
+ output.className = clsx(defaultProps?.className, props?.className);
3725
3650
  } else if (propName === "style" && mergeClassNameAndStyle && props.style) {
3726
3651
  output.style = {
3727
- ...defaultProps == null ? void 0 : defaultProps.style,
3728
- ...props == null ? void 0 : props.style
3652
+ ...defaultProps?.style,
3653
+ ...props?.style
3729
3654
  };
3730
3655
  } else if (output[propName] === void 0) {
3731
3656
  output[propName] = defaultProps[propName];
@@ -4155,7 +4080,6 @@ function prepareCssVars(theme, parserConfig = {}) {
4155
4080
  };
4156
4081
  }
4157
4082
  function defaultGetSelector2(colorScheme, cssObject) {
4158
- var _a, _b;
4159
4083
  let rule = selector;
4160
4084
  if (selector === "class") {
4161
4085
  rule = ".%s";
@@ -4163,7 +4087,7 @@ function prepareCssVars(theme, parserConfig = {}) {
4163
4087
  if (selector === "data") {
4164
4088
  rule = "[data-%s]";
4165
4089
  }
4166
- if ((selector == null ? void 0 : selector.startsWith("data-")) && !selector.includes("%s")) {
4090
+ if (selector?.startsWith("data-") && !selector.includes("%s")) {
4167
4091
  rule = `[${selector}="%s"]`;
4168
4092
  }
4169
4093
  if (colorScheme) {
@@ -4171,7 +4095,7 @@ function prepareCssVars(theme, parserConfig = {}) {
4171
4095
  if (theme.defaultColorScheme === colorScheme) {
4172
4096
  return ":root";
4173
4097
  }
4174
- const mode = ((_b = (_a = colorSchemes[colorScheme]) == null ? void 0 : _a.palette) == null ? void 0 : _b.mode) || colorScheme;
4098
+ const mode = colorSchemes[colorScheme]?.palette?.mode || colorScheme;
4175
4099
  return {
4176
4100
  [`@media (prefers-color-scheme: ${mode})`]: {
4177
4101
  ":root": cssObject
@@ -4199,7 +4123,6 @@ function prepareCssVars(theme, parserConfig = {}) {
4199
4123
  return vars;
4200
4124
  };
4201
4125
  const generateStyleSheets = () => {
4202
- var _a, _b;
4203
4126
  const stylesheets = [];
4204
4127
  const colorScheme = theme.defaultColorScheme || "light";
4205
4128
  function insertStyleSheet(key, css) {
@@ -4222,7 +4145,7 @@ function prepareCssVars(theme, parserConfig = {}) {
4222
4145
  const {
4223
4146
  css
4224
4147
  } = defaultSchemeVal;
4225
- const cssColorSheme = (_b = (_a = colorSchemes[colorScheme]) == null ? void 0 : _a.palette) == null ? void 0 : _b.mode;
4148
+ const cssColorSheme = colorSchemes[colorScheme]?.palette?.mode;
4226
4149
  const finalCss = !disableCssColorScheme && cssColorSheme ? {
4227
4150
  colorScheme: cssColorSheme,
4228
4151
  ...css
@@ -4236,8 +4159,7 @@ function prepareCssVars(theme, parserConfig = {}) {
4236
4159
  Object.entries(other).forEach(([key, {
4237
4160
  css
4238
4161
  }]) => {
4239
- var _a2, _b2;
4240
- const cssColorSheme = (_b2 = (_a2 = colorSchemes[key]) == null ? void 0 : _a2.palette) == null ? void 0 : _b2.mode;
4162
+ const cssColorSheme = colorSchemes[key]?.palette?.mode;
4241
4163
  const finalCss = !disableCssColorScheme && cssColorSheme ? {
4242
4164
  colorScheme: cssColorSheme,
4243
4165
  ...css
@@ -5037,7 +4959,7 @@ function createThemeNoVars(options = {}, ...args) {
5037
4959
  }
5038
4960
  muiTheme.unstable_sxConfig = {
5039
4961
  ...defaultSxConfig,
5040
- ...other == null ? void 0 : other.unstable_sxConfig
4962
+ ...other?.unstable_sxConfig
5041
4963
  };
5042
4964
  muiTheme.unstable_sx = function sx(props) {
5043
4965
  return styleFunctionSx({
@@ -5102,9 +5024,8 @@ function createColorScheme(options) {
5102
5024
  };
5103
5025
  }
5104
5026
  function shouldSkipGeneratingVar(keys) {
5105
- var _a;
5106
5027
  return !!keys[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/) || !!keys[0].match(/sxConfig$/) || // ends with sxConfig
5107
- keys[0] === "palette" && !!((_a = keys[1]) == null ? void 0 : _a.match(/(mode|contrastThreshold|tonalOffset)/));
5028
+ keys[0] === "palette" && !!keys[1]?.match(/(mode|contrastThreshold|tonalOffset)/);
5108
5029
  }
5109
5030
  const excludeVariablesFromRoot = (cssVarPrefix) => [...[...Array(25)].map((_, index) => `--${cssVarPrefix ? `${cssVarPrefix}-` : ""}overlays-${index}`), `--${cssVarPrefix ? `${cssVarPrefix}-` : ""}palette-AppBar-darkBg`, `--${cssVarPrefix ? `${cssVarPrefix}-` : ""}palette-AppBar-darkColor`];
5110
5031
  const defaultGetSelector = (theme) => (colorScheme, css) => {
@@ -5117,7 +5038,7 @@ const defaultGetSelector = (theme) => (colorScheme, css) => {
5117
5038
  if (selector === "data") {
5118
5039
  rule = "[data-%s]";
5119
5040
  }
5120
- if ((selector == null ? void 0 : selector.startsWith("data-")) && !selector.includes("%s")) {
5041
+ if (selector?.startsWith("data-") && !selector.includes("%s")) {
5121
5042
  rule = `[${selector}="%s"]`;
5122
5043
  }
5123
5044
  if (theme.defaultColorScheme === colorScheme) {
@@ -5217,7 +5138,7 @@ function attachColorScheme$1(colorSpace, colorSchemes, scheme, restTheme, colorS
5217
5138
  ...scheme,
5218
5139
  palette: {
5219
5140
  mode,
5220
- ...scheme == null ? void 0 : scheme.palette
5141
+ ...scheme?.palette
5221
5142
  },
5222
5143
  colorSpace
5223
5144
  });
@@ -5230,7 +5151,7 @@ function attachColorScheme$1(colorSpace, colorSchemes, scheme, restTheme, colorS
5230
5151
  ...restTheme,
5231
5152
  palette: {
5232
5153
  mode,
5233
- ...scheme == null ? void 0 : scheme.palette
5154
+ ...scheme?.palette
5234
5155
  },
5235
5156
  colorSpace
5236
5157
  });
@@ -5239,9 +5160,9 @@ function attachColorScheme$1(colorSpace, colorSchemes, scheme, restTheme, colorS
5239
5160
  palette,
5240
5161
  opacity: {
5241
5162
  ...getOpacity(mode),
5242
- ...scheme == null ? void 0 : scheme.opacity
5163
+ ...scheme?.opacity
5243
5164
  },
5244
- overlays: (scheme == null ? void 0 : scheme.overlays) || getOverlays(mode)
5165
+ overlays: scheme?.overlays || getOverlays(mode)
5245
5166
  };
5246
5167
  return muiTheme;
5247
5168
  }
@@ -5522,7 +5443,7 @@ function createThemeWithVars(options = {}, ...args) {
5522
5443
  theme.shouldSkipGeneratingVar = shouldSkipGeneratingVar$1;
5523
5444
  theme.unstable_sxConfig = {
5524
5445
  ...defaultSxConfig,
5525
- ...input == null ? void 0 : input.unstable_sxConfig
5446
+ ...input?.unstable_sxConfig
5526
5447
  };
5527
5448
  theme.unstable_sx = function sx(props) {
5528
5449
  return styleFunctionSx({
@@ -5555,11 +5476,11 @@ function createTheme(options = {}, ...args) {
5555
5476
  colorSchemes: initialColorSchemes = !palette ? {
5556
5477
  light: true
5557
5478
  } : void 0,
5558
- defaultColorScheme: initialDefaultColorScheme = palette == null ? void 0 : palette.mode,
5479
+ defaultColorScheme: initialDefaultColorScheme = palette?.mode,
5559
5480
  ...other
5560
5481
  } = options;
5561
5482
  const defaultColorSchemeInput = initialDefaultColorScheme || "light";
5562
- const defaultScheme = initialColorSchemes == null ? void 0 : initialColorSchemes[defaultColorSchemeInput];
5483
+ const defaultScheme = initialColorSchemes?.[defaultColorSchemeInput];
5563
5484
  const colorSchemesInput = {
5564
5485
  ...initialColorSchemes,
5565
5486
  ...palette ? {
@@ -5672,97 +5593,91 @@ const SvgIconRoot = styled("svg", {
5672
5593
  }
5673
5594
  })(memoTheme(({
5674
5595
  theme
5675
- }) => {
5676
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
5677
- return {
5678
- userSelect: "none",
5679
- width: "1em",
5680
- height: "1em",
5681
- display: "inline-block",
5682
- flexShrink: 0,
5683
- transition: (_d = (_a = theme.transitions) == null ? void 0 : _a.create) == null ? void 0 : _d.call(_a, "fill", {
5684
- duration: (_c = (_b = (theme.vars ?? theme).transitions) == null ? void 0 : _b.duration) == null ? void 0 : _c.shorter
5685
- }),
5686
- variants: [
5687
- {
5688
- props: (props) => !props.hasSvgAsChild,
5689
- style: {
5690
- // the <svg> will define the property that has `currentColor`
5691
- // for example heroicons uses fill="none" and stroke="currentColor"
5692
- fill: "currentColor"
5693
- }
5596
+ }) => ({
5597
+ userSelect: "none",
5598
+ width: "1em",
5599
+ height: "1em",
5600
+ display: "inline-block",
5601
+ flexShrink: 0,
5602
+ transition: theme.transitions?.create?.("fill", {
5603
+ duration: (theme.vars ?? theme).transitions?.duration?.shorter
5604
+ }),
5605
+ variants: [
5606
+ {
5607
+ props: (props) => !props.hasSvgAsChild,
5608
+ style: {
5609
+ // the <svg> will define the property that has `currentColor`
5610
+ // for example heroicons uses fill="none" and stroke="currentColor"
5611
+ fill: "currentColor"
5612
+ }
5613
+ },
5614
+ {
5615
+ props: {
5616
+ fontSize: "inherit"
5694
5617
  },
5695
- {
5696
- props: {
5697
- fontSize: "inherit"
5698
- },
5699
- style: {
5700
- fontSize: "inherit"
5701
- }
5618
+ style: {
5619
+ fontSize: "inherit"
5620
+ }
5621
+ },
5622
+ {
5623
+ props: {
5624
+ fontSize: "small"
5702
5625
  },
5703
- {
5704
- props: {
5705
- fontSize: "small"
5706
- },
5707
- style: {
5708
- fontSize: ((_f = (_e = theme.typography) == null ? void 0 : _e.pxToRem) == null ? void 0 : _f.call(_e, 20)) || "1.25rem"
5709
- }
5626
+ style: {
5627
+ fontSize: theme.typography?.pxToRem?.(20) || "1.25rem"
5628
+ }
5629
+ },
5630
+ {
5631
+ props: {
5632
+ fontSize: "medium"
5710
5633
  },
5711
- {
5712
- props: {
5713
- fontSize: "medium"
5714
- },
5715
- style: {
5716
- fontSize: ((_h = (_g = theme.typography) == null ? void 0 : _g.pxToRem) == null ? void 0 : _h.call(_g, 24)) || "1.5rem"
5717
- }
5634
+ style: {
5635
+ fontSize: theme.typography?.pxToRem?.(24) || "1.5rem"
5636
+ }
5637
+ },
5638
+ {
5639
+ props: {
5640
+ fontSize: "large"
5718
5641
  },
5719
- {
5720
- props: {
5721
- fontSize: "large"
5722
- },
5723
- style: {
5724
- fontSize: ((_j = (_i = theme.typography) == null ? void 0 : _i.pxToRem) == null ? void 0 : _j.call(_i, 35)) || "2.1875rem"
5725
- }
5642
+ style: {
5643
+ fontSize: theme.typography?.pxToRem?.(35) || "2.1875rem"
5644
+ }
5645
+ },
5646
+ // TODO v5 deprecate color prop, v6 remove for sx
5647
+ ...Object.entries((theme.vars ?? theme).palette).filter(([, value]) => value && value.main).map(([color2]) => ({
5648
+ props: {
5649
+ color: color2
5726
5650
  },
5727
- // TODO v5 deprecate color prop, v6 remove for sx
5728
- ...Object.entries((theme.vars ?? theme).palette).filter(([, value]) => value && value.main).map(([color2]) => {
5729
- var _a2, _b2;
5730
- return {
5731
- props: {
5732
- color: color2
5733
- },
5734
- style: {
5735
- color: (_b2 = (_a2 = (theme.vars ?? theme).palette) == null ? void 0 : _a2[color2]) == null ? void 0 : _b2.main
5736
- }
5737
- };
5738
- }),
5739
- {
5740
- props: {
5741
- color: "action"
5742
- },
5743
- style: {
5744
- color: (_l = (_k = (theme.vars ?? theme).palette) == null ? void 0 : _k.action) == null ? void 0 : _l.active
5745
- }
5651
+ style: {
5652
+ color: (theme.vars ?? theme).palette?.[color2]?.main
5653
+ }
5654
+ })),
5655
+ {
5656
+ props: {
5657
+ color: "action"
5746
5658
  },
5747
- {
5748
- props: {
5749
- color: "disabled"
5750
- },
5751
- style: {
5752
- color: (_n = (_m = (theme.vars ?? theme).palette) == null ? void 0 : _m.action) == null ? void 0 : _n.disabled
5753
- }
5659
+ style: {
5660
+ color: (theme.vars ?? theme).palette?.action?.active
5661
+ }
5662
+ },
5663
+ {
5664
+ props: {
5665
+ color: "disabled"
5754
5666
  },
5755
- {
5756
- props: {
5757
- color: "inherit"
5758
- },
5759
- style: {
5760
- color: void 0
5761
- }
5667
+ style: {
5668
+ color: (theme.vars ?? theme).palette?.action?.disabled
5762
5669
  }
5763
- ]
5764
- };
5765
- }));
5670
+ },
5671
+ {
5672
+ props: {
5673
+ color: "inherit"
5674
+ },
5675
+ style: {
5676
+ color: void 0
5677
+ }
5678
+ }
5679
+ ]
5680
+ })));
5766
5681
  const SvgIcon = /* @__PURE__ */ React.forwardRef(function SvgIcon2(inProps, ref) {
5767
5682
  const props = useDefaultProps({
5768
5683
  props: inProps,
@@ -5948,7 +5863,6 @@ const Mt_MessageBox = ({
5948
5863
  disableClose = false,
5949
5864
  fontFamily = "Montserrat"
5950
5865
  }) => {
5951
- var _a, _b, _c;
5952
5866
  const [windowWidth, setWindowWidth] = useState(window.innerWidth);
5953
5867
  const isMobile = windowWidth <= 375;
5954
5868
  const buttonRefs = useRef([]);
@@ -5969,7 +5883,7 @@ const Mt_MessageBox = ({
5969
5883
  edit: /* @__PURE__ */ jsxRuntimeExports.jsx(RebaseEditIcon, { style: { color: "#f0ad4e", fontSize: iconSize } })
5970
5884
  };
5971
5885
  const alertIcon = defaultIcons[messageType];
5972
- const buttonsToRender = (arrayOfButtons == null ? void 0 : arrayOfButtons.length) ? arrayOfButtons : [
5886
+ const buttonsToRender = arrayOfButtons?.length ? arrayOfButtons : [
5973
5887
  {
5974
5888
  label: "Cancel",
5975
5889
  onClick: onHide,
@@ -5978,7 +5892,7 @@ const Mt_MessageBox = ({
5978
5892
  {
5979
5893
  label: "Proceed",
5980
5894
  onClick: onProceed,
5981
- color: ((_c = (_b = (_a = defaultIcons[messageType]) == null ? void 0 : _a.props) == null ? void 0 : _b.style) == null ? void 0 : _c.color) || "#0275d8"
5895
+ color: defaultIcons[messageType]?.props?.style?.color || "#0275d8"
5982
5896
  }
5983
5897
  ];
5984
5898
  useEffect(() => {
@@ -6130,35 +6044,32 @@ const Mt_MessageBox = ({
6130
6044
  justifyContent: buttonsToRender.length === 1 ? "flex-end" : "center",
6131
6045
  gap: "10px"
6132
6046
  },
6133
- children: buttonsToRender.map((btn, index) => {
6134
- var _a2, _b2, _c2, _d;
6135
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
6136
- "button",
6137
- {
6138
- ref: (el) => buttonRefs.current[index] = el,
6139
- onClick: btn.onClick,
6140
- style: {
6141
- flexGrow: buttonsToRender.length === 1 ? 0 : 1,
6142
- padding: "8px 14px",
6143
- fontSize: buttonFontSize,
6144
- backgroundColor: btn.color || (((_a2 = btn.label) == null ? void 0 : _a2.toLowerCase()) === "cancel" ? "#6c757d" : ((_d = (_c2 = (_b2 = defaultIcons[messageType]) == null ? void 0 : _b2.props) == null ? void 0 : _c2.style) == null ? void 0 : _d.color) || "#0275d8"),
6145
- color: btn.textColor || "#fff",
6146
- border: "none",
6147
- borderRadius: "5px",
6148
- cursor: "pointer",
6149
- flexShrink: 0,
6150
- outline: "none",
6151
- transition: "box-shadow 0.3s ease",
6152
- fontFamily
6153
- },
6154
- onFocus: (e) => {
6155
- e.target.style.border = "2px solid black";
6156
- },
6157
- children: btn.label
6047
+ children: buttonsToRender.map((btn, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(
6048
+ "button",
6049
+ {
6050
+ ref: (el) => buttonRefs.current[index] = el,
6051
+ onClick: btn.onClick,
6052
+ style: {
6053
+ flexGrow: buttonsToRender.length === 1 ? 0 : 1,
6054
+ padding: "8px 14px",
6055
+ fontSize: buttonFontSize,
6056
+ backgroundColor: btn.color || (btn.label?.toLowerCase() === "cancel" ? "#6c757d" : defaultIcons[messageType]?.props?.style?.color || "#0275d8"),
6057
+ color: btn.textColor || "#fff",
6058
+ border: "none",
6059
+ borderRadius: "5px",
6060
+ cursor: "pointer",
6061
+ flexShrink: 0,
6062
+ outline: "none",
6063
+ transition: "box-shadow 0.3s ease",
6064
+ fontFamily
6158
6065
  },
6159
- index
6160
- );
6161
- })
6066
+ onFocus: (e) => {
6067
+ e.target.style.border = "2px solid black";
6068
+ },
6069
+ children: btn.label
6070
+ },
6071
+ index
6072
+ ))
6162
6073
  }
6163
6074
  )
6164
6075
  ]
@@ -6279,10 +6190,7 @@ const ComboDropdown = ({
6279
6190
  setInputValue(val);
6280
6191
  const normalized = normalizeOptions2(options);
6281
6192
  const filtered = normalized.filter(
6282
- (opt) => {
6283
- var _a;
6284
- return (_a = opt.label) == null ? void 0 : _a.toLowerCase().includes(val.toLowerCase());
6285
- }
6193
+ (opt) => opt.label?.toLowerCase().includes(val.toLowerCase())
6286
6194
  );
6287
6195
  setFilteredOptions(filtered);
6288
6196
  setShowDropdown(true);
@@ -6347,8 +6255,7 @@ const ComboDropdown = ({
6347
6255
  setFilteredOptions(normalizeOptions2(options));
6348
6256
  }
6349
6257
  setShowDropdown((prev) => {
6350
- var _a;
6351
- if (!prev) (_a = inputRef.current) == null ? void 0 : _a.focus();
6258
+ if (!prev) inputRef.current?.focus();
6352
6259
  return !prev;
6353
6260
  });
6354
6261
  };
@@ -6417,11 +6324,6 @@ const ComboDropdown = ({
6417
6324
  ] });
6418
6325
  };
6419
6326
  var classnames = { exports: {} };
6420
- /*!
6421
- Copyright (c) 2018 Jed Watson.
6422
- Licensed under the MIT License (MIT), see
6423
- http://jedwatson.github.io/classnames
6424
- */
6425
6327
  var hasRequiredClassnames;
6426
6328
  function requireClassnames() {
6427
6329
  if (hasRequiredClassnames) return classnames.exports;
@@ -12381,11 +12283,6 @@ function requireLib() {
12381
12283
  e.exports = React__default;
12382
12284
  }, function(e, t, r2) {
12383
12285
  var n;
12384
- /*!
12385
- Copyright (c) 2017 Jed Watson.
12386
- Licensed under the MIT License (MIT), see
12387
- http://jedwatson.github.io/classnames
12388
- */
12389
12286
  !(function() {
12390
12287
  var r3 = {}.hasOwnProperty;
12391
12288
  function a() {
@@ -14514,7 +14411,7 @@ const CustomInput = ({
14514
14411
  dropdownClass: "z-50 mt-1 bg-white border border-gray-300 rounded-md text-sm max-h-60 overflow-y-auto shadow-lg"
14515
14412
  }
14516
14413
  ),
14517
- (button == null ? void 0 : button.label) && /* @__PURE__ */ jsxRuntimeExports.jsx(
14414
+ button?.label && /* @__PURE__ */ jsxRuntimeExports.jsx(
14518
14415
  "button",
14519
14416
  {
14520
14417
  type: "button",
@@ -14567,10 +14464,10 @@ const CustomInput = ({
14567
14464
  children: showPassword ? /* @__PURE__ */ jsxRuntimeExports.jsx(FiEye, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(FiEyeOff, {})
14568
14465
  }
14569
14466
  ),
14570
- (button == null ? void 0 : button.label) && /* @__PURE__ */ jsxRuntimeExports.jsx(
14467
+ button?.label && /* @__PURE__ */ jsxRuntimeExports.jsx(
14571
14468
  "button",
14572
14469
  {
14573
- onClick: button == null ? void 0 : button.onClick,
14470
+ onClick: button?.onClick,
14574
14471
  disabled: disabled || enable,
14575
14472
  className: `px-2 py-2 text-white ${backgroundColor2 || "bg-[#3B5AA1]"} border-l border-[#12AB5B] rounded-r-md ${disabled || enable ? "opacity-50 cursor-not-allowed" : ""}`,
14576
14473
  style: { height: height2 },
@@ -14701,7 +14598,6 @@ const MasterTable = ({
14701
14598
  menuIconColor = "black"
14702
14599
  // Menu Icon color on header
14703
14600
  }) => {
14704
- var _a, _b, _c, _d, _e, _f, _g;
14705
14601
  const defaultStyles = {
14706
14602
  headerTextColor: "text-gray-700",
14707
14603
  headerBgColor: "bg-gray-100",
@@ -15197,7 +15093,7 @@ const MasterTable = ({
15197
15093
  }
15198
15094
  ),
15199
15095
  column.key !== "__sr_no" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1 p-1", children: [
15200
- (sortConfig == null ? void 0 : sortConfig.columnKey) === column.key && (sortConfig.direction === "asc" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
15096
+ sortConfig?.columnKey === column.key && (sortConfig.direction === "asc" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
15201
15097
  ArrowUpwardIcon,
15202
15098
  {
15203
15099
  sx: {
@@ -15396,7 +15292,7 @@ const MasterTable = ({
15396
15292
  }
15397
15293
  ),
15398
15294
  /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, {}),
15399
- (((_a = organizedColumns.all.find((col) => col.key === menuColumn)) == null ? void 0 : _a.filterable) || ((_b = organizedColumns.all.find((col) => col.key === menuColumn)) == null ? void 0 : _b.type) === "date") && /* @__PURE__ */ jsxRuntimeExports.jsxs(
15295
+ (organizedColumns.all.find((col) => col.key === menuColumn)?.filterable || organizedColumns.all.find((col) => col.key === menuColumn)?.type === "date") && /* @__PURE__ */ jsxRuntimeExports.jsxs(
15400
15296
  MenuItem,
15401
15297
  {
15402
15298
  sx: {
@@ -15422,7 +15318,7 @@ const MasterTable = ({
15422
15318
  ]
15423
15319
  }
15424
15320
  ),
15425
- !((_c = organizedColumns.all.find((col) => col.key === menuColumn)) == null ? void 0 : _c.group) && /* @__PURE__ */ jsxRuntimeExports.jsxs(
15321
+ !organizedColumns.all.find((col) => col.key === menuColumn)?.group && /* @__PURE__ */ jsxRuntimeExports.jsxs(
15426
15322
  MenuItem,
15427
15323
  {
15428
15324
  sx: {
@@ -15505,7 +15401,7 @@ const MasterTable = ({
15505
15401
  },
15506
15402
  onMouseLeave: () => setFilterAnchorEl(null)
15507
15403
  },
15508
- children: ((_d = organizedColumns.all.find((col) => col.key === menuColumn)) == null ? void 0 : _d.type) === "date" ? (
15404
+ children: organizedColumns.all.find((col) => col.key === menuColumn)?.type === "date" ? (
15509
15405
  // Date Filter UI
15510
15406
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { padding: "10px", width: "250px" }, children: [
15511
15407
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "flex", gap: "5px", marginTop: "5px" }, children: [
@@ -15514,7 +15410,7 @@ const MasterTable = ({
15514
15410
  {
15515
15411
  type: "date",
15516
15412
  label: "From",
15517
- value: ((_e = tempDateFilters[menuColumn]) == null ? void 0 : _e.startDate) || "",
15413
+ value: tempDateFilters[menuColumn]?.startDate || "",
15518
15414
  onChange: (e) => handleTempDateChange(menuColumn, "startDate", e.target.value),
15519
15415
  fullWidth: true,
15520
15416
  size: "small",
@@ -15530,7 +15426,7 @@ const MasterTable = ({
15530
15426
  {
15531
15427
  type: "date",
15532
15428
  label: "To",
15533
- value: ((_f = tempDateFilters[menuColumn]) == null ? void 0 : _f.endDate) || "",
15429
+ value: tempDateFilters[menuColumn]?.endDate || "",
15534
15430
  onChange: (e) => handleTempDateChange(menuColumn, "endDate", e.target.value),
15535
15431
  fullWidth: true,
15536
15432
  size: "small",
@@ -15586,14 +15482,11 @@ const MasterTable = ({
15586
15482
  Button$1,
15587
15483
  {
15588
15484
  variant: "contained",
15589
- onClick: () => {
15590
- var _a2, _b2;
15591
- return handleDateFilterChange(
15592
- menuColumn,
15593
- (_a2 = tempDateFilters[menuColumn]) == null ? void 0 : _a2.startDate,
15594
- (_b2 = tempDateFilters[menuColumn]) == null ? void 0 : _b2.endDate
15595
- );
15596
- },
15485
+ onClick: () => handleDateFilterChange(
15486
+ menuColumn,
15487
+ tempDateFilters[menuColumn]?.startDate,
15488
+ tempDateFilters[menuColumn]?.endDate
15489
+ ),
15597
15490
  fullWidth: true,
15598
15491
  size: "small",
15599
15492
  style: {
@@ -15619,7 +15512,7 @@ const MasterTable = ({
15619
15512
  }
15620
15513
  )
15621
15514
  ] })
15622
- ) : ((_g = organizedColumns.all.find((col) => col.key === menuColumn)) == null ? void 0 : _g.filterable) ? (
15515
+ ) : organizedColumns.all.find((col) => col.key === menuColumn)?.filterable ? (
15623
15516
  // Regular Filter UI - only show if column is explicitly filterable
15624
15517
  /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
15625
15518
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -15634,38 +15527,35 @@ const MasterTable = ({
15634
15527
  }
15635
15528
  ),
15636
15529
  /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, { sx: { margin: "1px 0" } }),
15637
- getUniqueValues(menuColumn).map((value) => {
15638
- var _a2;
15639
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
15640
- MenuItem,
15641
- {
15642
- sx: { padding: "1px 2px", minHeight: "auto" },
15643
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
15644
- FormControlLabel,
15645
- {
15646
- control: /* @__PURE__ */ jsxRuntimeExports.jsx(
15647
- Checkbox,
15648
- {
15649
- size: "small",
15650
- checked: ((_a2 = selectedFilters[menuColumn]) == null ? void 0 : _a2[value]) || false,
15651
- onChange: (e) => handleFilterChange(value, e.target.checked),
15652
- sx: { padding: "2px" }
15653
- }
15654
- ),
15655
- label: value,
15656
- sx: {
15657
- margin: 0,
15658
- "& .MuiFormControlLabel-label": {
15659
- fontSize: "0.85rem",
15660
- paddingLeft: "4px"
15661
- }
15530
+ getUniqueValues(menuColumn).map((value) => /* @__PURE__ */ jsxRuntimeExports.jsx(
15531
+ MenuItem,
15532
+ {
15533
+ sx: { padding: "1px 2px", minHeight: "auto" },
15534
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
15535
+ FormControlLabel,
15536
+ {
15537
+ control: /* @__PURE__ */ jsxRuntimeExports.jsx(
15538
+ Checkbox,
15539
+ {
15540
+ size: "small",
15541
+ checked: selectedFilters[menuColumn]?.[value] || false,
15542
+ onChange: (e) => handleFilterChange(value, e.target.checked),
15543
+ sx: { padding: "2px" }
15544
+ }
15545
+ ),
15546
+ label: value,
15547
+ sx: {
15548
+ margin: 0,
15549
+ "& .MuiFormControlLabel-label": {
15550
+ fontSize: "0.85rem",
15551
+ paddingLeft: "4px"
15662
15552
  }
15663
15553
  }
15664
- )
15665
- },
15666
- value
15667
- );
15668
- })
15554
+ }
15555
+ )
15556
+ },
15557
+ value
15558
+ ))
15669
15559
  ] })
15670
15560
  ) : null
15671
15561
  }
@@ -16012,7 +15902,6 @@ const PowerDropdown = ({
16012
15902
  value: newEmployee.id,
16013
15903
  raw: { ...newEmployee }
16014
15904
  };
16015
- console.log([...localOptions, newOption]);
16016
15905
  setLocalOptions([...localOptions, newOption]);
16017
15906
  setDropdownOpen(false);
16018
15907
  setShowAddModal(false);
@@ -16024,11 +15913,8 @@ const PowerDropdown = ({
16024
15913
  [options, optionLabelKey, optionValueKey]
16025
15914
  );
16026
15915
  const filteredOptions = useMemo(() => {
16027
- return localOptions == null ? void 0 : localOptions.filter(
16028
- (option) => {
16029
- var _a;
16030
- return (_a = option.label) == null ? void 0 : _a.toLowerCase().includes(inputVal.toLowerCase());
16031
- }
15916
+ return localOptions?.filter(
15917
+ (option) => option.label?.toLowerCase().includes(inputVal.toLowerCase())
16032
15918
  );
16033
15919
  }, [inputVal, localOptions]);
16034
15920
  const handleSelect = (option) => {
@@ -16116,7 +16002,7 @@ const PowerDropdown = ({
16116
16002
  const columns = useMemo(() => generateColumns(), [options, columnWidths]);
16117
16003
  console.log("columns", columns);
16118
16004
  useEffect(() => {
16119
- setInputVal((value == null ? void 0 : value[optionLabelKey]) || "");
16005
+ setInputVal(value?.[optionLabelKey] || "");
16120
16006
  }, [value, optionLabelKey]);
16121
16007
  useEffect(() => {
16122
16008
  if (!suggestion) {
@@ -16217,7 +16103,7 @@ const PowerDropdown = ({
16217
16103
  const match = filteredOptions.find(
16218
16104
  (opt) => opt.label.toLowerCase().startsWith(newVal.toLowerCase())
16219
16105
  );
16220
- setSuggestion((match == null ? void 0 : match.label) || "");
16106
+ setSuggestion(match?.label || "");
16221
16107
  },
16222
16108
  onKeyDown: handleKeyDown,
16223
16109
  style: {
@@ -16442,12 +16328,6 @@ const PowerDropdown = ({
16442
16328
  )
16443
16329
  ] });
16444
16330
  };
16445
- /**
16446
- * @license lucide-react v0.542.0 - ISC
16447
- *
16448
- * This source code is licensed under the ISC license.
16449
- * See the LICENSE file in the root directory of this source tree.
16450
- */
16451
16331
  const toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
16452
16332
  const toCamelCase = (string) => string.replace(
16453
16333
  /^([A-Z])|[\s-_]+(\w)/g,
@@ -16467,12 +16347,6 @@ const hasA11yProp = (props) => {
16467
16347
  }
16468
16348
  }
16469
16349
  };
16470
- /**
16471
- * @license lucide-react v0.542.0 - ISC
16472
- *
16473
- * This source code is licensed under the ISC license.
16474
- * See the LICENSE file in the root directory of this source tree.
16475
- */
16476
16350
  var defaultAttributes = {
16477
16351
  xmlns: "http://www.w3.org/2000/svg",
16478
16352
  width: 24,
@@ -16484,12 +16358,6 @@ var defaultAttributes = {
16484
16358
  strokeLinecap: "round",
16485
16359
  strokeLinejoin: "round"
16486
16360
  };
16487
- /**
16488
- * @license lucide-react v0.542.0 - ISC
16489
- *
16490
- * This source code is licensed under the ISC license.
16491
- * See the LICENSE file in the root directory of this source tree.
16492
- */
16493
16361
  const Icon = forwardRef(
16494
16362
  ({
16495
16363
  color: color2 = "currentColor",
@@ -16519,12 +16387,6 @@ const Icon = forwardRef(
16519
16387
  ]
16520
16388
  )
16521
16389
  );
16522
- /**
16523
- * @license lucide-react v0.542.0 - ISC
16524
- *
16525
- * This source code is licensed under the ISC license.
16526
- * See the LICENSE file in the root directory of this source tree.
16527
- */
16528
16390
  const createLucideIcon = (iconName, iconNode) => {
16529
16391
  const Component = forwardRef(
16530
16392
  ({ className, ...props }, ref) => createElement(Icon, {
@@ -16541,24 +16403,12 @@ const createLucideIcon = (iconName, iconNode) => {
16541
16403
  Component.displayName = toPascalCase(iconName);
16542
16404
  return Component;
16543
16405
  };
16544
- /**
16545
- * @license lucide-react v0.542.0 - ISC
16546
- *
16547
- * This source code is licensed under the ISC license.
16548
- * See the LICENSE file in the root directory of this source tree.
16549
- */
16550
16406
  const __iconNode$4 = [
16551
16407
  ["path", { d: "M12 15V3", key: "m9g1x1" }],
16552
16408
  ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
16553
16409
  ["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
16554
16410
  ];
16555
16411
  const Download = createLucideIcon("download", __iconNode$4);
16556
- /**
16557
- * @license lucide-react v0.542.0 - ISC
16558
- *
16559
- * This source code is licensed under the ISC license.
16560
- * See the LICENSE file in the root directory of this source tree.
16561
- */
16562
16412
  const __iconNode$3 = [
16563
16413
  [
16564
16414
  "path",
@@ -16569,24 +16419,12 @@ const __iconNode$3 = [
16569
16419
  ]
16570
16420
  ];
16571
16421
  const Funnel = createLucideIcon("funnel", __iconNode$3);
16572
- /**
16573
- * @license lucide-react v0.542.0 - ISC
16574
- *
16575
- * This source code is licensed under the ISC license.
16576
- * See the LICENSE file in the root directory of this source tree.
16577
- */
16578
16422
  const __iconNode$2 = [
16579
16423
  ["path", { d: "m8 11 2 2 4-4", key: "1sed1v" }],
16580
16424
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
16581
16425
  ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
16582
16426
  ];
16583
16427
  const SearchCheck = createLucideIcon("search-check", __iconNode$2);
16584
- /**
16585
- * @license lucide-react v0.542.0 - ISC
16586
- *
16587
- * This source code is licensed under the ISC license.
16588
- * See the LICENSE file in the root directory of this source tree.
16589
- */
16590
16428
  const __iconNode$1 = [
16591
16429
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
16592
16430
  ["line", { x1: "3", x2: "21", y1: "9", y2: "9", key: "1vqk6q" }],
@@ -16595,12 +16433,6 @@ const __iconNode$1 = [
16595
16433
  ["line", { x1: "15", x2: "15", y1: "9", y2: "21", key: "1n26ft" }]
16596
16434
  ];
16597
16435
  const Sheet = createLucideIcon("sheet", __iconNode$1);
16598
- /**
16599
- * @license lucide-react v0.542.0 - ISC
16600
- *
16601
- * This source code is licensed under the ISC license.
16602
- * See the LICENSE file in the root directory of this source tree.
16603
- */
16604
16436
  const __iconNode = [
16605
16437
  ["path", { d: "M12 3v18", key: "108xh3" }],
16606
16438
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
@@ -17011,374 +16843,373 @@ const defaultFormats = {
17011
16843
  const MISSING_UTC_PLUGIN = ["Missing UTC plugin", "To be able to use UTC or timezones, you have to enable the `utc` plugin", "Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join("\n");
17012
16844
  const MISSING_TIMEZONE_PLUGIN = ["Missing timezone plugin", "To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin", "Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join("\n");
17013
16845
  class AdapterDayjs {
16846
+ isMUIAdapter = true;
16847
+ isTimezoneCompatible = true;
16848
+ lib = "dayjs";
16849
+ escapedCharacters = {
16850
+ start: "[",
16851
+ end: "]"
16852
+ };
16853
+ formatTokenMap = /* @__PURE__ */ (() => formatTokenMap)();
17014
16854
  constructor({
17015
16855
  locale,
17016
16856
  formats
17017
16857
  } = {}) {
17018
- __publicField(this, "isMUIAdapter", true);
17019
- __publicField(this, "isTimezoneCompatible", true);
17020
- __publicField(this, "lib", "dayjs");
17021
- __publicField(this, "escapedCharacters", {
17022
- start: "[",
17023
- end: "]"
17024
- });
17025
- __publicField(this, "formatTokenMap", /* @__PURE__ */ (() => formatTokenMap)());
17026
- __publicField(this, "setLocaleToValue", (value) => {
17027
- const expectedLocale = this.getCurrentLocaleCode();
17028
- if (expectedLocale === value.locale()) {
17029
- return value;
17030
- }
17031
- return value.locale(expectedLocale);
17032
- });
17033
- __publicField(this, "hasUTCPlugin", () => typeof dayjs.utc !== "undefined");
17034
- __publicField(this, "hasTimezonePlugin", () => typeof dayjs.tz !== "undefined");
17035
- __publicField(this, "isSame", (value, comparing, comparisonTemplate) => {
17036
- const comparingInValueTimezone = this.setTimezone(comparing, this.getTimezone(value));
17037
- return value.format(comparisonTemplate) === comparingInValueTimezone.format(comparisonTemplate);
17038
- });
17039
- /**
17040
- * Replaces "default" by undefined and "system" by the system timezone before passing it to `dayjs`.
17041
- */
17042
- __publicField(this, "cleanTimezone", (timezone) => {
17043
- switch (timezone) {
17044
- case "default": {
17045
- return void 0;
17046
- }
17047
- case "system": {
17048
- return dayjs.tz.guess();
17049
- }
17050
- default: {
17051
- return timezone;
17052
- }
17053
- }
17054
- });
17055
- __publicField(this, "createSystemDate", (value) => {
17056
- let date;
17057
- if (this.hasUTCPlugin() && this.hasTimezonePlugin()) {
17058
- const timezone = dayjs.tz.guess();
17059
- if (timezone === "UTC") {
17060
- date = dayjs(value);
17061
- } else {
17062
- date = dayjs.tz(value, timezone);
17063
- }
17064
- } else {
17065
- date = dayjs(value);
17066
- }
17067
- return this.setLocaleToValue(date);
17068
- });
17069
- __publicField(this, "createUTCDate", (value) => {
17070
- if (!this.hasUTCPlugin()) {
17071
- throw new Error(MISSING_UTC_PLUGIN);
17072
- }
17073
- return this.setLocaleToValue(dayjs.utc(value));
17074
- });
17075
- __publicField(this, "createTZDate", (value, timezone) => {
17076
- if (!this.hasUTCPlugin()) {
17077
- throw new Error(MISSING_UTC_PLUGIN);
17078
- }
17079
- if (!this.hasTimezonePlugin()) {
17080
- throw new Error(MISSING_TIMEZONE_PLUGIN);
17081
- }
17082
- const keepLocalTime = value !== void 0 && !value.endsWith("Z");
17083
- return this.setLocaleToValue(dayjs(value).tz(this.cleanTimezone(timezone), keepLocalTime));
17084
- });
17085
- __publicField(this, "getLocaleFormats", () => {
17086
- const locales = dayjs.Ls;
17087
- const locale = this.locale || "en";
17088
- let localeObject = locales[locale];
17089
- if (localeObject === void 0) {
17090
- if (process.env.NODE_ENV !== "production") {
17091
- warnOnce(["MUI X: Your locale has not been found.", "Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale.", "Or you forget to import the locale from 'dayjs/locale/{localeUsed}'", "fallback on English locale."]);
17092
- }
17093
- localeObject = locales.en;
17094
- }
17095
- return localeObject.formats;
17096
- });
17097
- /**
17098
- * If the new day does not have the same offset as the old one (when switching to summer day time for example),
17099
- * Then dayjs will not automatically adjust the offset (moment does).
17100
- * We have to parse again the value to make sure the `fixOffset` method is applied.
17101
- * See https://github.com/iamkun/dayjs/blob/b3624de619d6e734cd0ffdbbd3502185041c1b60/src/plugin/timezone/index.js#L72
17102
- */
17103
- __publicField(this, "adjustOffset", (value) => {
17104
- if (!this.hasTimezonePlugin()) {
17105
- return value;
17106
- }
17107
- const timezone = this.getTimezone(value);
17108
- if (timezone !== "UTC") {
17109
- const fixedValue = value.tz(this.cleanTimezone(timezone), true);
17110
- if (fixedValue.$offset === (value.$offset ?? 0)) {
17111
- return value;
17112
- }
17113
- value.$offset = fixedValue.$offset;
17114
- }
16858
+ this.locale = locale;
16859
+ this.formats = _extends({}, defaultFormats, formats);
16860
+ dayjs.extend(customParseFormatPlugin);
16861
+ }
16862
+ setLocaleToValue = (value) => {
16863
+ const expectedLocale = this.getCurrentLocaleCode();
16864
+ if (expectedLocale === value.locale()) {
17115
16865
  return value;
17116
- });
17117
- __publicField(this, "date", (value, timezone = "default") => {
17118
- if (value === null) {
17119
- return null;
17120
- }
17121
- if (timezone === "UTC") {
17122
- return this.createUTCDate(value);
17123
- }
17124
- if (timezone === "system" || timezone === "default" && !this.hasTimezonePlugin()) {
17125
- return this.createSystemDate(value);
16866
+ }
16867
+ return value.locale(expectedLocale);
16868
+ };
16869
+ hasUTCPlugin = () => typeof dayjs.utc !== "undefined";
16870
+ hasTimezonePlugin = () => typeof dayjs.tz !== "undefined";
16871
+ isSame = (value, comparing, comparisonTemplate) => {
16872
+ const comparingInValueTimezone = this.setTimezone(comparing, this.getTimezone(value));
16873
+ return value.format(comparisonTemplate) === comparingInValueTimezone.format(comparisonTemplate);
16874
+ };
16875
+ /**
16876
+ * Replaces "default" by undefined and "system" by the system timezone before passing it to `dayjs`.
16877
+ */
16878
+ cleanTimezone = (timezone) => {
16879
+ switch (timezone) {
16880
+ case "default": {
16881
+ return void 0;
17126
16882
  }
17127
- return this.createTZDate(value, timezone);
17128
- });
17129
- __publicField(this, "getInvalidDate", () => dayjs(/* @__PURE__ */ new Date("Invalid date")));
17130
- __publicField(this, "getTimezone", (value) => {
17131
- var _a;
17132
- if (this.hasTimezonePlugin()) {
17133
- const zone = (_a = value.$x) == null ? void 0 : _a.$timezone;
17134
- if (zone) {
17135
- return zone;
17136
- }
16883
+ case "system": {
16884
+ return dayjs.tz.guess();
17137
16885
  }
17138
- if (this.hasUTCPlugin() && value.isUTC()) {
17139
- return "UTC";
17140
- }
17141
- return "system";
17142
- });
17143
- __publicField(this, "setTimezone", (value, timezone) => {
17144
- if (this.getTimezone(value) === timezone) {
17145
- return value;
16886
+ default: {
16887
+ return timezone;
17146
16888
  }
16889
+ }
16890
+ };
16891
+ createSystemDate = (value) => {
16892
+ let date;
16893
+ if (this.hasUTCPlugin() && this.hasTimezonePlugin()) {
16894
+ const timezone = dayjs.tz.guess();
17147
16895
  if (timezone === "UTC") {
17148
- if (!this.hasUTCPlugin()) {
17149
- throw new Error(MISSING_UTC_PLUGIN);
17150
- }
17151
- return value.utc();
17152
- }
17153
- if (timezone === "system") {
17154
- return value.local();
17155
- }
17156
- if (!this.hasTimezonePlugin()) {
17157
- if (timezone === "default") {
17158
- return value;
17159
- }
17160
- throw new Error(MISSING_TIMEZONE_PLUGIN);
17161
- }
17162
- return this.setLocaleToValue(dayjs.tz(value, this.cleanTimezone(timezone)));
17163
- });
17164
- __publicField(this, "toJsDate", (value) => {
17165
- return value.toDate();
17166
- });
17167
- __publicField(this, "parse", (value, format) => {
17168
- if (value === "") {
17169
- return null;
17170
- }
17171
- return dayjs(value, format, this.locale, true);
17172
- });
17173
- __publicField(this, "getCurrentLocaleCode", () => {
17174
- return this.locale || "en";
17175
- });
17176
- __publicField(this, "is12HourCycleInCurrentLocale", () => {
17177
- return /A|a/.test(this.getLocaleFormats().LT || "");
17178
- });
17179
- __publicField(this, "expandFormat", (format) => {
17180
- const localeFormats = this.getLocaleFormats();
17181
- const t = (formatBis) => formatBis.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (_, a, b) => a || b.slice(1));
17182
- return format.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (_, a, b) => {
17183
- const B = b && b.toUpperCase();
17184
- return a || localeFormats[b] || t(localeFormats[B]);
17185
- });
17186
- });
17187
- __publicField(this, "isValid", (value) => {
17188
- if (value == null) {
17189
- return false;
17190
- }
17191
- return value.isValid();
17192
- });
17193
- __publicField(this, "format", (value, formatKey) => {
17194
- return this.formatByString(value, this.formats[formatKey]);
17195
- });
17196
- __publicField(this, "formatByString", (value, formatString) => {
17197
- return this.setLocaleToValue(value).format(formatString);
17198
- });
17199
- __publicField(this, "formatNumber", (numberToFormat) => {
17200
- return numberToFormat;
17201
- });
17202
- __publicField(this, "isEqual", (value, comparing) => {
17203
- if (value === null && comparing === null) {
17204
- return true;
16896
+ date = dayjs(value);
16897
+ } else {
16898
+ date = dayjs.tz(value, timezone);
17205
16899
  }
17206
- if (value === null || comparing === null) {
17207
- return false;
16900
+ } else {
16901
+ date = dayjs(value);
16902
+ }
16903
+ return this.setLocaleToValue(date);
16904
+ };
16905
+ createUTCDate = (value) => {
16906
+ if (!this.hasUTCPlugin()) {
16907
+ throw new Error(MISSING_UTC_PLUGIN);
16908
+ }
16909
+ return this.setLocaleToValue(dayjs.utc(value));
16910
+ };
16911
+ createTZDate = (value, timezone) => {
16912
+ if (!this.hasUTCPlugin()) {
16913
+ throw new Error(MISSING_UTC_PLUGIN);
16914
+ }
16915
+ if (!this.hasTimezonePlugin()) {
16916
+ throw new Error(MISSING_TIMEZONE_PLUGIN);
16917
+ }
16918
+ const keepLocalTime = value !== void 0 && !value.endsWith("Z");
16919
+ return this.setLocaleToValue(dayjs(value).tz(this.cleanTimezone(timezone), keepLocalTime));
16920
+ };
16921
+ getLocaleFormats = () => {
16922
+ const locales = dayjs.Ls;
16923
+ const locale = this.locale || "en";
16924
+ let localeObject = locales[locale];
16925
+ if (localeObject === void 0) {
16926
+ if (process.env.NODE_ENV !== "production") {
16927
+ warnOnce(["MUI X: Your locale has not been found.", "Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale.", "Or you forget to import the locale from 'dayjs/locale/{localeUsed}'", "fallback on English locale."]);
17208
16928
  }
17209
- return value.toDate().getTime() === comparing.toDate().getTime();
17210
- });
17211
- __publicField(this, "isSameYear", (value, comparing) => {
17212
- return this.isSame(value, comparing, "YYYY");
17213
- });
17214
- __publicField(this, "isSameMonth", (value, comparing) => {
17215
- return this.isSame(value, comparing, "YYYY-MM");
17216
- });
17217
- __publicField(this, "isSameDay", (value, comparing) => {
17218
- return this.isSame(value, comparing, "YYYY-MM-DD");
17219
- });
17220
- __publicField(this, "isSameHour", (value, comparing) => {
17221
- return value.isSame(comparing, "hour");
17222
- });
17223
- __publicField(this, "isAfter", (value, comparing) => {
17224
- return value > comparing;
17225
- });
17226
- __publicField(this, "isAfterYear", (value, comparing) => {
17227
- if (!this.hasUTCPlugin()) {
17228
- return value.isAfter(comparing, "year");
16929
+ localeObject = locales.en;
16930
+ }
16931
+ return localeObject.formats;
16932
+ };
16933
+ /**
16934
+ * If the new day does not have the same offset as the old one (when switching to summer day time for example),
16935
+ * Then dayjs will not automatically adjust the offset (moment does).
16936
+ * We have to parse again the value to make sure the `fixOffset` method is applied.
16937
+ * See https://github.com/iamkun/dayjs/blob/b3624de619d6e734cd0ffdbbd3502185041c1b60/src/plugin/timezone/index.js#L72
16938
+ */
16939
+ adjustOffset = (value) => {
16940
+ if (!this.hasTimezonePlugin()) {
16941
+ return value;
16942
+ }
16943
+ const timezone = this.getTimezone(value);
16944
+ if (timezone !== "UTC") {
16945
+ const fixedValue = value.tz(this.cleanTimezone(timezone), true);
16946
+ if (fixedValue.$offset === (value.$offset ?? 0)) {
16947
+ return value;
17229
16948
  }
17230
- return !this.isSameYear(value, comparing) && value.utc() > comparing.utc();
17231
- });
17232
- __publicField(this, "isAfterDay", (value, comparing) => {
17233
- if (!this.hasUTCPlugin()) {
17234
- return value.isAfter(comparing, "day");
16949
+ value.$offset = fixedValue.$offset;
16950
+ }
16951
+ return value;
16952
+ };
16953
+ date = (value, timezone = "default") => {
16954
+ if (value === null) {
16955
+ return null;
16956
+ }
16957
+ if (timezone === "UTC") {
16958
+ return this.createUTCDate(value);
16959
+ }
16960
+ if (timezone === "system" || timezone === "default" && !this.hasTimezonePlugin()) {
16961
+ return this.createSystemDate(value);
16962
+ }
16963
+ return this.createTZDate(value, timezone);
16964
+ };
16965
+ getInvalidDate = () => dayjs(/* @__PURE__ */ new Date("Invalid date"));
16966
+ getTimezone = (value) => {
16967
+ if (this.hasTimezonePlugin()) {
16968
+ const zone = value.$x?.$timezone;
16969
+ if (zone) {
16970
+ return zone;
17235
16971
  }
17236
- return !this.isSameDay(value, comparing) && value.utc() > comparing.utc();
17237
- });
17238
- __publicField(this, "isBefore", (value, comparing) => {
17239
- return value < comparing;
17240
- });
17241
- __publicField(this, "isBeforeYear", (value, comparing) => {
16972
+ }
16973
+ if (this.hasUTCPlugin() && value.isUTC()) {
16974
+ return "UTC";
16975
+ }
16976
+ return "system";
16977
+ };
16978
+ setTimezone = (value, timezone) => {
16979
+ if (this.getTimezone(value) === timezone) {
16980
+ return value;
16981
+ }
16982
+ if (timezone === "UTC") {
17242
16983
  if (!this.hasUTCPlugin()) {
17243
- return value.isBefore(comparing, "year");
16984
+ throw new Error(MISSING_UTC_PLUGIN);
17244
16985
  }
17245
- return !this.isSameYear(value, comparing) && value.utc() < comparing.utc();
17246
- });
17247
- __publicField(this, "isBeforeDay", (value, comparing) => {
17248
- if (!this.hasUTCPlugin()) {
17249
- return value.isBefore(comparing, "day");
16986
+ return value.utc();
16987
+ }
16988
+ if (timezone === "system") {
16989
+ return value.local();
16990
+ }
16991
+ if (!this.hasTimezonePlugin()) {
16992
+ if (timezone === "default") {
16993
+ return value;
17250
16994
  }
17251
- return !this.isSameDay(value, comparing) && value.utc() < comparing.utc();
17252
- });
17253
- __publicField(this, "isWithinRange", (value, [start2, end2]) => {
17254
- return value >= start2 && value <= end2;
17255
- });
17256
- __publicField(this, "startOfYear", (value) => {
17257
- return this.adjustOffset(value.startOf("year"));
17258
- });
17259
- __publicField(this, "startOfMonth", (value) => {
17260
- return this.adjustOffset(value.startOf("month"));
17261
- });
17262
- __publicField(this, "startOfWeek", (value) => {
17263
- return this.adjustOffset(this.setLocaleToValue(value).startOf("week"));
17264
- });
17265
- __publicField(this, "startOfDay", (value) => {
17266
- return this.adjustOffset(value.startOf("day"));
17267
- });
17268
- __publicField(this, "endOfYear", (value) => {
17269
- return this.adjustOffset(value.endOf("year"));
17270
- });
17271
- __publicField(this, "endOfMonth", (value) => {
17272
- return this.adjustOffset(value.endOf("month"));
17273
- });
17274
- __publicField(this, "endOfWeek", (value) => {
17275
- return this.adjustOffset(this.setLocaleToValue(value).endOf("week"));
17276
- });
17277
- __publicField(this, "endOfDay", (value) => {
17278
- return this.adjustOffset(value.endOf("day"));
17279
- });
17280
- __publicField(this, "addYears", (value, amount) => {
17281
- return this.adjustOffset(value.add(amount, "year"));
17282
- });
17283
- __publicField(this, "addMonths", (value, amount) => {
17284
- return this.adjustOffset(value.add(amount, "month"));
17285
- });
17286
- __publicField(this, "addWeeks", (value, amount) => {
17287
- return this.adjustOffset(value.add(amount, "week"));
17288
- });
17289
- __publicField(this, "addDays", (value, amount) => {
17290
- return this.adjustOffset(value.add(amount, "day"));
17291
- });
17292
- __publicField(this, "addHours", (value, amount) => {
17293
- return this.adjustOffset(value.add(amount, "hour"));
17294
- });
17295
- __publicField(this, "addMinutes", (value, amount) => {
17296
- return this.adjustOffset(value.add(amount, "minute"));
17297
- });
17298
- __publicField(this, "addSeconds", (value, amount) => {
17299
- return this.adjustOffset(value.add(amount, "second"));
17300
- });
17301
- __publicField(this, "getYear", (value) => {
17302
- return value.year();
17303
- });
17304
- __publicField(this, "getMonth", (value) => {
17305
- return value.month();
17306
- });
17307
- __publicField(this, "getDate", (value) => {
17308
- return value.date();
17309
- });
17310
- __publicField(this, "getHours", (value) => {
17311
- return value.hour();
17312
- });
17313
- __publicField(this, "getMinutes", (value) => {
17314
- return value.minute();
17315
- });
17316
- __publicField(this, "getSeconds", (value) => {
17317
- return value.second();
17318
- });
17319
- __publicField(this, "getMilliseconds", (value) => {
17320
- return value.millisecond();
17321
- });
17322
- __publicField(this, "setYear", (value, year) => {
17323
- return this.adjustOffset(value.set("year", year));
17324
- });
17325
- __publicField(this, "setMonth", (value, month) => {
17326
- return this.adjustOffset(value.set("month", month));
17327
- });
17328
- __publicField(this, "setDate", (value, date) => {
17329
- return this.adjustOffset(value.set("date", date));
17330
- });
17331
- __publicField(this, "setHours", (value, hours) => {
17332
- return this.adjustOffset(value.set("hour", hours));
17333
- });
17334
- __publicField(this, "setMinutes", (value, minutes) => {
17335
- return this.adjustOffset(value.set("minute", minutes));
17336
- });
17337
- __publicField(this, "setSeconds", (value, seconds) => {
17338
- return this.adjustOffset(value.set("second", seconds));
17339
- });
17340
- __publicField(this, "setMilliseconds", (value, milliseconds) => {
17341
- return this.adjustOffset(value.set("millisecond", milliseconds));
17342
- });
17343
- __publicField(this, "getDaysInMonth", (value) => {
17344
- return value.daysInMonth();
17345
- });
17346
- __publicField(this, "getWeekArray", (value) => {
17347
- const start2 = this.startOfWeek(this.startOfMonth(value));
17348
- const end2 = this.endOfWeek(this.endOfMonth(value));
17349
- let count = 0;
17350
- let current = start2;
17351
- const nestedWeeks = [];
17352
- while (current < end2) {
17353
- const weekNumber = Math.floor(count / 7);
17354
- nestedWeeks[weekNumber] = nestedWeeks[weekNumber] || [];
17355
- nestedWeeks[weekNumber].push(current);
17356
- current = this.addDays(current, 1);
17357
- count += 1;
17358
- }
17359
- return nestedWeeks;
17360
- });
17361
- __publicField(this, "getWeekNumber", (value) => {
17362
- return value.week();
17363
- });
17364
- __publicField(this, "getYearRange", ([start2, end2]) => {
17365
- const startDate = this.startOfYear(start2);
17366
- const endDate = this.endOfYear(end2);
17367
- const years = [];
17368
- let current = startDate;
17369
- while (this.isBefore(current, endDate)) {
17370
- years.push(current);
17371
- current = this.addYears(current, 1);
17372
- }
17373
- return years;
16995
+ throw new Error(MISSING_TIMEZONE_PLUGIN);
16996
+ }
16997
+ return this.setLocaleToValue(dayjs.tz(value, this.cleanTimezone(timezone)));
16998
+ };
16999
+ toJsDate = (value) => {
17000
+ return value.toDate();
17001
+ };
17002
+ parse = (value, format) => {
17003
+ if (value === "") {
17004
+ return null;
17005
+ }
17006
+ return dayjs(value, format, this.locale, true);
17007
+ };
17008
+ getCurrentLocaleCode = () => {
17009
+ return this.locale || "en";
17010
+ };
17011
+ is12HourCycleInCurrentLocale = () => {
17012
+ return /A|a/.test(this.getLocaleFormats().LT || "");
17013
+ };
17014
+ expandFormat = (format) => {
17015
+ const localeFormats = this.getLocaleFormats();
17016
+ const t = (formatBis) => formatBis.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (_, a, b) => a || b.slice(1));
17017
+ return format.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (_, a, b) => {
17018
+ const B = b && b.toUpperCase();
17019
+ return a || localeFormats[b] || t(localeFormats[B]);
17374
17020
  });
17375
- this.locale = locale;
17376
- this.formats = _extends({}, defaultFormats, formats);
17377
- dayjs.extend(customParseFormatPlugin);
17378
- }
17021
+ };
17022
+ isValid = (value) => {
17023
+ if (value == null) {
17024
+ return false;
17025
+ }
17026
+ return value.isValid();
17027
+ };
17028
+ format = (value, formatKey) => {
17029
+ return this.formatByString(value, this.formats[formatKey]);
17030
+ };
17031
+ formatByString = (value, formatString) => {
17032
+ return this.setLocaleToValue(value).format(formatString);
17033
+ };
17034
+ formatNumber = (numberToFormat) => {
17035
+ return numberToFormat;
17036
+ };
17037
+ isEqual = (value, comparing) => {
17038
+ if (value === null && comparing === null) {
17039
+ return true;
17040
+ }
17041
+ if (value === null || comparing === null) {
17042
+ return false;
17043
+ }
17044
+ return value.toDate().getTime() === comparing.toDate().getTime();
17045
+ };
17046
+ isSameYear = (value, comparing) => {
17047
+ return this.isSame(value, comparing, "YYYY");
17048
+ };
17049
+ isSameMonth = (value, comparing) => {
17050
+ return this.isSame(value, comparing, "YYYY-MM");
17051
+ };
17052
+ isSameDay = (value, comparing) => {
17053
+ return this.isSame(value, comparing, "YYYY-MM-DD");
17054
+ };
17055
+ isSameHour = (value, comparing) => {
17056
+ return value.isSame(comparing, "hour");
17057
+ };
17058
+ isAfter = (value, comparing) => {
17059
+ return value > comparing;
17060
+ };
17061
+ isAfterYear = (value, comparing) => {
17062
+ if (!this.hasUTCPlugin()) {
17063
+ return value.isAfter(comparing, "year");
17064
+ }
17065
+ return !this.isSameYear(value, comparing) && value.utc() > comparing.utc();
17066
+ };
17067
+ isAfterDay = (value, comparing) => {
17068
+ if (!this.hasUTCPlugin()) {
17069
+ return value.isAfter(comparing, "day");
17070
+ }
17071
+ return !this.isSameDay(value, comparing) && value.utc() > comparing.utc();
17072
+ };
17073
+ isBefore = (value, comparing) => {
17074
+ return value < comparing;
17075
+ };
17076
+ isBeforeYear = (value, comparing) => {
17077
+ if (!this.hasUTCPlugin()) {
17078
+ return value.isBefore(comparing, "year");
17079
+ }
17080
+ return !this.isSameYear(value, comparing) && value.utc() < comparing.utc();
17081
+ };
17082
+ isBeforeDay = (value, comparing) => {
17083
+ if (!this.hasUTCPlugin()) {
17084
+ return value.isBefore(comparing, "day");
17085
+ }
17086
+ return !this.isSameDay(value, comparing) && value.utc() < comparing.utc();
17087
+ };
17088
+ isWithinRange = (value, [start2, end2]) => {
17089
+ return value >= start2 && value <= end2;
17090
+ };
17091
+ startOfYear = (value) => {
17092
+ return this.adjustOffset(value.startOf("year"));
17093
+ };
17094
+ startOfMonth = (value) => {
17095
+ return this.adjustOffset(value.startOf("month"));
17096
+ };
17097
+ startOfWeek = (value) => {
17098
+ return this.adjustOffset(this.setLocaleToValue(value).startOf("week"));
17099
+ };
17100
+ startOfDay = (value) => {
17101
+ return this.adjustOffset(value.startOf("day"));
17102
+ };
17103
+ endOfYear = (value) => {
17104
+ return this.adjustOffset(value.endOf("year"));
17105
+ };
17106
+ endOfMonth = (value) => {
17107
+ return this.adjustOffset(value.endOf("month"));
17108
+ };
17109
+ endOfWeek = (value) => {
17110
+ return this.adjustOffset(this.setLocaleToValue(value).endOf("week"));
17111
+ };
17112
+ endOfDay = (value) => {
17113
+ return this.adjustOffset(value.endOf("day"));
17114
+ };
17115
+ addYears = (value, amount) => {
17116
+ return this.adjustOffset(value.add(amount, "year"));
17117
+ };
17118
+ addMonths = (value, amount) => {
17119
+ return this.adjustOffset(value.add(amount, "month"));
17120
+ };
17121
+ addWeeks = (value, amount) => {
17122
+ return this.adjustOffset(value.add(amount, "week"));
17123
+ };
17124
+ addDays = (value, amount) => {
17125
+ return this.adjustOffset(value.add(amount, "day"));
17126
+ };
17127
+ addHours = (value, amount) => {
17128
+ return this.adjustOffset(value.add(amount, "hour"));
17129
+ };
17130
+ addMinutes = (value, amount) => {
17131
+ return this.adjustOffset(value.add(amount, "minute"));
17132
+ };
17133
+ addSeconds = (value, amount) => {
17134
+ return this.adjustOffset(value.add(amount, "second"));
17135
+ };
17136
+ getYear = (value) => {
17137
+ return value.year();
17138
+ };
17139
+ getMonth = (value) => {
17140
+ return value.month();
17141
+ };
17142
+ getDate = (value) => {
17143
+ return value.date();
17144
+ };
17145
+ getHours = (value) => {
17146
+ return value.hour();
17147
+ };
17148
+ getMinutes = (value) => {
17149
+ return value.minute();
17150
+ };
17151
+ getSeconds = (value) => {
17152
+ return value.second();
17153
+ };
17154
+ getMilliseconds = (value) => {
17155
+ return value.millisecond();
17156
+ };
17157
+ setYear = (value, year) => {
17158
+ return this.adjustOffset(value.set("year", year));
17159
+ };
17160
+ setMonth = (value, month) => {
17161
+ return this.adjustOffset(value.set("month", month));
17162
+ };
17163
+ setDate = (value, date) => {
17164
+ return this.adjustOffset(value.set("date", date));
17165
+ };
17166
+ setHours = (value, hours) => {
17167
+ return this.adjustOffset(value.set("hour", hours));
17168
+ };
17169
+ setMinutes = (value, minutes) => {
17170
+ return this.adjustOffset(value.set("minute", minutes));
17171
+ };
17172
+ setSeconds = (value, seconds) => {
17173
+ return this.adjustOffset(value.set("second", seconds));
17174
+ };
17175
+ setMilliseconds = (value, milliseconds) => {
17176
+ return this.adjustOffset(value.set("millisecond", milliseconds));
17177
+ };
17178
+ getDaysInMonth = (value) => {
17179
+ return value.daysInMonth();
17180
+ };
17181
+ getWeekArray = (value) => {
17182
+ const start2 = this.startOfWeek(this.startOfMonth(value));
17183
+ const end2 = this.endOfWeek(this.endOfMonth(value));
17184
+ let count = 0;
17185
+ let current = start2;
17186
+ const nestedWeeks = [];
17187
+ while (current < end2) {
17188
+ const weekNumber = Math.floor(count / 7);
17189
+ nestedWeeks[weekNumber] = nestedWeeks[weekNumber] || [];
17190
+ nestedWeeks[weekNumber].push(current);
17191
+ current = this.addDays(current, 1);
17192
+ count += 1;
17193
+ }
17194
+ return nestedWeeks;
17195
+ };
17196
+ getWeekNumber = (value) => {
17197
+ return value.week();
17198
+ };
17379
17199
  getDayOfWeek(value) {
17380
17200
  return value.day() + 1;
17381
17201
  }
17202
+ getYearRange = ([start2, end2]) => {
17203
+ const startDate = this.startOfYear(start2);
17204
+ const endDate = this.endOfYear(end2);
17205
+ const years = [];
17206
+ let current = startDate;
17207
+ while (this.isBefore(current, endDate)) {
17208
+ years.push(current);
17209
+ current = this.addYears(current, 1);
17210
+ }
17211
+ return years;
17212
+ };
17382
17213
  }
17383
17214
  const DEFAULT_THEME = {
17384
17215
  headerBg: "#3f5fa3",
@@ -17525,10 +17356,10 @@ const getFinancialRange = (fy, quarter) => {
17525
17356
  function RangeDateFilter({ column, onClose }) {
17526
17357
  const current = column.getFilterValue() || {};
17527
17358
  const [from, setFrom] = useState(
17528
- (current == null ? void 0 : current.from) ? dayjs(current.from) : null
17359
+ current?.from ? dayjs(current.from) : null
17529
17360
  );
17530
17361
  const [to, setTo] = useState(
17531
- (current == null ? void 0 : current.to) ? dayjs(current.to) : null
17362
+ current?.to ? dayjs(current.to) : null
17532
17363
  );
17533
17364
  const canApply = Boolean(from && to);
17534
17365
  const handleApply = () => {
@@ -17538,13 +17369,13 @@ function RangeDateFilter({ column, onClose }) {
17538
17369
  // 🔥 convert here
17539
17370
  to: to.toDate()
17540
17371
  });
17541
- onClose == null ? void 0 : onClose();
17372
+ onClose?.();
17542
17373
  };
17543
17374
  const handleClear = () => {
17544
17375
  setFrom(null);
17545
17376
  setTo(null);
17546
17377
  column.setFilterValue(void 0);
17547
- onClose == null ? void 0 : onClose();
17378
+ onClose?.();
17548
17379
  };
17549
17380
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { p: 2, width: 240, children: [
17550
17381
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -17635,13 +17466,13 @@ const getFinancialYear = (date) => {
17635
17466
  function FinancialDateFilter({ column, fyOptions = [], closePopover }) {
17636
17467
  const activeFilter = column.getFilterValue();
17637
17468
  const [from, setFrom] = useState(
17638
- (activeFilter == null ? void 0 : activeFilter.from) ? dayjs(activeFilter.from) : null
17469
+ activeFilter?.from ? dayjs(activeFilter.from) : null
17639
17470
  );
17640
17471
  const [to, setTo] = useState(
17641
- (activeFilter == null ? void 0 : activeFilter.to) ? dayjs(activeFilter.to) : null
17472
+ activeFilter?.to ? dayjs(activeFilter.to) : null
17642
17473
  );
17643
- const [fy, setFy] = useState((activeFilter == null ? void 0 : activeFilter.fy) || "");
17644
- const [quarter, setQuarter] = useState((activeFilter == null ? void 0 : activeFilter.quarter) || "");
17474
+ const [fy, setFy] = useState(activeFilter?.fy || "");
17475
+ const [quarter, setQuarter] = useState(activeFilter?.quarter || "");
17645
17476
  const isManual = !fy;
17646
17477
  const isFinancial = Boolean(fy);
17647
17478
  const apply = () => {
@@ -17984,13 +17815,13 @@ const defaultToolBarOpt = {
17984
17815
  globalSearch: true,
17985
17816
  columnFilters: true,
17986
17817
  densityToggle: true,
17987
- fullscreenToggle: true,
17818
+ fullscreenToggle: false,
17988
17819
  exportBtn: true,
17989
17820
  showHideColumnsBtn: true
17990
17821
  };
17991
17822
  const defaultControlOpt = {
17992
17823
  columnActions: true,
17993
- dragging: true,
17824
+ dragging: false,
17994
17825
  colPinning: true,
17995
17826
  pagination: true,
17996
17827
  rowSelection: false,
@@ -18029,7 +17860,7 @@ function SmartGridTable({
18029
17860
  const resolvedTopToolbar = {
18030
17861
  ...defaultToolBarOpt,
18031
17862
  ...topToolbar,
18032
- enabled: !isGridDisabled && (topToolbar == null ? void 0 : topToolbar.enabled) !== false
17863
+ enabled: !isGridDisabled && topToolbar?.enabled !== false
18033
17864
  };
18034
17865
  const detectedColumnTypes = useMemo(() => {
18035
17866
  if (!Array.isArray(data) || !safeData.length) return {};
@@ -18050,7 +17881,7 @@ function SmartGridTable({
18050
17881
  }
18051
17882
  if (!Array.isArray(data) || data.length === 0) return {};
18052
17883
  const result2 = {};
18053
- columns == null ? void 0 : columns.forEach((col) => {
17884
+ columns?.forEach((col) => {
18054
17885
  if (!col.TotTyp) return;
18055
17886
  let count = 0;
18056
17887
  let sum = 0;
@@ -18086,7 +17917,7 @@ function SmartGridTable({
18086
17917
  }, [safeData, safeColumns, isLoading]);
18087
17918
  const fyOptions = useMemo(() => {
18088
17919
  if (!Array.isArray(data)) return [];
18089
- const fyColumn = columns == null ? void 0 : columns.find(
17920
+ const fyColumn = columns?.find(
18090
17921
  (c) => c.ColDataType === "date" && c.DateMode === "financial"
18091
17922
  );
18092
17923
  if (!fyColumn) return [];
@@ -18134,10 +17965,7 @@ function SmartGridTable({
18134
17965
  CORE LAYOUT (🔥 MUST BE semantic)
18135
17966
  ================================ */
18136
17967
  layoutMode: "semantic",
18137
- getRowId: (row, index) => {
18138
- var _a;
18139
- return ((_a = row.id) == null ? void 0 : _a.toString()) ?? index.toString();
18140
- },
17968
+ getRowId: (row, index) => row.id?.toString() ?? index.toString(),
18141
17969
  /* ===============================
18142
17970
  FEATURES
18143
17971
  ================================ */
@@ -18146,7 +17974,7 @@ function SmartGridTable({
18146
17974
  enableColumnFilters: resolvedTopToolbar.columnFilters && !isGridDisabled,
18147
17975
  enableDensityToggle: resolvedTopToolbar.densityToggle && !isGridDisabled,
18148
17976
  enableFullScreenToggle: resolvedTopToolbar.fullscreenToggle && !isGridDisabled,
18149
- enableColumnOrdering: !isGridDisabled && (controls == null ? void 0 : controls.dragging),
17977
+ enableColumnOrdering: !isGridDisabled && controls?.dragging,
18150
17978
  enableColumnPinning: !isGridDisabled && controls.colPinning,
18151
17979
  enablePagination: !isGridDisabled && controls.pagination,
18152
17980
  enableColumnActions: !isGridDisabled && controls.columnActions,
@@ -18155,11 +17983,11 @@ function SmartGridTable({
18155
17983
  enableSorting: !isGridDisabled && controls.sorting,
18156
17984
  enableEditing: !isGridDisabled && controls.editing,
18157
17985
  editDisplayMode: "cell",
18158
- enableColumnResizing: !disableAllActions && (controls == null ? void 0 : controls.resizing),
17986
+ enableColumnResizing: !disableAllActions && controls?.resizing,
18159
17987
  enableRowVirtualization: !controls.rowPinning && true,
18160
17988
  enableStickyHeader: true,
18161
17989
  enableStickyFooter: true,
18162
- enableBottomToolbar: !disableAllActions && (controls == null ? void 0 : controls.pagination),
17990
+ enableBottomToolbar: !disableAllActions && controls?.pagination,
18163
17991
  enableRowPinning: !disableAllActions && controls.rowPinning,
18164
17992
  enableGlobalFilterRankedResults: false,
18165
17993
  enableFilterMatchHighlighting: true,
@@ -18205,7 +18033,7 @@ function SmartGridTable({
18205
18033
  pageSize: 50
18206
18034
  },
18207
18035
  density: "comfortable",
18208
- columnPinning: (controls == null ? void 0 : controls.colPinning) ? columnPinning : { left: [], right: [] },
18036
+ columnPinning: controls?.colPinning ? columnPinning : { left: [], right: [] },
18209
18037
  columnVisibility
18210
18038
  },
18211
18039
  paginationDisplayMode: paginationStyle,
@@ -18221,10 +18049,7 @@ function SmartGridTable({
18221
18049
  const next = typeof updater === "function" ? updater(rowSelection) : updater;
18222
18050
  setRowSelection(next);
18223
18051
  if (onRowSelectionChange) {
18224
- const selectedRows = Object.keys(next).map((rowId) => {
18225
- var _a;
18226
- return (_a = table.getRow(rowId)) == null ? void 0 : _a.original;
18227
- }).filter(Boolean);
18052
+ const selectedRows = Object.keys(next).map((rowId) => table.getRow(rowId)?.original).filter(Boolean);
18228
18053
  onRowSelectionChange(selectedRows);
18229
18054
  }
18230
18055
  },
@@ -18249,12 +18074,21 @@ function SmartGridTable({
18249
18074
  display: "flex",
18250
18075
  flexDirection: "column",
18251
18076
  border: `1px solid ${mergedTheme.border}`,
18077
+ borderRadius: "6px",
18252
18078
  backgroundColor: mergedTheme.bodyBg,
18253
18079
  ...isFullScreen && {
18254
18080
  position: "fixed",
18255
- inset: 0,
18081
+ top: 0,
18082
+ left: 0,
18083
+ right: 0,
18084
+ bottom: 0,
18085
+ width: "100vw",
18086
+ height: "100vh",
18087
+ margin: 0,
18256
18088
  borderRadius: 0,
18257
- zIndex: "9999999 !important"
18089
+ zIndex: "9999999 !important",
18090
+ transform: "none",
18091
+ isolation: "isolate"
18258
18092
  }
18259
18093
  }
18260
18094
  };
@@ -18330,20 +18164,17 @@ function SmartGridTable({
18330
18164
  /* ===============================
18331
18165
  BODY CELLS (PIN SAFE)
18332
18166
  ================================ */
18333
- muiTableBodyCellProps: ({ cell }) => {
18334
- var _a;
18335
- return {
18336
- title: (_a = cell.renderValue) == null ? void 0 : _a.call(cell),
18337
- sx: {
18338
- borderRight: `1px solid ${mergedTheme.border}`,
18167
+ muiTableBodyCellProps: ({ cell }) => ({
18168
+ title: cell.renderValue?.(),
18169
+ sx: {
18170
+ borderRight: `1px solid ${mergedTheme.border}`,
18171
+ backgroundColor: mergedTheme.bodyBg,
18172
+ "&.mrt-table-body-cell-pinned": {
18339
18173
  backgroundColor: mergedTheme.bodyBg,
18340
- "&.mrt-table-body-cell-pinned": {
18341
- backgroundColor: mergedTheme.bodyBg,
18342
- zIndex: 1
18343
- }
18174
+ zIndex: 1
18344
18175
  }
18345
- };
18346
- },
18176
+ }
18177
+ }),
18347
18178
  /* ===============================
18348
18179
  ROW HOVER
18349
18180
  ================================ */
@@ -18416,7 +18247,7 @@ function SmartGridTopToolbar({
18416
18247
  width: "100%"
18417
18248
  },
18418
18249
  children: [
18419
- (topToolbar == null ? void 0 : topToolbar.globalSearch) && /* @__PURE__ */ jsxRuntimeExports.jsx(
18250
+ topToolbar?.globalSearch && /* @__PURE__ */ jsxRuntimeExports.jsx(
18420
18251
  TextField,
18421
18252
  {
18422
18253
  size: "small",
@@ -18431,10 +18262,10 @@ function SmartGridTopToolbar({
18431
18262
  sx: {
18432
18263
  "& .MuiOutlinedInput-root": {
18433
18264
  borderRadius: 1.5,
18434
- "& fieldset": { borderColor: theme == null ? void 0 : theme.headerBg },
18435
- "&:hover fieldset": { borderColor: theme == null ? void 0 : theme.headerBg },
18265
+ "& fieldset": { borderColor: theme?.headerBg },
18266
+ "&:hover fieldset": { borderColor: theme?.headerBg },
18436
18267
  "&.Mui-focused fieldset": {
18437
- borderColor: theme == null ? void 0 : theme.headerBg,
18268
+ borderColor: theme?.headerBg,
18438
18269
  borderWidth: 2
18439
18270
  }
18440
18271
  },
@@ -18442,12 +18273,12 @@ function SmartGridTopToolbar({
18442
18273
  opacity: 0.7
18443
18274
  },
18444
18275
  "& .MuiInputAdornment-root svg": {
18445
- color: theme == null ? void 0 : theme.headerBg
18276
+ color: theme?.headerBg
18446
18277
  }
18447
18278
  }
18448
18279
  }
18449
18280
  ),
18450
- ((topToolbar == null ? void 0 : topToolbar.exportBtn) || (topToolbar == null ? void 0 : topToolbar.columnFilters) || (topToolbar == null ? void 0 : topToolbar.densityToggle) || (topToolbar == null ? void 0 : topToolbar.showHideColumnsBtn) || (topToolbar == null ? void 0 : topToolbar.fullscreenToggle)) && /* @__PURE__ */ jsxRuntimeExports.jsxs(
18281
+ (topToolbar?.exportBtn || topToolbar?.columnFilters || topToolbar?.densityToggle || topToolbar?.showHideColumnsBtn || topToolbar?.fullscreenToggle) && /* @__PURE__ */ jsxRuntimeExports.jsxs(
18451
18282
  Paper,
18452
18283
  {
18453
18284
  elevation: 3,
@@ -18461,25 +18292,25 @@ function SmartGridTopToolbar({
18461
18292
  py: 0.2,
18462
18293
  borderRadius: 2,
18463
18294
  bgcolor: "background.paper",
18464
- border: `1px solid ${theme == null ? void 0 : theme.headerBg}`,
18295
+ border: `1px solid ${theme?.headerBg}`,
18465
18296
  whiteSpace: "nowrap",
18466
18297
  opacity: disable ? 0.6 : 1,
18467
18298
  pointerEvents: disable ? "none" : "auto"
18468
18299
  },
18469
18300
  children: [
18470
- (topToolbar == null ? void 0 : topToolbar.exportBtn) && /* @__PURE__ */ jsxRuntimeExports.jsx(
18301
+ topToolbar?.exportBtn && /* @__PURE__ */ jsxRuntimeExports.jsx(
18471
18302
  ExportButton,
18472
18303
  {
18473
18304
  data: exportData,
18474
- color: theme == null ? void 0 : theme.headerBg,
18305
+ color: theme?.headerBg,
18475
18306
  filename: "table-data",
18476
18307
  disabled: disable
18477
18308
  }
18478
18309
  ),
18479
- (topToolbar == null ? void 0 : topToolbar.columnFilters) && /* @__PURE__ */ jsxRuntimeExports.jsx(MRT_ToggleFiltersButton, { table, disabled: disable }),
18480
- (topToolbar == null ? void 0 : topToolbar.densityToggle) && /* @__PURE__ */ jsxRuntimeExports.jsx(MRT_ToggleDensePaddingButton, { table, disabled: disable }),
18481
- (topToolbar == null ? void 0 : topToolbar.showHideColumnsBtn) && /* @__PURE__ */ jsxRuntimeExports.jsx(MRT_ShowHideColumnsButton, { table, disabled: disable }),
18482
- (topToolbar == null ? void 0 : topToolbar.fullscreenToggle) && /* @__PURE__ */ jsxRuntimeExports.jsx(MRT_ToggleFullScreenButton, { table, disabled: disable })
18310
+ topToolbar?.columnFilters && /* @__PURE__ */ jsxRuntimeExports.jsx(MRT_ToggleFiltersButton, { table, disabled: disable }),
18311
+ topToolbar?.densityToggle && /* @__PURE__ */ jsxRuntimeExports.jsx(MRT_ToggleDensePaddingButton, { table, disabled: disable }),
18312
+ topToolbar?.showHideColumnsBtn && /* @__PURE__ */ jsxRuntimeExports.jsx(MRT_ShowHideColumnsButton, { table, disabled: disable }),
18313
+ topToolbar?.fullscreenToggle && /* @__PURE__ */ jsxRuntimeExports.jsx(MRT_ToggleFullScreenButton, { table, disabled: disable })
18483
18314
  ]
18484
18315
  }
18485
18316
  )
@@ -18595,7 +18426,7 @@ const ExportButton = ({
18595
18426
  const SmartTable = ({
18596
18427
  controls = {
18597
18428
  columnActions: true,
18598
- dragging: true,
18429
+ dragging: false,
18599
18430
  colPinning: true,
18600
18431
  pagination: true,
18601
18432
  rowSelection: false,
@@ -18610,19 +18441,26 @@ const SmartTable = ({
18610
18441
  globalSearch: true,
18611
18442
  columnFilters: true,
18612
18443
  densityToggle: true,
18613
- fullscreenToggle: true,
18444
+ fullscreenToggle: false,
18614
18445
  exportBtn: true,
18615
18446
  showHideColumnsBtn: true
18616
18447
  },
18448
+ theme = {
18449
+ headerBg: "#3f5fa3",
18450
+ headerText: "#ffffff",
18451
+ bodyBg: "#ffffff",
18452
+ border: "#cfd6e4"
18453
+ },
18617
18454
  height: height2 = "100%",
18618
18455
  width: width2 = "100%",
18619
18456
  columns = [],
18620
18457
  data = [],
18458
+ paginationStyle = "default",
18621
18459
  isLoading = false,
18622
18460
  onRowSelectionChange = () => {
18623
18461
  }
18624
18462
  }) => {
18625
- const props = { controls, topToolbar, height: height2, width: width2, isLoading, columns, data, onRowSelectionChange };
18463
+ const props = { controls, topToolbar, height: height2, width: width2, isLoading, columns, data, onRowSelectionChange, paginationStyle, theme };
18626
18464
  return /* @__PURE__ */ jsxRuntimeExports.jsx(LocalizationProvider, { dateAdapter: AdapterDayjs, children: /* @__PURE__ */ jsxRuntimeExports.jsx(SmartGridTable, { ...props }) });
18627
18465
  };
18628
18466
  export {