@harbor-design/proform 1.3.9 → 1.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var Te = Object.defineProperty;
2
2
  var ze = (t, e, r) => e in t ? Te(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
3
  var u = (t, e, r) => (ze(t, typeof e != "symbol" ? e + "" : e, r), r);
4
- import { ref as z, readonly as _e, nextTick as P, isRef as q, watch as _, isReactive as U, toRaw as F, reactive as Pe, createVNode as g, mergeProps as N, withDirectives as Le, vShow as De, createTextVNode as Ge, isVNode as We, defineComponent as Be } from "vue";
4
+ import { ref as z, readonly as _e, nextTick as P, isRef as q, watch as _, isReactive as U, toRaw as E, reactive as Pe, createVNode as y, mergeProps as N, withDirectives as Le, vShow as De, createTextVNode as Ge, isVNode as Be, defineComponent as ke } from "vue";
5
5
  class o {
6
6
  static typeChecker(e) {
7
7
  return {}.toString.call(e);
@@ -72,56 +72,56 @@ class o {
72
72
  function h(t, ...e) {
73
73
  return e.forEach((r) => {
74
74
  if (Array.isArray(r))
75
- Array.isArray(t) || (t = []), r.forEach((s, i) => {
76
- typeof s == "object" && s !== null ? t[i] = h(Array.isArray(s) ? [] : {}, s) : t[i] = s;
75
+ Array.isArray(t) || (t = []), r.forEach((i, s) => {
76
+ typeof i == "object" && i !== null ? t[s] = h(Array.isArray(i) ? [] : {}, i) : t[s] = i;
77
77
  });
78
78
  else
79
- for (const s in r)
80
- r.hasOwnProperty(s) && (typeof r[s] == "object" && r[s] !== null ? t[s] = h(t[s] || {}, r[s]) : t[s] = r[s]);
79
+ for (const i in r)
80
+ r.hasOwnProperty(i) && (typeof r[i] == "object" && r[i] !== null ? t[i] = h(t[i] || {}, r[i]) : t[i] = r[i]);
81
81
  }), t;
82
82
  }
83
83
  function C(t) {
84
84
  const e = /* @__PURE__ */ new WeakMap();
85
- function r(s) {
86
- if (s === null || typeof s != "object")
87
- return s;
88
- if (s instanceof Date)
89
- return new Date(s);
90
- if (s instanceof RegExp)
91
- return new RegExp(s);
92
- if (s instanceof Map) {
85
+ function r(i) {
86
+ if (i === null || typeof i != "object")
87
+ return i;
88
+ if (i instanceof Date)
89
+ return new Date(i);
90
+ if (i instanceof RegExp)
91
+ return new RegExp(i);
92
+ if (i instanceof Map) {
93
93
  const n = /* @__PURE__ */ new Map();
94
- for (const [a, l] of s)
94
+ for (const [a, l] of i)
95
95
  n.set(r(a), r(l));
96
96
  return n;
97
97
  }
98
- if (s instanceof Set) {
98
+ if (i instanceof Set) {
99
99
  const n = /* @__PURE__ */ new Set();
100
- for (const a of s)
100
+ for (const a of i)
101
101
  n.add(r(a));
102
102
  return n;
103
103
  }
104
- if (e.has(s))
105
- return e.get(s);
106
- if (Array.isArray(s)) {
104
+ if (e.has(i))
105
+ return e.get(i);
106
+ if (Array.isArray(i)) {
107
107
  const n = [];
108
- e.set(s, n);
109
- for (let a = 0; a < s.length; a++)
110
- n[a] = r(s[a]);
108
+ e.set(i, n);
109
+ for (let a = 0; a < i.length; a++)
110
+ n[a] = r(i[a]);
111
111
  return n;
112
112
  }
113
- const i = Object.create(Object.getPrototypeOf(s));
114
- e.set(s, i);
115
- for (const n in s)
116
- s.hasOwnProperty(n) && (i[n] = r(s[n]));
117
- return i;
113
+ const s = Object.create(Object.getPrototypeOf(i));
114
+ e.set(i, s);
115
+ for (const n in i)
116
+ i.hasOwnProperty(n) && (s[n] = r(i[n]));
117
+ return s;
118
118
  }
119
119
  return r(t);
120
120
  }
121
121
  function K(t, e) {
122
122
  return t.replace(/undefined/g, e);
123
123
  }
124
- class ke {
124
+ class He {
125
125
  constructor(e) {
126
126
  u(this, "runtimeCore");
127
127
  u(this, "readonlyReactiveModel", z({}));
@@ -137,8 +137,8 @@ class ke {
137
137
  return this.runtimeCore = e, this.readonlyReactiveModel.value = _e(e.model.value), Object.assign(this.runtimeCore.native, this.formCustomization.native), Object.assign(this.runtimeCore.grid, this.formCustomization.grid), Object.assign(this.runtimeCore.runtime, this.formCustomization.runtime), this.formCustomization.ui && (this.runtimeCore.ui = this.formCustomization.ui), this.formCustomization;
138
138
  }
139
139
  submit() {
140
- var s;
141
- const e = (s = f.getPreset(this.runtimeCore.ui)) == null ? void 0 : s.adapter, r = I.adapters[f.getUI(this.runtimeCore.ui)];
140
+ var i;
141
+ const e = (i = f.getPreset(this.runtimeCore.ui)) == null ? void 0 : i.adapter, r = I.adapters[f.getUI(this.runtimeCore.ui)];
142
142
  return (e == null ? void 0 : e.validateForm(this)) ?? (r == null ? void 0 : r.validateForm(this));
143
143
  }
144
144
  hydrate(e) {
@@ -207,8 +207,8 @@ class ke {
207
207
  P(() => {
208
208
  const r = _(
209
209
  () => this.readonlyReactiveModel.value,
210
- (s) => {
211
- e(s, {
210
+ (i) => {
211
+ e(i, {
212
212
  stopSubscribe() {
213
213
  P(() => {
214
214
  r();
@@ -247,43 +247,43 @@ class X {
247
247
  return !r.lazy && e(), r.identifier ? this.identifierMap.get(r.identifier) || (this.effects.add(e), this.identifierMap.set(r.identifier, !0)) : this.effects.add(e), () => this.effects.delete(e);
248
248
  }
249
249
  }
250
- var He = typeof global == "object" && global && global.Object === Object && global, Ke = typeof self == "object" && self && self.Object === Object && self, Z = He || Ke || Function("return this")(), x = Z.Symbol, Me = Object.prototype, Xe = Me.hasOwnProperty, Ye = Me.toString, V = x ? x.toStringTag : void 0;
250
+ var We = typeof global == "object" && global && global.Object === Object && global, Ke = typeof self == "object" && self && self.Object === Object && self, Z = We || Ke || Function("return this")(), x = Z.Symbol, je = Object.prototype, Xe = je.hasOwnProperty, Ye = je.toString, V = x ? x.toStringTag : void 0;
251
251
  function Ze(t) {
252
252
  var e = Xe.call(t, V), r = t[V];
253
253
  try {
254
254
  t[V] = void 0;
255
- var s = !0;
255
+ var i = !0;
256
256
  } catch {
257
257
  }
258
- var i = Ye.call(t);
259
- return s && (e ? t[V] = r : delete t[V]), i;
258
+ var s = Ye.call(t);
259
+ return i && (e ? t[V] = r : delete t[V]), s;
260
260
  }
261
261
  var Je = Object.prototype, Qe = Je.toString;
262
262
  function Ae(t) {
263
263
  return Qe.call(t);
264
264
  }
265
265
  var et = "[object Null]", tt = "[object Undefined]", Ce = x ? x.toStringTag : void 0;
266
- function je(t) {
266
+ function we(t) {
267
267
  return t == null ? t === void 0 ? tt : et : Ce && Ce in Object(t) ? Ze(t) : Ae(t);
268
268
  }
269
269
  function rt(t) {
270
270
  return t != null && typeof t == "object";
271
271
  }
272
- var st = "[object Symbol]";
272
+ var it = "[object Symbol]";
273
273
  function J(t) {
274
- return typeof t == "symbol" || rt(t) && je(t) == st;
274
+ return typeof t == "symbol" || rt(t) && we(t) == it;
275
275
  }
276
- function it(t, e) {
277
- for (var r = -1, s = t == null ? 0 : t.length, i = Array(s); ++r < s; )
278
- i[r] = e(t[r], r, t);
279
- return i;
276
+ function st(t, e) {
277
+ for (var r = -1, i = t == null ? 0 : t.length, s = Array(i); ++r < i; )
278
+ s[r] = e(t[r], r, t);
279
+ return s;
280
280
  }
281
281
  var Q = Array.isArray, nt = 1 / 0, Ie = x ? x.prototype : void 0, Se = Ie ? Ie.toString : void 0;
282
- function we(t) {
282
+ function Me(t) {
283
283
  if (typeof t == "string")
284
284
  return t;
285
285
  if (Q(t))
286
- return it(t, we) + "";
286
+ return st(t, Me) + "";
287
287
  if (J(t))
288
288
  return Se ? Se.call(t) : "";
289
289
  var e = t + "";
@@ -297,11 +297,11 @@ var ot = "[object AsyncFunction]", at = "[object Function]", lt = "[object Gener
297
297
  function ct(t) {
298
298
  if (!G(t))
299
299
  return !1;
300
- var e = je(t);
300
+ var e = we(t);
301
301
  return e == at || e == lt || e == ot || e == ut;
302
302
  }
303
- var k = Z["__core-js_shared__"], Oe = function() {
304
- var t = /[^.]+$/.exec(k && k.keys && k.keys.IE_PROTO || "");
303
+ var H = Z["__core-js_shared__"], Oe = function() {
304
+ var t = /[^.]+$/.exec(H && H.keys && H.keys.IE_PROTO || "");
305
305
  return t ? "Symbol(src)_1." + t : "";
306
306
  }();
307
307
  function ft(t) {
@@ -321,13 +321,13 @@ function ht(t) {
321
321
  }
322
322
  return "";
323
323
  }
324
- var mt = /[\\^$.*+?()[\]{}|]/g, gt = /^\[object .+?Constructor\]$/, yt = Function.prototype, bt = Object.prototype, vt = yt.toString, _t = bt.hasOwnProperty, Pt = RegExp(
324
+ var mt = /[\\^$.*+?()[\]{}|]/g, yt = /^\[object .+?Constructor\]$/, gt = Function.prototype, bt = Object.prototype, vt = gt.toString, _t = bt.hasOwnProperty, Pt = RegExp(
325
325
  "^" + vt.call(_t).replace(mt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
326
326
  );
327
327
  function Ct(t) {
328
328
  if (!G(t) || ft(t))
329
329
  return !1;
330
- var e = ct(t) ? Pt : gt;
330
+ var e = ct(t) ? Pt : yt;
331
331
  return e.test(ht(t));
332
332
  }
333
333
  function It(t, e) {
@@ -337,32 +337,32 @@ function A(t, e) {
337
337
  var r = It(t, e);
338
338
  return Ct(r) ? r : void 0;
339
339
  }
340
- var Ee = function() {
340
+ var Fe = function() {
341
341
  try {
342
342
  var t = A(Object, "defineProperty");
343
343
  return t({}, "", {}), t;
344
344
  } catch {
345
345
  }
346
346
  }(), St = 9007199254740991, Ot = /^(?:0|[1-9]\d*)$/;
347
- function Et(t, e) {
347
+ function Ft(t, e) {
348
348
  var r = typeof t;
349
349
  return e = e ?? St, !!e && (r == "number" || r != "symbol" && Ot.test(t)) && t > -1 && t % 1 == 0 && t < e;
350
350
  }
351
- function Mt(t, e, r) {
352
- e == "__proto__" && Ee ? Ee(t, e, {
351
+ function jt(t, e, r) {
352
+ e == "__proto__" && Fe ? Fe(t, e, {
353
353
  configurable: !0,
354
354
  enumerable: !0,
355
355
  value: r,
356
356
  writable: !0
357
357
  }) : t[e] = r;
358
358
  }
359
- function Fe(t, e) {
359
+ function Ee(t, e) {
360
360
  return t === e || t !== t && e !== e;
361
361
  }
362
- var jt = Object.prototype, wt = jt.hasOwnProperty;
363
- function Ft(t, e, r) {
364
- var s = t[e];
365
- (!(wt.call(t, e) && Fe(s, r)) || r === void 0 && !(e in t)) && Mt(t, e, r);
362
+ var wt = Object.prototype, Mt = wt.hasOwnProperty;
363
+ function Et(t, e, r) {
364
+ var i = t[e];
365
+ (!(Mt.call(t, e) && Ee(i, r)) || r === void 0 && !(e in t)) && jt(t, e, r);
366
366
  }
367
367
  var xt = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Rt = /^\w*$/;
368
368
  function $t(t, e) {
@@ -393,59 +393,59 @@ function Gt(t) {
393
393
  var e = this.__data__;
394
394
  return T ? e[t] !== void 0 : Dt.call(e, t);
395
395
  }
396
- var Wt = "__lodash_hash_undefined__";
397
- function Bt(t, e) {
396
+ var Bt = "__lodash_hash_undefined__";
397
+ function kt(t, e) {
398
398
  var r = this.__data__;
399
- return this.size += this.has(t) ? 0 : 1, r[t] = T && e === void 0 ? Wt : e, this;
399
+ return this.size += this.has(t) ? 0 : 1, r[t] = T && e === void 0 ? Bt : e, this;
400
400
  }
401
- function E(t) {
401
+ function F(t) {
402
402
  var e = -1, r = t == null ? 0 : t.length;
403
403
  for (this.clear(); ++e < r; ) {
404
- var s = t[e];
405
- this.set(s[0], s[1]);
404
+ var i = t[e];
405
+ this.set(i[0], i[1]);
406
406
  }
407
407
  }
408
- E.prototype.clear = Vt;
409
- E.prototype.delete = Nt;
410
- E.prototype.get = zt;
411
- E.prototype.has = Gt;
412
- E.prototype.set = Bt;
413
- function kt() {
408
+ F.prototype.clear = Vt;
409
+ F.prototype.delete = Nt;
410
+ F.prototype.get = zt;
411
+ F.prototype.has = Gt;
412
+ F.prototype.set = kt;
413
+ function Ht() {
414
414
  this.__data__ = [], this.size = 0;
415
415
  }
416
- function W(t, e) {
416
+ function B(t, e) {
417
417
  for (var r = t.length; r--; )
418
- if (Fe(t[r][0], e))
418
+ if (Ee(t[r][0], e))
419
419
  return r;
420
420
  return -1;
421
421
  }
422
- var Ht = Array.prototype, Kt = Ht.splice;
422
+ var Wt = Array.prototype, Kt = Wt.splice;
423
423
  function Xt(t) {
424
- var e = this.__data__, r = W(e, t);
424
+ var e = this.__data__, r = B(e, t);
425
425
  if (r < 0)
426
426
  return !1;
427
- var s = e.length - 1;
428
- return r == s ? e.pop() : Kt.call(e, r, 1), --this.size, !0;
427
+ var i = e.length - 1;
428
+ return r == i ? e.pop() : Kt.call(e, r, 1), --this.size, !0;
429
429
  }
430
430
  function Yt(t) {
431
- var e = this.__data__, r = W(e, t);
431
+ var e = this.__data__, r = B(e, t);
432
432
  return r < 0 ? void 0 : e[r][1];
433
433
  }
434
434
  function Zt(t) {
435
- return W(this.__data__, t) > -1;
435
+ return B(this.__data__, t) > -1;
436
436
  }
437
437
  function Jt(t, e) {
438
- var r = this.__data__, s = W(r, t);
439
- return s < 0 ? (++this.size, r.push([t, e])) : r[s][1] = e, this;
438
+ var r = this.__data__, i = B(r, t);
439
+ return i < 0 ? (++this.size, r.push([t, e])) : r[i][1] = e, this;
440
440
  }
441
441
  function R(t) {
442
442
  var e = -1, r = t == null ? 0 : t.length;
443
443
  for (this.clear(); ++e < r; ) {
444
- var s = t[e];
445
- this.set(s[0], s[1]);
444
+ var i = t[e];
445
+ this.set(i[0], i[1]);
446
446
  }
447
447
  }
448
- R.prototype.clear = kt;
448
+ R.prototype.clear = Ht;
449
449
  R.prototype.delete = Xt;
450
450
  R.prototype.get = Yt;
451
451
  R.prototype.has = Zt;
@@ -453,74 +453,74 @@ R.prototype.set = Jt;
453
453
  var Qt = A(Z, "Map");
454
454
  function At() {
455
455
  this.size = 0, this.__data__ = {
456
- hash: new E(),
456
+ hash: new F(),
457
457
  map: new (Qt || R)(),
458
- string: new E()
458
+ string: new F()
459
459
  };
460
460
  }
461
461
  function er(t) {
462
462
  var e = typeof t;
463
463
  return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
464
464
  }
465
- function B(t, e) {
465
+ function k(t, e) {
466
466
  var r = t.__data__;
467
467
  return er(e) ? r[typeof e == "string" ? "string" : "hash"] : r.map;
468
468
  }
469
469
  function tr(t) {
470
- var e = B(this, t).delete(t);
470
+ var e = k(this, t).delete(t);
471
471
  return this.size -= e ? 1 : 0, e;
472
472
  }
473
473
  function rr(t) {
474
- return B(this, t).get(t);
474
+ return k(this, t).get(t);
475
475
  }
476
- function sr(t) {
477
- return B(this, t).has(t);
476
+ function ir(t) {
477
+ return k(this, t).has(t);
478
478
  }
479
- function ir(t, e) {
480
- var r = B(this, t), s = r.size;
481
- return r.set(t, e), this.size += r.size == s ? 0 : 1, this;
479
+ function sr(t, e) {
480
+ var r = k(this, t), i = r.size;
481
+ return r.set(t, e), this.size += r.size == i ? 0 : 1, this;
482
482
  }
483
- function M(t) {
483
+ function j(t) {
484
484
  var e = -1, r = t == null ? 0 : t.length;
485
485
  for (this.clear(); ++e < r; ) {
486
- var s = t[e];
487
- this.set(s[0], s[1]);
486
+ var i = t[e];
487
+ this.set(i[0], i[1]);
488
488
  }
489
489
  }
490
- M.prototype.clear = At;
491
- M.prototype.delete = tr;
492
- M.prototype.get = rr;
493
- M.prototype.has = sr;
494
- M.prototype.set = ir;
490
+ j.prototype.clear = At;
491
+ j.prototype.delete = tr;
492
+ j.prototype.get = rr;
493
+ j.prototype.has = ir;
494
+ j.prototype.set = sr;
495
495
  var nr = "Expected a function";
496
496
  function ee(t, e) {
497
497
  if (typeof t != "function" || e != null && typeof e != "function")
498
498
  throw new TypeError(nr);
499
499
  var r = function() {
500
- var s = arguments, i = e ? e.apply(this, s) : s[0], n = r.cache;
501
- if (n.has(i))
502
- return n.get(i);
503
- var a = t.apply(this, s);
504
- return r.cache = n.set(i, a) || n, a;
500
+ var i = arguments, s = e ? e.apply(this, i) : i[0], n = r.cache;
501
+ if (n.has(s))
502
+ return n.get(s);
503
+ var a = t.apply(this, i);
504
+ return r.cache = n.set(s, a) || n, a;
505
505
  };
506
- return r.cache = new (ee.Cache || M)(), r;
506
+ return r.cache = new (ee.Cache || j)(), r;
507
507
  }
508
- ee.Cache = M;
508
+ ee.Cache = j;
509
509
  var or = 500;
510
510
  function ar(t) {
511
- var e = ee(t, function(s) {
512
- return r.size === or && r.clear(), s;
511
+ var e = ee(t, function(i) {
512
+ return r.size === or && r.clear(), i;
513
513
  }), r = e.cache;
514
514
  return e;
515
515
  }
516
516
  var lr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ur = /\\(\\)?/g, cr = ar(function(t) {
517
517
  var e = [];
518
- return t.charCodeAt(0) === 46 && e.push(""), t.replace(lr, function(r, s, i, n) {
519
- e.push(i ? n.replace(ur, "$1") : s || r);
518
+ return t.charCodeAt(0) === 46 && e.push(""), t.replace(lr, function(r, i, s, n) {
519
+ e.push(s ? n.replace(ur, "$1") : i || r);
520
520
  }), e;
521
521
  });
522
522
  function fr(t) {
523
- return t == null ? "" : we(t);
523
+ return t == null ? "" : Me(t);
524
524
  }
525
525
  function xe(t, e) {
526
526
  return Q(t) ? t : $t(t, e) ? [t] : cr(fr(t));
@@ -534,27 +534,27 @@ function Re(t) {
534
534
  }
535
535
  function pr(t, e) {
536
536
  e = xe(e, t);
537
- for (var r = 0, s = e.length; t != null && r < s; )
537
+ for (var r = 0, i = e.length; t != null && r < i; )
538
538
  t = t[Re(e[r++])];
539
- return r && r == s ? t : void 0;
539
+ return r && r == i ? t : void 0;
540
540
  }
541
541
  function L(t, e, r) {
542
- var s = t == null ? void 0 : pr(t, e);
543
- return s === void 0 ? r : s;
542
+ var i = t == null ? void 0 : pr(t, e);
543
+ return i === void 0 ? r : i;
544
544
  }
545
- function hr(t, e, r, s) {
545
+ function hr(t, e, r, i) {
546
546
  if (!G(t))
547
547
  return t;
548
548
  e = xe(e, t);
549
- for (var i = -1, n = e.length, a = n - 1, l = t; l != null && ++i < n; ) {
550
- var c = Re(e[i]), d = r;
549
+ for (var s = -1, n = e.length, a = n - 1, l = t; l != null && ++s < n; ) {
550
+ var c = Re(e[s]), d = r;
551
551
  if (c === "__proto__" || c === "constructor" || c === "prototype")
552
552
  return t;
553
- if (i != a) {
553
+ if (s != a) {
554
554
  var p = l[c];
555
- d = s ? s(p, c, l) : void 0, d === void 0 && (d = G(p) ? p : Et(e[i + 1]) ? [] : {});
555
+ d = i ? i(p, c, l) : void 0, d === void 0 && (d = G(p) ? p : Ft(e[s + 1]) ? [] : {});
556
556
  }
557
- Ft(l, c, d), l = l[c];
557
+ Et(l, c, d), l = l[c];
558
558
  }
559
559
  return t;
560
560
  }
@@ -578,7 +578,6 @@ class mr {
578
578
  u(this, "defaultValueInprogressMap", /* @__PURE__ */ new Map());
579
579
  u(this, "baseDefaultValueFunctionsLength");
580
580
  u(this, "isModelInitialized", !0);
581
- u(this, "reactiveWatchMap", /* @__PURE__ */ new Map());
582
581
  this.runtimeCore = e, this.processedSchemas = e.schemas, this.processedModel = e.model, this.getRuntimeMeta = e.getRuntimeMeta.bind(e), _(
583
582
  () => this.processedModel.value,
584
583
  () => {
@@ -591,28 +590,28 @@ class mr {
591
590
  }
592
591
  // 核心处理过程,接收一个初始的代理数据结构,由其衍生的有 parseSchema
593
592
  parse(e, r) {
594
- e.forEach((s, i) => {
595
- this.parseItem(s, i, r);
593
+ e.forEach((i, s) => {
594
+ this.parseItem(i, s, r);
596
595
  });
597
596
  }
598
597
  // 初始化空数据结构,避免后续复杂的 if else
599
598
  initSchemas(e) {
600
599
  return e.map((r) => {
601
- const s = {};
602
- return r.children && (s.children = this.initSchemas(r.children)), s;
600
+ const i = {};
601
+ return r.children && (i.children = this.initSchemas(r.children)), i;
603
602
  });
604
603
  }
605
604
  countFunctionDefaultValues(e) {
606
605
  let r = 0;
607
- const s = /* @__PURE__ */ new Set();
608
- function i(n) {
609
- if (!s.has(n) && (Array.isArray(n) || n !== null && typeof n == "object")) {
610
- s.add(n);
606
+ const i = /* @__PURE__ */ new Set();
607
+ function s(n) {
608
+ if (!i.has(n) && (Array.isArray(n) || n !== null && typeof n == "object")) {
609
+ i.add(n);
611
610
  for (const a in n)
612
- n.hasOwnProperty(a) && (a === "defaultValue" && typeof n[a] == "function" && !n[a].toString().includes("[native code]") && r++, i(n[a]));
611
+ n.hasOwnProperty(a) && (a === "defaultValue" && typeof n[a] == "function" && !n[a].toString().includes("[native code]") && r++, s(n[a]));
613
612
  }
614
613
  }
615
- return i(e), r;
614
+ return s(e), r;
616
615
  }
617
616
  // 派生过程,用于外部应用
618
617
  parseSchemas(e, r) {
@@ -631,81 +630,81 @@ class mr {
631
630
  // 对于稳定初始化更新的抽象
632
631
  stableUpdater(e = []) {
633
632
  if (e.every(Boolean)) {
634
- const r = F(this.processedSchemas.value);
633
+ const r = E(this.processedSchemas.value);
635
634
  !o.isProcessInprogress(r) && o.isObjectEmpty(this.stableModel) && (this.stableUpdaterProcessProgress || (this.stableUpdaterProcessProgress = Array.from({
636
635
  length: r.length
637
636
  }).fill(!1)), this.stableUpdaterProcessProgress[this.stableUpdaterTimes] = !0, this.stableUpdaterTimes++, this.modelProcessor(r));
638
637
  }
639
638
  }
640
639
  // 核心单 schema 处理过程,接收一个对象键值对的数据结构
641
- parseItem(e, r, s) {
642
- const i = this, n = Array.from({
640
+ parseItem(e, r, i) {
641
+ const s = this, n = Array.from({
643
642
  length: Object.keys(e).filter((l) => l !== "children").length
644
643
  }).fill(!1);
645
- this.objectParser({ data: e, index: r, updater: a, parentMeta: s });
644
+ this.objectParser({ data: e, index: r, updater: a, parentMeta: i });
646
645
  function a(l) {
647
646
  const c = l.index, d = l.key, p = l.keyIndex;
648
647
  if (o.isUndefined(l.stable))
649
648
  return;
650
- const m = i.parseStable(l.stable), b = s == null ? void 0 : s.index, S = s == null ? void 0 : s.key;
649
+ const m = s.parseStable(l.stable), b = i == null ? void 0 : i.index, S = i == null ? void 0 : i.key;
651
650
  let v = m;
652
- if (o.isProcessInprogress(v) || (n[p] = !0), s) {
653
- const y = i.processedSchemas.value[b][S][c][d];
654
- y && o.isObject(y) && d !== "component" && (v = h(y, v)), i.processedSchemas.value[b][S][c][d] = v, i.stableUpdater(n);
651
+ if (o.isProcessInprogress(v) || (n[p] = !0), i) {
652
+ const g = s.processedSchemas.value[b][S][c][d];
653
+ g && o.isObject(g) && d !== "component" && (v = h(g, v)), s.processedSchemas.value[b][S][c][d] = v, s.stableUpdater(n);
655
654
  } else {
656
- const y = i.processedSchemas.value[c][d];
657
- y && o.isObject(y) && d !== "component" && (v = h(y, v)), i.processedSchemas.value[c][d] = v, i.stableUpdater(n);
655
+ const g = s.processedSchemas.value[c][d];
656
+ g && o.isObject(g) && d !== "component" && (v = h(g, v)), s.processedSchemas.value[c][d] = v, s.stableUpdater(n);
658
657
  }
659
658
  }
660
659
  }
661
660
  // 只做基本的对象 parser
662
661
  objectParser(e) {
663
662
  const r = e.data;
664
- Object.keys(r).forEach((i, n) => {
663
+ Object.keys(r).forEach((s, n) => {
665
664
  var a, l;
666
- if (i === "children")
667
- this.parseSchemas(r[i], {
665
+ if (s === "children")
666
+ this.parseSchemas(r[s], {
668
667
  ...e,
669
- key: i,
668
+ key: s,
670
669
  keyIndex: n
671
670
  });
672
671
  else {
673
672
  const c = (d) => {
674
673
  e.updater({
675
674
  ...e,
676
- key: i,
675
+ key: s,
677
676
  keyIndex: n,
678
677
  stable: d
679
678
  });
680
679
  };
681
- o.isFunction(r[i]) ? i !== "defaultValue" ? this.schemaEffect.trackEffect(
680
+ o.isFunction(r[s]) ? s !== "defaultValue" ? this.schemaEffect.trackEffect(
682
681
  () => {
683
- if (i === "component") {
684
- const d = r[i](this.getRuntimeMeta());
682
+ if (s === "component") {
683
+ const d = r[s](this.getRuntimeMeta());
685
684
  this.promiseFieldParser(d, c, !1, {
686
685
  rootIndex: e.index,
687
686
  parentMeta: e.parentMeta
688
687
  });
689
688
  } else
690
- this.fieldParser(r[i], c, {
689
+ this.fieldParser(r[s], c, {
691
690
  rootIndex: e.index,
692
691
  parentMeta: e.parentMeta
693
692
  });
694
693
  },
695
694
  {
696
695
  lazy: !1,
697
- identifier: `${(a = e.parentMeta) == null ? void 0 : a.key}${(l = e.parentMeta) == null ? void 0 : l.index}${e.index}${i}${n}`
696
+ identifier: `${(a = e.parentMeta) == null ? void 0 : a.key}${(l = e.parentMeta) == null ? void 0 : l.index}${e.index}${s}${n}`
698
697
  }
699
698
  ) : this.defaultValueEffect.trackEffect(
700
699
  () => {
701
700
  const d = this.schemaEffect.trackEffect(
702
701
  () => {
703
- /\{\s*model\s*\}/.test(r[i].toString()) ? this.fieldParser(
704
- r[i],
702
+ /\{\s*model\s*\}/.test(r[s].toString()) ? this.fieldParser(
703
+ r[s],
705
704
  (p) => {
706
705
  if (!p)
707
706
  return c(p);
708
- this.defaultValueInprogressMap.set(r[i], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
707
+ this.defaultValueInprogressMap.set(r[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
709
708
  this.defaultValueInprogressMap.values()
710
709
  ).every((m) => {
711
710
  var b;
@@ -719,9 +718,9 @@ class mr {
719
718
  parentMeta: e.parentMeta
720
719
  }
721
720
  ) : this.fieldParser(
722
- r[i],
721
+ r[s],
723
722
  (p) => {
724
- this.defaultValueInprogressMap.set(r[i], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
723
+ this.defaultValueInprogressMap.set(r[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
725
724
  this.defaultValueInprogressMap.values()
726
725
  ).every((m) => {
727
726
  var b;
@@ -744,33 +743,33 @@ class mr {
744
743
  {
745
744
  lazy: !1
746
745
  }
747
- ) : i === "component" || i === "slots" || i === "runtime" ? this.promiseFieldParser(r[i], c, !1, {
746
+ ) : s === "component" || s === "slots" || s === "runtime" ? this.promiseFieldParser(r[s], c, !1, {
748
747
  rootIndex: e.index,
749
748
  parentMeta: e.parentMeta
750
- }) : this.fieldParser(r[i], c, {
749
+ }) : this.fieldParser(r[s], c, {
751
750
  rootIndex: e.index,
752
751
  parentMeta: e.parentMeta
753
752
  });
754
753
  }
755
754
  });
756
755
  }
757
- promiseFieldParser(e, r, s, i) {
756
+ promiseFieldParser(e, r, i, s) {
758
757
  o.isPromise(e) ? e.then((n) => {
759
- o.isString(n) && (n = K(n, "")), s && o.isObject(n) && !o.isNativeObject(n) ? this.objectParser({
758
+ o.isString(n) && (n = K(n, "")), i && o.isObject(n) && !o.isNativeObject(n) ? this.objectParser({
760
759
  data: n,
761
760
  updater: r,
762
- index: i.rootIndex,
763
- parentMeta: i.parentMeta
761
+ index: s.rootIndex,
762
+ parentMeta: s.parentMeta
764
763
  }) : r(n);
765
- }) : (o.isString(e) && (e = K(e, "")), s && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
764
+ }) : (o.isString(e) && (e = K(e, "")), i && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
766
765
  data: e,
767
766
  updater: r,
768
- index: i.rootIndex,
769
- parentMeta: i.parentMeta
767
+ index: s.rootIndex,
768
+ parentMeta: s.parentMeta
770
769
  }) : r(e));
771
770
  }
772
771
  // 对任意对象中单个字段的 parse: 做基本处理
773
- fieldParser(e, r, s, i = !0) {
772
+ fieldParser(e, r, i, s = !0) {
774
773
  if (o.isFunction(e))
775
774
  if (e.name.startsWith("__proform_raw_"))
776
775
  r(
@@ -783,20 +782,20 @@ class mr {
783
782
  r(e);
784
783
  else if (e.__proform_cached_result) {
785
784
  const n = e.__proform_cached_result;
786
- this.promiseFieldParser(n, r, i, s);
785
+ this.promiseFieldParser(n, r, s, i);
787
786
  } else {
788
787
  const n = e(this.getRuntimeMeta());
789
- e.name.startsWith("__proform_onetime_") && (e.__proform_cached_result = n), this.promiseFieldParser(n, r, i, s);
788
+ e.name.startsWith("__proform_onetime_") && (e.__proform_cached_result = n), this.promiseFieldParser(n, r, s, i);
790
789
  }
791
790
  else
792
791
  q(e) ? _(
793
792
  () => e.value,
794
793
  () => {
795
- o.isUndefined(e.value) || (i && o.isObject(e.value) && !o.isNativeObject(e.value) ? this.objectParser({
794
+ o.isUndefined(e.value) || (s && o.isObject(e.value) && !o.isNativeObject(e.value) ? this.objectParser({
796
795
  data: e.value,
797
796
  updater: r,
798
- index: s.rootIndex,
799
- parentMeta: s.parentMeta
797
+ index: i.rootIndex,
798
+ parentMeta: i.parentMeta
800
799
  }) : r(e.value));
801
800
  },
802
801
  {
@@ -806,22 +805,22 @@ class mr {
806
805
  ) : U(e) ? _(
807
806
  () => e,
808
807
  () => {
809
- this.reactiveWatchMap.get(e) || (this.reactiveWatchMap.set(e, !0), !o.isArrayEmpty(e) && !o.isObjectEmpty(e) && (o.isUndefined(e) || (i && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
808
+ o.isUndefined(e) || (s && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
810
809
  data: e,
811
810
  updater: r,
812
- index: s.rootIndex,
813
- parentMeta: s.parentMeta
814
- }) : r(e))));
811
+ index: i.rootIndex,
812
+ parentMeta: i.parentMeta
813
+ }) : r(e));
815
814
  },
816
815
  {
817
816
  immediate: !0,
818
817
  deep: !0
819
818
  }
820
- ) : i && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
819
+ ) : s && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
821
820
  data: e,
822
821
  updater: r,
823
- index: s.rootIndex,
824
- parentMeta: s.parentMeta
822
+ index: i.rootIndex,
823
+ parentMeta: i.parentMeta
825
824
  }) : r(e);
826
825
  }
827
826
  modelProcessor(e) {
@@ -829,14 +828,14 @@ class mr {
829
828
  (r) => this.createModel(r, this.processedModel.value)
830
829
  ), o.isObjectEmpty(this.stableModel) && this.stableUpdaterProcessProgress.every(Boolean) && this.defaultValueEffect.effects.size === 0 && (this.stableModel = C(this.processedModel.value), this.runtimeCore.hydrateEffect.triggerEffects(), this.runtimeCore.hydrateEffect.clearEffects());
831
830
  }
832
- setModel(e, r, s) {
833
- o.isFunction(r) ? D(e, r(), s) : e[r] = s;
831
+ setModel(e, r, i) {
832
+ o.isFunction(r) ? D(e, r(), i) : e[r] = i;
834
833
  }
835
834
  createModel(e, r) {
836
- if (o.isListSchema(e) && (r[e.field] || this.setModel(r, e.field, [{}]), e.children.forEach((s) => {
837
- this.createModel(s, r[e.field][0]);
838
- })), o.isGroupSchema(e) && e.children.forEach((s) => {
839
- this.createModel(s, r);
835
+ if (o.isListSchema(e) && (r[e.field] || this.setModel(r, e.field, [{}]), e.children.forEach((i) => {
836
+ this.createModel(i, r[e.field][0]);
837
+ })), o.isGroupSchema(e) && e.children.forEach((i) => {
838
+ this.createModel(i, r);
840
839
  }), o.isItemSchema(e))
841
840
  if ("defaultValue" in e)
842
841
  this.setModel(r, e.field, e.defaultValue);
@@ -849,7 +848,7 @@ class mr {
849
848
  }
850
849
  }
851
850
  }
852
- class j {
851
+ class w {
853
852
  static getFormContainer({ ui: e } = {}) {
854
853
  return f.presets.uiPresets[e ?? f.presets.ui].container.Form;
855
854
  }
@@ -869,7 +868,7 @@ class j {
869
868
  return f.presets.uiPresets[e ?? f.presets.ui].container.ListItem;
870
869
  }
871
870
  }
872
- class gr {
871
+ class yr {
873
872
  constructor(e) {
874
873
  this.ui = e;
875
874
  }
@@ -878,33 +877,33 @@ class gr {
878
877
  return (r = f.presets.uiPresets[this.ui]) == null ? void 0 : r.native;
879
878
  }
880
879
  getRuntimeField(e) {
881
- var i;
882
- const r = (i = f.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, s = I.adapters[f.getUI(this.ui)];
883
- return (r == null ? void 0 : r.getRuntimeField(e)) ?? (s == null ? void 0 : s.getRuntimeField(e));
880
+ var s;
881
+ const r = (s = f.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[f.getUI(this.ui)];
882
+ return (r == null ? void 0 : r.getRuntimeField(e)) ?? (i == null ? void 0 : i.getRuntimeField(e));
884
883
  }
885
884
  getRuntimeRequired(e) {
886
- var i;
887
- const r = (i = f.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, s = I.adapters[f.getUI(this.ui)];
888
- return (r == null ? void 0 : r.getRuntimeRequired(e)) ?? (s == null ? void 0 : s.getRuntimeRequired(e));
885
+ var s;
886
+ const r = (s = f.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[f.getUI(this.ui)];
887
+ return (r == null ? void 0 : r.getRuntimeRequired(e)) ?? (i == null ? void 0 : i.getRuntimeRequired(e));
889
888
  }
890
889
  getFormModelPropName() {
891
- var s;
892
- const e = (s = f.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, r = I.adapters[f.getUI(this.ui)];
890
+ var i;
891
+ const e = (i = f.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, r = I.adapters[f.getUI(this.ui)];
893
892
  return (e == null ? void 0 : e.getFormModelPropName()) ?? (r == null ? void 0 : r.getFormModelPropName());
894
893
  }
895
894
  formComponentRenderer(e) {
896
- var i;
897
- const r = (i = f.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, s = I.adapters[f.getUI(this.ui)];
898
- return (r == null ? void 0 : r.formComponentRenderer(e)) ?? (s == null ? void 0 : s.formComponentRenderer(e));
895
+ var s;
896
+ const r = (s = f.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[f.getUI(this.ui)];
897
+ return (r == null ? void 0 : r.formComponentRenderer(e)) ?? (i == null ? void 0 : i.formComponentRenderer(e));
899
898
  }
900
899
  clearValidate(e) {
901
- var i;
902
- const r = (i = f.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, s = I.adapters[f.getUI(this.ui)];
903
- return (r == null ? void 0 : r.clearValidate(e)) ?? (s == null ? void 0 : s.clearValidate(e));
900
+ var s;
901
+ const r = (s = f.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[f.getUI(this.ui)];
902
+ return (r == null ? void 0 : r.clearValidate(e)) ?? (i == null ? void 0 : i.clearValidate(e));
904
903
  }
905
904
  }
906
- function yr(t) {
907
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !We(t);
905
+ function gr(t) {
906
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !Be(t);
908
907
  }
909
908
  class br {
910
909
  constructor(e) {
@@ -933,96 +932,101 @@ class br {
933
932
  u(this, "shared", {});
934
933
  this.setup = e, this.processor = new mr(this);
935
934
  const r = this.setup(this);
936
- this.ui = r.ui ?? f.presets.ui, this.runtimeAdapter = new gr(this.ui), Object.assign(this.globalNativeFormOverride, this.runtimeAdapter.getRuntimeNative()), q(r.schemas) ? _(
937
- // @ts-expect-error
938
- () => r.schemas.value,
939
- () => {
940
- this.processor.schemaEffect.clearEffects(), this.processor.processedSchemas.value = [], this.processor.processedModel.value = {}, this.processor.stableModel = {}, this.processor.parseSchemas(r.schemas.value);
941
- },
942
- {
943
- deep: !0,
944
- immediate: !0
945
- }
946
- ) : U(r.schemas) ? _(() => r.schemas, () => {
947
- this.processor.schemaEffect.clearEffects(), this.processor.processedSchemas.value = [], this.processor.processedModel.value = {}, this.processor.stableModel = {}, this.processor.parseSchemas(r.schemas);
948
- }, {
949
- deep: !0,
950
- immediate: !0
951
- }) : this.processor.parseSchemas(r.schemas);
935
+ if (this.ui = r.ui ?? f.presets.ui, this.runtimeAdapter = new yr(this.ui), Object.assign(this.globalNativeFormOverride, this.runtimeAdapter.getRuntimeNative()), q(r.schemas))
936
+ _(
937
+ // @ts-expect-error
938
+ () => r.schemas.value,
939
+ () => {
940
+ this.processor.parseSchemas(r.schemas.value);
941
+ },
942
+ {
943
+ deep: !0
944
+ }
945
+ );
946
+ else if (U(r.schemas)) {
947
+ const i = _(() => r.schemas, () => {
948
+ this.processor.parseSchemas(r.schemas), P(() => {
949
+ i();
950
+ });
951
+ }, {
952
+ deep: !0
953
+ });
954
+ } else
955
+ this.processor.parseSchemas(r.schemas);
952
956
  }
953
957
  getRuntimeMeta() {
954
958
  return {
955
- model: F(C(this.model.value)),
959
+ model: E(C(this.model.value)),
956
960
  reactiveModel: this.model.value,
957
961
  shared: this.shared,
958
962
  // share 增加防抖,当开发者在过程中进行 share 时避免频繁触发爆栈
959
963
  share: (r) => {
960
964
  if (q(r)) {
961
- const s = _(() => r.value, () => {
962
- h(this.shared, r.value), this.processor.schemaEffect.triggerEffects(), P(() => {
963
- s();
965
+ const i = _(() => r.value, () => {
966
+ h(this.shared, r.value), P(() => {
967
+ i();
964
968
  });
965
969
  }, {
966
970
  deep: !0,
967
971
  immediate: !0
968
972
  });
969
973
  } else if (U(r)) {
970
- const s = _(() => r, () => {
971
- h(this.shared, r), this.processor.schemaEffect.triggerEffects(), P(() => {
972
- s();
974
+ const i = _(() => r, () => {
975
+ h(this.shared, r), P(() => {
976
+ i();
973
977
  });
974
978
  }, {
975
979
  deep: !0,
976
980
  immediate: !0
977
981
  });
978
982
  } else
979
- h(this.shared, r), this.processor.schemaEffect.triggerEffects();
983
+ h(this.shared, r);
980
984
  }
981
985
  };
982
986
  }
983
- runtimeItemProcessor(e, r, s = this.model.value, i) {
984
- var re, se, ie, ne, oe, ae, le, ue, ce, fe, de, pe, he, me, ge, ye, be;
985
- const n = F(e.component);
987
+ runtimeItemProcessor(e, r, i = this.model.value, s) {
988
+ var re, ie, se, ne, oe, ae, le, ue, ce, fe, de, pe, he, me, ye, ge, be;
989
+ const n = E(e.component);
986
990
  if (!n)
987
991
  return;
988
- (se = (re = e.native) == null ? void 0 : re.props) != null && se.Form && h(this.globalNativeFormOverride.props.Form, (ne = (ie = e.native) == null ? void 0 : ie.props) == null ? void 0 : ne.Form), (ae = (oe = e.native) == null ? void 0 : oe.slots) != null && ae.Form && h(this.globalNativeFormOverride.slots.Form, (ue = (le = e.native) == null ? void 0 : le.slots) == null ? void 0 : ue.Form);
992
+ (ie = (re = e.native) == null ? void 0 : re.props) != null && ie.Form && h(this.globalNativeFormOverride.props.Form, (ne = (se = e.native) == null ? void 0 : se.props) == null ? void 0 : ne.Form), (ae = (oe = e.native) == null ? void 0 : oe.slots) != null && ae.Form && h(this.globalNativeFormOverride.slots.Form, (ue = (le = e.native) == null ? void 0 : le.slots) == null ? void 0 : ue.Form);
989
993
  const a = h(C((fe = (ce = this.native) == null ? void 0 : ce.slots) == null ? void 0 : fe.FormItem) ?? {}, (pe = (de = e.native) == null ? void 0 : de.slots) == null ? void 0 : pe.FormItem), l = {
990
994
  display: "grid",
991
995
  gridColumn: "1 / -1",
992
996
  ...e.grid
993
- }, c = h(C((me = (he = this.native) == null ? void 0 : he.props) == null ? void 0 : me.FormItem) ?? {}, (ye = (ge = e.native) == null ? void 0 : ge.props) == null ? void 0 : ye.FormItem), d = this.runtimeAdapter.getRuntimeField({
997
+ }, c = h(C((me = (he = this.native) == null ? void 0 : he.props) == null ? void 0 : me.FormItem) ?? {}, (ge = (ye = e.native) == null ? void 0 : ye.props) == null ? void 0 : ge.FormItem), d = this.runtimeAdapter.getRuntimeField({
994
998
  schema: e,
995
- parentSchema: i,
999
+ parentSchema: s,
996
1000
  index: r
997
1001
  }), p = n.name, m = e.componentProps ?? {}, b = I.placeholderPresetByComponentName;
998
1002
  let S = e.placeholder, v = e.show;
999
1003
  v === void 0 && (v = !0);
1000
- let y = e.label ?? "", O;
1001
- if (e.runtime ? O = e.runtime : O = (i == null ? void 0 : i.runtime) ?? this.runtime, !o.isUndefined(r) && !o.isObjectEmpty(O) && (y = K((be = O == null ? void 0 : O.customizeListItemLabel) == null ? void 0 : be.call(O, e.label ?? "", r + 1), "")), !S) {
1004
+ let g = e.label ?? "", O;
1005
+ if (e.runtime ? O = e.runtime : O = (s == null ? void 0 : s.runtime) ?? this.runtime, !o.isUndefined(r) && !o.isObjectEmpty(O) && (g = K((be = O == null ? void 0 : O.customizeListItemLabel) == null ? void 0 : be.call(O, e.label ?? "", r + 1), "")), !S) {
1002
1006
  let $ = "请输入";
1003
- o.isUndefined(p) ? S = `${$}${y}` : /* @ts-expect-error */ b[p.toLowerCase()] ? ($ = // @ts-expect-error
1004
- b[p.toLowerCase()], S = `${$}${y}`) : (Object.keys(b).forEach((ve) => {
1007
+ o.isUndefined(p) ? S = `${$}${g}` : /* @ts-expect-error */ b[p.toLowerCase()] ? ($ = // @ts-expect-error
1008
+ b[p.toLowerCase()], S = `${$}${g}`) : (Object.keys(b).forEach((ve) => {
1005
1009
  p.toLowerCase().includes(ve.toLowerCase()) && ($ = b[ve]);
1006
- }), S = `${$}${y}`);
1010
+ }), S = `${$}${g}`);
1007
1011
  }
1008
1012
  const $e = this.runtimeAdapter.getRuntimeRequired({
1009
1013
  ...e,
1010
- label: y
1011
- }), Ve = j.getItemContainer(this), Ne = j.getFormItemContainer(this), qe = this, Ue = e.componentSlots;
1012
- return g("div", {
1014
+ label: g
1015
+ }), Ve = w.getItemContainer(this), Ne = w.getFormItemContainer(this), qe = this, Ue = e.componentSlots;
1016
+ return y("div", {
1013
1017
  style: l
1014
- }, [g(Ve, {
1018
+ }, [y(Ve, {
1015
1019
  show: v
1016
1020
  }, {
1017
1021
  default() {
1018
- return v && g(Ne, N(c, {
1019
- label: `${y ? `${y}:` : ""}`
1022
+ return v && y(Ne, N(c, {
1023
+ label: `${g ? `${g}:` : ""}`
1020
1024
  }, d, $e), {
1021
1025
  default() {
1022
1026
  return qe.runtimeAdapter.formComponentRenderer({
1023
1027
  Component: n,
1024
1028
  schema: e,
1025
- baseModel: s,
1029
+ baseModel: i,
1026
1030
  placeholder: S,
1027
1031
  componentSlots: Ue,
1028
1032
  props: m
@@ -1035,28 +1039,28 @@ class br {
1035
1039
  }
1036
1040
  runtimeGroupProcessor(e) {
1037
1041
  let r;
1038
- const s = {
1042
+ const i = {
1039
1043
  display: "grid",
1040
1044
  gridColumn: "1 / -1",
1041
1045
  ...e.grid
1042
- }, i = j.getGroupContainer(this);
1046
+ }, s = w.getGroupContainer(this);
1043
1047
  let n = e.show;
1044
- return n === void 0 && (n = !0), g("div", {
1045
- style: s
1046
- }, [n && g(i, {
1048
+ return n === void 0 && (n = !0), y("div", {
1049
+ style: i
1050
+ }, [n && y(s, {
1047
1051
  schema: e
1048
- }, yr(r = e.children.map((a) => this.runtimeItemProcessor(a))) ? r : {
1052
+ }, gr(r = e.children.map((a) => this.runtimeItemProcessor(a))) ? r : {
1049
1053
  default: () => [r]
1050
1054
  })]);
1051
1055
  }
1052
1056
  addListItem(e) {
1053
- var r, s;
1054
- if (console.log("this", this.processor.stableModel), !((r = this.processor.stableModel[e.field]) != null && r[0]))
1057
+ var r, i;
1058
+ if (!((r = this.processor.stableModel[e.field]) != null && r[0]))
1055
1059
  return Promise.reject({
1056
1060
  code: "0001",
1057
1061
  message: "异步默认值数据正在处理中,请您耐心等待... "
1058
1062
  });
1059
- (s = this.processor.stableModel[e.field]) != null && s[0] && this.model.value[e.field].push(C(this.processor.stableModel[e.field][0])), this.runtimeAdapter.clearValidate(this);
1063
+ (i = this.processor.stableModel[e.field]) != null && i[0] && this.model.value[e.field].push(C(this.processor.stableModel[e.field][0])), this.runtimeAdapter.clearValidate(this);
1060
1064
  }
1061
1065
  deleteListItem(e, r) {
1062
1066
  this.model.value[e.field].splice(r, 1), this.runtimeAdapter.clearValidate(this);
@@ -1066,38 +1070,38 @@ class br {
1066
1070
  display: "grid",
1067
1071
  gridColumn: "1 / -1",
1068
1072
  ...e.grid
1069
- }, s = this;
1070
- s.model.value[e.field] || (s.model.value[e.field] = [{}]);
1071
- let i = e.show;
1072
- i === void 0 && (i = !0);
1073
- const n = j.getListContainer(this), a = j.getListItemContainer(this);
1074
- return g("div", {
1073
+ }, i = this;
1074
+ i.model.value[e.field] || (i.model.value[e.field] = [{}]);
1075
+ let s = e.show;
1076
+ s === void 0 && (s = !0);
1077
+ const n = w.getListContainer(this), a = w.getListItemContainer(this);
1078
+ return y("div", {
1075
1079
  style: r
1076
- }, [i && g(n, {
1080
+ }, [s && y(n, {
1077
1081
  schema: e
1078
1082
  }, {
1079
1083
  default() {
1080
- return s.model.value[e.field].map((l, c) => g(a, null, {
1084
+ return i.model.value[e.field].map((l, c) => y(a, null, {
1081
1085
  default() {
1082
- return e.children.map((d) => s.runtimeItemProcessor(d, c, l, e));
1086
+ return e.children.map((d) => i.runtimeItemProcessor(d, c, l, e));
1083
1087
  },
1084
1088
  delete({
1085
1089
  container: d
1086
1090
  } = {}) {
1087
1091
  var m;
1088
- const p = d ?? g("button", null, null);
1089
- return Le(g(p, {
1090
- onClick: () => s.deleteListItem(e, c)
1091
- }, null), [[De, ((m = s.model.value[e.field]) == null ? void 0 : m.length) > 1]]);
1092
+ const p = d ?? y("button", null, null);
1093
+ return Le(y(p, {
1094
+ onClick: () => i.deleteListItem(e, c)
1095
+ }, null), [[De, ((m = i.model.value[e.field]) == null ? void 0 : m.length) > 1]]);
1092
1096
  }
1093
1097
  }));
1094
1098
  },
1095
1099
  add({
1096
1100
  container: l
1097
1101
  } = {}) {
1098
- const c = l ?? g("button", null, [Ge("添加")]);
1099
- return g(c, {
1100
- onClick: () => s.addListItem(e)
1102
+ const c = l ?? y("button", null, [Ge("添加")]);
1103
+ return y(c, {
1104
+ onClick: () => i.addListItem(e)
1101
1105
  }, null);
1102
1106
  }
1103
1107
  })]);
@@ -1112,33 +1116,33 @@ class br {
1112
1116
  gridColumn: "1 / -1",
1113
1117
  gridAutoColumns: "1fr",
1114
1118
  ...this.grid
1115
- }, r = this, s = h(this.globalNativeFormOverride.props.Form, C((c = (l = this.native) == null ? void 0 : l.props) == null ? void 0 : c.Form) ?? {}), i = h(this.globalNativeFormOverride.slots.Form, C((p = (d = this.native) == null ? void 0 : d.slots) == null ? void 0 : p.Form) ?? {}), n = j.getFormContainer(this), a = this.runtimeAdapter.getFormModelPropName();
1116
- return g(n, N(s, {
1119
+ }, r = this, i = h(this.globalNativeFormOverride.props.Form, C((c = (l = this.native) == null ? void 0 : l.props) == null ? void 0 : c.Form) ?? {}), s = h(this.globalNativeFormOverride.slots.Form, C((p = (d = this.native) == null ? void 0 : d.slots) == null ? void 0 : p.Form) ?? {}), n = w.getFormContainer(this), a = this.runtimeAdapter.getFormModelPropName();
1120
+ return y(n, N(i, {
1117
1121
  ref: this.formRef
1118
1122
  }, {
1119
1123
  [a]: this.model.value
1120
1124
  }), {
1121
1125
  default() {
1122
- return g("div", {
1126
+ return y("div", {
1123
1127
  style: e
1124
1128
  }, [r.runtimeProcessor(r.schemas.value)]);
1125
1129
  },
1126
- ...i
1130
+ ...s
1127
1131
  });
1128
1132
  }
1129
1133
  }
1130
1134
  class f {
1131
1135
  static getPreset(e) {
1132
- var r, s, i;
1133
- return (s = (r = this.presets.uiPresets) == null ? void 0 : r[e]) != null && s.extend ? this.presets.uiPresets[(i = this.presets.uiPresets[e]) == null ? void 0 : i.extend] : this.presets.uiPresets[e];
1136
+ var r, i, s;
1137
+ return (i = (r = this.presets.uiPresets) == null ? void 0 : r[e]) != null && i.extend ? this.presets.uiPresets[(s = this.presets.uiPresets[e]) == null ? void 0 : s.extend] : this.presets.uiPresets[e];
1134
1138
  }
1135
1139
  static getUI(e) {
1136
- var r, s, i;
1137
- return (s = (r = this.presets.uiPresets) == null ? void 0 : r[e]) != null && s.extend ? (i = this.presets.uiPresets[e]) == null ? void 0 : i.extend : e;
1140
+ var r, i, s;
1141
+ return (i = (r = this.presets.uiPresets) == null ? void 0 : r[e]) != null && i.extend ? (s = this.presets.uiPresets[e]) == null ? void 0 : s.extend : e;
1138
1142
  }
1139
1143
  }
1140
1144
  u(f, "presets");
1141
- function H({
1145
+ function W({
1142
1146
  parentSchema: t,
1143
1147
  schema: e,
1144
1148
  index: r
@@ -1148,7 +1152,7 @@ function H({
1148
1152
  const vr = {
1149
1153
  ArcoVue: {
1150
1154
  getRuntimeField(t) {
1151
- const e = H(t);
1155
+ const e = W(t);
1152
1156
  return o.isFunction(e) ? {
1153
1157
  field: e()
1154
1158
  } : {
@@ -1164,14 +1168,14 @@ const vr = {
1164
1168
  message: `${t.label}是必填项`
1165
1169
  });
1166
1170
  else {
1167
- const r = t.rules.findIndex((s) => !o.isUndefined(s.required));
1171
+ const r = t.rules.findIndex((i) => !o.isUndefined(i.required));
1168
1172
  r !== -1 ? (t.rules[r].required = !0, t.rules[r].message = `${t.label}是必填项`) : t.rules.unshift({
1169
1173
  required: !0,
1170
1174
  message: `${t.label}是必填项`
1171
1175
  });
1172
1176
  }
1173
1177
  else if (t.rules) {
1174
- const r = (e = t.rules) == null ? void 0 : e.findIndex((s) => !!s.required);
1178
+ const r = (e = t.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
1175
1179
  r !== -1 ? t.rules[r].required = !1 : t.rules.unshift({
1176
1180
  required: !0,
1177
1181
  message: `${t.label}是必填项`
@@ -1188,24 +1192,24 @@ const vr = {
1188
1192
  Component: t,
1189
1193
  baseModel: e,
1190
1194
  schema: r,
1191
- placeholder: s,
1192
- componentSlots: i,
1195
+ placeholder: i,
1196
+ componentSlots: s,
1193
1197
  props: n
1194
1198
  }) {
1195
1199
  let a;
1196
- return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field], g(t, N({
1200
+ return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field], y(t, N({
1197
1201
  modelValue: a,
1198
1202
  "onUpdate:modelValue": (l) => {
1199
1203
  o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
1200
1204
  },
1201
- placeholder: s
1205
+ placeholder: i
1202
1206
  }, n), {
1203
- ...i
1207
+ ...s
1204
1208
  });
1205
1209
  },
1206
1210
  validateForm(t) {
1207
1211
  return new Promise((e, r) => {
1208
- t.runtimeCore.formRef.value.validate((s) => s ? r(s) : e(t.cleanFallbackFields(F(t.runtimeCore.processor.processedModel.value))));
1212
+ t.runtimeCore.formRef.value.validate((i) => i ? r(i) : e(t.cleanFallbackFields(E(t.runtimeCore.processor.processedModel.value))));
1209
1213
  });
1210
1214
  },
1211
1215
  clearValidate(t) {
@@ -1215,7 +1219,7 @@ const vr = {
1215
1219
  },
1216
1220
  NutUI: {
1217
1221
  getRuntimeField(t) {
1218
- const e = H(t);
1222
+ const e = W(t);
1219
1223
  return o.isFunction(e) ? {
1220
1224
  prop: e()
1221
1225
  } : {
@@ -1231,14 +1235,14 @@ const vr = {
1231
1235
  message: `${t.label}是必填项`
1232
1236
  });
1233
1237
  else {
1234
- const r = t.rules.findIndex((s) => !o.isUndefined(s.required));
1238
+ const r = t.rules.findIndex((i) => !o.isUndefined(i.required));
1235
1239
  r !== -1 ? (t.rules[r].required = !0, t.rules[r].message = `${t.label}是必填项`) : t.rules.unshift({
1236
1240
  required: !0,
1237
1241
  message: `${t.label}是必填项`
1238
1242
  });
1239
1243
  }
1240
1244
  else if (t.rules) {
1241
- const r = (e = t.rules) == null ? void 0 : e.findIndex((s) => !!s.required);
1245
+ const r = (e = t.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
1242
1246
  r !== -1 ? t.rules[r].required = !1 : t.rules.unshift({
1243
1247
  required: !0,
1244
1248
  message: `${t.label}是必填项`
@@ -1256,28 +1260,28 @@ const vr = {
1256
1260
  Component: t,
1257
1261
  baseModel: e,
1258
1262
  schema: r,
1259
- placeholder: s,
1260
- componentSlots: i,
1263
+ placeholder: i,
1264
+ componentSlots: s,
1261
1265
  props: n
1262
1266
  }) {
1263
1267
  let a;
1264
- return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field], g(t, N({
1268
+ return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field], y(t, N({
1265
1269
  modelValue: a,
1266
1270
  "onUpdate:modelValue": (l) => {
1267
1271
  o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
1268
1272
  },
1269
- placeholder: s
1273
+ placeholder: i
1270
1274
  }, n), {
1271
- ...i
1275
+ ...s
1272
1276
  });
1273
1277
  },
1274
1278
  validateForm(t) {
1275
1279
  return new Promise((e, r) => {
1276
1280
  t.runtimeCore.formRef.value.validate().then(({
1277
- valid: s,
1278
- errors: i
1281
+ valid: i,
1282
+ errors: s
1279
1283
  }) => {
1280
- s ? e(t.cleanFallbackFields(F(t.runtimeCore.processor.processedModel.value))) : r(i);
1284
+ i ? e(t.cleanFallbackFields(E(t.runtimeCore.processor.processedModel.value))) : r(s);
1281
1285
  });
1282
1286
  });
1283
1287
  },
@@ -1288,7 +1292,7 @@ const vr = {
1288
1292
  },
1289
1293
  NaiveUI: {
1290
1294
  getRuntimeField(t) {
1291
- const e = H(t);
1295
+ const e = W(t);
1292
1296
  return o.isFunction(e) ? {
1293
1297
  path: e()
1294
1298
  } : {
@@ -1305,7 +1309,7 @@ const vr = {
1305
1309
  trigger: ["input", "blur"]
1306
1310
  });
1307
1311
  else {
1308
- const r = t.rules.findIndex((s) => !o.isUndefined(s.required));
1312
+ const r = t.rules.findIndex((i) => !o.isUndefined(i.required));
1309
1313
  r !== -1 ? (t.rules[r].required = !0, t.rules[r].message = `${t.label}是必填项`) : t.rules.unshift({
1310
1314
  required: !0,
1311
1315
  message: `${t.label}是必填项`,
@@ -1313,7 +1317,7 @@ const vr = {
1313
1317
  });
1314
1318
  }
1315
1319
  else if (t.rules) {
1316
- const r = (e = t.rules) == null ? void 0 : e.findIndex((s) => !!s.required);
1320
+ const r = (e = t.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
1317
1321
  r !== -1 ? t.rules[r].required = !1 : t.rules.unshift({
1318
1322
  required: !0,
1319
1323
  message: `${t.label}是必填项`,
@@ -1331,24 +1335,24 @@ const vr = {
1331
1335
  Component: t,
1332
1336
  baseModel: e,
1333
1337
  schema: r,
1334
- placeholder: s,
1335
- componentSlots: i,
1338
+ placeholder: i,
1339
+ componentSlots: s,
1336
1340
  props: n
1337
1341
  }) {
1338
1342
  let a;
1339
- return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field], g(t, N({
1343
+ return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field], y(t, N({
1340
1344
  value: a,
1341
1345
  "onUpdate:value": (l) => {
1342
1346
  o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
1343
1347
  },
1344
- placeholder: s
1348
+ placeholder: i
1345
1349
  }, n), {
1346
- ...i
1350
+ ...s
1347
1351
  });
1348
1352
  },
1349
1353
  validateForm(t) {
1350
1354
  return new Promise((e, r) => {
1351
- t.runtimeCore.formRef.value.validate((s) => s ? r(s) : e(t.cleanFallbackFields(F(t.runtimeCore.processor.processedModel.value))));
1355
+ t.runtimeCore.formRef.value.validate((i) => i ? r(i) : e(t.cleanFallbackFields(E(t.runtimeCore.processor.processedModel.value))));
1352
1356
  });
1353
1357
  },
1354
1358
  clearValidate(t) {
@@ -1356,20 +1360,20 @@ const vr = {
1356
1360
  (r = (e = t.formRef.value) == null ? void 0 : e.restoreValidation) == null || r.call(e);
1357
1361
  }
1358
1362
  }
1359
- }, w = class w {
1363
+ }, M = class M {
1360
1364
  static getPlaceholderPrefixPresetByComponentName() {
1361
1365
  const e = {
1362
1366
  请选择: ["select", "tree"],
1363
1367
  请输入: ["input"]
1364
1368
  }, r = {};
1365
- for (const s in e)
1366
- e[s].forEach((i) => {
1367
- r[i] = s;
1369
+ for (const i in e)
1370
+ e[i].forEach((s) => {
1371
+ r[s] = i;
1368
1372
  });
1369
1373
  return r;
1370
1374
  }
1371
1375
  };
1372
- u(w, "schemaPreset", {
1376
+ u(M, "schemaPreset", {
1373
1377
  type: {
1374
1378
  defaultValue: "item"
1375
1379
  },
@@ -1415,19 +1419,19 @@ u(w, "schemaPreset", {
1415
1419
  runtime: {
1416
1420
  default: void 0
1417
1421
  }
1418
- }), u(w, "componentPropsPreset", {
1422
+ }), u(M, "componentPropsPreset", {
1419
1423
  options: {
1420
1424
  defaultValue: []
1421
1425
  }
1422
1426
  }), // 基于基本功能提出基本预设
1423
- u(w, "placeholderPresetByComponentName", w.getPlaceholderPrefixPresetByComponentName());
1424
- let Y = w;
1427
+ u(M, "placeholderPresetByComponentName", M.getPlaceholderPrefixPresetByComponentName());
1428
+ let Y = M;
1425
1429
  const I = {
1426
1430
  ...Y,
1427
1431
  adapters: {
1428
1432
  ...vr
1429
1433
  }
1430
- }, Cr = /* @__PURE__ */ Be({
1434
+ }, Cr = /* @__PURE__ */ ke({
1431
1435
  props: {
1432
1436
  setup: {
1433
1437
  type: Function,
@@ -1440,7 +1444,7 @@ const I = {
1440
1444
  }
1441
1445
  });
1442
1446
  function Ir(t) {
1443
- const e = new ke(t);
1447
+ const e = new He(t);
1444
1448
  return [
1445
1449
  e.setup.bind(e),
1446
1450
  {
@@ -1470,13 +1474,13 @@ function te(t, e) {
1470
1474
  function Or(t) {
1471
1475
  return te(t, "native");
1472
1476
  }
1473
- function Er(t) {
1477
+ function Fr(t) {
1474
1478
  return t.__proform_raw_object = !0, t;
1475
1479
  }
1476
- function Mr(t) {
1480
+ function jr(t) {
1477
1481
  return te(t, "onetime");
1478
1482
  }
1479
- function jr(t) {
1483
+ function wr(t) {
1480
1484
  function e() {
1481
1485
  return t;
1482
1486
  }
@@ -1488,9 +1492,9 @@ function jr(t) {
1488
1492
  export {
1489
1493
  Cr as ProForm,
1490
1494
  Or as markNativeFunction,
1491
- Er as markNativeObject,
1492
- Mr as markOnetimeFunction,
1493
- jr as markStructuredPathParsing,
1495
+ Fr as markNativeObject,
1496
+ jr as markOnetimeFunction,
1497
+ wr as markStructuredPathParsing,
1494
1498
  Ir as useForm,
1495
1499
  Sr as useFormPresetConfigurer,
1496
1500
  te as useModifiers