``` ~/go/bin/sourcemapper -output ddb -jsurl https://media.dndbeyond.com/character-app/static/js/main.90aa78c5.js ```
2667 lines
83 KiB
JavaScript
2667 lines
83 KiB
JavaScript
import { createTheme } from '@mui/material/styles';
|
|
import { createTheme as createTheme$1 } from '@mui/material';
|
|
|
|
function _extends() {
|
|
_extends = Object.assign || function (target) {
|
|
for (var i = 1; i < arguments.length; i++) {
|
|
var source = arguments[i];
|
|
|
|
for (var key in source) {
|
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
target[key] = source[key];
|
|
}
|
|
}
|
|
}
|
|
|
|
return target;
|
|
};
|
|
|
|
return _extends.apply(this, arguments);
|
|
}
|
|
|
|
function isPlainObject(item) {
|
|
return item !== null && typeof item === 'object' && item.constructor === Object;
|
|
}
|
|
function deepmerge(target, source, options = {
|
|
clone: true
|
|
}) {
|
|
const output = options.clone ? _extends({}, target) : target;
|
|
|
|
if (isPlainObject(target) && isPlainObject(source)) {
|
|
Object.keys(source).forEach(key => {
|
|
// Avoid prototype pollution
|
|
if (key === '__proto__') {
|
|
return;
|
|
}
|
|
|
|
if (isPlainObject(source[key]) && key in target && isPlainObject(target[key])) {
|
|
// Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.
|
|
output[key] = deepmerge(target[key], source[key], options);
|
|
} else {
|
|
output[key] = source[key];
|
|
}
|
|
});
|
|
}
|
|
|
|
return output;
|
|
}
|
|
|
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
|
|
const components = {
|
|
MuiButtonBase: {
|
|
defaultProps: {
|
|
disableRipple: true
|
|
}
|
|
},
|
|
MuiDialog: {
|
|
styleOverrides: {
|
|
paper: ({
|
|
theme
|
|
}) => ({
|
|
minWidth: 320,
|
|
'&.MuiPaper-rounded': {
|
|
borderRadius: '8px'
|
|
},
|
|
'&.MuiPaper-outlined': {
|
|
borderColor: theme.palette.primary.main
|
|
}
|
|
})
|
|
}
|
|
},
|
|
MuiGrid: {
|
|
styleOverrides: {
|
|
root: {
|
|
/**
|
|
* n.b. this is a workaround for bad types on the DialogTitle component,
|
|
* what I really want there is a Grid, but I don't want to enforce these
|
|
* styles on any other Grid components that might be passed in, so I add
|
|
* the className "DdbDialogTitle-root" to target this specific component
|
|
*/
|
|
'&.DdbDialogTitle-root': {
|
|
padding: '16px 20px 8px',
|
|
'& .MuiIconButton-root': {
|
|
padding: '4px',
|
|
marginRight: '-8px'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
MuiIconButton: {
|
|
styleOverrides: {
|
|
root: {
|
|
transition: 'none',
|
|
'&:hover': {
|
|
transition: 'none',
|
|
borderRadius: '3px'
|
|
}
|
|
}
|
|
}
|
|
},
|
|
MuiDialogContent: {
|
|
styleOverrides: {
|
|
root: {
|
|
padding: '16px 20px 0'
|
|
}
|
|
}
|
|
},
|
|
MuiDialogContentText: {
|
|
styleOverrides: {
|
|
root: ({
|
|
theme
|
|
}) => ({
|
|
color: theme.palette.text.primary,
|
|
letterSpacing: '0.15px',
|
|
marginBottom: '12px'
|
|
})
|
|
}
|
|
},
|
|
MuiButton: {
|
|
styleOverrides: {
|
|
root: {
|
|
fontSize: '15px',
|
|
lineHeight: 26 / 15,
|
|
letterSpacing: '0.45px'
|
|
}
|
|
}
|
|
}
|
|
};
|
|
|
|
const palette$1 = {
|
|
mode: 'dark',
|
|
text: {
|
|
primary: '#ecedeeff',
|
|
secondary: '#ecedeea3',
|
|
disabled: '#ecedee5c'
|
|
},
|
|
primary: {
|
|
main: '#dcdfe1ff',
|
|
dark: '#75838bff',
|
|
light: '#f9fafaff',
|
|
contrastText: '#000000ff'
|
|
},
|
|
secondary: {
|
|
main: '#00daa6ff',
|
|
dark: '#00b674ff',
|
|
light: '#b3efd9ff',
|
|
contrastText: '#000000ff'
|
|
},
|
|
action: {
|
|
active: '#dcdfe1a3',
|
|
hover: '#dcdfe11f',
|
|
selected: '#dcdfe12e',
|
|
disabled: '#dcdfe166',
|
|
disabledBackground: '#dcdfe133',
|
|
focus: '#dcdfe133'
|
|
},
|
|
error: {
|
|
main: '#ed6c02ff',
|
|
dark: '#c77700ff',
|
|
light: '#ffb547ff',
|
|
contrastText: '#ffffffff'
|
|
},
|
|
warning: {
|
|
main: '#ed6c02ff',
|
|
dark: '#c77700ff',
|
|
light: '#ffb547ff',
|
|
contrastText: '#ffffffff'
|
|
},
|
|
info: {
|
|
main: '#2196f3ff',
|
|
dark: '#0b79d0ff',
|
|
light: '#64b6f7ff',
|
|
contrastText: '#ffffffff'
|
|
},
|
|
success: {
|
|
main: '#4caf50ff',
|
|
dark: '#3b873eff',
|
|
light: '#7bc67eff',
|
|
contrastText: '#ffffffff'
|
|
},
|
|
background: {
|
|
paper: '#12181cff',
|
|
default: '#232b2fff',
|
|
pane: '#12181cdb'
|
|
},
|
|
common: {
|
|
white: '#ffffffff',
|
|
black: '#000000ff'
|
|
},
|
|
grey: {
|
|
'50': '#f4f5f5ff',
|
|
'100': '#ecedeeff',
|
|
'200': '#dcdfe1ff',
|
|
'300': '#c4cbceff',
|
|
'400': '#a2acb2ff',
|
|
'500': '#75838bff',
|
|
'600': '#525c63ff',
|
|
'700': '#374045ff',
|
|
'800': '#232b2fff',
|
|
'900': '#12181cff'
|
|
},
|
|
rarity: {
|
|
uncommon: '#7ebe15ff',
|
|
rare: '#41a9f2ff',
|
|
veryRare: '#c364e7ff',
|
|
legendary: '#ffb62aff',
|
|
artifact: '#f77558ff',
|
|
contrastText: '#000000ff'
|
|
},
|
|
reference: {
|
|
magicItem: '#41a9f2ff',
|
|
monster: '#f77558ff',
|
|
skill: '#7ebe15ff',
|
|
spell: '#c364e7ff',
|
|
contrastText: '#000000ff'
|
|
},
|
|
message: {
|
|
check: '#c364e7ff',
|
|
custom: '#ecedeea3',
|
|
damage: '#f77558ff',
|
|
healSave: '#7ebe15ff',
|
|
initiative: '#ffb62aff',
|
|
toHit: '#41a9f2ff'
|
|
}
|
|
};
|
|
|
|
const typography = {
|
|
h1: {
|
|
fontSize: '64px',
|
|
fontFamily: 'Tiamat Condensed SC',
|
|
fontWeight: 400,
|
|
fontStyle: 'normal',
|
|
fontStretch: 'normal',
|
|
letterSpacing: 1,
|
|
lineHeight: '64px'
|
|
},
|
|
h2: {
|
|
fontSize: '48px',
|
|
fontFamily: 'Tiamat Condensed SC',
|
|
fontWeight: 400,
|
|
fontStyle: 'normal',
|
|
fontStretch: 'normal',
|
|
letterSpacing: 0.8,
|
|
lineHeight: '52.8px'
|
|
},
|
|
h3: {
|
|
fontSize: '36px',
|
|
fontFamily: 'Tiamat Condensed SC',
|
|
fontWeight: 400,
|
|
fontStyle: 'normal',
|
|
fontStretch: 'normal',
|
|
letterSpacing: 0.75,
|
|
lineHeight: '43.2px'
|
|
},
|
|
h4: {
|
|
fontSize: '26px',
|
|
fontFamily: 'Tiamat Condensed SC',
|
|
fontWeight: 400,
|
|
fontStyle: 'normal',
|
|
fontStretch: 'normal',
|
|
letterSpacing: 0.6,
|
|
lineHeight: '32.5px'
|
|
},
|
|
h5: {
|
|
fontSize: '20px',
|
|
fontFamily: 'Roboto',
|
|
fontWeight: 500,
|
|
fontStyle: 'normal',
|
|
fontStretch: 'normal',
|
|
letterSpacing: 0.32,
|
|
lineHeight: '25px'
|
|
},
|
|
h6: {
|
|
fontSize: '16px',
|
|
fontFamily: 'Roboto',
|
|
fontWeight: 500,
|
|
fontStyle: 'normal',
|
|
fontStretch: 'normal',
|
|
letterSpacing: 0.25,
|
|
lineHeight: '22.4px'
|
|
},
|
|
body1: {
|
|
fontSize: '16px',
|
|
fontFamily: 'Roboto',
|
|
fontWeight: 400,
|
|
fontStyle: 'normal',
|
|
fontStretch: 'normal',
|
|
letterSpacing: 0.15,
|
|
lineHeight: '24px'
|
|
},
|
|
body2: {
|
|
fontSize: '14px',
|
|
fontFamily: 'Roboto',
|
|
fontWeight: 400,
|
|
fontStyle: 'normal',
|
|
fontStretch: 'normal',
|
|
letterSpacing: 0.15,
|
|
lineHeight: '20.02px'
|
|
},
|
|
subtitle1: {
|
|
fontSize: '16px',
|
|
fontFamily: 'Roboto',
|
|
fontWeight: 400,
|
|
fontStyle: 'normal',
|
|
fontStretch: 'normal',
|
|
letterSpacing: 0.15,
|
|
lineHeight: '28px'
|
|
},
|
|
subtitle2: {
|
|
fontSize: '14px',
|
|
fontFamily: 'Roboto',
|
|
fontWeight: 500,
|
|
fontStyle: 'normal',
|
|
fontStretch: 'normal',
|
|
letterSpacing: 0.1,
|
|
lineHeight: '21.98px'
|
|
},
|
|
overline: {
|
|
fontSize: '12px',
|
|
fontFamily: 'Roboto',
|
|
fontWeight: 400,
|
|
fontStyle: 'normal',
|
|
fontStretch: 'normal',
|
|
letterSpacing: 1,
|
|
lineHeight: '31.92px',
|
|
textTransform: 'uppercase'
|
|
},
|
|
caption: {
|
|
fontSize: '12px',
|
|
fontFamily: 'Roboto',
|
|
fontWeight: 400,
|
|
fontStyle: 'normal',
|
|
fontStretch: 'normal',
|
|
letterSpacing: 0.4,
|
|
lineHeight: '19.92px'
|
|
}
|
|
};
|
|
|
|
// This file was generated with generate-themes script.
|
|
const createDarkTheme = (options = {}) => createTheme(deepmerge({
|
|
components,
|
|
palette: palette$1,
|
|
typography
|
|
}, options));
|
|
|
|
const palette = {
|
|
mode: 'light',
|
|
text: {
|
|
primary: '#12181cff',
|
|
secondary: '#12181ca3',
|
|
disabled: '#12181c5c'
|
|
},
|
|
primary: {
|
|
main: '#374045ff',
|
|
dark: '#12181cff',
|
|
light: '#75838bff',
|
|
contrastText: '#ffffffff'
|
|
},
|
|
secondary: {
|
|
main: '#e40712ff',
|
|
dark: '#9f271dff',
|
|
light: '#f77558ff',
|
|
contrastText: '#ffffffff'
|
|
},
|
|
action: {
|
|
active: '#12181ca3',
|
|
hover: '#12181c14',
|
|
selected: '#12181c1f',
|
|
disabled: '#12181c5c',
|
|
disabledBackground: '#12181c29',
|
|
focus: '#12181c29'
|
|
},
|
|
error: {
|
|
main: '#ed6c02ff',
|
|
dark: '#c77700ff',
|
|
light: '#ffb547ff',
|
|
contrastText: '#ffffffff'
|
|
},
|
|
warning: {
|
|
main: '#ed6c02ff',
|
|
dark: '#c77700ff',
|
|
light: '#ffb547ff',
|
|
contrastText: '#ffffffff'
|
|
},
|
|
info: {
|
|
main: '#2196f3ff',
|
|
dark: '#0b79d0ff',
|
|
light: '#64b6f7ff',
|
|
contrastText: '#ffffffff'
|
|
},
|
|
success: {
|
|
main: '#4caf50ff',
|
|
dark: '#3b873eff',
|
|
light: '#7bc67eff',
|
|
contrastText: '#ffffffff'
|
|
},
|
|
background: {
|
|
paper: '#ffffffff',
|
|
default: '#f4f5f5ff',
|
|
parchment: '#f9f6efff',
|
|
scroll: '#eee8dbff'
|
|
},
|
|
common: {
|
|
white: '#ffffffff',
|
|
black: '#000000ff'
|
|
},
|
|
grey: {
|
|
'50': '#f4f5f5ff',
|
|
'100': '#ecedeeff',
|
|
'200': '#dcdfe1ff',
|
|
'300': '#c4cbceff',
|
|
'400': '#a2acb2ff',
|
|
'500': '#75838bff',
|
|
'600': '#525c63ff',
|
|
'700': '#374045ff',
|
|
'800': '#232b2fff',
|
|
'900': '#12181cff'
|
|
},
|
|
rarity: {
|
|
uncommon: '#009158ff',
|
|
rare: '#077bd0ff',
|
|
veryRare: '#9605d4ff',
|
|
legendary: '#ae5e21ff',
|
|
artifact: '#c81e18ff',
|
|
contrastText: '#ffffffff'
|
|
},
|
|
reference: {
|
|
character: '#ee8600ff',
|
|
magicItem: '#077bd0ff',
|
|
monster: '#c60000ff',
|
|
skill: '#009158ff',
|
|
spell: '#9605d4ff',
|
|
contrastText: '#ffffffff'
|
|
}
|
|
};
|
|
|
|
// This file was generated with generate-themes script.
|
|
const createLightTheme = (options = {}) => createTheme$1(deepmerge({
|
|
components,
|
|
palette,
|
|
typography
|
|
}, options));
|
|
|
|
var check = function (it) {
|
|
return it && it.Math == Math && it;
|
|
};
|
|
|
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
var global$w =
|
|
// eslint-disable-next-line es-x/no-global-this -- safe
|
|
check(typeof globalThis == 'object' && globalThis) ||
|
|
check(typeof window == 'object' && window) ||
|
|
// eslint-disable-next-line no-restricted-globals -- safe
|
|
check(typeof self == 'object' && self) ||
|
|
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
// eslint-disable-next-line no-new-func -- fallback
|
|
(function () { return this; })() || Function('return this')();
|
|
|
|
var fails$g = function (exec) {
|
|
try {
|
|
return !!exec();
|
|
} catch (error) {
|
|
return true;
|
|
}
|
|
};
|
|
|
|
var fails$f = fails$g;
|
|
|
|
var functionBindNative = !fails$f(function () {
|
|
// eslint-disable-next-line es-x/no-function-prototype-bind -- safe
|
|
var test = (function () { /* empty */ }).bind();
|
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
});
|
|
|
|
var NATIVE_BIND$2 = functionBindNative;
|
|
|
|
var FunctionPrototype$2 = Function.prototype;
|
|
var bind = FunctionPrototype$2.bind;
|
|
var call$9 = FunctionPrototype$2.call;
|
|
var uncurryThis$f = NATIVE_BIND$2 && bind.bind(call$9, call$9);
|
|
|
|
var functionUncurryThis = NATIVE_BIND$2 ? function (fn) {
|
|
return fn && uncurryThis$f(fn);
|
|
} : function (fn) {
|
|
return fn && function () {
|
|
return call$9.apply(fn, arguments);
|
|
};
|
|
};
|
|
|
|
var uncurryThis$e = functionUncurryThis;
|
|
|
|
var toString$5 = uncurryThis$e({}.toString);
|
|
var stringSlice$3 = uncurryThis$e(''.slice);
|
|
|
|
var classofRaw$1 = function (it) {
|
|
return stringSlice$3(toString$5(it), 8, -1);
|
|
};
|
|
|
|
var global$v = global$w;
|
|
var uncurryThis$d = functionUncurryThis;
|
|
var fails$e = fails$g;
|
|
var classof$5 = classofRaw$1;
|
|
|
|
var Object$5 = global$v.Object;
|
|
var split = uncurryThis$d(''.split);
|
|
|
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
var indexedObject = fails$e(function () {
|
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
return !Object$5('z').propertyIsEnumerable(0);
|
|
}) ? function (it) {
|
|
return classof$5(it) == 'String' ? split(it, '') : Object$5(it);
|
|
} : Object$5;
|
|
|
|
var global$u = global$w;
|
|
|
|
var TypeError$a = global$u.TypeError;
|
|
|
|
// `RequireObjectCoercible` abstract operation
|
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
var requireObjectCoercible$4 = function (it) {
|
|
if (it == undefined) throw TypeError$a("Can't call method on " + it);
|
|
return it;
|
|
};
|
|
|
|
// toObject with fallback for non-array-like ES3 strings
|
|
var IndexedObject = indexedObject;
|
|
var requireObjectCoercible$3 = requireObjectCoercible$4;
|
|
|
|
var toIndexedObject$5 = function (it) {
|
|
return IndexedObject(requireObjectCoercible$3(it));
|
|
};
|
|
|
|
var shared$4 = {exports: {}};
|
|
|
|
var global$t = global$w;
|
|
|
|
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
var defineProperty$3 = Object.defineProperty;
|
|
|
|
var setGlobal$3 = function (key, value) {
|
|
try {
|
|
defineProperty$3(global$t, key, { value: value, configurable: true, writable: true });
|
|
} catch (error) {
|
|
global$t[key] = value;
|
|
} return value;
|
|
};
|
|
|
|
var global$s = global$w;
|
|
var setGlobal$2 = setGlobal$3;
|
|
|
|
var SHARED = '__core-js_shared__';
|
|
var store$3 = global$s[SHARED] || setGlobal$2(SHARED, {});
|
|
|
|
var sharedStore = store$3;
|
|
|
|
var store$2 = sharedStore;
|
|
|
|
(shared$4.exports = function (key, value) {
|
|
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
})('versions', []).push({
|
|
version: '3.22.4',
|
|
mode: 'global',
|
|
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
license: 'https://github.com/zloirock/core-js/blob/v3.22.4/LICENSE',
|
|
source: 'https://github.com/zloirock/core-js'
|
|
});
|
|
|
|
var global$r = global$w;
|
|
var requireObjectCoercible$2 = requireObjectCoercible$4;
|
|
|
|
var Object$4 = global$r.Object;
|
|
|
|
// `ToObject` abstract operation
|
|
// https://tc39.es/ecma262/#sec-toobject
|
|
var toObject$2 = function (argument) {
|
|
return Object$4(requireObjectCoercible$2(argument));
|
|
};
|
|
|
|
var uncurryThis$c = functionUncurryThis;
|
|
var toObject$1 = toObject$2;
|
|
|
|
var hasOwnProperty = uncurryThis$c({}.hasOwnProperty);
|
|
|
|
// `HasOwnProperty` abstract operation
|
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
// eslint-disable-next-line es-x/no-object-hasown -- safe
|
|
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
return hasOwnProperty(toObject$1(it), key);
|
|
};
|
|
|
|
var uncurryThis$b = functionUncurryThis;
|
|
|
|
var id = 0;
|
|
var postfix = Math.random();
|
|
var toString$4 = uncurryThis$b(1.0.toString);
|
|
|
|
var uid$2 = function (key) {
|
|
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$4(++id + postfix, 36);
|
|
};
|
|
|
|
// `IsCallable` abstract operation
|
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
var isCallable$h = function (argument) {
|
|
return typeof argument == 'function';
|
|
};
|
|
|
|
var global$q = global$w;
|
|
var isCallable$g = isCallable$h;
|
|
|
|
var aFunction = function (argument) {
|
|
return isCallable$g(argument) ? argument : undefined;
|
|
};
|
|
|
|
var getBuiltIn$5 = function (namespace, method) {
|
|
return arguments.length < 2 ? aFunction(global$q[namespace]) : global$q[namespace] && global$q[namespace][method];
|
|
};
|
|
|
|
var getBuiltIn$4 = getBuiltIn$5;
|
|
|
|
var engineUserAgent = getBuiltIn$4('navigator', 'userAgent') || '';
|
|
|
|
var global$p = global$w;
|
|
var userAgent = engineUserAgent;
|
|
|
|
var process = global$p.process;
|
|
var Deno = global$p.Deno;
|
|
var versions = process && process.versions || Deno && Deno.version;
|
|
var v8 = versions && versions.v8;
|
|
var match, version;
|
|
|
|
if (v8) {
|
|
match = v8.split('.');
|
|
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
// but their correct versions are not interesting for us
|
|
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
}
|
|
|
|
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
// so check `userAgent` even if `.v8` exists, but 0
|
|
if (!version && userAgent) {
|
|
match = userAgent.match(/Edge\/(\d+)/);
|
|
if (!match || match[1] >= 74) {
|
|
match = userAgent.match(/Chrome\/(\d+)/);
|
|
if (match) version = +match[1];
|
|
}
|
|
}
|
|
|
|
var engineV8Version = version;
|
|
|
|
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
|
|
var V8_VERSION = engineV8Version;
|
|
var fails$d = fails$g;
|
|
|
|
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
|
|
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$d(function () {
|
|
var symbol = Symbol();
|
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
|
|
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
|
|
});
|
|
|
|
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
|
|
var NATIVE_SYMBOL$1 = nativeSymbol;
|
|
|
|
var useSymbolAsUid = NATIVE_SYMBOL$1
|
|
&& !Symbol.sham
|
|
&& typeof Symbol.iterator == 'symbol';
|
|
|
|
var global$o = global$w;
|
|
var shared$3 = shared$4.exports;
|
|
var hasOwn$8 = hasOwnProperty_1;
|
|
var uid$1 = uid$2;
|
|
var NATIVE_SYMBOL = nativeSymbol;
|
|
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
|
|
var WellKnownSymbolsStore = shared$3('wks');
|
|
var Symbol$1 = global$o.Symbol;
|
|
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
|
|
var wellKnownSymbol$b = function (name) {
|
|
if (!hasOwn$8(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
var description = 'Symbol.' + name;
|
|
if (NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)) {
|
|
WellKnownSymbolsStore[name] = Symbol$1[name];
|
|
} else if (USE_SYMBOL_AS_UID$1 && symbolFor) {
|
|
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
} else {
|
|
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
|
}
|
|
} return WellKnownSymbolsStore[name];
|
|
};
|
|
|
|
var isCallable$f = isCallable$h;
|
|
|
|
var isObject$7 = function (it) {
|
|
return typeof it == 'object' ? it !== null : isCallable$f(it);
|
|
};
|
|
|
|
var global$n = global$w;
|
|
var isObject$6 = isObject$7;
|
|
|
|
var String$4 = global$n.String;
|
|
var TypeError$9 = global$n.TypeError;
|
|
|
|
// `Assert: Type(argument) is Object`
|
|
var anObject$9 = function (argument) {
|
|
if (isObject$6(argument)) return argument;
|
|
throw TypeError$9(String$4(argument) + ' is not an object');
|
|
};
|
|
|
|
var objectDefineProperties = {};
|
|
|
|
var fails$c = fails$g;
|
|
|
|
// Detect IE8's incomplete defineProperty implementation
|
|
var descriptors = !fails$c(function () {
|
|
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
});
|
|
|
|
var DESCRIPTORS$7 = descriptors;
|
|
var fails$b = fails$g;
|
|
|
|
// V8 ~ Chrome 36-
|
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$b(function () {
|
|
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
value: 42,
|
|
writable: false
|
|
}).prototype != 42;
|
|
});
|
|
|
|
var objectDefineProperty = {};
|
|
|
|
var global$m = global$w;
|
|
var isObject$5 = isObject$7;
|
|
|
|
var document$1 = global$m.document;
|
|
// typeof document.createElement is 'object' in old IE
|
|
var EXISTS$1 = isObject$5(document$1) && isObject$5(document$1.createElement);
|
|
|
|
var documentCreateElement$2 = function (it) {
|
|
return EXISTS$1 ? document$1.createElement(it) : {};
|
|
};
|
|
|
|
var DESCRIPTORS$6 = descriptors;
|
|
var fails$a = fails$g;
|
|
var createElement = documentCreateElement$2;
|
|
|
|
// Thanks to IE8 for its funny defineProperty
|
|
var ie8DomDefine = !DESCRIPTORS$6 && !fails$a(function () {
|
|
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
return Object.defineProperty(createElement('div'), 'a', {
|
|
get: function () { return 7; }
|
|
}).a != 7;
|
|
});
|
|
|
|
var NATIVE_BIND$1 = functionBindNative;
|
|
|
|
var call$8 = Function.prototype.call;
|
|
|
|
var functionCall = NATIVE_BIND$1 ? call$8.bind(call$8) : function () {
|
|
return call$8.apply(call$8, arguments);
|
|
};
|
|
|
|
var uncurryThis$a = functionUncurryThis;
|
|
|
|
var objectIsPrototypeOf = uncurryThis$a({}.isPrototypeOf);
|
|
|
|
var global$l = global$w;
|
|
var getBuiltIn$3 = getBuiltIn$5;
|
|
var isCallable$e = isCallable$h;
|
|
var isPrototypeOf = objectIsPrototypeOf;
|
|
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
|
|
var Object$3 = global$l.Object;
|
|
|
|
var isSymbol$2 = USE_SYMBOL_AS_UID ? function (it) {
|
|
return typeof it == 'symbol';
|
|
} : function (it) {
|
|
var $Symbol = getBuiltIn$3('Symbol');
|
|
return isCallable$e($Symbol) && isPrototypeOf($Symbol.prototype, Object$3(it));
|
|
};
|
|
|
|
var global$k = global$w;
|
|
|
|
var String$3 = global$k.String;
|
|
|
|
var tryToString$2 = function (argument) {
|
|
try {
|
|
return String$3(argument);
|
|
} catch (error) {
|
|
return 'Object';
|
|
}
|
|
};
|
|
|
|
var global$j = global$w;
|
|
var isCallable$d = isCallable$h;
|
|
var tryToString$1 = tryToString$2;
|
|
|
|
var TypeError$8 = global$j.TypeError;
|
|
|
|
// `Assert: IsCallable(argument) is true`
|
|
var aCallable$1 = function (argument) {
|
|
if (isCallable$d(argument)) return argument;
|
|
throw TypeError$8(tryToString$1(argument) + ' is not a function');
|
|
};
|
|
|
|
var aCallable = aCallable$1;
|
|
|
|
// `GetMethod` abstract operation
|
|
// https://tc39.es/ecma262/#sec-getmethod
|
|
var getMethod$2 = function (V, P) {
|
|
var func = V[P];
|
|
return func == null ? undefined : aCallable(func);
|
|
};
|
|
|
|
var global$i = global$w;
|
|
var call$7 = functionCall;
|
|
var isCallable$c = isCallable$h;
|
|
var isObject$4 = isObject$7;
|
|
|
|
var TypeError$7 = global$i.TypeError;
|
|
|
|
// `OrdinaryToPrimitive` abstract operation
|
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
var fn, val;
|
|
if (pref === 'string' && isCallable$c(fn = input.toString) && !isObject$4(val = call$7(fn, input))) return val;
|
|
if (isCallable$c(fn = input.valueOf) && !isObject$4(val = call$7(fn, input))) return val;
|
|
if (pref !== 'string' && isCallable$c(fn = input.toString) && !isObject$4(val = call$7(fn, input))) return val;
|
|
throw TypeError$7("Can't convert object to primitive value");
|
|
};
|
|
|
|
var global$h = global$w;
|
|
var call$6 = functionCall;
|
|
var isObject$3 = isObject$7;
|
|
var isSymbol$1 = isSymbol$2;
|
|
var getMethod$1 = getMethod$2;
|
|
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
var wellKnownSymbol$a = wellKnownSymbol$b;
|
|
|
|
var TypeError$6 = global$h.TypeError;
|
|
var TO_PRIMITIVE = wellKnownSymbol$a('toPrimitive');
|
|
|
|
// `ToPrimitive` abstract operation
|
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
var toPrimitive$1 = function (input, pref) {
|
|
if (!isObject$3(input) || isSymbol$1(input)) return input;
|
|
var exoticToPrim = getMethod$1(input, TO_PRIMITIVE);
|
|
var result;
|
|
if (exoticToPrim) {
|
|
if (pref === undefined) pref = 'default';
|
|
result = call$6(exoticToPrim, input, pref);
|
|
if (!isObject$3(result) || isSymbol$1(result)) return result;
|
|
throw TypeError$6("Can't convert object to primitive value");
|
|
}
|
|
if (pref === undefined) pref = 'number';
|
|
return ordinaryToPrimitive(input, pref);
|
|
};
|
|
|
|
var toPrimitive = toPrimitive$1;
|
|
var isSymbol = isSymbol$2;
|
|
|
|
// `ToPropertyKey` abstract operation
|
|
// https://tc39.es/ecma262/#sec-topropertykey
|
|
var toPropertyKey$3 = function (argument) {
|
|
var key = toPrimitive(argument, 'string');
|
|
return isSymbol(key) ? key : key + '';
|
|
};
|
|
|
|
var global$g = global$w;
|
|
var DESCRIPTORS$5 = descriptors;
|
|
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
var anObject$8 = anObject$9;
|
|
var toPropertyKey$2 = toPropertyKey$3;
|
|
|
|
var TypeError$5 = global$g.TypeError;
|
|
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
var $defineProperty = Object.defineProperty;
|
|
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
var ENUMERABLE = 'enumerable';
|
|
var CONFIGURABLE$1 = 'configurable';
|
|
var WRITABLE = 'writable';
|
|
|
|
// `Object.defineProperty` method
|
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
objectDefineProperty.f = DESCRIPTORS$5 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
anObject$8(O);
|
|
P = toPropertyKey$2(P);
|
|
anObject$8(Attributes);
|
|
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
var current = $getOwnPropertyDescriptor$1(O, P);
|
|
if (current && current[WRITABLE]) {
|
|
O[P] = Attributes.value;
|
|
Attributes = {
|
|
configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
|
|
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
|
writable: false
|
|
};
|
|
}
|
|
} return $defineProperty(O, P, Attributes);
|
|
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
anObject$8(O);
|
|
P = toPropertyKey$2(P);
|
|
anObject$8(Attributes);
|
|
if (IE8_DOM_DEFINE$1) try {
|
|
return $defineProperty(O, P, Attributes);
|
|
} catch (error) { /* empty */ }
|
|
if ('get' in Attributes || 'set' in Attributes) throw TypeError$5('Accessors not supported');
|
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
return O;
|
|
};
|
|
|
|
var ceil = Math.ceil;
|
|
var floor = Math.floor;
|
|
|
|
// `ToIntegerOrInfinity` abstract operation
|
|
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
var toIntegerOrInfinity$3 = function (argument) {
|
|
var number = +argument;
|
|
// eslint-disable-next-line no-self-compare -- safe
|
|
return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
|
|
};
|
|
|
|
var toIntegerOrInfinity$2 = toIntegerOrInfinity$3;
|
|
|
|
var max$1 = Math.max;
|
|
var min$2 = Math.min;
|
|
|
|
// Helper for a popular repeating case of the spec:
|
|
// Let integer be ? ToInteger(index).
|
|
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
var toAbsoluteIndex$2 = function (index, length) {
|
|
var integer = toIntegerOrInfinity$2(index);
|
|
return integer < 0 ? max$1(integer + length, 0) : min$2(integer, length);
|
|
};
|
|
|
|
var toIntegerOrInfinity$1 = toIntegerOrInfinity$3;
|
|
|
|
var min$1 = Math.min;
|
|
|
|
// `ToLength` abstract operation
|
|
// https://tc39.es/ecma262/#sec-tolength
|
|
var toLength$2 = function (argument) {
|
|
return argument > 0 ? min$1(toIntegerOrInfinity$1(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
};
|
|
|
|
var toLength$1 = toLength$2;
|
|
|
|
// `LengthOfArrayLike` abstract operation
|
|
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
var lengthOfArrayLike$2 = function (obj) {
|
|
return toLength$1(obj.length);
|
|
};
|
|
|
|
var toIndexedObject$4 = toIndexedObject$5;
|
|
var toAbsoluteIndex$1 = toAbsoluteIndex$2;
|
|
var lengthOfArrayLike$1 = lengthOfArrayLike$2;
|
|
|
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
var createMethod$1 = function (IS_INCLUDES) {
|
|
return function ($this, el, fromIndex) {
|
|
var O = toIndexedObject$4($this);
|
|
var length = lengthOfArrayLike$1(O);
|
|
var index = toAbsoluteIndex$1(fromIndex, length);
|
|
var value;
|
|
// Array#includes uses SameValueZero equality algorithm
|
|
// eslint-disable-next-line no-self-compare -- NaN check
|
|
if (IS_INCLUDES && el != el) while (length > index) {
|
|
value = O[index++];
|
|
// eslint-disable-next-line no-self-compare -- NaN check
|
|
if (value != value) return true;
|
|
// Array#indexOf ignores holes, Array#includes - not
|
|
} else for (;length > index; index++) {
|
|
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
} return !IS_INCLUDES && -1;
|
|
};
|
|
};
|
|
|
|
var arrayIncludes = {
|
|
// `Array.prototype.includes` method
|
|
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
includes: createMethod$1(true),
|
|
// `Array.prototype.indexOf` method
|
|
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
indexOf: createMethod$1(false)
|
|
};
|
|
|
|
var hiddenKeys$4 = {};
|
|
|
|
var uncurryThis$9 = functionUncurryThis;
|
|
var hasOwn$7 = hasOwnProperty_1;
|
|
var toIndexedObject$3 = toIndexedObject$5;
|
|
var indexOf$1 = arrayIncludes.indexOf;
|
|
var hiddenKeys$3 = hiddenKeys$4;
|
|
|
|
var push$1 = uncurryThis$9([].push);
|
|
|
|
var objectKeysInternal = function (object, names) {
|
|
var O = toIndexedObject$3(object);
|
|
var i = 0;
|
|
var result = [];
|
|
var key;
|
|
for (key in O) !hasOwn$7(hiddenKeys$3, key) && hasOwn$7(O, key) && push$1(result, key);
|
|
// Don't enum bug & hidden keys
|
|
while (names.length > i) if (hasOwn$7(O, key = names[i++])) {
|
|
~indexOf$1(result, key) || push$1(result, key);
|
|
}
|
|
return result;
|
|
};
|
|
|
|
// IE8- don't enum bug keys
|
|
var enumBugKeys$3 = [
|
|
'constructor',
|
|
'hasOwnProperty',
|
|
'isPrototypeOf',
|
|
'propertyIsEnumerable',
|
|
'toLocaleString',
|
|
'toString',
|
|
'valueOf'
|
|
];
|
|
|
|
var internalObjectKeys$1 = objectKeysInternal;
|
|
var enumBugKeys$2 = enumBugKeys$3;
|
|
|
|
// `Object.keys` method
|
|
// https://tc39.es/ecma262/#sec-object.keys
|
|
// eslint-disable-next-line es-x/no-object-keys -- safe
|
|
var objectKeys$1 = Object.keys || function keys(O) {
|
|
return internalObjectKeys$1(O, enumBugKeys$2);
|
|
};
|
|
|
|
var DESCRIPTORS$4 = descriptors;
|
|
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
var definePropertyModule$4 = objectDefineProperty;
|
|
var anObject$7 = anObject$9;
|
|
var toIndexedObject$2 = toIndexedObject$5;
|
|
var objectKeys = objectKeys$1;
|
|
|
|
// `Object.defineProperties` method
|
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
// eslint-disable-next-line es-x/no-object-defineproperties -- safe
|
|
objectDefineProperties.f = DESCRIPTORS$4 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
anObject$7(O);
|
|
var props = toIndexedObject$2(Properties);
|
|
var keys = objectKeys(Properties);
|
|
var length = keys.length;
|
|
var index = 0;
|
|
var key;
|
|
while (length > index) definePropertyModule$4.f(O, key = keys[index++], props[key]);
|
|
return O;
|
|
};
|
|
|
|
var getBuiltIn$2 = getBuiltIn$5;
|
|
|
|
var html$1 = getBuiltIn$2('document', 'documentElement');
|
|
|
|
var shared$2 = shared$4.exports;
|
|
var uid = uid$2;
|
|
|
|
var keys = shared$2('keys');
|
|
|
|
var sharedKey$3 = function (key) {
|
|
return keys[key] || (keys[key] = uid(key));
|
|
};
|
|
|
|
/* global ActiveXObject -- old IE, WSH */
|
|
|
|
var anObject$6 = anObject$9;
|
|
var definePropertiesModule = objectDefineProperties;
|
|
var enumBugKeys$1 = enumBugKeys$3;
|
|
var hiddenKeys$2 = hiddenKeys$4;
|
|
var html = html$1;
|
|
var documentCreateElement$1 = documentCreateElement$2;
|
|
var sharedKey$2 = sharedKey$3;
|
|
|
|
var GT = '>';
|
|
var LT = '<';
|
|
var PROTOTYPE = 'prototype';
|
|
var SCRIPT = 'script';
|
|
var IE_PROTO$1 = sharedKey$2('IE_PROTO');
|
|
|
|
var EmptyConstructor = function () { /* empty */ };
|
|
|
|
var scriptTag = function (content) {
|
|
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
};
|
|
|
|
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
activeXDocument.write(scriptTag(''));
|
|
activeXDocument.close();
|
|
var temp = activeXDocument.parentWindow.Object;
|
|
activeXDocument = null; // avoid memory leak
|
|
return temp;
|
|
};
|
|
|
|
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
var NullProtoObjectViaIFrame = function () {
|
|
// Thrash, waste and sodomy: IE GC bug
|
|
var iframe = documentCreateElement$1('iframe');
|
|
var JS = 'java' + SCRIPT + ':';
|
|
var iframeDocument;
|
|
iframe.style.display = 'none';
|
|
html.appendChild(iframe);
|
|
// https://github.com/zloirock/core-js/issues/475
|
|
iframe.src = String(JS);
|
|
iframeDocument = iframe.contentWindow.document;
|
|
iframeDocument.open();
|
|
iframeDocument.write(scriptTag('document.F=Object'));
|
|
iframeDocument.close();
|
|
return iframeDocument.F;
|
|
};
|
|
|
|
// Check for document.domain and active x support
|
|
// No need to use active x approach when document.domain is not set
|
|
// see https://github.com/es-shims/es5-shim/issues/150
|
|
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
// avoid IE GC bug
|
|
var activeXDocument;
|
|
var NullProtoObject = function () {
|
|
try {
|
|
activeXDocument = new ActiveXObject('htmlfile');
|
|
} catch (error) { /* ignore */ }
|
|
NullProtoObject = typeof document != 'undefined'
|
|
? document.domain && activeXDocument
|
|
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
: NullProtoObjectViaIFrame()
|
|
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
var length = enumBugKeys$1.length;
|
|
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys$1[length]];
|
|
return NullProtoObject();
|
|
};
|
|
|
|
hiddenKeys$2[IE_PROTO$1] = true;
|
|
|
|
// `Object.create` method
|
|
// https://tc39.es/ecma262/#sec-object.create
|
|
// eslint-disable-next-line es-x/no-object-create -- safe
|
|
var objectCreate = Object.create || function create(O, Properties) {
|
|
var result;
|
|
if (O !== null) {
|
|
EmptyConstructor[PROTOTYPE] = anObject$6(O);
|
|
result = new EmptyConstructor();
|
|
EmptyConstructor[PROTOTYPE] = null;
|
|
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
result[IE_PROTO$1] = O;
|
|
} else result = NullProtoObject();
|
|
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
};
|
|
|
|
var wellKnownSymbol$9 = wellKnownSymbol$b;
|
|
var create$2 = objectCreate;
|
|
var definePropertyModule$3 = objectDefineProperty;
|
|
|
|
var UNSCOPABLES = wellKnownSymbol$9('unscopables');
|
|
var ArrayPrototype = Array.prototype;
|
|
|
|
// Array.prototype[@@unscopables]
|
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
definePropertyModule$3.f(ArrayPrototype, UNSCOPABLES, {
|
|
configurable: true,
|
|
value: create$2(null)
|
|
});
|
|
}
|
|
|
|
// add a key to Array.prototype[@@unscopables]
|
|
var addToUnscopables$1 = function (key) {
|
|
ArrayPrototype[UNSCOPABLES][key] = true;
|
|
};
|
|
|
|
var iterators = {};
|
|
|
|
var uncurryThis$8 = functionUncurryThis;
|
|
var isCallable$b = isCallable$h;
|
|
var store$1 = sharedStore;
|
|
|
|
var functionToString = uncurryThis$8(Function.toString);
|
|
|
|
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
if (!isCallable$b(store$1.inspectSource)) {
|
|
store$1.inspectSource = function (it) {
|
|
return functionToString(it);
|
|
};
|
|
}
|
|
|
|
var inspectSource$3 = store$1.inspectSource;
|
|
|
|
var global$f = global$w;
|
|
var isCallable$a = isCallable$h;
|
|
var inspectSource$2 = inspectSource$3;
|
|
|
|
var WeakMap$1 = global$f.WeakMap;
|
|
|
|
var nativeWeakMap = isCallable$a(WeakMap$1) && /native code/.test(inspectSource$2(WeakMap$1));
|
|
|
|
var createPropertyDescriptor$4 = function (bitmap, value) {
|
|
return {
|
|
enumerable: !(bitmap & 1),
|
|
configurable: !(bitmap & 2),
|
|
writable: !(bitmap & 4),
|
|
value: value
|
|
};
|
|
};
|
|
|
|
var DESCRIPTORS$3 = descriptors;
|
|
var definePropertyModule$2 = objectDefineProperty;
|
|
var createPropertyDescriptor$3 = createPropertyDescriptor$4;
|
|
|
|
var createNonEnumerableProperty$6 = DESCRIPTORS$3 ? function (object, key, value) {
|
|
return definePropertyModule$2.f(object, key, createPropertyDescriptor$3(1, value));
|
|
} : function (object, key, value) {
|
|
object[key] = value;
|
|
return object;
|
|
};
|
|
|
|
var NATIVE_WEAK_MAP = nativeWeakMap;
|
|
var global$e = global$w;
|
|
var uncurryThis$7 = functionUncurryThis;
|
|
var isObject$2 = isObject$7;
|
|
var createNonEnumerableProperty$5 = createNonEnumerableProperty$6;
|
|
var hasOwn$6 = hasOwnProperty_1;
|
|
var shared$1 = sharedStore;
|
|
var sharedKey$1 = sharedKey$3;
|
|
var hiddenKeys$1 = hiddenKeys$4;
|
|
|
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
var TypeError$4 = global$e.TypeError;
|
|
var WeakMap = global$e.WeakMap;
|
|
var set, get, has;
|
|
|
|
var enforce = function (it) {
|
|
return has(it) ? get(it) : set(it, {});
|
|
};
|
|
|
|
var getterFor = function (TYPE) {
|
|
return function (it) {
|
|
var state;
|
|
if (!isObject$2(it) || (state = get(it)).type !== TYPE) {
|
|
throw TypeError$4('Incompatible receiver, ' + TYPE + ' required');
|
|
} return state;
|
|
};
|
|
};
|
|
|
|
if (NATIVE_WEAK_MAP || shared$1.state) {
|
|
var store = shared$1.state || (shared$1.state = new WeakMap());
|
|
var wmget = uncurryThis$7(store.get);
|
|
var wmhas = uncurryThis$7(store.has);
|
|
var wmset = uncurryThis$7(store.set);
|
|
set = function (it, metadata) {
|
|
if (wmhas(store, it)) throw new TypeError$4(OBJECT_ALREADY_INITIALIZED);
|
|
metadata.facade = it;
|
|
wmset(store, it, metadata);
|
|
return metadata;
|
|
};
|
|
get = function (it) {
|
|
return wmget(store, it) || {};
|
|
};
|
|
has = function (it) {
|
|
return wmhas(store, it);
|
|
};
|
|
} else {
|
|
var STATE = sharedKey$1('state');
|
|
hiddenKeys$1[STATE] = true;
|
|
set = function (it, metadata) {
|
|
if (hasOwn$6(it, STATE)) throw new TypeError$4(OBJECT_ALREADY_INITIALIZED);
|
|
metadata.facade = it;
|
|
createNonEnumerableProperty$5(it, STATE, metadata);
|
|
return metadata;
|
|
};
|
|
get = function (it) {
|
|
return hasOwn$6(it, STATE) ? it[STATE] : {};
|
|
};
|
|
has = function (it) {
|
|
return hasOwn$6(it, STATE);
|
|
};
|
|
}
|
|
|
|
var internalState = {
|
|
set: set,
|
|
get: get,
|
|
has: has,
|
|
enforce: enforce,
|
|
getterFor: getterFor
|
|
};
|
|
|
|
var objectGetOwnPropertyDescriptor = {};
|
|
|
|
var objectPropertyIsEnumerable = {};
|
|
|
|
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
|
|
// Nashorn ~ JDK8 bug
|
|
var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
|
|
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
var descriptor = getOwnPropertyDescriptor$1(this, V);
|
|
return !!descriptor && descriptor.enumerable;
|
|
} : $propertyIsEnumerable;
|
|
|
|
var DESCRIPTORS$2 = descriptors;
|
|
var call$5 = functionCall;
|
|
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
var createPropertyDescriptor$2 = createPropertyDescriptor$4;
|
|
var toIndexedObject$1 = toIndexedObject$5;
|
|
var toPropertyKey$1 = toPropertyKey$3;
|
|
var hasOwn$5 = hasOwnProperty_1;
|
|
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
|
|
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
|
|
// `Object.getOwnPropertyDescriptor` method
|
|
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$2 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
|
O = toIndexedObject$1(O);
|
|
P = toPropertyKey$1(P);
|
|
if (IE8_DOM_DEFINE) try {
|
|
return $getOwnPropertyDescriptor(O, P);
|
|
} catch (error) { /* empty */ }
|
|
if (hasOwn$5(O, P)) return createPropertyDescriptor$2(!call$5(propertyIsEnumerableModule.f, O, P), O[P]);
|
|
};
|
|
|
|
var makeBuiltIn$2 = {exports: {}};
|
|
|
|
var DESCRIPTORS$1 = descriptors;
|
|
var hasOwn$4 = hasOwnProperty_1;
|
|
|
|
var FunctionPrototype$1 = Function.prototype;
|
|
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
var getDescriptor = DESCRIPTORS$1 && Object.getOwnPropertyDescriptor;
|
|
|
|
var EXISTS = hasOwn$4(FunctionPrototype$1, 'name');
|
|
// additional protection from minified / mangled / dropped function names
|
|
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$1 || (DESCRIPTORS$1 && getDescriptor(FunctionPrototype$1, 'name').configurable));
|
|
|
|
var functionName = {
|
|
EXISTS: EXISTS,
|
|
PROPER: PROPER,
|
|
CONFIGURABLE: CONFIGURABLE
|
|
};
|
|
|
|
var fails$9 = fails$g;
|
|
var isCallable$9 = isCallable$h;
|
|
var hasOwn$3 = hasOwnProperty_1;
|
|
var defineProperty$2 = objectDefineProperty.f;
|
|
var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
|
|
var inspectSource$1 = inspectSource$3;
|
|
var InternalStateModule$1 = internalState;
|
|
|
|
var enforceInternalState = InternalStateModule$1.enforce;
|
|
var getInternalState$2 = InternalStateModule$1.get;
|
|
|
|
var CONFIGURABLE_LENGTH = !fails$9(function () {
|
|
return defineProperty$2(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
});
|
|
|
|
var TEMPLATE = String(String).split('String');
|
|
|
|
var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
|
|
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
}
|
|
if (options && options.getter) name = 'get ' + name;
|
|
if (options && options.setter) name = 'set ' + name;
|
|
if (!hasOwn$3(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
|
|
defineProperty$2(value, 'name', { value: name, configurable: true });
|
|
}
|
|
if (CONFIGURABLE_LENGTH && options && hasOwn$3(options, 'arity') && value.length !== options.arity) {
|
|
defineProperty$2(value, 'length', { value: options.arity });
|
|
}
|
|
var state = enforceInternalState(value);
|
|
if (!hasOwn$3(state, 'source')) {
|
|
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
} return value;
|
|
};
|
|
|
|
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
// eslint-disable-next-line no-extend-native -- required
|
|
Function.prototype.toString = makeBuiltIn$1(function toString() {
|
|
return isCallable$9(this) && getInternalState$2(this).source || inspectSource$1(this);
|
|
}, 'toString');
|
|
|
|
var global$d = global$w;
|
|
var isCallable$8 = isCallable$h;
|
|
var createNonEnumerableProperty$4 = createNonEnumerableProperty$6;
|
|
var makeBuiltIn = makeBuiltIn$2.exports;
|
|
var setGlobal$1 = setGlobal$3;
|
|
|
|
var defineBuiltIn$4 = function (O, key, value, options) {
|
|
var unsafe = options ? !!options.unsafe : false;
|
|
var simple = options ? !!options.enumerable : false;
|
|
var noTargetGet = options ? !!options.noTargetGet : false;
|
|
var name = options && options.name !== undefined ? options.name : key;
|
|
if (isCallable$8(value)) makeBuiltIn(value, name, options);
|
|
if (O === global$d) {
|
|
if (simple) O[key] = value;
|
|
else setGlobal$1(key, value);
|
|
return O;
|
|
} else if (!unsafe) {
|
|
delete O[key];
|
|
} else if (!noTargetGet && O[key]) {
|
|
simple = true;
|
|
}
|
|
if (simple) O[key] = value;
|
|
else createNonEnumerableProperty$4(O, key, value);
|
|
return O;
|
|
};
|
|
|
|
var objectGetOwnPropertyNames = {};
|
|
|
|
var internalObjectKeys = objectKeysInternal;
|
|
var enumBugKeys = enumBugKeys$3;
|
|
|
|
var hiddenKeys = enumBugKeys.concat('length', 'prototype');
|
|
|
|
// `Object.getOwnPropertyNames` method
|
|
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
// eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
|
|
objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
return internalObjectKeys(O, hiddenKeys);
|
|
};
|
|
|
|
var objectGetOwnPropertySymbols = {};
|
|
|
|
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
|
|
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
|
|
var getBuiltIn$1 = getBuiltIn$5;
|
|
var uncurryThis$6 = functionUncurryThis;
|
|
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
var anObject$5 = anObject$9;
|
|
|
|
var concat = uncurryThis$6([].concat);
|
|
|
|
// all object keys, includes non-enumerable and symbols
|
|
var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
var keys = getOwnPropertyNamesModule.f(anObject$5(it));
|
|
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
|
|
};
|
|
|
|
var hasOwn$2 = hasOwnProperty_1;
|
|
var ownKeys = ownKeys$1;
|
|
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
var definePropertyModule$1 = objectDefineProperty;
|
|
|
|
var copyConstructorProperties$1 = function (target, source, exceptions) {
|
|
var keys = ownKeys(source);
|
|
var defineProperty = definePropertyModule$1.f;
|
|
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
for (var i = 0; i < keys.length; i++) {
|
|
var key = keys[i];
|
|
if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
|
|
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
}
|
|
}
|
|
};
|
|
|
|
var fails$8 = fails$g;
|
|
var isCallable$7 = isCallable$h;
|
|
|
|
var replacement = /#|\.prototype\./;
|
|
|
|
var isForced$1 = function (feature, detection) {
|
|
var value = data[normalize(feature)];
|
|
return value == POLYFILL ? true
|
|
: value == NATIVE ? false
|
|
: isCallable$7(detection) ? fails$8(detection)
|
|
: !!detection;
|
|
};
|
|
|
|
var normalize = isForced$1.normalize = function (string) {
|
|
return String(string).replace(replacement, '.').toLowerCase();
|
|
};
|
|
|
|
var data = isForced$1.data = {};
|
|
var NATIVE = isForced$1.NATIVE = 'N';
|
|
var POLYFILL = isForced$1.POLYFILL = 'P';
|
|
|
|
var isForced_1 = isForced$1;
|
|
|
|
var global$c = global$w;
|
|
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
var createNonEnumerableProperty$3 = createNonEnumerableProperty$6;
|
|
var defineBuiltIn$3 = defineBuiltIn$4;
|
|
var setGlobal = setGlobal$3;
|
|
var copyConstructorProperties = copyConstructorProperties$1;
|
|
var isForced = isForced_1;
|
|
|
|
/*
|
|
options.target - name of the target object
|
|
options.global - target is the global object
|
|
options.stat - export as static methods of target
|
|
options.proto - export as prototype methods of target
|
|
options.real - real prototype method for the `pure` version
|
|
options.forced - export even if the native feature is available
|
|
options.bind - bind methods to the target, required for the `pure` version
|
|
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
options.sham - add a flag to not completely full polyfills
|
|
options.enumerable - export as enumerable property
|
|
options.noTargetGet - prevent calling a getter on target
|
|
options.name - the .name of the function if it does not match the key
|
|
*/
|
|
var _export = function (options, source) {
|
|
var TARGET = options.target;
|
|
var GLOBAL = options.global;
|
|
var STATIC = options.stat;
|
|
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
if (GLOBAL) {
|
|
target = global$c;
|
|
} else if (STATIC) {
|
|
target = global$c[TARGET] || setGlobal(TARGET, {});
|
|
} else {
|
|
target = (global$c[TARGET] || {}).prototype;
|
|
}
|
|
if (target) for (key in source) {
|
|
sourceProperty = source[key];
|
|
if (options.noTargetGet) {
|
|
descriptor = getOwnPropertyDescriptor(target, key);
|
|
targetProperty = descriptor && descriptor.value;
|
|
} else targetProperty = target[key];
|
|
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
// contained in target
|
|
if (!FORCED && targetProperty !== undefined) {
|
|
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
copyConstructorProperties(sourceProperty, targetProperty);
|
|
}
|
|
// add a flag to not completely full polyfills
|
|
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
createNonEnumerableProperty$3(sourceProperty, 'sham', true);
|
|
}
|
|
defineBuiltIn$3(target, key, sourceProperty, options);
|
|
}
|
|
};
|
|
|
|
var fails$7 = fails$g;
|
|
|
|
var correctPrototypeGetter = !fails$7(function () {
|
|
function F() { /* empty */ }
|
|
F.prototype.constructor = null;
|
|
// eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
|
|
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
});
|
|
|
|
var global$b = global$w;
|
|
var hasOwn$1 = hasOwnProperty_1;
|
|
var isCallable$6 = isCallable$h;
|
|
var toObject = toObject$2;
|
|
var sharedKey = sharedKey$3;
|
|
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
|
|
var IE_PROTO = sharedKey('IE_PROTO');
|
|
var Object$2 = global$b.Object;
|
|
var ObjectPrototype = Object$2.prototype;
|
|
|
|
// `Object.getPrototypeOf` method
|
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? Object$2.getPrototypeOf : function (O) {
|
|
var object = toObject(O);
|
|
if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
|
|
var constructor = object.constructor;
|
|
if (isCallable$6(constructor) && object instanceof constructor) {
|
|
return constructor.prototype;
|
|
} return object instanceof Object$2 ? ObjectPrototype : null;
|
|
};
|
|
|
|
var fails$6 = fails$g;
|
|
var isCallable$5 = isCallable$h;
|
|
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
var defineBuiltIn$2 = defineBuiltIn$4;
|
|
var wellKnownSymbol$8 = wellKnownSymbol$b;
|
|
|
|
var ITERATOR$2 = wellKnownSymbol$8('iterator');
|
|
var BUGGY_SAFARI_ITERATORS$1 = false;
|
|
|
|
// `%IteratorPrototype%` object
|
|
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
|
|
var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
|
|
|
/* eslint-disable es-x/no-array-prototype-keys -- safe */
|
|
if ([].keys) {
|
|
arrayIterator = [].keys();
|
|
// Safari 8 has buggy iterators w/o `next`
|
|
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
|
|
else {
|
|
PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
|
|
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
|
|
}
|
|
}
|
|
|
|
var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails$6(function () {
|
|
var test = {};
|
|
// FF44- legacy iterators case
|
|
return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
|
|
});
|
|
|
|
if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
|
|
|
|
// `%IteratorPrototype%[@@iterator]()` method
|
|
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
|
|
if (!isCallable$5(IteratorPrototype$2[ITERATOR$2])) {
|
|
defineBuiltIn$2(IteratorPrototype$2, ITERATOR$2, function () {
|
|
return this;
|
|
});
|
|
}
|
|
|
|
var iteratorsCore = {
|
|
IteratorPrototype: IteratorPrototype$2,
|
|
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
|
|
};
|
|
|
|
var defineProperty$1 = objectDefineProperty.f;
|
|
var hasOwn = hasOwnProperty_1;
|
|
var wellKnownSymbol$7 = wellKnownSymbol$b;
|
|
|
|
var TO_STRING_TAG$3 = wellKnownSymbol$7('toStringTag');
|
|
|
|
var setToStringTag$2 = function (target, TAG, STATIC) {
|
|
if (target && !STATIC) target = target.prototype;
|
|
if (target && !hasOwn(target, TO_STRING_TAG$3)) {
|
|
defineProperty$1(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
|
|
}
|
|
};
|
|
|
|
var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
|
|
var create$1 = objectCreate;
|
|
var createPropertyDescriptor$1 = createPropertyDescriptor$4;
|
|
var setToStringTag$1 = setToStringTag$2;
|
|
var Iterators$2 = iterators;
|
|
|
|
var returnThis$1 = function () { return this; };
|
|
|
|
var createIteratorConstructor$1 = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
|
|
var TO_STRING_TAG = NAME + ' Iterator';
|
|
IteratorConstructor.prototype = create$1(IteratorPrototype$1, { next: createPropertyDescriptor$1(+!ENUMERABLE_NEXT, next) });
|
|
setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false);
|
|
Iterators$2[TO_STRING_TAG] = returnThis$1;
|
|
return IteratorConstructor;
|
|
};
|
|
|
|
var global$a = global$w;
|
|
var isCallable$4 = isCallable$h;
|
|
|
|
var String$2 = global$a.String;
|
|
var TypeError$3 = global$a.TypeError;
|
|
|
|
var aPossiblePrototype$1 = function (argument) {
|
|
if (typeof argument == 'object' || isCallable$4(argument)) return argument;
|
|
throw TypeError$3("Can't set " + String$2(argument) + ' as a prototype');
|
|
};
|
|
|
|
/* eslint-disable no-proto -- safe */
|
|
|
|
var uncurryThis$5 = functionUncurryThis;
|
|
var anObject$4 = anObject$9;
|
|
var aPossiblePrototype = aPossiblePrototype$1;
|
|
|
|
// `Object.setPrototypeOf` method
|
|
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
// eslint-disable-next-line es-x/no-object-setprototypeof -- safe
|
|
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
var CORRECT_SETTER = false;
|
|
var test = {};
|
|
var setter;
|
|
try {
|
|
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
setter = uncurryThis$5(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
setter(test, []);
|
|
CORRECT_SETTER = test instanceof Array;
|
|
} catch (error) { /* empty */ }
|
|
return function setPrototypeOf(O, proto) {
|
|
anObject$4(O);
|
|
aPossiblePrototype(proto);
|
|
if (CORRECT_SETTER) setter(O, proto);
|
|
else O.__proto__ = proto;
|
|
return O;
|
|
};
|
|
}() : undefined);
|
|
|
|
var $$1 = _export;
|
|
var call$4 = functionCall;
|
|
var FunctionName = functionName;
|
|
var isCallable$3 = isCallable$h;
|
|
var createIteratorConstructor = createIteratorConstructor$1;
|
|
var getPrototypeOf = objectGetPrototypeOf;
|
|
var setPrototypeOf = objectSetPrototypeOf;
|
|
var setToStringTag = setToStringTag$2;
|
|
var createNonEnumerableProperty$2 = createNonEnumerableProperty$6;
|
|
var defineBuiltIn$1 = defineBuiltIn$4;
|
|
var wellKnownSymbol$6 = wellKnownSymbol$b;
|
|
var Iterators$1 = iterators;
|
|
var IteratorsCore = iteratorsCore;
|
|
|
|
var PROPER_FUNCTION_NAME = FunctionName.PROPER;
|
|
var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
|
|
var IteratorPrototype = IteratorsCore.IteratorPrototype;
|
|
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
|
|
var ITERATOR$1 = wellKnownSymbol$6('iterator');
|
|
var KEYS = 'keys';
|
|
var VALUES = 'values';
|
|
var ENTRIES = 'entries';
|
|
|
|
var returnThis = function () { return this; };
|
|
|
|
var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
|
|
createIteratorConstructor(IteratorConstructor, NAME, next);
|
|
|
|
var getIterationMethod = function (KIND) {
|
|
if (KIND === DEFAULT && defaultIterator) return defaultIterator;
|
|
if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
|
|
switch (KIND) {
|
|
case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
|
|
case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
|
|
case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
|
|
} return function () { return new IteratorConstructor(this); };
|
|
};
|
|
|
|
var TO_STRING_TAG = NAME + ' Iterator';
|
|
var INCORRECT_VALUES_NAME = false;
|
|
var IterablePrototype = Iterable.prototype;
|
|
var nativeIterator = IterablePrototype[ITERATOR$1]
|
|
|| IterablePrototype['@@iterator']
|
|
|| DEFAULT && IterablePrototype[DEFAULT];
|
|
var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
|
|
var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
|
|
var CurrentIteratorPrototype, methods, KEY;
|
|
|
|
// fix native
|
|
if (anyNativeIterator) {
|
|
CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
|
|
if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
|
|
if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
|
|
if (setPrototypeOf) {
|
|
setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
|
|
} else if (!isCallable$3(CurrentIteratorPrototype[ITERATOR$1])) {
|
|
defineBuiltIn$1(CurrentIteratorPrototype, ITERATOR$1, returnThis);
|
|
}
|
|
}
|
|
// Set @@toStringTag to native iterators
|
|
setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
|
|
}
|
|
}
|
|
|
|
// fix Array.prototype.{ values, @@iterator }.name in V8 / FF
|
|
if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
|
if (CONFIGURABLE_FUNCTION_NAME) {
|
|
createNonEnumerableProperty$2(IterablePrototype, 'name', VALUES);
|
|
} else {
|
|
INCORRECT_VALUES_NAME = true;
|
|
defaultIterator = function values() { return call$4(nativeIterator, this); };
|
|
}
|
|
}
|
|
|
|
// export additional methods
|
|
if (DEFAULT) {
|
|
methods = {
|
|
values: getIterationMethod(VALUES),
|
|
keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
|
|
entries: getIterationMethod(ENTRIES)
|
|
};
|
|
if (FORCED) for (KEY in methods) {
|
|
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
defineBuiltIn$1(IterablePrototype, KEY, methods[KEY]);
|
|
}
|
|
} else $$1({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
}
|
|
|
|
// define iterator
|
|
if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
|
|
defineBuiltIn$1(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
|
|
}
|
|
Iterators$1[NAME] = defaultIterator;
|
|
|
|
return methods;
|
|
};
|
|
|
|
var toIndexedObject = toIndexedObject$5;
|
|
var addToUnscopables = addToUnscopables$1;
|
|
var Iterators = iterators;
|
|
var InternalStateModule = internalState;
|
|
var defineProperty = objectDefineProperty.f;
|
|
var defineIterator = defineIterator$1;
|
|
var DESCRIPTORS = descriptors;
|
|
|
|
var ARRAY_ITERATOR = 'Array Iterator';
|
|
var setInternalState = InternalStateModule.set;
|
|
var getInternalState$1 = InternalStateModule.getterFor(ARRAY_ITERATOR);
|
|
|
|
// `Array.prototype.entries` method
|
|
// https://tc39.es/ecma262/#sec-array.prototype.entries
|
|
// `Array.prototype.keys` method
|
|
// https://tc39.es/ecma262/#sec-array.prototype.keys
|
|
// `Array.prototype.values` method
|
|
// https://tc39.es/ecma262/#sec-array.prototype.values
|
|
// `Array.prototype[@@iterator]` method
|
|
// https://tc39.es/ecma262/#sec-array.prototype-@@iterator
|
|
// `CreateArrayIterator` internal method
|
|
// https://tc39.es/ecma262/#sec-createarrayiterator
|
|
var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
|
|
setInternalState(this, {
|
|
type: ARRAY_ITERATOR,
|
|
target: toIndexedObject(iterated), // target
|
|
index: 0, // next index
|
|
kind: kind // kind
|
|
});
|
|
// `%ArrayIteratorPrototype%.next` method
|
|
// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
|
|
}, function () {
|
|
var state = getInternalState$1(this);
|
|
var target = state.target;
|
|
var kind = state.kind;
|
|
var index = state.index++;
|
|
if (!target || index >= target.length) {
|
|
state.target = undefined;
|
|
return { value: undefined, done: true };
|
|
}
|
|
if (kind == 'keys') return { value: index, done: false };
|
|
if (kind == 'values') return { value: target[index], done: false };
|
|
return { value: [index, target[index]], done: false };
|
|
}, 'values');
|
|
|
|
// argumentsList[@@iterator] is %ArrayProto_values%
|
|
// https://tc39.es/ecma262/#sec-createunmappedargumentsobject
|
|
// https://tc39.es/ecma262/#sec-createmappedargumentsobject
|
|
var values = Iterators.Arguments = Iterators.Array;
|
|
|
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
addToUnscopables('keys');
|
|
addToUnscopables('values');
|
|
addToUnscopables('entries');
|
|
|
|
// V8 ~ Chrome 45- bug
|
|
if (DESCRIPTORS && values.name !== 'values') try {
|
|
defineProperty(values, 'name', { value: 'values' });
|
|
} catch (error) { /* empty */ }
|
|
|
|
// iterable DOM collections
|
|
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
|
var domIterables = {
|
|
CSSRuleList: 0,
|
|
CSSStyleDeclaration: 0,
|
|
CSSValueList: 0,
|
|
ClientRectList: 0,
|
|
DOMRectList: 0,
|
|
DOMStringList: 0,
|
|
DOMTokenList: 1,
|
|
DataTransferItemList: 0,
|
|
FileList: 0,
|
|
HTMLAllCollection: 0,
|
|
HTMLCollection: 0,
|
|
HTMLFormElement: 0,
|
|
HTMLSelectElement: 0,
|
|
MediaList: 0,
|
|
MimeTypeArray: 0,
|
|
NamedNodeMap: 0,
|
|
NodeList: 1,
|
|
PaintRequestList: 0,
|
|
Plugin: 0,
|
|
PluginArray: 0,
|
|
SVGLengthList: 0,
|
|
SVGNumberList: 0,
|
|
SVGPathSegList: 0,
|
|
SVGPointList: 0,
|
|
SVGStringList: 0,
|
|
SVGTransformList: 0,
|
|
SourceBufferList: 0,
|
|
StyleSheetList: 0,
|
|
TextTrackCueList: 0,
|
|
TextTrackList: 0,
|
|
TouchList: 0
|
|
};
|
|
|
|
// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
|
|
var documentCreateElement = documentCreateElement$2;
|
|
|
|
var classList = documentCreateElement('span').classList;
|
|
var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
|
|
|
|
var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
|
|
|
|
var global$9 = global$w;
|
|
var DOMIterables = domIterables;
|
|
var DOMTokenListPrototype = domTokenListPrototype;
|
|
var ArrayIteratorMethods = es_array_iterator;
|
|
var createNonEnumerableProperty$1 = createNonEnumerableProperty$6;
|
|
var wellKnownSymbol$5 = wellKnownSymbol$b;
|
|
|
|
var ITERATOR = wellKnownSymbol$5('iterator');
|
|
var TO_STRING_TAG$2 = wellKnownSymbol$5('toStringTag');
|
|
var ArrayValues = ArrayIteratorMethods.values;
|
|
|
|
var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
|
|
if (CollectionPrototype) {
|
|
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
|
|
createNonEnumerableProperty$1(CollectionPrototype, ITERATOR, ArrayValues);
|
|
} catch (error) {
|
|
CollectionPrototype[ITERATOR] = ArrayValues;
|
|
}
|
|
if (!CollectionPrototype[TO_STRING_TAG$2]) {
|
|
createNonEnumerableProperty$1(CollectionPrototype, TO_STRING_TAG$2, COLLECTION_NAME);
|
|
}
|
|
if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
|
|
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
|
|
createNonEnumerableProperty$1(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
|
|
} catch (error) {
|
|
CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
|
|
}
|
|
}
|
|
}
|
|
};
|
|
|
|
for (var COLLECTION_NAME in DOMIterables) {
|
|
handlePrototype(global$9[COLLECTION_NAME] && global$9[COLLECTION_NAME].prototype, COLLECTION_NAME);
|
|
}
|
|
|
|
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
|
|
var wellKnownSymbol$4 = wellKnownSymbol$b;
|
|
|
|
var TO_STRING_TAG$1 = wellKnownSymbol$4('toStringTag');
|
|
var test = {};
|
|
|
|
test[TO_STRING_TAG$1] = 'z';
|
|
|
|
var toStringTagSupport = String(test) === '[object z]';
|
|
|
|
var global$8 = global$w;
|
|
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
var isCallable$2 = isCallable$h;
|
|
var classofRaw = classofRaw$1;
|
|
var wellKnownSymbol$3 = wellKnownSymbol$b;
|
|
|
|
var TO_STRING_TAG = wellKnownSymbol$3('toStringTag');
|
|
var Object$1 = global$8.Object;
|
|
|
|
// ES3 wrong here
|
|
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
|
|
// fallback for IE11 Script Access Denied error
|
|
var tryGet = function (it, key) {
|
|
try {
|
|
return it[key];
|
|
} catch (error) { /* empty */ }
|
|
};
|
|
|
|
// getting tag from ES6+ `Object.prototype.toString`
|
|
var classof$4 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
var O, tag, result;
|
|
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
// @@toStringTag case
|
|
: typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
|
|
// builtinTag case
|
|
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
// ES3 arguments fallback
|
|
: (result = classofRaw(O)) == 'Object' && isCallable$2(O.callee) ? 'Arguments' : result;
|
|
};
|
|
|
|
var global$7 = global$w;
|
|
var classof$3 = classof$4;
|
|
|
|
var String$1 = global$7.String;
|
|
|
|
var toString$3 = function (argument) {
|
|
if (classof$3(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
return String$1(argument);
|
|
};
|
|
|
|
var anObject$3 = anObject$9;
|
|
|
|
// `RegExp.prototype.flags` getter implementation
|
|
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
var regexpFlags$1 = function () {
|
|
var that = anObject$3(this);
|
|
var result = '';
|
|
if (that.hasIndices) result += 'd';
|
|
if (that.global) result += 'g';
|
|
if (that.ignoreCase) result += 'i';
|
|
if (that.multiline) result += 'm';
|
|
if (that.dotAll) result += 's';
|
|
if (that.unicode) result += 'u';
|
|
if (that.sticky) result += 'y';
|
|
return result;
|
|
};
|
|
|
|
var fails$5 = fails$g;
|
|
var global$6 = global$w;
|
|
|
|
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
var $RegExp$2 = global$6.RegExp;
|
|
|
|
var UNSUPPORTED_Y$2 = fails$5(function () {
|
|
var re = $RegExp$2('a', 'y');
|
|
re.lastIndex = 2;
|
|
return re.exec('abcd') != null;
|
|
});
|
|
|
|
// UC Browser bug
|
|
// https://github.com/zloirock/core-js/issues/1008
|
|
var MISSED_STICKY = UNSUPPORTED_Y$2 || fails$5(function () {
|
|
return !$RegExp$2('a', 'y').sticky;
|
|
});
|
|
|
|
var BROKEN_CARET = UNSUPPORTED_Y$2 || fails$5(function () {
|
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
var re = $RegExp$2('^r', 'gy');
|
|
re.lastIndex = 2;
|
|
return re.exec('str') != null;
|
|
});
|
|
|
|
var regexpStickyHelpers = {
|
|
BROKEN_CARET: BROKEN_CARET,
|
|
MISSED_STICKY: MISSED_STICKY,
|
|
UNSUPPORTED_Y: UNSUPPORTED_Y$2
|
|
};
|
|
|
|
var fails$4 = fails$g;
|
|
var global$5 = global$w;
|
|
|
|
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
|
var $RegExp$1 = global$5.RegExp;
|
|
|
|
var regexpUnsupportedDotAll = fails$4(function () {
|
|
var re = $RegExp$1('.', 's');
|
|
return !(re.dotAll && re.exec('\n') && re.flags === 's');
|
|
});
|
|
|
|
var fails$3 = fails$g;
|
|
var global$4 = global$w;
|
|
|
|
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
|
var $RegExp = global$4.RegExp;
|
|
|
|
var regexpUnsupportedNcg = fails$3(function () {
|
|
var re = $RegExp('(?<a>b)', 'g');
|
|
return re.exec('b').groups.a !== 'b' ||
|
|
'b'.replace(re, '$<a>c') !== 'bc';
|
|
});
|
|
|
|
/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
|
|
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
|
var call$3 = functionCall;
|
|
var uncurryThis$4 = functionUncurryThis;
|
|
var toString$2 = toString$3;
|
|
var regexpFlags = regexpFlags$1;
|
|
var stickyHelpers$1 = regexpStickyHelpers;
|
|
var shared = shared$4.exports;
|
|
var create = objectCreate;
|
|
var getInternalState = internalState.get;
|
|
var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
|
|
var UNSUPPORTED_NCG = regexpUnsupportedNcg;
|
|
|
|
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
|
var nativeExec = RegExp.prototype.exec;
|
|
var patchedExec = nativeExec;
|
|
var charAt$2 = uncurryThis$4(''.charAt);
|
|
var indexOf = uncurryThis$4(''.indexOf);
|
|
var replace = uncurryThis$4(''.replace);
|
|
var stringSlice$2 = uncurryThis$4(''.slice);
|
|
|
|
var UPDATES_LAST_INDEX_WRONG = (function () {
|
|
var re1 = /a/;
|
|
var re2 = /b*/g;
|
|
call$3(nativeExec, re1, 'a');
|
|
call$3(nativeExec, re2, 'a');
|
|
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
|
})();
|
|
|
|
var UNSUPPORTED_Y$1 = stickyHelpers$1.BROKEN_CARET;
|
|
|
|
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
|
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
|
|
|
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1 || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
|
|
|
|
if (PATCH) {
|
|
patchedExec = function exec(string) {
|
|
var re = this;
|
|
var state = getInternalState(re);
|
|
var str = toString$2(string);
|
|
var raw = state.raw;
|
|
var result, reCopy, lastIndex, match, i, object, group;
|
|
|
|
if (raw) {
|
|
raw.lastIndex = re.lastIndex;
|
|
result = call$3(patchedExec, raw, str);
|
|
re.lastIndex = raw.lastIndex;
|
|
return result;
|
|
}
|
|
|
|
var groups = state.groups;
|
|
var sticky = UNSUPPORTED_Y$1 && re.sticky;
|
|
var flags = call$3(regexpFlags, re);
|
|
var source = re.source;
|
|
var charsAdded = 0;
|
|
var strCopy = str;
|
|
|
|
if (sticky) {
|
|
flags = replace(flags, 'y', '');
|
|
if (indexOf(flags, 'g') === -1) {
|
|
flags += 'g';
|
|
}
|
|
|
|
strCopy = stringSlice$2(str, re.lastIndex);
|
|
// Support anchored sticky behavior.
|
|
if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$2(str, re.lastIndex - 1) !== '\n')) {
|
|
source = '(?: ' + source + ')';
|
|
strCopy = ' ' + strCopy;
|
|
charsAdded++;
|
|
}
|
|
// ^(? + rx + ) is needed, in combination with some str slicing, to
|
|
// simulate the 'y' flag.
|
|
reCopy = new RegExp('^(?:' + source + ')', flags);
|
|
}
|
|
|
|
if (NPCG_INCLUDED) {
|
|
reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
|
|
}
|
|
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
|
|
|
match = call$3(nativeExec, sticky ? reCopy : re, strCopy);
|
|
|
|
if (sticky) {
|
|
if (match) {
|
|
match.input = stringSlice$2(match.input, charsAdded);
|
|
match[0] = stringSlice$2(match[0], charsAdded);
|
|
match.index = re.lastIndex;
|
|
re.lastIndex += match[0].length;
|
|
} else re.lastIndex = 0;
|
|
} else if (UPDATES_LAST_INDEX_WRONG && match) {
|
|
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
|
|
}
|
|
if (NPCG_INCLUDED && match && match.length > 1) {
|
|
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
|
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
|
call$3(nativeReplace, match[0], reCopy, function () {
|
|
for (i = 1; i < arguments.length - 2; i++) {
|
|
if (arguments[i] === undefined) match[i] = undefined;
|
|
}
|
|
});
|
|
}
|
|
|
|
if (match && groups) {
|
|
match.groups = object = create(null);
|
|
for (i = 0; i < groups.length; i++) {
|
|
group = groups[i];
|
|
object[group[0]] = match[group[1]];
|
|
}
|
|
}
|
|
|
|
return match;
|
|
};
|
|
}
|
|
|
|
var regexpExec$3 = patchedExec;
|
|
|
|
var $ = _export;
|
|
var exec$2 = regexpExec$3;
|
|
|
|
// `RegExp.prototype.exec` method
|
|
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
|
|
$({ target: 'RegExp', proto: true, forced: /./.exec !== exec$2 }, {
|
|
exec: exec$2
|
|
});
|
|
|
|
var NATIVE_BIND = functionBindNative;
|
|
|
|
var FunctionPrototype = Function.prototype;
|
|
var apply$1 = FunctionPrototype.apply;
|
|
var call$2 = FunctionPrototype.call;
|
|
|
|
// eslint-disable-next-line es-x/no-reflect -- safe
|
|
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$2.bind(apply$1) : function () {
|
|
return call$2.apply(apply$1, arguments);
|
|
});
|
|
|
|
// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
|
|
var uncurryThis$3 = functionUncurryThis;
|
|
var defineBuiltIn = defineBuiltIn$4;
|
|
var regexpExec$2 = regexpExec$3;
|
|
var fails$2 = fails$g;
|
|
var wellKnownSymbol$2 = wellKnownSymbol$b;
|
|
var createNonEnumerableProperty = createNonEnumerableProperty$6;
|
|
|
|
var SPECIES$1 = wellKnownSymbol$2('species');
|
|
var RegExpPrototype = RegExp.prototype;
|
|
|
|
var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
var SYMBOL = wellKnownSymbol$2(KEY);
|
|
|
|
var DELEGATES_TO_SYMBOL = !fails$2(function () {
|
|
// String methods call symbol-named RegEp methods
|
|
var O = {};
|
|
O[SYMBOL] = function () { return 7; };
|
|
return ''[KEY](O) != 7;
|
|
});
|
|
|
|
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$2(function () {
|
|
// Symbol-named RegExp methods call .exec
|
|
var execCalled = false;
|
|
var re = /a/;
|
|
|
|
if (KEY === 'split') {
|
|
// We can't use real regex here since it causes deoptimization
|
|
// and serious performance degradation in V8
|
|
// https://github.com/zloirock/core-js/issues/306
|
|
re = {};
|
|
// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
|
// a new one. We need to return the patched regex when creating the new one.
|
|
re.constructor = {};
|
|
re.constructor[SPECIES$1] = function () { return re; };
|
|
re.flags = '';
|
|
re[SYMBOL] = /./[SYMBOL];
|
|
}
|
|
|
|
re.exec = function () { execCalled = true; return null; };
|
|
|
|
re[SYMBOL]('');
|
|
return !execCalled;
|
|
});
|
|
|
|
if (
|
|
!DELEGATES_TO_SYMBOL ||
|
|
!DELEGATES_TO_EXEC ||
|
|
FORCED
|
|
) {
|
|
var uncurriedNativeRegExpMethod = uncurryThis$3(/./[SYMBOL]);
|
|
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
|
var uncurriedNativeMethod = uncurryThis$3(nativeMethod);
|
|
var $exec = regexp.exec;
|
|
if ($exec === regexpExec$2 || $exec === RegExpPrototype.exec) {
|
|
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
|
// The native String method already delegates to @@method (this
|
|
// polyfilled function), leasing to infinite recursion.
|
|
// We avoid it by directly calling the native @@method method.
|
|
return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
|
|
}
|
|
return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
|
|
}
|
|
return { done: false };
|
|
});
|
|
|
|
defineBuiltIn(String.prototype, KEY, methods[0]);
|
|
defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
|
|
}
|
|
|
|
if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
|
|
};
|
|
|
|
var isObject$1 = isObject$7;
|
|
var classof$2 = classofRaw$1;
|
|
var wellKnownSymbol$1 = wellKnownSymbol$b;
|
|
|
|
var MATCH = wellKnownSymbol$1('match');
|
|
|
|
// `IsRegExp` abstract operation
|
|
// https://tc39.es/ecma262/#sec-isregexp
|
|
var isRegexp = function (it) {
|
|
var isRegExp;
|
|
return isObject$1(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof$2(it) == 'RegExp');
|
|
};
|
|
|
|
var uncurryThis$2 = functionUncurryThis;
|
|
var fails$1 = fails$g;
|
|
var isCallable$1 = isCallable$h;
|
|
var classof$1 = classof$4;
|
|
var getBuiltIn = getBuiltIn$5;
|
|
var inspectSource = inspectSource$3;
|
|
|
|
var noop = function () { /* empty */ };
|
|
var empty = [];
|
|
var construct = getBuiltIn('Reflect', 'construct');
|
|
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
var exec$1 = uncurryThis$2(constructorRegExp.exec);
|
|
var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
|
|
|
|
var isConstructorModern = function isConstructor(argument) {
|
|
if (!isCallable$1(argument)) return false;
|
|
try {
|
|
construct(noop, empty, argument);
|
|
return true;
|
|
} catch (error) {
|
|
return false;
|
|
}
|
|
};
|
|
|
|
var isConstructorLegacy = function isConstructor(argument) {
|
|
if (!isCallable$1(argument)) return false;
|
|
switch (classof$1(argument)) {
|
|
case 'AsyncFunction':
|
|
case 'GeneratorFunction':
|
|
case 'AsyncGeneratorFunction': return false;
|
|
}
|
|
try {
|
|
// we can't check .prototype since constructors produced by .bind haven't it
|
|
// `Function#toString` throws on some built-it function in some legacy engines
|
|
// (for example, `DOMQuad` and similar in FF41-)
|
|
return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource(argument));
|
|
} catch (error) {
|
|
return true;
|
|
}
|
|
};
|
|
|
|
isConstructorLegacy.sham = true;
|
|
|
|
// `IsConstructor` abstract operation
|
|
// https://tc39.es/ecma262/#sec-isconstructor
|
|
var isConstructor$1 = !construct || fails$1(function () {
|
|
var called;
|
|
return isConstructorModern(isConstructorModern.call)
|
|
|| !isConstructorModern(Object)
|
|
|| !isConstructorModern(function () { called = true; })
|
|
|| called;
|
|
}) ? isConstructorLegacy : isConstructorModern;
|
|
|
|
var global$3 = global$w;
|
|
var isConstructor = isConstructor$1;
|
|
var tryToString = tryToString$2;
|
|
|
|
var TypeError$2 = global$3.TypeError;
|
|
|
|
// `Assert: IsConstructor(argument) is true`
|
|
var aConstructor$1 = function (argument) {
|
|
if (isConstructor(argument)) return argument;
|
|
throw TypeError$2(tryToString(argument) + ' is not a constructor');
|
|
};
|
|
|
|
var anObject$2 = anObject$9;
|
|
var aConstructor = aConstructor$1;
|
|
var wellKnownSymbol = wellKnownSymbol$b;
|
|
|
|
var SPECIES = wellKnownSymbol('species');
|
|
|
|
// `SpeciesConstructor` abstract operation
|
|
// https://tc39.es/ecma262/#sec-speciesconstructor
|
|
var speciesConstructor$1 = function (O, defaultConstructor) {
|
|
var C = anObject$2(O).constructor;
|
|
var S;
|
|
return C === undefined || (S = anObject$2(C)[SPECIES]) == undefined ? defaultConstructor : aConstructor(S);
|
|
};
|
|
|
|
var uncurryThis$1 = functionUncurryThis;
|
|
var toIntegerOrInfinity = toIntegerOrInfinity$3;
|
|
var toString$1 = toString$3;
|
|
var requireObjectCoercible$1 = requireObjectCoercible$4;
|
|
|
|
var charAt$1 = uncurryThis$1(''.charAt);
|
|
var charCodeAt = uncurryThis$1(''.charCodeAt);
|
|
var stringSlice$1 = uncurryThis$1(''.slice);
|
|
|
|
var createMethod = function (CONVERT_TO_STRING) {
|
|
return function ($this, pos) {
|
|
var S = toString$1(requireObjectCoercible$1($this));
|
|
var position = toIntegerOrInfinity(pos);
|
|
var size = S.length;
|
|
var first, second;
|
|
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
|
first = charCodeAt(S, position);
|
|
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
|
|| (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
|
|
? CONVERT_TO_STRING
|
|
? charAt$1(S, position)
|
|
: first
|
|
: CONVERT_TO_STRING
|
|
? stringSlice$1(S, position, position + 2)
|
|
: (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
|
};
|
|
};
|
|
|
|
var stringMultibyte = {
|
|
// `String.prototype.codePointAt` method
|
|
// https://tc39.es/ecma262/#sec-string.prototype.codepointat
|
|
codeAt: createMethod(false),
|
|
// `String.prototype.at` method
|
|
// https://github.com/mathiasbynens/String.prototype.at
|
|
charAt: createMethod(true)
|
|
};
|
|
|
|
var charAt = stringMultibyte.charAt;
|
|
|
|
// `AdvanceStringIndex` abstract operation
|
|
// https://tc39.es/ecma262/#sec-advancestringindex
|
|
var advanceStringIndex$1 = function (S, index, unicode) {
|
|
return index + (unicode ? charAt(S, index).length : 1);
|
|
};
|
|
|
|
var toPropertyKey = toPropertyKey$3;
|
|
var definePropertyModule = objectDefineProperty;
|
|
var createPropertyDescriptor = createPropertyDescriptor$4;
|
|
|
|
var createProperty$1 = function (object, key, value) {
|
|
var propertyKey = toPropertyKey(key);
|
|
if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
|
|
else object[propertyKey] = value;
|
|
};
|
|
|
|
var global$2 = global$w;
|
|
var toAbsoluteIndex = toAbsoluteIndex$2;
|
|
var lengthOfArrayLike = lengthOfArrayLike$2;
|
|
var createProperty = createProperty$1;
|
|
|
|
var Array$1 = global$2.Array;
|
|
var max = Math.max;
|
|
|
|
var arraySliceSimple = function (O, start, end) {
|
|
var length = lengthOfArrayLike(O);
|
|
var k = toAbsoluteIndex(start, length);
|
|
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
|
var result = Array$1(max(fin - k, 0));
|
|
for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
|
|
result.length = n;
|
|
return result;
|
|
};
|
|
|
|
var global$1 = global$w;
|
|
var call$1 = functionCall;
|
|
var anObject$1 = anObject$9;
|
|
var isCallable = isCallable$h;
|
|
var classof = classofRaw$1;
|
|
var regexpExec$1 = regexpExec$3;
|
|
|
|
var TypeError$1 = global$1.TypeError;
|
|
|
|
// `RegExpExec` abstract operation
|
|
// https://tc39.es/ecma262/#sec-regexpexec
|
|
var regexpExecAbstract = function (R, S) {
|
|
var exec = R.exec;
|
|
if (isCallable(exec)) {
|
|
var result = call$1(exec, R, S);
|
|
if (result !== null) anObject$1(result);
|
|
return result;
|
|
}
|
|
if (classof(R) === 'RegExp') return call$1(regexpExec$1, R, S);
|
|
throw TypeError$1('RegExp#exec called on incompatible receiver');
|
|
};
|
|
|
|
var apply = functionApply;
|
|
var call = functionCall;
|
|
var uncurryThis = functionUncurryThis;
|
|
var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
|
|
var isRegExp = isRegexp;
|
|
var anObject = anObject$9;
|
|
var requireObjectCoercible = requireObjectCoercible$4;
|
|
var speciesConstructor = speciesConstructor$1;
|
|
var advanceStringIndex = advanceStringIndex$1;
|
|
var toLength = toLength$2;
|
|
var toString = toString$3;
|
|
var getMethod = getMethod$2;
|
|
var arraySlice = arraySliceSimple;
|
|
var callRegExpExec = regexpExecAbstract;
|
|
var regexpExec = regexpExec$3;
|
|
var stickyHelpers = regexpStickyHelpers;
|
|
var fails = fails$g;
|
|
|
|
var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
|
|
var MAX_UINT32 = 0xFFFFFFFF;
|
|
var min = Math.min;
|
|
var $push = [].push;
|
|
var exec = uncurryThis(/./.exec);
|
|
var push = uncurryThis($push);
|
|
var stringSlice = uncurryThis(''.slice);
|
|
|
|
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
|
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
|
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
|
// eslint-disable-next-line regexp/no-empty-group -- required for testing
|
|
var re = /(?:)/;
|
|
var originalExec = re.exec;
|
|
re.exec = function () { return originalExec.apply(this, arguments); };
|
|
var result = 'ab'.split(re);
|
|
return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
|
|
});
|
|
|
|
// @@split logic
|
|
fixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {
|
|
var internalSplit;
|
|
if (
|
|
'abbc'.split(/(b)*/)[1] == 'c' ||
|
|
// eslint-disable-next-line regexp/no-empty-group -- required for testing
|
|
'test'.split(/(?:)/, -1).length != 4 ||
|
|
'ab'.split(/(?:ab)*/).length != 2 ||
|
|
'.'.split(/(.?)(.?)/).length != 4 ||
|
|
// eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
|
|
'.'.split(/()()/).length > 1 ||
|
|
''.split(/.?/).length
|
|
) {
|
|
// based on es5-shim implementation, need to rework it
|
|
internalSplit = function (separator, limit) {
|
|
var string = toString(requireObjectCoercible(this));
|
|
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
|
if (lim === 0) return [];
|
|
if (separator === undefined) return [string];
|
|
// If `separator` is not a regex, use native split
|
|
if (!isRegExp(separator)) {
|
|
return call(nativeSplit, string, separator, lim);
|
|
}
|
|
var output = [];
|
|
var flags = (separator.ignoreCase ? 'i' : '') +
|
|
(separator.multiline ? 'm' : '') +
|
|
(separator.unicode ? 'u' : '') +
|
|
(separator.sticky ? 'y' : '');
|
|
var lastLastIndex = 0;
|
|
// Make `global` and avoid `lastIndex` issues by working with a copy
|
|
var separatorCopy = new RegExp(separator.source, flags + 'g');
|
|
var match, lastIndex, lastLength;
|
|
while (match = call(regexpExec, separatorCopy, string)) {
|
|
lastIndex = separatorCopy.lastIndex;
|
|
if (lastIndex > lastLastIndex) {
|
|
push(output, stringSlice(string, lastLastIndex, match.index));
|
|
if (match.length > 1 && match.index < string.length) apply($push, output, arraySlice(match, 1));
|
|
lastLength = match[0].length;
|
|
lastLastIndex = lastIndex;
|
|
if (output.length >= lim) break;
|
|
}
|
|
if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
|
|
}
|
|
if (lastLastIndex === string.length) {
|
|
if (lastLength || !exec(separatorCopy, '')) push(output, '');
|
|
} else push(output, stringSlice(string, lastLastIndex));
|
|
return output.length > lim ? arraySlice(output, 0, lim) : output;
|
|
};
|
|
// Chakra, V8
|
|
} else if ('0'.split(undefined, 0).length) {
|
|
internalSplit = function (separator, limit) {
|
|
return separator === undefined && limit === 0 ? [] : call(nativeSplit, this, separator, limit);
|
|
};
|
|
} else internalSplit = nativeSplit;
|
|
|
|
return [
|
|
// `String.prototype.split` method
|
|
// https://tc39.es/ecma262/#sec-string.prototype.split
|
|
function split(separator, limit) {
|
|
var O = requireObjectCoercible(this);
|
|
var splitter = separator == undefined ? undefined : getMethod(separator, SPLIT);
|
|
return splitter
|
|
? call(splitter, separator, O, limit)
|
|
: call(internalSplit, toString(O), separator, limit);
|
|
},
|
|
// `RegExp.prototype[@@split]` method
|
|
// https://tc39.es/ecma262/#sec-regexp.prototype-@@split
|
|
//
|
|
// NOTE: This cannot be properly polyfilled in engines that don't support
|
|
// the 'y' flag.
|
|
function (string, limit) {
|
|
var rx = anObject(this);
|
|
var S = toString(string);
|
|
var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);
|
|
|
|
if (res.done) return res.value;
|
|
|
|
var C = speciesConstructor(rx, RegExp);
|
|
|
|
var unicodeMatching = rx.unicode;
|
|
var flags = (rx.ignoreCase ? 'i' : '') +
|
|
(rx.multiline ? 'm' : '') +
|
|
(rx.unicode ? 'u' : '') +
|
|
(UNSUPPORTED_Y ? 'g' : 'y');
|
|
|
|
// ^(? + rx + ) is needed, in combination with some S slicing, to
|
|
// simulate the 'y' flag.
|
|
var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);
|
|
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
|
if (lim === 0) return [];
|
|
if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
|
|
var p = 0;
|
|
var q = 0;
|
|
var A = [];
|
|
while (q < S.length) {
|
|
splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
|
|
var z = callRegExpExec(splitter, UNSUPPORTED_Y ? stringSlice(S, q) : S);
|
|
var e;
|
|
if (
|
|
z === null ||
|
|
(e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p
|
|
) {
|
|
q = advanceStringIndex(S, q, unicodeMatching);
|
|
} else {
|
|
push(A, stringSlice(S, p, q));
|
|
if (A.length === lim) return A;
|
|
for (var i = 1; i <= z.length - 1; i++) {
|
|
push(A, z[i]);
|
|
if (A.length === lim) return A;
|
|
}
|
|
q = p = e;
|
|
}
|
|
}
|
|
push(A, stringSlice(S, p));
|
|
return A;
|
|
}
|
|
];
|
|
}, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);
|
|
|
|
const isObject = value => !!(value && typeof value === 'object' && !Array.isArray(value)); // eslint-disable-next-line
|
|
|
|
|
|
const getVariable = (object, keyString) => {
|
|
if (isObject(object)) {
|
|
// Get keys in given object
|
|
const entries = Object.entries(object); // Loop through keys for the desired key
|
|
|
|
for (let i = 0; i < entries.length; i++) {
|
|
// Break apart keys and values
|
|
const [key, value] = entries[i]; // If key is found, return value
|
|
|
|
if (keyString === key) {
|
|
return value;
|
|
} // If another object exists, search that object
|
|
|
|
|
|
if (isObject(value)) {
|
|
const child = getVariable(value, keyString); // If child is found, return child
|
|
|
|
if (child !== null) {
|
|
return child;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
return null;
|
|
};
|
|
|
|
const getThemeValue = (theme, str) => {
|
|
if (!str) return; // Split keys separated with '.'
|
|
|
|
const keys = str.split('.');
|
|
let objectToSearch = theme; // Loop over keys
|
|
|
|
for (let i = 0; i < keys.length; i++) {
|
|
// Get the value for the given key
|
|
const found = getVariable(objectToSearch, keys[i]); // If value isn't an object, return it
|
|
|
|
if (!isObject(found)) return found; // If value is an object and has a `main` key, return
|
|
|
|
if (i === keys.length - 1 && 'main' in found) return found.main; // If value is an object, update object to search
|
|
|
|
objectToSearch = found;
|
|
}
|
|
};
|
|
|
|
export { createDarkTheme, createLightTheme, getThemeValue };
|