@vonage/vivid 3.0.0-next.10 → 3.0.0-next.101

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.
Files changed (207) hide show
  1. package/README.md +141 -4
  2. package/accordion/index.js +3 -12
  3. package/accordion-item/index.js +31 -38
  4. package/action-group/index.js +41 -0
  5. package/avatar/index.js +61 -0
  6. package/badge/index.js +17 -30
  7. package/banner/index.js +26 -111
  8. package/breadcrumb/index.js +21 -18
  9. package/breadcrumb-item/index.js +24 -20
  10. package/button/index.js +20 -757
  11. package/calendar/index.js +72 -67
  12. package/calendar-event/index.js +112 -0
  13. package/card/index.js +114 -0
  14. package/checkbox/index.js +179 -0
  15. package/dialog/index.js +230 -0
  16. package/divider/index.js +4 -0
  17. package/elevation/index.js +3 -31
  18. package/fab/index.js +100 -0
  19. package/focus/index.js +18 -3
  20. package/header/index.js +61 -0
  21. package/icon/index.js +11 -9
  22. package/index.js +64 -20
  23. package/layout/index.js +5 -15
  24. package/lib/accordion-item/accordion-item.d.ts +2 -2
  25. package/lib/accordion-item/index.d.ts +2 -1
  26. package/lib/action-group/action-group.d.ts +10 -0
  27. package/lib/{sidenav-item/sidenav-item.template.d.ts → action-group/action-group.template.d.ts} +2 -2
  28. package/lib/{sidenav-item → action-group}/index.d.ts +1 -2
  29. package/lib/avatar/avatar.d.ts +15 -0
  30. package/lib/avatar/avatar.template.d.ts +4 -0
  31. package/lib/avatar/index.d.ts +3 -0
  32. package/lib/badge/badge.d.ts +3 -5
  33. package/lib/badge/index.d.ts +1 -1
  34. package/lib/banner/banner.d.ts +1 -1
  35. package/lib/banner/banner.template.d.ts +0 -2
  36. package/lib/banner/index.d.ts +1 -0
  37. package/lib/breadcrumb/breadcrumb.template.d.ts +4 -0
  38. package/lib/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  39. package/lib/breadcrumb-item/index.d.ts +1 -0
  40. package/lib/button/button.d.ts +4 -3
  41. package/lib/button/index.d.ts +2 -19
  42. package/lib/calendar/calendar.d.ts +3 -1
  43. package/lib/calendar/index.d.ts +0 -1
  44. package/lib/calendar-event/calendar-event.d.ts +14 -0
  45. package/lib/calendar-event/calendar-event.template.d.ts +4 -0
  46. package/lib/calendar-event/index.d.ts +2 -0
  47. package/lib/card/card.d.ts +10 -0
  48. package/lib/{text/text.template.d.ts → card/card.template.d.ts} +2 -2
  49. package/lib/card/index.d.ts +4 -0
  50. package/lib/checkbox/checkbox.d.ts +5 -0
  51. package/lib/checkbox/checkbox.template.d.ts +4 -0
  52. package/lib/checkbox/index.d.ts +4 -0
  53. package/lib/components.d.ts +32 -10
  54. package/lib/dialog/dialog.d.ts +20 -0
  55. package/lib/dialog/dialog.template.d.ts +4 -0
  56. package/lib/dialog/index.d.ts +5 -0
  57. package/lib/divider/divider.d.ts +3 -0
  58. package/lib/divider/divider.template.d.ts +4 -0
  59. package/lib/divider/index.d.ts +2 -0
  60. package/lib/elevation/elevation.d.ts +1 -0
  61. package/lib/elevation/index.d.ts +1 -1
  62. package/lib/enums.d.ts +19 -6
  63. package/lib/fab/fab.d.ts +13 -0
  64. package/lib/fab/fab.template.d.ts +4 -0
  65. package/lib/fab/index.d.ts +4 -0
  66. package/lib/focus/index.d.ts +1 -1
  67. package/lib/header/header.d.ts +5 -0
  68. package/lib/header/header.template.d.ts +4 -0
  69. package/lib/header/index.d.ts +3 -0
  70. package/lib/icon/icon.d.ts +4 -3
  71. package/lib/layout/index.d.ts +1 -1
  72. package/lib/layout/layout.d.ts +4 -4
  73. package/lib/listbox/index.d.ts +4 -0
  74. package/lib/listbox/listbox.d.ts +9 -0
  75. package/lib/listbox/listbox.template.d.ts +4 -0
  76. package/lib/listbox-option/index.d.ts +4 -0
  77. package/lib/listbox-option/listbox-option.d.ts +9 -0
  78. package/lib/listbox-option/listbox-option.template.d.ts +4 -0
  79. package/lib/menu/index.d.ts +12 -0
  80. package/lib/menu/menu.d.ts +10 -0
  81. package/lib/menu/menu.template.d.ts +3 -0
  82. package/lib/menu-item/index.d.ts +3 -0
  83. package/lib/menu-item/menu-item.d.ts +7 -0
  84. package/lib/menu-item/menu-item.template.d.ts +5 -0
  85. package/lib/nav/index.d.ts +2 -0
  86. package/lib/nav/nav.d.ts +3 -0
  87. package/lib/nav/nav.template.d.ts +4 -0
  88. package/lib/nav-disclosure/index.d.ts +4 -0
  89. package/lib/nav-disclosure/nav-disclosure.d.ts +10 -0
  90. package/lib/nav-disclosure/nav-disclosure.template.d.ts +4 -0
  91. package/lib/nav-item/index.d.ts +4 -0
  92. package/lib/{sidenav-item/sidenav-item.d.ts → nav-item/nav-item.d.ts} +2 -2
  93. package/lib/nav-item/nav-item.template.d.ts +4 -0
  94. package/lib/{text → note}/index.d.ts +1 -1
  95. package/lib/note/note.d.ts +10 -0
  96. package/lib/note/note.template.d.ts +5 -0
  97. package/lib/number-field/index.d.ts +4 -0
  98. package/lib/number-field/number-field.d.ts +14 -0
  99. package/lib/number-field/number-field.template.d.ts +4 -0
  100. package/lib/popup/index.d.ts +1 -1
  101. package/lib/popup/popup.d.ts +2 -1
  102. package/lib/progress/progress.d.ts +1 -1
  103. package/lib/progress-ring/progress-ring.d.ts +2 -1
  104. package/lib/radio/index.d.ts +3 -0
  105. package/lib/radio/radio.d.ts +4 -0
  106. package/lib/radio/radio.template.d.ts +4 -0
  107. package/lib/radio-group/index.d.ts +10 -0
  108. package/lib/radio-group/radio-group.d.ts +4 -0
  109. package/lib/radio-group/radio-group.template.d.ts +4 -0
  110. package/lib/side-drawer/index.d.ts +1 -1
  111. package/lib/side-drawer/side-drawer.d.ts +3 -2
  112. package/lib/slider/index.d.ts +3 -0
  113. package/lib/slider/slider.d.ts +4 -0
  114. package/lib/slider/slider.template.d.ts +4 -0
  115. package/lib/switch/index.d.ts +4 -0
  116. package/lib/switch/switch.d.ts +7 -0
  117. package/lib/switch/switch.template.d.ts +4 -0
  118. package/lib/text-anchor/text-anchor.d.ts +1 -1
  119. package/lib/text-area/index.d.ts +4 -0
  120. package/lib/text-area/text-area.d.ts +9 -0
  121. package/lib/text-area/text-area.template.d.ts +4 -0
  122. package/lib/text-field/index.d.ts +4 -0
  123. package/lib/text-field/text-field.d.ts +14 -0
  124. package/lib/text-field/text-field.template.d.ts +5 -0
  125. package/lib/tooltip/tooltip.d.ts +2 -2
  126. package/listbox/index.js +1090 -0
  127. package/listbox-option/index.js +22 -0
  128. package/menu/index.js +371 -0
  129. package/menu-item/index.js +21 -0
  130. package/nav/index.js +17 -0
  131. package/nav-disclosure/index.js +82 -0
  132. package/nav-item/index.js +46 -0
  133. package/note/index.js +59 -0
  134. package/number-field/index.js +461 -0
  135. package/package.json +61 -10
  136. package/popup/index.js +23 -2061
  137. package/progress/index.js +35 -36
  138. package/progress-ring/index.js +11 -11
  139. package/radio/index.js +47 -0
  140. package/radio-group/index.js +435 -0
  141. package/shared/affix.js +1 -6
  142. package/shared/anchor.js +10 -2
  143. package/shared/apply-mixins.js +5 -4
  144. package/shared/aria-global.js +2 -86
  145. package/shared/aria.js +9 -0
  146. package/shared/base-progress.js +5 -0
  147. package/shared/breadcrumb-item.js +1 -1
  148. package/shared/button.js +200 -0
  149. package/shared/calendar-event.js +19 -0
  150. package/shared/dialog-polyfill.esm.js +858 -0
  151. package/shared/direction.js +20 -0
  152. package/shared/dom.js +8 -0
  153. package/shared/enums.js +70 -0
  154. package/shared/es.object.assign.js +3 -2
  155. package/shared/es.regexp.to-string.js +59 -0
  156. package/shared/export.js +1017 -0
  157. package/shared/focus.js +5 -0
  158. package/shared/focus2.js +11 -0
  159. package/shared/form-associated.js +466 -0
  160. package/shared/form-elements.js +331 -0
  161. package/shared/icon.js +532 -564
  162. package/shared/index.js +108 -79
  163. package/shared/index2.js +100 -14
  164. package/shared/index3.js +31 -0
  165. package/shared/index4.js +77 -0
  166. package/shared/index5.js +261 -0
  167. package/shared/index6.js +1525 -0
  168. package/shared/index7.js +349 -0
  169. package/shared/iterators.js +61 -0
  170. package/shared/key-codes.js +97 -0
  171. package/shared/numbers.js +25 -0
  172. package/shared/object-keys.js +13 -0
  173. package/shared/patterns/focus.d.ts +3 -0
  174. package/shared/patterns/form-elements/form-elements.d.ts +28 -0
  175. package/shared/patterns/form-elements/index.d.ts +1 -0
  176. package/shared/patterns/index.d.ts +2 -0
  177. package/shared/radio.js +127 -0
  178. package/shared/ref.js +41 -0
  179. package/shared/slotted.js +1 -1
  180. package/shared/start-end.js +50 -0
  181. package/shared/string-trim.js +40 -0
  182. package/shared/text-anchor.js +2 -13
  183. package/shared/text-anchor.template.js +6 -5
  184. package/shared/to-string.js +51 -0
  185. package/shared/web.dom-collections.iterator.js +74 -1081
  186. package/side-drawer/index.js +41 -33
  187. package/slider/index.js +596 -0
  188. package/styles/core/all.css +75 -0
  189. package/styles/core/theme.css +11 -0
  190. package/styles/core/typography.css +69 -0
  191. package/styles/fonts/SpeziaCompleteVariableItalicWeb.woff2 +0 -0
  192. package/styles/fonts/SpeziaCompleteVariableUprightWeb.woff2 +0 -0
  193. package/styles/fonts/SpeziaMonoCompleteVariableWeb.woff2 +0 -0
  194. package/styles/fonts/spezia.css +9 -12
  195. package/styles/tokens/theme-dark.css +230 -0
  196. package/styles/tokens/theme-light.css +230 -0
  197. package/switch/index.js +153 -0
  198. package/text-anchor/index.js +10 -1
  199. package/text-area/index.js +289 -0
  200. package/text-field/index.js +130 -0
  201. package/tooltip/index.js +24 -24
  202. package/lib/text/text.d.ts +0 -10
  203. package/shared/style-inject.es.js +0 -28
  204. package/sidenav-item/index.js +0 -38
  205. package/styles/themes/dark.css +0 -205
  206. package/styles/themes/light.css +0 -205
  207. package/text/index.js +0 -45
