@sinco/react 1.0.15-rc.60 → 1.0.15-rc.61

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +257 -2458
  2. package/package.json +3 -2
package/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
- import React__default, { forwardRef, useContext, Children, isValidElement, cloneElement, useState, useEffect } from 'react';
2
+ import React__default, { Children, isValidElement, cloneElement, useState, useEffect } from 'react';
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
+ import { withEmotionCache, ThemeContext, keyframes } from '@emotion/react';
4
5
  import * as ReactDOM from 'react-dom';
5
6
  import ReactDOM__default from 'react-dom';
6
7
 
@@ -201,22 +202,22 @@ var process$4 = global$g.process;
201
202
  var Deno$1 = global$g.Deno;
202
203
  var versions = process$4 && process$4.versions || Deno$1 && Deno$1.version;
203
204
  var v8 = versions && versions.v8;
204
- var match$1, version;
205
+ var match, version;
205
206
 
206
207
  if (v8) {
207
- match$1 = v8.split('.');
208
+ match = v8.split('.');
208
209
  // in old Chrome, versions of V8 isn't V8 = Chrome / 10
209
210
  // but their correct versions are not interesting for us
210
- version = match$1[0] > 0 && match$1[0] < 4 ? 1 : +(match$1[0] + match$1[1]);
211
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
211
212
  }
212
213
 
213
214
  // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
214
215
  // so check `userAgent` even if `.v8` exists, but 0
