@bolttech/form-engine 3.0.0-beta.15 → 3.0.0-beta.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.esm.js CHANGED
@@ -1,11 +1,10 @@
1
1
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
2
  import { FormGroup, FormCore } from '@bolttech/form-engine-core';
3
- import { createContext, useRef, useContext, useState, useEffect, useCallback, useMemo, Suspense, Children } from 'react';
4
- import { isNil } from 'lodash';
3
+ import { createContext, useContext, useRef, useMemo, useState, useEffect, useCallback, Suspense, Children } from 'react';
5
4
 
6
5
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
7
6
 
8
- var fails$b = function (exec) {
7
+ var fails$e = function (exec) {
9
8
  try {
10
9
  return !!exec();
11
10
  } catch (error) {
@@ -13,9 +12,9 @@ var fails$b = function (exec) {
13
12
  }
14
13
  };
15
14
 
16
- var fails$a = fails$b;
15
+ var fails$d = fails$e;
17
16
 
18
- var functionBindNative = !fails$a(function () {
17
+ var functionBindNative = !fails$d(function () {
19
18
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
20
19
  var test = (function () { /* empty */ }).bind();
21
20
  // eslint-disable-next-line no-prototype-builtins -- safe
@@ -25,39 +24,39 @@ var functionBindNative = !fails$a(function () {
25
24
  var NATIVE_BIND$1 = functionBindNative;
26
25
 
27
26
  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);
27
+ var call$7 = FunctionPrototype$1.call;
28
+ var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$1.bind.bind(call$7, call$7);
30
29
 
31
30
  var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
32
31
  return function () {
33
- return call$6.apply(fn, arguments);
32
+ return call$7.apply(fn, arguments);
34
33
  };
35
34
  };
36
35
 
37
- var uncurryThis$a = functionUncurryThis;
36
+ var uncurryThis$b = functionUncurryThis;
38
37
 
39
- var toString$1 = uncurryThis$a({}.toString);
40
- var stringSlice$1 = uncurryThis$a(''.slice);
38
+ var toString$3 = uncurryThis$b({}.toString);
39
+ var stringSlice$2 = uncurryThis$b(''.slice);
41
40
 
42
- var classofRaw = function (it) {
43
- return stringSlice$1(toString$1(it), 8, -1);
41
+ var classofRaw$1 = function (it) {
42
+ return stringSlice$2(toString$3(it), 8, -1);
44
43
  };
45
44
 
46
- var uncurryThis$9 = functionUncurryThis;
47
- var fails$9 = fails$b;
48
- var classof = classofRaw;
45
+ var uncurryThis$a = functionUncurryThis;
46
+ var fails$c = fails$e;
47
+ var classof$2 = classofRaw$1;
49
48
 
50
- var $Object$3 = Object;
51
- var split = uncurryThis$9(''.split);
49
+ var $Object$4 = Object;
50
+ var split = uncurryThis$a(''.split);
52
51
 
53
52
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
54
- var indexedObject = fails$9(function () {
53
+ var indexedObject = fails$c(function () {
55
54
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
56
55
  // eslint-disable-next-line no-prototype-builtins -- safe
57
- return !$Object$3('z').propertyIsEnumerable(0);
56
+ return !$Object$4('z').propertyIsEnumerable(0);
58
57
  }) ? function (it) {
59
- return classof(it) === 'String' ? split(it, '') : $Object$3(it);
60
- } : $Object$3;
58
+ return classof$2(it) === 'String' ? split(it, '') : $Object$4(it);
59
+ } : $Object$4;
61
60
 
62
61
  // we can't use just `it == null` since of `document.all` special case
63
62
  // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
@@ -89,7 +88,7 @@ var check = function (it) {
89
88
  };
90
89
 
91
90
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
92
- var global$b =
91
+ var global$e =
93
92
  // eslint-disable-next-line es/no-global-this -- safe
94
93
  check(typeof globalThis == 'object' && globalThis) ||
95
94
  check(typeof window == 'object' && window) ||
@@ -102,20 +101,20 @@ var global$b =
102
101
 
103
102
  var sharedStore = {exports: {}};
104
103
 
105
- var global$a = global$b;
104
+ var global$d = global$e;
106
105
 
107
106
  // eslint-disable-next-line es/no-object-defineproperty -- safe
108
107
  var defineProperty$5 = Object.defineProperty;
109
108
 
110
109
  var defineGlobalProperty$3 = function (key, value) {
111
110
  try {
112
- defineProperty$5(global$a, key, { value: value, configurable: true, writable: true });
111
+ defineProperty$5(global$d, key, { value: value, configurable: true, writable: true });
113
112
  } catch (error) {
114
- global$a[key] = value;
113
+ global$d[key] = value;
115
114
  } return value;
116
115
  };
117
116
 
118
- var globalThis$1 = global$b;
117
+ var globalThis$1 = global$e;
119
118
  var defineGlobalProperty$2 = defineGlobalProperty$3;
120
119
 
121
120
  var SHARED = '__core-js_shared__';
@@ -131,24 +130,24 @@ var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty
131
130
 
132
131
  var store$2 = sharedStore.exports;
133
132
 
134
- var shared$3 = function (key, value) {
133
+ var shared$4 = function (key, value) {
135
134
  return store$2[key] || (store$2[key] = value || {});
136
135
  };
137
136
 
138
137
  var requireObjectCoercible$1 = requireObjectCoercible$3;
139
138
 
140
- var $Object$2 = Object;
139
+ var $Object$3 = Object;
141
140
 
142
141
  // `ToObject` abstract operation
143
142
  // https://tc39.es/ecma262/#sec-toobject
144
143
  var toObject$3 = function (argument) {
145
- return $Object$2(requireObjectCoercible$1(argument));
144
+ return $Object$3(requireObjectCoercible$1(argument));
146
145
  };
147
146
 
148
- var uncurryThis$8 = functionUncurryThis;
147
+ var uncurryThis$9 = functionUncurryThis;
149
148
  var toObject$2 = toObject$3;
150
149
 
151
- var hasOwnProperty = uncurryThis$8({}.hasOwnProperty);
150
+ var hasOwnProperty = uncurryThis$9({}.hasOwnProperty);
152
151
 
153
152
  // `HasOwnProperty` abstract operation
154
153
  // https://tc39.es/ecma262/#sec-hasownproperty
@@ -157,23 +156,23 @@ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
157
156
  return hasOwnProperty(toObject$2(it), key);
158
157
  };
159
158
 
160
- var uncurryThis$7 = functionUncurryThis;
159
+ var uncurryThis$8 = functionUncurryThis;
161
160
 
162
161
  var id = 0;
163
162
  var postfix = Math.random();
164
- var toString = uncurryThis$7(1.0.toString);
163
+ var toString$2 = uncurryThis$8(1.0.toString);
165
164
 
166
165
  var uid$2 = function (key) {
167
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
166
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$2(++id + postfix, 36);
168
167
  };
169
168
 
170
169
  var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
171
170
 
172
- var global$9 = global$b;
171
+ var global$c = global$e;
173
172
  var userAgent = engineUserAgent;
174
173
 
175
- var process = global$9.process;
176
- var Deno = global$9.Deno;
174
+ var process = global$c.process;
175
+ var Deno = global$c.Deno;
177
176
  var versions = process && process.versions || Deno && Deno.version;
178
177
  var v8 = versions && versions.v8;
179
178
  var match, version;
@@ -199,19 +198,19 @@ var engineV8Version = version;
199
198
 
200
199
  /* eslint-disable es/no-symbol -- required for testing */
201
200
  var V8_VERSION = engineV8Version;
202
- var fails$8 = fails$b;
203
- var global$8 = global$b;
201
+ var fails$b = fails$e;
202
+ var global$b = global$e;
204
203
 
205
- var $String$4 = global$8.String;
204
+ var $String$5 = global$b.String;
206
205
 
207
206
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
208
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$8(function () {
207
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$b(function () {
209
208
  var symbol = Symbol('symbol detection');
210
209
  // Chrome 38 Symbol has incorrect toString conversion
211
210
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
212
211
  // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
213
212
  // of course, fail.
214
- return !$String$4(symbol) || !(Object(symbol) instanceof Symbol) ||
213
+ return !$String$5(symbol) || !(Object(symbol) instanceof Symbol) ||
215
214
  // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
216
215
  !Symbol.sham && V8_VERSION && V8_VERSION < 41;
217
216
  });
@@ -223,18 +222,18 @@ var useSymbolAsUid = NATIVE_SYMBOL$1
223
222
  && !Symbol.sham
224
223
  && typeof Symbol.iterator == 'symbol';
225
224
 
226
- var global$7 = global$b;
227
- var shared$2 = shared$3;
225
+ var global$a = global$e;
226
+ var shared$3 = shared$4;
228
227
  var hasOwn$8 = hasOwnProperty_1;
229
228
  var uid$1 = uid$2;
230
229
  var NATIVE_SYMBOL = symbolConstructorDetection;
231
230
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
232
231
 
233
- var Symbol$1 = global$7.Symbol;
234
- var WellKnownSymbolsStore = shared$2('wks');
232
+ var Symbol$1 = global$a.Symbol;
233
+ var WellKnownSymbolsStore = shared$3('wks');
235
234
  var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
236
235
 
237
- var wellKnownSymbol$6 = function (name) {
236
+ var wellKnownSymbol$8 = function (name) {
238
237
  if (!hasOwn$8(WellKnownSymbolsStore, name)) {
239
238
  WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)
240
239
  ? Symbol$1[name]
@@ -248,45 +247,45 @@ var documentAll = typeof document == 'object' && document.all;
248
247
  // `IsCallable` abstract operation
249
248
  // https://tc39.es/ecma262/#sec-iscallable
250
249
  // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
251
- var isCallable$d = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
250
+ var isCallable$e = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
252
251
  return typeof argument == 'function' || argument === documentAll;
253
252
  } : function (argument) {
254
253
  return typeof argument == 'function';
255
254
  };
256
255
 
257
- var isCallable$c = isCallable$d;
256
+ var isCallable$d = isCallable$e;
258
257
 
259
258
  var isObject$8 = function (it) {
260
- return typeof it == 'object' ? it !== null : isCallable$c(it);
259
+ return typeof it == 'object' ? it !== null : isCallable$d(it);
261
260
  };
262
261
 
263
262
  var isObject$7 = isObject$8;
264
263
 
265
- var $String$3 = String;
264
+ var $String$4 = String;
266
265
  var $TypeError$5 = TypeError;
267
266
 
268
267
  // `Assert: Type(argument) is Object`
269
- var anObject$4 = function (argument) {
268
+ var anObject$5 = function (argument) {
270
269
  if (isObject$7(argument)) return argument;
271
- throw new $TypeError$5($String$3(argument) + ' is not an object');
270
+ throw new $TypeError$5($String$4(argument) + ' is not an object');
272
271
  };
273
272
 
274
273
  var objectDefineProperties = {};
275
274
 
276
- var fails$7 = fails$b;
275
+ var fails$a = fails$e;
277
276
 
278
277
  // Detect IE8's incomplete defineProperty implementation
279
- var descriptors = !fails$7(function () {
278
+ var descriptors = !fails$a(function () {
280
279
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
281
280
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
282
281
  });
283
282
 
284
283
  var DESCRIPTORS$9 = descriptors;
285
- var fails$6 = fails$b;
284
+ var fails$9 = fails$e;
286
285
 
287
286
  // V8 ~ Chrome 36-
288
287
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
289
- var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$6(function () {
288
+ var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$9(function () {
290
289
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
291
290
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
292
291
  value: 42,
@@ -296,10 +295,10 @@ var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$6(function () {
296
295
 
297
296
  var objectDefineProperty = {};
298
297
 
299
- var global$6 = global$b;
298
+ var global$9 = global$e;
300
299
  var isObject$6 = isObject$8;
301
300
 
302
- var document$1 = global$6.document;
301
+ var document$1 = global$9.document;
303
302
  // typeof document.createElement is 'object' in old IE
304
303
  var EXISTS$1 = isObject$6(document$1) && isObject$6(document$1.createElement);
305
304
 
@@ -308,11 +307,11 @@ var documentCreateElement$2 = function (it) {
308
307
  };
309
308
 
310
309
  var DESCRIPTORS$8 = descriptors;
311
- var fails$5 = fails$b;
310
+ var fails$8 = fails$e;
312
311
  var createElement = documentCreateElement$2;
313
312
 
314
313
  // Thanks to IE8 for its funny defineProperty
315
- var ie8DomDefine = !DESCRIPTORS$8 && !fails$5(function () {
314
+ var ie8DomDefine = !DESCRIPTORS$8 && !fails$8(function () {
316
315
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
317
316
  return Object.defineProperty(createElement('div'), 'a', {
318
317
  get: function () { return 7; }
@@ -321,59 +320,59 @@ var ie8DomDefine = !DESCRIPTORS$8 && !fails$5(function () {
321
320
 
322
321
  var NATIVE_BIND = functionBindNative;
323
322
 
324
- var call$5 = Function.prototype.call;
323
+ var call$6 = Function.prototype.call;
325
324
 
326
- var functionCall = NATIVE_BIND ? call$5.bind(call$5) : function () {
327
- return call$5.apply(call$5, arguments);
325
+ var functionCall = NATIVE_BIND ? call$6.bind(call$6) : function () {
326
+ return call$6.apply(call$6, arguments);
328
327
  };
329
328
 
330
- var global$5 = global$b;
331
- var isCallable$b = isCallable$d;
329
+ var global$8 = global$e;
330
+ var isCallable$c = isCallable$e;
332
331
 
333
332
  var aFunction = function (argument) {
334
- return isCallable$b(argument) ? argument : undefined;
333
+ return isCallable$c(argument) ? argument : undefined;
335
334
  };
336
335
 
337
336
  var getBuiltIn$3 = function (namespace, method) {
338
- return arguments.length < 2 ? aFunction(global$5[namespace]) : global$5[namespace] && global$5[namespace][method];
337
+ return arguments.length < 2 ? aFunction(global$8[namespace]) : global$8[namespace] && global$8[namespace][method];
339
338
  };
340
339
 
341
- var uncurryThis$6 = functionUncurryThis;
340
+ var uncurryThis$7 = functionUncurryThis;
342
341
 
343
- var objectIsPrototypeOf = uncurryThis$6({}.isPrototypeOf);
342
+ var objectIsPrototypeOf = uncurryThis$7({}.isPrototypeOf);
344
343
 
345
344
  var getBuiltIn$2 = getBuiltIn$3;
346
- var isCallable$a = isCallable$d;
345
+ var isCallable$b = isCallable$e;
347
346
  var isPrototypeOf = objectIsPrototypeOf;
348
347
  var USE_SYMBOL_AS_UID = useSymbolAsUid;
349
348
 
350
- var $Object$1 = Object;
349
+ var $Object$2 = Object;
351
350
 
352
351
  var isSymbol$2 = USE_SYMBOL_AS_UID ? function (it) {
353
352
  return typeof it == 'symbol';
354
353
  } : function (it) {
355
354
  var $Symbol = getBuiltIn$2('Symbol');
356
- return isCallable$a($Symbol) && isPrototypeOf($Symbol.prototype, $Object$1(it));
355
+ return isCallable$b($Symbol) && isPrototypeOf($Symbol.prototype, $Object$2(it));
357
356
  };
358
357
 
359
- var $String$2 = String;
358
+ var $String$3 = String;
360
359
 
361
360
  var tryToString$1 = function (argument) {
362
361
  try {
363
- return $String$2(argument);
362
+ return $String$3(argument);
364
363
  } catch (error) {
365
364
  return 'Object';
366
365
  }
367
366
  };
368
367
 
369
- var isCallable$9 = isCallable$d;
368
+ var isCallable$a = isCallable$e;
370
369
  var tryToString = tryToString$1;
371
370
 
372
371
  var $TypeError$4 = TypeError;
373
372
 
374
373
  // `Assert: IsCallable(argument) is true`
375
374
  var aCallable$2 = function (argument) {
376
- if (isCallable$9(argument)) return argument;
375
+ if (isCallable$a(argument)) return argument;
377
376
  throw new $TypeError$4(tryToString(argument) + ' is not a function');
378
377
  };
379
378
 
@@ -387,8 +386,8 @@ var getMethod$1 = function (V, P) {
387
386
  return isNullOrUndefined(func) ? undefined : aCallable$1(func);
388
387
  };
389
388
 
390
- var call$4 = functionCall;
391
- var isCallable$8 = isCallable$d;
389
+ var call$5 = functionCall;
390
+ var isCallable$9 = isCallable$e;
392
391
  var isObject$5 = isObject$8;
393
392
 
394
393
  var $TypeError$3 = TypeError;
@@ -397,21 +396,21 @@ var $TypeError$3 = TypeError;
397
396
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
398
397
  var ordinaryToPrimitive$1 = function (input, pref) {
399
398
  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;
399
+ if (pref === 'string' && isCallable$9(fn = input.toString) && !isObject$5(val = call$5(fn, input))) return val;
400
+ if (isCallable$9(fn = input.valueOf) && !isObject$5(val = call$5(fn, input))) return val;
401
+ if (pref !== 'string' && isCallable$9(fn = input.toString) && !isObject$5(val = call$5(fn, input))) return val;
403
402
  throw new $TypeError$3("Can't convert object to primitive value");
404
403
  };
405
404
 
406
- var call$3 = functionCall;
405
+ var call$4 = functionCall;
407
406
  var isObject$4 = isObject$8;
408
407
  var isSymbol$1 = isSymbol$2;
409
408
  var getMethod = getMethod$1;
410
409
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
411
- var wellKnownSymbol$5 = wellKnownSymbol$6;
410
+ var wellKnownSymbol$7 = wellKnownSymbol$8;
412
411
 
413
412
  var $TypeError$2 = TypeError;
414
- var TO_PRIMITIVE = wellKnownSymbol$5('toPrimitive');
413
+ var TO_PRIMITIVE = wellKnownSymbol$7('toPrimitive');
415
414
 
416
415
  // `ToPrimitive` abstract operation
417
416
  // https://tc39.es/ecma262/#sec-toprimitive
@@ -421,7 +420,7 @@ var toPrimitive$1 = function (input, pref) {
421
420
  var result;
422
421
  if (exoticToPrim) {
423
422
  if (pref === undefined) pref = 'default';
424
- result = call$3(exoticToPrim, input, pref);
423
+ result = call$4(exoticToPrim, input, pref);
425
424
  if (!isObject$4(result) || isSymbol$1(result)) return result;
426
425
  throw new $TypeError$2("Can't convert object to primitive value");
427
426
  }
@@ -442,7 +441,7 @@ var toPropertyKey$2 = function (argument) {
442
441
  var DESCRIPTORS$7 = descriptors;
443
442
  var IE8_DOM_DEFINE$1 = ie8DomDefine;
444
443
  var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
445
- var anObject$3 = anObject$4;
444
+ var anObject$4 = anObject$5;
446
445
  var toPropertyKey$1 = toPropertyKey$2;
447
446
 
448
447
  var $TypeError$1 = TypeError;
@@ -457,9 +456,9 @@ var WRITABLE = 'writable';
457
456
  // `Object.defineProperty` method
458
457
  // https://tc39.es/ecma262/#sec-object.defineproperty
459
458
  objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
460
- anObject$3(O);
459
+ anObject$4(O);
461
460
  P = toPropertyKey$1(P);
462
- anObject$3(Attributes);
461
+ anObject$4(Attributes);
463
462
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
464
463
  var current = $getOwnPropertyDescriptor$1(O, P);
465
464
  if (current && current[WRITABLE]) {
@@ -472,9 +471,9 @@ objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
472
471
  }
473
472
  } return $defineProperty(O, P, Attributes);
474
473
  } : $defineProperty : function defineProperty(O, P, Attributes) {
475
- anObject$3(O);
474
+ anObject$4(O);
476
475
  P = toPropertyKey$1(P);
477
- anObject$3(Attributes);
476
+ anObject$4(Attributes);
478
477
  if (IE8_DOM_DEFINE$1) try {
479
478
  return $defineProperty(O, P, Attributes);
480
479
  } catch (error) { /* empty */ }
@@ -572,13 +571,13 @@ var arrayIncludes = {
572
571
 
573
572
  var hiddenKeys$4 = {};
574
573
 
575
- var uncurryThis$5 = functionUncurryThis;
574
+ var uncurryThis$6 = functionUncurryThis;
576
575
  var hasOwn$7 = hasOwnProperty_1;
577
576
  var toIndexedObject$3 = toIndexedObject$5;
578
- var indexOf = arrayIncludes.indexOf;
577
+ var indexOf$1 = arrayIncludes.indexOf;
579
578
  var hiddenKeys$3 = hiddenKeys$4;
580
579
 
581
- var push = uncurryThis$5([].push);
580
+ var push = uncurryThis$6([].push);
582
581
 
583
582
  var objectKeysInternal = function (object, names) {
584
583
  var O = toIndexedObject$3(object);
@@ -588,7 +587,7 @@ var objectKeysInternal = function (object, names) {
588
587
  for (key in O) !hasOwn$7(hiddenKeys$3, key) && hasOwn$7(O, key) && push(result, key);
589
588
  // Don't enum bug & hidden keys
590
589
  while (names.length > i) if (hasOwn$7(O, key = names[i++])) {
591
- ~indexOf(result, key) || push(result, key);
590
+ ~indexOf$1(result, key) || push(result, key);
592
591
  }
593
592
  return result;
594
593
  };
@@ -617,7 +616,7 @@ var objectKeys$2 = Object.keys || function keys(O) {
617
616
  var DESCRIPTORS$6 = descriptors;
618
617
  var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
619
618
  var definePropertyModule$3 = objectDefineProperty;
620
- var anObject$2 = anObject$4;
619
+ var anObject$3 = anObject$5;
621
620
  var toIndexedObject$2 = toIndexedObject$5;
622
621
  var objectKeys$1 = objectKeys$2;
623
622
 
@@ -625,7 +624,7 @@ var objectKeys$1 = objectKeys$2;
625
624
  // https://tc39.es/ecma262/#sec-object.defineproperties
626
625
  // eslint-disable-next-line es/no-object-defineproperties -- safe
627
626
  objectDefineProperties.f = DESCRIPTORS$6 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
628
- anObject$2(O);
627
+ anObject$3(O);
629
628
  var props = toIndexedObject$2(Properties);
630
629
  var keys = objectKeys$1(Properties);
631
630
  var length = keys.length;
@@ -639,17 +638,17 @@ var getBuiltIn$1 = getBuiltIn$3;
639
638
 
640
639
  var html$1 = getBuiltIn$1('document', 'documentElement');
641
640
 
642
- var shared$1 = shared$3;
641
+ var shared$2 = shared$4;
643
642
  var uid = uid$2;
644
643
 
645
- var keys = shared$1('keys');
644
+ var keys = shared$2('keys');
646
645
 
647
646
  var sharedKey$3 = function (key) {
648
647
  return keys[key] || (keys[key] = uid(key));
649
648
  };
650
649
 
651
650
  /* global ActiveXObject -- old IE, WSH */
652
- var anObject$1 = anObject$4;
651
+ var anObject$2 = anObject$5;
653
652
  var definePropertiesModule = objectDefineProperties;
654
653
  var enumBugKeys$1 = enumBugKeys$3;
655
654
  var hiddenKeys$2 = hiddenKeys$4;
@@ -723,7 +722,7 @@ hiddenKeys$2[IE_PROTO$1] = true;
723
722
  var objectCreate = Object.create || function create(O, Properties) {
724
723
  var result;
725
724
  if (O !== null) {
726
- EmptyConstructor[PROTOTYPE] = anObject$1(O);
725
+ EmptyConstructor[PROTOTYPE] = anObject$2(O);
727
726
  result = new EmptyConstructor();
728
727
  EmptyConstructor[PROTOTYPE] = null;
729
728
  // add "__proto__" for Object.getPrototypeOf polyfill
@@ -732,11 +731,11 @@ var objectCreate = Object.create || function create(O, Properties) {
732
731
  return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
733
732
  };
734
733
 
735
- var wellKnownSymbol$4 = wellKnownSymbol$6;
736
- var create$1 = objectCreate;
734
+ var wellKnownSymbol$6 = wellKnownSymbol$8;
735
+ var create$2 = objectCreate;
737
736
  var defineProperty$4 = objectDefineProperty.f;
738
737
 
739
- var UNSCOPABLES = wellKnownSymbol$4('unscopables');
738
+ var UNSCOPABLES = wellKnownSymbol$6('unscopables');
740
739
  var ArrayPrototype = Array.prototype;
741
740
 
742
741
  // Array.prototype[@@unscopables]
@@ -744,7 +743,7 @@ var ArrayPrototype = Array.prototype;
744
743
  if (ArrayPrototype[UNSCOPABLES] === undefined) {
745
744
  defineProperty$4(ArrayPrototype, UNSCOPABLES, {
746
745
  configurable: true,
747
- value: create$1(null)
746
+ value: create$2(null)
748
747
  });
749
748
  }
750
749
 
@@ -755,12 +754,12 @@ var addToUnscopables$1 = function (key) {
755
754
 
756
755
  var iterators = {};
757
756
 
758
- var global$4 = global$b;
759
- var isCallable$7 = isCallable$d;
757
+ var global$7 = global$e;
758
+ var isCallable$8 = isCallable$e;
760
759
 
761
- var WeakMap$1 = global$4.WeakMap;
760
+ var WeakMap$1 = global$7.WeakMap;
762
761
 
763
- var weakMapBasicDetection = isCallable$7(WeakMap$1) && /native code/.test(String(WeakMap$1));
762
+ var weakMapBasicDetection = isCallable$8(WeakMap$1) && /native code/.test(String(WeakMap$1));
764
763
 
765
764
  var createPropertyDescriptor$3 = function (bitmap, value) {
766
765
  return {
@@ -783,17 +782,17 @@ var createNonEnumerableProperty$4 = DESCRIPTORS$5 ? function (object, key, value
783
782
  };
784
783
 
785
784
  var NATIVE_WEAK_MAP = weakMapBasicDetection;
786
- var global$3 = global$b;
785
+ var global$6 = global$e;
787
786
  var isObject$3 = isObject$8;
788
787
  var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
789
788
  var hasOwn$6 = hasOwnProperty_1;
790
- var shared = sharedStore.exports;
789
+ var shared$1 = sharedStore.exports;
791
790
  var sharedKey$1 = sharedKey$3;
792
791
  var hiddenKeys$1 = hiddenKeys$4;
793
792
 
794
793
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
795
- var TypeError$1 = global$3.TypeError;
796
- var WeakMap = global$3.WeakMap;
794
+ var TypeError$1 = global$6.TypeError;
795
+ var WeakMap = global$6.WeakMap;
797
796
  var set, get, has;
798
797
 
799
798
  var enforce = function (it) {
@@ -809,8 +808,8 @@ var getterFor = function (TYPE) {
809
808
  };
810
809
  };
811
810
 
812
- if (NATIVE_WEAK_MAP || shared.state) {
813
- var store$1 = shared.state || (shared.state = new WeakMap());
811
+ if (NATIVE_WEAK_MAP || shared$1.state) {
812
+ var store$1 = shared$1.state || (shared$1.state = new WeakMap());
814
813
  /* eslint-disable no-self-assign -- prototype methods protection */
815
814
  store$1.get = store$1.get;
816
815
  store$1.has = store$1.has;
@@ -872,7 +871,7 @@ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
872
871
  } : $propertyIsEnumerable;
873
872
 
874
873
  var DESCRIPTORS$4 = descriptors;
875
- var call$2 = functionCall;
874
+ var call$3 = functionCall;
876
875
  var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
877
876
  var createPropertyDescriptor$1 = createPropertyDescriptor$3;
878
877
  var toIndexedObject$1 = toIndexedObject$5;
@@ -891,7 +890,7 @@ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$4 ? $getOwnPropertyDescriptor : f
891
890
  if (IE8_DOM_DEFINE) try {
892
891
  return $getOwnPropertyDescriptor(O, P);
893
892
  } catch (error) { /* empty */ }
894
- if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!call$2(propertyIsEnumerableModule$1.f, O, P), O[P]);
893
+ if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!call$3(propertyIsEnumerableModule$1.f, O, P), O[P]);
895
894
  };
896
895
 
897
896
  var makeBuiltIn$2 = {exports: {}};
@@ -914,14 +913,14 @@ var functionName = {
914
913
  CONFIGURABLE: CONFIGURABLE
915
914
  };
916
915
 
917
- var uncurryThis$4 = functionUncurryThis;
918
- var isCallable$6 = isCallable$d;
916
+ var uncurryThis$5 = functionUncurryThis;
917
+ var isCallable$7 = isCallable$e;
919
918
  var store = sharedStore.exports;
920
919
 
921
- var functionToString = uncurryThis$4(Function.toString);
920
+ var functionToString = uncurryThis$5(Function.toString);
922
921
 
923
922
  // 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)) {
923
+ if (!isCallable$7(store.inspectSource)) {
925
924
  store.inspectSource = function (it) {
926
925
  return functionToString(it);
927
926
  };
@@ -929,9 +928,9 @@ if (!isCallable$6(store.inspectSource)) {
929
928
 
930
929
  var inspectSource$1 = store.inspectSource;
931
930
 
932
- var uncurryThis$3 = functionUncurryThis;
933
- var fails$4 = fails$b;
934
- var isCallable$5 = isCallable$d;
931
+ var uncurryThis$4 = functionUncurryThis;
932
+ var fails$7 = fails$e;
933
+ var isCallable$6 = isCallable$e;
935
934
  var hasOwn$3 = hasOwnProperty_1;
936
935
  var DESCRIPTORS$2 = descriptors;
937
936
  var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
@@ -939,23 +938,23 @@ var inspectSource = inspectSource$1;
939
938
  var InternalStateModule$1 = internalState;
940
939
 
941
940
  var enforceInternalState = InternalStateModule$1.enforce;
942
- var getInternalState$1 = InternalStateModule$1.get;
943
- var $String$1 = String;
941
+ var getInternalState$2 = InternalStateModule$1.get;
942
+ var $String$2 = String;
944
943
  // eslint-disable-next-line es/no-object-defineproperty -- safe
945
944
  var defineProperty$3 = Object.defineProperty;
946
- var stringSlice = uncurryThis$3(''.slice);
947
- var replace = uncurryThis$3(''.replace);
948
- var join = uncurryThis$3([].join);
945
+ var stringSlice$1 = uncurryThis$4(''.slice);
946
+ var replace$1 = uncurryThis$4(''.replace);
947
+ var join = uncurryThis$4([].join);
949
948
 
950
- var CONFIGURABLE_LENGTH = DESCRIPTORS$2 && !fails$4(function () {
949
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$2 && !fails$7(function () {
951
950
  return defineProperty$3(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
952
951
  });
953
952
 
954
953
  var TEMPLATE = String(String).split('String');
955
954
 
956
955
  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') + ']';
956
+ if (stringSlice$1($String$2(name), 0, 7) === 'Symbol(') {
957
+ name = '[' + replace$1($String$2(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
959
958
  }
960
959
  if (options && options.getter) name = 'get ' + name;
961
960
  if (options && options.setter) name = 'set ' + name;
@@ -981,10 +980,10 @@ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
981
980
  // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
982
981
  // eslint-disable-next-line no-extend-native -- required
983
982
  Function.prototype.toString = makeBuiltIn$1(function toString() {
984
- return isCallable$5(this) && getInternalState$1(this).source || inspectSource(this);
983
+ return isCallable$6(this) && getInternalState$2(this).source || inspectSource(this);
985
984
  }, 'toString');
986
985
 
987
- var isCallable$4 = isCallable$d;
986
+ var isCallable$5 = isCallable$e;
988
987
  var definePropertyModule$1 = objectDefineProperty;
989
988
  var makeBuiltIn = makeBuiltIn$2.exports;
990
989
  var defineGlobalProperty$1 = defineGlobalProperty$3;
@@ -993,7 +992,7 @@ var defineBuiltIn$3 = function (O, key, value, options) {
993
992
  if (!options) options = {};
994
993
  var simple = options.enumerable;
995
994
  var name = options.name !== undefined ? options.name : key;
996
- if (isCallable$4(value)) makeBuiltIn(value, name, options);
995
+ if (isCallable$5(value)) makeBuiltIn(value, name, options);
997
996
  if (options.global) {
998
997
  if (simple) O[key] = value;
999
998
  else defineGlobalProperty$1(key, value);
@@ -1032,16 +1031,16 @@ var objectGetOwnPropertySymbols = {};
1032
1031
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
1033
1032
 
1034
1033
  var getBuiltIn = getBuiltIn$3;
1035
- var uncurryThis$2 = functionUncurryThis;
1034
+ var uncurryThis$3 = functionUncurryThis;
1036
1035
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
1037
1036
  var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
1038
- var anObject = anObject$4;
1037
+ var anObject$1 = anObject$5;
1039
1038
 
1040
- var concat$1 = uncurryThis$2([].concat);
1039
+ var concat$1 = uncurryThis$3([].concat);
1041
1040
 
1042
1041
  // all object keys, includes non-enumerable and symbols
1043
1042
  var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
1044
- var keys = getOwnPropertyNamesModule.f(anObject(it));
1043
+ var keys = getOwnPropertyNamesModule.f(anObject$1(it));
1045
1044
  var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
1046
1045
  return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
1047
1046
  };
@@ -1063,8 +1062,8 @@ var copyConstructorProperties$1 = function (target, source, exceptions) {
1063
1062
  }
1064
1063
  };
1065
1064
 
1066
- var fails$3 = fails$b;
1067
- var isCallable$3 = isCallable$d;
1065
+ var fails$6 = fails$e;
1066
+ var isCallable$4 = isCallable$e;
1068
1067
 
1069
1068
  var replacement = /#|\.prototype\./;
1070
1069
 
@@ -1072,7 +1071,7 @@ var isForced$1 = function (feature, detection) {
1072
1071
  var value = data[normalize(feature)];
1073
1072
  return value === POLYFILL ? true
1074
1073
  : value === NATIVE ? false
1075
- : isCallable$3(detection) ? fails$3(detection)
1074
+ : isCallable$4(detection) ? fails$6(detection)
1076
1075
  : !!detection;
1077
1076
  };
1078
1077
 
@@ -1086,7 +1085,7 @@ var POLYFILL = isForced$1.POLYFILL = 'P';
1086
1085
 
1087
1086
  var isForced_1 = isForced$1;
1088
1087
 
1089
- var global$2 = global$b;
1088
+ var global$5 = global$e;
1090
1089
  var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
1091
1090
  var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
1092
1091
  var defineBuiltIn$2 = defineBuiltIn$3;
@@ -1115,11 +1114,11 @@ var _export = function (options, source) {
1115
1114
  var STATIC = options.stat;
1116
1115
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
1117
1116
  if (GLOBAL) {
1118
- target = global$2;
1117
+ target = global$5;
1119
1118
  } else if (STATIC) {
1120
- target = global$2[TARGET] || defineGlobalProperty(TARGET, {});
1119
+ target = global$5[TARGET] || defineGlobalProperty(TARGET, {});
1121
1120
  } else {
1122
- target = global$2[TARGET] && global$2[TARGET].prototype;
1121
+ target = global$5[TARGET] && global$5[TARGET].prototype;
1123
1122
  }
1124
1123
  if (target) for (key in source) {
1125
1124
  sourceProperty = source[key];
@@ -1141,9 +1140,9 @@ var _export = function (options, source) {
1141
1140
  }
1142
1141
  };
1143
1142
 
1144
- var fails$2 = fails$b;
1143
+ var fails$5 = fails$e;
1145
1144
 
1146
- var correctPrototypeGetter = !fails$2(function () {
1145
+ var correctPrototypeGetter = !fails$5(function () {
1147
1146
  function F() { /* empty */ }
1148
1147
  F.prototype.constructor = null;
1149
1148
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
@@ -1151,35 +1150,35 @@ var correctPrototypeGetter = !fails$2(function () {
1151
1150
  });
1152
1151
 
1153
1152
  var hasOwn$1 = hasOwnProperty_1;
1154
- var isCallable$2 = isCallable$d;
1153
+ var isCallable$3 = isCallable$e;
1155
1154
  var toObject$1 = toObject$3;
1156
1155
  var sharedKey = sharedKey$3;
1157
1156
  var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1158
1157
 
1159
1158
  var IE_PROTO = sharedKey('IE_PROTO');
1160
- var $Object = Object;
1161
- var ObjectPrototype = $Object.prototype;
1159
+ var $Object$1 = Object;
1160
+ var ObjectPrototype = $Object$1.prototype;
1162
1161
 
1163
1162
  // `Object.getPrototypeOf` method
1164
1163
  // https://tc39.es/ecma262/#sec-object.getprototypeof
1165
1164
  // eslint-disable-next-line es/no-object-getprototypeof -- safe
1166
- var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
1165
+ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
1167
1166
  var object = toObject$1(O);
1168
1167
  if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
1169
1168
  var constructor = object.constructor;
1170
- if (isCallable$2(constructor) && object instanceof constructor) {
1169
+ if (isCallable$3(constructor) && object instanceof constructor) {
1171
1170
  return constructor.prototype;
1172
- } return object instanceof $Object ? ObjectPrototype : null;
1171
+ } return object instanceof $Object$1 ? ObjectPrototype : null;
1173
1172
  };
1174
1173
 
1175
- var fails$1 = fails$b;
1176
- var isCallable$1 = isCallable$d;
1174
+ var fails$4 = fails$e;
1175
+ var isCallable$2 = isCallable$e;
1177
1176
  var isObject$2 = isObject$8;
1178
1177
  var getPrototypeOf$1 = objectGetPrototypeOf;
1179
1178
  var defineBuiltIn$1 = defineBuiltIn$3;
1180
- var wellKnownSymbol$3 = wellKnownSymbol$6;
1179
+ var wellKnownSymbol$5 = wellKnownSymbol$8;
1181
1180
 
1182
- var ITERATOR$2 = wellKnownSymbol$3('iterator');
1181
+ var ITERATOR$2 = wellKnownSymbol$5('iterator');
1183
1182
  var BUGGY_SAFARI_ITERATORS$1 = false;
1184
1183
 
1185
1184
  // `%IteratorPrototype%` object
@@ -1197,7 +1196,7 @@ if ([].keys) {
1197
1196
  }
1198
1197
  }
1199
1198
 
1200
- var NEW_ITERATOR_PROTOTYPE = !isObject$2(IteratorPrototype$2) || fails$1(function () {
1199
+ var NEW_ITERATOR_PROTOTYPE = !isObject$2(IteratorPrototype$2) || fails$4(function () {
1201
1200
  var test = {};
1202
1201
  // FF44- legacy iterators case
1203
1202
  return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
@@ -1207,7 +1206,7 @@ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1207
1206
 
1208
1207
  // `%IteratorPrototype%[@@iterator]()` method
1209
1208
  // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1210
- if (!isCallable$1(IteratorPrototype$2[ITERATOR$2])) {
1209
+ if (!isCallable$2(IteratorPrototype$2[ITERATOR$2])) {
1211
1210
  defineBuiltIn$1(IteratorPrototype$2, ITERATOR$2, function () {
1212
1211
  return this;
1213
1212
  });
@@ -1220,19 +1219,19 @@ var iteratorsCore = {
1220
1219
 
1221
1220
  var defineProperty$2 = objectDefineProperty.f;
1222
1221
  var hasOwn = hasOwnProperty_1;
1223
- var wellKnownSymbol$2 = wellKnownSymbol$6;
1222
+ var wellKnownSymbol$4 = wellKnownSymbol$8;
1224
1223
 
1225
- var TO_STRING_TAG = wellKnownSymbol$2('toStringTag');
1224
+ var TO_STRING_TAG$2 = wellKnownSymbol$4('toStringTag');
1226
1225
 
1227
1226
  var setToStringTag$3 = function (target, TAG, STATIC) {
1228
1227
  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 });
1228
+ if (target && !hasOwn(target, TO_STRING_TAG$2)) {
1229
+ defineProperty$2(target, TO_STRING_TAG$2, { configurable: true, value: TAG });
1231
1230
  }
1232
1231
  };
1233
1232
 
1234
1233
  var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1235
- var create = objectCreate;
1234
+ var create$1 = objectCreate;
1236
1235
  var createPropertyDescriptor = createPropertyDescriptor$3;
1237
1236
  var setToStringTag$2 = setToStringTag$3;
1238
1237
  var Iterators$2 = iterators;
@@ -1241,19 +1240,19 @@ var returnThis$1 = function () { return this; };
1241
1240
 
1242
1241
  var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1243
1242
  var TO_STRING_TAG = NAME + ' Iterator';
1244
- IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1243
+ IteratorConstructor.prototype = create$1(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1245
1244
  setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
1246
1245
  Iterators$2[TO_STRING_TAG] = returnThis$1;
1247
1246
  return IteratorConstructor;
1248
1247
  };
1249
1248
 
1250
- var uncurryThis$1 = functionUncurryThis;
1249
+ var uncurryThis$2 = functionUncurryThis;
1251
1250
  var aCallable = aCallable$2;
1252
1251
 
1253
1252
  var functionUncurryThisAccessor = function (object, key, method) {
1254
1253
  try {
1255
1254
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1256
- return uncurryThis$1(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
1255
+ return uncurryThis$2(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
1257
1256
  } catch (error) { /* empty */ }
1258
1257
  };
1259
1258
 
@@ -1265,12 +1264,12 @@ var isPossiblePrototype$1 = function (argument) {
1265
1264
 
1266
1265
  var isPossiblePrototype = isPossiblePrototype$1;
1267
1266
 
1268
- var $String = String;
1267
+ var $String$1 = String;
1269
1268
  var $TypeError = TypeError;
1270
1269
 
1271
1270
  var aPossiblePrototype$1 = function (argument) {
1272
1271
  if (isPossiblePrototype(argument)) return argument;
1273
- throw new $TypeError("Can't set " + $String(argument) + ' as a prototype');
1272
+ throw new $TypeError("Can't set " + $String$1(argument) + ' as a prototype');
1274
1273
  };
1275
1274
 
1276
1275
  /* eslint-disable no-proto -- safe */
@@ -1302,17 +1301,17 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1302
1301
  };
1303
1302
  }() : undefined);
1304
1303
 
1305
- var $$1 = _export;
1306
- var call$1 = functionCall;
1304
+ var $$2 = _export;
1305
+ var call$2 = functionCall;
1307
1306
  var FunctionName = functionName;
1308
- var isCallable = isCallable$d;
1307
+ var isCallable$1 = isCallable$e;
1309
1308
  var createIteratorConstructor = iteratorCreateConstructor;
1310
1309
  var getPrototypeOf = objectGetPrototypeOf;
1311
1310
  var setPrototypeOf = objectSetPrototypeOf;
1312
1311
  var setToStringTag$1 = setToStringTag$3;
1313
1312
  var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
1314
1313
  var defineBuiltIn = defineBuiltIn$3;
1315
- var wellKnownSymbol$1 = wellKnownSymbol$6;
1314
+ var wellKnownSymbol$3 = wellKnownSymbol$8;
1316
1315
  var Iterators$1 = iterators;
1317
1316
  var IteratorsCore = iteratorsCore;
1318
1317
 
@@ -1320,7 +1319,7 @@ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
1320
1319
  var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1321
1320
  var IteratorPrototype = IteratorsCore.IteratorPrototype;
1322
1321
  var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
1323
- var ITERATOR$1 = wellKnownSymbol$1('iterator');
1322
+ var ITERATOR$1 = wellKnownSymbol$3('iterator');
1324
1323
  var KEYS = 'keys';
1325
1324
  var VALUES = 'values';
1326
1325
  var ENTRIES = 'entries';
@@ -1360,7 +1359,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1360
1359
  if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1361
1360
  if (setPrototypeOf) {
1362
1361
  setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
1363
- } else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) {
1362
+ } else if (!isCallable$1(CurrentIteratorPrototype[ITERATOR$1])) {
1364
1363
  defineBuiltIn(CurrentIteratorPrototype, ITERATOR$1, returnThis);
1365
1364
  }
1366
1365
  }
@@ -1375,7 +1374,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1375
1374
  createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
1376
1375
  } else {
1377
1376
  INCORRECT_VALUES_NAME = true;
1378
- defaultIterator = function values() { return call$1(nativeIterator, this); };
1377
+ defaultIterator = function values() { return call$2(nativeIterator, this); };
1379
1378
  }
1380
1379
  }
1381
1380
 
@@ -1390,7 +1389,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1390
1389
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1391
1390
  defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
1392
1391
  }
1393
- } else $$1({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1392
+ } else $$2({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1394
1393
  }
1395
1394
 
1396
1395
  // define iterator
@@ -1419,7 +1418,7 @@ var DESCRIPTORS$1 = descriptors;
1419
1418
 
1420
1419
  var ARRAY_ITERATOR = 'Array Iterator';
1421
1420
  var setInternalState = InternalStateModule.set;
1422
- var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
1421
+ var getInternalState$1 = InternalStateModule.getterFor(ARRAY_ITERATOR);
1423
1422
 
1424
1423
  // `Array.prototype.entries` method
1425
1424
  // https://tc39.es/ecma262/#sec-array.prototype.entries
@@ -1441,7 +1440,7 @@ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind)
1441
1440
  // `%ArrayIteratorPrototype%.next` method
1442
1441
  // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
1443
1442
  }, function () {
1444
- var state = getInternalState(this);
1443
+ var state = getInternalState$1(this);
1445
1444
  var target = state.target;
1446
1445
  var index = state.index++;
1447
1446
  if (!target || index >= target.length) {
@@ -1513,15 +1512,15 @@ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.co
1513
1512
 
1514
1513
  var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1515
1514
 
1516
- var global$1 = global$b;
1515
+ var global$4 = global$e;
1517
1516
  var DOMIterables = domIterables;
1518
1517
  var DOMTokenListPrototype = domTokenListPrototype;
1519
1518
  var ArrayIteratorMethods = es_array_iterator;
1520
1519
  var createNonEnumerableProperty = createNonEnumerableProperty$4;
1521
1520
  var setToStringTag = setToStringTag$3;
1522
- var wellKnownSymbol = wellKnownSymbol$6;
1521
+ var wellKnownSymbol$2 = wellKnownSymbol$8;
1523
1522
 
1524
- var ITERATOR = wellKnownSymbol('iterator');
1523
+ var ITERATOR = wellKnownSymbol$2('iterator');
1525
1524
  var ArrayValues = ArrayIteratorMethods.values;
1526
1525
 
1527
1526
  var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
@@ -1545,15 +1544,15 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1545
1544
  };
1546
1545
 
1547
1546
  for (var COLLECTION_NAME in DOMIterables) {
1548
- handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype, COLLECTION_NAME);
1547
+ handlePrototype(global$4[COLLECTION_NAME] && global$4[COLLECTION_NAME].prototype, COLLECTION_NAME);
1549
1548
  }
1550
1549
 
1551
1550
  handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1552
1551
 
1553
1552
  var DESCRIPTORS = descriptors;
1554
- var uncurryThis = functionUncurryThis;
1555
- var call = functionCall;
1556
- var fails = fails$b;
1553
+ var uncurryThis$1 = functionUncurryThis;
1554
+ var call$1 = functionCall;
1555
+ var fails$3 = fails$e;
1557
1556
  var objectKeys = objectKeys$2;
1558
1557
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1559
1558
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
@@ -1564,11 +1563,11 @@ var IndexedObject = indexedObject;
1564
1563
  var $assign = Object.assign;
1565
1564
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1566
1565
  var defineProperty = Object.defineProperty;
1567
- var concat = uncurryThis([].concat);
1566
+ var concat = uncurryThis$1([].concat);
1568
1567
 
1569
1568
  // `Object.assign` method
1570
1569
  // https://tc39.es/ecma262/#sec-object.assign
1571
- var objectAssign = !$assign || fails(function () {
1570
+ var objectAssign = !$assign || fails$3(function () {
1572
1571
  // should have correct order of operations (Edge bug)
1573
1572
  if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
1574
1573
  enumerable: true,
@@ -1602,27 +1601,31 @@ var objectAssign = !$assign || fails(function () {
1602
1601
  var key;
1603
1602
  while (length > j) {
1604
1603
  key = keys[j++];
1605
- if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
1604
+ if (!DESCRIPTORS || call$1(propertyIsEnumerable, S, key)) T[key] = S[key];
1606
1605
  }
1607
1606
  } return T;
1608
1607
  } : $assign;
1609
1608
 
1610
- var $ = _export;
1609
+ var $$1 = _export;
1611
1610
  var assign = objectAssign;
1612
1611
 
1613
1612
  // `Object.assign` method
1614
1613
  // https://tc39.es/ecma262/#sec-object.assign
1615
1614
  // eslint-disable-next-line es/no-object-assign -- required for testing
1616
- $({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1615
+ $$1({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1617
1616
  assign: assign
1618
1617
  });
1619
1618
 
1620
- let context;
1621
1619
  const FormGroupContext = /*#__PURE__*/createContext({});
1622
- const FormGroupContextProvider = ({
1623
- children,
1624
- mappers,
1625
- debugMode: _debugMode = false
1620
+ /**
1621
+ * context interface to be used isolated or with the context provider
1622
+ *
1623
+ * @param {TFormContextProvider} param context parameters
1624
+ * @returns {TFormContext}
1625
+ */
1626
+ const IsolatedContext = ({
1627
+ debugMode: _debugMode = false,
1628
+ mappers
1626
1629
  }) => {
1627
1630
  const formGroupInstance = useRef(new FormGroup());
1628
1631
  const addFormWithIndex = index => {
@@ -1647,9 +1650,6 @@ const FormGroupContextProvider = ({
1647
1650
  key
1648
1651
  });
1649
1652
  };
1650
- const removeField = payload => {
1651
- formGroupInstance.current.removeField(payload);
1652
- };
1653
1653
  const getForm = ({
1654
1654
  key
1655
1655
  }) => formGroupInstance.current.getForm({
@@ -1666,68 +1666,73 @@ const FormGroupContextProvider = ({
1666
1666
  addForm,
1667
1667
  getForm,
1668
1668
  removeForm,
1669
- removeField,
1670
1669
  mappers,
1671
1670
  formGroupInstance: formGroupInstance.current,
1672
1671
  printFormGroupInstance,
1673
1672
  submitMultipleFormsByIndex,
1674
- debugMode: _debugMode
1673
+ debugMode: _debugMode,
1674
+ active: false
1675
1675
  };
1676
+ return contextValue;
1677
+ };
1678
+ /**
1679
+ * context provider to wrap form-engine adapter elements
1680
+ *
1681
+ * @param {PropsWithChildren<TFormContextProvider>} param context parameters
1682
+ * @returns {ReactElement}
1683
+ */
1684
+ const FormGroupContextProvider = ({
1685
+ children,
1686
+ mappers,
1687
+ debugMode: _debugMode2 = false
1688
+ }) => {
1689
+ const contextValue = IsolatedContext({
1690
+ mappers,
1691
+ debugMode: _debugMode2
1692
+ });
1693
+ contextValue.debugMode = _debugMode2;
1694
+ contextValue.active = true;
1676
1695
  return jsxs(FormGroupContext.Provider, {
1677
1696
  value: contextValue,
1678
- children: [_debugMode && jsxs(Fragment, {
1697
+ children: [_debugMode2 && jsxs(Fragment, {
1679
1698
  children: [jsx("button", {
1680
- onClick: () => console.log(formGroupInstance),
1699
+ onClick: () => console.log(contextValue.formGroupInstance),
1681
1700
  children: "printGroupInstance"
1682
1701
  }), jsx("br", {}), jsx("hr", {})]
1683
1702
  }), children]
1684
1703
  });
1685
1704
  };
1686
- const useFormGroupContext = () => {
1687
- context = useContext(FormGroupContext);
1688
- if (Object.keys(context).length === 0) {
1689
- return {
1690
- addFormWithIndex: () => {
1691
- //simulate context purpose
1692
- },
1693
- addForm: () => {
1694
- //simulate context purpose
1695
- },
1696
- getForm: () => new FormCore({
1697
- index: 'empty',
1698
- mappers: []
1699
- }),
1700
- removeForm: () => {
1701
- //simulate context purpose
1702
- },
1703
- removeField: () => {
1704
- //simulate context purpose
1705
- },
1706
- mappers: [],
1707
- formGroupInstance: new FormGroup(),
1708
- printFormGroupInstance: () => {
1709
- //simulate context purpose
1710
- },
1711
- submitMultipleFormsByIndex: () => ({
1712
- erroredFields: [],
1713
- isValid: false,
1714
- values: {}
1715
- }),
1716
- debugMode: false
1717
- };
1705
+ /**
1706
+ * FormGroup context hook to handle context or isolated context implementations
1707
+ *
1708
+ * @param {TFormContextProvider} props form group context parameters
1709
+ * @returns {TFormContext}
1710
+ */
1711
+ const useFormGroupContext = props => {
1712
+ const context = useContext(FormGroupContext);
1713
+ if (Object.keys(context).length === 0 && props) {
1714
+ return IsolatedContext({
1715
+ debugMode: props.debugMode,
1716
+ mappers: props.mappers
1717
+ });
1718
1718
  }
1719
1719
  return context;
1720
1720
  };
1721
1721
 
1722
+ /**
1723
+ * Renders the React element defined on the mappers configuration
1724
+ *
1725
+ * @param param component props, field instance and children to render
1726
+ * @returns
1727
+ */
1722
1728
  const FieldWrapperComponentRender = ({
1723
1729
  props,
1724
1730
  fieldInstance,
1725
- children,
1726
- mapper
1731
+ children
1727
1732
  }) => {
1728
1733
  var _a, _b, _c;
1729
- const Component = (mapper === null || mapper === void 0 ? void 0 : mapper.component) || ((_a = fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.mapper) === null || _a === void 0 ? void 0 : _a.component);
1730
- const Asynccomponent = (mapper === null || mapper === void 0 ? void 0 : mapper.asynccomponent) || ((_b = fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.mapper) === null || _b === void 0 ? void 0 : _b.asynccomponent);
1734
+ const Component = (_a = fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.mapper) === null || _a === void 0 ? void 0 : _a.component;
1735
+ const Asynccomponent = (_b = fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.mapper) === null || _b === void 0 ? void 0 : _b.asynccomponent;
1731
1736
  if (Component) return jsx(Component, Object.assign({}, props, {
1732
1737
  children: children && children
1733
1738
  }));
@@ -1737,48 +1742,59 @@ const FieldWrapperComponentRender = ({
1737
1742
  }))
1738
1743
  });
1739
1744
  return jsx("div", {
1740
- children: `failed to render field ${fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.name} with ${(_c = fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.mapper) === null || _c === void 0 ? void 0 : _c.componentName}, please check mappers`
1745
+ children: `failed to render field ${fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.name} with componentName:${(_c = fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.mapper) === null || _c === void 0 ? void 0 : _c.componentName}, please check mappers`
1741
1746
  });
1742
1747
  };
1748
+ /**
1749
+ * Base field Wrapper to render the component with the necessary configurations from the schema
1750
+ * and mapper configuration
1751
+ *
1752
+ * @param {TFieldWrapperProps} param FieldWrapper params
1753
+ * @returns {ReactElement}
1754
+ */
1743
1755
  const FieldWrapper = ({
1744
1756
  name,
1745
1757
  formIndex,
1746
1758
  children,
1747
- mapper,
1748
- defaultProps
1759
+ props,
1760
+ context
1749
1761
  }) => {
1750
1762
  var _a;
1763
+ const localContext = useFormGroupContext({});
1764
+ /**
1765
+ * picks the right context prioritizing the context passed as prop
1766
+ */
1751
1767
  const {
1752
1768
  formGroupInstance,
1753
1769
  debugMode
1754
- } = useFormGroupContext();
1755
- const fieldInstance = (_a = formGroupInstance.getForm({
1770
+ } = useMemo(() => context ? context : localContext, [context, localContext]);
1771
+ const fieldInstance = useRef((_a = formGroupInstance.getForm({
1756
1772
  key: formIndex
1757
1773
  })) === null || _a === void 0 ? void 0 : _a.getField({
1758
1774
  key: name
1759
- });
1760
- const [valueState, setValueState] = useState(fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.stateValue);
1775
+ })).current;
1776
+ const [valueState, setValueState] = useState((fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.stateValue) || {});
1761
1777
  const [state, setState] = useState({
1762
1778
  visibility: (fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.visibility) || true,
1763
- props: (fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.props) || defaultProps,
1764
- apiResponse: fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.api
1779
+ props: (fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.props) || props
1765
1780
  });
1781
+ /**
1782
+ * handles the mounting and unmounting logic onto the field instance
1783
+ */
1766
1784
  useEffect(() => {
1767
1785
  fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.mountField({
1768
1786
  valueSubscription: value => {
1769
1787
  setValueState(value);
1770
1788
  },
1771
1789
  propsSubscription: ({
1772
- errors,
1773
1790
  visibility,
1774
- apiResponse,
1775
- props
1791
+ props,
1792
+ errors
1776
1793
  }) => {
1777
1794
  setState(prev => Object.assign(Object.assign({}, prev), {
1778
- errors,
1779
1795
  visibility,
1780
- apiResponse,
1781
- props
1796
+ props,
1797
+ errors
1782
1798
  }));
1783
1799
  }
1784
1800
  });
@@ -1786,17 +1802,27 @@ const FieldWrapper = ({
1786
1802
  fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.destroyField();
1787
1803
  };
1788
1804
  }, []);
1805
+ /**
1806
+ * handles the value change onto the field instance
1807
+ */
1789
1808
  const handleChange = useCallback(event => {
1790
1809
  fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.emitValue({
1791
1810
  value: event,
1792
1811
  event: 'ON_FIELD_CHANGE'
1793
1812
  });
1794
1813
  }, []);
1814
+ /**
1815
+ * handles the event emission onto the field instance
1816
+ */
1795
1817
  const handleEvent = useCallback(event => {
1796
1818
  fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.emitEvents({
1797
1819
  event
1798
1820
  });
1799
1821
  }, []);
1822
+ /**
1823
+ * handles the mappers configuration to bind the event submission callback
1824
+ * to the corresponding prop defined on the mappers
1825
+ */
1800
1826
  const mapProps = useMemo(() => {
1801
1827
  var _a;
1802
1828
  const events = (_a = fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.mapper) === null || _a === void 0 ? void 0 : _a.events;
@@ -1809,13 +1835,6 @@ const FieldWrapper = ({
1809
1835
  if (events === null || events === void 0 ? void 0 : events.onKeyDown) props[events.onKeyDown] = () => handleEvent('ON_FIELD_KEYDOWN');
1810
1836
  return props;
1811
1837
  }, []);
1812
- const mapValue = useMemo(() => {
1813
- var _a;
1814
- const events = (_a = fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.mapper) === null || _a === void 0 ? void 0 : _a.events;
1815
- return (events === null || events === void 0 ? void 0 : events.setValue) ? {
1816
- [events.setValue]: valueState
1817
- } : {};
1818
- }, [valueState]);
1819
1838
  return (state === null || state === void 0 ? void 0 : state.visibility) ? jsxs(Fragment, {
1820
1839
  children: [debugMode && jsxs(Fragment, {
1821
1840
  children: [jsx("b", {
@@ -1826,14 +1845,22 @@ const FieldWrapper = ({
1826
1845
  children: name
1827
1846
  }), jsx("br", {}), jsx("hr", {})]
1828
1847
  }), jsx(FieldWrapperComponentRender, {
1829
- props: Object.assign(Object.assign(Object.assign({}, state.props), mapProps), mapValue),
1848
+ props: Object.assign(Object.assign(Object.assign(Object.assign({}, mapProps), state.props), state.errors), valueState),
1830
1849
  fieldInstance: fieldInstance,
1831
- mapper: mapper,
1832
1850
  children: children && children
1833
1851
  })]
1834
1852
  }) : jsx(Fragment, {});
1835
1853
  };
1836
1854
 
1855
+ /**
1856
+ * recursive function to transform form fields from a form instance into
1857
+ * a react component tree
1858
+ *
1859
+ * @param {Map<string,IFormField>} param.fields form instance field Map
1860
+ * @param {string} param.prevPath previous field path to track the tree branch creation
1861
+ * @param {string} param.formIndex form index to aid field identification onto the FieldWrapper
1862
+ * @returns {ReactNode}
1863
+ */
1837
1864
  const BuildTree = ({
1838
1865
  fields,
1839
1866
  prevPath,
@@ -1856,6 +1883,12 @@ const BuildTree = ({
1856
1883
  }, fieldName);
1857
1884
  });
1858
1885
  };
1886
+ /**
1887
+ * function to transform AsFormField elements onto a JSON schema
1888
+ *
1889
+ * @param param.children ReactNode children elements
1890
+ * @returns {IComponentSchema[] | null | undefined}
1891
+ */
1859
1892
  const BuildAsFormFieldTree = ({
1860
1893
  children
1861
1894
  }) => {
@@ -1876,75 +1909,99 @@ const BuildAsFormFieldTree = ({
1876
1909
  });
1877
1910
  };
1878
1911
 
1912
+ /******************************************************************************
1913
+ Copyright (c) Microsoft Corporation.
1914
+
1915
+ Permission to use, copy, modify, and/or distribute this software for any
1916
+ purpose with or without fee is hereby granted.
1917
+
1918
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1919
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1920
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1921
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1922
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1923
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1924
+ PERFORMANCE OF THIS SOFTWARE.
1925
+ ***************************************************************************** */
1926
+
1927
+ function __rest(s, e) {
1928
+ var t = {};
1929
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1930
+ t[p] = s[p];
1931
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
1932
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1933
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1934
+ t[p[i]] = s[p[i]];
1935
+ }
1936
+ return t;
1937
+ }
1938
+
1939
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
1940
+ var e = new Error(message);
1941
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
1942
+ };
1943
+
1944
+ /**
1945
+ * events mapping to aid function callback binding
1946
+ */
1879
1947
  const eventsMapping = {
1880
- onChange: 'ON_FIELD_CHANGE',
1881
- onBlur: 'ON_FIELD_BLUR',
1882
- onFocus: 'ON_FIELD_FOCUS',
1883
- onKeyDown: 'ON_FIELD_KEYDOWN',
1884
- onKeyUp: 'ON_FIELD_KEYUP',
1885
- onMount: 'ON_FIELD_MOUNT',
1886
- onApiResponse: 'ON_API_FIELD_RESPONSE',
1887
- onClick: 'ON_FIELD_CLICK'
1888
- };
1889
- const subscribeEvents = ({
1890
- eventsCallbackMappings,
1891
- formInstance
1892
- }) => {
1893
- const subscriptions = [];
1894
- Object.keys(eventsCallbackMappings).forEach(key => {
1895
- if (!isNil(eventsCallbackMappings[key])) {
1896
- const sub = formInstance.subscribeFieldEvent({
1897
- event: eventsMapping[key],
1898
- // need to make this assertion even when it's not undefined or null on push ts verification
1899
- callback: eventsCallbackMappings[key]
1900
- });
1901
- subscriptions.push(sub);
1902
- }
1903
- });
1904
- return subscriptions;
1905
- };
1906
-
1907
- const useForm = ({
1908
- id,
1909
- onApiResponse,
1910
- onBlur,
1911
- onChange,
1912
- onClick,
1913
- onFocus,
1914
- onKeyDown,
1915
- onKeyUp,
1916
- onMount
1917
- }) => {
1948
+ ON_FIELD_CHANGE: 'onChange',
1949
+ ON_FIELD_BLUR: 'onBlur',
1950
+ ON_FIELD_FOCUS: 'onFocus',
1951
+ ON_FIELD_KEYDOWN: 'onKeyDown',
1952
+ ON_FIELD_KEYUP: 'onKeyUp',
1953
+ ON_FIELD_MOUNT: 'onMount',
1954
+ ON_API_FIELD_RESPONSE: 'onApiResponse',
1955
+ ON_FIELD_CLICK: 'onClick'
1956
+ };
1957
+
1958
+ /**
1959
+ * Hook to register events callback functions
1960
+ */
1961
+ const useForm = _a => {
1962
+ var {
1963
+ id
1964
+ } = _a,
1965
+ rest = __rest(_a, ["id"]);
1918
1966
  const {
1919
1967
  formGroupInstance
1920
- } = useFormGroupContext();
1921
- const subscriptions = useRef([]);
1968
+ } = useFormGroupContext({});
1969
+ /**
1970
+ * reference to store all updated callback functions rerendered by props change
1971
+ */
1972
+ const callbackRefs = useRef(rest);
1973
+ useEffect(() => {
1974
+ callbackRefs.current = rest;
1975
+ }, [rest]);
1976
+ /**
1977
+ * handle function call after the debounce occurs on the form instance field event
1978
+ * subject in order to call the most updated function with the updated function
1979
+ * reference to avoid events get outdated values
1980
+ */
1922
1981
  useEffect(() => {
1923
- const formInstance = formGroupInstance.getForm({
1982
+ var _a;
1983
+ const callback = payload => {
1984
+ var _a, _b;
1985
+ const eventMapping = eventsMapping[payload.event];
1986
+ if (eventMapping && callbackRefs.current[eventMapping]) {
1987
+ (_b = (_a = callbackRefs.current)[eventMapping]) === null || _b === void 0 ? void 0 : _b.call(_a, payload);
1988
+ }
1989
+ };
1990
+ const sub = (_a = formGroupInstance.getForm({
1924
1991
  key: id
1992
+ })) === null || _a === void 0 ? void 0 : _a.subscribeFieldEvent({
1993
+ callback
1925
1994
  });
1926
- if (formInstance) {
1927
- subscriptions.current = subscribeEvents({
1928
- eventsCallbackMappings: {
1929
- onApiResponse,
1930
- onBlur,
1931
- onChange,
1932
- onClick,
1933
- onFocus,
1934
- onKeyDown,
1935
- onKeyUp,
1936
- onMount
1937
- },
1938
- formInstance
1939
- });
1940
- }
1941
- return () => {
1942
- subscriptions.current.forEach(sub => sub.unsubscribe());
1943
- };
1944
- }, [id, onApiResponse, onBlur, onChange, onClick, onFocus, onKeyDown, onKeyUp, onMount]);
1995
+ return () => sub === null || sub === void 0 ? void 0 : sub.unsubscribe();
1996
+ }, []);
1945
1997
  return;
1946
1998
  };
1947
1999
 
2000
+ /**
2001
+ *
2002
+ * @param {TFormProps} param form properties initializor
2003
+ * @returns {ReactElement}
2004
+ */
1948
2005
  const Form = ({
1949
2006
  schema,
1950
2007
  index,
@@ -1970,20 +2027,12 @@ const Form = ({
1970
2027
  getForm,
1971
2028
  mappers,
1972
2029
  debugMode
1973
- } = useFormGroupContext();
2030
+ } = useFormGroupContext({});
1974
2031
  const [tree, setTree] = useState();
1975
2032
  const schemaIndex = useMemo(() => index || (schema === null || schema === void 0 ? void 0 : schema.index) || 'defaultChange', [index, schema]);
1976
- useForm({
1977
- id: index,
1978
- onApiResponse,
1979
- onBlur,
1980
- onChange,
1981
- onClick,
1982
- onFocus,
1983
- onKeyDown,
1984
- onKeyUp,
1985
- onMount
1986
- });
2033
+ /**
2034
+ * logic to initialize the form instance and it's removal
2035
+ */
1987
2036
  useEffect(() => {
1988
2037
  if (schemaIndex === 'defaultChange') {
1989
2038
  console.warn('please, add an unique id to the form, otherwise multiple forms will break');
@@ -2012,6 +2061,11 @@ const Form = ({
2012
2061
  });
2013
2062
  };
2014
2063
  }, []);
2064
+ /**
2065
+ * logic to transform AsFormFields onto JSON schema
2066
+ * and JSON schema onto FieldWrappers, refreshes when
2067
+ * the react tree changes it's children
2068
+ */
2015
2069
  useEffect(() => {
2016
2070
  var _a;
2017
2071
  const schema = BuildAsFormFieldTree({
@@ -2031,11 +2085,28 @@ const Form = ({
2031
2085
  setTree(buildTree);
2032
2086
  }
2033
2087
  }, [children]);
2088
+ /**
2089
+ * iVars change tracker to update iVars onto form instance
2090
+ */
2034
2091
  useEffect(() => {
2035
2092
  if (iVars) getForm({
2036
2093
  key: index
2037
2094
  }).iVars = iVars;
2038
2095
  }, [iVars]);
2096
+ /**
2097
+ * hook usage to keep event bindings updated on callback functions passed as props
2098
+ */
2099
+ useForm({
2100
+ id: schemaIndex,
2101
+ onApiResponse,
2102
+ onBlur,
2103
+ onChange,
2104
+ onClick,
2105
+ onFocus,
2106
+ onKeyDown,
2107
+ onKeyUp,
2108
+ onMount
2109
+ });
2039
2110
  /*
2040
2111
  @TODO move this logic inside form-core, add action and method onto form element,
2041
2112
  might need a ref of the form to collect all the form parameters when there is a
@@ -2079,61 +2150,332 @@ const Form = ({
2079
2150
  });
2080
2151
  };
2081
2152
 
2153
+ /**
2154
+ * Component wrapper to aid building schemas with react without writting a JSON schema
2155
+ * along with BuildAsFormFieldTree inside a Form component, FieldWrapper gets this props
2156
+ * to build the component as it does with a JSON schema, this component only works inside
2157
+ * the Form component
2158
+ *
2159
+ * @param {TAsFormFieldProps} props JSON schema props
2160
+ * @returns {ReactNode}
2161
+ */
2082
2162
  const AsFormField = props => {
2083
- return jsx(Fragment, {
2084
- children: props.children
2085
- });
2163
+ return props.children;
2164
+ };
2165
+
2166
+ var wellKnownSymbol$1 = wellKnownSymbol$8;
2167
+
2168
+ var TO_STRING_TAG$1 = wellKnownSymbol$1('toStringTag');
2169
+ var test = {};
2170
+
2171
+ test[TO_STRING_TAG$1] = 'z';
2172
+
2173
+ var toStringTagSupport = String(test) === '[object z]';
2174
+
2175
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
2176
+ var isCallable = isCallable$e;
2177
+ var classofRaw = classofRaw$1;
2178
+ var wellKnownSymbol = wellKnownSymbol$8;
2179
+
2180
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
2181
+ var $Object = Object;
2182
+
2183
+ // ES3 wrong here
2184
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';
2185
+
2186
+ // fallback for IE11 Script Access Denied error
2187
+ var tryGet = function (it, key) {
2188
+ try {
2189
+ return it[key];
2190
+ } catch (error) { /* empty */ }
2191
+ };
2192
+
2193
+ // getting tag from ES6+ `Object.prototype.toString`
2194
+ var classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
2195
+ var O, tag, result;
2196
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
2197
+ // @@toStringTag case
2198
+ : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
2199
+ // builtinTag case
2200
+ : CORRECT_ARGUMENTS ? classofRaw(O)
2201
+ // ES3 arguments fallback
2202
+ : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;
2203
+ };
2204
+
2205
+ var classof = classof$1;
2206
+
2207
+ var $String = String;
2208
+
2209
+ var toString$1 = function (argument) {
2210
+ if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
2211
+ return $String(argument);
2212
+ };
2213
+
2214
+ var anObject = anObject$5;
2215
+
2216
+ // `RegExp.prototype.flags` getter implementation
2217
+ // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
2218
+ var regexpFlags$1 = function () {
2219
+ var that = anObject(this);
2220
+ var result = '';
2221
+ if (that.hasIndices) result += 'd';
2222
+ if (that.global) result += 'g';
2223
+ if (that.ignoreCase) result += 'i';
2224
+ if (that.multiline) result += 'm';
2225
+ if (that.dotAll) result += 's';
2226
+ if (that.unicode) result += 'u';
2227
+ if (that.unicodeSets) result += 'v';
2228
+ if (that.sticky) result += 'y';
2229
+ return result;
2230
+ };
2231
+
2232
+ var fails$2 = fails$e;
2233
+ var global$3 = global$e;
2234
+
2235
+ // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
2236
+ var $RegExp$2 = global$3.RegExp;
2237
+
2238
+ var UNSUPPORTED_Y$1 = fails$2(function () {
2239
+ var re = $RegExp$2('a', 'y');
2240
+ re.lastIndex = 2;
2241
+ return re.exec('abcd') !== null;
2242
+ });
2243
+
2244
+ // UC Browser bug
2245
+ // https://github.com/zloirock/core-js/issues/1008
2246
+ var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$2(function () {
2247
+ return !$RegExp$2('a', 'y').sticky;
2248
+ });
2249
+
2250
+ var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$2(function () {
2251
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
2252
+ var re = $RegExp$2('^r', 'gy');
2253
+ re.lastIndex = 2;
2254
+ return re.exec('str') !== null;
2255
+ });
2256
+
2257
+ var regexpStickyHelpers = {
2258
+ BROKEN_CARET: BROKEN_CARET,
2259
+ MISSED_STICKY: MISSED_STICKY,
2260
+ UNSUPPORTED_Y: UNSUPPORTED_Y$1
2086
2261
  };
2087
2262
 
2263
+ var fails$1 = fails$e;
2264
+ var global$2 = global$e;
2265
+
2266
+ // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
2267
+ var $RegExp$1 = global$2.RegExp;
2268
+
2269
+ var regexpUnsupportedDotAll = fails$1(function () {
2270
+ var re = $RegExp$1('.', 's');
2271
+ return !(re.dotAll && re.test('\n') && re.flags === 's');
2272
+ });
2273
+
2274
+ var fails = fails$e;
2275
+ var global$1 = global$e;
2276
+
2277
+ // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
2278
+ var $RegExp = global$1.RegExp;
2279
+
2280
+ var regexpUnsupportedNcg = fails(function () {
2281
+ var re = $RegExp('(?<a>b)', 'g');
2282
+ return re.exec('b').groups.a !== 'b' ||
2283
+ 'b'.replace(re, '$<a>c') !== 'bc';
2284
+ });
2285
+
2286
+ /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
2287
+ /* eslint-disable regexp/no-useless-quantifier -- testing */
2288
+ var call = functionCall;
2289
+ var uncurryThis = functionUncurryThis;
2290
+ var toString = toString$1;
2291
+ var regexpFlags = regexpFlags$1;
2292
+ var stickyHelpers = regexpStickyHelpers;
2293
+ var shared = shared$4;
2294
+ var create = objectCreate;
2295
+ var getInternalState = internalState.get;
2296
+ var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
2297
+ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
2298
+
2299
+ var nativeReplace = shared('native-string-replace', String.prototype.replace);
2300
+ var nativeExec = RegExp.prototype.exec;
2301
+ var patchedExec = nativeExec;
2302
+ var charAt = uncurryThis(''.charAt);
2303
+ var indexOf = uncurryThis(''.indexOf);
2304
+ var replace = uncurryThis(''.replace);
2305
+ var stringSlice = uncurryThis(''.slice);
2306
+
2307
+ var UPDATES_LAST_INDEX_WRONG = (function () {
2308
+ var re1 = /a/;
2309
+ var re2 = /b*/g;
2310
+ call(nativeExec, re1, 'a');
2311
+ call(nativeExec, re2, 'a');
2312
+ return re1.lastIndex !== 0 || re2.lastIndex !== 0;
2313
+ })();
2314
+
2315
+ var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
2316
+
2317
+ // nonparticipating capturing group, copied from es5-shim's String#split patch.
2318
+ var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
2319
+
2320
+ var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
2321
+
2322
+ if (PATCH) {
2323
+ patchedExec = function exec(string) {
2324
+ var re = this;
2325
+ var state = getInternalState(re);
2326
+ var str = toString(string);
2327
+ var raw = state.raw;
2328
+ var result, reCopy, lastIndex, match, i, object, group;
2329
+
2330
+ if (raw) {
2331
+ raw.lastIndex = re.lastIndex;
2332
+ result = call(patchedExec, raw, str);
2333
+ re.lastIndex = raw.lastIndex;
2334
+ return result;
2335
+ }
2336
+
2337
+ var groups = state.groups;
2338
+ var sticky = UNSUPPORTED_Y && re.sticky;
2339
+ var flags = call(regexpFlags, re);
2340
+ var source = re.source;
2341
+ var charsAdded = 0;
2342
+ var strCopy = str;
2343
+
2344
+ if (sticky) {
2345
+ flags = replace(flags, 'y', '');
2346
+ if (indexOf(flags, 'g') === -1) {
2347
+ flags += 'g';
2348
+ }
2349
+
2350
+ strCopy = stringSlice(str, re.lastIndex);
2351
+ // Support anchored sticky behavior.
2352
+ if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) {
2353
+ source = '(?: ' + source + ')';
2354
+ strCopy = ' ' + strCopy;
2355
+ charsAdded++;
2356
+ }
2357
+ // ^(? + rx + ) is needed, in combination with some str slicing, to
2358
+ // simulate the 'y' flag.
2359
+ reCopy = new RegExp('^(?:' + source + ')', flags);
2360
+ }
2361
+
2362
+ if (NPCG_INCLUDED) {
2363
+ reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
2364
+ }
2365
+ if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
2366
+
2367
+ match = call(nativeExec, sticky ? reCopy : re, strCopy);
2368
+
2369
+ if (sticky) {
2370
+ if (match) {
2371
+ match.input = stringSlice(match.input, charsAdded);
2372
+ match[0] = stringSlice(match[0], charsAdded);
2373
+ match.index = re.lastIndex;
2374
+ re.lastIndex += match[0].length;
2375
+ } else re.lastIndex = 0;
2376
+ } else if (UPDATES_LAST_INDEX_WRONG && match) {
2377
+ re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
2378
+ }
2379
+ if (NPCG_INCLUDED && match && match.length > 1) {
2380
+ // Fix browsers whose `exec` methods don't consistently return `undefined`
2381
+ // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
2382
+ call(nativeReplace, match[0], reCopy, function () {
2383
+ for (i = 1; i < arguments.length - 2; i++) {
2384
+ if (arguments[i] === undefined) match[i] = undefined;
2385
+ }
2386
+ });
2387
+ }
2388
+
2389
+ if (match && groups) {
2390
+ match.groups = object = create(null);
2391
+ for (i = 0; i < groups.length; i++) {
2392
+ group = groups[i];
2393
+ object[group[0]] = match[group[1]];
2394
+ }
2395
+ }
2396
+
2397
+ return match;
2398
+ };
2399
+ }
2400
+
2401
+ var regexpExec = patchedExec;
2402
+
2403
+ var $ = _export;
2404
+ var exec = regexpExec;
2405
+
2406
+ // `RegExp.prototype.exec` method
2407
+ // https://tc39.es/ecma262/#sec-regexp.prototype.exec
2408
+ $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
2409
+ exec: exec
2410
+ });
2411
+
2412
+ /**
2413
+ * Component Wrapper to render form fields without the Form component, gets additional formId and mapper since
2414
+ * it won't rely on them and needs to be manually declared
2415
+ *
2416
+ * @param {TAsFormFieldBuilderProps} props JSON schema props along with FieldWrapper props and mapper props
2417
+ * @returns {ReactElement}
2418
+ */
2088
2419
  const AsFormFieldBuilder = props => {
2089
- const {
2090
- formGroupInstance,
2091
- addFormWithIndex,
2092
- removeField
2093
- } = useFormGroupContext();
2094
- const [field, setField] = useState(jsx(Fragment, {}));
2420
+ const context = useFormGroupContext({});
2421
+ /**
2422
+ * state to track the field instance creation process
2423
+ */
2424
+ const [mounted, setMounted] = useState(false);
2425
+ /**
2426
+ * initializer to create or add a form instance to the formGroup by it's formId
2427
+ * and add the field to the form instance
2428
+ * Also has the logic to remove it once this element is removed
2429
+ */
2095
2430
  useEffect(() => {
2096
- if (!(formGroupInstance === null || formGroupInstance === void 0 ? void 0 : formGroupInstance.forms.has(props.formIndex))) {
2097
- addFormWithIndex(props.formIndex);
2431
+ var _a;
2432
+ if (!((_a = context.formGroupInstance) === null || _a === void 0 ? void 0 : _a.forms.has(props.formIndex))) {
2433
+ context.addFormWithIndex(props.formIndex);
2098
2434
  }
2099
- const fieldInstanceProps = Object.assign(Object.assign({}, props), {
2435
+ const fieldSchema = Object.assign(Object.assign({}, props), {
2100
2436
  component: props.mapper.componentName,
2101
2437
  children: undefined
2102
2438
  });
2103
- const formInstance = formGroupInstance.forms.get(props.formIndex);
2104
- formInstance === null || formInstance === void 0 ? void 0 : formInstance.addField(fieldInstanceProps, props.mapper);
2105
- /*
2106
- some magic happens using this setTimeout and i don't know why...
2107
- this is executed right before the FieldWrapper mounts as expected
2108
- but has the blinking problem allowing people to see the template
2109
- format instead of the prop value
2110
- */
2111
- setTimeout(() => {
2112
- var _a;
2113
- (_a = formInstance === null || formInstance === void 0 ? void 0 : formInstance.getField({
2114
- key: props.name
2115
- })) === null || _a === void 0 ? void 0 : _a.emitEvents({
2116
- event: 'ON_FIELD_MOUNT'
2117
- });
2118
- formInstance === null || formInstance === void 0 ? void 0 : formInstance.refreshTemplates({
2119
- key: props.name,
2120
- event: 'ON_FIELDS'
2121
- });
2122
- }, 0);
2123
- const field = jsx(FieldWrapper, {
2124
- mapper: props.mapper,
2125
- formIndex: props.formIndex,
2126
- name: props.name,
2127
- defaultProps: props.props,
2128
- children: props.children && props.children
2439
+ const formInstance = context.formGroupInstance.forms.get(props.formIndex);
2440
+ formInstance === null || formInstance === void 0 ? void 0 : formInstance.addField({
2441
+ fieldSchema,
2442
+ mapperElement: props.mapper
2129
2443
  });
2130
- setField(field);
2131
- return () => removeField({
2132
- formIndex: props.formIndex,
2133
- fieldIndex: props.name
2444
+ setMounted(true);
2445
+ return () => formInstance === null || formInstance === void 0 ? void 0 : formInstance.removeField({
2446
+ key: props.name
2134
2447
  });
2135
2448
  }, []);
2136
- return field;
2449
+ /**
2450
+ * expensive function to allow both external props and templating work
2451
+ * evaluate if templating will be done onto form-engine or not
2452
+ */
2453
+ useEffect(() => {
2454
+ var _a;
2455
+ if (!mounted) return;
2456
+ const field = (_a = context.formGroupInstance.forms.get(props.formIndex)) === null || _a === void 0 ? void 0 : _a.fields.get(props.name);
2457
+ const fieldProps = field === null || field === void 0 ? void 0 : field.props;
2458
+ if (props.props) {
2459
+ Object.keys(props.props).forEach(propKey => {
2460
+ var _a, _b;
2461
+ if (typeof ((_a = props.props) === null || _a === void 0 ? void 0 : _a[propKey]) === 'string' &&
2462
+ /**
2463
+ * need to check linting on build, this needs to be casted in order to build..
2464
+ */
2465
+ /\$/.test((_b = props.props) === null || _b === void 0 ? void 0 : _b[propKey])) {
2466
+ delete props.props[propKey];
2467
+ }
2468
+ });
2469
+ }
2470
+ field === null || field === void 0 ? void 0 : field.propsSubject$.next(Object.assign(Object.assign({}, fieldProps), props.props));
2471
+ }, [props.props]);
2472
+ return mounted ? jsx(FieldWrapper, {
2473
+ formIndex: props.formIndex,
2474
+ name: props.name,
2475
+ props: props.props,
2476
+ context: !context.active ? context : null,
2477
+ children: props.children && props.children
2478
+ }) : jsx(Fragment, {});
2137
2479
  };
2138
2480
 
2139
2481
  export { AsFormField, AsFormFieldBuilder, Form, FormGroupContext, FormGroupContextProvider, useFormGroupContext };