@ninetailed/experience.js-plugin-preview 1.0.1-beta.16

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