@dynamic-labs/wagmi-connector 0.14.11 → 0.14.13

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 CHANGED
@@ -7,11 +7,1096 @@ var wagmi = require('wagmi');
7
7
  var _public = require('wagmi/providers/public');
8
8
  var sdkReact = require('@dynamic-labs/sdk-react');
9
9
  var utils = require('ethers/lib/utils.js');
10
+ var chains = require('wagmi/chains');
11
+ var ethers = require('ethers');
10
12
 
11
13
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
14
 
13
15
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
14
16
 
17
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
18
+
19
+ var check = function (it) {
20
+ return it && it.Math == Math && it;
21
+ };
22
+
23
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
24
+ var global$b =
25
+ // eslint-disable-next-line es/no-global-this -- safe
26
+ check(typeof globalThis == 'object' && globalThis) ||
27
+ check(typeof window == 'object' && window) ||
28
+ // eslint-disable-next-line no-restricted-globals -- safe
29
+ check(typeof self == 'object' && self) ||
30
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
31
+ // eslint-disable-next-line no-new-func -- fallback
32
+ (function () { return this; })() || Function('return this')();
33
+
34
+ var objectGetOwnPropertyDescriptor = {};
35
+
36
+ var fails$c = function (exec) {
37
+ try {
38
+ return !!exec();
39
+ } catch (error) {
40
+ return true;
41
+ }
42
+ };
43
+
44
+ var fails$b = fails$c;
45
+
46
+ // Detect IE8's incomplete defineProperty implementation
47
+ var descriptors = !fails$b(function () {
48
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
49
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
50
+ });
51
+
52
+ var fails$a = fails$c;
53
+
54
+ var functionBindNative = !fails$a(function () {
55
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
56
+ var test = (function () { /* empty */ }).bind();
57
+ // eslint-disable-next-line no-prototype-builtins -- safe
58
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
59
+ });
60
+
61
+ var NATIVE_BIND$1 = functionBindNative;
62
+
63
+ var call$6 = Function.prototype.call;
64
+
65
+ var functionCall = NATIVE_BIND$1 ? call$6.bind(call$6) : function () {
66
+ return call$6.apply(call$6, arguments);
67
+ };
68
+
69
+ var objectPropertyIsEnumerable = {};
70
+
71
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
72
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
73
+ var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
74
+
75
+ // Nashorn ~ JDK8 bug
76
+ var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
77
+
78
+ // `Object.prototype.propertyIsEnumerable` method implementation
79
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
80
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
81
+ var descriptor = getOwnPropertyDescriptor$1(this, V);
82
+ return !!descriptor && descriptor.enumerable;
83
+ } : $propertyIsEnumerable;
84
+
85
+ var createPropertyDescriptor$3 = function (bitmap, value) {
86
+ return {
87
+ enumerable: !(bitmap & 1),
88
+ configurable: !(bitmap & 2),
89
+ writable: !(bitmap & 4),
90
+ value: value
91
+ };
92
+ };
93
+
94
+ var NATIVE_BIND = functionBindNative;
95
+
96
+ var FunctionPrototype$1 = Function.prototype;
97
+ var call$5 = FunctionPrototype$1.call;
98
+ var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$5, call$5);
99
+
100
+ var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
101
+ return function () {
102
+ return call$5.apply(fn, arguments);
103
+ };
104
+ };
105
+
106
+ var uncurryThis$a = functionUncurryThis;
107
+
108
+ var toString$3 = uncurryThis$a({}.toString);
109
+ var stringSlice = uncurryThis$a(''.slice);
110
+
111
+ var classofRaw$1 = function (it) {
112
+ return stringSlice(toString$3(it), 8, -1);
113
+ };
114
+
115
+ var uncurryThis$9 = functionUncurryThis;
116
+ var fails$9 = fails$c;
117
+ var classof$3 = classofRaw$1;
118
+
119
+ var $Object$4 = Object;
120
+ var split = uncurryThis$9(''.split);
121
+
122
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
123
+ var indexedObject = fails$9(function () {
124
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
125
+ // eslint-disable-next-line no-prototype-builtins -- safe
126
+ return !$Object$4('z').propertyIsEnumerable(0);
127
+ }) ? function (it) {
128
+ return classof$3(it) == 'String' ? split(it, '') : $Object$4(it);
129
+ } : $Object$4;
130
+
131
+ // we can't use just `it == null` since of `document.all` special case
132
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
133
+ var isNullOrUndefined$2 = function (it) {
134
+ return it === null || it === undefined;
135
+ };
136
+
137
+ var isNullOrUndefined$1 = isNullOrUndefined$2;
138
+
139
+ var $TypeError$7 = TypeError;
140
+
141
+ // `RequireObjectCoercible` abstract operation
142
+ // https://tc39.es/ecma262/#sec-requireobjectcoercible
143
+ var requireObjectCoercible$3 = function (it) {
144
+ if (isNullOrUndefined$1(it)) throw $TypeError$7("Can't call method on " + it);
145
+ return it;
146
+ };
147
+
148
+ // toObject with fallback for non-array-like ES3 strings
149
+ var IndexedObject$1 = indexedObject;
150
+ var requireObjectCoercible$2 = requireObjectCoercible$3;
151
+
152
+ var toIndexedObject$5 = function (it) {
153
+ return IndexedObject$1(requireObjectCoercible$2(it));
154
+ };
155
+
156
+ var documentAll$2 = typeof document == 'object' && document.all;
157
+
158
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
159
+ var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
160
+
161
+ var documentAll_1 = {
162
+ all: documentAll$2,
163
+ IS_HTMLDDA: IS_HTMLDDA
164
+ };
165
+
166
+ var $documentAll$1 = documentAll_1;
167
+
168
+ var documentAll$1 = $documentAll$1.all;
169
+
170
+ // `IsCallable` abstract operation
171
+ // https://tc39.es/ecma262/#sec-iscallable
172
+ var isCallable$f = $documentAll$1.IS_HTMLDDA ? function (argument) {
173
+ return typeof argument == 'function' || argument === documentAll$1;
174
+ } : function (argument) {
175
+ return typeof argument == 'function';
176
+ };
177
+
178
+ var isCallable$e = isCallable$f;
179
+ var $documentAll = documentAll_1;
180
+
181
+ var documentAll = $documentAll.all;
182
+
183
+ var isObject$7 = $documentAll.IS_HTMLDDA ? function (it) {
184
+ return typeof it == 'object' ? it !== null : isCallable$e(it) || it === documentAll;
185
+ } : function (it) {
186
+ return typeof it == 'object' ? it !== null : isCallable$e(it);
187
+ };
188
+
189
+ var global$a = global$b;
190
+ var isCallable$d = isCallable$f;
191
+
192
+ var aFunction = function (argument) {
193
+ return isCallable$d(argument) ? argument : undefined;
194
+ };
195
+
196
+ var getBuiltIn$4 = function (namespace, method) {
197
+ return arguments.length < 2 ? aFunction(global$a[namespace]) : global$a[namespace] && global$a[namespace][method];
198
+ };
199
+
200
+ var uncurryThis$8 = functionUncurryThis;
201
+
202
+ var objectIsPrototypeOf = uncurryThis$8({}.isPrototypeOf);
203
+
204
+ var getBuiltIn$3 = getBuiltIn$4;
205
+
206
+ var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
207
+
208
+ var global$9 = global$b;
209
+ var userAgent = engineUserAgent;
210
+
211
+ var process = global$9.process;
212
+ var Deno = global$9.Deno;
213
+ var versions = process && process.versions || Deno && Deno.version;
214
+ var v8 = versions && versions.v8;
215
+ var match, version;
216
+
217
+ if (v8) {
218
+ match = v8.split('.');
219
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
220
+ // but their correct versions are not interesting for us
221
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
222
+ }
223
+
224
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
225
+ // so check `userAgent` even if `.v8` exists, but 0
226
+ if (!version && userAgent) {
227
+ match = userAgent.match(/Edge\/(\d+)/);
228
+ if (!match || match[1] >= 74) {
229
+ match = userAgent.match(/Chrome\/(\d+)/);
230
+ if (match) version = +match[1];
231
+ }
232
+ }
233
+
234
+ var engineV8Version = version;
235
+
236
+ /* eslint-disable es/no-symbol -- required for testing */
237
+
238
+ var V8_VERSION = engineV8Version;
239
+ var fails$8 = fails$c;
240
+
241
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
242
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$8(function () {
243
+ var symbol = Symbol();
244
+ // Chrome 38 Symbol has incorrect toString conversion
245
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
246
+ return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
247
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
248
+ !Symbol.sham && V8_VERSION && V8_VERSION < 41;
249
+ });
250
+
251
+ /* eslint-disable es/no-symbol -- required for testing */
252
+
253
+ var NATIVE_SYMBOL$1 = symbolConstructorDetection;
254
+
255
+ var useSymbolAsUid = NATIVE_SYMBOL$1
256
+ && !Symbol.sham
257
+ && typeof Symbol.iterator == 'symbol';
258
+
259
+ var getBuiltIn$2 = getBuiltIn$4;
260
+ var isCallable$c = isCallable$f;
261
+ var isPrototypeOf = objectIsPrototypeOf;
262
+ var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
263
+
264
+ var $Object$3 = Object;
265
+
266
+ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
267
+ return typeof it == 'symbol';
268
+ } : function (it) {
269
+ var $Symbol = getBuiltIn$2('Symbol');
270
+ return isCallable$c($Symbol) && isPrototypeOf($Symbol.prototype, $Object$3(it));
271
+ };
272
+
273
+ var $String$3 = String;
274
+
275
+ var tryToString$1 = function (argument) {
276
+ try {
277
+ return $String$3(argument);
278
+ } catch (error) {
279
+ return 'Object';
280
+ }
281
+ };
282
+
283
+ var isCallable$b = isCallable$f;
284
+ var tryToString = tryToString$1;
285
+
286
+ var $TypeError$6 = TypeError;
287
+
288
+ // `Assert: IsCallable(argument) is true`
289
+ var aCallable$1 = function (argument) {
290
+ if (isCallable$b(argument)) return argument;
291
+ throw $TypeError$6(tryToString(argument) + ' is not a function');
292
+ };
293
+
294
+ var aCallable = aCallable$1;
295
+ var isNullOrUndefined = isNullOrUndefined$2;
296
+
297
+ // `GetMethod` abstract operation
298
+ // https://tc39.es/ecma262/#sec-getmethod
299
+ var getMethod$1 = function (V, P) {
300
+ var func = V[P];
301
+ return isNullOrUndefined(func) ? undefined : aCallable(func);
302
+ };
303
+
304
+ var call$4 = functionCall;
305
+ var isCallable$a = isCallable$f;
306
+ var isObject$6 = isObject$7;
307
+
308
+ var $TypeError$5 = TypeError;
309
+
310
+ // `OrdinaryToPrimitive` abstract operation
311
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
312
+ var ordinaryToPrimitive$1 = function (input, pref) {
313
+ var fn, val;
314
+ if (pref === 'string' && isCallable$a(fn = input.toString) && !isObject$6(val = call$4(fn, input))) return val;
315
+ if (isCallable$a(fn = input.valueOf) && !isObject$6(val = call$4(fn, input))) return val;
316
+ if (pref !== 'string' && isCallable$a(fn = input.toString) && !isObject$6(val = call$4(fn, input))) return val;
317
+ throw $TypeError$5("Can't convert object to primitive value");
318
+ };
319
+
320
+ var shared$3 = {exports: {}};
321
+
322
+ var global$8 = global$b;
323
+
324
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
325
+ var defineProperty$5 = Object.defineProperty;
326
+
327
+ var defineGlobalProperty$3 = function (key, value) {
328
+ try {
329
+ defineProperty$5(global$8, key, { value: value, configurable: true, writable: true });
330
+ } catch (error) {
331
+ global$8[key] = value;
332
+ } return value;
333
+ };
334
+
335
+ var global$7 = global$b;
336
+ var defineGlobalProperty$2 = defineGlobalProperty$3;
337
+
338
+ var SHARED = '__core-js_shared__';
339
+ var store$3 = global$7[SHARED] || defineGlobalProperty$2(SHARED, {});
340
+
341
+ var sharedStore = store$3;
342
+
343
+ var store$2 = sharedStore;
344
+
345
+ (shared$3.exports = function (key, value) {
346
+ return store$2[key] || (store$2[key] = value !== undefined ? value : {});
347
+ })('versions', []).push({
348
+ version: '3.26.1',
349
+ mode: 'global',
350
+ copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
351
+ license: 'https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE',
352
+ source: 'https://github.com/zloirock/core-js'
353
+ });
354
+
355
+ var requireObjectCoercible$1 = requireObjectCoercible$3;
356
+
357
+ var $Object$2 = Object;
358
+
359
+ // `ToObject` abstract operation
360
+ // https://tc39.es/ecma262/#sec-toobject
361
+ var toObject$3 = function (argument) {
362
+ return $Object$2(requireObjectCoercible$1(argument));
363
+ };
364
+
365
+ var uncurryThis$7 = functionUncurryThis;
366
+ var toObject$2 = toObject$3;
367
+
368
+ var hasOwnProperty = uncurryThis$7({}.hasOwnProperty);
369
+
370
+ // `HasOwnProperty` abstract operation
371
+ // https://tc39.es/ecma262/#sec-hasownproperty
372
+ // eslint-disable-next-line es/no-object-hasown -- safe
373
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
374
+ return hasOwnProperty(toObject$2(it), key);
375
+ };
376
+
377
+ var uncurryThis$6 = functionUncurryThis;
378
+
379
+ var id = 0;
380
+ var postfix = Math.random();
381
+ var toString$2 = uncurryThis$6(1.0.toString);
382
+
383
+ var uid$2 = function (key) {
384
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$2(++id + postfix, 36);
385
+ };
386
+
387
+ var global$6 = global$b;
388
+ var shared$2 = shared$3.exports;
389
+ var hasOwn$8 = hasOwnProperty_1;
390
+ var uid$1 = uid$2;
391
+ var NATIVE_SYMBOL = symbolConstructorDetection;
392
+ var USE_SYMBOL_AS_UID = useSymbolAsUid;
393
+
394
+ var WellKnownSymbolsStore = shared$2('wks');
395
+ var Symbol$1 = global$6.Symbol;
396
+ var symbolFor = Symbol$1 && Symbol$1['for'];
397
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
398
+
399
+ var wellKnownSymbol$a = function (name) {
400
+ if (!hasOwn$8(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
401
+ var description = 'Symbol.' + name;
402
+ if (NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)) {
403
+ WellKnownSymbolsStore[name] = Symbol$1[name];
404
+ } else if (USE_SYMBOL_AS_UID && symbolFor) {
405
+ WellKnownSymbolsStore[name] = symbolFor(description);
406
+ } else {
407
+ WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
408
+ }
409
+ } return WellKnownSymbolsStore[name];
410
+ };
411
+
412
+ var call$3 = functionCall;
413
+ var isObject$5 = isObject$7;
414
+ var isSymbol$1 = isSymbol$2;
415
+ var getMethod = getMethod$1;
416
+ var ordinaryToPrimitive = ordinaryToPrimitive$1;
417
+ var wellKnownSymbol$9 = wellKnownSymbol$a;
418
+
419
+ var $TypeError$4 = TypeError;
420
+ var TO_PRIMITIVE = wellKnownSymbol$9('toPrimitive');
421
+
422
+ // `ToPrimitive` abstract operation
423
+ // https://tc39.es/ecma262/#sec-toprimitive
424
+ var toPrimitive$1 = function (input, pref) {
425
+ if (!isObject$5(input) || isSymbol$1(input)) return input;
426
+ var exoticToPrim = getMethod(input, TO_PRIMITIVE);
427
+ var result;
428
+ if (exoticToPrim) {
429
+ if (pref === undefined) pref = 'default';
430
+ result = call$3(exoticToPrim, input, pref);
431
+ if (!isObject$5(result) || isSymbol$1(result)) return result;
432
+ throw $TypeError$4("Can't convert object to primitive value");
433
+ }
434
+ if (pref === undefined) pref = 'number';
435
+ return ordinaryToPrimitive(input, pref);
436
+ };
437
+
438
+ var toPrimitive = toPrimitive$1;
439
+ var isSymbol = isSymbol$2;
440
+
441
+ // `ToPropertyKey` abstract operation
442
+ // https://tc39.es/ecma262/#sec-topropertykey
443
+ var toPropertyKey$2 = function (argument) {
444
+ var key = toPrimitive(argument, 'string');
445
+ return isSymbol(key) ? key : key + '';
446
+ };
447
+
448
+ var global$5 = global$b;
449
+ var isObject$4 = isObject$7;
450
+
451
+ var document$1 = global$5.document;
452
+ // typeof document.createElement is 'object' in old IE
453
+ var EXISTS$1 = isObject$4(document$1) && isObject$4(document$1.createElement);
454
+
455
+ var documentCreateElement$2 = function (it) {
456
+ return EXISTS$1 ? document$1.createElement(it) : {};
457
+ };
458
+
459
+ var DESCRIPTORS$9 = descriptors;
460
+ var fails$7 = fails$c;
461
+ var createElement = documentCreateElement$2;
462
+
463
+ // Thanks to IE8 for its funny defineProperty
464
+ var ie8DomDefine = !DESCRIPTORS$9 && !fails$7(function () {
465
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
466
+ return Object.defineProperty(createElement('div'), 'a', {
467
+ get: function () { return 7; }
468
+ }).a != 7;
469
+ });
470
+
471
+ var DESCRIPTORS$8 = descriptors;
472
+ var call$2 = functionCall;
473
+ var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
474
+ var createPropertyDescriptor$2 = createPropertyDescriptor$3;
475
+ var toIndexedObject$4 = toIndexedObject$5;
476
+ var toPropertyKey$1 = toPropertyKey$2;
477
+ var hasOwn$7 = hasOwnProperty_1;
478
+ var IE8_DOM_DEFINE$1 = ie8DomDefine;
479
+
480
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
481
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
482
+
483
+ // `Object.getOwnPropertyDescriptor` method
484
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
485
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
486
+ O = toIndexedObject$4(O);
487
+ P = toPropertyKey$1(P);
488
+ if (IE8_DOM_DEFINE$1) try {
489
+ return $getOwnPropertyDescriptor$1(O, P);
490
+ } catch (error) { /* empty */ }
491
+ if (hasOwn$7(O, P)) return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f, O, P), O[P]);
492
+ };
493
+
494
+ var objectDefineProperty = {};
495
+
496
+ var DESCRIPTORS$7 = descriptors;
497
+ var fails$6 = fails$c;
498
+
499
+ // V8 ~ Chrome 36-
500
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
501
+ var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$6(function () {
502
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
503
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
504
+ value: 42,
505
+ writable: false
506
+ }).prototype != 42;
507
+ });
508
+
509
+ var isObject$3 = isObject$7;
510
+
511
+ var $String$2 = String;
512
+ var $TypeError$3 = TypeError;
513
+
514
+ // `Assert: Type(argument) is Object`
515
+ var anObject$5 = function (argument) {
516
+ if (isObject$3(argument)) return argument;
517
+ throw $TypeError$3($String$2(argument) + ' is not an object');
518
+ };
519
+
520
+ var DESCRIPTORS$6 = descriptors;
521
+ var IE8_DOM_DEFINE = ie8DomDefine;
522
+ var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
523
+ var anObject$4 = anObject$5;
524
+ var toPropertyKey = toPropertyKey$2;
525
+
526
+ var $TypeError$2 = TypeError;
527
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
528
+ var $defineProperty = Object.defineProperty;
529
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
530
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
531
+ var ENUMERABLE = 'enumerable';
532
+ var CONFIGURABLE$1 = 'configurable';
533
+ var WRITABLE = 'writable';
534
+
535
+ // `Object.defineProperty` method
536
+ // https://tc39.es/ecma262/#sec-object.defineproperty
537
+ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
538
+ anObject$4(O);
539
+ P = toPropertyKey(P);
540
+ anObject$4(Attributes);
541
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
542
+ var current = $getOwnPropertyDescriptor(O, P);
543
+ if (current && current[WRITABLE]) {
544
+ O[P] = Attributes.value;
545
+ Attributes = {
546
+ configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
547
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
548
+ writable: false
549
+ };
550
+ }
551
+ } return $defineProperty(O, P, Attributes);
552
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
553
+ anObject$4(O);
554
+ P = toPropertyKey(P);
555
+ anObject$4(Attributes);
556
+ if (IE8_DOM_DEFINE) try {
557
+ return $defineProperty(O, P, Attributes);
558
+ } catch (error) { /* empty */ }
559
+ if ('get' in Attributes || 'set' in Attributes) throw $TypeError$2('Accessors not supported');
560
+ if ('value' in Attributes) O[P] = Attributes.value;
561
+ return O;
562
+ };
563
+
564
+ var DESCRIPTORS$5 = descriptors;
565
+ var definePropertyModule$3 = objectDefineProperty;
566
+ var createPropertyDescriptor$1 = createPropertyDescriptor$3;
567
+
568
+ var createNonEnumerableProperty$4 = DESCRIPTORS$5 ? function (object, key, value) {
569
+ return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
570
+ } : function (object, key, value) {
571
+ object[key] = value;
572
+ return object;
573
+ };
574
+
575
+ var makeBuiltIn$2 = {exports: {}};
576
+
577
+ var DESCRIPTORS$4 = descriptors;
578
+ var hasOwn$6 = hasOwnProperty_1;
579
+
580
+ var FunctionPrototype = Function.prototype;
581
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
582
+ var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
583
+
584
+ var EXISTS = hasOwn$6(FunctionPrototype, 'name');
585
+ // additional protection from minified / mangled / dropped function names
586
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
587
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable));
588
+
589
+ var functionName = {
590
+ EXISTS: EXISTS,
591
+ PROPER: PROPER,
592
+ CONFIGURABLE: CONFIGURABLE
593
+ };
594
+
595
+ var uncurryThis$5 = functionUncurryThis;
596
+ var isCallable$9 = isCallable$f;
597
+ var store$1 = sharedStore;
598
+
599
+ var functionToString = uncurryThis$5(Function.toString);
600
+
601
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
602
+ if (!isCallable$9(store$1.inspectSource)) {
603
+ store$1.inspectSource = function (it) {
604
+ return functionToString(it);
605
+ };
606
+ }
607
+
608
+ var inspectSource$1 = store$1.inspectSource;
609
+
610
+ var global$4 = global$b;
611
+ var isCallable$8 = isCallable$f;
612
+
613
+ var WeakMap$1 = global$4.WeakMap;
614
+
615
+ var weakMapBasicDetection = isCallable$8(WeakMap$1) && /native code/.test(String(WeakMap$1));
616
+
617
+ var shared$1 = shared$3.exports;
618
+ var uid = uid$2;
619
+
620
+ var keys = shared$1('keys');
621
+
622
+ var sharedKey$3 = function (key) {
623
+ return keys[key] || (keys[key] = uid(key));
624
+ };
625
+
626
+ var hiddenKeys$4 = {};
627
+
628
+ var NATIVE_WEAK_MAP = weakMapBasicDetection;
629
+ var global$3 = global$b;
630
+ var isObject$2 = isObject$7;
631
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
632
+ var hasOwn$5 = hasOwnProperty_1;
633
+ var shared = sharedStore;
634
+ var sharedKey$2 = sharedKey$3;
635
+ var hiddenKeys$3 = hiddenKeys$4;
636
+
637
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
638
+ var TypeError$1 = global$3.TypeError;
639
+ var WeakMap = global$3.WeakMap;
640
+ var set, get, has;
641
+
642
+ var enforce = function (it) {
643
+ return has(it) ? get(it) : set(it, {});
644
+ };
645
+
646
+ var getterFor = function (TYPE) {
647
+ return function (it) {
648
+ var state;
649
+ if (!isObject$2(it) || (state = get(it)).type !== TYPE) {
650
+ throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
651
+ } return state;
652
+ };
653
+ };
654
+
655
+ if (NATIVE_WEAK_MAP || shared.state) {
656
+ var store = shared.state || (shared.state = new WeakMap());
657
+ /* eslint-disable no-self-assign -- prototype methods protection */
658
+ store.get = store.get;
659
+ store.has = store.has;
660
+ store.set = store.set;
661
+ /* eslint-enable no-self-assign -- prototype methods protection */
662
+ set = function (it, metadata) {
663
+ if (store.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
664
+ metadata.facade = it;
665
+ store.set(it, metadata);
666
+ return metadata;
667
+ };
668
+ get = function (it) {
669
+ return store.get(it) || {};
670
+ };
671
+ has = function (it) {
672
+ return store.has(it);
673
+ };
674
+ } else {
675
+ var STATE = sharedKey$2('state');
676
+ hiddenKeys$3[STATE] = true;
677
+ set = function (it, metadata) {
678
+ if (hasOwn$5(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
679
+ metadata.facade = it;
680
+ createNonEnumerableProperty$3(it, STATE, metadata);
681
+ return metadata;
682
+ };
683
+ get = function (it) {
684
+ return hasOwn$5(it, STATE) ? it[STATE] : {};
685
+ };
686
+ has = function (it) {
687
+ return hasOwn$5(it, STATE);
688
+ };
689
+ }
690
+
691
+ var internalState = {
692
+ set: set,
693
+ get: get,
694
+ has: has,
695
+ enforce: enforce,
696
+ getterFor: getterFor
697
+ };
698
+
699
+ var fails$5 = fails$c;
700
+ var isCallable$7 = isCallable$f;
701
+ var hasOwn$4 = hasOwnProperty_1;
702
+ var DESCRIPTORS$3 = descriptors;
703
+ var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
704
+ var inspectSource = inspectSource$1;
705
+ var InternalStateModule$1 = internalState;
706
+
707
+ var enforceInternalState = InternalStateModule$1.enforce;
708
+ var getInternalState$1 = InternalStateModule$1.get;
709
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
710
+ var defineProperty$4 = Object.defineProperty;
711
+
712
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$5(function () {
713
+ return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
714
+ });
715
+
716
+ var TEMPLATE = String(String).split('String');
717
+
718
+ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
719
+ if (String(name).slice(0, 7) === 'Symbol(') {
720
+ name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
721
+ }
722
+ if (options && options.getter) name = 'get ' + name;
723
+ if (options && options.setter) name = 'set ' + name;
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
+ else value.name = name;
727
+ }
728
+ if (CONFIGURABLE_LENGTH && options && hasOwn$4(options, 'arity') && value.length !== options.arity) {
729
+ defineProperty$4(value, 'length', { value: options.arity });
730
+ }
731
+ try {
732
+ if (options && hasOwn$4(options, 'constructor') && options.constructor) {
733
+ if (DESCRIPTORS$3) defineProperty$4(value, 'prototype', { writable: false });
734
+ // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
735
+ } else if (value.prototype) value.prototype = undefined;
736
+ } catch (error) { /* empty */ }
737
+ var state = enforceInternalState(value);
738
+ if (!hasOwn$4(state, 'source')) {
739
+ state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
740
+ } return value;
741
+ };
742
+
743
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
744
+ // eslint-disable-next-line no-extend-native -- required
745
+ Function.prototype.toString = makeBuiltIn$1(function toString() {
746
+ return isCallable$7(this) && getInternalState$1(this).source || inspectSource(this);
747
+ }, 'toString');
748
+
749
+ var isCallable$6 = isCallable$f;
750
+ var definePropertyModule$2 = objectDefineProperty;
751
+ var makeBuiltIn = makeBuiltIn$2.exports;
752
+ var defineGlobalProperty$1 = defineGlobalProperty$3;
753
+
754
+ var defineBuiltIn$3 = function (O, key, value, options) {
755
+ if (!options) options = {};
756
+ var simple = options.enumerable;
757
+ var name = options.name !== undefined ? options.name : key;
758
+ if (isCallable$6(value)) makeBuiltIn(value, name, options);
759
+ if (options.global) {
760
+ if (simple) O[key] = value;
761
+ else defineGlobalProperty$1(key, value);
762
+ } else {
763
+ try {
764
+ if (!options.unsafe) delete O[key];
765
+ else if (O[key]) simple = true;
766
+ } catch (error) { /* empty */ }
767
+ if (simple) O[key] = value;
768
+ else definePropertyModule$2.f(O, key, {
769
+ value: value,
770
+ enumerable: false,
771
+ configurable: !options.nonConfigurable,
772
+ writable: !options.nonWritable
773
+ });
774
+ } return O;
775
+ };
776
+
777
+ var objectGetOwnPropertyNames = {};
778
+
779
+ var ceil = Math.ceil;
780
+ var floor = Math.floor;
781
+
782
+ // `Math.trunc` method
783
+ // https://tc39.es/ecma262/#sec-math.trunc
784
+ // eslint-disable-next-line es/no-math-trunc -- safe
785
+ var mathTrunc = Math.trunc || function trunc(x) {
786
+ var n = +x;
787
+ return (n > 0 ? floor : ceil)(n);
788
+ };
789
+
790
+ var trunc = mathTrunc;
791
+
792
+ // `ToIntegerOrInfinity` abstract operation
793
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
794
+ var toIntegerOrInfinity$2 = function (argument) {
795
+ var number = +argument;
796
+ // eslint-disable-next-line no-self-compare -- NaN check
797
+ return number !== number || number === 0 ? 0 : trunc(number);
798
+ };
799
+
800
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
801
+
802
+ var max = Math.max;
803
+ var min$1 = Math.min;
804
+
805
+ // Helper for a popular repeating case of the spec:
806
+ // Let integer be ? ToInteger(index).
807
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
808
+ var toAbsoluteIndex$1 = function (index, length) {
809
+ var integer = toIntegerOrInfinity$1(index);
810
+ return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
811
+ };
812
+
813
+ var toIntegerOrInfinity = toIntegerOrInfinity$2;
814
+
815
+ var min = Math.min;
816
+
817
+ // `ToLength` abstract operation
818
+ // https://tc39.es/ecma262/#sec-tolength
819
+ var toLength$1 = function (argument) {
820
+ return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
821
+ };
822
+
823
+ var toLength = toLength$1;
824
+
825
+ // `LengthOfArrayLike` abstract operation
826
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
827
+ var lengthOfArrayLike$1 = function (obj) {
828
+ return toLength(obj.length);
829
+ };
830
+
831
+ var toIndexedObject$3 = toIndexedObject$5;
832
+ var toAbsoluteIndex = toAbsoluteIndex$1;
833
+ var lengthOfArrayLike = lengthOfArrayLike$1;
834
+
835
+ // `Array.prototype.{ indexOf, includes }` methods implementation
836
+ var createMethod = function (IS_INCLUDES) {
837
+ return function ($this, el, fromIndex) {
838
+ var O = toIndexedObject$3($this);
839
+ var length = lengthOfArrayLike(O);
840
+ var index = toAbsoluteIndex(fromIndex, length);
841
+ var value;
842
+ // Array#includes uses SameValueZero equality algorithm
843
+ // eslint-disable-next-line no-self-compare -- NaN check
844
+ if (IS_INCLUDES && el != el) while (length > index) {
845
+ value = O[index++];
846
+ // eslint-disable-next-line no-self-compare -- NaN check
847
+ if (value != value) return true;
848
+ // Array#indexOf ignores holes, Array#includes - not
849
+ } else for (;length > index; index++) {
850
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
851
+ } return !IS_INCLUDES && -1;
852
+ };
853
+ };
854
+
855
+ var arrayIncludes = {
856
+ // `Array.prototype.includes` method
857
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
858
+ includes: createMethod(true),
859
+ // `Array.prototype.indexOf` method
860
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
861
+ indexOf: createMethod(false)
862
+ };
863
+
864
+ var uncurryThis$4 = functionUncurryThis;
865
+ var hasOwn$3 = hasOwnProperty_1;
866
+ var toIndexedObject$2 = toIndexedObject$5;
867
+ var indexOf = arrayIncludes.indexOf;
868
+ var hiddenKeys$2 = hiddenKeys$4;
869
+
870
+ var push = uncurryThis$4([].push);
871
+
872
+ var objectKeysInternal = function (object, names) {
873
+ var O = toIndexedObject$2(object);
874
+ var i = 0;
875
+ var result = [];
876
+ var key;
877
+ for (key in O) !hasOwn$3(hiddenKeys$2, key) && hasOwn$3(O, key) && push(result, key);
878
+ // Don't enum bug & hidden keys
879
+ while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
880
+ ~indexOf(result, key) || push(result, key);
881
+ }
882
+ return result;
883
+ };
884
+
885
+ // IE8- don't enum bug keys
886
+ var enumBugKeys$3 = [
887
+ 'constructor',
888
+ 'hasOwnProperty',
889
+ 'isPrototypeOf',
890
+ 'propertyIsEnumerable',
891
+ 'toLocaleString',
892
+ 'toString',
893
+ 'valueOf'
894
+ ];
895
+
896
+ var internalObjectKeys$1 = objectKeysInternal;
897
+ var enumBugKeys$2 = enumBugKeys$3;
898
+
899
+ var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
900
+
901
+ // `Object.getOwnPropertyNames` method
902
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
903
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
904
+ objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
905
+ return internalObjectKeys$1(O, hiddenKeys$1);
906
+ };
907
+
908
+ var objectGetOwnPropertySymbols = {};
909
+
910
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
911
+ objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
912
+
913
+ var getBuiltIn$1 = getBuiltIn$4;
914
+ var uncurryThis$3 = functionUncurryThis;
915
+ var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
916
+ var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
917
+ var anObject$3 = anObject$5;
918
+
919
+ var concat$1 = uncurryThis$3([].concat);
920
+
921
+ // all object keys, includes non-enumerable and symbols
922
+ var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
923
+ var keys = getOwnPropertyNamesModule.f(anObject$3(it));
924
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
925
+ return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
926
+ };
927
+
928
+ var hasOwn$2 = hasOwnProperty_1;
929
+ var ownKeys = ownKeys$1;
930
+ var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
931
+ var definePropertyModule$1 = objectDefineProperty;
932
+
933
+ var copyConstructorProperties$1 = function (target, source, exceptions) {
934
+ var keys = ownKeys(source);
935
+ var defineProperty = definePropertyModule$1.f;
936
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
937
+ for (var i = 0; i < keys.length; i++) {
938
+ var key = keys[i];
939
+ if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
940
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
941
+ }
942
+ }
943
+ };
944
+
945
+ var fails$4 = fails$c;
946
+ var isCallable$5 = isCallable$f;
947
+
948
+ var replacement = /#|\.prototype\./;
949
+
950
+ var isForced$1 = function (feature, detection) {
951
+ var value = data[normalize(feature)];
952
+ return value == POLYFILL ? true
953
+ : value == NATIVE ? false
954
+ : isCallable$5(detection) ? fails$4(detection)
955
+ : !!detection;
956
+ };
957
+
958
+ var normalize = isForced$1.normalize = function (string) {
959
+ return String(string).replace(replacement, '.').toLowerCase();
960
+ };
961
+
962
+ var data = isForced$1.data = {};
963
+ var NATIVE = isForced$1.NATIVE = 'N';
964
+ var POLYFILL = isForced$1.POLYFILL = 'P';
965
+
966
+ var isForced_1 = isForced$1;
967
+
968
+ var global$2 = global$b;
969
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
970
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
971
+ var defineBuiltIn$2 = defineBuiltIn$3;
972
+ var defineGlobalProperty = defineGlobalProperty$3;
973
+ var copyConstructorProperties = copyConstructorProperties$1;
974
+ var isForced = isForced_1;
975
+
976
+ /*
977
+ options.target - name of the target object
978
+ options.global - target is the global object
979
+ options.stat - export as static methods of target
980
+ options.proto - export as prototype methods of target
981
+ options.real - real prototype method for the `pure` version
982
+ options.forced - export even if the native feature is available
983
+ options.bind - bind methods to the target, required for the `pure` version
984
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
985
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
986
+ options.sham - add a flag to not completely full polyfills
987
+ options.enumerable - export as enumerable property
988
+ options.dontCallGetSet - prevent calling a getter on target
989
+ options.name - the .name of the function if it does not match the key
990
+ */
991
+ var _export = function (options, source) {
992
+ var TARGET = options.target;
993
+ var GLOBAL = options.global;
994
+ var STATIC = options.stat;
995
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
996
+ if (GLOBAL) {
997
+ target = global$2;
998
+ } else if (STATIC) {
999
+ target = global$2[TARGET] || defineGlobalProperty(TARGET, {});
1000
+ } else {
1001
+ target = (global$2[TARGET] || {}).prototype;
1002
+ }
1003
+ if (target) for (key in source) {
1004
+ sourceProperty = source[key];
1005
+ if (options.dontCallGetSet) {
1006
+ descriptor = getOwnPropertyDescriptor(target, key);
1007
+ targetProperty = descriptor && descriptor.value;
1008
+ } else targetProperty = target[key];
1009
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1010
+ // contained in target
1011
+ if (!FORCED && targetProperty !== undefined) {
1012
+ if (typeof sourceProperty == typeof targetProperty) continue;
1013
+ copyConstructorProperties(sourceProperty, targetProperty);
1014
+ }
1015
+ // add a flag to not completely full polyfills
1016
+ if (options.sham || (targetProperty && targetProperty.sham)) {
1017
+ createNonEnumerableProperty$2(sourceProperty, 'sham', true);
1018
+ }
1019
+ defineBuiltIn$2(target, key, sourceProperty, options);
1020
+ }
1021
+ };
1022
+
1023
+ var internalObjectKeys = objectKeysInternal;
1024
+ var enumBugKeys$1 = enumBugKeys$3;
1025
+
1026
+ // `Object.keys` method
1027
+ // https://tc39.es/ecma262/#sec-object.keys
1028
+ // eslint-disable-next-line es/no-object-keys -- safe
1029
+ var objectKeys$2 = Object.keys || function keys(O) {
1030
+ return internalObjectKeys(O, enumBugKeys$1);
1031
+ };
1032
+
1033
+ var DESCRIPTORS$2 = descriptors;
1034
+ var uncurryThis$2 = functionUncurryThis;
1035
+ var call$1 = functionCall;
1036
+ var fails$3 = fails$c;
1037
+ var objectKeys$1 = objectKeys$2;
1038
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1039
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1040
+ var toObject$1 = toObject$3;
1041
+ var IndexedObject = indexedObject;
1042
+
1043
+ // eslint-disable-next-line es/no-object-assign -- safe
1044
+ var $assign = Object.assign;
1045
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1046
+ var defineProperty$3 = Object.defineProperty;
1047
+ var concat = uncurryThis$2([].concat);
1048
+
1049
+ // `Object.assign` method
1050
+ // https://tc39.es/ecma262/#sec-object.assign
1051
+ var objectAssign = !$assign || fails$3(function () {
1052
+ // should have correct order of operations (Edge bug)
1053
+ if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$3({}, 'a', {
1054
+ enumerable: true,
1055
+ get: function () {
1056
+ defineProperty$3(this, 'b', {
1057
+ value: 3,
1058
+ enumerable: false
1059
+ });
1060
+ }
1061
+ }), { b: 2 })).b !== 1) return true;
1062
+ // should work with symbols and should have deterministic property order (V8 bug)
1063
+ var A = {};
1064
+ var B = {};
1065
+ // eslint-disable-next-line es/no-symbol -- safe
1066
+ var symbol = Symbol();
1067
+ var alphabet = 'abcdefghijklmnopqrst';
1068
+ A[symbol] = 7;
1069
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1070
+ return $assign({}, A)[symbol] != 7 || objectKeys$1($assign({}, B)).join('') != alphabet;
1071
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1072
+ var T = toObject$1(target);
1073
+ var argumentsLength = arguments.length;
1074
+ var index = 1;
1075
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1076
+ var propertyIsEnumerable = propertyIsEnumerableModule.f;
1077
+ while (argumentsLength > index) {
1078
+ var S = IndexedObject(arguments[index++]);
1079
+ var keys = getOwnPropertySymbols ? concat(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
1080
+ var length = keys.length;
1081
+ var j = 0;
1082
+ var key;
1083
+ while (length > j) {
1084
+ key = keys[j++];
1085
+ if (!DESCRIPTORS$2 || call$1(propertyIsEnumerable, S, key)) T[key] = S[key];
1086
+ }
1087
+ } return T;
1088
+ } : $assign;
1089
+
1090
+ var $$3 = _export;
1091
+ var assign = objectAssign;
1092
+
1093
+ // `Object.assign` method
1094
+ // https://tc39.es/ecma262/#sec-object.assign
1095
+ // eslint-disable-next-line es/no-object-assign -- required for testing
1096
+ $$3({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1097
+ assign: assign
1098
+ });
1099
+
15
1100
  /******************************************************************************
16
1101
  Copyright (c) Microsoft Corporation.
17
1102
 
@@ -39,10 +1124,12 @@ function __awaiter(thisArg, _arguments, P, generator) {
39
1124
 
40
1125
  class Connector extends wagmi.Connector {
41
1126
  constructor({
1127
+ chains,
42
1128
  handleLogOut,
43
1129
  walletConnector
44
1130
  }) {
45
1131
  super({
1132
+ chains,
46
1133
  options: undefined
47
1134
  });
48
1135
  // wagmi properties
@@ -166,9 +1253,16 @@ class Connector extends wagmi.Connector {
166
1253
  return (_b = this.chains.find(x => x.id === chainId)) !== null && _b !== void 0 ? _b : {
167
1254
  id: chainId,
168
1255
  name: `Chain ${id}`,
1256
+ nativeCurrency: {
1257
+ decimals: 18,
1258
+ name: 'Ether',
1259
+ symbol: 'ETH'
1260
+ },
169
1261
  network: `${id}`,
170
1262
  rpcUrls: {
171
- default: ''
1263
+ default: {
1264
+ http: ['']
1265
+ }
172
1266
  }
173
1267
  };
174
1268
  });
@@ -178,12 +1272,558 @@ class Connector extends wagmi.Connector {
178
1272
  }
179
1273
  }
180
1274
 
181
- const SyncDynamicWagmi = ({
1275
+ var objectDefineProperties = {};
1276
+
1277
+ var DESCRIPTORS$1 = descriptors;
1278
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1279
+ var definePropertyModule = objectDefineProperty;
1280
+ var anObject$2 = anObject$5;
1281
+ var toIndexedObject$1 = toIndexedObject$5;
1282
+ var objectKeys = objectKeys$2;
1283
+
1284
+ // `Object.defineProperties` method
1285
+ // https://tc39.es/ecma262/#sec-object.defineproperties
1286
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
1287
+ objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1288
+ anObject$2(O);
1289
+ var props = toIndexedObject$1(Properties);
1290
+ var keys = objectKeys(Properties);
1291
+ var length = keys.length;
1292
+ var index = 0;
1293
+ var key;
1294
+ while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
1295
+ return O;
1296
+ };
1297
+
1298
+ var getBuiltIn = getBuiltIn$4;
1299
+
1300
+ var html$1 = getBuiltIn('document', 'documentElement');
1301
+
1302
+ /* global ActiveXObject -- old IE, WSH */
1303
+
1304
+ var anObject$1 = anObject$5;
1305
+ var definePropertiesModule = objectDefineProperties;
1306
+ var enumBugKeys = enumBugKeys$3;
1307
+ var hiddenKeys = hiddenKeys$4;
1308
+ var html = html$1;
1309
+ var documentCreateElement$1 = documentCreateElement$2;
1310
+ var sharedKey$1 = sharedKey$3;
1311
+
1312
+ var GT = '>';
1313
+ var LT = '<';
1314
+ var PROTOTYPE = 'prototype';
1315
+ var SCRIPT = 'script';
1316
+ var IE_PROTO$1 = sharedKey$1('IE_PROTO');
1317
+
1318
+ var EmptyConstructor = function () { /* empty */ };
1319
+
1320
+ var scriptTag = function (content) {
1321
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1322
+ };
1323
+
1324
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1325
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
1326
+ activeXDocument.write(scriptTag(''));
1327
+ activeXDocument.close();
1328
+ var temp = activeXDocument.parentWindow.Object;
1329
+ activeXDocument = null; // avoid memory leak
1330
+ return temp;
1331
+ };
1332
+
1333
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
1334
+ var NullProtoObjectViaIFrame = function () {
1335
+ // Thrash, waste and sodomy: IE GC bug
1336
+ var iframe = documentCreateElement$1('iframe');
1337
+ var JS = 'java' + SCRIPT + ':';
1338
+ var iframeDocument;
1339
+ iframe.style.display = 'none';
1340
+ html.appendChild(iframe);
1341
+ // https://github.com/zloirock/core-js/issues/475
1342
+ iframe.src = String(JS);
1343
+ iframeDocument = iframe.contentWindow.document;
1344
+ iframeDocument.open();
1345
+ iframeDocument.write(scriptTag('document.F=Object'));
1346
+ iframeDocument.close();
1347
+ return iframeDocument.F;
1348
+ };
1349
+
1350
+ // Check for document.domain and active x support
1351
+ // No need to use active x approach when document.domain is not set
1352
+ // see https://github.com/es-shims/es5-shim/issues/150
1353
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1354
+ // avoid IE GC bug
1355
+ var activeXDocument;
1356
+ var NullProtoObject = function () {
1357
+ try {
1358
+ activeXDocument = new ActiveXObject('htmlfile');
1359
+ } catch (error) { /* ignore */ }
1360
+ NullProtoObject = typeof document != 'undefined'
1361
+ ? document.domain && activeXDocument
1362
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1363
+ : NullProtoObjectViaIFrame()
1364
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
1365
+ var length = enumBugKeys.length;
1366
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1367
+ return NullProtoObject();
1368
+ };
1369
+
1370
+ hiddenKeys[IE_PROTO$1] = true;
1371
+
1372
+ // `Object.create` method
1373
+ // https://tc39.es/ecma262/#sec-object.create
1374
+ // eslint-disable-next-line es/no-object-create -- safe
1375
+ var objectCreate = Object.create || function create(O, Properties) {
1376
+ var result;
1377
+ if (O !== null) {
1378
+ EmptyConstructor[PROTOTYPE] = anObject$1(O);
1379
+ result = new EmptyConstructor();
1380
+ EmptyConstructor[PROTOTYPE] = null;
1381
+ // add "__proto__" for Object.getPrototypeOf polyfill
1382
+ result[IE_PROTO$1] = O;
1383
+ } else result = NullProtoObject();
1384
+ return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1385
+ };
1386
+
1387
+ var wellKnownSymbol$8 = wellKnownSymbol$a;
1388
+ var create$1 = objectCreate;
1389
+ var defineProperty$2 = objectDefineProperty.f;
1390
+
1391
+ var UNSCOPABLES = wellKnownSymbol$8('unscopables');
1392
+ var ArrayPrototype = Array.prototype;
1393
+
1394
+ // Array.prototype[@@unscopables]
1395
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1396
+ if (ArrayPrototype[UNSCOPABLES] == undefined) {
1397
+ defineProperty$2(ArrayPrototype, UNSCOPABLES, {
1398
+ configurable: true,
1399
+ value: create$1(null)
1400
+ });
1401
+ }
1402
+
1403
+ // add a key to Array.prototype[@@unscopables]
1404
+ var addToUnscopables$2 = function (key) {
1405
+ ArrayPrototype[UNSCOPABLES][key] = true;
1406
+ };
1407
+
1408
+ var iterators = {};
1409
+
1410
+ var fails$2 = fails$c;
1411
+
1412
+ var correctPrototypeGetter = !fails$2(function () {
1413
+ function F() { /* empty */ }
1414
+ F.prototype.constructor = null;
1415
+ // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1416
+ return Object.getPrototypeOf(new F()) !== F.prototype;
1417
+ });
1418
+
1419
+ var hasOwn$1 = hasOwnProperty_1;
1420
+ var isCallable$4 = isCallable$f;
1421
+ var toObject = toObject$3;
1422
+ var sharedKey = sharedKey$3;
1423
+ var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1424
+
1425
+ var IE_PROTO = sharedKey('IE_PROTO');
1426
+ var $Object$1 = Object;
1427
+ var ObjectPrototype = $Object$1.prototype;
1428
+
1429
+ // `Object.getPrototypeOf` method
1430
+ // https://tc39.es/ecma262/#sec-object.getprototypeof
1431
+ // eslint-disable-next-line es/no-object-getprototypeof -- safe
1432
+ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
1433
+ var object = toObject(O);
1434
+ if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
1435
+ var constructor = object.constructor;
1436
+ if (isCallable$4(constructor) && object instanceof constructor) {
1437
+ return constructor.prototype;
1438
+ } return object instanceof $Object$1 ? ObjectPrototype : null;
1439
+ };
1440
+
1441
+ var fails$1 = fails$c;
1442
+ var isCallable$3 = isCallable$f;
1443
+ var isObject$1 = isObject$7;
1444
+ var getPrototypeOf$1 = objectGetPrototypeOf;
1445
+ var defineBuiltIn$1 = defineBuiltIn$3;
1446
+ var wellKnownSymbol$7 = wellKnownSymbol$a;
1447
+
1448
+ var ITERATOR$2 = wellKnownSymbol$7('iterator');
1449
+ var BUGGY_SAFARI_ITERATORS$1 = false;
1450
+
1451
+ // `%IteratorPrototype%` object
1452
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
1453
+ var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
1454
+
1455
+ /* eslint-disable es/no-array-prototype-keys -- safe */
1456
+ if ([].keys) {
1457
+ arrayIterator = [].keys();
1458
+ // Safari 8 has buggy iterators w/o `next`
1459
+ if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
1460
+ else {
1461
+ PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
1462
+ if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
1463
+ }
1464
+ }
1465
+
1466
+ var NEW_ITERATOR_PROTOTYPE = !isObject$1(IteratorPrototype$2) || fails$1(function () {
1467
+ var test = {};
1468
+ // FF44- legacy iterators case
1469
+ return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
1470
+ });
1471
+
1472
+ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1473
+
1474
+ // `%IteratorPrototype%[@@iterator]()` method
1475
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1476
+ if (!isCallable$3(IteratorPrototype$2[ITERATOR$2])) {
1477
+ defineBuiltIn$1(IteratorPrototype$2, ITERATOR$2, function () {
1478
+ return this;
1479
+ });
1480
+ }
1481
+
1482
+ var iteratorsCore = {
1483
+ IteratorPrototype: IteratorPrototype$2,
1484
+ BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1485
+ };
1486
+
1487
+ var defineProperty$1 = objectDefineProperty.f;
1488
+ var hasOwn = hasOwnProperty_1;
1489
+ var wellKnownSymbol$6 = wellKnownSymbol$a;
1490
+
1491
+ var TO_STRING_TAG$3 = wellKnownSymbol$6('toStringTag');
1492
+
1493
+ var setToStringTag$2 = function (target, TAG, STATIC) {
1494
+ if (target && !STATIC) target = target.prototype;
1495
+ if (target && !hasOwn(target, TO_STRING_TAG$3)) {
1496
+ defineProperty$1(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
1497
+ }
1498
+ };
1499
+
1500
+ var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1501
+ var create = objectCreate;
1502
+ var createPropertyDescriptor = createPropertyDescriptor$3;
1503
+ var setToStringTag$1 = setToStringTag$2;
1504
+ var Iterators$2 = iterators;
1505
+
1506
+ var returnThis$1 = function () { return this; };
1507
+
1508
+ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1509
+ var TO_STRING_TAG = NAME + ' Iterator';
1510
+ IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1511
+ setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false);
1512
+ Iterators$2[TO_STRING_TAG] = returnThis$1;
1513
+ return IteratorConstructor;
1514
+ };
1515
+
1516
+ var isCallable$2 = isCallable$f;
1517
+
1518
+ var $String$1 = String;
1519
+ var $TypeError$1 = TypeError;
1520
+
1521
+ var aPossiblePrototype$1 = function (argument) {
1522
+ if (typeof argument == 'object' || isCallable$2(argument)) return argument;
1523
+ throw $TypeError$1("Can't set " + $String$1(argument) + ' as a prototype');
1524
+ };
1525
+
1526
+ /* eslint-disable no-proto -- safe */
1527
+
1528
+ var uncurryThis$1 = functionUncurryThis;
1529
+ var anObject = anObject$5;
1530
+ var aPossiblePrototype = aPossiblePrototype$1;
1531
+
1532
+ // `Object.setPrototypeOf` method
1533
+ // https://tc39.es/ecma262/#sec-object.setprototypeof
1534
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
1535
+ // eslint-disable-next-line es/no-object-setprototypeof -- safe
1536
+ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1537
+ var CORRECT_SETTER = false;
1538
+ var test = {};
1539
+ var setter;
1540
+ try {
1541
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1542
+ setter = uncurryThis$1(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1543
+ setter(test, []);
1544
+ CORRECT_SETTER = test instanceof Array;
1545
+ } catch (error) { /* empty */ }
1546
+ return function setPrototypeOf(O, proto) {
1547
+ anObject(O);
1548
+ aPossiblePrototype(proto);
1549
+ if (CORRECT_SETTER) setter(O, proto);
1550
+ else O.__proto__ = proto;
1551
+ return O;
1552
+ };
1553
+ }() : undefined);
1554
+
1555
+ var $$2 = _export;
1556
+ var call = functionCall;
1557
+ var FunctionName = functionName;
1558
+ var isCallable$1 = isCallable$f;
1559
+ var createIteratorConstructor = iteratorCreateConstructor;
1560
+ var getPrototypeOf = objectGetPrototypeOf;
1561
+ var setPrototypeOf = objectSetPrototypeOf;
1562
+ var setToStringTag = setToStringTag$2;
1563
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
1564
+ var defineBuiltIn = defineBuiltIn$3;
1565
+ var wellKnownSymbol$5 = wellKnownSymbol$a;
1566
+ var Iterators$1 = iterators;
1567
+ var IteratorsCore = iteratorsCore;
1568
+
1569
+ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
1570
+ var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1571
+ var IteratorPrototype = IteratorsCore.IteratorPrototype;
1572
+ var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
1573
+ var ITERATOR$1 = wellKnownSymbol$5('iterator');
1574
+ var KEYS = 'keys';
1575
+ var VALUES = 'values';
1576
+ var ENTRIES = 'entries';
1577
+
1578
+ var returnThis = function () { return this; };
1579
+
1580
+ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1581
+ createIteratorConstructor(IteratorConstructor, NAME, next);
1582
+
1583
+ var getIterationMethod = function (KIND) {
1584
+ if (KIND === DEFAULT && defaultIterator) return defaultIterator;
1585
+ if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
1586
+ switch (KIND) {
1587
+ case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
1588
+ case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
1589
+ case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
1590
+ } return function () { return new IteratorConstructor(this); };
1591
+ };
1592
+
1593
+ var TO_STRING_TAG = NAME + ' Iterator';
1594
+ var INCORRECT_VALUES_NAME = false;
1595
+ var IterablePrototype = Iterable.prototype;
1596
+ var nativeIterator = IterablePrototype[ITERATOR$1]
1597
+ || IterablePrototype['@@iterator']
1598
+ || DEFAULT && IterablePrototype[DEFAULT];
1599
+ var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
1600
+ var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
1601
+ var CurrentIteratorPrototype, methods, KEY;
1602
+
1603
+ // fix native
1604
+ if (anyNativeIterator) {
1605
+ CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
1606
+ if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
1607
+ if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1608
+ if (setPrototypeOf) {
1609
+ setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
1610
+ } else if (!isCallable$1(CurrentIteratorPrototype[ITERATOR$1])) {
1611
+ defineBuiltIn(CurrentIteratorPrototype, ITERATOR$1, returnThis);
1612
+ }
1613
+ }
1614
+ // Set @@toStringTag to native iterators
1615
+ setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
1616
+ }
1617
+ }
1618
+
1619
+ // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
1620
+ if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1621
+ if (CONFIGURABLE_FUNCTION_NAME) {
1622
+ createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
1623
+ } else {
1624
+ INCORRECT_VALUES_NAME = true;
1625
+ defaultIterator = function values() { return call(nativeIterator, this); };
1626
+ }
1627
+ }
1628
+
1629
+ // export additional methods
1630
+ if (DEFAULT) {
1631
+ methods = {
1632
+ values: getIterationMethod(VALUES),
1633
+ keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
1634
+ entries: getIterationMethod(ENTRIES)
1635
+ };
1636
+ if (FORCED) for (KEY in methods) {
1637
+ if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1638
+ defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
1639
+ }
1640
+ } else $$2({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1641
+ }
1642
+
1643
+ // define iterator
1644
+ if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
1645
+ defineBuiltIn(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
1646
+ }
1647
+ Iterators$1[NAME] = defaultIterator;
1648
+
1649
+ return methods;
1650
+ };
1651
+
1652
+ // `CreateIterResultObject` abstract operation
1653
+ // https://tc39.es/ecma262/#sec-createiterresultobject
1654
+ var createIterResultObject$1 = function (value, done) {
1655
+ return { value: value, done: done };
1656
+ };
1657
+
1658
+ var toIndexedObject = toIndexedObject$5;
1659
+ var addToUnscopables$1 = addToUnscopables$2;
1660
+ var Iterators = iterators;
1661
+ var InternalStateModule = internalState;
1662
+ var defineProperty = objectDefineProperty.f;
1663
+ var defineIterator = iteratorDefine;
1664
+ var createIterResultObject = createIterResultObject$1;
1665
+ var DESCRIPTORS = descriptors;
1666
+
1667
+ var ARRAY_ITERATOR = 'Array Iterator';
1668
+ var setInternalState = InternalStateModule.set;
1669
+ var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
1670
+
1671
+ // `Array.prototype.entries` method
1672
+ // https://tc39.es/ecma262/#sec-array.prototype.entries
1673
+ // `Array.prototype.keys` method
1674
+ // https://tc39.es/ecma262/#sec-array.prototype.keys
1675
+ // `Array.prototype.values` method
1676
+ // https://tc39.es/ecma262/#sec-array.prototype.values
1677
+ // `Array.prototype[@@iterator]` method
1678
+ // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
1679
+ // `CreateArrayIterator` internal method
1680
+ // https://tc39.es/ecma262/#sec-createarrayiterator
1681
+ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
1682
+ setInternalState(this, {
1683
+ type: ARRAY_ITERATOR,
1684
+ target: toIndexedObject(iterated), // target
1685
+ index: 0, // next index
1686
+ kind: kind // kind
1687
+ });
1688
+ // `%ArrayIteratorPrototype%.next` method
1689
+ // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
1690
+ }, function () {
1691
+ var state = getInternalState(this);
1692
+ var target = state.target;
1693
+ var kind = state.kind;
1694
+ var index = state.index++;
1695
+ if (!target || index >= target.length) {
1696
+ state.target = undefined;
1697
+ return createIterResultObject(undefined, true);
1698
+ }
1699
+ if (kind == 'keys') return createIterResultObject(index, false);
1700
+ if (kind == 'values') return createIterResultObject(target[index], false);
1701
+ return createIterResultObject([index, target[index]], false);
1702
+ }, 'values');
1703
+
1704
+ // argumentsList[@@iterator] is %ArrayProto_values%
1705
+ // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
1706
+ // https://tc39.es/ecma262/#sec-createmappedargumentsobject
1707
+ var values = Iterators.Arguments = Iterators.Array;
1708
+
1709
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1710
+ addToUnscopables$1('keys');
1711
+ addToUnscopables$1('values');
1712
+ addToUnscopables$1('entries');
1713
+
1714
+ // V8 ~ Chrome 45- bug
1715
+ if (DESCRIPTORS && values.name !== 'values') try {
1716
+ defineProperty(values, 'name', { value: 'values' });
1717
+ } catch (error) { /* empty */ }
1718
+
1719
+ // iterable DOM collections
1720
+ // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1721
+ var domIterables = {
1722
+ CSSRuleList: 0,
1723
+ CSSStyleDeclaration: 0,
1724
+ CSSValueList: 0,
1725
+ ClientRectList: 0,
1726
+ DOMRectList: 0,
1727
+ DOMStringList: 0,
1728
+ DOMTokenList: 1,
1729
+ DataTransferItemList: 0,
1730
+ FileList: 0,
1731
+ HTMLAllCollection: 0,
1732
+ HTMLCollection: 0,
1733
+ HTMLFormElement: 0,
1734
+ HTMLSelectElement: 0,
1735
+ MediaList: 0,
1736
+ MimeTypeArray: 0,
1737
+ NamedNodeMap: 0,
1738
+ NodeList: 1,
1739
+ PaintRequestList: 0,
1740
+ Plugin: 0,
1741
+ PluginArray: 0,
1742
+ SVGLengthList: 0,
1743
+ SVGNumberList: 0,
1744
+ SVGPathSegList: 0,
1745
+ SVGPointList: 0,
1746
+ SVGStringList: 0,
1747
+ SVGTransformList: 0,
1748
+ SourceBufferList: 0,
1749
+ StyleSheetList: 0,
1750
+ TextTrackCueList: 0,
1751
+ TextTrackList: 0,
1752
+ TouchList: 0
1753
+ };
1754
+
1755
+ // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
1756
+ var documentCreateElement = documentCreateElement$2;
1757
+
1758
+ var classList = documentCreateElement('span').classList;
1759
+ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
1760
+
1761
+ var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1762
+
1763
+ var global$1 = global$b;
1764
+ var DOMIterables = domIterables;
1765
+ var DOMTokenListPrototype = domTokenListPrototype;
1766
+ var ArrayIteratorMethods = es_array_iterator;
1767
+ var createNonEnumerableProperty = createNonEnumerableProperty$4;
1768
+ var wellKnownSymbol$4 = wellKnownSymbol$a;
1769
+
1770
+ var ITERATOR = wellKnownSymbol$4('iterator');
1771
+ var TO_STRING_TAG$2 = wellKnownSymbol$4('toStringTag');
1772
+ var ArrayValues = ArrayIteratorMethods.values;
1773
+
1774
+ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1775
+ if (CollectionPrototype) {
1776
+ // some Chrome versions have non-configurable methods on DOMTokenList
1777
+ if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
1778
+ createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
1779
+ } catch (error) {
1780
+ CollectionPrototype[ITERATOR] = ArrayValues;
1781
+ }
1782
+ if (!CollectionPrototype[TO_STRING_TAG$2]) {
1783
+ createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG$2, COLLECTION_NAME);
1784
+ }
1785
+ if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
1786
+ // some Chrome versions have non-configurable methods on DOMTokenList
1787
+ if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
1788
+ createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
1789
+ } catch (error) {
1790
+ CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
1791
+ }
1792
+ }
1793
+ }
1794
+ };
1795
+
1796
+ for (var COLLECTION_NAME in DOMIterables) {
1797
+ handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype, COLLECTION_NAME);
1798
+ }
1799
+
1800
+ handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1801
+
1802
+ const IsBrowser = ({
182
1803
  children
1804
+ }) => {
1805
+ const [isBrowser, setIsBrowser] = React.useState(false);
1806
+ // this useEffect does not run during SSR
1807
+ React.useEffect(() => {
1808
+ setIsBrowser(true);
1809
+ }, []);
1810
+ if (!isBrowser) {
1811
+ // Justification: We specifically need to return an element instead of null
1812
+ // in order to have stable content during SSR
1813
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment);
1814
+ }
1815
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, children);
1816
+ };
1817
+
1818
+ const SyncDynamicWagmi = ({
1819
+ children,
1820
+ connector
183
1821
  }) => {
184
1822
  const {
185
- walletConnector,
186
- handleLogOut
1823
+ status: clientStatus
1824
+ } = wagmi.useClient();
1825
+ const {
1826
+ walletConnector
187
1827
  } = sdkReact.useDynamicContext();
188
1828
  const {
189
1829
  connect,
@@ -192,51 +1832,278 @@ const SyncDynamicWagmi = ({
192
1832
  const {
193
1833
  disconnect
194
1834
  } = wagmi.useDisconnect();
195
- // storing as a singleton so we can re-setup event listeners on the same instance
196
- const dynamicWagmiConnector = React.useRef();
197
1835
  if (walletConnector) {
198
1836
  // after connection is successful, re-setup event listeners after a short delay
199
1837
  // so that they are not cleared by the teardown in useWalletEventListeners
200
1838
  if (status === 'success') {
201
1839
  setTimeout(() => {
202
- var _a;
203
- (_a = dynamicWagmiConnector.current) === null || _a === void 0 ? void 0 : _a.setupEventListeners();
1840
+ connector === null || connector === void 0 ? void 0 : connector.setupEventListeners();
204
1841
  }, 100);
205
1842
  }
206
1843
  }
207
1844
  React.useEffect(() => {
208
1845
  if (!walletConnector) {
209
- dynamicWagmiConnector.current = undefined;
210
1846
  disconnect();
211
- } else if (!dynamicWagmiConnector.current) {
212
- dynamicWagmiConnector.current = new Connector({
213
- handleLogOut,
214
- walletConnector
215
- });
1847
+ } else if (connector && clientStatus !== 'connected') {
216
1848
  connect({
217
- connector: dynamicWagmiConnector.current
1849
+ connector
218
1850
  });
219
1851
  }
220
- }, [connect, disconnect, handleLogOut, status, walletConnector]);
1852
+ }, [clientStatus, connect, connector, disconnect, walletConnector]);
221
1853
  // use React.createElement to prevent bunding react/jsx-runtime,
222
1854
  // which is not compatible when bundling apps using React 17
223
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, children);
1855
+ return /*#__PURE__*/React__default["default"].createElement(IsBrowser, null, children);
1856
+ };
1857
+
1858
+ var $$1 = _export;
1859
+ var $includes = arrayIncludes.includes;
1860
+ var fails = fails$c;
1861
+ var addToUnscopables = addToUnscopables$2;
1862
+
1863
+ // FF99+ bug
1864
+ var BROKEN_ON_SPARSE = fails(function () {
1865
+ return !Array(1).includes();
1866
+ });
1867
+
1868
+ // `Array.prototype.includes` method
1869
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
1870
+ $$1({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
1871
+ includes: function includes(el /* , fromIndex = 0 */) {
1872
+ return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
1873
+ }
1874
+ });
1875
+
1876
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1877
+ addToUnscopables('includes');
1878
+
1879
+ var isObject = isObject$7;
1880
+ var classof$2 = classofRaw$1;
1881
+ var wellKnownSymbol$3 = wellKnownSymbol$a;
1882
+
1883
+ var MATCH$1 = wellKnownSymbol$3('match');
1884
+
1885
+ // `IsRegExp` abstract operation
1886
+ // https://tc39.es/ecma262/#sec-isregexp
1887
+ var isRegexp = function (it) {
1888
+ var isRegExp;
1889
+ return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$2(it) == 'RegExp');
1890
+ };
1891
+
1892
+ var isRegExp = isRegexp;
1893
+
1894
+ var $TypeError = TypeError;
1895
+
1896
+ var notARegexp = function (it) {
1897
+ if (isRegExp(it)) {
1898
+ throw $TypeError("The method doesn't accept regular expressions");
1899
+ } return it;
1900
+ };
1901
+
1902
+ var wellKnownSymbol$2 = wellKnownSymbol$a;
1903
+
1904
+ var TO_STRING_TAG$1 = wellKnownSymbol$2('toStringTag');
1905
+ var test = {};
1906
+
1907
+ test[TO_STRING_TAG$1] = 'z';
1908
+
1909
+ var toStringTagSupport = String(test) === '[object z]';
1910
+
1911
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1912
+ var isCallable = isCallable$f;
1913
+ var classofRaw = classofRaw$1;
1914
+ var wellKnownSymbol$1 = wellKnownSymbol$a;
1915
+
1916
+ var TO_STRING_TAG = wellKnownSymbol$1('toStringTag');
1917
+ var $Object = Object;
1918
+
1919
+ // ES3 wrong here
1920
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
1921
+
1922
+ // fallback for IE11 Script Access Denied error
1923
+ var tryGet = function (it, key) {
1924
+ try {
1925
+ return it[key];
1926
+ } catch (error) { /* empty */ }
1927
+ };
1928
+
1929
+ // getting tag from ES6+ `Object.prototype.toString`
1930
+ var classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1931
+ var O, tag, result;
1932
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
1933
+ // @@toStringTag case
1934
+ : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
1935
+ // builtinTag case
1936
+ : CORRECT_ARGUMENTS ? classofRaw(O)
1937
+ // ES3 arguments fallback
1938
+ : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
1939
+ };
1940
+
1941
+ var classof = classof$1;
1942
+
1943
+ var $String = String;
1944
+
1945
+ var toString$1 = function (argument) {
1946
+ if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
1947
+ return $String(argument);
1948
+ };
1949
+
1950
+ var wellKnownSymbol = wellKnownSymbol$a;
1951
+
1952
+ var MATCH = wellKnownSymbol('match');
1953
+
1954
+ var correctIsRegexpLogic = function (METHOD_NAME) {
1955
+ var regexp = /./;
1956
+ try {
1957
+ '/./'[METHOD_NAME](regexp);
1958
+ } catch (error1) {
1959
+ try {
1960
+ regexp[MATCH] = false;
1961
+ return '/./'[METHOD_NAME](regexp);
1962
+ } catch (error2) { /* empty */ }
1963
+ } return false;
1964
+ };
1965
+
1966
+ var $ = _export;
1967
+ var uncurryThis = functionUncurryThis;
1968
+ var notARegExp = notARegexp;
1969
+ var requireObjectCoercible = requireObjectCoercible$3;
1970
+ var toString = toString$1;
1971
+ var correctIsRegExpLogic = correctIsRegexpLogic;
1972
+
1973
+ var stringIndexOf = uncurryThis(''.indexOf);
1974
+
1975
+ // `String.prototype.includes` method
1976
+ // https://tc39.es/ecma262/#sec-string.prototype.includes
1977
+ $({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
1978
+ includes: function includes(searchString /* , position = 0 */) {
1979
+ return !!~stringIndexOf(
1980
+ toString(requireObjectCoercible(this)),
1981
+ toString(notARegExp(searchString)),
1982
+ arguments.length > 1 ? arguments[1] : undefined
1983
+ );
1984
+ }
1985
+ });
1986
+
1987
+ /**
1988
+ * this is to map chains from Dynamic to the corresponding chain in Wagmi, if it exists.
1989
+ * this is so that the exact same chain object is used across renders, which is important for
1990
+ * the underlying ethers library to work correctly.
1991
+ */
1992
+ const mapping = {
1993
+ 1: chains.mainnet,
1994
+ 10: chains.optimism,
1995
+ 100: chains.gnosis,
1996
+ 137: chains.polygon,
1997
+ 42161: chains.arbitrum,
1998
+ 56: chains.bsc
1999
+ };
2000
+ const mapDynamicChainToWagmi = dynamicChain => {
2001
+ var _a, _b, _c, _d, _e;
2002
+ const wagmiChain = mapping[dynamicChain.chainId];
2003
+ if (wagmiChain) {
2004
+ return wagmiChain;
2005
+ }
2006
+ const rpcUrls = {
2007
+ default: {
2008
+ http: dynamicChain.rpcUrls
2009
+ }
2010
+ };
2011
+ const alchemyUrl = (_a = dynamicChain.privateCustomerRpcUrls) === null || _a === void 0 ? void 0 : _a.find(url => url.includes('alchemy'));
2012
+ if (alchemyUrl) {
2013
+ rpcUrls.alchemy = {
2014
+ http: [alchemyUrl]
2015
+ };
2016
+ }
2017
+ const infuraUrl = (_b = dynamicChain.privateCustomerRpcUrls) === null || _b === void 0 ? void 0 : _b.find(url => url.includes('infura'));
2018
+ if (infuraUrl) {
2019
+ rpcUrls.infura = {
2020
+ http: [infuraUrl]
2021
+ };
2022
+ }
2023
+ return {
2024
+ blockExplorers: {
2025
+ default: {
2026
+ name: '',
2027
+ url: (_d = (_c = dynamicChain.blockExplorerUrls) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : ''
2028
+ }
2029
+ },
2030
+ id: dynamicChain.chainId,
2031
+ name: (_e = dynamicChain.vanityName) !== null && _e !== void 0 ? _e : dynamicChain.chainName,
2032
+ nativeCurrency: dynamicChain.nativeCurrency,
2033
+ network: dynamicChain.chainName,
2034
+ rpcUrls
2035
+ };
2036
+ };
2037
+
2038
+ const getWagmiChainsFromDynamicChains = dynamicChains => {
2039
+ const mappedChains = dynamicChains.map(mapDynamicChainToWagmi);
2040
+ return mappedChains.length > 0 ? mappedChains : [wagmi.mainnet];
2041
+ };
2042
+
2043
+ const getWagmiProvidersFromDynamicChains = dynamicChains => {
2044
+ var _a;
2045
+ const wagmiProviders = [];
2046
+ for (const dynamicChain of dynamicChains) {
2047
+ for (const url of (_a = dynamicChain.privateCustomerRpcUrls) !== null && _a !== void 0 ? _a : []) {
2048
+ wagmiProviders.push(chain => {
2049
+ if (chain.id !== dynamicChain.chainId) return null;
2050
+ return {
2051
+ chain,
2052
+ provider: () => new ethers.providers.JsonRpcProvider(url, chain.id)
2053
+ };
2054
+ });
2055
+ }
2056
+ }
2057
+ return [...wagmiProviders, _public.publicProvider()];
224
2058
  };
225
2059
 
226
2060
  const {
227
2061
  provider
228
- } = wagmi.configureChains(wagmi.defaultChains, [_public.publicProvider()]);
2062
+ } = wagmi.configureChains([wagmi.mainnet], [_public.publicProvider()]);
229
2063
  const client = wagmi.createClient({
230
2064
  provider
231
2065
  });
