@dereekb/zoom 12.1.0
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/LICENSE +21 -0
- package/README.md +6 -0
- package/index.cjs.d.ts +1 -0
- package/index.cjs.js +4346 -0
- package/index.esm.d.ts +1 -0
- package/index.esm.js +4293 -0
- package/nestjs/CHANGELOG.md +183 -0
- package/nestjs/README.md +11 -0
- package/nestjs/package.json +7 -0
- package/nestjs/src/index.d.ts +1 -0
- package/nestjs/src/index.js +5 -0
- package/nestjs/src/index.js.map +1 -0
- package/nestjs/src/lib/index.d.ts +2 -0
- package/nestjs/src/lib/index.js +6 -0
- package/nestjs/src/lib/index.js.map +1 -0
- package/nestjs/src/lib/oauth/index.d.ts +3 -0
- package/nestjs/src/lib/oauth/index.js +7 -0
- package/nestjs/src/lib/oauth/index.js.map +1 -0
- package/nestjs/src/lib/oauth/oauth.api.d.ts +12 -0
- package/nestjs/src/lib/oauth/oauth.api.js +41 -0
- package/nestjs/src/lib/oauth/oauth.api.js.map +1 -0
- package/nestjs/src/lib/oauth/oauth.config.d.ts +14 -0
- package/nestjs/src/lib/oauth/oauth.config.js +50 -0
- package/nestjs/src/lib/oauth/oauth.config.js.map +1 -0
- package/nestjs/src/lib/oauth/oauth.module.d.ts +29 -0
- package/nestjs/src/lib/oauth/oauth.module.js +36 -0
- package/nestjs/src/lib/oauth/oauth.module.js.map +1 -0
- package/nestjs/src/lib/oauth/oauth.service.d.ts +55 -0
- package/nestjs/src/lib/oauth/oauth.service.js +226 -0
- package/nestjs/src/lib/oauth/oauth.service.js.map +1 -0
- package/nestjs/src/lib/zoom/index.d.ts +3 -0
- package/nestjs/src/lib/zoom/index.js +7 -0
- package/nestjs/src/lib/zoom/index.js.map +1 -0
- package/nestjs/src/lib/zoom/zoom.api.d.ts +21 -0
- package/nestjs/src/lib/zoom/zoom.api.js +65 -0
- package/nestjs/src/lib/zoom/zoom.api.js.map +1 -0
- package/nestjs/src/lib/zoom/zoom.config.d.ts +10 -0
- package/nestjs/src/lib/zoom/zoom.config.js +15 -0
- package/nestjs/src/lib/zoom/zoom.config.js.map +1 -0
- package/nestjs/src/lib/zoom/zoom.module.d.ts +22 -0
- package/nestjs/src/lib/zoom/zoom.module.js +40 -0
- package/nestjs/src/lib/zoom/zoom.module.js.map +1 -0
- package/package.json +31 -0
- package/src/index.d.ts +1 -0
- package/src/lib/index.d.ts +7 -0
- package/src/lib/oauth/index.d.ts +5 -0
- package/src/lib/oauth/oauth.api.d.ts +39 -0
- package/src/lib/oauth/oauth.config.d.ts +44 -0
- package/src/lib/oauth/oauth.d.ts +71 -0
- package/src/lib/oauth/oauth.error.api.d.ts +30 -0
- package/src/lib/oauth/oauth.factory.d.ts +34 -0
- package/src/lib/zoom/index.d.ts +7 -0
- package/src/lib/zoom/zoom.api.meeting.d.ts +144 -0
- package/src/lib/zoom/zoom.api.meeting.type.d.ts +297 -0
- package/src/lib/zoom/zoom.api.user.d.ts +32 -0
- package/src/lib/zoom/zoom.api.user.type.d.ts +287 -0
- package/src/lib/zoom/zoom.config.d.ts +69 -0
- package/src/lib/zoom/zoom.error.api.d.ts +6 -0
- package/src/lib/zoom/zoom.factory.d.ts +23 -0
- package/src/lib/zoom.api.page.d.ts +73 -0
- package/src/lib/zoom.config.d.ts +39 -0
- package/src/lib/zoom.error.api.d.ts +145 -0
- package/src/lib/zoom.limit.d.ts +37 -0
- package/src/lib/zoom.type.d.ts +12 -0
package/index.cjs.js
ADDED
|
@@ -0,0 +1,4346 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var fetch = require('@dereekb/util/fetch');
|
|
4
|
+
var util = require('@dereekb/util');
|
|
5
|
+
var makeError = require('make-error');
|
|
6
|
+
|
|
7
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
8
|
+
|
|
9
|
+
var check = function (it) {
|
|
10
|
+
return it && it.Math === Math && it;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
14
|
+
var global$j =
|
|
15
|
+
// eslint-disable-next-line es/no-global-this -- safe
|
|
16
|
+
check(typeof globalThis == 'object' && globalThis) ||
|
|
17
|
+
check(typeof window == 'object' && window) ||
|
|
18
|
+
// eslint-disable-next-line no-restricted-globals -- safe
|
|
19
|
+
check(typeof self == 'object' && self) ||
|
|
20
|
+
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
21
|
+
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
22
|
+
// eslint-disable-next-line no-new-func -- fallback
|
|
23
|
+
(function () { return this; })() || Function('return this')();
|
|
24
|
+
|
|
25
|
+
var objectGetOwnPropertyDescriptor = {};
|
|
26
|
+
|
|
27
|
+
var fails$h = function (exec) {
|
|
28
|
+
try {
|
|
29
|
+
return !!exec();
|
|
30
|
+
} catch (error) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
var fails$g = fails$h;
|
|
36
|
+
|
|
37
|
+
// Detect IE8's incomplete defineProperty implementation
|
|
38
|
+
var descriptors = !fails$g(function () {
|
|
39
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
40
|
+
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
var fails$f = fails$h;
|
|
44
|
+
|
|
45
|
+
var functionBindNative = !fails$f(function () {
|
|
46
|
+
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
47
|
+
var test = (function () { /* empty */ }).bind();
|
|
48
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
49
|
+
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
var NATIVE_BIND$3 = functionBindNative;
|
|
53
|
+
|
|
54
|
+
var call$h = Function.prototype.call;
|
|
55
|
+
|
|
56
|
+
var functionCall = NATIVE_BIND$3 ? call$h.bind(call$h) : function () {
|
|
57
|
+
return call$h.apply(call$h, arguments);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
var objectPropertyIsEnumerable = {};
|
|
61
|
+
|
|
62
|
+
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
63
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
64
|
+
var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
|
|
65
|
+
|
|
66
|
+
// Nashorn ~ JDK8 bug
|
|
67
|
+
var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
68
|
+
|
|
69
|
+
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
70
|
+
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
71
|
+
objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
72
|
+
var descriptor = getOwnPropertyDescriptor$2(this, V);
|
|
73
|
+
return !!descriptor && descriptor.enumerable;
|
|
74
|
+
} : $propertyIsEnumerable;
|
|
75
|
+
|
|
76
|
+
var createPropertyDescriptor$4 = function (bitmap, value) {
|
|
77
|
+
return {
|
|
78
|
+
enumerable: !(bitmap & 1),
|
|
79
|
+
configurable: !(bitmap & 2),
|
|
80
|
+
writable: !(bitmap & 4),
|
|
81
|
+
value: value
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
var NATIVE_BIND$2 = functionBindNative;
|
|
86
|
+
|
|
87
|
+
var FunctionPrototype$2 = Function.prototype;
|
|
88
|
+
var call$g = FunctionPrototype$2.call;
|
|
89
|
+
var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$g, call$g);
|
|
90
|
+
|
|
91
|
+
var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
|
|
92
|
+
return function () {
|
|
93
|
+
return call$g.apply(fn, arguments);
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
var uncurryThis$j = functionUncurryThis;
|
|
98
|
+
|
|
99
|
+
var toString$4 = uncurryThis$j({}.toString);
|
|
100
|
+
var stringSlice$1 = uncurryThis$j(''.slice);
|
|
101
|
+
|
|
102
|
+
var classofRaw$2 = function (it) {
|
|
103
|
+
return stringSlice$1(toString$4(it), 8, -1);
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
var uncurryThis$i = functionUncurryThis;
|
|
107
|
+
var fails$e = fails$h;
|
|
108
|
+
var classof$7 = classofRaw$2;
|
|
109
|
+
|
|
110
|
+
var $Object$4 = Object;
|
|
111
|
+
var split = uncurryThis$i(''.split);
|
|
112
|
+
|
|
113
|
+
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
114
|
+
var indexedObject = fails$e(function () {
|
|
115
|
+
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
116
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
117
|
+
return !$Object$4('z').propertyIsEnumerable(0);
|
|
118
|
+
}) ? function (it) {
|
|
119
|
+
return classof$7(it) === 'String' ? split(it, '') : $Object$4(it);
|
|
120
|
+
} : $Object$4;
|
|
121
|
+
|
|
122
|
+
// we can't use just `it == null` since of `document.all` special case
|
|
123
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
|
|
124
|
+
var isNullOrUndefined$4 = function (it) {
|
|
125
|
+
return it === null || it === undefined;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
var isNullOrUndefined$3 = isNullOrUndefined$4;
|
|
129
|
+
|
|
130
|
+
var $TypeError$d = TypeError;
|
|
131
|
+
|
|
132
|
+
// `RequireObjectCoercible` abstract operation
|
|
133
|
+
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
134
|
+
var requireObjectCoercible$3 = function (it) {
|
|
135
|
+
if (isNullOrUndefined$3(it)) throw new $TypeError$d("Can't call method on " + it);
|
|
136
|
+
return it;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
// toObject with fallback for non-array-like ES3 strings
|
|
140
|
+
var IndexedObject$1 = indexedObject;
|
|
141
|
+
var requireObjectCoercible$2 = requireObjectCoercible$3;
|
|
142
|
+
|
|
143
|
+
var toIndexedObject$5 = function (it) {
|
|
144
|
+
return IndexedObject$1(requireObjectCoercible$2(it));
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
148
|
+
var documentAll = typeof document == 'object' && document.all;
|
|
149
|
+
|
|
150
|
+
// `IsCallable` abstract operation
|
|
151
|
+
// https://tc39.es/ecma262/#sec-iscallable
|
|
152
|
+
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
153
|
+
var isCallable$m = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
|
|
154
|
+
return typeof argument == 'function' || argument === documentAll;
|
|
155
|
+
} : function (argument) {
|
|
156
|
+
return typeof argument == 'function';
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
var isCallable$l = isCallable$m;
|
|
160
|
+
|
|
161
|
+
var isObject$c = function (it) {
|
|
162
|
+
return typeof it == 'object' ? it !== null : isCallable$l(it);
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
var global$i = global$j;
|
|
166
|
+
var isCallable$k = isCallable$m;
|
|
167
|
+
|
|
168
|
+
var aFunction = function (argument) {
|
|
169
|
+
return isCallable$k(argument) ? argument : undefined;
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
var getBuiltIn$a = function (namespace, method) {
|
|
173
|
+
return arguments.length < 2 ? aFunction(global$i[namespace]) : global$i[namespace] && global$i[namespace][method];
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
var uncurryThis$h = functionUncurryThis;
|
|
177
|
+
|
|
178
|
+
var objectIsPrototypeOf = uncurryThis$h({}.isPrototypeOf);
|
|
179
|
+
|
|
180
|
+
var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
|
|
181
|
+
|
|
182
|
+
var global$h = global$j;
|
|
183
|
+
var userAgent$3 = engineUserAgent;
|
|
184
|
+
|
|
185
|
+
var process$3 = global$h.process;
|
|
186
|
+
var Deno$1 = global$h.Deno;
|
|
187
|
+
var versions = process$3 && process$3.versions || Deno$1 && Deno$1.version;
|
|
188
|
+
var v8 = versions && versions.v8;
|
|
189
|
+
var match, version;
|
|
190
|
+
|
|
191
|
+
if (v8) {
|
|
192
|
+
match = v8.split('.');
|
|
193
|
+
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
194
|
+
// but their correct versions are not interesting for us
|
|
195
|
+
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
199
|
+
// so check `userAgent` even if `.v8` exists, but 0
|
|
200
|
+
if (!version && userAgent$3) {
|
|
201
|
+
match = userAgent$3.match(/Edge\/(\d+)/);
|
|
202
|
+
if (!match || match[1] >= 74) {
|
|
203
|
+
match = userAgent$3.match(/Chrome\/(\d+)/);
|
|
204
|
+
if (match) version = +match[1];
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
var engineV8Version = version;
|
|
209
|
+
|
|
210
|
+
/* eslint-disable es/no-symbol -- required for testing */
|
|
211
|
+
var V8_VERSION$1 = engineV8Version;
|
|
212
|
+
var fails$d = fails$h;
|
|
213
|
+
var global$g = global$j;
|
|
214
|
+
|
|
215
|
+
var $String$6 = global$g.String;
|
|
216
|
+
|
|
217
|
+
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
218
|
+
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$d(function () {
|
|
219
|
+
var symbol = Symbol('symbol detection');
|
|
220
|
+
// Chrome 38 Symbol has incorrect toString conversion
|
|
221
|
+
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
222
|
+
// nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
|
|
223
|
+
// of course, fail.
|
|
224
|
+
return !$String$6(symbol) || !(Object(symbol) instanceof Symbol) ||
|
|
225
|
+
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
226
|
+
!Symbol.sham && V8_VERSION$1 && V8_VERSION$1 < 41;
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
/* eslint-disable es/no-symbol -- required for testing */
|
|
230
|
+
var NATIVE_SYMBOL$2 = symbolConstructorDetection;
|
|
231
|
+
|
|
232
|
+
var useSymbolAsUid = NATIVE_SYMBOL$2
|
|
233
|
+
&& !Symbol.sham
|
|
234
|
+
&& typeof Symbol.iterator == 'symbol';
|
|
235
|
+
|
|
236
|
+
var getBuiltIn$9 = getBuiltIn$a;
|
|
237
|
+
var isCallable$j = isCallable$m;
|
|
238
|
+
var isPrototypeOf$4 = objectIsPrototypeOf;
|
|
239
|
+
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
240
|
+
|
|
241
|
+
var $Object$3 = Object;
|
|
242
|
+
|
|
243
|
+
var isSymbol$3 = USE_SYMBOL_AS_UID$1 ? function (it) {
|
|
244
|
+
return typeof it == 'symbol';
|
|
245
|
+
} : function (it) {
|
|
246
|
+
var $Symbol = getBuiltIn$9('Symbol');
|
|
247
|
+
return isCallable$j($Symbol) && isPrototypeOf$4($Symbol.prototype, $Object$3(it));
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
var $String$5 = String;
|
|
251
|
+
|
|
252
|
+
var tryToString$4 = function (argument) {
|
|
253
|
+
try {
|
|
254
|
+
return $String$5(argument);
|
|
255
|
+
} catch (error) {
|
|
256
|
+
return 'Object';
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
var isCallable$i = isCallable$m;
|
|
261
|
+
var tryToString$3 = tryToString$4;
|
|
262
|
+
|
|
263
|
+
var $TypeError$c = TypeError;
|
|
264
|
+
|
|
265
|
+
// `Assert: IsCallable(argument) is true`
|
|
266
|
+
var aCallable$9 = function (argument) {
|
|
267
|
+
if (isCallable$i(argument)) return argument;
|
|
268
|
+
throw new $TypeError$c(tryToString$3(argument) + ' is not a function');
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
var aCallable$8 = aCallable$9;
|
|
272
|
+
var isNullOrUndefined$2 = isNullOrUndefined$4;
|
|
273
|
+
|
|
274
|
+
// `GetMethod` abstract operation
|
|
275
|
+
// https://tc39.es/ecma262/#sec-getmethod
|
|
276
|
+
var getMethod$3 = function (V, P) {
|
|
277
|
+
var func = V[P];
|
|
278
|
+
return isNullOrUndefined$2(func) ? undefined : aCallable$8(func);
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
var call$f = functionCall;
|
|
282
|
+
var isCallable$h = isCallable$m;
|
|
283
|
+
var isObject$b = isObject$c;
|
|
284
|
+
|
|
285
|
+
var $TypeError$b = TypeError;
|
|
286
|
+
|
|
287
|
+
// `OrdinaryToPrimitive` abstract operation
|
|
288
|
+
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
289
|
+
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
290
|
+
var fn, val;
|
|
291
|
+
if (pref === 'string' && isCallable$h(fn = input.toString) && !isObject$b(val = call$f(fn, input))) return val;
|
|
292
|
+
if (isCallable$h(fn = input.valueOf) && !isObject$b(val = call$f(fn, input))) return val;
|
|
293
|
+
if (pref !== 'string' && isCallable$h(fn = input.toString) && !isObject$b(val = call$f(fn, input))) return val;
|
|
294
|
+
throw new $TypeError$b("Can't convert object to primitive value");
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
var sharedStore = {exports: {}};
|
|
298
|
+
|
|
299
|
+
var global$f = global$j;
|
|
300
|
+
|
|
301
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
302
|
+
var defineProperty$7 = Object.defineProperty;
|
|
303
|
+
|
|
304
|
+
var defineGlobalProperty$3 = function (key, value) {
|
|
305
|
+
try {
|
|
306
|
+
defineProperty$7(global$f, key, { value: value, configurable: true, writable: true });
|
|
307
|
+
} catch (error) {
|
|
308
|
+
global$f[key] = value;
|
|
309
|
+
} return value;
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
var globalThis$1 = global$j;
|
|
313
|
+
var defineGlobalProperty$2 = defineGlobalProperty$3;
|
|
314
|
+
|
|
315
|
+
var SHARED = '__core-js_shared__';
|
|
316
|
+
var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
317
|
+
|
|
318
|
+
(store$3.versions || (store$3.versions = [])).push({
|
|
319
|
+
version: '3.36.1',
|
|
320
|
+
mode: 'global',
|
|
321
|
+
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
|
|
322
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE',
|
|
323
|
+
source: 'https://github.com/zloirock/core-js'
|
|
324
|
+
});
|
|
325
|
+
|
|
326
|
+
var sharedStoreExports = sharedStore.exports;
|
|
327
|
+
|
|
328
|
+
var store$2 = sharedStoreExports;
|
|
329
|
+
|
|
330
|
+
var shared$3 = function (key, value) {
|
|
331
|
+
return store$2[key] || (store$2[key] = value || {});
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
var requireObjectCoercible$1 = requireObjectCoercible$3;
|
|
335
|
+
|
|
336
|
+
var $Object$2 = Object;
|
|
337
|
+
|
|
338
|
+
// `ToObject` abstract operation
|
|
339
|
+
// https://tc39.es/ecma262/#sec-toobject
|
|
340
|
+
var toObject$3 = function (argument) {
|
|
341
|
+
return $Object$2(requireObjectCoercible$1(argument));
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
var uncurryThis$g = functionUncurryThis;
|
|
345
|
+
var toObject$2 = toObject$3;
|
|
346
|
+
|
|
347
|
+
var hasOwnProperty = uncurryThis$g({}.hasOwnProperty);
|
|
348
|
+
|
|
349
|
+
// `HasOwnProperty` abstract operation
|
|
350
|
+
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
351
|
+
// eslint-disable-next-line es/no-object-hasown -- safe
|
|
352
|
+
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
353
|
+
return hasOwnProperty(toObject$2(it), key);
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
var uncurryThis$f = functionUncurryThis;
|
|
357
|
+
|
|
358
|
+
var id = 0;
|
|
359
|
+
var postfix = Math.random();
|
|
360
|
+
var toString$3 = uncurryThis$f(1.0.toString);
|
|
361
|
+
|
|
362
|
+
var uid$2 = function (key) {
|
|
363
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
var global$e = global$j;
|
|
367
|
+
var shared$2 = shared$3;
|
|
368
|
+
var hasOwn$b = hasOwnProperty_1;
|
|
369
|
+
var uid$1 = uid$2;
|
|
370
|
+
var NATIVE_SYMBOL$1 = symbolConstructorDetection;
|
|
371
|
+
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
372
|
+
|
|
373
|
+
var Symbol$1 = global$e.Symbol;
|
|
374
|
+
var WellKnownSymbolsStore = shared$2('wks');
|
|
375
|
+
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
376
|
+
|
|
377
|
+
var wellKnownSymbol$e = function (name) {
|
|
378
|
+
if (!hasOwn$b(WellKnownSymbolsStore, name)) {
|
|
379
|
+
WellKnownSymbolsStore[name] = NATIVE_SYMBOL$1 && hasOwn$b(Symbol$1, name)
|
|
380
|
+
? Symbol$1[name]
|
|
381
|
+
: createWellKnownSymbol('Symbol.' + name);
|
|
382
|
+
} return WellKnownSymbolsStore[name];
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
var call$e = functionCall;
|
|
386
|
+
var isObject$a = isObject$c;
|
|
387
|
+
var isSymbol$2 = isSymbol$3;
|
|
388
|
+
var getMethod$2 = getMethod$3;
|
|
389
|
+
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
390
|
+
var wellKnownSymbol$d = wellKnownSymbol$e;
|
|
391
|
+
|
|
392
|
+
var $TypeError$a = TypeError;
|
|
393
|
+
var TO_PRIMITIVE = wellKnownSymbol$d('toPrimitive');
|
|
394
|
+
|
|
395
|
+
// `ToPrimitive` abstract operation
|
|
396
|
+
// https://tc39.es/ecma262/#sec-toprimitive
|
|
397
|
+
var toPrimitive$1 = function (input, pref) {
|
|
398
|
+
if (!isObject$a(input) || isSymbol$2(input)) return input;
|
|
399
|
+
var exoticToPrim = getMethod$2(input, TO_PRIMITIVE);
|
|
400
|
+
var result;
|
|
401
|
+
if (exoticToPrim) {
|
|
402
|
+
if (pref === undefined) pref = 'default';
|
|
403
|
+
result = call$e(exoticToPrim, input, pref);
|
|
404
|
+
if (!isObject$a(result) || isSymbol$2(result)) return result;
|
|
405
|
+
throw new $TypeError$a("Can't convert object to primitive value");
|
|
406
|
+
}
|
|
407
|
+
if (pref === undefined) pref = 'number';
|
|
408
|
+
return ordinaryToPrimitive(input, pref);
|
|
409
|
+
};
|
|
410
|
+
|
|
411
|
+
var toPrimitive = toPrimitive$1;
|
|
412
|
+
var isSymbol$1 = isSymbol$3;
|
|
413
|
+
|
|
414
|
+
// `ToPropertyKey` abstract operation
|
|
415
|
+
// https://tc39.es/ecma262/#sec-topropertykey
|
|
416
|
+
var toPropertyKey$2 = function (argument) {
|
|
417
|
+
var key = toPrimitive(argument, 'string');
|
|
418
|
+
return isSymbol$1(key) ? key : key + '';
|
|
419
|
+
};
|
|
420
|
+
|
|
421
|
+
var global$d = global$j;
|
|
422
|
+
var isObject$9 = isObject$c;
|
|
423
|
+
|
|
424
|
+
var document$3 = global$d.document;
|
|
425
|
+
// typeof document.createElement is 'object' in old IE
|
|
426
|
+
var EXISTS$1 = isObject$9(document$3) && isObject$9(document$3.createElement);
|
|
427
|
+
|
|
428
|
+
var documentCreateElement$2 = function (it) {
|
|
429
|
+
return EXISTS$1 ? document$3.createElement(it) : {};
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
var DESCRIPTORS$c = descriptors;
|
|
433
|
+
var fails$c = fails$h;
|
|
434
|
+
var createElement$1 = documentCreateElement$2;
|
|
435
|
+
|
|
436
|
+
// Thanks to IE8 for its funny defineProperty
|
|
437
|
+
var ie8DomDefine = !DESCRIPTORS$c && !fails$c(function () {
|
|
438
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
439
|
+
return Object.defineProperty(createElement$1('div'), 'a', {
|
|
440
|
+
get: function () { return 7; }
|
|
441
|
+
}).a !== 7;
|
|
442
|
+
});
|
|
443
|
+
|
|
444
|
+
var DESCRIPTORS$b = descriptors;
|
|
445
|
+
var call$d = functionCall;
|
|
446
|
+
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
447
|
+
var createPropertyDescriptor$3 = createPropertyDescriptor$4;
|
|
448
|
+
var toIndexedObject$4 = toIndexedObject$5;
|
|
449
|
+
var toPropertyKey$1 = toPropertyKey$2;
|
|
450
|
+
var hasOwn$a = hasOwnProperty_1;
|
|
451
|
+
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
452
|
+
|
|
453
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
454
|
+
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
455
|
+
|
|
456
|
+
// `Object.getOwnPropertyDescriptor` method
|
|
457
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
458
|
+
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$b ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
|
459
|
+
O = toIndexedObject$4(O);
|
|
460
|
+
P = toPropertyKey$1(P);
|
|
461
|
+
if (IE8_DOM_DEFINE$1) try {
|
|
462
|
+
return $getOwnPropertyDescriptor$1(O, P);
|
|
463
|
+
} catch (error) { /* empty */ }
|
|
464
|
+
if (hasOwn$a(O, P)) return createPropertyDescriptor$3(!call$d(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
465
|
+
};
|
|
466
|
+
|
|
467
|
+
var objectDefineProperty = {};
|
|
468
|
+
|
|
469
|
+
var DESCRIPTORS$a = descriptors;
|
|
470
|
+
var fails$b = fails$h;
|
|
471
|
+
|
|
472
|
+
// V8 ~ Chrome 36-
|
|
473
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
474
|
+
var v8PrototypeDefineBug = DESCRIPTORS$a && fails$b(function () {
|
|
475
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
476
|
+
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
477
|
+
value: 42,
|
|
478
|
+
writable: false
|
|
479
|
+
}).prototype !== 42;
|
|
480
|
+
});
|
|
481
|
+
|
|
482
|
+
var isObject$8 = isObject$c;
|
|
483
|
+
|
|
484
|
+
var $String$4 = String;
|
|
485
|
+
var $TypeError$9 = TypeError;
|
|
486
|
+
|
|
487
|
+
// `Assert: Type(argument) is Object`
|
|
488
|
+
var anObject$c = function (argument) {
|
|
489
|
+
if (isObject$8(argument)) return argument;
|
|
490
|
+
throw new $TypeError$9($String$4(argument) + ' is not an object');
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
var DESCRIPTORS$9 = descriptors;
|
|
494
|
+
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
495
|
+
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
496
|
+
var anObject$b = anObject$c;
|
|
497
|
+
var toPropertyKey = toPropertyKey$2;
|
|
498
|
+
|
|
499
|
+
var $TypeError$8 = TypeError;
|
|
500
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
501
|
+
var $defineProperty = Object.defineProperty;
|
|
502
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
503
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
504
|
+
var ENUMERABLE = 'enumerable';
|
|
505
|
+
var CONFIGURABLE$1 = 'configurable';
|
|
506
|
+
var WRITABLE = 'writable';
|
|
507
|
+
|
|
508
|
+
// `Object.defineProperty` method
|
|
509
|
+
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
510
|
+
objectDefineProperty.f = DESCRIPTORS$9 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
511
|
+
anObject$b(O);
|
|
512
|
+
P = toPropertyKey(P);
|
|
513
|
+
anObject$b(Attributes);
|
|
514
|
+
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
515
|
+
var current = $getOwnPropertyDescriptor(O, P);
|
|
516
|
+
if (current && current[WRITABLE]) {
|
|
517
|
+
O[P] = Attributes.value;
|
|
518
|
+
Attributes = {
|
|
519
|
+
configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
|
|
520
|
+
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
|
521
|
+
writable: false
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
} return $defineProperty(O, P, Attributes);
|
|
525
|
+
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
526
|
+
anObject$b(O);
|
|
527
|
+
P = toPropertyKey(P);
|
|
528
|
+
anObject$b(Attributes);
|
|
529
|
+
if (IE8_DOM_DEFINE) try {
|
|
530
|
+
return $defineProperty(O, P, Attributes);
|
|
531
|
+
} catch (error) { /* empty */ }
|
|
532
|
+
if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$8('Accessors not supported');
|
|
533
|
+
if ('value' in Attributes) O[P] = Attributes.value;
|
|
534
|
+
return O;
|
|
535
|
+
};
|
|
536
|
+
|
|
537
|
+
var DESCRIPTORS$8 = descriptors;
|
|
538
|
+
var definePropertyModule$3 = objectDefineProperty;
|
|
539
|
+
var createPropertyDescriptor$2 = createPropertyDescriptor$4;
|
|
540
|
+
|
|
541
|
+
var createNonEnumerableProperty$7 = DESCRIPTORS$8 ? function (object, key, value) {
|
|
542
|
+
return definePropertyModule$3.f(object, key, createPropertyDescriptor$2(1, value));
|
|
543
|
+
} : function (object, key, value) {
|
|
544
|
+
object[key] = value;
|
|
545
|
+
return object;
|
|
546
|
+
};
|
|
547
|
+
|
|
548
|
+
var makeBuiltIn$3 = {exports: {}};
|
|
549
|
+
|
|
550
|
+
var DESCRIPTORS$7 = descriptors;
|
|
551
|
+
var hasOwn$9 = hasOwnProperty_1;
|
|
552
|
+
|
|
553
|
+
var FunctionPrototype$1 = Function.prototype;
|
|
554
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
555
|
+
var getDescriptor = DESCRIPTORS$7 && Object.getOwnPropertyDescriptor;
|
|
556
|
+
|
|
557
|
+
var EXISTS = hasOwn$9(FunctionPrototype$1, 'name');
|
|
558
|
+
// additional protection from minified / mangled / dropped function names
|
|
559
|
+
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
560
|
+
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$7 || (DESCRIPTORS$7 && getDescriptor(FunctionPrototype$1, 'name').configurable));
|
|
561
|
+
|
|
562
|
+
var functionName = {
|
|
563
|
+
EXISTS: EXISTS,
|
|
564
|
+
PROPER: PROPER,
|
|
565
|
+
CONFIGURABLE: CONFIGURABLE
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
var uncurryThis$e = functionUncurryThis;
|
|
569
|
+
var isCallable$g = isCallable$m;
|
|
570
|
+
var store$1 = sharedStoreExports;
|
|
571
|
+
|
|
572
|
+
var functionToString = uncurryThis$e(Function.toString);
|
|
573
|
+
|
|
574
|
+
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
575
|
+
if (!isCallable$g(store$1.inspectSource)) {
|
|
576
|
+
store$1.inspectSource = function (it) {
|
|
577
|
+
return functionToString(it);
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
var inspectSource$3 = store$1.inspectSource;
|
|
582
|
+
|
|
583
|
+
var global$c = global$j;
|
|
584
|
+
var isCallable$f = isCallable$m;
|
|
585
|
+
|
|
586
|
+
var WeakMap$1 = global$c.WeakMap;
|
|
587
|
+
|
|
588
|
+
var weakMapBasicDetection = isCallable$f(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
589
|
+
|
|
590
|
+
var shared$1 = shared$3;
|
|
591
|
+
var uid = uid$2;
|
|
592
|
+
|
|
593
|
+
var keys$1 = shared$1('keys');
|
|
594
|
+
|
|
595
|
+
var sharedKey$3 = function (key) {
|
|
596
|
+
return keys$1[key] || (keys$1[key] = uid(key));
|
|
597
|
+
};
|
|
598
|
+
|
|
599
|
+
var hiddenKeys$4 = {};
|
|
600
|
+
|
|
601
|
+
var NATIVE_WEAK_MAP = weakMapBasicDetection;
|
|
602
|
+
var global$b = global$j;
|
|
603
|
+
var isObject$7 = isObject$c;
|
|
604
|
+
var createNonEnumerableProperty$6 = createNonEnumerableProperty$7;
|
|
605
|
+
var hasOwn$8 = hasOwnProperty_1;
|
|
606
|
+
var shared = sharedStoreExports;
|
|
607
|
+
var sharedKey$2 = sharedKey$3;
|
|
608
|
+
var hiddenKeys$3 = hiddenKeys$4;
|
|
609
|
+
|
|
610
|
+
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
611
|
+
var TypeError$2 = global$b.TypeError;
|
|
612
|
+
var WeakMap = global$b.WeakMap;
|
|
613
|
+
var set$1, get, has$6;
|
|
614
|
+
|
|
615
|
+
var enforce = function (it) {
|
|
616
|
+
return has$6(it) ? get(it) : set$1(it, {});
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
var getterFor = function (TYPE) {
|
|
620
|
+
return function (it) {
|
|
621
|
+
var state;
|
|
622
|
+
if (!isObject$7(it) || (state = get(it)).type !== TYPE) {
|
|
623
|
+
throw new TypeError$2('Incompatible receiver, ' + TYPE + ' required');
|
|
624
|
+
} return state;
|
|
625
|
+
};
|
|
626
|
+
};
|
|
627
|
+
|
|
628
|
+
if (NATIVE_WEAK_MAP || shared.state) {
|
|
629
|
+
var store = shared.state || (shared.state = new WeakMap());
|
|
630
|
+
/* eslint-disable no-self-assign -- prototype methods protection */
|
|
631
|
+
store.get = store.get;
|
|
632
|
+
store.has = store.has;
|
|
633
|
+
store.set = store.set;
|
|
634
|
+
/* eslint-enable no-self-assign -- prototype methods protection */
|
|
635
|
+
set$1 = function (it, metadata) {
|
|
636
|
+
if (store.has(it)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
|
|
637
|
+
metadata.facade = it;
|
|
638
|
+
store.set(it, metadata);
|
|
639
|
+
return metadata;
|
|
640
|
+
};
|
|
641
|
+
get = function (it) {
|
|
642
|
+
return store.get(it) || {};
|
|
643
|
+
};
|
|
644
|
+
has$6 = function (it) {
|
|
645
|
+
return store.has(it);
|
|
646
|
+
};
|
|
647
|
+
} else {
|
|
648
|
+
var STATE = sharedKey$2('state');
|
|
649
|
+
hiddenKeys$3[STATE] = true;
|
|
650
|
+
set$1 = function (it, metadata) {
|
|
651
|
+
if (hasOwn$8(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
|
|
652
|
+
metadata.facade = it;
|
|
653
|
+
createNonEnumerableProperty$6(it, STATE, metadata);
|
|
654
|
+
return metadata;
|
|
655
|
+
};
|
|
656
|
+
get = function (it) {
|
|
657
|
+
return hasOwn$8(it, STATE) ? it[STATE] : {};
|
|
658
|
+
};
|
|
659
|
+
has$6 = function (it) {
|
|
660
|
+
return hasOwn$8(it, STATE);
|
|
661
|
+
};
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
var internalState = {
|
|
665
|
+
set: set$1,
|
|
666
|
+
get: get,
|
|
667
|
+
has: has$6,
|
|
668
|
+
enforce: enforce,
|
|
669
|
+
getterFor: getterFor
|
|
670
|
+
};
|
|
671
|
+
|
|
672
|
+
var uncurryThis$d = functionUncurryThis;
|
|
673
|
+
var fails$a = fails$h;
|
|
674
|
+
var isCallable$e = isCallable$m;
|
|
675
|
+
var hasOwn$7 = hasOwnProperty_1;
|
|
676
|
+
var DESCRIPTORS$6 = descriptors;
|
|
677
|
+
var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
|
|
678
|
+
var inspectSource$2 = inspectSource$3;
|
|
679
|
+
var InternalStateModule$2 = internalState;
|
|
680
|
+
|
|
681
|
+
var enforceInternalState = InternalStateModule$2.enforce;
|
|
682
|
+
var getInternalState$1 = InternalStateModule$2.get;
|
|
683
|
+
var $String$3 = String;
|
|
684
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
685
|
+
var defineProperty$6 = Object.defineProperty;
|
|
686
|
+
var stringSlice = uncurryThis$d(''.slice);
|
|
687
|
+
var replace$2 = uncurryThis$d(''.replace);
|
|
688
|
+
var join = uncurryThis$d([].join);
|
|
689
|
+
|
|
690
|
+
var CONFIGURABLE_LENGTH = DESCRIPTORS$6 && !fails$a(function () {
|
|
691
|
+
return defineProperty$6(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
692
|
+
});
|
|
693
|
+
|
|
694
|
+
var TEMPLATE = String(String).split('String');
|
|
695
|
+
|
|
696
|
+
var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
|
|
697
|
+
if (stringSlice($String$3(name), 0, 7) === 'Symbol(') {
|
|
698
|
+
name = '[' + replace$2($String$3(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
|
|
699
|
+
}
|
|
700
|
+
if (options && options.getter) name = 'get ' + name;
|
|
701
|
+
if (options && options.setter) name = 'set ' + name;
|
|
702
|
+
if (!hasOwn$7(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
|
|
703
|
+
if (DESCRIPTORS$6) defineProperty$6(value, 'name', { value: name, configurable: true });
|
|
704
|
+
else value.name = name;
|
|
705
|
+
}
|
|
706
|
+
if (CONFIGURABLE_LENGTH && options && hasOwn$7(options, 'arity') && value.length !== options.arity) {
|
|
707
|
+
defineProperty$6(value, 'length', { value: options.arity });
|
|
708
|
+
}
|
|
709
|
+
try {
|
|
710
|
+
if (options && hasOwn$7(options, 'constructor') && options.constructor) {
|
|
711
|
+
if (DESCRIPTORS$6) defineProperty$6(value, 'prototype', { writable: false });
|
|
712
|
+
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
713
|
+
} else if (value.prototype) value.prototype = undefined;
|
|
714
|
+
} catch (error) { /* empty */ }
|
|
715
|
+
var state = enforceInternalState(value);
|
|
716
|
+
if (!hasOwn$7(state, 'source')) {
|
|
717
|
+
state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
|
|
718
|
+
} return value;
|
|
719
|
+
};
|
|
720
|
+
|
|
721
|
+
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
722
|
+
// eslint-disable-next-line no-extend-native -- required
|
|
723
|
+
Function.prototype.toString = makeBuiltIn$2(function toString() {
|
|
724
|
+
return isCallable$e(this) && getInternalState$1(this).source || inspectSource$2(this);
|
|
725
|
+
}, 'toString');
|
|
726
|
+
|
|
727
|
+
var makeBuiltInExports = makeBuiltIn$3.exports;
|
|
728
|
+
|
|
729
|
+
var isCallable$d = isCallable$m;
|
|
730
|
+
var definePropertyModule$2 = objectDefineProperty;
|
|
731
|
+
var makeBuiltIn$1 = makeBuiltInExports;
|
|
732
|
+
var defineGlobalProperty$1 = defineGlobalProperty$3;
|
|
733
|
+
|
|
734
|
+
var defineBuiltIn$6 = function (O, key, value, options) {
|
|
735
|
+
if (!options) options = {};
|
|
736
|
+
var simple = options.enumerable;
|
|
737
|
+
var name = options.name !== undefined ? options.name : key;
|
|
738
|
+
if (isCallable$d(value)) makeBuiltIn$1(value, name, options);
|
|
739
|
+
if (options.global) {
|
|
740
|
+
if (simple) O[key] = value;
|
|
741
|
+
else defineGlobalProperty$1(key, value);
|
|
742
|
+
} else {
|
|
743
|
+
try {
|
|
744
|
+
if (!options.unsafe) delete O[key];
|
|
745
|
+
else if (O[key]) simple = true;
|
|
746
|
+
} catch (error) { /* empty */ }
|
|
747
|
+
if (simple) O[key] = value;
|
|
748
|
+
else definePropertyModule$2.f(O, key, {
|
|
749
|
+
value: value,
|
|
750
|
+
enumerable: false,
|
|
751
|
+
configurable: !options.nonConfigurable,
|
|
752
|
+
writable: !options.nonWritable
|
|
753
|
+
});
|
|
754
|
+
} return O;
|
|
755
|
+
};
|
|
756
|
+
|
|
757
|
+
var objectGetOwnPropertyNames = {};
|
|
758
|
+
|
|
759
|
+
var ceil = Math.ceil;
|
|
760
|
+
var floor = Math.floor;
|
|
761
|
+
|
|
762
|
+
// `Math.trunc` method
|
|
763
|
+
// https://tc39.es/ecma262/#sec-math.trunc
|
|
764
|
+
// eslint-disable-next-line es/no-math-trunc -- safe
|
|
765
|
+
var mathTrunc = Math.trunc || function trunc(x) {
|
|
766
|
+
var n = +x;
|
|
767
|
+
return (n > 0 ? floor : ceil)(n);
|
|
768
|
+
};
|
|
769
|
+
|
|
770
|
+
var trunc = mathTrunc;
|
|
771
|
+
|
|
772
|
+
// `ToIntegerOrInfinity` abstract operation
|
|
773
|
+
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
774
|
+
var toIntegerOrInfinity$3 = function (argument) {
|
|
775
|
+
var number = +argument;
|
|
776
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
777
|
+
return number !== number || number === 0 ? 0 : trunc(number);
|
|
778
|
+
};
|
|
779
|
+
|
|
780
|
+
var toIntegerOrInfinity$2 = toIntegerOrInfinity$3;
|
|
781
|
+
|
|
782
|
+
var max$1 = Math.max;
|
|
783
|
+
var min$1 = Math.min;
|
|
784
|
+
|
|
785
|
+
// Helper for a popular repeating case of the spec:
|
|
786
|
+
// Let integer be ? ToInteger(index).
|
|
787
|
+
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
788
|
+
var toAbsoluteIndex$1 = function (index, length) {
|
|
789
|
+
var integer = toIntegerOrInfinity$2(index);
|
|
790
|
+
return integer < 0 ? max$1(integer + length, 0) : min$1(integer, length);
|
|
791
|
+
};
|
|
792
|
+
|
|
793
|
+
var toIntegerOrInfinity$1 = toIntegerOrInfinity$3;
|
|
794
|
+
|
|
795
|
+
var min = Math.min;
|
|
796
|
+
|
|
797
|
+
// `ToLength` abstract operation
|
|
798
|
+
// https://tc39.es/ecma262/#sec-tolength
|
|
799
|
+
var toLength$1 = function (argument) {
|
|
800
|
+
var len = toIntegerOrInfinity$1(argument);
|
|
801
|
+
return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
802
|
+
};
|
|
803
|
+
|
|
804
|
+
var toLength = toLength$1;
|
|
805
|
+
|
|
806
|
+
// `LengthOfArrayLike` abstract operation
|
|
807
|
+
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
808
|
+
var lengthOfArrayLike$2 = function (obj) {
|
|
809
|
+
return toLength(obj.length);
|
|
810
|
+
};
|
|
811
|
+
|
|
812
|
+
var toIndexedObject$3 = toIndexedObject$5;
|
|
813
|
+
var toAbsoluteIndex = toAbsoluteIndex$1;
|
|
814
|
+
var lengthOfArrayLike$1 = lengthOfArrayLike$2;
|
|
815
|
+
|
|
816
|
+
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
817
|
+
var createMethod = function (IS_INCLUDES) {
|
|
818
|
+
return function ($this, el, fromIndex) {
|
|
819
|
+
var O = toIndexedObject$3($this);
|
|
820
|
+
var length = lengthOfArrayLike$1(O);
|
|
821
|
+
if (length === 0) return !IS_INCLUDES && -1;
|
|
822
|
+
var index = toAbsoluteIndex(fromIndex, length);
|
|
823
|
+
var value;
|
|
824
|
+
// Array#includes uses SameValueZero equality algorithm
|
|
825
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
826
|
+
if (IS_INCLUDES && el !== el) while (length > index) {
|
|
827
|
+
value = O[index++];
|
|
828
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
829
|
+
if (value !== value) return true;
|
|
830
|
+
// Array#indexOf ignores holes, Array#includes - not
|
|
831
|
+
} else for (;length > index; index++) {
|
|
832
|
+
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
833
|
+
} return !IS_INCLUDES && -1;
|
|
834
|
+
};
|
|
835
|
+
};
|
|
836
|
+
|
|
837
|
+
var arrayIncludes = {
|
|
838
|
+
// `Array.prototype.includes` method
|
|
839
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
840
|
+
includes: createMethod(true),
|
|
841
|
+
// `Array.prototype.indexOf` method
|
|
842
|
+
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
843
|
+
indexOf: createMethod(false)
|
|
844
|
+
};
|
|
845
|
+
|
|
846
|
+
var uncurryThis$c = functionUncurryThis;
|
|
847
|
+
var hasOwn$6 = hasOwnProperty_1;
|
|
848
|
+
var toIndexedObject$2 = toIndexedObject$5;
|
|
849
|
+
var indexOf = arrayIncludes.indexOf;
|
|
850
|
+
var hiddenKeys$2 = hiddenKeys$4;
|
|
851
|
+
|
|
852
|
+
var push$1 = uncurryThis$c([].push);
|
|
853
|
+
|
|
854
|
+
var objectKeysInternal = function (object, names) {
|
|
855
|
+
var O = toIndexedObject$2(object);
|
|
856
|
+
var i = 0;
|
|
857
|
+
var result = [];
|
|
858
|
+
var key;
|
|
859
|
+
for (key in O) !hasOwn$6(hiddenKeys$2, key) && hasOwn$6(O, key) && push$1(result, key);
|
|
860
|
+
// Don't enum bug & hidden keys
|
|
861
|
+
while (names.length > i) if (hasOwn$6(O, key = names[i++])) {
|
|
862
|
+
~indexOf(result, key) || push$1(result, key);
|
|
863
|
+
}
|
|
864
|
+
return result;
|
|
865
|
+
};
|
|
866
|
+
|
|
867
|
+
// IE8- don't enum bug keys
|
|
868
|
+
var enumBugKeys$3 = [
|
|
869
|
+
'constructor',
|
|
870
|
+
'hasOwnProperty',
|
|
871
|
+
'isPrototypeOf',
|
|
872
|
+
'propertyIsEnumerable',
|
|
873
|
+
'toLocaleString',
|
|
874
|
+
'toString',
|
|
875
|
+
'valueOf'
|
|
876
|
+
];
|
|
877
|
+
|
|
878
|
+
var internalObjectKeys$1 = objectKeysInternal;
|
|
879
|
+
var enumBugKeys$2 = enumBugKeys$3;
|
|
880
|
+
|
|
881
|
+
var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
|
|
882
|
+
|
|
883
|
+
// `Object.getOwnPropertyNames` method
|
|
884
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
885
|
+
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
|
886
|
+
objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
887
|
+
return internalObjectKeys$1(O, hiddenKeys$1);
|
|
888
|
+
};
|
|
889
|
+
|
|
890
|
+
var objectGetOwnPropertySymbols = {};
|
|
891
|
+
|
|
892
|
+
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
893
|
+
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
894
|
+
|
|
895
|
+
var getBuiltIn$8 = getBuiltIn$a;
|
|
896
|
+
var uncurryThis$b = functionUncurryThis;
|
|
897
|
+
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
898
|
+
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
899
|
+
var anObject$a = anObject$c;
|
|
900
|
+
|
|
901
|
+
var concat$1 = uncurryThis$b([].concat);
|
|
902
|
+
|
|
903
|
+
// all object keys, includes non-enumerable and symbols
|
|
904
|
+
var ownKeys$1 = getBuiltIn$8('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
905
|
+
var keys = getOwnPropertyNamesModule.f(anObject$a(it));
|
|
906
|
+
var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
|
|
907
|
+
return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
|
|
908
|
+
};
|
|
909
|
+
|
|
910
|
+
var hasOwn$5 = hasOwnProperty_1;
|
|
911
|
+
var ownKeys = ownKeys$1;
|
|
912
|
+
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
913
|
+
var definePropertyModule$1 = objectDefineProperty;
|
|
914
|
+
|
|
915
|
+
var copyConstructorProperties$2 = function (target, source, exceptions) {
|
|
916
|
+
var keys = ownKeys(source);
|
|
917
|
+
var defineProperty = definePropertyModule$1.f;
|
|
918
|
+
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
919
|
+
for (var i = 0; i < keys.length; i++) {
|
|
920
|
+
var key = keys[i];
|
|
921
|
+
if (!hasOwn$5(target, key) && !(exceptions && hasOwn$5(exceptions, key))) {
|
|
922
|
+
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
};
|
|
926
|
+
|
|
927
|
+
var fails$9 = fails$h;
|
|
928
|
+
var isCallable$c = isCallable$m;
|
|
929
|
+
|
|
930
|
+
var replacement = /#|\.prototype\./;
|
|
931
|
+
|
|
932
|
+
var isForced$2 = function (feature, detection) {
|
|
933
|
+
var value = data[normalize(feature)];
|
|
934
|
+
return value === POLYFILL ? true
|
|
935
|
+
: value === NATIVE ? false
|
|
936
|
+
: isCallable$c(detection) ? fails$9(detection)
|
|
937
|
+
: !!detection;
|
|
938
|
+
};
|
|
939
|
+
|
|
940
|
+
var normalize = isForced$2.normalize = function (string) {
|
|
941
|
+
return String(string).replace(replacement, '.').toLowerCase();
|
|
942
|
+
};
|
|
943
|
+
|
|
944
|
+
var data = isForced$2.data = {};
|
|
945
|
+
var NATIVE = isForced$2.NATIVE = 'N';
|
|
946
|
+
var POLYFILL = isForced$2.POLYFILL = 'P';
|
|
947
|
+
|
|
948
|
+
var isForced_1 = isForced$2;
|
|
949
|
+
|
|
950
|
+
var global$a = global$j;
|
|
951
|
+
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
952
|
+
var createNonEnumerableProperty$5 = createNonEnumerableProperty$7;
|
|
953
|
+
var defineBuiltIn$5 = defineBuiltIn$6;
|
|
954
|
+
var defineGlobalProperty = defineGlobalProperty$3;
|
|
955
|
+
var copyConstructorProperties$1 = copyConstructorProperties$2;
|
|
956
|
+
var isForced$1 = isForced_1;
|
|
957
|
+
|
|
958
|
+
/*
|
|
959
|
+
options.target - name of the target object
|
|
960
|
+
options.global - target is the global object
|
|
961
|
+
options.stat - export as static methods of target
|
|
962
|
+
options.proto - export as prototype methods of target
|
|
963
|
+
options.real - real prototype method for the `pure` version
|
|
964
|
+
options.forced - export even if the native feature is available
|
|
965
|
+
options.bind - bind methods to the target, required for the `pure` version
|
|
966
|
+
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
967
|
+
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
968
|
+
options.sham - add a flag to not completely full polyfills
|
|
969
|
+
options.enumerable - export as enumerable property
|
|
970
|
+
options.dontCallGetSet - prevent calling a getter on target
|
|
971
|
+
options.name - the .name of the function if it does not match the key
|
|
972
|
+
*/
|
|
973
|
+
var _export = function (options, source) {
|
|
974
|
+
var TARGET = options.target;
|
|
975
|
+
var GLOBAL = options.global;
|
|
976
|
+
var STATIC = options.stat;
|
|
977
|
+
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
978
|
+
if (GLOBAL) {
|
|
979
|
+
target = global$a;
|
|
980
|
+
} else if (STATIC) {
|
|
981
|
+
target = global$a[TARGET] || defineGlobalProperty(TARGET, {});
|
|
982
|
+
} else {
|
|
983
|
+
target = global$a[TARGET] && global$a[TARGET].prototype;
|
|
984
|
+
}
|
|
985
|
+
if (target) for (key in source) {
|
|
986
|
+
sourceProperty = source[key];
|
|
987
|
+
if (options.dontCallGetSet) {
|
|
988
|
+
descriptor = getOwnPropertyDescriptor$1(target, key);
|
|
989
|
+
targetProperty = descriptor && descriptor.value;
|
|
990
|
+
} else targetProperty = target[key];
|
|
991
|
+
FORCED = isForced$1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
992
|
+
// contained in target
|
|
993
|
+
if (!FORCED && targetProperty !== undefined) {
|
|
994
|
+
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
995
|
+
copyConstructorProperties$1(sourceProperty, targetProperty);
|
|
996
|
+
}
|
|
997
|
+
// add a flag to not completely full polyfills
|
|
998
|
+
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
999
|
+
createNonEnumerableProperty$5(sourceProperty, 'sham', true);
|
|
1000
|
+
}
|
|
1001
|
+
defineBuiltIn$5(target, key, sourceProperty, options);
|
|
1002
|
+
}
|
|
1003
|
+
};
|
|
1004
|
+
|
|
1005
|
+
var NATIVE_BIND$1 = functionBindNative;
|
|
1006
|
+
|
|
1007
|
+
var FunctionPrototype = Function.prototype;
|
|
1008
|
+
var apply$3 = FunctionPrototype.apply;
|
|
1009
|
+
var call$c = FunctionPrototype.call;
|
|
1010
|
+
|
|
1011
|
+
// eslint-disable-next-line es/no-reflect -- safe
|
|
1012
|
+
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$c.bind(apply$3) : function () {
|
|
1013
|
+
return call$c.apply(apply$3, arguments);
|
|
1014
|
+
});
|
|
1015
|
+
|
|
1016
|
+
var uncurryThis$a = functionUncurryThis;
|
|
1017
|
+
|
|
1018
|
+
var arraySlice$2 = uncurryThis$a([].slice);
|
|
1019
|
+
|
|
1020
|
+
var classof$6 = classofRaw$2;
|
|
1021
|
+
|
|
1022
|
+
// `IsArray` abstract operation
|
|
1023
|
+
// https://tc39.es/ecma262/#sec-isarray
|
|
1024
|
+
// eslint-disable-next-line es/no-array-isarray -- safe
|
|
1025
|
+
var isArray$1 = Array.isArray || function isArray(argument) {
|
|
1026
|
+
return classof$6(argument) === 'Array';
|
|
1027
|
+
};
|
|
1028
|
+
|
|
1029
|
+
var wellKnownSymbol$c = wellKnownSymbol$e;
|
|
1030
|
+
|
|
1031
|
+
var TO_STRING_TAG$2 = wellKnownSymbol$c('toStringTag');
|
|
1032
|
+
var test = {};
|
|
1033
|
+
|
|
1034
|
+
test[TO_STRING_TAG$2] = 'z';
|
|
1035
|
+
|
|
1036
|
+
var toStringTagSupport = String(test) === '[object z]';
|
|
1037
|
+
|
|
1038
|
+
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
1039
|
+
var isCallable$b = isCallable$m;
|
|
1040
|
+
var classofRaw$1 = classofRaw$2;
|
|
1041
|
+
var wellKnownSymbol$b = wellKnownSymbol$e;
|
|
1042
|
+
|
|
1043
|
+
var TO_STRING_TAG$1 = wellKnownSymbol$b('toStringTag');
|
|
1044
|
+
var $Object$1 = Object;
|
|
1045
|
+
|
|
1046
|
+
// ES3 wrong here
|
|
1047
|
+
var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) === 'Arguments';
|
|
1048
|
+
|
|
1049
|
+
// fallback for IE11 Script Access Denied error
|
|
1050
|
+
var tryGet = function (it, key) {
|
|
1051
|
+
try {
|
|
1052
|
+
return it[key];
|
|
1053
|
+
} catch (error) { /* empty */ }
|
|
1054
|
+
};
|
|
1055
|
+
|
|
1056
|
+
// getting tag from ES6+ `Object.prototype.toString`
|
|
1057
|
+
var classof$5 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
|
|
1058
|
+
var O, tag, result;
|
|
1059
|
+
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
1060
|
+
// @@toStringTag case
|
|
1061
|
+
: typeof (tag = tryGet(O = $Object$1(it), TO_STRING_TAG$1)) == 'string' ? tag
|
|
1062
|
+
// builtinTag case
|
|
1063
|
+
: CORRECT_ARGUMENTS ? classofRaw$1(O)
|
|
1064
|
+
// ES3 arguments fallback
|
|
1065
|
+
: (result = classofRaw$1(O)) === 'Object' && isCallable$b(O.callee) ? 'Arguments' : result;
|
|
1066
|
+
};
|
|
1067
|
+
|
|
1068
|
+
var classof$4 = classof$5;
|
|
1069
|
+
|
|
1070
|
+
var $String$2 = String;
|
|
1071
|
+
|
|
1072
|
+
var toString$2 = function (argument) {
|
|
1073
|
+
if (classof$4(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
|
|
1074
|
+
return $String$2(argument);
|
|
1075
|
+
};
|
|
1076
|
+
|
|
1077
|
+
var uncurryThis$9 = functionUncurryThis;
|
|
1078
|
+
var isArray = isArray$1;
|
|
1079
|
+
var isCallable$a = isCallable$m;
|
|
1080
|
+
var classof$3 = classofRaw$2;
|
|
1081
|
+
var toString$1 = toString$2;
|
|
1082
|
+
|
|
1083
|
+
var push = uncurryThis$9([].push);
|
|
1084
|
+
|
|
1085
|
+
var getJsonReplacerFunction = function (replacer) {
|
|
1086
|
+
if (isCallable$a(replacer)) return replacer;
|
|
1087
|
+
if (!isArray(replacer)) return;
|
|
1088
|
+
var rawLength = replacer.length;
|
|
1089
|
+
var keys = [];
|
|
1090
|
+
for (var i = 0; i < rawLength; i++) {
|
|
1091
|
+
var element = replacer[i];
|
|
1092
|
+
if (typeof element == 'string') push(keys, element);
|
|
1093
|
+
else if (typeof element == 'number' || classof$3(element) === 'Number' || classof$3(element) === 'String') push(keys, toString$1(element));
|
|
1094
|
+
}
|
|
1095
|
+
var keysLength = keys.length;
|
|
1096
|
+
var root = true;
|
|
1097
|
+
return function (key, value) {
|
|
1098
|
+
if (root) {
|
|
1099
|
+
root = false;
|
|
1100
|
+
return value;
|
|
1101
|
+
}
|
|
1102
|
+
if (isArray(this)) return value;
|
|
1103
|
+
for (var j = 0; j < keysLength; j++) if (keys[j] === key) return value;
|
|
1104
|
+
};
|
|
1105
|
+
};
|
|
1106
|
+
|
|
1107
|
+
var $$g = _export;
|
|
1108
|
+
var getBuiltIn$7 = getBuiltIn$a;
|
|
1109
|
+
var apply$2 = functionApply;
|
|
1110
|
+
var call$b = functionCall;
|
|
1111
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
1112
|
+
var fails$8 = fails$h;
|
|
1113
|
+
var isCallable$9 = isCallable$m;
|
|
1114
|
+
var isSymbol = isSymbol$3;
|
|
1115
|
+
var arraySlice$1 = arraySlice$2;
|
|
1116
|
+
var getReplacerFunction = getJsonReplacerFunction;
|
|
1117
|
+
var NATIVE_SYMBOL = symbolConstructorDetection;
|
|
1118
|
+
|
|
1119
|
+
var $String$1 = String;
|
|
1120
|
+
var $stringify = getBuiltIn$7('JSON', 'stringify');
|
|
1121
|
+
var exec$1 = uncurryThis$8(/./.exec);
|
|
1122
|
+
var charAt = uncurryThis$8(''.charAt);
|
|
1123
|
+
var charCodeAt = uncurryThis$8(''.charCodeAt);
|
|
1124
|
+
var replace$1 = uncurryThis$8(''.replace);
|
|
1125
|
+
var numberToString = uncurryThis$8(1.0.toString);
|
|
1126
|
+
|
|
1127
|
+
var tester = /[\uD800-\uDFFF]/g;
|
|
1128
|
+
var low = /^[\uD800-\uDBFF]$/;
|
|
1129
|
+
var hi = /^[\uDC00-\uDFFF]$/;
|
|
1130
|
+
|
|
1131
|
+
var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails$8(function () {
|
|
1132
|
+
var symbol = getBuiltIn$7('Symbol')('stringify detection');
|
|
1133
|
+
// MS Edge converts symbol values to JSON as {}
|
|
1134
|
+
return $stringify([symbol]) !== '[null]'
|
|
1135
|
+
// WebKit converts symbol values to JSON as null
|
|
1136
|
+
|| $stringify({ a: symbol }) !== '{}'
|
|
1137
|
+
// V8 throws on boxed symbols
|
|
1138
|
+
|| $stringify(Object(symbol)) !== '{}';
|
|
1139
|
+
});
|
|
1140
|
+
|
|
1141
|
+
// https://github.com/tc39/proposal-well-formed-stringify
|
|
1142
|
+
var ILL_FORMED_UNICODE = fails$8(function () {
|
|
1143
|
+
return $stringify('\uDF06\uD834') !== '"\\udf06\\ud834"'
|
|
1144
|
+
|| $stringify('\uDEAD') !== '"\\udead"';
|
|
1145
|
+
});
|
|
1146
|
+
|
|
1147
|
+
var stringifyWithSymbolsFix = function (it, replacer) {
|
|
1148
|
+
var args = arraySlice$1(arguments);
|
|
1149
|
+
var $replacer = getReplacerFunction(replacer);
|
|
1150
|
+
if (!isCallable$9($replacer) && (it === undefined || isSymbol(it))) return; // IE8 returns string on undefined
|
|
1151
|
+
args[1] = function (key, value) {
|
|
1152
|
+
// some old implementations (like WebKit) could pass numbers as keys
|
|
1153
|
+
if (isCallable$9($replacer)) value = call$b($replacer, this, $String$1(key), value);
|
|
1154
|
+
if (!isSymbol(value)) return value;
|
|
1155
|
+
};
|
|
1156
|
+
return apply$2($stringify, null, args);
|
|
1157
|
+
};
|
|
1158
|
+
|
|
1159
|
+
var fixIllFormed = function (match, offset, string) {
|
|
1160
|
+
var prev = charAt(string, offset - 1);
|
|
1161
|
+
var next = charAt(string, offset + 1);
|
|
1162
|
+
if ((exec$1(low, match) && !exec$1(hi, next)) || (exec$1(hi, match) && !exec$1(low, prev))) {
|
|
1163
|
+
return '\\u' + numberToString(charCodeAt(match, 0), 16);
|
|
1164
|
+
} return match;
|
|
1165
|
+
};
|
|
1166
|
+
|
|
1167
|
+
if ($stringify) {
|
|
1168
|
+
// `JSON.stringify` method
|
|
1169
|
+
// https://tc39.es/ecma262/#sec-json.stringify
|
|
1170
|
+
$$g({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {
|
|
1171
|
+
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
1172
|
+
stringify: function stringify(it, replacer, space) {
|
|
1173
|
+
var args = arraySlice$1(arguments);
|
|
1174
|
+
var result = apply$2(WRONG_SYMBOLS_CONVERSION ? stringifyWithSymbolsFix : $stringify, null, args);
|
|
1175
|
+
return ILL_FORMED_UNICODE && typeof result == 'string' ? replace$1(result, tester, fixIllFormed) : result;
|
|
1176
|
+
}
|
|
1177
|
+
});
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1180
|
+
var internalObjectKeys = objectKeysInternal;
|
|
1181
|
+
var enumBugKeys$1 = enumBugKeys$3;
|
|
1182
|
+
|
|
1183
|
+
// `Object.keys` method
|
|
1184
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
|
1185
|
+
// eslint-disable-next-line es/no-object-keys -- safe
|
|
1186
|
+
var objectKeys$2 = Object.keys || function keys(O) {
|
|
1187
|
+
return internalObjectKeys(O, enumBugKeys$1);
|
|
1188
|
+
};
|
|
1189
|
+
|
|
1190
|
+
var DESCRIPTORS$5 = descriptors;
|
|
1191
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
1192
|
+
var call$a = functionCall;
|
|
1193
|
+
var fails$7 = fails$h;
|
|
1194
|
+
var objectKeys$1 = objectKeys$2;
|
|
1195
|
+
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
1196
|
+
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
1197
|
+
var toObject$1 = toObject$3;
|
|
1198
|
+
var IndexedObject = indexedObject;
|
|
1199
|
+
|
|
1200
|
+
// eslint-disable-next-line es/no-object-assign -- safe
|
|
1201
|
+
var $assign = Object.assign;
|
|
1202
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1203
|
+
var defineProperty$5 = Object.defineProperty;
|
|
1204
|
+
var concat = uncurryThis$7([].concat);
|
|
1205
|
+
|
|
1206
|
+
// `Object.assign` method
|
|
1207
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
1208
|
+
var objectAssign = !$assign || fails$7(function () {
|
|
1209
|
+
// should have correct order of operations (Edge bug)
|
|
1210
|
+
if (DESCRIPTORS$5 && $assign({ b: 1 }, $assign(defineProperty$5({}, 'a', {
|
|
1211
|
+
enumerable: true,
|
|
1212
|
+
get: function () {
|
|
1213
|
+
defineProperty$5(this, 'b', {
|
|
1214
|
+
value: 3,
|
|
1215
|
+
enumerable: false
|
|
1216
|
+
});
|
|
1217
|
+
}
|
|
1218
|
+
}), { b: 2 })).b !== 1) return true;
|
|
1219
|
+
// should work with symbols and should have deterministic property order (V8 bug)
|
|
1220
|
+
var A = {};
|
|
1221
|
+
var B = {};
|
|
1222
|
+
// eslint-disable-next-line es/no-symbol -- safe
|
|
1223
|
+
var symbol = Symbol('assign detection');
|
|
1224
|
+
var alphabet = 'abcdefghijklmnopqrst';
|
|
1225
|
+
A[symbol] = 7;
|
|
1226
|
+
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
1227
|
+
return $assign({}, A)[symbol] !== 7 || objectKeys$1($assign({}, B)).join('') !== alphabet;
|
|
1228
|
+
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
1229
|
+
var T = toObject$1(target);
|
|
1230
|
+
var argumentsLength = arguments.length;
|
|
1231
|
+
var index = 1;
|
|
1232
|
+
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
1233
|
+
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
1234
|
+
while (argumentsLength > index) {
|
|
1235
|
+
var S = IndexedObject(arguments[index++]);
|
|
1236
|
+
var keys = getOwnPropertySymbols ? concat(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
|
|
1237
|
+
var length = keys.length;
|
|
1238
|
+
var j = 0;
|
|
1239
|
+
var key;
|
|
1240
|
+
while (length > j) {
|
|
1241
|
+
key = keys[j++];
|
|
1242
|
+
if (!DESCRIPTORS$5 || call$a(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
1243
|
+
}
|
|
1244
|
+
} return T;
|
|
1245
|
+
} : $assign;
|
|
1246
|
+
|
|
1247
|
+
var $$f = _export;
|
|
1248
|
+
var assign = objectAssign;
|
|
1249
|
+
|
|
1250
|
+
// `Object.assign` method
|
|
1251
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
1252
|
+
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
1253
|
+
$$f({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
1254
|
+
assign: assign
|
|
1255
|
+
});
|
|
1256
|
+
|
|
1257
|
+
/**
|
|
1258
|
+
* The Zoom API returns the data for a page for a specific key.
|
|
1259
|
+
*
|
|
1260
|
+
* This function maps the data under that key to a ZoomPageResult with the data on the "data" variable.
|
|
1261
|
+
|
|
1262
|
+
* @param dataTypeKey
|
|
1263
|
+
* @returns
|
|
1264
|
+
*/
|
|
1265
|
+
function mapToZoomPageResult(dataTypeKey) {
|
|
1266
|
+
return data => {
|
|
1267
|
+
const {
|
|
1268
|
+
next_page_token,
|
|
1269
|
+
page_count,
|
|
1270
|
+
page_number,
|
|
1271
|
+
page_size,
|
|
1272
|
+
total_records
|
|
1273
|
+
} = data;
|
|
1274
|
+
return {
|
|
1275
|
+
data: data[dataTypeKey],
|
|
1276
|
+
next_page_token,
|
|
1277
|
+
page_count,
|
|
1278
|
+
page_number,
|
|
1279
|
+
page_size,
|
|
1280
|
+
total_records
|
|
1281
|
+
};
|
|
1282
|
+
};
|
|
1283
|
+
}
|
|
1284
|
+
/**
|
|
1285
|
+
* Creates a FetchPageFactory using the input ZoomFetchPageFetchFunction.
|
|
1286
|
+
*
|
|
1287
|
+
* @param fetch
|
|
1288
|
+
* @param defaults
|
|
1289
|
+
* @returns
|
|
1290
|
+
*/
|
|
1291
|
+
function zoomFetchPageFactory(fetch$1, defaults) {
|
|
1292
|
+
return fetch.fetchPageFactory(Object.assign({}, defaults, {
|
|
1293
|
+
fetch: fetch$1,
|
|
1294
|
+
readFetchPageResultInfo: function (result) {
|
|
1295
|
+
return {
|
|
1296
|
+
nextPageCursor: result.next_page_token,
|
|
1297
|
+
hasNext: Boolean(result.next_page_token) // has more when a non-empty next_page_token is returned
|
|
1298
|
+
};
|
|
1299
|
+
},
|
|
1300
|
+
buildInputForNextPage: function (pageResult, input, options) {
|
|
1301
|
+
var _options$maxItemsPerP;
|
|
1302
|
+
return Object.assign({}, input, {
|
|
1303
|
+
next_page_token: pageResult.nextPageCursor,
|
|
1304
|
+
page_size: (_options$maxItemsPerP = options.maxItemsPerPage) != null ? _options$maxItemsPerP : input.page_size
|
|
1305
|
+
});
|
|
1306
|
+
}
|
|
1307
|
+
}));
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
var objectDefineProperties = {};
|
|
1311
|
+
|
|
1312
|
+
var DESCRIPTORS$4 = descriptors;
|
|
1313
|
+
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
1314
|
+
var definePropertyModule = objectDefineProperty;
|
|
1315
|
+
var anObject$9 = anObject$c;
|
|
1316
|
+
var toIndexedObject$1 = toIndexedObject$5;
|
|
1317
|
+
var objectKeys = objectKeys$2;
|
|
1318
|
+
|
|
1319
|
+
// `Object.defineProperties` method
|
|
1320
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
1321
|
+
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
1322
|
+
objectDefineProperties.f = DESCRIPTORS$4 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
1323
|
+
anObject$9(O);
|
|
1324
|
+
var props = toIndexedObject$1(Properties);
|
|
1325
|
+
var keys = objectKeys(Properties);
|
|
1326
|
+
var length = keys.length;
|
|
1327
|
+
var index = 0;
|
|
1328
|
+
var key;
|
|
1329
|
+
while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
|
|
1330
|
+
return O;
|
|
1331
|
+
};
|
|
1332
|
+
|
|
1333
|
+
var getBuiltIn$6 = getBuiltIn$a;
|
|
1334
|
+
|
|
1335
|
+
var html$2 = getBuiltIn$6('document', 'documentElement');
|
|
1336
|
+
|
|
1337
|
+
/* global ActiveXObject -- old IE, WSH */
|
|
1338
|
+
var anObject$8 = anObject$c;
|
|
1339
|
+
var definePropertiesModule = objectDefineProperties;
|
|
1340
|
+
var enumBugKeys = enumBugKeys$3;
|
|
1341
|
+
var hiddenKeys = hiddenKeys$4;
|
|
1342
|
+
var html$1 = html$2;
|
|
1343
|
+
var documentCreateElement$1 = documentCreateElement$2;
|
|
1344
|
+
var sharedKey$1 = sharedKey$3;
|
|
1345
|
+
|
|
1346
|
+
var GT = '>';
|
|
1347
|
+
var LT = '<';
|
|
1348
|
+
var PROTOTYPE = 'prototype';
|
|
1349
|
+
var SCRIPT = 'script';
|
|
1350
|
+
var IE_PROTO$1 = sharedKey$1('IE_PROTO');
|
|
1351
|
+
|
|
1352
|
+
var EmptyConstructor = function () { /* empty */ };
|
|
1353
|
+
|
|
1354
|
+
var scriptTag = function (content) {
|
|
1355
|
+
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
1356
|
+
};
|
|
1357
|
+
|
|
1358
|
+
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
1359
|
+
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
1360
|
+
activeXDocument.write(scriptTag(''));
|
|
1361
|
+
activeXDocument.close();
|
|
1362
|
+
var temp = activeXDocument.parentWindow.Object;
|
|
1363
|
+
activeXDocument = null; // avoid memory leak
|
|
1364
|
+
return temp;
|
|
1365
|
+
};
|
|
1366
|
+
|
|
1367
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
1368
|
+
var NullProtoObjectViaIFrame = function () {
|
|
1369
|
+
// Thrash, waste and sodomy: IE GC bug
|
|
1370
|
+
var iframe = documentCreateElement$1('iframe');
|
|
1371
|
+
var JS = 'java' + SCRIPT + ':';
|
|
1372
|
+
var iframeDocument;
|
|
1373
|
+
iframe.style.display = 'none';
|
|
1374
|
+
html$1.appendChild(iframe);
|
|
1375
|
+
// https://github.com/zloirock/core-js/issues/475
|
|
1376
|
+
iframe.src = String(JS);
|
|
1377
|
+
iframeDocument = iframe.contentWindow.document;
|
|
1378
|
+
iframeDocument.open();
|
|
1379
|
+
iframeDocument.write(scriptTag('document.F=Object'));
|
|
1380
|
+
iframeDocument.close();
|
|
1381
|
+
return iframeDocument.F;
|
|
1382
|
+
};
|
|
1383
|
+
|
|
1384
|
+
// Check for document.domain and active x support
|
|
1385
|
+
// No need to use active x approach when document.domain is not set
|
|
1386
|
+
// see https://github.com/es-shims/es5-shim/issues/150
|
|
1387
|
+
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
1388
|
+
// avoid IE GC bug
|
|
1389
|
+
var activeXDocument;
|
|
1390
|
+
var NullProtoObject = function () {
|
|
1391
|
+
try {
|
|
1392
|
+
activeXDocument = new ActiveXObject('htmlfile');
|
|
1393
|
+
} catch (error) { /* ignore */ }
|
|
1394
|
+
NullProtoObject = typeof document != 'undefined'
|
|
1395
|
+
? document.domain && activeXDocument
|
|
1396
|
+
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
1397
|
+
: NullProtoObjectViaIFrame()
|
|
1398
|
+
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
1399
|
+
var length = enumBugKeys.length;
|
|
1400
|
+
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
1401
|
+
return NullProtoObject();
|
|
1402
|
+
};
|
|
1403
|
+
|
|
1404
|
+
hiddenKeys[IE_PROTO$1] = true;
|
|
1405
|
+
|
|
1406
|
+
// `Object.create` method
|
|
1407
|
+
// https://tc39.es/ecma262/#sec-object.create
|
|
1408
|
+
// eslint-disable-next-line es/no-object-create -- safe
|
|
1409
|
+
var objectCreate = Object.create || function create(O, Properties) {
|
|
1410
|
+
var result;
|
|
1411
|
+
if (O !== null) {
|
|
1412
|
+
EmptyConstructor[PROTOTYPE] = anObject$8(O);
|
|
1413
|
+
result = new EmptyConstructor();
|
|
1414
|
+
EmptyConstructor[PROTOTYPE] = null;
|
|
1415
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
1416
|
+
result[IE_PROTO$1] = O;
|
|
1417
|
+
} else result = NullProtoObject();
|
|
1418
|
+
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
1419
|
+
};
|
|
1420
|
+
|
|
1421
|
+
var wellKnownSymbol$a = wellKnownSymbol$e;
|
|
1422
|
+
var create$1 = objectCreate;
|
|
1423
|
+
var defineProperty$4 = objectDefineProperty.f;
|
|
1424
|
+
|
|
1425
|
+
var UNSCOPABLES = wellKnownSymbol$a('unscopables');
|
|
1426
|
+
var ArrayPrototype$1 = Array.prototype;
|
|
1427
|
+
|
|
1428
|
+
// Array.prototype[@@unscopables]
|
|
1429
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1430
|
+
if (ArrayPrototype$1[UNSCOPABLES] === undefined) {
|
|
1431
|
+
defineProperty$4(ArrayPrototype$1, UNSCOPABLES, {
|
|
1432
|
+
configurable: true,
|
|
1433
|
+
value: create$1(null)
|
|
1434
|
+
});
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
// add a key to Array.prototype[@@unscopables]
|
|
1438
|
+
var addToUnscopables$1 = function (key) {
|
|
1439
|
+
ArrayPrototype$1[UNSCOPABLES][key] = true;
|
|
1440
|
+
};
|
|
1441
|
+
|
|
1442
|
+
var iterators = {};
|
|
1443
|
+
|
|
1444
|
+
var fails$6 = fails$h;
|
|
1445
|
+
|
|
1446
|
+
var correctPrototypeGetter = !fails$6(function () {
|
|
1447
|
+
function F() { /* empty */ }
|
|
1448
|
+
F.prototype.constructor = null;
|
|
1449
|
+
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
1450
|
+
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
1451
|
+
});
|
|
1452
|
+
|
|
1453
|
+
var hasOwn$4 = hasOwnProperty_1;
|
|
1454
|
+
var isCallable$8 = isCallable$m;
|
|
1455
|
+
var toObject = toObject$3;
|
|
1456
|
+
var sharedKey = sharedKey$3;
|
|
1457
|
+
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
1458
|
+
|
|
1459
|
+
var IE_PROTO = sharedKey('IE_PROTO');
|
|
1460
|
+
var $Object = Object;
|
|
1461
|
+
var ObjectPrototype = $Object.prototype;
|
|
1462
|
+
|
|
1463
|
+
// `Object.getPrototypeOf` method
|
|
1464
|
+
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1465
|
+
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
1466
|
+
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
|
|
1467
|
+
var object = toObject(O);
|
|
1468
|
+
if (hasOwn$4(object, IE_PROTO)) return object[IE_PROTO];
|
|
1469
|
+
var constructor = object.constructor;
|
|
1470
|
+
if (isCallable$8(constructor) && object instanceof constructor) {
|
|
1471
|
+
return constructor.prototype;
|
|
1472
|
+
} return object instanceof $Object ? ObjectPrototype : null;
|
|
1473
|
+
};
|
|
1474
|
+
|
|
1475
|
+
var fails$5 = fails$h;
|
|
1476
|
+
var isCallable$7 = isCallable$m;
|
|
1477
|
+
var isObject$6 = isObject$c;
|
|
1478
|
+
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
1479
|
+
var defineBuiltIn$4 = defineBuiltIn$6;
|
|
1480
|
+
var wellKnownSymbol$9 = wellKnownSymbol$e;
|
|
1481
|
+
|
|
1482
|
+
var ITERATOR$5 = wellKnownSymbol$9('iterator');
|
|
1483
|
+
var BUGGY_SAFARI_ITERATORS$1 = false;
|
|
1484
|
+
|
|
1485
|
+
// `%IteratorPrototype%` object
|
|
1486
|
+
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
|
|
1487
|
+
var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
|
1488
|
+
|
|
1489
|
+
/* eslint-disable es/no-array-prototype-keys -- safe */
|
|
1490
|
+
if ([].keys) {
|
|
1491
|
+
arrayIterator = [].keys();
|
|
1492
|
+
// Safari 8 has buggy iterators w/o `next`
|
|
1493
|
+
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
|
|
1494
|
+
else {
|
|
1495
|
+
PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
|
|
1496
|
+
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
var NEW_ITERATOR_PROTOTYPE = !isObject$6(IteratorPrototype$2) || fails$5(function () {
|
|
1501
|
+
var test = {};
|
|
1502
|
+
// FF44- legacy iterators case
|
|
1503
|
+
return IteratorPrototype$2[ITERATOR$5].call(test) !== test;
|
|
1504
|
+
});
|
|
1505
|
+
|
|
1506
|
+
if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
|
|
1507
|
+
|
|
1508
|
+
// `%IteratorPrototype%[@@iterator]()` method
|
|
1509
|
+
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
|
|
1510
|
+
if (!isCallable$7(IteratorPrototype$2[ITERATOR$5])) {
|
|
1511
|
+
defineBuiltIn$4(IteratorPrototype$2, ITERATOR$5, function () {
|
|
1512
|
+
return this;
|
|
1513
|
+
});
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
var iteratorsCore = {
|
|
1517
|
+
IteratorPrototype: IteratorPrototype$2,
|
|
1518
|
+
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
|
|
1519
|
+
};
|
|
1520
|
+
|
|
1521
|
+
var defineProperty$3 = objectDefineProperty.f;
|
|
1522
|
+
var hasOwn$3 = hasOwnProperty_1;
|
|
1523
|
+
var wellKnownSymbol$8 = wellKnownSymbol$e;
|
|
1524
|
+
|
|
1525
|
+
var TO_STRING_TAG = wellKnownSymbol$8('toStringTag');
|
|
1526
|
+
|
|
1527
|
+
var setToStringTag$4 = function (target, TAG, STATIC) {
|
|
1528
|
+
if (target && !STATIC) target = target.prototype;
|
|
1529
|
+
if (target && !hasOwn$3(target, TO_STRING_TAG)) {
|
|
1530
|
+
defineProperty$3(target, TO_STRING_TAG, { configurable: true, value: TAG });
|
|
1531
|
+
}
|
|
1532
|
+
};
|
|
1533
|
+
|
|
1534
|
+
var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
|
|
1535
|
+
var create = objectCreate;
|
|
1536
|
+
var createPropertyDescriptor$1 = createPropertyDescriptor$4;
|
|
1537
|
+
var setToStringTag$3 = setToStringTag$4;
|
|
1538
|
+
var Iterators$4 = iterators;
|
|
1539
|
+
|
|
1540
|
+
var returnThis$1 = function () { return this; };
|
|
1541
|
+
|
|
1542
|
+
var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
|
|
1543
|
+
var TO_STRING_TAG = NAME + ' Iterator';
|
|
1544
|
+
IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor$1(+!ENUMERABLE_NEXT, next) });
|
|
1545
|
+
setToStringTag$3(IteratorConstructor, TO_STRING_TAG, false);
|
|
1546
|
+
Iterators$4[TO_STRING_TAG] = returnThis$1;
|
|
1547
|
+
return IteratorConstructor;
|
|
1548
|
+
};
|
|
1549
|
+
|
|
1550
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
1551
|
+
var aCallable$7 = aCallable$9;
|
|
1552
|
+
|
|
1553
|
+
var functionUncurryThisAccessor = function (object, key, method) {
|
|
1554
|
+
try {
|
|
1555
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1556
|
+
return uncurryThis$6(aCallable$7(Object.getOwnPropertyDescriptor(object, key)[method]));
|
|
1557
|
+
} catch (error) { /* empty */ }
|
|
1558
|
+
};
|
|
1559
|
+
|
|
1560
|
+
var isObject$5 = isObject$c;
|
|
1561
|
+
|
|
1562
|
+
var isPossiblePrototype$1 = function (argument) {
|
|
1563
|
+
return isObject$5(argument) || argument === null;
|
|
1564
|
+
};
|
|
1565
|
+
|
|
1566
|
+
var isPossiblePrototype = isPossiblePrototype$1;
|
|
1567
|
+
|
|
1568
|
+
var $String = String;
|
|
1569
|
+
var $TypeError$7 = TypeError;
|
|
1570
|
+
|
|
1571
|
+
var aPossiblePrototype$1 = function (argument) {
|
|
1572
|
+
if (isPossiblePrototype(argument)) return argument;
|
|
1573
|
+
throw new $TypeError$7("Can't set " + $String(argument) + ' as a prototype');
|
|
1574
|
+
};
|
|
1575
|
+
|
|
1576
|
+
/* eslint-disable no-proto -- safe */
|
|
1577
|
+
var uncurryThisAccessor$1 = functionUncurryThisAccessor;
|
|
1578
|
+
var isObject$4 = isObject$c;
|
|
1579
|
+
var requireObjectCoercible = requireObjectCoercible$3;
|
|
1580
|
+
var aPossiblePrototype = aPossiblePrototype$1;
|
|
1581
|
+
|
|
1582
|
+
// `Object.setPrototypeOf` method
|
|
1583
|
+
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
1584
|
+
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
1585
|
+
// eslint-disable-next-line es/no-object-setprototypeof -- safe
|
|
1586
|
+
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
1587
|
+
var CORRECT_SETTER = false;
|
|
1588
|
+
var test = {};
|
|
1589
|
+
var setter;
|
|
1590
|
+
try {
|
|
1591
|
+
setter = uncurryThisAccessor$1(Object.prototype, '__proto__', 'set');
|
|
1592
|
+
setter(test, []);
|
|
1593
|
+
CORRECT_SETTER = test instanceof Array;
|
|
1594
|
+
} catch (error) { /* empty */ }
|
|
1595
|
+
return function setPrototypeOf(O, proto) {
|
|
1596
|
+
requireObjectCoercible(O);
|
|
1597
|
+
aPossiblePrototype(proto);
|
|
1598
|
+
if (!isObject$4(O)) return O;
|
|
1599
|
+
if (CORRECT_SETTER) setter(O, proto);
|
|
1600
|
+
else O.__proto__ = proto;
|
|
1601
|
+
return O;
|
|
1602
|
+
};
|
|
1603
|
+
}() : undefined);
|
|
1604
|
+
|
|
1605
|
+
var $$e = _export;
|
|
1606
|
+
var call$9 = functionCall;
|
|
1607
|
+
var FunctionName = functionName;
|
|
1608
|
+
var isCallable$6 = isCallable$m;
|
|
1609
|
+
var createIteratorConstructor = iteratorCreateConstructor;
|
|
1610
|
+
var getPrototypeOf = objectGetPrototypeOf;
|
|
1611
|
+
var setPrototypeOf$3 = objectSetPrototypeOf;
|
|
1612
|
+
var setToStringTag$2 = setToStringTag$4;
|
|
1613
|
+
var createNonEnumerableProperty$4 = createNonEnumerableProperty$7;
|
|
1614
|
+
var defineBuiltIn$3 = defineBuiltIn$6;
|
|
1615
|
+
var wellKnownSymbol$7 = wellKnownSymbol$e;
|
|
1616
|
+
var Iterators$3 = iterators;
|
|
1617
|
+
var IteratorsCore = iteratorsCore;
|
|
1618
|
+
|
|
1619
|
+
var PROPER_FUNCTION_NAME$1 = FunctionName.PROPER;
|
|
1620
|
+
var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
|
|
1621
|
+
var IteratorPrototype = IteratorsCore.IteratorPrototype;
|
|
1622
|
+
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
|
|
1623
|
+
var ITERATOR$4 = wellKnownSymbol$7('iterator');
|
|
1624
|
+
var KEYS = 'keys';
|
|
1625
|
+
var VALUES = 'values';
|
|
1626
|
+
var ENTRIES = 'entries';
|
|
1627
|
+
|
|
1628
|
+
var returnThis = function () { return this; };
|
|
1629
|
+
|
|
1630
|
+
var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
|
|
1631
|
+
createIteratorConstructor(IteratorConstructor, NAME, next);
|
|
1632
|
+
|
|
1633
|
+
var getIterationMethod = function (KIND) {
|
|
1634
|
+
if (KIND === DEFAULT && defaultIterator) return defaultIterator;
|
|
1635
|
+
if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];
|
|
1636
|
+
|
|
1637
|
+
switch (KIND) {
|
|
1638
|
+
case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
|
|
1639
|
+
case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
|
|
1640
|
+
case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
return function () { return new IteratorConstructor(this); };
|
|
1644
|
+
};
|
|
1645
|
+
|
|
1646
|
+
var TO_STRING_TAG = NAME + ' Iterator';
|
|
1647
|
+
var INCORRECT_VALUES_NAME = false;
|
|
1648
|
+
var IterablePrototype = Iterable.prototype;
|
|
1649
|
+
var nativeIterator = IterablePrototype[ITERATOR$4]
|
|
1650
|
+
|| IterablePrototype['@@iterator']
|
|
1651
|
+
|| DEFAULT && IterablePrototype[DEFAULT];
|
|
1652
|
+
var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
|
|
1653
|
+
var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
|
|
1654
|
+
var CurrentIteratorPrototype, methods, KEY;
|
|
1655
|
+
|
|
1656
|
+
// fix native
|
|
1657
|
+
if (anyNativeIterator) {
|
|
1658
|
+
CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
|
|
1659
|
+
if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
|
|
1660
|
+
if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
|
|
1661
|
+
if (setPrototypeOf$3) {
|
|
1662
|
+
setPrototypeOf$3(CurrentIteratorPrototype, IteratorPrototype);
|
|
1663
|
+
} else if (!isCallable$6(CurrentIteratorPrototype[ITERATOR$4])) {
|
|
1664
|
+
defineBuiltIn$3(CurrentIteratorPrototype, ITERATOR$4, returnThis);
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
// Set @@toStringTag to native iterators
|
|
1668
|
+
setToStringTag$2(CurrentIteratorPrototype, TO_STRING_TAG, true);
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1672
|
+
// fix Array.prototype.{ values, @@iterator }.name in V8 / FF
|
|
1673
|
+
if (PROPER_FUNCTION_NAME$1 && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
|
1674
|
+
if (CONFIGURABLE_FUNCTION_NAME) {
|
|
1675
|
+
createNonEnumerableProperty$4(IterablePrototype, 'name', VALUES);
|
|
1676
|
+
} else {
|
|
1677
|
+
INCORRECT_VALUES_NAME = true;
|
|
1678
|
+
defaultIterator = function values() { return call$9(nativeIterator, this); };
|
|
1679
|
+
}
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
// export additional methods
|
|
1683
|
+
if (DEFAULT) {
|
|
1684
|
+
methods = {
|
|
1685
|
+
values: getIterationMethod(VALUES),
|
|
1686
|
+
keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
|
|
1687
|
+
entries: getIterationMethod(ENTRIES)
|
|
1688
|
+
};
|
|
1689
|
+
if (FORCED) for (KEY in methods) {
|
|
1690
|
+
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
1691
|
+
defineBuiltIn$3(IterablePrototype, KEY, methods[KEY]);
|
|
1692
|
+
}
|
|
1693
|
+
} else $$e({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
// define iterator
|
|
1697
|
+
if (IterablePrototype[ITERATOR$4] !== defaultIterator) {
|
|
1698
|
+
defineBuiltIn$3(IterablePrototype, ITERATOR$4, defaultIterator, { name: DEFAULT });
|
|
1699
|
+
}
|
|
1700
|
+
Iterators$3[NAME] = defaultIterator;
|
|
1701
|
+
|
|
1702
|
+
return methods;
|
|
1703
|
+
};
|
|
1704
|
+
|
|
1705
|
+
// `CreateIterResultObject` abstract operation
|
|
1706
|
+
// https://tc39.es/ecma262/#sec-createiterresultobject
|
|
1707
|
+
var createIterResultObject$1 = function (value, done) {
|
|
1708
|
+
return { value: value, done: done };
|
|
1709
|
+
};
|
|
1710
|
+
|
|
1711
|
+
var toIndexedObject = toIndexedObject$5;
|
|
1712
|
+
var addToUnscopables = addToUnscopables$1;
|
|
1713
|
+
var Iterators$2 = iterators;
|
|
1714
|
+
var InternalStateModule$1 = internalState;
|
|
1715
|
+
var defineProperty$2 = objectDefineProperty.f;
|
|
1716
|
+
var defineIterator = iteratorDefine;
|
|
1717
|
+
var createIterResultObject = createIterResultObject$1;
|
|
1718
|
+
var DESCRIPTORS$3 = descriptors;
|
|
1719
|
+
|
|
1720
|
+
var ARRAY_ITERATOR = 'Array Iterator';
|
|
1721
|
+
var setInternalState$1 = InternalStateModule$1.set;
|
|
1722
|
+
var getInternalState = InternalStateModule$1.getterFor(ARRAY_ITERATOR);
|
|
1723
|
+
|
|
1724
|
+
// `Array.prototype.entries` method
|
|
1725
|
+
// https://tc39.es/ecma262/#sec-array.prototype.entries
|
|
1726
|
+
// `Array.prototype.keys` method
|
|
1727
|
+
// https://tc39.es/ecma262/#sec-array.prototype.keys
|
|
1728
|
+
// `Array.prototype.values` method
|
|
1729
|
+
// https://tc39.es/ecma262/#sec-array.prototype.values
|
|
1730
|
+
// `Array.prototype[@@iterator]` method
|
|
1731
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@iterator
|
|
1732
|
+
// `CreateArrayIterator` internal method
|
|
1733
|
+
// https://tc39.es/ecma262/#sec-createarrayiterator
|
|
1734
|
+
var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
|
|
1735
|
+
setInternalState$1(this, {
|
|
1736
|
+
type: ARRAY_ITERATOR,
|
|
1737
|
+
target: toIndexedObject(iterated), // target
|
|
1738
|
+
index: 0, // next index
|
|
1739
|
+
kind: kind // kind
|
|
1740
|
+
});
|
|
1741
|
+
// `%ArrayIteratorPrototype%.next` method
|
|
1742
|
+
// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
|
|
1743
|
+
}, function () {
|
|
1744
|
+
var state = getInternalState(this);
|
|
1745
|
+
var target = state.target;
|
|
1746
|
+
var index = state.index++;
|
|
1747
|
+
if (!target || index >= target.length) {
|
|
1748
|
+
state.target = undefined;
|
|
1749
|
+
return createIterResultObject(undefined, true);
|
|
1750
|
+
}
|
|
1751
|
+
switch (state.kind) {
|
|
1752
|
+
case 'keys': return createIterResultObject(index, false);
|
|
1753
|
+
case 'values': return createIterResultObject(target[index], false);
|
|
1754
|
+
} return createIterResultObject([index, target[index]], false);
|
|
1755
|
+
}, 'values');
|
|
1756
|
+
|
|
1757
|
+
// argumentsList[@@iterator] is %ArrayProto_values%
|
|
1758
|
+
// https://tc39.es/ecma262/#sec-createunmappedargumentsobject
|
|
1759
|
+
// https://tc39.es/ecma262/#sec-createmappedargumentsobject
|
|
1760
|
+
var values = Iterators$2.Arguments = Iterators$2.Array;
|
|
1761
|
+
|
|
1762
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1763
|
+
addToUnscopables('keys');
|
|
1764
|
+
addToUnscopables('values');
|
|
1765
|
+
addToUnscopables('entries');
|
|
1766
|
+
|
|
1767
|
+
// V8 ~ Chrome 45- bug
|
|
1768
|
+
if (DESCRIPTORS$3 && values.name !== 'values') try {
|
|
1769
|
+
defineProperty$2(values, 'name', { value: 'values' });
|
|
1770
|
+
} catch (error) { /* empty */ }
|
|
1771
|
+
|
|
1772
|
+
var global$9 = global$j;
|
|
1773
|
+
var classof$2 = classofRaw$2;
|
|
1774
|
+
|
|
1775
|
+
var engineIsNode = classof$2(global$9.process) === 'process';
|
|
1776
|
+
|
|
1777
|
+
var makeBuiltIn = makeBuiltInExports;
|
|
1778
|
+
var defineProperty$1 = objectDefineProperty;
|
|
1779
|
+
|
|
1780
|
+
var defineBuiltInAccessor$1 = function (target, name, descriptor) {
|
|
1781
|
+
if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
|
|
1782
|
+
if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
|
|
1783
|
+
return defineProperty$1.f(target, name, descriptor);
|
|
1784
|
+
};
|
|
1785
|
+
|
|
1786
|
+
var getBuiltIn$5 = getBuiltIn$a;
|
|
1787
|
+
var defineBuiltInAccessor = defineBuiltInAccessor$1;
|
|
1788
|
+
var wellKnownSymbol$6 = wellKnownSymbol$e;
|
|
1789
|
+
var DESCRIPTORS$2 = descriptors;
|
|
1790
|
+
|
|
1791
|
+
var SPECIES$2 = wellKnownSymbol$6('species');
|
|
1792
|
+
|
|
1793
|
+
var setSpecies$1 = function (CONSTRUCTOR_NAME) {
|
|
1794
|
+
var Constructor = getBuiltIn$5(CONSTRUCTOR_NAME);
|
|
1795
|
+
|
|
1796
|
+
if (DESCRIPTORS$2 && Constructor && !Constructor[SPECIES$2]) {
|
|
1797
|
+
defineBuiltInAccessor(Constructor, SPECIES$2, {
|
|
1798
|
+
configurable: true,
|
|
1799
|
+
get: function () { return this; }
|
|
1800
|
+
});
|
|
1801
|
+
}
|
|
1802
|
+
};
|
|
1803
|
+
|
|
1804
|
+
var isPrototypeOf$3 = objectIsPrototypeOf;
|
|
1805
|
+
|
|
1806
|
+
var $TypeError$6 = TypeError;
|
|
1807
|
+
|
|
1808
|
+
var anInstance$1 = function (it, Prototype) {
|
|
1809
|
+
if (isPrototypeOf$3(Prototype, it)) return it;
|
|
1810
|
+
throw new $TypeError$6('Incorrect invocation');
|
|
1811
|
+
};
|
|
1812
|
+
|
|
1813
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
1814
|
+
var fails$4 = fails$h;
|
|
1815
|
+
var isCallable$5 = isCallable$m;
|
|
1816
|
+
var classof$1 = classof$5;
|
|
1817
|
+
var getBuiltIn$4 = getBuiltIn$a;
|
|
1818
|
+
var inspectSource$1 = inspectSource$3;
|
|
1819
|
+
|
|
1820
|
+
var noop = function () { /* empty */ };
|
|
1821
|
+
var construct = getBuiltIn$4('Reflect', 'construct');
|
|
1822
|
+
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
1823
|
+
var exec = uncurryThis$5(constructorRegExp.exec);
|
|
1824
|
+
var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
|
|
1825
|
+
|
|
1826
|
+
var isConstructorModern = function isConstructor(argument) {
|
|
1827
|
+
if (!isCallable$5(argument)) return false;
|
|
1828
|
+
try {
|
|
1829
|
+
construct(noop, [], argument);
|
|
1830
|
+
return true;
|
|
1831
|
+
} catch (error) {
|
|
1832
|
+
return false;
|
|
1833
|
+
}
|
|
1834
|
+
};
|
|
1835
|
+
|
|
1836
|
+
var isConstructorLegacy = function isConstructor(argument) {
|
|
1837
|
+
if (!isCallable$5(argument)) return false;
|
|
1838
|
+
switch (classof$1(argument)) {
|
|
1839
|
+
case 'AsyncFunction':
|
|
1840
|
+
case 'GeneratorFunction':
|
|
1841
|
+
case 'AsyncGeneratorFunction': return false;
|
|
1842
|
+
}
|
|
1843
|
+
try {
|
|
1844
|
+
// we can't check .prototype since constructors produced by .bind haven't it
|
|
1845
|
+
// `Function#toString` throws on some built-it function in some legacy engines
|
|
1846
|
+
// (for example, `DOMQuad` and similar in FF41-)
|
|
1847
|
+
return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource$1(argument));
|
|
1848
|
+
} catch (error) {
|
|
1849
|
+
return true;
|
|
1850
|
+
}
|
|
1851
|
+
};
|
|
1852
|
+
|
|
1853
|
+
isConstructorLegacy.sham = true;
|
|
1854
|
+
|
|
1855
|
+
// `IsConstructor` abstract operation
|
|
1856
|
+
// https://tc39.es/ecma262/#sec-isconstructor
|
|
1857
|
+
var isConstructor$1 = !construct || fails$4(function () {
|
|
1858
|
+
var called;
|
|
1859
|
+
return isConstructorModern(isConstructorModern.call)
|
|
1860
|
+
|| !isConstructorModern(Object)
|
|
1861
|
+
|| !isConstructorModern(function () { called = true; })
|
|
1862
|
+
|| called;
|
|
1863
|
+
}) ? isConstructorLegacy : isConstructorModern;
|
|
1864
|
+
|
|
1865
|
+
var isConstructor = isConstructor$1;
|
|
1866
|
+
var tryToString$2 = tryToString$4;
|
|
1867
|
+
|
|
1868
|
+
var $TypeError$5 = TypeError;
|
|
1869
|
+
|
|
1870
|
+
// `Assert: IsConstructor(argument) is true`
|
|
1871
|
+
var aConstructor$1 = function (argument) {
|
|
1872
|
+
if (isConstructor(argument)) return argument;
|
|
1873
|
+
throw new $TypeError$5(tryToString$2(argument) + ' is not a constructor');
|
|
1874
|
+
};
|
|
1875
|
+
|
|
1876
|
+
var anObject$7 = anObject$c;
|
|
1877
|
+
var aConstructor = aConstructor$1;
|
|
1878
|
+
var isNullOrUndefined$1 = isNullOrUndefined$4;
|
|
1879
|
+
var wellKnownSymbol$5 = wellKnownSymbol$e;
|
|
1880
|
+
|
|
1881
|
+
var SPECIES$1 = wellKnownSymbol$5('species');
|
|
1882
|
+
|
|
1883
|
+
// `SpeciesConstructor` abstract operation
|
|
1884
|
+
// https://tc39.es/ecma262/#sec-speciesconstructor
|
|
1885
|
+
var speciesConstructor$1 = function (O, defaultConstructor) {
|
|
1886
|
+
var C = anObject$7(O).constructor;
|
|
1887
|
+
var S;
|
|
1888
|
+
return C === undefined || isNullOrUndefined$1(S = anObject$7(C)[SPECIES$1]) ? defaultConstructor : aConstructor(S);
|
|
1889
|
+
};
|
|
1890
|
+
|
|
1891
|
+
var classofRaw = classofRaw$2;
|
|
1892
|
+
var uncurryThis$4 = functionUncurryThis;
|
|
1893
|
+
|
|
1894
|
+
var functionUncurryThisClause = function (fn) {
|
|
1895
|
+
// Nashorn bug:
|
|
1896
|
+
// https://github.com/zloirock/core-js/issues/1128
|
|
1897
|
+
// https://github.com/zloirock/core-js/issues/1130
|
|
1898
|
+
if (classofRaw(fn) === 'Function') return uncurryThis$4(fn);
|
|
1899
|
+
};
|
|
1900
|
+
|
|
1901
|
+
var uncurryThis$3 = functionUncurryThisClause;
|
|
1902
|
+
var aCallable$6 = aCallable$9;
|
|
1903
|
+
var NATIVE_BIND = functionBindNative;
|
|
1904
|
+
|
|
1905
|
+
var bind$4 = uncurryThis$3(uncurryThis$3.bind);
|
|
1906
|
+
|
|
1907
|
+
// optional / simple context binding
|
|
1908
|
+
var functionBindContext = function (fn, that) {
|
|
1909
|
+
aCallable$6(fn);
|
|
1910
|
+
return that === undefined ? fn : NATIVE_BIND ? bind$4(fn, that) : function (/* ...args */) {
|
|
1911
|
+
return fn.apply(that, arguments);
|
|
1912
|
+
};
|
|
1913
|
+
};
|
|
1914
|
+
|
|
1915
|
+
var $TypeError$4 = TypeError;
|
|
1916
|
+
|
|
1917
|
+
var validateArgumentsLength$1 = function (passed, required) {
|
|
1918
|
+
if (passed < required) throw new $TypeError$4('Not enough arguments');
|
|
1919
|
+
return passed;
|
|
1920
|
+
};
|
|
1921
|
+
|
|
1922
|
+
var userAgent$2 = engineUserAgent;
|
|
1923
|
+
|
|
1924
|
+
// eslint-disable-next-line redos/no-vulnerable -- safe
|
|
1925
|
+
var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
|
|
1926
|
+
|
|
1927
|
+
var global$8 = global$j;
|
|
1928
|
+
var apply$1 = functionApply;
|
|
1929
|
+
var bind$3 = functionBindContext;
|
|
1930
|
+
var isCallable$4 = isCallable$m;
|
|
1931
|
+
var hasOwn$2 = hasOwnProperty_1;
|
|
1932
|
+
var fails$3 = fails$h;
|
|
1933
|
+
var html = html$2;
|
|
1934
|
+
var arraySlice = arraySlice$2;
|
|
1935
|
+
var createElement = documentCreateElement$2;
|
|
1936
|
+
var validateArgumentsLength = validateArgumentsLength$1;
|
|
1937
|
+
var IS_IOS$1 = engineIsIos;
|
|
1938
|
+
var IS_NODE$3 = engineIsNode;
|
|
1939
|
+
|
|
1940
|
+
var set = global$8.setImmediate;
|
|
1941
|
+
var clear = global$8.clearImmediate;
|
|
1942
|
+
var process$2 = global$8.process;
|
|
1943
|
+
var Dispatch = global$8.Dispatch;
|
|
1944
|
+
var Function$1 = global$8.Function;
|
|
1945
|
+
var MessageChannel = global$8.MessageChannel;
|
|
1946
|
+
var String$1 = global$8.String;
|
|
1947
|
+
var counter = 0;
|
|
1948
|
+
var queue$2 = {};
|
|
1949
|
+
var ONREADYSTATECHANGE = 'onreadystatechange';
|
|
1950
|
+
var $location, defer, channel, port;
|
|
1951
|
+
|
|
1952
|
+
fails$3(function () {
|
|
1953
|
+
// Deno throws a ReferenceError on `location` access without `--location` flag
|
|
1954
|
+
$location = global$8.location;
|
|
1955
|
+
});
|
|
1956
|
+
|
|
1957
|
+
var run = function (id) {
|
|
1958
|
+
if (hasOwn$2(queue$2, id)) {
|
|
1959
|
+
var fn = queue$2[id];
|
|
1960
|
+
delete queue$2[id];
|
|
1961
|
+
fn();
|
|
1962
|
+
}
|
|
1963
|
+
};
|
|
1964
|
+
|
|
1965
|
+
var runner = function (id) {
|
|
1966
|
+
return function () {
|
|
1967
|
+
run(id);
|
|
1968
|
+
};
|
|
1969
|
+
};
|
|
1970
|
+
|
|
1971
|
+
var eventListener = function (event) {
|
|
1972
|
+
run(event.data);
|
|
1973
|
+
};
|
|
1974
|
+
|
|
1975
|
+
var globalPostMessageDefer = function (id) {
|
|
1976
|
+
// old engines have not location.origin
|
|
1977
|
+
global$8.postMessage(String$1(id), $location.protocol + '//' + $location.host);
|
|
1978
|
+
};
|
|
1979
|
+
|
|
1980
|
+
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
|
|
1981
|
+
if (!set || !clear) {
|
|
1982
|
+
set = function setImmediate(handler) {
|
|
1983
|
+
validateArgumentsLength(arguments.length, 1);
|
|
1984
|
+
var fn = isCallable$4(handler) ? handler : Function$1(handler);
|
|
1985
|
+
var args = arraySlice(arguments, 1);
|
|
1986
|
+
queue$2[++counter] = function () {
|
|
1987
|
+
apply$1(fn, undefined, args);
|
|
1988
|
+
};
|
|
1989
|
+
defer(counter);
|
|
1990
|
+
return counter;
|
|
1991
|
+
};
|
|
1992
|
+
clear = function clearImmediate(id) {
|
|
1993
|
+
delete queue$2[id];
|
|
1994
|
+
};
|
|
1995
|
+
// Node.js 0.8-
|
|
1996
|
+
if (IS_NODE$3) {
|
|
1997
|
+
defer = function (id) {
|
|
1998
|
+
process$2.nextTick(runner(id));
|
|
1999
|
+
};
|
|
2000
|
+
// Sphere (JS game engine) Dispatch API
|
|
2001
|
+
} else if (Dispatch && Dispatch.now) {
|
|
2002
|
+
defer = function (id) {
|
|
2003
|
+
Dispatch.now(runner(id));
|
|
2004
|
+
};
|
|
2005
|
+
// Browsers with MessageChannel, includes WebWorkers
|
|
2006
|
+
// except iOS - https://github.com/zloirock/core-js/issues/624
|
|
2007
|
+
} else if (MessageChannel && !IS_IOS$1) {
|
|
2008
|
+
channel = new MessageChannel();
|
|
2009
|
+
port = channel.port2;
|
|
2010
|
+
channel.port1.onmessage = eventListener;
|
|
2011
|
+
defer = bind$3(port.postMessage, port);
|
|
2012
|
+
// Browsers with postMessage, skip WebWorkers
|
|
2013
|
+
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
2014
|
+
} else if (
|
|
2015
|
+
global$8.addEventListener &&
|
|
2016
|
+
isCallable$4(global$8.postMessage) &&
|
|
2017
|
+
!global$8.importScripts &&
|
|
2018
|
+
$location && $location.protocol !== 'file:' &&
|
|
2019
|
+
!fails$3(globalPostMessageDefer)
|
|
2020
|
+
) {
|
|
2021
|
+
defer = globalPostMessageDefer;
|
|
2022
|
+
global$8.addEventListener('message', eventListener, false);
|
|
2023
|
+
// IE8-
|
|
2024
|
+
} else if (ONREADYSTATECHANGE in createElement('script')) {
|
|
2025
|
+
defer = function (id) {
|
|
2026
|
+
html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
|
|
2027
|
+
html.removeChild(this);
|
|
2028
|
+
run(id);
|
|
2029
|
+
};
|
|
2030
|
+
};
|
|
2031
|
+
// Rest old browsers
|
|
2032
|
+
} else {
|
|
2033
|
+
defer = function (id) {
|
|
2034
|
+
setTimeout(runner(id), 0);
|
|
2035
|
+
};
|
|
2036
|
+
}
|
|
2037
|
+
}
|
|
2038
|
+
|
|
2039
|
+
var task$1 = {
|
|
2040
|
+
set: set,
|
|
2041
|
+
clear: clear
|
|
2042
|
+
};
|
|
2043
|
+
|
|
2044
|
+
var global$7 = global$j;
|
|
2045
|
+
var DESCRIPTORS$1 = descriptors;
|
|
2046
|
+
|
|
2047
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
2048
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
2049
|
+
|
|
2050
|
+
// Avoid NodeJS experimental warning
|
|
2051
|
+
var safeGetBuiltIn$1 = function (name) {
|
|
2052
|
+
if (!DESCRIPTORS$1) return global$7[name];
|
|
2053
|
+
var descriptor = getOwnPropertyDescriptor(global$7, name);
|
|
2054
|
+
return descriptor && descriptor.value;
|
|
2055
|
+
};
|
|
2056
|
+
|
|
2057
|
+
var Queue$2 = function () {
|
|
2058
|
+
this.head = null;
|
|
2059
|
+
this.tail = null;
|
|
2060
|
+
};
|
|
2061
|
+
|
|
2062
|
+
Queue$2.prototype = {
|
|
2063
|
+
add: function (item) {
|
|
2064
|
+
var entry = { item: item, next: null };
|
|
2065
|
+
var tail = this.tail;
|
|
2066
|
+
if (tail) tail.next = entry;
|
|
2067
|
+
else this.head = entry;
|
|
2068
|
+
this.tail = entry;
|
|
2069
|
+
},
|
|
2070
|
+
get: function () {
|
|
2071
|
+
var entry = this.head;
|
|
2072
|
+
if (entry) {
|
|
2073
|
+
var next = this.head = entry.next;
|
|
2074
|
+
if (next === null) this.tail = null;
|
|
2075
|
+
return entry.item;
|
|
2076
|
+
}
|
|
2077
|
+
}
|
|
2078
|
+
};
|
|
2079
|
+
|
|
2080
|
+
var queue$1 = Queue$2;
|
|
2081
|
+
|
|
2082
|
+
var userAgent$1 = engineUserAgent;
|
|
2083
|
+
|
|
2084
|
+
var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && typeof Pebble != 'undefined';
|
|
2085
|
+
|
|
2086
|
+
var userAgent = engineUserAgent;
|
|
2087
|
+
|
|
2088
|
+
var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
|
|
2089
|
+
|
|
2090
|
+
var global$6 = global$j;
|
|
2091
|
+
var safeGetBuiltIn = safeGetBuiltIn$1;
|
|
2092
|
+
var bind$2 = functionBindContext;
|
|
2093
|
+
var macrotask = task$1.set;
|
|
2094
|
+
var Queue$1 = queue$1;
|
|
2095
|
+
var IS_IOS = engineIsIos;
|
|
2096
|
+
var IS_IOS_PEBBLE = engineIsIosPebble;
|
|
2097
|
+
var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
|
|
2098
|
+
var IS_NODE$2 = engineIsNode;
|
|
2099
|
+
|
|
2100
|
+
var MutationObserver = global$6.MutationObserver || global$6.WebKitMutationObserver;
|
|
2101
|
+
var document$2 = global$6.document;
|
|
2102
|
+
var process$1 = global$6.process;
|
|
2103
|
+
var Promise$1 = global$6.Promise;
|
|
2104
|
+
var microtask$1 = safeGetBuiltIn('queueMicrotask');
|
|
2105
|
+
var notify$1, toggle, node, promise, then;
|
|
2106
|
+
|
|
2107
|
+
// modern engines have queueMicrotask method
|
|
2108
|
+
if (!microtask$1) {
|
|
2109
|
+
var queue = new Queue$1();
|
|
2110
|
+
|
|
2111
|
+
var flush = function () {
|
|
2112
|
+
var parent, fn;
|
|
2113
|
+
if (IS_NODE$2 && (parent = process$1.domain)) parent.exit();
|
|
2114
|
+
while (fn = queue.get()) try {
|
|
2115
|
+
fn();
|
|
2116
|
+
} catch (error) {
|
|
2117
|
+
if (queue.head) notify$1();
|
|
2118
|
+
throw error;
|
|
2119
|
+
}
|
|
2120
|
+
if (parent) parent.enter();
|
|
2121
|
+
};
|
|
2122
|
+
|
|
2123
|
+
// browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
|
|
2124
|
+
// also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
|
|
2125
|
+
if (!IS_IOS && !IS_NODE$2 && !IS_WEBOS_WEBKIT && MutationObserver && document$2) {
|
|
2126
|
+
toggle = true;
|
|
2127
|
+
node = document$2.createTextNode('');
|
|
2128
|
+
new MutationObserver(flush).observe(node, { characterData: true });
|
|
2129
|
+
notify$1 = function () {
|
|
2130
|
+
node.data = toggle = !toggle;
|
|
2131
|
+
};
|
|
2132
|
+
// environments with maybe non-completely correct, but existent Promise
|
|
2133
|
+
} else if (!IS_IOS_PEBBLE && Promise$1 && Promise$1.resolve) {
|
|
2134
|
+
// Promise.resolve without an argument throws an error in LG WebOS 2
|
|
2135
|
+
promise = Promise$1.resolve(undefined);
|
|
2136
|
+
// workaround of WebKit ~ iOS Safari 10.1 bug
|
|
2137
|
+
promise.constructor = Promise$1;
|
|
2138
|
+
then = bind$2(promise.then, promise);
|
|
2139
|
+
notify$1 = function () {
|
|
2140
|
+
then(flush);
|
|
2141
|
+
};
|
|
2142
|
+
// Node.js without promises
|
|
2143
|
+
} else if (IS_NODE$2) {
|
|
2144
|
+
notify$1 = function () {
|
|
2145
|
+
process$1.nextTick(flush);
|
|
2146
|
+
};
|
|
2147
|
+
// for other environments - macrotask based on:
|
|
2148
|
+
// - setImmediate
|
|
2149
|
+
// - MessageChannel
|
|
2150
|
+
// - window.postMessage
|
|
2151
|
+
// - onreadystatechange
|
|
2152
|
+
// - setTimeout
|
|
2153
|
+
} else {
|
|
2154
|
+
// `webpack` dev server bug on IE global methods - use bind(fn, global)
|
|
2155
|
+
macrotask = bind$2(macrotask, global$6);
|
|
2156
|
+
notify$1 = function () {
|
|
2157
|
+
macrotask(flush);
|
|
2158
|
+
};
|
|
2159
|
+
}
|
|
2160
|
+
|
|
2161
|
+
microtask$1 = function (fn) {
|
|
2162
|
+
if (!queue.head) notify$1();
|
|
2163
|
+
queue.add(fn);
|
|
2164
|
+
};
|
|
2165
|
+
}
|
|
2166
|
+
|
|
2167
|
+
var microtask_1 = microtask$1;
|
|
2168
|
+
|
|
2169
|
+
var hostReportErrors$1 = function (a, b) {
|
|
2170
|
+
try {
|
|
2171
|
+
// eslint-disable-next-line no-console -- safe
|
|
2172
|
+
arguments.length === 1 ? console.error(a) : console.error(a, b);
|
|
2173
|
+
} catch (error) { /* empty */ }
|
|
2174
|
+
};
|
|
2175
|
+
|
|
2176
|
+
var perform$3 = function (exec) {
|
|
2177
|
+
try {
|
|
2178
|
+
return { error: false, value: exec() };
|
|
2179
|
+
} catch (error) {
|
|
2180
|
+
return { error: true, value: error };
|
|
2181
|
+
}
|
|
2182
|
+
};
|
|
2183
|
+
|
|
2184
|
+
var global$5 = global$j;
|
|
2185
|
+
|
|
2186
|
+
var promiseNativeConstructor = global$5.Promise;
|
|
2187
|
+
|
|
2188
|
+
/* global Deno -- Deno case */
|
|
2189
|
+
var engineIsDeno = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
|
|
2190
|
+
|
|
2191
|
+
var IS_DENO$1 = engineIsDeno;
|
|
2192
|
+
var IS_NODE$1 = engineIsNode;
|
|
2193
|
+
|
|
2194
|
+
var engineIsBrowser = !IS_DENO$1 && !IS_NODE$1
|
|
2195
|
+
&& typeof window == 'object'
|
|
2196
|
+
&& typeof document == 'object';
|
|
2197
|
+
|
|
2198
|
+
var global$4 = global$j;
|
|
2199
|
+
var NativePromiseConstructor$3 = promiseNativeConstructor;
|
|
2200
|
+
var isCallable$3 = isCallable$m;
|
|
2201
|
+
var isForced = isForced_1;
|
|
2202
|
+
var inspectSource = inspectSource$3;
|
|
2203
|
+
var wellKnownSymbol$4 = wellKnownSymbol$e;
|
|
2204
|
+
var IS_BROWSER = engineIsBrowser;
|
|
2205
|
+
var IS_DENO = engineIsDeno;
|
|
2206
|
+
var V8_VERSION = engineV8Version;
|
|
2207
|
+
|
|
2208
|
+
NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
|
|
2209
|
+
var SPECIES = wellKnownSymbol$4('species');
|
|
2210
|
+
var SUBCLASSING = false;
|
|
2211
|
+
var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$3(global$4.PromiseRejectionEvent);
|
|
2212
|
+
|
|
2213
|
+
var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
|
|
2214
|
+
var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
|
|
2215
|
+
var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$3);
|
|
2216
|
+
// V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
|
|
2217
|
+
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
|
|
2218
|
+
// We can't detect it synchronously, so just check versions
|
|
2219
|
+
if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
|
|
2220
|
+
// We can't use @@species feature detection in V8 since it causes
|
|
2221
|
+
// deoptimization and performance degradation
|
|
2222
|
+
// https://github.com/zloirock/core-js/issues/679
|
|
2223
|
+
if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
|
|
2224
|
+
// Detect correctness of subclassing with @@species support
|
|
2225
|
+
var promise = new NativePromiseConstructor$3(function (resolve) { resolve(1); });
|
|
2226
|
+
var FakePromise = function (exec) {
|
|
2227
|
+
exec(function () { /* empty */ }, function () { /* empty */ });
|
|
2228
|
+
};
|
|
2229
|
+
var constructor = promise.constructor = {};
|
|
2230
|
+
constructor[SPECIES] = FakePromise;
|
|
2231
|
+
SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
|
|
2232
|
+
if (!SUBCLASSING) return true;
|
|
2233
|
+
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
2234
|
+
} return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT$1;
|
|
2235
|
+
});
|
|
2236
|
+
|
|
2237
|
+
var promiseConstructorDetection = {
|
|
2238
|
+
CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR$5,
|
|
2239
|
+
REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT$1,
|
|
2240
|
+
SUBCLASSING: SUBCLASSING
|
|
2241
|
+
};
|
|
2242
|
+
|
|
2243
|
+
var newPromiseCapability$2 = {};
|
|
2244
|
+
|
|
2245
|
+
var aCallable$5 = aCallable$9;
|
|
2246
|
+
|
|
2247
|
+
var $TypeError$3 = TypeError;
|
|
2248
|
+
|
|
2249
|
+
var PromiseCapability = function (C) {
|
|
2250
|
+
var resolve, reject;
|
|
2251
|
+
this.promise = new C(function ($$resolve, $$reject) {
|
|
2252
|
+
if (resolve !== undefined || reject !== undefined) throw new $TypeError$3('Bad Promise constructor');
|
|
2253
|
+
resolve = $$resolve;
|
|
2254
|
+
reject = $$reject;
|
|
2255
|
+
});
|
|
2256
|
+
this.resolve = aCallable$5(resolve);
|
|
2257
|
+
this.reject = aCallable$5(reject);
|
|
2258
|
+
};
|
|
2259
|
+
|
|
2260
|
+
// `NewPromiseCapability` abstract operation
|
|
2261
|
+
// https://tc39.es/ecma262/#sec-newpromisecapability
|
|
2262
|
+
newPromiseCapability$2.f = function (C) {
|
|
2263
|
+
return new PromiseCapability(C);
|
|
2264
|
+
};
|
|
2265
|
+
|
|
2266
|
+
var $$d = _export;
|
|
2267
|
+
var IS_NODE = engineIsNode;
|
|
2268
|
+
var global$3 = global$j;
|
|
2269
|
+
var call$8 = functionCall;
|
|
2270
|
+
var defineBuiltIn$2 = defineBuiltIn$6;
|
|
2271
|
+
var setPrototypeOf$2 = objectSetPrototypeOf;
|
|
2272
|
+
var setToStringTag$1 = setToStringTag$4;
|
|
2273
|
+
var setSpecies = setSpecies$1;
|
|
2274
|
+
var aCallable$4 = aCallable$9;
|
|
2275
|
+
var isCallable$2 = isCallable$m;
|
|
2276
|
+
var isObject$3 = isObject$c;
|
|
2277
|
+
var anInstance = anInstance$1;
|
|
2278
|
+
var speciesConstructor = speciesConstructor$1;
|
|
2279
|
+
var task = task$1.set;
|
|
2280
|
+
var microtask = microtask_1;
|
|
2281
|
+
var hostReportErrors = hostReportErrors$1;
|
|
2282
|
+
var perform$2 = perform$3;
|
|
2283
|
+
var Queue = queue$1;
|
|
2284
|
+
var InternalStateModule = internalState;
|
|
2285
|
+
var NativePromiseConstructor$2 = promiseNativeConstructor;
|
|
2286
|
+
var PromiseConstructorDetection = promiseConstructorDetection;
|
|
2287
|
+
var newPromiseCapabilityModule$3 = newPromiseCapability$2;
|
|
2288
|
+
|
|
2289
|
+
var PROMISE = 'Promise';
|
|
2290
|
+
var FORCED_PROMISE_CONSTRUCTOR$4 = PromiseConstructorDetection.CONSTRUCTOR;
|
|
2291
|
+
var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
|
|
2292
|
+
var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
|
|
2293
|
+
var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
|
|
2294
|
+
var setInternalState = InternalStateModule.set;
|
|
2295
|
+
var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
|
|
2296
|
+
var PromiseConstructor = NativePromiseConstructor$2;
|
|
2297
|
+
var PromisePrototype = NativePromisePrototype$1;
|
|
2298
|
+
var TypeError$1 = global$3.TypeError;
|
|
2299
|
+
var document$1 = global$3.document;
|
|
2300
|
+
var process = global$3.process;
|
|
2301
|
+
var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
|
|
2302
|
+
var newGenericPromiseCapability = newPromiseCapability$1;
|
|
2303
|
+
|
|
2304
|
+
var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$3.dispatchEvent);
|
|
2305
|
+
var UNHANDLED_REJECTION = 'unhandledrejection';
|
|
2306
|
+
var REJECTION_HANDLED = 'rejectionhandled';
|
|
2307
|
+
var PENDING = 0;
|
|
2308
|
+
var FULFILLED = 1;
|
|
2309
|
+
var REJECTED = 2;
|
|
2310
|
+
var HANDLED = 1;
|
|
2311
|
+
var UNHANDLED = 2;
|
|
2312
|
+
|
|
2313
|
+
var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
|
|
2314
|
+
|
|
2315
|
+
// helpers
|
|
2316
|
+
var isThenable = function (it) {
|
|
2317
|
+
var then;
|
|
2318
|
+
return isObject$3(it) && isCallable$2(then = it.then) ? then : false;
|
|
2319
|
+
};
|
|
2320
|
+
|
|
2321
|
+
var callReaction = function (reaction, state) {
|
|
2322
|
+
var value = state.value;
|
|
2323
|
+
var ok = state.state === FULFILLED;
|
|
2324
|
+
var handler = ok ? reaction.ok : reaction.fail;
|
|
2325
|
+
var resolve = reaction.resolve;
|
|
2326
|
+
var reject = reaction.reject;
|
|
2327
|
+
var domain = reaction.domain;
|
|
2328
|
+
var result, then, exited;
|
|
2329
|
+
try {
|
|
2330
|
+
if (handler) {
|
|
2331
|
+
if (!ok) {
|
|
2332
|
+
if (state.rejection === UNHANDLED) onHandleUnhandled(state);
|
|
2333
|
+
state.rejection = HANDLED;
|
|
2334
|
+
}
|
|
2335
|
+
if (handler === true) result = value;
|
|
2336
|
+
else {
|
|
2337
|
+
if (domain) domain.enter();
|
|
2338
|
+
result = handler(value); // can throw
|
|
2339
|
+
if (domain) {
|
|
2340
|
+
domain.exit();
|
|
2341
|
+
exited = true;
|
|
2342
|
+
}
|
|
2343
|
+
}
|
|
2344
|
+
if (result === reaction.promise) {
|
|
2345
|
+
reject(new TypeError$1('Promise-chain cycle'));
|
|
2346
|
+
} else if (then = isThenable(result)) {
|
|
2347
|
+
call$8(then, result, resolve, reject);
|
|
2348
|
+
} else resolve(result);
|
|
2349
|
+
} else reject(value);
|
|
2350
|
+
} catch (error) {
|
|
2351
|
+
if (domain && !exited) domain.exit();
|
|
2352
|
+
reject(error);
|
|
2353
|
+
}
|
|
2354
|
+
};
|
|
2355
|
+
|
|
2356
|
+
var notify = function (state, isReject) {
|
|
2357
|
+
if (state.notified) return;
|
|
2358
|
+
state.notified = true;
|
|
2359
|
+
microtask(function () {
|
|
2360
|
+
var reactions = state.reactions;
|
|
2361
|
+
var reaction;
|
|
2362
|
+
while (reaction = reactions.get()) {
|
|
2363
|
+
callReaction(reaction, state);
|
|
2364
|
+
}
|
|
2365
|
+
state.notified = false;
|
|
2366
|
+
if (isReject && !state.rejection) onUnhandled(state);
|
|
2367
|
+
});
|
|
2368
|
+
};
|
|
2369
|
+
|
|
2370
|
+
var dispatchEvent = function (name, promise, reason) {
|
|
2371
|
+
var event, handler;
|
|
2372
|
+
if (DISPATCH_EVENT) {
|
|
2373
|
+
event = document$1.createEvent('Event');
|
|
2374
|
+
event.promise = promise;
|
|
2375
|
+
event.reason = reason;
|
|
2376
|
+
event.initEvent(name, false, true);
|
|
2377
|
+
global$3.dispatchEvent(event);
|
|
2378
|
+
} else event = { promise: promise, reason: reason };
|
|
2379
|
+
if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$3['on' + name])) handler(event);
|
|
2380
|
+
else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
|
|
2381
|
+
};
|
|
2382
|
+
|
|
2383
|
+
var onUnhandled = function (state) {
|
|
2384
|
+
call$8(task, global$3, function () {
|
|
2385
|
+
var promise = state.facade;
|
|
2386
|
+
var value = state.value;
|
|
2387
|
+
var IS_UNHANDLED = isUnhandled(state);
|
|
2388
|
+
var result;
|
|
2389
|
+
if (IS_UNHANDLED) {
|
|
2390
|
+
result = perform$2(function () {
|
|
2391
|
+
if (IS_NODE) {
|
|
2392
|
+
process.emit('unhandledRejection', value, promise);
|
|
2393
|
+
} else dispatchEvent(UNHANDLED_REJECTION, promise, value);
|
|
2394
|
+
});
|
|
2395
|
+
// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
|
|
2396
|
+
state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
|
|
2397
|
+
if (result.error) throw result.value;
|
|
2398
|
+
}
|
|
2399
|
+
});
|
|
2400
|
+
};
|
|
2401
|
+
|
|
2402
|
+
var isUnhandled = function (state) {
|
|
2403
|
+
return state.rejection !== HANDLED && !state.parent;
|
|
2404
|
+
};
|
|
2405
|
+
|
|
2406
|
+
var onHandleUnhandled = function (state) {
|
|
2407
|
+
call$8(task, global$3, function () {
|
|
2408
|
+
var promise = state.facade;
|
|
2409
|
+
if (IS_NODE) {
|
|
2410
|
+
process.emit('rejectionHandled', promise);
|
|
2411
|
+
} else dispatchEvent(REJECTION_HANDLED, promise, state.value);
|
|
2412
|
+
});
|
|
2413
|
+
};
|
|
2414
|
+
|
|
2415
|
+
var bind$1 = function (fn, state, unwrap) {
|
|
2416
|
+
return function (value) {
|
|
2417
|
+
fn(state, value, unwrap);
|
|
2418
|
+
};
|
|
2419
|
+
};
|
|
2420
|
+
|
|
2421
|
+
var internalReject = function (state, value, unwrap) {
|
|
2422
|
+
if (state.done) return;
|
|
2423
|
+
state.done = true;
|
|
2424
|
+
if (unwrap) state = unwrap;
|
|
2425
|
+
state.value = value;
|
|
2426
|
+
state.state = REJECTED;
|
|
2427
|
+
notify(state, true);
|
|
2428
|
+
};
|
|
2429
|
+
|
|
2430
|
+
var internalResolve = function (state, value, unwrap) {
|
|
2431
|
+
if (state.done) return;
|
|
2432
|
+
state.done = true;
|
|
2433
|
+
if (unwrap) state = unwrap;
|
|
2434
|
+
try {
|
|
2435
|
+
if (state.facade === value) throw new TypeError$1("Promise can't be resolved itself");
|
|
2436
|
+
var then = isThenable(value);
|
|
2437
|
+
if (then) {
|
|
2438
|
+
microtask(function () {
|
|
2439
|
+
var wrapper = { done: false };
|
|
2440
|
+
try {
|
|
2441
|
+
call$8(then, value,
|
|
2442
|
+
bind$1(internalResolve, wrapper, state),
|
|
2443
|
+
bind$1(internalReject, wrapper, state)
|
|
2444
|
+
);
|
|
2445
|
+
} catch (error) {
|
|
2446
|
+
internalReject(wrapper, error, state);
|
|
2447
|
+
}
|
|
2448
|
+
});
|
|
2449
|
+
} else {
|
|
2450
|
+
state.value = value;
|
|
2451
|
+
state.state = FULFILLED;
|
|
2452
|
+
notify(state, false);
|
|
2453
|
+
}
|
|
2454
|
+
} catch (error) {
|
|
2455
|
+
internalReject({ done: false }, error, state);
|
|
2456
|
+
}
|
|
2457
|
+
};
|
|
2458
|
+
|
|
2459
|
+
// constructor polyfill
|
|
2460
|
+
if (FORCED_PROMISE_CONSTRUCTOR$4) {
|
|
2461
|
+
// 25.4.3.1 Promise(executor)
|
|
2462
|
+
PromiseConstructor = function Promise(executor) {
|
|
2463
|
+
anInstance(this, PromisePrototype);
|
|
2464
|
+
aCallable$4(executor);
|
|
2465
|
+
call$8(Internal, this);
|
|
2466
|
+
var state = getInternalPromiseState(this);
|
|
2467
|
+
try {
|
|
2468
|
+
executor(bind$1(internalResolve, state), bind$1(internalReject, state));
|
|
2469
|
+
} catch (error) {
|
|
2470
|
+
internalReject(state, error);
|
|
2471
|
+
}
|
|
2472
|
+
};
|
|
2473
|
+
|
|
2474
|
+
PromisePrototype = PromiseConstructor.prototype;
|
|
2475
|
+
|
|
2476
|
+
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
2477
|
+
Internal = function Promise(executor) {
|
|
2478
|
+
setInternalState(this, {
|
|
2479
|
+
type: PROMISE,
|
|
2480
|
+
done: false,
|
|
2481
|
+
notified: false,
|
|
2482
|
+
parent: false,
|
|
2483
|
+
reactions: new Queue(),
|
|
2484
|
+
rejection: false,
|
|
2485
|
+
state: PENDING,
|
|
2486
|
+
value: undefined
|
|
2487
|
+
});
|
|
2488
|
+
};
|
|
2489
|
+
|
|
2490
|
+
// `Promise.prototype.then` method
|
|
2491
|
+
// https://tc39.es/ecma262/#sec-promise.prototype.then
|
|
2492
|
+
Internal.prototype = defineBuiltIn$2(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
|
|
2493
|
+
var state = getInternalPromiseState(this);
|
|
2494
|
+
var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
|
|
2495
|
+
state.parent = true;
|
|
2496
|
+
reaction.ok = isCallable$2(onFulfilled) ? onFulfilled : true;
|
|
2497
|
+
reaction.fail = isCallable$2(onRejected) && onRejected;
|
|
2498
|
+
reaction.domain = IS_NODE ? process.domain : undefined;
|
|
2499
|
+
if (state.state === PENDING) state.reactions.add(reaction);
|
|
2500
|
+
else microtask(function () {
|
|
2501
|
+
callReaction(reaction, state);
|
|
2502
|
+
});
|
|
2503
|
+
return reaction.promise;
|
|
2504
|
+
});
|
|
2505
|
+
|
|
2506
|
+
OwnPromiseCapability = function () {
|
|
2507
|
+
var promise = new Internal();
|
|
2508
|
+
var state = getInternalPromiseState(promise);
|
|
2509
|
+
this.promise = promise;
|
|
2510
|
+
this.resolve = bind$1(internalResolve, state);
|
|
2511
|
+
this.reject = bind$1(internalReject, state);
|
|
2512
|
+
};
|
|
2513
|
+
|
|
2514
|
+
newPromiseCapabilityModule$3.f = newPromiseCapability$1 = function (C) {
|
|
2515
|
+
return C === PromiseConstructor || C === PromiseWrapper
|
|
2516
|
+
? new OwnPromiseCapability(C)
|
|
2517
|
+
: newGenericPromiseCapability(C);
|
|
2518
|
+
};
|
|
2519
|
+
|
|
2520
|
+
if (isCallable$2(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
|
|
2521
|
+
nativeThen = NativePromisePrototype$1.then;
|
|
2522
|
+
|
|
2523
|
+
if (!NATIVE_PROMISE_SUBCLASSING) {
|
|
2524
|
+
// make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
|
|
2525
|
+
defineBuiltIn$2(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
|
|
2526
|
+
var that = this;
|
|
2527
|
+
return new PromiseConstructor(function (resolve, reject) {
|
|
2528
|
+
call$8(nativeThen, that, resolve, reject);
|
|
2529
|
+
}).then(onFulfilled, onRejected);
|
|
2530
|
+
// https://github.com/zloirock/core-js/issues/640
|
|
2531
|
+
}, { unsafe: true });
|
|
2532
|
+
}
|
|
2533
|
+
|
|
2534
|
+
// make `.constructor === Promise` work for native promise-based APIs
|
|
2535
|
+
try {
|
|
2536
|
+
delete NativePromisePrototype$1.constructor;
|
|
2537
|
+
} catch (error) { /* empty */ }
|
|
2538
|
+
|
|
2539
|
+
// make `instanceof Promise` work for native promise-based APIs
|
|
2540
|
+
if (setPrototypeOf$2) {
|
|
2541
|
+
setPrototypeOf$2(NativePromisePrototype$1, PromisePrototype);
|
|
2542
|
+
}
|
|
2543
|
+
}
|
|
2544
|
+
}
|
|
2545
|
+
|
|
2546
|
+
$$d({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
|
|
2547
|
+
Promise: PromiseConstructor
|
|
2548
|
+
});
|
|
2549
|
+
|
|
2550
|
+
setToStringTag$1(PromiseConstructor, PROMISE, false);
|
|
2551
|
+
setSpecies(PROMISE);
|
|
2552
|
+
|
|
2553
|
+
var wellKnownSymbol$3 = wellKnownSymbol$e;
|
|
2554
|
+
var Iterators$1 = iterators;
|
|
2555
|
+
|
|
2556
|
+
var ITERATOR$3 = wellKnownSymbol$3('iterator');
|
|
2557
|
+
var ArrayPrototype = Array.prototype;
|
|
2558
|
+
|
|
2559
|
+
// check on default Array iterator
|
|
2560
|
+
var isArrayIteratorMethod$1 = function (it) {
|
|
2561
|
+
return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$3] === it);
|
|
2562
|
+
};
|
|
2563
|
+
|
|
2564
|
+
var classof = classof$5;
|
|
2565
|
+
var getMethod$1 = getMethod$3;
|
|
2566
|
+
var isNullOrUndefined = isNullOrUndefined$4;
|
|
2567
|
+
var Iterators = iterators;
|
|
2568
|
+
var wellKnownSymbol$2 = wellKnownSymbol$e;
|
|
2569
|
+
|
|
2570
|
+
var ITERATOR$2 = wellKnownSymbol$2('iterator');
|
|
2571
|
+
|
|
2572
|
+
var getIteratorMethod$2 = function (it) {
|
|
2573
|
+
if (!isNullOrUndefined(it)) return getMethod$1(it, ITERATOR$2)
|
|
2574
|
+
|| getMethod$1(it, '@@iterator')
|
|
2575
|
+
|| Iterators[classof(it)];
|
|
2576
|
+
};
|
|
2577
|
+
|
|
2578
|
+
var call$7 = functionCall;
|
|
2579
|
+
var aCallable$3 = aCallable$9;
|
|
2580
|
+
var anObject$6 = anObject$c;
|
|
2581
|
+
var tryToString$1 = tryToString$4;
|
|
2582
|
+
var getIteratorMethod$1 = getIteratorMethod$2;
|
|
2583
|
+
|
|
2584
|
+
var $TypeError$2 = TypeError;
|
|
2585
|
+
|
|
2586
|
+
var getIterator$1 = function (argument, usingIterator) {
|
|
2587
|
+
var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
|
|
2588
|
+
if (aCallable$3(iteratorMethod)) return anObject$6(call$7(iteratorMethod, argument));
|
|
2589
|
+
throw new $TypeError$2(tryToString$1(argument) + ' is not iterable');
|
|
2590
|
+
};
|
|
2591
|
+
|
|
2592
|
+
var call$6 = functionCall;
|
|
2593
|
+
var anObject$5 = anObject$c;
|
|
2594
|
+
var getMethod = getMethod$3;
|
|
2595
|
+
|
|
2596
|
+
var iteratorClose$3 = function (iterator, kind, value) {
|
|
2597
|
+
var innerResult, innerError;
|
|
2598
|
+
anObject$5(iterator);
|
|
2599
|
+
try {
|
|
2600
|
+
innerResult = getMethod(iterator, 'return');
|
|
2601
|
+
if (!innerResult) {
|
|
2602
|
+
if (kind === 'throw') throw value;
|
|
2603
|
+
return value;
|
|
2604
|
+
}
|
|
2605
|
+
innerResult = call$6(innerResult, iterator);
|
|
2606
|
+
} catch (error) {
|
|
2607
|
+
innerError = true;
|
|
2608
|
+
innerResult = error;
|
|
2609
|
+
}
|
|
2610
|
+
if (kind === 'throw') throw value;
|
|
2611
|
+
if (innerError) throw innerResult;
|
|
2612
|
+
anObject$5(innerResult);
|
|
2613
|
+
return value;
|
|
2614
|
+
};
|
|
2615
|
+
|
|
2616
|
+
var bind = functionBindContext;
|
|
2617
|
+
var call$5 = functionCall;
|
|
2618
|
+
var anObject$4 = anObject$c;
|
|
2619
|
+
var tryToString = tryToString$4;
|
|
2620
|
+
var isArrayIteratorMethod = isArrayIteratorMethod$1;
|
|
2621
|
+
var lengthOfArrayLike = lengthOfArrayLike$2;
|
|
2622
|
+
var isPrototypeOf$2 = objectIsPrototypeOf;
|
|
2623
|
+
var getIterator = getIterator$1;
|
|
2624
|
+
var getIteratorMethod = getIteratorMethod$2;
|
|
2625
|
+
var iteratorClose$2 = iteratorClose$3;
|
|
2626
|
+
|
|
2627
|
+
var $TypeError$1 = TypeError;
|
|
2628
|
+
|
|
2629
|
+
var Result = function (stopped, result) {
|
|
2630
|
+
this.stopped = stopped;
|
|
2631
|
+
this.result = result;
|
|
2632
|
+
};
|
|
2633
|
+
|
|
2634
|
+
var ResultPrototype = Result.prototype;
|
|
2635
|
+
|
|
2636
|
+
var iterate$4 = function (iterable, unboundFunction, options) {
|
|
2637
|
+
var that = options && options.that;
|
|
2638
|
+
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
|
2639
|
+
var IS_RECORD = !!(options && options.IS_RECORD);
|
|
2640
|
+
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
2641
|
+
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
2642
|
+
var fn = bind(unboundFunction, that);
|
|
2643
|
+
var iterator, iterFn, index, length, result, next, step;
|
|
2644
|
+
|
|
2645
|
+
var stop = function (condition) {
|
|
2646
|
+
if (iterator) iteratorClose$2(iterator, 'normal', condition);
|
|
2647
|
+
return new Result(true, condition);
|
|
2648
|
+
};
|
|
2649
|
+
|
|
2650
|
+
var callFn = function (value) {
|
|
2651
|
+
if (AS_ENTRIES) {
|
|
2652
|
+
anObject$4(value);
|
|
2653
|
+
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
|
|
2654
|
+
} return INTERRUPTED ? fn(value, stop) : fn(value);
|
|
2655
|
+
};
|
|
2656
|
+
|
|
2657
|
+
if (IS_RECORD) {
|
|
2658
|
+
iterator = iterable.iterator;
|
|
2659
|
+
} else if (IS_ITERATOR) {
|
|
2660
|
+
iterator = iterable;
|
|
2661
|
+
} else {
|
|
2662
|
+
iterFn = getIteratorMethod(iterable);
|
|
2663
|
+
if (!iterFn) throw new $TypeError$1(tryToString(iterable) + ' is not iterable');
|
|
2664
|
+
// optimisation for array iterators
|
|
2665
|
+
if (isArrayIteratorMethod(iterFn)) {
|
|
2666
|
+
for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
|
|
2667
|
+
result = callFn(iterable[index]);
|
|
2668
|
+
if (result && isPrototypeOf$2(ResultPrototype, result)) return result;
|
|
2669
|
+
} return new Result(false);
|
|
2670
|
+
}
|
|
2671
|
+
iterator = getIterator(iterable, iterFn);
|
|
2672
|
+
}
|
|
2673
|
+
|
|
2674
|
+
next = IS_RECORD ? iterable.next : iterator.next;
|
|
2675
|
+
while (!(step = call$5(next, iterator)).done) {
|
|
2676
|
+
try {
|
|
2677
|
+
result = callFn(step.value);
|
|
2678
|
+
} catch (error) {
|
|
2679
|
+
iteratorClose$2(iterator, 'throw', error);
|
|
2680
|
+
}
|
|
2681
|
+
if (typeof result == 'object' && result && isPrototypeOf$2(ResultPrototype, result)) return result;
|
|
2682
|
+
} return new Result(false);
|
|
2683
|
+
};
|
|
2684
|
+
|
|
2685
|
+
var wellKnownSymbol$1 = wellKnownSymbol$e;
|
|
2686
|
+
|
|
2687
|
+
var ITERATOR$1 = wellKnownSymbol$1('iterator');
|
|
2688
|
+
var SAFE_CLOSING = false;
|
|
2689
|
+
|
|
2690
|
+
try {
|
|
2691
|
+
var called = 0;
|
|
2692
|
+
var iteratorWithReturn = {
|
|
2693
|
+
next: function () {
|
|
2694
|
+
return { done: !!called++ };
|
|
2695
|
+
},
|
|
2696
|
+
'return': function () {
|
|
2697
|
+
SAFE_CLOSING = true;
|
|
2698
|
+
}
|
|
2699
|
+
};
|
|
2700
|
+
iteratorWithReturn[ITERATOR$1] = function () {
|
|
2701
|
+
return this;
|
|
2702
|
+
};
|
|
2703
|
+
// eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
|
|
2704
|
+
Array.from(iteratorWithReturn, function () { throw 2; });
|
|
2705
|
+
} catch (error) { /* empty */ }
|
|
2706
|
+
|
|
2707
|
+
var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
|
|
2708
|
+
try {
|
|
2709
|
+
if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
|
|
2710
|
+
} catch (error) { return false; } // workaround of old WebKit + `eval` bug
|
|
2711
|
+
var ITERATION_SUPPORT = false;
|
|
2712
|
+
try {
|
|
2713
|
+
var object = {};
|
|
2714
|
+
object[ITERATOR$1] = function () {
|
|
2715
|
+
return {
|
|
2716
|
+
next: function () {
|
|
2717
|
+
return { done: ITERATION_SUPPORT = true };
|
|
2718
|
+
}
|
|
2719
|
+
};
|
|
2720
|
+
};
|
|
2721
|
+
exec(object);
|
|
2722
|
+
} catch (error) { /* empty */ }
|
|
2723
|
+
return ITERATION_SUPPORT;
|
|
2724
|
+
};
|
|
2725
|
+
|
|
2726
|
+
var NativePromiseConstructor$1 = promiseNativeConstructor;
|
|
2727
|
+
var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
|
|
2728
|
+
var FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;
|
|
2729
|
+
|
|
2730
|
+
var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCorrectnessOfIteration(function (iterable) {
|
|
2731
|
+
NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
|
|
2732
|
+
});
|
|
2733
|
+
|
|
2734
|
+
var $$c = _export;
|
|
2735
|
+
var call$4 = functionCall;
|
|
2736
|
+
var aCallable$2 = aCallable$9;
|
|
2737
|
+
var newPromiseCapabilityModule$2 = newPromiseCapability$2;
|
|
2738
|
+
var perform$1 = perform$3;
|
|
2739
|
+
var iterate$3 = iterate$4;
|
|
2740
|
+
var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
|
|
2741
|
+
|
|
2742
|
+
// `Promise.all` method
|
|
2743
|
+
// https://tc39.es/ecma262/#sec-promise.all
|
|
2744
|
+
$$c({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
|
|
2745
|
+
all: function all(iterable) {
|
|
2746
|
+
var C = this;
|
|
2747
|
+
var capability = newPromiseCapabilityModule$2.f(C);
|
|
2748
|
+
var resolve = capability.resolve;
|
|
2749
|
+
var reject = capability.reject;
|
|
2750
|
+
var result = perform$1(function () {
|
|
2751
|
+
var $promiseResolve = aCallable$2(C.resolve);
|
|
2752
|
+
var values = [];
|
|
2753
|
+
var counter = 0;
|
|
2754
|
+
var remaining = 1;
|
|
2755
|
+
iterate$3(iterable, function (promise) {
|
|
2756
|
+
var index = counter++;
|
|
2757
|
+
var alreadyCalled = false;
|
|
2758
|
+
remaining++;
|
|
2759
|
+
call$4($promiseResolve, C, promise).then(function (value) {
|
|
2760
|
+
if (alreadyCalled) return;
|
|
2761
|
+
alreadyCalled = true;
|
|
2762
|
+
values[index] = value;
|
|
2763
|
+
--remaining || resolve(values);
|
|
2764
|
+
}, reject);
|
|
2765
|
+
});
|
|
2766
|
+
--remaining || resolve(values);
|
|
2767
|
+
});
|
|
2768
|
+
if (result.error) reject(result.value);
|
|
2769
|
+
return capability.promise;
|
|
2770
|
+
}
|
|
2771
|
+
});
|
|
2772
|
+
|
|
2773
|
+
var $$b = _export;
|
|
2774
|
+
var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
|
|
2775
|
+
var NativePromiseConstructor = promiseNativeConstructor;
|
|
2776
|
+
var getBuiltIn$3 = getBuiltIn$a;
|
|
2777
|
+
var isCallable$1 = isCallable$m;
|
|
2778
|
+
var defineBuiltIn$1 = defineBuiltIn$6;
|
|
2779
|
+
|
|
2780
|
+
var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
|
|
2781
|
+
|
|
2782
|
+
// `Promise.prototype.catch` method
|
|
2783
|
+
// https://tc39.es/ecma262/#sec-promise.prototype.catch
|
|
2784
|
+
$$b({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
|
|
2785
|
+
'catch': function (onRejected) {
|
|
2786
|
+
return this.then(undefined, onRejected);
|
|
2787
|
+
}
|
|
2788
|
+
});
|
|
2789
|
+
|
|
2790
|
+
// makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
|
|
2791
|
+
if (isCallable$1(NativePromiseConstructor)) {
|
|
2792
|
+
var method = getBuiltIn$3('Promise').prototype['catch'];
|
|
2793
|
+
if (NativePromisePrototype['catch'] !== method) {
|
|
2794
|
+
defineBuiltIn$1(NativePromisePrototype, 'catch', method, { unsafe: true });
|
|
2795
|
+
}
|
|
2796
|
+
}
|
|
2797
|
+
|
|
2798
|
+
var $$a = _export;
|
|
2799
|
+
var call$3 = functionCall;
|
|
2800
|
+
var aCallable$1 = aCallable$9;
|
|
2801
|
+
var newPromiseCapabilityModule$1 = newPromiseCapability$2;
|
|
2802
|
+
var perform = perform$3;
|
|
2803
|
+
var iterate$2 = iterate$4;
|
|
2804
|
+
var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
|
|
2805
|
+
|
|
2806
|
+
// `Promise.race` method
|
|
2807
|
+
// https://tc39.es/ecma262/#sec-promise.race
|
|
2808
|
+
$$a({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
|
|
2809
|
+
race: function race(iterable) {
|
|
2810
|
+
var C = this;
|
|
2811
|
+
var capability = newPromiseCapabilityModule$1.f(C);
|
|
2812
|
+
var reject = capability.reject;
|
|
2813
|
+
var result = perform(function () {
|
|
2814
|
+
var $promiseResolve = aCallable$1(C.resolve);
|
|
2815
|
+
iterate$2(iterable, function (promise) {
|
|
2816
|
+
call$3($promiseResolve, C, promise).then(capability.resolve, reject);
|
|
2817
|
+
});
|
|
2818
|
+
});
|
|
2819
|
+
if (result.error) reject(result.value);
|
|
2820
|
+
return capability.promise;
|
|
2821
|
+
}
|
|
2822
|
+
});
|
|
2823
|
+
|
|
2824
|
+
var $$9 = _export;
|
|
2825
|
+
var newPromiseCapabilityModule = newPromiseCapability$2;
|
|
2826
|
+
var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
|
|
2827
|
+
|
|
2828
|
+
// `Promise.reject` method
|
|
2829
|
+
// https://tc39.es/ecma262/#sec-promise.reject
|
|
2830
|
+
$$9({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
|
|
2831
|
+
reject: function reject(r) {
|
|
2832
|
+
var capability = newPromiseCapabilityModule.f(this);
|
|
2833
|
+
var capabilityReject = capability.reject;
|
|
2834
|
+
capabilityReject(r);
|
|
2835
|
+
return capability.promise;
|
|
2836
|
+
}
|
|
2837
|
+
});
|
|
2838
|
+
|
|
2839
|
+
var anObject$3 = anObject$c;
|
|
2840
|
+
var isObject$2 = isObject$c;
|
|
2841
|
+
var newPromiseCapability = newPromiseCapability$2;
|
|
2842
|
+
|
|
2843
|
+
var promiseResolve$1 = function (C, x) {
|
|
2844
|
+
anObject$3(C);
|
|
2845
|
+
if (isObject$2(x) && x.constructor === C) return x;
|
|
2846
|
+
var promiseCapability = newPromiseCapability.f(C);
|
|
2847
|
+
var resolve = promiseCapability.resolve;
|
|
2848
|
+
resolve(x);
|
|
2849
|
+
return promiseCapability.promise;
|
|
2850
|
+
};
|
|
2851
|
+
|
|
2852
|
+
var $$8 = _export;
|
|
2853
|
+
var getBuiltIn$2 = getBuiltIn$a;
|
|
2854
|
+
var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
|
|
2855
|
+
var promiseResolve = promiseResolve$1;
|
|
2856
|
+
|
|
2857
|
+
getBuiltIn$2('Promise');
|
|
2858
|
+
|
|
2859
|
+
// `Promise.resolve` method
|
|
2860
|
+
// https://tc39.es/ecma262/#sec-promise.resolve
|
|
2861
|
+
$$8({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
|
|
2862
|
+
resolve: function resolve(x) {
|
|
2863
|
+
return promiseResolve(this, x);
|
|
2864
|
+
}
|
|
2865
|
+
});
|
|
2866
|
+
|
|
2867
|
+
var uncurryThis$2 = functionUncurryThis;
|
|
2868
|
+
|
|
2869
|
+
// eslint-disable-next-line es/no-set -- safe
|
|
2870
|
+
var SetPrototype$1 = Set.prototype;
|
|
2871
|
+
|
|
2872
|
+
var setHelpers = {
|
|
2873
|
+
// eslint-disable-next-line es/no-set -- safe
|
|
2874
|
+
Set: Set,
|
|
2875
|
+
add: uncurryThis$2(SetPrototype$1.add),
|
|
2876
|
+
has: uncurryThis$2(SetPrototype$1.has),
|
|
2877
|
+
remove: uncurryThis$2(SetPrototype$1['delete']),
|
|
2878
|
+
proto: SetPrototype$1
|
|
2879
|
+
};
|
|
2880
|
+
|
|
2881
|
+
var has$5 = setHelpers.has;
|
|
2882
|
+
|
|
2883
|
+
// Perform ? RequireInternalSlot(M, [[SetData]])
|
|
2884
|
+
var aSet$7 = function (it) {
|
|
2885
|
+
has$5(it);
|
|
2886
|
+
return it;
|
|
2887
|
+
};
|
|
2888
|
+
|
|
2889
|
+
var call$2 = functionCall;
|
|
2890
|
+
|
|
2891
|
+
var iterateSimple$7 = function (record, fn, ITERATOR_INSTEAD_OF_RECORD) {
|
|
2892
|
+
var iterator = ITERATOR_INSTEAD_OF_RECORD ? record : record.iterator;
|
|
2893
|
+
var next = record.next;
|
|
2894
|
+
var step, result;
|
|
2895
|
+
while (!(step = call$2(next, iterator)).done) {
|
|
2896
|
+
result = fn(step.value);
|
|
2897
|
+
if (result !== undefined) return result;
|
|
2898
|
+
}
|
|
2899
|
+
};
|
|
2900
|
+
|
|
2901
|
+
var uncurryThis$1 = functionUncurryThis;
|
|
2902
|
+
var iterateSimple$6 = iterateSimple$7;
|
|
2903
|
+
var SetHelpers$5 = setHelpers;
|
|
2904
|
+
|
|
2905
|
+
var Set$3 = SetHelpers$5.Set;
|
|
2906
|
+
var SetPrototype = SetHelpers$5.proto;
|
|
2907
|
+
var forEach = uncurryThis$1(SetPrototype.forEach);
|
|
2908
|
+
var keys = uncurryThis$1(SetPrototype.keys);
|
|
2909
|
+
var next = keys(new Set$3()).next;
|
|
2910
|
+
|
|
2911
|
+
var setIterate = function (set, fn, interruptible) {
|
|
2912
|
+
return interruptible ? iterateSimple$6({ iterator: keys(set), next: next }, fn) : forEach(set, fn);
|
|
2913
|
+
};
|
|
2914
|
+
|
|
2915
|
+
var SetHelpers$4 = setHelpers;
|
|
2916
|
+
var iterate$1 = setIterate;
|
|
2917
|
+
|
|
2918
|
+
var Set$2 = SetHelpers$4.Set;
|
|
2919
|
+
var add$3 = SetHelpers$4.add;
|
|
2920
|
+
|
|
2921
|
+
var setClone = function (set) {
|
|
2922
|
+
var result = new Set$2();
|
|
2923
|
+
iterate$1(set, function (it) {
|
|
2924
|
+
add$3(result, it);
|
|
2925
|
+
});
|
|
2926
|
+
return result;
|
|
2927
|
+
};
|
|
2928
|
+
|
|
2929
|
+
var uncurryThisAccessor = functionUncurryThisAccessor;
|
|
2930
|
+
var SetHelpers$3 = setHelpers;
|
|
2931
|
+
|
|
2932
|
+
var setSize = uncurryThisAccessor(SetHelpers$3.proto, 'size', 'get') || function (set) {
|
|
2933
|
+
return set.size;
|
|
2934
|
+
};
|
|
2935
|
+
|
|
2936
|
+
// `GetIteratorDirect(obj)` abstract operation
|
|
2937
|
+
// https://tc39.es/proposal-iterator-helpers/#sec-getiteratordirect
|
|
2938
|
+
var getIteratorDirect$1 = function (obj) {
|
|
2939
|
+
return {
|
|
2940
|
+
iterator: obj,
|
|
2941
|
+
next: obj.next,
|
|
2942
|
+
done: false
|
|
2943
|
+
};
|
|
2944
|
+
};
|
|
2945
|
+
|
|
2946
|
+
var aCallable = aCallable$9;
|
|
2947
|
+
var anObject$2 = anObject$c;
|
|
2948
|
+
var call$1 = functionCall;
|
|
2949
|
+
var toIntegerOrInfinity = toIntegerOrInfinity$3;
|
|
2950
|
+
var getIteratorDirect = getIteratorDirect$1;
|
|
2951
|
+
|
|
2952
|
+
var INVALID_SIZE = 'Invalid size';
|
|
2953
|
+
var $RangeError = RangeError;
|
|
2954
|
+
var $TypeError = TypeError;
|
|
2955
|
+
var max = Math.max;
|
|
2956
|
+
|
|
2957
|
+
var SetRecord = function (set, intSize) {
|
|
2958
|
+
this.set = set;
|
|
2959
|
+
this.size = max(intSize, 0);
|
|
2960
|
+
this.has = aCallable(set.has);
|
|
2961
|
+
this.keys = aCallable(set.keys);
|
|
2962
|
+
};
|
|
2963
|
+
|
|
2964
|
+
SetRecord.prototype = {
|
|
2965
|
+
getIterator: function () {
|
|
2966
|
+
return getIteratorDirect(anObject$2(call$1(this.keys, this.set)));
|
|
2967
|
+
},
|
|
2968
|
+
includes: function (it) {
|
|
2969
|
+
return call$1(this.has, this.set, it);
|
|
2970
|
+
}
|
|
2971
|
+
};
|
|
2972
|
+
|
|
2973
|
+
// `GetSetRecord` abstract operation
|
|
2974
|
+
// https://tc39.es/proposal-set-methods/#sec-getsetrecord
|
|
2975
|
+
var getSetRecord$7 = function (obj) {
|
|
2976
|
+
anObject$2(obj);
|
|
2977
|
+
var numSize = +obj.size;
|
|
2978
|
+
// NOTE: If size is undefined, then numSize will be NaN
|
|
2979
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
2980
|
+
if (numSize !== numSize) throw new $TypeError(INVALID_SIZE);
|
|
2981
|
+
var intSize = toIntegerOrInfinity(numSize);
|
|
2982
|
+
if (intSize < 0) throw new $RangeError(INVALID_SIZE);
|
|
2983
|
+
return new SetRecord(obj, intSize);
|
|
2984
|
+
};
|
|
2985
|
+
|
|
2986
|
+
var aSet$6 = aSet$7;
|
|
2987
|
+
var SetHelpers$2 = setHelpers;
|
|
2988
|
+
var clone$2 = setClone;
|
|
2989
|
+
var size$4 = setSize;
|
|
2990
|
+
var getSetRecord$6 = getSetRecord$7;
|
|
2991
|
+
var iterateSet$2 = setIterate;
|
|
2992
|
+
var iterateSimple$5 = iterateSimple$7;
|
|
2993
|
+
|
|
2994
|
+
var has$4 = SetHelpers$2.has;
|
|
2995
|
+
var remove$1 = SetHelpers$2.remove;
|
|
2996
|
+
|
|
2997
|
+
// `Set.prototype.difference` method
|
|
2998
|
+
// https://github.com/tc39/proposal-set-methods
|
|
2999
|
+
var setDifference = function difference(other) {
|
|
3000
|
+
var O = aSet$6(this);
|
|
3001
|
+
var otherRec = getSetRecord$6(other);
|
|
3002
|
+
var result = clone$2(O);
|
|
3003
|
+
if (size$4(O) <= otherRec.size) iterateSet$2(O, function (e) {
|
|
3004
|
+
if (otherRec.includes(e)) remove$1(result, e);
|
|
3005
|
+
});
|
|
3006
|
+
else iterateSimple$5(otherRec.getIterator(), function (e) {
|
|
3007
|
+
if (has$4(O, e)) remove$1(result, e);
|
|
3008
|
+
});
|
|
3009
|
+
return result;
|
|
3010
|
+
};
|
|
3011
|
+
|
|
3012
|
+
var getBuiltIn$1 = getBuiltIn$a;
|
|
3013
|
+
|
|
3014
|
+
var createSetLike = function (size) {
|
|
3015
|
+
return {
|
|
3016
|
+
size: size,
|
|
3017
|
+
has: function () {
|
|
3018
|
+
return false;
|
|
3019
|
+
},
|
|
3020
|
+
keys: function () {
|
|
3021
|
+
return {
|
|
3022
|
+
next: function () {
|
|
3023
|
+
return { done: true };
|
|
3024
|
+
}
|
|
3025
|
+
};
|
|
3026
|
+
}
|
|
3027
|
+
};
|
|
3028
|
+
};
|
|
3029
|
+
|
|
3030
|
+
var setMethodAcceptSetLike$7 = function (name) {
|
|
3031
|
+
var Set = getBuiltIn$1('Set');
|
|
3032
|
+
try {
|
|
3033
|
+
new Set()[name](createSetLike(0));
|
|
3034
|
+
try {
|
|
3035
|
+
// late spec change, early WebKit ~ Safari 17.0 beta implementation does not pass it
|
|
3036
|
+
// https://github.com/tc39/proposal-set-methods/pull/88
|
|
3037
|
+
new Set()[name](createSetLike(-1));
|
|
3038
|
+
return false;
|
|
3039
|
+
} catch (error2) {
|
|
3040
|
+
return true;
|
|
3041
|
+
}
|
|
3042
|
+
} catch (error) {
|
|
3043
|
+
return false;
|
|
3044
|
+
}
|
|
3045
|
+
};
|
|
3046
|
+
|
|
3047
|
+
var $$7 = _export;
|
|
3048
|
+
var difference = setDifference;
|
|
3049
|
+
var setMethodAcceptSetLike$6 = setMethodAcceptSetLike$7;
|
|
3050
|
+
|
|
3051
|
+
// `Set.prototype.difference` method
|
|
3052
|
+
// https://github.com/tc39/proposal-set-methods
|
|
3053
|
+
$$7({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$6('difference') }, {
|
|
3054
|
+
difference: difference
|
|
3055
|
+
});
|
|
3056
|
+
|
|
3057
|
+
var aSet$5 = aSet$7;
|
|
3058
|
+
var SetHelpers$1 = setHelpers;
|
|
3059
|
+
var size$3 = setSize;
|
|
3060
|
+
var getSetRecord$5 = getSetRecord$7;
|
|
3061
|
+
var iterateSet$1 = setIterate;
|
|
3062
|
+
var iterateSimple$4 = iterateSimple$7;
|
|
3063
|
+
|
|
3064
|
+
var Set$1 = SetHelpers$1.Set;
|
|
3065
|
+
var add$2 = SetHelpers$1.add;
|
|
3066
|
+
var has$3 = SetHelpers$1.has;
|
|
3067
|
+
|
|
3068
|
+
// `Set.prototype.intersection` method
|
|
3069
|
+
// https://github.com/tc39/proposal-set-methods
|
|
3070
|
+
var setIntersection = function intersection(other) {
|
|
3071
|
+
var O = aSet$5(this);
|
|
3072
|
+
var otherRec = getSetRecord$5(other);
|
|
3073
|
+
var result = new Set$1();
|
|
3074
|
+
|
|
3075
|
+
if (size$3(O) > otherRec.size) {
|
|
3076
|
+
iterateSimple$4(otherRec.getIterator(), function (e) {
|
|
3077
|
+
if (has$3(O, e)) add$2(result, e);
|
|
3078
|
+
});
|
|
3079
|
+
} else {
|
|
3080
|
+
iterateSet$1(O, function (e) {
|
|
3081
|
+
if (otherRec.includes(e)) add$2(result, e);
|
|
3082
|
+
});
|
|
3083
|
+
}
|
|
3084
|
+
|
|
3085
|
+
return result;
|
|
3086
|
+
};
|
|
3087
|
+
|
|
3088
|
+
var $$6 = _export;
|
|
3089
|
+
var fails$2 = fails$h;
|
|
3090
|
+
var intersection = setIntersection;
|
|
3091
|
+
var setMethodAcceptSetLike$5 = setMethodAcceptSetLike$7;
|
|
3092
|
+
|
|
3093
|
+
var INCORRECT = !setMethodAcceptSetLike$5('intersection') || fails$2(function () {
|
|
3094
|
+
// eslint-disable-next-line es/no-array-from, es/no-set -- testing
|
|
3095
|
+
return String(Array.from(new Set([1, 2, 3]).intersection(new Set([3, 2])))) !== '3,2';
|
|
3096
|
+
});
|
|
3097
|
+
|
|
3098
|
+
// `Set.prototype.intersection` method
|
|
3099
|
+
// https://github.com/tc39/proposal-set-methods
|
|
3100
|
+
$$6({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
|
|
3101
|
+
intersection: intersection
|
|
3102
|
+
});
|
|
3103
|
+
|
|
3104
|
+
var aSet$4 = aSet$7;
|
|
3105
|
+
var has$2 = setHelpers.has;
|
|
3106
|
+
var size$2 = setSize;
|
|
3107
|
+
var getSetRecord$4 = getSetRecord$7;
|
|
3108
|
+
var iterateSet = setIterate;
|
|
3109
|
+
var iterateSimple$3 = iterateSimple$7;
|
|
3110
|
+
var iteratorClose$1 = iteratorClose$3;
|
|
3111
|
+
|
|
3112
|
+
// `Set.prototype.isDisjointFrom` method
|
|
3113
|
+
// https://tc39.github.io/proposal-set-methods/#Set.prototype.isDisjointFrom
|
|
3114
|
+
var setIsDisjointFrom = function isDisjointFrom(other) {
|
|
3115
|
+
var O = aSet$4(this);
|
|
3116
|
+
var otherRec = getSetRecord$4(other);
|
|
3117
|
+
if (size$2(O) <= otherRec.size) return iterateSet(O, function (e) {
|
|
3118
|
+
if (otherRec.includes(e)) return false;
|
|
3119
|
+
}, true) !== false;
|
|
3120
|
+
var iterator = otherRec.getIterator();
|
|
3121
|
+
return iterateSimple$3(iterator, function (e) {
|
|
3122
|
+
if (has$2(O, e)) return iteratorClose$1(iterator, 'normal', false);
|
|
3123
|
+
}) !== false;
|
|
3124
|
+
};
|
|
3125
|
+
|
|
3126
|
+
var $$5 = _export;
|
|
3127
|
+
var isDisjointFrom = setIsDisjointFrom;
|
|
3128
|
+
var setMethodAcceptSetLike$4 = setMethodAcceptSetLike$7;
|
|
3129
|
+
|
|
3130
|
+
// `Set.prototype.isDisjointFrom` method
|
|
3131
|
+
// https://github.com/tc39/proposal-set-methods
|
|
3132
|
+
$$5({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$4('isDisjointFrom') }, {
|
|
3133
|
+
isDisjointFrom: isDisjointFrom
|
|
3134
|
+
});
|
|
3135
|
+
|
|
3136
|
+
var aSet$3 = aSet$7;
|
|
3137
|
+
var size$1 = setSize;
|
|
3138
|
+
var iterate = setIterate;
|
|
3139
|
+
var getSetRecord$3 = getSetRecord$7;
|
|
3140
|
+
|
|
3141
|
+
// `Set.prototype.isSubsetOf` method
|
|
3142
|
+
// https://tc39.github.io/proposal-set-methods/#Set.prototype.isSubsetOf
|
|
3143
|
+
var setIsSubsetOf = function isSubsetOf(other) {
|
|
3144
|
+
var O = aSet$3(this);
|
|
3145
|
+
var otherRec = getSetRecord$3(other);
|
|
3146
|
+
if (size$1(O) > otherRec.size) return false;
|
|
3147
|
+
return iterate(O, function (e) {
|
|
3148
|
+
if (!otherRec.includes(e)) return false;
|
|
3149
|
+
}, true) !== false;
|
|
3150
|
+
};
|
|
3151
|
+
|
|
3152
|
+
var $$4 = _export;
|
|
3153
|
+
var isSubsetOf = setIsSubsetOf;
|
|
3154
|
+
var setMethodAcceptSetLike$3 = setMethodAcceptSetLike$7;
|
|
3155
|
+
|
|
3156
|
+
// `Set.prototype.isSubsetOf` method
|
|
3157
|
+
// https://github.com/tc39/proposal-set-methods
|
|
3158
|
+
$$4({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$3('isSubsetOf') }, {
|
|
3159
|
+
isSubsetOf: isSubsetOf
|
|
3160
|
+
});
|
|
3161
|
+
|
|
3162
|
+
var aSet$2 = aSet$7;
|
|
3163
|
+
var has$1 = setHelpers.has;
|
|
3164
|
+
var size = setSize;
|
|
3165
|
+
var getSetRecord$2 = getSetRecord$7;
|
|
3166
|
+
var iterateSimple$2 = iterateSimple$7;
|
|
3167
|
+
var iteratorClose = iteratorClose$3;
|
|
3168
|
+
|
|
3169
|
+
// `Set.prototype.isSupersetOf` method
|
|
3170
|
+
// https://tc39.github.io/proposal-set-methods/#Set.prototype.isSupersetOf
|
|
3171
|
+
var setIsSupersetOf = function isSupersetOf(other) {
|
|
3172
|
+
var O = aSet$2(this);
|
|
3173
|
+
var otherRec = getSetRecord$2(other);
|
|
3174
|
+
if (size(O) < otherRec.size) return false;
|
|
3175
|
+
var iterator = otherRec.getIterator();
|
|
3176
|
+
return iterateSimple$2(iterator, function (e) {
|
|
3177
|
+
if (!has$1(O, e)) return iteratorClose(iterator, 'normal', false);
|
|
3178
|
+
}) !== false;
|
|
3179
|
+
};
|
|
3180
|
+
|
|
3181
|
+
var $$3 = _export;
|
|
3182
|
+
var isSupersetOf = setIsSupersetOf;
|
|
3183
|
+
var setMethodAcceptSetLike$2 = setMethodAcceptSetLike$7;
|
|
3184
|
+
|
|
3185
|
+
// `Set.prototype.isSupersetOf` method
|
|
3186
|
+
// https://github.com/tc39/proposal-set-methods
|
|
3187
|
+
$$3({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$2('isSupersetOf') }, {
|
|
3188
|
+
isSupersetOf: isSupersetOf
|
|
3189
|
+
});
|
|
3190
|
+
|
|
3191
|
+
var aSet$1 = aSet$7;
|
|
3192
|
+
var SetHelpers = setHelpers;
|
|
3193
|
+
var clone$1 = setClone;
|
|
3194
|
+
var getSetRecord$1 = getSetRecord$7;
|
|
3195
|
+
var iterateSimple$1 = iterateSimple$7;
|
|
3196
|
+
|
|
3197
|
+
var add$1 = SetHelpers.add;
|
|
3198
|
+
var has = SetHelpers.has;
|
|
3199
|
+
var remove = SetHelpers.remove;
|
|
3200
|
+
|
|
3201
|
+
// `Set.prototype.symmetricDifference` method
|
|
3202
|
+
// https://github.com/tc39/proposal-set-methods
|
|
3203
|
+
var setSymmetricDifference = function symmetricDifference(other) {
|
|
3204
|
+
var O = aSet$1(this);
|
|
3205
|
+
var keysIter = getSetRecord$1(other).getIterator();
|
|
3206
|
+
var result = clone$1(O);
|
|
3207
|
+
iterateSimple$1(keysIter, function (e) {
|
|
3208
|
+
if (has(O, e)) remove(result, e);
|
|
3209
|
+
else add$1(result, e);
|
|
3210
|
+
});
|
|
3211
|
+
return result;
|
|
3212
|
+
};
|
|
3213
|
+
|
|
3214
|
+
var $$2 = _export;
|
|
3215
|
+
var symmetricDifference = setSymmetricDifference;
|
|
3216
|
+
var setMethodAcceptSetLike$1 = setMethodAcceptSetLike$7;
|
|
3217
|
+
|
|
3218
|
+
// `Set.prototype.symmetricDifference` method
|
|
3219
|
+
// https://github.com/tc39/proposal-set-methods
|
|
3220
|
+
$$2({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$1('symmetricDifference') }, {
|
|
3221
|
+
symmetricDifference: symmetricDifference
|
|
3222
|
+
});
|
|
3223
|
+
|
|
3224
|
+
var aSet = aSet$7;
|
|
3225
|
+
var add = setHelpers.add;
|
|
3226
|
+
var clone = setClone;
|
|
3227
|
+
var getSetRecord = getSetRecord$7;
|
|
3228
|
+
var iterateSimple = iterateSimple$7;
|
|
3229
|
+
|
|
3230
|
+
// `Set.prototype.union` method
|
|
3231
|
+
// https://github.com/tc39/proposal-set-methods
|
|
3232
|
+
var setUnion = function union(other) {
|
|
3233
|
+
var O = aSet(this);
|
|
3234
|
+
var keysIter = getSetRecord(other).getIterator();
|
|
3235
|
+
var result = clone(O);
|
|
3236
|
+
iterateSimple(keysIter, function (it) {
|
|
3237
|
+
add(result, it);
|
|
3238
|
+
});
|
|
3239
|
+
return result;
|
|
3240
|
+
};
|
|
3241
|
+
|
|
3242
|
+
var $$1 = _export;
|
|
3243
|
+
var union = setUnion;
|
|
3244
|
+
var setMethodAcceptSetLike = setMethodAcceptSetLike$7;
|
|
3245
|
+
|
|
3246
|
+
// `Set.prototype.union` method
|
|
3247
|
+
// https://github.com/tc39/proposal-set-methods
|
|
3248
|
+
$$1({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('union') }, {
|
|
3249
|
+
union: union
|
|
3250
|
+
});
|
|
3251
|
+
|
|
3252
|
+
// iterable DOM collections
|
|
3253
|
+
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
|
3254
|
+
var domIterables = {
|
|
3255
|
+
CSSRuleList: 0,
|
|
3256
|
+
CSSStyleDeclaration: 0,
|
|
3257
|
+
CSSValueList: 0,
|
|
3258
|
+
ClientRectList: 0,
|
|
3259
|
+
DOMRectList: 0,
|
|
3260
|
+
DOMStringList: 0,
|
|
3261
|
+
DOMTokenList: 1,
|
|
3262
|
+
DataTransferItemList: 0,
|
|
3263
|
+
FileList: 0,
|
|
3264
|
+
HTMLAllCollection: 0,
|
|
3265
|
+
HTMLCollection: 0,
|
|
3266
|
+
HTMLFormElement: 0,
|
|
3267
|
+
HTMLSelectElement: 0,
|
|
3268
|
+
MediaList: 0,
|
|
3269
|
+
MimeTypeArray: 0,
|
|
3270
|
+
NamedNodeMap: 0,
|
|
3271
|
+
NodeList: 1,
|
|
3272
|
+
PaintRequestList: 0,
|
|
3273
|
+
Plugin: 0,
|
|
3274
|
+
PluginArray: 0,
|
|
3275
|
+
SVGLengthList: 0,
|
|
3276
|
+
SVGNumberList: 0,
|
|
3277
|
+
SVGPathSegList: 0,
|
|
3278
|
+
SVGPointList: 0,
|
|
3279
|
+
SVGStringList: 0,
|
|
3280
|
+
SVGTransformList: 0,
|
|
3281
|
+
SourceBufferList: 0,
|
|
3282
|
+
StyleSheetList: 0,
|
|
3283
|
+
TextTrackCueList: 0,
|
|
3284
|
+
TextTrackList: 0,
|
|
3285
|
+
TouchList: 0
|
|
3286
|
+
};
|
|
3287
|
+
|
|
3288
|
+
// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
|
|
3289
|
+
var documentCreateElement = documentCreateElement$2;
|
|
3290
|
+
|
|
3291
|
+
var classList = documentCreateElement('span').classList;
|
|
3292
|
+
var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
|
|
3293
|
+
|
|
3294
|
+
var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
|
|
3295
|
+
|
|
3296
|
+
var global$2 = global$j;
|
|
3297
|
+
var DOMIterables = domIterables;
|
|
3298
|
+
var DOMTokenListPrototype = domTokenListPrototype;
|
|
3299
|
+
var ArrayIteratorMethods = es_array_iterator;
|
|
3300
|
+
var createNonEnumerableProperty$3 = createNonEnumerableProperty$7;
|
|
3301
|
+
var setToStringTag = setToStringTag$4;
|
|
3302
|
+
var wellKnownSymbol = wellKnownSymbol$e;
|
|
3303
|
+
|
|
3304
|
+
var ITERATOR = wellKnownSymbol('iterator');
|
|
3305
|
+
var ArrayValues = ArrayIteratorMethods.values;
|
|
3306
|
+
|
|
3307
|
+
var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
|
|
3308
|
+
if (CollectionPrototype) {
|
|
3309
|
+
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
3310
|
+
if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
|
|
3311
|
+
createNonEnumerableProperty$3(CollectionPrototype, ITERATOR, ArrayValues);
|
|
3312
|
+
} catch (error) {
|
|
3313
|
+
CollectionPrototype[ITERATOR] = ArrayValues;
|
|
3314
|
+
}
|
|
3315
|
+
setToStringTag(CollectionPrototype, COLLECTION_NAME, true);
|
|
3316
|
+
if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
|
|
3317
|
+
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
3318
|
+
if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
|
|
3319
|
+
createNonEnumerableProperty$3(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
|
|
3320
|
+
} catch (error) {
|
|
3321
|
+
CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
|
|
3322
|
+
}
|
|
3323
|
+
}
|
|
3324
|
+
}
|
|
3325
|
+
};
|
|
3326
|
+
|
|
3327
|
+
for (var COLLECTION_NAME in DOMIterables) {
|
|
3328
|
+
handlePrototype(global$2[COLLECTION_NAME] && global$2[COLLECTION_NAME].prototype, COLLECTION_NAME);
|
|
3329
|
+
}
|
|
3330
|
+
|
|
3331
|
+
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
3332
|
+
|
|
3333
|
+
/**
|
|
3334
|
+
* A code used in some cases to denote success.
|
|
3335
|
+
*/
|
|
3336
|
+
const ZOOM_SUCCESS_CODE = 'SUCCESS';
|
|
3337
|
+
/**
|
|
3338
|
+
* Zoom Server Error
|
|
3339
|
+
*/
|
|
3340
|
+
class ZoomServerError extends makeError.BaseError {
|
|
3341
|
+
get code() {
|
|
3342
|
+
return this.error.code;
|
|
3343
|
+
}
|
|
3344
|
+
constructor(error) {
|
|
3345
|
+
super(error.message);
|
|
3346
|
+
this.error = void 0;
|
|
3347
|
+
this.error = error;
|
|
3348
|
+
}
|
|
3349
|
+
}
|
|
3350
|
+
/**
|
|
3351
|
+
* Zoom Server Error that includes the FetchResponseError
|
|
3352
|
+
*/
|
|
3353
|
+
class ZoomServerFetchResponseError extends ZoomServerError {
|
|
3354
|
+
constructor(data, responseError) {
|
|
3355
|
+
super(data);
|
|
3356
|
+
this.data = void 0;
|
|
3357
|
+
this.responseError = void 0;
|
|
3358
|
+
this.data = data;
|
|
3359
|
+
this.responseError = responseError;
|
|
3360
|
+
}
|
|
3361
|
+
}
|
|
3362
|
+
/**
|
|
3363
|
+
* Creates a logZoomServerErrorFunction that logs the error to console.
|
|
3364
|
+
*
|
|
3365
|
+
* @param zoomApiNamePrefix Prefix to use when logging. I.E. ZoomError, etc.
|
|
3366
|
+
* @returns
|
|
3367
|
+
*/
|
|
3368
|
+
function logZoomServerErrorFunction(zoomApiNamePrefix) {
|
|
3369
|
+
return error => {
|
|
3370
|
+
if (error instanceof ZoomServerFetchResponseError) {
|
|
3371
|
+
console.log(`${zoomApiNamePrefix}Error(${error.responseError.response.status}): `, {
|
|
3372
|
+
error,
|
|
3373
|
+
errorData: error.data
|
|
3374
|
+
});
|
|
3375
|
+
} else if (error instanceof ZoomServerError) {
|
|
3376
|
+
console.log(`${zoomApiNamePrefix}Error(code:${error.code}): `, {
|
|
3377
|
+
error
|
|
3378
|
+
});
|
|
3379
|
+
} else {
|
|
3380
|
+
console.log(`${zoomApiNamePrefix}Error(name:${error.name}): `, {
|
|
3381
|
+
error
|
|
3382
|
+
});
|
|
3383
|
+
}
|
|
3384
|
+
};
|
|
3385
|
+
}
|
|
3386
|
+
/**
|
|
3387
|
+
* Wraps a ConfiguredFetch to support handling errors returned by fetch.
|
|
3388
|
+
*
|
|
3389
|
+
* @param fetch
|
|
3390
|
+
* @returns
|
|
3391
|
+
*/
|
|
3392
|
+
function handleZoomErrorFetchFactory(parseZoomError, defaultLogError) {
|
|
3393
|
+
return (fetch$1, logError = defaultLogError) => {
|
|
3394
|
+
return async (x, y) => {
|
|
3395
|
+
try {
|
|
3396
|
+
return await fetch$1(x, y); // await to catch thrown errors
|
|
3397
|
+
} catch (e) {
|
|
3398
|
+
if (e instanceof fetch.FetchResponseError) {
|
|
3399
|
+
const error = await parseZoomError(e);
|
|
3400
|
+
if (error) {
|
|
3401
|
+
logError(error); // log before throwing.
|
|
3402
|
+
throw error;
|
|
3403
|
+
}
|
|
3404
|
+
}
|
|
3405
|
+
throw e;
|
|
3406
|
+
}
|
|
3407
|
+
};
|
|
3408
|
+
};
|
|
3409
|
+
}
|
|
3410
|
+
// MARK: Parsed Errors
|
|
3411
|
+
/**
|
|
3412
|
+
* The status code that Zoom uses to indicates that too many requests have been made in a short period of time.
|
|
3413
|
+
*/
|
|
3414
|
+
const ZOOM_TOO_MANY_REQUESTS_HTTP_STATUS_CODE = 429;
|
|
3415
|
+
const ZOOM_RATE_LIMIT_CATEGORY_HEADER = 'X-RateLimit-Category';
|
|
3416
|
+
const ZOOM_RATE_LIMIT_TYPE_HEADER = 'X-RateLimit-Type';
|
|
3417
|
+
const ZOOM_RATE_LIMIT_LIMIT_HEADER = 'X-RateLimit-Limit';
|
|
3418
|
+
const ZOOM_RATE_LIMIT_REMAINING_HEADER = 'X-RateLimit-Remaining';
|
|
3419
|
+
const ZOOM_RATE_LIMIT_RETRY_AFTER_HEADER = 'Retry-After';
|
|
3420
|
+
const DEFAULT_ZOOM_API_RATE_LIMIT = 100;
|
|
3421
|
+
const DEFAULT_ZOOM_API_RATE_LIMIT_RESET_PERIOD = util.MS_IN_MINUTE;
|
|
3422
|
+
function zoomRateLimitHeaderDetails(headers) {
|
|
3423
|
+
const limitHeader = headers.get(ZOOM_RATE_LIMIT_LIMIT_HEADER);
|
|
3424
|
+
const remainingHeader = headers.get(ZOOM_RATE_LIMIT_REMAINING_HEADER);
|
|
3425
|
+
const retryAfterHeader = headers.get(ZOOM_RATE_LIMIT_RETRY_AFTER_HEADER);
|
|
3426
|
+
const categoryHeader = headers.get(ZOOM_RATE_LIMIT_CATEGORY_HEADER);
|
|
3427
|
+
const typeHeader = headers.get(ZOOM_RATE_LIMIT_TYPE_HEADER);
|
|
3428
|
+
let result = null;
|
|
3429
|
+
if (limitHeader != null && remainingHeader != null && retryAfterHeader != null) {
|
|
3430
|
+
const limit = Number(limitHeader);
|
|
3431
|
+
const remaining = Number(remainingHeader);
|
|
3432
|
+
const retryAfter = Number(retryAfterHeader);
|
|
3433
|
+
const retryAfterAt = new Date(retryAfter);
|
|
3434
|
+
const category = categoryHeader;
|
|
3435
|
+
const type = typeHeader;
|
|
3436
|
+
result = {
|
|
3437
|
+
limit,
|
|
3438
|
+
remaining,
|
|
3439
|
+
retryAfter,
|
|
3440
|
+
retryAfterAt,
|
|
3441
|
+
category,
|
|
3442
|
+
type
|
|
3443
|
+
};
|
|
3444
|
+
}
|
|
3445
|
+
return result;
|
|
3446
|
+
}
|
|
3447
|
+
class ZoomTooManyRequestsError extends ZoomServerFetchResponseError {
|
|
3448
|
+
get headerDetails() {
|
|
3449
|
+
return zoomRateLimitHeaderDetails(this.responseError.response.headers);
|
|
3450
|
+
}
|
|
3451
|
+
}
|
|
3452
|
+
/**
|
|
3453
|
+
* Function that parses/transforms a ZoomServerErrorData into a general ZoomServerError or other known error type.
|
|
3454
|
+
*
|
|
3455
|
+
* @param errorResponseData
|
|
3456
|
+
* @param responseError
|
|
3457
|
+
* @returns
|
|
3458
|
+
*/
|
|
3459
|
+
function parseZoomServerErrorData(zoomServerError, responseError) {
|
|
3460
|
+
let result;
|
|
3461
|
+
if (responseError.response.status === ZOOM_TOO_MANY_REQUESTS_HTTP_STATUS_CODE) {
|
|
3462
|
+
result = new ZoomTooManyRequestsError(zoomServerError, responseError);
|
|
3463
|
+
} else if (zoomServerError) {
|
|
3464
|
+
switch (zoomServerError.code) {
|
|
3465
|
+
default:
|
|
3466
|
+
result = new ZoomServerFetchResponseError(zoomServerError, responseError);
|
|
3467
|
+
break;
|
|
3468
|
+
}
|
|
3469
|
+
}
|
|
3470
|
+
return result;
|
|
3471
|
+
}
|
|
3472
|
+
/**
|
|
3473
|
+
* Returns a pre-configured MakeUrlSearchParamsOptions that omits the silenceError key.
|
|
3474
|
+
*
|
|
3475
|
+
* If other options are input, it merges those two options together and adds silenceError to the omitted keys.
|
|
3476
|
+
*/
|
|
3477
|
+
function omitSilenceZoomErrorKeys(options) {
|
|
3478
|
+
const omitKeys = ['silenceError'];
|
|
3479
|
+
return fetch.mergeMakeUrlSearchParamsOptions([options, {
|
|
3480
|
+
omitKeys
|
|
3481
|
+
}]);
|
|
3482
|
+
}
|
|
3483
|
+
function silenceZoomErrorWithCodesFunction(codes, returnFn) {
|
|
3484
|
+
const codesSet = new Set(util.asArray(codes));
|
|
3485
|
+
return silence => {
|
|
3486
|
+
return reason => {
|
|
3487
|
+
if (silence !== false && reason instanceof ZoomServerFetchResponseError) {
|
|
3488
|
+
if (codesSet.has(reason.code)) {
|
|
3489
|
+
return returnFn == null ? void 0 : returnFn(reason);
|
|
3490
|
+
}
|
|
3491
|
+
}
|
|
3492
|
+
throw reason;
|
|
3493
|
+
};
|
|
3494
|
+
};
|
|
3495
|
+
}
|
|
3496
|
+
|
|
3497
|
+
/**
|
|
3498
|
+
* https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#operation/meeting
|
|
3499
|
+
*/
|
|
3500
|
+
function getMeeting(context) {
|
|
3501
|
+
return input => context.fetchJson(`/meetings/${input.meetingId}`, 'GET');
|
|
3502
|
+
}
|
|
3503
|
+
/**
|
|
3504
|
+
* https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#operation/meetings
|
|
3505
|
+
*/
|
|
3506
|
+
function listMeetingsForUser(context) {
|
|
3507
|
+
return input => context.fetchJson(`/users/${input.user}/meetings`, 'GET').then(mapToZoomPageResult('meetings'));
|
|
3508
|
+
}
|
|
3509
|
+
function listMeetingsForUserPageFactory(context) {
|
|
3510
|
+
return zoomFetchPageFactory(listMeetingsForUser(context));
|
|
3511
|
+
}
|
|
3512
|
+
/**
|
|
3513
|
+
* https://developers.zoom.us/docs/api/meetings/#tag/meetings/POST/users/{userId}/meetings
|
|
3514
|
+
*/
|
|
3515
|
+
function createMeetingForUser(context) {
|
|
3516
|
+
return input => {
|
|
3517
|
+
return context.fetchJson(`/users/${input.user}/meetings`, {
|
|
3518
|
+
method: 'POST',
|
|
3519
|
+
body: JSON.stringify(input.template)
|
|
3520
|
+
});
|
|
3521
|
+
};
|
|
3522
|
+
}
|
|
3523
|
+
const DELETE_MEETING_DOES_NOT_EXIST_ERROR_CODE = 3001;
|
|
3524
|
+
/**
|
|
3525
|
+
* https://developers.zoom.us/docs/api/meetings/#tag/meetings/DELETE/meetings/{meetingId}
|
|
3526
|
+
*/
|
|
3527
|
+
function deleteMeeting(context) {
|
|
3528
|
+
const silenceDoesNotExistError = silenceZoomErrorWithCodesFunction(DELETE_MEETING_DOES_NOT_EXIST_ERROR_CODE);
|
|
3529
|
+
return input => context.fetchJson(`/meetings/${input.meetingId}?${fetch.makeUrlSearchParams(input, omitSilenceZoomErrorKeys())}`, 'DELETE').catch(silenceDoesNotExistError(input.silenceError));
|
|
3530
|
+
}
|
|
3531
|
+
|
|
3532
|
+
exports.ZoomMeetingType = void 0;
|
|
3533
|
+
(function (ZoomMeetingType) {
|
|
3534
|
+
ZoomMeetingType[ZoomMeetingType["INSTANT"] = 1] = "INSTANT";
|
|
3535
|
+
ZoomMeetingType[ZoomMeetingType["SCHEDULED"] = 2] = "SCHEDULED";
|
|
3536
|
+
ZoomMeetingType[ZoomMeetingType["RECURRING_NO_FIXED_TIME"] = 3] = "RECURRING_NO_FIXED_TIME";
|
|
3537
|
+
ZoomMeetingType[ZoomMeetingType["RECURRING_FIXED_TIME"] = 8] = "RECURRING_FIXED_TIME";
|
|
3538
|
+
})(exports.ZoomMeetingType || (exports.ZoomMeetingType = {}));
|
|
3539
|
+
exports.ZoomRecurrenceType = void 0;
|
|
3540
|
+
(function (ZoomRecurrenceType) {
|
|
3541
|
+
ZoomRecurrenceType[ZoomRecurrenceType["DAILY"] = 1] = "DAILY";
|
|
3542
|
+
ZoomRecurrenceType[ZoomRecurrenceType["WEEKLY"] = 2] = "WEEKLY";
|
|
3543
|
+
ZoomRecurrenceType[ZoomRecurrenceType["MONTHLY"] = 3] = "MONTHLY";
|
|
3544
|
+
})(exports.ZoomRecurrenceType || (exports.ZoomRecurrenceType = {}));
|
|
3545
|
+
exports.ZoomMonthlyWeek = void 0;
|
|
3546
|
+
(function (ZoomMonthlyWeek) {
|
|
3547
|
+
ZoomMonthlyWeek[ZoomMonthlyWeek["LAST_WEEK"] = -1] = "LAST_WEEK";
|
|
3548
|
+
ZoomMonthlyWeek[ZoomMonthlyWeek["FIRST_WEEK"] = 1] = "FIRST_WEEK";
|
|
3549
|
+
ZoomMonthlyWeek[ZoomMonthlyWeek["SECOND_WEEK"] = 2] = "SECOND_WEEK";
|
|
3550
|
+
ZoomMonthlyWeek[ZoomMonthlyWeek["THIRD_WEEK"] = 3] = "THIRD_WEEK";
|
|
3551
|
+
ZoomMonthlyWeek[ZoomMonthlyWeek["FOURTH_WEEK"] = 4] = "FOURTH_WEEK";
|
|
3552
|
+
})(exports.ZoomMonthlyWeek || (exports.ZoomMonthlyWeek = {}));
|
|
3553
|
+
exports.ZoomMonthlyWeekDay = void 0;
|
|
3554
|
+
(function (ZoomMonthlyWeekDay) {
|
|
3555
|
+
ZoomMonthlyWeekDay[ZoomMonthlyWeekDay["SUNDAY"] = 1] = "SUNDAY";
|
|
3556
|
+
ZoomMonthlyWeekDay[ZoomMonthlyWeekDay["MONDAY"] = 2] = "MONDAY";
|
|
3557
|
+
ZoomMonthlyWeekDay[ZoomMonthlyWeekDay["TUESDAY"] = 3] = "TUESDAY";
|
|
3558
|
+
ZoomMonthlyWeekDay[ZoomMonthlyWeekDay["WEDNESDAY"] = 4] = "WEDNESDAY";
|
|
3559
|
+
ZoomMonthlyWeekDay[ZoomMonthlyWeekDay["THURSDAY"] = 5] = "THURSDAY";
|
|
3560
|
+
ZoomMonthlyWeekDay[ZoomMonthlyWeekDay["FRIDAY"] = 6] = "FRIDAY";
|
|
3561
|
+
ZoomMonthlyWeekDay[ZoomMonthlyWeekDay["SATURDAY"] = 7] = "SATURDAY";
|
|
3562
|
+
})(exports.ZoomMonthlyWeekDay || (exports.ZoomMonthlyWeekDay = {}));
|
|
3563
|
+
exports.ZoomApprovalType = void 0;
|
|
3564
|
+
(function (ZoomApprovalType) {
|
|
3565
|
+
/**
|
|
3566
|
+
* Automatically approve.
|
|
3567
|
+
*/
|
|
3568
|
+
ZoomApprovalType[ZoomApprovalType["AUTOMATICALLY_APPROVE"] = 0] = "AUTOMATICALLY_APPROVE";
|
|
3569
|
+
/**
|
|
3570
|
+
* Manually approve.
|
|
3571
|
+
*/
|
|
3572
|
+
ZoomApprovalType[ZoomApprovalType["MANUALLY_APPROVE"] = 1] = "MANUALLY_APPROVE";
|
|
3573
|
+
/**
|
|
3574
|
+
* No registration required.
|
|
3575
|
+
*/
|
|
3576
|
+
ZoomApprovalType[ZoomApprovalType["NO_REGISTRATION_REQUIRED"] = 2] = "NO_REGISTRATION_REQUIRED";
|
|
3577
|
+
})(exports.ZoomApprovalType || (exports.ZoomApprovalType = {}));
|
|
3578
|
+
exports.ZoomRegistrationType = void 0;
|
|
3579
|
+
(function (ZoomRegistrationType) {
|
|
3580
|
+
/**
|
|
3581
|
+
* Attendees register once and can attend any meeting occurrence.
|
|
3582
|
+
*/
|
|
3583
|
+
ZoomRegistrationType[ZoomRegistrationType["REGISTER_ONCE_ATTEND_ANY"] = 1] = "REGISTER_ONCE_ATTEND_ANY";
|
|
3584
|
+
/**
|
|
3585
|
+
* Attendees must register for each meeting occurrence.
|
|
3586
|
+
*/
|
|
3587
|
+
ZoomRegistrationType[ZoomRegistrationType["REGISTER_FOR_EACH_OCCURRENCE"] = 2] = "REGISTER_FOR_EACH_OCCURRENCE";
|
|
3588
|
+
/**
|
|
3589
|
+
* Attendees register once and can select one or more meeting occurrences to attend.
|
|
3590
|
+
*/
|
|
3591
|
+
ZoomRegistrationType[ZoomRegistrationType["REGISTER_ONCE_CHOOSE_OCCURRENCES"] = 3] = "REGISTER_ONCE_CHOOSE_OCCURRENCES";
|
|
3592
|
+
})(exports.ZoomRegistrationType || (exports.ZoomRegistrationType = {}));
|
|
3593
|
+
|
|
3594
|
+
/**
|
|
3595
|
+
* https://developers.zoom.us/docs/api/users/#tag/users/GET/users/{userId}
|
|
3596
|
+
*
|
|
3597
|
+
* @param context
|
|
3598
|
+
* @returns
|
|
3599
|
+
*/
|
|
3600
|
+
function getUser(context) {
|
|
3601
|
+
return input => context.fetchJson(`/users/${input.userId}`, 'GET');
|
|
3602
|
+
}
|
|
3603
|
+
/**
|
|
3604
|
+
* https://developers.zoom.us/docs/api/users/#tag/users/GET/users
|
|
3605
|
+
*
|
|
3606
|
+
* @param context
|
|
3607
|
+
* @returns
|
|
3608
|
+
*/
|
|
3609
|
+
function listUsers(context) {
|
|
3610
|
+
return input => context.fetchJson(`/users?${fetch.makeUrlSearchParams(input)}`, 'GET').then(mapToZoomPageResult('users'));
|
|
3611
|
+
}
|
|
3612
|
+
function listUsersPageFactory(context) {
|
|
3613
|
+
return zoomFetchPageFactory(listUsers(context));
|
|
3614
|
+
}
|
|
3615
|
+
|
|
3616
|
+
exports.ZoomUserType = void 0;
|
|
3617
|
+
(function (ZoomUserType) {
|
|
3618
|
+
ZoomUserType[ZoomUserType["Basic"] = 1] = "Basic";
|
|
3619
|
+
ZoomUserType[ZoomUserType["Licensed"] = 2] = "Licensed";
|
|
3620
|
+
ZoomUserType[ZoomUserType["Unassigned"] = 4] = "Unassigned";
|
|
3621
|
+
ZoomUserType[ZoomUserType["None"] = 99] = "None";
|
|
3622
|
+
})(exports.ZoomUserType || (exports.ZoomUserType = {}));
|
|
3623
|
+
|
|
3624
|
+
// MARK: Parser
|
|
3625
|
+
const logZoomErrorToConsole = logZoomServerErrorFunction('Zoom');
|
|
3626
|
+
async function parseZoomApiError(responseError) {
|
|
3627
|
+
const data = await responseError.response.json().catch(x => undefined);
|
|
3628
|
+
let result;
|
|
3629
|
+
if (data) {
|
|
3630
|
+
result = parseZoomApiServerErrorResponseData(data, responseError);
|
|
3631
|
+
}
|
|
3632
|
+
return result;
|
|
3633
|
+
}
|
|
3634
|
+
function parseZoomApiServerErrorResponseData(zoomServerError, responseError) {
|
|
3635
|
+
let result;
|
|
3636
|
+
if (zoomServerError) {
|
|
3637
|
+
switch (zoomServerError.code) {
|
|
3638
|
+
default:
|
|
3639
|
+
result = parseZoomServerErrorData(zoomServerError, responseError);
|
|
3640
|
+
break;
|
|
3641
|
+
}
|
|
3642
|
+
}
|
|
3643
|
+
return result;
|
|
3644
|
+
}
|
|
3645
|
+
const handleZoomErrorFetch = handleZoomErrorFetchFactory(parseZoomApiError, logZoomErrorToConsole);
|
|
3646
|
+
|
|
3647
|
+
/**
|
|
3648
|
+
* Error in the following cases:
|
|
3649
|
+
* - the refresh token string is invalid
|
|
3650
|
+
*/
|
|
3651
|
+
const ZOOM_ACCOUNTS_INVALID_GRANT_ERROR_CODE = 'invalid_grant';
|
|
3652
|
+
/**
|
|
3653
|
+
* Thrown if the call to the Zoom API creating an access token using a refresh token fails.
|
|
3654
|
+
*/
|
|
3655
|
+
class ZoomOAuthAccessTokenError extends fetch.FetchRequestFactoryError {
|
|
3656
|
+
constructor(errorCode) {
|
|
3657
|
+
super(`ZoomOAuthAccessTokenError: ${errorCode}`);
|
|
3658
|
+
this.errorCode = void 0;
|
|
3659
|
+
this.errorCode = errorCode;
|
|
3660
|
+
}
|
|
3661
|
+
}
|
|
3662
|
+
/**
|
|
3663
|
+
* Thrown if a valid ZoomAccessToken cannot be retrieved successfully.
|
|
3664
|
+
*/
|
|
3665
|
+
class ZoomOAuthAuthFailureError extends fetch.FetchRequestFactoryError {
|
|
3666
|
+
constructor(reason) {
|
|
3667
|
+
super(`Failed to retrieve proper authentication for the API call. Reason: ${reason}`);
|
|
3668
|
+
this.reason = void 0;
|
|
3669
|
+
this.reason = reason;
|
|
3670
|
+
}
|
|
3671
|
+
}
|
|
3672
|
+
const logZoomOAuthErrorToConsole = logZoomServerErrorFunction('ZoomOAuth');
|
|
3673
|
+
async function parseZoomOAuthError(responseError) {
|
|
3674
|
+
const data = await responseError.response.json().catch(x => undefined);
|
|
3675
|
+
let result;
|
|
3676
|
+
if (data) {
|
|
3677
|
+
result = parseZoomOAuthServerErrorResponseData(data, responseError);
|
|
3678
|
+
}
|
|
3679
|
+
return result;
|
|
3680
|
+
}
|
|
3681
|
+
function parseZoomOAuthServerErrorResponseData(zoomServerError, responseError) {
|
|
3682
|
+
let result;
|
|
3683
|
+
if (zoomServerError) {
|
|
3684
|
+
const potentialErrorStringCode = zoomServerError.error;
|
|
3685
|
+
const errorCode = potentialErrorStringCode != null ? potentialErrorStringCode : zoomServerError.code;
|
|
3686
|
+
switch (errorCode) {
|
|
3687
|
+
case ZOOM_ACCOUNTS_INVALID_GRANT_ERROR_CODE:
|
|
3688
|
+
result = new ZoomOAuthAccessTokenError(errorCode);
|
|
3689
|
+
break;
|
|
3690
|
+
default:
|
|
3691
|
+
result = parseZoomServerErrorData(zoomServerError, responseError);
|
|
3692
|
+
break;
|
|
3693
|
+
}
|
|
3694
|
+
}
|
|
3695
|
+
return result;
|
|
3696
|
+
}
|
|
3697
|
+
const handleZoomOAuthErrorFetch = handleZoomErrorFetchFactory(parseZoomOAuthError, logZoomOAuthErrorToConsole);
|
|
3698
|
+
|
|
3699
|
+
/**
|
|
3700
|
+
* Generates a new ZoomAccessTokenStringFactory.
|
|
3701
|
+
*/
|
|
3702
|
+
function zoomAccessTokenStringFactory(zoomAccessTokenFactory) {
|
|
3703
|
+
return async () => {
|
|
3704
|
+
const token = await zoomAccessTokenFactory();
|
|
3705
|
+
if (!(token != null && token.accessToken)) {
|
|
3706
|
+
throw new ZoomOAuthAuthFailureError();
|
|
3707
|
+
}
|
|
3708
|
+
return token.accessToken;
|
|
3709
|
+
};
|
|
3710
|
+
}
|
|
3711
|
+
|
|
3712
|
+
const DEFAULT_ZOOM_RATE_LIMITED_TOO_MANY_REQUETS_LOG_FUNCTION = headers => {
|
|
3713
|
+
console.warn(`zoomRateLimitedFetchHandler(): Too many requests made. The limit is ${headers.limit} requests per reset period. RetryAt is set for ${headers.retryAfterAt}.`);
|
|
3714
|
+
};
|
|
3715
|
+
function zoomRateLimitedFetchHandler(config) {
|
|
3716
|
+
var _config$onTooManyRequ, _config$maxRateLimit, _config$resetPeriod;
|
|
3717
|
+
const onTooManyRequests = (config == null ? void 0 : config.onTooManyRequests) !== false ? (_config$onTooManyRequ = config == null ? void 0 : config.onTooManyRequests) != null ? _config$onTooManyRequ : DEFAULT_ZOOM_RATE_LIMITED_TOO_MANY_REQUETS_LOG_FUNCTION : undefined;
|
|
3718
|
+
const defaultLimit = (_config$maxRateLimit = config == null ? void 0 : config.maxRateLimit) != null ? _config$maxRateLimit : DEFAULT_ZOOM_API_RATE_LIMIT;
|
|
3719
|
+
const defaultResetPeriod = (_config$resetPeriod = config == null ? void 0 : config.resetPeriod) != null ? _config$resetPeriod : DEFAULT_ZOOM_API_RATE_LIMIT_RESET_PERIOD;
|
|
3720
|
+
function configForLimit(limit, resetAt) {
|
|
3721
|
+
return {
|
|
3722
|
+
limit: defaultLimit,
|
|
3723
|
+
startLimitAt: Math.ceil(limit / 10),
|
|
3724
|
+
// can do 10% of the requests of the limit before rate limiting begins
|
|
3725
|
+
cooldownRate: 1.2 * (limit / (defaultResetPeriod / util.MS_IN_SECOND)),
|
|
3726
|
+
exponentRate: 1.08,
|
|
3727
|
+
maxWaitTime: util.MS_IN_SECOND * 10,
|
|
3728
|
+
resetPeriod: defaultResetPeriod,
|
|
3729
|
+
resetAt
|
|
3730
|
+
};
|
|
3731
|
+
}
|
|
3732
|
+
const defaultConfig = configForLimit(defaultLimit);
|
|
3733
|
+
const rateLimiter = util.resetPeriodPromiseRateLimiter(defaultConfig);
|
|
3734
|
+
return fetch.rateLimitedFetchHandler({
|
|
3735
|
+
rateLimiter,
|
|
3736
|
+
updateWithResponse: function (response, fetchResponseError) {
|
|
3737
|
+
const hasLimitHeader = response.headers.has(ZOOM_RATE_LIMIT_REMAINING_HEADER);
|
|
3738
|
+
let shouldRetry = false;
|
|
3739
|
+
let enabled = false;
|
|
3740
|
+
if (hasLimitHeader) {
|
|
3741
|
+
const headerDetails = zoomRateLimitHeaderDetails(response.headers);
|
|
3742
|
+
if (headerDetails) {
|
|
3743
|
+
const {
|
|
3744
|
+
limit,
|
|
3745
|
+
retryAfterAt,
|
|
3746
|
+
remaining
|
|
3747
|
+
} = headerDetails;
|
|
3748
|
+
if (limit !== defaultLimit) {
|
|
3749
|
+
const newConfig = configForLimit(limit, retryAfterAt);
|
|
3750
|
+
rateLimiter.setConfig(newConfig, false);
|
|
3751
|
+
}
|
|
3752
|
+
rateLimiter.setRemainingLimit(remaining);
|
|
3753
|
+
rateLimiter.setNextResetAt(retryAfterAt);
|
|
3754
|
+
enabled = true;
|
|
3755
|
+
// only retry if it's a TOO MANY REQUESTS error
|
|
3756
|
+
if (response.status === ZOOM_TOO_MANY_REQUESTS_HTTP_STATUS_CODE) {
|
|
3757
|
+
shouldRetry = true;
|
|
3758
|
+
try {
|
|
3759
|
+
onTooManyRequests == null || onTooManyRequests(headerDetails, response, fetchResponseError);
|
|
3760
|
+
} catch (e) {}
|
|
3761
|
+
}
|
|
3762
|
+
}
|
|
3763
|
+
}
|
|
3764
|
+
rateLimiter.setEnabled(enabled);
|
|
3765
|
+
return shouldRetry;
|
|
3766
|
+
}
|
|
3767
|
+
});
|
|
3768
|
+
}
|
|
3769
|
+
|
|
3770
|
+
/**
|
|
3771
|
+
* The Zoom API URL for the US datacenter.
|
|
3772
|
+
*/
|
|
3773
|
+
const ZOOM_API_URL = 'https://api.zoom.us/v2';
|
|
3774
|
+
|
|
3775
|
+
function zoomFactory(factoryConfig) {
|
|
3776
|
+
const {
|
|
3777
|
+
oauthContext
|
|
3778
|
+
} = factoryConfig;
|
|
3779
|
+
const serverAccessTokenStringFactory = zoomAccessTokenStringFactory(oauthContext.loadAccessToken);
|
|
3780
|
+
const fetchHandler = zoomRateLimitedFetchHandler(factoryConfig.rateLimiterConfig);
|
|
3781
|
+
const {
|
|
3782
|
+
logZoomServerErrorFunction,
|
|
3783
|
+
fetchFactory = input => fetch.fetchApiFetchService.makeFetch({
|
|
3784
|
+
baseUrl: ZOOM_API_URL,
|
|
3785
|
+
baseRequest: async () => ({
|
|
3786
|
+
headers: {
|
|
3787
|
+
'Content-Type': 'application/json',
|
|
3788
|
+
Authorization: `Bearer ${await input.zoomAccessTokenStringFactory()}`
|
|
3789
|
+
}
|
|
3790
|
+
}),
|
|
3791
|
+
fetchHandler,
|
|
3792
|
+
timeout: 20 * 1000,
|
|
3793
|
+
// 20 second timeout
|
|
3794
|
+
requireOkResponse: true,
|
|
3795
|
+
// enforce ok response
|
|
3796
|
+
useTimeout: true // use timeout
|
|
3797
|
+
})
|
|
3798
|
+
} = factoryConfig;
|
|
3799
|
+
return config => {
|
|
3800
|
+
const baseFetch = fetchFactory({
|
|
3801
|
+
zoomAccessTokenStringFactory: serverAccessTokenStringFactory
|
|
3802
|
+
});
|
|
3803
|
+
const serverFetch = handleZoomErrorFetch(baseFetch, logZoomServerErrorFunction);
|
|
3804
|
+
const serverFetchJson = fetch.fetchJsonFunction(serverFetch, {
|
|
3805
|
+
handleFetchJsonParseErrorFunction: fetch.returnNullHandleFetchJsonParseErrorFunction
|
|
3806
|
+
});
|
|
3807
|
+
// MARK: Make User Context
|
|
3808
|
+
const makeUserContext = input => {
|
|
3809
|
+
const userAccessTokenFactory = oauthContext.makeUserAccessTokenFactory({
|
|
3810
|
+
refreshToken: input.refreshToken,
|
|
3811
|
+
userAccessTokenCache: input.accessTokenCache
|
|
3812
|
+
});
|
|
3813
|
+
const userAccessTokenStringFactory = zoomAccessTokenStringFactory(userAccessTokenFactory);
|
|
3814
|
+
const userFetch = fetchFactory({
|
|
3815
|
+
zoomAccessTokenStringFactory: userAccessTokenStringFactory
|
|
3816
|
+
});
|
|
3817
|
+
const userFetchJson = fetch.fetchJsonFunction(userFetch, {
|
|
3818
|
+
handleFetchJsonParseErrorFunction: fetch.returnNullHandleFetchJsonParseErrorFunction
|
|
3819
|
+
});
|
|
3820
|
+
const result = {
|
|
3821
|
+
zoomServerContext: zoomContext,
|
|
3822
|
+
type: 'user',
|
|
3823
|
+
fetch: userFetch,
|
|
3824
|
+
fetchJson: userFetchJson,
|
|
3825
|
+
userFetch,
|
|
3826
|
+
userFetchJson,
|
|
3827
|
+
zoomRateLimiter: fetchHandler._rateLimiter
|
|
3828
|
+
};
|
|
3829
|
+
return result;
|
|
3830
|
+
};
|
|
3831
|
+
const zoomContext = {
|
|
3832
|
+
type: 'server',
|
|
3833
|
+
fetch: serverFetch,
|
|
3834
|
+
fetchJson: serverFetchJson,
|
|
3835
|
+
serverFetch,
|
|
3836
|
+
serverFetchJson,
|
|
3837
|
+
makeUserContext,
|
|
3838
|
+
config,
|
|
3839
|
+
zoomRateLimiter: fetchHandler._rateLimiter
|
|
3840
|
+
};
|
|
3841
|
+
const zoom = {
|
|
3842
|
+
zoomServerContext: zoomContext
|
|
3843
|
+
};
|
|
3844
|
+
return zoom;
|
|
3845
|
+
};
|
|
3846
|
+
}
|
|
3847
|
+
|
|
3848
|
+
var anObject$1 = anObject$c;
|
|
3849
|
+
|
|
3850
|
+
// `RegExp.prototype.flags` getter implementation
|
|
3851
|
+
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
3852
|
+
var regexpFlags = function () {
|
|
3853
|
+
var that = anObject$1(this);
|
|
3854
|
+
var result = '';
|
|
3855
|
+
if (that.hasIndices) result += 'd';
|
|
3856
|
+
if (that.global) result += 'g';
|
|
3857
|
+
if (that.ignoreCase) result += 'i';
|
|
3858
|
+
if (that.multiline) result += 'm';
|
|
3859
|
+
if (that.dotAll) result += 's';
|
|
3860
|
+
if (that.unicode) result += 'u';
|
|
3861
|
+
if (that.unicodeSets) result += 'v';
|
|
3862
|
+
if (that.sticky) result += 'y';
|
|
3863
|
+
return result;
|
|
3864
|
+
};
|
|
3865
|
+
|
|
3866
|
+
var call = functionCall;
|
|
3867
|
+
var hasOwn$1 = hasOwnProperty_1;
|
|
3868
|
+
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
3869
|
+
var regExpFlags = regexpFlags;
|
|
3870
|
+
|
|
3871
|
+
var RegExpPrototype$1 = RegExp.prototype;
|
|
3872
|
+
|
|
3873
|
+
var regexpGetFlags = function (R) {
|
|
3874
|
+
var flags = R.flags;
|
|
3875
|
+
return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn$1(R, 'flags') && isPrototypeOf$1(RegExpPrototype$1, R)
|
|
3876
|
+
? call(regExpFlags, R) : flags;
|
|
3877
|
+
};
|
|
3878
|
+
|
|
3879
|
+
var PROPER_FUNCTION_NAME = functionName.PROPER;
|
|
3880
|
+
var defineBuiltIn = defineBuiltIn$6;
|
|
3881
|
+
var anObject = anObject$c;
|
|
3882
|
+
var $toString = toString$2;
|
|
3883
|
+
var fails$1 = fails$h;
|
|
3884
|
+
var getRegExpFlags = regexpGetFlags;
|
|
3885
|
+
|
|
3886
|
+
var TO_STRING = 'toString';
|
|
3887
|
+
var RegExpPrototype = RegExp.prototype;
|
|
3888
|
+
var nativeToString = RegExpPrototype[TO_STRING];
|
|
3889
|
+
|
|
3890
|
+
var NOT_GENERIC = fails$1(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
|
|
3891
|
+
// FF44- RegExp#toString has a wrong name
|
|
3892
|
+
var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
|
|
3893
|
+
|
|
3894
|
+
// `RegExp.prototype.toString` method
|
|
3895
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
|
|
3896
|
+
if (NOT_GENERIC || INCORRECT_NAME) {
|
|
3897
|
+
defineBuiltIn(RegExpPrototype, TO_STRING, function toString() {
|
|
3898
|
+
var R = anObject(this);
|
|
3899
|
+
var pattern = $toString(R.source);
|
|
3900
|
+
var flags = $toString(getRegExpFlags(R));
|
|
3901
|
+
return '/' + pattern + '/' + flags;
|
|
3902
|
+
}, { unsafe: true });
|
|
3903
|
+
}
|
|
3904
|
+
|
|
3905
|
+
/**
|
|
3906
|
+
* Retrieves a new AccessToken for Server to Server authentication.
|
|
3907
|
+
*
|
|
3908
|
+
* @param context
|
|
3909
|
+
* @returns
|
|
3910
|
+
*/
|
|
3911
|
+
function serverAccessToken(context) {
|
|
3912
|
+
return input => {
|
|
3913
|
+
var _input$accountId;
|
|
3914
|
+
return context.fetchJson(`/token?grant_type=account_credentials&account_id=${(_input$accountId = input == null ? void 0 : input.accountId) != null ? _input$accountId : context.config.accountId}`, zoomOAuthApiFetchJsonInput(context, input));
|
|
3915
|
+
};
|
|
3916
|
+
}
|
|
3917
|
+
/**
|
|
3918
|
+
* Retrieves a new AccessToken for a user using their refresh token.
|
|
3919
|
+
*
|
|
3920
|
+
* @param context
|
|
3921
|
+
* @returns
|
|
3922
|
+
*/
|
|
3923
|
+
function userAccessToken(context) {
|
|
3924
|
+
return input => {
|
|
3925
|
+
const refreshToken = input.refreshToken;
|
|
3926
|
+
return context.fetchJson(`/token?grant_type=refresh_token&refresh_token=${refreshToken}`, zoomOAuthApiFetchJsonInput(context, input));
|
|
3927
|
+
};
|
|
3928
|
+
}
|
|
3929
|
+
function zoomOAuthApiFetchJsonInput(context, input) {
|
|
3930
|
+
var _input$client$clientI, _input$client, _input$client$clientS, _input$client2;
|
|
3931
|
+
const clientId = (_input$client$clientI = input == null || (_input$client = input.client) == null ? void 0 : _input$client.clientId) != null ? _input$client$clientI : context.config.clientId;
|
|
3932
|
+
const clientSecret = (_input$client$clientS = input == null || (_input$client2 = input.client) == null ? void 0 : _input$client2.clientSecret) != null ? _input$client$clientS : context.config.clientSecret;
|
|
3933
|
+
const fetchJsonInput = {
|
|
3934
|
+
headers: {
|
|
3935
|
+
Authorization: zoomOAuthServerBasicAuthorizationHeaderValue({
|
|
3936
|
+
clientId,
|
|
3937
|
+
clientSecret
|
|
3938
|
+
})
|
|
3939
|
+
},
|
|
3940
|
+
method: 'POST'
|
|
3941
|
+
};
|
|
3942
|
+
return fetchJsonInput;
|
|
3943
|
+
}
|
|
3944
|
+
function zoomOAuthServerBasicAuthorizationHeaderValue(input) {
|
|
3945
|
+
return `Basic ${Buffer.from(`${input.clientId}:${input.clientSecret}`).toString('base64')}`;
|
|
3946
|
+
}
|
|
3947
|
+
|
|
3948
|
+
/**
|
|
3949
|
+
* The Zoom OAuth API URL for the US datacenter.
|
|
3950
|
+
*/
|
|
3951
|
+
const ZOOM_OAUTH_API_URL = 'https://zoom.us/oauth';
|
|
3952
|
+
|
|
3953
|
+
var defineProperty = objectDefineProperty.f;
|
|
3954
|
+
|
|
3955
|
+
var proxyAccessor$1 = function (Target, Source, key) {
|
|
3956
|
+
key in Target || defineProperty(Target, key, {
|
|
3957
|
+
configurable: true,
|
|
3958
|
+
get: function () { return Source[key]; },
|
|
3959
|
+
set: function (it) { Source[key] = it; }
|
|
3960
|
+
});
|
|
3961
|
+
};
|
|
3962
|
+
|
|
3963
|
+
var isCallable = isCallable$m;
|
|
3964
|
+
var isObject$1 = isObject$c;
|
|
3965
|
+
var setPrototypeOf$1 = objectSetPrototypeOf;
|
|
3966
|
+
|
|
3967
|
+
// makes subclassing work correct for wrapped built-ins
|
|
3968
|
+
var inheritIfRequired$1 = function ($this, dummy, Wrapper) {
|
|
3969
|
+
var NewTarget, NewTargetPrototype;
|
|
3970
|
+
if (
|
|
3971
|
+
// it can work only with native `setPrototypeOf`
|
|
3972
|
+
setPrototypeOf$1 &&
|
|
3973
|
+
// we haven't completely correct pre-ES6 way for getting `new.target`, so use this
|
|
3974
|
+
isCallable(NewTarget = dummy.constructor) &&
|
|
3975
|
+
NewTarget !== Wrapper &&
|
|
3976
|
+
isObject$1(NewTargetPrototype = NewTarget.prototype) &&
|
|
3977
|
+
NewTargetPrototype !== Wrapper.prototype
|
|
3978
|
+
) setPrototypeOf$1($this, NewTargetPrototype);
|
|
3979
|
+
return $this;
|
|
3980
|
+
};
|
|
3981
|
+
|
|
3982
|
+
var toString = toString$2;
|
|
3983
|
+
|
|
3984
|
+
var normalizeStringArgument$1 = function (argument, $default) {
|
|
3985
|
+
return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument);
|
|
3986
|
+
};
|
|
3987
|
+
|
|
3988
|
+
var isObject = isObject$c;
|
|
3989
|
+
var createNonEnumerableProperty$2 = createNonEnumerableProperty$7;
|
|
3990
|
+
|
|
3991
|
+
// `InstallErrorCause` abstract operation
|
|
3992
|
+
// https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
|
|
3993
|
+
var installErrorCause$1 = function (O, options) {
|
|
3994
|
+
if (isObject(options) && 'cause' in options) {
|
|
3995
|
+
createNonEnumerableProperty$2(O, 'cause', options.cause);
|
|
3996
|
+
}
|
|
3997
|
+
};
|
|
3998
|
+
|
|
3999
|
+
var uncurryThis = functionUncurryThis;
|
|
4000
|
+
|
|
4001
|
+
var $Error = Error;
|
|
4002
|
+
var replace = uncurryThis(''.replace);
|
|
4003
|
+
|
|
4004
|
+
var TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd');
|
|
4005
|
+
// eslint-disable-next-line redos/no-vulnerable -- safe
|
|
4006
|
+
var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
|
|
4007
|
+
var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
|
|
4008
|
+
|
|
4009
|
+
var errorStackClear = function (stack, dropEntries) {
|
|
4010
|
+
if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
|
|
4011
|
+
while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
|
|
4012
|
+
} return stack;
|
|
4013
|
+
};
|
|
4014
|
+
|
|
4015
|
+
var fails = fails$h;
|
|
4016
|
+
var createPropertyDescriptor = createPropertyDescriptor$4;
|
|
4017
|
+
|
|
4018
|
+
var errorStackInstallable = !fails(function () {
|
|
4019
|
+
var error = new Error('a');
|
|
4020
|
+
if (!('stack' in error)) return true;
|
|
4021
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
4022
|
+
Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));
|
|
4023
|
+
return error.stack !== 7;
|
|
4024
|
+
});
|
|
4025
|
+
|
|
4026
|
+
var createNonEnumerableProperty$1 = createNonEnumerableProperty$7;
|
|
4027
|
+
var clearErrorStack = errorStackClear;
|
|
4028
|
+
var ERROR_STACK_INSTALLABLE = errorStackInstallable;
|
|
4029
|
+
|
|
4030
|
+
// non-standard V8
|
|
4031
|
+
var captureStackTrace = Error.captureStackTrace;
|
|
4032
|
+
|
|
4033
|
+
var errorStackInstall = function (error, C, stack, dropEntries) {
|
|
4034
|
+
if (ERROR_STACK_INSTALLABLE) {
|
|
4035
|
+
if (captureStackTrace) captureStackTrace(error, C);
|
|
4036
|
+
else createNonEnumerableProperty$1(error, 'stack', clearErrorStack(stack, dropEntries));
|
|
4037
|
+
}
|
|
4038
|
+
};
|
|
4039
|
+
|
|
4040
|
+
var getBuiltIn = getBuiltIn$a;
|
|
4041
|
+
var hasOwn = hasOwnProperty_1;
|
|
4042
|
+
var createNonEnumerableProperty = createNonEnumerableProperty$7;
|
|
4043
|
+
var isPrototypeOf = objectIsPrototypeOf;
|
|
4044
|
+
var setPrototypeOf = objectSetPrototypeOf;
|
|
4045
|
+
var copyConstructorProperties = copyConstructorProperties$2;
|
|
4046
|
+
var proxyAccessor = proxyAccessor$1;
|
|
4047
|
+
var inheritIfRequired = inheritIfRequired$1;
|
|
4048
|
+
var normalizeStringArgument = normalizeStringArgument$1;
|
|
4049
|
+
var installErrorCause = installErrorCause$1;
|
|
4050
|
+
var installErrorStack = errorStackInstall;
|
|
4051
|
+
var DESCRIPTORS = descriptors;
|
|
4052
|
+
|
|
4053
|
+
var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
|
|
4054
|
+
var STACK_TRACE_LIMIT = 'stackTraceLimit';
|
|
4055
|
+
var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1;
|
|
4056
|
+
var path = FULL_NAME.split('.');
|
|
4057
|
+
var ERROR_NAME = path[path.length - 1];
|
|
4058
|
+
var OriginalError = getBuiltIn.apply(null, path);
|
|
4059
|
+
|
|
4060
|
+
if (!OriginalError) return;
|
|
4061
|
+
|
|
4062
|
+
var OriginalErrorPrototype = OriginalError.prototype;
|
|
4063
|
+
|
|
4064
|
+
// V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006
|
|
4065
|
+
if (hasOwn(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;
|
|
4066
|
+
|
|
4067
|
+
if (!FORCED) return OriginalError;
|
|
4068
|
+
|
|
4069
|
+
var BaseError = getBuiltIn('Error');
|
|
4070
|
+
|
|
4071
|
+
var WrappedError = wrapper(function (a, b) {
|
|
4072
|
+
var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);
|
|
4073
|
+
var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();
|
|
4074
|
+
if (message !== undefined) createNonEnumerableProperty(result, 'message', message);
|
|
4075
|
+
installErrorStack(result, WrappedError, result.stack, 2);
|
|
4076
|
+
if (this && isPrototypeOf(OriginalErrorPrototype, this)) inheritIfRequired(result, this, WrappedError);
|
|
4077
|
+
if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);
|
|
4078
|
+
return result;
|
|
4079
|
+
});
|
|
4080
|
+
|
|
4081
|
+
WrappedError.prototype = OriginalErrorPrototype;
|
|
4082
|
+
|
|
4083
|
+
if (ERROR_NAME !== 'Error') {
|
|
4084
|
+
if (setPrototypeOf) setPrototypeOf(WrappedError, BaseError);
|
|
4085
|
+
else copyConstructorProperties(WrappedError, BaseError, { name: true });
|
|
4086
|
+
} else if (DESCRIPTORS && STACK_TRACE_LIMIT in OriginalError) {
|
|
4087
|
+
proxyAccessor(WrappedError, OriginalError, STACK_TRACE_LIMIT);
|
|
4088
|
+
proxyAccessor(WrappedError, OriginalError, 'prepareStackTrace');
|
|
4089
|
+
}
|
|
4090
|
+
|
|
4091
|
+
copyConstructorProperties(WrappedError, OriginalError);
|
|
4092
|
+
|
|
4093
|
+
try {
|
|
4094
|
+
// Safari 13- bug: WebAssembly errors does not have a proper `.name`
|
|
4095
|
+
if (OriginalErrorPrototype.name !== ERROR_NAME) {
|
|
4096
|
+
createNonEnumerableProperty(OriginalErrorPrototype, 'name', ERROR_NAME);
|
|
4097
|
+
}
|
|
4098
|
+
OriginalErrorPrototype.constructor = WrappedError;
|
|
4099
|
+
} catch (error) { /* empty */ }
|
|
4100
|
+
|
|
4101
|
+
return WrappedError;
|
|
4102
|
+
};
|
|
4103
|
+
|
|
4104
|
+
/* eslint-disable no-unused-vars -- required for functions `.length` */
|
|
4105
|
+
var $ = _export;
|
|
4106
|
+
var global$1 = global$j;
|
|
4107
|
+
var apply = functionApply;
|
|
4108
|
+
var wrapErrorConstructorWithCause = wrapErrorConstructorWithCause$1;
|
|
4109
|
+
|
|
4110
|
+
var WEB_ASSEMBLY = 'WebAssembly';
|
|
4111
|
+
var WebAssembly = global$1[WEB_ASSEMBLY];
|
|
4112
|
+
|
|
4113
|
+
// eslint-disable-next-line es/no-error-cause -- feature detection
|
|
4114
|
+
var FORCED = new Error('e', { cause: 7 }).cause !== 7;
|
|
4115
|
+
|
|
4116
|
+
var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
|
|
4117
|
+
var O = {};
|
|
4118
|
+
O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED);
|
|
4119
|
+
$({ global: true, constructor: true, arity: 1, forced: FORCED }, O);
|
|
4120
|
+
};
|
|
4121
|
+
|
|
4122
|
+
var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
|
|
4123
|
+
if (WebAssembly && WebAssembly[ERROR_NAME]) {
|
|
4124
|
+
var O = {};
|
|
4125
|
+
O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED);
|
|
4126
|
+
$({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED }, O);
|
|
4127
|
+
}
|
|
4128
|
+
};
|
|
4129
|
+
|
|
4130
|
+
// https://tc39.es/ecma262/#sec-nativeerror
|
|
4131
|
+
exportGlobalErrorCauseWrapper('Error', function (init) {
|
|
4132
|
+
return function Error(message) { return apply(init, this, arguments); };
|
|
4133
|
+
});
|
|
4134
|
+
exportGlobalErrorCauseWrapper('EvalError', function (init) {
|
|
4135
|
+
return function EvalError(message) { return apply(init, this, arguments); };
|
|
4136
|
+
});
|
|
4137
|
+
exportGlobalErrorCauseWrapper('RangeError', function (init) {
|
|
4138
|
+
return function RangeError(message) { return apply(init, this, arguments); };
|
|
4139
|
+
});
|
|
4140
|
+
exportGlobalErrorCauseWrapper('ReferenceError', function (init) {
|
|
4141
|
+
return function ReferenceError(message) { return apply(init, this, arguments); };
|
|
4142
|
+
});
|
|
4143
|
+
exportGlobalErrorCauseWrapper('SyntaxError', function (init) {
|
|
4144
|
+
return function SyntaxError(message) { return apply(init, this, arguments); };
|
|
4145
|
+
});
|
|
4146
|
+
exportGlobalErrorCauseWrapper('TypeError', function (init) {
|
|
4147
|
+
return function TypeError(message) { return apply(init, this, arguments); };
|
|
4148
|
+
});
|
|
4149
|
+
exportGlobalErrorCauseWrapper('URIError', function (init) {
|
|
4150
|
+
return function URIError(message) { return apply(init, this, arguments); };
|
|
4151
|
+
});
|
|
4152
|
+
exportWebAssemblyErrorCauseWrapper('CompileError', function (init) {
|
|
4153
|
+
return function CompileError(message) { return apply(init, this, arguments); };
|
|
4154
|
+
});
|
|
4155
|
+
exportWebAssemblyErrorCauseWrapper('LinkError', function (init) {
|
|
4156
|
+
return function LinkError(message) { return apply(init, this, arguments); };
|
|
4157
|
+
});
|
|
4158
|
+
exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
|
|
4159
|
+
return function RuntimeError(message) { return apply(init, this, arguments); };
|
|
4160
|
+
});
|
|
4161
|
+
|
|
4162
|
+
function zoomOAuthFactory(factoryConfig) {
|
|
4163
|
+
const fetchHandler = zoomRateLimitedFetchHandler();
|
|
4164
|
+
const {
|
|
4165
|
+
logZoomServerErrorFunction,
|
|
4166
|
+
fetchFactory = _ => fetch.fetchApiFetchService.makeFetch({
|
|
4167
|
+
baseUrl: ZOOM_OAUTH_API_URL,
|
|
4168
|
+
baseRequest: {
|
|
4169
|
+
headers: {
|
|
4170
|
+
'Content-Type': 'application/json'
|
|
4171
|
+
}
|
|
4172
|
+
},
|
|
4173
|
+
fetchHandler,
|
|
4174
|
+
timeout: 20 * 1000,
|
|
4175
|
+
// 20 second timeout
|
|
4176
|
+
requireOkResponse: true,
|
|
4177
|
+
// enforce ok response
|
|
4178
|
+
useTimeout: true // use timeout
|
|
4179
|
+
})
|
|
4180
|
+
} = factoryConfig;
|
|
4181
|
+
return config => {
|
|
4182
|
+
if (!config.clientId) {
|
|
4183
|
+
throw new Error('ZoomOAuthConfig missing clientId.');
|
|
4184
|
+
} else if (!config.clientSecret) {
|
|
4185
|
+
throw new Error('ZoomOAuthConfig missing clientSecret.');
|
|
4186
|
+
} else if (!config.accountId) {
|
|
4187
|
+
throw new Error('ZoomOAuthConfig missing accountId.');
|
|
4188
|
+
}
|
|
4189
|
+
const baseFetch = fetchFactory();
|
|
4190
|
+
const fetch$1 = handleZoomOAuthErrorFetch(baseFetch, logZoomServerErrorFunction);
|
|
4191
|
+
const fetchJson = fetch.fetchJsonFunction(fetch$1, {
|
|
4192
|
+
handleFetchJsonParseErrorFunction: fetch.returnNullHandleFetchJsonParseErrorFunction
|
|
4193
|
+
});
|
|
4194
|
+
function accessTokenFromTokenResponse(result) {
|
|
4195
|
+
const createdAt = new Date().getTime();
|
|
4196
|
+
const {
|
|
4197
|
+
access_token,
|
|
4198
|
+
api_url,
|
|
4199
|
+
scope,
|
|
4200
|
+
expires_in
|
|
4201
|
+
} = result;
|
|
4202
|
+
const accessToken = {
|
|
4203
|
+
accessToken: access_token,
|
|
4204
|
+
apiDomain: api_url,
|
|
4205
|
+
expiresIn: expires_in,
|
|
4206
|
+
expiresAt: new Date(createdAt + expires_in * util.MS_IN_SECOND),
|
|
4207
|
+
scope
|
|
4208
|
+
};
|
|
4209
|
+
return accessToken;
|
|
4210
|
+
}
|
|
4211
|
+
const tokenRefresher = async () => {
|
|
4212
|
+
const accessToken = await serverAccessToken(oauthContext)();
|
|
4213
|
+
return accessTokenFromTokenResponse(accessToken);
|
|
4214
|
+
};
|
|
4215
|
+
const loadAccessToken = zoomOAuthZoomAccessTokenFactory({
|
|
4216
|
+
tokenRefresher,
|
|
4217
|
+
accessTokenCache: config.accessTokenCache
|
|
4218
|
+
});
|
|
4219
|
+
// User Access Token
|
|
4220
|
+
const makeUserAccessTokenFactory = input => {
|
|
4221
|
+
const userTokenRefresher = async () => {
|
|
4222
|
+
const accessToken = await userAccessToken(oauthContext)(input);
|
|
4223
|
+
return accessTokenFromTokenResponse(accessToken);
|
|
4224
|
+
};
|
|
4225
|
+
return zoomOAuthZoomAccessTokenFactory({
|
|
4226
|
+
tokenRefresher: userTokenRefresher,
|
|
4227
|
+
accessTokenCache: input.userAccessTokenCache
|
|
4228
|
+
});
|
|
4229
|
+
};
|
|
4230
|
+
const oauthContext = {
|
|
4231
|
+
fetch: fetch$1,
|
|
4232
|
+
fetchJson,
|
|
4233
|
+
loadAccessToken,
|
|
4234
|
+
makeUserAccessTokenFactory,
|
|
4235
|
+
config
|
|
4236
|
+
};
|
|
4237
|
+
const zoomOAuth = {
|
|
4238
|
+
oauthContext
|
|
4239
|
+
};
|
|
4240
|
+
return zoomOAuth;
|
|
4241
|
+
};
|
|
4242
|
+
}
|
|
4243
|
+
/**
|
|
4244
|
+
* Creates a ZoomOAuthZoomAccessTokenFactoryConfig
|
|
4245
|
+
*
|
|
4246
|
+
* @param config
|
|
4247
|
+
* @returns
|
|
4248
|
+
*/
|
|
4249
|
+
function zoomOAuthZoomAccessTokenFactory(config) {
|
|
4250
|
+
const {
|
|
4251
|
+
tokenRefresher,
|
|
4252
|
+
accessTokenCache,
|
|
4253
|
+
tokenExpirationBuffer: inputTokenExpirationBuffer
|
|
4254
|
+
} = config;
|
|
4255
|
+
const tokenExpirationBuffer = inputTokenExpirationBuffer != null ? inputTokenExpirationBuffer : util.MS_IN_MINUTE;
|
|
4256
|
+
/**
|
|
4257
|
+
* Caches the token internally here until it expires.
|
|
4258
|
+
*/
|
|
4259
|
+
let currentToken = null;
|
|
4260
|
+
return async () => {
|
|
4261
|
+
// load from cache
|
|
4262
|
+
if (!currentToken) {
|
|
4263
|
+
const cachedToken = await (accessTokenCache == null ? void 0 : accessTokenCache.loadCachedToken());
|
|
4264
|
+
if (cachedToken) {
|
|
4265
|
+
currentToken = cachedToken;
|
|
4266
|
+
}
|
|
4267
|
+
}
|
|
4268
|
+
// check expiration
|
|
4269
|
+
if (currentToken != null) {
|
|
4270
|
+
const isExpired = new Date().getTime() + tokenExpirationBuffer >= currentToken.expiresAt.getTime();
|
|
4271
|
+
if (isExpired) {
|
|
4272
|
+
currentToken = null;
|
|
4273
|
+
}
|
|
4274
|
+
}
|
|
4275
|
+
// load from source
|
|
4276
|
+
if (!currentToken) {
|
|
4277
|
+
try {
|
|
4278
|
+
currentToken = await tokenRefresher();
|
|
4279
|
+
} catch (e) {
|
|
4280
|
+
console.error(`zoomOAuthZoomAccessTokenFactory(): Failed retrieving new token from tokenRefresher: `, e);
|
|
4281
|
+
throw new ZoomOAuthAuthFailureError('Token Refresh Failed');
|
|
4282
|
+
}
|
|
4283
|
+
if (currentToken) {
|
|
4284
|
+
try {
|
|
4285
|
+
await (accessTokenCache == null ? void 0 : accessTokenCache.updateCachedToken(currentToken));
|
|
4286
|
+
} catch (e) {
|
|
4287
|
+
// do nothing
|
|
4288
|
+
}
|
|
4289
|
+
}
|
|
4290
|
+
}
|
|
4291
|
+
return currentToken;
|
|
4292
|
+
};
|
|
4293
|
+
}
|
|
4294
|
+
|
|
4295
|
+
exports.DEFAULT_ZOOM_API_RATE_LIMIT = DEFAULT_ZOOM_API_RATE_LIMIT;
|
|
4296
|
+
exports.DEFAULT_ZOOM_API_RATE_LIMIT_RESET_PERIOD = DEFAULT_ZOOM_API_RATE_LIMIT_RESET_PERIOD;
|
|
4297
|
+
exports.DEFAULT_ZOOM_RATE_LIMITED_TOO_MANY_REQUETS_LOG_FUNCTION = DEFAULT_ZOOM_RATE_LIMITED_TOO_MANY_REQUETS_LOG_FUNCTION;
|
|
4298
|
+
exports.DELETE_MEETING_DOES_NOT_EXIST_ERROR_CODE = DELETE_MEETING_DOES_NOT_EXIST_ERROR_CODE;
|
|
4299
|
+
exports.ZOOM_ACCOUNTS_INVALID_GRANT_ERROR_CODE = ZOOM_ACCOUNTS_INVALID_GRANT_ERROR_CODE;
|
|
4300
|
+
exports.ZOOM_API_URL = ZOOM_API_URL;
|
|
4301
|
+
exports.ZOOM_OAUTH_API_URL = ZOOM_OAUTH_API_URL;
|
|
4302
|
+
exports.ZOOM_RATE_LIMIT_CATEGORY_HEADER = ZOOM_RATE_LIMIT_CATEGORY_HEADER;
|
|
4303
|
+
exports.ZOOM_RATE_LIMIT_LIMIT_HEADER = ZOOM_RATE_LIMIT_LIMIT_HEADER;
|
|
4304
|
+
exports.ZOOM_RATE_LIMIT_REMAINING_HEADER = ZOOM_RATE_LIMIT_REMAINING_HEADER;
|
|
4305
|
+
exports.ZOOM_RATE_LIMIT_RETRY_AFTER_HEADER = ZOOM_RATE_LIMIT_RETRY_AFTER_HEADER;
|
|
4306
|
+
exports.ZOOM_RATE_LIMIT_TYPE_HEADER = ZOOM_RATE_LIMIT_TYPE_HEADER;
|
|
4307
|
+
exports.ZOOM_SUCCESS_CODE = ZOOM_SUCCESS_CODE;
|
|
4308
|
+
exports.ZOOM_TOO_MANY_REQUESTS_HTTP_STATUS_CODE = ZOOM_TOO_MANY_REQUESTS_HTTP_STATUS_CODE;
|
|
4309
|
+
exports.ZoomOAuthAccessTokenError = ZoomOAuthAccessTokenError;
|
|
4310
|
+
exports.ZoomOAuthAuthFailureError = ZoomOAuthAuthFailureError;
|
|
4311
|
+
exports.ZoomServerError = ZoomServerError;
|
|
4312
|
+
exports.ZoomServerFetchResponseError = ZoomServerFetchResponseError;
|
|
4313
|
+
exports.ZoomTooManyRequestsError = ZoomTooManyRequestsError;
|
|
4314
|
+
exports.createMeetingForUser = createMeetingForUser;
|
|
4315
|
+
exports.deleteMeeting = deleteMeeting;
|
|
4316
|
+
exports.getMeeting = getMeeting;
|
|
4317
|
+
exports.getUser = getUser;
|
|
4318
|
+
exports.handleZoomErrorFetch = handleZoomErrorFetch;
|
|
4319
|
+
exports.handleZoomErrorFetchFactory = handleZoomErrorFetchFactory;
|
|
4320
|
+
exports.handleZoomOAuthErrorFetch = handleZoomOAuthErrorFetch;
|
|
4321
|
+
exports.listMeetingsForUser = listMeetingsForUser;
|
|
4322
|
+
exports.listMeetingsForUserPageFactory = listMeetingsForUserPageFactory;
|
|
4323
|
+
exports.listUsers = listUsers;
|
|
4324
|
+
exports.listUsersPageFactory = listUsersPageFactory;
|
|
4325
|
+
exports.logZoomErrorToConsole = logZoomErrorToConsole;
|
|
4326
|
+
exports.logZoomOAuthErrorToConsole = logZoomOAuthErrorToConsole;
|
|
4327
|
+
exports.logZoomServerErrorFunction = logZoomServerErrorFunction;
|
|
4328
|
+
exports.mapToZoomPageResult = mapToZoomPageResult;
|
|
4329
|
+
exports.omitSilenceZoomErrorKeys = omitSilenceZoomErrorKeys;
|
|
4330
|
+
exports.parseZoomApiError = parseZoomApiError;
|
|
4331
|
+
exports.parseZoomApiServerErrorResponseData = parseZoomApiServerErrorResponseData;
|
|
4332
|
+
exports.parseZoomOAuthError = parseZoomOAuthError;
|
|
4333
|
+
exports.parseZoomOAuthServerErrorResponseData = parseZoomOAuthServerErrorResponseData;
|
|
4334
|
+
exports.parseZoomServerErrorData = parseZoomServerErrorData;
|
|
4335
|
+
exports.serverAccessToken = serverAccessToken;
|
|
4336
|
+
exports.silenceZoomErrorWithCodesFunction = silenceZoomErrorWithCodesFunction;
|
|
4337
|
+
exports.userAccessToken = userAccessToken;
|
|
4338
|
+
exports.zoomAccessTokenStringFactory = zoomAccessTokenStringFactory;
|
|
4339
|
+
exports.zoomFactory = zoomFactory;
|
|
4340
|
+
exports.zoomFetchPageFactory = zoomFetchPageFactory;
|
|
4341
|
+
exports.zoomOAuthApiFetchJsonInput = zoomOAuthApiFetchJsonInput;
|
|
4342
|
+
exports.zoomOAuthFactory = zoomOAuthFactory;
|
|
4343
|
+
exports.zoomOAuthServerBasicAuthorizationHeaderValue = zoomOAuthServerBasicAuthorizationHeaderValue;
|
|
4344
|
+
exports.zoomOAuthZoomAccessTokenFactory = zoomOAuthZoomAccessTokenFactory;
|
|
4345
|
+
exports.zoomRateLimitHeaderDetails = zoomRateLimitHeaderDetails;
|
|
4346
|
+
exports.zoomRateLimitedFetchHandler = zoomRateLimitedFetchHandler;
|