bp-aicc-editor 1.2.507 → 1.2.511

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 (90) hide show
  1. package/lib/ScreenPreview-CV95NWOd.js +373 -0
  2. package/lib/{atlas-C3az-9Mm.js → atlas-DsmLq2V0.js} +1 -1
  3. package/lib/{button-base-_jCki568.js → button-base-DHNVBrQ9.js} +1 -1
  4. package/lib/{cache-Jvpyvvq5.js → cache-lsjsKZHu.js} +1 -1
  5. package/lib/{container-group-DTRMf-Lh.js → container-group-DqAcKEBy.js} +1 -1
  6. package/lib/{copy-JUmhZHJW.js → copy-C5Pi6nJh.js} +1 -1
  7. package/lib/{datav-DYcMOPlj.js → datav-BER95ty-.js} +27 -27
  8. package/lib/{delete-C0k5m-ed.js → delete-C2EW4JCs.js} +1 -1
  9. package/lib/{divider-CvWkiVUb.js → divider-BazBGRgV.js} +1 -1
  10. package/lib/edit-B2pfd2q1.js +24 -0
  11. package/lib/el-button-DvLKp6Ga.js +815 -0
  12. package/lib/el-form-item-BDdxk5F5.js +1175 -0
  13. package/lib/el-link-D2ol9BHQ.js +91 -0
  14. package/lib/el-loading-Cgwgez55.js +230 -0
  15. package/lib/el-overlay-BK0_UIU6.js +704 -0
  16. package/lib/el-tab-pane-DD2eM9rB.js +536 -0
  17. package/lib/{fullscreen-DOYyz7vQ.js → fullscreen-OChDsSnk.js} +1 -1
  18. package/lib/{image-BQIpsLBo.js → image-C5ZAY3yt.js} +1 -1
  19. package/lib/index-3pzVrvby.js +150 -0
  20. package/lib/{index-D9Iayd4l.js → index-B19lEYui.js} +6 -6
  21. package/lib/index-B1yAU2Cb.js +390 -0
  22. package/lib/index-BCFXuK7k.js +68 -0
  23. package/lib/index-BD4Jwo8Z.js +449 -0
  24. package/lib/{index-BvcqtFEY.js → index-BMWqf88L.js} +10 -10
  25. package/lib/{index-CI4vgOJL.js → index-BPcvYtHf.js} +8 -11
  26. package/lib/index-BWPVi43E.js +21 -0
  27. package/lib/{index-CSkWvBQG.js → index-BatyRVpL.js} +1 -1
  28. package/lib/{index-D7jQaJbo.js → index-Belsn8kt.js} +1 -1
  29. package/lib/{index-C7ZW2TdD.js → index-BfIEunKC.js} +13 -15
  30. package/lib/{index-DTbzx51-.js → index-BhP9eBCp.js} +2 -2
  31. package/lib/{index-BdQOzowp.js → index-BkdiXCRY.js} +1 -1
  32. package/lib/{index-B4Kg0SOl.js → index-Buoc0ISP.js} +60 -65
  33. package/lib/index-BwCQWH-N.js +439 -0
  34. package/lib/{index-KO7LIDgy.js → index-C7k49L2T.js} +1 -1
  35. package/lib/{index-BCisGpRV.js → index-CGFEhUh9.js} +21 -21
  36. package/lib/{index-BCZuzL9x.js → index-CGrR_i0u.js} +1 -1
  37. package/lib/index-CIADz1i0.js +8494 -0
  38. package/lib/{index-BiybAKLy.js → index-CJyYGViv.js} +1 -1
  39. package/lib/{index-Curd3Q_C.js → index-CVE37oE7.js} +1 -1
  40. package/lib/{index-BGT3NcHb.js → index-CVsy2qTh.js} +2 -2
  41. package/lib/{index-CEKpsQ73.js → index-CWbZmzNT.js} +20 -20
  42. package/lib/{index-r0p4Zsdn.js → index-CXQ258ID.js} +1 -1
  43. package/lib/{index-C17gkQC5.js → index-CX_Ghcb6.js} +2 -2
  44. package/lib/index-CZJriuFt.js +27215 -0
  45. package/lib/{index-UdJ7RS5C.js → index-Ci8AbyIq.js} +1 -1
  46. package/lib/{index-DzglmFul.js → index-Ck7uFsPE.js} +1 -1
  47. package/lib/{index-DfKVDhZo.js → index-D4X0_jbv.js} +4 -4
  48. package/lib/{index-Q9GLzAp6.js → index-DKTrbqcA.js} +2 -2
  49. package/lib/{index-DiSYhNaR.js → index-Ge_d2xqD.js} +1 -1
  50. package/lib/{index-D9qrFCLu.js → index-qVyixI57.js} +21 -24
  51. package/lib/{index-DrO2UeJx.js → index-tbhuYbb0.js} +1 -1
  52. package/lib/index.es.js +3 -3
  53. package/lib/index.umd.js +57 -34
  54. package/lib/{layer-setting-panel-Bjnt_eL7.js → layer-setting-panel-VvDSQ-cn.js} +2 -2
  55. package/lib/{line-show-C7Nn6vkO.js → line-show-Bp4G-LqO.js} +1 -1
  56. package/lib/{multi-layout-config-Cq3yMVHR.js → multi-layout-config-drSy7ezf.js} +5 -5
  57. package/lib/{multiline-text-20qZej5M.js → multiline-text-D89kYrA2.js} +1 -1
  58. package/lib/{navigation-CYYFLmhU.js → navigation-YAGxZ0OT.js} +1 -1
  59. package/lib/page-config-Cmsi8Vpr.js +582 -0
  60. package/lib/page-tabs-wFeNBY4c.js +185 -0
  61. package/lib/{plus-CLcKk5PN.js → plus-3mdO6yXY.js} +1 -1
  62. package/lib/{requestOld-UJ_IbJZV.js → requestOld-DRcjsmRQ.js} +1 -1
  63. package/lib/{schema-EG3DcRzW.js → schema-BavJE-SK.js} +2 -2
  64. package/lib/{schema-B8SVu2jj.js → schema-BflqDw-a.js} +1 -1
  65. package/lib/{schema-D6lT1sLt.js → schema-Bo30dbBx.js} +1 -1
  66. package/lib/{schema-Blmk8VpW.js → schema-BsnIOGBI.js} +1 -1
  67. package/lib/{schema-C1vqYLAm.js → schema-_APJMUW3.js} +24 -24
  68. package/lib/{schema-C4qS2kV8.js → schema-qKI1F8Bt.js} +1 -1
  69. package/lib/{setting-panel-CoVHYjPW.js → setting-panel-BgzN3BUP.js} +91 -93
  70. package/lib/{show-DWWTez5i.js → show-C4AeWlKj.js} +13 -32
  71. package/lib/{stepper-bfTmJIGg.js → stepper-D5EFeJWG.js} +1 -1
  72. package/lib/strings-_mHAdgA4.js +6 -0
  73. package/lib/style.css +1 -0
  74. package/lib/{switch-Dxeq_HHd.js → switch-B0dR4LM_.js} +1 -1
  75. package/lib/unlock-Cq9PLhBA.js +62 -0
  76. package/lib/{use-env-url-CP2GpMCY.js → use-env-url-BM9dgwx_.js} +1 -1
  77. package/lib/use-global-config-CflpFoxU.js +115 -0
  78. package/lib/vnode-B_Dj8zxu.js +14 -0
  79. package/package.json +3 -2
  80. package/lib/ScreenPreview-DGe9FXWu.js +0 -126
  81. package/lib/index-08FGmL4D.js +0 -3744
  82. package/lib/index-Bg2serjU.js +0 -155
  83. package/lib/index-CJbqu93z.js +0 -496
  84. package/lib/index-D-A44QLA.js +0 -228
  85. package/lib/index-D6ZS8SXJ.js +0 -22369
  86. package/lib/index-DgTMT-ZH.js +0 -71
  87. package/lib/index-noVQZPd6.js +0 -133
  88. package/lib/page-config-Bw-OZliO.js +0 -257
  89. package/lib/page-tabs-DM9zkW_X.js +0 -190
  90. package/lib/styles.css +0 -1
