@carto/meridian-ds 1.4.3-alpha-tag.1 → 1.4.3-alpha-tag.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/Alert--QYebQp3.js +134 -0
  3. package/dist/Alert-DFaAeTZf.cjs +133 -0
  4. package/dist/ArrowDown-8fLj23Ge.cjs +31 -0
  5. package/dist/ArrowDown-CY_wMVJT.js +32 -0
  6. package/dist/MenuItem-Br2jY2lt.cjs +164 -0
  7. package/dist/MenuItem-CXnnE5lK.js +165 -0
  8. package/dist/SwatchSquare-DDi0beUM.js +51 -0
  9. package/dist/SwatchSquare-w-U8-O-P.cjs +50 -0
  10. package/dist/TablePaginationActions-BG2gWq0M.cjs +5643 -0
  11. package/dist/{TablePaginationActions-WZ3P4O35.js → TablePaginationActions-Dit3VW-A.js} +1065 -653
  12. package/dist/components/index.cjs +3540 -1
  13. package/dist/components/index.js +2324 -1965
  14. package/dist/custom-icons/index.cjs +5908 -1
  15. package/dist/custom-icons/index.js +2681 -2298
  16. package/dist/paletteUtils-B9ybmwiI.cjs +304 -0
  17. package/dist/paletteUtils-BHqJlHm9.js +288 -0
  18. package/dist/theme/index.cjs +3135 -1
  19. package/dist/theme/index.js +1050 -1011
  20. package/dist/types/utils/chartConstants.d.ts +3 -3
  21. package/dist/types/utils/chartConstants.d.ts.map +1 -1
  22. package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.d.ts +2 -2
  23. package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.d.ts.map +1 -1
  24. package/dist/types/widgets/PieWidgetUI/PieWidgetUI.d.ts +2 -2
  25. package/dist/types/widgets/PieWidgetUI/PieWidgetUI.d.ts.map +1 -1
  26. package/dist/types/widgets/PieWidgetUI/usePieCategories.d.ts +2 -2
  27. package/dist/types/widgets/PieWidgetUI/usePieCategories.d.ts.map +1 -1
  28. package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.d.ts +2 -2
  29. package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.d.ts.map +1 -1
  30. package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/transposeCategoryData.d.ts +2 -2
  31. package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/transposeCategoryData.d.ts.map +1 -1
  32. package/dist/types/widgets/index.d.ts +1 -0
  33. package/dist/types/widgets/index.d.ts.map +1 -1
  34. package/dist/widgets/index.cjs +7180 -21
  35. package/dist/widgets/index.js +5159 -3791
  36. package/package.json +1 -1
  37. package/dist/Alert-BAvr1f31.js +0 -130
  38. package/dist/Alert-DPGMxifE.cjs +0 -4
  39. package/dist/ArrowDown-BD0WmQR3.cjs +0 -1
  40. package/dist/ArrowDown-CMhYkZ2p.js +0 -31
  41. package/dist/MenuItem-Cd34y6F3.js +0 -165
  42. package/dist/MenuItem-Dbss-WG1.cjs +0 -1
  43. package/dist/SwatchSquare-C34ayL4L.cjs +0 -1
  44. package/dist/SwatchSquare-CVpwEFFV.js +0 -48
  45. package/dist/TablePaginationActions-Bp1DCaIE.cjs +0 -9
  46. package/dist/paletteUtils-BEwZhrLg.js +0 -262
  47. package/dist/paletteUtils-DLQVT9qo.cjs +0 -1
