@harbor-design/proform 1.4.20 → 1.4.21

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,72 +1,72 @@
1
- var Ae = Object.defineProperty;
2
- var ke = (r, e, t) => e in r ? Ae(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
- var l = (r, e, t) => (ke(r, typeof e != "symbol" ? e + "" : e, t), t);
4
- import { ref as D, readonly as Ne, nextTick as S, isRef as z, watch as O, isReactive as L, watchEffect as K, toRaw as M, reactive as J, createVNode as m, mergeProps as T, withDirectives as et, vShow as tt, createTextVNode as rt, isVNode as it, defineComponent as st } from "vue";
5
- var nt = typeof global == "object" && global && global.Object === Object && global, ot = typeof self == "object" && self && self.Object === Object && self, re = nt || ot || Function("return this")(), V = re.Symbol, He = Object.prototype, at = He.hasOwnProperty, lt = He.toString, q = V ? V.toStringTag : void 0;
6
- function ut(r) {
7
- var e = at.call(r, q), t = r[q];
1
+ var Qe = Object.defineProperty;
2
+ var Ae = (r, e, t) => e in r ? Qe(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var u = (r, e, t) => (Ae(r, typeof e != "symbol" ? e + "" : e, t), t);
4
+ import { ref as L, readonly as Ve, nextTick as S, isRef as T, watch as E, isReactive as U, watchEffect as K, toRaw as M, reactive as D, createVNode as m, mergeProps as q, withDirectives as ke, vShow as et, createTextVNode as tt, isVNode as rt, defineComponent as it } from "vue";
5
+ var st = typeof global == "object" && global && global.Object === Object && global, nt = typeof self == "object" && self && self.Object === Object && self, re = st || nt || Function("return this")(), $ = re.Symbol, ze = Object.prototype, ot = ze.hasOwnProperty, at = ze.toString, N = $ ? $.toStringTag : void 0;
6
+ function lt(r) {
7
+ var e = ot.call(r, N), t = r[N];
8
8
  try {
9
- r[q] = void 0;
9
+ r[N] = void 0;
10
10
  var i = !0;
11
11
  } catch {
12
12
  }
13
- var s = lt.call(r);
14
- return i && (e ? r[q] = t : delete r[q]), s;
13
+ var s = at.call(r);
14
+ return i && (e ? r[N] = t : delete r[N]), s;
15
15
  }
16
- var ft = Object.prototype, ct = ft.toString;
17
- function dt(r) {
16
+ var ut = Object.prototype, ct = ut.toString;
17
+ function ft(r) {
18
18
  return ct.call(r);
19
19
  }
20
- var pt = "[object Null]", ht = "[object Undefined]", Ue = V ? V.toStringTag : void 0;
21
- function De(r) {
22
- return r == null ? r === void 0 ? ht : pt : Ue && Ue in Object(r) ? ut(r) : dt(r);
20
+ var dt = "[object Null]", ht = "[object Undefined]", Ne = $ ? $.toStringTag : void 0;
21
+ function He(r) {
22
+ return r == null ? r === void 0 ? ht : dt : Ne && Ne in Object(r) ? lt(r) : ft(r);
23
23
  }
24
- function mt(r) {
24
+ function pt(r) {
25
25
  return r != null && typeof r == "object";
26
26
  }
27
- var gt = "[object Symbol]";
27
+ var mt = "[object Symbol]";
28
28
  function ie(r) {
29
- return typeof r == "symbol" || mt(r) && De(r) == gt;
29
+ return typeof r == "symbol" || pt(r) && He(r) == mt;
30
30
  }
31
- function vt(r, e) {
31
+ function gt(r, e) {
32
32
  for (var t = -1, i = r == null ? 0 : r.length, s = Array(i); ++t < i; )
33
33
  s[t] = e(r[t], t, r);
34
34
  return s;
35
35
  }
36
- var se = Array.isArray, bt = 1 / 0, qe = V ? V.prototype : void 0, Te = qe ? qe.toString : void 0;
37
- function Ge(r) {
36
+ var se = Array.isArray, Pt = 1 / 0, Le = $ ? $.prototype : void 0, qe = Le ? Le.toString : void 0;
37
+ function De(r) {
38
38
  if (typeof r == "string")
39
39
  return r;
40
40
  if (se(r))
41
- return vt(r, Ge) + "";
41
+ return gt(r, De) + "";
42
42
  if (ie(r))
43
- return Te ? Te.call(r) : "";
43
+ return qe ? qe.call(r) : "";
44
44
  var e = r + "";
45
- return e == "0" && 1 / r == -bt ? "-0" : e;
45
+ return e == "0" && 1 / r == -Pt ? "-0" : e;
46
46
  }
47
47
  function W(r) {
48
48
  var e = typeof r;
49
49
  return r != null && (e == "object" || e == "function");
50
50
  }
51
- var yt = "[object AsyncFunction]", Pt = "[object Function]", _t = "[object GeneratorFunction]", It = "[object Proxy]";
51
+ var vt = "[object AsyncFunction]", bt = "[object Function]", yt = "[object GeneratorFunction]", _t = "[object Proxy]";
52
52
  function G(r) {
53
53
  if (!W(r))
54
54
  return !1;
55
- var e = De(r);
56
- return e == Pt || e == _t || e == yt || e == It;
55
+ var e = He(r);
56
+ return e == bt || e == yt || e == vt || e == _t;
57
57
  }
58
- var Q = re["__core-js_shared__"], ze = function() {
59
- var r = /[^.]+$/.exec(Q && Q.keys && Q.keys.IE_PROTO || "");
58
+ var J = re["__core-js_shared__"], Te = function() {
59
+ var r = /[^.]+$/.exec(J && J.keys && J.keys.IE_PROTO || "");
60
60
  return r ? "Symbol(src)_1." + r : "";
61
61
  }();
62
62
  function Ct(r) {
63
- return !!ze && ze in r;
63
+ return !!Te && Te in r;
64
64
  }
65
- var St = Function.prototype, Ft = St.toString;
66
- function Et(r) {
65
+ var It = Function.prototype, St = It.toString;
66
+ function Ft(r) {
67
67
  if (r != null) {
68
68
  try {
69
- return Ft.call(r);
69
+ return St.call(r);
70
70
  } catch {
71
71
  }
72
72
  try {
@@ -76,247 +76,247 @@ function Et(r) {
76
76
  }
77
77
  return "";
78
78
  }
79
- var Ot = /[\\^$.*+?()[\]{}|]/g, wt = /^\[object .+?Constructor\]$/, jt = Function.prototype, xt = Object.prototype, $t = jt.toString, Rt = xt.hasOwnProperty, Mt = RegExp(
80
- "^" + $t.call(Rt).replace(Ot, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
79
+ var Ot = /[\\^$.*+?()[\]{}|]/g, Et = /^\[object .+?Constructor\]$/, wt = Function.prototype, jt = Object.prototype, xt = wt.toString, Rt = jt.hasOwnProperty, Mt = RegExp(
80
+ "^" + xt.call(Rt).replace(Ot, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
81
81
  );
82
- function Vt(r) {
82
+ function $t(r) {
83
83
  if (!W(r) || Ct(r))
84
84
  return !1;
85
- var e = G(r) ? Mt : wt;
86
- return e.test(Et(r));
85
+ var e = G(r) ? Mt : Et;
86
+ return e.test(Ft(r));
87
87
  }
88
- function Nt(r, e) {
88
+ function Vt(r, e) {
89
89
  return r == null ? void 0 : r[e];
90
90
  }
91
91
  function ne(r, e) {
92
- var t = Nt(r, e);
93
- return Vt(t) ? t : void 0;
92
+ var t = Vt(r, e);
93
+ return $t(t) ? t : void 0;
94
94
  }
95
- var Le = function() {
95
+ var Ue = function() {
96
96
  try {
97
97
  var r = ne(Object, "defineProperty");
98
98
  return r({}, "", {}), r;
99
99
  } catch {
100
100
  }
101
- }(), Ut = 9007199254740991, qt = /^(?:0|[1-9]\d*)$/;
102
- function Tt(r, e) {
101
+ }(), Nt = 9007199254740991, Lt = /^(?:0|[1-9]\d*)$/;
102
+ function qt(r, e) {
103
103
  var t = typeof r;
104
- return e = e ?? Ut, !!e && (t == "number" || t != "symbol" && qt.test(r)) && r > -1 && r % 1 == 0 && r < e;
104
+ return e = e ?? Nt, !!e && (t == "number" || t != "symbol" && Lt.test(r)) && r > -1 && r % 1 == 0 && r < e;
105
105
  }
106
- function zt(r, e, t) {
107
- e == "__proto__" && Le ? Le(r, e, {
106
+ function Tt(r, e, t) {
107
+ e == "__proto__" && Ue ? Ue(r, e, {
108
108
  configurable: !0,
109
109
  enumerable: !0,
110
110
  value: t,
111
111
  writable: !0
112
112
  }) : r[e] = t;
113
113
  }
114
- function Be(r, e) {
114
+ function Ge(r, e) {
115
115
  return r === e || r !== r && e !== e;
116
116
  }
117
- var Lt = Object.prototype, Ht = Lt.hasOwnProperty;
118
- function Dt(r, e, t) {
117
+ var Ut = Object.prototype, zt = Ut.hasOwnProperty;
118
+ function Ht(r, e, t) {
119
119
  var i = r[e];
120
- (!(Ht.call(r, e) && Be(i, t)) || t === void 0 && !(e in r)) && zt(r, e, t);
120
+ (!(zt.call(r, e) && Ge(i, t)) || t === void 0 && !(e in r)) && Tt(r, e, t);
121
121
  }
122
- var Gt = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Bt = /^\w*$/;
123
- function Kt(r, e) {
122
+ var Dt = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Gt = /^\w*$/;
123
+ function Bt(r, e) {
124
124
  if (se(r))
125
125
  return !1;
126
126
  var t = typeof r;
127
- return t == "number" || t == "symbol" || t == "boolean" || r == null || ie(r) ? !0 : Bt.test(r) || !Gt.test(r) || e != null && r in Object(e);
127
+ return t == "number" || t == "symbol" || t == "boolean" || r == null || ie(r) ? !0 : Gt.test(r) || !Dt.test(r) || e != null && r in Object(e);
128
128
  }
129
- var H = ne(Object, "create");
130
- function Wt() {
131
- this.__data__ = H ? H(null) : {}, this.size = 0;
129
+ var z = ne(Object, "create");
130
+ function Kt() {
131
+ this.__data__ = z ? z(null) : {}, this.size = 0;
132
132
  }
133
- function Xt(r) {
133
+ function Wt(r) {
134
134
  var e = this.has(r) && delete this.__data__[r];
135
135
  return this.size -= e ? 1 : 0, e;
136
136
  }
137
- var Yt = "__lodash_hash_undefined__", Zt = Object.prototype, Jt = Zt.hasOwnProperty;
138
- function Qt(r) {
137
+ var Xt = "__lodash_hash_undefined__", Yt = Object.prototype, Zt = Yt.hasOwnProperty;
138
+ function Jt(r) {
139
139
  var e = this.__data__;
140
- if (H) {
140
+ if (z) {
141
141
  var t = e[r];
142
- return t === Yt ? void 0 : t;
142
+ return t === Xt ? void 0 : t;
143
143
  }
144
- return Jt.call(e, r) ? e[r] : void 0;
144
+ return Zt.call(e, r) ? e[r] : void 0;
145
145
  }
146
- var At = Object.prototype, kt = At.hasOwnProperty;
147
- function er(r) {
146
+ var Qt = Object.prototype, At = Qt.hasOwnProperty;
147
+ function kt(r) {
148
148
  var e = this.__data__;
149
- return H ? e[r] !== void 0 : kt.call(e, r);
149
+ return z ? e[r] !== void 0 : At.call(e, r);
150
150
  }
151
- var tr = "__lodash_hash_undefined__";
152
- function rr(r, e) {
151
+ var er = "__lodash_hash_undefined__";
152
+ function tr(r, e) {
153
153
  var t = this.__data__;
154
- return this.size += this.has(r) ? 0 : 1, t[r] = H && e === void 0 ? tr : e, this;
154
+ return this.size += this.has(r) ? 0 : 1, t[r] = z && e === void 0 ? er : e, this;
155
155
  }
156
- function j(r) {
156
+ function w(r) {
157
157
  var e = -1, t = r == null ? 0 : r.length;
158
158
  for (this.clear(); ++e < t; ) {
159
159
  var i = r[e];
160
160
  this.set(i[0], i[1]);
161
161
  }
162
162
  }
163
- j.prototype.clear = Wt;
164
- j.prototype.delete = Xt;
165
- j.prototype.get = Qt;
166
- j.prototype.has = er;
167
- j.prototype.set = rr;
168
- function ir() {
163
+ w.prototype.clear = Kt;
164
+ w.prototype.delete = Wt;
165
+ w.prototype.get = Jt;
166
+ w.prototype.has = kt;
167
+ w.prototype.set = tr;
168
+ function rr() {
169
169
  this.__data__ = [], this.size = 0;
170
170
  }
171
171
  function X(r, e) {
172
172
  for (var t = r.length; t--; )
173
- if (Be(r[t][0], e))
173
+ if (Ge(r[t][0], e))
174
174
  return t;
175
175
  return -1;
176
176
  }
177
- var sr = Array.prototype, nr = sr.splice;
178
- function or(r) {
177
+ var ir = Array.prototype, sr = ir.splice;
178
+ function nr(r) {
179
179
  var e = this.__data__, t = X(e, r);
180
180
  if (t < 0)
181
181
  return !1;
182
182
  var i = e.length - 1;
183
- return t == i ? e.pop() : nr.call(e, t, 1), --this.size, !0;
183
+ return t == i ? e.pop() : sr.call(e, t, 1), --this.size, !0;
184
184
  }
185
- function ar(r) {
185
+ function or(r) {
186
186
  var e = this.__data__, t = X(e, r);
187
187
  return t < 0 ? void 0 : e[t][1];
188
188
  }
189
- function lr(r) {
189
+ function ar(r) {
190
190
  return X(this.__data__, r) > -1;
191
191
  }
192
- function ur(r, e) {
192
+ function lr(r, e) {
193
193
  var t = this.__data__, i = X(t, r);
194
194
  return i < 0 ? (++this.size, t.push([r, e])) : t[i][1] = e, this;
195
195
  }
196
- function N(r) {
196
+ function V(r) {
197
197
  var e = -1, t = r == null ? 0 : r.length;
198
198
  for (this.clear(); ++e < t; ) {
199
199
  var i = r[e];
200
200
  this.set(i[0], i[1]);
201
201
  }
202
202
  }
203
- N.prototype.clear = ir;
204
- N.prototype.delete = or;
205
- N.prototype.get = ar;
206
- N.prototype.has = lr;
207
- N.prototype.set = ur;
208
- var fr = ne(re, "Map");
203
+ V.prototype.clear = rr;
204
+ V.prototype.delete = nr;
205
+ V.prototype.get = or;
206
+ V.prototype.has = ar;
207
+ V.prototype.set = lr;
208
+ var ur = ne(re, "Map");
209
209
  function cr() {
210
210
  this.size = 0, this.__data__ = {
211
- hash: new j(),
212
- map: new (fr || N)(),
213
- string: new j()
211
+ hash: new w(),
212
+ map: new (ur || V)(),
213
+ string: new w()
214
214
  };
215
215
  }
216
- function dr(r) {
216
+ function fr(r) {
217
217
  var e = typeof r;
218
218
  return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? r !== "__proto__" : r === null;
219
219
  }
220
220
  function Y(r, e) {
221
221
  var t = r.__data__;
222
- return dr(e) ? t[typeof e == "string" ? "string" : "hash"] : t.map;
222
+ return fr(e) ? t[typeof e == "string" ? "string" : "hash"] : t.map;
223
223
  }
224
- function pr(r) {
224
+ function dr(r) {
225
225
  var e = Y(this, r).delete(r);
226
226
  return this.size -= e ? 1 : 0, e;
227
227
  }
228
228
  function hr(r) {
229
229
  return Y(this, r).get(r);
230
230
  }
231
- function mr(r) {
231
+ function pr(r) {
232
232
  return Y(this, r).has(r);
233
233
  }
234
- function gr(r, e) {
234
+ function mr(r, e) {
235
235
  var t = Y(this, r), i = t.size;
236
236
  return t.set(r, e), this.size += t.size == i ? 0 : 1, this;
237
237
  }
238
- function x(r) {
238
+ function j(r) {
239
239
  var e = -1, t = r == null ? 0 : r.length;
240
240
  for (this.clear(); ++e < t; ) {
241
241
  var i = r[e];
242
242
  this.set(i[0], i[1]);
243
243
  }
244
244
  }
245
- x.prototype.clear = cr;
246
- x.prototype.delete = pr;
247
- x.prototype.get = hr;
248
- x.prototype.has = mr;
249
- x.prototype.set = gr;
250
- var vr = "Expected a function";
245
+ j.prototype.clear = cr;
246
+ j.prototype.delete = dr;
247
+ j.prototype.get = hr;
248
+ j.prototype.has = pr;
249
+ j.prototype.set = mr;
250
+ var gr = "Expected a function";
251
251
  function oe(r, e) {
252
252
  if (typeof r != "function" || e != null && typeof e != "function")
253
- throw new TypeError(vr);
253
+ throw new TypeError(gr);
254
254
  var t = function() {
255
255
  var i = arguments, s = e ? e.apply(this, i) : i[0], n = t.cache;
256
256
  if (n.has(s))
257
257
  return n.get(s);
258
- var a = r.apply(this, i);
259
- return t.cache = n.set(s, a) || n, a;
258
+ var o = r.apply(this, i);
259
+ return t.cache = n.set(s, o) || n, o;
260
260
  };
261
- return t.cache = new (oe.Cache || x)(), t;
261
+ return t.cache = new (oe.Cache || j)(), t;
262
262
  }
263
- oe.Cache = x;
264
- var br = 500;
265
- function yr(r) {
263
+ oe.Cache = j;
264
+ var Pr = 500;
265
+ function vr(r) {
266
266
  var e = oe(r, function(i) {
267
- return t.size === br && t.clear(), i;
267
+ return t.size === Pr && t.clear(), i;
268
268
  }), t = e.cache;
269
269
  return e;
270
270
  }
271
- var Pr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, _r = /\\(\\)?/g, Ir = yr(function(r) {
271
+ var br = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, yr = /\\(\\)?/g, _r = vr(function(r) {
272
272
  var e = [];
273
- return r.charCodeAt(0) === 46 && e.push(""), r.replace(Pr, function(t, i, s, n) {
274
- e.push(s ? n.replace(_r, "$1") : i || t);
273
+ return r.charCodeAt(0) === 46 && e.push(""), r.replace(br, function(t, i, s, n) {
274
+ e.push(s ? n.replace(yr, "$1") : i || t);
275
275
  }), e;
276
276
  });
277
277
  function Cr(r) {
278
- return r == null ? "" : Ge(r);
278
+ return r == null ? "" : De(r);
279
279
  }
280
- function Ke(r, e) {
281
- return se(r) ? r : Kt(r, e) ? [r] : Ir(Cr(r));
280
+ function Be(r, e) {
281
+ return se(r) ? r : Bt(r, e) ? [r] : _r(Cr(r));
282
282
  }
283
- var Sr = 1 / 0;
284
- function We(r) {
283
+ var Ir = 1 / 0;
284
+ function Ke(r) {
285
285
  if (typeof r == "string" || ie(r))
286
286
  return r;
287
287
  var e = r + "";
288
- return e == "0" && 1 / r == -Sr ? "-0" : e;
288
+ return e == "0" && 1 / r == -Ir ? "-0" : e;
289
289
  }
290
- function Fr(r, e) {
291
- e = Ke(e, r);
290
+ function Sr(r, e) {
291
+ e = Be(e, r);
292
292
  for (var t = 0, i = e.length; r != null && t < i; )
293
- r = r[We(e[t++])];
293
+ r = r[Ke(e[t++])];
294
294
  return t && t == i ? r : void 0;
295
295
  }
296
296
  function B(r, e, t) {
297
- var i = r == null ? void 0 : Fr(r, e);
297
+ var i = r == null ? void 0 : Sr(r, e);
298
298
  return i === void 0 ? t : i;
299
299
  }
300
- function Er(r, e, t, i) {
300
+ function Fr(r, e, t, i) {
301
301
  if (!W(r))
302
302
  return r;
303
- e = Ke(e, r);
304
- for (var s = -1, n = e.length, a = n - 1, u = r; u != null && ++s < n; ) {
305
- var f = We(e[s]), c = t;
303
+ e = Be(e, r);
304
+ for (var s = -1, n = e.length, o = n - 1, l = r; l != null && ++s < n; ) {
305
+ var f = Ke(e[s]), d = t;
306
306
  if (f === "__proto__" || f === "constructor" || f === "prototype")
307
307
  return r;
308
- if (s != a) {
309
- var p = u[f];
310
- c = i ? i(p, f, u) : void 0, c === void 0 && (c = W(p) ? p : Tt(e[s + 1]) ? [] : {});
308
+ if (s != o) {
309
+ var h = l[f];
310
+ d = i ? i(h, f, l) : void 0, d === void 0 && (d = W(h) ? h : qt(e[s + 1]) ? [] : {});
311
311
  }
312
- Dt(u, f, c), u = u[f];
312
+ Ht(l, f, d), l = l[f];
313
313
  }
314
314
  return r;
315
315
  }
316
- function P(r, e, t) {
317
- return r == null ? r : Er(r, e, t);
316
+ function y(r, e, t) {
317
+ return r == null ? r : Fr(r, e, t);
318
318
  }
319
- class o {
319
+ class a {
320
320
  static typeChecker(e) {
321
321
  return {}.toString.call(e);
322
322
  }
@@ -391,16 +391,16 @@ class o {
391
391
  return !!e.__proform_raw_object;
392
392
  }
393
393
  }
394
- function v(r, ...e) {
394
+ function P(r, ...e) {
395
395
  return e.forEach((t) => {
396
396
  if (Array.isArray(t))
397
397
  r = [...t];
398
398
  else
399
399
  for (const i in t)
400
- t.hasOwnProperty(i) && t[i] !== void 0 && (typeof t[i] == "object" && t[i] !== null && !(t[i] instanceof Date) && !(t[i] instanceof RegExp) ? Array.isArray(t[i]) ? r[i] = [...t[i]] : r[i] = v(r[i] || {}, t[i]) : r[i] = t[i]);
400
+ t.hasOwnProperty(i) && t[i] !== void 0 && (typeof t[i] == "object" && t[i] !== null && !(t[i] instanceof Date) && !(t[i] instanceof RegExp) ? Array.isArray(t[i]) ? r[i] = [...t[i]] : r[i] = P(r[i] || {}, t[i]) : r[i] = t[i]);
401
401
  }), r;
402
402
  }
403
- function I(r) {
403
+ function C(r) {
404
404
  const e = /* @__PURE__ */ new WeakMap();
405
405
  function t(i) {
406
406
  if (i === null || typeof i != "object")
@@ -411,14 +411,14 @@ function I(r) {
411
411
  return new RegExp(i);
412
412
  if (i instanceof Map) {
413
413
  const n = /* @__PURE__ */ new Map();
414
- for (const [a, u] of i)
415
- n.set(t(a), t(u));
414
+ for (const [o, l] of i)
415
+ n.set(t(o), t(l));
416
416
  return n;
417
417
  }
418
418
  if (i instanceof Set) {
419
419
  const n = /* @__PURE__ */ new Set();
420
- for (const a of i)
421
- n.add(t(a));
420
+ for (const o of i)
421
+ n.add(t(o));
422
422
  return n;
423
423
  }
424
424
  if (e.has(i))
@@ -426,8 +426,8 @@ function I(r) {
426
426
  if (Array.isArray(i)) {
427
427
  const n = [];
428
428
  e.set(i, n);
429
- for (let a = 0; a < i.length; a++)
430
- n[a] = t(i[a]);
429
+ for (let o = 0; o < i.length; o++)
430
+ n[o] = t(i[o]);
431
431
  return n;
432
432
  }
433
433
  const s = Object.create(Object.getPrototypeOf(i));
@@ -443,9 +443,9 @@ function k(r, e) {
443
443
  }
444
444
  class Or {
445
445
  constructor(e) {
446
- l(this, "runtimeCore");
447
- l(this, "readonlyReactiveModel", D({}));
448
- l(this, "shareHistory", /* @__PURE__ */ new Map());
446
+ u(this, "runtimeCore");
447
+ u(this, "readonlyReactiveModel", L({}));
448
+ u(this, "shareHistory", /* @__PURE__ */ new Map());
449
449
  this.formCustomization = e;
450
450
  }
451
451
  // happy path, 后续可以完善更多的 fallback 处理,fallback 处理是为了不卡住异步时的首次渲染做的优化
@@ -455,36 +455,36 @@ class Or {
455
455
  })), e;
456
456
  }
457
457
  setup(e) {
458
- return this.runtimeCore = e, this.readonlyReactiveModel.value = Ne(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;
458
+ return this.runtimeCore = e, this.readonlyReactiveModel.value = Ve(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;
459
459
  }
460
460
  submit() {
461
461
  var i;
462
- const e = (i = d.getPreset(this.runtimeCore.ui)) == null ? void 0 : i.adapter, t = C.adapters[d.getUI(this.runtimeCore.ui)];
462
+ const e = (i = c.getPreset(this.runtimeCore.ui)) == null ? void 0 : i.adapter, t = I.adapters[c.getUI(this.runtimeCore.ui)];
463
463
  return (e == null ? void 0 : e.validateForm(this)) ?? (t == null ? void 0 : t.validateForm(this));
464
464
  }
465
465
  hydrate(e) {
466
466
  S(() => {
467
467
  this.runtimeCore.hydrateEffect.trackEffect(
468
468
  () => {
469
- z(e) ? O(
469
+ T(e) ? E(
470
470
  () => e.value,
471
471
  () => {
472
- v(this.runtimeCore.model.value, e.value);
472
+ P(this.runtimeCore.model.value, e.value);
473
473
  },
474
474
  {
475
475
  deep: !0,
476
476
  immediate: !0
477
477
  }
478
- ) : L(e) ? O(
478
+ ) : U(e) ? E(
479
479
  () => e,
480
480
  () => {
481
- v(this.runtimeCore.model.value, e);
481
+ P(this.runtimeCore.model.value, e);
482
482
  },
483
483
  {
484
484
  deep: !0,
485
485
  immediate: !0
486
486
  }
487
- ) : v(this.runtimeCore.model.value, e);
487
+ ) : P(this.runtimeCore.model.value, e);
488
488
  },
489
489
  {
490
490
  lazy: !1
@@ -495,17 +495,17 @@ class Or {
495
495
  share(e) {
496
496
  S(() => {
497
497
  Object.keys(e).forEach((t) => {
498
- z(e[t]) ? K(() => {
499
- P(this.runtimeCore.shared, t, e[t].value), this.shareHistory.get(t) !== e[t].value && (this.shareHistory.set(t, e[t].value), this.runtimeCore.processor.schemaEffect.triggerEffects());
500
- }) : L(e[t]) ? K(() => {
501
- P(this.runtimeCore.shared, t, e[t]), this.shareHistory.get(t) !== e[t] && (this.shareHistory.set(t, e[t]), this.runtimeCore.processor.schemaEffect.triggerEffects());
502
- }) : (P(this.runtimeCore.shared, t, e[t]), this.shareHistory.get(t) !== e[t] && (this.shareHistory.set(t, e[t]), this.runtimeCore.processor.schemaEffect.triggerEffects()));
498
+ T(e[t]) ? K(() => {
499
+ y(this.runtimeCore.shared, t, e[t].value), this.shareHistory.get(t) !== e[t].value && (this.shareHistory.set(t, e[t].value), this.runtimeCore.processor.schemaEffect.triggerEffects());
500
+ }) : U(e[t]) ? K(() => {
501
+ y(this.runtimeCore.shared, t, e[t]), this.shareHistory.get(t) !== e[t] && (this.shareHistory.set(t, e[t]), this.runtimeCore.processor.schemaEffect.triggerEffects());
502
+ }) : (y(this.runtimeCore.shared, t, e[t]), this.shareHistory.get(t) !== e[t] && (this.shareHistory.set(t, e[t]), this.runtimeCore.processor.schemaEffect.triggerEffects()));
503
503
  });
504
504
  });
505
505
  }
506
506
  subscribeModel(e) {
507
507
  S(() => {
508
- const t = O(
508
+ const t = E(
509
509
  () => this.readonlyReactiveModel.value,
510
510
  (i) => {
511
511
  e(i, {
@@ -526,17 +526,17 @@ class Or {
526
526
  }
527
527
  resetModel() {
528
528
  var e;
529
- (e = this.runtimeCore) != null && e.model.value && (this.runtimeCore.model.value = I(
529
+ (e = this.runtimeCore) != null && e.model.value && (this.runtimeCore.model.value = C(
530
530
  this.runtimeCore.processor.stableModel
531
- ), this.readonlyReactiveModel.value = Ne(this.runtimeCore.model.value), this.runtimeCore.runtimeAdapter.clearValidate(this.runtimeCore));
531
+ ), this.readonlyReactiveModel.value = Ve(this.runtimeCore.model.value), this.runtimeCore.runtimeAdapter.clearValidate(this.runtimeCore));
532
532
  }
533
533
  }
534
534
  class ee {
535
535
  constructor() {
536
- l(this, "effects", /* @__PURE__ */ new Set());
537
- l(this, "tempClonedEffects", /* @__PURE__ */ new Set());
538
- l(this, "identifierMap", /* @__PURE__ */ new Map());
539
- l(this, "timer");
536
+ u(this, "effects", /* @__PURE__ */ new Set());
537
+ u(this, "tempClonedEffects", /* @__PURE__ */ new Set());
538
+ u(this, "identifierMap", /* @__PURE__ */ new Map());
539
+ u(this, "timer");
540
540
  }
541
541
  clearEffects() {
542
542
  this.effects.clear();
@@ -550,26 +550,26 @@ class ee {
550
550
  return t.identifier ? this.identifierMap.get(t.identifier) || (this.identifierMap.set(t.identifier, !0), !t.lazy && e(), this.effects.add(e)) : (!t.lazy && e(), this.effects.add(e)), () => this.effects.delete(e);
551
551
  }
552
552
  }
553
- class wr {
553
+ class Er {
554
554
  constructor(e) {
555
- l(this, "runtimeCore");
556
- l(this, "processedSchemas");
557
- l(this, "processedModel");
558
- l(this, "getRuntimeMeta");
559
- l(this, "stableSchemas", []);
560
- l(this, "stableModel", {});
561
- l(this, "schemaPreset", C.schemaPreset);
562
- l(this, "componentPropsPreset", C.componentPropsPreset);
563
- l(this, "stableUpdaterProcessProgress");
564
- l(this, "stableUpdaterTimes", 0);
565
- l(this, "schemaEffect", new ee());
566
- l(this, "defaultValueEffect", new ee());
567
- l(this, "defaultValueInprogressMap", /* @__PURE__ */ new Map());
568
- l(this, "baseDefaultValueFunctionsLength");
569
- l(this, "isModelInitialized", !0);
570
- l(this, "schemaEffectHistory", /* @__PURE__ */ new Map());
571
- l(this, "stableUpdaterHistory", /* @__PURE__ */ new Map());
572
- this.runtimeCore = e, this.processedSchemas = e.schemas, this.processedModel = e.model, this.getRuntimeMeta = e.getRuntimeMeta.bind(e), O(
555
+ u(this, "runtimeCore");
556
+ u(this, "processedSchemas");
557
+ u(this, "processedModel");
558
+ u(this, "getRuntimeMeta");
559
+ u(this, "stableSchemas", []);
560
+ u(this, "stableModel", {});
561
+ u(this, "schemaPreset", I.schemaPreset);
562
+ u(this, "componentPropsPreset", I.componentPropsPreset);
563
+ u(this, "stableUpdaterProcessProgress");
564
+ u(this, "stableUpdaterTimes", 0);
565
+ u(this, "schemaEffect", new ee());
566
+ u(this, "defaultValueEffect", new ee());
567
+ u(this, "defaultValueInprogressMap", /* @__PURE__ */ new Map());
568
+ u(this, "baseDefaultValueFunctionsLength");
569
+ u(this, "isModelInitialized", !0);
570
+ u(this, "schemaEffectHistory", /* @__PURE__ */ new Map());
571
+ u(this, "stableUpdaterHistory", /* @__PURE__ */ new Map());
572
+ this.runtimeCore = e, this.processedSchemas = e.schemas, this.processedModel = e.model, this.getRuntimeMeta = e.getRuntimeMeta.bind(e), E(
573
573
  () => this.processedModel.value,
574
574
  () => {
575
575
  this.schemaEffect.triggerEffects();
@@ -598,21 +598,21 @@ class wr {
598
598
  function s(n) {
599
599
  if (!i.has(n) && (Array.isArray(n) || n !== null && typeof n == "object")) {
600
600
  i.add(n);
601
- for (const a in n)
602
- n.hasOwnProperty(a) && (a === "defaultValue" && typeof n[a] == "function" && !n[a].toString().includes("[native code]") && t++, s(n[a]));
601
+ for (const o in n)
602
+ n.hasOwnProperty(o) && (o === "defaultValue" && typeof n[o] == "function" && !n[o].toString().includes("[native code]") && t++, s(n[o]));
603
603
  }
604
604
  }
605
605
  return s(e), t;
606
606
  }
607
607
  // 派生过程,用于外部应用
608
608
  parseSchemas(e, t) {
609
- o.isArrayEmpty(this.processedSchemas.value) && (this.baseDefaultValueFunctionsLength = this.countFunctionDefaultValues(
610
- I(e)
609
+ a.isArrayEmpty(this.processedSchemas.value) && (this.baseDefaultValueFunctionsLength = this.countFunctionDefaultValues(
610
+ C(e)
611
611
  ), this.processedSchemas.value = this.initSchemas(e)), this.parse(e, t);
612
612
  }
613
613
  parseStable(e) {
614
614
  const t = {};
615
- if (!o.isUndefined(e.stable) && !o.isNull(e.stable))
615
+ if (!a.isUndefined(e.stable) && !a.isNull(e.stable))
616
616
  t[e.key] = this.parseStable(e.stable);
617
617
  else
618
618
  return e;
@@ -621,45 +621,45 @@ class wr {
621
621
  // 对于稳定初始化更新的抽象
622
622
  stableUpdater(e = [], t, i, s, n) {
623
623
  if (e.every(Boolean)) {
624
- const a = M(this.processedSchemas.value);
625
- !o.isProcessInprogress(a) && o.isObjectEmpty(this.stableModel), !this.stableUpdaterHistory.get(
624
+ const o = M(this.processedSchemas.value);
625
+ !a.isProcessInprogress(o) && a.isObjectEmpty(this.stableModel), !this.stableUpdaterHistory.get(
626
626
  `${t == null ? void 0 : t.key}parentIndex:${t == null ? void 0 : t.index}childIndex:${i}${s}${n}`
627
627
  ) && (this.stableUpdaterHistory.set(
628
628
  `${t == null ? void 0 : t.key}parentIndex:${t == null ? void 0 : t.index}childIndex:${i}${s}${n}`,
629
629
  !0
630
630
  ), this.stableUpdaterProcessProgress || (this.stableUpdaterProcessProgress = Array.from({
631
- length: a.length
632
- }).fill(!1)), this.stableUpdaterProcessProgress[this.stableUpdaterTimes] = !0, this.stableUpdaterTimes++, this.modelProcessor(a));
631
+ length: o.length
632
+ }).fill(!1)), this.stableUpdaterProcessProgress[this.stableUpdaterTimes] = !0, this.stableUpdaterTimes++, this.modelProcessor(o));
633
633
  }
634
634
  }
635
635
  // 核心单 schema 处理过程,接收一个对象键值对的数据结构
636
636
  parseItem(e, t, i) {
637
637
  const s = this, n = Array.from({
638
- length: Object.keys(e).filter((u) => u !== "children").length
638
+ length: Object.keys(e).filter((l) => l !== "children").length
639
639
  }).fill(!1);
640
- this.objectParser({ data: e, index: t, updater: a, parentMeta: i });
641
- function a(u) {
642
- const f = u.index, c = u.key, p = u.keyIndex;
643
- if (o.isUndefined(u.stable) || o.isNull(u.stable))
640
+ this.objectParser({ data: e, index: t, updater: o, parentMeta: i });
641
+ function o(l) {
642
+ const f = l.index, d = l.key, h = l.keyIndex;
643
+ if (a.isUndefined(l.stable) || a.isNull(l.stable))
644
644
  return;
645
- const h = s.parseStable(u.stable), y = i == null ? void 0 : i.index, w = i == null ? void 0 : i.key;
646
- let g = h;
647
- if (o.isProcessInprogress(g) || (n[p] = !0), i) {
648
- const b = s.processedSchemas.value[y][w][f][c];
649
- b && o.isObject(b) && c !== "component" && (g = v(b, g)), s.processedSchemas.value[y][w][f][c] = g, s.stableUpdater(
645
+ const p = s.parseStable(l.stable), b = i == null ? void 0 : i.index, H = i == null ? void 0 : i.key;
646
+ let g = p;
647
+ if (a.isProcessInprogress(g) || (n[h] = !0), i) {
648
+ const v = s.processedSchemas.value[b][H][f][d];
649
+ v && a.isObject(v) && d !== "component" && (g = P(v, g)), s.processedSchemas.value[b][H][f][d] = g, s.stableUpdater(
650
650
  n,
651
651
  i,
652
652
  t,
653
- c,
653
+ d,
654
654
  f
655
655
  );
656
656
  } else {
657
- const b = s.processedSchemas.value[f][c];
658
- b && o.isObject(b) && c !== "component" && (g = v(b, g)), s.processedSchemas.value[f][c] = g, s.stableUpdater(
657
+ const v = s.processedSchemas.value[f][d];
658
+ v && a.isObject(v) && d !== "component" && (g = P(v, g)), s.processedSchemas.value[f][d] = g, s.stableUpdater(
659
659
  n,
660
660
  i,
661
661
  t,
662
- c,
662
+ d,
663
663
  f
664
664
  );
665
665
  }
@@ -669,7 +669,7 @@ class wr {
669
669
  objectParser(e) {
670
670
  const t = e.data;
671
671
  Object.keys(t).forEach((s, n) => {
672
- var a, u;
672
+ var o, l;
673
673
  if (s === "children")
674
674
  this.parseSchemas(t[s], {
675
675
  ...e,
@@ -677,19 +677,19 @@ class wr {
677
677
  keyIndex: n
678
678
  });
679
679
  else {
680
- const f = (c) => {
680
+ const f = (d) => {
681
681
  e.updater({
682
682
  ...e,
683
683
  key: s,
684
684
  keyIndex: n,
685
- stable: c
685
+ stable: d
686
686
  });
687
687
  };
688
- o.isFunction(t[s]) ? s !== "defaultValue" ? this.schemaEffect.trackEffect(
688
+ a.isFunction(t[s]) ? s !== "defaultValue" ? this.schemaEffect.trackEffect(
689
689
  () => {
690
690
  if (s === "component") {
691
- const c = t[s](this.getRuntimeMeta());
692
- this.promiseFieldParser(c, f, !1, {
691
+ const d = t[s](this.getRuntimeMeta());
692
+ this.promiseFieldParser(d, f, !1, {
693
693
  rootIndex: e.index,
694
694
  parentMeta: e.parentMeta
695
695
  });
@@ -701,25 +701,25 @@ class wr {
701
701
  },
702
702
  {
703
703
  lazy: !1,
704
- identifier: `${(a = e.parentMeta) == null ? void 0 : a.key}parentIndex:${(u = e.parentMeta) == null ? void 0 : u.index}childIndex:${e.index}${s}${n}`
704
+ identifier: `${(o = e.parentMeta) == null ? void 0 : o.key}parentIndex:${(l = e.parentMeta) == null ? void 0 : l.index}childIndex:${e.index}${s}${n}`
705
705
  }
706
706
  ) : this.defaultValueEffect.trackEffect(
707
707
  () => {
708
- const c = this.schemaEffect.trackEffect(
708
+ const d = this.schemaEffect.trackEffect(
709
709
  () => {
710
710
  /\{\s*model\s*\}/.test(t[s].toString()) ? this.fieldParser(
711
711
  t[s],
712
- (p) => {
713
- if (!p)
714
- return f(p);
715
- this.defaultValueInprogressMap.set(t[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
712
+ (h) => {
713
+ if (!h)
714
+ return f(h);
715
+ this.defaultValueInprogressMap.set(t[s], h), !a.isProcessInprogress(h) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
716
716
  this.defaultValueInprogressMap.values()
717
- ).every((h) => {
718
- var y;
719
- return !((y = h == null ? void 0 : h.includes) != null && y.call(h, "undefined"));
720
- }) ? (f(p), this.defaultValueEffect.clearEffects(), S(() => {
721
- c();
722
- })) : f(p);
717
+ ).every((p) => {
718
+ var b;
719
+ return !((b = p == null ? void 0 : p.includes) != null && b.call(p, "undefined"));
720
+ }) ? (f(h), this.defaultValueEffect.clearEffects(), S(() => {
721
+ d();
722
+ })) : f(h);
723
723
  },
724
724
  {
725
725
  rootIndex: e.index,
@@ -727,15 +727,15 @@ class wr {
727
727
  }
728
728
  ) : this.fieldParser(
729
729
  t[s],
730
- (p) => {
731
- this.defaultValueInprogressMap.set(t[s], p), !o.isProcessInprogress(p) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
730
+ (h) => {
731
+ this.defaultValueInprogressMap.set(t[s], h), !a.isProcessInprogress(h) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
732
732
  this.defaultValueInprogressMap.values()
733
- ).every((h) => {
734
- var y;
735
- return !((y = h == null ? void 0 : h.includes) != null && y.call(h, "undefined"));
736
- }) ? (f(p), this.defaultValueEffect.clearEffects(), S(() => {
737
- c();
738
- })) : f(p);
733
+ ).every((p) => {
734
+ var b;
735
+ return !((b = p == null ? void 0 : p.includes) != null && b.call(p, "undefined"));
736
+ }) ? (f(h), this.defaultValueEffect.clearEffects(), S(() => {
737
+ d();
738
+ })) : f(h);
739
739
  },
740
740
  {
741
741
  rootIndex: e.index,
@@ -762,14 +762,14 @@ class wr {
762
762
  });
763
763
  }
764
764
  promiseFieldParser(e, t, i, s) {
765
- o.isPromise(e) ? e.then((n) => {
766
- o.isString(n) && (n = k(n, "")), i && o.isObject(n) && !o.isNativeObject(n) ? this.objectParser({
765
+ a.isPromise(e) ? e.then((n) => {
766
+ a.isString(n) && (n = k(n, "")), i && a.isObject(n) && !a.isNativeObject(n) ? this.objectParser({
767
767
  data: n,
768
768
  updater: t,
769
769
  index: s.rootIndex,
770
770
  parentMeta: s.parentMeta
771
771
  }) : t(n);
772
- }) : (o.isString(e) && (e = k(e, "")), i && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
772
+ }) : (a.isString(e) && (e = k(e, "")), i && a.isObject(e) && !a.isNativeObject(e) ? this.objectParser({
773
773
  data: e,
774
774
  updater: t,
775
775
  index: s.rootIndex,
@@ -778,7 +778,7 @@ class wr {
778
778
  }
779
779
  // 对任意对象中单个字段的 parse: 做基本处理
780
780
  fieldParser(e, t, i, s = !0) {
781
- if (o.isFunction(e))
781
+ if (a.isFunction(e))
782
782
  if (e.name.startsWith("__proform_raw_"))
783
783
  t(
784
784
  (...n) => e({
@@ -796,10 +796,10 @@ class wr {
796
796
  e.name.startsWith("__proform_onetime_") && (e.__proform_cached_result = n), this.promiseFieldParser(n, t, s, i);
797
797
  }
798
798
  else
799
- z(e) ? O(
799
+ T(e) ? E(
800
800
  () => e.value,
801
801
  () => {
802
- o.isUndefined(e.value) || (s && o.isObject(e.value) && !o.isNativeObject(e.value) ? this.objectParser({
802
+ a.isUndefined(e.value) || (s && a.isObject(e.value) && !a.isNativeObject(e.value) ? this.objectParser({
803
803
  data: e.value,
804
804
  updater: t,
805
805
  index: i.rootIndex,
@@ -810,10 +810,10 @@ class wr {
810
810
  immediate: !0,
811
811
  deep: !0
812
812
  }
813
- ) : L(e) ? O(
813
+ ) : U(e) ? E(
814
814
  () => e,
815
815
  () => {
816
- o.isUndefined(e) || (s && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
816
+ a.isUndefined(e) || (s && a.isObject(e) && !a.isNativeObject(e) ? this.objectParser({
817
817
  data: e,
818
818
  updater: t,
819
819
  index: i.rootIndex,
@@ -824,7 +824,7 @@ class wr {
824
824
  immediate: !0,
825
825
  deep: !0
826
826
  }
827
- ) : s && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
827
+ ) : s && a.isObject(e) && !a.isNativeObject(e) ? this.objectParser({
828
828
  data: e,
829
829
  updater: t,
830
830
  index: i.rootIndex,
@@ -834,105 +834,105 @@ class wr {
834
834
  modelProcessor(e) {
835
835
  e.map((t) => {
836
836
  this.createModel(t, this.processedModel.value);
837
- }), o.isObjectEmpty(this.stableModel) && this.stableUpdaterProcessProgress.every(Boolean) && this.defaultValueEffect.effects.size === 0 && S(() => {
838
- this.stableModel = I(this.processedModel.value), this.runtimeCore.hydrateEffect.triggerEffects(), this.runtimeCore.hydrateEffect.clearEffects();
837
+ }), a.isObjectEmpty(this.stableModel) && this.stableUpdaterProcessProgress.every(Boolean) && this.defaultValueEffect.effects.size === 0 && S(() => {
838
+ this.stableModel = C(this.processedModel.value), this.runtimeCore.hydrateEffect.triggerEffects(), this.runtimeCore.hydrateEffect.clearEffects();
839
839
  });
840
840
  }
841
841
  setModel(e, t, i) {
842
- o.isFunction(t) ? P(e, t(), i) : v(e, {
842
+ a.isFunction(t) ? y(e, t(), i) : P(e, {
843
843
  [t]: i
844
844
  });
845
845
  }
846
846
  createModel(e, t) {
847
- o.isListSchema(e) && (t[e.field] || this.setModel(t, e.field, [{}]), e.children.forEach((i) => {
847
+ a.isListSchema(e) && (t[e.field] || this.setModel(t, e.field, [{}]), e.children.forEach((i) => {
848
848
  this.createModel(i, t[e.field][0]);
849
- })), o.isGroupSchema(e) && e.children.forEach((i) => {
849
+ })), a.isGroupSchema(e) && e.children.forEach((i) => {
850
850
  this.createModel(i, t);
851
- }), o.isItemSchema(e) && S(() => {
851
+ }), a.isItemSchema(e) && S(() => {
852
852
  if ("defaultValue" in e && !t[e.field])
853
853
  this.setModel(t, e.field, e.defaultValue);
854
854
  else {
855
- if (o.isFunction(e.field) && B(t, e.field()))
855
+ if (a.isFunction(e.field) && B(t, e.field()))
856
856
  return;
857
- if (o.isString(e.field) && t[e.field])
857
+ if (a.isString(e.field) && t[e.field])
858
858
  return;
859
859
  this.setModel(t, e.field, void 0);
860
860
  }
861
861
  });
862
862
  }
863
863
  }
864
- class $ {
864
+ class x {
865
865
  static getFormContainer({ ui: e } = {}) {
866
- return d.presets.uiPresets[e ?? d.presets.ui].container.Form;
866
+ return c.presets.uiPresets[e ?? c.presets.ui].container.Form;
867
867
  }
868
868
  static getFormItemContainer({ ui: e } = {}) {
869
- return d.presets.uiPresets[e ?? d.presets.ui].container.FormItem;
869
+ return c.presets.uiPresets[e ?? c.presets.ui].container.FormItem;
870
870
  }
871
871
  static getItemContainer({ ui: e } = {}) {
872
- return d.presets.uiPresets[e ?? d.presets.ui].container.Item;
872
+ return c.presets.uiPresets[e ?? c.presets.ui].container.Item;
873
873
  }
874
874
  static getGroupContainer({ ui: e } = {}) {
875
- return d.presets.uiPresets[e ?? d.presets.ui].container.Group;
875
+ return c.presets.uiPresets[e ?? c.presets.ui].container.Group;
876
876
  }
877
877
  static getListContainer({ ui: e } = {}) {
878
- return d.presets.uiPresets[e ?? d.presets.ui].container.List;
878
+ return c.presets.uiPresets[e ?? c.presets.ui].container.List;
879
879
  }
880
880
  static getListItemContainer({ ui: e } = {}) {
881
- return d.presets.uiPresets[e ?? d.presets.ui].container.ListItem;
881
+ return c.presets.uiPresets[e ?? c.presets.ui].container.ListItem;
882
882
  }
883
883
  }
884
- class jr {
884
+ class wr {
885
885
  constructor(e) {
886
886
  this.ui = e;
887
887
  }
888
888
  getRuntimeNative() {
889
889
  var t;
890
- return (t = d.presets.uiPresets[this.ui]) == null ? void 0 : t.native;
890
+ return (t = c.presets.uiPresets[this.ui]) == null ? void 0 : t.native;
891
891
  }
892
892
  getRuntimeField(e) {
893
893
  var s;
894
- const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[d.getUI(this.ui)];
894
+ const t = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[c.getUI(this.ui)];
895
895
  return (t == null ? void 0 : t.getRuntimeField(e)) ?? (i == null ? void 0 : i.getRuntimeField(e));
896
896
  }
897
897
  getRuntimeRequired(e) {
898
898
  var s;
899
- const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[d.getUI(this.ui)];
899
+ const t = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[c.getUI(this.ui)];
900
900
  return (t == null ? void 0 : t.getRuntimeRequired(e)) ?? (i == null ? void 0 : i.getRuntimeRequired(e));
901
901
  }
902
902
  getFormModelPropName() {
903
903
  var i;
904
- const e = (i = d.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, t = C.adapters[d.getUI(this.ui)];
904
+ const e = (i = c.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, t = I.adapters[c.getUI(this.ui)];
905
905
  return (e == null ? void 0 : e.getFormModelPropName()) ?? (t == null ? void 0 : t.getFormModelPropName());
906
906
  }
907
907
  formComponentRenderer(e) {
908
908
  var s;
909
- const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[d.getUI(this.ui)];
909
+ const t = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[c.getUI(this.ui)];
910
910
  return (t == null ? void 0 : t.formComponentRenderer(e)) ?? (i == null ? void 0 : i.formComponentRenderer(e));
911
911
  }
912
912
  clearValidate(e) {
913
913
  var s;
914
- const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[d.getUI(this.ui)];
914
+ const t = (s = c.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[c.getUI(this.ui)];
915
915
  return (t == null ? void 0 : t.clearValidate(e)) ?? (i == null ? void 0 : i.clearValidate(e));
916
916
  }
917
917
  }
918
- function xr(r) {
919
- return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !it(r);
918
+ function jr(r) {
919
+ return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !rt(r);
920
920
  }
921
- class $r {
921
+ class xr {
922
922
  constructor(e) {
923
- l(this, "schemas", D([]));
924
- l(this, "model", D({}));
925
- l(this, "processorBySchemaType", {
923
+ u(this, "schemas", L([]));
924
+ u(this, "model", L({}));
925
+ u(this, "processorBySchemaType", {
926
926
  item: this.runtimeItemProcessor.bind(this),
927
927
  group: this.runtimeGroupProcessor.bind(this),
928
928
  list: this.runtimeListProcessor.bind(this)
929
929
  });
930
- l(this, "formRef", D(null));
931
- l(this, "hydrateEffect", new ee());
932
- l(this, "native", J({}));
933
- l(this, "grid", {});
934
- l(this, "runtime", {});
935
- l(this, "globalNativeFormOverride", J({
930
+ u(this, "formRef", L(null));
931
+ u(this, "hydrateEffect", new ee());
932
+ u(this, "native", D({}));
933
+ u(this, "grid", {});
934
+ u(this, "runtime", {});
935
+ u(this, "globalNativeFormOverride", D({
936
936
  props: {
937
937
  Form: {},
938
938
  FormItem: {}
@@ -942,12 +942,12 @@ class $r {
942
942
  FormItem: {}
943
943
  }
944
944
  }));
945
- l(this, "shared", J({}));
946
- l(this, "shareHistory", /* @__PURE__ */ new Map());
947
- l(this, "specialFormIdPrefix", "");
948
- this.setup = e, this.processor = new wr(this);
945
+ u(this, "shared", D({}));
946
+ u(this, "shareHistory", /* @__PURE__ */ new Map());
947
+ u(this, "specialFormIdPrefix", "");
948
+ this.setup = e, this.processor = new Er(this);
949
949
  const t = this.setup(this);
950
- this.ui = t.ui ?? d.presets.ui, this.runtimeAdapter = new jr(this.ui), this.specialFormIdPrefix = t.specialFormIdPrefix ?? "", Object.assign(this.globalNativeFormOverride, this.runtimeAdapter.getRuntimeNative()), z(t.schemas) ? O(
950
+ this.ui = t.ui ?? c.presets.ui, this.runtimeAdapter = new wr(this.ui), this.specialFormIdPrefix = t.specialFormIdPrefix ?? "", Object.assign(this.globalNativeFormOverride, this.runtimeAdapter.getRuntimeNative()), T(t.schemas) ? E(
951
951
  // @ts-expect-error
952
952
  () => t.schemas.value,
953
953
  () => {
@@ -956,7 +956,7 @@ class $r {
956
956
  {
957
957
  deep: !0
958
958
  }
959
- ) : L(t.schemas) ? O(() => t.schemas, () => {
959
+ ) : U(t.schemas) ? E(() => t.schemas, () => {
960
960
  this.processor.parseSchemas(t.schemas);
961
961
  }, {
962
962
  deep: !0
@@ -964,83 +964,77 @@ class $r {
964
964
  }
965
965
  getRuntimeMeta() {
966
966
  return {
967
- model: M(I(this.model.value)),
967
+ model: M(C(this.model.value)),
968
968
  reactiveModel: this.model.value,
969
969
  shared: this.shared,
970
970
  // share 增加防抖,当开发者在过程中进行 share 时避免频繁触发爆栈
971
971
  share: (t) => {
972
972
  S(() => {
973
973
  Object.keys(t).forEach((i) => {
974
- z(t[i]) ? K(() => {
975
- P(this.shared, i, t[i].value), this.shareHistory.get(i) !== t[i].value && (this.shareHistory.set(i, t[i].value), this.processor.schemaEffect.triggerEffects());
976
- }) : L(t[i]) ? K(() => {
977
- P(this.shared, i, t[i]), this.shareHistory.get(i) !== t[i] && (this.shareHistory.set(i, t[i]), this.processor.schemaEffect.triggerEffects());
978
- }) : (P(this.shared, i, t[i]), this.shareHistory.get(i) !== t[i] && (this.shareHistory.set(i, t[i]), this.processor.schemaEffect.triggerEffects()));
974
+ T(t[i]) ? K(() => {
975
+ y(this.shared, i, t[i].value), this.shareHistory.get(i) !== t[i].value && (this.shareHistory.set(i, t[i].value), this.processor.schemaEffect.triggerEffects());
976
+ }) : U(t[i]) ? K(() => {
977
+ y(this.shared, i, t[i]), this.shareHistory.get(i) !== t[i] && (this.shareHistory.set(i, t[i]), this.processor.schemaEffect.triggerEffects());
978
+ }) : (y(this.shared, i, t[i]), this.shareHistory.get(i) !== t[i] && (this.shareHistory.set(i, t[i]), this.processor.schemaEffect.triggerEffects()));
979
979
  });
980
980
  });
981
981
  }
982
982
  };
983
983
  }
984
984
  runtimeItemProcessor(e, t, i = this.model.value, s) {
985
- var le, ue, fe, ce, de, pe, he, me, ge, ve, be, ye, Pe, _e, Ie, Ce, Se, Fe, Ee, Oe, we, je, xe, $e, Re, Me;
985
+ var le, ue, ce, fe, de, he, pe, me, ge, Pe, ve, be, ye, _e, Ce, Ie, Se, Fe, Oe, Ee, we, je, xe, Re, Me, $e;
986
986
  const n = M(e.component);
987
987
  if (!n)
988
988
  return;
989
- (ue = (le = e.native) == null ? void 0 : le.props) != null && ue.Form && v(this.globalNativeFormOverride.props.Form, (ce = (fe = e.native) == null ? void 0 : fe.props) == null ? void 0 : ce.Form), (pe = (de = e.native) == null ? void 0 : de.slots) != null && pe.FormItem && v(this.globalNativeFormOverride.slots.FormItem, (me = (he = e.native) == null ? void 0 : he.slots) == null ? void 0 : me.FormItem);
990
- const a = v(I((ve = (ge = this.native) == null ? void 0 : ge.slots) == null ? void 0 : ve.FormItem) ?? {}, (ye = (be = e.native) == null ? void 0 : be.slots) == null ? void 0 : ye.FormItem), u = {
989
+ (ue = (le = e.native) == null ? void 0 : le.props) != null && ue.Form && P(this.globalNativeFormOverride.props.Form, (fe = (ce = e.native) == null ? void 0 : ce.props) == null ? void 0 : fe.Form), (he = (de = e.native) == null ? void 0 : de.slots) != null && he.FormItem && P(this.globalNativeFormOverride.slots.FormItem, (me = (pe = e.native) == null ? void 0 : pe.slots) == null ? void 0 : me.FormItem);
990
+ const o = P(C((Pe = (ge = this.native) == null ? void 0 : ge.slots) == null ? void 0 : Pe.FormItem) ?? {}, (be = (ve = e.native) == null ? void 0 : ve.slots) == null ? void 0 : be.FormItem), l = {
991
991
  display: "grid",
992
992
  gridColumn: "1 / -1",
993
993
  ...e.grid
994
994
  };
995
995
  let f = {
996
- ...(_e = (Pe = e.native) == null ? void 0 : Pe.props) == null ? void 0 : _e.FormItem
996
+ ...(_e = (ye = e.native) == null ? void 0 : ye.props) == null ? void 0 : _e.FormItem
997
997
  };
998
- G((Se = (Ce = (Ie = e.native) == null ? void 0 : Ie.props) == null ? void 0 : Ce.FormItem) == null ? void 0 : Se.tooltip) && (f = {
999
- ...(Ee = (Fe = e.native) == null ? void 0 : Fe.props) == null ? void 0 : Ee.FormItem,
1000
- tooltip: (je = (we = (Oe = e.native) == null ? void 0 : Oe.props) == null ? void 0 : we.FormItem) == null ? void 0 : je.tooltip()
998
+ G((Se = (Ie = (Ce = e.native) == null ? void 0 : Ce.props) == null ? void 0 : Ie.FormItem) == null ? void 0 : Se.tooltip) && (f = {
999
+ ...(Oe = (Fe = e.native) == null ? void 0 : Fe.props) == null ? void 0 : Oe.FormItem,
1000
+ tooltip: (je = (we = (Ee = e.native) == null ? void 0 : Ee.props) == null ? void 0 : we.FormItem) == null ? void 0 : je.tooltip()
1001
1001
  });
1002
- const c = v(I(($e = (xe = this.native) == null ? void 0 : xe.props) == null ? void 0 : $e.FormItem) ?? {}, f), p = this.runtimeAdapter.getRuntimeField({
1002
+ const d = P(C((Re = (xe = this.native) == null ? void 0 : xe.props) == null ? void 0 : Re.FormItem) ?? {}, f), h = this.runtimeAdapter.getRuntimeField({
1003
1003
  schema: e,
1004
1004
  parentSchema: s,
1005
1005
  index: t
1006
- }), h = n.name, y = e.componentProps ?? {}, w = C.placeholderPresetByComponentName;
1007
- let g = G(e.placeholder) ? e.placeholder() : e.placeholder, b = e.show;
1008
- b === void 0 && (b = !0);
1009
- let F = (G(e.label) ? e.label() : e.label) ?? "", E;
1010
- if (e.runtime ? E = e.runtime : E = (s == null ? void 0 : s.runtime) ?? this.runtime, !o.isUndefined(t) && !o.isObjectEmpty(E) && (F = k((Re = E == null ? void 0 : E.customizeListItemLabel) == null ? void 0 : Re.call(E, e.label ?? "", t + 1), "")), !g) {
1011
- let U = "请输入";
1012
- o.isUndefined(h) ? g = `${U}${F}` : /* @ts-expect-error */ w[h.toLowerCase()] ? (U = // @ts-expect-error
1013
- w[h.toLowerCase()], g = `${U}${F}`) : (Object.keys(w).forEach((Ve) => {
1014
- h.toLowerCase().includes(Ve.toLowerCase()) && (U = w[Ve]);
1015
- }), g = `${U}${F}`);
1016
- }
1017
- const Xe = this.runtimeAdapter.getRuntimeRequired({
1006
+ }), p = n.name, b = e.componentProps ?? {}, H = I.placeholderPresetByComponentName;
1007
+ let g = G(e.placeholder) ? e.placeholder() : e.placeholder, v = e.show;
1008
+ v === void 0 && (v = !0);
1009
+ let F = (G(e.label) ? e.label() : e.label) ?? "", O;
1010
+ e.runtime ? O = e.runtime : O = (s == null ? void 0 : s.runtime) ?? this.runtime, !a.isUndefined(t) && !a.isObjectEmpty(O) && (F = k((Me = O == null ? void 0 : O.customizeListItemLabel) == null ? void 0 : Me.call(O, e.label ?? "", t + 1), "")), F = c.translateLabel(F), a.isString(g) && (g = c.translateMessage(g)), g || (g = c.buildPlaceholder(p, F, H));
1011
+ const We = this.runtimeAdapter.getRuntimeRequired({
1018
1012
  ...e,
1019
1013
  label: F
1020
- }), Ye = $.getItemContainer(this), Ze = $.getFormItemContainer(this), Je = this, Qe = e.componentSlots, _ = (Me = d.presets.uiPresets[this.ui]) == null ? void 0 : Me.display;
1014
+ }), Xe = x.getItemContainer(this), Ye = x.getFormItemContainer(this), Ze = this, Je = e.componentSlots, _ = ($e = c.presets.uiPresets[this.ui]) == null ? void 0 : $e.display;
1021
1015
  let Z;
1022
- return !o.isUndefined(_ == null ? void 0 : _.labelPrefix) && !o.isNull(_ == null ? void 0 : _.labelPrefix) ? Z = `${F}${_ == null ? void 0 : _.labelPrefix}` : Z = `${F}:`, m("div", {
1023
- style: u
1024
- }, [m(Ye, {
1025
- show: b,
1016
+ return !a.isUndefined(_ == null ? void 0 : _.labelPrefix) && !a.isNull(_ == null ? void 0 : _.labelPrefix) ? Z = `${F}${_ == null ? void 0 : _.labelPrefix}` : Z = `${F}:`, m("div", {
1017
+ style: l
1018
+ }, [m(Xe, {
1019
+ show: v,
1026
1020
  schema: e,
1027
1021
  id: t ? `${this.specialFormIdPrefix}${e.field}-${t}` : `${this.specialFormIdPrefix}${e.field}`
1028
1022
  }, {
1029
1023
  default() {
1030
- return b && m(Ze, T(c, {
1024
+ return v && m(Ye, q(d, {
1031
1025
  label: `${F ? Z : ""}`
1032
- }, p, Xe), {
1026
+ }, h, We), {
1033
1027
  default() {
1034
- return Je.runtimeAdapter.formComponentRenderer({
1028
+ return Ze.runtimeAdapter.formComponentRenderer({
1035
1029
  Component: n,
1036
1030
  schema: e,
1037
1031
  baseModel: i,
1038
1032
  placeholder: g,
1039
- componentSlots: Qe,
1040
- props: y
1033
+ componentSlots: Je,
1034
+ props: b
1041
1035
  });
1042
1036
  },
1043
- ...a
1037
+ ...o
1044
1038
  });
1045
1039
  }
1046
1040
  })]);
@@ -1051,19 +1045,19 @@ class $r {
1051
1045
  display: "grid",
1052
1046
  gridColumn: "1 / -1",
1053
1047
  ...e.grid
1054
- }, s = $.getGroupContainer(this);
1048
+ }, s = x.getGroupContainer(this);
1055
1049
  let n = e.show;
1056
1050
  return n === void 0 && (n = !0), m("div", {
1057
1051
  style: i
1058
1052
  }, [n && m(s, {
1059
1053
  schema: e
1060
- }, xr(t = e.children.map((a) => this.runtimeItemProcessor(a))) ? t : {
1054
+ }, jr(t = e.children.map((o) => this.runtimeItemProcessor(o))) ? t : {
1061
1055
  default: () => [t]
1062
1056
  })]);
1063
1057
  }
1064
1058
  addListItem(e) {
1065
1059
  var t;
1066
- (t = this.processor.stableModel[e.field]) != null && t[0] && this.model.value[e.field].push(I(this.processor.stableModel[e.field][0])), this.runtimeAdapter.clearValidate(this);
1060
+ (t = this.processor.stableModel[e.field]) != null && t[0] && this.model.value[e.field].push(C(this.processor.stableModel[e.field][0])), this.runtimeAdapter.clearValidate(this);
1067
1061
  }
1068
1062
  deleteListItem(e, t) {
1069
1063
  this.model.value[e.field].splice(t, 1), this.runtimeAdapter.clearValidate(this);
@@ -1077,32 +1071,32 @@ class $r {
1077
1071
  i.model.value[e.field] || (i.model.value[e.field] = [{}]);
1078
1072
  let s = e.show;
1079
1073
  s === void 0 && (s = !0);
1080
- const n = $.getListContainer(this), a = $.getListItemContainer(this);
1074
+ const n = x.getListContainer(this), o = x.getListItemContainer(this);
1081
1075
  return m("div", {
1082
1076
  style: t
1083
1077
  }, [s && m(n, {
1084
1078
  schema: e
1085
1079
  }, {
1086
1080
  default() {
1087
- return i.model.value[e.field].map((u, f) => m(a, null, {
1081
+ return i.model.value[e.field].map((l, f) => m(o, null, {
1088
1082
  default() {
1089
- return e.children.map((c) => i.runtimeItemProcessor(c, f, u, e));
1083
+ return e.children.map((d) => i.runtimeItemProcessor(d, f, l, e));
1090
1084
  },
1091
1085
  delete({
1092
- container: c
1086
+ container: d
1093
1087
  } = {}) {
1094
- var h;
1095
- const p = c ?? m("button", null, null);
1096
- return et(m(p, {
1088
+ var p;
1089
+ const h = d ?? m("button", null, null);
1090
+ return ke(m(h, {
1097
1091
  onClick: () => i.deleteListItem(e, f)
1098
- }, null), [[tt, ((h = i.model.value[e.field]) == null ? void 0 : h.length) > 1]]);
1092
+ }, null), [[et, ((p = i.model.value[e.field]) == null ? void 0 : p.length) > 1]]);
1099
1093
  }
1100
1094
  }));
1101
1095
  },
1102
1096
  add({
1103
- container: u
1097
+ container: l
1104
1098
  } = {}) {
1105
- const f = u ?? m("button", null, [rt("添加")]);
1099
+ const f = l ?? m("button", null, [tt("添加")]);
1106
1100
  return m(f, {
1107
1101
  onClick: () => i.addListItem(e)
1108
1102
  }, null);
@@ -1113,17 +1107,17 @@ class $r {
1113
1107
  return e.map((t) => (t.type || (t.type = "item"), this.processorBySchemaType[t.type](t)));
1114
1108
  }
1115
1109
  exec() {
1116
- var u, f, c, p;
1110
+ var l, f, d, h;
1117
1111
  const e = {
1118
1112
  display: "grid",
1119
1113
  gridColumn: "1 / -1",
1120
1114
  gridAutoColumns: "1fr",
1121
1115
  ...this.grid
1122
- }, t = this, i = v(this.globalNativeFormOverride.props.Form, I((f = (u = this.native) == null ? void 0 : u.props) == null ? void 0 : f.Form) ?? {}), s = v(this.globalNativeFormOverride.slots.Form, I((p = (c = this.native) == null ? void 0 : c.slots) == null ? void 0 : p.Form) ?? {}), n = $.getFormContainer(this), a = this.runtimeAdapter.getFormModelPropName();
1123
- return m(n, T(i, {
1116
+ }, t = this, i = P(this.globalNativeFormOverride.props.Form, C((f = (l = this.native) == null ? void 0 : l.props) == null ? void 0 : f.Form) ?? {}), s = P(this.globalNativeFormOverride.slots.Form, C((h = (d = this.native) == null ? void 0 : d.slots) == null ? void 0 : h.Form) ?? {}), n = x.getFormContainer(this), o = this.runtimeAdapter.getFormModelPropName();
1117
+ return m(n, q(i, {
1124
1118
  ref: this.formRef
1125
1119
  }, {
1126
- [a]: this.model.value
1120
+ [o]: this.model.value
1127
1121
  }), {
1128
1122
  default() {
1129
1123
  return m("div", {
@@ -1134,7 +1128,13 @@ class $r {
1134
1128
  });
1135
1129
  }
1136
1130
  }
1137
- class d {
1131
+ class c {
1132
+ static setPresets(e) {
1133
+ var i, s;
1134
+ this.presets = e;
1135
+ const t = (s = (i = e.i18n) == null ? void 0 : i.localeRef) == null ? void 0 : s.value;
1136
+ t && this.ensureLocalePackLoaded(t);
1137
+ }
1138
1138
  static getPreset(e) {
1139
1139
  var t, i, s;
1140
1140
  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];
@@ -1143,8 +1143,85 @@ class d {
1143
1143
  var t, i, s;
1144
1144
  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;
1145
1145
  }
1146
+ static getI18nConfig() {
1147
+ var e;
1148
+ return (e = this.presets) == null ? void 0 : e.i18n;
1149
+ }
1150
+ static getCurrentLocale() {
1151
+ var e, t;
1152
+ return ((t = (e = this.getI18nConfig()) == null ? void 0 : e.localeRef) == null ? void 0 : t.value) ?? "";
1153
+ }
1154
+ static getLocalePack(e = this.getCurrentLocale()) {
1155
+ var i;
1156
+ const t = this.getI18nConfig();
1157
+ if ((i = t == null ? void 0 : t.versionRef) == null || i.value, this.internalI18nVersion.value, !!e)
1158
+ return this.ensureLocalePackLoaded(e), this.localePackCache[e];
1159
+ }
1160
+ static async ensureLocalePackLoaded(e = this.getCurrentLocale()) {
1161
+ const t = this.getI18nConfig();
1162
+ if (!(t != null && t.loadLocalePack) || !e)
1163
+ return this.localePackCache[e];
1164
+ if (this.localePackCache[e])
1165
+ return this.localePackCache[e];
1166
+ const i = this.localePackPromiseCache.get(e);
1167
+ if (i)
1168
+ return i;
1169
+ const s = t.loadLocalePack(e).then((n) => (n && (this.localePackCache[e] = n), this.localePackCache[e])).catch(() => {
1170
+ }).finally(() => {
1171
+ this.localePackPromiseCache.delete(e), this.internalI18nVersion.value += 1;
1172
+ });
1173
+ return this.localePackPromiseCache.set(e, s), s;
1174
+ }
1175
+ static formatTemplate(e, t) {
1176
+ return Object.entries(t).reduce((i, [s, n]) => i.split(`{${s}}`).join(`${n ?? ""}`), e);
1177
+ }
1178
+ static translateMessage(e) {
1179
+ var i;
1180
+ if (!e)
1181
+ return e ?? "";
1182
+ const t = this.getLocalePack();
1183
+ return ((i = t == null ? void 0 : t.messages) == null ? void 0 : i[e]) ?? e;
1184
+ }
1185
+ static translateLabel(e) {
1186
+ var s, n, o;
1187
+ if (!e)
1188
+ return e ?? "";
1189
+ const t = this.getCurrentLocale(), i = this.getLocalePack(t);
1190
+ return ((n = (s = this.getI18nConfig()) == null ? void 0 : s.translateLabel) == null ? void 0 : n.call(s, e, {
1191
+ locale: t,
1192
+ pack: i
1193
+ })) ?? ((o = i == null ? void 0 : i.messages) == null ? void 0 : o[e]) ?? e;
1194
+ }
1195
+ static buildRequiredMessage(e) {
1196
+ var n;
1197
+ const t = this.translateLabel(e), i = this.getLocalePack(), s = (n = i == null ? void 0 : i.templates) == null ? void 0 : n.required;
1198
+ return s ? this.formatTemplate(s, {
1199
+ label: t
1200
+ }) : `${t}是必填项`;
1201
+ }
1202
+ static buildPlaceholder(e, t, i) {
1203
+ const s = this.translateLabel(t), n = this.getLocalePack(), o = (n == null ? void 0 : n.placeholderPrefixByComponentName) ?? i ?? {};
1204
+ let l = this.translateMessage("请输入") || "请输入";
1205
+ if (!e)
1206
+ return this.applyPlaceholderTemplate(l, s);
1207
+ const f = e.toLowerCase();
1208
+ return o[f] ? (l = o[f], this.applyPlaceholderTemplate(l, s)) : (Object.keys(o).forEach((d) => {
1209
+ f.includes(d.toLowerCase()) && (l = o[d]);
1210
+ }), this.applyPlaceholderTemplate(l, s));
1211
+ }
1212
+ static applyPlaceholderTemplate(e, t) {
1213
+ var n;
1214
+ const i = this.getLocalePack(), s = (n = i == null ? void 0 : i.templates) == null ? void 0 : n.placeholder;
1215
+ return s ? this.formatTemplate(s, {
1216
+ prefix: e,
1217
+ label: t
1218
+ }) : `${e}${t}`;
1219
+ }
1220
+ }
1221
+ u(c, "presets"), u(c, "localePackCache", D({})), u(c, "localePackPromiseCache", /* @__PURE__ */ new Map()), u(c, "internalI18nVersion", L(0));
1222
+ function Q(r) {
1223
+ return a.isString(r.required) ? c.translateMessage(r.required) : a.isFunction(r.required) ? r.required() : c.buildRequiredMessage(r.label);
1146
1224
  }
1147
- l(d, "presets");
1148
1225
  function A({
1149
1226
  parentSchema: r,
1150
1227
  schema: e,
@@ -1156,22 +1233,22 @@ const Rr = {
1156
1233
  ArcoVue: {
1157
1234
  getRuntimeField(r) {
1158
1235
  const e = A(r);
1159
- return o.isFunction(e) ? {
1236
+ return a.isFunction(e) ? {
1160
1237
  field: e()
1161
1238
  } : {
1162
1239
  field: e
1163
1240
  };
1164
1241
  },
1165
1242
  getRuntimeRequired(r) {
1166
- let e = `${r.label}是必填项`;
1243
+ let e = c.buildRequiredMessage(r.label);
1167
1244
  if (r.required)
1168
- if (o.isString(r.required) && (e = r.required), o.isFunction(r.required) && (e = r.required()), !r.rules)
1245
+ if (e = Q(r), !r.rules)
1169
1246
  r.rules = [], r.rules.push({
1170
1247
  required: !0,
1171
1248
  message: e
1172
1249
  });
1173
1250
  else {
1174
- const t = r.rules.findIndex((i) => !o.isUndefined(i.required));
1251
+ const t = r.rules.findIndex((i) => !a.isUndefined(i.required));
1175
1252
  t !== -1 ? (r.rules[t].required = !0, r.rules[t].message = e) : r.rules.unshift({
1176
1253
  required: !0,
1177
1254
  message: e
@@ -1192,11 +1269,11 @@ const Rr = {
1192
1269
  componentSlots: s,
1193
1270
  props: n
1194
1271
  }) {
1195
- let a;
1196
- return o.isFunction(t.field) ? a = B(e, t.field()) : a = e[t.field], m(r, T({
1197
- modelValue: a,
1198
- "onUpdate:modelValue": (u) => {
1199
- o.isFunction(t.field) ? P(e, t.field(), u) : e[t.field] = u;
1272
+ let o;
1273
+ return a.isFunction(t.field) ? o = B(e, t.field()) : o = e[t.field], m(r, q({
1274
+ modelValue: o,
1275
+ "onUpdate:modelValue": (l) => {
1276
+ a.isFunction(t.field) ? y(e, t.field(), l) : e[t.field] = l;
1200
1277
  },
1201
1278
  placeholder: i
1202
1279
  }, n), {
@@ -1216,22 +1293,22 @@ const Rr = {
1216
1293
  NutUI: {
1217
1294
  getRuntimeField(r) {
1218
1295
  const e = A(r);
1219
- return o.isFunction(e) ? {
1296
+ return a.isFunction(e) ? {
1220
1297
  prop: e()
1221
1298
  } : {
1222
1299
  prop: e
1223
1300
  };
1224
1301
  },
1225
1302
  getRuntimeRequired(r) {
1226
- let e = `${r.label}是必填项`;
1303
+ let e = c.buildRequiredMessage(r.label);
1227
1304
  if (r.required)
1228
- if (o.isString(r.required) && (e = r.required), !r.rules)
1305
+ if (e = Q(r), !r.rules)
1229
1306
  r.rules = [], r.rules.push({
1230
1307
  required: !0,
1231
1308
  message: e
1232
1309
  });
1233
1310
  else {
1234
- const t = r.rules.findIndex((i) => !o.isUndefined(i.required));
1311
+ const t = r.rules.findIndex((i) => !a.isUndefined(i.required));
1235
1312
  t !== -1 ? (r.rules[t].required = !0, r.rules[t].message = e) : r.rules.unshift({
1236
1313
  required: !0,
1237
1314
  message: e
@@ -1253,11 +1330,11 @@ const Rr = {
1253
1330
  componentSlots: s,
1254
1331
  props: n
1255
1332
  }) {
1256
- let a;
1257
- return o.isFunction(t.field) ? a = B(e, t.field()) : a = e[t.field], m(r, T({
1258
- modelValue: a,
1259
- "onUpdate:modelValue": (u) => {
1260
- o.isFunction(t.field) ? P(e, t.field(), u) : e[t.field] = u;
1333
+ let o;
1334
+ return a.isFunction(t.field) ? o = B(e, t.field()) : o = e[t.field], m(r, q({
1335
+ modelValue: o,
1336
+ "onUpdate:modelValue": (l) => {
1337
+ a.isFunction(t.field) ? y(e, t.field(), l) : e[t.field] = l;
1261
1338
  },
1262
1339
  placeholder: i
1263
1340
  }, n), {
@@ -1282,23 +1359,23 @@ const Rr = {
1282
1359
  NaiveUI: {
1283
1360
  getRuntimeField(r) {
1284
1361
  const e = A(r);
1285
- return o.isFunction(e) ? {
1362
+ return a.isFunction(e) ? {
1286
1363
  path: e()
1287
1364
  } : {
1288
1365
  path: e
1289
1366
  };
1290
1367
  },
1291
1368
  getRuntimeRequired(r) {
1292
- let e = `${r.label}是必填项`;
1369
+ let e = c.buildRequiredMessage(r.label);
1293
1370
  if (r.required)
1294
- if (o.isString(r.required) && (e = r.required), !r.rules)
1371
+ if (e = Q(r), !r.rules)
1295
1372
  r.rules = [], r.rules.push({
1296
1373
  required: !0,
1297
1374
  message: e,
1298
1375
  trigger: ["input", "blur"]
1299
1376
  });
1300
1377
  else {
1301
- const t = r.rules.findIndex((i) => !o.isUndefined(i.required));
1378
+ const t = r.rules.findIndex((i) => !a.isUndefined(i.required));
1302
1379
  t !== -1 ? (r.rules[t].required = !0, r.rules[t].message = e) : r.rules.unshift({
1303
1380
  required: !0,
1304
1381
  message: e,
@@ -1320,11 +1397,11 @@ const Rr = {
1320
1397
  componentSlots: s,
1321
1398
  props: n
1322
1399
  }) {
1323
- let a;
1324
- return o.isFunction(t.field) ? a = B(e, t.field()) : a = e[t.field], m(r, T({
1325
- value: a,
1326
- "onUpdate:value": (u) => {
1327
- o.isFunction(t.field) ? P(e, t.field(), u) : e[t.field] = u;
1400
+ let o;
1401
+ return a.isFunction(t.field) ? o = B(e, t.field()) : o = e[t.field], m(r, q({
1402
+ value: o,
1403
+ "onUpdate:value": (l) => {
1404
+ a.isFunction(t.field) ? y(e, t.field(), l) : e[t.field] = l;
1328
1405
  },
1329
1406
  placeholder: i
1330
1407
  }, n), {
@@ -1354,7 +1431,7 @@ const Rr = {
1354
1431
  return t;
1355
1432
  }
1356
1433
  };
1357
- l(R, "schemaPreset", {
1434
+ u(R, "schemaPreset", {
1358
1435
  type: {
1359
1436
  defaultValue: "item"
1360
1437
  },
@@ -1400,19 +1477,19 @@ l(R, "schemaPreset", {
1400
1477
  runtime: {
1401
1478
  default: void 0
1402
1479
  }
1403
- }), l(R, "componentPropsPreset", {
1480
+ }), u(R, "componentPropsPreset", {
1404
1481
  options: {
1405
1482
  defaultValue: []
1406
1483
  }
1407
1484
  }), // 基于基本功能提出基本预设
1408
- l(R, "placeholderPresetByComponentName", R.getPlaceholderPrefixPresetByComponentName());
1485
+ u(R, "placeholderPresetByComponentName", R.getPlaceholderPrefixPresetByComponentName());
1409
1486
  let te = R;
1410
- const C = {
1487
+ const I = {
1411
1488
  ...te,
1412
1489
  adapters: {
1413
1490
  ...Rr
1414
1491
  }
1415
- }, Nr = /* @__PURE__ */ st({
1492
+ }, Vr = /* @__PURE__ */ it({
1416
1493
  props: {
1417
1494
  setup: {
1418
1495
  type: Function,
@@ -1420,11 +1497,12 @@ const C = {
1420
1497
  }
1421
1498
  },
1422
1499
  setup(r) {
1423
- const e = new $r(r.setup);
1500
+ const e = new xr(r.setup);
1424
1501
  return () => e.exec();
1425
1502
  }
1426
1503
  });
1427
- function Ur(r) {
1504
+ function Nr(r) {
1505
+ console.log("new ffffffffffff========123===");
1428
1506
  const e = new Or(r);
1429
1507
  return [
1430
1508
  e.setup.bind(e),
@@ -1437,8 +1515,8 @@ function Ur(r) {
1437
1515
  }
1438
1516
  ];
1439
1517
  }
1440
- function qr(r) {
1441
- d.presets = r;
1518
+ function Lr(r) {
1519
+ c.setPresets(r);
1442
1520
  }
1443
1521
  function ae(r, e) {
1444
1522
  return e === "native" && Object.defineProperty(r, "name", {
@@ -1452,16 +1530,16 @@ function ae(r, e) {
1452
1530
  writable: !0
1453
1531
  }), r;
1454
1532
  }
1455
- function Tr(r) {
1533
+ function qr(r) {
1456
1534
  return ae(r, "native");
1457
1535
  }
1458
- function zr(r) {
1536
+ function Tr(r) {
1459
1537
  return r.__proform_raw_object = !0, r;
1460
1538
  }
1461
- function Lr(r) {
1539
+ function Ur(r) {
1462
1540
  return ae(r, "onetime");
1463
1541
  }
1464
- function Hr(r) {
1542
+ function zr(r) {
1465
1543
  function e() {
1466
1544
  return r;
1467
1545
  }
@@ -1471,12 +1549,12 @@ function Hr(r) {
1471
1549
  );
1472
1550
  }
1473
1551
  export {
1474
- Nr as ProForm,
1475
- Tr as markNativeFunction,
1476
- zr as markNativeObject,
1477
- Lr as markOnetimeFunction,
1478
- Hr as markStructuredPathParsing,
1479
- Ur as useForm,
1480
- qr as useFormPresetConfigurer,
1552
+ Vr as ProForm,
1553
+ qr as markNativeFunction,
1554
+ Tr as markNativeObject,
1555
+ Ur as markOnetimeFunction,
1556
+ zr as markStructuredPathParsing,
1557
+ Nr as useForm,
1558
+ Lr as useFormPresetConfigurer,
1481
1559
  ae as useModifiers
1482
1560
  };