@vkontakte/videoplayer-shared 1.0.31-dev.2d3fd91.0 → 1.0.31-dev.680271f.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/es2015.cjs.js +3 -3
- package/es2015.esm.js +3 -3
- package/es2018.cjs.js +3 -3
- package/es2018.esm.js +3 -3
- package/es5.umd.js +3112 -0
- package/esnext.cjs.js +3 -3
- package/esnext.esm.js +3 -3
- package/evergreen.esm.js +3 -3
- package/package.json +5 -3
package/es5.umd.js
ADDED
|
@@ -0,0 +1,3112 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.VKShared = {}));
|
|
5
|
+
})(this, (function (exports) { 'use strict';
|
|
6
|
+
|
|
7
|
+
var VERSION = '1.0.31-dev.680271f.0';
|
|
8
|
+
|
|
9
|
+
/******************************************************************************
|
|
10
|
+
Copyright (c) Microsoft Corporation.
|
|
11
|
+
|
|
12
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
13
|
+
purpose with or without fee is hereby granted.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
16
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
17
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
18
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
19
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
20
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
21
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
22
|
+
***************************************************************************** */
|
|
23
|
+
/* global Reflect, Promise */
|
|
24
|
+
|
|
25
|
+
var extendStatics = function(d, b) {
|
|
26
|
+
extendStatics = Object.setPrototypeOf ||
|
|
27
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
28
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
29
|
+
return extendStatics(d, b);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
function __extends(d, b) {
|
|
33
|
+
if (typeof b !== "function" && b !== null)
|
|
34
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
35
|
+
extendStatics(d, b);
|
|
36
|
+
function __() { this.constructor = d; }
|
|
37
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
var __assign = function() {
|
|
41
|
+
__assign = Object.assign || function __assign(t) {
|
|
42
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
43
|
+
s = arguments[i];
|
|
44
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
45
|
+
}
|
|
46
|
+
return t;
|
|
47
|
+
};
|
|
48
|
+
return __assign.apply(this, arguments);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
52
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
53
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
54
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
55
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
56
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
57
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function __generator(thisArg, body) {
|
|
62
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
63
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
64
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
65
|
+
function step(op) {
|
|
66
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
67
|
+
while (_) try {
|
|
68
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
69
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
70
|
+
switch (op[0]) {
|
|
71
|
+
case 0: case 1: t = op; break;
|
|
72
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
73
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
74
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
75
|
+
default:
|
|
76
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
77
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
78
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
79
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
80
|
+
if (t[2]) _.ops.pop();
|
|
81
|
+
_.trys.pop(); continue;
|
|
82
|
+
}
|
|
83
|
+
op = body.call(thisArg, _);
|
|
84
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
85
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function __values(o) {
|
|
90
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
91
|
+
if (m) return m.call(o);
|
|
92
|
+
if (o && typeof o.length === "number") return {
|
|
93
|
+
next: function () {
|
|
94
|
+
if (o && i >= o.length) o = void 0;
|
|
95
|
+
return { value: o && o[i++], done: !o };
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function __read(o, n) {
|
|
102
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
103
|
+
if (!m) return o;
|
|
104
|
+
var i = m.call(o), r, ar = [], e;
|
|
105
|
+
try {
|
|
106
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
107
|
+
}
|
|
108
|
+
catch (error) { e = { error: error }; }
|
|
109
|
+
finally {
|
|
110
|
+
try {
|
|
111
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
112
|
+
}
|
|
113
|
+
finally { if (e) throw e.error; }
|
|
114
|
+
}
|
|
115
|
+
return ar;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function __spreadArray(to, from, pack) {
|
|
119
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
120
|
+
if (ar || !(i in from)) {
|
|
121
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
122
|
+
ar[i] = from[i];
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
var Subscription = /** @class */ (function () {
|
|
129
|
+
function Subscription() {
|
|
130
|
+
this.subscriptions = [];
|
|
131
|
+
}
|
|
132
|
+
Subscription.prototype.unsubscribe = function () {
|
|
133
|
+
var subscriptions = this.subscriptions;
|
|
134
|
+
this.subscriptions = [];
|
|
135
|
+
subscriptions.forEach(function (it) { return typeof it === 'function' ? it() : it.unsubscribe(); });
|
|
136
|
+
};
|
|
137
|
+
Subscription.prototype.add = function (item) {
|
|
138
|
+
this.subscriptions.push(item);
|
|
139
|
+
return this;
|
|
140
|
+
};
|
|
141
|
+
return Subscription;
|
|
142
|
+
}());
|
|
143
|
+
|
|
144
|
+
var assertNever = function (x) {
|
|
145
|
+
throw new Error("".concat(x, " is value of unexpected type"));
|
|
146
|
+
};
|
|
147
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
148
|
+
var checkNever = function (_x) {
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
var noop = function () {
|
|
152
|
+
/* no op */
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
var Observable = /** @class */ (function () {
|
|
156
|
+
function Observable(subscribe) {
|
|
157
|
+
if (subscribe) {
|
|
158
|
+
this._subscribe = subscribe;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
Observable.prototype.subscribe = function (listener, error) {
|
|
162
|
+
var _a;
|
|
163
|
+
var errorEmitter;
|
|
164
|
+
if (!error) {
|
|
165
|
+
errorEmitter = { next: noop, error: noop };
|
|
166
|
+
}
|
|
167
|
+
else if (typeof error === 'function') {
|
|
168
|
+
errorEmitter = { next: error, error: noop };
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
errorEmitter = {
|
|
172
|
+
next: function (value) { return error.next(value); },
|
|
173
|
+
error: function (value) { var _a; return (_a = error.error) === null || _a === void 0 ? void 0 : _a.call(error, value); },
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
var emitter = typeof listener === 'function' ? {
|
|
177
|
+
next: function (value) {
|
|
178
|
+
try {
|
|
179
|
+
listener(value);
|
|
180
|
+
}
|
|
181
|
+
catch (e) {
|
|
182
|
+
errorEmitter.next(e);
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
error: function (value) { return errorEmitter.next(value); },
|
|
186
|
+
} : {
|
|
187
|
+
next: function (value) { return listener.next(value); },
|
|
188
|
+
error: function (value) { return listener.error ? listener.error(value) : errorEmitter.next(value); },
|
|
189
|
+
};
|
|
190
|
+
var unsubscriber;
|
|
191
|
+
try {
|
|
192
|
+
unsubscriber = this._subscribe(emitter);
|
|
193
|
+
}
|
|
194
|
+
catch (e) {
|
|
195
|
+
(_a = emitter.error) === null || _a === void 0 ? void 0 : _a.call(emitter, e);
|
|
196
|
+
}
|
|
197
|
+
return new Subscription().add(function () {
|
|
198
|
+
emitter.next = noop;
|
|
199
|
+
emitter.error = noop;
|
|
200
|
+
switch (typeof unsubscriber) {
|
|
201
|
+
case 'function':
|
|
202
|
+
unsubscriber();
|
|
203
|
+
return;
|
|
204
|
+
case 'object':
|
|
205
|
+
unsubscriber.unsubscribe();
|
|
206
|
+
return;
|
|
207
|
+
case 'undefined':
|
|
208
|
+
return;
|
|
209
|
+
default:
|
|
210
|
+
return assertNever(unsubscriber);
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
};
|
|
214
|
+
Observable.prototype.pipe = function () {
|
|
215
|
+
var operators = [];
|
|
216
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
217
|
+
operators[_i] = arguments[_i];
|
|
218
|
+
}
|
|
219
|
+
return operators.reduce(function (prev, op) { return op(prev); }, this);
|
|
220
|
+
};
|
|
221
|
+
Observable.prototype._subscribe = function (_emitter) {
|
|
222
|
+
/* empty */
|
|
223
|
+
};
|
|
224
|
+
return Observable;
|
|
225
|
+
}());
|
|
226
|
+
|
|
227
|
+
var Subject = /** @class */ (function (_super) {
|
|
228
|
+
__extends(Subject, _super);
|
|
229
|
+
function Subject() {
|
|
230
|
+
var _this = _super.call(this) || this;
|
|
231
|
+
_this.keyCounter = 0;
|
|
232
|
+
_this.subscribers = new Map();
|
|
233
|
+
return _this;
|
|
234
|
+
}
|
|
235
|
+
Subject.prototype.next = function (value) {
|
|
236
|
+
this.subscribers.forEach(function (it) { return it.next(value); });
|
|
237
|
+
};
|
|
238
|
+
Subject.prototype.error = function (value) {
|
|
239
|
+
this.subscribers.forEach(function (it) { var _a; return (_a = it.error) === null || _a === void 0 ? void 0 : _a.call(it, value); });
|
|
240
|
+
};
|
|
241
|
+
Subject.prototype._subscribe = function (emitter) {
|
|
242
|
+
var _this = this;
|
|
243
|
+
var key = this.keyCounter++;
|
|
244
|
+
this.subscribers.set(key, emitter);
|
|
245
|
+
return new Subscription().add(function () { return _this.subscribers.delete(key); });
|
|
246
|
+
};
|
|
247
|
+
return Subject;
|
|
248
|
+
}(Observable));
|
|
249
|
+
|
|
250
|
+
var Logger = /** @class */ (function () {
|
|
251
|
+
function Logger() {
|
|
252
|
+
var _this = this;
|
|
253
|
+
this.log$ = new Subject();
|
|
254
|
+
this.logs = [];
|
|
255
|
+
this.log = function (inputEntry) {
|
|
256
|
+
var entry = __assign(__assign({}, inputEntry), { timestamp: Date.now() });
|
|
257
|
+
_this.logs.push(entry);
|
|
258
|
+
_this.log$.next(entry);
|
|
259
|
+
};
|
|
260
|
+
this.getAllLogs = function () { return _this.logs; };
|
|
261
|
+
}
|
|
262
|
+
Logger.prototype.createCustomLog = function (transform) {
|
|
263
|
+
var _this = this;
|
|
264
|
+
return function () {
|
|
265
|
+
var args = [];
|
|
266
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
267
|
+
args[_i] = arguments[_i];
|
|
268
|
+
}
|
|
269
|
+
var entry;
|
|
270
|
+
try {
|
|
271
|
+
entry = transform.apply(void 0, __spreadArray([], __read(args), false));
|
|
272
|
+
}
|
|
273
|
+
catch (_a) {
|
|
274
|
+
entry = {
|
|
275
|
+
message: 'error in `createCustomLog`',
|
|
276
|
+
component: 'Logger',
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
_this.log(entry);
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
Logger.prototype.createComponentLog = function (component) {
|
|
283
|
+
return this.createCustomLog(function (entry) { return (__assign({ component: component }, entry)); });
|
|
284
|
+
};
|
|
285
|
+
return Logger;
|
|
286
|
+
}());
|
|
287
|
+
|
|
288
|
+
function assertNonNullable(value, failMessage) {
|
|
289
|
+
if (failMessage === void 0) { failMessage = "Assertion \"value is not nullable\" failed"; }
|
|
290
|
+
if (value === undefined || value === null) {
|
|
291
|
+
throw new Error(failMessage);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
function assertNullable(value, failMessage) {
|
|
295
|
+
if (failMessage === void 0) { failMessage = "Assertion \"value is nullable\" failed"; }
|
|
296
|
+
if (value !== undefined && value !== null) {
|
|
297
|
+
throw new Error(failMessage);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
function isNonNullable(value) {
|
|
301
|
+
return typeof value !== 'undefined' && value !== null;
|
|
302
|
+
}
|
|
303
|
+
function isNullable(value) {
|
|
304
|
+
return value === undefined || value === null;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
function assertNotEmptyArray(value, failMessage) {
|
|
308
|
+
if (!(value === null || value === void 0 ? void 0 : value.length)) {
|
|
309
|
+
throw new Error(failMessage);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
function assertEmptyArray(value, failMessage) {
|
|
313
|
+
if (value === null || value === void 0 ? void 0 : value.length) {
|
|
314
|
+
throw new Error(failMessage);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
var addScript = function (scriptSrc, abortSignal, timeout) { return new Promise(function (resolve, reject) {
|
|
319
|
+
abortSignal.addEventListener('abort', function () {
|
|
320
|
+
removeListeners();
|
|
321
|
+
script.remove();
|
|
322
|
+
});
|
|
323
|
+
var onLoadFail = function () {
|
|
324
|
+
removeListeners();
|
|
325
|
+
reject();
|
|
326
|
+
};
|
|
327
|
+
var onLoadSuccess = function () {
|
|
328
|
+
removeListeners();
|
|
329
|
+
resolve();
|
|
330
|
+
};
|
|
331
|
+
var removeListeners = function () {
|
|
332
|
+
failTimeout && clearTimeout(failTimeout);
|
|
333
|
+
script.removeEventListener('load', onLoadSuccess);
|
|
334
|
+
script.removeEventListener('error', onLoadFail);
|
|
335
|
+
};
|
|
336
|
+
var failTimeout;
|
|
337
|
+
if (timeout) {
|
|
338
|
+
failTimeout = window.setTimeout(onLoadFail, timeout);
|
|
339
|
+
}
|
|
340
|
+
var script = document.createElement('script');
|
|
341
|
+
script.addEventListener('load', onLoadSuccess);
|
|
342
|
+
script.addEventListener('error', onLoadFail);
|
|
343
|
+
script.src = scriptSrc;
|
|
344
|
+
document.head.appendChild(script);
|
|
345
|
+
}); };
|
|
346
|
+
|
|
347
|
+
var _a$1;
|
|
348
|
+
var now = typeof ((_a$1 = window.performance) === null || _a$1 === void 0 ? void 0 : _a$1.now) === 'function' ?
|
|
349
|
+
function () { return window.performance.now(); } :
|
|
350
|
+
function () { return Date.now(); };
|
|
351
|
+
|
|
352
|
+
// Декоратор оборачивающий async функции в генераторы
|
|
353
|
+
// В этих async функциях await заменяем на yield, он передаёт контроль этой утилите
|
|
354
|
+
// Декоратор проверяет состояние сигнала и если тот не абортнут передаёт контроль внутрь функции обратно
|
|
355
|
+
// Если сигнал абортнут, целевая функция останавливается на точке вызова yield и не продолжает исполнение
|
|
356
|
+
// Таким образом её можно уничтожать не боясь что какой-то асинхронный код выстрелит после уничтожения
|
|
357
|
+
var abortable = function (signal, createGenerator) { return function () {
|
|
358
|
+
var params = [];
|
|
359
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
360
|
+
params[_i] = arguments[_i];
|
|
361
|
+
}
|
|
362
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
363
|
+
var generator, done, value, result;
|
|
364
|
+
var _a;
|
|
365
|
+
return __generator(this, function (_b) {
|
|
366
|
+
switch (_b.label) {
|
|
367
|
+
case 0:
|
|
368
|
+
generator = createGenerator.apply(void 0, __spreadArray([], __read(params), false));
|
|
369
|
+
done = signal.aborted;
|
|
370
|
+
value = undefined;
|
|
371
|
+
_b.label = 1;
|
|
372
|
+
case 1:
|
|
373
|
+
if (!(!done && !signal.aborted)) return [3 /*break*/, 3];
|
|
374
|
+
return [4 /*yield*/, generator.next(value)];
|
|
375
|
+
case 2:
|
|
376
|
+
result = _b.sent();
|
|
377
|
+
done = (_a = result.done) !== null && _a !== void 0 ? _a : false;
|
|
378
|
+
value = result.value;
|
|
379
|
+
return [3 /*break*/, 1];
|
|
380
|
+
case 3: return [2 /*return*/, value];
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
});
|
|
384
|
+
}; };
|
|
385
|
+
|
|
386
|
+
exports.CurrentClientBrowser = void 0;
|
|
387
|
+
(function (CurrentClientBrowser) {
|
|
388
|
+
CurrentClientBrowser["Unknown"] = "Unknown";
|
|
389
|
+
CurrentClientBrowser["Yandex"] = "Yandex";
|
|
390
|
+
CurrentClientBrowser["Chrome"] = "Chrome";
|
|
391
|
+
CurrentClientBrowser["Chromium"] = "Chromium";
|
|
392
|
+
CurrentClientBrowser["Firefox"] = "Firefox";
|
|
393
|
+
CurrentClientBrowser["Safari"] = "Safari";
|
|
394
|
+
CurrentClientBrowser["Opera"] = "Opera";
|
|
395
|
+
CurrentClientBrowser["Edge"] = "Edge";
|
|
396
|
+
CurrentClientBrowser["Rest"] = "Rest";
|
|
397
|
+
})(exports.CurrentClientBrowser || (exports.CurrentClientBrowser = {}));
|
|
398
|
+
exports.CurrentClientDevice = void 0;
|
|
399
|
+
(function (CurrentClientDevice) {
|
|
400
|
+
CurrentClientDevice["Unknown"] = "Unknown";
|
|
401
|
+
CurrentClientDevice["Android"] = "Android";
|
|
402
|
+
CurrentClientDevice["iPhone"] = "iPhone";
|
|
403
|
+
CurrentClientDevice["iPad"] = "iPad";
|
|
404
|
+
CurrentClientDevice["iPod"] = "iPod";
|
|
405
|
+
CurrentClientDevice["RestMobile"] = "RestMobile";
|
|
406
|
+
CurrentClientDevice["Mac"] = "Mac";
|
|
407
|
+
CurrentClientDevice["Desktop"] = "Desktop";
|
|
408
|
+
})(exports.CurrentClientDevice || (exports.CurrentClientDevice = {}));
|
|
409
|
+
var getCurrentBrowser = function () {
|
|
410
|
+
var userAgent = window.navigator.userAgent;
|
|
411
|
+
var isYandex = /yabrowser/i.test(userAgent) ? exports.CurrentClientBrowser.Yandex : undefined;
|
|
412
|
+
var isChrome = /chrome|crios/i.test(userAgent) ? exports.CurrentClientBrowser.Chrome : undefined;
|
|
413
|
+
var isChromium = /chromium/i.test(userAgent) ? exports.CurrentClientBrowser.Chromium : undefined;
|
|
414
|
+
var isFirefox = /firefox|fxios/i.test(userAgent) ? exports.CurrentClientBrowser.Firefox : undefined;
|
|
415
|
+
var isSafari = /webkit|safari|khtml/i.test(userAgent) ? exports.CurrentClientBrowser.Safari : undefined;
|
|
416
|
+
var isOpera = /opr\//i.test(userAgent) ? exports.CurrentClientBrowser.Opera : undefined;
|
|
417
|
+
var isEdge = /edg/i.test(userAgent) ? exports.CurrentClientBrowser.Edge : undefined;
|
|
418
|
+
var isAndroid = /android/i.test(userAgent) ? exports.CurrentClientDevice.Android : undefined;
|
|
419
|
+
var isiPhone = /iphone/i.test(userAgent) ? exports.CurrentClientDevice.iPhone : undefined;
|
|
420
|
+
var isiPad = /ipad/i.test(userAgent) ? exports.CurrentClientDevice.iPad : undefined;
|
|
421
|
+
var isiPod = /ipod/i.test(userAgent) ? exports.CurrentClientDevice.iPod : undefined;
|
|
422
|
+
var isMac = /mac/i.test(userAgent) ? exports.CurrentClientDevice.Mac : undefined;
|
|
423
|
+
var isRestMobile = /webOS|BlackBerry|IEMobile|Opera Mini/i.test(userAgent) ? exports.CurrentClientDevice.RestMobile : undefined;
|
|
424
|
+
// Порядок браузеров важен для определения!
|
|
425
|
+
return {
|
|
426
|
+
browser: isYandex || isFirefox || isOpera || isEdge || isChrome || isChromium || isSafari || exports.CurrentClientBrowser.Rest,
|
|
427
|
+
device: isAndroid || isiPhone || isiPad || isiPod || isRestMobile || isMac || exports.CurrentClientDevice.Desktop,
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
// флаг нужен для того, чтобы проверить, включено ли у iOS-устройства полноразмерное открытие сайтов
|
|
431
|
+
var isIOS = function (checkForceDesktop) {
|
|
432
|
+
if (checkForceDesktop === void 0) { checkForceDesktop = false; }
|
|
433
|
+
var iosDevices = [exports.CurrentClientDevice.iPhone, exports.CurrentClientDevice.iPad, exports.CurrentClientDevice.iPod];
|
|
434
|
+
var isMobile = iosDevices.includes(getCurrentBrowser().device);
|
|
435
|
+
if (!checkForceDesktop) {
|
|
436
|
+
return isMobile;
|
|
437
|
+
}
|
|
438
|
+
var _a = window.navigator, userAgent = _a.userAgent, maxTouchPoints = _a.maxTouchPoints;
|
|
439
|
+
return Boolean(isMobile || /macintosh/i.test(userAgent) && maxTouchPoints > 0);
|
|
440
|
+
};
|
|
441
|
+
var getIOSVersion = function () {
|
|
442
|
+
var userAgent = window.navigator.userAgent;
|
|
443
|
+
var iosVersionMatch = userAgent.match(/Version\/(\d+(\.\d+)?)/i);
|
|
444
|
+
if (!iosVersionMatch) {
|
|
445
|
+
return null;
|
|
446
|
+
}
|
|
447
|
+
var versionString = iosVersionMatch[1];
|
|
448
|
+
var versionNumber = parseFloat(versionString);
|
|
449
|
+
if (isNaN(versionNumber)) {
|
|
450
|
+
return null;
|
|
451
|
+
}
|
|
452
|
+
return versionNumber;
|
|
453
|
+
};
|
|
454
|
+
var isMacLike = function () { return [exports.CurrentClientDevice.Mac, exports.CurrentClientDevice.iPhone, exports.CurrentClientDevice.iPad, exports.CurrentClientDevice.iPod].includes(getCurrentBrowser().device); };
|
|
455
|
+
|
|
456
|
+
var getExponentialDelay = function (errorsCount, _a) {
|
|
457
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.start, start = _c === void 0 ? 0 : _c, _d = _b.factor, factor = _d === void 0 ? 2 : _d, _e = _b.max, max = _e === void 0 ? Infinity : _e, _f = _b.min, min = _f === void 0 ? start : _f, _g = _b.random, random = _g === void 0 ? 0 : _g;
|
|
458
|
+
var delay = start;
|
|
459
|
+
delay *= Math.pow(factor, errorsCount);
|
|
460
|
+
delay *= 1 + (Math.random() * random * 2 - random);
|
|
461
|
+
delay = Math.round(delay);
|
|
462
|
+
delay = Math.min(delay, max);
|
|
463
|
+
delay = Math.max(delay, min);
|
|
464
|
+
return delay;
|
|
465
|
+
};
|
|
466
|
+
|
|
467
|
+
var Storage;
|
|
468
|
+
(function (Storage) {
|
|
469
|
+
Storage[Storage["LOCAL_STORAGE"] = 0] = "LOCAL_STORAGE";
|
|
470
|
+
Storage[Storage["SESSION_STORAGE"] = 1] = "SESSION_STORAGE";
|
|
471
|
+
Storage[Storage["RUNTIME"] = 2] = "RUNTIME";
|
|
472
|
+
})(Storage || (Storage = {}));
|
|
473
|
+
var runtimeStorage;
|
|
474
|
+
var availableStorage;
|
|
475
|
+
var key = "vk-videoplayer-dummy-key-".concat(Math.random());
|
|
476
|
+
var getAvailable = function () {
|
|
477
|
+
if (availableStorage !== undefined) {
|
|
478
|
+
return availableStorage;
|
|
479
|
+
}
|
|
480
|
+
try {
|
|
481
|
+
localStorage.setItem(key, 'test');
|
|
482
|
+
localStorage.removeItem(key);
|
|
483
|
+
availableStorage = Storage.LOCAL_STORAGE;
|
|
484
|
+
}
|
|
485
|
+
catch (error) {
|
|
486
|
+
if (error instanceof DOMException || error instanceof TypeError) {
|
|
487
|
+
try {
|
|
488
|
+
sessionStorage.getItem(key);
|
|
489
|
+
availableStorage = Storage.SESSION_STORAGE;
|
|
490
|
+
}
|
|
491
|
+
catch (error) {
|
|
492
|
+
if (error instanceof DOMException || error instanceof TypeError) {
|
|
493
|
+
availableStorage = Storage.RUNTIME;
|
|
494
|
+
}
|
|
495
|
+
else {
|
|
496
|
+
throw error;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
else {
|
|
501
|
+
throw error;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
if (availableStorage === Storage.RUNTIME) {
|
|
505
|
+
runtimeStorage = new Map();
|
|
506
|
+
}
|
|
507
|
+
return availableStorage;
|
|
508
|
+
};
|
|
509
|
+
var isPersistent = function () { return getAvailable() === Storage.LOCAL_STORAGE; };
|
|
510
|
+
var get$1 = function (key) {
|
|
511
|
+
var _a, _b;
|
|
512
|
+
var storage = getAvailable();
|
|
513
|
+
switch (storage) {
|
|
514
|
+
case Storage.LOCAL_STORAGE:
|
|
515
|
+
return (_a = localStorage.getItem(key)) !== null && _a !== void 0 ? _a : undefined;
|
|
516
|
+
case Storage.SESSION_STORAGE:
|
|
517
|
+
return (_b = sessionStorage.getItem(key)) !== null && _b !== void 0 ? _b : undefined;
|
|
518
|
+
case Storage.RUNTIME:
|
|
519
|
+
return runtimeStorage === null || runtimeStorage === void 0 ? void 0 : runtimeStorage.get(key);
|
|
520
|
+
default:
|
|
521
|
+
assertNever(storage);
|
|
522
|
+
}
|
|
523
|
+
};
|
|
524
|
+
var set$1 = function (key, value) {
|
|
525
|
+
var storage = getAvailable();
|
|
526
|
+
switch (storage) {
|
|
527
|
+
case Storage.LOCAL_STORAGE:
|
|
528
|
+
try {
|
|
529
|
+
localStorage.setItem(key, value);
|
|
530
|
+
}
|
|
531
|
+
catch (error) {
|
|
532
|
+
if (error instanceof DOMException) {
|
|
533
|
+
console.error(error); // eslint-disable-line no-console
|
|
534
|
+
}
|
|
535
|
+
else {
|
|
536
|
+
throw error;
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
break;
|
|
540
|
+
case Storage.SESSION_STORAGE:
|
|
541
|
+
try {
|
|
542
|
+
sessionStorage.setItem(key, value);
|
|
543
|
+
}
|
|
544
|
+
catch (error) {
|
|
545
|
+
if (error instanceof DOMException) {
|
|
546
|
+
console.error(error); // eslint-disable-line no-console
|
|
547
|
+
}
|
|
548
|
+
else {
|
|
549
|
+
throw error;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
break;
|
|
553
|
+
case Storage.RUNTIME:
|
|
554
|
+
return void (runtimeStorage === null || runtimeStorage === void 0 ? void 0 : runtimeStorage.set(key, value));
|
|
555
|
+
default:
|
|
556
|
+
assertNever(storage);
|
|
557
|
+
}
|
|
558
|
+
};
|
|
559
|
+
var has$1 = function (key) {
|
|
560
|
+
var _a;
|
|
561
|
+
var storage = getAvailable();
|
|
562
|
+
switch (storage) {
|
|
563
|
+
case Storage.LOCAL_STORAGE:
|
|
564
|
+
return key in localStorage;
|
|
565
|
+
case Storage.SESSION_STORAGE:
|
|
566
|
+
return key in sessionStorage;
|
|
567
|
+
case Storage.RUNTIME:
|
|
568
|
+
return (_a = runtimeStorage === null || runtimeStorage === void 0 ? void 0 : runtimeStorage.has(key)) !== null && _a !== void 0 ? _a : false;
|
|
569
|
+
default:
|
|
570
|
+
assertNever(storage);
|
|
571
|
+
return false;
|
|
572
|
+
}
|
|
573
|
+
};
|
|
574
|
+
var remove = function (key) {
|
|
575
|
+
var storage = getAvailable();
|
|
576
|
+
switch (storage) {
|
|
577
|
+
case Storage.LOCAL_STORAGE:
|
|
578
|
+
return localStorage.removeItem(key);
|
|
579
|
+
case Storage.SESSION_STORAGE:
|
|
580
|
+
return sessionStorage.removeItem(key);
|
|
581
|
+
case Storage.RUNTIME:
|
|
582
|
+
return void (runtimeStorage === null || runtimeStorage === void 0 ? void 0 : runtimeStorage.delete(key));
|
|
583
|
+
default:
|
|
584
|
+
assertNever(storage);
|
|
585
|
+
}
|
|
586
|
+
};
|
|
587
|
+
var clear = function () {
|
|
588
|
+
var storage = getAvailable();
|
|
589
|
+
switch (storage) {
|
|
590
|
+
case Storage.LOCAL_STORAGE:
|
|
591
|
+
return localStorage.clear();
|
|
592
|
+
case Storage.SESSION_STORAGE:
|
|
593
|
+
return sessionStorage.clear();
|
|
594
|
+
case Storage.RUNTIME:
|
|
595
|
+
return runtimeStorage === null || runtimeStorage === void 0 ? void 0 : runtimeStorage.clear();
|
|
596
|
+
default:
|
|
597
|
+
assertNever(storage);
|
|
598
|
+
}
|
|
599
|
+
};
|
|
600
|
+
|
|
601
|
+
var iframeSafeStorage = /*#__PURE__*/Object.freeze({
|
|
602
|
+
__proto__: null,
|
|
603
|
+
clear: clear,
|
|
604
|
+
get: get$1,
|
|
605
|
+
has: has$1,
|
|
606
|
+
isPersistent: isPersistent,
|
|
607
|
+
remove: remove,
|
|
608
|
+
set: set$1
|
|
609
|
+
});
|
|
610
|
+
|
|
611
|
+
exports.VideoQuality = void 0;
|
|
612
|
+
(function (VideoQuality) {
|
|
613
|
+
// Служебный тип качества когда оно не известно (не путать с авто)
|
|
614
|
+
VideoQuality["INVARIANT"] = "Invariant quality";
|
|
615
|
+
VideoQuality["Q_144P"] = "144p";
|
|
616
|
+
VideoQuality["Q_240P"] = "240p";
|
|
617
|
+
VideoQuality["Q_360P"] = "360p";
|
|
618
|
+
VideoQuality["Q_480P"] = "480p";
|
|
619
|
+
VideoQuality["Q_720P"] = "720p";
|
|
620
|
+
VideoQuality["Q_1080P"] = "1080p";
|
|
621
|
+
VideoQuality["Q_1440P"] = "1440p";
|
|
622
|
+
VideoQuality["Q_2160P"] = "2160p";
|
|
623
|
+
VideoQuality["Q_4320P"] = "4320p";
|
|
624
|
+
})(exports.VideoQuality || (exports.VideoQuality = {}));
|
|
625
|
+
|
|
626
|
+
var _a;
|
|
627
|
+
var videoQualitiesSizes = (_a = {},
|
|
628
|
+
_a[exports.VideoQuality.Q_144P] = { width: 256, height: 144 },
|
|
629
|
+
_a[exports.VideoQuality.Q_240P] = { width: 428, height: 240 },
|
|
630
|
+
_a[exports.VideoQuality.Q_360P] = { width: 640, height: 360 },
|
|
631
|
+
_a[exports.VideoQuality.Q_480P] = { width: 856, height: 480 },
|
|
632
|
+
_a[exports.VideoQuality.Q_720P] = { width: 1280, height: 720 },
|
|
633
|
+
_a[exports.VideoQuality.Q_1080P] = { width: 1920, height: 1080 },
|
|
634
|
+
_a[exports.VideoQuality.Q_1440P] = { width: 2560, height: 1440 },
|
|
635
|
+
_a[exports.VideoQuality.Q_2160P] = { width: 3840, height: 2160 },
|
|
636
|
+
_a[exports.VideoQuality.Q_4320P] = { width: 7680, height: 4320 },
|
|
637
|
+
_a);
|
|
638
|
+
var isHigher = function (a, b) { return videoQualitiesSizes[a].height > videoQualitiesSizes[b].height; };
|
|
639
|
+
var isHigherOrEqual = function (a, b) { return videoQualitiesSizes[a].height >= videoQualitiesSizes[b].height; };
|
|
640
|
+
var isLower = function (a, b) { return videoQualitiesSizes[a].height < videoQualitiesSizes[b].height; };
|
|
641
|
+
var isLowerOrEqual = function (a, b) { return videoQualitiesSizes[a].height <= videoQualitiesSizes[b].height; };
|
|
642
|
+
var getHighestQuality = function (qualities) {
|
|
643
|
+
return qualities.sort(function (a, b) {
|
|
644
|
+
if (a === b) {
|
|
645
|
+
return 0;
|
|
646
|
+
}
|
|
647
|
+
if (a === exports.VideoQuality.INVARIANT) {
|
|
648
|
+
return 1;
|
|
649
|
+
}
|
|
650
|
+
if (b === exports.VideoQuality.INVARIANT) {
|
|
651
|
+
return -1;
|
|
652
|
+
}
|
|
653
|
+
return isLower(a, b) ? 1 : -1;
|
|
654
|
+
})[0];
|
|
655
|
+
};
|
|
656
|
+
var allExactAscending = Object.keys(videoQualitiesSizes).sort(function (a, b) { return isLower(a, b) ? -1 : 1; });
|
|
657
|
+
/**
|
|
658
|
+
* Выбирает качество, наиболее близкое к указанной высоте кадра, но не менее её.
|
|
659
|
+
* @param tolerance позволяет выбрать качество менее заданной высоты на величину погрешности (в процентах)
|
|
660
|
+
*/
|
|
661
|
+
var videoHeightToQuality = function (height, tolerance) {
|
|
662
|
+
if (tolerance === void 0) { tolerance = 0.02; }
|
|
663
|
+
var qualities = __spreadArray([], __read(allExactAscending), false);
|
|
664
|
+
return qualities.find(function (quality) {
|
|
665
|
+
return videoQualitiesSizes[quality].height * (1 + tolerance) >= height;
|
|
666
|
+
});
|
|
667
|
+
};
|
|
668
|
+
/**
|
|
669
|
+
* Выбирает качество описывающее заданные размеры видео потока, т.е. не меньше его.
|
|
670
|
+
*/
|
|
671
|
+
var videoSizeToQuality = function (_a) {
|
|
672
|
+
var width = _a.width, height = _a.height;
|
|
673
|
+
var min = Math.min(width, height);
|
|
674
|
+
var max = Math.max(width, height);
|
|
675
|
+
return allExactAscending.find(function (testQuality) {
|
|
676
|
+
var testSize = videoQualitiesSizes[testQuality];
|
|
677
|
+
return testSize.width >= max &&
|
|
678
|
+
testSize.height >= min;
|
|
679
|
+
});
|
|
680
|
+
};
|
|
681
|
+
var videoQualityToHeight = function (quality) { return videoQualitiesSizes[quality].height; };
|
|
682
|
+
var isInvariantQuality = function (quality) {
|
|
683
|
+
return quality === exports.VideoQuality.INVARIANT;
|
|
684
|
+
};
|
|
685
|
+
var areQualitiesExact = function (qualities) {
|
|
686
|
+
return qualities.every(function (q) { return !isInvariantQuality(q); });
|
|
687
|
+
};
|
|
688
|
+
function assertQualityIsExact(quality) {
|
|
689
|
+
if (isInvariantQuality(quality)) {
|
|
690
|
+
throw new Error('Expected exact quality');
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
var fillWithDefault = function (partial, defaultConfig) {
|
|
695
|
+
var e_1, _a;
|
|
696
|
+
var fullConfig = {}; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
697
|
+
try {
|
|
698
|
+
for (var _b = __values(Object.keys(defaultConfig)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
699
|
+
var topLevelKey = _c.value;
|
|
700
|
+
var defaultValue = defaultConfig[topLevelKey];
|
|
701
|
+
var givenValue = partial[topLevelKey];
|
|
702
|
+
if (Array.isArray(defaultValue) && Array.isArray(givenValue)) {
|
|
703
|
+
fullConfig[topLevelKey] = givenValue;
|
|
704
|
+
}
|
|
705
|
+
else if (typeof defaultValue === 'object' && typeof givenValue === 'object') {
|
|
706
|
+
fullConfig[topLevelKey] = fillWithDefault(givenValue, defaultValue);
|
|
707
|
+
}
|
|
708
|
+
else {
|
|
709
|
+
fullConfig[topLevelKey] = topLevelKey in partial ? givenValue : defaultValue;
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
714
|
+
finally {
|
|
715
|
+
try {
|
|
716
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
717
|
+
}
|
|
718
|
+
finally { if (e_1) throw e_1.error; }
|
|
719
|
+
}
|
|
720
|
+
return fullConfig;
|
|
721
|
+
};
|
|
722
|
+
|
|
723
|
+
var ValueSubject = /** @class */ (function (_super) {
|
|
724
|
+
__extends(ValueSubject, _super);
|
|
725
|
+
function ValueSubject(initialValue) {
|
|
726
|
+
var _this = _super.call(this) || this;
|
|
727
|
+
_this.value = initialValue;
|
|
728
|
+
return _this;
|
|
729
|
+
}
|
|
730
|
+
ValueSubject.prototype.next = function (value) {
|
|
731
|
+
_super.prototype.next.call(this, this.value = value);
|
|
732
|
+
};
|
|
733
|
+
ValueSubject.prototype.error = function (value) {
|
|
734
|
+
_super.prototype.error.call(this, this.value = value);
|
|
735
|
+
};
|
|
736
|
+
ValueSubject.prototype.getValue = function () {
|
|
737
|
+
return this.value;
|
|
738
|
+
};
|
|
739
|
+
ValueSubject.prototype._subscribe = function (emitter) {
|
|
740
|
+
var result = _super.prototype._subscribe.call(this, emitter);
|
|
741
|
+
emitter.next(this.value);
|
|
742
|
+
return result;
|
|
743
|
+
};
|
|
744
|
+
return ValueSubject;
|
|
745
|
+
}(Subject));
|
|
746
|
+
|
|
747
|
+
function combine(observables) {
|
|
748
|
+
return new Observable(function (emitter) {
|
|
749
|
+
var values = {};
|
|
750
|
+
var missingValuesCount = Object.keys(observables).length;
|
|
751
|
+
var createKeyListener = function (key) { return function (value) {
|
|
752
|
+
if (!(key in values)) {
|
|
753
|
+
missingValuesCount--;
|
|
754
|
+
}
|
|
755
|
+
values[key] = value;
|
|
756
|
+
if (missingValuesCount === 0) {
|
|
757
|
+
emitter.next(values);
|
|
758
|
+
}
|
|
759
|
+
}; };
|
|
760
|
+
return Object.entries(observables).reduce(function (subscription, _a) {
|
|
761
|
+
var _b = __read(_a, 2), key = _b[0], observable = _b[1];
|
|
762
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
763
|
+
return subscription.add(observable.subscribe(createKeyListener(key)));
|
|
764
|
+
}, new Subscription());
|
|
765
|
+
});
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
/**
|
|
769
|
+
* Создаёт Observable, в который попадают все события исходных Observable (синхронно в момент возникновения)
|
|
770
|
+
*/
|
|
771
|
+
function merge() {
|
|
772
|
+
var observables = [];
|
|
773
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
774
|
+
observables[_i] = arguments[_i];
|
|
775
|
+
}
|
|
776
|
+
return new Observable(function (emitter) {
|
|
777
|
+
return observables.reduce(function (subscription, it) { return subscription.add(it.subscribe(emitter)); }, new Subscription());
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
var timeout = (function (time) {
|
|
782
|
+
return new Observable(function (emitter) {
|
|
783
|
+
var id = window.setTimeout(function () {
|
|
784
|
+
try {
|
|
785
|
+
emitter.next();
|
|
786
|
+
}
|
|
787
|
+
catch (e) {
|
|
788
|
+
if (emitter.error) {
|
|
789
|
+
emitter.error(e);
|
|
790
|
+
}
|
|
791
|
+
else {
|
|
792
|
+
throw e;
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
}, time);
|
|
796
|
+
return function () { return window.clearTimeout(id); };
|
|
797
|
+
});
|
|
798
|
+
});
|
|
799
|
+
|
|
800
|
+
var interval = (function (time) {
|
|
801
|
+
return new Observable(function (emitter) {
|
|
802
|
+
var id = window.setInterval(function () { return emitter.next(); }, time);
|
|
803
|
+
return function () { return window.clearInterval(id); };
|
|
804
|
+
});
|
|
805
|
+
});
|
|
806
|
+
|
|
807
|
+
var observableFrom = (function (values) {
|
|
808
|
+
return new Observable(function (emitter) {
|
|
809
|
+
values.forEach(function (it) { return emitter.next(it); });
|
|
810
|
+
});
|
|
811
|
+
});
|
|
812
|
+
|
|
813
|
+
var fromEvent = (function (target, eventName) {
|
|
814
|
+
return new Observable(function (emitter) {
|
|
815
|
+
var listener = function (e) { return emitter.next(e); }; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
816
|
+
target.addEventListener(eventName, listener);
|
|
817
|
+
return function () { return target.removeEventListener(eventName, listener); };
|
|
818
|
+
});
|
|
819
|
+
});
|
|
820
|
+
|
|
821
|
+
function buffer(size) {
|
|
822
|
+
return function (o) {
|
|
823
|
+
return new Observable(function (emitter) { return o.subscribe(new BufferEmitter(emitter, size)); });
|
|
824
|
+
};
|
|
825
|
+
}
|
|
826
|
+
var BufferEmitter = /** @class */ (function () {
|
|
827
|
+
function BufferEmitter(destination, size) {
|
|
828
|
+
this.destination = destination;
|
|
829
|
+
this.size = size;
|
|
830
|
+
this.lastValues = [];
|
|
831
|
+
}
|
|
832
|
+
BufferEmitter.prototype.next = function (value) {
|
|
833
|
+
if (this.lastValues.length === this.size) {
|
|
834
|
+
this.lastValues.shift();
|
|
835
|
+
}
|
|
836
|
+
this.lastValues.push(value);
|
|
837
|
+
this.destination.next(this.lastValues);
|
|
838
|
+
};
|
|
839
|
+
BufferEmitter.prototype.error = function (e) {
|
|
840
|
+
var _a, _b;
|
|
841
|
+
(_b = (_a = this.destination).error) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
|
842
|
+
};
|
|
843
|
+
return BufferEmitter;
|
|
844
|
+
}());
|
|
845
|
+
|
|
846
|
+
var defaultConfig$1 = {
|
|
847
|
+
leading: false,
|
|
848
|
+
trailing: true,
|
|
849
|
+
};
|
|
850
|
+
function debounce(time, config) {
|
|
851
|
+
if (config === void 0) { config = defaultConfig$1; }
|
|
852
|
+
return function (o) {
|
|
853
|
+
return new Observable(function (emitter) { return o.subscribe(new DebounceEmitter(emitter, time, config)); });
|
|
854
|
+
};
|
|
855
|
+
}
|
|
856
|
+
var DebounceEmitter = /** @class */ (function () {
|
|
857
|
+
function DebounceEmitter(destination, time, config) {
|
|
858
|
+
this.destination = destination;
|
|
859
|
+
this.time = time;
|
|
860
|
+
this.config = config;
|
|
861
|
+
}
|
|
862
|
+
DebounceEmitter.prototype.next = function (value) {
|
|
863
|
+
var _this = this;
|
|
864
|
+
this.lastValue = value;
|
|
865
|
+
if (isNonNullable(this.timeout)) {
|
|
866
|
+
window.clearTimeout(this.timeout);
|
|
867
|
+
}
|
|
868
|
+
else if (this.config.leading) {
|
|
869
|
+
this.destination.next(value);
|
|
870
|
+
}
|
|
871
|
+
this.timeout = window.setTimeout(function () {
|
|
872
|
+
if (_this.config.trailing) {
|
|
873
|
+
try {
|
|
874
|
+
_this.destination.next(_this.lastValue); // eslint-disable-line @typescript-eslint/no-non-null-assertion
|
|
875
|
+
}
|
|
876
|
+
catch (e) {
|
|
877
|
+
if (_this.destination.error) {
|
|
878
|
+
_this.destination.error(e);
|
|
879
|
+
}
|
|
880
|
+
else {
|
|
881
|
+
throw e;
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
_this.timeout = undefined;
|
|
886
|
+
}, this.time);
|
|
887
|
+
};
|
|
888
|
+
DebounceEmitter.prototype.error = function (e) {
|
|
889
|
+
var _a, _b;
|
|
890
|
+
(_b = (_a = this.destination).error) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
|
891
|
+
};
|
|
892
|
+
return DebounceEmitter;
|
|
893
|
+
}());
|
|
894
|
+
|
|
895
|
+
var defaultConfig = {
|
|
896
|
+
leading: true,
|
|
897
|
+
trailing: false,
|
|
898
|
+
};
|
|
899
|
+
function throttle(time, config) {
|
|
900
|
+
if (config === void 0) { config = defaultConfig; }
|
|
901
|
+
return function (o) {
|
|
902
|
+
return new Observable(function (emitter) { return o.subscribe(new ThrottleEmitter(emitter, time, config)); });
|
|
903
|
+
};
|
|
904
|
+
}
|
|
905
|
+
var ThrottleEmitter = /** @class */ (function () {
|
|
906
|
+
function ThrottleEmitter(destination, time, config) {
|
|
907
|
+
this.destination = destination;
|
|
908
|
+
this.time = time;
|
|
909
|
+
this.config = config;
|
|
910
|
+
}
|
|
911
|
+
ThrottleEmitter.prototype.next = function (value) {
|
|
912
|
+
var _this = this;
|
|
913
|
+
this.lastValue = value;
|
|
914
|
+
if (isNullable(this.timeout)) {
|
|
915
|
+
if (this.config.leading) {
|
|
916
|
+
this.destination.next(value);
|
|
917
|
+
}
|
|
918
|
+
this.timeout = window.setTimeout(function () {
|
|
919
|
+
if (_this.config.trailing) {
|
|
920
|
+
_this.destination.next(_this.lastValue); // eslint-disable-line @typescript-eslint/no-non-null-assertion
|
|
921
|
+
}
|
|
922
|
+
_this.timeout = undefined;
|
|
923
|
+
}, this.time);
|
|
924
|
+
}
|
|
925
|
+
};
|
|
926
|
+
ThrottleEmitter.prototype.error = function (e) {
|
|
927
|
+
var _a, _b;
|
|
928
|
+
(_b = (_a = this.destination).error) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
|
929
|
+
};
|
|
930
|
+
return ThrottleEmitter;
|
|
931
|
+
}());
|
|
932
|
+
|
|
933
|
+
/**
|
|
934
|
+
* Пропускает только те события, которые удовлетворяют предикату
|
|
935
|
+
*/
|
|
936
|
+
function filter(predicate) {
|
|
937
|
+
return function (o) { return new Observable(function (emitter) { return o.subscribe(new FilterEmitter(emitter, predicate)); }); };
|
|
938
|
+
}
|
|
939
|
+
var FilterEmitter = /** @class */ (function () {
|
|
940
|
+
function FilterEmitter(destination, predicate) {
|
|
941
|
+
this.destination = destination;
|
|
942
|
+
this.predicate = predicate;
|
|
943
|
+
}
|
|
944
|
+
FilterEmitter.prototype.next = function (value) {
|
|
945
|
+
var suitable;
|
|
946
|
+
try {
|
|
947
|
+
suitable = this.predicate(value);
|
|
948
|
+
}
|
|
949
|
+
catch (e) {
|
|
950
|
+
this.error(e);
|
|
951
|
+
throw e;
|
|
952
|
+
}
|
|
953
|
+
if (suitable) {
|
|
954
|
+
this.destination.next(value);
|
|
955
|
+
}
|
|
956
|
+
};
|
|
957
|
+
FilterEmitter.prototype.error = function (e) {
|
|
958
|
+
var _a, _b;
|
|
959
|
+
(_b = (_a = this.destination).error) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
|
960
|
+
};
|
|
961
|
+
return FilterEmitter;
|
|
962
|
+
}());
|
|
963
|
+
|
|
964
|
+
/**
|
|
965
|
+
* Пропускает только события, содержащие значения, отличные от предыдущего
|
|
966
|
+
*/
|
|
967
|
+
function filterChanged(equal) {
|
|
968
|
+
if (equal === void 0) { equal = function (a, b) { return a === b; }; }
|
|
969
|
+
return function (o) { return new Observable(function (emitter) { return o.subscribe(new FilterChangedEmitter(emitter, equal)); }); };
|
|
970
|
+
}
|
|
971
|
+
var NO_VALUE = {}; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
972
|
+
var FilterChangedEmitter = /** @class */ (function () {
|
|
973
|
+
function FilterChangedEmitter(destination, predicate) {
|
|
974
|
+
this.destination = destination;
|
|
975
|
+
this.predicate = predicate;
|
|
976
|
+
this.lastValue = NO_VALUE;
|
|
977
|
+
}
|
|
978
|
+
FilterChangedEmitter.prototype.next = function (value) {
|
|
979
|
+
var changed;
|
|
980
|
+
try {
|
|
981
|
+
changed = this.lastValue === NO_VALUE || !this.predicate(this.lastValue, value);
|
|
982
|
+
this.lastValue = value;
|
|
983
|
+
}
|
|
984
|
+
catch (e) {
|
|
985
|
+
this.error(e);
|
|
986
|
+
throw e;
|
|
987
|
+
}
|
|
988
|
+
if (changed) {
|
|
989
|
+
this.destination.next(value);
|
|
990
|
+
}
|
|
991
|
+
};
|
|
992
|
+
FilterChangedEmitter.prototype.error = function (e) {
|
|
993
|
+
var _a, _b;
|
|
994
|
+
(_b = (_a = this.destination).error) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
|
995
|
+
};
|
|
996
|
+
return FilterChangedEmitter;
|
|
997
|
+
}());
|
|
998
|
+
|
|
999
|
+
function map(mapper) {
|
|
1000
|
+
return function (o) { return new Observable(function (emitter) { return o.subscribe(new MapEmitter$1(emitter, mapper)); }); };
|
|
1001
|
+
}
|
|
1002
|
+
var MapEmitter$1 = /** @class */ (function () {
|
|
1003
|
+
function MapEmitter(destination, mapper) {
|
|
1004
|
+
this.destination = destination;
|
|
1005
|
+
this.mapper = mapper;
|
|
1006
|
+
}
|
|
1007
|
+
MapEmitter.prototype.next = function (value) {
|
|
1008
|
+
var result;
|
|
1009
|
+
try {
|
|
1010
|
+
result = this.mapper(value);
|
|
1011
|
+
}
|
|
1012
|
+
catch (e) {
|
|
1013
|
+
this.error(e);
|
|
1014
|
+
throw e;
|
|
1015
|
+
}
|
|
1016
|
+
this.destination.next(result);
|
|
1017
|
+
};
|
|
1018
|
+
MapEmitter.prototype.error = function (value) {
|
|
1019
|
+
var _a, _b;
|
|
1020
|
+
(_b = (_a = this.destination).error) === null || _b === void 0 ? void 0 : _b.call(_a, value);
|
|
1021
|
+
};
|
|
1022
|
+
return MapEmitter;
|
|
1023
|
+
}());
|
|
1024
|
+
|
|
1025
|
+
function mapTo(value) {
|
|
1026
|
+
return map(function () { return value; });
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
/**
|
|
1030
|
+
* Отписывается от исходного потока после получения первого события.
|
|
1031
|
+
*/
|
|
1032
|
+
function once() {
|
|
1033
|
+
return function (o) {
|
|
1034
|
+
return new Observable(function (emitter) {
|
|
1035
|
+
var eventFired = false;
|
|
1036
|
+
var subscriptionReady = false;
|
|
1037
|
+
var subscription = o.subscribe(function (event) {
|
|
1038
|
+
if (!eventFired) {
|
|
1039
|
+
eventFired = true;
|
|
1040
|
+
emitter.next(event);
|
|
1041
|
+
}
|
|
1042
|
+
if (subscriptionReady) {
|
|
1043
|
+
subscription.unsubscribe();
|
|
1044
|
+
}
|
|
1045
|
+
}, function (error) {
|
|
1046
|
+
var _a;
|
|
1047
|
+
eventFired = true;
|
|
1048
|
+
(_a = emitter.error) === null || _a === void 0 ? void 0 : _a.call(emitter, error);
|
|
1049
|
+
if (subscriptionReady) {
|
|
1050
|
+
subscription.unsubscribe();
|
|
1051
|
+
}
|
|
1052
|
+
});
|
|
1053
|
+
subscriptionReady = true;
|
|
1054
|
+
if (eventFired) {
|
|
1055
|
+
subscription.unsubscribe();
|
|
1056
|
+
}
|
|
1057
|
+
return subscription;
|
|
1058
|
+
});
|
|
1059
|
+
};
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
function pairwise() {
|
|
1063
|
+
return function (o) { return new Observable(function (emitter) { return o.subscribe(new PairwiseEmitter(emitter)); }); };
|
|
1064
|
+
}
|
|
1065
|
+
var PairwiseEmitter = /** @class */ (function () {
|
|
1066
|
+
function PairwiseEmitter(destination) {
|
|
1067
|
+
this.destination = destination;
|
|
1068
|
+
this.hasLast = false;
|
|
1069
|
+
}
|
|
1070
|
+
PairwiseEmitter.prototype.next = function (value) {
|
|
1071
|
+
var last = this.last;
|
|
1072
|
+
this.last = value;
|
|
1073
|
+
if (!this.hasLast) {
|
|
1074
|
+
this.hasLast = true;
|
|
1075
|
+
return;
|
|
1076
|
+
}
|
|
1077
|
+
this.destination.next([last, value]); // eslint-disable-line @typescript-eslint/no-non-null-assertion
|
|
1078
|
+
};
|
|
1079
|
+
PairwiseEmitter.prototype.error = function (value) {
|
|
1080
|
+
var _a, _b;
|
|
1081
|
+
(_b = (_a = this.destination).error) === null || _b === void 0 ? void 0 : _b.call(_a, value);
|
|
1082
|
+
};
|
|
1083
|
+
return PairwiseEmitter;
|
|
1084
|
+
}());
|
|
1085
|
+
|
|
1086
|
+
function tap(effect) {
|
|
1087
|
+
return function (o) { return new Observable(function (emitter) { return o.subscribe(new MapEmitter(emitter, effect)); }); };
|
|
1088
|
+
}
|
|
1089
|
+
var MapEmitter = /** @class */ (function () {
|
|
1090
|
+
function MapEmitter(destination, effect) {
|
|
1091
|
+
this.destination = destination;
|
|
1092
|
+
this.effect = effect;
|
|
1093
|
+
}
|
|
1094
|
+
MapEmitter.prototype.next = function (value) {
|
|
1095
|
+
try {
|
|
1096
|
+
this.effect(value);
|
|
1097
|
+
}
|
|
1098
|
+
catch (e) {
|
|
1099
|
+
this.error(e);
|
|
1100
|
+
throw e;
|
|
1101
|
+
}
|
|
1102
|
+
this.destination.next(value);
|
|
1103
|
+
};
|
|
1104
|
+
MapEmitter.prototype.error = function (value) {
|
|
1105
|
+
var _a, _b;
|
|
1106
|
+
(_b = (_a = this.destination).error) === null || _b === void 0 ? void 0 : _b.call(_a, value);
|
|
1107
|
+
};
|
|
1108
|
+
return MapEmitter;
|
|
1109
|
+
}());
|
|
1110
|
+
|
|
1111
|
+
exports.ErrorCategory = void 0;
|
|
1112
|
+
(function (ErrorCategory) {
|
|
1113
|
+
ErrorCategory["NETWORK"] = "network";
|
|
1114
|
+
ErrorCategory["VIDEO_PIPELINE"] = "video_pipeline";
|
|
1115
|
+
ErrorCategory["EXTERNAL_API"] = "external_api";
|
|
1116
|
+
ErrorCategory["PARSER"] = "parser";
|
|
1117
|
+
ErrorCategory["DOM"] = "dom";
|
|
1118
|
+
ErrorCategory["WTF"] = "wtf";
|
|
1119
|
+
})(exports.ErrorCategory || (exports.ErrorCategory = {}));
|
|
1120
|
+
|
|
1121
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1122
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof$8(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
1123
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
1124
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
1125
|
+
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
|
|
1126
|
+
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
|
1127
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
1128
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
1129
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
1130
|
+
function _typeof$8(o) { "@babel/helpers - typeof"; return _typeof$8 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$8(o); }
|
|
1131
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1132
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
1133
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
1134
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof$8(i) ? i : String(i); }
|
|
1135
|
+
function _toPrimitive(t, r) { if ("object" != _typeof$8(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof$8(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1136
|
+
var Emitter = /*#__PURE__*/function () {
|
|
1137
|
+
function Emitter() {
|
|
1138
|
+
_classCallCheck(this, Emitter);
|
|
1139
|
+
Object.defineProperty(this, 'listeners', {
|
|
1140
|
+
value: {},
|
|
1141
|
+
writable: true,
|
|
1142
|
+
configurable: true
|
|
1143
|
+
});
|
|
1144
|
+
}
|
|
1145
|
+
_createClass(Emitter, [{
|
|
1146
|
+
key: "addEventListener",
|
|
1147
|
+
value: function addEventListener(type, callback, options) {
|
|
1148
|
+
if (!(type in this.listeners)) {
|
|
1149
|
+
this.listeners[type] = [];
|
|
1150
|
+
}
|
|
1151
|
+
this.listeners[type].push({
|
|
1152
|
+
callback: callback,
|
|
1153
|
+
options: options
|
|
1154
|
+
});
|
|
1155
|
+
}
|
|
1156
|
+
}, {
|
|
1157
|
+
key: "removeEventListener",
|
|
1158
|
+
value: function removeEventListener(type, callback) {
|
|
1159
|
+
if (!(type in this.listeners)) {
|
|
1160
|
+
return;
|
|
1161
|
+
}
|
|
1162
|
+
var stack = this.listeners[type];
|
|
1163
|
+
for (var i = 0, l = stack.length; i < l; i++) {
|
|
1164
|
+
if (stack[i].callback === callback) {
|
|
1165
|
+
stack.splice(i, 1);
|
|
1166
|
+
return;
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
}, {
|
|
1171
|
+
key: "dispatchEvent",
|
|
1172
|
+
value: function dispatchEvent(event) {
|
|
1173
|
+
var _this = this;
|
|
1174
|
+
if (!(event.type in this.listeners)) {
|
|
1175
|
+
return;
|
|
1176
|
+
}
|
|
1177
|
+
var stack = this.listeners[event.type];
|
|
1178
|
+
var stackToCall = stack.slice();
|
|
1179
|
+
var _loop = function _loop() {
|
|
1180
|
+
var listener = stackToCall[i];
|
|
1181
|
+
try {
|
|
1182
|
+
listener.callback.call(_this, event);
|
|
1183
|
+
} catch (e) {
|
|
1184
|
+
Promise.resolve().then(function () {
|
|
1185
|
+
throw e;
|
|
1186
|
+
});
|
|
1187
|
+
}
|
|
1188
|
+
if (listener.options && listener.options.once) {
|
|
1189
|
+
_this.removeEventListener(event.type, listener.callback);
|
|
1190
|
+
}
|
|
1191
|
+
};
|
|
1192
|
+
for (var i = 0, l = stackToCall.length; i < l; i++) {
|
|
1193
|
+
_loop();
|
|
1194
|
+
}
|
|
1195
|
+
return !event.defaultPrevented;
|
|
1196
|
+
}
|
|
1197
|
+
}]);
|
|
1198
|
+
return Emitter;
|
|
1199
|
+
}();
|
|
1200
|
+
var AbortSignal = /*#__PURE__*/function (_Emitter) {
|
|
1201
|
+
_inherits(AbortSignal, _Emitter);
|
|
1202
|
+
function AbortSignal() {
|
|
1203
|
+
var _this2;
|
|
1204
|
+
_classCallCheck(this, AbortSignal);
|
|
1205
|
+
_this2 = _callSuper(this, AbortSignal);
|
|
1206
|
+
// Some versions of babel does not transpile super() correctly for IE <= 10, if the parent
|
|
1207
|
+
// constructor has failed to run, then "this.listeners" will still be undefined and then we call
|
|
1208
|
+
// the parent constructor directly instead as a workaround. For general details, see babel bug:
|
|
1209
|
+
// https://github.com/babel/babel/issues/3041
|
|
1210
|
+
// This hack was added as a fix for the issue described here:
|
|
1211
|
+
// https://github.com/Financial-Times/polyfill-library/pull/59#issuecomment-477558042
|
|
1212
|
+
if (!_this2.listeners) {
|
|
1213
|
+
Emitter.call(_assertThisInitialized(_this2));
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
// Compared to assignment, Object.defineProperty makes properties non-enumerable by default and
|
|
1217
|
+
// we want Object.keys(new AbortController().signal) to be [] for compat with the native impl
|
|
1218
|
+
Object.defineProperty(_assertThisInitialized(_this2), 'aborted', {
|
|
1219
|
+
value: false,
|
|
1220
|
+
writable: true,
|
|
1221
|
+
configurable: true
|
|
1222
|
+
});
|
|
1223
|
+
Object.defineProperty(_assertThisInitialized(_this2), 'onabort', {
|
|
1224
|
+
value: null,
|
|
1225
|
+
writable: true,
|
|
1226
|
+
configurable: true
|
|
1227
|
+
});
|
|
1228
|
+
Object.defineProperty(_assertThisInitialized(_this2), 'reason', {
|
|
1229
|
+
value: undefined,
|
|
1230
|
+
writable: true,
|
|
1231
|
+
configurable: true
|
|
1232
|
+
});
|
|
1233
|
+
return _this2;
|
|
1234
|
+
}
|
|
1235
|
+
_createClass(AbortSignal, [{
|
|
1236
|
+
key: "toString",
|
|
1237
|
+
value: function toString() {
|
|
1238
|
+
return '[object AbortSignal]';
|
|
1239
|
+
}
|
|
1240
|
+
}, {
|
|
1241
|
+
key: "dispatchEvent",
|
|
1242
|
+
value: function dispatchEvent(event) {
|
|
1243
|
+
if (event.type === 'abort') {
|
|
1244
|
+
this.aborted = true;
|
|
1245
|
+
if (typeof this.onabort === 'function') {
|
|
1246
|
+
this.onabort.call(this, event);
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
_get(_getPrototypeOf(AbortSignal.prototype), "dispatchEvent", this).call(this, event);
|
|
1250
|
+
}
|
|
1251
|
+
}]);
|
|
1252
|
+
return AbortSignal;
|
|
1253
|
+
}(Emitter);
|
|
1254
|
+
var AbortController = /*#__PURE__*/function () {
|
|
1255
|
+
function AbortController() {
|
|
1256
|
+
_classCallCheck(this, AbortController);
|
|
1257
|
+
// Compared to assignment, Object.defineProperty makes properties non-enumerable by default and
|
|
1258
|
+
// we want Object.keys(new AbortController()) to be [] for compat with the native impl
|
|
1259
|
+
Object.defineProperty(this, 'signal', {
|
|
1260
|
+
value: new AbortSignal(),
|
|
1261
|
+
writable: true,
|
|
1262
|
+
configurable: true
|
|
1263
|
+
});
|
|
1264
|
+
}
|
|
1265
|
+
_createClass(AbortController, [{
|
|
1266
|
+
key: "abort",
|
|
1267
|
+
value: function abort(reason) {
|
|
1268
|
+
var event;
|
|
1269
|
+
try {
|
|
1270
|
+
event = new Event('abort');
|
|
1271
|
+
} catch (e) {
|
|
1272
|
+
if (typeof document !== 'undefined') {
|
|
1273
|
+
if (!document.createEvent) {
|
|
1274
|
+
// For Internet Explorer 8:
|
|
1275
|
+
event = document.createEventObject();
|
|
1276
|
+
event.type = 'abort';
|
|
1277
|
+
} else {
|
|
1278
|
+
// For Internet Explorer 11:
|
|
1279
|
+
event = document.createEvent('Event');
|
|
1280
|
+
event.initEvent('abort', false, false);
|
|
1281
|
+
}
|
|
1282
|
+
} else {
|
|
1283
|
+
// Fallback where document isn't available:
|
|
1284
|
+
event = {
|
|
1285
|
+
type: 'abort',
|
|
1286
|
+
bubbles: false,
|
|
1287
|
+
cancelable: false
|
|
1288
|
+
};
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
var signalReason = reason;
|
|
1292
|
+
if (signalReason === undefined) {
|
|
1293
|
+
if (typeof document === 'undefined') {
|
|
1294
|
+
signalReason = new Error('This operation was aborted');
|
|
1295
|
+
signalReason.name = 'AbortError';
|
|
1296
|
+
} else {
|
|
1297
|
+
try {
|
|
1298
|
+
signalReason = new DOMException('signal is aborted without reason');
|
|
1299
|
+
} catch (err) {
|
|
1300
|
+
// IE 11 does not support calling the DOMException constructor, use a
|
|
1301
|
+
// regular error object on it instead.
|
|
1302
|
+
signalReason = new Error('This operation was aborted');
|
|
1303
|
+
signalReason.name = 'AbortError';
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
this.signal.reason = signalReason;
|
|
1308
|
+
this.signal.dispatchEvent(event);
|
|
1309
|
+
}
|
|
1310
|
+
}, {
|
|
1311
|
+
key: "toString",
|
|
1312
|
+
value: function toString() {
|
|
1313
|
+
return '[object AbortController]';
|
|
1314
|
+
}
|
|
1315
|
+
}]);
|
|
1316
|
+
return AbortController;
|
|
1317
|
+
}();
|
|
1318
|
+
if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
1319
|
+
// These are necessary to make sure that we get correct output for:
|
|
1320
|
+
// Object.prototype.toString.call(new AbortController())
|
|
1321
|
+
AbortController.prototype[Symbol.toStringTag] = 'AbortController';
|
|
1322
|
+
AbortSignal.prototype[Symbol.toStringTag] = 'AbortSignal';
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
function polyfillNeeded(self) {
|
|
1326
|
+
if (self.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL) {
|
|
1327
|
+
console.log('__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill');
|
|
1328
|
+
return true;
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
// Note that the "unfetch" minimal fetch polyfill defines fetch() without
|
|
1332
|
+
// defining window.Request, and this polyfill need to work on top of unfetch
|
|
1333
|
+
// so the below feature detection needs the !self.AbortController part.
|
|
1334
|
+
// The Request.prototype check is also needed because Safari versions 11.1.2
|
|
1335
|
+
// up to and including 12.1.x has a window.AbortController present but still
|
|
1336
|
+
// does NOT correctly implement abortable fetch:
|
|
1337
|
+
// https://bugs.webkit.org/show_bug.cgi?id=174980#c2
|
|
1338
|
+
return typeof self.Request === 'function' && !self.Request.prototype.hasOwnProperty('signal') || !self.AbortController;
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
/**
|
|
1342
|
+
* Note: the "fetch.Request" default value is available for fetch imported from
|
|
1343
|
+
* the "node-fetch" package and not in browsers. This is OK since browsers
|
|
1344
|
+
* will be importing umd-polyfill.js from that path "self" is passed the
|
|
1345
|
+
* decorator so the default value will not be used (because browsers that define
|
|
1346
|
+
* fetch also has Request). One quirky setup where self.fetch exists but
|
|
1347
|
+
* self.Request does not is when the "unfetch" minimal fetch polyfill is used
|
|
1348
|
+
* on top of IE11; for this case the browser will try to use the fetch.Request
|
|
1349
|
+
* default value which in turn will be undefined but then then "if (Request)"
|
|
1350
|
+
* will ensure that you get a patched fetch but still no Request (as expected).
|
|
1351
|
+
* @param {fetch, Request = fetch.Request}
|
|
1352
|
+
* @returns {fetch: abortableFetch, Request: AbortableRequest}
|
|
1353
|
+
*/
|
|
1354
|
+
function abortableFetchDecorator(patchTargets) {
|
|
1355
|
+
if ('function' === typeof patchTargets) {
|
|
1356
|
+
patchTargets = {
|
|
1357
|
+
fetch: patchTargets
|
|
1358
|
+
};
|
|
1359
|
+
}
|
|
1360
|
+
var _patchTargets = patchTargets,
|
|
1361
|
+
fetch = _patchTargets.fetch,
|
|
1362
|
+
_patchTargets$Request = _patchTargets.Request,
|
|
1363
|
+
NativeRequest = _patchTargets$Request === void 0 ? fetch.Request : _patchTargets$Request,
|
|
1364
|
+
NativeAbortController = _patchTargets.AbortController,
|
|
1365
|
+
_patchTargets$__FORCE = _patchTargets.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,
|
|
1366
|
+
__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL = _patchTargets$__FORCE === void 0 ? false : _patchTargets$__FORCE;
|
|
1367
|
+
if (!polyfillNeeded({
|
|
1368
|
+
fetch: fetch,
|
|
1369
|
+
Request: NativeRequest,
|
|
1370
|
+
AbortController: NativeAbortController,
|
|
1371
|
+
__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL: __FORCE_INSTALL_ABORTCONTROLLER_POLYFILL
|
|
1372
|
+
})) {
|
|
1373
|
+
return {
|
|
1374
|
+
fetch: fetch,
|
|
1375
|
+
Request: Request
|
|
1376
|
+
};
|
|
1377
|
+
}
|
|
1378
|
+
var Request = NativeRequest;
|
|
1379
|
+
// Note that the "unfetch" minimal fetch polyfill defines fetch() without
|
|
1380
|
+
// defining window.Request, and this polyfill need to work on top of unfetch
|
|
1381
|
+
// hence we only patch it if it's available. Also we don't patch it if signal
|
|
1382
|
+
// is already available on the Request prototype because in this case support
|
|
1383
|
+
// is present and the patching below can cause a crash since it assigns to
|
|
1384
|
+
// request.signal which is technically a read-only property. This latter error
|
|
1385
|
+
// happens when you run the main5.js node-fetch example in the repo
|
|
1386
|
+
// "abortcontroller-polyfill-examples". The exact error is:
|
|
1387
|
+
// request.signal = init.signal;
|
|
1388
|
+
// ^
|
|
1389
|
+
// TypeError: Cannot set property signal of #<Request> which has only a getter
|
|
1390
|
+
if (Request && !Request.prototype.hasOwnProperty('signal') || __FORCE_INSTALL_ABORTCONTROLLER_POLYFILL) {
|
|
1391
|
+
Request = function Request(input, init) {
|
|
1392
|
+
var signal;
|
|
1393
|
+
if (init && init.signal) {
|
|
1394
|
+
signal = init.signal;
|
|
1395
|
+
// Never pass init.signal to the native Request implementation when the polyfill has
|
|
1396
|
+
// been installed because if we're running on top of a browser with a
|
|
1397
|
+
// working native AbortController (i.e. the polyfill was installed due to
|
|
1398
|
+
// __FORCE_INSTALL_ABORTCONTROLLER_POLYFILL being set), then passing our
|
|
1399
|
+
// fake AbortSignal to the native fetch will trigger:
|
|
1400
|
+
// TypeError: Failed to construct 'Request': member signal is not of type AbortSignal.
|
|
1401
|
+
delete init.signal;
|
|
1402
|
+
}
|
|
1403
|
+
var request = new NativeRequest(input, init);
|
|
1404
|
+
if (signal) {
|
|
1405
|
+
Object.defineProperty(request, 'signal', {
|
|
1406
|
+
writable: false,
|
|
1407
|
+
enumerable: false,
|
|
1408
|
+
configurable: true,
|
|
1409
|
+
value: signal
|
|
1410
|
+
});
|
|
1411
|
+
}
|
|
1412
|
+
return request;
|
|
1413
|
+
};
|
|
1414
|
+
Request.prototype = NativeRequest.prototype;
|
|
1415
|
+
}
|
|
1416
|
+
var realFetch = fetch;
|
|
1417
|
+
var abortableFetch = function abortableFetch(input, init) {
|
|
1418
|
+
var signal = Request && Request.prototype.isPrototypeOf(input) ? input.signal : init ? init.signal : undefined;
|
|
1419
|
+
if (signal) {
|
|
1420
|
+
var abortError;
|
|
1421
|
+
try {
|
|
1422
|
+
abortError = new DOMException('Aborted', 'AbortError');
|
|
1423
|
+
} catch (err) {
|
|
1424
|
+
// IE 11 does not support calling the DOMException constructor, use a
|
|
1425
|
+
// regular error object on it instead.
|
|
1426
|
+
abortError = new Error('Aborted');
|
|
1427
|
+
abortError.name = 'AbortError';
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
// Return early if already aborted, thus avoiding making an HTTP request
|
|
1431
|
+
if (signal.aborted) {
|
|
1432
|
+
return Promise.reject(abortError);
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
// Turn an event into a promise, reject it once `abort` is dispatched
|
|
1436
|
+
var cancellation = new Promise(function (_, reject) {
|
|
1437
|
+
signal.addEventListener('abort', function () {
|
|
1438
|
+
return reject(abortError);
|
|
1439
|
+
}, {
|
|
1440
|
+
once: true
|
|
1441
|
+
});
|
|
1442
|
+
});
|
|
1443
|
+
if (init && init.signal) {
|
|
1444
|
+
// Never pass .signal to the native implementation when the polyfill has
|
|
1445
|
+
// been installed because if we're running on top of a browser with a
|
|
1446
|
+
// working native AbortController (i.e. the polyfill was installed due to
|
|
1447
|
+
// __FORCE_INSTALL_ABORTCONTROLLER_POLYFILL being set), then passing our
|
|
1448
|
+
// fake AbortSignal to the native fetch will trigger:
|
|
1449
|
+
// TypeError: Failed to execute 'fetch' on 'Window': member signal is not of type AbortSignal.
|
|
1450
|
+
delete init.signal;
|
|
1451
|
+
}
|
|
1452
|
+
// Return the fastest promise (don't need to wait for request to finish)
|
|
1453
|
+
return Promise.race([cancellation, realFetch(input, init)]);
|
|
1454
|
+
}
|
|
1455
|
+
return realFetch(input, init);
|
|
1456
|
+
};
|
|
1457
|
+
return {
|
|
1458
|
+
fetch: abortableFetch,
|
|
1459
|
+
Request: Request
|
|
1460
|
+
};
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
1464
|
+
// @ts-expect-error
|
|
1465
|
+
var needed = polyfillNeeded({
|
|
1466
|
+
fetch: window.fetch,
|
|
1467
|
+
Request: window.Request,
|
|
1468
|
+
AbortController: window.AbortController,
|
|
1469
|
+
});
|
|
1470
|
+
var polyfill = needed ? abortableFetchDecorator({
|
|
1471
|
+
fetch: window.fetch,
|
|
1472
|
+
Request: window.Request,
|
|
1473
|
+
AbortController: window.AbortController,
|
|
1474
|
+
}) : undefined;
|
|
1475
|
+
var fetch = needed ? polyfill.fetch : window.fetch;
|
|
1476
|
+
needed ? polyfill.Request : window.Request;
|
|
1477
|
+
|
|
1478
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
1479
|
+
|
|
1480
|
+
function getDefaultExportFromCjs (x) {
|
|
1481
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
var fails$9 = function fails(exec) {
|
|
1485
|
+
try {
|
|
1486
|
+
return !!exec();
|
|
1487
|
+
} catch (error) {
|
|
1488
|
+
return true;
|
|
1489
|
+
}
|
|
1490
|
+
};
|
|
1491
|
+
|
|
1492
|
+
var fails$8 = fails$9;
|
|
1493
|
+
var functionBindNative = !fails$8(function () {
|
|
1494
|
+
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
1495
|
+
var test = function () {/* empty */}.bind();
|
|
1496
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
1497
|
+
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
1498
|
+
});
|
|
1499
|
+
|
|
1500
|
+
var NATIVE_BIND$3 = functionBindNative;
|
|
1501
|
+
var FunctionPrototype$2 = Function.prototype;
|
|
1502
|
+
var call$9 = FunctionPrototype$2.call;
|
|
1503
|
+
var uncurryThisWithBind = NATIVE_BIND$3 && FunctionPrototype$2.bind.bind(call$9, call$9);
|
|
1504
|
+
var functionUncurryThis = NATIVE_BIND$3 ? uncurryThisWithBind : function (fn) {
|
|
1505
|
+
return function () {
|
|
1506
|
+
return call$9.apply(fn, arguments);
|
|
1507
|
+
};
|
|
1508
|
+
};
|
|
1509
|
+
|
|
1510
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
1511
|
+
var toString$2 = uncurryThis$8({}.toString);
|
|
1512
|
+
var stringSlice = uncurryThis$8(''.slice);
|
|
1513
|
+
var classofRaw$2 = function classofRaw(it) {
|
|
1514
|
+
return stringSlice(toString$2(it), 8, -1);
|
|
1515
|
+
};
|
|
1516
|
+
|
|
1517
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
1518
|
+
var fails$7 = fails$9;
|
|
1519
|
+
var classof$4 = classofRaw$2;
|
|
1520
|
+
var $Object$4 = Object;
|
|
1521
|
+
var split = uncurryThis$7(''.split);
|
|
1522
|
+
|
|
1523
|
+
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
1524
|
+
var indexedObject = fails$7(function () {
|
|
1525
|
+
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
1526
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
1527
|
+
return !$Object$4('z').propertyIsEnumerable(0);
|
|
1528
|
+
}) ? function (it) {
|
|
1529
|
+
return classof$4(it) == 'String' ? split(it, '') : $Object$4(it);
|
|
1530
|
+
} : $Object$4;
|
|
1531
|
+
|
|
1532
|
+
// we can't use just `it == null` since of `document.all` special case
|
|
1533
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
|
|
1534
|
+
var isNullOrUndefined$3 = function isNullOrUndefined(it) {
|
|
1535
|
+
return it === null || it === undefined;
|
|
1536
|
+
};
|
|
1537
|
+
|
|
1538
|
+
var isNullOrUndefined$2 = isNullOrUndefined$3;
|
|
1539
|
+
var $TypeError$7 = TypeError;
|
|
1540
|
+
|
|
1541
|
+
// `RequireObjectCoercible` abstract operation
|
|
1542
|
+
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
1543
|
+
var requireObjectCoercible$2 = function requireObjectCoercible(it) {
|
|
1544
|
+
if (isNullOrUndefined$2(it)) throw $TypeError$7("Can't call method on " + it);
|
|
1545
|
+
return it;
|
|
1546
|
+
};
|
|
1547
|
+
|
|
1548
|
+
// toObject with fallback for non-array-like ES3 strings
|
|
1549
|
+
var IndexedObject = indexedObject;
|
|
1550
|
+
var requireObjectCoercible$1 = requireObjectCoercible$2;
|
|
1551
|
+
var toIndexedObject$5 = function toIndexedObject(it) {
|
|
1552
|
+
return IndexedObject(requireObjectCoercible$1(it));
|
|
1553
|
+
};
|
|
1554
|
+
|
|
1555
|
+
var iterators = {};
|
|
1556
|
+
|
|
1557
|
+
function _typeof$7(o) { "@babel/helpers - typeof"; return _typeof$7 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$7(o); }
|
|
1558
|
+
var check = function check(it) {
|
|
1559
|
+
return it && it.Math == Math && it;
|
|
1560
|
+
};
|
|
1561
|
+
|
|
1562
|
+
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
1563
|
+
var global$c =
|
|
1564
|
+
// eslint-disable-next-line es/no-global-this -- safe
|
|
1565
|
+
check((typeof globalThis === "undefined" ? "undefined" : _typeof$7(globalThis)) == 'object' && globalThis) || check((typeof window === "undefined" ? "undefined" : _typeof$7(window)) == 'object' && window) ||
|
|
1566
|
+
// eslint-disable-next-line no-restricted-globals -- safe
|
|
1567
|
+
check((typeof self === "undefined" ? "undefined" : _typeof$7(self)) == 'object' && self) || check(_typeof$7(commonjsGlobal) == 'object' && commonjsGlobal) ||
|
|
1568
|
+
// eslint-disable-next-line no-new-func -- fallback
|
|
1569
|
+
function () {
|
|
1570
|
+
return this;
|
|
1571
|
+
}() || commonjsGlobal || Function('return this')();
|
|
1572
|
+
|
|
1573
|
+
function _typeof$6(o) { "@babel/helpers - typeof"; return _typeof$6 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$6(o); }
|
|
1574
|
+
var documentAll$2 = (typeof document === "undefined" ? "undefined" : _typeof$6(document)) == 'object' && document.all;
|
|
1575
|
+
|
|
1576
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
1577
|
+
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
1578
|
+
var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
|
|
1579
|
+
var documentAll_1 = {
|
|
1580
|
+
all: documentAll$2,
|
|
1581
|
+
IS_HTMLDDA: IS_HTMLDDA
|
|
1582
|
+
};
|
|
1583
|
+
|
|
1584
|
+
var $documentAll$1 = documentAll_1;
|
|
1585
|
+
var documentAll$1 = $documentAll$1.all;
|
|
1586
|
+
|
|
1587
|
+
// `IsCallable` abstract operation
|
|
1588
|
+
// https://tc39.es/ecma262/#sec-iscallable
|
|
1589
|
+
var isCallable$b = $documentAll$1.IS_HTMLDDA ? function (argument) {
|
|
1590
|
+
return typeof argument == 'function' || argument === documentAll$1;
|
|
1591
|
+
} : function (argument) {
|
|
1592
|
+
return typeof argument == 'function';
|
|
1593
|
+
};
|
|
1594
|
+
|
|
1595
|
+
var global$b = global$c;
|
|
1596
|
+
var isCallable$a = isCallable$b;
|
|
1597
|
+
var WeakMap$1 = global$b.WeakMap;
|
|
1598
|
+
var weakMapBasicDetection = isCallable$a(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
1599
|
+
|
|
1600
|
+
function _typeof$5(o) { "@babel/helpers - typeof"; return _typeof$5 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$5(o); }
|
|
1601
|
+
var isCallable$9 = isCallable$b;
|
|
1602
|
+
var $documentAll = documentAll_1;
|
|
1603
|
+
var documentAll = $documentAll.all;
|
|
1604
|
+
var isObject$6 = $documentAll.IS_HTMLDDA ? function (it) {
|
|
1605
|
+
return _typeof$5(it) == 'object' ? it !== null : isCallable$9(it) || it === documentAll;
|
|
1606
|
+
} : function (it) {
|
|
1607
|
+
return _typeof$5(it) == 'object' ? it !== null : isCallable$9(it);
|
|
1608
|
+
};
|
|
1609
|
+
|
|
1610
|
+
var fails$6 = fails$9;
|
|
1611
|
+
|
|
1612
|
+
// Detect IE8's incomplete defineProperty implementation
|
|
1613
|
+
var descriptors = !fails$6(function () {
|
|
1614
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1615
|
+
return Object.defineProperty({}, 1, {
|
|
1616
|
+
get: function get() {
|
|
1617
|
+
return 7;
|
|
1618
|
+
}
|
|
1619
|
+
})[1] != 7;
|
|
1620
|
+
});
|
|
1621
|
+
|
|
1622
|
+
var objectDefineProperty = {};
|
|
1623
|
+
|
|
1624
|
+
var global$a = global$c;
|
|
1625
|
+
var isObject$5 = isObject$6;
|
|
1626
|
+
var document$1 = global$a.document;
|
|
1627
|
+
// typeof document.createElement is 'object' in old IE
|
|
1628
|
+
var EXISTS$1 = isObject$5(document$1) && isObject$5(document$1.createElement);
|
|
1629
|
+
var documentCreateElement$1 = function documentCreateElement(it) {
|
|
1630
|
+
return EXISTS$1 ? document$1.createElement(it) : {};
|
|
1631
|
+
};
|
|
1632
|
+
|
|
1633
|
+
var DESCRIPTORS$6 = descriptors;
|
|
1634
|
+
var fails$5 = fails$9;
|
|
1635
|
+
var createElement = documentCreateElement$1;
|
|
1636
|
+
|
|
1637
|
+
// Thanks to IE8 for its funny defineProperty
|
|
1638
|
+
var ie8DomDefine = !DESCRIPTORS$6 && !fails$5(function () {
|
|
1639
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1640
|
+
return Object.defineProperty(createElement('div'), 'a', {
|
|
1641
|
+
get: function get() {
|
|
1642
|
+
return 7;
|
|
1643
|
+
}
|
|
1644
|
+
}).a != 7;
|
|
1645
|
+
});
|
|
1646
|
+
|
|
1647
|
+
var DESCRIPTORS$5 = descriptors;
|
|
1648
|
+
var fails$4 = fails$9;
|
|
1649
|
+
|
|
1650
|
+
// V8 ~ Chrome 36-
|
|
1651
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
1652
|
+
var v8PrototypeDefineBug = DESCRIPTORS$5 && fails$4(function () {
|
|
1653
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1654
|
+
return Object.defineProperty(function () {/* empty */}, 'prototype', {
|
|
1655
|
+
value: 42,
|
|
1656
|
+
writable: false
|
|
1657
|
+
}).prototype != 42;
|
|
1658
|
+
});
|
|
1659
|
+
|
|
1660
|
+
var isObject$4 = isObject$6;
|
|
1661
|
+
var $String$2 = String;
|
|
1662
|
+
var $TypeError$6 = TypeError;
|
|
1663
|
+
|
|
1664
|
+
// `Assert: Type(argument) is Object`
|
|
1665
|
+
var anObject$6 = function anObject(argument) {
|
|
1666
|
+
if (isObject$4(argument)) return argument;
|
|
1667
|
+
throw $TypeError$6($String$2(argument) + ' is not an object');
|
|
1668
|
+
};
|
|
1669
|
+
|
|
1670
|
+
var NATIVE_BIND$2 = functionBindNative;
|
|
1671
|
+
var call$8 = Function.prototype.call;
|
|
1672
|
+
var functionCall = NATIVE_BIND$2 ? call$8.bind(call$8) : function () {
|
|
1673
|
+
return call$8.apply(call$8, arguments);
|
|
1674
|
+
};
|
|
1675
|
+
|
|
1676
|
+
var path$3 = {};
|
|
1677
|
+
|
|
1678
|
+
var path$2 = path$3;
|
|
1679
|
+
var global$9 = global$c;
|
|
1680
|
+
var isCallable$8 = isCallable$b;
|
|
1681
|
+
var aFunction = function aFunction(variable) {
|
|
1682
|
+
return isCallable$8(variable) ? variable : undefined;
|
|
1683
|
+
};
|
|
1684
|
+
var getBuiltIn$2 = function getBuiltIn(namespace, method) {
|
|
1685
|
+
return arguments.length < 2 ? aFunction(path$2[namespace]) || aFunction(global$9[namespace]) : path$2[namespace] && path$2[namespace][method] || global$9[namespace] && global$9[namespace][method];
|
|
1686
|
+
};
|
|
1687
|
+
|
|
1688
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
1689
|
+
var objectIsPrototypeOf = uncurryThis$6({}.isPrototypeOf);
|
|
1690
|
+
|
|
1691
|
+
var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
|
|
1692
|
+
|
|
1693
|
+
var global$8 = global$c;
|
|
1694
|
+
var userAgent = engineUserAgent;
|
|
1695
|
+
var process = global$8.process;
|
|
1696
|
+
var Deno = global$8.Deno;
|
|
1697
|
+
var versions = process && process.versions || Deno && Deno.version;
|
|
1698
|
+
var v8 = versions && versions.v8;
|
|
1699
|
+
var match, version;
|
|
1700
|
+
if (v8) {
|
|
1701
|
+
match = v8.split('.');
|
|
1702
|
+
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
1703
|
+
// but their correct versions are not interesting for us
|
|
1704
|
+
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
1708
|
+
// so check `userAgent` even if `.v8` exists, but 0
|
|
1709
|
+
if (!version && userAgent) {
|
|
1710
|
+
match = userAgent.match(/Edge\/(\d+)/);
|
|
1711
|
+
if (!match || match[1] >= 74) {
|
|
1712
|
+
match = userAgent.match(/Chrome\/(\d+)/);
|
|
1713
|
+
if (match) version = +match[1];
|
|
1714
|
+
}
|
|
1715
|
+
}
|
|
1716
|
+
var engineV8Version = version;
|
|
1717
|
+
|
|
1718
|
+
/* eslint-disable es/no-symbol -- required for testing */
|
|
1719
|
+
var V8_VERSION = engineV8Version;
|
|
1720
|
+
var fails$3 = fails$9;
|
|
1721
|
+
var global$7 = global$c;
|
|
1722
|
+
var $String$1 = global$7.String;
|
|
1723
|
+
|
|
1724
|
+
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
1725
|
+
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$3(function () {
|
|
1726
|
+
var symbol = Symbol();
|
|
1727
|
+
// Chrome 38 Symbol has incorrect toString conversion
|
|
1728
|
+
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
1729
|
+
// nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
|
|
1730
|
+
// of course, fail.
|
|
1731
|
+
return !$String$1(symbol) || !(Object(symbol) instanceof Symbol) ||
|
|
1732
|
+
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
1733
|
+
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
|
|
1734
|
+
});
|
|
1735
|
+
|
|
1736
|
+
function _typeof$4(o) { "@babel/helpers - typeof"; return _typeof$4 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$4(o); }
|
|
1737
|
+
var NATIVE_SYMBOL$1 = symbolConstructorDetection;
|
|
1738
|
+
var useSymbolAsUid = NATIVE_SYMBOL$1 && !Symbol.sham && _typeof$4(Symbol.iterator) == 'symbol';
|
|
1739
|
+
|
|
1740
|
+
function _typeof$3(o) { "@babel/helpers - typeof"; return _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$3(o); }
|
|
1741
|
+
var getBuiltIn$1 = getBuiltIn$2;
|
|
1742
|
+
var isCallable$7 = isCallable$b;
|
|
1743
|
+
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
1744
|
+
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
1745
|
+
var $Object$3 = Object;
|
|
1746
|
+
var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
|
|
1747
|
+
return _typeof$3(it) == 'symbol';
|
|
1748
|
+
} : function (it) {
|
|
1749
|
+
var $Symbol = getBuiltIn$1('Symbol');
|
|
1750
|
+
return isCallable$7($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$3(it));
|
|
1751
|
+
};
|
|
1752
|
+
|
|
1753
|
+
var $String = String;
|
|
1754
|
+
var tryToString$3 = function tryToString(argument) {
|
|
1755
|
+
try {
|
|
1756
|
+
return $String(argument);
|
|
1757
|
+
} catch (error) {
|
|
1758
|
+
return 'Object';
|
|
1759
|
+
}
|
|
1760
|
+
};
|
|
1761
|
+
|
|
1762
|
+
var isCallable$6 = isCallable$b;
|
|
1763
|
+
var tryToString$2 = tryToString$3;
|
|
1764
|
+
var $TypeError$5 = TypeError;
|
|
1765
|
+
|
|
1766
|
+
// `Assert: IsCallable(argument) is true`
|
|
1767
|
+
var aCallable$3 = function aCallable(argument) {
|
|
1768
|
+
if (isCallable$6(argument)) return argument;
|
|
1769
|
+
throw $TypeError$5(tryToString$2(argument) + ' is not a function');
|
|
1770
|
+
};
|
|
1771
|
+
|
|
1772
|
+
var aCallable$2 = aCallable$3;
|
|
1773
|
+
var isNullOrUndefined$1 = isNullOrUndefined$3;
|
|
1774
|
+
|
|
1775
|
+
// `GetMethod` abstract operation
|
|
1776
|
+
// https://tc39.es/ecma262/#sec-getmethod
|
|
1777
|
+
var getMethod$3 = function getMethod(V, P) {
|
|
1778
|
+
var func = V[P];
|
|
1779
|
+
return isNullOrUndefined$1(func) ? undefined : aCallable$2(func);
|
|
1780
|
+
};
|
|
1781
|
+
|
|
1782
|
+
var call$7 = functionCall;
|
|
1783
|
+
var isCallable$5 = isCallable$b;
|
|
1784
|
+
var isObject$3 = isObject$6;
|
|
1785
|
+
var $TypeError$4 = TypeError;
|
|
1786
|
+
|
|
1787
|
+
// `OrdinaryToPrimitive` abstract operation
|
|
1788
|
+
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
1789
|
+
var ordinaryToPrimitive$1 = function ordinaryToPrimitive(input, pref) {
|
|
1790
|
+
var fn, val;
|
|
1791
|
+
if (pref === 'string' && isCallable$5(fn = input.toString) && !isObject$3(val = call$7(fn, input))) return val;
|
|
1792
|
+
if (isCallable$5(fn = input.valueOf) && !isObject$3(val = call$7(fn, input))) return val;
|
|
1793
|
+
if (pref !== 'string' && isCallable$5(fn = input.toString) && !isObject$3(val = call$7(fn, input))) return val;
|
|
1794
|
+
throw $TypeError$4("Can't convert object to primitive value");
|
|
1795
|
+
};
|
|
1796
|
+
|
|
1797
|
+
var shared$3 = {exports: {}};
|
|
1798
|
+
|
|
1799
|
+
var global$6 = global$c;
|
|
1800
|
+
|
|
1801
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
1802
|
+
var defineProperty$1 = Object.defineProperty;
|
|
1803
|
+
var defineGlobalProperty$1 = function defineGlobalProperty(key, value) {
|
|
1804
|
+
try {
|
|
1805
|
+
defineProperty$1(global$6, key, {
|
|
1806
|
+
value: value,
|
|
1807
|
+
configurable: true,
|
|
1808
|
+
writable: true
|
|
1809
|
+
});
|
|
1810
|
+
} catch (error) {
|
|
1811
|
+
global$6[key] = value;
|
|
1812
|
+
}
|
|
1813
|
+
return value;
|
|
1814
|
+
};
|
|
1815
|
+
|
|
1816
|
+
var global$5 = global$c;
|
|
1817
|
+
var defineGlobalProperty = defineGlobalProperty$1;
|
|
1818
|
+
var SHARED = '__core-js_shared__';
|
|
1819
|
+
var store$2 = global$5[SHARED] || defineGlobalProperty(SHARED, {});
|
|
1820
|
+
var sharedStore = store$2;
|
|
1821
|
+
|
|
1822
|
+
var store$1 = sharedStore;
|
|
1823
|
+
(shared$3.exports = function (key, value) {
|
|
1824
|
+
return store$1[key] || (store$1[key] = value !== undefined ? value : {});
|
|
1825
|
+
})('versions', []).push({
|
|
1826
|
+
version: '3.31.0',
|
|
1827
|
+
mode: 'pure' ,
|
|
1828
|
+
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
|
|
1829
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.31.0/LICENSE',
|
|
1830
|
+
source: 'https://github.com/zloirock/core-js'
|
|
1831
|
+
});
|
|
1832
|
+
var sharedExports = shared$3.exports;
|
|
1833
|
+
|
|
1834
|
+
var requireObjectCoercible = requireObjectCoercible$2;
|
|
1835
|
+
var $Object$2 = Object;
|
|
1836
|
+
|
|
1837
|
+
// `ToObject` abstract operation
|
|
1838
|
+
// https://tc39.es/ecma262/#sec-toobject
|
|
1839
|
+
var toObject$2 = function toObject(argument) {
|
|
1840
|
+
return $Object$2(requireObjectCoercible(argument));
|
|
1841
|
+
};
|
|
1842
|
+
|
|
1843
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
1844
|
+
var toObject$1 = toObject$2;
|
|
1845
|
+
var hasOwnProperty = uncurryThis$5({}.hasOwnProperty);
|
|
1846
|
+
|
|
1847
|
+
// `HasOwnProperty` abstract operation
|
|
1848
|
+
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
1849
|
+
// eslint-disable-next-line es/no-object-hasown -- safe
|
|
1850
|
+
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
1851
|
+
return hasOwnProperty(toObject$1(it), key);
|
|
1852
|
+
};
|
|
1853
|
+
|
|
1854
|
+
var uncurryThis$4 = functionUncurryThis;
|
|
1855
|
+
var id = 0;
|
|
1856
|
+
var postfix = Math.random();
|
|
1857
|
+
var toString$1 = uncurryThis$4(1.0.toString);
|
|
1858
|
+
var uid$2 = function uid(key) {
|
|
1859
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$1(++id + postfix, 36);
|
|
1860
|
+
};
|
|
1861
|
+
|
|
1862
|
+
var global$4 = global$c;
|
|
1863
|
+
var shared$2 = sharedExports;
|
|
1864
|
+
var hasOwn$7 = hasOwnProperty_1;
|
|
1865
|
+
var uid$1 = uid$2;
|
|
1866
|
+
var NATIVE_SYMBOL = symbolConstructorDetection;
|
|
1867
|
+
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
1868
|
+
var _Symbol = global$4.Symbol;
|
|
1869
|
+
var WellKnownSymbolsStore = shared$2('wks');
|
|
1870
|
+
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? _Symbol['for'] || _Symbol : _Symbol && _Symbol.withoutSetter || uid$1;
|
|
1871
|
+
var wellKnownSymbol$9 = function wellKnownSymbol(name) {
|
|
1872
|
+
if (!hasOwn$7(WellKnownSymbolsStore, name)) {
|
|
1873
|
+
WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$7(_Symbol, name) ? _Symbol[name] : createWellKnownSymbol('Symbol.' + name);
|
|
1874
|
+
}
|
|
1875
|
+
return WellKnownSymbolsStore[name];
|
|
1876
|
+
};
|
|
1877
|
+
|
|
1878
|
+
var call$6 = functionCall;
|
|
1879
|
+
var isObject$2 = isObject$6;
|
|
1880
|
+
var isSymbol$1 = isSymbol$2;
|
|
1881
|
+
var getMethod$2 = getMethod$3;
|
|
1882
|
+
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
1883
|
+
var wellKnownSymbol$8 = wellKnownSymbol$9;
|
|
1884
|
+
var $TypeError$3 = TypeError;
|
|
1885
|
+
var TO_PRIMITIVE = wellKnownSymbol$8('toPrimitive');
|
|
1886
|
+
|
|
1887
|
+
// `ToPrimitive` abstract operation
|
|
1888
|
+
// https://tc39.es/ecma262/#sec-toprimitive
|
|
1889
|
+
var toPrimitive$1 = function toPrimitive(input, pref) {
|
|
1890
|
+
if (!isObject$2(input) || isSymbol$1(input)) return input;
|
|
1891
|
+
var exoticToPrim = getMethod$2(input, TO_PRIMITIVE);
|
|
1892
|
+
var result;
|
|
1893
|
+
if (exoticToPrim) {
|
|
1894
|
+
if (pref === undefined) pref = 'default';
|
|
1895
|
+
result = call$6(exoticToPrim, input, pref);
|
|
1896
|
+
if (!isObject$2(result) || isSymbol$1(result)) return result;
|
|
1897
|
+
throw $TypeError$3("Can't convert object to primitive value");
|
|
1898
|
+
}
|
|
1899
|
+
if (pref === undefined) pref = 'number';
|
|
1900
|
+
return ordinaryToPrimitive(input, pref);
|
|
1901
|
+
};
|
|
1902
|
+
|
|
1903
|
+
var toPrimitive = toPrimitive$1;
|
|
1904
|
+
var isSymbol = isSymbol$2;
|
|
1905
|
+
|
|
1906
|
+
// `ToPropertyKey` abstract operation
|
|
1907
|
+
// https://tc39.es/ecma262/#sec-topropertykey
|
|
1908
|
+
var toPropertyKey$3 = function toPropertyKey(argument) {
|
|
1909
|
+
var key = toPrimitive(argument, 'string');
|
|
1910
|
+
return isSymbol(key) ? key : key + '';
|
|
1911
|
+
};
|
|
1912
|
+
|
|
1913
|
+
var DESCRIPTORS$4 = descriptors;
|
|
1914
|
+
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
1915
|
+
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
1916
|
+
var anObject$5 = anObject$6;
|
|
1917
|
+
var toPropertyKey$2 = toPropertyKey$3;
|
|
1918
|
+
var $TypeError$2 = TypeError;
|
|
1919
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
1920
|
+
var $defineProperty = Object.defineProperty;
|
|
1921
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1922
|
+
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
1923
|
+
var ENUMERABLE = 'enumerable';
|
|
1924
|
+
var CONFIGURABLE$1 = 'configurable';
|
|
1925
|
+
var WRITABLE = 'writable';
|
|
1926
|
+
|
|
1927
|
+
// `Object.defineProperty` method
|
|
1928
|
+
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
1929
|
+
objectDefineProperty.f = DESCRIPTORS$4 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
1930
|
+
anObject$5(O);
|
|
1931
|
+
P = toPropertyKey$2(P);
|
|
1932
|
+
anObject$5(Attributes);
|
|
1933
|
+
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
1934
|
+
var current = $getOwnPropertyDescriptor$1(O, P);
|
|
1935
|
+
if (current && current[WRITABLE]) {
|
|
1936
|
+
O[P] = Attributes.value;
|
|
1937
|
+
Attributes = {
|
|
1938
|
+
configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
|
|
1939
|
+
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
|
1940
|
+
writable: false
|
|
1941
|
+
};
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1944
|
+
return $defineProperty(O, P, Attributes);
|
|
1945
|
+
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
1946
|
+
anObject$5(O);
|
|
1947
|
+
P = toPropertyKey$2(P);
|
|
1948
|
+
anObject$5(Attributes);
|
|
1949
|
+
if (IE8_DOM_DEFINE$1) try {
|
|
1950
|
+
return $defineProperty(O, P, Attributes);
|
|
1951
|
+
} catch (error) {/* empty */}
|
|
1952
|
+
if ('get' in Attributes || 'set' in Attributes) throw $TypeError$2('Accessors not supported');
|
|
1953
|
+
if ('value' in Attributes) O[P] = Attributes.value;
|
|
1954
|
+
return O;
|
|
1955
|
+
};
|
|
1956
|
+
|
|
1957
|
+
var createPropertyDescriptor$4 = function createPropertyDescriptor(bitmap, value) {
|
|
1958
|
+
return {
|
|
1959
|
+
enumerable: !(bitmap & 1),
|
|
1960
|
+
configurable: !(bitmap & 2),
|
|
1961
|
+
writable: !(bitmap & 4),
|
|
1962
|
+
value: value
|
|
1963
|
+
};
|
|
1964
|
+
};
|
|
1965
|
+
|
|
1966
|
+
var DESCRIPTORS$3 = descriptors;
|
|
1967
|
+
var definePropertyModule$2 = objectDefineProperty;
|
|
1968
|
+
var createPropertyDescriptor$3 = createPropertyDescriptor$4;
|
|
1969
|
+
var createNonEnumerableProperty$5 = DESCRIPTORS$3 ? function (object, key, value) {
|
|
1970
|
+
return definePropertyModule$2.f(object, key, createPropertyDescriptor$3(1, value));
|
|
1971
|
+
} : function (object, key, value) {
|
|
1972
|
+
object[key] = value;
|
|
1973
|
+
return object;
|
|
1974
|
+
};
|
|
1975
|
+
|
|
1976
|
+
var shared$1 = sharedExports;
|
|
1977
|
+
var uid = uid$2;
|
|
1978
|
+
var keys = shared$1('keys');
|
|
1979
|
+
var sharedKey$3 = function sharedKey(key) {
|
|
1980
|
+
return keys[key] || (keys[key] = uid(key));
|
|
1981
|
+
};
|
|
1982
|
+
|
|
1983
|
+
var hiddenKeys$3 = {};
|
|
1984
|
+
|
|
1985
|
+
var NATIVE_WEAK_MAP = weakMapBasicDetection;
|
|
1986
|
+
var global$3 = global$c;
|
|
1987
|
+
var isObject$1 = isObject$6;
|
|
1988
|
+
var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
|
|
1989
|
+
var hasOwn$6 = hasOwnProperty_1;
|
|
1990
|
+
var shared = sharedStore;
|
|
1991
|
+
var sharedKey$2 = sharedKey$3;
|
|
1992
|
+
var hiddenKeys$2 = hiddenKeys$3;
|
|
1993
|
+
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
1994
|
+
var TypeError$1 = global$3.TypeError;
|
|
1995
|
+
var WeakMap = global$3.WeakMap;
|
|
1996
|
+
var set, get, has;
|
|
1997
|
+
var enforce = function enforce(it) {
|
|
1998
|
+
return has(it) ? get(it) : set(it, {});
|
|
1999
|
+
};
|
|
2000
|
+
var getterFor = function getterFor(TYPE) {
|
|
2001
|
+
return function (it) {
|
|
2002
|
+
var state;
|
|
2003
|
+
if (!isObject$1(it) || (state = get(it)).type !== TYPE) {
|
|
2004
|
+
throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
|
|
2005
|
+
}
|
|
2006
|
+
return state;
|
|
2007
|
+
};
|
|
2008
|
+
};
|
|
2009
|
+
if (NATIVE_WEAK_MAP || shared.state) {
|
|
2010
|
+
var store = shared.state || (shared.state = new WeakMap());
|
|
2011
|
+
/* eslint-disable no-self-assign -- prototype methods protection */
|
|
2012
|
+
store.get = store.get;
|
|
2013
|
+
store.has = store.has;
|
|
2014
|
+
store.set = store.set;
|
|
2015
|
+
/* eslint-enable no-self-assign -- prototype methods protection */
|
|
2016
|
+
set = function set(it, metadata) {
|
|
2017
|
+
if (store.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
2018
|
+
metadata.facade = it;
|
|
2019
|
+
store.set(it, metadata);
|
|
2020
|
+
return metadata;
|
|
2021
|
+
};
|
|
2022
|
+
get = function get(it) {
|
|
2023
|
+
return store.get(it) || {};
|
|
2024
|
+
};
|
|
2025
|
+
has = function has(it) {
|
|
2026
|
+
return store.has(it);
|
|
2027
|
+
};
|
|
2028
|
+
} else {
|
|
2029
|
+
var STATE = sharedKey$2('state');
|
|
2030
|
+
hiddenKeys$2[STATE] = true;
|
|
2031
|
+
set = function set(it, metadata) {
|
|
2032
|
+
if (hasOwn$6(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
2033
|
+
metadata.facade = it;
|
|
2034
|
+
createNonEnumerableProperty$4(it, STATE, metadata);
|
|
2035
|
+
return metadata;
|
|
2036
|
+
};
|
|
2037
|
+
get = function get(it) {
|
|
2038
|
+
return hasOwn$6(it, STATE) ? it[STATE] : {};
|
|
2039
|
+
};
|
|
2040
|
+
has = function has(it) {
|
|
2041
|
+
return hasOwn$6(it, STATE);
|
|
2042
|
+
};
|
|
2043
|
+
}
|
|
2044
|
+
var internalState = {
|
|
2045
|
+
set: set,
|
|
2046
|
+
get: get,
|
|
2047
|
+
has: has,
|
|
2048
|
+
enforce: enforce,
|
|
2049
|
+
getterFor: getterFor
|
|
2050
|
+
};
|
|
2051
|
+
|
|
2052
|
+
function _typeof$2(o) { "@babel/helpers - typeof"; return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$2(o); }
|
|
2053
|
+
var NATIVE_BIND$1 = functionBindNative;
|
|
2054
|
+
var FunctionPrototype$1 = Function.prototype;
|
|
2055
|
+
var apply$1 = FunctionPrototype$1.apply;
|
|
2056
|
+
var call$5 = FunctionPrototype$1.call;
|
|
2057
|
+
|
|
2058
|
+
// eslint-disable-next-line es/no-reflect -- safe
|
|
2059
|
+
var functionApply = (typeof Reflect === "undefined" ? "undefined" : _typeof$2(Reflect)) == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$5.bind(apply$1) : function () {
|
|
2060
|
+
return call$5.apply(apply$1, arguments);
|
|
2061
|
+
});
|
|
2062
|
+
|
|
2063
|
+
var classofRaw$1 = classofRaw$2;
|
|
2064
|
+
var uncurryThis$3 = functionUncurryThis;
|
|
2065
|
+
var functionUncurryThisClause = function functionUncurryThisClause(fn) {
|
|
2066
|
+
// Nashorn bug:
|
|
2067
|
+
// https://github.com/zloirock/core-js/issues/1128
|
|
2068
|
+
// https://github.com/zloirock/core-js/issues/1130
|
|
2069
|
+
if (classofRaw$1(fn) === 'Function') return uncurryThis$3(fn);
|
|
2070
|
+
};
|
|
2071
|
+
|
|
2072
|
+
var objectGetOwnPropertyDescriptor = {};
|
|
2073
|
+
|
|
2074
|
+
var objectPropertyIsEnumerable = {};
|
|
2075
|
+
|
|
2076
|
+
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
2077
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
2078
|
+
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
2079
|
+
|
|
2080
|
+
// Nashorn ~ JDK8 bug
|
|
2081
|
+
var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({
|
|
2082
|
+
1: 2
|
|
2083
|
+
}, 1);
|
|
2084
|
+
|
|
2085
|
+
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
2086
|
+
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
2087
|
+
objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
2088
|
+
var descriptor = getOwnPropertyDescriptor$1(this, V);
|
|
2089
|
+
return !!descriptor && descriptor.enumerable;
|
|
2090
|
+
} : $propertyIsEnumerable;
|
|
2091
|
+
|
|
2092
|
+
var DESCRIPTORS$2 = descriptors;
|
|
2093
|
+
var call$4 = functionCall;
|
|
2094
|
+
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
2095
|
+
var createPropertyDescriptor$2 = createPropertyDescriptor$4;
|
|
2096
|
+
var toIndexedObject$4 = toIndexedObject$5;
|
|
2097
|
+
var toPropertyKey$1 = toPropertyKey$3;
|
|
2098
|
+
var hasOwn$5 = hasOwnProperty_1;
|
|
2099
|
+
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
2100
|
+
|
|
2101
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
2102
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
2103
|
+
|
|
2104
|
+
// `Object.getOwnPropertyDescriptor` method
|
|
2105
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
2106
|
+
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$2 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
|
2107
|
+
O = toIndexedObject$4(O);
|
|
2108
|
+
P = toPropertyKey$1(P);
|
|
2109
|
+
if (IE8_DOM_DEFINE) try {
|
|
2110
|
+
return $getOwnPropertyDescriptor(O, P);
|
|
2111
|
+
} catch (error) {/* empty */}
|
|
2112
|
+
if (hasOwn$5(O, P)) return createPropertyDescriptor$2(!call$4(propertyIsEnumerableModule.f, O, P), O[P]);
|
|
2113
|
+
};
|
|
2114
|
+
|
|
2115
|
+
var fails$2 = fails$9;
|
|
2116
|
+
var isCallable$4 = isCallable$b;
|
|
2117
|
+
var replacement = /#|\.prototype\./;
|
|
2118
|
+
var isForced$1 = function isForced(feature, detection) {
|
|
2119
|
+
var value = data[normalize(feature)];
|
|
2120
|
+
return value == POLYFILL ? true : value == NATIVE ? false : isCallable$4(detection) ? fails$2(detection) : !!detection;
|
|
2121
|
+
};
|
|
2122
|
+
var normalize = isForced$1.normalize = function (string) {
|
|
2123
|
+
return String(string).replace(replacement, '.').toLowerCase();
|
|
2124
|
+
};
|
|
2125
|
+
var data = isForced$1.data = {};
|
|
2126
|
+
var NATIVE = isForced$1.NATIVE = 'N';
|
|
2127
|
+
var POLYFILL = isForced$1.POLYFILL = 'P';
|
|
2128
|
+
var isForced_1 = isForced$1;
|
|
2129
|
+
|
|
2130
|
+
var uncurryThis$2 = functionUncurryThisClause;
|
|
2131
|
+
var aCallable$1 = aCallable$3;
|
|
2132
|
+
var NATIVE_BIND = functionBindNative;
|
|
2133
|
+
var bind$2 = uncurryThis$2(uncurryThis$2.bind);
|
|
2134
|
+
|
|
2135
|
+
// optional / simple context binding
|
|
2136
|
+
var functionBindContext = function functionBindContext(fn, that) {
|
|
2137
|
+
aCallable$1(fn);
|
|
2138
|
+
return that === undefined ? fn : NATIVE_BIND ? bind$2(fn, that) : function /* ...args */
|
|
2139
|
+
() {
|
|
2140
|
+
return fn.apply(that, arguments);
|
|
2141
|
+
};
|
|
2142
|
+
};
|
|
2143
|
+
|
|
2144
|
+
function _typeof$1(o) { "@babel/helpers - typeof"; return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$1(o); }
|
|
2145
|
+
var global$2 = global$c;
|
|
2146
|
+
var apply = functionApply;
|
|
2147
|
+
var uncurryThis$1 = functionUncurryThisClause;
|
|
2148
|
+
var isCallable$3 = isCallable$b;
|
|
2149
|
+
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
2150
|
+
var isForced = isForced_1;
|
|
2151
|
+
var path$1 = path$3;
|
|
2152
|
+
var bind$1 = functionBindContext;
|
|
2153
|
+
var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
|
|
2154
|
+
var hasOwn$4 = hasOwnProperty_1;
|
|
2155
|
+
var wrapConstructor = function wrapConstructor(NativeConstructor) {
|
|
2156
|
+
var Wrapper = function Wrapper(a, b, c) {
|
|
2157
|
+
if (this instanceof Wrapper) {
|
|
2158
|
+
switch (arguments.length) {
|
|
2159
|
+
case 0:
|
|
2160
|
+
return new NativeConstructor();
|
|
2161
|
+
case 1:
|
|
2162
|
+
return new NativeConstructor(a);
|
|
2163
|
+
case 2:
|
|
2164
|
+
return new NativeConstructor(a, b);
|
|
2165
|
+
}
|
|
2166
|
+
return new NativeConstructor(a, b, c);
|
|
2167
|
+
}
|
|
2168
|
+
return apply(NativeConstructor, this, arguments);
|
|
2169
|
+
};
|
|
2170
|
+
Wrapper.prototype = NativeConstructor.prototype;
|
|
2171
|
+
return Wrapper;
|
|
2172
|
+
};
|
|
2173
|
+
|
|
2174
|
+
/*
|
|
2175
|
+
options.target - name of the target object
|
|
2176
|
+
options.global - target is the global object
|
|
2177
|
+
options.stat - export as static methods of target
|
|
2178
|
+
options.proto - export as prototype methods of target
|
|
2179
|
+
options.real - real prototype method for the `pure` version
|
|
2180
|
+
options.forced - export even if the native feature is available
|
|
2181
|
+
options.bind - bind methods to the target, required for the `pure` version
|
|
2182
|
+
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
2183
|
+
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
2184
|
+
options.sham - add a flag to not completely full polyfills
|
|
2185
|
+
options.enumerable - export as enumerable property
|
|
2186
|
+
options.dontCallGetSet - prevent calling a getter on target
|
|
2187
|
+
options.name - the .name of the function if it does not match the key
|
|
2188
|
+
*/
|
|
2189
|
+
var _export = function _export(options, source) {
|
|
2190
|
+
var TARGET = options.target;
|
|
2191
|
+
var GLOBAL = options.global;
|
|
2192
|
+
var STATIC = options.stat;
|
|
2193
|
+
var PROTO = options.proto;
|
|
2194
|
+
var nativeSource = GLOBAL ? global$2 : STATIC ? global$2[TARGET] : (global$2[TARGET] || {}).prototype;
|
|
2195
|
+
var target = GLOBAL ? path$1 : path$1[TARGET] || createNonEnumerableProperty$3(path$1, TARGET, {})[TARGET];
|
|
2196
|
+
var targetPrototype = target.prototype;
|
|
2197
|
+
var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE;
|
|
2198
|
+
var key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor;
|
|
2199
|
+
for (key in source) {
|
|
2200
|
+
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
2201
|
+
// contains in native
|
|
2202
|
+
USE_NATIVE = !FORCED && nativeSource && hasOwn$4(nativeSource, key);
|
|
2203
|
+
targetProperty = target[key];
|
|
2204
|
+
if (USE_NATIVE) if (options.dontCallGetSet) {
|
|
2205
|
+
descriptor = getOwnPropertyDescriptor(nativeSource, key);
|
|
2206
|
+
nativeProperty = descriptor && descriptor.value;
|
|
2207
|
+
} else nativeProperty = nativeSource[key];
|
|
2208
|
+
|
|
2209
|
+
// export native or implementation
|
|
2210
|
+
sourceProperty = USE_NATIVE && nativeProperty ? nativeProperty : source[key];
|
|
2211
|
+
if (USE_NATIVE && _typeof$1(targetProperty) == _typeof$1(sourceProperty)) continue;
|
|
2212
|
+
|
|
2213
|
+
// bind methods to global for calling from export context
|
|
2214
|
+
if (options.bind && USE_NATIVE) resultProperty = bind$1(sourceProperty, global$2);
|
|
2215
|
+
// wrap global constructors for prevent changes in this version
|
|
2216
|
+
else if (options.wrap && USE_NATIVE) resultProperty = wrapConstructor(sourceProperty);
|
|
2217
|
+
// make static versions for prototype methods
|
|
2218
|
+
else if (PROTO && isCallable$3(sourceProperty)) resultProperty = uncurryThis$1(sourceProperty);
|
|
2219
|
+
// default case
|
|
2220
|
+
else resultProperty = sourceProperty;
|
|
2221
|
+
|
|
2222
|
+
// add a flag to not completely full polyfills
|
|
2223
|
+
if (options.sham || sourceProperty && sourceProperty.sham || targetProperty && targetProperty.sham) {
|
|
2224
|
+
createNonEnumerableProperty$3(resultProperty, 'sham', true);
|
|
2225
|
+
}
|
|
2226
|
+
createNonEnumerableProperty$3(target, key, resultProperty);
|
|
2227
|
+
if (PROTO) {
|
|
2228
|
+
VIRTUAL_PROTOTYPE = TARGET + 'Prototype';
|
|
2229
|
+
if (!hasOwn$4(path$1, VIRTUAL_PROTOTYPE)) {
|
|
2230
|
+
createNonEnumerableProperty$3(path$1, VIRTUAL_PROTOTYPE, {});
|
|
2231
|
+
}
|
|
2232
|
+
// export virtual prototype methods
|
|
2233
|
+
createNonEnumerableProperty$3(path$1[VIRTUAL_PROTOTYPE], key, sourceProperty);
|
|
2234
|
+
// export real prototype methods
|
|
2235
|
+
if (options.real && targetPrototype && (FORCED || !targetPrototype[key])) {
|
|
2236
|
+
createNonEnumerableProperty$3(targetPrototype, key, sourceProperty);
|
|
2237
|
+
}
|
|
2238
|
+
}
|
|
2239
|
+
}
|
|
2240
|
+
};
|
|
2241
|
+
|
|
2242
|
+
var DESCRIPTORS$1 = descriptors;
|
|
2243
|
+
var hasOwn$3 = hasOwnProperty_1;
|
|
2244
|
+
var FunctionPrototype = Function.prototype;
|
|
2245
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
2246
|
+
var getDescriptor = DESCRIPTORS$1 && Object.getOwnPropertyDescriptor;
|
|
2247
|
+
var EXISTS = hasOwn$3(FunctionPrototype, 'name');
|
|
2248
|
+
// additional protection from minified / mangled / dropped function names
|
|
2249
|
+
var PROPER = EXISTS && function something() {/* empty */}.name === 'something';
|
|
2250
|
+
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$1 || DESCRIPTORS$1 && getDescriptor(FunctionPrototype, 'name').configurable);
|
|
2251
|
+
var functionName = {
|
|
2252
|
+
EXISTS: EXISTS,
|
|
2253
|
+
PROPER: PROPER,
|
|
2254
|
+
CONFIGURABLE: CONFIGURABLE
|
|
2255
|
+
};
|
|
2256
|
+
|
|
2257
|
+
var objectDefineProperties = {};
|
|
2258
|
+
|
|
2259
|
+
var ceil = Math.ceil;
|
|
2260
|
+
var floor = Math.floor;
|
|
2261
|
+
|
|
2262
|
+
// `Math.trunc` method
|
|
2263
|
+
// https://tc39.es/ecma262/#sec-math.trunc
|
|
2264
|
+
// eslint-disable-next-line es/no-math-trunc -- safe
|
|
2265
|
+
var mathTrunc = Math.trunc || function trunc(x) {
|
|
2266
|
+
var n = +x;
|
|
2267
|
+
return (n > 0 ? floor : ceil)(n);
|
|
2268
|
+
};
|
|
2269
|
+
|
|
2270
|
+
var trunc = mathTrunc;
|
|
2271
|
+
|
|
2272
|
+
// `ToIntegerOrInfinity` abstract operation
|
|
2273
|
+
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
2274
|
+
var toIntegerOrInfinity$2 = function toIntegerOrInfinity(argument) {
|
|
2275
|
+
var number = +argument;
|
|
2276
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
2277
|
+
return number !== number || number === 0 ? 0 : trunc(number);
|
|
2278
|
+
};
|
|
2279
|
+
|
|
2280
|
+
var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
|
|
2281
|
+
var max = Math.max;
|
|
2282
|
+
var min$1 = Math.min;
|
|
2283
|
+
|
|
2284
|
+
// Helper for a popular repeating case of the spec:
|
|
2285
|
+
// Let integer be ? ToInteger(index).
|
|
2286
|
+
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
2287
|
+
var toAbsoluteIndex$1 = function toAbsoluteIndex(index, length) {
|
|
2288
|
+
var integer = toIntegerOrInfinity$1(index);
|
|
2289
|
+
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
|
2290
|
+
};
|
|
2291
|
+
|
|
2292
|
+
var toIntegerOrInfinity = toIntegerOrInfinity$2;
|
|
2293
|
+
var min = Math.min;
|
|
2294
|
+
|
|
2295
|
+
// `ToLength` abstract operation
|
|
2296
|
+
// https://tc39.es/ecma262/#sec-tolength
|
|
2297
|
+
var toLength$1 = function toLength(argument) {
|
|
2298
|
+
return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
2299
|
+
};
|
|
2300
|
+
|
|
2301
|
+
var toLength = toLength$1;
|
|
2302
|
+
|
|
2303
|
+
// `LengthOfArrayLike` abstract operation
|
|
2304
|
+
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
2305
|
+
var lengthOfArrayLike$2 = function lengthOfArrayLike(obj) {
|
|
2306
|
+
return toLength(obj.length);
|
|
2307
|
+
};
|
|
2308
|
+
|
|
2309
|
+
var toIndexedObject$3 = toIndexedObject$5;
|
|
2310
|
+
var toAbsoluteIndex = toAbsoluteIndex$1;
|
|
2311
|
+
var lengthOfArrayLike$1 = lengthOfArrayLike$2;
|
|
2312
|
+
|
|
2313
|
+
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
2314
|
+
var createMethod = function createMethod(IS_INCLUDES) {
|
|
2315
|
+
return function ($this, el, fromIndex) {
|
|
2316
|
+
var O = toIndexedObject$3($this);
|
|
2317
|
+
var length = lengthOfArrayLike$1(O);
|
|
2318
|
+
var index = toAbsoluteIndex(fromIndex, length);
|
|
2319
|
+
var value;
|
|
2320
|
+
// Array#includes uses SameValueZero equality algorithm
|
|
2321
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
2322
|
+
if (IS_INCLUDES && el != el) while (length > index) {
|
|
2323
|
+
value = O[index++];
|
|
2324
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
2325
|
+
if (value != value) return true;
|
|
2326
|
+
// Array#indexOf ignores holes, Array#includes - not
|
|
2327
|
+
} else for (; length > index; index++) {
|
|
2328
|
+
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
2329
|
+
}
|
|
2330
|
+
return !IS_INCLUDES && -1;
|
|
2331
|
+
};
|
|
2332
|
+
};
|
|
2333
|
+
var arrayIncludes = {
|
|
2334
|
+
// `Array.prototype.includes` method
|
|
2335
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
2336
|
+
includes: createMethod(true),
|
|
2337
|
+
// `Array.prototype.indexOf` method
|
|
2338
|
+
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
2339
|
+
indexOf: createMethod(false)
|
|
2340
|
+
};
|
|
2341
|
+
|
|
2342
|
+
var uncurryThis = functionUncurryThis;
|
|
2343
|
+
var hasOwn$2 = hasOwnProperty_1;
|
|
2344
|
+
var toIndexedObject$2 = toIndexedObject$5;
|
|
2345
|
+
var indexOf = arrayIncludes.indexOf;
|
|
2346
|
+
var hiddenKeys$1 = hiddenKeys$3;
|
|
2347
|
+
var push = uncurryThis([].push);
|
|
2348
|
+
var objectKeysInternal = function objectKeysInternal(object, names) {
|
|
2349
|
+
var O = toIndexedObject$2(object);
|
|
2350
|
+
var i = 0;
|
|
2351
|
+
var result = [];
|
|
2352
|
+
var key;
|
|
2353
|
+
for (key in O) !hasOwn$2(hiddenKeys$1, key) && hasOwn$2(O, key) && push(result, key);
|
|
2354
|
+
// Don't enum bug & hidden keys
|
|
2355
|
+
while (names.length > i) if (hasOwn$2(O, key = names[i++])) {
|
|
2356
|
+
~indexOf(result, key) || push(result, key);
|
|
2357
|
+
}
|
|
2358
|
+
return result;
|
|
2359
|
+
};
|
|
2360
|
+
|
|
2361
|
+
// IE8- don't enum bug keys
|
|
2362
|
+
var enumBugKeys$2 = ['constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf'];
|
|
2363
|
+
|
|
2364
|
+
var internalObjectKeys = objectKeysInternal;
|
|
2365
|
+
var enumBugKeys$1 = enumBugKeys$2;
|
|
2366
|
+
|
|
2367
|
+
// `Object.keys` method
|
|
2368
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
|
2369
|
+
// eslint-disable-next-line es/no-object-keys -- safe
|
|
2370
|
+
var objectKeys$1 = Object.keys || function keys(O) {
|
|
2371
|
+
return internalObjectKeys(O, enumBugKeys$1);
|
|
2372
|
+
};
|
|
2373
|
+
|
|
2374
|
+
var DESCRIPTORS = descriptors;
|
|
2375
|
+
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
2376
|
+
var definePropertyModule$1 = objectDefineProperty;
|
|
2377
|
+
var anObject$4 = anObject$6;
|
|
2378
|
+
var toIndexedObject$1 = toIndexedObject$5;
|
|
2379
|
+
var objectKeys = objectKeys$1;
|
|
2380
|
+
|
|
2381
|
+
// `Object.defineProperties` method
|
|
2382
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
2383
|
+
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
2384
|
+
objectDefineProperties.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
2385
|
+
anObject$4(O);
|
|
2386
|
+
var props = toIndexedObject$1(Properties);
|
|
2387
|
+
var keys = objectKeys(Properties);
|
|
2388
|
+
var length = keys.length;
|
|
2389
|
+
var index = 0;
|
|
2390
|
+
var key;
|
|
2391
|
+
while (length > index) definePropertyModule$1.f(O, key = keys[index++], props[key]);
|
|
2392
|
+
return O;
|
|
2393
|
+
};
|
|
2394
|
+
|
|
2395
|
+
var getBuiltIn = getBuiltIn$2;
|
|
2396
|
+
var html$1 = getBuiltIn('document', 'documentElement');
|
|
2397
|
+
|
|
2398
|
+
/* global ActiveXObject -- old IE, WSH */
|
|
2399
|
+
var anObject$3 = anObject$6;
|
|
2400
|
+
var definePropertiesModule = objectDefineProperties;
|
|
2401
|
+
var enumBugKeys = enumBugKeys$2;
|
|
2402
|
+
var hiddenKeys = hiddenKeys$3;
|
|
2403
|
+
var html = html$1;
|
|
2404
|
+
var documentCreateElement = documentCreateElement$1;
|
|
2405
|
+
var sharedKey$1 = sharedKey$3;
|
|
2406
|
+
var GT = '>';
|
|
2407
|
+
var LT = '<';
|
|
2408
|
+
var PROTOTYPE = 'prototype';
|
|
2409
|
+
var SCRIPT = 'script';
|
|
2410
|
+
var IE_PROTO$1 = sharedKey$1('IE_PROTO');
|
|
2411
|
+
var EmptyConstructor = function EmptyConstructor() {/* empty */};
|
|
2412
|
+
var scriptTag = function scriptTag(content) {
|
|
2413
|
+
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
2414
|
+
};
|
|
2415
|
+
|
|
2416
|
+
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
2417
|
+
var NullProtoObjectViaActiveX = function NullProtoObjectViaActiveX(activeXDocument) {
|
|
2418
|
+
activeXDocument.write(scriptTag(''));
|
|
2419
|
+
activeXDocument.close();
|
|
2420
|
+
var temp = activeXDocument.parentWindow.Object;
|
|
2421
|
+
activeXDocument = null; // avoid memory leak
|
|
2422
|
+
return temp;
|
|
2423
|
+
};
|
|
2424
|
+
|
|
2425
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
2426
|
+
var NullProtoObjectViaIFrame = function NullProtoObjectViaIFrame() {
|
|
2427
|
+
// Thrash, waste and sodomy: IE GC bug
|
|
2428
|
+
var iframe = documentCreateElement('iframe');
|
|
2429
|
+
var JS = 'java' + SCRIPT + ':';
|
|
2430
|
+
var iframeDocument;
|
|
2431
|
+
iframe.style.display = 'none';
|
|
2432
|
+
html.appendChild(iframe);
|
|
2433
|
+
// https://github.com/zloirock/core-js/issues/475
|
|
2434
|
+
iframe.src = String(JS);
|
|
2435
|
+
iframeDocument = iframe.contentWindow.document;
|
|
2436
|
+
iframeDocument.open();
|
|
2437
|
+
iframeDocument.write(scriptTag('document.F=Object'));
|
|
2438
|
+
iframeDocument.close();
|
|
2439
|
+
return iframeDocument.F;
|
|
2440
|
+
};
|
|
2441
|
+
|
|
2442
|
+
// Check for document.domain and active x support
|
|
2443
|
+
// No need to use active x approach when document.domain is not set
|
|
2444
|
+
// see https://github.com/es-shims/es5-shim/issues/150
|
|
2445
|
+
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
2446
|
+
// avoid IE GC bug
|
|
2447
|
+
var activeXDocument;
|
|
2448
|
+
var _NullProtoObject = function NullProtoObject() {
|
|
2449
|
+
try {
|
|
2450
|
+
activeXDocument = new ActiveXObject('htmlfile');
|
|
2451
|
+
} catch (error) {/* ignore */}
|
|
2452
|
+
_NullProtoObject = typeof document != 'undefined' ? document.domain && activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
2453
|
+
: NullProtoObjectViaIFrame() : NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
2454
|
+
var length = enumBugKeys.length;
|
|
2455
|
+
while (length--) delete _NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
2456
|
+
return _NullProtoObject();
|
|
2457
|
+
};
|
|
2458
|
+
hiddenKeys[IE_PROTO$1] = true;
|
|
2459
|
+
|
|
2460
|
+
// `Object.create` method
|
|
2461
|
+
// https://tc39.es/ecma262/#sec-object.create
|
|
2462
|
+
// eslint-disable-next-line es/no-object-create -- safe
|
|
2463
|
+
var objectCreate = Object.create || function create(O, Properties) {
|
|
2464
|
+
var result;
|
|
2465
|
+
if (O !== null) {
|
|
2466
|
+
EmptyConstructor[PROTOTYPE] = anObject$3(O);
|
|
2467
|
+
result = new EmptyConstructor();
|
|
2468
|
+
EmptyConstructor[PROTOTYPE] = null;
|
|
2469
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
2470
|
+
result[IE_PROTO$1] = O;
|
|
2471
|
+
} else result = _NullProtoObject();
|
|
2472
|
+
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
2473
|
+
};
|
|
2474
|
+
|
|
2475
|
+
var fails$1 = fails$9;
|
|
2476
|
+
var correctPrototypeGetter = !fails$1(function () {
|
|
2477
|
+
function F() {/* empty */}
|
|
2478
|
+
F.prototype.constructor = null;
|
|
2479
|
+
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
2480
|
+
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
2481
|
+
});
|
|
2482
|
+
|
|
2483
|
+
var hasOwn$1 = hasOwnProperty_1;
|
|
2484
|
+
var isCallable$2 = isCallable$b;
|
|
2485
|
+
var toObject = toObject$2;
|
|
2486
|
+
var sharedKey = sharedKey$3;
|
|
2487
|
+
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
2488
|
+
var IE_PROTO = sharedKey('IE_PROTO');
|
|
2489
|
+
var $Object$1 = Object;
|
|
2490
|
+
var ObjectPrototype = $Object$1.prototype;
|
|
2491
|
+
|
|
2492
|
+
// `Object.getPrototypeOf` method
|
|
2493
|
+
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
2494
|
+
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
2495
|
+
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
|
|
2496
|
+
var object = toObject(O);
|
|
2497
|
+
if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
|
|
2498
|
+
var constructor = object.constructor;
|
|
2499
|
+
if (isCallable$2(constructor) && object instanceof constructor) {
|
|
2500
|
+
return constructor.prototype;
|
|
2501
|
+
}
|
|
2502
|
+
return object instanceof $Object$1 ? ObjectPrototype : null;
|
|
2503
|
+
};
|
|
2504
|
+
|
|
2505
|
+
var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
|
|
2506
|
+
var defineBuiltIn$2 = function defineBuiltIn(target, key, value, options) {
|
|
2507
|
+
if (options && options.enumerable) target[key] = value;else createNonEnumerableProperty$2(target, key, value);
|
|
2508
|
+
return target;
|
|
2509
|
+
};
|
|
2510
|
+
|
|
2511
|
+
var fails = fails$9;
|
|
2512
|
+
var isCallable$1 = isCallable$b;
|
|
2513
|
+
var isObject = isObject$6;
|
|
2514
|
+
var create$1 = objectCreate;
|
|
2515
|
+
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
2516
|
+
var defineBuiltIn$1 = defineBuiltIn$2;
|
|
2517
|
+
var wellKnownSymbol$7 = wellKnownSymbol$9;
|
|
2518
|
+
var ITERATOR$3 = wellKnownSymbol$7('iterator');
|
|
2519
|
+
var BUGGY_SAFARI_ITERATORS$1 = false;
|
|
2520
|
+
|
|
2521
|
+
// `%IteratorPrototype%` object
|
|
2522
|
+
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
|
|
2523
|
+
var IteratorPrototype$1, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
|
2524
|
+
|
|
2525
|
+
/* eslint-disable es/no-array-prototype-keys -- safe */
|
|
2526
|
+
if ([].keys) {
|
|
2527
|
+
arrayIterator = [].keys();
|
|
2528
|
+
// Safari 8 has buggy iterators w/o `next`
|
|
2529
|
+
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;else {
|
|
2530
|
+
PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
|
|
2531
|
+
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$1 = PrototypeOfArrayIteratorPrototype;
|
|
2532
|
+
}
|
|
2533
|
+
}
|
|
2534
|
+
var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype$1) || fails(function () {
|
|
2535
|
+
var test = {};
|
|
2536
|
+
// FF44- legacy iterators case
|
|
2537
|
+
return IteratorPrototype$1[ITERATOR$3].call(test) !== test;
|
|
2538
|
+
});
|
|
2539
|
+
if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$1 = {};else IteratorPrototype$1 = create$1(IteratorPrototype$1);
|
|
2540
|
+
|
|
2541
|
+
// `%IteratorPrototype%[@@iterator]()` method
|
|
2542
|
+
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
|
|
2543
|
+
if (!isCallable$1(IteratorPrototype$1[ITERATOR$3])) {
|
|
2544
|
+
defineBuiltIn$1(IteratorPrototype$1, ITERATOR$3, function () {
|
|
2545
|
+
return this;
|
|
2546
|
+
});
|
|
2547
|
+
}
|
|
2548
|
+
var iteratorsCore = {
|
|
2549
|
+
IteratorPrototype: IteratorPrototype$1,
|
|
2550
|
+
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
|
|
2551
|
+
};
|
|
2552
|
+
|
|
2553
|
+
var wellKnownSymbol$6 = wellKnownSymbol$9;
|
|
2554
|
+
var TO_STRING_TAG$3 = wellKnownSymbol$6('toStringTag');
|
|
2555
|
+
var test = {};
|
|
2556
|
+
test[TO_STRING_TAG$3] = 'z';
|
|
2557
|
+
var toStringTagSupport = String(test) === '[object z]';
|
|
2558
|
+
|
|
2559
|
+
var TO_STRING_TAG_SUPPORT$2 = toStringTagSupport;
|
|
2560
|
+
var isCallable = isCallable$b;
|
|
2561
|
+
var classofRaw = classofRaw$2;
|
|
2562
|
+
var wellKnownSymbol$5 = wellKnownSymbol$9;
|
|
2563
|
+
var TO_STRING_TAG$2 = wellKnownSymbol$5('toStringTag');
|
|
2564
|
+
var $Object = Object;
|
|
2565
|
+
|
|
2566
|
+
// ES3 wrong here
|
|
2567
|
+
var CORRECT_ARGUMENTS = classofRaw(function () {
|
|
2568
|
+
return arguments;
|
|
2569
|
+
}()) == 'Arguments';
|
|
2570
|
+
|
|
2571
|
+
// fallback for IE11 Script Access Denied error
|
|
2572
|
+
var tryGet = function tryGet(it, key) {
|
|
2573
|
+
try {
|
|
2574
|
+
return it[key];
|
|
2575
|
+
} catch (error) {/* empty */}
|
|
2576
|
+
};
|
|
2577
|
+
|
|
2578
|
+
// getting tag from ES6+ `Object.prototype.toString`
|
|
2579
|
+
var classof$3 = TO_STRING_TAG_SUPPORT$2 ? classofRaw : function (it) {
|
|
2580
|
+
var O, tag, result;
|
|
2581
|
+
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
2582
|
+
// @@toStringTag case
|
|
2583
|
+
: typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG$2)) == 'string' ? tag
|
|
2584
|
+
// builtinTag case
|
|
2585
|
+
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
2586
|
+
// ES3 arguments fallback
|
|
2587
|
+
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
|
2588
|
+
};
|
|
2589
|
+
|
|
2590
|
+
var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport;
|
|
2591
|
+
var classof$2 = classof$3;
|
|
2592
|
+
|
|
2593
|
+
// `Object.prototype.toString` method implementation
|
|
2594
|
+
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
|
2595
|
+
var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() {
|
|
2596
|
+
return '[object ' + classof$2(this) + ']';
|
|
2597
|
+
};
|
|
2598
|
+
|
|
2599
|
+
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
2600
|
+
var defineProperty = objectDefineProperty.f;
|
|
2601
|
+
var createNonEnumerableProperty$1 = createNonEnumerableProperty$5;
|
|
2602
|
+
var hasOwn = hasOwnProperty_1;
|
|
2603
|
+
var toString = objectToString;
|
|
2604
|
+
var wellKnownSymbol$4 = wellKnownSymbol$9;
|
|
2605
|
+
var TO_STRING_TAG$1 = wellKnownSymbol$4('toStringTag');
|
|
2606
|
+
var setToStringTag$2 = function setToStringTag(it, TAG, STATIC, SET_METHOD) {
|
|
2607
|
+
if (it) {
|
|
2608
|
+
var target = STATIC ? it : it.prototype;
|
|
2609
|
+
if (!hasOwn(target, TO_STRING_TAG$1)) {
|
|
2610
|
+
defineProperty(target, TO_STRING_TAG$1, {
|
|
2611
|
+
configurable: true,
|
|
2612
|
+
value: TAG
|
|
2613
|
+
});
|
|
2614
|
+
}
|
|
2615
|
+
if (SET_METHOD && !TO_STRING_TAG_SUPPORT) {
|
|
2616
|
+
createNonEnumerableProperty$1(target, 'toString', toString);
|
|
2617
|
+
}
|
|
2618
|
+
}
|
|
2619
|
+
};
|
|
2620
|
+
|
|
2621
|
+
var IteratorPrototype = iteratorsCore.IteratorPrototype;
|
|
2622
|
+
var create = objectCreate;
|
|
2623
|
+
var createPropertyDescriptor$1 = createPropertyDescriptor$4;
|
|
2624
|
+
var setToStringTag$1 = setToStringTag$2;
|
|
2625
|
+
var Iterators$5 = iterators;
|
|
2626
|
+
var returnThis$1 = function returnThis() {
|
|
2627
|
+
return this;
|
|
2628
|
+
};
|
|
2629
|
+
var iteratorCreateConstructor = function iteratorCreateConstructor(IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
|
|
2630
|
+
var TO_STRING_TAG = NAME + ' Iterator';
|
|
2631
|
+
IteratorConstructor.prototype = create(IteratorPrototype, {
|
|
2632
|
+
next: createPropertyDescriptor$1(+!ENUMERABLE_NEXT, next)
|
|
2633
|
+
});
|
|
2634
|
+
setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false, true);
|
|
2635
|
+
Iterators$5[TO_STRING_TAG] = returnThis$1;
|
|
2636
|
+
return IteratorConstructor;
|
|
2637
|
+
};
|
|
2638
|
+
|
|
2639
|
+
var $$1 = _export;
|
|
2640
|
+
var call$3 = functionCall;
|
|
2641
|
+
var FunctionName = functionName;
|
|
2642
|
+
var createIteratorConstructor = iteratorCreateConstructor;
|
|
2643
|
+
var getPrototypeOf = objectGetPrototypeOf;
|
|
2644
|
+
var setToStringTag = setToStringTag$2;
|
|
2645
|
+
var defineBuiltIn = defineBuiltIn$2;
|
|
2646
|
+
var wellKnownSymbol$3 = wellKnownSymbol$9;
|
|
2647
|
+
var Iterators$4 = iterators;
|
|
2648
|
+
var IteratorsCore = iteratorsCore;
|
|
2649
|
+
var PROPER_FUNCTION_NAME = FunctionName.PROPER;
|
|
2650
|
+
FunctionName.CONFIGURABLE;
|
|
2651
|
+
IteratorsCore.IteratorPrototype;
|
|
2652
|
+
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
|
|
2653
|
+
var ITERATOR$2 = wellKnownSymbol$3('iterator');
|
|
2654
|
+
var KEYS = 'keys';
|
|
2655
|
+
var VALUES = 'values';
|
|
2656
|
+
var ENTRIES = 'entries';
|
|
2657
|
+
var returnThis = function returnThis() {
|
|
2658
|
+
return this;
|
|
2659
|
+
};
|
|
2660
|
+
var iteratorDefine = function iteratorDefine(Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
|
|
2661
|
+
createIteratorConstructor(IteratorConstructor, NAME, next);
|
|
2662
|
+
var getIterationMethod = function getIterationMethod(KIND) {
|
|
2663
|
+
if (KIND === DEFAULT && defaultIterator) return defaultIterator;
|
|
2664
|
+
if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
|
|
2665
|
+
switch (KIND) {
|
|
2666
|
+
case KEYS:
|
|
2667
|
+
return function keys() {
|
|
2668
|
+
return new IteratorConstructor(this, KIND);
|
|
2669
|
+
};
|
|
2670
|
+
case VALUES:
|
|
2671
|
+
return function values() {
|
|
2672
|
+
return new IteratorConstructor(this, KIND);
|
|
2673
|
+
};
|
|
2674
|
+
case ENTRIES:
|
|
2675
|
+
return function entries() {
|
|
2676
|
+
return new IteratorConstructor(this, KIND);
|
|
2677
|
+
};
|
|
2678
|
+
}
|
|
2679
|
+
return function () {
|
|
2680
|
+
return new IteratorConstructor(this);
|
|
2681
|
+
};
|
|
2682
|
+
};
|
|
2683
|
+
var TO_STRING_TAG = NAME + ' Iterator';
|
|
2684
|
+
var INCORRECT_VALUES_NAME = false;
|
|
2685
|
+
var IterablePrototype = Iterable.prototype;
|
|
2686
|
+
var nativeIterator = IterablePrototype[ITERATOR$2] || IterablePrototype['@@iterator'] || DEFAULT && IterablePrototype[DEFAULT];
|
|
2687
|
+
var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
|
|
2688
|
+
var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
|
|
2689
|
+
var CurrentIteratorPrototype, methods, KEY;
|
|
2690
|
+
|
|
2691
|
+
// fix native
|
|
2692
|
+
if (anyNativeIterator) {
|
|
2693
|
+
CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
|
|
2694
|
+
if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
|
|
2695
|
+
// Set @@toStringTag to native iterators
|
|
2696
|
+
setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
|
|
2697
|
+
Iterators$4[TO_STRING_TAG] = returnThis;
|
|
2698
|
+
}
|
|
2699
|
+
}
|
|
2700
|
+
|
|
2701
|
+
// fix Array.prototype.{ values, @@iterator }.name in V8 / FF
|
|
2702
|
+
if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
|
2703
|
+
{
|
|
2704
|
+
INCORRECT_VALUES_NAME = true;
|
|
2705
|
+
defaultIterator = function values() {
|
|
2706
|
+
return call$3(nativeIterator, this);
|
|
2707
|
+
};
|
|
2708
|
+
}
|
|
2709
|
+
}
|
|
2710
|
+
|
|
2711
|
+
// export additional methods
|
|
2712
|
+
if (DEFAULT) {
|
|
2713
|
+
methods = {
|
|
2714
|
+
values: getIterationMethod(VALUES),
|
|
2715
|
+
keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
|
|
2716
|
+
entries: getIterationMethod(ENTRIES)
|
|
2717
|
+
};
|
|
2718
|
+
if (FORCED) for (KEY in methods) {
|
|
2719
|
+
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
2720
|
+
defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
|
|
2721
|
+
}
|
|
2722
|
+
} else $$1({
|
|
2723
|
+
target: NAME,
|
|
2724
|
+
proto: true,
|
|
2725
|
+
forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME
|
|
2726
|
+
}, methods);
|
|
2727
|
+
}
|
|
2728
|
+
|
|
2729
|
+
// define iterator
|
|
2730
|
+
if ((FORCED) && IterablePrototype[ITERATOR$2] !== defaultIterator) {
|
|
2731
|
+
defineBuiltIn(IterablePrototype, ITERATOR$2, defaultIterator, {
|
|
2732
|
+
name: DEFAULT
|
|
2733
|
+
});
|
|
2734
|
+
}
|
|
2735
|
+
Iterators$4[NAME] = defaultIterator;
|
|
2736
|
+
return methods;
|
|
2737
|
+
};
|
|
2738
|
+
|
|
2739
|
+
// `CreateIterResultObject` abstract operation
|
|
2740
|
+
// https://tc39.es/ecma262/#sec-createiterresultobject
|
|
2741
|
+
var createIterResultObject$1 = function createIterResultObject(value, done) {
|
|
2742
|
+
return {
|
|
2743
|
+
value: value,
|
|
2744
|
+
done: done
|
|
2745
|
+
};
|
|
2746
|
+
};
|
|
2747
|
+
|
|
2748
|
+
var toIndexedObject = toIndexedObject$5;
|
|
2749
|
+
var Iterators$3 = iterators;
|
|
2750
|
+
var InternalStateModule = internalState;
|
|
2751
|
+
objectDefineProperty.f;
|
|
2752
|
+
var defineIterator = iteratorDefine;
|
|
2753
|
+
var createIterResultObject = createIterResultObject$1;
|
|
2754
|
+
var ARRAY_ITERATOR = 'Array Iterator';
|
|
2755
|
+
var setInternalState = InternalStateModule.set;
|
|
2756
|
+
var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
|
|
2757
|
+
|
|
2758
|
+
// `Array.prototype.entries` method
|
|
2759
|
+
// https://tc39.es/ecma262/#sec-array.prototype.entries
|
|
2760
|
+
// `Array.prototype.keys` method
|
|
2761
|
+
// https://tc39.es/ecma262/#sec-array.prototype.keys
|
|
2762
|
+
// `Array.prototype.values` method
|
|
2763
|
+
// https://tc39.es/ecma262/#sec-array.prototype.values
|
|
2764
|
+
// `Array.prototype[@@iterator]` method
|
|
2765
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@iterator
|
|
2766
|
+
// `CreateArrayIterator` internal method
|
|
2767
|
+
// https://tc39.es/ecma262/#sec-createarrayiterator
|
|
2768
|
+
defineIterator(Array, 'Array', function (iterated, kind) {
|
|
2769
|
+
setInternalState(this, {
|
|
2770
|
+
type: ARRAY_ITERATOR,
|
|
2771
|
+
target: toIndexedObject(iterated),
|
|
2772
|
+
// target
|
|
2773
|
+
index: 0,
|
|
2774
|
+
// next index
|
|
2775
|
+
kind: kind // kind
|
|
2776
|
+
});
|
|
2777
|
+
// `%ArrayIteratorPrototype%.next` method
|
|
2778
|
+
// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
|
|
2779
|
+
}, function () {
|
|
2780
|
+
var state = getInternalState(this);
|
|
2781
|
+
var target = state.target;
|
|
2782
|
+
var kind = state.kind;
|
|
2783
|
+
var index = state.index++;
|
|
2784
|
+
if (!target || index >= target.length) {
|
|
2785
|
+
state.target = undefined;
|
|
2786
|
+
return createIterResultObject(undefined, true);
|
|
2787
|
+
}
|
|
2788
|
+
if (kind == 'keys') return createIterResultObject(index, false);
|
|
2789
|
+
if (kind == 'values') return createIterResultObject(target[index], false);
|
|
2790
|
+
return createIterResultObject([index, target[index]], false);
|
|
2791
|
+
}, 'values');
|
|
2792
|
+
|
|
2793
|
+
// argumentsList[@@iterator] is %ArrayProto_values%
|
|
2794
|
+
// https://tc39.es/ecma262/#sec-createunmappedargumentsobject
|
|
2795
|
+
// https://tc39.es/ecma262/#sec-createmappedargumentsobject
|
|
2796
|
+
Iterators$3.Arguments = Iterators$3.Array;
|
|
2797
|
+
|
|
2798
|
+
var wellKnownSymbol$2 = wellKnownSymbol$9;
|
|
2799
|
+
var Iterators$2 = iterators;
|
|
2800
|
+
var ITERATOR$1 = wellKnownSymbol$2('iterator');
|
|
2801
|
+
var ArrayPrototype = Array.prototype;
|
|
2802
|
+
|
|
2803
|
+
// check on default Array iterator
|
|
2804
|
+
var isArrayIteratorMethod$1 = function isArrayIteratorMethod(it) {
|
|
2805
|
+
return it !== undefined && (Iterators$2.Array === it || ArrayPrototype[ITERATOR$1] === it);
|
|
2806
|
+
};
|
|
2807
|
+
|
|
2808
|
+
var classof$1 = classof$3;
|
|
2809
|
+
var getMethod$1 = getMethod$3;
|
|
2810
|
+
var isNullOrUndefined = isNullOrUndefined$3;
|
|
2811
|
+
var Iterators$1 = iterators;
|
|
2812
|
+
var wellKnownSymbol$1 = wellKnownSymbol$9;
|
|
2813
|
+
var ITERATOR = wellKnownSymbol$1('iterator');
|
|
2814
|
+
var getIteratorMethod$2 = function getIteratorMethod(it) {
|
|
2815
|
+
if (!isNullOrUndefined(it)) return getMethod$1(it, ITERATOR) || getMethod$1(it, '@@iterator') || Iterators$1[classof$1(it)];
|
|
2816
|
+
};
|
|
2817
|
+
|
|
2818
|
+
var call$2 = functionCall;
|
|
2819
|
+
var aCallable = aCallable$3;
|
|
2820
|
+
var anObject$2 = anObject$6;
|
|
2821
|
+
var tryToString$1 = tryToString$3;
|
|
2822
|
+
var getIteratorMethod$1 = getIteratorMethod$2;
|
|
2823
|
+
var $TypeError$1 = TypeError;
|
|
2824
|
+
var getIterator$1 = function getIterator(argument, usingIterator) {
|
|
2825
|
+
var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
|
|
2826
|
+
if (aCallable(iteratorMethod)) return anObject$2(call$2(iteratorMethod, argument));
|
|
2827
|
+
throw $TypeError$1(tryToString$1(argument) + ' is not iterable');
|
|
2828
|
+
};
|
|
2829
|
+
|
|
2830
|
+
var call$1 = functionCall;
|
|
2831
|
+
var anObject$1 = anObject$6;
|
|
2832
|
+
var getMethod = getMethod$3;
|
|
2833
|
+
var iteratorClose$1 = function iteratorClose(iterator, kind, value) {
|
|
2834
|
+
var innerResult, innerError;
|
|
2835
|
+
anObject$1(iterator);
|
|
2836
|
+
try {
|
|
2837
|
+
innerResult = getMethod(iterator, 'return');
|
|
2838
|
+
if (!innerResult) {
|
|
2839
|
+
if (kind === 'throw') throw value;
|
|
2840
|
+
return value;
|
|
2841
|
+
}
|
|
2842
|
+
innerResult = call$1(innerResult, iterator);
|
|
2843
|
+
} catch (error) {
|
|
2844
|
+
innerError = true;
|
|
2845
|
+
innerResult = error;
|
|
2846
|
+
}
|
|
2847
|
+
if (kind === 'throw') throw value;
|
|
2848
|
+
if (innerError) throw innerResult;
|
|
2849
|
+
anObject$1(innerResult);
|
|
2850
|
+
return value;
|
|
2851
|
+
};
|
|
2852
|
+
|
|
2853
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2854
|
+
var bind = functionBindContext;
|
|
2855
|
+
var call = functionCall;
|
|
2856
|
+
var anObject = anObject$6;
|
|
2857
|
+
var tryToString = tryToString$3;
|
|
2858
|
+
var isArrayIteratorMethod = isArrayIteratorMethod$1;
|
|
2859
|
+
var lengthOfArrayLike = lengthOfArrayLike$2;
|
|
2860
|
+
var isPrototypeOf = objectIsPrototypeOf;
|
|
2861
|
+
var getIterator = getIterator$1;
|
|
2862
|
+
var getIteratorMethod = getIteratorMethod$2;
|
|
2863
|
+
var iteratorClose = iteratorClose$1;
|
|
2864
|
+
var $TypeError = TypeError;
|
|
2865
|
+
var Result = function Result(stopped, result) {
|
|
2866
|
+
this.stopped = stopped;
|
|
2867
|
+
this.result = result;
|
|
2868
|
+
};
|
|
2869
|
+
var ResultPrototype = Result.prototype;
|
|
2870
|
+
var iterate$1 = function iterate(iterable, unboundFunction, options) {
|
|
2871
|
+
var that = options && options.that;
|
|
2872
|
+
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
|
2873
|
+
var IS_RECORD = !!(options && options.IS_RECORD);
|
|
2874
|
+
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
2875
|
+
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
2876
|
+
var fn = bind(unboundFunction, that);
|
|
2877
|
+
var iterator, iterFn, index, length, result, next, step;
|
|
2878
|
+
var stop = function stop(condition) {
|
|
2879
|
+
if (iterator) iteratorClose(iterator, 'normal', condition);
|
|
2880
|
+
return new Result(true, condition);
|
|
2881
|
+
};
|
|
2882
|
+
var callFn = function callFn(value) {
|
|
2883
|
+
if (AS_ENTRIES) {
|
|
2884
|
+
anObject(value);
|
|
2885
|
+
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
|
|
2886
|
+
}
|
|
2887
|
+
return INTERRUPTED ? fn(value, stop) : fn(value);
|
|
2888
|
+
};
|
|
2889
|
+
if (IS_RECORD) {
|
|
2890
|
+
iterator = iterable.iterator;
|
|
2891
|
+
} else if (IS_ITERATOR) {
|
|
2892
|
+
iterator = iterable;
|
|
2893
|
+
} else {
|
|
2894
|
+
iterFn = getIteratorMethod(iterable);
|
|
2895
|
+
if (!iterFn) throw $TypeError(tryToString(iterable) + ' is not iterable');
|
|
2896
|
+
// optimisation for array iterators
|
|
2897
|
+
if (isArrayIteratorMethod(iterFn)) {
|
|
2898
|
+
for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
|
|
2899
|
+
result = callFn(iterable[index]);
|
|
2900
|
+
if (result && isPrototypeOf(ResultPrototype, result)) return result;
|
|
2901
|
+
}
|
|
2902
|
+
return new Result(false);
|
|
2903
|
+
}
|
|
2904
|
+
iterator = getIterator(iterable, iterFn);
|
|
2905
|
+
}
|
|
2906
|
+
next = IS_RECORD ? iterable.next : iterator.next;
|
|
2907
|
+
while (!(step = call(next, iterator)).done) {
|
|
2908
|
+
try {
|
|
2909
|
+
result = callFn(step.value);
|
|
2910
|
+
} catch (error) {
|
|
2911
|
+
iteratorClose(iterator, 'throw', error);
|
|
2912
|
+
}
|
|
2913
|
+
if (_typeof(result) == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
|
|
2914
|
+
}
|
|
2915
|
+
return new Result(false);
|
|
2916
|
+
};
|
|
2917
|
+
|
|
2918
|
+
var toPropertyKey = toPropertyKey$3;
|
|
2919
|
+
var definePropertyModule = objectDefineProperty;
|
|
2920
|
+
var createPropertyDescriptor = createPropertyDescriptor$4;
|
|
2921
|
+
var createProperty$1 = function createProperty(object, key, value) {
|
|
2922
|
+
var propertyKey = toPropertyKey(key);
|
|
2923
|
+
if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));else object[propertyKey] = value;
|
|
2924
|
+
};
|
|
2925
|
+
|
|
2926
|
+
var $ = _export;
|
|
2927
|
+
var iterate = iterate$1;
|
|
2928
|
+
var createProperty = createProperty$1;
|
|
2929
|
+
|
|
2930
|
+
// `Object.fromEntries` method
|
|
2931
|
+
// https://github.com/tc39/proposal-object-from-entries
|
|
2932
|
+
$({
|
|
2933
|
+
target: 'Object',
|
|
2934
|
+
stat: true
|
|
2935
|
+
}, {
|
|
2936
|
+
fromEntries: function fromEntries(iterable) {
|
|
2937
|
+
var obj = {};
|
|
2938
|
+
iterate(iterable, function (k, v) {
|
|
2939
|
+
createProperty(obj, k, v);
|
|
2940
|
+
}, {
|
|
2941
|
+
AS_ENTRIES: true
|
|
2942
|
+
});
|
|
2943
|
+
return obj;
|
|
2944
|
+
}
|
|
2945
|
+
});
|
|
2946
|
+
|
|
2947
|
+
var path = path$3;
|
|
2948
|
+
var fromEntries$2 = path.Object.fromEntries;
|
|
2949
|
+
|
|
2950
|
+
// iterable DOM collections
|
|
2951
|
+
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
|
2952
|
+
var domIterables = {
|
|
2953
|
+
CSSRuleList: 0,
|
|
2954
|
+
CSSStyleDeclaration: 0,
|
|
2955
|
+
CSSValueList: 0,
|
|
2956
|
+
ClientRectList: 0,
|
|
2957
|
+
DOMRectList: 0,
|
|
2958
|
+
DOMStringList: 0,
|
|
2959
|
+
DOMTokenList: 1,
|
|
2960
|
+
DataTransferItemList: 0,
|
|
2961
|
+
FileList: 0,
|
|
2962
|
+
HTMLAllCollection: 0,
|
|
2963
|
+
HTMLCollection: 0,
|
|
2964
|
+
HTMLFormElement: 0,
|
|
2965
|
+
HTMLSelectElement: 0,
|
|
2966
|
+
MediaList: 0,
|
|
2967
|
+
MimeTypeArray: 0,
|
|
2968
|
+
NamedNodeMap: 0,
|
|
2969
|
+
NodeList: 1,
|
|
2970
|
+
PaintRequestList: 0,
|
|
2971
|
+
Plugin: 0,
|
|
2972
|
+
PluginArray: 0,
|
|
2973
|
+
SVGLengthList: 0,
|
|
2974
|
+
SVGNumberList: 0,
|
|
2975
|
+
SVGPathSegList: 0,
|
|
2976
|
+
SVGPointList: 0,
|
|
2977
|
+
SVGStringList: 0,
|
|
2978
|
+
SVGTransformList: 0,
|
|
2979
|
+
SourceBufferList: 0,
|
|
2980
|
+
StyleSheetList: 0,
|
|
2981
|
+
TextTrackCueList: 0,
|
|
2982
|
+
TextTrackList: 0,
|
|
2983
|
+
TouchList: 0
|
|
2984
|
+
};
|
|
2985
|
+
|
|
2986
|
+
var DOMIterables = domIterables;
|
|
2987
|
+
var global$1 = global$c;
|
|
2988
|
+
var classof = classof$3;
|
|
2989
|
+
var createNonEnumerableProperty = createNonEnumerableProperty$5;
|
|
2990
|
+
var Iterators = iterators;
|
|
2991
|
+
var wellKnownSymbol = wellKnownSymbol$9;
|
|
2992
|
+
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
2993
|
+
for (var COLLECTION_NAME in DOMIterables) {
|
|
2994
|
+
var Collection = global$1[COLLECTION_NAME];
|
|
2995
|
+
var CollectionPrototype = Collection && Collection.prototype;
|
|
2996
|
+
if (CollectionPrototype && classof(CollectionPrototype) !== TO_STRING_TAG) {
|
|
2997
|
+
createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
|
|
2998
|
+
}
|
|
2999
|
+
Iterators[COLLECTION_NAME] = Iterators.Array;
|
|
3000
|
+
}
|
|
3001
|
+
|
|
3002
|
+
var parent$1 = fromEntries$2;
|
|
3003
|
+
var fromEntries$1 = parent$1;
|
|
3004
|
+
|
|
3005
|
+
var parent = fromEntries$1;
|
|
3006
|
+
var fromEntries = parent;
|
|
3007
|
+
var __polyfill_Object_fromEntries_1l7jl5fabj9k = /*@__PURE__*/getDefaultExportFromCjs(fromEntries);
|
|
3008
|
+
|
|
3009
|
+
exports.VKNumericLanguage = void 0;
|
|
3010
|
+
(function (VKNumericLanguage) {
|
|
3011
|
+
VKNumericLanguage["Armenian"] = "58";
|
|
3012
|
+
VKNumericLanguage["Azerbaijani"] = "57";
|
|
3013
|
+
VKNumericLanguage["Belarusian"] = "114";
|
|
3014
|
+
VKNumericLanguage["English"] = "3";
|
|
3015
|
+
VKNumericLanguage["Kazakh"] = "97";
|
|
3016
|
+
VKNumericLanguage["Portuguese"] = "73";
|
|
3017
|
+
VKNumericLanguage["Russian"] = "0";
|
|
3018
|
+
VKNumericLanguage["Spanish"] = "4";
|
|
3019
|
+
VKNumericLanguage["Ukrainian"] = "1";
|
|
3020
|
+
VKNumericLanguage["Uzbek"] = "65";
|
|
3021
|
+
VKNumericLanguage["Vietnamese"] = "75";
|
|
3022
|
+
})(exports.VKNumericLanguage || (exports.VKNumericLanguage = {}));
|
|
3023
|
+
var VK_DOMAIN = 'vk.com';
|
|
3024
|
+
var loadVKLangPack = function (language, packName, packPrefix) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3025
|
+
var url, response, data;
|
|
3026
|
+
return __generator(this, function (_a) {
|
|
3027
|
+
switch (_a.label) {
|
|
3028
|
+
case 0:
|
|
3029
|
+
url = new URL("https://".concat(VK_DOMAIN, "/js/lang-pack.js"));
|
|
3030
|
+
url.searchParams.set('format', 'json');
|
|
3031
|
+
url.searchParams.set('name', packName);
|
|
3032
|
+
if (language !== undefined) {
|
|
3033
|
+
url.searchParams.set('lang', language);
|
|
3034
|
+
}
|
|
3035
|
+
return [4 /*yield*/, fetch(url.toString())];
|
|
3036
|
+
case 1:
|
|
3037
|
+
response = _a.sent();
|
|
3038
|
+
return [4 /*yield*/, response.json()];
|
|
3039
|
+
case 2:
|
|
3040
|
+
data = _a.sent();
|
|
3041
|
+
return [2 /*return*/, mapVKResponse(data, packPrefix)];
|
|
3042
|
+
}
|
|
3043
|
+
});
|
|
3044
|
+
}); };
|
|
3045
|
+
var mapVKResponse = function (data, packPrefix) { return __polyfill_Object_fromEntries_1l7jl5fabj9k(Object.entries(data.keys).map(function (_a) {
|
|
3046
|
+
var _b = __read(_a, 2), key = _b[0], value = _b[1];
|
|
3047
|
+
return [key.substring("".concat(packPrefix, "_").length), mapToken(value)];
|
|
3048
|
+
})); };
|
|
3049
|
+
var mapToken = function (vkToken) { return Array.isArray(vkToken) ? vkToken[0] : vkToken; };
|
|
3050
|
+
|
|
3051
|
+
exports.InterfaceLanguage = void 0;
|
|
3052
|
+
(function (InterfaceLanguage) {
|
|
3053
|
+
InterfaceLanguage["RU"] = "ru";
|
|
3054
|
+
InterfaceLanguage["EN"] = "en";
|
|
3055
|
+
})(exports.InterfaceLanguage || (exports.InterfaceLanguage = {}));
|
|
3056
|
+
|
|
3057
|
+
exports.Logger = Logger;
|
|
3058
|
+
exports.Observable = Observable;
|
|
3059
|
+
exports.Subject = Subject;
|
|
3060
|
+
exports.Subscription = Subscription;
|
|
3061
|
+
exports.VERSION = VERSION;
|
|
3062
|
+
exports.ValueSubject = ValueSubject;
|
|
3063
|
+
exports.abortable = abortable;
|
|
3064
|
+
exports.addScript = addScript;
|
|
3065
|
+
exports.areQualitiesExact = areQualitiesExact;
|
|
3066
|
+
exports.assertEmptyArray = assertEmptyArray;
|
|
3067
|
+
exports.assertNever = assertNever;
|
|
3068
|
+
exports.assertNonNullable = assertNonNullable;
|
|
3069
|
+
exports.assertNotEmptyArray = assertNotEmptyArray;
|
|
3070
|
+
exports.assertNullable = assertNullable;
|
|
3071
|
+
exports.assertQualityIsExact = assertQualityIsExact;
|
|
3072
|
+
exports.buffer = buffer;
|
|
3073
|
+
exports.checkNever = checkNever;
|
|
3074
|
+
exports.combine = combine;
|
|
3075
|
+
exports.debounce = debounce;
|
|
3076
|
+
exports.fillWithDefault = fillWithDefault;
|
|
3077
|
+
exports.filter = filter;
|
|
3078
|
+
exports.filterChanged = filterChanged;
|
|
3079
|
+
exports.fromEvent = fromEvent;
|
|
3080
|
+
exports.getCurrentBrowser = getCurrentBrowser;
|
|
3081
|
+
exports.getExponentialDelay = getExponentialDelay;
|
|
3082
|
+
exports.getHighestQuality = getHighestQuality;
|
|
3083
|
+
exports.getIOSVersion = getIOSVersion;
|
|
3084
|
+
exports.interval = interval;
|
|
3085
|
+
exports.isHigher = isHigher;
|
|
3086
|
+
exports.isHigherOrEqual = isHigherOrEqual;
|
|
3087
|
+
exports.isIOS = isIOS;
|
|
3088
|
+
exports.isInvariantQuality = isInvariantQuality;
|
|
3089
|
+
exports.isLower = isLower;
|
|
3090
|
+
exports.isLowerOrEqual = isLowerOrEqual;
|
|
3091
|
+
exports.isMacLike = isMacLike;
|
|
3092
|
+
exports.isNonNullable = isNonNullable;
|
|
3093
|
+
exports.isNullable = isNullable;
|
|
3094
|
+
exports.loadVKLangPack = loadVKLangPack;
|
|
3095
|
+
exports.map = map;
|
|
3096
|
+
exports.mapTo = mapTo;
|
|
3097
|
+
exports.merge = merge;
|
|
3098
|
+
exports.noop = noop;
|
|
3099
|
+
exports.now = now;
|
|
3100
|
+
exports.observableFrom = observableFrom;
|
|
3101
|
+
exports.once = once;
|
|
3102
|
+
exports.pairwise = pairwise;
|
|
3103
|
+
exports.safeStorage = iframeSafeStorage;
|
|
3104
|
+
exports.tap = tap;
|
|
3105
|
+
exports.throttle = throttle;
|
|
3106
|
+
exports.timeout = timeout;
|
|
3107
|
+
exports.videoHeightToQuality = videoHeightToQuality;
|
|
3108
|
+
exports.videoQualityToHeight = videoQualityToHeight;
|
|
3109
|
+
exports.videoSizeToQuality = videoSizeToQuality;
|
|
3110
|
+
|
|
3111
|
+
}));
|
|
3112
|
+
//# sourceMappingURL=es5.umd.js.map
|