@bolttech/form-engine 0.14.3 → 3.0.0-beta.2

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