docviewhelper 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{index.esm.js → index.js} +980 -1014
- package/package.json +5 -5
- package/{index.d.ts → src/index.d.ts} +0 -0
- package/{lib → src/lib}/helper.d.ts +1 -0
- package/src/lib/helper.test.d.ts +1 -0
- package/{lib → src/lib}/model.d.ts +0 -0
- package/index.umd.js +0 -3342
|
@@ -5,8 +5,8 @@ var check = function (it) {
|
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
8
|
-
var global$
|
|
9
|
-
// eslint-disable-next-line es/no-global-this -- safe
|
|
8
|
+
var global$G =
|
|
9
|
+
// eslint-disable-next-line es-x/no-global-this -- safe
|
|
10
10
|
check(typeof globalThis == 'object' && globalThis) ||
|
|
11
11
|
check(typeof window == 'object' && window) ||
|
|
12
12
|
// eslint-disable-next-line no-restricted-globals -- safe
|
|
@@ -17,7 +17,7 @@ var global$F =
|
|
|
17
17
|
|
|
18
18
|
var objectGetOwnPropertyDescriptor = {};
|
|
19
19
|
|
|
20
|
-
var fails$
|
|
20
|
+
var fails$e = function (exec) {
|
|
21
21
|
try {
|
|
22
22
|
return !!exec();
|
|
23
23
|
} catch (error) {
|
|
@@ -25,24 +25,35 @@ var fails$d = function (exec) {
|
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
var fails$
|
|
28
|
+
var fails$d = fails$e;
|
|
29
29
|
|
|
30
30
|
// Detect IE8's incomplete defineProperty implementation
|
|
31
|
-
var descriptors = !fails$
|
|
32
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
31
|
+
var descriptors = !fails$d(function () {
|
|
32
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
33
33
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
34
34
|
});
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var fails$c = fails$e;
|
|
37
37
|
|
|
38
|
-
var
|
|
39
|
-
|
|
38
|
+
var functionBindNative = !fails$c(function () {
|
|
39
|
+
// eslint-disable-next-line es-x/no-function-prototype-bind -- safe
|
|
40
|
+
var test = (function () { /* empty */ }).bind();
|
|
41
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
42
|
+
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
var NATIVE_BIND$3 = functionBindNative;
|
|
46
|
+
|
|
47
|
+
var call$g = Function.prototype.call;
|
|
48
|
+
|
|
49
|
+
var functionCall = NATIVE_BIND$3 ? call$g.bind(call$g) : function () {
|
|
50
|
+
return call$g.apply(call$g, arguments);
|
|
40
51
|
};
|
|
41
52
|
|
|
42
53
|
var objectPropertyIsEnumerable = {};
|
|
43
54
|
|
|
44
55
|
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
45
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
56
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
46
57
|
var getOwnPropertyDescriptor$4 = Object.getOwnPropertyDescriptor;
|
|
47
58
|
|
|
48
59
|
// Nashorn ~ JDK8 bug
|
|
@@ -55,7 +66,7 @@ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
|
55
66
|
return !!descriptor && descriptor.enumerable;
|
|
56
67
|
} : $propertyIsEnumerable;
|
|
57
68
|
|
|
58
|
-
var createPropertyDescriptor$
|
|
69
|
+
var createPropertyDescriptor$2 = function (bitmap, value) {
|
|
59
70
|
return {
|
|
60
71
|
enumerable: !(bitmap & 1),
|
|
61
72
|
configurable: !(bitmap & 2),
|
|
@@ -64,35 +75,37 @@ var createPropertyDescriptor$3 = function (bitmap, value) {
|
|
|
64
75
|
};
|
|
65
76
|
};
|
|
66
77
|
|
|
78
|
+
var NATIVE_BIND$2 = functionBindNative;
|
|
79
|
+
|
|
67
80
|
var FunctionPrototype$2 = Function.prototype;
|
|
68
|
-
var bind$
|
|
69
|
-
var call$
|
|
70
|
-
var
|
|
81
|
+
var bind$5 = FunctionPrototype$2.bind;
|
|
82
|
+
var call$f = FunctionPrototype$2.call;
|
|
83
|
+
var uncurryThis$k = NATIVE_BIND$2 && bind$5.bind(call$f, call$f);
|
|
71
84
|
|
|
72
|
-
var functionUncurryThis =
|
|
73
|
-
return fn &&
|
|
85
|
+
var functionUncurryThis = NATIVE_BIND$2 ? function (fn) {
|
|
86
|
+
return fn && uncurryThis$k(fn);
|
|
74
87
|
} : function (fn) {
|
|
75
88
|
return fn && function () {
|
|
76
|
-
return call$
|
|
89
|
+
return call$f.apply(fn, arguments);
|
|
77
90
|
};
|
|
78
91
|
};
|
|
79
92
|
|
|
80
|
-
var uncurryThis$
|
|
93
|
+
var uncurryThis$j = functionUncurryThis;
|
|
81
94
|
|
|
82
|
-
var toString$
|
|
83
|
-
var stringSlice$
|
|
95
|
+
var toString$8 = uncurryThis$j({}.toString);
|
|
96
|
+
var stringSlice$5 = uncurryThis$j(''.slice);
|
|
84
97
|
|
|
85
98
|
var classofRaw$1 = function (it) {
|
|
86
|
-
return stringSlice$
|
|
99
|
+
return stringSlice$5(toString$8(it), 8, -1);
|
|
87
100
|
};
|
|
88
101
|
|
|
89
|
-
var global$
|
|
90
|
-
var uncurryThis$
|
|
91
|
-
var fails$b = fails$
|
|
102
|
+
var global$F = global$G;
|
|
103
|
+
var uncurryThis$i = functionUncurryThis;
|
|
104
|
+
var fails$b = fails$e;
|
|
92
105
|
var classof$7 = classofRaw$1;
|
|
93
106
|
|
|
94
|
-
var Object$4 = global$
|
|
95
|
-
var split = uncurryThis$
|
|
107
|
+
var Object$4 = global$F.Object;
|
|
108
|
+
var split = uncurryThis$i(''.split);
|
|
96
109
|
|
|
97
110
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
98
111
|
var indexedObject = fails$b(function () {
|
|
@@ -103,62 +116,62 @@ var indexedObject = fails$b(function () {
|
|
|
103
116
|
return classof$7(it) == 'String' ? split(it, '') : Object$4(it);
|
|
104
117
|
} : Object$4;
|
|
105
118
|
|
|
106
|
-
var global$
|
|
119
|
+
var global$E = global$G;
|
|
107
120
|
|
|
108
|
-
var TypeError$
|
|
121
|
+
var TypeError$g = global$E.TypeError;
|
|
109
122
|
|
|
110
123
|
// `RequireObjectCoercible` abstract operation
|
|
111
124
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
112
|
-
var requireObjectCoercible$
|
|
113
|
-
if (it == undefined) throw TypeError$
|
|
125
|
+
var requireObjectCoercible$7 = function (it) {
|
|
126
|
+
if (it == undefined) throw TypeError$g("Can't call method on " + it);
|
|
114
127
|
return it;
|
|
115
128
|
};
|
|
116
129
|
|
|
117
130
|
// toObject with fallback for non-array-like ES3 strings
|
|
118
131
|
var IndexedObject = indexedObject;
|
|
119
|
-
var requireObjectCoercible$
|
|
132
|
+
var requireObjectCoercible$6 = requireObjectCoercible$7;
|
|
120
133
|
|
|
121
134
|
var toIndexedObject$4 = function (it) {
|
|
122
|
-
return IndexedObject(requireObjectCoercible$
|
|
135
|
+
return IndexedObject(requireObjectCoercible$6(it));
|
|
123
136
|
};
|
|
124
137
|
|
|
125
138
|
// `IsCallable` abstract operation
|
|
126
139
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
127
|
-
var isCallable$
|
|
140
|
+
var isCallable$i = function (argument) {
|
|
128
141
|
return typeof argument == 'function';
|
|
129
142
|
};
|
|
130
143
|
|
|
131
|
-
var isCallable$
|
|
144
|
+
var isCallable$h = isCallable$i;
|
|
132
145
|
|
|
133
146
|
var isObject$8 = function (it) {
|
|
134
|
-
return typeof it == 'object' ? it !== null : isCallable$
|
|
147
|
+
return typeof it == 'object' ? it !== null : isCallable$h(it);
|
|
135
148
|
};
|
|
136
149
|
|
|
137
|
-
var global$
|
|
138
|
-
var isCallable$
|
|
150
|
+
var global$D = global$G;
|
|
151
|
+
var isCallable$g = isCallable$i;
|
|
139
152
|
|
|
140
153
|
var aFunction = function (argument) {
|
|
141
|
-
return isCallable$
|
|
154
|
+
return isCallable$g(argument) ? argument : undefined;
|
|
142
155
|
};
|
|
143
156
|
|
|
144
|
-
var getBuiltIn$
|
|
145
|
-
return arguments.length < 2 ? aFunction(global$
|
|
157
|
+
var getBuiltIn$8 = function (namespace, method) {
|
|
158
|
+
return arguments.length < 2 ? aFunction(global$D[namespace]) : global$D[namespace] && global$D[namespace][method];
|
|
146
159
|
};
|
|
147
160
|
|
|
148
|
-
var uncurryThis$
|
|
161
|
+
var uncurryThis$h = functionUncurryThis;
|
|
149
162
|
|
|
150
|
-
var objectIsPrototypeOf = uncurryThis$
|
|
163
|
+
var objectIsPrototypeOf = uncurryThis$h({}.isPrototypeOf);
|
|
151
164
|
|
|
152
|
-
var getBuiltIn$
|
|
165
|
+
var getBuiltIn$7 = getBuiltIn$8;
|
|
153
166
|
|
|
154
|
-
var engineUserAgent = getBuiltIn$
|
|
167
|
+
var engineUserAgent = getBuiltIn$7('navigator', 'userAgent') || '';
|
|
155
168
|
|
|
156
|
-
var global$
|
|
169
|
+
var global$C = global$G;
|
|
157
170
|
var userAgent$3 = engineUserAgent;
|
|
158
171
|
|
|
159
|
-
var process$3 = global$
|
|
160
|
-
var Deno = global$
|
|
161
|
-
var versions = process$3 && process$3.versions || Deno && Deno.version;
|
|
172
|
+
var process$3 = global$C.process;
|
|
173
|
+
var Deno$1 = global$C.Deno;
|
|
174
|
+
var versions = process$3 && process$3.versions || Deno$1 && Deno$1.version;
|
|
162
175
|
var v8 = versions && versions.v8;
|
|
163
176
|
var match, version;
|
|
164
177
|
|
|
@@ -181,12 +194,12 @@ if (!version && userAgent$3) {
|
|
|
181
194
|
|
|
182
195
|
var engineV8Version = version;
|
|
183
196
|
|
|
184
|
-
/* eslint-disable es/no-symbol -- required for testing */
|
|
197
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
185
198
|
|
|
186
199
|
var V8_VERSION$1 = engineV8Version;
|
|
187
|
-
var fails$a = fails$
|
|
200
|
+
var fails$a = fails$e;
|
|
188
201
|
|
|
189
|
-
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
202
|
+
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
|
|
190
203
|
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$a(function () {
|
|
191
204
|
var symbol = Symbol();
|
|
192
205
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
@@ -196,7 +209,7 @@ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$a(function () {
|
|
|
196
209
|
!Symbol.sham && V8_VERSION$1 && V8_VERSION$1 < 41;
|
|
197
210
|
});
|
|
198
211
|
|
|
199
|
-
/* eslint-disable es/no-symbol -- required for testing */
|
|
212
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
200
213
|
|
|
201
214
|
var NATIVE_SYMBOL$1 = nativeSymbol;
|
|
202
215
|
|
|
@@ -204,24 +217,24 @@ var useSymbolAsUid = NATIVE_SYMBOL$1
|
|
|
204
217
|
&& !Symbol.sham
|
|
205
218
|
&& typeof Symbol.iterator == 'symbol';
|
|
206
219
|
|
|
207
|
-
var global$
|
|
208
|
-
var getBuiltIn$
|
|
209
|
-
var isCallable$
|
|
220
|
+
var global$B = global$G;
|
|
221
|
+
var getBuiltIn$6 = getBuiltIn$8;
|
|
222
|
+
var isCallable$f = isCallable$i;
|
|
210
223
|
var isPrototypeOf$2 = objectIsPrototypeOf;
|
|
211
224
|
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
212
225
|
|
|
213
|
-
var Object$3 = global$
|
|
226
|
+
var Object$3 = global$B.Object;
|
|
214
227
|
|
|
215
228
|
var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
|
|
216
229
|
return typeof it == 'symbol';
|
|
217
230
|
} : function (it) {
|
|
218
|
-
var $Symbol = getBuiltIn$
|
|
219
|
-
return isCallable$
|
|
231
|
+
var $Symbol = getBuiltIn$6('Symbol');
|
|
232
|
+
return isCallable$f($Symbol) && isPrototypeOf$2($Symbol.prototype, Object$3(it));
|
|
220
233
|
};
|
|
221
234
|
|
|
222
|
-
var global$
|
|
235
|
+
var global$A = global$G;
|
|
223
236
|
|
|
224
|
-
var String$5 = global$
|
|
237
|
+
var String$5 = global$A.String;
|
|
225
238
|
|
|
226
239
|
var tryToString$4 = function (argument) {
|
|
227
240
|
try {
|
|
@@ -231,64 +244,64 @@ var tryToString$4 = function (argument) {
|
|
|
231
244
|
}
|
|
232
245
|
};
|
|
233
246
|
|
|
234
|
-
var global$
|
|
235
|
-
var isCallable$
|
|
247
|
+
var global$z = global$G;
|
|
248
|
+
var isCallable$e = isCallable$i;
|
|
236
249
|
var tryToString$3 = tryToString$4;
|
|
237
250
|
|
|
238
|
-
var TypeError$
|
|
251
|
+
var TypeError$f = global$z.TypeError;
|
|
239
252
|
|
|
240
253
|
// `Assert: IsCallable(argument) is true`
|
|
241
|
-
var aCallable$
|
|
242
|
-
if (isCallable$
|
|
243
|
-
throw TypeError$
|
|
254
|
+
var aCallable$7 = function (argument) {
|
|
255
|
+
if (isCallable$e(argument)) return argument;
|
|
256
|
+
throw TypeError$f(tryToString$3(argument) + ' is not a function');
|
|
244
257
|
};
|
|
245
258
|
|
|
246
|
-
var aCallable$
|
|
259
|
+
var aCallable$6 = aCallable$7;
|
|
247
260
|
|
|
248
261
|
// `GetMethod` abstract operation
|
|
249
262
|
// https://tc39.es/ecma262/#sec-getmethod
|
|
250
|
-
var getMethod$
|
|
263
|
+
var getMethod$5 = function (V, P) {
|
|
251
264
|
var func = V[P];
|
|
252
|
-
return func == null ? undefined : aCallable$
|
|
265
|
+
return func == null ? undefined : aCallable$6(func);
|
|
253
266
|
};
|
|
254
267
|
|
|
255
|
-
var global$
|
|
256
|
-
var call$
|
|
257
|
-
var isCallable$
|
|
268
|
+
var global$y = global$G;
|
|
269
|
+
var call$e = functionCall;
|
|
270
|
+
var isCallable$d = isCallable$i;
|
|
258
271
|
var isObject$7 = isObject$8;
|
|
259
272
|
|
|
260
|
-
var TypeError$
|
|
273
|
+
var TypeError$e = global$y.TypeError;
|
|
261
274
|
|
|
262
275
|
// `OrdinaryToPrimitive` abstract operation
|
|
263
276
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
264
277
|
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
265
278
|
var fn, val;
|
|
266
|
-
if (pref === 'string' && isCallable$
|
|
267
|
-
if (isCallable$
|
|
268
|
-
if (pref !== 'string' && isCallable$
|
|
269
|
-
throw TypeError$
|
|
279
|
+
if (pref === 'string' && isCallable$d(fn = input.toString) && !isObject$7(val = call$e(fn, input))) return val;
|
|
280
|
+
if (isCallable$d(fn = input.valueOf) && !isObject$7(val = call$e(fn, input))) return val;
|
|
281
|
+
if (pref !== 'string' && isCallable$d(fn = input.toString) && !isObject$7(val = call$e(fn, input))) return val;
|
|
282
|
+
throw TypeError$e("Can't convert object to primitive value");
|
|
270
283
|
};
|
|
271
284
|
|
|
272
285
|
var shared$4 = {exports: {}};
|
|
273
286
|
|
|
274
|
-
var global$
|
|
287
|
+
var global$x = global$G;
|
|
275
288
|
|
|
276
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
289
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
277
290
|
var defineProperty$1 = Object.defineProperty;
|
|
278
291
|
|
|
279
292
|
var setGlobal$3 = function (key, value) {
|
|
280
293
|
try {
|
|
281
|
-
defineProperty$1(global$
|
|
294
|
+
defineProperty$1(global$x, key, { value: value, configurable: true, writable: true });
|
|
282
295
|
} catch (error) {
|
|
283
|
-
global$
|
|
296
|
+
global$x[key] = value;
|
|
284
297
|
} return value;
|
|
285
298
|
};
|
|
286
299
|
|
|
287
|
-
var global$
|
|
300
|
+
var global$w = global$G;
|
|
288
301
|
var setGlobal$2 = setGlobal$3;
|
|
289
302
|
|
|
290
303
|
var SHARED = '__core-js_shared__';
|
|
291
|
-
var store$3 = global$
|
|
304
|
+
var store$3 = global$w[SHARED] || setGlobal$2(SHARED, {});
|
|
292
305
|
|
|
293
306
|
var sharedStore = store$3;
|
|
294
307
|
|
|
@@ -297,44 +310,47 @@ var store$2 = sharedStore;
|
|
|
297
310
|
(shared$4.exports = function (key, value) {
|
|
298
311
|
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
299
312
|
})('versions', []).push({
|
|
300
|
-
version: '3.
|
|
313
|
+
version: '3.22.2',
|
|
301
314
|
mode: 'global',
|
|
302
|
-
copyright: '©
|
|
315
|
+
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
316
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.22.2/LICENSE',
|
|
317
|
+
source: 'https://github.com/zloirock/core-js'
|
|
303
318
|
});
|
|
304
319
|
|
|
305
|
-
var global$
|
|
306
|
-
var requireObjectCoercible$
|
|
320
|
+
var global$v = global$G;
|
|
321
|
+
var requireObjectCoercible$5 = requireObjectCoercible$7;
|
|
307
322
|
|
|
308
|
-
var Object$2 = global$
|
|
323
|
+
var Object$2 = global$v.Object;
|
|
309
324
|
|
|
310
325
|
// `ToObject` abstract operation
|
|
311
326
|
// https://tc39.es/ecma262/#sec-toobject
|
|
312
327
|
var toObject$2 = function (argument) {
|
|
313
|
-
return Object$2(requireObjectCoercible$
|
|
328
|
+
return Object$2(requireObjectCoercible$5(argument));
|
|
314
329
|
};
|
|
315
330
|
|
|
316
|
-
var uncurryThis$
|
|
331
|
+
var uncurryThis$g = functionUncurryThis;
|
|
317
332
|
var toObject$1 = toObject$2;
|
|
318
333
|
|
|
319
|
-
var hasOwnProperty = uncurryThis$
|
|
334
|
+
var hasOwnProperty = uncurryThis$g({}.hasOwnProperty);
|
|
320
335
|
|
|
321
336
|
// `HasOwnProperty` abstract operation
|
|
322
337
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
338
|
+
// eslint-disable-next-line es-x/no-object-hasown -- safe
|
|
323
339
|
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
324
340
|
return hasOwnProperty(toObject$1(it), key);
|
|
325
341
|
};
|
|
326
342
|
|
|
327
|
-
var uncurryThis$
|
|
343
|
+
var uncurryThis$f = functionUncurryThis;
|
|
328
344
|
|
|
329
345
|
var id = 0;
|
|
330
346
|
var postfix = Math.random();
|
|
331
|
-
var toString$
|
|
347
|
+
var toString$7 = uncurryThis$f(1.0.toString);
|
|
332
348
|
|
|
333
349
|
var uid$2 = function (key) {
|
|
334
|
-
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$
|
|
350
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$7(++id + postfix, 36);
|
|
335
351
|
};
|
|
336
352
|
|
|
337
|
-
var global$
|
|
353
|
+
var global$u = global$G;
|
|
338
354
|
var shared$3 = shared$4.exports;
|
|
339
355
|
var hasOwn$8 = hasOwnProperty_1;
|
|
340
356
|
var uid$1 = uid$2;
|
|
@@ -342,11 +358,11 @@ var NATIVE_SYMBOL = nativeSymbol;
|
|
|
342
358
|
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
343
359
|
|
|
344
360
|
var WellKnownSymbolsStore = shared$3('wks');
|
|
345
|
-
var Symbol$1 = global$
|
|
361
|
+
var Symbol$1 = global$u.Symbol;
|
|
346
362
|
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
347
363
|
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
348
364
|
|
|
349
|
-
var wellKnownSymbol$
|
|
365
|
+
var wellKnownSymbol$f = function (name) {
|
|
350
366
|
if (!hasOwn$8(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
351
367
|
var description = 'Symbol.' + name;
|
|
352
368
|
if (NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)) {
|
|
@@ -359,28 +375,28 @@ var wellKnownSymbol$e = function (name) {
|
|
|
359
375
|
} return WellKnownSymbolsStore[name];
|
|
360
376
|
};
|
|
361
377
|
|
|
362
|
-
var global$
|
|
363
|
-
var call$
|
|
378
|
+
var global$t = global$G;
|
|
379
|
+
var call$d = functionCall;
|
|
364
380
|
var isObject$6 = isObject$8;
|
|
365
381
|
var isSymbol$1 = isSymbol$2;
|
|
366
|
-
var getMethod$
|
|
382
|
+
var getMethod$4 = getMethod$5;
|
|
367
383
|
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
368
|
-
var wellKnownSymbol$
|
|
384
|
+
var wellKnownSymbol$e = wellKnownSymbol$f;
|
|
369
385
|
|
|
370
|
-
var TypeError$
|
|
371
|
-
var TO_PRIMITIVE = wellKnownSymbol$
|
|
386
|
+
var TypeError$d = global$t.TypeError;
|
|
387
|
+
var TO_PRIMITIVE = wellKnownSymbol$e('toPrimitive');
|
|
372
388
|
|
|
373
389
|
// `ToPrimitive` abstract operation
|
|
374
390
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
375
391
|
var toPrimitive$1 = function (input, pref) {
|
|
376
392
|
if (!isObject$6(input) || isSymbol$1(input)) return input;
|
|
377
|
-
var exoticToPrim = getMethod$
|
|
393
|
+
var exoticToPrim = getMethod$4(input, TO_PRIMITIVE);
|
|
378
394
|
var result;
|
|
379
395
|
if (exoticToPrim) {
|
|
380
396
|
if (pref === undefined) pref = 'default';
|
|
381
|
-
result = call$
|
|
397
|
+
result = call$d(exoticToPrim, input, pref);
|
|
382
398
|
if (!isObject$6(result) || isSymbol$1(result)) return result;
|
|
383
|
-
throw TypeError$
|
|
399
|
+
throw TypeError$d("Can't convert object to primitive value");
|
|
384
400
|
}
|
|
385
401
|
if (pref === undefined) pref = 'number';
|
|
386
402
|
return ordinaryToPrimitive(input, pref);
|
|
@@ -391,15 +407,15 @@ var isSymbol = isSymbol$2;
|
|
|
391
407
|
|
|
392
408
|
// `ToPropertyKey` abstract operation
|
|
393
409
|
// https://tc39.es/ecma262/#sec-topropertykey
|
|
394
|
-
var toPropertyKey$
|
|
410
|
+
var toPropertyKey$2 = function (argument) {
|
|
395
411
|
var key = toPrimitive(argument, 'string');
|
|
396
412
|
return isSymbol(key) ? key : key + '';
|
|
397
413
|
};
|
|
398
414
|
|
|
399
|
-
var global$
|
|
415
|
+
var global$s = global$G;
|
|
400
416
|
var isObject$5 = isObject$8;
|
|
401
417
|
|
|
402
|
-
var document$3 = global$
|
|
418
|
+
var document$3 = global$s.document;
|
|
403
419
|
// typeof document.createElement is 'object' in old IE
|
|
404
420
|
var EXISTS$1 = isObject$5(document$3) && isObject$5(document$3.createElement);
|
|
405
421
|
|
|
@@ -407,100 +423,134 @@ var documentCreateElement$1 = function (it) {
|
|
|
407
423
|
return EXISTS$1 ? document$3.createElement(it) : {};
|
|
408
424
|
};
|
|
409
425
|
|
|
410
|
-
var DESCRIPTORS$
|
|
411
|
-
var fails$9 = fails$
|
|
426
|
+
var DESCRIPTORS$7 = descriptors;
|
|
427
|
+
var fails$9 = fails$e;
|
|
412
428
|
var createElement$1 = documentCreateElement$1;
|
|
413
429
|
|
|
414
|
-
//
|
|
415
|
-
var ie8DomDefine = !DESCRIPTORS$
|
|
416
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
430
|
+
// Thanks to IE8 for its funny defineProperty
|
|
431
|
+
var ie8DomDefine = !DESCRIPTORS$7 && !fails$9(function () {
|
|
432
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
417
433
|
return Object.defineProperty(createElement$1('div'), 'a', {
|
|
418
434
|
get: function () { return 7; }
|
|
419
435
|
}).a != 7;
|
|
420
436
|
});
|
|
421
437
|
|
|
422
|
-
var DESCRIPTORS$
|
|
423
|
-
var call$
|
|
438
|
+
var DESCRIPTORS$6 = descriptors;
|
|
439
|
+
var call$c = functionCall;
|
|
424
440
|
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
425
|
-
var createPropertyDescriptor$
|
|
441
|
+
var createPropertyDescriptor$1 = createPropertyDescriptor$2;
|
|
426
442
|
var toIndexedObject$3 = toIndexedObject$4;
|
|
427
|
-
var toPropertyKey$
|
|
443
|
+
var toPropertyKey$1 = toPropertyKey$2;
|
|
428
444
|
var hasOwn$7 = hasOwnProperty_1;
|
|
429
445
|
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
430
446
|
|
|
431
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
432
|
-
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
447
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
448
|
+
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
433
449
|
|
|
434
450
|
// `Object.getOwnPropertyDescriptor` method
|
|
435
451
|
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
436
|
-
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$
|
|
452
|
+
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$6 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
|
437
453
|
O = toIndexedObject$3(O);
|
|
438
|
-
P = toPropertyKey$
|
|
454
|
+
P = toPropertyKey$1(P);
|
|
439
455
|
if (IE8_DOM_DEFINE$1) try {
|
|
440
|
-
return $getOwnPropertyDescriptor(O, P);
|
|
456
|
+
return $getOwnPropertyDescriptor$1(O, P);
|
|
441
457
|
} catch (error) { /* empty */ }
|
|
442
|
-
if (hasOwn$7(O, P)) return createPropertyDescriptor$
|
|
458
|
+
if (hasOwn$7(O, P)) return createPropertyDescriptor$1(!call$c(propertyIsEnumerableModule.f, O, P), O[P]);
|
|
443
459
|
};
|
|
444
460
|
|
|
445
461
|
var objectDefineProperty = {};
|
|
446
462
|
|
|
447
|
-
var
|
|
463
|
+
var DESCRIPTORS$5 = descriptors;
|
|
464
|
+
var fails$8 = fails$e;
|
|
465
|
+
|
|
466
|
+
// V8 ~ Chrome 36-
|
|
467
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
468
|
+
var v8PrototypeDefineBug = DESCRIPTORS$5 && fails$8(function () {
|
|
469
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
470
|
+
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
471
|
+
value: 42,
|
|
472
|
+
writable: false
|
|
473
|
+
}).prototype != 42;
|
|
474
|
+
});
|
|
475
|
+
|
|
476
|
+
var global$r = global$G;
|
|
448
477
|
var isObject$4 = isObject$8;
|
|
449
478
|
|
|
450
|
-
var String$4 = global$
|
|
451
|
-
var TypeError$
|
|
479
|
+
var String$4 = global$r.String;
|
|
480
|
+
var TypeError$c = global$r.TypeError;
|
|
452
481
|
|
|
453
482
|
// `Assert: Type(argument) is Object`
|
|
454
|
-
var anObject$
|
|
483
|
+
var anObject$e = function (argument) {
|
|
455
484
|
if (isObject$4(argument)) return argument;
|
|
456
|
-
throw TypeError$
|
|
485
|
+
throw TypeError$c(String$4(argument) + ' is not an object');
|
|
457
486
|
};
|
|
458
487
|
|
|
459
|
-
var global$
|
|
488
|
+
var global$q = global$G;
|
|
460
489
|
var DESCRIPTORS$4 = descriptors;
|
|
461
490
|
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
462
|
-
var
|
|
463
|
-
var
|
|
491
|
+
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
492
|
+
var anObject$d = anObject$e;
|
|
493
|
+
var toPropertyKey = toPropertyKey$2;
|
|
464
494
|
|
|
465
|
-
var TypeError$
|
|
466
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
495
|
+
var TypeError$b = global$q.TypeError;
|
|
496
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
467
497
|
var $defineProperty = Object.defineProperty;
|
|
498
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
499
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
500
|
+
var ENUMERABLE = 'enumerable';
|
|
501
|
+
var CONFIGURABLE$1 = 'configurable';
|
|
502
|
+
var WRITABLE = 'writable';
|
|
468
503
|
|
|
469
504
|
// `Object.defineProperty` method
|
|
470
505
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
471
|
-
objectDefineProperty.f = DESCRIPTORS$4 ? $
|
|
472
|
-
anObject$
|
|
473
|
-
P = toPropertyKey
|
|
474
|
-
anObject$
|
|
506
|
+
objectDefineProperty.f = DESCRIPTORS$4 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
507
|
+
anObject$d(O);
|
|
508
|
+
P = toPropertyKey(P);
|
|
509
|
+
anObject$d(Attributes);
|
|
510
|
+
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
511
|
+
var current = $getOwnPropertyDescriptor(O, P);
|
|
512
|
+
if (current && current[WRITABLE]) {
|
|
513
|
+
O[P] = Attributes.value;
|
|
514
|
+
Attributes = {
|
|
515
|
+
configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
|
|
516
|
+
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
|
517
|
+
writable: false
|
|
518
|
+
};
|
|
519
|
+
}
|
|
520
|
+
} return $defineProperty(O, P, Attributes);
|
|
521
|
+
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
522
|
+
anObject$d(O);
|
|
523
|
+
P = toPropertyKey(P);
|
|
524
|
+
anObject$d(Attributes);
|
|
475
525
|
if (IE8_DOM_DEFINE) try {
|
|
476
526
|
return $defineProperty(O, P, Attributes);
|
|
477
527
|
} catch (error) { /* empty */ }
|
|
478
|
-
if ('get' in Attributes || 'set' in Attributes) throw TypeError$
|
|
528
|
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError$b('Accessors not supported');
|
|
479
529
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
480
530
|
return O;
|
|
481
531
|
};
|
|
482
532
|
|
|
483
533
|
var DESCRIPTORS$3 = descriptors;
|
|
484
534
|
var definePropertyModule$4 = objectDefineProperty;
|
|
485
|
-
var createPropertyDescriptor
|
|
535
|
+
var createPropertyDescriptor = createPropertyDescriptor$2;
|
|
486
536
|
|
|
487
537
|
var createNonEnumerableProperty$4 = DESCRIPTORS$3 ? function (object, key, value) {
|
|
488
|
-
return definePropertyModule$4.f(object, key, createPropertyDescriptor
|
|
538
|
+
return definePropertyModule$4.f(object, key, createPropertyDescriptor(1, value));
|
|
489
539
|
} : function (object, key, value) {
|
|
490
540
|
object[key] = value;
|
|
491
541
|
return object;
|
|
492
542
|
};
|
|
493
543
|
|
|
494
|
-
var redefine$
|
|
544
|
+
var redefine$5 = {exports: {}};
|
|
495
545
|
|
|
496
|
-
var uncurryThis$
|
|
497
|
-
var isCallable$
|
|
546
|
+
var uncurryThis$e = functionUncurryThis;
|
|
547
|
+
var isCallable$c = isCallable$i;
|
|
498
548
|
var store$1 = sharedStore;
|
|
499
549
|
|
|
500
|
-
var functionToString = uncurryThis$
|
|
550
|
+
var functionToString = uncurryThis$e(Function.toString);
|
|
501
551
|
|
|
502
552
|
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
503
|
-
if (!isCallable$
|
|
553
|
+
if (!isCallable$c(store$1.inspectSource)) {
|
|
504
554
|
store$1.inspectSource = function (it) {
|
|
505
555
|
return functionToString(it);
|
|
506
556
|
};
|
|
@@ -508,13 +558,13 @@ if (!isCallable$a(store$1.inspectSource)) {
|
|
|
508
558
|
|
|
509
559
|
var inspectSource$4 = store$1.inspectSource;
|
|
510
560
|
|
|
511
|
-
var global$
|
|
512
|
-
var isCallable$
|
|
561
|
+
var global$p = global$G;
|
|
562
|
+
var isCallable$b = isCallable$i;
|
|
513
563
|
var inspectSource$3 = inspectSource$4;
|
|
514
564
|
|
|
515
|
-
var WeakMap$1 = global$
|
|
565
|
+
var WeakMap$1 = global$p.WeakMap;
|
|
516
566
|
|
|
517
|
-
var nativeWeakMap = isCallable$
|
|
567
|
+
var nativeWeakMap = isCallable$b(WeakMap$1) && /native code/.test(inspectSource$3(WeakMap$1));
|
|
518
568
|
|
|
519
569
|
var shared$2 = shared$4.exports;
|
|
520
570
|
var uid = uid$2;
|
|
@@ -528,8 +578,8 @@ var sharedKey$2 = function (key) {
|
|
|
528
578
|
var hiddenKeys$4 = {};
|
|
529
579
|
|
|
530
580
|
var NATIVE_WEAK_MAP = nativeWeakMap;
|
|
531
|
-
var global$
|
|
532
|
-
var uncurryThis$
|
|
581
|
+
var global$o = global$G;
|
|
582
|
+
var uncurryThis$d = functionUncurryThis;
|
|
533
583
|
var isObject$3 = isObject$8;
|
|
534
584
|
var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
|
|
535
585
|
var hasOwn$6 = hasOwnProperty_1;
|
|
@@ -538,8 +588,8 @@ var sharedKey$1 = sharedKey$2;
|
|
|
538
588
|
var hiddenKeys$3 = hiddenKeys$4;
|
|
539
589
|
|
|
540
590
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
541
|
-
var TypeError$
|
|
542
|
-
var WeakMap = global$
|
|
591
|
+
var TypeError$a = global$o.TypeError;
|
|
592
|
+
var WeakMap = global$o.WeakMap;
|
|
543
593
|
var set$1, get, has;
|
|
544
594
|
|
|
545
595
|
var enforce = function (it) {
|
|
@@ -550,18 +600,18 @@ var getterFor = function (TYPE) {
|
|
|
550
600
|
return function (it) {
|
|
551
601
|
var state;
|
|
552
602
|
if (!isObject$3(it) || (state = get(it)).type !== TYPE) {
|
|
553
|
-
throw TypeError$
|
|
603
|
+
throw TypeError$a('Incompatible receiver, ' + TYPE + ' required');
|
|
554
604
|
} return state;
|
|
555
605
|
};
|
|
556
606
|
};
|
|
557
607
|
|
|
558
608
|
if (NATIVE_WEAK_MAP || shared$1.state) {
|
|
559
609
|
var store = shared$1.state || (shared$1.state = new WeakMap());
|
|
560
|
-
var wmget = uncurryThis$
|
|
561
|
-
var wmhas = uncurryThis$
|
|
562
|
-
var wmset = uncurryThis$
|
|
610
|
+
var wmget = uncurryThis$d(store.get);
|
|
611
|
+
var wmhas = uncurryThis$d(store.has);
|
|
612
|
+
var wmset = uncurryThis$d(store.set);
|
|
563
613
|
set$1 = function (it, metadata) {
|
|
564
|
-
if (wmhas(store, it)) throw new TypeError$
|
|
614
|
+
if (wmhas(store, it)) throw new TypeError$a(OBJECT_ALREADY_INITIALIZED);
|
|
565
615
|
metadata.facade = it;
|
|
566
616
|
wmset(store, it, metadata);
|
|
567
617
|
return metadata;
|
|
@@ -576,7 +626,7 @@ if (NATIVE_WEAK_MAP || shared$1.state) {
|
|
|
576
626
|
var STATE = sharedKey$1('state');
|
|
577
627
|
hiddenKeys$3[STATE] = true;
|
|
578
628
|
set$1 = function (it, metadata) {
|
|
579
|
-
if (hasOwn$6(it, STATE)) throw new TypeError$
|
|
629
|
+
if (hasOwn$6(it, STATE)) throw new TypeError$a(OBJECT_ALREADY_INITIALIZED);
|
|
580
630
|
metadata.facade = it;
|
|
581
631
|
createNonEnumerableProperty$3(it, STATE, metadata);
|
|
582
632
|
return metadata;
|
|
@@ -601,7 +651,7 @@ var DESCRIPTORS$2 = descriptors;
|
|
|
601
651
|
var hasOwn$5 = hasOwnProperty_1;
|
|
602
652
|
|
|
603
653
|
var FunctionPrototype$1 = Function.prototype;
|
|
604
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
654
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
605
655
|
var getDescriptor = DESCRIPTORS$2 && Object.getOwnPropertyDescriptor;
|
|
606
656
|
|
|
607
657
|
var EXISTS = hasOwn$5(FunctionPrototype$1, 'name');
|
|
@@ -615,8 +665,8 @@ var functionName = {
|
|
|
615
665
|
CONFIGURABLE: CONFIGURABLE
|
|
616
666
|
};
|
|
617
667
|
|
|
618
|
-
var global$
|
|
619
|
-
var isCallable$
|
|
668
|
+
var global$n = global$G;
|
|
669
|
+
var isCallable$a = isCallable$i;
|
|
620
670
|
var hasOwn$4 = hasOwnProperty_1;
|
|
621
671
|
var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
|
|
622
672
|
var setGlobal$1 = setGlobal$3;
|
|
@@ -624,17 +674,17 @@ var inspectSource$2 = inspectSource$4;
|
|
|
624
674
|
var InternalStateModule$1 = internalState;
|
|
625
675
|
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
626
676
|
|
|
627
|
-
var getInternalState$
|
|
677
|
+
var getInternalState$1 = InternalStateModule$1.get;
|
|
628
678
|
var enforceInternalState = InternalStateModule$1.enforce;
|
|
629
679
|
var TEMPLATE = String(String).split('String');
|
|
630
680
|
|
|
631
|
-
(redefine$
|
|
681
|
+
(redefine$5.exports = function (O, key, value, options) {
|
|
632
682
|
var unsafe = options ? !!options.unsafe : false;
|
|
633
683
|
var simple = options ? !!options.enumerable : false;
|
|
634
684
|
var noTargetGet = options ? !!options.noTargetGet : false;
|
|
635
685
|
var name = options && options.name !== undefined ? options.name : key;
|
|
636
686
|
var state;
|
|
637
|
-
if (isCallable$
|
|
687
|
+
if (isCallable$a(value)) {
|
|
638
688
|
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
639
689
|
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
640
690
|
}
|
|
@@ -646,7 +696,7 @@ var TEMPLATE = String(String).split('String');
|
|
|
646
696
|
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
647
697
|
}
|
|
648
698
|
}
|
|
649
|
-
if (O === global$
|
|
699
|
+
if (O === global$n) {
|
|
650
700
|
if (simple) O[key] = value;
|
|
651
701
|
else setGlobal$1(key, value);
|
|
652
702
|
return;
|
|
@@ -659,7 +709,7 @@ var TEMPLATE = String(String).split('String');
|
|
|
659
709
|
else createNonEnumerableProperty$2(O, key, value);
|
|
660
710
|
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
661
711
|
})(Function.prototype, 'toString', function toString() {
|
|
662
|
-
return isCallable$
|
|
712
|
+
return isCallable$a(this) && getInternalState$1(this).source || inspectSource$2(this);
|
|
663
713
|
});
|
|
664
714
|
|
|
665
715
|
var objectGetOwnPropertyNames = {};
|
|
@@ -677,45 +727,45 @@ var toIntegerOrInfinity$4 = function (argument) {
|
|
|
677
727
|
|
|
678
728
|
var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
|
|
679
729
|
|
|
680
|
-
var max$
|
|
681
|
-
var min$
|
|
730
|
+
var max$1 = Math.max;
|
|
731
|
+
var min$4 = Math.min;
|
|
682
732
|
|
|
683
733
|
// Helper for a popular repeating case of the spec:
|
|
684
734
|
// Let integer be ? ToInteger(index).
|
|
685
735
|
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
686
|
-
var toAbsoluteIndex$
|
|
736
|
+
var toAbsoluteIndex$1 = function (index, length) {
|
|
687
737
|
var integer = toIntegerOrInfinity$3(index);
|
|
688
|
-
return integer < 0 ? max$
|
|
738
|
+
return integer < 0 ? max$1(integer + length, 0) : min$4(integer, length);
|
|
689
739
|
};
|
|
690
740
|
|
|
691
741
|
var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
|
|
692
742
|
|
|
693
|
-
var min$
|
|
743
|
+
var min$3 = Math.min;
|
|
694
744
|
|
|
695
745
|
// `ToLength` abstract operation
|
|
696
746
|
// https://tc39.es/ecma262/#sec-tolength
|
|
697
|
-
var toLength$
|
|
698
|
-
return argument > 0 ? min$
|
|
747
|
+
var toLength$5 = function (argument) {
|
|
748
|
+
return argument > 0 ? min$3(toIntegerOrInfinity$2(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
699
749
|
};
|
|
700
750
|
|
|
701
|
-
var toLength$
|
|
751
|
+
var toLength$4 = toLength$5;
|
|
702
752
|
|
|
703
753
|
// `LengthOfArrayLike` abstract operation
|
|
704
754
|
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
705
|
-
var lengthOfArrayLike$
|
|
706
|
-
return toLength$
|
|
755
|
+
var lengthOfArrayLike$2 = function (obj) {
|
|
756
|
+
return toLength$4(obj.length);
|
|
707
757
|
};
|
|
708
758
|
|
|
709
759
|
var toIndexedObject$2 = toIndexedObject$4;
|
|
710
|
-
var toAbsoluteIndex
|
|
711
|
-
var lengthOfArrayLike$
|
|
760
|
+
var toAbsoluteIndex = toAbsoluteIndex$1;
|
|
761
|
+
var lengthOfArrayLike$1 = lengthOfArrayLike$2;
|
|
712
762
|
|
|
713
763
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
714
764
|
var createMethod$1 = function (IS_INCLUDES) {
|
|
715
765
|
return function ($this, el, fromIndex) {
|
|
716
766
|
var O = toIndexedObject$2($this);
|
|
717
|
-
var length = lengthOfArrayLike$
|
|
718
|
-
var index = toAbsoluteIndex
|
|
767
|
+
var length = lengthOfArrayLike$1(O);
|
|
768
|
+
var index = toAbsoluteIndex(fromIndex, length);
|
|
719
769
|
var value;
|
|
720
770
|
// Array#includes uses SameValueZero equality algorithm
|
|
721
771
|
// eslint-disable-next-line no-self-compare -- NaN check
|
|
@@ -739,23 +789,23 @@ var arrayIncludes = {
|
|
|
739
789
|
indexOf: createMethod$1(false)
|
|
740
790
|
};
|
|
741
791
|
|
|
742
|
-
var uncurryThis$
|
|
792
|
+
var uncurryThis$c = functionUncurryThis;
|
|
743
793
|
var hasOwn$3 = hasOwnProperty_1;
|
|
744
794
|
var toIndexedObject$1 = toIndexedObject$4;
|
|
745
795
|
var indexOf$1 = arrayIncludes.indexOf;
|
|
746
796
|
var hiddenKeys$2 = hiddenKeys$4;
|
|
747
797
|
|
|
748
|
-
var push$
|
|
798
|
+
var push$1 = uncurryThis$c([].push);
|
|
749
799
|
|
|
750
800
|
var objectKeysInternal = function (object, names) {
|
|
751
801
|
var O = toIndexedObject$1(object);
|
|
752
802
|
var i = 0;
|
|
753
803
|
var result = [];
|
|
754
804
|
var key;
|
|
755
|
-
for (key in O) !hasOwn$3(hiddenKeys$2, key) && hasOwn$3(O, key) && push$
|
|
805
|
+
for (key in O) !hasOwn$3(hiddenKeys$2, key) && hasOwn$3(O, key) && push$1(result, key);
|
|
756
806
|
// Don't enum bug & hidden keys
|
|
757
807
|
while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
|
|
758
|
-
~indexOf$1(result, key) || push$
|
|
808
|
+
~indexOf$1(result, key) || push$1(result, key);
|
|
759
809
|
}
|
|
760
810
|
return result;
|
|
761
811
|
};
|
|
@@ -778,27 +828,27 @@ var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
|
|
|
778
828
|
|
|
779
829
|
// `Object.getOwnPropertyNames` method
|
|
780
830
|
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
781
|
-
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
|
831
|
+
// eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
|
|
782
832
|
objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
783
833
|
return internalObjectKeys$1(O, hiddenKeys$1);
|
|
784
834
|
};
|
|
785
835
|
|
|
786
836
|
var objectGetOwnPropertySymbols = {};
|
|
787
837
|
|
|
788
|
-
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
838
|
+
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
|
|
789
839
|
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
790
840
|
|
|
791
|
-
var getBuiltIn$
|
|
792
|
-
var uncurryThis$
|
|
841
|
+
var getBuiltIn$5 = getBuiltIn$8;
|
|
842
|
+
var uncurryThis$b = functionUncurryThis;
|
|
793
843
|
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
794
844
|
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
795
|
-
var anObject$
|
|
845
|
+
var anObject$c = anObject$e;
|
|
796
846
|
|
|
797
|
-
var concat$1 = uncurryThis$
|
|
847
|
+
var concat$1 = uncurryThis$b([].concat);
|
|
798
848
|
|
|
799
849
|
// all object keys, includes non-enumerable and symbols
|
|
800
|
-
var ownKeys$1 = getBuiltIn$
|
|
801
|
-
var keys = getOwnPropertyNamesModule.f(anObject$
|
|
850
|
+
var ownKeys$1 = getBuiltIn$5('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
851
|
+
var keys = getOwnPropertyNamesModule.f(anObject$c(it));
|
|
802
852
|
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
803
853
|
return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
|
|
804
854
|
};
|
|
@@ -820,8 +870,8 @@ var copyConstructorProperties$1 = function (target, source, exceptions) {
|
|
|
820
870
|
}
|
|
821
871
|
};
|
|
822
872
|
|
|
823
|
-
var fails$
|
|
824
|
-
var isCallable$
|
|
873
|
+
var fails$7 = fails$e;
|
|
874
|
+
var isCallable$9 = isCallable$i;
|
|
825
875
|
|
|
826
876
|
var replacement = /#|\.prototype\./;
|
|
827
877
|
|
|
@@ -829,7 +879,7 @@ var isForced$2 = function (feature, detection) {
|
|
|
829
879
|
var value = data[normalize(feature)];
|
|
830
880
|
return value == POLYFILL ? true
|
|
831
881
|
: value == NATIVE ? false
|
|
832
|
-
: isCallable$
|
|
882
|
+
: isCallable$9(detection) ? fails$7(detection)
|
|
833
883
|
: !!detection;
|
|
834
884
|
};
|
|
835
885
|
|
|
@@ -843,10 +893,10 @@ var POLYFILL = isForced$2.POLYFILL = 'P';
|
|
|
843
893
|
|
|
844
894
|
var isForced_1 = isForced$2;
|
|
845
895
|
|
|
846
|
-
var global$
|
|
896
|
+
var global$m = global$G;
|
|
847
897
|
var getOwnPropertyDescriptor$3 = objectGetOwnPropertyDescriptor.f;
|
|
848
898
|
var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
|
|
849
|
-
var redefine$
|
|
899
|
+
var redefine$4 = redefine$5.exports;
|
|
850
900
|
var setGlobal = setGlobal$3;
|
|
851
901
|
var copyConstructorProperties = copyConstructorProperties$1;
|
|
852
902
|
var isForced$1 = isForced_1;
|
|
@@ -872,11 +922,11 @@ var _export = function (options, source) {
|
|
|
872
922
|
var STATIC = options.stat;
|
|
873
923
|
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
874
924
|
if (GLOBAL) {
|
|
875
|
-
target = global$
|
|
925
|
+
target = global$m;
|
|
876
926
|
} else if (STATIC) {
|
|
877
|
-
target = global$
|
|
927
|
+
target = global$m[TARGET] || setGlobal(TARGET, {});
|
|
878
928
|
} else {
|
|
879
|
-
target = (global$
|
|
929
|
+
target = (global$m[TARGET] || {}).prototype;
|
|
880
930
|
}
|
|
881
931
|
if (target) for (key in source) {
|
|
882
932
|
sourceProperty = source[key];
|
|
@@ -895,54 +945,55 @@ var _export = function (options, source) {
|
|
|
895
945
|
createNonEnumerableProperty$1(sourceProperty, 'sham', true);
|
|
896
946
|
}
|
|
897
947
|
// extend global
|
|
898
|
-
redefine$
|
|
948
|
+
redefine$4(target, key, sourceProperty, options);
|
|
899
949
|
}
|
|
900
950
|
};
|
|
901
951
|
|
|
902
|
-
var
|
|
952
|
+
var classof$6 = classofRaw$1;
|
|
953
|
+
var global$l = global$G;
|
|
903
954
|
|
|
904
|
-
var
|
|
955
|
+
var engineIsNode = classof$6(global$l.process) == 'process';
|
|
905
956
|
|
|
906
|
-
var redefine$
|
|
957
|
+
var redefine$3 = redefine$5.exports;
|
|
907
958
|
|
|
908
959
|
var redefineAll$1 = function (target, src, options) {
|
|
909
|
-
for (var key in src) redefine$
|
|
960
|
+
for (var key in src) redefine$3(target, key, src[key], options);
|
|
910
961
|
return target;
|
|
911
962
|
};
|
|
912
963
|
|
|
913
|
-
var global$
|
|
914
|
-
var isCallable$
|
|
964
|
+
var global$k = global$G;
|
|
965
|
+
var isCallable$8 = isCallable$i;
|
|
915
966
|
|
|
916
|
-
var String$3 = global$
|
|
917
|
-
var TypeError$
|
|
967
|
+
var String$3 = global$k.String;
|
|
968
|
+
var TypeError$9 = global$k.TypeError;
|
|
918
969
|
|
|
919
970
|
var aPossiblePrototype$1 = function (argument) {
|
|
920
|
-
if (typeof argument == 'object' || isCallable$
|
|
921
|
-
throw TypeError$
|
|
971
|
+
if (typeof argument == 'object' || isCallable$8(argument)) return argument;
|
|
972
|
+
throw TypeError$9("Can't set " + String$3(argument) + ' as a prototype');
|
|
922
973
|
};
|
|
923
974
|
|
|
924
975
|
/* eslint-disable no-proto -- safe */
|
|
925
976
|
|
|
926
|
-
var uncurryThis$
|
|
927
|
-
var anObject$
|
|
977
|
+
var uncurryThis$a = functionUncurryThis;
|
|
978
|
+
var anObject$b = anObject$e;
|
|
928
979
|
var aPossiblePrototype = aPossiblePrototype$1;
|
|
929
980
|
|
|
930
981
|
// `Object.setPrototypeOf` method
|
|
931
982
|
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
932
983
|
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
933
|
-
// eslint-disable-next-line es/no-object-setprototypeof -- safe
|
|
984
|
+
// eslint-disable-next-line es-x/no-object-setprototypeof -- safe
|
|
934
985
|
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
935
986
|
var CORRECT_SETTER = false;
|
|
936
987
|
var test = {};
|
|
937
988
|
var setter;
|
|
938
989
|
try {
|
|
939
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
940
|
-
setter = uncurryThis$
|
|
990
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
991
|
+
setter = uncurryThis$a(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
941
992
|
setter(test, []);
|
|
942
993
|
CORRECT_SETTER = test instanceof Array;
|
|
943
994
|
} catch (error) { /* empty */ }
|
|
944
995
|
return function setPrototypeOf(O, proto) {
|
|
945
|
-
anObject$
|
|
996
|
+
anObject$b(O);
|
|
946
997
|
aPossiblePrototype(proto);
|
|
947
998
|
if (CORRECT_SETTER) setter(O, proto);
|
|
948
999
|
else O.__proto__ = proto;
|
|
@@ -952,9 +1003,9 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
952
1003
|
|
|
953
1004
|
var defineProperty = objectDefineProperty.f;
|
|
954
1005
|
var hasOwn$1 = hasOwnProperty_1;
|
|
955
|
-
var wellKnownSymbol$
|
|
1006
|
+
var wellKnownSymbol$d = wellKnownSymbol$f;
|
|
956
1007
|
|
|
957
|
-
var TO_STRING_TAG$2 = wellKnownSymbol$
|
|
1008
|
+
var TO_STRING_TAG$2 = wellKnownSymbol$d('toStringTag');
|
|
958
1009
|
|
|
959
1010
|
var setToStringTag$1 = function (target, TAG, STATIC) {
|
|
960
1011
|
if (target && !STATIC) target = target.prototype;
|
|
@@ -963,15 +1014,15 @@ var setToStringTag$1 = function (target, TAG, STATIC) {
|
|
|
963
1014
|
}
|
|
964
1015
|
};
|
|
965
1016
|
|
|
966
|
-
var getBuiltIn$
|
|
1017
|
+
var getBuiltIn$4 = getBuiltIn$8;
|
|
967
1018
|
var definePropertyModule$2 = objectDefineProperty;
|
|
968
|
-
var wellKnownSymbol$
|
|
1019
|
+
var wellKnownSymbol$c = wellKnownSymbol$f;
|
|
969
1020
|
var DESCRIPTORS$1 = descriptors;
|
|
970
1021
|
|
|
971
|
-
var SPECIES$3 = wellKnownSymbol$
|
|
1022
|
+
var SPECIES$3 = wellKnownSymbol$c('species');
|
|
972
1023
|
|
|
973
1024
|
var setSpecies$1 = function (CONSTRUCTOR_NAME) {
|
|
974
|
-
var Constructor = getBuiltIn$
|
|
1025
|
+
var Constructor = getBuiltIn$4(CONSTRUCTOR_NAME);
|
|
975
1026
|
var defineProperty = definePropertyModule$2.f;
|
|
976
1027
|
|
|
977
1028
|
if (DESCRIPTORS$1 && Constructor && !Constructor[SPECIES$3]) {
|
|
@@ -982,59 +1033,33 @@ var setSpecies$1 = function (CONSTRUCTOR_NAME) {
|
|
|
982
1033
|
}
|
|
983
1034
|
};
|
|
984
1035
|
|
|
985
|
-
var global$
|
|
1036
|
+
var global$j = global$G;
|
|
986
1037
|
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
987
1038
|
|
|
988
|
-
var TypeError$
|
|
1039
|
+
var TypeError$8 = global$j.TypeError;
|
|
989
1040
|
|
|
990
1041
|
var anInstance$1 = function (it, Prototype) {
|
|
991
1042
|
if (isPrototypeOf$1(Prototype, it)) return it;
|
|
992
|
-
throw TypeError$
|
|
993
|
-
};
|
|
994
|
-
|
|
995
|
-
var uncurryThis$a = functionUncurryThis;
|
|
996
|
-
var aCallable$3 = aCallable$5;
|
|
997
|
-
|
|
998
|
-
var bind$5 = uncurryThis$a(uncurryThis$a.bind);
|
|
999
|
-
|
|
1000
|
-
// optional / simple context binding
|
|
1001
|
-
var functionBindContext = function (fn, that) {
|
|
1002
|
-
aCallable$3(fn);
|
|
1003
|
-
return that === undefined ? fn : bind$5 ? bind$5(fn, that) : function (/* ...args */) {
|
|
1004
|
-
return fn.apply(that, arguments);
|
|
1005
|
-
};
|
|
1006
|
-
};
|
|
1007
|
-
|
|
1008
|
-
var iterators = {};
|
|
1009
|
-
|
|
1010
|
-
var wellKnownSymbol$a = wellKnownSymbol$e;
|
|
1011
|
-
var Iterators$1 = iterators;
|
|
1012
|
-
|
|
1013
|
-
var ITERATOR$2 = wellKnownSymbol$a('iterator');
|
|
1014
|
-
var ArrayPrototype = Array.prototype;
|
|
1015
|
-
|
|
1016
|
-
// check on default Array iterator
|
|
1017
|
-
var isArrayIteratorMethod$1 = function (it) {
|
|
1018
|
-
return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
|
|
1043
|
+
throw TypeError$8('Incorrect invocation');
|
|
1019
1044
|
};
|
|
1020
1045
|
|
|
1021
|
-
var wellKnownSymbol$
|
|
1046
|
+
var wellKnownSymbol$b = wellKnownSymbol$f;
|
|
1022
1047
|
|
|
1023
|
-
var TO_STRING_TAG$1 = wellKnownSymbol$
|
|
1048
|
+
var TO_STRING_TAG$1 = wellKnownSymbol$b('toStringTag');
|
|
1024
1049
|
var test = {};
|
|
1025
1050
|
|
|
1026
1051
|
test[TO_STRING_TAG$1] = 'z';
|
|
1027
1052
|
|
|
1028
1053
|
var toStringTagSupport = String(test) === '[object z]';
|
|
1029
1054
|
|
|
1030
|
-
var global$
|
|
1055
|
+
var global$i = global$G;
|
|
1031
1056
|
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
1032
|
-
var isCallable$
|
|
1057
|
+
var isCallable$7 = isCallable$i;
|
|
1033
1058
|
var classofRaw = classofRaw$1;
|
|
1034
|
-
var wellKnownSymbol$
|
|
1059
|
+
var wellKnownSymbol$a = wellKnownSymbol$f;
|
|
1035
1060
|
|
|
1036
|
-
var TO_STRING_TAG = wellKnownSymbol$
|
|
1037
|
-
var Object$1 = global$
|
|
1061
|
+
var TO_STRING_TAG = wellKnownSymbol$a('toStringTag');
|
|
1062
|
+
var Object$1 = global$i.Object;
|
|
1038
1063
|
|
|
1039
1064
|
// ES3 wrong here
|
|
1040
1065
|
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
@@ -1047,7 +1072,7 @@ var tryGet = function (it, key) {
|
|
|
1047
1072
|
};
|
|
1048
1073
|
|
|
1049
1074
|
// getting tag from ES6+ `Object.prototype.toString`
|
|
1050
|
-
var classof$
|
|
1075
|
+
var classof$5 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
1051
1076
|
var O, tag, result;
|
|
1052
1077
|
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
1053
1078
|
// @@toStringTag case
|
|
@@ -1055,183 +1080,25 @@ var classof$6 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
|
1055
1080
|
// builtinTag case
|
|
1056
1081
|
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
1057
1082
|
// ES3 arguments fallback
|
|
1058
|
-
: (result = classofRaw(O)) == 'Object' && isCallable$
|
|
1059
|
-
};
|
|
1060
|
-
|
|
1061
|
-
var classof$5 = classof$6;
|
|
1062
|
-
var getMethod$4 = getMethod$6;
|
|
1063
|
-
var Iterators = iterators;
|
|
1064
|
-
var wellKnownSymbol$7 = wellKnownSymbol$e;
|
|
1065
|
-
|
|
1066
|
-
var ITERATOR$1 = wellKnownSymbol$7('iterator');
|
|
1067
|
-
|
|
1068
|
-
var getIteratorMethod$2 = function (it) {
|
|
1069
|
-
if (it != undefined) return getMethod$4(it, ITERATOR$1)
|
|
1070
|
-
|| getMethod$4(it, '@@iterator')
|
|
1071
|
-
|| Iterators[classof$5(it)];
|
|
1072
|
-
};
|
|
1073
|
-
|
|
1074
|
-
var global$g = global$F;
|
|
1075
|
-
var call$9 = functionCall;
|
|
1076
|
-
var aCallable$2 = aCallable$5;
|
|
1077
|
-
var anObject$b = anObject$f;
|
|
1078
|
-
var tryToString$2 = tryToString$4;
|
|
1079
|
-
var getIteratorMethod$1 = getIteratorMethod$2;
|
|
1080
|
-
|
|
1081
|
-
var TypeError$6 = global$g.TypeError;
|
|
1082
|
-
|
|
1083
|
-
var getIterator$1 = function (argument, usingIterator) {
|
|
1084
|
-
var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
|
|
1085
|
-
if (aCallable$2(iteratorMethod)) return anObject$b(call$9(iteratorMethod, argument));
|
|
1086
|
-
throw TypeError$6(tryToString$2(argument) + ' is not iterable');
|
|
1087
|
-
};
|
|
1088
|
-
|
|
1089
|
-
var call$8 = functionCall;
|
|
1090
|
-
var anObject$a = anObject$f;
|
|
1091
|
-
var getMethod$3 = getMethod$6;
|
|
1092
|
-
|
|
1093
|
-
var iteratorClose$1 = function (iterator, kind, value) {
|
|
1094
|
-
var innerResult, innerError;
|
|
1095
|
-
anObject$a(iterator);
|
|
1096
|
-
try {
|
|
1097
|
-
innerResult = getMethod$3(iterator, 'return');
|
|
1098
|
-
if (!innerResult) {
|
|
1099
|
-
if (kind === 'throw') throw value;
|
|
1100
|
-
return value;
|
|
1101
|
-
}
|
|
1102
|
-
innerResult = call$8(innerResult, iterator);
|
|
1103
|
-
} catch (error) {
|
|
1104
|
-
innerError = true;
|
|
1105
|
-
innerResult = error;
|
|
1106
|
-
}
|
|
1107
|
-
if (kind === 'throw') throw value;
|
|
1108
|
-
if (innerError) throw innerResult;
|
|
1109
|
-
anObject$a(innerResult);
|
|
1110
|
-
return value;
|
|
1111
|
-
};
|
|
1112
|
-
|
|
1113
|
-
var global$f = global$F;
|
|
1114
|
-
var bind$4 = functionBindContext;
|
|
1115
|
-
var call$7 = functionCall;
|
|
1116
|
-
var anObject$9 = anObject$f;
|
|
1117
|
-
var tryToString$1 = tryToString$4;
|
|
1118
|
-
var isArrayIteratorMethod = isArrayIteratorMethod$1;
|
|
1119
|
-
var lengthOfArrayLike$1 = lengthOfArrayLike$3;
|
|
1120
|
-
var isPrototypeOf = objectIsPrototypeOf;
|
|
1121
|
-
var getIterator = getIterator$1;
|
|
1122
|
-
var getIteratorMethod = getIteratorMethod$2;
|
|
1123
|
-
var iteratorClose = iteratorClose$1;
|
|
1124
|
-
|
|
1125
|
-
var TypeError$5 = global$f.TypeError;
|
|
1126
|
-
|
|
1127
|
-
var Result = function (stopped, result) {
|
|
1128
|
-
this.stopped = stopped;
|
|
1129
|
-
this.result = result;
|
|
1130
|
-
};
|
|
1131
|
-
|
|
1132
|
-
var ResultPrototype = Result.prototype;
|
|
1133
|
-
|
|
1134
|
-
var iterate$1 = function (iterable, unboundFunction, options) {
|
|
1135
|
-
var that = options && options.that;
|
|
1136
|
-
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
|
1137
|
-
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
1138
|
-
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
1139
|
-
var fn = bind$4(unboundFunction, that);
|
|
1140
|
-
var iterator, iterFn, index, length, result, next, step;
|
|
1141
|
-
|
|
1142
|
-
var stop = function (condition) {
|
|
1143
|
-
if (iterator) iteratorClose(iterator, 'normal', condition);
|
|
1144
|
-
return new Result(true, condition);
|
|
1145
|
-
};
|
|
1146
|
-
|
|
1147
|
-
var callFn = function (value) {
|
|
1148
|
-
if (AS_ENTRIES) {
|
|
1149
|
-
anObject$9(value);
|
|
1150
|
-
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
|
|
1151
|
-
} return INTERRUPTED ? fn(value, stop) : fn(value);
|
|
1152
|
-
};
|
|
1153
|
-
|
|
1154
|
-
if (IS_ITERATOR) {
|
|
1155
|
-
iterator = iterable;
|
|
1156
|
-
} else {
|
|
1157
|
-
iterFn = getIteratorMethod(iterable);
|
|
1158
|
-
if (!iterFn) throw TypeError$5(tryToString$1(iterable) + ' is not iterable');
|
|
1159
|
-
// optimisation for array iterators
|
|
1160
|
-
if (isArrayIteratorMethod(iterFn)) {
|
|
1161
|
-
for (index = 0, length = lengthOfArrayLike$1(iterable); length > index; index++) {
|
|
1162
|
-
result = callFn(iterable[index]);
|
|
1163
|
-
if (result && isPrototypeOf(ResultPrototype, result)) return result;
|
|
1164
|
-
} return new Result(false);
|
|
1165
|
-
}
|
|
1166
|
-
iterator = getIterator(iterable, iterFn);
|
|
1167
|
-
}
|
|
1168
|
-
|
|
1169
|
-
next = iterator.next;
|
|
1170
|
-
while (!(step = call$7(next, iterator)).done) {
|
|
1171
|
-
try {
|
|
1172
|
-
result = callFn(step.value);
|
|
1173
|
-
} catch (error) {
|
|
1174
|
-
iteratorClose(iterator, 'throw', error);
|
|
1175
|
-
}
|
|
1176
|
-
if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
|
|
1177
|
-
} return new Result(false);
|
|
1178
|
-
};
|
|
1179
|
-
|
|
1180
|
-
var wellKnownSymbol$6 = wellKnownSymbol$e;
|
|
1181
|
-
|
|
1182
|
-
var ITERATOR = wellKnownSymbol$6('iterator');
|
|
1183
|
-
var SAFE_CLOSING = false;
|
|
1184
|
-
|
|
1185
|
-
try {
|
|
1186
|
-
var called = 0;
|
|
1187
|
-
var iteratorWithReturn = {
|
|
1188
|
-
next: function () {
|
|
1189
|
-
return { done: !!called++ };
|
|
1190
|
-
},
|
|
1191
|
-
'return': function () {
|
|
1192
|
-
SAFE_CLOSING = true;
|
|
1193
|
-
}
|
|
1194
|
-
};
|
|
1195
|
-
iteratorWithReturn[ITERATOR] = function () {
|
|
1196
|
-
return this;
|
|
1197
|
-
};
|
|
1198
|
-
// eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
|
|
1199
|
-
Array.from(iteratorWithReturn, function () { throw 2; });
|
|
1200
|
-
} catch (error) { /* empty */ }
|
|
1201
|
-
|
|
1202
|
-
var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
|
|
1203
|
-
if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
|
|
1204
|
-
var ITERATION_SUPPORT = false;
|
|
1205
|
-
try {
|
|
1206
|
-
var object = {};
|
|
1207
|
-
object[ITERATOR] = function () {
|
|
1208
|
-
return {
|
|
1209
|
-
next: function () {
|
|
1210
|
-
return { done: ITERATION_SUPPORT = true };
|
|
1211
|
-
}
|
|
1212
|
-
};
|
|
1213
|
-
};
|
|
1214
|
-
exec(object);
|
|
1215
|
-
} catch (error) { /* empty */ }
|
|
1216
|
-
return ITERATION_SUPPORT;
|
|
1083
|
+
: (result = classofRaw(O)) == 'Object' && isCallable$7(O.callee) ? 'Arguments' : result;
|
|
1217
1084
|
};
|
|
1218
1085
|
|
|
1219
1086
|
var uncurryThis$9 = functionUncurryThis;
|
|
1220
|
-
var fails$
|
|
1221
|
-
var isCallable$
|
|
1222
|
-
var classof$4 = classof$
|
|
1223
|
-
var getBuiltIn$
|
|
1087
|
+
var fails$6 = fails$e;
|
|
1088
|
+
var isCallable$6 = isCallable$i;
|
|
1089
|
+
var classof$4 = classof$5;
|
|
1090
|
+
var getBuiltIn$3 = getBuiltIn$8;
|
|
1224
1091
|
var inspectSource$1 = inspectSource$4;
|
|
1225
1092
|
|
|
1226
1093
|
var noop = function () { /* empty */ };
|
|
1227
1094
|
var empty = [];
|
|
1228
|
-
var construct = getBuiltIn$
|
|
1095
|
+
var construct = getBuiltIn$3('Reflect', 'construct');
|
|
1229
1096
|
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
1230
|
-
var exec$
|
|
1097
|
+
var exec$1 = uncurryThis$9(constructorRegExp.exec);
|
|
1231
1098
|
var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
|
|
1232
1099
|
|
|
1233
1100
|
var isConstructorModern = function isConstructor(argument) {
|
|
1234
|
-
if (!isCallable$
|
|
1101
|
+
if (!isCallable$6(argument)) return false;
|
|
1235
1102
|
try {
|
|
1236
1103
|
construct(noop, empty, argument);
|
|
1237
1104
|
return true;
|
|
@@ -1241,7 +1108,7 @@ var isConstructorModern = function isConstructor(argument) {
|
|
|
1241
1108
|
};
|
|
1242
1109
|
|
|
1243
1110
|
var isConstructorLegacy = function isConstructor(argument) {
|
|
1244
|
-
if (!isCallable$
|
|
1111
|
+
if (!isCallable$6(argument)) return false;
|
|
1245
1112
|
switch (classof$4(argument)) {
|
|
1246
1113
|
case 'AsyncFunction':
|
|
1247
1114
|
case 'GeneratorFunction':
|
|
@@ -1251,7 +1118,7 @@ var isConstructorLegacy = function isConstructor(argument) {
|
|
|
1251
1118
|
// we can't check .prototype since constructors produced by .bind haven't it
|
|
1252
1119
|
// `Function#toString` throws on some built-it function in some legacy engines
|
|
1253
1120
|
// (for example, `DOMQuad` and similar in FF41-)
|
|
1254
|
-
return INCORRECT_TO_STRING || !!exec$
|
|
1121
|
+
return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource$1(argument));
|
|
1255
1122
|
} catch (error) {
|
|
1256
1123
|
return true;
|
|
1257
1124
|
}
|
|
@@ -1261,7 +1128,7 @@ isConstructorLegacy.sham = true;
|
|
|
1261
1128
|
|
|
1262
1129
|
// `IsConstructor` abstract operation
|
|
1263
1130
|
// https://tc39.es/ecma262/#sec-isconstructor
|
|
1264
|
-
var isConstructor$1 = !construct || fails$
|
|
1131
|
+
var isConstructor$1 = !construct || fails$6(function () {
|
|
1265
1132
|
var called;
|
|
1266
1133
|
return isConstructorModern(isConstructorModern.call)
|
|
1267
1134
|
|| !isConstructorModern(Object)
|
|
@@ -1269,78 +1136,98 @@ var isConstructor$1 = !construct || fails$7(function () {
|
|
|
1269
1136
|
|| called;
|
|
1270
1137
|
}) ? isConstructorLegacy : isConstructorModern;
|
|
1271
1138
|
|
|
1272
|
-
var global$
|
|
1139
|
+
var global$h = global$G;
|
|
1273
1140
|
var isConstructor = isConstructor$1;
|
|
1274
|
-
var tryToString = tryToString$4;
|
|
1141
|
+
var tryToString$2 = tryToString$4;
|
|
1275
1142
|
|
|
1276
|
-
var TypeError$
|
|
1143
|
+
var TypeError$7 = global$h.TypeError;
|
|
1277
1144
|
|
|
1278
1145
|
// `Assert: IsConstructor(argument) is true`
|
|
1279
1146
|
var aConstructor$1 = function (argument) {
|
|
1280
1147
|
if (isConstructor(argument)) return argument;
|
|
1281
|
-
throw TypeError$
|
|
1148
|
+
throw TypeError$7(tryToString$2(argument) + ' is not a constructor');
|
|
1282
1149
|
};
|
|
1283
1150
|
|
|
1284
|
-
var anObject$
|
|
1151
|
+
var anObject$a = anObject$e;
|
|
1285
1152
|
var aConstructor = aConstructor$1;
|
|
1286
|
-
var wellKnownSymbol$
|
|
1153
|
+
var wellKnownSymbol$9 = wellKnownSymbol$f;
|
|
1287
1154
|
|
|
1288
|
-
var SPECIES$2 = wellKnownSymbol$
|
|
1155
|
+
var SPECIES$2 = wellKnownSymbol$9('species');
|
|
1289
1156
|
|
|
1290
1157
|
// `SpeciesConstructor` abstract operation
|
|
1291
1158
|
// https://tc39.es/ecma262/#sec-speciesconstructor
|
|
1292
|
-
var speciesConstructor$
|
|
1293
|
-
var C = anObject$
|
|
1159
|
+
var speciesConstructor$1 = function (O, defaultConstructor) {
|
|
1160
|
+
var C = anObject$a(O).constructor;
|
|
1294
1161
|
var S;
|
|
1295
|
-
return C === undefined || (S = anObject$
|
|
1162
|
+
return C === undefined || (S = anObject$a(C)[SPECIES$2]) == undefined ? defaultConstructor : aConstructor(S);
|
|
1296
1163
|
};
|
|
1297
1164
|
|
|
1165
|
+
var NATIVE_BIND$1 = functionBindNative;
|
|
1166
|
+
|
|
1298
1167
|
var FunctionPrototype = Function.prototype;
|
|
1299
|
-
var apply$
|
|
1300
|
-
var
|
|
1301
|
-
var call$6 = FunctionPrototype.call;
|
|
1168
|
+
var apply$2 = FunctionPrototype.apply;
|
|
1169
|
+
var call$b = FunctionPrototype.call;
|
|
1302
1170
|
|
|
1303
|
-
// eslint-disable-next-line es/no-reflect -- safe
|
|
1304
|
-
var functionApply = typeof Reflect == 'object' && Reflect.apply || (
|
|
1305
|
-
return call$
|
|
1171
|
+
// eslint-disable-next-line es-x/no-reflect -- safe
|
|
1172
|
+
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$b.bind(apply$2) : function () {
|
|
1173
|
+
return call$b.apply(apply$2, arguments);
|
|
1306
1174
|
});
|
|
1307
1175
|
|
|
1308
|
-
var
|
|
1176
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
1177
|
+
var aCallable$5 = aCallable$7;
|
|
1178
|
+
var NATIVE_BIND = functionBindNative;
|
|
1309
1179
|
|
|
1310
|
-
var
|
|
1180
|
+
var bind$4 = uncurryThis$8(uncurryThis$8.bind);
|
|
1311
1181
|
|
|
1312
|
-
|
|
1182
|
+
// optional / simple context binding
|
|
1183
|
+
var functionBindContext = function (fn, that) {
|
|
1184
|
+
aCallable$5(fn);
|
|
1185
|
+
return that === undefined ? fn : NATIVE_BIND ? bind$4(fn, that) : function (/* ...args */) {
|
|
1186
|
+
return fn.apply(that, arguments);
|
|
1187
|
+
};
|
|
1188
|
+
};
|
|
1313
1189
|
|
|
1314
|
-
var
|
|
1190
|
+
var getBuiltIn$2 = getBuiltIn$8;
|
|
1315
1191
|
|
|
1316
|
-
var
|
|
1192
|
+
var html$2 = getBuiltIn$2('document', 'documentElement');
|
|
1317
1193
|
|
|
1318
|
-
var
|
|
1194
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
1319
1195
|
|
|
1320
|
-
var
|
|
1321
|
-
var global$d = global$F;
|
|
1196
|
+
var arraySlice$1 = uncurryThis$7([].slice);
|
|
1322
1197
|
|
|
1323
|
-
var
|
|
1198
|
+
var global$g = global$G;
|
|
1324
1199
|
|
|
1325
|
-
var
|
|
1326
|
-
|
|
1327
|
-
var
|
|
1328
|
-
|
|
1200
|
+
var TypeError$6 = global$g.TypeError;
|
|
1201
|
+
|
|
1202
|
+
var validateArgumentsLength$1 = function (passed, required) {
|
|
1203
|
+
if (passed < required) throw TypeError$6('Not enough arguments');
|
|
1204
|
+
return passed;
|
|
1205
|
+
};
|
|
1206
|
+
|
|
1207
|
+
var userAgent$2 = engineUserAgent;
|
|
1208
|
+
|
|
1209
|
+
var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
|
|
1210
|
+
|
|
1211
|
+
var global$f = global$G;
|
|
1212
|
+
var apply$1 = functionApply;
|
|
1213
|
+
var bind$3 = functionBindContext;
|
|
1214
|
+
var isCallable$5 = isCallable$i;
|
|
1329
1215
|
var hasOwn = hasOwnProperty_1;
|
|
1330
|
-
var fails$
|
|
1216
|
+
var fails$5 = fails$e;
|
|
1331
1217
|
var html$1 = html$2;
|
|
1332
|
-
var arraySlice
|
|
1218
|
+
var arraySlice = arraySlice$1;
|
|
1333
1219
|
var createElement = documentCreateElement$1;
|
|
1220
|
+
var validateArgumentsLength = validateArgumentsLength$1;
|
|
1334
1221
|
var IS_IOS$1 = engineIsIos;
|
|
1335
1222
|
var IS_NODE$2 = engineIsNode;
|
|
1336
1223
|
|
|
1337
|
-
var set = global$
|
|
1338
|
-
var clear = global$
|
|
1339
|
-
var process$2 = global$
|
|
1340
|
-
var Dispatch = global$
|
|
1341
|
-
var Function$1 = global$
|
|
1342
|
-
var MessageChannel = global$
|
|
1343
|
-
var String$2 = global$
|
|
1224
|
+
var set = global$f.setImmediate;
|
|
1225
|
+
var clear = global$f.clearImmediate;
|
|
1226
|
+
var process$2 = global$f.process;
|
|
1227
|
+
var Dispatch = global$f.Dispatch;
|
|
1228
|
+
var Function$1 = global$f.Function;
|
|
1229
|
+
var MessageChannel = global$f.MessageChannel;
|
|
1230
|
+
var String$2 = global$f.String;
|
|
1344
1231
|
var counter = 0;
|
|
1345
1232
|
var queue$1 = {};
|
|
1346
1233
|
var ONREADYSTATECHANGE = 'onreadystatechange';
|
|
@@ -1348,7 +1235,7 @@ var location, defer, channel, port;
|
|
|
1348
1235
|
|
|
1349
1236
|
try {
|
|
1350
1237
|
// Deno throws a ReferenceError on `location` access without `--location` flag
|
|
1351
|
-
location = global$
|
|
1238
|
+
location = global$f.location;
|
|
1352
1239
|
} catch (error) { /* empty */ }
|
|
1353
1240
|
|
|
1354
1241
|
var run = function (id) {
|
|
@@ -1371,15 +1258,17 @@ var listener = function (event) {
|
|
|
1371
1258
|
|
|
1372
1259
|
var post = function (id) {
|
|
1373
1260
|
// old engines have not location.origin
|
|
1374
|
-
global$
|
|
1261
|
+
global$f.postMessage(String$2(id), location.protocol + '//' + location.host);
|
|
1375
1262
|
};
|
|
1376
1263
|
|
|
1377
1264
|
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
|
|
1378
1265
|
if (!set || !clear) {
|
|
1379
|
-
set = function setImmediate(
|
|
1380
|
-
|
|
1266
|
+
set = function setImmediate(handler) {
|
|
1267
|
+
validateArgumentsLength(arguments.length, 1);
|
|
1268
|
+
var fn = isCallable$5(handler) ? handler : Function$1(handler);
|
|
1269
|
+
var args = arraySlice(arguments, 1);
|
|
1381
1270
|
queue$1[++counter] = function () {
|
|
1382
|
-
apply$
|
|
1271
|
+
apply$1(fn, undefined, args);
|
|
1383
1272
|
};
|
|
1384
1273
|
defer(counter);
|
|
1385
1274
|
return counter;
|
|
@@ -1403,18 +1292,18 @@ if (!set || !clear) {
|
|
|
1403
1292
|
channel = new MessageChannel();
|
|
1404
1293
|
port = channel.port2;
|
|
1405
1294
|
channel.port1.onmessage = listener;
|
|
1406
|
-
defer = bind$
|
|
1295
|
+
defer = bind$3(port.postMessage, port);
|
|
1407
1296
|
// Browsers with postMessage, skip WebWorkers
|
|
1408
1297
|
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
1409
1298
|
} else if (
|
|
1410
|
-
global$
|
|
1411
|
-
isCallable$
|
|
1412
|
-
!global$
|
|
1299
|
+
global$f.addEventListener &&
|
|
1300
|
+
isCallable$5(global$f.postMessage) &&
|
|
1301
|
+
!global$f.importScripts &&
|
|
1413
1302
|
location && location.protocol !== 'file:' &&
|
|
1414
|
-
!fails$
|
|
1303
|
+
!fails$5(post)
|
|
1415
1304
|
) {
|
|
1416
1305
|
defer = post;
|
|
1417
|
-
global$
|
|
1306
|
+
global$f.addEventListener('message', listener, false);
|
|
1418
1307
|
// IE8-
|
|
1419
1308
|
} else if (ONREADYSTATECHANGE in createElement('script')) {
|
|
1420
1309
|
defer = function (id) {
|
|
@@ -1437,16 +1326,16 @@ var task$1 = {
|
|
|
1437
1326
|
};
|
|
1438
1327
|
|
|
1439
1328
|
var userAgent$1 = engineUserAgent;
|
|
1440
|
-
var global$
|
|
1329
|
+
var global$e = global$G;
|
|
1441
1330
|
|
|
1442
|
-
var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && global$
|
|
1331
|
+
var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && global$e.Pebble !== undefined;
|
|
1443
1332
|
|
|
1444
1333
|
var userAgent = engineUserAgent;
|
|
1445
1334
|
|
|
1446
1335
|
var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
|
|
1447
1336
|
|
|
1448
|
-
var global$
|
|
1449
|
-
var bind$
|
|
1337
|
+
var global$d = global$G;
|
|
1338
|
+
var bind$2 = functionBindContext;
|
|
1450
1339
|
var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
|
|
1451
1340
|
var macrotask = task$1.set;
|
|
1452
1341
|
var IS_IOS = engineIsIos;
|
|
@@ -1454,12 +1343,12 @@ var IS_IOS_PEBBLE = engineIsIosPebble;
|
|
|
1454
1343
|
var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
|
|
1455
1344
|
var IS_NODE$1 = engineIsNode;
|
|
1456
1345
|
|
|
1457
|
-
var MutationObserver = global$
|
|
1458
|
-
var document$2 = global$
|
|
1459
|
-
var process$1 = global$
|
|
1460
|
-
var Promise$1 = global$
|
|
1346
|
+
var MutationObserver = global$d.MutationObserver || global$d.WebKitMutationObserver;
|
|
1347
|
+
var document$2 = global$d.document;
|
|
1348
|
+
var process$1 = global$d.process;
|
|
1349
|
+
var Promise$1 = global$d.Promise;
|
|
1461
1350
|
// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
|
|
1462
|
-
var queueMicrotaskDescriptor = getOwnPropertyDescriptor$2(global$
|
|
1351
|
+
var queueMicrotaskDescriptor = getOwnPropertyDescriptor$2(global$d, 'queueMicrotask');
|
|
1463
1352
|
var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
|
|
1464
1353
|
|
|
1465
1354
|
var flush, head, last, notify$1, toggle, node, promise, then;
|
|
@@ -1498,7 +1387,7 @@ if (!queueMicrotask) {
|
|
|
1498
1387
|
promise = Promise$1.resolve(undefined);
|
|
1499
1388
|
// workaround of WebKit ~ iOS Safari 10.1 bug
|
|
1500
1389
|
promise.constructor = Promise$1;
|
|
1501
|
-
then = bind$
|
|
1390
|
+
then = bind$2(promise.then, promise);
|
|
1502
1391
|
notify$1 = function () {
|
|
1503
1392
|
then(flush);
|
|
1504
1393
|
};
|
|
@@ -1510,12 +1399,12 @@ if (!queueMicrotask) {
|
|
|
1510
1399
|
// for other environments - macrotask based on:
|
|
1511
1400
|
// - setImmediate
|
|
1512
1401
|
// - MessageChannel
|
|
1513
|
-
// - window.
|
|
1402
|
+
// - window.postMessage
|
|
1514
1403
|
// - onreadystatechange
|
|
1515
1404
|
// - setTimeout
|
|
1516
1405
|
} else {
|
|
1517
1406
|
// strange IE + webpack dev server bug - use .bind(global)
|
|
1518
|
-
macrotask = bind$
|
|
1407
|
+
macrotask = bind$2(macrotask, global$d);
|
|
1519
1408
|
notify$1 = function () {
|
|
1520
1409
|
macrotask(flush);
|
|
1521
1410
|
};
|
|
@@ -1531,50 +1420,16 @@ var microtask$1 = queueMicrotask || function (fn) {
|
|
|
1531
1420
|
} last = task;
|
|
1532
1421
|
};
|
|
1533
1422
|
|
|
1534
|
-
var
|
|
1535
|
-
|
|
1536
|
-
var aCallable$1 = aCallable$5;
|
|
1537
|
-
|
|
1538
|
-
var PromiseCapability = function (C) {
|
|
1539
|
-
var resolve, reject;
|
|
1540
|
-
this.promise = new C(function ($$resolve, $$reject) {
|
|
1541
|
-
if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
|
|
1542
|
-
resolve = $$resolve;
|
|
1543
|
-
reject = $$reject;
|
|
1544
|
-
});
|
|
1545
|
-
this.resolve = aCallable$1(resolve);
|
|
1546
|
-
this.reject = aCallable$1(reject);
|
|
1547
|
-
};
|
|
1548
|
-
|
|
1549
|
-
// `NewPromiseCapability` abstract operation
|
|
1550
|
-
// https://tc39.es/ecma262/#sec-newpromisecapability
|
|
1551
|
-
newPromiseCapability$2.f = function (C) {
|
|
1552
|
-
return new PromiseCapability(C);
|
|
1553
|
-
};
|
|
1554
|
-
|
|
1555
|
-
var anObject$7 = anObject$f;
|
|
1556
|
-
var isObject$2 = isObject$8;
|
|
1557
|
-
var newPromiseCapability$1 = newPromiseCapability$2;
|
|
1558
|
-
|
|
1559
|
-
var promiseResolve$1 = function (C, x) {
|
|
1560
|
-
anObject$7(C);
|
|
1561
|
-
if (isObject$2(x) && x.constructor === C) return x;
|
|
1562
|
-
var promiseCapability = newPromiseCapability$1.f(C);
|
|
1563
|
-
var resolve = promiseCapability.resolve;
|
|
1564
|
-
resolve(x);
|
|
1565
|
-
return promiseCapability.promise;
|
|
1566
|
-
};
|
|
1567
|
-
|
|
1568
|
-
var global$9 = global$F;
|
|
1423
|
+
var global$c = global$G;
|
|
1569
1424
|
|
|
1570
1425
|
var hostReportErrors$1 = function (a, b) {
|
|
1571
|
-
var console = global$
|
|
1426
|
+
var console = global$c.console;
|
|
1572
1427
|
if (console && console.error) {
|
|
1573
1428
|
arguments.length == 1 ? console.error(a) : console.error(a, b);
|
|
1574
1429
|
}
|
|
1575
1430
|
};
|
|
1576
1431
|
|
|
1577
|
-
var perform$
|
|
1432
|
+
var perform$3 = function (exec) {
|
|
1578
1433
|
try {
|
|
1579
1434
|
return { error: false, value: exec() };
|
|
1580
1435
|
} catch (error) {
|
|
@@ -1606,71 +1461,29 @@ Queue$1.prototype = {
|
|
|
1606
1461
|
|
|
1607
1462
|
var queue = Queue$1;
|
|
1608
1463
|
|
|
1609
|
-
var
|
|
1464
|
+
var global$b = global$G;
|
|
1610
1465
|
|
|
1611
|
-
var
|
|
1612
|
-
|
|
1613
|
-
var
|
|
1614
|
-
|
|
1615
|
-
var
|
|
1616
|
-
var
|
|
1617
|
-
var
|
|
1618
|
-
var setPrototypeOf = objectSetPrototypeOf;
|
|
1619
|
-
var setToStringTag = setToStringTag$1;
|
|
1620
|
-
var setSpecies = setSpecies$1;
|
|
1621
|
-
var aCallable = aCallable$5;
|
|
1622
|
-
var isCallable$2 = isCallable$g;
|
|
1623
|
-
var isObject$1 = isObject$8;
|
|
1624
|
-
var anInstance = anInstance$1;
|
|
1625
|
-
var inspectSource = inspectSource$4;
|
|
1626
|
-
var iterate = iterate$1;
|
|
1627
|
-
var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
|
|
1628
|
-
var speciesConstructor$1 = speciesConstructor$2;
|
|
1629
|
-
var task = task$1.set;
|
|
1630
|
-
var microtask = microtask$1;
|
|
1631
|
-
var promiseResolve = promiseResolve$1;
|
|
1632
|
-
var hostReportErrors = hostReportErrors$1;
|
|
1633
|
-
var newPromiseCapabilityModule = newPromiseCapability$2;
|
|
1634
|
-
var perform = perform$1;
|
|
1635
|
-
var Queue = queue;
|
|
1636
|
-
var InternalStateModule = internalState;
|
|
1466
|
+
var promiseNativeConstructor = global$b.Promise;
|
|
1467
|
+
|
|
1468
|
+
var engineIsBrowser = typeof window == 'object' && typeof Deno != 'object';
|
|
1469
|
+
|
|
1470
|
+
var global$a = global$G;
|
|
1471
|
+
var NativePromiseConstructor$3 = promiseNativeConstructor;
|
|
1472
|
+
var isCallable$4 = isCallable$i;
|
|
1637
1473
|
var isForced = isForced_1;
|
|
1638
|
-
var
|
|
1474
|
+
var inspectSource = inspectSource$4;
|
|
1475
|
+
var wellKnownSymbol$8 = wellKnownSymbol$f;
|
|
1639
1476
|
var IS_BROWSER = engineIsBrowser;
|
|
1640
|
-
var IS_NODE = engineIsNode;
|
|
1641
1477
|
var V8_VERSION = engineV8Version;
|
|
1642
1478
|
|
|
1643
|
-
|
|
1644
|
-
var
|
|
1645
|
-
|
|
1646
|
-
var getInternalState$1 = InternalStateModule.getterFor(PROMISE);
|
|
1647
|
-
var setInternalState = InternalStateModule.set;
|
|
1648
|
-
var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
|
|
1649
|
-
var NativePromisePrototype = NativePromise && NativePromise.prototype;
|
|
1650
|
-
var PromiseConstructor = NativePromise;
|
|
1651
|
-
var PromisePrototype = NativePromisePrototype;
|
|
1652
|
-
var TypeError$3 = global$8.TypeError;
|
|
1653
|
-
var document$1 = global$8.document;
|
|
1654
|
-
var process = global$8.process;
|
|
1655
|
-
var newPromiseCapability = newPromiseCapabilityModule.f;
|
|
1656
|
-
var newGenericPromiseCapability = newPromiseCapability;
|
|
1657
|
-
|
|
1658
|
-
var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$8.dispatchEvent);
|
|
1659
|
-
var NATIVE_REJECTION_EVENT = isCallable$2(global$8.PromiseRejectionEvent);
|
|
1660
|
-
var UNHANDLED_REJECTION = 'unhandledrejection';
|
|
1661
|
-
var REJECTION_HANDLED = 'rejectionhandled';
|
|
1662
|
-
var PENDING = 0;
|
|
1663
|
-
var FULFILLED = 1;
|
|
1664
|
-
var REJECTED = 2;
|
|
1665
|
-
var HANDLED = 1;
|
|
1666
|
-
var UNHANDLED = 2;
|
|
1479
|
+
NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
|
|
1480
|
+
var SPECIES$1 = wellKnownSymbol$8('species');
|
|
1667
1481
|
var SUBCLASSING = false;
|
|
1482
|
+
var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$4(global$a.PromiseRejectionEvent);
|
|
1668
1483
|
|
|
1669
|
-
var
|
|
1670
|
-
|
|
1671
|
-
var
|
|
1672
|
-
var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor);
|
|
1673
|
-
var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor);
|
|
1484
|
+
var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
|
|
1485
|
+
var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
|
|
1486
|
+
var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$3);
|
|
1674
1487
|
// V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
|
|
1675
1488
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
|
|
1676
1489
|
// We can't detect it synchronously, so just check versions
|
|
@@ -1680,7 +1493,7 @@ var FORCED = isForced(PROMISE, function () {
|
|
|
1680
1493
|
// https://github.com/zloirock/core-js/issues/679
|
|
1681
1494
|
if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false;
|
|
1682
1495
|
// Detect correctness of subclassing with @@species support
|
|
1683
|
-
var promise = new
|
|
1496
|
+
var promise = new NativePromiseConstructor$3(function (resolve) { resolve(1); });
|
|
1684
1497
|
var FakePromise = function (exec) {
|
|
1685
1498
|
exec(function () { /* empty */ }, function () { /* empty */ });
|
|
1686
1499
|
};
|
|
@@ -1689,17 +1502,90 @@ var FORCED = isForced(PROMISE, function () {
|
|
|
1689
1502
|
SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
|
|
1690
1503
|
if (!SUBCLASSING) return true;
|
|
1691
1504
|
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
1692
|
-
return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !
|
|
1505
|
+
return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_PROMISE_REJECTION_EVENT$1;
|
|
1693
1506
|
});
|
|
1694
1507
|
|
|
1695
|
-
var
|
|
1696
|
-
|
|
1697
|
-
|
|
1508
|
+
var promiseConstructorDetection = {
|
|
1509
|
+
CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR$5,
|
|
1510
|
+
REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT$1,
|
|
1511
|
+
SUBCLASSING: SUBCLASSING
|
|
1512
|
+
};
|
|
1513
|
+
|
|
1514
|
+
var newPromiseCapability$2 = {};
|
|
1515
|
+
|
|
1516
|
+
var aCallable$4 = aCallable$7;
|
|
1517
|
+
|
|
1518
|
+
var PromiseCapability = function (C) {
|
|
1519
|
+
var resolve, reject;
|
|
1520
|
+
this.promise = new C(function ($$resolve, $$reject) {
|
|
1521
|
+
if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
|
|
1522
|
+
resolve = $$resolve;
|
|
1523
|
+
reject = $$reject;
|
|
1524
|
+
});
|
|
1525
|
+
this.resolve = aCallable$4(resolve);
|
|
1526
|
+
this.reject = aCallable$4(reject);
|
|
1527
|
+
};
|
|
1528
|
+
|
|
1529
|
+
// `NewPromiseCapability` abstract operation
|
|
1530
|
+
// https://tc39.es/ecma262/#sec-newpromisecapability
|
|
1531
|
+
newPromiseCapability$2.f = function (C) {
|
|
1532
|
+
return new PromiseCapability(C);
|
|
1533
|
+
};
|
|
1534
|
+
|
|
1535
|
+
var $$9 = _export;
|
|
1536
|
+
var IS_NODE = engineIsNode;
|
|
1537
|
+
var global$9 = global$G;
|
|
1538
|
+
var call$a = functionCall;
|
|
1539
|
+
var redefine$2 = redefine$5.exports;
|
|
1540
|
+
var redefineAll = redefineAll$1;
|
|
1541
|
+
var setPrototypeOf = objectSetPrototypeOf;
|
|
1542
|
+
var setToStringTag = setToStringTag$1;
|
|
1543
|
+
var setSpecies = setSpecies$1;
|
|
1544
|
+
var aCallable$3 = aCallable$7;
|
|
1545
|
+
var isCallable$3 = isCallable$i;
|
|
1546
|
+
var isObject$2 = isObject$8;
|
|
1547
|
+
var anInstance = anInstance$1;
|
|
1548
|
+
var speciesConstructor = speciesConstructor$1;
|
|
1549
|
+
var task = task$1.set;
|
|
1550
|
+
var microtask = microtask$1;
|
|
1551
|
+
var hostReportErrors = hostReportErrors$1;
|
|
1552
|
+
var perform$2 = perform$3;
|
|
1553
|
+
var Queue = queue;
|
|
1554
|
+
var InternalStateModule = internalState;
|
|
1555
|
+
var NativePromiseConstructor$2 = promiseNativeConstructor;
|
|
1556
|
+
var PromiseConstructorDetection = promiseConstructorDetection;
|
|
1557
|
+
var newPromiseCapabilityModule$3 = newPromiseCapability$2;
|
|
1558
|
+
|
|
1559
|
+
var PROMISE = 'Promise';
|
|
1560
|
+
var FORCED_PROMISE_CONSTRUCTOR$4 = PromiseConstructorDetection.CONSTRUCTOR;
|
|
1561
|
+
var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
|
|
1562
|
+
var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
|
|
1563
|
+
var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
|
|
1564
|
+
var setInternalState = InternalStateModule.set;
|
|
1565
|
+
var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
|
|
1566
|
+
var PromiseConstructor = NativePromiseConstructor$2;
|
|
1567
|
+
var PromisePrototype = NativePromisePrototype$1;
|
|
1568
|
+
var TypeError$5 = global$9.TypeError;
|
|
1569
|
+
var document$1 = global$9.document;
|
|
1570
|
+
var process = global$9.process;
|
|
1571
|
+
var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
|
|
1572
|
+
var newGenericPromiseCapability = newPromiseCapability$1;
|
|
1573
|
+
|
|
1574
|
+
var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$9.dispatchEvent);
|
|
1575
|
+
var UNHANDLED_REJECTION = 'unhandledrejection';
|
|
1576
|
+
var REJECTION_HANDLED = 'rejectionhandled';
|
|
1577
|
+
var PENDING = 0;
|
|
1578
|
+
var FULFILLED = 1;
|
|
1579
|
+
var REJECTED = 2;
|
|
1580
|
+
var HANDLED = 1;
|
|
1581
|
+
var UNHANDLED = 2;
|
|
1582
|
+
|
|
1583
|
+
var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
|
|
1698
1584
|
|
|
1699
1585
|
// helpers
|
|
1700
1586
|
var isThenable = function (it) {
|
|
1701
1587
|
var then;
|
|
1702
|
-
return isObject$
|
|
1588
|
+
return isObject$2(it) && isCallable$3(then = it.then) ? then : false;
|
|
1703
1589
|
};
|
|
1704
1590
|
|
|
1705
1591
|
var callReaction = function (reaction, state) {
|
|
@@ -1726,9 +1612,9 @@ var callReaction = function (reaction, state) {
|
|
|
1726
1612
|
}
|
|
1727
1613
|
}
|
|
1728
1614
|
if (result === reaction.promise) {
|
|
1729
|
-
reject(TypeError$
|
|
1615
|
+
reject(TypeError$5('Promise-chain cycle'));
|
|
1730
1616
|
} else if (then = isThenable(result)) {
|
|
1731
|
-
call$
|
|
1617
|
+
call$a(then, result, resolve, reject);
|
|
1732
1618
|
} else resolve(result);
|
|
1733
1619
|
} else reject(value);
|
|
1734
1620
|
} catch (error) {
|
|
@@ -1758,20 +1644,20 @@ var dispatchEvent = function (name, promise, reason) {
|
|
|
1758
1644
|
event.promise = promise;
|
|
1759
1645
|
event.reason = reason;
|
|
1760
1646
|
event.initEvent(name, false, true);
|
|
1761
|
-
global$
|
|
1647
|
+
global$9.dispatchEvent(event);
|
|
1762
1648
|
} else event = { promise: promise, reason: reason };
|
|
1763
|
-
if (!
|
|
1649
|
+
if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$9['on' + name])) handler(event);
|
|
1764
1650
|
else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
|
|
1765
1651
|
};
|
|
1766
1652
|
|
|
1767
1653
|
var onUnhandled = function (state) {
|
|
1768
|
-
call$
|
|
1654
|
+
call$a(task, global$9, function () {
|
|
1769
1655
|
var promise = state.facade;
|
|
1770
1656
|
var value = state.value;
|
|
1771
1657
|
var IS_UNHANDLED = isUnhandled(state);
|
|
1772
1658
|
var result;
|
|
1773
1659
|
if (IS_UNHANDLED) {
|
|
1774
|
-
result = perform(function () {
|
|
1660
|
+
result = perform$2(function () {
|
|
1775
1661
|
if (IS_NODE) {
|
|
1776
1662
|
process.emit('unhandledRejection', value, promise);
|
|
1777
1663
|
} else dispatchEvent(UNHANDLED_REJECTION, promise, value);
|
|
@@ -1788,7 +1674,7 @@ var isUnhandled = function (state) {
|
|
|
1788
1674
|
};
|
|
1789
1675
|
|
|
1790
1676
|
var onHandleUnhandled = function (state) {
|
|
1791
|
-
call$
|
|
1677
|
+
call$a(task, global$9, function () {
|
|
1792
1678
|
var promise = state.facade;
|
|
1793
1679
|
if (IS_NODE) {
|
|
1794
1680
|
process.emit('rejectionHandled', promise);
|
|
@@ -1796,7 +1682,7 @@ var onHandleUnhandled = function (state) {
|
|
|
1796
1682
|
});
|
|
1797
1683
|
};
|
|
1798
1684
|
|
|
1799
|
-
var bind = function (fn, state, unwrap) {
|
|
1685
|
+
var bind$1 = function (fn, state, unwrap) {
|
|
1800
1686
|
return function (value) {
|
|
1801
1687
|
fn(state, value, unwrap);
|
|
1802
1688
|
};
|
|
@@ -1816,15 +1702,15 @@ var internalResolve = function (state, value, unwrap) {
|
|
|
1816
1702
|
state.done = true;
|
|
1817
1703
|
if (unwrap) state = unwrap;
|
|
1818
1704
|
try {
|
|
1819
|
-
if (state.facade === value) throw TypeError$
|
|
1705
|
+
if (state.facade === value) throw TypeError$5("Promise can't be resolved itself");
|
|
1820
1706
|
var then = isThenable(value);
|
|
1821
1707
|
if (then) {
|
|
1822
1708
|
microtask(function () {
|
|
1823
1709
|
var wrapper = { done: false };
|
|
1824
1710
|
try {
|
|
1825
|
-
call$
|
|
1826
|
-
bind(internalResolve, wrapper, state),
|
|
1827
|
-
bind(internalReject, wrapper, state)
|
|
1711
|
+
call$a(then, value,
|
|
1712
|
+
bind$1(internalResolve, wrapper, state),
|
|
1713
|
+
bind$1(internalReject, wrapper, state)
|
|
1828
1714
|
);
|
|
1829
1715
|
} catch (error) {
|
|
1830
1716
|
internalReject(wrapper, error, state);
|
|
@@ -1841,20 +1727,22 @@ var internalResolve = function (state, value, unwrap) {
|
|
|
1841
1727
|
};
|
|
1842
1728
|
|
|
1843
1729
|
// constructor polyfill
|
|
1844
|
-
if (
|
|
1730
|
+
if (FORCED_PROMISE_CONSTRUCTOR$4) {
|
|
1845
1731
|
// 25.4.3.1 Promise(executor)
|
|
1846
1732
|
PromiseConstructor = function Promise(executor) {
|
|
1847
1733
|
anInstance(this, PromisePrototype);
|
|
1848
|
-
aCallable(executor);
|
|
1849
|
-
call$
|
|
1850
|
-
var state =
|
|
1734
|
+
aCallable$3(executor);
|
|
1735
|
+
call$a(Internal, this);
|
|
1736
|
+
var state = getInternalPromiseState(this);
|
|
1851
1737
|
try {
|
|
1852
|
-
executor(bind(internalResolve, state), bind(internalReject, state));
|
|
1738
|
+
executor(bind$1(internalResolve, state), bind$1(internalReject, state));
|
|
1853
1739
|
} catch (error) {
|
|
1854
1740
|
internalReject(state, error);
|
|
1855
1741
|
}
|
|
1856
1742
|
};
|
|
1743
|
+
|
|
1857
1744
|
PromisePrototype = PromiseConstructor.prototype;
|
|
1745
|
+
|
|
1858
1746
|
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
1859
1747
|
Internal = function Promise(executor) {
|
|
1860
1748
|
setInternalState(this, {
|
|
@@ -1868,116 +1756,278 @@ if (FORCED) {
|
|
|
1868
1756
|
value: undefined
|
|
1869
1757
|
});
|
|
1870
1758
|
};
|
|
1759
|
+
|
|
1871
1760
|
Internal.prototype = redefineAll(PromisePrototype, {
|
|
1872
1761
|
// `Promise.prototype.then` method
|
|
1873
1762
|
// https://tc39.es/ecma262/#sec-promise.prototype.then
|
|
1763
|
+
// eslint-disable-next-line unicorn/no-thenable -- safe
|
|
1874
1764
|
then: function then(onFulfilled, onRejected) {
|
|
1875
1765
|
var state = getInternalPromiseState(this);
|
|
1876
|
-
var reaction = newPromiseCapability
|
|
1766
|
+
var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
|
|
1877
1767
|
state.parent = true;
|
|
1878
|
-
reaction.ok = isCallable$
|
|
1879
|
-
reaction.fail = isCallable$
|
|
1768
|
+
reaction.ok = isCallable$3(onFulfilled) ? onFulfilled : true;
|
|
1769
|
+
reaction.fail = isCallable$3(onRejected) && onRejected;
|
|
1880
1770
|
reaction.domain = IS_NODE ? process.domain : undefined;
|
|
1881
1771
|
if (state.state == PENDING) state.reactions.add(reaction);
|
|
1882
1772
|
else microtask(function () {
|
|
1883
1773
|
callReaction(reaction, state);
|
|
1884
1774
|
});
|
|
1885
1775
|
return reaction.promise;
|
|
1886
|
-
},
|
|
1887
|
-
// `Promise.prototype.catch` method
|
|
1888
|
-
// https://tc39.es/ecma262/#sec-promise.prototype.catch
|
|
1889
|
-
'catch': function (onRejected) {
|
|
1890
|
-
return this.then(undefined, onRejected);
|
|
1891
1776
|
}
|
|
1892
1777
|
});
|
|
1778
|
+
|
|
1893
1779
|
OwnPromiseCapability = function () {
|
|
1894
1780
|
var promise = new Internal();
|
|
1895
|
-
var state =
|
|
1781
|
+
var state = getInternalPromiseState(promise);
|
|
1896
1782
|
this.promise = promise;
|
|
1897
|
-
this.resolve = bind(internalResolve, state);
|
|
1898
|
-
this.reject = bind(internalReject, state);
|
|
1783
|
+
this.resolve = bind$1(internalResolve, state);
|
|
1784
|
+
this.reject = bind$1(internalReject, state);
|
|
1899
1785
|
};
|
|
1900
|
-
|
|
1786
|
+
|
|
1787
|
+
newPromiseCapabilityModule$3.f = newPromiseCapability$1 = function (C) {
|
|
1901
1788
|
return C === PromiseConstructor || C === PromiseWrapper
|
|
1902
1789
|
? new OwnPromiseCapability(C)
|
|
1903
1790
|
: newGenericPromiseCapability(C);
|
|
1904
1791
|
};
|
|
1905
1792
|
|
|
1906
|
-
if (isCallable$2
|
|
1907
|
-
nativeThen = NativePromisePrototype.then;
|
|
1793
|
+
if (isCallable$3(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
|
|
1794
|
+
nativeThen = NativePromisePrototype$1.then;
|
|
1908
1795
|
|
|
1909
|
-
if (!
|
|
1796
|
+
if (!NATIVE_PROMISE_SUBCLASSING) {
|
|
1910
1797
|
// make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
|
|
1911
|
-
redefine$
|
|
1798
|
+
redefine$2(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
|
|
1912
1799
|
var that = this;
|
|
1913
1800
|
return new PromiseConstructor(function (resolve, reject) {
|
|
1914
|
-
call$
|
|
1801
|
+
call$a(nativeThen, that, resolve, reject);
|
|
1915
1802
|
}).then(onFulfilled, onRejected);
|
|
1916
1803
|
// https://github.com/zloirock/core-js/issues/640
|
|
1917
1804
|
}, { unsafe: true });
|
|
1918
|
-
|
|
1919
|
-
// makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
|
|
1920
|
-
redefine$1(NativePromisePrototype, 'catch', PromisePrototype['catch'], { unsafe: true });
|
|
1921
1805
|
}
|
|
1922
1806
|
|
|
1923
1807
|
// make `.constructor === Promise` work for native promise-based APIs
|
|
1924
1808
|
try {
|
|
1925
|
-
delete NativePromisePrototype.constructor;
|
|
1809
|
+
delete NativePromisePrototype$1.constructor;
|
|
1926
1810
|
} catch (error) { /* empty */ }
|
|
1927
1811
|
|
|
1928
1812
|
// make `instanceof Promise` work for native promise-based APIs
|
|
1929
1813
|
if (setPrototypeOf) {
|
|
1930
|
-
setPrototypeOf(NativePromisePrototype, PromisePrototype);
|
|
1814
|
+
setPrototypeOf(NativePromisePrototype$1, PromisePrototype);
|
|
1931
1815
|
}
|
|
1932
1816
|
}
|
|
1933
1817
|
}
|
|
1934
1818
|
|
|
1935
|
-
$$
|
|
1819
|
+
$$9({ global: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
|
|
1936
1820
|
Promise: PromiseConstructor
|
|
1937
1821
|
});
|
|
1938
1822
|
|
|
1939
1823
|
setToStringTag(PromiseConstructor, PROMISE, false);
|
|
1940
1824
|
setSpecies(PROMISE);
|
|
1941
1825
|
|
|
1942
|
-
|
|
1826
|
+
var iterators = {};
|
|
1943
1827
|
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1828
|
+
var wellKnownSymbol$7 = wellKnownSymbol$f;
|
|
1829
|
+
var Iterators$1 = iterators;
|
|
1830
|
+
|
|
1831
|
+
var ITERATOR$2 = wellKnownSymbol$7('iterator');
|
|
1832
|
+
var ArrayPrototype$1 = Array.prototype;
|
|
1833
|
+
|
|
1834
|
+
// check on default Array iterator
|
|
1835
|
+
var isArrayIteratorMethod$1 = function (it) {
|
|
1836
|
+
return it !== undefined && (Iterators$1.Array === it || ArrayPrototype$1[ITERATOR$2] === it);
|
|
1837
|
+
};
|
|
1838
|
+
|
|
1839
|
+
var classof$3 = classof$5;
|
|
1840
|
+
var getMethod$3 = getMethod$5;
|
|
1841
|
+
var Iterators = iterators;
|
|
1842
|
+
var wellKnownSymbol$6 = wellKnownSymbol$f;
|
|
1843
|
+
|
|
1844
|
+
var ITERATOR$1 = wellKnownSymbol$6('iterator');
|
|
1845
|
+
|
|
1846
|
+
var getIteratorMethod$2 = function (it) {
|
|
1847
|
+
if (it != undefined) return getMethod$3(it, ITERATOR$1)
|
|
1848
|
+
|| getMethod$3(it, '@@iterator')
|
|
1849
|
+
|| Iterators[classof$3(it)];
|
|
1850
|
+
};
|
|
1851
|
+
|
|
1852
|
+
var global$8 = global$G;
|
|
1853
|
+
var call$9 = functionCall;
|
|
1854
|
+
var aCallable$2 = aCallable$7;
|
|
1855
|
+
var anObject$9 = anObject$e;
|
|
1856
|
+
var tryToString$1 = tryToString$4;
|
|
1857
|
+
var getIteratorMethod$1 = getIteratorMethod$2;
|
|
1858
|
+
|
|
1859
|
+
var TypeError$4 = global$8.TypeError;
|
|
1860
|
+
|
|
1861
|
+
var getIterator$1 = function (argument, usingIterator) {
|
|
1862
|
+
var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
|
|
1863
|
+
if (aCallable$2(iteratorMethod)) return anObject$9(call$9(iteratorMethod, argument));
|
|
1864
|
+
throw TypeError$4(tryToString$1(argument) + ' is not iterable');
|
|
1865
|
+
};
|
|
1866
|
+
|
|
1867
|
+
var call$8 = functionCall;
|
|
1868
|
+
var anObject$8 = anObject$e;
|
|
1869
|
+
var getMethod$2 = getMethod$5;
|
|
1870
|
+
|
|
1871
|
+
var iteratorClose$1 = function (iterator, kind, value) {
|
|
1872
|
+
var innerResult, innerError;
|
|
1873
|
+
anObject$8(iterator);
|
|
1874
|
+
try {
|
|
1875
|
+
innerResult = getMethod$2(iterator, 'return');
|
|
1876
|
+
if (!innerResult) {
|
|
1877
|
+
if (kind === 'throw') throw value;
|
|
1878
|
+
return value;
|
|
1879
|
+
}
|
|
1880
|
+
innerResult = call$8(innerResult, iterator);
|
|
1881
|
+
} catch (error) {
|
|
1882
|
+
innerError = true;
|
|
1883
|
+
innerResult = error;
|
|
1952
1884
|
}
|
|
1953
|
-
|
|
1885
|
+
if (kind === 'throw') throw value;
|
|
1886
|
+
if (innerError) throw innerResult;
|
|
1887
|
+
anObject$8(innerResult);
|
|
1888
|
+
return value;
|
|
1889
|
+
};
|
|
1954
1890
|
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1891
|
+
var global$7 = global$G;
|
|
1892
|
+
var bind = functionBindContext;
|
|
1893
|
+
var call$7 = functionCall;
|
|
1894
|
+
var anObject$7 = anObject$e;
|
|
1895
|
+
var tryToString = tryToString$4;
|
|
1896
|
+
var isArrayIteratorMethod = isArrayIteratorMethod$1;
|
|
1897
|
+
var lengthOfArrayLike = lengthOfArrayLike$2;
|
|
1898
|
+
var isPrototypeOf = objectIsPrototypeOf;
|
|
1899
|
+
var getIterator = getIterator$1;
|
|
1900
|
+
var getIteratorMethod = getIteratorMethod$2;
|
|
1901
|
+
var iteratorClose = iteratorClose$1;
|
|
1902
|
+
|
|
1903
|
+
var TypeError$3 = global$7.TypeError;
|
|
1904
|
+
|
|
1905
|
+
var Result = function (stopped, result) {
|
|
1906
|
+
this.stopped = stopped;
|
|
1907
|
+
this.result = result;
|
|
1908
|
+
};
|
|
1909
|
+
|
|
1910
|
+
var ResultPrototype = Result.prototype;
|
|
1911
|
+
|
|
1912
|
+
var iterate$2 = function (iterable, unboundFunction, options) {
|
|
1913
|
+
var that = options && options.that;
|
|
1914
|
+
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
|
1915
|
+
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
1916
|
+
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
1917
|
+
var fn = bind(unboundFunction, that);
|
|
1918
|
+
var iterator, iterFn, index, length, result, next, step;
|
|
1919
|
+
|
|
1920
|
+
var stop = function (condition) {
|
|
1921
|
+
if (iterator) iteratorClose(iterator, 'normal', condition);
|
|
1922
|
+
return new Result(true, condition);
|
|
1923
|
+
};
|
|
1924
|
+
|
|
1925
|
+
var callFn = function (value) {
|
|
1926
|
+
if (AS_ENTRIES) {
|
|
1927
|
+
anObject$7(value);
|
|
1928
|
+
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
|
|
1929
|
+
} return INTERRUPTED ? fn(value, stop) : fn(value);
|
|
1930
|
+
};
|
|
1931
|
+
|
|
1932
|
+
if (IS_ITERATOR) {
|
|
1933
|
+
iterator = iterable;
|
|
1934
|
+
} else {
|
|
1935
|
+
iterFn = getIteratorMethod(iterable);
|
|
1936
|
+
if (!iterFn) throw TypeError$3(tryToString(iterable) + ' is not iterable');
|
|
1937
|
+
// optimisation for array iterators
|
|
1938
|
+
if (isArrayIteratorMethod(iterFn)) {
|
|
1939
|
+
for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
|
|
1940
|
+
result = callFn(iterable[index]);
|
|
1941
|
+
if (result && isPrototypeOf(ResultPrototype, result)) return result;
|
|
1942
|
+
} return new Result(false);
|
|
1943
|
+
}
|
|
1944
|
+
iterator = getIterator(iterable, iterFn);
|
|
1960
1945
|
}
|
|
1946
|
+
|
|
1947
|
+
next = iterator.next;
|
|
1948
|
+
while (!(step = call$7(next, iterator)).done) {
|
|
1949
|
+
try {
|
|
1950
|
+
result = callFn(step.value);
|
|
1951
|
+
} catch (error) {
|
|
1952
|
+
iteratorClose(iterator, 'throw', error);
|
|
1953
|
+
}
|
|
1954
|
+
if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
|
|
1955
|
+
} return new Result(false);
|
|
1956
|
+
};
|
|
1957
|
+
|
|
1958
|
+
var wellKnownSymbol$5 = wellKnownSymbol$f;
|
|
1959
|
+
|
|
1960
|
+
var ITERATOR = wellKnownSymbol$5('iterator');
|
|
1961
|
+
var SAFE_CLOSING = false;
|
|
1962
|
+
|
|
1963
|
+
try {
|
|
1964
|
+
var called = 0;
|
|
1965
|
+
var iteratorWithReturn = {
|
|
1966
|
+
next: function () {
|
|
1967
|
+
return { done: !!called++ };
|
|
1968
|
+
},
|
|
1969
|
+
'return': function () {
|
|
1970
|
+
SAFE_CLOSING = true;
|
|
1971
|
+
}
|
|
1972
|
+
};
|
|
1973
|
+
iteratorWithReturn[ITERATOR] = function () {
|
|
1974
|
+
return this;
|
|
1975
|
+
};
|
|
1976
|
+
// eslint-disable-next-line es-x/no-array-from, no-throw-literal -- required for testing
|
|
1977
|
+
Array.from(iteratorWithReturn, function () { throw 2; });
|
|
1978
|
+
} catch (error) { /* empty */ }
|
|
1979
|
+
|
|
1980
|
+
var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
|
|
1981
|
+
if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
|
|
1982
|
+
var ITERATION_SUPPORT = false;
|
|
1983
|
+
try {
|
|
1984
|
+
var object = {};
|
|
1985
|
+
object[ITERATOR] = function () {
|
|
1986
|
+
return {
|
|
1987
|
+
next: function () {
|
|
1988
|
+
return { done: ITERATION_SUPPORT = true };
|
|
1989
|
+
}
|
|
1990
|
+
};
|
|
1991
|
+
};
|
|
1992
|
+
exec(object);
|
|
1993
|
+
} catch (error) { /* empty */ }
|
|
1994
|
+
return ITERATION_SUPPORT;
|
|
1995
|
+
};
|
|
1996
|
+
|
|
1997
|
+
var NativePromiseConstructor$1 = promiseNativeConstructor;
|
|
1998
|
+
var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
|
|
1999
|
+
var FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;
|
|
2000
|
+
|
|
2001
|
+
var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCorrectnessOfIteration(function (iterable) {
|
|
2002
|
+
NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
|
|
1961
2003
|
});
|
|
1962
2004
|
|
|
1963
|
-
$$
|
|
1964
|
-
|
|
1965
|
-
|
|
2005
|
+
var $$8 = _export;
|
|
2006
|
+
var call$6 = functionCall;
|
|
2007
|
+
var aCallable$1 = aCallable$7;
|
|
2008
|
+
var newPromiseCapabilityModule$2 = newPromiseCapability$2;
|
|
2009
|
+
var perform$1 = perform$3;
|
|
2010
|
+
var iterate$1 = iterate$2;
|
|
2011
|
+
var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
|
|
2012
|
+
|
|
2013
|
+
// `Promise.all` method
|
|
2014
|
+
// https://tc39.es/ecma262/#sec-promise.all
|
|
2015
|
+
$$8({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
|
|
1966
2016
|
all: function all(iterable) {
|
|
1967
2017
|
var C = this;
|
|
1968
|
-
var capability =
|
|
2018
|
+
var capability = newPromiseCapabilityModule$2.f(C);
|
|
1969
2019
|
var resolve = capability.resolve;
|
|
1970
2020
|
var reject = capability.reject;
|
|
1971
|
-
var result = perform(function () {
|
|
1972
|
-
var $promiseResolve = aCallable(C.resolve);
|
|
2021
|
+
var result = perform$1(function () {
|
|
2022
|
+
var $promiseResolve = aCallable$1(C.resolve);
|
|
1973
2023
|
var values = [];
|
|
1974
2024
|
var counter = 0;
|
|
1975
2025
|
var remaining = 1;
|
|
1976
|
-
iterate(iterable, function (promise) {
|
|
2026
|
+
iterate$1(iterable, function (promise) {
|
|
1977
2027
|
var index = counter++;
|
|
1978
2028
|
var alreadyCalled = false;
|
|
1979
2029
|
remaining++;
|
|
1980
|
-
call$
|
|
2030
|
+
call$6($promiseResolve, C, promise).then(function (value) {
|
|
1981
2031
|
if (alreadyCalled) return;
|
|
1982
2032
|
alreadyCalled = true;
|
|
1983
2033
|
values[index] = value;
|
|
@@ -1988,12 +2038,48 @@ $$3({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
|
|
|
1988
2038
|
});
|
|
1989
2039
|
if (result.error) reject(result.value);
|
|
1990
2040
|
return capability.promise;
|
|
1991
|
-
}
|
|
1992
|
-
|
|
1993
|
-
|
|
2041
|
+
}
|
|
2042
|
+
});
|
|
2043
|
+
|
|
2044
|
+
var $$7 = _export;
|
|
2045
|
+
var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
|
|
2046
|
+
var NativePromiseConstructor = promiseNativeConstructor;
|
|
2047
|
+
var getBuiltIn$1 = getBuiltIn$8;
|
|
2048
|
+
var isCallable$2 = isCallable$i;
|
|
2049
|
+
var redefine$1 = redefine$5.exports;
|
|
2050
|
+
|
|
2051
|
+
var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
|
|
2052
|
+
|
|
2053
|
+
// `Promise.prototype.catch` method
|
|
2054
|
+
// https://tc39.es/ecma262/#sec-promise.prototype.catch
|
|
2055
|
+
$$7({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
|
|
2056
|
+
'catch': function (onRejected) {
|
|
2057
|
+
return this.then(undefined, onRejected);
|
|
2058
|
+
}
|
|
2059
|
+
});
|
|
2060
|
+
|
|
2061
|
+
// makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
|
|
2062
|
+
if (isCallable$2(NativePromiseConstructor)) {
|
|
2063
|
+
var method = getBuiltIn$1('Promise').prototype['catch'];
|
|
2064
|
+
if (NativePromisePrototype['catch'] !== method) {
|
|
2065
|
+
redefine$1(NativePromisePrototype, 'catch', method, { unsafe: true });
|
|
2066
|
+
}
|
|
2067
|
+
}
|
|
2068
|
+
|
|
2069
|
+
var $$6 = _export;
|
|
2070
|
+
var call$5 = functionCall;
|
|
2071
|
+
var aCallable = aCallable$7;
|
|
2072
|
+
var newPromiseCapabilityModule$1 = newPromiseCapability$2;
|
|
2073
|
+
var perform = perform$3;
|
|
2074
|
+
var iterate = iterate$2;
|
|
2075
|
+
var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
|
|
2076
|
+
|
|
2077
|
+
// `Promise.race` method
|
|
2078
|
+
// https://tc39.es/ecma262/#sec-promise.race
|
|
2079
|
+
$$6({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
|
|
1994
2080
|
race: function race(iterable) {
|
|
1995
2081
|
var C = this;
|
|
1996
|
-
var capability =
|
|
2082
|
+
var capability = newPromiseCapabilityModule$1.f(C);
|
|
1997
2083
|
var reject = capability.reject;
|
|
1998
2084
|
var result = perform(function () {
|
|
1999
2085
|
var $promiseResolve = aCallable(C.resolve);
|
|
@@ -2006,23 +2092,67 @@ $$3({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
|
|
|
2006
2092
|
}
|
|
2007
2093
|
});
|
|
2008
2094
|
|
|
2009
|
-
var
|
|
2010
|
-
var
|
|
2095
|
+
var $$5 = _export;
|
|
2096
|
+
var call$4 = functionCall;
|
|
2097
|
+
var newPromiseCapabilityModule = newPromiseCapability$2;
|
|
2098
|
+
var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
|
|
2099
|
+
|
|
2100
|
+
// `Promise.reject` method
|
|
2101
|
+
// https://tc39.es/ecma262/#sec-promise.reject
|
|
2102
|
+
$$5({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
|
|
2103
|
+
reject: function reject(r) {
|
|
2104
|
+
var capability = newPromiseCapabilityModule.f(this);
|
|
2105
|
+
call$4(capability.reject, undefined, r);
|
|
2106
|
+
return capability.promise;
|
|
2107
|
+
}
|
|
2108
|
+
});
|
|
2011
2109
|
|
|
2012
|
-
var
|
|
2110
|
+
var anObject$6 = anObject$e;
|
|
2111
|
+
var isObject$1 = isObject$8;
|
|
2112
|
+
var newPromiseCapability = newPromiseCapability$2;
|
|
2013
2113
|
|
|
2014
|
-
var
|
|
2114
|
+
var promiseResolve$1 = function (C, x) {
|
|
2115
|
+
anObject$6(C);
|
|
2116
|
+
if (isObject$1(x) && x.constructor === C) return x;
|
|
2117
|
+
var promiseCapability = newPromiseCapability.f(C);
|
|
2118
|
+
var resolve = promiseCapability.resolve;
|
|
2119
|
+
resolve(x);
|
|
2120
|
+
return promiseCapability.promise;
|
|
2121
|
+
};
|
|
2122
|
+
|
|
2123
|
+
var $$4 = _export;
|
|
2124
|
+
var getBuiltIn = getBuiltIn$8;
|
|
2125
|
+
var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
|
|
2126
|
+
var promiseResolve = promiseResolve$1;
|
|
2127
|
+
|
|
2128
|
+
getBuiltIn('Promise');
|
|
2129
|
+
|
|
2130
|
+
// `Promise.resolve` method
|
|
2131
|
+
// https://tc39.es/ecma262/#sec-promise.resolve
|
|
2132
|
+
$$4({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
|
|
2133
|
+
resolve: function resolve(x) {
|
|
2134
|
+
return promiseResolve(this, x);
|
|
2135
|
+
}
|
|
2136
|
+
});
|
|
2137
|
+
|
|
2138
|
+
var global$6 = global$G;
|
|
2139
|
+
var classof$2 = classof$5;
|
|
2140
|
+
|
|
2141
|
+
var String$1 = global$6.String;
|
|
2142
|
+
|
|
2143
|
+
var toString$6 = function (argument) {
|
|
2015
2144
|
if (classof$2(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
2016
2145
|
return String$1(argument);
|
|
2017
2146
|
};
|
|
2018
2147
|
|
|
2019
|
-
var anObject$
|
|
2148
|
+
var anObject$5 = anObject$e;
|
|
2020
2149
|
|
|
2021
2150
|
// `RegExp.prototype.flags` getter implementation
|
|
2022
2151
|
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
2023
2152
|
var regexpFlags$1 = function () {
|
|
2024
|
-
var that = anObject$
|
|
2153
|
+
var that = anObject$5(this);
|
|
2025
2154
|
var result = '';
|
|
2155
|
+
if (that.hasIndices) result += 'd';
|
|
2026
2156
|
if (that.global) result += 'g';
|
|
2027
2157
|
if (that.ignoreCase) result += 'i';
|
|
2028
2158
|
if (that.multiline) result += 'm';
|
|
@@ -2032,13 +2162,13 @@ var regexpFlags$1 = function () {
|
|
|
2032
2162
|
return result;
|
|
2033
2163
|
};
|
|
2034
2164
|
|
|
2035
|
-
var fails$
|
|
2036
|
-
var global$
|
|
2165
|
+
var fails$4 = fails$e;
|
|
2166
|
+
var global$5 = global$G;
|
|
2037
2167
|
|
|
2038
2168
|
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
2039
|
-
var $RegExp$2 = global$
|
|
2169
|
+
var $RegExp$2 = global$5.RegExp;
|
|
2040
2170
|
|
|
2041
|
-
var UNSUPPORTED_Y$
|
|
2171
|
+
var UNSUPPORTED_Y$1 = fails$4(function () {
|
|
2042
2172
|
var re = $RegExp$2('a', 'y');
|
|
2043
2173
|
re.lastIndex = 2;
|
|
2044
2174
|
return re.exec('abcd') != null;
|
|
@@ -2046,11 +2176,11 @@ var UNSUPPORTED_Y$2 = fails$5(function () {
|
|
|
2046
2176
|
|
|
2047
2177
|
// UC Browser bug
|
|
2048
2178
|
// https://github.com/zloirock/core-js/issues/1008
|
|
2049
|
-
var MISSED_STICKY = UNSUPPORTED_Y$
|
|
2179
|
+
var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$4(function () {
|
|
2050
2180
|
return !$RegExp$2('a', 'y').sticky;
|
|
2051
2181
|
});
|
|
2052
2182
|
|
|
2053
|
-
var BROKEN_CARET = UNSUPPORTED_Y$
|
|
2183
|
+
var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$4(function () {
|
|
2054
2184
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
2055
2185
|
var re = $RegExp$2('^r', 'gy');
|
|
2056
2186
|
re.lastIndex = 2;
|
|
@@ -2060,30 +2190,33 @@ var BROKEN_CARET = UNSUPPORTED_Y$2 || fails$5(function () {
|
|
|
2060
2190
|
var regexpStickyHelpers = {
|
|
2061
2191
|
BROKEN_CARET: BROKEN_CARET,
|
|
2062
2192
|
MISSED_STICKY: MISSED_STICKY,
|
|
2063
|
-
UNSUPPORTED_Y: UNSUPPORTED_Y$
|
|
2193
|
+
UNSUPPORTED_Y: UNSUPPORTED_Y$1
|
|
2064
2194
|
};
|
|
2065
2195
|
|
|
2196
|
+
var objectDefineProperties = {};
|
|
2197
|
+
|
|
2066
2198
|
var internalObjectKeys = objectKeysInternal;
|
|
2067
2199
|
var enumBugKeys$1 = enumBugKeys$3;
|
|
2068
2200
|
|
|
2069
2201
|
// `Object.keys` method
|
|
2070
2202
|
// https://tc39.es/ecma262/#sec-object.keys
|
|
2071
|
-
// eslint-disable-next-line es/no-object-keys -- safe
|
|
2203
|
+
// eslint-disable-next-line es-x/no-object-keys -- safe
|
|
2072
2204
|
var objectKeys$1 = Object.keys || function keys(O) {
|
|
2073
2205
|
return internalObjectKeys(O, enumBugKeys$1);
|
|
2074
2206
|
};
|
|
2075
2207
|
|
|
2076
2208
|
var DESCRIPTORS = descriptors;
|
|
2209
|
+
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
2077
2210
|
var definePropertyModule$1 = objectDefineProperty;
|
|
2078
|
-
var anObject$
|
|
2211
|
+
var anObject$4 = anObject$e;
|
|
2079
2212
|
var toIndexedObject = toIndexedObject$4;
|
|
2080
2213
|
var objectKeys = objectKeys$1;
|
|
2081
2214
|
|
|
2082
2215
|
// `Object.defineProperties` method
|
|
2083
2216
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
2084
|
-
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
2085
|
-
|
|
2086
|
-
anObject$
|
|
2217
|
+
// eslint-disable-next-line es-x/no-object-defineproperties -- safe
|
|
2218
|
+
objectDefineProperties.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
2219
|
+
anObject$4(O);
|
|
2087
2220
|
var props = toIndexedObject(Properties);
|
|
2088
2221
|
var keys = objectKeys(Properties);
|
|
2089
2222
|
var length = keys.length;
|
|
@@ -2095,8 +2228,8 @@ var objectDefineProperties = DESCRIPTORS ? Object.defineProperties : function de
|
|
|
2095
2228
|
|
|
2096
2229
|
/* global ActiveXObject -- old IE, WSH */
|
|
2097
2230
|
|
|
2098
|
-
var anObject$
|
|
2099
|
-
var
|
|
2231
|
+
var anObject$3 = anObject$e;
|
|
2232
|
+
var definePropertiesModule = objectDefineProperties;
|
|
2100
2233
|
var enumBugKeys = enumBugKeys$3;
|
|
2101
2234
|
var hiddenKeys = hiddenKeys$4;
|
|
2102
2235
|
var html = html$2;
|
|
@@ -2165,36 +2298,37 @@ hiddenKeys[IE_PROTO] = true;
|
|
|
2165
2298
|
|
|
2166
2299
|
// `Object.create` method
|
|
2167
2300
|
// https://tc39.es/ecma262/#sec-object.create
|
|
2301
|
+
// eslint-disable-next-line es-x/no-object-create -- safe
|
|
2168
2302
|
var objectCreate = Object.create || function create(O, Properties) {
|
|
2169
2303
|
var result;
|
|
2170
2304
|
if (O !== null) {
|
|
2171
|
-
EmptyConstructor[PROTOTYPE] = anObject$
|
|
2305
|
+
EmptyConstructor[PROTOTYPE] = anObject$3(O);
|
|
2172
2306
|
result = new EmptyConstructor();
|
|
2173
2307
|
EmptyConstructor[PROTOTYPE] = null;
|
|
2174
2308
|
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
2175
2309
|
result[IE_PROTO] = O;
|
|
2176
2310
|
} else result = NullProtoObject();
|
|
2177
|
-
return Properties === undefined ? result :
|
|
2311
|
+
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
2178
2312
|
};
|
|
2179
2313
|
|
|
2180
|
-
var fails$
|
|
2181
|
-
var global$
|
|
2314
|
+
var fails$3 = fails$e;
|
|
2315
|
+
var global$4 = global$G;
|
|
2182
2316
|
|
|
2183
2317
|
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
|
2184
|
-
var $RegExp$1 = global$
|
|
2318
|
+
var $RegExp$1 = global$4.RegExp;
|
|
2185
2319
|
|
|
2186
|
-
var regexpUnsupportedDotAll = fails$
|
|
2320
|
+
var regexpUnsupportedDotAll = fails$3(function () {
|
|
2187
2321
|
var re = $RegExp$1('.', 's');
|
|
2188
2322
|
return !(re.dotAll && re.exec('\n') && re.flags === 's');
|
|
2189
2323
|
});
|
|
2190
2324
|
|
|
2191
|
-
var fails$
|
|
2192
|
-
var global$
|
|
2325
|
+
var fails$2 = fails$e;
|
|
2326
|
+
var global$3 = global$G;
|
|
2193
2327
|
|
|
2194
2328
|
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
|
2195
|
-
var $RegExp = global$
|
|
2329
|
+
var $RegExp = global$3.RegExp;
|
|
2196
2330
|
|
|
2197
|
-
var regexpUnsupportedNcg = fails$
|
|
2331
|
+
var regexpUnsupportedNcg = fails$2(function () {
|
|
2198
2332
|
var re = $RegExp('(?<a>b)', 'g');
|
|
2199
2333
|
return re.exec('b').groups.a !== 'b' ||
|
|
2200
2334
|
'b'.replace(re, '$<a>c') !== 'bc';
|
|
@@ -2202,13 +2336,13 @@ var regexpUnsupportedNcg = fails$3(function () {
|
|
|
2202
2336
|
|
|
2203
2337
|
/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
|
|
2204
2338
|
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
|
2205
|
-
var call$
|
|
2206
|
-
var uncurryThis$
|
|
2207
|
-
var toString$
|
|
2339
|
+
var call$3 = functionCall;
|
|
2340
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
2341
|
+
var toString$5 = toString$6;
|
|
2208
2342
|
var regexpFlags = regexpFlags$1;
|
|
2209
|
-
var stickyHelpers
|
|
2343
|
+
var stickyHelpers = regexpStickyHelpers;
|
|
2210
2344
|
var shared = shared$4.exports;
|
|
2211
|
-
var create = objectCreate;
|
|
2345
|
+
var create$1 = objectCreate;
|
|
2212
2346
|
var getInternalState = internalState.get;
|
|
2213
2347
|
var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
|
|
2214
2348
|
var UNSUPPORTED_NCG = regexpUnsupportedNcg;
|
|
@@ -2216,44 +2350,44 @@ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
|
|
|
2216
2350
|
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
|
2217
2351
|
var nativeExec = RegExp.prototype.exec;
|
|
2218
2352
|
var patchedExec = nativeExec;
|
|
2219
|
-
var charAt$3 = uncurryThis$
|
|
2220
|
-
var indexOf = uncurryThis$
|
|
2221
|
-
var replace$1 = uncurryThis$
|
|
2222
|
-
var stringSlice$
|
|
2353
|
+
var charAt$3 = uncurryThis$6(''.charAt);
|
|
2354
|
+
var indexOf = uncurryThis$6(''.indexOf);
|
|
2355
|
+
var replace$1 = uncurryThis$6(''.replace);
|
|
2356
|
+
var stringSlice$4 = uncurryThis$6(''.slice);
|
|
2223
2357
|
|
|
2224
2358
|
var UPDATES_LAST_INDEX_WRONG = (function () {
|
|
2225
2359
|
var re1 = /a/;
|
|
2226
2360
|
var re2 = /b*/g;
|
|
2227
|
-
call$
|
|
2228
|
-
call$
|
|
2361
|
+
call$3(nativeExec, re1, 'a');
|
|
2362
|
+
call$3(nativeExec, re2, 'a');
|
|
2229
2363
|
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
|
2230
2364
|
})();
|
|
2231
2365
|
|
|
2232
|
-
var UNSUPPORTED_Y
|
|
2366
|
+
var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
|
|
2233
2367
|
|
|
2234
2368
|
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
|
2235
2369
|
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
|
2236
2370
|
|
|
2237
|
-
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y
|
|
2371
|
+
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
|
|
2238
2372
|
|
|
2239
2373
|
if (PATCH) {
|
|
2240
2374
|
patchedExec = function exec(string) {
|
|
2241
2375
|
var re = this;
|
|
2242
2376
|
var state = getInternalState(re);
|
|
2243
|
-
var str = toString$
|
|
2377
|
+
var str = toString$5(string);
|
|
2244
2378
|
var raw = state.raw;
|
|
2245
2379
|
var result, reCopy, lastIndex, match, i, object, group;
|
|
2246
2380
|
|
|
2247
2381
|
if (raw) {
|
|
2248
2382
|
raw.lastIndex = re.lastIndex;
|
|
2249
|
-
result = call$
|
|
2383
|
+
result = call$3(patchedExec, raw, str);
|
|
2250
2384
|
re.lastIndex = raw.lastIndex;
|
|
2251
2385
|
return result;
|
|
2252
2386
|
}
|
|
2253
2387
|
|
|
2254
2388
|
var groups = state.groups;
|
|
2255
|
-
var sticky = UNSUPPORTED_Y
|
|
2256
|
-
var flags = call$
|
|
2389
|
+
var sticky = UNSUPPORTED_Y && re.sticky;
|
|
2390
|
+
var flags = call$3(regexpFlags, re);
|
|
2257
2391
|
var source = re.source;
|
|
2258
2392
|
var charsAdded = 0;
|
|
2259
2393
|
var strCopy = str;
|
|
@@ -2264,7 +2398,7 @@ if (PATCH) {
|
|
|
2264
2398
|
flags += 'g';
|
|
2265
2399
|
}
|
|
2266
2400
|
|
|
2267
|
-
strCopy = stringSlice$
|
|
2401
|
+
strCopy = stringSlice$4(str, re.lastIndex);
|
|
2268
2402
|
// Support anchored sticky behavior.
|
|
2269
2403
|
if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
|
|
2270
2404
|
source = '(?: ' + source + ')';
|
|
@@ -2281,12 +2415,12 @@ if (PATCH) {
|
|
|
2281
2415
|
}
|
|
2282
2416
|
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
|
2283
2417
|
|
|
2284
|
-
match = call$
|
|
2418
|
+
match = call$3(nativeExec, sticky ? reCopy : re, strCopy);
|
|
2285
2419
|
|
|
2286
2420
|
if (sticky) {
|
|
2287
2421
|
if (match) {
|
|
2288
|
-
match.input = stringSlice$
|
|
2289
|
-
match[0] = stringSlice$
|
|
2422
|
+
match.input = stringSlice$4(match.input, charsAdded);
|
|
2423
|
+
match[0] = stringSlice$4(match[0], charsAdded);
|
|
2290
2424
|
match.index = re.lastIndex;
|
|
2291
2425
|
re.lastIndex += match[0].length;
|
|
2292
2426
|
} else re.lastIndex = 0;
|
|
@@ -2296,7 +2430,7 @@ if (PATCH) {
|
|
|
2296
2430
|
if (NPCG_INCLUDED && match && match.length > 1) {
|
|
2297
2431
|
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
|
2298
2432
|
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
|
2299
|
-
call$
|
|
2433
|
+
call$3(nativeReplace, match[0], reCopy, function () {
|
|
2300
2434
|
for (i = 1; i < arguments.length - 2; i++) {
|
|
2301
2435
|
if (arguments[i] === undefined) match[i] = undefined;
|
|
2302
2436
|
}
|
|
@@ -2304,7 +2438,7 @@ if (PATCH) {
|
|
|
2304
2438
|
}
|
|
2305
2439
|
|
|
2306
2440
|
if (match && groups) {
|
|
2307
|
-
match.groups = object = create(null);
|
|
2441
|
+
match.groups = object = create$1(null);
|
|
2308
2442
|
for (i = 0; i < groups.length; i++) {
|
|
2309
2443
|
group = groups[i];
|
|
2310
2444
|
object[group[0]] = match[group[1]];
|
|
@@ -2315,40 +2449,40 @@ if (PATCH) {
|
|
|
2315
2449
|
};
|
|
2316
2450
|
}
|
|
2317
2451
|
|
|
2318
|
-
var regexpExec$
|
|
2452
|
+
var regexpExec$2 = patchedExec;
|
|
2319
2453
|
|
|
2320
|
-
var $$
|
|
2321
|
-
var exec
|
|
2454
|
+
var $$3 = _export;
|
|
2455
|
+
var exec = regexpExec$2;
|
|
2322
2456
|
|
|
2323
2457
|
// `RegExp.prototype.exec` method
|
|
2324
2458
|
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
|
|
2325
|
-
$$
|
|
2326
|
-
exec: exec
|
|
2459
|
+
$$3({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
|
|
2460
|
+
exec: exec
|
|
2327
2461
|
});
|
|
2328
2462
|
|
|
2329
2463
|
// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
2330
2464
|
|
|
2331
|
-
var uncurryThis$
|
|
2332
|
-
var redefine = redefine$
|
|
2333
|
-
var regexpExec$
|
|
2334
|
-
var fails$
|
|
2335
|
-
var wellKnownSymbol$
|
|
2465
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
2466
|
+
var redefine = redefine$5.exports;
|
|
2467
|
+
var regexpExec$1 = regexpExec$2;
|
|
2468
|
+
var fails$1 = fails$e;
|
|
2469
|
+
var wellKnownSymbol$4 = wellKnownSymbol$f;
|
|
2336
2470
|
var createNonEnumerableProperty = createNonEnumerableProperty$4;
|
|
2337
2471
|
|
|
2338
|
-
var SPECIES = wellKnownSymbol$
|
|
2472
|
+
var SPECIES = wellKnownSymbol$4('species');
|
|
2339
2473
|
var RegExpPrototype = RegExp.prototype;
|
|
2340
2474
|
|
|
2341
2475
|
var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
2342
|
-
var SYMBOL = wellKnownSymbol$
|
|
2476
|
+
var SYMBOL = wellKnownSymbol$4(KEY);
|
|
2343
2477
|
|
|
2344
|
-
var DELEGATES_TO_SYMBOL = !fails$
|
|
2478
|
+
var DELEGATES_TO_SYMBOL = !fails$1(function () {
|
|
2345
2479
|
// String methods call symbol-named RegEp methods
|
|
2346
2480
|
var O = {};
|
|
2347
2481
|
O[SYMBOL] = function () { return 7; };
|
|
2348
2482
|
return ''[KEY](O) != 7;
|
|
2349
2483
|
});
|
|
2350
2484
|
|
|
2351
|
-
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$
|
|
2485
|
+
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$1(function () {
|
|
2352
2486
|
// Symbol-named RegExp methods call .exec
|
|
2353
2487
|
var execCalled = false;
|
|
2354
2488
|
var re = /a/;
|
|
@@ -2377,11 +2511,11 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
|
2377
2511
|
!DELEGATES_TO_EXEC ||
|
|
2378
2512
|
FORCED
|
|
2379
2513
|
) {
|
|
2380
|
-
var uncurriedNativeRegExpMethod = uncurryThis$
|
|
2514
|
+
var uncurriedNativeRegExpMethod = uncurryThis$5(/./[SYMBOL]);
|
|
2381
2515
|
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
|
2382
|
-
var uncurriedNativeMethod = uncurryThis$
|
|
2516
|
+
var uncurriedNativeMethod = uncurryThis$5(nativeMethod);
|
|
2383
2517
|
var $exec = regexp.exec;
|
|
2384
|
-
if ($exec === regexpExec$
|
|
2518
|
+
if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
|
|
2385
2519
|
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
|
2386
2520
|
// The native String method already delegates to @@method (this
|
|
2387
2521
|
// polyfilled function), leasing to infinite recursion.
|
|
@@ -2400,31 +2534,18 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
|
2400
2534
|
if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
|
|
2401
2535
|
};
|
|
2402
2536
|
|
|
2403
|
-
var
|
|
2404
|
-
var classof$1 = classofRaw$1;
|
|
2405
|
-
var wellKnownSymbol$2 = wellKnownSymbol$e;
|
|
2406
|
-
|
|
2407
|
-
var MATCH$1 = wellKnownSymbol$2('match');
|
|
2408
|
-
|
|
2409
|
-
// `IsRegExp` abstract operation
|
|
2410
|
-
// https://tc39.es/ecma262/#sec-isregexp
|
|
2411
|
-
var isRegexp = function (it) {
|
|
2412
|
-
var isRegExp;
|
|
2413
|
-
return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$1(it) == 'RegExp');
|
|
2414
|
-
};
|
|
2415
|
-
|
|
2416
|
-
var uncurryThis$5 = functionUncurryThis;
|
|
2537
|
+
var uncurryThis$4 = functionUncurryThis;
|
|
2417
2538
|
var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
|
|
2418
|
-
var toString$
|
|
2419
|
-
var requireObjectCoercible$
|
|
2539
|
+
var toString$4 = toString$6;
|
|
2540
|
+
var requireObjectCoercible$4 = requireObjectCoercible$7;
|
|
2420
2541
|
|
|
2421
|
-
var charAt$2 = uncurryThis$
|
|
2422
|
-
var charCodeAt = uncurryThis$
|
|
2423
|
-
var stringSlice$
|
|
2542
|
+
var charAt$2 = uncurryThis$4(''.charAt);
|
|
2543
|
+
var charCodeAt = uncurryThis$4(''.charCodeAt);
|
|
2544
|
+
var stringSlice$3 = uncurryThis$4(''.slice);
|
|
2424
2545
|
|
|
2425
2546
|
var createMethod = function (CONVERT_TO_STRING) {
|
|
2426
2547
|
return function ($this, pos) {
|
|
2427
|
-
var S = toString$
|
|
2548
|
+
var S = toString$4(requireObjectCoercible$4($this));
|
|
2428
2549
|
var position = toIntegerOrInfinity$1(pos);
|
|
2429
2550
|
var size = S.length;
|
|
2430
2551
|
var first, second;
|
|
@@ -2436,7 +2557,7 @@ var createMethod = function (CONVERT_TO_STRING) {
|
|
|
2436
2557
|
? charAt$2(S, position)
|
|
2437
2558
|
: first
|
|
2438
2559
|
: CONVERT_TO_STRING
|
|
2439
|
-
? stringSlice$
|
|
2560
|
+
? stringSlice$3(S, position, position + 2)
|
|
2440
2561
|
: (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
|
2441
2562
|
};
|
|
2442
2563
|
};
|
|
@@ -2454,44 +2575,16 @@ var charAt$1 = stringMultibyte.charAt;
|
|
|
2454
2575
|
|
|
2455
2576
|
// `AdvanceStringIndex` abstract operation
|
|
2456
2577
|
// https://tc39.es/ecma262/#sec-advancestringindex
|
|
2457
|
-
var advanceStringIndex$
|
|
2578
|
+
var advanceStringIndex$2 = function (S, index, unicode) {
|
|
2458
2579
|
return index + (unicode ? charAt$1(S, index).length : 1);
|
|
2459
2580
|
};
|
|
2460
2581
|
|
|
2461
|
-
var
|
|
2462
|
-
var
|
|
2463
|
-
var
|
|
2464
|
-
|
|
2465
|
-
var
|
|
2466
|
-
|
|
2467
|
-
if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
|
|
2468
|
-
else object[propertyKey] = value;
|
|
2469
|
-
};
|
|
2470
|
-
|
|
2471
|
-
var global$3 = global$F;
|
|
2472
|
-
var toAbsoluteIndex = toAbsoluteIndex$2;
|
|
2473
|
-
var lengthOfArrayLike = lengthOfArrayLike$3;
|
|
2474
|
-
var createProperty = createProperty$1;
|
|
2475
|
-
|
|
2476
|
-
var Array$1 = global$3.Array;
|
|
2477
|
-
var max$1 = Math.max;
|
|
2478
|
-
|
|
2479
|
-
var arraySliceSimple = function (O, start, end) {
|
|
2480
|
-
var length = lengthOfArrayLike(O);
|
|
2481
|
-
var k = toAbsoluteIndex(start, length);
|
|
2482
|
-
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
|
2483
|
-
var result = Array$1(max$1(fin - k, 0));
|
|
2484
|
-
for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
|
|
2485
|
-
result.length = n;
|
|
2486
|
-
return result;
|
|
2487
|
-
};
|
|
2488
|
-
|
|
2489
|
-
var global$2 = global$F;
|
|
2490
|
-
var call$3 = functionCall;
|
|
2491
|
-
var anObject$3 = anObject$f;
|
|
2492
|
-
var isCallable$1 = isCallable$g;
|
|
2493
|
-
var classof = classofRaw$1;
|
|
2494
|
-
var regexpExec$1 = regexpExec$3;
|
|
2582
|
+
var global$2 = global$G;
|
|
2583
|
+
var call$2 = functionCall;
|
|
2584
|
+
var anObject$2 = anObject$e;
|
|
2585
|
+
var isCallable$1 = isCallable$i;
|
|
2586
|
+
var classof$1 = classofRaw$1;
|
|
2587
|
+
var regexpExec = regexpExec$2;
|
|
2495
2588
|
|
|
2496
2589
|
var TypeError$2 = global$2.TypeError;
|
|
2497
2590
|
|
|
@@ -2500,178 +2593,22 @@ var TypeError$2 = global$2.TypeError;
|
|
|
2500
2593
|
var regexpExecAbstract = function (R, S) {
|
|
2501
2594
|
var exec = R.exec;
|
|
2502
2595
|
if (isCallable$1(exec)) {
|
|
2503
|
-
var result = call$
|
|
2504
|
-
if (result !== null) anObject$
|
|
2596
|
+
var result = call$2(exec, R, S);
|
|
2597
|
+
if (result !== null) anObject$2(result);
|
|
2505
2598
|
return result;
|
|
2506
2599
|
}
|
|
2507
|
-
if (classof(R) === 'RegExp') return call$
|
|
2600
|
+
if (classof$1(R) === 'RegExp') return call$2(regexpExec, R, S);
|
|
2508
2601
|
throw TypeError$2('RegExp#exec called on incompatible receiver');
|
|
2509
2602
|
};
|
|
2510
2603
|
|
|
2511
|
-
var apply$1 = functionApply;
|
|
2512
|
-
var call$2 = functionCall;
|
|
2513
|
-
var uncurryThis$4 = functionUncurryThis;
|
|
2514
|
-
var fixRegExpWellKnownSymbolLogic$2 = fixRegexpWellKnownSymbolLogic;
|
|
2515
|
-
var isRegExp$1 = isRegexp;
|
|
2516
|
-
var anObject$2 = anObject$f;
|
|
2517
|
-
var requireObjectCoercible$4 = requireObjectCoercible$8;
|
|
2518
|
-
var speciesConstructor = speciesConstructor$2;
|
|
2519
|
-
var advanceStringIndex$2 = advanceStringIndex$3;
|
|
2520
|
-
var toLength$4 = toLength$6;
|
|
2521
|
-
var toString$4 = toString$7;
|
|
2522
|
-
var getMethod$2 = getMethod$6;
|
|
2523
|
-
var arraySlice = arraySliceSimple;
|
|
2524
|
-
var callRegExpExec = regexpExecAbstract;
|
|
2525
|
-
var regexpExec = regexpExec$3;
|
|
2526
|
-
var stickyHelpers = regexpStickyHelpers;
|
|
2527
|
-
var fails$1 = fails$d;
|
|
2528
|
-
|
|
2529
|
-
var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
|
|
2530
|
-
var MAX_UINT32 = 0xFFFFFFFF;
|
|
2531
|
-
var min$3 = Math.min;
|
|
2532
|
-
var $push = [].push;
|
|
2533
|
-
var exec = uncurryThis$4(/./.exec);
|
|
2534
|
-
var push$1 = uncurryThis$4($push);
|
|
2535
|
-
var stringSlice$3 = uncurryThis$4(''.slice);
|
|
2536
|
-
|
|
2537
|
-
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
|
2538
|
-
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
|
2539
|
-
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails$1(function () {
|
|
2540
|
-
// eslint-disable-next-line regexp/no-empty-group -- required for testing
|
|
2541
|
-
var re = /(?:)/;
|
|
2542
|
-
var originalExec = re.exec;
|
|
2543
|
-
re.exec = function () { return originalExec.apply(this, arguments); };
|
|
2544
|
-
var result = 'ab'.split(re);
|
|
2545
|
-
return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
|
|
2546
|
-
});
|
|
2547
|
-
|
|
2548
|
-
// @@split logic
|
|
2549
|
-
fixRegExpWellKnownSymbolLogic$2('split', function (SPLIT, nativeSplit, maybeCallNative) {
|
|
2550
|
-
var internalSplit;
|
|
2551
|
-
if (
|
|
2552
|
-
'abbc'.split(/(b)*/)[1] == 'c' ||
|
|
2553
|
-
// eslint-disable-next-line regexp/no-empty-group -- required for testing
|
|
2554
|
-
'test'.split(/(?:)/, -1).length != 4 ||
|
|
2555
|
-
'ab'.split(/(?:ab)*/).length != 2 ||
|
|
2556
|
-
'.'.split(/(.?)(.?)/).length != 4 ||
|
|
2557
|
-
// eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
|
|
2558
|
-
'.'.split(/()()/).length > 1 ||
|
|
2559
|
-
''.split(/.?/).length
|
|
2560
|
-
) {
|
|
2561
|
-
// based on es5-shim implementation, need to rework it
|
|
2562
|
-
internalSplit = function (separator, limit) {
|
|
2563
|
-
var string = toString$4(requireObjectCoercible$4(this));
|
|
2564
|
-
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
|
2565
|
-
if (lim === 0) return [];
|
|
2566
|
-
if (separator === undefined) return [string];
|
|
2567
|
-
// If `separator` is not a regex, use native split
|
|
2568
|
-
if (!isRegExp$1(separator)) {
|
|
2569
|
-
return call$2(nativeSplit, string, separator, lim);
|
|
2570
|
-
}
|
|
2571
|
-
var output = [];
|
|
2572
|
-
var flags = (separator.ignoreCase ? 'i' : '') +
|
|
2573
|
-
(separator.multiline ? 'm' : '') +
|
|
2574
|
-
(separator.unicode ? 'u' : '') +
|
|
2575
|
-
(separator.sticky ? 'y' : '');
|
|
2576
|
-
var lastLastIndex = 0;
|
|
2577
|
-
// Make `global` and avoid `lastIndex` issues by working with a copy
|
|
2578
|
-
var separatorCopy = new RegExp(separator.source, flags + 'g');
|
|
2579
|
-
var match, lastIndex, lastLength;
|
|
2580
|
-
while (match = call$2(regexpExec, separatorCopy, string)) {
|
|
2581
|
-
lastIndex = separatorCopy.lastIndex;
|
|
2582
|
-
if (lastIndex > lastLastIndex) {
|
|
2583
|
-
push$1(output, stringSlice$3(string, lastLastIndex, match.index));
|
|
2584
|
-
if (match.length > 1 && match.index < string.length) apply$1($push, output, arraySlice(match, 1));
|
|
2585
|
-
lastLength = match[0].length;
|
|
2586
|
-
lastLastIndex = lastIndex;
|
|
2587
|
-
if (output.length >= lim) break;
|
|
2588
|
-
}
|
|
2589
|
-
if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
|
|
2590
|
-
}
|
|
2591
|
-
if (lastLastIndex === string.length) {
|
|
2592
|
-
if (lastLength || !exec(separatorCopy, '')) push$1(output, '');
|
|
2593
|
-
} else push$1(output, stringSlice$3(string, lastLastIndex));
|
|
2594
|
-
return output.length > lim ? arraySlice(output, 0, lim) : output;
|
|
2595
|
-
};
|
|
2596
|
-
// Chakra, V8
|
|
2597
|
-
} else if ('0'.split(undefined, 0).length) {
|
|
2598
|
-
internalSplit = function (separator, limit) {
|
|
2599
|
-
return separator === undefined && limit === 0 ? [] : call$2(nativeSplit, this, separator, limit);
|
|
2600
|
-
};
|
|
2601
|
-
} else internalSplit = nativeSplit;
|
|
2602
|
-
|
|
2603
|
-
return [
|
|
2604
|
-
// `String.prototype.split` method
|
|
2605
|
-
// https://tc39.es/ecma262/#sec-string.prototype.split
|
|
2606
|
-
function split(separator, limit) {
|
|
2607
|
-
var O = requireObjectCoercible$4(this);
|
|
2608
|
-
var splitter = separator == undefined ? undefined : getMethod$2(separator, SPLIT);
|
|
2609
|
-
return splitter
|
|
2610
|
-
? call$2(splitter, separator, O, limit)
|
|
2611
|
-
: call$2(internalSplit, toString$4(O), separator, limit);
|
|
2612
|
-
},
|
|
2613
|
-
// `RegExp.prototype[@@split]` method
|
|
2614
|
-
// https://tc39.es/ecma262/#sec-regexp.prototype-@@split
|
|
2615
|
-
//
|
|
2616
|
-
// NOTE: This cannot be properly polyfilled in engines that don't support
|
|
2617
|
-
// the 'y' flag.
|
|
2618
|
-
function (string, limit) {
|
|
2619
|
-
var rx = anObject$2(this);
|
|
2620
|
-
var S = toString$4(string);
|
|
2621
|
-
var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);
|
|
2622
|
-
|
|
2623
|
-
if (res.done) return res.value;
|
|
2624
|
-
|
|
2625
|
-
var C = speciesConstructor(rx, RegExp);
|
|
2626
|
-
|
|
2627
|
-
var unicodeMatching = rx.unicode;
|
|
2628
|
-
var flags = (rx.ignoreCase ? 'i' : '') +
|
|
2629
|
-
(rx.multiline ? 'm' : '') +
|
|
2630
|
-
(rx.unicode ? 'u' : '') +
|
|
2631
|
-
(UNSUPPORTED_Y ? 'g' : 'y');
|
|
2632
|
-
|
|
2633
|
-
// ^(? + rx + ) is needed, in combination with some S slicing, to
|
|
2634
|
-
// simulate the 'y' flag.
|
|
2635
|
-
var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);
|
|
2636
|
-
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
|
2637
|
-
if (lim === 0) return [];
|
|
2638
|
-
if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
|
|
2639
|
-
var p = 0;
|
|
2640
|
-
var q = 0;
|
|
2641
|
-
var A = [];
|
|
2642
|
-
while (q < S.length) {
|
|
2643
|
-
splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
|
|
2644
|
-
var z = callRegExpExec(splitter, UNSUPPORTED_Y ? stringSlice$3(S, q) : S);
|
|
2645
|
-
var e;
|
|
2646
|
-
if (
|
|
2647
|
-
z === null ||
|
|
2648
|
-
(e = min$3(toLength$4(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p
|
|
2649
|
-
) {
|
|
2650
|
-
q = advanceStringIndex$2(S, q, unicodeMatching);
|
|
2651
|
-
} else {
|
|
2652
|
-
push$1(A, stringSlice$3(S, p, q));
|
|
2653
|
-
if (A.length === lim) return A;
|
|
2654
|
-
for (var i = 1; i <= z.length - 1; i++) {
|
|
2655
|
-
push$1(A, z[i]);
|
|
2656
|
-
if (A.length === lim) return A;
|
|
2657
|
-
}
|
|
2658
|
-
q = p = e;
|
|
2659
|
-
}
|
|
2660
|
-
}
|
|
2661
|
-
push$1(A, stringSlice$3(S, p));
|
|
2662
|
-
return A;
|
|
2663
|
-
}
|
|
2664
|
-
];
|
|
2665
|
-
}, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);
|
|
2666
|
-
|
|
2667
2604
|
var call$1 = functionCall;
|
|
2668
2605
|
var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic;
|
|
2669
|
-
var anObject$1 = anObject$
|
|
2670
|
-
var toLength$3 = toLength$
|
|
2671
|
-
var toString$3 = toString$
|
|
2672
|
-
var requireObjectCoercible$3 = requireObjectCoercible$
|
|
2673
|
-
var getMethod$1 = getMethod$
|
|
2674
|
-
var advanceStringIndex$1 = advanceStringIndex$
|
|
2606
|
+
var anObject$1 = anObject$e;
|
|
2607
|
+
var toLength$3 = toLength$5;
|
|
2608
|
+
var toString$3 = toString$6;
|
|
2609
|
+
var requireObjectCoercible$3 = requireObjectCoercible$7;
|
|
2610
|
+
var getMethod$1 = getMethod$5;
|
|
2611
|
+
var advanceStringIndex$1 = advanceStringIndex$2;
|
|
2675
2612
|
var regExpExec$1 = regexpExecAbstract;
|
|
2676
2613
|
|
|
2677
2614
|
// @@match logic
|
|
@@ -2760,20 +2697,20 @@ var apply = functionApply;
|
|
|
2760
2697
|
var call = functionCall;
|
|
2761
2698
|
var uncurryThis$2 = functionUncurryThis;
|
|
2762
2699
|
var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
|
|
2763
|
-
var fails = fails$
|
|
2764
|
-
var anObject = anObject$
|
|
2765
|
-
var isCallable = isCallable$
|
|
2700
|
+
var fails = fails$e;
|
|
2701
|
+
var anObject = anObject$e;
|
|
2702
|
+
var isCallable = isCallable$i;
|
|
2766
2703
|
var toIntegerOrInfinity = toIntegerOrInfinity$4;
|
|
2767
|
-
var toLength$2 = toLength$
|
|
2768
|
-
var toString$2 = toString$
|
|
2769
|
-
var requireObjectCoercible$2 = requireObjectCoercible$
|
|
2770
|
-
var advanceStringIndex = advanceStringIndex$
|
|
2771
|
-
var getMethod = getMethod$
|
|
2704
|
+
var toLength$2 = toLength$5;
|
|
2705
|
+
var toString$2 = toString$6;
|
|
2706
|
+
var requireObjectCoercible$2 = requireObjectCoercible$7;
|
|
2707
|
+
var advanceStringIndex = advanceStringIndex$2;
|
|
2708
|
+
var getMethod = getMethod$5;
|
|
2772
2709
|
var getSubstitution = getSubstitution$1;
|
|
2773
2710
|
var regExpExec = regexpExecAbstract;
|
|
2774
|
-
var wellKnownSymbol$
|
|
2711
|
+
var wellKnownSymbol$3 = wellKnownSymbol$f;
|
|
2775
2712
|
|
|
2776
|
-
var REPLACE = wellKnownSymbol$
|
|
2713
|
+
var REPLACE = wellKnownSymbol$3('replace');
|
|
2777
2714
|
var max = Math.max;
|
|
2778
2715
|
var min$2 = Math.min;
|
|
2779
2716
|
var concat = uncurryThis$2([].concat);
|
|
@@ -2892,7 +2829,20 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
2892
2829
|
];
|
|
2893
2830
|
}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
|
|
2894
2831
|
|
|
2895
|
-
var
|
|
2832
|
+
var isObject = isObject$8;
|
|
2833
|
+
var classof = classofRaw$1;
|
|
2834
|
+
var wellKnownSymbol$2 = wellKnownSymbol$f;
|
|
2835
|
+
|
|
2836
|
+
var MATCH$1 = wellKnownSymbol$2('match');
|
|
2837
|
+
|
|
2838
|
+
// `IsRegExp` abstract operation
|
|
2839
|
+
// https://tc39.es/ecma262/#sec-isregexp
|
|
2840
|
+
var isRegexp = function (it) {
|
|
2841
|
+
var isRegExp;
|
|
2842
|
+
return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');
|
|
2843
|
+
};
|
|
2844
|
+
|
|
2845
|
+
var global$1 = global$G;
|
|
2896
2846
|
var isRegExp = isRegexp;
|
|
2897
2847
|
|
|
2898
2848
|
var TypeError$1 = global$1.TypeError;
|
|
@@ -2903,9 +2853,9 @@ var notARegexp = function (it) {
|
|
|
2903
2853
|
} return it;
|
|
2904
2854
|
};
|
|
2905
2855
|
|
|
2906
|
-
var wellKnownSymbol = wellKnownSymbol$
|
|
2856
|
+
var wellKnownSymbol$1 = wellKnownSymbol$f;
|
|
2907
2857
|
|
|
2908
|
-
var MATCH = wellKnownSymbol('match');
|
|
2858
|
+
var MATCH = wellKnownSymbol$1('match');
|
|
2909
2859
|
|
|
2910
2860
|
var correctIsRegexpLogic = function (METHOD_NAME) {
|
|
2911
2861
|
var regexp = /./;
|
|
@@ -2919,16 +2869,16 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
|
|
|
2919
2869
|
} return false;
|
|
2920
2870
|
};
|
|
2921
2871
|
|
|
2922
|
-
var $$
|
|
2872
|
+
var $$2 = _export;
|
|
2923
2873
|
var uncurryThis$1 = functionUncurryThis;
|
|
2924
2874
|
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
2925
|
-
var toLength$1 = toLength$
|
|
2926
|
-
var toString$1 = toString$
|
|
2875
|
+
var toLength$1 = toLength$5;
|
|
2876
|
+
var toString$1 = toString$6;
|
|
2927
2877
|
var notARegExp$1 = notARegexp;
|
|
2928
|
-
var requireObjectCoercible$1 = requireObjectCoercible$
|
|
2878
|
+
var requireObjectCoercible$1 = requireObjectCoercible$7;
|
|
2929
2879
|
var correctIsRegExpLogic$1 = correctIsRegexpLogic;
|
|
2930
2880
|
|
|
2931
|
-
// eslint-disable-next-line es/no-string-prototype-startswith -- safe
|
|
2881
|
+
// eslint-disable-next-line es-x/no-string-prototype-startswith -- safe
|
|
2932
2882
|
var un$StartsWith = uncurryThis$1(''.startsWith);
|
|
2933
2883
|
var stringSlice = uncurryThis$1(''.slice);
|
|
2934
2884
|
var min$1 = Math.min;
|
|
@@ -2942,7 +2892,7 @@ var MDN_POLYFILL_BUG$1 = !CORRECT_IS_REGEXP_LOGIC$1 && !!function () {
|
|
|
2942
2892
|
|
|
2943
2893
|
// `String.prototype.startsWith` method
|
|
2944
2894
|
// https://tc39.es/ecma262/#sec-string.prototype.startswith
|
|
2945
|
-
$$
|
|
2895
|
+
$$2({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG$1 && !CORRECT_IS_REGEXP_LOGIC$1 }, {
|
|
2946
2896
|
startsWith: function startsWith(searchString /* , position = 0 */) {
|
|
2947
2897
|
var that = toString$1(requireObjectCoercible$1(this));
|
|
2948
2898
|
notARegExp$1(searchString);
|
|
@@ -2954,16 +2904,52 @@ $$1({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG$1 && !CORRECT_IS_
|
|
|
2954
2904
|
}
|
|
2955
2905
|
});
|
|
2956
2906
|
|
|
2907
|
+
var wellKnownSymbol = wellKnownSymbol$f;
|
|
2908
|
+
var create = objectCreate;
|
|
2909
|
+
var definePropertyModule = objectDefineProperty;
|
|
2910
|
+
|
|
2911
|
+
var UNSCOPABLES = wellKnownSymbol('unscopables');
|
|
2912
|
+
var ArrayPrototype = Array.prototype;
|
|
2913
|
+
|
|
2914
|
+
// Array.prototype[@@unscopables]
|
|
2915
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
2916
|
+
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
2917
|
+
definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
|
|
2918
|
+
configurable: true,
|
|
2919
|
+
value: create(null)
|
|
2920
|
+
});
|
|
2921
|
+
}
|
|
2922
|
+
|
|
2923
|
+
// add a key to Array.prototype[@@unscopables]
|
|
2924
|
+
var addToUnscopables$1 = function (key) {
|
|
2925
|
+
ArrayPrototype[UNSCOPABLES][key] = true;
|
|
2926
|
+
};
|
|
2927
|
+
|
|
2928
|
+
var $$1 = _export;
|
|
2929
|
+
var $includes = arrayIncludes.includes;
|
|
2930
|
+
var addToUnscopables = addToUnscopables$1;
|
|
2931
|
+
|
|
2932
|
+
// `Array.prototype.includes` method
|
|
2933
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
2934
|
+
$$1({ target: 'Array', proto: true }, {
|
|
2935
|
+
includes: function includes(el /* , fromIndex = 0 */) {
|
|
2936
|
+
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
|
2937
|
+
}
|
|
2938
|
+
});
|
|
2939
|
+
|
|
2940
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
2941
|
+
addToUnscopables('includes');
|
|
2942
|
+
|
|
2957
2943
|
var $ = _export;
|
|
2958
2944
|
var uncurryThis = functionUncurryThis;
|
|
2959
2945
|
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
2960
|
-
var toLength = toLength$
|
|
2961
|
-
var toString = toString$
|
|
2946
|
+
var toLength = toLength$5;
|
|
2947
|
+
var toString = toString$6;
|
|
2962
2948
|
var notARegExp = notARegexp;
|
|
2963
|
-
var requireObjectCoercible = requireObjectCoercible$
|
|
2949
|
+
var requireObjectCoercible = requireObjectCoercible$7;
|
|
2964
2950
|
var correctIsRegExpLogic = correctIsRegexpLogic;
|
|
2965
2951
|
|
|
2966
|
-
// eslint-disable-next-line es/no-string-prototype-endswith -- safe
|
|
2952
|
+
// eslint-disable-next-line es-x/no-string-prototype-endswith -- safe
|
|
2967
2953
|
var un$EndsWith = uncurryThis(''.endsWith);
|
|
2968
2954
|
var slice = uncurryThis(''.slice);
|
|
2969
2955
|
var min = Math.min;
|
|
@@ -2991,7 +2977,7 @@ $({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGE
|
|
|
2991
2977
|
}
|
|
2992
2978
|
});
|
|
2993
2979
|
|
|
2994
|
-
|
|
2980
|
+
/******************************************************************************
|
|
2995
2981
|
Copyright (c) Microsoft Corporation.
|
|
2996
2982
|
|
|
2997
2983
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -3022,41 +3008,42 @@ const fileToArray = url => {
|
|
|
3022
3008
|
const request = new XMLHttpRequest();
|
|
3023
3009
|
request.open('GET', url, true);
|
|
3024
3010
|
request.responseType = 'blob';
|
|
3025
|
-
|
|
3026
3011
|
request.onload = () => {
|
|
3027
3012
|
const reader = new FileReader();
|
|
3028
3013
|
reader.readAsArrayBuffer(request.response);
|
|
3029
|
-
|
|
3030
3014
|
reader.onloadend = () => {
|
|
3031
3015
|
resolve(reader.result);
|
|
3032
3016
|
};
|
|
3033
3017
|
};
|
|
3034
|
-
|
|
3035
3018
|
request.send();
|
|
3036
3019
|
} catch (_a) {
|
|
3037
3020
|
reject(`error while retrieving file ${url}.`);
|
|
3038
3021
|
}
|
|
3039
3022
|
});
|
|
3040
3023
|
};
|
|
3041
|
-
|
|
3024
|
+
const timeout = ms => {
|
|
3025
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
3026
|
+
};
|
|
3042
3027
|
const reloadIFrame = iframe => {
|
|
3043
3028
|
if (iframe) {
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3029
|
+
const url = iframe.src;
|
|
3030
|
+
iframe.src = 'about:blank';
|
|
3031
|
+
setTimeout(() => {
|
|
3032
|
+
if (iframe) {
|
|
3033
|
+
iframe.src = url;
|
|
3034
|
+
}
|
|
3035
|
+
}, 100);
|
|
3047
3036
|
}
|
|
3048
|
-
};
|
|
3049
|
-
|
|
3050
|
-
|
|
3037
|
+
};
|
|
3038
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3051
3039
|
const handleFileUpload = fileInput => {
|
|
3052
3040
|
return new Promise((resolve, reject) => {
|
|
3053
3041
|
if (fileInput.target.files && fileInput.target.files[0]) {
|
|
3054
|
-
const reader = new FileReader();
|
|
3055
|
-
|
|
3042
|
+
const reader = new FileReader();
|
|
3043
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3056
3044
|
reader.onload = e => {
|
|
3057
3045
|
resolve(e.target.result);
|
|
3058
3046
|
};
|
|
3059
|
-
|
|
3060
3047
|
reader.readAsDataURL(fileInput.target.files[0]);
|
|
3061
3048
|
} else {
|
|
3062
3049
|
reject('no files selected');
|
|
@@ -3087,7 +3074,6 @@ const getDocxToHtml = url => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
3087
3074
|
if (!mammoth) {
|
|
3088
3075
|
console.error('Please install mammoth and make sure mammoth.browser.min.js is loaded.');
|
|
3089
3076
|
}
|
|
3090
|
-
|
|
3091
3077
|
const arrayBuffer = yield fileToArray(url);
|
|
3092
3078
|
const resultObject = yield mammoth.convertToHtml({
|
|
3093
3079
|
arrayBuffer
|
|
@@ -3102,11 +3088,9 @@ const googleCheckSubscription = () => {
|
|
|
3102
3088
|
if (!iframeIsLoaded(iframe)) {
|
|
3103
3089
|
subscription = setInterval(() => {
|
|
3104
3090
|
checkCount++;
|
|
3105
|
-
|
|
3106
3091
|
if (checkCount >= maxChecks) {
|
|
3107
3092
|
clearInterval(subscription);
|
|
3108
3093
|
}
|
|
3109
|
-
|
|
3110
3094
|
reloadIFrame(iframe);
|
|
3111
3095
|
}, interval);
|
|
3112
3096
|
return subscription;
|
|
@@ -3124,54 +3108,45 @@ const googleCheckSubscription = () => {
|
|
|
3124
3108
|
};
|
|
3125
3109
|
};
|
|
3126
3110
|
const iframeIsLoaded = iframe => {
|
|
3127
|
-
var _a;
|
|
3111
|
+
var _a;
|
|
3112
|
+
// its #document <html><head></head><body></body></html> when google is returning a 204
|
|
3128
3113
|
// so if contentDocument = null then it's loaded.
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
3114
|
let isLoaded = false;
|
|
3132
|
-
|
|
3133
3115
|
try {
|
|
3134
3116
|
if (!internetExplorer()) {
|
|
3135
3117
|
isLoaded = !(iframe === null || iframe === void 0 ? void 0 : iframe.contentDocument);
|
|
3136
3118
|
} else {
|
|
3137
3119
|
isLoaded = !((_a = iframe === null || iframe === void 0 ? void 0 : iframe.contentWindow) === null || _a === void 0 ? void 0 : _a.document);
|
|
3138
3120
|
}
|
|
3139
|
-
} catch (_b) {
|
|
3121
|
+
} catch (_b) {
|
|
3122
|
+
// ignore message Blocked a frame with origin "http://..." from accessing a cross-origin frame.
|
|
3140
3123
|
}
|
|
3141
|
-
|
|
3142
3124
|
return isLoaded;
|
|
3143
3125
|
};
|
|
3144
|
-
|
|
3145
3126
|
const internetExplorer = () => /MSIE (\d+\.\d+);/.test(navigator.userAgent) || navigator.userAgent.indexOf("Trident/") > -1;
|
|
3146
|
-
|
|
3147
3127
|
const getViewerDetails = (url, configuredViewer = 'google', queryParams = '', viewerUrl = '') => {
|
|
3148
3128
|
switch (configuredViewer) {
|
|
3149
3129
|
case 'google':
|
|
3150
3130
|
viewerUrl = `https://docs.google.com/gview?url=%URL%&embedded=true`;
|
|
3151
3131
|
break;
|
|
3152
|
-
|
|
3153
3132
|
case 'office':
|
|
3154
3133
|
{
|
|
3155
3134
|
viewerUrl = `https://view.officeapps.live.com/op/embed.aspx?src=%URL%`;
|
|
3156
3135
|
break;
|
|
3157
3136
|
}
|
|
3158
|
-
|
|
3159
3137
|
case 'pdf':
|
|
3160
3138
|
{
|
|
3161
3139
|
viewerUrl = '';
|
|
3162
3140
|
break;
|
|
3163
3141
|
}
|
|
3164
3142
|
}
|
|
3165
|
-
|
|
3166
3143
|
const externalViewer = configuredViewer === 'google' || configuredViewer === 'office' || configuredViewer === 'url';
|
|
3167
3144
|
const u = (url === null || url === void 0 ? void 0 : url.indexOf('/')) ? encodeURIComponent(url) : url;
|
|
3168
3145
|
let fullUrl = viewerUrl ? viewerUrl.replace('%URL%', u) : url;
|
|
3169
|
-
|
|
3170
3146
|
if (queryParams && externalViewer && configuredViewer !== 'url') {
|
|
3171
3147
|
const start = queryParams.startsWith('&') ? '' : '&';
|
|
3172
3148
|
fullUrl = `${fullUrl}${start}${queryParams}`;
|
|
3173
3149
|
}
|
|
3174
|
-
|
|
3175
3150
|
return {
|
|
3176
3151
|
url: fullUrl,
|
|
3177
3152
|
externalViewer
|
|
@@ -3180,39 +3155,31 @@ const getViewerDetails = (url, configuredViewer = 'google', queryParams = '', vi
|
|
|
3180
3155
|
const replaceLocalUrl = (url, overrideLocalhost) => {
|
|
3181
3156
|
const loc = getLocation(url);
|
|
3182
3157
|
const locReplace = getLocation(overrideLocalhost);
|
|
3183
|
-
|
|
3184
3158
|
if (loc && locReplace) {
|
|
3185
3159
|
return url.replace(loc.port ? `${loc.hostname}:${loc.port}` : loc.hostname, locReplace.port ? `${locReplace.hostname}:${locReplace.port}` : locReplace.hostname);
|
|
3186
3160
|
}
|
|
3187
|
-
|
|
3188
3161
|
return url;
|
|
3189
3162
|
};
|
|
3190
|
-
|
|
3191
3163
|
const getBlobFromUrl = url => {
|
|
3192
3164
|
return new Promise((resolve, reject) => {
|
|
3193
3165
|
const request = new XMLHttpRequest();
|
|
3194
3166
|
request.open('GET', url, true);
|
|
3195
3167
|
request.responseType = 'blob';
|
|
3196
|
-
|
|
3197
3168
|
request.onload = () => {
|
|
3198
3169
|
resolve(request.response);
|
|
3199
3170
|
};
|
|
3200
|
-
|
|
3201
3171
|
request.onerror = reject;
|
|
3202
3172
|
request.send();
|
|
3203
3173
|
});
|
|
3204
3174
|
};
|
|
3205
|
-
|
|
3206
3175
|
const uploadToCloud = (fileUrl, api) => new Promise((resolve, reject) => {
|
|
3207
3176
|
getBlobFromUrl(fileUrl).then(blob => {
|
|
3208
3177
|
var _a, _b;
|
|
3209
|
-
|
|
3210
3178
|
const loc = getLocation(fileUrl);
|
|
3211
3179
|
const name = (loc === null || loc === void 0 ? void 0 : loc.pathname) ? (_a = loc === null || loc === void 0 ? void 0 : loc.pathname) === null || _a === void 0 ? void 0 : _a.split('/')[((_b = loc === null || loc === void 0 ? void 0 : loc.pathname) === null || _b === void 0 ? void 0 : _b.split('/').length) - 1] : '';
|
|
3212
3180
|
const formData = new FormData();
|
|
3213
3181
|
const request = new XMLHttpRequest();
|
|
3214
3182
|
formData.append('file', blob, name);
|
|
3215
|
-
|
|
3216
3183
|
request.onreadystatechange = e => {
|
|
3217
3184
|
if (request.readyState === XMLHttpRequest.DONE) {
|
|
3218
3185
|
if (request.status === 200) {
|
|
@@ -3222,7 +3189,6 @@ const uploadToCloud = (fileUrl, api) => new Promise((resolve, reject) => {
|
|
|
3222
3189
|
}
|
|
3223
3190
|
}
|
|
3224
3191
|
};
|
|
3225
|
-
|
|
3226
3192
|
request.onerror = reject;
|
|
3227
3193
|
request.open('post', api, true);
|
|
3228
3194
|
request.send(formData);
|
|
@@ -3246,4 +3212,4 @@ const defaultProps = {
|
|
|
3246
3212
|
viewerUrl: ''
|
|
3247
3213
|
};
|
|
3248
3214
|
|
|
3249
|
-
export { defaultProps, fileToArray, getDocxToHtml, getLocation, getViewerDetails, getbaseUrl, googleCheckSubscription, handleFileUpload, iframeIsLoaded, isLocalFile, replaceLocalUrl, uploadToCloud };
|
|
3215
|
+
export { defaultProps, fileToArray, getDocxToHtml, getLocation, getViewerDetails, getbaseUrl, googleCheckSubscription, handleFileUpload, iframeIsLoaded, isLocalFile, replaceLocalUrl, timeout, uploadToCloud };
|