@ninetailed/experience.js-react 1.0.0-beta.8 → 1.0.1-beta.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.umd.js CHANGED
@@ -1,13 +1,13 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('@ninetailed/experience.js'), require('react-visibility-sensor')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'react', '@ninetailed/experience.js', 'react-visibility-sensor'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.React = {}, global.React, global.experience_js, global.VisibilitySensor));
5
- })(this, (function (exports, React, experience_js, VisibilitySensor) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('@ninetailed/experience.js'), require('react-intersection-observer'), require('@ninetailed/experience.js-shared'), require('lodash/get')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'react', '@ninetailed/experience.js', 'react-intersection-observer', '@ninetailed/experience.js-shared', 'lodash/get'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.React = {}, global.React, global.experience_js, global.reactIntersectionObserver, global.experience_jsShared, global.get$1));
5
+ })(this, (function (exports, React, experience_js, reactIntersectionObserver, experience_jsShared, get$1) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
9
9
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
10
- var VisibilitySensor__default = /*#__PURE__*/_interopDefaultLegacy(VisibilitySensor);
10
+ var get__default = /*#__PURE__*/_interopDefaultLegacy(get$1);
11
11
 
12
12
  var NinetailedContext = /*#__PURE__*/React.createContext(undefined);
13
13
 
@@ -15,6 +15,7 @@
15
15
  var children = _a.children,
16
16
  clientId = _a.clientId,
17
17
  environment = _a.environment,
18
+ preview = _a.preview,
18
19
  url = _a.url,
19
20
  profile = _a.profile,
20
21
  locale = _a.locale,
@@ -23,7 +24,8 @@
23
24
  var ninetailed = React.useMemo(function () {
24
25
  return new experience_js.Ninetailed({
25
26
  clientId: clientId,
26
- environment: environment
27
+ environment: environment,
28
+ preview: preview
27
29
  }, {
28
30
  url: url,
29
31
  plugins: plugins,
@@ -99,10 +101,6 @@
99
101
  return t;
100
102
  }
101
103
 
102
- var isBrowser = function isBrowser() {
103
- return typeof window !== 'undefined';
104
- };
105
-
106
104
  var usePersonalize = function usePersonalize(baseline, variants, options) {
107
105
  if (options === void 0) {
108
106
  options = {
@@ -114,6 +112,33 @@
114
112
  return experience_js.selectVariant(baseline, variants, profile, options);
115
113
  };
116
114
 
115
+ var TrackHasSeen = function TrackHasSeen(_a) {
116
+ var children = _a.children,
117
+ variant = _a.variant,
118
+ audience = _a.audience,
119
+ isPersonalized = _a.isPersonalized;
120
+ var ninetailed = useNinetailed();
121
+
122
+ var _b = reactIntersectionObserver.useInView({
123
+ triggerOnce: true
124
+ }),
125
+ ref = _b.ref,
126
+ inView = _b.inView;
127
+
128
+ React.useEffect(function () {
129
+ if (experience_jsShared.isBrowser() && inView) {
130
+ ninetailed.trackHasSeenComponent({
131
+ variant: variant,
132
+ audience: audience,
133
+ isPersonalized: isPersonalized
134
+ });
135
+ }
136
+ }, [inView]);
137
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
138
+ ref: ref
139
+ }), children);
140
+ };
141
+
117
142
  var Personalize = function Personalize(_a) {
118
143
  var Component = _a.component,
119
144
  LoadingComponent = _a.loadingComponent,
@@ -129,30 +154,9 @@
129
154
  loading = _d.loading,
130
155
  variant = _d.variant,
131
156
  isPersonalized = _d.isPersonalized,
132
- audience = _d.audience; // const trackSeenComponent = useTrackSeenComponent<P>();
133
-
134
-
135
- var _e = React.useState(false),
136
- isVisible = _e[0],
137
- setIsVisible = _e[1];
157
+ audience = _d.audience;
138
158
 
139
- var onChangeVisibility = React.useCallback(function (visibility) {
140
- if (visibility) {
141
- setIsVisible(true);
142
- }
143
- }, []);
144
- var trackCallFired = React.useRef(false);
145
159
  var hasVariants = variants.length > 0;
146
- React.useEffect(function () {
147
- if (isBrowser() && hasVariants && !loading && isVisible && variant && audience && audience.id !== 'baseline' && !trackCallFired.current) {
148
- // trackSeenComponent({
149
- // variant,
150
- // audience,
151
- // isPersonalized,
152
- // });
153
- trackCallFired.current = true;
154
- }
155
- }, [loading, isVisible, variant, baseline, isPersonalized]);
156
160
 
157
161
  if (!hasVariants) {
158
162
  return /*#__PURE__*/React__default["default"].createElement(Component, __assign({}, baseline, {
@@ -181,11 +185,12 @@
181
185
  })));
182
186
  }
183
187
 
184
- return /*#__PURE__*/React__default["default"].createElement(VisibilitySensor__default["default"], {
185
- key: "".concat(audience.id, "-").concat(variant.id),
186
- partialVisibility: true,
187
- onChange: onChangeVisibility
188
+ return /*#__PURE__*/React__default["default"].createElement(TrackHasSeen, {
189
+ variant: variant,
190
+ audience: audience,
191
+ isPersonalized: isPersonalized
188
192
  }, /*#__PURE__*/React__default["default"].createElement(Component, __assign({}, variant, {
193
+ key: "".concat(audience.id, "-").concat(variant.id),
189
194
  ninetailed: {
190
195
  isPersonalized: isPersonalized,
191
196
  audience: audience
@@ -193,6 +198,1672 @@
193
198
  })));
194
199
  };
195
200
 
201
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
202
+
203
+ var check = function (it) {
204
+ return it && it.Math == Math && it;
205
+ };
206
+
207
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
208
+ var global$r =
209
+ // eslint-disable-next-line es/no-global-this -- safe
210
+ check(typeof globalThis == 'object' && globalThis) ||
211
+ check(typeof window == 'object' && window) ||
212
+ // eslint-disable-next-line no-restricted-globals -- safe
213
+ check(typeof self == 'object' && self) ||
214
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
215
+ // eslint-disable-next-line no-new-func -- fallback
216
+ (function () { return this; })() || Function('return this')();
217
+
218
+ var objectGetOwnPropertyDescriptor = {};
219
+
220
+ var fails$c = function (exec) {
221
+ try {
222
+ return !!exec();
223
+ } catch (error) {
224
+ return true;
225
+ }
226
+ };
227
+
228
+ var fails$b = fails$c;
229
+
230
+ // Detect IE8's incomplete defineProperty implementation
231
+ var descriptors = !fails$b(function () {
232
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
233
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
234
+ });
235
+
236
+ var fails$a = fails$c;
237
+
238
+ var functionBindNative = !fails$a(function () {
239
+ var test = (function () { /* empty */ }).bind();
240
+ // eslint-disable-next-line no-prototype-builtins -- safe
241
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
242
+ });
243
+
244
+ var NATIVE_BIND$2 = functionBindNative;
245
+
246
+ var call$8 = Function.prototype.call;
247
+
248
+ var functionCall = NATIVE_BIND$2 ? call$8.bind(call$8) : function () {
249
+ return call$8.apply(call$8, arguments);
250
+ };
251
+
252
+ var objectPropertyIsEnumerable = {};
253
+
254
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
255
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
256
+ var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
257
+
258
+ // Nashorn ~ JDK8 bug
259
+ var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
260
+
261
+ // `Object.prototype.propertyIsEnumerable` method implementation
262
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
263
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
264
+ var descriptor = getOwnPropertyDescriptor$1(this, V);
265
+ return !!descriptor && descriptor.enumerable;
266
+ } : $propertyIsEnumerable;
267
+
268
+ var createPropertyDescriptor$2 = function (bitmap, value) {
269
+ return {
270
+ enumerable: !(bitmap & 1),
271
+ configurable: !(bitmap & 2),
272
+ writable: !(bitmap & 4),
273
+ value: value
274
+ };
275
+ };
276
+
277
+ var NATIVE_BIND$1 = functionBindNative;
278
+
279
+ var FunctionPrototype$2 = Function.prototype;
280
+ var bind = FunctionPrototype$2.bind;
281
+ var call$7 = FunctionPrototype$2.call;
282
+ var uncurryThis$e = NATIVE_BIND$1 && bind.bind(call$7, call$7);
283
+
284
+ var functionUncurryThis = NATIVE_BIND$1 ? function (fn) {
285
+ return fn && uncurryThis$e(fn);
286
+ } : function (fn) {
287
+ return fn && function () {
288
+ return call$7.apply(fn, arguments);
289
+ };
290
+ };
291
+
292
+ var uncurryThis$d = functionUncurryThis;
293
+
294
+ var toString$5 = uncurryThis$d({}.toString);
295
+ var stringSlice$4 = uncurryThis$d(''.slice);
296
+
297
+ var classofRaw$1 = function (it) {
298
+ return stringSlice$4(toString$5(it), 8, -1);
299
+ };
300
+
301
+ var global$q = global$r;
302
+ var uncurryThis$c = functionUncurryThis;
303
+ var fails$9 = fails$c;
304
+ var classof$3 = classofRaw$1;
305
+
306
+ var Object$4 = global$q.Object;
307
+ var split = uncurryThis$c(''.split);
308
+
309
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
310
+ var indexedObject = fails$9(function () {
311
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
312
+ // eslint-disable-next-line no-prototype-builtins -- safe
313
+ return !Object$4('z').propertyIsEnumerable(0);
314
+ }) ? function (it) {
315
+ return classof$3(it) == 'String' ? split(it, '') : Object$4(it);
316
+ } : Object$4;
317
+
318
+ var global$p = global$r;
319
+
320
+ var TypeError$8 = global$p.TypeError;
321
+
322
+ // `RequireObjectCoercible` abstract operation
323
+ // https://tc39.es/ecma262/#sec-requireobjectcoercible
324
+ var requireObjectCoercible$4 = function (it) {
325
+ if (it == undefined) throw TypeError$8("Can't call method on " + it);
326
+ return it;
327
+ };
328
+
329
+ // toObject with fallback for non-array-like ES3 strings
330
+ var IndexedObject = indexedObject;
331
+ var requireObjectCoercible$3 = requireObjectCoercible$4;
332
+
333
+ var toIndexedObject$4 = function (it) {
334
+ return IndexedObject(requireObjectCoercible$3(it));
335
+ };
336
+
337
+ // `IsCallable` abstract operation
338
+ // https://tc39.es/ecma262/#sec-iscallable
339
+ var isCallable$c = function (argument) {
340
+ return typeof argument == 'function';
341
+ };
342
+
343
+ var isCallable$b = isCallable$c;
344
+
345
+ var isObject$5 = function (it) {
346
+ return typeof it == 'object' ? it !== null : isCallable$b(it);
347
+ };
348
+
349
+ var global$o = global$r;
350
+ var isCallable$a = isCallable$c;
351
+
352
+ var aFunction = function (argument) {
353
+ return isCallable$a(argument) ? argument : undefined;
354
+ };
355
+
356
+ var getBuiltIn$4 = function (namespace, method) {
357
+ return arguments.length < 2 ? aFunction(global$o[namespace]) : global$o[namespace] && global$o[namespace][method];
358
+ };
359
+
360
+ var uncurryThis$b = functionUncurryThis;
361
+
362
+ var objectIsPrototypeOf = uncurryThis$b({}.isPrototypeOf);
363
+
364
+ var getBuiltIn$3 = getBuiltIn$4;
365
+
366
+ var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
367
+
368
+ var global$n = global$r;
369
+ var userAgent = engineUserAgent;
370
+
371
+ var process = global$n.process;
372
+ var Deno = global$n.Deno;
373
+ var versions = process && process.versions || Deno && Deno.version;
374
+ var v8 = versions && versions.v8;
375
+ var match, version;
376
+
377
+ if (v8) {
378
+ match = v8.split('.');
379
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
380
+ // but their correct versions are not interesting for us
381
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
382
+ }
383
+
384
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
385
+ // so check `userAgent` even if `.v8` exists, but 0
386
+ if (!version && userAgent) {
387
+ match = userAgent.match(/Edge\/(\d+)/);
388
+ if (!match || match[1] >= 74) {
389
+ match = userAgent.match(/Chrome\/(\d+)/);
390
+ if (match) version = +match[1];
391
+ }
392
+ }
393
+
394
+ var engineV8Version = version;
395
+
396
+ /* eslint-disable es/no-symbol -- required for testing */
397
+
398
+ var V8_VERSION = engineV8Version;
399
+ var fails$8 = fails$c;
400
+
401
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
402
+ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$8(function () {
403
+ var symbol = Symbol();
404
+ // Chrome 38 Symbol has incorrect toString conversion
405
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
406
+ return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
407
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
408
+ !Symbol.sham && V8_VERSION && V8_VERSION < 41;
409
+ });
410
+
411
+ /* eslint-disable es/no-symbol -- required for testing */
412
+
413
+ var NATIVE_SYMBOL$1 = nativeSymbol;
414
+
415
+ var useSymbolAsUid = NATIVE_SYMBOL$1
416
+ && !Symbol.sham
417
+ && typeof Symbol.iterator == 'symbol';
418
+
419
+ var global$m = global$r;
420
+ var getBuiltIn$2 = getBuiltIn$4;
421
+ var isCallable$9 = isCallable$c;
422
+ var isPrototypeOf = objectIsPrototypeOf;
423
+ var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
424
+
425
+ var Object$3 = global$m.Object;
426
+
427
+ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
428
+ return typeof it == 'symbol';
429
+ } : function (it) {
430
+ var $Symbol = getBuiltIn$2('Symbol');
431
+ return isCallable$9($Symbol) && isPrototypeOf($Symbol.prototype, Object$3(it));
432
+ };
433
+
434
+ var global$l = global$r;
435
+
436
+ var String$3 = global$l.String;
437
+
438
+ var tryToString$1 = function (argument) {
439
+ try {
440
+ return String$3(argument);
441
+ } catch (error) {
442
+ return 'Object';
443
+ }
444
+ };
445
+
446
+ var global$k = global$r;
447
+ var isCallable$8 = isCallable$c;
448
+ var tryToString = tryToString$1;
449
+
450
+ var TypeError$7 = global$k.TypeError;
451
+
452
+ // `Assert: IsCallable(argument) is true`
453
+ var aCallable$1 = function (argument) {
454
+ if (isCallable$8(argument)) return argument;
455
+ throw TypeError$7(tryToString(argument) + ' is not a function');
456
+ };
457
+
458
+ var aCallable = aCallable$1;
459
+
460
+ // `GetMethod` abstract operation
461
+ // https://tc39.es/ecma262/#sec-getmethod
462
+ var getMethod$2 = function (V, P) {
463
+ var func = V[P];
464
+ return func == null ? undefined : aCallable(func);
465
+ };
466
+
467
+ var global$j = global$r;
468
+ var call$6 = functionCall;
469
+ var isCallable$7 = isCallable$c;
470
+ var isObject$4 = isObject$5;
471
+
472
+ var TypeError$6 = global$j.TypeError;
473
+
474
+ // `OrdinaryToPrimitive` abstract operation
475
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
476
+ var ordinaryToPrimitive$1 = function (input, pref) {
477
+ var fn, val;
478
+ if (pref === 'string' && isCallable$7(fn = input.toString) && !isObject$4(val = call$6(fn, input))) return val;
479
+ if (isCallable$7(fn = input.valueOf) && !isObject$4(val = call$6(fn, input))) return val;
480
+ if (pref !== 'string' && isCallable$7(fn = input.toString) && !isObject$4(val = call$6(fn, input))) return val;
481
+ throw TypeError$6("Can't convert object to primitive value");
482
+ };
483
+
484
+ var shared$4 = {exports: {}};
485
+
486
+ var global$i = global$r;
487
+
488
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
489
+ var defineProperty = Object.defineProperty;
490
+
491
+ var setGlobal$3 = function (key, value) {
492
+ try {
493
+ defineProperty(global$i, key, { value: value, configurable: true, writable: true });
494
+ } catch (error) {
495
+ global$i[key] = value;
496
+ } return value;
497
+ };
498
+
499
+ var global$h = global$r;
500
+ var setGlobal$2 = setGlobal$3;
501
+
502
+ var SHARED = '__core-js_shared__';
503
+ var store$3 = global$h[SHARED] || setGlobal$2(SHARED, {});
504
+
505
+ var sharedStore = store$3;
506
+
507
+ var store$2 = sharedStore;
508
+
509
+ (shared$4.exports = function (key, value) {
510
+ return store$2[key] || (store$2[key] = value !== undefined ? value : {});
511
+ })('versions', []).push({
512
+ version: '3.21.1',
513
+ mode: 'global',
514
+ copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
515
+ license: 'https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE',
516
+ source: 'https://github.com/zloirock/core-js'
517
+ });
518
+
519
+ var global$g = global$r;
520
+ var requireObjectCoercible$2 = requireObjectCoercible$4;
521
+
522
+ var Object$2 = global$g.Object;
523
+
524
+ // `ToObject` abstract operation
525
+ // https://tc39.es/ecma262/#sec-toobject
526
+ var toObject$2 = function (argument) {
527
+ return Object$2(requireObjectCoercible$2(argument));
528
+ };
529
+
530
+ var uncurryThis$a = functionUncurryThis;
531
+ var toObject$1 = toObject$2;
532
+
533
+ var hasOwnProperty = uncurryThis$a({}.hasOwnProperty);
534
+
535
+ // `HasOwnProperty` abstract operation
536
+ // https://tc39.es/ecma262/#sec-hasownproperty
537
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
538
+ return hasOwnProperty(toObject$1(it), key);
539
+ };
540
+
541
+ var uncurryThis$9 = functionUncurryThis;
542
+
543
+ var id = 0;
544
+ var postfix = Math.random();
545
+ var toString$4 = uncurryThis$9(1.0.toString);
546
+
547
+ var uid$2 = function (key) {
548
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$4(++id + postfix, 36);
549
+ };
550
+
551
+ var global$f = global$r;
552
+ var shared$3 = shared$4.exports;
553
+ var hasOwn$6 = hasOwnProperty_1;
554
+ var uid$1 = uid$2;
555
+ var NATIVE_SYMBOL = nativeSymbol;
556
+ var USE_SYMBOL_AS_UID = useSymbolAsUid;
557
+
558
+ var WellKnownSymbolsStore = shared$3('wks');
559
+ var Symbol$1 = global$f.Symbol;
560
+ var symbolFor = Symbol$1 && Symbol$1['for'];
561
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
562
+
563
+ var wellKnownSymbol$5 = function (name) {
564
+ if (!hasOwn$6(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
565
+ var description = 'Symbol.' + name;
566
+ if (NATIVE_SYMBOL && hasOwn$6(Symbol$1, name)) {
567
+ WellKnownSymbolsStore[name] = Symbol$1[name];
568
+ } else if (USE_SYMBOL_AS_UID && symbolFor) {
569
+ WellKnownSymbolsStore[name] = symbolFor(description);
570
+ } else {
571
+ WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
572
+ }
573
+ } return WellKnownSymbolsStore[name];
574
+ };
575
+
576
+ var global$e = global$r;
577
+ var call$5 = functionCall;
578
+ var isObject$3 = isObject$5;
579
+ var isSymbol$1 = isSymbol$2;
580
+ var getMethod$1 = getMethod$2;
581
+ var ordinaryToPrimitive = ordinaryToPrimitive$1;
582
+ var wellKnownSymbol$4 = wellKnownSymbol$5;
583
+
584
+ var TypeError$5 = global$e.TypeError;
585
+ var TO_PRIMITIVE = wellKnownSymbol$4('toPrimitive');
586
+
587
+ // `ToPrimitive` abstract operation
588
+ // https://tc39.es/ecma262/#sec-toprimitive
589
+ var toPrimitive$1 = function (input, pref) {
590
+ if (!isObject$3(input) || isSymbol$1(input)) return input;
591
+ var exoticToPrim = getMethod$1(input, TO_PRIMITIVE);
592
+ var result;
593
+ if (exoticToPrim) {
594
+ if (pref === undefined) pref = 'default';
595
+ result = call$5(exoticToPrim, input, pref);
596
+ if (!isObject$3(result) || isSymbol$1(result)) return result;
597
+ throw TypeError$5("Can't convert object to primitive value");
598
+ }
599
+ if (pref === undefined) pref = 'number';
600
+ return ordinaryToPrimitive(input, pref);
601
+ };
602
+
603
+ var toPrimitive = toPrimitive$1;
604
+ var isSymbol = isSymbol$2;
605
+
606
+ // `ToPropertyKey` abstract operation
607
+ // https://tc39.es/ecma262/#sec-topropertykey
608
+ var toPropertyKey$2 = function (argument) {
609
+ var key = toPrimitive(argument, 'string');
610
+ return isSymbol(key) ? key : key + '';
611
+ };
612
+
613
+ var global$d = global$r;
614
+ var isObject$2 = isObject$5;
615
+
616
+ var document$1 = global$d.document;
617
+ // typeof document.createElement is 'object' in old IE
618
+ var EXISTS$1 = isObject$2(document$1) && isObject$2(document$1.createElement);
619
+
620
+ var documentCreateElement$1 = function (it) {
621
+ return EXISTS$1 ? document$1.createElement(it) : {};
622
+ };
623
+
624
+ var DESCRIPTORS$6 = descriptors;
625
+ var fails$7 = fails$c;
626
+ var createElement = documentCreateElement$1;
627
+
628
+ // Thanks to IE8 for its funny defineProperty
629
+ var ie8DomDefine = !DESCRIPTORS$6 && !fails$7(function () {
630
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
631
+ return Object.defineProperty(createElement('div'), 'a', {
632
+ get: function () { return 7; }
633
+ }).a != 7;
634
+ });
635
+
636
+ var DESCRIPTORS$5 = descriptors;
637
+ var call$4 = functionCall;
638
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
639
+ var createPropertyDescriptor$1 = createPropertyDescriptor$2;
640
+ var toIndexedObject$3 = toIndexedObject$4;
641
+ var toPropertyKey$1 = toPropertyKey$2;
642
+ var hasOwn$5 = hasOwnProperty_1;
643
+ var IE8_DOM_DEFINE$1 = ie8DomDefine;
644
+
645
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
646
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
647
+
648
+ // `Object.getOwnPropertyDescriptor` method
649
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
650
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$5 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
651
+ O = toIndexedObject$3(O);
652
+ P = toPropertyKey$1(P);
653
+ if (IE8_DOM_DEFINE$1) try {
654
+ return $getOwnPropertyDescriptor$1(O, P);
655
+ } catch (error) { /* empty */ }
656
+ if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!call$4(propertyIsEnumerableModule.f, O, P), O[P]);
657
+ };
658
+
659
+ var objectDefineProperty = {};
660
+
661
+ var DESCRIPTORS$4 = descriptors;
662
+ var fails$6 = fails$c;
663
+
664
+ // V8 ~ Chrome 36-
665
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
666
+ var v8PrototypeDefineBug = DESCRIPTORS$4 && fails$6(function () {
667
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
668
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
669
+ value: 42,
670
+ writable: false
671
+ }).prototype != 42;
672
+ });
673
+
674
+ var global$c = global$r;
675
+ var isObject$1 = isObject$5;
676
+
677
+ var String$2 = global$c.String;
678
+ var TypeError$4 = global$c.TypeError;
679
+
680
+ // `Assert: Type(argument) is Object`
681
+ var anObject$7 = function (argument) {
682
+ if (isObject$1(argument)) return argument;
683
+ throw TypeError$4(String$2(argument) + ' is not an object');
684
+ };
685
+
686
+ var global$b = global$r;
687
+ var DESCRIPTORS$3 = descriptors;
688
+ var IE8_DOM_DEFINE = ie8DomDefine;
689
+ var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
690
+ var anObject$6 = anObject$7;
691
+ var toPropertyKey = toPropertyKey$2;
692
+
693
+ var TypeError$3 = global$b.TypeError;
694
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
695
+ var $defineProperty = Object.defineProperty;
696
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
697
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
698
+ var ENUMERABLE = 'enumerable';
699
+ var CONFIGURABLE$1 = 'configurable';
700
+ var WRITABLE = 'writable';
701
+
702
+ // `Object.defineProperty` method
703
+ // https://tc39.es/ecma262/#sec-object.defineproperty
704
+ objectDefineProperty.f = DESCRIPTORS$3 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
705
+ anObject$6(O);
706
+ P = toPropertyKey(P);
707
+ anObject$6(Attributes);
708
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
709
+ var current = $getOwnPropertyDescriptor(O, P);
710
+ if (current && current[WRITABLE]) {
711
+ O[P] = Attributes.value;
712
+ Attributes = {
713
+ configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
714
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
715
+ writable: false
716
+ };
717
+ }
718
+ } return $defineProperty(O, P, Attributes);
719
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
720
+ anObject$6(O);
721
+ P = toPropertyKey(P);
722
+ anObject$6(Attributes);
723
+ if (IE8_DOM_DEFINE) try {
724
+ return $defineProperty(O, P, Attributes);
725
+ } catch (error) { /* empty */ }
726
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError$3('Accessors not supported');
727
+ if ('value' in Attributes) O[P] = Attributes.value;
728
+ return O;
729
+ };
730
+
731
+ var DESCRIPTORS$2 = descriptors;
732
+ var definePropertyModule$2 = objectDefineProperty;
733
+ var createPropertyDescriptor = createPropertyDescriptor$2;
734
+
735
+ var createNonEnumerableProperty$4 = DESCRIPTORS$2 ? function (object, key, value) {
736
+ return definePropertyModule$2.f(object, key, createPropertyDescriptor(1, value));
737
+ } : function (object, key, value) {
738
+ object[key] = value;
739
+ return object;
740
+ };
741
+
742
+ var redefine$2 = {exports: {}};
743
+
744
+ var uncurryThis$8 = functionUncurryThis;
745
+ var isCallable$6 = isCallable$c;
746
+ var store$1 = sharedStore;
747
+
748
+ var functionToString = uncurryThis$8(Function.toString);
749
+
750
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
751
+ if (!isCallable$6(store$1.inspectSource)) {
752
+ store$1.inspectSource = function (it) {
753
+ return functionToString(it);
754
+ };
755
+ }
756
+
757
+ var inspectSource$2 = store$1.inspectSource;
758
+
759
+ var global$a = global$r;
760
+ var isCallable$5 = isCallable$c;
761
+ var inspectSource$1 = inspectSource$2;
762
+
763
+ var WeakMap$1 = global$a.WeakMap;
764
+
765
+ var nativeWeakMap = isCallable$5(WeakMap$1) && /native code/.test(inspectSource$1(WeakMap$1));
766
+
767
+ var shared$2 = shared$4.exports;
768
+ var uid = uid$2;
769
+
770
+ var keys = shared$2('keys');
771
+
772
+ var sharedKey$2 = function (key) {
773
+ return keys[key] || (keys[key] = uid(key));
774
+ };
775
+
776
+ var hiddenKeys$4 = {};
777
+
778
+ var NATIVE_WEAK_MAP = nativeWeakMap;
779
+ var global$9 = global$r;
780
+ var uncurryThis$7 = functionUncurryThis;
781
+ var isObject = isObject$5;
782
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
783
+ var hasOwn$4 = hasOwnProperty_1;
784
+ var shared$1 = sharedStore;
785
+ var sharedKey$1 = sharedKey$2;
786
+ var hiddenKeys$3 = hiddenKeys$4;
787
+
788
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
789
+ var TypeError$2 = global$9.TypeError;
790
+ var WeakMap = global$9.WeakMap;
791
+ var set, get, has;
792
+
793
+ var enforce = function (it) {
794
+ return has(it) ? get(it) : set(it, {});
795
+ };
796
+
797
+ var getterFor = function (TYPE) {
798
+ return function (it) {
799
+ var state;
800
+ if (!isObject(it) || (state = get(it)).type !== TYPE) {
801
+ throw TypeError$2('Incompatible receiver, ' + TYPE + ' required');
802
+ } return state;
803
+ };
804
+ };
805
+
806
+ if (NATIVE_WEAK_MAP || shared$1.state) {
807
+ var store = shared$1.state || (shared$1.state = new WeakMap());
808
+ var wmget = uncurryThis$7(store.get);
809
+ var wmhas = uncurryThis$7(store.has);
810
+ var wmset = uncurryThis$7(store.set);
811
+ set = function (it, metadata) {
812
+ if (wmhas(store, it)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
813
+ metadata.facade = it;
814
+ wmset(store, it, metadata);
815
+ return metadata;
816
+ };
817
+ get = function (it) {
818
+ return wmget(store, it) || {};
819
+ };
820
+ has = function (it) {
821
+ return wmhas(store, it);
822
+ };
823
+ } else {
824
+ var STATE = sharedKey$1('state');
825
+ hiddenKeys$3[STATE] = true;
826
+ set = function (it, metadata) {
827
+ if (hasOwn$4(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
828
+ metadata.facade = it;
829
+ createNonEnumerableProperty$3(it, STATE, metadata);
830
+ return metadata;
831
+ };
832
+ get = function (it) {
833
+ return hasOwn$4(it, STATE) ? it[STATE] : {};
834
+ };
835
+ has = function (it) {
836
+ return hasOwn$4(it, STATE);
837
+ };
838
+ }
839
+
840
+ var internalState = {
841
+ set: set,
842
+ get: get,
843
+ has: has,
844
+ enforce: enforce,
845
+ getterFor: getterFor
846
+ };
847
+
848
+ var DESCRIPTORS$1 = descriptors;
849
+ var hasOwn$3 = hasOwnProperty_1;
850
+
851
+ var FunctionPrototype$1 = Function.prototype;
852
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
853
+ var getDescriptor = DESCRIPTORS$1 && Object.getOwnPropertyDescriptor;
854
+
855
+ var EXISTS = hasOwn$3(FunctionPrototype$1, 'name');
856
+ // additional protection from minified / mangled / dropped function names
857
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
858
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$1 || (DESCRIPTORS$1 && getDescriptor(FunctionPrototype$1, 'name').configurable));
859
+
860
+ var functionName = {
861
+ EXISTS: EXISTS,
862
+ PROPER: PROPER,
863
+ CONFIGURABLE: CONFIGURABLE
864
+ };
865
+
866
+ var global$8 = global$r;
867
+ var isCallable$4 = isCallable$c;
868
+ var hasOwn$2 = hasOwnProperty_1;
869
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
870
+ var setGlobal$1 = setGlobal$3;
871
+ var inspectSource = inspectSource$2;
872
+ var InternalStateModule = internalState;
873
+ var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
874
+
875
+ var getInternalState$1 = InternalStateModule.get;
876
+ var enforceInternalState = InternalStateModule.enforce;
877
+ var TEMPLATE = String(String).split('String');
878
+
879
+ (redefine$2.exports = function (O, key, value, options) {
880
+ var unsafe = options ? !!options.unsafe : false;
881
+ var simple = options ? !!options.enumerable : false;
882
+ var noTargetGet = options ? !!options.noTargetGet : false;
883
+ var name = options && options.name !== undefined ? options.name : key;
884
+ var state;
885
+ if (isCallable$4(value)) {
886
+ if (String(name).slice(0, 7) === 'Symbol(') {
887
+ name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
888
+ }
889
+ if (!hasOwn$2(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
890
+ createNonEnumerableProperty$2(value, 'name', name);
891
+ }
892
+ state = enforceInternalState(value);
893
+ if (!state.source) {
894
+ state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
895
+ }
896
+ }
897
+ if (O === global$8) {
898
+ if (simple) O[key] = value;
899
+ else setGlobal$1(key, value);
900
+ return;
901
+ } else if (!unsafe) {
902
+ delete O[key];
903
+ } else if (!noTargetGet && O[key]) {
904
+ simple = true;
905
+ }
906
+ if (simple) O[key] = value;
907
+ else createNonEnumerableProperty$2(O, key, value);
908
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
909
+ })(Function.prototype, 'toString', function toString() {
910
+ return isCallable$4(this) && getInternalState$1(this).source || inspectSource(this);
911
+ });
912
+
913
+ var objectGetOwnPropertyNames = {};
914
+
915
+ var ceil = Math.ceil;
916
+ var floor$1 = Math.floor;
917
+
918
+ // `ToIntegerOrInfinity` abstract operation
919
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
920
+ var toIntegerOrInfinity$4 = function (argument) {
921
+ var number = +argument;
922
+ // eslint-disable-next-line no-self-compare -- safe
923
+ return number !== number || number === 0 ? 0 : (number > 0 ? floor$1 : ceil)(number);
924
+ };
925
+
926
+ var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
927
+
928
+ var max$1 = Math.max;
929
+ var min$2 = Math.min;
930
+
931
+ // Helper for a popular repeating case of the spec:
932
+ // Let integer be ? ToInteger(index).
933
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
934
+ var toAbsoluteIndex$1 = function (index, length) {
935
+ var integer = toIntegerOrInfinity$3(index);
936
+ return integer < 0 ? max$1(integer + length, 0) : min$2(integer, length);
937
+ };
938
+
939
+ var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
940
+
941
+ var min$1 = Math.min;
942
+
943
+ // `ToLength` abstract operation
944
+ // https://tc39.es/ecma262/#sec-tolength
945
+ var toLength$2 = function (argument) {
946
+ return argument > 0 ? min$1(toIntegerOrInfinity$2(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
947
+ };
948
+
949
+ var toLength$1 = toLength$2;
950
+
951
+ // `LengthOfArrayLike` abstract operation
952
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
953
+ var lengthOfArrayLike$1 = function (obj) {
954
+ return toLength$1(obj.length);
955
+ };
956
+
957
+ var toIndexedObject$2 = toIndexedObject$4;
958
+ var toAbsoluteIndex = toAbsoluteIndex$1;
959
+ var lengthOfArrayLike = lengthOfArrayLike$1;
960
+
961
+ // `Array.prototype.{ indexOf, includes }` methods implementation
962
+ var createMethod$1 = function (IS_INCLUDES) {
963
+ return function ($this, el, fromIndex) {
964
+ var O = toIndexedObject$2($this);
965
+ var length = lengthOfArrayLike(O);
966
+ var index = toAbsoluteIndex(fromIndex, length);
967
+ var value;
968
+ // Array#includes uses SameValueZero equality algorithm
969
+ // eslint-disable-next-line no-self-compare -- NaN check
970
+ if (IS_INCLUDES && el != el) while (length > index) {
971
+ value = O[index++];
972
+ // eslint-disable-next-line no-self-compare -- NaN check
973
+ if (value != value) return true;
974
+ // Array#indexOf ignores holes, Array#includes - not
975
+ } else for (;length > index; index++) {
976
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
977
+ } return !IS_INCLUDES && -1;
978
+ };
979
+ };
980
+
981
+ var arrayIncludes = {
982
+ // `Array.prototype.includes` method
983
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
984
+ includes: createMethod$1(true),
985
+ // `Array.prototype.indexOf` method
986
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
987
+ indexOf: createMethod$1(false)
988
+ };
989
+
990
+ var uncurryThis$6 = functionUncurryThis;
991
+ var hasOwn$1 = hasOwnProperty_1;
992
+ var toIndexedObject$1 = toIndexedObject$4;
993
+ var indexOf$1 = arrayIncludes.indexOf;
994
+ var hiddenKeys$2 = hiddenKeys$4;
995
+
996
+ var push$1 = uncurryThis$6([].push);
997
+
998
+ var objectKeysInternal = function (object, names) {
999
+ var O = toIndexedObject$1(object);
1000
+ var i = 0;
1001
+ var result = [];
1002
+ var key;
1003
+ for (key in O) !hasOwn$1(hiddenKeys$2, key) && hasOwn$1(O, key) && push$1(result, key);
1004
+ // Don't enum bug & hidden keys
1005
+ while (names.length > i) if (hasOwn$1(O, key = names[i++])) {
1006
+ ~indexOf$1(result, key) || push$1(result, key);
1007
+ }
1008
+ return result;
1009
+ };
1010
+
1011
+ // IE8- don't enum bug keys
1012
+ var enumBugKeys$3 = [
1013
+ 'constructor',
1014
+ 'hasOwnProperty',
1015
+ 'isPrototypeOf',
1016
+ 'propertyIsEnumerable',
1017
+ 'toLocaleString',
1018
+ 'toString',
1019
+ 'valueOf'
1020
+ ];
1021
+
1022
+ var internalObjectKeys$1 = objectKeysInternal;
1023
+ var enumBugKeys$2 = enumBugKeys$3;
1024
+
1025
+ var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
1026
+
1027
+ // `Object.getOwnPropertyNames` method
1028
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
1029
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
1030
+ objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
1031
+ return internalObjectKeys$1(O, hiddenKeys$1);
1032
+ };
1033
+
1034
+ var objectGetOwnPropertySymbols = {};
1035
+
1036
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
1037
+ objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
1038
+
1039
+ var getBuiltIn$1 = getBuiltIn$4;
1040
+ var uncurryThis$5 = functionUncurryThis;
1041
+ var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
1042
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1043
+ var anObject$5 = anObject$7;
1044
+
1045
+ var concat$1 = uncurryThis$5([].concat);
1046
+
1047
+ // all object keys, includes non-enumerable and symbols
1048
+ var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
1049
+ var keys = getOwnPropertyNamesModule.f(anObject$5(it));
1050
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1051
+ return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
1052
+ };
1053
+
1054
+ var hasOwn = hasOwnProperty_1;
1055
+ var ownKeys = ownKeys$1;
1056
+ var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
1057
+ var definePropertyModule$1 = objectDefineProperty;
1058
+
1059
+ var copyConstructorProperties$1 = function (target, source, exceptions) {
1060
+ var keys = ownKeys(source);
1061
+ var defineProperty = definePropertyModule$1.f;
1062
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
1063
+ for (var i = 0; i < keys.length; i++) {
1064
+ var key = keys[i];
1065
+ if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
1066
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
1067
+ }
1068
+ }
1069
+ };
1070
+
1071
+ var fails$5 = fails$c;
1072
+ var isCallable$3 = isCallable$c;
1073
+
1074
+ var replacement = /#|\.prototype\./;
1075
+
1076
+ var isForced$1 = function (feature, detection) {
1077
+ var value = data[normalize(feature)];
1078
+ return value == POLYFILL ? true
1079
+ : value == NATIVE ? false
1080
+ : isCallable$3(detection) ? fails$5(detection)
1081
+ : !!detection;
1082
+ };
1083
+
1084
+ var normalize = isForced$1.normalize = function (string) {
1085
+ return String(string).replace(replacement, '.').toLowerCase();
1086
+ };
1087
+
1088
+ var data = isForced$1.data = {};
1089
+ var NATIVE = isForced$1.NATIVE = 'N';
1090
+ var POLYFILL = isForced$1.POLYFILL = 'P';
1091
+
1092
+ var isForced_1 = isForced$1;
1093
+
1094
+ var global$7 = global$r;
1095
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
1096
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
1097
+ var redefine$1 = redefine$2.exports;
1098
+ var setGlobal = setGlobal$3;
1099
+ var copyConstructorProperties = copyConstructorProperties$1;
1100
+ var isForced = isForced_1;
1101
+
1102
+ /*
1103
+ options.target - name of the target object
1104
+ options.global - target is the global object
1105
+ options.stat - export as static methods of target
1106
+ options.proto - export as prototype methods of target
1107
+ options.real - real prototype method for the `pure` version
1108
+ options.forced - export even if the native feature is available
1109
+ options.bind - bind methods to the target, required for the `pure` version
1110
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
1111
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
1112
+ options.sham - add a flag to not completely full polyfills
1113
+ options.enumerable - export as enumerable property
1114
+ options.noTargetGet - prevent calling a getter on target
1115
+ options.name - the .name of the function if it does not match the key
1116
+ */
1117
+ var _export = function (options, source) {
1118
+ var TARGET = options.target;
1119
+ var GLOBAL = options.global;
1120
+ var STATIC = options.stat;
1121
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
1122
+ if (GLOBAL) {
1123
+ target = global$7;
1124
+ } else if (STATIC) {
1125
+ target = global$7[TARGET] || setGlobal(TARGET, {});
1126
+ } else {
1127
+ target = (global$7[TARGET] || {}).prototype;
1128
+ }
1129
+ if (target) for (key in source) {
1130
+ sourceProperty = source[key];
1131
+ if (options.noTargetGet) {
1132
+ descriptor = getOwnPropertyDescriptor(target, key);
1133
+ targetProperty = descriptor && descriptor.value;
1134
+ } else targetProperty = target[key];
1135
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1136
+ // contained in target
1137
+ if (!FORCED && targetProperty !== undefined) {
1138
+ if (typeof sourceProperty == typeof targetProperty) continue;
1139
+ copyConstructorProperties(sourceProperty, targetProperty);
1140
+ }
1141
+ // add a flag to not completely full polyfills
1142
+ if (options.sham || (targetProperty && targetProperty.sham)) {
1143
+ createNonEnumerableProperty$1(sourceProperty, 'sham', true);
1144
+ }
1145
+ // extend global
1146
+ redefine$1(target, key, sourceProperty, options);
1147
+ }
1148
+ };
1149
+
1150
+ var wellKnownSymbol$3 = wellKnownSymbol$5;
1151
+
1152
+ var TO_STRING_TAG$1 = wellKnownSymbol$3('toStringTag');
1153
+ var test = {};
1154
+
1155
+ test[TO_STRING_TAG$1] = 'z';
1156
+
1157
+ var toStringTagSupport = String(test) === '[object z]';
1158
+
1159
+ var global$6 = global$r;
1160
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1161
+ var isCallable$2 = isCallable$c;
1162
+ var classofRaw = classofRaw$1;
1163
+ var wellKnownSymbol$2 = wellKnownSymbol$5;
1164
+
1165
+ var TO_STRING_TAG = wellKnownSymbol$2('toStringTag');
1166
+ var Object$1 = global$6.Object;
1167
+
1168
+ // ES3 wrong here
1169
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
1170
+
1171
+ // fallback for IE11 Script Access Denied error
1172
+ var tryGet = function (it, key) {
1173
+ try {
1174
+ return it[key];
1175
+ } catch (error) { /* empty */ }
1176
+ };
1177
+
1178
+ // getting tag from ES6+ `Object.prototype.toString`
1179
+ var classof$2 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1180
+ var O, tag, result;
1181
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
1182
+ // @@toStringTag case
1183
+ : typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
1184
+ // builtinTag case
1185
+ : CORRECT_ARGUMENTS ? classofRaw(O)
1186
+ // ES3 arguments fallback
1187
+ : (result = classofRaw(O)) == 'Object' && isCallable$2(O.callee) ? 'Arguments' : result;
1188
+ };
1189
+
1190
+ var global$5 = global$r;
1191
+ var classof$1 = classof$2;
1192
+
1193
+ var String$1 = global$5.String;
1194
+
1195
+ var toString$3 = function (argument) {
1196
+ if (classof$1(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
1197
+ return String$1(argument);
1198
+ };
1199
+
1200
+ var anObject$4 = anObject$7;
1201
+
1202
+ // `RegExp.prototype.flags` getter implementation
1203
+ // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
1204
+ var regexpFlags$1 = function () {
1205
+ var that = anObject$4(this);
1206
+ var result = '';
1207
+ if (that.global) result += 'g';
1208
+ if (that.ignoreCase) result += 'i';
1209
+ if (that.multiline) result += 'm';
1210
+ if (that.dotAll) result += 's';
1211
+ if (that.unicode) result += 'u';
1212
+ if (that.sticky) result += 'y';
1213
+ return result;
1214
+ };
1215
+
1216
+ var fails$4 = fails$c;
1217
+ var global$4 = global$r;
1218
+
1219
+ // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
1220
+ var $RegExp$2 = global$4.RegExp;
1221
+
1222
+ var UNSUPPORTED_Y$1 = fails$4(function () {
1223
+ var re = $RegExp$2('a', 'y');
1224
+ re.lastIndex = 2;
1225
+ return re.exec('abcd') != null;
1226
+ });
1227
+
1228
+ // UC Browser bug
1229
+ // https://github.com/zloirock/core-js/issues/1008
1230
+ var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$4(function () {
1231
+ return !$RegExp$2('a', 'y').sticky;
1232
+ });
1233
+
1234
+ var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$4(function () {
1235
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
1236
+ var re = $RegExp$2('^r', 'gy');
1237
+ re.lastIndex = 2;
1238
+ return re.exec('str') != null;
1239
+ });
1240
+
1241
+ var regexpStickyHelpers = {
1242
+ BROKEN_CARET: BROKEN_CARET,
1243
+ MISSED_STICKY: MISSED_STICKY,
1244
+ UNSUPPORTED_Y: UNSUPPORTED_Y$1
1245
+ };
1246
+
1247
+ var objectDefineProperties = {};
1248
+
1249
+ var internalObjectKeys = objectKeysInternal;
1250
+ var enumBugKeys$1 = enumBugKeys$3;
1251
+
1252
+ // `Object.keys` method
1253
+ // https://tc39.es/ecma262/#sec-object.keys
1254
+ // eslint-disable-next-line es/no-object-keys -- safe
1255
+ var objectKeys$1 = Object.keys || function keys(O) {
1256
+ return internalObjectKeys(O, enumBugKeys$1);
1257
+ };
1258
+
1259
+ var DESCRIPTORS = descriptors;
1260
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1261
+ var definePropertyModule = objectDefineProperty;
1262
+ var anObject$3 = anObject$7;
1263
+ var toIndexedObject = toIndexedObject$4;
1264
+ var objectKeys = objectKeys$1;
1265
+
1266
+ // `Object.defineProperties` method
1267
+ // https://tc39.es/ecma262/#sec-object.defineproperties
1268
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
1269
+ objectDefineProperties.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1270
+ anObject$3(O);
1271
+ var props = toIndexedObject(Properties);
1272
+ var keys = objectKeys(Properties);
1273
+ var length = keys.length;
1274
+ var index = 0;
1275
+ var key;
1276
+ while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
1277
+ return O;
1278
+ };
1279
+
1280
+ var getBuiltIn = getBuiltIn$4;
1281
+
1282
+ var html$1 = getBuiltIn('document', 'documentElement');
1283
+
1284
+ /* global ActiveXObject -- old IE, WSH */
1285
+
1286
+ var anObject$2 = anObject$7;
1287
+ var definePropertiesModule = objectDefineProperties;
1288
+ var enumBugKeys = enumBugKeys$3;
1289
+ var hiddenKeys = hiddenKeys$4;
1290
+ var html = html$1;
1291
+ var documentCreateElement = documentCreateElement$1;
1292
+ var sharedKey = sharedKey$2;
1293
+
1294
+ var GT = '>';
1295
+ var LT = '<';
1296
+ var PROTOTYPE = 'prototype';
1297
+ var SCRIPT = 'script';
1298
+ var IE_PROTO = sharedKey('IE_PROTO');
1299
+
1300
+ var EmptyConstructor = function () { /* empty */ };
1301
+
1302
+ var scriptTag = function (content) {
1303
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1304
+ };
1305
+
1306
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1307
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
1308
+ activeXDocument.write(scriptTag(''));
1309
+ activeXDocument.close();
1310
+ var temp = activeXDocument.parentWindow.Object;
1311
+ activeXDocument = null; // avoid memory leak
1312
+ return temp;
1313
+ };
1314
+
1315
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
1316
+ var NullProtoObjectViaIFrame = function () {
1317
+ // Thrash, waste and sodomy: IE GC bug
1318
+ var iframe = documentCreateElement('iframe');
1319
+ var JS = 'java' + SCRIPT + ':';
1320
+ var iframeDocument;
1321
+ iframe.style.display = 'none';
1322
+ html.appendChild(iframe);
1323
+ // https://github.com/zloirock/core-js/issues/475
1324
+ iframe.src = String(JS);
1325
+ iframeDocument = iframe.contentWindow.document;
1326
+ iframeDocument.open();
1327
+ iframeDocument.write(scriptTag('document.F=Object'));
1328
+ iframeDocument.close();
1329
+ return iframeDocument.F;
1330
+ };
1331
+
1332
+ // Check for document.domain and active x support
1333
+ // No need to use active x approach when document.domain is not set
1334
+ // see https://github.com/es-shims/es5-shim/issues/150
1335
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1336
+ // avoid IE GC bug
1337
+ var activeXDocument;
1338
+ var NullProtoObject = function () {
1339
+ try {
1340
+ activeXDocument = new ActiveXObject('htmlfile');
1341
+ } catch (error) { /* ignore */ }
1342
+ NullProtoObject = typeof document != 'undefined'
1343
+ ? document.domain && activeXDocument
1344
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1345
+ : NullProtoObjectViaIFrame()
1346
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
1347
+ var length = enumBugKeys.length;
1348
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1349
+ return NullProtoObject();
1350
+ };
1351
+
1352
+ hiddenKeys[IE_PROTO] = true;
1353
+
1354
+ // `Object.create` method
1355
+ // https://tc39.es/ecma262/#sec-object.create
1356
+ var objectCreate = Object.create || function create(O, Properties) {
1357
+ var result;
1358
+ if (O !== null) {
1359
+ EmptyConstructor[PROTOTYPE] = anObject$2(O);
1360
+ result = new EmptyConstructor();
1361
+ EmptyConstructor[PROTOTYPE] = null;
1362
+ // add "__proto__" for Object.getPrototypeOf polyfill
1363
+ result[IE_PROTO] = O;
1364
+ } else result = NullProtoObject();
1365
+ return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1366
+ };
1367
+
1368
+ var fails$3 = fails$c;
1369
+ var global$3 = global$r;
1370
+
1371
+ // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
1372
+ var $RegExp$1 = global$3.RegExp;
1373
+
1374
+ var regexpUnsupportedDotAll = fails$3(function () {
1375
+ var re = $RegExp$1('.', 's');
1376
+ return !(re.dotAll && re.exec('\n') && re.flags === 's');
1377
+ });
1378
+
1379
+ var fails$2 = fails$c;
1380
+ var global$2 = global$r;
1381
+
1382
+ // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
1383
+ var $RegExp = global$2.RegExp;
1384
+
1385
+ var regexpUnsupportedNcg = fails$2(function () {
1386
+ var re = $RegExp('(?<a>b)', 'g');
1387
+ return re.exec('b').groups.a !== 'b' ||
1388
+ 'b'.replace(re, '$<a>c') !== 'bc';
1389
+ });
1390
+
1391
+ /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
1392
+ /* eslint-disable regexp/no-useless-quantifier -- testing */
1393
+ var call$3 = functionCall;
1394
+ var uncurryThis$4 = functionUncurryThis;
1395
+ var toString$2 = toString$3;
1396
+ var regexpFlags = regexpFlags$1;
1397
+ var stickyHelpers = regexpStickyHelpers;
1398
+ var shared = shared$4.exports;
1399
+ var create = objectCreate;
1400
+ var getInternalState = internalState.get;
1401
+ var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
1402
+ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
1403
+
1404
+ var nativeReplace = shared('native-string-replace', String.prototype.replace);
1405
+ var nativeExec = RegExp.prototype.exec;
1406
+ var patchedExec = nativeExec;
1407
+ var charAt$3 = uncurryThis$4(''.charAt);
1408
+ var indexOf = uncurryThis$4(''.indexOf);
1409
+ var replace$1 = uncurryThis$4(''.replace);
1410
+ var stringSlice$3 = uncurryThis$4(''.slice);
1411
+
1412
+ var UPDATES_LAST_INDEX_WRONG = (function () {
1413
+ var re1 = /a/;
1414
+ var re2 = /b*/g;
1415
+ call$3(nativeExec, re1, 'a');
1416
+ call$3(nativeExec, re2, 'a');
1417
+ return re1.lastIndex !== 0 || re2.lastIndex !== 0;
1418
+ })();
1419
+
1420
+ var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
1421
+
1422
+ // nonparticipating capturing group, copied from es5-shim's String#split patch.
1423
+ var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
1424
+
1425
+ var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
1426
+
1427
+ if (PATCH) {
1428
+ patchedExec = function exec(string) {
1429
+ var re = this;
1430
+ var state = getInternalState(re);
1431
+ var str = toString$2(string);
1432
+ var raw = state.raw;
1433
+ var result, reCopy, lastIndex, match, i, object, group;
1434
+
1435
+ if (raw) {
1436
+ raw.lastIndex = re.lastIndex;
1437
+ result = call$3(patchedExec, raw, str);
1438
+ re.lastIndex = raw.lastIndex;
1439
+ return result;
1440
+ }
1441
+
1442
+ var groups = state.groups;
1443
+ var sticky = UNSUPPORTED_Y && re.sticky;
1444
+ var flags = call$3(regexpFlags, re);
1445
+ var source = re.source;
1446
+ var charsAdded = 0;
1447
+ var strCopy = str;
1448
+
1449
+ if (sticky) {
1450
+ flags = replace$1(flags, 'y', '');
1451
+ if (indexOf(flags, 'g') === -1) {
1452
+ flags += 'g';
1453
+ }
1454
+
1455
+ strCopy = stringSlice$3(str, re.lastIndex);
1456
+ // Support anchored sticky behavior.
1457
+ if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
1458
+ source = '(?: ' + source + ')';
1459
+ strCopy = ' ' + strCopy;
1460
+ charsAdded++;
1461
+ }
1462
+ // ^(? + rx + ) is needed, in combination with some str slicing, to
1463
+ // simulate the 'y' flag.
1464
+ reCopy = new RegExp('^(?:' + source + ')', flags);
1465
+ }
1466
+
1467
+ if (NPCG_INCLUDED) {
1468
+ reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
1469
+ }
1470
+ if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
1471
+
1472
+ match = call$3(nativeExec, sticky ? reCopy : re, strCopy);
1473
+
1474
+ if (sticky) {
1475
+ if (match) {
1476
+ match.input = stringSlice$3(match.input, charsAdded);
1477
+ match[0] = stringSlice$3(match[0], charsAdded);
1478
+ match.index = re.lastIndex;
1479
+ re.lastIndex += match[0].length;
1480
+ } else re.lastIndex = 0;
1481
+ } else if (UPDATES_LAST_INDEX_WRONG && match) {
1482
+ re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
1483
+ }
1484
+ if (NPCG_INCLUDED && match && match.length > 1) {
1485
+ // Fix browsers whose `exec` methods don't consistently return `undefined`
1486
+ // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
1487
+ call$3(nativeReplace, match[0], reCopy, function () {
1488
+ for (i = 1; i < arguments.length - 2; i++) {
1489
+ if (arguments[i] === undefined) match[i] = undefined;
1490
+ }
1491
+ });
1492
+ }
1493
+
1494
+ if (match && groups) {
1495
+ match.groups = object = create(null);
1496
+ for (i = 0; i < groups.length; i++) {
1497
+ group = groups[i];
1498
+ object[group[0]] = match[group[1]];
1499
+ }
1500
+ }
1501
+
1502
+ return match;
1503
+ };
1504
+ }
1505
+
1506
+ var regexpExec$2 = patchedExec;
1507
+
1508
+ var $ = _export;
1509
+ var exec = regexpExec$2;
1510
+
1511
+ // `RegExp.prototype.exec` method
1512
+ // https://tc39.es/ecma262/#sec-regexp.prototype.exec
1513
+ $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
1514
+ exec: exec
1515
+ });
1516
+
1517
+ var NATIVE_BIND = functionBindNative;
1518
+
1519
+ var FunctionPrototype = Function.prototype;
1520
+ var apply$1 = FunctionPrototype.apply;
1521
+ var call$2 = FunctionPrototype.call;
1522
+
1523
+ // eslint-disable-next-line es/no-reflect -- safe
1524
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$2.bind(apply$1) : function () {
1525
+ return call$2.apply(apply$1, arguments);
1526
+ });
1527
+
1528
+ // TODO: Remove from `core-js@4` since it's moved to entry points
1529
+
1530
+ var uncurryThis$3 = functionUncurryThis;
1531
+ var redefine = redefine$2.exports;
1532
+ var regexpExec$1 = regexpExec$2;
1533
+ var fails$1 = fails$c;
1534
+ var wellKnownSymbol$1 = wellKnownSymbol$5;
1535
+ var createNonEnumerableProperty = createNonEnumerableProperty$4;
1536
+
1537
+ var SPECIES = wellKnownSymbol$1('species');
1538
+ var RegExpPrototype = RegExp.prototype;
1539
+
1540
+ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
1541
+ var SYMBOL = wellKnownSymbol$1(KEY);
1542
+
1543
+ var DELEGATES_TO_SYMBOL = !fails$1(function () {
1544
+ // String methods call symbol-named RegEp methods
1545
+ var O = {};
1546
+ O[SYMBOL] = function () { return 7; };
1547
+ return ''[KEY](O) != 7;
1548
+ });
1549
+
1550
+ var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$1(function () {
1551
+ // Symbol-named RegExp methods call .exec
1552
+ var execCalled = false;
1553
+ var re = /a/;
1554
+
1555
+ if (KEY === 'split') {
1556
+ // We can't use real regex here since it causes deoptimization
1557
+ // and serious performance degradation in V8
1558
+ // https://github.com/zloirock/core-js/issues/306
1559
+ re = {};
1560
+ // RegExp[@@split] doesn't call the regex's exec method, but first creates
1561
+ // a new one. We need to return the patched regex when creating the new one.
1562
+ re.constructor = {};
1563
+ re.constructor[SPECIES] = function () { return re; };
1564
+ re.flags = '';
1565
+ re[SYMBOL] = /./[SYMBOL];
1566
+ }
1567
+
1568
+ re.exec = function () { execCalled = true; return null; };
1569
+
1570
+ re[SYMBOL]('');
1571
+ return !execCalled;
1572
+ });
1573
+
1574
+ if (
1575
+ !DELEGATES_TO_SYMBOL ||
1576
+ !DELEGATES_TO_EXEC ||
1577
+ FORCED
1578
+ ) {
1579
+ var uncurriedNativeRegExpMethod = uncurryThis$3(/./[SYMBOL]);
1580
+ var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
1581
+ var uncurriedNativeMethod = uncurryThis$3(nativeMethod);
1582
+ var $exec = regexp.exec;
1583
+ if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
1584
+ if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
1585
+ // The native String method already delegates to @@method (this
1586
+ // polyfilled function), leasing to infinite recursion.
1587
+ // We avoid it by directly calling the native @@method method.
1588
+ return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
1589
+ }
1590
+ return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
1591
+ }
1592
+ return { done: false };
1593
+ });
1594
+
1595
+ redefine(String.prototype, KEY, methods[0]);
1596
+ redefine(RegExpPrototype, SYMBOL, methods[1]);
1597
+ }
1598
+
1599
+ if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
1600
+ };
1601
+
1602
+ var uncurryThis$2 = functionUncurryThis;
1603
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
1604
+ var toString$1 = toString$3;
1605
+ var requireObjectCoercible$1 = requireObjectCoercible$4;
1606
+
1607
+ var charAt$2 = uncurryThis$2(''.charAt);
1608
+ var charCodeAt = uncurryThis$2(''.charCodeAt);
1609
+ var stringSlice$2 = uncurryThis$2(''.slice);
1610
+
1611
+ var createMethod = function (CONVERT_TO_STRING) {
1612
+ return function ($this, pos) {
1613
+ var S = toString$1(requireObjectCoercible$1($this));
1614
+ var position = toIntegerOrInfinity$1(pos);
1615
+ var size = S.length;
1616
+ var first, second;
1617
+ if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
1618
+ first = charCodeAt(S, position);
1619
+ return first < 0xD800 || first > 0xDBFF || position + 1 === size
1620
+ || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
1621
+ ? CONVERT_TO_STRING
1622
+ ? charAt$2(S, position)
1623
+ : first
1624
+ : CONVERT_TO_STRING
1625
+ ? stringSlice$2(S, position, position + 2)
1626
+ : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
1627
+ };
1628
+ };
1629
+
1630
+ var stringMultibyte = {
1631
+ // `String.prototype.codePointAt` method
1632
+ // https://tc39.es/ecma262/#sec-string.prototype.codepointat
1633
+ codeAt: createMethod(false),
1634
+ // `String.prototype.at` method
1635
+ // https://github.com/mathiasbynens/String.prototype.at
1636
+ charAt: createMethod(true)
1637
+ };
1638
+
1639
+ var charAt$1 = stringMultibyte.charAt;
1640
+
1641
+ // `AdvanceStringIndex` abstract operation
1642
+ // https://tc39.es/ecma262/#sec-advancestringindex
1643
+ var advanceStringIndex$1 = function (S, index, unicode) {
1644
+ return index + (unicode ? charAt$1(S, index).length : 1);
1645
+ };
1646
+
1647
+ var uncurryThis$1 = functionUncurryThis;
1648
+ var toObject = toObject$2;
1649
+
1650
+ var floor = Math.floor;
1651
+ var charAt = uncurryThis$1(''.charAt);
1652
+ var replace = uncurryThis$1(''.replace);
1653
+ var stringSlice$1 = uncurryThis$1(''.slice);
1654
+ var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
1655
+ var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
1656
+
1657
+ // `GetSubstitution` abstract operation
1658
+ // https://tc39.es/ecma262/#sec-getsubstitution
1659
+ var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
1660
+ var tailPos = position + matched.length;
1661
+ var m = captures.length;
1662
+ var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
1663
+ if (namedCaptures !== undefined) {
1664
+ namedCaptures = toObject(namedCaptures);
1665
+ symbols = SUBSTITUTION_SYMBOLS;
1666
+ }
1667
+ return replace(replacement, symbols, function (match, ch) {
1668
+ var capture;
1669
+ switch (charAt(ch, 0)) {
1670
+ case '$': return '$';
1671
+ case '&': return matched;
1672
+ case '`': return stringSlice$1(str, 0, position);
1673
+ case "'": return stringSlice$1(str, tailPos);
1674
+ case '<':
1675
+ capture = namedCaptures[stringSlice$1(ch, 1, -1)];
1676
+ break;
1677
+ default: // \d\d?
1678
+ var n = +ch;
1679
+ if (n === 0) return match;
1680
+ if (n > m) {
1681
+ var f = floor(n / 10);
1682
+ if (f === 0) return match;
1683
+ if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
1684
+ return match;
1685
+ }
1686
+ capture = captures[n - 1];
1687
+ }
1688
+ return capture === undefined ? '' : capture;
1689
+ });
1690
+ };
1691
+
1692
+ var global$1 = global$r;
1693
+ var call$1 = functionCall;
1694
+ var anObject$1 = anObject$7;
1695
+ var isCallable$1 = isCallable$c;
1696
+ var classof = classofRaw$1;
1697
+ var regexpExec = regexpExec$2;
1698
+
1699
+ var TypeError$1 = global$1.TypeError;
1700
+
1701
+ // `RegExpExec` abstract operation
1702
+ // https://tc39.es/ecma262/#sec-regexpexec
1703
+ var regexpExecAbstract = function (R, S) {
1704
+ var exec = R.exec;
1705
+ if (isCallable$1(exec)) {
1706
+ var result = call$1(exec, R, S);
1707
+ if (result !== null) anObject$1(result);
1708
+ return result;
1709
+ }
1710
+ if (classof(R) === 'RegExp') return call$1(regexpExec, R, S);
1711
+ throw TypeError$1('RegExp#exec called on incompatible receiver');
1712
+ };
1713
+
1714
+ var apply = functionApply;
1715
+ var call = functionCall;
1716
+ var uncurryThis = functionUncurryThis;
1717
+ var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
1718
+ var fails = fails$c;
1719
+ var anObject = anObject$7;
1720
+ var isCallable = isCallable$c;
1721
+ var toIntegerOrInfinity = toIntegerOrInfinity$4;
1722
+ var toLength = toLength$2;
1723
+ var toString = toString$3;
1724
+ var requireObjectCoercible = requireObjectCoercible$4;
1725
+ var advanceStringIndex = advanceStringIndex$1;
1726
+ var getMethod = getMethod$2;
1727
+ var getSubstitution = getSubstitution$1;
1728
+ var regExpExec = regexpExecAbstract;
1729
+ var wellKnownSymbol = wellKnownSymbol$5;
1730
+
1731
+ var REPLACE = wellKnownSymbol('replace');
1732
+ var max = Math.max;
1733
+ var min = Math.min;
1734
+ var concat = uncurryThis([].concat);
1735
+ var push = uncurryThis([].push);
1736
+ var stringIndexOf = uncurryThis(''.indexOf);
1737
+ var stringSlice = uncurryThis(''.slice);
1738
+
1739
+ var maybeToString = function (it) {
1740
+ return it === undefined ? it : String(it);
1741
+ };
1742
+
1743
+ // IE <= 11 replaces $0 with the whole match, as if it was $&
1744
+ // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
1745
+ var REPLACE_KEEPS_$0 = (function () {
1746
+ // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
1747
+ return 'a'.replace(/./, '$0') === '$0';
1748
+ })();
1749
+
1750
+ // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
1751
+ var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
1752
+ if (/./[REPLACE]) {
1753
+ return /./[REPLACE]('a', '$0') === '';
1754
+ }
1755
+ return false;
1756
+ })();
1757
+
1758
+ var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
1759
+ var re = /./;
1760
+ re.exec = function () {
1761
+ var result = [];
1762
+ result.groups = { a: '7' };
1763
+ return result;
1764
+ };
1765
+ // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
1766
+ return ''.replace(re, '$<a>') !== '7';
1767
+ });
1768
+
1769
+ // @@replace logic
1770
+ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
1771
+ var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
1772
+
1773
+ return [
1774
+ // `String.prototype.replace` method
1775
+ // https://tc39.es/ecma262/#sec-string.prototype.replace
1776
+ function replace(searchValue, replaceValue) {
1777
+ var O = requireObjectCoercible(this);
1778
+ var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE);
1779
+ return replacer
1780
+ ? call(replacer, searchValue, O, replaceValue)
1781
+ : call(nativeReplace, toString(O), searchValue, replaceValue);
1782
+ },
1783
+ // `RegExp.prototype[@@replace]` method
1784
+ // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
1785
+ function (string, replaceValue) {
1786
+ var rx = anObject(this);
1787
+ var S = toString(string);
1788
+
1789
+ if (
1790
+ typeof replaceValue == 'string' &&
1791
+ stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
1792
+ stringIndexOf(replaceValue, '$<') === -1
1793
+ ) {
1794
+ var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
1795
+ if (res.done) return res.value;
1796
+ }
1797
+
1798
+ var functionalReplace = isCallable(replaceValue);
1799
+ if (!functionalReplace) replaceValue = toString(replaceValue);
1800
+
1801
+ var global = rx.global;
1802
+ if (global) {
1803
+ var fullUnicode = rx.unicode;
1804
+ rx.lastIndex = 0;
1805
+ }
1806
+ var results = [];
1807
+ while (true) {
1808
+ var result = regExpExec(rx, S);
1809
+ if (result === null) break;
1810
+
1811
+ push(results, result);
1812
+ if (!global) break;
1813
+
1814
+ var matchStr = toString(result[0]);
1815
+ if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
1816
+ }
1817
+
1818
+ var accumulatedResult = '';
1819
+ var nextSourcePosition = 0;
1820
+ for (var i = 0; i < results.length; i++) {
1821
+ result = results[i];
1822
+
1823
+ var matched = toString(result[0]);
1824
+ var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
1825
+ var captures = [];
1826
+ // NOTE: This is equivalent to
1827
+ // captures = result.slice(1).map(maybeToString)
1828
+ // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
1829
+ // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
1830
+ // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
1831
+ for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
1832
+ var namedCaptures = result.groups;
1833
+ if (functionalReplace) {
1834
+ var replacerArgs = concat([matched], captures, position, S);
1835
+ if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
1836
+ var replacement = toString(apply(replaceValue, undefined, replacerArgs));
1837
+ } else {
1838
+ replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
1839
+ }
1840
+ if (position >= nextSourcePosition) {
1841
+ accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
1842
+ nextSourcePosition = position + matched.length;
1843
+ }
1844
+ }
1845
+ return accumulatedResult + stringSlice(S, nextSourcePosition);
1846
+ }
1847
+ ];
1848
+ }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
1849
+
1850
+ var MergeTag = function MergeTag(_a) {
1851
+ var id = _a.id;
1852
+
1853
+ var _b = useProfile(),
1854
+ loading = _b.loading,
1855
+ profile = _b.profile;
1856
+
1857
+ if (loading || !profile) {
1858
+ return null;
1859
+ }
1860
+
1861
+ var value = get__default["default"](profile, id.replace(/_/g, '.')); // DON'T CHANGE
1862
+
1863
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, value);
1864
+ };
1865
+
1866
+ exports.MergeTag = MergeTag;
196
1867
  exports.NinetailedProvider = NinetailedProvider;
197
1868
  exports.Personalize = Personalize;
198
1869
  exports.useNinetailed = useNinetailed;