@bolttech/form-engine 3.1.0-beta.5 → 3.1.0-beta.6

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,10 +1,10 @@
1
1
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
- import { FormGroup, FormCore } from '@bolttech/form-engine-core';
3
- import { createContext, useContext, useRef, useMemo, useState, useEffect, useCallback, Suspense, Children } from 'react';
2
+ import { createContext, useContext, useRef, useMemo, useState, useEffect, useCallback, Suspense } from 'react';
3
+ import { FormGroup, FormField, FormCore } from '@bolttech/form-engine-core';
4
4
 
5
5
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
6
6
 
7
- var fails$h = function (exec) {
7
+ var fails$e = function (exec) {
8
8
  try {
9
9
  return !!exec();
10
10
  } catch (error) {
@@ -12,9 +12,9 @@ var fails$h = function (exec) {
12
12
  }
13
13
  };
14
14
 
15
- var fails$g = fails$h;
15
+ var fails$d = fails$e;
16
16
 
17
- var functionBindNative = !fails$g(function () {
17
+ var functionBindNative = !fails$d(function () {
18
18
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
19
19
  var test = (function () { /* empty */ }).bind();
20
20
  // eslint-disable-next-line no-prototype-builtins -- safe
@@ -24,33 +24,33 @@ var functionBindNative = !fails$g(function () {
24
24
  var NATIVE_BIND$1 = functionBindNative;
25
25
 
26
26
  var FunctionPrototype$1 = Function.prototype;
27
- var call$8 = FunctionPrototype$1.call;
28
- var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$1.bind.bind(call$8, call$8);
27
+ var call$7 = FunctionPrototype$1.call;
28
+ var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$1.bind.bind(call$7, call$7);
29
29
 
30
30
  var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
31
31
  return function () {
32
- return call$8.apply(fn, arguments);
32
+ return call$7.apply(fn, arguments);
33
33
  };
34
34
  };
35
35
 
36
- var uncurryThis$f = functionUncurryThis;
36
+ var uncurryThis$e = functionUncurryThis;
37
37
 
38
- var toString$5 = uncurryThis$f({}.toString);
39
- var stringSlice$3 = uncurryThis$f(''.slice);
38
+ var toString$4 = uncurryThis$e({}.toString);
39
+ var stringSlice$2 = uncurryThis$e(''.slice);
40
40
 
41
41
  var classofRaw$2 = function (it) {
42
- return stringSlice$3(toString$5(it), 8, -1);
42
+ return stringSlice$2(toString$4(it), 8, -1);
43
43
  };
44
44
 
45
- var uncurryThis$e = functionUncurryThis;
46
- var fails$f = fails$h;
45
+ var uncurryThis$d = functionUncurryThis;
46
+ var fails$c = fails$e;
47
47
  var classof$3 = classofRaw$2;
48
48
 
49
49
  var $Object$4 = Object;
50
- var split = uncurryThis$e(''.split);
50
+ var split = uncurryThis$d(''.split);
51
51
 
52
52
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
53
- var indexedObject = fails$f(function () {
53
+ var indexedObject = fails$c(function () {
54
54
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
55
55
  // eslint-disable-next-line no-prototype-builtins -- safe
56
56
  return !$Object$4('z').propertyIsEnumerable(0);
@@ -88,7 +88,7 @@ var check = function (it) {
88
88
  };
89
89
 
90
90
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
91
- var global$e =
91
+ var global$b =
92
92
  // eslint-disable-next-line es/no-global-this -- safe
93
93
  check(typeof globalThis == 'object' && globalThis) ||
94
94
  check(typeof window == 'object' && window) ||
@@ -101,20 +101,20 @@ var global$e =
101
101
 
102
102
  var sharedStore = {exports: {}};
103
103
 
104
- var global$d = global$e;
104
+ var global$a = global$b;
105
105
 
106
106
  // eslint-disable-next-line es/no-object-defineproperty -- safe
107
107
  var defineProperty$5 = Object.defineProperty;
108
108
 
109
109
  var defineGlobalProperty$3 = function (key, value) {
110
110
  try {
111
- defineProperty$5(global$d, key, { value: value, configurable: true, writable: true });
111
+ defineProperty$5(global$a, key, { value: value, configurable: true, writable: true });
112
112
  } catch (error) {
113
- global$d[key] = value;
113
+ global$a[key] = value;
114
114
  } return value;
115
115
  };
116
116
 
117
- var globalThis$1 = global$e;
117
+ var globalThis$1 = global$b;
118
118
  var defineGlobalProperty$2 = defineGlobalProperty$3;
119
119
 
120
120
  var SHARED = '__core-js_shared__';
@@ -130,7 +130,7 @@ var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty
130
130
 
131
131
  var store$2 = sharedStore.exports;
132
132
 
133
- var shared$4 = function (key, value) {
133
+ var shared$3 = function (key, value) {
134
134
  return store$2[key] || (store$2[key] = value || {});
135
135
  };
136
136
 
@@ -144,10 +144,10 @@ var toObject$4 = function (argument) {
144
144
  return $Object$3(requireObjectCoercible$2(argument));
145
145
  };
146
146
 
147
- var uncurryThis$d = functionUncurryThis;
147
+ var uncurryThis$c = functionUncurryThis;
148
148
  var toObject$3 = toObject$4;
149
149
 
150
- var hasOwnProperty = uncurryThis$d({}.hasOwnProperty);
150
+ var hasOwnProperty = uncurryThis$c({}.hasOwnProperty);
151
151
 
152
152
  // `HasOwnProperty` abstract operation
153
153
  // https://tc39.es/ecma262/#sec-hasownproperty
@@ -156,23 +156,23 @@ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
156
156
  return hasOwnProperty(toObject$3(it), key);
157
157
  };
158
158
 
159
- var uncurryThis$c = functionUncurryThis;
159
+ var uncurryThis$b = functionUncurryThis;
160
160
 
161
161
  var id = 0;
162
162
  var postfix = Math.random();
163
- var toString$4 = uncurryThis$c(1.0.toString);
163
+ var toString$3 = uncurryThis$b(1.0.toString);
164
164
 
165
165
  var uid$2 = function (key) {
166
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$4(++id + postfix, 36);
166
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
167
167
  };
168
168
 
169
169
  var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
170
170
 
171
- var global$c = global$e;
171
+ var global$9 = global$b;
172
172
  var userAgent$2 = engineUserAgent;
173
173
 
174
- var process = global$c.process;
175
- var Deno = global$c.Deno;
174
+ var process = global$9.process;
175
+ var Deno = global$9.Deno;
176
176
  var versions = process && process.versions || Deno && Deno.version;
177
177
  var v8 = versions && versions.v8;
178
178
  var match, version;
@@ -198,13 +198,13 @@ var engineV8Version = version;
198
198
 
199
199
  /* eslint-disable es/no-symbol -- required for testing */
200
200
  var V8_VERSION = engineV8Version;
201
- var fails$e = fails$h;
202
- var global$b = global$e;
201
+ var fails$b = fails$e;
202
+ var global$8 = global$b;
203
203
 
204
- var $String$5 = global$b.String;
204
+ var $String$5 = global$8.String;
205
205
 
206
206
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
207
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$e(function () {
207
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$b(function () {
208
208
  var symbol = Symbol('symbol detection');
209
209
  // Chrome 38 Symbol has incorrect toString conversion
210
210
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -222,15 +222,15 @@ var useSymbolAsUid = NATIVE_SYMBOL$1
222
222
  && !Symbol.sham
223
223
  && typeof Symbol.iterator == 'symbol';
224
224
 
225
- var global$a = global$e;
226
- var shared$3 = shared$4;
225
+ var global$7 = global$b;
226
+ var shared$2 = shared$3;
227
227
  var hasOwn$9 = hasOwnProperty_1;
228
228
  var uid$1 = uid$2;
229
229
  var NATIVE_SYMBOL = symbolConstructorDetection;
230
230
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
231
231
 
232
- var Symbol$1 = global$a.Symbol;
233
- var WellKnownSymbolsStore = shared$3('wks');
232
+ var Symbol$1 = global$7.Symbol;
233
+ var WellKnownSymbolsStore = shared$2('wks');
234
234
  var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
235
235
 
236
236
  var wellKnownSymbol$a = function (name) {
@@ -272,20 +272,20 @@ var anObject$6 = function (argument) {
272
272
 
273
273
  var objectDefineProperties = {};
274
274
 
275
- var fails$d = fails$h;
275
+ var fails$a = fails$e;
276
276
 
277
277
  // Detect IE8's incomplete defineProperty implementation
278
- var descriptors = !fails$d(function () {
278
+ var descriptors = !fails$a(function () {
279
279
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
280
280
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
281
281
  });
282
282
 
283
283
  var DESCRIPTORS$9 = descriptors;
284
- var fails$c = fails$h;
284
+ var fails$9 = fails$e;
285
285
 
286
286
  // V8 ~ Chrome 36-
287
287
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
288
- var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$c(function () {
288
+ var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$9(function () {
289
289
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
290
290
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
291
291
  value: 42,
@@ -295,10 +295,10 @@ var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$c(function () {
295
295
 
296
296
  var objectDefineProperty = {};
297
297
 
298
- var global$9 = global$e;
298
+ var global$6 = global$b;
299
299
  var isObject$7 = isObject$9;
300
300
 
301
- var document$1 = global$9.document;
301
+ var document$1 = global$6.document;
302
302
  // typeof document.createElement is 'object' in old IE
303
303
  var EXISTS$1 = isObject$7(document$1) && isObject$7(document$1.createElement);
304
304
 
@@ -307,11 +307,11 @@ var documentCreateElement$2 = function (it) {
307
307
  };
308
308
 
309
309
  var DESCRIPTORS$8 = descriptors;
310
- var fails$b = fails$h;
310
+ var fails$8 = fails$e;
311
311
  var createElement = documentCreateElement$2;
312
312
 
313
313
  // Thanks to IE8 for its funny defineProperty
314
- var ie8DomDefine = !DESCRIPTORS$8 && !fails$b(function () {
314
+ var ie8DomDefine = !DESCRIPTORS$8 && !fails$8(function () {
315
315
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
316
316
  return Object.defineProperty(createElement('div'), 'a', {
317
317
  get: function () { return 7; }
@@ -320,13 +320,13 @@ var ie8DomDefine = !DESCRIPTORS$8 && !fails$b(function () {
320
320
 
321
321
  var NATIVE_BIND = functionBindNative;
322
322
 
323
- var call$7 = Function.prototype.call;
323
+ var call$6 = Function.prototype.call;
324
324
 
325
- var functionCall = NATIVE_BIND ? call$7.bind(call$7) : function () {
326
- return call$7.apply(call$7, arguments);
325
+ var functionCall = NATIVE_BIND ? call$6.bind(call$6) : function () {
326
+ return call$6.apply(call$6, arguments);
327
327
  };
328
328
 
329
- var global$8 = global$e;
329
+ var global$5 = global$b;
330
330
  var isCallable$c = isCallable$e;
331
331
 
332
332
  var aFunction = function (argument) {
@@ -334,12 +334,12 @@ var aFunction = function (argument) {
334
334
  };
335
335
 
336
336
  var getBuiltIn$3 = function (namespace, method) {
337
- return arguments.length < 2 ? aFunction(global$8[namespace]) : global$8[namespace] && global$8[namespace][method];
337
+ return arguments.length < 2 ? aFunction(global$5[namespace]) : global$5[namespace] && global$5[namespace][method];
338
338
  };
339
339
 
340
- var uncurryThis$b = functionUncurryThis;
340
+ var uncurryThis$a = functionUncurryThis;
341
341
 
342
- var objectIsPrototypeOf = uncurryThis$b({}.isPrototypeOf);
342
+ var objectIsPrototypeOf = uncurryThis$a({}.isPrototypeOf);
343
343
 
344
344
  var getBuiltIn$2 = getBuiltIn$3;
345
345
  var isCallable$b = isCallable$e;
@@ -386,7 +386,7 @@ var getMethod$1 = function (V, P) {
386
386
  return isNullOrUndefined(func) ? undefined : aCallable$2(func);
387
387
  };
388
388
 
389
- var call$6 = functionCall;
389
+ var call$5 = functionCall;
390
390
  var isCallable$9 = isCallable$e;
391
391
  var isObject$6 = isObject$9;
392
392
 
@@ -396,13 +396,13 @@ var $TypeError$5 = TypeError;
396
396
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
397
397
  var ordinaryToPrimitive$1 = function (input, pref) {
398
398
  var fn, val;
399
- if (pref === 'string' && isCallable$9(fn = input.toString) && !isObject$6(val = call$6(fn, input))) return val;
400
- if (isCallable$9(fn = input.valueOf) && !isObject$6(val = call$6(fn, input))) return val;
401
- if (pref !== 'string' && isCallable$9(fn = input.toString) && !isObject$6(val = call$6(fn, input))) return val;
399
+ if (pref === 'string' && isCallable$9(fn = input.toString) && !isObject$6(val = call$5(fn, input))) return val;
400
+ if (isCallable$9(fn = input.valueOf) && !isObject$6(val = call$5(fn, input))) return val;
401
+ if (pref !== 'string' && isCallable$9(fn = input.toString) && !isObject$6(val = call$5(fn, input))) return val;
402
402
  throw new $TypeError$5("Can't convert object to primitive value");
403
403
  };
404
404
 
405
- var call$5 = functionCall;
405
+ var call$4 = functionCall;
406
406
  var isObject$5 = isObject$9;
407
407
  var isSymbol$1 = isSymbol$2;
408
408
  var getMethod = getMethod$1;
@@ -420,7 +420,7 @@ var toPrimitive$1 = function (input, pref) {
420
420
  var result;
421
421
  if (exoticToPrim) {
422
422
  if (pref === undefined) pref = 'default';
423
- result = call$5(exoticToPrim, input, pref);
423
+ result = call$4(exoticToPrim, input, pref);
424
424
  if (!isObject$5(result) || isSymbol$1(result)) return result;
425
425
  throw new $TypeError$4("Can't convert object to primitive value");
426
426
  }
@@ -571,13 +571,13 @@ var arrayIncludes = {
571
571
 
572
572
  var hiddenKeys$4 = {};
573
573
 
574
- var uncurryThis$a = functionUncurryThis;
574
+ var uncurryThis$9 = functionUncurryThis;
575
575
  var hasOwn$8 = hasOwnProperty_1;
576
576
  var toIndexedObject$3 = toIndexedObject$5;
577
- var indexOf$1 = arrayIncludes.indexOf;
577
+ var indexOf = arrayIncludes.indexOf;
578
578
  var hiddenKeys$3 = hiddenKeys$4;
579
579
 
580
- var push$1 = uncurryThis$a([].push);
580
+ var push$1 = uncurryThis$9([].push);
581
581
 
582
582
  var objectKeysInternal = function (object, names) {
583
583
  var O = toIndexedObject$3(object);
@@ -587,7 +587,7 @@ var objectKeysInternal = function (object, names) {
587
587
  for (key in O) !hasOwn$8(hiddenKeys$3, key) && hasOwn$8(O, key) && push$1(result, key);
588
588
  // Don't enum bug & hidden keys
589
589
  while (names.length > i) if (hasOwn$8(O, key = names[i++])) {
590
- ~indexOf$1(result, key) || push$1(result, key);
590
+ ~indexOf(result, key) || push$1(result, key);
591
591
  }
592
592
  return result;
593
593
  };
@@ -638,10 +638,10 @@ var getBuiltIn$1 = getBuiltIn$3;
638
638
 
639
639
  var html$1 = getBuiltIn$1('document', 'documentElement');
640
640
 
641
- var shared$2 = shared$4;
641
+ var shared$1 = shared$3;
642
642
  var uid = uid$2;
643
643
 
644
- var keys = shared$2('keys');
644
+ var keys = shared$1('keys');
645
645
 
646
646
  var sharedKey$3 = function (key) {
647
647
  return keys[key] || (keys[key] = uid(key));
@@ -732,7 +732,7 @@ var objectCreate = Object.create || function create(O, Properties) {
732
732
  };
733
733
 
734
734
  var wellKnownSymbol$8 = wellKnownSymbol$a;
735
- var create$2 = objectCreate;
735
+ var create$1 = objectCreate;
736
736
  var defineProperty$4 = objectDefineProperty.f;
737
737
 
738
738
  var UNSCOPABLES = wellKnownSymbol$8('unscopables');
@@ -743,7 +743,7 @@ var ArrayPrototype = Array.prototype;
743
743
  if (ArrayPrototype[UNSCOPABLES] === undefined) {
744
744
  defineProperty$4(ArrayPrototype, UNSCOPABLES, {
745
745
  configurable: true,
746
- value: create$2(null)
746
+ value: create$1(null)
747
747
  });
748
748
  }
749
749
 
@@ -754,10 +754,10 @@ var addToUnscopables$1 = function (key) {
754
754
 
755
755
  var iterators = {};
756
756
 
757
- var global$7 = global$e;
757
+ var global$4 = global$b;
758
758
  var isCallable$8 = isCallable$e;
759
759
 
760
- var WeakMap$1 = global$7.WeakMap;
760
+ var WeakMap$1 = global$4.WeakMap;
761
761
 
762
762
  var weakMapBasicDetection = isCallable$8(WeakMap$1) && /native code/.test(String(WeakMap$1));
763
763
 
@@ -782,17 +782,17 @@ var createNonEnumerableProperty$4 = DESCRIPTORS$5 ? function (object, key, value
782
782
  };
783
783
 
784
784
  var NATIVE_WEAK_MAP = weakMapBasicDetection;
785
- var global$6 = global$e;
785
+ var global$3 = global$b;
786
786
  var isObject$4 = isObject$9;
787
787
  var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
788
788
  var hasOwn$7 = hasOwnProperty_1;
789
- var shared$1 = sharedStore.exports;
789
+ var shared = sharedStore.exports;
790
790
  var sharedKey$1 = sharedKey$3;
791
791
  var hiddenKeys$1 = hiddenKeys$4;
792
792
 
793
793
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
794
- var TypeError$1 = global$6.TypeError;
795
- var WeakMap = global$6.WeakMap;
794
+ var TypeError$1 = global$3.TypeError;
795
+ var WeakMap = global$3.WeakMap;
796
796
  var set, get, has;
797
797
 
798
798
  var enforce = function (it) {
@@ -808,8 +808,8 @@ var getterFor = function (TYPE) {
808
808
  };
809
809
  };
810
810
 
811
- if (NATIVE_WEAK_MAP || shared$1.state) {
812
- var store$1 = shared$1.state || (shared$1.state = new WeakMap());
811
+ if (NATIVE_WEAK_MAP || shared.state) {
812
+ var store$1 = shared.state || (shared.state = new WeakMap());
813
813
  /* eslint-disable no-self-assign -- prototype methods protection */
814
814
  store$1.get = store$1.get;
815
815
  store$1.has = store$1.has;
@@ -871,7 +871,7 @@ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
871
871
  } : $propertyIsEnumerable;
872
872
 
873
873
  var DESCRIPTORS$4 = descriptors;
874
- var call$4 = functionCall;
874
+ var call$3 = functionCall;
875
875
  var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
876
876
  var createPropertyDescriptor$1 = createPropertyDescriptor$3;
877
877
  var toIndexedObject$1 = toIndexedObject$5;
@@ -890,7 +890,7 @@ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$4 ? $getOwnPropertyDescriptor : f
890
890
  if (IE8_DOM_DEFINE) try {
891
891
  return $getOwnPropertyDescriptor(O, P);
892
892
  } catch (error) { /* empty */ }
893
- if (hasOwn$6(O, P)) return createPropertyDescriptor$1(!call$4(propertyIsEnumerableModule$1.f, O, P), O[P]);
893
+ if (hasOwn$6(O, P)) return createPropertyDescriptor$1(!call$3(propertyIsEnumerableModule$1.f, O, P), O[P]);
894
894
  };
895
895
 
896
896
  var makeBuiltIn$2 = {exports: {}};
@@ -913,11 +913,11 @@ var functionName = {
913
913
  CONFIGURABLE: CONFIGURABLE
914
914
  };
915
915
 
916
- var uncurryThis$9 = functionUncurryThis;
916
+ var uncurryThis$8 = functionUncurryThis;
917
917
  var isCallable$7 = isCallable$e;
918
918
  var store = sharedStore.exports;
919
919
 
920
- var functionToString = uncurryThis$9(Function.toString);
920
+ var functionToString = uncurryThis$8(Function.toString);
921
921
 
922
922
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
923
923
  if (!isCallable$7(store.inspectSource)) {
@@ -928,8 +928,8 @@ if (!isCallable$7(store.inspectSource)) {
928
928
 
929
929
  var inspectSource$1 = store.inspectSource;
930
930
 
931
- var uncurryThis$8 = functionUncurryThis;
932
- var fails$a = fails$h;
931
+ var uncurryThis$7 = functionUncurryThis;
932
+ var fails$7 = fails$e;
933
933
  var isCallable$6 = isCallable$e;
934
934
  var hasOwn$4 = hasOwnProperty_1;
935
935
  var DESCRIPTORS$2 = descriptors;
@@ -938,23 +938,23 @@ var inspectSource = inspectSource$1;
938
938
  var InternalStateModule$1 = internalState;
939
939
 
940
940
  var enforceInternalState = InternalStateModule$1.enforce;
941
- var getInternalState$2 = InternalStateModule$1.get;
941
+ var getInternalState$1 = InternalStateModule$1.get;
942
942
  var $String$2 = String;
943
943
  // eslint-disable-next-line es/no-object-defineproperty -- safe
944
944
  var defineProperty$3 = Object.defineProperty;
945
- var stringSlice$2 = uncurryThis$8(''.slice);
946
- var replace$1 = uncurryThis$8(''.replace);
947
- var join = uncurryThis$8([].join);
945
+ var stringSlice$1 = uncurryThis$7(''.slice);
946
+ var replace = uncurryThis$7(''.replace);
947
+ var join = uncurryThis$7([].join);
948
948
 
949
- var CONFIGURABLE_LENGTH = DESCRIPTORS$2 && !fails$a(function () {
949
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$2 && !fails$7(function () {
950
950
  return defineProperty$3(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
951
951
  });
952
952
 
953
953
  var TEMPLATE = String(String).split('String');
954
954
 
955
955
  var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
956
- if (stringSlice$2($String$2(name), 0, 7) === 'Symbol(') {
957
- name = '[' + replace$1($String$2(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
956
+ if (stringSlice$1($String$2(name), 0, 7) === 'Symbol(') {
957
+ name = '[' + replace($String$2(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
958
958
  }
959
959
  if (options && options.getter) name = 'get ' + name;
960
960
  if (options && options.setter) name = 'set ' + name;
@@ -980,7 +980,7 @@ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
980
980
  // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
981
981
  // eslint-disable-next-line no-extend-native -- required
982
982
  Function.prototype.toString = makeBuiltIn$1(function toString() {
983
- return isCallable$6(this) && getInternalState$2(this).source || inspectSource(this);
983
+ return isCallable$6(this) && getInternalState$1(this).source || inspectSource(this);
984
984
  }, 'toString');
985
985
 
986
986
  var isCallable$5 = isCallable$e;
@@ -1031,12 +1031,12 @@ var objectGetOwnPropertySymbols = {};
1031
1031
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
1032
1032
 
1033
1033
  var getBuiltIn = getBuiltIn$3;
1034
- var uncurryThis$7 = functionUncurryThis;
1034
+ var uncurryThis$6 = functionUncurryThis;
1035
1035
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
1036
1036
  var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
1037
1037
  var anObject$2 = anObject$6;
1038
1038
 
1039
- var concat$1 = uncurryThis$7([].concat);
1039
+ var concat$1 = uncurryThis$6([].concat);
1040
1040
 
1041
1041
  // all object keys, includes non-enumerable and symbols
1042
1042
  var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
@@ -1062,7 +1062,7 @@ var copyConstructorProperties$1 = function (target, source, exceptions) {
1062
1062
  }
1063
1063
  };
1064
1064
 
1065
- var fails$9 = fails$h;
1065
+ var fails$6 = fails$e;
1066
1066
  var isCallable$4 = isCallable$e;
1067
1067
 
1068
1068
  var replacement = /#|\.prototype\./;
@@ -1071,7 +1071,7 @@ var isForced$1 = function (feature, detection) {
1071
1071
  var value = data[normalize(feature)];
1072
1072
  return value === POLYFILL ? true
1073
1073
  : value === NATIVE ? false
1074
- : isCallable$4(detection) ? fails$9(detection)
1074
+ : isCallable$4(detection) ? fails$6(detection)
1075
1075
  : !!detection;
1076
1076
  };
1077
1077
 
@@ -1085,7 +1085,7 @@ var POLYFILL = isForced$1.POLYFILL = 'P';
1085
1085
 
1086
1086
  var isForced_1 = isForced$1;
1087
1087
 
1088
- var global$5 = global$e;
1088
+ var global$2 = global$b;
1089
1089
  var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
1090
1090
  var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
1091
1091
  var defineBuiltIn$3 = defineBuiltIn$4;
@@ -1114,11 +1114,11 @@ var _export = function (options, source) {
1114
1114
  var STATIC = options.stat;
1115
1115
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
1116
1116
  if (GLOBAL) {
1117
- target = global$5;
1117
+ target = global$2;
1118
1118
  } else if (STATIC) {
1119
- target = global$5[TARGET] || defineGlobalProperty(TARGET, {});
1119
+ target = global$2[TARGET] || defineGlobalProperty(TARGET, {});
1120
1120
  } else {
1121
- target = global$5[TARGET] && global$5[TARGET].prototype;
1121
+ target = global$2[TARGET] && global$2[TARGET].prototype;
1122
1122
  }
1123
1123
  if (target) for (key in source) {
1124
1124
  sourceProperty = source[key];
@@ -1140,9 +1140,9 @@ var _export = function (options, source) {
1140
1140
  }
1141
1141
  };
1142
1142
 
1143
- var fails$8 = fails$h;
1143
+ var fails$5 = fails$e;
1144
1144
 
1145
- var correctPrototypeGetter = !fails$8(function () {
1145
+ var correctPrototypeGetter = !fails$5(function () {
1146
1146
  function F() { /* empty */ }
1147
1147
  F.prototype.constructor = null;
1148
1148
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
@@ -1171,7 +1171,7 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf :
1171
1171
  } return object instanceof $Object$1 ? ObjectPrototype : null;
1172
1172
  };
1173
1173
 
1174
- var fails$7 = fails$h;
1174
+ var fails$4 = fails$e;
1175
1175
  var isCallable$2 = isCallable$e;
1176
1176
  var isObject$3 = isObject$9;
1177
1177
  var getPrototypeOf$1 = objectGetPrototypeOf;
@@ -1196,7 +1196,7 @@ if ([].keys) {
1196
1196
  }
1197
1197
  }
1198
1198
 
1199
- var NEW_ITERATOR_PROTOTYPE = !isObject$3(IteratorPrototype$2) || fails$7(function () {
1199
+ var NEW_ITERATOR_PROTOTYPE = !isObject$3(IteratorPrototype$2) || fails$4(function () {
1200
1200
  var test = {};
1201
1201
  // FF44- legacy iterators case
1202
1202
  return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
@@ -1231,7 +1231,7 @@ var setToStringTag$3 = function (target, TAG, STATIC) {
1231
1231
  };
1232
1232
 
1233
1233
  var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1234
- var create$1 = objectCreate;
1234
+ var create = objectCreate;
1235
1235
  var createPropertyDescriptor = createPropertyDescriptor$3;
1236
1236
  var setToStringTag$2 = setToStringTag$3;
1237
1237
  var Iterators$2 = iterators;
@@ -1240,19 +1240,19 @@ var returnThis$1 = function () { return this; };
1240
1240
 
1241
1241
  var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1242
1242
  var TO_STRING_TAG = NAME + ' Iterator';
1243
- IteratorConstructor.prototype = create$1(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1243
+ IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1244
1244
  setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
1245
1245
  Iterators$2[TO_STRING_TAG] = returnThis$1;
1246
1246
  return IteratorConstructor;
1247
1247
  };
1248
1248
 
1249
- var uncurryThis$6 = functionUncurryThis;
1249
+ var uncurryThis$5 = functionUncurryThis;
1250
1250
  var aCallable$1 = aCallable$3;
1251
1251
 
1252
1252
  var functionUncurryThisAccessor = function (object, key, method) {
1253
1253
  try {
1254
1254
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1255
- return uncurryThis$6(aCallable$1(Object.getOwnPropertyDescriptor(object, key)[method]));
1255
+ return uncurryThis$5(aCallable$1(Object.getOwnPropertyDescriptor(object, key)[method]));
1256
1256
  } catch (error) { /* empty */ }
1257
1257
  };
1258
1258
 
@@ -1301,8 +1301,8 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1301
1301
  };
1302
1302
  }() : undefined);
1303
1303
 
1304
- var $$4 = _export;
1305
- var call$3 = functionCall;
1304
+ var $$3 = _export;
1305
+ var call$2 = functionCall;
1306
1306
  var FunctionName = functionName;
1307
1307
  var isCallable$1 = isCallable$e;
1308
1308
  var createIteratorConstructor = iteratorCreateConstructor;
@@ -1374,7 +1374,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1374
1374
  createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
1375
1375
  } else {
1376
1376
  INCORRECT_VALUES_NAME = true;
1377
- defaultIterator = function values() { return call$3(nativeIterator, this); };
1377
+ defaultIterator = function values() { return call$2(nativeIterator, this); };
1378
1378
  }
1379
1379
  }
1380
1380
 
@@ -1389,7 +1389,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1389
1389
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1390
1390
  defineBuiltIn$1(IterablePrototype, KEY, methods[KEY]);
1391
1391
  }
1392
- } else $$4({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1392
+ } else $$3({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1393
1393
  }
1394
1394
 
1395
1395
  // define iterator
@@ -1418,7 +1418,7 @@ var DESCRIPTORS$1 = descriptors;
1418
1418
 
1419
1419
  var ARRAY_ITERATOR = 'Array Iterator';
1420
1420
  var setInternalState = InternalStateModule.set;
1421
- var getInternalState$1 = InternalStateModule.getterFor(ARRAY_ITERATOR);
1421
+ var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
1422
1422
 
1423
1423
  // `Array.prototype.entries` method
1424
1424
  // https://tc39.es/ecma262/#sec-array.prototype.entries
@@ -1440,7 +1440,7 @@ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind)
1440
1440
  // `%ArrayIteratorPrototype%.next` method
1441
1441
  // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
1442
1442
  }, function () {
1443
- var state = getInternalState$1(this);
1443
+ var state = getInternalState(this);
1444
1444
  var target = state.target;
1445
1445
  var index = state.index++;
1446
1446
  if (!target || index >= target.length) {
@@ -1512,7 +1512,7 @@ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.co
1512
1512
 
1513
1513
  var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1514
1514
 
1515
- var global$4 = global$e;
1515
+ var global$1 = global$b;
1516
1516
  var DOMIterables = domIterables;
1517
1517
  var DOMTokenListPrototype = domTokenListPrototype;
1518
1518
  var ArrayIteratorMethods = es_array_iterator;
@@ -1544,7 +1544,7 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1544
1544
  };
1545
1545
 
1546
1546
  for (var COLLECTION_NAME in DOMIterables) {
1547
- handlePrototype(global$4[COLLECTION_NAME] && global$4[COLLECTION_NAME].prototype, COLLECTION_NAME);
1547
+ handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype, COLLECTION_NAME);
1548
1548
  }
1549
1549
 
1550
1550
  handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
@@ -1600,14 +1600,14 @@ var classof$1 = classof$2;
1600
1600
 
1601
1601
  var $String = String;
1602
1602
 
1603
- var toString$3 = function (argument) {
1603
+ var toString$2 = function (argument) {
1604
1604
  if (classof$1(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
1605
1605
  return $String(argument);
1606
1606
  };
1607
1607
 
1608
- var uncurryThis$5 = functionUncurryThis;
1608
+ var uncurryThis$4 = functionUncurryThis;
1609
1609
 
1610
- var arraySlice$1 = uncurryThis$5([].slice);
1610
+ var arraySlice$1 = uncurryThis$4([].slice);
1611
1611
 
1612
1612
  var arraySlice = arraySlice$1;
1613
1613
 
@@ -1651,11 +1651,11 @@ var sort = function (array, comparefn) {
1651
1651
 
1652
1652
  var arraySort = sort;
1653
1653
 
1654
- var fails$6 = fails$h;
1654
+ var fails$3 = fails$e;
1655
1655
 
1656
1656
  var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
1657
1657
  var method = [][METHOD_NAME];
1658
- return !!method && fails$6(function () {
1658
+ return !!method && fails$3(function () {
1659
1659
  // eslint-disable-next-line no-useless-call -- required for testing
1660
1660
  method.call(null, argument || function () { return 1; }, 1);
1661
1661
  });
@@ -1677,14 +1677,14 @@ var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
1677
1677
 
1678
1678
  var engineWebkitVersion = !!webkit && +webkit[1];
1679
1679
 
1680
- var $$3 = _export;
1681
- var uncurryThis$4 = functionUncurryThis;
1680
+ var $$2 = _export;
1681
+ var uncurryThis$3 = functionUncurryThis;
1682
1682
  var aCallable = aCallable$3;
1683
1683
  var toObject$1 = toObject$4;
1684
1684
  var lengthOfArrayLike = lengthOfArrayLike$2;
1685
1685
  var deletePropertyOrThrow = deletePropertyOrThrow$1;
1686
- var toString$2 = toString$3;
1687
- var fails$5 = fails$h;
1686
+ var toString$1 = toString$2;
1687
+ var fails$2 = fails$e;
1688
1688
  var internalSort = arraySort;
1689
1689
  var arrayMethodIsStrict = arrayMethodIsStrict$1;
1690
1690
  var FF = engineFfVersion;
@@ -1693,21 +1693,21 @@ var V8 = engineV8Version;
1693
1693
  var WEBKIT = engineWebkitVersion;
1694
1694
 
1695
1695
  var test = [];
1696
- var nativeSort = uncurryThis$4(test.sort);
1697
- var push = uncurryThis$4(test.push);
1696
+ var nativeSort = uncurryThis$3(test.sort);
1697
+ var push = uncurryThis$3(test.push);
1698
1698
 
1699
1699
  // IE8-
1700
- var FAILS_ON_UNDEFINED = fails$5(function () {
1700
+ var FAILS_ON_UNDEFINED = fails$2(function () {
1701
1701
  test.sort(undefined);
1702
1702
  });
1703
1703
  // V8 bug
1704
- var FAILS_ON_NULL = fails$5(function () {
1704
+ var FAILS_ON_NULL = fails$2(function () {
1705
1705
  test.sort(null);
1706
1706
  });
1707
1707
  // Old WebKit
1708
1708
  var STRICT_METHOD = arrayMethodIsStrict('sort');
1709
1709
 
1710
- var STABLE_SORT = !fails$5(function () {
1710
+ var STABLE_SORT = !fails$2(function () {
1711
1711
  // feature detection can be too slow, so check engines versions
1712
1712
  if (V8) return V8 < 70;
1713
1713
  if (FF && FF > 3) return;
@@ -1749,13 +1749,13 @@ var getSortCompare = function (comparefn) {
1749
1749
  if (y === undefined) return -1;
1750
1750
  if (x === undefined) return 1;
1751
1751
  if (comparefn !== undefined) return +comparefn(x, y) || 0;
1752
- return toString$2(x) > toString$2(y) ? 1 : -1;
1752
+ return toString$1(x) > toString$1(y) ? 1 : -1;
1753
1753
  };
1754
1754
  };
1755
1755
 
1756
1756
  // `Array.prototype.sort` method
1757
1757
  // https://tc39.es/ecma262/#sec-array.prototype.sort
1758
- $$3({ target: 'Array', proto: true, forced: FORCED }, {
1758
+ $$2({ target: 'Array', proto: true, forced: FORCED }, {
1759
1759
  sort: function sort(comparefn) {
1760
1760
  if (comparefn !== undefined) aCallable(comparefn);
1761
1761
 
@@ -1784,9 +1784,9 @@ $$3({ target: 'Array', proto: true, forced: FORCED }, {
1784
1784
  });
1785
1785
 
1786
1786
  var DESCRIPTORS = descriptors;
1787
- var uncurryThis$3 = functionUncurryThis;
1788
- var call$2 = functionCall;
1789
- var fails$4 = fails$h;
1787
+ var uncurryThis$2 = functionUncurryThis;
1788
+ var call$1 = functionCall;
1789
+ var fails$1 = fails$e;
1790
1790
  var objectKeys = objectKeys$2;
1791
1791
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1792
1792
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
@@ -1797,11 +1797,11 @@ var IndexedObject = indexedObject;
1797
1797
  var $assign = Object.assign;
1798
1798
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1799
1799
  var defineProperty = Object.defineProperty;
1800
- var concat = uncurryThis$3([].concat);
1800
+ var concat = uncurryThis$2([].concat);
1801
1801
 
1802
1802
  // `Object.assign` method
1803
1803
  // https://tc39.es/ecma262/#sec-object.assign
1804
- var objectAssign = !$assign || fails$4(function () {
1804
+ var objectAssign = !$assign || fails$1(function () {
1805
1805
  // should have correct order of operations (Edge bug)
1806
1806
  if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
1807
1807
  enumerable: true,
@@ -1835,18 +1835,18 @@ var objectAssign = !$assign || fails$4(function () {
1835
1835
  var key;
1836
1836
  while (length > j) {
1837
1837
  key = keys[j++];
1838
- if (!DESCRIPTORS || call$2(propertyIsEnumerable, S, key)) T[key] = S[key];
1838
+ if (!DESCRIPTORS || call$1(propertyIsEnumerable, S, key)) T[key] = S[key];
1839
1839
  }
1840
1840
  } return T;
1841
1841
  } : $assign;
1842
1842
 
1843
- var $$2 = _export;
1843
+ var $$1 = _export;
1844
1844
  var assign = objectAssign;
1845
1845
 
1846
1846
  // `Object.assign` method
1847
1847
  // https://tc39.es/ecma262/#sec-object.assign
1848
1848
  // eslint-disable-next-line es/no-object-assign -- required for testing
1849
- $$2({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1849
+ $$1({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1850
1850
  assign: assign
1851
1851
  });
1852
1852
 
@@ -1854,7 +1854,7 @@ var anObject$1 = anObject$6;
1854
1854
 
1855
1855
  // `RegExp.prototype.flags` getter implementation
1856
1856
  // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
1857
- var regexpFlags$1 = function () {
1857
+ var regexpFlags = function () {
1858
1858
  var that = anObject$1(this);
1859
1859
  var result = '';
1860
1860
  if (that.hasIndices) result += 'd';
@@ -1868,31 +1868,31 @@ var regexpFlags$1 = function () {
1868
1868
  return result;
1869
1869
  };
1870
1870
 
1871
- var call$1 = functionCall;
1871
+ var call = functionCall;
1872
1872
  var hasOwn = hasOwnProperty_1;
1873
1873
  var isPrototypeOf = objectIsPrototypeOf;
1874
- var regExpFlags = regexpFlags$1;
1874
+ var regExpFlags = regexpFlags;
1875
1875
 
1876
1876
  var RegExpPrototype$1 = RegExp.prototype;
1877
1877
 
1878
1878
  var regexpGetFlags = function (R) {
1879
1879
  var flags = R.flags;
1880
1880
  return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$1, R)
1881
- ? call$1(regExpFlags, R) : flags;
1881
+ ? call(regExpFlags, R) : flags;
1882
1882
  };
1883
1883
 
1884
1884
  var PROPER_FUNCTION_NAME = functionName.PROPER;
1885
1885
  var defineBuiltIn = defineBuiltIn$4;
1886
1886
  var anObject = anObject$6;
1887
- var $toString = toString$3;
1888
- var fails$3 = fails$h;
1887
+ var $toString = toString$2;
1888
+ var fails = fails$e;
1889
1889
  var getRegExpFlags = regexpGetFlags;
1890
1890
 
1891
1891
  var TO_STRING = 'toString';
1892
1892
  var RegExpPrototype = RegExp.prototype;
1893
1893
  var nativeToString = RegExpPrototype[TO_STRING];
1894
1894
 
1895
- var NOT_GENERIC = fails$3(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
1895
+ var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
1896
1896
  // FF44- RegExp#toString has a wrong name
1897
1897
  var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
1898
1898
 
@@ -1908,13 +1908,13 @@ if (NOT_GENERIC || INCORRECT_NAME) {
1908
1908
  }
1909
1909
 
1910
1910
  var classofRaw = classofRaw$2;
1911
- var uncurryThis$2 = functionUncurryThis;
1911
+ var uncurryThis$1 = functionUncurryThis;
1912
1912
 
1913
1913
  var functionUncurryThisClause = function (fn) {
1914
1914
  // Nashorn bug:
1915
1915
  // https://github.com/zloirock/core-js/issues/1128
1916
1916
  // https://github.com/zloirock/core-js/issues/1130
1917
- if (classofRaw(fn) === 'Function') return uncurryThis$2(fn);
1917
+ if (classofRaw(fn) === 'Function') return uncurryThis$1(fn);
1918
1918
  };
1919
1919
 
1920
1920
  var isObject = isObject$9;
@@ -1956,16 +1956,16 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
1956
1956
  } return false;
1957
1957
  };
1958
1958
 
1959
- var $$1 = _export;
1960
- var uncurryThis$1 = functionUncurryThisClause;
1959
+ var $ = _export;
1960
+ var uncurryThis = functionUncurryThisClause;
1961
1961
  var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
1962
1962
  var toLength = toLength$2;
1963
- var toString$1 = toString$3;
1963
+ var toString = toString$2;
1964
1964
  var notARegExp = notARegexp;
1965
1965
  var requireObjectCoercible = requireObjectCoercible$4;
1966
1966
  var correctIsRegExpLogic = correctIsRegexpLogic;
1967
1967
 
1968
- var stringSlice$1 = uncurryThis$1(''.slice);
1968
+ var stringSlice = uncurryThis(''.slice);
1969
1969
  var min = Math.min;
1970
1970
 
1971
1971
  var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
@@ -1977,196 +1977,16 @@ var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () {
1977
1977
 
1978
1978
  // `String.prototype.startsWith` method
1979
1979
  // https://tc39.es/ecma262/#sec-string.prototype.startswith
1980
- $$1({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
1980
+ $({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
1981
1981
  startsWith: function startsWith(searchString /* , position = 0 */) {
1982
- var that = toString$1(requireObjectCoercible(this));
1982
+ var that = toString(requireObjectCoercible(this));
1983
1983
  notARegExp(searchString);
1984
1984
  var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
1985
- var search = toString$1(searchString);
1986
- return stringSlice$1(that, index, index + search.length) === search;
1985
+ var search = toString(searchString);
1986
+ return stringSlice(that, index, index + search.length) === search;
1987
1987
  }
1988
1988
  });
1989
1989
 
1990
- var fails$2 = fails$h;
1991
- var global$3 = global$e;
1992
-
1993
- // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
1994
- var $RegExp$2 = global$3.RegExp;
1995
-
1996
- var UNSUPPORTED_Y$1 = fails$2(function () {
1997
- var re = $RegExp$2('a', 'y');
1998
- re.lastIndex = 2;
1999
- return re.exec('abcd') !== null;
2000
- });
2001
-
2002
- // UC Browser bug
2003
- // https://github.com/zloirock/core-js/issues/1008
2004
- var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$2(function () {
2005
- return !$RegExp$2('a', 'y').sticky;
2006
- });
2007
-
2008
- var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$2(function () {
2009
- // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
2010
- var re = $RegExp$2('^r', 'gy');
2011
- re.lastIndex = 2;
2012
- return re.exec('str') !== null;
2013
- });
2014
-
2015
- var regexpStickyHelpers = {
2016
- BROKEN_CARET: BROKEN_CARET,
2017
- MISSED_STICKY: MISSED_STICKY,
2018
- UNSUPPORTED_Y: UNSUPPORTED_Y$1
2019
- };
2020
-
2021
- var fails$1 = fails$h;
2022
- var global$2 = global$e;
2023
-
2024
- // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
2025
- var $RegExp$1 = global$2.RegExp;
2026
-
2027
- var regexpUnsupportedDotAll = fails$1(function () {
2028
- var re = $RegExp$1('.', 's');
2029
- return !(re.dotAll && re.test('\n') && re.flags === 's');
2030
- });
2031
-
2032
- var fails = fails$h;
2033
- var global$1 = global$e;
2034
-
2035
- // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
2036
- var $RegExp = global$1.RegExp;
2037
-
2038
- var regexpUnsupportedNcg = fails(function () {
2039
- var re = $RegExp('(?<a>b)', 'g');
2040
- return re.exec('b').groups.a !== 'b' ||
2041
- 'b'.replace(re, '$<a>c') !== 'bc';
2042
- });
2043
-
2044
- /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
2045
- /* eslint-disable regexp/no-useless-quantifier -- testing */
2046
- var call = functionCall;
2047
- var uncurryThis = functionUncurryThis;
2048
- var toString = toString$3;
2049
- var regexpFlags = regexpFlags$1;
2050
- var stickyHelpers = regexpStickyHelpers;
2051
- var shared = shared$4;
2052
- var create = objectCreate;
2053
- var getInternalState = internalState.get;
2054
- var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
2055
- var UNSUPPORTED_NCG = regexpUnsupportedNcg;
2056
-
2057
- var nativeReplace = shared('native-string-replace', String.prototype.replace);
2058
- var nativeExec = RegExp.prototype.exec;
2059
- var patchedExec = nativeExec;
2060
- var charAt = uncurryThis(''.charAt);
2061
- var indexOf = uncurryThis(''.indexOf);
2062
- var replace = uncurryThis(''.replace);
2063
- var stringSlice = uncurryThis(''.slice);
2064
-
2065
- var UPDATES_LAST_INDEX_WRONG = (function () {
2066
- var re1 = /a/;
2067
- var re2 = /b*/g;
2068
- call(nativeExec, re1, 'a');
2069
- call(nativeExec, re2, 'a');
2070
- return re1.lastIndex !== 0 || re2.lastIndex !== 0;
2071
- })();
2072
-
2073
- var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
2074
-
2075
- // nonparticipating capturing group, copied from es5-shim's String#split patch.
2076
- var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
2077
-
2078
- var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
2079
-
2080
- if (PATCH) {
2081
- patchedExec = function exec(string) {
2082
- var re = this;
2083
- var state = getInternalState(re);
2084
- var str = toString(string);
2085
- var raw = state.raw;
2086
- var result, reCopy, lastIndex, match, i, object, group;
2087
-
2088
- if (raw) {
2089
- raw.lastIndex = re.lastIndex;
2090
- result = call(patchedExec, raw, str);
2091
- re.lastIndex = raw.lastIndex;
2092
- return result;
2093
- }
2094
-
2095
- var groups = state.groups;
2096
- var sticky = UNSUPPORTED_Y && re.sticky;
2097
- var flags = call(regexpFlags, re);
2098
- var source = re.source;
2099
- var charsAdded = 0;
2100
- var strCopy = str;
2101
-
2102
- if (sticky) {
2103
- flags = replace(flags, 'y', '');
2104
- if (indexOf(flags, 'g') === -1) {
2105
- flags += 'g';
2106
- }
2107
-
2108
- strCopy = stringSlice(str, re.lastIndex);
2109
- // Support anchored sticky behavior.
2110
- if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) {
2111
- source = '(?: ' + source + ')';
2112
- strCopy = ' ' + strCopy;
2113
- charsAdded++;
2114
- }
2115
- // ^(? + rx + ) is needed, in combination with some str slicing, to
2116
- // simulate the 'y' flag.
2117
- reCopy = new RegExp('^(?:' + source + ')', flags);
2118
- }
2119
-
2120
- if (NPCG_INCLUDED) {
2121
- reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
2122
- }
2123
- if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
2124
-
2125
- match = call(nativeExec, sticky ? reCopy : re, strCopy);
2126
-
2127
- if (sticky) {
2128
- if (match) {
2129
- match.input = stringSlice(match.input, charsAdded);
2130
- match[0] = stringSlice(match[0], charsAdded);
2131
- match.index = re.lastIndex;
2132
- re.lastIndex += match[0].length;
2133
- } else re.lastIndex = 0;
2134
- } else if (UPDATES_LAST_INDEX_WRONG && match) {
2135
- re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
2136
- }
2137
- if (NPCG_INCLUDED && match && match.length > 1) {
2138
- // Fix browsers whose `exec` methods don't consistently return `undefined`
2139
- // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
2140
- call(nativeReplace, match[0], reCopy, function () {
2141
- for (i = 1; i < arguments.length - 2; i++) {
2142
- if (arguments[i] === undefined) match[i] = undefined;
2143
- }
2144
- });
2145
- }
2146
-
2147
- if (match && groups) {
2148
- match.groups = object = create(null);
2149
- for (i = 0; i < groups.length; i++) {
2150
- group = groups[i];
2151
- object[group[0]] = match[group[1]];
2152
- }
2153
- }
2154
-
2155
- return match;
2156
- };
2157
- }
2158
-
2159
- var regexpExec = patchedExec;
2160
-
2161
- var $ = _export;
2162
- var exec = regexpExec;
2163
-
2164
- // `RegExp.prototype.exec` method
2165
- // https://tc39.es/ecma262/#sec-regexp.prototype.exec
2166
- $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
2167
- exec: exec
2168
- });
2169
-
2170
1990
  const FormGroupContext = /*#__PURE__*/createContext({});
2171
1991
  /**
2172
1992
  * context interface to be used isolated or with the context provider
@@ -2215,6 +2035,11 @@ const IsolatedContext = ({
2215
2035
  function submitMultipleFormsByIndex(indexes) {
2216
2036
  return formGroupInstance.current.submitMultipleFormsByIndex(indexes);
2217
2037
  }
2038
+ // useEffect(() => {
2039
+ // return () => {
2040
+ // formGroupInstance.current.destroy();
2041
+ // };
2042
+ // }, []);
2218
2043
  return {
2219
2044
  addFormWithIndex,
2220
2045
  addForm,
@@ -2339,28 +2164,17 @@ const FieldWrapper = ({
2339
2164
  const filteredProps = useMemo(() => {
2340
2165
  let returnProps = {};
2341
2166
  if (props) {
2342
- returnProps = Object.assign({}, props);
2343
- Object.keys(returnProps).forEach(propKey => {
2344
- if (typeof (returnProps === null || returnProps === void 0 ? void 0 : returnProps[propKey]) === 'string' &&
2345
- /**
2346
- * need to check linting on build, this needs to be casted in order to build..
2347
- */
2348
- /\$/.test(returnProps === null || returnProps === void 0 ? void 0 : returnProps[propKey])) {
2349
- delete returnProps[propKey];
2350
- }
2351
- });
2352
- if (mounted) {
2353
- fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.propsSubject$.next(Object.assign(Object.assign({}, fieldInstance.props), returnProps));
2354
- }
2167
+ returnProps = FormField.filterProps(props);
2355
2168
  }
2169
+ if (fieldInstance) fieldInstance.props = returnProps;
2356
2170
  return returnProps;
2357
2171
  }, [props]);
2358
2172
  const [valueState, setValueState] = useState((fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.stateValue) || {
2359
2173
  [((_a = mapper === null || mapper === void 0 ? void 0 : mapper.events) === null || _a === void 0 ? void 0 : _a.setValue) || 'value']: ''
2360
2174
  });
2361
2175
  const [state, setState] = useState({
2362
- visibility: visibility,
2363
- props: (fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.props) || filteredProps
2176
+ visibility: typeof visibility === 'boolean' ? visibility : true,
2177
+ props: filteredProps
2364
2178
  });
2365
2179
  /**
2366
2180
  * handles the mounting and unmounting logic onto the field instance
@@ -2457,101 +2271,28 @@ const FieldWrapper = ({
2457
2271
  }) : jsx(Fragment, {});
2458
2272
  };
2459
2273
 
2460
- /**
2461
- * recursive function to transform form fields from a form instance into
2462
- * a react component tree
2463
- *
2464
- * @param {Map<string,IFormField>} param.fields form instance field Map
2465
- * @param {string} param.prevPath previous field path to track the tree branch creation
2466
- * @param {string} param.formIndex form index to aid field identification onto the FieldWrapper
2467
- * @returns {ReactNode}
2468
- */
2469
- const BuildTree = ({
2470
- fields,
2471
- prevPath,
2472
- formIndex
2274
+ const BuildSchemaAsFields = ({
2275
+ components,
2276
+ mappers,
2277
+ formIndex,
2278
+ mountedForm
2473
2279
  }) => {
2474
- const tree = Array.from(fields).sort(([, field], [, field2]) => {
2475
- var _a, _b;
2476
- return (((_a = field.originalSchema) === null || _a === void 0 ? void 0 : _a.order) || 0) - (((_b = field2.originalSchema) === null || _b === void 0 ? void 0 : _b.order) || 0);
2477
- }).filter(([, value]) => {
2478
- return value.path === prevPath;
2479
- }).map(([, value]) => {
2480
- const fieldName = value.name;
2481
- const children = BuildTree({
2482
- fields,
2483
- prevPath: `${prevPath ? `${prevPath}.` : ``}${value.name}`,
2484
- formIndex
2485
- });
2486
- const lenght = Children.count(children);
2487
- return jsx(FieldWrapper, {
2488
- name: fieldName,
2280
+ return components && components.map(component => {
2281
+ const mapper = mappers === null || mappers === void 0 ? void 0 : mappers.find(el => el.componentName === component.component);
2282
+ return mapper ? jsx(AsFormFieldBuilder, Object.assign({
2489
2283
  formIndex: formIndex,
2490
- visibility: value.visibility,
2491
- children: lenght > 0 ? children : null
2492
- }, fieldName);
2493
- });
2494
- console.log(tree);
2495
- return tree;
2496
- };
2497
- /**
2498
- * function to transform AsFormField elements onto a JSON schema
2499
- *
2500
- * @param param.children ReactNode children elements
2501
- * @returns {IComponentSchema[] | null | undefined}
2502
- */
2503
- const BuildAsFormFieldTree = ({
2504
- children
2505
- }) => {
2506
- return Children.map(children, (child, index) => {
2507
- var _a, _b, _c, _d, _e;
2508
- let struct;
2509
- if (!String((_a = child === null || child === void 0 ? void 0 : child.type) === null || _a === void 0 ? void 0 : _a.name).startsWith('AsFormField')) {
2510
- if (typeof child.type === 'function' || typeof child.type === 'object') {
2511
- const props = Object.assign({}, child.props);
2512
- delete props.children;
2513
- struct = {
2514
- component: ((_b = child === null || child === void 0 ? void 0 : child.type) === null || _b === void 0 ? void 0 : _b.name) || 'customForwardRef',
2515
- name: `adapter-${Math.floor(Math.random() * Date.now()).toString(16)}`,
2516
- mapper: {
2517
- component: child.type,
2518
- componentName: typeof child.type !== 'string' ? (_c = child === null || child === void 0 ? void 0 : child.type) === null || _c === void 0 ? void 0 : _c.name : child.type
2519
- },
2520
- props
2521
- };
2522
- } else if (typeof child.type === 'string' || typeof child === 'string') {
2523
- throw new Error(`Only function components works inside a Form as React Nodes,\n
2524
- if you want something like this to work: <div>hi</div>\n
2525
- wrap it onto a function component\n
2526
- const CustomTextNode = (props:{text:string}) => <div>props</div>\n
2527
- and use it like <CustomTextNode text="hi"/>`);
2528
- } else {
2529
- throw {
2530
- message: `Unknown error occured, please check the child that was tried to render below`,
2531
- component: child
2532
- };
2533
- }
2534
- } else {
2535
- if (((_d = child === null || child === void 0 ? void 0 : child.type) === null || _d === void 0 ? void 0 : _d.name) === 'AsFormField') {
2536
- struct = Object.assign({}, child.props);
2537
- } else {
2538
- if (!child.type.defaultProps.component) throw new Error(`set defaultProps component name\n
2539
- ex: AsFormFieldInput.defaultProps = {
2540
- component = 'input'
2541
- }`);
2542
- struct = Object.assign(Object.assign({}, child.props), child.type.defaultProps);
2543
- }
2544
- }
2545
- if (struct && (struct === null || struct === void 0 ? void 0 : struct.children)) {
2546
- delete struct.children;
2547
- }
2548
- struct.order = index;
2549
- const childElements = BuildAsFormFieldTree({
2550
- children: (_e = child.props) === null || _e === void 0 ? void 0 : _e.children
2551
- });
2552
- return Object.assign(Object.assign({}, struct), childElements && {
2553
- children: childElements
2554
- });
2284
+ mapper: mapper,
2285
+ formMounted: mountedForm
2286
+ }, component, {
2287
+ children: component.children && component.children.length > 0 && jsx(BuildSchemaAsFields, {
2288
+ formIndex: formIndex,
2289
+ mappers: mappers,
2290
+ components: component.children,
2291
+ mountedForm: mountedForm
2292
+ })
2293
+ }), component.name) : jsx("div", {
2294
+ children: `component mapper not found for ${component.component} from field name ${component.name} on form ${formIndex}`
2295
+ }, component.name);
2555
2296
  });
2556
2297
  };
2557
2298
 
@@ -2730,92 +2471,70 @@ function Form({
2730
2471
  children
2731
2472
  }) {
2732
2473
  const {
2733
- addForm,
2734
- removeForm,
2735
2474
  getForm,
2736
2475
  mappers,
2737
2476
  debugMode,
2738
2477
  formGroupInstance
2739
2478
  } = useFormGroupContext({});
2740
- const [tree, setTree] = useState();
2741
- const schemaIndex = useMemo(() => index || (schema === null || schema === void 0 ? void 0 : schema.index) || 'defaultChange', [index, schema]);
2742
- /**
2743
- * logic to initialize the form instance and it's removal
2744
- */
2479
+ const schemaIndex = useRef(index || (schema === null || schema === void 0 ? void 0 : schema.index) || 'defaultChange').current;
2480
+ const [mounted, setMounted] = useState(false);
2481
+ // const formInstance = useRef(
2482
+ // new FormCore({
2483
+ // schema,
2484
+ // initialValues: initialValues || schema?.initialValues,
2485
+ // iVars: iVars || schema?.iVars,
2486
+ // action: action || schema?.action,
2487
+ // method: method || schema?.method,
2488
+ // index: schemaIndex,
2489
+ // mappers,
2490
+ // config: config || formGroupInstance.config,
2491
+ // })
2492
+ // );
2745
2493
  useEffect(() => {
2746
- if (schemaIndex === 'defaultChange') {
2747
- console.warn('please, add an unique id to the form, otherwise multiple forms will break');
2748
- }
2749
- const formInstance = new FormCore({
2750
- schema,
2751
- initialValues: initialValues || (schema === null || schema === void 0 ? void 0 : schema.initialValues),
2752
- iVars: iVars || (schema === null || schema === void 0 ? void 0 : schema.iVars),
2753
- action: action || (schema === null || schema === void 0 ? void 0 : schema.action),
2754
- method: method || (schema === null || schema === void 0 ? void 0 : schema.method),
2755
- index: schemaIndex,
2756
- mappers,
2757
- config: config || formGroupInstance.config
2758
- });
2759
- addForm({
2494
+ // if (!schema) {
2495
+ formGroupInstance.addForm({
2760
2496
  key: schemaIndex,
2761
- formInstance
2497
+ formInstance: new FormCore({
2498
+ schema,
2499
+ initialValues: initialValues || (schema === null || schema === void 0 ? void 0 : schema.initialValues),
2500
+ iVars: iVars || (schema === null || schema === void 0 ? void 0 : schema.iVars),
2501
+ action: action || (schema === null || schema === void 0 ? void 0 : schema.action),
2502
+ method: method || (schema === null || schema === void 0 ? void 0 : schema.method),
2503
+ index: schemaIndex,
2504
+ mappers,
2505
+ config: config || formGroupInstance.config
2506
+ })
2762
2507
  });
2763
- let subMounted;
2764
- if (onFormMount) {
2765
- subMounted = formInstance.subscribeOnMount(onFormMount);
2766
- }
2767
- formInstance === null || formInstance === void 0 ? void 0 : formInstance.mounted();
2768
- /*
2769
- @TODO check if form instance is killed each time it is unmounted
2770
- the management of multiple forms needs to be planned
2771
- */
2772
- return () => {
2773
- subMounted === null || subMounted === void 0 ? void 0 : subMounted.unsubscribe();
2774
- removeForm({
2775
- key: schemaIndex
2776
- });
2777
- };
2508
+ setMounted(true);
2509
+ // }
2778
2510
  }, []);
2779
- /**
2780
- * logic to transform AsFormFields onto JSON schema
2781
- * and JSON schema onto FieldWrappers, refreshes when
2782
- * the react tree changes it's children
2783
- */
2784
- useEffect(() => {
2785
- var _a;
2786
- const schema = BuildAsFormFieldTree({
2787
- children
2788
- });
2789
- schema && getForm({
2790
- key: index
2791
- }).refreshFields(schema);
2792
- const fields = (_a = getForm({
2793
- key: index
2794
- })) === null || _a === void 0 ? void 0 : _a.fields;
2795
- if (fields) {
2796
- const buildTree = BuildTree({
2797
- fields,
2798
- formIndex: index
2799
- });
2800
- setTree(buildTree);
2801
- }
2802
- }, [children]);
2511
+ // useEffect(() => {
2512
+ // return () => {
2513
+ // formGroupInstance.getForm({ key: schemaIndex })?.destroy();
2514
+ // };
2515
+ // }, []);
2803
2516
  /**
2804
2517
  * iVars change tracker to update iVars onto form instance
2805
2518
  */
2806
2519
  useEffect(() => {
2807
- if (iVars) getForm({
2808
- key: schemaIndex
2809
- }).iVars = iVars;
2810
- }, [iVars]);
2520
+ if (!formGroupInstance.forms.has(schemaIndex)) {
2521
+ console.log('failed to add iVars due to no form instance');
2522
+ return;
2523
+ }
2524
+ if (iVars && mounted) formGroupInstance.forms.get(schemaIndex).iVars = iVars;
2525
+ // if (iVars) formInstance.current.iVars = iVars;
2526
+ }, [iVars, mounted]);
2811
2527
  /**
2812
2528
  * initialValues setter for async initialValues
2813
2529
  */
2814
2530
  useEffect(() => {
2815
- if (initialValues) getForm({
2816
- key: schemaIndex
2817
- }).setInitialValues(initialValues);
2818
- }, [initialValues]);
2531
+ if (!formGroupInstance.forms.has(schemaIndex)) {
2532
+ console.log('failed to add initialValues due to no form instance');
2533
+ return;
2534
+ }
2535
+ if (initialValues && mounted) formGroupInstance.forms.get(schemaIndex).initialValues = initialValues;
2536
+ // if (initialValues) formInstance.current.initialValues = initialValues;
2537
+ }, [initialValues, mounted]);
2819
2538
  /**
2820
2539
  * hook usage to keep event bindings updated on callback functions passed as props
2821
2540
  */
@@ -2880,12 +2599,11 @@ function Form({
2880
2599
  }), jsx("br", {}), jsx("hr", {})]
2881
2600
  }), jsx("form", {
2882
2601
  onSubmit: handleSubmit,
2883
- children: BuildTree({
2884
- fields: FormCore.serializeStructure({
2885
- mappers: mappers || [],
2886
- struct: schema === null || schema === void 0 ? void 0 : schema.components
2887
- }),
2888
- formIndex: schemaIndex
2602
+ children: jsx(BuildSchemaAsFields, {
2603
+ formIndex: schemaIndex,
2604
+ mappers: mappers,
2605
+ components: schema === null || schema === void 0 ? void 0 : schema.components,
2606
+ mountedForm: mounted
2889
2607
  })
2890
2608
  })]
2891
2609
  });
@@ -2917,6 +2635,7 @@ const AsFormFieldBuilder = props => {
2917
2635
  * state to track the field instance creation process
2918
2636
  */
2919
2637
  const [mounted, setMounted] = useState(false);
2638
+ const mountedRef = useRef(false);
2920
2639
  /**
2921
2640
  * initializer to create or add a form instance to the formGroup by it's formId
2922
2641
  * and add the field to the form instance
@@ -2924,22 +2643,30 @@ const AsFormFieldBuilder = props => {
2924
2643
  */
2925
2644
  useEffect(() => {
2926
2645
  var _a;
2927
- if (!((_a = context.formGroupInstance) === null || _a === void 0 ? void 0 : _a.forms.has(props.formIndex))) {
2646
+ if (typeof props.formMounted === 'undefined' && !((_a = context.formGroupInstance) === null || _a === void 0 ? void 0 : _a.forms.has(props.formIndex))) {
2928
2647
  context.addFormWithIndex(props.formIndex);
2929
2648
  }
2930
- const fieldSchema = Object.assign(Object.assign({}, props), {
2931
- component: props.mapper.componentName,
2932
- children: undefined
2933
- });
2934
- const formInstance = context.formGroupInstance.forms.get(props.formIndex);
2935
- formInstance === null || formInstance === void 0 ? void 0 : formInstance.addField({
2936
- fieldSchema,
2937
- mapperElement: props.mapper
2938
- });
2939
- setMounted(true);
2940
- return () => formInstance === null || formInstance === void 0 ? void 0 : formInstance.removeField({
2941
- key: props.name
2942
- });
2649
+ if (props.formMounted || typeof props.formMounted === 'undefined') {
2650
+ const fieldSchema = Object.assign(Object.assign({}, props), {
2651
+ component: props.mapper.componentName,
2652
+ children: undefined
2653
+ });
2654
+ const formInstance = context.formGroupInstance.forms.get(props.formIndex);
2655
+ formInstance === null || formInstance === void 0 ? void 0 : formInstance.addField({
2656
+ fieldSchema,
2657
+ mapperElement: props.mapper
2658
+ });
2659
+ setMounted(true);
2660
+ mountedRef.current = true;
2661
+ }
2662
+ }, [props.formMounted]);
2663
+ useEffect(() => {
2664
+ return () => {
2665
+ mountedRef.current && context.formGroupInstance.removeField({
2666
+ formIndex: props.formIndex,
2667
+ fieldIndex: props.name
2668
+ });
2669
+ };
2943
2670
  }, []);
2944
2671
  /**
2945
2672
  * allows to control field selected value on each event
@@ -2964,7 +2691,7 @@ const AsFormFieldBuilder = props => {
2964
2691
  context: !context.active ? context : null,
2965
2692
  mounted: mounted,
2966
2693
  mapper: props.mapper,
2967
- visibility: props.visibility || true,
2694
+ visibility: props.visibility,
2968
2695
  children: props.children && props.children
2969
2696
  });
2970
2697
  };