@vonage/vivid 3.0.0-next.109 → 3.0.0-next.110
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/README.md +24 -0
- package/accordion/index.js +3 -3
- package/accordion-item/index.js +12 -12
- package/action-group/index.js +3 -7
- package/avatar/index.js +10 -10
- package/badge/index.js +9 -9
- package/banner/index.js +9 -19
- package/breadcrumb/index.js +2 -2
- package/breadcrumb-item/index.js +13 -14
- package/button/index.js +92 -16
- package/calendar/index.js +3 -7
- package/calendar-event/index.js +3 -6
- package/card/index.js +9 -11
- package/checkbox/index.js +11 -12
- package/custom-elements.json +49 -49
- package/dialog/index.js +9 -25
- package/divider/index.js +26 -3
- package/elevation/index.js +25 -3
- package/fab/index.js +12 -14
- package/focus/index.js +4 -4
- package/header/index.js +10 -8
- package/icon/index.js +3 -5
- package/index.js +24 -22
- package/layout/index.js +2 -2
- package/lib/accordion-item/index.d.ts +0 -2
- package/lib/avatar/index.d.ts +0 -1
- package/lib/badge/index.d.ts +0 -1
- package/lib/banner/index.d.ts +0 -1
- package/lib/breadcrumb-item/index.d.ts +0 -2
- package/lib/button/index.d.ts +1 -4
- package/lib/card/index.d.ts +0 -2
- package/lib/checkbox/index.d.ts +0 -2
- package/lib/components.d.ts +1 -1
- package/lib/dialog/index.d.ts +0 -3
- package/lib/fab/index.d.ts +0 -2
- package/lib/header/index.d.ts +0 -1
- package/lib/listbox/index.d.ts +1 -4
- package/lib/menu/index.d.ts +0 -2
- package/lib/menu-item/index.d.ts +0 -1
- package/lib/nav-disclosure/index.d.ts +0 -2
- package/lib/nav-item/index.d.ts +0 -2
- package/lib/note/note.template.d.ts +0 -1
- package/lib/number-field/index.d.ts +0 -2
- package/lib/{listbox-option → option}/index.d.ts +0 -2
- package/lib/{listbox-option/listbox-option.d.ts → option/option.d.ts} +0 -0
- package/lib/{listbox-option/listbox-option.template.d.ts → option/option.template.d.ts} +1 -1
- package/lib/popup/index.d.ts +0 -2
- package/lib/radio/index.d.ts +0 -1
- package/lib/slider/index.d.ts +0 -1
- package/lib/switch/index.d.ts +0 -2
- package/lib/text-area/index.d.ts +0 -2
- package/lib/text-field/index.d.ts +0 -2
- package/lib/text-field/text-field.template.d.ts +0 -1
- package/lib/tooltip/index.d.ts +0 -1
- package/listbox/index.js +14 -18
- package/menu/index.js +12 -26
- package/menu-item/index.js +82 -13
- package/nav/index.js +2 -2
- package/nav-disclosure/index.js +11 -13
- package/nav-item/index.js +11 -13
- package/note/index.js +10 -10
- package/number-field/index.js +14 -15
- package/option/index.js +75 -0
- package/package.json +3 -2
- package/popup/index.js +57 -20
- package/progress/index.js +3 -7
- package/progress-ring/index.js +3 -3
- package/radio/index.js +11 -6
- package/radio-group/index.js +3 -3
- package/shared/affix.js +0 -1
- package/shared/anchor.js +1 -1
- package/shared/apply-mixins.js +1 -1
- package/shared/base-progress.js +1 -1
- package/shared/breadcrumb-item.js +1 -1
- package/shared/button.js +18 -195
- package/shared/button2.js +200 -0
- package/shared/calendar-event.js +1 -1
- package/shared/design-system/index.d.ts +1 -1
- package/shared/{index4.js → divider.js} +2 -24
- package/shared/elevation.js +10 -0
- package/shared/es.object.assign.js +1 -59
- package/shared/es.promise.resolve.js +944 -0
- package/shared/es.regexp.to-string.js +1 -2
- package/shared/focus.js +9 -3
- package/shared/focus2.js +3 -9
- package/shared/form-associated.js +1 -1
- package/shared/form-elements.js +2 -3
- package/shared/icon.js +9 -1098
- package/shared/index.js +3673 -5
- package/shared/index2.js +6 -104
- package/shared/{index5.js → listbox-option.js} +11 -71
- package/shared/{index7.js → menu-item.js} +13 -85
- package/shared/patterns/form-elements/form-elements.d.ts +2 -2
- package/shared/{index6.js → popup.js} +3 -43
- package/shared/radio.js +1 -1
- package/shared/ref.js +1 -1
- package/shared/slotted.js +1 -1
- package/shared/string-trim.js +1 -2
- package/shared/text-anchor.template.js +1 -1
- package/shared/utils/index.d.ts +1 -0
- package/side-drawer/index.js +3 -7
- package/slider/index.js +10 -10
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/switch/index.js +11 -11
- package/text-anchor/index.js +4 -8
- package/text-area/index.js +11 -12
- package/text-field/index.js +11 -12
- package/tooltip/index.js +11 -27
- package/vivid.api.json +11 -189
- package/listbox-option/index.js +0 -22
- package/shared/export.js +0 -1017
- package/shared/index3.js +0 -31
- package/shared/iterators.js +0 -61
- package/shared/object-keys.js +0 -13
- package/shared/to-string.js +0 -51
- package/shared/web.dom-collections.iterator.js +0 -472
package/shared/index3.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, h as html, d as designSystem } from './index.js';
|
|
2
|
-
import { c as classNames } from './class-names.js';
|
|
3
|
-
|
|
4
|
-
class Elevation extends FoundationElement {}
|
|
5
|
-
__decorate([attr, __metadata("design:type", Number)], Elevation.prototype, "dp", void 0);
|
|
6
|
-
__decorate([attr({
|
|
7
|
-
attribute: 'no-shadow',
|
|
8
|
-
mode: 'boolean'
|
|
9
|
-
}), __metadata("design:type", Boolean)], Elevation.prototype, "noShadow", void 0);
|
|
10
|
-
|
|
11
|
-
var css_248z = ":host {\n display: contents;\n}\n\n.control {\n display: contents;\n}\n.control.dp-0 {\n --_elevation-fill: var(--vvd-color-surface-0dp);\n --_elevation-shadow: var(--vvd-shadow-surface-0dp);\n}\n.control.dp-4 {\n --_elevation-fill: var(--vvd-color-surface-4dp);\n --_elevation-shadow: var(--vvd-shadow-surface-4dp);\n}\n.control.dp-8 {\n --_elevation-fill: var(--vvd-color-surface-8dp);\n --_elevation-shadow: var(--vvd-shadow-surface-8dp);\n}\n.control.dp-12 {\n --_elevation-fill: var(--vvd-color-surface-12dp);\n --_elevation-shadow: var(--vvd-shadow-surface-12dp);\n}\n.control.dp-16 {\n --_elevation-fill: var(--vvd-color-surface-16dp);\n --_elevation-shadow: var(--vvd-shadow-surface-16dp);\n}\n.control.dp-24 {\n --_elevation-fill: var(--vvd-color-surface-24dp);\n --_elevation-shadow: var(--vvd-shadow-surface-24dp);\n}\n.control:not(.dp-0, .dp-4, .dp-8, .dp-12, .dp-16, .dp-24) {\n --_elevation-fill: var(--vvd-color-surface-2dp);\n --_elevation-shadow: var(--vvd-shadow-surface-2dp);\n}\n.control ::slotted(*) {\n background: var(--_elevation-fill);\n filter: var(--_elevation-shadow);\n transition: background-color 0.15s linear, filter 0.15s linear;\n}\n.control.no-shadow ::slotted(*) {\n filter: none;\n}";
|
|
12
|
-
|
|
13
|
-
let _ = t => t,
|
|
14
|
-
_t;
|
|
15
|
-
const getClasses = ({
|
|
16
|
-
dp,
|
|
17
|
-
noShadow
|
|
18
|
-
}) => classNames('control', [`dp-${dp}`, Boolean(dp)], ['no-shadow', Boolean(noShadow)]);
|
|
19
|
-
const elevationTemplate = () => html(_t || (_t = _`
|
|
20
|
-
<div class="${0}" part="base">
|
|
21
|
-
<slot></slot>
|
|
22
|
-
</div>`), getClasses);
|
|
23
|
-
|
|
24
|
-
const vividElevation = Elevation.compose({
|
|
25
|
-
baseName: 'elevation',
|
|
26
|
-
template: elevationTemplate,
|
|
27
|
-
styles: css_248z
|
|
28
|
-
});
|
|
29
|
-
designSystem.register(vividElevation());
|
|
30
|
-
|
|
31
|
-
export { Elevation as E, vividElevation as v };
|
package/shared/iterators.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { i as isCallable$1, f as functionUncurryThis, j as anObject$1, w as wellKnownSymbol$1, o as objectDefineProperty, q as hasOwnProperty_1, a as getBuiltIn$1 } from './export.js';
|
|
2
|
-
|
|
3
|
-
var isCallable = isCallable$1;
|
|
4
|
-
|
|
5
|
-
var $String = String;
|
|
6
|
-
var $TypeError = TypeError;
|
|
7
|
-
|
|
8
|
-
var aPossiblePrototype$1 = function (argument) {
|
|
9
|
-
if (typeof argument == 'object' || isCallable(argument)) return argument;
|
|
10
|
-
throw $TypeError("Can't set " + $String(argument) + ' as a prototype');
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
/* eslint-disable no-proto -- safe */
|
|
14
|
-
|
|
15
|
-
var uncurryThis = functionUncurryThis;
|
|
16
|
-
var anObject = anObject$1;
|
|
17
|
-
var aPossiblePrototype = aPossiblePrototype$1;
|
|
18
|
-
|
|
19
|
-
// `Object.setPrototypeOf` method
|
|
20
|
-
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
21
|
-
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
22
|
-
// eslint-disable-next-line es/no-object-setprototypeof -- safe
|
|
23
|
-
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
24
|
-
var CORRECT_SETTER = false;
|
|
25
|
-
var test = {};
|
|
26
|
-
var setter;
|
|
27
|
-
try {
|
|
28
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
29
|
-
setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
30
|
-
setter(test, []);
|
|
31
|
-
CORRECT_SETTER = test instanceof Array;
|
|
32
|
-
} catch (error) { /* empty */ }
|
|
33
|
-
return function setPrototypeOf(O, proto) {
|
|
34
|
-
anObject(O);
|
|
35
|
-
aPossiblePrototype(proto);
|
|
36
|
-
if (CORRECT_SETTER) setter(O, proto);
|
|
37
|
-
else O.__proto__ = proto;
|
|
38
|
-
return O;
|
|
39
|
-
};
|
|
40
|
-
}() : undefined);
|
|
41
|
-
|
|
42
|
-
var defineProperty = objectDefineProperty.f;
|
|
43
|
-
var hasOwn = hasOwnProperty_1;
|
|
44
|
-
var wellKnownSymbol = wellKnownSymbol$1;
|
|
45
|
-
|
|
46
|
-
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
47
|
-
|
|
48
|
-
var setToStringTag = function (target, TAG, STATIC) {
|
|
49
|
-
if (target && !STATIC) target = target.prototype;
|
|
50
|
-
if (target && !hasOwn(target, TO_STRING_TAG)) {
|
|
51
|
-
defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
var getBuiltIn = getBuiltIn$1;
|
|
56
|
-
|
|
57
|
-
var html = getBuiltIn('document', 'documentElement');
|
|
58
|
-
|
|
59
|
-
var iterators = {};
|
|
60
|
-
|
|
61
|
-
export { html as h, iterators as i, objectSetPrototypeOf as o, setToStringTag as s };
|
package/shared/object-keys.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { M as objectKeysInternal, G as enumBugKeys$1 } from './export.js';
|
|
2
|
-
|
|
3
|
-
var internalObjectKeys = objectKeysInternal;
|
|
4
|
-
var enumBugKeys = enumBugKeys$1;
|
|
5
|
-
|
|
6
|
-
// `Object.keys` method
|
|
7
|
-
// https://tc39.es/ecma262/#sec-object.keys
|
|
8
|
-
// eslint-disable-next-line es/no-object-keys -- safe
|
|
9
|
-
var objectKeys = Object.keys || function keys(O) {
|
|
10
|
-
return internalObjectKeys(O, enumBugKeys);
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export { objectKeys as o };
|
package/shared/to-string.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { w as wellKnownSymbol$2, c as classofRaw$1, i as isCallable$1 } from './export.js';
|
|
2
|
-
|
|
3
|
-
var wellKnownSymbol$1 = wellKnownSymbol$2;
|
|
4
|
-
|
|
5
|
-
var TO_STRING_TAG$1 = wellKnownSymbol$1('toStringTag');
|
|
6
|
-
var test = {};
|
|
7
|
-
|
|
8
|
-
test[TO_STRING_TAG$1] = 'z';
|
|
9
|
-
|
|
10
|
-
var toStringTagSupport = String(test) === '[object z]';
|
|
11
|
-
|
|
12
|
-
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
13
|
-
var isCallable = isCallable$1;
|
|
14
|
-
var classofRaw = classofRaw$1;
|
|
15
|
-
var wellKnownSymbol = wellKnownSymbol$2;
|
|
16
|
-
|
|
17
|
-
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
18
|
-
var $Object = Object;
|
|
19
|
-
|
|
20
|
-
// ES3 wrong here
|
|
21
|
-
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
22
|
-
|
|
23
|
-
// fallback for IE11 Script Access Denied error
|
|
24
|
-
var tryGet = function (it, key) {
|
|
25
|
-
try {
|
|
26
|
-
return it[key];
|
|
27
|
-
} catch (error) { /* empty */ }
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
// getting tag from ES6+ `Object.prototype.toString`
|
|
31
|
-
var classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
32
|
-
var O, tag, result;
|
|
33
|
-
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
34
|
-
// @@toStringTag case
|
|
35
|
-
: typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
|
|
36
|
-
// builtinTag case
|
|
37
|
-
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
38
|
-
// ES3 arguments fallback
|
|
39
|
-
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
var classof = classof$1;
|
|
43
|
-
|
|
44
|
-
var $String = String;
|
|
45
|
-
|
|
46
|
-
var toString = function (argument) {
|
|
47
|
-
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
48
|
-
return $String(argument);
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export { classof$1 as c, toString as t };
|
|
@@ -1,472 +0,0 @@
|
|
|
1
|
-
import { d as descriptors, D as v8PrototypeDefineBug, o as objectDefineProperty, j as anObject$2, E as toIndexedObject$2, F as sharedKey$2, G as enumBugKeys$1, H as hiddenKeys$1, p as documentCreateElement$2, w as wellKnownSymbol$4, e as fails$2, q as hasOwnProperty_1, i as isCallable$3, I as toObject$1, z as isObject$1, v as defineBuiltIn$2, J as createPropertyDescriptor$1, _ as _export, K as createNonEnumerableProperty$2, x as functionCall, C as functionName, y as internalState, g as global$1 } from './export.js';
|
|
2
|
-
import { o as objectKeys$1 } from './object-keys.js';
|
|
3
|
-
import { h as html$1, s as setToStringTag$2, i as iterators, o as objectSetPrototypeOf } from './iterators.js';
|
|
4
|
-
|
|
5
|
-
var objectDefineProperties = {};
|
|
6
|
-
|
|
7
|
-
var DESCRIPTORS$1 = descriptors;
|
|
8
|
-
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
9
|
-
var definePropertyModule = objectDefineProperty;
|
|
10
|
-
var anObject$1 = anObject$2;
|
|
11
|
-
var toIndexedObject$1 = toIndexedObject$2;
|
|
12
|
-
var objectKeys = objectKeys$1;
|
|
13
|
-
|
|
14
|
-
// `Object.defineProperties` method
|
|
15
|
-
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
16
|
-
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
17
|
-
objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
18
|
-
anObject$1(O);
|
|
19
|
-
var props = toIndexedObject$1(Properties);
|
|
20
|
-
var keys = objectKeys(Properties);
|
|
21
|
-
var length = keys.length;
|
|
22
|
-
var index = 0;
|
|
23
|
-
var key;
|
|
24
|
-
while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
|
|
25
|
-
return O;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
/* global ActiveXObject -- old IE, WSH */
|
|
29
|
-
|
|
30
|
-
var anObject = anObject$2;
|
|
31
|
-
var definePropertiesModule = objectDefineProperties;
|
|
32
|
-
var enumBugKeys = enumBugKeys$1;
|
|
33
|
-
var hiddenKeys = hiddenKeys$1;
|
|
34
|
-
var html = html$1;
|
|
35
|
-
var documentCreateElement$1 = documentCreateElement$2;
|
|
36
|
-
var sharedKey$1 = sharedKey$2;
|
|
37
|
-
|
|
38
|
-
var GT = '>';
|
|
39
|
-
var LT = '<';
|
|
40
|
-
var PROTOTYPE = 'prototype';
|
|
41
|
-
var SCRIPT = 'script';
|
|
42
|
-
var IE_PROTO$1 = sharedKey$1('IE_PROTO');
|
|
43
|
-
|
|
44
|
-
var EmptyConstructor = function () { /* empty */ };
|
|
45
|
-
|
|
46
|
-
var scriptTag = function (content) {
|
|
47
|
-
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
51
|
-
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
52
|
-
activeXDocument.write(scriptTag(''));
|
|
53
|
-
activeXDocument.close();
|
|
54
|
-
var temp = activeXDocument.parentWindow.Object;
|
|
55
|
-
activeXDocument = null; // avoid memory leak
|
|
56
|
-
return temp;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
60
|
-
var NullProtoObjectViaIFrame = function () {
|
|
61
|
-
// Thrash, waste and sodomy: IE GC bug
|
|
62
|
-
var iframe = documentCreateElement$1('iframe');
|
|
63
|
-
var JS = 'java' + SCRIPT + ':';
|
|
64
|
-
var iframeDocument;
|
|
65
|
-
iframe.style.display = 'none';
|
|
66
|
-
html.appendChild(iframe);
|
|
67
|
-
// https://github.com/zloirock/core-js/issues/475
|
|
68
|
-
iframe.src = String(JS);
|
|
69
|
-
iframeDocument = iframe.contentWindow.document;
|
|
70
|
-
iframeDocument.open();
|
|
71
|
-
iframeDocument.write(scriptTag('document.F=Object'));
|
|
72
|
-
iframeDocument.close();
|
|
73
|
-
return iframeDocument.F;
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
// Check for document.domain and active x support
|
|
77
|
-
// No need to use active x approach when document.domain is not set
|
|
78
|
-
// see https://github.com/es-shims/es5-shim/issues/150
|
|
79
|
-
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
80
|
-
// avoid IE GC bug
|
|
81
|
-
var activeXDocument;
|
|
82
|
-
var NullProtoObject = function () {
|
|
83
|
-
try {
|
|
84
|
-
activeXDocument = new ActiveXObject('htmlfile');
|
|
85
|
-
} catch (error) { /* ignore */ }
|
|
86
|
-
NullProtoObject = typeof document != 'undefined'
|
|
87
|
-
? document.domain && activeXDocument
|
|
88
|
-
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
89
|
-
: NullProtoObjectViaIFrame()
|
|
90
|
-
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
91
|
-
var length = enumBugKeys.length;
|
|
92
|
-
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
93
|
-
return NullProtoObject();
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
hiddenKeys[IE_PROTO$1] = true;
|
|
97
|
-
|
|
98
|
-
// `Object.create` method
|
|
99
|
-
// https://tc39.es/ecma262/#sec-object.create
|
|
100
|
-
// eslint-disable-next-line es/no-object-create -- safe
|
|
101
|
-
var objectCreate = Object.create || function create(O, Properties) {
|
|
102
|
-
var result;
|
|
103
|
-
if (O !== null) {
|
|
104
|
-
EmptyConstructor[PROTOTYPE] = anObject(O);
|
|
105
|
-
result = new EmptyConstructor();
|
|
106
|
-
EmptyConstructor[PROTOTYPE] = null;
|
|
107
|
-
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
108
|
-
result[IE_PROTO$1] = O;
|
|
109
|
-
} else result = NullProtoObject();
|
|
110
|
-
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
var wellKnownSymbol$3 = wellKnownSymbol$4;
|
|
114
|
-
var create$1 = objectCreate;
|
|
115
|
-
var defineProperty$1 = objectDefineProperty.f;
|
|
116
|
-
|
|
117
|
-
var UNSCOPABLES = wellKnownSymbol$3('unscopables');
|
|
118
|
-
var ArrayPrototype = Array.prototype;
|
|
119
|
-
|
|
120
|
-
// Array.prototype[@@unscopables]
|
|
121
|
-
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
122
|
-
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
123
|
-
defineProperty$1(ArrayPrototype, UNSCOPABLES, {
|
|
124
|
-
configurable: true,
|
|
125
|
-
value: create$1(null)
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// add a key to Array.prototype[@@unscopables]
|
|
130
|
-
var addToUnscopables$1 = function (key) {
|
|
131
|
-
ArrayPrototype[UNSCOPABLES][key] = true;
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
var fails$1 = fails$2;
|
|
135
|
-
|
|
136
|
-
var correctPrototypeGetter = !fails$1(function () {
|
|
137
|
-
function F() { /* empty */ }
|
|
138
|
-
F.prototype.constructor = null;
|
|
139
|
-
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
140
|
-
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
var hasOwn = hasOwnProperty_1;
|
|
144
|
-
var isCallable$2 = isCallable$3;
|
|
145
|
-
var toObject = toObject$1;
|
|
146
|
-
var sharedKey = sharedKey$2;
|
|
147
|
-
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
148
|
-
|
|
149
|
-
var IE_PROTO = sharedKey('IE_PROTO');
|
|
150
|
-
var $Object = Object;
|
|
151
|
-
var ObjectPrototype = $Object.prototype;
|
|
152
|
-
|
|
153
|
-
// `Object.getPrototypeOf` method
|
|
154
|
-
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
155
|
-
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
156
|
-
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
|
|
157
|
-
var object = toObject(O);
|
|
158
|
-
if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];
|
|
159
|
-
var constructor = object.constructor;
|
|
160
|
-
if (isCallable$2(constructor) && object instanceof constructor) {
|
|
161
|
-
return constructor.prototype;
|
|
162
|
-
} return object instanceof $Object ? ObjectPrototype : null;
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
var fails = fails$2;
|
|
166
|
-
var isCallable$1 = isCallable$3;
|
|
167
|
-
var isObject = isObject$1;
|
|
168
|
-
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
169
|
-
var defineBuiltIn$1 = defineBuiltIn$2;
|
|
170
|
-
var wellKnownSymbol$2 = wellKnownSymbol$4;
|
|
171
|
-
|
|
172
|
-
var ITERATOR$2 = wellKnownSymbol$2('iterator');
|
|
173
|
-
var BUGGY_SAFARI_ITERATORS$1 = false;
|
|
174
|
-
|
|
175
|
-
// `%IteratorPrototype%` object
|
|
176
|
-
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
|
|
177
|
-
var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
|
178
|
-
|
|
179
|
-
/* eslint-disable es/no-array-prototype-keys -- safe */
|
|
180
|
-
if ([].keys) {
|
|
181
|
-
arrayIterator = [].keys();
|
|
182
|
-
// Safari 8 has buggy iterators w/o `next`
|
|
183
|
-
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
|
|
184
|
-
else {
|
|
185
|
-
PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
|
|
186
|
-
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype$2) || fails(function () {
|
|
191
|
-
var test = {};
|
|
192
|
-
// FF44- legacy iterators case
|
|
193
|
-
return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
|
|
194
|
-
});
|
|
195
|
-
|
|
196
|
-
if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
|
|
197
|
-
|
|
198
|
-
// `%IteratorPrototype%[@@iterator]()` method
|
|
199
|
-
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
|
|
200
|
-
if (!isCallable$1(IteratorPrototype$2[ITERATOR$2])) {
|
|
201
|
-
defineBuiltIn$1(IteratorPrototype$2, ITERATOR$2, function () {
|
|
202
|
-
return this;
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
var iteratorsCore = {
|
|
207
|
-
IteratorPrototype: IteratorPrototype$2,
|
|
208
|
-
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
|
|
212
|
-
var create = objectCreate;
|
|
213
|
-
var createPropertyDescriptor = createPropertyDescriptor$1;
|
|
214
|
-
var setToStringTag$1 = setToStringTag$2;
|
|
215
|
-
var Iterators$2 = iterators;
|
|
216
|
-
|
|
217
|
-
var returnThis$1 = function () { return this; };
|
|
218
|
-
|
|
219
|
-
var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
|
|
220
|
-
var TO_STRING_TAG = NAME + ' Iterator';
|
|
221
|
-
IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
|
|
222
|
-
setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false);
|
|
223
|
-
Iterators$2[TO_STRING_TAG] = returnThis$1;
|
|
224
|
-
return IteratorConstructor;
|
|
225
|
-
};
|
|
226
|
-
|
|
227
|
-
var $ = _export;
|
|
228
|
-
var call = functionCall;
|
|
229
|
-
var FunctionName = functionName;
|
|
230
|
-
var isCallable = isCallable$3;
|
|
231
|
-
var createIteratorConstructor = iteratorCreateConstructor;
|
|
232
|
-
var getPrototypeOf = objectGetPrototypeOf;
|
|
233
|
-
var setPrototypeOf = objectSetPrototypeOf;
|
|
234
|
-
var setToStringTag = setToStringTag$2;
|
|
235
|
-
var createNonEnumerableProperty$1 = createNonEnumerableProperty$2;
|
|
236
|
-
var defineBuiltIn = defineBuiltIn$2;
|
|
237
|
-
var wellKnownSymbol$1 = wellKnownSymbol$4;
|
|
238
|
-
var Iterators$1 = iterators;
|
|
239
|
-
var IteratorsCore = iteratorsCore;
|
|
240
|
-
|
|
241
|
-
var PROPER_FUNCTION_NAME = FunctionName.PROPER;
|
|
242
|
-
var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
|
|
243
|
-
var IteratorPrototype = IteratorsCore.IteratorPrototype;
|
|
244
|
-
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
|
|
245
|
-
var ITERATOR$1 = wellKnownSymbol$1('iterator');
|
|
246
|
-
var KEYS = 'keys';
|
|
247
|
-
var VALUES = 'values';
|
|
248
|
-
var ENTRIES = 'entries';
|
|
249
|
-
|
|
250
|
-
var returnThis = function () { return this; };
|
|
251
|
-
|
|
252
|
-
var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
|
|
253
|
-
createIteratorConstructor(IteratorConstructor, NAME, next);
|
|
254
|
-
|
|
255
|
-
var getIterationMethod = function (KIND) {
|
|
256
|
-
if (KIND === DEFAULT && defaultIterator) return defaultIterator;
|
|
257
|
-
if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
|
|
258
|
-
switch (KIND) {
|
|
259
|
-
case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
|
|
260
|
-
case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
|
|
261
|
-
case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
|
|
262
|
-
} return function () { return new IteratorConstructor(this); };
|
|
263
|
-
};
|
|
264
|
-
|
|
265
|
-
var TO_STRING_TAG = NAME + ' Iterator';
|
|
266
|
-
var INCORRECT_VALUES_NAME = false;
|
|
267
|
-
var IterablePrototype = Iterable.prototype;
|
|
268
|
-
var nativeIterator = IterablePrototype[ITERATOR$1]
|
|
269
|
-
|| IterablePrototype['@@iterator']
|
|
270
|
-
|| DEFAULT && IterablePrototype[DEFAULT];
|
|
271
|
-
var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
|
|
272
|
-
var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
|
|
273
|
-
var CurrentIteratorPrototype, methods, KEY;
|
|
274
|
-
|
|
275
|
-
// fix native
|
|
276
|
-
if (anyNativeIterator) {
|
|
277
|
-
CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
|
|
278
|
-
if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
|
|
279
|
-
if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
|
|
280
|
-
if (setPrototypeOf) {
|
|
281
|
-
setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
|
|
282
|
-
} else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) {
|
|
283
|
-
defineBuiltIn(CurrentIteratorPrototype, ITERATOR$1, returnThis);
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
// Set @@toStringTag to native iterators
|
|
287
|
-
setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
// fix Array.prototype.{ values, @@iterator }.name in V8 / FF
|
|
292
|
-
if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
|
293
|
-
if (CONFIGURABLE_FUNCTION_NAME) {
|
|
294
|
-
createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
|
|
295
|
-
} else {
|
|
296
|
-
INCORRECT_VALUES_NAME = true;
|
|
297
|
-
defaultIterator = function values() { return call(nativeIterator, this); };
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
// export additional methods
|
|
302
|
-
if (DEFAULT) {
|
|
303
|
-
methods = {
|
|
304
|
-
values: getIterationMethod(VALUES),
|
|
305
|
-
keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
|
|
306
|
-
entries: getIterationMethod(ENTRIES)
|
|
307
|
-
};
|
|
308
|
-
if (FORCED) for (KEY in methods) {
|
|
309
|
-
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
310
|
-
defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
|
|
311
|
-
}
|
|
312
|
-
} else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
// define iterator
|
|
316
|
-
if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
|
|
317
|
-
defineBuiltIn(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
|
|
318
|
-
}
|
|
319
|
-
Iterators$1[NAME] = defaultIterator;
|
|
320
|
-
|
|
321
|
-
return methods;
|
|
322
|
-
};
|
|
323
|
-
|
|
324
|
-
// `CreateIterResultObject` abstract operation
|
|
325
|
-
// https://tc39.es/ecma262/#sec-createiterresultobject
|
|
326
|
-
var createIterResultObject$1 = function (value, done) {
|
|
327
|
-
return { value: value, done: done };
|
|
328
|
-
};
|
|
329
|
-
|
|
330
|
-
var toIndexedObject = toIndexedObject$2;
|
|
331
|
-
var addToUnscopables = addToUnscopables$1;
|
|
332
|
-
var Iterators = iterators;
|
|
333
|
-
var InternalStateModule = internalState;
|
|
334
|
-
var defineProperty = objectDefineProperty.f;
|
|
335
|
-
var defineIterator = iteratorDefine;
|
|
336
|
-
var createIterResultObject = createIterResultObject$1;
|
|
337
|
-
var DESCRIPTORS = descriptors;
|
|
338
|
-
|
|
339
|
-
var ARRAY_ITERATOR = 'Array Iterator';
|
|
340
|
-
var setInternalState = InternalStateModule.set;
|
|
341
|
-
var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
|
|
342
|
-
|
|
343
|
-
// `Array.prototype.entries` method
|
|
344
|
-
// https://tc39.es/ecma262/#sec-array.prototype.entries
|
|
345
|
-
// `Array.prototype.keys` method
|
|
346
|
-
// https://tc39.es/ecma262/#sec-array.prototype.keys
|
|
347
|
-
// `Array.prototype.values` method
|
|
348
|
-
// https://tc39.es/ecma262/#sec-array.prototype.values
|
|
349
|
-
// `Array.prototype[@@iterator]` method
|
|
350
|
-
// https://tc39.es/ecma262/#sec-array.prototype-@@iterator
|
|
351
|
-
// `CreateArrayIterator` internal method
|
|
352
|
-
// https://tc39.es/ecma262/#sec-createarrayiterator
|
|
353
|
-
var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
|
|
354
|
-
setInternalState(this, {
|
|
355
|
-
type: ARRAY_ITERATOR,
|
|
356
|
-
target: toIndexedObject(iterated), // target
|
|
357
|
-
index: 0, // next index
|
|
358
|
-
kind: kind // kind
|
|
359
|
-
});
|
|
360
|
-
// `%ArrayIteratorPrototype%.next` method
|
|
361
|
-
// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
|
|
362
|
-
}, function () {
|
|
363
|
-
var state = getInternalState(this);
|
|
364
|
-
var target = state.target;
|
|
365
|
-
var kind = state.kind;
|
|
366
|
-
var index = state.index++;
|
|
367
|
-
if (!target || index >= target.length) {
|
|
368
|
-
state.target = undefined;
|
|
369
|
-
return createIterResultObject(undefined, true);
|
|
370
|
-
}
|
|
371
|
-
if (kind == 'keys') return createIterResultObject(index, false);
|
|
372
|
-
if (kind == 'values') return createIterResultObject(target[index], false);
|
|
373
|
-
return createIterResultObject([index, target[index]], false);
|
|
374
|
-
}, 'values');
|
|
375
|
-
|
|
376
|
-
// argumentsList[@@iterator] is %ArrayProto_values%
|
|
377
|
-
// https://tc39.es/ecma262/#sec-createunmappedargumentsobject
|
|
378
|
-
// https://tc39.es/ecma262/#sec-createmappedargumentsobject
|
|
379
|
-
var values = Iterators.Arguments = Iterators.Array;
|
|
380
|
-
|
|
381
|
-
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
382
|
-
addToUnscopables('keys');
|
|
383
|
-
addToUnscopables('values');
|
|
384
|
-
addToUnscopables('entries');
|
|
385
|
-
|
|
386
|
-
// V8 ~ Chrome 45- bug
|
|
387
|
-
if (DESCRIPTORS && values.name !== 'values') try {
|
|
388
|
-
defineProperty(values, 'name', { value: 'values' });
|
|
389
|
-
} catch (error) { /* empty */ }
|
|
390
|
-
|
|
391
|
-
// iterable DOM collections
|
|
392
|
-
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
|
393
|
-
var domIterables = {
|
|
394
|
-
CSSRuleList: 0,
|
|
395
|
-
CSSStyleDeclaration: 0,
|
|
396
|
-
CSSValueList: 0,
|
|
397
|
-
ClientRectList: 0,
|
|
398
|
-
DOMRectList: 0,
|
|
399
|
-
DOMStringList: 0,
|
|
400
|
-
DOMTokenList: 1,
|
|
401
|
-
DataTransferItemList: 0,
|
|
402
|
-
FileList: 0,
|
|
403
|
-
HTMLAllCollection: 0,
|
|
404
|
-
HTMLCollection: 0,
|
|
405
|
-
HTMLFormElement: 0,
|
|
406
|
-
HTMLSelectElement: 0,
|
|
407
|
-
MediaList: 0,
|
|
408
|
-
MimeTypeArray: 0,
|
|
409
|
-
NamedNodeMap: 0,
|
|
410
|
-
NodeList: 1,
|
|
411
|
-
PaintRequestList: 0,
|
|
412
|
-
Plugin: 0,
|
|
413
|
-
PluginArray: 0,
|
|
414
|
-
SVGLengthList: 0,
|
|
415
|
-
SVGNumberList: 0,
|
|
416
|
-
SVGPathSegList: 0,
|
|
417
|
-
SVGPointList: 0,
|
|
418
|
-
SVGStringList: 0,
|
|
419
|
-
SVGTransformList: 0,
|
|
420
|
-
SourceBufferList: 0,
|
|
421
|
-
StyleSheetList: 0,
|
|
422
|
-
TextTrackCueList: 0,
|
|
423
|
-
TextTrackList: 0,
|
|
424
|
-
TouchList: 0
|
|
425
|
-
};
|
|
426
|
-
|
|
427
|
-
// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
|
|
428
|
-
var documentCreateElement = documentCreateElement$2;
|
|
429
|
-
|
|
430
|
-
var classList = documentCreateElement('span').classList;
|
|
431
|
-
var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
|
|
432
|
-
|
|
433
|
-
var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
|
|
434
|
-
|
|
435
|
-
var global = global$1;
|
|
436
|
-
var DOMIterables = domIterables;
|
|
437
|
-
var DOMTokenListPrototype = domTokenListPrototype;
|
|
438
|
-
var ArrayIteratorMethods = es_array_iterator;
|
|
439
|
-
var createNonEnumerableProperty = createNonEnumerableProperty$2;
|
|
440
|
-
var wellKnownSymbol = wellKnownSymbol$4;
|
|
441
|
-
|
|
442
|
-
var ITERATOR = wellKnownSymbol('iterator');
|
|
443
|
-
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
444
|
-
var ArrayValues = ArrayIteratorMethods.values;
|
|
445
|
-
|
|
446
|
-
var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
|
|
447
|
-
if (CollectionPrototype) {
|
|
448
|
-
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
449
|
-
if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
|
|
450
|
-
createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
|
|
451
|
-
} catch (error) {
|
|
452
|
-
CollectionPrototype[ITERATOR] = ArrayValues;
|
|
453
|
-
}
|
|
454
|
-
if (!CollectionPrototype[TO_STRING_TAG]) {
|
|
455
|
-
createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
|
|
456
|
-
}
|
|
457
|
-
if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
|
|
458
|
-
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
459
|
-
if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
|
|
460
|
-
createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
|
|
461
|
-
} catch (error) {
|
|
462
|
-
CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
};
|
|
467
|
-
|
|
468
|
-
for (var COLLECTION_NAME in DOMIterables) {
|
|
469
|
-
handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype, COLLECTION_NAME);
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|