@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.
Files changed (120) hide show
  1. package/README.md +24 -0
  2. package/accordion/index.js +3 -3
  3. package/accordion-item/index.js +12 -12
  4. package/action-group/index.js +3 -7
  5. package/avatar/index.js +10 -10
  6. package/badge/index.js +9 -9
  7. package/banner/index.js +9 -19
  8. package/breadcrumb/index.js +2 -2
  9. package/breadcrumb-item/index.js +13 -14
  10. package/button/index.js +92 -16
  11. package/calendar/index.js +3 -7
  12. package/calendar-event/index.js +3 -6
  13. package/card/index.js +9 -11
  14. package/checkbox/index.js +11 -12
  15. package/custom-elements.json +49 -49
  16. package/dialog/index.js +9 -25
  17. package/divider/index.js +26 -3
  18. package/elevation/index.js +25 -3
  19. package/fab/index.js +12 -14
  20. package/focus/index.js +4 -4
  21. package/header/index.js +10 -8
  22. package/icon/index.js +3 -5
  23. package/index.js +24 -22
  24. package/layout/index.js +2 -2
  25. package/lib/accordion-item/index.d.ts +0 -2
  26. package/lib/avatar/index.d.ts +0 -1
  27. package/lib/badge/index.d.ts +0 -1
  28. package/lib/banner/index.d.ts +0 -1
  29. package/lib/breadcrumb-item/index.d.ts +0 -2
  30. package/lib/button/index.d.ts +1 -4
  31. package/lib/card/index.d.ts +0 -2
  32. package/lib/checkbox/index.d.ts +0 -2
  33. package/lib/components.d.ts +1 -1
  34. package/lib/dialog/index.d.ts +0 -3
  35. package/lib/fab/index.d.ts +0 -2
  36. package/lib/header/index.d.ts +0 -1
  37. package/lib/listbox/index.d.ts +1 -4
  38. package/lib/menu/index.d.ts +0 -2
  39. package/lib/menu-item/index.d.ts +0 -1
  40. package/lib/nav-disclosure/index.d.ts +0 -2
  41. package/lib/nav-item/index.d.ts +0 -2
  42. package/lib/note/note.template.d.ts +0 -1
  43. package/lib/number-field/index.d.ts +0 -2
  44. package/lib/{listbox-option → option}/index.d.ts +0 -2
  45. package/lib/{listbox-option/listbox-option.d.ts → option/option.d.ts} +0 -0
  46. package/lib/{listbox-option/listbox-option.template.d.ts → option/option.template.d.ts} +1 -1
  47. package/lib/popup/index.d.ts +0 -2
  48. package/lib/radio/index.d.ts +0 -1
  49. package/lib/slider/index.d.ts +0 -1
  50. package/lib/switch/index.d.ts +0 -2
  51. package/lib/text-area/index.d.ts +0 -2
  52. package/lib/text-field/index.d.ts +0 -2
  53. package/lib/text-field/text-field.template.d.ts +0 -1
  54. package/lib/tooltip/index.d.ts +0 -1
  55. package/listbox/index.js +14 -18
  56. package/menu/index.js +12 -26
  57. package/menu-item/index.js +82 -13
  58. package/nav/index.js +2 -2
  59. package/nav-disclosure/index.js +11 -13
  60. package/nav-item/index.js +11 -13
  61. package/note/index.js +10 -10
  62. package/number-field/index.js +14 -15
  63. package/option/index.js +75 -0
  64. package/package.json +3 -2
  65. package/popup/index.js +57 -20
  66. package/progress/index.js +3 -7
  67. package/progress-ring/index.js +3 -3
  68. package/radio/index.js +11 -6
  69. package/radio-group/index.js +3 -3
  70. package/shared/affix.js +0 -1
  71. package/shared/anchor.js +1 -1
  72. package/shared/apply-mixins.js +1 -1
  73. package/shared/base-progress.js +1 -1
  74. package/shared/breadcrumb-item.js +1 -1
  75. package/shared/button.js +18 -195
  76. package/shared/button2.js +200 -0
  77. package/shared/calendar-event.js +1 -1
  78. package/shared/design-system/index.d.ts +1 -1
  79. package/shared/{index4.js → divider.js} +2 -24
  80. package/shared/elevation.js +10 -0
  81. package/shared/es.object.assign.js +1 -59
  82. package/shared/es.promise.resolve.js +944 -0
  83. package/shared/es.regexp.to-string.js +1 -2
  84. package/shared/focus.js +9 -3
  85. package/shared/focus2.js +3 -9
  86. package/shared/form-associated.js +1 -1
  87. package/shared/form-elements.js +2 -3
  88. package/shared/icon.js +9 -1098
  89. package/shared/index.js +3673 -5
  90. package/shared/index2.js +6 -104
  91. package/shared/{index5.js → listbox-option.js} +11 -71
  92. package/shared/{index7.js → menu-item.js} +13 -85
  93. package/shared/patterns/form-elements/form-elements.d.ts +2 -2
  94. package/shared/{index6.js → popup.js} +3 -43
  95. package/shared/radio.js +1 -1
  96. package/shared/ref.js +1 -1
  97. package/shared/slotted.js +1 -1
  98. package/shared/string-trim.js +1 -2
  99. package/shared/text-anchor.template.js +1 -1
  100. package/shared/utils/index.d.ts +1 -0
  101. package/side-drawer/index.js +3 -7
  102. package/slider/index.js +10 -10
  103. package/styles/core/all.css +1 -1
  104. package/styles/core/theme.css +1 -1
  105. package/styles/core/typography.css +1 -1
  106. package/styles/tokens/theme-dark.css +4 -4
  107. package/styles/tokens/theme-light.css +4 -4
  108. package/switch/index.js +11 -11
  109. package/text-anchor/index.js +4 -8
  110. package/text-area/index.js +11 -12
  111. package/text-field/index.js +11 -12
  112. package/tooltip/index.js +11 -27
  113. package/vivid.api.json +11 -189
  114. package/listbox-option/index.js +0 -22
  115. package/shared/export.js +0 -1017
  116. package/shared/index3.js +0 -31
  117. package/shared/iterators.js +0 -61
  118. package/shared/object-keys.js +0 -13
  119. package/shared/to-string.js +0 -51
  120. package/shared/web.dom-collections.iterator.js +0 -472
