@ninetailed/experience.js-react 4.3.0-beta.3 → 4.3.0-beta.5
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.cjs +247 -434
- package/index.js +252 -438
- package/lib/Experience/index.d.ts +0 -1
- package/lib/Experience/useExperience.d.ts +9 -6
- package/lib/Experience/useExperienceSelectionMiddleware.d.ts +3 -2
- package/lib/NinetailedProvider.d.ts +2 -1
- package/lib/index.d.ts +1 -1
- package/lib/useProfile.d.ts +6 -1
- package/package.json +5 -5
- package/lib/Experience/TrackExperience.d.ts +0 -12
package/index.cjs
CHANGED
|
@@ -6,9 +6,9 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var experience_js = require('@ninetailed/experience.js');
|
|
8
8
|
var reactIs = require('react-is');
|
|
9
|
-
var reactIntersectionObserver = require('react-intersection-observer');
|
|
10
9
|
var experience_jsShared = require('@ninetailed/experience.js-shared');
|
|
11
10
|
var radash = require('radash');
|
|
11
|
+
var reactIntersectionObserver = require('react-intersection-observer');
|
|
12
12
|
|
|
13
13
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
14
|
|
|
@@ -21,7 +21,7 @@ var check = function (it) {
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
24
|
-
var global$
|
|
24
|
+
var global$c =
|
|
25
25
|
// eslint-disable-next-line es/no-global-this -- safe
|
|
26
26
|
check(typeof globalThis == 'object' && globalThis) ||
|
|
27
27
|
check(typeof window == 'object' && window) ||
|
|
@@ -103,30 +103,30 @@ var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
|
|
|
103
103
|
};
|
|
104
104
|
};
|
|
105
105
|
|
|
106
|
-
var uncurryThis$
|
|
106
|
+
var uncurryThis$9 = functionUncurryThis;
|
|
107
107
|
|
|
108
|
-
var toString$
|
|
109
|
-
var stringSlice
|
|
108
|
+
var toString$1 = uncurryThis$9({}.toString);
|
|
109
|
+
var stringSlice = uncurryThis$9(''.slice);
|
|
110
110
|
|
|
111
|
-
var classofRaw
|
|
112
|
-
return stringSlice
|
|
111
|
+
var classofRaw = function (it) {
|
|
112
|
+
return stringSlice(toString$1(it), 8, -1);
|
|
113
113
|
};
|
|
114
114
|
|
|
115
|
-
var uncurryThis$
|
|
115
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
116
116
|
var fails$9 = fails$c;
|
|
117
|
-
var classof$
|
|
117
|
+
var classof$1 = classofRaw;
|
|
118
118
|
|
|
119
|
-
var $Object$
|
|
120
|
-
var split = uncurryThis$
|
|
119
|
+
var $Object$3 = Object;
|
|
120
|
+
var split = uncurryThis$8(''.split);
|
|
121
121
|
|
|
122
122
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
123
123
|
var indexedObject = fails$9(function () {
|
|
124
124
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
125
125
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
126
|
-
return !$Object$
|
|
126
|
+
return !$Object$3('z').propertyIsEnumerable(0);
|
|
127
127
|
}) ? function (it) {
|
|
128
|
-
return classof$
|
|
129
|
-
} : $Object$
|
|
128
|
+
return classof$1(it) == 'String' ? split(it, '') : $Object$3(it);
|
|
129
|
+
} : $Object$3;
|
|
130
130
|
|
|
131
131
|
// we can't use just `it == null` since of `document.all` special case
|
|
132
132
|
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
|
|
@@ -169,47 +169,47 @@ var documentAll$1 = $documentAll$1.all;
|
|
|
169
169
|
|
|
170
170
|
// `IsCallable` abstract operation
|
|
171
171
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
172
|
-
var isCallable$
|
|
172
|
+
var isCallable$e = $documentAll$1.IS_HTMLDDA ? function (argument) {
|
|
173
173
|
return typeof argument == 'function' || argument === documentAll$1;
|
|
174
174
|
} : function (argument) {
|
|
175
175
|
return typeof argument == 'function';
|
|
176
176
|
};
|
|
177
177
|
|
|
178
|
-
var isCallable$
|
|
178
|
+
var isCallable$d = isCallable$e;
|
|
179
179
|
var $documentAll = documentAll_1;
|
|
180
180
|
|
|
181
181
|
var documentAll = $documentAll.all;
|
|
182
182
|
|
|
183
183
|
var isObject$6 = $documentAll.IS_HTMLDDA ? function (it) {
|
|
184
|
-
return typeof it == 'object' ? it !== null : isCallable$
|
|
184
|
+
return typeof it == 'object' ? it !== null : isCallable$d(it) || it === documentAll;
|
|
185
185
|
} : function (it) {
|
|
186
|
-
return typeof it == 'object' ? it !== null : isCallable$
|
|
186
|
+
return typeof it == 'object' ? it !== null : isCallable$d(it);
|
|
187
187
|
};
|
|
188
188
|
|
|
189
|
-
var global$
|
|
190
|
-
var isCallable$
|
|
189
|
+
var global$b = global$c;
|
|
190
|
+
var isCallable$c = isCallable$e;
|
|
191
191
|
|
|
192
192
|
var aFunction = function (argument) {
|
|
193
|
-
return isCallable$
|
|
193
|
+
return isCallable$c(argument) ? argument : undefined;
|
|
194
194
|
};
|
|
195
195
|
|
|
196
196
|
var getBuiltIn$4 = function (namespace, method) {
|
|
197
|
-
return arguments.length < 2 ? aFunction(global$
|
|
197
|
+
return arguments.length < 2 ? aFunction(global$b[namespace]) : global$b[namespace] && global$b[namespace][method];
|
|
198
198
|
};
|
|
199
199
|
|
|
200
|
-
var uncurryThis$
|
|
200
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
201
201
|
|
|
202
|
-
var objectIsPrototypeOf = uncurryThis$
|
|
202
|
+
var objectIsPrototypeOf = uncurryThis$7({}.isPrototypeOf);
|
|
203
203
|
|
|
204
204
|
var getBuiltIn$3 = getBuiltIn$4;
|
|
205
205
|
|
|
206
206
|
var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
|
|
207
207
|
|
|
208
|
-
var global$
|
|
208
|
+
var global$a = global$c;
|
|
209
209
|
var userAgent = engineUserAgent;
|
|
210
210
|
|
|
211
|
-
var process = global$
|
|
212
|
-
var Deno = global$
|
|
211
|
+
var process = global$a.process;
|
|
212
|
+
var Deno = global$a.Deno;
|
|
213
213
|
var versions = process && process.versions || Deno && Deno.version;
|
|
214
214
|
var v8 = versions && versions.v8;
|
|
215
215
|
var match, version;
|
|
@@ -250,44 +250,44 @@ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$8(func
|
|
|
250
250
|
|
|
251
251
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
252
252
|
|
|
253
|
-
var NATIVE_SYMBOL$
|
|
253
|
+
var NATIVE_SYMBOL$1 = symbolConstructorDetection;
|
|
254
254
|
|
|
255
|
-
var useSymbolAsUid = NATIVE_SYMBOL$
|
|
255
|
+
var useSymbolAsUid = NATIVE_SYMBOL$1
|
|
256
256
|
&& !Symbol.sham
|
|
257
257
|
&& typeof Symbol.iterator == 'symbol';
|
|
258
258
|
|
|
259
259
|
var getBuiltIn$2 = getBuiltIn$4;
|
|
260
|
-
var isCallable$
|
|
261
|
-
var isPrototypeOf
|
|
260
|
+
var isCallable$b = isCallable$e;
|
|
261
|
+
var isPrototypeOf = objectIsPrototypeOf;
|
|
262
262
|
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
263
263
|
|
|
264
|
-
var $Object$
|
|
264
|
+
var $Object$2 = Object;
|
|
265
265
|
|
|
266
266
|
var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
|
|
267
267
|
return typeof it == 'symbol';
|
|
268
268
|
} : function (it) {
|
|
269
269
|
var $Symbol = getBuiltIn$2('Symbol');
|
|
270
|
-
return isCallable$
|
|
270
|
+
return isCallable$b($Symbol) && isPrototypeOf($Symbol.prototype, $Object$2(it));
|
|
271
271
|
};
|
|
272
272
|
|
|
273
|
-
var $String$
|
|
273
|
+
var $String$2 = String;
|
|
274
274
|
|
|
275
275
|
var tryToString$1 = function (argument) {
|
|
276
276
|
try {
|
|
277
|
-
return $String$
|
|
277
|
+
return $String$2(argument);
|
|
278
278
|
} catch (error) {
|
|
279
279
|
return 'Object';
|
|
280
280
|
}
|
|
281
281
|
};
|
|
282
282
|
|
|
283
|
-
var isCallable$
|
|
283
|
+
var isCallable$a = isCallable$e;
|
|
284
284
|
var tryToString = tryToString$1;
|
|
285
285
|
|
|
286
286
|
var $TypeError$6 = TypeError;
|
|
287
287
|
|
|
288
288
|
// `Assert: IsCallable(argument) is true`
|
|
289
289
|
var aCallable$2 = function (argument) {
|
|
290
|
-
if (isCallable$
|
|
290
|
+
if (isCallable$a(argument)) return argument;
|
|
291
291
|
throw $TypeError$6(tryToString(argument) + ' is not a function');
|
|
292
292
|
};
|
|
293
293
|
|
|
@@ -302,7 +302,7 @@ var getMethod$1 = function (V, P) {
|
|
|
302
302
|
};
|
|
303
303
|
|
|
304
304
|
var call$4 = functionCall;
|
|
305
|
-
var isCallable$
|
|
305
|
+
var isCallable$9 = isCallable$e;
|
|
306
306
|
var isObject$5 = isObject$6;
|
|
307
307
|
|
|
308
308
|
var $TypeError$5 = TypeError;
|
|
@@ -311,32 +311,32 @@ var $TypeError$5 = TypeError;
|
|
|
311
311
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
312
312
|
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
313
313
|
var fn, val;
|
|
314
|
-
if (pref === 'string' && isCallable$
|
|
315
|
-
if (isCallable$
|
|
316
|
-
if (pref !== 'string' && isCallable$
|
|
314
|
+
if (pref === 'string' && isCallable$9(fn = input.toString) && !isObject$5(val = call$4(fn, input))) return val;
|
|
315
|
+
if (isCallable$9(fn = input.valueOf) && !isObject$5(val = call$4(fn, input))) return val;
|
|
316
|
+
if (pref !== 'string' && isCallable$9(fn = input.toString) && !isObject$5(val = call$4(fn, input))) return val;
|
|
317
317
|
throw $TypeError$5("Can't convert object to primitive value");
|
|
318
318
|
};
|
|
319
319
|
|
|
320
320
|
var shared$3 = {exports: {}};
|
|
321
321
|
|
|
322
|
-
var global$
|
|
322
|
+
var global$9 = global$c;
|
|
323
323
|
|
|
324
324
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
325
|
-
var defineProperty$
|
|
325
|
+
var defineProperty$5 = Object.defineProperty;
|
|
326
326
|
|
|
327
327
|
var defineGlobalProperty$3 = function (key, value) {
|
|
328
328
|
try {
|
|
329
|
-
defineProperty$
|
|
329
|
+
defineProperty$5(global$9, key, { value: value, configurable: true, writable: true });
|
|
330
330
|
} catch (error) {
|
|
331
|
-
global$
|
|
331
|
+
global$9[key] = value;
|
|
332
332
|
} return value;
|
|
333
333
|
};
|
|
334
334
|
|
|
335
|
-
var global$
|
|
335
|
+
var global$8 = global$c;
|
|
336
336
|
var defineGlobalProperty$2 = defineGlobalProperty$3;
|
|
337
337
|
|
|
338
338
|
var SHARED = '__core-js_shared__';
|
|
339
|
-
var store$3 = global$
|
|
339
|
+
var store$3 = global$8[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
340
340
|
|
|
341
341
|
var sharedStore = store$3;
|
|
342
342
|
|
|
@@ -354,18 +354,18 @@ var store$2 = sharedStore;
|
|
|
354
354
|
|
|
355
355
|
var requireObjectCoercible = requireObjectCoercible$2;
|
|
356
356
|
|
|
357
|
-
var $Object$
|
|
357
|
+
var $Object$1 = Object;
|
|
358
358
|
|
|
359
359
|
// `ToObject` abstract operation
|
|
360
360
|
// https://tc39.es/ecma262/#sec-toobject
|
|
361
361
|
var toObject$4 = function (argument) {
|
|
362
|
-
return $Object$
|
|
362
|
+
return $Object$1(requireObjectCoercible(argument));
|
|
363
363
|
};
|
|
364
364
|
|
|
365
|
-
var uncurryThis$
|
|
365
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
366
366
|
var toObject$3 = toObject$4;
|
|
367
367
|
|
|
368
|
-
var hasOwnProperty = uncurryThis$
|
|
368
|
+
var hasOwnProperty = uncurryThis$6({}.hasOwnProperty);
|
|
369
369
|
|
|
370
370
|
// `HasOwnProperty` abstract operation
|
|
371
371
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
@@ -374,32 +374,32 @@ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
|
374
374
|
return hasOwnProperty(toObject$3(it), key);
|
|
375
375
|
};
|
|
376
376
|
|
|
377
|
-
var uncurryThis$
|
|
377
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
378
378
|
|
|
379
379
|
var id = 0;
|
|
380
380
|
var postfix = Math.random();
|
|
381
|
-
var toString
|
|
381
|
+
var toString = uncurryThis$5(1.0.toString);
|
|
382
382
|
|
|
383
383
|
var uid$2 = function (key) {
|
|
384
|
-
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString
|
|
384
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
|
|
385
385
|
};
|
|
386
386
|
|
|
387
|
-
var global$
|
|
387
|
+
var global$7 = global$c;
|
|
388
388
|
var shared$2 = shared$3.exports;
|
|
389
|
-
var hasOwn$
|
|
389
|
+
var hasOwn$8 = hasOwnProperty_1;
|
|
390
390
|
var uid$1 = uid$2;
|
|
391
|
-
var NATIVE_SYMBOL
|
|
391
|
+
var NATIVE_SYMBOL = symbolConstructorDetection;
|
|
392
392
|
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
393
393
|
|
|
394
394
|
var WellKnownSymbolsStore = shared$2('wks');
|
|
395
|
-
var Symbol$1 = global$
|
|
395
|
+
var Symbol$1 = global$7.Symbol;
|
|
396
396
|
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
397
397
|
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
398
398
|
|
|
399
|
-
var wellKnownSymbol$
|
|
400
|
-
if (!hasOwn$
|
|
399
|
+
var wellKnownSymbol$6 = function (name) {
|
|
400
|
+
if (!hasOwn$8(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
401
401
|
var description = 'Symbol.' + name;
|
|
402
|
-
if (NATIVE_SYMBOL
|
|
402
|
+
if (NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)) {
|
|
403
403
|
WellKnownSymbolsStore[name] = Symbol$1[name];
|
|
404
404
|
} else if (USE_SYMBOL_AS_UID && symbolFor) {
|
|
405
405
|
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
@@ -414,10 +414,10 @@ var isObject$4 = isObject$6;
|
|
|
414
414
|
var isSymbol$1 = isSymbol$2;
|
|
415
415
|
var getMethod = getMethod$1;
|
|
416
416
|
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
417
|
-
var wellKnownSymbol$
|
|
417
|
+
var wellKnownSymbol$5 = wellKnownSymbol$6;
|
|
418
418
|
|
|
419
419
|
var $TypeError$4 = TypeError;
|
|
420
|
-
var TO_PRIMITIVE = wellKnownSymbol$
|
|
420
|
+
var TO_PRIMITIVE = wellKnownSymbol$5('toPrimitive');
|
|
421
421
|
|
|
422
422
|
// `ToPrimitive` abstract operation
|
|
423
423
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
@@ -445,10 +445,10 @@ var toPropertyKey$2 = function (argument) {
|
|
|
445
445
|
return isSymbol(key) ? key : key + '';
|
|
446
446
|
};
|
|
447
447
|
|
|
448
|
-
var global$
|
|
448
|
+
var global$6 = global$c;
|
|
449
449
|
var isObject$3 = isObject$6;
|
|
450
450
|
|
|
451
|
-
var document$1 = global$
|
|
451
|
+
var document$1 = global$6.document;
|
|
452
452
|
// typeof document.createElement is 'object' in old IE
|
|
453
453
|
var EXISTS$1 = isObject$3(document$1) && isObject$3(document$1.createElement);
|
|
454
454
|
|
|
@@ -456,25 +456,25 @@ var documentCreateElement$2 = function (it) {
|
|
|
456
456
|
return EXISTS$1 ? document$1.createElement(it) : {};
|
|
457
457
|
};
|
|
458
458
|
|
|
459
|
-
var DESCRIPTORS$
|
|
459
|
+
var DESCRIPTORS$9 = descriptors;
|
|
460
460
|
var fails$7 = fails$c;
|
|
461
461
|
var createElement = documentCreateElement$2;
|
|
462
462
|
|
|
463
463
|
// Thanks to IE8 for its funny defineProperty
|
|
464
|
-
var ie8DomDefine = !DESCRIPTORS$
|
|
464
|
+
var ie8DomDefine = !DESCRIPTORS$9 && !fails$7(function () {
|
|
465
465
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
466
466
|
return Object.defineProperty(createElement('div'), 'a', {
|
|
467
467
|
get: function () { return 7; }
|
|
468
468
|
}).a != 7;
|
|
469
469
|
});
|
|
470
470
|
|
|
471
|
-
var DESCRIPTORS$
|
|
471
|
+
var DESCRIPTORS$8 = descriptors;
|
|
472
472
|
var call$2 = functionCall;
|
|
473
473
|
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
474
474
|
var createPropertyDescriptor$2 = createPropertyDescriptor$3;
|
|
475
475
|
var toIndexedObject$4 = toIndexedObject$5;
|
|
476
476
|
var toPropertyKey$1 = toPropertyKey$2;
|
|
477
|
-
var hasOwn$
|
|
477
|
+
var hasOwn$7 = hasOwnProperty_1;
|
|
478
478
|
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
479
479
|
|
|
480
480
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
@@ -482,23 +482,23 @@ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
|
482
482
|
|
|
483
483
|
// `Object.getOwnPropertyDescriptor` method
|
|
484
484
|
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
485
|
-
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$
|
|
485
|
+
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
|
486
486
|
O = toIndexedObject$4(O);
|
|
487
487
|
P = toPropertyKey$1(P);
|
|
488
488
|
if (IE8_DOM_DEFINE$1) try {
|
|
489
489
|
return $getOwnPropertyDescriptor$1(O, P);
|
|
490
490
|
} catch (error) { /* empty */ }
|
|
491
|
-
if (hasOwn$
|
|
491
|
+
if (hasOwn$7(O, P)) return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
492
492
|
};
|
|
493
493
|
|
|
494
494
|
var objectDefineProperty = {};
|
|
495
495
|
|
|
496
|
-
var DESCRIPTORS$
|
|
496
|
+
var DESCRIPTORS$7 = descriptors;
|
|
497
497
|
var fails$6 = fails$c;
|
|
498
498
|
|
|
499
499
|
// V8 ~ Chrome 36-
|
|
500
500
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
501
|
-
var v8PrototypeDefineBug = DESCRIPTORS$
|
|
501
|
+
var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$6(function () {
|
|
502
502
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
503
503
|
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
504
504
|
value: 42,
|
|
@@ -508,16 +508,16 @@ var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$6(function () {
|
|
|
508
508
|
|
|
509
509
|
var isObject$2 = isObject$6;
|
|
510
510
|
|
|
511
|
-
var $String$
|
|
511
|
+
var $String$1 = String;
|
|
512
512
|
var $TypeError$3 = TypeError;
|
|
513
513
|
|
|
514
514
|
// `Assert: Type(argument) is Object`
|
|
515
515
|
var anObject$5 = function (argument) {
|
|
516
516
|
if (isObject$2(argument)) return argument;
|
|
517
|
-
throw $TypeError$3($String$
|
|
517
|
+
throw $TypeError$3($String$1(argument) + ' is not an object');
|
|
518
518
|
};
|
|
519
519
|
|
|
520
|
-
var DESCRIPTORS$
|
|
520
|
+
var DESCRIPTORS$6 = descriptors;
|
|
521
521
|
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
522
522
|
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
523
523
|
var anObject$4 = anObject$5;
|
|
@@ -534,7 +534,7 @@ var WRITABLE = 'writable';
|
|
|
534
534
|
|
|
535
535
|
// `Object.defineProperty` method
|
|
536
536
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
537
|
-
objectDefineProperty.f = DESCRIPTORS$
|
|
537
|
+
objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
538
538
|
anObject$4(O);
|
|
539
539
|
P = toPropertyKey(P);
|
|
540
540
|
anObject$4(Attributes);
|
|
@@ -561,11 +561,11 @@ objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
|
|
|
561
561
|
return O;
|
|
562
562
|
};
|
|
563
563
|
|
|
564
|
-
var DESCRIPTORS$
|
|
564
|
+
var DESCRIPTORS$5 = descriptors;
|
|
565
565
|
var definePropertyModule$3 = objectDefineProperty;
|
|
566
566
|
var createPropertyDescriptor$1 = createPropertyDescriptor$3;
|
|
567
567
|
|
|
568
|
-
var createNonEnumerableProperty$4 = DESCRIPTORS$
|
|
568
|
+
var createNonEnumerableProperty$4 = DESCRIPTORS$5 ? function (object, key, value) {
|
|
569
569
|
return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
|
|
570
570
|
} : function (object, key, value) {
|
|
571
571
|
object[key] = value;
|
|
@@ -574,17 +574,17 @@ var createNonEnumerableProperty$4 = DESCRIPTORS$6 ? function (object, key, value
|
|
|
574
574
|
|
|
575
575
|
var makeBuiltIn$2 = {exports: {}};
|
|
576
576
|
|
|
577
|
-
var DESCRIPTORS$
|
|
578
|
-
var hasOwn$
|
|
577
|
+
var DESCRIPTORS$4 = descriptors;
|
|
578
|
+
var hasOwn$6 = hasOwnProperty_1;
|
|
579
579
|
|
|
580
580
|
var FunctionPrototype = Function.prototype;
|
|
581
581
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
582
|
-
var getDescriptor = DESCRIPTORS$
|
|
582
|
+
var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
|
|
583
583
|
|
|
584
|
-
var EXISTS = hasOwn$
|
|
584
|
+
var EXISTS = hasOwn$6(FunctionPrototype, 'name');
|
|
585
585
|
// additional protection from minified / mangled / dropped function names
|
|
586
586
|
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
587
|
-
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$
|
|
587
|
+
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable));
|
|
588
588
|
|
|
589
589
|
var functionName = {
|
|
590
590
|
EXISTS: EXISTS,
|
|
@@ -592,14 +592,14 @@ var functionName = {
|
|
|
592
592
|
CONFIGURABLE: CONFIGURABLE
|
|
593
593
|
};
|
|
594
594
|
|
|
595
|
-
var uncurryThis$
|
|
596
|
-
var isCallable$
|
|
595
|
+
var uncurryThis$4 = functionUncurryThis;
|
|
596
|
+
var isCallable$8 = isCallable$e;
|
|
597
597
|
var store$1 = sharedStore;
|
|
598
598
|
|
|
599
|
-
var functionToString = uncurryThis$
|
|
599
|
+
var functionToString = uncurryThis$4(Function.toString);
|
|
600
600
|
|
|
601
601
|
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
602
|
-
if (!isCallable$
|
|
602
|
+
if (!isCallable$8(store$1.inspectSource)) {
|
|
603
603
|
store$1.inspectSource = function (it) {
|
|
604
604
|
return functionToString(it);
|
|
605
605
|
};
|
|
@@ -607,12 +607,12 @@ if (!isCallable$a(store$1.inspectSource)) {
|
|
|
607
607
|
|
|
608
608
|
var inspectSource$1 = store$1.inspectSource;
|
|
609
609
|
|
|
610
|
-
var global$
|
|
611
|
-
var isCallable$
|
|
610
|
+
var global$5 = global$c;
|
|
611
|
+
var isCallable$7 = isCallable$e;
|
|
612
612
|
|
|
613
|
-
var WeakMap$1 = global$
|
|
613
|
+
var WeakMap$1 = global$5.WeakMap;
|
|
614
614
|
|
|
615
|
-
var weakMapBasicDetection = isCallable$
|
|
615
|
+
var weakMapBasicDetection = isCallable$7(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
616
616
|
|
|
617
617
|
var shared$1 = shared$3.exports;
|
|
618
618
|
var uid = uid$2;
|
|
@@ -626,17 +626,17 @@ var sharedKey$3 = function (key) {
|
|
|
626
626
|
var hiddenKeys$4 = {};
|
|
627
627
|
|
|
628
628
|
var NATIVE_WEAK_MAP = weakMapBasicDetection;
|
|
629
|
-
var global$
|
|
629
|
+
var global$4 = global$c;
|
|
630
630
|
var isObject$1 = isObject$6;
|
|
631
631
|
var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
|
|
632
|
-
var hasOwn$
|
|
632
|
+
var hasOwn$5 = hasOwnProperty_1;
|
|
633
633
|
var shared = sharedStore;
|
|
634
634
|
var sharedKey$2 = sharedKey$3;
|
|
635
635
|
var hiddenKeys$3 = hiddenKeys$4;
|
|
636
636
|
|
|
637
637
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
638
|
-
var TypeError$1 = global$
|
|
639
|
-
var WeakMap = global$
|
|
638
|
+
var TypeError$1 = global$4.TypeError;
|
|
639
|
+
var WeakMap = global$4.WeakMap;
|
|
640
640
|
var set, get, has;
|
|
641
641
|
|
|
642
642
|
var enforce = function (it) {
|
|
@@ -675,16 +675,16 @@ if (NATIVE_WEAK_MAP || shared.state) {
|
|
|
675
675
|
var STATE = sharedKey$2('state');
|
|
676
676
|
hiddenKeys$3[STATE] = true;
|
|
677
677
|
set = function (it, metadata) {
|
|
678
|
-
if (hasOwn$
|
|
678
|
+
if (hasOwn$5(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
679
679
|
metadata.facade = it;
|
|
680
680
|
createNonEnumerableProperty$3(it, STATE, metadata);
|
|
681
681
|
return metadata;
|
|
682
682
|
};
|
|
683
683
|
get = function (it) {
|
|
684
|
-
return hasOwn$
|
|
684
|
+
return hasOwn$5(it, STATE) ? it[STATE] : {};
|
|
685
685
|
};
|
|
686
686
|
has = function (it) {
|
|
687
|
-
return hasOwn$
|
|
687
|
+
return hasOwn$5(it, STATE);
|
|
688
688
|
};
|
|
689
689
|
}
|
|
690
690
|
|
|
@@ -697,9 +697,9 @@ var internalState = {
|
|
|
697
697
|
};
|
|
698
698
|
|
|
699
699
|
var fails$5 = fails$c;
|
|
700
|
-
var isCallable$
|
|
701
|
-
var hasOwn$
|
|
702
|
-
var DESCRIPTORS$
|
|
700
|
+
var isCallable$6 = isCallable$e;
|
|
701
|
+
var hasOwn$4 = hasOwnProperty_1;
|
|
702
|
+
var DESCRIPTORS$3 = descriptors;
|
|
703
703
|
var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
|
|
704
704
|
var inspectSource = inspectSource$1;
|
|
705
705
|
var InternalStateModule$1 = internalState;
|
|
@@ -707,10 +707,10 @@ var InternalStateModule$1 = internalState;
|
|
|
707
707
|
var enforceInternalState = InternalStateModule$1.enforce;
|
|
708
708
|
var getInternalState$1 = InternalStateModule$1.get;
|
|
709
709
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
710
|
-
var defineProperty$
|
|
710
|
+
var defineProperty$4 = Object.defineProperty;
|
|
711
711
|
|
|
712
|
-
var CONFIGURABLE_LENGTH = DESCRIPTORS$
|
|
713
|
-
return defineProperty$
|
|
712
|
+
var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$5(function () {
|
|
713
|
+
return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
714
714
|
});
|
|
715
715
|
|
|
716
716
|
var TEMPLATE = String(String).split('String');
|
|
@@ -721,21 +721,21 @@ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
|
|
|
721
721
|
}
|
|
722
722
|
if (options && options.getter) name = 'get ' + name;
|
|
723
723
|
if (options && options.setter) name = 'set ' + name;
|
|
724
|
-
if (!hasOwn$
|
|
725
|
-
if (DESCRIPTORS$
|
|
724
|
+
if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
|
|
725
|
+
if (DESCRIPTORS$3) defineProperty$4(value, 'name', { value: name, configurable: true });
|
|
726
726
|
else value.name = name;
|
|
727
727
|
}
|
|
728
|
-
if (CONFIGURABLE_LENGTH && options && hasOwn$
|
|
729
|
-
defineProperty$
|
|
728
|
+
if (CONFIGURABLE_LENGTH && options && hasOwn$4(options, 'arity') && value.length !== options.arity) {
|
|
729
|
+
defineProperty$4(value, 'length', { value: options.arity });
|
|
730
730
|
}
|
|
731
731
|
try {
|
|
732
|
-
if (options && hasOwn$
|
|
733
|
-
if (DESCRIPTORS$
|
|
732
|
+
if (options && hasOwn$4(options, 'constructor') && options.constructor) {
|
|
733
|
+
if (DESCRIPTORS$3) defineProperty$4(value, 'prototype', { writable: false });
|
|
734
734
|
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
735
735
|
} else if (value.prototype) value.prototype = undefined;
|
|
736
736
|
} catch (error) { /* empty */ }
|
|
737
737
|
var state = enforceInternalState(value);
|
|
738
|
-
if (!hasOwn$
|
|
738
|
+
if (!hasOwn$4(state, 'source')) {
|
|
739
739
|
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
740
740
|
} return value;
|
|
741
741
|
};
|
|
@@ -743,10 +743,10 @@ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
|
|
|
743
743
|
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
744
744
|
// eslint-disable-next-line no-extend-native -- required
|
|
745
745
|
Function.prototype.toString = makeBuiltIn$1(function toString() {
|
|
746
|
-
return isCallable$
|
|
746
|
+
return isCallable$6(this) && getInternalState$1(this).source || inspectSource(this);
|
|
747
747
|
}, 'toString');
|
|
748
748
|
|
|
749
|
-
var isCallable$
|
|
749
|
+
var isCallable$5 = isCallable$e;
|
|
750
750
|
var definePropertyModule$2 = objectDefineProperty;
|
|
751
751
|
var makeBuiltIn = makeBuiltIn$2.exports;
|
|
752
752
|
var defineGlobalProperty$1 = defineGlobalProperty$3;
|
|
@@ -755,7 +755,7 @@ var defineBuiltIn$3 = function (O, key, value, options) {
|
|
|
755
755
|
if (!options) options = {};
|
|
756
756
|
var simple = options.enumerable;
|
|
757
757
|
var name = options.name !== undefined ? options.name : key;
|
|
758
|
-
if (isCallable$
|
|
758
|
+
if (isCallable$5(value)) makeBuiltIn(value, name, options);
|
|
759
759
|
if (options.global) {
|
|
760
760
|
if (simple) O[key] = value;
|
|
761
761
|
else defineGlobalProperty$1(key, value);
|
|
@@ -861,22 +861,22 @@ var arrayIncludes = {
|
|
|
861
861
|
indexOf: createMethod$1(false)
|
|
862
862
|
};
|
|
863
863
|
|
|
864
|
-
var uncurryThis$
|
|
865
|
-
var hasOwn$
|
|
864
|
+
var uncurryThis$3 = functionUncurryThis;
|
|
865
|
+
var hasOwn$3 = hasOwnProperty_1;
|
|
866
866
|
var toIndexedObject$2 = toIndexedObject$5;
|
|
867
867
|
var indexOf = arrayIncludes.indexOf;
|
|
868
868
|
var hiddenKeys$2 = hiddenKeys$4;
|
|
869
869
|
|
|
870
|
-
var push = uncurryThis$
|
|
870
|
+
var push = uncurryThis$3([].push);
|
|
871
871
|
|
|
872
872
|
var objectKeysInternal = function (object, names) {
|
|
873
873
|
var O = toIndexedObject$2(object);
|
|
874
874
|
var i = 0;
|
|
875
875
|
var result = [];
|
|
876
876
|
var key;
|
|
877
|
-
for (key in O) !hasOwn$
|
|
877
|
+
for (key in O) !hasOwn$3(hiddenKeys$2, key) && hasOwn$3(O, key) && push(result, key);
|
|
878
878
|
// Don't enum bug & hidden keys
|
|
879
|
-
while (names.length > i) if (hasOwn$
|
|
879
|
+
while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
|
|
880
880
|
~indexOf(result, key) || push(result, key);
|
|
881
881
|
}
|
|
882
882
|
return result;
|
|
@@ -911,12 +911,12 @@ var objectGetOwnPropertySymbols = {};
|
|
|
911
911
|
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
912
912
|
|
|
913
913
|
var getBuiltIn$1 = getBuiltIn$4;
|
|
914
|
-
var uncurryThis$
|
|
914
|
+
var uncurryThis$2 = functionUncurryThis;
|
|
915
915
|
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
916
916
|
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
917
917
|
var anObject$3 = anObject$5;
|
|
918
918
|
|
|
919
|
-
var concat$1 = uncurryThis$
|
|
919
|
+
var concat$1 = uncurryThis$2([].concat);
|
|
920
920
|
|
|
921
921
|
// all object keys, includes non-enumerable and symbols
|
|
922
922
|
var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
@@ -925,25 +925,25 @@ var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
|
925
925
|
return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
|
|
926
926
|
};
|
|
927
927
|
|
|
928
|
-
var hasOwn$
|
|
928
|
+
var hasOwn$2 = hasOwnProperty_1;
|
|
929
929
|
var ownKeys = ownKeys$1;
|
|
930
930
|
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
931
931
|
var definePropertyModule$1 = objectDefineProperty;
|
|
932
932
|
|
|
933
|
-
var copyConstructorProperties$
|
|
933
|
+
var copyConstructorProperties$1 = function (target, source, exceptions) {
|
|
934
934
|
var keys = ownKeys(source);
|
|
935
935
|
var defineProperty = definePropertyModule$1.f;
|
|
936
936
|
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
937
937
|
for (var i = 0; i < keys.length; i++) {
|
|
938
938
|
var key = keys[i];
|
|
939
|
-
if (!hasOwn$
|
|
939
|
+
if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
|
|
940
940
|
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
941
941
|
}
|
|
942
942
|
}
|
|
943
943
|
};
|
|
944
944
|
|
|
945
945
|
var fails$4 = fails$c;
|
|
946
|
-
var isCallable$
|
|
946
|
+
var isCallable$4 = isCallable$e;
|
|
947
947
|
|
|
948
948
|
var replacement = /#|\.prototype\./;
|
|
949
949
|
|
|
@@ -951,7 +951,7 @@ var isForced$1 = function (feature, detection) {
|
|
|
951
951
|
var value = data[normalize(feature)];
|
|
952
952
|
return value == POLYFILL ? true
|
|
953
953
|
: value == NATIVE ? false
|
|
954
|
-
: isCallable$
|
|
954
|
+
: isCallable$4(detection) ? fails$4(detection)
|
|
955
955
|
: !!detection;
|
|
956
956
|
};
|
|
957
957
|
|
|
@@ -965,12 +965,12 @@ var POLYFILL = isForced$1.POLYFILL = 'P';
|
|
|
965
965
|
|
|
966
966
|
var isForced_1 = isForced$1;
|
|
967
967
|
|
|
968
|
-
var global$
|
|
968
|
+
var global$3 = global$c;
|
|
969
969
|
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
970
970
|
var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
|
|
971
971
|
var defineBuiltIn$2 = defineBuiltIn$3;
|
|
972
972
|
var defineGlobalProperty = defineGlobalProperty$3;
|
|
973
|
-
var copyConstructorProperties
|
|
973
|
+
var copyConstructorProperties = copyConstructorProperties$1;
|
|
974
974
|
var isForced = isForced_1;
|
|
975
975
|
|
|
976
976
|
/*
|
|
@@ -994,11 +994,11 @@ var _export = function (options, source) {
|
|
|
994
994
|
var STATIC = options.stat;
|
|
995
995
|
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
996
996
|
if (GLOBAL) {
|
|
997
|
-
target = global$
|
|
997
|
+
target = global$3;
|
|
998
998
|
} else if (STATIC) {
|
|
999
|
-
target = global$
|
|
999
|
+
target = global$3[TARGET] || defineGlobalProperty(TARGET, {});
|
|
1000
1000
|
} else {
|
|
1001
|
-
target = (global$
|
|
1001
|
+
target = (global$3[TARGET] || {}).prototype;
|
|
1002
1002
|
}
|
|
1003
1003
|
if (target) for (key in source) {
|
|
1004
1004
|
sourceProperty = source[key];
|
|
@@ -1010,7 +1010,7 @@ var _export = function (options, source) {
|
|
|
1010
1010
|
// contained in target
|
|
1011
1011
|
if (!FORCED && targetProperty !== undefined) {
|
|
1012
1012
|
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
1013
|
-
copyConstructorProperties
|
|
1013
|
+
copyConstructorProperties(sourceProperty, targetProperty);
|
|
1014
1014
|
}
|
|
1015
1015
|
// add a flag to not completely full polyfills
|
|
1016
1016
|
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
@@ -1030,8 +1030,8 @@ var objectKeys$2 = Object.keys || function keys(O) {
|
|
|
1030
1030
|
return internalObjectKeys(O, enumBugKeys$1);
|
|
1031
1031
|
};
|
|
1032
1032
|
|
|
1033
|
-
var DESCRIPTORS$
|
|
1034
|
-
var uncurryThis$
|
|
1033
|
+
var DESCRIPTORS$2 = descriptors;
|
|
1034
|
+
var uncurryThis$1 = functionUncurryThis;
|
|
1035
1035
|
var call$1 = functionCall;
|
|
1036
1036
|
var fails$3 = fails$c;
|
|
1037
1037
|
var objectKeys$1 = objectKeys$2;
|
|
@@ -1043,17 +1043,17 @@ var IndexedObject$1 = indexedObject;
|
|
|
1043
1043
|
// eslint-disable-next-line es/no-object-assign -- safe
|
|
1044
1044
|
var $assign = Object.assign;
|
|
1045
1045
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1046
|
-
var defineProperty$
|
|
1047
|
-
var concat = uncurryThis$
|
|
1046
|
+
var defineProperty$3 = Object.defineProperty;
|
|
1047
|
+
var concat = uncurryThis$1([].concat);
|
|
1048
1048
|
|
|
1049
1049
|
// `Object.assign` method
|
|
1050
1050
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
1051
1051
|
var objectAssign = !$assign || fails$3(function () {
|
|
1052
1052
|
// should have correct order of operations (Edge bug)
|
|
1053
|
-
if (DESCRIPTORS$
|
|
1053
|
+
if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$3({}, 'a', {
|
|
1054
1054
|
enumerable: true,
|
|
1055
1055
|
get: function () {
|
|
1056
|
-
defineProperty$
|
|
1056
|
+
defineProperty$3(this, 'b', {
|
|
1057
1057
|
value: 3,
|
|
1058
1058
|
enumerable: false
|
|
1059
1059
|
});
|
|
@@ -1082,18 +1082,18 @@ var objectAssign = !$assign || fails$3(function () {
|
|
|
1082
1082
|
var key;
|
|
1083
1083
|
while (length > j) {
|
|
1084
1084
|
key = keys[j++];
|
|
1085
|
-
if (!DESCRIPTORS$
|
|
1085
|
+
if (!DESCRIPTORS$2 || call$1(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
1086
1086
|
}
|
|
1087
1087
|
} return T;
|
|
1088
1088
|
} : $assign;
|
|
1089
1089
|
|
|
1090
|
-
var $$
|
|
1090
|
+
var $$2 = _export;
|
|
1091
1091
|
var assign = objectAssign;
|
|
1092
1092
|
|
|
1093
1093
|
// `Object.assign` method
|
|
1094
1094
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
1095
1095
|
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
1096
|
-
$$
|
|
1096
|
+
$$2({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
1097
1097
|
assign: assign
|
|
1098
1098
|
});
|
|
1099
1099
|
|
|
@@ -1101,7 +1101,7 @@ const NinetailedContext = /*#__PURE__*/React.createContext(undefined);
|
|
|
1101
1101
|
|
|
1102
1102
|
var objectDefineProperties = {};
|
|
1103
1103
|
|
|
1104
|
-
var DESCRIPTORS$
|
|
1104
|
+
var DESCRIPTORS$1 = descriptors;
|
|
1105
1105
|
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
1106
1106
|
var definePropertyModule = objectDefineProperty;
|
|
1107
1107
|
var anObject$2 = anObject$5;
|
|
@@ -1111,7 +1111,7 @@ var objectKeys = objectKeys$2;
|
|
|
1111
1111
|
// `Object.defineProperties` method
|
|
1112
1112
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
1113
1113
|
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
1114
|
-
objectDefineProperties.f = DESCRIPTORS$
|
|
1114
|
+
objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
1115
1115
|
anObject$2(O);
|
|
1116
1116
|
var props = toIndexedObject$1(Properties);
|
|
1117
1117
|
var keys = objectKeys(Properties);
|
|
@@ -1211,17 +1211,17 @@ var objectCreate = Object.create || function create(O, Properties) {
|
|
|
1211
1211
|
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
1212
1212
|
};
|
|
1213
1213
|
|
|
1214
|
-
var wellKnownSymbol$
|
|
1214
|
+
var wellKnownSymbol$4 = wellKnownSymbol$6;
|
|
1215
1215
|
var create$1 = objectCreate;
|
|
1216
|
-
var defineProperty$
|
|
1216
|
+
var defineProperty$2 = objectDefineProperty.f;
|
|
1217
1217
|
|
|
1218
|
-
var UNSCOPABLES = wellKnownSymbol$
|
|
1218
|
+
var UNSCOPABLES = wellKnownSymbol$4('unscopables');
|
|
1219
1219
|
var ArrayPrototype = Array.prototype;
|
|
1220
1220
|
|
|
1221
1221
|
// Array.prototype[@@unscopables]
|
|
1222
1222
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1223
1223
|
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
1224
|
-
defineProperty$
|
|
1224
|
+
defineProperty$2(ArrayPrototype, UNSCOPABLES, {
|
|
1225
1225
|
configurable: true,
|
|
1226
1226
|
value: create$1(null)
|
|
1227
1227
|
});
|
|
@@ -1243,36 +1243,36 @@ var correctPrototypeGetter = !fails$2(function () {
|
|
|
1243
1243
|
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
1244
1244
|
});
|
|
1245
1245
|
|
|
1246
|
-
var hasOwn$
|
|
1247
|
-
var isCallable$
|
|
1246
|
+
var hasOwn$1 = hasOwnProperty_1;
|
|
1247
|
+
var isCallable$3 = isCallable$e;
|
|
1248
1248
|
var toObject$1 = toObject$4;
|
|
1249
1249
|
var sharedKey = sharedKey$3;
|
|
1250
1250
|
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
1251
1251
|
|
|
1252
1252
|
var IE_PROTO = sharedKey('IE_PROTO');
|
|
1253
|
-
var $Object
|
|
1254
|
-
var ObjectPrototype = $Object
|
|
1253
|
+
var $Object = Object;
|
|
1254
|
+
var ObjectPrototype = $Object.prototype;
|
|
1255
1255
|
|
|
1256
1256
|
// `Object.getPrototypeOf` method
|
|
1257
1257
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1258
1258
|
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
1259
|
-
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object
|
|
1259
|
+
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
|
|
1260
1260
|
var object = toObject$1(O);
|
|
1261
|
-
if (hasOwn$
|
|
1261
|
+
if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
|
|
1262
1262
|
var constructor = object.constructor;
|
|
1263
|
-
if (isCallable$
|
|
1263
|
+
if (isCallable$3(constructor) && object instanceof constructor) {
|
|
1264
1264
|
return constructor.prototype;
|
|
1265
|
-
} return object instanceof $Object
|
|
1265
|
+
} return object instanceof $Object ? ObjectPrototype : null;
|
|
1266
1266
|
};
|
|
1267
1267
|
|
|
1268
1268
|
var fails$1 = fails$c;
|
|
1269
|
-
var isCallable$
|
|
1269
|
+
var isCallable$2 = isCallable$e;
|
|
1270
1270
|
var isObject = isObject$6;
|
|
1271
1271
|
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
1272
1272
|
var defineBuiltIn$1 = defineBuiltIn$3;
|
|
1273
|
-
var wellKnownSymbol$
|
|
1273
|
+
var wellKnownSymbol$3 = wellKnownSymbol$6;
|
|
1274
1274
|
|
|
1275
|
-
var ITERATOR$2 = wellKnownSymbol$
|
|
1275
|
+
var ITERATOR$2 = wellKnownSymbol$3('iterator');
|
|
1276
1276
|
var BUGGY_SAFARI_ITERATORS$1 = false;
|
|
1277
1277
|
|
|
1278
1278
|
// `%IteratorPrototype%` object
|
|
@@ -1300,7 +1300,7 @@ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
|
|
|
1300
1300
|
|
|
1301
1301
|
// `%IteratorPrototype%[@@iterator]()` method
|
|
1302
1302
|
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
|
|
1303
|
-
if (!isCallable$
|
|
1303
|
+
if (!isCallable$2(IteratorPrototype$2[ITERATOR$2])) {
|
|
1304
1304
|
defineBuiltIn$1(IteratorPrototype$2, ITERATOR$2, function () {
|
|
1305
1305
|
return this;
|
|
1306
1306
|
});
|
|
@@ -1311,16 +1311,16 @@ var iteratorsCore = {
|
|
|
1311
1311
|
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
|
|
1312
1312
|
};
|
|
1313
1313
|
|
|
1314
|
-
var defineProperty$
|
|
1315
|
-
var hasOwn
|
|
1316
|
-
var wellKnownSymbol$
|
|
1314
|
+
var defineProperty$1 = objectDefineProperty.f;
|
|
1315
|
+
var hasOwn = hasOwnProperty_1;
|
|
1316
|
+
var wellKnownSymbol$2 = wellKnownSymbol$6;
|
|
1317
1317
|
|
|
1318
|
-
var TO_STRING_TAG$
|
|
1318
|
+
var TO_STRING_TAG$1 = wellKnownSymbol$2('toStringTag');
|
|
1319
1319
|
|
|
1320
1320
|
var setToStringTag$2 = function (target, TAG, STATIC) {
|
|
1321
1321
|
if (target && !STATIC) target = target.prototype;
|
|
1322
|
-
if (target && !hasOwn
|
|
1323
|
-
defineProperty$
|
|
1322
|
+
if (target && !hasOwn(target, TO_STRING_TAG$1)) {
|
|
1323
|
+
defineProperty$1(target, TO_STRING_TAG$1, { configurable: true, value: TAG });
|
|
1324
1324
|
}
|
|
1325
1325
|
};
|
|
1326
1326
|
|
|
@@ -1340,19 +1340,19 @@ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUME
|
|
|
1340
1340
|
return IteratorConstructor;
|
|
1341
1341
|
};
|
|
1342
1342
|
|
|
1343
|
-
var isCallable$
|
|
1343
|
+
var isCallable$1 = isCallable$e;
|
|
1344
1344
|
|
|
1345
|
-
var $String
|
|
1345
|
+
var $String = String;
|
|
1346
1346
|
var $TypeError$1 = TypeError;
|
|
1347
1347
|
|
|
1348
1348
|
var aPossiblePrototype$1 = function (argument) {
|
|
1349
|
-
if (typeof argument == 'object' || isCallable$
|
|
1350
|
-
throw $TypeError$1("Can't set " + $String
|
|
1349
|
+
if (typeof argument == 'object' || isCallable$1(argument)) return argument;
|
|
1350
|
+
throw $TypeError$1("Can't set " + $String(argument) + ' as a prototype');
|
|
1351
1351
|
};
|
|
1352
1352
|
|
|
1353
1353
|
/* eslint-disable no-proto -- safe */
|
|
1354
1354
|
|
|
1355
|
-
var uncurryThis
|
|
1355
|
+
var uncurryThis = functionUncurryThis;
|
|
1356
1356
|
var anObject = anObject$5;
|
|
1357
1357
|
var aPossiblePrototype = aPossiblePrototype$1;
|
|
1358
1358
|
|
|
@@ -1366,7 +1366,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
1366
1366
|
var setter;
|
|
1367
1367
|
try {
|
|
1368
1368
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1369
|
-
setter = uncurryThis
|
|
1369
|
+
setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
1370
1370
|
setter(test, []);
|
|
1371
1371
|
CORRECT_SETTER = test instanceof Array;
|
|
1372
1372
|
} catch (error) { /* empty */ }
|
|
@@ -1379,17 +1379,17 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
1379
1379
|
};
|
|
1380
1380
|
}() : undefined);
|
|
1381
1381
|
|
|
1382
|
-
var $$
|
|
1382
|
+
var $$1 = _export;
|
|
1383
1383
|
var call = functionCall;
|
|
1384
1384
|
var FunctionName = functionName;
|
|
1385
|
-
var isCallable
|
|
1385
|
+
var isCallable = isCallable$e;
|
|
1386
1386
|
var createIteratorConstructor = iteratorCreateConstructor;
|
|
1387
1387
|
var getPrototypeOf = objectGetPrototypeOf;
|
|
1388
1388
|
var setPrototypeOf = objectSetPrototypeOf;
|
|
1389
1389
|
var setToStringTag = setToStringTag$2;
|
|
1390
1390
|
var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
|
|
1391
1391
|
var defineBuiltIn = defineBuiltIn$3;
|
|
1392
|
-
var wellKnownSymbol$
|
|
1392
|
+
var wellKnownSymbol$1 = wellKnownSymbol$6;
|
|
1393
1393
|
var Iterators$1 = iterators;
|
|
1394
1394
|
var IteratorsCore = iteratorsCore;
|
|
1395
1395
|
|
|
@@ -1397,7 +1397,7 @@ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
|
|
|
1397
1397
|
var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
|
|
1398
1398
|
var IteratorPrototype = IteratorsCore.IteratorPrototype;
|
|
1399
1399
|
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
|
|
1400
|
-
var ITERATOR$1 = wellKnownSymbol$
|
|
1400
|
+
var ITERATOR$1 = wellKnownSymbol$1('iterator');
|
|
1401
1401
|
var KEYS = 'keys';
|
|
1402
1402
|
var VALUES = 'values';
|
|
1403
1403
|
var ENTRIES = 'entries';
|
|
@@ -1434,7 +1434,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
1434
1434
|
if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
|
|
1435
1435
|
if (setPrototypeOf) {
|
|
1436
1436
|
setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
|
|
1437
|
-
} else if (!isCallable
|
|
1437
|
+
} else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) {
|
|
1438
1438
|
defineBuiltIn(CurrentIteratorPrototype, ITERATOR$1, returnThis);
|
|
1439
1439
|
}
|
|
1440
1440
|
}
|
|
@@ -1464,7 +1464,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
1464
1464
|
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
1465
1465
|
defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
|
|
1466
1466
|
}
|
|
1467
|
-
} else $$
|
|
1467
|
+
} else $$1({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
1468
1468
|
}
|
|
1469
1469
|
|
|
1470
1470
|
// define iterator
|
|
@@ -1486,10 +1486,10 @@ var toIndexedObject = toIndexedObject$5;
|
|
|
1486
1486
|
var addToUnscopables = addToUnscopables$1;
|
|
1487
1487
|
var Iterators = iterators;
|
|
1488
1488
|
var InternalStateModule = internalState;
|
|
1489
|
-
var defineProperty
|
|
1489
|
+
var defineProperty = objectDefineProperty.f;
|
|
1490
1490
|
var defineIterator = iteratorDefine;
|
|
1491
1491
|
var createIterResultObject = createIterResultObject$1;
|
|
1492
|
-
var DESCRIPTORS
|
|
1492
|
+
var DESCRIPTORS = descriptors;
|
|
1493
1493
|
|
|
1494
1494
|
var ARRAY_ITERATOR = 'Array Iterator';
|
|
1495
1495
|
var setInternalState = InternalStateModule.set;
|
|
@@ -1539,8 +1539,8 @@ addToUnscopables('values');
|
|
|
1539
1539
|
addToUnscopables('entries');
|
|
1540
1540
|
|
|
1541
1541
|
// V8 ~ Chrome 45- bug
|
|
1542
|
-
if (DESCRIPTORS
|
|
1543
|
-
defineProperty
|
|
1542
|
+
if (DESCRIPTORS && values.name !== 'values') try {
|
|
1543
|
+
defineProperty(values, 'name', { value: 'values' });
|
|
1544
1544
|
} catch (error) { /* empty */ }
|
|
1545
1545
|
|
|
1546
1546
|
// iterable DOM collections
|
|
@@ -1587,15 +1587,15 @@ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.co
|
|
|
1587
1587
|
|
|
1588
1588
|
var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
|
|
1589
1589
|
|
|
1590
|
-
var global$
|
|
1590
|
+
var global$2 = global$c;
|
|
1591
1591
|
var DOMIterables = domIterables;
|
|
1592
1592
|
var DOMTokenListPrototype = domTokenListPrototype;
|
|
1593
1593
|
var ArrayIteratorMethods = es_array_iterator;
|
|
1594
1594
|
var createNonEnumerableProperty = createNonEnumerableProperty$4;
|
|
1595
|
-
var wellKnownSymbol
|
|
1595
|
+
var wellKnownSymbol = wellKnownSymbol$6;
|
|
1596
1596
|
|
|
1597
|
-
var ITERATOR = wellKnownSymbol
|
|
1598
|
-
var TO_STRING_TAG
|
|
1597
|
+
var ITERATOR = wellKnownSymbol('iterator');
|
|
1598
|
+
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
1599
1599
|
var ArrayValues = ArrayIteratorMethods.values;
|
|
1600
1600
|
|
|
1601
1601
|
var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
|
|
@@ -1606,8 +1606,8 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
|
|
|
1606
1606
|
} catch (error) {
|
|
1607
1607
|
CollectionPrototype[ITERATOR] = ArrayValues;
|
|
1608
1608
|
}
|
|
1609
|
-
if (!CollectionPrototype[TO_STRING_TAG
|
|
1610
|
-
createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG
|
|
1609
|
+
if (!CollectionPrototype[TO_STRING_TAG]) {
|
|
1610
|
+
createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
|
|
1611
1611
|
}
|
|
1612
1612
|
if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
|
|
1613
1613
|
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
@@ -1621,7 +1621,7 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
|
|
|
1621
1621
|
};
|
|
1622
1622
|
|
|
1623
1623
|
for (var COLLECTION_NAME in DOMIterables) {
|
|
1624
|
-
handlePrototype(global$
|
|
1624
|
+
handlePrototype(global$2[COLLECTION_NAME] && global$2[COLLECTION_NAME].prototype, COLLECTION_NAME);
|
|
1625
1625
|
}
|
|
1626
1626
|
|
|
1627
1627
|
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
@@ -1663,159 +1663,6 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
1663
1663
|
});
|
|
1664
1664
|
}
|
|
1665
1665
|
|
|
1666
|
-
var wellKnownSymbol$1 = wellKnownSymbol$8;
|
|
1667
|
-
|
|
1668
|
-
var TO_STRING_TAG$1 = wellKnownSymbol$1('toStringTag');
|
|
1669
|
-
var test = {};
|
|
1670
|
-
|
|
1671
|
-
test[TO_STRING_TAG$1] = 'z';
|
|
1672
|
-
|
|
1673
|
-
var toStringTagSupport = String(test) === '[object z]';
|
|
1674
|
-
|
|
1675
|
-
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
1676
|
-
var isCallable$1 = isCallable$g;
|
|
1677
|
-
var classofRaw = classofRaw$1;
|
|
1678
|
-
var wellKnownSymbol = wellKnownSymbol$8;
|
|
1679
|
-
|
|
1680
|
-
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
1681
|
-
var $Object = Object;
|
|
1682
|
-
|
|
1683
|
-
// ES3 wrong here
|
|
1684
|
-
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
1685
|
-
|
|
1686
|
-
// fallback for IE11 Script Access Denied error
|
|
1687
|
-
var tryGet = function (it, key) {
|
|
1688
|
-
try {
|
|
1689
|
-
return it[key];
|
|
1690
|
-
} catch (error) { /* empty */ }
|
|
1691
|
-
};
|
|
1692
|
-
|
|
1693
|
-
// getting tag from ES6+ `Object.prototype.toString`
|
|
1694
|
-
var classof$2 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
1695
|
-
var O, tag, result;
|
|
1696
|
-
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
1697
|
-
// @@toStringTag case
|
|
1698
|
-
: typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
|
|
1699
|
-
// builtinTag case
|
|
1700
|
-
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
1701
|
-
// ES3 arguments fallback
|
|
1702
|
-
: (result = classofRaw(O)) == 'Object' && isCallable$1(O.callee) ? 'Arguments' : result;
|
|
1703
|
-
};
|
|
1704
|
-
|
|
1705
|
-
var classof$1 = classof$2;
|
|
1706
|
-
|
|
1707
|
-
var $String = String;
|
|
1708
|
-
|
|
1709
|
-
var toString$1 = function (argument) {
|
|
1710
|
-
if (classof$1(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
1711
|
-
return $String(argument);
|
|
1712
|
-
};
|
|
1713
|
-
|
|
1714
|
-
var $$1 = _export;
|
|
1715
|
-
var DESCRIPTORS = descriptors;
|
|
1716
|
-
var global$2 = global$d;
|
|
1717
|
-
var uncurryThis = functionUncurryThis;
|
|
1718
|
-
var hasOwn = hasOwnProperty_1;
|
|
1719
|
-
var isCallable = isCallable$g;
|
|
1720
|
-
var isPrototypeOf = objectIsPrototypeOf;
|
|
1721
|
-
var toString = toString$1;
|
|
1722
|
-
var defineProperty = objectDefineProperty.f;
|
|
1723
|
-
var copyConstructorProperties = copyConstructorProperties$2;
|
|
1724
|
-
|
|
1725
|
-
var NativeSymbol = global$2.Symbol;
|
|
1726
|
-
var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
|
|
1727
|
-
|
|
1728
|
-
if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototype) ||
|
|
1729
|
-
// Safari 12 bug
|
|
1730
|
-
NativeSymbol().description !== undefined
|
|
1731
|
-
)) {
|
|
1732
|
-
var EmptyStringDescriptionStore = {};
|
|
1733
|
-
// wrap Symbol constructor for correct work with undefined description
|
|
1734
|
-
var SymbolWrapper = function Symbol() {
|
|
1735
|
-
var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString(arguments[0]);
|
|
1736
|
-
var result = isPrototypeOf(SymbolPrototype, this)
|
|
1737
|
-
? new NativeSymbol(description)
|
|
1738
|
-
// in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
|
|
1739
|
-
: description === undefined ? NativeSymbol() : NativeSymbol(description);
|
|
1740
|
-
if (description === '') EmptyStringDescriptionStore[result] = true;
|
|
1741
|
-
return result;
|
|
1742
|
-
};
|
|
1743
|
-
|
|
1744
|
-
copyConstructorProperties(SymbolWrapper, NativeSymbol);
|
|
1745
|
-
SymbolWrapper.prototype = SymbolPrototype;
|
|
1746
|
-
SymbolPrototype.constructor = SymbolWrapper;
|
|
1747
|
-
|
|
1748
|
-
var NATIVE_SYMBOL = String(NativeSymbol('test')) == 'Symbol(test)';
|
|
1749
|
-
var thisSymbolValue = uncurryThis(SymbolPrototype.valueOf);
|
|
1750
|
-
var symbolDescriptiveString = uncurryThis(SymbolPrototype.toString);
|
|
1751
|
-
var regexp = /^Symbol\((.*)\)[^)]+$/;
|
|
1752
|
-
var replace = uncurryThis(''.replace);
|
|
1753
|
-
var stringSlice = uncurryThis(''.slice);
|
|
1754
|
-
|
|
1755
|
-
defineProperty(SymbolPrototype, 'description', {
|
|
1756
|
-
configurable: true,
|
|
1757
|
-
get: function description() {
|
|
1758
|
-
var symbol = thisSymbolValue(this);
|
|
1759
|
-
if (hasOwn(EmptyStringDescriptionStore, symbol)) return '';
|
|
1760
|
-
var string = symbolDescriptiveString(symbol);
|
|
1761
|
-
var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1');
|
|
1762
|
-
return desc === '' ? undefined : desc;
|
|
1763
|
-
}
|
|
1764
|
-
});
|
|
1765
|
-
|
|
1766
|
-
$$1({ global: true, constructor: true, forced: true }, {
|
|
1767
|
-
Symbol: SymbolWrapper
|
|
1768
|
-
});
|
|
1769
|
-
}
|
|
1770
|
-
|
|
1771
|
-
const useNinetailed = () => {
|
|
1772
|
-
const ninetailed = React.useContext(NinetailedContext);
|
|
1773
|
-
if (ninetailed === undefined) {
|
|
1774
|
-
throw new Error('The component using the the context must be a descendant of the NinetailedProvider');
|
|
1775
|
-
}
|
|
1776
|
-
return ninetailed;
|
|
1777
|
-
};
|
|
1778
|
-
|
|
1779
|
-
const TrackExperience = ({
|
|
1780
|
-
children,
|
|
1781
|
-
experience,
|
|
1782
|
-
variant,
|
|
1783
|
-
profile
|
|
1784
|
-
}) => {
|
|
1785
|
-
const ninetailed = useNinetailed();
|
|
1786
|
-
const {
|
|
1787
|
-
ref,
|
|
1788
|
-
inView
|
|
1789
|
-
} = reactIntersectionObserver.useInView({
|
|
1790
|
-
triggerOnce: true
|
|
1791
|
-
});
|
|
1792
|
-
React.useEffect(() => {
|
|
1793
|
-
if (experience_jsShared.isBrowser() && inView) {
|
|
1794
|
-
const distribution = experience_js.selectDistribution({
|
|
1795
|
-
experience,
|
|
1796
|
-
profile
|
|
1797
|
-
});
|
|
1798
|
-
ninetailed.trackHasSeenExperience({
|
|
1799
|
-
experience: {
|
|
1800
|
-
id: experience.id,
|
|
1801
|
-
type: experience.type,
|
|
1802
|
-
name: experience.name || '',
|
|
1803
|
-
description: experience.description || ''
|
|
1804
|
-
},
|
|
1805
|
-
audience: experience.audience,
|
|
1806
|
-
selectedVariant: variant,
|
|
1807
|
-
selectedVariantIndex: distribution.index
|
|
1808
|
-
});
|
|
1809
|
-
}
|
|
1810
|
-
}, [inView]);
|
|
1811
|
-
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1812
|
-
children: [jsxRuntime.jsx("div", {
|
|
1813
|
-
ref: ref,
|
|
1814
|
-
id: "nt-experience-handle"
|
|
1815
|
-
}), children]
|
|
1816
|
-
});
|
|
1817
|
-
};
|
|
1818
|
-
|
|
1819
1666
|
var aCallable = aCallable$2;
|
|
1820
1667
|
var toObject = toObject$4;
|
|
1821
1668
|
var IndexedObject = indexedObject;
|
|
@@ -1869,8 +1716,8 @@ var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
|
|
|
1869
1716
|
});
|
|
1870
1717
|
};
|
|
1871
1718
|
|
|
1872
|
-
var classof = classofRaw
|
|
1873
|
-
var global$1 = global$
|
|
1719
|
+
var classof = classofRaw;
|
|
1720
|
+
var global$1 = global$c;
|
|
1874
1721
|
|
|
1875
1722
|
var engineIsNode = classof(global$1.process) == 'process';
|
|
1876
1723
|
|
|
@@ -1894,6 +1741,14 @@ $({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {
|
|
|
1894
1741
|
}
|
|
1895
1742
|
});
|
|
1896
1743
|
|
|
1744
|
+
const useNinetailed = () => {
|
|
1745
|
+
const ninetailed = React.useContext(NinetailedContext);
|
|
1746
|
+
if (ninetailed === undefined) {
|
|
1747
|
+
throw new Error('The component using the the context must be a descendant of the NinetailedProvider');
|
|
1748
|
+
}
|
|
1749
|
+
return ninetailed;
|
|
1750
|
+
};
|
|
1751
|
+
|
|
1897
1752
|
const useProfile = () => {
|
|
1898
1753
|
const ninetailed = useNinetailed();
|
|
1899
1754
|
const [profileState, setProfileState] = React.useState(ninetailed.profileState);
|
|
@@ -1997,21 +1852,26 @@ const useExperience = ({
|
|
|
1997
1852
|
const overrideResult = _a => {
|
|
1998
1853
|
var {
|
|
1999
1854
|
experience: originalExperience,
|
|
2000
|
-
variant: originalVariant
|
|
1855
|
+
variant: originalVariant,
|
|
1856
|
+
variantIndex: originalVariantIndex
|
|
2001
1857
|
} = _a,
|
|
2002
|
-
other = __rest(_a, ["experience", "variant"]);
|
|
1858
|
+
other = __rest(_a, ["experience", "variant", "variantIndex"]);
|
|
2003
1859
|
const {
|
|
2004
1860
|
experience,
|
|
2005
|
-
variant
|
|
1861
|
+
variant,
|
|
1862
|
+
variantIndex
|
|
2006
1863
|
} = experienceSelectionMiddleware({
|
|
2007
1864
|
experience: originalExperience,
|
|
2008
|
-
variant: originalVariant
|
|
1865
|
+
variant: originalVariant,
|
|
1866
|
+
variantIndex: originalVariantIndex
|
|
2009
1867
|
});
|
|
2010
1868
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2011
1869
|
// @ts-ignore
|
|
2012
1870
|
return Object.assign(Object.assign({}, other), {
|
|
1871
|
+
audience: (experience === null || experience === void 0 ? void 0 : experience.audience) ? experience.audience : null,
|
|
2013
1872
|
experience,
|
|
2014
|
-
variant
|
|
1873
|
+
variant,
|
|
1874
|
+
variantIndex
|
|
2015
1875
|
});
|
|
2016
1876
|
};
|
|
2017
1877
|
const baseReturn = Object.assign(Object.assign({}, profileState), {
|
|
@@ -2020,7 +1880,8 @@ const useExperience = ({
|
|
|
2020
1880
|
});
|
|
2021
1881
|
const emptyReturn = Object.assign(Object.assign({}, baseReturn), {
|
|
2022
1882
|
experience: null,
|
|
2023
|
-
variant:
|
|
1883
|
+
variant: baseline,
|
|
1884
|
+
variantIndex: 0,
|
|
2024
1885
|
audience: null,
|
|
2025
1886
|
isPersonalized: false,
|
|
2026
1887
|
profile: null
|
|
@@ -2053,31 +1914,22 @@ const useExperience = ({
|
|
|
2053
1914
|
profile
|
|
2054
1915
|
}));
|
|
2055
1916
|
}
|
|
2056
|
-
const
|
|
2057
|
-
|
|
1917
|
+
const {
|
|
1918
|
+
variant,
|
|
1919
|
+
index
|
|
1920
|
+
} = experience_js.selectExperienceVariant({
|
|
2058
1921
|
baseline,
|
|
2059
1922
|
experience,
|
|
2060
1923
|
profile
|
|
2061
1924
|
});
|
|
2062
|
-
if (!variant) {
|
|
2063
|
-
return overrideResult(Object.assign(Object.assign({}, baseReturn), {
|
|
2064
|
-
status: 'success',
|
|
2065
|
-
loading: false,
|
|
2066
|
-
error: null,
|
|
2067
|
-
experience,
|
|
2068
|
-
variant: null,
|
|
2069
|
-
audience: audience ? audience : null,
|
|
2070
|
-
profile,
|
|
2071
|
-
isPersonalized: false
|
|
2072
|
-
}));
|
|
2073
|
-
}
|
|
2074
1925
|
return overrideResult(Object.assign(Object.assign({}, baseReturn), {
|
|
2075
1926
|
status: 'success',
|
|
2076
1927
|
loading: false,
|
|
2077
1928
|
error: null,
|
|
2078
1929
|
experience,
|
|
2079
1930
|
variant,
|
|
2080
|
-
|
|
1931
|
+
variantIndex: index,
|
|
1932
|
+
audience: experience.audience ? experience.audience : null,
|
|
2081
1933
|
profile,
|
|
2082
1934
|
isPersonalized: true
|
|
2083
1935
|
}));
|
|
@@ -2181,6 +2033,7 @@ const Experience = _a => {
|
|
|
2181
2033
|
hasVariants,
|
|
2182
2034
|
experience,
|
|
2183
2035
|
variant,
|
|
2036
|
+
variantIndex,
|
|
2184
2037
|
audience,
|
|
2185
2038
|
isPersonalized,
|
|
2186
2039
|
profile
|
|
@@ -2207,10 +2060,10 @@ const Experience = _a => {
|
|
|
2207
2060
|
if (componentElement) {
|
|
2208
2061
|
observeElement({
|
|
2209
2062
|
element: componentElement,
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2063
|
+
experience,
|
|
2064
|
+
audience,
|
|
2065
|
+
variant,
|
|
2066
|
+
variantIndex
|
|
2214
2067
|
});
|
|
2215
2068
|
}
|
|
2216
2069
|
return () => {
|
|
@@ -2218,12 +2071,12 @@ const Experience = _a => {
|
|
|
2218
2071
|
unobserveElement(componentElement);
|
|
2219
2072
|
}
|
|
2220
2073
|
};
|
|
2221
|
-
}, [observeElement, unobserveElement, experience, baseline, variant, audience]);
|
|
2074
|
+
}, [observeElement, unobserveElement, experience, baseline, variant, variantIndex, audience]);
|
|
2222
2075
|
if (!hasVariants) {
|
|
2223
2076
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
2224
2077
|
children: [!isComponentForwardRef && jsxRuntime.jsx(ComponentMarker, {
|
|
2225
2078
|
ref: componentRef
|
|
2226
|
-
}), /*#__PURE__*/React.createElement(Component, Object.assign({}, passthroughProps, baseline, {
|
|
2079
|
+
}, `marker-no-variants-${(experience === null || experience === void 0 ? void 0 : experience.id) || 'baseline'}-${variant.id}`), /*#__PURE__*/React.createElement(Component, Object.assign({}, passthroughProps, baseline, {
|
|
2227
2080
|
key: baseline.id
|
|
2228
2081
|
}, isComponentForwardRef ? {
|
|
2229
2082
|
ref: componentRef
|
|
@@ -2238,68 +2091,27 @@ const Experience = _a => {
|
|
|
2238
2091
|
component: Component
|
|
2239
2092
|
}));
|
|
2240
2093
|
}
|
|
2241
|
-
if (!experience) {
|
|
2242
|
-
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
2243
|
-
children: [!isComponentForwardRef && jsxRuntime.jsx(ComponentMarker, {
|
|
2244
|
-
ref: componentRef
|
|
2245
|
-
}), jsxRuntime.jsx(Component, Object.assign({}, passthroughProps, baseline, {
|
|
2246
|
-
ninetailed: {
|
|
2247
|
-
isPersonalized: false,
|
|
2248
|
-
audience: {
|
|
2249
|
-
id: 'baseline'
|
|
2250
|
-
}
|
|
2251
|
-
}
|
|
2252
|
-
}, isComponentForwardRef ? {
|
|
2253
|
-
ref: componentRef
|
|
2254
|
-
} : {}))]
|
|
2255
|
-
});
|
|
2256
|
-
}
|
|
2257
|
-
if (!variant) {
|
|
2258
|
-
return jsxRuntime.jsx(TrackExperience, Object.assign({
|
|
2259
|
-
experience: experience,
|
|
2260
|
-
variant: baseline,
|
|
2261
|
-
// the profile is definitely defined, otherwise there wouldn't be an experience selected
|
|
2262
|
-
profile: profile
|
|
2263
|
-
}, {
|
|
2264
|
-
children: jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
2265
|
-
children: [!isComponentForwardRef && jsxRuntime.jsx(ComponentMarker, {
|
|
2266
|
-
ref: componentRef
|
|
2267
|
-
}), jsxRuntime.jsx(Component, Object.assign({}, passthroughProps, baseline, {
|
|
2268
|
-
ninetailed: {
|
|
2269
|
-
isPersonalized: false,
|
|
2270
|
-
audience: {
|
|
2271
|
-
id: (audience === null || audience === void 0 ? void 0 : audience.id) || 'all visitors'
|
|
2272
|
-
}
|
|
2273
|
-
}
|
|
2274
|
-
}, isComponentForwardRef ? {
|
|
2275
|
-
ref: componentRef
|
|
2276
|
-
} : {}))]
|
|
2277
|
-
})
|
|
2278
|
-
}), baseline.id);
|
|
2279
|
-
}
|
|
2280
2094
|
const isVariantHidden = 'hidden' in variant && variant.hidden;
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
children: !
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
audience:
|
|
2295
|
-
id: (audience === null || audience === void 0 ? void 0 : audience.id) || 'all visitors'
|
|
2296
|
-
}
|
|
2095
|
+
if (isVariantHidden) {
|
|
2096
|
+
return jsxRuntime.jsx(ComponentMarker, {
|
|
2097
|
+
ref: componentRef
|
|
2098
|
+
}, `marker-hidden-${(experience === null || experience === void 0 ? void 0 : experience.id) || 'baseline'}-${variant.id}`);
|
|
2099
|
+
}
|
|
2100
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
2101
|
+
children: [!isComponentForwardRef && jsxRuntime.jsx(ComponentMarker, {
|
|
2102
|
+
ref: componentRef
|
|
2103
|
+
}, `marker-${(experience === null || experience === void 0 ? void 0 : experience.id) || 'baseline'}-${variant.id}`), /*#__PURE__*/React.createElement(Component, Object.assign({}, Object.assign(Object.assign({}, passthroughProps), variant), {
|
|
2104
|
+
key: `${(experience === null || experience === void 0 ? void 0 : experience.id) || 'baseline'}-${variant.id}`,
|
|
2105
|
+
ninetailed: {
|
|
2106
|
+
isPersonalized,
|
|
2107
|
+
audience: {
|
|
2108
|
+
id: (audience === null || audience === void 0 ? void 0 : audience.id) || 'all visitors'
|
|
2297
2109
|
}
|
|
2298
|
-
}
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
}
|
|
2302
|
-
})
|
|
2110
|
+
}
|
|
2111
|
+
}, isComponentForwardRef ? {
|
|
2112
|
+
ref: componentRef
|
|
2113
|
+
} : {}))]
|
|
2114
|
+
});
|
|
2303
2115
|
};
|
|
2304
2116
|
|
|
2305
2117
|
const ESRContext = /*#__PURE__*/React__default["default"].createContext(undefined);
|
|
@@ -2473,7 +2285,8 @@ const NinetailedProvider = ({
|
|
|
2473
2285
|
requestTimeout,
|
|
2474
2286
|
plugins: _plugins = [],
|
|
2475
2287
|
onLog,
|
|
2476
|
-
onError
|
|
2288
|
+
onError,
|
|
2289
|
+
componentViewTrackingThreshold
|
|
2477
2290
|
}) => {
|
|
2478
2291
|
const ninetailed = React.useMemo(() => new experience_js.Ninetailed({
|
|
2479
2292
|
clientId,
|
|
@@ -2486,7 +2299,8 @@ const NinetailedProvider = ({
|
|
|
2486
2299
|
locale,
|
|
2487
2300
|
requestTimeout,
|
|
2488
2301
|
onLog,
|
|
2489
|
-
onError
|
|
2302
|
+
onError,
|
|
2303
|
+
componentViewTrackingThreshold
|
|
2490
2304
|
}), []);
|
|
2491
2305
|
return jsxRuntime.jsx(NinetailedContext.Provider, Object.assign({
|
|
2492
2306
|
value: ninetailed
|
|
@@ -2633,7 +2447,6 @@ exports.ExperimentsProvider = ExperimentsProvider;
|
|
|
2633
2447
|
exports.MergeTag = MergeTag;
|
|
2634
2448
|
exports.NinetailedProvider = NinetailedProvider;
|
|
2635
2449
|
exports.Personalize = Personalize;
|
|
2636
|
-
exports.TrackExperience = TrackExperience;
|
|
2637
2450
|
exports.TrackHasSeenComponent = TrackHasSeenComponent;
|
|
2638
2451
|
exports.useExperience = useExperience;
|
|
2639
2452
|
exports.useExperiments = useExperiments;
|