@sinco/react 1.0.2-rc.9 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +32 -18
- package/index.js +3559 -292
- package/package.json +1 -1
- package/src/lib/Theme/breakpoints.d.ts +3 -0
- package/src/lib/Theme/components.d.ts +2 -1
- package/src/lib/Theme/index.d.ts +2 -2
- package/src/lib/Theme/mixins.d.ts +3 -0
- package/src/lib/Theme/palette.d.ts +2 -1
- package/src/lib/Theme/shadows.d.ts +2 -1
- package/src/lib/Theme/typography.d.ts +2 -1
package/index.js
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import React__default, { forwardRef, useContext } from 'react';
|
3
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
4
|
+
|
1
5
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
2
6
|
|
3
7
|
var check = function (it) {
|
@@ -195,22 +199,22 @@ var process$1 = global$9.process;
|
|
195
199
|
var Deno = global$9.Deno;
|
196
200
|
var versions = process$1 && process$1.versions || Deno && Deno.version;
|
197
201
|
var v8 = versions && versions.v8;
|
198
|
-
var match, version;
|
202
|
+
var match$1, version;
|
199
203
|
|
200
204
|
if (v8) {
|
201
|
-
match = v8.split('.');
|
205
|
+
match$1 = v8.split('.');
|
202
206
|
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
203
207
|
// but their correct versions are not interesting for us
|
204
|
-
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
208
|
+
version = match$1[0] > 0 && match$1[0] < 4 ? 1 : +(match$1[0] + match$1[1]);
|
205
209
|
}
|
206
210
|
|
207
211
|
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
208
212
|
// so check `userAgent` even if `.v8` exists, but 0
|
209
213
|
if (!version && userAgent) {
|
210
|
-
match = userAgent.match(/Edge\/(\d+)/);
|
211
|
-
if (!match || match[1] >= 74) {
|
212
|
-
match = userAgent.match(/Chrome\/(\d+)/);
|
213
|
-
if (match) version = +match[1];
|
214
|
+
match$1 = userAgent.match(/Edge\/(\d+)/);
|
215
|
+
if (!match$1 || match$1[1] >= 74) {
|
216
|
+
match$1 = userAgent.match(/Chrome\/(\d+)/);
|
217
|
+
if (match$1) version = +match$1[1];
|
214
218
|
}
|
215
219
|
}
|
216
220
|
|
@@ -353,13 +357,13 @@ var toObject$3 = function (argument) {
|
|
353
357
|
var uncurryThis$6 = functionUncurryThis;
|
354
358
|
var toObject$2 = toObject$3;
|
355
359
|
|
356
|
-
var hasOwnProperty$
|
360
|
+
var hasOwnProperty$2 = uncurryThis$6({}.hasOwnProperty);
|
357
361
|
|
358
362
|
// `HasOwnProperty` abstract operation
|
359
363
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
360
364
|
// eslint-disable-next-line es/no-object-hasown -- safe
|
361
365
|
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
362
|
-
return hasOwnProperty$
|
366
|
+
return hasOwnProperty$2(toObject$2(it), key);
|
363
367
|
};
|
364
368
|
|
365
369
|
var uncurryThis$5 = functionUncurryThis;
|
@@ -592,9 +596,9 @@ var inspectSource$1 = store$1.inspectSource;
|
|
592
596
|
var global$3 = global$b;
|
593
597
|
var isCallable$3 = isCallable$a;
|
594
598
|
|
595
|
-
var WeakMap$
|
599
|
+
var WeakMap$2 = global$3.WeakMap;
|
596
600
|
|
597
|
-
var weakMapBasicDetection = isCallable$3(WeakMap$
|
601
|
+
var weakMapBasicDetection = isCallable$3(WeakMap$2) && /native code/.test(String(WeakMap$2));
|
598
602
|
|
599
603
|
var shared$1 = shared$3.exports;
|
600
604
|
var uid = uid$2;
|
@@ -618,7 +622,7 @@ var hiddenKeys$2 = hiddenKeys$3;
|
|
618
622
|
|
619
623
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
620
624
|
var TypeError$1 = global$2.TypeError;
|
621
|
-
var WeakMap = global$2.WeakMap;
|
625
|
+
var WeakMap$1 = global$2.WeakMap;
|
622
626
|
var set, get, has$3;
|
623
627
|
|
624
628
|
var enforce = function (it) {
|
@@ -635,7 +639,7 @@ var getterFor = function (TYPE) {
|
|
635
639
|
};
|
636
640
|
|
637
641
|
if (NATIVE_WEAK_MAP || shared.state) {
|
638
|
-
var store = shared.state || (shared.state = new WeakMap());
|
642
|
+
var store = shared.state || (shared.state = new WeakMap$1());
|
639
643
|
/* eslint-disable no-self-assign -- prototype methods protection */
|
640
644
|
store.get = store.get;
|
641
645
|
store.has = store.has;
|
@@ -693,7 +697,7 @@ var $String = String;
|
|
693
697
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
694
698
|
var defineProperty$1 = Object.defineProperty;
|
695
699
|
var stringSlice = uncurryThis$3(''.slice);
|
696
|
-
var replace = uncurryThis$3(''.replace);
|
700
|
+
var replace$1 = uncurryThis$3(''.replace);
|
697
701
|
var join = uncurryThis$3([].join);
|
698
702
|
|
699
703
|
var CONFIGURABLE_LENGTH = DESCRIPTORS$1 && !fails$2(function () {
|
@@ -704,7 +708,7 @@ var TEMPLATE = String(String).split('String');
|
|
704
708
|
|
705
709
|
var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
|
706
710
|
if (stringSlice($String(name), 0, 7) === 'Symbol(') {
|
707
|
-
name = '[' + replace($String(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
|
711
|
+
name = '[' + replace$1($String(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
|
708
712
|
}
|
709
713
|
if (options && options.getter) name = 'get ' + name;
|
710
714
|
if (options && options.setter) name = 'set ' + name;
|
@@ -1075,13 +1079,13 @@ var objectAssign$1 = !$assign || fails(function () {
|
|
1075
1079
|
} : $assign;
|
1076
1080
|
|
1077
1081
|
var $ = _export;
|
1078
|
-
var assign$
|
1082
|
+
var assign$2 = objectAssign$1;
|
1079
1083
|
|
1080
1084
|
// `Object.assign` method
|
1081
1085
|
// https://tc39.es/ecma262/#sec-object.assign
|
1082
1086
|
// eslint-disable-next-line es/no-object-assign -- required for testing
|
1083
|
-
$({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign$
|
1084
|
-
assign: assign$
|
1087
|
+
$({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign$2 }, {
|
1088
|
+
assign: assign$2
|
1085
1089
|
});
|
1086
1090
|
|
1087
1091
|
function isPlainObject(item) {
|
@@ -1124,9 +1128,9 @@ function deepmerge(target, source, options = {
|
|
1124
1128
|
|
1125
1129
|
var propTypes = {exports: {}};
|
1126
1130
|
|
1127
|
-
var reactIs = {exports: {}};
|
1131
|
+
var reactIs$1 = {exports: {}};
|
1128
1132
|
|
1129
|
-
var reactIs_production_min = {};
|
1133
|
+
var reactIs_production_min$1 = {};
|
1130
1134
|
|
1131
1135
|
/** @license React v16.13.1
|
1132
1136
|
* react-is.production.min.js
|
@@ -1136,14 +1140,14 @@ var reactIs_production_min = {};
|
|
1136
1140
|
* This source code is licensed under the MIT license found in the
|
1137
1141
|
* LICENSE file in the root directory of this source tree.
|
1138
1142
|
*/
|
1139
|
-
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?
|
1140
|
-
Symbol.for("react.suspense_list"):60120,r=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;
|
1141
|
-
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}reactIs_production_min.AsyncMode=l;reactIs_production_min.ConcurrentMode=m;reactIs_production_min.ContextConsumer=k;reactIs_production_min.ContextProvider=h;reactIs_production_min.Element=c;reactIs_production_min.ForwardRef=n;reactIs_production_min.Fragment=e;reactIs_production_min.Lazy=t;reactIs_production_min.Memo=r;reactIs_production_min.Portal=d;
|
1142
|
-
reactIs_production_min.Profiler=g;reactIs_production_min.StrictMode=f;reactIs_production_min.Suspense=p;reactIs_production_min.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min.isConcurrentMode=A;reactIs_production_min.isContextConsumer=function(a){return z(a)===k};reactIs_production_min.isContextProvider=function(a){return z(a)===h};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min.isForwardRef=function(a){return z(a)===n};reactIs_production_min.isFragment=function(a){return z(a)===e};reactIs_production_min.isLazy=function(a){return z(a)===t};
|
1143
|
-
reactIs_production_min.isMemo=function(a){return z(a)===r};reactIs_production_min.isPortal=function(a){return z(a)===d};reactIs_production_min.isProfiler=function(a){return z(a)===g};reactIs_production_min.isStrictMode=function(a){return z(a)===f};reactIs_production_min.isSuspense=function(a){return z(a)===p};
|
1144
|
-
reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};reactIs_production_min.typeOf=z;
|
1143
|
+
var b$1="function"===typeof Symbol&&Symbol.for,c$1=b$1?Symbol.for("react.element"):60103,d$1=b$1?Symbol.for("react.portal"):60106,e$1=b$1?Symbol.for("react.fragment"):60107,f$1=b$1?Symbol.for("react.strict_mode"):60108,g$1=b$1?Symbol.for("react.profiler"):60114,h$1=b$1?Symbol.for("react.provider"):60109,k$1=b$1?Symbol.for("react.context"):60110,l$1=b$1?Symbol.for("react.async_mode"):60111,m$1=b$1?Symbol.for("react.concurrent_mode"):60111,n$1=b$1?Symbol.for("react.forward_ref"):60112,p$1=b$1?Symbol.for("react.suspense"):60113,q$1=b$1?
|
1144
|
+
Symbol.for("react.suspense_list"):60120,r$1=b$1?Symbol.for("react.memo"):60115,t$1=b$1?Symbol.for("react.lazy"):60116,v$1=b$1?Symbol.for("react.block"):60121,w=b$1?Symbol.for("react.fundamental"):60117,x=b$1?Symbol.for("react.responder"):60118,y=b$1?Symbol.for("react.scope"):60119;
|
1145
|
+
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c$1:switch(a=a.type,a){case l$1:case m$1:case e$1:case g$1:case f$1:case p$1:return a;default:switch(a=a&&a.$$typeof,a){case k$1:case n$1:case t$1:case r$1:case h$1:return a;default:return u}}case d$1:return u}}}function A(a){return z(a)===m$1}reactIs_production_min$1.AsyncMode=l$1;reactIs_production_min$1.ConcurrentMode=m$1;reactIs_production_min$1.ContextConsumer=k$1;reactIs_production_min$1.ContextProvider=h$1;reactIs_production_min$1.Element=c$1;reactIs_production_min$1.ForwardRef=n$1;reactIs_production_min$1.Fragment=e$1;reactIs_production_min$1.Lazy=t$1;reactIs_production_min$1.Memo=r$1;reactIs_production_min$1.Portal=d$1;
|
1146
|
+
reactIs_production_min$1.Profiler=g$1;reactIs_production_min$1.StrictMode=f$1;reactIs_production_min$1.Suspense=p$1;reactIs_production_min$1.isAsyncMode=function(a){return A(a)||z(a)===l$1};reactIs_production_min$1.isConcurrentMode=A;reactIs_production_min$1.isContextConsumer=function(a){return z(a)===k$1};reactIs_production_min$1.isContextProvider=function(a){return z(a)===h$1};reactIs_production_min$1.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c$1};reactIs_production_min$1.isForwardRef=function(a){return z(a)===n$1};reactIs_production_min$1.isFragment=function(a){return z(a)===e$1};reactIs_production_min$1.isLazy=function(a){return z(a)===t$1};
|
1147
|
+
reactIs_production_min$1.isMemo=function(a){return z(a)===r$1};reactIs_production_min$1.isPortal=function(a){return z(a)===d$1};reactIs_production_min$1.isProfiler=function(a){return z(a)===g$1};reactIs_production_min$1.isStrictMode=function(a){return z(a)===f$1};reactIs_production_min$1.isSuspense=function(a){return z(a)===p$1};
|
1148
|
+
reactIs_production_min$1.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e$1||a===m$1||a===g$1||a===f$1||a===p$1||a===q$1||"object"===typeof a&&null!==a&&(a.$$typeof===t$1||a.$$typeof===r$1||a.$$typeof===h$1||a.$$typeof===k$1||a.$$typeof===n$1||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v$1)};reactIs_production_min$1.typeOf=z;
|
1145
1149
|
|
1146
|
-
var reactIs_development = {};
|
1150
|
+
var reactIs_development$1 = {};
|
1147
1151
|
|
1148
1152
|
/** @license React v16.13.1
|
1149
1153
|
* react-is.development.js
|
@@ -1293,41 +1297,41 @@ function isSuspense(object) {
|
|
1293
1297
|
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
1294
1298
|
}
|
1295
1299
|
|
1296
|
-
reactIs_development.AsyncMode = AsyncMode;
|
1297
|
-
reactIs_development.ConcurrentMode = ConcurrentMode;
|
1298
|
-
reactIs_development.ContextConsumer = ContextConsumer;
|
1299
|
-
reactIs_development.ContextProvider = ContextProvider;
|
1300
|
-
reactIs_development.Element = Element;
|
1301
|
-
reactIs_development.ForwardRef = ForwardRef;
|
1302
|
-
reactIs_development.Fragment = Fragment;
|
1303
|
-
reactIs_development.Lazy = Lazy;
|
1304
|
-
reactIs_development.Memo = Memo;
|
1305
|
-
reactIs_development.Portal = Portal;
|
1306
|
-
reactIs_development.Profiler = Profiler;
|
1307
|
-
reactIs_development.StrictMode = StrictMode;
|
1308
|
-
reactIs_development.Suspense = Suspense;
|
1309
|
-
reactIs_development.isAsyncMode = isAsyncMode;
|
1310
|
-
reactIs_development.isConcurrentMode = isConcurrentMode;
|
1311
|
-
reactIs_development.isContextConsumer = isContextConsumer;
|
1312
|
-
reactIs_development.isContextProvider = isContextProvider;
|
1313
|
-
reactIs_development.isElement = isElement;
|
1314
|
-
reactIs_development.isForwardRef = isForwardRef;
|
1315
|
-
reactIs_development.isFragment = isFragment;
|
1316
|
-
reactIs_development.isLazy = isLazy;
|
1317
|
-
reactIs_development.isMemo = isMemo;
|
1318
|
-
reactIs_development.isPortal = isPortal;
|
1319
|
-
reactIs_development.isProfiler = isProfiler;
|
1320
|
-
reactIs_development.isStrictMode = isStrictMode;
|
1321
|
-
reactIs_development.isSuspense = isSuspense;
|
1322
|
-
reactIs_development.isValidElementType = isValidElementType;
|
1323
|
-
reactIs_development.typeOf = typeOf;
|
1300
|
+
reactIs_development$1.AsyncMode = AsyncMode;
|
1301
|
+
reactIs_development$1.ConcurrentMode = ConcurrentMode;
|
1302
|
+
reactIs_development$1.ContextConsumer = ContextConsumer;
|
1303
|
+
reactIs_development$1.ContextProvider = ContextProvider;
|
1304
|
+
reactIs_development$1.Element = Element;
|
1305
|
+
reactIs_development$1.ForwardRef = ForwardRef;
|
1306
|
+
reactIs_development$1.Fragment = Fragment;
|
1307
|
+
reactIs_development$1.Lazy = Lazy;
|
1308
|
+
reactIs_development$1.Memo = Memo;
|
1309
|
+
reactIs_development$1.Portal = Portal;
|
1310
|
+
reactIs_development$1.Profiler = Profiler;
|
1311
|
+
reactIs_development$1.StrictMode = StrictMode;
|
1312
|
+
reactIs_development$1.Suspense = Suspense;
|
1313
|
+
reactIs_development$1.isAsyncMode = isAsyncMode;
|
1314
|
+
reactIs_development$1.isConcurrentMode = isConcurrentMode;
|
1315
|
+
reactIs_development$1.isContextConsumer = isContextConsumer;
|
1316
|
+
reactIs_development$1.isContextProvider = isContextProvider;
|
1317
|
+
reactIs_development$1.isElement = isElement;
|
1318
|
+
reactIs_development$1.isForwardRef = isForwardRef;
|
1319
|
+
reactIs_development$1.isFragment = isFragment;
|
1320
|
+
reactIs_development$1.isLazy = isLazy;
|
1321
|
+
reactIs_development$1.isMemo = isMemo;
|
1322
|
+
reactIs_development$1.isPortal = isPortal;
|
1323
|
+
reactIs_development$1.isProfiler = isProfiler;
|
1324
|
+
reactIs_development$1.isStrictMode = isStrictMode;
|
1325
|
+
reactIs_development$1.isSuspense = isSuspense;
|
1326
|
+
reactIs_development$1.isValidElementType = isValidElementType;
|
1327
|
+
reactIs_development$1.typeOf = typeOf;
|
1324
1328
|
})();
|
1325
1329
|
}
|
1326
1330
|
|
1327
1331
|
if (process.env.NODE_ENV === 'production') {
|
1328
|
-
reactIs.exports = reactIs_production_min;
|
1332
|
+
reactIs$1.exports = reactIs_production_min$1;
|
1329
1333
|
} else {
|
1330
|
-
reactIs.exports = reactIs_development;
|
1334
|
+
reactIs$1.exports = reactIs_development$1;
|
1331
1335
|
}
|
1332
1336
|
|
1333
1337
|
/*
|
@@ -1337,7 +1341,7 @@ object-assign
|
|
1337
1341
|
*/
|
1338
1342
|
/* eslint-disable no-unused-vars */
|
1339
1343
|
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
1340
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
1344
|
+
var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
1341
1345
|
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
1342
1346
|
|
1343
1347
|
function toObject(val) {
|
@@ -1401,7 +1405,7 @@ var objectAssign = shouldUseNative() ? Object.assign : function (target, source)
|
|
1401
1405
|
from = Object(arguments[s]);
|
1402
1406
|
|
1403
1407
|
for (var key in from) {
|
1404
|
-
if (hasOwnProperty.call(from, key)) {
|
1408
|
+
if (hasOwnProperty$1.call(from, key)) {
|
1405
1409
|
to[key] = from[key];
|
1406
1410
|
}
|
1407
1411
|
}
|
@@ -1541,8 +1545,8 @@ var checkPropTypes_1 = checkPropTypes$1;
|
|
1541
1545
|
* LICENSE file in the root directory of this source tree.
|
1542
1546
|
*/
|
1543
1547
|
|
1544
|
-
var ReactIs$1 = reactIs.exports;
|
1545
|
-
var assign = objectAssign;
|
1548
|
+
var ReactIs$1 = reactIs$1.exports;
|
1549
|
+
var assign$1 = objectAssign;
|
1546
1550
|
|
1547
1551
|
var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
|
1548
1552
|
var has = has$2;
|
@@ -1981,7 +1985,7 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
1981
1985
|
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
1982
1986
|
}
|
1983
1987
|
// We need to check all keys in case some are required but missing from props.
|
1984
|
-
var allKeys = assign({}, props[propName], shapeTypes);
|
1988
|
+
var allKeys = assign$1({}, props[propName], shapeTypes);
|
1985
1989
|
for (var key in allKeys) {
|
1986
1990
|
var checker = shapeTypes[key];
|
1987
1991
|
if (has(shapeTypes, key) && typeof checker !== 'function') {
|
@@ -2213,7 +2217,7 @@ var factoryWithThrowingShims = function() {
|
|
2213
2217
|
*/
|
2214
2218
|
|
2215
2219
|
if (process.env.NODE_ENV !== 'production') {
|
2216
|
-
var ReactIs = reactIs.exports;
|
2220
|
+
var ReactIs = reactIs$1.exports;
|
2217
2221
|
|
2218
2222
|
// By explicitly using `prop-types` you are opting into new development behavior.
|
2219
2223
|
// http://fb.me/prop-types-in-prod
|
@@ -2247,6 +2251,298 @@ function formatMuiErrorMessage(code) {
|
|
2247
2251
|
/* eslint-enable prefer-template */
|
2248
2252
|
}
|
2249
2253
|
|
2254
|
+
var reactIs = {exports: {}};
|
2255
|
+
|
2256
|
+
var reactIs_production_min = {};
|
2257
|
+
|
2258
|
+
/**
|
2259
|
+
* @license React
|
2260
|
+
* react-is.production.min.js
|
2261
|
+
*
|
2262
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
2263
|
+
*
|
2264
|
+
* This source code is licensed under the MIT license found in the
|
2265
|
+
* LICENSE file in the root directory of this source tree.
|
2266
|
+
*/
|
2267
|
+
var b=Symbol.for("react.element"),c=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),e=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),h=Symbol.for("react.context"),k=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),n=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),t=Symbol.for("react.offscreen"),u;u=Symbol.for("react.module.reference");
|
2268
|
+
function v(a){if("object"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}reactIs_production_min.ContextConsumer=h;reactIs_production_min.ContextProvider=g;reactIs_production_min.Element=b;reactIs_production_min.ForwardRef=l;reactIs_production_min.Fragment=d;reactIs_production_min.Lazy=q;reactIs_production_min.Memo=p;reactIs_production_min.Portal=c;reactIs_production_min.Profiler=f;reactIs_production_min.StrictMode=e;reactIs_production_min.Suspense=m;
|
2269
|
+
reactIs_production_min.SuspenseList=n;reactIs_production_min.isAsyncMode=function(){return !1};reactIs_production_min.isConcurrentMode=function(){return !1};reactIs_production_min.isContextConsumer=function(a){return v(a)===h};reactIs_production_min.isContextProvider=function(a){return v(a)===g};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===b};reactIs_production_min.isForwardRef=function(a){return v(a)===l};reactIs_production_min.isFragment=function(a){return v(a)===d};reactIs_production_min.isLazy=function(a){return v(a)===q};reactIs_production_min.isMemo=function(a){return v(a)===p};
|
2270
|
+
reactIs_production_min.isPortal=function(a){return v(a)===c};reactIs_production_min.isProfiler=function(a){return v(a)===f};reactIs_production_min.isStrictMode=function(a){return v(a)===e};reactIs_production_min.isSuspense=function(a){return v(a)===m};reactIs_production_min.isSuspenseList=function(a){return v(a)===n};
|
2271
|
+
reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||"object"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};reactIs_production_min.typeOf=v;
|
2272
|
+
|
2273
|
+
var reactIs_development = {};
|
2274
|
+
|
2275
|
+
/**
|
2276
|
+
* @license React
|
2277
|
+
* react-is.development.js
|
2278
|
+
*
|
2279
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
2280
|
+
*
|
2281
|
+
* This source code is licensed under the MIT license found in the
|
2282
|
+
* LICENSE file in the root directory of this source tree.
|
2283
|
+
*/
|
2284
|
+
|
2285
|
+
if (process.env.NODE_ENV !== "production") {
|
2286
|
+
(function() {
|
2287
|
+
|
2288
|
+
// ATTENTION
|
2289
|
+
// When adding new symbols to this file,
|
2290
|
+
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
|
2291
|
+
// The Symbol used to tag the ReactElement-like types.
|
2292
|
+
var REACT_ELEMENT_TYPE = Symbol.for('react.element');
|
2293
|
+
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
2294
|
+
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
2295
|
+
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
|
2296
|
+
var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
|
2297
|
+
var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
|
2298
|
+
var REACT_CONTEXT_TYPE = Symbol.for('react.context');
|
2299
|
+
var REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');
|
2300
|
+
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
|
2301
|
+
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
|
2302
|
+
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
|
2303
|
+
var REACT_MEMO_TYPE = Symbol.for('react.memo');
|
2304
|
+
var REACT_LAZY_TYPE = Symbol.for('react.lazy');
|
2305
|
+
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
|
2306
|
+
|
2307
|
+
// -----------------------------------------------------------------------------
|
2308
|
+
|
2309
|
+
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
2310
|
+
var enableCacheElement = false;
|
2311
|
+
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
2312
|
+
|
2313
|
+
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
2314
|
+
// stuff. Intended to enable React core members to more easily debug scheduling
|
2315
|
+
// issues in DEV builds.
|
2316
|
+
|
2317
|
+
var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
|
2318
|
+
|
2319
|
+
var REACT_MODULE_REFERENCE;
|
2320
|
+
|
2321
|
+
{
|
2322
|
+
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
|
2323
|
+
}
|
2324
|
+
|
2325
|
+
function isValidElementType(type) {
|
2326
|
+
if (typeof type === 'string' || typeof type === 'function') {
|
2327
|
+
return true;
|
2328
|
+
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
|
2329
|
+
|
2330
|
+
|
2331
|
+
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
|
2332
|
+
return true;
|
2333
|
+
}
|
2334
|
+
|
2335
|
+
if (typeof type === 'object' && type !== null) {
|
2336
|
+
if (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 || // This needs to include all possible module reference object
|
2337
|
+
// types supported by any Flight configuration anywhere since
|
2338
|
+
// we don't know which Flight build this will end up being used
|
2339
|
+
// with.
|
2340
|
+
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
|
2341
|
+
return true;
|
2342
|
+
}
|
2343
|
+
}
|
2344
|
+
|
2345
|
+
return false;
|
2346
|
+
}
|
2347
|
+
|
2348
|
+
function typeOf(object) {
|
2349
|
+
if (typeof object === 'object' && object !== null) {
|
2350
|
+
var $$typeof = object.$$typeof;
|
2351
|
+
|
2352
|
+
switch ($$typeof) {
|
2353
|
+
case REACT_ELEMENT_TYPE:
|
2354
|
+
var type = object.type;
|
2355
|
+
|
2356
|
+
switch (type) {
|
2357
|
+
case REACT_FRAGMENT_TYPE:
|
2358
|
+
case REACT_PROFILER_TYPE:
|
2359
|
+
case REACT_STRICT_MODE_TYPE:
|
2360
|
+
case REACT_SUSPENSE_TYPE:
|
2361
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
2362
|
+
return type;
|
2363
|
+
|
2364
|
+
default:
|
2365
|
+
var $$typeofType = type && type.$$typeof;
|
2366
|
+
|
2367
|
+
switch ($$typeofType) {
|
2368
|
+
case REACT_SERVER_CONTEXT_TYPE:
|
2369
|
+
case REACT_CONTEXT_TYPE:
|
2370
|
+
case REACT_FORWARD_REF_TYPE:
|
2371
|
+
case REACT_LAZY_TYPE:
|
2372
|
+
case REACT_MEMO_TYPE:
|
2373
|
+
case REACT_PROVIDER_TYPE:
|
2374
|
+
return $$typeofType;
|
2375
|
+
|
2376
|
+
default:
|
2377
|
+
return $$typeof;
|
2378
|
+
}
|
2379
|
+
|
2380
|
+
}
|
2381
|
+
|
2382
|
+
case REACT_PORTAL_TYPE:
|
2383
|
+
return $$typeof;
|
2384
|
+
}
|
2385
|
+
}
|
2386
|
+
|
2387
|
+
return undefined;
|
2388
|
+
}
|
2389
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
2390
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
2391
|
+
var Element = REACT_ELEMENT_TYPE;
|
2392
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
2393
|
+
var Fragment = REACT_FRAGMENT_TYPE;
|
2394
|
+
var Lazy = REACT_LAZY_TYPE;
|
2395
|
+
var Memo = REACT_MEMO_TYPE;
|
2396
|
+
var Portal = REACT_PORTAL_TYPE;
|
2397
|
+
var Profiler = REACT_PROFILER_TYPE;
|
2398
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
2399
|
+
var Suspense = REACT_SUSPENSE_TYPE;
|
2400
|
+
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
2401
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
2402
|
+
var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
|
2403
|
+
|
2404
|
+
function isAsyncMode(object) {
|
2405
|
+
{
|
2406
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
2407
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
2408
|
+
|
2409
|
+
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
|
2410
|
+
}
|
2411
|
+
}
|
2412
|
+
|
2413
|
+
return false;
|
2414
|
+
}
|
2415
|
+
function isConcurrentMode(object) {
|
2416
|
+
{
|
2417
|
+
if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
|
2418
|
+
hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
|
2419
|
+
|
2420
|
+
console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
|
2421
|
+
}
|
2422
|
+
}
|
2423
|
+
|
2424
|
+
return false;
|
2425
|
+
}
|
2426
|
+
function isContextConsumer(object) {
|
2427
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
2428
|
+
}
|
2429
|
+
function isContextProvider(object) {
|
2430
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
2431
|
+
}
|
2432
|
+
function isElement(object) {
|
2433
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
2434
|
+
}
|
2435
|
+
function isForwardRef(object) {
|
2436
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
2437
|
+
}
|
2438
|
+
function isFragment(object) {
|
2439
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
2440
|
+
}
|
2441
|
+
function isLazy(object) {
|
2442
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
2443
|
+
}
|
2444
|
+
function isMemo(object) {
|
2445
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
2446
|
+
}
|
2447
|
+
function isPortal(object) {
|
2448
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
2449
|
+
}
|
2450
|
+
function isProfiler(object) {
|
2451
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
2452
|
+
}
|
2453
|
+
function isStrictMode(object) {
|
2454
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
2455
|
+
}
|
2456
|
+
function isSuspense(object) {
|
2457
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
2458
|
+
}
|
2459
|
+
function isSuspenseList(object) {
|
2460
|
+
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
|
2461
|
+
}
|
2462
|
+
|
2463
|
+
reactIs_development.ContextConsumer = ContextConsumer;
|
2464
|
+
reactIs_development.ContextProvider = ContextProvider;
|
2465
|
+
reactIs_development.Element = Element;
|
2466
|
+
reactIs_development.ForwardRef = ForwardRef;
|
2467
|
+
reactIs_development.Fragment = Fragment;
|
2468
|
+
reactIs_development.Lazy = Lazy;
|
2469
|
+
reactIs_development.Memo = Memo;
|
2470
|
+
reactIs_development.Portal = Portal;
|
2471
|
+
reactIs_development.Profiler = Profiler;
|
2472
|
+
reactIs_development.StrictMode = StrictMode;
|
2473
|
+
reactIs_development.Suspense = Suspense;
|
2474
|
+
reactIs_development.SuspenseList = SuspenseList;
|
2475
|
+
reactIs_development.isAsyncMode = isAsyncMode;
|
2476
|
+
reactIs_development.isConcurrentMode = isConcurrentMode;
|
2477
|
+
reactIs_development.isContextConsumer = isContextConsumer;
|
2478
|
+
reactIs_development.isContextProvider = isContextProvider;
|
2479
|
+
reactIs_development.isElement = isElement;
|
2480
|
+
reactIs_development.isForwardRef = isForwardRef;
|
2481
|
+
reactIs_development.isFragment = isFragment;
|
2482
|
+
reactIs_development.isLazy = isLazy;
|
2483
|
+
reactIs_development.isMemo = isMemo;
|
2484
|
+
reactIs_development.isPortal = isPortal;
|
2485
|
+
reactIs_development.isProfiler = isProfiler;
|
2486
|
+
reactIs_development.isStrictMode = isStrictMode;
|
2487
|
+
reactIs_development.isSuspense = isSuspense;
|
2488
|
+
reactIs_development.isSuspenseList = isSuspenseList;
|
2489
|
+
reactIs_development.isValidElementType = isValidElementType;
|
2490
|
+
reactIs_development.typeOf = typeOf;
|
2491
|
+
})();
|
2492
|
+
}
|
2493
|
+
|
2494
|
+
if (process.env.NODE_ENV === 'production') {
|
2495
|
+
reactIs.exports = reactIs_production_min;
|
2496
|
+
} else {
|
2497
|
+
reactIs.exports = reactIs_development;
|
2498
|
+
}
|
2499
|
+
|
2500
|
+
// Simplified polyfill for IE11 support
|
2501
|
+
// https://github.com/JamesMGreene/Function.name/blob/58b314d4a983110c3682f1228f845d39ccca1817/Function.name.js#L3
|
2502
|
+
const fnNameMatchRegex = /^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;
|
2503
|
+
function getFunctionName(fn) {
|
2504
|
+
const match = `${fn}`.match(fnNameMatchRegex);
|
2505
|
+
const name = match && match[1];
|
2506
|
+
return name || '';
|
2507
|
+
}
|
2508
|
+
function getFunctionComponentName(Component, fallback = '') {
|
2509
|
+
return Component.displayName || Component.name || getFunctionName(Component) || fallback;
|
2510
|
+
}
|
2511
|
+
function getWrappedName(outerType, innerType, wrapperName) {
|
2512
|
+
const functionName = getFunctionComponentName(innerType);
|
2513
|
+
return outerType.displayName || (functionName !== '' ? `${wrapperName}(${functionName})` : wrapperName);
|
2514
|
+
}
|
2515
|
+
|
2516
|
+
/**
|
2517
|
+
* cherry-pick from
|
2518
|
+
* https://github.com/facebook/react/blob/769b1f270e1251d9dbdce0fcbd9e92e502d059b8/packages/shared/getComponentName.js
|
2519
|
+
* originally forked from recompose/getDisplayName with added IE11 support
|
2520
|
+
*/
|
2521
|
+
function getDisplayName(Component) {
|
2522
|
+
if (Component == null) {
|
2523
|
+
return undefined;
|
2524
|
+
}
|
2525
|
+
if (typeof Component === 'string') {
|
2526
|
+
return Component;
|
2527
|
+
}
|
2528
|
+
if (typeof Component === 'function') {
|
2529
|
+
return getFunctionComponentName(Component, 'Component');
|
2530
|
+
}
|
2531
|
+
|
2532
|
+
// TypeScript can't have components as objects but they exist in the form of `memo` or `Suspense`
|
2533
|
+
if (typeof Component === 'object') {
|
2534
|
+
switch (Component.$$typeof) {
|
2535
|
+
case reactIs.exports.ForwardRef:
|
2536
|
+
return getWrappedName(Component, Component.render, 'ForwardRef');
|
2537
|
+
case reactIs.exports.Memo:
|
2538
|
+
return getWrappedName(Component, Component.type, 'memo');
|
2539
|
+
default:
|
2540
|
+
return undefined;
|
2541
|
+
}
|
2542
|
+
}
|
2543
|
+
return undefined;
|
2544
|
+
}
|
2545
|
+
|
2250
2546
|
// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.
|
2251
2547
|
//
|
2252
2548
|
// A strict capitalization should uppercase the first letter of each word in the sentence.
|
@@ -2258,6 +2554,69 @@ function capitalize(string) {
|
|
2258
2554
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
2259
2555
|
}
|
2260
2556
|
|
2557
|
+
/**
|
2558
|
+
* Add keys, values of `defaultProps` that does not exist in `props`
|
2559
|
+
* @param {object} defaultProps
|
2560
|
+
* @param {object} props
|
2561
|
+
* @returns {object} resolved props
|
2562
|
+
*/
|
2563
|
+
function resolveProps(defaultProps, props) {
|
2564
|
+
const output = {
|
2565
|
+
...props
|
2566
|
+
};
|
2567
|
+
Object.keys(defaultProps).forEach(propName => {
|
2568
|
+
if (propName.toString().match(/^(components|slots)$/)) {
|
2569
|
+
output[propName] = {
|
2570
|
+
...defaultProps[propName],
|
2571
|
+
...output[propName]
|
2572
|
+
};
|
2573
|
+
} else if (propName.toString().match(/^(componentsProps|slotProps)$/)) {
|
2574
|
+
const defaultSlotProps = defaultProps[propName] || {};
|
2575
|
+
const slotProps = props[propName];
|
2576
|
+
output[propName] = {};
|
2577
|
+
if (!slotProps || !Object.keys(slotProps)) {
|
2578
|
+
// Reduce the iteration if the slot props is empty
|
2579
|
+
output[propName] = defaultSlotProps;
|
2580
|
+
} else if (!defaultSlotProps || !Object.keys(defaultSlotProps)) {
|
2581
|
+
// Reduce the iteration if the default slot props is empty
|
2582
|
+
output[propName] = slotProps;
|
2583
|
+
} else {
|
2584
|
+
output[propName] = {
|
2585
|
+
...slotProps
|
2586
|
+
};
|
2587
|
+
Object.keys(defaultSlotProps).forEach(slotPropName => {
|
2588
|
+
output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);
|
2589
|
+
});
|
2590
|
+
}
|
2591
|
+
} else if (output[propName] === undefined) {
|
2592
|
+
output[propName] = defaultProps[propName];
|
2593
|
+
}
|
2594
|
+
});
|
2595
|
+
return output;
|
2596
|
+
}
|
2597
|
+
|
2598
|
+
function composeClasses(slots, getUtilityClass, classes = undefined) {
|
2599
|
+
const output = {};
|
2600
|
+
Object.keys(slots).forEach(
|
2601
|
+
// `Objet.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
|
2602
|
+
// @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
|
2603
|
+
slot => {
|
2604
|
+
output[slot] = slots[slot].reduce((acc, key) => {
|
2605
|
+
if (key) {
|
2606
|
+
const utilityClass = getUtilityClass(key);
|
2607
|
+
if (utilityClass !== '') {
|
2608
|
+
acc.push(utilityClass);
|
2609
|
+
}
|
2610
|
+
if (classes && classes[key]) {
|
2611
|
+
acc.push(classes[key]);
|
2612
|
+
}
|
2613
|
+
}
|
2614
|
+
return acc;
|
2615
|
+
}, []).join(' ');
|
2616
|
+
});
|
2617
|
+
return output;
|
2618
|
+
}
|
2619
|
+
|
2261
2620
|
const defaultGenerator = componentName => componentName;
|
2262
2621
|
const createClassNameGenerator = () => {
|
2263
2622
|
let generate = defaultGenerator;
|
@@ -2294,6 +2653,16 @@ function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {
|
|
2294
2653
|
return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator$1.generate(componentName)}-${slot}`;
|
2295
2654
|
}
|
2296
2655
|
|
2656
|
+
function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {
|
2657
|
+
const result = {};
|
2658
|
+
slots.forEach(slot => {
|
2659
|
+
result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);
|
2660
|
+
});
|
2661
|
+
return result;
|
2662
|
+
}
|
2663
|
+
|
2664
|
+
var THEME_ID = '$$material';
|
2665
|
+
|
2297
2666
|
function _extends() {
|
2298
2667
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
2299
2668
|
for (var i = 1; i < arguments.length; i++) {
|
@@ -2322,11 +2691,2281 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
2322
2691
|
return target;
|
2323
2692
|
}
|
2324
2693
|
|
2325
|
-
|
2326
|
-
|
2327
|
-
|
2328
|
-
|
2329
|
-
|
2694
|
+
function memoize$1(fn) {
|
2695
|
+
var cache = Object.create(null);
|
2696
|
+
return function (arg) {
|
2697
|
+
if (cache[arg] === undefined) cache[arg] = fn(arg);
|
2698
|
+
return cache[arg];
|
2699
|
+
};
|
2700
|
+
}
|
2701
|
+
|
2702
|
+
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
|
2703
|
+
|
2704
|
+
var isPropValid = /* #__PURE__ */memoize$1(function (prop) {
|
2705
|
+
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
|
2706
|
+
/* o */
|
2707
|
+
&& prop.charCodeAt(1) === 110
|
2708
|
+
/* n */
|
2709
|
+
&& prop.charCodeAt(2) < 91;
|
2710
|
+
}
|
2711
|
+
/* Z+1 */
|
2712
|
+
);
|
2713
|
+
|
2714
|
+
/*
|
2715
|
+
|
2716
|
+
Based off glamor's StyleSheet, thanks Sunil ❤️
|
2717
|
+
|
2718
|
+
high performance StyleSheet for css-in-js systems
|
2719
|
+
|
2720
|
+
- uses multiple style tags behind the scenes for millions of rules
|
2721
|
+
- uses `insertRule` for appending in production for *much* faster performance
|
2722
|
+
|
2723
|
+
// usage
|
2724
|
+
|
2725
|
+
import { StyleSheet } from '@emotion/sheet'
|
2726
|
+
|
2727
|
+
let styleSheet = new StyleSheet({ key: '', container: document.head })
|
2728
|
+
|
2729
|
+
styleSheet.insert('#box { border: 1px solid red; }')
|
2730
|
+
- appends a css rule into the stylesheet
|
2731
|
+
|
2732
|
+
styleSheet.flush()
|
2733
|
+
- empties the stylesheet of all its contents
|
2734
|
+
|
2735
|
+
*/
|
2736
|
+
// $FlowFixMe
|
2737
|
+
function sheetForTag(tag) {
|
2738
|
+
if (tag.sheet) {
|
2739
|
+
// $FlowFixMe
|
2740
|
+
return tag.sheet;
|
2741
|
+
} // this weirdness brought to you by firefox
|
2742
|
+
|
2743
|
+
/* istanbul ignore next */
|
2744
|
+
|
2745
|
+
|
2746
|
+
for (var i = 0; i < document.styleSheets.length; i++) {
|
2747
|
+
if (document.styleSheets[i].ownerNode === tag) {
|
2748
|
+
// $FlowFixMe
|
2749
|
+
return document.styleSheets[i];
|
2750
|
+
}
|
2751
|
+
}
|
2752
|
+
}
|
2753
|
+
|
2754
|
+
function createStyleElement(options) {
|
2755
|
+
var tag = document.createElement('style');
|
2756
|
+
tag.setAttribute('data-emotion', options.key);
|
2757
|
+
|
2758
|
+
if (options.nonce !== undefined) {
|
2759
|
+
tag.setAttribute('nonce', options.nonce);
|
2760
|
+
}
|
2761
|
+
|
2762
|
+
tag.appendChild(document.createTextNode(''));
|
2763
|
+
tag.setAttribute('data-s', '');
|
2764
|
+
return tag;
|
2765
|
+
}
|
2766
|
+
|
2767
|
+
var StyleSheet = /*#__PURE__*/function () {
|
2768
|
+
// Using Node instead of HTMLElement since container may be a ShadowRoot
|
2769
|
+
function StyleSheet(options) {
|
2770
|
+
var _this = this;
|
2771
|
+
|
2772
|
+
this._insertTag = function (tag) {
|
2773
|
+
var before;
|
2774
|
+
|
2775
|
+
if (_this.tags.length === 0) {
|
2776
|
+
if (_this.insertionPoint) {
|
2777
|
+
before = _this.insertionPoint.nextSibling;
|
2778
|
+
} else if (_this.prepend) {
|
2779
|
+
before = _this.container.firstChild;
|
2780
|
+
} else {
|
2781
|
+
before = _this.before;
|
2782
|
+
}
|
2783
|
+
} else {
|
2784
|
+
before = _this.tags[_this.tags.length - 1].nextSibling;
|
2785
|
+
}
|
2786
|
+
|
2787
|
+
_this.container.insertBefore(tag, before);
|
2788
|
+
|
2789
|
+
_this.tags.push(tag);
|
2790
|
+
};
|
2791
|
+
|
2792
|
+
this.isSpeedy = options.speedy === undefined ? process.env.NODE_ENV === 'production' : options.speedy;
|
2793
|
+
this.tags = [];
|
2794
|
+
this.ctr = 0;
|
2795
|
+
this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets
|
2796
|
+
|
2797
|
+
this.key = options.key;
|
2798
|
+
this.container = options.container;
|
2799
|
+
this.prepend = options.prepend;
|
2800
|
+
this.insertionPoint = options.insertionPoint;
|
2801
|
+
this.before = null;
|
2802
|
+
}
|
2803
|
+
|
2804
|
+
var _proto = StyleSheet.prototype;
|
2805
|
+
|
2806
|
+
_proto.hydrate = function hydrate(nodes) {
|
2807
|
+
nodes.forEach(this._insertTag);
|
2808
|
+
};
|
2809
|
+
|
2810
|
+
_proto.insert = function insert(rule) {
|
2811
|
+
// the max length is how many rules we have per style tag, it's 65000 in speedy mode
|
2812
|
+
// it's 1 in dev because we insert source maps that map a single rule to a location
|
2813
|
+
// and you can only have one source map per style tag
|
2814
|
+
if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {
|
2815
|
+
this._insertTag(createStyleElement(this));
|
2816
|
+
}
|
2817
|
+
|
2818
|
+
var tag = this.tags[this.tags.length - 1];
|
2819
|
+
|
2820
|
+
if (process.env.NODE_ENV !== 'production') {
|
2821
|
+
var isImportRule = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105;
|
2822
|
+
|
2823
|
+
if (isImportRule && this._alreadyInsertedOrderInsensitiveRule) {
|
2824
|
+
// this would only cause problem in speedy mode
|
2825
|
+
// but we don't want enabling speedy to affect the observable behavior
|
2826
|
+
// so we report this error at all times
|
2827
|
+
console.error("You're attempting to insert the following rule:\n" + rule + '\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules.');
|
2828
|
+
}
|
2829
|
+
this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule;
|
2830
|
+
}
|
2831
|
+
|
2832
|
+
if (this.isSpeedy) {
|
2833
|
+
var sheet = sheetForTag(tag);
|
2834
|
+
|
2835
|
+
try {
|
2836
|
+
// this is the ultrafast version, works across browsers
|
2837
|
+
// the big drawback is that the css won't be editable in devtools
|
2838
|
+
sheet.insertRule(rule, sheet.cssRules.length);
|
2839
|
+
} catch (e) {
|
2840
|
+
if (process.env.NODE_ENV !== 'production' && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(rule)) {
|
2841
|
+
console.error("There was a problem inserting the following rule: \"" + rule + "\"", e);
|
2842
|
+
}
|
2843
|
+
}
|
2844
|
+
} else {
|
2845
|
+
tag.appendChild(document.createTextNode(rule));
|
2846
|
+
}
|
2847
|
+
|
2848
|
+
this.ctr++;
|
2849
|
+
};
|
2850
|
+
|
2851
|
+
_proto.flush = function flush() {
|
2852
|
+
// $FlowFixMe
|
2853
|
+
this.tags.forEach(function (tag) {
|
2854
|
+
return tag.parentNode && tag.parentNode.removeChild(tag);
|
2855
|
+
});
|
2856
|
+
this.tags = [];
|
2857
|
+
this.ctr = 0;
|
2858
|
+
|
2859
|
+
if (process.env.NODE_ENV !== 'production') {
|
2860
|
+
this._alreadyInsertedOrderInsensitiveRule = false;
|
2861
|
+
}
|
2862
|
+
};
|
2863
|
+
|
2864
|
+
return StyleSheet;
|
2865
|
+
}();
|
2866
|
+
|
2867
|
+
var MS = '-ms-';
|
2868
|
+
var MOZ = '-moz-';
|
2869
|
+
var WEBKIT = '-webkit-';
|
2870
|
+
|
2871
|
+
var COMMENT = 'comm';
|
2872
|
+
var RULESET = 'rule';
|
2873
|
+
var DECLARATION = 'decl';
|
2874
|
+
var IMPORT = '@import';
|
2875
|
+
var KEYFRAMES = '@keyframes';
|
2876
|
+
var LAYER = '@layer';
|
2877
|
+
|
2878
|
+
/**
|
2879
|
+
* @param {number}
|
2880
|
+
* @return {number}
|
2881
|
+
*/
|
2882
|
+
var abs = Math.abs;
|
2883
|
+
|
2884
|
+
/**
|
2885
|
+
* @param {number}
|
2886
|
+
* @return {string}
|
2887
|
+
*/
|
2888
|
+
var from = String.fromCharCode;
|
2889
|
+
|
2890
|
+
/**
|
2891
|
+
* @param {object}
|
2892
|
+
* @return {object}
|
2893
|
+
*/
|
2894
|
+
var assign = Object.assign;
|
2895
|
+
|
2896
|
+
/**
|
2897
|
+
* @param {string} value
|
2898
|
+
* @param {number} length
|
2899
|
+
* @return {number}
|
2900
|
+
*/
|
2901
|
+
function hash (value, length) {
|
2902
|
+
return charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0
|
2903
|
+
}
|
2904
|
+
|
2905
|
+
/**
|
2906
|
+
* @param {string} value
|
2907
|
+
* @return {string}
|
2908
|
+
*/
|
2909
|
+
function trim (value) {
|
2910
|
+
return value.trim()
|
2911
|
+
}
|
2912
|
+
|
2913
|
+
/**
|
2914
|
+
* @param {string} value
|
2915
|
+
* @param {RegExp} pattern
|
2916
|
+
* @return {string?}
|
2917
|
+
*/
|
2918
|
+
function match (value, pattern) {
|
2919
|
+
return (value = pattern.exec(value)) ? value[0] : value
|
2920
|
+
}
|
2921
|
+
|
2922
|
+
/**
|
2923
|
+
* @param {string} value
|
2924
|
+
* @param {(string|RegExp)} pattern
|
2925
|
+
* @param {string} replacement
|
2926
|
+
* @return {string}
|
2927
|
+
*/
|
2928
|
+
function replace (value, pattern, replacement) {
|
2929
|
+
return value.replace(pattern, replacement)
|
2930
|
+
}
|
2931
|
+
|
2932
|
+
/**
|
2933
|
+
* @param {string} value
|
2934
|
+
* @param {string} search
|
2935
|
+
* @return {number}
|
2936
|
+
*/
|
2937
|
+
function indexof (value, search) {
|
2938
|
+
return value.indexOf(search)
|
2939
|
+
}
|
2940
|
+
|
2941
|
+
/**
|
2942
|
+
* @param {string} value
|
2943
|
+
* @param {number} index
|
2944
|
+
* @return {number}
|
2945
|
+
*/
|
2946
|
+
function charat (value, index) {
|
2947
|
+
return value.charCodeAt(index) | 0
|
2948
|
+
}
|
2949
|
+
|
2950
|
+
/**
|
2951
|
+
* @param {string} value
|
2952
|
+
* @param {number} begin
|
2953
|
+
* @param {number} end
|
2954
|
+
* @return {string}
|
2955
|
+
*/
|
2956
|
+
function substr (value, begin, end) {
|
2957
|
+
return value.slice(begin, end)
|
2958
|
+
}
|
2959
|
+
|
2960
|
+
/**
|
2961
|
+
* @param {string} value
|
2962
|
+
* @return {number}
|
2963
|
+
*/
|
2964
|
+
function strlen (value) {
|
2965
|
+
return value.length
|
2966
|
+
}
|
2967
|
+
|
2968
|
+
/**
|
2969
|
+
* @param {any[]} value
|
2970
|
+
* @return {number}
|
2971
|
+
*/
|
2972
|
+
function sizeof (value) {
|
2973
|
+
return value.length
|
2974
|
+
}
|
2975
|
+
|
2976
|
+
/**
|
2977
|
+
* @param {any} value
|
2978
|
+
* @param {any[]} array
|
2979
|
+
* @return {any}
|
2980
|
+
*/
|
2981
|
+
function append (value, array) {
|
2982
|
+
return array.push(value), value
|
2983
|
+
}
|
2984
|
+
|
2985
|
+
/**
|
2986
|
+
* @param {string[]} array
|
2987
|
+
* @param {function} callback
|
2988
|
+
* @return {string}
|
2989
|
+
*/
|
2990
|
+
function combine (array, callback) {
|
2991
|
+
return array.map(callback).join('')
|
2992
|
+
}
|
2993
|
+
|
2994
|
+
var line = 1;
|
2995
|
+
var column = 1;
|
2996
|
+
var length = 0;
|
2997
|
+
var position = 0;
|
2998
|
+
var character = 0;
|
2999
|
+
var characters = '';
|
3000
|
+
|
3001
|
+
/**
|
3002
|
+
* @param {string} value
|
3003
|
+
* @param {object | null} root
|
3004
|
+
* @param {object | null} parent
|
3005
|
+
* @param {string} type
|
3006
|
+
* @param {string[] | string} props
|
3007
|
+
* @param {object[] | string} children
|
3008
|
+
* @param {number} length
|
3009
|
+
*/
|
3010
|
+
function node (value, root, parent, type, props, children, length) {
|
3011
|
+
return {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}
|
3012
|
+
}
|
3013
|
+
|
3014
|
+
/**
|
3015
|
+
* @param {object} root
|
3016
|
+
* @param {object} props
|
3017
|
+
* @return {object}
|
3018
|
+
*/
|
3019
|
+
function copy (root, props) {
|
3020
|
+
return assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)
|
3021
|
+
}
|
3022
|
+
|
3023
|
+
/**
|
3024
|
+
* @return {number}
|
3025
|
+
*/
|
3026
|
+
function char () {
|
3027
|
+
return character
|
3028
|
+
}
|
3029
|
+
|
3030
|
+
/**
|
3031
|
+
* @return {number}
|
3032
|
+
*/
|
3033
|
+
function prev () {
|
3034
|
+
character = position > 0 ? charat(characters, --position) : 0;
|
3035
|
+
|
3036
|
+
if (column--, character === 10)
|
3037
|
+
column = 1, line--;
|
3038
|
+
|
3039
|
+
return character
|
3040
|
+
}
|
3041
|
+
|
3042
|
+
/**
|
3043
|
+
* @return {number}
|
3044
|
+
*/
|
3045
|
+
function next () {
|
3046
|
+
character = position < length ? charat(characters, position++) : 0;
|
3047
|
+
|
3048
|
+
if (column++, character === 10)
|
3049
|
+
column = 1, line++;
|
3050
|
+
|
3051
|
+
return character
|
3052
|
+
}
|
3053
|
+
|
3054
|
+
/**
|
3055
|
+
* @return {number}
|
3056
|
+
*/
|
3057
|
+
function peek () {
|
3058
|
+
return charat(characters, position)
|
3059
|
+
}
|
3060
|
+
|
3061
|
+
/**
|
3062
|
+
* @return {number}
|
3063
|
+
*/
|
3064
|
+
function caret () {
|
3065
|
+
return position
|
3066
|
+
}
|
3067
|
+
|
3068
|
+
/**
|
3069
|
+
* @param {number} begin
|
3070
|
+
* @param {number} end
|
3071
|
+
* @return {string}
|
3072
|
+
*/
|
3073
|
+
function slice (begin, end) {
|
3074
|
+
return substr(characters, begin, end)
|
3075
|
+
}
|
3076
|
+
|
3077
|
+
/**
|
3078
|
+
* @param {number} type
|
3079
|
+
* @return {number}
|
3080
|
+
*/
|
3081
|
+
function token (type) {
|
3082
|
+
switch (type) {
|
3083
|
+
// \0 \t \n \r \s whitespace token
|
3084
|
+
case 0: case 9: case 10: case 13: case 32:
|
3085
|
+
return 5
|
3086
|
+
// ! + , / > @ ~ isolate token
|
3087
|
+
case 33: case 43: case 44: case 47: case 62: case 64: case 126:
|
3088
|
+
// ; { } breakpoint token
|
3089
|
+
case 59: case 123: case 125:
|
3090
|
+
return 4
|
3091
|
+
// : accompanied token
|
3092
|
+
case 58:
|
3093
|
+
return 3
|
3094
|
+
// " ' ( [ opening delimit token
|
3095
|
+
case 34: case 39: case 40: case 91:
|
3096
|
+
return 2
|
3097
|
+
// ) ] closing delimit token
|
3098
|
+
case 41: case 93:
|
3099
|
+
return 1
|
3100
|
+
}
|
3101
|
+
|
3102
|
+
return 0
|
3103
|
+
}
|
3104
|
+
|
3105
|
+
/**
|
3106
|
+
* @param {string} value
|
3107
|
+
* @return {any[]}
|
3108
|
+
*/
|
3109
|
+
function alloc (value) {
|
3110
|
+
return line = column = 1, length = strlen(characters = value), position = 0, []
|
3111
|
+
}
|
3112
|
+
|
3113
|
+
/**
|
3114
|
+
* @param {any} value
|
3115
|
+
* @return {any}
|
3116
|
+
*/
|
3117
|
+
function dealloc (value) {
|
3118
|
+
return characters = '', value
|
3119
|
+
}
|
3120
|
+
|
3121
|
+
/**
|
3122
|
+
* @param {number} type
|
3123
|
+
* @return {string}
|
3124
|
+
*/
|
3125
|
+
function delimit (type) {
|
3126
|
+
return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))
|
3127
|
+
}
|
3128
|
+
|
3129
|
+
/**
|
3130
|
+
* @param {number} type
|
3131
|
+
* @return {string}
|
3132
|
+
*/
|
3133
|
+
function whitespace (type) {
|
3134
|
+
while (character = peek())
|
3135
|
+
if (character < 33)
|
3136
|
+
next();
|
3137
|
+
else
|
3138
|
+
break
|
3139
|
+
|
3140
|
+
return token(type) > 2 || token(character) > 3 ? '' : ' '
|
3141
|
+
}
|
3142
|
+
|
3143
|
+
/**
|
3144
|
+
* @param {number} index
|
3145
|
+
* @param {number} count
|
3146
|
+
* @return {string}
|
3147
|
+
*/
|
3148
|
+
function escaping (index, count) {
|
3149
|
+
while (--count && next())
|
3150
|
+
// not 0-9 A-F a-f
|
3151
|
+
if (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))
|
3152
|
+
break
|
3153
|
+
|
3154
|
+
return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))
|
3155
|
+
}
|
3156
|
+
|
3157
|
+
/**
|
3158
|
+
* @param {number} type
|
3159
|
+
* @return {number}
|
3160
|
+
*/
|
3161
|
+
function delimiter (type) {
|
3162
|
+
while (next())
|
3163
|
+
switch (character) {
|
3164
|
+
// ] ) " '
|
3165
|
+
case type:
|
3166
|
+
return position
|
3167
|
+
// " '
|
3168
|
+
case 34: case 39:
|
3169
|
+
if (type !== 34 && type !== 39)
|
3170
|
+
delimiter(character);
|
3171
|
+
break
|
3172
|
+
// (
|
3173
|
+
case 40:
|
3174
|
+
if (type === 41)
|
3175
|
+
delimiter(type);
|
3176
|
+
break
|
3177
|
+
// \
|
3178
|
+
case 92:
|
3179
|
+
next();
|
3180
|
+
break
|
3181
|
+
}
|
3182
|
+
|
3183
|
+
return position
|
3184
|
+
}
|
3185
|
+
|
3186
|
+
/**
|
3187
|
+
* @param {number} type
|
3188
|
+
* @param {number} index
|
3189
|
+
* @return {number}
|
3190
|
+
*/
|
3191
|
+
function commenter (type, index) {
|
3192
|
+
while (next())
|
3193
|
+
// //
|
3194
|
+
if (type + character === 47 + 10)
|
3195
|
+
break
|
3196
|
+
// /*
|
3197
|
+
else if (type + character === 42 + 42 && peek() === 47)
|
3198
|
+
break
|
3199
|
+
|
3200
|
+
return '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())
|
3201
|
+
}
|
3202
|
+
|
3203
|
+
/**
|
3204
|
+
* @param {number} index
|
3205
|
+
* @return {string}
|
3206
|
+
*/
|
3207
|
+
function identifier (index) {
|
3208
|
+
while (!token(peek()))
|
3209
|
+
next();
|
3210
|
+
|
3211
|
+
return slice(index, position)
|
3212
|
+
}
|
3213
|
+
|
3214
|
+
/**
|
3215
|
+
* @param {string} value
|
3216
|
+
* @return {object[]}
|
3217
|
+
*/
|
3218
|
+
function compile (value) {
|
3219
|
+
return dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))
|
3220
|
+
}
|
3221
|
+
|
3222
|
+
/**
|
3223
|
+
* @param {string} value
|
3224
|
+
* @param {object} root
|
3225
|
+
* @param {object?} parent
|
3226
|
+
* @param {string[]} rule
|
3227
|
+
* @param {string[]} rules
|
3228
|
+
* @param {string[]} rulesets
|
3229
|
+
* @param {number[]} pseudo
|
3230
|
+
* @param {number[]} points
|
3231
|
+
* @param {string[]} declarations
|
3232
|
+
* @return {object}
|
3233
|
+
*/
|
3234
|
+
function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
|
3235
|
+
var index = 0;
|
3236
|
+
var offset = 0;
|
3237
|
+
var length = pseudo;
|
3238
|
+
var atrule = 0;
|
3239
|
+
var property = 0;
|
3240
|
+
var previous = 0;
|
3241
|
+
var variable = 1;
|
3242
|
+
var scanning = 1;
|
3243
|
+
var ampersand = 1;
|
3244
|
+
var character = 0;
|
3245
|
+
var type = '';
|
3246
|
+
var props = rules;
|
3247
|
+
var children = rulesets;
|
3248
|
+
var reference = rule;
|
3249
|
+
var characters = type;
|
3250
|
+
|
3251
|
+
while (scanning)
|
3252
|
+
switch (previous = character, character = next()) {
|
3253
|
+
// (
|
3254
|
+
case 40:
|
3255
|
+
if (previous != 108 && charat(characters, length - 1) == 58) {
|
3256
|
+
if (indexof(characters += replace(delimit(character), '&', '&\f'), '&\f') != -1)
|
3257
|
+
ampersand = -1;
|
3258
|
+
break
|
3259
|
+
}
|
3260
|
+
// " ' [
|
3261
|
+
case 34: case 39: case 91:
|
3262
|
+
characters += delimit(character);
|
3263
|
+
break
|
3264
|
+
// \t \n \r \s
|
3265
|
+
case 9: case 10: case 13: case 32:
|
3266
|
+
characters += whitespace(previous);
|
3267
|
+
break
|
3268
|
+
// \
|
3269
|
+
case 92:
|
3270
|
+
characters += escaping(caret() - 1, 7);
|
3271
|
+
continue
|
3272
|
+
// /
|
3273
|
+
case 47:
|
3274
|
+
switch (peek()) {
|
3275
|
+
case 42: case 47:
|
3276
|
+
append(comment(commenter(next(), caret()), root, parent), declarations);
|
3277
|
+
break
|
3278
|
+
default:
|
3279
|
+
characters += '/';
|
3280
|
+
}
|
3281
|
+
break
|
3282
|
+
// {
|
3283
|
+
case 123 * variable:
|
3284
|
+
points[index++] = strlen(characters) * ampersand;
|
3285
|
+
// } ; \0
|
3286
|
+
case 125 * variable: case 59: case 0:
|
3287
|
+
switch (character) {
|
3288
|
+
// \0 }
|
3289
|
+
case 0: case 125: scanning = 0;
|
3290
|
+
// ;
|
3291
|
+
case 59 + offset: if (ampersand == -1) characters = replace(characters, /\f/g, '');
|
3292
|
+
if (property > 0 && (strlen(characters) - length))
|
3293
|
+
append(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations);
|
3294
|
+
break
|
3295
|
+
// @ ;
|
3296
|
+
case 59: characters += ';';
|
3297
|
+
// { rule/at-rule
|
3298
|
+
default:
|
3299
|
+
append(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets);
|
3300
|
+
|
3301
|
+
if (character === 123)
|
3302
|
+
if (offset === 0)
|
3303
|
+
parse(characters, root, reference, reference, props, rulesets, length, points, children);
|
3304
|
+
else
|
3305
|
+
switch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {
|
3306
|
+
// d l m s
|
3307
|
+
case 100: case 108: case 109: case 115:
|
3308
|
+
parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children);
|
3309
|
+
break
|
3310
|
+
default:
|
3311
|
+
parse(characters, reference, reference, reference, [''], children, 0, points, children);
|
3312
|
+
}
|
3313
|
+
}
|
3314
|
+
|
3315
|
+
index = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo;
|
3316
|
+
break
|
3317
|
+
// :
|
3318
|
+
case 58:
|
3319
|
+
length = 1 + strlen(characters), property = previous;
|
3320
|
+
default:
|
3321
|
+
if (variable < 1)
|
3322
|
+
if (character == 123)
|
3323
|
+
--variable;
|
3324
|
+
else if (character == 125 && variable++ == 0 && prev() == 125)
|
3325
|
+
continue
|
3326
|
+
|
3327
|
+
switch (characters += from(character), character * variable) {
|
3328
|
+
// &
|
3329
|
+
case 38:
|
3330
|
+
ampersand = offset > 0 ? 1 : (characters += '\f', -1);
|
3331
|
+
break
|
3332
|
+
// ,
|
3333
|
+
case 44:
|
3334
|
+
points[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1;
|
3335
|
+
break
|
3336
|
+
// @
|
3337
|
+
case 64:
|
3338
|
+
// -
|
3339
|
+
if (peek() === 45)
|
3340
|
+
characters += delimit(next());
|
3341
|
+
|
3342
|
+
atrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++;
|
3343
|
+
break
|
3344
|
+
// -
|
3345
|
+
case 45:
|
3346
|
+
if (previous === 45 && strlen(characters) == 2)
|
3347
|
+
variable = 0;
|
3348
|
+
}
|
3349
|
+
}
|
3350
|
+
|
3351
|
+
return rulesets
|
3352
|
+
}
|
3353
|
+
|
3354
|
+
/**
|
3355
|
+
* @param {string} value
|
3356
|
+
* @param {object} root
|
3357
|
+
* @param {object?} parent
|
3358
|
+
* @param {number} index
|
3359
|
+
* @param {number} offset
|
3360
|
+
* @param {string[]} rules
|
3361
|
+
* @param {number[]} points
|
3362
|
+
* @param {string} type
|
3363
|
+
* @param {string[]} props
|
3364
|
+
* @param {string[]} children
|
3365
|
+
* @param {number} length
|
3366
|
+
* @return {object}
|
3367
|
+
*/
|
3368
|
+
function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length) {
|
3369
|
+
var post = offset - 1;
|
3370
|
+
var rule = offset === 0 ? rules : [''];
|
3371
|
+
var size = sizeof(rule);
|
3372
|
+
|
3373
|
+
for (var i = 0, j = 0, k = 0; i < index; ++i)
|
3374
|
+
for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)
|
3375
|
+
if (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\f/g, rule[x])))
|
3376
|
+
props[k++] = z;
|
3377
|
+
|
3378
|
+
return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length)
|
3379
|
+
}
|
3380
|
+
|
3381
|
+
/**
|
3382
|
+
* @param {number} value
|
3383
|
+
* @param {object} root
|
3384
|
+
* @param {object?} parent
|
3385
|
+
* @return {object}
|
3386
|
+
*/
|
3387
|
+
function comment (value, root, parent) {
|
3388
|
+
return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0)
|
3389
|
+
}
|
3390
|
+
|
3391
|
+
/**
|
3392
|
+
* @param {string} value
|
3393
|
+
* @param {object} root
|
3394
|
+
* @param {object?} parent
|
3395
|
+
* @param {number} length
|
3396
|
+
* @return {object}
|
3397
|
+
*/
|
3398
|
+
function declaration (value, root, parent, length) {
|
3399
|
+
return node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length)
|
3400
|
+
}
|
3401
|
+
|
3402
|
+
/**
|
3403
|
+
* @param {object[]} children
|
3404
|
+
* @param {function} callback
|
3405
|
+
* @return {string}
|
3406
|
+
*/
|
3407
|
+
function serialize (children, callback) {
|
3408
|
+
var output = '';
|
3409
|
+
var length = sizeof(children);
|
3410
|
+
|
3411
|
+
for (var i = 0; i < length; i++)
|
3412
|
+
output += callback(children[i], i, children, callback) || '';
|
3413
|
+
|
3414
|
+
return output
|
3415
|
+
}
|
3416
|
+
|
3417
|
+
/**
|
3418
|
+
* @param {object} element
|
3419
|
+
* @param {number} index
|
3420
|
+
* @param {object[]} children
|
3421
|
+
* @param {function} callback
|
3422
|
+
* @return {string}
|
3423
|
+
*/
|
3424
|
+
function stringify (element, index, children, callback) {
|
3425
|
+
switch (element.type) {
|
3426
|
+
case LAYER: if (element.children.length) break
|
3427
|
+
case IMPORT: case DECLARATION: return element.return = element.return || element.value
|
3428
|
+
case COMMENT: return ''
|
3429
|
+
case KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'
|
3430
|
+
case RULESET: element.value = element.props.join(',');
|
3431
|
+
}
|
3432
|
+
|
3433
|
+
return strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''
|
3434
|
+
}
|
3435
|
+
|
3436
|
+
/**
|
3437
|
+
* @param {function[]} collection
|
3438
|
+
* @return {function}
|
3439
|
+
*/
|
3440
|
+
function middleware (collection) {
|
3441
|
+
var length = sizeof(collection);
|
3442
|
+
|
3443
|
+
return function (element, index, children, callback) {
|
3444
|
+
var output = '';
|
3445
|
+
|
3446
|
+
for (var i = 0; i < length; i++)
|
3447
|
+
output += collection[i](element, index, children, callback) || '';
|
3448
|
+
|
3449
|
+
return output
|
3450
|
+
}
|
3451
|
+
}
|
3452
|
+
|
3453
|
+
/**
|
3454
|
+
* @param {function} callback
|
3455
|
+
* @return {function}
|
3456
|
+
*/
|
3457
|
+
function rulesheet (callback) {
|
3458
|
+
return function (element) {
|
3459
|
+
if (!element.root)
|
3460
|
+
if (element = element.return)
|
3461
|
+
callback(element);
|
3462
|
+
}
|
3463
|
+
}
|
3464
|
+
|
3465
|
+
var weakMemoize = function weakMemoize(func) {
|
3466
|
+
// $FlowFixMe flow doesn't include all non-primitive types as allowed for weakmaps
|
3467
|
+
var cache = new WeakMap();
|
3468
|
+
return function (arg) {
|
3469
|
+
if (cache.has(arg)) {
|
3470
|
+
// $FlowFixMe
|
3471
|
+
return cache.get(arg);
|
3472
|
+
}
|
3473
|
+
|
3474
|
+
var ret = func(arg);
|
3475
|
+
cache.set(arg, ret);
|
3476
|
+
return ret;
|
3477
|
+
};
|
3478
|
+
};
|
3479
|
+
|
3480
|
+
var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
|
3481
|
+
var previous = 0;
|
3482
|
+
var character = 0;
|
3483
|
+
|
3484
|
+
while (true) {
|
3485
|
+
previous = character;
|
3486
|
+
character = peek(); // &\f
|
3487
|
+
|
3488
|
+
if (previous === 38 && character === 12) {
|
3489
|
+
points[index] = 1;
|
3490
|
+
}
|
3491
|
+
|
3492
|
+
if (token(character)) {
|
3493
|
+
break;
|
3494
|
+
}
|
3495
|
+
|
3496
|
+
next();
|
3497
|
+
}
|
3498
|
+
|
3499
|
+
return slice(begin, position);
|
3500
|
+
};
|
3501
|
+
|
3502
|
+
var toRules = function toRules(parsed, points) {
|
3503
|
+
// pretend we've started with a comma
|
3504
|
+
var index = -1;
|
3505
|
+
var character = 44;
|
3506
|
+
|
3507
|
+
do {
|
3508
|
+
switch (token(character)) {
|
3509
|
+
case 0:
|
3510
|
+
// &\f
|
3511
|
+
if (character === 38 && peek() === 12) {
|
3512
|
+
// this is not 100% correct, we don't account for literal sequences here - like for example quoted strings
|
3513
|
+
// stylis inserts \f after & to know when & where it should replace this sequence with the context selector
|
3514
|
+
// and when it should just concatenate the outer and inner selectors
|
3515
|
+
// it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here
|
3516
|
+
points[index] = 1;
|
3517
|
+
}
|
3518
|
+
|
3519
|
+
parsed[index] += identifierWithPointTracking(position - 1, points, index);
|
3520
|
+
break;
|
3521
|
+
|
3522
|
+
case 2:
|
3523
|
+
parsed[index] += delimit(character);
|
3524
|
+
break;
|
3525
|
+
|
3526
|
+
case 4:
|
3527
|
+
// comma
|
3528
|
+
if (character === 44) {
|
3529
|
+
// colon
|
3530
|
+
parsed[++index] = peek() === 58 ? '&\f' : '';
|
3531
|
+
points[index] = parsed[index].length;
|
3532
|
+
break;
|
3533
|
+
}
|
3534
|
+
|
3535
|
+
// fallthrough
|
3536
|
+
|
3537
|
+
default:
|
3538
|
+
parsed[index] += from(character);
|
3539
|
+
}
|
3540
|
+
} while (character = next());
|
3541
|
+
|
3542
|
+
return parsed;
|
3543
|
+
};
|
3544
|
+
|
3545
|
+
var getRules = function getRules(value, points) {
|
3546
|
+
return dealloc(toRules(alloc(value), points));
|
3547
|
+
}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11
|
3548
|
+
|
3549
|
+
|
3550
|
+
var fixedElements = /* #__PURE__ */new WeakMap();
|
3551
|
+
var compat = function compat(element) {
|
3552
|
+
if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo
|
3553
|
+
// negative .length indicates that this rule has been already prefixed
|
3554
|
+
element.length < 1) {
|
3555
|
+
return;
|
3556
|
+
}
|
3557
|
+
|
3558
|
+
var value = element.value,
|
3559
|
+
parent = element.parent;
|
3560
|
+
var isImplicitRule = element.column === parent.column && element.line === parent.line;
|
3561
|
+
|
3562
|
+
while (parent.type !== 'rule') {
|
3563
|
+
parent = parent.parent;
|
3564
|
+
if (!parent) return;
|
3565
|
+
} // short-circuit for the simplest case
|
3566
|
+
|
3567
|
+
|
3568
|
+
if (element.props.length === 1 && value.charCodeAt(0) !== 58
|
3569
|
+
/* colon */
|
3570
|
+
&& !fixedElements.get(parent)) {
|
3571
|
+
return;
|
3572
|
+
} // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)
|
3573
|
+
// then the props has already been manipulated beforehand as they that array is shared between it and its "rule parent"
|
3574
|
+
|
3575
|
+
|
3576
|
+
if (isImplicitRule) {
|
3577
|
+
return;
|
3578
|
+
}
|
3579
|
+
|
3580
|
+
fixedElements.set(element, true);
|
3581
|
+
var points = [];
|
3582
|
+
var rules = getRules(value, points);
|
3583
|
+
var parentRules = parent.props;
|
3584
|
+
|
3585
|
+
for (var i = 0, k = 0; i < rules.length; i++) {
|
3586
|
+
for (var j = 0; j < parentRules.length; j++, k++) {
|
3587
|
+
element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
|
3588
|
+
}
|
3589
|
+
}
|
3590
|
+
};
|
3591
|
+
var removeLabel = function removeLabel(element) {
|
3592
|
+
if (element.type === 'decl') {
|
3593
|
+
var value = element.value;
|
3594
|
+
|
3595
|
+
if ( // charcode for l
|
3596
|
+
value.charCodeAt(0) === 108 && // charcode for b
|
3597
|
+
value.charCodeAt(2) === 98) {
|
3598
|
+
// this ignores label
|
3599
|
+
element["return"] = '';
|
3600
|
+
element.value = '';
|
3601
|
+
}
|
3602
|
+
}
|
3603
|
+
};
|
3604
|
+
var ignoreFlag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';
|
3605
|
+
|
3606
|
+
var isIgnoringComment = function isIgnoringComment(element) {
|
3607
|
+
return element.type === 'comm' && element.children.indexOf(ignoreFlag) > -1;
|
3608
|
+
};
|
3609
|
+
|
3610
|
+
var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) {
|
3611
|
+
return function (element, index, children) {
|
3612
|
+
if (element.type !== 'rule' || cache.compat) return;
|
3613
|
+
var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);
|
3614
|
+
|
3615
|
+
if (unsafePseudoClasses) {
|
3616
|
+
var isNested = !!element.parent; // in nested rules comments become children of the "auto-inserted" rule and that's always the `element.parent`
|
3617
|
+
//
|
3618
|
+
// considering this input:
|
3619
|
+
// .a {
|
3620
|
+
// .b /* comm */ {}
|
3621
|
+
// color: hotpink;
|
3622
|
+
// }
|
3623
|
+
// we get output corresponding to this:
|
3624
|
+
// .a {
|
3625
|
+
// & {
|
3626
|
+
// /* comm */
|
3627
|
+
// color: hotpink;
|
3628
|
+
// }
|
3629
|
+
// .b {}
|
3630
|
+
// }
|
3631
|
+
|
3632
|
+
var commentContainer = isNested ? element.parent.children : // global rule at the root level
|
3633
|
+
children;
|
3634
|
+
|
3635
|
+
for (var i = commentContainer.length - 1; i >= 0; i--) {
|
3636
|
+
var node = commentContainer[i];
|
3637
|
+
|
3638
|
+
if (node.line < element.line) {
|
3639
|
+
break;
|
3640
|
+
} // it is quite weird but comments are *usually* put at `column: element.column - 1`
|
3641
|
+
// so we seek *from the end* for the node that is earlier than the rule's `element` and check that
|
3642
|
+
// this will also match inputs like this:
|
3643
|
+
// .a {
|
3644
|
+
// /* comm */
|
3645
|
+
// .b {}
|
3646
|
+
// }
|
3647
|
+
//
|
3648
|
+
// but that is fine
|
3649
|
+
//
|
3650
|
+
// it would be the easiest to change the placement of the comment to be the first child of the rule:
|
3651
|
+
// .a {
|
3652
|
+
// .b { /* comm */ }
|
3653
|
+
// }
|
3654
|
+
// with such inputs we wouldn't have to search for the comment at all
|
3655
|
+
// TODO: consider changing this comment placement in the next major version
|
3656
|
+
|
3657
|
+
|
3658
|
+
if (node.column < element.column) {
|
3659
|
+
if (isIgnoringComment(node)) {
|
3660
|
+
return;
|
3661
|
+
}
|
3662
|
+
|
3663
|
+
break;
|
3664
|
+
}
|
3665
|
+
}
|
3666
|
+
|
3667
|
+
unsafePseudoClasses.forEach(function (unsafePseudoClass) {
|
3668
|
+
console.error("The pseudo class \"" + unsafePseudoClass + "\" is potentially unsafe when doing server-side rendering. Try changing it to \"" + unsafePseudoClass.split('-child')[0] + "-of-type\".");
|
3669
|
+
});
|
3670
|
+
}
|
3671
|
+
};
|
3672
|
+
};
|
3673
|
+
|
3674
|
+
var isImportRule = function isImportRule(element) {
|
3675
|
+
return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64;
|
3676
|
+
};
|
3677
|
+
|
3678
|
+
var isPrependedWithRegularRules = function isPrependedWithRegularRules(index, children) {
|
3679
|
+
for (var i = index - 1; i >= 0; i--) {
|
3680
|
+
if (!isImportRule(children[i])) {
|
3681
|
+
return true;
|
3682
|
+
}
|
3683
|
+
}
|
3684
|
+
|
3685
|
+
return false;
|
3686
|
+
}; // use this to remove incorrect elements from further processing
|
3687
|
+
// so they don't get handed to the `sheet` (or anything else)
|
3688
|
+
// as that could potentially lead to additional logs which in turn could be overhelming to the user
|
3689
|
+
|
3690
|
+
|
3691
|
+
var nullifyElement = function nullifyElement(element) {
|
3692
|
+
element.type = '';
|
3693
|
+
element.value = '';
|
3694
|
+
element["return"] = '';
|
3695
|
+
element.children = '';
|
3696
|
+
element.props = '';
|
3697
|
+
};
|
3698
|
+
|
3699
|
+
var incorrectImportAlarm = function incorrectImportAlarm(element, index, children) {
|
3700
|
+
if (!isImportRule(element)) {
|
3701
|
+
return;
|
3702
|
+
}
|
3703
|
+
|
3704
|
+
if (element.parent) {
|
3705
|
+
console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles.");
|
3706
|
+
nullifyElement(element);
|
3707
|
+
} else if (isPrependedWithRegularRules(index, children)) {
|
3708
|
+
console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules.");
|
3709
|
+
nullifyElement(element);
|
3710
|
+
}
|
3711
|
+
};
|
3712
|
+
|
3713
|
+
/* eslint-disable no-fallthrough */
|
3714
|
+
|
3715
|
+
function prefix(value, length) {
|
3716
|
+
switch (hash(value, length)) {
|
3717
|
+
// color-adjust
|
3718
|
+
case 5103:
|
3719
|
+
return WEBKIT + 'print-' + value + value;
|
3720
|
+
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
|
3721
|
+
|
3722
|
+
case 5737:
|
3723
|
+
case 4201:
|
3724
|
+
case 3177:
|
3725
|
+
case 3433:
|
3726
|
+
case 1641:
|
3727
|
+
case 4457:
|
3728
|
+
case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
|
3729
|
+
|
3730
|
+
case 5572:
|
3731
|
+
case 6356:
|
3732
|
+
case 5844:
|
3733
|
+
case 3191:
|
3734
|
+
case 6645:
|
3735
|
+
case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
|
3736
|
+
|
3737
|
+
case 6391:
|
3738
|
+
case 5879:
|
3739
|
+
case 5623:
|
3740
|
+
case 6135:
|
3741
|
+
case 4599:
|
3742
|
+
case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
|
3743
|
+
|
3744
|
+
case 4215:
|
3745
|
+
case 6389:
|
3746
|
+
case 5109:
|
3747
|
+
case 5365:
|
3748
|
+
case 5621:
|
3749
|
+
case 3829:
|
3750
|
+
return WEBKIT + value + value;
|
3751
|
+
// appearance, user-select, transform, hyphens, text-size-adjust
|
3752
|
+
|
3753
|
+
case 5349:
|
3754
|
+
case 4246:
|
3755
|
+
case 4810:
|
3756
|
+
case 6968:
|
3757
|
+
case 2756:
|
3758
|
+
return WEBKIT + value + MOZ + value + MS + value + value;
|
3759
|
+
// flex, flex-direction
|
3760
|
+
|
3761
|
+
case 6828:
|
3762
|
+
case 4268:
|
3763
|
+
return WEBKIT + value + MS + value + value;
|
3764
|
+
// order
|
3765
|
+
|
3766
|
+
case 6165:
|
3767
|
+
return WEBKIT + value + MS + 'flex-' + value + value;
|
3768
|
+
// align-items
|
3769
|
+
|
3770
|
+
case 5187:
|
3771
|
+
return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;
|
3772
|
+
// align-self
|
3773
|
+
|
3774
|
+
case 5443:
|
3775
|
+
return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;
|
3776
|
+
// align-content
|
3777
|
+
|
3778
|
+
case 4675:
|
3779
|
+
return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;
|
3780
|
+
// flex-shrink
|
3781
|
+
|
3782
|
+
case 5548:
|
3783
|
+
return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;
|
3784
|
+
// flex-basis
|
3785
|
+
|
3786
|
+
case 5292:
|
3787
|
+
return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;
|
3788
|
+
// flex-grow
|
3789
|
+
|
3790
|
+
case 6060:
|
3791
|
+
return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;
|
3792
|
+
// transition
|
3793
|
+
|
3794
|
+
case 4554:
|
3795
|
+
return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;
|
3796
|
+
// cursor
|
3797
|
+
|
3798
|
+
case 6187:
|
3799
|
+
return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;
|
3800
|
+
// background, background-image
|
3801
|
+
|
3802
|
+
case 5495:
|
3803
|
+
case 3959:
|
3804
|
+
return replace(value, /(image-set\([^]*)/, WEBKIT + '$1' + '$`$1');
|
3805
|
+
// justify-content
|
3806
|
+
|
3807
|
+
case 4968:
|
3808
|
+
return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;
|
3809
|
+
// (margin|padding)-inline-(start|end)
|
3810
|
+
|
3811
|
+
case 4095:
|
3812
|
+
case 3583:
|
3813
|
+
case 4068:
|
3814
|
+
case 2532:
|
3815
|
+
return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;
|
3816
|
+
// (min|max)?(width|height|inline-size|block-size)
|
3817
|
+
|
3818
|
+
case 8116:
|
3819
|
+
case 7059:
|
3820
|
+
case 5753:
|
3821
|
+
case 5535:
|
3822
|
+
case 5445:
|
3823
|
+
case 5701:
|
3824
|
+
case 4933:
|
3825
|
+
case 4677:
|
3826
|
+
case 5533:
|
3827
|
+
case 5789:
|
3828
|
+
case 5021:
|
3829
|
+
case 4765:
|
3830
|
+
// stretch, max-content, min-content, fill-available
|
3831
|
+
if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {
|
3832
|
+
// (m)ax-content, (m)in-content
|
3833
|
+
case 109:
|
3834
|
+
// -
|
3835
|
+
if (charat(value, length + 4) !== 45) break;
|
3836
|
+
// (f)ill-available, (f)it-content
|
3837
|
+
|
3838
|
+
case 102:
|
3839
|
+
return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;
|
3840
|
+
// (s)tretch
|
3841
|
+
|
3842
|
+
case 115:
|
3843
|
+
return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;
|
3844
|
+
}
|
3845
|
+
break;
|
3846
|
+
// position: sticky
|
3847
|
+
|
3848
|
+
case 4949:
|
3849
|
+
// (s)ticky?
|
3850
|
+
if (charat(value, length + 1) !== 115) break;
|
3851
|
+
// display: (flex|inline-flex)
|
3852
|
+
|
3853
|
+
case 6444:
|
3854
|
+
switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {
|
3855
|
+
// stic(k)y
|
3856
|
+
case 107:
|
3857
|
+
return replace(value, ':', ':' + WEBKIT) + value;
|
3858
|
+
// (inline-)?fl(e)x
|
3859
|
+
|
3860
|
+
case 101:
|
3861
|
+
return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;
|
3862
|
+
}
|
3863
|
+
|
3864
|
+
break;
|
3865
|
+
// writing-mode
|
3866
|
+
|
3867
|
+
case 5936:
|
3868
|
+
switch (charat(value, length + 11)) {
|
3869
|
+
// vertical-l(r)
|
3870
|
+
case 114:
|
3871
|
+
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value;
|
3872
|
+
// vertical-r(l)
|
3873
|
+
|
3874
|
+
case 108:
|
3875
|
+
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value;
|
3876
|
+
// horizontal(-)tb
|
3877
|
+
|
3878
|
+
case 45:
|
3879
|
+
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value;
|
3880
|
+
}
|
3881
|
+
|
3882
|
+
return WEBKIT + value + MS + value + value;
|
3883
|
+
}
|
3884
|
+
|
3885
|
+
return value;
|
3886
|
+
}
|
3887
|
+
|
3888
|
+
var prefixer = function prefixer(element, index, children, callback) {
|
3889
|
+
if (element.length > -1) if (!element["return"]) switch (element.type) {
|
3890
|
+
case DECLARATION:
|
3891
|
+
element["return"] = prefix(element.value, element.length);
|
3892
|
+
break;
|
3893
|
+
|
3894
|
+
case KEYFRAMES:
|
3895
|
+
return serialize([copy(element, {
|
3896
|
+
value: replace(element.value, '@', '@' + WEBKIT)
|
3897
|
+
})], callback);
|
3898
|
+
|
3899
|
+
case RULESET:
|
3900
|
+
if (element.length) return combine(element.props, function (value) {
|
3901
|
+
switch (match(value, /(::plac\w+|:read-\w+)/)) {
|
3902
|
+
// :read-(only|write)
|
3903
|
+
case ':read-only':
|
3904
|
+
case ':read-write':
|
3905
|
+
return serialize([copy(element, {
|
3906
|
+
props: [replace(value, /:(read-\w+)/, ':' + MOZ + '$1')]
|
3907
|
+
})], callback);
|
3908
|
+
// :placeholder
|
3909
|
+
|
3910
|
+
case '::placeholder':
|
3911
|
+
return serialize([copy(element, {
|
3912
|
+
props: [replace(value, /:(plac\w+)/, ':' + WEBKIT + 'input-$1')]
|
3913
|
+
}), copy(element, {
|
3914
|
+
props: [replace(value, /:(plac\w+)/, ':' + MOZ + '$1')]
|
3915
|
+
}), copy(element, {
|
3916
|
+
props: [replace(value, /:(plac\w+)/, MS + 'input-$1')]
|
3917
|
+
})], callback);
|
3918
|
+
}
|
3919
|
+
|
3920
|
+
return '';
|
3921
|
+
});
|
3922
|
+
}
|
3923
|
+
};
|
3924
|
+
|
3925
|
+
var isBrowser$4 = typeof document !== 'undefined';
|
3926
|
+
var getServerStylisCache = isBrowser$4 ? undefined : weakMemoize(function () {
|
3927
|
+
return memoize$1(function () {
|
3928
|
+
var cache = {};
|
3929
|
+
return function (name) {
|
3930
|
+
return cache[name];
|
3931
|
+
};
|
3932
|
+
});
|
3933
|
+
});
|
3934
|
+
var defaultStylisPlugins = [prefixer];
|
3935
|
+
|
3936
|
+
var createCache = function createCache(options) {
|
3937
|
+
var key = options.key;
|
3938
|
+
|
3939
|
+
if (process.env.NODE_ENV !== 'production' && !key) {
|
3940
|
+
throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\n" + "If multiple caches share the same key they might \"fight\" for each other's style elements.");
|
3941
|
+
}
|
3942
|
+
|
3943
|
+
if (isBrowser$4 && key === 'css') {
|
3944
|
+
var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); // get SSRed styles out of the way of React's hydration
|
3945
|
+
// document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)
|
3946
|
+
// note this very very intentionally targets all style elements regardless of the key to ensure
|
3947
|
+
// that creating a cache works inside of render of a React component
|
3948
|
+
|
3949
|
+
Array.prototype.forEach.call(ssrStyles, function (node) {
|
3950
|
+
// we want to only move elements which have a space in the data-emotion attribute value
|
3951
|
+
// because that indicates that it is an Emotion 11 server-side rendered style elements
|
3952
|
+
// while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector
|
3953
|
+
// Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)
|
3954
|
+
// so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles
|
3955
|
+
// will not result in the Emotion 10 styles being destroyed
|
3956
|
+
var dataEmotionAttribute = node.getAttribute('data-emotion');
|
3957
|
+
|
3958
|
+
if (dataEmotionAttribute.indexOf(' ') === -1) {
|
3959
|
+
return;
|
3960
|
+
}
|
3961
|
+
document.head.appendChild(node);
|
3962
|
+
node.setAttribute('data-s', '');
|
3963
|
+
});
|
3964
|
+
}
|
3965
|
+
|
3966
|
+
var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
|
3967
|
+
|
3968
|
+
if (process.env.NODE_ENV !== 'production') {
|
3969
|
+
// $FlowFixMe
|
3970
|
+
if (/[^a-z-]/.test(key)) {
|
3971
|
+
throw new Error("Emotion key must only contain lower case alphabetical characters and - but \"" + key + "\" was passed");
|
3972
|
+
}
|
3973
|
+
}
|
3974
|
+
|
3975
|
+
var inserted = {};
|
3976
|
+
var container;
|
3977
|
+
var nodesToHydrate = [];
|
3978
|
+
|
3979
|
+
if (isBrowser$4) {
|
3980
|
+
container = options.container || document.head;
|
3981
|
+
Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which
|
3982
|
+
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
3983
|
+
document.querySelectorAll("style[data-emotion^=\"" + key + " \"]"), function (node) {
|
3984
|
+
var attrib = node.getAttribute("data-emotion").split(' '); // $FlowFixMe
|
3985
|
+
|
3986
|
+
for (var i = 1; i < attrib.length; i++) {
|
3987
|
+
inserted[attrib[i]] = true;
|
3988
|
+
}
|
3989
|
+
|
3990
|
+
nodesToHydrate.push(node);
|
3991
|
+
});
|
3992
|
+
}
|
3993
|
+
|
3994
|
+
var _insert;
|
3995
|
+
|
3996
|
+
var omnipresentPlugins = [compat, removeLabel];
|
3997
|
+
|
3998
|
+
if (process.env.NODE_ENV !== 'production') {
|
3999
|
+
omnipresentPlugins.push(createUnsafeSelectorsAlarm({
|
4000
|
+
get compat() {
|
4001
|
+
return cache.compat;
|
4002
|
+
}
|
4003
|
+
|
4004
|
+
}), incorrectImportAlarm);
|
4005
|
+
}
|
4006
|
+
|
4007
|
+
if (isBrowser$4) {
|
4008
|
+
var currentSheet;
|
4009
|
+
var finalizingPlugins = [stringify, process.env.NODE_ENV !== 'production' ? function (element) {
|
4010
|
+
if (!element.root) {
|
4011
|
+
if (element["return"]) {
|
4012
|
+
currentSheet.insert(element["return"]);
|
4013
|
+
} else if (element.value && element.type !== COMMENT) {
|
4014
|
+
// insert empty rule in non-production environments
|
4015
|
+
// so @emotion/jest can grab `key` from the (JS)DOM for caches without any rules inserted yet
|
4016
|
+
currentSheet.insert(element.value + "{}");
|
4017
|
+
}
|
4018
|
+
}
|
4019
|
+
} : rulesheet(function (rule) {
|
4020
|
+
currentSheet.insert(rule);
|
4021
|
+
})];
|
4022
|
+
var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
|
4023
|
+
|
4024
|
+
var stylis = function stylis(styles) {
|
4025
|
+
return serialize(compile(styles), serializer);
|
4026
|
+
};
|
4027
|
+
|
4028
|
+
_insert = function insert(selector, serialized, sheet, shouldCache) {
|
4029
|
+
currentSheet = sheet;
|
4030
|
+
|
4031
|
+
if (process.env.NODE_ENV !== 'production' && serialized.map !== undefined) {
|
4032
|
+
currentSheet = {
|
4033
|
+
insert: function insert(rule) {
|
4034
|
+
sheet.insert(rule + serialized.map);
|
4035
|
+
}
|
4036
|
+
};
|
4037
|
+
}
|
4038
|
+
|
4039
|
+
stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
|
4040
|
+
|
4041
|
+
if (shouldCache) {
|
4042
|
+
cache.inserted[serialized.name] = true;
|
4043
|
+
}
|
4044
|
+
};
|
4045
|
+
} else {
|
4046
|
+
var _finalizingPlugins = [stringify];
|
4047
|
+
|
4048
|
+
var _serializer = middleware(omnipresentPlugins.concat(stylisPlugins, _finalizingPlugins));
|
4049
|
+
|
4050
|
+
var _stylis = function _stylis(styles) {
|
4051
|
+
return serialize(compile(styles), _serializer);
|
4052
|
+
}; // $FlowFixMe
|
4053
|
+
|
4054
|
+
|
4055
|
+
var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
|
4056
|
+
|
4057
|
+
var getRules = function getRules(selector, serialized) {
|
4058
|
+
var name = serialized.name;
|
4059
|
+
|
4060
|
+
if (serverStylisCache[name] === undefined) {
|
4061
|
+
serverStylisCache[name] = _stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
|
4062
|
+
}
|
4063
|
+
|
4064
|
+
return serverStylisCache[name];
|
4065
|
+
};
|
4066
|
+
|
4067
|
+
_insert = function _insert(selector, serialized, sheet, shouldCache) {
|
4068
|
+
var name = serialized.name;
|
4069
|
+
var rules = getRules(selector, serialized);
|
4070
|
+
|
4071
|
+
if (cache.compat === undefined) {
|
4072
|
+
// in regular mode, we don't set the styles on the inserted cache
|
4073
|
+
// since we don't need to and that would be wasting memory
|
4074
|
+
// we return them so that they are rendered in a style tag
|
4075
|
+
if (shouldCache) {
|
4076
|
+
cache.inserted[name] = true;
|
4077
|
+
}
|
4078
|
+
|
4079
|
+
if ( // using === development instead of !== production
|
4080
|
+
// because if people do ssr in tests, the source maps showing up would be annoying
|
4081
|
+
process.env.NODE_ENV === 'development' && serialized.map !== undefined) {
|
4082
|
+
return rules + serialized.map;
|
4083
|
+
}
|
4084
|
+
|
4085
|
+
return rules;
|
4086
|
+
} else {
|
4087
|
+
// in compat mode, we put the styles on the inserted cache so
|
4088
|
+
// that emotion-server can pull out the styles
|
4089
|
+
// except when we don't want to cache it which was in Global but now
|
4090
|
+
// is nowhere but we don't want to do a major right now
|
4091
|
+
// and just in case we're going to leave the case here
|
4092
|
+
// it's also not affecting client side bundle size
|
4093
|
+
// so it's really not a big deal
|
4094
|
+
if (shouldCache) {
|
4095
|
+
cache.inserted[name] = rules;
|
4096
|
+
} else {
|
4097
|
+
return rules;
|
4098
|
+
}
|
4099
|
+
}
|
4100
|
+
};
|
4101
|
+
}
|
4102
|
+
|
4103
|
+
var cache = {
|
4104
|
+
key: key,
|
4105
|
+
sheet: new StyleSheet({
|
4106
|
+
key: key,
|
4107
|
+
container: container,
|
4108
|
+
nonce: options.nonce,
|
4109
|
+
speedy: options.speedy,
|
4110
|
+
prepend: options.prepend,
|
4111
|
+
insertionPoint: options.insertionPoint
|
4112
|
+
}),
|
4113
|
+
nonce: options.nonce,
|
4114
|
+
inserted: inserted,
|
4115
|
+
registered: {},
|
4116
|
+
insert: _insert
|
4117
|
+
};
|
4118
|
+
cache.sheet.hydrate(nodesToHydrate);
|
4119
|
+
return cache;
|
4120
|
+
};
|
4121
|
+
|
4122
|
+
var isBrowser$3 = typeof document !== 'undefined';
|
4123
|
+
function getRegisteredStyles(registered, registeredStyles, classNames) {
|
4124
|
+
var rawClassName = '';
|
4125
|
+
classNames.split(' ').forEach(function (className) {
|
4126
|
+
if (registered[className] !== undefined) {
|
4127
|
+
registeredStyles.push(registered[className] + ";");
|
4128
|
+
} else {
|
4129
|
+
rawClassName += className + " ";
|
4130
|
+
}
|
4131
|
+
});
|
4132
|
+
return rawClassName;
|
4133
|
+
}
|
4134
|
+
var registerStyles = function registerStyles(cache, serialized, isStringTag) {
|
4135
|
+
var className = cache.key + "-" + serialized.name;
|
4136
|
+
|
4137
|
+
if ( // we only need to add the styles to the registered cache if the
|
4138
|
+
// class name could be used further down
|
4139
|
+
// the tree but if it's a string tag, we know it won't
|
4140
|
+
// so we don't have to add it to registered cache.
|
4141
|
+
// this improves memory usage since we can avoid storing the whole style string
|
4142
|
+
(isStringTag === false || // we need to always store it if we're in compat mode and
|
4143
|
+
// in node since emotion-server relies on whether a style is in
|
4144
|
+
// the registered cache to know whether a style is global or not
|
4145
|
+
// also, note that this check will be dead code eliminated in the browser
|
4146
|
+
isBrowser$3 === false && cache.compat !== undefined) && cache.registered[className] === undefined) {
|
4147
|
+
cache.registered[className] = serialized.styles;
|
4148
|
+
}
|
4149
|
+
};
|
4150
|
+
var insertStyles = function insertStyles(cache, serialized, isStringTag) {
|
4151
|
+
registerStyles(cache, serialized, isStringTag);
|
4152
|
+
var className = cache.key + "-" + serialized.name;
|
4153
|
+
|
4154
|
+
if (cache.inserted[serialized.name] === undefined) {
|
4155
|
+
var stylesForSSR = '';
|
4156
|
+
var current = serialized;
|
4157
|
+
|
4158
|
+
do {
|
4159
|
+
var maybeStyles = cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
|
4160
|
+
|
4161
|
+
if (!isBrowser$3 && maybeStyles !== undefined) {
|
4162
|
+
stylesForSSR += maybeStyles;
|
4163
|
+
}
|
4164
|
+
|
4165
|
+
current = current.next;
|
4166
|
+
} while (current !== undefined);
|
4167
|
+
|
4168
|
+
if (!isBrowser$3 && stylesForSSR.length !== 0) {
|
4169
|
+
return stylesForSSR;
|
4170
|
+
}
|
4171
|
+
}
|
4172
|
+
};
|
4173
|
+
|
4174
|
+
/* eslint-disable */
|
4175
|
+
// Inspired by https://github.com/garycourt/murmurhash-js
|
4176
|
+
// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86
|
4177
|
+
function murmur2(str) {
|
4178
|
+
// 'm' and 'r' are mixing constants generated offline.
|
4179
|
+
// They're not really 'magic', they just happen to work well.
|
4180
|
+
// const m = 0x5bd1e995;
|
4181
|
+
// const r = 24;
|
4182
|
+
// Initialize the hash
|
4183
|
+
var h = 0; // Mix 4 bytes at a time into the hash
|
4184
|
+
|
4185
|
+
var k,
|
4186
|
+
i = 0,
|
4187
|
+
len = str.length;
|
4188
|
+
|
4189
|
+
for (; len >= 4; ++i, len -= 4) {
|
4190
|
+
k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;
|
4191
|
+
k =
|
4192
|
+
/* Math.imul(k, m): */
|
4193
|
+
(k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);
|
4194
|
+
k ^=
|
4195
|
+
/* k >>> r: */
|
4196
|
+
k >>> 24;
|
4197
|
+
h =
|
4198
|
+
/* Math.imul(k, m): */
|
4199
|
+
(k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^
|
4200
|
+
/* Math.imul(h, m): */
|
4201
|
+
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
4202
|
+
} // Handle the last few bytes of the input array
|
4203
|
+
|
4204
|
+
|
4205
|
+
switch (len) {
|
4206
|
+
case 3:
|
4207
|
+
h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
|
4208
|
+
|
4209
|
+
case 2:
|
4210
|
+
h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
|
4211
|
+
|
4212
|
+
case 1:
|
4213
|
+
h ^= str.charCodeAt(i) & 0xff;
|
4214
|
+
h =
|
4215
|
+
/* Math.imul(h, m): */
|
4216
|
+
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
4217
|
+
} // Do a few final mixes of the hash to ensure the last few
|
4218
|
+
// bytes are well-incorporated.
|
4219
|
+
|
4220
|
+
|
4221
|
+
h ^= h >>> 13;
|
4222
|
+
h =
|
4223
|
+
/* Math.imul(h, m): */
|
4224
|
+
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
4225
|
+
return ((h ^ h >>> 15) >>> 0).toString(36);
|
4226
|
+
}
|
4227
|
+
|
4228
|
+
var unitlessKeys = {
|
4229
|
+
animationIterationCount: 1,
|
4230
|
+
aspectRatio: 1,
|
4231
|
+
borderImageOutset: 1,
|
4232
|
+
borderImageSlice: 1,
|
4233
|
+
borderImageWidth: 1,
|
4234
|
+
boxFlex: 1,
|
4235
|
+
boxFlexGroup: 1,
|
4236
|
+
boxOrdinalGroup: 1,
|
4237
|
+
columnCount: 1,
|
4238
|
+
columns: 1,
|
4239
|
+
flex: 1,
|
4240
|
+
flexGrow: 1,
|
4241
|
+
flexPositive: 1,
|
4242
|
+
flexShrink: 1,
|
4243
|
+
flexNegative: 1,
|
4244
|
+
flexOrder: 1,
|
4245
|
+
gridRow: 1,
|
4246
|
+
gridRowEnd: 1,
|
4247
|
+
gridRowSpan: 1,
|
4248
|
+
gridRowStart: 1,
|
4249
|
+
gridColumn: 1,
|
4250
|
+
gridColumnEnd: 1,
|
4251
|
+
gridColumnSpan: 1,
|
4252
|
+
gridColumnStart: 1,
|
4253
|
+
msGridRow: 1,
|
4254
|
+
msGridRowSpan: 1,
|
4255
|
+
msGridColumn: 1,
|
4256
|
+
msGridColumnSpan: 1,
|
4257
|
+
fontWeight: 1,
|
4258
|
+
lineHeight: 1,
|
4259
|
+
opacity: 1,
|
4260
|
+
order: 1,
|
4261
|
+
orphans: 1,
|
4262
|
+
tabSize: 1,
|
4263
|
+
widows: 1,
|
4264
|
+
zIndex: 1,
|
4265
|
+
zoom: 1,
|
4266
|
+
WebkitLineClamp: 1,
|
4267
|
+
// SVG-related properties
|
4268
|
+
fillOpacity: 1,
|
4269
|
+
floodOpacity: 1,
|
4270
|
+
stopOpacity: 1,
|
4271
|
+
strokeDasharray: 1,
|
4272
|
+
strokeDashoffset: 1,
|
4273
|
+
strokeMiterlimit: 1,
|
4274
|
+
strokeOpacity: 1,
|
4275
|
+
strokeWidth: 1
|
4276
|
+
};
|
4277
|
+
|
4278
|
+
var ILLEGAL_ESCAPE_SEQUENCE_ERROR$1 = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences";
|
4279
|
+
var UNDEFINED_AS_OBJECT_KEY_ERROR = "You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).";
|
4280
|
+
var hyphenateRegex = /[A-Z]|^ms/g;
|
4281
|
+
var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
|
4282
|
+
|
4283
|
+
var isCustomProperty = function isCustomProperty(property) {
|
4284
|
+
return property.charCodeAt(1) === 45;
|
4285
|
+
};
|
4286
|
+
|
4287
|
+
var isProcessableValue = function isProcessableValue(value) {
|
4288
|
+
return value != null && typeof value !== 'boolean';
|
4289
|
+
};
|
4290
|
+
|
4291
|
+
var processStyleName = /* #__PURE__ */memoize$1(function (styleName) {
|
4292
|
+
return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();
|
4293
|
+
});
|
4294
|
+
|
4295
|
+
var processStyleValue = function processStyleValue(key, value) {
|
4296
|
+
switch (key) {
|
4297
|
+
case 'animation':
|
4298
|
+
case 'animationName':
|
4299
|
+
{
|
4300
|
+
if (typeof value === 'string') {
|
4301
|
+
return value.replace(animationRegex, function (match, p1, p2) {
|
4302
|
+
cursor = {
|
4303
|
+
name: p1,
|
4304
|
+
styles: p2,
|
4305
|
+
next: cursor
|
4306
|
+
};
|
4307
|
+
return p1;
|
4308
|
+
});
|
4309
|
+
}
|
4310
|
+
}
|
4311
|
+
}
|
4312
|
+
|
4313
|
+
if (unitlessKeys[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {
|
4314
|
+
return value + 'px';
|
4315
|
+
}
|
4316
|
+
|
4317
|
+
return value;
|
4318
|
+
};
|
4319
|
+
|
4320
|
+
if (process.env.NODE_ENV !== 'production') {
|
4321
|
+
var contentValuePattern = /(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
|
4322
|
+
var contentValues = ['normal', 'none', 'initial', 'inherit', 'unset'];
|
4323
|
+
var oldProcessStyleValue = processStyleValue;
|
4324
|
+
var msPattern = /^-ms-/;
|
4325
|
+
var hyphenPattern = /-(.)/g;
|
4326
|
+
var hyphenatedCache = {};
|
4327
|
+
|
4328
|
+
processStyleValue = function processStyleValue(key, value) {
|
4329
|
+
if (key === 'content') {
|
4330
|
+
if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '"' && value.charAt(0) !== "'")) {
|
4331
|
+
throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"" + value + "\"'`");
|
4332
|
+
}
|
4333
|
+
}
|
4334
|
+
|
4335
|
+
var processed = oldProcessStyleValue(key, value);
|
4336
|
+
|
4337
|
+
if (processed !== '' && !isCustomProperty(key) && key.indexOf('-') !== -1 && hyphenatedCache[key] === undefined) {
|
4338
|
+
hyphenatedCache[key] = true;
|
4339
|
+
console.error("Using kebab-case for css properties in objects is not supported. Did you mean " + key.replace(msPattern, 'ms-').replace(hyphenPattern, function (str, _char) {
|
4340
|
+
return _char.toUpperCase();
|
4341
|
+
}) + "?");
|
4342
|
+
}
|
4343
|
+
|
4344
|
+
return processed;
|
4345
|
+
};
|
4346
|
+
}
|
4347
|
+
|
4348
|
+
var noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';
|
4349
|
+
|
4350
|
+
function handleInterpolation(mergedProps, registered, interpolation) {
|
4351
|
+
if (interpolation == null) {
|
4352
|
+
return '';
|
4353
|
+
}
|
4354
|
+
|
4355
|
+
if (interpolation.__emotion_styles !== undefined) {
|
4356
|
+
if (process.env.NODE_ENV !== 'production' && interpolation.toString() === 'NO_COMPONENT_SELECTOR') {
|
4357
|
+
throw new Error(noComponentSelectorMessage);
|
4358
|
+
}
|
4359
|
+
|
4360
|
+
return interpolation;
|
4361
|
+
}
|
4362
|
+
|
4363
|
+
switch (typeof interpolation) {
|
4364
|
+
case 'boolean':
|
4365
|
+
{
|
4366
|
+
return '';
|
4367
|
+
}
|
4368
|
+
|
4369
|
+
case 'object':
|
4370
|
+
{
|
4371
|
+
if (interpolation.anim === 1) {
|
4372
|
+
cursor = {
|
4373
|
+
name: interpolation.name,
|
4374
|
+
styles: interpolation.styles,
|
4375
|
+
next: cursor
|
4376
|
+
};
|
4377
|
+
return interpolation.name;
|
4378
|
+
}
|
4379
|
+
|
4380
|
+
if (interpolation.styles !== undefined) {
|
4381
|
+
var next = interpolation.next;
|
4382
|
+
|
4383
|
+
if (next !== undefined) {
|
4384
|
+
// not the most efficient thing ever but this is a pretty rare case
|
4385
|
+
// and there will be very few iterations of this generally
|
4386
|
+
while (next !== undefined) {
|
4387
|
+
cursor = {
|
4388
|
+
name: next.name,
|
4389
|
+
styles: next.styles,
|
4390
|
+
next: cursor
|
4391
|
+
};
|
4392
|
+
next = next.next;
|
4393
|
+
}
|
4394
|
+
}
|
4395
|
+
|
4396
|
+
var styles = interpolation.styles + ";";
|
4397
|
+
|
4398
|
+
if (process.env.NODE_ENV !== 'production' && interpolation.map !== undefined) {
|
4399
|
+
styles += interpolation.map;
|
4400
|
+
}
|
4401
|
+
|
4402
|
+
return styles;
|
4403
|
+
}
|
4404
|
+
|
4405
|
+
return createStringFromObject(mergedProps, registered, interpolation);
|
4406
|
+
}
|
4407
|
+
|
4408
|
+
case 'function':
|
4409
|
+
{
|
4410
|
+
if (mergedProps !== undefined) {
|
4411
|
+
var previousCursor = cursor;
|
4412
|
+
var result = interpolation(mergedProps);
|
4413
|
+
cursor = previousCursor;
|
4414
|
+
return handleInterpolation(mergedProps, registered, result);
|
4415
|
+
} else if (process.env.NODE_ENV !== 'production') {
|
4416
|
+
console.error('Functions that are interpolated in css calls will be stringified.\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\n' + 'It can be called directly with props or interpolated in a styled call like this\n' + "let SomeComponent = styled('div')`${dynamicStyle}`");
|
4417
|
+
}
|
4418
|
+
|
4419
|
+
break;
|
4420
|
+
}
|
4421
|
+
|
4422
|
+
case 'string':
|
4423
|
+
if (process.env.NODE_ENV !== 'production') {
|
4424
|
+
var matched = [];
|
4425
|
+
var replaced = interpolation.replace(animationRegex, function (match, p1, p2) {
|
4426
|
+
var fakeVarName = "animation" + matched.length;
|
4427
|
+
matched.push("const " + fakeVarName + " = keyframes`" + p2.replace(/^@keyframes animation-\w+/, '') + "`");
|
4428
|
+
return "${" + fakeVarName + "}";
|
4429
|
+
});
|
4430
|
+
|
4431
|
+
if (matched.length) {
|
4432
|
+
console.error('`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\n' + 'Instead of doing this:\n\n' + [].concat(matched, ["`" + replaced + "`"]).join('\n') + '\n\nYou should wrap it with `css` like this:\n\n' + ("css`" + replaced + "`"));
|
4433
|
+
}
|
4434
|
+
}
|
4435
|
+
|
4436
|
+
break;
|
4437
|
+
} // finalize string values (regular strings and functions interpolated into css calls)
|
4438
|
+
|
4439
|
+
|
4440
|
+
if (registered == null) {
|
4441
|
+
return interpolation;
|
4442
|
+
}
|
4443
|
+
|
4444
|
+
var cached = registered[interpolation];
|
4445
|
+
return cached !== undefined ? cached : interpolation;
|
4446
|
+
}
|
4447
|
+
|
4448
|
+
function createStringFromObject(mergedProps, registered, obj) {
|
4449
|
+
var string = '';
|
4450
|
+
|
4451
|
+
if (Array.isArray(obj)) {
|
4452
|
+
for (var i = 0; i < obj.length; i++) {
|
4453
|
+
string += handleInterpolation(mergedProps, registered, obj[i]) + ";";
|
4454
|
+
}
|
4455
|
+
} else {
|
4456
|
+
for (var _key in obj) {
|
4457
|
+
var value = obj[_key];
|
4458
|
+
|
4459
|
+
if (typeof value !== 'object') {
|
4460
|
+
if (registered != null && registered[value] !== undefined) {
|
4461
|
+
string += _key + "{" + registered[value] + "}";
|
4462
|
+
} else if (isProcessableValue(value)) {
|
4463
|
+
string += processStyleName(_key) + ":" + processStyleValue(_key, value) + ";";
|
4464
|
+
}
|
4465
|
+
} else {
|
4466
|
+
if (_key === 'NO_COMPONENT_SELECTOR' && process.env.NODE_ENV !== 'production') {
|
4467
|
+
throw new Error(noComponentSelectorMessage);
|
4468
|
+
}
|
4469
|
+
|
4470
|
+
if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {
|
4471
|
+
for (var _i = 0; _i < value.length; _i++) {
|
4472
|
+
if (isProcessableValue(value[_i])) {
|
4473
|
+
string += processStyleName(_key) + ":" + processStyleValue(_key, value[_i]) + ";";
|
4474
|
+
}
|
4475
|
+
}
|
4476
|
+
} else {
|
4477
|
+
var interpolated = handleInterpolation(mergedProps, registered, value);
|
4478
|
+
|
4479
|
+
switch (_key) {
|
4480
|
+
case 'animation':
|
4481
|
+
case 'animationName':
|
4482
|
+
{
|
4483
|
+
string += processStyleName(_key) + ":" + interpolated + ";";
|
4484
|
+
break;
|
4485
|
+
}
|
4486
|
+
|
4487
|
+
default:
|
4488
|
+
{
|
4489
|
+
if (process.env.NODE_ENV !== 'production' && _key === 'undefined') {
|
4490
|
+
console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);
|
4491
|
+
}
|
4492
|
+
|
4493
|
+
string += _key + "{" + interpolated + "}";
|
4494
|
+
}
|
4495
|
+
}
|
4496
|
+
}
|
4497
|
+
}
|
4498
|
+
}
|
4499
|
+
}
|
4500
|
+
|
4501
|
+
return string;
|
4502
|
+
}
|
4503
|
+
|
4504
|
+
var labelPattern = /label:\s*([^\s;\n{]+)\s*(;|$)/g;
|
4505
|
+
var sourceMapPattern;
|
4506
|
+
|
4507
|
+
if (process.env.NODE_ENV !== 'production') {
|
4508
|
+
sourceMapPattern = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;
|
4509
|
+
} // this is the cursor for keyframes
|
4510
|
+
// keyframes are stored on the SerializedStyles object as a linked list
|
4511
|
+
|
4512
|
+
|
4513
|
+
var cursor;
|
4514
|
+
var serializeStyles = function serializeStyles(args, registered, mergedProps) {
|
4515
|
+
if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {
|
4516
|
+
return args[0];
|
4517
|
+
}
|
4518
|
+
|
4519
|
+
var stringMode = true;
|
4520
|
+
var styles = '';
|
4521
|
+
cursor = undefined;
|
4522
|
+
var strings = args[0];
|
4523
|
+
|
4524
|
+
if (strings == null || strings.raw === undefined) {
|
4525
|
+
stringMode = false;
|
4526
|
+
styles += handleInterpolation(mergedProps, registered, strings);
|
4527
|
+
} else {
|
4528
|
+
if (process.env.NODE_ENV !== 'production' && strings[0] === undefined) {
|
4529
|
+
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR$1);
|
4530
|
+
}
|
4531
|
+
|
4532
|
+
styles += strings[0];
|
4533
|
+
} // we start at 1 since we've already handled the first arg
|
4534
|
+
|
4535
|
+
|
4536
|
+
for (var i = 1; i < args.length; i++) {
|
4537
|
+
styles += handleInterpolation(mergedProps, registered, args[i]);
|
4538
|
+
|
4539
|
+
if (stringMode) {
|
4540
|
+
if (process.env.NODE_ENV !== 'production' && strings[i] === undefined) {
|
4541
|
+
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR$1);
|
4542
|
+
}
|
4543
|
+
|
4544
|
+
styles += strings[i];
|
4545
|
+
}
|
4546
|
+
}
|
4547
|
+
|
4548
|
+
var sourceMap;
|
4549
|
+
|
4550
|
+
if (process.env.NODE_ENV !== 'production') {
|
4551
|
+
styles = styles.replace(sourceMapPattern, function (match) {
|
4552
|
+
sourceMap = match;
|
4553
|
+
return '';
|
4554
|
+
});
|
4555
|
+
} // using a global regex with .exec is stateful so lastIndex has to be reset each time
|
4556
|
+
|
4557
|
+
|
4558
|
+
labelPattern.lastIndex = 0;
|
4559
|
+
var identifierName = '';
|
4560
|
+
var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5
|
4561
|
+
|
4562
|
+
while ((match = labelPattern.exec(styles)) !== null) {
|
4563
|
+
identifierName += '-' + // $FlowFixMe we know it's not null
|
4564
|
+
match[1];
|
4565
|
+
}
|
4566
|
+
|
4567
|
+
var name = murmur2(styles) + identifierName;
|
4568
|
+
|
4569
|
+
if (process.env.NODE_ENV !== 'production') {
|
4570
|
+
// $FlowFixMe SerializedStyles type doesn't have toString property (and we don't want to add it)
|
4571
|
+
return {
|
4572
|
+
name: name,
|
4573
|
+
styles: styles,
|
4574
|
+
map: sourceMap,
|
4575
|
+
next: cursor,
|
4576
|
+
toString: function toString() {
|
4577
|
+
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
|
4578
|
+
}
|
4579
|
+
};
|
4580
|
+
}
|
4581
|
+
|
4582
|
+
return {
|
4583
|
+
name: name,
|
4584
|
+
styles: styles,
|
4585
|
+
next: cursor
|
4586
|
+
};
|
4587
|
+
};
|
4588
|
+
|
4589
|
+
var isBrowser$2 = typeof document !== 'undefined';
|
4590
|
+
|
4591
|
+
var syncFallback = function syncFallback(create) {
|
4592
|
+
return create();
|
4593
|
+
};
|
4594
|
+
|
4595
|
+
var useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;
|
4596
|
+
var useInsertionEffectAlwaysWithSyncFallback = !isBrowser$2 ? syncFallback : useInsertionEffect || syncFallback;
|
4597
|
+
|
4598
|
+
var isBrowser$1 = typeof document !== 'undefined';
|
4599
|
+
var hasOwnProperty = {}.hasOwnProperty;
|
4600
|
+
|
4601
|
+
var EmotionCacheContext = /* #__PURE__ */React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
|
4602
|
+
// because this module is primarily intended for the browser and node
|
4603
|
+
// but it's also required in react native and similar environments sometimes
|
4604
|
+
// and we could have a special build just for that
|
4605
|
+
// but this is much easier and the native packages
|
4606
|
+
// might use a different theme context in the future anyway
|
4607
|
+
typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
|
4608
|
+
key: 'css'
|
4609
|
+
}) : null);
|
4610
|
+
|
4611
|
+
if (process.env.NODE_ENV !== 'production') {
|
4612
|
+
EmotionCacheContext.displayName = 'EmotionCacheContext';
|
4613
|
+
}
|
4614
|
+
|
4615
|
+
EmotionCacheContext.Provider;
|
4616
|
+
|
4617
|
+
var withEmotionCache = function withEmotionCache(func) {
|
4618
|
+
// $FlowFixMe
|
4619
|
+
return /*#__PURE__*/forwardRef(function (props, ref) {
|
4620
|
+
// the cache will never be null in the browser
|
4621
|
+
var cache = useContext(EmotionCacheContext);
|
4622
|
+
return func(props, cache, ref);
|
4623
|
+
});
|
4624
|
+
};
|
4625
|
+
|
4626
|
+
if (!isBrowser$1) {
|
4627
|
+
withEmotionCache = function withEmotionCache(func) {
|
4628
|
+
return function (props) {
|
4629
|
+
var cache = useContext(EmotionCacheContext);
|
4630
|
+
|
4631
|
+
if (cache === null) {
|
4632
|
+
// yes, we're potentially creating this on every render
|
4633
|
+
// it doesn't actually matter though since it's only on the server
|
4634
|
+
// so there will only every be a single render
|
4635
|
+
// that could change in the future because of suspense and etc. but for now,
|
4636
|
+
// this works and i don't want to optimise for a future thing that we aren't sure about
|
4637
|
+
cache = createCache({
|
4638
|
+
key: 'css'
|
4639
|
+
});
|
4640
|
+
return /*#__PURE__*/React.createElement(EmotionCacheContext.Provider, {
|
4641
|
+
value: cache
|
4642
|
+
}, func(props, cache));
|
4643
|
+
} else {
|
4644
|
+
return func(props, cache);
|
4645
|
+
}
|
4646
|
+
};
|
4647
|
+
};
|
4648
|
+
}
|
4649
|
+
|
4650
|
+
var ThemeContext = /* #__PURE__ */React.createContext({});
|
4651
|
+
|
4652
|
+
if (process.env.NODE_ENV !== 'production') {
|
4653
|
+
ThemeContext.displayName = 'EmotionThemeContext';
|
4654
|
+
}
|
4655
|
+
|
4656
|
+
var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
|
4657
|
+
var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
|
4658
|
+
|
4659
|
+
var Insertion$1 = function Insertion(_ref) {
|
4660
|
+
var cache = _ref.cache,
|
4661
|
+
serialized = _ref.serialized,
|
4662
|
+
isStringTag = _ref.isStringTag;
|
4663
|
+
registerStyles(cache, serialized, isStringTag);
|
4664
|
+
var rules = useInsertionEffectAlwaysWithSyncFallback(function () {
|
4665
|
+
return insertStyles(cache, serialized, isStringTag);
|
4666
|
+
});
|
4667
|
+
|
4668
|
+
if (!isBrowser$1 && rules !== undefined) {
|
4669
|
+
var _ref2;
|
4670
|
+
|
4671
|
+
var serializedNames = serialized.name;
|
4672
|
+
var next = serialized.next;
|
4673
|
+
|
4674
|
+
while (next !== undefined) {
|
4675
|
+
serializedNames += ' ' + next.name;
|
4676
|
+
next = next.next;
|
4677
|
+
}
|
4678
|
+
|
4679
|
+
return /*#__PURE__*/React.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
|
4680
|
+
__html: rules
|
4681
|
+
}, _ref2.nonce = cache.sheet.nonce, _ref2));
|
4682
|
+
}
|
4683
|
+
|
4684
|
+
return null;
|
4685
|
+
};
|
4686
|
+
|
4687
|
+
var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
|
4688
|
+
var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works
|
4689
|
+
// not passing the registered cache to serializeStyles because it would
|
4690
|
+
// make certain babel optimisations not possible
|
4691
|
+
|
4692
|
+
if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {
|
4693
|
+
cssProp = cache.registered[cssProp];
|
4694
|
+
}
|
4695
|
+
|
4696
|
+
var WrappedComponent = props[typePropName];
|
4697
|
+
var registeredStyles = [cssProp];
|
4698
|
+
var className = '';
|
4699
|
+
|
4700
|
+
if (typeof props.className === 'string') {
|
4701
|
+
className = getRegisteredStyles(cache.registered, registeredStyles, props.className);
|
4702
|
+
} else if (props.className != null) {
|
4703
|
+
className = props.className + " ";
|
4704
|
+
}
|
4705
|
+
|
4706
|
+
var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext));
|
4707
|
+
|
4708
|
+
if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {
|
4709
|
+
var labelFromStack = props[labelPropName];
|
4710
|
+
|
4711
|
+
if (labelFromStack) {
|
4712
|
+
serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);
|
4713
|
+
}
|
4714
|
+
}
|
4715
|
+
|
4716
|
+
className += cache.key + "-" + serialized.name;
|
4717
|
+
var newProps = {};
|
4718
|
+
|
4719
|
+
for (var key in props) {
|
4720
|
+
if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {
|
4721
|
+
newProps[key] = props[key];
|
4722
|
+
}
|
4723
|
+
}
|
4724
|
+
|
4725
|
+
newProps.ref = ref;
|
4726
|
+
newProps.className = className;
|
4727
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion$1, {
|
4728
|
+
cache: cache,
|
4729
|
+
serialized: serialized,
|
4730
|
+
isStringTag: typeof WrappedComponent === 'string'
|
4731
|
+
}), /*#__PURE__*/React.createElement(WrappedComponent, newProps));
|
4732
|
+
});
|
4733
|
+
|
4734
|
+
if (process.env.NODE_ENV !== 'production') {
|
4735
|
+
Emotion.displayName = 'EmotionCssPropInternal';
|
4736
|
+
}
|
4737
|
+
|
4738
|
+
var testOmitPropsOnStringTag = isPropValid;
|
4739
|
+
|
4740
|
+
var testOmitPropsOnComponent = function testOmitPropsOnComponent(key) {
|
4741
|
+
return key !== 'theme';
|
4742
|
+
};
|
4743
|
+
|
4744
|
+
var getDefaultShouldForwardProp = function getDefaultShouldForwardProp(tag) {
|
4745
|
+
return typeof tag === 'string' && // 96 is one less than the char code
|
4746
|
+
// for "a" so this is checking that
|
4747
|
+
// it's a lowercase character
|
4748
|
+
tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;
|
4749
|
+
};
|
4750
|
+
var composeShouldForwardProps = function composeShouldForwardProps(tag, options, isReal) {
|
4751
|
+
var shouldForwardProp;
|
4752
|
+
|
4753
|
+
if (options) {
|
4754
|
+
var optionsShouldForwardProp = options.shouldForwardProp;
|
4755
|
+
shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function (propName) {
|
4756
|
+
return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);
|
4757
|
+
} : optionsShouldForwardProp;
|
4758
|
+
}
|
4759
|
+
|
4760
|
+
if (typeof shouldForwardProp !== 'function' && isReal) {
|
4761
|
+
shouldForwardProp = tag.__emotion_forwardProp;
|
4762
|
+
}
|
4763
|
+
|
4764
|
+
return shouldForwardProp;
|
4765
|
+
};
|
4766
|
+
|
4767
|
+
var ILLEGAL_ESCAPE_SEQUENCE_ERROR = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences";
|
4768
|
+
var isBrowser = typeof document !== 'undefined';
|
4769
|
+
|
4770
|
+
var Insertion = function Insertion(_ref) {
|
4771
|
+
var cache = _ref.cache,
|
4772
|
+
serialized = _ref.serialized,
|
4773
|
+
isStringTag = _ref.isStringTag;
|
4774
|
+
registerStyles(cache, serialized, isStringTag);
|
4775
|
+
var rules = useInsertionEffectAlwaysWithSyncFallback(function () {
|
4776
|
+
return insertStyles(cache, serialized, isStringTag);
|
4777
|
+
});
|
4778
|
+
|
4779
|
+
if (!isBrowser && rules !== undefined) {
|
4780
|
+
var _ref2;
|
4781
|
+
|
4782
|
+
var serializedNames = serialized.name;
|
4783
|
+
var next = serialized.next;
|
4784
|
+
|
4785
|
+
while (next !== undefined) {
|
4786
|
+
serializedNames += ' ' + next.name;
|
4787
|
+
next = next.next;
|
4788
|
+
}
|
4789
|
+
|
4790
|
+
return /*#__PURE__*/React.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
|
4791
|
+
__html: rules
|
4792
|
+
}, _ref2.nonce = cache.sheet.nonce, _ref2));
|
4793
|
+
}
|
4794
|
+
|
4795
|
+
return null;
|
4796
|
+
};
|
4797
|
+
|
4798
|
+
var createStyled$1 = function createStyled(tag, options) {
|
4799
|
+
if (process.env.NODE_ENV !== 'production') {
|
4800
|
+
if (tag === undefined) {
|
4801
|
+
throw new Error('You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.');
|
4802
|
+
}
|
4803
|
+
}
|
4804
|
+
|
4805
|
+
var isReal = tag.__emotion_real === tag;
|
4806
|
+
var baseTag = isReal && tag.__emotion_base || tag;
|
4807
|
+
var identifierName;
|
4808
|
+
var targetClassName;
|
4809
|
+
|
4810
|
+
if (options !== undefined) {
|
4811
|
+
identifierName = options.label;
|
4812
|
+
targetClassName = options.target;
|
4813
|
+
}
|
4814
|
+
|
4815
|
+
var shouldForwardProp = composeShouldForwardProps(tag, options, isReal);
|
4816
|
+
var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag);
|
4817
|
+
var shouldUseAs = !defaultShouldForwardProp('as');
|
4818
|
+
return function () {
|
4819
|
+
var args = arguments;
|
4820
|
+
var styles = isReal && tag.__emotion_styles !== undefined ? tag.__emotion_styles.slice(0) : [];
|
4821
|
+
|
4822
|
+
if (identifierName !== undefined) {
|
4823
|
+
styles.push("label:" + identifierName + ";");
|
4824
|
+
}
|
4825
|
+
|
4826
|
+
if (args[0] == null || args[0].raw === undefined) {
|
4827
|
+
styles.push.apply(styles, args);
|
4828
|
+
} else {
|
4829
|
+
if (process.env.NODE_ENV !== 'production' && args[0][0] === undefined) {
|
4830
|
+
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);
|
4831
|
+
}
|
4832
|
+
|
4833
|
+
styles.push(args[0][0]);
|
4834
|
+
var len = args.length;
|
4835
|
+
var i = 1;
|
4836
|
+
|
4837
|
+
for (; i < len; i++) {
|
4838
|
+
if (process.env.NODE_ENV !== 'production' && args[0][i] === undefined) {
|
4839
|
+
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);
|
4840
|
+
}
|
4841
|
+
|
4842
|
+
styles.push(args[i], args[0][i]);
|
4843
|
+
}
|
4844
|
+
} // $FlowFixMe: we need to cast StatelessFunctionalComponent to our PrivateStyledComponent class
|
4845
|
+
|
4846
|
+
|
4847
|
+
var Styled = withEmotionCache(function (props, cache, ref) {
|
4848
|
+
var FinalTag = shouldUseAs && props.as || baseTag;
|
4849
|
+
var className = '';
|
4850
|
+
var classInterpolations = [];
|
4851
|
+
var mergedProps = props;
|
4852
|
+
|
4853
|
+
if (props.theme == null) {
|
4854
|
+
mergedProps = {};
|
4855
|
+
|
4856
|
+
for (var key in props) {
|
4857
|
+
mergedProps[key] = props[key];
|
4858
|
+
}
|
4859
|
+
|
4860
|
+
mergedProps.theme = React.useContext(ThemeContext);
|
4861
|
+
}
|
4862
|
+
|
4863
|
+
if (typeof props.className === 'string') {
|
4864
|
+
className = getRegisteredStyles(cache.registered, classInterpolations, props.className);
|
4865
|
+
} else if (props.className != null) {
|
4866
|
+
className = props.className + " ";
|
4867
|
+
}
|
4868
|
+
|
4869
|
+
var serialized = serializeStyles(styles.concat(classInterpolations), cache.registered, mergedProps);
|
4870
|
+
className += cache.key + "-" + serialized.name;
|
4871
|
+
|
4872
|
+
if (targetClassName !== undefined) {
|
4873
|
+
className += " " + targetClassName;
|
4874
|
+
}
|
4875
|
+
|
4876
|
+
var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getDefaultShouldForwardProp(FinalTag) : defaultShouldForwardProp;
|
4877
|
+
var newProps = {};
|
4878
|
+
|
4879
|
+
for (var _key in props) {
|
4880
|
+
if (shouldUseAs && _key === 'as') continue;
|
4881
|
+
|
4882
|
+
if ( // $FlowFixMe
|
4883
|
+
finalShouldForwardProp(_key)) {
|
4884
|
+
newProps[_key] = props[_key];
|
4885
|
+
}
|
4886
|
+
}
|
4887
|
+
|
4888
|
+
newProps.className = className;
|
4889
|
+
newProps.ref = ref;
|
4890
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {
|
4891
|
+
cache: cache,
|
4892
|
+
serialized: serialized,
|
4893
|
+
isStringTag: typeof FinalTag === 'string'
|
4894
|
+
}), /*#__PURE__*/React.createElement(FinalTag, newProps));
|
4895
|
+
});
|
4896
|
+
Styled.displayName = identifierName !== undefined ? identifierName : "Styled(" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + ")";
|
4897
|
+
Styled.defaultProps = tag.defaultProps;
|
4898
|
+
Styled.__emotion_real = Styled;
|
4899
|
+
Styled.__emotion_base = baseTag;
|
4900
|
+
Styled.__emotion_styles = styles;
|
4901
|
+
Styled.__emotion_forwardProp = shouldForwardProp;
|
4902
|
+
Object.defineProperty(Styled, 'toString', {
|
4903
|
+
value: function value() {
|
4904
|
+
if (targetClassName === undefined && process.env.NODE_ENV !== 'production') {
|
4905
|
+
return 'NO_COMPONENT_SELECTOR';
|
4906
|
+
} // $FlowFixMe: coerce undefined to string
|
4907
|
+
|
4908
|
+
|
4909
|
+
return "." + targetClassName;
|
4910
|
+
}
|
4911
|
+
});
|
4912
|
+
|
4913
|
+
Styled.withComponent = function (nextTag, nextOptions) {
|
4914
|
+
return createStyled(nextTag, _extends({}, options, nextOptions, {
|
4915
|
+
shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)
|
4916
|
+
})).apply(void 0, styles);
|
4917
|
+
};
|
4918
|
+
|
4919
|
+
return Styled;
|
4920
|
+
};
|
4921
|
+
};
|
4922
|
+
|
4923
|
+
var tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG
|
4924
|
+
'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
|
4925
|
+
|
4926
|
+
var newStyled = createStyled$1.bind();
|
4927
|
+
tags.forEach(function (tagName) {
|
4928
|
+
// $FlowFixMe: we can ignore this because its exposed type is defined by the CreateStyled type
|
4929
|
+
newStyled[tagName] = newStyled(tagName);
|
4930
|
+
});
|
4931
|
+
|
4932
|
+
/**
|
4933
|
+
* @mui/styled-engine v5.13.2
|
4934
|
+
*
|
4935
|
+
* @license MIT
|
4936
|
+
* This source code is licensed under the MIT license found in the
|
4937
|
+
* LICENSE file in the root directory of this source tree.
|
4938
|
+
*/
|
4939
|
+
function styled$2(tag, options) {
|
4940
|
+
const stylesFactory = newStyled(tag, options);
|
4941
|
+
if (process.env.NODE_ENV !== 'production') {
|
4942
|
+
return (...styles) => {
|
4943
|
+
const component = typeof tag === 'string' ? `"${tag}"` : 'component';
|
4944
|
+
if (styles.length === 0) {
|
4945
|
+
console.error([`MUI: Seems like you called \`styled(${component})()\` without a \`style\` argument.`, 'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join('\n'));
|
4946
|
+
} else if (styles.some(style => style === undefined)) {
|
4947
|
+
console.error(`MUI: the styled(${component})(...args) API requires all its args to be defined.`);
|
4948
|
+
}
|
4949
|
+
return stylesFactory(...styles);
|
4950
|
+
};
|
4951
|
+
}
|
4952
|
+
return stylesFactory;
|
4953
|
+
}
|
4954
|
+
|
4955
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
4956
|
+
const internal_processStyles = (tag, processor) => {
|
4957
|
+
// Emotion attaches all the styles as `__emotion_styles`.
|
4958
|
+
// Ref: https://github.com/emotion-js/emotion/blob/16d971d0da229596d6bcc39d282ba9753c9ee7cf/packages/styled/src/base.js#L186
|
4959
|
+
if (Array.isArray(tag.__emotion_styles)) {
|
4960
|
+
tag.__emotion_styles = processor(tag.__emotion_styles);
|
4961
|
+
}
|
4962
|
+
};
|
4963
|
+
|
4964
|
+
const _excluded$8 = ["values", "unit", "step"];
|
4965
|
+
const sortBreakpointsValues = values => {
|
4966
|
+
const breakpointsAsArray = Object.keys(values).map(key => ({
|
4967
|
+
key,
|
4968
|
+
val: values[key]
|
2330
4969
|
})) || [];
|
2331
4970
|
// Sort in ascending order
|
2332
4971
|
breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);
|
@@ -2357,7 +4996,7 @@ function createBreakpoints(breakpoints) {
|
|
2357
4996
|
unit = 'px',
|
2358
4997
|
step = 5
|
2359
4998
|
} = breakpoints,
|
2360
|
-
other = _objectWithoutPropertiesLoose(breakpoints, _excluded$
|
4999
|
+
other = _objectWithoutPropertiesLoose(breakpoints, _excluded$8);
|
2361
5000
|
const sortedValues = sortBreakpointsValues(values);
|
2362
5001
|
const keys = Object.keys(sortedValues);
|
2363
5002
|
function up(key) {
|
@@ -3386,7 +6025,7 @@ const styleFunctionSx = unstable_createStyleFunctionSx();
|
|
3386
6025
|
styleFunctionSx.filterProps = ['sx'];
|
3387
6026
|
var styleFunctionSx$1 = styleFunctionSx;
|
3388
6027
|
|
3389
|
-
const _excluded$
|
6028
|
+
const _excluded$7 = ["breakpoints", "palette", "spacing", "shape"];
|
3390
6029
|
function createTheme$1(options = {}, ...args) {
|
3391
6030
|
const {
|
3392
6031
|
breakpoints: breakpointsInput = {},
|
@@ -3394,7 +6033,7 @@ function createTheme$1(options = {}, ...args) {
|
|
3394
6033
|
spacing: spacingInput,
|
3395
6034
|
shape: shapeInput = {}
|
3396
6035
|
} = options,
|
3397
|
-
other = _objectWithoutPropertiesLoose(options, _excluded$
|
6036
|
+
other = _objectWithoutPropertiesLoose(options, _excluded$7);
|
3398
6037
|
const breakpoints = createBreakpoints(breakpointsInput);
|
3399
6038
|
const spacing = createSpacing(spacingInput);
|
3400
6039
|
let muiTheme = deepmerge({
|
@@ -3419,6 +6058,285 @@ function createTheme$1(options = {}, ...args) {
|
|
3419
6058
|
return muiTheme;
|
3420
6059
|
}
|
3421
6060
|
|
6061
|
+
function isObjectEmpty(obj) {
|
6062
|
+
return Object.keys(obj).length === 0;
|
6063
|
+
}
|
6064
|
+
function useTheme$1(defaultTheme = null) {
|
6065
|
+
const contextTheme = React.useContext(ThemeContext);
|
6066
|
+
return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;
|
6067
|
+
}
|
6068
|
+
|
6069
|
+
const systemDefaultTheme$1 = createTheme$1();
|
6070
|
+
function useTheme(defaultTheme = systemDefaultTheme$1) {
|
6071
|
+
return useTheme$1(defaultTheme);
|
6072
|
+
}
|
6073
|
+
|
6074
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
6075
|
+
|
6076
|
+
const _excluded$6 = ["variant"];
|
6077
|
+
function isEmpty$1(string) {
|
6078
|
+
return string.length === 0;
|
6079
|
+
}
|
6080
|
+
|
6081
|
+
/**
|
6082
|
+
* Generates string classKey based on the properties provided. It starts with the
|
6083
|
+
* variant if defined, and then it appends all other properties in alphabetical order.
|
6084
|
+
* @param {object} props - the properties for which the classKey should be created.
|
6085
|
+
*/
|
6086
|
+
function propsToClassKey(props) {
|
6087
|
+
const {
|
6088
|
+
variant
|
6089
|
+
} = props,
|
6090
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$6);
|
6091
|
+
let classKey = variant || '';
|
6092
|
+
Object.keys(other).sort().forEach(key => {
|
6093
|
+
if (key === 'color') {
|
6094
|
+
classKey += isEmpty$1(classKey) ? props[key] : capitalize(props[key]);
|
6095
|
+
} else {
|
6096
|
+
classKey += `${isEmpty$1(classKey) ? key : capitalize(key)}${capitalize(props[key].toString())}`;
|
6097
|
+
}
|
6098
|
+
});
|
6099
|
+
return classKey;
|
6100
|
+
}
|
6101
|
+
|
6102
|
+
const _excluded$5 = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"];
|
6103
|
+
function isEmpty(obj) {
|
6104
|
+
return Object.keys(obj).length === 0;
|
6105
|
+
}
|
6106
|
+
|
6107
|
+
// https://github.com/emotion-js/emotion/blob/26ded6109fcd8ca9875cc2ce4564fee678a3f3c5/packages/styled/src/utils.js#L40
|
6108
|
+
function isStringTag(tag) {
|
6109
|
+
return typeof tag === 'string' &&
|
6110
|
+
// 96 is one less than the char code
|
6111
|
+
// for "a" so this is checking that
|
6112
|
+
// it's a lowercase character
|
6113
|
+
tag.charCodeAt(0) > 96;
|
6114
|
+
}
|
6115
|
+
const getStyleOverrides = (name, theme) => {
|
6116
|
+
if (theme.components && theme.components[name] && theme.components[name].styleOverrides) {
|
6117
|
+
return theme.components[name].styleOverrides;
|
6118
|
+
}
|
6119
|
+
return null;
|
6120
|
+
};
|
6121
|
+
const getVariantStyles = (name, theme) => {
|
6122
|
+
let variants = [];
|
6123
|
+
if (theme && theme.components && theme.components[name] && theme.components[name].variants) {
|
6124
|
+
variants = theme.components[name].variants;
|
6125
|
+
}
|
6126
|
+
const variantsStyles = {};
|
6127
|
+
variants.forEach(definition => {
|
6128
|
+
const key = propsToClassKey(definition.props);
|
6129
|
+
variantsStyles[key] = definition.style;
|
6130
|
+
});
|
6131
|
+
return variantsStyles;
|
6132
|
+
};
|
6133
|
+
const variantsResolver = (props, styles, theme, name) => {
|
6134
|
+
var _theme$components, _theme$components$nam;
|
6135
|
+
const {
|
6136
|
+
ownerState = {}
|
6137
|
+
} = props;
|
6138
|
+
const variantsStyles = [];
|
6139
|
+
const themeVariants = theme == null ? void 0 : (_theme$components = theme.components) == null ? void 0 : (_theme$components$nam = _theme$components[name]) == null ? void 0 : _theme$components$nam.variants;
|
6140
|
+
if (themeVariants) {
|
6141
|
+
themeVariants.forEach(themeVariant => {
|
6142
|
+
let isMatch = true;
|
6143
|
+
Object.keys(themeVariant.props).forEach(key => {
|
6144
|
+
if (ownerState[key] !== themeVariant.props[key] && props[key] !== themeVariant.props[key]) {
|
6145
|
+
isMatch = false;
|
6146
|
+
}
|
6147
|
+
});
|
6148
|
+
if (isMatch) {
|
6149
|
+
variantsStyles.push(styles[propsToClassKey(themeVariant.props)]);
|
6150
|
+
}
|
6151
|
+
});
|
6152
|
+
}
|
6153
|
+
return variantsStyles;
|
6154
|
+
};
|
6155
|
+
|
6156
|
+
// Update /system/styled/#api in case if this changes
|
6157
|
+
function shouldForwardProp(prop) {
|
6158
|
+
return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';
|
6159
|
+
}
|
6160
|
+
const systemDefaultTheme = createTheme$1();
|
6161
|
+
const lowercaseFirstLetter = string => {
|
6162
|
+
return string.charAt(0).toLowerCase() + string.slice(1);
|
6163
|
+
};
|
6164
|
+
function resolveTheme({
|
6165
|
+
defaultTheme,
|
6166
|
+
theme,
|
6167
|
+
themeId
|
6168
|
+
}) {
|
6169
|
+
return isEmpty(theme) ? defaultTheme : theme[themeId] || theme;
|
6170
|
+
}
|
6171
|
+
function createStyled(input = {}) {
|
6172
|
+
const {
|
6173
|
+
themeId,
|
6174
|
+
defaultTheme = systemDefaultTheme,
|
6175
|
+
rootShouldForwardProp = shouldForwardProp,
|
6176
|
+
slotShouldForwardProp = shouldForwardProp
|
6177
|
+
} = input;
|
6178
|
+
const systemSx = props => {
|
6179
|
+
return styleFunctionSx$1(_extends({}, props, {
|
6180
|
+
theme: resolveTheme(_extends({}, props, {
|
6181
|
+
defaultTheme,
|
6182
|
+
themeId
|
6183
|
+
}))
|
6184
|
+
}));
|
6185
|
+
};
|
6186
|
+
systemSx.__mui_systemSx = true;
|
6187
|
+
return (tag, inputOptions = {}) => {
|
6188
|
+
// Filter out the `sx` style function from the previous styled component to prevent unnecessary styles generated by the composite components.
|
6189
|
+
internal_processStyles(tag, styles => styles.filter(style => !(style != null && style.__mui_systemSx)));
|
6190
|
+
const {
|
6191
|
+
name: componentName,
|
6192
|
+
slot: componentSlot,
|
6193
|
+
skipVariantsResolver: inputSkipVariantsResolver,
|
6194
|
+
skipSx: inputSkipSx,
|
6195
|
+
overridesResolver
|
6196
|
+
} = inputOptions,
|
6197
|
+
options = _objectWithoutPropertiesLoose(inputOptions, _excluded$5);
|
6198
|
+
|
6199
|
+
// if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.
|
6200
|
+
const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver : componentSlot && componentSlot !== 'Root' || false;
|
6201
|
+
const skipSx = inputSkipSx || false;
|
6202
|
+
let label;
|
6203
|
+
if (process.env.NODE_ENV !== 'production') {
|
6204
|
+
if (componentName) {
|
6205
|
+
label = `${componentName}-${lowercaseFirstLetter(componentSlot || 'Root')}`;
|
6206
|
+
}
|
6207
|
+
}
|
6208
|
+
let shouldForwardPropOption = shouldForwardProp;
|
6209
|
+
if (componentSlot === 'Root') {
|
6210
|
+
shouldForwardPropOption = rootShouldForwardProp;
|
6211
|
+
} else if (componentSlot) {
|
6212
|
+
// any other slot specified
|
6213
|
+
shouldForwardPropOption = slotShouldForwardProp;
|
6214
|
+
} else if (isStringTag(tag)) {
|
6215
|
+
// for string (html) tag, preserve the behavior in emotion & styled-components.
|
6216
|
+
shouldForwardPropOption = undefined;
|
6217
|
+
}
|
6218
|
+
const defaultStyledResolver = styled$2(tag, _extends({
|
6219
|
+
shouldForwardProp: shouldForwardPropOption,
|
6220
|
+
label
|
6221
|
+
}, options));
|
6222
|
+
const muiStyledResolver = (styleArg, ...expressions) => {
|
6223
|
+
const expressionsWithDefaultTheme = expressions ? expressions.map(stylesArg => {
|
6224
|
+
// On the server Emotion doesn't use React.forwardRef for creating components, so the created
|
6225
|
+
// component stays as a function. This condition makes sure that we do not interpolate functions
|
6226
|
+
// which are basically components used as a selectors.
|
6227
|
+
return typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg ? props => {
|
6228
|
+
return stylesArg(_extends({}, props, {
|
6229
|
+
theme: resolveTheme(_extends({}, props, {
|
6230
|
+
defaultTheme,
|
6231
|
+
themeId
|
6232
|
+
}))
|
6233
|
+
}));
|
6234
|
+
} : stylesArg;
|
6235
|
+
}) : [];
|
6236
|
+
let transformedStyleArg = styleArg;
|
6237
|
+
if (componentName && overridesResolver) {
|
6238
|
+
expressionsWithDefaultTheme.push(props => {
|
6239
|
+
const theme = resolveTheme(_extends({}, props, {
|
6240
|
+
defaultTheme,
|
6241
|
+
themeId
|
6242
|
+
}));
|
6243
|
+
const styleOverrides = getStyleOverrides(componentName, theme);
|
6244
|
+
if (styleOverrides) {
|
6245
|
+
const resolvedStyleOverrides = {};
|
6246
|
+
Object.entries(styleOverrides).forEach(([slotKey, slotStyle]) => {
|
6247
|
+
resolvedStyleOverrides[slotKey] = typeof slotStyle === 'function' ? slotStyle(_extends({}, props, {
|
6248
|
+
theme
|
6249
|
+
})) : slotStyle;
|
6250
|
+
});
|
6251
|
+
return overridesResolver(props, resolvedStyleOverrides);
|
6252
|
+
}
|
6253
|
+
return null;
|
6254
|
+
});
|
6255
|
+
}
|
6256
|
+
if (componentName && !skipVariantsResolver) {
|
6257
|
+
expressionsWithDefaultTheme.push(props => {
|
6258
|
+
const theme = resolveTheme(_extends({}, props, {
|
6259
|
+
defaultTheme,
|
6260
|
+
themeId
|
6261
|
+
}));
|
6262
|
+
return variantsResolver(props, getVariantStyles(componentName, theme), theme, componentName);
|
6263
|
+
});
|
6264
|
+
}
|
6265
|
+
if (!skipSx) {
|
6266
|
+
expressionsWithDefaultTheme.push(systemSx);
|
6267
|
+
}
|
6268
|
+
const numOfCustomFnsApplied = expressionsWithDefaultTheme.length - expressions.length;
|
6269
|
+
if (Array.isArray(styleArg) && numOfCustomFnsApplied > 0) {
|
6270
|
+
const placeholders = new Array(numOfCustomFnsApplied).fill('');
|
6271
|
+
// If the type is array, than we need to add placeholders in the template for the overrides, variants and the sx styles.
|
6272
|
+
transformedStyleArg = [...styleArg, ...placeholders];
|
6273
|
+
transformedStyleArg.raw = [...styleArg.raw, ...placeholders];
|
6274
|
+
} else if (typeof styleArg === 'function' &&
|
6275
|
+
// On the server Emotion doesn't use React.forwardRef for creating components, so the created
|
6276
|
+
// component stays as a function. This condition makes sure that we do not interpolate functions
|
6277
|
+
// which are basically components used as a selectors.
|
6278
|
+
styleArg.__emotion_real !== styleArg) {
|
6279
|
+
// If the type is function, we need to define the default theme.
|
6280
|
+
transformedStyleArg = props => styleArg(_extends({}, props, {
|
6281
|
+
theme: resolveTheme(_extends({}, props, {
|
6282
|
+
defaultTheme,
|
6283
|
+
themeId
|
6284
|
+
}))
|
6285
|
+
}));
|
6286
|
+
}
|
6287
|
+
const Component = defaultStyledResolver(transformedStyleArg, ...expressionsWithDefaultTheme);
|
6288
|
+
if (process.env.NODE_ENV !== 'production') {
|
6289
|
+
let displayName;
|
6290
|
+
if (componentName) {
|
6291
|
+
displayName = `${componentName}${componentSlot || ''}`;
|
6292
|
+
}
|
6293
|
+
if (displayName === undefined) {
|
6294
|
+
displayName = `Styled(${getDisplayName(tag)})`;
|
6295
|
+
}
|
6296
|
+
Component.displayName = displayName;
|
6297
|
+
}
|
6298
|
+
if (tag.muiName) {
|
6299
|
+
Component.muiName = tag.muiName;
|
6300
|
+
}
|
6301
|
+
return Component;
|
6302
|
+
};
|
6303
|
+
if (defaultStyledResolver.withConfig) {
|
6304
|
+
muiStyledResolver.withConfig = defaultStyledResolver.withConfig;
|
6305
|
+
}
|
6306
|
+
return muiStyledResolver;
|
6307
|
+
};
|
6308
|
+
}
|
6309
|
+
|
6310
|
+
function getThemeProps(params) {
|
6311
|
+
const {
|
6312
|
+
theme,
|
6313
|
+
name,
|
6314
|
+
props
|
6315
|
+
} = params;
|
6316
|
+
if (!theme || !theme.components || !theme.components[name] || !theme.components[name].defaultProps) {
|
6317
|
+
return props;
|
6318
|
+
}
|
6319
|
+
return resolveProps(theme.components[name].defaultProps, props);
|
6320
|
+
}
|
6321
|
+
|
6322
|
+
function useThemeProps$1({
|
6323
|
+
props,
|
6324
|
+
name,
|
6325
|
+
defaultTheme,
|
6326
|
+
themeId
|
6327
|
+
}) {
|
6328
|
+
let theme = useTheme(defaultTheme);
|
6329
|
+
if (themeId) {
|
6330
|
+
theme = theme[themeId] || theme;
|
6331
|
+
}
|
6332
|
+
const mergedProps = getThemeProps({
|
6333
|
+
theme,
|
6334
|
+
name,
|
6335
|
+
props
|
6336
|
+
});
|
6337
|
+
return mergedProps;
|
6338
|
+
}
|
6339
|
+
|
3422
6340
|
/* eslint-disable @typescript-eslint/naming-convention */
|
3423
6341
|
/**
|
3424
6342
|
* Returns a number whose value is limited to the given range.
|
@@ -3780,7 +6698,7 @@ const green = {
|
|
3780
6698
|
};
|
3781
6699
|
var green$1 = green;
|
3782
6700
|
|
3783
|
-
const _excluded$
|
6701
|
+
const _excluded$4 = ["mode", "contrastThreshold", "tonalOffset"];
|
3784
6702
|
const light = {
|
3785
6703
|
// The colors used to style the text.
|
3786
6704
|
text: {
|
@@ -3949,7 +6867,7 @@ function createPalette(palette) {
|
|
3949
6867
|
contrastThreshold = 3,
|
3950
6868
|
tonalOffset = 0.2
|
3951
6869
|
} = palette,
|
3952
|
-
other = _objectWithoutPropertiesLoose(palette, _excluded$
|
6870
|
+
other = _objectWithoutPropertiesLoose(palette, _excluded$4);
|
3953
6871
|
const primary = palette.primary || getDefaultPrimary(mode);
|
3954
6872
|
const secondary = palette.secondary || getDefaultSecondary(mode);
|
3955
6873
|
const error = palette.error || getDefaultError(mode);
|
@@ -4073,7 +6991,7 @@ const theme2 = createTheme({ palette: {
|
|
4073
6991
|
return paletteOutput;
|
4074
6992
|
}
|
4075
6993
|
|
4076
|
-
const _excluded$
|
6994
|
+
const _excluded$3 = ["fontFamily", "fontSize", "fontWeightLight", "fontWeightRegular", "fontWeightMedium", "fontWeightBold", "htmlFontSize", "allVariants", "pxToRem"];
|
4077
6995
|
function round(value) {
|
4078
6996
|
return Math.round(value * 1e5) / 1e5;
|
4079
6997
|
}
|
@@ -4104,7 +7022,7 @@ function createTypography(palette, typography) {
|
|
4104
7022
|
allVariants,
|
4105
7023
|
pxToRem: pxToRem2
|
4106
7024
|
} = _ref,
|
4107
|
-
other = _objectWithoutPropertiesLoose(_ref, _excluded$
|
7025
|
+
other = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
4108
7026
|
if (process.env.NODE_ENV !== 'production') {
|
4109
7027
|
if (typeof fontSize !== 'number') {
|
4110
7028
|
console.error('MUI: `fontSize` is required to be a number.');
|
@@ -4171,7 +7089,7 @@ function createShadow(...px) {
|
|
4171
7089
|
const shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];
|
4172
7090
|
var shadows$1 = shadows;
|
4173
7091
|
|
4174
|
-
const _excluded$
|
7092
|
+
const _excluded$2 = ["duration", "easing", "delay"];
|
4175
7093
|
// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves
|
4176
7094
|
// to learn the context in which each easing should be used.
|
4177
7095
|
const easing = {
|
@@ -4222,7 +7140,7 @@ function createTransitions(inputTransitions) {
|
|
4222
7140
|
easing: easingOption = mergedEasing.easeInOut,
|
4223
7141
|
delay = 0
|
4224
7142
|
} = options,
|
4225
|
-
other = _objectWithoutPropertiesLoose(options, _excluded$
|
7143
|
+
other = _objectWithoutPropertiesLoose(options, _excluded$2);
|
4226
7144
|
if (process.env.NODE_ENV !== 'production') {
|
4227
7145
|
const isString = value => typeof value === 'string';
|
4228
7146
|
// IE11 support, replace with Number.isNaN
|
@@ -4269,7 +7187,7 @@ const zIndex = {
|
|
4269
7187
|
};
|
4270
7188
|
var zIndex$1 = zIndex;
|
4271
7189
|
|
4272
|
-
const _excluded = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"];
|
7190
|
+
const _excluded$1 = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"];
|
4273
7191
|
function createTheme(options = {}, ...args) {
|
4274
7192
|
const {
|
4275
7193
|
mixins: mixinsInput = {},
|
@@ -4277,7 +7195,7 @@ function createTheme(options = {}, ...args) {
|
|
4277
7195
|
transitions: transitionsInput = {},
|
4278
7196
|
typography: typographyInput = {}
|
4279
7197
|
} = options,
|
4280
|
-
other = _objectWithoutPropertiesLoose(options, _excluded);
|
7198
|
+
other = _objectWithoutPropertiesLoose(options, _excluded$1);
|
4281
7199
|
if (options.vars) {
|
4282
7200
|
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: \`vars\` is a private field used for CSS variables support.
|
4283
7201
|
Please use another name.` : formatMuiErrorMessage(18));
|
@@ -4296,46 +7214,278 @@ Please use another name.` : formatMuiErrorMessage(18));
|
|
4296
7214
|
muiTheme = deepmerge(muiTheme, other);
|
4297
7215
|
muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);
|
4298
7216
|
if (process.env.NODE_ENV !== 'production') {
|
4299
|
-
// TODO v6: Refactor to use globalStateClassesMapping from @mui/utils once `readOnly` state class is used in Rating component.
|
4300
|
-
const stateClasses = ['active', 'checked', 'completed', 'disabled', 'error', 'expanded', 'focused', 'focusVisible', 'required', 'selected'];
|
4301
|
-
const traverse = (node, component) => {
|
4302
|
-
let key;
|
4303
|
-
|
4304
|
-
// eslint-disable-next-line guard-for-in, no-restricted-syntax
|
4305
|
-
for (key in node) {
|
4306
|
-
const child = node[key];
|
4307
|
-
if (stateClasses.indexOf(key) !== -1 && Object.keys(child).length > 0) {
|
4308
|
-
if (process.env.NODE_ENV !== 'production') {
|
4309
|
-
const stateClass = generateUtilityClass('', key);
|
4310
|
-
console.error([`MUI: The \`${component}\` component increases ` + `the CSS specificity of the \`${key}\` internal state.`, 'You can not override it like this: ', JSON.stringify(node, null, 2), '', `Instead, you need to use the '&.${stateClass}' syntax:`, JSON.stringify({
|
4311
|
-
root: {
|
4312
|
-
[`&.${stateClass}`]: child
|
4313
|
-
}
|
4314
|
-
}, null, 2), '', 'https://mui.com/r/state-classes-guide'].join('\n'));
|
4315
|
-
}
|
4316
|
-
// Remove the style to prevent global conflicts.
|
4317
|
-
node[key] = {};
|
4318
|
-
}
|
4319
|
-
}
|
4320
|
-
};
|
4321
|
-
Object.keys(muiTheme.components).forEach(component => {
|
4322
|
-
const styleOverrides = muiTheme.components[component].styleOverrides;
|
4323
|
-
if (styleOverrides && component.indexOf('Mui') === 0) {
|
4324
|
-
traverse(styleOverrides, component);
|
4325
|
-
}
|
4326
|
-
});
|
7217
|
+
// TODO v6: Refactor to use globalStateClassesMapping from @mui/utils once `readOnly` state class is used in Rating component.
|
7218
|
+
const stateClasses = ['active', 'checked', 'completed', 'disabled', 'error', 'expanded', 'focused', 'focusVisible', 'required', 'selected'];
|
7219
|
+
const traverse = (node, component) => {
|
7220
|
+
let key;
|
7221
|
+
|
7222
|
+
// eslint-disable-next-line guard-for-in, no-restricted-syntax
|
7223
|
+
for (key in node) {
|
7224
|
+
const child = node[key];
|
7225
|
+
if (stateClasses.indexOf(key) !== -1 && Object.keys(child).length > 0) {
|
7226
|
+
if (process.env.NODE_ENV !== 'production') {
|
7227
|
+
const stateClass = generateUtilityClass('', key);
|
7228
|
+
console.error([`MUI: The \`${component}\` component increases ` + `the CSS specificity of the \`${key}\` internal state.`, 'You can not override it like this: ', JSON.stringify(node, null, 2), '', `Instead, you need to use the '&.${stateClass}' syntax:`, JSON.stringify({
|
7229
|
+
root: {
|
7230
|
+
[`&.${stateClass}`]: child
|
7231
|
+
}
|
7232
|
+
}, null, 2), '', 'https://mui.com/r/state-classes-guide'].join('\n'));
|
7233
|
+
}
|
7234
|
+
// Remove the style to prevent global conflicts.
|
7235
|
+
node[key] = {};
|
7236
|
+
}
|
7237
|
+
}
|
7238
|
+
};
|
7239
|
+
Object.keys(muiTheme.components).forEach(component => {
|
7240
|
+
const styleOverrides = muiTheme.components[component].styleOverrides;
|
7241
|
+
if (styleOverrides && component.indexOf('Mui') === 0) {
|
7242
|
+
traverse(styleOverrides, component);
|
7243
|
+
}
|
7244
|
+
});
|
7245
|
+
}
|
7246
|
+
muiTheme.unstable_sxConfig = _extends({}, defaultSxConfig$1, other == null ? void 0 : other.unstable_sxConfig);
|
7247
|
+
muiTheme.unstable_sx = function sx(props) {
|
7248
|
+
return styleFunctionSx$1({
|
7249
|
+
sx: props,
|
7250
|
+
theme: this
|
7251
|
+
});
|
7252
|
+
};
|
7253
|
+
return muiTheme;
|
7254
|
+
}
|
7255
|
+
|
7256
|
+
const defaultTheme = createTheme();
|
7257
|
+
var defaultTheme$1 = defaultTheme;
|
7258
|
+
|
7259
|
+
function useThemeProps({
|
7260
|
+
props,
|
7261
|
+
name
|
7262
|
+
}) {
|
7263
|
+
return useThemeProps$1({
|
7264
|
+
props,
|
7265
|
+
name,
|
7266
|
+
defaultTheme: defaultTheme$1,
|
7267
|
+
themeId: THEME_ID
|
7268
|
+
});
|
7269
|
+
}
|
7270
|
+
|
7271
|
+
const rootShouldForwardProp = prop => shouldForwardProp(prop) && prop !== 'classes';
|
7272
|
+
const styled = createStyled({
|
7273
|
+
themeId: THEME_ID,
|
7274
|
+
defaultTheme: defaultTheme$1,
|
7275
|
+
rootShouldForwardProp
|
7276
|
+
});
|
7277
|
+
var styled$1 = styled;
|
7278
|
+
|
7279
|
+
function getSvgIconUtilityClass(slot) {
|
7280
|
+
return generateUtilityClass('MuiSvgIcon', slot);
|
7281
|
+
}
|
7282
|
+
generateUtilityClasses('MuiSvgIcon', ['root', 'colorPrimary', 'colorSecondary', 'colorAction', 'colorError', 'colorDisabled', 'fontSizeInherit', 'fontSizeSmall', 'fontSizeMedium', 'fontSizeLarge']);
|
7283
|
+
|
7284
|
+
const _excluded = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"];
|
7285
|
+
const useUtilityClasses = ownerState => {
|
7286
|
+
const {
|
7287
|
+
color,
|
7288
|
+
fontSize,
|
7289
|
+
classes
|
7290
|
+
} = ownerState;
|
7291
|
+
const slots = {
|
7292
|
+
root: ['root', color !== 'inherit' && `color${capitalize(color)}`, `fontSize${capitalize(fontSize)}`]
|
7293
|
+
};
|
7294
|
+
return composeClasses(slots, getSvgIconUtilityClass, classes);
|
7295
|
+
};
|
7296
|
+
const SvgIconRoot = styled$1('svg', {
|
7297
|
+
name: 'MuiSvgIcon',
|
7298
|
+
slot: 'Root',
|
7299
|
+
overridesResolver: (props, styles) => {
|
7300
|
+
const {
|
7301
|
+
ownerState
|
7302
|
+
} = props;
|
7303
|
+
return [styles.root, ownerState.color !== 'inherit' && styles[`color${capitalize(ownerState.color)}`], styles[`fontSize${capitalize(ownerState.fontSize)}`]];
|
7304
|
+
}
|
7305
|
+
})(({
|
7306
|
+
theme,
|
7307
|
+
ownerState
|
7308
|
+
}) => {
|
7309
|
+
var _theme$transitions, _theme$transitions$cr, _theme$transitions2, _theme$transitions2$d, _theme$typography, _theme$typography$pxT, _theme$typography2, _theme$typography2$px, _theme$typography3, _theme$typography3$px, _palette$ownerState$c, _palette, _palette$ownerState$c2, _palette2, _palette2$action, _palette3, _palette3$action;
|
7310
|
+
return {
|
7311
|
+
userSelect: 'none',
|
7312
|
+
width: '1em',
|
7313
|
+
height: '1em',
|
7314
|
+
display: 'inline-block',
|
7315
|
+
fill: 'currentColor',
|
7316
|
+
flexShrink: 0,
|
7317
|
+
transition: (_theme$transitions = theme.transitions) == null ? void 0 : (_theme$transitions$cr = _theme$transitions.create) == null ? void 0 : _theme$transitions$cr.call(_theme$transitions, 'fill', {
|
7318
|
+
duration: (_theme$transitions2 = theme.transitions) == null ? void 0 : (_theme$transitions2$d = _theme$transitions2.duration) == null ? void 0 : _theme$transitions2$d.shorter
|
7319
|
+
}),
|
7320
|
+
fontSize: {
|
7321
|
+
inherit: 'inherit',
|
7322
|
+
small: ((_theme$typography = theme.typography) == null ? void 0 : (_theme$typography$pxT = _theme$typography.pxToRem) == null ? void 0 : _theme$typography$pxT.call(_theme$typography, 20)) || '1.25rem',
|
7323
|
+
medium: ((_theme$typography2 = theme.typography) == null ? void 0 : (_theme$typography2$px = _theme$typography2.pxToRem) == null ? void 0 : _theme$typography2$px.call(_theme$typography2, 24)) || '1.5rem',
|
7324
|
+
large: ((_theme$typography3 = theme.typography) == null ? void 0 : (_theme$typography3$px = _theme$typography3.pxToRem) == null ? void 0 : _theme$typography3$px.call(_theme$typography3, 35)) || '2.1875rem'
|
7325
|
+
}[ownerState.fontSize],
|
7326
|
+
// TODO v5 deprecate, v6 remove for sx
|
7327
|
+
color: (_palette$ownerState$c = (_palette = (theme.vars || theme).palette) == null ? void 0 : (_palette$ownerState$c2 = _palette[ownerState.color]) == null ? void 0 : _palette$ownerState$c2.main) != null ? _palette$ownerState$c : {
|
7328
|
+
action: (_palette2 = (theme.vars || theme).palette) == null ? void 0 : (_palette2$action = _palette2.action) == null ? void 0 : _palette2$action.active,
|
7329
|
+
disabled: (_palette3 = (theme.vars || theme).palette) == null ? void 0 : (_palette3$action = _palette3.action) == null ? void 0 : _palette3$action.disabled,
|
7330
|
+
inherit: undefined
|
7331
|
+
}[ownerState.color]
|
7332
|
+
};
|
7333
|
+
});
|
7334
|
+
const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
|
7335
|
+
const props = useThemeProps({
|
7336
|
+
props: inProps,
|
7337
|
+
name: 'MuiSvgIcon'
|
7338
|
+
});
|
7339
|
+
const {
|
7340
|
+
children,
|
7341
|
+
className,
|
7342
|
+
color = 'inherit',
|
7343
|
+
component = 'svg',
|
7344
|
+
fontSize = 'medium',
|
7345
|
+
htmlColor,
|
7346
|
+
inheritViewBox = false,
|
7347
|
+
titleAccess,
|
7348
|
+
viewBox = '0 0 24 24'
|
7349
|
+
} = props,
|
7350
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
7351
|
+
const ownerState = _extends({}, props, {
|
7352
|
+
color,
|
7353
|
+
component,
|
7354
|
+
fontSize,
|
7355
|
+
instanceFontSize: inProps.fontSize,
|
7356
|
+
inheritViewBox,
|
7357
|
+
viewBox
|
7358
|
+
});
|
7359
|
+
const more = {};
|
7360
|
+
if (!inheritViewBox) {
|
7361
|
+
more.viewBox = viewBox;
|
7362
|
+
}
|
7363
|
+
const classes = useUtilityClasses(ownerState);
|
7364
|
+
return /*#__PURE__*/jsxs(SvgIconRoot, _extends({
|
7365
|
+
as: component,
|
7366
|
+
className: clsx(classes.root, className),
|
7367
|
+
focusable: "false",
|
7368
|
+
color: htmlColor,
|
7369
|
+
"aria-hidden": titleAccess ? undefined : true,
|
7370
|
+
role: titleAccess ? 'img' : undefined,
|
7371
|
+
ref: ref
|
7372
|
+
}, more, other, {
|
7373
|
+
ownerState: ownerState,
|
7374
|
+
children: [children, titleAccess ? /*#__PURE__*/jsx("title", {
|
7375
|
+
children: titleAccess
|
7376
|
+
}) : null]
|
7377
|
+
}));
|
7378
|
+
});
|
7379
|
+
process.env.NODE_ENV !== "production" ? SvgIcon.propTypes /* remove-proptypes */ = {
|
7380
|
+
// ----------------------------- Warning --------------------------------
|
7381
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
7382
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
7383
|
+
// ----------------------------------------------------------------------
|
7384
|
+
/**
|
7385
|
+
* Node passed into the SVG element.
|
7386
|
+
*/
|
7387
|
+
children: PropTypes.node,
|
7388
|
+
/**
|
7389
|
+
* Override or extend the styles applied to the component.
|
7390
|
+
*/
|
7391
|
+
classes: PropTypes.object,
|
7392
|
+
/**
|
7393
|
+
* @ignore
|
7394
|
+
*/
|
7395
|
+
className: PropTypes.string,
|
7396
|
+
/**
|
7397
|
+
* The color of the component.
|
7398
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
7399
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
|
7400
|
+
* You can use the `htmlColor` prop to apply a color attribute to the SVG element.
|
7401
|
+
* @default 'inherit'
|
7402
|
+
*/
|
7403
|
+
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'action', 'disabled', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),
|
7404
|
+
/**
|
7405
|
+
* The component used for the root node.
|
7406
|
+
* Either a string to use a HTML element or a component.
|
7407
|
+
*/
|
7408
|
+
component: PropTypes.elementType,
|
7409
|
+
/**
|
7410
|
+
* The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.
|
7411
|
+
* @default 'medium'
|
7412
|
+
*/
|
7413
|
+
fontSize: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'large', 'medium', 'small']), PropTypes.string]),
|
7414
|
+
/**
|
7415
|
+
* Applies a color attribute to the SVG element.
|
7416
|
+
*/
|
7417
|
+
htmlColor: PropTypes.string,
|
7418
|
+
/**
|
7419
|
+
* If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`
|
7420
|
+
* prop will be ignored.
|
7421
|
+
* Useful when you want to reference a custom `component` and have `SvgIcon` pass that
|
7422
|
+
* `component`'s viewBox to the root node.
|
7423
|
+
* @default false
|
7424
|
+
*/
|
7425
|
+
inheritViewBox: PropTypes.bool,
|
7426
|
+
/**
|
7427
|
+
* The shape-rendering attribute. The behavior of the different options is described on the
|
7428
|
+
* [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).
|
7429
|
+
* If you are having issues with blurry icons you should investigate this prop.
|
7430
|
+
*/
|
7431
|
+
shapeRendering: PropTypes.string,
|
7432
|
+
/**
|
7433
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
7434
|
+
*/
|
7435
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
7436
|
+
/**
|
7437
|
+
* Provides a human-readable title for the element that contains it.
|
7438
|
+
* https://www.w3.org/TR/SVG-access/#Equivalent
|
7439
|
+
*/
|
7440
|
+
titleAccess: PropTypes.string,
|
7441
|
+
/**
|
7442
|
+
* Allows you to redefine what the coordinates without units mean inside an SVG element.
|
7443
|
+
* For example, if the SVG element is 500 (width) by 200 (height),
|
7444
|
+
* and you pass viewBox="0 0 50 20",
|
7445
|
+
* this means that the coordinates inside the SVG will go from the top left corner (0,0)
|
7446
|
+
* to bottom right (50,20) and each unit will be worth 10px.
|
7447
|
+
* @default '0 0 24 24'
|
7448
|
+
*/
|
7449
|
+
viewBox: PropTypes.string
|
7450
|
+
} : void 0;
|
7451
|
+
SvgIcon.muiName = 'SvgIcon';
|
7452
|
+
var SvgIcon$1 = SvgIcon;
|
7453
|
+
|
7454
|
+
function createSvgIcon(path, displayName) {
|
7455
|
+
function Component(props, ref) {
|
7456
|
+
return /*#__PURE__*/jsx(SvgIcon$1, _extends({
|
7457
|
+
"data-testid": `${displayName}Icon`,
|
7458
|
+
ref: ref
|
7459
|
+
}, props, {
|
7460
|
+
children: path
|
7461
|
+
}));
|
7462
|
+
}
|
7463
|
+
if (process.env.NODE_ENV !== 'production') {
|
7464
|
+
// Need to set `displayName` on the inner component for React.memo.
|
7465
|
+
// React prior to 16.14 ignores `displayName` on the wrapper.
|
7466
|
+
Component.displayName = `${displayName}Icon`;
|
4327
7467
|
}
|
4328
|
-
|
4329
|
-
|
4330
|
-
return styleFunctionSx$1({
|
4331
|
-
sx: props,
|
4332
|
-
theme: this
|
4333
|
-
});
|
4334
|
-
};
|
4335
|
-
return muiTheme;
|
7468
|
+
Component.muiName = SvgIcon$1.muiName;
|
7469
|
+
return /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Component));
|
4336
7470
|
}
|
4337
7471
|
|
4338
|
-
|
7472
|
+
var CheckCircleRounded = createSvgIcon( /*#__PURE__*/jsx("path", {
|
7473
|
+
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM9.29 16.29 5.7 12.7a.9959.9959 0 0 1 0-1.41c.39-.39 1.02-.39 1.41 0L10 14.17l6.88-6.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-7.59 7.59c-.38.39-1.02.39-1.41 0z"
|
7474
|
+
}), 'CheckCircleRounded');
|
7475
|
+
|
7476
|
+
var ErrorRounded = createSvgIcon( /*#__PURE__*/jsx("path", {
|
7477
|
+
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 11c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1zm1 4h-2v-2h2v2z"
|
7478
|
+
}), 'ErrorRounded');
|
7479
|
+
|
7480
|
+
var InfoRounded = createSvgIcon( /*#__PURE__*/jsx("path", {
|
7481
|
+
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 15c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1zm1-8h-2V7h2v2z"
|
7482
|
+
}), 'InfoRounded');
|
7483
|
+
|
7484
|
+
var WarningRounded = createSvgIcon( /*#__PURE__*/jsx("path", {
|
7485
|
+
d: "M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3zM12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1zm1 4h-2v-2h2v2z"
|
7486
|
+
}), 'WarningRounded');
|
7487
|
+
|
7488
|
+
const components = {
|
4339
7489
|
MuiDataGrid: {
|
4340
7490
|
defaultProps: {
|
4341
7491
|
columnHeaderHeight: 35,
|
@@ -4351,80 +7501,113 @@ const Componentes = {
|
|
4351
7501
|
fontWeight: 500,
|
4352
7502
|
fontSize: 13,
|
4353
7503
|
lineHeight: 1.5,
|
4354
|
-
letterSpacing:
|
7504
|
+
letterSpacing: .17
|
4355
7505
|
},
|
4356
7506
|
cell: {
|
4357
7507
|
fontFamily: 'Roboto',
|
4358
7508
|
fontWeight: 300,
|
4359
7509
|
fontSize: 12,
|
4360
7510
|
lineHeight: 1.5,
|
4361
|
-
letterSpacing:
|
7511
|
+
letterSpacing: .17,
|
4362
7512
|
// COMPONENTES DENTRO DE CELDAS
|
4363
|
-
|
7513
|
+
".MuiButtonBase-root": {
|
4364
7514
|
lineHeight: 0,
|
4365
|
-
textTransform:
|
7515
|
+
textTransform: "capitalize"
|
4366
7516
|
},
|
4367
|
-
// CELDA ENFOCADA
|
4368
|
-
|
4369
|
-
|
4370
|
-
outline:
|
7517
|
+
// CELDA ENFOCADA
|
7518
|
+
".MuiDataGrid-cell": {
|
7519
|
+
"&:focus": {
|
7520
|
+
outline: "transparent",
|
4371
7521
|
borderWidth: 0
|
4372
7522
|
}
|
4373
7523
|
}
|
4374
7524
|
},
|
4375
7525
|
// BOTOM MENU EN LAS CABECERA DE CADA COLUMNA
|
4376
7526
|
menuIconButton: {
|
4377
|
-
svg: {
|
7527
|
+
"svg": {
|
4378
7528
|
fontSize: '16px'
|
4379
7529
|
}
|
4380
7530
|
},
|
4381
7531
|
menu: {
|
4382
|
-
svg: {
|
7532
|
+
"svg": {
|
4383
7533
|
fontSize: '16px !important'
|
4384
7534
|
},
|
4385
|
-
|
7535
|
+
".MuiMenuItem-root": {
|
4386
7536
|
minHeight: '28px',
|
4387
7537
|
height: '28px'
|
4388
7538
|
}
|
4389
7539
|
},
|
4390
7540
|
pinnedRows: {
|
4391
|
-
|
4392
|
-
borderTop: '1px solid rgba(228, 236, 244, 1)'
|
7541
|
+
borderTop: "1px solid rgba(228, 236, 244, 1)"
|
4393
7542
|
},
|
4394
7543
|
root: {
|
4395
|
-
'.MuiDataGrid-cell.MuiDataGrid-cell--editing': {
|
4396
|
-
boxShadow: '0px 1px 3px rgba(24, 39, 75, 0.12), 0px 1px 1px -1px rgba(24, 39, 75, 0.14), 0px 2px 1px -2px rgba(24, 39, 75, 0.2) !important'
|
4397
|
-
},
|
4398
7544
|
// FONT-SIZE DE CELDA EN MODO EDICION
|
4399
|
-
|
7545
|
+
".MuiInputBase-root": {
|
4400
7546
|
fontFamily: 'Roboto',
|
4401
7547
|
fontWeight: 300,
|
4402
7548
|
fontSize: 12,
|
4403
|
-
letterSpacing:
|
4404
|
-
borderRadius:
|
7549
|
+
letterSpacing: .17,
|
7550
|
+
borderRadius: "0px"
|
4405
7551
|
},
|
4406
7552
|
// CELDA FOCUS
|
4407
|
-
|
4408
|
-
borderWidth:
|
4409
|
-
},
|
4410
|
-
'.MuiDataGrid-withBorderColor': {
|
4411
|
-
borderColor: '#d4d5dd'
|
7553
|
+
".Mui-focused, .MuiOutlinedInput-notchedOutline": {
|
7554
|
+
borderWidth: "0px !important"
|
4412
7555
|
},
|
4413
7556
|
// TAMAÑO PEQUEÑO
|
4414
|
-
|
4415
|
-
|
7557
|
+
"&.MuiDataGrid-root--densityCompact": {
|
7558
|
+
".MuiSvgIcon-root": {
|
4416
7559
|
fontSize: 16
|
7560
|
+
},
|
7561
|
+
".MuiDataGrid-cellCheckbox": {
|
7562
|
+
".MuiButtonBase-root": {
|
7563
|
+
padding: 4
|
7564
|
+
}
|
4417
7565
|
}
|
4418
7566
|
}
|
4419
7567
|
}
|
4420
7568
|
}
|
4421
7569
|
},
|
7570
|
+
MuiRating: {
|
7571
|
+
defaultProps: {
|
7572
|
+
size: 'small'
|
7573
|
+
},
|
7574
|
+
styleOverrides: {
|
7575
|
+
sizeSmall: {
|
7576
|
+
fontSize: 18
|
7577
|
+
},
|
7578
|
+
sizeMedium: {
|
7579
|
+
fontSize: 24
|
7580
|
+
},
|
7581
|
+
sizeLarge: {
|
7582
|
+
fontSize: 30
|
7583
|
+
}
|
7584
|
+
}
|
7585
|
+
},
|
7586
|
+
MuiToolbar: {
|
7587
|
+
styleOverrides: {
|
7588
|
+
root: {
|
7589
|
+
height: "48px"
|
7590
|
+
}
|
7591
|
+
}
|
7592
|
+
},
|
7593
|
+
MuiDrawer: {
|
7594
|
+
styleOverrides: {
|
7595
|
+
root: {
|
7596
|
+
boxShadow: "0px 3px 1px -2px rgba(24, 39, 75, 0.20), 0px 2px 2px 0px rgba(24, 39, 75, 0.14), 0px 1px 5px 0px rgba(24, 39, 75, 0.12)",
|
7597
|
+
"&.MuiBackdrop-root": {
|
7598
|
+
backgroundColor: "#f0f0f099",
|
7599
|
+
backdropFilter: "blur(2px) !important"
|
7600
|
+
}
|
7601
|
+
}
|
7602
|
+
}
|
7603
|
+
},
|
4422
7604
|
MuiDialog: {
|
4423
7605
|
styleOverrides: {
|
4424
7606
|
root: {
|
4425
|
-
|
4426
|
-
|
4427
|
-
|
7607
|
+
boxShadow: " 0px 2px 1px -2px rgba(24, 39, 75, 0.20), 0px 1px 1px -1px rgba(24, 39, 75, 0.14), 0px 1px 3px 0px rgba(24, 39, 75, 0.12)",
|
7608
|
+
".MuiBackdrop-root": {
|
7609
|
+
backgroundColor: "#f0f0f099",
|
7610
|
+
backdropFilter: "blur(2px) !important"
|
4428
7611
|
}
|
4429
7612
|
}
|
4430
7613
|
}
|
@@ -4440,102 +7623,117 @@ const Componentes = {
|
|
4440
7623
|
MuiChip: {
|
4441
7624
|
defaultProps: {
|
4442
7625
|
size: 'small'
|
7626
|
+
},
|
7627
|
+
styleOverrides: {
|
7628
|
+
root: {
|
7629
|
+
borderRadius: 4
|
7630
|
+
}
|
4443
7631
|
}
|
4444
7632
|
},
|
4445
7633
|
MuiAlert: {
|
7634
|
+
defaultProps: {
|
7635
|
+
iconMapping: {
|
7636
|
+
success: /*#__PURE__*/React__default.createElement(CheckCircleRounded),
|
7637
|
+
error: /*#__PURE__*/React__default.createElement(ErrorRounded),
|
7638
|
+
warning: /*#__PURE__*/React__default.createElement(WarningRounded),
|
7639
|
+
info: /*#__PURE__*/React__default.createElement(InfoRounded)
|
7640
|
+
}
|
7641
|
+
},
|
4446
7642
|
styleOverrides: {
|
4447
7643
|
root: {
|
4448
|
-
|
4449
|
-
paddingY: 0.5,
|
7644
|
+
paddingY: .5,
|
4450
7645
|
paddingX: 2,
|
4451
|
-
alignItems:
|
4452
|
-
border:
|
7646
|
+
alignItems: "center",
|
7647
|
+
border: "none"
|
4453
7648
|
}
|
4454
7649
|
}
|
4455
7650
|
},
|
4456
7651
|
MuiButton: {
|
4457
7652
|
defaultProps: {
|
4458
|
-
size: '
|
7653
|
+
size: 'medium'
|
4459
7654
|
},
|
4460
7655
|
styleOverrides: {
|
7656
|
+
fullWidth: {
|
7657
|
+
width: '100%'
|
7658
|
+
},
|
4461
7659
|
sizeSmall: {
|
4462
|
-
|
4463
|
-
fontSize: 12
|
7660
|
+
padding: '4px 10px'
|
4464
7661
|
},
|
4465
7662
|
sizeMedium: {
|
4466
|
-
|
4467
|
-
fontSize: 13
|
7663
|
+
padding: '7.5px 15px'
|
4468
7664
|
},
|
4469
7665
|
sizeLarge: {
|
4470
|
-
|
7666
|
+
padding: '10.5px 22px',
|
4471
7667
|
fontSize: 14
|
4472
7668
|
},
|
4473
7669
|
root: {
|
4474
|
-
width:
|
7670
|
+
width: "fit-content"
|
4475
7671
|
}
|
4476
7672
|
}
|
4477
7673
|
},
|
4478
7674
|
MuiButtonGroup: {
|
4479
7675
|
defaultProps: {
|
4480
|
-
size:
|
7676
|
+
size: "small"
|
4481
7677
|
}
|
4482
7678
|
},
|
4483
7679
|
MuiCheckbox: {
|
4484
7680
|
defaultProps: {
|
4485
|
-
size:
|
7681
|
+
size: "small"
|
4486
7682
|
}
|
4487
7683
|
},
|
4488
7684
|
MuiFab: {
|
4489
7685
|
defaultProps: {
|
4490
|
-
size:
|
7686
|
+
size: "small"
|
4491
7687
|
},
|
4492
7688
|
styleOverrides: {
|
4493
7689
|
circular: {
|
4494
|
-
|
7690
|
+
boxShadow: "0px 1px 18px 0px rgba(24, 39, 75, 0.12), 0px 6px 10px 0px rgba(24, 39, 75, 0.14), 0px 3px 5px -1px rgba(24, 39, 75, 0.20)",
|
7691
|
+
"&.MuiFab-sizeSmall": {
|
4495
7692
|
height: 38,
|
4496
7693
|
width: 38,
|
4497
|
-
|
7694
|
+
".MuiSvgIcon-fontSizeSmall": {
|
4498
7695
|
height: 20,
|
4499
7696
|
width: 20
|
4500
7697
|
}
|
4501
7698
|
},
|
4502
|
-
|
7699
|
+
"&.MuiFab-sizeMedium": {
|
4503
7700
|
height: 48,
|
4504
7701
|
width: 48,
|
4505
|
-
|
7702
|
+
"& .MuiSvgIcon-fontSizeMedium": {
|
4506
7703
|
height: 22,
|
4507
7704
|
width: 22
|
4508
7705
|
}
|
4509
7706
|
},
|
4510
|
-
|
7707
|
+
"&.MuiFab-sizeLarge": {
|
4511
7708
|
height: 56,
|
4512
7709
|
width: 56,
|
4513
|
-
|
7710
|
+
"& .MuiSvgIcon-fontSizeLarge": {
|
4514
7711
|
height: 24,
|
4515
7712
|
width: 24
|
4516
7713
|
}
|
4517
7714
|
}
|
4518
7715
|
},
|
4519
7716
|
extended: {
|
4520
|
-
|
7717
|
+
boxShadow: " 0px 1px 18px 0px rgba(24, 39, 75, 0.12), 0px 6px 10px 0px rgba(24, 39, 75, 0.14), 0px 3px 5px -1px rgba(24, 39, 75, 0.20)",
|
7718
|
+
"&.MuiFab-sizeSmall": {
|
4521
7719
|
height: 32,
|
4522
|
-
|
7720
|
+
".MuiSvgIcon-fontSizeSmall": {
|
4523
7721
|
height: 20,
|
4524
7722
|
width: 20,
|
4525
7723
|
marginRight: 4
|
4526
7724
|
}
|
4527
7725
|
},
|
4528
|
-
|
7726
|
+
"&.MuiFab-sizeMedium": {
|
4529
7727
|
height: 38,
|
4530
|
-
|
7728
|
+
"& .MuiSvgIcon-fontSizeMedium": {
|
4531
7729
|
height: 22,
|
4532
7730
|
width: 22,
|
4533
7731
|
marginRight: 4
|
4534
7732
|
}
|
4535
7733
|
},
|
4536
|
-
|
7734
|
+
"&.MuiFab-sizeLarge": {
|
4537
7735
|
height: 48,
|
4538
|
-
|
7736
|
+
"& .MuiSvgIcon-fontSizeLarge": {
|
4539
7737
|
height: 24,
|
4540
7738
|
width: 24,
|
4541
7739
|
marginRight: 4
|
@@ -4546,20 +7744,31 @@ const Componentes = {
|
|
4546
7744
|
},
|
4547
7745
|
MuiFormControl: {
|
4548
7746
|
defaultProps: {
|
4549
|
-
size:
|
4550
|
-
margin:
|
7747
|
+
size: "small",
|
7748
|
+
margin: "none"
|
4551
7749
|
}
|
4552
7750
|
},
|
4553
7751
|
MuiFormHelperText: {
|
4554
7752
|
defaultProps: {
|
4555
|
-
margin:
|
7753
|
+
margin: "dense"
|
4556
7754
|
}
|
4557
7755
|
},
|
4558
7756
|
MuiSvgIcon: {
|
4559
7757
|
styleOverrides: {
|
7758
|
+
fontSizeLarge: {
|
7759
|
+
width: 35,
|
7760
|
+
height: 35,
|
7761
|
+
fontSize: 35
|
7762
|
+
},
|
7763
|
+
fontSizeMedium: {
|
7764
|
+
width: 20,
|
7765
|
+
height: 20,
|
7766
|
+
fontSize: 20
|
7767
|
+
},
|
4560
7768
|
fontSizeSmall: {
|
4561
|
-
width:
|
4562
|
-
height:
|
7769
|
+
width: 16,
|
7770
|
+
height: 16,
|
7771
|
+
fontSize: 16
|
4563
7772
|
}
|
4564
7773
|
}
|
4565
7774
|
},
|
@@ -4588,23 +7797,23 @@ const Componentes = {
|
|
4588
7797
|
},
|
4589
7798
|
MuiInputBase: {
|
4590
7799
|
defaultProps: {
|
4591
|
-
margin:
|
7800
|
+
margin: "none"
|
4592
7801
|
},
|
4593
7802
|
styleOverrides: {
|
4594
7803
|
root: {
|
4595
|
-
|
7804
|
+
"&.MuiInput-underline": {
|
4596
7805
|
marginTop: 9
|
4597
7806
|
},
|
4598
|
-
|
7807
|
+
".MuiOutlinedInput-input.MuiInputBase-inputSizeSmall": {
|
4599
7808
|
paddingBlock: 5.95
|
4600
7809
|
},
|
4601
|
-
|
7810
|
+
".MuiOutlinedInput-input": {
|
4602
7811
|
paddingBlock: 14
|
4603
7812
|
},
|
4604
|
-
|
4605
|
-
paddingBlock:
|
7813
|
+
".MuiFilledInput-input.MuiInputBase-inputSizeSmall": {
|
7814
|
+
paddingBlock: "none"
|
4606
7815
|
},
|
4607
|
-
|
7816
|
+
".MuiFilledInput-input": {
|
4608
7817
|
paddingTop: 22,
|
4609
7818
|
paddingBottom: 6
|
4610
7819
|
}
|
@@ -4614,23 +7823,23 @@ const Componentes = {
|
|
4614
7823
|
MuiOutlinedInput: {
|
4615
7824
|
styleOverrides: {
|
4616
7825
|
notchedOutline: {
|
4617
|
-
borderColor:
|
7826
|
+
borderColor: "rgba(16, 24, 64, 0.23)"
|
4618
7827
|
}
|
4619
7828
|
}
|
4620
7829
|
},
|
4621
7830
|
MuiAutocomplete: {
|
4622
7831
|
defaultProps: {
|
4623
|
-
size:
|
7832
|
+
size: "small"
|
4624
7833
|
},
|
4625
7834
|
styleOverrides: {
|
4626
7835
|
root: {
|
4627
|
-
|
4628
|
-
padding:
|
7836
|
+
"&.MuiAutocomplete-root .MuiOutlinedInput-root": {
|
7837
|
+
padding: "6px 14px 6px 10px"
|
4629
7838
|
},
|
4630
|
-
|
7839
|
+
"&.MuiAutocomplete-root .MuiOutlinedInput-root.MuiInputBase-sizeSmall": {
|
4631
7840
|
paddingBlock: 3.5,
|
4632
7841
|
paddingRight: 14,
|
4633
|
-
|
7842
|
+
".MuiIconButton-sizeSmall .MuiAutocomplete-popupIndicator": {
|
4634
7843
|
padding: 5
|
4635
7844
|
}
|
4636
7845
|
}
|
@@ -4640,26 +7849,35 @@ const Componentes = {
|
|
4640
7849
|
MuiCard: {
|
4641
7850
|
styleOverrides: {
|
4642
7851
|
root: {
|
4643
|
-
overflow:
|
7852
|
+
overflow: "initial",
|
7853
|
+
boxShadow: "0px 2px 1px -2px rgba(24, 39, 75, 0.20), 0px 1px 1px -1px rgba(24, 39, 75, 0.14), 0px 1px 3px 0px rgba(24, 39, 75, 0.12)"
|
4644
7854
|
}
|
4645
7855
|
}
|
4646
7856
|
},
|
4647
7857
|
MuiInputLabel: {
|
4648
7858
|
styleOverrides: {
|
7859
|
+
asterisk: {
|
7860
|
+
color: '#D14343'
|
7861
|
+
},
|
7862
|
+
root: {
|
7863
|
+
display: 'flex',
|
7864
|
+
gap: '.2rem',
|
7865
|
+
flexDirection: 'row-reverse'
|
7866
|
+
},
|
4649
7867
|
outlined: {
|
4650
|
-
|
4651
|
-
transform:
|
7868
|
+
"&.MuiInputLabel-outlined.MuiInputLabel-sizeSmall ": {
|
7869
|
+
transform: "translate(14px,7px) scale(1)"
|
4652
7870
|
},
|
4653
|
-
|
4654
|
-
transform:
|
4655
|
-
|
4656
|
-
transform:
|
7871
|
+
"&.MuiInputLabel-outlined ": {
|
7872
|
+
transform: "translate(14px, 15px) scale(1)",
|
7873
|
+
"&.MuiInputLabel-shrink": {
|
7874
|
+
transform: "translate(14px, -9px) scale(0.75)"
|
4657
7875
|
}
|
4658
7876
|
}
|
4659
7877
|
}
|
4660
7878
|
},
|
4661
7879
|
defaultProps: {
|
4662
|
-
margin:
|
7880
|
+
margin: "dense"
|
4663
7881
|
}
|
4664
7882
|
},
|
4665
7883
|
MuiCardHeader: {
|
@@ -4671,18 +7889,18 @@ const Componentes = {
|
|
4671
7889
|
},
|
4672
7890
|
MuiRadio: {
|
4673
7891
|
defaultProps: {
|
4674
|
-
size:
|
7892
|
+
size: "small"
|
4675
7893
|
}
|
4676
7894
|
},
|
4677
7895
|
MuiSwitch: {
|
4678
7896
|
defaultProps: {
|
4679
|
-
size:
|
7897
|
+
size: "small"
|
4680
7898
|
}
|
4681
7899
|
},
|
4682
7900
|
MuiTextField: {
|
4683
7901
|
defaultProps: {
|
4684
|
-
size:
|
4685
|
-
margin:
|
7902
|
+
size: "small",
|
7903
|
+
margin: "none"
|
4686
7904
|
}
|
4687
7905
|
},
|
4688
7906
|
MuiList: {
|
@@ -4697,61 +7915,177 @@ const Componentes = {
|
|
4697
7915
|
},
|
4698
7916
|
MuiTable: {
|
4699
7917
|
defaultProps: {
|
4700
|
-
size:
|
7918
|
+
size: "small"
|
7919
|
+
}
|
7920
|
+
}
|
7921
|
+
};
|
7922
|
+
|
7923
|
+
const palette = {
|
7924
|
+
primary: {
|
7925
|
+
main: "#1e62a1",
|
7926
|
+
light: "#5a8fd3",
|
7927
|
+
dark: "#003972",
|
7928
|
+
contrastText: "#ffffff"
|
7929
|
+
},
|
7930
|
+
secondary: {
|
7931
|
+
main: "#0CBBE2",
|
7932
|
+
light: "#67eeff",
|
7933
|
+
dark: "#008bb0",
|
7934
|
+
contrastText: "#ffffff"
|
7935
|
+
},
|
7936
|
+
text: {
|
7937
|
+
primary: "#101840de",
|
7938
|
+
secondary: "#10184099",
|
7939
|
+
disabled: "#10184061"
|
7940
|
+
},
|
7941
|
+
error: {
|
7942
|
+
main: "#D14343",
|
7943
|
+
light: "#d85f5f",
|
7944
|
+
dark: "#b51e1e",
|
7945
|
+
contrastText: "#ffffff"
|
7946
|
+
},
|
7947
|
+
warning: {
|
7948
|
+
main: "#fb8500",
|
7949
|
+
light: "#fc9726",
|
7950
|
+
dark: "#f85500",
|
7951
|
+
contrastText: "#ffffff"
|
7952
|
+
},
|
7953
|
+
info: {
|
7954
|
+
main: "#2d9fc5",
|
7955
|
+
light: "#4dadce",
|
7956
|
+
dark: "#1172a3",
|
7957
|
+
contrastText: "#ffffff"
|
7958
|
+
},
|
7959
|
+
success: {
|
7960
|
+
main: "#8fc93a",
|
7961
|
+
dark: "#60a918",
|
7962
|
+
light: "#a0d158",
|
7963
|
+
contrastText: "#ffffff"
|
7964
|
+
},
|
7965
|
+
grey: {
|
7966
|
+
50: "#FAFBFF",
|
7967
|
+
100: "#F4F6FA",
|
7968
|
+
200: "#EDEFF5",
|
7969
|
+
300: "#E6E8F0",
|
7970
|
+
400: "#D8DAE5",
|
7971
|
+
500: "#C1C4D6",
|
7972
|
+
600: "#8F95B2",
|
7973
|
+
700: "#696F8C",
|
7974
|
+
800: "#474D66",
|
7975
|
+
900: "#101840",
|
7976
|
+
A100: "#D8DAE5",
|
7977
|
+
A200: "#C1C4D6",
|
7978
|
+
A400: "#696F8C",
|
7979
|
+
A700: "#101840"
|
7980
|
+
},
|
7981
|
+
action: {
|
7982
|
+
active: "rgba(16, 24, 64, 0.54)",
|
7983
|
+
hover: "rgba(16, 24, 64, 0.04)",
|
7984
|
+
selected: "rgba(16, 24, 64, 0.08)",
|
7985
|
+
disabled: "rgba(16, 24, 64, 0.26)",
|
7986
|
+
disabledBackground: "rgba(16, 24, 64, 0.12)",
|
7987
|
+
focus: "rgba(16, 24, 64, 0.12)"
|
7988
|
+
},
|
7989
|
+
background: {
|
7990
|
+
default: '#f5f5f5',
|
7991
|
+
paper: "#fff"
|
7992
|
+
},
|
7993
|
+
common: {
|
7994
|
+
black: '#000',
|
7995
|
+
white: '#fff'
|
7996
|
+
},
|
7997
|
+
divider: "rgba(16,24,64,0.12)"
|
7998
|
+
};
|
7999
|
+
|
8000
|
+
const breakpoints = createBreakpoints({
|
8001
|
+
values: {
|
8002
|
+
xs: 0,
|
8003
|
+
sm: 600,
|
8004
|
+
md: 960,
|
8005
|
+
lg: 1280,
|
8006
|
+
xl: 1920
|
8007
|
+
}
|
8008
|
+
});
|
8009
|
+
|
8010
|
+
const mixins = {
|
8011
|
+
toolbar: {
|
8012
|
+
minHeight: 48,
|
8013
|
+
[breakpoints.down('md')]: {
|
8014
|
+
minHeight: 52
|
4701
8015
|
}
|
4702
8016
|
}
|
4703
8017
|
};
|
4704
|
-
const components = Componentes;
|
4705
8018
|
|
4706
|
-
const
|
8019
|
+
const typography = {
|
4707
8020
|
fontSize: 13,
|
4708
8021
|
body1: {
|
4709
8022
|
fontFamily: "Roboto",
|
4710
8023
|
fontSize: 14,
|
4711
8024
|
fontWeight: 400,
|
4712
8025
|
letterSpacing: 0.15,
|
4713
|
-
lineHeight: 1.4
|
8026
|
+
lineHeight: 1.4,
|
8027
|
+
'@media(max-width: 885px)': {
|
8028
|
+
fontSize: 15
|
8029
|
+
}
|
4714
8030
|
},
|
4715
8031
|
body2: {
|
4716
8032
|
fontFamily: "Roboto",
|
4717
8033
|
fontSize: 13,
|
4718
8034
|
fontWeight: 400,
|
4719
8035
|
letterSpacing: 0.17,
|
4720
|
-
lineHeight: 1.2
|
8036
|
+
lineHeight: 1.2,
|
8037
|
+
'@media(max-width: 885px)': {
|
8038
|
+
fontSize: 14
|
8039
|
+
}
|
4721
8040
|
},
|
4722
8041
|
subtitle1: {
|
4723
8042
|
fontFamily: "Roboto",
|
4724
8043
|
fontSize: 14,
|
4725
8044
|
fontWeight: 500,
|
4726
8045
|
letterSpacing: 0.15,
|
4727
|
-
lineHeight: 1.4
|
8046
|
+
lineHeight: 1.4,
|
8047
|
+
'@media(max-width: 885px)': {
|
8048
|
+
fontSize: 15
|
8049
|
+
}
|
4728
8050
|
},
|
4729
8051
|
subtitle2: {
|
4730
8052
|
fontFamily: "Roboto",
|
4731
8053
|
fontSize: 13,
|
4732
8054
|
fontWeight: 500,
|
4733
8055
|
letterSpacing: 0.1,
|
4734
|
-
lineHeight: 1.4
|
8056
|
+
lineHeight: 1.4,
|
8057
|
+
'@media(max-width: 885px)': {
|
8058
|
+
fontSize: 14
|
8059
|
+
}
|
4735
8060
|
},
|
4736
8061
|
caption: {
|
4737
8062
|
fontFamily: "Roboto",
|
4738
8063
|
fontSize: 11,
|
4739
8064
|
fontWeight: 400,
|
4740
8065
|
letterSpacing: 0.4,
|
4741
|
-
lineHeight: 1.4
|
8066
|
+
lineHeight: 1.4,
|
8067
|
+
'@media(max-width: 885px)': {
|
8068
|
+
fontSize: 12
|
8069
|
+
}
|
4742
8070
|
},
|
4743
8071
|
overline: {
|
4744
8072
|
fontFamily: "Roboto",
|
4745
8073
|
fontSize: 11,
|
4746
8074
|
fontWeight: 400,
|
4747
8075
|
letterSpacing: 1,
|
4748
|
-
lineHeight: 2.66
|
8076
|
+
lineHeight: 2.66,
|
8077
|
+
'@media(max-width: 885px)': {
|
8078
|
+
fontSize: 12
|
8079
|
+
}
|
4749
8080
|
},
|
4750
8081
|
h6: {
|
4751
8082
|
fontFamily: "Nunito",
|
4752
8083
|
fontSize: 16,
|
4753
8084
|
fontWeight: 600,
|
4754
|
-
lineHeight: 1.6
|
8085
|
+
lineHeight: 1.6,
|
8086
|
+
'@media(max-width: 885px)': {
|
8087
|
+
fontSize: 17
|
8088
|
+
}
|
4755
8089
|
},
|
4756
8090
|
h5: {
|
4757
8091
|
fontFamily: "Nunito",
|
@@ -4791,100 +8125,33 @@ const Typography = {
|
|
4791
8125
|
textTransform: "unset",
|
4792
8126
|
fontWeightLight: 300,
|
4793
8127
|
fontSize: 13,
|
4794
|
-
lineHeight: "normal"
|
8128
|
+
lineHeight: "normal",
|
8129
|
+
'@media(max-width: 885px)': {
|
8130
|
+
fontSize: 14
|
8131
|
+
}
|
4795
8132
|
}
|
4796
8133
|
};
|
4797
|
-
const typography = Typography;
|
4798
|
-
|
4799
|
-
const Palettes = {
|
4800
|
-
primary: {
|
4801
|
-
main: "#1e62a1",
|
4802
|
-
light: "#5a8fd3",
|
4803
|
-
dark: "#003972",
|
4804
|
-
contrastText: "#ffffff"
|
4805
|
-
},
|
4806
|
-
secondary: {
|
4807
|
-
main: "#0CBBE2",
|
4808
|
-
light: "#67eeff",
|
4809
|
-
dark: "#008bb0",
|
4810
|
-
contrastText: "#ffffff"
|
4811
|
-
},
|
4812
|
-
text: {
|
4813
|
-
primary: "rgba(16,24,64,0.87)",
|
4814
|
-
secondary: "rgba(16,24,64,0.6)",
|
4815
|
-
disabled: "rgba(16,24,64,0.38)"
|
4816
|
-
},
|
4817
|
-
error: {
|
4818
|
-
main: "#D14343",
|
4819
|
-
light: "#d85f5f",
|
4820
|
-
dark: "#b51e1e",
|
4821
|
-
contrastText: "#ffffff"
|
4822
|
-
},
|
4823
|
-
warning: {
|
4824
|
-
main: "#fb8500",
|
4825
|
-
light: "#fc9726",
|
4826
|
-
dark: "#f85500",
|
4827
|
-
contrastText: "#ffffff"
|
4828
|
-
},
|
4829
|
-
info: {
|
4830
|
-
main: "#2d9fc5",
|
4831
|
-
light: "#4dadce",
|
4832
|
-
dark: "#1172a3",
|
4833
|
-
contrastText: "#ffffff"
|
4834
|
-
},
|
4835
|
-
success: {
|
4836
|
-
main: "#8fc93a",
|
4837
|
-
dark: "#60a918",
|
4838
|
-
light: "#a0d158",
|
4839
|
-
contrastText: "#ffffff"
|
4840
|
-
},
|
4841
|
-
grey: {
|
4842
|
-
50: "#FAFBFF",
|
4843
|
-
100: "#F4F6FA",
|
4844
|
-
200: "#EDEFF5",
|
4845
|
-
300: "#E6E8F0",
|
4846
|
-
400: "#D8DAE5",
|
4847
|
-
500: "#C1C4D6",
|
4848
|
-
600: "#8F95B2",
|
4849
|
-
700: "#696F8C",
|
4850
|
-
800: "#474D66",
|
4851
|
-
900: "#101840",
|
4852
|
-
A100: "#D8DAE5",
|
4853
|
-
A200: "#C1C4D6",
|
4854
|
-
A400: "#696F8C",
|
4855
|
-
A700: "#101840"
|
4856
|
-
},
|
4857
|
-
action: {
|
4858
|
-
active: "rgba(16, 24, 64, 0.54)",
|
4859
|
-
hover: "rgba(16, 24, 64, 0.04)",
|
4860
|
-
selected: "rgba(16, 24, 64, 0.08)",
|
4861
|
-
disabled: "rgba(16, 24, 64, 0.26)",
|
4862
|
-
disabledBackground: "rgba(16, 24, 64, 0.12)",
|
4863
|
-
focus: "rgba(16, 24, 64, 0.12)"
|
4864
|
-
},
|
4865
|
-
background: {
|
4866
|
-
default: "#f5f5f5",
|
4867
|
-
paper: "#fff"
|
4868
|
-
},
|
4869
|
-
divider: "rgba(16,24,64,0.12)"
|
4870
|
-
};
|
4871
|
-
const palette = Palettes;
|
4872
8134
|
|
4873
8135
|
const themeOptions = {
|
4874
|
-
palette,
|
4875
|
-
typography,
|
4876
8136
|
components,
|
4877
|
-
|
8137
|
+
typography,
|
8138
|
+
palette,
|
8139
|
+
spacing: 8,
|
8140
|
+
mixins,
|
8141
|
+
breakpoints
|
4878
8142
|
};
|
4879
8143
|
|
4880
8144
|
const SincoTheme = createTheme(Object.assign({}, themeOptions, {
|
4881
8145
|
typography: {
|
4882
8146
|
body3: {
|
4883
|
-
fontFamily:
|
8147
|
+
fontFamily: "Roboto",
|
4884
8148
|
fontWeight: 310,
|
4885
8149
|
fontSize: 12,
|
4886
8150
|
letterSpacing: 0.17,
|
4887
|
-
lineHeight:
|
8151
|
+
lineHeight: 1.2,
|
8152
|
+
[breakpoints.down("md")]: {
|
8153
|
+
fontSize: 11
|
8154
|
+
}
|
4888
8155
|
}
|
4889
8156
|
}
|
4890
8157
|
}));
|