package/shared/icon.js CHANGED
@@ -1,1099 +1,10 @@
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';
1
+ import { p as promiseNativeConstructor, s as speciesConstructor$1, a as promiseResolve$1 } from './es.promise.resolve.js';
2
+ import { U as functionName, s as fails$2, E as _export, f as getBuiltIn$1, r as isCallable$1, G as defineBuiltIn$1, F as FoundationElement, _ as __decorate, a as attr, b as __metadata, V as observable } from './index.js';
4
3
  import { w as whitespaces$1, s as stringTrim } from './string-trim.js';
5
- import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, o as observable } from './index.js';
6
4
  import { _ as _curry1, a as _curry2, b as _has } from './_has.js';
7
5
 
8
- var classof$2 = classofRaw;
9
- var global$7 = global$8;
10
-
11
- var engineIsNode = classof$2(global$7.process) == 'process';
12
-
13
- var getBuiltIn$4 = getBuiltIn$5;
14
- var definePropertyModule = objectDefineProperty;
15
- var wellKnownSymbol$5 = wellKnownSymbol$6;
16
- var DESCRIPTORS = descriptors;
17
-
18
- var SPECIES$2 = wellKnownSymbol$5('species');
19
-
20
- var setSpecies$1 = function (CONSTRUCTOR_NAME) {
21
- var Constructor = getBuiltIn$4(CONSTRUCTOR_NAME);
22
- var defineProperty = definePropertyModule.f;
23
-
24
- if (DESCRIPTORS && Constructor && !Constructor[SPECIES$2]) {
25
- defineProperty(Constructor, SPECIES$2, {
26
- configurable: true,
27
- get: function () { return this; }
28
- });
29
- }
30
- };
31
-
32
- var isPrototypeOf$1 = objectIsPrototypeOf;
33
-
34
- var $TypeError$5 = TypeError;
35
-
36
- var anInstance$1 = function (it, Prototype) {
37
- if (isPrototypeOf$1(Prototype, it)) return it;
38
- throw $TypeError$5('Incorrect invocation');
39
- };
40
-
41
- var uncurryThis$2 = functionUncurryThis;
42
- var fails$3 = fails$4;
43
- var isCallable$5 = isCallable$6;
44
- var classof$1 = classof$3;
45
- var getBuiltIn$3 = getBuiltIn$5;
46
- var inspectSource$1 = inspectSource$2;
47
-
48
- var noop = function () { /* empty */ };
49
- var empty = [];
50
- var construct = getBuiltIn$3('Reflect', 'construct');
51
- var constructorRegExp = /^\s*(?:class|function)\b/;
52
- var exec = uncurryThis$2(constructorRegExp.exec);
53
- var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
54
-
55
- var isConstructorModern = function isConstructor(argument) {
56
- if (!isCallable$5(argument)) return false;
57
- try {
58
- construct(noop, empty, argument);
59
- return true;
60
- } catch (error) {
61
- return false;
62
- }
63
- };
64
-
65
- var isConstructorLegacy = function isConstructor(argument) {
66
- if (!isCallable$5(argument)) return false;
67
- switch (classof$1(argument)) {
68
- case 'AsyncFunction':
69
- case 'GeneratorFunction':
70
- case 'AsyncGeneratorFunction': return false;
71
- }
72
- try {
73
- // we can't check .prototype since constructors produced by .bind haven't it
74
- // `Function#toString` throws on some built-it function in some legacy engines
75
- // (for example, `DOMQuad` and similar in FF41-)
76
- return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource$1(argument));
77
- } catch (error) {
78
- return true;
79
- }
80
- };
81
-
82
- isConstructorLegacy.sham = true;
83
-
84
- // `IsConstructor` abstract operation
85
- // https://tc39.es/ecma262/#sec-isconstructor
86
- var isConstructor$1 = !construct || fails$3(function () {
87
- var called;
88
- return isConstructorModern(isConstructorModern.call)
89
- || !isConstructorModern(Object)
90
- || !isConstructorModern(function () { called = true; })
91
- || called;
92
- }) ? isConstructorLegacy : isConstructorModern;
93
-
94
- var isConstructor = isConstructor$1;
95
- var tryToString$2 = tryToString$3;
96
-
97
- var $TypeError$4 = TypeError;
98
-
99
- // `Assert: IsConstructor(argument) is true`
100
- var aConstructor$1 = function (argument) {
101
- if (isConstructor(argument)) return argument;
102
- throw $TypeError$4(tryToString$2(argument) + ' is not a constructor');
103
- };
104
-
105
- var anObject$4 = anObject$5;
106
- var aConstructor = aConstructor$1;
107
- var isNullOrUndefined$1 = isNullOrUndefined$2;
108
- var wellKnownSymbol$4 = wellKnownSymbol$6;
109
-
110
- var SPECIES$1 = wellKnownSymbol$4('species');
111
-
112
- // `SpeciesConstructor` abstract operation
113
- // https://tc39.es/ecma262/#sec-speciesconstructor
114
- var speciesConstructor$2 = function (O, defaultConstructor) {
115
- var C = anObject$4(O).constructor;
116
- var S;
117
- return C === undefined || isNullOrUndefined$1(S = anObject$4(C)[SPECIES$1]) ? defaultConstructor : aConstructor(S);
118
- };
119
-
120
- var NATIVE_BIND$1 = functionBindNative;
121
-
122
- var FunctionPrototype = Function.prototype;
123
- var apply$1 = FunctionPrototype.apply;
124
- var call$7 = FunctionPrototype.call;
125
-
126
- // eslint-disable-next-line es/no-reflect -- safe
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);
129
- });
130
-
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);
136
-
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
- };
144
-
145
- var uncurryThis = functionUncurryThis;
146
-
147
- var arraySlice$1 = uncurryThis([].slice);
148
-
149
- var $TypeError$3 = TypeError;
150
-
151
- var validateArgumentsLength$1 = function (passed, required) {
152
- if (passed < required) throw $TypeError$3('Not enough arguments');
153
- return passed;
154
- };
155
-
156
- var userAgent$2 = engineUserAgent;
157
-
158
- var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
159
-
160
- var global$6 = global$8;
161
- var apply = functionApply;
162
- var bind$3 = functionBindContext;
163
- var isCallable$4 = isCallable$6;
164
- var hasOwn = hasOwnProperty_1;
165
- var fails$2 = fails$4;
166
- var html = html$1;
167
- var arraySlice = arraySlice$1;
168
- var createElement = documentCreateElement;
169
- var validateArgumentsLength = validateArgumentsLength$1;
170
- var IS_IOS$1 = engineIsIos;
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;
180
- var counter = 0;
181
- var queue$1 = {};
182
- var ONREADYSTATECHANGE = 'onreadystatechange';
183
- var $location, defer, channel, port;
184
-
185
- try {
186
- // Deno throws a ReferenceError on `location` access without `--location` flag
187
- $location = global$6.location;
188
- } catch (error) { /* empty */ }
189
-
190
- var run = function (id) {
191
- if (hasOwn(queue$1, id)) {
192
- var fn = queue$1[id];
193
- delete queue$1[id];
194
- fn();
195
- }
196
- };
197
-
198
- var runner = function (id) {
199
- return function () {
200
- run(id);
201
- };
202
- };
203
-
204
- var listener = function (event) {
205
- run(event.data);
206
- };
207
-
208
- var post = function (id) {
209
- // old engines have not location.origin
210
- global$6.postMessage(String$1(id), $location.protocol + '//' + $location.host);
211
- };
212
-
213
- // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
214
- if (!set || !clear) {
215
- set = function setImmediate(handler) {
216
- validateArgumentsLength(arguments.length, 1);
217
- var fn = isCallable$4(handler) ? handler : Function$1(handler);
218
- var args = arraySlice(arguments, 1);
219
- queue$1[++counter] = function () {
220
- apply(fn, undefined, args);
221
- };
222
- defer(counter);
223
- return counter;
224
- };
225
- clear = function clearImmediate(id) {
226
- delete queue$1[id];
227
- };
228
- // Node.js 0.8-
229
- if (IS_NODE$3) {
230
- defer = function (id) {
231
- process$2.nextTick(runner(id));
232
- };
233
- // Sphere (JS game engine) Dispatch API
234
- } else if (Dispatch && Dispatch.now) {
235
- defer = function (id) {
236
- Dispatch.now(runner(id));
237
- };
238
- // Browsers with MessageChannel, includes WebWorkers
239
- // except iOS - https://github.com/zloirock/core-js/issues/624
240
- } else if (MessageChannel && !IS_IOS$1) {
241
- channel = new MessageChannel();
242
- port = channel.port2;
243
- channel.port1.onmessage = listener;
244
- defer = bind$3(port.postMessage, port);
245
- // Browsers with postMessage, skip WebWorkers
246
- // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
247
- } else if (
248
- global$6.addEventListener &&
249
- isCallable$4(global$6.postMessage) &&
250
- !global$6.importScripts &&
251
- $location && $location.protocol !== 'file:' &&
252
- !fails$2(post)
253
- ) {
254
- defer = post;
255
- global$6.addEventListener('message', listener, false);
256
- // IE8-
257
- } else if (ONREADYSTATECHANGE in createElement('script')) {
258
- defer = function (id) {
259
- html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
260
- html.removeChild(this);
261
- run(id);
262
- };
263
- };
264
- // Rest old browsers
265
- } else {
266
- defer = function (id) {
267
- setTimeout(runner(id), 0);
268
- };
269
- }
270
- }
271
-
272
- var task$1 = {
273
- set: set,
274
- clear: clear
275
- };
276
-
277
- var userAgent$1 = engineUserAgent;
278
- var global$5 = global$8;
279
-
280
- var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && global$5.Pebble !== undefined;
281
-
282
- var userAgent = engineUserAgent;
283
-
284
- var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
285
-
286
- var global$4 = global$8;
287
- var bind$2 = functionBindContext;
288
- var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
289
- var macrotask = task$1.set;
290
- var IS_IOS = engineIsIos;
291
- var IS_IOS_PEBBLE = engineIsIosPebble;
292
- var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
293
- var IS_NODE$2 = engineIsNode;
294
-
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;
299
- // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
300
- var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$4, 'queueMicrotask');
301
- var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
302
-
303
- var flush, head, last, notify$1, toggle, node, promise, then;
304
-
305
- // modern engines have queueMicrotask method
306
- if (!queueMicrotask) {
307
- flush = function () {
308
- var parent, fn;
309
- if (IS_NODE$2 && (parent = process$1.domain)) parent.exit();
310
- while (head) {
311
- fn = head.fn;
312
- head = head.next;
313
- try {
314
- fn();
315
- } catch (error) {
316
- if (head) notify$1();
317
- else last = undefined;
318
- throw error;
319
- }
320
- } last = undefined;
321
- if (parent) parent.enter();
322
- };
323
-
324
- // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
325
- // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
326
- if (!IS_IOS && !IS_NODE$2 && !IS_WEBOS_WEBKIT && MutationObserver && document$2) {
327
- toggle = true;
328
- node = document$2.createTextNode('');
329
- new MutationObserver(flush).observe(node, { characterData: true });
330
- notify$1 = function () {
331
- node.data = toggle = !toggle;
332
- };
333
- // environments with maybe non-completely correct, but existent Promise
334
- } else if (!IS_IOS_PEBBLE && Promise$1 && Promise$1.resolve) {
335
- // Promise.resolve without an argument throws an error in LG WebOS 2
336
- promise = Promise$1.resolve(undefined);
337
- // workaround of WebKit ~ iOS Safari 10.1 bug
338
- promise.constructor = Promise$1;
339
- then = bind$2(promise.then, promise);
340
- notify$1 = function () {
341
- then(flush);
342
- };
343
- // Node.js without promises
344
- } else if (IS_NODE$2) {
345
- notify$1 = function () {
346
- process$1.nextTick(flush);
347
- };
348
- // for other environments - macrotask based on:
349
- // - setImmediate
350
- // - MessageChannel
351
- // - window.postMessage
352
- // - onreadystatechange
353
- // - setTimeout
354
- } else {
355
- // strange IE + webpack dev server bug - use .bind(global)
356
- macrotask = bind$2(macrotask, global$4);
357
- notify$1 = function () {
358
- macrotask(flush);
359
- };
360
- }
361
- }
362
-
363
- var microtask$1 = queueMicrotask || function (fn) {
364
- var task = { fn: fn, next: undefined };
365
- if (last) last.next = task;
366
- if (!head) {
367
- head = task;
368
- notify$1();
369
- } last = task;
370
- };
371
-
372
- var global$3 = global$8;
373
-
374
- var hostReportErrors$1 = function (a, b) {
375
- var console = global$3.console;
376
- if (console && console.error) {
377
- arguments.length == 1 ? console.error(a) : console.error(a, b);
378
- }
379
- };
380
-
381
- var perform$3 = function (exec) {
382
- try {
383
- return { error: false, value: exec() };
384
- } catch (error) {
385
- return { error: true, value: error };
386
- }
387
- };
388
-
389
- var Queue$1 = function () {
390
- this.head = null;
391
- this.tail = null;
392
- };
393
-
394
- Queue$1.prototype = {
395
- add: function (item) {
396
- var entry = { item: item, next: null };
397
- if (this.head) this.tail.next = entry;
398
- else this.head = entry;
399
- this.tail = entry;
400
- },
401
- get: function () {
402
- var entry = this.head;
403
- if (entry) {
404
- this.head = entry.next;
405
- if (this.tail === entry) this.tail = null;
406
- return entry.item;
407
- }
408
- }
409
- };
410
-
411
- var queue = Queue$1;
412
-
413
- var global$2 = global$8;
414
-
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;
501
- var setPrototypeOf = objectSetPrototypeOf;
502
- var setToStringTag = setToStringTag$1;
503
- var setSpecies = setSpecies$1;
504
- var aCallable$3 = aCallable$6;
505
- var isCallable$2 = isCallable$6;
506
- var isObject$1 = isObject$2;
507
- var anInstance = anInstance$1;
508
- var speciesConstructor$1 = speciesConstructor$2;
509
- var task = task$1.set;
510
- var microtask = microtask$1;
511
- var hostReportErrors = hostReportErrors$1;
512
- var perform$2 = perform$3;
513
- var Queue = queue;
514
- var InternalStateModule = internalState;
515
- var NativePromiseConstructor$3 = promiseNativeConstructor;
516
- var PromiseConstructorDetection = promiseConstructorDetection;
517
- var newPromiseCapabilityModule$3 = newPromiseCapability$2;
518
-
519
- var PROMISE = 'Promise';
520
- var FORCED_PROMISE_CONSTRUCTOR$4 = PromiseConstructorDetection.CONSTRUCTOR;
521
- var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
522
- var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
523
- var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
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);
535
- var UNHANDLED_REJECTION = 'unhandledrejection';
536
- var REJECTION_HANDLED = 'rejectionhandled';
537
- var PENDING = 0;
538
- var FULFILLED = 1;
539
- var REJECTED = 2;
540
- var HANDLED = 1;
541
- var UNHANDLED = 2;
542
-
543
- var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
544
-
545
- // helpers
546
- var isThenable = function (it) {
547
- var then;
548
- return isObject$1(it) && isCallable$2(then = it.then) ? then : false;
549
- };
550
-
551
- var callReaction = function (reaction, state) {
552
- var value = state.value;
553
- var ok = state.state == FULFILLED;
554
- var handler = ok ? reaction.ok : reaction.fail;
555
- var resolve = reaction.resolve;
556
- var reject = reaction.reject;
557
- var domain = reaction.domain;
558
- var result, then, exited;
559
- try {
560
- if (handler) {
561
- if (!ok) {
562
- if (state.rejection === UNHANDLED) onHandleUnhandled(state);
563
- state.rejection = HANDLED;
564
- }
565
- if (handler === true) result = value;
566
- else {
567
- if (domain) domain.enter();
568
- result = handler(value); // can throw
569
- if (domain) {
570
- domain.exit();
571
- exited = true;
572
- }
573
- }
574
- if (result === reaction.promise) {
575
- reject(TypeError$1('Promise-chain cycle'));
576
- } else if (then = isThenable(result)) {
577
- call$6(then, result, resolve, reject);
578
- } else resolve(result);
579
- } else reject(value);
580
- } catch (error) {
581
- if (domain && !exited) domain.exit();
582
- reject(error);
583
- }
584
- };
585
-
586
- var notify = function (state, isReject) {
587
- if (state.notified) return;
588
- state.notified = true;
589
- microtask(function () {
590
- var reactions = state.reactions;
591
- var reaction;
592
- while (reaction = reactions.get()) {
593
- callReaction(reaction, state);
594
- }
595
- state.notified = false;
596
- if (isReject && !state.rejection) onUnhandled(state);
597
- });
598
- };
599
-
600
- var dispatchEvent = function (name, promise, reason) {
601
- var event, handler;
602
- if (DISPATCH_EVENT) {
603
- event = document$1.createEvent('Event');
604
- event.promise = promise;
605
- event.reason = reason;
606
- event.initEvent(name, false, true);
607
- global.dispatchEvent(event);
608
- } else event = { promise: promise, reason: reason };
609
- if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);
610
- else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
611
- };
612
-
613
- var onUnhandled = function (state) {
614
- call$6(task, global, function () {
615
- var promise = state.facade;
616
- var value = state.value;
617
- var IS_UNHANDLED = isUnhandled(state);
618
- var result;
619
- if (IS_UNHANDLED) {
620
- result = perform$2(function () {
621
- if (IS_NODE) {
622
- process.emit('unhandledRejection', value, promise);
623
- } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
624
- });
625
- // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
626
- state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
627
- if (result.error) throw result.value;
628
- }
629
- });
630
- };
631
-
632
- var isUnhandled = function (state) {
633
- return state.rejection !== HANDLED && !state.parent;
634
- };
635
-
636
- var onHandleUnhandled = function (state) {
637
- call$6(task, global, function () {
638
- var promise = state.facade;
639
- if (IS_NODE) {
640
- process.emit('rejectionHandled', promise);
641
- } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
642
- });
643
- };
644
-
645
- var bind$1 = function (fn, state, unwrap) {
646
- return function (value) {
647
- fn(state, value, unwrap);
648
- };
649
- };
650
-
651
- var internalReject = function (state, value, unwrap) {
652
- if (state.done) return;
653
- state.done = true;
654
- if (unwrap) state = unwrap;
655
- state.value = value;
656
- state.state = REJECTED;
657
- notify(state, true);
658
- };
659
-
660
- var internalResolve = function (state, value, unwrap) {
661
- if (state.done) return;
662
- state.done = true;
663
- if (unwrap) state = unwrap;
664
- try {
665
- if (state.facade === value) throw TypeError$1("Promise can't be resolved itself");
666
- var then = isThenable(value);
667
- if (then) {
668
- microtask(function () {
669
- var wrapper = { done: false };
670
- try {
671
- call$6(then, value,
672
- bind$1(internalResolve, wrapper, state),
673
- bind$1(internalReject, wrapper, state)
674
- );
675
- } catch (error) {
676
- internalReject(wrapper, error, state);
677
- }
678
- });
679
- } else {
680
- state.value = value;
681
- state.state = FULFILLED;
682
- notify(state, false);
683
- }
684
- } catch (error) {
685
- internalReject({ done: false }, error, state);
686
- }
687
- };
688
-
689
- // constructor polyfill
690
- if (FORCED_PROMISE_CONSTRUCTOR$4) {
691
- // 25.4.3.1 Promise(executor)
692
- PromiseConstructor = function Promise(executor) {
693
- anInstance(this, PromisePrototype);
694
- aCallable$3(executor);
695
- call$6(Internal, this);
696
- var state = getInternalPromiseState(this);
697
- try {
698
- executor(bind$1(internalResolve, state), bind$1(internalReject, state));
699
- } catch (error) {
700
- internalReject(state, error);
701
- }
702
- };
703
-
704
- PromisePrototype = PromiseConstructor.prototype;
705
-
706
- // eslint-disable-next-line no-unused-vars -- required for `.length`
707
- Internal = function Promise(executor) {
708
- setInternalState(this, {
709
- type: PROMISE,
710
- done: false,
711
- notified: false,
712
- parent: false,
713
- reactions: new Queue(),
714
- rejection: false,
715
- state: PENDING,
716
- value: undefined
717
- });
718
- };
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;
734
- });
735
-
736
- OwnPromiseCapability = function () {
737
- var promise = new Internal();
738
- var state = getInternalPromiseState(promise);
739
- this.promise = promise;
740
- this.resolve = bind$1(internalResolve, state);
741
- this.reject = bind$1(internalReject, state);
742
- };
743
-
744
- newPromiseCapabilityModule$3.f = newPromiseCapability$1 = function (C) {
745
- return C === PromiseConstructor || C === PromiseWrapper
746
- ? new OwnPromiseCapability(C)
747
- : newGenericPromiseCapability(C);
748
- };
749
-
750
- if (isCallable$2(NativePromiseConstructor$3) && NativePromisePrototype$2 !== Object.prototype) {
751
- nativeThen = NativePromisePrototype$2.then;
752
-
753
- if (!NATIVE_PROMISE_SUBCLASSING) {
754
- // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
755
- defineBuiltIn$2(NativePromisePrototype$2, 'then', function then(onFulfilled, onRejected) {
756
- var that = this;
757
- return new PromiseConstructor(function (resolve, reject) {
758
- call$6(nativeThen, that, resolve, reject);
759
- }).then(onFulfilled, onRejected);
760
- // https://github.com/zloirock/core-js/issues/640
761
- }, { unsafe: true });
762
- }
763
-
764
- // make `.constructor === Promise` work for native promise-based APIs
765
- try {
766
- delete NativePromisePrototype$2.constructor;
767
- } catch (error) { /* empty */ }
768
-
769
- // make `instanceof Promise` work for native promise-based APIs
770
- if (setPrototypeOf) {
771
- setPrototypeOf(NativePromisePrototype$2, PromisePrototype);
772
- }
773
- }
774
- }
775
-
776
- $$7({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
777
- Promise: PromiseConstructor
778
- });
779
-
780
- setToStringTag(PromiseConstructor, PROMISE, false);
781
- setSpecies(PROMISE);
782
-
783
- var wellKnownSymbol$2 = wellKnownSymbol$6;
784
- var Iterators$1 = iterators;
785
-
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;
839
- }
840
- if (kind === 'throw') throw value;
841
- if (innerError) throw innerResult;
842
- anObject$2(innerResult);
843
- return value;
844
- };
845
-
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);
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 */ });
960
- });
961
-
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 }, {
973
- all: function all(iterable) {
974
- var C = this;
975
- var capability = newPromiseCapabilityModule$2.f(C);
976
- var resolve = capability.resolve;
977
- var reject = capability.reject;
978
- var result = perform$1(function () {
979
- var $promiseResolve = aCallable$1(C.resolve);
980
- var values = [];
981
- var counter = 0;
982
- var remaining = 1;
983
- iterate$1(iterable, function (promise) {
984
- var index = counter++;
985
- var alreadyCalled = false;
986
- remaining++;
987
- call$2($promiseResolve, C, promise).then(function (value) {
988
- if (alreadyCalled) return;
989
- alreadyCalled = true;
990
- values[index] = value;
991
- --remaining || resolve(values);
992
- }, reject);
993
- });
994
- --remaining || resolve(values);
995
- });
996
- if (result.error) reject(result.value);
997
- return capability.promise;
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 }, {
1037
- race: function race(iterable) {
1038
- var C = this;
1039
- var capability = newPromiseCapabilityModule$1.f(C);
1040
- var reject = capability.reject;
1041
- var result = perform(function () {
1042
- var $promiseResolve = aCallable(C.resolve);
1043
- iterate(iterable, function (promise) {
1044
- call$1($promiseResolve, C, promise).then(capability.resolve, reject);
1045
- });
1046
- });
1047
- if (result.error) reject(result.value);
1048
- return capability.promise;
1049
- }
1050
- });
1051
-
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
- });
1066
-
1067
- var anObject = anObject$5;
1068
- var isObject = isObject$2;
1069
- var newPromiseCapability = newPromiseCapability$2;
1070
-
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;
1078
- };
1079
-
1080
- var $$2 = _export;
1081
- var getBuiltIn$1 = getBuiltIn$5;
1082
- var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
1083
- var promiseResolve$1 = promiseResolve$2;
1084
-
1085
- getBuiltIn$1('Promise');
1086
-
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
- });
1094
-
1095
6
  var PROPER_FUNCTION_NAME = functionName.PROPER;
1096
- var fails$1 = fails$4;
7
+ var fails$1 = fails$2;
1097
8
  var whitespaces = whitespaces$1;
1098
9
 
1099
10
  var non = '\u200B\u0085\u180E';
@@ -1122,12 +33,12 @@ $$1({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
1122
33
 
1123
34
  var $ = _export;
1124
35
  var NativePromiseConstructor = promiseNativeConstructor;
1125
- var fails = fails$4;
1126
- var getBuiltIn = getBuiltIn$5;
1127
- var isCallable = isCallable$6;
1128
- var speciesConstructor = speciesConstructor$2;
1129
- var promiseResolve = promiseResolve$2;
1130
- var defineBuiltIn = defineBuiltIn$3;
36
+ var fails = fails$2;
37
+ var getBuiltIn = getBuiltIn$1;
38
+ var isCallable = isCallable$1;
39
+ var speciesConstructor = speciesConstructor$1;
40
+ var promiseResolve = promiseResolve$1;
41
+ var defineBuiltIn = defineBuiltIn$1;
1131
42
 
1132
43
  var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
1133
44