@form-create/element-ui 2.7.5 → 2.7.7

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * FormCreate 低代码表单渲染器
3
- * @form-create/element-ui v2.7.5
3
+ * @form-create/element-ui v2.7.7
4
4
  * (c) 2018-2025 xaboy
5
5
  * Github https://github.com/xaboy/form-create
6
6
  * Site https://form-create.com/
@@ -11,7 +11,7 @@ var tr = Object.defineProperty, rr = Object.defineProperties;
11
11
  var ir = Object.getOwnPropertyDescriptors;
12
12
  var ot = Object.getOwnPropertySymbols;
13
13
  var nr = Object.prototype.hasOwnProperty, sr = Object.prototype.propertyIsEnumerable;
14
- var at = (t, e, r) => e in t ? tr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, b = (t, e) => {
14
+ var at = (t, e, r) => e in t ? tr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, v = (t, e) => {
15
15
  for (var r in e || (e = {}))
16
16
  nr.call(e, r) && at(t, r, e[r]);
17
17
  if (ot)
@@ -19,7 +19,7 @@ var at = (t, e, r) => e in t ? tr(t, e, { enumerable: !0, configurable: !0, writ
19
19
  sr.call(e, r) && at(t, r, e[r]);
20
20
  return t;
21
21
  }, q = (t, e) => rr(t, ir(e));
22
- import $e, { getCurrentInstance as or, provide as ar, inject as lr, toRefs as lt, reactive as ne, onBeforeMount as ur, watch as L, onMounted as cr, onBeforeUnmount as fr, onUpdated as hr, nextTick as I, markRaw as ge, computed as ye, toRef as je, ref as dr } from "vue";
22
+ import $e, { getCurrentInstance as or, provide as ar, inject as lr, toRefs as lt, reactive as ne, onBeforeMount as ur, watch as L, onMounted as fr, onBeforeUnmount as cr, onUpdated as hr, nextTick as I, markRaw as ge, computed as ye, toRef as je, ref as dr } from "vue";
23
23
  function pr(t) {
24
24
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
25
25
  }
@@ -41,16 +41,16 @@ var mr = ["attrs", "props", "domProps"], gr = ["class", "style", "directives"],
41
41
  var a = e[i][o] instanceof Array ? e[i][o] : [e[i][o]], l = r[i][o] instanceof Array ? r[i][o] : [r[i][o]];
42
42
  e[i][o] = [].concat(a, l);
43
43
  } else e[i][o] = r[i][o];
44
- else if (i === "hook") for (var u in r[i]) e[i][u] = e[i][u] ? vr(e[i][u], r[i][u]) : r[i][u];
44
+ else if (i === "hook") for (var u in r[i]) e[i][u] = e[i][u] ? br(e[i][u], r[i][u]) : r[i][u];
45
45
  else e[i] = r[i];
46
46
  return e;
47
47
  }, {});
48
- }, vr = function(t, e) {
48
+ }, br = function(t, e) {
49
49
  return function() {
50
50
  t && t.apply(this, arguments), e && e.apply(this, arguments);
51
51
  };
52
- }, br = $r;
53
- const V = /* @__PURE__ */ pr(br);
52
+ }, vr = $r;
53
+ const V = /* @__PURE__ */ pr(vr);
54
54
  function Ze(t, e) {
55
55
  return Object.keys(t).reduce((r, i) => (r.push(t[i]), r), []);
56
56
  }
@@ -111,7 +111,7 @@ const _r = "fcCheckbox", Cr = {
111
111
  input: this.onInput
112
112
  }