package/shared/icon.js CHANGED
@@ -1,27 +1,24 @@
1
- import { g as global$e, r as redefine$3, w as wellKnownSymbol$8, a as getBuiltIn$4, o as objectDefineProperty, d as descriptors, b as objectIsPrototypeOf, f as functionUncurryThis, c as functionBindNative, e as aCallable$4, i as iterators, h as classofRaw$1, j as isCallable$5, k as getMethod$2, l as functionCall, m as anObject$5, t as tryToString$3, n as lengthOfArrayLike$1, p as fails$4, q as inspectSource$2, s as engineUserAgent, u as html$1, v as documentCreateElement, x as hasOwnProperty_1, y as objectGetOwnPropertyDescriptor, z as isObject$2, _ as _export, A as objectSetPrototypeOf, B as setToStringTag$1, C as isForced_1, D as engineV8Version, E as internalState, F as requireObjectCoercible$1, G as functionName } from './web.dom-collections.iterator.js';
1
+ import { c as classofRaw, g as global$8, w as wellKnownSymbol$6, a as getBuiltIn$5, o as objectDefineProperty, d as descriptors, b as objectIsPrototypeOf, f as functionUncurryThis, e as fails$4, i as isCallable$6, h as inspectSource$2, t as tryToString$3, j as anObject$5, k as isNullOrUndefined$2, l as functionBindNative, m as aCallable$6, n as engineUserAgent, p as documentCreateElement, q as hasOwnProperty_1, r as objectGetOwnPropertyDescriptor, s as isForced_1, u as engineV8Version, _ as _export, v as defineBuiltIn$3, x as functionCall, y as internalState, z as isObject$2, A as getMethod$2, B as lengthOfArrayLike$1, C as functionName } from './export.js';
2
+ import { h as html$1, o as objectSetPrototypeOf, s as setToStringTag$1, i as iterators } from './iterators.js';
3
+ import { c as classof$3 } from './to-string.js';
4
+ import { w as whitespaces$1, s as stringTrim } from './string-trim.js';
2
5
  import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, o as observable } from './index.js';
3
6
  import { _ as _curry1, a as _curry2, b as _has } from './_has.js';
4
7
 
5
- var global$d = global$e;
8
+ var classof$2 = classofRaw;
9
+ var global$7 = global$8;
6
10
 
7
- var nativePromiseConstructor = global$d.Promise;
11
+ var engineIsNode = classof$2(global$7.process) == 'process';
8
12
 
9
- var redefine$2 = redefine$3.exports;
10
-
11
- var redefineAll$1 = function (target, src, options) {
12
- for (var key in src) redefine$2(target, key, src[key], options);
13
- return target;
14
- };
15
-
16
- var getBuiltIn$3 = getBuiltIn$4;
13
+ var getBuiltIn$4 = getBuiltIn$5;
17
14
  var definePropertyModule = objectDefineProperty;
18
- var wellKnownSymbol$7 = wellKnownSymbol$8;
15
+ var wellKnownSymbol$5 = wellKnownSymbol$6;
19
16
  var DESCRIPTORS = descriptors;
20
17
 
21
- var SPECIES$2 = wellKnownSymbol$7('species');
18
+ var SPECIES$2 = wellKnownSymbol$5('species');
22
19
 
23
20
  var setSpecies$1 = function (CONSTRUCTOR_NAME) {
24
- var Constructor = getBuiltIn$3(CONSTRUCTOR_NAME);
21
+ var Constructor = getBuiltIn$4(CONSTRUCTOR_NAME);
25
22
  var defineProperty = definePropertyModule.f;
26
23
 
27
24
  if (DESCRIPTORS && Constructor && !Constructor[SPECIES$2]) {
@@ -32,255 +29,31 @@ var setSpecies$1 = function (CONSTRUCTOR_NAME) {
32
29
  }
33
30
  };
34
31
 
35
- var global$c = global$e;
36
32
  var isPrototypeOf$1 = objectIsPrototypeOf;
37
33
 
38
- var TypeError$6 = global$c.TypeError;
34
+ var $TypeError$5 = TypeError;
39
35
 
40
36
  var anInstance$1 = function (it, Prototype) {
41
37
  if (isPrototypeOf$1(Prototype, it)) return it;
42
- throw TypeError$6('Incorrect invocation');
43
- };
44
-
45
- var uncurryThis$3 = functionUncurryThis;
46
- var aCallable$3 = aCallable$4;
47
- var NATIVE_BIND$1 = functionBindNative;
48
-
49
- var bind$4 = uncurryThis$3(uncurryThis$3.bind);
50
-
51
- // optional / simple context binding
52
- var functionBindContext = function (fn, that) {
53
- aCallable$3(fn);
54
- return that === undefined ? fn : NATIVE_BIND$1 ? bind$4(fn, that) : function (/* ...args */) {
55
- return fn.apply(that, arguments);
56
- };
57
- };
58
-
59
- var wellKnownSymbol$6 = wellKnownSymbol$8;
60
- var Iterators$1 = iterators;
61
-
62
- var ITERATOR$2 = wellKnownSymbol$6('iterator');
63
- var ArrayPrototype = Array.prototype;
64
-
65
- // check on default Array iterator
66
- var isArrayIteratorMethod$1 = function (it) {
67
- return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
68
- };
69
-
70
- var wellKnownSymbol$5 = wellKnownSymbol$8;
71
-
72
- var TO_STRING_TAG$1 = wellKnownSymbol$5('toStringTag');
73
- var test = {};
74
-
75
- test[TO_STRING_TAG$1] = 'z';
76
-
77
- var toStringTagSupport = String(test) === '[object z]';
78
-
79
- var global$b = global$e;
80
- var TO_STRING_TAG_SUPPORT = toStringTagSupport;
81
- var isCallable$4 = isCallable$5;
82
- var classofRaw = classofRaw$1;
83
- var wellKnownSymbol$4 = wellKnownSymbol$8;
84
-
85
- var TO_STRING_TAG = wellKnownSymbol$4('toStringTag');
86
- var Object$1 = global$b.Object;
87
-
88
- // ES3 wrong here
89
- var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
90
-
91
- // fallback for IE11 Script Access Denied error
92
- var tryGet = function (it, key) {
93
- try {
94
- return it[key];
95
- } catch (error) { /* empty */ }
96
- };
97
-
98
- // getting tag from ES6+ `Object.prototype.toString`
99
- var classof$4 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
100
- var O, tag, result;
101
- return it === undefined ? 'Undefined' : it === null ? 'Null'
102
- // @@toStringTag case
103
- : typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
104
- // builtinTag case
105
- : CORRECT_ARGUMENTS ? classofRaw(O)
106
- // ES3 arguments fallback
107
- : (result = classofRaw(O)) == 'Object' && isCallable$4(O.callee) ? 'Arguments' : result;
108
- };
109
-
110
- var classof$3 = classof$4;
111
- var getMethod$1 = getMethod$2;
112
- var Iterators = iterators;
113
- var wellKnownSymbol$3 = wellKnownSymbol$8;
114
-
115
- var ITERATOR$1 = wellKnownSymbol$3('iterator');
116
-
117
- var getIteratorMethod$2 = function (it) {
118
- if (it != undefined) return getMethod$1(it, ITERATOR$1)
119
- || getMethod$1(it, '@@iterator')
120
- || Iterators[classof$3(it)];
121
- };
122
-
123
- var global$a = global$e;
124
- var call$4 = functionCall;
125
- var aCallable$2 = aCallable$4;
126
- var anObject$4 = anObject$5;
127
- var tryToString$2 = tryToString$3;
128
- var getIteratorMethod$1 = getIteratorMethod$2;
129
-
130
- var TypeError$5 = global$a.TypeError;
131
-
132
- var getIterator$1 = function (argument, usingIterator) {
133
- var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
134
- if (aCallable$2(iteratorMethod)) return anObject$4(call$4(iteratorMethod, argument));
135
- throw TypeError$5(tryToString$2(argument) + ' is not iterable');
136
- };
137
-
138
- var call$3 = functionCall;
139
- var anObject$3 = anObject$5;
140
- var getMethod = getMethod$2;
141
-
142
- var iteratorClose$1 = function (iterator, kind, value) {
143
- var innerResult, innerError;
144
- anObject$3(iterator);
145
- try {
146
- innerResult = getMethod(iterator, 'return');
147
- if (!innerResult) {
148
- if (kind === 'throw') throw value;
149
- return value;
150
- }
151
- innerResult = call$3(innerResult, iterator);
152
- } catch (error) {
153
- innerError = true;
154
- innerResult = error;
155
- }
156
- if (kind === 'throw') throw value;
157
- if (innerError) throw innerResult;
158
- anObject$3(innerResult);
159
- return value;
160
- };
161
-
162
- var global$9 = global$e;
163
- var bind$3 = functionBindContext;
164
- var call$2 = functionCall;
165
- var anObject$2 = anObject$5;
166
- var tryToString$1 = tryToString$3;
167
- var isArrayIteratorMethod = isArrayIteratorMethod$1;
168
- var lengthOfArrayLike = lengthOfArrayLike$1;
169
- var isPrototypeOf = objectIsPrototypeOf;
170
- var getIterator = getIterator$1;
171
- var getIteratorMethod = getIteratorMethod$2;
172
- var iteratorClose = iteratorClose$1;
173
-
174
- var TypeError$4 = global$9.TypeError;
175
-
176
- var Result = function (stopped, result) {
177
- this.stopped = stopped;
178
- this.result = result;
179
- };
180
-
181
- var ResultPrototype = Result.prototype;
182
-
183
- var iterate$1 = function (iterable, unboundFunction, options) {
184
- var that = options && options.that;
185
- var AS_ENTRIES = !!(options && options.AS_ENTRIES);
186
- var IS_ITERATOR = !!(options && options.IS_ITERATOR);
187
- var INTERRUPTED = !!(options && options.INTERRUPTED);
188
- var fn = bind$3(unboundFunction, that);
189
- var iterator, iterFn, index, length, result, next, step;
190
-
191
- var stop = function (condition) {
192
- if (iterator) iteratorClose(iterator, 'normal', condition);
193
- return new Result(true, condition);
194
- };
195
-
196
- var callFn = function (value) {
197
- if (AS_ENTRIES) {
198
- anObject$2(value);
199
- return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
200
- } return INTERRUPTED ? fn(value, stop) : fn(value);
201
- };
202
-
203
- if (IS_ITERATOR) {
204
- iterator = iterable;
205
- } else {
206
- iterFn = getIteratorMethod(iterable);
207
- if (!iterFn) throw TypeError$4(tryToString$1(iterable) + ' is not iterable');
208
- // optimisation for array iterators
209
- if (isArrayIteratorMethod(iterFn)) {
210
- for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
211
- result = callFn(iterable[index]);
212
- if (result && isPrototypeOf(ResultPrototype, result)) return result;
213
- } return new Result(false);
214
- }
215
- iterator = getIterator(iterable, iterFn);
216
- }
217
-
218
- next = iterator.next;
219
- while (!(step = call$2(next, iterator)).done) {
220
- try {
221
- result = callFn(step.value);
222
- } catch (error) {
223
- iteratorClose(iterator, 'throw', error);
224
- }
225
- if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
226
- } return new Result(false);
227
- };
228
-
229
- var wellKnownSymbol$2 = wellKnownSymbol$8;
230
-
231
- var ITERATOR = wellKnownSymbol$2('iterator');
232
- var SAFE_CLOSING = false;
233
-
234
- try {
235
- var called = 0;
236
- var iteratorWithReturn = {
237
- next: function () {
238
- return { done: !!called++ };
239
- },
240
- 'return': function () {
241
- SAFE_CLOSING = true;
242
- }
243
- };
244
- iteratorWithReturn[ITERATOR] = function () {
245
- return this;
246
- };
247
- // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
248
- Array.from(iteratorWithReturn, function () { throw 2; });
249
- } catch (error) { /* empty */ }
250
-
251
- var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
252
- if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
253
- var ITERATION_SUPPORT = false;
254
- try {
255
- var object = {};
256
- object[ITERATOR] = function () {
257
- return {
258
- next: function () {
259
- return { done: ITERATION_SUPPORT = true };
260
- }
261
- };
262
- };
263
- exec(object);
264
- } catch (error) { /* empty */ }
265
- return ITERATION_SUPPORT;
38
+ throw $TypeError$5('Incorrect invocation');
266
39
  };