@@ -1,566 +1,808 @@
1
- import me from "react-is";
2
- import { jsx as O, jsxs as Re } from "react/jsx-runtime";
3
- import { Typography as Ge, Tooltip as se, IconButton as de, styled as he, Box as Ne } from "@mui/material";
4
- import { forwardRef as De } from "react";
5
- import { KeyboardArrowLeftOutlined as qe, KeyboardArrowRightOutlined as xe } from "@mui/icons-material";
6
- import { createIntlCache as He, createIntl as Ke, useIntl as Ue } from "react-intl";
7
- function je(e) {
8
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1
+ import require$$0 from "react-is";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { Typography as Typography$1, Tooltip, IconButton, styled, Box } from "@mui/material";
4
+ import { forwardRef } from "react";
5
+ import { KeyboardArrowLeftOutlined, KeyboardArrowRightOutlined } from "@mui/icons-material";
6
+ import { createIntlCache, createIntl, useIntl } from "react-intl";
7
+ function getDefaultExportFromCjs(x) {
8
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
9
9
  }
10
- var ae = { exports: {} };
10
+ var propTypes = { exports: {} };
11
11
  /*
12
12
  object-assign
13
13
  (c) Sindre Sorhus
14
14
  @license MIT
15
15
  */
16
- var W, oe;
17
- function Ve() {
18
- if (oe) return W;
19
- oe = 1;
20
- var e = Object.getOwnPropertySymbols, i = Object.prototype.hasOwnProperty, r = Object.prototype.propertyIsEnumerable;
21
- function a(n) {
22
- if (n == null)
16
+ var objectAssign;
17
+ var hasRequiredObjectAssign;
18
+ function requireObjectAssign() {
19
+ if (hasRequiredObjectAssign) return objectAssign;
20
+ hasRequiredObjectAssign = 1;
21
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
22
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
23
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
24
+ function toObject(val) {
25
+ if (val === null || val === void 0) {
23
26
  throw new TypeError("Object.assign cannot be called with null or undefined");
24
- return Object(n);
27
+ }
28
+ return Object(val);
25
29
  }
26
- function d() {
30
+ function shouldUseNative() {
27
31
  try {
28
- if (!Object.assign)
29
- return !1;
30
- var n = new String("abc");
31
- if (n[5] = "de", Object.getOwnPropertyNames(n)[0] === "5")
32
- return !1;
33
- for (var s = {}, o = 0; o < 10; o++)
34
- s["_" + String.fromCharCode(o)] = o;
35
- var u = Object.getOwnPropertyNames(s).map(function(l) {
36
- return s[l];
32
+ if (!Object.assign) {
33
+ return false;
34
+ }
35
+ var test1 = new String("abc");
36
+ test1[5] = "de";
37
+ if (Object.getOwnPropertyNames(test1)[0] === "5") {
38
+ return false;
39
+ }
40
+ var test2 = {};
41
+ for (var i = 0; i < 10; i++) {
42
+ test2["_" + String.fromCharCode(i)] = i;
43
+ }
44
+ var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
45
+ return test2[n];
46
+ });
47
+ if (order2.join("") !== "0123456789") {
48
+ return false;
49
+ }
50
+ var test3 = {};
51
+ "abcdefghijklmnopqrst".split("").forEach(function(letter) {
52
+ test3[letter] = letter;
37
53
  });
38
- if (u.join("") !== "0123456789")
39
- return !1;
40
- var y = {};
41
- return "abcdefghijklmnopqrst".split("").forEach(function(l) {
42
- y[l] = l;
43
- }), Object.keys(Object.assign({}, y)).join("") === "abcdefghijklmnopqrst";
44
- } catch {
45
- return !1;
54
+ if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
55
+ return false;
56
+ }
57
+ return true;
58
+ } catch (err) {
59
+ return false;
46
60
  }
47
61
  }
48
- return W = d() ? Object.assign : function(n, s) {
49
- for (var o, u = a(n), y, l = 1; l < arguments.length; l++) {
50
- o = Object(arguments[l]);
51
- for (var T in o)
52
- i.call(o, T) && (u[T] = o[T]);
53
- if (e) {
54
- y = e(o);
55
- for (var M = 0; M < y.length; M++)
56
- r.call(o, y[M]) && (u[y[M]] = o[y[M]]);
62
+ objectAssign = shouldUseNative() ? Object.assign : function(target, source) {
63
+ var from;
64
+ var to = toObject(target);
65
+ var symbols;
66
+ for (var s = 1; s < arguments.length; s++) {
67
+ from = Object(arguments[s]);
68
+ for (var key in from) {
69
+ if (hasOwnProperty.call(from, key)) {
70
+ to[key] = from[key];
71
+ }
72
+ }
73
+ if (getOwnPropertySymbols) {
74
+ symbols = getOwnPropertySymbols(from);
75
+ for (var i = 0; i < symbols.length; i++) {
76
+ if (propIsEnumerable.call(from, symbols[i])) {
77
+ to[symbols[i]] = from[symbols[i]];
78
+ }
79
+ }
57
80
  }
58
81
  }
59
- return u;
60
- }, W;
82
+ return to;
83
+ };
84
+ return objectAssign;
61
85
  }
62
- var F, ce;
63
- function re() {
64
- if (ce) return F;
65
- ce = 1;
66
- var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
67
- return F = e, F;
86
+ var ReactPropTypesSecret_1;
87
+ var hasRequiredReactPropTypesSecret;
88
+ function requireReactPropTypesSecret() {
89
+ if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
90
+ hasRequiredReactPropTypesSecret = 1;
91
+ var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
92
+ ReactPropTypesSecret_1 = ReactPropTypesSecret;
93
+ return ReactPropTypesSecret_1;
68
94
  }
69
- var Z, ue;
70
- function ve() {
71
- return ue || (ue = 1, Z = Function.call.bind(Object.prototype.hasOwnProperty)), Z;
95
+ var has;
96
+ var hasRequiredHas;
97
+ function requireHas() {
98
+ if (hasRequiredHas) return has;
99
+ hasRequiredHas = 1;
100
+ has = Function.call.bind(Object.prototype.hasOwnProperty);
101
+ return has;
72
102
  }
73
- var Y, _e;
74
- function ze() {
75
- if (_e) return Y;
76
- _e = 1;
77
- var e = function() {
103
+ var checkPropTypes_1;
104
+ var hasRequiredCheckPropTypes;
105
+ function requireCheckPropTypes() {
106
+ if (hasRequiredCheckPropTypes) return checkPropTypes_1;
107
+ hasRequiredCheckPropTypes = 1;
108
+ var printWarning = function() {
78
109
  };
79
110
  if (process.env.NODE_ENV !== "production") {
80
- var i = re(), r = {}, a = ve();
81
- e = function(n) {
82
- var s = "Warning: " + n;
83
- typeof console < "u" && console.error(s);
111
+ var ReactPropTypesSecret = requireReactPropTypesSecret();
112
+ var loggedTypeFailures = {};
113
+ var has2 = requireHas();
114
+ printWarning = function(text) {
115
+ var message = "Warning: " + text;
116
+ if (typeof console !== "undefined") {
117
+ console.error(message);
118
+ }
84
119
  try {
85
- throw new Error(s);
86
- } catch {
120
+ throw new Error(message);
121
+ } catch (x) {
87
122
  }
88
123
  };
89
124
  }
90
- function d(n, s, o, u, y) {
125
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
91
126
  if (process.env.NODE_ENV !== "production") {
92
- for (var l in n)
93
- if (a(n, l)) {
94
- var T;
127
+ for (var typeSpecName in typeSpecs) {
128
+ if (has2(typeSpecs, typeSpecName)) {
129
+ var error;
95
130
  try {
96
- if (typeof n[l] != "function") {
97
- var M = Error(
98
- (u || "React class") + ": " + o + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[l] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
131
+ if (typeof typeSpecs[typeSpecName] !== "function") {
132
+ var err = Error(
133
+ (componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
99
134
  );
100
- throw M.name = "Invariant Violation", M;
135
+ err.name = "Invariant Violation";
136
+ throw err;
101
137
  }
102
- T = n[l](s, l, u, o, null, i);
103
- } catch (I) {
104
- T = I;
105
- }
106
- if (T && !(T instanceof Error) && e(
107
- (u || "React class") + ": type specification of " + o + " `" + l + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof T + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
108
- ), T instanceof Error && !(T.message in r)) {
109
- r[T.message] = !0;
110
- var E = y ? y() : "";
111
- e(
112
- "Failed " + o + " type: " + T.message + (E ?? "")
138
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
139
+ } catch (ex) {
140
+ error = ex;
141
+ }
142
+ if (error && !(error instanceof Error)) {
143
+ printWarning(
144
+ (componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
145
+ );
146
+ }
147
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
148
+ loggedTypeFailures[error.message] = true;
149
+ var stack = getStack ? getStack() : "";
150
+ printWarning(
151
+ "Failed " + location + " type: " + error.message + (stack != null ? stack : "")
113
152
  );
114
153
  }
115
154
  }
155
+ }
116
156
  }
117
157
  }
118
- return d.resetWarningCache = function() {
119
- process.env.NODE_ENV !== "production" && (r = {});
120
- }, Y = d, Y;
158
+ checkPropTypes.resetWarningCache = function() {
159
+ if (process.env.NODE_ENV !== "production") {
160
+ loggedTypeFailures = {};
161
+ }
162
+ };
163
+ checkPropTypes_1 = checkPropTypes;
164
+ return checkPropTypes_1;
121
165
  }
122
- var J, le;
123
- function We() {
124
- if (le) return J;
125
- le = 1;
126
- var e = me, i = Ve(), r = re(), a = ve(), d = ze(), n = function() {
166
+ var factoryWithTypeCheckers;
167
+ var hasRequiredFactoryWithTypeCheckers;
168
+ function requireFactoryWithTypeCheckers() {
169
+ if (hasRequiredFactoryWithTypeCheckers) return factoryWithTypeCheckers;
170
+ hasRequiredFactoryWithTypeCheckers = 1;
171
+ var ReactIs = require$$0;
172
+ var assign = requireObjectAssign();
173
+ var ReactPropTypesSecret = requireReactPropTypesSecret();
174
+ var has2 = requireHas();
175
+ var checkPropTypes = requireCheckPropTypes();
176
+ var printWarning = function() {
127
177
  };
128
- process.env.NODE_ENV !== "production" && (n = function(o) {
129
- var u = "Warning: " + o;
130
- typeof console < "u" && console.error(u);
131
- try {
132
- throw new Error(u);
133
- } catch {
134
- }
135
- });
136
- function s() {
178
+ if (process.env.NODE_ENV !== "production") {
179
+ printWarning = function(text) {
180
+ var message = "Warning: " + text;
181
+ if (typeof console !== "undefined") {
182
+ console.error(message);
183
+ }
184
+ try {
185
+ throw new Error(message);
186
+ } catch (x) {
187
+ }
188
+ };
189
+ }
190
+ function emptyFunctionThatReturnsNull() {
137
191
  return null;
138
192
  }
139
- return J = function(o, u) {
140
- var y = typeof Symbol == "function" && Symbol.iterator, l = "@@iterator";
141
- function T(t) {
142
- var c = t && (y && t[y] || t[l]);
143
- if (typeof c == "function")
144
- return c;
193
+ factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
194
+ var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
195
+ var FAUX_ITERATOR_SYMBOL = "@@iterator";
196
+ function getIteratorFn(maybeIterable) {
197
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
198
+ if (typeof iteratorFn === "function") {
199
+ return iteratorFn;
200
+ }
145
201
  }
146
- var M = "<<anonymous>>", E = {
147
- array: A("array"),
148
- bigint: A("bigint"),
149
- bool: A("boolean"),
150
- func: A("function"),
151
- number: A("number"),
152
- object: A("object"),
153
- string: A("string"),
154
- symbol: A("symbol"),
155
- any: R(),
156
- arrayOf: k,
157
- element: D(),
158
- elementType: V(),
159
- instanceOf: z,
160
- node: Ae(),
161
- objectOf: Le,
162
- oneOf: Ee,
163
- oneOfType: be,
164
- shape: Pe,
165
- exact: Ie
202
+ var ANONYMOUS = "<<anonymous>>";
203
+ var ReactPropTypes = {
204
+ array: createPrimitiveTypeChecker("array"),
205
+ bigint: createPrimitiveTypeChecker("bigint"),
206
+ bool: createPrimitiveTypeChecker("boolean"),
207
+ func: createPrimitiveTypeChecker("function"),
208
+ number: createPrimitiveTypeChecker("number"),
209
+ object: createPrimitiveTypeChecker("object"),
210
+ string: createPrimitiveTypeChecker("string"),
211
+ symbol: createPrimitiveTypeChecker("symbol"),
212
+ any: createAnyTypeChecker(),
213
+ arrayOf: createArrayOfTypeChecker,
214
+ element: createElementTypeChecker(),
215
+ elementType: createElementTypeTypeChecker(),
216
+ instanceOf: createInstanceTypeChecker,
217
+ node: createNodeChecker(),
218
+ objectOf: createObjectOfTypeChecker,
219
+ oneOf: createEnumTypeChecker,
220
+ oneOfType: createUnionTypeChecker,
221
+ shape: createShapeTypeChecker,
222
+ exact: createStrictShapeTypeChecker
166
223
  };
167
- function I(t, c) {
168
- return t === c ? t !== 0 || 1 / t === 1 / c : t !== t && c !== c;
224
+ function is(x, y) {
225
+ if (x === y) {
226
+ return x !== 0 || 1 / x === 1 / y;
227
+ } else {
228
+ return x !== x && y !== y;
229
+ }
169
230
  }
170
- function C(t, c) {
171
- this.message = t, this.data = c && typeof c == "object" ? c : {}, this.stack = "";
231
+ function PropTypeError(message, data2) {
232
+ this.message = message;
233
+ this.data = data2 && typeof data2 === "object" ? data2 : {};
234
+ this.stack = "";
172
235
  }
173
- C.prototype = Error.prototype;
174
- function L(t) {
175
- if (process.env.NODE_ENV !== "production")
176
- var c = {}, g = 0;
177
- function f(m, p, w, h, S, v, P) {
178
- if (h = h || M, v = v || w, P !== r) {
179
- if (u) {
180
- var b = new Error(
236
+ PropTypeError.prototype = Error.prototype;
237
+ function createChainableTypeChecker(validate) {
238
+ if (process.env.NODE_ENV !== "production") {
239
+ var manualPropTypeCallCache = {};
240
+ var manualPropTypeWarningCount = 0;
241
+ }
242
+ function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
243
+ componentName = componentName || ANONYMOUS;
244
+ propFullName = propFullName || propName;
245
+ if (secret !== ReactPropTypesSecret) {
246
+ if (throwOnDirectAccess) {
247
+ var err = new Error(
181
248
  "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
182
249
  );
183
- throw b.name = "Invariant Violation", b;
184
- } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
185
- var G = h + ":" + w;
186
- !c[G] && // Avoid spamming the console because they are often not actionable except for lib authors
187
- g < 3 && (n(
188
- "You are manually calling a React.PropTypes validation function for the `" + v + "` prop on `" + h + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
189
- ), c[G] = !0, g++);
250
+ err.name = "Invariant Violation";
251
+ throw err;
252
+ } else if (process.env.NODE_ENV !== "production" && typeof console !== "undefined") {
253
+ var cacheKey = componentName + ":" + propName;
254
+ if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors
255
+ manualPropTypeWarningCount < 3) {
256
+ printWarning(
257
+ "You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
258
+ );
259
+ manualPropTypeCallCache[cacheKey] = true;
260
+ manualPropTypeWarningCount++;
261
+ }
190
262
  }
191
263
  }
192
- return p[w] == null ? m ? p[w] === null ? new C("The " + S + " `" + v + "` is marked as required " + ("in `" + h + "`, but its value is `null`.")) : new C("The " + S + " `" + v + "` is marked as required in " + ("`" + h + "`, but its value is `undefined`.")) : null : t(p, w, h, S, v);
264
+ if (props[propName] == null) {
265
+ if (isRequired) {
266
+ if (props[propName] === null) {
267
+ return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`."));
268
+ }
269
+ return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`."));
270
+ }
271
+ return null;
272
+ } else {
273
+ return validate(props, propName, componentName, location, propFullName);
274
+ }
193
275
  }
194
- var _ = f.bind(null, !1);
195
- return _.isRequired = f.bind(null, !0), _;
276
+ var chainedCheckType = checkType.bind(null, false);
277
+ chainedCheckType.isRequired = checkType.bind(null, true);
278
+ return chainedCheckType;
196
279
  }
197
- function A(t) {
198
- function c(g, f, _, m, p, w) {
199
- var h = g[f], S = B(h);
200
- if (S !== t) {
201
- var v = q(h);
202
- return new C(
203
- "Invalid " + m + " `" + p + "` of type " + ("`" + v + "` supplied to `" + _ + "`, expected ") + ("`" + t + "`."),
204
- { expectedType: t }
280
+ function createPrimitiveTypeChecker(expectedType) {
281
+ function validate(props, propName, componentName, location, propFullName, secret) {
282
+ var propValue = props[propName];
283
+ var propType = getPropType(propValue);
284
+ if (propType !== expectedType) {
285
+ var preciseType = getPreciseType(propValue);
286
+ return new PropTypeError(
287
+ "Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."),
288
+ { expectedType }
205
289
  );
206
290
  }
207
291
  return null;
208
292
  }
209
- return L(c);
293
+ return createChainableTypeChecker(validate);
210
294
  }
211
- function R() {
212
- return L(s);
295
+ function createAnyTypeChecker() {
296
+ return createChainableTypeChecker(emptyFunctionThatReturnsNull);
213
297
  }
214
- function k(t) {
215
- function c(g, f, _, m, p) {
216
- if (typeof t != "function")
217
- return new C("Property `" + p + "` of component `" + _ + "` has invalid PropType notation inside arrayOf.");
218
- var w = g[f];
219
- if (!Array.isArray(w)) {
220
- var h = B(w);
221
- return new C("Invalid " + m + " `" + p + "` of type " + ("`" + h + "` supplied to `" + _ + "`, expected an array."));
298
+ function createArrayOfTypeChecker(typeChecker) {
299
+ function validate(props, propName, componentName, location, propFullName) {
300
+ if (typeof typeChecker !== "function") {
301
+ return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
302
+ }
303
+ var propValue = props[propName];
304
+ if (!Array.isArray(propValue)) {
305
+ var propType = getPropType(propValue);
306
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
222
307
  }
223
- for (var S = 0; S < w.length; S++) {
224
- var v = t(w, S, _, m, p + "[" + S + "]", r);
225
- if (v instanceof Error)
226
- return v;
308
+ for (var i = 0; i < propValue.length; i++) {
309
+ var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret);
310
+ if (error instanceof Error) {
311
+ return error;
312
+ }
227
313
  }
228
314
  return null;
229
315
  }
230
- return L(c);
316
+ return createChainableTypeChecker(validate);
231
317
  }
232
- function D() {
233
- function t(c, g, f, _, m) {
234
- var p = c[g];
235
- if (!o(p)) {
236
- var w = B(p);
237
- return new C("Invalid " + _ + " `" + m + "` of type " + ("`" + w + "` supplied to `" + f + "`, expected a single ReactElement."));
318
+ function createElementTypeChecker() {
319
+ function validate(props, propName, componentName, location, propFullName) {
320
+ var propValue = props[propName];
321
+ if (!isValidElement(propValue)) {
322
+ var propType = getPropType(propValue);
323
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
238
324
  }
239
325
  return null;
240
326
  }
241
- return L(t);
327
+ return createChainableTypeChecker(validate);
242
328
  }
243
- function V() {
244
- function t(c, g, f, _, m) {
245
- var p = c[g];
246
- if (!e.isValidElementType(p)) {
247
- var w = B(p);
248
- return new C("Invalid " + _ + " `" + m + "` of type " + ("`" + w + "` supplied to `" + f + "`, expected a single ReactElement type."));
329
+ function createElementTypeTypeChecker() {
330
+ function validate(props, propName, componentName, location, propFullName) {
331
+ var propValue = props[propName];
332
+ if (!ReactIs.isValidElementType(propValue)) {
333
+ var propType = getPropType(propValue);
334
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type."));
249
335
  }
250
336
  return null;
251
337
  }
252
- return L(t);
338
+ return createChainableTypeChecker(validate);
253
339
  }
254
- function z(t) {
255
- function c(g, f, _, m, p) {
256
- if (!(g[f] instanceof t)) {
257
- var w = t.name || M, h = Be(g[f]);
258
- return new C("Invalid " + m + " `" + p + "` of type " + ("`" + h + "` supplied to `" + _ + "`, expected ") + ("instance of `" + w + "`."));
340
+ function createInstanceTypeChecker(expectedClass) {
341
+ function validate(props, propName, componentName, location, propFullName) {
342
+ if (!(props[propName] instanceof expectedClass)) {
343
+ var expectedClassName = expectedClass.name || ANONYMOUS;
344
+ var actualClassName = getClassName(props[propName]);
345
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
259
346
  }
260
347
  return null;
261
348
  }
262
- return L(c);
349
+ return createChainableTypeChecker(validate);
263
350
  }
264
- function Ee(t) {
265
- if (!Array.isArray(t))
266
- return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? n(
267
- "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
268
- ) : n("Invalid argument supplied to oneOf, expected an array.")), s;
269
- function c(g, f, _, m, p) {
270
- for (var w = g[f], h = 0; h < t.length; h++)
271
- if (I(w, t[h]))
351
+ function createEnumTypeChecker(expectedValues) {
352
+ if (!Array.isArray(expectedValues)) {
353
+ if (process.env.NODE_ENV !== "production") {
354
+ if (arguments.length > 1) {
355
+ printWarning(
356
+ "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
357
+ );
358
+ } else {
359
+ printWarning("Invalid argument supplied to oneOf, expected an array.");
360
+ }
361
+ }
362
+ return emptyFunctionThatReturnsNull;
363
+ }
364
+ function validate(props, propName, componentName, location, propFullName) {
365
+ var propValue = props[propName];
366
+ for (var i = 0; i < expectedValues.length; i++) {
367
+ if (is(propValue, expectedValues[i])) {
272
368
  return null;
273
- var S = JSON.stringify(t, function(P, b) {
274
- var G = q(b);
275
- return G === "symbol" ? String(b) : b;
369
+ }
370
+ }
371
+ var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
372
+ var type = getPreciseType(value);
373
+ if (type === "symbol") {
374
+ return String(value);
375
+ }
376
+ return value;
276
377
  });
277
- return new C("Invalid " + m + " `" + p + "` of value `" + String(w) + "` " + ("supplied to `" + _ + "`, expected one of " + S + "."));
378
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
278
379
  }
279
- return L(c);
380
+ return createChainableTypeChecker(validate);
280
381
  }
281
- function Le(t) {
282
- function c(g, f, _, m, p) {
283
- if (typeof t != "function")
284
- return new C("Property `" + p + "` of component `" + _ + "` has invalid PropType notation inside objectOf.");
285
- var w = g[f], h = B(w);
286
- if (h !== "object")
287
- return new C("Invalid " + m + " `" + p + "` of type " + ("`" + h + "` supplied to `" + _ + "`, expected an object."));
288
- for (var S in w)
289
- if (a(w, S)) {
290
- var v = t(w, S, _, m, p + "." + S, r);
291
- if (v instanceof Error)
292
- return v;
382
+ function createObjectOfTypeChecker(typeChecker) {
383
+ function validate(props, propName, componentName, location, propFullName) {
384
+ if (typeof typeChecker !== "function") {
385
+ return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
386
+ }
387
+ var propValue = props[propName];
388
+ var propType = getPropType(propValue);
389
+ if (propType !== "object") {
390
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
391
+ }
392
+ for (var key in propValue) {
393
+ if (has2(propValue, key)) {
394
+ var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
395
+ if (error instanceof Error) {
396
+ return error;
397
+ }
293
398
  }
399
+ }
294
400
  return null;
295
401
  }
296
- return L(c);
402
+ return createChainableTypeChecker(validate);
297
403
  }
298
- function be(t) {
299
- if (!Array.isArray(t))
300
- return process.env.NODE_ENV !== "production" && n("Invalid argument supplied to oneOfType, expected an instance of array."), s;
301
- for (var c = 0; c < t.length; c++) {
302
- var g = t[c];
303
- if (typeof g != "function")
304
- return n(
305
- "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ke(g) + " at index " + c + "."
306
- ), s;
404
+ function createUnionTypeChecker(arrayOfTypeCheckers) {
405
+ if (!Array.isArray(arrayOfTypeCheckers)) {
406
+ process.env.NODE_ENV !== "production" ? printWarning("Invalid argument supplied to oneOfType, expected an instance of array.") : void 0;
407
+ return emptyFunctionThatReturnsNull;
408
+ }
409
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
410
+ var checker = arrayOfTypeCheckers[i];
411
+ if (typeof checker !== "function") {
412
+ printWarning(
413
+ "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."
414
+ );
415
+ return emptyFunctionThatReturnsNull;
416
+ }
307
417
  }
308
- function f(_, m, p, w, h) {
309
- for (var S = [], v = 0; v < t.length; v++) {
310
- var P = t[v], b = P(_, m, p, w, h, r);
311
- if (b == null)
418
+ function validate(props, propName, componentName, location, propFullName) {
419
+ var expectedTypes = [];
420
+ for (var i2 = 0; i2 < arrayOfTypeCheckers.length; i2++) {
421
+ var checker2 = arrayOfTypeCheckers[i2];
422
+ var checkerResult = checker2(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
423
+ if (checkerResult == null) {
312
424
  return null;
313
- b.data && a(b.data, "expectedType") && S.push(b.data.expectedType);
425
+ }
426
+ if (checkerResult.data && has2(checkerResult.data, "expectedType")) {
427
+ expectedTypes.push(checkerResult.data.expectedType);
428
+ }
314
429
  }
315
- var G = S.length > 0 ? ", expected one of type [" + S.join(", ") + "]" : "";
316
- return new C("Invalid " + w + " `" + h + "` supplied to " + ("`" + p + "`" + G + "."));
430
+ var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "";
431
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + "."));
317
432
  }
318
- return L(f);
433
+ return createChainableTypeChecker(validate);
319
434
  }
320
- function Ae() {
321
- function t(c, g, f, _, m) {
322
- return H(c[g]) ? null : new C("Invalid " + _ + " `" + m + "` supplied to " + ("`" + f + "`, expected a ReactNode."));
435
+ function createNodeChecker() {
436
+ function validate(props, propName, componentName, location, propFullName) {
437
+ if (!isNode(props[propName])) {
438
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
439
+ }
440
+ return null;
323
441
  }
324
- return L(t);
442
+ return createChainableTypeChecker(validate);
325
443
  }
326
- function ie(t, c, g, f, _) {
327
- return new C(
328
- (t || "React class") + ": " + c + " type `" + g + "." + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + _ + "`."
444
+ function invalidValidatorError(componentName, location, propFullName, key, type) {
445
+ return new PropTypeError(
446
+ (componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`."
329
447
  );
330
448
  }
331
- function Pe(t) {
332
- function c(g, f, _, m, p) {
333
- var w = g[f], h = B(w);
334
- if (h !== "object")
335
- return new C("Invalid " + m + " `" + p + "` of type `" + h + "` " + ("supplied to `" + _ + "`, expected `object`."));
336
- for (var S in t) {
337
- var v = t[S];
338
- if (typeof v != "function")
339
- return ie(_, m, p, S, q(v));
340
- var P = v(w, S, _, m, p + "." + S, r);
341
- if (P)
342
- return P;
449
+ function createShapeTypeChecker(shapeTypes) {
450
+ function validate(props, propName, componentName, location, propFullName) {
451
+ var propValue = props[propName];
452
+ var propType = getPropType(propValue);
453
+ if (propType !== "object") {
454
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
455
+ }
456
+ for (var key in shapeTypes) {
457
+ var checker = shapeTypes[key];
458
+ if (typeof checker !== "function") {
459
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
460
+ }
461
+ var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
462
+ if (error) {
463
+ return error;
464
+ }
343
465
  }
344
466
  return null;
345
467
  }
346
- return L(c);
468
+ return createChainableTypeChecker(validate);
347
469
  }
348
- function Ie(t) {
349
- function c(g, f, _, m, p) {
350
- var w = g[f], h = B(w);
351
- if (h !== "object")
352
- return new C("Invalid " + m + " `" + p + "` of type `" + h + "` " + ("supplied to `" + _ + "`, expected `object`."));
353
- var S = i({}, g[f], t);
354
- for (var v in S) {
355
- var P = t[v];
356
- if (a(t, v) && typeof P != "function")
357
- return ie(_, m, p, v, q(P));
358
- if (!P)
359
- return new C(
360
- "Invalid " + m + " `" + p + "` key `" + v + "` supplied to `" + _ + "`.\nBad object: " + JSON.stringify(g[f], null, " ") + `
361
- Valid keys: ` + JSON.stringify(Object.keys(t), null, " ")
470
+ function createStrictShapeTypeChecker(shapeTypes) {
471
+ function validate(props, propName, componentName, location, propFullName) {
472
+ var propValue = props[propName];
473
+ var propType = getPropType(propValue);
474
+ if (propType !== "object") {
475
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
476
+ }
477
+ var allKeys = assign({}, props[propName], shapeTypes);
478
+ for (var key in allKeys) {
479
+ var checker = shapeTypes[key];
480
+ if (has2(shapeTypes, key) && typeof checker !== "function") {
481
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
482
+ }
483
+ if (!checker) {
484
+ return new PropTypeError(
485
+ "Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " ")
362
486
  );
363
- var b = P(w, v, _, m, p + "." + v, r);
364
- if (b)
365
- return b;
487
+ }
488
+ var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
489
+ if (error) {
490
+ return error;
491
+ }
366
492
  }
367
493
  return null;
368
494
  }
369
- return L(c);
495
+ return createChainableTypeChecker(validate);
370
496
  }
371
- function H(t) {
372
- switch (typeof t) {
497
+ function isNode(propValue) {
498
+ switch (typeof propValue) {
373
499
  case "number":
374
500
  case "string":
375
501
  case "undefined":
376
- return !0;
502
+ return true;
377
503
  case "boolean":
378
- return !t;
504
+ return !propValue;
379
505
  case "object":
380
- if (Array.isArray(t))
381
- return t.every(H);
382
- if (t === null || o(t))
383
- return !0;
384
- var c = T(t);
385
- if (c) {
386
- var g = c.call(t), f;
387
- if (c !== t.entries) {
388
- for (; !(f = g.next()).done; )
389
- if (!H(f.value))
390
- return !1;
391
- } else
392
- for (; !(f = g.next()).done; ) {
393
- var _ = f.value;
394
- if (_ && !H(_[1]))
395
- return !1;
506
+ if (Array.isArray(propValue)) {
507
+ return propValue.every(isNode);
508
+ }
509
+ if (propValue === null || isValidElement(propValue)) {
510
+ return true;
511
+ }
512
+ var iteratorFn = getIteratorFn(propValue);
513
+ if (iteratorFn) {
514
+ var iterator = iteratorFn.call(propValue);
515
+ var step;
516
+ if (iteratorFn !== propValue.entries) {
517
+ while (!(step = iterator.next()).done) {
518
+ if (!isNode(step.value)) {
519
+ return false;
520
+ }
521
+ }
522
+ } else {
523
+ while (!(step = iterator.next()).done) {
524
+ var entry = step.value;
525
+ if (entry) {
526
+ if (!isNode(entry[1])) {
527
+ return false;
528
+ }
529
+ }
396
530
  }
397
- } else
398
- return !1;
399
- return !0;
531
+ }
532
+ } else {
533
+ return false;
534
+ }
535
+ return true;
400
536
  default:
401
- return !1;
537
+ return false;
402
538
  }
403
539
  }
404
- function Oe(t, c) {
405
- return t === "symbol" ? !0 : c ? c["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && c instanceof Symbol : !1;
540
+ function isSymbol(propType, propValue) {
541
+ if (propType === "symbol") {
542
+ return true;
543
+ }
544
+ if (!propValue) {
545
+ return false;
546
+ }
547
+ if (propValue["@@toStringTag"] === "Symbol") {
548
+ return true;
549
+ }
550
+ if (typeof Symbol === "function" && propValue instanceof Symbol) {
551
+ return true;
552
+ }
553
+ return false;
406
554
  }
407
- function B(t) {
408
- var c = typeof t;
409
- return Array.isArray(t) ? "array" : t instanceof RegExp ? "object" : Oe(c, t) ? "symbol" : c;
555
+ function getPropType(propValue) {
556
+ var propType = typeof propValue;
557
+ if (Array.isArray(propValue)) {
558
+ return "array";
559
+ }
560
+ if (propValue instanceof RegExp) {
561
+ return "object";
562
+ }
563
+ if (isSymbol(propType, propValue)) {
564
+ return "symbol";
565
+ }
566
+ return propType;
410
567
  }
411
- function q(t) {
412
- if (typeof t > "u" || t === null)
413
- return "" + t;
414
- var c = B(t);
415
- if (c === "object") {
416
- if (t instanceof Date)
568
+ function getPreciseType(propValue) {
569
+ if (typeof propValue === "undefined" || propValue === null) {
570
+ return "" + propValue;
571
+ }
572
+ var propType = getPropType(propValue);
573
+ if (propType === "object") {
574
+ if (propValue instanceof Date) {
417
575
  return "date";
418
- if (t instanceof RegExp)
576
+ } else if (propValue instanceof RegExp) {
419
577
  return "regexp";
578
+ }
420
579
  }
421
- return c;
580
+ return propType;
422
581
  }
423
- function ke(t) {
424
- var c = q(t);
425
- switch (c) {
582
+ function getPostfixForTypeWarning(value) {
583
+ var type = getPreciseType(value);
584
+ switch (type) {
426
585
  case "array":
427
586
  case "object":
428
- return "an " + c;
587
+ return "an " + type;
429
588
  case "boolean":
430
589
  case "date":
431
590
  case "regexp":
432
- return "a " + c;
591
+ return "a " + type;
433
592
  default:
434
- return c;
593
+ return type;
435
594
  }
436
595
  }
437
- function Be(t) {
438
- return !t.constructor || !t.constructor.name ? M : t.constructor.name;
596
+ function getClassName(propValue) {
597
+ if (!propValue.constructor || !propValue.constructor.name) {
598
+ return ANONYMOUS;
599
+ }
600
+ return propValue.constructor.name;
439
601
  }
440
- return E.checkPropTypes = d, E.resetWarningCache = d.resetWarningCache, E.PropTypes = E, E;
441
- }, J;
602
+ ReactPropTypes.checkPropTypes = checkPropTypes;
603
+ ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
604
+ ReactPropTypes.PropTypes = ReactPropTypes;
605
+ return ReactPropTypes;
606
+ };
607
+ return factoryWithTypeCheckers;
442
608
  }
443
- var $, ye;
444
- function Fe() {
445
- if (ye) return $;
446
- ye = 1;
447
- var e = re();
448
- function i() {
609
+ var factoryWithThrowingShims;
610
+ var hasRequiredFactoryWithThrowingShims;
611
+ function requireFactoryWithThrowingShims() {
612
+ if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
613
+ hasRequiredFactoryWithThrowingShims = 1;
614
+ var ReactPropTypesSecret = requireReactPropTypesSecret();
615
+ function emptyFunction() {
449
616
  }
450
- function r() {
617
+ function emptyFunctionWithReset() {
451
618
  }
452
- return r.resetWarningCache = i, $ = function() {
453
- function a(s, o, u, y, l, T) {
454
- if (T !== e) {
455
- var M = new Error(
456
- "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
457
- );
458
- throw M.name = "Invariant Violation", M;
619
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
620
+ factoryWithThrowingShims = function() {
621
+ function shim(props, propName, componentName, location, propFullName, secret) {
622
+ if (secret === ReactPropTypesSecret) {
623
+ return;
459
624
  }
625
+ var err = new Error(
626
+ "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
627
+ );
628
+ err.name = "Invariant Violation";
629
+ throw err;
460
630
  }
461
- a.isRequired = a;
462
- function d() {
463
- return a;
631
+ shim.isRequired = shim;
632
+ function getShim() {
633
+ return shim;
464
634
  }
465
- var n = {
466
- array: a,
467
- bigint: a,
468
- bool: a,
469
- func: a,
470
- number: a,
471
- object: a,
472
- string: a,
473
- symbol: a,
474
- any: a,
475
- arrayOf: d,
476
- element: a,
477
- elementType: a,
478
- instanceOf: d,
479
- node: a,
480
- objectOf: d,
481
- oneOf: d,
482
- oneOfType: d,
483
- shape: d,
484
- exact: d,
485
- checkPropTypes: r,
486
- resetWarningCache: i
635
+ var ReactPropTypes = {
636
+ array: shim,
637
+ bigint: shim,
638
+ bool: shim,
639
+ func: shim,
640
+ number: shim,
641
+ object: shim,
642
+ string: shim,
643
+ symbol: shim,
644
+ any: shim,
645
+ arrayOf: getShim,
646
+ element: shim,
647
+ elementType: shim,
648
+ instanceOf: getShim,
649
+ node: shim,
650
+ objectOf: getShim,
651
+ oneOf: getShim,
652
+ oneOfType: getShim,
653
+ shape: getShim,
654
+ exact: getShim,
655
+ checkPropTypes: emptyFunctionWithReset,
656
+ resetWarningCache: emptyFunction
487
657
  };
488
- return n.PropTypes = n, n;
489
- }, $;
658
+ ReactPropTypes.PropTypes = ReactPropTypes;
659
+ return ReactPropTypes;
660
+ };
661
+ return factoryWithThrowingShims;
490
662
  }
491
663
  if (process.env.NODE_ENV !== "production") {
492
- var Ze = me, Ye = !0;
493
- ae.exports = We()(Ze.isElement, Ye);
494
- } else
495
- ae.exports = Fe()();
496
- var Je = ae.exports;
497
- const x = /* @__PURE__ */ je(Je), te = process.env.NODE_ENV !== "production" ? x.oneOfType([x.number, x.string, x.object, x.array]) : {};
498
- function $e(e, i, r = !0) {
499
- if (e && e.vars && r) {
500
- const a = `vars.${i}`.split(".").reduce((d, n) => d && d[n] ? d[n] : null, e);
501
- if (a != null)
502
- return a;
664
+ var ReactIs = require$$0;
665
+ var throwOnDirectAccess = true;
666
+ propTypes.exports = requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
667
+ } else {
668
+ propTypes.exports = requireFactoryWithThrowingShims()();
669
+ }
670
+ var propTypesExports = propTypes.exports;
671
+ const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports);
672
+ const responsivePropType = process.env.NODE_ENV !== "production" ? PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object, PropTypes.array]) : {};
673
+ function getPath(obj, path, checkVars = true) {
674
+ if (obj && obj.vars && checkVars) {
675
+ const val = `vars.${path}`.split(".").reduce((acc, item) => acc && acc[item] ? acc[item] : null, obj);
676
+ if (val != null) {
677
+ return val;
678
+ }
503
679
  }
504
- return i.split(".").reduce((a, d) => a && a[d] != null ? a[d] : null, e);
680
+ return path.split(".").reduce((acc, item) => {
681
+ if (acc && acc[item] != null) {
682
+ return acc[item];
683
+ }
684
+ return null;
685
+ }, obj);
505
686
  }
506
- const Te = ["m", "mt", "mr", "mb", "ml", "mx", "my", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "marginX", "marginY", "marginInline", "marginInlineStart", "marginInlineEnd", "marginBlock", "marginBlockStart", "marginBlockEnd"], Se = ["p", "pt", "pr", "pb", "pl", "px", "py", "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "paddingX", "paddingY", "paddingInline", "paddingInlineStart", "paddingInlineEnd", "paddingBlock", "paddingBlockStart", "paddingBlockEnd"], Qe = [...Te, ...Se];
507
- function Xe(e, i, r, a) {
508
- var d;
509
- const n = (d = $e(e, i, !1)) != null ? d : r;
510
- return typeof n == "number" ? (s) => typeof s == "string" ? s : (process.env.NODE_ENV !== "production" && typeof s != "number" && console.error(`MUI: Expected ${a} argument to be a number or a string, got ${s}.`), n * s) : Array.isArray(n) ? (s) => typeof s == "string" ? s : (process.env.NODE_ENV !== "production" && (Number.isInteger(s) ? s > n.length - 1 && console.error([`MUI: The value provided (${s}) overflows.`, `The supported values are: ${JSON.stringify(n)}.`, `${s} > ${n.length - 1}, you need to add the missing values.`].join(`
511
- `)) : console.error([`MUI: The \`theme.${i}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${i}\` as a number.`].join(`
512
- `))), n[s]) : typeof n == "function" ? n : (process.env.NODE_ENV !== "production" && console.error([`MUI: The \`theme.${i}\` value (${n}) is invalid.`, "It should be a number, an array or a function."].join(`
513
- `)), () => {
514
- });
687
+ const marginKeys = ["m", "mt", "mr", "mb", "ml", "mx", "my", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "marginX", "marginY", "marginInline", "marginInlineStart", "marginInlineEnd", "marginBlock", "marginBlockStart", "marginBlockEnd"];
688
+ const paddingKeys = ["p", "pt", "pr", "pb", "pl", "px", "py", "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "paddingX", "paddingY", "paddingInline", "paddingInlineStart", "paddingInlineEnd", "paddingBlock", "paddingBlockStart", "paddingBlockEnd"];
689
+ const spacingKeys = [...marginKeys, ...paddingKeys];
690
+ function createUnaryUnit(theme, themeKey, defaultValue, propName) {
691
+ var _getPath;
692
+ const themeSpacing = (_getPath = getPath(theme, themeKey, false)) != null ? _getPath : defaultValue;
693
+ if (typeof themeSpacing === "number") {
694
+ return (abs) => {
695
+ if (typeof abs === "string") {
696
+ return abs;
697
+ }
698
+ if (process.env.NODE_ENV !== "production") {
699
+ if (typeof abs !== "number") {
700
+ console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${abs}.`);
701
+ }
702
+ }
703
+ return themeSpacing * abs;
704
+ };
705
+ }
706
+ if (Array.isArray(themeSpacing)) {
707
+ return (abs) => {
708
+ if (typeof abs === "string") {
709
+ return abs;
710
+ }
711
+ if (process.env.NODE_ENV !== "production") {
712
+ if (!Number.isInteger(abs)) {
713
+ console.error([`MUI: The \`theme.${themeKey}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${themeKey}\` as a number.`].join("\n"));
714
+ } else if (abs > themeSpacing.length - 1) {
715
+ console.error([`MUI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join("\n"));
716
+ }
717
+ }
718
+ return themeSpacing[abs];
719
+ };
720
+ }
721
+ if (typeof themeSpacing === "function") {
722
+ return themeSpacing;
723
+ }
724
+ if (process.env.NODE_ENV !== "production") {
725
+ console.error([`MUI: The \`theme.${themeKey}\` value (${themeSpacing}) is invalid.`, "It should be a number, an array or a function."].join("\n"));
726
+ }
727
+ return () => void 0;
515
728
  }
516
- function ea(e) {
517
- return Xe(e, "spacing", 8, "spacing");
729
+ function createUnarySpacing(theme) {
730
+ return createUnaryUnit(theme, "spacing", 8, "spacing");
518
731
  }
519
- process.env.NODE_ENV !== "production" && Te.reduce((e, i) => (e[i] = te, e), {});
520
- process.env.NODE_ENV !== "production" && Se.reduce((e, i) => (e[i] = te, e), {});
521
- process.env.NODE_ENV !== "production" && Qe.reduce((e, i) => (e[i] = te, e), {});
522
- function aa(e = 8) {
523
- if (e.mui)
524
- return e;
525
- const i = ea({
526
- spacing: e
527
- }), r = (...a) => (process.env.NODE_ENV !== "production" && (a.length <= 4 || console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${a.length}`)), (a.length === 0 ? [1] : a).map((n) => {
528
- const s = i(n);
529
- return typeof s == "number" ? `${s}px` : s;
530
- }).join(" "));
531
- return r.mui = !0, r;
732
+ process.env.NODE_ENV !== "production" ? marginKeys.reduce((obj, key) => {
733
+ obj[key] = responsivePropType;
734
+ return obj;
735
+ }, {}) : {};
736
+ process.env.NODE_ENV !== "production" ? paddingKeys.reduce((obj, key) => {
737
+ obj[key] = responsivePropType;
738
+ return obj;
739
+ }, {}) : {};
740
+ process.env.NODE_ENV !== "production" ? spacingKeys.reduce((obj, key) => {
741
+ obj[key] = responsivePropType;
742
+ return obj;
743
+ }, {}) : {};
744
+ function createSpacing(spacingInput = 8) {
745
+ if (spacingInput.mui) {
746
+ return spacingInput;
747
+ }
748
+ const transform = createUnarySpacing({
749
+ spacing: spacingInput
750
+ });
751
+ const spacing = (...argsInput) => {
752
+ if (process.env.NODE_ENV !== "production") {
753
+ if (!(argsInput.length <= 4)) {
754
+ console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);
755
+ }
756
+ }
757
+ const args = argsInput.length === 0 ? [1] : argsInput;
758
+ return args.map((argument) => {
759
+ const output = transform(argument);
760
+ return typeof output === "number" ? `${output}px` : output;
761
+ }).join(" ");
762
+ };
763
+ spacing.mui = true;
764
+ return spacing;
532
765
  }
533
- const na = 8, ka = {
766
+ const SPACING = 8;
767
+ const BREAKPOINTS = {
534
768
  XS: 320,
535
769
  SM: 600,
536
770
  MD: 960,
537
771
  LG: 1280,
538
772
  XL: 1600
539
- }, j = aa(na), Ba = j(1.5), Ra = j(2.25), Ga = j(3), Na = j(6), Da = 6e3, ra = {
773
+ };
774
+ const getSpacing = createSpacing(SPACING);
775
+ const ICON_SIZE_SMALL = getSpacing(1.5);
776
+ const ICON_SIZE_MEDIUM = getSpacing(2.25);
777
+ const ICON_SIZE_LARGE = getSpacing(3);
778
+ const APPBAR_SIZE = getSpacing(6);
779
+ const NOTIFICATION_DURATION_IN_MS = 6e3;
780
+ const FontWeight = {
540
781
  regular: 400,
541
782
  medium: 500,
542
783
  strong: 600
543
784
  };
544
- function ta({ italic: e, weight: i, style: r, children: a, ...d }, n) {
545
- const s = {
546
- fontWeight: ra[i],
547
- fontStyle: e ? "italic" : void 0
785
+ function _Typography({ italic, weight, style, children, ...otherProps }, ref) {
786
+ const fontConfiguration = {
787
+ fontWeight: FontWeight[weight],
788
+ fontStyle: italic ? "italic" : void 0
548
789
  };
549
- return /* @__PURE__ */ O(
550
- Ge,
790
+ return /* @__PURE__ */ jsx(
791
+ Typography$1,
551
792
  {
552
- ...d,
553
- ref: n,
793
+ ...otherProps,
794
+ ref,
554
795
  style: {
555
- ...s,
556
- ...r
796
+ ...fontConfiguration,
797
+ ...style
557
798
  },
558
799
  "data-name": "typography",
559
- children: a
800
+ children
560
801
  }
561
802
  );
562
803
  }
563
- const qa = De(ta), ia = {
804
+ const Typography = forwardRef(_Typography);
805
+ const en = {
564
806
  c4r: {
565
807
  button: {
566
808
  cancel: "Cancel",
@@ -701,7 +943,8 @@ const qa = De(ta), ia = {
701
943
  }
702
944
  }
703
945
  }
704
- }, sa = {
946
+ };
947
+ const es = {
705
948
  c4r: {
706
949
  button: {
707
950
  cancel: "Cancelar",
@@ -840,7 +1083,8 @@ const qa = De(ta), ia = {
840
1083
  }
841
1084
  }
842
1085
  }
843
- }, da = {
1086
+ };
1087
+ const id = {
844
1088
  c4r: {
845
1089
  button: {
846
1090
  cancel: "Batal",
@@ -981,16 +1225,25 @@ const qa = De(ta), ia = {
981
1225
  }
982
1226
  }
983
1227
  }
984
- }, pe = { en: ia, es: sa, id: da };
985
- function oa(e) {
986
- return Intl.getCanonicalLocales(e);
1228
+ };
1229
+ const messages = { en, es, id };
1230
+ function CanonicalizeLocaleList(locales) {
1231
+ return Intl.getCanonicalLocales(locales);
987
1232
  }
988
- function U(e, i, r) {
989
- if (r || arguments.length === 2) for (var a = 0, d = i.length, n; a < d; a++)
990
- (n || !(a in i)) && (n || (n = Array.prototype.slice.call(i, 0, a)), n[a] = i[a]);
991
- return e.concat(n || Array.prototype.slice.call(i));
1233
+ function __spreadArray(to, from, pack) {
1234
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
1235
+ if (ar || !(i in from)) {
1236
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
1237
+ ar[i] = from[i];
1238
+ }
1239
+ }
1240
+ return to.concat(ar || Array.prototype.slice.call(from));
992
1241
  }
993
- var Q = {
1242
+ typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
1243
+ var e = new Error(message);
1244
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
1245
+ };
1246
+ var data = {
994
1247
  supplemental: {
995
1248
  languageMatching: {
996
1249
  "written-new": [
@@ -3609,7 +3862,8 @@ var Q = {
3609
3862
  ]
3610
3863
  }
3611
3864
  }
3612
- }, ca = {
3865
+ };
3866
+ var regions = {
3613
3867
  "001": [
3614
3868
  "001",
3615
3869
  "001-status-grouping",
@@ -4374,7 +4628,7 @@ var Q = {
4374
4628
  "WF",
4375
4629
  "WS"
4376
4630
  ],
4377
- 142: [
4631
+ "142": [
4378
4632
  "030",
4379
4633
  "034",
4380
4634
  "035",
@@ -4433,7 +4687,7 @@ var Q = {
4433
4687
  "VN",
4434
4688
  "YE"
4435
4689
  ],
4436
- 143: [
4690
+ "143": [
4437
4691
  "143",
4438
4692
  "KG",
4439
4693
  "KZ",
@@ -4441,7 +4695,7 @@ var Q = {
4441
4695
  "TM",
4442
4696
  "UZ"
4443
4697
  ],
4444
- 145: [
4698
+ "145": [
4445
4699
  "145",
4446
4700
  "AE",
4447
4701
  "AM",
@@ -4462,7 +4716,7 @@ var Q = {
4462
4716
  "TR",
4463
4717
  "YE"
4464
4718
  ],
4465
- 150: [
4719
+ "150": [
4466
4720
  "039",
4467
4721
  "150",
4468
4722
  "151",
@@ -4522,7 +4776,7 @@ var Q = {
4522
4776
  "VA",
4523
4777
  "XK"
4524
4778
  ],
4525
- 151: [
4779
+ "151": [
4526
4780
  "151",
4527
4781
  "BG",
4528
4782
  "BY",
@@ -4535,7 +4789,7 @@ var Q = {
4535
4789
  "SK",
4536
4790
  "UA"
4537
4791
  ],
4538
- 154: [
4792
+ "154": [
4539
4793
  "154",
4540
4794
  "AX",
4541
4795
  "CQ",
@@ -4555,7 +4809,7 @@ var Q = {
4555
4809
  "SE",
4556
4810
  "SJ"
4557
4811
  ],
4558
- 155: [
4812
+ "155": [
4559
4813
  "155",
4560
4814
  "AT",
4561
4815
  "BE",
@@ -4567,7 +4821,7 @@ var Q = {
4567
4821
  "MC",
4568
4822
  "NL"
4569
4823
  ],
4570
- 202: [
4824
+ "202": [
4571
4825
  "011",
4572
4826
  "014",
4573
4827
  "017",
@@ -4627,7 +4881,7 @@ var Q = {
4627
4881
  "ZM",
4628
4882
  "ZW"
4629
4883
  ],
4630
- 419: [
4884
+ "419": [
4631
4885
  "005",
4632
4886
  "013",
4633
4887
  "029",
@@ -4685,7 +4939,7 @@ var Q = {
4685
4939
  "VG",
4686
4940
  "VI"
4687
4941
  ],
4688
- EU: [
4942
+ "EU": [
4689
4943
  "AT",
4690
4944
  "BE",
4691
4945
  "BG",
@@ -4715,7 +4969,7 @@ var Q = {
4715
4969
  "SI",
4716
4970
  "SK"
4717
4971
  ],
4718
- EZ: [
4972
+ "EZ": [
4719
4973
  "AT",
4720
4974
  "BE",
4721
4975
  "CY",
@@ -4737,7 +4991,7 @@ var Q = {
4737
4991
  "SI",
4738
4992
  "SK"
4739
4993
  ],
4740
- QO: [
4994
+ "QO": [
4741
4995
  "AC",
4742
4996
  "AQ",
4743
4997
  "CP",
@@ -4745,7 +4999,7 @@ var Q = {
4745
4999
  "QO",
4746
5000
  "TA"
4747
5001
  ],
4748
- UN: [
5002
+ "UN": [
4749
5003
  "AD",
4750
5004
  "AE",
4751
5005
  "AF",
@@ -4941,275 +5195,433 @@ var Q = {
4941
5195
  "ZM",
4942
5196
  "ZW"
4943
5197
  ]
4944
- }, Me = /-u(?:-[0-9a-z]{2,8})+/gi;
4945
- function N(e, i, r) {
4946
- if (r === void 0 && (r = Error), !e)
4947
- throw new r(i);
5198
+ };
5199
+ var UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi;
5200
+ function invariant(condition, message, Err) {
5201
+ if (Err === void 0) {
5202
+ Err = Error;
5203
+ }
5204
+ if (!condition) {
5205
+ throw new Err(message);
5206
+ }
4948
5207
  }
4949
- var ua = 838, X;
4950
- function _a() {
4951
- var e, i;
4952
- if (!X) {
4953
- var r = (i = (e = Q.supplemental.languageMatching["written-new"][0]) === null || e === void 0 ? void 0 : e.paradigmLocales) === null || i === void 0 ? void 0 : i._locales.split(" "), a = Q.supplemental.languageMatching["written-new"].slice(1, 5), d = Q.supplemental.languageMatching["written-new"].slice(5), n = d.map(function(s) {
4954
- var o = Object.keys(s)[0], u = s[o];
5208
+ var DEFAULT_MATCHING_THRESHOLD = 838;
5209
+ var PROCESSED_DATA;
5210
+ function processData() {
5211
+ var _a, _b;
5212
+ if (!PROCESSED_DATA) {
5213
+ var paradigmLocales = (_b = (_a = data.supplemental.languageMatching["written-new"][0]) === null || _a === void 0 ? void 0 : _a.paradigmLocales) === null || _b === void 0 ? void 0 : _b._locales.split(" ");
5214
+ var matchVariables = data.supplemental.languageMatching["written-new"].slice(1, 5);
5215
+ var data$1 = data.supplemental.languageMatching["written-new"].slice(5);
5216
+ var matches = data$1.map(function(d) {
5217
+ var key = Object.keys(d)[0];
5218
+ var value = d[key];
4955
5219
  return {
4956
- supported: o,
4957
- desired: u._desired,
4958
- distance: +u._distance,
4959
- oneway: u.oneway === "true"
5220
+ supported: key,
5221
+ desired: value._desired,
5222
+ distance: +value._distance,
5223
+ oneway: value.oneway === "true" ? true : false
4960
5224
  };
4961
5225
  }, {});
4962
- X = {
4963
- matches: n,
4964
- matchVariables: a.reduce(function(s, o) {
4965
- var u = Object.keys(o)[0], y = o[u];
4966
- return s[u.slice(1)] = y._value.split("+"), s;
5226
+ PROCESSED_DATA = {
5227
+ matches,
5228
+ matchVariables: matchVariables.reduce(function(all, d) {
5229
+ var key = Object.keys(d)[0];
5230
+ var value = d[key];
5231
+ all[key.slice(1)] = value._value.split("+");
5232
+ return all;
4967
5233
  }, {}),
4968
- paradigmLocales: U(U([], r, !0), r.map(function(s) {
4969
- return new Intl.Locale(s.replace(/_/g, "-")).maximize().toString();
4970
- }), !0)
5234
+ paradigmLocales: __spreadArray(__spreadArray([], paradigmLocales, true), paradigmLocales.map(function(l) {
5235
+ return new Intl.Locale(l.replace(/_/g, "-")).maximize().toString();
5236
+ }), true)
4971
5237
  };
4972
5238
  }
4973
- return X;
5239
+ return PROCESSED_DATA;
4974
5240
  }
4975
- function K(e, i, r) {
4976
- var a = i.split("-"), d = a[0], n = a[1], s = a[2], o = !0;
4977
- if (s && s[0] === "$") {
4978
- var u = s[1] !== "!", y = u ? r[s.slice(1)] : r[s.slice(2)], l = y.map(function(T) {
4979
- return ca[T] || [T];
4980
- }).reduce(function(T, M) {
4981
- return U(U([], T, !0), M, !0);
5241
+ function isMatched(locale, languageMatchInfoLocale, matchVariables) {
5242
+ var _a = languageMatchInfoLocale.split("-"), language = _a[0], script = _a[1], region = _a[2];
5243
+ var matches = true;
5244
+ if (region && region[0] === "$") {
5245
+ var shouldInclude = region[1] !== "!";
5246
+ var matchRegions = shouldInclude ? matchVariables[region.slice(1)] : matchVariables[region.slice(2)];
5247
+ var expandedMatchedRegions = matchRegions.map(function(r) {
5248
+ return regions[r] || [r];
5249
+ }).reduce(function(all, list) {
5250
+ return __spreadArray(__spreadArray([], all, true), list, true);
4982
5251
  }, []);
4983
- o && (o = l.indexOf(e.region || "") > 1 == u);
4984
- } else
4985
- o && (o = e.region ? s === "*" || s === e.region : !0);
4986
- return o && (o = e.script ? n === "*" || n === e.script : !0), o && (o = e.language ? d === "*" || d === e.language : !0), o;
5252
+ matches && (matches = !(expandedMatchedRegions.indexOf(locale.region || "") > 1 != shouldInclude));
5253
+ } else {
5254
+ matches && (matches = locale.region ? region === "*" || region === locale.region : true);
5255
+ }
5256
+ matches && (matches = locale.script ? script === "*" || script === locale.script : true);
5257
+ matches && (matches = locale.language ? language === "*" || language === locale.language : true);
5258
+ return matches;
4987
5259
  }
4988
- function fe(e) {
4989
- return [e.language, e.script, e.region].filter(Boolean).join("-");
5260
+ function serializeLSR(lsr) {
5261
+ return [lsr.language, lsr.script, lsr.region].filter(Boolean).join("-");
4990
5262
  }
4991
- function ee(e, i, r) {
4992
- for (var a = 0, d = r.matches; a < d.length; a++) {
4993
- var n = d[a], s = K(e, n.desired, r.matchVariables) && K(i, n.supported, r.matchVariables);
4994
- if (!n.oneway && !s && (s = K(e, n.supported, r.matchVariables) && K(i, n.desired, r.matchVariables)), s) {
4995
- var o = n.distance * 10;
4996
- return r.paradigmLocales.indexOf(fe(e)) > -1 != r.paradigmLocales.indexOf(fe(i)) > -1 ? o - 1 : o;
5263
+ function findMatchingDistanceForLSR(desired, supported, data2) {
5264
+ for (var _i = 0, _a = data2.matches; _i < _a.length; _i++) {
5265
+ var d = _a[_i];
5266
+ var matches = isMatched(desired, d.desired, data2.matchVariables) && isMatched(supported, d.supported, data2.matchVariables);
5267
+ if (!d.oneway && !matches) {
5268
+ matches = isMatched(desired, d.supported, data2.matchVariables) && isMatched(supported, d.desired, data2.matchVariables);
5269
+ }
5270
+ if (matches) {
5271
+ var distance = d.distance * 10;
5272
+ if (data2.paradigmLocales.indexOf(serializeLSR(desired)) > -1 != data2.paradigmLocales.indexOf(serializeLSR(supported)) > -1) {
5273
+ return distance - 1;
5274
+ }
5275
+ return distance;
4997
5276
  }
4998
5277
  }
4999
5278
  throw new Error("No matching distance found");
5000
5279
  }
5001
- function la(e, i) {
5002
- var r = new Intl.Locale(e).maximize(), a = new Intl.Locale(i).maximize(), d = {
5003
- language: r.language,
5004
- script: r.script || "",
5005
- region: r.region || ""
5006
- }, n = {
5007
- language: a.language,
5008
- script: a.script || "",
5009
- region: a.region || ""
5010
- }, s = 0, o = _a();
5011
- return d.language !== n.language && (s += ee({
5012
- language: r.language,
5013
- script: "",
5014
- region: ""
5015
- }, {
5016
- language: a.language,
5017
- script: "",
5018
- region: ""
5019
- }, o)), d.script !== n.script && (s += ee({
5020
- language: r.language,
5021
- script: d.script,
5022
- region: ""
5023
- }, {
5024
- language: a.language,
5025
- script: d.script,
5026
- region: ""
5027
- }, o)), d.region !== n.region && (s += ee(d, n, o)), s;
5280
+ function findMatchingDistance(desired, supported) {
5281
+ var desiredLocale = new Intl.Locale(desired).maximize();
5282
+ var supportedLocale = new Intl.Locale(supported).maximize();
5283
+ var desiredLSR = {
5284
+ language: desiredLocale.language,
5285
+ script: desiredLocale.script || "",
5286
+ region: desiredLocale.region || ""
5287
+ };
5288
+ var supportedLSR = {
5289
+ language: supportedLocale.language,
5290
+ script: supportedLocale.script || "",
5291
+ region: supportedLocale.region || ""
5292
+ };
5293
+ var matchingDistance = 0;
5294
+ var data2 = processData();
5295
+ if (desiredLSR.language !== supportedLSR.language) {
5296
+ matchingDistance += findMatchingDistanceForLSR({
5297
+ language: desiredLocale.language,
5298
+ script: "",
5299
+ region: ""
5300
+ }, {
5301
+ language: supportedLocale.language,
5302
+ script: "",
5303
+ region: ""
5304
+ }, data2);
5305
+ }
5306
+ if (desiredLSR.script !== supportedLSR.script) {
5307
+ matchingDistance += findMatchingDistanceForLSR({
5308
+ language: desiredLocale.language,
5309
+ script: desiredLSR.script,
5310
+ region: ""
5311
+ }, {
5312
+ language: supportedLocale.language,
5313
+ script: desiredLSR.script,
5314
+ region: ""
5315
+ }, data2);
5316
+ }
5317
+ if (desiredLSR.region !== supportedLSR.region) {
5318
+ matchingDistance += findMatchingDistanceForLSR(desiredLSR, supportedLSR, data2);
5319
+ }
5320
+ return matchingDistance;
5028
5321
  }
5029
- function ya(e, i, r) {
5030
- r === void 0 && (r = ua);
5031
- var a = 1 / 0, d = {
5322
+ function findBestMatch(requestedLocales, supportedLocales, threshold) {
5323
+ if (threshold === void 0) {
5324
+ threshold = DEFAULT_MATCHING_THRESHOLD;
5325
+ }
5326
+ var lowestDistance = Infinity;
5327
+ var result = {
5032
5328
  matchedDesiredLocale: "",
5033
5329
  distances: {}
5034
5330
  };
5035
- return e.forEach(function(n, s) {
5036
- d.distances[n] || (d.distances[n] = {}), i.forEach(function(o) {
5037
- var u = la(n, o) + 0 + s * 40;
5038
- d.distances[n][o] = u, u < a && (a = u, d.matchedDesiredLocale = n, d.matchedSupportedLocale = o);
5331
+ requestedLocales.forEach(function(desired, i) {
5332
+ if (!result.distances[desired]) {
5333
+ result.distances[desired] = {};
5334
+ }
5335
+ supportedLocales.forEach(function(supported) {
5336
+ var distance = findMatchingDistance(desired, supported) + 0 + i * 40;
5337
+ result.distances[desired][supported] = distance;
5338
+ if (distance < lowestDistance) {
5339
+ lowestDistance = distance;
5340
+ result.matchedDesiredLocale = desired;
5341
+ result.matchedSupportedLocale = supported;
5342
+ }
5039
5343
  });
5040
- }), a >= r && (d.matchedDesiredLocale = void 0, d.matchedSupportedLocale = void 0), d;
5344
+ });
5345
+ if (lowestDistance >= threshold) {
5346
+ result.matchedDesiredLocale = void 0;
5347
+ result.matchedSupportedLocale = void 0;
5348
+ }
5349
+ return result;
5041
5350
  }
5042
- function pa(e, i, r) {
5043
- var a, d, n = [], s = i.reduce(function(u, y) {
5044
- var l = y.replace(Me, "");
5045
- return n.push(l), u[l] = y, u;
5046
- }, {}), o = ya(n, e);
5047
- return o.matchedSupportedLocale && o.matchedDesiredLocale && (a = o.matchedSupportedLocale, d = s[o.matchedDesiredLocale].slice(o.matchedDesiredLocale.length) || void 0), a ? {
5048
- locale: a,
5049
- extension: d
5050
- } : { locale: r() };
5351
+ function BestFitMatcher(availableLocales, requestedLocales, getDefaultLocale) {
5352
+ var foundLocale;
5353
+ var extension;
5354
+ var noExtensionLocales = [];
5355
+ var noExtensionLocaleMap = requestedLocales.reduce(function(all, l) {
5356
+ var noExtensionLocale = l.replace(UNICODE_EXTENSION_SEQUENCE_REGEX, "");
5357
+ noExtensionLocales.push(noExtensionLocale);
5358
+ all[noExtensionLocale] = l;
5359
+ return all;
5360
+ }, {});
5361
+ var result = findBestMatch(noExtensionLocales, availableLocales);
5362
+ if (result.matchedSupportedLocale && result.matchedDesiredLocale) {
5363
+ foundLocale = result.matchedSupportedLocale;
5364
+ extension = noExtensionLocaleMap[result.matchedDesiredLocale].slice(result.matchedDesiredLocale.length) || void 0;
5365
+ }
5366
+ if (!foundLocale) {
5367
+ return { locale: getDefaultLocale() };
5368
+ }
5369
+ return {
5370
+ locale: foundLocale,
5371
+ extension
5372
+ };
5051
5373
  }
5052
- function fa(e, i) {
5053
- for (var r = i; ; ) {
5054
- if (e.indexOf(r) > -1)
5055
- return r;
5056
- var a = r.lastIndexOf("-");
5057
- if (!~a)
5058
- return;
5059
- a >= 2 && r[a - 2] === "-" && (a -= 2), r = r.slice(0, a);
5374
+ function BestAvailableLocale(availableLocales, locale) {
5375
+ var candidate = locale;
5376
+ while (true) {
5377
+ if (availableLocales.indexOf(candidate) > -1) {
5378
+ return candidate;
5379
+ }
5380
+ var pos = candidate.lastIndexOf("-");
5381
+ if (!~pos) {
5382
+ return void 0;
5383
+ }
5384
+ if (pos >= 2 && candidate[pos - 2] === "-") {
5385
+ pos -= 2;
5386
+ }
5387
+ candidate = candidate.slice(0, pos);
5060
5388
  }
5061
5389
  }
5062
- function wa(e, i, r) {
5063
- for (var a = { locale: "" }, d = 0, n = i; d < n.length; d++) {
5064
- var s = n[d], o = s.replace(Me, ""), u = fa(e, o);
5065
- if (u)
5066
- return a.locale = u, s !== o && (a.extension = s.slice(o.length, s.length)), a;
5390
+ function LookupMatcher(availableLocales, requestedLocales, getDefaultLocale) {
5391
+ var result = { locale: "" };
5392
+ for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {
5393
+ var locale = requestedLocales_1[_i];
5394
+ var noExtensionLocale = locale.replace(UNICODE_EXTENSION_SEQUENCE_REGEX, "");
5395
+ var availableLocale = BestAvailableLocale(availableLocales, noExtensionLocale);
5396
+ if (availableLocale) {
5397
+ result.locale = availableLocale;
5398
+ if (locale !== noExtensionLocale) {
5399
+ result.extension = locale.slice(noExtensionLocale.length, locale.length);
5400
+ }
5401
+ return result;
5402
+ }
5067
5403
  }
5068
- return a.locale = r(), a;
5404
+ result.locale = getDefaultLocale();
5405
+ return result;
5069
5406
  }
5070
- function ga(e, i) {
5071
- N(i.length === 2, "key must have 2 elements");
5072
- var r = e.length, a = "-".concat(i, "-"), d = e.indexOf(a);
5073
- if (d !== -1) {
5074
- for (var n = d + 4, s = n, o = n, u = !1; !u; ) {
5075
- var y = e.indexOf("-", o), l = void 0;
5076
- y === -1 ? l = r - o : l = y - o, l === 2 ? u = !0 : y === -1 ? (s = r, u = !0) : (s = y, o = y + 1);
5407
+ function UnicodeExtensionValue(extension, key) {
5408
+ invariant(key.length === 2, "key must have 2 elements");
5409
+ var size = extension.length;
5410
+ var searchValue = "-".concat(key, "-");
5411
+ var pos = extension.indexOf(searchValue);
5412
+ if (pos !== -1) {
5413
+ var start = pos + 4;
5414
+ var end = start;
5415
+ var k = start;
5416
+ var done = false;
5417
+ while (!done) {
5418
+ var e = extension.indexOf("-", k);
5419
+ var len = void 0;
5420
+ if (e === -1) {
5421
+ len = size - k;
5422
+ } else {
5423
+ len = e - k;
5424
+ }
5425
+ if (len === 2) {
5426
+ done = true;
5427
+ } else if (e === -1) {
5428
+ end = size;
5429
+ done = true;
5430
+ } else {
5431
+ end = e;
5432
+ k = e + 1;
5433
+ }
5077
5434
  }
5078
- return e.slice(n, s);
5435
+ return extension.slice(start, end);
5079
5436
  }
5080
- if (a = "-".concat(i), d = e.indexOf(a), d !== -1 && d + 3 === r)
5437
+ searchValue = "-".concat(key);
5438
+ pos = extension.indexOf(searchValue);
5439
+ if (pos !== -1 && pos + 3 === size) {
5081
5440
  return "";
5441
+ }
5442
+ return void 0;
5082
5443
  }
5083
- function ma(e, i, r, a, d, n) {
5084
- var s = r.localeMatcher, o;
5085
- s === "lookup" ? o = wa(Array.from(e), i, n) : o = pa(Array.from(e), i, n);
5086
- for (var u = o.locale, y = { locale: "", dataLocale: u }, l = "-u", T = 0, M = a; T < M.length; T++) {
5087
- var E = M[T];
5088
- N(u in d, "Missing locale data for ".concat(u));
5089
- var I = d[u];
5090
- N(typeof I == "object" && I !== null, "locale data ".concat(E, " must be an object"));
5091
- var C = I[E];
5092
- N(Array.isArray(C), "keyLocaleData for ".concat(E, " must be an array"));
5093
- var L = C[0];
5094
- N(typeof L == "string" || L === null, "value must be string or null but got ".concat(typeof L, " in key ").concat(E));
5095
- var A = "";
5096
- if (o.extension) {
5097
- var R = ga(o.extension, E);
5098
- R !== void 0 && (R !== "" ? ~C.indexOf(R) && (L = R, A = "-".concat(E, "-").concat(L)) : ~R.indexOf("true") && (L = "true", A = "-".concat(E)));
5444
+ function ResolveLocale(availableLocales, requestedLocales, options, relevantExtensionKeys, localeData, getDefaultLocale) {
5445
+ var matcher = options.localeMatcher;
5446
+ var r;
5447
+ if (matcher === "lookup") {
5448
+ r = LookupMatcher(Array.from(availableLocales), requestedLocales, getDefaultLocale);
5449
+ } else {
5450
+ r = BestFitMatcher(Array.from(availableLocales), requestedLocales, getDefaultLocale);
5451
+ }
5452
+ var foundLocale = r.locale;
5453
+ var result = { locale: "", dataLocale: foundLocale };
5454
+ var supportedExtension = "-u";
5455
+ for (var _i = 0, relevantExtensionKeys_1 = relevantExtensionKeys; _i < relevantExtensionKeys_1.length; _i++) {
5456
+ var key = relevantExtensionKeys_1[_i];
5457
+ invariant(foundLocale in localeData, "Missing locale data for ".concat(foundLocale));
5458
+ var foundLocaleData = localeData[foundLocale];
5459
+ invariant(typeof foundLocaleData === "object" && foundLocaleData !== null, "locale data ".concat(key, " must be an object"));
5460
+ var keyLocaleData = foundLocaleData[key];
5461
+ invariant(Array.isArray(keyLocaleData), "keyLocaleData for ".concat(key, " must be an array"));
5462
+ var value = keyLocaleData[0];
5463
+ invariant(typeof value === "string" || value === null, "value must be string or null but got ".concat(typeof value, " in key ").concat(key));
5464
+ var supportedExtensionAddition = "";
5465
+ if (r.extension) {
5466
+ var requestedValue = UnicodeExtensionValue(r.extension, key);
5467
+ if (requestedValue !== void 0) {
5468
+ if (requestedValue !== "") {
5469
+ if (~keyLocaleData.indexOf(requestedValue)) {
5470
+ value = requestedValue;
5471
+ supportedExtensionAddition = "-".concat(key, "-").concat(value);
5472
+ }
5473
+ } else if (~requestedValue.indexOf("true")) {
5474
+ value = "true";
5475
+ supportedExtensionAddition = "-".concat(key);
5476
+ }
5477
+ }
5099
5478
  }
5100
- if (E in r) {
5101
- var k = r[E];
5102
- N(typeof k == "string" || typeof k > "u" || k === null, "optionsValue must be String, Undefined or Null"), ~C.indexOf(k) && k !== L && (L = k, A = "");
5479
+ if (key in options) {
5480
+ var optionsValue = options[key];
5481
+ invariant(typeof optionsValue === "string" || typeof optionsValue === "undefined" || optionsValue === null, "optionsValue must be String, Undefined or Null");
5482
+ if (~keyLocaleData.indexOf(optionsValue)) {
5483
+ if (optionsValue !== value) {
5484
+ value = optionsValue;
5485
+ supportedExtensionAddition = "";
5486
+ }
5487
+ }
5103
5488
  }
5104
- y[E] = L, l += A;
5489
+ result[key] = value;
5490
+ supportedExtension += supportedExtensionAddition;
5105
5491
  }
5106
- if (l.length > 2) {
5107
- var D = u.indexOf("-x-");
5108
- if (D === -1)
5109
- u = u + l;
5110
- else {
5111
- var V = u.slice(0, D), z = u.slice(D, u.length);
5112
- u = V + l + z;
5492
+ if (supportedExtension.length > 2) {
5493
+ var privateIndex = foundLocale.indexOf("-x-");
5494
+ if (privateIndex === -1) {
5495
+ foundLocale = foundLocale + supportedExtension;
5496
+ } else {
5497
+ var preExtension = foundLocale.slice(0, privateIndex);
5498
+ var postExtension = foundLocale.slice(privateIndex, foundLocale.length);
5499
+ foundLocale = preExtension + supportedExtension + postExtension;
5113
5500
  }
5114
- u = Intl.getCanonicalLocales(u)[0];
5501
+ foundLocale = Intl.getCanonicalLocales(foundLocale)[0];
5115
5502
  }
5116
- return y.locale = u, y;
5503
+ result.locale = foundLocale;
5504
+ return result;
5117
5505
  }
5118
- function ha(e, i, r, a) {
5119
- return ma(i, oa(e), {
5506
+ function match(requestedLocales, availableLocales, defaultLocale, opts) {
5507
+ return ResolveLocale(availableLocales, CanonicalizeLocaleList(requestedLocales), {
5120
5508
  localeMatcher: "best fit"
5121
5509
  }, [], {}, function() {
5122
- return r;
5510
+ return defaultLocale;
5123
5511
  }).locale;
5124
5512
  }
5125
- const ne = "en";
5126
- function Ce(e, i = "") {
5127
- return Object.keys(e).reduce(
5128
- (r, a) => {
5129
- const d = e[a], n = i ? `${i}.${a}` : a;
5130
- return typeof d == "string" ? r[n] = d : Object.assign(r, Ce(d, n)), r;
5513
+ const DEFAULT_LOCALE = "en";
5514
+ function flattenMessages(nestedMessages, prefix = "") {
5515
+ return Object.keys(nestedMessages).reduce(
5516
+ (messages2, key) => {
5517
+ const value = nestedMessages[key];
5518
+ const prefixedKey = prefix ? `${prefix}.${key}` : key;
5519
+ if (typeof value === "string") {
5520
+ messages2[prefixedKey] = value;
5521
+ } else {
5522
+ Object.assign(messages2, flattenMessages(value, prefixedKey));
5523
+ }
5524
+ return messages2;
5131
5525
  },
5132
5526
  {}
5133
5527
  );
5134
5528
  }
5135
- function va(e, i) {
5136
- const r = Object.keys(i), a = ha(
5137
- [e],
5138
- r,
5139
- ne
5529
+ function findMatchingMessagesLocale(locale, messages2) {
5530
+ const availableLocales = Object.keys(messages2);
5531
+ const matchedLocale = match(
5532
+ [locale],
5533
+ availableLocales,
5534
+ DEFAULT_LOCALE
5140
5535
  );
5141
- return a || ne;
5536
+ return matchedLocale ? matchedLocale : DEFAULT_LOCALE;
5142
5537
  }
5143
- const Ta = He(), we = /* @__PURE__ */ new WeakMap(), Sa = (e) => {
5144
- const i = (e == null ? void 0 : e.locale) || ne, r = va(i, pe), a = {
5145
- ...pe[r] || {},
5146
- ...(e == null ? void 0 : e.messages) ?? {}
5147
- }, d = Ce(a);
5148
- return Ke(
5538
+ const cache = createIntlCache();
5539
+ const intlInstanceCache = /* @__PURE__ */ new WeakMap();
5540
+ const createIntlInstance = (intlConfig) => {
5541
+ const locale = (intlConfig == null ? void 0 : intlConfig.locale) || DEFAULT_LOCALE;
5542
+ const messagesLocale = findMatchingMessagesLocale(locale, messages);
5543
+ const intMessages = {
5544
+ ...messages[messagesLocale] || {},
5545
+ ...(intlConfig == null ? void 0 : intlConfig.messages) ?? {}
5546
+ };
5547
+ const combinedMessages = flattenMessages(intMessages);
5548
+ return createIntl(
5149
5549
  {
5150
- locale: i,
5151
- messages: d
5550
+ locale,
5551
+ messages: combinedMessages
5152
5552
  },
5153
- Ta
5553
+ cache
5154
5554
  );
5155
- }, Ma = (e) => {
5156
- const i = we.get(e);
5157
- if (i)
5158
- return i;
5159
- const r = Sa(e);
5160
- return we.set(e, r), r;
5161
5555
  };
5162
- function Ca(e) {
5163
- return Ma(e);
5556
+ const getGloballyCachedIntl = (intlConfig) => {
5557
+ const cachedInstance = intlInstanceCache.get(intlConfig);
5558
+ if (cachedInstance) {
5559
+ return cachedInstance;
5560
+ }
5561
+ const newInstance = createIntlInstance(intlConfig);
5562
+ intlInstanceCache.set(intlConfig, newInstance);
5563
+ return newInstance;
5564
+ };
5565
+ function useImperativeIntl(intlConfig) {
5566
+ return getGloballyCachedIntl(intlConfig);
5164
5567
  }
5165
- const Ea = he(Ne)(({ theme: e }) => ({
5568
+ const Root = styled(Box)(({ theme }) => ({
5166
5569
  display: "flex",
5167
- gap: e.spacing(0.5),
5168
- marginLeft: e.spacing(1)
5169
- })), ge = he("div")(({ theme: e }) => ({
5570
+ gap: theme.spacing(0.5),
5571
+ marginLeft: theme.spacing(1)
5572
+ }));
5573
+ const Button = styled("div")(({ theme }) => ({
5170
5574
  "& .MuiIconButton-root:not(.Mui-disabled)": {
5171
- color: e.palette.text.secondary
5575
+ color: theme.palette.text.secondary
5172
5576
  }
5173
5577
  }));
5174
- function xa({
5175
- count: e,
5176
- page: i,
5177
- rowsPerPage: r = 10,
5178
- onPageChange: a,
5179
- lastPageTooltip: d
5578
+ function TablePaginationActions({
5579
+ count,
5580
+ page,
5581
+ rowsPerPage = 10,
5582
+ onPageChange,
5583
+ lastPageTooltip
5180
5584
  }) {
5181
- const n = Ue(), s = Ca(n), o = (I) => {
5182
- a(I, i - 1);
5183
- }, u = (I) => {
5184
- a(I, i + 1);
5185
- }, y = i === Math.ceil(e / r) - 1, l = i === 0, T = s.formatMessage({
5585
+ const intl = useIntl();
5586
+ const intlConfig = useImperativeIntl(intl);
5587
+ const handleBackButtonClick = (event) => {
5588
+ onPageChange(event, page - 1);
5589
+ };
5590
+ const handleNextButtonClick = (event) => {
5591
+ onPageChange(event, page + 1);
5592
+ };
5593
+ const isLastPage = page === Math.ceil(count / rowsPerPage) - 1;
5594
+ const isFirstPage = page === 0;
5595
+ const prevLabel = intlConfig.formatMessage({
5186
5596
  id: "c4r.form.pagination.prevPage"
5187
- }), M = s.formatMessage({
5597
+ });
5598
+ const nextLabel = intlConfig.formatMessage({
5188
5599
  id: "c4r.form.pagination.nextPage"
5189
- }), E = s.formatMessage({
5600
+ });
5601
+ const noMorePagesText = intlConfig.formatMessage({
5190
5602
  id: "c4r.form.pagination.noMorePages"
5191
5603
  });
5192
- return /* @__PURE__ */ Re(Ea, { children: [
5193
- /* @__PURE__ */ O(se, { title: l ? E : T, children: /* @__PURE__ */ O(ge, { children: /* @__PURE__ */ O(
5194
- de,
5604
+ return /* @__PURE__ */ jsxs(Root, { children: [
5605
+ /* @__PURE__ */ jsx(Tooltip, { title: isFirstPage ? noMorePagesText : prevLabel, children: /* @__PURE__ */ jsx(Button, { children: /* @__PURE__ */ jsx(
5606
+ IconButton,
5195
5607
  {
5196
- onClick: o,
5197
- disabled: i === 0,
5198
- "aria-label": T,
5199
- children: /* @__PURE__ */ O(qe, {})
5608
+ onClick: handleBackButtonClick,
5609
+ disabled: page === 0,
5610
+ "aria-label": prevLabel,
5611
+ children: /* @__PURE__ */ jsx(KeyboardArrowLeftOutlined, {})
5200
5612
  }
5201
5613
  ) }) }),
5202
- /* @__PURE__ */ O(
5203
- se,
5614
+ /* @__PURE__ */ jsx(
5615
+ Tooltip,
5204
5616
  {
5205
- title: y ? d ?? E : M,
5206
- children: /* @__PURE__ */ O(ge, { children: /* @__PURE__ */ O(
5207
- de,
5617
+ title: isLastPage ? lastPageTooltip ?? noMorePagesText : nextLabel,
5618
+ children: /* @__PURE__ */ jsx(Button, { children: /* @__PURE__ */ jsx(
5619
+ IconButton,
5208
5620
  {
5209
- onClick: u,
5210
- disabled: i >= Math.ceil(e / r) - 1,
5211
- "aria-label": M.toLocaleLowerCase(),
5212
- children: /* @__PURE__ */ O(xe, {})
5621
+ onClick: handleNextButtonClick,
5622
+ disabled: page >= Math.ceil(count / rowsPerPage) - 1,
5623
+ "aria-label": nextLabel.toLocaleLowerCase(),
5624
+ children: /* @__PURE__ */ jsx(KeyboardArrowRightOutlined, {})
5213
5625
  }
5214
5626
  ) })
5215
5627
  }
@@ -5217,16 +5629,16 @@ function xa({
5217
5629
  ] });
5218
5630
  }
5219
5631
  export {
5220
- Na as A,
5221
- ka as B,
5222
- Ga as I,
5223
- Da as N,
5224
- na as S,
5225
- qa as T,
5226
- xa as a,
5227
- Ra as b,
5228
- Ba as c,
5229
- je as d,
5230
- j as g,
5231
- Ca as u
5632
+ APPBAR_SIZE as A,
5633
+ BREAKPOINTS as B,
5634
+ ICON_SIZE_LARGE as I,
5635
+ NOTIFICATION_DURATION_IN_MS as N,
5636
+ SPACING as S,
5637
+ Typography as T,
5638
+ TablePaginationActions as a,
5639
+ ICON_SIZE_MEDIUM as b,
5640
+ ICON_SIZE_SMALL as c,
5641
+ getDefaultExportFromCjs as d,
5642
+ getSpacing as g,
5643
+ useImperativeIntl as u
5232
5644
  };