215
216
  if (!version && userAgent$3) {
216
- match$1 = userAgent$3.match(/Edge\/(\d+)/);
217
- if (!match$1 || match$1[1] >= 74) {
218
- match$1 = userAgent$3.match(/Chrome\/(\d+)/);
219
- if (match$1) version = +match$1[1];
217
+ match = userAgent$3.match(/Edge\/(\d+)/);
218
+ if (!match || match[1] >= 74) {
219
+ match = userAgent$3.match(/Chrome\/(\d+)/);
220
+ if (match) version = +match[1];
220
221
  }
221
222
  }
222
223
 
@@ -357,13 +358,13 @@ var toObject$4 = function (argument) {
357
358
  var uncurryThis$b = functionUncurryThis;
358
359
  var toObject$3 = toObject$4;
359
360
 
360
- var hasOwnProperty$2 = uncurryThis$b({}.hasOwnProperty);
361
+ var hasOwnProperty$1 = uncurryThis$b({}.hasOwnProperty);
361
362
 
362
363
  // `HasOwnProperty` abstract operation
363
364
  // https://tc39.es/ecma262/#sec-hasownproperty
364
365
  // eslint-disable-next-line es/no-object-hasown -- safe
365
366
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
366
- return hasOwnProperty$2(toObject$3(it), key);
367
+ return hasOwnProperty$1(toObject$3(it), key);
367
368
  };
368
369
 
369
370
  var uncurryThis$a = functionUncurryThis;
@@ -596,9 +597,9 @@ var inspectSource$3 = store$1.inspectSource;
596
597
  var global$a = global$i;
597
598
  var isCallable$d = isCallable$k;
598
599
 
599
- var WeakMap$2 = global$a.WeakMap;
600
+ var WeakMap$1 = global$a.WeakMap;
600
601
 
601
- var weakMapBasicDetection = isCallable$d(WeakMap$2) && /native code/.test(String(WeakMap$2));
602
+ var weakMapBasicDetection = isCallable$d(WeakMap$1) && /native code/.test(String(WeakMap$1));
602
603
 
603
604
  var shared$1 = shared$3.exports;
604
605
  var uid = uid$2;
@@ -622,7 +623,7 @@ var hiddenKeys$3 = hiddenKeys$4;
622
623
 
623
624
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
624
625
  var TypeError$2 = global$9.TypeError;
625
- var WeakMap$1 = global$9.WeakMap;
626
+ var WeakMap = global$9.WeakMap;
626
627
  var set$1, get, has$3;
627
628
 
628
629
  var enforce = function (it) {
@@ -639,7 +640,7 @@ var getterFor = function (TYPE) {
639
640
  };
640
641
 
641
642
  if (NATIVE_WEAK_MAP || shared.state) {
642
- var store = shared.state || (shared.state = new WeakMap$1());
643
+ var store = shared.state || (shared.state = new WeakMap());
643
644
  /* eslint-disable no-self-assign -- prototype methods protection */
644
645
  store.get = store.get;
645
646
  store.has = store.has;
@@ -697,7 +698,7 @@ var $String$1 = String;
697
698
  // eslint-disable-next-line es/no-object-defineproperty -- safe
698
699
  var defineProperty$5 = Object.defineProperty;
699
700
  var stringSlice = uncurryThis$8(''.slice);
700
- var replace$1 = uncurryThis$8(''.replace);
701
+ var replace = uncurryThis$8(''.replace);
701
702
  var join = uncurryThis$8([].join);
702
703
 
703
704
  var CONFIGURABLE_LENGTH = DESCRIPTORS$4 && !fails$6(function () {
@@ -708,7 +709,7 @@ var TEMPLATE = String(String).split('String');
708
709
 
709
710
  var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
710
711
  if (stringSlice($String$1(name), 0, 7) === 'Symbol(') {
711
- name = '[' + replace$1($String$1(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
712
+ name = '[' + replace($String$1(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
712
713
  }
713
714
  if (options && options.getter) name = 'get ' + name;
714
715
  if (options && options.setter) name = 'set ' + name;
@@ -1079,13 +1080,13 @@ var objectAssign$1 = !$assign || fails$4(function () {
1079
1080
  } : $assign;
1080
1081
 
1081
1082
  var $$7 = _export;
1082
- var assign$2 = objectAssign$1;
1083
+ var assign$1 = objectAssign$1;
1083
1084
 
1084
1085
  // `Object.assign` method
1085
1086
  // https://tc39.es/ecma262/#sec-object.assign
1086
1087
  // eslint-disable-next-line es/no-object-assign -- required for testing
1087
- $$7({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign$2 }, {
1088
- assign: assign$2
1088
+ $$7({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign$1 }, {
1089
+ assign: assign$1
1089
1090
  });
1090
1091
 
1091
1092
  function chainPropTypes(propType1, propType2) {
@@ -1150,9 +1151,9 @@ function deepmerge(target, source, options = {
1150
1151
 
1151
1152
  var propTypes = {exports: {}};
1152
1153
 
1153
- var reactIs$3 = {exports: {}};
1154
+ var reactIs$1 = {exports: {}};
1154
1155
 
1155
- var reactIs_production_min$2 = {};
1156
+ var reactIs_production_min$1 = {};
1156
1157
 
1157
1158
  /** @license React v16.13.1
1158
1159
  * react-is.production.min.js
@@ -1162,14 +1163,14 @@ var reactIs_production_min$2 = {};
1162
1163
  * This source code is licensed under the MIT license found in the
1163
1164
  * LICENSE file in the root directory of this source tree.
1164
1165
  */
1165
- var b$2="function"===typeof Symbol&&Symbol.for,c$2=b$2?Symbol.for("react.element"):60103,d$2=b$2?Symbol.for("react.portal"):60106,e$2=b$2?Symbol.for("react.fragment"):60107,f$2=b$2?Symbol.for("react.strict_mode"):60108,g$2=b$2?Symbol.for("react.profiler"):60114,h$2=b$2?Symbol.for("react.provider"):60109,k$2=b$2?Symbol.for("react.context"):60110,l$2=b$2?Symbol.for("react.async_mode"):60111,m$2=b$2?Symbol.for("react.concurrent_mode"):60111,n$2=b$2?Symbol.for("react.forward_ref"):60112,p$2=b$2?Symbol.for("react.suspense"):60113,q$2=b$2?
1166
- Symbol.for("react.suspense_list"):60120,r$2=b$2?Symbol.for("react.memo"):60115,t$2=b$2?Symbol.for("react.lazy"):60116,v$2=b$2?Symbol.for("react.block"):60121,w$1=b$2?Symbol.for("react.fundamental"):60117,x$1=b$2?Symbol.for("react.responder"):60118,y$1=b$2?Symbol.for("react.scope"):60119;
1167
- function z$1(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c$2:switch(a=a.type,a){case l$2:case m$2:case e$2:case g$2:case f$2:case p$2:return a;default:switch(a=a&&a.$$typeof,a){case k$2:case n$2:case t$2:case r$2:case h$2:return a;default:return u}}case d$2:return u}}}function A$1(a){return z$1(a)===m$2}reactIs_production_min$2.AsyncMode=l$2;reactIs_production_min$2.ConcurrentMode=m$2;reactIs_production_min$2.ContextConsumer=k$2;reactIs_production_min$2.ContextProvider=h$2;reactIs_production_min$2.Element=c$2;reactIs_production_min$2.ForwardRef=n$2;reactIs_production_min$2.Fragment=e$2;reactIs_production_min$2.Lazy=t$2;reactIs_production_min$2.Memo=r$2;reactIs_production_min$2.Portal=d$2;
1168
- reactIs_production_min$2.Profiler=g$2;reactIs_production_min$2.StrictMode=f$2;reactIs_production_min$2.Suspense=p$2;reactIs_production_min$2.isAsyncMode=function(a){return A$1(a)||z$1(a)===l$2};reactIs_production_min$2.isConcurrentMode=A$1;reactIs_production_min$2.isContextConsumer=function(a){return z$1(a)===k$2};reactIs_production_min$2.isContextProvider=function(a){return z$1(a)===h$2};reactIs_production_min$2.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c$2};reactIs_production_min$2.isForwardRef=function(a){return z$1(a)===n$2};reactIs_production_min$2.isFragment=function(a){return z$1(a)===e$2};reactIs_production_min$2.isLazy=function(a){return z$1(a)===t$2};
1169
- reactIs_production_min$2.isMemo=function(a){return z$1(a)===r$2};reactIs_production_min$2.isPortal=function(a){return z$1(a)===d$2};reactIs_production_min$2.isProfiler=function(a){return z$1(a)===g$2};reactIs_production_min$2.isStrictMode=function(a){return z$1(a)===f$2};reactIs_production_min$2.isSuspense=function(a){return z$1(a)===p$2};
1170
- reactIs_production_min$2.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e$2||a===m$2||a===g$2||a===f$2||a===p$2||a===q$2||"object"===typeof a&&null!==a&&(a.$$typeof===t$2||a.$$typeof===r$2||a.$$typeof===h$2||a.$$typeof===k$2||a.$$typeof===n$2||a.$$typeof===w$1||a.$$typeof===x$1||a.$$typeof===y$1||a.$$typeof===v$2)};reactIs_production_min$2.typeOf=z$1;
1166
+ 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?
1167
+ 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;
1168
+ 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;
1169
+ 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};
1170
+ 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};
1171
+ 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;
1171
1172
 
1172
- var reactIs_development$2 = {};
1173
+ var reactIs_development$1 = {};
1173
1174
 
1174
1175
  /** @license React v16.13.1
1175
1176
  * react-is.development.js
@@ -1319,41 +1320,41 @@ function isSuspense(object) {
1319
1320
  return typeOf(object) === REACT_SUSPENSE_TYPE;
1320
1321
  }
1321
1322
 
1322
- reactIs_development$2.AsyncMode = AsyncMode;
1323
- reactIs_development$2.ConcurrentMode = ConcurrentMode;
1324
- reactIs_development$2.ContextConsumer = ContextConsumer;
1325
- reactIs_development$2.ContextProvider = ContextProvider;
1326
- reactIs_development$2.Element = Element;
1327
- reactIs_development$2.ForwardRef = ForwardRef;
1328
- reactIs_development$2.Fragment = Fragment;
1329
- reactIs_development$2.Lazy = Lazy;
1330
- reactIs_development$2.Memo = Memo;
1331
- reactIs_development$2.Portal = Portal;
1332
- reactIs_development$2.Profiler = Profiler;
1333
- reactIs_development$2.StrictMode = StrictMode;
1334
- reactIs_development$2.Suspense = Suspense;
1335
- reactIs_development$2.isAsyncMode = isAsyncMode;
1336
- reactIs_development$2.isConcurrentMode = isConcurrentMode;
1337
- reactIs_development$2.isContextConsumer = isContextConsumer;
1338
- reactIs_development$2.isContextProvider = isContextProvider;
1339
- reactIs_development$2.isElement = isElement;
1340
- reactIs_development$2.isForwardRef = isForwardRef;
1341
- reactIs_development$2.isFragment = isFragment;
1342
- reactIs_development$2.isLazy = isLazy;
1343
- reactIs_development$2.isMemo = isMemo;
1344
- reactIs_development$2.isPortal = isPortal;
1345
- reactIs_development$2.isProfiler = isProfiler;
1346
- reactIs_development$2.isStrictMode = isStrictMode;
1347
- reactIs_development$2.isSuspense = isSuspense;
1348
- reactIs_development$2.isValidElementType = isValidElementType;
1349
- reactIs_development$2.typeOf = typeOf;
1323
+ reactIs_development$1.AsyncMode = AsyncMode;
1324
+ reactIs_development$1.ConcurrentMode = ConcurrentMode;
1325
+ reactIs_development$1.ContextConsumer = ContextConsumer;
1326
+ reactIs_development$1.ContextProvider = ContextProvider;
1327
+ reactIs_development$1.Element = Element;
1328
+ reactIs_development$1.ForwardRef = ForwardRef;
1329
+ reactIs_development$1.Fragment = Fragment;
1330
+ reactIs_development$1.Lazy = Lazy;
1331
+ reactIs_development$1.Memo = Memo;
1332
+ reactIs_development$1.Portal = Portal;
1333
+ reactIs_development$1.Profiler = Profiler;
1334
+ reactIs_development$1.StrictMode = StrictMode;
1335
+ reactIs_development$1.Suspense = Suspense;
1336
+ reactIs_development$1.isAsyncMode = isAsyncMode;
1337
+ reactIs_development$1.isConcurrentMode = isConcurrentMode;
1338
+ reactIs_development$1.isContextConsumer = isContextConsumer;
1339
+ reactIs_development$1.isContextProvider = isContextProvider;
1340
+ reactIs_development$1.isElement = isElement;
1341
+ reactIs_development$1.isForwardRef = isForwardRef;
1342
+ reactIs_development$1.isFragment = isFragment;
1343
+ reactIs_development$1.isLazy = isLazy;
1344
+ reactIs_development$1.isMemo = isMemo;
1345
+ reactIs_development$1.isPortal = isPortal;
1346
+ reactIs_development$1.isProfiler = isProfiler;
1347
+ reactIs_development$1.isStrictMode = isStrictMode;
1348
+ reactIs_development$1.isSuspense = isSuspense;
1349
+ reactIs_development$1.isValidElementType = isValidElementType;
1350
+ reactIs_development$1.typeOf = typeOf;
1350
1351
  })();
1351
1352
  }
1352
1353
 
1353
1354
  if (process.env.NODE_ENV === 'production') {
1354
- reactIs$3.exports = reactIs_production_min$2;
1355
+ reactIs$1.exports = reactIs_production_min$1;
1355
1356
  } else {
1356
- reactIs$3.exports = reactIs_development$2;
1357
+ reactIs$1.exports = reactIs_development$1;
1357
1358
  }
1358
1359
 
1359
1360
  /*
@@ -1363,7 +1364,7 @@ object-assign
1363
1364
  */
1364
1365
  /* eslint-disable no-unused-vars */
1365
1366
  var getOwnPropertySymbols = Object.getOwnPropertySymbols;
1366
- var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
1367
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
1367
1368
  var propIsEnumerable = Object.prototype.propertyIsEnumerable;
1368
1369
 
1369
1370
  function toObject$1(val) {
@@ -1427,7 +1428,7 @@ var objectAssign = shouldUseNative() ? Object.assign : function (target, source)
1427
1428
  from = Object(arguments[s]);
1428
1429
 
1429
1430
  for (var key in from) {
1430
- if (hasOwnProperty$1.call(from, key)) {
1431
+ if (hasOwnProperty.call(from, key)) {
1431
1432
  to[key] = from[key];
1432
1433
  }
1433
1434
  }
@@ -1567,8 +1568,8 @@ var checkPropTypes_1 = checkPropTypes$1;
1567
1568
  * LICENSE file in the root directory of this source tree.
1568
1569
  */
1569
1570
 
1570
- var ReactIs$1 = reactIs$3.exports;
1571
- var assign$1 = objectAssign;
1571
+ var ReactIs$1 = reactIs$1.exports;
1572
+ var assign = objectAssign;
1572
1573
 
1573
1574
  var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
1574
1575
  var has = has$2;
@@ -2007,7 +2008,7 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
2007
2008
  return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
2008
2009
  }
2009
2010
  // We need to check all keys in case some are required but missing from props.
2010
- var allKeys = assign$1({}, props[propName], shapeTypes);
2011
+ var allKeys = assign({}, props[propName], shapeTypes);
2011
2012
  for (var key in allKeys) {
2012
2013
  var checker = shapeTypes[key];
2013
2014
  if (has(shapeTypes, key) && typeof checker !== 'function') {
@@ -2239,7 +2240,7 @@ var factoryWithThrowingShims = function() {
2239
2240
  */
2240
2241
 
2241
2242
  if (process.env.NODE_ENV !== 'production') {
2242
- var ReactIs = reactIs$3.exports;
2243
+ var ReactIs = reactIs$1.exports;
2243
2244
 
2244
2245
  // By explicitly using `prop-types` you are opting into new development behavior.
2245
2246
  // http://fb.me/prop-types-in-prod
@@ -2372,9 +2373,9 @@ function formatMuiErrorMessage(code) {
2372
2373
  /* eslint-enable prefer-template */
2373
2374
  }
2374
2375
 
2375
- var reactIs$2 = {exports: {}};
2376
+ var reactIs = {exports: {}};
2376
2377
 
2377
- var reactIs_production_min$1 = {};
2378
+ var reactIs_production_min = {};
2378
2379
 
2379
2380
  /**
2380
2381
  * @license React
@@ -2385,13 +2386,13 @@ var reactIs_production_min$1 = {};
2385
2386
  * This source code is licensed under the MIT license found in the
2386
2387
  * LICENSE file in the root directory of this source tree.
2387
2388
  */
2388
- var b$1=Symbol.for("react.element"),c$1=Symbol.for("react.portal"),d$1=Symbol.for("react.fragment"),e$1=Symbol.for("react.strict_mode"),f$1=Symbol.for("react.profiler"),g$1=Symbol.for("react.provider"),h$1=Symbol.for("react.context"),k$1=Symbol.for("react.server_context"),l$1=Symbol.for("react.forward_ref"),m$1=Symbol.for("react.suspense"),n$1=Symbol.for("react.suspense_list"),p$1=Symbol.for("react.memo"),q$1=Symbol.for("react.lazy"),t$1=Symbol.for("react.offscreen"),u;u=Symbol.for("react.module.reference");
2389
- function v$1(a){if("object"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b$1:switch(a=a.type,a){case d$1:case f$1:case e$1:case m$1:case n$1:return a;default:switch(a=a&&a.$$typeof,a){case k$1:case h$1:case l$1:case q$1:case p$1:case g$1:return a;default:return r}}case c$1:return r}}}reactIs_production_min$1.ContextConsumer=h$1;reactIs_production_min$1.ContextProvider=g$1;reactIs_production_min$1.Element=b$1;reactIs_production_min$1.ForwardRef=l$1;reactIs_production_min$1.Fragment=d$1;reactIs_production_min$1.Lazy=q$1;reactIs_production_min$1.Memo=p$1;reactIs_production_min$1.Portal=c$1;reactIs_production_min$1.Profiler=f$1;reactIs_production_min$1.StrictMode=e$1;reactIs_production_min$1.Suspense=m$1;
2390
- reactIs_production_min$1.SuspenseList=n$1;reactIs_production_min$1.isAsyncMode=function(){return !1};reactIs_production_min$1.isConcurrentMode=function(){return !1};reactIs_production_min$1.isContextConsumer=function(a){return v$1(a)===h$1};reactIs_production_min$1.isContextProvider=function(a){return v$1(a)===g$1};reactIs_production_min$1.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===b$1};reactIs_production_min$1.isForwardRef=function(a){return v$1(a)===l$1};reactIs_production_min$1.isFragment=function(a){return v$1(a)===d$1};reactIs_production_min$1.isLazy=function(a){return v$1(a)===q$1};reactIs_production_min$1.isMemo=function(a){return v$1(a)===p$1};
2391
- reactIs_production_min$1.isPortal=function(a){return v$1(a)===c$1};reactIs_production_min$1.isProfiler=function(a){return v$1(a)===f$1};reactIs_production_min$1.isStrictMode=function(a){return v$1(a)===e$1};reactIs_production_min$1.isSuspense=function(a){return v$1(a)===m$1};reactIs_production_min$1.isSuspenseList=function(a){return v$1(a)===n$1};
2392
- reactIs_production_min$1.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d$1||a===f$1||a===e$1||a===m$1||a===n$1||a===t$1||"object"===typeof a&&null!==a&&(a.$$typeof===q$1||a.$$typeof===p$1||a.$$typeof===g$1||a.$$typeof===h$1||a.$$typeof===l$1||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};reactIs_production_min$1.typeOf=v$1;
2389
+ 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");
2390
+ 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;
2391
+ 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};
2392
+ 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};
2393
+ 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;
2393
2394
 
2394
- var reactIs_development$1 = {};
2395
+ var reactIs_development = {};
2395
2396
 
2396
2397
  /**
2397
2398
  * @license React
@@ -2581,41 +2582,41 @@ function isSuspenseList(object) {
2581
2582
  return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
2582
2583
  }
2583
2584
 
2584
- reactIs_development$1.ContextConsumer = ContextConsumer;
2585
- reactIs_development$1.ContextProvider = ContextProvider;
2586
- reactIs_development$1.Element = Element;
2587
- reactIs_development$1.ForwardRef = ForwardRef;
2588
- reactIs_development$1.Fragment = Fragment;
2589
- reactIs_development$1.Lazy = Lazy;
2590
- reactIs_development$1.Memo = Memo;
2591
- reactIs_development$1.Portal = Portal;
2592
- reactIs_development$1.Profiler = Profiler;
2593
- reactIs_development$1.StrictMode = StrictMode;
2594
- reactIs_development$1.Suspense = Suspense;
2595
- reactIs_development$1.SuspenseList = SuspenseList;
2596
- reactIs_development$1.isAsyncMode = isAsyncMode;
2597
- reactIs_development$1.isConcurrentMode = isConcurrentMode;
2598
- reactIs_development$1.isContextConsumer = isContextConsumer;
2599
- reactIs_development$1.isContextProvider = isContextProvider;
2600
- reactIs_development$1.isElement = isElement;
2601
- reactIs_development$1.isForwardRef = isForwardRef;
2602
- reactIs_development$1.isFragment = isFragment;
2603
- reactIs_development$1.isLazy = isLazy;
2604
- reactIs_development$1.isMemo = isMemo;
2605
- reactIs_development$1.isPortal = isPortal;
2606
- reactIs_development$1.isProfiler = isProfiler;
2607
- reactIs_development$1.isStrictMode = isStrictMode;
2608
- reactIs_development$1.isSuspense = isSuspense;
2609
- reactIs_development$1.isSuspenseList = isSuspenseList;
2610
- reactIs_development$1.isValidElementType = isValidElementType;
2611
- reactIs_development$1.typeOf = typeOf;
2585
+ reactIs_development.ContextConsumer = ContextConsumer;
2586
+ reactIs_development.ContextProvider = ContextProvider;
2587
+ reactIs_development.Element = Element;
2588
+ reactIs_development.ForwardRef = ForwardRef;
2589
+ reactIs_development.Fragment = Fragment;
2590
+ reactIs_development.Lazy = Lazy;
2591
+ reactIs_development.Memo = Memo;
2592
+ reactIs_development.Portal = Portal;
2593
+ reactIs_development.Profiler = Profiler;
2594
+ reactIs_development.StrictMode = StrictMode;
2595
+ reactIs_development.Suspense = Suspense;
2596
+ reactIs_development.SuspenseList = SuspenseList;
2597
+ reactIs_development.isAsyncMode = isAsyncMode;
2598
+ reactIs_development.isConcurrentMode = isConcurrentMode;
2599
+ reactIs_development.isContextConsumer = isContextConsumer;
2600
+ reactIs_development.isContextProvider = isContextProvider;
2601
+ reactIs_development.isElement = isElement;
2602
+ reactIs_development.isForwardRef = isForwardRef;
2603
+ reactIs_development.isFragment = isFragment;
2604
+ reactIs_development.isLazy = isLazy;
2605
+ reactIs_development.isMemo = isMemo;
2606
+ reactIs_development.isPortal = isPortal;
2607
+ reactIs_development.isProfiler = isProfiler;
2608
+ reactIs_development.isStrictMode = isStrictMode;
2609
+ reactIs_development.isSuspense = isSuspense;
2610
+ reactIs_development.isSuspenseList = isSuspenseList;
2611
+ reactIs_development.isValidElementType = isValidElementType;
2612
+ reactIs_development.typeOf = typeOf;
2612
2613
  })();
2613
2614
  }
2614
2615
 
2615
2616
  if (process.env.NODE_ENV === 'production') {
2616
- reactIs$2.exports = reactIs_production_min$1;
2617
+ reactIs.exports = reactIs_production_min;
2617
2618
  } else {
2618
- reactIs$2.exports = reactIs_development$1;
2619
+ reactIs.exports = reactIs_development;
2619
2620
  }
2620
2621
 
2621
2622
  // Simplified polyfill for IE11 support
@@ -2653,9 +2654,9 @@ function getDisplayName(Component) {
2653
2654
  // TypeScript can't have components as objects but they exist in the form of `memo` or `Suspense`
2654
2655
  if (typeof Component === 'object') {
2655
2656
  switch (Component.$$typeof) {
2656
- case reactIs$2.exports.ForwardRef:
2657
+ case reactIs.exports.ForwardRef:
2657
2658
  return getWrappedName(Component, Component.render, 'ForwardRef');
2658
- case reactIs$2.exports.Memo:
2659
+ case reactIs.exports.Memo:
2659
2660
  return getWrappedName(Component, Component.type, 'memo');
2660
2661
  default:
2661
2662
  return undefined;
@@ -3185,1812 +3186,178 @@ var isPropValid = /* #__PURE__ */memoize$1(function (prop) {
3185
3186
  /* Z+1 */
3186
3187
  );
3187
3188
 
3188
- /*
3189
-
3190
- Based off glamor's StyleSheet, thanks Sunil ❤️
3191
-
3192
- high performance StyleSheet for css-in-js systems
3193
-
3194
- - uses multiple style tags behind the scenes for millions of rules
3195
- - uses `insertRule` for appending in production for *much* faster performance
3196
-
3197
- // usage
3198
-
3199
- import { StyleSheet } from '@emotion/sheet'
3200
-
3201
- let styleSheet = new StyleSheet({ key: '', container: document.head })
3189
+ var isBrowser$2 = typeof document !== 'undefined';
3190
+ function getRegisteredStyles(registered, registeredStyles, classNames) {
3191
+ var rawClassName = '';
3192
+ classNames.split(' ').forEach(function (className) {
3193
+ if (registered[className] !== undefined) {
3194
+ registeredStyles.push(registered[className] + ";");
3195
+ } else {
3196
+ rawClassName += className + " ";
3197
+ }
3198
+ });
3199
+ return rawClassName;
3200
+ }
3201
+ var registerStyles = function registerStyles(cache, serialized, isStringTag) {
3202
+ var className = cache.key + "-" + serialized.name;
3202
3203
 
3203
- styleSheet.insert('#box { border: 1px solid red; }')
3204
- - appends a css rule into the stylesheet
3204
+ if ( // we only need to add the styles to the registered cache if the
3205
+ // class name could be used further down
3206
+ // the tree but if it's a string tag, we know it won't
3207
+ // so we don't have to add it to registered cache.
3208
+ // this improves memory usage since we can avoid storing the whole style string
3209
+ (isStringTag === false || // we need to always store it if we're in compat mode and
3210
+ // in node since emotion-server relies on whether a style is in
3211
+ // the registered cache to know whether a style is global or not
3212
+ // also, note that this check will be dead code eliminated in the browser
3213
+ isBrowser$2 === false && cache.compat !== undefined) && cache.registered[className] === undefined) {
3214
+ cache.registered[className] = serialized.styles;
3215
+ }
3216
+ };
3217
+ var insertStyles = function insertStyles(cache, serialized, isStringTag) {
3218
+ registerStyles(cache, serialized, isStringTag);
3219
+ var className = cache.key + "-" + serialized.name;
3205
3220
 
3206
- styleSheet.flush()
3207
- - empties the stylesheet of all its contents
3221
+ if (cache.inserted[serialized.name] === undefined) {
3222
+ var stylesForSSR = '';
3223
+ var current = serialized;
3208
3224
 
3209
- */
3210
- // $FlowFixMe
3211
- function sheetForTag(tag) {
3212
- if (tag.sheet) {
3213
- // $FlowFixMe
3214
- return tag.sheet;
3215
- } // this weirdness brought to you by firefox
3225
+ do {
3226
+ var maybeStyles = cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
3216
3227
 
3217
- /* istanbul ignore next */
3228
+ if (!isBrowser$2 && maybeStyles !== undefined) {
3229
+ stylesForSSR += maybeStyles;
3230
+ }
3218
3231
 
3232
+ current = current.next;
3233
+ } while (current !== undefined);
3219
3234
 
3220
- for (var i = 0; i < document.styleSheets.length; i++) {
3221
- if (document.styleSheets[i].ownerNode === tag) {
3222
- // $FlowFixMe
3223
- return document.styleSheets[i];
3235
+ if (!isBrowser$2 && stylesForSSR.length !== 0) {
3236
+ return stylesForSSR;
3224
3237
  }
3225
3238
  }
3226
- }
3227
-
3228
- function createStyleElement(options) {
3229
- var tag = document.createElement('style');
3230
- tag.setAttribute('data-emotion', options.key);
3231
-
3232
- if (options.nonce !== undefined) {
3233
- tag.setAttribute('nonce', options.nonce);
3234
- }
3239
+ };
3235
3240
 
3236
- tag.appendChild(document.createTextNode(''));
3237
- tag.setAttribute('data-s', '');
3238
- return tag;
3239
- }
3241
+ /* eslint-disable */
3242
+ // Inspired by https://github.com/garycourt/murmurhash-js
3243
+ // Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86
3244
+ function murmur2(str) {
3245
+ // 'm' and 'r' are mixing constants generated offline.
3246
+ // They're not really 'magic', they just happen to work well.
3247
+ // const m = 0x5bd1e995;
3248
+ // const r = 24;
3249
+ // Initialize the hash
3250
+ var h = 0; // Mix 4 bytes at a time into the hash
3240
3251
 
3241
- var StyleSheet = /*#__PURE__*/function () {
3242
- // Using Node instead of HTMLElement since container may be a ShadowRoot
3243
- function StyleSheet(options) {
3244
- var _this = this;
3252
+ var k,
3253
+ i = 0,
3254
+ len = str.length;
3245
3255
 
3246
- this._insertTag = function (tag) {
3247
- var before;
3256
+ for (; len >= 4; ++i, len -= 4) {
3257
+ k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;
3258
+ k =
3259
+ /* Math.imul(k, m): */
3260
+ (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);
3261
+ k ^=
3262
+ /* k >>> r: */
3263
+ k >>> 24;
3264
+ h =
3265
+ /* Math.imul(k, m): */
3266
+ (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^
3267
+ /* Math.imul(h, m): */
3268
+ (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
3269
+ } // Handle the last few bytes of the input array
3248
3270
 
3249
- if (_this.tags.length === 0) {
3250
- if (_this.insertionPoint) {
3251
- before = _this.insertionPoint.nextSibling;
3252
- } else if (_this.prepend) {
3253
- before = _this.container.firstChild;
3254
- } else {
3255
- before = _this.before;
3256
- }
3257
- } else {
3258
- before = _this.tags[_this.tags.length - 1].nextSibling;
3259
- }
3260
3271
 
3261
- _this.container.insertBefore(tag, before);
3272
+ switch (len) {
3273
+ case 3:
3274
+ h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
3262
3275
 
3263
- _this.tags.push(tag);
3264
- };
3276
+ case 2:
3277
+ h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
3265
3278
 
3266
- this.isSpeedy = options.speedy === undefined ? process.env.NODE_ENV === 'production' : options.speedy;
3267
- this.tags = [];
3268
- this.ctr = 0;
3269
- this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets
3279
+ case 1:
3280
+ h ^= str.charCodeAt(i) & 0xff;
3281
+ h =
3282
+ /* Math.imul(h, m): */
3283
+ (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
3284
+ } // Do a few final mixes of the hash to ensure the last few
3285
+ // bytes are well-incorporated.
3270
3286
 
3271
- this.key = options.key;
3272
- this.container = options.container;
3273
- this.prepend = options.prepend;
3274
- this.insertionPoint = options.insertionPoint;
3275
- this.before = null;
3276
- }
3277
3287
 
3278
- var _proto = StyleSheet.prototype;
3288
+ h ^= h >>> 13;
3289
+ h =
3290
+ /* Math.imul(h, m): */
3291
+ (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
3292
+ return ((h ^ h >>> 15) >>> 0).toString(36);
3293
+ }
3279
3294
 
3280
- _proto.hydrate = function hydrate(nodes) {
3281
- nodes.forEach(this._insertTag);
3282
- };
3295
+ var unitlessKeys = {
3296
+ animationIterationCount: 1,
3297
+ aspectRatio: 1,
3298
+ borderImageOutset: 1,
3299
+ borderImageSlice: 1,
3300
+ borderImageWidth: 1,
3301
+ boxFlex: 1,
3302
+ boxFlexGroup: 1,
3303
+ boxOrdinalGroup: 1,
3304
+ columnCount: 1,
3305
+ columns: 1,
3306
+ flex: 1,
3307
+ flexGrow: 1,
3308
+ flexPositive: 1,
3309
+ flexShrink: 1,
3310
+ flexNegative: 1,
3311
+ flexOrder: 1,
3312
+ gridRow: 1,
3313
+ gridRowEnd: 1,
3314
+ gridRowSpan: 1,
3315
+ gridRowStart: 1,
3316
+ gridColumn: 1,
3317
+ gridColumnEnd: 1,
3318
+ gridColumnSpan: 1,
3319
+ gridColumnStart: 1,
3320
+ msGridRow: 1,
3321
+ msGridRowSpan: 1,
3322
+ msGridColumn: 1,
3323
+ msGridColumnSpan: 1,
3324
+ fontWeight: 1,
3325
+ lineHeight: 1,
3326
+ opacity: 1,
3327
+ order: 1,
3328
+ orphans: 1,
3329
+ tabSize: 1,
3330
+ widows: 1,
3331
+ zIndex: 1,
3332
+ zoom: 1,
3333
+ WebkitLineClamp: 1,
3334
+ // SVG-related properties
3335
+ fillOpacity: 1,
3336
+ floodOpacity: 1,
3337
+ stopOpacity: 1,
3338
+ strokeDasharray: 1,
3339
+ strokeDashoffset: 1,
3340
+ strokeMiterlimit: 1,
3341
+ strokeOpacity: 1,
3342
+ strokeWidth: 1
3343
+ };
3283
3344
 
3284
- _proto.insert = function insert(rule) {
3285
- // the max length is how many rules we have per style tag, it's 65000 in speedy mode
3286
- // it's 1 in dev because we insert source maps that map a single rule to a location
3287
- // and you can only have one source map per style tag
3288
- if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {
3289
- this._insertTag(createStyleElement(this));
3290
- }
3345
+ 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";
3346
+ 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).";
3347
+ var hyphenateRegex = /[A-Z]|^ms/g;
3348
+ var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
3291
3349
 
3292
- var tag = this.tags[this.tags.length - 1];
3350
+ var isCustomProperty = function isCustomProperty(property) {
3351
+ return property.charCodeAt(1) === 45;
3352
+ };
3293
3353
 
3294
- if (process.env.NODE_ENV !== 'production') {
3295
- var isImportRule = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105;
3354
+ var isProcessableValue = function isProcessableValue(value) {
3355
+ return value != null && typeof value !== 'boolean';
3356
+ };
3296
3357
 
3297
- if (isImportRule && this._alreadyInsertedOrderInsensitiveRule) {
3298
- // this would only cause problem in speedy mode
3299
- // but we don't want enabling speedy to affect the observable behavior
3300
- // so we report this error at all times
3301
- 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.');
3302
- }
3303
- this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule;
3304
- }
3305
-
3306
- if (this.isSpeedy) {
3307
- var sheet = sheetForTag(tag);
3308
-
3309
- try {
3310
- // this is the ultrafast version, works across browsers
3311
- // the big drawback is that the css won't be editable in devtools
3312
- sheet.insertRule(rule, sheet.cssRules.length);
3313
- } catch (e) {
3314
- 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)) {
3315
- console.error("There was a problem inserting the following rule: \"" + rule + "\"", e);
3316
- }
3317
- }
3318
- } else {
3319
- tag.appendChild(document.createTextNode(rule));
3320
- }
3321
-
3322
- this.ctr++;
3323
- };
3324
-
3325
- _proto.flush = function flush() {
3326
- // $FlowFixMe
3327
- this.tags.forEach(function (tag) {
3328
- return tag.parentNode && tag.parentNode.removeChild(tag);
3329
- });
3330
- this.tags = [];
3331
- this.ctr = 0;
3332
-
3333
- if (process.env.NODE_ENV !== 'production') {
3334
- this._alreadyInsertedOrderInsensitiveRule = false;
3335
- }
3336
- };
3337
-
3338
- return StyleSheet;
3339
- }();
3340
-
3341
- var MS = '-ms-';
3342
- var MOZ = '-moz-';
3343
- var WEBKIT = '-webkit-';
3344
-
3345
- var COMMENT = 'comm';
3346
- var RULESET = 'rule';
3347
- var DECLARATION = 'decl';
3348
- var IMPORT = '@import';
3349
- var KEYFRAMES = '@keyframes';
3350
- var LAYER = '@layer';
3351
-
3352
- /**
3353
- * @param {number}
3354
- * @return {number}
3355
- */
3356
- var abs = Math.abs;
3357
-
3358
- /**
3359
- * @param {number}
3360
- * @return {string}
3361
- */
3362
- var from = String.fromCharCode;
3363
-
3364
- /**
3365
- * @param {object}
3366
- * @return {object}
3367
- */
3368
- var assign = Object.assign;
3369
-
3370
- /**
3371
- * @param {string} value
3372
- * @param {number} length
3373
- * @return {number}
3374
- */
3375
- function hash (value, length) {
3376
- return charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0
3377
- }
3378
-
3379
- /**
3380
- * @param {string} value
3381
- * @return {string}
3382
- */
3383
- function trim (value) {
3384
- return value.trim()
3385
- }
3386
-
3387
- /**
3388
- * @param {string} value
3389
- * @param {RegExp} pattern
3390
- * @return {string?}
3391
- */
3392
- function match (value, pattern) {
3393
- return (value = pattern.exec(value)) ? value[0] : value
3394
- }
3395
-
3396
- /**
3397
- * @param {string} value
3398
- * @param {(string|RegExp)} pattern
3399
- * @param {string} replacement
3400
- * @return {string}
3401
- */
3402
- function replace (value, pattern, replacement) {
3403
- return value.replace(pattern, replacement)
3404
- }
3405
-
3406
- /**
3407
- * @param {string} value
3408
- * @param {string} search
3409
- * @return {number}
3410
- */
3411
- function indexof (value, search) {
3412
- return value.indexOf(search)
3413
- }
3414
-
3415
- /**
3416
- * @param {string} value
3417
- * @param {number} index
3418
- * @return {number}
3419
- */
3420
- function charat (value, index) {
3421
- return value.charCodeAt(index) | 0
3422
- }
3423
-
3424
- /**
3425
- * @param {string} value
3426
- * @param {number} begin
3427
- * @param {number} end
3428
- * @return {string}
3429
- */
3430
- function substr (value, begin, end) {
3431
- return value.slice(begin, end)
3432
- }
3433
-
3434
- /**
3435
- * @param {string} value
3436
- * @return {number}
3437
- */
3438
- function strlen (value) {
3439
- return value.length
3440
- }
3441
-
3442
- /**
3443
- * @param {any[]} value
3444
- * @return {number}
3445
- */
3446
- function sizeof (value) {
3447
- return value.length
3448
- }
3449
-
3450
- /**
3451
- * @param {any} value
3452
- * @param {any[]} array
3453
- * @return {any}
3454
- */
3455
- function append (value, array) {
3456
- return array.push(value), value
3457
- }
3458
-
3459
- /**
3460
- * @param {string[]} array
3461
- * @param {function} callback
3462
- * @return {string}
3463
- */
3464
- function combine (array, callback) {
3465
- return array.map(callback).join('')
3466
- }
3467
-
3468
- var line = 1;
3469
- var column = 1;
3470
- var length = 0;
3471
- var position = 0;
3472
- var character = 0;
3473
- var characters = '';
3474
-
3475
- /**
3476
- * @param {string} value
3477
- * @param {object | null} root
3478
- * @param {object | null} parent
3479
- * @param {string} type
3480
- * @param {string[] | string} props
3481
- * @param {object[] | string} children
3482
- * @param {number} length
3483
- */
3484
- function node$1 (value, root, parent, type, props, children, length) {
3485
- return {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}
3486
- }
3487
-
3488
- /**
3489
- * @param {object} root
3490
- * @param {object} props
3491
- * @return {object}
3492
- */
3493
- function copy (root, props) {
3494
- return assign(node$1('', null, null, '', null, null, 0), root, {length: -root.length}, props)
3495
- }
3496
-
3497
- /**
3498
- * @return {number}
3499
- */
3500
- function char () {
3501
- return character
3502
- }
3503
-
3504
- /**
3505
- * @return {number}
3506
- */
3507
- function prev () {
3508
- character = position > 0 ? charat(characters, --position) : 0;
3509
-
3510
- if (column--, character === 10)
3511
- column = 1, line--;
3512
-
3513
- return character
3514
- }
3515
-
3516
- /**
3517
- * @return {number}
3518
- */
3519
- function next () {
3520
- character = position < length ? charat(characters, position++) : 0;
3521
-
3522
- if (column++, character === 10)
3523
- column = 1, line++;
3524
-
3525
- return character
3526
- }
3527
-
3528
- /**
3529
- * @return {number}
3530
- */
3531
- function peek () {
3532
- return charat(characters, position)
3533
- }
3534
-
3535
- /**
3536
- * @return {number}
3537
- */
3538
- function caret () {
3539
- return position
3540
- }
3541
-
3542
- /**
3543
- * @param {number} begin
3544
- * @param {number} end
3545
- * @return {string}
3546
- */
3547
- function slice (begin, end) {
3548
- return substr(characters, begin, end)
3549
- }
3550
-
3551
- /**
3552
- * @param {number} type
3553
- * @return {number}
3554
- */
3555
- function token (type) {
3556
- switch (type) {
3557
- // \0 \t \n \r \s whitespace token
3558
- case 0: case 9: case 10: case 13: case 32:
3559
- return 5
3560
- // ! + , / > @ ~ isolate token
3561
- case 33: case 43: case 44: case 47: case 62: case 64: case 126:
3562
- // ; { } breakpoint token
3563
- case 59: case 123: case 125:
3564
- return 4
3565
- // : accompanied token
3566
- case 58:
3567
- return 3
3568
- // " ' ( [ opening delimit token
3569
- case 34: case 39: case 40: case 91:
3570
- return 2
3571
- // ) ] closing delimit token
3572
- case 41: case 93:
3573
- return 1
3574
- }
3575
-
3576
- return 0
3577
- }
3578
-
3579
- /**
3580
- * @param {string} value
3581
- * @return {any[]}
3582
- */
3583
- function alloc (value) {
3584
- return line = column = 1, length = strlen(characters = value), position = 0, []
3585
- }
3586
-
3587
- /**
3588
- * @param {any} value
3589
- * @return {any}
3590
- */
3591
- function dealloc (value) {
3592
- return characters = '', value
3593
- }
3594
-
3595
- /**
3596
- * @param {number} type
3597
- * @return {string}
3598
- */
3599
- function delimit (type) {
3600
- return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))
3601
- }
3602
-
3603
- /**
3604
- * @param {number} type
3605
- * @return {string}
3606
- */
3607
- function whitespace (type) {
3608
- while (character = peek())
3609
- if (character < 33)
3610
- next();
3611
- else
3612
- break
3613
-
3614
- return token(type) > 2 || token(character) > 3 ? '' : ' '
3615
- }
3616
-
3617
- /**
3618
- * @param {number} index
3619
- * @param {number} count
3620
- * @return {string}
3621
- */
3622
- function escaping (index, count) {
3623
- while (--count && next())
3624
- // not 0-9 A-F a-f
3625
- if (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))
3626
- break
3627
-
3628
- return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))
3629
- }
3630
-
3631
- /**
3632
- * @param {number} type
3633
- * @return {number}
3634
- */
3635
- function delimiter (type) {
3636
- while (next())
3637
- switch (character) {
3638
- // ] ) " '
3639
- case type:
3640
- return position
3641
- // " '
3642
- case 34: case 39:
3643
- if (type !== 34 && type !== 39)
3644
- delimiter(character);
3645
- break
3646
- // (
3647
- case 40:
3648
- if (type === 41)
3649
- delimiter(type);
3650
- break
3651
- // \
3652
- case 92:
3653
- next();
3654
- break
3655
- }
3656
-
3657
- return position
3658
- }
3659
-
3660
- /**
3661
- * @param {number} type
3662
- * @param {number} index
3663
- * @return {number}
3664
- */
3665
- function commenter (type, index) {
3666
- while (next())
3667
- // //
3668
- if (type + character === 47 + 10)
3669
- break
3670
- // /*
3671
- else if (type + character === 42 + 42 && peek() === 47)
3672
- break
3673
-
3674
- return '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())
3675
- }
3676
-
3677
- /**
3678
- * @param {number} index
3679
- * @return {string}
3680
- */
3681
- function identifier (index) {
3682
- while (!token(peek()))
3683
- next();
3684
-
3685
- return slice(index, position)
3686
- }
3687
-
3688
- /**
3689
- * @param {string} value
3690
- * @return {object[]}
3691
- */
3692
- function compile (value) {
3693
- return dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))
3694
- }
3695
-
3696
- /**
3697
- * @param {string} value
3698
- * @param {object} root
3699
- * @param {object?} parent
3700
- * @param {string[]} rule
3701
- * @param {string[]} rules
3702
- * @param {string[]} rulesets
3703
- * @param {number[]} pseudo
3704
- * @param {number[]} points
3705
- * @param {string[]} declarations
3706
- * @return {object}
3707
- */
3708
- function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
3709
- var index = 0;
3710
- var offset = 0;
3711
- var length = pseudo;
3712
- var atrule = 0;
3713
- var property = 0;
3714
- var previous = 0;
3715
- var variable = 1;
3716
- var scanning = 1;
3717
- var ampersand = 1;
3718
- var character = 0;
3719
- var type = '';
3720
- var props = rules;
3721
- var children = rulesets;
3722
- var reference = rule;
3723
- var characters = type;
3724
-
3725
- while (scanning)
3726
- switch (previous = character, character = next()) {
3727
- // (
3728
- case 40:
3729
- if (previous != 108 && charat(characters, length - 1) == 58) {
3730
- if (indexof(characters += replace(delimit(character), '&', '&\f'), '&\f') != -1)
3731
- ampersand = -1;
3732
- break
3733
- }
3734
- // " ' [
3735
- case 34: case 39: case 91:
3736
- characters += delimit(character);
3737
- break
3738
- // \t \n \r \s
3739
- case 9: case 10: case 13: case 32:
3740
- characters += whitespace(previous);
3741
- break
3742
- // \
3743
- case 92:
3744
- characters += escaping(caret() - 1, 7);
3745
- continue
3746
- // /
3747
- case 47:
3748
- switch (peek()) {
3749
- case 42: case 47:
3750
- append(comment(commenter(next(), caret()), root, parent), declarations);
3751
- break
3752
- default:
3753
- characters += '/';
3754
- }
3755
- break
3756
- // {
3757
- case 123 * variable:
3758
- points[index++] = strlen(characters) * ampersand;
3759
- // } ; \0
3760
- case 125 * variable: case 59: case 0:
3761
- switch (character) {
3762
- // \0 }
3763
- case 0: case 125: scanning = 0;
3764
- // ;
3765
- case 59 + offset: if (ampersand == -1) characters = replace(characters, /\f/g, '');
3766
- if (property > 0 && (strlen(characters) - length))
3767
- append(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations);
3768
- break
3769
- // @ ;
3770
- case 59: characters += ';';
3771
- // { rule/at-rule
3772
- default:
3773
- append(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets);
3774
-
3775
- if (character === 123)
3776
- if (offset === 0)
3777
- parse(characters, root, reference, reference, props, rulesets, length, points, children);
3778
- else
3779
- switch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {
3780
- // d l m s
3781
- case 100: case 108: case 109: case 115:
3782
- 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);
3783
- break
3784
- default:
3785
- parse(characters, reference, reference, reference, [''], children, 0, points, children);
3786
- }
3787
- }
3788
-
3789
- index = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo;
3790
- break
3791
- // :
3792
- case 58:
3793
- length = 1 + strlen(characters), property = previous;
3794
- default:
3795
- if (variable < 1)
3796
- if (character == 123)
3797
- --variable;
3798
- else if (character == 125 && variable++ == 0 && prev() == 125)
3799
- continue
3800
-
3801
- switch (characters += from(character), character * variable) {
3802
- // &
3803
- case 38:
3804
- ampersand = offset > 0 ? 1 : (characters += '\f', -1);
3805
- break
3806
- // ,
3807
- case 44:
3808
- points[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1;
3809
- break
3810
- // @
3811
- case 64:
3812
- // -
3813
- if (peek() === 45)
3814
- characters += delimit(next());
3815
-
3816
- atrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++;
3817
- break
3818
- // -
3819
- case 45:
3820
- if (previous === 45 && strlen(characters) == 2)
3821
- variable = 0;
3822
- }
3823
- }
3824
-
3825
- return rulesets
3826
- }
3827
-
3828
- /**
3829
- * @param {string} value
3830
- * @param {object} root
3831
- * @param {object?} parent
3832
- * @param {number} index
3833
- * @param {number} offset
3834
- * @param {string[]} rules
3835
- * @param {number[]} points
3836
- * @param {string} type
3837
- * @param {string[]} props
3838
- * @param {string[]} children
3839
- * @param {number} length
3840
- * @return {object}
3841
- */
3842
- function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length) {
3843
- var post = offset - 1;
3844
- var rule = offset === 0 ? rules : [''];
3845
- var size = sizeof(rule);
3846
-
3847
- for (var i = 0, j = 0, k = 0; i < index; ++i)
3848
- for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)
3849
- if (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\f/g, rule[x])))
3850
- props[k++] = z;
3851
-
3852
- return node$1(value, root, parent, offset === 0 ? RULESET : type, props, children, length)
3853
- }
3854
-
3855
- /**
3856
- * @param {number} value
3857
- * @param {object} root
3858
- * @param {object?} parent
3859
- * @return {object}
3860
- */
3861
- function comment (value, root, parent) {
3862
- return node$1(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0)
3863
- }
3864
-
3865
- /**
3866
- * @param {string} value
3867
- * @param {object} root
3868
- * @param {object?} parent
3869
- * @param {number} length
3870
- * @return {object}
3871
- */
3872
- function declaration (value, root, parent, length) {
3873
- return node$1(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length)
3874
- }
3875
-
3876
- /**
3877
- * @param {object[]} children
3878
- * @param {function} callback
3879
- * @return {string}
3880
- */
3881
- function serialize (children, callback) {
3882
- var output = '';
3883
- var length = sizeof(children);
3884
-
3885
- for (var i = 0; i < length; i++)
3886
- output += callback(children[i], i, children, callback) || '';
3887
-
3888
- return output
3889
- }
3890
-
3891
- /**
3892
- * @param {object} element
3893
- * @param {number} index
3894
- * @param {object[]} children
3895
- * @param {function} callback
3896
- * @return {string}
3897
- */
3898
- function stringify (element, index, children, callback) {
3899
- switch (element.type) {
3900
- case LAYER: if (element.children.length) break
3901
- case IMPORT: case DECLARATION: return element.return = element.return || element.value
3902
- case COMMENT: return ''
3903
- case KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'
3904
- case RULESET: element.value = element.props.join(',');
3905
- }
3906
-
3907
- return strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''
3908
- }
3909
-
3910
- /**
3911
- * @param {function[]} collection
3912
- * @return {function}
3913
- */
3914
- function middleware (collection) {
3915
- var length = sizeof(collection);
3916
-
3917
- return function (element, index, children, callback) {
3918
- var output = '';
3919
-
3920
- for (var i = 0; i < length; i++)
3921
- output += collection[i](element, index, children, callback) || '';
3922
-
3923
- return output
3924
- }
3925
- }
3926
-
3927
- /**
3928
- * @param {function} callback
3929
- * @return {function}
3930
- */
3931
- function rulesheet (callback) {
3932
- return function (element) {
3933
- if (!element.root)
3934
- if (element = element.return)
3935
- callback(element);
3936
- }
3937
- }
3938
-
3939
- var weakMemoize = function weakMemoize(func) {
3940
- // $FlowFixMe flow doesn't include all non-primitive types as allowed for weakmaps
3941
- var cache = new WeakMap();
3942
- return function (arg) {
3943
- if (cache.has(arg)) {
3944
- // $FlowFixMe
3945
- return cache.get(arg);
3946
- }
3947
-
3948
- var ret = func(arg);
3949
- cache.set(arg, ret);
3950
- return ret;
3951
- };
3952
- };
3953
-
3954
- var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
3955
- var previous = 0;
3956
- var character = 0;
3957
-
3958
- while (true) {
3959
- previous = character;
3960
- character = peek(); // &\f
3961
-
3962
- if (previous === 38 && character === 12) {
3963
- points[index] = 1;
3964
- }
3965
-
3966
- if (token(character)) {
3967
- break;
3968
- }
3969
-
3970
- next();
3971
- }
3972
-
3973
- return slice(begin, position);
3974
- };
3975
-
3976
- var toRules = function toRules(parsed, points) {
3977
- // pretend we've started with a comma
3978
- var index = -1;
3979
- var character = 44;
3980
-
3981
- do {
3982
- switch (token(character)) {
3983
- case 0:
3984
- // &\f
3985
- if (character === 38 && peek() === 12) {
3986
- // this is not 100% correct, we don't account for literal sequences here - like for example quoted strings
3987
- // stylis inserts \f after & to know when & where it should replace this sequence with the context selector
3988
- // and when it should just concatenate the outer and inner selectors
3989
- // it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here
3990
- points[index] = 1;
3991
- }
3992
-
3993
- parsed[index] += identifierWithPointTracking(position - 1, points, index);
3994
- break;
3995
-
3996
- case 2:
3997
- parsed[index] += delimit(character);
3998
- break;
3999
-
4000
- case 4:
4001
- // comma
4002
- if (character === 44) {
4003
- // colon
4004
- parsed[++index] = peek() === 58 ? '&\f' : '';
4005
- points[index] = parsed[index].length;
4006
- break;
4007
- }
4008
-
4009
- // fallthrough
4010
-
4011
- default:
4012
- parsed[index] += from(character);
4013
- }
4014
- } while (character = next());
4015
-
4016
- return parsed;
4017
- };
4018
-
4019
- var getRules = function getRules(value, points) {
4020
- return dealloc(toRules(alloc(value), points));
4021
- }; // WeakSet would be more appropriate, but only WeakMap is supported in IE11
4022
-
4023
-
4024
- var fixedElements = /* #__PURE__ */new WeakMap();
4025
- var compat = function compat(element) {
4026
- if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo
4027
- // negative .length indicates that this rule has been already prefixed
4028
- element.length < 1) {
4029
- return;
4030
- }
4031
-
4032
- var value = element.value,
4033
- parent = element.parent;
4034
- var isImplicitRule = element.column === parent.column && element.line === parent.line;
4035
-
4036
- while (parent.type !== 'rule') {
4037
- parent = parent.parent;
4038
- if (!parent) return;
4039
- } // short-circuit for the simplest case
4040
-
4041
-
4042
- if (element.props.length === 1 && value.charCodeAt(0) !== 58
4043
- /* colon */
4044
- && !fixedElements.get(parent)) {
4045
- return;
4046
- } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)
4047
- // then the props has already been manipulated beforehand as they that array is shared between it and its "rule parent"
4048
-
4049
-
4050
- if (isImplicitRule) {
4051
- return;
4052
- }
4053
-
4054
- fixedElements.set(element, true);
4055
- var points = [];
4056
- var rules = getRules(value, points);
4057
- var parentRules = parent.props;
4058
-
4059
- for (var i = 0, k = 0; i < rules.length; i++) {
4060
- for (var j = 0; j < parentRules.length; j++, k++) {
4061
- element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
4062
- }
4063
- }
4064
- };
4065
- var removeLabel = function removeLabel(element) {
4066
- if (element.type === 'decl') {
4067
- var value = element.value;
4068
-
4069
- if ( // charcode for l
4070
- value.charCodeAt(0) === 108 && // charcode for b
4071
- value.charCodeAt(2) === 98) {
4072
- // this ignores label
4073
- element["return"] = '';
4074
- element.value = '';
4075
- }
4076
- }
4077
- };
4078
- var ignoreFlag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';
4079
-
4080
- var isIgnoringComment = function isIgnoringComment(element) {
4081
- return element.type === 'comm' && element.children.indexOf(ignoreFlag) > -1;
4082
- };
4083
-
4084
- var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) {
4085
- return function (element, index, children) {
4086
- if (element.type !== 'rule' || cache.compat) return;
4087
- var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);
4088
-
4089
- if (unsafePseudoClasses) {
4090
- var isNested = !!element.parent; // in nested rules comments become children of the "auto-inserted" rule and that's always the `element.parent`
4091
- //
4092
- // considering this input:
4093
- // .a {
4094
- // .b /* comm */ {}
4095
- // color: hotpink;
4096
- // }
4097
- // we get output corresponding to this:
4098
- // .a {
4099
- // & {
4100
- // /* comm */
4101
- // color: hotpink;
4102
- // }
4103
- // .b {}
4104
- // }
4105
-
4106
- var commentContainer = isNested ? element.parent.children : // global rule at the root level
4107
- children;
4108
-
4109
- for (var i = commentContainer.length - 1; i >= 0; i--) {
4110
- var node = commentContainer[i];
4111
-
4112
- if (node.line < element.line) {
4113
- break;
4114
- } // it is quite weird but comments are *usually* put at `column: element.column - 1`
4115
- // so we seek *from the end* for the node that is earlier than the rule's `element` and check that
4116
- // this will also match inputs like this:
4117
- // .a {
4118
- // /* comm */
4119
- // .b {}
4120
- // }
4121
- //
4122
- // but that is fine
4123
- //
4124
- // it would be the easiest to change the placement of the comment to be the first child of the rule:
4125
- // .a {
4126
- // .b { /* comm */ }
4127
- // }
4128
- // with such inputs we wouldn't have to search for the comment at all
4129
- // TODO: consider changing this comment placement in the next major version
4130
-
4131
-
4132
- if (node.column < element.column) {
4133
- if (isIgnoringComment(node)) {
4134
- return;
4135
- }
4136
-
4137
- break;
4138
- }
4139
- }
4140
-
4141
- unsafePseudoClasses.forEach(function (unsafePseudoClass) {
4142
- console.error("The pseudo class \"" + unsafePseudoClass + "\" is potentially unsafe when doing server-side rendering. Try changing it to \"" + unsafePseudoClass.split('-child')[0] + "-of-type\".");
4143
- });
4144
- }
4145
- };
4146
- };
4147
-
4148
- var isImportRule = function isImportRule(element) {
4149
- return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64;
4150
- };
4151
-
4152
- var isPrependedWithRegularRules = function isPrependedWithRegularRules(index, children) {
4153
- for (var i = index - 1; i >= 0; i--) {
4154
- if (!isImportRule(children[i])) {
4155
- return true;
4156
- }
4157
- }
4158
-
4159
- return false;
4160
- }; // use this to remove incorrect elements from further processing
4161
- // so they don't get handed to the `sheet` (or anything else)
4162
- // as that could potentially lead to additional logs which in turn could be overhelming to the user
4163
-
4164
-
4165
- var nullifyElement = function nullifyElement(element) {
4166
- element.type = '';
4167
- element.value = '';
4168
- element["return"] = '';
4169
- element.children = '';
4170
- element.props = '';
4171
- };
4172
-
4173
- var incorrectImportAlarm = function incorrectImportAlarm(element, index, children) {
4174
- if (!isImportRule(element)) {
4175
- return;
4176
- }
4177
-
4178
- if (element.parent) {
4179
- 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.");
4180
- nullifyElement(element);
4181
- } else if (isPrependedWithRegularRules(index, children)) {
4182
- console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules.");
4183
- nullifyElement(element);
4184
- }
4185
- };
4186
-
4187
- /* eslint-disable no-fallthrough */
4188
-
4189
- function prefix(value, length) {
4190
- switch (hash(value, length)) {
4191
- // color-adjust
4192
- case 5103:
4193
- return WEBKIT + 'print-' + value + value;
4194
- // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
4195
-
4196
- case 5737:
4197
- case 4201:
4198
- case 3177:
4199
- case 3433:
4200
- case 1641:
4201
- case 4457:
4202
- case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
4203
-
4204
- case 5572:
4205
- case 6356:
4206
- case 5844:
4207
- case 3191:
4208
- case 6645:
4209
- case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
4210
-
4211
- case 6391:
4212
- case 5879:
4213
- case 5623:
4214
- case 6135:
4215
- case 4599:
4216
- case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
4217
-
4218
- case 4215:
4219
- case 6389:
4220
- case 5109:
4221
- case 5365:
4222
- case 5621:
4223
- case 3829:
4224
- return WEBKIT + value + value;
4225
- // appearance, user-select, transform, hyphens, text-size-adjust
4226
-
4227
- case 5349:
4228
- case 4246:
4229
- case 4810:
4230
- case 6968:
4231
- case 2756:
4232
- return WEBKIT + value + MOZ + value + MS + value + value;
4233
- // flex, flex-direction
4234
-
4235
- case 6828:
4236
- case 4268:
4237
- return WEBKIT + value + MS + value + value;
4238
- // order
4239
-
4240
- case 6165:
4241
- return WEBKIT + value + MS + 'flex-' + value + value;
4242
- // align-items
4243
-
4244
- case 5187:
4245
- return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;
4246
- // align-self
4247
-
4248
- case 5443:
4249
- return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;
4250
- // align-content
4251
-
4252
- case 4675:
4253
- return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;
4254
- // flex-shrink
4255
-
4256
- case 5548:
4257
- return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;
4258
- // flex-basis
4259
-
4260
- case 5292:
4261
- return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;
4262
- // flex-grow
4263
-
4264
- case 6060:
4265
- return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;
4266
- // transition
4267
-
4268
- case 4554:
4269
- return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;
4270
- // cursor
4271
-
4272
- case 6187:
4273
- return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;
4274
- // background, background-image
4275
-
4276
- case 5495:
4277
- case 3959:
4278
- return replace(value, /(image-set\([^]*)/, WEBKIT + '$1' + '$`$1');
4279
- // justify-content
4280
-
4281
- case 4968:
4282
- return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;
4283
- // (margin|padding)-inline-(start|end)
4284
-
4285
- case 4095:
4286
- case 3583:
4287
- case 4068:
4288
- case 2532:
4289
- return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;
4290
- // (min|max)?(width|height|inline-size|block-size)
4291
-
4292
- case 8116:
4293
- case 7059:
4294
- case 5753:
4295
- case 5535:
4296
- case 5445:
4297
- case 5701:
4298
- case 4933:
4299
- case 4677:
4300
- case 5533:
4301
- case 5789:
4302
- case 5021:
4303
- case 4765:
4304
- // stretch, max-content, min-content, fill-available
4305
- if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {
4306
- // (m)ax-content, (m)in-content
4307
- case 109:
4308
- // -
4309
- if (charat(value, length + 4) !== 45) break;
4310
- // (f)ill-available, (f)it-content
4311
-
4312
- case 102:
4313
- return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;
4314
- // (s)tretch
4315
-
4316
- case 115:
4317
- return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;
4318
- }
4319
- break;
4320
- // position: sticky
4321
-
4322
- case 4949:
4323
- // (s)ticky?
4324
- if (charat(value, length + 1) !== 115) break;
4325
- // display: (flex|inline-flex)
4326
-
4327
- case 6444:
4328
- switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {
4329
- // stic(k)y
4330
- case 107:
4331
- return replace(value, ':', ':' + WEBKIT) + value;
4332
- // (inline-)?fl(e)x
4333
-
4334
- case 101:
4335
- return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;
4336
- }
4337
-
4338
- break;
4339
- // writing-mode
4340
-
4341
- case 5936:
4342
- switch (charat(value, length + 11)) {
4343
- // vertical-l(r)
4344
- case 114:
4345
- return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value;
4346
- // vertical-r(l)
4347
-
4348
- case 108:
4349
- return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value;
4350
- // horizontal(-)tb
4351
-
4352
- case 45:
4353
- return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value;
4354
- }
4355
-
4356
- return WEBKIT + value + MS + value + value;
4357
- }
4358
-
4359
- return value;
4360
- }
4361
-
4362
- var prefixer = function prefixer(element, index, children, callback) {
4363
- if (element.length > -1) if (!element["return"]) switch (element.type) {
4364
- case DECLARATION:
4365
- element["return"] = prefix(element.value, element.length);
4366
- break;
4367
-
4368
- case KEYFRAMES:
4369
- return serialize([copy(element, {
4370
- value: replace(element.value, '@', '@' + WEBKIT)
4371
- })], callback);
4372
-
4373
- case RULESET:
4374
- if (element.length) return combine(element.props, function (value) {
4375
- switch (match(value, /(::plac\w+|:read-\w+)/)) {
4376
- // :read-(only|write)
4377
- case ':read-only':
4378
- case ':read-write':
4379
- return serialize([copy(element, {
4380
- props: [replace(value, /:(read-\w+)/, ':' + MOZ + '$1')]
4381
- })], callback);
4382
- // :placeholder
4383
-
4384
- case '::placeholder':
4385
- return serialize([copy(element, {
4386
- props: [replace(value, /:(plac\w+)/, ':' + WEBKIT + 'input-$1')]
4387
- }), copy(element, {
4388
- props: [replace(value, /:(plac\w+)/, ':' + MOZ + '$1')]
4389
- }), copy(element, {
4390
- props: [replace(value, /:(plac\w+)/, MS + 'input-$1')]
4391
- })], callback);
4392
- }
4393
-
4394
- return '';
4395
- });
4396
- }
4397
- };
4398
-
4399
- var isBrowser$5 = typeof document !== 'undefined';
4400
- var getServerStylisCache = isBrowser$5 ? undefined : weakMemoize(function () {
4401
- return memoize$1(function () {
4402
- var cache = {};
4403
- return function (name) {
4404
- return cache[name];
4405
- };
4406
- });
4407
- });
4408
- var defaultStylisPlugins = [prefixer];
4409
-
4410
- var createCache = function createCache(options) {
4411
- var key = options.key;
4412
-
4413
- if (process.env.NODE_ENV !== 'production' && !key) {
4414
- 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.");
4415
- }
4416
-
4417
- if (isBrowser$5 && key === 'css') {
4418
- var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); // get SSRed styles out of the way of React's hydration
4419
- // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)
4420
- // note this very very intentionally targets all style elements regardless of the key to ensure
4421
- // that creating a cache works inside of render of a React component
4422
-
4423
- Array.prototype.forEach.call(ssrStyles, function (node) {
4424
- // we want to only move elements which have a space in the data-emotion attribute value
4425
- // because that indicates that it is an Emotion 11 server-side rendered style elements
4426
- // while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector
4427
- // Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)
4428
- // so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles
4429
- // will not result in the Emotion 10 styles being destroyed
4430
- var dataEmotionAttribute = node.getAttribute('data-emotion');
4431
-
4432
- if (dataEmotionAttribute.indexOf(' ') === -1) {
4433
- return;
4434
- }
4435
- document.head.appendChild(node);
4436
- node.setAttribute('data-s', '');
4437
- });
4438
- }
4439
-
4440
- var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
4441
-
4442
- if (process.env.NODE_ENV !== 'production') {
4443
- // $FlowFixMe
4444
- if (/[^a-z-]/.test(key)) {
4445
- throw new Error("Emotion key must only contain lower case alphabetical characters and - but \"" + key + "\" was passed");
4446
- }
4447
- }
4448
-
4449
- var inserted = {};
4450
- var container;
4451
- var nodesToHydrate = [];
4452
-
4453
- if (isBrowser$5) {
4454
- container = options.container || document.head;
4455
- Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which
4456
- // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
4457
- document.querySelectorAll("style[data-emotion^=\"" + key + " \"]"), function (node) {
4458
- var attrib = node.getAttribute("data-emotion").split(' '); // $FlowFixMe
4459
-
4460
- for (var i = 1; i < attrib.length; i++) {
4461
- inserted[attrib[i]] = true;
4462
- }
4463
-
4464
- nodesToHydrate.push(node);
4465
- });
4466
- }
4467
-
4468
- var _insert;
4469
-
4470
- var omnipresentPlugins = [compat, removeLabel];
4471
-
4472
- if (process.env.NODE_ENV !== 'production') {
4473
- omnipresentPlugins.push(createUnsafeSelectorsAlarm({
4474
- get compat() {
4475
- return cache.compat;
4476
- }
4477
-
4478
- }), incorrectImportAlarm);
4479
- }
4480
-
4481
- if (isBrowser$5) {
4482
- var currentSheet;
4483
- var finalizingPlugins = [stringify, process.env.NODE_ENV !== 'production' ? function (element) {
4484
- if (!element.root) {
4485
- if (element["return"]) {
4486
- currentSheet.insert(element["return"]);
4487
- } else if (element.value && element.type !== COMMENT) {
4488
- // insert empty rule in non-production environments
4489
- // so @emotion/jest can grab `key` from the (JS)DOM for caches without any rules inserted yet
4490
- currentSheet.insert(element.value + "{}");
4491
- }
4492
- }
4493
- } : rulesheet(function (rule) {
4494
- currentSheet.insert(rule);
4495
- })];
4496
- var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
4497
-
4498
- var stylis = function stylis(styles) {
4499
- return serialize(compile(styles), serializer);
4500
- };
4501
-
4502
- _insert = function insert(selector, serialized, sheet, shouldCache) {
4503
- currentSheet = sheet;
4504
-
4505
- if (process.env.NODE_ENV !== 'production' && serialized.map !== undefined) {
4506
- currentSheet = {
4507
- insert: function insert(rule) {
4508
- sheet.insert(rule + serialized.map);
4509
- }
4510
- };
4511
- }
4512
-
4513
- stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
4514
-
4515
- if (shouldCache) {
4516
- cache.inserted[serialized.name] = true;
4517
- }
4518
- };
4519
- } else {
4520
- var _finalizingPlugins = [stringify];
4521
-
4522
- var _serializer = middleware(omnipresentPlugins.concat(stylisPlugins, _finalizingPlugins));
4523
-
4524
- var _stylis = function _stylis(styles) {
4525
- return serialize(compile(styles), _serializer);
4526
- }; // $FlowFixMe
4527
-
4528
-
4529
- var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
4530
-
4531
- var getRules = function getRules(selector, serialized) {
4532
- var name = serialized.name;
4533
-
4534
- if (serverStylisCache[name] === undefined) {
4535
- serverStylisCache[name] = _stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
4536
- }
4537
-
4538
- return serverStylisCache[name];
4539
- };
4540
-
4541
- _insert = function _insert(selector, serialized, sheet, shouldCache) {
4542
- var name = serialized.name;
4543
- var rules = getRules(selector, serialized);
4544
-
4545
- if (cache.compat === undefined) {
4546
- // in regular mode, we don't set the styles on the inserted cache
4547
- // since we don't need to and that would be wasting memory
4548
- // we return them so that they are rendered in a style tag
4549
- if (shouldCache) {
4550
- cache.inserted[name] = true;
4551
- }
4552
-
4553
- if ( // using === development instead of !== production
4554
- // because if people do ssr in tests, the source maps showing up would be annoying
4555
- process.env.NODE_ENV === 'development' && serialized.map !== undefined) {
4556
- return rules + serialized.map;
4557
- }
4558
-
4559
- return rules;
4560
- } else {
4561
- // in compat mode, we put the styles on the inserted cache so
4562
- // that emotion-server can pull out the styles
4563
- // except when we don't want to cache it which was in Global but now
4564
- // is nowhere but we don't want to do a major right now
4565
- // and just in case we're going to leave the case here
4566
- // it's also not affecting client side bundle size
4567
- // so it's really not a big deal
4568
- if (shouldCache) {
4569
- cache.inserted[name] = rules;
4570
- } else {
4571
- return rules;
4572
- }
4573
- }
4574
- };
4575
- }
4576
-
4577
- var cache = {
4578
- key: key,
4579
- sheet: new StyleSheet({
4580
- key: key,
4581
- container: container,
4582
- nonce: options.nonce,
4583
- speedy: options.speedy,
4584
- prepend: options.prepend,
4585
- insertionPoint: options.insertionPoint
4586
- }),
4587
- nonce: options.nonce,
4588
- inserted: inserted,
4589
- registered: {},
4590
- insert: _insert
4591
- };
4592
- cache.sheet.hydrate(nodesToHydrate);
4593
- return cache;
4594
- };
4595
-
4596
- var reactIs$1 = {exports: {}};
4597
-
4598
- var reactIs_production_min = {};
4599
-
4600
- /** @license React v16.13.1
4601
- * react-is.production.min.js
4602
- *
4603
- * Copyright (c) Facebook, Inc. and its affiliates.
4604
- *
4605
- * This source code is licensed under the MIT license found in the
4606
- * LICENSE file in the root directory of this source tree.
4607
- */
4608
- 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?
4609
- Symbol.for("react.suspense_list"):60120,r$1=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;
4610
- 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$1: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$1;reactIs_production_min.Portal=d;
4611
- 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};
4612
- reactIs_production_min.isMemo=function(a){return z(a)===r$1};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};
4613
- 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$1||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;
4614
-
4615
- var reactIs_development = {};
4616
-
4617
- /** @license React v16.13.1
4618
- * react-is.development.js
4619
- *
4620
- * Copyright (c) Facebook, Inc. and its affiliates.
4621
- *
4622
- * This source code is licensed under the MIT license found in the
4623
- * LICENSE file in the root directory of this source tree.
4624
- */
4625
-
4626
-
4627
-
4628
- if (process.env.NODE_ENV !== "production") {
4629
- (function() {
4630
-
4631
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
4632
- // nor polyfill, then a plain number is used for performance.
4633
- var hasSymbol = typeof Symbol === 'function' && Symbol.for;
4634
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
4635
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
4636
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
4637
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
4638
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
4639
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
4640
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
4641
- // (unstable) APIs that have been removed. Can we remove the symbols?
4642
-
4643
- var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
4644
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
4645
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
4646
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
4647
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
4648
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
4649
- var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
4650
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
4651
- var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
4652
- var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
4653
- var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
4654
-
4655
- function isValidElementType(type) {
4656
- return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
4657
- type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
4658
- }
4659
-
4660
- function typeOf(object) {
4661
- if (typeof object === 'object' && object !== null) {
4662
- var $$typeof = object.$$typeof;
4663
-
4664
- switch ($$typeof) {
4665
- case REACT_ELEMENT_TYPE:
4666
- var type = object.type;
4667
-
4668
- switch (type) {
4669
- case REACT_ASYNC_MODE_TYPE:
4670
- case REACT_CONCURRENT_MODE_TYPE:
4671
- case REACT_FRAGMENT_TYPE:
4672
- case REACT_PROFILER_TYPE:
4673
- case REACT_STRICT_MODE_TYPE:
4674
- case REACT_SUSPENSE_TYPE:
4675
- return type;
4676
-
4677
- default:
4678
- var $$typeofType = type && type.$$typeof;
4679
-
4680
- switch ($$typeofType) {
4681
- case REACT_CONTEXT_TYPE:
4682
- case REACT_FORWARD_REF_TYPE:
4683
- case REACT_LAZY_TYPE:
4684
- case REACT_MEMO_TYPE:
4685
- case REACT_PROVIDER_TYPE:
4686
- return $$typeofType;
4687
-
4688
- default:
4689
- return $$typeof;
4690
- }
4691
-
4692
- }
4693
-
4694
- case REACT_PORTAL_TYPE:
4695
- return $$typeof;
4696
- }
4697
- }
4698
-
4699
- return undefined;
4700
- } // AsyncMode is deprecated along with isAsyncMode
4701
-
4702
- var AsyncMode = REACT_ASYNC_MODE_TYPE;
4703
- var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
4704
- var ContextConsumer = REACT_CONTEXT_TYPE;
4705
- var ContextProvider = REACT_PROVIDER_TYPE;
4706
- var Element = REACT_ELEMENT_TYPE;
4707
- var ForwardRef = REACT_FORWARD_REF_TYPE;
4708
- var Fragment = REACT_FRAGMENT_TYPE;
4709
- var Lazy = REACT_LAZY_TYPE;
4710
- var Memo = REACT_MEMO_TYPE;
4711
- var Portal = REACT_PORTAL_TYPE;
4712
- var Profiler = REACT_PROFILER_TYPE;
4713
- var StrictMode = REACT_STRICT_MODE_TYPE;
4714
- var Suspense = REACT_SUSPENSE_TYPE;
4715
- var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
4716
-
4717
- function isAsyncMode(object) {
4718
- {
4719
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
4720
- hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
4721
-
4722
- console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
4723
- }
4724
- }
4725
-
4726
- return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
4727
- }
4728
- function isConcurrentMode(object) {
4729
- return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
4730
- }
4731
- function isContextConsumer(object) {
4732
- return typeOf(object) === REACT_CONTEXT_TYPE;
4733
- }
4734
- function isContextProvider(object) {
4735
- return typeOf(object) === REACT_PROVIDER_TYPE;
4736
- }
4737
- function isElement(object) {
4738
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
4739
- }
4740
- function isForwardRef(object) {
4741
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
4742
- }
4743
- function isFragment(object) {
4744
- return typeOf(object) === REACT_FRAGMENT_TYPE;
4745
- }
4746
- function isLazy(object) {
4747
- return typeOf(object) === REACT_LAZY_TYPE;
4748
- }
4749
- function isMemo(object) {
4750
- return typeOf(object) === REACT_MEMO_TYPE;
4751
- }
4752
- function isPortal(object) {
4753
- return typeOf(object) === REACT_PORTAL_TYPE;
4754
- }
4755
- function isProfiler(object) {
4756
- return typeOf(object) === REACT_PROFILER_TYPE;
4757
- }
4758
- function isStrictMode(object) {
4759
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
4760
- }
4761
- function isSuspense(object) {
4762
- return typeOf(object) === REACT_SUSPENSE_TYPE;
4763
- }
4764
-
4765
- reactIs_development.AsyncMode = AsyncMode;
4766
- reactIs_development.ConcurrentMode = ConcurrentMode;
4767
- reactIs_development.ContextConsumer = ContextConsumer;
4768
- reactIs_development.ContextProvider = ContextProvider;
4769
- reactIs_development.Element = Element;
4770
- reactIs_development.ForwardRef = ForwardRef;
4771
- reactIs_development.Fragment = Fragment;
4772
- reactIs_development.Lazy = Lazy;
4773
- reactIs_development.Memo = Memo;
4774
- reactIs_development.Portal = Portal;
4775
- reactIs_development.Profiler = Profiler;
4776
- reactIs_development.StrictMode = StrictMode;
4777
- reactIs_development.Suspense = Suspense;
4778
- reactIs_development.isAsyncMode = isAsyncMode;
4779
- reactIs_development.isConcurrentMode = isConcurrentMode;
4780
- reactIs_development.isContextConsumer = isContextConsumer;
4781
- reactIs_development.isContextProvider = isContextProvider;
4782
- reactIs_development.isElement = isElement;
4783
- reactIs_development.isForwardRef = isForwardRef;
4784
- reactIs_development.isFragment = isFragment;
4785
- reactIs_development.isLazy = isLazy;
4786
- reactIs_development.isMemo = isMemo;
4787
- reactIs_development.isPortal = isPortal;
4788
- reactIs_development.isProfiler = isProfiler;
4789
- reactIs_development.isStrictMode = isStrictMode;
4790
- reactIs_development.isSuspense = isSuspense;
4791
- reactIs_development.isValidElementType = isValidElementType;
4792
- reactIs_development.typeOf = typeOf;
4793
- })();
4794
- }
4795
-
4796
- if (process.env.NODE_ENV === 'production') {
4797
- reactIs$1.exports = reactIs_production_min;
4798
- } else {
4799
- reactIs$1.exports = reactIs_development;
4800
- }
4801
-
4802
- var reactIs = reactIs$1.exports;
4803
- var FORWARD_REF_STATICS = {
4804
- '$$typeof': true,
4805
- render: true,
4806
- defaultProps: true,
4807
- displayName: true,
4808
- propTypes: true
4809
- };
4810
- var MEMO_STATICS = {
4811
- '$$typeof': true,
4812
- compare: true,
4813
- defaultProps: true,
4814
- displayName: true,
4815
- propTypes: true,
4816
- type: true
4817
- };
4818
- var TYPE_STATICS = {};
4819
- TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
4820
- TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
4821
-
4822
- var isBrowser$4 = typeof document !== 'undefined';
4823
- function getRegisteredStyles(registered, registeredStyles, classNames) {
4824
- var rawClassName = '';
4825
- classNames.split(' ').forEach(function (className) {
4826
- if (registered[className] !== undefined) {
4827
- registeredStyles.push(registered[className] + ";");
4828
- } else {
4829
- rawClassName += className + " ";
4830
- }
4831
- });
4832
- return rawClassName;
4833
- }
4834
- var registerStyles = function registerStyles(cache, serialized, isStringTag) {
4835
- var className = cache.key + "-" + serialized.name;
4836
-
4837
- if ( // we only need to add the styles to the registered cache if the
4838
- // class name could be used further down
4839
- // the tree but if it's a string tag, we know it won't
4840
- // so we don't have to add it to registered cache.
4841
- // this improves memory usage since we can avoid storing the whole style string
4842
- (isStringTag === false || // we need to always store it if we're in compat mode and
4843
- // in node since emotion-server relies on whether a style is in
4844
- // the registered cache to know whether a style is global or not
4845
- // also, note that this check will be dead code eliminated in the browser
4846
- isBrowser$4 === false && cache.compat !== undefined) && cache.registered[className] === undefined) {
4847
- cache.registered[className] = serialized.styles;
4848
- }
4849
- };
4850
- var insertStyles = function insertStyles(cache, serialized, isStringTag) {
4851
- registerStyles(cache, serialized, isStringTag);
4852
- var className = cache.key + "-" + serialized.name;
4853
-
4854
- if (cache.inserted[serialized.name] === undefined) {
4855
- var stylesForSSR = '';
4856
- var current = serialized;
4857
-
4858
- do {
4859
- var maybeStyles = cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
4860
-
4861
- if (!isBrowser$4 && maybeStyles !== undefined) {
4862
- stylesForSSR += maybeStyles;
4863
- }
4864
-
4865
- current = current.next;
4866
- } while (current !== undefined);
4867
-
4868
- if (!isBrowser$4 && stylesForSSR.length !== 0) {
4869
- return stylesForSSR;
4870
- }
4871
- }
4872
- };
4873
-
4874
- /* eslint-disable */
4875
- // Inspired by https://github.com/garycourt/murmurhash-js
4876
- // Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86
4877
- function murmur2(str) {
4878
- // 'm' and 'r' are mixing constants generated offline.
4879
- // They're not really 'magic', they just happen to work well.
4880
- // const m = 0x5bd1e995;
4881
- // const r = 24;
4882
- // Initialize the hash
4883
- var h = 0; // Mix 4 bytes at a time into the hash
4884
-
4885
- var k,
4886
- i = 0,
4887
- len = str.length;
4888
-
4889
- for (; len >= 4; ++i, len -= 4) {
4890
- k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;
4891
- k =
4892
- /* Math.imul(k, m): */
4893
- (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);
4894
- k ^=
4895
- /* k >>> r: */
4896
- k >>> 24;
4897
- h =
4898
- /* Math.imul(k, m): */
4899
- (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^
4900
- /* Math.imul(h, m): */
4901
- (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
4902
- } // Handle the last few bytes of the input array
4903
-
4904
-
4905
- switch (len) {
4906
- case 3:
4907
- h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
4908
-
4909
- case 2:
4910
- h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
4911
-
4912
- case 1:
4913
- h ^= str.charCodeAt(i) & 0xff;
4914
- h =
4915
- /* Math.imul(h, m): */
4916
- (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
4917
- } // Do a few final mixes of the hash to ensure the last few
4918
- // bytes are well-incorporated.
4919
-
4920
-
4921
- h ^= h >>> 13;
4922
- h =
4923
- /* Math.imul(h, m): */
4924
- (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
4925
- return ((h ^ h >>> 15) >>> 0).toString(36);
4926
- }
4927
-
4928
- var unitlessKeys = {
4929
- animationIterationCount: 1,
4930
- aspectRatio: 1,
4931
- borderImageOutset: 1,
4932
- borderImageSlice: 1,
4933
- borderImageWidth: 1,
4934
- boxFlex: 1,
4935
- boxFlexGroup: 1,
4936
- boxOrdinalGroup: 1,
4937
- columnCount: 1,
4938
- columns: 1,
4939
- flex: 1,
4940
- flexGrow: 1,
4941
- flexPositive: 1,
4942
- flexShrink: 1,
4943
- flexNegative: 1,
4944
- flexOrder: 1,
4945
- gridRow: 1,
4946
- gridRowEnd: 1,
4947
- gridRowSpan: 1,
4948
- gridRowStart: 1,
4949
- gridColumn: 1,
4950
- gridColumnEnd: 1,
4951
- gridColumnSpan: 1,
4952
- gridColumnStart: 1,
4953
- msGridRow: 1,
4954
- msGridRowSpan: 1,
4955
- msGridColumn: 1,
4956
- msGridColumnSpan: 1,
4957
- fontWeight: 1,
4958
- lineHeight: 1,
4959
- opacity: 1,
4960
- order: 1,
4961
- orphans: 1,
4962
- tabSize: 1,
4963
- widows: 1,
4964
- zIndex: 1,
4965
- zoom: 1,
4966
- WebkitLineClamp: 1,
4967
- // SVG-related properties
4968
- fillOpacity: 1,
4969
- floodOpacity: 1,
4970
- stopOpacity: 1,
4971
- strokeDasharray: 1,
4972
- strokeDashoffset: 1,
4973
- strokeMiterlimit: 1,
4974
- strokeOpacity: 1,
4975
- strokeWidth: 1
4976
- };
4977
-
4978
- 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";
4979
- 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).";
4980
- var hyphenateRegex = /[A-Z]|^ms/g;
4981
- var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
4982
-
4983
- var isCustomProperty = function isCustomProperty(property) {
4984
- return property.charCodeAt(1) === 45;
4985
- };
4986
-
4987
- var isProcessableValue = function isProcessableValue(value) {
4988
- return value != null && typeof value !== 'boolean';
4989
- };
4990
-
4991
- var processStyleName = /* #__PURE__ */memoize$1(function (styleName) {
4992
- return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();
4993
- });
3358
+ var processStyleName = /* #__PURE__ */memoize$1(function (styleName) {
3359
+ return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();
3360
+ });
4994
3361
 
4995
3362
  var processStyleValue = function processStyleValue(key, value) {
4996
3363
  switch (key) {
@@ -5286,582 +3653,14 @@ var serializeStyles = function serializeStyles(args, registered, mergedProps) {
5286
3653
  };
5287
3654
  };
5288
3655
 
5289
- var isBrowser$3 = typeof document !== 'undefined';
3656
+ var isBrowser$1 = typeof document !== 'undefined';
5290
3657
 
5291
3658
  var syncFallback = function syncFallback(create) {
5292
3659
  return create();
5293
3660
  };
5294
3661
 
5295
3662
  var useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;
5296
- var useInsertionEffectAlwaysWithSyncFallback = !isBrowser$3 ? syncFallback : useInsertionEffect || syncFallback;
5297
- var useInsertionEffectWithLayoutFallback = useInsertionEffect || React.useLayoutEffect;
5298
-
5299
- var isBrowser$2 = typeof document !== 'undefined';
5300
- var hasOwnProperty = {}.hasOwnProperty;
5301
-
5302
- var EmotionCacheContext = /* #__PURE__ */React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
5303
- // because this module is primarily intended for the browser and node
5304
- // but it's also required in react native and similar environments sometimes
5305
- // and we could have a special build just for that
5306
- // but this is much easier and the native packages
5307
- // might use a different theme context in the future anyway
5308
- typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
5309
- key: 'css'
5310
- }) : null);
5311
-
5312
- if (process.env.NODE_ENV !== 'production') {
5313
- EmotionCacheContext.displayName = 'EmotionCacheContext';
5314
- }
5315
-
5316
- EmotionCacheContext.Provider;
5317
-
5318
- var withEmotionCache = function withEmotionCache(func) {
5319
- // $FlowFixMe
5320
- return /*#__PURE__*/forwardRef(function (props, ref) {
5321
- // the cache will never be null in the browser
5322
- var cache = useContext(EmotionCacheContext);
5323
- return func(props, cache, ref);
5324
- });
5325
- };
5326
-
5327
- if (!isBrowser$2) {
5328
- withEmotionCache = function withEmotionCache(func) {
5329
- return function (props) {
5330
- var cache = useContext(EmotionCacheContext);
5331
-
5332
- if (cache === null) {
5333
- // yes, we're potentially creating this on every render
5334
- // it doesn't actually matter though since it's only on the server
5335
- // so there will only every be a single render
5336
- // that could change in the future because of suspense and etc. but for now,
5337
- // this works and i don't want to optimise for a future thing that we aren't sure about
5338
- cache = createCache({
5339
- key: 'css'
5340
- });
5341
- return /*#__PURE__*/React.createElement(EmotionCacheContext.Provider, {
5342
- value: cache
5343
- }, func(props, cache));
5344
- } else {
5345
- return func(props, cache);
5346
- }
5347
- };
5348
- };
5349
- }
5350
-
5351
- var ThemeContext = /* #__PURE__ */React.createContext({});
5352
-
5353
- if (process.env.NODE_ENV !== 'production') {
5354
- ThemeContext.displayName = 'EmotionThemeContext';
5355
- }
5356
-
5357
- var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
5358
- var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
5359
-
5360
- var Insertion$2 = function Insertion(_ref) {
5361
- var cache = _ref.cache,
5362
- serialized = _ref.serialized,
5363
- isStringTag = _ref.isStringTag;
5364
- registerStyles(cache, serialized, isStringTag);
5365
- var rules = useInsertionEffectAlwaysWithSyncFallback(function () {
5366
- return insertStyles(cache, serialized, isStringTag);
5367
- });
5368
-
5369
- if (!isBrowser$2 && rules !== undefined) {
5370
- var _ref2;
5371
-
5372
- var serializedNames = serialized.name;
5373
- var next = serialized.next;
5374
-
5375
- while (next !== undefined) {
5376
- serializedNames += ' ' + next.name;
5377
- next = next.next;
5378
- }
5379
-
5380
- return /*#__PURE__*/React.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
5381
- __html: rules
5382
- }, _ref2.nonce = cache.sheet.nonce, _ref2));
5383
- }
5384
-
5385
- return null;
5386
- };
5387
-
5388
- var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
5389
- var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works
5390
- // not passing the registered cache to serializeStyles because it would
5391
- // make certain babel optimisations not possible
5392
-
5393
- if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {
5394
- cssProp = cache.registered[cssProp];
5395
- }
5396
-
5397
- var WrappedComponent = props[typePropName];
5398
- var registeredStyles = [cssProp];
5399
- var className = '';
5400
-
5401
- if (typeof props.className === 'string') {
5402
- className = getRegisteredStyles(cache.registered, registeredStyles, props.className);
5403
- } else if (props.className != null) {
5404
- className = props.className + " ";
5405
- }
5406
-
5407
- var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext));
5408
-
5409
- if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {
5410
- var labelFromStack = props[labelPropName];
5411
-
5412
- if (labelFromStack) {
5413
- serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);
5414
- }
5415
- }
5416
-
5417
- className += cache.key + "-" + serialized.name;
5418
- var newProps = {};
5419
-
5420
- for (var key in props) {
5421
- if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {
5422
- newProps[key] = props[key];
5423
- }
5424
- }
5425
-
5426
- newProps.ref = ref;
5427
- newProps.className = className;
5428
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion$2, {
5429
- cache: cache,
5430
- serialized: serialized,
5431
- isStringTag: typeof WrappedComponent === 'string'
5432
- }), /*#__PURE__*/React.createElement(WrappedComponent, newProps));
5433
- });
5434
-
5435
- if (process.env.NODE_ENV !== 'production') {
5436
- Emotion.displayName = 'EmotionCssPropInternal';
5437
- }
5438
-
5439
- var pkg = {
5440
- name: "@emotion/react",
5441
- version: "11.11.1",
5442
- main: "dist/emotion-react.cjs.js",
5443
- module: "dist/emotion-react.esm.js",
5444
- browser: {
5445
- "./dist/emotion-react.esm.js": "./dist/emotion-react.browser.esm.js"
5446
- },
5447
- exports: {
5448
- ".": {
5449
- module: {
5450
- worker: "./dist/emotion-react.worker.esm.js",
5451
- browser: "./dist/emotion-react.browser.esm.js",
5452
- "default": "./dist/emotion-react.esm.js"
5453
- },
5454
- "import": "./dist/emotion-react.cjs.mjs",
5455
- "default": "./dist/emotion-react.cjs.js"
5456
- },
5457
- "./jsx-runtime": {
5458
- module: {
5459
- worker: "./jsx-runtime/dist/emotion-react-jsx-runtime.worker.esm.js",
5460
- browser: "./jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js",
5461
- "default": "./jsx-runtime/dist/emotion-react-jsx-runtime.esm.js"
5462
- },
5463
- "import": "./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.mjs",
5464
- "default": "./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js"
5465
- },
5466
- "./_isolated-hnrs": {
5467
- module: {
5468
- worker: "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.worker.esm.js",
5469
- browser: "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js",
5470
- "default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js"
5471
- },
5472
- "import": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.mjs",
5473
- "default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.js"
5474
- },
5475
- "./jsx-dev-runtime": {
5476
- module: {
5477
- worker: "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.worker.esm.js",
5478
- browser: "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js",
5479
- "default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.esm.js"
5480
- },
5481
- "import": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.mjs",
5482
- "default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js"
5483
- },
5484
- "./package.json": "./package.json",
5485
- "./types/css-prop": "./types/css-prop.d.ts",
5486
- "./macro": {
5487
- types: {
5488
- "import": "./macro.d.mts",
5489
- "default": "./macro.d.ts"
5490
- },
5491
- "default": "./macro.js"
5492
- }
5493
- },
5494
- types: "types/index.d.ts",
5495
- files: [
5496
- "src",
5497
- "dist",
5498
- "jsx-runtime",
5499
- "jsx-dev-runtime",
5500
- "_isolated-hnrs",
5501
- "types/*.d.ts",
5502
- "macro.*"
5503
- ],
5504
- sideEffects: false,
5505
- author: "Emotion Contributors",
5506
- license: "MIT",
5507
- scripts: {
5508
- "test:typescript": "dtslint types"
5509
- },
5510
- dependencies: {
5511
- "@babel/runtime": "^7.18.3",
5512
- "@emotion/babel-plugin": "^11.11.0",
5513
- "@emotion/cache": "^11.11.0",
5514
- "@emotion/serialize": "^1.1.2",
5515
- "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1",
5516
- "@emotion/utils": "^1.2.1",
5517
- "@emotion/weak-memoize": "^0.3.1",
5518
- "hoist-non-react-statics": "^3.3.1"
5519
- },
5520
- peerDependencies: {
5521
- react: ">=16.8.0"
5522
- },
5523
- peerDependenciesMeta: {
5524
- "@types/react": {
5525
- optional: true
5526
- }
5527
- },
5528
- devDependencies: {
5529
- "@definitelytyped/dtslint": "0.0.112",
5530
- "@emotion/css": "11.11.0",
5531
- "@emotion/css-prettifier": "1.1.3",
5532
- "@emotion/server": "11.11.0",
5533
- "@emotion/styled": "11.11.0",
5534
- "html-tag-names": "^1.1.2",
5535
- react: "16.14.0",
5536
- "svg-tag-names": "^1.1.1",
5537
- typescript: "^4.5.5"
5538
- },
5539
- repository: "https://github.com/emotion-js/emotion/tree/main/packages/react",
5540
- publishConfig: {
5541
- access: "public"
5542
- },
5543
- "umd:main": "dist/emotion-react.umd.min.js",
5544
- preconstruct: {
5545
- entrypoints: [
5546
- "./index.js",
5547
- "./jsx-runtime.js",
5548
- "./jsx-dev-runtime.js",
5549
- "./_isolated-hnrs.js"
5550
- ],
5551
- umdName: "emotionReact",
5552
- exports: {
5553
- envConditions: [
5554
- "browser",
5555
- "worker"
5556
- ],
5557
- extra: {
5558
- "./types/css-prop": "./types/css-prop.d.ts",
5559
- "./macro": {
5560
- types: {
5561
- "import": "./macro.d.mts",
5562
- "default": "./macro.d.ts"
5563
- },
5564
- "default": "./macro.js"
5565
- }
5566
- }
5567
- }
5568
- }
5569
- };
5570
-
5571
- var warnedAboutCssPropForGlobal = false; // maintain place over rerenders.
5572
- // initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild
5573
- // initial client-side render from SSR, use place of hydrating tag
5574
-
5575
- var Global = /* #__PURE__ */withEmotionCache(function (props, cache) {
5576
- if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal && ( // check for className as well since the user is
5577
- // probably using the custom createElement which
5578
- // means it will be turned into a className prop
5579
- // $FlowFixMe I don't really want to add it to the type since it shouldn't be used
5580
- props.className || props.css)) {
5581
- console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?");
5582
- warnedAboutCssPropForGlobal = true;
5583
- }
5584
-
5585
- var styles = props.styles;
5586
- var serialized = serializeStyles([styles], undefined, React.useContext(ThemeContext));
5587
-
5588
- if (!isBrowser$2) {
5589
- var _ref;
5590
-
5591
- var serializedNames = serialized.name;
5592
- var serializedStyles = serialized.styles;
5593
- var next = serialized.next;
5594
-
5595
- while (next !== undefined) {
5596
- serializedNames += ' ' + next.name;
5597
- serializedStyles += next.styles;
5598
- next = next.next;
5599
- }
5600
-
5601
- var shouldCache = cache.compat === true;
5602
- var rules = cache.insert("", {
5603
- name: serializedNames,
5604
- styles: serializedStyles
5605
- }, cache.sheet, shouldCache);
5606
-
5607
- if (shouldCache) {
5608
- return null;
5609
- }
5610
-
5611
- return /*#__PURE__*/React.createElement("style", (_ref = {}, _ref["data-emotion"] = cache.key + "-global " + serializedNames, _ref.dangerouslySetInnerHTML = {
5612
- __html: rules
5613
- }, _ref.nonce = cache.sheet.nonce, _ref));
5614
- } // yes, i know these hooks are used conditionally
5615
- // but it is based on a constant that will never change at runtime
5616
- // it's effectively like having two implementations and switching them out
5617
- // so it's not actually breaking anything
5618
-
5619
-
5620
- var sheetRef = React.useRef();
5621
- useInsertionEffectWithLayoutFallback(function () {
5622
- var key = cache.key + "-global"; // use case of https://github.com/emotion-js/emotion/issues/2675
5623
-
5624
- var sheet = new cache.sheet.constructor({
5625
- key: key,
5626
- nonce: cache.sheet.nonce,
5627
- container: cache.sheet.container,
5628
- speedy: cache.sheet.isSpeedy
5629
- });
5630
- var rehydrating = false; // $FlowFixMe
5631
-
5632
- var node = document.querySelector("style[data-emotion=\"" + key + " " + serialized.name + "\"]");
5633
-
5634
- if (cache.sheet.tags.length) {
5635
- sheet.before = cache.sheet.tags[0];
5636
- }
5637
-
5638
- if (node !== null) {
5639
- rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other <Global/>s
5640
-
5641
- node.setAttribute('data-emotion', key);
5642
- sheet.hydrate([node]);
5643
- }
5644
-
5645
- sheetRef.current = [sheet, rehydrating];
5646
- return function () {
5647
- sheet.flush();
5648
- };
5649
- }, [cache]);
5650
- useInsertionEffectWithLayoutFallback(function () {
5651
- var sheetRefCurrent = sheetRef.current;
5652
- var sheet = sheetRefCurrent[0],
5653
- rehydrating = sheetRefCurrent[1];
5654
-
5655
- if (rehydrating) {
5656
- sheetRefCurrent[1] = false;
5657
- return;
5658
- }
5659
-
5660
- if (serialized.next !== undefined) {
5661
- // insert keyframes
5662
- insertStyles(cache, serialized.next, true);
5663
- }
5664
-
5665
- if (sheet.tags.length) {
5666
- // if this doesn't exist then it will be null so the style element will be appended
5667
- var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;
5668
- sheet.before = element;
5669
- sheet.flush();
5670
- }
5671
-
5672
- cache.insert("", serialized, sheet, false);
5673
- }, [cache, serialized.name]);
5674
- return null;
5675
- });
5676
-
5677
- if (process.env.NODE_ENV !== 'production') {
5678
- Global.displayName = 'EmotionGlobal';
5679
- }
5680
-
5681
- function css() {
5682
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
5683
- args[_key] = arguments[_key];
5684
- }
5685
-
5686
- return serializeStyles(args);
5687
- }
5688
-
5689
- var keyframes = function keyframes() {
5690
- var insertable = css.apply(void 0, arguments);
5691
- var name = "animation-" + insertable.name; // $FlowFixMe
5692
-
5693
- return {
5694
- name: name,
5695
- styles: "@keyframes " + name + "{" + insertable.styles + "}",
5696
- anim: 1,
5697
- toString: function toString() {
5698
- return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
5699
- }
5700
- };
5701
- };
5702
-
5703
- var classnames = function classnames(args) {
5704
- var len = args.length;
5705
- var i = 0;
5706
- var cls = '';
5707
-
5708
- for (; i < len; i++) {
5709
- var arg = args[i];
5710
- if (arg == null) continue;
5711
- var toAdd = void 0;
5712
-
5713
- switch (typeof arg) {
5714
- case 'boolean':
5715
- break;
5716
-
5717
- case 'object':
5718
- {
5719
- if (Array.isArray(arg)) {
5720
- toAdd = classnames(arg);
5721
- } else {
5722
- if (process.env.NODE_ENV !== 'production' && arg.styles !== undefined && arg.name !== undefined) {
5723
- console.error('You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n' + '`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component.');
5724
- }
5725
-
5726
- toAdd = '';
5727
-
5728
- for (var k in arg) {
5729
- if (arg[k] && k) {
5730
- toAdd && (toAdd += ' ');
5731
- toAdd += k;
5732
- }
5733
- }
5734
- }
5735
-
5736
- break;
5737
- }
5738
-
5739
- default:
5740
- {
5741
- toAdd = arg;
5742
- }
5743
- }
5744
-
5745
- if (toAdd) {
5746
- cls && (cls += ' ');
5747
- cls += toAdd;
5748
- }
5749
- }
5750
-
5751
- return cls;
5752
- };
5753
-
5754
- function merge$1(registered, css, className) {
5755
- var registeredStyles = [];
5756
- var rawClassName = getRegisteredStyles(registered, registeredStyles, className);
5757
-
5758
- if (registeredStyles.length < 2) {
5759
- return className;
5760
- }
5761
-
5762
- return rawClassName + css(registeredStyles);
5763
- }
5764
-
5765
- var Insertion$1 = function Insertion(_ref) {
5766
- var cache = _ref.cache,
5767
- serializedArr = _ref.serializedArr;
5768
- var rules = useInsertionEffectAlwaysWithSyncFallback(function () {
5769
- var rules = '';
5770
-
5771
- for (var i = 0; i < serializedArr.length; i++) {
5772
- var res = insertStyles(cache, serializedArr[i], false);
5773
-
5774
- if (!isBrowser$2 && res !== undefined) {
5775
- rules += res;
5776
- }
5777
- }
5778
-
5779
- if (!isBrowser$2) {
5780
- return rules;
5781
- }
5782
- });
5783
-
5784
- if (!isBrowser$2 && rules.length !== 0) {
5785
- var _ref2;
5786
-
5787
- return /*#__PURE__*/React.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedArr.map(function (serialized) {
5788
- return serialized.name;
5789
- }).join(' '), _ref2.dangerouslySetInnerHTML = {
5790
- __html: rules
5791
- }, _ref2.nonce = cache.sheet.nonce, _ref2));
5792
- }
5793
-
5794
- return null;
5795
- };
5796
-
5797
- var ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {
5798
- var hasRendered = false;
5799
- var serializedArr = [];
5800
-
5801
- var css = function css() {
5802
- if (hasRendered && process.env.NODE_ENV !== 'production') {
5803
- throw new Error('css can only be used during render');
5804
- }
5805
-
5806
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
5807
- args[_key] = arguments[_key];
5808
- }
5809
-
5810
- var serialized = serializeStyles(args, cache.registered);
5811
- serializedArr.push(serialized); // registration has to happen here as the result of this might get consumed by `cx`
5812
-
5813
- registerStyles(cache, serialized, false);
5814
- return cache.key + "-" + serialized.name;
5815
- };
5816
-
5817
- var cx = function cx() {
5818
- if (hasRendered && process.env.NODE_ENV !== 'production') {
5819
- throw new Error('cx can only be used during render');
5820
- }
5821
-
5822
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
5823
- args[_key2] = arguments[_key2];
5824
- }
5825
-
5826
- return merge$1(cache.registered, css, classnames(args));
5827
- };
5828
-
5829
- var content = {
5830
- css: css,
5831
- cx: cx,
5832
- theme: React.useContext(ThemeContext)
5833
- };
5834
- var ele = props.children(content);
5835
- hasRendered = true;
5836
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion$1, {
5837
- cache: cache,
5838
- serializedArr: serializedArr
5839
- }), ele);
5840
- });
5841
-
5842
- if (process.env.NODE_ENV !== 'production') {
5843
- ClassNames.displayName = 'EmotionClassNames';
5844
- }
5845
-
5846
- if (process.env.NODE_ENV !== 'production') {
5847
- var isBrowser$1 = typeof document !== 'undefined'; // #1727, #2905 for some reason Jest and Vitest evaluate modules twice if some consuming module gets mocked
5848
-
5849
- var isTestEnv = typeof jest !== 'undefined' || typeof vi !== 'undefined';
5850
-
5851
- if (isBrowser$1 && !isTestEnv) {
5852
- // globalThis has wide browser support - https://caniuse.com/?search=globalThis, Node.js 12 and later
5853
- var globalContext = // $FlowIgnore
5854
- typeof globalThis !== 'undefined' ? globalThis // eslint-disable-line no-undef
5855
- : isBrowser$1 ? window : global;
5856
- var globalKey = "__EMOTION_REACT_" + pkg.version.split('.')[0] + "__";
5857
-
5858
- if (globalContext[globalKey]) {
5859
- console.warn('You are loading @emotion/react when it is already loaded. Running ' + 'multiple instances may cause problems. This can happen if multiple ' + 'versions are used, or if multiple builds of the same version are ' + 'used.');
5860
- }
5861
-
5862
- globalContext[globalKey] = true;
5863
- }
5864
- }
3663
+ var useInsertionEffectAlwaysWithSyncFallback = !isBrowser$1 ? syncFallback : useInsertionEffect || syncFallback;
5865
3664
 
5866
3665
  var testOmitPropsOnStringTag = isPropValid;
5867
3666