267
40
 
268
41
  var uncurryThis$2 = functionUncurryThis;
269
42
  var fails$3 = fails$4;
270
- var isCallable$3 = isCallable$5;
271
- var classof$2 = classof$4;
272
- var getBuiltIn$2 = getBuiltIn$4;
43
+ var isCallable$5 = isCallable$6;
44
+ var classof$1 = classof$3;
45
+ var getBuiltIn$3 = getBuiltIn$5;
273
46
  var inspectSource$1 = inspectSource$2;
274
47
 
275
48
  var noop = function () { /* empty */ };
276
49
  var empty = [];
277
- var construct = getBuiltIn$2('Reflect', 'construct');
50
+ var construct = getBuiltIn$3('Reflect', 'construct');
278
51
  var constructorRegExp = /^\s*(?:class|function)\b/;
279
52
  var exec = uncurryThis$2(constructorRegExp.exec);
280
53
  var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
281
54
 
282
55
  var isConstructorModern = function isConstructor(argument) {
283
- if (!isCallable$3(argument)) return false;
56
+ if (!isCallable$5(argument)) return false;
284
57
  try {
285
58
  construct(noop, empty, argument);
286
59
  return true;
@@ -290,8 +63,8 @@ var isConstructorModern = function isConstructor(argument) {
290
63
  };
291
64
 
292
65
  var isConstructorLegacy = function isConstructor(argument) {
293
- if (!isCallable$3(argument)) return false;
294
- switch (classof$2(argument)) {
66
+ if (!isCallable$5(argument)) return false;
67
+ switch (classof$1(argument)) {
295
68
  case 'AsyncFunction':
296
69
  case 'GeneratorFunction':
297
70
  case 'AsyncGeneratorFunction': return false;
@@ -318,53 +91,65 @@ var isConstructor$1 = !construct || fails$3(function () {
318
91
  || called;
319
92
  }) ? isConstructorLegacy : isConstructorModern;
320
93
 
321
- var global$8 = global$e;
322
94
  var isConstructor = isConstructor$1;
323
- var tryToString = tryToString$3;
95
+ var tryToString$2 = tryToString$3;
324
96
 
325
- var TypeError$3 = global$8.TypeError;
97
+ var $TypeError$4 = TypeError;
326
98
 
327
99
  // `Assert: IsConstructor(argument) is true`
328
100
  var aConstructor$1 = function (argument) {
329
101
  if (isConstructor(argument)) return argument;
330
- throw TypeError$3(tryToString(argument) + ' is not a constructor');
102
+ throw $TypeError$4(tryToString$2(argument) + ' is not a constructor');
331
103
  };
332
104
 
333
- var anObject$1 = anObject$5;
105
+ var anObject$4 = anObject$5;
334
106
  var aConstructor = aConstructor$1;
335
- var wellKnownSymbol$1 = wellKnownSymbol$8;
107
+ var isNullOrUndefined$1 = isNullOrUndefined$2;
108
+ var wellKnownSymbol$4 = wellKnownSymbol$6;
336
109
 
337
- var SPECIES$1 = wellKnownSymbol$1('species');
110
+ var SPECIES$1 = wellKnownSymbol$4('species');
338
111
 
339
112
  // `SpeciesConstructor` abstract operation
340
113
  // https://tc39.es/ecma262/#sec-speciesconstructor
341
114
  var speciesConstructor$2 = function (O, defaultConstructor) {
342
- var C = anObject$1(O).constructor;
115
+ var C = anObject$4(O).constructor;
343
116
  var S;
344
- return C === undefined || (S = anObject$1(C)[SPECIES$1]) == undefined ? defaultConstructor : aConstructor(S);
117
+ return C === undefined || isNullOrUndefined$1(S = anObject$4(C)[SPECIES$1]) ? defaultConstructor : aConstructor(S);
345
118
  };
346
119
 
347
- var NATIVE_BIND = functionBindNative;
120
+ var NATIVE_BIND$1 = functionBindNative;
348
121
 
349
122
  var FunctionPrototype = Function.prototype;
350
123
  var apply$1 = FunctionPrototype.apply;
351
- var call$1 = FunctionPrototype.call;
124
+ var call$7 = FunctionPrototype.call;
352
125
 
353
126
  // eslint-disable-next-line es/no-reflect -- safe
354
- var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$1.bind(apply$1) : function () {
355
- return call$1.apply(apply$1, arguments);
127
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$7.bind(apply$1) : function () {
128
+ return call$7.apply(apply$1, arguments);
356
129
  });
357
130
 
358
131
  var uncurryThis$1 = functionUncurryThis;
132
+ var aCallable$5 = aCallable$6;
133
+ var NATIVE_BIND = functionBindNative;
134
+
135
+ var bind$4 = uncurryThis$1(uncurryThis$1.bind);
359
136
 
360
- var arraySlice$1 = uncurryThis$1([].slice);
137
+ // optional / simple context binding
138
+ var functionBindContext = function (fn, that) {
139
+ aCallable$5(fn);
140
+ return that === undefined ? fn : NATIVE_BIND ? bind$4(fn, that) : function (/* ...args */) {
141
+ return fn.apply(that, arguments);
142
+ };
143
+ };
361
144
 
362
- var global$7 = global$e;
145
+ var uncurryThis = functionUncurryThis;
363
146
 
364
- var TypeError$2 = global$7.TypeError;
147
+ var arraySlice$1 = uncurryThis([].slice);
148
+
149
+ var $TypeError$3 = TypeError;
365
150
 
366
151
  var validateArgumentsLength$1 = function (passed, required) {
367
- if (passed < required) throw TypeError$2('Not enough arguments');
152
+ if (passed < required) throw $TypeError$3('Not enough arguments');
368
153
  return passed;
369
154
  };
370
155
 
@@ -372,15 +157,10 @@ var userAgent$2 = engineUserAgent;
372
157
 
373
158
  var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
374
159
 
375
- var classof$1 = classofRaw$1;
376
- var global$6 = global$e;
377
-
378
- var engineIsNode = classof$1(global$6.process) == 'process';
379
-
380
- var global$5 = global$e;
160
+ var global$6 = global$8;
381
161
  var apply = functionApply;
382
- var bind$2 = functionBindContext;
383
- var isCallable$2 = isCallable$5;
162
+ var bind$3 = functionBindContext;
163
+ var isCallable$4 = isCallable$6;
384
164
  var hasOwn = hasOwnProperty_1;
385
165
  var fails$2 = fails$4;
386
166
  var html = html$1;
@@ -388,23 +168,23 @@ var arraySlice = arraySlice$1;
388
168
  var createElement = documentCreateElement;
389
169
  var validateArgumentsLength = validateArgumentsLength$1;
390
170
  var IS_IOS$1 = engineIsIos;
391
- var IS_NODE$2 = engineIsNode;
392
-
393
- var set = global$5.setImmediate;
394
- var clear = global$5.clearImmediate;
395
- var process$2 = global$5.process;
396
- var Dispatch = global$5.Dispatch;
397
- var Function$1 = global$5.Function;
398
- var MessageChannel = global$5.MessageChannel;
399
- var String$2 = global$5.String;
171
+ var IS_NODE$3 = engineIsNode;
172
+
173
+ var set = global$6.setImmediate;
174
+ var clear = global$6.clearImmediate;
175
+ var process$2 = global$6.process;
176
+ var Dispatch = global$6.Dispatch;
177
+ var Function$1 = global$6.Function;
178
+ var MessageChannel = global$6.MessageChannel;
179
+ var String$1 = global$6.String;
400
180
  var counter = 0;
401
181
  var queue$1 = {};
402
182
  var ONREADYSTATECHANGE = 'onreadystatechange';
403
- var location, defer, channel, port;
183
+ var $location, defer, channel, port;
404
184
 
405
185
  try {
406
186
  // Deno throws a ReferenceError on `location` access without `--location` flag
407
- location = global$5.location;
187
+ $location = global$6.location;
408
188
  } catch (error) { /* empty */ }
409
189
 
410
190
  var run = function (id) {
@@ -427,14 +207,14 @@ var listener = function (event) {
427
207
 
428
208
  var post = function (id) {
429
209
  // old engines have not location.origin
430
- global$5.postMessage(String$2(id), location.protocol + '//' + location.host);
210
+ global$6.postMessage(String$1(id), $location.protocol + '//' + $location.host);
431
211
  };
432
212
 
433
213
  // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
434
214
  if (!set || !clear) {
435
215
  set = function setImmediate(handler) {
436
216
  validateArgumentsLength(arguments.length, 1);
437
- var fn = isCallable$2(handler) ? handler : Function$1(handler);
217
+ var fn = isCallable$4(handler) ? handler : Function$1(handler);
438
218
  var args = arraySlice(arguments, 1);
439
219
  queue$1[++counter] = function () {
440
220
  apply(fn, undefined, args);
@@ -446,7 +226,7 @@ if (!set || !clear) {
446
226
  delete queue$1[id];
447
227
  };
448
228
  // Node.js 0.8-
449
- if (IS_NODE$2) {
229
+ if (IS_NODE$3) {
450
230
  defer = function (id) {
451
231
  process$2.nextTick(runner(id));
452
232
  };
@@ -461,18 +241,18 @@ if (!set || !clear) {
461
241
  channel = new MessageChannel();
462
242
  port = channel.port2;
463
243
  channel.port1.onmessage = listener;
464
- defer = bind$2(port.postMessage, port);
244
+ defer = bind$3(port.postMessage, port);
465
245
  // Browsers with postMessage, skip WebWorkers
466
246
  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
467
247
  } else if (
468
- global$5.addEventListener &&
469
- isCallable$2(global$5.postMessage) &&
470
- !global$5.importScripts &&
471
- location && location.protocol !== 'file:' &&
248
+ global$6.addEventListener &&
249
+ isCallable$4(global$6.postMessage) &&
250
+ !global$6.importScripts &&
251
+ $location && $location.protocol !== 'file:' &&
472
252
  !fails$2(post)
473
253
  ) {
474
254
  defer = post;
475
- global$5.addEventListener('message', listener, false);
255
+ global$6.addEventListener('message', listener, false);
476
256
  // IE8-
477
257
  } else if (ONREADYSTATECHANGE in createElement('script')) {
478
258
  defer = function (id) {
@@ -495,29 +275,29 @@ var task$1 = {
495
275
  };
496
276
 
497
277
  var userAgent$1 = engineUserAgent;
498
- var global$4 = global$e;
278
+ var global$5 = global$8;
499
279
 
500
- var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && global$4.Pebble !== undefined;
280
+ var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && global$5.Pebble !== undefined;
501
281
 
502
282
  var userAgent = engineUserAgent;
503
283
 
504
284
  var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
505
285
 
506
- var global$3 = global$e;
507
- var bind$1 = functionBindContext;
286
+ var global$4 = global$8;
287
+ var bind$2 = functionBindContext;
508
288
  var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
509
289
  var macrotask = task$1.set;
510
290
  var IS_IOS = engineIsIos;
511
291
  var IS_IOS_PEBBLE = engineIsIosPebble;
512
292
  var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
513
- var IS_NODE$1 = engineIsNode;
293
+ var IS_NODE$2 = engineIsNode;
514
294
 
515
- var MutationObserver = global$3.MutationObserver || global$3.WebKitMutationObserver;
516
- var document$1 = global$3.document;
517
- var process$1 = global$3.process;
518
- var Promise$1 = global$3.Promise;
295
+ var MutationObserver = global$4.MutationObserver || global$4.WebKitMutationObserver;
296
+ var document$2 = global$4.document;
297
+ var process$1 = global$4.process;
298
+ var Promise$1 = global$4.Promise;
519
299
  // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
520
- var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$3, 'queueMicrotask');
300
+ var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$4, 'queueMicrotask');
521
301
  var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
522
302
 
523
303
  var flush, head, last, notify$1, toggle, node, promise, then;
@@ -526,7 +306,7 @@ var flush, head, last, notify$1, toggle, node, promise, then;
526
306
  if (!queueMicrotask) {
527
307
  flush = function () {
528
308
  var parent, fn;
529
- if (IS_NODE$1 && (parent = process$1.domain)) parent.exit();
309
+ if (IS_NODE$2 && (parent = process$1.domain)) parent.exit();
530
310
  while (head) {
531
311
  fn = head.fn;
532
312
  head = head.next;
@@ -543,9 +323,9 @@ if (!queueMicrotask) {
543
323
 
544
324
  // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
545
325
  // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
546
- if (!IS_IOS && !IS_NODE$1 && !IS_WEBOS_WEBKIT && MutationObserver && document$1) {
326
+ if (!IS_IOS && !IS_NODE$2 && !IS_WEBOS_WEBKIT && MutationObserver && document$2) {
547
327
  toggle = true;
548
- node = document$1.createTextNode('');
328
+ node = document$2.createTextNode('');
549
329
  new MutationObserver(flush).observe(node, { characterData: true });
550
330
  notify$1 = function () {
551
331
  node.data = toggle = !toggle;
@@ -556,24 +336,24 @@ if (!queueMicrotask) {
556
336
  promise = Promise$1.resolve(undefined);
557
337
  // workaround of WebKit ~ iOS Safari 10.1 bug
558
338
  promise.constructor = Promise$1;
559
- then = bind$1(promise.then, promise);
339
+ then = bind$2(promise.then, promise);
560
340
  notify$1 = function () {
561
341
  then(flush);
562
342
  };
563
343
  // Node.js without promises
564
- } else if (IS_NODE$1) {
344
+ } else if (IS_NODE$2) {
565
345
  notify$1 = function () {
566
346
  process$1.nextTick(flush);
567
347
  };
568
348
  // for other environments - macrotask based on:
569
349
  // - setImmediate
570
350
  // - MessageChannel
571
- // - window.postMessag
351
+ // - window.postMessage
572
352
  // - onreadystatechange
573
353
  // - setTimeout
574
354
  } else {
575
355
  // strange IE + webpack dev server bug - use .bind(global)
576
- macrotask = bind$1(macrotask, global$3);
356
+ macrotask = bind$2(macrotask, global$4);
577
357
  notify$1 = function () {
578
358
  macrotask(flush);
579
359
  };
@@ -589,50 +369,16 @@ var microtask$1 = queueMicrotask || function (fn) {
589
369
  } last = task;
590
370
  };
591
371
 
592
- var newPromiseCapability$2 = {};
593
-
594
- var aCallable$1 = aCallable$4;
595
-
596
- var PromiseCapability = function (C) {
597
- var resolve, reject;
598
- this.promise = new C(function ($$resolve, $$reject) {
599
- if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
600
- resolve = $$resolve;
601
- reject = $$reject;
602
- });
603
- this.resolve = aCallable$1(resolve);
604
- this.reject = aCallable$1(reject);
605
- };
606
-
607
- // `NewPromiseCapability` abstract operation
608
- // https://tc39.es/ecma262/#sec-newpromisecapability
609
- newPromiseCapability$2.f = function (C) {
610
- return new PromiseCapability(C);
611
- };
612
-
613
- var anObject = anObject$5;
614
- var isObject$1 = isObject$2;
615
- var newPromiseCapability$1 = newPromiseCapability$2;
616
-
617
- var promiseResolve$2 = function (C, x) {
618
- anObject(C);
619
- if (isObject$1(x) && x.constructor === C) return x;
620
- var promiseCapability = newPromiseCapability$1.f(C);
621
- var resolve = promiseCapability.resolve;
622
- resolve(x);
623
- return promiseCapability.promise;
624
- };
625
-
626
- var global$2 = global$e;
372
+ var global$3 = global$8;
627
373
 
628
374
  var hostReportErrors$1 = function (a, b) {
629
- var console = global$2.console;
375
+ var console = global$3.console;
630
376
  if (console && console.error) {
631
377
  arguments.length == 1 ? console.error(a) : console.error(a, b);
632
378
  }
633
379
  };
634
380
 
635
- var perform$1 = function (exec) {
381
+ var perform$3 = function (exec) {
636
382
  try {
637
383
  return { error: false, value: exec() };
638
384
  } catch (error) {
@@ -664,57 +410,128 @@ Queue$1.prototype = {
664
410
 
665
411
  var queue = Queue$1;
666
412
 
667
- var engineIsBrowser = typeof window == 'object';
413
+ var global$2 = global$8;
668
414
 
669
- var $$2 = _export;
670
- var global$1 = global$e;
671
- var getBuiltIn$1 = getBuiltIn$4;
672
- var call = functionCall;
673
- var NativePromise$1 = nativePromiseConstructor;
674
- var redefine$1 = redefine$3.exports;
675
- var redefineAll = redefineAll$1;
415
+ var promiseNativeConstructor = global$2.Promise;
416
+
417
+ /* global Deno -- Deno case */
418
+
419
+ var engineIsDeno = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
420
+
421
+ var IS_DENO$1 = engineIsDeno;
422
+ var IS_NODE$1 = engineIsNode;
423
+
424
+ var engineIsBrowser = !IS_DENO$1 && !IS_NODE$1
425
+ && typeof window == 'object'
426
+ && typeof document == 'object';
427
+
428
+ var global$1 = global$8;
429
+ var NativePromiseConstructor$4 = promiseNativeConstructor;
430
+ var isCallable$3 = isCallable$6;
431
+ var isForced = isForced_1;
432
+ var inspectSource = inspectSource$2;
433
+ var wellKnownSymbol$3 = wellKnownSymbol$6;
434
+ var IS_BROWSER = engineIsBrowser;
435
+ var IS_DENO = engineIsDeno;
436
+ var V8_VERSION = engineV8Version;
437
+
438
+ NativePromiseConstructor$4 && NativePromiseConstructor$4.prototype;
439
+ var SPECIES = wellKnownSymbol$3('species');
440
+ var SUBCLASSING = false;
441
+ var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$3(global$1.PromiseRejectionEvent);
442
+
443
+ var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
444
+ var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$4);
445
+ var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$4);
446
+ // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
447
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
448
+ // We can't detect it synchronously, so just check versions
449
+ if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
450
+ // We can't use @@species feature detection in V8 since it causes
451
+ // deoptimization and performance degradation
452
+ // https://github.com/zloirock/core-js/issues/679
453
+ if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
454
+ // Detect correctness of subclassing with @@species support
455
+ var promise = new NativePromiseConstructor$4(function (resolve) { resolve(1); });
456
+ var FakePromise = function (exec) {
457
+ exec(function () { /* empty */ }, function () { /* empty */ });
458
+ };
459
+ var constructor = promise.constructor = {};
460
+ constructor[SPECIES] = FakePromise;
461
+ SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
462
+ if (!SUBCLASSING) return true;
463
+ // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
464
+ } return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT$1;
465
+ });
466
+
467
+ var promiseConstructorDetection = {
468
+ CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR$5,
469
+ REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT$1,
470
+ SUBCLASSING: SUBCLASSING
471
+ };
472
+
473
+ var newPromiseCapability$2 = {};
474
+
475
+ var aCallable$4 = aCallable$6;
476
+
477
+ var $TypeError$2 = TypeError;
478
+
479
+ var PromiseCapability = function (C) {
480
+ var resolve, reject;
481
+ this.promise = new C(function ($$resolve, $$reject) {
482
+ if (resolve !== undefined || reject !== undefined) throw $TypeError$2('Bad Promise constructor');
483
+ resolve = $$resolve;
484
+ reject = $$reject;
485
+ });
486
+ this.resolve = aCallable$4(resolve);
487
+ this.reject = aCallable$4(reject);
488
+ };
489
+
490
+ // `NewPromiseCapability` abstract operation
491
+ // https://tc39.es/ecma262/#sec-newpromisecapability
492
+ newPromiseCapability$2.f = function (C) {
493
+ return new PromiseCapability(C);
494
+ };
495
+
496
+ var $$7 = _export;
497
+ var IS_NODE = engineIsNode;
498
+ var global = global$8;
499
+ var call$6 = functionCall;
500
+ var defineBuiltIn$2 = defineBuiltIn$3;
676
501
  var setPrototypeOf = objectSetPrototypeOf;
677
502
  var setToStringTag = setToStringTag$1;
678
503
  var setSpecies = setSpecies$1;
679
- var aCallable = aCallable$4;
680
- var isCallable$1 = isCallable$5;
681
- var isObject = isObject$2;
504
+ var aCallable$3 = aCallable$6;
505
+ var isCallable$2 = isCallable$6;
506
+ var isObject$1 = isObject$2;
682
507
  var anInstance = anInstance$1;
683
- var inspectSource = inspectSource$2;
684
- var iterate = iterate$1;
685
- var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
686
508
  var speciesConstructor$1 = speciesConstructor$2;
687
509
  var task = task$1.set;
688
510
  var microtask = microtask$1;
689
- var promiseResolve$1 = promiseResolve$2;
690
511
  var hostReportErrors = hostReportErrors$1;
691
- var newPromiseCapabilityModule = newPromiseCapability$2;
692
- var perform = perform$1;
512
+ var perform$2 = perform$3;
693
513
  var Queue = queue;
694
514
  var InternalStateModule = internalState;
695
- var isForced = isForced_1;
696
- var wellKnownSymbol = wellKnownSymbol$8;
697
- var IS_BROWSER = engineIsBrowser;
698
- var IS_NODE = engineIsNode;
699
- var V8_VERSION = engineV8Version;
515
+ var NativePromiseConstructor$3 = promiseNativeConstructor;
516
+ var PromiseConstructorDetection = promiseConstructorDetection;
517
+ var newPromiseCapabilityModule$3 = newPromiseCapability$2;
700
518
 
701
- var SPECIES = wellKnownSymbol('species');
702
519
  var PROMISE = 'Promise';
703
-
704
- var getInternalState = InternalStateModule.getterFor(PROMISE);
705
- var setInternalState = InternalStateModule.set;
520
+ var FORCED_PROMISE_CONSTRUCTOR$4 = PromiseConstructorDetection.CONSTRUCTOR;
521
+ var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
522
+ var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
706
523
  var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
707
- var NativePromisePrototype = NativePromise$1 && NativePromise$1.prototype;
708
- var PromiseConstructor = NativePromise$1;
709
- var PromisePrototype = NativePromisePrototype;
710
- var TypeError$1 = global$1.TypeError;
711
- var document = global$1.document;
712
- var process = global$1.process;
713
- var newPromiseCapability = newPromiseCapabilityModule.f;
714
- var newGenericPromiseCapability = newPromiseCapability;
715
-
716
- var DISPATCH_EVENT = !!(document && document.createEvent && global$1.dispatchEvent);
717
- var NATIVE_REJECTION_EVENT = isCallable$1(global$1.PromiseRejectionEvent);
524
+ var setInternalState = InternalStateModule.set;
525
+ var NativePromisePrototype$2 = NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
526
+ var PromiseConstructor = NativePromiseConstructor$3;
527
+ var PromisePrototype = NativePromisePrototype$2;
528
+ var TypeError$1 = global.TypeError;
529
+ var document$1 = global.document;
530
+ var process = global.process;
531
+ var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
532
+ var newGenericPromiseCapability = newPromiseCapability$1;
533
+
534
+ var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global.dispatchEvent);
718
535
  var UNHANDLED_REJECTION = 'unhandledrejection';
719
536
  var REJECTION_HANDLED = 'rejectionhandled';
720
537
  var PENDING = 0;
@@ -722,42 +539,13 @@ var FULFILLED = 1;
722
539
  var REJECTED = 2;
723
540
  var HANDLED = 1;
724
541
  var UNHANDLED = 2;
725
- var SUBCLASSING = false;
726
542
 
727
543
  var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
728
544
 
729
- var FORCED = isForced(PROMISE, function () {
730
- var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor);
731
- var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor);
732
- // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
733
- // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
734
- // We can't detect it synchronously, so just check versions
735
- if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
736
- // We can't use @@species feature detection in V8 since it causes
737
- // deoptimization and performance degradation
738
- // https://github.com/zloirock/core-js/issues/679
739
- if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false;
740
- // Detect correctness of subclassing with @@species support
741
- var promise = new PromiseConstructor(function (resolve) { resolve(1); });
742
- var FakePromise = function (exec) {
743
- exec(function () { /* empty */ }, function () { /* empty */ });
744
- };
745
- var constructor = promise.constructor = {};
746
- constructor[SPECIES] = FakePromise;
747
- SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
748
- if (!SUBCLASSING) return true;
749
- // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
750
- return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT;
751
- });
752
-
753
- var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {
754
- PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });
755
- });
756
-
757
545
  // helpers
758
546
  var isThenable = function (it) {
759
547
  var then;
760
- return isObject(it) && isCallable$1(then = it.then) ? then : false;
548
+ return isObject$1(it) && isCallable$2(then = it.then) ? then : false;
761
549
  };
762
550
 
763
551
  var callReaction = function (reaction, state) {
@@ -786,7 +574,7 @@ var callReaction = function (reaction, state) {
786
574
  if (result === reaction.promise) {
787
575
  reject(TypeError$1('Promise-chain cycle'));
788
576
  } else if (then = isThenable(result)) {
789
- call(then, result, resolve, reject);
577
+ call$6(then, result, resolve, reject);
790
578
  } else resolve(result);
791
579
  } else reject(value);
792
580
  } catch (error) {
@@ -812,24 +600,24 @@ var notify = function (state, isReject) {
812
600
  var dispatchEvent = function (name, promise, reason) {
813
601
  var event, handler;
814
602
  if (DISPATCH_EVENT) {
815
- event = document.createEvent('Event');
603
+ event = document$1.createEvent('Event');
816
604
  event.promise = promise;
817
605
  event.reason = reason;
818
606
  event.initEvent(name, false, true);
819
- global$1.dispatchEvent(event);
607
+ global.dispatchEvent(event);
820
608
  } else event = { promise: promise, reason: reason };
821
- if (!NATIVE_REJECTION_EVENT && (handler = global$1['on' + name])) handler(event);
609
+ if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);
822
610
  else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
823
611
  };
824
612
 
825
613
  var onUnhandled = function (state) {
826
- call(task, global$1, function () {
614
+ call$6(task, global, function () {
827
615
  var promise = state.facade;
828
616
  var value = state.value;
829
617
  var IS_UNHANDLED = isUnhandled(state);
830
618
  var result;
831
619
  if (IS_UNHANDLED) {
832
- result = perform(function () {
620
+ result = perform$2(function () {
833
621
  if (IS_NODE) {
834
622
  process.emit('unhandledRejection', value, promise);
835
623
  } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
@@ -846,7 +634,7 @@ var isUnhandled = function (state) {
846
634
  };
847
635
 
848
636
  var onHandleUnhandled = function (state) {
849
- call(task, global$1, function () {
637
+ call$6(task, global, function () {
850
638
  var promise = state.facade;
851
639
  if (IS_NODE) {
852
640
  process.emit('rejectionHandled', promise);
@@ -854,7 +642,7 @@ var onHandleUnhandled = function (state) {
854
642
  });
855
643
  };
856
644
 
857
- var bind = function (fn, state, unwrap) {
645
+ var bind$1 = function (fn, state, unwrap) {
858
646
  return function (value) {
859
647
  fn(state, value, unwrap);
860
648
  };
@@ -880,9 +668,9 @@ var internalResolve = function (state, value, unwrap) {
880
668
  microtask(function () {
881
669
  var wrapper = { done: false };
882
670
  try {
883
- call(then, value,
884
- bind(internalResolve, wrapper, state),
885
- bind(internalReject, wrapper, state)
671
+ call$6(then, value,
672
+ bind$1(internalResolve, wrapper, state),
673
+ bind$1(internalReject, wrapper, state)
886
674
  );
887
675
  } catch (error) {
888
676
  internalReject(wrapper, error, state);
@@ -899,20 +687,22 @@ var internalResolve = function (state, value, unwrap) {
899
687
  };
900
688
 
901
689
  // constructor polyfill
902
- if (FORCED) {
690
+ if (FORCED_PROMISE_CONSTRUCTOR$4) {
903
691
  // 25.4.3.1 Promise(executor)
904
692
  PromiseConstructor = function Promise(executor) {
905
693
  anInstance(this, PromisePrototype);
906
- aCallable(executor);
907
- call(Internal, this);
908
- var state = getInternalState(this);
694
+ aCallable$3(executor);
695
+ call$6(Internal, this);
696
+ var state = getInternalPromiseState(this);
909
697
  try {
910
- executor(bind(internalResolve, state), bind(internalReject, state));
698
+ executor(bind$1(internalResolve, state), bind$1(internalReject, state));
911
699
  } catch (error) {
912
700
  internalReject(state, error);
913
701
  }
914
702
  };
703
+
915
704
  PromisePrototype = PromiseConstructor.prototype;
705
+
916
706
  // eslint-disable-next-line no-unused-vars -- required for `.length`
917
707
  Internal = function Promise(executor) {
918
708
  setInternalState(this, {
@@ -926,117 +716,275 @@ if (FORCED) {
926
716
  value: undefined
927
717
  });
928
718
  };
929
- Internal.prototype = redefineAll(PromisePrototype, {
930
- // `Promise.prototype.then` method
931
- // https://tc39.es/ecma262/#sec-promise.prototype.then
932
- // eslint-disable-next-line unicorn/no-thenable -- safe
933
- then: function then(onFulfilled, onRejected) {
934
- var state = getInternalPromiseState(this);
935
- var reaction = newPromiseCapability(speciesConstructor$1(this, PromiseConstructor));
936
- state.parent = true;
937
- reaction.ok = isCallable$1(onFulfilled) ? onFulfilled : true;
938
- reaction.fail = isCallable$1(onRejected) && onRejected;
939
- reaction.domain = IS_NODE ? process.domain : undefined;
940
- if (state.state == PENDING) state.reactions.add(reaction);
941
- else microtask(function () {
942
- callReaction(reaction, state);
943
- });
944
- return reaction.promise;
945
- },
946
- // `Promise.prototype.catch` method
947
- // https://tc39.es/ecma262/#sec-promise.prototype.catch
948
- 'catch': function (onRejected) {
949
- return this.then(undefined, onRejected);
950
- }
719
+
720
+ // `Promise.prototype.then` method
721
+ // https://tc39.es/ecma262/#sec-promise.prototype.then
722
+ Internal.prototype = defineBuiltIn$2(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
723
+ var state = getInternalPromiseState(this);
724
+ var reaction = newPromiseCapability$1(speciesConstructor$1(this, PromiseConstructor));
725
+ state.parent = true;
726
+ reaction.ok = isCallable$2(onFulfilled) ? onFulfilled : true;
727
+ reaction.fail = isCallable$2(onRejected) && onRejected;
728
+ reaction.domain = IS_NODE ? process.domain : undefined;
729
+ if (state.state == PENDING) state.reactions.add(reaction);
730
+ else microtask(function () {
731
+ callReaction(reaction, state);
732
+ });
733
+ return reaction.promise;
951
734
  });
735
+
952
736
  OwnPromiseCapability = function () {
953
737
  var promise = new Internal();
954
- var state = getInternalState(promise);
738
+ var state = getInternalPromiseState(promise);
955
739
  this.promise = promise;
956
- this.resolve = bind(internalResolve, state);
957
- this.reject = bind(internalReject, state);
740
+ this.resolve = bind$1(internalResolve, state);
741
+ this.reject = bind$1(internalReject, state);
958
742
  };
959
- newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
743
+
744
+ newPromiseCapabilityModule$3.f = newPromiseCapability$1 = function (C) {
960
745
  return C === PromiseConstructor || C === PromiseWrapper
961
746
  ? new OwnPromiseCapability(C)
962
747
  : newGenericPromiseCapability(C);
963
748
  };
964
749
 
965
- if (isCallable$1(NativePromise$1) && NativePromisePrototype !== Object.prototype) {
966
- nativeThen = NativePromisePrototype.then;
750
+ if (isCallable$2(NativePromiseConstructor$3) && NativePromisePrototype$2 !== Object.prototype) {
751
+ nativeThen = NativePromisePrototype$2.then;
967
752
 
968
- if (!SUBCLASSING) {
753
+ if (!NATIVE_PROMISE_SUBCLASSING) {
969
754
  // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
970
- redefine$1(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
755
+ defineBuiltIn$2(NativePromisePrototype$2, 'then', function then(onFulfilled, onRejected) {
971
756
  var that = this;
972
757
  return new PromiseConstructor(function (resolve, reject) {
973
- call(nativeThen, that, resolve, reject);
758
+ call$6(nativeThen, that, resolve, reject);
974
759
  }).then(onFulfilled, onRejected);
975
760
  // https://github.com/zloirock/core-js/issues/640
976
761
  }, { unsafe: true });
977
-
978
- // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
979
- redefine$1(NativePromisePrototype, 'catch', PromisePrototype['catch'], { unsafe: true });
980
762
  }
981
763
 
982
764
  // make `.constructor === Promise` work for native promise-based APIs
983
765
  try {
984
- delete NativePromisePrototype.constructor;
766
+ delete NativePromisePrototype$2.constructor;
985
767
  } catch (error) { /* empty */ }
986
768
 
987
769
  // make `instanceof Promise` work for native promise-based APIs
988
770
  if (setPrototypeOf) {
989
- setPrototypeOf(NativePromisePrototype, PromisePrototype);
771
+ setPrototypeOf(NativePromisePrototype$2, PromisePrototype);
990
772
  }
991
773
  }
992
774
  }
993
775
 
994
- $$2({ global: true, wrap: true, forced: FORCED }, {
776
+ $$7({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
995
777
  Promise: PromiseConstructor
996
778
  });
997
779
 
998
780
  setToStringTag(PromiseConstructor, PROMISE, false);
999
781
  setSpecies(PROMISE);
1000
782
 
1001
- PromiseWrapper = getBuiltIn$1(PROMISE);
783
+ var wellKnownSymbol$2 = wellKnownSymbol$6;
784
+ var Iterators$1 = iterators;
1002
785
 
1003
- // statics
1004
- $$2({ target: PROMISE, stat: true, forced: FORCED }, {
1005
- // `Promise.reject` method
1006
- // https://tc39.es/ecma262/#sec-promise.reject
1007
- reject: function reject(r) {
1008
- var capability = newPromiseCapability(this);
1009
- call(capability.reject, undefined, r);
1010
- return capability.promise;
786
+ var ITERATOR$2 = wellKnownSymbol$2('iterator');
787
+ var ArrayPrototype = Array.prototype;
788
+
789
+ // check on default Array iterator
790
+ var isArrayIteratorMethod$1 = function (it) {
791
+ return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
792
+ };
793
+
794
+ var classof = classof$3;
795
+ var getMethod$1 = getMethod$2;
796
+ var isNullOrUndefined = isNullOrUndefined$2;
797
+ var Iterators = iterators;
798
+ var wellKnownSymbol$1 = wellKnownSymbol$6;
799
+
800
+ var ITERATOR$1 = wellKnownSymbol$1('iterator');
801
+
802
+ var getIteratorMethod$2 = function (it) {
803
+ if (!isNullOrUndefined(it)) return getMethod$1(it, ITERATOR$1)
804
+ || getMethod$1(it, '@@iterator')
805
+ || Iterators[classof(it)];
806
+ };
807
+
808
+ var call$5 = functionCall;
809
+ var aCallable$2 = aCallable$6;
810
+ var anObject$3 = anObject$5;
811
+ var tryToString$1 = tryToString$3;
812
+ var getIteratorMethod$1 = getIteratorMethod$2;
813
+
814
+ var $TypeError$1 = TypeError;
815
+
816
+ var getIterator$1 = function (argument, usingIterator) {
817
+ var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
818
+ if (aCallable$2(iteratorMethod)) return anObject$3(call$5(iteratorMethod, argument));
819
+ throw $TypeError$1(tryToString$1(argument) + ' is not iterable');
820
+ };
821
+
822
+ var call$4 = functionCall;
823
+ var anObject$2 = anObject$5;
824
+ var getMethod = getMethod$2;
825
+
826
+ var iteratorClose$1 = function (iterator, kind, value) {
827
+ var innerResult, innerError;
828
+ anObject$2(iterator);
829
+ try {
830
+ innerResult = getMethod(iterator, 'return');
831
+ if (!innerResult) {
832
+ if (kind === 'throw') throw value;
833
+ return value;
834
+ }
835
+ innerResult = call$4(innerResult, iterator);
836
+ } catch (error) {
837
+ innerError = true;
838
+ innerResult = error;
1011
839
  }
1012
- });
840
+ if (kind === 'throw') throw value;
841
+ if (innerError) throw innerResult;
842
+ anObject$2(innerResult);
843
+ return value;
844
+ };
1013
845
 
1014
- $$2({ target: PROMISE, stat: true, forced: FORCED }, {
1015
- // `Promise.resolve` method
1016
- // https://tc39.es/ecma262/#sec-promise.resolve
1017
- resolve: function resolve(x) {
1018
- return promiseResolve$1(this, x);
846
+ var bind = functionBindContext;
847
+ var call$3 = functionCall;
848
+ var anObject$1 = anObject$5;
849
+ var tryToString = tryToString$3;
850
+ var isArrayIteratorMethod = isArrayIteratorMethod$1;
851
+ var lengthOfArrayLike = lengthOfArrayLike$1;
852
+ var isPrototypeOf = objectIsPrototypeOf;
853
+ var getIterator = getIterator$1;
854
+ var getIteratorMethod = getIteratorMethod$2;
855
+ var iteratorClose = iteratorClose$1;
856
+
857
+ var $TypeError = TypeError;
858
+
859
+ var Result = function (stopped, result) {
860
+ this.stopped = stopped;
861
+ this.result = result;
862
+ };
863
+
864
+ var ResultPrototype = Result.prototype;
865
+
866
+ var iterate$2 = function (iterable, unboundFunction, options) {
867
+ var that = options && options.that;
868
+ var AS_ENTRIES = !!(options && options.AS_ENTRIES);
869
+ var IS_RECORD = !!(options && options.IS_RECORD);
870
+ var IS_ITERATOR = !!(options && options.IS_ITERATOR);
871
+ var INTERRUPTED = !!(options && options.INTERRUPTED);
872
+ var fn = bind(unboundFunction, that);
873
+ var iterator, iterFn, index, length, result, next, step;
874
+
875
+ var stop = function (condition) {
876
+ if (iterator) iteratorClose(iterator, 'normal', condition);
877
+ return new Result(true, condition);
878
+ };
879
+
880
+ var callFn = function (value) {
881
+ if (AS_ENTRIES) {
882
+ anObject$1(value);
883
+ return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
884
+ } return INTERRUPTED ? fn(value, stop) : fn(value);
885
+ };
886
+
887
+ if (IS_RECORD) {
888
+ iterator = iterable.iterator;
889
+ } else if (IS_ITERATOR) {
890
+ iterator = iterable;
891
+ } else {
892
+ iterFn = getIteratorMethod(iterable);
893
+ if (!iterFn) throw $TypeError(tryToString(iterable) + ' is not iterable');
894
+ // optimisation for array iterators
895
+ if (isArrayIteratorMethod(iterFn)) {
896
+ for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
897
+ result = callFn(iterable[index]);
898
+ if (result && isPrototypeOf(ResultPrototype, result)) return result;
899
+ } return new Result(false);
900
+ }
901
+ iterator = getIterator(iterable, iterFn);
1019
902
  }
903
+
904
+ next = IS_RECORD ? iterable.next : iterator.next;
905
+ while (!(step = call$3(next, iterator)).done) {
906
+ try {
907
+ result = callFn(step.value);
908
+ } catch (error) {
909
+ iteratorClose(iterator, 'throw', error);
910
+ }
911
+ if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
912
+ } return new Result(false);
913
+ };
914
+
915
+ var wellKnownSymbol = wellKnownSymbol$6;
916
+
917
+ var ITERATOR = wellKnownSymbol('iterator');
918
+ var SAFE_CLOSING = false;
919
+
920
+ try {
921
+ var called = 0;
922
+ var iteratorWithReturn = {
923
+ next: function () {
924
+ return { done: !!called++ };
925
+ },
926
+ 'return': function () {
927
+ SAFE_CLOSING = true;
928
+ }
929
+ };
930
+ iteratorWithReturn[ITERATOR] = function () {
931
+ return this;
932
+ };
933
+ // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
934
+ Array.from(iteratorWithReturn, function () { throw 2; });
935
+ } catch (error) { /* empty */ }
936
+
937
+ var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
938
+ if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
939
+ var ITERATION_SUPPORT = false;
940
+ try {
941
+ var object = {};
942
+ object[ITERATOR] = function () {
943
+ return {
944
+ next: function () {
945
+ return { done: ITERATION_SUPPORT = true };
946
+ }
947
+ };
948
+ };
949
+ exec(object);
950
+ } catch (error) { /* empty */ }
951
+ return ITERATION_SUPPORT;
952
+ };
953
+
954
+ var NativePromiseConstructor$2 = promiseNativeConstructor;
955
+ var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
956
+ var FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;
957
+
958
+ var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCorrectnessOfIteration(function (iterable) {
959
+ NativePromiseConstructor$2.all(iterable).then(undefined, function () { /* empty */ });
1020
960
  });
1021
961
 
1022
- $$2({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
1023
- // `Promise.all` method
1024
- // https://tc39.es/ecma262/#sec-promise.all
962
+ var $$6 = _export;
963
+ var call$2 = functionCall;
964
+ var aCallable$1 = aCallable$6;
965
+ var newPromiseCapabilityModule$2 = newPromiseCapability$2;
966
+ var perform$1 = perform$3;
967
+ var iterate$1 = iterate$2;
968
+ var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
969
+
970
+ // `Promise.all` method
971
+ // https://tc39.es/ecma262/#sec-promise.all
972
+ $$6({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
1025
973
  all: function all(iterable) {
1026
974
  var C = this;
1027
- var capability = newPromiseCapability(C);
975
+ var capability = newPromiseCapabilityModule$2.f(C);
1028
976
  var resolve = capability.resolve;
1029
977
  var reject = capability.reject;
1030
- var result = perform(function () {
1031
- var $promiseResolve = aCallable(C.resolve);
978
+ var result = perform$1(function () {
979
+ var $promiseResolve = aCallable$1(C.resolve);
1032
980
  var values = [];
1033
981
  var counter = 0;
1034
982
  var remaining = 1;
1035
- iterate(iterable, function (promise) {
983
+ iterate$1(iterable, function (promise) {
1036
984
  var index = counter++;
1037
985
  var alreadyCalled = false;
1038
986
  remaining++;
1039
- call($promiseResolve, C, promise).then(function (value) {
987
+ call$2($promiseResolve, C, promise).then(function (value) {
1040
988
  if (alreadyCalled) return;
1041
989
  alreadyCalled = true;
1042
990
  values[index] = value;
@@ -1047,17 +995,53 @@ $$2({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
1047
995
  });
1048
996
  if (result.error) reject(result.value);
1049
997
  return capability.promise;
1050
- },
1051
- // `Promise.race` method
1052
- // https://tc39.es/ecma262/#sec-promise.race
998
+ }
999
+ });
1000
+
1001
+ var $$5 = _export;
1002
+ var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
1003
+ var NativePromiseConstructor$1 = promiseNativeConstructor;
1004
+ var getBuiltIn$2 = getBuiltIn$5;
1005
+ var isCallable$1 = isCallable$6;
1006
+ var defineBuiltIn$1 = defineBuiltIn$3;
1007
+
1008
+ var NativePromisePrototype$1 = NativePromiseConstructor$1 && NativePromiseConstructor$1.prototype;
1009
+
1010
+ // `Promise.prototype.catch` method
1011
+ // https://tc39.es/ecma262/#sec-promise.prototype.catch
1012
+ $$5({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
1013
+ 'catch': function (onRejected) {
1014
+ return this.then(undefined, onRejected);
1015
+ }
1016
+ });
1017
+
1018
+ // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
1019
+ if (isCallable$1(NativePromiseConstructor$1)) {
1020
+ var method$1 = getBuiltIn$2('Promise').prototype['catch'];
1021
+ if (NativePromisePrototype$1['catch'] !== method$1) {
1022
+ defineBuiltIn$1(NativePromisePrototype$1, 'catch', method$1, { unsafe: true });
1023
+ }
1024
+ }
1025
+
1026
+ var $$4 = _export;
1027
+ var call$1 = functionCall;
1028
+ var aCallable = aCallable$6;
1029
+ var newPromiseCapabilityModule$1 = newPromiseCapability$2;
1030
+ var perform = perform$3;
1031
+ var iterate = iterate$2;
1032
+ var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
1033
+
1034
+ // `Promise.race` method
1035
+ // https://tc39.es/ecma262/#sec-promise.race
1036
+ $$4({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
1053
1037
  race: function race(iterable) {
1054
1038
  var C = this;
1055
- var capability = newPromiseCapability(C);
1039
+ var capability = newPromiseCapabilityModule$1.f(C);
1056
1040
  var reject = capability.reject;
1057
1041
  var result = perform(function () {
1058
1042
  var $promiseResolve = aCallable(C.resolve);
1059
1043
  iterate(iterable, function (promise) {
1060
- call($promiseResolve, C, promise).then(capability.resolve, reject);
1044
+ call$1($promiseResolve, C, promise).then(capability.resolve, reject);
1061
1045
  });
1062
1046
  });
1063
1047
  if (result.error) reject(result.value);
@@ -1065,55 +1049,52 @@ $$2({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
1065
1049
  }
1066
1050
  });
1067
1051
 
1068
- var global = global$e;
1069
- var classof = classof$4;
1052
+ var $$3 = _export;
1053
+ var call = functionCall;
1054
+ var newPromiseCapabilityModule = newPromiseCapability$2;
1055
+ var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
1056
+
1057
+ // `Promise.reject` method
1058
+ // https://tc39.es/ecma262/#sec-promise.reject
1059
+ $$3({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
1060
+ reject: function reject(r) {
1061
+ var capability = newPromiseCapabilityModule.f(this);
1062
+ call(capability.reject, undefined, r);
1063
+ return capability.promise;
1064
+ }
1065
+ });
1070
1066
 
1071
- var String$1 = global.String;
1067
+ var anObject = anObject$5;
1068
+ var isObject = isObject$2;
1069
+ var newPromiseCapability = newPromiseCapability$2;
1072
1070
 
1073
- var toString$1 = function (argument) {
1074
- if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
1075
- return String$1(argument);
1071
+ var promiseResolve$2 = function (C, x) {
1072
+ anObject(C);
1073
+ if (isObject(x) && x.constructor === C) return x;
1074
+ var promiseCapability = newPromiseCapability.f(C);
1075
+ var resolve = promiseCapability.resolve;
1076
+ resolve(x);
1077
+ return promiseCapability.promise;
1076
1078
  };
1077
1079
 
1078
- // a string of all valid unicode whitespaces
1079
- var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
1080
- '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
1080
+ var $$2 = _export;
1081
+ var getBuiltIn$1 = getBuiltIn$5;
1082
+ var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
1083
+ var promiseResolve$1 = promiseResolve$2;
1081
1084
 
1082
- var uncurryThis = functionUncurryThis;
1083
- var requireObjectCoercible = requireObjectCoercible$1;
1084
- var toString = toString$1;
1085
- var whitespaces$1 = whitespaces$2;
1086
-
1087
- var replace = uncurryThis(''.replace);
1088
- var whitespace = '[' + whitespaces$1 + ']';
1089
- var ltrim = RegExp('^' + whitespace + whitespace + '*');
1090
- var rtrim = RegExp(whitespace + whitespace + '*$');
1091
-
1092
- // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
1093
- var createMethod = function (TYPE) {
1094
- return function ($this) {
1095
- var string = toString(requireObjectCoercible($this));
1096
- if (TYPE & 1) string = replace(string, ltrim, '');
1097
- if (TYPE & 2) string = replace(string, rtrim, '');
1098
- return string;
1099
- };
1100
- };
1085
+ getBuiltIn$1('Promise');
1101
1086
 
1102
- var stringTrim = {
1103
- // `String.prototype.{ trimLeft, trimStart }` methods
1104
- // https://tc39.es/ecma262/#sec-string.prototype.trimstart
1105
- start: createMethod(1),
1106
- // `String.prototype.{ trimRight, trimEnd }` methods
1107
- // https://tc39.es/ecma262/#sec-string.prototype.trimend
1108
- end: createMethod(2),
1109
- // `String.prototype.trim` method
1110
- // https://tc39.es/ecma262/#sec-string.prototype.trim
1111
- trim: createMethod(3)
1112
- };
1087
+ // `Promise.resolve` method
1088
+ // https://tc39.es/ecma262/#sec-promise.resolve
1089
+ $$2({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
1090
+ resolve: function resolve(x) {
1091
+ return promiseResolve$1(this, x);
1092
+ }
1093
+ });
1113
1094
 
1114
1095
  var PROPER_FUNCTION_NAME = functionName.PROPER;
1115
1096
  var fails$1 = fails$4;
1116
- var whitespaces = whitespaces$2;
1097
+ var whitespaces = whitespaces$1;
1117
1098
 
1118
1099
  var non = '\u200B\u0085\u180E';
1119
1100
 
@@ -1140,18 +1121,20 @@ $$1({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
1140
1121
  });
1141
1122
 
1142
1123
  var $ = _export;
1143
- var NativePromise = nativePromiseConstructor;
1124
+ var NativePromiseConstructor = promiseNativeConstructor;
1144
1125
  var fails = fails$4;
1145
- var getBuiltIn = getBuiltIn$4;
1146
- var isCallable = isCallable$5;
1126
+ var getBuiltIn = getBuiltIn$5;
1127
+ var isCallable = isCallable$6;
1147
1128
  var speciesConstructor = speciesConstructor$2;
1148
1129
  var promiseResolve = promiseResolve$2;
1149
- var redefine = redefine$3.exports;
1130
+ var defineBuiltIn = defineBuiltIn$3;
1131
+
1132
+ var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
1150
1133
 
1151
1134
  // Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829
1152
- var NON_GENERIC = !!NativePromise && fails(function () {
1135
+ var NON_GENERIC = !!NativePromiseConstructor && fails(function () {
1153
1136
  // eslint-disable-next-line unicorn/no-thenable -- required for testing
1154
- NativePromise.prototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });
1137
+ NativePromisePrototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });
1155
1138
  });
1156
1139
 
1157
1140
  // `Promise.prototype.finally` method
@@ -1172,10 +1155,10 @@ $({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {
1172
1155
  });
1173
1156
 
1174
1157
  // makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise#then`
1175
- if (isCallable(NativePromise)) {
1158
+ if (isCallable(NativePromiseConstructor)) {
1176
1159
  var method = getBuiltIn('Promise').prototype['finally'];
1177
- if (NativePromise.prototype['finally'] !== method) {
1178
- redefine(NativePromise.prototype, 'finally', method, { unsafe: true });
1160
+ if (NativePromisePrototype['finally'] !== method) {
1161
+ defineBuiltIn(NativePromisePrototype, 'finally', method, { unsafe: true });
1179
1162
  }
1180
1163
  }
1181
1164
 
@@ -1332,12 +1315,10 @@ const PLACEHOLDER_ICON = `<svg width="80%" height="80%" viewBox="0 0 64 64">
1332
1315
  </svg>`;
1333
1316
 
1334
1317
  const BASE_URL = 'https://icon.resources.vonage.com';
1335
- const ICON_SET_VERSION = '4.0.27';
1318
+ const ICON_SET_VERSION = '4.0.30';
1336
1319
  const PLACEHOLDER_DELAY = 500;
1337
1320
  const PLACEHOLDER_TIMEOUT = 2000;
1338
-
1339
1321
  const baseUrlTemplate = (resource, version) => [BASE_URL, `v${version}`, resource].join('/');
1340
-
1341
1322
  const assertIsValidResponse = ({
1342
1323
  ok,
1343
1324
  headers
@@ -1346,48 +1327,35 @@ const assertIsValidResponse = ({
1346
1327
  throw new Error('Something went wrong');
1347
1328
  }
1348
1329
  };
1349
-
1350
1330
  const extractSvg = response => {
1351
1331
  assertIsValidResponse(response);
1352
1332
  return response.text();
1353
1333
  };
1354
-
1355
1334
  const loadSvg = iconId => fetch(baseUrlTemplate([iconId, 'svg'].join('.'), ICON_SET_VERSION)).then(extractSvg);
1356
-
1357
1335
  const resolveIcon = memoizeWith$1(identity$1, (iconId = '') => iconId.trim() ? loadSvg(iconId) : Promise.resolve(''));
1358
1336
  class Icon extends FoundationElement {
1359
- constructor() {
1360
- super(...arguments);
1361
- this.svg = '';
1362
- }
1363
-
1364
1337
  async typeChanged() {
1365
- this.svg = '';
1338
+ this.svg = undefined;
1366
1339
  let timeout = setTimeout(() => {
1367
1340
  this.svg = PLACEHOLDER_ICON;
1368
1341
  timeout = setTimeout(() => {
1369
1342
  if (this.svg === PLACEHOLDER_ICON) {
1370
- this.svg = '';
1343
+ this.svg = undefined;
1371
1344
  }
1372
1345
  }, PLACEHOLDER_TIMEOUT);
1373
1346
  }, PLACEHOLDER_DELAY);
1374
1347
  await resolveIcon(this.type).then(svg => {
1375
1348
  this.svg = svg;
1376
1349
  }).catch(() => {
1377
- this.svg = '';
1350
+ this.svg = undefined;
1378
1351
  }).finally(() => {
1379
1352
  clearTimeout(timeout);
1380
1353
  });
1381
1354
  }
1382
-
1383
1355
  }
1384
-
1385
1356
  __decorate([attr, __metadata("design:type", String)], Icon.prototype, "connotation", void 0);
1386
-
1387
1357
  __decorate([attr, __metadata("design:type", String)], Icon.prototype, "size", void 0);
1388
-
1389
- __decorate([observable, __metadata("design:type", Object)], Icon.prototype, "svg", void 0);
1390
-
1358
+ __decorate([observable, __metadata("design:type", String)], Icon.prototype, "svg", void 0);
1391
1359
  __decorate([attr, __metadata("design:type", String)], Icon.prototype, "type", void 0);
1392
1360
 
1393
- export { Icon as I, functionApply as f, speciesConstructor$2 as s, toString$1 as t };
1361
+ export { Icon as I };