2066
+ /**
2067
+ * we create a "default" (static chain and provider) client to use in the WagmiConfig
2068
+ * until we've loaded the dynamic chains and providers, at which point we update the client
2069
+ */
2070
+ let connector = undefined;
232
2071
  const DynamicWagmiConnector = ({
233
2072
  children
234
- }) =>
235
- /*#__PURE__*/
236
- // use React.createElement to prevent bunding react/jsx-runtime,
237
- // which is not compatible when bundling apps using React 17
238
- React__default["default"].createElement(wagmi.WagmiConfig, {
239
- client: client
240
- }, /*#__PURE__*/React__default["default"].createElement(SyncDynamicWagmi, null, children));
2073
+ }) => {
2074
+ var _a;
2075
+ const {
2076
+ networkConfigurations,
2077
+ walletConnector,
2078
+ handleLogOut
2079
+ } = sdkReact.useDynamicContext();
2080
+ const evmNetworks = (_a = networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.evm) !== null && _a !== void 0 ? _a : [];
2081
+ const mappedChains = getWagmiChainsFromDynamicChains(evmNetworks);
2082
+ const mappedProviders = getWagmiProvidersFromDynamicChains(evmNetworks);
2083
+ const {
2084
+ chains,
2085
+ provider
2086
+ } = wagmi.configureChains(mappedChains, mappedProviders);
2087
+ if (!connector && walletConnector) {
2088
+ connector = new Connector({
2089
+ chains,
2090
+ handleLogOut,
2091
+ walletConnector
2092
+ });
2093
+ } else if (connector && !walletConnector) {
2094
+ connector = undefined;
2095
+ }
2096
+ client.config = Object.assign(Object.assign({}, client.config), {
2097
+ connectors: connector ? [connector] : [],
2098
+ provider
2099
+ });
2100
+ // use React.createElement to prevent bunding react/jsx-runtime,
2101
+ // which is not compatible when bundling apps using React 17
2102
+ return /*#__PURE__*/React__default["default"].createElement(wagmi.WagmiConfig, {
2103
+ client: client
2104
+ }, /*#__PURE__*/React__default["default"].createElement(SyncDynamicWagmi, {
2105
+ connector
2106
+ }, children));
2107
+ };
241
2108
 
242
2109
  exports.DynamicWagmiConnector = DynamicWagmiConnector;