@nebula.js/stardust 5.0.0-alpha.0 → 5.0.0-alpha.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/core/esm/dev.js +1200 -1121
- package/core/esm/dev.js.map +1 -1
- package/core/esm/index.js +5 -5
- package/core/esm/index.js.map +1 -1
- package/core/package.json +3 -3
- package/dist/stardust.dev.js +1692 -1343
- package/dist/stardust.dev.js.map +1 -1
- package/dist/stardust.js +15 -15
- package/dist/stardust.js.map +1 -1
- package/package.json +13 -13
package/core/esm/dev.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/stardust v5.0.0-alpha.
|
|
3
|
-
* Copyright (c)
|
|
2
|
+
* @nebula.js/stardust v5.0.0-alpha.2
|
|
3
|
+
* Copyright (c) 2024 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -8,8 +8,8 @@ import * as React from 'react';
|
|
|
8
8
|
import React__default, { useState as useState$1, useEffect as useEffect$1, forwardRef, useMemo as useMemo$1, useImperativeHandle as useImperativeHandle$1, useContext, useReducer, useCallback, useLayoutEffect as useLayoutEffect$1, PureComponent, useRef, createElement, Component } from 'react';
|
|
9
9
|
import ReactDOM from 'react-dom';
|
|
10
10
|
import { CacheProvider, ThemeContext as ThemeContext$2 } from '@emotion/react';
|
|
11
|
-
import { Checkbox, Radio, Typography, FormControlLabel, Box, Grid, Tooltip, Paper, IconButton, styled as styled$
|
|
12
|
-
import styled$
|
|
11
|
+
import { Checkbox, Radio, Typography, FormControlLabel, Box, Grid, Tooltip, Paper, IconButton, styled as styled$3, Popover, MenuList, MenuItem, ListItemIcon, Divider, OutlinedInput, InputAdornment, Badge, List, ListItem, Button, Icon, CircularProgress } from '@mui/material';
|
|
12
|
+
import styled$2 from '@emotion/styled';
|
|
13
13
|
|
|
14
14
|
function getDefaultExportFromCjs (x) {
|
|
15
15
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -282,8 +282,9 @@ var runtime = {exports: {}};
|
|
|
282
282
|
throw arg;
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
-
// Be forgiving, per
|
|
286
|
-
// https://
|
|
285
|
+
// Be forgiving, per GeneratorResume behavior specified since ES2015:
|
|
286
|
+
// ES2015 spec, step 3: https://262.ecma-international.org/6.0/#sec-generatorresume
|
|
287
|
+
// Latest spec, step 2: https://tc39.es/ecma262/#sec-generatorresume
|
|
287
288
|
return doneResult();
|
|
288
289
|
}
|
|
289
290
|
context.method = method;
|
|
@@ -343,7 +344,7 @@ var runtime = {exports: {}};
|
|
|
343
344
|
var method = delegate.iterator[methodName];
|
|
344
345
|
if (method === undefined$1) {
|
|
345
346
|
// A .throw or .return when the delegate iterator has no .throw
|
|
346
|
-
// method, or a missing .next
|
|
347
|
+
// method, or a missing .next method, always terminate the
|
|
347
348
|
// yield* loop.
|
|
348
349
|
context.delegate = null;
|
|
349
350
|
|
|
@@ -482,7 +483,7 @@ var runtime = {exports: {}};
|
|
|
482
483
|
};
|
|
483
484
|
};
|
|
484
485
|
function values(iterable) {
|
|
485
|
-
if (iterable
|
|
486
|
+
if (iterable != null) {
|
|
486
487
|
var iteratorMethod = iterable[iteratorSymbol];
|
|
487
488
|
if (iteratorMethod) {
|
|
488
489
|
return iteratorMethod.call(iterable);
|
|
@@ -2819,7 +2820,7 @@ var extend$1 = function extend() {
|
|
|
2819
2820
|
|
|
2820
2821
|
var extend$2 = /*@__PURE__*/getDefaultExportFromCjs(extend$1);
|
|
2821
2822
|
|
|
2822
|
-
var fontSize = "
|
|
2823
|
+
var fontSize = "12px";
|
|
2823
2824
|
var fontFamily = "'Source Sans Pro', 'Arial', 'sans-serif'";
|
|
2824
2825
|
var backgroundColor$1 = "transparent";
|
|
2825
2826
|
var dataColors = {
|
|
@@ -3823,65 +3824,14 @@ var m$1 = ReactDOM;
|
|
|
3823
3824
|
client.hydrateRoot = m$1.hydrateRoot;
|
|
3824
3825
|
}
|
|
3825
3826
|
|
|
3826
|
-
function _extends$4() {
|
|
3827
|
-
_extends$4 = Object.assign ? Object.assign.bind() : function (target) {
|
|
3828
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
3829
|
-
var source = arguments[i];
|
|
3830
|
-
for (var key in source) {
|
|
3831
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
3832
|
-
target[key] = source[key];
|
|
3833
|
-
}
|
|
3834
|
-
}
|
|
3835
|
-
}
|
|
3836
|
-
return target;
|
|
3837
|
-
};
|
|
3838
|
-
return _extends$4.apply(this, arguments);
|
|
3839
|
-
}
|
|
3840
|
-
|
|
3841
|
-
function isPlainObject(item) {
|
|
3842
|
-
return item !== null && typeof item === 'object' && item.constructor === Object;
|
|
3843
|
-
}
|
|
3844
|
-
function deepClone(source) {
|
|
3845
|
-
if (!isPlainObject(source)) {
|
|
3846
|
-
return source;
|
|
3847
|
-
}
|
|
3848
|
-
const output = {};
|
|
3849
|
-
Object.keys(source).forEach(key => {
|
|
3850
|
-
output[key] = deepClone(source[key]);
|
|
3851
|
-
});
|
|
3852
|
-
return output;
|
|
3853
|
-
}
|
|
3854
|
-
function deepmerge(target, source, options = {
|
|
3855
|
-
clone: true
|
|
3856
|
-
}) {
|
|
3857
|
-
const output = options.clone ? _extends$4({}, target) : target;
|
|
3858
|
-
if (isPlainObject(target) && isPlainObject(source)) {
|
|
3859
|
-
Object.keys(source).forEach(key => {
|
|
3860
|
-
// Avoid prototype pollution
|
|
3861
|
-
if (key === '__proto__') {
|
|
3862
|
-
return;
|
|
3863
|
-
}
|
|
3864
|
-
if (isPlainObject(source[key]) && key in target && isPlainObject(target[key])) {
|
|
3865
|
-
// Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.
|
|
3866
|
-
output[key] = deepmerge(target[key], source[key], options);
|
|
3867
|
-
} else if (options.clone) {
|
|
3868
|
-
output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];
|
|
3869
|
-
} else {
|
|
3870
|
-
output[key] = source[key];
|
|
3871
|
-
}
|
|
3872
|
-
});
|
|
3873
|
-
}
|
|
3874
|
-
return output;
|
|
3875
|
-
}
|
|
3876
|
-
|
|
3877
3827
|
/**
|
|
3878
3828
|
* WARNING: Don't import this directly.
|
|
3879
|
-
* Use `MuiError` from `@mui/
|
|
3829
|
+
* Use `MuiError` from `@mui-internal/babel-macros/MuiError.macro` instead.
|
|
3880
3830
|
* @param {number} code
|
|
3881
3831
|
*/
|
|
3882
3832
|
function formatMuiErrorMessage(code) {
|
|
3883
3833
|
// Apply babel-plugin-transform-template-literals in loose mode
|
|
3884
|
-
// loose mode is safe
|
|
3834
|
+
// loose mode is safe if we're concatenating primitives
|
|
3885
3835
|
// see https://babeljs.io/docs/en/babel-plugin-transform-template-literals#loose
|
|
3886
3836
|
/* eslint-disable prefer-template */
|
|
3887
3837
|
let url = 'https://mui.com/production-error/?code=' + code;
|
|
@@ -3894,916 +3844,458 @@ function formatMuiErrorMessage(code) {
|
|
|
3894
3844
|
/* eslint-enable prefer-template */
|
|
3895
3845
|
}
|
|
3896
3846
|
|
|
3897
|
-
|
|
3898
|
-
//
|
|
3899
|
-
// A strict capitalization should uppercase the first letter of each word in the sentence.
|
|
3900
|
-
// We only handle the first word.
|
|
3901
|
-
function capitalize(string) {
|
|
3902
|
-
if (typeof string !== 'string') {
|
|
3903
|
-
throw new Error(formatMuiErrorMessage(7));
|
|
3904
|
-
}
|
|
3905
|
-
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
3906
|
-
}
|
|
3847
|
+
var THEME_ID = '$$material';
|
|
3907
3848
|
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
return acc;
|
|
3849
|
+
function _extends$4() {
|
|
3850
|
+
_extends$4 = Object.assign ? Object.assign.bind() : function (target) {
|
|
3851
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
3852
|
+
var source = arguments[i];
|
|
3853
|
+
for (var key in source) {
|
|
3854
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
3855
|
+
target[key] = source[key];
|
|
3856
|
+
}
|
|
3857
|
+
}
|
|
3918
3858
|
}
|
|
3919
|
-
return
|
|
3920
|
-
acc.apply(this, args);
|
|
3921
|
-
func.apply(this, args);
|
|
3922
|
-
};
|
|
3923
|
-
}, () => {});
|
|
3924
|
-
}
|
|
3925
|
-
|
|
3926
|
-
// Corresponds to 10 frames at 60 Hz.
|
|
3927
|
-
// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.
|
|
3928
|
-
function debounce(func, wait = 166) {
|
|
3929
|
-
let timeout;
|
|
3930
|
-
function debounced(...args) {
|
|
3931
|
-
const later = () => {
|
|
3932
|
-
// @ts-ignore
|
|
3933
|
-
func.apply(this, args);
|
|
3934
|
-
};
|
|
3935
|
-
clearTimeout(timeout);
|
|
3936
|
-
timeout = setTimeout(later, wait);
|
|
3937
|
-
}
|
|
3938
|
-
debounced.clear = () => {
|
|
3939
|
-
clearTimeout(timeout);
|
|
3859
|
+
return target;
|
|
3940
3860
|
};
|
|
3941
|
-
return
|
|
3861
|
+
return _extends$4.apply(this, arguments);
|
|
3942
3862
|
}
|
|
3943
3863
|
|
|
3944
|
-
function
|
|
3945
|
-
{
|
|
3946
|
-
|
|
3864
|
+
function _objectWithoutPropertiesLoose$1(source, excluded) {
|
|
3865
|
+
if (source == null) return {};
|
|
3866
|
+
var target = {};
|
|
3867
|
+
var sourceKeys = Object.keys(source);
|
|
3868
|
+
var key, i;
|
|
3869
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
3870
|
+
key = sourceKeys[i];
|
|
3871
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
3872
|
+
target[key] = source[key];
|
|
3947
3873
|
}
|
|
3874
|
+
return target;
|
|
3948
3875
|
}
|
|
3949
3876
|
|
|
3950
|
-
|
|
3951
|
-
var _muiName, _element$type;
|
|
3952
|
-
return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf( // For server components `muiName` is avaialble in element.type._payload.value.muiName
|
|
3953
|
-
// relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45
|
|
3954
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
3955
|
-
(_muiName = element.type.muiName) != null ? _muiName : (_element$type = element.type) == null || (_element$type = _element$type._payload) == null || (_element$type = _element$type.value) == null ? void 0 : _element$type.muiName) !== -1;
|
|
3956
|
-
}
|
|
3877
|
+
/*
|
|
3957
3878
|
|
|
3958
|
-
|
|
3959
|
-
return node && node.ownerDocument || document;
|
|
3960
|
-
}
|
|
3879
|
+
Based off glamor's StyleSheet, thanks Sunil ❤️
|
|
3961
3880
|
|
|
3962
|
-
|
|
3963
|
-
const doc = ownerDocument(node);
|
|
3964
|
-
return doc.defaultView || window;
|
|
3965
|
-
}
|
|
3881
|
+
high performance StyleSheet for css-in-js systems
|
|
3966
3882
|
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
return () => null;
|
|
3970
|
-
}
|
|
3971
|
-
}
|
|
3883
|
+
- uses multiple style tags behind the scenes for millions of rules
|
|
3884
|
+
- uses `insertRule` for appending in production for *much* faster performance
|
|
3972
3885
|
|
|
3973
|
-
|
|
3974
|
-
* TODO v5: consider making it private
|
|
3975
|
-
*
|
|
3976
|
-
* passes {value} to {ref}
|
|
3977
|
-
*
|
|
3978
|
-
* WARNING: Be sure to only call this inside a callback that is passed as a ref.
|
|
3979
|
-
* Otherwise, make sure to cleanup the previous {ref} if it changes. See
|
|
3980
|
-
* https://github.com/mui/material-ui/issues/13539
|
|
3981
|
-
*
|
|
3982
|
-
* Useful if you want to expose the ref of an inner component to the public API
|
|
3983
|
-
* while still using it inside the component.
|
|
3984
|
-
* @param ref A ref callback or ref object. If anything falsy, this is a no-op.
|
|
3985
|
-
*/
|
|
3986
|
-
function setRef(ref, value) {
|
|
3987
|
-
if (typeof ref === 'function') {
|
|
3988
|
-
ref(value);
|
|
3989
|
-
} else if (ref) {
|
|
3990
|
-
ref.current = value;
|
|
3991
|
-
}
|
|
3992
|
-
}
|
|
3886
|
+
// usage
|
|
3993
3887
|
|
|
3994
|
-
|
|
3995
|
-
* A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.
|
|
3996
|
-
* This is useful for effects that are only needed for client-side rendering but not for SSR.
|
|
3997
|
-
*
|
|
3998
|
-
* Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85
|
|
3999
|
-
* and confirm it doesn't apply to your use-case.
|
|
4000
|
-
*/
|
|
4001
|
-
const useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
4002
|
-
var useEnhancedEffect$1 = useEnhancedEffect;
|
|
3888
|
+
import { StyleSheet } from '@emotion/sheet'
|
|
4003
3889
|
|
|
4004
|
-
let
|
|
4005
|
-
function useGlobalId(idOverride) {
|
|
4006
|
-
const [defaultId, setDefaultId] = React.useState(idOverride);
|
|
4007
|
-
const id = idOverride || defaultId;
|
|
4008
|
-
React.useEffect(() => {
|
|
4009
|
-
if (defaultId == null) {
|
|
4010
|
-
// Fallback to this default id when possible.
|
|
4011
|
-
// Use the incrementing value for client-side rendering only.
|
|
4012
|
-
// We can't use it server-side.
|
|
4013
|
-
// If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem
|
|
4014
|
-
globalId += 1;
|
|
4015
|
-
setDefaultId(`mui-${globalId}`);
|
|
4016
|
-
}
|
|
4017
|
-
}, [defaultId]);
|
|
4018
|
-
return id;
|
|
4019
|
-
}
|
|
3890
|
+
let styleSheet = new StyleSheet({ key: '', container: document.head })
|
|
4020
3891
|
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
function
|
|
4030
|
-
if (
|
|
4031
|
-
|
|
4032
|
-
return
|
|
3892
|
+
styleSheet.insert('#box { border: 1px solid red; }')
|
|
3893
|
+
- appends a css rule into the stylesheet
|
|
3894
|
+
|
|
3895
|
+
styleSheet.flush()
|
|
3896
|
+
- empties the stylesheet of all its contents
|
|
3897
|
+
|
|
3898
|
+
*/
|
|
3899
|
+
// $FlowFixMe
|
|
3900
|
+
function sheetForTag(tag) {
|
|
3901
|
+
if (tag.sheet) {
|
|
3902
|
+
// $FlowFixMe
|
|
3903
|
+
return tag.sheet;
|
|
3904
|
+
} // this weirdness brought to you by firefox
|
|
3905
|
+
|
|
3906
|
+
/* istanbul ignore next */
|
|
3907
|
+
|
|
3908
|
+
|
|
3909
|
+
for (var i = 0; i < document.styleSheets.length; i++) {
|
|
3910
|
+
if (document.styleSheets[i].ownerNode === tag) {
|
|
3911
|
+
// $FlowFixMe
|
|
3912
|
+
return document.styleSheets[i];
|
|
3913
|
+
}
|
|
4033
3914
|
}
|
|
4034
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.
|
|
4035
|
-
return useGlobalId(idOverride);
|
|
4036
3915
|
}
|
|
4037
3916
|
|
|
4038
|
-
function
|
|
4039
|
-
|
|
4040
|
-
|
|
3917
|
+
function createStyleElement(options) {
|
|
3918
|
+
var tag = document.createElement('style');
|
|
3919
|
+
tag.setAttribute('data-emotion', options.key);
|
|
3920
|
+
|
|
3921
|
+
if (options.nonce !== undefined) {
|
|
3922
|
+
tag.setAttribute('nonce', options.nonce);
|
|
4041
3923
|
}
|
|
4042
|
-
}
|
|
4043
3924
|
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
name,
|
|
4048
|
-
state = 'value'
|
|
4049
|
-
}) {
|
|
4050
|
-
// isControlled is ignored in the hook dependency lists as it should never change.
|
|
4051
|
-
const {
|
|
4052
|
-
current: isControlled
|
|
4053
|
-
} = React.useRef(controlled !== undefined);
|
|
4054
|
-
const [valueState, setValue] = React.useState(defaultProp);
|
|
4055
|
-
const value = isControlled ? controlled : valueState;
|
|
4056
|
-
const setValueIfUncontrolled = React.useCallback(newValue => {
|
|
4057
|
-
if (!isControlled) {
|
|
4058
|
-
setValue(newValue);
|
|
4059
|
-
}
|
|
4060
|
-
}, []);
|
|
4061
|
-
return [value, setValueIfUncontrolled];
|
|
3925
|
+
tag.appendChild(document.createTextNode(''));
|
|
3926
|
+
tag.setAttribute('data-s', '');
|
|
3927
|
+
return tag;
|
|
4062
3928
|
}
|
|
4063
3929
|
|
|
3930
|
+
var StyleSheet = /*#__PURE__*/function () {
|
|
3931
|
+
// Using Node instead of HTMLElement since container may be a ShadowRoot
|
|
3932
|
+
function StyleSheet(options) {
|
|
3933
|
+
var _this = this;
|
|
3934
|
+
|
|
3935
|
+
this._insertTag = function (tag) {
|
|
3936
|
+
var before;
|
|
3937
|
+
|
|
3938
|
+
if (_this.tags.length === 0) {
|
|
3939
|
+
if (_this.insertionPoint) {
|
|
3940
|
+
before = _this.insertionPoint.nextSibling;
|
|
3941
|
+
} else if (_this.prepend) {
|
|
3942
|
+
before = _this.container.firstChild;
|
|
3943
|
+
} else {
|
|
3944
|
+
before = _this.before;
|
|
3945
|
+
}
|
|
3946
|
+
} else {
|
|
3947
|
+
before = _this.tags[_this.tags.length - 1].nextSibling;
|
|
3948
|
+
}
|
|
3949
|
+
|
|
3950
|
+
_this.container.insertBefore(tag, before);
|
|
3951
|
+
|
|
3952
|
+
_this.tags.push(tag);
|
|
3953
|
+
};
|
|
3954
|
+
|
|
3955
|
+
this.isSpeedy = options.speedy === undefined ? "production" === 'production' : options.speedy;
|
|
3956
|
+
this.tags = [];
|
|
3957
|
+
this.ctr = 0;
|
|
3958
|
+
this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets
|
|
3959
|
+
|
|
3960
|
+
this.key = options.key;
|
|
3961
|
+
this.container = options.container;
|
|
3962
|
+
this.prepend = options.prepend;
|
|
3963
|
+
this.insertionPoint = options.insertionPoint;
|
|
3964
|
+
this.before = null;
|
|
3965
|
+
}
|
|
3966
|
+
|
|
3967
|
+
var _proto = StyleSheet.prototype;
|
|
3968
|
+
|
|
3969
|
+
_proto.hydrate = function hydrate(nodes) {
|
|
3970
|
+
nodes.forEach(this._insertTag);
|
|
3971
|
+
};
|
|
3972
|
+
|
|
3973
|
+
_proto.insert = function insert(rule) {
|
|
3974
|
+
// the max length is how many rules we have per style tag, it's 65000 in speedy mode
|
|
3975
|
+
// it's 1 in dev because we insert source maps that map a single rule to a location
|
|
3976
|
+
// and you can only have one source map per style tag
|
|
3977
|
+
if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {
|
|
3978
|
+
this._insertTag(createStyleElement(this));
|
|
3979
|
+
}
|
|
3980
|
+
|
|
3981
|
+
var tag = this.tags[this.tags.length - 1];
|
|
3982
|
+
|
|
3983
|
+
if (this.isSpeedy) {
|
|
3984
|
+
var sheet = sheetForTag(tag);
|
|
3985
|
+
|
|
3986
|
+
try {
|
|
3987
|
+
// this is the ultrafast version, works across browsers
|
|
3988
|
+
// the big drawback is that the css won't be editable in devtools
|
|
3989
|
+
sheet.insertRule(rule, sheet.cssRules.length);
|
|
3990
|
+
} catch (e) {
|
|
3991
|
+
}
|
|
3992
|
+
} else {
|
|
3993
|
+
tag.appendChild(document.createTextNode(rule));
|
|
3994
|
+
}
|
|
3995
|
+
|
|
3996
|
+
this.ctr++;
|
|
3997
|
+
};
|
|
3998
|
+
|
|
3999
|
+
_proto.flush = function flush() {
|
|
4000
|
+
// $FlowFixMe
|
|
4001
|
+
this.tags.forEach(function (tag) {
|
|
4002
|
+
return tag.parentNode && tag.parentNode.removeChild(tag);
|
|
4003
|
+
});
|
|
4004
|
+
this.tags = [];
|
|
4005
|
+
this.ctr = 0;
|
|
4006
|
+
};
|
|
4007
|
+
|
|
4008
|
+
return StyleSheet;
|
|
4009
|
+
}();
|
|
4010
|
+
|
|
4011
|
+
var MS = '-ms-';
|
|
4012
|
+
var MOZ = '-moz-';
|
|
4013
|
+
var WEBKIT = '-webkit-';
|
|
4014
|
+
|
|
4015
|
+
var COMMENT = 'comm';
|
|
4016
|
+
var RULESET = 'rule';
|
|
4017
|
+
var DECLARATION = 'decl';
|
|
4018
|
+
var IMPORT = '@import';
|
|
4019
|
+
var KEYFRAMES = '@keyframes';
|
|
4020
|
+
var LAYER = '@layer';
|
|
4021
|
+
|
|
4064
4022
|
/**
|
|
4065
|
-
*
|
|
4066
|
-
*
|
|
4023
|
+
* @param {number}
|
|
4024
|
+
* @return {number}
|
|
4067
4025
|
*/
|
|
4026
|
+
var abs = Math.abs;
|
|
4068
4027
|
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
return React.useRef((...args) =>
|
|
4075
|
-
// @ts-expect-error hide `this`
|
|
4076
|
-
// tslint:disable-next-line:ban-comma-operator
|
|
4077
|
-
(0, ref.current)(...args)).current;
|
|
4078
|
-
}
|
|
4028
|
+
/**
|
|
4029
|
+
* @param {number}
|
|
4030
|
+
* @return {string}
|
|
4031
|
+
*/
|
|
4032
|
+
var from = String.fromCharCode;
|
|
4079
4033
|
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
*/
|
|
4086
|
-
return React.useMemo(() => {
|
|
4087
|
-
if (refs.every(ref => ref == null)) {
|
|
4088
|
-
return null;
|
|
4089
|
-
}
|
|
4090
|
-
return instance => {
|
|
4091
|
-
refs.forEach(ref => {
|
|
4092
|
-
setRef(ref, instance);
|
|
4093
|
-
});
|
|
4094
|
-
};
|
|
4095
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4096
|
-
}, refs);
|
|
4097
|
-
}
|
|
4034
|
+
/**
|
|
4035
|
+
* @param {object}
|
|
4036
|
+
* @return {object}
|
|
4037
|
+
*/
|
|
4038
|
+
var assign = Object.assign;
|
|
4098
4039
|
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
email: true,
|
|
4108
|
-
password: true,
|
|
4109
|
-
number: true,
|
|
4110
|
-
date: true,
|
|
4111
|
-
month: true,
|
|
4112
|
-
week: true,
|
|
4113
|
-
time: true,
|
|
4114
|
-
datetime: true,
|
|
4115
|
-
'datetime-local': true
|
|
4116
|
-
};
|
|
4040
|
+
/**
|
|
4041
|
+
* @param {string} value
|
|
4042
|
+
* @param {number} length
|
|
4043
|
+
* @return {number}
|
|
4044
|
+
*/
|
|
4045
|
+
function hash (value, length) {
|
|
4046
|
+
return charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0
|
|
4047
|
+
}
|
|
4117
4048
|
|
|
4118
4049
|
/**
|
|
4119
|
-
*
|
|
4120
|
-
*
|
|
4121
|
-
* `:focus-visible` when focused.
|
|
4122
|
-
* @param {Element} node
|
|
4123
|
-
* @returns {boolean}
|
|
4050
|
+
* @param {string} value
|
|
4051
|
+
* @return {string}
|
|
4124
4052
|
*/
|
|
4125
|
-
function
|
|
4126
|
-
|
|
4127
|
-
type,
|
|
4128
|
-
tagName
|
|
4129
|
-
} = node;
|
|
4130
|
-
if (tagName === 'INPUT' && inputTypesWhitelist[type] && !node.readOnly) {
|
|
4131
|
-
return true;
|
|
4132
|
-
}
|
|
4133
|
-
if (tagName === 'TEXTAREA' && !node.readOnly) {
|
|
4134
|
-
return true;
|
|
4135
|
-
}
|
|
4136
|
-
if (node.isContentEditable) {
|
|
4137
|
-
return true;
|
|
4138
|
-
}
|
|
4139
|
-
return false;
|
|
4053
|
+
function trim$1 (value) {
|
|
4054
|
+
return value.trim()
|
|
4140
4055
|
}
|
|
4141
4056
|
|
|
4142
4057
|
/**
|
|
4143
|
-
*
|
|
4144
|
-
*
|
|
4145
|
-
*
|
|
4146
|
-
* then the modality is keyboard. Otherwise, the modality is not keyboard.
|
|
4147
|
-
* @param {KeyboardEvent} event
|
|
4058
|
+
* @param {string} value
|
|
4059
|
+
* @param {RegExp} pattern
|
|
4060
|
+
* @return {string?}
|
|
4148
4061
|
*/
|
|
4149
|
-
function
|
|
4150
|
-
|
|
4151
|
-
return;
|
|
4152
|
-
}
|
|
4153
|
-
hadKeyboardEvent = true;
|
|
4062
|
+
function match (value, pattern) {
|
|
4063
|
+
return (value = pattern.exec(value)) ? value[0] : value
|
|
4154
4064
|
}
|
|
4155
4065
|
|
|
4156
4066
|
/**
|
|
4157
|
-
*
|
|
4158
|
-
*
|
|
4159
|
-
*
|
|
4160
|
-
*
|
|
4161
|
-
* pointing device, while we still think we're in keyboard modality.
|
|
4067
|
+
* @param {string} value
|
|
4068
|
+
* @param {(string|RegExp)} pattern
|
|
4069
|
+
* @param {string} replacement
|
|
4070
|
+
* @return {string}
|
|
4162
4071
|
*/
|
|
4163
|
-
function
|
|
4164
|
-
|
|
4072
|
+
function replace (value, pattern, replacement) {
|
|
4073
|
+
return value.replace(pattern, replacement)
|
|
4165
4074
|
}
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
}
|
|
4175
|
-
}
|
|
4075
|
+
|
|
4076
|
+
/**
|
|
4077
|
+
* @param {string} value
|
|
4078
|
+
* @param {string} search
|
|
4079
|
+
* @return {number}
|
|
4080
|
+
*/
|
|
4081
|
+
function indexof (value, search) {
|
|
4082
|
+
return value.indexOf(search)
|
|
4176
4083
|
}
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4084
|
+
|
|
4085
|
+
/**
|
|
4086
|
+
* @param {string} value
|
|
4087
|
+
* @param {number} index
|
|
4088
|
+
* @return {number}
|
|
4089
|
+
*/
|
|
4090
|
+
function charat (value, index) {
|
|
4091
|
+
return value.charCodeAt(index) | 0
|
|
4183
4092
|
}
|
|
4184
|
-
function isFocusVisible(event) {
|
|
4185
|
-
const {
|
|
4186
|
-
target
|
|
4187
|
-
} = event;
|
|
4188
|
-
try {
|
|
4189
|
-
return target.matches(':focus-visible');
|
|
4190
|
-
} catch (error) {
|
|
4191
|
-
// Browsers not implementing :focus-visible will throw a SyntaxError.
|
|
4192
|
-
// We use our own heuristic for those browsers.
|
|
4193
|
-
// Rethrow might be better if it's not the expected error but do we really
|
|
4194
|
-
// want to crash if focus-visible malfunctioned?
|
|
4195
|
-
}
|
|
4196
4093
|
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
}
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
}
|
|
4206
|
-
}, []);
|
|
4207
|
-
const isFocusVisibleRef = React.useRef(false);
|
|
4208
|
-
|
|
4209
|
-
/**
|
|
4210
|
-
* Should be called if a blur event is fired
|
|
4211
|
-
*/
|
|
4212
|
-
function handleBlurVisible() {
|
|
4213
|
-
// checking against potential state variable does not suffice if we focus and blur synchronously.
|
|
4214
|
-
// React wouldn't have time to trigger a re-render so `focusVisible` would be stale.
|
|
4215
|
-
// Ideally we would adjust `isFocusVisible(event)` to look at `relatedTarget` for blur events.
|
|
4216
|
-
// This doesn't work in IE11 due to https://github.com/facebook/react/issues/3751
|
|
4217
|
-
// TODO: check again if React releases their internal changes to focus event handling (https://github.com/facebook/react/pull/19186).
|
|
4218
|
-
if (isFocusVisibleRef.current) {
|
|
4219
|
-
// To detect a tab/window switch, we look for a blur event followed
|
|
4220
|
-
// rapidly by a visibility change.
|
|
4221
|
-
// If we don't see a visibility change within 100ms, it's probably a
|
|
4222
|
-
// regular focus change.
|
|
4223
|
-
hadFocusVisibleRecently = true;
|
|
4224
|
-
window.clearTimeout(hadFocusVisibleRecentlyTimeout);
|
|
4225
|
-
hadFocusVisibleRecentlyTimeout = window.setTimeout(() => {
|
|
4226
|
-
hadFocusVisibleRecently = false;
|
|
4227
|
-
}, 100);
|
|
4228
|
-
isFocusVisibleRef.current = false;
|
|
4229
|
-
return true;
|
|
4230
|
-
}
|
|
4231
|
-
return false;
|
|
4232
|
-
}
|
|
4233
|
-
|
|
4234
|
-
/**
|
|
4235
|
-
* Should be called if a blur event is fired
|
|
4236
|
-
*/
|
|
4237
|
-
function handleFocusVisible(event) {
|
|
4238
|
-
if (isFocusVisible(event)) {
|
|
4239
|
-
isFocusVisibleRef.current = true;
|
|
4240
|
-
return true;
|
|
4241
|
-
}
|
|
4242
|
-
return false;
|
|
4243
|
-
}
|
|
4244
|
-
return {
|
|
4245
|
-
isFocusVisibleRef,
|
|
4246
|
-
onFocus: handleFocusVisible,
|
|
4247
|
-
onBlur: handleBlurVisible,
|
|
4248
|
-
ref
|
|
4249
|
-
};
|
|
4094
|
+
/**
|
|
4095
|
+
* @param {string} value
|
|
4096
|
+
* @param {number} begin
|
|
4097
|
+
* @param {number} end
|
|
4098
|
+
* @return {string}
|
|
4099
|
+
*/
|
|
4100
|
+
function substr (value, begin, end) {
|
|
4101
|
+
return value.slice(begin, end)
|
|
4250
4102
|
}
|
|
4251
4103
|
|
|
4252
4104
|
/**
|
|
4253
|
-
*
|
|
4254
|
-
* @
|
|
4255
|
-
* @param {object} props
|
|
4256
|
-
* @returns {object} resolved props
|
|
4105
|
+
* @param {string} value
|
|
4106
|
+
* @return {number}
|
|
4257
4107
|
*/
|
|
4258
|
-
function
|
|
4259
|
-
|
|
4260
|
-
Object.keys(defaultProps).forEach(propName => {
|
|
4261
|
-
if (propName.toString().match(/^(components|slots)$/)) {
|
|
4262
|
-
output[propName] = _extends$4({}, defaultProps[propName], output[propName]);
|
|
4263
|
-
} else if (propName.toString().match(/^(componentsProps|slotProps)$/)) {
|
|
4264
|
-
const defaultSlotProps = defaultProps[propName] || {};
|
|
4265
|
-
const slotProps = props[propName];
|
|
4266
|
-
output[propName] = {};
|
|
4267
|
-
if (!slotProps || !Object.keys(slotProps)) {
|
|
4268
|
-
// Reduce the iteration if the slot props is empty
|
|
4269
|
-
output[propName] = defaultSlotProps;
|
|
4270
|
-
} else if (!defaultSlotProps || !Object.keys(defaultSlotProps)) {
|
|
4271
|
-
// Reduce the iteration if the default slot props is empty
|
|
4272
|
-
output[propName] = slotProps;
|
|
4273
|
-
} else {
|
|
4274
|
-
output[propName] = _extends$4({}, slotProps);
|
|
4275
|
-
Object.keys(defaultSlotProps).forEach(slotPropName => {
|
|
4276
|
-
output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);
|
|
4277
|
-
});
|
|
4278
|
-
}
|
|
4279
|
-
} else if (output[propName] === undefined) {
|
|
4280
|
-
output[propName] = defaultProps[propName];
|
|
4281
|
-
}
|
|
4282
|
-
});
|
|
4283
|
-
return output;
|
|
4108
|
+
function strlen (value) {
|
|
4109
|
+
return value.length
|
|
4284
4110
|
}
|
|
4285
4111
|
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
output[slot] = slots[slot].reduce((acc, key) => {
|
|
4293
|
-
if (key) {
|
|
4294
|
-
const utilityClass = getUtilityClass(key);
|
|
4295
|
-
if (utilityClass !== '') {
|
|
4296
|
-
acc.push(utilityClass);
|
|
4297
|
-
}
|
|
4298
|
-
if (classes && classes[key]) {
|
|
4299
|
-
acc.push(classes[key]);
|
|
4300
|
-
}
|
|
4301
|
-
}
|
|
4302
|
-
return acc;
|
|
4303
|
-
}, []).join(' ');
|
|
4304
|
-
});
|
|
4305
|
-
return output;
|
|
4112
|
+
/**
|
|
4113
|
+
* @param {any[]} value
|
|
4114
|
+
* @return {number}
|
|
4115
|
+
*/
|
|
4116
|
+
function sizeof (value) {
|
|
4117
|
+
return value.length
|
|
4306
4118
|
}
|
|
4307
4119
|
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
generate(componentName) {
|
|
4316
|
-
return generate(componentName);
|
|
4317
|
-
},
|
|
4318
|
-
reset() {
|
|
4319
|
-
generate = defaultGenerator;
|
|
4320
|
-
}
|
|
4321
|
-
};
|
|
4322
|
-
};
|
|
4323
|
-
const ClassNameGenerator = createClassNameGenerator();
|
|
4324
|
-
var ClassNameGenerator$1 = ClassNameGenerator;
|
|
4325
|
-
|
|
4326
|
-
// If GlobalStateSlot is changed, GLOBAL_STATE_CLASSES in
|
|
4327
|
-
// \packages\api-docs-builder\utils\parseSlotsAndClasses.ts must be updated accordingly.
|
|
4328
|
-
const globalStateClassesMapping = {
|
|
4329
|
-
active: 'active',
|
|
4330
|
-
checked: 'checked',
|
|
4331
|
-
completed: 'completed',
|
|
4332
|
-
disabled: 'disabled',
|
|
4333
|
-
error: 'error',
|
|
4334
|
-
expanded: 'expanded',
|
|
4335
|
-
focused: 'focused',
|
|
4336
|
-
focusVisible: 'focusVisible',
|
|
4337
|
-
open: 'open',
|
|
4338
|
-
readOnly: 'readOnly',
|
|
4339
|
-
required: 'required',
|
|
4340
|
-
selected: 'selected'
|
|
4341
|
-
};
|
|
4342
|
-
function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {
|
|
4343
|
-
const globalStateClass = globalStateClassesMapping[slot];
|
|
4344
|
-
return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator$1.generate(componentName)}-${slot}`;
|
|
4120
|
+
/**
|
|
4121
|
+
* @param {any} value
|
|
4122
|
+
* @param {any[]} array
|
|
4123
|
+
* @return {any}
|
|
4124
|
+
*/
|
|
4125
|
+
function append (value, array) {
|
|
4126
|
+
return array.push(value), value
|
|
4345
4127
|
}
|
|
4346
4128
|
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4129
|
+
/**
|
|
4130
|
+
* @param {string[]} array
|
|
4131
|
+
* @param {function} callback
|
|
4132
|
+
* @return {string}
|
|
4133
|
+
*/
|
|
4134
|
+
function combine (array, callback) {
|
|
4135
|
+
return array.map(callback).join('')
|
|
4353
4136
|
}
|
|
4354
4137
|
|
|
4355
|
-
var
|
|
4138
|
+
var line = 1;
|
|
4139
|
+
var column = 1;
|
|
4140
|
+
var length = 0;
|
|
4141
|
+
var position = 0;
|
|
4142
|
+
var character = 0;
|
|
4143
|
+
var characters = '';
|
|
4356
4144
|
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
};
|
|
4369
|
-
return _extends$3.apply(this, arguments);
|
|
4145
|
+
/**
|
|
4146
|
+
* @param {string} value
|
|
4147
|
+
* @param {object | null} root
|
|
4148
|
+
* @param {object | null} parent
|
|
4149
|
+
* @param {string} type
|
|
4150
|
+
* @param {string[] | string} props
|
|
4151
|
+
* @param {object[] | string} children
|
|
4152
|
+
* @param {number} length
|
|
4153
|
+
*/
|
|
4154
|
+
function node (value, root, parent, type, props, children, length) {
|
|
4155
|
+
return {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}
|
|
4370
4156
|
}
|
|
4371
4157
|
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
4380
|
-
target[key] = source[key];
|
|
4381
|
-
}
|
|
4382
|
-
return target;
|
|
4158
|
+
/**
|
|
4159
|
+
* @param {object} root
|
|
4160
|
+
* @param {object} props
|
|
4161
|
+
* @return {object}
|
|
4162
|
+
*/
|
|
4163
|
+
function copy (root, props) {
|
|
4164
|
+
return assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)
|
|
4383
4165
|
}
|
|
4384
4166
|
|
|
4385
|
-
|
|
4167
|
+
/**
|
|
4168
|
+
* @return {number}
|
|
4169
|
+
*/
|
|
4170
|
+
function char () {
|
|
4171
|
+
return character
|
|
4172
|
+
}
|
|
4386
4173
|
|
|
4387
|
-
|
|
4174
|
+
/**
|
|
4175
|
+
* @return {number}
|
|
4176
|
+
*/
|
|
4177
|
+
function prev () {
|
|
4178
|
+
character = position > 0 ? charat(characters, --position) : 0;
|
|
4388
4179
|
|
|
4389
|
-
|
|
4180
|
+
if (column--, character === 10)
|
|
4181
|
+
column = 1, line--;
|
|
4390
4182
|
|
|
4391
|
-
|
|
4392
|
-
|
|
4183
|
+
return character
|
|
4184
|
+
}
|
|
4393
4185
|
|
|
4394
|
-
|
|
4186
|
+
/**
|
|
4187
|
+
* @return {number}
|
|
4188
|
+
*/
|
|
4189
|
+
function next () {
|
|
4190
|
+
character = position < length ? charat(characters, position++) : 0;
|
|
4395
4191
|
|
|
4396
|
-
|
|
4192
|
+
if (column++, character === 10)
|
|
4193
|
+
column = 1, line++;
|
|
4397
4194
|
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
styleSheet.insert('#box { border: 1px solid red; }')
|
|
4401
|
-
- appends a css rule into the stylesheet
|
|
4402
|
-
|
|
4403
|
-
styleSheet.flush()
|
|
4404
|
-
- empties the stylesheet of all its contents
|
|
4405
|
-
|
|
4406
|
-
*/
|
|
4407
|
-
// $FlowFixMe
|
|
4408
|
-
function sheetForTag(tag) {
|
|
4409
|
-
if (tag.sheet) {
|
|
4410
|
-
// $FlowFixMe
|
|
4411
|
-
return tag.sheet;
|
|
4412
|
-
} // this weirdness brought to you by firefox
|
|
4413
|
-
|
|
4414
|
-
/* istanbul ignore next */
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
for (var i = 0; i < document.styleSheets.length; i++) {
|
|
4418
|
-
if (document.styleSheets[i].ownerNode === tag) {
|
|
4419
|
-
// $FlowFixMe
|
|
4420
|
-
return document.styleSheets[i];
|
|
4421
|
-
}
|
|
4422
|
-
}
|
|
4423
|
-
}
|
|
4424
|
-
|
|
4425
|
-
function createStyleElement(options) {
|
|
4426
|
-
var tag = document.createElement('style');
|
|
4427
|
-
tag.setAttribute('data-emotion', options.key);
|
|
4428
|
-
|
|
4429
|
-
if (options.nonce !== undefined) {
|
|
4430
|
-
tag.setAttribute('nonce', options.nonce);
|
|
4431
|
-
}
|
|
4432
|
-
|
|
4433
|
-
tag.appendChild(document.createTextNode(''));
|
|
4434
|
-
tag.setAttribute('data-s', '');
|
|
4435
|
-
return tag;
|
|
4436
|
-
}
|
|
4437
|
-
|
|
4438
|
-
var StyleSheet = /*#__PURE__*/function () {
|
|
4439
|
-
// Using Node instead of HTMLElement since container may be a ShadowRoot
|
|
4440
|
-
function StyleSheet(options) {
|
|
4441
|
-
var _this = this;
|
|
4442
|
-
|
|
4443
|
-
this._insertTag = function (tag) {
|
|
4444
|
-
var before;
|
|
4445
|
-
|
|
4446
|
-
if (_this.tags.length === 0) {
|
|
4447
|
-
if (_this.insertionPoint) {
|
|
4448
|
-
before = _this.insertionPoint.nextSibling;
|
|
4449
|
-
} else if (_this.prepend) {
|
|
4450
|
-
before = _this.container.firstChild;
|
|
4451
|
-
} else {
|
|
4452
|
-
before = _this.before;
|
|
4453
|
-
}
|
|
4454
|
-
} else {
|
|
4455
|
-
before = _this.tags[_this.tags.length - 1].nextSibling;
|
|
4456
|
-
}
|
|
4457
|
-
|
|
4458
|
-
_this.container.insertBefore(tag, before);
|
|
4459
|
-
|
|
4460
|
-
_this.tags.push(tag);
|
|
4461
|
-
};
|
|
4462
|
-
|
|
4463
|
-
this.isSpeedy = options.speedy === undefined ? "production" === 'production' : options.speedy;
|
|
4464
|
-
this.tags = [];
|
|
4465
|
-
this.ctr = 0;
|
|
4466
|
-
this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets
|
|
4467
|
-
|
|
4468
|
-
this.key = options.key;
|
|
4469
|
-
this.container = options.container;
|
|
4470
|
-
this.prepend = options.prepend;
|
|
4471
|
-
this.insertionPoint = options.insertionPoint;
|
|
4472
|
-
this.before = null;
|
|
4473
|
-
}
|
|
4474
|
-
|
|
4475
|
-
var _proto = StyleSheet.prototype;
|
|
4476
|
-
|
|
4477
|
-
_proto.hydrate = function hydrate(nodes) {
|
|
4478
|
-
nodes.forEach(this._insertTag);
|
|
4479
|
-
};
|
|
4480
|
-
|
|
4481
|
-
_proto.insert = function insert(rule) {
|
|
4482
|
-
// the max length is how many rules we have per style tag, it's 65000 in speedy mode
|
|
4483
|
-
// it's 1 in dev because we insert source maps that map a single rule to a location
|
|
4484
|
-
// and you can only have one source map per style tag
|
|
4485
|
-
if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {
|
|
4486
|
-
this._insertTag(createStyleElement(this));
|
|
4487
|
-
}
|
|
4488
|
-
|
|
4489
|
-
var tag = this.tags[this.tags.length - 1];
|
|
4490
|
-
|
|
4491
|
-
if (this.isSpeedy) {
|
|
4492
|
-
var sheet = sheetForTag(tag);
|
|
4493
|
-
|
|
4494
|
-
try {
|
|
4495
|
-
// this is the ultrafast version, works across browsers
|
|
4496
|
-
// the big drawback is that the css won't be editable in devtools
|
|
4497
|
-
sheet.insertRule(rule, sheet.cssRules.length);
|
|
4498
|
-
} catch (e) {
|
|
4499
|
-
}
|
|
4500
|
-
} else {
|
|
4501
|
-
tag.appendChild(document.createTextNode(rule));
|
|
4502
|
-
}
|
|
4503
|
-
|
|
4504
|
-
this.ctr++;
|
|
4505
|
-
};
|
|
4506
|
-
|
|
4507
|
-
_proto.flush = function flush() {
|
|
4508
|
-
// $FlowFixMe
|
|
4509
|
-
this.tags.forEach(function (tag) {
|
|
4510
|
-
return tag.parentNode && tag.parentNode.removeChild(tag);
|
|
4511
|
-
});
|
|
4512
|
-
this.tags = [];
|
|
4513
|
-
this.ctr = 0;
|
|
4514
|
-
};
|
|
4515
|
-
|
|
4516
|
-
return StyleSheet;
|
|
4517
|
-
}();
|
|
4518
|
-
|
|
4519
|
-
var MS = '-ms-';
|
|
4520
|
-
var MOZ = '-moz-';
|
|
4521
|
-
var WEBKIT = '-webkit-';
|
|
4522
|
-
|
|
4523
|
-
var COMMENT = 'comm';
|
|
4524
|
-
var RULESET = 'rule';
|
|
4525
|
-
var DECLARATION = 'decl';
|
|
4526
|
-
var IMPORT = '@import';
|
|
4527
|
-
var KEYFRAMES = '@keyframes';
|
|
4528
|
-
var LAYER = '@layer';
|
|
4195
|
+
return character
|
|
4196
|
+
}
|
|
4529
4197
|
|
|
4530
4198
|
/**
|
|
4531
|
-
* @param {number}
|
|
4532
4199
|
* @return {number}
|
|
4533
4200
|
*/
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
* @param {number}
|
|
4538
|
-
* @return {string}
|
|
4539
|
-
*/
|
|
4540
|
-
var from = String.fromCharCode;
|
|
4541
|
-
|
|
4542
|
-
/**
|
|
4543
|
-
* @param {object}
|
|
4544
|
-
* @return {object}
|
|
4545
|
-
*/
|
|
4546
|
-
var assign = Object.assign;
|
|
4201
|
+
function peek () {
|
|
4202
|
+
return charat(characters, position)
|
|
4203
|
+
}
|
|
4547
4204
|
|
|
4548
4205
|
/**
|
|
4549
|
-
* @param {string} value
|
|
4550
|
-
* @param {number} length
|
|
4551
4206
|
* @return {number}
|
|
4552
4207
|
*/
|
|
4553
|
-
function
|
|
4554
|
-
return
|
|
4208
|
+
function caret () {
|
|
4209
|
+
return position
|
|
4555
4210
|
}
|
|
4556
4211
|
|
|
4557
4212
|
/**
|
|
4558
|
-
* @param {
|
|
4213
|
+
* @param {number} begin
|
|
4214
|
+
* @param {number} end
|
|
4559
4215
|
* @return {string}
|
|
4560
4216
|
*/
|
|
4561
|
-
function
|
|
4562
|
-
return
|
|
4217
|
+
function slice (begin, end) {
|
|
4218
|
+
return substr(characters, begin, end)
|
|
4563
4219
|
}
|
|
4564
4220
|
|
|
4565
4221
|
/**
|
|
4566
|
-
* @param {
|
|
4567
|
-
* @
|
|
4568
|
-
* @return {string?}
|
|
4222
|
+
* @param {number} type
|
|
4223
|
+
* @return {number}
|
|
4569
4224
|
*/
|
|
4570
|
-
function
|
|
4571
|
-
|
|
4572
|
-
|
|
4225
|
+
function token (type) {
|
|
4226
|
+
switch (type) {
|
|
4227
|
+
// \0 \t \n \r \s whitespace token
|
|
4228
|
+
case 0: case 9: case 10: case 13: case 32:
|
|
4229
|
+
return 5
|
|
4230
|
+
// ! + , / > @ ~ isolate token
|
|
4231
|
+
case 33: case 43: case 44: case 47: case 62: case 64: case 126:
|
|
4232
|
+
// ; { } breakpoint token
|
|
4233
|
+
case 59: case 123: case 125:
|
|
4234
|
+
return 4
|
|
4235
|
+
// : accompanied token
|
|
4236
|
+
case 58:
|
|
4237
|
+
return 3
|
|
4238
|
+
// " ' ( [ opening delimit token
|
|
4239
|
+
case 34: case 39: case 40: case 91:
|
|
4240
|
+
return 2
|
|
4241
|
+
// ) ] closing delimit token
|
|
4242
|
+
case 41: case 93:
|
|
4243
|
+
return 1
|
|
4244
|
+
}
|
|
4573
4245
|
|
|
4574
|
-
|
|
4575
|
-
* @param {string} value
|
|
4576
|
-
* @param {(string|RegExp)} pattern
|
|
4577
|
-
* @param {string} replacement
|
|
4578
|
-
* @return {string}
|
|
4579
|
-
*/
|
|
4580
|
-
function replace (value, pattern, replacement) {
|
|
4581
|
-
return value.replace(pattern, replacement)
|
|
4246
|
+
return 0
|
|
4582
4247
|
}
|
|
4583
4248
|
|
|
4584
4249
|
/**
|
|
4585
4250
|
* @param {string} value
|
|
4586
|
-
* @
|
|
4587
|
-
* @return {number}
|
|
4251
|
+
* @return {any[]}
|
|
4588
4252
|
*/
|
|
4589
|
-
function
|
|
4590
|
-
return value
|
|
4253
|
+
function alloc (value) {
|
|
4254
|
+
return line = column = 1, length = strlen(characters = value), position = 0, []
|
|
4591
4255
|
}
|
|
4592
4256
|
|
|
4593
4257
|
/**
|
|
4594
|
-
* @param {
|
|
4595
|
-
* @
|
|
4596
|
-
* @return {number}
|
|
4258
|
+
* @param {any} value
|
|
4259
|
+
* @return {any}
|
|
4597
4260
|
*/
|
|
4598
|
-
function
|
|
4599
|
-
return
|
|
4261
|
+
function dealloc (value) {
|
|
4262
|
+
return characters = '', value
|
|
4600
4263
|
}
|
|
4601
4264
|
|
|
4602
4265
|
/**
|
|
4603
|
-
* @param {
|
|
4604
|
-
* @param {number} begin
|
|
4605
|
-
* @param {number} end
|
|
4266
|
+
* @param {number} type
|
|
4606
4267
|
* @return {string}
|
|
4607
4268
|
*/
|
|
4608
|
-
function
|
|
4609
|
-
return
|
|
4269
|
+
function delimit (type) {
|
|
4270
|
+
return trim$1(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))
|
|
4610
4271
|
}
|
|
4611
4272
|
|
|
4612
4273
|
/**
|
|
4613
|
-
* @param {
|
|
4614
|
-
* @return {
|
|
4274
|
+
* @param {number} type
|
|
4275
|
+
* @return {string}
|
|
4615
4276
|
*/
|
|
4616
|
-
function
|
|
4617
|
-
|
|
4618
|
-
|
|
4277
|
+
function whitespace (type) {
|
|
4278
|
+
while (character = peek())
|
|
4279
|
+
if (character < 33)
|
|
4280
|
+
next();
|
|
4281
|
+
else
|
|
4282
|
+
break
|
|
4619
4283
|
|
|
4620
|
-
|
|
4621
|
-
* @param {any[]} value
|
|
4622
|
-
* @return {number}
|
|
4623
|
-
*/
|
|
4624
|
-
function sizeof (value) {
|
|
4625
|
-
return value.length
|
|
4284
|
+
return token(type) > 2 || token(character) > 3 ? '' : ' '
|
|
4626
4285
|
}
|
|
4627
4286
|
|
|
4628
4287
|
/**
|
|
4629
|
-
* @param {
|
|
4630
|
-
* @param {
|
|
4631
|
-
* @return {
|
|
4288
|
+
* @param {number} index
|
|
4289
|
+
* @param {number} count
|
|
4290
|
+
* @return {string}
|
|
4632
4291
|
*/
|
|
4633
|
-
function
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
* @return {string}
|
|
4641
|
-
*/
|
|
4642
|
-
function combine (array, callback) {
|
|
4643
|
-
return array.map(callback).join('')
|
|
4644
|
-
}
|
|
4645
|
-
|
|
4646
|
-
var line = 1;
|
|
4647
|
-
var column = 1;
|
|
4648
|
-
var length = 0;
|
|
4649
|
-
var position = 0;
|
|
4650
|
-
var character = 0;
|
|
4651
|
-
var characters = '';
|
|
4652
|
-
|
|
4653
|
-
/**
|
|
4654
|
-
* @param {string} value
|
|
4655
|
-
* @param {object | null} root
|
|
4656
|
-
* @param {object | null} parent
|
|
4657
|
-
* @param {string} type
|
|
4658
|
-
* @param {string[] | string} props
|
|
4659
|
-
* @param {object[] | string} children
|
|
4660
|
-
* @param {number} length
|
|
4661
|
-
*/
|
|
4662
|
-
function node (value, root, parent, type, props, children, length) {
|
|
4663
|
-
return {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}
|
|
4664
|
-
}
|
|
4665
|
-
|
|
4666
|
-
/**
|
|
4667
|
-
* @param {object} root
|
|
4668
|
-
* @param {object} props
|
|
4669
|
-
* @return {object}
|
|
4670
|
-
*/
|
|
4671
|
-
function copy (root, props) {
|
|
4672
|
-
return assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)
|
|
4673
|
-
}
|
|
4674
|
-
|
|
4675
|
-
/**
|
|
4676
|
-
* @return {number}
|
|
4677
|
-
*/
|
|
4678
|
-
function char () {
|
|
4679
|
-
return character
|
|
4680
|
-
}
|
|
4681
|
-
|
|
4682
|
-
/**
|
|
4683
|
-
* @return {number}
|
|
4684
|
-
*/
|
|
4685
|
-
function prev () {
|
|
4686
|
-
character = position > 0 ? charat(characters, --position) : 0;
|
|
4687
|
-
|
|
4688
|
-
if (column--, character === 10)
|
|
4689
|
-
column = 1, line--;
|
|
4690
|
-
|
|
4691
|
-
return character
|
|
4692
|
-
}
|
|
4693
|
-
|
|
4694
|
-
/**
|
|
4695
|
-
* @return {number}
|
|
4696
|
-
*/
|
|
4697
|
-
function next () {
|
|
4698
|
-
character = position < length ? charat(characters, position++) : 0;
|
|
4699
|
-
|
|
4700
|
-
if (column++, character === 10)
|
|
4701
|
-
column = 1, line++;
|
|
4702
|
-
|
|
4703
|
-
return character
|
|
4704
|
-
}
|
|
4705
|
-
|
|
4706
|
-
/**
|
|
4707
|
-
* @return {number}
|
|
4708
|
-
*/
|
|
4709
|
-
function peek () {
|
|
4710
|
-
return charat(characters, position)
|
|
4711
|
-
}
|
|
4712
|
-
|
|
4713
|
-
/**
|
|
4714
|
-
* @return {number}
|
|
4715
|
-
*/
|
|
4716
|
-
function caret () {
|
|
4717
|
-
return position
|
|
4718
|
-
}
|
|
4719
|
-
|
|
4720
|
-
/**
|
|
4721
|
-
* @param {number} begin
|
|
4722
|
-
* @param {number} end
|
|
4723
|
-
* @return {string}
|
|
4724
|
-
*/
|
|
4725
|
-
function slice (begin, end) {
|
|
4726
|
-
return substr(characters, begin, end)
|
|
4727
|
-
}
|
|
4728
|
-
|
|
4729
|
-
/**
|
|
4730
|
-
* @param {number} type
|
|
4731
|
-
* @return {number}
|
|
4732
|
-
*/
|
|
4733
|
-
function token (type) {
|
|
4734
|
-
switch (type) {
|
|
4735
|
-
// \0 \t \n \r \s whitespace token
|
|
4736
|
-
case 0: case 9: case 10: case 13: case 32:
|
|
4737
|
-
return 5
|
|
4738
|
-
// ! + , / > @ ~ isolate token
|
|
4739
|
-
case 33: case 43: case 44: case 47: case 62: case 64: case 126:
|
|
4740
|
-
// ; { } breakpoint token
|
|
4741
|
-
case 59: case 123: case 125:
|
|
4742
|
-
return 4
|
|
4743
|
-
// : accompanied token
|
|
4744
|
-
case 58:
|
|
4745
|
-
return 3
|
|
4746
|
-
// " ' ( [ opening delimit token
|
|
4747
|
-
case 34: case 39: case 40: case 91:
|
|
4748
|
-
return 2
|
|
4749
|
-
// ) ] closing delimit token
|
|
4750
|
-
case 41: case 93:
|
|
4751
|
-
return 1
|
|
4752
|
-
}
|
|
4753
|
-
|
|
4754
|
-
return 0
|
|
4755
|
-
}
|
|
4756
|
-
|
|
4757
|
-
/**
|
|
4758
|
-
* @param {string} value
|
|
4759
|
-
* @return {any[]}
|
|
4760
|
-
*/
|
|
4761
|
-
function alloc (value) {
|
|
4762
|
-
return line = column = 1, length = strlen(characters = value), position = 0, []
|
|
4763
|
-
}
|
|
4764
|
-
|
|
4765
|
-
/**
|
|
4766
|
-
* @param {any} value
|
|
4767
|
-
* @return {any}
|
|
4768
|
-
*/
|
|
4769
|
-
function dealloc (value) {
|
|
4770
|
-
return characters = '', value
|
|
4771
|
-
}
|
|
4772
|
-
|
|
4773
|
-
/**
|
|
4774
|
-
* @param {number} type
|
|
4775
|
-
* @return {string}
|
|
4776
|
-
*/
|
|
4777
|
-
function delimit (type) {
|
|
4778
|
-
return trim$1(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))
|
|
4779
|
-
}
|
|
4780
|
-
|
|
4781
|
-
/**
|
|
4782
|
-
* @param {number} type
|
|
4783
|
-
* @return {string}
|
|
4784
|
-
*/
|
|
4785
|
-
function whitespace (type) {
|
|
4786
|
-
while (character = peek())
|
|
4787
|
-
if (character < 33)
|
|
4788
|
-
next();
|
|
4789
|
-
else
|
|
4790
|
-
break
|
|
4791
|
-
|
|
4792
|
-
return token(type) > 2 || token(character) > 3 ? '' : ' '
|
|
4793
|
-
}
|
|
4794
|
-
|
|
4795
|
-
/**
|
|
4796
|
-
* @param {number} index
|
|
4797
|
-
* @param {number} count
|
|
4798
|
-
* @return {string}
|
|
4799
|
-
*/
|
|
4800
|
-
function escaping (index, count) {
|
|
4801
|
-
while (--count && next())
|
|
4802
|
-
// not 0-9 A-F a-f
|
|
4803
|
-
if (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))
|
|
4804
|
-
break
|
|
4805
|
-
|
|
4806
|
-
return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))
|
|
4292
|
+
function escaping (index, count) {
|
|
4293
|
+
while (--count && next())
|
|
4294
|
+
// not 0-9 A-F a-f
|
|
4295
|
+
if (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))
|
|
4296
|
+
break
|
|
4297
|
+
|
|
4298
|
+
return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))
|
|
4807
4299
|
}
|
|
4808
4300
|
|
|
4809
4301
|
/**
|
|
@@ -5649,71 +5141,579 @@ function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&
|
|
|
5649
5141
|
|
|
5650
5142
|
var jsxRuntimeExports = jsxRuntime.exports;
|
|
5651
5143
|
|
|
5652
|
-
let cache$1;
|
|
5653
|
-
if (typeof document === 'object') {
|
|
5654
|
-
cache$1 = createCache({
|
|
5655
|
-
key: 'css',
|
|
5656
|
-
prepend: true
|
|
5657
|
-
});
|
|
5658
|
-
}
|
|
5659
|
-
function StyledEngineProvider(props) {
|
|
5660
|
-
const {
|
|
5661
|
-
injectFirst,
|
|
5662
|
-
children
|
|
5663
|
-
} = props;
|
|
5664
|
-
return injectFirst && cache$1 ? /*#__PURE__*/jsxRuntimeExports.jsx(CacheProvider, {
|
|
5665
|
-
value: cache$1,
|
|
5666
|
-
children: children
|
|
5667
|
-
}) : children;
|
|
5144
|
+
let cache$1;
|
|
5145
|
+
if (typeof document === 'object') {
|
|
5146
|
+
cache$1 = createCache({
|
|
5147
|
+
key: 'css',
|
|
5148
|
+
prepend: true
|
|
5149
|
+
});
|
|
5150
|
+
}
|
|
5151
|
+
function StyledEngineProvider(props) {
|
|
5152
|
+
const {
|
|
5153
|
+
injectFirst,
|
|
5154
|
+
children
|
|
5155
|
+
} = props;
|
|
5156
|
+
return injectFirst && cache$1 ? /*#__PURE__*/jsxRuntimeExports.jsx(CacheProvider, {
|
|
5157
|
+
value: cache$1,
|
|
5158
|
+
children: children
|
|
5159
|
+
}) : children;
|
|
5160
|
+
}
|
|
5161
|
+
|
|
5162
|
+
/**
|
|
5163
|
+
* @mui/styled-engine v5.15.2
|
|
5164
|
+
*
|
|
5165
|
+
* @license MIT
|
|
5166
|
+
* This source code is licensed under the MIT license found in the
|
|
5167
|
+
* LICENSE file in the root directory of this source tree.
|
|
5168
|
+
*/
|
|
5169
|
+
function styled$1(tag, options) {
|
|
5170
|
+
const stylesFactory = styled$2(tag, options);
|
|
5171
|
+
return stylesFactory;
|
|
5172
|
+
}
|
|
5173
|
+
|
|
5174
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
5175
|
+
const internal_processStyles = (tag, processor) => {
|
|
5176
|
+
// Emotion attaches all the styles as `__emotion_styles`.
|
|
5177
|
+
// Ref: https://github.com/emotion-js/emotion/blob/16d971d0da229596d6bcc39d282ba9753c9ee7cf/packages/styled/src/base.js#L186
|
|
5178
|
+
if (Array.isArray(tag.__emotion_styles)) {
|
|
5179
|
+
tag.__emotion_styles = processor(tag.__emotion_styles);
|
|
5180
|
+
}
|
|
5181
|
+
};
|
|
5182
|
+
|
|
5183
|
+
function _extends$3() {
|
|
5184
|
+
_extends$3 = Object.assign ? Object.assign.bind() : function (target) {
|
|
5185
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
5186
|
+
var source = arguments[i];
|
|
5187
|
+
for (var key in source) {
|
|
5188
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
5189
|
+
target[key] = source[key];
|
|
5190
|
+
}
|
|
5191
|
+
}
|
|
5192
|
+
}
|
|
5193
|
+
return target;
|
|
5194
|
+
};
|
|
5195
|
+
return _extends$3.apply(this, arguments);
|
|
5196
|
+
}
|
|
5197
|
+
|
|
5198
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
5199
|
+
if (source == null) return {};
|
|
5200
|
+
var target = {};
|
|
5201
|
+
var sourceKeys = Object.keys(source);
|
|
5202
|
+
var key, i;
|
|
5203
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
5204
|
+
key = sourceKeys[i];
|
|
5205
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
5206
|
+
target[key] = source[key];
|
|
5207
|
+
}
|
|
5208
|
+
return target;
|
|
5209
|
+
}
|
|
5210
|
+
|
|
5211
|
+
function _extends$2() {
|
|
5212
|
+
_extends$2 = Object.assign ? Object.assign.bind() : function (target) {
|
|
5213
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
5214
|
+
var source = arguments[i];
|
|
5215
|
+
for (var key in source) {
|
|
5216
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
5217
|
+
target[key] = source[key];
|
|
5218
|
+
}
|
|
5219
|
+
}
|
|
5220
|
+
}
|
|
5221
|
+
return target;
|
|
5222
|
+
};
|
|
5223
|
+
return _extends$2.apply(this, arguments);
|
|
5224
|
+
}
|
|
5225
|
+
|
|
5226
|
+
function isPlainObject(item) {
|
|
5227
|
+
return item !== null && typeof item === 'object' && item.constructor === Object;
|
|
5228
|
+
}
|
|
5229
|
+
function deepClone(source) {
|
|
5230
|
+
if (!isPlainObject(source)) {
|
|
5231
|
+
return source;
|
|
5232
|
+
}
|
|
5233
|
+
const output = {};
|
|
5234
|
+
Object.keys(source).forEach(key => {
|
|
5235
|
+
output[key] = deepClone(source[key]);
|
|
5236
|
+
});
|
|
5237
|
+
return output;
|
|
5238
|
+
}
|
|
5239
|
+
function deepmerge(target, source, options = {
|
|
5240
|
+
clone: true
|
|
5241
|
+
}) {
|
|
5242
|
+
const output = options.clone ? _extends$2({}, target) : target;
|
|
5243
|
+
if (isPlainObject(target) && isPlainObject(source)) {
|
|
5244
|
+
Object.keys(source).forEach(key => {
|
|
5245
|
+
// Avoid prototype pollution
|
|
5246
|
+
if (key === '__proto__') {
|
|
5247
|
+
return;
|
|
5248
|
+
}
|
|
5249
|
+
if (isPlainObject(source[key]) && key in target && isPlainObject(target[key])) {
|
|
5250
|
+
// Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.
|
|
5251
|
+
output[key] = deepmerge(target[key], source[key], options);
|
|
5252
|
+
} else if (options.clone) {
|
|
5253
|
+
output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];
|
|
5254
|
+
} else {
|
|
5255
|
+
output[key] = source[key];
|
|
5256
|
+
}
|
|
5257
|
+
});
|
|
5258
|
+
}
|
|
5259
|
+
return output;
|
|
5260
|
+
}
|
|
5261
|
+
|
|
5262
|
+
// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.
|
|
5263
|
+
//
|
|
5264
|
+
// A strict capitalization should uppercase the first letter of each word in the sentence.
|
|
5265
|
+
// We only handle the first word.
|
|
5266
|
+
function capitalize(string) {
|
|
5267
|
+
if (typeof string !== 'string') {
|
|
5268
|
+
throw new Error(formatMuiErrorMessage(7));
|
|
5269
|
+
}
|
|
5270
|
+
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
5271
|
+
}
|
|
5272
|
+
|
|
5273
|
+
/**
|
|
5274
|
+
* Safe chained function.
|
|
5275
|
+
*
|
|
5276
|
+
* Will only create a new function if needed,
|
|
5277
|
+
* otherwise will pass back existing functions or null.
|
|
5278
|
+
*/
|
|
5279
|
+
function createChainedFunction(...funcs) {
|
|
5280
|
+
return funcs.reduce((acc, func) => {
|
|
5281
|
+
if (func == null) {
|
|
5282
|
+
return acc;
|
|
5283
|
+
}
|
|
5284
|
+
return function chainedFunction(...args) {
|
|
5285
|
+
acc.apply(this, args);
|
|
5286
|
+
func.apply(this, args);
|
|
5287
|
+
};
|
|
5288
|
+
}, () => {});
|
|
5289
|
+
}
|
|
5290
|
+
|
|
5291
|
+
// Corresponds to 10 frames at 60 Hz.
|
|
5292
|
+
// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.
|
|
5293
|
+
function debounce(func, wait = 166) {
|
|
5294
|
+
let timeout;
|
|
5295
|
+
function debounced(...args) {
|
|
5296
|
+
const later = () => {
|
|
5297
|
+
// @ts-ignore
|
|
5298
|
+
func.apply(this, args);
|
|
5299
|
+
};
|
|
5300
|
+
clearTimeout(timeout);
|
|
5301
|
+
timeout = setTimeout(later, wait);
|
|
5302
|
+
}
|
|
5303
|
+
debounced.clear = () => {
|
|
5304
|
+
clearTimeout(timeout);
|
|
5305
|
+
};
|
|
5306
|
+
return debounced;
|
|
5307
|
+
}
|
|
5308
|
+
|
|
5309
|
+
function deprecatedPropType(validator, reason) {
|
|
5310
|
+
{
|
|
5311
|
+
return () => null;
|
|
5312
|
+
}
|
|
5313
|
+
}
|
|
5314
|
+
|
|
5315
|
+
function isMuiElement(element, muiNames) {
|
|
5316
|
+
var _muiName, _element$type;
|
|
5317
|
+
return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf( // For server components `muiName` is avaialble in element.type._payload.value.muiName
|
|
5318
|
+
// relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45
|
|
5319
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
5320
|
+
(_muiName = element.type.muiName) != null ? _muiName : (_element$type = element.type) == null || (_element$type = _element$type._payload) == null || (_element$type = _element$type.value) == null ? void 0 : _element$type.muiName) !== -1;
|
|
5321
|
+
}
|
|
5322
|
+
|
|
5323
|
+
function ownerDocument(node) {
|
|
5324
|
+
return node && node.ownerDocument || document;
|
|
5325
|
+
}
|
|
5326
|
+
|
|
5327
|
+
function ownerWindow(node) {
|
|
5328
|
+
const doc = ownerDocument(node);
|
|
5329
|
+
return doc.defaultView || window;
|
|
5330
|
+
}
|
|
5331
|
+
|
|
5332
|
+
function requirePropFactory(componentNameInError, Component) {
|
|
5333
|
+
{
|
|
5334
|
+
return () => null;
|
|
5335
|
+
}
|
|
5336
|
+
}
|
|
5337
|
+
|
|
5338
|
+
/**
|
|
5339
|
+
* TODO v5: consider making it private
|
|
5340
|
+
*
|
|
5341
|
+
* passes {value} to {ref}
|
|
5342
|
+
*
|
|
5343
|
+
* WARNING: Be sure to only call this inside a callback that is passed as a ref.
|
|
5344
|
+
* Otherwise, make sure to cleanup the previous {ref} if it changes. See
|
|
5345
|
+
* https://github.com/mui/material-ui/issues/13539
|
|
5346
|
+
*
|
|
5347
|
+
* Useful if you want to expose the ref of an inner component to the public API
|
|
5348
|
+
* while still using it inside the component.
|
|
5349
|
+
* @param ref A ref callback or ref object. If anything falsy, this is a no-op.
|
|
5350
|
+
*/
|
|
5351
|
+
function setRef(ref, value) {
|
|
5352
|
+
if (typeof ref === 'function') {
|
|
5353
|
+
ref(value);
|
|
5354
|
+
} else if (ref) {
|
|
5355
|
+
ref.current = value;
|
|
5356
|
+
}
|
|
5357
|
+
}
|
|
5358
|
+
|
|
5359
|
+
/**
|
|
5360
|
+
* A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.
|
|
5361
|
+
* This is useful for effects that are only needed for client-side rendering but not for SSR.
|
|
5362
|
+
*
|
|
5363
|
+
* Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85
|
|
5364
|
+
* and confirm it doesn't apply to your use-case.
|
|
5365
|
+
*/
|
|
5366
|
+
const useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
5367
|
+
var useEnhancedEffect$1 = useEnhancedEffect;
|
|
5368
|
+
|
|
5369
|
+
let globalId = 0;
|
|
5370
|
+
function useGlobalId(idOverride) {
|
|
5371
|
+
const [defaultId, setDefaultId] = React.useState(idOverride);
|
|
5372
|
+
const id = idOverride || defaultId;
|
|
5373
|
+
React.useEffect(() => {
|
|
5374
|
+
if (defaultId == null) {
|
|
5375
|
+
// Fallback to this default id when possible.
|
|
5376
|
+
// Use the incrementing value for client-side rendering only.
|
|
5377
|
+
// We can't use it server-side.
|
|
5378
|
+
// If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem
|
|
5379
|
+
globalId += 1;
|
|
5380
|
+
setDefaultId(`mui-${globalId}`);
|
|
5381
|
+
}
|
|
5382
|
+
}, [defaultId]);
|
|
5383
|
+
return id;
|
|
5384
|
+
}
|
|
5385
|
+
|
|
5386
|
+
// downstream bundlers may remove unnecessary concatenation, but won't remove toString call -- Workaround for https://github.com/webpack/webpack/issues/14814
|
|
5387
|
+
const maybeReactUseId = React['useId'.toString()];
|
|
5388
|
+
/**
|
|
5389
|
+
*
|
|
5390
|
+
* @example <div id={useId()} />
|
|
5391
|
+
* @param idOverride
|
|
5392
|
+
* @returns {string}
|
|
5393
|
+
*/
|
|
5394
|
+
function useId(idOverride) {
|
|
5395
|
+
if (maybeReactUseId !== undefined) {
|
|
5396
|
+
const reactId = maybeReactUseId();
|
|
5397
|
+
return idOverride != null ? idOverride : reactId;
|
|
5398
|
+
}
|
|
5399
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.
|
|
5400
|
+
return useGlobalId(idOverride);
|
|
5401
|
+
}
|
|
5402
|
+
|
|
5403
|
+
function unsupportedProp(props, propName, componentName, location, propFullName) {
|
|
5404
|
+
{
|
|
5405
|
+
return null;
|
|
5406
|
+
}
|
|
5407
|
+
}
|
|
5408
|
+
|
|
5409
|
+
function useControlled({
|
|
5410
|
+
controlled,
|
|
5411
|
+
default: defaultProp,
|
|
5412
|
+
name,
|
|
5413
|
+
state = 'value'
|
|
5414
|
+
}) {
|
|
5415
|
+
// isControlled is ignored in the hook dependency lists as it should never change.
|
|
5416
|
+
const {
|
|
5417
|
+
current: isControlled
|
|
5418
|
+
} = React.useRef(controlled !== undefined);
|
|
5419
|
+
const [valueState, setValue] = React.useState(defaultProp);
|
|
5420
|
+
const value = isControlled ? controlled : valueState;
|
|
5421
|
+
const setValueIfUncontrolled = React.useCallback(newValue => {
|
|
5422
|
+
if (!isControlled) {
|
|
5423
|
+
setValue(newValue);
|
|
5424
|
+
}
|
|
5425
|
+
}, []);
|
|
5426
|
+
return [value, setValueIfUncontrolled];
|
|
5427
|
+
}
|
|
5428
|
+
|
|
5429
|
+
/**
|
|
5430
|
+
* Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892
|
|
5431
|
+
* See RFC in https://github.com/reactjs/rfcs/pull/220
|
|
5432
|
+
*/
|
|
5433
|
+
|
|
5434
|
+
function useEventCallback(fn) {
|
|
5435
|
+
const ref = React.useRef(fn);
|
|
5436
|
+
useEnhancedEffect$1(() => {
|
|
5437
|
+
ref.current = fn;
|
|
5438
|
+
});
|
|
5439
|
+
return React.useRef((...args) =>
|
|
5440
|
+
// @ts-expect-error hide `this`
|
|
5441
|
+
(0, ref.current)(...args)).current;
|
|
5442
|
+
}
|
|
5443
|
+
|
|
5444
|
+
function useForkRef(...refs) {
|
|
5445
|
+
/**
|
|
5446
|
+
* This will create a new function if the refs passed to this hook change and are all defined.
|
|
5447
|
+
* This means react will call the old forkRef with `null` and the new forkRef
|
|
5448
|
+
* with the ref. Cleanup naturally emerges from this behavior.
|
|
5449
|
+
*/
|
|
5450
|
+
return React.useMemo(() => {
|
|
5451
|
+
if (refs.every(ref => ref == null)) {
|
|
5452
|
+
return null;
|
|
5453
|
+
}
|
|
5454
|
+
return instance => {
|
|
5455
|
+
refs.forEach(ref => {
|
|
5456
|
+
setRef(ref, instance);
|
|
5457
|
+
});
|
|
5458
|
+
};
|
|
5459
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5460
|
+
}, refs);
|
|
5461
|
+
}
|
|
5462
|
+
|
|
5463
|
+
let hadKeyboardEvent = true;
|
|
5464
|
+
let hadFocusVisibleRecently = false;
|
|
5465
|
+
let hadFocusVisibleRecentlyTimeout;
|
|
5466
|
+
const inputTypesWhitelist = {
|
|
5467
|
+
text: true,
|
|
5468
|
+
search: true,
|
|
5469
|
+
url: true,
|
|
5470
|
+
tel: true,
|
|
5471
|
+
email: true,
|
|
5472
|
+
password: true,
|
|
5473
|
+
number: true,
|
|
5474
|
+
date: true,
|
|
5475
|
+
month: true,
|
|
5476
|
+
week: true,
|
|
5477
|
+
time: true,
|
|
5478
|
+
datetime: true,
|
|
5479
|
+
'datetime-local': true
|
|
5480
|
+
};
|
|
5481
|
+
|
|
5482
|
+
/**
|
|
5483
|
+
* Computes whether the given element should automatically trigger the
|
|
5484
|
+
* `focus-visible` class being added, i.e. whether it should always match
|
|
5485
|
+
* `:focus-visible` when focused.
|
|
5486
|
+
* @param {Element} node
|
|
5487
|
+
* @returns {boolean}
|
|
5488
|
+
*/
|
|
5489
|
+
function focusTriggersKeyboardModality(node) {
|
|
5490
|
+
const {
|
|
5491
|
+
type,
|
|
5492
|
+
tagName
|
|
5493
|
+
} = node;
|
|
5494
|
+
if (tagName === 'INPUT' && inputTypesWhitelist[type] && !node.readOnly) {
|
|
5495
|
+
return true;
|
|
5496
|
+
}
|
|
5497
|
+
if (tagName === 'TEXTAREA' && !node.readOnly) {
|
|
5498
|
+
return true;
|
|
5499
|
+
}
|
|
5500
|
+
if (node.isContentEditable) {
|
|
5501
|
+
return true;
|
|
5502
|
+
}
|
|
5503
|
+
return false;
|
|
5504
|
+
}
|
|
5505
|
+
|
|
5506
|
+
/**
|
|
5507
|
+
* Keep track of our keyboard modality state with `hadKeyboardEvent`.
|
|
5508
|
+
* If the most recent user interaction was via the keyboard;
|
|
5509
|
+
* and the key press did not include a meta, alt/option, or control key;
|
|
5510
|
+
* then the modality is keyboard. Otherwise, the modality is not keyboard.
|
|
5511
|
+
* @param {KeyboardEvent} event
|
|
5512
|
+
*/
|
|
5513
|
+
function handleKeyDown(event) {
|
|
5514
|
+
if (event.metaKey || event.altKey || event.ctrlKey) {
|
|
5515
|
+
return;
|
|
5516
|
+
}
|
|
5517
|
+
hadKeyboardEvent = true;
|
|
5518
|
+
}
|
|
5519
|
+
|
|
5520
|
+
/**
|
|
5521
|
+
* If at any point a user clicks with a pointing device, ensure that we change
|
|
5522
|
+
* the modality away from keyboard.
|
|
5523
|
+
* This avoids the situation where a user presses a key on an already focused
|
|
5524
|
+
* element, and then clicks on a different element, focusing it with a
|
|
5525
|
+
* pointing device, while we still think we're in keyboard modality.
|
|
5526
|
+
*/
|
|
5527
|
+
function handlePointerDown() {
|
|
5528
|
+
hadKeyboardEvent = false;
|
|
5529
|
+
}
|
|
5530
|
+
function handleVisibilityChange() {
|
|
5531
|
+
if (this.visibilityState === 'hidden') {
|
|
5532
|
+
// If the tab becomes active again, the browser will handle calling focus
|
|
5533
|
+
// on the element (Safari actually calls it twice).
|
|
5534
|
+
// If this tab change caused a blur on an element with focus-visible,
|
|
5535
|
+
// re-apply the class when the user switches back to the tab.
|
|
5536
|
+
if (hadFocusVisibleRecently) {
|
|
5537
|
+
hadKeyboardEvent = true;
|
|
5538
|
+
}
|
|
5539
|
+
}
|
|
5540
|
+
}
|
|
5541
|
+
function prepare(doc) {
|
|
5542
|
+
doc.addEventListener('keydown', handleKeyDown, true);
|
|
5543
|
+
doc.addEventListener('mousedown', handlePointerDown, true);
|
|
5544
|
+
doc.addEventListener('pointerdown', handlePointerDown, true);
|
|
5545
|
+
doc.addEventListener('touchstart', handlePointerDown, true);
|
|
5546
|
+
doc.addEventListener('visibilitychange', handleVisibilityChange, true);
|
|
5547
|
+
}
|
|
5548
|
+
function isFocusVisible(event) {
|
|
5549
|
+
const {
|
|
5550
|
+
target
|
|
5551
|
+
} = event;
|
|
5552
|
+
try {
|
|
5553
|
+
return target.matches(':focus-visible');
|
|
5554
|
+
} catch (error) {
|
|
5555
|
+
// Browsers not implementing :focus-visible will throw a SyntaxError.
|
|
5556
|
+
// We use our own heuristic for those browsers.
|
|
5557
|
+
// Rethrow might be better if it's not the expected error but do we really
|
|
5558
|
+
// want to crash if focus-visible malfunctioned?
|
|
5559
|
+
}
|
|
5560
|
+
|
|
5561
|
+
// No need for validFocusTarget check. The user does that by attaching it to
|
|
5562
|
+
// focusable events only.
|
|
5563
|
+
return hadKeyboardEvent || focusTriggersKeyboardModality(target);
|
|
5564
|
+
}
|
|
5565
|
+
function useIsFocusVisible() {
|
|
5566
|
+
const ref = React.useCallback(node => {
|
|
5567
|
+
if (node != null) {
|
|
5568
|
+
prepare(node.ownerDocument);
|
|
5569
|
+
}
|
|
5570
|
+
}, []);
|
|
5571
|
+
const isFocusVisibleRef = React.useRef(false);
|
|
5572
|
+
|
|
5573
|
+
/**
|
|
5574
|
+
* Should be called if a blur event is fired
|
|
5575
|
+
*/
|
|
5576
|
+
function handleBlurVisible() {
|
|
5577
|
+
// checking against potential state variable does not suffice if we focus and blur synchronously.
|
|
5578
|
+
// React wouldn't have time to trigger a re-render so `focusVisible` would be stale.
|
|
5579
|
+
// Ideally we would adjust `isFocusVisible(event)` to look at `relatedTarget` for blur events.
|
|
5580
|
+
// This doesn't work in IE11 due to https://github.com/facebook/react/issues/3751
|
|
5581
|
+
// TODO: check again if React releases their internal changes to focus event handling (https://github.com/facebook/react/pull/19186).
|
|
5582
|
+
if (isFocusVisibleRef.current) {
|
|
5583
|
+
// To detect a tab/window switch, we look for a blur event followed
|
|
5584
|
+
// rapidly by a visibility change.
|
|
5585
|
+
// If we don't see a visibility change within 100ms, it's probably a
|
|
5586
|
+
// regular focus change.
|
|
5587
|
+
hadFocusVisibleRecently = true;
|
|
5588
|
+
window.clearTimeout(hadFocusVisibleRecentlyTimeout);
|
|
5589
|
+
hadFocusVisibleRecentlyTimeout = window.setTimeout(() => {
|
|
5590
|
+
hadFocusVisibleRecently = false;
|
|
5591
|
+
}, 100);
|
|
5592
|
+
isFocusVisibleRef.current = false;
|
|
5593
|
+
return true;
|
|
5594
|
+
}
|
|
5595
|
+
return false;
|
|
5596
|
+
}
|
|
5597
|
+
|
|
5598
|
+
/**
|
|
5599
|
+
* Should be called if a blur event is fired
|
|
5600
|
+
*/
|
|
5601
|
+
function handleFocusVisible(event) {
|
|
5602
|
+
if (isFocusVisible(event)) {
|
|
5603
|
+
isFocusVisibleRef.current = true;
|
|
5604
|
+
return true;
|
|
5605
|
+
}
|
|
5606
|
+
return false;
|
|
5607
|
+
}
|
|
5608
|
+
return {
|
|
5609
|
+
isFocusVisibleRef,
|
|
5610
|
+
onFocus: handleFocusVisible,
|
|
5611
|
+
onBlur: handleBlurVisible,
|
|
5612
|
+
ref
|
|
5613
|
+
};
|
|
5668
5614
|
}
|
|
5669
5615
|
|
|
5670
5616
|
/**
|
|
5671
|
-
*
|
|
5672
|
-
*
|
|
5673
|
-
* @
|
|
5674
|
-
*
|
|
5675
|
-
* LICENSE file in the root directory of this source tree.
|
|
5617
|
+
* Add keys, values of `defaultProps` that does not exist in `props`
|
|
5618
|
+
* @param {object} defaultProps
|
|
5619
|
+
* @param {object} props
|
|
5620
|
+
* @returns {object} resolved props
|
|
5676
5621
|
*/
|
|
5677
|
-
function
|
|
5678
|
-
const
|
|
5679
|
-
|
|
5622
|
+
function resolveProps(defaultProps, props) {
|
|
5623
|
+
const output = _extends$2({}, props);
|
|
5624
|
+
Object.keys(defaultProps).forEach(propName => {
|
|
5625
|
+
if (propName.toString().match(/^(components|slots)$/)) {
|
|
5626
|
+
output[propName] = _extends$2({}, defaultProps[propName], output[propName]);
|
|
5627
|
+
} else if (propName.toString().match(/^(componentsProps|slotProps)$/)) {
|
|
5628
|
+
const defaultSlotProps = defaultProps[propName] || {};
|
|
5629
|
+
const slotProps = props[propName];
|
|
5630
|
+
output[propName] = {};
|
|
5631
|
+
if (!slotProps || !Object.keys(slotProps)) {
|
|
5632
|
+
// Reduce the iteration if the slot props is empty
|
|
5633
|
+
output[propName] = defaultSlotProps;
|
|
5634
|
+
} else if (!defaultSlotProps || !Object.keys(defaultSlotProps)) {
|
|
5635
|
+
// Reduce the iteration if the default slot props is empty
|
|
5636
|
+
output[propName] = slotProps;
|
|
5637
|
+
} else {
|
|
5638
|
+
output[propName] = _extends$2({}, slotProps);
|
|
5639
|
+
Object.keys(defaultSlotProps).forEach(slotPropName => {
|
|
5640
|
+
output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);
|
|
5641
|
+
});
|
|
5642
|
+
}
|
|
5643
|
+
} else if (output[propName] === undefined) {
|
|
5644
|
+
output[propName] = defaultProps[propName];
|
|
5645
|
+
}
|
|
5646
|
+
});
|
|
5647
|
+
return output;
|
|
5680
5648
|
}
|
|
5681
5649
|
|
|
5682
|
-
|
|
5683
|
-
const
|
|
5684
|
-
|
|
5685
|
-
//
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
5697
|
-
target[key] = source[key];
|
|
5650
|
+
function composeClasses(slots, getUtilityClass, classes = undefined) {
|
|
5651
|
+
const output = {};
|
|
5652
|
+
Object.keys(slots).forEach(
|
|
5653
|
+
// `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
|
|
5654
|
+
// @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
|
|
5655
|
+
slot => {
|
|
5656
|
+
output[slot] = slots[slot].reduce((acc, key) => {
|
|
5657
|
+
if (key) {
|
|
5658
|
+
const utilityClass = getUtilityClass(key);
|
|
5659
|
+
if (utilityClass !== '') {
|
|
5660
|
+
acc.push(utilityClass);
|
|
5661
|
+
}
|
|
5662
|
+
if (classes && classes[key]) {
|
|
5663
|
+
acc.push(classes[key]);
|
|
5698
5664
|
}
|
|
5699
5665
|
}
|
|
5666
|
+
return acc;
|
|
5667
|
+
}, []).join(' ');
|
|
5668
|
+
});
|
|
5669
|
+
return output;
|
|
5670
|
+
}
|
|
5671
|
+
|
|
5672
|
+
const defaultGenerator = componentName => componentName;
|
|
5673
|
+
const createClassNameGenerator = () => {
|
|
5674
|
+
let generate = defaultGenerator;
|
|
5675
|
+
return {
|
|
5676
|
+
configure(generator) {
|
|
5677
|
+
generate = generator;
|
|
5678
|
+
},
|
|
5679
|
+
generate(componentName) {
|
|
5680
|
+
return generate(componentName);
|
|
5681
|
+
},
|
|
5682
|
+
reset() {
|
|
5683
|
+
generate = defaultGenerator;
|
|
5700
5684
|
}
|
|
5701
|
-
return target;
|
|
5702
5685
|
};
|
|
5703
|
-
|
|
5686
|
+
};
|
|
5687
|
+
const ClassNameGenerator = createClassNameGenerator();
|
|
5688
|
+
|
|
5689
|
+
// If GlobalStateSlot is changed, GLOBAL_STATE_CLASSES in
|
|
5690
|
+
// \packages\api-docs-builder\utils\parseSlotsAndClasses.ts must be updated accordingly.
|
|
5691
|
+
|
|
5692
|
+
const globalStateClassesMapping = {
|
|
5693
|
+
active: 'active',
|
|
5694
|
+
checked: 'checked',
|
|
5695
|
+
completed: 'completed',
|
|
5696
|
+
disabled: 'disabled',
|
|
5697
|
+
error: 'error',
|
|
5698
|
+
expanded: 'expanded',
|
|
5699
|
+
focused: 'focused',
|
|
5700
|
+
focusVisible: 'focusVisible',
|
|
5701
|
+
open: 'open',
|
|
5702
|
+
readOnly: 'readOnly',
|
|
5703
|
+
required: 'required',
|
|
5704
|
+
selected: 'selected'
|
|
5705
|
+
};
|
|
5706
|
+
function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {
|
|
5707
|
+
const globalStateClass = globalStateClassesMapping[slot];
|
|
5708
|
+
return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`;
|
|
5704
5709
|
}
|
|
5705
5710
|
|
|
5706
|
-
function
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
key = sourceKeys[i];
|
|
5713
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
5714
|
-
target[key] = source[key];
|
|
5715
|
-
}
|
|
5716
|
-
return target;
|
|
5711
|
+
function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {
|
|
5712
|
+
const result = {};
|
|
5713
|
+
slots.forEach(slot => {
|
|
5714
|
+
result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);
|
|
5715
|
+
});
|
|
5716
|
+
return result;
|
|
5717
5717
|
}
|
|
5718
5718
|
|
|
5719
5719
|
const _excluded$g = ["values", "unit", "step"];
|
|
@@ -5725,7 +5725,7 @@ const sortBreakpointsValues = values => {
|
|
|
5725
5725
|
// Sort in ascending order
|
|
5726
5726
|
breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);
|
|
5727
5727
|
return breakpointsAsArray.reduce((acc, obj) => {
|
|
5728
|
-
return _extends$
|
|
5728
|
+
return _extends$3({}, acc, {
|
|
5729
5729
|
[obj.key]: obj.val
|
|
5730
5730
|
});
|
|
5731
5731
|
}, {});
|
|
@@ -5747,7 +5747,6 @@ function createBreakpoints(breakpoints) {
|
|
|
5747
5747
|
// desktop
|
|
5748
5748
|
xl: 1536 // large screen
|
|
5749
5749
|
},
|
|
5750
|
-
|
|
5751
5750
|
unit = 'px',
|
|
5752
5751
|
step = 5
|
|
5753
5752
|
} = breakpoints,
|
|
@@ -5783,7 +5782,7 @@ function createBreakpoints(breakpoints) {
|
|
|
5783
5782
|
}
|
|
5784
5783
|
return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');
|
|
5785
5784
|
}
|
|
5786
|
-
return _extends$
|
|
5785
|
+
return _extends$3({
|
|
5787
5786
|
keys,
|
|
5788
5787
|
values: sortedValues,
|
|
5789
5788
|
up,
|
|
@@ -5822,7 +5821,6 @@ const values = {
|
|
|
5822
5821
|
// desktop
|
|
5823
5822
|
xl: 1536 // large screen
|
|
5824
5823
|
};
|
|
5825
|
-
|
|
5826
5824
|
const defaultBreakpoints = {
|
|
5827
5825
|
// Sorted ASC by size. That's important.
|
|
5828
5826
|
// It can't be configured as it's used statically for propTypes.
|
|
@@ -6069,8 +6067,6 @@ padding.filterProps = paddingKeys;
|
|
|
6069
6067
|
|
|
6070
6068
|
// The different signatures imply different meaning for their arguments that can't be expressed structurally.
|
|
6071
6069
|
// We express the difference with variable names.
|
|
6072
|
-
/* tslint:disable:unified-signatures */
|
|
6073
|
-
/* tslint:enable:unified-signatures */
|
|
6074
6070
|
|
|
6075
6071
|
function createSpacing(spacingInput = 8) {
|
|
6076
6072
|
// Already transformed.
|
|
@@ -6672,7 +6668,6 @@ function unstable_createStyleFunctionSx() {
|
|
|
6672
6668
|
if (!sx) {
|
|
6673
6669
|
return null; // Emotion & styled-components will neglect null
|
|
6674
6670
|
}
|
|
6675
|
-
|
|
6676
6671
|
const config = (_theme$unstable_sxCon = theme.unstable_sxConfig) != null ? _theme$unstable_sxCon : defaultSxConfig$1;
|
|
6677
6672
|
|
|
6678
6673
|
/*
|
|
@@ -6728,7 +6723,6 @@ function unstable_createStyleFunctionSx() {
|
|
|
6728
6723
|
}
|
|
6729
6724
|
const styleFunctionSx = unstable_createStyleFunctionSx();
|
|
6730
6725
|
styleFunctionSx.filterProps = ['sx'];
|
|
6731
|
-
var styleFunctionSx$1 = styleFunctionSx;
|
|
6732
6726
|
|
|
6733
6727
|
const _excluded$f = ["breakpoints", "palette", "spacing", "shape"];
|
|
6734
6728
|
function createTheme$1(options = {}, ...args) {
|
|
@@ -6746,16 +6740,16 @@ function createTheme$1(options = {}, ...args) {
|
|
|
6746
6740
|
direction: 'ltr',
|
|
6747
6741
|
components: {},
|
|
6748
6742
|
// Inject component definitions.
|
|
6749
|
-
palette: _extends$
|
|
6743
|
+
palette: _extends$3({
|
|
6750
6744
|
mode: 'light'
|
|
6751
6745
|
}, paletteInput),
|
|
6752
6746
|
spacing,
|
|
6753
|
-
shape: _extends$
|
|
6747
|
+
shape: _extends$3({}, shape$1, shapeInput)
|
|
6754
6748
|
}, other);
|
|
6755
6749
|
muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);
|
|
6756
|
-
muiTheme.unstable_sxConfig = _extends$
|
|
6750
|
+
muiTheme.unstable_sxConfig = _extends$3({}, defaultSxConfig$1, other == null ? void 0 : other.unstable_sxConfig);
|
|
6757
6751
|
muiTheme.unstable_sx = function sx(props) {
|
|
6758
|
-
return styleFunctionSx
|
|
6752
|
+
return styleFunctionSx({
|
|
6759
6753
|
sx: props,
|
|
6760
6754
|
theme: this
|
|
6761
6755
|
});
|
|
@@ -6824,10 +6818,17 @@ const getStyleOverrides = (name, theme) => {
|
|
|
6824
6818
|
return null;
|
|
6825
6819
|
};
|
|
6826
6820
|
const transformVariants = variants => {
|
|
6821
|
+
let numOfCallbacks = 0;
|
|
6827
6822
|
const variantsStyles = {};
|
|
6828
6823
|
if (variants) {
|
|
6829
6824
|
variants.forEach(definition => {
|
|
6830
|
-
|
|
6825
|
+
let key = '';
|
|
6826
|
+
if (typeof definition.props === 'function') {
|
|
6827
|
+
key = `callback${numOfCallbacks}`;
|
|
6828
|
+
numOfCallbacks += 1;
|
|
6829
|
+
} else {
|
|
6830
|
+
key = propsToClassKey(definition.props);
|
|
6831
|
+
}
|
|
6831
6832
|
variantsStyles[key] = definition.style;
|
|
6832
6833
|
});
|
|
6833
6834
|
}
|
|
@@ -6845,16 +6846,29 @@ const variantsResolver = (props, styles, variants) => {
|
|
|
6845
6846
|
ownerState = {}
|
|
6846
6847
|
} = props;
|
|
6847
6848
|
const variantsStyles = [];
|
|
6849
|
+
let numOfCallbacks = 0;
|
|
6848
6850
|
if (variants) {
|
|
6849
6851
|
variants.forEach(variant => {
|
|
6850
6852
|
let isMatch = true;
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6853
|
+
if (typeof variant.props === 'function') {
|
|
6854
|
+
const propsToCheck = _extends$3({}, props, ownerState);
|
|
6855
|
+
isMatch = variant.props(propsToCheck);
|
|
6856
|
+
} else {
|
|
6857
|
+
Object.keys(variant.props).forEach(key => {
|
|
6858
|
+
if (ownerState[key] !== variant.props[key] && props[key] !== variant.props[key]) {
|
|
6859
|
+
isMatch = false;
|
|
6860
|
+
}
|
|
6861
|
+
});
|
|
6862
|
+
}
|
|
6856
6863
|
if (isMatch) {
|
|
6857
|
-
|
|
6864
|
+
if (typeof variant.props === 'function') {
|
|
6865
|
+
variantsStyles.push(styles[`callback${numOfCallbacks}`]);
|
|
6866
|
+
} else {
|
|
6867
|
+
variantsStyles.push(styles[propsToClassKey(variant.props)]);
|
|
6868
|
+
}
|
|
6869
|
+
}
|
|
6870
|
+
if (typeof variant.props === 'function') {
|
|
6871
|
+
numOfCallbacks += 1;
|
|
6858
6872
|
}
|
|
6859
6873
|
});
|
|
6860
6874
|
}
|
|
@@ -6896,8 +6910,8 @@ const muiStyledFunctionResolver = ({
|
|
|
6896
6910
|
defaultTheme,
|
|
6897
6911
|
themeId
|
|
6898
6912
|
}) => {
|
|
6899
|
-
const resolvedStyles = styledArg(_extends$
|
|
6900
|
-
theme: resolveTheme(_extends$
|
|
6913
|
+
const resolvedStyles = styledArg(_extends$3({}, props, {
|
|
6914
|
+
theme: resolveTheme(_extends$3({}, props, {
|
|
6901
6915
|
defaultTheme,
|
|
6902
6916
|
themeId
|
|
6903
6917
|
}))
|
|
@@ -6921,8 +6935,8 @@ function createStyled(input = {}) {
|
|
|
6921
6935
|
slotShouldForwardProp = shouldForwardProp
|
|
6922
6936
|
} = input;
|
|
6923
6937
|
const systemSx = props => {
|
|
6924
|
-
return styleFunctionSx
|
|
6925
|
-
theme: resolveTheme(_extends$
|
|
6938
|
+
return styleFunctionSx(_extends$3({}, props, {
|
|
6939
|
+
theme: resolveTheme(_extends$3({}, props, {
|
|
6926
6940
|
defaultTheme,
|
|
6927
6941
|
themeId
|
|
6928
6942
|
}))
|
|
@@ -6963,7 +6977,7 @@ function createStyled(input = {}) {
|
|
|
6963
6977
|
// for string (html) tag, preserve the behavior in emotion & styled-components.
|
|
6964
6978
|
shouldForwardPropOption = undefined;
|
|
6965
6979
|
}
|
|
6966
|
-
const defaultStyledResolver = styled$
|
|
6980
|
+
const defaultStyledResolver = styled$1(tag, _extends$3({
|
|
6967
6981
|
shouldForwardProp: shouldForwardPropOption,
|
|
6968
6982
|
label
|
|
6969
6983
|
}, options));
|
|
@@ -7029,7 +7043,7 @@ function createStyled(input = {}) {
|
|
|
7029
7043
|
}
|
|
7030
7044
|
if (componentName && overridesResolver) {
|
|
7031
7045
|
expressionsWithDefaultTheme.push(props => {
|
|
7032
|
-
const theme = resolveTheme(_extends$
|
|
7046
|
+
const theme = resolveTheme(_extends$3({}, props, {
|
|
7033
7047
|
defaultTheme,
|
|
7034
7048
|
themeId
|
|
7035
7049
|
}));
|
|
@@ -7037,7 +7051,7 @@ function createStyled(input = {}) {
|
|
|
7037
7051
|
if (styleOverrides) {
|
|
7038
7052
|
const resolvedStyleOverrides = {};
|
|
7039
7053
|
Object.entries(styleOverrides).forEach(([slotKey, slotStyle]) => {
|
|
7040
|
-
resolvedStyleOverrides[slotKey] = typeof slotStyle === 'function' ? slotStyle(_extends$
|
|
7054
|
+
resolvedStyleOverrides[slotKey] = typeof slotStyle === 'function' ? slotStyle(_extends$3({}, props, {
|
|
7041
7055
|
theme
|
|
7042
7056
|
})) : slotStyle;
|
|
7043
7057
|
});
|
|
@@ -7048,7 +7062,7 @@ function createStyled(input = {}) {
|
|
|
7048
7062
|
}
|
|
7049
7063
|
if (componentName && !skipVariantsResolver) {
|
|
7050
7064
|
expressionsWithDefaultTheme.push(props => {
|
|
7051
|
-
const theme = resolveTheme(_extends$
|
|
7065
|
+
const theme = resolveTheme(_extends$3({}, props, {
|
|
7052
7066
|
defaultTheme,
|
|
7053
7067
|
themeId
|
|
7054
7068
|
}));
|
|
@@ -7250,7 +7264,6 @@ function getLuminance(color) {
|
|
|
7250
7264
|
if (color.type !== 'color') {
|
|
7251
7265
|
val /= 255; // normalized
|
|
7252
7266
|
}
|
|
7253
|
-
|
|
7254
7267
|
return val <= 0.03928 ? val / 12.92 : ((val + 0.055) / 1.055) ** 2.4;
|
|
7255
7268
|
});
|
|
7256
7269
|
|
|
@@ -7378,7 +7391,7 @@ function useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {
|
|
|
7378
7391
|
const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme;
|
|
7379
7392
|
if (typeof localTheme === 'function') {
|
|
7380
7393
|
const mergedTheme = localTheme(resolvedTheme);
|
|
7381
|
-
const result = themeId ? _extends$
|
|
7394
|
+
const result = themeId ? _extends$3({}, upperTheme, {
|
|
7382
7395
|
[themeId]: mergedTheme
|
|
7383
7396
|
}) : mergedTheme;
|
|
7384
7397
|
// must return a function for the private theme to NOT merge with the upper theme.
|
|
@@ -7388,9 +7401,9 @@ function useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {
|
|
|
7388
7401
|
}
|
|
7389
7402
|
return result;
|
|
7390
7403
|
}
|
|
7391
|
-
return themeId ? _extends$
|
|
7404
|
+
return themeId ? _extends$3({}, upperTheme, {
|
|
7392
7405
|
[themeId]: localTheme
|
|
7393
|
-
}) : _extends$
|
|
7406
|
+
}) : _extends$3({}, upperTheme, localTheme);
|
|
7394
7407
|
}, [themeId, upperTheme, localTheme, isPrivate]);
|
|
7395
7408
|
}
|
|
7396
7409
|
|
|
@@ -7432,7 +7445,7 @@ function adaptV4Theme(inputTheme) {
|
|
|
7432
7445
|
styleOverrides = {}
|
|
7433
7446
|
} = inputTheme,
|
|
7434
7447
|
other = _objectWithoutPropertiesLoose$1(inputTheme, _excluded$c);
|
|
7435
|
-
const theme = _extends$
|
|
7448
|
+
const theme = _extends$4({}, other, {
|
|
7436
7449
|
components: {}
|
|
7437
7450
|
});
|
|
7438
7451
|
|
|
@@ -7466,13 +7479,13 @@ function adaptV4Theme(inputTheme) {
|
|
|
7466
7479
|
// theme.mixins.gutters
|
|
7467
7480
|
const breakpoints = createBreakpoints(inputTheme.breakpoints || {});
|
|
7468
7481
|
const spacing = theme.spacing;
|
|
7469
|
-
theme.mixins = _extends$
|
|
7482
|
+
theme.mixins = _extends$4({
|
|
7470
7483
|
gutters: (styles = {}) => {
|
|
7471
|
-
return _extends$
|
|
7484
|
+
return _extends$4({
|
|
7472
7485
|
paddingLeft: spacing(2),
|
|
7473
7486
|
paddingRight: spacing(2)
|
|
7474
7487
|
}, styles, {
|
|
7475
|
-
[breakpoints.up('sm')]: _extends$
|
|
7488
|
+
[breakpoints.up('sm')]: _extends$4({
|
|
7476
7489
|
paddingLeft: spacing(3),
|
|
7477
7490
|
paddingRight: spacing(3)
|
|
7478
7491
|
}, styles[breakpoints.up('sm')])
|
|
@@ -7485,7 +7498,7 @@ function adaptV4Theme(inputTheme) {
|
|
|
7485
7498
|
} = palette,
|
|
7486
7499
|
paletteRest = _objectWithoutPropertiesLoose$1(palette, _excluded2$1);
|
|
7487
7500
|
const finalMode = modeInput || typeInput || 'light';
|
|
7488
|
-
theme.palette = _extends$
|
|
7501
|
+
theme.palette = _extends$4({
|
|
7489
7502
|
// theme.palette.text.hint
|
|
7490
7503
|
text: {
|
|
7491
7504
|
hint: finalMode === 'dark' ? 'rgba(255, 255, 255, 0.5)' : 'rgba(0, 0, 0, 0.38)'
|
|
@@ -7497,7 +7510,7 @@ function adaptV4Theme(inputTheme) {
|
|
|
7497
7510
|
}
|
|
7498
7511
|
|
|
7499
7512
|
function createMixins(breakpoints, mixins) {
|
|
7500
|
-
return _extends$
|
|
7513
|
+
return _extends$4({
|
|
7501
7514
|
toolbar: {
|
|
7502
7515
|
minHeight: 56,
|
|
7503
7516
|
[breakpoints.up('xs')]: {
|
|
@@ -7835,7 +7848,7 @@ function createPalette(palette) {
|
|
|
7835
7848
|
lightShade = 300,
|
|
7836
7849
|
darkShade = 700
|
|
7837
7850
|
}) => {
|
|
7838
|
-
color = _extends$
|
|
7851
|
+
color = _extends$4({}, color);
|
|
7839
7852
|
if (!color.main && color[mainShade]) {
|
|
7840
7853
|
color.main = color[mainShade];
|
|
7841
7854
|
}
|
|
@@ -7856,9 +7869,9 @@ function createPalette(palette) {
|
|
|
7856
7869
|
dark: dark$1,
|
|
7857
7870
|
light: light$1
|
|
7858
7871
|
};
|
|
7859
|
-
const paletteOutput = deepmerge(_extends$
|
|
7872
|
+
const paletteOutput = deepmerge(_extends$4({
|
|
7860
7873
|
// A collection of common colors.
|
|
7861
|
-
common: _extends$
|
|
7874
|
+
common: _extends$4({}, common$1),
|
|
7862
7875
|
// prevent mutable object.
|
|
7863
7876
|
// The palette mode, can be light or dark.
|
|
7864
7877
|
mode,
|
|
@@ -7946,7 +7959,7 @@ function createTypography(palette, typography) {
|
|
|
7946
7959
|
other = _objectWithoutPropertiesLoose$1(_ref, _excluded$a);
|
|
7947
7960
|
const coef = fontSize / 14;
|
|
7948
7961
|
const pxToRem = pxToRem2 || (size => `${size / htmlFontSize * coef}rem`);
|
|
7949
|
-
const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => _extends$
|
|
7962
|
+
const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => _extends$4({
|
|
7950
7963
|
fontFamily,
|
|
7951
7964
|
fontWeight,
|
|
7952
7965
|
fontSize: pxToRem(size),
|
|
@@ -7978,7 +7991,7 @@ function createTypography(palette, typography) {
|
|
|
7978
7991
|
letterSpacing: 'inherit'
|
|
7979
7992
|
}
|
|
7980
7993
|
};
|
|
7981
|
-
return deepmerge(_extends$
|
|
7994
|
+
return deepmerge(_extends$4({
|
|
7982
7995
|
htmlFontSize,
|
|
7983
7996
|
pxToRem,
|
|
7984
7997
|
fontFamily,
|
|
@@ -8001,7 +8014,6 @@ function createShadow(...px) {
|
|
|
8001
8014
|
|
|
8002
8015
|
// Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss
|
|
8003
8016
|
const shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];
|
|
8004
|
-
var shadows$1 = shadows;
|
|
8005
8017
|
|
|
8006
8018
|
const _excluded$9 = ["duration", "easing", "delay"];
|
|
8007
8019
|
// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves
|
|
@@ -8046,8 +8058,8 @@ function getAutoHeightDuration(height) {
|
|
|
8046
8058
|
return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10);
|
|
8047
8059
|
}
|
|
8048
8060
|
function createTransitions(inputTransitions) {
|
|
8049
|
-
const mergedEasing = _extends$
|
|
8050
|
-
const mergedDuration = _extends$
|
|
8061
|
+
const mergedEasing = _extends$4({}, easing, inputTransitions.easing);
|
|
8062
|
+
const mergedDuration = _extends$4({}, duration, inputTransitions.duration);
|
|
8051
8063
|
const create = (props = ['all'], options = {}) => {
|
|
8052
8064
|
const {
|
|
8053
8065
|
duration: durationOption = mergedDuration.standard,
|
|
@@ -8057,7 +8069,7 @@ function createTransitions(inputTransitions) {
|
|
|
8057
8069
|
_objectWithoutPropertiesLoose$1(options, _excluded$9);
|
|
8058
8070
|
return (Array.isArray(props) ? props : [props]).map(animatedProp => `${animatedProp} ${typeof durationOption === 'string' ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === 'string' ? delay : formatMs(delay)}`).join(',');
|
|
8059
8071
|
};
|
|
8060
|
-
return _extends$
|
|
8072
|
+
return _extends$4({
|
|
8061
8073
|
getAutoHeightDuration,
|
|
8062
8074
|
create
|
|
8063
8075
|
}, inputTransitions, {
|
|
@@ -8098,16 +8110,16 @@ function createTheme(options = {}, ...args) {
|
|
|
8098
8110
|
mixins: createMixins(systemTheme.breakpoints, mixinsInput),
|
|
8099
8111
|
palette,
|
|
8100
8112
|
// Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol.
|
|
8101
|
-
shadows: shadows
|
|
8113
|
+
shadows: shadows.slice(),
|
|
8102
8114
|
typography: createTypography(palette, typographyInput),
|
|
8103
8115
|
transitions: createTransitions(transitionsInput),
|
|
8104
|
-
zIndex: _extends$
|
|
8116
|
+
zIndex: _extends$4({}, zIndex$1)
|
|
8105
8117
|
});
|
|
8106
8118
|
muiTheme = deepmerge(muiTheme, other);
|
|
8107
8119
|
muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);
|
|
8108
|
-
muiTheme.unstable_sxConfig = _extends$
|
|
8120
|
+
muiTheme.unstable_sxConfig = _extends$4({}, defaultSxConfig$1, other == null ? void 0 : other.unstable_sxConfig);
|
|
8109
8121
|
muiTheme.unstable_sx = function sx(props) {
|
|
8110
|
-
return styleFunctionSx
|
|
8122
|
+
return styleFunctionSx({
|
|
8111
8123
|
sx: props,
|
|
8112
8124
|
theme: this
|
|
8113
8125
|
});
|
|
@@ -8141,7 +8153,6 @@ const styled = createStyled({
|
|
|
8141
8153
|
defaultTheme: defaultTheme$1,
|
|
8142
8154
|
rootShouldForwardProp
|
|
8143
8155
|
});
|
|
8144
|
-
var styled$1 = styled;
|
|
8145
8156
|
|
|
8146
8157
|
const _excluded$7 = ["theme"];
|
|
8147
8158
|
function ThemeProvider(_ref) {
|
|
@@ -8150,7 +8161,7 @@ function ThemeProvider(_ref) {
|
|
|
8150
8161
|
} = _ref,
|
|
8151
8162
|
props = _objectWithoutPropertiesLoose$1(_ref, _excluded$7);
|
|
8152
8163
|
const scopedTheme = themeInput[THEME_ID];
|
|
8153
|
-
return /*#__PURE__*/jsxRuntimeExports.jsx(ThemeProvider$1, _extends$
|
|
8164
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx(ThemeProvider$1, _extends$4({}, props, {
|
|
8154
8165
|
themeId: scopedTheme ? THEME_ID : undefined,
|
|
8155
8166
|
theme: scopedTheme || themeInput
|
|
8156
8167
|
}));
|
|
@@ -8530,8 +8541,8 @@ function create$3(definition) {
|
|
|
8530
8541
|
return cache[key];
|
|
8531
8542
|
}
|
|
8532
8543
|
|
|
8533
|
-
const NEBULA_VERSION_HASH = "
|
|
8534
|
-
ClassNameGenerator
|
|
8544
|
+
const NEBULA_VERSION_HASH = "b12a" ;
|
|
8545
|
+
ClassNameGenerator.configure(componentName => {
|
|
8535
8546
|
return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
|
|
8536
8547
|
});
|
|
8537
8548
|
|
|
@@ -8762,7 +8773,7 @@ function boot(_ref2) {
|
|
|
8762
8773
|
const appRef = React__default.createRef();
|
|
8763
8774
|
const element = document.createElement('div');
|
|
8764
8775
|
element.style.display = 'none';
|
|
8765
|
-
element.setAttribute('data-nebulajs-version', "5.0.0-alpha.
|
|
8776
|
+
element.setAttribute('data-nebulajs-version', "5.0.0-alpha.2" );
|
|
8766
8777
|
element.setAttribute('data-app-id', app.id);
|
|
8767
8778
|
document.body.appendChild(element);
|
|
8768
8779
|
if (context) {
|
|
@@ -9111,7 +9122,7 @@ function getFontSize(size) {
|
|
|
9111
9122
|
}
|
|
9112
9123
|
return '16px';
|
|
9113
9124
|
}
|
|
9114
|
-
function SvgIcon$
|
|
9125
|
+
function SvgIcon$1(_ref) {
|
|
9115
9126
|
let {
|
|
9116
9127
|
size,
|
|
9117
9128
|
style = {},
|
|
@@ -9161,7 +9172,7 @@ const remove = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
9161
9172
|
}
|
|
9162
9173
|
}]
|
|
9163
9174
|
});
|
|
9164
|
-
var Remove = (props => SvgIcon$
|
|
9175
|
+
var Remove = (props => SvgIcon$1(remove(props)));
|
|
9165
9176
|
|
|
9166
9177
|
const lock = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
9167
9178
|
shapes: [{
|
|
@@ -9171,7 +9182,7 @@ const lock = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
9171
9182
|
}
|
|
9172
9183
|
}]
|
|
9173
9184
|
});
|
|
9174
|
-
var Lock = (props => SvgIcon$
|
|
9185
|
+
var Lock = (props => SvgIcon$1(lock(props)));
|
|
9175
9186
|
|
|
9176
9187
|
const unlock = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
9177
9188
|
shapes: [{
|
|
@@ -9181,7 +9192,7 @@ const unlock = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
9181
9192
|
}
|
|
9182
9193
|
}]
|
|
9183
9194
|
});
|
|
9184
|
-
var Unlock = (props => SvgIcon$
|
|
9195
|
+
var Unlock = (props => SvgIcon$1(unlock(props)));
|
|
9185
9196
|
|
|
9186
9197
|
function isRangeVisible(_ref) {
|
|
9187
9198
|
var lastRenderedStartIndex = _ref.lastRenderedStartIndex,
|
|
@@ -9822,7 +9833,7 @@ const tick = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
9822
9833
|
}
|
|
9823
9834
|
}]
|
|
9824
9835
|
});
|
|
9825
|
-
var Tick = (props => SvgIcon$
|
|
9836
|
+
var Tick = (props => SvgIcon$1(tick(props)));
|
|
9826
9837
|
|
|
9827
9838
|
/**
|
|
9828
9839
|
* @ignore
|
|
@@ -10025,7 +10036,7 @@ const ellipsis = {
|
|
|
10025
10036
|
};
|
|
10026
10037
|
const iconWidth = 24; // tick and lock icon width in px
|
|
10027
10038
|
|
|
10028
|
-
const RowColRoot = styled
|
|
10039
|
+
const RowColRoot = styled('div', {
|
|
10029
10040
|
shouldForwardProp: prop => !['checkboxes', 'isGridMode', 'isGridCol', 'dense', 'direction', 'sizes', 'frequencyMode', 'freqHitsValue', 'layout', 'styles'].includes(prop)
|
|
10030
10041
|
})(_ref4 => {
|
|
10031
10042
|
let {
|
|
@@ -10233,7 +10244,7 @@ const classes$b = {
|
|
|
10233
10244
|
checkbox: "".concat(PREFIX$b, "-checkbox"),
|
|
10234
10245
|
dense: "".concat(PREFIX$b, "-dense")
|
|
10235
10246
|
};
|
|
10236
|
-
const StyledCheckbox = styled
|
|
10247
|
+
const StyledCheckbox = styled(Checkbox, {
|
|
10237
10248
|
shouldForwardProp: p => p !== 'styles'
|
|
10238
10249
|
})(_ref => {
|
|
10239
10250
|
let {
|
|
@@ -10330,7 +10341,7 @@ const classes$a = {
|
|
|
10330
10341
|
denseRadioButton: "".concat(PREFIX$a, "-denseRadioButton"),
|
|
10331
10342
|
radioButton: "".concat(PREFIX$a, "-radioButton")
|
|
10332
10343
|
};
|
|
10333
|
-
const StyledRadio = styled
|
|
10344
|
+
const StyledRadio = styled(Radio)(_ref => {
|
|
10334
10345
|
let {
|
|
10335
10346
|
theme,
|
|
10336
10347
|
checked
|
|
@@ -10647,7 +10658,7 @@ function getGridItemSizes(_ref) {
|
|
|
10647
10658
|
}
|
|
10648
10659
|
}
|
|
10649
10660
|
|
|
10650
|
-
const ItemGrid = styled
|
|
10661
|
+
const ItemGrid = styled(Grid, {
|
|
10651
10662
|
shouldForwardProp: prop => !['dataLayout', 'layoutOrder', 'itemPadding', 'cellPaddingRight', 'direction', 'fillHeight'].includes(prop)
|
|
10652
10663
|
})(_ref => {
|
|
10653
10664
|
let {
|
|
@@ -12788,7 +12799,7 @@ function getStyledComponents() {
|
|
|
12788
12799
|
backgroundColor: scrollBarThumbHover
|
|
12789
12800
|
}
|
|
12790
12801
|
});
|
|
12791
|
-
const StyledFixedSizeList = styled$
|
|
12802
|
+
const StyledFixedSizeList = styled$2(FixedSizeList, {
|
|
12792
12803
|
shouldForwardProp: prop => prop !== 'scrollDisabled'
|
|
12793
12804
|
})(_ref => {
|
|
12794
12805
|
let {
|
|
@@ -12798,7 +12809,7 @@ function getStyledComponents() {
|
|
|
12798
12809
|
["&.".concat(classes$9.styledScrollbars)]: getScrollbarStyling(scrollDisabled)
|
|
12799
12810
|
};
|
|
12800
12811
|
});
|
|
12801
|
-
const StyledFixedSizeGrid = styled$
|
|
12812
|
+
const StyledFixedSizeGrid = styled$2(FixedSizeGrid, {
|
|
12802
12813
|
shouldForwardProp: prop => prop !== 'scrollDisabled'
|
|
12803
12814
|
})(_ref2 => {
|
|
12804
12815
|
let {
|
|
@@ -13415,7 +13426,7 @@ function useDataStore(model) {
|
|
|
13415
13426
|
};
|
|
13416
13427
|
}
|
|
13417
13428
|
|
|
13418
|
-
const StyledText = styled
|
|
13429
|
+
const StyledText = styled(Typography, {
|
|
13419
13430
|
shouldForwardProp: p => !['width', 'dense'].includes(p)
|
|
13420
13431
|
})(_ref => {
|
|
13421
13432
|
let {
|
|
@@ -13488,7 +13499,7 @@ const useUtilityClasses = ownerState => {
|
|
|
13488
13499
|
};
|
|
13489
13500
|
return composeClasses(slots, getSvgIconUtilityClass, classes);
|
|
13490
13501
|
};
|
|
13491
|
-
const SvgIconRoot = styled
|
|
13502
|
+
const SvgIconRoot = styled('svg', {
|
|
13492
13503
|
name: 'MuiSvgIcon',
|
|
13493
13504
|
slot: 'Root',
|
|
13494
13505
|
overridesResolver: (props, styles) => {
|
|
@@ -13546,7 +13557,7 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
|
|
|
13546
13557
|
} = props,
|
|
13547
13558
|
other = _objectWithoutPropertiesLoose$1(props, _excluded$5);
|
|
13548
13559
|
const hasSvgAsChild = /*#__PURE__*/React.isValidElement(children) && children.type === 'svg';
|
|
13549
|
-
const ownerState = _extends$
|
|
13560
|
+
const ownerState = _extends$4({}, props, {
|
|
13550
13561
|
color,
|
|
13551
13562
|
component,
|
|
13552
13563
|
fontSize,
|
|
@@ -13560,7 +13571,7 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
|
|
|
13560
13571
|
more.viewBox = viewBox;
|
|
13561
13572
|
}
|
|
13562
13573
|
const classes = useUtilityClasses(ownerState);
|
|
13563
|
-
return /*#__PURE__*/jsxRuntimeExports.jsxs(SvgIconRoot, _extends$
|
|
13574
|
+
return /*#__PURE__*/jsxRuntimeExports.jsxs(SvgIconRoot, _extends$4({
|
|
13564
13575
|
as: component,
|
|
13565
13576
|
className: clsx(classes.root, className),
|
|
13566
13577
|
focusable: "false",
|
|
@@ -13576,18 +13587,17 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
|
|
|
13576
13587
|
}));
|
|
13577
13588
|
});
|
|
13578
13589
|
SvgIcon.muiName = 'SvgIcon';
|
|
13579
|
-
var SvgIcon$1 = SvgIcon;
|
|
13580
13590
|
|
|
13581
13591
|
function createSvgIcon(path, displayName) {
|
|
13582
13592
|
function Component(props, ref) {
|
|
13583
|
-
return /*#__PURE__*/jsxRuntimeExports.jsx(SvgIcon
|
|
13593
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx(SvgIcon, _extends$4({
|
|
13584
13594
|
"data-testid": `${displayName}Icon`,
|
|
13585
13595
|
ref: ref
|
|
13586
13596
|
}, props, {
|
|
13587
13597
|
children: path
|
|
13588
13598
|
}));
|
|
13589
13599
|
}
|
|
13590
|
-
Component.muiName = SvgIcon
|
|
13600
|
+
Component.muiName = SvgIcon.muiName;
|
|
13591
13601
|
return /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Component));
|
|
13592
13602
|
}
|
|
13593
13603
|
|
|
@@ -13595,7 +13605,7 @@ function createSvgIcon(path, displayName) {
|
|
|
13595
13605
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
13596
13606
|
const unstable_ClassNameGenerator = {
|
|
13597
13607
|
configure: generator => {
|
|
13598
|
-
ClassNameGenerator
|
|
13608
|
+
ClassNameGenerator.configure(generator);
|
|
13599
13609
|
}
|
|
13600
13610
|
};
|
|
13601
13611
|
|
|
@@ -13657,7 +13667,7 @@ var _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("p
|
|
|
13657
13667
|
}), 'Close');
|
|
13658
13668
|
default_1 = Close.default = _default;
|
|
13659
13669
|
|
|
13660
|
-
const RootContainer = styled
|
|
13670
|
+
const RootContainer = styled(Paper)(_ref => {
|
|
13661
13671
|
let {
|
|
13662
13672
|
theme,
|
|
13663
13673
|
left
|
|
@@ -13671,11 +13681,11 @@ const RootContainer = styled$1(Paper)(_ref => {
|
|
|
13671
13681
|
left
|
|
13672
13682
|
};
|
|
13673
13683
|
});
|
|
13674
|
-
const LeftItem = styled
|
|
13684
|
+
const LeftItem = styled('div')(() => ({
|
|
13675
13685
|
paddingLeft: '6px',
|
|
13676
13686
|
flexGrow: 1
|
|
13677
13687
|
}));
|
|
13678
|
-
const RightItem = styled
|
|
13688
|
+
const RightItem = styled('div')(_ref2 => {
|
|
13679
13689
|
let {
|
|
13680
13690
|
dense
|
|
13681
13691
|
} = _ref2;
|
|
@@ -13684,7 +13694,7 @@ const RightItem = styled$1('div')(_ref2 => {
|
|
|
13684
13694
|
alignItems: "".concat(dense ? 'center' : 'flex-start')
|
|
13685
13695
|
};
|
|
13686
13696
|
});
|
|
13687
|
-
const SmallCloseIcon = styled
|
|
13697
|
+
const SmallCloseIcon = styled(default_1)(() => ({
|
|
13688
13698
|
fontSize: '14px'
|
|
13689
13699
|
}));
|
|
13690
13700
|
function ListBoxFooter(_ref3) {
|
|
@@ -13833,7 +13843,7 @@ function deduceFrequencyMode(pages) {
|
|
|
13833
13843
|
|
|
13834
13844
|
const _excluded$4 = ["isLoadingData"];
|
|
13835
13845
|
const DEFAULT_MIN_BATCH_SIZE = 100;
|
|
13836
|
-
const StyledWrapper = styled$
|
|
13846
|
+
const StyledWrapper = styled$3('div')(() => ({
|
|
13837
13847
|
["& .screenReaderOnly"]: {
|
|
13838
13848
|
position: 'absolute',
|
|
13839
13849
|
height: 0,
|
|
@@ -14349,7 +14359,7 @@ const Item = React__default.forwardRef((_ref, ref) => {
|
|
|
14349
14359
|
"aria-expanded": ariaExpanded,
|
|
14350
14360
|
"aria-controls": "moreMenuList",
|
|
14351
14361
|
"data-testid": btnId
|
|
14352
|
-
}, hasSvgIconShape && SvgIcon$
|
|
14362
|
+
}, hasSvgIconShape && SvgIcon$1(item.getSvgIconShape()), addAnchor && /*#__PURE__*/React__default.createElement("div", {
|
|
14353
14363
|
ref: ref,
|
|
14354
14364
|
style: {
|
|
14355
14365
|
bottom: -spacing,
|
|
@@ -14378,7 +14388,7 @@ const clearSelections = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
14378
14388
|
}
|
|
14379
14389
|
}]
|
|
14380
14390
|
});
|
|
14381
|
-
var ClearSelections = (props => SvgIcon$
|
|
14391
|
+
var ClearSelections = (props => SvgIcon$1(clearSelections(props)));
|
|
14382
14392
|
|
|
14383
14393
|
function useDefaultSelectionActions(_ref) {
|
|
14384
14394
|
let {
|
|
@@ -14437,7 +14447,7 @@ const ActionsToolbarMoreElement = {
|
|
|
14437
14447
|
const classes$8 = {
|
|
14438
14448
|
icon: "".concat(PREFIX$8, "-icon")
|
|
14439
14449
|
};
|
|
14440
|
-
const StyledPopover$1 = styled
|
|
14450
|
+
const StyledPopover$1 = styled(Popover)(_ref => {
|
|
14441
14451
|
let {
|
|
14442
14452
|
theme
|
|
14443
14453
|
} = _ref;
|
|
@@ -14472,7 +14482,7 @@ function MoreItem(_ref2) {
|
|
|
14472
14482
|
tabindex: "0"
|
|
14473
14483
|
}, hasSvgIconShape && /*#__PURE__*/React__default.createElement(ListItemIcon, {
|
|
14474
14484
|
className: classes$8.icon
|
|
14475
|
-
}, SvgIcon$
|
|
14485
|
+
}, SvgIcon$1(item.getSvgIconShape())), /*#__PURE__*/React__default.createElement(Typography, {
|
|
14476
14486
|
noWrap: true
|
|
14477
14487
|
}, item.label)) : null;
|
|
14478
14488
|
}
|
|
@@ -14609,7 +14619,7 @@ const classes$7 = {
|
|
|
14609
14619
|
item: "".concat(PREFIX$7, "-item"),
|
|
14610
14620
|
itemSpacing: "".concat(PREFIX$7, "-itemSpacing")
|
|
14611
14621
|
};
|
|
14612
|
-
const StyledPopover = styled
|
|
14622
|
+
const StyledPopover = styled(Popover)(_ref => {
|
|
14613
14623
|
let {
|
|
14614
14624
|
theme
|
|
14615
14625
|
} = _ref;
|
|
@@ -14836,11 +14846,11 @@ const search = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
14836
14846
|
}
|
|
14837
14847
|
}]
|
|
14838
14848
|
});
|
|
14839
|
-
var SearchIcon = (props => SvgIcon$
|
|
14849
|
+
var SearchIcon = (props => SvgIcon$1(search(props)));
|
|
14840
14850
|
|
|
14841
14851
|
const TREE_PATH = '/qListObjectDef';
|
|
14842
14852
|
const WILDCARD = '**';
|
|
14843
|
-
const StyledOutlinedInput = styled
|
|
14853
|
+
const StyledOutlinedInput = styled(OutlinedInput, {
|
|
14844
14854
|
shouldForwardProp: p => !['styles', 'dense', 'isRtl'].includes(p)
|
|
14845
14855
|
})(_ref => {
|
|
14846
14856
|
let {
|
|
@@ -14866,6 +14876,7 @@ const StyledOutlinedInput = styled$1(OutlinedInput, {
|
|
|
14866
14876
|
fontSize: 14,
|
|
14867
14877
|
borderRadius: 0,
|
|
14868
14878
|
backgroundColor: styles.search.backgroundColor,
|
|
14879
|
+
backdropFilter: styles.background.backgroundImage ? styles.search.backdropFilter : undefined,
|
|
14869
14880
|
paddingLeft: "".concat(CELL_PADDING_LEFT, "px"),
|
|
14870
14881
|
flexDirection: isRtl ? 'row-reverse' : 'row',
|
|
14871
14882
|
'& fieldset': {
|
|
@@ -14873,6 +14884,9 @@ const StyledOutlinedInput = styled$1(OutlinedInput, {
|
|
|
14873
14884
|
borderWidth: '1px 0 1px 0',
|
|
14874
14885
|
borderRadius: 0
|
|
14875
14886
|
},
|
|
14887
|
+
'&.Mui-focused fieldset': {
|
|
14888
|
+
borderColor: "".concat(styles.search.highlightBorderColor, " !important")
|
|
14889
|
+
},
|
|
14876
14890
|
'& .MuiInputBase-root': _objectSpread2({}, styles.search),
|
|
14877
14891
|
'& *': {
|
|
14878
14892
|
color: styles.search.color
|
|
@@ -14880,9 +14894,6 @@ const StyledOutlinedInput = styled$1(OutlinedInput, {
|
|
|
14880
14894
|
'& input': {
|
|
14881
14895
|
color: styles.search.color,
|
|
14882
14896
|
textAlign: isRtl ? 'right' : 'left'
|
|
14883
|
-
},
|
|
14884
|
-
'&.Mui-focused fieldset.OutlinedInput-notchedOutline': {
|
|
14885
|
-
borderColor: "".concat(styles.search.highlightBorderColor, " !important")
|
|
14886
14897
|
}
|
|
14887
14898
|
}, denseProps);
|
|
14888
14899
|
});
|
|
@@ -17332,7 +17343,7 @@ function resolveBgImage(bgComp, app) {
|
|
|
17332
17343
|
function resolveBgColor(comp, theme, objectType) {
|
|
17333
17344
|
const bgColor = comp === null || comp === void 0 ? void 0 : comp.bgColor;
|
|
17334
17345
|
if (bgColor && theme) {
|
|
17335
|
-
if (bgColor.useExpression) {
|
|
17346
|
+
if (bgColor.useExpression || bgColor.useColorExpression) {
|
|
17336
17347
|
return theme.validateColor(bgColor.colorExpression);
|
|
17337
17348
|
}
|
|
17338
17349
|
}
|
|
@@ -17427,24 +17438,25 @@ function getOverridesAsObject() {
|
|
|
17427
17438
|
return overrides;
|
|
17428
17439
|
}
|
|
17429
17440
|
function getSelectionColors(_ref) {
|
|
17430
|
-
var _overrides$theme, _theme$palette, _overrides$theme$cont, _overrides$theme2, _overrides$selections,
|
|
17441
|
+
var _overrides$theme, _theme$palette, _overrides$theme$cont, _overrides$theme2, _overrides$selections, _theme$palette2, _theme$palette3, _theme$palette4, _theme$palette5, _theme$palette6, _theme$palette7, _theme$palette8, _theme$palette9, _theme$palette10, _theme$palette11;
|
|
17431
17442
|
let {
|
|
17443
|
+
getColorPickerColor,
|
|
17432
17444
|
theme,
|
|
17433
17445
|
getListboxStyle,
|
|
17434
17446
|
overrides,
|
|
17435
17447
|
checkboxes
|
|
17436
17448
|
} = _ref;
|
|
17437
|
-
const componentContentTextColor = (_overrides$theme = overrides.theme) === null || _overrides$theme === void 0 || (_overrides$theme = _overrides$theme.content) === null || _overrides$theme === void 0
|
|
17438
|
-
const desiredTextColor = componentContentTextColor || getListboxStyle('content', 'color') || ((_theme$palette = theme.palette) === null || _theme$palette === void 0 ? void 0 : _theme$palette.text.primary);
|
|
17449
|
+
const componentContentTextColor = (_overrides$theme = overrides.theme) === null || _overrides$theme === void 0 || (_overrides$theme = _overrides$theme.content) === null || _overrides$theme === void 0 ? void 0 : _overrides$theme.fontColor;
|
|
17450
|
+
const desiredTextColor = getColorPickerColor(componentContentTextColor) || getListboxStyle('content', 'color') || ((_theme$palette = theme.palette) === null || _theme$palette === void 0 ? void 0 : _theme$palette.text.primary);
|
|
17439
17451
|
const useContrastTextColor = !checkboxes && ((_overrides$theme$cont = (_overrides$theme2 = overrides.theme) === null || _overrides$theme2 === void 0 || (_overrides$theme2 = _overrides$theme2.content) === null || _overrides$theme2 === void 0 ? void 0 : _overrides$theme2.useContrastColor) !== null && _overrides$theme$cont !== void 0 ? _overrides$theme$cont : true);
|
|
17440
17452
|
|
|
17441
17453
|
// Background colors
|
|
17442
17454
|
const selectionColors = ((_overrides$selections = overrides.selections) === null || _overrides$selections === void 0 ? void 0 : _overrides$selections.colors) || {};
|
|
17443
|
-
const selected = (
|
|
17444
|
-
const alternative = (
|
|
17445
|
-
const excluded = (
|
|
17446
|
-
const selectedExcluded = (
|
|
17447
|
-
const possible = (
|
|
17455
|
+
const selected = getColorPickerColor(selectionColors.selected) || ((_theme$palette2 = theme.palette) === null || _theme$palette2 === void 0 ? void 0 : _theme$palette2.selected.main) || '#009845';
|
|
17456
|
+
const alternative = getColorPickerColor(selectionColors.alternative) || ((_theme$palette3 = theme.palette) === null || _theme$palette3 === void 0 ? void 0 : _theme$palette3.selected.alternative) || '#E4E4E4';
|
|
17457
|
+
const excluded = getColorPickerColor(selectionColors.excluded) || ((_theme$palette4 = theme.palette) === null || _theme$palette4 === void 0 ? void 0 : _theme$palette4.selected.excluded) || '#A9A9A9';
|
|
17458
|
+
const selectedExcluded = getColorPickerColor(selectionColors.selectedExcluded) || ((_theme$palette5 = theme.palette) === null || _theme$palette5 === void 0 ? void 0 : _theme$palette5.selected.selectedExcluded) || '#A9A9A9';
|
|
17459
|
+
const possible = getColorPickerColor(selectionColors.possible) || getListboxStyle('', 'backgroundColor') || ((_theme$palette6 = theme.palette) === null || _theme$palette6 === void 0 ? void 0 : _theme$palette6.selected.possible) || '#FFFFFF';
|
|
17448
17460
|
|
|
17449
17461
|
// Font colors
|
|
17450
17462
|
let selectedContrast = desiredTextColor || ((_theme$palette7 = theme.palette) === null || _theme$palette7 === void 0 ? void 0 : _theme$palette7.selected.selectedContrastText);
|
|
@@ -17488,8 +17500,7 @@ function getBackgroundColor(_ref2) {
|
|
|
17488
17500
|
bgColor
|
|
17489
17501
|
}, themeApi, 'listBox');
|
|
17490
17502
|
} else {
|
|
17491
|
-
|
|
17492
|
-
color = (_themeApi$getColorPic = themeApi.getColorPickerColor(bgColor, true)) === null || _themeApi$getColorPic === void 0 ? void 0 : _themeApi$getColorPic.color;
|
|
17503
|
+
color = themeApi.getColorPickerColor(bgColor === null || bgColor === void 0 ? void 0 : bgColor.color, false);
|
|
17493
17504
|
}
|
|
17494
17505
|
return color;
|
|
17495
17506
|
}
|
|
@@ -17509,14 +17520,16 @@ function getStyles(_ref3) {
|
|
|
17509
17520
|
} = _ref3;
|
|
17510
17521
|
const overrides = getOverridesAsObject(components);
|
|
17511
17522
|
const getListboxStyle = (path, prop) => themeApi.getStyle('object.listBox', path, prop);
|
|
17523
|
+
const getColorPickerColor = c => (c === null || c === void 0 ? void 0 : c.index) > 0 || c !== null && c !== void 0 && c.color ? themeApi.getColorPickerColor(c, false) : undefined;
|
|
17512
17524
|
const selections = getSelectionColors({
|
|
17525
|
+
getColorPickerColor,
|
|
17513
17526
|
theme,
|
|
17514
17527
|
getListboxStyle,
|
|
17515
17528
|
overrides,
|
|
17516
17529
|
checkboxes
|
|
17517
17530
|
});
|
|
17518
17531
|
const themeOverrides = overrides.theme || {};
|
|
17519
|
-
const headerColor = ((_themeOverrides$heade = themeOverrides.header) === null || _themeOverrides$heade === void 0
|
|
17532
|
+
const headerColor = getColorPickerColor((_themeOverrides$heade = themeOverrides.header) === null || _themeOverrides$heade === void 0 ? void 0 : _themeOverrides$heade.fontColor) || getListboxStyle('title.main', 'color');
|
|
17520
17533
|
const bgComponentColor = getBackgroundColor({
|
|
17521
17534
|
themeApi,
|
|
17522
17535
|
themeOverrides
|
|
@@ -17559,8 +17572,9 @@ function getStyles(_ref3) {
|
|
|
17559
17572
|
search: {
|
|
17560
17573
|
color: searchColor,
|
|
17561
17574
|
borderColor: theme.palette.divider,
|
|
17562
|
-
highlightBorderColor: theme.palette.
|
|
17563
|
-
backgroundColor: searchBgColor
|
|
17575
|
+
highlightBorderColor: theme.palette.custom.focusBorder,
|
|
17576
|
+
backgroundColor: searchBgColor,
|
|
17577
|
+
backdropFilter: 'blur(8px)'
|
|
17564
17578
|
},
|
|
17565
17579
|
selections
|
|
17566
17580
|
};
|
|
@@ -17932,13 +17946,13 @@ const downArrow = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
17932
17946
|
}
|
|
17933
17947
|
}]
|
|
17934
17948
|
});
|
|
17935
|
-
var DownArrow = (props => SvgIcon$
|
|
17949
|
+
var DownArrow = (props => SvgIcon$1(downArrow(props)));
|
|
17936
17950
|
|
|
17937
17951
|
const PREFIX$6 = 'MultiState';
|
|
17938
17952
|
const classes$6 = {
|
|
17939
17953
|
item: "".concat(PREFIX$6, "-item")
|
|
17940
17954
|
};
|
|
17941
|
-
const StyledGrid$5 = styled
|
|
17955
|
+
const StyledGrid$5 = styled(Grid)(_ref => {
|
|
17942
17956
|
let {
|
|
17943
17957
|
theme
|
|
17944
17958
|
} = _ref;
|
|
@@ -18103,7 +18117,7 @@ const classes$5 = {
|
|
|
18103
18117
|
item: "".concat(PREFIX$5, "-item"),
|
|
18104
18118
|
badge: "".concat(PREFIX$5, "-badge")
|
|
18105
18119
|
};
|
|
18106
|
-
const StyledGrid$4 = styled
|
|
18120
|
+
const StyledGrid$4 = styled(Grid)(_ref => {
|
|
18107
18121
|
let {
|
|
18108
18122
|
theme
|
|
18109
18123
|
} = _ref;
|
|
@@ -18374,7 +18388,7 @@ const selectionsBack = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
18374
18388
|
}
|
|
18375
18389
|
}]
|
|
18376
18390
|
});
|
|
18377
|
-
var SelectionsBack = (props => SvgIcon$
|
|
18391
|
+
var SelectionsBack = (props => SvgIcon$1(selectionsBack(props)));
|
|
18378
18392
|
|
|
18379
18393
|
const selectionsForward = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
18380
18394
|
shapes: [{
|
|
@@ -18384,7 +18398,7 @@ const selectionsForward = props => _objectSpread2(_objectSpread2({}, props), {},
|
|
|
18384
18398
|
}
|
|
18385
18399
|
}]
|
|
18386
18400
|
});
|
|
18387
|
-
var SelectionsForward = (props => SvgIcon$
|
|
18401
|
+
var SelectionsForward = (props => SvgIcon$1(selectionsForward(props)));
|
|
18388
18402
|
|
|
18389
18403
|
const patchAlternateState = (currentSelectionsModel, currentSelectionsLayout, appLayout) => {
|
|
18390
18404
|
const states = [...(appLayout.qStateNames || [])].map(s => ({
|
|
@@ -18916,7 +18930,7 @@ const drillDown = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
18916
18930
|
}
|
|
18917
18931
|
}]
|
|
18918
18932
|
});
|
|
18919
|
-
var DrillDownIcon = (props => SvgIcon$
|
|
18933
|
+
var DrillDownIcon = (props => SvgIcon$1(drillDown(props)));
|
|
18920
18934
|
|
|
18921
18935
|
function removeInnnerTabStops(container) {
|
|
18922
18936
|
container === null || container === void 0 || container.querySelectorAll('[tabIndex="0"]').forEach(elm => {
|
|
@@ -19194,7 +19208,7 @@ function getListboxActionProps(_ref) {
|
|
|
19194
19208
|
};
|
|
19195
19209
|
}
|
|
19196
19210
|
|
|
19197
|
-
const StyledDiv = styled
|
|
19211
|
+
const StyledDiv = styled('div')(() => ({
|
|
19198
19212
|
display: 'flex',
|
|
19199
19213
|
width: '100%',
|
|
19200
19214
|
height: '100%',
|
|
@@ -19240,7 +19254,7 @@ function getContainerPadding(_ref) {
|
|
|
19240
19254
|
}
|
|
19241
19255
|
containerPadding = layoutOrder === 'row' ? "".concat(paddingY, " 4px") : "".concat(paddingY, " 6px ").concat(paddingY, " 4px");
|
|
19242
19256
|
} else {
|
|
19243
|
-
containerPadding = undefined;
|
|
19257
|
+
containerPadding = undefined;
|
|
19244
19258
|
}
|
|
19245
19259
|
return containerPadding;
|
|
19246
19260
|
}
|
|
@@ -19251,7 +19265,7 @@ const classes$4 = {
|
|
|
19251
19265
|
screenReaderOnly: "".concat(PREFIX$4, "-screenReaderOnly"),
|
|
19252
19266
|
listboxWrapper: "".concat(PREFIX$4, "-listboxWrapper")
|
|
19253
19267
|
};
|
|
19254
|
-
const StyledGrid$3 = styled
|
|
19268
|
+
const StyledGrid$3 = styled(Grid, {
|
|
19255
19269
|
shouldForwardProp: p => !['containerPadding', 'isGridMode', 'styles'].includes(p)
|
|
19256
19270
|
})(_ref => {
|
|
19257
19271
|
let {
|
|
@@ -19286,7 +19300,7 @@ const StyledGrid$3 = styled$1(Grid, {
|
|
|
19286
19300
|
}
|
|
19287
19301
|
});
|
|
19288
19302
|
});
|
|
19289
|
-
const StyledGridHeader = styled
|
|
19303
|
+
const StyledGridHeader = styled(Grid, {
|
|
19290
19304
|
shouldForwardProp: p => !['styles', 'isRtl'].includes(p)
|
|
19291
19305
|
})(_ref2 => {
|
|
19292
19306
|
let {
|
|
@@ -19305,7 +19319,7 @@ const StyledGridHeader = styled$1(Grid, {
|
|
|
19305
19319
|
}
|
|
19306
19320
|
});
|
|
19307
19321
|
});
|
|
19308
|
-
const Title = styled
|
|
19322
|
+
const Title = styled(Typography)(_ref3 => {
|
|
19309
19323
|
let {
|
|
19310
19324
|
styles
|
|
19311
19325
|
} = _ref3;
|
|
@@ -21493,7 +21507,7 @@ const warning = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
21493
21507
|
}
|
|
21494
21508
|
}]
|
|
21495
21509
|
});
|
|
21496
|
-
var WarningTriangle = (props => SvgIcon$
|
|
21510
|
+
var WarningTriangle = (props => SvgIcon$1(warning(props)));
|
|
21497
21511
|
|
|
21498
21512
|
/* eslint-disable react/no-array-index-key */
|
|
21499
21513
|
function DescriptionRow(_ref) {
|
|
@@ -21632,7 +21646,7 @@ const classes$3 = {
|
|
|
21632
21646
|
front: "".concat(PREFIX$3, "-front"),
|
|
21633
21647
|
back: "".concat(PREFIX$3, "-back")
|
|
21634
21648
|
};
|
|
21635
|
-
const Root = styled
|
|
21649
|
+
const Root = styled('div')(_ref => {
|
|
21636
21650
|
let {
|
|
21637
21651
|
theme
|
|
21638
21652
|
} = _ref;
|
|
@@ -21687,7 +21701,7 @@ const PREFIX$2 = 'LongRunningQuery';
|
|
|
21687
21701
|
const classes$2 = {
|
|
21688
21702
|
stripes: "".concat(PREFIX$2, "-stripes")
|
|
21689
21703
|
};
|
|
21690
|
-
const StyledGrid$2 = styled
|
|
21704
|
+
const StyledGrid$2 = styled(Grid)(() => ({
|
|
21691
21705
|
["& .".concat(classes$2.stripes)]: {
|
|
21692
21706
|
'&::before': {
|
|
21693
21707
|
position: 'absolute',
|
|
@@ -21813,7 +21827,7 @@ const classes$1 = {
|
|
|
21813
21827
|
containerStyle: "".concat(PREFIX$1, "-containerStyle"),
|
|
21814
21828
|
containerTitleStyle: "".concat(PREFIX$1, "-containerTitleStyle")
|
|
21815
21829
|
};
|
|
21816
|
-
const StyledGrid$1 = styled
|
|
21830
|
+
const StyledGrid$1 = styled(Grid)(_ref => {
|
|
21817
21831
|
let {
|
|
21818
21832
|
theme
|
|
21819
21833
|
} = _ref;
|
|
@@ -21932,7 +21946,7 @@ const PREFIX = 'Footer';
|
|
|
21932
21946
|
const classes = {
|
|
21933
21947
|
itemStyle: "".concat(PREFIX, "-itemStyle")
|
|
21934
21948
|
};
|
|
21935
|
-
const StyledGrid = styled
|
|
21949
|
+
const StyledGrid = styled(Grid)(_ref => {
|
|
21936
21950
|
let {
|
|
21937
21951
|
theme
|
|
21938
21952
|
} = _ref;
|
|
@@ -26506,6 +26520,7 @@ try {
|
|
|
26506
26520
|
|
|
26507
26521
|
// A linked list to keep track of recently-used-ness
|
|
26508
26522
|
const Yallist = yallist;
|
|
26523
|
+
|
|
26509
26524
|
const MAX = Symbol('max');
|
|
26510
26525
|
const LENGTH = Symbol('length');
|
|
26511
26526
|
const LENGTH_CALCULATOR = Symbol('lengthCalculator');
|
|
@@ -26516,6 +26531,7 @@ const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet');
|
|
|
26516
26531
|
const LRU_LIST = Symbol('lruList');
|
|
26517
26532
|
const CACHE = Symbol('cache');
|
|
26518
26533
|
const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet');
|
|
26534
|
+
|
|
26519
26535
|
const naiveLength = () => 1;
|
|
26520
26536
|
|
|
26521
26537
|
// lruList is a yallist where the head is the youngest
|
|
@@ -26527,18 +26543,23 @@ const naiveLength = () => 1;
|
|
|
26527
26543
|
// cache is a Map (or PseudoMap) that matches the keys to
|
|
26528
26544
|
// the Yallist.Node object.
|
|
26529
26545
|
class LRUCache {
|
|
26530
|
-
constructor(options) {
|
|
26531
|
-
if (typeof options === 'number')
|
|
26532
|
-
max: options
|
|
26533
|
-
|
|
26534
|
-
if (!options)
|
|
26535
|
-
|
|
26546
|
+
constructor (options) {
|
|
26547
|
+
if (typeof options === 'number')
|
|
26548
|
+
options = { max: options };
|
|
26549
|
+
|
|
26550
|
+
if (!options)
|
|
26551
|
+
options = {};
|
|
26552
|
+
|
|
26553
|
+
if (options.max && (typeof options.max !== 'number' || options.max < 0))
|
|
26554
|
+
throw new TypeError('max must be a non-negative number')
|
|
26536
26555
|
// Kind of weird to have a default max of Infinity, but oh well.
|
|
26537
26556
|
this[MAX] = options.max || Infinity;
|
|
26557
|
+
|
|
26538
26558
|
const lc = options.length || naiveLength;
|
|
26539
|
-
this[LENGTH_CALCULATOR] = typeof lc !== 'function' ? naiveLength : lc;
|
|
26559
|
+
this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc;
|
|
26540
26560
|
this[ALLOW_STALE] = options.stale || false;
|
|
26541
|
-
if (options.maxAge && typeof options.maxAge !== 'number')
|
|
26561
|
+
if (options.maxAge && typeof options.maxAge !== 'number')
|
|
26562
|
+
throw new TypeError('maxAge must be a number')
|
|
26542
26563
|
this[MAX_AGE] = options.maxAge || 0;
|
|
26543
26564
|
this[DISPOSE] = options.dispose;
|
|
26544
26565
|
this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;
|
|
@@ -26547,32 +26568,40 @@ class LRUCache {
|
|
|
26547
26568
|
}
|
|
26548
26569
|
|
|
26549
26570
|
// resize the cache when the max changes.
|
|
26550
|
-
set max(mL) {
|
|
26551
|
-
if (typeof mL !== 'number' || mL < 0)
|
|
26571
|
+
set max (mL) {
|
|
26572
|
+
if (typeof mL !== 'number' || mL < 0)
|
|
26573
|
+
throw new TypeError('max must be a non-negative number')
|
|
26574
|
+
|
|
26552
26575
|
this[MAX] = mL || Infinity;
|
|
26553
26576
|
trim(this);
|
|
26554
26577
|
}
|
|
26555
|
-
get max() {
|
|
26556
|
-
return this[MAX]
|
|
26578
|
+
get max () {
|
|
26579
|
+
return this[MAX]
|
|
26557
26580
|
}
|
|
26558
|
-
|
|
26581
|
+
|
|
26582
|
+
set allowStale (allowStale) {
|
|
26559
26583
|
this[ALLOW_STALE] = !!allowStale;
|
|
26560
26584
|
}
|
|
26561
|
-
get allowStale() {
|
|
26562
|
-
return this[ALLOW_STALE]
|
|
26585
|
+
get allowStale () {
|
|
26586
|
+
return this[ALLOW_STALE]
|
|
26563
26587
|
}
|
|
26564
|
-
|
|
26565
|
-
|
|
26588
|
+
|
|
26589
|
+
set maxAge (mA) {
|
|
26590
|
+
if (typeof mA !== 'number')
|
|
26591
|
+
throw new TypeError('maxAge must be a non-negative number')
|
|
26592
|
+
|
|
26566
26593
|
this[MAX_AGE] = mA;
|
|
26567
26594
|
trim(this);
|
|
26568
26595
|
}
|
|
26569
|
-
get maxAge() {
|
|
26570
|
-
return this[MAX_AGE]
|
|
26596
|
+
get maxAge () {
|
|
26597
|
+
return this[MAX_AGE]
|
|
26571
26598
|
}
|
|
26572
26599
|
|
|
26573
26600
|
// resize the cache when the lengthCalculator changes.
|
|
26574
|
-
set lengthCalculator(lC) {
|
|
26575
|
-
if (typeof lC !== 'function')
|
|
26601
|
+
set lengthCalculator (lC) {
|
|
26602
|
+
if (typeof lC !== 'function')
|
|
26603
|
+
lC = naiveLength;
|
|
26604
|
+
|
|
26576
26605
|
if (lC !== this[LENGTH_CALCULATOR]) {
|
|
26577
26606
|
this[LENGTH_CALCULATOR] = lC;
|
|
26578
26607
|
this[LENGTH] = 0;
|
|
@@ -26583,16 +26612,12 @@ class LRUCache {
|
|
|
26583
26612
|
}
|
|
26584
26613
|
trim(this);
|
|
26585
26614
|
}
|
|
26586
|
-
get lengthCalculator() {
|
|
26587
|
-
|
|
26588
|
-
}
|
|
26589
|
-
get
|
|
26590
|
-
|
|
26591
|
-
|
|
26592
|
-
get itemCount() {
|
|
26593
|
-
return this[LRU_LIST].length;
|
|
26594
|
-
}
|
|
26595
|
-
rforEach(fn, thisp) {
|
|
26615
|
+
get lengthCalculator () { return this[LENGTH_CALCULATOR] }
|
|
26616
|
+
|
|
26617
|
+
get length () { return this[LENGTH] }
|
|
26618
|
+
get itemCount () { return this[LRU_LIST].length }
|
|
26619
|
+
|
|
26620
|
+
rforEach (fn, thisp) {
|
|
26596
26621
|
thisp = thisp || this;
|
|
26597
26622
|
for (let walker = this[LRU_LIST].tail; walker !== null;) {
|
|
26598
26623
|
const prev = walker.prev;
|
|
@@ -26600,7 +26625,8 @@ class LRUCache {
|
|
|
26600
26625
|
walker = prev;
|
|
26601
26626
|
}
|
|
26602
26627
|
}
|
|
26603
|
-
|
|
26628
|
+
|
|
26629
|
+
forEach (fn, thisp) {
|
|
26604
26630
|
thisp = thisp || this;
|
|
26605
26631
|
for (let walker = this[LRU_LIST].head; walker !== null;) {
|
|
26606
26632
|
const next = walker.next;
|
|
@@ -26608,48 +26634,65 @@ class LRUCache {
|
|
|
26608
26634
|
walker = next;
|
|
26609
26635
|
}
|
|
26610
26636
|
}
|
|
26611
|
-
|
|
26612
|
-
|
|
26637
|
+
|
|
26638
|
+
keys () {
|
|
26639
|
+
return this[LRU_LIST].toArray().map(k => k.key)
|
|
26613
26640
|
}
|
|
26614
|
-
|
|
26615
|
-
|
|
26641
|
+
|
|
26642
|
+
values () {
|
|
26643
|
+
return this[LRU_LIST].toArray().map(k => k.value)
|
|
26616
26644
|
}
|
|
26617
|
-
|
|
26618
|
-
|
|
26645
|
+
|
|
26646
|
+
reset () {
|
|
26647
|
+
if (this[DISPOSE] &&
|
|
26648
|
+
this[LRU_LIST] &&
|
|
26649
|
+
this[LRU_LIST].length) {
|
|
26619
26650
|
this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value));
|
|
26620
26651
|
}
|
|
26652
|
+
|
|
26621
26653
|
this[CACHE] = new Map(); // hash of items by key
|
|
26622
26654
|
this[LRU_LIST] = new Yallist(); // list of items in order of use recency
|
|
26623
26655
|
this[LENGTH] = 0; // length of items in the list
|
|
26624
26656
|
}
|
|
26625
|
-
|
|
26626
|
-
|
|
26627
|
-
|
|
26628
|
-
|
|
26629
|
-
|
|
26630
|
-
|
|
26657
|
+
|
|
26658
|
+
dump () {
|
|
26659
|
+
return this[LRU_LIST].map(hit =>
|
|
26660
|
+
isStale(this, hit) ? false : {
|
|
26661
|
+
k: hit.key,
|
|
26662
|
+
v: hit.value,
|
|
26663
|
+
e: hit.now + (hit.maxAge || 0)
|
|
26664
|
+
}).toArray().filter(h => h)
|
|
26631
26665
|
}
|
|
26632
|
-
|
|
26633
|
-
|
|
26666
|
+
|
|
26667
|
+
dumpLru () {
|
|
26668
|
+
return this[LRU_LIST]
|
|
26634
26669
|
}
|
|
26635
|
-
|
|
26670
|
+
|
|
26671
|
+
set (key, value, maxAge) {
|
|
26636
26672
|
maxAge = maxAge || this[MAX_AGE];
|
|
26637
|
-
|
|
26673
|
+
|
|
26674
|
+
if (maxAge && typeof maxAge !== 'number')
|
|
26675
|
+
throw new TypeError('maxAge must be a number')
|
|
26676
|
+
|
|
26638
26677
|
const now = maxAge ? Date.now() : 0;
|
|
26639
26678
|
const len = this[LENGTH_CALCULATOR](value, key);
|
|
26679
|
+
|
|
26640
26680
|
if (this[CACHE].has(key)) {
|
|
26641
26681
|
if (len > this[MAX]) {
|
|
26642
26682
|
del(this, this[CACHE].get(key));
|
|
26643
|
-
return false
|
|
26683
|
+
return false
|
|
26644
26684
|
}
|
|
26685
|
+
|
|
26645
26686
|
const node = this[CACHE].get(key);
|
|
26646
26687
|
const item = node.value;
|
|
26647
26688
|
|
|
26648
26689
|
// dispose of the old one before overwriting
|
|
26649
26690
|
// split out into 2 ifs for better coverage tracking
|
|
26650
26691
|
if (this[DISPOSE]) {
|
|
26651
|
-
if (!this[NO_DISPOSE_ON_SET])
|
|
26692
|
+
if (!this[NO_DISPOSE_ON_SET])
|
|
26693
|
+
this[DISPOSE](key, item.value);
|
|
26652
26694
|
}
|
|
26695
|
+
|
|
26653
26696
|
item.now = now;
|
|
26654
26697
|
item.maxAge = maxAge;
|
|
26655
26698
|
item.value = value;
|
|
@@ -26657,44 +26700,57 @@ class LRUCache {
|
|
|
26657
26700
|
item.length = len;
|
|
26658
26701
|
this.get(key);
|
|
26659
26702
|
trim(this);
|
|
26660
|
-
return true
|
|
26703
|
+
return true
|
|
26661
26704
|
}
|
|
26705
|
+
|
|
26662
26706
|
const hit = new Entry(key, value, len, now, maxAge);
|
|
26663
26707
|
|
|
26664
26708
|
// oversized objects fall out of cache automatically.
|
|
26665
26709
|
if (hit.length > this[MAX]) {
|
|
26666
|
-
if (this[DISPOSE])
|
|
26667
|
-
|
|
26710
|
+
if (this[DISPOSE])
|
|
26711
|
+
this[DISPOSE](key, value);
|
|
26712
|
+
|
|
26713
|
+
return false
|
|
26668
26714
|
}
|
|
26715
|
+
|
|
26669
26716
|
this[LENGTH] += hit.length;
|
|
26670
26717
|
this[LRU_LIST].unshift(hit);
|
|
26671
26718
|
this[CACHE].set(key, this[LRU_LIST].head);
|
|
26672
26719
|
trim(this);
|
|
26673
|
-
return true
|
|
26720
|
+
return true
|
|
26674
26721
|
}
|
|
26675
|
-
|
|
26676
|
-
|
|
26722
|
+
|
|
26723
|
+
has (key) {
|
|
26724
|
+
if (!this[CACHE].has(key)) return false
|
|
26677
26725
|
const hit = this[CACHE].get(key).value;
|
|
26678
|
-
return !isStale(this, hit)
|
|
26726
|
+
return !isStale(this, hit)
|
|
26679
26727
|
}
|
|
26680
|
-
|
|
26681
|
-
|
|
26728
|
+
|
|
26729
|
+
get (key) {
|
|
26730
|
+
return get(this, key, true)
|
|
26682
26731
|
}
|
|
26683
|
-
|
|
26684
|
-
|
|
26732
|
+
|
|
26733
|
+
peek (key) {
|
|
26734
|
+
return get(this, key, false)
|
|
26685
26735
|
}
|
|
26686
|
-
|
|
26736
|
+
|
|
26737
|
+
pop () {
|
|
26687
26738
|
const node = this[LRU_LIST].tail;
|
|
26688
|
-
if (!node)
|
|
26739
|
+
if (!node)
|
|
26740
|
+
return null
|
|
26741
|
+
|
|
26689
26742
|
del(this, node);
|
|
26690
|
-
return node.value
|
|
26743
|
+
return node.value
|
|
26691
26744
|
}
|
|
26692
|
-
|
|
26745
|
+
|
|
26746
|
+
del (key) {
|
|
26693
26747
|
del(this, this[CACHE].get(key));
|
|
26694
26748
|
}
|
|
26695
|
-
|
|
26749
|
+
|
|
26750
|
+
load (arr) {
|
|
26696
26751
|
// reset the cache
|
|
26697
26752
|
this.reset();
|
|
26753
|
+
|
|
26698
26754
|
const now = Date.now();
|
|
26699
26755
|
// A previous serialized cache has the most recent items first
|
|
26700
26756
|
for (let l = arr.length - 1; l >= 0; l--) {
|
|
@@ -26702,7 +26758,8 @@ class LRUCache {
|
|
|
26702
26758
|
const expiresAt = hit.e || 0;
|
|
26703
26759
|
if (expiresAt === 0)
|
|
26704
26760
|
// the item was created without expiration in a non aged cache
|
|
26705
|
-
this.set(hit.k, hit.v);
|
|
26761
|
+
this.set(hit.k, hit.v);
|
|
26762
|
+
else {
|
|
26706
26763
|
const maxAge = expiresAt - now;
|
|
26707
26764
|
// dont add already expired items
|
|
26708
26765
|
if (maxAge > 0) {
|
|
@@ -26711,34 +26768,44 @@ class LRUCache {
|
|
|
26711
26768
|
}
|
|
26712
26769
|
}
|
|
26713
26770
|
}
|
|
26714
|
-
|
|
26771
|
+
|
|
26772
|
+
prune () {
|
|
26715
26773
|
this[CACHE].forEach((value, key) => get(this, key, false));
|
|
26716
26774
|
}
|
|
26717
26775
|
}
|
|
26776
|
+
|
|
26718
26777
|
const get = (self, key, doUse) => {
|
|
26719
26778
|
const node = self[CACHE].get(key);
|
|
26720
26779
|
if (node) {
|
|
26721
26780
|
const hit = node.value;
|
|
26722
26781
|
if (isStale(self, hit)) {
|
|
26723
26782
|
del(self, node);
|
|
26724
|
-
if (!self[ALLOW_STALE])
|
|
26783
|
+
if (!self[ALLOW_STALE])
|
|
26784
|
+
return undefined
|
|
26725
26785
|
} else {
|
|
26726
26786
|
if (doUse) {
|
|
26727
|
-
if (self[UPDATE_AGE_ON_GET])
|
|
26787
|
+
if (self[UPDATE_AGE_ON_GET])
|
|
26788
|
+
node.value.now = Date.now();
|
|
26728
26789
|
self[LRU_LIST].unshiftNode(node);
|
|
26729
26790
|
}
|
|
26730
26791
|
}
|
|
26731
|
-
return hit.value
|
|
26792
|
+
return hit.value
|
|
26732
26793
|
}
|
|
26733
26794
|
};
|
|
26795
|
+
|
|
26734
26796
|
const isStale = (self, hit) => {
|
|
26735
|
-
if (!hit || !hit.maxAge && !self[MAX_AGE])
|
|
26797
|
+
if (!hit || (!hit.maxAge && !self[MAX_AGE]))
|
|
26798
|
+
return false
|
|
26799
|
+
|
|
26736
26800
|
const diff = Date.now() - hit.now;
|
|
26737
|
-
return hit.maxAge ? diff > hit.maxAge
|
|
26801
|
+
return hit.maxAge ? diff > hit.maxAge
|
|
26802
|
+
: self[MAX_AGE] && (diff > self[MAX_AGE])
|
|
26738
26803
|
};
|
|
26804
|
+
|
|
26739
26805
|
const trim = self => {
|
|
26740
26806
|
if (self[LENGTH] > self[MAX]) {
|
|
26741
|
-
for (let walker = self[LRU_LIST].tail;
|
|
26807
|
+
for (let walker = self[LRU_LIST].tail;
|
|
26808
|
+
self[LENGTH] > self[MAX] && walker !== null;) {
|
|
26742
26809
|
// We know that we're about to delete this one, and also
|
|
26743
26810
|
// what the next least recently used key will be, so just
|
|
26744
26811
|
// go ahead and set it now.
|
|
@@ -26748,17 +26815,21 @@ const trim = self => {
|
|
|
26748
26815
|
}
|
|
26749
26816
|
}
|
|
26750
26817
|
};
|
|
26818
|
+
|
|
26751
26819
|
const del = (self, node) => {
|
|
26752
26820
|
if (node) {
|
|
26753
26821
|
const hit = node.value;
|
|
26754
|
-
if (self[DISPOSE])
|
|
26822
|
+
if (self[DISPOSE])
|
|
26823
|
+
self[DISPOSE](hit.key, hit.value);
|
|
26824
|
+
|
|
26755
26825
|
self[LENGTH] -= hit.length;
|
|
26756
26826
|
self[CACHE].delete(hit.key);
|
|
26757
26827
|
self[LRU_LIST].removeNode(node);
|
|
26758
26828
|
}
|
|
26759
26829
|
};
|
|
26830
|
+
|
|
26760
26831
|
class Entry {
|
|
26761
|
-
constructor(key, value, length, now, maxAge) {
|
|
26832
|
+
constructor (key, value, length, now, maxAge) {
|
|
26762
26833
|
this.key = key;
|
|
26763
26834
|
this.value = value;
|
|
26764
26835
|
this.length = length;
|
|
@@ -26766,14 +26837,18 @@ class Entry {
|
|
|
26766
26837
|
this.maxAge = maxAge || 0;
|
|
26767
26838
|
}
|
|
26768
26839
|
}
|
|
26840
|
+
|
|
26769
26841
|
const forEachStep = (self, fn, node, thisp) => {
|
|
26770
26842
|
let hit = node.value;
|
|
26771
26843
|
if (isStale(self, hit)) {
|
|
26772
26844
|
del(self, node);
|
|
26773
|
-
if (!self[ALLOW_STALE])
|
|
26845
|
+
if (!self[ALLOW_STALE])
|
|
26846
|
+
hit = undefined;
|
|
26774
26847
|
}
|
|
26775
|
-
if (hit)
|
|
26848
|
+
if (hit)
|
|
26849
|
+
fn.call(thisp, hit.value, hit.key, self);
|
|
26776
26850
|
};
|
|
26851
|
+
|
|
26777
26852
|
var lruCache = LRUCache;
|
|
26778
26853
|
|
|
26779
26854
|
// parse out just the options we care about
|
|
@@ -28780,6 +28855,8 @@ function SessionMock() {
|
|
|
28780
28855
|
};
|
|
28781
28856
|
}
|
|
28782
28857
|
|
|
28858
|
+
/* eslint-disable no-underscore-dangle */
|
|
28859
|
+
|
|
28783
28860
|
// To cover test
|
|
28784
28861
|
// eslint-disable-next-line no-undef
|
|
28785
28862
|
const crt = globalThis.crypto || {
|
|
@@ -28791,7 +28868,7 @@ const crt = globalThis.crypto || {
|
|
|
28791
28868
|
function uuidv4() {
|
|
28792
28869
|
return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c => (c ^ crt.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16));
|
|
28793
28870
|
}
|
|
28794
|
-
function CreateSessionObjectMock() {
|
|
28871
|
+
function CreateSessionObjectMock(session) {
|
|
28795
28872
|
return props => {
|
|
28796
28873
|
const properties = extend$2({}, props);
|
|
28797
28874
|
properties.qInfo = properties.qInfo || {};
|
|
@@ -28802,15 +28879,17 @@ function CreateSessionObjectMock() {
|
|
|
28802
28879
|
delete properties._mock;
|
|
28803
28880
|
layout = extend$2({}, properties, mockedInclusions);
|
|
28804
28881
|
}
|
|
28805
|
-
return Promise.resolve(
|
|
28882
|
+
return Promise.resolve({
|
|
28806
28883
|
on: () => {},
|
|
28807
28884
|
once: () => {},
|
|
28808
28885
|
getLayout: () => Promise.resolve(layout),
|
|
28809
28886
|
getProperties: () => Promise.resolve(properties),
|
|
28810
28887
|
getEffectiveProperties: () => Promise.resolve(properties),
|
|
28811
28888
|
removeListener: () => {},
|
|
28812
|
-
id: properties.qInfo.qId
|
|
28813
|
-
|
|
28889
|
+
id: properties.qInfo.qId,
|
|
28890
|
+
properties,
|
|
28891
|
+
session
|
|
28892
|
+
});
|
|
28814
28893
|
};
|
|
28815
28894
|
}
|
|
28816
28895
|
|
|
@@ -29031,7 +29110,7 @@ function GetAppLayoutMock() {
|
|
|
29031
29110
|
function fromGenericObjects(genericObjects) {
|
|
29032
29111
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
29033
29112
|
const session = new SessionMock();
|
|
29034
|
-
const createSessionObject = new CreateSessionObjectMock();
|
|
29113
|
+
const createSessionObject = new CreateSessionObjectMock(session);
|
|
29035
29114
|
const getObject = new GetObjectMock(genericObjects, options);
|
|
29036
29115
|
const getAppLayout = new GetAppLayoutMock();
|
|
29037
29116
|
const app = {
|