@kaltura-apps/genie-chat-react 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.esm.js ADDED
@@ -0,0 +1,1712 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import React, { useMemo, useContext } from 'react';
3
+ import { UnisphereProvider, ScopedUnisphereWorkspaceProvider, ScopedUnisphereWorkspaceContext, UnisphereRuntimeVisual } from '@unisphere/runtime-react';
4
+
5
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
6
+
7
+ var fails$b = function (exec) {
8
+ try {
9
+ return !!exec();
10
+ } catch (error) {
11
+ return true;
12
+ }
13
+ };
14
+
15
+ var fails$a = fails$b;
16
+
17
+ var functionBindNative = !fails$a(function () {
18
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
19
+ var test = (function () { /* empty */ }).bind();
20
+ // eslint-disable-next-line no-prototype-builtins -- safe
21
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
22
+ });
23
+
24
+ var NATIVE_BIND$1 = functionBindNative;
25
+
26
+ var FunctionPrototype$1 = Function.prototype;
27
+ var call$6 = FunctionPrototype$1.call;
28
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
29
+ var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$1.bind.bind(call$6, call$6);
30
+
31
+ var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
32
+ return function () {
33
+ return call$6.apply(fn, arguments);
34
+ };
35
+ };
36
+
37
+ var uncurryThis$a = functionUncurryThis;
38
+
39
+ var toString$1 = uncurryThis$a({}.toString);
40
+ var stringSlice$1 = uncurryThis$a(''.slice);
41
+
42
+ var classofRaw = function (it) {
43
+ return stringSlice$1(toString$1(it), 8, -1);
44
+ };
45
+
46
+ var uncurryThis$9 = functionUncurryThis;
47
+ var fails$9 = fails$b;
48
+ var classof = classofRaw;
49
+
50
+ var $Object$3 = Object;
51
+ var split = uncurryThis$9(''.split);
52
+
53
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
54
+ var indexedObject = fails$9(function () {
55
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
56
+ // eslint-disable-next-line no-prototype-builtins -- safe
57
+ return !$Object$3('z').propertyIsEnumerable(0);
58
+ }) ? function (it) {
59
+ return classof(it) === 'String' ? split(it, '') : $Object$3(it);
60
+ } : $Object$3;
61
+
62
+ // we can't use just `it == null` since of `document.all` special case
63
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
64
+ var isNullOrUndefined$2 = function (it) {
65
+ return it === null || it === undefined;
66
+ };
67
+
68
+ var isNullOrUndefined$1 = isNullOrUndefined$2;
69
+
70
+ var $TypeError$6 = TypeError;
71
+
72
+ // `RequireObjectCoercible` abstract operation
73
+ // https://tc39.es/ecma262/#sec-requireobjectcoercible
74
+ var requireObjectCoercible$3 = function (it) {
75
+ if (isNullOrUndefined$1(it)) throw new $TypeError$6("Can't call method on " + it);
76
+ return it;
77
+ };
78
+
79
+ // toObject with fallback for non-array-like ES3 strings
80
+ var IndexedObject$1 = indexedObject;
81
+ var requireObjectCoercible$2 = requireObjectCoercible$3;
82
+
83
+ var toIndexedObject$5 = function (it) {
84
+ return IndexedObject$1(requireObjectCoercible$2(it));
85
+ };
86
+
87
+ var check = function (it) {
88
+ return it && it.Math === Math && it;
89
+ };
90
+
91
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
92
+ var globalThis_1 =
93
+ // eslint-disable-next-line es/no-global-this -- safe
94
+ check(typeof globalThis == 'object' && globalThis) ||
95
+ check(typeof window == 'object' && window) ||
96
+ // eslint-disable-next-line no-restricted-globals -- safe
97
+ check(typeof self == 'object' && self) ||
98
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
99
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
100
+ // eslint-disable-next-line no-new-func -- fallback
101
+ (function () { return this; })() || Function('return this')();
102
+
103
+ var sharedStore = {exports: {}};
104
+
105
+ var globalThis$c = globalThis_1;
106
+
107
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
108
+ var defineProperty$5 = Object.defineProperty;
109
+
110
+ var defineGlobalProperty$3 = function (key, value) {
111
+ try {
112
+ defineProperty$5(globalThis$c, key, { value: value, configurable: true, writable: true });
113
+ } catch (error) {
114
+ globalThis$c[key] = value;
115
+ } return value;
116
+ };
117
+
118
+ var globalThis$b = globalThis_1;
119
+ var defineGlobalProperty$2 = defineGlobalProperty$3;
120
+
121
+ var SHARED = '__core-js_shared__';
122
+ var store$3 = sharedStore.exports = globalThis$b[SHARED] || defineGlobalProperty$2(SHARED, {});
123
+
124
+ (store$3.versions || (store$3.versions = [])).push({
125
+ version: '3.48.0',
126
+ mode: 'global',
127
+ copyright: '© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.',
128
+ license: 'https://github.com/zloirock/core-js/blob/v3.48.0/LICENSE',
129
+ source: 'https://github.com/zloirock/core-js'
130
+ });
131
+
132
+ var sharedStoreExports = sharedStore.exports;
133
+
134
+ var store$2 = sharedStoreExports;
135
+
136
+ var shared$3 = function (key, value) {
137
+ return store$2[key] || (store$2[key] = value || {});
138
+ };
139
+
140
+ var requireObjectCoercible$1 = requireObjectCoercible$3;
141
+
142
+ var $Object$2 = Object;
143
+
144
+ // `ToObject` abstract operation
145
+ // https://tc39.es/ecma262/#sec-toobject
146
+ var toObject$3 = function (argument) {
147
+ return $Object$2(requireObjectCoercible$1(argument));
148
+ };
149
+
150
+ var uncurryThis$8 = functionUncurryThis;
151
+ var toObject$2 = toObject$3;
152
+
153
+ var hasOwnProperty = uncurryThis$8({}.hasOwnProperty);
154
+
155
+ // `HasOwnProperty` abstract operation
156
+ // https://tc39.es/ecma262/#sec-hasownproperty
157
+ // eslint-disable-next-line es/no-object-hasown -- safe
158
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
159
+ return hasOwnProperty(toObject$2(it), key);
160
+ };
161
+
162
+ var uncurryThis$7 = functionUncurryThis;
163
+
164
+ var id = 0;
165
+ var postfix = Math.random();
166
+ var toString = uncurryThis$7(1.1.toString);
167
+
168
+ var uid$2 = function (key) {
169
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
170
+ };
171
+
172
+ var globalThis$a = globalThis_1;
173
+
174
+ var navigator = globalThis$a.navigator;
175
+ var userAgent$1 = navigator && navigator.userAgent;
176
+
177
+ var environmentUserAgent = userAgent$1 ? String(userAgent$1) : '';
178
+
179
+ var globalThis$9 = globalThis_1;
180
+ var userAgent = environmentUserAgent;
181
+
182
+ var process = globalThis$9.process;
183
+ var Deno = globalThis$9.Deno;
184
+ var versions = process && process.versions || Deno && Deno.version;
185
+ var v8 = versions && versions.v8;
186
+ var match, version;
187
+
188
+ if (v8) {
189
+ match = v8.split('.');
190
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
191
+ // but their correct versions are not interesting for us
192
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
193
+ }
194
+
195
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
196
+ // so check `userAgent` even if `.v8` exists, but 0
197
+ if (!version && userAgent) {
198
+ match = userAgent.match(/Edge\/(\d+)/);
199
+ if (!match || match[1] >= 74) {
200
+ match = userAgent.match(/Chrome\/(\d+)/);
201
+ if (match) version = +match[1];
202
+ }
203
+ }
204
+
205
+ var environmentV8Version = version;
206
+
207
+ /* eslint-disable es/no-symbol -- required for testing */
208
+ var V8_VERSION = environmentV8Version;
209
+ var fails$8 = fails$b;
210
+ var globalThis$8 = globalThis_1;
211
+
212
+ var $String$4 = globalThis$8.String;
213
+
214
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
215
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$8(function () {
216
+ var symbol = Symbol('symbol detection');
217
+ // Chrome 38 Symbol has incorrect toString conversion
218
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
219
+ // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
220
+ // of course, fail.
221
+ return !$String$4(symbol) || !(Object(symbol) instanceof Symbol) ||
222
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
223
+ !Symbol.sham && V8_VERSION && V8_VERSION < 41;
224
+ });
225
+
226
+ /* eslint-disable es/no-symbol -- required for testing */
227
+ var NATIVE_SYMBOL$1 = symbolConstructorDetection;
228
+
229
+ var useSymbolAsUid = NATIVE_SYMBOL$1 &&
230
+ !Symbol.sham &&
231
+ typeof Symbol.iterator == 'symbol';
232
+
233
+ var globalThis$7 = globalThis_1;
234
+ var shared$2 = shared$3;
235
+ var hasOwn$8 = hasOwnProperty_1;
236
+ var uid$1 = uid$2;
237
+ var NATIVE_SYMBOL = symbolConstructorDetection;
238
+ var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
239
+
240
+ var Symbol$1 = globalThis$7.Symbol;
241
+ var WellKnownSymbolsStore = shared$2('wks');
242
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
243
+
244
+ var wellKnownSymbol$6 = function (name) {
245
+ if (!hasOwn$8(WellKnownSymbolsStore, name)) {
246
+ WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)
247
+ ? Symbol$1[name]
248
+ : createWellKnownSymbol('Symbol.' + name);
249
+ } return WellKnownSymbolsStore[name];
250
+ };
251
+
252
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
253
+ var documentAll = typeof document == 'object' && document.all;
254
+
255
+ // `IsCallable` abstract operation
256
+ // https://tc39.es/ecma262/#sec-iscallable
257
+ // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
258
+ var isCallable$d = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
259
+ return typeof argument == 'function' || argument === documentAll;
260
+ } : function (argument) {
261
+ return typeof argument == 'function';
262
+ };
263
+
264
+ var isCallable$c = isCallable$d;
265
+
266
+ var isObject$8 = function (it) {
267
+ return typeof it == 'object' ? it !== null : isCallable$c(it);
268
+ };
269
+
270
+ var isObject$7 = isObject$8;
271
+
272
+ var $String$3 = String;
273
+ var $TypeError$5 = TypeError;
274
+
275
+ // `Assert: Type(argument) is Object`
276
+ var anObject$4 = function (argument) {
277
+ if (isObject$7(argument)) return argument;
278
+ throw new $TypeError$5($String$3(argument) + ' is not an object');
279
+ };
280
+
281
+ var objectDefineProperties = {};
282
+
283
+ var fails$7 = fails$b;
284
+
285
+ // Detect IE8's incomplete defineProperty implementation
286
+ var descriptors = !fails$7(function () {
287
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
288
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
289
+ });
290
+
291
+ var DESCRIPTORS$9 = descriptors;
292
+ var fails$6 = fails$b;
293
+
294
+ // V8 ~ Chrome 36-
295
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
296
+ var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$6(function () {
297
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
298
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
299
+ value: 42,
300
+ writable: false
301
+ }).prototype !== 42;
302
+ });
303
+
304
+ var objectDefineProperty = {};
305
+
306
+ var globalThis$6 = globalThis_1;
307
+ var isObject$6 = isObject$8;
308
+
309
+ var document$1 = globalThis$6.document;
310
+ // typeof document.createElement is 'object' in old IE
311
+ var EXISTS$1 = isObject$6(document$1) && isObject$6(document$1.createElement);
312
+
313
+ var documentCreateElement$2 = function (it) {
314
+ return EXISTS$1 ? document$1.createElement(it) : {};
315
+ };
316
+
317
+ var DESCRIPTORS$8 = descriptors;
318
+ var fails$5 = fails$b;
319
+ var createElement = documentCreateElement$2;
320
+
321
+ // Thanks to IE8 for its funny defineProperty
322
+ var ie8DomDefine = !DESCRIPTORS$8 && !fails$5(function () {
323
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
324
+ return Object.defineProperty(createElement('div'), 'a', {
325
+ get: function () { return 7; }
326
+ }).a !== 7;
327
+ });
328
+
329
+ var NATIVE_BIND = functionBindNative;
330
+
331
+ var call$5 = Function.prototype.call;
332
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
333
+ var functionCall = NATIVE_BIND ? call$5.bind(call$5) : function () {
334
+ return call$5.apply(call$5, arguments);
335
+ };
336
+
337
+ var globalThis$5 = globalThis_1;
338
+ var isCallable$b = isCallable$d;
339
+
340
+ var aFunction = function (argument) {
341
+ return isCallable$b(argument) ? argument : undefined;
342
+ };
343
+
344
+ var getBuiltIn$3 = function (namespace, method) {
345
+ return arguments.length < 2 ? aFunction(globalThis$5[namespace]) : globalThis$5[namespace] && globalThis$5[namespace][method];
346
+ };
347
+
348
+ var uncurryThis$6 = functionUncurryThis;
349
+
350
+ var objectIsPrototypeOf = uncurryThis$6({}.isPrototypeOf);
351
+
352
+ var getBuiltIn$2 = getBuiltIn$3;
353
+ var isCallable$a = isCallable$d;
354
+ var isPrototypeOf = objectIsPrototypeOf;
355
+ var USE_SYMBOL_AS_UID = useSymbolAsUid;
356
+
357
+ var $Object$1 = Object;
358
+
359
+ var isSymbol$2 = USE_SYMBOL_AS_UID ? function (it) {
360
+ return typeof it == 'symbol';
361
+ } : function (it) {
362
+ var $Symbol = getBuiltIn$2('Symbol');
363
+ return isCallable$a($Symbol) && isPrototypeOf($Symbol.prototype, $Object$1(it));
364
+ };
365
+
366
+ var $String$2 = String;
367
+
368
+ var tryToString$1 = function (argument) {
369
+ try {
370
+ return $String$2(argument);
371
+ } catch (error) {
372
+ return 'Object';
373
+ }
374
+ };
375
+
376
+ var isCallable$9 = isCallable$d;
377
+ var tryToString = tryToString$1;
378
+
379
+ var $TypeError$4 = TypeError;
380
+
381
+ // `Assert: IsCallable(argument) is true`
382
+ var aCallable$2 = function (argument) {
383
+ if (isCallable$9(argument)) return argument;
384
+ throw new $TypeError$4(tryToString(argument) + ' is not a function');
385
+ };
386
+
387
+ var aCallable$1 = aCallable$2;
388
+ var isNullOrUndefined = isNullOrUndefined$2;
389
+
390
+ // `GetMethod` abstract operation
391
+ // https://tc39.es/ecma262/#sec-getmethod
392
+ var getMethod$1 = function (V, P) {
393
+ var func = V[P];
394
+ return isNullOrUndefined(func) ? undefined : aCallable$1(func);
395
+ };
396
+
397
+ var call$4 = functionCall;
398
+ var isCallable$8 = isCallable$d;
399
+ var isObject$5 = isObject$8;
400
+
401
+ var $TypeError$3 = TypeError;
402
+
403
+ // `OrdinaryToPrimitive` abstract operation
404
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
405
+ var ordinaryToPrimitive$1 = function (input, pref) {
406
+ var fn, val;
407
+ if (pref === 'string' && isCallable$8(fn = input.toString) && !isObject$5(val = call$4(fn, input))) return val;
408
+ if (isCallable$8(fn = input.valueOf) && !isObject$5(val = call$4(fn, input))) return val;
409
+ if (pref !== 'string' && isCallable$8(fn = input.toString) && !isObject$5(val = call$4(fn, input))) return val;
410
+ throw new $TypeError$3("Can't convert object to primitive value");
411
+ };
412
+
413
+ var call$3 = functionCall;
414
+ var isObject$4 = isObject$8;
415
+ var isSymbol$1 = isSymbol$2;
416
+ var getMethod = getMethod$1;
417
+ var ordinaryToPrimitive = ordinaryToPrimitive$1;
418
+ var wellKnownSymbol$5 = wellKnownSymbol$6;
419
+
420
+ var $TypeError$2 = TypeError;
421
+ var TO_PRIMITIVE = wellKnownSymbol$5('toPrimitive');
422
+
423
+ // `ToPrimitive` abstract operation
424
+ // https://tc39.es/ecma262/#sec-toprimitive
425
+ var toPrimitive$1 = function (input, pref) {
426
+ if (!isObject$4(input) || isSymbol$1(input)) return input;
427
+ var exoticToPrim = getMethod(input, TO_PRIMITIVE);
428
+ var result;
429
+ if (exoticToPrim) {
430
+ if (pref === undefined) pref = 'default';
431
+ result = call$3(exoticToPrim, input, pref);
432
+ if (!isObject$4(result) || isSymbol$1(result)) return result;
433
+ throw new $TypeError$2("Can't convert object to primitive value");
434
+ }
435
+ if (pref === undefined) pref = 'number';
436
+ return ordinaryToPrimitive(input, pref);
437
+ };
438
+
439
+ var toPrimitive = toPrimitive$1;
440
+ var isSymbol = isSymbol$2;
441
+
442
+ // `ToPropertyKey` abstract operation
443
+ // https://tc39.es/ecma262/#sec-topropertykey
444
+ var toPropertyKey$2 = function (argument) {
445
+ var key = toPrimitive(argument, 'string');
446
+ return isSymbol(key) ? key : key + '';
447
+ };
448
+
449
+ var DESCRIPTORS$7 = descriptors;
450
+ var IE8_DOM_DEFINE$1 = ie8DomDefine;
451
+ var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
452
+ var anObject$3 = anObject$4;
453
+ var toPropertyKey$1 = toPropertyKey$2;
454
+
455
+ var $TypeError$1 = TypeError;
456
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
457
+ var $defineProperty = Object.defineProperty;
458
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
459
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
460
+ var ENUMERABLE = 'enumerable';
461
+ var CONFIGURABLE$1 = 'configurable';
462
+ var WRITABLE = 'writable';
463
+
464
+ // `Object.defineProperty` method
465
+ // https://tc39.es/ecma262/#sec-object.defineproperty
466
+ objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
467
+ anObject$3(O);
468
+ P = toPropertyKey$1(P);
469
+ anObject$3(Attributes);
470
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
471
+ var current = $getOwnPropertyDescriptor$1(O, P);
472
+ if (current && current[WRITABLE]) {
473
+ O[P] = Attributes.value;
474
+ Attributes = {
475
+ configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
476
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
477
+ writable: false
478
+ };
479
+ }
480
+ } return $defineProperty(O, P, Attributes);
481
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
482
+ anObject$3(O);
483
+ P = toPropertyKey$1(P);
484
+ anObject$3(Attributes);
485
+ if (IE8_DOM_DEFINE$1) try {
486
+ return $defineProperty(O, P, Attributes);
487
+ } catch (error) { /* empty */ }
488
+ if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$1('Accessors not supported');
489
+ if ('value' in Attributes) O[P] = Attributes.value;
490
+ return O;
491
+ };
492
+
493
+ var ceil = Math.ceil;
494
+ var floor = Math.floor;
495
+
496
+ // `Math.trunc` method
497
+ // https://tc39.es/ecma262/#sec-math.trunc
498
+ // eslint-disable-next-line es/no-math-trunc -- safe
499
+ var mathTrunc = Math.trunc || function trunc(x) {
500
+ var n = +x;
501
+ return (n > 0 ? floor : ceil)(n);
502
+ };
503
+
504
+ var trunc = mathTrunc;
505
+
506
+ // `ToIntegerOrInfinity` abstract operation
507
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
508
+ var toIntegerOrInfinity$2 = function (argument) {
509
+ var number = +argument;
510
+ // eslint-disable-next-line no-self-compare -- NaN check
511
+ return number !== number || number === 0 ? 0 : trunc(number);
512
+ };
513
+
514
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
515
+
516
+ var max = Math.max;
517
+ var min$1 = Math.min;
518
+
519
+ // Helper for a popular repeating case of the spec:
520
+ // Let integer be ? ToInteger(index).
521
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
522
+ var toAbsoluteIndex$1 = function (index, length) {
523
+ var integer = toIntegerOrInfinity$1(index);
524
+ return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
525
+ };
526
+
527
+ var toIntegerOrInfinity = toIntegerOrInfinity$2;
528
+
529
+ var min = Math.min;
530
+
531
+ // `ToLength` abstract operation
532
+ // https://tc39.es/ecma262/#sec-tolength
533
+ var toLength$1 = function (argument) {
534
+ var len = toIntegerOrInfinity(argument);
535
+ return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
536
+ };
537
+
538
+ var toLength = toLength$1;
539
+
540
+ // `LengthOfArrayLike` abstract operation
541
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
542
+ var lengthOfArrayLike$1 = function (obj) {
543
+ return toLength(obj.length);
544
+ };
545
+
546
+ var toIndexedObject$4 = toIndexedObject$5;
547
+ var toAbsoluteIndex = toAbsoluteIndex$1;
548
+ var lengthOfArrayLike = lengthOfArrayLike$1;
549
+
550
+ // `Array.prototype.{ indexOf, includes }` methods implementation
551
+ var createMethod = function (IS_INCLUDES) {
552
+ return function ($this, el, fromIndex) {
553
+ var O = toIndexedObject$4($this);
554
+ var length = lengthOfArrayLike(O);
555
+ if (length === 0) return !IS_INCLUDES && -1;
556
+ var index = toAbsoluteIndex(fromIndex, length);
557
+ var value;
558
+ // Array#includes uses SameValueZero equality algorithm
559
+ // eslint-disable-next-line no-self-compare -- NaN check
560
+ if (IS_INCLUDES && el !== el) while (length > index) {
561
+ value = O[index++];
562
+ // eslint-disable-next-line no-self-compare -- NaN check
563
+ if (value !== value) return true;
564
+ // Array#indexOf ignores holes, Array#includes - not
565
+ } else for (;length > index; index++) {
566
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
567
+ } return !IS_INCLUDES && -1;
568
+ };
569
+ };
570
+
571
+ var arrayIncludes = {
572
+ // `Array.prototype.indexOf` method
573
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
574
+ indexOf: createMethod(false)
575
+ };
576
+
577
+ var hiddenKeys$4 = {};
578
+
579
+ var uncurryThis$5 = functionUncurryThis;
580
+ var hasOwn$7 = hasOwnProperty_1;
581
+ var toIndexedObject$3 = toIndexedObject$5;
582
+ var indexOf = arrayIncludes.indexOf;
583
+ var hiddenKeys$3 = hiddenKeys$4;
584
+
585
+ var push = uncurryThis$5([].push);
586
+
587
+ var objectKeysInternal = function (object, names) {
588
+ var O = toIndexedObject$3(object);
589
+ var i = 0;
590
+ var result = [];
591
+ var key;
592
+ for (key in O) !hasOwn$7(hiddenKeys$3, key) && hasOwn$7(O, key) && push(result, key);
593
+ // Don't enum bug & hidden keys
594
+ while (names.length > i) if (hasOwn$7(O, key = names[i++])) {
595
+ ~indexOf(result, key) || push(result, key);
596
+ }
597
+ return result;
598
+ };
599
+
600
+ // IE8- don't enum bug keys
601
+ var enumBugKeys$3 = [
602
+ 'constructor',
603
+ 'hasOwnProperty',
604
+ 'isPrototypeOf',
605
+ 'propertyIsEnumerable',
606
+ 'toLocaleString',
607
+ 'toString',
608
+ 'valueOf'
609
+ ];
610
+
611
+ var internalObjectKeys$1 = objectKeysInternal;
612
+ var enumBugKeys$2 = enumBugKeys$3;
613
+
614
+ // `Object.keys` method
615
+ // https://tc39.es/ecma262/#sec-object.keys
616
+ // eslint-disable-next-line es/no-object-keys -- safe
617
+ var objectKeys$2 = Object.keys || function keys(O) {
618
+ return internalObjectKeys$1(O, enumBugKeys$2);
619
+ };
620
+
621
+ var DESCRIPTORS$6 = descriptors;
622
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
623
+ var definePropertyModule$3 = objectDefineProperty;
624
+ var anObject$2 = anObject$4;
625
+ var toIndexedObject$2 = toIndexedObject$5;
626
+ var objectKeys$1 = objectKeys$2;
627
+
628
+ // `Object.defineProperties` method
629
+ // https://tc39.es/ecma262/#sec-object.defineproperties
630
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
631
+ objectDefineProperties.f = DESCRIPTORS$6 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
632
+ anObject$2(O);
633
+ var props = toIndexedObject$2(Properties);
634
+ var keys = objectKeys$1(Properties);
635
+ var length = keys.length;
636
+ var index = 0;
637
+ var key;
638
+ while (length > index) definePropertyModule$3.f(O, key = keys[index++], props[key]);
639
+ return O;
640
+ };
641
+
642
+ var getBuiltIn$1 = getBuiltIn$3;
643
+
644
+ var html$1 = getBuiltIn$1('document', 'documentElement');
645
+
646
+ var shared$1 = shared$3;
647
+ var uid = uid$2;
648
+
649
+ var keys = shared$1('keys');
650
+
651
+ var sharedKey$3 = function (key) {
652
+ return keys[key] || (keys[key] = uid(key));
653
+ };
654
+
655
+ /* global ActiveXObject -- old IE, WSH */
656
+ var anObject$1 = anObject$4;
657
+ var definePropertiesModule = objectDefineProperties;
658
+ var enumBugKeys$1 = enumBugKeys$3;
659
+ var hiddenKeys$2 = hiddenKeys$4;
660
+ var html = html$1;
661
+ var documentCreateElement$1 = documentCreateElement$2;
662
+ var sharedKey$2 = sharedKey$3;
663
+
664
+ var GT = '>';
665
+ var LT = '<';
666
+ var PROTOTYPE = 'prototype';
667
+ var SCRIPT = 'script';
668
+ var IE_PROTO$1 = sharedKey$2('IE_PROTO');
669
+
670
+ var EmptyConstructor = function () { /* empty */ };
671
+
672
+ var scriptTag = function (content) {
673
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
674
+ };
675
+
676
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
677
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
678
+ activeXDocument.write(scriptTag(''));
679
+ activeXDocument.close();
680
+ var temp = activeXDocument.parentWindow.Object;
681
+ // eslint-disable-next-line no-useless-assignment -- avoid memory leak
682
+ activeXDocument = null;
683
+ return temp;
684
+ };
685
+
686
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
687
+ var NullProtoObjectViaIFrame = function () {
688
+ // Thrash, waste and sodomy: IE GC bug
689
+ var iframe = documentCreateElement$1('iframe');
690
+ var JS = 'java' + SCRIPT + ':';
691
+ var iframeDocument;
692
+ iframe.style.display = 'none';
693
+ html.appendChild(iframe);
694
+ // https://github.com/zloirock/core-js/issues/475
695
+ iframe.src = String(JS);
696
+ iframeDocument = iframe.contentWindow.document;
697
+ iframeDocument.open();
698
+ iframeDocument.write(scriptTag('document.F=Object'));
699
+ iframeDocument.close();
700
+ return iframeDocument.F;
701
+ };
702
+
703
+ // Check for document.domain and active x support
704
+ // No need to use active x approach when document.domain is not set
705
+ // see https://github.com/es-shims/es5-shim/issues/150
706
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
707
+ // avoid IE GC bug
708
+ var activeXDocument;
709
+ var NullProtoObject = function () {
710
+ try {
711
+ activeXDocument = new ActiveXObject('htmlfile');
712
+ } catch (error) { /* ignore */ }
713
+ NullProtoObject = typeof document != 'undefined'
714
+ ? document.domain && activeXDocument
715
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
716
+ : NullProtoObjectViaIFrame()
717
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
718
+ var length = enumBugKeys$1.length;
719
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys$1[length]];
720
+ return NullProtoObject();
721
+ };
722
+
723
+ hiddenKeys$2[IE_PROTO$1] = true;
724
+
725
+ // `Object.create` method
726
+ // https://tc39.es/ecma262/#sec-object.create
727
+ // eslint-disable-next-line es/no-object-create -- safe
728
+ var objectCreate = Object.create || function create(O, Properties) {
729
+ var result;
730
+ if (O !== null) {
731
+ EmptyConstructor[PROTOTYPE] = anObject$1(O);
732
+ result = new EmptyConstructor();
733
+ EmptyConstructor[PROTOTYPE] = null;
734
+ // add "__proto__" for Object.getPrototypeOf polyfill
735
+ result[IE_PROTO$1] = O;
736
+ } else result = NullProtoObject();
737
+ return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
738
+ };
739
+
740
+ var wellKnownSymbol$4 = wellKnownSymbol$6;
741
+ var create$1 = objectCreate;
742
+ var defineProperty$4 = objectDefineProperty.f;
743
+
744
+ var UNSCOPABLES = wellKnownSymbol$4('unscopables');
745
+ var ArrayPrototype = Array.prototype;
746
+
747
+ // Array.prototype[@@unscopables]
748
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
749
+ if (ArrayPrototype[UNSCOPABLES] === undefined) {
750
+ defineProperty$4(ArrayPrototype, UNSCOPABLES, {
751
+ configurable: true,
752
+ value: create$1(null)
753
+ });
754
+ }
755
+
756
+ // add a key to Array.prototype[@@unscopables]
757
+ var addToUnscopables$1 = function (key) {
758
+ ArrayPrototype[UNSCOPABLES][key] = true;
759
+ };
760
+
761
+ var iterators = {};
762
+
763
+ var globalThis$4 = globalThis_1;
764
+ var isCallable$7 = isCallable$d;
765
+
766
+ var WeakMap$1 = globalThis$4.WeakMap;
767
+
768
+ var weakMapBasicDetection = isCallable$7(WeakMap$1) && /native code/.test(String(WeakMap$1));
769
+
770
+ var createPropertyDescriptor$3 = function (bitmap, value) {
771
+ return {
772
+ enumerable: !(bitmap & 1),
773
+ configurable: !(bitmap & 2),
774
+ writable: !(bitmap & 4),
775
+ value: value
776
+ };
777
+ };
778
+
779
+ var DESCRIPTORS$5 = descriptors;
780
+ var definePropertyModule$2 = objectDefineProperty;
781
+ var createPropertyDescriptor$2 = createPropertyDescriptor$3;
782
+
783
+ var createNonEnumerableProperty$4 = DESCRIPTORS$5 ? function (object, key, value) {
784
+ return definePropertyModule$2.f(object, key, createPropertyDescriptor$2(1, value));
785
+ } : function (object, key, value) {
786
+ object[key] = value;
787
+ return object;
788
+ };
789
+
790
+ var NATIVE_WEAK_MAP = weakMapBasicDetection;
791
+ var globalThis$3 = globalThis_1;
792
+ var isObject$3 = isObject$8;
793
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
794
+ var hasOwn$6 = hasOwnProperty_1;
795
+ var shared = sharedStoreExports;
796
+ var sharedKey$1 = sharedKey$3;
797
+ var hiddenKeys$1 = hiddenKeys$4;
798
+
799
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
800
+ var TypeError$1 = globalThis$3.TypeError;
801
+ var WeakMap = globalThis$3.WeakMap;
802
+ var set, get, has;
803
+
804
+ var enforce = function (it) {
805
+ return has(it) ? get(it) : set(it, {});
806
+ };
807
+
808
+ var getterFor = function (TYPE) {
809
+ return function (it) {
810
+ var state;
811
+ if (!isObject$3(it) || (state = get(it)).type !== TYPE) {
812
+ throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
813
+ } return state;
814
+ };
815
+ };
816
+
817
+ if (NATIVE_WEAK_MAP || shared.state) {
818
+ var store$1 = shared.state || (shared.state = new WeakMap());
819
+ /* eslint-disable no-self-assign -- prototype methods protection */
820
+ store$1.get = store$1.get;
821
+ store$1.has = store$1.has;
822
+ store$1.set = store$1.set;
823
+ /* eslint-enable no-self-assign -- prototype methods protection */
824
+ set = function (it, metadata) {
825
+ if (store$1.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
826
+ metadata.facade = it;
827
+ store$1.set(it, metadata);
828
+ return metadata;
829
+ };
830
+ get = function (it) {
831
+ return store$1.get(it) || {};
832
+ };
833
+ has = function (it) {
834
+ return store$1.has(it);
835
+ };
836
+ } else {
837
+ var STATE = sharedKey$1('state');
838
+ hiddenKeys$1[STATE] = true;
839
+ set = function (it, metadata) {
840
+ if (hasOwn$6(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
841
+ metadata.facade = it;
842
+ createNonEnumerableProperty$3(it, STATE, metadata);
843
+ return metadata;
844
+ };
845
+ get = function (it) {
846
+ return hasOwn$6(it, STATE) ? it[STATE] : {};
847
+ };
848
+ has = function (it) {
849
+ return hasOwn$6(it, STATE);
850
+ };
851
+ }
852
+
853
+ var internalState = {
854
+ set: set,
855
+ get: get,
856
+ has: has,
857
+ enforce: enforce,
858
+ getterFor: getterFor
859
+ };
860
+
861
+ var objectGetOwnPropertyDescriptor = {};
862
+
863
+ var objectPropertyIsEnumerable = {};
864
+
865
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
866
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
867
+ var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
868
+
869
+ // Nashorn ~ JDK8 bug
870
+ var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
871
+
872
+ // `Object.prototype.propertyIsEnumerable` method implementation
873
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
874
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
875
+ var descriptor = getOwnPropertyDescriptor$1(this, V);
876
+ return !!descriptor && descriptor.enumerable;
877
+ } : $propertyIsEnumerable;
878
+
879
+ var DESCRIPTORS$4 = descriptors;
880
+ var call$2 = functionCall;
881
+ var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
882
+ var createPropertyDescriptor$1 = createPropertyDescriptor$3;
883
+ var toIndexedObject$1 = toIndexedObject$5;
884
+ var toPropertyKey = toPropertyKey$2;
885
+ var hasOwn$5 = hasOwnProperty_1;
886
+ var IE8_DOM_DEFINE = ie8DomDefine;
887
+
888
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
889
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
890
+
891
+ // `Object.getOwnPropertyDescriptor` method
892
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
893
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$4 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
894
+ O = toIndexedObject$1(O);
895
+ P = toPropertyKey(P);
896
+ if (IE8_DOM_DEFINE) try {
897
+ return $getOwnPropertyDescriptor(O, P);
898
+ } catch (error) { /* empty */ }
899
+ if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!call$2(propertyIsEnumerableModule$1.f, O, P), O[P]);
900
+ };
901
+
902
+ var makeBuiltIn$2 = {exports: {}};
903
+
904
+ var DESCRIPTORS$3 = descriptors;
905
+ var hasOwn$4 = hasOwnProperty_1;
906
+
907
+ var FunctionPrototype = Function.prototype;
908
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
909
+ var getDescriptor = DESCRIPTORS$3 && Object.getOwnPropertyDescriptor;
910
+
911
+ var EXISTS = hasOwn$4(FunctionPrototype, 'name');
912
+ // additional protection from minified / mangled / dropped function names
913
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
914
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$3 || (DESCRIPTORS$3 && getDescriptor(FunctionPrototype, 'name').configurable));
915
+
916
+ var functionName = {
917
+ PROPER: PROPER,
918
+ CONFIGURABLE: CONFIGURABLE
919
+ };
920
+
921
+ var uncurryThis$4 = functionUncurryThis;
922
+ var isCallable$6 = isCallable$d;
923
+ var store = sharedStoreExports;
924
+
925
+ var functionToString = uncurryThis$4(Function.toString);
926
+
927
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
928
+ if (!isCallable$6(store.inspectSource)) {
929
+ store.inspectSource = function (it) {
930
+ return functionToString(it);
931
+ };
932
+ }
933
+
934
+ var inspectSource$1 = store.inspectSource;
935
+
936
+ var uncurryThis$3 = functionUncurryThis;
937
+ var fails$4 = fails$b;
938
+ var isCallable$5 = isCallable$d;
939
+ var hasOwn$3 = hasOwnProperty_1;
940
+ var DESCRIPTORS$2 = descriptors;
941
+ var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
942
+ var inspectSource = inspectSource$1;
943
+ var InternalStateModule$1 = internalState;
944
+
945
+ var enforceInternalState = InternalStateModule$1.enforce;
946
+ var getInternalState$1 = InternalStateModule$1.get;
947
+ var $String$1 = String;
948
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
949
+ var defineProperty$3 = Object.defineProperty;
950
+ var stringSlice = uncurryThis$3(''.slice);
951
+ var replace = uncurryThis$3(''.replace);
952
+ var join = uncurryThis$3([].join);
953
+
954
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$2 && !fails$4(function () {
955
+ return defineProperty$3(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
956
+ });
957
+
958
+ var TEMPLATE = String(String).split('String');
959
+
960
+ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
961
+ if (stringSlice($String$1(name), 0, 7) === 'Symbol(') {
962
+ name = '[' + replace($String$1(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
963
+ }
964
+ if (options && options.getter) name = 'get ' + name;
965
+ if (options && options.setter) name = 'set ' + name;
966
+ if (!hasOwn$3(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
967
+ if (DESCRIPTORS$2) defineProperty$3(value, 'name', { value: name, configurable: true });
968
+ else value.name = name;
969
+ }
970
+ if (CONFIGURABLE_LENGTH && options && hasOwn$3(options, 'arity') && value.length !== options.arity) {
971
+ defineProperty$3(value, 'length', { value: options.arity });
972
+ }
973
+ try {
974
+ if (options && hasOwn$3(options, 'constructor') && options.constructor) {
975
+ if (DESCRIPTORS$2) defineProperty$3(value, 'prototype', { writable: false });
976
+ // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
977
+ } else if (value.prototype) value.prototype = undefined;
978
+ } catch (error) { /* empty */ }
979
+ var state = enforceInternalState(value);
980
+ if (!hasOwn$3(state, 'source')) {
981
+ state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
982
+ } return value;
983
+ };
984
+
985
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
986
+ // eslint-disable-next-line no-extend-native -- required
987
+ Function.prototype.toString = makeBuiltIn$1(function toString() {
988
+ return isCallable$5(this) && getInternalState$1(this).source || inspectSource(this);
989
+ }, 'toString');
990
+
991
+ var makeBuiltInExports = makeBuiltIn$2.exports;
992
+
993
+ var isCallable$4 = isCallable$d;
994
+ var definePropertyModule$1 = objectDefineProperty;
995
+ var makeBuiltIn = makeBuiltInExports;
996
+ var defineGlobalProperty$1 = defineGlobalProperty$3;
997
+
998
+ var defineBuiltIn$3 = function (O, key, value, options) {
999
+ if (!options) options = {};
1000
+ var simple = options.enumerable;
1001
+ var name = options.name !== undefined ? options.name : key;
1002
+ if (isCallable$4(value)) makeBuiltIn(value, name, options);
1003
+ if (options.global) {
1004
+ if (simple) O[key] = value;
1005
+ else defineGlobalProperty$1(key, value);
1006
+ } else {
1007
+ try {
1008
+ if (!options.unsafe) delete O[key];
1009
+ else if (O[key]) simple = true;
1010
+ } catch (error) { /* empty */ }
1011
+ if (simple) O[key] = value;
1012
+ else definePropertyModule$1.f(O, key, {
1013
+ value: value,
1014
+ enumerable: false,
1015
+ configurable: !options.nonConfigurable,
1016
+ writable: !options.nonWritable
1017
+ });
1018
+ } return O;
1019
+ };
1020
+
1021
+ var objectGetOwnPropertyNames = {};
1022
+
1023
+ var internalObjectKeys = objectKeysInternal;
1024
+ var enumBugKeys = enumBugKeys$3;
1025
+
1026
+ var hiddenKeys = enumBugKeys.concat('length', 'prototype');
1027
+
1028
+ // `Object.getOwnPropertyNames` method
1029
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
1030
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
1031
+ objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
1032
+ return internalObjectKeys(O, hiddenKeys);
1033
+ };
1034
+
1035
+ var objectGetOwnPropertySymbols = {};
1036
+
1037
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
1038
+ objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
1039
+
1040
+ var getBuiltIn = getBuiltIn$3;
1041
+ var uncurryThis$2 = functionUncurryThis;
1042
+ var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
1043
+ var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
1044
+ var anObject = anObject$4;
1045
+
1046
+ var concat$1 = uncurryThis$2([].concat);
1047
+
1048
+ // all object keys, includes non-enumerable and symbols
1049
+ var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
1050
+ var keys = getOwnPropertyNamesModule.f(anObject(it));
1051
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
1052
+ return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
1053
+ };
1054
+
1055
+ var hasOwn$2 = hasOwnProperty_1;
1056
+ var ownKeys = ownKeys$1;
1057
+ var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
1058
+ var definePropertyModule = objectDefineProperty;
1059
+
1060
+ var copyConstructorProperties$1 = function (target, source, exceptions) {
1061
+ var keys = ownKeys(source);
1062
+ var defineProperty = definePropertyModule.f;
1063
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
1064
+ for (var i = 0; i < keys.length; i++) {
1065
+ var key = keys[i];
1066
+ if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
1067
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
1068
+ }
1069
+ }
1070
+ };
1071
+
1072
+ var fails$3 = fails$b;
1073
+ var isCallable$3 = isCallable$d;
1074
+
1075
+ var replacement = /#|\.prototype\./;
1076
+
1077
+ var isForced$1 = function (feature, detection) {
1078
+ var value = data[normalize(feature)];
1079
+ return value === POLYFILL ? true
1080
+ : value === NATIVE ? false
1081
+ : isCallable$3(detection) ? fails$3(detection)
1082
+ : !!detection;
1083
+ };
1084
+
1085
+ var normalize = isForced$1.normalize = function (string) {
1086
+ return String(string).replace(replacement, '.').toLowerCase();
1087
+ };
1088
+
1089
+ var data = isForced$1.data = {};
1090
+ var NATIVE = isForced$1.NATIVE = 'N';
1091
+ var POLYFILL = isForced$1.POLYFILL = 'P';
1092
+
1093
+ var isForced_1 = isForced$1;
1094
+
1095
+ var globalThis$2 = globalThis_1;
1096
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
1097
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
1098
+ var defineBuiltIn$2 = defineBuiltIn$3;
1099
+ var defineGlobalProperty = defineGlobalProperty$3;
1100
+ var copyConstructorProperties = copyConstructorProperties$1;
1101
+ var isForced = isForced_1;
1102
+
1103
+ /*
1104
+ options.target - name of the target object
1105
+ options.global - target is the global object
1106
+ options.stat - export as static methods of target
1107
+ options.proto - export as prototype methods of target
1108
+ options.real - real prototype method for the `pure` version
1109
+ options.forced - export even if the native feature is available
1110
+ options.bind - bind methods to the target, required for the `pure` version
1111
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
1112
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
1113
+ options.sham - add a flag to not completely full polyfills
1114
+ options.enumerable - export as enumerable property
1115
+ options.dontCallGetSet - prevent calling a getter on target
1116
+ options.name - the .name of the function if it does not match the key
1117
+ */
1118
+ var _export = function (options, source) {
1119
+ var TARGET = options.target;
1120
+ var GLOBAL = options.global;
1121
+ var STATIC = options.stat;
1122
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
1123
+ if (GLOBAL) {
1124
+ target = globalThis$2;
1125
+ } else if (STATIC) {
1126
+ target = globalThis$2[TARGET] || defineGlobalProperty(TARGET, {});
1127
+ } else {
1128
+ target = globalThis$2[TARGET] && globalThis$2[TARGET].prototype;
1129
+ }
1130
+ if (target) for (key in source) {
1131
+ sourceProperty = source[key];
1132
+ if (options.dontCallGetSet) {
1133
+ descriptor = getOwnPropertyDescriptor(target, key);
1134
+ targetProperty = descriptor && descriptor.value;
1135
+ } else targetProperty = target[key];
1136
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1137
+ // contained in target
1138
+ if (!FORCED && targetProperty !== undefined) {
1139
+ if (typeof sourceProperty == typeof targetProperty) continue;
1140
+ copyConstructorProperties(sourceProperty, targetProperty);
1141
+ }
1142
+ // add a flag to not completely full polyfills
1143
+ if (options.sham || (targetProperty && targetProperty.sham)) {
1144
+ createNonEnumerableProperty$2(sourceProperty, 'sham', true);
1145
+ }
1146
+ defineBuiltIn$2(target, key, sourceProperty, options);
1147
+ }
1148
+ };
1149
+
1150
+ var fails$2 = fails$b;
1151
+
1152
+ var correctPrototypeGetter = !fails$2(function () {
1153
+ function F() { /* empty */ }
1154
+ F.prototype.constructor = null;
1155
+ // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1156
+ return Object.getPrototypeOf(new F()) !== F.prototype;
1157
+ });
1158
+
1159
+ var hasOwn$1 = hasOwnProperty_1;
1160
+ var isCallable$2 = isCallable$d;
1161
+ var toObject$1 = toObject$3;
1162
+ var sharedKey = sharedKey$3;
1163
+ var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1164
+
1165
+ var IE_PROTO = sharedKey('IE_PROTO');
1166
+ var $Object = Object;
1167
+ var ObjectPrototype = $Object.prototype;
1168
+
1169
+ // `Object.getPrototypeOf` method
1170
+ // https://tc39.es/ecma262/#sec-object.getprototypeof
1171
+ // eslint-disable-next-line es/no-object-getprototypeof -- safe
1172
+ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
1173
+ var object = toObject$1(O);
1174
+ if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
1175
+ var constructor = object.constructor;
1176
+ if (isCallable$2(constructor) && object instanceof constructor) {
1177
+ return constructor.prototype;
1178
+ } return object instanceof $Object ? ObjectPrototype : null;
1179
+ };
1180
+
1181
+ var fails$1 = fails$b;
1182
+ var isCallable$1 = isCallable$d;
1183
+ var isObject$2 = isObject$8;
1184
+ var getPrototypeOf$1 = objectGetPrototypeOf;
1185
+ var defineBuiltIn$1 = defineBuiltIn$3;
1186
+ var wellKnownSymbol$3 = wellKnownSymbol$6;
1187
+
1188
+ var ITERATOR$2 = wellKnownSymbol$3('iterator');
1189
+ var BUGGY_SAFARI_ITERATORS$1 = false;
1190
+
1191
+ // `%IteratorPrototype%` object
1192
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
1193
+ var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
1194
+
1195
+ /* eslint-disable es/no-array-prototype-keys -- safe */
1196
+ if ([].keys) {
1197
+ arrayIterator = [].keys();
1198
+ // Safari 8 has buggy iterators w/o `next`
1199
+ if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
1200
+ else {
1201
+ PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
1202
+ if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
1203
+ }
1204
+ }
1205
+
1206
+ var NEW_ITERATOR_PROTOTYPE = !isObject$2(IteratorPrototype$2) || fails$1(function () {
1207
+ var test = {};
1208
+ // FF44- legacy iterators case
1209
+ return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
1210
+ });
1211
+
1212
+ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1213
+
1214
+ // `%IteratorPrototype%[@@iterator]()` method
1215
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1216
+ if (!isCallable$1(IteratorPrototype$2[ITERATOR$2])) {
1217
+ defineBuiltIn$1(IteratorPrototype$2, ITERATOR$2, function () {
1218
+ return this;
1219
+ });
1220
+ }
1221
+
1222
+ var iteratorsCore = {
1223
+ IteratorPrototype: IteratorPrototype$2,
1224
+ BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1225
+ };
1226
+
1227
+ var defineProperty$2 = objectDefineProperty.f;
1228
+ var hasOwn = hasOwnProperty_1;
1229
+ var wellKnownSymbol$2 = wellKnownSymbol$6;
1230
+
1231
+ var TO_STRING_TAG = wellKnownSymbol$2('toStringTag');
1232
+
1233
+ var setToStringTag$3 = function (target, TAG, STATIC) {
1234
+ if (target && !STATIC) target = target.prototype;
1235
+ if (target && !hasOwn(target, TO_STRING_TAG)) {
1236
+ defineProperty$2(target, TO_STRING_TAG, { configurable: true, value: TAG });
1237
+ }
1238
+ };
1239
+
1240
+ var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1241
+ var create = objectCreate;
1242
+ var createPropertyDescriptor = createPropertyDescriptor$3;
1243
+ var setToStringTag$2 = setToStringTag$3;
1244
+ var Iterators$2 = iterators;
1245
+
1246
+ var returnThis$1 = function () { return this; };
1247
+
1248
+ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1249
+ var TO_STRING_TAG = NAME + ' Iterator';
1250
+ IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1251
+ setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
1252
+ Iterators$2[TO_STRING_TAG] = returnThis$1;
1253
+ return IteratorConstructor;
1254
+ };
1255
+
1256
+ var uncurryThis$1 = functionUncurryThis;
1257
+ var aCallable = aCallable$2;
1258
+
1259
+ var functionUncurryThisAccessor = function (object, key, method) {
1260
+ try {
1261
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1262
+ return uncurryThis$1(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
1263
+ } catch (error) { /* empty */ }
1264
+ };
1265
+
1266
+ var isObject$1 = isObject$8;
1267
+
1268
+ var isPossiblePrototype$1 = function (argument) {
1269
+ return isObject$1(argument) || argument === null;
1270
+ };
1271
+
1272
+ var isPossiblePrototype = isPossiblePrototype$1;
1273
+
1274
+ var $String = String;
1275
+ var $TypeError = TypeError;
1276
+
1277
+ var aPossiblePrototype$1 = function (argument) {
1278
+ if (isPossiblePrototype(argument)) return argument;
1279
+ throw new $TypeError("Can't set " + $String(argument) + ' as a prototype');
1280
+ };
1281
+
1282
+ /* eslint-disable no-proto -- safe */
1283
+ var uncurryThisAccessor = functionUncurryThisAccessor;
1284
+ var isObject = isObject$8;
1285
+ var requireObjectCoercible = requireObjectCoercible$3;
1286
+ var aPossiblePrototype = aPossiblePrototype$1;
1287
+
1288
+ // `Object.setPrototypeOf` method
1289
+ // https://tc39.es/ecma262/#sec-object.setprototypeof
1290
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
1291
+ // eslint-disable-next-line es/no-object-setprototypeof -- safe
1292
+ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1293
+ var CORRECT_SETTER = false;
1294
+ var test = {};
1295
+ var setter;
1296
+ try {
1297
+ setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
1298
+ setter(test, []);
1299
+ CORRECT_SETTER = test instanceof Array;
1300
+ } catch (error) { /* empty */ }
1301
+ return function setPrototypeOf(O, proto) {
1302
+ requireObjectCoercible(O);
1303
+ aPossiblePrototype(proto);
1304
+ if (!isObject(O)) return O;
1305
+ if (CORRECT_SETTER) setter(O, proto);
1306
+ else O.__proto__ = proto;
1307
+ return O;
1308
+ };
1309
+ }() : undefined);
1310
+
1311
+ var $$1 = _export;
1312
+ var call$1 = functionCall;
1313
+ var FunctionName = functionName;
1314
+ var isCallable = isCallable$d;
1315
+ var createIteratorConstructor = iteratorCreateConstructor;
1316
+ var getPrototypeOf = objectGetPrototypeOf;
1317
+ var setPrototypeOf = objectSetPrototypeOf;
1318
+ var setToStringTag$1 = setToStringTag$3;
1319
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
1320
+ var defineBuiltIn = defineBuiltIn$3;
1321
+ var wellKnownSymbol$1 = wellKnownSymbol$6;
1322
+ var Iterators$1 = iterators;
1323
+ var IteratorsCore = iteratorsCore;
1324
+
1325
+ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
1326
+ var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1327
+ var IteratorPrototype = IteratorsCore.IteratorPrototype;
1328
+ var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
1329
+ var ITERATOR$1 = wellKnownSymbol$1('iterator');
1330
+ var KEYS = 'keys';
1331
+ var VALUES = 'values';
1332
+ var ENTRIES = 'entries';
1333
+
1334
+ var returnThis = function () { return this; };
1335
+
1336
+ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1337
+ createIteratorConstructor(IteratorConstructor, NAME, next);
1338
+
1339
+ var getIterationMethod = function (KIND) {
1340
+ if (KIND === DEFAULT && defaultIterator) return defaultIterator;
1341
+ if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];
1342
+
1343
+ switch (KIND) {
1344
+ case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
1345
+ case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
1346
+ case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
1347
+ }
1348
+
1349
+ return function () { return new IteratorConstructor(this); };
1350
+ };
1351
+
1352
+ var TO_STRING_TAG = NAME + ' Iterator';
1353
+ var INCORRECT_VALUES_NAME = false;
1354
+ var IterablePrototype = Iterable.prototype;
1355
+ var nativeIterator = IterablePrototype[ITERATOR$1]
1356
+ || IterablePrototype['@@iterator']
1357
+ || DEFAULT && IterablePrototype[DEFAULT];
1358
+ var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
1359
+ var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
1360
+ var CurrentIteratorPrototype, methods, KEY;
1361
+
1362
+ // fix native
1363
+ if (anyNativeIterator) {
1364
+ CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
1365
+ if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
1366
+ if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1367
+ if (setPrototypeOf) {
1368
+ setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
1369
+ } else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) {
1370
+ defineBuiltIn(CurrentIteratorPrototype, ITERATOR$1, returnThis);
1371
+ }
1372
+ }
1373
+ // Set @@toStringTag to native iterators
1374
+ setToStringTag$1(CurrentIteratorPrototype, TO_STRING_TAG, true);
1375
+ }
1376
+ }
1377
+
1378
+ // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
1379
+ if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1380
+ if (CONFIGURABLE_FUNCTION_NAME) {
1381
+ createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
1382
+ } else {
1383
+ INCORRECT_VALUES_NAME = true;
1384
+ defaultIterator = function values() { return call$1(nativeIterator, this); };
1385
+ }
1386
+ }
1387
+
1388
+ // export additional methods
1389
+ if (DEFAULT) {
1390
+ methods = {
1391
+ values: getIterationMethod(VALUES),
1392
+ keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
1393
+ entries: getIterationMethod(ENTRIES)
1394
+ };
1395
+ if (FORCED) for (KEY in methods) {
1396
+ if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1397
+ defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
1398
+ }
1399
+ } else $$1({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1400
+ }
1401
+
1402
+ // define iterator
1403
+ if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
1404
+ defineBuiltIn(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
1405
+ }
1406
+ Iterators$1[NAME] = defaultIterator;
1407
+
1408
+ return methods;
1409
+ };
1410
+
1411
+ // `CreateIterResultObject` abstract operation
1412
+ // https://tc39.es/ecma262/#sec-createiterresultobject
1413
+ var createIterResultObject$1 = function (value, done) {
1414
+ return { value: value, done: done };
1415
+ };
1416
+
1417
+ var toIndexedObject = toIndexedObject$5;
1418
+ var addToUnscopables = addToUnscopables$1;
1419
+ var Iterators = iterators;
1420
+ var InternalStateModule = internalState;
1421
+ var defineProperty$1 = objectDefineProperty.f;
1422
+ var defineIterator = iteratorDefine;
1423
+ var createIterResultObject = createIterResultObject$1;
1424
+ var DESCRIPTORS$1 = descriptors;
1425
+
1426
+ var ARRAY_ITERATOR = 'Array Iterator';
1427
+ var setInternalState = InternalStateModule.set;
1428
+ var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
1429
+
1430
+ // `Array.prototype.entries` method
1431
+ // https://tc39.es/ecma262/#sec-array.prototype.entries
1432
+ // `Array.prototype.keys` method
1433
+ // https://tc39.es/ecma262/#sec-array.prototype.keys
1434
+ // `Array.prototype.values` method
1435
+ // https://tc39.es/ecma262/#sec-array.prototype.values
1436
+ // `Array.prototype[@@iterator]` method
1437
+ // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
1438
+ // `CreateArrayIterator` internal method
1439
+ // https://tc39.es/ecma262/#sec-createarrayiterator
1440
+ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
1441
+ setInternalState(this, {
1442
+ type: ARRAY_ITERATOR,
1443
+ target: toIndexedObject(iterated), // target
1444
+ index: 0, // next index
1445
+ kind: kind // kind
1446
+ });
1447
+ // `%ArrayIteratorPrototype%.next` method
1448
+ // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
1449
+ }, function () {
1450
+ var state = getInternalState(this);
1451
+ var target = state.target;
1452
+ var index = state.index++;
1453
+ if (!target || index >= target.length) {
1454
+ state.target = null;
1455
+ return createIterResultObject(undefined, true);
1456
+ }
1457
+ switch (state.kind) {
1458
+ case 'keys': return createIterResultObject(index, false);
1459
+ case 'values': return createIterResultObject(target[index], false);
1460
+ } return createIterResultObject([index, target[index]], false);
1461
+ }, 'values');
1462
+
1463
+ // argumentsList[@@iterator] is %ArrayProto_values%
1464
+ // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
1465
+ // https://tc39.es/ecma262/#sec-createmappedargumentsobject
1466
+ var values = Iterators.Arguments = Iterators.Array;
1467
+
1468
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1469
+ addToUnscopables('keys');
1470
+ addToUnscopables('values');
1471
+ addToUnscopables('entries');
1472
+
1473
+ // V8 ~ Chrome 45- bug
1474
+ if (DESCRIPTORS$1 && values.name !== 'values') try {
1475
+ defineProperty$1(values, 'name', { value: 'values' });
1476
+ } catch (error) { /* empty */ }
1477
+
1478
+ var DESCRIPTORS = descriptors;
1479
+ var uncurryThis = functionUncurryThis;
1480
+ var call = functionCall;
1481
+ var fails = fails$b;
1482
+ var objectKeys = objectKeys$2;
1483
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1484
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1485
+ var toObject = toObject$3;
1486
+ var IndexedObject = indexedObject;
1487
+
1488
+ // eslint-disable-next-line es/no-object-assign -- safe
1489
+ var $assign = Object.assign;
1490
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1491
+ var defineProperty = Object.defineProperty;
1492
+ var concat = uncurryThis([].concat);
1493
+
1494
+ // `Object.assign` method
1495
+ // https://tc39.es/ecma262/#sec-object.assign
1496
+ var objectAssign = !$assign || fails(function () {
1497
+ // should have correct order of operations (Edge bug)
1498
+ if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
1499
+ enumerable: true,
1500
+ get: function () {
1501
+ defineProperty(this, 'b', {
1502
+ value: 3,
1503
+ enumerable: false
1504
+ });
1505
+ }
1506
+ }), { b: 2 })).b !== 1) return true;
1507
+ // should work with symbols and should have deterministic property order (V8 bug)
1508
+ var A = {};
1509
+ var B = {};
1510
+ // eslint-disable-next-line es/no-symbol -- safe
1511
+ var symbol = Symbol('assign detection');
1512
+ var alphabet = 'abcdefghijklmnopqrst';
1513
+ A[symbol] = 7;
1514
+ // eslint-disable-next-line es/no-array-prototype-foreach -- safe
1515
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1516
+ return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
1517
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1518
+ var T = toObject(target);
1519
+ var argumentsLength = arguments.length;
1520
+ var index = 1;
1521
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1522
+ var propertyIsEnumerable = propertyIsEnumerableModule.f;
1523
+ while (argumentsLength > index) {
1524
+ var S = IndexedObject(arguments[index++]);
1525
+ var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
1526
+ var length = keys.length;
1527
+ var j = 0;
1528
+ var key;
1529
+ while (length > j) {
1530
+ key = keys[j++];
1531
+ if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
1532
+ }
1533
+ } return T;
1534
+ } : $assign;
1535
+
1536
+ var $ = _export;
1537
+ var assign = objectAssign;
1538
+
1539
+ // `Object.assign` method
1540
+ // https://tc39.es/ecma262/#sec-object.assign
1541
+ // eslint-disable-next-line es/no-object-assign -- required for testing
1542
+ $({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1543
+ assign: assign
1544
+ });
1545
+
1546
+ // iterable DOM collections
1547
+ // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1548
+ var domIterables = {
1549
+ CSSRuleList: 0,
1550
+ CSSStyleDeclaration: 0,
1551
+ CSSValueList: 0,
1552
+ ClientRectList: 0,
1553
+ DOMRectList: 0,
1554
+ DOMStringList: 0,
1555
+ DOMTokenList: 1,
1556
+ DataTransferItemList: 0,
1557
+ FileList: 0,
1558
+ HTMLAllCollection: 0,
1559
+ HTMLCollection: 0,
1560
+ HTMLFormElement: 0,
1561
+ HTMLSelectElement: 0,
1562
+ MediaList: 0,
1563
+ MimeTypeArray: 0,
1564
+ NamedNodeMap: 0,
1565
+ NodeList: 1,
1566
+ PaintRequestList: 0,
1567
+ Plugin: 0,
1568
+ PluginArray: 0,
1569
+ SVGLengthList: 0,
1570
+ SVGNumberList: 0,
1571
+ SVGPathSegList: 0,
1572
+ SVGPointList: 0,
1573
+ SVGStringList: 0,
1574
+ SVGTransformList: 0,
1575
+ SourceBufferList: 0,
1576
+ StyleSheetList: 0,
1577
+ TextTrackCueList: 0,
1578
+ TextTrackList: 0,
1579
+ TouchList: 0
1580
+ };
1581
+
1582
+ // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
1583
+ var documentCreateElement = documentCreateElement$2;
1584
+
1585
+ var classList = documentCreateElement('span').classList;
1586
+ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
1587
+
1588
+ var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1589
+
1590
+ var globalThis$1 = globalThis_1;
1591
+ var DOMIterables = domIterables;
1592
+ var DOMTokenListPrototype = domTokenListPrototype;
1593
+ var ArrayIteratorMethods = es_array_iterator;
1594
+ var createNonEnumerableProperty = createNonEnumerableProperty$4;
1595
+ var setToStringTag = setToStringTag$3;
1596
+ var wellKnownSymbol = wellKnownSymbol$6;
1597
+
1598
+ var ITERATOR = wellKnownSymbol('iterator');
1599
+ var ArrayValues = ArrayIteratorMethods.values;
1600
+
1601
+ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1602
+ if (CollectionPrototype) {
1603
+ // some Chrome versions have non-configurable methods on DOMTokenList
1604
+ if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
1605
+ createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
1606
+ } catch (error) {
1607
+ CollectionPrototype[ITERATOR] = ArrayValues;
1608
+ }
1609
+ setToStringTag(CollectionPrototype, COLLECTION_NAME, true);
1610
+ if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
1611
+ // some Chrome versions have non-configurable methods on DOMTokenList
1612
+ if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
1613
+ createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
1614
+ } catch (error) {
1615
+ CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
1616
+ }
1617
+ }
1618
+ }
1619
+ };
1620
+
1621
+ for (var COLLECTION_NAME in DOMIterables) {
1622
+ handlePrototype(globalThis$1[COLLECTION_NAME] && globalThis$1[COLLECTION_NAME].prototype, COLLECTION_NAME);
1623
+ }
1624
+
1625
+ handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1626
+
1627
+ /* @ts-self-types="./index.d.ts" */
1628
+ let urlAlphabet =
1629
+ 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
1630
+ let nanoid = (size = 21) => {
1631
+ let id = '';
1632
+ let i = size | 0;
1633
+ while (i--) {
1634
+ id += urlAlphabet[(Math.random() * 64) | 0];
1635
+ }
1636
+ return id
1637
+ };
1638
+
1639
+ const appId = 'kaltura-apps-genie-chat';
1640
+ const GenieChatProvider = ({
1641
+ children,
1642
+ runtimeSettings,
1643
+ lang: _lang = 'en',
1644
+ theme: _theme = 'light',
1645
+ env: _env = 'nvp1'
1646
+ }) => {
1647
+ const [workspace, setWorkspace] = React.useState(null);
1648
+ const workspaceName = useMemo(() => {
1649
+ return `${appId}-${nanoid()}`;
1650
+ }, []);
1651
+ const initialConfiguration = useMemo(() => {
1652
+ return {
1653
+ appId: appId,
1654
+ workspaceName: workspaceName,
1655
+ appVersion: '0.0.0',
1656
+ serverUrl: `https://unisphere.${_env}.ovp.kaltura.com/v1`,
1657
+ runtimes: [{
1658
+ widgetName: 'unisphere.widget.genie',
1659
+ runtimeName: 'chat',
1660
+ settings: runtimeSettings
1661
+ }]
1662
+ };
1663
+ }, [_env, runtimeSettings, workspaceName]);
1664
+ const themeProps = useMemo(() => {
1665
+ if (typeof _theme === 'object') {
1666
+ return {
1667
+ kalturaTheme: _theme
1668
+ };
1669
+ }
1670
+ return {
1671
+ themeMode: _theme
1672
+ };
1673
+ }, [_theme]);
1674
+ return jsx(UnisphereProvider, Object.assign({}, themeProps, {
1675
+ language: _lang,
1676
+ initialConfiguration: initialConfiguration,
1677
+ onWorkspaceLoaded: setWorkspace,
1678
+ children: workspace && jsx(ScopedUnisphereWorkspaceProvider, {
1679
+ unisphereWorkspace: workspace,
1680
+ runtimeLogger: workspace.getLogger(appId),
1681
+ children: children
1682
+ })
1683
+ }));
1684
+ };
1685
+
1686
+ const GenieChat = ({
1687
+ style,
1688
+ settings,
1689
+ initialSettings
1690
+ }) => {
1691
+ const {
1692
+ unisphereWorkspace
1693
+ } = useContext(ScopedUnisphereWorkspaceContext);
1694
+ if (!unisphereWorkspace) {
1695
+ return null;
1696
+ }
1697
+ return jsx(UnisphereRuntimeVisual, {
1698
+ widgetName: "unisphere.widget.genie",
1699
+ runtimeName: "chat",
1700
+ visualType: "page",
1701
+ visualSettings: settings,
1702
+ initialVisualSettings: initialSettings,
1703
+ workspaceName: unisphereWorkspace === null || unisphereWorkspace === void 0 ? void 0 : unisphereWorkspace.getWorkspaceName(),
1704
+ style: Object.assign({
1705
+ width: '100%',
1706
+ height: 'auto',
1707
+ display: 'flex'
1708
+ }, style)
1709
+ });
1710
+ };
1711
+
1712
+ export { GenieChat, GenieChatProvider };