@harbor-design/proform 1.3.14 → 1.3.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +585 -541
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var Te = Object.defineProperty;
2
- var ze = (t, e, r) => e in t ? Te(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var u = (t, e, r) => (ze(t, typeof e != "symbol" ? e + "" : e, r), r);
4
- import { ref as z, readonly as Pe, nextTick as O, isRef as q, watch as _, isReactive as U, toRaw as x, reactive as H, createVNode as y, mergeProps as N, withDirectives as Le, vShow as De, createTextVNode as Ge, isVNode as Be, defineComponent as ke } from "vue";
2
+ var ze = (r, e, t) => e in r ? Te(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var u = (r, e, t) => (ze(r, typeof e != "symbol" ? e + "" : e, t), t);
4
+ import { ref as z, readonly as _e, nextTick as O, isRef as F, watch as v, isReactive as j, toRaw as R, reactive as Pe, shallowReactive as Le, createVNode as b, mergeProps as U, withDirectives as De, vShow as Ge, createTextVNode as Be, isVNode as He, defineComponent as Ke } from "vue";
5
5
  class o {
6
6
  static typeChecker(e) {
7
7
  return {}.toString.call(e);
@@ -50,17 +50,17 @@ class o {
50
50
  return !1;
51
51
  if (this.isObjectEmpty(e))
52
52
  return !0;
53
- for (const r in e) {
54
- if (r === "componentProps")
53
+ for (const t in e) {
54
+ if (t === "componentProps")
55
55
  return !1;
56
- if (e.hasOwnProperty(r) && this.isProcessInprogress(e[r]))
56
+ if (e.hasOwnProperty(t) && this.isProcessInprogress(e[t]))
57
57
  return !0;
58
58
  }
59
59
  } else if (this.isArray(e)) {
60
60
  if (this.isArrayEmpty(e))
61
61
  return !0;
62
- for (const r of e)
63
- if (this.isProcessInprogress(r))
62
+ for (const t of e)
63
+ if (this.isProcessInprogress(t))
64
64
  return !0;
65
65
  }
66
66
  return !1;
@@ -69,20 +69,20 @@ class o {
69
69
  return !!e.__proform_raw_object;
70
70
  }
71
71
  }
72
- function h(t, ...e) {
73
- return e.forEach((r) => {
74
- if (Array.isArray(r))
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;
72
+ function h(r, ...e) {
73
+ return e.forEach((t) => {
74
+ if (Array.isArray(t))
75
+ Array.isArray(r) || (r = []), t.forEach((i, s) => {
76
+ typeof i == "object" && i !== null ? r[s] = h(Array.isArray(i) ? [] : {}, i) : r[s] = i;
77
77
  });
78
78
  else
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
- }), t;
79
+ for (const i in t)
80
+ t.hasOwnProperty(i) && (typeof t[i] == "object" && t[i] !== null ? r[i] = h(r[i] || {}, t[i]) : r[i] = t[i]);
81
+ }), r;
82
82
  }
83
- function P(t) {
83
+ function P(r) {
84
84
  const e = /* @__PURE__ */ new WeakMap();
85
- function r(i) {
85
+ function t(i) {
86
86
  if (i === null || typeof i != "object")
87
87
  return i;
88
88
  if (i instanceof Date)
@@ -92,13 +92,13 @@ function P(t) {
92
92
  if (i instanceof Map) {
93
93
  const n = /* @__PURE__ */ new Map();
94
94
  for (const [a, l] of i)
95
- n.set(r(a), r(l));
95
+ n.set(t(a), t(l));
96
96
  return n;
97
97
  }
98
98
  if (i instanceof Set) {
99
99
  const n = /* @__PURE__ */ new Set();
100
100
  for (const a of i)
101
- n.add(r(a));
101
+ n.add(t(a));
102
102
  return n;
103
103
  }
104
104
  if (e.has(i))
@@ -107,21 +107,21 @@ function P(t) {
107
107
  const n = [];
108
108
  e.set(i, n);
109
109
  for (let a = 0; a < i.length; a++)
110
- n[a] = r(i[a]);
110
+ n[a] = t(i[a]);
111
111
  return n;
112
112
  }
113
113
  const s = Object.create(Object.getPrototypeOf(i));
114
114
  e.set(i, s);
115
115
  for (const n in i)
116
- i.hasOwnProperty(n) && (s[n] = r(i[n]));
116
+ i.hasOwnProperty(n) && (s[n] = t(i[n]));
117
117
  return s;
118
118
  }
119
- return r(t);
119
+ return t(r);
120
120
  }
121
- function X(t, e) {
122
- return t.replace(/undefined/g, e);
121
+ function X(r, e) {
122
+ return r.replace(/undefined/g, e);
123
123
  }
124
- class He {
124
+ class We {
125
125
  constructor(e) {
126
126
  u(this, "runtimeCore");
127
127
  u(this, "readonlyReactiveModel", z({}));
@@ -129,23 +129,23 @@ class He {
129
129
  }
130
130
  // happy path, 后续可以完善更多的 fallback 处理,fallback 处理是为了不卡住异步时的首次渲染做的优化
131
131
  cleanFallbackFields(e) {
132
- return e !== null && typeof e == "object" && (delete e.__yiwwhl_async_field_fallback, Object.values(e).forEach((r) => {
133
- this.cleanFallbackFields(r);
132
+ return e !== null && typeof e == "object" && (delete e.__yiwwhl_async_field_fallback, Object.values(e).forEach((t) => {
133
+ this.cleanFallbackFields(t);
134
134
  })), e;
135
135
  }
136
136
  setup(e) {
137
- return this.runtimeCore = e, this.readonlyReactiveModel.value = Pe(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;
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
140
  var i;
141
- const e = (i = c.getPreset(this.runtimeCore.ui)) == null ? void 0 : i.adapter, r = I.adapters[c.getUI(this.runtimeCore.ui)];
142
- return (e == null ? void 0 : e.validateForm(this)) ?? (r == null ? void 0 : r.validateForm(this));
141
+ const e = (i = c.getPreset(this.runtimeCore.ui)) == null ? void 0 : i.adapter, t = C.adapters[c.getUI(this.runtimeCore.ui)];
142
+ return (e == null ? void 0 : e.validateForm(this)) ?? (t == null ? void 0 : t.validateForm(this));
143
143
  }
144
144
  hydrate(e) {
145
145
  O(() => {
146
146
  this.runtimeCore.hydrateEffect.trackEffect(
147
147
  () => {
148
- q(e) ? _(
148
+ F(e) ? v(
149
149
  () => e.value,
150
150
  () => {
151
151
  h(this.runtimeCore.model.value, e.value);
@@ -154,7 +154,7 @@ class He {
154
154
  deep: !0,
155
155
  immediate: !0
156
156
  }
157
- ) : U(e) ? _(
157
+ ) : j(e) ? v(
158
158
  () => e,
159
159
  () => {
160
160
  h(this.runtimeCore.model.value, e);
@@ -173,7 +173,7 @@ class He {
173
173
  }
174
174
  share(e) {
175
175
  O(() => {
176
- q(e) ? _(
176
+ F(e) ? v(
177
177
  () => e.value,
178
178
  () => {
179
179
  h(this.runtimeCore.shared, e.value);
@@ -182,7 +182,7 @@ class He {
182
182
  deep: !0,
183
183
  immediate: !0
184
184
  }
185
- ) : U(e) ? _(
185
+ ) : j(e) ? v(
186
186
  () => e,
187
187
  () => {
188
188
  h(this.runtimeCore.shared, e);
@@ -191,18 +191,44 @@ class He {
191
191
  deep: !0,
192
192
  immediate: !0
193
193
  }
194
- ) : h(this.runtimeCore.shared, e);
194
+ ) : Object.keys(e).forEach((t) => {
195
+ F(e[t]) ? v(
196
+ () => e[t].value,
197
+ () => {
198
+ h(this.runtimeCore.shared, {
199
+ [t]: e[t].value
200
+ });
201
+ },
202
+ {
203
+ deep: !0,
204
+ immediate: !0
205
+ }
206
+ ) : j(e[t]) ? v(
207
+ () => e[t],
208
+ () => {
209
+ h(this.runtimeCore.shared, {
210
+ [t]: e[t]
211
+ });
212
+ },
213
+ {
214
+ deep: !0,
215
+ immediate: !0
216
+ }
217
+ ) : h(this.runtimeCore.shared, {
218
+ [t]: e[t]
219
+ });
220
+ });
195
221
  });
196
222
  }
197
223
  subscribeModel(e) {
198
224
  O(() => {
199
- const r = _(
225
+ const t = v(
200
226
  () => this.readonlyReactiveModel.value,
201
227
  (i) => {
202
228
  e(i, {
203
229
  stopSubscribe() {
204
230
  O(() => {
205
- r();
231
+ t();
206
232
  });
207
233
  }
208
234
  });
@@ -218,7 +244,7 @@ class He {
218
244
  var e;
219
245
  (e = this.runtimeCore) != null && e.model.value && (this.runtimeCore.model.value = P(
220
246
  this.runtimeCore.processor.stableModel
221
- ), this.readonlyReactiveModel.value = Pe(this.runtimeCore.model.value), this.runtimeCore.runtimeAdapter.clearValidate(this.runtimeCore));
247
+ ), this.readonlyReactiveModel.value = _e(this.runtimeCore.model.value), this.runtimeCore.runtimeAdapter.clearValidate(this.runtimeCore));
222
248
  }
223
249
  }
224
250
  class Y {
@@ -234,327 +260,327 @@ class Y {
234
260
  triggerEffects() {
235
261
  Array.from(this.effects).forEach((e) => e());
236
262
  }
237
- trackEffect(e, r = {
263
+ trackEffect(e, t = {
238
264
  lazy: !0
239
265
  }) {
240
- 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);
266
+ return !t.lazy && e(), t.identifier ? this.identifierMap.get(t.identifier) || (this.effects.add(e), this.identifierMap.set(t.identifier, !0)) : this.effects.add(e), () => this.effects.delete(e);
241
267
  }
242
268
  }
243
- var Ke = typeof global == "object" && global && global.Object === Object && global, We = typeof self == "object" && self && self.Object === Object && self, J = Ke || We || Function("return this")(), E = J.Symbol, je = Object.prototype, Xe = je.hasOwnProperty, Ye = je.toString, V = E ? E.toStringTag : void 0;
244
- function Ze(t) {
245
- var e = Xe.call(t, V), r = t[V];
269
+ var Xe = typeof global == "object" && global && global.Object === Object && global, Ye = typeof self == "object" && self && self.Object === Object && self, J = Xe || Ye || Function("return this")(), $ = J.Symbol, je = Object.prototype, Ze = je.hasOwnProperty, Je = je.toString, q = $ ? $.toStringTag : void 0;
270
+ function Qe(r) {
271
+ var e = Ze.call(r, q), t = r[q];
246
272
  try {
247
- t[V] = void 0;
273
+ r[q] = void 0;
248
274
  var i = !0;
249
275
  } catch {
250
276
  }
251
- var s = Ye.call(t);
252
- return i && (e ? t[V] = r : delete t[V]), s;
277
+ var s = Je.call(r);
278
+ return i && (e ? r[q] = t : delete r[q]), s;
253
279
  }
254
- var Je = Object.prototype, Qe = Je.toString;
255
- function Ae(t) {
256
- return Qe.call(t);
280
+ var ke = Object.prototype, Ae = ke.toString;
281
+ function et(r) {
282
+ return Ae.call(r);
257
283
  }
258
- var et = "[object Null]", tt = "[object Undefined]", Ie = E ? E.toStringTag : void 0;
259
- function we(t) {
260
- return t == null ? t === void 0 ? tt : et : Ie && Ie in Object(t) ? Ze(t) : Ae(t);
284
+ var tt = "[object Null]", rt = "[object Undefined]", Ce = $ ? $.toStringTag : void 0;
285
+ function we(r) {
286
+ return r == null ? r === void 0 ? rt : tt : Ce && Ce in Object(r) ? Qe(r) : et(r);
261
287
  }
262
- function rt(t) {
263
- return t != null && typeof t == "object";
288
+ function it(r) {
289
+ return r != null && typeof r == "object";
264
290
  }
265
- var it = "[object Symbol]";
266
- function Q(t) {
267
- return typeof t == "symbol" || rt(t) && we(t) == it;
291
+ var st = "[object Symbol]";
292
+ function Q(r) {
293
+ return typeof r == "symbol" || it(r) && we(r) == st;
268
294
  }
269
- function st(t, e) {
270
- for (var r = -1, i = t == null ? 0 : t.length, s = Array(i); ++r < i; )
271
- s[r] = e(t[r], r, t);
295
+ function nt(r, e) {
296
+ for (var t = -1, i = r == null ? 0 : r.length, s = Array(i); ++t < i; )
297
+ s[t] = e(r[t], t, r);
272
298
  return s;
273
299
  }
274
- var A = Array.isArray, nt = 1 / 0, Ce = E ? E.prototype : void 0, Se = Ce ? Ce.toString : void 0;
275
- function Me(t) {
276
- if (typeof t == "string")
277
- return t;
278
- if (A(t))
279
- return st(t, Me) + "";
280
- if (Q(t))
281
- return Se ? Se.call(t) : "";
282
- var e = t + "";
283
- return e == "0" && 1 / t == -nt ? "-0" : e;
284
- }
285
- function G(t) {
286
- var e = typeof t;
287
- return t != null && (e == "object" || e == "function");
288
- }
289
- var ot = "[object AsyncFunction]", at = "[object Function]", lt = "[object GeneratorFunction]", ut = "[object Proxy]";
290
- function ft(t) {
291
- if (!G(t))
300
+ var k = Array.isArray, ot = 1 / 0, Ie = $ ? $.prototype : void 0, Se = Ie ? Ie.toString : void 0;
301
+ function Me(r) {
302
+ if (typeof r == "string")
303
+ return r;
304
+ if (k(r))
305
+ return nt(r, Me) + "";
306
+ if (Q(r))
307
+ return Se ? Se.call(r) : "";
308
+ var e = r + "";
309
+ return e == "0" && 1 / r == -ot ? "-0" : e;
310
+ }
311
+ function G(r) {
312
+ var e = typeof r;
313
+ return r != null && (e == "object" || e == "function");
314
+ }
315
+ var at = "[object AsyncFunction]", lt = "[object Function]", ut = "[object GeneratorFunction]", ft = "[object Proxy]";
316
+ function ct(r) {
317
+ if (!G(r))
292
318
  return !1;
293
- var e = we(t);
294
- return e == at || e == lt || e == ot || e == ut;
319
+ var e = we(r);
320
+ return e == lt || e == ut || e == at || e == ft;
295
321
  }
296
322
  var K = J["__core-js_shared__"], Oe = function() {
297
- var t = /[^.]+$/.exec(K && K.keys && K.keys.IE_PROTO || "");
298
- return t ? "Symbol(src)_1." + t : "";
323
+ var r = /[^.]+$/.exec(K && K.keys && K.keys.IE_PROTO || "");
324
+ return r ? "Symbol(src)_1." + r : "";
299
325
  }();
300
- function ct(t) {
301
- return !!Oe && Oe in t;
326
+ function dt(r) {
327
+ return !!Oe && Oe in r;
302
328
  }
303
- var dt = Function.prototype, pt = dt.toString;
304
- function ht(t) {
305
- if (t != null) {
329
+ var pt = Function.prototype, ht = pt.toString;
330
+ function mt(r) {
331
+ if (r != null) {
306
332
  try {
307
- return pt.call(t);
333
+ return ht.call(r);
308
334
  } catch {
309
335
  }
310
336
  try {
311
- return t + "";
337
+ return r + "";
312
338
  } catch {
313
339
  }
314
340
  }
315
341
  return "";
316
342
  }
317
- var mt = /[\\^$.*+?()[\]{}|]/g, yt = /^\[object .+?Constructor\]$/, bt = Function.prototype, gt = Object.prototype, vt = bt.toString, _t = gt.hasOwnProperty, Pt = RegExp(
318
- "^" + vt.call(_t).replace(mt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
343
+ var bt = /[\\^$.*+?()[\]{}|]/g, vt = /^\[object .+?Constructor\]$/, gt = Function.prototype, yt = Object.prototype, _t = gt.toString, Pt = yt.hasOwnProperty, Ct = RegExp(
344
+ "^" + _t.call(Pt).replace(bt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
319
345
  );
320
- function It(t) {
321
- if (!G(t) || ct(t))
346
+ function It(r) {
347
+ if (!G(r) || dt(r))
322
348
  return !1;
323
- var e = ft(t) ? Pt : yt;
324
- return e.test(ht(t));
349
+ var e = ct(r) ? Ct : vt;
350
+ return e.test(mt(r));
325
351
  }
326
- function Ct(t, e) {
327
- return t == null ? void 0 : t[e];
352
+ function St(r, e) {
353
+ return r == null ? void 0 : r[e];
328
354
  }
329
- function ee(t, e) {
330
- var r = Ct(t, e);
331
- return It(r) ? r : void 0;
355
+ function A(r, e) {
356
+ var t = St(r, e);
357
+ return It(t) ? t : void 0;
332
358
  }
333
359
  var Fe = function() {
334
360
  try {
335
- var t = ee(Object, "defineProperty");
336
- return t({}, "", {}), t;
361
+ var r = A(Object, "defineProperty");
362
+ return r({}, "", {}), r;
337
363
  } catch {
338
364
  }
339
- }(), St = 9007199254740991, Ot = /^(?:0|[1-9]\d*)$/;
340
- function Ft(t, e) {
341
- var r = typeof t;
342
- return e = e ?? St, !!e && (r == "number" || r != "symbol" && Ot.test(t)) && t > -1 && t % 1 == 0 && t < e;
365
+ }(), Ot = 9007199254740991, Ft = /^(?:0|[1-9]\d*)$/;
366
+ function jt(r, e) {
367
+ var t = typeof r;
368
+ return e = e ?? Ot, !!e && (t == "number" || t != "symbol" && Ft.test(r)) && r > -1 && r % 1 == 0 && r < e;
343
369
  }
344
- function jt(t, e, r) {
345
- e == "__proto__" && Fe ? Fe(t, e, {
370
+ function wt(r, e, t) {
371
+ e == "__proto__" && Fe ? Fe(r, e, {
346
372
  configurable: !0,
347
373
  enumerable: !0,
348
- value: r,
374
+ value: t,
349
375
  writable: !0
350
- }) : t[e] = r;
376
+ }) : r[e] = t;
351
377
  }
352
- function xe(t, e) {
353
- return t === e || t !== t && e !== e;
378
+ function xe(r, e) {
379
+ return r === e || r !== r && e !== e;
354
380
  }
355
- var wt = Object.prototype, Mt = wt.hasOwnProperty;
356
- function xt(t, e, r) {
357
- var i = t[e];
358
- (!(Mt.call(t, e) && xe(i, r)) || r === void 0 && !(e in t)) && jt(t, e, r);
381
+ var Mt = Object.prototype, xt = Mt.hasOwnProperty;
382
+ function Et(r, e, t) {
383
+ var i = r[e];
384
+ (!(xt.call(r, e) && xe(i, t)) || t === void 0 && !(e in r)) && wt(r, e, t);
359
385
  }
360
- var Et = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Rt = /^\w*$/;
361
- function $t(t, e) {
362
- if (A(t))
386
+ var Rt = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, $t = /^\w*$/;
387
+ function Vt(r, e) {
388
+ if (k(r))
363
389
  return !1;
364
- var r = typeof t;
365
- return r == "number" || r == "symbol" || r == "boolean" || t == null || Q(t) ? !0 : Rt.test(t) || !Et.test(t) || e != null && t in Object(e);
390
+ var t = typeof r;
391
+ return t == "number" || t == "symbol" || t == "boolean" || r == null || Q(r) ? !0 : $t.test(r) || !Rt.test(r) || e != null && r in Object(e);
366
392
  }
367
- var T = ee(Object, "create");
368
- function Vt() {
393
+ var T = A(Object, "create");
394
+ function Nt() {
369
395
  this.__data__ = T ? T(null) : {}, this.size = 0;
370
396
  }
371
- function Nt(t) {
372
- var e = this.has(t) && delete this.__data__[t];
397
+ function qt(r) {
398
+ var e = this.has(r) && delete this.__data__[r];
373
399
  return this.size -= e ? 1 : 0, e;
374
400
  }
375
- var qt = "__lodash_hash_undefined__", Ut = Object.prototype, Tt = Ut.hasOwnProperty;
376
- function zt(t) {
401
+ var Ut = "__lodash_hash_undefined__", Tt = Object.prototype, zt = Tt.hasOwnProperty;
402
+ function Lt(r) {
377
403
  var e = this.__data__;
378
404
  if (T) {
379
- var r = e[t];
380
- return r === qt ? void 0 : r;
405
+ var t = e[r];
406
+ return t === Ut ? void 0 : t;
381
407
  }
382
- return Tt.call(e, t) ? e[t] : void 0;
408
+ return zt.call(e, r) ? e[r] : void 0;
383
409
  }
384
- var Lt = Object.prototype, Dt = Lt.hasOwnProperty;
385
- function Gt(t) {
410
+ var Dt = Object.prototype, Gt = Dt.hasOwnProperty;
411
+ function Bt(r) {
386
412
  var e = this.__data__;
387
- return T ? e[t] !== void 0 : Dt.call(e, t);
413
+ return T ? e[r] !== void 0 : Gt.call(e, r);
388
414
  }
389
- var Bt = "__lodash_hash_undefined__";
390
- function kt(t, e) {
391
- var r = this.__data__;
392
- return this.size += this.has(t) ? 0 : 1, r[t] = T && e === void 0 ? Bt : e, this;
415
+ var Ht = "__lodash_hash_undefined__";
416
+ function Kt(r, e) {
417
+ var t = this.__data__;
418
+ return this.size += this.has(r) ? 0 : 1, t[r] = T && e === void 0 ? Ht : e, this;
393
419
  }
394
- function F(t) {
395
- var e = -1, r = t == null ? 0 : t.length;
396
- for (this.clear(); ++e < r; ) {
397
- var i = t[e];
420
+ function w(r) {
421
+ var e = -1, t = r == null ? 0 : r.length;
422
+ for (this.clear(); ++e < t; ) {
423
+ var i = r[e];
398
424
  this.set(i[0], i[1]);
399
425
  }
400
426
  }
401
- F.prototype.clear = Vt;
402
- F.prototype.delete = Nt;
403
- F.prototype.get = zt;
404
- F.prototype.has = Gt;
405
- F.prototype.set = kt;
406
- function Ht() {
427
+ w.prototype.clear = Nt;
428
+ w.prototype.delete = qt;
429
+ w.prototype.get = Lt;
430
+ w.prototype.has = Bt;
431
+ w.prototype.set = Kt;
432
+ function Wt() {
407
433
  this.__data__ = [], this.size = 0;
408
434
  }
409
- function B(t, e) {
410
- for (var r = t.length; r--; )
411
- if (xe(t[r][0], e))
412
- return r;
435
+ function B(r, e) {
436
+ for (var t = r.length; t--; )
437
+ if (xe(r[t][0], e))
438
+ return t;
413
439
  return -1;
414
440
  }
415
- var Kt = Array.prototype, Wt = Kt.splice;
416
- function Xt(t) {
417
- var e = this.__data__, r = B(e, t);
418
- if (r < 0)
441
+ var Xt = Array.prototype, Yt = Xt.splice;
442
+ function Zt(r) {
443
+ var e = this.__data__, t = B(e, r);
444
+ if (t < 0)
419
445
  return !1;
420
446
  var i = e.length - 1;
421
- return r == i ? e.pop() : Wt.call(e, r, 1), --this.size, !0;
447
+ return t == i ? e.pop() : Yt.call(e, t, 1), --this.size, !0;
422
448
  }
423
- function Yt(t) {
424
- var e = this.__data__, r = B(e, t);
425
- return r < 0 ? void 0 : e[r][1];
449
+ function Jt(r) {
450
+ var e = this.__data__, t = B(e, r);
451
+ return t < 0 ? void 0 : e[t][1];
426
452
  }
427
- function Zt(t) {
428
- return B(this.__data__, t) > -1;
453
+ function Qt(r) {
454
+ return B(this.__data__, r) > -1;
429
455
  }
430
- function Jt(t, e) {
431
- var r = this.__data__, i = B(r, t);
432
- return i < 0 ? (++this.size, r.push([t, e])) : r[i][1] = e, this;
456
+ function kt(r, e) {
457
+ var t = this.__data__, i = B(t, r);
458
+ return i < 0 ? (++this.size, t.push([r, e])) : t[i][1] = e, this;
433
459
  }
434
- function R(t) {
435
- var e = -1, r = t == null ? 0 : t.length;
436
- for (this.clear(); ++e < r; ) {
437
- var i = t[e];
460
+ function V(r) {
461
+ var e = -1, t = r == null ? 0 : r.length;
462
+ for (this.clear(); ++e < t; ) {
463
+ var i = r[e];
438
464
  this.set(i[0], i[1]);
439
465
  }
440
466
  }
441
- R.prototype.clear = Ht;
442
- R.prototype.delete = Xt;
443
- R.prototype.get = Yt;
444
- R.prototype.has = Zt;
445
- R.prototype.set = Jt;
446
- var Qt = ee(J, "Map");
447
- function At() {
467
+ V.prototype.clear = Wt;
468
+ V.prototype.delete = Zt;
469
+ V.prototype.get = Jt;
470
+ V.prototype.has = Qt;
471
+ V.prototype.set = kt;
472
+ var At = A(J, "Map");
473
+ function er() {
448
474
  this.size = 0, this.__data__ = {
449
- hash: new F(),
450
- map: new (Qt || R)(),
451
- string: new F()
475
+ hash: new w(),
476
+ map: new (At || V)(),
477
+ string: new w()
452
478
  };
453
479
  }
454
- function er(t) {
455
- var e = typeof t;
456
- return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
480
+ function tr(r) {
481
+ var e = typeof r;
482
+ return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? r !== "__proto__" : r === null;
457
483
  }
458
- function k(t, e) {
459
- var r = t.__data__;
460
- return er(e) ? r[typeof e == "string" ? "string" : "hash"] : r.map;
484
+ function H(r, e) {
485
+ var t = r.__data__;
486
+ return tr(e) ? t[typeof e == "string" ? "string" : "hash"] : t.map;
461
487
  }
462
- function tr(t) {
463
- var e = k(this, t).delete(t);
488
+ function rr(r) {
489
+ var e = H(this, r).delete(r);
464
490
  return this.size -= e ? 1 : 0, e;
465
491
  }
466
- function rr(t) {
467
- return k(this, t).get(t);
492
+ function ir(r) {
493
+ return H(this, r).get(r);
468
494
  }
469
- function ir(t) {
470
- return k(this, t).has(t);
495
+ function sr(r) {
496
+ return H(this, r).has(r);
471
497
  }
472
- function sr(t, e) {
473
- var r = k(this, t), i = r.size;
474
- return r.set(t, e), this.size += r.size == i ? 0 : 1, this;
498
+ function nr(r, e) {
499
+ var t = H(this, r), i = t.size;
500
+ return t.set(r, e), this.size += t.size == i ? 0 : 1, this;
475
501
  }
476
- function j(t) {
477
- var e = -1, r = t == null ? 0 : t.length;
478
- for (this.clear(); ++e < r; ) {
479
- var i = t[e];
502
+ function M(r) {
503
+ var e = -1, t = r == null ? 0 : r.length;
504
+ for (this.clear(); ++e < t; ) {
505
+ var i = r[e];
480
506
  this.set(i[0], i[1]);
481
507
  }
482
508
  }
483
- j.prototype.clear = At;
484
- j.prototype.delete = tr;
485
- j.prototype.get = rr;
486
- j.prototype.has = ir;
487
- j.prototype.set = sr;
488
- var nr = "Expected a function";
489
- function te(t, e) {
490
- if (typeof t != "function" || e != null && typeof e != "function")
491
- throw new TypeError(nr);
492
- var r = function() {
493
- var i = arguments, s = e ? e.apply(this, i) : i[0], n = r.cache;
509
+ M.prototype.clear = er;
510
+ M.prototype.delete = rr;
511
+ M.prototype.get = ir;
512
+ M.prototype.has = sr;
513
+ M.prototype.set = nr;
514
+ var or = "Expected a function";
515
+ function ee(r, e) {
516
+ if (typeof r != "function" || e != null && typeof e != "function")
517
+ throw new TypeError(or);
518
+ var t = function() {
519
+ var i = arguments, s = e ? e.apply(this, i) : i[0], n = t.cache;
494
520
  if (n.has(s))
495
521
  return n.get(s);
496
- var a = t.apply(this, i);
497
- return r.cache = n.set(s, a) || n, a;
522
+ var a = r.apply(this, i);
523
+ return t.cache = n.set(s, a) || n, a;
498
524
  };
499
- return r.cache = new (te.Cache || j)(), r;
500
- }
501
- te.Cache = j;
502
- var or = 500;
503
- function ar(t) {
504
- var e = te(t, function(i) {
505
- return r.size === or && r.clear(), i;
506
- }), r = e.cache;
525
+ return t.cache = new (ee.Cache || M)(), t;
526
+ }
527
+ ee.Cache = M;
528
+ var ar = 500;
529
+ function lr(r) {
530
+ var e = ee(r, function(i) {
531
+ return t.size === ar && t.clear(), i;
532
+ }), t = e.cache;
507
533
  return e;
508
534
  }
509
- var lr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ur = /\\(\\)?/g, fr = ar(function(t) {
535
+ var ur = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, fr = /\\(\\)?/g, cr = lr(function(r) {
510
536
  var e = [];
511
- return t.charCodeAt(0) === 46 && e.push(""), t.replace(lr, function(r, i, s, n) {
512
- e.push(s ? n.replace(ur, "$1") : i || r);
537
+ return r.charCodeAt(0) === 46 && e.push(""), r.replace(ur, function(t, i, s, n) {
538
+ e.push(s ? n.replace(fr, "$1") : i || t);
513
539
  }), e;
514
540
  });
515
- function cr(t) {
516
- return t == null ? "" : Me(t);
541
+ function dr(r) {
542
+ return r == null ? "" : Me(r);
517
543
  }
518
- function Ee(t, e) {
519
- return A(t) ? t : $t(t, e) ? [t] : fr(cr(t));
544
+ function Ee(r, e) {
545
+ return k(r) ? r : Vt(r, e) ? [r] : cr(dr(r));
520
546
  }
521
- var dr = 1 / 0;
522
- function Re(t) {
523
- if (typeof t == "string" || Q(t))
524
- return t;
525
- var e = t + "";
526
- return e == "0" && 1 / t == -dr ? "-0" : e;
547
+ var pr = 1 / 0;
548
+ function Re(r) {
549
+ if (typeof r == "string" || Q(r))
550
+ return r;
551
+ var e = r + "";
552
+ return e == "0" && 1 / r == -pr ? "-0" : e;
527
553
  }
528
- function pr(t, e) {
529
- e = Ee(e, t);
530
- for (var r = 0, i = e.length; t != null && r < i; )
531
- t = t[Re(e[r++])];
532
- return r && r == i ? t : void 0;
554
+ function hr(r, e) {
555
+ e = Ee(e, r);
556
+ for (var t = 0, i = e.length; r != null && t < i; )
557
+ r = r[Re(e[t++])];
558
+ return t && t == i ? r : void 0;
533
559
  }
534
- function L(t, e, r) {
535
- var i = t == null ? void 0 : pr(t, e);
536
- return i === void 0 ? r : i;
560
+ function L(r, e, t) {
561
+ var i = r == null ? void 0 : hr(r, e);
562
+ return i === void 0 ? t : i;
537
563
  }
538
- function hr(t, e, r, i) {
539
- if (!G(t))
540
- return t;
541
- e = Ee(e, t);
542
- for (var s = -1, n = e.length, a = n - 1, l = t; l != null && ++s < n; ) {
543
- var f = Re(e[s]), d = r;
564
+ function mr(r, e, t, i) {
565
+ if (!G(r))
566
+ return r;
567
+ e = Ee(e, r);
568
+ for (var s = -1, n = e.length, a = n - 1, l = r; l != null && ++s < n; ) {
569
+ var f = Re(e[s]), d = t;
544
570
  if (f === "__proto__" || f === "constructor" || f === "prototype")
545
- return t;
571
+ return r;
546
572
  if (s != a) {
547
573
  var p = l[f];
548
- d = i ? i(p, f, l) : void 0, d === void 0 && (d = G(p) ? p : Ft(e[s + 1]) ? [] : {});
574
+ d = i ? i(p, f, l) : void 0, d === void 0 && (d = G(p) ? p : jt(e[s + 1]) ? [] : {});
549
575
  }
550
- xt(l, f, d), l = l[f];
576
+ Et(l, f, d), l = l[f];
551
577
  }
552
- return t;
578
+ return r;
553
579
  }
554
- function D(t, e, r) {
555
- return t == null ? t : hr(t, e, r);
580
+ function D(r, e, t) {
581
+ return r == null ? r : mr(r, e, t);
556
582
  }
557
- class mr {
583
+ class br {
558
584
  constructor(e) {
559
585
  u(this, "runtimeCore");
560
586
  u(this, "processedSchemas");
@@ -562,8 +588,8 @@ class mr {
562
588
  u(this, "getRuntimeMeta");
563
589
  u(this, "stableSchemas", []);
564
590
  u(this, "stableModel", {});
565
- u(this, "schemaPreset", I.schemaPreset);
566
- u(this, "componentPropsPreset", I.componentPropsPreset);
591
+ u(this, "schemaPreset", C.schemaPreset);
592
+ u(this, "componentPropsPreset", C.componentPropsPreset);
567
593
  u(this, "stableUpdaterProcessProgress");
568
594
  u(this, "stableUpdaterTimes", 0);
569
595
  u(this, "schemaEffect", new Y());
@@ -571,7 +597,7 @@ class mr {
571
597
  u(this, "defaultValueInprogressMap", /* @__PURE__ */ new Map());
572
598
  u(this, "baseDefaultValueFunctionsLength");
573
599
  u(this, "isModelInitialized", !0);
574
- this.runtimeCore = e, this.processedSchemas = e.schemas, this.processedModel = e.model, this.getRuntimeMeta = e.getRuntimeMeta.bind(e), _(
600
+ this.runtimeCore = e, this.processedSchemas = e.schemas, this.processedModel = e.model, this.getRuntimeMeta = e.getRuntimeMeta.bind(e), v(
575
601
  () => this.processedModel.value,
576
602
  () => {
577
603
  this.schemaEffect.triggerEffects();
@@ -582,81 +608,81 @@ class mr {
582
608
  );
583
609
  }
584
610
  // 核心处理过程,接收一个初始的代理数据结构,由其衍生的有 parseSchema
585
- parse(e, r) {
611
+ parse(e, t) {
586
612
  e.forEach((i, s) => {
587
- this.parseItem(i, s, r);
613
+ this.parseItem(i, s, t);
588
614
  });
589
615
  }
590
616
  // 初始化空数据结构,避免后续复杂的 if else
591
617
  initSchemas(e) {
592
- return e.map((r) => {
618
+ return e.map((t) => {
593
619
  const i = {};
594
- return r.children && (i.children = this.initSchemas(r.children)), i;
620
+ return t.children && (i.children = this.initSchemas(t.children)), i;
595
621
  });
596
622
  }
597
623
  countFunctionDefaultValues(e) {
598
- let r = 0;
624
+ let t = 0;
599
625
  const i = /* @__PURE__ */ new Set();
600
626
  function s(n) {
601
627
  if (!i.has(n) && (Array.isArray(n) || n !== null && typeof n == "object")) {
602
628
  i.add(n);
603
629
  for (const a in n)
604
- n.hasOwnProperty(a) && (a === "defaultValue" && typeof n[a] == "function" && !n[a].toString().includes("[native code]") && r++, s(n[a]));
630
+ n.hasOwnProperty(a) && (a === "defaultValue" && typeof n[a] == "function" && !n[a].toString().includes("[native code]") && t++, s(n[a]));
605
631
  }
606
632
  }
607
- return s(e), r;
633
+ return s(e), t;
608
634
  }
609
635
  // 派生过程,用于外部应用
610
- parseSchemas(e, r) {
636
+ parseSchemas(e, t) {
611
637
  o.isArrayEmpty(this.processedSchemas.value) && (this.baseDefaultValueFunctionsLength = this.countFunctionDefaultValues(
612
638
  P(e)
613
- ), this.processedSchemas.value = this.initSchemas(e)), this.parse(e, r);
639
+ ), this.processedSchemas.value = this.initSchemas(e)), this.parse(e, t);
614
640
  }
615
641
  parseStable(e) {
616
- const r = {};
642
+ const t = {};
617
643
  if (!o.isUndefined(e.stable))
618
- r[e.key] = this.parseStable(e.stable);
644
+ t[e.key] = this.parseStable(e.stable);
619
645
  else
620
646
  return e;
621
- return r;
647
+ return t;
622
648
  }
623
649
  // 对于稳定初始化更新的抽象
624
650
  stableUpdater(e = []) {
625
651
  if (e.every(Boolean)) {
626
- const r = x(this.processedSchemas.value);
627
- !o.isProcessInprogress(r) && o.isObjectEmpty(this.stableModel) && (this.stableUpdaterProcessProgress || (this.stableUpdaterProcessProgress = Array.from({
628
- length: r.length
629
- }).fill(!1)), this.stableUpdaterProcessProgress[this.stableUpdaterTimes] = !0, this.stableUpdaterTimes++, this.modelProcessor(r));
652
+ const t = R(this.processedSchemas.value);
653
+ !o.isProcessInprogress(t) && o.isObjectEmpty(this.stableModel) && (this.stableUpdaterProcessProgress || (this.stableUpdaterProcessProgress = Array.from({
654
+ length: t.length
655
+ }).fill(!1)), this.stableUpdaterProcessProgress[this.stableUpdaterTimes] = !0, this.stableUpdaterTimes++, this.modelProcessor(t));
630
656
  }
631
657
  }
632
658
  // 核心单 schema 处理过程,接收一个对象键值对的数据结构
633
- parseItem(e, r, i) {
659
+ parseItem(e, t, i) {
634
660
  const s = this, n = Array.from({
635
661
  length: Object.keys(e).filter((l) => l !== "children").length
636
662
  }).fill(!1);
637
- this.objectParser({ data: e, index: r, updater: a, parentMeta: i });
663
+ this.objectParser({ data: e, index: t, updater: a, parentMeta: i });
638
664
  function a(l) {
639
665
  const f = l.index, d = l.key, p = l.keyIndex;
640
666
  if (o.isUndefined(l.stable))
641
667
  return;
642
- const m = s.parseStable(l.stable), g = i == null ? void 0 : i.index, C = i == null ? void 0 : i.key;
643
- let v = m;
644
- if (o.isProcessInprogress(v) || (n[p] = !0), i) {
645
- const b = s.processedSchemas.value[g][C][f][d];
646
- b && o.isObject(b) && d !== "component" && (v = h(b, v)), s.processedSchemas.value[g][C][f][d] = v, s.stableUpdater(n);
668
+ const m = s.parseStable(l.stable), y = i == null ? void 0 : i.index, I = i == null ? void 0 : i.key;
669
+ let _ = m;
670
+ if (o.isProcessInprogress(_) || (n[p] = !0), i) {
671
+ const g = s.processedSchemas.value[y][I][f][d];
672
+ g && o.isObject(g) && d !== "component" && (_ = h(g, _)), s.processedSchemas.value[y][I][f][d] = _, s.stableUpdater(n);
647
673
  } else {
648
- const b = s.processedSchemas.value[f][d];
649
- b && o.isObject(b) && d !== "component" && (v = h(b, v)), s.processedSchemas.value[f][d] = v, s.stableUpdater(n);
674
+ const g = s.processedSchemas.value[f][d];
675
+ g && o.isObject(g) && d !== "component" && (_ = h(g, _)), s.processedSchemas.value[f][d] = _, s.stableUpdater(n);
650
676
  }
651
677
  }
652
678
  }
653
679
  // 只做基本的对象 parser
654
680
  objectParser(e) {
655
- const r = e.data;
656
- Object.keys(r).forEach((s, n) => {
681
+ const t = e.data;
682
+ Object.keys(t).forEach((s, n) => {
657
683
  var a, l;
658
684
  if (s === "children")
659
- this.parseSchemas(r[s], {
685
+ this.parseSchemas(t[s], {
660
686
  ...e,
661
687
  key: s,
662
688
  keyIndex: n
@@ -670,16 +696,16 @@ class mr {
670
696
  stable: d
671
697
  });
672
698
  };
673
- o.isFunction(r[s]) ? s !== "defaultValue" ? this.schemaEffect.trackEffect(
699
+ o.isFunction(t[s]) ? s !== "defaultValue" ? this.schemaEffect.trackEffect(
674
700
  () => {
675
701
  if (s === "component") {
676
- const d = r[s](this.getRuntimeMeta());
702
+ const d = t[s](this.getRuntimeMeta());
677
703
  this.promiseFieldParser(d, f, !1, {
678
704
  rootIndex: e.index,
679
705
  parentMeta: e.parentMeta
680
706
  });
681
707
  } else
682
- this.fieldParser(r[s], f, {
708
+ this.fieldParser(t[s], f, {
683
709
  rootIndex: e.index,
684
710
  parentMeta: e.parentMeta
685
711
  });
@@ -692,16 +718,16 @@ class mr {
692
718
  () => {
693
719
  const d = this.schemaEffect.trackEffect(
694
720
  () => {
695
- /\{\s*model\s*\}/.test(r[s].toString()) ? this.fieldParser(
696
- r[s],
721
+ /\{\s*model\s*\}/.test(t[s].toString()) ? this.fieldParser(
722
+ t[s],
697
723
  (p) => {
698
724
  if (!p)
699
725
  return f(p);
700
- this.defaultValueInprogressMap.set(r[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
726
+ this.defaultValueInprogressMap.set(t[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
701
727
  this.defaultValueInprogressMap.values()
702
728
  ).every((m) => {
703
- var g;
704
- return !((g = m == null ? void 0 : m.includes) != null && g.call(m, "undefined"));
729
+ var y;
730
+ return !((y = m == null ? void 0 : m.includes) != null && y.call(m, "undefined"));
705
731
  }) ? (f(p), this.defaultValueEffect.clearEffects(), O(() => {
706
732
  d();
707
733
  })) : f(p);
@@ -711,13 +737,13 @@ class mr {
711
737
  parentMeta: e.parentMeta
712
738
  }
713
739
  ) : this.fieldParser(
714
- r[s],
740
+ t[s],
715
741
  (p) => {
716
- this.defaultValueInprogressMap.set(r[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
742
+ this.defaultValueInprogressMap.set(t[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
717
743
  this.defaultValueInprogressMap.values()
718
744
  ).every((m) => {
719
- var g;
720
- return !((g = m == null ? void 0 : m.includes) != null && g.call(m, "undefined"));
745
+ var y;
746
+ return !((y = m == null ? void 0 : m.includes) != null && y.call(m, "undefined"));
721
747
  }) ? (f(p), this.defaultValueEffect.clearEffects(), O(() => {
722
748
  d();
723
749
  })) : f(p);
@@ -736,74 +762,74 @@ class mr {
736
762
  {
737
763
  lazy: !1
738
764
  }
739
- ) : s === "component" || s === "slots" || s === "runtime" ? this.promiseFieldParser(r[s], f, !1, {
765
+ ) : s === "component" || s === "slots" || s === "runtime" ? this.promiseFieldParser(t[s], f, !1, {
740
766
  rootIndex: e.index,
741
767
  parentMeta: e.parentMeta
742
- }) : this.fieldParser(r[s], f, {
768
+ }) : this.fieldParser(t[s], f, {
743
769
  rootIndex: e.index,
744
770
  parentMeta: e.parentMeta
745
771
  });
746
772
  }
747
773
  });
748
774
  }
749
- promiseFieldParser(e, r, i, s) {
775
+ promiseFieldParser(e, t, i, s) {
750
776
  o.isPromise(e) ? e.then((n) => {
751
777
  o.isString(n) && (n = X(n, "")), i && o.isObject(n) && !o.isNativeObject(n) ? this.objectParser({
752
778
  data: n,
753
- updater: r,
779
+ updater: t,
754
780
  index: s.rootIndex,
755
781
  parentMeta: s.parentMeta
756
- }) : r(n);
782
+ }) : t(n);
757
783
  }) : (o.isString(e) && (e = X(e, "")), i && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
758
784
  data: e,
759
- updater: r,
785
+ updater: t,
760
786
  index: s.rootIndex,
761
787
  parentMeta: s.parentMeta
762
- }) : r(e));
788
+ }) : t(e));
763
789
  }
764
790
  // 对任意对象中单个字段的 parse: 做基本处理
765
- fieldParser(e, r, i, s = !0) {
791
+ fieldParser(e, t, i, s = !0) {
766
792
  if (o.isFunction(e))
767
793
  if (e.name.startsWith("__proform_raw_"))
768
- r(
794
+ t(
769
795
  (...n) => e({
770
796
  rawArgs: n,
771
797
  ...this.getRuntimeMeta()
772
798
  })
773
799
  );
774
800
  else if (e.name.startsWith("__proform_structured_path_parsing_mark_"))
775
- r(e);
801
+ t(e);
776
802
  else if (e.__proform_cached_result) {
777
803
  const n = e.__proform_cached_result;
778
- this.promiseFieldParser(n, r, s, i);
804
+ this.promiseFieldParser(n, t, s, i);
779
805
  } else {
780
806
  const n = e(this.getRuntimeMeta());
781
- e.name.startsWith("__proform_onetime_") && (e.__proform_cached_result = n), this.promiseFieldParser(n, r, s, i);
807
+ e.name.startsWith("__proform_onetime_") && (e.__proform_cached_result = n), this.promiseFieldParser(n, t, s, i);
782
808
  }
783
809
  else
784
- q(e) ? _(
810
+ F(e) ? v(
785
811
  () => e.value,
786
812
  () => {
787
813
  o.isUndefined(e.value) || (s && o.isObject(e.value) && !o.isNativeObject(e.value) ? this.objectParser({
788
814
  data: e.value,
789
- updater: r,
815
+ updater: t,
790
816
  index: i.rootIndex,
791
817
  parentMeta: i.parentMeta
792
- }) : r(e.value));
818
+ }) : t(e.value));
793
819
  },
794
820
  {
795
821
  immediate: !0,
796
822
  deep: !0
797
823
  }
798
- ) : U(e) ? _(
824
+ ) : j(e) ? v(
799
825
  () => e,
800
826
  () => {
801
827
  o.isUndefined(e) || (s && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
802
828
  data: e,
803
- updater: r,
829
+ updater: t,
804
830
  index: i.rootIndex,
805
831
  parentMeta: i.parentMeta
806
- }) : r(e));
832
+ }) : t(e));
807
833
  },
808
834
  {
809
835
  immediate: !0,
@@ -811,37 +837,37 @@ class mr {
811
837
  }
812
838
  ) : s && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
813
839
  data: e,
814
- updater: r,
840
+ updater: t,
815
841
  index: i.rootIndex,
816
842
  parentMeta: i.parentMeta
817
- }) : r(e);
843
+ }) : t(e);
818
844
  }
819
845
  modelProcessor(e) {
820
846
  e.map(
821
- (r) => this.createModel(r, this.processedModel.value)
847
+ (t) => this.createModel(t, this.processedModel.value)
822
848
  ), o.isObjectEmpty(this.stableModel) && this.stableUpdaterProcessProgress.every(Boolean) && this.defaultValueEffect.effects.size === 0 && (this.stableModel = P(this.processedModel.value), this.runtimeCore.hydrateEffect.triggerEffects(), this.runtimeCore.hydrateEffect.clearEffects());
823
849
  }
824
- setModel(e, r, i) {
825
- o.isFunction(r) ? D(e, r(), i) : e[r] = i;
850
+ setModel(e, t, i) {
851
+ o.isFunction(t) ? D(e, t(), i) : e[t] = i;
826
852
  }
827
- createModel(e, r) {
828
- if (o.isListSchema(e) && (r[e.field] || this.setModel(r, e.field, [{}]), e.children.forEach((i) => {
829
- this.createModel(i, r[e.field][0]);
853
+ createModel(e, t) {
854
+ if (o.isListSchema(e) && (t[e.field] || this.setModel(t, e.field, [{}]), e.children.forEach((i) => {
855
+ this.createModel(i, t[e.field][0]);
830
856
  })), o.isGroupSchema(e) && e.children.forEach((i) => {
831
- this.createModel(i, r);
857
+ this.createModel(i, t);
832
858
  }), o.isItemSchema(e))
833
859
  if ("defaultValue" in e)
834
- this.setModel(r, e.field, e.defaultValue);
860
+ this.setModel(t, e.field, e.defaultValue);
835
861
  else {
836
- if (o.isFunction(e.field) && L(r, e.field()))
862
+ if (o.isFunction(e.field) && L(t, e.field()))
837
863
  return;
838
- if (o.isString(e.field) && r[e.field])
864
+ if (o.isString(e.field) && t[e.field])
839
865
  return;
840
- this.setModel(r, e.field, void 0);
866
+ this.setModel(t, e.field, void 0);
841
867
  }
842
868
  }
843
869
  }
844
- class w {
870
+ class x {
845
871
  static getFormContainer({ ui: e } = {}) {
846
872
  return c.presets.uiPresets[e ?? c.presets.ui].container.Form;
847
873
  }
@@ -861,44 +887,44 @@ class w {
861
887
  return c.presets.uiPresets[e ?? c.presets.ui].container.ListItem;
862
888
  }
863
889
  }
864
- class yr {
890
+ class vr {
865
891
  constructor(e) {
866
892
  this.ui = e;
867
893
  }
868
894
  getRuntimeNative() {
869
- var r;
870
- return (r = c.presets.uiPresets[this.ui]) == null ? void 0 : r.native;
895
+ var t;
896
+ return (t = c.presets.uiPresets[this.ui]) == null ? void 0 : t.native;
871
897
  }
872
898
  getRuntimeField(e) {
873
899
  var s;
874
- const r = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[c.getUI(this.ui)];
875
- return (r == null ? void 0 : r.getRuntimeField(e)) ?? (i == null ? void 0 : i.getRuntimeField(e));
900
+ const t = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[c.getUI(this.ui)];
901
+ return (t == null ? void 0 : t.getRuntimeField(e)) ?? (i == null ? void 0 : i.getRuntimeField(e));
876
902
  }
877
903
  getRuntimeRequired(e) {
878
904
  var s;
879
- const r = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[c.getUI(this.ui)];
880
- return (r == null ? void 0 : r.getRuntimeRequired(e)) ?? (i == null ? void 0 : i.getRuntimeRequired(e));
905
+ const t = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[c.getUI(this.ui)];
906
+ return (t == null ? void 0 : t.getRuntimeRequired(e)) ?? (i == null ? void 0 : i.getRuntimeRequired(e));
881
907
  }
882
908
  getFormModelPropName() {
883
909
  var i;
884
- const e = (i = c.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, r = I.adapters[c.getUI(this.ui)];
885
- return (e == null ? void 0 : e.getFormModelPropName()) ?? (r == null ? void 0 : r.getFormModelPropName());
910
+ const e = (i = c.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, t = C.adapters[c.getUI(this.ui)];
911
+ return (e == null ? void 0 : e.getFormModelPropName()) ?? (t == null ? void 0 : t.getFormModelPropName());
886
912
  }
887
913
  formComponentRenderer(e) {
888
914
  var s;
889
- const r = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[c.getUI(this.ui)];
890
- return (r == null ? void 0 : r.formComponentRenderer(e)) ?? (i == null ? void 0 : i.formComponentRenderer(e));
915
+ const t = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[c.getUI(this.ui)];
916
+ return (t == null ? void 0 : t.formComponentRenderer(e)) ?? (i == null ? void 0 : i.formComponentRenderer(e));
891
917
  }
892
918
  clearValidate(e) {
893
919
  var s;
894
- const r = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[c.getUI(this.ui)];
895
- return (r == null ? void 0 : r.clearValidate(e)) ?? (i == null ? void 0 : i.clearValidate(e));
920
+ const t = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[c.getUI(this.ui)];
921
+ return (t == null ? void 0 : t.clearValidate(e)) ?? (i == null ? void 0 : i.clearValidate(e));
896
922
  }
897
923
  }
898
- function br(t) {
899
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !Be(t);
924
+ function gr(r) {
925
+ return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !He(r);
900
926
  }
901
- class gr {
927
+ class yr {
902
928
  constructor(e) {
903
929
  u(this, "schemas", z([]));
904
930
  u(this, "model", z({}));
@@ -909,10 +935,10 @@ class gr {
909
935
  });
910
936
  u(this, "formRef", z(null));
911
937
  u(this, "hydrateEffect", new Y());
912
- u(this, "native", H({}));
938
+ u(this, "native", Pe({}));
913
939
  u(this, "grid", {});
914
940
  u(this, "runtime", {});
915
- u(this, "globalNativeFormOverride", H({
941
+ u(this, "globalNativeFormOverride", Pe({
916
942
  props: {
917
943
  Form: {},
918
944
  FormItem: {}
@@ -922,96 +948,114 @@ class gr {
922
948
  FormItem: {}
923
949
  }
924
950
  }));
925
- u(this, "shared", H({}));
926
- this.setup = e, this.processor = new mr(this);
927
- const r = this.setup(this);
928
- if (this.ui = r.ui ?? c.presets.ui, this.runtimeAdapter = new yr(this.ui), Object.assign(this.globalNativeFormOverride, this.runtimeAdapter.getRuntimeNative()), q(r.schemas))
929
- _(
951
+ u(this, "shared", Le({}));
952
+ this.setup = e, this.processor = new br(this);
953
+ const t = this.setup(this);
954
+ if (this.ui = t.ui ?? c.presets.ui, this.runtimeAdapter = new vr(this.ui), Object.assign(this.globalNativeFormOverride, this.runtimeAdapter.getRuntimeNative()), F(t.schemas))
955
+ v(
930
956
  // @ts-expect-error
931
- () => r.schemas.value,
957
+ () => t.schemas.value,
932
958
  () => {
933
- this.processor.parseSchemas(r.schemas.value);
959
+ this.processor.parseSchemas(t.schemas.value);
934
960
  },
935
961
  {
936
962
  deep: !0
937
963
  }
938
964
  );
939
- else if (U(r.schemas)) {
940
- const i = _(() => r.schemas, () => {
941
- this.processor.parseSchemas(r.schemas), O(() => {
965
+ else if (j(t.schemas)) {
966
+ const i = v(() => t.schemas, () => {
967
+ this.processor.parseSchemas(t.schemas), O(() => {
942
968
  i();
943
969
  });
944
970
  }, {
945
971
  deep: !0
946
972
  });
947
973
  } else
948
- this.processor.parseSchemas(r.schemas);
974
+ this.processor.parseSchemas(t.schemas);
949
975
  }
950
976
  getRuntimeMeta() {
951
977
  return {
952
- model: x(P(this.model.value)),
978
+ model: R(P(this.model.value)),
953
979
  reactiveModel: this.model.value,
954
980
  shared: this.shared,
955
981
  // share 增加防抖,当开发者在过程中进行 share 时避免频繁触发爆栈
956
- share: (r) => {
957
- q(r) ? _(() => r.value, () => {
958
- h(this.shared, r.value);
982
+ share: (t) => {
983
+ F(t) ? v(() => t.value, () => {
984
+ h(this.shared, t.value);
959
985
  }, {
960
986
  deep: !0,
961
987
  immediate: !0
962
- }) : U(r) ? _(() => r, () => {
963
- h(this.shared, r);
988
+ }) : j(t) ? v(() => t, () => {
989
+ h(this.shared, t);
964
990
  }, {
965
991
  deep: !0,
966
992
  immediate: !0
967
- }) : h(this.shared, r);
993
+ }) : Object.keys(t).forEach((i) => {
994
+ F(t[i]) ? v(() => t[i].value, () => {
995
+ h(this.shared, {
996
+ [i]: t[i].value
997
+ });
998
+ }, {
999
+ deep: !0,
1000
+ immediate: !0
1001
+ }) : j(t[i]) ? v(() => t[i], () => {
1002
+ h(this.shared, {
1003
+ [i]: t[i]
1004
+ });
1005
+ }, {
1006
+ deep: !0,
1007
+ immediate: !0
1008
+ }) : h(this.shared, {
1009
+ [i]: t[i]
1010
+ });
1011
+ });
968
1012
  }
969
1013
  };
970
1014
  }
971
- runtimeItemProcessor(e, r, i = this.model.value, s) {
972
- var ie, se, ne, oe, ae, le, ue, fe, ce, de, pe, he, me, ye, be, ge, ve;
973
- const n = x(e.component);
1015
+ runtimeItemProcessor(e, t, i = this.model.value, s) {
1016
+ var re, ie, se, ne, oe, ae, le, ue, fe, ce, de, pe, he, me, be, ve, ge;
1017
+ const n = R(e.component);
974
1018
  if (!n)
975
1019
  return;
976
- (se = (ie = e.native) == null ? void 0 : ie.props) != null && se.Form && h(this.globalNativeFormOverride.props.Form, (oe = (ne = e.native) == null ? void 0 : ne.props) == null ? void 0 : oe.Form), (le = (ae = e.native) == null ? void 0 : ae.slots) != null && le.Form && h(this.globalNativeFormOverride.slots.Form, (fe = (ue = e.native) == null ? void 0 : ue.slots) == null ? void 0 : fe.Form);
977
- const a = h(P((de = (ce = this.native) == null ? void 0 : ce.slots) == null ? void 0 : de.FormItem) ?? {}, (he = (pe = e.native) == null ? void 0 : pe.slots) == null ? void 0 : he.FormItem), l = {
1020
+ (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);
1021
+ const a = h(P((ce = (fe = this.native) == null ? void 0 : fe.slots) == null ? void 0 : ce.FormItem) ?? {}, (pe = (de = e.native) == null ? void 0 : de.slots) == null ? void 0 : pe.FormItem), l = {
978
1022
  display: "grid",
979
1023
  gridColumn: "1 / -1",
980
1024
  ...e.grid
981
- }, f = h(P((ye = (me = this.native) == null ? void 0 : me.props) == null ? void 0 : ye.FormItem) ?? {}, (ge = (be = e.native) == null ? void 0 : be.props) == null ? void 0 : ge.FormItem), d = this.runtimeAdapter.getRuntimeField({
1025
+ }, f = h(P((me = (he = this.native) == null ? void 0 : he.props) == null ? void 0 : me.FormItem) ?? {}, (ve = (be = e.native) == null ? void 0 : be.props) == null ? void 0 : ve.FormItem), d = this.runtimeAdapter.getRuntimeField({
982
1026
  schema: e,
983
1027
  parentSchema: s,
984
- index: r
985
- }), p = n.name, m = e.componentProps ?? {}, g = I.placeholderPresetByComponentName;
986
- let C = e.placeholder, v = e.show;
987
- v === void 0 && (v = !0);
988
- let b = e.label ?? "", S;
989
- if (e.runtime ? S = e.runtime : S = (s == null ? void 0 : s.runtime) ?? this.runtime, !o.isUndefined(r) && !o.isObjectEmpty(S) && (b = X((ve = S == null ? void 0 : S.customizeListItemLabel) == null ? void 0 : ve.call(S, e.label ?? "", r + 1), "")), !C) {
990
- let $ = "请输入";
991
- o.isUndefined(p) ? C = `${$}${b}` : /* @ts-expect-error */ g[p.toLowerCase()] ? ($ = // @ts-expect-error
992
- g[p.toLowerCase()], C = `${$}${b}`) : (Object.keys(g).forEach((_e) => {
993
- p.toLowerCase().includes(_e.toLowerCase()) && ($ = g[_e]);
994
- }), C = `${$}${b}`);
1028
+ index: t
1029
+ }), p = n.name, m = e.componentProps ?? {}, y = C.placeholderPresetByComponentName;
1030
+ let I = e.placeholder, _ = e.show;
1031
+ _ === void 0 && (_ = !0);
1032
+ let g = e.label ?? "", S;
1033
+ if (e.runtime ? S = e.runtime : S = (s == null ? void 0 : s.runtime) ?? this.runtime, !o.isUndefined(t) && !o.isObjectEmpty(S) && (g = X((ge = S == null ? void 0 : S.customizeListItemLabel) == null ? void 0 : ge.call(S, e.label ?? "", t + 1), "")), !I) {
1034
+ let N = "请输入";
1035
+ o.isUndefined(p) ? I = `${N}${g}` : /* @ts-expect-error */ y[p.toLowerCase()] ? (N = // @ts-expect-error
1036
+ y[p.toLowerCase()], I = `${N}${g}`) : (Object.keys(y).forEach((ye) => {
1037
+ p.toLowerCase().includes(ye.toLowerCase()) && (N = y[ye]);
1038
+ }), I = `${N}${g}`);
995
1039
  }
996
1040
  const $e = this.runtimeAdapter.getRuntimeRequired({
997
1041
  ...e,
998
- label: b
999
- }), Ve = w.getItemContainer(this), Ne = w.getFormItemContainer(this), qe = this, Ue = e.componentSlots;
1000
- return y("div", {
1042
+ label: g
1043
+ }), Ve = x.getItemContainer(this), Ne = x.getFormItemContainer(this), qe = this, Ue = e.componentSlots;
1044
+ return b("div", {
1001
1045
  style: l
1002
- }, [y(Ve, {
1003
- show: v
1046
+ }, [b(Ve, {
1047
+ show: _
1004
1048
  }, {
1005
1049
  default() {
1006
- return v && y(Ne, N(f, {
1007
- label: `${b ? `${b}:` : ""}`
1050
+ return _ && b(Ne, U(f, {
1051
+ label: `${g ? `${g}:` : ""}`
1008
1052
  }, d, $e), {
1009
1053
  default() {
1010
1054
  return qe.runtimeAdapter.formComponentRenderer({
1011
1055
  Component: n,
1012
1056
  schema: e,
1013
1057
  baseModel: i,
1014
- placeholder: C,
1058
+ placeholder: I,
1015
1059
  componentSlots: Ue,
1016
1060
  props: m
1017
1061
  });
@@ -1022,35 +1066,35 @@ class gr {
1022
1066
  })]);
1023
1067
  }
1024
1068
  runtimeGroupProcessor(e) {
1025
- let r;
1069
+ let t;
1026
1070
  const i = {
1027
1071
  display: "grid",
1028
1072
  gridColumn: "1 / -1",
1029
1073
  ...e.grid
1030
- }, s = w.getGroupContainer(this);
1074
+ }, s = x.getGroupContainer(this);
1031
1075
  let n = e.show;
1032
- return n === void 0 && (n = !0), y("div", {
1076
+ return n === void 0 && (n = !0), b("div", {
1033
1077
  style: i
1034
- }, [n && y(s, {
1078
+ }, [n && b(s, {
1035
1079
  schema: e
1036
- }, br(r = e.children.map((a) => this.runtimeItemProcessor(a))) ? r : {
1037
- default: () => [r]
1080
+ }, gr(t = e.children.map((a) => this.runtimeItemProcessor(a))) ? t : {
1081
+ default: () => [t]
1038
1082
  })]);
1039
1083
  }
1040
1084
  addListItem(e) {
1041
- var r, i;
1042
- if (!((r = this.processor.stableModel[e.field]) != null && r[0]))
1085
+ var t, i;
1086
+ if (!((t = this.processor.stableModel[e.field]) != null && t[0]))
1043
1087
  return Promise.reject({
1044
1088
  code: "0001",
1045
1089
  message: "异步默认值数据正在处理中,请您耐心等待... "
1046
1090
  });
1047
1091
  (i = this.processor.stableModel[e.field]) != null && i[0] && this.model.value[e.field].push(P(this.processor.stableModel[e.field][0])), this.runtimeAdapter.clearValidate(this);
1048
1092
  }
1049
- deleteListItem(e, r) {
1050
- this.model.value[e.field].splice(r, 1), this.runtimeAdapter.clearValidate(this);
1093
+ deleteListItem(e, t) {
1094
+ this.model.value[e.field].splice(t, 1), this.runtimeAdapter.clearValidate(this);
1051
1095
  }
1052
1096
  runtimeListProcessor(e) {
1053
- const r = {
1097
+ const t = {
1054
1098
  display: "grid",
1055
1099
  gridColumn: "1 / -1",
1056
1100
  ...e.grid
@@ -1058,14 +1102,14 @@ class gr {
1058
1102
  i.model.value[e.field] || (i.model.value[e.field] = [{}]);
1059
1103
  let s = e.show;
1060
1104
  s === void 0 && (s = !0);
1061
- const n = w.getListContainer(this), a = w.getListItemContainer(this);
1062
- return y("div", {
1063
- style: r
1064
- }, [s && y(n, {
1105
+ const n = x.getListContainer(this), a = x.getListItemContainer(this);
1106
+ return b("div", {
1107
+ style: t
1108
+ }, [s && b(n, {
1065
1109
  schema: e
1066
1110
  }, {
1067
1111
  default() {
1068
- return i.model.value[e.field].map((l, f) => y(a, null, {
1112
+ return i.model.value[e.field].map((l, f) => b(a, null, {
1069
1113
  default() {
1070
1114
  return e.children.map((d) => i.runtimeItemProcessor(d, f, l, e));
1071
1115
  },
@@ -1073,25 +1117,25 @@ class gr {
1073
1117
  container: d
1074
1118
  } = {}) {
1075
1119
  var m;
1076
- const p = d ?? y("button", null, null);
1077
- return Le(y(p, {
1120
+ const p = d ?? b("button", null, null);
1121
+ return De(b(p, {
1078
1122
  onClick: () => i.deleteListItem(e, f)
1079
- }, null), [[De, ((m = i.model.value[e.field]) == null ? void 0 : m.length) > 1]]);
1123
+ }, null), [[Ge, ((m = i.model.value[e.field]) == null ? void 0 : m.length) > 1]]);
1080
1124
  }
1081
1125
  }));
1082
1126
  },
1083
1127
  add({
1084
1128
  container: l
1085
1129
  } = {}) {
1086
- const f = l ?? y("button", null, [Ge("添加")]);
1087
- return y(f, {
1130
+ const f = l ?? b("button", null, [Be("添加")]);
1131
+ return b(f, {
1088
1132
  onClick: () => i.addListItem(e)
1089
1133
  }, null);
1090
1134
  }
1091
1135
  })]);
1092
1136
  }
1093
1137
  runtimeProcessor(e) {
1094
- return e.map((r) => (r.type || (r.type = "item"), this.processorBySchemaType[r.type](r)));
1138
+ return e.map((t) => (t.type || (t.type = "item"), this.processorBySchemaType[t.type](t)));
1095
1139
  }
1096
1140
  exec() {
1097
1141
  var l, f, d, p;
@@ -1100,16 +1144,16 @@ class gr {
1100
1144
  gridColumn: "1 / -1",
1101
1145
  gridAutoColumns: "1fr",
1102
1146
  ...this.grid
1103
- }, r = this, i = h(this.globalNativeFormOverride.props.Form, P((f = (l = this.native) == null ? void 0 : l.props) == null ? void 0 : f.Form) ?? {}), s = h(this.globalNativeFormOverride.slots.Form, P((p = (d = this.native) == null ? void 0 : d.slots) == null ? void 0 : p.Form) ?? {}), n = w.getFormContainer(this), a = this.runtimeAdapter.getFormModelPropName();
1104
- return y(n, N(i, {
1147
+ }, t = this, i = h(this.globalNativeFormOverride.props.Form, P((f = (l = this.native) == null ? void 0 : l.props) == null ? void 0 : f.Form) ?? {}), s = h(this.globalNativeFormOverride.slots.Form, P((p = (d = this.native) == null ? void 0 : d.slots) == null ? void 0 : p.Form) ?? {}), n = x.getFormContainer(this), a = this.runtimeAdapter.getFormModelPropName();
1148
+ return b(n, U(i, {
1105
1149
  ref: this.formRef
1106
1150
  }, {
1107
1151
  [a]: this.model.value
1108
1152
  }), {
1109
1153
  default() {
1110
- return y("div", {
1154
+ return b("div", {
1111
1155
  style: e
1112
- }, [r.runtimeProcessor(r.schemas.value)]);
1156
+ }, [t.runtimeProcessor(t.schemas.value)]);
1113
1157
  },
1114
1158
  ...s
1115
1159
  });
@@ -1117,247 +1161,247 @@ class gr {
1117
1161
  }
1118
1162
  class c {
1119
1163
  static getPreset(e) {
1120
- var r, i, s;
1121
- 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];
1164
+ var t, i, s;
1165
+ return (i = (t = this.presets.uiPresets) == null ? void 0 : t[e]) != null && i.extend ? this.presets.uiPresets[(s = this.presets.uiPresets[e]) == null ? void 0 : s.extend] : this.presets.uiPresets[e];
1122
1166
  }
1123
1167
  static getUI(e) {
1124
- var r, i, s;
1125
- 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;
1168
+ var t, i, s;
1169
+ return (i = (t = this.presets.uiPresets) == null ? void 0 : t[e]) != null && i.extend ? (s = this.presets.uiPresets[e]) == null ? void 0 : s.extend : e;
1126
1170
  }
1127
1171
  }
1128
1172
  u(c, "presets");
1129
1173
  function W({
1130
- parentSchema: t,
1174
+ parentSchema: r,
1131
1175
  schema: e,
1132
- index: r
1176
+ index: t
1133
1177
  }) {
1134
- return t ? `${t.field}.${r}.${e.field}` : e.field;
1178
+ return r ? `${r.field}.${t}.${e.field}` : e.field;
1135
1179
  }
1136
- const vr = {
1180
+ const _r = {
1137
1181
  ArcoVue: {
1138
- getRuntimeField(t) {
1139
- const e = W(t);
1182
+ getRuntimeField(r) {
1183
+ const e = W(r);
1140
1184
  return o.isFunction(e) ? {
1141
1185
  field: e()
1142
1186
  } : {
1143
1187
  field: e
1144
1188
  };
1145
1189
  },
1146
- getRuntimeRequired(t) {
1190
+ getRuntimeRequired(r) {
1147
1191
  var e;
1148
- if (t.required)
1149
- if (!t.rules)
1150
- t.rules = [], t.rules.push({
1192
+ if (r.required)
1193
+ if (!r.rules)
1194
+ r.rules = [], r.rules.push({
1151
1195
  required: !0,
1152
- message: `${t.label}是必填项`
1196
+ message: `${r.label}是必填项`
1153
1197
  });
1154
1198
  else {
1155
- const r = t.rules.findIndex((i) => !o.isUndefined(i.required));
1156
- r !== -1 ? (t.rules[r].required = !0, t.rules[r].message = `${t.label}是必填项`) : t.rules.unshift({
1199
+ const t = r.rules.findIndex((i) => !o.isUndefined(i.required));
1200
+ t !== -1 ? (r.rules[t].required = !0, r.rules[t].message = `${r.label}是必填项`) : r.rules.unshift({
1157
1201
  required: !0,
1158
- message: `${t.label}是必填项`
1202
+ message: `${r.label}是必填项`
1159
1203
  });
1160
1204
  }
1161
- else if (t.rules) {
1162
- const r = (e = t.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
1163
- r !== -1 ? t.rules[r].required = !1 : t.rules.unshift({
1205
+ else if (r.rules) {
1206
+ const t = (e = r.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
1207
+ t !== -1 ? r.rules[t].required = !1 : r.rules.unshift({
1164
1208
  required: !0,
1165
- message: `${t.label}是必填项`
1209
+ message: `${r.label}是必填项`
1166
1210
  });
1167
1211
  }
1168
1212
  return {
1169
- rules: t.rules
1213
+ rules: r.rules
1170
1214
  };
1171
1215
  },
1172
1216
  getFormModelPropName() {
1173
1217
  return "model";
1174
1218
  },
1175
1219
  formComponentRenderer({
1176
- Component: t,
1220
+ Component: r,
1177
1221
  baseModel: e,
1178
- schema: r,
1222
+ schema: t,
1179
1223
  placeholder: i,
1180
1224
  componentSlots: s,
1181
1225
  props: n
1182
1226
  }) {
1183
1227
  let a;
1184
- return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field], y(t, N({
1228
+ return o.isFunction(t.field) ? a = L(e, t.field()) : a = e[t.field], b(r, U({
1185
1229
  modelValue: a,
1186
1230
  "onUpdate:modelValue": (l) => {
1187
- o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
1231
+ o.isFunction(t.field) ? D(e, t.field(), l) : e[t.field] = l;
1188
1232
  },
1189
1233
  placeholder: i
1190
1234
  }, n), {
1191
1235
  ...s
1192
1236
  });
1193
1237
  },
1194
- validateForm(t) {
1195
- return new Promise((e, r) => {
1196
- t.runtimeCore.formRef.value.validate((i) => i ? r(i) : e(t.cleanFallbackFields(x(t.runtimeCore.processor.processedModel.value))));
1238
+ validateForm(r) {
1239
+ return new Promise((e, t) => {
1240
+ r.runtimeCore.formRef.value.validate((i) => i ? t(i) : e(r.cleanFallbackFields(R(r.runtimeCore.processor.processedModel.value))));
1197
1241
  });
1198
1242
  },
1199
- clearValidate(t) {
1200
- var e, r;
1201
- (r = (e = t.formRef.value) == null ? void 0 : e.clearValidate) == null || r.call(e);
1243
+ clearValidate(r) {
1244
+ var e, t;
1245
+ (t = (e = r.formRef.value) == null ? void 0 : e.clearValidate) == null || t.call(e);
1202
1246
  }
1203
1247
  },
1204
1248
  NutUI: {
1205
- getRuntimeField(t) {
1206
- const e = W(t);
1249
+ getRuntimeField(r) {
1250
+ const e = W(r);
1207
1251
  return o.isFunction(e) ? {
1208
1252
  prop: e()
1209
1253
  } : {
1210
1254
  prop: e
1211
1255
  };
1212
1256
  },
1213
- getRuntimeRequired(t) {
1257
+ getRuntimeRequired(r) {
1214
1258
  var e;
1215
- if (t.required)
1216
- if (!t.rules)
1217
- t.rules = [], t.rules.push({
1259
+ if (r.required)
1260
+ if (!r.rules)
1261
+ r.rules = [], r.rules.push({
1218
1262
  required: !0,
1219
- message: `${t.label}是必填项`
1263
+ message: `${r.label}是必填项`
1220
1264
  });
1221
1265
  else {
1222
- const r = t.rules.findIndex((i) => !o.isUndefined(i.required));
1223
- r !== -1 ? (t.rules[r].required = !0, t.rules[r].message = `${t.label}是必填项`) : t.rules.unshift({
1266
+ const t = r.rules.findIndex((i) => !o.isUndefined(i.required));
1267
+ t !== -1 ? (r.rules[t].required = !0, r.rules[t].message = `${r.label}是必填项`) : r.rules.unshift({
1224
1268
  required: !0,
1225
- message: `${t.label}是必填项`
1269
+ message: `${r.label}是必填项`
1226
1270
  });
1227
1271
  }
1228
- else if (t.rules) {
1229
- const r = (e = t.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
1230
- r !== -1 ? t.rules[r].required = !1 : t.rules.unshift({
1272
+ else if (r.rules) {
1273
+ const t = (e = r.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
1274
+ t !== -1 ? r.rules[t].required = !1 : r.rules.unshift({
1231
1275
  required: !0,
1232
- message: `${t.label}是必填项`
1276
+ message: `${r.label}是必填项`
1233
1277
  });
1234
1278
  }
1235
1279
  return {
1236
- rules: t.rules,
1237
- required: t.required
1280
+ rules: r.rules,
1281
+ required: r.required
1238
1282
  };
1239
1283
  },
1240
1284
  getFormModelPropName() {
1241
1285
  return "modelValue";
1242
1286
  },
1243
1287
  formComponentRenderer({
1244
- Component: t,
1288
+ Component: r,
1245
1289
  baseModel: e,
1246
- schema: r,
1290
+ schema: t,
1247
1291
  placeholder: i,
1248
1292
  componentSlots: s,
1249
1293
  props: n
1250
1294
  }) {
1251
1295
  let a;
1252
- return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field], y(t, N({
1296
+ return o.isFunction(t.field) ? a = L(e, t.field()) : a = e[t.field], b(r, U({
1253
1297
  modelValue: a,
1254
1298
  "onUpdate:modelValue": (l) => {
1255
- o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
1299
+ o.isFunction(t.field) ? D(e, t.field(), l) : e[t.field] = l;
1256
1300
  },
1257
1301
  placeholder: i
1258
1302
  }, n), {
1259
1303
  ...s
1260
1304
  });
1261
1305
  },
1262
- validateForm(t) {
1263
- return new Promise((e, r) => {
1264
- t.runtimeCore.formRef.value.validate().then(({
1306
+ validateForm(r) {
1307
+ return new Promise((e, t) => {
1308
+ r.runtimeCore.formRef.value.validate().then(({
1265
1309
  valid: i,
1266
1310
  errors: s
1267
1311
  }) => {
1268
- i ? e(t.cleanFallbackFields(x(t.runtimeCore.processor.processedModel.value))) : r(s);
1312
+ i ? e(r.cleanFallbackFields(R(r.runtimeCore.processor.processedModel.value))) : t(s);
1269
1313
  });
1270
1314
  });
1271
1315
  },
1272
- clearValidate(t) {
1273
- var e, r;
1274
- (r = (e = t.formRef.value) == null ? void 0 : e.reset) == null || r.call(e);
1316
+ clearValidate(r) {
1317
+ var e, t;
1318
+ (t = (e = r.formRef.value) == null ? void 0 : e.reset) == null || t.call(e);
1275
1319
  }
1276
1320
  },
1277
1321
  NaiveUI: {
1278
- getRuntimeField(t) {
1279
- const e = W(t);
1322
+ getRuntimeField(r) {
1323
+ const e = W(r);
1280
1324
  return o.isFunction(e) ? {
1281
1325
  path: e()
1282
1326
  } : {
1283
1327
  path: e
1284
1328
  };
1285
1329
  },
1286
- getRuntimeRequired(t) {
1330
+ getRuntimeRequired(r) {
1287
1331
  var e;
1288
- if (t.required)
1289
- if (!t.rules)
1290
- t.rules = [], t.rules.push({
1332
+ if (r.required)
1333
+ if (!r.rules)
1334
+ r.rules = [], r.rules.push({
1291
1335
  required: !0,
1292
- message: `${t.label}是必填项`,
1336
+ message: `${r.label}是必填项`,
1293
1337
  trigger: ["input", "blur"]
1294
1338
  });
1295
1339
  else {
1296
- const r = t.rules.findIndex((i) => !o.isUndefined(i.required));
1297
- r !== -1 ? (t.rules[r].required = !0, t.rules[r].message = `${t.label}是必填项`) : t.rules.unshift({
1340
+ const t = r.rules.findIndex((i) => !o.isUndefined(i.required));
1341
+ t !== -1 ? (r.rules[t].required = !0, r.rules[t].message = `${r.label}是必填项`) : r.rules.unshift({
1298
1342
  required: !0,
1299
- message: `${t.label}是必填项`,
1343
+ message: `${r.label}是必填项`,
1300
1344
  trigger: ["input", "blur"]
1301
1345
  });
1302
1346
  }
1303
- else if (t.rules) {
1304
- const r = (e = t.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
1305
- r !== -1 ? t.rules[r].required = !1 : t.rules.unshift({
1347
+ else if (r.rules) {
1348
+ const t = (e = r.rules) == null ? void 0 : e.findIndex((i) => !!i.required);
1349
+ t !== -1 ? r.rules[t].required = !1 : r.rules.unshift({
1306
1350
  required: !0,
1307
- message: `${t.label}是必填项`,
1351
+ message: `${r.label}是必填项`,
1308
1352
  trigger: ["input", "blur"]
1309
1353
  });
1310
1354
  }
1311
1355
  return {
1312
- rule: t.rules
1356
+ rule: r.rules
1313
1357
  };
1314
1358
  },
1315
1359
  getFormModelPropName() {
1316
1360
  return "model";
1317
1361
  },
1318
1362
  formComponentRenderer({
1319
- Component: t,
1363
+ Component: r,
1320
1364
  baseModel: e,
1321
- schema: r,
1365
+ schema: t,
1322
1366
  placeholder: i,
1323
1367
  componentSlots: s,
1324
1368
  props: n
1325
1369
  }) {
1326
1370
  let a;
1327
- return o.isFunction(r.field) ? a = L(e, r.field()) : a = e[r.field], y(t, N({
1371
+ return o.isFunction(t.field) ? a = L(e, t.field()) : a = e[t.field], b(r, U({
1328
1372
  value: a,
1329
1373
  "onUpdate:value": (l) => {
1330
- o.isFunction(r.field) ? D(e, r.field(), l) : e[r.field] = l;
1374
+ o.isFunction(t.field) ? D(e, t.field(), l) : e[t.field] = l;
1331
1375
  },
1332
1376
  placeholder: i
1333
1377
  }, n), {
1334
1378
  ...s
1335
1379
  });
1336
1380
  },
1337
- validateForm(t) {
1338
- return new Promise((e, r) => {
1339
- t.runtimeCore.formRef.value.validate((i) => i ? r(i) : e(t.cleanFallbackFields(x(t.runtimeCore.processor.processedModel.value))));
1381
+ validateForm(r) {
1382
+ return new Promise((e, t) => {
1383
+ r.runtimeCore.formRef.value.validate((i) => i ? t(i) : e(r.cleanFallbackFields(R(r.runtimeCore.processor.processedModel.value))));
1340
1384
  });
1341
1385
  },
1342
- clearValidate(t) {
1343
- var e, r;
1344
- (r = (e = t.formRef.value) == null ? void 0 : e.restoreValidation) == null || r.call(e);
1386
+ clearValidate(r) {
1387
+ var e, t;
1388
+ (t = (e = r.formRef.value) == null ? void 0 : e.restoreValidation) == null || t.call(e);
1345
1389
  }
1346
1390
  }
1347
- }, M = class M {
1391
+ }, E = class E {
1348
1392
  static getPlaceholderPrefixPresetByComponentName() {
1349
1393
  const e = {
1350
1394
  请选择: ["select", "tree"],
1351
1395
  请输入: ["input"]
1352
- }, r = {};
1396
+ }, t = {};
1353
1397
  for (const i in e)
1354
1398
  e[i].forEach((s) => {
1355
- r[s] = i;
1399
+ t[s] = i;
1356
1400
  });
1357
- return r;
1401
+ return t;
1358
1402
  }
1359
1403
  };
1360
- u(M, "schemaPreset", {
1404
+ u(E, "schemaPreset", {
1361
1405
  type: {
1362
1406
  defaultValue: "item"
1363
1407
  },
@@ -1403,32 +1447,32 @@ u(M, "schemaPreset", {
1403
1447
  runtime: {
1404
1448
  default: void 0
1405
1449
  }
1406
- }), u(M, "componentPropsPreset", {
1450
+ }), u(E, "componentPropsPreset", {
1407
1451
  options: {
1408
1452
  defaultValue: []
1409
1453
  }
1410
1454
  }), // 基于基本功能提出基本预设
1411
- u(M, "placeholderPresetByComponentName", M.getPlaceholderPrefixPresetByComponentName());
1412
- let Z = M;
1413
- const I = {
1455
+ u(E, "placeholderPresetByComponentName", E.getPlaceholderPrefixPresetByComponentName());
1456
+ let Z = E;
1457
+ const C = {
1414
1458
  ...Z,
1415
1459
  adapters: {
1416
- ...vr
1460
+ ..._r
1417
1461
  }
1418
- }, Ir = /* @__PURE__ */ ke({
1462
+ }, Ir = /* @__PURE__ */ Ke({
1419
1463
  props: {
1420
1464
  setup: {
1421
1465
  type: Function,
1422
1466
  required: !0
1423
1467
  }
1424
1468
  },
1425
- setup(t) {
1426
- const e = new gr(t.setup);
1469
+ setup(r) {
1470
+ const e = new yr(r.setup);
1427
1471
  return () => e.exec();
1428
1472
  }
1429
1473
  });
1430
- function Cr(t) {
1431
- const e = new He(t);
1474
+ function Sr(r) {
1475
+ const e = new We(r);
1432
1476
  return [
1433
1477
  e.setup.bind(e),
1434
1478
  {
@@ -1440,46 +1484,46 @@ function Cr(t) {
1440
1484
  }
1441
1485
  ];
1442
1486
  }
1443
- function Sr(t) {
1444
- c.presets = t;
1487
+ function Or(r) {
1488
+ c.presets = r;
1445
1489
  }
1446
- function re(t, e) {
1447
- return e === "native" && Object.defineProperty(t, "name", {
1448
- value: `__proform_raw_${t.name}`,
1490
+ function te(r, e) {
1491
+ return e === "native" && Object.defineProperty(r, "name", {
1492
+ value: `__proform_raw_${r.name}`,
1449
1493
  writable: !0
1450
- }), e === "structured_path_parsing_mark" && Object.defineProperty(t, "name", {
1451
- value: `__proform_structured_path_parsing_mark_${t.name}`,
1494
+ }), e === "structured_path_parsing_mark" && Object.defineProperty(r, "name", {
1495
+ value: `__proform_structured_path_parsing_mark_${r.name}`,
1452
1496
  writable: !0
1453
- }), e === "onetime" && Object.defineProperty(t, "name", {
1454
- value: `__proform_onetime_${t.name}`,
1497
+ }), e === "onetime" && Object.defineProperty(r, "name", {
1498
+ value: `__proform_onetime_${r.name}`,
1455
1499
  writable: !0
1456
- }), t;
1500
+ }), r;
1457
1501
  }
1458
- function Or(t) {
1459
- return re(t, "native");
1502
+ function Fr(r) {
1503
+ return te(r, "native");
1460
1504
  }
1461
- function Fr(t) {
1462
- return t.__proform_raw_object = !0, t;
1505
+ function jr(r) {
1506
+ return r.__proform_raw_object = !0, r;
1463
1507
  }
1464
- function jr(t) {
1465
- return re(t, "onetime");
1508
+ function wr(r) {
1509
+ return te(r, "onetime");
1466
1510
  }
1467
- function wr(t) {
1511
+ function Mr(r) {
1468
1512
  function e() {
1469
- return t;
1513
+ return r;
1470
1514
  }
1471
- return re(
1515
+ return te(
1472
1516
  e,
1473
1517
  "structured_path_parsing_mark"
1474
1518
  );
1475
1519
  }
1476
1520
  export {
1477
1521
  Ir as ProForm,
1478
- Or as markNativeFunction,
1479
- Fr as markNativeObject,
1480
- jr as markOnetimeFunction,
1481
- wr as markStructuredPathParsing,
1482
- Cr as useForm,
1483
- Sr as useFormPresetConfigurer,
1484
- re as useModifiers
1522
+ Fr as markNativeFunction,
1523
+ jr as markNativeObject,
1524
+ wr as markOnetimeFunction,
1525
+ Mr as markStructuredPathParsing,
1526
+ Sr as useForm,
1527
+ Or as useFormPresetConfigurer,
1528
+ te as useModifiers
1485
1529
  };