td-plots 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Histogram.d.ts +1 -0
- package/dist/index.esm.js +649 -2581
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +648 -2580
- package/dist/index.js.map +1 -1
- package/package.json +8 -7
package/dist/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var tslib = require('tslib');
|
|
3
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
5
|
var React = require('react');
|
|
6
|
+
var emStyled = require('@emotion/styled');
|
|
7
|
+
var serialize = require('@emotion/serialize');
|
|
8
|
+
var react = require('@emotion/react');
|
|
5
9
|
|
|
6
10
|
function _interopNamespaceDefault(e) {
|
|
7
11
|
var n = Object.create(null);
|
|
@@ -52,49 +56,6 @@ function styleInject(css, ref) {
|
|
|
52
56
|
var css_248z = ".plot-container{height:100%;max-width:100%;min-height:300px;overflow:hidden!important;position:relative;width:100%}.plot-container>div{flex:1;height:100%!important;width:100%!important}.plot-container .main-svg{max-height:100%!important;max-width:100%!important}.plot-container .main-svg,.plot-container .plotly-graph-div,.plot-container svg.main-svg[height],.plot-container svg.main-svg[width]{height:100%!important;width:100%!important}.plot-container .point{border-radius:5px!important;overflow:hidden!important}.plot-container .cursor-ns-resize{height:0;width:0}.plot-container .cursor-ew-resize{fill:var(--selection-color,blue)!important;stroke:var(--selection-color,blue)!important}.plot-container .selectionlayer>path{stroke:var(--selection-color,blue)!important;stroke-dasharray:0!important;stroke-width:1px!important;opacity:.5!important}.plot-container .zoomlayer>path{stroke-dasharray:0!important;stroke:var(--selection-color,blue)!important;fill:var(--selection-color,blue)!important}.radial-histogram-container{aspect-ratio:1}.loading-overlay{align-items:center;background-color:hsla(0,0%,100%,.8);display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:300}";
|
|
53
57
|
styleInject(css_248z);
|
|
54
58
|
|
|
55
|
-
/******************************************************************************
|
|
56
|
-
Copyright (c) Microsoft Corporation.
|
|
57
|
-
|
|
58
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
59
|
-
purpose with or without fee is hereby granted.
|
|
60
|
-
|
|
61
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
62
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
63
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
64
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
65
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
66
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
67
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
68
|
-
***************************************************************************** */
|
|
69
|
-
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
var __assign = function() {
|
|
73
|
-
__assign = Object.assign || function __assign(t) {
|
|
74
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
75
|
-
s = arguments[i];
|
|
76
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
77
|
-
}
|
|
78
|
-
return t;
|
|
79
|
-
};
|
|
80
|
-
return __assign.apply(this, arguments);
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
function __spreadArray(to, from, pack) {
|
|
84
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
85
|
-
if (ar || !(i in from)) {
|
|
86
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
87
|
-
ar[i] = from[i];
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
94
|
-
var e = new Error(message);
|
|
95
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
96
|
-
};
|
|
97
|
-
|
|
98
59
|
// Utility functions for our components
|
|
99
60
|
// Type guard to check if array contains only numbers
|
|
100
61
|
var isNumberArray = function (arr) {
|
|
@@ -117,2233 +78,241 @@ function calculateMean(arr) {
|
|
|
117
78
|
}
|
|
118
79
|
}
|
|
119
80
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
white: '#fff'
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
const red = {
|
|
126
|
-
300: '#e57373',
|
|
127
|
-
400: '#ef5350',
|
|
128
|
-
500: '#f44336',
|
|
129
|
-
700: '#d32f2f',
|
|
130
|
-
800: '#c62828'};
|
|
131
|
-
|
|
132
|
-
const purple = {
|
|
133
|
-
50: '#f3e5f5',
|
|
134
|
-
200: '#ce93d8',
|
|
135
|
-
300: '#ba68c8',
|
|
136
|
-
400: '#ab47bc',
|
|
137
|
-
500: '#9c27b0',
|
|
138
|
-
700: '#7b1fa2'};
|
|
139
|
-
|
|
140
|
-
const blue = {
|
|
141
|
-
50: '#e3f2fd',
|
|
142
|
-
200: '#90caf9',
|
|
143
|
-
400: '#42a5f5',
|
|
144
|
-
700: '#1976d2',
|
|
145
|
-
800: '#1565c0'};
|
|
146
|
-
|
|
147
|
-
const lightBlue = {
|
|
148
|
-
300: '#4fc3f7',
|
|
149
|
-
400: '#29b6f6',
|
|
150
|
-
500: '#03a9f4',
|
|
151
|
-
700: '#0288d1',
|
|
152
|
-
900: '#01579b'};
|
|
153
|
-
|
|
154
|
-
const green = {
|
|
155
|
-
300: '#81c784',
|
|
156
|
-
400: '#66bb6a',
|
|
157
|
-
500: '#4caf50',
|
|
158
|
-
700: '#388e3c',
|
|
159
|
-
800: '#2e7d32',
|
|
160
|
-
900: '#1b5e20'};
|
|
161
|
-
|
|
162
|
-
const orange = {
|
|
163
|
-
300: '#ffb74d',
|
|
164
|
-
400: '#ffa726',
|
|
165
|
-
500: '#ff9800',
|
|
166
|
-
700: '#f57c00',
|
|
167
|
-
900: '#e65100'};
|
|
168
|
-
|
|
169
|
-
const grey = {
|
|
170
|
-
50: '#fafafa',
|
|
171
|
-
100: '#f5f5f5',
|
|
172
|
-
200: '#eeeeee',
|
|
173
|
-
300: '#e0e0e0',
|
|
174
|
-
400: '#bdbdbd',
|
|
175
|
-
500: '#9e9e9e',
|
|
176
|
-
600: '#757575',
|
|
177
|
-
700: '#616161',
|
|
178
|
-
800: '#424242',
|
|
179
|
-
900: '#212121',
|
|
180
|
-
A100: '#f5f5f5',
|
|
181
|
-
A200: '#eeeeee',
|
|
182
|
-
A400: '#bdbdbd',
|
|
183
|
-
A700: '#616161'
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* WARNING: Don't import this directly. It's imported by the code generated by
|
|
188
|
-
* `@mui/interal-babel-plugin-minify-errors`. Make sure to always use string literals in `Error`
|
|
189
|
-
* constructors to ensure the plugin works as expected. Supported patterns include:
|
|
190
|
-
* throw new Error('My message');
|
|
191
|
-
* throw new Error(`My message: ${foo}`);
|
|
192
|
-
* throw new Error(`My message: ${foo}` + 'another string');
|
|
193
|
-
* ...
|
|
194
|
-
* @param {number} code
|
|
195
|
-
*/
|
|
196
|
-
function formatMuiErrorMessage(code, ...args) {
|
|
197
|
-
const url = new URL(`https://mui.com/production-error/?code=${code}`);
|
|
198
|
-
args.forEach(arg => url.searchParams.append('args[]', arg));
|
|
199
|
-
return `Minified MUI error #${code}; visit ${url} for the full message.`;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
var THEME_ID = '$$material';
|
|
203
|
-
|
|
204
|
-
function _extends() {
|
|
205
|
-
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
206
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
207
|
-
var t = arguments[e];
|
|
208
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
209
|
-
}
|
|
210
|
-
return n;
|
|
211
|
-
}, _extends.apply(null, arguments);
|
|
81
|
+
function getDefaultExportFromCjs (x) {
|
|
82
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
212
83
|
}
|
|
213
84
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
Based off glamor's StyleSheet, thanks Sunil ❤️
|
|
217
|
-
|
|
218
|
-
high performance StyleSheet for css-in-js systems
|
|
219
|
-
|
|
220
|
-
- uses multiple style tags behind the scenes for millions of rules
|
|
221
|
-
- uses `insertRule` for appending in production for *much* faster performance
|
|
222
|
-
|
|
223
|
-
// usage
|
|
224
|
-
|
|
225
|
-
import { StyleSheet } from '@emotion/sheet'
|
|
226
|
-
|
|
227
|
-
let styleSheet = new StyleSheet({ key: '', container: document.head })
|
|
228
|
-
|
|
229
|
-
styleSheet.insert('#box { border: 1px solid red; }')
|
|
230
|
-
- appends a css rule into the stylesheet
|
|
231
|
-
|
|
232
|
-
styleSheet.flush()
|
|
233
|
-
- empties the stylesheet of all its contents
|
|
234
|
-
|
|
235
|
-
*/
|
|
236
|
-
|
|
237
|
-
function sheetForTag(tag) {
|
|
238
|
-
if (tag.sheet) {
|
|
239
|
-
return tag.sheet;
|
|
240
|
-
} // this weirdness brought to you by firefox
|
|
241
|
-
|
|
242
|
-
/* istanbul ignore next */
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
for (var i = 0; i < document.styleSheets.length; i++) {
|
|
246
|
-
if (document.styleSheets[i].ownerNode === tag) {
|
|
247
|
-
return document.styleSheets[i];
|
|
248
|
-
}
|
|
249
|
-
} // this function should always return with a value
|
|
250
|
-
// TS can't understand it though so we make it stop complaining here
|
|
85
|
+
var propTypes = {exports: {}};
|
|
251
86
|
|
|
87
|
+
var reactIs$1 = {exports: {}};
|
|
252
88
|
|
|
253
|
-
|
|
254
|
-
}
|
|
89
|
+
var reactIs_production_min = {};
|
|
255
90
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
91
|
+
/** @license React v16.13.1
|
|
92
|
+
* react-is.production.min.js
|
|
93
|
+
*
|
|
94
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
95
|
+
*
|
|
96
|
+
* This source code is licensed under the MIT license found in the
|
|
97
|
+
* LICENSE file in the root directory of this source tree.
|
|
98
|
+
*/
|
|
259
99
|
|
|
260
|
-
|
|
261
|
-
tag.setAttribute('nonce', options.nonce);
|
|
262
|
-
}
|
|
100
|
+
var hasRequiredReactIs_production_min;
|
|
263
101
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
102
|
+
function requireReactIs_production_min () {
|
|
103
|
+
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
104
|
+
hasRequiredReactIs_production_min = 1;
|
|
105
|
+
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?
|
|
106
|
+
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
|
107
|
+
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}reactIs_production_min.AsyncMode=l;reactIs_production_min.ConcurrentMode=m;reactIs_production_min.ContextConsumer=k;reactIs_production_min.ContextProvider=h;reactIs_production_min.Element=c;reactIs_production_min.ForwardRef=n;reactIs_production_min.Fragment=e;reactIs_production_min.Lazy=t;reactIs_production_min.Memo=r;reactIs_production_min.Portal=d;
|
|
108
|
+
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};
|
|
109
|
+
reactIs_production_min.isMemo=function(a){return z(a)===r};reactIs_production_min.isPortal=function(a){return z(a)===d};reactIs_production_min.isProfiler=function(a){return z(a)===g};reactIs_production_min.isStrictMode=function(a){return z(a)===f};reactIs_production_min.isSuspense=function(a){return z(a)===p};
|
|
110
|
+
reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};reactIs_production_min.typeOf=z;
|
|
111
|
+
return reactIs_production_min;
|
|
267
112
|
}
|
|
268
113
|
|
|
269
|
-
var
|
|
270
|
-
// Using Node instead of HTMLElement since container may be a ShadowRoot
|
|
271
|
-
function StyleSheet(options) {
|
|
272
|
-
var _this = this;
|
|
273
|
-
|
|
274
|
-
this._insertTag = function (tag) {
|
|
275
|
-
var before;
|
|
276
|
-
|
|
277
|
-
if (_this.tags.length === 0) {
|
|
278
|
-
if (_this.insertionPoint) {
|
|
279
|
-
before = _this.insertionPoint.nextSibling;
|
|
280
|
-
} else if (_this.prepend) {
|
|
281
|
-
before = _this.container.firstChild;
|
|
282
|
-
} else {
|
|
283
|
-
before = _this.before;
|
|
284
|
-
}
|
|
285
|
-
} else {
|
|
286
|
-
before = _this.tags[_this.tags.length - 1].nextSibling;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
_this.container.insertBefore(tag, before);
|
|
290
|
-
|
|
291
|
-
_this.tags.push(tag);
|
|
292
|
-
};
|
|
293
|
-
|
|
294
|
-
this.isSpeedy = options.speedy === undefined ? true : options.speedy;
|
|
295
|
-
this.tags = [];
|
|
296
|
-
this.ctr = 0;
|
|
297
|
-
this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets
|
|
298
|
-
|
|
299
|
-
this.key = options.key;
|
|
300
|
-
this.container = options.container;
|
|
301
|
-
this.prepend = options.prepend;
|
|
302
|
-
this.insertionPoint = options.insertionPoint;
|
|
303
|
-
this.before = null;
|
|
304
|
-
}
|
|
114
|
+
var reactIs_development$1 = {};
|
|
305
115
|
|
|
306
|
-
|
|
116
|
+
/** @license React v16.13.1
|
|
117
|
+
* react-is.development.js
|
|
118
|
+
*
|
|
119
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
120
|
+
*
|
|
121
|
+
* This source code is licensed under the MIT license found in the
|
|
122
|
+
* LICENSE file in the root directory of this source tree.
|
|
123
|
+
*/
|
|
307
124
|
|
|
308
|
-
|
|
309
|
-
nodes.forEach(this._insertTag);
|
|
310
|
-
};
|
|
125
|
+
var hasRequiredReactIs_development$1;
|
|
311
126
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
// and you can only have one source map per style tag
|
|
316
|
-
if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {
|
|
317
|
-
this._insertTag(createStyleElement(this));
|
|
318
|
-
}
|
|
127
|
+
function requireReactIs_development$1 () {
|
|
128
|
+
if (hasRequiredReactIs_development$1) return reactIs_development$1;
|
|
129
|
+
hasRequiredReactIs_development$1 = 1;
|
|
319
130
|
|
|
320
|
-
var tag = this.tags[this.tags.length - 1];
|
|
321
131
|
|
|
322
|
-
if (this.isSpeedy) {
|
|
323
|
-
var sheet = sheetForTag(tag);
|
|
324
132
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
// the big drawback is that the css won't be editable in devtools
|
|
328
|
-
sheet.insertRule(rule, sheet.cssRules.length);
|
|
329
|
-
} catch (e) {
|
|
330
|
-
}
|
|
331
|
-
} else {
|
|
332
|
-
tag.appendChild(document.createTextNode(rule));
|
|
333
|
-
}
|
|
133
|
+
if (process.env.NODE_ENV !== "production") {
|
|
134
|
+
(function() {
|
|
334
135
|
|
|
335
|
-
|
|
336
|
-
|
|
136
|
+
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
137
|
+
// nor polyfill, then a plain number is used for performance.
|
|
138
|
+
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
139
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
140
|
+
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
141
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
142
|
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
143
|
+
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
144
|
+
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
145
|
+
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
146
|
+
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
337
147
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
148
|
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
149
|
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
150
|
+
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
151
|
+
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
152
|
+
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
153
|
+
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
154
|
+
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
155
|
+
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
156
|
+
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
157
|
+
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
158
|
+
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
341
159
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
};
|
|
160
|
+
function isValidElementType(type) {
|
|
161
|
+
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
162
|
+
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);
|
|
163
|
+
}
|
|
347
164
|
|
|
348
|
-
|
|
349
|
-
|
|
165
|
+
function typeOf(object) {
|
|
166
|
+
if (typeof object === 'object' && object !== null) {
|
|
167
|
+
var $$typeof = object.$$typeof;
|
|
350
168
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
var
|
|
169
|
+
switch ($$typeof) {
|
|
170
|
+
case REACT_ELEMENT_TYPE:
|
|
171
|
+
var type = object.type;
|
|
354
172
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
173
|
+
switch (type) {
|
|
174
|
+
case REACT_ASYNC_MODE_TYPE:
|
|
175
|
+
case REACT_CONCURRENT_MODE_TYPE:
|
|
176
|
+
case REACT_FRAGMENT_TYPE:
|
|
177
|
+
case REACT_PROFILER_TYPE:
|
|
178
|
+
case REACT_STRICT_MODE_TYPE:
|
|
179
|
+
case REACT_SUSPENSE_TYPE:
|
|
180
|
+
return type;
|
|
361
181
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
* @return {number}
|
|
365
|
-
*/
|
|
366
|
-
var abs = Math.abs;
|
|
182
|
+
default:
|
|
183
|
+
var $$typeofType = type && type.$$typeof;
|
|
367
184
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
185
|
+
switch ($$typeofType) {
|
|
186
|
+
case REACT_CONTEXT_TYPE:
|
|
187
|
+
case REACT_FORWARD_REF_TYPE:
|
|
188
|
+
case REACT_LAZY_TYPE:
|
|
189
|
+
case REACT_MEMO_TYPE:
|
|
190
|
+
case REACT_PROVIDER_TYPE:
|
|
191
|
+
return $$typeofType;
|
|
373
192
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
*/
|
|
378
|
-
var assign = Object.assign;
|
|
193
|
+
default:
|
|
194
|
+
return $$typeof;
|
|
195
|
+
}
|
|
379
196
|
|
|
380
|
-
|
|
381
|
-
* @param {string} value
|
|
382
|
-
* @param {number} length
|
|
383
|
-
* @return {number}
|
|
384
|
-
*/
|
|
385
|
-
function hash (value, length) {
|
|
386
|
-
return charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0
|
|
387
|
-
}
|
|
197
|
+
}
|
|
388
198
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
function trim (value) {
|
|
394
|
-
return value.trim()
|
|
395
|
-
}
|
|
199
|
+
case REACT_PORTAL_TYPE:
|
|
200
|
+
return $$typeof;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
396
203
|
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
* @param {RegExp} pattern
|
|
400
|
-
* @return {string?}
|
|
401
|
-
*/
|
|
402
|
-
function match (value, pattern) {
|
|
403
|
-
return (value = pattern.exec(value)) ? value[0] : value
|
|
404
|
-
}
|
|
204
|
+
return undefined;
|
|
205
|
+
} // AsyncMode is deprecated along with isAsyncMode
|
|
405
206
|
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
207
|
+
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
208
|
+
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
209
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
210
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
211
|
+
var Element = REACT_ELEMENT_TYPE;
|
|
212
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
213
|
+
var Fragment = REACT_FRAGMENT_TYPE;
|
|
214
|
+
var Lazy = REACT_LAZY_TYPE;
|
|
215
|
+
var Memo = REACT_MEMO_TYPE;
|
|
216
|
+
var Portal = REACT_PORTAL_TYPE;
|
|
217
|
+
var Profiler = REACT_PROFILER_TYPE;
|
|
218
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
219
|
+
var Suspense = REACT_SUSPENSE_TYPE;
|
|
220
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
415
221
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
*/
|
|
421
|
-
function indexof (value, search) {
|
|
422
|
-
return value.indexOf(search)
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
/**
|
|
426
|
-
* @param {string} value
|
|
427
|
-
* @param {number} index
|
|
428
|
-
* @return {number}
|
|
429
|
-
*/
|
|
430
|
-
function charat (value, index) {
|
|
431
|
-
return value.charCodeAt(index) | 0
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
/**
|
|
435
|
-
* @param {string} value
|
|
436
|
-
* @param {number} begin
|
|
437
|
-
* @param {number} end
|
|
438
|
-
* @return {string}
|
|
439
|
-
*/
|
|
440
|
-
function substr (value, begin, end) {
|
|
441
|
-
return value.slice(begin, end)
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
/**
|
|
445
|
-
* @param {string} value
|
|
446
|
-
* @return {number}
|
|
447
|
-
*/
|
|
448
|
-
function strlen (value) {
|
|
449
|
-
return value.length
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
/**
|
|
453
|
-
* @param {any[]} value
|
|
454
|
-
* @return {number}
|
|
455
|
-
*/
|
|
456
|
-
function sizeof (value) {
|
|
457
|
-
return value.length
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
/**
|
|
461
|
-
* @param {any} value
|
|
462
|
-
* @param {any[]} array
|
|
463
|
-
* @return {any}
|
|
464
|
-
*/
|
|
465
|
-
function append (value, array) {
|
|
466
|
-
return array.push(value), value
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
/**
|
|
470
|
-
* @param {string[]} array
|
|
471
|
-
* @param {function} callback
|
|
472
|
-
* @return {string}
|
|
473
|
-
*/
|
|
474
|
-
function combine (array, callback) {
|
|
475
|
-
return array.map(callback).join('')
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
var line = 1;
|
|
479
|
-
var column = 1;
|
|
480
|
-
var length = 0;
|
|
481
|
-
var position = 0;
|
|
482
|
-
var character = 0;
|
|
483
|
-
var characters = '';
|
|
484
|
-
|
|
485
|
-
/**
|
|
486
|
-
* @param {string} value
|
|
487
|
-
* @param {object | null} root
|
|
488
|
-
* @param {object | null} parent
|
|
489
|
-
* @param {string} type
|
|
490
|
-
* @param {string[] | string} props
|
|
491
|
-
* @param {object[] | string} children
|
|
492
|
-
* @param {number} length
|
|
493
|
-
*/
|
|
494
|
-
function node (value, root, parent, type, props, children, length) {
|
|
495
|
-
return {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
/**
|
|
499
|
-
* @param {object} root
|
|
500
|
-
* @param {object} props
|
|
501
|
-
* @return {object}
|
|
502
|
-
*/
|
|
503
|
-
function copy (root, props) {
|
|
504
|
-
return assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
/**
|
|
508
|
-
* @return {number}
|
|
509
|
-
*/
|
|
510
|
-
function char () {
|
|
511
|
-
return character
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
/**
|
|
515
|
-
* @return {number}
|
|
516
|
-
*/
|
|
517
|
-
function prev () {
|
|
518
|
-
character = position > 0 ? charat(characters, --position) : 0;
|
|
519
|
-
|
|
520
|
-
if (column--, character === 10)
|
|
521
|
-
column = 1, line--;
|
|
522
|
-
|
|
523
|
-
return character
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
/**
|
|
527
|
-
* @return {number}
|
|
528
|
-
*/
|
|
529
|
-
function next () {
|
|
530
|
-
character = position < length ? charat(characters, position++) : 0;
|
|
531
|
-
|
|
532
|
-
if (column++, character === 10)
|
|
533
|
-
column = 1, line++;
|
|
534
|
-
|
|
535
|
-
return character
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
/**
|
|
539
|
-
* @return {number}
|
|
540
|
-
*/
|
|
541
|
-
function peek () {
|
|
542
|
-
return charat(characters, position)
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
/**
|
|
546
|
-
* @return {number}
|
|
547
|
-
*/
|
|
548
|
-
function caret () {
|
|
549
|
-
return position
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
/**
|
|
553
|
-
* @param {number} begin
|
|
554
|
-
* @param {number} end
|
|
555
|
-
* @return {string}
|
|
556
|
-
*/
|
|
557
|
-
function slice (begin, end) {
|
|
558
|
-
return substr(characters, begin, end)
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
/**
|
|
562
|
-
* @param {number} type
|
|
563
|
-
* @return {number}
|
|
564
|
-
*/
|
|
565
|
-
function token (type) {
|
|
566
|
-
switch (type) {
|
|
567
|
-
// \0 \t \n \r \s whitespace token
|
|
568
|
-
case 0: case 9: case 10: case 13: case 32:
|
|
569
|
-
return 5
|
|
570
|
-
// ! + , / > @ ~ isolate token
|
|
571
|
-
case 33: case 43: case 44: case 47: case 62: case 64: case 126:
|
|
572
|
-
// ; { } breakpoint token
|
|
573
|
-
case 59: case 123: case 125:
|
|
574
|
-
return 4
|
|
575
|
-
// : accompanied token
|
|
576
|
-
case 58:
|
|
577
|
-
return 3
|
|
578
|
-
// " ' ( [ opening delimit token
|
|
579
|
-
case 34: case 39: case 40: case 91:
|
|
580
|
-
return 2
|
|
581
|
-
// ) ] closing delimit token
|
|
582
|
-
case 41: case 93:
|
|
583
|
-
return 1
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
return 0
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
/**
|
|
590
|
-
* @param {string} value
|
|
591
|
-
* @return {any[]}
|
|
592
|
-
*/
|
|
593
|
-
function alloc (value) {
|
|
594
|
-
return line = column = 1, length = strlen(characters = value), position = 0, []
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
/**
|
|
598
|
-
* @param {any} value
|
|
599
|
-
* @return {any}
|
|
600
|
-
*/
|
|
601
|
-
function dealloc (value) {
|
|
602
|
-
return characters = '', value
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
/**
|
|
606
|
-
* @param {number} type
|
|
607
|
-
* @return {string}
|
|
608
|
-
*/
|
|
609
|
-
function delimit (type) {
|
|
610
|
-
return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
/**
|
|
614
|
-
* @param {number} type
|
|
615
|
-
* @return {string}
|
|
616
|
-
*/
|
|
617
|
-
function whitespace (type) {
|
|
618
|
-
while (character = peek())
|
|
619
|
-
if (character < 33)
|
|
620
|
-
next();
|
|
621
|
-
else
|
|
622
|
-
break
|
|
623
|
-
|
|
624
|
-
return token(type) > 2 || token(character) > 3 ? '' : ' '
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
/**
|
|
628
|
-
* @param {number} index
|
|
629
|
-
* @param {number} count
|
|
630
|
-
* @return {string}
|
|
631
|
-
*/
|
|
632
|
-
function escaping (index, count) {
|
|
633
|
-
while (--count && next())
|
|
634
|
-
// not 0-9 A-F a-f
|
|
635
|
-
if (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))
|
|
636
|
-
break
|
|
637
|
-
|
|
638
|
-
return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
/**
|
|
642
|
-
* @param {number} type
|
|
643
|
-
* @return {number}
|
|
644
|
-
*/
|
|
645
|
-
function delimiter (type) {
|
|
646
|
-
while (next())
|
|
647
|
-
switch (character) {
|
|
648
|
-
// ] ) " '
|
|
649
|
-
case type:
|
|
650
|
-
return position
|
|
651
|
-
// " '
|
|
652
|
-
case 34: case 39:
|
|
653
|
-
if (type !== 34 && type !== 39)
|
|
654
|
-
delimiter(character);
|
|
655
|
-
break
|
|
656
|
-
// (
|
|
657
|
-
case 40:
|
|
658
|
-
if (type === 41)
|
|
659
|
-
delimiter(type);
|
|
660
|
-
break
|
|
661
|
-
// \
|
|
662
|
-
case 92:
|
|
663
|
-
next();
|
|
664
|
-
break
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
return position
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
/**
|
|
671
|
-
* @param {number} type
|
|
672
|
-
* @param {number} index
|
|
673
|
-
* @return {number}
|
|
674
|
-
*/
|
|
675
|
-
function commenter (type, index) {
|
|
676
|
-
while (next())
|
|
677
|
-
// //
|
|
678
|
-
if (type + character === 47 + 10)
|
|
679
|
-
break
|
|
680
|
-
// /*
|
|
681
|
-
else if (type + character === 42 + 42 && peek() === 47)
|
|
682
|
-
break
|
|
683
|
-
|
|
684
|
-
return '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
/**
|
|
688
|
-
* @param {number} index
|
|
689
|
-
* @return {string}
|
|
690
|
-
*/
|
|
691
|
-
function identifier (index) {
|
|
692
|
-
while (!token(peek()))
|
|
693
|
-
next();
|
|
694
|
-
|
|
695
|
-
return slice(index, position)
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
/**
|
|
699
|
-
* @param {string} value
|
|
700
|
-
* @return {object[]}
|
|
701
|
-
*/
|
|
702
|
-
function compile (value) {
|
|
703
|
-
return dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
/**
|
|
707
|
-
* @param {string} value
|
|
708
|
-
* @param {object} root
|
|
709
|
-
* @param {object?} parent
|
|
710
|
-
* @param {string[]} rule
|
|
711
|
-
* @param {string[]} rules
|
|
712
|
-
* @param {string[]} rulesets
|
|
713
|
-
* @param {number[]} pseudo
|
|
714
|
-
* @param {number[]} points
|
|
715
|
-
* @param {string[]} declarations
|
|
716
|
-
* @return {object}
|
|
717
|
-
*/
|
|
718
|
-
function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
|
|
719
|
-
var index = 0;
|
|
720
|
-
var offset = 0;
|
|
721
|
-
var length = pseudo;
|
|
722
|
-
var atrule = 0;
|
|
723
|
-
var property = 0;
|
|
724
|
-
var previous = 0;
|
|
725
|
-
var variable = 1;
|
|
726
|
-
var scanning = 1;
|
|
727
|
-
var ampersand = 1;
|
|
728
|
-
var character = 0;
|
|
729
|
-
var type = '';
|
|
730
|
-
var props = rules;
|
|
731
|
-
var children = rulesets;
|
|
732
|
-
var reference = rule;
|
|
733
|
-
var characters = type;
|
|
734
|
-
|
|
735
|
-
while (scanning)
|
|
736
|
-
switch (previous = character, character = next()) {
|
|
737
|
-
// (
|
|
738
|
-
case 40:
|
|
739
|
-
if (previous != 108 && charat(characters, length - 1) == 58) {
|
|
740
|
-
if (indexof(characters += replace(delimit(character), '&', '&\f'), '&\f') != -1)
|
|
741
|
-
ampersand = -1;
|
|
742
|
-
break
|
|
743
|
-
}
|
|
744
|
-
// " ' [
|
|
745
|
-
case 34: case 39: case 91:
|
|
746
|
-
characters += delimit(character);
|
|
747
|
-
break
|
|
748
|
-
// \t \n \r \s
|
|
749
|
-
case 9: case 10: case 13: case 32:
|
|
750
|
-
characters += whitespace(previous);
|
|
751
|
-
break
|
|
752
|
-
// \
|
|
753
|
-
case 92:
|
|
754
|
-
characters += escaping(caret() - 1, 7);
|
|
755
|
-
continue
|
|
756
|
-
// /
|
|
757
|
-
case 47:
|
|
758
|
-
switch (peek()) {
|
|
759
|
-
case 42: case 47:
|
|
760
|
-
append(comment(commenter(next(), caret()), root, parent), declarations);
|
|
761
|
-
break
|
|
762
|
-
default:
|
|
763
|
-
characters += '/';
|
|
764
|
-
}
|
|
765
|
-
break
|
|
766
|
-
// {
|
|
767
|
-
case 123 * variable:
|
|
768
|
-
points[index++] = strlen(characters) * ampersand;
|
|
769
|
-
// } ; \0
|
|
770
|
-
case 125 * variable: case 59: case 0:
|
|
771
|
-
switch (character) {
|
|
772
|
-
// \0 }
|
|
773
|
-
case 0: case 125: scanning = 0;
|
|
774
|
-
// ;
|
|
775
|
-
case 59 + offset: if (ampersand == -1) characters = replace(characters, /\f/g, '');
|
|
776
|
-
if (property > 0 && (strlen(characters) - length))
|
|
777
|
-
append(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations);
|
|
778
|
-
break
|
|
779
|
-
// @ ;
|
|
780
|
-
case 59: characters += ';';
|
|
781
|
-
// { rule/at-rule
|
|
782
|
-
default:
|
|
783
|
-
append(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets);
|
|
784
|
-
|
|
785
|
-
if (character === 123)
|
|
786
|
-
if (offset === 0)
|
|
787
|
-
parse(characters, root, reference, reference, props, rulesets, length, points, children);
|
|
788
|
-
else
|
|
789
|
-
switch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {
|
|
790
|
-
// d l m s
|
|
791
|
-
case 100: case 108: case 109: case 115:
|
|
792
|
-
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);
|
|
793
|
-
break
|
|
794
|
-
default:
|
|
795
|
-
parse(characters, reference, reference, reference, [''], children, 0, points, children);
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
|
|
799
|
-
index = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo;
|
|
800
|
-
break
|
|
801
|
-
// :
|
|
802
|
-
case 58:
|
|
803
|
-
length = 1 + strlen(characters), property = previous;
|
|
804
|
-
default:
|
|
805
|
-
if (variable < 1)
|
|
806
|
-
if (character == 123)
|
|
807
|
-
--variable;
|
|
808
|
-
else if (character == 125 && variable++ == 0 && prev() == 125)
|
|
809
|
-
continue
|
|
810
|
-
|
|
811
|
-
switch (characters += from(character), character * variable) {
|
|
812
|
-
// &
|
|
813
|
-
case 38:
|
|
814
|
-
ampersand = offset > 0 ? 1 : (characters += '\f', -1);
|
|
815
|
-
break
|
|
816
|
-
// ,
|
|
817
|
-
case 44:
|
|
818
|
-
points[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1;
|
|
819
|
-
break
|
|
820
|
-
// @
|
|
821
|
-
case 64:
|
|
822
|
-
// -
|
|
823
|
-
if (peek() === 45)
|
|
824
|
-
characters += delimit(next());
|
|
825
|
-
|
|
826
|
-
atrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++;
|
|
827
|
-
break
|
|
828
|
-
// -
|
|
829
|
-
case 45:
|
|
830
|
-
if (previous === 45 && strlen(characters) == 2)
|
|
831
|
-
variable = 0;
|
|
832
|
-
}
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
return rulesets
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
/**
|
|
839
|
-
* @param {string} value
|
|
840
|
-
* @param {object} root
|
|
841
|
-
* @param {object?} parent
|
|
842
|
-
* @param {number} index
|
|
843
|
-
* @param {number} offset
|
|
844
|
-
* @param {string[]} rules
|
|
845
|
-
* @param {number[]} points
|
|
846
|
-
* @param {string} type
|
|
847
|
-
* @param {string[]} props
|
|
848
|
-
* @param {string[]} children
|
|
849
|
-
* @param {number} length
|
|
850
|
-
* @return {object}
|
|
851
|
-
*/
|
|
852
|
-
function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length) {
|
|
853
|
-
var post = offset - 1;
|
|
854
|
-
var rule = offset === 0 ? rules : [''];
|
|
855
|
-
var size = sizeof(rule);
|
|
856
|
-
|
|
857
|
-
for (var i = 0, j = 0, k = 0; i < index; ++i)
|
|
858
|
-
for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)
|
|
859
|
-
if (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\f/g, rule[x])))
|
|
860
|
-
props[k++] = z;
|
|
861
|
-
|
|
862
|
-
return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length)
|
|
863
|
-
}
|
|
864
|
-
|
|
865
|
-
/**
|
|
866
|
-
* @param {number} value
|
|
867
|
-
* @param {object} root
|
|
868
|
-
* @param {object?} parent
|
|
869
|
-
* @return {object}
|
|
870
|
-
*/
|
|
871
|
-
function comment (value, root, parent) {
|
|
872
|
-
return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0)
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
/**
|
|
876
|
-
* @param {string} value
|
|
877
|
-
* @param {object} root
|
|
878
|
-
* @param {object?} parent
|
|
879
|
-
* @param {number} length
|
|
880
|
-
* @return {object}
|
|
881
|
-
*/
|
|
882
|
-
function declaration (value, root, parent, length) {
|
|
883
|
-
return node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length)
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
/**
|
|
887
|
-
* @param {object[]} children
|
|
888
|
-
* @param {function} callback
|
|
889
|
-
* @return {string}
|
|
890
|
-
*/
|
|
891
|
-
function serialize (children, callback) {
|
|
892
|
-
var output = '';
|
|
893
|
-
var length = sizeof(children);
|
|
894
|
-
|
|
895
|
-
for (var i = 0; i < length; i++)
|
|
896
|
-
output += callback(children[i], i, children, callback) || '';
|
|
897
|
-
|
|
898
|
-
return output
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
/**
|
|
902
|
-
* @param {object} element
|
|
903
|
-
* @param {number} index
|
|
904
|
-
* @param {object[]} children
|
|
905
|
-
* @param {function} callback
|
|
906
|
-
* @return {string}
|
|
907
|
-
*/
|
|
908
|
-
function stringify (element, index, children, callback) {
|
|
909
|
-
switch (element.type) {
|
|
910
|
-
case LAYER: if (element.children.length) break
|
|
911
|
-
case IMPORT: case DECLARATION: return element.return = element.return || element.value
|
|
912
|
-
case COMMENT: return ''
|
|
913
|
-
case KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'
|
|
914
|
-
case RULESET: element.value = element.props.join(',');
|
|
915
|
-
}
|
|
916
|
-
|
|
917
|
-
return strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''
|
|
918
|
-
}
|
|
919
|
-
|
|
920
|
-
/**
|
|
921
|
-
* @param {function[]} collection
|
|
922
|
-
* @return {function}
|
|
923
|
-
*/
|
|
924
|
-
function middleware (collection) {
|
|
925
|
-
var length = sizeof(collection);
|
|
926
|
-
|
|
927
|
-
return function (element, index, children, callback) {
|
|
928
|
-
var output = '';
|
|
929
|
-
|
|
930
|
-
for (var i = 0; i < length; i++)
|
|
931
|
-
output += collection[i](element, index, children, callback) || '';
|
|
932
|
-
|
|
933
|
-
return output
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
/**
|
|
938
|
-
* @param {function} callback
|
|
939
|
-
* @return {function}
|
|
940
|
-
*/
|
|
941
|
-
function rulesheet (callback) {
|
|
942
|
-
return function (element) {
|
|
943
|
-
if (!element.root)
|
|
944
|
-
if (element = element.return)
|
|
945
|
-
callback(element);
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
|
|
949
|
-
function memoize$1(fn) {
|
|
950
|
-
var cache = Object.create(null);
|
|
951
|
-
return function (arg) {
|
|
952
|
-
if (cache[arg] === undefined) cache[arg] = fn(arg);
|
|
953
|
-
return cache[arg];
|
|
954
|
-
};
|
|
955
|
-
}
|
|
956
|
-
|
|
957
|
-
var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
|
|
958
|
-
var previous = 0;
|
|
959
|
-
var character = 0;
|
|
960
|
-
|
|
961
|
-
while (true) {
|
|
962
|
-
previous = character;
|
|
963
|
-
character = peek(); // &\f
|
|
964
|
-
|
|
965
|
-
if (previous === 38 && character === 12) {
|
|
966
|
-
points[index] = 1;
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
if (token(character)) {
|
|
970
|
-
break;
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
next();
|
|
974
|
-
}
|
|
975
|
-
|
|
976
|
-
return slice(begin, position);
|
|
977
|
-
};
|
|
978
|
-
|
|
979
|
-
var toRules = function toRules(parsed, points) {
|
|
980
|
-
// pretend we've started with a comma
|
|
981
|
-
var index = -1;
|
|
982
|
-
var character = 44;
|
|
983
|
-
|
|
984
|
-
do {
|
|
985
|
-
switch (token(character)) {
|
|
986
|
-
case 0:
|
|
987
|
-
// &\f
|
|
988
|
-
if (character === 38 && peek() === 12) {
|
|
989
|
-
// this is not 100% correct, we don't account for literal sequences here - like for example quoted strings
|
|
990
|
-
// stylis inserts \f after & to know when & where it should replace this sequence with the context selector
|
|
991
|
-
// and when it should just concatenate the outer and inner selectors
|
|
992
|
-
// it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here
|
|
993
|
-
points[index] = 1;
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
parsed[index] += identifierWithPointTracking(position - 1, points, index);
|
|
997
|
-
break;
|
|
998
|
-
|
|
999
|
-
case 2:
|
|
1000
|
-
parsed[index] += delimit(character);
|
|
1001
|
-
break;
|
|
1002
|
-
|
|
1003
|
-
case 4:
|
|
1004
|
-
// comma
|
|
1005
|
-
if (character === 44) {
|
|
1006
|
-
// colon
|
|
1007
|
-
parsed[++index] = peek() === 58 ? '&\f' : '';
|
|
1008
|
-
points[index] = parsed[index].length;
|
|
1009
|
-
break;
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
// fallthrough
|
|
1013
|
-
|
|
1014
|
-
default:
|
|
1015
|
-
parsed[index] += from(character);
|
|
1016
|
-
}
|
|
1017
|
-
} while (character = next());
|
|
1018
|
-
|
|
1019
|
-
return parsed;
|
|
1020
|
-
};
|
|
1021
|
-
|
|
1022
|
-
var getRules = function getRules(value, points) {
|
|
1023
|
-
return dealloc(toRules(alloc(value), points));
|
|
1024
|
-
}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
var fixedElements = /* #__PURE__ */new WeakMap();
|
|
1028
|
-
var compat = function compat(element) {
|
|
1029
|
-
if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo
|
|
1030
|
-
// negative .length indicates that this rule has been already prefixed
|
|
1031
|
-
element.length < 1) {
|
|
1032
|
-
return;
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
var value = element.value;
|
|
1036
|
-
var parent = element.parent;
|
|
1037
|
-
var isImplicitRule = element.column === parent.column && element.line === parent.line;
|
|
1038
|
-
|
|
1039
|
-
while (parent.type !== 'rule') {
|
|
1040
|
-
parent = parent.parent;
|
|
1041
|
-
if (!parent) return;
|
|
1042
|
-
} // short-circuit for the simplest case
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
if (element.props.length === 1 && value.charCodeAt(0) !== 58
|
|
1046
|
-
/* colon */
|
|
1047
|
-
&& !fixedElements.get(parent)) {
|
|
1048
|
-
return;
|
|
1049
|
-
} // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)
|
|
1050
|
-
// then the props has already been manipulated beforehand as they that array is shared between it and its "rule parent"
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
if (isImplicitRule) {
|
|
1054
|
-
return;
|
|
1055
|
-
}
|
|
1056
|
-
|
|
1057
|
-
fixedElements.set(element, true);
|
|
1058
|
-
var points = [];
|
|
1059
|
-
var rules = getRules(value, points);
|
|
1060
|
-
var parentRules = parent.props;
|
|
1061
|
-
|
|
1062
|
-
for (var i = 0, k = 0; i < rules.length; i++) {
|
|
1063
|
-
for (var j = 0; j < parentRules.length; j++, k++) {
|
|
1064
|
-
element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
|
|
1065
|
-
}
|
|
1066
|
-
}
|
|
1067
|
-
};
|
|
1068
|
-
var removeLabel = function removeLabel(element) {
|
|
1069
|
-
if (element.type === 'decl') {
|
|
1070
|
-
var value = element.value;
|
|
1071
|
-
|
|
1072
|
-
if ( // charcode for l
|
|
1073
|
-
value.charCodeAt(0) === 108 && // charcode for b
|
|
1074
|
-
value.charCodeAt(2) === 98) {
|
|
1075
|
-
// this ignores label
|
|
1076
|
-
element["return"] = '';
|
|
1077
|
-
element.value = '';
|
|
1078
|
-
}
|
|
1079
|
-
}
|
|
1080
|
-
};
|
|
1081
|
-
|
|
1082
|
-
/* eslint-disable no-fallthrough */
|
|
1083
|
-
|
|
1084
|
-
function prefix(value, length) {
|
|
1085
|
-
switch (hash(value, length)) {
|
|
1086
|
-
// color-adjust
|
|
1087
|
-
case 5103:
|
|
1088
|
-
return WEBKIT + 'print-' + value + value;
|
|
1089
|
-
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
|
|
1090
|
-
|
|
1091
|
-
case 5737:
|
|
1092
|
-
case 4201:
|
|
1093
|
-
case 3177:
|
|
1094
|
-
case 3433:
|
|
1095
|
-
case 1641:
|
|
1096
|
-
case 4457:
|
|
1097
|
-
case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
|
|
1098
|
-
|
|
1099
|
-
case 5572:
|
|
1100
|
-
case 6356:
|
|
1101
|
-
case 5844:
|
|
1102
|
-
case 3191:
|
|
1103
|
-
case 6645:
|
|
1104
|
-
case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
|
|
1105
|
-
|
|
1106
|
-
case 6391:
|
|
1107
|
-
case 5879:
|
|
1108
|
-
case 5623:
|
|
1109
|
-
case 6135:
|
|
1110
|
-
case 4599:
|
|
1111
|
-
case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
|
|
1112
|
-
|
|
1113
|
-
case 4215:
|
|
1114
|
-
case 6389:
|
|
1115
|
-
case 5109:
|
|
1116
|
-
case 5365:
|
|
1117
|
-
case 5621:
|
|
1118
|
-
case 3829:
|
|
1119
|
-
return WEBKIT + value + value;
|
|
1120
|
-
// appearance, user-select, transform, hyphens, text-size-adjust
|
|
1121
|
-
|
|
1122
|
-
case 5349:
|
|
1123
|
-
case 4246:
|
|
1124
|
-
case 4810:
|
|
1125
|
-
case 6968:
|
|
1126
|
-
case 2756:
|
|
1127
|
-
return WEBKIT + value + MOZ + value + MS + value + value;
|
|
1128
|
-
// flex, flex-direction
|
|
1129
|
-
|
|
1130
|
-
case 6828:
|
|
1131
|
-
case 4268:
|
|
1132
|
-
return WEBKIT + value + MS + value + value;
|
|
1133
|
-
// order
|
|
1134
|
-
|
|
1135
|
-
case 6165:
|
|
1136
|
-
return WEBKIT + value + MS + 'flex-' + value + value;
|
|
1137
|
-
// align-items
|
|
1138
|
-
|
|
1139
|
-
case 5187:
|
|
1140
|
-
return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;
|
|
1141
|
-
// align-self
|
|
1142
|
-
|
|
1143
|
-
case 5443:
|
|
1144
|
-
return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;
|
|
1145
|
-
// align-content
|
|
1146
|
-
|
|
1147
|
-
case 4675:
|
|
1148
|
-
return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;
|
|
1149
|
-
// flex-shrink
|
|
1150
|
-
|
|
1151
|
-
case 5548:
|
|
1152
|
-
return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;
|
|
1153
|
-
// flex-basis
|
|
1154
|
-
|
|
1155
|
-
case 5292:
|
|
1156
|
-
return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;
|
|
1157
|
-
// flex-grow
|
|
1158
|
-
|
|
1159
|
-
case 6060:
|
|
1160
|
-
return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;
|
|
1161
|
-
// transition
|
|
1162
|
-
|
|
1163
|
-
case 4554:
|
|
1164
|
-
return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;
|
|
1165
|
-
// cursor
|
|
1166
|
-
|
|
1167
|
-
case 6187:
|
|
1168
|
-
return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;
|
|
1169
|
-
// background, background-image
|
|
1170
|
-
|
|
1171
|
-
case 5495:
|
|
1172
|
-
case 3959:
|
|
1173
|
-
return replace(value, /(image-set\([^]*)/, WEBKIT + '$1' + '$`$1');
|
|
1174
|
-
// justify-content
|
|
1175
|
-
|
|
1176
|
-
case 4968:
|
|
1177
|
-
return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;
|
|
1178
|
-
// (margin|padding)-inline-(start|end)
|
|
1179
|
-
|
|
1180
|
-
case 4095:
|
|
1181
|
-
case 3583:
|
|
1182
|
-
case 4068:
|
|
1183
|
-
case 2532:
|
|
1184
|
-
return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;
|
|
1185
|
-
// (min|max)?(width|height|inline-size|block-size)
|
|
1186
|
-
|
|
1187
|
-
case 8116:
|
|
1188
|
-
case 7059:
|
|
1189
|
-
case 5753:
|
|
1190
|
-
case 5535:
|
|
1191
|
-
case 5445:
|
|
1192
|
-
case 5701:
|
|
1193
|
-
case 4933:
|
|
1194
|
-
case 4677:
|
|
1195
|
-
case 5533:
|
|
1196
|
-
case 5789:
|
|
1197
|
-
case 5021:
|
|
1198
|
-
case 4765:
|
|
1199
|
-
// stretch, max-content, min-content, fill-available
|
|
1200
|
-
if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {
|
|
1201
|
-
// (m)ax-content, (m)in-content
|
|
1202
|
-
case 109:
|
|
1203
|
-
// -
|
|
1204
|
-
if (charat(value, length + 4) !== 45) break;
|
|
1205
|
-
// (f)ill-available, (f)it-content
|
|
1206
|
-
|
|
1207
|
-
case 102:
|
|
1208
|
-
return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;
|
|
1209
|
-
// (s)tretch
|
|
1210
|
-
|
|
1211
|
-
case 115:
|
|
1212
|
-
return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;
|
|
1213
|
-
}
|
|
1214
|
-
break;
|
|
1215
|
-
// position: sticky
|
|
1216
|
-
|
|
1217
|
-
case 4949:
|
|
1218
|
-
// (s)ticky?
|
|
1219
|
-
if (charat(value, length + 1) !== 115) break;
|
|
1220
|
-
// display: (flex|inline-flex)
|
|
1221
|
-
|
|
1222
|
-
case 6444:
|
|
1223
|
-
switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {
|
|
1224
|
-
// stic(k)y
|
|
1225
|
-
case 107:
|
|
1226
|
-
return replace(value, ':', ':' + WEBKIT) + value;
|
|
1227
|
-
// (inline-)?fl(e)x
|
|
1228
|
-
|
|
1229
|
-
case 101:
|
|
1230
|
-
return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;
|
|
1231
|
-
}
|
|
1232
|
-
|
|
1233
|
-
break;
|
|
1234
|
-
// writing-mode
|
|
1235
|
-
|
|
1236
|
-
case 5936:
|
|
1237
|
-
switch (charat(value, length + 11)) {
|
|
1238
|
-
// vertical-l(r)
|
|
1239
|
-
case 114:
|
|
1240
|
-
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value;
|
|
1241
|
-
// vertical-r(l)
|
|
1242
|
-
|
|
1243
|
-
case 108:
|
|
1244
|
-
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value;
|
|
1245
|
-
// horizontal(-)tb
|
|
1246
|
-
|
|
1247
|
-
case 45:
|
|
1248
|
-
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value;
|
|
1249
|
-
}
|
|
1250
|
-
|
|
1251
|
-
return WEBKIT + value + MS + value + value;
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
|
-
return value;
|
|
1255
|
-
}
|
|
1256
|
-
|
|
1257
|
-
var prefixer = function prefixer(element, index, children, callback) {
|
|
1258
|
-
if (element.length > -1) if (!element["return"]) switch (element.type) {
|
|
1259
|
-
case DECLARATION:
|
|
1260
|
-
element["return"] = prefix(element.value, element.length);
|
|
1261
|
-
break;
|
|
1262
|
-
|
|
1263
|
-
case KEYFRAMES:
|
|
1264
|
-
return serialize([copy(element, {
|
|
1265
|
-
value: replace(element.value, '@', '@' + WEBKIT)
|
|
1266
|
-
})], callback);
|
|
1267
|
-
|
|
1268
|
-
case RULESET:
|
|
1269
|
-
if (element.length) return combine(element.props, function (value) {
|
|
1270
|
-
switch (match(value, /(::plac\w+|:read-\w+)/)) {
|
|
1271
|
-
// :read-(only|write)
|
|
1272
|
-
case ':read-only':
|
|
1273
|
-
case ':read-write':
|
|
1274
|
-
return serialize([copy(element, {
|
|
1275
|
-
props: [replace(value, /:(read-\w+)/, ':' + MOZ + '$1')]
|
|
1276
|
-
})], callback);
|
|
1277
|
-
// :placeholder
|
|
1278
|
-
|
|
1279
|
-
case '::placeholder':
|
|
1280
|
-
return serialize([copy(element, {
|
|
1281
|
-
props: [replace(value, /:(plac\w+)/, ':' + WEBKIT + 'input-$1')]
|
|
1282
|
-
}), copy(element, {
|
|
1283
|
-
props: [replace(value, /:(plac\w+)/, ':' + MOZ + '$1')]
|
|
1284
|
-
}), copy(element, {
|
|
1285
|
-
props: [replace(value, /:(plac\w+)/, MS + 'input-$1')]
|
|
1286
|
-
})], callback);
|
|
1287
|
-
}
|
|
1288
|
-
|
|
1289
|
-
return '';
|
|
1290
|
-
});
|
|
1291
|
-
}
|
|
1292
|
-
};
|
|
1293
|
-
|
|
1294
|
-
var defaultStylisPlugins = [prefixer];
|
|
1295
|
-
|
|
1296
|
-
var createCache = function createCache(options) {
|
|
1297
|
-
var key = options.key;
|
|
1298
|
-
|
|
1299
|
-
if (key === 'css') {
|
|
1300
|
-
var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); // get SSRed styles out of the way of React's hydration
|
|
1301
|
-
// document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)
|
|
1302
|
-
// note this very very intentionally targets all style elements regardless of the key to ensure
|
|
1303
|
-
// that creating a cache works inside of render of a React component
|
|
1304
|
-
|
|
1305
|
-
Array.prototype.forEach.call(ssrStyles, function (node) {
|
|
1306
|
-
// we want to only move elements which have a space in the data-emotion attribute value
|
|
1307
|
-
// because that indicates that it is an Emotion 11 server-side rendered style elements
|
|
1308
|
-
// while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector
|
|
1309
|
-
// Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)
|
|
1310
|
-
// so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles
|
|
1311
|
-
// will not result in the Emotion 10 styles being destroyed
|
|
1312
|
-
var dataEmotionAttribute = node.getAttribute('data-emotion');
|
|
1313
|
-
|
|
1314
|
-
if (dataEmotionAttribute.indexOf(' ') === -1) {
|
|
1315
|
-
return;
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
document.head.appendChild(node);
|
|
1319
|
-
node.setAttribute('data-s', '');
|
|
1320
|
-
});
|
|
1321
|
-
}
|
|
1322
|
-
|
|
1323
|
-
var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
|
|
1324
|
-
|
|
1325
|
-
var inserted = {};
|
|
1326
|
-
var container;
|
|
1327
|
-
var nodesToHydrate = [];
|
|
1328
|
-
|
|
1329
|
-
{
|
|
1330
|
-
container = options.container || document.head;
|
|
1331
|
-
Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which
|
|
1332
|
-
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
1333
|
-
document.querySelectorAll("style[data-emotion^=\"" + key + " \"]"), function (node) {
|
|
1334
|
-
var attrib = node.getAttribute("data-emotion").split(' ');
|
|
1335
|
-
|
|
1336
|
-
for (var i = 1; i < attrib.length; i++) {
|
|
1337
|
-
inserted[attrib[i]] = true;
|
|
1338
|
-
}
|
|
1339
|
-
|
|
1340
|
-
nodesToHydrate.push(node);
|
|
1341
|
-
});
|
|
1342
|
-
}
|
|
1343
|
-
|
|
1344
|
-
var _insert;
|
|
1345
|
-
|
|
1346
|
-
var omnipresentPlugins = [compat, removeLabel];
|
|
1347
|
-
|
|
1348
|
-
{
|
|
1349
|
-
var currentSheet;
|
|
1350
|
-
var finalizingPlugins = [stringify, rulesheet(function (rule) {
|
|
1351
|
-
currentSheet.insert(rule);
|
|
1352
|
-
})];
|
|
1353
|
-
var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
|
|
1354
|
-
|
|
1355
|
-
var stylis = function stylis(styles) {
|
|
1356
|
-
return serialize(compile(styles), serializer);
|
|
1357
|
-
};
|
|
1358
|
-
|
|
1359
|
-
_insert = function insert(selector, serialized, sheet, shouldCache) {
|
|
1360
|
-
currentSheet = sheet;
|
|
1361
|
-
|
|
1362
|
-
stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
|
|
1363
|
-
|
|
1364
|
-
if (shouldCache) {
|
|
1365
|
-
cache.inserted[serialized.name] = true;
|
|
1366
|
-
}
|
|
1367
|
-
};
|
|
1368
|
-
}
|
|
1369
|
-
|
|
1370
|
-
var cache = {
|
|
1371
|
-
key: key,
|
|
1372
|
-
sheet: new StyleSheet({
|
|
1373
|
-
key: key,
|
|
1374
|
-
container: container,
|
|
1375
|
-
nonce: options.nonce,
|
|
1376
|
-
speedy: options.speedy,
|
|
1377
|
-
prepend: options.prepend,
|
|
1378
|
-
insertionPoint: options.insertionPoint
|
|
1379
|
-
}),
|
|
1380
|
-
nonce: options.nonce,
|
|
1381
|
-
inserted: inserted,
|
|
1382
|
-
registered: {},
|
|
1383
|
-
insert: _insert
|
|
1384
|
-
};
|
|
1385
|
-
cache.sheet.hydrate(nodesToHydrate);
|
|
1386
|
-
return cache;
|
|
1387
|
-
};
|
|
1388
|
-
|
|
1389
|
-
function getDefaultExportFromCjs (x) {
|
|
1390
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
1391
|
-
}
|
|
1392
|
-
|
|
1393
|
-
var reactIs$2 = {exports: {}};
|
|
1394
|
-
|
|
1395
|
-
var reactIs_production_min = {};
|
|
1396
|
-
|
|
1397
|
-
/** @license React v16.13.1
|
|
1398
|
-
* react-is.production.min.js
|
|
1399
|
-
*
|
|
1400
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1401
|
-
*
|
|
1402
|
-
* This source code is licensed under the MIT license found in the
|
|
1403
|
-
* LICENSE file in the root directory of this source tree.
|
|
1404
|
-
*/
|
|
1405
|
-
|
|
1406
|
-
var hasRequiredReactIs_production_min;
|
|
1407
|
-
|
|
1408
|
-
function requireReactIs_production_min () {
|
|
1409
|
-
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
1410
|
-
hasRequiredReactIs_production_min = 1;
|
|
1411
|
-
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?
|
|
1412
|
-
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
|
1413
|
-
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}reactIs_production_min.AsyncMode=l;reactIs_production_min.ConcurrentMode=m;reactIs_production_min.ContextConsumer=k;reactIs_production_min.ContextProvider=h;reactIs_production_min.Element=c;reactIs_production_min.ForwardRef=n;reactIs_production_min.Fragment=e;reactIs_production_min.Lazy=t;reactIs_production_min.Memo=r;reactIs_production_min.Portal=d;
|
|
1414
|
-
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};
|
|
1415
|
-
reactIs_production_min.isMemo=function(a){return z(a)===r};reactIs_production_min.isPortal=function(a){return z(a)===d};reactIs_production_min.isProfiler=function(a){return z(a)===g};reactIs_production_min.isStrictMode=function(a){return z(a)===f};reactIs_production_min.isSuspense=function(a){return z(a)===p};
|
|
1416
|
-
reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};reactIs_production_min.typeOf=z;
|
|
1417
|
-
return reactIs_production_min;
|
|
1418
|
-
}
|
|
1419
|
-
|
|
1420
|
-
var reactIs_development$1 = {};
|
|
1421
|
-
|
|
1422
|
-
/** @license React v16.13.1
|
|
1423
|
-
* react-is.development.js
|
|
1424
|
-
*
|
|
1425
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1426
|
-
*
|
|
1427
|
-
* This source code is licensed under the MIT license found in the
|
|
1428
|
-
* LICENSE file in the root directory of this source tree.
|
|
1429
|
-
*/
|
|
1430
|
-
|
|
1431
|
-
var hasRequiredReactIs_development$1;
|
|
1432
|
-
|
|
1433
|
-
function requireReactIs_development$1 () {
|
|
1434
|
-
if (hasRequiredReactIs_development$1) return reactIs_development$1;
|
|
1435
|
-
hasRequiredReactIs_development$1 = 1;
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1440
|
-
(function() {
|
|
1441
|
-
|
|
1442
|
-
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
1443
|
-
// nor polyfill, then a plain number is used for performance.
|
|
1444
|
-
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
1445
|
-
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
1446
|
-
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
1447
|
-
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
1448
|
-
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
1449
|
-
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
1450
|
-
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
1451
|
-
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
1452
|
-
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
1453
|
-
|
|
1454
|
-
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
1455
|
-
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
1456
|
-
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
1457
|
-
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
1458
|
-
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
1459
|
-
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
1460
|
-
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
1461
|
-
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
1462
|
-
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
1463
|
-
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
1464
|
-
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
1465
|
-
|
|
1466
|
-
function isValidElementType(type) {
|
|
1467
|
-
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1468
|
-
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);
|
|
1469
|
-
}
|
|
1470
|
-
|
|
1471
|
-
function typeOf(object) {
|
|
1472
|
-
if (typeof object === 'object' && object !== null) {
|
|
1473
|
-
var $$typeof = object.$$typeof;
|
|
1474
|
-
|
|
1475
|
-
switch ($$typeof) {
|
|
1476
|
-
case REACT_ELEMENT_TYPE:
|
|
1477
|
-
var type = object.type;
|
|
1478
|
-
|
|
1479
|
-
switch (type) {
|
|
1480
|
-
case REACT_ASYNC_MODE_TYPE:
|
|
1481
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
|
1482
|
-
case REACT_FRAGMENT_TYPE:
|
|
1483
|
-
case REACT_PROFILER_TYPE:
|
|
1484
|
-
case REACT_STRICT_MODE_TYPE:
|
|
1485
|
-
case REACT_SUSPENSE_TYPE:
|
|
1486
|
-
return type;
|
|
1487
|
-
|
|
1488
|
-
default:
|
|
1489
|
-
var $$typeofType = type && type.$$typeof;
|
|
1490
|
-
|
|
1491
|
-
switch ($$typeofType) {
|
|
1492
|
-
case REACT_CONTEXT_TYPE:
|
|
1493
|
-
case REACT_FORWARD_REF_TYPE:
|
|
1494
|
-
case REACT_LAZY_TYPE:
|
|
1495
|
-
case REACT_MEMO_TYPE:
|
|
1496
|
-
case REACT_PROVIDER_TYPE:
|
|
1497
|
-
return $$typeofType;
|
|
1498
|
-
|
|
1499
|
-
default:
|
|
1500
|
-
return $$typeof;
|
|
1501
|
-
}
|
|
1502
|
-
|
|
1503
|
-
}
|
|
1504
|
-
|
|
1505
|
-
case REACT_PORTAL_TYPE:
|
|
1506
|
-
return $$typeof;
|
|
1507
|
-
}
|
|
1508
|
-
}
|
|
1509
|
-
|
|
1510
|
-
return undefined;
|
|
1511
|
-
} // AsyncMode is deprecated along with isAsyncMode
|
|
1512
|
-
|
|
1513
|
-
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
1514
|
-
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
1515
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
1516
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
1517
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
1518
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
1519
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
|
1520
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
1521
|
-
var Memo = REACT_MEMO_TYPE;
|
|
1522
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
1523
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
1524
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
1525
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
1526
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
1527
|
-
|
|
1528
|
-
function isAsyncMode(object) {
|
|
1529
|
-
{
|
|
1530
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
1531
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
1532
|
-
|
|
1533
|
-
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.');
|
|
1534
|
-
}
|
|
1535
|
-
}
|
|
1536
|
-
|
|
1537
|
-
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
1538
|
-
}
|
|
1539
|
-
function isConcurrentMode(object) {
|
|
1540
|
-
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
1541
|
-
}
|
|
1542
|
-
function isContextConsumer(object) {
|
|
1543
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
1544
|
-
}
|
|
1545
|
-
function isContextProvider(object) {
|
|
1546
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
1547
|
-
}
|
|
1548
|
-
function isElement(object) {
|
|
1549
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1550
|
-
}
|
|
1551
|
-
function isForwardRef(object) {
|
|
1552
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
1553
|
-
}
|
|
1554
|
-
function isFragment(object) {
|
|
1555
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
1556
|
-
}
|
|
1557
|
-
function isLazy(object) {
|
|
1558
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
1559
|
-
}
|
|
1560
|
-
function isMemo(object) {
|
|
1561
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
1562
|
-
}
|
|
1563
|
-
function isPortal(object) {
|
|
1564
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
1565
|
-
}
|
|
1566
|
-
function isProfiler(object) {
|
|
1567
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
1568
|
-
}
|
|
1569
|
-
function isStrictMode(object) {
|
|
1570
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
1571
|
-
}
|
|
1572
|
-
function isSuspense(object) {
|
|
1573
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
1574
|
-
}
|
|
1575
|
-
|
|
1576
|
-
reactIs_development$1.AsyncMode = AsyncMode;
|
|
1577
|
-
reactIs_development$1.ConcurrentMode = ConcurrentMode;
|
|
1578
|
-
reactIs_development$1.ContextConsumer = ContextConsumer;
|
|
1579
|
-
reactIs_development$1.ContextProvider = ContextProvider;
|
|
1580
|
-
reactIs_development$1.Element = Element;
|
|
1581
|
-
reactIs_development$1.ForwardRef = ForwardRef;
|
|
1582
|
-
reactIs_development$1.Fragment = Fragment;
|
|
1583
|
-
reactIs_development$1.Lazy = Lazy;
|
|
1584
|
-
reactIs_development$1.Memo = Memo;
|
|
1585
|
-
reactIs_development$1.Portal = Portal;
|
|
1586
|
-
reactIs_development$1.Profiler = Profiler;
|
|
1587
|
-
reactIs_development$1.StrictMode = StrictMode;
|
|
1588
|
-
reactIs_development$1.Suspense = Suspense;
|
|
1589
|
-
reactIs_development$1.isAsyncMode = isAsyncMode;
|
|
1590
|
-
reactIs_development$1.isConcurrentMode = isConcurrentMode;
|
|
1591
|
-
reactIs_development$1.isContextConsumer = isContextConsumer;
|
|
1592
|
-
reactIs_development$1.isContextProvider = isContextProvider;
|
|
1593
|
-
reactIs_development$1.isElement = isElement;
|
|
1594
|
-
reactIs_development$1.isForwardRef = isForwardRef;
|
|
1595
|
-
reactIs_development$1.isFragment = isFragment;
|
|
1596
|
-
reactIs_development$1.isLazy = isLazy;
|
|
1597
|
-
reactIs_development$1.isMemo = isMemo;
|
|
1598
|
-
reactIs_development$1.isPortal = isPortal;
|
|
1599
|
-
reactIs_development$1.isProfiler = isProfiler;
|
|
1600
|
-
reactIs_development$1.isStrictMode = isStrictMode;
|
|
1601
|
-
reactIs_development$1.isSuspense = isSuspense;
|
|
1602
|
-
reactIs_development$1.isValidElementType = isValidElementType;
|
|
1603
|
-
reactIs_development$1.typeOf = typeOf;
|
|
1604
|
-
})();
|
|
1605
|
-
}
|
|
1606
|
-
return reactIs_development$1;
|
|
1607
|
-
}
|
|
1608
|
-
|
|
1609
|
-
var hasRequiredReactIs;
|
|
1610
|
-
|
|
1611
|
-
function requireReactIs () {
|
|
1612
|
-
if (hasRequiredReactIs) return reactIs$2.exports;
|
|
1613
|
-
hasRequiredReactIs = 1;
|
|
1614
|
-
|
|
1615
|
-
if (process.env.NODE_ENV === 'production') {
|
|
1616
|
-
reactIs$2.exports = requireReactIs_production_min();
|
|
1617
|
-
} else {
|
|
1618
|
-
reactIs$2.exports = requireReactIs_development$1();
|
|
1619
|
-
}
|
|
1620
|
-
return reactIs$2.exports;
|
|
1621
|
-
}
|
|
1622
|
-
|
|
1623
|
-
var reactIs$1 = requireReactIs();
|
|
1624
|
-
var FORWARD_REF_STATICS = {
|
|
1625
|
-
'$$typeof': true,
|
|
1626
|
-
render: true,
|
|
1627
|
-
defaultProps: true,
|
|
1628
|
-
displayName: true,
|
|
1629
|
-
propTypes: true
|
|
1630
|
-
};
|
|
1631
|
-
var MEMO_STATICS = {
|
|
1632
|
-
'$$typeof': true,
|
|
1633
|
-
compare: true,
|
|
1634
|
-
defaultProps: true,
|
|
1635
|
-
displayName: true,
|
|
1636
|
-
propTypes: true,
|
|
1637
|
-
type: true
|
|
1638
|
-
};
|
|
1639
|
-
var TYPE_STATICS = {};
|
|
1640
|
-
TYPE_STATICS[reactIs$1.ForwardRef] = FORWARD_REF_STATICS;
|
|
1641
|
-
TYPE_STATICS[reactIs$1.Memo] = MEMO_STATICS;
|
|
1642
|
-
|
|
1643
|
-
var isBrowser = true;
|
|
1644
|
-
|
|
1645
|
-
function getRegisteredStyles(registered, registeredStyles, classNames) {
|
|
1646
|
-
var rawClassName = '';
|
|
1647
|
-
classNames.split(' ').forEach(function (className) {
|
|
1648
|
-
if (registered[className] !== undefined) {
|
|
1649
|
-
registeredStyles.push(registered[className] + ";");
|
|
1650
|
-
} else if (className) {
|
|
1651
|
-
rawClassName += className + " ";
|
|
1652
|
-
}
|
|
1653
|
-
});
|
|
1654
|
-
return rawClassName;
|
|
1655
|
-
}
|
|
1656
|
-
var registerStyles = function registerStyles(cache, serialized, isStringTag) {
|
|
1657
|
-
var className = cache.key + "-" + serialized.name;
|
|
1658
|
-
|
|
1659
|
-
if ( // we only need to add the styles to the registered cache if the
|
|
1660
|
-
// class name could be used further down
|
|
1661
|
-
// the tree but if it's a string tag, we know it won't
|
|
1662
|
-
// so we don't have to add it to registered cache.
|
|
1663
|
-
// this improves memory usage since we can avoid storing the whole style string
|
|
1664
|
-
(isStringTag === false || // we need to always store it if we're in compat mode and
|
|
1665
|
-
// in node since emotion-server relies on whether a style is in
|
|
1666
|
-
// the registered cache to know whether a style is global or not
|
|
1667
|
-
// also, note that this check will be dead code eliminated in the browser
|
|
1668
|
-
isBrowser === false ) && cache.registered[className] === undefined) {
|
|
1669
|
-
cache.registered[className] = serialized.styles;
|
|
1670
|
-
}
|
|
1671
|
-
};
|
|
1672
|
-
var insertStyles = function insertStyles(cache, serialized, isStringTag) {
|
|
1673
|
-
registerStyles(cache, serialized, isStringTag);
|
|
1674
|
-
var className = cache.key + "-" + serialized.name;
|
|
1675
|
-
|
|
1676
|
-
if (cache.inserted[serialized.name] === undefined) {
|
|
1677
|
-
var current = serialized;
|
|
1678
|
-
|
|
1679
|
-
do {
|
|
1680
|
-
cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
|
|
1681
|
-
|
|
1682
|
-
current = current.next;
|
|
1683
|
-
} while (current !== undefined);
|
|
1684
|
-
}
|
|
1685
|
-
};
|
|
1686
|
-
|
|
1687
|
-
/* eslint-disable */
|
|
1688
|
-
// Inspired by https://github.com/garycourt/murmurhash-js
|
|
1689
|
-
// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86
|
|
1690
|
-
function murmur2(str) {
|
|
1691
|
-
// 'm' and 'r' are mixing constants generated offline.
|
|
1692
|
-
// They're not really 'magic', they just happen to work well.
|
|
1693
|
-
// const m = 0x5bd1e995;
|
|
1694
|
-
// const r = 24;
|
|
1695
|
-
// Initialize the hash
|
|
1696
|
-
var h = 0; // Mix 4 bytes at a time into the hash
|
|
1697
|
-
|
|
1698
|
-
var k,
|
|
1699
|
-
i = 0,
|
|
1700
|
-
len = str.length;
|
|
1701
|
-
|
|
1702
|
-
for (; len >= 4; ++i, len -= 4) {
|
|
1703
|
-
k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;
|
|
1704
|
-
k =
|
|
1705
|
-
/* Math.imul(k, m): */
|
|
1706
|
-
(k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);
|
|
1707
|
-
k ^=
|
|
1708
|
-
/* k >>> r: */
|
|
1709
|
-
k >>> 24;
|
|
1710
|
-
h =
|
|
1711
|
-
/* Math.imul(k, m): */
|
|
1712
|
-
(k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^
|
|
1713
|
-
/* Math.imul(h, m): */
|
|
1714
|
-
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
|
1715
|
-
} // Handle the last few bytes of the input array
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
switch (len) {
|
|
1719
|
-
case 3:
|
|
1720
|
-
h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
|
|
1721
|
-
|
|
1722
|
-
case 2:
|
|
1723
|
-
h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
|
|
1724
|
-
|
|
1725
|
-
case 1:
|
|
1726
|
-
h ^= str.charCodeAt(i) & 0xff;
|
|
1727
|
-
h =
|
|
1728
|
-
/* Math.imul(h, m): */
|
|
1729
|
-
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
|
1730
|
-
} // Do a few final mixes of the hash to ensure the last few
|
|
1731
|
-
// bytes are well-incorporated.
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
h ^= h >>> 13;
|
|
1735
|
-
h =
|
|
1736
|
-
/* Math.imul(h, m): */
|
|
1737
|
-
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
|
1738
|
-
return ((h ^ h >>> 15) >>> 0).toString(36);
|
|
1739
|
-
}
|
|
1740
|
-
|
|
1741
|
-
var unitlessKeys = {
|
|
1742
|
-
animationIterationCount: 1,
|
|
1743
|
-
aspectRatio: 1,
|
|
1744
|
-
borderImageOutset: 1,
|
|
1745
|
-
borderImageSlice: 1,
|
|
1746
|
-
borderImageWidth: 1,
|
|
1747
|
-
boxFlex: 1,
|
|
1748
|
-
boxFlexGroup: 1,
|
|
1749
|
-
boxOrdinalGroup: 1,
|
|
1750
|
-
columnCount: 1,
|
|
1751
|
-
columns: 1,
|
|
1752
|
-
flex: 1,
|
|
1753
|
-
flexGrow: 1,
|
|
1754
|
-
flexPositive: 1,
|
|
1755
|
-
flexShrink: 1,
|
|
1756
|
-
flexNegative: 1,
|
|
1757
|
-
flexOrder: 1,
|
|
1758
|
-
gridRow: 1,
|
|
1759
|
-
gridRowEnd: 1,
|
|
1760
|
-
gridRowSpan: 1,
|
|
1761
|
-
gridRowStart: 1,
|
|
1762
|
-
gridColumn: 1,
|
|
1763
|
-
gridColumnEnd: 1,
|
|
1764
|
-
gridColumnSpan: 1,
|
|
1765
|
-
gridColumnStart: 1,
|
|
1766
|
-
msGridRow: 1,
|
|
1767
|
-
msGridRowSpan: 1,
|
|
1768
|
-
msGridColumn: 1,
|
|
1769
|
-
msGridColumnSpan: 1,
|
|
1770
|
-
fontWeight: 1,
|
|
1771
|
-
lineHeight: 1,
|
|
1772
|
-
opacity: 1,
|
|
1773
|
-
order: 1,
|
|
1774
|
-
orphans: 1,
|
|
1775
|
-
scale: 1,
|
|
1776
|
-
tabSize: 1,
|
|
1777
|
-
widows: 1,
|
|
1778
|
-
zIndex: 1,
|
|
1779
|
-
zoom: 1,
|
|
1780
|
-
WebkitLineClamp: 1,
|
|
1781
|
-
// SVG-related properties
|
|
1782
|
-
fillOpacity: 1,
|
|
1783
|
-
floodOpacity: 1,
|
|
1784
|
-
stopOpacity: 1,
|
|
1785
|
-
strokeDasharray: 1,
|
|
1786
|
-
strokeDashoffset: 1,
|
|
1787
|
-
strokeMiterlimit: 1,
|
|
1788
|
-
strokeOpacity: 1,
|
|
1789
|
-
strokeWidth: 1
|
|
1790
|
-
};
|
|
1791
|
-
|
|
1792
|
-
var hyphenateRegex = /[A-Z]|^ms/g;
|
|
1793
|
-
var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
|
|
1794
|
-
|
|
1795
|
-
var isCustomProperty = function isCustomProperty(property) {
|
|
1796
|
-
return property.charCodeAt(1) === 45;
|
|
1797
|
-
};
|
|
1798
|
-
|
|
1799
|
-
var isProcessableValue = function isProcessableValue(value) {
|
|
1800
|
-
return value != null && typeof value !== 'boolean';
|
|
1801
|
-
};
|
|
1802
|
-
|
|
1803
|
-
var processStyleName = /* #__PURE__ */memoize$1(function (styleName) {
|
|
1804
|
-
return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();
|
|
1805
|
-
});
|
|
1806
|
-
|
|
1807
|
-
var processStyleValue = function processStyleValue(key, value) {
|
|
1808
|
-
switch (key) {
|
|
1809
|
-
case 'animation':
|
|
1810
|
-
case 'animationName':
|
|
1811
|
-
{
|
|
1812
|
-
if (typeof value === 'string') {
|
|
1813
|
-
return value.replace(animationRegex, function (match, p1, p2) {
|
|
1814
|
-
cursor = {
|
|
1815
|
-
name: p1,
|
|
1816
|
-
styles: p2,
|
|
1817
|
-
next: cursor
|
|
1818
|
-
};
|
|
1819
|
-
return p1;
|
|
1820
|
-
});
|
|
1821
|
-
}
|
|
1822
|
-
}
|
|
1823
|
-
}
|
|
1824
|
-
|
|
1825
|
-
if (unitlessKeys[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {
|
|
1826
|
-
return value + 'px';
|
|
1827
|
-
}
|
|
1828
|
-
|
|
1829
|
-
return value;
|
|
1830
|
-
};
|
|
1831
|
-
|
|
1832
|
-
function handleInterpolation(mergedProps, registered, interpolation) {
|
|
1833
|
-
if (interpolation == null) {
|
|
1834
|
-
return '';
|
|
1835
|
-
}
|
|
1836
|
-
|
|
1837
|
-
var componentSelector = interpolation;
|
|
1838
|
-
|
|
1839
|
-
if (componentSelector.__emotion_styles !== undefined) {
|
|
1840
|
-
|
|
1841
|
-
return componentSelector;
|
|
1842
|
-
}
|
|
1843
|
-
|
|
1844
|
-
switch (typeof interpolation) {
|
|
1845
|
-
case 'boolean':
|
|
1846
|
-
{
|
|
1847
|
-
return '';
|
|
1848
|
-
}
|
|
1849
|
-
|
|
1850
|
-
case 'object':
|
|
1851
|
-
{
|
|
1852
|
-
var keyframes = interpolation;
|
|
1853
|
-
|
|
1854
|
-
if (keyframes.anim === 1) {
|
|
1855
|
-
cursor = {
|
|
1856
|
-
name: keyframes.name,
|
|
1857
|
-
styles: keyframes.styles,
|
|
1858
|
-
next: cursor
|
|
1859
|
-
};
|
|
1860
|
-
return keyframes.name;
|
|
1861
|
-
}
|
|
1862
|
-
|
|
1863
|
-
var serializedStyles = interpolation;
|
|
1864
|
-
|
|
1865
|
-
if (serializedStyles.styles !== undefined) {
|
|
1866
|
-
var next = serializedStyles.next;
|
|
1867
|
-
|
|
1868
|
-
if (next !== undefined) {
|
|
1869
|
-
// not the most efficient thing ever but this is a pretty rare case
|
|
1870
|
-
// and there will be very few iterations of this generally
|
|
1871
|
-
while (next !== undefined) {
|
|
1872
|
-
cursor = {
|
|
1873
|
-
name: next.name,
|
|
1874
|
-
styles: next.styles,
|
|
1875
|
-
next: cursor
|
|
1876
|
-
};
|
|
1877
|
-
next = next.next;
|
|
1878
|
-
}
|
|
1879
|
-
}
|
|
1880
|
-
|
|
1881
|
-
var styles = serializedStyles.styles + ";";
|
|
1882
|
-
return styles;
|
|
1883
|
-
}
|
|
1884
|
-
|
|
1885
|
-
return createStringFromObject(mergedProps, registered, interpolation);
|
|
1886
|
-
}
|
|
1887
|
-
|
|
1888
|
-
case 'function':
|
|
1889
|
-
{
|
|
1890
|
-
if (mergedProps !== undefined) {
|
|
1891
|
-
var previousCursor = cursor;
|
|
1892
|
-
var result = interpolation(mergedProps);
|
|
1893
|
-
cursor = previousCursor;
|
|
1894
|
-
return handleInterpolation(mergedProps, registered, result);
|
|
1895
|
-
}
|
|
1896
|
-
|
|
1897
|
-
break;
|
|
1898
|
-
}
|
|
1899
|
-
} // finalize string values (regular strings and functions interpolated into css calls)
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
var asString = interpolation;
|
|
1903
|
-
|
|
1904
|
-
if (registered == null) {
|
|
1905
|
-
return asString;
|
|
1906
|
-
}
|
|
1907
|
-
|
|
1908
|
-
var cached = registered[asString];
|
|
1909
|
-
return cached !== undefined ? cached : asString;
|
|
1910
|
-
}
|
|
1911
|
-
|
|
1912
|
-
function createStringFromObject(mergedProps, registered, obj) {
|
|
1913
|
-
var string = '';
|
|
1914
|
-
|
|
1915
|
-
if (Array.isArray(obj)) {
|
|
1916
|
-
for (var i = 0; i < obj.length; i++) {
|
|
1917
|
-
string += handleInterpolation(mergedProps, registered, obj[i]) + ";";
|
|
1918
|
-
}
|
|
1919
|
-
} else {
|
|
1920
|
-
for (var key in obj) {
|
|
1921
|
-
var value = obj[key];
|
|
1922
|
-
|
|
1923
|
-
if (typeof value !== 'object') {
|
|
1924
|
-
var asString = value;
|
|
1925
|
-
|
|
1926
|
-
if (registered != null && registered[asString] !== undefined) {
|
|
1927
|
-
string += key + "{" + registered[asString] + "}";
|
|
1928
|
-
} else if (isProcessableValue(asString)) {
|
|
1929
|
-
string += processStyleName(key) + ":" + processStyleValue(key, asString) + ";";
|
|
1930
|
-
}
|
|
1931
|
-
} else {
|
|
1932
|
-
|
|
1933
|
-
if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {
|
|
1934
|
-
for (var _i = 0; _i < value.length; _i++) {
|
|
1935
|
-
if (isProcessableValue(value[_i])) {
|
|
1936
|
-
string += processStyleName(key) + ":" + processStyleValue(key, value[_i]) + ";";
|
|
1937
|
-
}
|
|
1938
|
-
}
|
|
1939
|
-
} else {
|
|
1940
|
-
var interpolated = handleInterpolation(mergedProps, registered, value);
|
|
1941
|
-
|
|
1942
|
-
switch (key) {
|
|
1943
|
-
case 'animation':
|
|
1944
|
-
case 'animationName':
|
|
1945
|
-
{
|
|
1946
|
-
string += processStyleName(key) + ":" + interpolated + ";";
|
|
1947
|
-
break;
|
|
1948
|
-
}
|
|
1949
|
-
|
|
1950
|
-
default:
|
|
1951
|
-
{
|
|
1952
|
-
|
|
1953
|
-
string += key + "{" + interpolated + "}";
|
|
1954
|
-
}
|
|
1955
|
-
}
|
|
1956
|
-
}
|
|
1957
|
-
}
|
|
1958
|
-
}
|
|
1959
|
-
}
|
|
1960
|
-
|
|
1961
|
-
return string;
|
|
1962
|
-
}
|
|
1963
|
-
|
|
1964
|
-
var labelPattern = /label:\s*([^\s;{]+)\s*(;|$)/g; // this is the cursor for keyframes
|
|
1965
|
-
// keyframes are stored on the SerializedStyles object as a linked list
|
|
1966
|
-
|
|
1967
|
-
var cursor;
|
|
1968
|
-
function serializeStyles(args, registered, mergedProps) {
|
|
1969
|
-
if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {
|
|
1970
|
-
return args[0];
|
|
1971
|
-
}
|
|
1972
|
-
|
|
1973
|
-
var stringMode = true;
|
|
1974
|
-
var styles = '';
|
|
1975
|
-
cursor = undefined;
|
|
1976
|
-
var strings = args[0];
|
|
1977
|
-
|
|
1978
|
-
if (strings == null || strings.raw === undefined) {
|
|
1979
|
-
stringMode = false;
|
|
1980
|
-
styles += handleInterpolation(mergedProps, registered, strings);
|
|
1981
|
-
} else {
|
|
1982
|
-
var asTemplateStringsArr = strings;
|
|
1983
|
-
|
|
1984
|
-
styles += asTemplateStringsArr[0];
|
|
1985
|
-
} // we start at 1 since we've already handled the first arg
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
for (var i = 1; i < args.length; i++) {
|
|
1989
|
-
styles += handleInterpolation(mergedProps, registered, args[i]);
|
|
1990
|
-
|
|
1991
|
-
if (stringMode) {
|
|
1992
|
-
var templateStringsArr = strings;
|
|
1993
|
-
|
|
1994
|
-
styles += templateStringsArr[i];
|
|
1995
|
-
}
|
|
1996
|
-
} // using a global regex with .exec is stateful so lastIndex has to be reset each time
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
labelPattern.lastIndex = 0;
|
|
2000
|
-
var identifierName = '';
|
|
2001
|
-
var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5
|
|
2002
|
-
|
|
2003
|
-
while ((match = labelPattern.exec(styles)) !== null) {
|
|
2004
|
-
identifierName += '-' + match[1];
|
|
2005
|
-
}
|
|
2006
|
-
|
|
2007
|
-
var name = murmur2(styles) + identifierName;
|
|
2008
|
-
|
|
2009
|
-
return {
|
|
2010
|
-
name: name,
|
|
2011
|
-
styles: styles,
|
|
2012
|
-
next: cursor
|
|
2013
|
-
};
|
|
2014
|
-
}
|
|
2015
|
-
|
|
2016
|
-
var syncFallback = function syncFallback(create) {
|
|
2017
|
-
return create();
|
|
2018
|
-
};
|
|
2019
|
-
|
|
2020
|
-
var useInsertionEffect = React__namespace['useInsertion' + 'Effect'] ? React__namespace['useInsertion' + 'Effect'] : false;
|
|
2021
|
-
var useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback;
|
|
2022
|
-
|
|
2023
|
-
var EmotionCacheContext = /* #__PURE__ */React__namespace.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
2024
|
-
// because this module is primarily intended for the browser and node
|
|
2025
|
-
// but it's also required in react native and similar environments sometimes
|
|
2026
|
-
// and we could have a special build just for that
|
|
2027
|
-
// but this is much easier and the native packages
|
|
2028
|
-
// might use a different theme context in the future anyway
|
|
2029
|
-
typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
|
|
2030
|
-
key: 'css'
|
|
2031
|
-
}) : null);
|
|
2032
|
-
|
|
2033
|
-
EmotionCacheContext.Provider;
|
|
2034
|
-
|
|
2035
|
-
var withEmotionCache = function withEmotionCache(func) {
|
|
2036
|
-
return /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
2037
|
-
// the cache will never be null in the browser
|
|
2038
|
-
var cache = React.useContext(EmotionCacheContext);
|
|
2039
|
-
return func(props, cache, ref);
|
|
2040
|
-
});
|
|
2041
|
-
};
|
|
2042
|
-
|
|
2043
|
-
var ThemeContext = /* #__PURE__ */React__namespace.createContext({});
|
|
2044
|
-
|
|
2045
|
-
var hasOwn = {}.hasOwnProperty;
|
|
2046
|
-
|
|
2047
|
-
var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
|
|
2048
|
-
var createEmotionProps = function createEmotionProps(type, props) {
|
|
2049
|
-
|
|
2050
|
-
var newProps = {};
|
|
2051
|
-
|
|
2052
|
-
for (var _key in props) {
|
|
2053
|
-
if (hasOwn.call(props, _key)) {
|
|
2054
|
-
newProps[_key] = props[_key];
|
|
2055
|
-
}
|
|
2056
|
-
}
|
|
2057
|
-
|
|
2058
|
-
newProps[typePropName] = type; // Runtime labeling is an opt-in feature because:
|
|
2059
|
-
|
|
2060
|
-
return newProps;
|
|
2061
|
-
};
|
|
2062
|
-
|
|
2063
|
-
var Insertion$1 = function Insertion(_ref) {
|
|
2064
|
-
var cache = _ref.cache,
|
|
2065
|
-
serialized = _ref.serialized,
|
|
2066
|
-
isStringTag = _ref.isStringTag;
|
|
2067
|
-
registerStyles(cache, serialized, isStringTag);
|
|
2068
|
-
useInsertionEffectAlwaysWithSyncFallback(function () {
|
|
2069
|
-
return insertStyles(cache, serialized, isStringTag);
|
|
2070
|
-
});
|
|
2071
|
-
|
|
2072
|
-
return null;
|
|
2073
|
-
};
|
|
2074
|
-
|
|
2075
|
-
var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
|
|
2076
|
-
var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works
|
|
2077
|
-
// not passing the registered cache to serializeStyles because it would
|
|
2078
|
-
// make certain babel optimisations not possible
|
|
2079
|
-
|
|
2080
|
-
if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {
|
|
2081
|
-
cssProp = cache.registered[cssProp];
|
|
2082
|
-
}
|
|
2083
|
-
|
|
2084
|
-
var WrappedComponent = props[typePropName];
|
|
2085
|
-
var registeredStyles = [cssProp];
|
|
2086
|
-
var className = '';
|
|
2087
|
-
|
|
2088
|
-
if (typeof props.className === 'string') {
|
|
2089
|
-
className = getRegisteredStyles(cache.registered, registeredStyles, props.className);
|
|
2090
|
-
} else if (props.className != null) {
|
|
2091
|
-
className = props.className + " ";
|
|
2092
|
-
}
|
|
2093
|
-
|
|
2094
|
-
var serialized = serializeStyles(registeredStyles, undefined, React__namespace.useContext(ThemeContext));
|
|
2095
|
-
|
|
2096
|
-
className += cache.key + "-" + serialized.name;
|
|
2097
|
-
var newProps = {};
|
|
2098
|
-
|
|
2099
|
-
for (var _key2 in props) {
|
|
2100
|
-
if (hasOwn.call(props, _key2) && _key2 !== 'css' && _key2 !== typePropName && (true )) {
|
|
2101
|
-
newProps[_key2] = props[_key2];
|
|
2102
|
-
}
|
|
2103
|
-
}
|
|
2104
|
-
|
|
2105
|
-
newProps.className = className;
|
|
2106
|
-
|
|
2107
|
-
if (ref) {
|
|
2108
|
-
newProps.ref = ref;
|
|
2109
|
-
}
|
|
2110
|
-
|
|
2111
|
-
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(Insertion$1, {
|
|
2112
|
-
cache: cache,
|
|
2113
|
-
serialized: serialized,
|
|
2114
|
-
isStringTag: typeof WrappedComponent === 'string'
|
|
2115
|
-
}), /*#__PURE__*/React__namespace.createElement(WrappedComponent, newProps));
|
|
2116
|
-
});
|
|
2117
|
-
|
|
2118
|
-
var Emotion$1 = Emotion;
|
|
2119
|
-
|
|
2120
|
-
var jsx = function jsx(type, props) {
|
|
2121
|
-
// eslint-disable-next-line prefer-rest-params
|
|
2122
|
-
var args = arguments;
|
|
2123
|
-
|
|
2124
|
-
if (props == null || !hasOwn.call(props, 'css')) {
|
|
2125
|
-
return React__namespace.createElement.apply(undefined, args);
|
|
2126
|
-
}
|
|
2127
|
-
|
|
2128
|
-
var argsLength = args.length;
|
|
2129
|
-
var createElementArgArray = new Array(argsLength);
|
|
2130
|
-
createElementArgArray[0] = Emotion$1;
|
|
2131
|
-
createElementArgArray[1] = createEmotionProps(type, props);
|
|
2132
|
-
|
|
2133
|
-
for (var i = 2; i < argsLength; i++) {
|
|
2134
|
-
createElementArgArray[i] = args[i];
|
|
2135
|
-
}
|
|
2136
|
-
|
|
2137
|
-
return React__namespace.createElement.apply(null, createElementArgArray);
|
|
2138
|
-
};
|
|
2139
|
-
|
|
2140
|
-
(function (_jsx) {
|
|
2141
|
-
var JSX;
|
|
2142
|
-
|
|
2143
|
-
(function (_JSX) {})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
|
|
2144
|
-
})(jsx || (jsx = {}));
|
|
2145
|
-
|
|
2146
|
-
function css() {
|
|
2147
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2148
|
-
args[_key] = arguments[_key];
|
|
2149
|
-
}
|
|
2150
|
-
|
|
2151
|
-
return serializeStyles(args);
|
|
2152
|
-
}
|
|
2153
|
-
|
|
2154
|
-
function keyframes() {
|
|
2155
|
-
var insertable = css.apply(void 0, arguments);
|
|
2156
|
-
var name = "animation-" + insertable.name;
|
|
2157
|
-
return {
|
|
2158
|
-
name: name,
|
|
2159
|
-
styles: "@keyframes " + name + "{" + insertable.styles + "}",
|
|
2160
|
-
anim: 1,
|
|
2161
|
-
toString: function toString() {
|
|
2162
|
-
return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
|
|
2163
|
-
}
|
|
2164
|
-
};
|
|
2165
|
-
}
|
|
2166
|
-
|
|
2167
|
-
// eslint-disable-next-line no-undef
|
|
2168
|
-
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
|
|
2169
|
-
|
|
2170
|
-
var isPropValid = /* #__PURE__ */memoize$1(function (prop) {
|
|
2171
|
-
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
|
|
2172
|
-
/* o */
|
|
2173
|
-
&& prop.charCodeAt(1) === 110
|
|
2174
|
-
/* n */
|
|
2175
|
-
&& prop.charCodeAt(2) < 91;
|
|
2176
|
-
}
|
|
2177
|
-
/* Z+1 */
|
|
2178
|
-
);
|
|
2179
|
-
|
|
2180
|
-
var testOmitPropsOnStringTag = isPropValid;
|
|
2181
|
-
|
|
2182
|
-
var testOmitPropsOnComponent = function testOmitPropsOnComponent(key) {
|
|
2183
|
-
return key !== 'theme';
|
|
2184
|
-
};
|
|
2185
|
-
|
|
2186
|
-
var getDefaultShouldForwardProp = function getDefaultShouldForwardProp(tag) {
|
|
2187
|
-
return typeof tag === 'string' && // 96 is one less than the char code
|
|
2188
|
-
// for "a" so this is checking that
|
|
2189
|
-
// it's a lowercase character
|
|
2190
|
-
tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;
|
|
2191
|
-
};
|
|
2192
|
-
var composeShouldForwardProps = function composeShouldForwardProps(tag, options, isReal) {
|
|
2193
|
-
var shouldForwardProp;
|
|
2194
|
-
|
|
2195
|
-
if (options) {
|
|
2196
|
-
var optionsShouldForwardProp = options.shouldForwardProp;
|
|
2197
|
-
shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function (propName) {
|
|
2198
|
-
return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);
|
|
2199
|
-
} : optionsShouldForwardProp;
|
|
2200
|
-
}
|
|
2201
|
-
|
|
2202
|
-
if (typeof shouldForwardProp !== 'function' && isReal) {
|
|
2203
|
-
shouldForwardProp = tag.__emotion_forwardProp;
|
|
2204
|
-
}
|
|
2205
|
-
|
|
2206
|
-
return shouldForwardProp;
|
|
2207
|
-
};
|
|
2208
|
-
|
|
2209
|
-
var Insertion = function Insertion(_ref) {
|
|
2210
|
-
var cache = _ref.cache,
|
|
2211
|
-
serialized = _ref.serialized,
|
|
2212
|
-
isStringTag = _ref.isStringTag;
|
|
2213
|
-
registerStyles(cache, serialized, isStringTag);
|
|
2214
|
-
useInsertionEffectAlwaysWithSyncFallback(function () {
|
|
2215
|
-
return insertStyles(cache, serialized, isStringTag);
|
|
2216
|
-
});
|
|
2217
|
-
|
|
2218
|
-
return null;
|
|
2219
|
-
};
|
|
2220
|
-
|
|
2221
|
-
var createStyled$1 = function createStyled(tag, options) {
|
|
2222
|
-
|
|
2223
|
-
var isReal = tag.__emotion_real === tag;
|
|
2224
|
-
var baseTag = isReal && tag.__emotion_base || tag;
|
|
2225
|
-
var identifierName;
|
|
2226
|
-
var targetClassName;
|
|
2227
|
-
|
|
2228
|
-
if (options !== undefined) {
|
|
2229
|
-
identifierName = options.label;
|
|
2230
|
-
targetClassName = options.target;
|
|
2231
|
-
}
|
|
2232
|
-
|
|
2233
|
-
var shouldForwardProp = composeShouldForwardProps(tag, options, isReal);
|
|
2234
|
-
var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag);
|
|
2235
|
-
var shouldUseAs = !defaultShouldForwardProp('as');
|
|
2236
|
-
return function () {
|
|
2237
|
-
// eslint-disable-next-line prefer-rest-params
|
|
2238
|
-
var args = arguments;
|
|
2239
|
-
var styles = isReal && tag.__emotion_styles !== undefined ? tag.__emotion_styles.slice(0) : [];
|
|
2240
|
-
|
|
2241
|
-
if (identifierName !== undefined) {
|
|
2242
|
-
styles.push("label:" + identifierName + ";");
|
|
2243
|
-
}
|
|
2244
|
-
|
|
2245
|
-
if (args[0] == null || args[0].raw === undefined) {
|
|
2246
|
-
// eslint-disable-next-line prefer-spread
|
|
2247
|
-
styles.push.apply(styles, args);
|
|
2248
|
-
} else {
|
|
2249
|
-
var templateStringsArr = args[0];
|
|
2250
|
-
|
|
2251
|
-
styles.push(templateStringsArr[0]);
|
|
2252
|
-
var len = args.length;
|
|
2253
|
-
var i = 1;
|
|
2254
|
-
|
|
2255
|
-
for (; i < len; i++) {
|
|
2256
|
-
|
|
2257
|
-
styles.push(args[i], templateStringsArr[i]);
|
|
2258
|
-
}
|
|
2259
|
-
}
|
|
2260
|
-
|
|
2261
|
-
var Styled = withEmotionCache(function (props, cache, ref) {
|
|
2262
|
-
var FinalTag = shouldUseAs && props.as || baseTag;
|
|
2263
|
-
var className = '';
|
|
2264
|
-
var classInterpolations = [];
|
|
2265
|
-
var mergedProps = props;
|
|
2266
|
-
|
|
2267
|
-
if (props.theme == null) {
|
|
2268
|
-
mergedProps = {};
|
|
2269
|
-
|
|
2270
|
-
for (var key in props) {
|
|
2271
|
-
mergedProps[key] = props[key];
|
|
2272
|
-
}
|
|
2273
|
-
|
|
2274
|
-
mergedProps.theme = React__namespace.useContext(ThemeContext);
|
|
2275
|
-
}
|
|
2276
|
-
|
|
2277
|
-
if (typeof props.className === 'string') {
|
|
2278
|
-
className = getRegisteredStyles(cache.registered, classInterpolations, props.className);
|
|
2279
|
-
} else if (props.className != null) {
|
|
2280
|
-
className = props.className + " ";
|
|
2281
|
-
}
|
|
2282
|
-
|
|
2283
|
-
var serialized = serializeStyles(styles.concat(classInterpolations), cache.registered, mergedProps);
|
|
2284
|
-
className += cache.key + "-" + serialized.name;
|
|
2285
|
-
|
|
2286
|
-
if (targetClassName !== undefined) {
|
|
2287
|
-
className += " " + targetClassName;
|
|
2288
|
-
}
|
|
2289
|
-
|
|
2290
|
-
var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getDefaultShouldForwardProp(FinalTag) : defaultShouldForwardProp;
|
|
2291
|
-
var newProps = {};
|
|
2292
|
-
|
|
2293
|
-
for (var _key in props) {
|
|
2294
|
-
if (shouldUseAs && _key === 'as') continue;
|
|
2295
|
-
|
|
2296
|
-
if (finalShouldForwardProp(_key)) {
|
|
2297
|
-
newProps[_key] = props[_key];
|
|
2298
|
-
}
|
|
2299
|
-
}
|
|
2300
|
-
|
|
2301
|
-
newProps.className = className;
|
|
2302
|
-
|
|
2303
|
-
if (ref) {
|
|
2304
|
-
newProps.ref = ref;
|
|
2305
|
-
}
|
|
2306
|
-
|
|
2307
|
-
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(Insertion, {
|
|
2308
|
-
cache: cache,
|
|
2309
|
-
serialized: serialized,
|
|
2310
|
-
isStringTag: typeof FinalTag === 'string'
|
|
2311
|
-
}), /*#__PURE__*/React__namespace.createElement(FinalTag, newProps));
|
|
2312
|
-
});
|
|
2313
|
-
Styled.displayName = identifierName !== undefined ? identifierName : "Styled(" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + ")";
|
|
2314
|
-
Styled.defaultProps = tag.defaultProps;
|
|
2315
|
-
Styled.__emotion_real = Styled;
|
|
2316
|
-
Styled.__emotion_base = baseTag;
|
|
2317
|
-
Styled.__emotion_styles = styles;
|
|
2318
|
-
Styled.__emotion_forwardProp = shouldForwardProp;
|
|
2319
|
-
Object.defineProperty(Styled, 'toString', {
|
|
2320
|
-
value: function value() {
|
|
2321
|
-
|
|
2322
|
-
return "." + targetClassName;
|
|
2323
|
-
}
|
|
2324
|
-
});
|
|
222
|
+
function isAsyncMode(object) {
|
|
223
|
+
{
|
|
224
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
225
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
2325
226
|
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
}));
|
|
2330
|
-
return newStyled.apply(void 0, styles);
|
|
2331
|
-
};
|
|
227
|
+
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.');
|
|
228
|
+
}
|
|
229
|
+
}
|
|
2332
230
|
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
231
|
+
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
232
|
+
}
|
|
233
|
+
function isConcurrentMode(object) {
|
|
234
|
+
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
235
|
+
}
|
|
236
|
+
function isContextConsumer(object) {
|
|
237
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
238
|
+
}
|
|
239
|
+
function isContextProvider(object) {
|
|
240
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
241
|
+
}
|
|
242
|
+
function isElement(object) {
|
|
243
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
244
|
+
}
|
|
245
|
+
function isForwardRef(object) {
|
|
246
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
247
|
+
}
|
|
248
|
+
function isFragment(object) {
|
|
249
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
250
|
+
}
|
|
251
|
+
function isLazy(object) {
|
|
252
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
253
|
+
}
|
|
254
|
+
function isMemo(object) {
|
|
255
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
256
|
+
}
|
|
257
|
+
function isPortal(object) {
|
|
258
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
259
|
+
}
|
|
260
|
+
function isProfiler(object) {
|
|
261
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
262
|
+
}
|
|
263
|
+
function isStrictMode(object) {
|
|
264
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
265
|
+
}
|
|
266
|
+
function isSuspense(object) {
|
|
267
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
reactIs_development$1.AsyncMode = AsyncMode;
|
|
271
|
+
reactIs_development$1.ConcurrentMode = ConcurrentMode;
|
|
272
|
+
reactIs_development$1.ContextConsumer = ContextConsumer;
|
|
273
|
+
reactIs_development$1.ContextProvider = ContextProvider;
|
|
274
|
+
reactIs_development$1.Element = Element;
|
|
275
|
+
reactIs_development$1.ForwardRef = ForwardRef;
|
|
276
|
+
reactIs_development$1.Fragment = Fragment;
|
|
277
|
+
reactIs_development$1.Lazy = Lazy;
|
|
278
|
+
reactIs_development$1.Memo = Memo;
|
|
279
|
+
reactIs_development$1.Portal = Portal;
|
|
280
|
+
reactIs_development$1.Profiler = Profiler;
|
|
281
|
+
reactIs_development$1.StrictMode = StrictMode;
|
|
282
|
+
reactIs_development$1.Suspense = Suspense;
|
|
283
|
+
reactIs_development$1.isAsyncMode = isAsyncMode;
|
|
284
|
+
reactIs_development$1.isConcurrentMode = isConcurrentMode;
|
|
285
|
+
reactIs_development$1.isContextConsumer = isContextConsumer;
|
|
286
|
+
reactIs_development$1.isContextProvider = isContextProvider;
|
|
287
|
+
reactIs_development$1.isElement = isElement;
|
|
288
|
+
reactIs_development$1.isForwardRef = isForwardRef;
|
|
289
|
+
reactIs_development$1.isFragment = isFragment;
|
|
290
|
+
reactIs_development$1.isLazy = isLazy;
|
|
291
|
+
reactIs_development$1.isMemo = isMemo;
|
|
292
|
+
reactIs_development$1.isPortal = isPortal;
|
|
293
|
+
reactIs_development$1.isProfiler = isProfiler;
|
|
294
|
+
reactIs_development$1.isStrictMode = isStrictMode;
|
|
295
|
+
reactIs_development$1.isSuspense = isSuspense;
|
|
296
|
+
reactIs_development$1.isValidElementType = isValidElementType;
|
|
297
|
+
reactIs_development$1.typeOf = typeOf;
|
|
298
|
+
})();
|
|
299
|
+
}
|
|
300
|
+
return reactIs_development$1;
|
|
301
|
+
}
|
|
2336
302
|
|
|
2337
|
-
var
|
|
2338
|
-
'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
|
|
303
|
+
var hasRequiredReactIs;
|
|
2339
304
|
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
styled$2[tagName] = styled$2(tagName);
|
|
2344
|
-
});
|
|
305
|
+
function requireReactIs () {
|
|
306
|
+
if (hasRequiredReactIs) return reactIs$1.exports;
|
|
307
|
+
hasRequiredReactIs = 1;
|
|
2345
308
|
|
|
2346
|
-
|
|
309
|
+
if (process.env.NODE_ENV === 'production') {
|
|
310
|
+
reactIs$1.exports = requireReactIs_production_min();
|
|
311
|
+
} else {
|
|
312
|
+
reactIs$1.exports = requireReactIs_development$1();
|
|
313
|
+
}
|
|
314
|
+
return reactIs$1.exports;
|
|
315
|
+
}
|
|
2347
316
|
|
|
2348
317
|
/*
|
|
2349
318
|
object-assign
|
|
@@ -3296,44 +1265,96 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
3296
1265
|
var propTypesExports = propTypes.exports;
|
|
3297
1266
|
var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
|
|
3298
1267
|
|
|
1268
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
1269
|
+
|
|
1270
|
+
function chainPropTypes(propType1, propType2) {
|
|
1271
|
+
if (process.env.NODE_ENV === 'production') {
|
|
1272
|
+
return () => null;
|
|
1273
|
+
}
|
|
1274
|
+
return function validate(...args) {
|
|
1275
|
+
return propType1(...args) || propType2(...args);
|
|
1276
|
+
};
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
/* eslint no-restricted-syntax: 0, prefer-template: 0, guard-for-in: 0
|
|
1280
|
+
---
|
|
1281
|
+
These rules are preventing the performance optimizations below.
|
|
1282
|
+
*/
|
|
1283
|
+
|
|
3299
1284
|
/**
|
|
3300
|
-
*
|
|
1285
|
+
* Compose classes from multiple sources.
|
|
3301
1286
|
*
|
|
3302
|
-
* @
|
|
3303
|
-
*
|
|
3304
|
-
*
|
|
1287
|
+
* @example
|
|
1288
|
+
* ```tsx
|
|
1289
|
+
* const slots = {
|
|
1290
|
+
* root: ['root', 'primary'],
|
|
1291
|
+
* label: ['label'],
|
|
1292
|
+
* };
|
|
1293
|
+
*
|
|
1294
|
+
* const getUtilityClass = (slot) => `MuiButton-${slot}`;
|
|
1295
|
+
*
|
|
1296
|
+
* const classes = {
|
|
1297
|
+
* root: 'my-root-class',
|
|
1298
|
+
* };
|
|
1299
|
+
*
|
|
1300
|
+
* const output = composeClasses(slots, getUtilityClass, classes);
|
|
1301
|
+
* // {
|
|
1302
|
+
* // root: 'MuiButton-root MuiButton-primary my-root-class',
|
|
1303
|
+
* // label: 'MuiButton-label',
|
|
1304
|
+
* // }
|
|
1305
|
+
* ```
|
|
1306
|
+
*
|
|
1307
|
+
* @param slots a list of classes for each possible slot
|
|
1308
|
+
* @param getUtilityClass a function to resolve the class based on the slot name
|
|
1309
|
+
* @param classes the input classes from props
|
|
1310
|
+
* @returns the resolved classes for all slots
|
|
3305
1311
|
*/
|
|
3306
|
-
function
|
|
3307
|
-
const
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
1312
|
+
function composeClasses(slots, getUtilityClass, classes = undefined) {
|
|
1313
|
+
const output = {};
|
|
1314
|
+
for (const slotName in slots) {
|
|
1315
|
+
const slot = slots[slotName];
|
|
1316
|
+
let buffer = '';
|
|
1317
|
+
let start = true;
|
|
1318
|
+
for (let i = 0; i < slot.length; i += 1) {
|
|
1319
|
+
const value = slot[i];
|
|
1320
|
+
if (value) {
|
|
1321
|
+
buffer += (start === true ? '' : ' ') + getUtilityClass(value);
|
|
1322
|
+
start = false;
|
|
1323
|
+
if (classes && classes[value]) {
|
|
1324
|
+
buffer += ' ' + classes[value];
|
|
1325
|
+
}
|
|
3315
1326
|
}
|
|
3316
|
-
|
|
3317
|
-
|
|
1327
|
+
}
|
|
1328
|
+
output[slotName] = buffer;
|
|
3318
1329
|
}
|
|
3319
|
-
return
|
|
1330
|
+
return output;
|
|
3320
1331
|
}
|
|
3321
1332
|
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
1333
|
+
/**
|
|
1334
|
+
* WARNING: Don't import this directly. It's imported by the code generated by
|
|
1335
|
+
* `@mui/interal-babel-plugin-minify-errors`. Make sure to always use string literals in `Error`
|
|
1336
|
+
* constructors to ensure the plugin works as expected. Supported patterns include:
|
|
1337
|
+
* throw new Error('My message');
|
|
1338
|
+
* throw new Error(`My message: ${foo}`);
|
|
1339
|
+
* throw new Error(`My message: ${foo}` + 'another string');
|
|
1340
|
+
* ...
|
|
1341
|
+
* @param {number} code
|
|
1342
|
+
*/
|
|
1343
|
+
function formatMuiErrorMessage(code, ...args) {
|
|
1344
|
+
const url = new URL(`https://mui.com/production-error/?code=${code}`);
|
|
1345
|
+
args.forEach(arg => url.searchParams.append('args[]', arg));
|
|
1346
|
+
return `Minified MUI error #${code}; visit ${url} for the full message.`;
|
|
3329
1347
|
}
|
|
3330
1348
|
|
|
3331
|
-
//
|
|
3332
|
-
|
|
3333
|
-
//
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
1349
|
+
// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.
|
|
1350
|
+
//
|
|
1351
|
+
// A strict capitalization should uppercase the first letter of each word in the sentence.
|
|
1352
|
+
// We only handle the first word.
|
|
1353
|
+
function capitalize(string) {
|
|
1354
|
+
if (typeof string !== 'string') {
|
|
1355
|
+
throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `capitalize(string)` expects a string argument.' : formatMuiErrorMessage(7));
|
|
1356
|
+
}
|
|
1357
|
+
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
3337
1358
|
}
|
|
3338
1359
|
|
|
3339
1360
|
var reactIs = {exports: {}};
|
|
@@ -3681,93 +1702,23 @@ function deepmerge(target, source, options = {
|
|
|
3681
1702
|
output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];
|
|
3682
1703
|
} else {
|
|
3683
1704
|
output[key] = source[key];
|
|
3684
|
-
}
|
|
3685
|
-
});
|
|
3686
|
-
}
|
|
3687
|
-
return output;
|
|
3688
|
-
}
|
|
3689
|
-
|
|
3690
|
-
// Sorted ASC by size. That's important.
|
|
3691
|
-
// It can't be configured as it's used statically for propTypes.
|
|
3692
|
-
const sortBreakpointsValues = values => {
|
|
3693
|
-
const breakpointsAsArray = Object.keys(values).map(key => ({
|
|
3694
|
-
key,
|
|
3695
|
-
val: values[key]
|
|
3696
|
-
})) || [];
|
|
3697
|
-
// Sort in ascending order
|
|
3698
|
-
breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);
|
|
3699
|
-
return breakpointsAsArray.reduce((acc, obj) => {
|
|
3700
|
-
return {
|
|
3701
|
-
...acc,
|
|
3702
|
-
[obj.key]: obj.val
|
|
3703
|
-
};
|
|
3704
|
-
}, {});
|
|
3705
|
-
};
|
|
3706
|
-
|
|
3707
|
-
// Keep in mind that @media is inclusive by the CSS specification.
|
|
3708
|
-
function createBreakpoints(breakpoints) {
|
|
3709
|
-
const {
|
|
3710
|
-
// The breakpoint **start** at this value.
|
|
3711
|
-
// For instance with the first breakpoint xs: [xs, sm).
|
|
3712
|
-
values = {
|
|
3713
|
-
xs: 0,
|
|
3714
|
-
// phone
|
|
3715
|
-
sm: 600,
|
|
3716
|
-
// tablet
|
|
3717
|
-
md: 900,
|
|
3718
|
-
// small laptop
|
|
3719
|
-
lg: 1200,
|
|
3720
|
-
// desktop
|
|
3721
|
-
xl: 1536 // large screen
|
|
3722
|
-
},
|
|
3723
|
-
unit = 'px',
|
|
3724
|
-
step = 5,
|
|
3725
|
-
...other
|
|
3726
|
-
} = breakpoints;
|
|
3727
|
-
const sortedValues = sortBreakpointsValues(values);
|
|
3728
|
-
const keys = Object.keys(sortedValues);
|
|
3729
|
-
function up(key) {
|
|
3730
|
-
const value = typeof values[key] === 'number' ? values[key] : key;
|
|
3731
|
-
return `@media (min-width:${value}${unit})`;
|
|
3732
|
-
}
|
|
3733
|
-
function down(key) {
|
|
3734
|
-
const value = typeof values[key] === 'number' ? values[key] : key;
|
|
3735
|
-
return `@media (max-width:${value - step / 100}${unit})`;
|
|
3736
|
-
}
|
|
3737
|
-
function between(start, end) {
|
|
3738
|
-
const endIndex = keys.indexOf(end);
|
|
3739
|
-
return `@media (min-width:${typeof values[start] === 'number' ? values[start] : start}${unit}) and ` + `(max-width:${(endIndex !== -1 && typeof values[keys[endIndex]] === 'number' ? values[keys[endIndex]] : end) - step / 100}${unit})`;
|
|
3740
|
-
}
|
|
3741
|
-
function only(key) {
|
|
3742
|
-
if (keys.indexOf(key) + 1 < keys.length) {
|
|
3743
|
-
return between(key, keys[keys.indexOf(key) + 1]);
|
|
3744
|
-
}
|
|
3745
|
-
return up(key);
|
|
1705
|
+
}
|
|
1706
|
+
});
|
|
3746
1707
|
}
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
if (keyIndex === keys.length - 1) {
|
|
3754
|
-
return down(keys[keyIndex]);
|
|
3755
|
-
}
|
|
3756
|
-
return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');
|
|
1708
|
+
return output;
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
function merge(acc, item) {
|
|
1712
|
+
if (!item) {
|
|
1713
|
+
return acc;
|
|
3757
1714
|
}
|
|
3758
|
-
return {
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
up,
|
|
3762
|
-
down,
|
|
3763
|
-
between,
|
|
3764
|
-
only,
|
|
3765
|
-
not,
|
|
3766
|
-
unit,
|
|
3767
|
-
...other
|
|
3768
|
-
};
|
|
1715
|
+
return deepmerge(acc, item, {
|
|
1716
|
+
clone: false // No need to clone deep, it's way faster.
|
|
1717
|
+
});
|
|
3769
1718
|
}
|
|
3770
1719
|
|
|
1720
|
+
const responsivePropType = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object, PropTypes.array]) : {};
|
|
1721
|
+
|
|
3771
1722
|
/**
|
|
3772
1723
|
* For using in `sx` prop to sort the breakpoint from low to high.
|
|
3773
1724
|
* Note: this function does not work and will not support multiple units.
|
|
@@ -3837,21 +1788,6 @@ function cssContainerQueries(themeInput) {
|
|
|
3837
1788
|
};
|
|
3838
1789
|
}
|
|
3839
1790
|
|
|
3840
|
-
const shape = {
|
|
3841
|
-
borderRadius: 4
|
|
3842
|
-
};
|
|
3843
|
-
|
|
3844
|
-
const responsivePropType = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object, PropTypes.array]) : {};
|
|
3845
|
-
|
|
3846
|
-
function merge(acc, item) {
|
|
3847
|
-
if (!item) {
|
|
3848
|
-
return acc;
|
|
3849
|
-
}
|
|
3850
|
-
return deepmerge(acc, item, {
|
|
3851
|
-
clone: false // No need to clone deep, it's way faster.
|
|
3852
|
-
});
|
|
3853
|
-
}
|
|
3854
|
-
|
|
3855
1791
|
// The breakpoint **start** at this value.
|
|
3856
1792
|
// For instance with the first breakpoint xs: [xs, sm[.
|
|
3857
1793
|
const values = {
|
|
@@ -3933,17 +1869,6 @@ function removeUnusedBreakpoints(breakpointKeys, style) {
|
|
|
3933
1869
|
}, style);
|
|
3934
1870
|
}
|
|
3935
1871
|
|
|
3936
|
-
// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.
|
|
3937
|
-
//
|
|
3938
|
-
// A strict capitalization should uppercase the first letter of each word in the sentence.
|
|
3939
|
-
// We only handle the first word.
|
|
3940
|
-
function capitalize(string) {
|
|
3941
|
-
if (typeof string !== 'string') {
|
|
3942
|
-
throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `capitalize(string)` expects a string argument.' : formatMuiErrorMessage(7));
|
|
3943
|
-
}
|
|
3944
|
-
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
3945
|
-
}
|
|
3946
|
-
|
|
3947
1872
|
function getPath(obj, path, checkVars = true) {
|
|
3948
1873
|
if (!path || typeof path !== 'string') {
|
|
3949
1874
|
return null;
|
|
@@ -4174,36 +2099,6 @@ process.env.NODE_ENV !== 'production' ? spacingKeys.reduce((obj, key) => {
|
|
|
4174
2099
|
return obj;
|
|
4175
2100
|
}, {}) : {};
|
|
4176
2101
|
|
|
4177
|
-
// The different signatures imply different meaning for their arguments that can't be expressed structurally.
|
|
4178
|
-
// We express the difference with variable names.
|
|
4179
|
-
|
|
4180
|
-
function createSpacing(spacingInput = 8,
|
|
4181
|
-
// Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.
|
|
4182
|
-
// Smaller components, such as icons, can align to a 4dp grid.
|
|
4183
|
-
// https://m2.material.io/design/layout/understanding-layout.html
|
|
4184
|
-
transform = createUnarySpacing({
|
|
4185
|
-
spacing: spacingInput
|
|
4186
|
-
})) {
|
|
4187
|
-
// Already transformed.
|
|
4188
|
-
if (spacingInput.mui) {
|
|
4189
|
-
return spacingInput;
|
|
4190
|
-
}
|
|
4191
|
-
const spacing = (...argsInput) => {
|
|
4192
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
4193
|
-
if (!(argsInput.length <= 4)) {
|
|
4194
|
-
console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);
|
|
4195
|
-
}
|
|
4196
|
-
}
|
|
4197
|
-
const args = argsInput.length === 0 ? [1] : argsInput;
|
|
4198
|
-
return args.map(argument => {
|
|
4199
|
-
const output = transform(argument);
|
|
4200
|
-
return typeof output === 'number' ? `${output}px` : output;
|
|
4201
|
-
}).join(' ');
|
|
4202
|
-
};
|
|
4203
|
-
spacing.mui = true;
|
|
4204
|
-
return spacing;
|
|
4205
|
-
}
|
|
4206
|
-
|
|
4207
2102
|
function compose(...styles) {
|
|
4208
2103
|
const handlers = styles.reduce((acc, style) => {
|
|
4209
2104
|
style.filterProps.forEach(prop => {
|
|
@@ -4781,76 +2676,231 @@ function unstable_createStyleFunctionSx() {
|
|
|
4781
2676
|
};
|
|
4782
2677
|
return handleBreakpoints(props, val, styleFromPropValue);
|
|
4783
2678
|
}
|
|
4784
|
-
function styleFunctionSx(props) {
|
|
4785
|
-
const {
|
|
4786
|
-
sx,
|
|
4787
|
-
theme = {},
|
|
4788
|
-
nested
|
|
4789
|
-
} = props || {};
|
|
4790
|
-
if (!sx) {
|
|
4791
|
-
return null; // Emotion & styled-components will neglect null
|
|
2679
|
+
function styleFunctionSx(props) {
|
|
2680
|
+
const {
|
|
2681
|
+
sx,
|
|
2682
|
+
theme = {},
|
|
2683
|
+
nested
|
|
2684
|
+
} = props || {};
|
|
2685
|
+
if (!sx) {
|
|
2686
|
+
return null; // Emotion & styled-components will neglect null
|
|
2687
|
+
}
|
|
2688
|
+
const config = theme.unstable_sxConfig ?? defaultSxConfig;
|
|
2689
|
+
|
|
2690
|
+
/*
|
|
2691
|
+
* Receive `sxInput` as object or callback
|
|
2692
|
+
* and then recursively check keys & values to create media query object styles.
|
|
2693
|
+
* (the result will be used in `styled`)
|
|
2694
|
+
*/
|
|
2695
|
+
function traverse(sxInput) {
|
|
2696
|
+
let sxObject = sxInput;
|
|
2697
|
+
if (typeof sxInput === 'function') {
|
|
2698
|
+
sxObject = sxInput(theme);
|
|
2699
|
+
} else if (typeof sxInput !== 'object') {
|
|
2700
|
+
// value
|
|
2701
|
+
return sxInput;
|
|
2702
|
+
}
|
|
2703
|
+
if (!sxObject) {
|
|
2704
|
+
return null;
|
|
2705
|
+
}
|
|
2706
|
+
const emptyBreakpoints = createEmptyBreakpointObject(theme.breakpoints);
|
|
2707
|
+
const breakpointsKeys = Object.keys(emptyBreakpoints);
|
|
2708
|
+
let css = emptyBreakpoints;
|
|
2709
|
+
Object.keys(sxObject).forEach(styleKey => {
|
|
2710
|
+
const value = callIfFn(sxObject[styleKey], theme);
|
|
2711
|
+
if (value !== null && value !== undefined) {
|
|
2712
|
+
if (typeof value === 'object') {
|
|
2713
|
+
if (config[styleKey]) {
|
|
2714
|
+
css = merge(css, getThemeValue(styleKey, value, theme, config));
|
|
2715
|
+
} else {
|
|
2716
|
+
const breakpointsValues = handleBreakpoints({
|
|
2717
|
+
theme
|
|
2718
|
+
}, value, x => ({
|
|
2719
|
+
[styleKey]: x
|
|
2720
|
+
}));
|
|
2721
|
+
if (objectsHaveSameKeys(breakpointsValues, value)) {
|
|
2722
|
+
css[styleKey] = styleFunctionSx({
|
|
2723
|
+
sx: value,
|
|
2724
|
+
theme,
|
|
2725
|
+
nested: true
|
|
2726
|
+
});
|
|
2727
|
+
} else {
|
|
2728
|
+
css = merge(css, breakpointsValues);
|
|
2729
|
+
}
|
|
2730
|
+
}
|
|
2731
|
+
} else {
|
|
2732
|
+
css = merge(css, getThemeValue(styleKey, value, theme, config));
|
|
2733
|
+
}
|
|
2734
|
+
}
|
|
2735
|
+
});
|
|
2736
|
+
if (!nested && theme.modularCssLayers) {
|
|
2737
|
+
return {
|
|
2738
|
+
'@layer sx': sortContainerQueries(theme, removeUnusedBreakpoints(breakpointsKeys, css))
|
|
2739
|
+
};
|
|
2740
|
+
}
|
|
2741
|
+
return sortContainerQueries(theme, removeUnusedBreakpoints(breakpointsKeys, css));
|
|
2742
|
+
}
|
|
2743
|
+
return Array.isArray(sx) ? sx.map(traverse) : traverse(sx);
|
|
2744
|
+
}
|
|
2745
|
+
return styleFunctionSx;
|
|
2746
|
+
}
|
|
2747
|
+
const styleFunctionSx = unstable_createStyleFunctionSx();
|
|
2748
|
+
styleFunctionSx.filterProps = ['sx'];
|
|
2749
|
+
|
|
2750
|
+
/**
|
|
2751
|
+
* @mui/styled-engine v7.2.0
|
|
2752
|
+
*
|
|
2753
|
+
* @license MIT
|
|
2754
|
+
* This source code is licensed under the MIT license found in the
|
|
2755
|
+
* LICENSE file in the root directory of this source tree.
|
|
2756
|
+
*/
|
|
2757
|
+
function styled$1(tag, options) {
|
|
2758
|
+
const stylesFactory = emStyled(tag, options);
|
|
2759
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2760
|
+
return (...styles) => {
|
|
2761
|
+
const component = typeof tag === 'string' ? `"${tag}"` : 'component';
|
|
2762
|
+
if (styles.length === 0) {
|
|
2763
|
+
console.error([`MUI: Seems like you called \`styled(${component})()\` without a \`style\` argument.`, 'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join('\n'));
|
|
2764
|
+
} else if (styles.some(style => style === undefined)) {
|
|
2765
|
+
console.error(`MUI: the styled(${component})(...args) API requires all its args to be defined.`);
|
|
2766
|
+
}
|
|
2767
|
+
return stylesFactory(...styles);
|
|
2768
|
+
};
|
|
2769
|
+
}
|
|
2770
|
+
return stylesFactory;
|
|
2771
|
+
}
|
|
2772
|
+
|
|
2773
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2774
|
+
function internal_mutateStyles(tag, processor) {
|
|
2775
|
+
// Emotion attaches all the styles as `__emotion_styles`.
|
|
2776
|
+
// Ref: https://github.com/emotion-js/emotion/blob/16d971d0da229596d6bcc39d282ba9753c9ee7cf/packages/styled/src/base.js#L186
|
|
2777
|
+
if (Array.isArray(tag.__emotion_styles)) {
|
|
2778
|
+
tag.__emotion_styles = processor(tag.__emotion_styles);
|
|
2779
|
+
}
|
|
2780
|
+
}
|
|
2781
|
+
|
|
2782
|
+
// Emotion only accepts an array, but we want to avoid allocations
|
|
2783
|
+
const wrapper = [];
|
|
2784
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2785
|
+
function internal_serializeStyles(styles) {
|
|
2786
|
+
wrapper[0] = styles;
|
|
2787
|
+
return serialize.serializeStyles(wrapper);
|
|
2788
|
+
}
|
|
2789
|
+
|
|
2790
|
+
// Sorted ASC by size. That's important.
|
|
2791
|
+
// It can't be configured as it's used statically for propTypes.
|
|
2792
|
+
const sortBreakpointsValues = values => {
|
|
2793
|
+
const breakpointsAsArray = Object.keys(values).map(key => ({
|
|
2794
|
+
key,
|
|
2795
|
+
val: values[key]
|
|
2796
|
+
})) || [];
|
|
2797
|
+
// Sort in ascending order
|
|
2798
|
+
breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);
|
|
2799
|
+
return breakpointsAsArray.reduce((acc, obj) => {
|
|
2800
|
+
return {
|
|
2801
|
+
...acc,
|
|
2802
|
+
[obj.key]: obj.val
|
|
2803
|
+
};
|
|
2804
|
+
}, {});
|
|
2805
|
+
};
|
|
2806
|
+
|
|
2807
|
+
// Keep in mind that @media is inclusive by the CSS specification.
|
|
2808
|
+
function createBreakpoints(breakpoints) {
|
|
2809
|
+
const {
|
|
2810
|
+
// The breakpoint **start** at this value.
|
|
2811
|
+
// For instance with the first breakpoint xs: [xs, sm).
|
|
2812
|
+
values = {
|
|
2813
|
+
xs: 0,
|
|
2814
|
+
// phone
|
|
2815
|
+
sm: 600,
|
|
2816
|
+
// tablet
|
|
2817
|
+
md: 900,
|
|
2818
|
+
// small laptop
|
|
2819
|
+
lg: 1200,
|
|
2820
|
+
// desktop
|
|
2821
|
+
xl: 1536 // large screen
|
|
2822
|
+
},
|
|
2823
|
+
unit = 'px',
|
|
2824
|
+
step = 5,
|
|
2825
|
+
...other
|
|
2826
|
+
} = breakpoints;
|
|
2827
|
+
const sortedValues = sortBreakpointsValues(values);
|
|
2828
|
+
const keys = Object.keys(sortedValues);
|
|
2829
|
+
function up(key) {
|
|
2830
|
+
const value = typeof values[key] === 'number' ? values[key] : key;
|
|
2831
|
+
return `@media (min-width:${value}${unit})`;
|
|
2832
|
+
}
|
|
2833
|
+
function down(key) {
|
|
2834
|
+
const value = typeof values[key] === 'number' ? values[key] : key;
|
|
2835
|
+
return `@media (max-width:${value - step / 100}${unit})`;
|
|
2836
|
+
}
|
|
2837
|
+
function between(start, end) {
|
|
2838
|
+
const endIndex = keys.indexOf(end);
|
|
2839
|
+
return `@media (min-width:${typeof values[start] === 'number' ? values[start] : start}${unit}) and ` + `(max-width:${(endIndex !== -1 && typeof values[keys[endIndex]] === 'number' ? values[keys[endIndex]] : end) - step / 100}${unit})`;
|
|
2840
|
+
}
|
|
2841
|
+
function only(key) {
|
|
2842
|
+
if (keys.indexOf(key) + 1 < keys.length) {
|
|
2843
|
+
return between(key, keys[keys.indexOf(key) + 1]);
|
|
2844
|
+
}
|
|
2845
|
+
return up(key);
|
|
2846
|
+
}
|
|
2847
|
+
function not(key) {
|
|
2848
|
+
// handle first and last key separately, for better readability
|
|
2849
|
+
const keyIndex = keys.indexOf(key);
|
|
2850
|
+
if (keyIndex === 0) {
|
|
2851
|
+
return up(keys[1]);
|
|
4792
2852
|
}
|
|
4793
|
-
|
|
2853
|
+
if (keyIndex === keys.length - 1) {
|
|
2854
|
+
return down(keys[keyIndex]);
|
|
2855
|
+
}
|
|
2856
|
+
return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');
|
|
2857
|
+
}
|
|
2858
|
+
return {
|
|
2859
|
+
keys,
|
|
2860
|
+
values: sortedValues,
|
|
2861
|
+
up,
|
|
2862
|
+
down,
|
|
2863
|
+
between,
|
|
2864
|
+
only,
|
|
2865
|
+
not,
|
|
2866
|
+
unit,
|
|
2867
|
+
...other
|
|
2868
|
+
};
|
|
2869
|
+
}
|
|
4794
2870
|
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
if (typeof value === 'object') {
|
|
4818
|
-
if (config[styleKey]) {
|
|
4819
|
-
css = merge(css, getThemeValue(styleKey, value, theme, config));
|
|
4820
|
-
} else {
|
|
4821
|
-
const breakpointsValues = handleBreakpoints({
|
|
4822
|
-
theme
|
|
4823
|
-
}, value, x => ({
|
|
4824
|
-
[styleKey]: x
|
|
4825
|
-
}));
|
|
4826
|
-
if (objectsHaveSameKeys(breakpointsValues, value)) {
|
|
4827
|
-
css[styleKey] = styleFunctionSx({
|
|
4828
|
-
sx: value,
|
|
4829
|
-
theme,
|
|
4830
|
-
nested: true
|
|
4831
|
-
});
|
|
4832
|
-
} else {
|
|
4833
|
-
css = merge(css, breakpointsValues);
|
|
4834
|
-
}
|
|
4835
|
-
}
|
|
4836
|
-
} else {
|
|
4837
|
-
css = merge(css, getThemeValue(styleKey, value, theme, config));
|
|
4838
|
-
}
|
|
4839
|
-
}
|
|
4840
|
-
});
|
|
4841
|
-
if (!nested && theme.modularCssLayers) {
|
|
4842
|
-
return {
|
|
4843
|
-
'@layer sx': sortContainerQueries(theme, removeUnusedBreakpoints(breakpointsKeys, css))
|
|
4844
|
-
};
|
|
2871
|
+
const shape = {
|
|
2872
|
+
borderRadius: 4
|
|
2873
|
+
};
|
|
2874
|
+
|
|
2875
|
+
// The different signatures imply different meaning for their arguments that can't be expressed structurally.
|
|
2876
|
+
// We express the difference with variable names.
|
|
2877
|
+
|
|
2878
|
+
function createSpacing(spacingInput = 8,
|
|
2879
|
+
// Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.
|
|
2880
|
+
// Smaller components, such as icons, can align to a 4dp grid.
|
|
2881
|
+
// https://m2.material.io/design/layout/understanding-layout.html
|
|
2882
|
+
transform = createUnarySpacing({
|
|
2883
|
+
spacing: spacingInput
|
|
2884
|
+
})) {
|
|
2885
|
+
// Already transformed.
|
|
2886
|
+
if (spacingInput.mui) {
|
|
2887
|
+
return spacingInput;
|
|
2888
|
+
}
|
|
2889
|
+
const spacing = (...argsInput) => {
|
|
2890
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2891
|
+
if (!(argsInput.length <= 4)) {
|
|
2892
|
+
console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);
|
|
4845
2893
|
}
|
|
4846
|
-
return sortContainerQueries(theme, removeUnusedBreakpoints(breakpointsKeys, css));
|
|
4847
2894
|
}
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
2895
|
+
const args = argsInput.length === 0 ? [1] : argsInput;
|
|
2896
|
+
return args.map(argument => {
|
|
2897
|
+
const output = transform(argument);
|
|
2898
|
+
return typeof output === 'number' ? `${output}px` : output;
|
|
2899
|
+
}).join(' ');
|
|
2900
|
+
};
|
|
2901
|
+
spacing.mui = true;
|
|
2902
|
+
return spacing;
|
|
4851
2903
|
}
|
|
4852
|
-
const styleFunctionSx = unstable_createStyleFunctionSx();
|
|
4853
|
-
styleFunctionSx.filterProps = ['sx'];
|
|
4854
2904
|
|
|
4855
2905
|
/**
|
|
4856
2906
|
* A universal utility to style components with multiple color modes. Always use it from the theme object.
|
|
@@ -4998,8 +3048,6 @@ const createClassNameGenerator = () => {
|
|
|
4998
3048
|
};
|
|
4999
3049
|
const ClassNameGenerator = createClassNameGenerator();
|
|
5000
3050
|
|
|
5001
|
-
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
5002
|
-
|
|
5003
3051
|
const globalStateClasses = {
|
|
5004
3052
|
active: 'active',
|
|
5005
3053
|
checked: 'checked',
|
|
@@ -6132,59 +4180,71 @@ function createGetColorSchemeSelector(selector) {
|
|
|
6132
4180
|
};
|
|
6133
4181
|
}
|
|
6134
4182
|
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
4183
|
+
const common = {
|
|
4184
|
+
black: '#000',
|
|
4185
|
+
white: '#fff'
|
|
4186
|
+
};
|
|
6139
4187
|
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
4188
|
+
const grey = {
|
|
4189
|
+
50: '#fafafa',
|
|
4190
|
+
100: '#f5f5f5',
|
|
4191
|
+
200: '#eeeeee',
|
|
4192
|
+
300: '#e0e0e0',
|
|
4193
|
+
400: '#bdbdbd',
|
|
4194
|
+
500: '#9e9e9e',
|
|
4195
|
+
600: '#757575',
|
|
4196
|
+
700: '#616161',
|
|
4197
|
+
800: '#424242',
|
|
4198
|
+
900: '#212121',
|
|
4199
|
+
A100: '#f5f5f5',
|
|
4200
|
+
A200: '#eeeeee',
|
|
4201
|
+
A400: '#bdbdbd',
|
|
4202
|
+
A700: '#616161'
|
|
4203
|
+
};
|
|
4204
|
+
|
|
4205
|
+
const purple = {
|
|
4206
|
+
50: '#f3e5f5',
|
|
4207
|
+
200: '#ce93d8',
|
|
4208
|
+
300: '#ba68c8',
|
|
4209
|
+
400: '#ab47bc',
|
|
4210
|
+
500: '#9c27b0',
|
|
4211
|
+
700: '#7b1fa2'};
|
|
4212
|
+
|
|
4213
|
+
const red = {
|
|
4214
|
+
300: '#e57373',
|
|
4215
|
+
400: '#ef5350',
|
|
4216
|
+
500: '#f44336',
|
|
4217
|
+
700: '#d32f2f',
|
|
4218
|
+
800: '#c62828'};
|
|
4219
|
+
|
|
4220
|
+
const orange = {
|
|
4221
|
+
300: '#ffb74d',
|
|
4222
|
+
400: '#ffa726',
|
|
4223
|
+
500: '#ff9800',
|
|
4224
|
+
700: '#f57c00',
|
|
4225
|
+
900: '#e65100'};
|
|
4226
|
+
|
|
4227
|
+
const blue = {
|
|
4228
|
+
50: '#e3f2fd',
|
|
4229
|
+
200: '#90caf9',
|
|
4230
|
+
400: '#42a5f5',
|
|
4231
|
+
700: '#1976d2',
|
|
4232
|
+
800: '#1565c0'};
|
|
4233
|
+
|
|
4234
|
+
const lightBlue = {
|
|
4235
|
+
300: '#4fc3f7',
|
|
4236
|
+
400: '#29b6f6',
|
|
4237
|
+
500: '#03a9f4',
|
|
4238
|
+
700: '#0288d1',
|
|
4239
|
+
900: '#01579b'};
|
|
4240
|
+
|
|
4241
|
+
const green = {
|
|
4242
|
+
300: '#81c784',
|
|
4243
|
+
400: '#66bb6a',
|
|
4244
|
+
500: '#4caf50',
|
|
4245
|
+
700: '#388e3c',
|
|
4246
|
+
800: '#2e7d32',
|
|
4247
|
+
900: '#1b5e20'};
|
|
6188
4248
|
|
|
6189
4249
|
function getLight() {
|
|
6190
4250
|
return {
|
|
@@ -7440,6 +5500,8 @@ function createTheme(options = {},
|
|
|
7440
5500
|
|
|
7441
5501
|
const defaultTheme = createTheme();
|
|
7442
5502
|
|
|
5503
|
+
var THEME_ID = '$$material';
|
|
5504
|
+
|
|
7443
5505
|
// copied from @mui/system/createStyled
|
|
7444
5506
|
function slotShouldForwardProp(prop) {
|
|
7445
5507
|
return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';
|
|
@@ -7473,15 +5535,6 @@ function useDefaultProps(params) {
|
|
|
7473
5535
|
return useDefaultProps$1(params);
|
|
7474
5536
|
}
|
|
7475
5537
|
|
|
7476
|
-
function chainPropTypes(propType1, propType2) {
|
|
7477
|
-
if (process.env.NODE_ENV === 'production') {
|
|
7478
|
-
return () => null;
|
|
7479
|
-
}
|
|
7480
|
-
return function validate(...args) {
|
|
7481
|
-
return propType1(...args) || propType2(...args);
|
|
7482
|
-
};
|
|
7483
|
-
}
|
|
7484
|
-
|
|
7485
5538
|
/**
|
|
7486
5539
|
* Type guard to check if the object has a "main" property of type string.
|
|
7487
5540
|
*
|
|
@@ -7530,7 +5583,7 @@ function getCircularProgressUtilityClass(slot) {
|
|
|
7530
5583
|
generateUtilityClasses('MuiCircularProgress', ['root', 'determinate', 'indeterminate', 'colorPrimary', 'colorSecondary', 'svg', 'circle', 'circleDeterminate', 'circleIndeterminate', 'circleDisableShrink']);
|
|
7531
5584
|
|
|
7532
5585
|
const SIZE = 44;
|
|
7533
|
-
const circularRotateKeyframe = keyframes`
|
|
5586
|
+
const circularRotateKeyframe = react.keyframes`
|
|
7534
5587
|
0% {
|
|
7535
5588
|
transform: rotate(0deg);
|
|
7536
5589
|
}
|
|
@@ -7539,7 +5592,7 @@ const circularRotateKeyframe = keyframes`
|
|
|
7539
5592
|
transform: rotate(360deg);
|
|
7540
5593
|
}
|
|
7541
5594
|
`;
|
|
7542
|
-
const circularDashKeyframe = keyframes`
|
|
5595
|
+
const circularDashKeyframe = react.keyframes`
|
|
7543
5596
|
0% {
|
|
7544
5597
|
stroke-dasharray: 1px, 200px;
|
|
7545
5598
|
stroke-dashoffset: 0;
|
|
@@ -7559,10 +5612,10 @@ const circularDashKeyframe = keyframes`
|
|
|
7559
5612
|
// This implementation is for supporting both Styled-components v4+ and Pigment CSS.
|
|
7560
5613
|
// A global animation has to be created here for Styled-components v4+ (https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#12).
|
|
7561
5614
|
// which can be done by checking typeof indeterminate1Keyframe !== 'string' (at runtime, Pigment CSS transform keyframes`` to a string).
|
|
7562
|
-
const rotateAnimation = typeof circularRotateKeyframe !== 'string' ? css`
|
|
5615
|
+
const rotateAnimation = typeof circularRotateKeyframe !== 'string' ? react.css`
|
|
7563
5616
|
animation: ${circularRotateKeyframe} 1.4s linear infinite;
|
|
7564
5617
|
` : null;
|
|
7565
|
-
const dashAnimation = typeof circularDashKeyframe !== 'string' ? css`
|
|
5618
|
+
const dashAnimation = typeof circularDashKeyframe !== 'string' ? react.css`
|
|
7566
5619
|
animation: ${circularDashKeyframe} 1.4s ease-in-out infinite;
|
|
7567
5620
|
` : null;
|
|
7568
5621
|
const useUtilityClasses = ownerState => {
|
|
@@ -7806,14 +5859,28 @@ var Loading = function () {
|
|
|
7806
5859
|
|
|
7807
5860
|
var Plot$2 = React.lazy(function () { return import('react-plotly.js'); });
|
|
7808
5861
|
var HistogramPlot = function (props) {
|
|
7809
|
-
var _a;
|
|
7810
|
-
var data = props.data, title = props.title, xAxisTitle = props.xAxisTitle,
|
|
5862
|
+
var _a, _b;
|
|
5863
|
+
var data = props.data, title = props.title, xAxisTitle = props.xAxisTitle, _c = props.barColor, barColor = _c === void 0 ? 'rgb(72, 72, 74)' : _c, _d = props.unselectedBarColor, unselectedBarColor = _d === void 0 ? 'rgba(203, 195, 195, 0.88)' : _d, _e = props.selectorsColor, selectorsColor = _e === void 0 ? 'black' : _e, _f = props.showMeanLine, showMeanLine = _f === void 0 ? true : _f, _g = props.showAllDataMeanLine, showAllDataMeanLine = _g === void 0 ? true : _g, containerStyleOverrides = props.containerStyleOverrides, _h = props.unselectedData, unselectedData = _h === void 0 ? [] : _h, _j = props.handleClickOrSelection, handleClickOrSelection = _j === void 0 ? function () { } : _j, _k = props.onDeselect, onDeselect = _k === void 0 ? function () { } : _k, plotId = props.plotId;
|
|
7811
5864
|
// Ref for plot container
|
|
7812
5865
|
var containerRef = React.useRef(null);
|
|
7813
5866
|
// Track any selections made in this plot so we can style the selection box.
|
|
7814
|
-
var
|
|
5867
|
+
var _l = React.useState(null), selectedRange = _l[0], setSelectedRange = _l[1];
|
|
7815
5868
|
// Set the bins based on the entire data set.
|
|
7816
5869
|
var nBins = Math.ceil(Math.sqrt(data.length + unselectedData.length));
|
|
5870
|
+
// Plotly determines "nice" bins which consequently means it internally decides the axis range. We need
|
|
5871
|
+
// to access that information once the plot has been initialized so that we can prevent the
|
|
5872
|
+
// axis range from changing during interaction. Dates use strings.
|
|
5873
|
+
var _m = React.useState(undefined), fixedXAxisRange = _m[0], setFixedXAxisRange = _m[1];
|
|
5874
|
+
// figure should be Readonly<Plotly.Figure> but react-plotly.js doesn't expose that type, so we use any.
|
|
5875
|
+
var handlePlotInitialized = function (figure, graphDiv) {
|
|
5876
|
+
var _a, _b;
|
|
5877
|
+
if (((_b = (_a = figure.layout) === null || _a === void 0 ? void 0 : _a.xaxis) === null || _b === void 0 ? void 0 : _b.range) && !fixedXAxisRange) {
|
|
5878
|
+
var computedRange = typeof (figure.layout.xaxis.range[0]) === 'string'
|
|
5879
|
+
? [new Date(figure.layout.xaxis.range[0]), new Date(figure.layout.xaxis.range[1])]
|
|
5880
|
+
: [figure.layout.xaxis.range[0], figure.layout.xaxis.range[1]];
|
|
5881
|
+
setFixedXAxisRange(computedRange);
|
|
5882
|
+
}
|
|
5883
|
+
};
|
|
7817
5884
|
// Create handler for click event that can use event data to update the plot if desired.
|
|
7818
5885
|
var handleClick = function (event) {
|
|
7819
5886
|
if (!event || !event.points || event.points.length === 0) {
|
|
@@ -7948,34 +6015,36 @@ var HistogramPlot = function (props) {
|
|
|
7948
6015
|
},
|
|
7949
6016
|
unselectedTrace,
|
|
7950
6017
|
];
|
|
7951
|
-
// Calculate the mean using normalized data
|
|
6018
|
+
// Calculate the mean of the selected data using normalized data
|
|
7952
6019
|
var meanValue = (_a = calculateMean(data)) !== null && _a !== void 0 ? _a : 0; // Default to 0 if no data
|
|
7953
|
-
// Calculate fixed x-axis range based on all data (selected + unselected) to prevent axis jumping
|
|
7954
|
-
var allData = __spreadArray(__spreadArray([], data, true), unselectedData, true);
|
|
7955
|
-
var dataMin = allData.length > 0 ? Math.min.apply(Math, (isDateArray(allData) ? allData.map(function (d) { return d.getTime(); }) : allData)) : 0;
|
|
7956
|
-
var dataMax = allData.length > 0 ? Math.max.apply(Math, (isDateArray(allData) ? allData.map(function (d) { return d.getTime(); }) : allData)) : 0;
|
|
7957
|
-
// Add some padding to the range so the plot isn't so squished
|
|
7958
|
-
var range = dataMax - dataMin;
|
|
7959
|
-
var padding = range * 0.02;
|
|
7960
|
-
var fixedXAxisRange = [
|
|
7961
|
-
isDateArray(allData) ? new Date(dataMin - padding) : dataMin - padding,
|
|
7962
|
-
isDateArray(allData) ? new Date(dataMax + padding) : dataMax + padding
|
|
7963
|
-
];
|
|
7964
6020
|
var meanLineRadius = 0.01; // distance from the top of the y axis to the top/bottom end of the mean line
|
|
7965
|
-
var meanLine = showMeanLine ? {
|
|
7966
|
-
|
|
7967
|
-
|
|
7968
|
-
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
|
|
7975
|
-
|
|
7976
|
-
|
|
7977
|
-
// Draw
|
|
7978
|
-
var
|
|
6021
|
+
var meanLine = showMeanLine ? [{
|
|
6022
|
+
type: 'line',
|
|
6023
|
+
x0: meanValue,
|
|
6024
|
+
y0: 1 - meanLineRadius,
|
|
6025
|
+
x1: meanValue,
|
|
6026
|
+
yref: 'paper',
|
|
6027
|
+
y1: 1 + meanLineRadius + 0.04, // Add extra length above to make the line look centered on the y-axis top.
|
|
6028
|
+
line: {
|
|
6029
|
+
color: barColor,
|
|
6030
|
+
width: 1.5,
|
|
6031
|
+
}
|
|
6032
|
+
}] : [];
|
|
6033
|
+
// Draw mean line for all data
|
|
6034
|
+
var allData = tslib.__spreadArray(tslib.__spreadArray([], data, true), unselectedData, true);
|
|
6035
|
+
var allDataMeanValue = (_b = calculateMean(allData)) !== null && _b !== void 0 ? _b : 0;
|
|
6036
|
+
var allDataMeanLine = (showAllDataMeanLine && unselectedData.length > 0) ? [{
|
|
6037
|
+
type: 'line',
|
|
6038
|
+
x0: allDataMeanValue,
|
|
6039
|
+
y0: 1 - meanLineRadius,
|
|
6040
|
+
x1: allDataMeanValue,
|
|
6041
|
+
yref: 'paper',
|
|
6042
|
+
y1: 1 + meanLineRadius + 0.04, // Add extra length above to make the line look centered on the y-axis top.
|
|
6043
|
+
line: {
|
|
6044
|
+
color: unselectedBarColor,
|
|
6045
|
+
width: 1.5,
|
|
6046
|
+
}
|
|
6047
|
+
}] : [];
|
|
7979
6048
|
var layout = {
|
|
7980
6049
|
title: {
|
|
7981
6050
|
text: title,
|
|
@@ -7987,7 +6056,7 @@ var HistogramPlot = function (props) {
|
|
|
7987
6056
|
height: undefined, // Let autosize handle height
|
|
7988
6057
|
margin: {
|
|
7989
6058
|
l: 50,
|
|
7990
|
-
r:
|
|
6059
|
+
r: 35, // Balance between ensuring the mean annotation doesn't get cut off and having too much margin.
|
|
7991
6060
|
t: title ? 80 : 30,
|
|
7992
6061
|
b: 50,
|
|
7993
6062
|
pad: 4
|
|
@@ -8032,19 +6101,18 @@ var HistogramPlot = function (props) {
|
|
|
8032
6101
|
bargap: 0.03, // Gap between bars
|
|
8033
6102
|
dragmode: 'select', // Enable drag to select
|
|
8034
6103
|
selectdirection: 'h', // User can select in horizontal direction only
|
|
8035
|
-
shapes: __spreadArray([
|
|
6104
|
+
shapes: tslib.__spreadArray(tslib.__spreadArray(tslib.__spreadArray([], allDataMeanLine, true), meanLine, true), selectedRangeBox, true), // Add the mean line and selection box
|
|
8036
6105
|
annotations: (showMeanLine && meanLine) ? [{
|
|
8037
6106
|
x: meanValue,
|
|
8038
|
-
y: 1 + meanLineRadius + 0.
|
|
6107
|
+
y: 1 + meanLineRadius + 0.04, // Position above the mean line. Value set with respect to the paper coordinates.
|
|
8039
6108
|
yref: 'paper',
|
|
8040
|
-
text: "
|
|
8041
|
-
month: '
|
|
6109
|
+
text: "<span style=\"font-weight:300\">AVG </span><span style=\"font-weight:600\">".concat(isDateArray(data) ? new Date(meanValue).toLocaleDateString('en-US', {
|
|
6110
|
+
month: '2-digit',
|
|
8042
6111
|
day: '2-digit',
|
|
8043
|
-
year: '
|
|
8044
|
-
}) : meanValue.toFixed(2)),
|
|
8045
|
-
xanchor:
|
|
8046
|
-
yanchor: '
|
|
8047
|
-
xshift: drawMeanAnnotationOnRight ? -3 : 3,
|
|
6112
|
+
year: '2-digit'
|
|
6113
|
+
}) : meanValue.toFixed(2), "</span>"),
|
|
6114
|
+
xanchor: 'center',
|
|
6115
|
+
yanchor: 'bottom',
|
|
8048
6116
|
showarrow: false,
|
|
8049
6117
|
font: {
|
|
8050
6118
|
color: barColor,
|
|
@@ -8059,11 +6127,11 @@ var HistogramPlot = function (props) {
|
|
|
8059
6127
|
scrollZoom: false, // Disable zooming with scroll
|
|
8060
6128
|
staticPlot: false, // Enable interactivity
|
|
8061
6129
|
};
|
|
8062
|
-
var containerStyles = __assign({ width: "100%", height: "100%", position: "relative" }, containerStyleOverrides);
|
|
8063
|
-
return (jsxRuntime.jsx("div", { ref: containerRef, className: "plot-container ".concat(plotId), style: __assign({ '--selection-color': selectorsColor }, containerStyles), children: jsxRuntime.jsx(React.Suspense, { fallback: jsxRuntime.jsx(Loading, {}), children: jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(Plot$2, { data: plotlyData, layout: layout, config: config, onSelected: handleSelection, onClick: handleClick, onDeselect: function () {
|
|
6130
|
+
var containerStyles = tslib.__assign({ width: "100%", height: "100%", position: "relative" }, containerStyleOverrides);
|
|
6131
|
+
return (jsxRuntime.jsx("div", { ref: containerRef, className: "plot-container ".concat(plotId), style: tslib.__assign({ '--selection-color': selectorsColor }, containerStyles), children: jsxRuntime.jsx(React.Suspense, { fallback: jsxRuntime.jsx(Loading, {}), children: jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(Plot$2, { data: plotlyData, layout: layout, config: config, onSelected: handleSelection, onClick: handleClick, onDeselect: function () {
|
|
8064
6132
|
onDeselect();
|
|
8065
6133
|
setSelectedRange(null); // Remove selected box
|
|
8066
|
-
}, useResizeHandler: true, style: {
|
|
6134
|
+
}, onInitialized: handlePlotInitialized, useResizeHandler: true, style: {
|
|
8067
6135
|
width: "100%",
|
|
8068
6136
|
height: "100%",
|
|
8069
6137
|
display: "block"
|
|
@@ -8168,8 +6236,8 @@ var RadialHistogramPlot = function (props) {
|
|
|
8168
6236
|
scrollZoom: false,
|
|
8169
6237
|
staticPlot: false,
|
|
8170
6238
|
};
|
|
8171
|
-
var containerStyles = __assign({ width: "100%", height: "100%", position: "relative" }, containerStyleOverrides);
|
|
8172
|
-
return (jsxRuntime.jsx("div", { ref: containerRef, className: "plot-container radial-histogram-container", style: __assign({ '--selection-color': selectorsColor }, containerStyles), children: jsxRuntime.jsx(React.Suspense, { fallback: jsxRuntime.jsx(Loading, {}), children: jsxRuntime.jsx(Plot$1, { data: plotlyData, layout: layout, config: config, onSelected: onSelected, onClick: onClick, useResizeHandler: true, style: {
|
|
6239
|
+
var containerStyles = tslib.__assign({ width: "100%", height: "100%", position: "relative" }, containerStyleOverrides);
|
|
6240
|
+
return (jsxRuntime.jsx("div", { ref: containerRef, className: "plot-container radial-histogram-container", style: tslib.__assign({ '--selection-color': selectorsColor }, containerStyles), children: jsxRuntime.jsx(React.Suspense, { fallback: jsxRuntime.jsx(Loading, {}), children: jsxRuntime.jsx(Plot$1, { data: plotlyData, layout: layout, config: config, onSelected: onSelected, onClick: onClick, useResizeHandler: true, style: {
|
|
8173
6241
|
width: "100%",
|
|
8174
6242
|
height: "100%",
|
|
8175
6243
|
display: "block"
|