bhl-forms 0.2.9 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/bhl-forms.es.js +1020 -593
  2. package/dist/bhl-forms.iife.js +7 -7
  3. package/dist/bhl-forms.modern.es.js +3160 -2662
  4. package/dist/bhl-forms.modern.iife.js +10 -10
  5. package/dist/bhl-forms.modern.umd.js +10 -10
  6. package/dist/bhl-forms.umd.js +7 -7
  7. package/dist/forms/accidentsAndInjuries.es.js +49 -113
  8. package/dist/forms/accidentsAndInjuries.iife.js +1 -1
  9. package/dist/forms/accidentsAndInjuries.json +1 -1
  10. package/dist/forms/appraisals.es.js +3 -7
  11. package/dist/forms/appraisals.iife.js +1 -1
  12. package/dist/forms/appraisals.json +1 -1
  13. package/dist/forms/childAndFamily.es.js +49 -113
  14. package/dist/forms/childAndFamily.iife.js +1 -1
  15. package/dist/forms/childAndFamily.json +1 -1
  16. package/dist/forms/civilLawsuit.es.js +51 -114
  17. package/dist/forms/civilLawsuit.iife.js +1 -1
  18. package/dist/forms/civilLawsuit.json +1 -1
  19. package/dist/forms/coins.es.js +3 -7
  20. package/dist/forms/coins.iife.js +1 -1
  21. package/dist/forms/coins.json +1 -1
  22. package/dist/forms/contracts.es.js +14 -78
  23. package/dist/forms/contracts.iife.js +1 -1
  24. package/dist/forms/contracts.json +1 -1
  25. package/dist/forms/criminal.es.js +180 -380
  26. package/dist/forms/criminal.iife.js +1 -1
  27. package/dist/forms/criminal.json +1 -1
  28. package/dist/forms/employmentAndWorkplace.es.js +43 -107
  29. package/dist/forms/employmentAndWorkplace.iife.js +1 -1
  30. package/dist/forms/employmentAndWorkplace.json +1 -1
  31. package/dist/forms/generalLegal.es.js +191 -477
  32. package/dist/forms/generalLegal.iife.js +1 -1
  33. package/dist/forms/generalLegal.json +1 -1
  34. package/dist/forms/generalLegalPopUnder.es.js +188 -390
  35. package/dist/forms/generalLegalPopUnder.iife.js +1 -1
  36. package/dist/forms/generalLegalPopUnder.json +1 -1
  37. package/dist/forms/generalLegalPopUnderTF.es.js +180 -383
  38. package/dist/forms/generalLegalPopUnderTF.iife.js +1 -1
  39. package/dist/forms/generalLegalPopUnderTF.json +1 -1
  40. package/dist/forms/generalLegalThankYou.es.js +180 -383
  41. package/dist/forms/generalLegalThankYou.iife.js +1 -1
  42. package/dist/forms/generalLegalThankYou.json +1 -1
  43. package/dist/forms/harassmentAndDiscrimination.es.js +14 -78
  44. package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
  45. package/dist/forms/harassmentAndDiscrimination.json +1 -1
  46. package/dist/forms/malpractice.es.js +21 -85
  47. package/dist/forms/malpractice.iife.js +1 -1
  48. package/dist/forms/malpractice.json +1 -1
  49. package/dist/forms/mechanics.es.js +3 -7
  50. package/dist/forms/mechanics.iife.js +1 -1
  51. package/dist/forms/mechanics.json +1 -1
  52. package/dist/forms/realEstate.es.js +180 -380
  53. package/dist/forms/realEstate.iife.js +1 -1
  54. package/dist/forms/realEstate.json +1 -1
  55. package/dist/forms/repossession.es.js +16 -80
  56. package/dist/forms/repossession.iife.js +1 -1
  57. package/dist/forms/repossession.json +1 -1
  58. package/dist/forms/ssdi.es.js +24 -145
  59. package/dist/forms/ssdi.iife.js +1 -1
  60. package/dist/forms/ssdi.json +1 -1
  61. package/dist/forms/testForm.es.js +4 -68
  62. package/dist/forms/testForm.iife.js +1 -1
  63. package/dist/forms/testForm.json +1 -1
  64. package/dist/forms/testRedirects.es.js +3 -11
  65. package/dist/forms/testRedirects.iife.js +1 -1
  66. package/dist/forms/testRedirects.json +1 -1
  67. package/dist/forms/vets.es.js +3 -7
  68. package/dist/forms/vets.iife.js +1 -1
  69. package/dist/forms/vets.json +1 -1
  70. package/dist/forms/willsAndTrusts.es.js +42 -106
  71. package/dist/forms/willsAndTrusts.iife.js +1 -1
  72. package/dist/forms/willsAndTrusts.json +1 -1
  73. package/dist/main.css +1 -1
  74. package/package.json +4 -4