@@ -0,0 +1,1175 @@
1
+ import { ref as L, computed as _, defineComponent as qe, reactive as pe, watch as re, provide as De, toRefs as ze, createElementBlock as Ue, openBlock as ve, normalizeClass as k, renderSlot as ee, inject as ne, onMounted as ke, onBeforeUnmount as Ke, onUpdated as lt, createVNode as ie, Fragment as ut, nextTick as Ge, useSlots as dt, unref as T, createElementVNode as Se, withCtx as ue, createBlock as ct, createCommentVNode as je, resolveDynamicComponent as pt, normalizeStyle as Re, createTextVNode as vt, toDisplayString as Ne, TransitionGroup as mt } from "vue";
2
+ import { K as ae, a5 as Ve, j as Je, b as xe, d as se, H as Ze, aa as me, F as K, k as Ye, I as He, n as Oe, bk as Ee, ak as Qe, bl as ge, y as gt, D as ht, M as yt, bm as bt, o as We, bn as Ie, w as wt, aw as Ft } from "./index-CZJriuFt.js";
3
+ import { g as de } from "./use-global-config-CflpFoxU.js";
4
+ const qt = xe({
5
+ size: {
6
+ type: String,
7
+ values: Ze
8
+ },
9
+ disabled: Boolean
10
+ }), xt = xe({
11
+ ...qt,
12
+ model: Object,
13
+ rules: {
14
+ type: se(Object)
15
+ },
16
+ labelPosition: {
17
+ type: String,
18
+ values: ["left", "right", "top"],
19
+ default: "right"
20
+ },
21
+ requireAsteriskPosition: {
22
+ type: String,
23
+ values: ["left", "right"],
24
+ default: "left"
25
+ },
26
+ labelWidth: {
27
+ type: [String, Number],
28
+ default: ""
29
+ },
30
+ labelSuffix: {
31
+ type: String,
32
+ default: ""
33
+ },
34
+ inline: Boolean,
35
+ inlineMessage: Boolean,
36
+ statusIcon: Boolean,
37
+ showMessage: {
38
+ type: Boolean,
39
+ default: !0
40
+ },
41
+ validateOnRuleChange: {
42
+ type: Boolean,
43
+ default: !0
44
+ },
45
+ hideRequiredAsterisk: Boolean,
46
+ scrollToError: Boolean,
47
+ scrollIntoViewOptions: {
48
+ type: se([Object, Boolean]),
49
+ default: !0
50
+ }
51
+ }), Ot = {
52
+ validate: (i, e, t) => (ae(i) || Ve(i)) && Je(e) && Ve(t)
53
+ }, Et = "ElForm";
54
+ function _t() {
55
+ const i = L([]), e = _(() => {
56
+ if (!i.value.length)
57
+ return "0";
58
+ const s = Math.max(...i.value);
59
+ return s ? `${s}px` : "";
60
+ });
61
+ function t(s) {
62
+ const a = i.value.indexOf(s);
63
+ return a === -1 && e.value === "0" && K(Et, `unexpected width ${s}`), a;
64
+ }
65
+ function r(s, a) {
66
+ if (s && a) {
67
+ const o = t(a);
68
+ i.value.splice(o, 1, s);
69
+ } else s && i.value.push(s);
70
+ }
71
+ function n(s) {
72
+ const a = t(s);
73
+ a > -1 && i.value.splice(a, 1);
74
+ }
75
+ return {
76
+ autoLabelWidth: e,
77
+ registerLabelWidth: r,
78
+ deregisterLabelWidth: n
79
+ };
80
+ }
81
+ const H = (i, e) => {
82
+ const t = me(e).map(
83
+ (r) => ae(r) ? r.join(".") : r
84
+ );
85
+ return t.length > 0 ? i.filter(
86
+ (r) => r.propString && t.includes(r.propString)
87
+ ) : i;
88
+ }, Q = "ElForm", Pt = qe({
89
+ name: Q,
90
+ __name: "form",
91
+ props: xt,
92
+ emits: Ot,
93
+ setup(i, { expose: e, emit: t }) {
94
+ const r = i, n = t, s = L(), a = pe([]), o = He(), f = Oe("form"), F = _(() => {
95
+ const { labelPosition: c, inline: m } = r;
96
+ return [
97
+ f.b(),
98
+ f.m(o.value || "default"),
99
+ {
100
+ [f.m(`label-${c}`)]: c,
101
+ [f.m("inline")]: m
102
+ }
103
+ ];
104
+ }), p = (c) => H(a, [c])[0], h = (c) => {
105
+ a.push(c);
106
+ }, w = (c) => {
107
+ c.prop && a.splice(a.indexOf(c), 1);
108
+ }, O = (c = []) => {
109
+ if (!r.model) {
110
+ K(Q, "model is required for resetFields to work.");
111
+ return;
112
+ }
113
+ H(a, c).forEach((m) => m.resetField());
114
+ }, P = (c = []) => {
115
+ H(a, c).forEach((m) => m.clearValidate());
116
+ }, d = _(() => {
117
+ const c = !!r.model;
118
+ return c || K(Q, "model is required for validate to work."), c;
119
+ }), y = (c) => {
120
+ if (a.length === 0)
121
+ return [];
122
+ const m = H(a, c);
123
+ return m.length ? m : (K(Q, "please pass correct props!"), []);
124
+ }, l = async (c) => v(void 0, c), R = async (c = []) => {
125
+ if (!d.value)
126
+ return !1;
127
+ const m = y(c);
128
+ if (m.length === 0)
129
+ return !0;
130
+ let x = {};
131
+ for (const E of m)
132
+ try {
133
+ await E.validate(""), E.validateState === "error" && !E.error && E.resetField();
134
+ } catch (N) {
135
+ x = {
136
+ ...x,
137
+ ...N
138
+ };
139
+ }
140
+ return Object.keys(x).length === 0 ? !0 : Promise.reject(x);
141
+ }, v = async (c = [], m) => {
142
+ let x = !1;
143
+ const E = !Qe(m);
144
+ try {
145
+ return x = await R(c), x === !0 && await m?.(x), x;
146
+ } catch (N) {
147
+ if (N instanceof Error)
148
+ throw N;
149
+ const B = N;
150
+ if (r.scrollToError && s.value) {
151
+ const $ = s.value.querySelector(`.${f.b()}-item.is-error`);
152
+ $?.scrollIntoView(r.scrollIntoViewOptions);
153
+ }
154
+ return !x && await m?.(!1, B), E && Promise.reject(B);
155
+ }
156
+ }, q = (c) => {
157
+ var m;
158
+ const x = p(c);
159
+ x && ((m = x.$el) == null || m.scrollIntoView(r.scrollIntoViewOptions));
160
+ };
161
+ return re(
162
+ () => r.rules,
163
+ () => {
164
+ r.validateOnRuleChange && l().catch((c) => K(c));
165
+ },
166
+ { deep: !0, flush: "post" }
167
+ ), De(
168
+ Ee,
169
+ pe({
170
+ ...ze(r),
171
+ emit: n,
172
+ resetFields: O,
173
+ clearValidate: P,
174
+ validateField: v,
175
+ getField: p,
176
+ addField: h,
177
+ removeField: w,
178
+ ..._t()
179
+ })
180
+ ), e({
181
+ validate: l,
182
+ validateField: v,
183
+ resetFields: O,
184
+ clearValidate: P,
185
+ scrollToField: q,
186
+ getField: p,
187
+ fields: a
188
+ }), (c, m) => (ve(), Ue(
189
+ "form",
190
+ {
191
+ ref_key: "formRef",
192
+ ref: s,
193
+ class: k(F.value)
194
+ },
195
+ [
196
+ ee(c.$slots, "default")
197
+ ],
198
+ 2
199
+ ));
200
+ }
201
+ });
202
+ var At = /* @__PURE__ */ Ye(Pt, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/form/src/form.vue"]]);
203
+ function C() {
204
+ return C = Object.assign ? Object.assign.bind() : function(i) {
205
+ for (var e = 1; e < arguments.length; e++) {
206
+ var t = arguments[e];
207
+ for (var r in t)
208
+ Object.prototype.hasOwnProperty.call(t, r) && (i[r] = t[r]);
209
+ }
210
+ return i;
211
+ }, C.apply(this, arguments);
212
+ }
213
+ function St(i, e) {
214
+ i.prototype = Object.create(e.prototype), i.prototype.constructor = i, Z(i, e);
215
+ }
216
+ function he(i) {
217
+ return he = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
218
+ return t.__proto__ || Object.getPrototypeOf(t);
219
+ }, he(i);
220
+ }
221
+ function Z(i, e) {
222
+ return Z = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, n) {
223
+ return r.__proto__ = n, r;
224
+ }, Z(i, e);
225
+ }
226
+ function jt() {
227
+ if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
228
+ if (typeof Proxy == "function") return !0;
229
+ try {
230
+ return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
231
+ })), !0;
232
+ } catch {
233
+ return !1;
234
+ }
235
+ }
236
+ function te(i, e, t) {
237
+ return jt() ? te = Reflect.construct.bind() : te = function(n, s, a) {
238
+ var o = [null];
239
+ o.push.apply(o, s);
240
+ var f = Function.bind.apply(n, o), F = new f();
241
+ return a && Z(F, a.prototype), F;
242
+ }, te.apply(null, arguments);
243
+ }
244
+ function Rt(i) {
245
+ return Function.toString.call(i).indexOf("[native code]") !== -1;
246
+ }
247
+ function ye(i) {
248
+ var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
249
+ return ye = function(r) {
250
+ if (r === null || !Rt(r)) return r;
251
+ if (typeof r != "function")
252
+ throw new TypeError("Super expression must either be null or a function");
253
+ if (typeof e < "u") {
254
+ if (e.has(r)) return e.get(r);
255
+ e.set(r, n);
256
+ }
257
+ function n() {
258
+ return te(r, arguments, he(this).constructor);
259
+ }
260
+ return n.prototype = Object.create(r.prototype, {
261
+ constructor: {
262
+ value: n,
263
+ enumerable: !1,
264
+ writable: !0,
265
+ configurable: !0
266
+ }
267
+ }), Z(n, r);
268
+ }, ye(i);
269
+ }
270
+ var Nt = /%[sdj%]/g, Xe = function() {
271
+ };
272
+ typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (Xe = function(e, t) {
273
+ typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && t.every(function(r) {
274
+ return typeof r == "string";
275
+ }) && console.warn(e, t);
276
+ });
277
+ function be(i) {
278
+ if (!i || !i.length) return null;
279
+ var e = {};
280
+ return i.forEach(function(t) {
281
+ var r = t.field;
282
+ e[r] = e[r] || [], e[r].push(t);
283
+ }), e;
284
+ }
285
+ function W(i) {
286
+ for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++)
287
+ t[r - 1] = arguments[r];
288
+ var n = 0, s = t.length;
289
+ if (typeof i == "function")
290
+ return i.apply(null, t);
291
+ if (typeof i == "string") {
292
+ var a = i.replace(Nt, function(o) {
293
+ if (o === "%%")
294
+ return "%";
295
+ if (n >= s)
296
+ return o;
297
+ switch (o) {
298
+ case "%s":
299
+ return String(t[n++]);
300
+ case "%d":
301
+ return Number(t[n++]);
302
+ case "%j":
303
+ try {
304
+ return JSON.stringify(t[n++]);
305
+ } catch {
306
+ return "[Circular]";
307
+ }
308
+ break;
309
+ default:
310
+ return o;
311
+ }
312
+ });
313
+ return a;
314
+ }
315
+ return i;
316
+ }
317
+ function Vt(i) {
318
+ return i === "string" || i === "url" || i === "hex" || i === "email" || i === "date" || i === "pattern";
319
+ }
320
+ function A(i, e) {
321
+ return !!(i == null || e === "array" && Array.isArray(i) && !i.length || Vt(e) && typeof i == "string" && !i);
322
+ }
323
+ function Wt(i, e, t) {
324
+ var r = [], n = 0, s = i.length;
325
+ function a(o) {
326
+ r.push.apply(r, o || []), n++, n === s && t(r);
327
+ }
328
+ i.forEach(function(o) {
329
+ e(o, a);
330
+ });
331
+ }
332
+ function Me(i, e, t) {
333
+ var r = 0, n = i.length;
334
+ function s(a) {
335
+ if (a && a.length) {
336
+ t(a);
337
+ return;
338
+ }
339
+ var o = r;
340
+ r = r + 1, o < n ? e(i[o], s) : t([]);
341
+ }
342
+ s([]);
343
+ }
344
+ function It(i) {
345
+ var e = [];
346
+ return Object.keys(i).forEach(function(t) {
347
+ e.push.apply(e, i[t] || []);
348
+ }), e;
349
+ }
350
+ var $e = /* @__PURE__ */ (function(i) {
351
+ St(e, i);
352
+ function e(t, r) {
353
+ var n;
354
+ return n = i.call(this, "Async Validation Error") || this, n.errors = t, n.fields = r, n;
355
+ }
356
+ return e;
357
+ })(/* @__PURE__ */ ye(Error));
358
+ function Mt(i, e, t, r, n) {
359
+ if (e.first) {
360
+ var s = new Promise(function(w, O) {
361
+ var P = function(l) {
362
+ return r(l), l.length ? O(new $e(l, be(l))) : w(n);
363
+ }, d = It(i);
364
+ Me(d, t, P);
365
+ });
366
+ return s.catch(function(w) {
367
+ return w;
368
+ }), s;
369
+ }
370
+ var a = e.firstFields === !0 ? Object.keys(i) : e.firstFields || [], o = Object.keys(i), f = o.length, F = 0, p = [], h = new Promise(function(w, O) {
371
+ var P = function(y) {
372
+ if (p.push.apply(p, y), F++, F === f)
373
+ return r(p), p.length ? O(new $e(p, be(p))) : w(n);
374
+ };
375
+ o.length || (r(p), w(n)), o.forEach(function(d) {
376
+ var y = i[d];
377
+ a.indexOf(d) !== -1 ? Me(y, t, P) : Wt(y, t, P);
378
+ });
379
+ });
380
+ return h.catch(function(w) {
381
+ return w;
382
+ }), h;
383
+ }
384
+ function $t(i) {
385
+ return !!(i && i.message !== void 0);
386
+ }
387
+ function Lt(i, e) {
388
+ for (var t = i, r = 0; r < e.length; r++) {
389
+ if (t == null)
390
+ return t;
391
+ t = t[e[r]];
392
+ }
393
+ return t;
394
+ }
395
+ function Le(i, e) {
396
+ return function(t) {
397
+ var r;
398
+ return i.fullFields ? r = Lt(e, i.fullFields) : r = e[t.field || i.fullField], $t(t) ? (t.field = t.field || i.fullField, t.fieldValue = r, t) : {
399
+ message: typeof t == "function" ? t() : t,
400
+ fieldValue: r,
401
+ field: t.field || i.fullField
402
+ };
403
+ };
404
+ }
405
+ function Be(i, e) {
406
+ if (e) {
407
+ for (var t in e)
408
+ if (e.hasOwnProperty(t)) {
409
+ var r = e[t];
410
+ typeof r == "object" && typeof i[t] == "object" ? i[t] = C({}, i[t], r) : i[t] = r;
411
+ }
412
+ }
413
+ return i;
414
+ }
415
+ var et = function(e, t, r, n, s, a) {
416
+ e.required && (!r.hasOwnProperty(e.field) || A(t, a || e.type)) && n.push(W(s.messages.required, e.fullField));
417
+ }, Bt = function(e, t, r, n, s) {
418
+ (/^\s+$/.test(t) || t === "") && n.push(W(s.messages.whitespace, e.fullField));
419
+ }, X, Tt = (function() {
420
+ if (X)
421
+ return X;
422
+ var i = "[a-fA-F\\d:]", e = function(q) {
423
+ return q && q.includeBoundaries ? "(?:(?<=\\s|^)(?=" + i + ")|(?<=" + i + ")(?=\\s|$))" : "";
424
+ }, t = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}", r = "[a-fA-F\\d]{1,4}", n = (`
425
+ (?:
426
+ (?:` + r + ":){7}(?:" + r + `|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
427
+ (?:` + r + ":){6}(?:" + t + "|:" + r + `|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
428
+ (?:` + r + ":){5}(?::" + t + "|(?::" + r + `){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
429
+ (?:` + r + ":){4}(?:(?::" + r + "){0,1}:" + t + "|(?::" + r + `){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
430
+ (?:` + r + ":){3}(?:(?::" + r + "){0,2}:" + t + "|(?::" + r + `){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
431
+ (?:` + r + ":){2}(?:(?::" + r + "){0,3}:" + t + "|(?::" + r + `){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
432
+ (?:` + r + ":){1}(?:(?::" + r + "){0,4}:" + t + "|(?::" + r + `){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
433
+ (?::(?:(?::` + r + "){0,5}:" + t + "|(?::" + r + `){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
434
+ )(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
435
+ `).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), s = new RegExp("(?:^" + t + "$)|(?:^" + n + "$)"), a = new RegExp("^" + t + "$"), o = new RegExp("^" + n + "$"), f = function(q) {
436
+ return q && q.exact ? s : new RegExp("(?:" + e(q) + t + e(q) + ")|(?:" + e(q) + n + e(q) + ")", "g");
437
+ };
438
+ f.v4 = function(v) {
439
+ return v && v.exact ? a : new RegExp("" + e(v) + t + e(v), "g");
440
+ }, f.v6 = function(v) {
441
+ return v && v.exact ? o : new RegExp("" + e(v) + n + e(v), "g");
442
+ };
443
+ var F = "(?:(?:[a-z]+:)?//)", p = "(?:\\S+(?::\\S*)?@)?", h = f.v4().source, w = f.v6().source, O = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", P = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", d = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", y = "(?::\\d{2,5})?", l = '(?:[/?#][^\\s"]*)?', R = "(?:" + F + "|www\\.)" + p + "(?:localhost|" + h + "|" + w + "|" + O + P + d + ")" + y + l;
444
+ return X = new RegExp("(?:^" + R + "$)", "i"), X;
445
+ }), Te = {
446
+ // http://emailregex.com/
447
+ email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
448
+ // url: new RegExp(
449
+ // '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$',
450
+ // 'i',
451
+ // ),
452
+ hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
453
+ }, G = {
454
+ integer: function(e) {
455
+ return G.number(e) && parseInt(e, 10) === e;
456
+ },
457
+ float: function(e) {
458
+ return G.number(e) && !G.integer(e);
459
+ },
460
+ array: function(e) {
461
+ return Array.isArray(e);
462
+ },
463
+ regexp: function(e) {
464
+ if (e instanceof RegExp)
465
+ return !0;
466
+ try {
467
+ return !!new RegExp(e);
468
+ } catch {
469
+ return !1;
470
+ }
471
+ },
472
+ date: function(e) {
473
+ return typeof e.getTime == "function" && typeof e.getMonth == "function" && typeof e.getYear == "function" && !isNaN(e.getTime());
474
+ },
475
+ number: function(e) {
476
+ return isNaN(e) ? !1 : typeof e == "number";
477
+ },
478
+ object: function(e) {
479
+ return typeof e == "object" && !G.array(e);
480
+ },
481
+ method: function(e) {
482
+ return typeof e == "function";
483
+ },
484
+ email: function(e) {
485
+ return typeof e == "string" && e.length <= 320 && !!e.match(Te.email);
486
+ },
487
+ url: function(e) {
488
+ return typeof e == "string" && e.length <= 2048 && !!e.match(Tt());
489
+ },
490
+ hex: function(e) {
491
+ return typeof e == "string" && !!e.match(Te.hex);
492
+ }
493
+ }, Ct = function(e, t, r, n, s) {
494
+ if (e.required && t === void 0) {
495
+ et(e, t, r, n, s);
496
+ return;
497
+ }
498
+ var a = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], o = e.type;
499
+ a.indexOf(o) > -1 ? G[o](t) || n.push(W(s.messages.types[o], e.fullField, e.type)) : o && typeof t !== e.type && n.push(W(s.messages.types[o], e.fullField, e.type));
500
+ }, Dt = function(e, t, r, n, s) {
501
+ var a = typeof e.len == "number", o = typeof e.min == "number", f = typeof e.max == "number", F = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, p = t, h = null, w = typeof t == "number", O = typeof t == "string", P = Array.isArray(t);
502
+ if (w ? h = "number" : O ? h = "string" : P && (h = "array"), !h)
503
+ return !1;
504
+ P && (p = t.length), O && (p = t.replace(F, "_").length), a ? p !== e.len && n.push(W(s.messages[h].len, e.fullField, e.len)) : o && !f && p < e.min ? n.push(W(s.messages[h].min, e.fullField, e.min)) : f && !o && p > e.max ? n.push(W(s.messages[h].max, e.fullField, e.max)) : o && f && (p < e.min || p > e.max) && n.push(W(s.messages[h].range, e.fullField, e.min, e.max));
505
+ }, U = "enum", zt = function(e, t, r, n, s) {
506
+ e[U] = Array.isArray(e[U]) ? e[U] : [], e[U].indexOf(t) === -1 && n.push(W(s.messages[U], e.fullField, e[U].join(", ")));
507
+ }, Ut = function(e, t, r, n, s) {
508
+ if (e.pattern) {
509
+ if (e.pattern instanceof RegExp)
510
+ e.pattern.lastIndex = 0, e.pattern.test(t) || n.push(W(s.messages.pattern.mismatch, e.fullField, t, e.pattern));
511
+ else if (typeof e.pattern == "string") {
512
+ var a = new RegExp(e.pattern);
513
+ a.test(t) || n.push(W(s.messages.pattern.mismatch, e.fullField, t, e.pattern));
514
+ }
515
+ }
516
+ }, g = {
517
+ required: et,
518
+ whitespace: Bt,
519
+ type: Ct,
520
+ range: Dt,
521
+ enum: zt,
522
+ pattern: Ut
523
+ }, kt = function(e, t, r, n, s) {
524
+ var a = [], o = e.required || !e.required && n.hasOwnProperty(e.field);
525
+ if (o) {
526
+ if (A(t, "string") && !e.required)
527
+ return r();
528
+ g.required(e, t, n, a, s, "string"), A(t, "string") || (g.type(e, t, n, a, s), g.range(e, t, n, a, s), g.pattern(e, t, n, a, s), e.whitespace === !0 && g.whitespace(e, t, n, a, s));
529
+ }
530
+ r(a);
531
+ }, Kt = function(e, t, r, n, s) {
532
+ var a = [], o = e.required || !e.required && n.hasOwnProperty(e.field);
533
+ if (o) {
534
+ if (A(t) && !e.required)
535
+ return r();
536
+ g.required(e, t, n, a, s), t !== void 0 && g.type(e, t, n, a, s);
537
+ }
538
+ r(a);
539
+ }, Gt = function(e, t, r, n, s) {
540
+ var a = [], o = e.required || !e.required && n.hasOwnProperty(e.field);
541
+ if (o) {
542
+ if (t === "" && (t = void 0), A(t) && !e.required)
543
+ return r();
544
+ g.required(e, t, n, a, s), t !== void 0 && (g.type(e, t, n, a, s), g.range(e, t, n, a, s));
545
+ }
546
+ r(a);
547
+ }, Jt = function(e, t, r, n, s) {
548
+ var a = [], o = e.required || !e.required && n.hasOwnProperty(e.field);
549
+ if (o) {
550
+ if (A(t) && !e.required)
551
+ return r();
552
+ g.required(e, t, n, a, s), t !== void 0 && g.type(e, t, n, a, s);
553
+ }
554
+ r(a);
555
+ }, Zt = function(e, t, r, n, s) {
556
+ var a = [], o = e.required || !e.required && n.hasOwnProperty(e.field);
557
+ if (o) {
558
+ if (A(t) && !e.required)
559
+ return r();
560
+ g.required(e, t, n, a, s), A(t) || g.type(e, t, n, a, s);
561
+ }
562
+ r(a);
563
+ }, Yt = function(e, t, r, n, s) {
564
+ var a = [], o = e.required || !e.required && n.hasOwnProperty(e.field);
565
+ if (o) {
566
+ if (A(t) && !e.required)
567
+ return r();
568
+ g.required(e, t, n, a, s), t !== void 0 && (g.type(e, t, n, a, s), g.range(e, t, n, a, s));
569
+ }
570
+ r(a);
571
+ }, Ht = function(e, t, r, n, s) {
572
+ var a = [], o = e.required || !e.required && n.hasOwnProperty(e.field);
573
+ if (o) {
574
+ if (A(t) && !e.required)
575
+ return r();
576
+ g.required(e, t, n, a, s), t !== void 0 && (g.type(e, t, n, a, s), g.range(e, t, n, a, s));
577
+ }
578
+ r(a);
579
+ }, Qt = function(e, t, r, n, s) {
580
+ var a = [], o = e.required || !e.required && n.hasOwnProperty(e.field);
581
+ if (o) {
582
+ if (t == null && !e.required)
583
+ return r();
584
+ g.required(e, t, n, a, s, "array"), t != null && (g.type(e, t, n, a, s), g.range(e, t, n, a, s));
585
+ }
586
+ r(a);
587
+ }, Xt = function(e, t, r, n, s) {
588
+ var a = [], o = e.required || !e.required && n.hasOwnProperty(e.field);
589
+ if (o) {
590
+ if (A(t) && !e.required)
591
+ return r();
592
+ g.required(e, t, n, a, s), t !== void 0 && g.type(e, t, n, a, s);
593
+ }
594
+ r(a);
595
+ }, er = "enum", tr = function(e, t, r, n, s) {
596
+ var a = [], o = e.required || !e.required && n.hasOwnProperty(e.field);
597
+ if (o) {
598
+ if (A(t) && !e.required)
599
+ return r();
600
+ g.required(e, t, n, a, s), t !== void 0 && g[er](e, t, n, a, s);
601
+ }
602
+ r(a);
603
+ }, rr = function(e, t, r, n, s) {
604
+ var a = [], o = e.required || !e.required && n.hasOwnProperty(e.field);
605
+ if (o) {
606
+ if (A(t, "string") && !e.required)
607
+ return r();
608
+ g.required(e, t, n, a, s), A(t, "string") || g.pattern(e, t, n, a, s);
609
+ }
610
+ r(a);
611
+ }, nr = function(e, t, r, n, s) {
612
+ var a = [], o = e.required || !e.required && n.hasOwnProperty(e.field);
613
+ if (o) {
614
+ if (A(t, "date") && !e.required)
615
+ return r();
616
+ if (g.required(e, t, n, a, s), !A(t, "date")) {
617
+ var f;
618
+ t instanceof Date ? f = t : f = new Date(t), g.type(e, f, n, a, s), f && g.range(e, f.getTime(), n, a, s);
619
+ }
620
+ }
621
+ r(a);
622
+ }, ir = function(e, t, r, n, s) {
623
+ var a = [], o = Array.isArray(t) ? "array" : typeof t;
624
+ g.required(e, t, n, a, s, o), r(a);
625
+ }, ce = function(e, t, r, n, s) {
626
+ var a = e.type, o = [], f = e.required || !e.required && n.hasOwnProperty(e.field);
627
+ if (f) {
628
+ if (A(t, a) && !e.required)
629
+ return r();
630
+ g.required(e, t, n, o, s, a), A(t, a) || g.type(e, t, n, o, s);
631
+ }
632
+ r(o);
633
+ }, ar = function(e, t, r, n, s) {
634
+ var a = [], o = e.required || !e.required && n.hasOwnProperty(e.field);
635
+ if (o) {
636
+ if (A(t) && !e.required)
637
+ return r();
638
+ g.required(e, t, n, a, s);
639
+ }
640
+ r(a);
641
+ }, J = {
642
+ string: kt,
643
+ method: Kt,
644
+ number: Gt,
645
+ boolean: Jt,
646
+ regexp: Zt,
647
+ integer: Yt,
648
+ float: Ht,
649
+ array: Qt,
650
+ object: Xt,
651
+ enum: tr,
652
+ pattern: rr,
653
+ date: nr,
654
+ url: ce,
655
+ hex: ce,
656
+ email: ce,
657
+ required: ir,
658
+ any: ar
659
+ };
660
+ function we() {
661
+ return {
662
+ default: "Validation error on field %s",
663
+ required: "%s is required",
664
+ enum: "%s must be one of %s",
665
+ whitespace: "%s cannot be empty",
666
+ date: {
667
+ format: "%s date %s is invalid for format %s",
668
+ parse: "%s date could not be parsed, %s is invalid ",
669
+ invalid: "%s date %s is invalid"
670
+ },
671
+ types: {
672
+ string: "%s is not a %s",
673
+ method: "%s is not a %s (function)",
674
+ array: "%s is not an %s",
675
+ object: "%s is not an %s",
676
+ number: "%s is not a %s",
677
+ date: "%s is not a %s",
678
+ boolean: "%s is not a %s",
679
+ integer: "%s is not an %s",
680
+ float: "%s is not a %s",
681
+ regexp: "%s is not a valid %s",
682
+ email: "%s is not a valid %s",
683
+ url: "%s is not a valid %s",
684
+ hex: "%s is not a valid %s"
685
+ },
686
+ string: {
687
+ len: "%s must be exactly %s characters",
688
+ min: "%s must be at least %s characters",
689
+ max: "%s cannot be longer than %s characters",
690
+ range: "%s must be between %s and %s characters"
691
+ },
692
+ number: {
693
+ len: "%s must equal %s",
694
+ min: "%s cannot be less than %s",
695
+ max: "%s cannot be greater than %s",
696
+ range: "%s must be between %s and %s"
697
+ },
698
+ array: {
699
+ len: "%s must be exactly %s in length",
700
+ min: "%s cannot be less than %s in length",
701
+ max: "%s cannot be greater than %s in length",
702
+ range: "%s must be between %s and %s in length"
703
+ },
704
+ pattern: {
705
+ mismatch: "%s value %s does not match pattern %s"
706
+ },
707
+ clone: function() {
708
+ var e = JSON.parse(JSON.stringify(this));
709
+ return e.clone = this.clone, e;
710
+ }
711
+ };
712
+ }
713
+ var Fe = we(), Y = /* @__PURE__ */ (function() {
714
+ function i(t) {
715
+ this.rules = null, this._messages = Fe, this.define(t);
716
+ }
717
+ var e = i.prototype;
718
+ return e.define = function(r) {
719
+ var n = this;
720
+ if (!r)
721
+ throw new Error("Cannot configure a schema with no rules");
722
+ if (typeof r != "object" || Array.isArray(r))
723
+ throw new Error("Rules must be an object");
724
+ this.rules = {}, Object.keys(r).forEach(function(s) {
725
+ var a = r[s];
726
+ n.rules[s] = Array.isArray(a) ? a : [a];
727
+ });
728
+ }, e.messages = function(r) {
729
+ return r && (this._messages = Be(we(), r)), this._messages;
730
+ }, e.validate = function(r, n, s) {
731
+ var a = this;
732
+ n === void 0 && (n = {}), s === void 0 && (s = function() {
733
+ });
734
+ var o = r, f = n, F = s;
735
+ if (typeof f == "function" && (F = f, f = {}), !this.rules || Object.keys(this.rules).length === 0)
736
+ return F && F(null, o), Promise.resolve(o);
737
+ function p(d) {
738
+ var y = [], l = {};
739
+ function R(q) {
740
+ if (Array.isArray(q)) {
741
+ var c;
742
+ y = (c = y).concat.apply(c, q);
743
+ } else
744
+ y.push(q);
745
+ }
746
+ for (var v = 0; v < d.length; v++)
747
+ R(d[v]);
748
+ y.length ? (l = be(y), F(y, l)) : F(null, o);
749
+ }
750
+ if (f.messages) {
751
+ var h = this.messages();
752
+ h === Fe && (h = we()), Be(h, f.messages), f.messages = h;
753
+ } else
754
+ f.messages = this.messages();
755
+ var w = {}, O = f.keys || Object.keys(this.rules);
756
+ O.forEach(function(d) {
757
+ var y = a.rules[d], l = o[d];
758
+ y.forEach(function(R) {
759
+ var v = R;
760
+ typeof v.transform == "function" && (o === r && (o = C({}, o)), l = o[d] = v.transform(l)), typeof v == "function" ? v = {
761
+ validator: v
762
+ } : v = C({}, v), v.validator = a.getValidationMethod(v), v.validator && (v.field = d, v.fullField = v.fullField || d, v.type = a.getType(v), w[d] = w[d] || [], w[d].push({
763
+ rule: v,
764
+ value: l,
765
+ source: o,
766
+ field: d
767
+ }));
768
+ });
769
+ });
770
+ var P = {};
771
+ return Mt(w, f, function(d, y) {
772
+ var l = d.rule, R = (l.type === "object" || l.type === "array") && (typeof l.fields == "object" || typeof l.defaultField == "object");
773
+ R = R && (l.required || !l.required && d.value), l.field = d.field;
774
+ function v(m, x) {
775
+ return C({}, x, {
776
+ fullField: l.fullField + "." + m,
777
+ fullFields: l.fullFields ? [].concat(l.fullFields, [m]) : [m]
778
+ });
779
+ }
780
+ function q(m) {
781
+ m === void 0 && (m = []);
782
+ var x = Array.isArray(m) ? m : [m];
783
+ !f.suppressWarning && x.length && i.warning("async-validator:", x), x.length && l.message !== void 0 && (x = [].concat(l.message));
784
+ var E = x.map(Le(l, o));
785
+ if (f.first && E.length)
786
+ return P[l.field] = 1, y(E);
787
+ if (!R)
788
+ y(E);
789
+ else {
790
+ if (l.required && !d.value)
791
+ return l.message !== void 0 ? E = [].concat(l.message).map(Le(l, o)) : f.error && (E = [f.error(l, W(f.messages.required, l.field))]), y(E);
792
+ var N = {};
793
+ l.defaultField && Object.keys(d.value).map(function(V) {
794
+ N[V] = l.defaultField;
795
+ }), N = C({}, N, d.rule.fields);
796
+ var B = {};
797
+ Object.keys(N).forEach(function(V) {
798
+ var I = N[V], oe = Array.isArray(I) ? I : [I];
799
+ B[V] = oe.map(v.bind(null, V));
800
+ });
801
+ var $ = new i(B);
802
+ $.messages(f.messages), d.rule.options && (d.rule.options.messages = f.messages, d.rule.options.error = f.error), $.validate(d.value, d.rule.options || f, function(V) {
803
+ var I = [];
804
+ E && E.length && I.push.apply(I, E), V && V.length && I.push.apply(I, V), y(I.length ? I : null);
805
+ });
806
+ }
807
+ }
808
+ var c;
809
+ if (l.asyncValidator)
810
+ c = l.asyncValidator(l, d.value, q, d.source, f);
811
+ else if (l.validator) {
812
+ try {
813
+ c = l.validator(l, d.value, q, d.source, f);
814
+ } catch (m) {
815
+ console.error?.(m), f.suppressValidatorError || setTimeout(function() {
816
+ throw m;
817
+ }, 0), q(m.message);
818
+ }
819
+ c === !0 ? q() : c === !1 ? q(typeof l.message == "function" ? l.message(l.fullField || l.field) : l.message || (l.fullField || l.field) + " fails") : c instanceof Array ? q(c) : c instanceof Error && q(c.message);
820
+ }
821
+ c && c.then && c.then(function() {
822
+ return q();
823
+ }, function(m) {
824
+ return q(m);
825
+ });
826
+ }, function(d) {
827
+ p(d);
828
+ }, o);
829
+ }, e.getType = function(r) {
830
+ if (r.type === void 0 && r.pattern instanceof RegExp && (r.type = "pattern"), typeof r.validator != "function" && r.type && !J.hasOwnProperty(r.type))
831
+ throw new Error(W("Unknown rule type %s", r.type));
832
+ return r.type || "string";
833
+ }, e.getValidationMethod = function(r) {
834
+ if (typeof r.validator == "function")
835
+ return r.validator;
836
+ var n = Object.keys(r), s = n.indexOf("message");
837
+ return s !== -1 && n.splice(s, 1), n.length === 1 && n[0] === "required" ? J.required : J[this.getType(r)] || void 0;
838
+ }, i;
839
+ })();
840
+ Y.register = function(e, t) {
841
+ if (typeof t != "function")
842
+ throw new Error("Cannot register a validator by type, validator is not a function");
843
+ J[e] = t;
844
+ };
845
+ Y.warning = Xe;
846
+ Y.messages = Fe;
847
+ Y.validators = J;
848
+ const sr = [
849
+ "",
850
+ "error",
851
+ "validating",
852
+ "success"
853
+ ], or = xe({
854
+ label: String,
855
+ labelWidth: {
856
+ type: [String, Number]
857
+ },
858
+ labelPosition: {
859
+ type: String,
860
+ values: ["left", "right", "top", ""],
861
+ default: ""
862
+ },
863
+ prop: {
864
+ type: se([String, Array])
865
+ },
866
+ required: {
867
+ type: Boolean,
868
+ default: void 0
869
+ },
870
+ rules: {
871
+ type: se([Object, Array])
872
+ },
873
+ error: String,
874
+ validateStatus: {
875
+ type: String,
876
+ values: sr
877
+ },
878
+ for: String,
879
+ inlineMessage: {
880
+ type: Boolean,
881
+ default: void 0
882
+ },
883
+ showMessage: {
884
+ type: Boolean,
885
+ default: !0
886
+ },
887
+ size: {
888
+ type: String,
889
+ values: Ze
890
+ }
891
+ }), Ce = "ElLabelWrap";
892
+ var fr = qe({
893
+ name: Ce,
894
+ props: {
895
+ isAutoWidth: Boolean,
896
+ updateAll: Boolean
897
+ },
898
+ setup(i, {
899
+ slots: e
900
+ }) {
901
+ const t = ne(Ee, void 0), r = ne(ge);
902
+ r || gt(Ce, "usage: <el-form-item><label-wrap /></el-form-item>");
903
+ const n = Oe("form"), s = L(), a = L(0), o = () => {
904
+ var p;
905
+ if ((p = s.value) != null && p.firstElementChild) {
906
+ const h = window.getComputedStyle(s.value.firstElementChild).width;
907
+ return Math.ceil(Number.parseFloat(h));
908
+ } else
909
+ return 0;
910
+ }, f = (p = "update") => {
911
+ Ge(() => {
912
+ e.default && i.isAutoWidth && (p === "update" ? a.value = o() : p === "remove" && t?.deregisterLabelWidth(a.value));
913
+ });
914
+ }, F = () => f("update");
915
+ return ke(() => {
916
+ F();
917
+ }), Ke(() => {
918
+ f("remove");
919
+ }), lt(() => F()), re(a, (p, h) => {
920
+ i.updateAll && t?.registerLabelWidth(p, h);
921
+ }), ht(_(() => {
922
+ var p, h;
923
+ return (h = (p = s.value) == null ? void 0 : p.firstElementChild) != null ? h : null;
924
+ }), F), () => {
925
+ var p, h;
926
+ if (!e)
927
+ return null;
928
+ const {
929
+ isAutoWidth: w
930
+ } = i;
931
+ if (w) {
932
+ const O = t?.autoLabelWidth, P = r?.hasLabel, d = {};
933
+ if (P && O && O !== "auto") {
934
+ const y = Math.max(0, Number.parseInt(O, 10) - a.value), R = (r.labelPosition || t.labelPosition) === "left" ? "marginRight" : "marginLeft";
935
+ y && (d[R] = `${y}px`);
936
+ }
937
+ return ie("div", {
938
+ ref: s,
939
+ class: [n.be("item", "label-wrap")],
940
+ style: d
941
+ }, [(p = e.default) == null ? void 0 : p.call(e)]);
942
+ } else
943
+ return ie(ut, {
944
+ ref: s
945
+ }, [(h = e.default) == null ? void 0 : h.call(e)]);
946
+ };
947
+ }
948
+ });
949
+ const lr = ["role", "aria-labelledby"], ur = qe({
950
+ name: "ElFormItem",
951
+ __name: "form-item",
952
+ props: or,
953
+ setup(i, { expose: e }) {
954
+ const t = i, r = dt(), n = ne(Ee, void 0), s = ne(ge, void 0), a = He(void 0, { formItem: !1 }), o = Oe("form-item"), f = yt().value, F = L([]), p = L(""), h = bt(p, 100), w = L(""), O = L();
955
+ let P, d = !1;
956
+ const y = _(
957
+ () => t.labelPosition || n?.labelPosition
958
+ ), l = _(() => {
959
+ var u;
960
+ return y.value === "top" ? {} : { width: We((u = t.labelWidth) != null ? u : n?.labelWidth) };
961
+ }), R = _(() => {
962
+ var u;
963
+ if (y.value === "top" || n?.inline)
964
+ return {};
965
+ if (!t.label && !t.labelWidth && B)
966
+ return {};
967
+ const b = We((u = t.labelWidth) != null ? u : n?.labelWidth);
968
+ return !t.label && !r.label ? { marginLeft: b } : {};
969
+ }), v = _(() => [
970
+ o.b(),
971
+ o.m(a.value),
972
+ o.is("error", p.value === "error"),
973
+ o.is("validating", p.value === "validating"),
974
+ o.is("success", p.value === "success"),
975
+ o.is("required", rt.value || t.required),
976
+ o.is("no-asterisk", n?.hideRequiredAsterisk),
977
+ n?.requireAsteriskPosition === "right" ? "asterisk-right" : "asterisk-left",
978
+ {
979
+ [o.m("feedback")]: n?.statusIcon,
980
+ [o.m(`label-${y.value}`)]: y.value
981
+ }
982
+ ]), q = _(
983
+ () => Je(t.inlineMessage) ? t.inlineMessage : n?.inlineMessage || !1
984
+ ), c = _(() => [
985
+ o.e("error"),
986
+ { [o.em("error", "inline")]: q.value }
987
+ ]), m = _(() => t.prop ? ae(t.prop) ? t.prop.join(".") : t.prop : ""), x = _(() => !!(t.label || r.label)), E = _(() => {
988
+ var u;
989
+ return (u = t.for) != null ? u : F.value.length === 1 ? F.value[0] : void 0;
990
+ }), N = _(() => !E.value && x.value), B = !!s, $ = _(() => {
991
+ const u = n?.model;
992
+ if (!(!u || !t.prop))
993
+ return de(u, t.prop).value;
994
+ }), V = _(() => {
995
+ const { required: u } = t, b = [];
996
+ t.rules && b.push(...me(t.rules));
997
+ const j = n?.rules;
998
+ if (j && t.prop) {
999
+ const S = de(
1000
+ j,
1001
+ t.prop
1002
+ ).value;
1003
+ S && b.push(...me(S));
1004
+ }
1005
+ if (u !== void 0) {
1006
+ const S = b.map((M, z) => [M, z]).filter(([M]) => "required" in M);
1007
+ if (S.length > 0)
1008
+ for (const [M, z] of S)
1009
+ M.required !== u && (b[z] = { ...M, required: u });
1010
+ else
1011
+ b.push({ required: u });
1012
+ }
1013
+ return b;
1014
+ }), I = _(() => V.value.length > 0), oe = (u) => V.value.filter((j) => !j.trigger || !u ? !0 : ae(j.trigger) ? j.trigger.includes(u) : j.trigger === u).map(({ trigger: j, ...S }) => S), rt = _(
1015
+ () => V.value.some((u) => u.required)
1016
+ ), nt = _(
1017
+ () => {
1018
+ var u;
1019
+ return h.value === "error" && t.showMessage && ((u = n?.showMessage) != null ? u : !0);
1020
+ }
1021
+ ), _e = _(
1022
+ () => `${t.label || ""}${n?.labelSuffix || ""}`
1023
+ ), D = (u) => {
1024
+ p.value = u;
1025
+ }, it = (u) => {
1026
+ var b, j;
1027
+ const { errors: S, fields: M } = u;
1028
+ (!S || !M) && console.error(u), D("error"), w.value = S ? (j = (b = S?.[0]) == null ? void 0 : b.message) != null ? j : `${t.prop} is required` : "", n?.emit("validate", t.prop, !1, w.value);
1029
+ }, at = () => {
1030
+ D("success"), n?.emit("validate", t.prop, !0, "");
1031
+ }, st = async (u) => {
1032
+ const b = m.value;
1033
+ return new Y({
1034
+ [b]: u
1035
+ }).validate({ [b]: $.value }, { firstFields: !0 }).then(() => (at(), !0)).catch((S) => (it(S), Promise.reject(S)));
1036
+ }, Pe = async (u, b) => {
1037
+ if (d || !t.prop)
1038
+ return !1;
1039
+ const j = Qe(b);
1040
+ if (!I.value)
1041
+ return b?.(!1), !1;
1042
+ const S = oe(u);
1043
+ return S.length === 0 ? (b?.(!0), !0) : (D("validating"), st(S).then(() => (b?.(!0), !0)).catch((M) => {
1044
+ const { fields: z } = M;
1045
+ return b?.(!1, z), j ? !1 : Promise.reject(z);
1046
+ }));
1047
+ }, fe = () => {
1048
+ D(""), w.value = "", d = !1;
1049
+ }, Ae = async () => {
1050
+ const u = n?.model;
1051
+ if (!u || !t.prop)
1052
+ return;
1053
+ const b = de(u, t.prop);
1054
+ d = !0, b.value = Ie(P), await Ge(), fe(), d = !1;
1055
+ }, ot = (u) => {
1056
+ F.value.includes(u) || F.value.push(u);
1057
+ }, ft = (u) => {
1058
+ F.value = F.value.filter((b) => b !== u);
1059
+ };
1060
+ re(
1061
+ () => t.error,
1062
+ (u) => {
1063
+ w.value = u || "", D(u ? "error" : "");
1064
+ },
1065
+ { immediate: !0 }
1066
+ ), re(
1067
+ () => t.validateStatus,
1068
+ (u) => D(u || "")
1069
+ );
1070
+ const le = pe({
1071
+ ...ze(t),
1072
+ $el: O,
1073
+ size: a,
1074
+ validateMessage: w,
1075
+ validateState: p,
1076
+ labelId: f,
1077
+ inputIds: F,
1078
+ isGroup: N,
1079
+ hasLabel: x,
1080
+ fieldValue: $,
1081
+ addInputId: ot,
1082
+ removeInputId: ft,
1083
+ resetField: Ae,
1084
+ clearValidate: fe,
1085
+ validate: Pe,
1086
+ propString: m
1087
+ });
1088
+ return De(ge, le), ke(() => {
1089
+ t.prop && (n?.addField(le), P = Ie($.value));
1090
+ }), Ke(() => {
1091
+ n?.removeField(le);
1092
+ }), e({
1093
+ size: a,
1094
+ validateMessage: w,
1095
+ validateState: p,
1096
+ validate: Pe,
1097
+ clearValidate: fe,
1098
+ resetField: Ae
1099
+ }), (u, b) => {
1100
+ var j;
1101
+ return ve(), Ue("div", {
1102
+ ref_key: "formItemRef",
1103
+ ref: O,
1104
+ class: k(v.value),
1105
+ role: N.value ? "group" : void 0,
1106
+ "aria-labelledby": N.value ? T(f) : void 0
1107
+ }, [
1108
+ ie(T(fr), {
1109
+ "is-auto-width": l.value.width === "auto",
1110
+ "update-all": ((j = T(n)) == null ? void 0 : j.labelWidth) === "auto"
1111
+ }, {
1112
+ default: ue(() => [
1113
+ u.label || u.$slots.label ? (ve(), ct(pt(E.value ? "label" : "div"), {
1114
+ key: 0,
1115
+ id: T(f),
1116
+ for: E.value,
1117
+ class: k(T(o).e("label")),
1118
+ style: Re(l.value)
1119
+ }, {
1120
+ default: ue(() => [
1121
+ ee(u.$slots, "label", { label: _e.value }, () => [
1122
+ vt(
1123
+ Ne(_e.value),
1124
+ 1
1125
+ )
1126
+ ])
1127
+ ]),
1128
+ _: 3
1129
+ }, 8, ["id", "for", "class", "style"])) : je("v-if", !0)
1130
+ ]),
1131
+ _: 3
1132
+ }, 8, ["is-auto-width", "update-all"]),
1133
+ Se(
1134
+ "div",
1135
+ {
1136
+ class: k(T(o).e("content")),
1137
+ style: Re(R.value)
1138
+ },
1139
+ [
1140
+ ee(u.$slots, "default"),
1141
+ ie(mt, {
1142
+ name: `${T(o).namespace.value}-zoom-in-top`
1143
+ }, {
1144
+ default: ue(() => [
1145
+ nt.value ? ee(u.$slots, "error", {
1146
+ key: 0,
1147
+ error: w.value
1148
+ }, () => [
1149
+ Se(
1150
+ "div",
1151
+ {
1152
+ class: k(c.value)
1153
+ },
1154
+ Ne(w.value),
1155
+ 3
1156
+ )
1157
+ ]) : je("v-if", !0)
1158
+ ]),
1159
+ _: 3
1160
+ }, 8, ["name"])
1161
+ ],
1162
+ 6
1163
+ )
1164
+ ], 10, lr);
1165
+ };
1166
+ }
1167
+ });
1168
+ var tt = /* @__PURE__ */ Ye(ur, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/form/src/form-item.vue"]]);
1169
+ const vr = wt(At, {
1170
+ FormItem: tt
1171
+ }), mr = Ft(tt);
1172
+ export {
1173
+ vr as E,
1174
+ mr as a
1175
+ };