st-comp 0.0.200 → 0.0.202

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 (154) hide show
  1. package/components.d.ts +3 -0
  2. package/es/ChartLayout.js +4 -4
  3. package/es/ConfigProvider.cjs +1 -1
  4. package/es/ConfigProvider.js +1 -1
  5. package/es/CustomFunction.cjs +1 -1
  6. package/es/CustomFunction.js +44 -40
  7. package/es/FactorWarning.cjs +1 -1
  8. package/es/FactorWarning.js +84 -78
  9. package/es/Kline.cjs +1 -1
  10. package/es/Kline.js +21 -19
  11. package/es/KlineBasic.cjs +1 -1
  12. package/es/KlineBasic.js +30 -28
  13. package/es/KlineConfig.cjs +1 -1
  14. package/es/KlineConfig.js +345 -331
  15. package/es/KlineNew.cjs +1 -1
  16. package/es/KlineNew.js +20 -18
  17. package/es/KlinePlus.cjs +4 -4
  18. package/es/KlinePlus.js +610 -588
  19. package/es/MonacoEditor.cjs +1 -1
  20. package/es/MonacoEditor.js +2 -2
  21. package/es/Pagination.cjs +1 -1
  22. package/es/Pagination.js +74 -72
  23. package/es/PasswordPrompt.cjs +1 -1
  24. package/es/PasswordPrompt.js +9 -157
  25. package/es/Pie.cjs +1 -1
  26. package/es/Pie.js +1 -1
  27. package/es/Table.cjs +1 -1
  28. package/es/Table.js +56 -52
  29. package/es/User.cjs +1 -1
  30. package/es/User.js +1313 -1
  31. package/es/VarSelectDialog.cjs +1 -1
  32. package/es/VarSelectDialog.js +28 -26
  33. package/es/VarietyAutoComplete.cjs +1 -1
  34. package/es/VarietyAutoComplete.js +19 -18
  35. package/es/VarietySearch.cjs +8 -8
  36. package/es/VarietySearch.js +704 -697
  37. package/es/VarietyTextCopy.cjs +1 -1
  38. package/es/VarietyTextCopy.js +12 -12
  39. package/es/VirtualTable.cjs +1 -1
  40. package/es/VirtualTable.js +80 -79
  41. package/es/{el-popover-5421d52a.cjs → _initCloneObject-52b6a510.cjs} +1 -1
  42. package/es/{el-popover-7a1c6412.js → _initCloneObject-eaef9418.js} +9 -9
  43. package/es/{base-8348063b.js → base-a5af3db3.js} +38 -38
  44. package/es/{castArray-3f45c3ec.js → castArray-7741a212.js} +1 -1
  45. package/es/{config-provider-eb0460f1.cjs → config-provider-a584d81e.cjs} +1 -1
  46. package/es/{config-provider-1a687690.js → config-provider-b16efd62.js} +6 -6
  47. package/es/debounce-62f5b6e8.cjs +1 -0
  48. package/es/debounce-8d53f4dd.js +83 -0
  49. package/es/dropdown-071c5d7e.cjs +1 -0
  50. package/es/dropdown-a59bba73.js +178 -0
  51. package/es/el-autocomplete-a07e9439.cjs +1 -0
  52. package/es/{el-autocomplete-d4cd96cd.js → el-autocomplete-ba808eb6.js} +16 -16
  53. package/es/{el-button-2e680390.js → el-button-c95adb85.js} +33 -33
  54. package/es/{el-button-4ccd7122.cjs → el-button-eec58cff.cjs} +1 -1
  55. package/es/el-checkbox-7421ccd3.js +459 -0
  56. package/es/el-checkbox-c25236a6.cjs +1 -0
  57. package/es/el-checkbox-group-0ea8fbf8.cjs +1 -0
  58. package/es/el-checkbox-group-4ed993c7.js +1 -0
  59. package/es/{el-dialog-bafc4b2b.js → el-dialog-41ab8417.js} +7 -6
  60. package/es/{el-dialog-6413b4af.cjs → el-dialog-ae86edb8.cjs} +1 -1
  61. package/es/{el-divider-93b0ee21.js → el-divider-4e059794.js} +1 -1
  62. package/es/{el-empty-56783dca.js → el-empty-33cb66f1.js} +3 -3
  63. package/es/el-form-item-c3fe189b.cjs +12 -0
  64. package/es/el-form-item-c53c374d.js +1269 -0
  65. package/es/{el-input-735575f4.js → el-input-2f75c4ba.js} +34 -34
  66. package/es/{el-input-6c5ac889.cjs → el-input-7fd293af.cjs} +1 -1
  67. package/es/{el-input-number-d5770776.cjs → el-input-number-22e21d16.cjs} +1 -1
  68. package/es/{el-input-number-6634a6ea.js → el-input-number-5193fe6d.js} +35 -35
  69. package/es/{el-loading-98dcebee.cjs → el-loading-cfd86c15.cjs} +1 -1
  70. package/es/{el-loading-049dacc5.js → el-loading-f6022062.js} +5 -5
  71. package/es/{el-menu-item-828bc6fa.cjs → el-menu-item-17dc717e.cjs} +1 -1
  72. package/es/{el-menu-item-8a210e21.js → el-menu-item-7e881203.js} +22 -22
  73. package/es/{el-message-a1ac37d4.cjs → el-message-5e6a6be9.cjs} +1 -1
  74. package/es/el-message-box-a93d2f6a.js +489 -0
  75. package/es/el-message-box-c10adb52.cjs +1 -0
  76. package/es/{el-message-def216ae.js → el-message-e544a8f5.js} +24 -24
  77. package/es/{el-overlay-4ea38eab.js → el-overlay-09ad71cd.js} +51 -51
  78. package/es/{el-overlay-69dfacb6.cjs → el-overlay-9e34965f.cjs} +1 -1
  79. package/es/{el-popconfirm-bdeceeb7.cjs → el-popconfirm-70a976bf.cjs} +1 -1
  80. package/es/{el-popconfirm-aace1104.js → el-popconfirm-81dcd202.js} +20 -20
  81. package/es/el-popover-0ea8fbf8.cjs +1 -0
  82. package/es/el-popover-4ed993c7.js +1 -0
  83. package/es/{el-popper-986a8371.js → el-popper-b4f97157.js} +115 -112
  84. package/es/{el-popper-b962125f.cjs → el-popper-b6c99b28.cjs} +1 -1
  85. package/es/el-scrollbar-323542e7.js +34 -0
  86. package/es/el-scrollbar-bc3f790d.cjs +1 -0
  87. package/es/{el-segmented-f892ec18.js → el-segmented-b868d074.js} +8 -8
  88. package/es/{el-segmented-6b057ed5.cjs → el-segmented-f8fce9ac.cjs} +1 -1
  89. package/es/{el-select-2189a8ac.js → el-select-95627997.js} +42 -41
  90. package/es/el-select-d8d91db1.cjs +1 -0
  91. package/es/el-table-column-376cd907.js +3432 -0
  92. package/es/el-table-column-c974cb96.cjs +14 -0
  93. package/es/{el-tag-75a7573a.js → el-tag-66cab138.js} +16 -16
  94. package/es/{el-tag-a15520b3.cjs → el-tag-a33c4b22.cjs} +1 -1
  95. package/es/{el-checkbox-group-e26a4533.js → el-text-ac60d0f2.js} +16 -16
  96. package/es/{el-checkbox-group-dfdad075.cjs → el-text-c20a9f48.cjs} +1 -1
  97. package/es/{index-1fb95601.cjs → index-098c2447.cjs} +1 -1
  98. package/es/{index-16802b35.cjs → index-11547a0c.cjs} +1 -1
  99. package/es/index-1f7d4f70.js +157 -0
  100. package/es/{index-680be212.cjs → index-298075cf.cjs} +1 -1
  101. package/es/index-57672682.js +113 -0
  102. package/es/{index-9cfb6ccf.js → index-7ed0999e.js} +2 -0
  103. package/es/{index-f3a86049.js → index-844bdd85.js} +29 -29
  104. package/es/index-88546436.js +163 -0
  105. package/es/{index-cc200b99.cjs → index-8901a38c.cjs} +1 -1
  106. package/es/{index-e00ee015.js → index-960806da.js} +36 -36
  107. package/es/index-9b9ef5dd.cjs +1 -0
  108. package/es/{index-847d58bc.js → index-a871c3eb.js} +92 -62
  109. package/es/{index-780e7fd2.js → index-bc8e277e.js} +2 -2
  110. package/es/{index-5e0314ac.cjs → index-c108567d.cjs} +1 -1
  111. package/es/{index-78381381.cjs → index-d725fef6.cjs} +2 -2
  112. package/es/{index-14c88a1a.js → index-d77a7336.js} +1 -1
  113. package/es/{index-f45c2897.js → index-d91dc23f.js} +20 -20
  114. package/es/{index-c94b9543.js → index-e5566b94.js} +43 -43
  115. package/es/index-f3562b52.cjs +1 -0
  116. package/es/index-f967d6c1.cjs +1 -0
  117. package/es/{python-2e916d28.cjs → python-c27ba105.cjs} +1 -1
  118. package/es/{python-7cf0b6ba.js → python-ecde9ff2.js} +2 -2
  119. package/es/{raf-8e5f0699.js → raf-80ef0c0a.js} +1 -1
  120. package/es/{scroll-c43468ab.js → scroll-679bd6bf.js} +1 -1
  121. package/es/style.css +1 -1
  122. package/es/{use-form-common-props-e6cba60f.js → use-form-common-props-815d48a6.js} +69 -69
  123. package/es/{use-form-common-props-d8866dc6.cjs → use-form-common-props-fd9b61a0.cjs} +1 -1
  124. package/es/{use-global-config-72d50e62.cjs → use-global-config-30d7d8ce.cjs} +1 -1
  125. package/es/{use-global-config-76ff2e3e.js → use-global-config-b5e9d3d5.js} +14 -14
  126. package/es/{validator-e759d43d.cjs → validator-1b8a6128.cjs} +1 -1
  127. package/es/{validator-220652c5.js → validator-764a9db0.js} +1 -1
  128. package/es/vnode-5ddb7ed1.js +14 -0
  129. package/es/vnode-b906ae6d.cjs +1 -0
  130. package/es/{zh-cn-33e7aee6.cjs → zh-cn-90317f62.cjs} +1 -1
  131. package/es/{zh-cn-c7fa42ea.js → zh-cn-e963c628.js} +2 -2
  132. package/lib/bundle.js +1 -1
  133. package/lib/bundle.umd.cjs +156 -156
  134. package/lib/{index-410c490f.js → index-a45d1494.js} +11238 -11207
  135. package/lib/{python-589861d2.js → python-82d17c8d.js} +1 -1
  136. package/lib/style.css +1 -1
  137. package/package.json +1 -1
  138. package/packages/KlineConfig/config.js +2 -0
  139. package/packages/KlineConfig/index.vue +9 -0
  140. package/packages/KlinePlus/index.vue +18 -8
  141. package/packages/KlinePlus/utils.js +41 -5
  142. package/src/pages/KlinePlus/index.vue +6 -5
  143. package/es/el-autocomplete-86c0d989.cjs +0 -1
  144. package/es/el-form-item-41becb31.js +0 -1749
  145. package/es/el-form-item-95476197.cjs +0 -12
  146. package/es/el-scrollbar-139aa96d.cjs +0 -1
  147. package/es/el-scrollbar-cdadd788.js +0 -115
  148. package/es/el-select-e1046cc6.cjs +0 -1
  149. package/es/el-table-column-91d69c86.js +0 -3882
  150. package/es/el-table-column-f1c4af89.cjs +0 -14
  151. package/es/index-56ea97a9.js +0 -122
  152. package/es/index-8583c047.cjs +0 -1
  153. package/es/index-ce63356a.cjs +0 -1
  154. package/es/index-db1e1861.js +0 -318