113
113
  }]), [this.options().map((e, r) => {
114
- const i = b({}, e), s = this.type === "button" ? "ElCheckboxButton" : "ElCheckbox";
114
+ const i = v({}, e), s = this.type === "button" ? "ElCheckboxButton" : "ElCheckbox";
115
115
  return delete i.value, t(s, V([{}, {
116
116
  props: i
117
117
  }, {
@@ -469,7 +469,7 @@ const wr = "fcFrame", Fr = {
469
469
  src: this.previewImage
470
470
  }
471
471
  })]), t("el-dialog", V([{}, {
472
- props: q(b({
472
+ props: q(v({
473
473
  width: i,
474
474
  title: o,
475
475
  appendToBody: !0
@@ -496,7 +496,7 @@ const wr = "fcFrame", Fr = {
496
496
  mounted() {
497
497
  this.$on("fc.closeModal", this.closeModal);
498
498
  }
499
- }, Or = "fcRadio", Sr = {
499
+ }, Or = "fcRadio", kr = {
500
500
  name: Or,
501
501
  props: {
502
502
  formCreateInject: {
@@ -550,7 +550,7 @@ const wr = "fcFrame", Fr = {
550
550
  input: this.onInput
551
551
  }
552
552
  }]), [this.options().map((e, r) => {
553
- const i = b({}, e), s = this.type === "button" ? "ElRadioButton" : "ElRadio";
553
+ const i = v({}, e), s = this.type === "button" ? "ElRadioButton" : "ElRadio";
554
554
  return delete i.value, t(s, V([{}, {
555
555
  props: i
556
556
  }, {
@@ -594,7 +594,7 @@ const wr = "fcFrame", Fr = {
594
594
  function D(t, e) {
595
595
  return {}.hasOwnProperty.call(t, e);
596
596
  }
597
- const Er = "fcSelect", Rr = {
597
+ const Er = "fcSelect", Sr = {
598
598
  name: Er,
599
599
  functional: !0,
600
600
  props: {
@@ -626,8 +626,8 @@ const Er = "fcSelect", Rr = {
626
626
  mounted() {
627
627
  this.$emit("fc.el", this.$refs.el);
628
628
  }
629
- }, kr = "fcTree", Dr = {
630
- name: kr,
629
+ }, Rr = "fcTree", Dr = {
630
+ name: Rr,
631
631
  formCreateParser: {
632
632
  mergeProp(t) {
633
633
  const e = t.prop.props;
@@ -691,8 +691,8 @@ function ut(t, e) {
691
691
  uid: e
692
692
  };
693
693
  }
694
- function ct(t) {
695
- return q(b({}, t), {
694
+ function ft(t) {
695
+ return q(v({}, t), {
696
696
  file: t,
697
697
  value: t
698
698
  });
@@ -749,11 +749,11 @@ const Ar = "fcUpload", Vr = {
749
749
  };
750
750
  },
751
751
  created() {
752
- this.formCreateInject.prop.props.showFileList === void 0 && (this.formCreateInject.prop.props.showFileList = !1), this.formCreateInject.prop.props.fileList = H(this.value).map(ut).map(ct);
752
+ this.formCreateInject.prop.props.showFileList === void 0 && (this.formCreateInject.prop.props.showFileList = !1), this.formCreateInject.prop.props.fileList = H(this.value).map(ut).map(ft);
753
753
  },
754
754
  watch: {
755
755
  value(t) {
756
- this.$refs.upload.uploadFiles.every((e) => !e.status || e.status === "success") && (this.$refs.upload.uploadFiles = H(t).map(ut).map(ct), this.uploadList = this.$refs.upload.uploadFiles);
756
+ this.$refs.upload.uploadFiles.every((e) => !e.status || e.status === "success") && (this.$refs.upload.uploadFiles = H(t).map(ut).map(ft), this.uploadList = this.$refs.upload.uploadFiles);
757
757
  },
758
758
  limit(t, e) {
759
759
  (e === 1 || t === 1) && this.update();
@@ -941,7 +941,7 @@ function Ce(t, e = {}, r) {
941
941
  }
942
942
  return r !== void 0 && Array.isArray(t) ? t.filter((s) => !s || !s.__ctrl) : t;
943
943
  }
944
- function W(t) {
944
+ function K(t) {
945
945
  return Ce({}, { value: t }).value;
946
946
  }
947
947
  const Ir = Object.assign || function(t) {
@@ -954,7 +954,7 @@ function _() {
954
954
  return Ir.apply(this, arguments);
955
955
  }
956
956
  function Je(t) {
957
- return typeof t != "object" || t === null ? t : t instanceof Array ? [...t] : b({}, t);
957
+ return typeof t != "object" || t === null ? t : t instanceof Array ? [...t] : v({}, t);
958
958
  }
959
959
  const Pr = "fcGroup", Tr = {
960
960
  name: Pr,
@@ -1044,7 +1044,7 @@ const Pr = "fcGroup", Tr = {
1044
1044
  const n = i.$f.formData();
1045
1045
  i.$f.once("reloading", () => {
1046
1046
  i.$f.setValue(n);
1047
- }), i.rule = W(t);
1047
+ }), i.rule = K(t);
1048
1048
  }
1049
1049
  }
1050
1050
  });
@@ -1091,7 +1091,7 @@ const Pr = "fcGroup", Tr = {
1091
1091
  if (i.filter((n) => r[n].$f).length !== i.length)
1092
1092
  return;
1093
1093
  const s = i.map((n) => {
1094
- const o = t === n ? e : b({}, this.cacheRule[n].$f.form), a = this.field ? o[this.field] || null : o;
1094
+ const o = t === n ? e : v({}, this.cacheRule[n].$f.form), a = this.field ? o[this.field] || null : o;
1095
1095
  return this.cache(n, a), a;
1096
1096
  });
1097
1097
  this.input(s);
@@ -1103,13 +1103,13 @@ const Pr = "fcGroup", Tr = {
1103
1103
  }), this.cacheValue[t] !== JSON.stringify(r ? e[r] : e) && (this.cache(t, e), i && i.coverValue(e || {}));
1104
1104
  },
1105
1105
  addRule(t, e) {
1106
- const r = this.formCreateInject.form.copyRules(this.formRule), i = this.options ? b({}, this.options) : {
1106
+ const r = this.formCreateInject.form.copyRules(this.formRule), i = this.options ? v({}, this.options) : {
1107
1107
  submitBtn: !1,
1108
1108
  resetBtn: !1
1109
1109
  };
1110
1110
  if (this.defaultValue) {
1111
1111
  i.formData || (i.formData = {});
1112
- const s = W(this.defaultValue);
1112
+ const s = K(this.defaultValue);
1113
1113
  _(i.formData, this.field ? {
1114
1114
  [this.field]: s
1115
1115
  } : s);
@@ -1136,7 +1136,7 @@ const Pr = "fcGroup", Tr = {
1136
1136
  if (this.disabled || this.onBeforeAdd(this.value) === !1)
1137
1137
  return;
1138
1138
  const e = [...this.value];
1139
- e.push(this.defaultValue ? W(this.defaultValue) : this.field ? null : {}), this.input(e);
1139
+ e.push(this.defaultValue ? K(this.defaultValue) : this.field ? null : {}), this.input(e);
1140
1140
  },
1141
1141
  del(t, e) {
1142
1142
  if (this.disabled || this.onBeforeRemove(this.value, t) === !1)
@@ -1227,7 +1227,7 @@ const Pr = "fcGroup", Tr = {
1227
1227
  const {
1228
1228
  rule: l,
1229
1229
  options: u
1230
- } = this.cacheRule[o], c = r && !s ? this.makeIcon(e.length, a, o) : [];
1230
+ } = this.cacheRule[o], f = r && !s ? this.makeIcon(e.length, a, o) : [];
1231
1231
  return t("div", {
1232
1232
  class: "_fc-group-container",
1233
1233
  key: o
@@ -1235,9 +1235,9 @@ const Pr = "fcGroup", Tr = {
1235
1235
  key: o
1236
1236
  }, {
1237
1237
  on: {
1238
- "update:value": (p) => this.formData(o, p),
1239
- "emit-event": (p, ...m) => this.emitEvent(p, m, a, o),
1240
- input: (p) => this.add$f(a, o, p)
1238
+ "update:value": (d) => this.formData(o, d),
1239
+ "emit-event": (d, ...g) => this.emitEvent(d, g, a, o),
1240
+ input: (d) => this.add$f(a, o, d)
1241
1241
  }
1242
1242
  }, {}, {
1243
1243
  props: {
@@ -1252,9 +1252,9 @@ const Pr = "fcGroup", Tr = {
1252
1252
  }
1253
1253
  }])), t("div", {
1254
1254
  class: "_fc-group-idx"
1255
- }, [a + 1]), c.length ? t("div", {
1255
+ }, [a + 1]), f.length ? t("div", {
1256
1256
  class: "_fc-group-handle fc-clock"
1257
- }, [c]) : null]);
1257
+ }, [f]) : null]);
1258
1258
  });
1259
1259
  return t("div", {
1260
1260
  key: "con",
@@ -1308,7 +1308,7 @@ const Pr = "fcGroup", Tr = {
1308
1308
  submitBtn: !1,
1309
1309
  resetBtn: !1
1310
1310
  };
1311
- t.formData = b({}, this.value || {}), this.cacheRule = {
1311
+ t.formData = v({}, this.value || {}), this.cacheRule = {
1312
1312
  rule: this.rule,
1313
1313
  options: t
1314
1314
  };
@@ -1348,8 +1348,8 @@ const Pr = "fcGroup", Tr = {
1348
1348
  }, Mr = [
1349
1349
  Cr,
1350
1350
  Fr,
1351
+ kr,
1351
1352
  Sr,
1352
- Rr,
1353
1353
  Dr,
1354
1354
  Vr,
1355
1355
  Tr,
@@ -1365,39 +1365,39 @@ function be(t) {
1365
1365
  let e = t.replace(/([A-Z])/g, "-$1").toLocaleLowerCase();
1366
1366
  return e.indexOf("-") === 0 && (e = e.substr(1)), e;
1367
1367
  }
1368
- const Ot = ["attrs", "props", "domProps", "scopedSlots"], St = ["class", "style", "directives"], Et = ["on", "nativeOn", "hook"], ee = (t, e = {}, r = {}) => {
1369
- const i = [...Ot, ...r.normal || []], s = [...St, ...r.array || []], n = [...Et, ...r.functional || []], o = r.props || [];
1368
+ const Ot = ["attrs", "props", "domProps", "scopedSlots"], kt = ["class", "style", "directives"], Et = ["on", "nativeOn", "hook"], ee = (t, e = {}, r = {}) => {
1369
+ const i = [...Ot, ...r.normal || []], s = [...kt, ...r.array || []], n = [...Et, ...r.functional || []], o = r.props || [];
1370
1370
  return t.reduce((a, l) => {
1371
1371
  for (const u in l)
1372
1372
  if (a[u])
1373
1373
  if (o.indexOf(u) > -1)
1374
1374
  a[u] = ee([l[u]], a[u]);
1375
1375
  else if (i.indexOf(u) > -1)
1376
- a[u] = b(b({}, a[u]), l[u]);
1376
+ a[u] = v(v({}, a[u]), l[u]);
1377
1377
  else if (s.indexOf(u) > -1) {
1378
- const c = a[u] instanceof Array ? a[u] : [a[u]], p = l[u] instanceof Array ? l[u] : [l[u]];
1379
- a[u] = [...c, ...p];
1378
+ const f = a[u] instanceof Array ? a[u] : [a[u]], d = l[u] instanceof Array ? l[u] : [l[u]];
1379
+ a[u] = [...f, ...d];
1380
1380
  } else if (n.indexOf(u) > -1)
1381
- for (const c in l[u])
1382
- if (a[u][c]) {
1383
- const p = a[u][c] instanceof Array ? a[u][c] : [a[u][c]], m = l[u][c] instanceof Array ? l[u][c] : [l[u][c]];
1384
- a[u][c] = [...p, ...m];
1381
+ for (const f in l[u])
1382
+ if (a[u][f]) {
1383
+ const d = a[u][f] instanceof Array ? a[u][f] : [a[u][f]], g = l[u][f] instanceof Array ? l[u][f] : [l[u][f]];
1384
+ a[u][f] = [...d, ...g];
1385
1385
  } else
1386
- a[u][c] = l[u][c];
1386
+ a[u][f] = l[u][f];
1387
1387
  else if (u === "hook")
1388
- for (let c in l[u])
1389
- a[u][c] ? a[u][c] = Nr(a[u][c], l[u][c]) : a[u][c] = l[u][c];
1388
+ for (let f in l[u])
1389
+ a[u][f] ? a[u][f] = Nr(a[u][f], l[u][f]) : a[u][f] = l[u][f];
1390
1390
  else
1391
1391
  a[u] = l[u];
1392
1392
  else
1393
- i.indexOf(u) > -1 || n.indexOf(u) > -1 || o.indexOf(u) > -1 ? a[u] = b({}, l[u]) : s.indexOf(u) > -1 ? a[u] = l[u] instanceof Array ? [...l[u]] : typeof l[u] == "object" ? b({}, l[u]) : l[u] : a[u] = l[u];
1393
+ i.indexOf(u) > -1 || n.indexOf(u) > -1 || o.indexOf(u) > -1 ? a[u] = v({}, l[u]) : s.indexOf(u) > -1 ? a[u] = l[u] instanceof Array ? [...l[u]] : typeof l[u] == "object" ? v({}, l[u]) : l[u] : a[u] = l[u];
1394
1394
  return a;
1395
1395
  }, e);
1396
1396
  }, Nr = (t, e) => function() {
1397
1397
  t && t.apply(this, arguments), e && e.apply(this, arguments);
1398
- }, Rt = ["type", "slot", "ignore", "emitPrefix", "value", "name", "native", "hidden", "display", "inject", "options", "emit", "nativeEmit", "link", "prefix", "suffix", "update", "sync", "optionsTo", "key", "slotUpdate", "computed", "preview", "component", "cache"], Ye = ["validate", "children", "control"], xe = ["effect", "deep", "renderSlots"];
1399
- function kt() {
1400
- return [...Rt, ...Ot, ...St, ...Et, ...Ye, ...xe];
1398
+ }, St = ["type", "slot", "ignore", "emitPrefix", "value", "name", "native", "hidden", "display", "inject", "options", "emit", "nativeEmit", "link", "prefix", "suffix", "update", "sync", "optionsTo", "key", "slotUpdate", "computed", "preview", "component", "cache"], Qe = ["validate", "children", "control"], Ye = ["effect", "deep", "renderSlots"];
1399
+ function Rt() {
1400
+ return [...St, ...Ot, ...kt, ...Et, ...Qe, ...Ye];
1401
1401
  }
1402
1402
  function Dt(t, e, r) {
1403
1403
  return `[form-create ${t}]: ${e}`;
@@ -1411,7 +1411,7 @@ function qr(t) {
1411
1411
  function jt(t) {
1412
1412
  return t == null ? "" : typeof t == "object" ? JSON.stringify(t, null, 2) : String(t);
1413
1413
  }
1414
- const We = "[[FORM-CREATE-PREFIX-", Ke = "-FORM-CREATE-SUFFIX]]";
1414
+ const Ke = "[[FORM-CREATE-PREFIX-", We = "-FORM-CREATE-SUFFIX]]";
1415
1415
  function _e(t, e) {
1416
1416
  return JSON.stringify(Ce(Array.isArray(t) ? [] : {}, t, !0), function(r, i) {
1417
1417
  if (!(i && i._isVue === !0)) {
@@ -1420,19 +1420,19 @@ function _e(t, e) {
1420
1420
  if (i.__json)
1421
1421
  return i.__json;
1422
1422
  if (i.__origin && (i = i.__origin), !i.__emit)
1423
- return We + i + Ke;
1423
+ return Ke + i + We;
1424
1424
  }
1425
1425
  }, e);
1426
1426
  }
1427
1427
  function Be(t) {
1428
1428
  return new Function("return " + t)();
1429
1429
  }
1430
- function z(t, e) {
1430
+ function x(t, e) {
1431
1431
  if (t && h.String(t) && t.length > 4) {
1432
1432
  let r = t.trim(), i = !1;
1433
1433
  try {
1434
- if (r.indexOf(Ke) > 0 && r.indexOf(We) === 0)
1435
- r = r.replace(Ke, "").replace(We, ""), i = !0;
1434
+ if (r.indexOf(We) > 0 && r.indexOf(Ke) === 0)
1435
+ r = r.replace(We, "").replace(Ke, ""), i = !0;
1436
1436
  else if (r.indexOf("$FN:") === 0)
1437
1437
  r = r.substring(4), i = !0;
1438
1438
  else if (r.indexOf("$EXEC:") === 0)
@@ -1468,7 +1468,7 @@ err: ${s}`);
1468
1468
  }
1469
1469
  function At(t, e) {
1470
1470
  return JSON.parse(t, function(r, i) {
1471
- return h.Undef(i) || !i.indexOf ? i : z(i, e);
1471
+ return h.Undef(i) || !i.indexOf ? i : x(i, e);
1472
1472
  });
1473
1473
  }
1474
1474
  let Ur = 0;
@@ -1482,7 +1482,7 @@ function oe(t, e, r) {
1482
1482
  s && ((!i[s] || typeof i[s] != "object") && E(i, s, {}), i = i[s]), s = n;
1483
1483
  }), E(i, s, r), i;
1484
1484
  }
1485
- function Xe(t, e) {
1485
+ function ze(t, e) {
1486
1486
  return {
1487
1487
  value: t,
1488
1488
  enumerable: !1,
@@ -1497,9 +1497,9 @@ function It(t, e) {
1497
1497
  return Ce([], [...t], e || !1);
1498
1498
  }
1499
1499
  function te(t, e) {
1500
- return ee(Array.isArray(e) ? e : [e], t, { array: Ye, normal: xe }), t;
1500
+ return ee(Array.isArray(e) ? e : [e], t, { array: Qe, normal: Ye }), t;
1501
1501
  }
1502
- function ft(t) {
1502
+ function ct(t) {
1503
1503
  const e = h.Function(t.getRule) ? t.getRule() : t;
1504
1504
  return e.type || (e.type = "input"), e;
1505
1505
  }
@@ -1515,7 +1515,7 @@ function Pt(t, e) {
1515
1515
  }
1516
1516
  }, r), {}));
1517
1517
  }
1518
- function x(t) {
1518
+ function Y(t) {
1519
1519
  return t.__fc__ || (t.__origin__ ? t.__origin__.__fc__ : null);
1520
1520
  }
1521
1521
  function F(t, e) {
@@ -1526,9 +1526,9 @@ function F(t, e) {
1526
1526
  }
1527
1527
  return e;
1528
1528
  }
1529
- function ze(t, e) {
1529
+ function xe(t, e) {
1530
1530
  let r = null;
1531
- return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) => ze(i, e)) : r = t, r && e && H(r).forEach((i) => {
1531
+ return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) => xe(i, e)) : r = t, r && e && H(r).forEach((i) => {
1532
1532
  (Array.isArray(i) ? i : [i]).forEach((n) => {
1533
1533
  n && typeof n == "object" && (n.data || (n.data = {}), (!n.data.slot || n.data.slot === "default") && (n.data.slot = e || "default"));
1534
1534
  });
@@ -1538,12 +1538,12 @@ function Gr(t, e) {
1538
1538
  if (h.Object(t)) {
1539
1539
  const r = {};
1540
1540
  return Object.keys(t).forEach((i) => {
1541
- r[i] = ze(t[i], i);
1541
+ r[i] = xe(t[i], i);
1542
1542
  }), r;
1543
1543
  } else
1544
- return ze(t, e);
1544
+ return xe(t, e);
1545
1545
  }
1546
- function Se() {
1546
+ function ke() {
1547
1547
  const t = {}, e = (r) => r || "default";
1548
1548
  return {
1549
1549
  setSlot(r, i) {
@@ -1582,9 +1582,9 @@ function Se() {
1582
1582
  function Ee(t, e) {
1583
1583
  return Object.setPrototypeOf(t, e), t;
1584
1584
  }
1585
- const ht = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e, ce = {
1585
+ const ht = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e, fe = {
1586
1586
  "==": (t, e) => JSON.stringify(t) === JSON.stringify(ht(t, e)),
1587
- "!=": (t, e) => !ce["=="](t, e),
1587
+ "!=": (t, e) => !fe["=="](t, e),
1588
1588
  ">": (t, e) => t > e,
1589
1589
  ">=": (t, e) => t >= e,
1590
1590
  "<": (t, e) => t < e,
@@ -1593,13 +1593,13 @@ const ht = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? N
1593
1593
  return t && t.indexOf && t.indexOf(ht(t[0], e)) > -1;
1594
1594
  },
1595
1595
  notOn(t, e) {
1596
- return !ce.on(t, e);
1596
+ return !fe.on(t, e);
1597
1597
  },
1598
1598
  in(t, e) {
1599
1599
  return e && e.indexOf && e.indexOf(t) > -1;
1600
1600
  },
1601
1601
  notIn(t, e) {
1602
- return !ce.in(t, e);
1602
+ return !fe.in(t, e);
1603
1603
  },
1604
1604
  between(t, e) {
1605
1605
  return t > e[0] && t < e[1];
@@ -1636,15 +1636,15 @@ function dt(t) {
1636
1636
  n === 0 ? i = s : i += "." + s, r.push(i);
1637
1637
  }), r.join(" && ");
1638
1638
  }
1639
- const ke = (t, e) => {
1639
+ const Re = (t, e) => {
1640
1640
  if (!(!t || t === e || !t.$props)) {
1641
1641
  if (t.$props.formCreateInject)
1642
1642
  return t.$props.formCreateInject;
1643
1643
  if (t.$parent)
1644
- return ke(t.$parent, e);
1644
+ return Re(t.$parent, e);
1645
1645
  }
1646
1646
  };
1647
- function Wr(t, e, r) {
1647
+ function Kr(t, e, r) {
1648
1648
  const i = "FormCreate" + (t.isMobile ? "Mobile" : "");
1649
1649
  return {
1650
1650
  name: i,
@@ -1704,93 +1704,93 @@ function Wr(t, e, r) {
1704
1704
  a = a.parent;
1705
1705
  else
1706
1706
  a = n;
1707
- const { rule: l, value: u, subForm: c, inFor: p } = lt(s), m = ne({
1707
+ const { rule: l, value: u, subForm: f, inFor: d } = lt(s), g = ne({
1708
1708
  ctxInject: {},
1709
1709
  destroyed: !1,
1710
1710
  isShow: !0,
1711
1711
  unique: 1,
1712
1712
  renderRule: [...l.value || []],
1713
1713
  updateValue: JSON.stringify(u.value || {})
1714
- }), g = new t(n), $ = g.api(), w = p.value, O = () => {
1714
+ }), m = new t(n), $ = m.api(), w = d.value, O = () => {
1715
1715
  if (o) {
1716
- const S = ke(n, o);
1717
- if (S) {
1718
- let R;
1719
- w ? (R = H(S.getSubForm()), R.push($)) : R = $, S.subForm(R);
1716
+ const k = Re(n, o);
1717
+ if (k) {
1718
+ let S;
1719
+ w ? (S = H(k.getSubForm()), S.push($)) : S = $, k.subForm(S);
1720
1720
  }
1721
1721
  }
1722
1722
  }, G = () => {
1723
- const S = ke(n, o);
1724
- if (S)
1723
+ const k = Re(n, o);
1724
+ if (k)
1725
1725
  if (w) {
1726
- const R = H(S.getSubForm()), N = R.indexOf($);
1727
- N > -1 && R.splice(N, 1);
1726
+ const S = H(k.getSubForm()), N = S.indexOf($);
1727
+ N > -1 && S.splice(N, 1);
1728
1728
  } else
1729
- S.subForm();
1729
+ k.subForm();
1730
1730
  };
1731
1731
  let T = null;
1732
1732
  ur(() => {
1733
1733
  L(() => {
1734
- let S = "";
1735
- const R = s.option && s.option.globalClass || {};
1736
- Object.keys(R).forEach((N) => {
1734
+ let k = "";
1735
+ const S = s.option && s.option.globalClass || {};
1736
+ Object.keys(S).forEach((N) => {
1737
1737
  let pe = "";
1738
- R[N].style && Object.keys(R[N].style).forEach((K) => {
1739
- pe += be(K) + ":" + R[N].style[K] + ";";
1740
- }), R[N].content && (pe += R[N].content + ";"), pe && (S += `.${N}{${pe}}`);
1741
- }), s.option && s.option.style && (S += s.option.style), T || (T = document.createElement("style"), T.type = "text/css", document.head.appendChild(T)), T.innerHTML = S || "";
1738
+ S[N].style && Object.keys(S[N].style).forEach((W) => {
1739
+ pe += be(W) + ":" + S[N].style[W] + ";";
1740
+ }), S[N].content && (pe += S[N].content + ";"), pe && (k += `.${N}{${pe}}`);
1741
+ }), s.option && s.option.style && (k += s.option.style), T || (T = document.createElement("style"), T.type = "text/css", document.head.appendChild(T)), T.innerHTML = k || "";
1742
1742
  }, () => {
1743
1743
  });
1744
1744
  });
1745
1745
  const M = se(() => {
1746
- g.bus.$emit("$loadData.$topForm");
1746
+ m.bus.$emit("$loadData.$topForm");
1747
1747
  }, 100), he = se(function() {
1748
- g.bus.$emit("$loadData.$scopeForm");
1748
+ m.bus.$emit("$loadData.$scopeForm");
1749
1749
  }, 100), Ve = se(() => {
1750
- g.bus.$emit("$loadData.$form");
1751
- }, 100), de = (S) => {
1752
- g.bus.$emit("change-$form." + S);
1750
+ m.bus.$emit("$loadData.$form");
1751
+ }, 100), de = (k) => {
1752
+ m.bus.$emit("change-$form." + k);
1753
1753
  };
1754
- return cr(() => {
1755
- o && ($.top.bus.$on("$loadData.$form", M), $.top.bus.$on("change", de)), $ !== $.scope && $.scope.bus.$on("$loadData.$scopeForm", he), g.mounted();
1756
- }), fr(() => {
1757
- o && ($.top.bus.$off("$loadData.$form", M), $.top.bus.$off("change", de)), $ !== $.scope && $.scope.bus.$off("$loadData.$scopeForm", he), T && document.head.removeChild(T), G(), m.destroyed = !0, g.unmount();
1754
+ return fr(() => {
1755
+ o && ($.top.bus.$on("$loadData.$form", M), $.top.bus.$on("change", de)), $ !== $.scope && $.scope.bus.$on("$loadData.$scopeForm", he), m.mounted();
1756
+ }), cr(() => {
1757
+ o && ($.top.bus.$off("$loadData.$form", M), $.top.bus.$off("change", de)), $ !== $.scope && $.scope.bus.$off("$loadData.$scopeForm", he), T && document.head.removeChild(T), G(), g.destroyed = !0, m.unmount();
1758
1758
  }), hr(() => {
1759
- g.updated();
1760
- }), L(c, (S) => {
1761
- S ? O() : G();
1759
+ m.updated();
1760
+ }), L(f, (k) => {
1761
+ k ? O() : G();
1762
1762
  }, { immediate: !0 }), L(() => s.option, () => {
1763
- g.initOptions(), $.refresh();
1764
- }, { deep: !0 }), L(() => [...l.value], (S) => {
1765
- g.$handle.isBreakWatch() || S.length === m.renderRule.length && S.every((R) => m.renderRule.indexOf(R) > -1) || (g.$handle.updateAppendData(), g.$handle.reloadRule(l.value), n.renderRule());
1763
+ m.initOptions(), $.refresh();
1764
+ }, { deep: !0 }), L(() => [...l.value], (k) => {
1765
+ m.$handle.isBreakWatch() || k.length === g.renderRule.length && k.every((S) => g.renderRule.indexOf(S) > -1) || (m.$handle.updateAppendData(), m.$handle.reloadRule(l.value), n.renderRule());
1766
1766
  }), L(() => [s.disabled, s.preview], () => {
1767
1767
  $.refresh();
1768
- }), L(u, (S) => {
1769
- _e(S || {}) !== m.updateValue && ($.config.forceCoverValue ? $.coverValue(S || {}) : $.setValue(S || {}));
1768
+ }), L(u, (k) => {
1769
+ _e(k || {}) !== g.updateValue && ($.config.forceCoverValue ? $.coverValue(k || {}) : $.setValue(k || {}));
1770
1770
  }, { deep: !0, flush: "post" }), L(() => s.index, () => {
1771
- $.coverValue({}), g.$handle.updateAppendData(), I(() => {
1771
+ $.coverValue({}), m.$handle.updateAppendData(), I(() => {
1772
1772
  I(() => {
1773
1773
  $.clearValidateState();
1774
1774
  });
1775
1775
  });
1776
- }, { flush: "sync" }), q(b({
1777
- fc: ge(g),
1776
+ }, { flush: "sync" }), q(v({
1777
+ fc: ge(m),
1778
1778
  parent: o && ge(o),
1779
1779
  top: ge(a),
1780
1780
  fapi: ge($)
1781
- }, lt(m)), {
1782
- getGroupInject: () => ke(n, o),
1781
+ }, lt(g)), {
1782
+ getGroupInject: () => Re(n, o),
1783
1783
  refresh() {
1784
- ++m.unique;
1784
+ ++g.unique;
1785
1785
  },
1786
1786
  renderRule() {
1787
- m.renderRule = [...l.value || []];
1787
+ g.renderRule = [...l.value || []];
1788
1788
  },
1789
- updateValue(S) {
1790
- if (m.destroyed) return;
1791
- const R = _e(S);
1792
- m.updateValue !== R && (m.updateValue = R, n.$emit("update:value", S), I(() => {
1793
- Ve(), o ? c.value || he() : (M(), he());
1789
+ updateValue(k) {
1790
+ if (g.destroyed) return;
1791
+ const S = _e(k);
1792
+ g.updateValue !== S && (g.updateValue = S, n.$emit("update:value", k), I(() => {
1793
+ Ve(), o ? f.value || he() : (M(), he());
1794
1794
  }));
1795
1795
  }
1796
1796
  });
@@ -1840,9 +1840,9 @@ function Bt(t) {
1840
1840
  };
1841
1841
  });
1842
1842
  }
1843
- Bt(kt());
1843
+ Bt(Rt());
1844
1844
  const Lt = P("");
1845
- function Kr(t, e, r) {
1845
+ function Wr(t, e, r) {
1846
1846
  let i = Lt("", e);
1847
1847
  return i._data.type = t, i._data.title = r, i;
1848
1848
  }
@@ -1850,15 +1850,15 @@ function pt(t, e, r, i) {
1850
1850
  let s = Lt("", r);
1851
1851
  return s._data.type = "template", s._data.template = t, s._data.title = i, s._data.vm = e, s;
1852
1852
  }
1853
- function Xr() {
1853
+ function zr() {
1854
1854
  return {
1855
- create: Kr,
1855
+ create: Wr,
1856
1856
  createTmp: pt,
1857
1857
  template: pt,
1858
1858
  factory: P
1859
1859
  };
1860
1860
  }
1861
- function zr(t, e, r) {
1861
+ function xr(t, e, r) {
1862
1862
  const i = `fail to ${t} ${r.status}'`, s = new Error(i);
1863
1863
  return s.status = r.status, s.url = t, s;
1864
1864
  }
@@ -1887,7 +1887,7 @@ function Mt(t) {
1887
1887
  t.onError(o);
1888
1888
  }, e.onload = function() {
1889
1889
  if (e.status < 200 || e.status >= 300)
1890
- return t.onError(zr(r, t, e), mt(e));
1890
+ return t.onError(xr(r, t, e), mt(e));
1891
1891
  t.onSuccess(mt(e));
1892
1892
  }, e.open(t.method || "get", r, !0);
1893
1893
  let i;
@@ -1901,10 +1901,10 @@ function Mt(t) {
1901
1901
  }
1902
1902
  function gt(t, e, r) {
1903
1903
  return new Promise((i, s) => {
1904
- (e || Mt)(q(b({}, t), {
1904
+ (e || Mt)(q(v({}, t), {
1905
1905
  onSuccess(n) {
1906
1906
  let o = (l) => l;
1907
- const a = z(t.parse);
1907
+ const a = x(t.parse);
1908
1908
  h.Function(a) ? o = a : a && h.String(a) && (o = (l) => B(l, a)), i(o(n, void 0, r));
1909
1909
  },
1910
1910
  onError(n) {
@@ -1914,17 +1914,17 @@ function gt(t, e, r) {
1914
1914
  });
1915
1915
  }
1916
1916
  function ve(t) {
1917
- return W(t);
1917
+ return K(t);
1918
1918
  }
1919
- function Qr(t) {
1919
+ function Xr(t) {
1920
1920
  function e(n) {
1921
1921
  return h.Undef(n) ? n = t.fields() : Array.isArray(n) || (n = [n]), n;
1922
1922
  }
1923
1923
  function r(n, o, a) {
1924
- h.Undef(n) ? n = Object.keys(b(b({}, t.fieldCtx), t.nameCtx)) : Array.isArray(n) || (n = [n]), n.forEach((l) => {
1924
+ h.Undef(n) ? n = Object.keys(v(v({}, t.fieldCtx), t.nameCtx)) : Array.isArray(n) || (n = [n]), n.forEach((l) => {
1925
1925
  const u = t.fieldCtx[l] || t.nameCtx[l];
1926
- u && u.forEach((c) => {
1927
- E(c.rule, o, a), t.$render.clearCache(c);
1926
+ u && u.forEach((f) => {
1927
+ E(f.rule, o, a), t.$render.clearCache(f);
1928
1928
  });
1929
1929
  });
1930
1930
  }
@@ -1993,6 +1993,9 @@ function Qr(t) {
1993
1993
  return o > -1 ? o : void 0;
1994
1994
  }
1995
1995
  },
1996
+ get formulas() {
1997
+ return v({}, t.fc.formulas);
1998
+ },
1996
1999
  formData(n) {
1997
2000
  if (n == null || typeof n == "boolean") {
1998
2001
  const o = {};
@@ -2007,14 +2010,14 @@ function Qr(t) {
2007
2010
  return o ? ve(o.rule.value) : t.options.appendValue !== !1 && D(t.appendData, n) ? ve(t.appendData[n]) : void 0;
2008
2011
  },
2009
2012
  coverValue(n) {
2010
- const o = b({}, n || {});
2013
+ const o = v({}, n || {});
2011
2014
  t.deferSyncValue(() => {
2012
2015
  t.appendData = {}, s.fields().forEach((a) => {
2013
2016
  const l = t.fieldCtx[a];
2014
2017
  if (l) {
2015
2018
  const u = D(n, a);
2016
- l.forEach((c) => {
2017
- c.rule.value = u ? n[a] : void 0;
2019
+ l.forEach((f) => {
2020
+ f.rule.value = u ? n[a] : void 0;
2018
2021
  }), delete o[a];
2019
2022
  }
2020
2023
  }), _(t.appendData, o);
@@ -2041,7 +2044,7 @@ function Qr(t) {
2041
2044
  }, !0), o ? o.origin : void 0;
2042
2045
  },
2043
2046
  removeRule(n) {
2044
- const o = n && x(n);
2047
+ const o = n && Y(n);
2045
2048
  if (o)
2046
2049
  return o.rm(), o.origin;
2047
2050
  },
@@ -2051,24 +2054,24 @@ function Qr(t) {
2051
2054
  fields: () => t.fields(),
2052
2055
  append: (n, o, a) => {
2053
2056
  let l = t.sort.length - 1, u;
2054
- const c = t.getCtx(o);
2055
- if (c)
2057
+ const f = t.getCtx(o);
2058
+ if (f)
2056
2059
  if (a) {
2057
- if (u = c.getPending("children", c.rule.children), !Array.isArray(u)) return;
2058
- l = c.rule.children.length - 1;
2060
+ if (u = f.getPending("children", f.rule.children), !Array.isArray(u)) return;
2061
+ l = f.rule.children.length - 1;
2059
2062
  } else
2060
- l = c.root.indexOf(c.origin), u = c.root;
2063
+ l = f.root.indexOf(f.origin), u = f.root;
2061
2064
  else u = t.rules;
2062
2065
  u.splice(l + 1, 0, n);
2063
2066
  },
2064
2067
  prepend: (n, o, a) => {
2065
2068
  let l = 0, u;
2066
- const c = t.getCtx(o);
2067
- if (c)
2069
+ const f = t.getCtx(o);
2070
+ if (f)
2068
2071
  if (a) {
2069
- if (u = c.getPending("children", c.rule.children), !Array.isArray(u)) return;
2072
+ if (u = f.getPending("children", f.rule.children), !Array.isArray(u)) return;
2070
2073
  } else
2071
- l = c.root.indexOf(c.origin), u = c.root;
2074
+ l = f.root.indexOf(f.origin), u = f.root;
2072
2075
  else u = t.rules;
2073
2076
  u.splice(l, 0, n);
2074
2077
  },
@@ -2130,7 +2133,7 @@ function Qr(t) {
2130
2133
  n.forEach((a) => s.sync(a));
2131
2134
  return;
2132
2135
  }
2133
- let o = h.Object(n) ? x(n) : t.getCtxs(n);
2136
+ let o = h.Object(n) ? Y(n) : t.getCtxs(n);
2134
2137
  o && (o = Array.isArray(o) ? o : [o], o.forEach((a) => {
2135
2138
  if (!a.deleted) {
2136
2139
  const l = t.subForm[a.id];
@@ -2253,29 +2256,29 @@ function Qr(t) {
2253
2256
  return o ? t.subForm[o.id] : void 0;
2254
2257
  },
2255
2258
  getChildrenRuleList(n) {
2256
- const o = typeof n == "object", a = o ? x(n) : t.getCtx(n), l = a ? a.rule : o ? n : s.getRule(n);
2259
+ const o = typeof n == "object", a = o ? Y(n) : t.getCtx(n), l = a ? a.rule : o ? n : s.getRule(n);
2257
2260
  if (!l)
2258
2261
  return [];
2259
2262
  const u = [];
2260
- return ((p) => {
2261
- p && p.forEach((m) => {
2262
- typeof m == "object" && (m.field && u.push(m), u.push(...s.getChildrenRuleList(m)));
2263
+ return ((d) => {
2264
+ d && d.forEach((g) => {
2265
+ typeof g == "object" && (g.field && u.push(g), u.push(...s.getChildrenRuleList(g)));
2263
2266
  });
2264
2267
  })(a ? a.loadChildrenPending() : l.children), u;
2265
2268
  },
2266
2269
  getParentRule(n) {
2267
- return (typeof n == "object" ? x(n) : t.getCtx(n)).parent.rule;
2270
+ return (typeof n == "object" ? Y(n) : t.getCtx(n)).parent.rule;
2268
2271
  },
2269
2272
  getParentSubRule(n) {
2270
- const a = typeof n == "object" ? x(n) : t.getCtx(n);
2273
+ const a = typeof n == "object" ? Y(n) : t.getCtx(n);
2271
2274
  if (a) {
2272
2275
  const l = a.getParentGroup();
2273
2276
  if (l)
2274
2277
  return l.rule;
2275
2278
  }
2276
2279
  },
2277
- getChildrenFormData(n) {
2278
- return s.getChildrenRuleList(n).reduce((a, l) => (a[l.field] = ve(l.value), a), {});
2280
+ getChildrenFormData(n, o) {
2281
+ return s.getChildrenRuleList(n).reduce((l, u) => ((u.ignore !== !0 || o === !0) && (l[u.field] = ve(u.value)), l), {});
2279
2282
  },
2280
2283
  setChildrenFormData(n, o, a) {
2281
2284
  const l = s.getChildrenRuleList(n);
@@ -2288,7 +2291,7 @@ function Qr(t) {
2288
2291
  getGlobalEvent(n) {
2289
2292
  let o = s.options.globalEvent[n];
2290
2293
  if (o)
2291
- return typeof o == "object" && (o = o.handle), z(o);
2294
+ return typeof o == "object" && (o = o.handle), x(o);
2292
2295
  },
2293
2296
  getGlobalData(n) {
2294
2297
  return new Promise((o, a) => {
@@ -2299,11 +2302,11 @@ function Qr(t) {
2299
2302
  });
2300
2303
  },
2301
2304
  renderRule(n, o, a) {
2302
- const u = typeof n == "object" ? x(n) : t.getCtx(n);
2305
+ const u = typeof n == "object" ? Y(n) : t.getCtx(n);
2303
2306
  return u ? t.$render.createRuleVnode(u, o, a) : void 0;
2304
2307
  },
2305
2308
  renderChildren(n, o, a) {
2306
- const u = typeof n == "object" ? x(n) : t.getCtx(n);
2309
+ const u = typeof n == "object" ? Y(n) : t.getCtx(n);
2307
2310
  return u ? t.$render.createChildrenVnodes(u, o, a) : void 0;
2308
2311
  },
2309
2312
  nextTick(n) {
@@ -2321,21 +2324,23 @@ function Qr(t) {
2321
2324
  bus: t.bus,
2322
2325
  fetch(n) {
2323
2326
  return new Promise((o, a) => {
2324
- n = W(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() => gt(n, t.fc.create.fetch, s).then((l) => {
2327
+ n = K(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() => gt(n, t.fc.create.fetch, s).then((l) => {
2325
2328
  F(() => n.onSuccess && n.onSuccess(l)), o(l);
2326
2329
  }).catch((l) => {
2327
2330
  F(() => n.onError && n.onError(l)), a(l);
2328
- }));
2331
+ })).catch((l) => {
2332
+ });
2329
2333
  });
2330
2334
  },
2331
2335
  watchFetch(n, o, a, l) {
2332
- return t.fc.watchLoadData((u, c) => {
2333
- let p = W(n);
2334
- p = t.loadFetchVar(p, u), !(l && l(p, c) === !1) && t.beforeFetch(p).then(() => gt(p, t.fc.create.fetch, s).then((m) => {
2335
- F(() => p.onSuccess && p.onSuccess(m)), o && o(m, c);
2336
- }).catch((m) => {
2337
- F(() => p.onError && p.onError(m)), a && a(m);
2338
- }));
2336
+ return t.fc.watchLoadData((u, f) => {
2337
+ let d = K(n);
2338
+ d = t.loadFetchVar(d, u), !(l && l(d, f) === !1) && t.beforeFetch(d).then(() => gt(d, t.fc.create.fetch, s).then((g) => {
2339
+ F(() => d.onSuccess && d.onSuccess(g)), o && o(g, f);
2340
+ }).catch((g) => {
2341
+ F(() => d.onError && d.onError(g)), a && a(g);
2342
+ })).catch((g) => {
2343
+ });
2339
2344
  }, n.wait == null ? 1e3 : n.wait);
2340
2345
  },
2341
2346
  getData(n, o) {
@@ -2405,7 +2410,7 @@ function J(t) {
2405
2410
  function Nt(t) {
2406
2411
  return t.replace(t[0], t[0].toLowerCase());
2407
2412
  }
2408
- function Yr(t) {
2413
+ function Qr(t) {
2409
2414
  _(t.prototype, {
2410
2415
  initRender() {
2411
2416
  this.cacheConfig = {};
@@ -2423,7 +2428,7 @@ function Yr(t) {
2423
2428
  if (!this.vm.isShow)
2424
2429
  return;
2425
2430
  this.$manager.beforeRender();
2426
- const e = Se();
2431
+ const e = ke();
2427
2432
  return this.sort.forEach((r) => {
2428
2433
  this.renderSlot(e, this.$handle.ctxs[r]);
2429
2434
  }), this.$manager.render(e);
@@ -2485,10 +2490,10 @@ function Yr(t) {
2485
2490
  slotValue: l
2486
2491
  };
2487
2492
  l.length && i.slotUpdate && F(() => i.slotUpdate(u));
2488
- let c = [];
2489
- const p = e.loadChildrenPending();
2490
- e.parser.renderChildren ? c = e.parser.renderChildren(p, e) : e.parser.loadChildren !== !1 && (c = this.renderChildren(p, e)), Object.keys(n.renderSlots || {}).forEach(($) => {
2491
- c.push(this.renderRule({
2493
+ let f = [];
2494
+ const d = e.loadChildrenPending();
2495
+ e.parser.renderChildren ? f = e.parser.renderChildren(d, e) : e.parser.loadChildren !== !1 && (f = this.renderChildren(d, e)), Object.keys(n.renderSlots || {}).forEach(($) => {
2496
+ f.push(this.renderRule({
2492
2497
  type: "template",
2493
2498
  slot: $
2494
2499
  }, (() => {
@@ -2498,9 +2503,9 @@ function Yr(t) {
2498
2503
  return this.renderRule(w);
2499
2504
  })()));
2500
2505
  });
2501
- const m = this.getTypeSlot(e);
2502
- let g;
2503
- return m ? (u.children = c, g = m(u)) : g = a ? e.parser.preview(Je(c), e) : e.parser.render(Je(c), e), g = this.renderSides(g, e), !(!e.input && h.Undef(n.native)) && n.native !== !0 && (this.fc.targetFormDriver("updateWrap", e), g = this.$manager.makeWrap(e, g)), e.none && (Array.isArray(g) ? g = g.map(($) => !$ || !$.tag ? $ : this.none($)) : g = this.none(g)), o && this.setCache(e, () => this.stable(g), r), g;
2506
+ const g = this.getTypeSlot(e);
2507
+ let m;
2508
+ return g ? (u.children = f, m = g(u)) : m = a ? e.parser.preview(Je(f), e) : e.parser.render(Je(f), e), m = this.renderSides(m, e), !(!e.input && h.Undef(n.native)) && n.native !== !0 && (this.fc.targetFormDriver("updateWrap", e), m = this.$manager.makeWrap(e, m)), e.none && (Array.isArray(m) ? m = m.map(($) => !$ || !$.tag ? $ : this.none($)) : m = this.none(m)), o && this.setCache(e, () => this.stable(m), r), m;
2504
2509
  }, this.setCache(e, s, r);
2505
2510
  }
2506
2511
  return (...s) => {
@@ -2567,8 +2572,8 @@ function Yr(t) {
2567
2572
  preview: e.prop.preview,
2568
2573
  options: e.prop.options,
2569
2574
  prop: function() {
2570
- const s = b({}, e.prop);
2571
- return s.on = s.on ? b({}, s.on) : {}, delete s.model, s;
2575
+ const s = v({}, e.prop);
2576
+ return s.on = s.on ? v({}, s.on) : {}, delete s.model, s;
2572
2577
  }(),
2573
2578
  children: e.loadChildrenPending()
2574
2579
  }), i;
@@ -2576,9 +2581,14 @@ function Yr(t) {
2576
2581
  ctxProp(e) {
2577
2582
  const { ref: r, key: i, rule: s } = e;
2578
2583
  this.$manager.mergeProp(e), e.parser.mergeProp(e);
2579
- const n = b({}, e.prop.on || {}), o = {};
2584
+ const n = v({}, e.prop.on || {}), o = {};
2580
2585
  Object.keys(n).forEach((l) => {
2581
- l.indexOf("native.") === 0 && (o[l.replace("native.", "")] = n[l], delete n[l]);
2586
+ if (l.indexOf("native.") === 0)
2587
+ o[l.replace("native.", "")] = n[l], delete n[l];
2588
+ else if (this.$handle.options.transformEventName !== !1) {
2589
+ const u = be(l);
2590
+ u !== l.toLowerCase() && !n[u] && (n[u] = n[l]);
2591
+ }
2582
2592
  }), e.prop.on = n;
2583
2593
  const a = [
2584
2594
  {
@@ -2632,7 +2642,7 @@ function Yr(t) {
2632
2642
  },
2633
2643
  renderChildren(e, r, i) {
2634
2644
  if (!h.trueArray(e)) return [];
2635
- const s = Se();
2645
+ const s = ke();
2636
2646
  return e.map((n) => {
2637
2647
  if (n) {
2638
2648
  if (h.String(n)) return s.setSlot(null, i ? this.renderRule({
@@ -2658,7 +2668,7 @@ function Yr(t) {
2658
2668
  },
2659
2669
  createRuleVnode(e, r, i) {
2660
2670
  this.force = i !== !1, this.tmpInput = r;
2661
- const s = Se();
2671
+ const s = ke();
2662
2672
  return this.renderSlot(s, e, e.parent), this.force = !1, this.tmpInput = null, s.getSlots();
2663
2673
  },
2664
2674
  renderRule(e, r, i) {
@@ -2673,16 +2683,16 @@ function Yr(t) {
2673
2683
  a && (s = J(a));
2674
2684
  }
2675
2685
  if (!s) return;
2676
- const n = Se();
2686
+ const n = ke();
2677
2687
  h.trueArray(e.children) && e.children.forEach((a) => {
2678
2688
  a && n.setSlot(a == null ? void 0 : a.slot, () => this.renderRule(a));
2679
2689
  });
2680
- const o = b({}, e);
2690
+ const o = v({}, e);
2681
2691
  return delete o.type, delete o.is, this.vNode.make(s, o, n.mergeBag(r).getSlots());
2682
2692
  }
2683
2693
  });
2684
2694
  }
2685
- let xr = 1;
2695
+ let Yr = 1;
2686
2696
  function rt(t) {
2687
2697
  _(this, {
2688
2698
  $handle: t,
@@ -2692,7 +2702,7 @@ function rt(t) {
2692
2702
  vNode: new t.fc.CreateNode(t.vm),
2693
2703
  force: !1,
2694
2704
  tmpInput: null,
2695
- id: xr++
2705
+ id: Yr++
2696
2706
  }), Pt(this, {
2697
2707
  options() {
2698
2708
  return t.options;
@@ -2703,7 +2713,7 @@ function rt(t) {
2703
2713
  }), this.initCache(), this.initRender();
2704
2714
  }
2705
2715
  Zr(rt);
2706
- Yr(rt);
2716
+ Qr(rt);
2707
2717
  function ei(t) {
2708
2718
  _(t.prototype, {
2709
2719
  parseInjectEvent(e, r) {
@@ -2722,26 +2732,26 @@ function ei(t) {
2722
2732
  if (!s && Array.isArray(r) && r[0] && (h.String(r[0]) || h.Function(r[0])))
2723
2733
  return this.parseEventLst(e, r, i, !0);
2724
2734
  if (h.String(r)) {
2725
- const n = z(r);
2735
+ const n = x(r);
2726
2736
  if (n && r !== n)
2727
2737
  return n.__inject ? this.parseEvent(e, n, i, !0) : n;
2728
2738
  }
2729
2739
  },
2730
2740
  parseEmit(e, r) {
2731
2741
  let i = {}, s = e.rule, { emitPrefix: n, field: o, name: a, inject: l } = s, u = s[r ? "emit" : "nativeEmit"] || [];
2732
- return h.trueArray(u) && u.forEach((c) => {
2733
- if (!c) return;
2734
- let p, m = n || o || a;
2735
- if (h.Object(c) && (p = c.inject, c = c.name, m = c.prefix || m), m) {
2736
- r || (m = `native-${m}`);
2737
- const g = be(`${m}-${c}`), $ = (...w) => {
2738
- this.vm.$emit(g, ...w), this.vm.$emit("emit-event", g, ...w), this.bus.$emit(g, ...w);
2742
+ return h.trueArray(u) && u.forEach((f) => {
2743
+ if (!f) return;
2744
+ let d, g = n || o || a;
2745
+ if (h.Object(f) && (d = f.inject, f = f.name, g = f.prefix || g), g) {
2746
+ r || (g = `native-${g}`);
2747
+ const m = be(`${g}-${f}`), $ = (...w) => {
2748
+ this.vm.$emit(m, ...w), this.vm.$emit("emit-event", m, ...w), this.bus.$emit(m, ...w);
2739
2749
  };
2740
- if ($.__emit = !0, !p && l === !1)
2741
- i[c] = $;
2750
+ if ($.__emit = !0, !d && l === !1)
2751
+ i[f] = $;
2742
2752
  else {
2743
- let w = p || l || this.options.injectEvent;
2744
- i[c] = h.Undef(w) ? $ : this.inject(s, $, w);
2753
+ let w = d || l || this.options.injectEvent;
2754
+ i[f] = h.Undef(w) ? $ : this.inject(s, $, w);
2745
2755
  }
2746
2756
  }
2747
2757
  }), e.computed[r ? "on" : "nativeOn"] = i, i;
@@ -2776,16 +2786,16 @@ function ei(t) {
2776
2786
  if (n.forEach((a) => {
2777
2787
  const l = a.split("||"), u = l[0].trim();
2778
2788
  if (u) {
2779
- const c = (l[1] || "").trim();
2780
- let p, m = !1;
2789
+ const f = (l[1] || "").trim();
2790
+ let d, g = !1;
2781
2791
  if (i && u.indexOf("$form.") === 0) {
2782
- const g = u.split(".");
2783
- g.shift(), D(i.value, g[0]) && (m = !0, p = r ? r({
2784
- id: "$form." + g[0] + "_" + i.rule.__fc__.id,
2785
- getValue: () => B(i.value, g)
2786
- }) : B(i.value, g));
2792
+ const m = u.split(".");
2793
+ m.shift(), D(i.value, m[0]) && (g = !0, d = r ? r({
2794
+ id: "$form." + m[0] + "_" + i.rule.__fc__.id,
2795
+ getValue: () => B(i.value, m)
2796
+ }) : B(i.value, m));
2787
2797
  }
2788
- m || (p = r ? r(u, c) : this.fc.getLoadData(u, c)), o = p, e = e.replaceAll(`{{${a}}}`, p == null ? "" : p);
2798
+ g || (d = r ? r(u, f) : this.fc.getLoadData(u, f)), o = d, e = e.replaceAll(`{{${a}}}`, d == null ? "" : d);
2789
2799
  }
2790
2800
  }), n.length === 1 && s === `{{${n[0]}}}`)
2791
2801
  return o;
@@ -2848,9 +2858,9 @@ function ii(t) {
2848
2858
  }
2849
2859
  function ni(t) {
2850
2860
  Object.defineProperties(t.origin, {
2851
- __fc__: Xe(ge(t), !0)
2861
+ __fc__: ze(ge(t), !0)
2852
2862
  }), t.rule !== t.origin && Object.defineProperties(t.rule, {
2853
- __fc__: Xe(ge(t), !0)
2863
+ __fc__: ze(ge(t), !0)
2854
2864
  });
2855
2865
  }
2856
2866
  function qt(t, e, r) {
@@ -2872,14 +2882,14 @@ function qt(t, e, r) {
2872
2882
  parent: null,
2873
2883
  group: e.subRule ? this : null,
2874
2884
  cacheConfig: null,
2875
- prop: b({}, e),
2885
+ prop: v({}, e),
2876
2886
  computed: {},
2877
2887
  payload: {},
2878
2888
  refRule: {},
2879
2889
  input: s,
2880
2890
  el: void 0,
2881
2891
  exportEl: void 0,
2882
- defaultValue: s ? W(r) : void 0,
2892
+ defaultValue: s ? K(r) : void 0,
2883
2893
  field: e.field || void 0
2884
2894
  }), this.updateKey(), ni(this), this.update(t, !0);
2885
2895
  }
@@ -2920,8 +2930,8 @@ _(qt.prototype, {
2920
2930
  rule: this.rule,
2921
2931
  api: this.$api,
2922
2932
  update: (u) => {
2923
- const c = u || i, p = this.getPending(e, i);
2924
- this.setPending(e, r, c), o && o(c, p);
2933
+ const f = u || i, d = this.getPending(e, i);
2934
+ this.setPending(e, r, f), o && o(f, d);
2925
2935
  },
2926
2936
  reload: () => {
2927
2937
  const u = this.getPending(e, i);
@@ -2929,8 +2939,8 @@ _(qt.prototype, {
2929
2939
  }
2930
2940
  }));
2931
2941
  l && h.Function(l.then) ? (l.then((u) => {
2932
- const c = u || i;
2933
- this.setPending(e, r, c), s && s(c), this.$api && this.$api.sync(this.rule);
2942
+ const f = u || i;
2943
+ this.setPending(e, r, f), s && s(f), this.$api && this.$api.sync(this.rule);
2934
2944
  }).catch((u) => {
2935
2945
  console.error(u);
2936
2946
  }), a = i, this.setPending(e, r, a)) : (a = l || i, this.setPending(e, r, a), s && s(a));
@@ -2963,7 +2973,7 @@ _(qt.prototype, {
2963
2973
  },
2964
2974
  initProp() {
2965
2975
  var e, r;
2966
- const t = b({}, this.rule);
2976
+ const t = v({}, this.rule);
2967
2977
  delete t.children, delete t.validate, this.prop = te({}, [t, ...Object.keys(this.payload).map((i) => this.payload[i]), this.computed]), this.prop.validate = [...((r = (e = this.refRule) == null ? void 0 : e.__$validate) == null ? void 0 : r.value) || [], ...this.prop.validate || []];
2968
2978
  },
2969
2979
  initNone() {
@@ -3039,12 +3049,12 @@ function si(t) {
3039
3049
  });
3040
3050
  },
3041
3051
  parseRule(e) {
3042
- const r = ft(e);
3052
+ const r = ct(e);
3043
3053
  return Object.defineProperties(r, {
3044
- __origin__: Xe(e, !0)
3054
+ __origin__: ze(e, !0)
3045
3055
  }), oi(r), this.appendValue(r), [r, r.prefix, r.suffix].forEach((i) => {
3046
3056
  i && this.loadFn(i, r);
3047
- }), this.loadCtrl(r), r.update && (r.update = z(r.update)), r;
3057
+ }), this.loadCtrl(r), r.update && (r.update = x(r.update)), r;
3048
3058
  },
3049
3059
  loadFn(e, r) {
3050
3060
  ["on", "props", "nativeOn", "deep"].forEach((i) => {
@@ -3053,7 +3063,7 @@ function si(t) {
3053
3063
  },
3054
3064
  loadCtrl(e) {
3055
3065
  e.control && e.control.forEach((r) => {
3056
- r.handle && (r.handle = z(r.handle));
3066
+ r.handle && (r.handle = x(r.handle));
3057
3067
  });
3058
3068
  },
3059
3069
  syncProp(e) {
@@ -3089,37 +3099,37 @@ function si(t) {
3089
3099
  if (r && !h.Object(o) || !this.pageEnd && !r && a >= this.first) return;
3090
3100
  if (o.__fc__ && o.__fc__.root === e && this.ctxs[o.__fc__.id])
3091
3101
  return s(o.__fc__.loadChildrenPending(), o.__fc__), o.__fc__;
3092
- let l = ft(o);
3102
+ let l = ct(o);
3093
3103
  const u = () => !!(l.field && this.fieldCtx[l.field] && this.fieldCtx[l.field][0] !== o.__fc__);
3094
3104
  this.fc.targetFormDriver("loadRule", { rule: l, api: this.api }, this.fc), this.ruleEffect(l, "init", { repeat: u() }), u() && this.vm.$emit("repeat-field", o, this.api);
3095
- let c, p = !1, m = !!o.__fc__, g = l.value;
3096
- if (m) {
3097
- if (c = o.__fc__, g = c.defaultValue, c.deleted) {
3098
- if ($t(c))
3105
+ let f, d = !1, g = !!o.__fc__, m = l.value;
3106
+ if (g) {
3107
+ if (f = o.__fc__, m = f.defaultValue, f.deleted) {
3108
+ if ($t(f))
3099
3109
  return;
3100
- c.update(this);
3101
- } else if (!c.check(this)) {
3102
- if ($t(c))
3110
+ f.update(this);
3111
+ } else if (!f.check(this)) {
3112
+ if ($t(f))
3103
3113
  return;
3104
- e[a] = o = o._clone ? o._clone() : At(_e(o)), c = null, p = !0;
3114
+ e[a] = o = o._clone ? o._clone() : At(_e(o)), f = null, d = !0;
3105
3115
  }
3106
3116
  }
3107
- if (c)
3108
- c.originType !== c.rule.type && c.updateType(), this.bindParser(c), this.appendValue(c.rule), c.parent && c.parent !== r && this.rmSubRuleData(c);
3117
+ if (f)
3118
+ f.originType !== f.rule.type && f.updateType(), this.bindParser(f), this.appendValue(f.rule), f.parent && f.parent !== r && this.rmSubRuleData(f);
3109
3119
  else {
3110
3120
  const O = this.parseRule(o);
3111
- c = new qt(this, O, g), this.bindParser(c);
3121
+ f = new qt(this, O, m), this.bindParser(f);
3112
3122
  }
3113
- [!1, !0].forEach((O) => this.parseEmit(c, O)), this.syncProp(c), c.parent = r || null, c.root = e, this.setCtx(c), !p && !m && (this.effect(c, "load"), this.targetHook(c, "load")), this.effect(c, "created");
3114
- const $ = c.loadChildrenPending();
3115
- if (c.parser.loadChildren === !1 || s($, c), !r) {
3123
+ [!1, !0].forEach((O) => this.parseEmit(f, O)), this.syncProp(f), f.parent = r || null, f.root = e, this.setCtx(f), !d && !g && (this.effect(f, "load"), this.targetHook(f, "load")), this.effect(f, "created");
3124
+ const $ = f.loadChildrenPending();
3125
+ if (f.parser.loadChildren === !1 || s($, f), !r) {
3116
3126
  const O = i(a);
3117
- O > -1 || !a ? this.sort.splice(O + 1, 0, c.id) : this.sort.push(c.id);
3127
+ O > -1 || !a ? this.sort.splice(O + 1, 0, f.id) : this.sort.push(f.id);
3118
3128
  }
3119
- const w = c.rule;
3120
- return c.updated || (c.updated = !0, h.Function(w.update) && this.bus.$once("load-end", () => {
3121
- this.refreshUpdate(c, w.value, "init");
3122
- }), this.effect(c, "loaded")), this.refreshControl(c) && (this.cycleLoad = !0), c;
3129
+ const w = f.rule;
3130
+ return f.updated || (f.updated = !0, h.Function(w.update) && this.bus.$once("load-end", () => {
3131
+ this.refreshUpdate(f, w.value, "init");
3132
+ }), this.effect(f, "loaded")), this.refreshControl(f) && (this.cycleLoad = !0), f;
3123
3133
  }).filter((o) => !!o);
3124
3134
  r && (r.children = n);
3125
3135
  },
@@ -3130,28 +3140,28 @@ function si(t) {
3130
3140
  const r = ai(e), i = [], s = this.api;
3131
3141
  if (!r.length) return !1;
3132
3142
  for (let a = 0; a < r.length; a++) {
3133
- const l = r[a], u = l.handle || function(p) {
3134
- return (ce[l.condition || "=="] || ce["=="])(p, l.value);
3143
+ const l = r[a], u = l.handle || function(d) {
3144
+ return (fe[l.condition || "=="] || fe["=="])(d, l.value);
3135
3145
  };
3136
3146
  if (!h.trueArray(l.rule)) continue;
3137
- const c = q(b({}, l), {
3147
+ const f = q(v({}, l), {
3138
3148
  valid: F(() => u(e.rule.value, s)),
3139
3149
  ctrl: li(e, l.rule),
3140
3150
  isHidden: h.String(l.rule[0])
3141
3151
  });
3142
- c.valid && c.ctrl || !c.valid && !c.ctrl && !c.isHidden || i.push(c);
3152
+ f.valid && f.ctrl || !f.valid && !f.ctrl && !f.isHidden || i.push(f);
3143
3153
  }
3144
3154
  if (!i.length) return !1;
3145
3155
  const n = [];
3146
3156
  let o = !1;
3147
3157
  return this.deferSyncValue(() => {
3148
- i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: c, append: p, child: m, ctrl: g, method: $ }) => {
3158
+ i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append: d, child: g, ctrl: m, method: $ }) => {
3149
3159
  if (a) {
3150
3160
  l ? e.ctrlRule.push({
3151
3161
  __ctrl: !0,
3152
3162
  children: u,
3153
3163
  valid: l
3154
- }) : g && e.ctrlRule.splice(e.ctrlRule.indexOf(g) >>> 0, 1), n[l ? "push" : "unshift"](() => {
3164
+ }) : m && e.ctrlRule.splice(e.ctrlRule.indexOf(m) >>> 0, 1), n[l ? "push" : "unshift"](() => {
3155
3165
  $ === "disabled" || $ === "enabled" ? this.api.disabled(!l, u) : $ === "display" || $ === "show" ? this.api.display(l, u) : $ === "required" ? (u.forEach((w) => {
3156
3166
  this.api.setEffect(w, "required", l);
3157
3167
  }), l || this.api.clearValidateState(u)) : $ === "if" ? this.api.hidden(!l, u) : this.api.hidden(!l, u);
@@ -3167,11 +3177,11 @@ function si(t) {
3167
3177
  children: u
3168
3178
  };
3169
3179
  e.ctrlRule.push(w), this.bus.$once("load-start", () => {
3170
- c ? s.prepend(w, c, m) : p || m ? s.append(w, p || e.id, m) : e.root.splice(e.root.indexOf(e.origin) + 1, 0, w);
3180
+ f ? s.prepend(w, f, g) : d || g ? s.append(w, d || e.id, g) : e.root.splice(e.root.indexOf(e.origin) + 1, 0, w);
3171
3181
  });
3172
3182
  } else {
3173
- e.ctrlRule.splice(e.ctrlRule.indexOf(g), 1);
3174
- const w = x(g);
3183
+ e.ctrlRule.splice(e.ctrlRule.indexOf(m), 1);
3184
+ const w = Y(m);
3175
3185
  w && w.rm();
3176
3186
  }
3177
3187
  });
@@ -3186,7 +3196,7 @@ function si(t) {
3186
3196
  },
3187
3197
  _reloadRule(e) {
3188
3198
  e || (e = this.rules);
3189
- const r = b({}, this.ctxs);
3199
+ const r = v({}, this.ctxs);
3190
3200
  this.clearNextTick(), this.initData(e), this.fc.rules = e, this.deferSyncValue(() => {
3191
3201
  this.bus.$once("load-end", () => {
3192
3202
  Object.keys(r).filter((i) => this.ctxs[i] === void 0).forEach((i) => this.rmCtx(r[i])), this.$render.clearCacheAll();
@@ -3289,7 +3299,7 @@ function ui(t) {
3289
3299
  }), this.vm.updateValue(e);
3290
3300
  },
3291
3301
  isChange(e, r) {
3292
- return JSON.stringify(this.getFormData(e), vt) !== JSON.stringify(r, vt);
3302
+ return JSON.stringify(this.getFormData(e), bt) !== JSON.stringify(r, bt);
3293
3303
  },
3294
3304
  isQuote(e, r) {
3295
3305
  return (r instanceof Function || h.Object(r) || Array.isArray(r)) && r === e.rule.value;
@@ -3322,7 +3332,7 @@ function ui(t) {
3322
3332
  }
3323
3333
  });
3324
3334
  }
3325
- function vt(t, e) {
3335
+ function bt(t, e) {
3326
3336
  return typeof e == "function" ? "" + e : e;
3327
3337
  }
3328
3338
  const De = {
@@ -3344,8 +3354,8 @@ const De = {
3344
3354
  },
3345
3355
  mergeProp(t) {
3346
3356
  }
3347
- }, ci = ["field", "value", "vm", "template", "name", "config", "control", "inject", "sync", "payload", "optionsTo", "update", "slotUpdate", "computed", "component", "cache"];
3348
- function fi(t) {
3357
+ }, fi = ["field", "value", "vm", "template", "name", "config", "control", "inject", "sync", "payload", "optionsTo", "update", "slotUpdate", "computed", "component", "cache"];
3358
+ function ci(t) {
3349
3359
  _(t.prototype, {
3350
3360
  getCtx(e) {
3351
3361
  return this.getFieldCtx(e) || this.getNameCtx(e)[0] || this.ctxs[e];
@@ -3393,7 +3403,7 @@ function fi(t) {
3393
3403
  this.noWatchFn || (this.noWatchFn = e), F(e), this.noWatchFn === e && (this.noWatchFn = null);
3394
3404
  },
3395
3405
  watchCtx(e) {
3396
- if (kt().filter((i) => i[0] !== "_" && i[0] !== "$" && ci.indexOf(i) === -1).forEach((i) => {
3406
+ if (Rt().filter((i) => i[0] !== "_" && i[0] !== "$" && fi.indexOf(i) === -1).forEach((i) => {
3397
3407
  const s = je(e.rule, i), n = i === "children";
3398
3408
  e.refRule[i] = s, e.watch.push(L(n ? () => h.Function(s.value) ? s.value : [...s.value || []] : () => s.value, (o, a) => {
3399
3409
  let l = s.value;
@@ -3429,27 +3439,38 @@ function fi(t) {
3429
3439
  s && (i = this.api.t(s[1]));
3430
3440
  }
3431
3441
  return i;
3432
- }), e.refRule.__$validate = ye(() => H(e.rule.validate).map((i) => {
3433
- var n, o;
3434
- const s = b({}, i);
3435
- if (s.message) {
3436
- const a = s.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
3437
- a && (s.message = this.api.t(a[1], { title: (o = (n = e.refRule) == null ? void 0 : n.__$title) == null ? void 0 : o.value }));
3438
- }
3439
- if (h.Function(s.validator)) {
3440
- const a = e;
3441
- return s.validator = function(...l) {
3442
- return i.validator.call({
3443
- that: this,
3444
- id: a.id,
3445
- field: a.field,
3446
- rule: a.rule,
3447
- api: a.$handle.api
3448
- }, ...l);
3449
- }, s;
3450
- }
3451
- return s;
3452
- })), e.input) {
3442
+ }), e.refRule.__$validate = ye(() => {
3443
+ const i = (s) => {
3444
+ var o, a;
3445
+ const n = s.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
3446
+ return n ? this.api.t(n[1], { title: (a = (o = e.refRule) == null ? void 0 : o.__$title) == null ? void 0 : a.value }) : s;
3447
+ };
3448
+ return H(e.rule.validate).map((s) => {
3449
+ const n = v({}, s);
3450
+ if (n.message && (n.message = i(n.message)), h.Function(n.validator)) {
3451
+ const o = e;
3452
+ n.validator = function(...a) {
3453
+ return s.validator.call({
3454
+ that: this,
3455
+ id: o.id,
3456
+ field: o.field,
3457
+ rule: o.rule,
3458
+ api: o.$handle.api
3459
+ }, ...a);
3460
+ };
3461
+ }
3462
+ if (n.adapter) {
3463
+ if (typeof n.error == "object") {
3464
+ const o = v({}, n.error);
3465
+ Object.keys(o).forEach((a) => {
3466
+ o[a] = i(o[a]);
3467
+ }), n.error = o;
3468
+ }
3469
+ return this.adapterValidate(n, e);
3470
+ }
3471
+ return n;
3472
+ });
3473
+ }), e.input) {
3453
3474
  const i = je(e.rule, "value");
3454
3475
  e.watch.push(L(() => i.value, () => {
3455
3476
  let s = e.parser.toFormValue(i.value, e);
@@ -3476,6 +3497,115 @@ function fi(t) {
3476
3497
  }));
3477
3498
  }), this.watchEffect(e);
3478
3499
  },
3500
+ adapterValidate(e, r) {
3501
+ const i = (s, n) => {
3502
+ if ((e.beforeValidate && F(() => e.beforeValidate({
3503
+ value: s,
3504
+ api: this.api,
3505
+ validate: e,
3506
+ rule: r.rule
3507
+ }))) === !1)
3508
+ n();
3509
+ else {
3510
+ const a = this.validator(s, e);
3511
+ if (a) {
3512
+ let l = "";
3513
+ typeof e.error == "object" && (l = e.error[a] || e.error.default), !l && typeof e.message == "string" && (l = e.message), l || (l = this.getValidateMessage(r, { key: a, rule: e[a] })), n(l);
3514
+ } else if (e.validator) {
3515
+ const l = e.validator && F(() => e.validator(s, n));
3516
+ l && h.Function(l.then) && l.then(() => n()).catch((u) => n(u));
3517
+ } else
3518
+ n();
3519
+ }
3520
+ };
3521
+ return this.$manager.adapterValidate({
3522
+ required: e.required,
3523
+ message: e.message,
3524
+ target: e.trigger
3525
+ }, i);
3526
+ },
3527
+ getValidateMessage(e, r) {
3528
+ var s, n;
3529
+ const i = Array.isArray(r.rule) ? r.rule.join(",") : "" + r.rule;
3530
+ return this.api.t(r.key === "required" ? r.key : "validate." + r.key, {
3531
+ [r.key]: i,
3532
+ title: (n = (s = e.refRule) == null ? void 0 : s.__$title) == null ? void 0 : n.value
3533
+ });
3534
+ },
3535
+ validator(e, r) {
3536
+ if (h.empty(e))
3537
+ return r.required ? "required" : void 0;
3538
+ for (const [s, n] of Object.entries(r))
3539
+ switch (s) {
3540
+ case "len":
3541
+ case "maxLen":
3542
+ case "minLen":
3543
+ const o = (m) => s === "len" ? m === n : s === "maxLen" ? m <= n : m >= n;
3544
+ if (Array.isArray(e)) {
3545
+ if (!o(e.length))
3546
+ return s;
3547
+ } else {
3548
+ if (typeof e == "object")
3549
+ return s;
3550
+ if (!o(("" + e).length))
3551
+ return s;
3552
+ }
3553
+ break;
3554
+ case "pattern":
3555
+ if (!(typeof n == "string" ? new RegExp(n) : n).test("" + e))
3556
+ return s;
3557
+ break;
3558
+ case "uppercase":
3559
+ if (n && (typeof e != "string" || !/^[A-Z]*$/.test(e)))
3560
+ return s;
3561
+ break;
3562
+ case "lowercase":
3563
+ if (n && (typeof e != "string" || !/^[a-z]*$/.test(e)))
3564
+ return s;
3565
+ break;
3566
+ case "min":
3567
+ case "max":
3568
+ case "positive":
3569
+ case "negative":
3570
+ case "integer":
3571
+ case "number":
3572
+ const l = Number(e);
3573
+ if (Number.isNaN(l) || s === "min" && l < n || s === "max" && l > n || s === "positive" && l <= 0 || s === "negative" && l >= 0 || s === "integer" && !Number.isInteger(l))
3574
+ return s;
3575
+ break;
3576
+ case "equal":
3577
+ if (e !== n)
3578
+ return s;
3579
+ break;
3580
+ case "enum":
3581
+ if (Array.isArray(n) && !n.includes(e))
3582
+ return s;
3583
+ break;
3584
+ case "hasKeys":
3585
+ if (typeof e != "object" || Array.isArray(n) && n.some((m) => !(m in e)))
3586
+ return s;
3587
+ break;
3588
+ case "email":
3589
+ if (!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test("" + e))
3590
+ return s;
3591
+ break;
3592
+ case "url":
3593
+ if (!new RegExp(
3594
+ "^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$",
3595
+ "i"
3596
+ ).test("" + e))
3597
+ return s;
3598
+ break;
3599
+ case "ip":
3600
+ if (!/^(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})(\.(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})){3}$/.test("" + e))
3601
+ return s;
3602
+ break;
3603
+ case "phone":
3604
+ if (!/^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test("" + e))
3605
+ return s;
3606
+ break;
3607
+ }
3608
+ },
3479
3609
  compute(e, r) {
3480
3610
  let i;
3481
3611
  if (typeof r == "object") {
@@ -3484,19 +3614,19 @@ function fi(t) {
3484
3614
  return !0;
3485
3615
  const l = a.mode === "OR";
3486
3616
  let u = !0;
3487
- for (let c = 0; c < a.group.length; c++) {
3488
- const p = a.group[c];
3489
- let m, g = null;
3490
- if (p.variable)
3491
- g = JSON.stringify(this.fc.getLoadData(p.variable) || "");
3492
- else if (p.field)
3493
- g = dt(p.field || "");
3494
- else if (!p.mode)
3617
+ for (let f = 0; f < a.group.length; f++) {
3618
+ const d = a.group[f];
3619
+ let g, m = null;
3620
+ if (d.variable)
3621
+ m = JSON.stringify(this.fc.getLoadData(d.variable) || "");
3622
+ else if (d.field)
3623
+ m = dt(d.field || "");
3624
+ else if (!d.mode)
3495
3625
  return !0;
3496
- let $ = p.compare;
3497
- if ($ && ($ = dt($ || "")), p.mode ? m = n(p) : ce[p.condition] ? h.Function(p.handler) ? m = F(() => p.handler(this.api, e.rule)) : m = F(() => new Function("$condition", "$val", "$form", "$scope", "$group", "$rule", `with($form){with($scope){with(this){with($group){ return $condition['${p.condition}'](${g}, ${$ || "$val"}); }}}}`).call(this.api.form, ce, p.value, this.api.top.form, this.api.top === this.api.scope ? {} : this.api.scope.form, s ? this.subRuleData[s.id] || {} : {}, e.rule)) : m = !1, l && m)
3626
+ let $ = d.compare;
3627
+ if ($ && ($ = dt($ || "")), d.mode ? g = n(d) : fe[d.condition] ? h.Function(d.handler) ? g = F(() => d.handler(this.api, e.rule)) : g = F(() => new Function("$condition", "$val", "$form", "$scope", "$group", "$rule", `with($form){with($scope){with(this){with($group){ return $condition['${d.condition}'](${m}, ${$ || "$val"}); }}}}`).call(this.api.form, fe, d.value, this.api.top.form, this.api.top === this.api.scope ? {} : this.api.scope.form, s ? this.subRuleData[s.id] || {} : {}, e.rule)) : g = !1, l && g)
3498
3628
  return !0;
3499
- l || (u = u && m);
3629
+ l || (u = u && g);
3500
3630
  }
3501
3631
  return l ? !1 : u;
3502
3632
  };
@@ -3566,7 +3696,7 @@ function hi(t) {
3566
3696
  emitEvent(e, ...r) {
3567
3697
  const i = this.options[e] || this.options[J("on-" + e)];
3568
3698
  if (i) {
3569
- const s = z(i);
3699
+ const s = x(i);
3570
3700
  h.Function(s) && F(() => s(...r));
3571
3701
  }
3572
3702
  this.bus.$emit(e, ...r);
@@ -3575,7 +3705,7 @@ function hi(t) {
3575
3705
  var n, o;
3576
3706
  let s = (o = (n = e.prop) == null ? void 0 : n.hook) == null ? void 0 : o[r];
3577
3707
  s && (s = Array.isArray(s) ? s : [s], s.forEach((a) => {
3578
- F(() => a(q(b({}, i || {}), { self: e.rule, rule: e.rule, $f: this.api, api: this.api, option: this.vm.$props.option })));
3708
+ F(() => a(q(v({}, i || {}), { self: e.rule, rule: e.rule, $f: this.api, api: this.api, option: this.vm.$props.option })));
3579
3709
  }));
3580
3710
  }
3581
3711
  });
@@ -3639,19 +3769,19 @@ function di(t) {
3639
3769
  },
3640
3770
  emitEffect({ ctx: e, rule: r, input: i, type: s, custom: n }, o, a) {
3641
3771
  if (!s || ["fcFragment", "fragment"].indexOf(s) > -1) return;
3642
- const l = n || Object.keys(r).reduce((u, c) => (c[0] === "$" && (u[c.substr(1)] = r[c]), u), b({}, r.effect || {}));
3772
+ const l = n || Object.keys(r).reduce((u, f) => (f[0] === "$" && (u[f.substr(1)] = r[f]), u), v({}, r.effect || {}));
3643
3773
  Object.keys(l).forEach((u) => {
3644
- const c = this.providers[u];
3645
- if (!c || c.input && !i) return;
3646
- let p;
3647
- if (!c._c)
3648
- p = "*";
3649
- else if (c._used.indexOf(s) > -1)
3650
- p = s;
3774
+ const f = this.providers[u];
3775
+ if (!f || f.input && !i) return;
3776
+ let d;
3777
+ if (!f._c)
3778
+ d = "*";
3779
+ else if (f._used.indexOf(s) > -1)
3780
+ d = s;
3651
3781
  else
3652
3782
  return;
3653
- const m = b({ value: l[u], getValue: () => this.getEffect(r, u) }, a || {});
3654
- e && (m.getProp = () => e.effectData(u), m.clearProp = () => e.clearEffectData(u), m.mergeProp = (g) => te(m.getProp(), [g]), m.id = e.id), this.bus.$emit(`p:${u}:${p}:${c.input ? 1 : 0}`, o, [m, r, this.api]);
3783
+ const g = v({ value: l[u], getValue: () => this.getEffect(r, u) }, a || {});
3784
+ e && (g.getProp = () => e.effectData(u), g.clearProp = () => e.clearEffectData(u), g.mergeProp = (m) => te(g.getProp(), [m]), g.id = e.id), this.bus.$emit(`p:${u}:${d}:${f.input ? 1 : 0}`, o, [g, r, this.api]);
3655
3785
  });
3656
3786
  }
3657
3787
  });
@@ -3668,7 +3798,7 @@ function mi(t) {
3668
3798
  return r.length ? r : !1;
3669
3799
  } else return h.String(e) ? [e] : !1;
3670
3800
  }
3671
- function Q(t) {
3801
+ function X(t) {
3672
3802
  Pt(this, {
3673
3803
  options() {
3674
3804
  return t.options.value || {};
@@ -3706,9 +3836,9 @@ function Q(t) {
3706
3836
  }), this.initData(t.rules), this.$manager = new t.manager(this), this.$render = new rt(this), this.api = t.extendApiFn.reduce((e, r) => {
3707
3837
  const i = F(() => r(e, this));
3708
3838
  return i && i !== e && _(e, i), e;
3709
- }, Qr(this));
3839
+ }, Xr(this));
3710
3840
  }
3711
- _(Q.prototype, {
3841
+ _(X.prototype, {
3712
3842
  initData(t) {
3713
3843
  _(this, {
3714
3844
  ctxs: {},
@@ -3722,7 +3852,7 @@ _(Q.prototype, {
3722
3852
  this.updateAppendData(), this.useProvider(), this.usePage(), this.loadRule(), this.$manager.__init(), this.lifecycle("created");
3723
3853
  },
3724
3854
  updateAppendData() {
3725
- this.appendData = b(b(b({}, this.options.formData || {}), this.fc.vm.$options.propsData.value || {}), this.appendData);
3855
+ this.appendData = v(v(v({}, this.options.formData || {}), this.fc.vm.$options.propsData.value || {}), this.appendData);
3726
3856
  },
3727
3857
  isBreakWatch() {
3728
3858
  return this.loading || this.noWatchFn || this.reloading;
@@ -3737,18 +3867,23 @@ _(Q.prototype, {
3737
3867
  return new Promise((e, r) => {
3738
3868
  const i = t && t.beforeFetch && F(() => t.beforeFetch(t, { api: this.api }));
3739
3869
  i && h.Function(i.then) ? i.then(e).catch(r) : i === !1 ? r() : e();
3740
- }).then(() => this.globalBeforeFetch(t)).catch(() => {
3870
+ }).then(() => this.globalBeforeFetch(t));
3871
+ },
3872
+ beforeSubmit(t) {
3873
+ return new Promise((e, r) => {
3874
+ const i = this.options.beforeSubmit && F(() => this.options.beforeSubmit(t, { api: this.api }));
3875
+ i && h.Function(i.then) ? i.then(e).catch(r) : i === !1 ? r() : e();
3741
3876
  });
3742
3877
  }
3743
3878
  });
3744
- ei(Q);
3745
- ti(Q);
3746
- ii(Q);
3747
- si(Q);
3748
- ui(Q);
3749
- fi(Q);
3750
- hi(Q);
3751
- di(Q);
3879
+ ei(X);
3880
+ ti(X);
3881
+ ii(X);
3882
+ si(X);
3883
+ ui(X);
3884
+ ci(X);
3885
+ hi(X);
3886
+ di(X);
3752
3887
  const gi = "fcFragment", Le = {
3753
3888
  name: gi,
3754
3889
  functional: !0,
@@ -3802,7 +3937,7 @@ function $i() {
3802
3937
  }
3803
3938
  }), e;
3804
3939
  }
3805
- function vi(t) {
3940
+ function bi(t) {
3806
3941
  class e extends Ut {
3807
3942
  }
3808
3943
  return Object.assign(e.prototype, t), e;
@@ -3835,6 +3970,9 @@ _(Ut.prototype, {
3835
3970
  form() {
3836
3971
  return this.vm.$refs[this.ref];
3837
3972
  },
3973
+ adapterValidate(t, e) {
3974
+ return t.validator = (r, i, s) => e(i, s), t;
3975
+ },
3838
3976
  getSlot(t) {
3839
3977
  const e = (r) => {
3840
3978
  if (r) {
@@ -3863,7 +4001,7 @@ _(Ut.prototype, {
3863
4001
  render(t) {
3864
4002
  }
3865
4003
  });
3866
- const bi = function(t) {
4004
+ const vi = function(t) {
3867
4005
  const e = {
3868
4006
  name: "loadData",
3869
4007
  _fn: [],
@@ -3873,14 +4011,14 @@ const bi = function(t) {
3873
4011
  const o = [];
3874
4012
  n.forEach((a) => {
3875
4013
  if (a && (a.attr || a.template)) {
3876
- let l = (p) => {
3877
- let m;
3878
- a.template ? m = t.$handle.loadStrVar(a.template, p) : a.handler && h.Function(a.handler) ? m = a.handler(p, i, s) : m = p(a.attr, a.default), a.copy !== !1 && (m = W(m));
3879
- const g = a.modify ? i : r.getProp();
3880
- a.to === "child" ? g.children ? E(g.children, 0, m) : E(g, "children", [m]) : oe(g, a.to || "options", m), s.sync(i);
3881
- }, u = (p) => l(p);
3882
- const c = t.watchLoadData(u);
3883
- l = se(l, a.wait || 300), a.watch !== !1 ? o.push(c) : c();
4014
+ let l = (d) => {
4015
+ let g;
4016
+ a.template ? g = t.$handle.loadStrVar(a.template, d) : a.handler && h.Function(a.handler) ? g = a.handler(d, i, s) : g = d(a.attr, a.default), a.copy !== !1 && (g = K(g));
4017
+ const m = a.modify ? i : r.getProp();
4018
+ a.to === "child" ? m.children ? E(m.children, 0, g) : E(m, "children", [g]) : oe(m, a.to || "options", g), s.sync(i);
4019
+ }, u = (d) => l(d);
4020
+ const f = t.watchLoadData(u);
4021
+ l = se(l, a.wait || 300), a.watch !== !1 ? o.push(f) : f();
3884
4022
  }
3885
4023
  }), this._fn[r.id] = o;
3886
4024
  });
@@ -3904,13 +4042,13 @@ const bi = function(t) {
3904
4042
  const l = n[a];
3905
4043
  if (l) {
3906
4044
  const u = typeof l == "object";
3907
- let c = (g) => {
3908
- let $ = t.t(u ? l.attr : l, u ? l.params : null, g);
4045
+ let f = (m) => {
4046
+ let $ = t.t(u ? l.attr : l, u ? l.params : null, m);
3909
4047
  const w = u && l.modify ? i : r.getProp();
3910
4048
  a === "child" ? w.children ? E(w.children, 0, $) : E(w, "children", [$]) : oe(w, a, $), s.sync(i);
3911
- }, p = (g) => c(g);
3912
- const m = t.watchLoadData(p);
3913
- c = se(c, l.wait || 300), l.watch !== !1 ? o.push(m) : m();
4049
+ }, d = (m) => f(m);
4050
+ const g = t.watchLoadData(d);
4051
+ f = se(f, l.wait || 300), l.watch !== !1 ? o.push(g) : g();
3914
4052
  }
3915
4053
  }), this._fn[r.id] = o;
3916
4054
  },
@@ -3930,9 +4068,9 @@ const bi = function(t) {
3930
4068
  else {
3931
4069
  h.Object(i) || (i = { method: i });
3932
4070
  const s = i.method;
3933
- delete i.method, t.getProp().validate = [q(b({}, i), {
4071
+ delete i.method, t.getProp().validate = [q(v({}, i), {
3934
4072
  validator(...n) {
3935
- const o = x(e);
4073
+ const o = Y(e);
3936
4074
  if (o)
3937
4075
  return r.exec(o.id, h.String(s) ? s : "formCreateValidate", ...n, {
3938
4076
  attr: t,
@@ -3956,48 +4094,48 @@ const bi = function(t) {
3956
4094
  function r(s, n, o) {
3957
4095
  let a = s.value;
3958
4096
  i.deleted(s), h.Function(a) && (a = a(n, o)), a = e(a);
3959
- const l = (p) => {
3960
- p === void 0 ? s.clearProp() : oe(s.getProp(), a.to || "options", p), o.sync(n);
4097
+ const l = (d) => {
4098
+ d === void 0 ? s.clearProp() : oe(s.getProp(), a.to || "options", d), o.sync(n);
3961
4099
  };
3962
4100
  if (!a || !a.action && !a.key) {
3963
4101
  l(void 0);
3964
4102
  return;
3965
4103
  }
3966
- if (a = W(a), a.to || (a.to = "options"), a.key) {
3967
- const p = t.$handle.options.globalData[a.key];
3968
- if (!p) {
4104
+ if (a = K(a), a.to || (a.to = "options"), a.key) {
4105
+ const d = t.$handle.options.globalData[a.key];
4106
+ if (!d) {
3969
4107
  l(void 0);
3970
4108
  return;
3971
4109
  }
3972
- if (p.type === "static") {
3973
- l(p.data);
4110
+ if (d.type === "static") {
4111
+ l(d.data);
3974
4112
  return;
3975
4113
  } else
3976
- a = b(b({}, a), p);
4114
+ a = v(v({}, a), d);
3977
4115
  }
3978
- const u = a.onError, c = () => {
4116
+ const u = a.onError, f = () => {
3979
4117
  if (!s.getValue())
3980
4118
  return s.clearProp(), o.sync(n), !0;
3981
4119
  };
3982
- i._fn[s.id] = t.watchLoadData(se((p, m) => {
3983
- if (m && a.watch === !1)
4120
+ i._fn[s.id] = t.watchLoadData(se((d, g) => {
4121
+ if (g && a.watch === !1)
3984
4122
  return i._fn[s.id]();
3985
- const g = t.$handle.loadFetchVar(W(a), p, n), $ = q(b({
4123
+ const m = t.$handle.loadFetchVar(K(a), d, n), $ = q(v({
3986
4124
  headers: {}
3987
- }, g), {
4125
+ }, m), {
3988
4126
  onSuccess(w, O) {
3989
- if (c()) return;
4127
+ if (f()) return;
3990
4128
  let G = (M) => O ? M : D(M, "data") ? M.data : M;
3991
- const T = z(g.parse);
4129
+ const T = x(m.parse);
3992
4130
  h.Function(T) ? G = T : T && h.String(T) && (G = (M) => B(M, T)), l(G(w, n, o));
3993
4131
  },
3994
4132
  onError(w) {
3995
- l(void 0), !c() && (u || ((O) => et(O.message || "fetch fail " + g.action)))(w, n, o);
4133
+ l(void 0), !f() && (u || ((O) => et(O.message || "fetch fail " + m.action)))(w, n, o);
3996
4134
  }
3997
4135
  });
3998
4136
  t.$handle.beforeFetch($, { rule: n, api: o }).then(() => {
3999
- if (h.Function(g.action)) {
4000
- g.action(n, o).then((w) => {
4137
+ if (h.Function(m.action)) {
4138
+ m.action(n, o).then((w) => {
4001
4139
  $.onSuccess(w, !0);
4002
4140
  }).catch((w) => {
4003
4141
  $.onError(w);
@@ -4005,6 +4143,7 @@ const bi = function(t) {
4005
4143
  return;
4006
4144
  }
4007
4145
  F(() => t.create.fetch($, { inject: s, rule: n, api: o }));
4146
+ }).catch((w) => {
4008
4147
  });
4009
4148
  }, a.wait || 600));
4010
4149
  }
@@ -4024,7 +4163,7 @@ const bi = function(t) {
4024
4163
  return i;
4025
4164
  }, wi = {
4026
4165
  fetch: Ci,
4027
- loadData: bi,
4166
+ loadData: vi,
4028
4167
  t: _i,
4029
4168
  componentValidate: Ht
4030
4169
  };
@@ -4052,7 +4191,7 @@ function Fi(t) {
4052
4191
  };
4053
4192
  return e;
4054
4193
  }
4055
- const Oi = "html", Si = {
4194
+ const Oi = "html", ki = {
4056
4195
  name: Oi,
4057
4196
  loadChildren: !1,
4058
4197
  render(t, e) {
@@ -4080,7 +4219,7 @@ function Ei(t) {
4080
4219
  }
4081
4220
  return null;
4082
4221
  }
4083
- function Ri(t) {
4222
+ function Si(t) {
4084
4223
  const e = localStorage.getItem(t);
4085
4224
  if (e)
4086
4225
  try {
@@ -4090,7 +4229,7 @@ function Ri(t) {
4090
4229
  }
4091
4230
  return null;
4092
4231
  }
4093
- function ki(t) {
4232
+ function Ri(t) {
4094
4233
  const e = sessionStorage.getItem(t);
4095
4234
  if (e)
4096
4235
  try {
@@ -4111,22 +4250,72 @@ function Di(t) {
4111
4250
  return it(Ei, t);
4112
4251
  }
4113
4252
  function ji(t) {
4114
- return it(Ri, t);
4253
+ return it(Si, t);
4115
4254
  }
4116
4255
  function Ai(t) {
4117
- return it(ki, t);
4256
+ return it(Ri, t);
4118
4257
  }
4119
- function Vi(t, e) {
4258
+ const Vi = {
4259
+ en: {
4260
+ required: "{title} is required",
4261
+ validate: {
4262
+ url: "{title} is not a valid url",
4263
+ email: "{title} is not a valid email",
4264
+ ip: "{title} {title} is not a valid ip",
4265
+ phone: "{title} {title} is not a valid phone",
4266
+ pattern: "{title} does not match pattern {pattern}",
4267
+ uppercase: "{title} must be all uppercase",
4268
+ lowercase: "{title} must be all lowercased",
4269
+ positive: "{title} is not a positive number",
4270
+ negative: "{title} is not a negative number",
4271
+ equal: "{title} is not equal to {equal}",
4272
+ min: "{title} cannot be less than {min}",
4273
+ max: "{title} cannot be greater than {max}",
4274
+ enum: "{title} must be one of {enum}",
4275
+ hasKeys: "{title} does not contain required fields {hasKeys}",
4276
+ minLen: "{title} must be at least {minLen}",
4277
+ maxLen: "{title} cannot be longer than {maxLen}",
4278
+ len: "{title} must be exactly {len}",
4279
+ integer: "{title} is not an integer",
4280
+ number: "{title} is not an number"
4281
+ }
4282
+ },
4283
+ "zh-cn": {
4284
+ required: "{title}不能为空",
4285
+ validate: {
4286
+ url: "{title}不是有效的 url 地址",
4287
+ email: "{title}不是有效的邮箱地址",
4288
+ ip: "{title}不是有效的 IP 地址",
4289
+ phone: "{title}不是正确的手机号",
4290
+ pattern: "{title}必须匹配 {pattern}",
4291
+ uppercase: "{title}必须全大写",
4292
+ lowercase: "{title}必须全小写",
4293
+ positive: "{title}不是正数",
4294
+ negative: "{title}不是负数",
4295
+ equal: "{title}必须等于 {equal}",
4296
+ min: "{title}必须大于等于 {min}",
4297
+ max: "{title}必须小于等于 {max}",
4298
+ enum: "{title}必须是 {enum} 之一",
4299
+ hasKeys: "{title}必须包含 {hasKeys} 字段",
4300
+ minLen: "{title}长度必须大于 {minLen}",
4301
+ maxLen: "{title}长度必须小于 {maxLen}",
4302
+ len: "{title}长度必须为 {len}",
4303
+ integer: "{title}必须为整数",
4304
+ number: "{title}必须为数字"
4305
+ }
4306
+ }
4307
+ };
4308
+ function Ii(t, e) {
4120
4309
  let r;
4121
4310
  return arguments.length === 2 ? (r = arguments[1], e = r[t]) : r = arguments[2], { id: e, prop: r };
4122
4311
  }
4123
4312
  function Me() {
4124
- return Vi("name", ...arguments);
4313
+ return Ii("name", ...arguments);
4125
4314
  }
4126
- function Ii(t) {
4315
+ function Pi(t) {
4127
4316
  return !t || !t.el ? window.document.body : h.Element(t.el) ? t.el : document.querySelector(t.el);
4128
4317
  }
4129
- function Pi(t, e) {
4318
+ function Ti(t, e) {
4130
4319
  const r = new Vue({
4131
4320
  data() {
4132
4321
  return { rule: t, option: e || {} };
@@ -4137,151 +4326,151 @@ function Pi(t, e) {
4137
4326
  });
4138
4327
  return r.$mount(), r;
4139
4328
  }
4140
- function Ti(t) {
4329
+ function Bi(t) {
4141
4330
  const e = t.key || [], r = t.array || [], i = t.normal || [];
4142
- Rt.push(...e), Ye.push(...r), xe.push(...i), Bt([...e, ...r, ...i]);
4331
+ St.push(...e), Qe.push(...r), Ye.push(...i), Bt([...e, ...r, ...i]);
4143
4332
  }
4144
- let Bi = 1;
4145
- const U = {}, Re = Symbol("defValue");
4333
+ let Li = 1;
4334
+ const U = {}, Se = Symbol("defValue");
4146
4335
  function Gt(t) {
4147
4336
  const e = {
4148
4337
  [Le.name]: Le
4149
4338
  }, r = {}, i = {}, s = {}, n = {}, o = [], a = [], l = [
4150
4339
  t.extendApi
4151
- ], u = b({}, wi), c = Xr();
4152
- let p = { global: {} };
4153
- const m = t.isMobile === !0, g = ne({
4154
- $mobile: m
4340
+ ], u = v({}, wi), f = zr();
4341
+ let d = { global: {} };
4342
+ const g = t.isMobile === !0, m = ne({
4343
+ $mobile: g
4155
4344
  }), $ = $i(), w = {}, O = {};
4156
- Ti(t.attrs || {});
4157
- function G(f) {
4158
- const d = U[f];
4159
- if (Array.isArray(d))
4160
- return d.map((y) => y.api());
4161
- if (d)
4162
- return d.api();
4345
+ Bi(t.attrs || {});
4346
+ function G(c) {
4347
+ const p = U[c];
4348
+ if (Array.isArray(p))
4349
+ return p.map((y) => y.api());
4350
+ if (p)
4351
+ return p.api();
4163
4352
  }
4164
- function T(f) {
4165
- o.push(f);
4353
+ function T(c) {
4354
+ o.push(c);
4166
4355
  }
4167
4356
  function M() {
4168
- const f = Me(...arguments);
4169
- f.id && f.prop && (i[f.id] = f.prop);
4357
+ const c = Me(...arguments);
4358
+ c.id && c.prop && (i[c.id] = c.prop);
4170
4359
  }
4171
4360
  function he() {
4172
- const f = Me(...arguments);
4173
- f.id && f.prop && (u[f.id] = h.Function(f.prop) ? f.prop : q(b({}, f.prop), {
4174
- name: f.id
4361
+ const c = Me(...arguments);
4362
+ c.id && c.prop && (u[c.id] = h.Function(c.prop) ? c.prop : q(v({}, c.prop), {
4363
+ name: c.id
4175
4364
  }));
4176
4365
  }
4177
- function Ve(f) {
4178
- $.use(f);
4366
+ function Ve(c) {
4367
+ $.use(c);
4179
4368
  }
4180
4369
  function de() {
4181
- const f = Me(...arguments);
4182
- if (!f.id || !f.prop) return De;
4183
- const d = J(f.id), y = f.prop, v = y.merge === !0 ? r[d] : void 0;
4184
- r[d] = Ee(y, v || De), c[d] = P(d), y.maker && _(c, y.maker);
4370
+ const c = Me(...arguments);
4371
+ if (!c.id || !c.prop) return De;
4372
+ const p = J(c.id), y = c.prop, b = y.merge === !0 ? r[p] : void 0;
4373
+ r[p] = Ee(y, b || De), f[p] = P(p), y.maker && _(f, y.maker);
4185
4374
  }
4186
- function S(f, d) {
4375
+ function k(c, p) {
4187
4376
  let y;
4188
- if (h.String(f)) {
4189
- if (y = f, d === void 0)
4190
- return ["form-create", "formcreate"].indexOf(y) > -1 ? R() : e[y];
4377
+ if (h.String(c)) {
4378
+ if (y = c, p === void 0)
4379
+ return ["form-create", "formcreate"].indexOf(y) > -1 ? S() : e[y];
4191
4380
  } else
4192
- y = J(f.name), d = f;
4193
- if (!y || !d) return;
4194
- const v = J(y);
4195
- e[y] = d, e[v] = d, delete $.aliasMap[y], delete $.aliasMap[v], delete r[y], delete r[v], d.formCreateParser && de(y, d.formCreateParser);
4381
+ y = J(c.name), p = c;
4382
+ if (!y || !p) return;
4383
+ const b = J(y);
4384
+ e[y] = p, e[b] = p, delete $.aliasMap[y], delete $.aliasMap[b], delete r[y], delete r[b], p.formCreateParser && de(y, p.formCreateParser);
4196
4385
  }
4197
- function R() {
4198
- return Wr(Pe, e, i);
4386
+ function S() {
4387
+ return Kr(Pe, e, i);
4199
4388
  }
4200
4389
  function N() {
4201
4390
  return Le;
4202
4391
  }
4203
- function pe(f, d) {
4204
- return h.Function(f.install) ? f.install(K, d) : h.Function(f) && f(K, d), this;
4392
+ function pe(c, p) {
4393
+ return h.Function(c.install) ? c.install(W, p) : h.Function(c) && c(W, p), this;
4205
4394
  }
4206
- function K(f, d, y) {
4207
- let v = Pi(f, d || {});
4208
- const C = v.$refs.fc.formCreate;
4209
- return C.$parent = y, Ii(C.options).appendChild(v.$el), C.api();
4395
+ function W(c, p, y) {
4396
+ let b = Ti(c, p || {});
4397
+ const C = b.$refs.fc.formCreate;
4398
+ return C.$parent = y, Pi(C.options).appendChild(b.$el), C.api();
4210
4399
  }
4211
- Ee(K, O);
4212
- function Wt(f) {
4213
- let d = b({}, t);
4214
- return f ? d.inherit = {
4400
+ Ee(W, O);
4401
+ function Kt(c) {
4402
+ let p = v({}, t);
4403
+ return c ? p.inherit = {
4215
4404
  components: e,
4216
4405
  parsers: r,
4217
4406
  directives: i,
4218
4407
  modelFields: s,
4219
4408
  providers: u,
4220
4409
  useApps: o,
4221
- maker: c,
4410
+ maker: f,
4222
4411
  formulas: w,
4223
- loadData: g
4224
- } : delete d.inherit, Gt(d);
4412
+ loadData: m
4413
+ } : delete p.inherit, Gt(p);
4225
4414
  }
4226
- function Kt(f, d) {
4227
- s[f] = d;
4415
+ function Wt(c, p) {
4416
+ s[c] = p;
4228
4417
  }
4229
- function Xt(f, d) {
4230
- w[f] = d;
4418
+ function zt(c, p) {
4419
+ w[c] = p;
4231
4420
  }
4232
- function zt(f, d) {
4233
- const y = n[f] || {}, v = y.parsers || {};
4234
- d.parsers && Object.keys(d.parsers).forEach((C) => {
4235
- v[C] = Ee(d.parsers[C], De);
4236
- }), d.name = f, n[f] = q(b(b({}, y), d), { parsers: v });
4421
+ function xt(c, p) {
4422
+ const y = n[c] || {}, b = y.parsers || {};
4423
+ p.parsers && Object.keys(p.parsers).forEach((C) => {
4424
+ b[C] = Ee(p.parsers[C], De);
4425
+ }), p.name = c, n[c] = q(v(v({}, y), p), { parsers: b });
4237
4426
  }
4238
- function we(f) {
4239
- f && Object.keys(U).forEach((d) => {
4240
- (Array.isArray(U[d]) ? U[d] : [U[d]]).forEach((v) => {
4241
- v.bus.$emit("$loadData." + f);
4427
+ function we(c) {
4428
+ c && Object.keys(U).forEach((p) => {
4429
+ (Array.isArray(U[p]) ? U[p] : [U[p]]).forEach((b) => {
4430
+ b.bus.$emit("$loadData." + c);
4242
4431
  });
4243
4432
  });
4244
4433
  }
4245
- function Ie(f, d) {
4246
- oe(g, f, d), we(f);
4434
+ function Ie(c, p) {
4435
+ oe(m, c, p), we(c);
4247
4436
  }
4248
- function Fe(f, d) {
4249
- const y = (...v) => F(() => d(...v));
4250
- y._driver = !0, Ie(f, y);
4437
+ function Fe(c, p) {
4438
+ const y = (...b) => F(() => p(...b));
4439
+ y._driver = !0, Ie(c, y);
4251
4440
  }
4252
- function nt(f, d) {
4253
- const y = (f || "").split(".");
4254
- f = y.shift();
4255
- const v = y.join(".");
4256
- if (D(g, f) || E(g, f, Re), g[f] !== Re) {
4257
- let C = g[f];
4258
- return C && C._driver ? C = C(v) : y.length && (C = B(C, y)), C == null || C === "" ? d : C;
4441
+ function nt(c, p) {
4442
+ const y = (c || "").split(".");
4443
+ c = y.shift();
4444
+ const b = y.join(".");
4445
+ if (D(m, c) || E(m, c, Se), m[c] !== Se) {
4446
+ let C = m[c];
4447
+ return C && C._driver ? C = C(b) : y.length && (C = B(C, y)), C == null || C === "" ? p : C;
4259
4448
  } else
4260
- return d;
4449
+ return p;
4261
4450
  }
4262
- function Qt(f) {
4263
- l.push(f);
4451
+ function Xt(c) {
4452
+ l.push(c);
4264
4453
  }
4265
- function Zt(f) {
4266
- delete g[f], we(f);
4454
+ function Zt(c) {
4455
+ delete m[c], we(c);
4267
4456
  }
4268
- function Yt(f, d) {
4269
- a.push({ name: f, callback: d });
4457
+ function Qt(c, p) {
4458
+ a.push({ name: c, callback: p });
4270
4459
  }
4271
- function Pe(f) {
4460
+ function Pe(c) {
4272
4461
  _(this, {
4273
- id: Bi++,
4274
- create: K,
4275
- vm: f,
4276
- manager: vi(t.manager),
4462
+ id: Li++,
4463
+ create: W,
4464
+ vm: c,
4465
+ manager: bi(t.manager),
4277
4466
  parsers: r,
4278
4467
  providers: u,
4279
4468
  modelFields: s,
4280
4469
  formulas: w,
4281
- isMobile: m,
4282
- rules: f.$options.propsData.rule,
4283
- name: f.$options.propsData.name || Ae(),
4284
- inFor: f.$options.propsData.inFor,
4470
+ isMobile: g,
4471
+ rules: c.$options.propsData.rule,
4472
+ name: c.$options.propsData.name || Ae(),
4473
+ inFor: c.$options.propsData.inFor,
4285
4474
  prop: {
4286
4475
  components: e,
4287
4476
  directives: i
@@ -4290,7 +4479,7 @@ function Gt(t) {
4290
4479
  drivers: n,
4291
4480
  renderDriver: null,
4292
4481
  refreshData: we,
4293
- loadData: g,
4482
+ loadData: m,
4294
4483
  CreateNode: $,
4295
4484
  bus: new Fi(),
4296
4485
  unwatch: [],
@@ -4298,60 +4487,60 @@ function Gt(t) {
4298
4487
  extendApiFn: l,
4299
4488
  fetchCache: /* @__PURE__ */ new WeakMap(),
4300
4489
  tmpData: ne({})
4301
- }), a.forEach((d) => {
4302
- this.bus.$on(d.name, d.callback);
4490
+ }), a.forEach((p) => {
4491
+ this.bus.$on(p.name, p.callback);
4303
4492
  }), I(() => {
4304
4493
  L(this.options, () => {
4305
4494
  this.$handle.$manager.updateOptions(this.options.value), this.api().refresh();
4306
4495
  }, { deep: !0 });
4307
- }), _(f.$options.components, e), _(f.$options.directives, i), this.$handle = new Q(this), this.name && (this.inFor ? (U[this.name] || (U[this.name] = []), U[this.name].push(this)) : U[this.name] = this);
4496
+ }), _(c.$options.components, e), _(c.$options.directives, i), this.$handle = new X(this), this.name && (this.inFor ? (U[this.name] || (U[this.name] = []), U[this.name].push(this)) : U[this.name] = this);
4308
4497
  }
4309
- Pe.isMobile = m, _(Pe.prototype, {
4498
+ Pe.isMobile = g, _(Pe.prototype, {
4310
4499
  init() {
4311
4500
  this.isSub() && this.unwatch.push(L(() => this.vm.parent.fc.options.value, () => {
4312
4501
  this.initOptions(), this.$handle.api.refresh();
4313
4502
  }, { deep: !0 })), this.vm.$options.propsData.driver && (this.renderDriver = typeof this.vm.$options.propsData.driver == "object" ? this.vm.$options.propsData.driver : this.drivers[this.vm.$options.propsData.driver]), !this.renderDriver && this.vm.parent && (this.renderDriver = this.vm.parent.fc.renderDriver), this.renderDriver || (this.renderDriver = this.drivers.default), this.initOptions(), this.$handle.init();
4314
4503
  },
4315
- targetFormDriver(f, ...d) {
4316
- if (this.renderDriver && this.renderDriver[f])
4317
- return F(() => this.renderDriver[f](...d));
4504
+ targetFormDriver(c, ...p) {
4505
+ if (this.renderDriver && this.renderDriver[c])
4506
+ return F(() => this.renderDriver[c](...p));
4318
4507
  },
4319
- t(f, d, y) {
4320
- let v = y ? y("$t." + f) : this.globalLanguageDriver(f);
4321
- return v == null && (v = ""), v && d && Object.keys(d).forEach((C) => {
4508
+ t(c, p, y) {
4509
+ let b = y ? y("$t." + c) : this.globalLanguageDriver(c);
4510
+ return b == null && (b = ""), b && p && Object.keys(p).forEach((C) => {
4322
4511
  const j = new RegExp(`{${C}}`, "g");
4323
- v = v.replace(j, d[C]);
4324
- }), v;
4325
- },
4326
- globalDataDriver(f) {
4327
- let d = f.split(".");
4328
- const y = d.shift(), v = this.options.value.globalData && this.options.value.globalData[y];
4329
- if (v) {
4330
- if (v.type === "static")
4331
- return B(v.data, d);
4512
+ b = b.replace(j, p[C]);
4513
+ }), b;
4514
+ },
4515
+ globalDataDriver(c) {
4516
+ let p = c.split(".");
4517
+ const y = p.shift(), b = this.options.value.globalData && this.options.value.globalData[y];
4518
+ if (b) {
4519
+ if (b.type === "static")
4520
+ return B(b.data, p);
4332
4521
  {
4333
4522
  let C;
4334
- const j = this.fetchCache.get(v);
4523
+ const j = this.fetchCache.get(b);
4335
4524
  if (j) {
4336
- if (j.status && (C = B(j.data, d)), !j.loading)
4525
+ if (j.status && (C = B(j.data, p)), !j.loading)
4337
4526
  return C;
4338
- j.loading = !1, this.fetchCache.set(v, j);
4527
+ j.loading = !1, this.fetchCache.set(b, j);
4339
4528
  } else
4340
- this.fetchCache.set(v, { status: !1 });
4341
- const k = se(() => {
4529
+ this.fetchCache.set(b, { status: !1 });
4530
+ const R = se(() => {
4342
4531
  le();
4343
- const X = this.fetchCache.get(v);
4344
- this.options.value.globalData && Object.values(this.options.value.globalData).indexOf(v) !== -1 ? (X && (X.loading = !0, this.fetchCache.set(v, X)), this.bus.$emit("$loadData.$globalData." + y)) : this.fetchCache.delete(v);
4345
- }, v.wait || 600), ae = (X) => {
4346
- this.fetchCache.set(v, { status: !0, data: X }), this.bus.$emit("$loadData.$globalData." + y);
4347
- }, Z = (X, ue) => {
4348
- if (ue && v.watch === !1)
4532
+ const z = this.fetchCache.get(b);
4533
+ this.options.value.globalData && Object.values(this.options.value.globalData).indexOf(b) !== -1 ? (z && (z.loading = !0, this.fetchCache.set(b, z)), this.bus.$emit("$loadData.$globalData." + y)) : this.fetchCache.delete(b);
4534
+ }, b.wait || 600), ae = (z) => {
4535
+ this.fetchCache.set(b, { status: !0, data: z }), this.bus.$emit("$loadData.$globalData." + y);
4536
+ }, Z = (z, ue) => {
4537
+ if (ue && b.watch === !1)
4349
4538
  return le();
4350
4539
  if (ue) {
4351
- k();
4540
+ R();
4352
4541
  return;
4353
4542
  }
4354
- const me = this.$handle.loadFetchVar(Je(v), X);
4543
+ const me = this.$handle.loadFetchVar(Je(b), z);
4355
4544
  this.$handle.api.fetch(me).then((re) => {
4356
4545
  ae(re);
4357
4546
  }).catch((re) => {
@@ -4363,39 +4552,39 @@ function Gt(t) {
4363
4552
  }
4364
4553
  },
4365
4554
  getLocale() {
4366
- let f = this.vm.top.$props.locale;
4367
- return f && typeof f == "object" ? f.name : typeof f == "string" ? f : "zh-cn";
4368
- },
4369
- globalLanguageDriver(f) {
4370
- let d = this.vm.top.$props.locale, y;
4371
- if (d && typeof d == "object" && (y = B(d, f)), y == null) {
4372
- const v = this.options.value.language || {}, C = this.getLocale();
4373
- y = B(v[C], f);
4555
+ let c = this.vm.top.$props.locale;
4556
+ return c && typeof c == "object" ? c.name : typeof c == "string" ? c : "zh-cn";
4557
+ },
4558
+ globalLanguageDriver(c) {
4559
+ let p = this.vm.top.$props.locale, y;
4560
+ if (p && typeof p == "object" && (y = B(p, c)), y == null) {
4561
+ const b = this.options.value.language || {}, C = this.getLocale();
4562
+ y = B(b[C] || {}, c), y == null && (y = B(Vi[C] || {}, c));
4374
4563
  }
4375
4564
  return y;
4376
4565
  },
4377
- globalVarDriver(f) {
4378
- let d = f.split(".");
4379
- const y = d.shift(), v = this.options.value.globalVariable && this.options.value.globalVariable[y];
4380
- if (v) {
4381
- const C = h.Function(v) ? v : z(v.handle);
4566
+ globalVarDriver(c) {
4567
+ let p = c.split(".");
4568
+ const y = p.shift(), b = this.options.value.globalVariable && this.options.value.globalVariable[y];
4569
+ if (b) {
4570
+ const C = h.Function(b) ? b : x(b.handle);
4382
4571
  if (C) {
4383
4572
  let j;
4384
- const k = this.watchLoadData((ae, Z) => {
4385
- Z ? (this.bus.$emit("$loadData.$var." + y), k()) : j = C(ae, this.$handle.api);
4573
+ const R = this.watchLoadData((ae, Z) => {
4574
+ Z ? (this.bus.$emit("$loadData.$var." + y), R()) : j = C(ae, this.$handle.api);
4386
4575
  });
4387
- return this.unwatch.push(k), B(j, d);
4576
+ return this.unwatch.push(R), B(j, p);
4388
4577
  }
4389
4578
  }
4390
4579
  },
4391
- setData(f, d, y) {
4392
- y ? Ie(f, d) : (oe(this.vm.top.fc.tmpData, f, d), this.bus.$emit("$loadData." + f));
4580
+ setData(c, p, y) {
4581
+ y ? Ie(c, p) : (oe(this.vm.top.fc.tmpData, c, p), this.bus.$emit("$loadData." + c));
4393
4582
  },
4394
- getLoadData(f, d) {
4583
+ getLoadData(c, p) {
4395
4584
  let y = null;
4396
- if (f != null) {
4397
- let v = f.split(".");
4398
- const C = v.shift();
4585
+ if (c != null) {
4586
+ let b = c.split(".");
4587
+ const C = b.shift();
4399
4588
  if (C === "$topForm")
4400
4589
  y = this.$handle.api.top.formData(!0);
4401
4590
  else if (C === "$scopeForm")
@@ -4405,53 +4594,53 @@ function Gt(t) {
4405
4594
  else if (C === "$options")
4406
4595
  y = this.options.value;
4407
4596
  else if (C === "$globalData")
4408
- y = this.globalDataDriver(v.join(".")), v = [];
4597
+ y = this.globalDataDriver(b.join(".")), b = [];
4409
4598
  else if (C === "$var")
4410
- y = this.globalVarDriver(v.join(".")), v = [];
4599
+ y = this.globalVarDriver(b.join(".")), b = [];
4411
4600
  else if (C === "$locale")
4412
- y = this.getLocale(), v = [];
4601
+ y = this.getLocale(), b = [];
4413
4602
  else if (C === "$t")
4414
- y = this.globalLanguageDriver(v.join(".")), v = [];
4603
+ y = this.globalLanguageDriver(b.join(".")), b = [];
4415
4604
  else {
4416
4605
  if (C === "$preview")
4417
4606
  return this.$handle.preview;
4418
4607
  {
4419
4608
  const j = this.vm.top.fc.tmpData;
4420
- D(j, C) || E(j, C, Re), y = j[C] !== Re ? B(j, f) : nt(f), v = [];
4609
+ D(j, C) || E(j, C, Se), y = j[C] !== Se ? B(j, c) : nt(c), b = [];
4421
4610
  }
4422
4611
  }
4423
- y && v.length && (y = B(y, v));
4612
+ y && b.length && (y = B(y, b));
4424
4613
  }
4425
- return y == null || y === "" ? d : y;
4614
+ return y == null || y === "" ? p : y;
4426
4615
  },
4427
- watchLoadData(f, d) {
4616
+ watchLoadData(c, p) {
4428
4617
  let y = {};
4429
- const v = (k) => {
4618
+ const b = (R) => {
4430
4619
  this.get || (this.get = C), F(() => {
4431
- f(C, k);
4620
+ c(C, R);
4432
4621
  }), this.get === C && (this.get = void 0);
4433
- }, C = (k, ae) => {
4622
+ }, C = (R, ae) => {
4434
4623
  let Z;
4435
- if (typeof k == "object" && (Z = k.getValue, k = k.id), y[k])
4436
- return y[k].val;
4437
- const le = ye(() => Z ? Z() : this.getLoadData(k, ae)), X = k.split("."), ue = X.shift(), me = X.shift() || "", re = se(() => {
4438
- const Te = Z ? Z() : this.getLoadData(k, ae);
4439
- if (y[k])
4440
- JSON.stringify(Te) !== JSON.stringify(y[k].val) && (y[k].val = Te, v(!0));
4624
+ if (typeof R == "object" && (Z = R.getValue, R = R.id), y[R])
4625
+ return y[R].val;
4626
+ const le = ye(() => Z ? Z() : this.getLoadData(R, ae)), z = R.split("."), ue = z.shift(), me = z.shift() || "", re = se(() => {
4627
+ const Te = Z ? Z() : this.getLoadData(R, ae);
4628
+ if (y[R])
4629
+ JSON.stringify(Te) !== JSON.stringify(y[R].val) && (y[R].val = Te, b(!0));
4441
4630
  else return;
4442
- }, d || 0), er = L(le, (Te) => {
4631
+ }, p || 0), er = L(le, (Te) => {
4443
4632
  re();
4444
4633
  });
4445
- return this.bus.$on("$loadData." + ue, re), me && this.bus.$on("$loadData." + ue + "." + me, re), y[k] = {
4634
+ return this.bus.$on("$loadData." + ue, re), me && this.bus.$on("$loadData." + ue + "." + me, re), y[R] = {
4446
4635
  fn: () => {
4447
4636
  this.bus.$off("$loadData." + ue, re), me && this.bus.$off("$loadData." + ue + "." + me, re), er();
4448
4637
  },
4449
4638
  val: le.value
4450
4639
  }, le.value;
4451
4640
  };
4452
- v(!1);
4641
+ b(!1);
4453
4642
  const j = () => {
4454
- Object.keys(y).forEach((k) => y[k].fn()), y = {};
4643
+ Object.keys(y).forEach((R) => y[R].fn()), y = {};
4455
4644
  };
4456
4645
  return this.unwatch.push(j), j;
4457
4646
  },
@@ -4460,22 +4649,22 @@ function Gt(t) {
4460
4649
  },
4461
4650
  initOptions() {
4462
4651
  this.options.value = {};
4463
- let f = b({
4652
+ let c = v({
4464
4653
  formData: {},
4465
4654
  submitBtn: {},
4466
4655
  resetBtn: {},
4467
4656
  globalEvent: {},
4468
4657
  globalData: {}
4469
- }, W(p));
4470
- this.isSub() && (f = this.mergeOptions(f, this.vm.parent.fc.options.value || {}, !0)), f = this.mergeOptions(f, this.vm.$options.propsData.option || {}), this.updateOptions(f);
4658
+ }, K(d));
4659
+ this.isSub() && (c = this.mergeOptions(c, this.vm.parent.fc.options.value || {}, !0)), c = this.mergeOptions(c, this.vm.$options.propsData.option || {}), this.updateOptions(c);
4471
4660
  },
4472
- mergeOptions(f, d, y) {
4473
- return d = b({}, d || {}), y && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach((v) => {
4474
- delete d[v];
4475
- }), d.global && (f.global = Hr(f.global, d.global), delete d.global), this.$handle.$manager.mergeOptions([d], f), f;
4661
+ mergeOptions(c, p, y) {
4662
+ return p = v({}, p || {}), y && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach((b) => {
4663
+ delete p[b];
4664
+ }), p.global && (c.global = Hr(c.global, p.global), delete p.global), this.$handle.$manager.mergeOptions([p], c), c;
4476
4665
  },
4477
- updateOptions(f) {
4478
- this.options.value = this.mergeOptions(this.options.value, f), this.$handle.$manager.updateOptions(this.options.value), this.bus.$emit("$loadData.$options");
4666
+ updateOptions(c) {
4667
+ this.options.value = this.mergeOptions(this.options.value, c), this.$handle.$manager.updateOptions(this.options.value), this.bus.$emit("$loadData.$options");
4479
4668
  },
4480
4669
  api() {
4481
4670
  return this.$handle.api;
@@ -4489,88 +4678,88 @@ function Gt(t) {
4489
4678
  unmount() {
4490
4679
  if (this.name)
4491
4680
  if (this.inFor) {
4492
- const f = U[this.name].indexOf(this);
4493
- U[this.name].splice(f, 1);
4681
+ const c = U[this.name].indexOf(this);
4682
+ U[this.name].splice(c, 1);
4494
4683
  } else
4495
4684
  delete U[this.name];
4496
- a.forEach((f) => {
4497
- this.bus.$off(f.name, f.callback);
4498
- }), this.tmpData = {}, this.unwatch.forEach((f) => f()), this.unwatch = [], this.$handle.reloadRule([]);
4685
+ a.forEach((c) => {
4686
+ this.bus.$off(c.name, c.callback);
4687
+ }), this.tmpData = {}, this.unwatch.forEach((c) => c()), this.unwatch = [], this.$handle.reloadRule([]);
4499
4688
  },
4500
4689
  updated() {
4501
4690
  this.$handle.bindNextTick(() => this.bus.$emit("next-tick", this.$handle.api));
4502
4691
  }
4503
4692
  });
4504
- function st(f) {
4505
- _(f, {
4693
+ function st(c) {
4694
+ _(c, {
4506
4695
  version: t.version,
4507
4696
  ui: t.ui,
4508
- isMobile: m,
4509
- extendApi: Qt,
4697
+ isMobile: g,
4698
+ extendApi: Xt,
4510
4699
  getData: nt,
4511
4700
  setDataDriver: Fe,
4512
4701
  setData: Ie,
4513
4702
  removeData: Zt,
4514
4703
  refreshData: we,
4515
- maker: c,
4516
- component: S,
4704
+ maker: f,
4705
+ component: k,
4517
4706
  directive: M,
4518
- setModelField: Kt,
4519
- setFormula: Xt,
4520
- setDriver: zt,
4707
+ setModelField: Wt,
4708
+ setFormula: zt,
4709
+ setDriver: xt,
4521
4710
  register: he,
4522
4711
  $vnode: N,
4523
4712
  parser: de,
4524
4713
  use: pe,
4525
- factory: Wt,
4714
+ factory: Kt,
4526
4715
  componentAlias: Ve,
4527
4716
  copyRule: Vt,
4528
4717
  copyRules: It,
4529
4718
  mergeRule: te,
4530
4719
  fetch: Mt,
4531
- $form: R,
4532
- parseFn: z,
4720
+ $form: S,
4721
+ parseFn: x,
4533
4722
  parseJson: At,
4534
4723
  toJson: _e,
4535
4724
  useApp: T,
4536
4725
  getApi: G,
4537
- on: Yt
4726
+ on: Qt
4538
4727
  });
4539
4728
  }
4540
- function xt(f) {
4541
- _(f, {
4542
- create: K,
4543
- install(d, y) {
4544
- if (p = b(b({}, p), y || {}), d._installedFormCreate === !0) return;
4545
- d._installedFormCreate = !0;
4546
- const v = function(j, k = {}) {
4547
- return K(j, k, this);
4729
+ function Yt(c) {
4730
+ _(c, {
4731
+ create: W,
4732
+ install(p, y) {
4733
+ if (d = v(v({}, d), y || {}), p._installedFormCreate === !0) return;
4734
+ p._installedFormCreate = !0;
4735
+ const b = function(j, R = {}) {
4736
+ return W(j, R, this);
4548
4737
  };
4549
- st(v), d.prototype.$formCreate = v;
4550
- const C = R();
4551
- d.component(C.name, C), d.component("FcFragment", N()), o.forEach((j) => {
4552
- F(() => j(f, d));
4738
+ st(b), p.prototype.$formCreate = b;
4739
+ const C = S();
4740
+ p.component(C.name, C), p.component("FcFragment", N()), o.forEach((j) => {
4741
+ F(() => j(c, p));
4553
4742
  });
4554
4743
  }
4555
4744
  });
4556
4745
  }
4557
- if (st(O), xt(O), Fe("$cookie", Di), Fe("$localStorage", ji), Fe("$sessionStorage", Ai), $.use({ fragment: "fcFragment" }), t.install && K.use(t), de(Si), t.inherit) {
4558
- const f = t.inherit;
4559
- f.components && _(e, f.components), f.parsers && _(r, f.parsers), f.directives && _(i, f.directives), f.modelFields && _(s, f.modelFields), f.providers && _(u, f.providers), f.useApps && _(o, f.useApps), f.maker && _(c, f.maker), f.loadData && _(g, f.loadData), f.formulas && _(w, f.formulas);
4746
+ if (st(O), Yt(O), Fe("$cookie", Di), Fe("$localStorage", ji), Fe("$sessionStorage", Ai), $.use({ fragment: "fcFragment" }), t.install && W.use(t), de(ki), t.inherit) {
4747
+ const c = t.inherit;
4748
+ c.components && _(e, c.components), c.parsers && _(r, c.parsers), c.directives && _(i, c.directives), c.modelFields && _(s, c.modelFields), c.providers && _(u, c.providers), c.useApps && _(o, c.useApps), c.maker && _(f, c.maker), c.loadData && _(m, c.loadData), c.formulas && _(w, c.formulas);
4560
4749
  }
4561
- const Oe = R();
4750
+ const Oe = S();
4562
4751
  return Ee(Oe, O), Object.defineProperties(Oe, {
4563
4752
  fetch: {
4564
4753
  get() {
4565
4754
  return O.fetch;
4566
4755
  },
4567
- set(f) {
4568
- O.fetch = f;
4756
+ set(c) {
4757
+ O.fetch = c;
4569
4758
  }
4570
4759
  }
4571
4760
  }), Oe.util = O, Oe;
4572
4761
  }
4573
- const bt = {
4762
+ const vt = {
4574
4763
  date: "yyyy-MM-dd",
4575
4764
  month: "yyyy-MM",
4576
4765
  datetime: "yyyy-MM-dd HH:mm:ss",
@@ -4579,16 +4768,16 @@ const bt = {
4579
4768
  monthrange: "yyyy-MM",
4580
4769
  datetimerange: "yyyy-MM-dd HH:mm:ss",
4581
4770
  year: "yyyy"
4582
- }, _t = "datePicker", Li = {
4771
+ }, _t = "datePicker", Mi = {
4583
4772
  name: _t,
4584
4773
  maker: function() {
4585
4774
  return ["year", "month", "date", "dates", "week", "datetime", "datetimeRange", "dateRange", "monthRange"].reduce((t, e) => (t[e] = P(_t, { type: e.toLowerCase() }), t), {});
4586
4775
  }(),
4587
4776
  mergeProp(t) {
4588
4777
  const e = t.prop.props;
4589
- e.valueFormat || (e.valueFormat = bt[e.type] || bt.date);
4778
+ e.valueFormat || (e.valueFormat = vt[e.type] || vt.date);
4590
4779
  }
4591
- }, Ne = "hidden", Mi = {
4780
+ }, Ne = "hidden", Ni = {
4592
4781
  name: Ne,
4593
4782
  maker: {
4594
4783
  [Ne]: (t, e) => P(Ne)("", t, e)
@@ -4596,7 +4785,7 @@ const bt = {
4596
4785
  render() {
4597
4786
  return [];
4598
4787
  }
4599
- }, qe = "input", Ni = {
4788
+ }, qe = "input", qi = {
4600
4789
  name: qe,
4601
4790
  maker: function() {
4602
4791
  const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = P(qe, { type: r }), e), {});
@@ -4606,7 +4795,7 @@ const bt = {
4606
4795
  let { props: e } = t.prop;
4607
4796
  e && e.autosize && e.autosize.minRows && (e.rows = e.autosize.minRows || 2);
4608
4797
  }
4609
- }, Ct = "slider", qi = {
4798
+ }, Ct = "slider", Ui = {
4610
4799
  name: Ct,
4611
4800
  maker: {
4612
4801
  sliderRange: P(Ct, { range: !0 })
@@ -4615,7 +4804,7 @@ const bt = {
4615
4804
  let r = Array.isArray(t), i = e.prop.props, s = i.min || 0, n;
4616
4805
  return i.range === !0 ? n = r ? t : [s, parseFloat(t) || s] : n = r ? parseFloat(t[0]) || s : parseFloat(t), n;
4617
4806
  }
4618
- }, Ue = "timePicker", Ui = {
4807
+ }, Ue = "timePicker", Hi = {
4619
4808
  name: Ue,
4620
4809
  maker: {
4621
4810
  time: P(Ue, (t) => t.props.isRange = !1),
@@ -4625,27 +4814,27 @@ const bt = {
4625
4814
  const e = t.prop.props;
4626
4815
  e.valueFormat || (e.valueFormat = "HH:mm:ss");
4627
4816
  }
4628
- }, Hi = {
4817
+ }, Gi = {
4629
4818
  name: "FcRow",
4630
4819
  render(t, e) {
4631
4820
  return e.vNode.col({ props: { span: 24 } }, [
4632
4821
  e.vNode.row(e.prop, t)
4633
4822
  ]);
4634
4823
  }
4635
- }, Gi = "select", Ji = {
4636
- name: Gi,
4824
+ }, Ji = "select", Ki = {
4825
+ name: Ji,
4637
4826
  toFormValue(t, e) {
4638
4827
  return e.prop.props.multiple && !Array.isArray(t) ? H(t) : t;
4639
4828
  }
4640
4829
  }, Wi = [
4641
- Li,
4642
4830
  Mi,
4643
4831
  Ni,
4644
4832
  qi,
4645
4833
  Ui,
4646
4834
  Hi,
4647
- Ji
4648
- ], A = "el", Ki = {
4835
+ Gi,
4836
+ Ki
4837
+ ], A = "el", zi = {
4649
4838
  button: A + "Button",
4650
4839
  icon: "i",
4651
4840
  slider: A + "Slider",
@@ -4678,7 +4867,7 @@ const bt = {
4678
4867
  object: "fcSubForm",
4679
4868
  subForm: "fcSubForm"
4680
4869
  };
4681
- function Xi() {
4870
+ function xi() {
4682
4871
  return {
4683
4872
  form: {
4684
4873
  inline: !1,
@@ -4712,23 +4901,23 @@ function Xi() {
4712
4901
  }
4713
4902
  };
4714
4903
  }
4715
- function zi(t) {
4904
+ function Xi(t) {
4716
4905
  return t.type === "tooltip";
4717
4906
  }
4718
4907
  function wt(t, e) {
4719
4908
  D(t, e) && h.String(t[e]) && (t[e] = { [e]: t[e], show: !0 });
4720
4909
  }
4721
- function Y(t) {
4910
+ function Q(t) {
4722
4911
  return t === !1;
4723
4912
  }
4724
- function Qi(t, e) {
4913
+ function Zi(t, e) {
4725
4914
  D(t, e) && !h.Object(t[e]) && (t[e] = { show: !!t[e] });
4726
4915
  }
4727
4916
  function He(t) {
4728
- const e = b({}, t);
4917
+ const e = v({}, t);
4729
4918
  return delete e.children, e;
4730
4919
  }
4731
- const Zi = {
4920
+ const Qi = {
4732
4921
  validate() {
4733
4922
  const t = this.form();
4734
4923
  return t ? t.validate() : new Promise((e) => e());
@@ -4747,7 +4936,7 @@ const Zi = {
4747
4936
  },
4748
4937
  tidyOptions(t) {
4749
4938
  return ["submitBtn", "resetBtn", "row", "info", "wrap", "col", "title"].forEach((e) => {
4750
- Qi(t, e);
4939
+ Zi(t, e);
4751
4940
  }), t;
4752
4941
  },
4753
4942
  tidyRule({ prop: t }) {
@@ -4769,36 +4958,35 @@ const Zi = {
4769
4958
  });
4770
4959
  },
4771
4960
  getDefaultOptions() {
4772
- return Xi();
4961
+ return xi();
4773
4962
  },
4774
4963
  update() {
4775
4964
  const t = this.options.form;
4776
4965
  this.rule = {
4777
- props: b({}, t),
4966
+ props: v({}, t),
4778
4967
  nativeOn: {
4779
4968
  submit: (e) => {
4780
4969
  e.preventDefault();
4781
4970
  }
4782
4971
  },
4783
- class: [t.className, t.class, "form-create", this.$handle.preview ? "is-preview" : ""],
4784
4972
  style: t.style,
4785
4973
  type: "form"
4786
4974
  };
4787
4975
  },
4788
4976
  beforeRender() {
4789
- const { key: t, ref: e, $handle: r } = this;
4790
- _(this.rule, { key: t, ref: e }), _(this.rule.props, {
4977
+ const { key: t, ref: e, $handle: r } = this, i = this.options.form;
4978
+ _(this.rule, { key: t, ref: e, class: [i.className, i.class, "form-create", this.$handle.preview ? "is-preview" : ""] }), _(this.rule.props, {
4791
4979
  model: r.formData
4792
4980
  });
4793
4981
  },
4794
4982
  render(t) {
4795
- return t.slotLen() && !this.$handle.preview && t.setSlot(void 0, () => this.makeFormBtn()), this.$r(this.rule, Y(this.options.row.show) ? t.getSlots() : [this.makeRow(t)]);
4983
+ return t.slotLen() && !this.$handle.preview && t.setSlot(void 0, () => this.makeFormBtn()), this.$r(this.rule, Q(this.options.row.show) ? t.getSlots() : [this.makeRow(t)]);
4796
4984
  },
4797
4985
  makeWrap(t, e) {
4798
4986
  const r = t.prop, i = `${this.key}${t.key}`, s = r.col, n = this.isTitle(r) && r.wrap.title !== !1, o = !s.labelWidth && !n ? 0 : s.labelWidth, { inline: a, col: l } = this.rule.props;
4799
4987
  delete r.wrap.title;
4800
- const u = Y(r.wrap.show) ? e : this.$r(ee([r.wrap, {
4801
- props: q(b({
4988
+ const u = Q(r.wrap.show) ? e : this.$r(ee([r.wrap, {
4989
+ props: q(v({
4802
4990
  labelWidth: o === void 0 ? o : jt(o),
4803
4991
  label: n ? r.title.title : void 0
4804
4992
  }, He(r.wrap || {})), {
@@ -4809,22 +4997,22 @@ const Zi = {
4809
4997
  key: `${i}fi`,
4810
4998
  ref: t.wrapRef,
4811
4999
  type: "formItem"
4812
- }]), b({ default: () => e }, n ? { label: () => this.makeInfo(r, i, t) } : {}));
4813
- return a === !0 || Y(l) || Y(s.show) ? u : this.makeCol(r, i, [u]);
5000
+ }]), v({ default: () => e }, n ? { label: () => this.makeInfo(r, i, t) } : {}));
5001
+ return a === !0 || Q(l) || Q(s.show) ? u : this.makeCol(r, i, [u]);
4814
5002
  },
4815
5003
  isTitle(t) {
4816
5004
  if (this.options.form.title === !1) return !1;
4817
5005
  const e = t.title;
4818
- return !(!e.title && !e.native || Y(e.show));
5006
+ return !(!e.title && !e.native || Q(e.show));
4819
5007
  },
4820
5008
  makeInfo(t, e, r) {
4821
- var c, p, m, g, $, w;
4822
- const i = b({}, t.title), s = b({}, t.info), n = zi(s), o = this.options.form, a = this.getSlot("title"), l = [a ? a({
4823
- title: (p = (c = r.refRule) == null ? void 0 : c.__$title) == null ? void 0 : p.value,
5009
+ var f, d, g, m, $, w;
5010
+ const i = v({}, t.title), s = v({}, t.info), n = Xi(s), o = this.options.form, a = this.getSlot("title"), l = [a ? a({
5011
+ title: (d = (f = r.refRule) == null ? void 0 : f.__$title) == null ? void 0 : d.value,
4824
5012
  rule: r.rule,
4825
5013
  options: this.options
4826
- }) : ((g = (m = r.refRule) == null ? void 0 : m.__$title) == null ? void 0 : g.value) + (o.labelSuffix || o["label-suffix"] || "")];
4827
- if (!Y(s.show) && (s.info || s.native) && !Y(s.icon)) {
5014
+ }) : ((m = (g = r.refRule) == null ? void 0 : g.__$title) == null ? void 0 : m.value) + (o.labelSuffix || o["label-suffix"] || "")];
5015
+ if (!Q(s.show) && (s.info || s.native) && !Q(s.icon)) {
4828
5016
  const O = {
4829
5017
  type: s.type || "popover",
4830
5018
  slot: "label",
@@ -4871,7 +5059,7 @@ const Zi = {
4871
5059
  },
4872
5060
  makeFormBtn() {
4873
5061
  let t = [];
4874
- if (Y(this.options.submitBtn.show) || t.push(this.makeSubmitBtn()), Y(this.options.resetBtn.show) || t.push(this.makeResetBtn()), !t.length)
5062
+ if (Q(this.options.submitBtn.show) || t.push(this.makeSubmitBtn()), Q(this.options.resetBtn.show) || t.push(this.makeResetBtn()), !t.length)
4875
5063
  return;
4876
5064
  const e = this.$r({
4877
5065
  type: "formItem",
@@ -4886,7 +5074,7 @@ const Zi = {
4886
5074
  }, [e]);
4887
5075
  },
4888
5076
  makeResetBtn() {
4889
- const t = b({}, this.options.resetBtn), e = t.innerText || this.$handle.api.t("reset") || "重置";
5077
+ const t = v({}, this.options.resetBtn), e = t.innerText || this.$handle.api.t("reset") || "重置";
4890
5078
  return delete t.innerText, delete t.click, delete t.col, delete t.show, this.$r({
4891
5079
  type: "button",
4892
5080
  props: t,
@@ -4902,7 +5090,7 @@ const Zi = {
4902
5090
  }, [e]);
4903
5091
  },
4904
5092
  makeSubmitBtn() {
4905
- const t = b({}, this.options.submitBtn), e = t.innerText || this.$handle.api.t("submit") || "提交";
5093
+ const t = v({}, this.options.submitBtn), e = t.innerText || this.$handle.api.t("submit") || "提交";
4906
5094
  return delete t.innerText, delete t.click, delete t.col, delete t.show, this.$r({
4907
5095
  type: "button",
4908
5096
  props: t,
@@ -4918,26 +5106,26 @@ const Zi = {
4918
5106
  key: `${this.key}b1`
4919
5107
  }, [e]);
4920
5108
  }
4921
- }, fe = {};
4922
- Yi(fe);
4923
- xi(fe);
4924
- en(fe);
4925
- tn(fe);
4926
- rn(fe);
5109
+ }, ce = {};
5110
+ Yi(ce);
5111
+ en(ce);
5112
+ tn(ce);
5113
+ rn(ce);
5114
+ nn(ce);
4927
5115
  function Yi(t) {
4928
5116
  ["group", "tree", "switch", "upload", "autoComplete", "checkbox", "cascader", "colorPicker", "datePicker", "frame", "inputNumber", "radio", "rate"].forEach((e) => {
4929
5117
  t[e] = P(e);
4930
5118
  }), t.auto = t.autoComplete, t.number = t.inputNumber, t.color = t.colorPicker;
4931
5119
  }
4932
- function xi(t) {
5120
+ function en(t) {
4933
5121
  const e = "select", r = "multiple";
4934
5122
  t.selectMultiple = P(e, { [r]: !0 }), t.selectOne = P(e, { [r]: !1 });
4935
5123
  }
4936
- function en(t) {
5124
+ function tn(t) {
4937
5125
  const e = "tree", r = { treeSelected: "selected", treeChecked: "checked" };
4938
5126
  Object.keys(r).reduce((i, s) => (i[s] = P(e, { type: r[s] }), i), t);
4939
5127
  }
4940
- function tn(t) {
5128
+ function rn(t) {
4941
5129
  const e = "upload", r = {
4942
5130
  image: ["image", 0],
4943
5131
  file: ["file", 0],
@@ -4946,7 +5134,7 @@ function tn(t) {
4946
5134
  };
4947
5135
  Object.keys(r).reduce((i, s) => (i[s] = P(e, (n) => n.props({ uploadType: r[s][0], maxLength: r[s][1] })), i), t), t.uploadImage = t.image, t.uploadFile = t.file;
4948
5136
  }
4949
- function rn(t) {
5137
+ function nn(t) {
4950
5138
  const e = {
4951
5139
  frameInputs: ["input", 0],
4952
5140
  frameFiles: ["file", 0],
@@ -4960,7 +5148,7 @@ function rn(t) {
4960
5148
  function Ft(t, e) {
4961
5149
  return h.Boolean(t) ? t = { show: t } : !h.Undef(t) && !h.Object(t) && (t = { show: e }), t;
4962
5150
  }
4963
- function nn(t, e) {
5151
+ function sn(t, e) {
4964
5152
  return {
4965
5153
  formEl() {
4966
5154
  return e.$manager.form();
@@ -5047,7 +5235,10 @@ function nn(t, e) {
5047
5235
  return new Promise((s, n) => {
5048
5236
  (e.options.validateOnSubmit === !1 ? Promise.resolve() : t.validate()).then(() => {
5049
5237
  let a = t.formData();
5050
- h.Function(r) && F(() => r(a, t)), h.Function(e.options.onSubmit) && F(() => e.options.onSubmit(a, t)), e.vm.$emit("submit", a, t), s(a);
5238
+ e.beforeSubmit(a).then(() => {
5239
+ h.Function(r) && F(() => r(a, t)), h.Function(e.options.onSubmit) && F(() => e.options.onSubmit(a, t)), e.vm.$emit("submit", a, t), s(a);
5240
+ }).catch((l) => {
5241
+ });
5051
5242
  }).catch((...a) => {
5052
5243
  h.Function(i) && F(() => i(t, ...a)), n(...a);
5053
5244
  });
@@ -5059,14 +5250,14 @@ const Jt = {
5059
5250
  name: "required",
5060
5251
  load(t, e, r) {
5061
5252
  var s, n;
5062
- const i = sn(t.getValue());
5253
+ const i = on(t.getValue());
5063
5254
  if (i.required === !1)
5064
5255
  t.clearProp(), r.clearValidateState([e.field]);
5065
5256
  else {
5066
- const o = b({
5257
+ const o = v({
5067
5258
  required: !0,
5068
- validator(l, u, c) {
5069
- h.empty(u) ? c(o.message) : c();
5259
+ validator(l, u, f) {
5260
+ h.empty(u) ? f(o.message) : f();
5070
5261
  }
5071
5262
  }, i), a = (n = (s = e.__fc__.refRule) == null ? void 0 : s.__$title) == null ? void 0 : n.value;
5072
5263
  if (!o.message)
@@ -5083,25 +5274,25 @@ const Jt = {
5083
5274
  Jt.load(...t);
5084
5275
  }
5085
5276
  };
5086
- function sn(t) {
5277
+ function on(t) {
5087
5278
  return h.Boolean(t) ? { required: t } : h.String(t) ? { message: t } : h.Undef(t) ? { required: !1 } : h.Function(t) ? { validator: t } : h.Object(t) ? t : {};
5088
5279
  }
5089
- function on(t) {
5090
- t.componentAlias(Ki), Mr.forEach((e) => {
5280
+ function an(t) {
5281
+ t.componentAlias(zi), Mr.forEach((e) => {
5091
5282
  t.component(e.name, e);
5092
5283
  }), t.register(Jt), Wi.forEach((e) => {
5093
5284
  t.parser(e);
5094
- }), Object.keys(fe).forEach((e) => {
5095
- t.maker[e] = fe[e];
5285
+ }), Object.keys(ce).forEach((e) => {
5286
+ t.maker[e] = ce[e];
5096
5287
  });
5097
5288
  }
5098
- function an() {
5289
+ function ln() {
5099
5290
  return Gt({
5100
5291
  ui: "element-ui",
5101
- version: "2.7.5",
5102
- manager: Zi,
5103
- extendApi: nn,
5104
- install: on,
5292
+ version: "2.7.7",
5293
+ manager: Qi,
5294
+ extendApi: sn,
5295
+ install: an,
5105
5296
  attrs: {
5106
5297
  normal: ["col", "wrap"],
5107
5298
  array: ["className"],
@@ -5109,10 +5300,10 @@ function an() {
5109
5300
  }
5110
5301
  });
5111
5302
  }
5112
- const Qe = an();
5113
- typeof window != "undefined" && (window.formCreate = Qe, window.Vue && Qe.install(window.Vue));
5114
- const cn = Qe.maker;
5303
+ const Xe = ln();
5304
+ typeof window != "undefined" && (window.formCreate = Xe, window.Vue && Xe.install(window.Vue));
5305
+ const cn = Xe.maker;
5115
5306
  export {
5116
- Qe as default,
5307
+ Xe as default,
5117
5308
  cn as maker
5118
5309
  };