@@ -52,16 +52,16 @@ var __async = (__this, __arguments, generator) => {
52
52
  function makeMap(str, expectsLowerCase) {
53
53
  const map = /* @__PURE__ */ Object.create(null);
54
54
  const list2 = str.split(",");
55
- for (let i3 = 0; i3 < list2.length; i3++) {
56
- map[list2[i3]] = true;
55
+ for (let i2 = 0; i2 < list2.length; i2++) {
56
+ map[list2[i2]] = true;
57
57
  }
58
58
  return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];
59
59
  }
60
60
  function normalizeStyle(value) {
61
61
  if (isArray(value)) {
62
62
  const res = {};
63
- for (let i3 = 0; i3 < value.length; i3++) {
64
- const item = value[i3];
63
+ for (let i2 = 0; i2 < value.length; i2++) {
64
+ const item = value[i2];
65
65
  const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
66
66
  if (normalized) {
67
67
  for (const key in normalized) {
@@ -72,7 +72,7 @@ function normalizeStyle(value) {
72
72
  return res;
73
73
  } else if (isString(value)) {
74
74
  return value;
75
- } else if (isObject$1(value)) {
75
+ } else if (isObject$2(value)) {
76
76
  return value;
77
77
  }
78
78
  }
@@ -94,13 +94,13 @@ function normalizeClass(value) {
94
94
  if (isString(value)) {
95
95
  res = value;
96
96
  } else if (isArray(value)) {
97
- for (let i3 = 0; i3 < value.length; i3++) {
98
- const normalized = normalizeClass(value[i3]);
97
+ for (let i2 = 0; i2 < value.length; i2++) {
98
+ const normalized = normalizeClass(value[i2]);
99
99
  if (normalized) {
100
100
  res += normalized + " ";
101
101
  }
102
102
  }
103
- } else if (isObject$1(value)) {
103
+ } else if (isObject$2(value)) {
104
104
  for (const name in value) {
105
105
  if (value[name]) {
106
106
  res += name + " ";
@@ -115,7 +115,7 @@ function includeBooleanAttr(value) {
115
115
  return !!value || value === "";
116
116
  }
117
117
  const toDisplayString = (val) => {
118
- return isString(val) ? val : val == null ? "" : isArray(val) || isObject$1(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);
118
+ return isString(val) ? val : val == null ? "" : isArray(val) || isObject$2(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);
119
119
  };
120
120
  const replacer = (_key, val) => {
121
121
  if (val && val.__v_isRef) {
@@ -131,7 +131,7 @@ const replacer = (_key, val) => {
131
131
  return {
132
132
  [`Set(${val.size})`]: [...val.values()]
133
133
  };
134
- } else if (isObject$1(val) && !isArray(val) && !isPlainObject(val)) {
134
+ } else if (isObject$2(val) && !isArray(val) && !isPlainObject(val)) {
135
135
  return String(val);
136
136
  }
137
137
  return val;
@@ -144,11 +144,11 @@ const NO = () => false;
144
144
  const onRE = /^on[^a-z]/;
145
145
  const isOn = (key) => onRE.test(key);
146
146
  const isModelListener = (key) => key.startsWith("onUpdate:");
147
- const extend$1 = Object.assign;
147
+ const extend$3 = Object.assign;
148
148
  const remove = (arr, el) => {
149
- const i3 = arr.indexOf(el);
150
- if (i3 > -1) {
151
- arr.splice(i3, 1);
149
+ const i2 = arr.indexOf(el);
150
+ if (i2 > -1) {
151
+ arr.splice(i2, 1);
152
152
  }
153
153
  };
154
154
  const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
@@ -159,9 +159,9 @@ const isSet = (val) => toTypeString(val) === "[object Set]";
159
159
  const isFunction = (val) => typeof val === "function";
160
160
  const isString = (val) => typeof val === "string";
161
161
  const isSymbol = (val) => typeof val === "symbol";
162
- const isObject$1 = (val) => val !== null && typeof val === "object";
162
+ const isObject$2 = (val) => val !== null && typeof val === "object";
163
163
  const isPromise = (val) => {
164
- return isObject$1(val) && isFunction(val.then) && isFunction(val.catch);
164
+ return isObject$2(val) && isFunction(val.then) && isFunction(val.catch);
165
165
  };
166
166
  const objectToString = Object.prototype.toString;
167
167
  const toTypeString = (value) => objectToString.call(value);
@@ -190,8 +190,8 @@ const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + st
190
190
  const toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``);
191
191
  const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
192
192
  const invokeArrayFns = (fns, arg) => {
193
- for (let i3 = 0; i3 < fns.length; i3++) {
194
- fns[i3](arg);
193
+ for (let i2 = 0; i2 < fns.length; i2++) {
194
+ fns[i2](arg);
195
195
  }
196
196
  };
197
197
  const def = (obj, key, value) => {
@@ -243,16 +243,16 @@ class EffectScope {
243
243
  }
244
244
  stop(fromParent) {
245
245
  if (this._active) {
246
- let i3, l;
247
- for (i3 = 0, l = this.effects.length; i3 < l; i3++) {
248
- this.effects[i3].stop();
246
+ let i2, l;
247
+ for (i2 = 0, l = this.effects.length; i2 < l; i2++) {
248
+ this.effects[i2].stop();
249
249
  }
250
- for (i3 = 0, l = this.cleanups.length; i3 < l; i3++) {
251
- this.cleanups[i3]();
250
+ for (i2 = 0, l = this.cleanups.length; i2 < l; i2++) {
251
+ this.cleanups[i2]();
252
252
  }
253
253
  if (this.scopes) {
254
- for (i3 = 0, l = this.scopes.length; i3 < l; i3++) {
255
- this.scopes[i3].stop(true);
254
+ for (i2 = 0, l = this.scopes.length; i2 < l; i2++) {
255
+ this.scopes[i2].stop(true);
256
256
  }
257
257
  }
258
258
  if (!this.detached && this.parent && !fromParent) {
@@ -285,8 +285,8 @@ const wasTracked = (dep) => (dep.w & trackOpBit) > 0;
285
285
  const newTracked = (dep) => (dep.n & trackOpBit) > 0;
286
286
  const initDepMarkers = ({ deps }) => {
287
287
  if (deps.length) {
288
- for (let i3 = 0; i3 < deps.length; i3++) {
289
- deps[i3].w |= trackOpBit;
288
+ for (let i2 = 0; i2 < deps.length; i2++) {
289
+ deps[i2].w |= trackOpBit;
290
290
  }
291
291
  }
292
292
  };
@@ -294,8 +294,8 @@ const finalizeDepMarkers = (effect) => {
294
294
  const { deps } = effect;
295
295
  if (deps.length) {
296
296
  let ptr = 0;
297
- for (let i3 = 0; i3 < deps.length; i3++) {
298
- const dep = deps[i3];
297
+ for (let i2 = 0; i2 < deps.length; i2++) {
298
+ const dep = deps[i2];
299
299
  if (wasTracked(dep) && !newTracked(dep)) {
300
300
  dep.delete(effect);
301
301
  } else {
@@ -374,8 +374,8 @@ class ReactiveEffect {
374
374
  function cleanupEffect(effect) {
375
375
  const { deps } = effect;
376
376
  if (deps.length) {
377
- for (let i3 = 0; i3 < deps.length; i3++) {
378
- deps[i3].delete(effect);
377
+ for (let i2 = 0; i2 < deps.length; i2++) {
378
+ deps[i2].delete(effect);
379
379
  }
380
380
  deps.length = 0;
381
381
  }
@@ -511,7 +511,7 @@ const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`
511
511
  const builtInSymbols = new Set(
512
512
  /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
513
513
  );
514
- const get$1$1 = /* @__PURE__ */ createGetter();
514
+ const get$1 = /* @__PURE__ */ createGetter();
515
515
  const shallowGet = /* @__PURE__ */ createGetter(false, true);
516
516
  const readonlyGet = /* @__PURE__ */ createGetter(true);
517
517
  const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();
@@ -520,8 +520,8 @@ function createArrayInstrumentations() {
520
520
  ["includes", "indexOf", "lastIndexOf"].forEach((key) => {
521
521
  instrumentations[key] = function(...args) {
522
522
  const arr = toRaw(this);
523
- for (let i3 = 0, l = this.length; i3 < l; i3++) {
524
- track(arr, "get", i3 + "");
523
+ for (let i2 = 0, l = this.length; i2 < l; i2++) {
524
+ track(arr, "get", i2 + "");
525
525
  }
526
526
  const res = arr[key](...args);
527
527
  if (res === -1 || res === false) {
@@ -579,7 +579,7 @@ function createGetter(isReadonly2 = false, shallow = false) {
579
579
  if (isRef(res)) {
580
580
  return targetIsArray && isIntegerKey(key) ? res : res.value;
581
581
  }
582
- if (isObject$1(res)) {
582
+ if (isObject$2(res)) {
583
583
  return isReadonly2 ? readonly(res) : reactive(res);
584
584
  }
585
585
  return res;
@@ -636,7 +636,7 @@ function ownKeys(target) {
636
636
  return Reflect.ownKeys(target);
637
637
  }
638
638
  const mutableHandlers = {
639
- get: get$1$1,
639
+ get: get$1,
640
640
  set: set$1,
641
641
  deleteProperty,
642
642
  has: has$1,
@@ -651,7 +651,7 @@ const readonlyHandlers = {
651
651
  return true;
652
652
  }
653
653
  };
654
- const shallowReactiveHandlers = /* @__PURE__ */ extend$1({}, mutableHandlers, {
654
+ const shallowReactiveHandlers = /* @__PURE__ */ extend$3({}, mutableHandlers, {
655
655
  get: shallowGet,
656
656
  set: shallowSet
657
657
  });
@@ -920,7 +920,7 @@ function readonly(target) {
920
920
  return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);
921
921
  }
922
922
  function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
923
- if (!isObject$1(target)) {
923
+ if (!isObject$2(target)) {
924
924
  return target;
925
925
  }
926
926
  if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
@@ -961,8 +961,8 @@ function markRaw(value) {
961
961
  def(value, "__v_skip", true);
962
962
  return value;
963
963
  }
964
- const toReactive = (value) => isObject$1(value) ? reactive(value) : value;
965
- const toReadonly = (value) => isObject$1(value) ? readonly(value) : value;
964
+ const toReactive = (value) => isObject$2(value) ? reactive(value) : value;
965
+ const toReadonly = (value) => isObject$2(value) ? readonly(value) : value;
966
966
  function trackRefValue(ref2) {
967
967
  if (shouldTrack && activeEffect) {
968
968
  ref2 = toRaw(ref2);
@@ -1126,8 +1126,8 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
1126
1126
  return res;
1127
1127
  }
1128
1128
  const values = [];
1129
- for (let i3 = 0; i3 < fn.length; i3++) {
1130
- values.push(callWithAsyncErrorHandling(fn[i3], instance, type, args));
1129
+ for (let i2 = 0; i2 < fn.length; i2++) {
1130
+ values.push(callWithAsyncErrorHandling(fn[i2], instance, type, args));
1131
1131
  }
1132
1132
  return values;
1133
1133
  }
@@ -1140,8 +1140,8 @@ function handleError(err, instance, type, throwInDev = true) {
1140
1140
  while (cur) {
1141
1141
  const errorCapturedHooks = cur.ec;
1142
1142
  if (errorCapturedHooks) {
1143
- for (let i3 = 0; i3 < errorCapturedHooks.length; i3++) {
1144
- if (errorCapturedHooks[i3](err, exposedInstance, errorInfo) === false) {
1143
+ for (let i2 = 0; i2 < errorCapturedHooks.length; i2++) {
1144
+ if (errorCapturedHooks[i2](err, exposedInstance, errorInfo) === false) {
1145
1145
  return;
1146
1146
  }
1147
1147
  }
@@ -1201,9 +1201,9 @@ function queueFlush() {
1201
1201
  }
1202
1202
  }
1203
1203
  function invalidateJob(job) {
1204
- const i3 = queue.indexOf(job);
1205
- if (i3 > flushIndex) {
1206
- queue.splice(i3, 1);
1204
+ const i2 = queue.indexOf(job);
1205
+ if (i2 > flushIndex) {
1206
+ queue.splice(i2, 1);
1207
1207
  }
1208
1208
  }
1209
1209
  function queuePostFlushCb(cb) {
@@ -1216,12 +1216,12 @@ function queuePostFlushCb(cb) {
1216
1216
  }
1217
1217
  queueFlush();
1218
1218
  }
1219
- function flushPreFlushCbs(seen, i3 = isFlushing ? flushIndex + 1 : 0) {
1220
- for (; i3 < queue.length; i3++) {
1221
- const cb = queue[i3];
1219
+ function flushPreFlushCbs(seen, i2 = isFlushing ? flushIndex + 1 : 0) {
1220
+ for (; i2 < queue.length; i2++) {
1221
+ const cb = queue[i2];
1222
1222
  if (cb && cb.pre) {
1223
- queue.splice(i3, 1);
1224
- i3--;
1223
+ queue.splice(i2, 1);
1224
+ i2--;
1225
1225
  cb();
1226
1226
  }
1227
1227
  }
@@ -1288,11 +1288,11 @@ function emit$3(instance, event, ...rawArgs) {
1288
1288
  const modelArg = isModelListener2 && event.slice(7);
1289
1289
  if (modelArg && modelArg in props2) {
1290
1290
  const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`;
1291
- const { number: number3, trim } = props2[modifiersKey] || EMPTY_OBJ;
1291
+ const { number: number4, trim } = props2[modifiersKey] || EMPTY_OBJ;
1292
1292
  if (trim) {
1293
1293
  args = rawArgs.map((a3) => isString(a3) ? a3.trim() : a3);
1294
1294
  }
1295
- if (number3) {
1295
+ if (number4) {
1296
1296
  args = rawArgs.map(looseToNumber);
1297
1297
  }
1298
1298
  }
@@ -1329,7 +1329,7 @@ function normalizeEmitsOptions(comp, appContext, asMixin = false) {
1329
1329
  const normalizedFromExtend = normalizeEmitsOptions(raw3, appContext, true);
1330
1330
  if (normalizedFromExtend) {
1331
1331
  hasExtends = true;
1332
- extend$1(normalized, normalizedFromExtend);
1332
+ extend$3(normalized, normalizedFromExtend);
1333
1333
  }
1334
1334
  };
1335
1335
  if (!asMixin && appContext.mixins.length) {
@@ -1343,7 +1343,7 @@ function normalizeEmitsOptions(comp, appContext, asMixin = false) {
1343
1343
  }
1344
1344
  }
1345
1345
  if (!raw2 && !hasExtends) {
1346
- if (isObject$1(comp)) {
1346
+ if (isObject$2(comp)) {
1347
1347
  cache.set(comp, null);
1348
1348
  }
1349
1349
  return null;
@@ -1351,9 +1351,9 @@ function normalizeEmitsOptions(comp, appContext, asMixin = false) {
1351
1351
  if (isArray(raw2)) {
1352
1352
  raw2.forEach((key) => normalized[key] = null);
1353
1353
  } else {
1354
- extend$1(normalized, raw2);
1354
+ extend$3(normalized, raw2);
1355
1355
  }
1356
- if (isObject$1(comp)) {
1356
+ if (isObject$2(comp)) {
1357
1357
  cache.set(comp, normalized);
1358
1358
  }
1359
1359
  return normalized;
@@ -1500,8 +1500,8 @@ function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
1500
1500
  return hasPropsChanged(prevProps, nextProps, emits);
1501
1501
  } else if (patchFlag & 8) {
1502
1502
  const dynamicProps = nextVNode.dynamicProps;
1503
- for (let i3 = 0; i3 < dynamicProps.length; i3++) {
1504
- const key = dynamicProps[i3];
1503
+ for (let i2 = 0; i2 < dynamicProps.length; i2++) {
1504
+ const key = dynamicProps[i2];
1505
1505
  if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {
1506
1506
  return true;
1507
1507
  }
@@ -1531,8 +1531,8 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
1531
1531
  if (nextKeys.length !== Object.keys(prevProps).length) {
1532
1532
  return true;
1533
1533
  }
1534
- for (let i3 = 0; i3 < nextKeys.length; i3++) {
1535
- const key = nextKeys[i3];
1534
+ for (let i2 = 0; i2 < nextKeys.length; i2++) {
1535
+ const key = nextKeys[i2];
1536
1536
  if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {
1537
1537
  return true;
1538
1538
  }
@@ -1665,7 +1665,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
1665
1665
  }
1666
1666
  if (cb) {
1667
1667
  const newValue = effect.run();
1668
- if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i3) => hasChanged(v, oldValue[i3])) : hasChanged(newValue, oldValue)) || false) {
1668
+ if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i2) => hasChanged(v, oldValue[i2])) : hasChanged(newValue, oldValue)) || false) {
1669
1669
  if (cleanup) {
1670
1670
  cleanup();
1671
1671
  }
@@ -1738,14 +1738,14 @@ function createPathGetter(ctx, path) {
1738
1738
  const segments = path.split(".");
1739
1739
  return () => {
1740
1740
  let cur = ctx;
1741
- for (let i3 = 0; i3 < segments.length && cur; i3++) {
1742
- cur = cur[segments[i3]];
1741
+ for (let i2 = 0; i2 < segments.length && cur; i2++) {
1742
+ cur = cur[segments[i2]];
1743
1743
  }
1744
1744
  return cur;
1745
1745
  };
1746
1746
  }
1747
1747
  function traverse(value, seen) {
1748
- if (!isObject$1(value) || value["__v_skip"]) {
1748
+ if (!isObject$2(value) || value["__v_skip"]) {
1749
1749
  return value;
1750
1750
  }
1751
1751
  seen = seen || /* @__PURE__ */ new Set();
@@ -1756,8 +1756,8 @@ function traverse(value, seen) {
1756
1756
  if (isRef(value)) {
1757
1757
  traverse(value.value, seen);
1758
1758
  } else if (isArray(value)) {
1759
- for (let i3 = 0; i3 < value.length; i3++) {
1760
- traverse(value[i3], seen);
1759
+ for (let i2 = 0; i2 < value.length; i2++) {
1760
+ traverse(value[i2], seen);
1761
1761
  }
1762
1762
  } else if (isSet(value) || isMap(value)) {
1763
1763
  value.forEach((v) => {
@@ -1773,7 +1773,7 @@ function traverse(value, seen) {
1773
1773
  function defineComponent(options2) {
1774
1774
  return isFunction(options2) ? { setup: options2, name: options2.name } : options2;
1775
1775
  }
1776
- const isAsyncWrapper = (i3) => !!i3.type.__asyncLoader;
1776
+ const isAsyncWrapper = (i2) => !!i2.type.__asyncLoader;
1777
1777
  const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
1778
1778
  function onActivated(hook, target) {
1779
1779
  registerKeepAliveHook(hook, "a", target);
@@ -1851,8 +1851,8 @@ function withDirectives(vnode, directives) {
1851
1851
  }
1852
1852
  const instance = getExposeProxy(internalInstance) || internalInstance.proxy;
1853
1853
  const bindings = vnode.dirs || (vnode.dirs = []);
1854
- for (let i3 = 0; i3 < directives.length; i3++) {
1855
- let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i3];
1854
+ for (let i2 = 0; i2 < directives.length; i2++) {
1855
+ let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i2];
1856
1856
  if (dir) {
1857
1857
  if (isFunction(dir)) {
1858
1858
  dir = {
@@ -1878,10 +1878,10 @@ function withDirectives(vnode, directives) {
1878
1878
  function invokeDirectiveHook(vnode, prevVNode, instance, name) {
1879
1879
  const bindings = vnode.dirs;
1880
1880
  const oldBindings = prevVNode && prevVNode.dirs;
1881
- for (let i3 = 0; i3 < bindings.length; i3++) {
1882
- const binding = bindings[i3];
1881
+ for (let i2 = 0; i2 < bindings.length; i2++) {
1882
+ const binding = bindings[i2];
1883
1883
  if (oldBindings) {
1884
- binding.oldValue = oldBindings[i3].value;
1884
+ binding.oldValue = oldBindings[i2].value;
1885
1885
  }
1886
1886
  let hook = binding.dir[name];
1887
1887
  if (hook) {
@@ -1933,23 +1933,23 @@ function renderList(source, renderItem, cache, index2) {
1933
1933
  const cached = cache && cache[index2];
1934
1934
  if (isArray(source) || isString(source)) {
1935
1935
  ret = new Array(source.length);
1936
- for (let i3 = 0, l = source.length; i3 < l; i3++) {
1937
- ret[i3] = renderItem(source[i3], i3, void 0, cached && cached[i3]);
1936
+ for (let i2 = 0, l = source.length; i2 < l; i2++) {
1937
+ ret[i2] = renderItem(source[i2], i2, void 0, cached && cached[i2]);
1938
1938
  }
1939
1939
  } else if (typeof source === "number") {
1940
1940
  ret = new Array(source);
1941
- for (let i3 = 0; i3 < source; i3++) {
1942
- ret[i3] = renderItem(i3 + 1, i3, void 0, cached && cached[i3]);
1941
+ for (let i2 = 0; i2 < source; i2++) {
1942
+ ret[i2] = renderItem(i2 + 1, i2, void 0, cached && cached[i2]);
1943
1943
  }
1944
- } else if (isObject$1(source)) {
1944
+ } else if (isObject$2(source)) {
1945
1945
  if (source[Symbol.iterator]) {
1946
- ret = Array.from(source, (item, i3) => renderItem(item, i3, void 0, cached && cached[i3]));
1946
+ ret = Array.from(source, (item, i2) => renderItem(item, i2, void 0, cached && cached[i2]));
1947
1947
  } else {
1948
1948
  const keys = Object.keys(source);
1949
1949
  ret = new Array(keys.length);
1950
- for (let i3 = 0, l = keys.length; i3 < l; i3++) {
1951
- const key = keys[i3];
1952
- ret[i3] = renderItem(source[key], key, i3, cached && cached[i3]);
1950
+ for (let i2 = 0, l = keys.length; i2 < l; i2++) {
1951
+ const key = keys[i2];
1952
+ ret[i2] = renderItem(source[key], key, i2, cached && cached[i2]);
1953
1953
  }
1954
1954
  }
1955
1955
  } else {
@@ -1994,28 +1994,28 @@ function ensureValidVNode(vnodes) {
1994
1994
  return true;
1995
1995
  }) ? vnodes : null;
1996
1996
  }
1997
- const getPublicInstance = (i3) => {
1998
- if (!i3)
1997
+ const getPublicInstance = (i2) => {
1998
+ if (!i2)
1999
1999
  return null;
2000
- if (isStatefulComponent(i3))
2001
- return getExposeProxy(i3) || i3.proxy;
2002
- return getPublicInstance(i3.parent);
2000
+ if (isStatefulComponent(i2))
2001
+ return getExposeProxy(i2) || i2.proxy;
2002
+ return getPublicInstance(i2.parent);
2003
2003
  };
2004
- const publicPropertiesMap = /* @__PURE__ */ extend$1(/* @__PURE__ */ Object.create(null), {
2005
- $: (i3) => i3,
2006
- $el: (i3) => i3.vnode.el,
2007
- $data: (i3) => i3.data,
2008
- $props: (i3) => i3.props,
2009
- $attrs: (i3) => i3.attrs,
2010
- $slots: (i3) => i3.slots,
2011
- $refs: (i3) => i3.refs,
2012
- $parent: (i3) => getPublicInstance(i3.parent),
2013
- $root: (i3) => getPublicInstance(i3.root),
2014
- $emit: (i3) => i3.emit,
2015
- $options: (i3) => resolveMergedOptions(i3),
2016
- $forceUpdate: (i3) => i3.f || (i3.f = () => queueJob(i3.update)),
2017
- $nextTick: (i3) => i3.n || (i3.n = nextTick.bind(i3.proxy)),
2018
- $watch: (i3) => instanceWatch.bind(i3)
2004
+ const publicPropertiesMap = /* @__PURE__ */ extend$3(/* @__PURE__ */ Object.create(null), {
2005
+ $: (i2) => i2,
2006
+ $el: (i2) => i2.vnode.el,
2007
+ $data: (i2) => i2.data,
2008
+ $props: (i2) => i2.props,
2009
+ $attrs: (i2) => i2.attrs,
2010
+ $slots: (i2) => i2.slots,
2011
+ $refs: (i2) => i2.refs,
2012
+ $parent: (i2) => getPublicInstance(i2.parent),
2013
+ $root: (i2) => getPublicInstance(i2.root),
2014
+ $emit: (i2) => i2.emit,
2015
+ $options: (i2) => resolveMergedOptions(i2),
2016
+ $forceUpdate: (i2) => i2.f || (i2.f = () => queueJob(i2.update)),
2017
+ $nextTick: (i2) => i2.n || (i2.n = nextTick.bind(i2.proxy)),
2018
+ $watch: (i2) => instanceWatch.bind(i2)
2019
2019
  });
2020
2020
  const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
2021
2021
  const PublicInstanceProxyHandlers = {
@@ -2157,7 +2157,7 @@ function applyOptions(instance) {
2157
2157
  }
2158
2158
  if (dataOptions) {
2159
2159
  const data = dataOptions.call(publicThis, publicThis);
2160
- if (!isObject$1(data))
2160
+ if (!isObject$2(data))
2161
2161
  ;
2162
2162
  else {
2163
2163
  instance.data = reactive(data);
@@ -2245,7 +2245,7 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP,
2245
2245
  for (const key in injectOptions) {
2246
2246
  const opt = injectOptions[key];
2247
2247
  let injected;
2248
- if (isObject$1(opt)) {
2248
+ if (isObject$2(opt)) {
2249
2249
  if ("default" in opt) {
2250
2250
  injected = inject(opt.from || key, opt.default, true);
2251
2251
  } else {
@@ -2282,7 +2282,7 @@ function createWatcher(raw2, ctx, publicThis, key) {
2282
2282
  }
2283
2283
  } else if (isFunction(raw2)) {
2284
2284
  watch$1(getter, raw2.bind(publicThis));
2285
- } else if (isObject$1(raw2)) {
2285
+ } else if (isObject$2(raw2)) {
2286
2286
  if (isArray(raw2)) {
2287
2287
  raw2.forEach((r) => createWatcher(r, ctx, publicThis, key));
2288
2288
  } else {
@@ -2313,7 +2313,7 @@ function resolveMergedOptions(instance) {
2313
2313
  }
2314
2314
  mergeOptions(resolved, base, optionMergeStrategies);
2315
2315
  }
2316
- if (isObject$1(base)) {
2316
+ if (isObject$2(base)) {
2317
2317
  cache.set(base, resolved);
2318
2318
  }
2319
2319
  return resolved;
@@ -2370,7 +2370,7 @@ function mergeDataFn(to, from) {
2370
2370
  return from;
2371
2371
  }
2372
2372
  return function mergedDataFn() {
2373
- return extend$1(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from);
2373
+ return extend$3(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from);
2374
2374
  };
2375
2375
  }
2376
2376
  function mergeInject(to, from) {
@@ -2379,8 +2379,8 @@ function mergeInject(to, from) {
2379
2379
  function normalizeInject(raw2) {
2380
2380
  if (isArray(raw2)) {
2381
2381
  const res = {};
2382
- for (let i3 = 0; i3 < raw2.length; i3++) {
2383
- res[raw2[i3]] = raw2[i3];
2382
+ for (let i2 = 0; i2 < raw2.length; i2++) {
2383
+ res[raw2[i2]] = raw2[i2];
2384
2384
  }
2385
2385
  return res;
2386
2386
  }
@@ -2390,14 +2390,14 @@ function mergeAsArray(to, from) {
2390
2390
  return to ? [...new Set([].concat(to, from))] : from;
2391
2391
  }
2392
2392
  function mergeObjectOptions(to, from) {
2393
- return to ? extend$1(extend$1(/* @__PURE__ */ Object.create(null), to), from) : from;
2393
+ return to ? extend$3(extend$3(/* @__PURE__ */ Object.create(null), to), from) : from;
2394
2394
  }
2395
2395
  function mergeWatchOptions(to, from) {
2396
2396
  if (!to)
2397
2397
  return from;
2398
2398
  if (!from)
2399
2399
  return to;
2400
- const merged = extend$1(/* @__PURE__ */ Object.create(null), to);
2400
+ const merged = extend$3(/* @__PURE__ */ Object.create(null), to);
2401
2401
  for (const key in from) {
2402
2402
  merged[key] = mergeAsArray(to[key], from[key]);
2403
2403
  }
@@ -2433,8 +2433,8 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
2433
2433
  if ((optimized || patchFlag > 0) && !(patchFlag & 16)) {
2434
2434
  if (patchFlag & 8) {
2435
2435
  const propsToUpdate = instance.vnode.dynamicProps;
2436
- for (let i3 = 0; i3 < propsToUpdate.length; i3++) {
2437
- let key = propsToUpdate[i3];
2436
+ for (let i2 = 0; i2 < propsToUpdate.length; i2++) {
2437
+ let key = propsToUpdate[i2];
2438
2438
  if (isEmitListener(instance.emitsOptions, key)) {
2439
2439
  continue;
2440
2440
  }
@@ -2514,8 +2514,8 @@ function setFullProps(instance, rawProps, props2, attrs) {
2514
2514
  if (needCastKeys) {
2515
2515
  const rawCurrentProps = toRaw(props2);
2516
2516
  const castValues = rawCastValues || EMPTY_OBJ;
2517
- for (let i3 = 0; i3 < needCastKeys.length; i3++) {
2518
- const key = needCastKeys[i3];
2517
+ for (let i2 = 0; i2 < needCastKeys.length; i2++) {
2518
+ const key = needCastKeys[i2];
2519
2519
  props2[key] = resolvePropValue(options2, rawCurrentProps, key, castValues[key], instance, !hasOwn(castValues, key));
2520
2520
  }
2521
2521
  }
@@ -2564,7 +2564,7 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
2564
2564
  const extendProps = (raw3) => {
2565
2565
  hasExtends = true;
2566
2566
  const [props2, keys] = normalizePropsOptions(raw3, appContext, true);
2567
- extend$1(normalized, props2);
2567
+ extend$3(normalized, props2);
2568
2568
  if (keys)
2569
2569
  needCastKeys.push(...keys);
2570
2570
  };
@@ -2579,14 +2579,14 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
2579
2579
  }
2580
2580
  }
2581
2581
  if (!raw2 && !hasExtends) {
2582
- if (isObject$1(comp)) {
2582
+ if (isObject$2(comp)) {
2583
2583
  cache.set(comp, EMPTY_ARR);
2584
2584
  }
2585
2585
  return EMPTY_ARR;
2586
2586
  }
2587
2587
  if (isArray(raw2)) {
2588
- for (let i3 = 0; i3 < raw2.length; i3++) {
2589
- const normalizedKey = camelize(raw2[i3]);
2588
+ for (let i2 = 0; i2 < raw2.length; i2++) {
2589
+ const normalizedKey = camelize(raw2[i2]);
2590
2590
  if (validatePropName(normalizedKey)) {
2591
2591
  normalized[normalizedKey] = EMPTY_OBJ;
2592
2592
  }
@@ -2610,7 +2610,7 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
2610
2610
  }
2611
2611
  }
2612
2612
  const res = [normalized, needCastKeys];
2613
- if (isObject$1(comp)) {
2613
+ if (isObject$2(comp)) {
2614
2614
  cache.set(comp, res);
2615
2615
  }
2616
2616
  return res;
@@ -2695,7 +2695,7 @@ const updateSlots = (instance, children, optimized) => {
2695
2695
  if (optimized && type === 1) {
2696
2696
  needDeletionCheck = false;
2697
2697
  } else {
2698
- extend$1(slots, children);
2698
+ extend$3(slots, children);
2699
2699
  if (!optimized && type === 1) {
2700
2700
  delete slots._;
2701
2701
  }
@@ -2744,7 +2744,7 @@ function createAppAPI(render2, hydrate2) {
2744
2744
  if (!isFunction(rootComponent)) {
2745
2745
  rootComponent = Object.assign({}, rootComponent);
2746
2746
  }
2747
- if (rootProps != null && !isObject$1(rootProps)) {
2747
+ if (rootProps != null && !isObject$2(rootProps)) {
2748
2748
  rootProps = null;
2749
2749
  }
2750
2750
  const context = createAppContext();
@@ -2829,7 +2829,7 @@ function createAppAPI(render2, hydrate2) {
2829
2829
  }
2830
2830
  function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
2831
2831
  if (isArray(rawRef)) {
2832
- rawRef.forEach((r, i3) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i3] : oldRawRef), parentSuspense, vnode, isUnmount));
2832
+ rawRef.forEach((r, i2) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i2] : oldRawRef), parentSuspense, vnode, isUnmount));
2833
2833
  return;
2834
2834
  }
2835
2835
  if (isAsyncWrapper(vnode) && !isUnmount) {
@@ -3046,8 +3046,8 @@ function baseCreateRenderer(options2, createHydrationFns) {
3046
3046
  hostSetScopeId(el, scopeId);
3047
3047
  }
3048
3048
  if (slotScopeIds) {
3049
- for (let i3 = 0; i3 < slotScopeIds.length; i3++) {
3050
- hostSetScopeId(el, slotScopeIds[i3]);
3049
+ for (let i2 = 0; i2 < slotScopeIds.length; i2++) {
3050
+ hostSetScopeId(el, slotScopeIds[i2]);
3051
3051
  }
3052
3052
  }
3053
3053
  if (parentComponent) {
@@ -3059,8 +3059,8 @@ function baseCreateRenderer(options2, createHydrationFns) {
3059
3059
  }
3060
3060
  };
3061
3061
  const mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start = 0) => {
3062
- for (let i3 = start; i3 < children.length; i3++) {
3063
- const child = children[i3] = optimized ? cloneIfMounted(children[i3]) : normalizeVNode(children[i3]);
3062
+ for (let i2 = start; i2 < children.length; i2++) {
3063
+ const child = children[i2] = optimized ? cloneIfMounted(children[i2]) : normalizeVNode(children[i2]);
3064
3064
  patch(null, child, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
3065
3065
  }
3066
3066
  };
@@ -3099,8 +3099,8 @@ function baseCreateRenderer(options2, createHydrationFns) {
3099
3099
  }
3100
3100
  if (patchFlag & 8) {
3101
3101
  const propsToUpdate = n2.dynamicProps;
3102
- for (let i3 = 0; i3 < propsToUpdate.length; i3++) {
3103
- const key = propsToUpdate[i3];
3102
+ for (let i2 = 0; i2 < propsToUpdate.length; i2++) {
3103
+ const key = propsToUpdate[i2];
3104
3104
  const prev = oldProps[key];
3105
3105
  const next = newProps[key];
3106
3106
  if (next !== prev || key === "value") {
@@ -3125,9 +3125,9 @@ function baseCreateRenderer(options2, createHydrationFns) {
3125
3125
  }
3126
3126
  };
3127
3127
  const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, isSVG, slotScopeIds) => {
3128
- for (let i3 = 0; i3 < newChildren.length; i3++) {
3129
- const oldVNode = oldChildren[i3];
3130
- const newVNode = newChildren[i3];
3128
+ for (let i2 = 0; i2 < newChildren.length; i2++) {
3129
+ const oldVNode = oldChildren[i2];
3130
+ const newVNode = newChildren[i2];
3131
3131
  const container = oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : fallbackContainer;
3132
3132
  patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, true);
3133
3133
  }
@@ -3374,10 +3374,10 @@ function baseCreateRenderer(options2, createHydrationFns) {
3374
3374
  const oldLength = c1.length;
3375
3375
  const newLength = c2.length;
3376
3376
  const commonLength = Math.min(oldLength, newLength);
3377
- let i3;
3378
- for (i3 = 0; i3 < commonLength; i3++) {
3379
- const nextChild = c2[i3] = optimized ? cloneIfMounted(c2[i3]) : normalizeVNode(c2[i3]);
3380
- patch(c1[i3], nextChild, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
3377
+ let i2;
3378
+ for (i2 = 0; i2 < commonLength; i2++) {
3379
+ const nextChild = c2[i2] = optimized ? cloneIfMounted(c2[i2]) : normalizeVNode(c2[i2]);
3380
+ patch(c1[i2], nextChild, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
3381
3381
  }
3382
3382
  if (oldLength > newLength) {
3383
3383
  unmountChildren(c1, parentComponent, parentSuspense, true, false, commonLength);
@@ -3386,21 +3386,21 @@ function baseCreateRenderer(options2, createHydrationFns) {
3386
3386
  }
3387
3387
  };
3388
3388
  const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
3389
- let i3 = 0;
3389
+ let i2 = 0;
3390
3390
  const l2 = c2.length;
3391
3391
  let e1 = c1.length - 1;
3392
3392
  let e2 = l2 - 1;
3393
- while (i3 <= e1 && i3 <= e2) {
3394
- const n1 = c1[i3];
3395
- const n2 = c2[i3] = optimized ? cloneIfMounted(c2[i3]) : normalizeVNode(c2[i3]);
3393
+ while (i2 <= e1 && i2 <= e2) {
3394
+ const n1 = c1[i2];
3395
+ const n2 = c2[i2] = optimized ? cloneIfMounted(c2[i2]) : normalizeVNode(c2[i2]);
3396
3396
  if (isSameVNodeType(n1, n2)) {
3397
3397
  patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
3398
3398
  } else {
3399
3399
  break;
3400
3400
  }
3401
- i3++;
3401
+ i2++;
3402
3402
  }
3403
- while (i3 <= e1 && i3 <= e2) {
3403
+ while (i2 <= e1 && i2 <= e2) {
3404
3404
  const n1 = c1[e1];
3405
3405
  const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]);
3406
3406
  if (isSameVNodeType(n1, n2)) {
@@ -3411,28 +3411,28 @@ function baseCreateRenderer(options2, createHydrationFns) {
3411
3411
  e1--;
3412
3412
  e2--;
3413
3413
  }
3414
- if (i3 > e1) {
3415
- if (i3 <= e2) {
3414
+ if (i2 > e1) {
3415
+ if (i2 <= e2) {
3416
3416
  const nextPos = e2 + 1;
3417
3417
  const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;
3418
- while (i3 <= e2) {
3419
- patch(null, c2[i3] = optimized ? cloneIfMounted(c2[i3]) : normalizeVNode(c2[i3]), container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
3420
- i3++;
3418
+ while (i2 <= e2) {
3419
+ patch(null, c2[i2] = optimized ? cloneIfMounted(c2[i2]) : normalizeVNode(c2[i2]), container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
3420
+ i2++;
3421
3421
  }
3422
3422
  }
3423
- } else if (i3 > e2) {
3424
- while (i3 <= e1) {
3425
- unmount(c1[i3], parentComponent, parentSuspense, true);
3426
- i3++;
3423
+ } else if (i2 > e2) {
3424
+ while (i2 <= e1) {
3425
+ unmount(c1[i2], parentComponent, parentSuspense, true);
3426
+ i2++;
3427
3427
  }
3428
3428
  } else {
3429
- const s1 = i3;
3430
- const s22 = i3;
3429
+ const s1 = i2;
3430
+ const s22 = i2;
3431
3431
  const keyToNewIndexMap = /* @__PURE__ */ new Map();
3432
- for (i3 = s22; i3 <= e2; i3++) {
3433
- const nextChild = c2[i3] = optimized ? cloneIfMounted(c2[i3]) : normalizeVNode(c2[i3]);
3432
+ for (i2 = s22; i2 <= e2; i2++) {
3433
+ const nextChild = c2[i2] = optimized ? cloneIfMounted(c2[i2]) : normalizeVNode(c2[i2]);
3434
3434
  if (nextChild.key != null) {
3435
- keyToNewIndexMap.set(nextChild.key, i3);
3435
+ keyToNewIndexMap.set(nextChild.key, i2);
3436
3436
  }
3437
3437
  }
3438
3438
  let j;
@@ -3441,10 +3441,10 @@ function baseCreateRenderer(options2, createHydrationFns) {
3441
3441
  let moved = false;
3442
3442
  let maxNewIndexSoFar = 0;
3443
3443
  const newIndexToOldIndexMap = new Array(toBePatched);
3444
- for (i3 = 0; i3 < toBePatched; i3++)
3445
- newIndexToOldIndexMap[i3] = 0;
3446
- for (i3 = s1; i3 <= e1; i3++) {
3447
- const prevChild = c1[i3];
3444
+ for (i2 = 0; i2 < toBePatched; i2++)
3445
+ newIndexToOldIndexMap[i2] = 0;
3446
+ for (i2 = s1; i2 <= e1; i2++) {
3447
+ const prevChild = c1[i2];
3448
3448
  if (patched >= toBePatched) {
3449
3449
  unmount(prevChild, parentComponent, parentSuspense, true);
3450
3450
  continue;
@@ -3463,7 +3463,7 @@ function baseCreateRenderer(options2, createHydrationFns) {
3463
3463
  if (newIndex === void 0) {
3464
3464
  unmount(prevChild, parentComponent, parentSuspense, true);
3465
3465
  } else {
3466
- newIndexToOldIndexMap[newIndex - s22] = i3 + 1;
3466
+ newIndexToOldIndexMap[newIndex - s22] = i2 + 1;
3467
3467
  if (newIndex >= maxNewIndexSoFar) {
3468
3468
  maxNewIndexSoFar = newIndex;
3469
3469
  } else {
@@ -3475,14 +3475,14 @@ function baseCreateRenderer(options2, createHydrationFns) {
3475
3475
  }
3476
3476
  const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR;
3477
3477
  j = increasingNewIndexSequence.length - 1;
3478
- for (i3 = toBePatched - 1; i3 >= 0; i3--) {
3479
- const nextIndex = s22 + i3;
3478
+ for (i2 = toBePatched - 1; i2 >= 0; i2--) {
3479
+ const nextIndex = s22 + i2;
3480
3480
  const nextChild = c2[nextIndex];
3481
3481
  const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor;
3482
- if (newIndexToOldIndexMap[i3] === 0) {
3482
+ if (newIndexToOldIndexMap[i2] === 0) {
3483
3483
  patch(null, nextChild, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
3484
3484
  } else if (moved) {
3485
- if (j < 0 || i3 !== increasingNewIndexSequence[j]) {
3485
+ if (j < 0 || i2 !== increasingNewIndexSequence[j]) {
3486
3486
  move(nextChild, container, anchor, 2);
3487
3487
  } else {
3488
3488
  j--;
@@ -3507,8 +3507,8 @@ function baseCreateRenderer(options2, createHydrationFns) {
3507
3507
  }
3508
3508
  if (type === Fragment) {
3509
3509
  hostInsert(el, container, anchor);
3510
- for (let i3 = 0; i3 < children.length; i3++) {
3511
- move(children[i3], container, anchor, moveType);
3510
+ for (let i2 = 0; i2 < children.length; i2++) {
3511
+ move(children[i2], container, anchor, moveType);
3512
3512
  }
3513
3513
  hostInsert(vnode.anchor, container, anchor);
3514
3514
  return;
@@ -3648,8 +3648,8 @@ function baseCreateRenderer(options2, createHydrationFns) {
3648
3648
  }
3649
3649
  };
3650
3650
  const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
3651
- for (let i3 = start; i3 < children.length; i3++) {
3652
- unmount(children[i3], parentComponent, parentSuspense, doRemove, optimized);
3651
+ for (let i2 = start; i2 < children.length; i2++) {
3652
+ unmount(children[i2], parentComponent, parentSuspense, doRemove, optimized);
3653
3653
  }
3654
3654
  };
3655
3655
  const getNextHostNode = (vnode) => {
@@ -3703,12 +3703,12 @@ function traverseStaticChildren(n1, n2, shallow = false) {
3703
3703
  const ch1 = n1.children;
3704
3704
  const ch2 = n2.children;
3705
3705
  if (isArray(ch1) && isArray(ch2)) {
3706
- for (let i3 = 0; i3 < ch1.length; i3++) {
3707
- const c1 = ch1[i3];
3708
- let c2 = ch2[i3];
3706
+ for (let i2 = 0; i2 < ch1.length; i2++) {
3707
+ const c1 = ch1[i2];
3708
+ let c2 = ch2[i2];
3709
3709
  if (c2.shapeFlag & 1 && !c2.dynamicChildren) {
3710
3710
  if (c2.patchFlag <= 0 || c2.patchFlag === 32) {
3711
- c2 = ch2[i3] = cloneIfMounted(ch2[i3]);
3711
+ c2 = ch2[i2] = cloneIfMounted(ch2[i2]);
3712
3712
  c2.el = c1.el;
3713
3713
  }
3714
3714
  if (!shallow)
@@ -3723,15 +3723,15 @@ function traverseStaticChildren(n1, n2, shallow = false) {
3723
3723
  function getSequence(arr) {
3724
3724
  const p2 = arr.slice();
3725
3725
  const result = [0];
3726
- let i3, j, u2, v, c2;
3726
+ let i2, j, u2, v, c2;
3727
3727
  const len = arr.length;
3728
- for (i3 = 0; i3 < len; i3++) {
3729
- const arrI = arr[i3];
3728
+ for (i2 = 0; i2 < len; i2++) {
3729
+ const arrI = arr[i2];
3730
3730
  if (arrI !== 0) {
3731
3731
  j = result[result.length - 1];
3732
3732
  if (arr[j] < arrI) {
3733
- p2[i3] = j;
3734
- result.push(i3);
3733
+ p2[i2] = j;
3734
+ result.push(i2);
3735
3735
  continue;
3736
3736
  }
3737
3737
  u2 = 0;
@@ -3746,9 +3746,9 @@ function getSequence(arr) {
3746
3746
  }
3747
3747
  if (arrI < arr[result[u2]]) {
3748
3748
  if (u2 > 0) {
3749
- p2[i3] = result[u2 - 1];
3749
+ p2[i2] = result[u2 - 1];
3750
3750
  }
3751
- result[u2] = i3;
3751
+ result[u2] = i2;
3752
3752
  }
3753
3753
  }
3754
3754
  }
@@ -3871,20 +3871,20 @@ function _createVNode(type, props2 = null, children = null, patchFlag = 0, dynam
3871
3871
  if (klass && !isString(klass)) {
3872
3872
  props2.class = normalizeClass(klass);
3873
3873
  }
3874
- if (isObject$1(style)) {
3874
+ if (isObject$2(style)) {
3875
3875
  if (isProxy(style) && !isArray(style)) {
3876
- style = extend$1({}, style);
3876
+ style = extend$3({}, style);
3877
3877
  }
3878
3878
  props2.style = normalizeStyle(style);
3879
3879
  }
3880
3880
  }
3881
- const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject$1(type) ? 4 : isFunction(type) ? 2 : 0;
3881
+ const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject$2(type) ? 4 : isFunction(type) ? 2 : 0;
3882
3882
  return createBaseVNode(type, props2, children, patchFlag, dynamicProps, shapeFlag, isBlockNode, true);
3883
3883
  }
3884
3884
  function guardReactiveProps(props2) {
3885
3885
  if (!props2)
3886
3886
  return null;
3887
- return isProxy(props2) || InternalObjectKey in props2 ? extend$1({}, props2) : props2;
3887
+ return isProxy(props2) || InternalObjectKey in props2 ? extend$3({}, props2) : props2;
3888
3888
  }
3889
3889
  function cloneVNode(vnode, extraProps, mergeRef = false) {
3890
3890
  const { props: props2, ref: ref2, patchFlag, children } = vnode;
@@ -3991,8 +3991,8 @@ function normalizeChildren(vnode, children) {
3991
3991
  }
3992
3992
  function mergeProps(...args) {
3993
3993
  const ret = {};
3994
- for (let i3 = 0; i3 < args.length; i3++) {
3995
- const toMerge = args[i3];
3994
+ for (let i2 = 0; i2 < args.length; i2++) {
3995
+ const toMerge = args[i2];
3996
3996
  for (const key in toMerge) {
3997
3997
  if (key === "class") {
3998
3998
  if (ret.class !== toMerge.class) {
@@ -4153,7 +4153,7 @@ function handleSetupResult(instance, setupResult, isSSR) {
4153
4153
  } else {
4154
4154
  instance.render = setupResult;
4155
4155
  }
4156
- } else if (isObject$1(setupResult)) {
4156
+ } else if (isObject$2(setupResult)) {
4157
4157
  instance.setupState = proxyRefs(setupResult);
4158
4158
  } else
4159
4159
  ;
@@ -4168,7 +4168,7 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
4168
4168
  if (template) {
4169
4169
  const { isCustomElement, compilerOptions } = instance.appContext.config;
4170
4170
  const { delimiters, compilerOptions: componentCompilerOptions } = Component;
4171
- const finalCompilerOptions = extend$1(extend$1({
4171
+ const finalCompilerOptions = extend$3(extend$3({
4172
4172
  isCustomElement,
4173
4173
  delimiters
4174
4174
  }, compilerOptions), componentCompilerOptions);
@@ -4237,7 +4237,7 @@ const computed = (getterOrOptions, debugOptions) => {
4237
4237
  function h(type, propsOrChildren, children) {
4238
4238
  const l = arguments.length;
4239
4239
  if (l === 2) {
4240
- if (isObject$1(propsOrChildren) && !isArray(propsOrChildren)) {
4240
+ if (isObject$2(propsOrChildren) && !isArray(propsOrChildren)) {
4241
4241
  if (isVNode(propsOrChildren)) {
4242
4242
  return createVNode(type, null, [propsOrChildren]);
4243
4243
  }
@@ -4394,8 +4394,8 @@ function autoPrefix(style, rawName) {
4394
4394
  return prefixCache[rawName] = name;
4395
4395
  }
4396
4396
  name = capitalize(name);
4397
- for (let i3 = 0; i3 < prefixes.length; i3++) {
4398
- const prefixed = prefixes[i3] + name;
4397
+ for (let i2 = 0; i2 < prefixes.length; i2++) {
4398
+ const prefixed = prefixes[i2] + name;
4399
4399
  if (prefixed in style) {
4400
4400
  return prefixCache[rawName] = prefixed;
4401
4401
  }
@@ -4584,9 +4584,9 @@ function onCompositionEnd(e2) {
4584
4584
  }
4585
4585
  }
4586
4586
  const vModelText = {
4587
- created(el, { modifiers: { lazy, trim, number: number3 } }, vnode) {
4587
+ created(el, { modifiers: { lazy, trim, number: number4 } }, vnode) {
4588
4588
  el._assign = getModelAssigner(vnode);
4589
- const castToNumber = number3 || vnode.props && vnode.props.type === "number";
4589
+ const castToNumber = number4 || vnode.props && vnode.props.type === "number";
4590
4590
  addEventListener(el, lazy ? "change" : "input", (e2) => {
4591
4591
  if (e2.target.composing)
4592
4592
  return;
@@ -4613,7 +4613,7 @@ const vModelText = {
4613
4613
  mounted(el, { value }) {
4614
4614
  el.value = value == null ? "" : value;
4615
4615
  },
4616
- beforeUpdate(el, { value, modifiers: { lazy, trim, number: number3 } }, vnode) {
4616
+ beforeUpdate(el, { value, modifiers: { lazy, trim, number: number4 } }, vnode) {
4617
4617
  el._assign = getModelAssigner(vnode);
4618
4618
  if (el.composing)
4619
4619
  return;
@@ -4624,7 +4624,7 @@ const vModelText = {
4624
4624
  if (trim && el.value.trim() === value) {
4625
4625
  return;
4626
4626
  }
4627
- if ((number3 || el.type === "number") && looseToNumber(el.value) === value) {
4627
+ if ((number4 || el.type === "number") && looseToNumber(el.value) === value) {
4628
4628
  return;
4629
4629
  }
4630
4630
  }
@@ -4650,8 +4650,8 @@ const modifierGuards = {
4650
4650
  };
4651
4651
  const withModifiers = (fn, modifiers) => {
4652
4652
  return (event, ...args) => {
4653
- for (let i3 = 0; i3 < modifiers.length; i3++) {
4654
- const guard = modifierGuards[modifiers[i3]];
4653
+ for (let i2 = 0; i2 < modifiers.length; i2++) {
4654
+ const guard = modifierGuards[modifiers[i2]];
4655
4655
  if (guard && guard(event, modifiers))
4656
4656
  return;
4657
4657
  }
@@ -4696,7 +4696,7 @@ const vShow = {
4696
4696
  function setDisplay(el, value) {
4697
4697
  el.style.display = value ? el._vod : "none";
4698
4698
  }
4699
- const rendererOptions = /* @__PURE__ */ extend$1({ patchProp }, nodeOps);
4699
+ const rendererOptions = /* @__PURE__ */ extend$3({ patchProp }, nodeOps);
4700
4700
  let renderer;
4701
4701
  function ensureRenderer() {
4702
4702
  return renderer || (renderer = createRenderer(rendererOptions));
@@ -4870,8 +4870,8 @@ function usePrepop() {
4870
4870
  if (value) {
4871
4871
  if (node.props.options) {
4872
4872
  let found = false;
4873
- for (var i3 = 0; i3 < node.props.options.length; i3++) {
4874
- if (node.props.options[i3].value == value) {
4873
+ for (var i2 = 0; i2 < node.props.options.length; i2++) {
4874
+ if (node.props.options[i2].value == value) {
4875
4875
  found = true;
4876
4876
  break;
4877
4877
  }
@@ -4929,6 +4929,34 @@ function eq$1(valA, valB, deep = true, explicit = ["__key"]) {
4929
4929
  }
4930
4930
  return false;
4931
4931
  }
4932
+ function empty$1(value) {
4933
+ const type = typeof value;
4934
+ if (type === "number")
4935
+ return false;
4936
+ if (value === void 0)
4937
+ return true;
4938
+ if (type === "string") {
4939
+ return value === "";
4940
+ }
4941
+ if (type === "object") {
4942
+ if (value === null)
4943
+ return true;
4944
+ for (const _i in value)
4945
+ return false;
4946
+ if (value instanceof RegExp)
4947
+ return false;
4948
+ if (value instanceof Date)
4949
+ return false;
4950
+ return true;
4951
+ }
4952
+ return false;
4953
+ }
4954
+ function isRecord$1(o) {
4955
+ return Object.prototype.toString.call(o) === "[object Object]";
4956
+ }
4957
+ function isObject$1(o) {
4958
+ return isRecord$1(o) || Array.isArray(o);
4959
+ }
4932
4960
  function camel$1(str) {
4933
4961
  return str.replace(/-([a-z0-9])/gi, (_s, g) => g.toUpperCase());
4934
4962
  }
@@ -4976,7 +5004,7 @@ function init$2(obj) {
4976
5004
  function slugify$1(str) {
4977
5005
  return str.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]/g, " ").trim().replace(/\s+/g, "-");
4978
5006
  }
4979
- function createDispatcher$2() {
5007
+ function createDispatcher$1() {
4980
5008
  const middleware = [];
4981
5009
  let currentIndex = 0;
4982
5010
  const use2 = (dispatchable) => middleware.push(dispatchable);
@@ -5020,6 +5048,11 @@ function createEmitter$1() {
5020
5048
  node.bubble(event);
5021
5049
  }
5022
5050
  };
5051
+ emitter.flush = () => {
5052
+ listeners.clear();
5053
+ receipts2.clear();
5054
+ buffer === null || buffer === void 0 ? void 0 : buffer.clear();
5055
+ };
5023
5056
  emitter.on = (eventName, listener) => {
5024
5057
  const [event, ...modifiers] = eventName.split(".");
5025
5058
  const receipt = listener.receipt || token$1();
@@ -5086,13 +5119,13 @@ function off$1(node, context, receipt) {
5086
5119
  context._e.off(receipt);
5087
5120
  return node;
5088
5121
  }
5089
- const errorHandler$1 = createDispatcher$2();
5122
+ const errorHandler$1 = createDispatcher$1();
5090
5123
  errorHandler$1((error2, next) => {
5091
5124
  if (!error2.message)
5092
5125
  error2.message = String(`E${error2.code}`);
5093
5126
  return next(error2);
5094
5127
  });
5095
- const warningHandler$1 = createDispatcher$2();
5128
+ const warningHandler$1 = createDispatcher$1();
5096
5129
  warningHandler$1((warning, next) => {
5097
5130
  if (!warning.message)
5098
5131
  warning.message = String(`W${warning.code}`);
@@ -5203,10 +5236,13 @@ function reset$1(id, resetTo) {
5203
5236
  if (node) {
5204
5237
  const initial = (n) => cloneAny$1(n.props.initial) || (n.type === "group" ? {} : n.type === "list" ? [] : void 0);
5205
5238
  node._e.pause(node);
5206
- node.input(cloneAny$1(resetTo) || initial(node), false);
5239
+ const resetValue2 = cloneAny$1(resetTo);
5240
+ if (resetTo && !empty$1(resetTo)) {
5241
+ node.props.initial = isObject$1(resetValue2) ? init$2(resetValue2) : resetValue2;
5242
+ }
5243
+ node.input(initial(node), false);
5207
5244
  node.walk((child) => child.input(initial(child), false));
5208
- const finalInit = initial(node);
5209
- node.input(typeof finalInit === "object" ? cloneAny$1(resetTo) || init$2(finalInit) : finalInit, false);
5245
+ node.input(empty$1(resetValue2) && resetValue2 ? resetValue2 : initial(node), false);
5210
5246
  node._e.play(node);
5211
5247
  clearState$1(node);
5212
5248
  node.emit("reset", node);
@@ -5247,6 +5283,7 @@ const invalidSetter$1 = (node, _context, property) => {
5247
5283
  define: trap$1(define$1),
5248
5284
  disturb: trap$1(disturb$1),
5249
5285
  destroy: trap$1(destroy$1),
5286
+ extend: trap$1(extend$2),
5250
5287
  hydrate: trap$1(hydrate$1),
5251
5288
  index: trap$1(getIndex$1, setIndex$1, false),
5252
5289
  input: trap$1(input$1),
@@ -5274,6 +5311,7 @@ function trap$1(getter, setter, curryGetter = true) {
5274
5311
  set: setter !== void 0 ? setter : invalidSetter$1.bind(null)
5275
5312
  };
5276
5313
  }
5314
+ let nameCount$1 = 0;
5277
5315
  function createValue$1(options2) {
5278
5316
  if (options2.type === "group") {
5279
5317
  return init$2(options2.value && typeof options2.value === "object" && !Array.isArray(options2.value) ? options2.value : {});
@@ -5285,6 +5323,10 @@ function createValue$1(options2) {
5285
5323
  function input$1(node, context, value, async = true) {
5286
5324
  context._value = validateInput$1(node, node.hook.input.dispatch(value));
5287
5325
  node.emit("input", context._value);
5326
+ if (node.isCreated && node.type === "input" && eq$1(context._value, context.value)) {
5327
+ node.emit("commitRaw", context.value);
5328
+ return context.settled;
5329
+ }
5288
5330
  if (context.isSettled)
5289
5331
  node.disturb();
5290
5332
  if (async) {
@@ -5315,6 +5357,7 @@ function commit$1(node, context, calm2 = true, hydrate2 = true) {
5315
5357
  context._value = context.value = node.hook.commit.dispatch(context._value);
5316
5358
  if (node.type !== "input" && hydrate2)
5317
5359
  node.hydrate();
5360
+ node.emit("commitRaw", context.value);
5318
5361
  node.emit("commit", context.value);
5319
5362
  if (calm2)
5320
5363
  node.calm();
@@ -5335,11 +5378,15 @@ function partial$1(context, { name, value, from }) {
5335
5378
  }
5336
5379
  function hydrate$1(node, context) {
5337
5380
  const _value = context._value;
5381
+ if (node.type === "list" && node.sync)
5382
+ syncListNodes$1(node, context);
5338
5383
  context.children.forEach((child) => {
5339
5384
  if (typeof _value !== "object")
5340
5385
  return;
5341
5386
  if (child.name in _value) {
5342
5387
  const childValue = child.type !== "input" || _value[child.name] && typeof _value[child.name] === "object" ? init$2(_value[child.name]) : _value[child.name];
5388
+ if (!child.isSettled || !isObject$1(childValue) && eq$1(childValue, child._value))
5389
+ return;
5343
5390
  child.input(childValue, false);
5344
5391
  } else {
5345
5392
  if (node.type !== "list" || typeof child.name === "number") {
@@ -5357,6 +5404,58 @@ function hydrate$1(node, context) {
5357
5404
  });
5358
5405
  return node;
5359
5406
  }
5407
+ function syncListNodes$1(node, context) {
5408
+ const _value = node._value;
5409
+ if (!Array.isArray(_value))
5410
+ return;
5411
+ const newChildren = [];
5412
+ const unused = new Set(context.children);
5413
+ const placeholderValues = /* @__PURE__ */ new Map();
5414
+ _value.forEach((value, i2) => {
5415
+ if (context.children[i2] && context.children[i2]._value === value) {
5416
+ newChildren.push(context.children[i2]);
5417
+ unused.delete(context.children[i2]);
5418
+ } else {
5419
+ newChildren.push(null);
5420
+ placeholderValues.set(value, i2);
5421
+ }
5422
+ });
5423
+ if (unused.size && placeholderValues.size) {
5424
+ unused.forEach((child) => {
5425
+ if (placeholderValues.has(child._value)) {
5426
+ newChildren[placeholderValues.get(child._value)] = child;
5427
+ unused.delete(child);
5428
+ placeholderValues.delete(child._value);
5429
+ }
5430
+ });
5431
+ }
5432
+ while (unused.size && placeholderValues.size) {
5433
+ const child = unused.values().next().value;
5434
+ const placeholders = placeholderValues[Symbol.iterator]();
5435
+ const [value, index2] = placeholders.next().value;
5436
+ newChildren[index2] = child;
5437
+ unused.delete(child);
5438
+ placeholderValues.delete(value);
5439
+ }
5440
+ if (placeholderValues.size) {
5441
+ placeholderValues.forEach((index2, value) => {
5442
+ newChildren[index2] = createPlaceholder$1({ value });
5443
+ });
5444
+ }
5445
+ if (unused.size) {
5446
+ unused.forEach((child) => {
5447
+ if (!("__FKP" in child)) {
5448
+ const parent = child._c.parent;
5449
+ if (!parent || isPlaceholder$1(parent))
5450
+ return;
5451
+ parent.ledger.unmerge(child);
5452
+ child._c.parent = null;
5453
+ child.destroy();
5454
+ }
5455
+ });
5456
+ }
5457
+ context.children = newChildren;
5458
+ }
5360
5459
  function disturb$1(node, context) {
5361
5460
  var _a;
5362
5461
  if (context._d <= 0) {
@@ -5396,8 +5495,14 @@ function destroy$1(node, context) {
5396
5495
  node.parent.remove(node);
5397
5496
  }
5398
5497
  deregister$1(node);
5399
- context._value = context.value = void 0;
5400
5498
  node.emit("destroyed", node);
5499
+ context._e.flush();
5500
+ context._value = context.value = void 0;
5501
+ for (const property in context.context) {
5502
+ delete context.context[property];
5503
+ }
5504
+ context.plugins.clear();
5505
+ context.context = null;
5401
5506
  }
5402
5507
  function define$1(node, context, definition2) {
5403
5508
  context.type = definition2.type;
@@ -5456,7 +5561,13 @@ function addChild$1(parent, parentContext, child, listIndex) {
5456
5561
  }
5457
5562
  if (!parentContext.children.includes(child)) {
5458
5563
  if (listIndex !== void 0 && parent.type === "list") {
5459
- parentContext.children.splice(listIndex, 0, child);
5564
+ const existingNode = parentContext.children[listIndex];
5565
+ if (existingNode && "__FKP" in existingNode) {
5566
+ child._c.uid = existingNode.uid;
5567
+ parentContext.children.splice(listIndex, 1, child);
5568
+ } else {
5569
+ parentContext.children.splice(listIndex, 0, child);
5570
+ }
5460
5571
  if (Array.isArray(parent.value) && parent.value.length < parentContext.children.length) {
5461
5572
  parent.disturb().calm({
5462
5573
  name: listIndex,
@@ -5528,13 +5639,18 @@ function removeChild$1(node, context, child) {
5528
5639
  return node;
5529
5640
  }
5530
5641
  function eachChild$1(_node, context, callback) {
5531
- context.children.forEach((child) => callback(child));
5642
+ context.children.forEach((child) => !("__FKP" in child) && callback(child));
5532
5643
  }
5533
- function walkTree$1(_node, context, callback, stopIfFalse = false) {
5534
- context.children.forEach((child) => {
5535
- if (callback(child) !== false || !stopIfFalse) {
5536
- child.walk(callback, stopIfFalse);
5537
- }
5644
+ function walkTree$1(_node, context, callback, stopIfFalse = false, skipSubtreeOnFalse = false) {
5645
+ context.children.some((child) => {
5646
+ if ("__FKP" in child)
5647
+ return false;
5648
+ const val = callback(child);
5649
+ if (stopIfFalse && val === false)
5650
+ return true;
5651
+ if (skipSubtreeOnFalse && val === false)
5652
+ return false;
5653
+ return child.walk(callback, stopIfFalse, skipSubtreeOnFalse);
5538
5654
  });
5539
5655
  }
5540
5656
  function resetConfig$1(node, context) {
@@ -5618,7 +5734,7 @@ function getNode$2(node, _context, locator) {
5618
5734
  pointer = node;
5619
5735
  break;
5620
5736
  default:
5621
- pointer = pointer.children.find((c2) => String(c2.name) === String(name)) || select$3(pointer, name);
5737
+ pointer = pointer.children.find((c2) => !("__FKP" in c2) && String(c2.name) === String(name)) || select$3(pointer, name);
5622
5738
  }
5623
5739
  }
5624
5740
  return pointer || void 0;
@@ -5645,6 +5761,8 @@ function bfs$1(tree, searchValue, searchGoal = "name") {
5645
5761
  const stack = [tree];
5646
5762
  while (stack.length) {
5647
5763
  const node = stack.shift();
5764
+ if ("__FKP" in node)
5765
+ continue;
5648
5766
  if (search(node, searchValue))
5649
5767
  return node;
5650
5768
  stack.push(...node.children);
@@ -5702,7 +5820,7 @@ function createConfig$2(target = {}, parent) {
5702
5820
  if (node) {
5703
5821
  node.emit(`config:${prop}`, value, false);
5704
5822
  configChange$1(node, prop, value);
5705
- node.walk((n) => configChange$1(n, prop, value), true);
5823
+ node.walk((n) => configChange$1(n, prop, value), false, true);
5706
5824
  }
5707
5825
  return didSet;
5708
5826
  }
@@ -5752,6 +5870,32 @@ function clearErrors$1$1(node, context, clearChildErrors = true, sourceKey) {
5752
5870
  }
5753
5871
  return node;
5754
5872
  }
5873
+ function extend$2(node, context, property, trap2) {
5874
+ context.traps.set(property, trap2);
5875
+ return node;
5876
+ }
5877
+ function createPlaceholder$1(options2) {
5878
+ var _a, _b, _f, _g;
5879
+ return {
5880
+ __FKP: true,
5881
+ uid: Symbol(),
5882
+ name: (_a = options2 === null || options2 === void 0 ? void 0 : options2.name) !== null && _a !== void 0 ? _a : `p_${nameCount$1++}`,
5883
+ value: (_b = options2 === null || options2 === void 0 ? void 0 : options2.value) !== null && _b !== void 0 ? _b : null,
5884
+ _value: (_f = options2 === null || options2 === void 0 ? void 0 : options2.value) !== null && _f !== void 0 ? _f : null,
5885
+ type: (_g = options2 === null || options2 === void 0 ? void 0 : options2.type) !== null && _g !== void 0 ? _g : "input",
5886
+ use: () => {
5887
+ },
5888
+ input(value) {
5889
+ this._value = value;
5890
+ this.value = value;
5891
+ return Promise.resolve();
5892
+ },
5893
+ isSettled: true
5894
+ };
5895
+ }
5896
+ function isPlaceholder$1(node) {
5897
+ return "__FKP" in node;
5898
+ }
5755
5899
  const autoFocusTypes = [
5756
5900
  "email",
5757
5901
  "number",
@@ -5772,8 +5916,8 @@ function useSteps() {
5772
5916
  return x2.value[x2.value.length - 1];
5773
5917
  };
5774
5918
  const findFirstInput = (n) => {
5775
- for (var i3 = 0; i3 < n.children.length; i3++) {
5776
- const child = n.children[i3];
5919
+ for (var i2 = 0; i2 < n.children.length; i2++) {
5920
+ const child = n.children[i2];
5777
5921
  if ((child.type === "input" || child.type === "list") && !(child.context.type === "hidden")) {
5778
5922
  return child;
5779
5923
  }
@@ -5858,18 +6002,23 @@ function useSteps() {
5858
6002
  })
5859
6003
  );
5860
6004
  });
6005
+ if (!node.context) {
6006
+ console.warn("No context found for node:", node);
6007
+ return false;
6008
+ }
5861
6009
  if (!node.context.state.valid) {
5862
6010
  return false;
5863
6011
  }
5864
6012
  }
6013
+ var nextStepsOverride;
5865
6014
  if (preStep) {
5866
- preStep(node);
6015
+ nextStepsOverride = preStep(node);
5867
6016
  }
5868
- if (node.props.attrs.nextStepMap) {
5869
- const nextSteps = getNextStepsFromMap(node, node.props.attrs.nextStepMap);
5870
- if (nextSteps) {
5871
- setStepQueue([activeStep2.value, ...nextSteps]);
5872
- }
6017
+ if (!nextStepsOverride && node.props.attrs.nextStepMap) {
6018
+ nextStepsOverride = getNextStepsFromMap(node, node.props.attrs.nextStepMap);
6019
+ }
6020
+ if (nextStepsOverride) {
6021
+ setStepQueue([activeStep2.value, ...nextStepsOverride]);
5873
6022
  }
5874
6023
  if (typeof nextStep === "number") {
5875
6024
  advanceStep(nextStep);
@@ -6169,7 +6318,7 @@ function isPojo(o) {
6169
6318
  }
6170
6319
  return true;
6171
6320
  }
6172
- function extend(original, additional, extendArrays = false, ignoreUndefined = false) {
6321
+ function extend$1(original, additional, extendArrays = false, ignoreUndefined = false) {
6173
6322
  if (additional === null)
6174
6323
  return null;
6175
6324
  const merged = {};
@@ -6185,7 +6334,7 @@ function extend(original, additional, extendArrays = false, ignoreUndefined = fa
6185
6334
  continue;
6186
6335
  }
6187
6336
  if (isPojo(original[key]) && isPojo(additional[key])) {
6188
- merged[key] = extend(original[key], additional[key], extendArrays, ignoreUndefined);
6337
+ merged[key] = extend$1(original[key], additional[key], extendArrays, ignoreUndefined);
6189
6338
  } else {
6190
6339
  merged[key] = additional[key];
6191
6340
  }
@@ -6216,16 +6365,16 @@ function isQuotedString(str) {
6216
6365
  function rmEscapes(str) {
6217
6366
  if (!str.length)
6218
6367
  return "";
6219
- let clean = "";
6368
+ let clean2 = "";
6220
6369
  let lastChar = "";
6221
6370
  for (let p2 = 0; p2 < str.length; p2++) {
6222
6371
  const char = str.charAt(p2);
6223
6372
  if (char !== "\\" || lastChar === "\\") {
6224
- clean += char;
6373
+ clean2 += char;
6225
6374
  }
6226
6375
  lastChar = char;
6227
6376
  }
6228
- return clean;
6377
+ return clean2;
6229
6378
  }
6230
6379
  function nodeProps(...sets) {
6231
6380
  return sets.reduce((valid, props2) => {
@@ -6264,30 +6413,30 @@ function parseArgs(str) {
6264
6413
  return args;
6265
6414
  }
6266
6415
  function except(obj, toRemove) {
6267
- const clean = {};
6416
+ const clean2 = {};
6268
6417
  const exps = toRemove.filter((n) => n instanceof RegExp);
6269
6418
  const keysToRemove = new Set(toRemove);
6270
6419
  for (const key in obj) {
6271
6420
  if (!keysToRemove.has(key) && !exps.some((exp) => exp.test(key))) {
6272
- clean[key] = obj[key];
6421
+ clean2[key] = obj[key];
6273
6422
  }
6274
6423
  }
6275
- return clean;
6424
+ return clean2;
6276
6425
  }
6277
6426
  function only(obj, include) {
6278
- const clean = {};
6427
+ const clean2 = {};
6279
6428
  const exps = include.filter((n) => n instanceof RegExp);
6280
6429
  include.forEach((key) => {
6281
6430
  if (!(key instanceof RegExp)) {
6282
- clean[key] = obj[key];
6431
+ clean2[key] = obj[key];
6283
6432
  }
6284
6433
  });
6285
6434
  Object.keys(obj).forEach((key) => {
6286
6435
  if (exps.some((exp) => exp.test(key))) {
6287
- clean[key] = obj[key];
6436
+ clean2[key] = obj[key];
6288
6437
  }
6289
6438
  });
6290
- return clean;
6439
+ return clean2;
6291
6440
  }
6292
6441
  function camel(str) {
6293
6442
  return str.replace(/-([a-z0-9])/gi, (_s, g) => g.toUpperCase());
@@ -6343,12 +6492,12 @@ function getAt(obj, addr) {
6343
6492
  return null;
6344
6493
  const segments = addr.split(".");
6345
6494
  let o = obj;
6346
- for (const i3 in segments) {
6347
- const segment = segments[i3];
6495
+ for (const i2 in segments) {
6496
+ const segment = segments[i2];
6348
6497
  if (has(o, segment)) {
6349
6498
  o = o[segment];
6350
6499
  }
6351
- if (+i3 === segments.length - 1)
6500
+ if (+i2 === segments.length - 1)
6352
6501
  return o;
6353
6502
  if (!o || typeof o !== "object")
6354
6503
  return null;
@@ -6378,7 +6527,17 @@ function applyExplicit(original, obj, explicit) {
6378
6527
  }
6379
6528
  return obj;
6380
6529
  }
6381
- function createDispatcher$1() {
6530
+ function oncePerTick(fn) {
6531
+ let called = false;
6532
+ return (...args) => {
6533
+ if (called)
6534
+ return;
6535
+ called = true;
6536
+ queueMicrotask(() => called = false);
6537
+ return fn(...args);
6538
+ };
6539
+ }
6540
+ function createDispatcher() {
6382
6541
  const middleware = [];
6383
6542
  let currentIndex = 0;
6384
6543
  const use2 = (dispatchable) => middleware.push(dispatchable);
@@ -6422,6 +6581,11 @@ function createEmitter() {
6422
6581
  node.bubble(event);
6423
6582
  }
6424
6583
  };
6584
+ emitter.flush = () => {
6585
+ listeners.clear();
6586
+ receipts2.clear();
6587
+ buffer === null || buffer === void 0 ? void 0 : buffer.clear();
6588
+ };
6425
6589
  emitter.on = (eventName, listener) => {
6426
6590
  const [event, ...modifiers] = eventName.split(".");
6427
6591
  const receipt = listener.receipt || token();
@@ -6488,13 +6652,13 @@ function off(node, context, receipt) {
6488
6652
  context._e.off(receipt);
6489
6653
  return node;
6490
6654
  }
6491
- const errorHandler = createDispatcher$1();
6655
+ const errorHandler = createDispatcher();
6492
6656
  errorHandler((error2, next) => {
6493
6657
  if (!error2.message)
6494
6658
  error2.message = String(`E${error2.code}`);
6495
6659
  return next(error2);
6496
6660
  });
6497
- const warningHandler = createDispatcher$1();
6661
+ const warningHandler = createDispatcher();
6498
6662
  warningHandler((warning, next) => {
6499
6663
  if (!warning.message)
6500
6664
  warning.message = String(`W${warning.code}`);
@@ -6886,10 +7050,13 @@ function reset(id, resetTo) {
6886
7050
  if (node) {
6887
7051
  const initial = (n) => cloneAny(n.props.initial) || (n.type === "group" ? {} : n.type === "list" ? [] : void 0);
6888
7052
  node._e.pause(node);
6889
- node.input(cloneAny(resetTo) || initial(node), false);
7053
+ const resetValue2 = cloneAny(resetTo);
7054
+ if (resetTo && !empty(resetTo)) {
7055
+ node.props.initial = isObject(resetValue2) ? init$1(resetValue2) : resetValue2;
7056
+ }
7057
+ node.input(initial(node), false);
6890
7058
  node.walk((child) => child.input(initial(child), false));
6891
- const finalInit = initial(node);
6892
- node.input(typeof finalInit === "object" ? cloneAny(resetTo) || init$1(finalInit) : finalInit, false);
7059
+ node.input(empty(resetValue2) && resetValue2 ? resetValue2 : initial(node), false);
6893
7060
  node._e.play(node);
6894
7061
  clearState(node);
6895
7062
  node.emit("reset", node);
@@ -6930,6 +7097,7 @@ const traps = {
6930
7097
  define: trap(define),
6931
7098
  disturb: trap(disturb),
6932
7099
  destroy: trap(destroy),
7100
+ extend: trap(extend),
6933
7101
  hydrate: trap(hydrate),
6934
7102
  index: trap(getIndex, setIndex, false),
6935
7103
  input: trap(input),
@@ -6965,7 +7133,7 @@ function createHooks() {
6965
7133
  return new Proxy(hooks, {
6966
7134
  get(_, property) {
6967
7135
  if (!hooks.has(property)) {
6968
- hooks.set(property, createDispatcher$1());
7136
+ hooks.set(property, createDispatcher());
6969
7137
  }
6970
7138
  return hooks.get(property);
6971
7139
  }
@@ -6990,6 +7158,10 @@ function createValue(options2) {
6990
7158
  function input(node, context, value, async = true) {
6991
7159
  context._value = validateInput(node, node.hook.input.dispatch(value));
6992
7160
  node.emit("input", context._value);
7161
+ if (node.isCreated && node.type === "input" && eq(context._value, context.value)) {
7162
+ node.emit("commitRaw", context.value);
7163
+ return context.settled;
7164
+ }
6993
7165
  if (context.isSettled)
6994
7166
  node.disturb();
6995
7167
  if (async) {
@@ -7020,6 +7192,7 @@ function commit(node, context, calm2 = true, hydrate2 = true) {
7020
7192
  context._value = context.value = node.hook.commit.dispatch(context._value);
7021
7193
  if (node.type !== "input" && hydrate2)
7022
7194
  node.hydrate();
7195
+ node.emit("commitRaw", context.value);
7023
7196
  node.emit("commit", context.value);
7024
7197
  if (calm2)
7025
7198
  node.calm();
@@ -7040,11 +7213,15 @@ function partial(context, { name, value, from }) {
7040
7213
  }
7041
7214
  function hydrate(node, context) {
7042
7215
  const _value = context._value;
7216
+ if (node.type === "list" && node.sync)
7217
+ syncListNodes(node, context);
7043
7218
  context.children.forEach((child) => {
7044
7219
  if (typeof _value !== "object")
7045
7220
  return;
7046
7221
  if (child.name in _value) {
7047
7222
  const childValue = child.type !== "input" || _value[child.name] && typeof _value[child.name] === "object" ? init$1(_value[child.name]) : _value[child.name];
7223
+ if (!child.isSettled || !isObject(childValue) && eq(childValue, child._value))
7224
+ return;
7048
7225
  child.input(childValue, false);
7049
7226
  } else {
7050
7227
  if (node.type !== "list" || typeof child.name === "number") {
@@ -7062,6 +7239,58 @@ function hydrate(node, context) {
7062
7239
  });
7063
7240
  return node;
7064
7241
  }
7242
+ function syncListNodes(node, context) {
7243
+ const _value = node._value;
7244
+ if (!Array.isArray(_value))
7245
+ return;
7246
+ const newChildren = [];
7247
+ const unused = new Set(context.children);
7248
+ const placeholderValues = /* @__PURE__ */ new Map();
7249
+ _value.forEach((value, i2) => {
7250
+ if (context.children[i2] && context.children[i2]._value === value) {
7251
+ newChildren.push(context.children[i2]);
7252
+ unused.delete(context.children[i2]);
7253
+ } else {
7254
+ newChildren.push(null);
7255
+ placeholderValues.set(value, i2);
7256
+ }
7257
+ });
7258
+ if (unused.size && placeholderValues.size) {
7259
+ unused.forEach((child) => {
7260
+ if (placeholderValues.has(child._value)) {
7261
+ newChildren[placeholderValues.get(child._value)] = child;
7262
+ unused.delete(child);
7263
+ placeholderValues.delete(child._value);
7264
+ }
7265
+ });
7266
+ }
7267
+ while (unused.size && placeholderValues.size) {
7268
+ const child = unused.values().next().value;
7269
+ const placeholders = placeholderValues[Symbol.iterator]();
7270
+ const [value, index2] = placeholders.next().value;
7271
+ newChildren[index2] = child;
7272
+ unused.delete(child);
7273
+ placeholderValues.delete(value);
7274
+ }
7275
+ if (placeholderValues.size) {
7276
+ placeholderValues.forEach((index2, value) => {
7277
+ newChildren[index2] = createPlaceholder({ value });
7278
+ });
7279
+ }
7280
+ if (unused.size) {
7281
+ unused.forEach((child) => {
7282
+ if (!("__FKP" in child)) {
7283
+ const parent = child._c.parent;
7284
+ if (!parent || isPlaceholder(parent))
7285
+ return;
7286
+ parent.ledger.unmerge(child);
7287
+ child._c.parent = null;
7288
+ child.destroy();
7289
+ }
7290
+ });
7291
+ }
7292
+ context.children = newChildren;
7293
+ }
7065
7294
  function disturb(node, context) {
7066
7295
  var _a;
7067
7296
  if (context._d <= 0) {
@@ -7101,8 +7330,14 @@ function destroy(node, context) {
7101
7330
  node.parent.remove(node);
7102
7331
  }
7103
7332
  deregister(node);
7104
- context._value = context.value = void 0;
7105
7333
  node.emit("destroyed", node);
7334
+ context._e.flush();
7335
+ context._value = context.value = void 0;
7336
+ for (const property in context.context) {
7337
+ delete context.context[property];
7338
+ }
7339
+ context.plugins.clear();
7340
+ context.context = null;
7106
7341
  }
7107
7342
  function define(node, context, definition2) {
7108
7343
  context.type = definition2.type;
@@ -7161,7 +7396,13 @@ function addChild(parent, parentContext, child, listIndex) {
7161
7396
  }
7162
7397
  if (!parentContext.children.includes(child)) {
7163
7398
  if (listIndex !== void 0 && parent.type === "list") {
7164
- parentContext.children.splice(listIndex, 0, child);
7399
+ const existingNode = parentContext.children[listIndex];
7400
+ if (existingNode && "__FKP" in existingNode) {
7401
+ child._c.uid = existingNode.uid;
7402
+ parentContext.children.splice(listIndex, 1, child);
7403
+ } else {
7404
+ parentContext.children.splice(listIndex, 0, child);
7405
+ }
7165
7406
  if (Array.isArray(parent.value) && parent.value.length < parentContext.children.length) {
7166
7407
  parent.disturb().calm({
7167
7408
  name: listIndex,
@@ -7233,13 +7474,18 @@ function removeChild(node, context, child) {
7233
7474
  return node;
7234
7475
  }
7235
7476
  function eachChild(_node, context, callback) {
7236
- context.children.forEach((child) => callback(child));
7477
+ context.children.forEach((child) => !("__FKP" in child) && callback(child));
7237
7478
  }
7238
- function walkTree(_node, context, callback, stopIfFalse = false) {
7239
- context.children.forEach((child) => {
7240
- if (callback(child) !== false || !stopIfFalse) {
7241
- child.walk(callback, stopIfFalse);
7242
- }
7479
+ function walkTree(_node, context, callback, stopIfFalse = false, skipSubtreeOnFalse = false) {
7480
+ context.children.some((child) => {
7481
+ if ("__FKP" in child)
7482
+ return false;
7483
+ const val = callback(child);
7484
+ if (stopIfFalse && val === false)
7485
+ return true;
7486
+ if (skipSubtreeOnFalse && val === false)
7487
+ return false;
7488
+ return child.walk(callback, stopIfFalse, skipSubtreeOnFalse);
7243
7489
  });
7244
7490
  }
7245
7491
  function resetConfig(node, context) {
@@ -7323,7 +7569,7 @@ function getNode(node, _context, locator) {
7323
7569
  pointer = node;
7324
7570
  break;
7325
7571
  default:
7326
- pointer = pointer.children.find((c2) => String(c2.name) === String(name)) || select$2(pointer, name);
7572
+ pointer = pointer.children.find((c2) => !("__FKP" in c2) && String(c2.name) === String(name)) || select$2(pointer, name);
7327
7573
  }
7328
7574
  }
7329
7575
  return pointer || void 0;
@@ -7350,6 +7596,8 @@ function bfs(tree, searchValue, searchGoal = "name") {
7350
7596
  const stack = [tree];
7351
7597
  while (stack.length) {
7352
7598
  const node = stack.shift();
7599
+ if ("__FKP" in node)
7600
+ continue;
7353
7601
  if (search(node, searchValue))
7354
7602
  return node;
7355
7603
  stack.push(...node.children);
@@ -7407,7 +7655,7 @@ function createConfig(target = {}, parent) {
7407
7655
  if (node) {
7408
7656
  node.emit(`config:${prop}`, value, false);
7409
7657
  configChange(node, prop, value);
7410
- node.walk((n) => configChange(n, prop, value), true);
7658
+ node.walk((n) => configChange(n, prop, value), false, true);
7411
7659
  }
7412
7660
  return didSet;
7413
7661
  }
@@ -7503,6 +7751,10 @@ function createProps(initial) {
7503
7751
  }
7504
7752
  });
7505
7753
  }
7754
+ function extend(node, context, property, trap2) {
7755
+ context.traps.set(property, trap2);
7756
+ return node;
7757
+ }
7506
7758
  function findDefinition(node, plugins) {
7507
7759
  if (node.props.definition)
7508
7760
  return node.define(node.props.definition);
@@ -7520,6 +7772,7 @@ function createContext(options2) {
7520
7772
  return {
7521
7773
  _d: 0,
7522
7774
  _e: createEmitter(),
7775
+ uid: Symbol(),
7523
7776
  _resolve: false,
7524
7777
  _tmo: false,
7525
7778
  _value: value,
@@ -7535,6 +7788,7 @@ function createContext(options2) {
7535
7788
  props: createProps(value),
7536
7789
  settled: Promise.resolve(value),
7537
7790
  store: createStore(true),
7791
+ sync: options2.sync || false,
7538
7792
  traps: createTraps(),
7539
7793
  type: options2.type || "input",
7540
7794
  value
@@ -7570,6 +7824,28 @@ function nodeInit(node, options2) {
7570
7824
  node.isCreated = true;
7571
7825
  return node;
7572
7826
  }
7827
+ function createPlaceholder(options2) {
7828
+ var _a, _b, _f, _g;
7829
+ return {
7830
+ __FKP: true,
7831
+ uid: Symbol(),
7832
+ name: (_a = options2 === null || options2 === void 0 ? void 0 : options2.name) !== null && _a !== void 0 ? _a : `p_${nameCount++}`,
7833
+ value: (_b = options2 === null || options2 === void 0 ? void 0 : options2.value) !== null && _b !== void 0 ? _b : null,
7834
+ _value: (_f = options2 === null || options2 === void 0 ? void 0 : options2.value) !== null && _f !== void 0 ? _f : null,
7835
+ type: (_g = options2 === null || options2 === void 0 ? void 0 : options2.type) !== null && _g !== void 0 ? _g : "input",
7836
+ use: () => {
7837
+ },
7838
+ input(value) {
7839
+ this._value = value;
7840
+ this.value = value;
7841
+ return Promise.resolve();
7842
+ },
7843
+ isSettled: true
7844
+ };
7845
+ }
7846
+ function isPlaceholder(node) {
7847
+ return "__FKP" in node;
7848
+ }
7573
7849
  function createNode(options2) {
7574
7850
  const ops = options2 || {};
7575
7851
  const context = createContext(ops);
@@ -7662,11 +7938,11 @@ function compile(expr) {
7662
7938
  const candidates = symbols.filter((s3) => s3.startsWith(char));
7663
7939
  if (!candidates.length)
7664
7940
  return false;
7665
- return candidates.find((symbol) => {
7666
- if (expression.length >= p2 + symbol.length) {
7667
- const nextChars = expression.substring(p2, p2 + symbol.length);
7668
- if (nextChars === symbol)
7669
- return symbol;
7941
+ return candidates.find((symbol2) => {
7942
+ if (expression.length >= p2 + symbol2.length) {
7943
+ const nextChars = expression.substring(p2, p2 + symbol2.length);
7944
+ if (nextChars === symbol2)
7945
+ return symbol2;
7670
7946
  }
7671
7947
  return false;
7672
7948
  });
@@ -7952,9 +8228,9 @@ function clearErrors(id, clearChildren = true) {
7952
8228
  warn(652, id);
7953
8229
  }
7954
8230
  }
7955
- const FORMKIT_VERSION = "0.16.4";
8231
+ const FORMKIT_VERSION = "0.17.0";
7956
8232
  function createLibraryPlugin(...libraries) {
7957
- const library = libraries.reduce((merged, lib) => extend(merged, lib), {});
8233
+ const library = libraries.reduce((merged, lib) => extend$1(merged, lib), {});
7958
8234
  const plugin2 = () => {
7959
8235
  };
7960
8236
  plugin2.library = function(node) {
@@ -7966,7 +8242,7 @@ function createLibraryPlugin(...libraries) {
7966
8242
  return plugin2;
7967
8243
  }
7968
8244
  function normalizeOptions(options2) {
7969
- let i3 = 1;
8245
+ let i2 = 1;
7970
8246
  if (Array.isArray(options2)) {
7971
8247
  return options2.map((option2) => {
7972
8248
  if (typeof option2 === "string" || typeof option2 === "number") {
@@ -7978,7 +8254,7 @@ function normalizeOptions(options2) {
7978
8254
  if (typeof option2 == "object") {
7979
8255
  if ("value" in option2 && typeof option2.value !== "string") {
7980
8256
  Object.assign(option2, {
7981
- value: `__mask_${i3++}`,
8257
+ value: `__mask_${i2++}`,
7982
8258
  __original: option2.value
7983
8259
  });
7984
8260
  }
@@ -8025,6 +8301,51 @@ function options(node) {
8025
8301
  return next(prop);
8026
8302
  });
8027
8303
  }
8304
+ function createSection(section, el, fragment2 = false) {
8305
+ return (...children) => {
8306
+ const extendable = (extensions) => {
8307
+ const node = !el || typeof el === "string" ? { $el: el } : el();
8308
+ if (isDOM(node) || isComponent$1(node)) {
8309
+ if (!node.meta) {
8310
+ node.meta = { section };
8311
+ }
8312
+ if (children.length && !node.children) {
8313
+ node.children = [
8314
+ ...children.map((child) => typeof child === "string" ? child : child(extensions))
8315
+ ];
8316
+ }
8317
+ if (isDOM(node)) {
8318
+ node.attrs = __spreadValues({
8319
+ class: `$classes.${section}`
8320
+ }, node.attrs || {});
8321
+ }
8322
+ }
8323
+ return {
8324
+ if: `$slots.${section}`,
8325
+ then: `$slots.${section}`,
8326
+ else: section in extensions ? extendSchema(node, extensions[section]) : node
8327
+ };
8328
+ };
8329
+ extendable._s = section;
8330
+ return fragment2 ? createRoot(extendable) : extendable;
8331
+ };
8332
+ }
8333
+ function createRoot(rootSection) {
8334
+ return (extensions) => {
8335
+ return [rootSection(extensions)];
8336
+ };
8337
+ }
8338
+ function isSchemaObject(schema) {
8339
+ return typeof schema === "object" && ("$el" in schema || "$cmp" in schema || "$formkit" in schema);
8340
+ }
8341
+ function extendSchema(schema, extension = {}) {
8342
+ if (typeof schema === "string") {
8343
+ return isSchemaObject(extension) || typeof extension === "string" ? extension : schema;
8344
+ } else if (Array.isArray(schema)) {
8345
+ return isSchemaObject(extension) ? extension : schema;
8346
+ }
8347
+ return extend$1(schema, extension);
8348
+ }
8028
8349
  const outer = createSection("outer", () => ({
8029
8350
  $el: "div",
8030
8351
  attrs: {
@@ -8042,7 +8363,7 @@ const outer = createSection("outer", () => ({
8042
8363
  "data-prefix-icon-click": "$onPrefixIconClick !== undefined || undefined",
8043
8364
  "data-suffix-icon-click": "$onSuffixIconClick !== undefined || undefined"
8044
8365
  }
8045
- }), true);
8366
+ }));
8046
8367
  const inner = createSection("inner", "div");
8047
8368
  const wrapper = createSection("wrapper", "div");
8048
8369
  const label = createSection("label", () => ({
@@ -8216,7 +8537,7 @@ const formInput = createSection("form", () => ({
8216
8537
  onSubmit: "$handlers.submit",
8217
8538
  "data-loading": "$state.loading || undefined"
8218
8539
  }
8219
- }), true);
8540
+ }));
8220
8541
  const actions = createSection("actions", () => ({
8221
8542
  $el: "div",
8222
8543
  if: "$actions"
@@ -8314,7 +8635,7 @@ function normalizeBoxes(node) {
8314
8635
  prop.value = prop.value.map((option2) => {
8315
8636
  var _a;
8316
8637
  if (!((_a = option2.attrs) === null || _a === void 0 ? void 0 : _a.id)) {
8317
- return extend(option2, {
8638
+ return extend$1(option2, {
8318
8639
  attrs: {
8319
8640
  id: `${node.name}-option-${slugify(String(option2.value))}`
8320
8641
  }
@@ -8386,6 +8707,7 @@ function checkboxes(node) {
8386
8707
  function disables(node) {
8387
8708
  node.on("created", () => {
8388
8709
  node.props.disabled = undefine(node.props.disabled);
8710
+ node.config.disabled = undefine(node.props.disabled);
8389
8711
  });
8390
8712
  node.hook.prop(({ prop, value }, next) => {
8391
8713
  value = prop === "disabled" ? undefine(value) : value;
@@ -8394,9 +8716,6 @@ function disables(node) {
8394
8716
  node.on("prop:disabled", ({ payload: value }) => {
8395
8717
  node.config.disabled = undefine(value);
8396
8718
  });
8397
- node.on("created", () => {
8398
- node.config.disabled = undefine(node.props.disabled);
8399
- });
8400
8719
  }
8401
8720
  function localize$2(key, value) {
8402
8721
  return (node) => {
@@ -8458,9 +8777,9 @@ function files(node) {
8458
8777
  var _a, _b;
8459
8778
  const files2 = [];
8460
8779
  if (e2.target instanceof HTMLInputElement && e2.target.files) {
8461
- for (let i3 = 0; i3 < e2.target.files.length; i3++) {
8780
+ for (let i2 = 0; i2 < e2.target.files.length; i2++) {
8462
8781
  let file2;
8463
- if (file2 = e2.target.files.item(i3)) {
8782
+ if (file2 = e2.target.files.item(i2)) {
8464
8783
  files2.push({ name: file2.name, file: file2 });
8465
8784
  }
8466
8785
  }
@@ -8571,7 +8890,10 @@ function radios(node) {
8571
8890
  node.on("created", () => {
8572
8891
  var _a, _b;
8573
8892
  if (!Array.isArray(node.props.options)) {
8574
- warn(350, node);
8893
+ warn(350, {
8894
+ node,
8895
+ inputType: "radio"
8896
+ });
8575
8897
  }
8576
8898
  if ((_a = node.context) === null || _a === void 0 ? void 0 : _a.handlers) {
8577
8899
  node.context.handlers.toggleChecked = toggleChecked.bind(null, node);
@@ -8683,60 +9005,15 @@ function defaultIcon(sectionKey, defaultIcon2) {
8683
9005
  }
8684
9006
  };
8685
9007
  }
8686
- function isSchemaObject(schema) {
8687
- return typeof schema === "object" && ("$el" in schema || "$cmp" in schema || "$formkit" in schema);
8688
- }
8689
9008
  function isSlotCondition(node) {
8690
9009
  if (isConditional(node) && node.if && node.if.startsWith("$slots.") && typeof node.then === "string" && node.then.startsWith("$slots.") && "else" in node) {
8691
9010
  return true;
8692
9011
  }
8693
9012
  return false;
8694
9013
  }
8695
- function extendSchema(schema, extension = {}) {
8696
- if (typeof schema === "string") {
8697
- return isSchemaObject(extension) || typeof extension === "string" ? extension : schema;
8698
- } else if (Array.isArray(schema)) {
8699
- return isSchemaObject(extension) ? extension : schema;
8700
- }
8701
- return extend(schema, extension);
8702
- }
8703
9014
  function useSchema(inputSection) {
8704
9015
  return outer(wrapper(label("$label"), inner(prefix(), inputSection(), suffix())), help("$help"), messages$1(message$1("$message.value")));
8705
9016
  }
8706
- function createSection(section, el, root = false) {
8707
- return (...children) => {
8708
- const extendable = (extensions) => {
8709
- const node = !el || typeof el === "string" ? { $el: el } : el();
8710
- if (isDOM(node) || isComponent$1(node)) {
8711
- if (!node.meta) {
8712
- node.meta = { section };
8713
- }
8714
- if (children.length && !node.children) {
8715
- node.children = [
8716
- ...children.map((child) => typeof child === "string" ? child : child(extensions))
8717
- ];
8718
- }
8719
- if (isDOM(node)) {
8720
- node.attrs = __spreadValues({
8721
- class: `$classes.${section}`
8722
- }, node.attrs || {});
8723
- }
8724
- }
8725
- return {
8726
- if: `$slots.${section}`,
8727
- then: `$slots.${section}`,
8728
- else: section in extensions ? extendSchema(node, extensions[section]) : node
8729
- };
8730
- };
8731
- extendable._s = section;
8732
- return root ? createRoot(extendable) : extendable;
8733
- };
8734
- }
8735
- function createRoot(rootSection) {
8736
- return (extensions) => {
8737
- return [rootSection(extensions)];
8738
- };
8739
- }
8740
9017
  function $if(condition, then, otherwise) {
8741
9018
  const extendable = (extensions) => {
8742
9019
  const node = then(extensions);
@@ -8773,15 +9050,13 @@ function $extend(section, extendWith) {
8773
9050
  extendable._s = section._s;
8774
9051
  return extendable;
8775
9052
  }
8776
- function $root(section) {
8777
- return createRoot(section);
8778
- }
8779
9053
  const button = {
8780
9054
  schema: outer(messages$1(message$1("$message.value")), wrapper(buttonInput(icon("prefix"), prefix(), buttonLabel("$label || $ui.submit.value"), suffix(), icon("suffix"))), help("$help")),
8781
9055
  type: "input",
8782
9056
  family: "button",
8783
9057
  props: [],
8784
- features: [localize$2("submit"), ignore]
9058
+ features: [localize$2("submit"), ignore],
9059
+ schemaMemoKey: "h6st4epl3j8"
8785
9060
  };
8786
9061
  const checkbox = {
8787
9062
  schema: outer(
@@ -8811,7 +9086,8 @@ const checkbox = {
8811
9086
  options,
8812
9087
  checkboxes,
8813
9088
  defaultIcon("decorator", "checkboxDecorator")
8814
- ]
9089
+ ],
9090
+ schemaMemoKey: "qje02tb3gu8"
8815
9091
  };
8816
9092
  const file = {
8817
9093
  schema: outer(wrapper(label("$label"), inner(icon("prefix", "label"), prefix(), fileInput(), fileList(fileItem(icon("fileItem"), fileName("$file.name"), $if("$value.length === 1", fileRemove(icon("fileRemove"), "$ui.remove.value")))), $if("$value.length > 1", fileRemove("$ui.removeAll.value")), noFiles(icon("noFiles"), "$ui.noFiles.value"), suffix(), icon("suffix"))), help("$help"), messages$1(message$1("$message.value"))),
@@ -8823,7 +9099,8 @@ const file = {
8823
9099
  defaultIcon("fileItem", "fileItem"),
8824
9100
  defaultIcon("fileRemove", "fileRemove"),
8825
9101
  defaultIcon("noFiles", "noFiles")
8826
- ]
9102
+ ],
9103
+ schemaMemoKey: "9kqc4852fv8"
8827
9104
  };
8828
9105
  const form = {
8829
9106
  schema: formInput("$slots.default", messages$1(message$1("$message.value")), actions(submitInput())),
@@ -8836,7 +9113,8 @@ const form = {
8836
9113
  "submitBehavior",
8837
9114
  "incompleteMessage"
8838
9115
  ],
8839
- features: [form$1, disables]
9116
+ features: [form$1, disables],
9117
+ schemaMemoKey: "5bg016redjo"
8840
9118
  };
8841
9119
  const group = {
8842
9120
  schema: fragment("$slots.default"),
@@ -8845,7 +9123,7 @@ const group = {
8845
9123
  features: [disables]
8846
9124
  };
8847
9125
  const hidden = {
8848
- schema: $root(textInput()),
9126
+ schema: textInput(),
8849
9127
  type: "input",
8850
9128
  props: [],
8851
9129
  features: []
@@ -8868,9 +9146,11 @@ const radio = {
8868
9146
  value: "$option.value",
8869
9147
  checked: "$fns.isChecked($option.value)"
8870
9148
  }
8871
- }), decorator(icon("decorator")), suffix()), $if("$option.label", boxLabel("$option.label"))), boxHelp("$option.help"))))
9149
+ }), decorator(icon("decorator")), suffix()), $extend(boxLabel("$option.label"), {
9150
+ if: "$option.label"
9151
+ })), boxHelp("$option.help"))))
8872
9152
  ),
8873
- $if("$options === undefined && $help", help("$help")),
9153
+ $if("$options == undefined && $help", help("$help")),
8874
9154
  messages$1(message$1("$message.value"))
8875
9155
  ),
8876
9156
  type: "input",
@@ -8881,26 +9161,30 @@ const radio = {
8881
9161
  options,
8882
9162
  radios,
8883
9163
  defaultIcon("decorator", "radioDecorator")
8884
- ]
9164
+ ],
9165
+ schemaMemoKey: "qje02tb3gu8"
8885
9166
  };
8886
9167
  const select = {
8887
9168
  schema: outer(wrapper(label("$label"), inner(icon("prefix"), prefix(), selectInput$1($if("$slots.default", () => "$slots.default", $if("$slots.option", optionSlot, option("$option.label")))), $if("$attrs.multiple !== undefined", () => "", icon("select")), suffix(), icon("suffix"))), help("$help"), messages$1(message$1("$message.value"))),
8888
9169
  type: "input",
8889
9170
  props: ["options", "placeholder", "optionsLoader"],
8890
- features: [options, select$1, defaultIcon("select", "select")]
9171
+ features: [options, select$1, defaultIcon("select", "select")],
9172
+ schemaMemoKey: "cb119h43krg"
8891
9173
  };
8892
9174
  const textarea = {
8893
9175
  schema: outer(wrapper(label("$label"), inner(icon("prefix", "label"), prefix(), textareaInput(), suffix(), icon("suffix"))), help("$help"), messages$1(message$1("$message.value"))),
8894
9176
  type: "input",
8895
9177
  props: [],
8896
- features: [initialValue]
9178
+ features: [initialValue],
9179
+ schemaMemoKey: "b1n0td79m9g"
8897
9180
  };
8898
9181
  const text = {
8899
9182
  schema: outer(wrapper(label("$label"), inner(icon("prefix", "label"), prefix(), textInput(), suffix(), icon("suffix"))), help("$help"), messages$1(message$1("$message.value"))),
8900
9183
  type: "input",
8901
9184
  family: "text",
8902
9185
  props: [],
8903
- features: []
9186
+ features: [],
9187
+ schemaMemoKey: "c3cc4kflsg"
8904
9188
  };
8905
9189
  var index$1 = /* @__PURE__ */ Object.freeze({
8906
9190
  __proto__: null,
@@ -8941,7 +9225,7 @@ const date_after = function({ value }, compare = false) {
8941
9225
  };
8942
9226
  const alpha = function({ value }, set2 = "default") {
8943
9227
  const sets = {
8944
- default: /^[a-zA-ZÀ-ÖØ-öø-ÿĄąĆćČčĎďĘęĚ죳ŃńŇňŘřŚśŠšŤťŮůŹźŻŽžż]+$/,
9228
+ default: /^[\p{Lu}\p{L}]+$/u,
8945
9229
  latin: /^[a-zA-Z]+$/
8946
9230
  };
8947
9231
  const selectedSet = has(sets, set2) ? set2 : "default";
@@ -8949,7 +9233,7 @@ const alpha = function({ value }, set2 = "default") {
8949
9233
  };
8950
9234
  const alpha_spaces = function({ value }, set2 = "default") {
8951
9235
  const sets = {
8952
- default: /^[a-zA-ZÀ-ÖØ-öø-ÿĄąĆćČčĎďĘęĚ죳ŃńŇňŘřŚśŠšŤťŮůŹźŻŽžż ]+$/,
9236
+ default: /^[\p{Lu}\p{L} ]+$/u,
8953
9237
  latin: /^[a-zA-Z ]+$/
8954
9238
  };
8955
9239
  const selectedSet = has(sets, set2) ? set2 : "default";
@@ -8957,8 +9241,8 @@ const alpha_spaces = function({ value }, set2 = "default") {
8957
9241
  };
8958
9242
  const alphanumeric = function({ value }, set2 = "default") {
8959
9243
  const sets = {
8960
- default: /^[a-zA-Z0-9À-ÖØ-öø-ÿĄąĆćĘꣳŃńŚśŹźŻż]+$/,
8961
- latin: /^[a-zA-Z0-9]+$/
9244
+ default: /^[0-9[\p{Lu}\p{L}]+$/u,
9245
+ latin: /^[0-9\p{Latin}]+$/
8962
9246
  };
8963
9247
  const selectedSet = has(sets, set2) ? set2 : "default";
8964
9248
  return sets[selectedSet].test(String(value));
@@ -8987,6 +9271,52 @@ const confirm = function confirm2(node, address, comparison = "loose") {
8987
9271
  const foreignValue = (_a = node.at(address)) === null || _a === void 0 ? void 0 : _a.value;
8988
9272
  return comparison === "strict" ? node.value === foreignValue : node.value == foreignValue;
8989
9273
  };
9274
+ const contains_alpha = function({ value }, set2 = "default") {
9275
+ const sets = {
9276
+ default: /[\p{Lu}\p{L}]/u,
9277
+ latin: /[a-zA-Z]/
9278
+ };
9279
+ const selectedSet = has(sets, set2) ? set2 : "default";
9280
+ return sets[selectedSet].test(String(value));
9281
+ };
9282
+ const contains_alpha_spaces = function({ value }, set2 = "default") {
9283
+ const sets = {
9284
+ default: /[\p{Lu}\p{L} ]/u,
9285
+ latin: /[a-zA-Z ]/
9286
+ };
9287
+ const selectedSet = has(sets, set2) ? set2 : "default";
9288
+ return sets[selectedSet].test(String(value));
9289
+ };
9290
+ const contains_alphanumeric = function({ value }, set2 = "default") {
9291
+ const sets = {
9292
+ default: /[0-9[\p{Lu}\p{L}]/u,
9293
+ latin: /[0-9\p{Latin}]/
9294
+ };
9295
+ const selectedSet = has(sets, set2) ? set2 : "default";
9296
+ return sets[selectedSet].test(String(value));
9297
+ };
9298
+ const contains_lowercase = function({ value }, set2 = "default") {
9299
+ const sets = {
9300
+ default: /[\p{Ll}]/u,
9301
+ latin: /[a-z]/
9302
+ };
9303
+ const selectedSet = has(sets, set2) ? set2 : "default";
9304
+ return sets[selectedSet].test(String(value));
9305
+ };
9306
+ const contains_numeric = function number({ value }) {
9307
+ return /[0-9]/.test(String(value));
9308
+ };
9309
+ const contains_symbol = function({ value }) {
9310
+ return /[!-/:-@[-`{-~]/.test(String(value));
9311
+ };
9312
+ const contains_uppercase = function({ value }, set2 = "default") {
9313
+ const sets = {
9314
+ default: /[\p{Lu}]/u,
9315
+ latin: /[A-Z]/
9316
+ };
9317
+ const selectedSet = has(sets, set2) ? set2 : "default";
9318
+ return sets[selectedSet].test(String(value));
9319
+ };
8990
9320
  const date_between = function date_between2({ value }, dateA, dateB) {
8991
9321
  dateA = dateA instanceof Date ? dateA.getTime() : Date.parse(dateA);
8992
9322
  dateB = dateB instanceof Date ? dateB.getTime() : Date.parse(dateB);
@@ -9040,6 +9370,14 @@ const length = function length2({ value }, first = 0, second = Infinity) {
9040
9370
  }
9041
9371
  return false;
9042
9372
  };
9373
+ const lowercase = function({ value }, set2 = "default") {
9374
+ const sets = {
9375
+ default: /^[\p{Ll}]+$/u,
9376
+ latin: /^[a-z]+$/
9377
+ };
9378
+ const selectedSet = has(sets, set2) ? set2 : "default";
9379
+ return sets[selectedSet].test(String(value));
9380
+ };
9043
9381
  const matches = function matches2({ value }, ...stack) {
9044
9382
  return stack.some((pattern) => {
9045
9383
  if (typeof pattern === "string" && pattern.substr(0, 1) === "/" && pattern.substr(-1) === "/") {
@@ -9071,9 +9409,19 @@ const not = function not2({ value }, ...stack) {
9071
9409
  return item === value;
9072
9410
  });
9073
9411
  };
9074
- const number = function number2({ value }) {
9412
+ const number2 = function number3({ value }) {
9075
9413
  return !isNaN(value);
9076
9414
  };
9415
+ const require_one = function(node, ...inputNames) {
9416
+ if (!empty(node.value))
9417
+ return true;
9418
+ const values = inputNames.map((name) => {
9419
+ var _a;
9420
+ return (_a = node.at(name)) === null || _a === void 0 ? void 0 : _a.value;
9421
+ });
9422
+ return values.some((value) => !empty(value));
9423
+ };
9424
+ require_one.skipEmpty = false;
9077
9425
  const required = function required2({ value }, action = "default") {
9078
9426
  return action === "trim" && typeof value === "string" ? !empty(value.trim()) : !empty(value);
9079
9427
  };
@@ -9088,6 +9436,17 @@ const starts_with = function starts_with2({ value }, ...stack) {
9088
9436
  }
9089
9437
  return false;
9090
9438
  };
9439
+ const symbol = function({ value }) {
9440
+ return /^[!-/:-@[-`{-~]+$/.test(String(value));
9441
+ };
9442
+ const uppercase = function({ value }, set2 = "default") {
9443
+ const sets = {
9444
+ default: /^[\p{Lu}]+$/u,
9445
+ latin: /^[A-Z]+$/
9446
+ };
9447
+ const selectedSet = has(sets, set2) ? set2 : "default";
9448
+ return sets[selectedSet].test(String(value));
9449
+ };
9091
9450
  const url = function url2({ value }, ...stack) {
9092
9451
  try {
9093
9452
  const protocols = stack.length ? stack : ["http:", "https:"];
@@ -9105,6 +9464,13 @@ var defaultRules = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
9105
9464
  alphanumeric,
9106
9465
  between,
9107
9466
  confirm,
9467
+ contains_alpha,
9468
+ contains_alpha_spaces,
9469
+ contains_alphanumeric,
9470
+ contains_lowercase,
9471
+ contains_numeric,
9472
+ contains_symbol,
9473
+ contains_uppercase,
9108
9474
  date_after,
9109
9475
  date_before,
9110
9476
  date_between,
@@ -9113,13 +9479,17 @@ var defaultRules = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
9113
9479
  ends_with,
9114
9480
  is,
9115
9481
  length,
9482
+ lowercase,
9116
9483
  matches,
9117
9484
  max,
9118
9485
  min,
9119
9486
  not,
9120
- number,
9487
+ number: number2,
9488
+ require_one,
9121
9489
  required,
9122
9490
  starts_with,
9491
+ symbol,
9492
+ uppercase,
9123
9493
  url
9124
9494
  }, Symbol.toStringTag, { value: "Module" }));
9125
9495
  const revokedObservers = /* @__PURE__ */ new WeakSet();
@@ -9161,6 +9531,8 @@ function createObserver(node, dependencies) {
9161
9531
  }
9162
9532
  if (property === "value")
9163
9533
  addDependency("commit");
9534
+ if (property === "_value")
9535
+ addDependency("input");
9164
9536
  if (property === "props")
9165
9537
  return observeProps(value);
9166
9538
  if (property === "ledger")
@@ -9581,7 +9953,7 @@ function date2(date3) {
9581
9953
  function order(first, second) {
9582
9954
  return Number(first) >= Number(second) ? [second, first] : [first, second];
9583
9955
  }
9584
- const ui$u = {
9956
+ const ui$v = {
9585
9957
  add: "Add",
9586
9958
  remove: "Remove",
9587
9959
  removeAll: "Remove all",
@@ -9602,7 +9974,7 @@ const ui$u = {
9602
9974
  changeDate: "Change date",
9603
9975
  invalidDate: "The selected date is invalid."
9604
9976
  };
9605
- const validation$u = {
9977
+ const validation$v = {
9606
9978
  accepted({ name }) {
9607
9979
  return `Please accept the ${name}.`;
9608
9980
  },
@@ -9621,6 +9993,36 @@ const validation$u = {
9621
9993
  alpha_spaces({ name }) {
9622
9994
  return `${sentence(name)} can only contain letters and spaces.`;
9623
9995
  },
9996
+ contains_alpha({ name }) {
9997
+ return `${sentence(name)} must contain alphabetical characters.`;
9998
+ },
9999
+ contains_alphanumeric({ name }) {
10000
+ return `${sentence(name)} must contain letters or numbers.`;
10001
+ },
10002
+ contains_alpha_spaces({ name }) {
10003
+ return `${sentence(name)} must contain letters or spaces.`;
10004
+ },
10005
+ contains_symbol({ name }) {
10006
+ return `${sentence(name)} must contain a symbol.`;
10007
+ },
10008
+ contains_uppercase({ name }) {
10009
+ return `${sentence(name)} must contain an uppercase letter.`;
10010
+ },
10011
+ contains_lowercase({ name }) {
10012
+ return `${sentence(name)} must contain a lowercase letter.`;
10013
+ },
10014
+ contains_numeric({ name }) {
10015
+ return `${sentence(name)} must contain numbers.`;
10016
+ },
10017
+ symbol({ name }) {
10018
+ return `${sentence(name)} must be a symbol.`;
10019
+ },
10020
+ uppercase({ name }) {
10021
+ return `${sentence(name)} can only contain uppercase letters.`;
10022
+ },
10023
+ lowercase({ name }) {
10024
+ return `${sentence(name)} can only contain lowercase letters.`;
10025
+ },
9624
10026
  date_before({ name, args }) {
9625
10027
  if (Array.isArray(args) && args.length) {
9626
10028
  return `${sentence(name)} must be before ${date2(args[0])}.`;
@@ -9697,6 +10099,17 @@ const validation$u = {
9697
10099
  number({ name }) {
9698
10100
  return `${sentence(name)} must be a number.`;
9699
10101
  },
10102
+ require_one: ({ name, node, args: inputNames }) => {
10103
+ const labels = inputNames.map((name2) => {
10104
+ const dependentNode = node.at(name2);
10105
+ if (dependentNode) {
10106
+ return createMessageName(dependentNode);
10107
+ }
10108
+ return false;
10109
+ }).filter((name2) => !!name2);
10110
+ labels.unshift(name);
10111
+ return `${labels.join(" or ")} is required.`;
10112
+ },
9700
10113
  required({ name }) {
9701
10114
  return `${sentence(name)} is required.`;
9702
10115
  },
@@ -9709,8 +10122,8 @@ const validation$u = {
9709
10122
  };
9710
10123
  var en = /* @__PURE__ */ Object.freeze({
9711
10124
  __proto__: null,
9712
- ui: ui$u,
9713
- validation: validation$u
10125
+ ui: ui$v,
10126
+ validation: validation$v
9714
10127
  });
9715
10128
  function createI18nPlugin(registry2) {
9716
10129
  return function i18nPlugin(node) {
@@ -10006,7 +10419,7 @@ const warnings = {
10006
10419
  150: ({ data: fn }) => `Schema function "${fn}()" is not a valid function.`,
10007
10420
  151: ({ data: id }) => `No form element with id: ${id}`,
10008
10421
  152: ({ data: id }) => `No input element with id: ${id}`,
10009
- 350: ({ data: node }) => `Invalid options prop for radio input (${node.name}). See https://formkit.com/inputs/radio`,
10422
+ 350: ({ data: { node, inputType } }) => `Invalid options prop for ${node.name} input (${inputType}). See https://formkit.com/inputs/${inputType}`,
10010
10423
  650: 'Schema "$get()" must use the id of an input to access.',
10011
10424
  651: ({ data: id }) => `Cannot setErrors() on "${id}" because no such id exists.`,
10012
10425
  652: ({ data: id }) => `Cannot clearErrors() on "${id}" because no such id exists.`,
@@ -10031,16 +10444,28 @@ const decodeWarnings = (warning, next) => {
10031
10444
  if (!registered)
10032
10445
  warningHandler(decodeWarnings);
10033
10446
  registered = true;
10447
+ const isServer$2 = typeof window === "undefined";
10448
+ const ssrCompleteRegistry = /* @__PURE__ */ new Map();
10449
+ function onSSRComplete(app, callback) {
10450
+ var _a;
10451
+ if (!isServer$2 || !app)
10452
+ return;
10453
+ if (!ssrCompleteRegistry.has(app))
10454
+ ssrCompleteRegistry.set(app, /* @__PURE__ */ new Set());
10455
+ (_a = ssrCompleteRegistry.get(app)) === null || _a === void 0 ? void 0 : _a.add(callback);
10456
+ }
10457
+ const isServer$1 = typeof window === "undefined";
10034
10458
  const memo = {};
10459
+ const memoKeys = {};
10035
10460
  let instanceKey;
10036
- const instanceScopes = /* @__PURE__ */ new Map();
10461
+ const instanceScopes = /* @__PURE__ */ new WeakMap();
10037
10462
  const raw = "__raw__";
10038
10463
  const isClassProp = /[a-zA-Z0-9\-][cC]lass$/;
10039
10464
  function getRef(token2, data) {
10040
10465
  const value = ref(null);
10041
10466
  if (token2 === "get") {
10042
10467
  const nodeRefs = {};
10043
- value.value = get$1.bind(null, nodeRefs);
10468
+ value.value = get.bind(null, nodeRefs);
10044
10469
  return value;
10045
10470
  }
10046
10471
  const path = token2.split(".");
@@ -10060,14 +10485,14 @@ function getValue(set2, path) {
10060
10485
  }
10061
10486
  let foundValue = void 0;
10062
10487
  let obj = set2;
10063
- for (const i3 in path) {
10064
- const key = path[i3];
10488
+ for (const i2 in path) {
10489
+ const key = path[i2];
10065
10490
  if (typeof obj !== "object" || obj === null) {
10066
10491
  foundValue = void 0;
10067
10492
  break;
10068
10493
  }
10069
10494
  const currentValue = obj[key];
10070
- if (Number(i3) === path.length - 1 && currentValue !== void 0) {
10495
+ if (Number(i2) === path.length - 1 && currentValue !== void 0) {
10071
10496
  foundValue = typeof currentValue === "function" ? currentValue.bind(obj) : currentValue;
10072
10497
  break;
10073
10498
  }
@@ -10075,7 +10500,7 @@ function getValue(set2, path) {
10075
10500
  }
10076
10501
  return foundValue;
10077
10502
  }
10078
- function get$1(nodeRefs, id) {
10503
+ function get(nodeRefs, id) {
10079
10504
  if (typeof id !== "string")
10080
10505
  return warn(650);
10081
10506
  if (!(id in nodeRefs))
@@ -10091,7 +10516,7 @@ function get$1(nodeRefs, id) {
10091
10516
  }
10092
10517
  return nodeRefs[id].value;
10093
10518
  }
10094
- function parseSchema(library, schema) {
10519
+ function parseSchema(library, schema, memoKey) {
10095
10520
  function parseCondition2(library2, node) {
10096
10521
  const condition = provider(compile(node.if), { if: true });
10097
10522
  const children = createElements(library2, node.then);
@@ -10290,7 +10715,7 @@ function parseSchema(library, schema) {
10290
10715
  const [getValues, valueName, keyName] = iterator;
10291
10716
  createNodes = () => {
10292
10717
  const _v = getValues();
10293
- const values = !isNaN(_v) ? Array(Number(_v)).fill(0).map((_, i3) => i3) : _v;
10718
+ const values = Number.isFinite(_v) ? Array(Number(_v)).fill(0).map((_, i2) => i2) : _v;
10294
10719
  const fragment2 = [];
10295
10720
  if (typeof values !== "object")
10296
10721
  return null;
@@ -10326,16 +10751,21 @@ function parseSchema(library, schema) {
10326
10751
  }
10327
10752
  const providers = [];
10328
10753
  function provider(compiled, hints = {}) {
10329
- const compiledFns = {};
10754
+ const compiledFns = /* @__PURE__ */ new WeakMap();
10330
10755
  providers.push((callback, key) => {
10331
- compiledFns[key] = compiled.provide((tokens) => callback(tokens, hints));
10756
+ compiledFns.set(key, compiled.provide((tokens) => callback(tokens, hints)));
10332
10757
  });
10333
- return () => compiledFns[instanceKey]();
10758
+ return () => compiledFns.get(instanceKey)();
10334
10759
  }
10335
- return function createInstance(providerCallback, key) {
10336
- const memoKey = JSON.stringify(schema);
10760
+ function createInstance(providerCallback, key) {
10761
+ var _a;
10762
+ memoKey !== null && memoKey !== void 0 ? memoKey : memoKey = JSON.stringify(schema);
10337
10763
  const [render2, compiledProviders] = has(memo, memoKey) ? memo[memoKey] : [createElements(library, schema), providers];
10338
- memo[memoKey] = [render2, compiledProviders];
10764
+ if (!isServer$1) {
10765
+ (_a = memoKeys[memoKey]) !== null && _a !== void 0 ? _a : memoKeys[memoKey] = 0;
10766
+ memoKeys[memoKey]++;
10767
+ memo[memoKey] = [render2, compiledProviders];
10768
+ }
10339
10769
  compiledProviders.forEach((compiledProvider) => {
10340
10770
  compiledProvider(providerCallback, key);
10341
10771
  });
@@ -10343,7 +10773,8 @@ function parseSchema(library, schema) {
10343
10773
  instanceKey = key;
10344
10774
  return render2();
10345
10775
  };
10346
- };
10776
+ }
10777
+ return createInstance;
10347
10778
  }
10348
10779
  function useScope(token2, defaultValue) {
10349
10780
  const scopedData = instanceScopes.get(instanceKey) || [];
@@ -10388,7 +10819,17 @@ function createRenderFn(instanceCreator, data, instanceKey2) {
10388
10819
  }, {});
10389
10820
  }, instanceKey2);
10390
10821
  }
10391
- let i = 0;
10822
+ function clean(schema, memoKey, instanceKey2) {
10823
+ memoKey !== null && memoKey !== void 0 ? memoKey : memoKey = JSON.stringify(schema);
10824
+ memoKeys[memoKey]--;
10825
+ if (memoKeys[memoKey] === 0) {
10826
+ delete memoKeys[memoKey];
10827
+ const [, providers] = memo[memoKey];
10828
+ delete memo[memoKey];
10829
+ providers.length = 0;
10830
+ }
10831
+ instanceScopes.delete(instanceKey2);
10832
+ }
10392
10833
  const FormKitSchema = defineComponent({
10393
10834
  name: "FormKitSchema",
10394
10835
  props: {
@@ -10403,31 +10844,52 @@ const FormKitSchema = defineComponent({
10403
10844
  library: {
10404
10845
  type: Object,
10405
10846
  default: () => ({})
10847
+ },
10848
+ memoKey: {
10849
+ type: String,
10850
+ required: false
10406
10851
  }
10407
10852
  },
10408
10853
  setup(props2, context) {
10854
+ var _a;
10409
10855
  const instance = getCurrentInstance();
10410
- let instanceKey2 = Symbol(String(i++));
10856
+ let instanceKey2 = {};
10411
10857
  instanceScopes.set(instanceKey2, []);
10412
- let provider = parseSchema(props2.library, props2.schema);
10858
+ let provider = parseSchema(props2.library, props2.schema, props2.memoKey);
10413
10859
  let render2;
10414
10860
  let data;
10415
- watch$1(() => props2.schema, (newSchema, oldSchema) => {
10416
- var _a;
10417
- instanceKey2 = Symbol(String(i++));
10418
- provider = parseSchema(props2.library, props2.schema);
10419
- render2 = createRenderFn(provider, data, instanceKey2);
10420
- if (newSchema === oldSchema) {
10421
- ((_a = instance === null || instance === void 0 ? void 0 : instance.proxy) === null || _a === void 0 ? void 0 : _a.$forceUpdate)();
10422
- }
10423
- }, { deep: true });
10861
+ if (!isServer$1) {
10862
+ watch$1(() => props2.schema, (newSchema, oldSchema) => {
10863
+ var _a2;
10864
+ const oldKey = instanceKey2;
10865
+ instanceKey2 = {};
10866
+ provider = parseSchema(props2.library, props2.schema, props2.memoKey);
10867
+ render2 = createRenderFn(provider, data, instanceKey2);
10868
+ if (newSchema === oldSchema) {
10869
+ ((_a2 = instance === null || instance === void 0 ? void 0 : instance.proxy) === null || _a2 === void 0 ? void 0 : _a2.$forceUpdate)();
10870
+ }
10871
+ clean(props2.schema, props2.memoKey, oldKey);
10872
+ }, { deep: true });
10873
+ }
10424
10874
  watchEffect(() => {
10425
- data = Object.assign(reactive(props2.data), {
10875
+ var _a2;
10876
+ data = Object.assign(reactive((_a2 = props2.data) !== null && _a2 !== void 0 ? _a2 : {}), {
10426
10877
  slots: context.slots
10427
10878
  });
10879
+ context.slots;
10428
10880
  render2 = createRenderFn(provider, data, instanceKey2);
10429
10881
  });
10430
- return () => render2();
10882
+ function cleanUp() {
10883
+ clean(props2.schema, props2.memoKey, instanceKey2);
10884
+ if (data.node)
10885
+ data.node.destroy();
10886
+ data.slots = null;
10887
+ data = null;
10888
+ render2 = null;
10889
+ }
10890
+ onUnmounted(cleanUp);
10891
+ onSSRComplete((_a = getCurrentInstance()) === null || _a === void 0 ? void 0 : _a.appContext.app, cleanUp);
10892
+ return () => render2 ? render2() : null;
10431
10893
  }
10432
10894
  });
10433
10895
  const nativeProps = {
@@ -10443,6 +10905,10 @@ const nativeProps = {
10443
10905
  type: Number,
10444
10906
  required: false
10445
10907
  },
10908
+ dynamic: {
10909
+ type: Boolean,
10910
+ required: false
10911
+ },
10446
10912
  errors: {
10447
10913
  type: Array,
10448
10914
  default: []
@@ -10478,6 +10944,10 @@ const nativeProps = {
10478
10944
  type: Object,
10479
10945
  default: {}
10480
10946
  },
10947
+ sync: {
10948
+ type: Boolean,
10949
+ required: false
10950
+ },
10481
10951
  type: {
10482
10952
  type: [String, Object],
10483
10953
  default: "text"
@@ -10500,6 +10970,7 @@ const nativeProps = {
10500
10970
  }
10501
10971
  };
10502
10972
  const props = nativeProps;
10973
+ const isServer = typeof window === "undefined";
10503
10974
  const parentSymbol = Symbol("FormKitParent");
10504
10975
  const FormKit = defineComponent({
10505
10976
  props,
@@ -10526,19 +10997,29 @@ const FormKit = defineComponent({
10526
10997
  };
10527
10998
  }
10528
10999
  const schema = ref([]);
11000
+ let memoKey = node.props.definition.schemaMemoKey;
10529
11001
  const generateSchema = () => {
10530
11002
  var _a, _b;
10531
11003
  const schemaDefinition = (_b = (_a = node.props) === null || _a === void 0 ? void 0 : _a.definition) === null || _b === void 0 ? void 0 : _b.schema;
10532
11004
  if (!schemaDefinition)
10533
11005
  error(601, node);
10534
- schema.value = typeof schemaDefinition === "function" ? schemaDefinition(__spreadValues({}, props2.sectionsSchema)) : schemaDefinition;
11006
+ if (typeof schemaDefinition === "function") {
11007
+ schema.value = schemaDefinition(__spreadValues({}, props2.sectionsSchema));
11008
+ if (memoKey && props2.sectionsSchema || "memoKey" in schemaDefinition && typeof schemaDefinition.memoKey === "string") {
11009
+ memoKey = (memoKey !== null && memoKey !== void 0 ? memoKey : schemaDefinition === null || schemaDefinition === void 0 ? void 0 : schemaDefinition.memoKey) + JSON.stringify(props2.sectionsSchema);
11010
+ }
11011
+ } else {
11012
+ schema.value = schemaDefinition;
11013
+ }
10535
11014
  };
10536
11015
  generateSchema();
10537
- node.on("schema", generateSchema);
11016
+ if (!isServer) {
11017
+ node.on("schema", generateSchema);
11018
+ }
10538
11019
  context.emit("node", node);
10539
11020
  const library = node.props.definition.library;
10540
11021
  context.expose({ node });
10541
- return () => h(FormKitSchema, { schema: schema.value, data: node.context, library }, __spreadValues({}, context.slots));
11022
+ return () => h(FormKitSchema, { schema: schema.value, data: node.context, library, memoKey }, __spreadValues({}, context.slots));
10542
11023
  }
10543
11024
  });
10544
11025
  function createPlugin$3(app, options2) {
@@ -10572,100 +11053,6 @@ const plugin$1 = {
10572
11053
  app.provide(configSymbol, rootConfig);
10573
11054
  }
10574
11055
  };
10575
- const invalidGet = Symbol();
10576
- function watchVerbose(obj, callback) {
10577
- const watchers = {};
10578
- const applyWatch = (paths) => {
10579
- for (const path of paths) {
10580
- if (path.__str in watchers)
10581
- watchers[path.__str]();
10582
- watchers[path.__str] = watch$1(touch.bind(null, obj, path), dispatcher.bind(null, path), { deep: false });
10583
- }
10584
- };
10585
- const clearWatch = (path) => {
10586
- if (!path.length)
10587
- return;
10588
- for (const key in watchers) {
10589
- if (`${key}`.startsWith(`${path.__str}.`)) {
10590
- watchers[key]();
10591
- delete watchers[key];
10592
- }
10593
- }
10594
- };
10595
- const dispatcher = createDispatcher(obj, callback, applyWatch, clearWatch);
10596
- applyWatch(getPaths(obj));
10597
- }
10598
- function createDispatcher(obj, callback, applyWatch, clearChildWatches) {
10599
- return (path) => {
10600
- const value = get(obj, path);
10601
- if (value === invalidGet)
10602
- return;
10603
- if (path.__deep)
10604
- clearChildWatches(path);
10605
- if (typeof value === "object")
10606
- applyWatch(getPaths(value, [path], ...path));
10607
- callback(path, value, obj);
10608
- };
10609
- }
10610
- function touch(obj, path) {
10611
- const value = get(obj, path);
10612
- return value && typeof value === "object" ? Object.keys(value) : value;
10613
- }
10614
- function get(obj, path) {
10615
- if (isRef(obj)) {
10616
- if (path.length === 0)
10617
- return obj.value;
10618
- obj = obj.value;
10619
- }
10620
- return path.reduce((value, segment) => {
10621
- if (value === invalidGet)
10622
- return value;
10623
- if (value === null || typeof value !== "object") {
10624
- return invalidGet;
10625
- }
10626
- return value[segment];
10627
- }, obj);
10628
- }
10629
- function getPaths(obj, paths = [], ...parents) {
10630
- if (obj === null)
10631
- return paths;
10632
- if (!parents.length) {
10633
- const path = Object.defineProperty([], "__str", {
10634
- value: ""
10635
- });
10636
- obj = isRef(obj) ? obj.value : obj;
10637
- if (obj && typeof obj === "object") {
10638
- Object.defineProperty(path, "__deep", { value: true });
10639
- paths.push(path);
10640
- } else {
10641
- return [path];
10642
- }
10643
- }
10644
- if (obj === null || typeof obj !== "object")
10645
- return paths;
10646
- for (const key in obj) {
10647
- const path = parents.concat(key);
10648
- Object.defineProperty(path, "__str", { value: path.join(".") });
10649
- const value = obj[key];
10650
- if (isPojo(value) || Array.isArray(value)) {
10651
- paths.push(Object.defineProperty(path, "__deep", { value: true }));
10652
- paths = paths.concat(getPaths(value, [], ...path));
10653
- } else {
10654
- paths.push(path);
10655
- }
10656
- }
10657
- return paths;
10658
- }
10659
- function useRaw(obj) {
10660
- if (obj === null || typeof obj !== "object")
10661
- return obj;
10662
- if (isReactive(obj)) {
10663
- obj = toRaw(obj);
10664
- } else if (isRef(obj)) {
10665
- obj = isReactive(obj.value) ? useRaw(obj.value) : obj.value;
10666
- }
10667
- return obj;
10668
- }
10669
11056
  const pseudoProps = [
10670
11057
  "help",
10671
11058
  "label",
@@ -10710,6 +11097,10 @@ function useInput(props2, context, options2 = {}) {
10710
11097
  const instance = getCurrentInstance();
10711
11098
  const listeners = onlyListeners(instance === null || instance === void 0 ? void 0 : instance.vnode.props);
10712
11099
  const isVModeled = "modelValue" in ((_a = instance === null || instance === void 0 ? void 0 : instance.vnode.props) !== null && _a !== void 0 ? _a : {});
11100
+ let isMounted = false;
11101
+ onMounted(() => {
11102
+ isMounted = true;
11103
+ });
10713
11104
  const value = props2.modelValue !== void 0 ? props2.modelValue : cloneAny(context.attrs.value);
10714
11105
  function createInitialProps() {
10715
11106
  const initialProps2 = __spreadValues(__spreadValues({}, nodeProps(props2)), listeners);
@@ -10732,14 +11123,15 @@ function useInput(props2, context, options2 = {}) {
10732
11123
  }
10733
11124
  const initialProps = createInitialProps();
10734
11125
  const parent = initialProps.ignore ? null : props2.parent || inject(parentSymbol, null);
10735
- const node = createNode(extend(config || {}, {
11126
+ const node = createNode(extend$1(config || {}, {
10736
11127
  name: props2.name || void 0,
10737
11128
  value,
10738
11129
  parent,
10739
11130
  plugins: (config.plugins || []).concat(props2.plugins),
10740
11131
  config: props2.config,
10741
11132
  props: initialProps,
10742
- index: props2.index
11133
+ index: props2.index,
11134
+ sync: props2.sync || props2.dynamic
10743
11135
  }, false, true));
10744
11136
  if (!node.props.definition)
10745
11137
  error(600, node);
@@ -10787,6 +11179,9 @@ function useInput(props2, context, options2 = {}) {
10787
11179
  const attrs = except(nodeProps(context.attrs), pseudoPropNames.value);
10788
11180
  if ("multiple" in attrs)
10789
11181
  attrs.multiple = undefine(attrs.multiple);
11182
+ if (typeof attrs.onBlur === "function") {
11183
+ attrs.onBlur = oncePerTick(attrs.onBlur);
11184
+ }
10790
11185
  node.props.attrs = Object.assign({}, node.props.attrs || {}, attrs);
10791
11186
  });
10792
11187
  watchEffect(() => {
@@ -10825,33 +11220,24 @@ function useInput(props2, context, options2 = {}) {
10825
11220
  if (node.type !== "input") {
10826
11221
  provide(parentSymbol, node);
10827
11222
  }
10828
- let inputTimeout;
10829
- const mutex = /* @__PURE__ */ new WeakSet();
11223
+ let clonedValueBeforeVmodel = void 0;
10830
11224
  node.on("modelUpdated", () => {
10831
11225
  var _a2, _b;
10832
11226
  context.emit("inputRaw", (_a2 = node.context) === null || _a2 === void 0 ? void 0 : _a2.value, node);
10833
- clearTimeout(inputTimeout);
10834
- inputTimeout = setTimeout(context.emit, 20, "input", (_b = node.context) === null || _b === void 0 ? void 0 : _b.value, node);
11227
+ if (isMounted) {
11228
+ context.emit("input", (_b = node.context) === null || _b === void 0 ? void 0 : _b.value, node);
11229
+ }
10835
11230
  if (isVModeled && node.context) {
10836
- const newValue = useRaw(node.context.value);
10837
- if (isObject(newValue) && useRaw(props2.modelValue) !== newValue) {
10838
- mutex.add(newValue);
10839
- }
10840
- context.emit("update:modelValue", newValue);
11231
+ clonedValueBeforeVmodel = cloneAny(node.value);
11232
+ context.emit("update:modelValue", node.value);
10841
11233
  }
10842
11234
  });
10843
11235
  if (isVModeled) {
10844
- watchVerbose(toRef(props2, "modelValue"), (path, value2) => {
10845
- var _a2;
10846
- const rawValue = useRaw(value2);
10847
- if (isObject(rawValue) && mutex.has(rawValue)) {
10848
- return mutex.delete(rawValue);
10849
- }
10850
- if (!path.length)
11236
+ watch$1(toRef(props2, "modelValue"), (value2) => {
11237
+ if (!eq(clonedValueBeforeVmodel, value2)) {
10851
11238
  node.input(value2, false);
10852
- else
10853
- (_a2 = node.at(path)) === null || _a2 === void 0 ? void 0 : _a2.input(value2, false);
10854
- });
11239
+ }
11240
+ }, { deep: true });
10855
11241
  if (node.value !== value) {
10856
11242
  node.emit("modelUpdated");
10857
11243
  }
@@ -10888,7 +11274,7 @@ function createInput(schemaOrComponent, definitionOptions = {}) {
10888
11274
  const messages = createSection("messages", () => ({
10889
11275
  $el: "ul",
10890
11276
  if: "$fns.length($messages)"
10891
- }), true);
11277
+ }));
10892
11278
  const message = createSection("message", () => ({
10893
11279
  $el: "li",
10894
11280
  for: ["message", "$messages"],
@@ -10959,6 +11345,7 @@ const vueBindings = function vueBindings2(node) {
10959
11345
  validationVisibility.value = payload;
10960
11346
  });
10961
11347
  const hasShownErrors = ref(validationVisibility.value === "live");
11348
+ const items = ref(node.children.map((child) => child.uid));
10962
11349
  const validationVisible = computed(() => {
10963
11350
  if (context.state.submitted)
10964
11351
  return true;
@@ -11067,6 +11454,7 @@ const vueBindings = function vueBindings2(node) {
11067
11454
  },
11068
11455
  help: node.props.help,
11069
11456
  id: node.props.id,
11457
+ items,
11070
11458
  label: node.props.label,
11071
11459
  messages: messages2,
11072
11460
  node: markRaw(node),
@@ -11098,7 +11486,8 @@ const vueBindings = function vueBindings2(node) {
11098
11486
  }
11099
11487
  (() => __async(this, null, function* () {
11100
11488
  yield node.settled;
11101
- node.props._init = cloneAny(node.value);
11489
+ if (node)
11490
+ node.props._init = cloneAny(node.value);
11102
11491
  }))();
11103
11492
  });
11104
11493
  node.on("settled", ({ payload: isSettled }) => {
@@ -11149,14 +11538,12 @@ const vueBindings = function vueBindings2(node) {
11149
11538
  triggerRef(_value);
11150
11539
  }
11151
11540
  });
11152
- node.on("commit", ({ payload }) => {
11153
- if (node.type !== "input" && !isRef(payload) && !isReactive(payload)) {
11154
- value.value = _value.value = shallowClone(payload);
11155
- } else {
11156
- value.value = _value.value = payload;
11157
- triggerRef(value);
11158
- }
11541
+ node.on("commitRaw", ({ payload }) => {
11542
+ value.value = _value.value = payload;
11543
+ triggerRef(value);
11159
11544
  node.emit("modelUpdated");
11545
+ });
11546
+ node.on("commit", () => {
11160
11547
  if ((!context.state.dirty || context.dirtyBehavior === "compare") && node.isCreated && hasTicked) {
11161
11548
  context.handlers.touch();
11162
11549
  }
@@ -11166,6 +11553,9 @@ const vueBindings = function vueBindings2(node) {
11166
11553
  return !(message2.type === "error" && ((_a = message2.meta) === null || _a === void 0 ? void 0 : _a.autoClear) === true);
11167
11554
  });
11168
11555
  }
11556
+ if (node.type === "list" && node.sync) {
11557
+ items.value = node.children.map((child) => child.uid);
11558
+ }
11169
11559
  });
11170
11560
  const updateState = (message2) => __async(this, null, function* () {
11171
11561
  if (message2.type === "ui" && message2.visible && !message2.meta.showAsMessage) {
@@ -11202,14 +11592,18 @@ const vueBindings = function vueBindings2(node) {
11202
11592
  });
11203
11593
  node.context = context;
11204
11594
  node.emit("context", node, false);
11595
+ node.on("destroyed", () => {
11596
+ node.context = void 0;
11597
+ node = null;
11598
+ });
11205
11599
  };
11206
11600
  const defaultConfig = (options2 = {}) => {
11207
11601
  const _a = options2, { rules = {}, locales = {}, inputs: inputs$1 = {}, messages: messages2 = {}, locale: locale2 = void 0, theme: theme2 = void 0, iconLoaderUrl = void 0, iconLoader = void 0, icons = {} } = _a, nodeOptions = __objRest(_a, ["rules", "locales", "inputs", "messages", "locale", "theme", "iconLoaderUrl", "iconLoader", "icons"]);
11208
11602
  const validation = createValidationPlugin(__spreadValues(__spreadValues({}, defaultRules), rules || {}));
11209
- const i18n = createI18nPlugin(extend(__spreadValues({ en }, locales || {}), messages2));
11603
+ const i18n = createI18nPlugin(extend$1(__spreadValues({ en }, locales || {}), messages2));
11210
11604
  const library = createLibraryPlugin(index$1, inputs$1);
11211
11605
  const themePlugin = createThemePlugin(theme2, icons, iconLoaderUrl, iconLoader);
11212
- return extend(__spreadValues({
11606
+ return extend$1(__spreadValues({
11213
11607
  plugins: [library, themePlugin, vueBindings, i18n, validation]
11214
11608
  }, !locale2 ? {} : { config: { locale: locale2 } }), nodeOptions || {}, true);
11215
11609
  };
@@ -11607,6 +12001,31 @@ const preStepFunc = (formNode) => (stepNode) => {
11607
12001
  console.warn(msg);
11608
12002
  rollbar("warning", msg);
11609
12003
  }
12004
+ if (stepNode.name === "legalCrossSells") {
12005
+ const cross_sells = stepNode.value["Legal_CrossSells"];
12006
+ if (cross_sells) {
12007
+ if (cross_sells.includes("Auto and Car Accidents")) {
12008
+ return ["autoAndCarAccidentCrossSellQuestions", "firstAndLast", "contactInfo"];
12009
+ } else if (cross_sells.includes("Personal Injury")) {
12010
+ return ["personalInjuryCrossSellQuestions", "firstAndLast", "contactInfo"];
12011
+ } else if (cross_sells.includes("Workers Compensation")) {
12012
+ return ["workersCompensationCrossSellQuestions", "firstAndLast", "contactInfo"];
12013
+ } else if (cross_sells.includes("DUI and DWI")) {
12014
+ return ["duiAndDWICrossSellQuestions", "firstAndLast", "contactInfo"];
12015
+ } else if (cross_sells.includes("Long Term Disability")) {
12016
+ return ["longTermDisabilityCrossSellQuestions", "firstAndLast", "contactInfo"];
12017
+ } else if (cross_sells.includes("Power of Attorney")) {
12018
+ return ["powerOfAttorneyCrossSellQuestions", "firstAndLast", "contactInfo"];
12019
+ } else if (cross_sells.includes("Wills and Trusts")) {
12020
+ return ["willsAndTrustsCrossSellQuestions", "firstAndLast", "contactInfo"];
12021
+ } else if (cross_sells.includes("Divorce and Separation")) {
12022
+ return ["divorceAndSeparationCrossSellQuestions", "firstAndLast", "contactInfo"];
12023
+ } else if (cross_sells.includes("Child Custody")) {
12024
+ return ["childCustodyCrossSellQuestions", "firstAndLast", "contactInfo"];
12025
+ }
12026
+ }
12027
+ return ["firstAndLast", "contactInfo"];
12028
+ }
11610
12029
  };
11611
12030
  const fireStepEvent = (formNode) => (stepResult, stepHistory2, stepQueue2) => {
11612
12031
  if (!stepResult) {
@@ -11814,11 +12233,11 @@ function toInteger(dirtyNumber) {
11814
12233
  if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
11815
12234
  return NaN;
11816
12235
  }
11817
- var number3 = Number(dirtyNumber);
11818
- if (isNaN(number3)) {
11819
- return number3;
12236
+ var number4 = Number(dirtyNumber);
12237
+ if (isNaN(number4)) {
12238
+ return number4;
11820
12239
  }
11821
- return number3 < 0 ? Math.ceil(number3) : Math.floor(number3);
12240
+ return number4 < 0 ? Math.ceil(number4) : Math.floor(number4);
11822
12241
  }
11823
12242
  function requiredArgs(required3, args) {
11824
12243
  if (args.length < required3) {
@@ -12212,9 +12631,9 @@ function getUTCWeek(dirtyDate, options2) {
12212
12631
  var diff = startOfUTCWeek(date3, options2).getTime() - startOfUTCWeekYear(date3, options2).getTime();
12213
12632
  return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
12214
12633
  }
12215
- function addLeadingZeros(number3, targetLength) {
12216
- var sign = number3 < 0 ? "-" : "";
12217
- var output = Math.abs(number3).toString();
12634
+ function addLeadingZeros(number4, targetLength) {
12635
+ var sign = number4 < 0 ? "-" : "";
12636
+ var output = Math.abs(number4).toString();
12218
12637
  while (output.length < targetLength) {
12219
12638
  output = "0" + output;
12220
12639
  }
@@ -12579,7 +12998,7 @@ var formatters = {
12579
12998
  });
12580
12999
  }
12581
13000
  },
12582
- i: function i2(date3, token2, localize2) {
13001
+ i: function i(date3, token2, localize2) {
12583
13002
  var dayOfWeek = date3.getUTCDay();
12584
13003
  var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
12585
13004
  switch (token2) {
@@ -13203,19 +13622,19 @@ var formattingDayPeriodValues = {
13203
13622
  }
13204
13623
  };
13205
13624
  var ordinalNumber = function ordinalNumber2(dirtyNumber, _options) {
13206
- var number3 = Number(dirtyNumber);
13207
- var rem100 = number3 % 100;
13625
+ var number4 = Number(dirtyNumber);
13626
+ var rem100 = number4 % 100;
13208
13627
  if (rem100 > 20 || rem100 < 10) {
13209
13628
  switch (rem100 % 10) {
13210
13629
  case 1:
13211
- return number3 + "st";
13630
+ return number4 + "st";
13212
13631
  case 2:
13213
- return number3 + "nd";
13632
+ return number4 + "nd";
13214
13633
  case 3:
13215
- return number3 + "rd";
13634
+ return number4 + "rd";
13216
13635
  }
13217
13636
  }
13218
- return number3 + "th";
13637
+ return number4 + "th";
13219
13638
  };
13220
13639
  var localize = {
13221
13640
  ordinalNumber,
@@ -13616,8 +14035,8 @@ function _classCallCheck$w(instance, Constructor) {
13616
14035
  }
13617
14036
  }
13618
14037
  function _defineProperties$w(target, props2) {
13619
- for (var i3 = 0; i3 < props2.length; i3++) {
13620
- var descriptor = props2[i3];
14038
+ for (var i2 = 0; i2 < props2.length; i2++) {
14039
+ var descriptor = props2[i2];
13621
14040
  descriptor.enumerable = descriptor.enumerable || false;
13622
14041
  descriptor.configurable = true;
13623
14042
  if ("value" in descriptor)
@@ -13717,8 +14136,8 @@ function _classCallCheck$v(instance, Constructor) {
13717
14136
  }
13718
14137
  }
13719
14138
  function _defineProperties$v(target, props2) {
13720
- for (var i3 = 0; i3 < props2.length; i3++) {
13721
- var descriptor = props2[i3];
14139
+ for (var i2 = 0; i2 < props2.length; i2++) {
14140
+ var descriptor = props2[i2];
13722
14141
  descriptor.enumerable = descriptor.enumerable || false;
13723
14142
  descriptor.configurable = true;
13724
14143
  if ("value" in descriptor)
@@ -13776,8 +14195,8 @@ function _classCallCheck$u(instance, Constructor) {
13776
14195
  }
13777
14196
  }
13778
14197
  function _defineProperties$u(target, props2) {
13779
- for (var i3 = 0; i3 < props2.length; i3++) {
13780
- var descriptor = props2[i3];
14198
+ for (var i2 = 0; i2 < props2.length; i2++) {
14199
+ var descriptor = props2[i2];
13781
14200
  descriptor.enumerable = descriptor.enumerable || false;
13782
14201
  descriptor.configurable = true;
13783
14202
  if ("value" in descriptor)
@@ -14064,8 +14483,8 @@ function _classCallCheck$t(instance, Constructor) {
14064
14483
  }
14065
14484
  }
14066
14485
  function _defineProperties$t(target, props2) {
14067
- for (var i3 = 0; i3 < props2.length; i3++) {
14068
- var descriptor = props2[i3];
14486
+ for (var i2 = 0; i2 < props2.length; i2++) {
14487
+ var descriptor = props2[i2];
14069
14488
  descriptor.enumerable = descriptor.enumerable || false;
14070
14489
  descriptor.configurable = true;
14071
14490
  if ("value" in descriptor)
@@ -14225,8 +14644,8 @@ function _classCallCheck$s(instance, Constructor) {
14225
14644
  }
14226
14645
  }
14227
14646
  function _defineProperties$s(target, props2) {
14228
- for (var i3 = 0; i3 < props2.length; i3++) {
14229
- var descriptor = props2[i3];
14647
+ for (var i2 = 0; i2 < props2.length; i2++) {
14648
+ var descriptor = props2[i2];
14230
14649
  descriptor.enumerable = descriptor.enumerable || false;
14231
14650
  descriptor.configurable = true;
14232
14651
  if ("value" in descriptor)
@@ -14386,8 +14805,8 @@ function _classCallCheck$r(instance, Constructor) {
14386
14805
  }
14387
14806
  }
14388
14807
  function _defineProperties$r(target, props2) {
14389
- for (var i3 = 0; i3 < props2.length; i3++) {
14390
- var descriptor = props2[i3];
14808
+ for (var i2 = 0; i2 < props2.length; i2++) {
14809
+ var descriptor = props2[i2];
14391
14810
  descriptor.enumerable = descriptor.enumerable || false;
14392
14811
  descriptor.configurable = true;
14393
14812
  if ("value" in descriptor)
@@ -14523,8 +14942,8 @@ function _classCallCheck$q(instance, Constructor) {
14523
14942
  }
14524
14943
  }
14525
14944
  function _defineProperties$q(target, props2) {
14526
- for (var i3 = 0; i3 < props2.length; i3++) {
14527
- var descriptor = props2[i3];
14945
+ for (var i2 = 0; i2 < props2.length; i2++) {
14946
+ var descriptor = props2[i2];
14528
14947
  descriptor.enumerable = descriptor.enumerable || false;
14529
14948
  descriptor.configurable = true;
14530
14949
  if ("value" in descriptor)
@@ -14659,8 +15078,8 @@ function _classCallCheck$p(instance, Constructor) {
14659
15078
  }
14660
15079
  }
14661
15080
  function _defineProperties$p(target, props2) {
14662
- for (var i3 = 0; i3 < props2.length; i3++) {
14663
- var descriptor = props2[i3];
15081
+ for (var i2 = 0; i2 < props2.length; i2++) {
15082
+ var descriptor = props2[i2];
14664
15083
  descriptor.enumerable = descriptor.enumerable || false;
14665
15084
  descriptor.configurable = true;
14666
15085
  if ("value" in descriptor)
@@ -14830,8 +15249,8 @@ function _classCallCheck$o(instance, Constructor) {
14830
15249
  }
14831
15250
  }
14832
15251
  function _defineProperties$o(target, props2) {
14833
- for (var i3 = 0; i3 < props2.length; i3++) {
14834
- var descriptor = props2[i3];
15252
+ for (var i2 = 0; i2 < props2.length; i2++) {
15253
+ var descriptor = props2[i2];
14835
15254
  descriptor.enumerable = descriptor.enumerable || false;
14836
15255
  descriptor.configurable = true;
14837
15256
  if ("value" in descriptor)
@@ -15001,8 +15420,8 @@ function _classCallCheck$n(instance, Constructor) {
15001
15420
  }
15002
15421
  }
15003
15422
  function _defineProperties$n(target, props2) {
15004
- for (var i3 = 0; i3 < props2.length; i3++) {
15005
- var descriptor = props2[i3];
15423
+ for (var i2 = 0; i2 < props2.length; i2++) {
15424
+ var descriptor = props2[i2];
15006
15425
  descriptor.enumerable = descriptor.enumerable || false;
15007
15426
  descriptor.configurable = true;
15008
15427
  if ("value" in descriptor)
@@ -15176,8 +15595,8 @@ function _classCallCheck$m(instance, Constructor) {
15176
15595
  }
15177
15596
  }
15178
15597
  function _defineProperties$m(target, props2) {
15179
- for (var i3 = 0; i3 < props2.length; i3++) {
15180
- var descriptor = props2[i3];
15598
+ for (var i2 = 0; i2 < props2.length; i2++) {
15599
+ var descriptor = props2[i2];
15181
15600
  descriptor.enumerable = descriptor.enumerable || false;
15182
15601
  descriptor.configurable = true;
15183
15602
  if ("value" in descriptor)
@@ -15359,8 +15778,8 @@ function _classCallCheck$l(instance, Constructor) {
15359
15778
  }
15360
15779
  }
15361
15780
  function _defineProperties$l(target, props2) {
15362
- for (var i3 = 0; i3 < props2.length; i3++) {
15363
- var descriptor = props2[i3];
15781
+ for (var i2 = 0; i2 < props2.length; i2++) {
15782
+ var descriptor = props2[i2];
15364
15783
  descriptor.enumerable = descriptor.enumerable || false;
15365
15784
  descriptor.configurable = true;
15366
15785
  if ("value" in descriptor)
@@ -15512,8 +15931,8 @@ function _classCallCheck$k(instance, Constructor) {
15512
15931
  }
15513
15932
  }
15514
15933
  function _defineProperties$k(target, props2) {
15515
- for (var i3 = 0; i3 < props2.length; i3++) {
15516
- var descriptor = props2[i3];
15934
+ for (var i2 = 0; i2 < props2.length; i2++) {
15935
+ var descriptor = props2[i2];
15517
15936
  descriptor.enumerable = descriptor.enumerable || false;
15518
15937
  descriptor.configurable = true;
15519
15938
  if ("value" in descriptor)
@@ -15657,8 +16076,8 @@ function _classCallCheck$j(instance, Constructor) {
15657
16076
  }
15658
16077
  }
15659
16078
  function _defineProperties$j(target, props2) {
15660
- for (var i3 = 0; i3 < props2.length; i3++) {
15661
- var descriptor = props2[i3];
16079
+ for (var i2 = 0; i2 < props2.length; i2++) {
16080
+ var descriptor = props2[i2];
15662
16081
  descriptor.enumerable = descriptor.enumerable || false;
15663
16082
  descriptor.configurable = true;
15664
16083
  if ("value" in descriptor)
@@ -15814,8 +16233,8 @@ function _classCallCheck$i(instance, Constructor) {
15814
16233
  }
15815
16234
  }
15816
16235
  function _defineProperties$i(target, props2) {
15817
- for (var i3 = 0; i3 < props2.length; i3++) {
15818
- var descriptor = props2[i3];
16236
+ for (var i2 = 0; i2 < props2.length; i2++) {
16237
+ var descriptor = props2[i2];
15819
16238
  descriptor.enumerable = descriptor.enumerable || false;
15820
16239
  descriptor.configurable = true;
15821
16240
  if ("value" in descriptor)
@@ -15986,8 +16405,8 @@ function _classCallCheck$h(instance, Constructor) {
15986
16405
  }
15987
16406
  }
15988
16407
  function _defineProperties$h(target, props2) {
15989
- for (var i3 = 0; i3 < props2.length; i3++) {
15990
- var descriptor = props2[i3];
16408
+ for (var i2 = 0; i2 < props2.length; i2++) {
16409
+ var descriptor = props2[i2];
15991
16410
  descriptor.enumerable = descriptor.enumerable || false;
15992
16411
  descriptor.configurable = true;
15993
16412
  if ("value" in descriptor)
@@ -16166,8 +16585,8 @@ function _classCallCheck$g(instance, Constructor) {
16166
16585
  }
16167
16586
  }
16168
16587
  function _defineProperties$g(target, props2) {
16169
- for (var i3 = 0; i3 < props2.length; i3++) {
16170
- var descriptor = props2[i3];
16588
+ for (var i2 = 0; i2 < props2.length; i2++) {
16589
+ var descriptor = props2[i2];
16171
16590
  descriptor.enumerable = descriptor.enumerable || false;
16172
16591
  descriptor.configurable = true;
16173
16592
  if ("value" in descriptor)
@@ -16355,8 +16774,8 @@ function _classCallCheck$f(instance, Constructor) {
16355
16774
  }
16356
16775
  }
16357
16776
  function _defineProperties$f(target, props2) {
16358
- for (var i3 = 0; i3 < props2.length; i3++) {
16359
- var descriptor = props2[i3];
16777
+ for (var i2 = 0; i2 < props2.length; i2++) {
16778
+ var descriptor = props2[i2];
16360
16779
  descriptor.enumerable = descriptor.enumerable || false;
16361
16780
  descriptor.configurable = true;
16362
16781
  if ("value" in descriptor)
@@ -16559,8 +16978,8 @@ function _classCallCheck$e(instance, Constructor) {
16559
16978
  }
16560
16979
  }
16561
16980
  function _defineProperties$e(target, props2) {
16562
- for (var i3 = 0; i3 < props2.length; i3++) {
16563
- var descriptor = props2[i3];
16981
+ for (var i2 = 0; i2 < props2.length; i2++) {
16982
+ var descriptor = props2[i2];
16564
16983
  descriptor.enumerable = descriptor.enumerable || false;
16565
16984
  descriptor.configurable = true;
16566
16985
  if ("value" in descriptor)
@@ -16750,8 +17169,8 @@ function _classCallCheck$d(instance, Constructor) {
16750
17169
  }
16751
17170
  }
16752
17171
  function _defineProperties$d(target, props2) {
16753
- for (var i3 = 0; i3 < props2.length; i3++) {
16754
- var descriptor = props2[i3];
17172
+ for (var i2 = 0; i2 < props2.length; i2++) {
17173
+ var descriptor = props2[i2];
16755
17174
  descriptor.enumerable = descriptor.enumerable || false;
16756
17175
  descriptor.configurable = true;
16757
17176
  if ("value" in descriptor)
@@ -16910,8 +17329,8 @@ function _classCallCheck$c(instance, Constructor) {
16910
17329
  }
16911
17330
  }
16912
17331
  function _defineProperties$c(target, props2) {
16913
- for (var i3 = 0; i3 < props2.length; i3++) {
16914
- var descriptor = props2[i3];
17332
+ for (var i2 = 0; i2 < props2.length; i2++) {
17333
+ var descriptor = props2[i2];
16915
17334
  descriptor.enumerable = descriptor.enumerable || false;
16916
17335
  descriptor.configurable = true;
16917
17336
  if ("value" in descriptor)
@@ -17070,8 +17489,8 @@ function _classCallCheck$b(instance, Constructor) {
17070
17489
  }
17071
17490
  }
17072
17491
  function _defineProperties$b(target, props2) {
17073
- for (var i3 = 0; i3 < props2.length; i3++) {
17074
- var descriptor = props2[i3];
17492
+ for (var i2 = 0; i2 < props2.length; i2++) {
17493
+ var descriptor = props2[i2];
17075
17494
  descriptor.enumerable = descriptor.enumerable || false;
17076
17495
  descriptor.configurable = true;
17077
17496
  if ("value" in descriptor)
@@ -17230,8 +17649,8 @@ function _classCallCheck$a(instance, Constructor) {
17230
17649
  }
17231
17650
  }
17232
17651
  function _defineProperties$a(target, props2) {
17233
- for (var i3 = 0; i3 < props2.length; i3++) {
17234
- var descriptor = props2[i3];
17652
+ for (var i2 = 0; i2 < props2.length; i2++) {
17653
+ var descriptor = props2[i2];
17235
17654
  descriptor.enumerable = descriptor.enumerable || false;
17236
17655
  descriptor.configurable = true;
17237
17656
  if ("value" in descriptor)
@@ -17383,8 +17802,8 @@ function _classCallCheck$9(instance, Constructor) {
17383
17802
  }
17384
17803
  }
17385
17804
  function _defineProperties$9(target, props2) {
17386
- for (var i3 = 0; i3 < props2.length; i3++) {
17387
- var descriptor = props2[i3];
17805
+ for (var i2 = 0; i2 < props2.length; i2++) {
17806
+ var descriptor = props2[i2];
17388
17807
  descriptor.enumerable = descriptor.enumerable || false;
17389
17808
  descriptor.configurable = true;
17390
17809
  if ("value" in descriptor)
@@ -17529,8 +17948,8 @@ function _classCallCheck$8(instance, Constructor) {
17529
17948
  }
17530
17949
  }
17531
17950
  function _defineProperties$8(target, props2) {
17532
- for (var i3 = 0; i3 < props2.length; i3++) {
17533
- var descriptor = props2[i3];
17951
+ for (var i2 = 0; i2 < props2.length; i2++) {
17952
+ var descriptor = props2[i2];
17534
17953
  descriptor.enumerable = descriptor.enumerable || false;
17535
17954
  descriptor.configurable = true;
17536
17955
  if ("value" in descriptor)
@@ -17680,8 +18099,8 @@ function _classCallCheck$7(instance, Constructor) {
17680
18099
  }
17681
18100
  }
17682
18101
  function _defineProperties$7(target, props2) {
17683
- for (var i3 = 0; i3 < props2.length; i3++) {
17684
- var descriptor = props2[i3];
18102
+ for (var i2 = 0; i2 < props2.length; i2++) {
18103
+ var descriptor = props2[i2];
17685
18104
  descriptor.enumerable = descriptor.enumerable || false;
17686
18105
  descriptor.configurable = true;
17687
18106
  if ("value" in descriptor)
@@ -17827,8 +18246,8 @@ function _classCallCheck$6(instance, Constructor) {
17827
18246
  }
17828
18247
  }
17829
18248
  function _defineProperties$6(target, props2) {
17830
- for (var i3 = 0; i3 < props2.length; i3++) {
17831
- var descriptor = props2[i3];
18249
+ for (var i2 = 0; i2 < props2.length; i2++) {
18250
+ var descriptor = props2[i2];
17832
18251
  descriptor.enumerable = descriptor.enumerable || false;
17833
18252
  descriptor.configurable = true;
17834
18253
  if ("value" in descriptor)
@@ -17973,8 +18392,8 @@ function _classCallCheck$5(instance, Constructor) {
17973
18392
  }
17974
18393
  }
17975
18394
  function _defineProperties$5(target, props2) {
17976
- for (var i3 = 0; i3 < props2.length; i3++) {
17977
- var descriptor = props2[i3];
18395
+ for (var i2 = 0; i2 < props2.length; i2++) {
18396
+ var descriptor = props2[i2];
17978
18397
  descriptor.enumerable = descriptor.enumerable || false;
17979
18398
  descriptor.configurable = true;
17980
18399
  if ("value" in descriptor)
@@ -18119,8 +18538,8 @@ function _classCallCheck$4(instance, Constructor) {
18119
18538
  }
18120
18539
  }
18121
18540
  function _defineProperties$4(target, props2) {
18122
- for (var i3 = 0; i3 < props2.length; i3++) {
18123
- var descriptor = props2[i3];
18541
+ for (var i2 = 0; i2 < props2.length; i2++) {
18542
+ var descriptor = props2[i2];
18124
18543
  descriptor.enumerable = descriptor.enumerable || false;
18125
18544
  descriptor.configurable = true;
18126
18545
  if ("value" in descriptor)
@@ -18254,8 +18673,8 @@ function _classCallCheck$3(instance, Constructor) {
18254
18673
  }
18255
18674
  }
18256
18675
  function _defineProperties$3(target, props2) {
18257
- for (var i3 = 0; i3 < props2.length; i3++) {
18258
- var descriptor = props2[i3];
18676
+ for (var i2 = 0; i2 < props2.length; i2++) {
18677
+ var descriptor = props2[i2];
18259
18678
  descriptor.enumerable = descriptor.enumerable || false;
18260
18679
  descriptor.configurable = true;
18261
18680
  if ("value" in descriptor)
@@ -18400,8 +18819,8 @@ function _classCallCheck$2(instance, Constructor) {
18400
18819
  }
18401
18820
  }
18402
18821
  function _defineProperties$2(target, props2) {
18403
- for (var i3 = 0; i3 < props2.length; i3++) {
18404
- var descriptor = props2[i3];
18822
+ for (var i2 = 0; i2 < props2.length; i2++) {
18823
+ var descriptor = props2[i2];
18405
18824
  descriptor.enumerable = descriptor.enumerable || false;
18406
18825
  descriptor.configurable = true;
18407
18826
  if ("value" in descriptor)
@@ -18546,8 +18965,8 @@ function _classCallCheck$1(instance, Constructor) {
18546
18965
  }
18547
18966
  }
18548
18967
  function _defineProperties$1(target, props2) {
18549
- for (var i3 = 0; i3 < props2.length; i3++) {
18550
- var descriptor = props2[i3];
18968
+ for (var i2 = 0; i2 < props2.length; i2++) {
18969
+ var descriptor = props2[i2];
18551
18970
  descriptor.enumerable = descriptor.enumerable || false;
18552
18971
  descriptor.configurable = true;
18553
18972
  if ("value" in descriptor)
@@ -18679,8 +19098,8 @@ function _classCallCheck(instance, Constructor) {
18679
19098
  }
18680
19099
  }
18681
19100
  function _defineProperties(target, props2) {
18682
- for (var i3 = 0; i3 < props2.length; i3++) {
18683
- var descriptor = props2[i3];
19101
+ for (var i2 = 0; i2 < props2.length; i2++) {
19102
+ var descriptor = props2[i2];
18684
19103
  descriptor.enumerable = descriptor.enumerable || false;
18685
19104
  descriptor.configurable = true;
18686
19105
  if ("value" in descriptor)
@@ -18845,13 +19264,13 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
18845
19264
  if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
18846
19265
  if (it)
18847
19266
  o = it;
18848
- var i3 = 0;
19267
+ var i2 = 0;
18849
19268
  var F = function F2() {
18850
19269
  };
18851
19270
  return { s: F, n: function n() {
18852
- if (i3 >= o.length)
19271
+ if (i2 >= o.length)
18853
19272
  return { done: true };
18854
- return { done: false, value: o[i3++] };
19273
+ return { done: false, value: o[i2++] };
18855
19274
  }, e: function e2(_e) {
18856
19275
  throw _e;
18857
19276
  }, f: F };
@@ -18894,8 +19313,8 @@ function _unsupportedIterableToArray(o, minLen) {
18894
19313
  function _arrayLikeToArray(arr, len) {
18895
19314
  if (len == null || len > arr.length)
18896
19315
  len = arr.length;
18897
- for (var i3 = 0, arr2 = new Array(len); i3 < len; i3++) {
18898
- arr2[i3] = arr[i3];
19316
+ for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) {
19317
+ arr2[i2] = arr[i2];
18899
19318
  }
18900
19319
  return arr2;
18901
19320
  }
@@ -19597,7 +20016,7 @@ var script$2 = defineComponent({
19597
20016
  type: Number,
19598
20017
  required: false,
19599
20018
  default: 1,
19600
- validator: (i3) => typeof i3 === "number" && Number.isInteger(i3) && i3 >= 0 && i3 <= 6
20019
+ validator: (i2) => typeof i2 === "number" && Number.isInteger(i2) && i2 >= 0 && i2 <= 6
19601
20020
  },
19602
20021
  lowerLimit: {
19603
20022
  type: Date,
@@ -19634,7 +20053,7 @@ var script$2 = defineComponent({
19634
20053
  const weekDays = computed(() => {
19635
20054
  const initial = props2.weekStartsOn;
19636
20055
  const dayFormat = format2.value(props2.weekdayFormat);
19637
- return Array.from(Array(7)).map((_, i3) => (initial + i3) % 7).map((v) => setDay(new Date(), v, {
20056
+ return Array.from(Array(7)).map((_, i2) => (initial + i2) % 7).map((v) => setDay(new Date(), v, {
19638
20057
  weekStartsOn: props2.weekStartsOn
19639
20058
  })).map(dayFormat);
19640
20059
  });
@@ -20247,6 +20666,14 @@ const init = () => {
20247
20666
  data.fireStepEvent = data.fireStepEvent || fireStepEvent;
20248
20667
  data.handleRedirect = data.handleRedirect || handleRedirect;
20249
20668
  data.scrollAnchor = data.scrollAnchor || scrollAnchor;
20669
+ data.inList = (list2, item) => {
20670
+ if (!list2 || !item) {
20671
+ console.log("inList blank", list2, item);
20672
+ return false;
20673
+ }
20674
+ console.log("inList", list2, item, list2.includes(item));
20675
+ return list2.includes(item);
20676
+ };
20250
20677
  data.getVal = (formNode, key) => {
20251
20678
  if (!formNode || !key) {
20252
20679
  return;
@@ -20266,20 +20693,20 @@ const init = () => {
20266
20693
  }
20267
20694
  }
20268
20695
  };
20269
- data.onInput = (callback) => (e2, node) => {
20696
+ data.onInput = (callback) => (val, node) => __async(this, null, function* () {
20270
20697
  const elem = document.getElementById(node.props.id);
20271
20698
  if (elem && elem.offsetParent === null) {
20272
20699
  return;
20273
20700
  }
20274
20701
  try {
20702
+ yield new Promise((r) => setTimeout(r, 50));
20275
20703
  callback();
20276
- e2.preventDefault();
20277
20704
  } catch (err) {
20278
20705
  const msg = "onInput failed: " + err.toString();
20279
20706
  console.warn(msg);
20280
20707
  rollbar("warning", msg);
20281
20708
  }
20282
- };
20709
+ });
20283
20710
  const app = createApp(_sfc_main$1, { schema: schemaObj, data }).use(
20284
20711
  plugin$1,
20285
20712
  defaultConfig({