@@ -0,0 +1,1269 @@
1
+ import { ref as B, computed as E, defineComponent as H, reactive as ve, watch as ne, provide as Qe, toRefs as Xe, openBlock as ye, createElementBlock as ke, normalizeClass as K, unref as q, renderSlot as ee, inject as ie, onMounted as et, onBeforeUnmount as tt, onUpdated as Et, createVNode as ae, Fragment as St, nextTick as rt, useSlots as Tt, withCtx as pe, createBlock as _t, resolveDynamicComponent as Pt, normalizeStyle as Ie, createTextVNode as $t, toDisplayString as Me, createCommentVNode as Ne, createElementVNode as Re, TransitionGroup as It } from "vue";
2
+ import { q as Mt, r as Nt, k as nt, e as it, s as qe, t as he, u as Rt } from "./use-form-common-props-815d48a6.js";
3
+ import { b as je, e as oe, j as se, c as Le, o as at, u as Ee, _ as ot, x as st, B as Lt, n as Ve, w as Vt, l as Bt } from "./base-a5af3db3.js";
4
+ import { c as be } from "./castArray-7741a212.js";
5
+ import { d as Wt, b as Ct } from "./el-popper-b4f97157.js";
6
+ import { S as Be, a as ft, i as Dt, c as Ut, u as zt } from "./index-960806da.js";
7
+ import { g as ge } from "./use-global-config-b5e9d3d5.js";
8
+ import { k as lt, g as ut, s as Gt, d as Kt, e as Se, n as fe, f as dt, b as Yt, S as Jt, h as Zt } from "./index-e5566b94.js";
9
+ import { c as le, k as Te, g as Ht, e as ct, d as Qt, a as Xt, b as kt, i as er } from "./_initCloneObject-eaef9418.js";
10
+ function tr(r, e) {
11
+ for (var t = -1, n = r == null ? 0 : r.length; ++t < n && e(r[t], t, r) !== !1; )
12
+ ;
13
+ return r;
14
+ }
15
+ function rr(r, e) {
16
+ return r && le(e, lt(e), r);
17
+ }
18
+ function nr(r, e) {
19
+ return r && le(e, Te(e), r);
20
+ }
21
+ function ir(r, e) {
22
+ return le(r, ut(r), e);
23
+ }
24
+ var ar = Object.getOwnPropertySymbols, or = ar ? function(r) {
25
+ for (var e = []; r; )
26
+ Mt(e, ut(r)), r = Ht(r);
27
+ return e;
28
+ } : Gt;
29
+ const pt = or;
30
+ function sr(r, e) {
31
+ return le(r, pt(r), e);
32
+ }
33
+ function fr(r) {
34
+ return Kt(r, Te, pt);
35
+ }
36
+ var lr = Object.prototype, ur = lr.hasOwnProperty;
37
+ function dr(r) {
38
+ var e = r.length, t = new r.constructor(e);
39
+ return e && typeof r[0] == "string" && ur.call(r, "index") && (t.index = r.index, t.input = r.input), t;
40
+ }
41
+ function cr(r, e) {
42
+ var t = e ? ct(r.buffer) : r.buffer;
43
+ return new r.constructor(t, r.byteOffset, r.byteLength);
44
+ }
45
+ var pr = /\w*$/;
46
+ function gr(r) {
47
+ var e = new r.constructor(r.source, pr.exec(r));
48
+ return e.lastIndex = r.lastIndex, e;
49
+ }
50
+ var We = Be ? Be.prototype : void 0, Ce = We ? We.valueOf : void 0;
51
+ function mr(r) {
52
+ return Ce ? Object(Ce.call(r)) : {};
53
+ }
54
+ var vr = "[object Boolean]", yr = "[object Date]", hr = "[object Map]", br = "[object Number]", wr = "[object RegExp]", Fr = "[object Set]", xr = "[object String]", Ar = "[object Symbol]", Or = "[object ArrayBuffer]", qr = "[object DataView]", jr = "[object Float32Array]", Er = "[object Float64Array]", Sr = "[object Int8Array]", Tr = "[object Int16Array]", _r = "[object Int32Array]", Pr = "[object Uint8Array]", $r = "[object Uint8ClampedArray]", Ir = "[object Uint16Array]", Mr = "[object Uint32Array]";
55
+ function Nr(r, e, t) {
56
+ var n = r.constructor;
57
+ switch (e) {
58
+ case Or:
59
+ return ct(r);
60
+ case vr:
61
+ case yr:
62
+ return new n(+r);
63
+ case qr:
64
+ return cr(r, t);
65
+ case jr:
66
+ case Er:
67
+ case Sr:
68
+ case Tr:
69
+ case _r:
70
+ case Pr:
71
+ case $r:
72
+ case Ir:
73
+ case Mr:
74
+ return Qt(r, t);
75
+ case hr:
76
+ return new n();
77
+ case br:
78
+ case xr:
79
+ return new n(r);
80
+ case wr:
81
+ return gr(r);
82
+ case Fr:
83
+ return new n();
84
+ case Ar:
85
+ return mr(r);
86
+ }
87
+ }
88
+ var Rr = "[object Map]";
89
+ function Lr(r) {
90
+ return ft(r) && Se(r) == Rr;
91
+ }
92
+ var De = fe && fe.isMap, Vr = De ? dt(De) : Lr;
93
+ const Br = Vr;
94
+ var Wr = "[object Set]";
95
+ function Cr(r) {
96
+ return ft(r) && Se(r) == Wr;
97
+ }
98
+ var Ue = fe && fe.isSet, Dr = Ue ? dt(Ue) : Cr;
99
+ const Ur = Dr;
100
+ var zr = 1, Gr = 2, Kr = 4, gt = "[object Arguments]", Yr = "[object Array]", Jr = "[object Boolean]", Zr = "[object Date]", Hr = "[object Error]", mt = "[object Function]", Qr = "[object GeneratorFunction]", Xr = "[object Map]", kr = "[object Number]", vt = "[object Object]", en = "[object RegExp]", tn = "[object Set]", rn = "[object String]", nn = "[object Symbol]", an = "[object WeakMap]", on = "[object ArrayBuffer]", sn = "[object DataView]", fn = "[object Float32Array]", ln = "[object Float64Array]", un = "[object Int8Array]", dn = "[object Int16Array]", cn = "[object Int32Array]", pn = "[object Uint8Array]", gn = "[object Uint8ClampedArray]", mn = "[object Uint16Array]", vn = "[object Uint32Array]", A = {};
101
+ A[gt] = A[Yr] = A[on] = A[sn] = A[Jr] = A[Zr] = A[fn] = A[ln] = A[un] = A[dn] = A[cn] = A[Xr] = A[kr] = A[vt] = A[en] = A[tn] = A[rn] = A[nn] = A[pn] = A[gn] = A[mn] = A[vn] = !0;
102
+ A[Hr] = A[mt] = A[an] = !1;
103
+ function te(r, e, t, n, i, a) {
104
+ var o, s = e & zr, l = e & Gr, w = e & Kr;
105
+ if (t && (o = i ? t(r, n, i, a) : t(r)), o !== void 0)
106
+ return o;
107
+ if (!Dt(r))
108
+ return r;
109
+ var p = Ut(r);
110
+ if (p) {
111
+ if (o = dr(r), !s)
112
+ return Xt(r, o);
113
+ } else {
114
+ var m = Se(r), b = m == mt || m == Qr;
115
+ if (Yt(r))
116
+ return kt(r, s);
117
+ if (m == vt || m == gt || b && !i) {
118
+ if (o = l || b ? {} : er(r), !s)
119
+ return l ? sr(r, nr(o, r)) : ir(r, rr(o, r));
120
+ } else {
121
+ if (!A[m])
122
+ return i ? r : {};
123
+ o = Nr(r, m, s);
124
+ }
125
+ }
126
+ a || (a = new Jt());
127
+ var O = a.get(r);
128
+ if (O)
129
+ return O;
130
+ a.set(r, o), Ur(r) ? r.forEach(function(g) {
131
+ o.add(te(g, e, t, g, r, a));
132
+ }) : Br(r) && r.forEach(function(g, f) {
133
+ o.set(f, te(g, e, t, f, r, a));
134
+ });
135
+ var j = w ? l ? fr : Zt : l ? Te : lt, d = p ? void 0 : j(r);
136
+ return tr(d || r, function(g, f) {
137
+ d && (f = g, g = r[f]), Nt(o, f, te(g, e, t, f, r, a));
138
+ }), o;
139
+ }
140
+ var yn = 4;
141
+ function ze(r) {
142
+ return te(r, yn);
143
+ }
144
+ const hn = je({
145
+ size: {
146
+ type: String,
147
+ values: nt
148
+ },
149
+ disabled: Boolean
150
+ }), bn = je({
151
+ ...hn,
152
+ model: Object,
153
+ rules: {
154
+ type: oe(Object)
155
+ },
156
+ labelPosition: {
157
+ type: String,
158
+ values: ["left", "right", "top"],
159
+ default: "right"
160
+ },
161
+ requireAsteriskPosition: {
162
+ type: String,
163
+ values: ["left", "right"],
164
+ default: "left"
165
+ },
166
+ labelWidth: {
167
+ type: [String, Number],
168
+ default: ""
169
+ },
170
+ labelSuffix: {
171
+ type: String,
172
+ default: ""
173
+ },
174
+ inline: Boolean,
175
+ inlineMessage: Boolean,
176
+ statusIcon: Boolean,
177
+ showMessage: {
178
+ type: Boolean,
179
+ default: !0
180
+ },
181
+ validateOnRuleChange: {
182
+ type: Boolean,
183
+ default: !0
184
+ },
185
+ hideRequiredAsterisk: Boolean,
186
+ scrollToError: Boolean,
187
+ scrollIntoViewOptions: {
188
+ type: oe([Object, Boolean]),
189
+ default: !0
190
+ }
191
+ }), wn = {
192
+ validate: (r, e, t) => (se(r) || Le(r)) && at(e) && Le(t)
193
+ };
194
+ function Fn() {
195
+ const r = B([]), e = E(() => {
196
+ if (!r.value.length)
197
+ return "0";
198
+ const a = Math.max(...r.value);
199
+ return a ? `${a}px` : "";
200
+ });
201
+ function t(a) {
202
+ const o = r.value.indexOf(a);
203
+ return o === -1 && e.value, o;
204
+ }
205
+ function n(a, o) {
206
+ if (a && o) {
207
+ const s = t(o);
208
+ r.value.splice(s, 1, a);
209
+ } else
210
+ a && r.value.push(a);
211
+ }
212
+ function i(a) {
213
+ const o = t(a);
214
+ o > -1 && r.value.splice(o, 1);
215
+ }
216
+ return {
217
+ autoLabelWidth: e,
218
+ registerLabelWidth: n,
219
+ deregisterLabelWidth: i
220
+ };
221
+ }
222
+ const X = (r, e) => {
223
+ const t = be(e).map((n) => se(n) ? n.join(".") : n);
224
+ return t.length > 0 ? r.filter((n) => n.propString && t.includes(n.propString)) : r;
225
+ }, xn = "ElForm", An = H({
226
+ name: xn
227
+ }), On = /* @__PURE__ */ H({
228
+ ...An,
229
+ props: bn,
230
+ emits: wn,
231
+ setup(r, { expose: e, emit: t }) {
232
+ const n = r, i = B(), a = ve([]), o = it(), s = Ee("form"), l = E(() => {
233
+ const { labelPosition: u, inline: y } = n;
234
+ return [
235
+ s.b(),
236
+ s.m(o.value || "default"),
237
+ {
238
+ [s.m(`label-${u}`)]: u,
239
+ [s.m("inline")]: y
240
+ }
241
+ ];
242
+ }), w = (u) => X(a, [u])[0], p = (u) => {
243
+ a.push(u);
244
+ }, m = (u) => {
245
+ u.prop && a.splice(a.indexOf(u), 1);
246
+ }, b = (u = []) => {
247
+ n.model && X(a, u).forEach((y) => y.resetField());
248
+ }, O = (u = []) => {
249
+ X(a, u).forEach((y) => y.clearValidate());
250
+ }, j = E(() => !!n.model), d = (u) => {
251
+ if (a.length === 0)
252
+ return [];
253
+ const y = X(a, u);
254
+ return y.length ? y : [];
255
+ }, g = async (u) => $(void 0, u), f = async (u = []) => {
256
+ if (!j.value)
257
+ return !1;
258
+ const y = d(u);
259
+ if (y.length === 0)
260
+ return !0;
261
+ let F = {};
262
+ for (const _ of y)
263
+ try {
264
+ await _.validate(""), _.validateState === "error" && !_.error && _.resetField();
265
+ } catch (S) {
266
+ F = {
267
+ ...F,
268
+ ...S
269
+ };
270
+ }
271
+ return Object.keys(F).length === 0 ? !0 : Promise.reject(F);
272
+ }, $ = async (u = [], y) => {
273
+ let F = !1;
274
+ const _ = !st(y);
275
+ try {
276
+ return F = await f(u), F === !0 && await (y == null ? void 0 : y(F)), F;
277
+ } catch (S) {
278
+ if (S instanceof Error)
279
+ throw S;
280
+ const R = S;
281
+ if (n.scrollToError && i.value) {
282
+ const W = i.value.querySelector(`.${s.b()}-item.is-error`);
283
+ W == null || W.scrollIntoView(n.scrollIntoViewOptions);
284
+ }
285
+ return !F && await (y == null ? void 0 : y(!1, R)), _ && Promise.reject(R);
286
+ }
287
+ }, v = (u) => {
288
+ var y;
289
+ const F = w(u);
290
+ F && ((y = F.$el) == null || y.scrollIntoView(n.scrollIntoViewOptions));
291
+ };
292
+ return ne(() => n.rules, () => {
293
+ n.validateOnRuleChange && g().catch((u) => Wt());
294
+ }, { deep: !0, flush: "post" }), Qe(qe, ve({
295
+ ...Xe(n),
296
+ emit: t,
297
+ resetFields: b,
298
+ clearValidate: O,
299
+ validateField: $,
300
+ getField: w,
301
+ addField: p,
302
+ removeField: m,
303
+ ...Fn()
304
+ })), e({
305
+ validate: g,
306
+ validateField: $,
307
+ resetFields: b,
308
+ clearValidate: O,
309
+ scrollToField: v,
310
+ getField: w,
311
+ fields: a
312
+ }), (u, y) => (ye(), ke("form", {
313
+ ref_key: "formRef",
314
+ ref: i,
315
+ class: K(q(l))
316
+ }, [
317
+ ee(u.$slots, "default")
318
+ ], 2));
319
+ }
320
+ });
321
+ var qn = /* @__PURE__ */ ot(On, [["__file", "form.vue"]]);
322
+ function C() {
323
+ return C = Object.assign ? Object.assign.bind() : function(r) {
324
+ for (var e = 1; e < arguments.length; e++) {
325
+ var t = arguments[e];
326
+ for (var n in t)
327
+ Object.prototype.hasOwnProperty.call(t, n) && (r[n] = t[n]);
328
+ }
329
+ return r;
330
+ }, C.apply(this, arguments);
331
+ }
332
+ function jn(r, e) {
333
+ r.prototype = Object.create(e.prototype), r.prototype.constructor = r, Z(r, e);
334
+ }
335
+ function we(r) {
336
+ return we = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
337
+ return t.__proto__ || Object.getPrototypeOf(t);
338
+ }, we(r);
339
+ }
340
+ function Z(r, e) {
341
+ return Z = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, i) {
342
+ return n.__proto__ = i, n;
343
+ }, Z(r, e);
344
+ }
345
+ function En() {
346
+ if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
347
+ return !1;
348
+ if (typeof Proxy == "function")
349
+ return !0;
350
+ try {
351
+ return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
352
+ })), !0;
353
+ } catch {
354
+ return !1;
355
+ }
356
+ }
357
+ function re(r, e, t) {
358
+ return En() ? re = Reflect.construct.bind() : re = function(i, a, o) {
359
+ var s = [null];
360
+ s.push.apply(s, a);
361
+ var l = Function.bind.apply(i, s), w = new l();
362
+ return o && Z(w, o.prototype), w;
363
+ }, re.apply(null, arguments);
364
+ }
365
+ function Sn(r) {
366
+ return Function.toString.call(r).indexOf("[native code]") !== -1;
367
+ }
368
+ function Fe(r) {
369
+ var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
370
+ return Fe = function(n) {
371
+ if (n === null || !Sn(n))
372
+ return n;
373
+ if (typeof n != "function")
374
+ throw new TypeError("Super expression must either be null or a function");
375
+ if (typeof e < "u") {
376
+ if (e.has(n))
377
+ return e.get(n);
378
+ e.set(n, i);
379
+ }
380
+ function i() {
381
+ return re(n, arguments, we(this).constructor);
382
+ }
383
+ return i.prototype = Object.create(n.prototype, {
384
+ constructor: {
385
+ value: i,
386
+ enumerable: !1,
387
+ writable: !0,
388
+ configurable: !0
389
+ }
390
+ }), Z(i, n);
391
+ }, Fe(r);
392
+ }
393
+ var Tn = /%[sdj%]/g, yt = function() {
394
+ };
395
+ typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (yt = function(e, t) {
396
+ typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && t.every(function(n) {
397
+ return typeof n == "string";
398
+ }) && console.warn(e, t);
399
+ });
400
+ function xe(r) {
401
+ if (!r || !r.length)
402
+ return null;
403
+ var e = {};
404
+ return r.forEach(function(t) {
405
+ var n = t.field;
406
+ e[n] = e[n] || [], e[n].push(t);
407
+ }), e;
408
+ }
409
+ function N(r) {
410
+ for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
411
+ t[n - 1] = arguments[n];
412
+ var i = 0, a = t.length;
413
+ if (typeof r == "function")
414
+ return r.apply(null, t);
415
+ if (typeof r == "string") {
416
+ var o = r.replace(Tn, function(s) {
417
+ if (s === "%%")
418
+ return "%";
419
+ if (i >= a)
420
+ return s;
421
+ switch (s) {
422
+ case "%s":
423
+ return String(t[i++]);
424
+ case "%d":
425
+ return Number(t[i++]);
426
+ case "%j":
427
+ try {
428
+ return JSON.stringify(t[i++]);
429
+ } catch {
430
+ return "[Circular]";
431
+ }
432
+ break;
433
+ default:
434
+ return s;
435
+ }
436
+ });
437
+ return o;
438
+ }
439
+ return r;
440
+ }
441
+ function _n(r) {
442
+ return r === "string" || r === "url" || r === "hex" || r === "email" || r === "date" || r === "pattern";
443
+ }
444
+ function T(r, e) {
445
+ return !!(r == null || e === "array" && Array.isArray(r) && !r.length || _n(e) && typeof r == "string" && !r);
446
+ }
447
+ function Pn(r, e, t) {
448
+ var n = [], i = 0, a = r.length;
449
+ function o(s) {
450
+ n.push.apply(n, s || []), i++, i === a && t(n);
451
+ }
452
+ r.forEach(function(s) {
453
+ e(s, o);
454
+ });
455
+ }
456
+ function Ge(r, e, t) {
457
+ var n = 0, i = r.length;
458
+ function a(o) {
459
+ if (o && o.length) {
460
+ t(o);
461
+ return;
462
+ }
463
+ var s = n;
464
+ n = n + 1, s < i ? e(r[s], a) : t([]);
465
+ }
466
+ a([]);
467
+ }
468
+ function $n(r) {
469
+ var e = [];
470
+ return Object.keys(r).forEach(function(t) {
471
+ e.push.apply(e, r[t] || []);
472
+ }), e;
473
+ }
474
+ var Ke = /* @__PURE__ */ function(r) {
475
+ jn(e, r);
476
+ function e(t, n) {
477
+ var i;
478
+ return i = r.call(this, "Async Validation Error") || this, i.errors = t, i.fields = n, i;
479
+ }
480
+ return e;
481
+ }(/* @__PURE__ */ Fe(Error));
482
+ function In(r, e, t, n, i) {
483
+ if (e.first) {
484
+ var a = new Promise(function(b, O) {
485
+ var j = function(f) {
486
+ return n(f), f.length ? O(new Ke(f, xe(f))) : b(i);
487
+ }, d = $n(r);
488
+ Ge(d, t, j);
489
+ });
490
+ return a.catch(function(b) {
491
+ return b;
492
+ }), a;
493
+ }
494
+ var o = e.firstFields === !0 ? Object.keys(r) : e.firstFields || [], s = Object.keys(r), l = s.length, w = 0, p = [], m = new Promise(function(b, O) {
495
+ var j = function(g) {
496
+ if (p.push.apply(p, g), w++, w === l)
497
+ return n(p), p.length ? O(new Ke(p, xe(p))) : b(i);
498
+ };
499
+ s.length || (n(p), b(i)), s.forEach(function(d) {
500
+ var g = r[d];
501
+ o.indexOf(d) !== -1 ? Ge(g, t, j) : Pn(g, t, j);
502
+ });
503
+ });
504
+ return m.catch(function(b) {
505
+ return b;
506
+ }), m;
507
+ }
508
+ function Mn(r) {
509
+ return !!(r && r.message !== void 0);
510
+ }
511
+ function Nn(r, e) {
512
+ for (var t = r, n = 0; n < e.length; n++) {
513
+ if (t == null)
514
+ return t;
515
+ t = t[e[n]];
516
+ }
517
+ return t;
518
+ }
519
+ function Ye(r, e) {
520
+ return function(t) {
521
+ var n;
522
+ return r.fullFields ? n = Nn(e, r.fullFields) : n = e[t.field || r.fullField], Mn(t) ? (t.field = t.field || r.fullField, t.fieldValue = n, t) : {
523
+ message: typeof t == "function" ? t() : t,
524
+ fieldValue: n,
525
+ field: t.field || r.fullField
526
+ };
527
+ };
528
+ }
529
+ function Je(r, e) {
530
+ if (e) {
531
+ for (var t in e)
532
+ if (e.hasOwnProperty(t)) {
533
+ var n = e[t];
534
+ typeof n == "object" && typeof r[t] == "object" ? r[t] = C({}, r[t], n) : r[t] = n;
535
+ }
536
+ }
537
+ return r;
538
+ }
539
+ var ht = function(e, t, n, i, a, o) {
540
+ e.required && (!n.hasOwnProperty(e.field) || T(t, o || e.type)) && i.push(N(a.messages.required, e.fullField));
541
+ }, Rn = function(e, t, n, i, a) {
542
+ (/^\s+$/.test(t) || t === "") && i.push(N(a.messages.whitespace, e.fullField));
543
+ }, k, Ln = function() {
544
+ if (k)
545
+ return k;
546
+ var r = "[a-fA-F\\d:]", e = function(u) {
547
+ return u && u.includeBoundaries ? "(?:(?<=\\s|^)(?=" + r + ")|(?<=" + r + ")(?=\\s|$))" : "";
548
+ }, 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}", n = "[a-fA-F\\d]{1,4}", i = (`
549
+ (?:
550
+ (?:` + n + ":){7}(?:" + n + `|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
551
+ (?:` + n + ":){6}(?:" + t + "|:" + n + `|:)| // 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
552
+ (?:` + n + ":){5}(?::" + t + "|(?::" + n + `){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
553
+ (?:` + n + ":){4}(?:(?::" + n + "){0,1}:" + t + "|(?::" + n + `){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
554
+ (?:` + n + ":){3}(?:(?::" + n + "){0,2}:" + t + "|(?::" + n + `){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
555
+ (?:` + n + ":){2}(?:(?::" + n + "){0,3}:" + t + "|(?::" + n + `){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
556
+ (?:` + n + ":){1}(?:(?::" + n + "){0,4}:" + t + "|(?::" + n + `){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
557
+ (?::(?:(?::` + n + "){0,5}:" + t + "|(?::" + n + `){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
558
+ )(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
559
+ `).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), a = new RegExp("(?:^" + t + "$)|(?:^" + i + "$)"), o = new RegExp("^" + t + "$"), s = new RegExp("^" + i + "$"), l = function(u) {
560
+ return u && u.exact ? a : new RegExp("(?:" + e(u) + t + e(u) + ")|(?:" + e(u) + i + e(u) + ")", "g");
561
+ };
562
+ l.v4 = function(v) {
563
+ return v && v.exact ? o : new RegExp("" + e(v) + t + e(v), "g");
564
+ }, l.v6 = function(v) {
565
+ return v && v.exact ? s : new RegExp("" + e(v) + i + e(v), "g");
566
+ };
567
+ var w = "(?:(?:[a-z]+:)?//)", p = "(?:\\S+(?::\\S*)?@)?", m = l.v4().source, b = l.v6().source, O = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", j = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", d = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", g = "(?::\\d{2,5})?", f = '(?:[/?#][^\\s"]*)?', $ = "(?:" + w + "|www\\.)" + p + "(?:localhost|" + m + "|" + b + "|" + O + j + d + ")" + g + f;
568
+ return k = new RegExp("(?:^" + $ + "$)", "i"), k;
569
+ }, Ze = {
570
+ // http://emailregex.com/
571
+ 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,}))$/,
572
+ // url: new RegExp(
573
+ // '^(?!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]*)?$',
574
+ // 'i',
575
+ // ),
576
+ hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
577
+ }, Y = {
578
+ integer: function(e) {
579
+ return Y.number(e) && parseInt(e, 10) === e;
580
+ },
581
+ float: function(e) {
582
+ return Y.number(e) && !Y.integer(e);
583
+ },
584
+ array: function(e) {
585
+ return Array.isArray(e);
586
+ },
587
+ regexp: function(e) {
588
+ if (e instanceof RegExp)
589
+ return !0;
590
+ try {
591
+ return !!new RegExp(e);
592
+ } catch {
593
+ return !1;
594
+ }
595
+ },
596
+ date: function(e) {
597
+ return typeof e.getTime == "function" && typeof e.getMonth == "function" && typeof e.getYear == "function" && !isNaN(e.getTime());
598
+ },
599
+ number: function(e) {
600
+ return isNaN(e) ? !1 : typeof e == "number";
601
+ },
602
+ object: function(e) {
603
+ return typeof e == "object" && !Y.array(e);
604
+ },
605
+ method: function(e) {
606
+ return typeof e == "function";
607
+ },
608
+ email: function(e) {
609
+ return typeof e == "string" && e.length <= 320 && !!e.match(Ze.email);
610
+ },
611
+ url: function(e) {
612
+ return typeof e == "string" && e.length <= 2048 && !!e.match(Ln());
613
+ },
614
+ hex: function(e) {
615
+ return typeof e == "string" && !!e.match(Ze.hex);
616
+ }
617
+ }, Vn = function(e, t, n, i, a) {
618
+ if (e.required && t === void 0) {
619
+ ht(e, t, n, i, a);
620
+ return;
621
+ }
622
+ var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], s = e.type;
623
+ o.indexOf(s) > -1 ? Y[s](t) || i.push(N(a.messages.types[s], e.fullField, e.type)) : s && typeof t !== e.type && i.push(N(a.messages.types[s], e.fullField, e.type));
624
+ }, Bn = function(e, t, n, i, a) {
625
+ var o = typeof e.len == "number", s = typeof e.min == "number", l = typeof e.max == "number", w = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, p = t, m = null, b = typeof t == "number", O = typeof t == "string", j = Array.isArray(t);
626
+ if (b ? m = "number" : O ? m = "string" : j && (m = "array"), !m)
627
+ return !1;
628
+ j && (p = t.length), O && (p = t.replace(w, "_").length), o ? p !== e.len && i.push(N(a.messages[m].len, e.fullField, e.len)) : s && !l && p < e.min ? i.push(N(a.messages[m].min, e.fullField, e.min)) : l && !s && p > e.max ? i.push(N(a.messages[m].max, e.fullField, e.max)) : s && l && (p < e.min || p > e.max) && i.push(N(a.messages[m].range, e.fullField, e.min, e.max));
629
+ }, G = "enum", Wn = function(e, t, n, i, a) {
630
+ e[G] = Array.isArray(e[G]) ? e[G] : [], e[G].indexOf(t) === -1 && i.push(N(a.messages[G], e.fullField, e[G].join(", ")));
631
+ }, Cn = function(e, t, n, i, a) {
632
+ if (e.pattern) {
633
+ if (e.pattern instanceof RegExp)
634
+ e.pattern.lastIndex = 0, e.pattern.test(t) || i.push(N(a.messages.pattern.mismatch, e.fullField, t, e.pattern));
635
+ else if (typeof e.pattern == "string") {
636
+ var o = new RegExp(e.pattern);
637
+ o.test(t) || i.push(N(a.messages.pattern.mismatch, e.fullField, t, e.pattern));
638
+ }
639
+ }
640
+ }, h = {
641
+ required: ht,
642
+ whitespace: Rn,
643
+ type: Vn,
644
+ range: Bn,
645
+ enum: Wn,
646
+ pattern: Cn
647
+ }, Dn = function(e, t, n, i, a) {
648
+ var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
649
+ if (s) {
650
+ if (T(t, "string") && !e.required)
651
+ return n();
652
+ h.required(e, t, i, o, a, "string"), T(t, "string") || (h.type(e, t, i, o, a), h.range(e, t, i, o, a), h.pattern(e, t, i, o, a), e.whitespace === !0 && h.whitespace(e, t, i, o, a));
653
+ }
654
+ n(o);
655
+ }, Un = function(e, t, n, i, a) {
656
+ var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
657
+ if (s) {
658
+ if (T(t) && !e.required)
659
+ return n();
660
+ h.required(e, t, i, o, a), t !== void 0 && h.type(e, t, i, o, a);
661
+ }
662
+ n(o);
663
+ }, zn = function(e, t, n, i, a) {
664
+ var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
665
+ if (s) {
666
+ if (t === "" && (t = void 0), T(t) && !e.required)
667
+ return n();
668
+ h.required(e, t, i, o, a), t !== void 0 && (h.type(e, t, i, o, a), h.range(e, t, i, o, a));
669
+ }
670
+ n(o);
671
+ }, Gn = function(e, t, n, i, a) {
672
+ var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
673
+ if (s) {
674
+ if (T(t) && !e.required)
675
+ return n();
676
+ h.required(e, t, i, o, a), t !== void 0 && h.type(e, t, i, o, a);
677
+ }
678
+ n(o);
679
+ }, Kn = function(e, t, n, i, a) {
680
+ var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
681
+ if (s) {
682
+ if (T(t) && !e.required)
683
+ return n();
684
+ h.required(e, t, i, o, a), T(t) || h.type(e, t, i, o, a);
685
+ }
686
+ n(o);
687
+ }, Yn = function(e, t, n, i, a) {
688
+ var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
689
+ if (s) {
690
+ if (T(t) && !e.required)
691
+ return n();
692
+ h.required(e, t, i, o, a), t !== void 0 && (h.type(e, t, i, o, a), h.range(e, t, i, o, a));
693
+ }
694
+ n(o);
695
+ }, Jn = function(e, t, n, i, a) {
696
+ var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
697
+ if (s) {
698
+ if (T(t) && !e.required)
699
+ return n();
700
+ h.required(e, t, i, o, a), t !== void 0 && (h.type(e, t, i, o, a), h.range(e, t, i, o, a));
701
+ }
702
+ n(o);
703
+ }, Zn = function(e, t, n, i, a) {
704
+ var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
705
+ if (s) {
706
+ if (t == null && !e.required)
707
+ return n();
708
+ h.required(e, t, i, o, a, "array"), t != null && (h.type(e, t, i, o, a), h.range(e, t, i, o, a));
709
+ }
710
+ n(o);
711
+ }, Hn = function(e, t, n, i, a) {
712
+ var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
713
+ if (s) {
714
+ if (T(t) && !e.required)
715
+ return n();
716
+ h.required(e, t, i, o, a), t !== void 0 && h.type(e, t, i, o, a);
717
+ }
718
+ n(o);
719
+ }, Qn = "enum", Xn = function(e, t, n, i, a) {
720
+ var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
721
+ if (s) {
722
+ if (T(t) && !e.required)
723
+ return n();
724
+ h.required(e, t, i, o, a), t !== void 0 && h[Qn](e, t, i, o, a);
725
+ }
726
+ n(o);
727
+ }, kn = function(e, t, n, i, a) {
728
+ var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
729
+ if (s) {
730
+ if (T(t, "string") && !e.required)
731
+ return n();
732
+ h.required(e, t, i, o, a), T(t, "string") || h.pattern(e, t, i, o, a);
733
+ }
734
+ n(o);
735
+ }, ei = function(e, t, n, i, a) {
736
+ var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
737
+ if (s) {
738
+ if (T(t, "date") && !e.required)
739
+ return n();
740
+ if (h.required(e, t, i, o, a), !T(t, "date")) {
741
+ var l;
742
+ t instanceof Date ? l = t : l = new Date(t), h.type(e, l, i, o, a), l && h.range(e, l.getTime(), i, o, a);
743
+ }
744
+ }
745
+ n(o);
746
+ }, ti = function(e, t, n, i, a) {
747
+ var o = [], s = Array.isArray(t) ? "array" : typeof t;
748
+ h.required(e, t, i, o, a, s), n(o);
749
+ }, me = function(e, t, n, i, a) {
750
+ var o = e.type, s = [], l = e.required || !e.required && i.hasOwnProperty(e.field);
751
+ if (l) {
752
+ if (T(t, o) && !e.required)
753
+ return n();
754
+ h.required(e, t, i, s, a, o), T(t, o) || h.type(e, t, i, s, a);
755
+ }
756
+ n(s);
757
+ }, ri = function(e, t, n, i, a) {
758
+ var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
759
+ if (s) {
760
+ if (T(t) && !e.required)
761
+ return n();
762
+ h.required(e, t, i, o, a);
763
+ }
764
+ n(o);
765
+ }, J = {
766
+ string: Dn,
767
+ method: Un,
768
+ number: zn,
769
+ boolean: Gn,
770
+ regexp: Kn,
771
+ integer: Yn,
772
+ float: Jn,
773
+ array: Zn,
774
+ object: Hn,
775
+ enum: Xn,
776
+ pattern: kn,
777
+ date: ei,
778
+ url: me,
779
+ hex: me,
780
+ email: me,
781
+ required: ti,
782
+ any: ri
783
+ };
784
+ function Ae() {
785
+ return {
786
+ default: "Validation error on field %s",
787
+ required: "%s is required",
788
+ enum: "%s must be one of %s",
789
+ whitespace: "%s cannot be empty",
790
+ date: {
791
+ format: "%s date %s is invalid for format %s",
792
+ parse: "%s date could not be parsed, %s is invalid ",
793
+ invalid: "%s date %s is invalid"
794
+ },
795
+ types: {
796
+ string: "%s is not a %s",
797
+ method: "%s is not a %s (function)",
798
+ array: "%s is not an %s",
799
+ object: "%s is not an %s",
800
+ number: "%s is not a %s",
801
+ date: "%s is not a %s",
802
+ boolean: "%s is not a %s",
803
+ integer: "%s is not an %s",
804
+ float: "%s is not a %s",
805
+ regexp: "%s is not a valid %s",
806
+ email: "%s is not a valid %s",
807
+ url: "%s is not a valid %s",
808
+ hex: "%s is not a valid %s"
809
+ },
810
+ string: {
811
+ len: "%s must be exactly %s characters",
812
+ min: "%s must be at least %s characters",
813
+ max: "%s cannot be longer than %s characters",
814
+ range: "%s must be between %s and %s characters"
815
+ },
816
+ number: {
817
+ len: "%s must equal %s",
818
+ min: "%s cannot be less than %s",
819
+ max: "%s cannot be greater than %s",
820
+ range: "%s must be between %s and %s"
821
+ },
822
+ array: {
823
+ len: "%s must be exactly %s in length",
824
+ min: "%s cannot be less than %s in length",
825
+ max: "%s cannot be greater than %s in length",
826
+ range: "%s must be between %s and %s in length"
827
+ },
828
+ pattern: {
829
+ mismatch: "%s value %s does not match pattern %s"
830
+ },
831
+ clone: function() {
832
+ var e = JSON.parse(JSON.stringify(this));
833
+ return e.clone = this.clone, e;
834
+ }
835
+ };
836
+ }
837
+ var Oe = Ae(), Q = /* @__PURE__ */ function() {
838
+ function r(t) {
839
+ this.rules = null, this._messages = Oe, this.define(t);
840
+ }
841
+ var e = r.prototype;
842
+ return e.define = function(n) {
843
+ var i = this;
844
+ if (!n)
845
+ throw new Error("Cannot configure a schema with no rules");
846
+ if (typeof n != "object" || Array.isArray(n))
847
+ throw new Error("Rules must be an object");
848
+ this.rules = {}, Object.keys(n).forEach(function(a) {
849
+ var o = n[a];
850
+ i.rules[a] = Array.isArray(o) ? o : [o];
851
+ });
852
+ }, e.messages = function(n) {
853
+ return n && (this._messages = Je(Ae(), n)), this._messages;
854
+ }, e.validate = function(n, i, a) {
855
+ var o = this;
856
+ i === void 0 && (i = {}), a === void 0 && (a = function() {
857
+ });
858
+ var s = n, l = i, w = a;
859
+ if (typeof l == "function" && (w = l, l = {}), !this.rules || Object.keys(this.rules).length === 0)
860
+ return w && w(null, s), Promise.resolve(s);
861
+ function p(d) {
862
+ var g = [], f = {};
863
+ function $(u) {
864
+ if (Array.isArray(u)) {
865
+ var y;
866
+ g = (y = g).concat.apply(y, u);
867
+ } else
868
+ g.push(u);
869
+ }
870
+ for (var v = 0; v < d.length; v++)
871
+ $(d[v]);
872
+ g.length ? (f = xe(g), w(g, f)) : w(null, s);
873
+ }
874
+ if (l.messages) {
875
+ var m = this.messages();
876
+ m === Oe && (m = Ae()), Je(m, l.messages), l.messages = m;
877
+ } else
878
+ l.messages = this.messages();
879
+ var b = {}, O = l.keys || Object.keys(this.rules);
880
+ O.forEach(function(d) {
881
+ var g = o.rules[d], f = s[d];
882
+ g.forEach(function($) {
883
+ var v = $;
884
+ typeof v.transform == "function" && (s === n && (s = C({}, s)), f = s[d] = v.transform(f)), typeof v == "function" ? v = {
885
+ validator: v
886
+ } : v = C({}, v), v.validator = o.getValidationMethod(v), v.validator && (v.field = d, v.fullField = v.fullField || d, v.type = o.getType(v), b[d] = b[d] || [], b[d].push({
887
+ rule: v,
888
+ value: f,
889
+ source: s,
890
+ field: d
891
+ }));
892
+ });
893
+ });
894
+ var j = {};
895
+ return In(b, l, function(d, g) {
896
+ var f = d.rule, $ = (f.type === "object" || f.type === "array") && (typeof f.fields == "object" || typeof f.defaultField == "object");
897
+ $ = $ && (f.required || !f.required && d.value), f.field = d.field;
898
+ function v(F, _) {
899
+ return C({}, _, {
900
+ fullField: f.fullField + "." + F,
901
+ fullFields: f.fullFields ? [].concat(f.fullFields, [F]) : [F]
902
+ });
903
+ }
904
+ function u(F) {
905
+ F === void 0 && (F = []);
906
+ var _ = Array.isArray(F) ? F : [F];
907
+ !l.suppressWarning && _.length && r.warning("async-validator:", _), _.length && f.message !== void 0 && (_ = [].concat(f.message));
908
+ var S = _.map(Ye(f, s));
909
+ if (l.first && S.length)
910
+ return j[f.field] = 1, g(S);
911
+ if (!$)
912
+ g(S);
913
+ else {
914
+ if (f.required && !d.value)
915
+ return f.message !== void 0 ? S = [].concat(f.message).map(Ye(f, s)) : l.error && (S = [l.error(f, N(l.messages.required, f.field))]), g(S);
916
+ var R = {};
917
+ f.defaultField && Object.keys(d.value).map(function(M) {
918
+ R[M] = f.defaultField;
919
+ }), R = C({}, R, d.rule.fields);
920
+ var W = {};
921
+ Object.keys(R).forEach(function(M) {
922
+ var L = R[M], ue = Array.isArray(L) ? L : [L];
923
+ W[M] = ue.map(v.bind(null, M));
924
+ });
925
+ var D = new r(W);
926
+ D.messages(l.messages), d.rule.options && (d.rule.options.messages = l.messages, d.rule.options.error = l.error), D.validate(d.value, d.rule.options || l, function(M) {
927
+ var L = [];
928
+ S && S.length && L.push.apply(L, S), M && M.length && L.push.apply(L, M), g(L.length ? L : null);
929
+ });
930
+ }
931
+ }
932
+ var y;
933
+ if (f.asyncValidator)
934
+ y = f.asyncValidator(f, d.value, u, d.source, l);
935
+ else if (f.validator) {
936
+ try {
937
+ y = f.validator(f, d.value, u, d.source, l);
938
+ } catch (F) {
939
+ console.error == null || console.error(F), l.suppressValidatorError || setTimeout(function() {
940
+ throw F;
941
+ }, 0), u(F.message);
942
+ }
943
+ y === !0 ? u() : y === !1 ? u(typeof f.message == "function" ? f.message(f.fullField || f.field) : f.message || (f.fullField || f.field) + " fails") : y instanceof Array ? u(y) : y instanceof Error && u(y.message);
944
+ }
945
+ y && y.then && y.then(function() {
946
+ return u();
947
+ }, function(F) {
948
+ return u(F);
949
+ });
950
+ }, function(d) {
951
+ p(d);
952
+ }, s);
953
+ }, e.getType = function(n) {
954
+ if (n.type === void 0 && n.pattern instanceof RegExp && (n.type = "pattern"), typeof n.validator != "function" && n.type && !J.hasOwnProperty(n.type))
955
+ throw new Error(N("Unknown rule type %s", n.type));
956
+ return n.type || "string";
957
+ }, e.getValidationMethod = function(n) {
958
+ if (typeof n.validator == "function")
959
+ return n.validator;
960
+ var i = Object.keys(n), a = i.indexOf("message");
961
+ return a !== -1 && i.splice(a, 1), i.length === 1 && i[0] === "required" ? J.required : J[this.getType(n)] || void 0;
962
+ }, r;
963
+ }();
964
+ Q.register = function(e, t) {
965
+ if (typeof t != "function")
966
+ throw new Error("Cannot register a validator by type, validator is not a function");
967
+ J[e] = t;
968
+ };
969
+ Q.warning = yt;
970
+ Q.messages = Oe;
971
+ Q.validators = J;
972
+ const ni = [
973
+ "",
974
+ "error",
975
+ "validating",
976
+ "success"
977
+ ], ii = je({
978
+ label: String,
979
+ labelWidth: {
980
+ type: [String, Number],
981
+ default: ""
982
+ },
983
+ labelPosition: {
984
+ type: String,
985
+ values: ["left", "right", "top", ""],
986
+ default: ""
987
+ },
988
+ prop: {
989
+ type: oe([String, Array])
990
+ },
991
+ required: {
992
+ type: Boolean,
993
+ default: void 0
994
+ },
995
+ rules: {
996
+ type: oe([Object, Array])
997
+ },
998
+ error: String,
999
+ validateStatus: {
1000
+ type: String,
1001
+ values: ni
1002
+ },
1003
+ for: String,
1004
+ inlineMessage: {
1005
+ type: Boolean,
1006
+ default: void 0
1007
+ },
1008
+ showMessage: {
1009
+ type: Boolean,
1010
+ default: !0
1011
+ },
1012
+ size: {
1013
+ type: String,
1014
+ values: nt
1015
+ }
1016
+ }), He = "ElLabelWrap";
1017
+ var ai = H({
1018
+ name: He,
1019
+ props: {
1020
+ isAutoWidth: Boolean,
1021
+ updateAll: Boolean
1022
+ },
1023
+ setup(r, {
1024
+ slots: e
1025
+ }) {
1026
+ const t = ie(qe, void 0), n = ie(he);
1027
+ n || Ct(He, "usage: <el-form-item><label-wrap /></el-form-item>");
1028
+ const i = Ee("form"), a = B(), o = B(0), s = () => {
1029
+ var p;
1030
+ if ((p = a.value) != null && p.firstElementChild) {
1031
+ const m = window.getComputedStyle(a.value.firstElementChild).width;
1032
+ return Math.ceil(Number.parseFloat(m));
1033
+ } else
1034
+ return 0;
1035
+ }, l = (p = "update") => {
1036
+ rt(() => {
1037
+ e.default && r.isAutoWidth && (p === "update" ? o.value = s() : p === "remove" && (t == null || t.deregisterLabelWidth(o.value)));
1038
+ });
1039
+ }, w = () => l("update");
1040
+ return et(() => {
1041
+ w();
1042
+ }), tt(() => {
1043
+ l("remove");
1044
+ }), Et(() => w()), ne(o, (p, m) => {
1045
+ r.updateAll && (t == null || t.registerLabelWidth(p, m));
1046
+ }), Rt(E(() => {
1047
+ var p, m;
1048
+ return (m = (p = a.value) == null ? void 0 : p.firstElementChild) != null ? m : null;
1049
+ }), w), () => {
1050
+ var p, m;
1051
+ if (!e)
1052
+ return null;
1053
+ const {
1054
+ isAutoWidth: b
1055
+ } = r;
1056
+ if (b) {
1057
+ const O = t == null ? void 0 : t.autoLabelWidth, j = n == null ? void 0 : n.hasLabel, d = {};
1058
+ if (j && O && O !== "auto") {
1059
+ const g = Math.max(0, Number.parseInt(O, 10) - o.value), $ = (n.labelPosition || t.labelPosition) === "left" ? "marginRight" : "marginLeft";
1060
+ g && (d[$] = `${g}px`);
1061
+ }
1062
+ return ae("div", {
1063
+ ref: a,
1064
+ class: [i.be("item", "label-wrap")],
1065
+ style: d
1066
+ }, [(p = e.default) == null ? void 0 : p.call(e)]);
1067
+ } else
1068
+ return ae(St, {
1069
+ ref: a
1070
+ }, [(m = e.default) == null ? void 0 : m.call(e)]);
1071
+ };
1072
+ }
1073
+ });
1074
+ const oi = H({
1075
+ name: "ElFormItem"
1076
+ }), si = /* @__PURE__ */ H({
1077
+ ...oi,
1078
+ props: ii,
1079
+ setup(r, { expose: e }) {
1080
+ const t = r, n = Tt(), i = ie(qe, void 0), a = ie(he, void 0), o = it(void 0, { formItem: !1 }), s = Ee("form-item"), l = zt().value, w = B([]), p = B(""), m = Lt(p, 100), b = B(""), O = B();
1081
+ let j, d = !1;
1082
+ const g = E(() => t.labelPosition || (i == null ? void 0 : i.labelPosition)), f = E(() => {
1083
+ if (g.value === "top")
1084
+ return {};
1085
+ const c = Ve(t.labelWidth || (i == null ? void 0 : i.labelWidth) || "");
1086
+ return c ? { width: c } : {};
1087
+ }), $ = E(() => {
1088
+ if (g.value === "top" || i != null && i.inline)
1089
+ return {};
1090
+ if (!t.label && !t.labelWidth && W)
1091
+ return {};
1092
+ const c = Ve(t.labelWidth || (i == null ? void 0 : i.labelWidth) || "");
1093
+ return !t.label && !n.label ? { marginLeft: c } : {};
1094
+ }), v = E(() => [
1095
+ s.b(),
1096
+ s.m(o.value),
1097
+ s.is("error", p.value === "error"),
1098
+ s.is("validating", p.value === "validating"),
1099
+ s.is("success", p.value === "success"),
1100
+ s.is("required", wt.value || t.required),
1101
+ s.is("no-asterisk", i == null ? void 0 : i.hideRequiredAsterisk),
1102
+ (i == null ? void 0 : i.requireAsteriskPosition) === "right" ? "asterisk-right" : "asterisk-left",
1103
+ {
1104
+ [s.m("feedback")]: i == null ? void 0 : i.statusIcon,
1105
+ [s.m(`label-${g.value}`)]: g.value
1106
+ }
1107
+ ]), u = E(() => at(t.inlineMessage) ? t.inlineMessage : (i == null ? void 0 : i.inlineMessage) || !1), y = E(() => [
1108
+ s.e("error"),
1109
+ { [s.em("error", "inline")]: u.value }
1110
+ ]), F = E(() => t.prop ? se(t.prop) ? t.prop.join(".") : t.prop : ""), _ = E(() => !!(t.label || n.label)), S = E(() => {
1111
+ var c;
1112
+ return (c = t.for) != null ? c : w.value.length === 1 ? w.value[0] : void 0;
1113
+ }), R = E(() => !S.value && _.value), W = !!a, D = E(() => {
1114
+ const c = i == null ? void 0 : i.model;
1115
+ if (!(!c || !t.prop))
1116
+ return ge(c, t.prop).value;
1117
+ }), M = E(() => {
1118
+ const { required: c } = t, x = [];
1119
+ t.rules && x.push(...be(t.rules));
1120
+ const I = i == null ? void 0 : i.rules;
1121
+ if (I && t.prop) {
1122
+ const P = ge(I, t.prop).value;
1123
+ P && x.push(...be(P));
1124
+ }
1125
+ if (c !== void 0) {
1126
+ const P = x.map((V, z) => [V, z]).filter(([V]) => "required" in V);
1127
+ if (P.length > 0)
1128
+ for (const [V, z] of P)
1129
+ V.required !== c && (x[z] = { ...V, required: c });
1130
+ else
1131
+ x.push({ required: c });
1132
+ }
1133
+ return x;
1134
+ }), L = E(() => M.value.length > 0), ue = (c) => M.value.filter((I) => !I.trigger || !c ? !0 : se(I.trigger) ? I.trigger.includes(c) : I.trigger === c).map(({ trigger: I, ...P }) => P), wt = E(() => M.value.some((c) => c.required)), Ft = E(() => {
1135
+ var c;
1136
+ return m.value === "error" && t.showMessage && ((c = i == null ? void 0 : i.showMessage) != null ? c : !0);
1137
+ }), _e = E(() => `${t.label || ""}${(i == null ? void 0 : i.labelSuffix) || ""}`), U = (c) => {
1138
+ p.value = c;
1139
+ }, xt = (c) => {
1140
+ var x, I;
1141
+ const { errors: P, fields: V } = c;
1142
+ (!P || !V) && console.error(c), U("error"), b.value = P ? (I = (x = P == null ? void 0 : P[0]) == null ? void 0 : x.message) != null ? I : `${t.prop} is required` : "", i == null || i.emit("validate", t.prop, !1, b.value);
1143
+ }, At = () => {
1144
+ U("success"), i == null || i.emit("validate", t.prop, !0, "");
1145
+ }, Ot = async (c) => {
1146
+ const x = F.value;
1147
+ return new Q({
1148
+ [x]: c
1149
+ }).validate({ [x]: D.value }, { firstFields: !0 }).then(() => (At(), !0)).catch((P) => (xt(P), Promise.reject(P)));
1150
+ }, Pe = async (c, x) => {
1151
+ if (d || !t.prop)
1152
+ return !1;
1153
+ const I = st(x);
1154
+ if (!L.value)
1155
+ return x == null || x(!1), !1;
1156
+ const P = ue(c);
1157
+ return P.length === 0 ? (x == null || x(!0), !0) : (U("validating"), Ot(P).then(() => (x == null || x(!0), !0)).catch((V) => {
1158
+ const { fields: z } = V;
1159
+ return x == null || x(!1, z), I ? !1 : Promise.reject(z);
1160
+ }));
1161
+ }, de = () => {
1162
+ U(""), b.value = "", d = !1;
1163
+ }, $e = async () => {
1164
+ const c = i == null ? void 0 : i.model;
1165
+ if (!c || !t.prop)
1166
+ return;
1167
+ const x = ge(c, t.prop);
1168
+ d = !0, x.value = ze(j), await rt(), de(), d = !1;
1169
+ }, qt = (c) => {
1170
+ w.value.includes(c) || w.value.push(c);
1171
+ }, jt = (c) => {
1172
+ w.value = w.value.filter((x) => x !== c);
1173
+ };
1174
+ ne(() => t.error, (c) => {
1175
+ b.value = c || "", U(c ? "error" : "");
1176
+ }, { immediate: !0 }), ne(() => t.validateStatus, (c) => U(c || ""));
1177
+ const ce = ve({
1178
+ ...Xe(t),
1179
+ $el: O,
1180
+ size: o,
1181
+ validateMessage: b,
1182
+ validateState: p,
1183
+ labelId: l,
1184
+ inputIds: w,
1185
+ isGroup: R,
1186
+ hasLabel: _,
1187
+ fieldValue: D,
1188
+ addInputId: qt,
1189
+ removeInputId: jt,
1190
+ resetField: $e,
1191
+ clearValidate: de,
1192
+ validate: Pe,
1193
+ propString: F
1194
+ });
1195
+ return Qe(he, ce), et(() => {
1196
+ t.prop && (i == null || i.addField(ce), j = ze(D.value));
1197
+ }), tt(() => {
1198
+ i == null || i.removeField(ce);
1199
+ }), e({
1200
+ size: o,
1201
+ validateMessage: b,
1202
+ validateState: p,
1203
+ validate: Pe,
1204
+ clearValidate: de,
1205
+ resetField: $e
1206
+ }), (c, x) => {
1207
+ var I;
1208
+ return ye(), ke("div", {
1209
+ ref_key: "formItemRef",
1210
+ ref: O,
1211
+ class: K(q(v)),
1212
+ role: q(R) ? "group" : void 0,
1213
+ "aria-labelledby": q(R) ? q(l) : void 0
1214
+ }, [
1215
+ ae(q(ai), {
1216
+ "is-auto-width": q(f).width === "auto",
1217
+ "update-all": ((I = q(i)) == null ? void 0 : I.labelWidth) === "auto"
1218
+ }, {
1219
+ default: pe(() => [
1220
+ q(_) ? (ye(), _t(Pt(q(S) ? "label" : "div"), {
1221
+ key: 0,
1222
+ id: q(l),
1223
+ for: q(S),
1224
+ class: K(q(s).e("label")),
1225
+ style: Ie(q(f))
1226
+ }, {
1227
+ default: pe(() => [
1228
+ ee(c.$slots, "label", { label: q(_e) }, () => [
1229
+ $t(Me(q(_e)), 1)
1230
+ ])
1231
+ ]),
1232
+ _: 3
1233
+ }, 8, ["id", "for", "class", "style"])) : Ne("v-if", !0)
1234
+ ]),
1235
+ _: 3
1236
+ }, 8, ["is-auto-width", "update-all"]),
1237
+ Re("div", {
1238
+ class: K(q(s).e("content")),
1239
+ style: Ie(q($))
1240
+ }, [
1241
+ ee(c.$slots, "default"),
1242
+ ae(It, {
1243
+ name: `${q(s).namespace.value}-zoom-in-top`
1244
+ }, {
1245
+ default: pe(() => [
1246
+ q(Ft) ? ee(c.$slots, "error", {
1247
+ key: 0,
1248
+ error: b.value
1249
+ }, () => [
1250
+ Re("div", {
1251
+ class: K(q(y))
1252
+ }, Me(b.value), 3)
1253
+ ]) : Ne("v-if", !0)
1254
+ ]),
1255
+ _: 3
1256
+ }, 8, ["name"])
1257
+ ], 6)
1258
+ ], 10, ["role", "aria-labelledby"]);
1259
+ };
1260
+ }
1261
+ });
1262
+ var bt = /* @__PURE__ */ ot(si, [["__file", "form-item.vue"]]);
1263
+ const yi = Vt(qn, {
1264
+ FormItem: bt
1265
+ }), hi = Bt(bt);
1266
+ export {
1267
+ yi as E,
1268
+ hi as a
1269
+ };