st-comp 0.0.89 → 0.0.91

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 (60) hide show
  1. package/components.d.ts +1 -0
  2. package/es/ChartLayout.js +2 -2
  3. package/es/Dialog.js +10 -10
  4. package/es/FactorWarning.cjs +1 -0
  5. package/es/FactorWarning.js +410 -0
  6. package/es/Kline.cjs +1 -1
  7. package/es/Kline.js +11 -10
  8. package/es/KlineNew.cjs +1 -1
  9. package/es/KlineNew.js +10 -9
  10. package/es/Pagination.cjs +1 -1
  11. package/es/Pagination.js +106 -105
  12. package/es/Table.cjs +1 -1
  13. package/es/Table.js +309 -431
  14. package/es/VarietySearch.cjs +1 -12
  15. package/es/VarietySearch.js +811 -2511
  16. package/es/VirtualTable.js +89 -89
  17. package/es/{base-e85dae08.js → base-1bc9f12c.js} +19 -19
  18. package/es/{castArray-b93d1330.js → castArray-f42865a2.js} +1 -1
  19. package/es/{config-provider-cb918d0f.js → config-provider-c8d3957d.js} +3 -3
  20. package/es/{el-button-aab1dbd4.js → el-button-93e0ac7c.js} +33 -33
  21. package/es/{el-empty-ab3ce002.js → el-empty-0c85d9b7.js} +13 -13
  22. package/es/el-icon-0ea8fbf8.cjs +1 -0
  23. package/es/el-icon-4ed993c7.js +1 -0
  24. package/es/el-input-29806e42.js +543 -0
  25. package/es/el-input-a8791103.cjs +9 -0
  26. package/es/{el-overlay-98d7f866.js → el-overlay-53eb27a5.js} +6 -6
  27. package/es/el-popover-1d087574.cjs +1 -0
  28. package/es/el-popover-dd66e2c8.js +133 -0
  29. package/es/el-radio-group-46e8f574.cjs +12 -0
  30. package/es/el-radio-group-caebab9d.js +1743 -0
  31. package/es/{el-scrollbar-7b9d83d5.js → el-scrollbar-e17fad47.js} +14 -14
  32. package/es/el-select-64511731.cjs +1 -0
  33. package/es/el-select-ac302f3c.js +1360 -0
  34. package/es/{el-icon-2d22f211.js → el-table-column-b8e2141b.js} +750 -750
  35. package/es/{el-tag-87576c55.js → el-tag-9493bdff.js} +66 -66
  36. package/es/{focus-trap-067be6d2.js → focus-trap-1b2aef75.js} +1 -1
  37. package/es/{raf-b091dc88.js → raf-6d7e80f4.js} +1 -1
  38. package/es/{scroll-510cef88.js → scroll-a928a93e.js} +1 -1
  39. package/es/style.css +1 -1
  40. package/es/{use-form-item-439ac27c.js → use-form-item-aeec8499.js} +38 -38
  41. package/es/{use-global-config-857b51f5.js → use-global-config-b07c467a.js} +12 -12
  42. package/es/{vnode-8c7963dc.js → vnode-aa872900.js} +1 -1
  43. package/es/{zh-cn-c2b42b5f.js → zh-cn-d29347f8.js} +2 -2
  44. package/lib/bundle.js +1 -1
  45. package/lib/bundle.umd.cjs +153 -153
  46. package/lib/{index-ddb17176.js → index-ee45a01a.js} +20378 -19972
  47. package/lib/{python-4a81b776.js → python-1c6a2ac7.js} +1 -1
  48. package/lib/style.css +1 -1
  49. package/package.json +1 -1
  50. package/packages/FactorWarning/index.ts +8 -0
  51. package/packages/FactorWarning/index.vue +332 -0
  52. package/packages/VarietySearch/components/CommonIndicator/index.vue +5 -40
  53. package/packages/VarietySearch/config.js +1 -1
  54. package/packages/VarietySearch/index.vue +23 -2
  55. package/packages/index.ts +2 -0
  56. package/src/pages/FactorWarning/index.vue +62 -0
  57. package/src/router/routes.ts +5 -0
  58. package/es/el-select-d3f15536.cjs +0 -9
  59. package/es/el-select-fd76b16b.js +0 -1894
  60. /package/es/{el-icon-773986c7.cjs → el-table-column-773986c7.cjs} +0 -0
@@ -1,1263 +1,28 @@
1
- import { S as Ct, s as Jt, v as Ln, x as Un, b as ce, d as Te, y as Dn, i as _e, m as Ke, j as pe, u as ye, _ as be, z as xe, t as Zt, A as Xt, B as Bn, l as qt, w as Me, f as ft, k as ae, g as zn, C as Le, o as en, c as Wn, D as Gn, E as Yn } from "./base-e85dae08.js";
2
- import { c as Je, k as pt, g as Kn, b as tn, d as Qn, e as Hn, f as Jn, i as Zn, E as Xn, a as er, h as tr, j as nr } from "./el-icon-2d22f211.js";
3
- import { ref as Q, computed as N, defineComponent as Z, watch as ve, provide as mt, reactive as Ze, toRefs as vt, openBlock as I, createElementBlock as q, normalizeClass as L, unref as u, renderSlot as me, inject as Ce, onMounted as Ae, onBeforeUnmount as nn, onUpdated as rn, createVNode as F, Fragment as H, nextTick as Xe, useSlots as rr, withCtx as S, createBlock as U, resolveDynamicComponent as gt, normalizeStyle as Qe, createTextVNode as P, toDisplayString as te, createCommentVNode as z, createElementVNode as C, TransitionGroup as ar, Transition as an, withDirectives as $e, vShow as on, isRef as ln, withModifiers as ge, vModelRadio as sn, withKeys as Ue, shallowReactive as or, isVNode as un, render as Nt, mergeModels as yt, useModel as bt, renderList as se, pushScopeId as ht, popScopeId as _t, createSlots as Mt } from "vue";
1
+ import { b as re, u as we, k as oe, _ as ie, w as Ce, d as ke, o as Te, c as Ge, i as be, s as ae, v as He, j as Ae, x as Je } from "./base-1bc9f12c.js";
2
+ import { c as Ke, d as Se, b as ue, a as ce, e as Ze } from "./el-radio-group-caebab9d.js";
3
+ import { b as We, c as Xe, E as et, a as tt } from "./el-table-column-b8e2141b.js";
4
+ import { defineComponent as Z, computed as L, openBlock as s, createElementBlock as h, normalizeClass as Q, unref as V, renderSlot as de, createVNode as c, Transition as Me, withCtx as u, withDirectives as Ee, createElementVNode as b, toDisplayString as R, vShow as Ue, createBlock as C, resolveDynamicComponent as De, shallowReactive as nt, ref as G, onMounted as lt, watch as ne, normalizeStyle as ot, createCommentVNode as T, Fragment as U, withModifiers as at, isVNode as qe, render as xe, mergeModels as pe, useModel as me, createTextVNode as w, renderList as B, pushScopeId as ve, popScopeId as fe, createSlots as he } from "vue";
4
5
  import "./el-tooltip-4ed993c7.js";
5
- import { k as dn, g as cn, s as lr, b as ir, c as sr, d as wt, n as He, e as fn, f as ur, S as dr, h as cr, E as fr } from "./el-tag-87576c55.js";
6
- import { u as pn, a as pr } from "./el-scrollbar-7b9d83d5.js";
7
- import { E as mn } from "./el-overlay-98d7f866.js";
8
- import { b as xt, c as vn, E as gn, a as yn } from "./el-select-fd76b16b.js";
9
- import { E as bn } from "./el-button-aab1dbd4.js";
10
- import { c as Ot, h as je, j as kt, k as at, l as It, n as hn, o as _n, p as mr, E as qe, a as vr, r as gr, s as yr, t as ot, i as br, T as At, v as hr, w as _r, x as wr } from "./use-form-item-439ac27c.js";
11
- import { _ as $t } from "./_plugin-vue_export-helper-dad06003.js";
12
- import { m as xr } from "./typescript-7ae59c4c.js";
13
- import { a as Or, g as nt, u as kr } from "./use-global-config-857b51f5.js";
14
- import { U as he, C as Vt, I as ze, i as Se, E as Ir } from "./focus-trap-067be6d2.js";
15
- import { m as jt } from "./config-provider-cb918d0f.js";
16
- import { c as lt } from "./castArray-b93d1330.js";
6
+ import { E as st } from "./el-tag-9493bdff.js";
7
+ import { a as rt, u as it } from "./el-scrollbar-e17fad47.js";
8
+ import { E as Fe } from "./el-overlay-53eb27a5.js";
9
+ import { E as Le } from "./el-input-29806e42.js";
10
+ import { b as Ne, E as ze, a as Pe } from "./el-select-ac302f3c.js";
11
+ import "./el-icon-4ed993c7.js";
12
+ import { E as Re } from "./el-button-93e0ac7c.js";
13
+ import { c as ut, h as ct, i as dt, T as Oe, E as se, j as pt, p as Ie, k as mt, l as vt } from "./use-form-item-aeec8499.js";
14
+ import { _ as ge } from "./_plugin-vue_export-helper-dad06003.js";
15
+ import { m as ft } from "./typescript-7ae59c4c.js";
16
+ import { u as gt } from "./use-global-config-b07c467a.js";
17
+ import { E as yt } from "./focus-trap-1b2aef75.js";
18
+ import { m as Ve } from "./config-provider-c8d3957d.js";
19
+ import "./castArray-f42865a2.js";
17
20
  import "./_commonjsHelpers-10dfc225.js";
18
- import "./raf-b091dc88.js";
19
- import "./vnode-8c7963dc.js";
20
- import "./scroll-510cef88.js";
21
+ import "./raf-6d7e80f4.js";
22
+ import "./vnode-aa872900.js";
23
+ import "./scroll-a928a93e.js";
21
24
  import "./index-657047bb.js";
22
- function $r(n, e) {
23
- for (var t = -1, r = n == null ? 0 : n.length; ++t < r && e(n[t], t, n) !== !1; )
24
- ;
25
- return n;
26
- }
27
- function Vr(n, e) {
28
- return n && Je(e, dn(e), n);
29
- }
30
- function Er(n, e) {
31
- return n && Je(e, pt(e), n);
32
- }
33
- function Sr(n, e) {
34
- return Je(n, cn(n), e);
35
- }
36
- var Fr = Object.getOwnPropertySymbols, Tr = Fr ? function(n) {
37
- for (var e = []; n; )
38
- ir(e, cn(n)), n = Kn(n);
39
- return e;
40
- } : lr;
41
- const wn = Tr;
42
- function Cr(n, e) {
43
- return Je(n, wn(n), e);
44
- }
45
- function qr(n) {
46
- return sr(n, pt, wn);
47
- }
48
- var Nr = Object.prototype, Mr = Nr.hasOwnProperty;
49
- function Ar(n) {
50
- var e = n.length, t = new n.constructor(e);
51
- return e && typeof n[0] == "string" && Mr.call(n, "index") && (t.index = n.index, t.input = n.input), t;
52
- }
53
- function jr(n, e) {
54
- var t = e ? tn(n.buffer) : n.buffer;
55
- return new n.constructor(t, n.byteOffset, n.byteLength);
56
- }
57
- var Pr = /\w*$/;
58
- function Rr(n) {
59
- var e = new n.constructor(n.source, Pr.exec(n));
60
- return e.lastIndex = n.lastIndex, e;
61
- }
62
- var Pt = Ct ? Ct.prototype : void 0, Rt = Pt ? Pt.valueOf : void 0;
63
- function Lr(n) {
64
- return Rt ? Object(Rt.call(n)) : {};
65
- }
66
- var Ur = "[object Boolean]", Dr = "[object Date]", Br = "[object Map]", zr = "[object Number]", Wr = "[object RegExp]", Gr = "[object Set]", Yr = "[object String]", Kr = "[object Symbol]", Qr = "[object ArrayBuffer]", Hr = "[object DataView]", Jr = "[object Float32Array]", Zr = "[object Float64Array]", Xr = "[object Int8Array]", ea = "[object Int16Array]", ta = "[object Int32Array]", na = "[object Uint8Array]", ra = "[object Uint8ClampedArray]", aa = "[object Uint16Array]", oa = "[object Uint32Array]";
67
- function la(n, e, t) {
68
- var r = n.constructor;
69
- switch (e) {
70
- case Qr:
71
- return tn(n);
72
- case Ur:
73
- case Dr:
74
- return new r(+n);
75
- case Hr:
76
- return jr(n, t);
77
- case Jr:
78
- case Zr:
79
- case Xr:
80
- case ea:
81
- case ta:
82
- case na:
83
- case ra:
84
- case aa:
85
- case oa:
86
- return Qn(n, t);
87
- case Br:
88
- return new r();
89
- case zr:
90
- case Yr:
91
- return new r(n);
92
- case Wr:
93
- return Rr(n);
94
- case Gr:
95
- return new r();
96
- case Kr:
97
- return Lr(n);
98
- }
99
- }
100
- var ia = "[object Map]";
101
- function sa(n) {
102
- return Jt(n) && wt(n) == ia;
103
- }
104
- var Lt = He && He.isMap, ua = Lt ? fn(Lt) : sa;
105
- const da = ua;
106
- var ca = "[object Set]";
107
- function fa(n) {
108
- return Jt(n) && wt(n) == ca;
109
- }
110
- var Ut = He && He.isSet, pa = Ut ? fn(Ut) : fa;
111
- const ma = pa;
112
- var va = 1, ga = 2, ya = 4, xn = "[object Arguments]", ba = "[object Array]", ha = "[object Boolean]", _a = "[object Date]", wa = "[object Error]", On = "[object Function]", xa = "[object GeneratorFunction]", Oa = "[object Map]", ka = "[object Number]", kn = "[object Object]", Ia = "[object RegExp]", $a = "[object Set]", Va = "[object String]", Ea = "[object Symbol]", Sa = "[object WeakMap]", Fa = "[object ArrayBuffer]", Ta = "[object DataView]", Ca = "[object Float32Array]", qa = "[object Float64Array]", Na = "[object Int8Array]", Ma = "[object Int16Array]", Aa = "[object Int32Array]", ja = "[object Uint8Array]", Pa = "[object Uint8ClampedArray]", Ra = "[object Uint16Array]", La = "[object Uint32Array]", B = {};
113
- B[xn] = B[ba] = B[Fa] = B[Ta] = B[ha] = B[_a] = B[Ca] = B[qa] = B[Na] = B[Ma] = B[Aa] = B[Oa] = B[ka] = B[kn] = B[Ia] = B[$a] = B[Va] = B[Ea] = B[ja] = B[Pa] = B[Ra] = B[La] = !0;
114
- B[wa] = B[On] = B[Sa] = !1;
115
- function We(n, e, t, r, a, l) {
116
- var o, i = e & va, p = e & ga, V = e & ya;
117
- if (t && (o = a ? t(n, r, a, l) : t(n)), o !== void 0)
118
- return o;
119
- if (!Ln(n))
120
- return n;
121
- var c = Un(n);
122
- if (c) {
123
- if (o = Ar(n), !i)
124
- return Hn(n, o);
125
- } else {
126
- var s = wt(n), x = s == On || s == xa;
127
- if (ur(n))
128
- return Jn(n, i);
129
- if (s == kn || s == xn || x && !a) {
130
- if (o = p || x ? {} : Zn(n), !i)
131
- return p ? Cr(n, Er(o, n)) : Sr(n, Vr(o, n));
132
- } else {
133
- if (!B[s])
134
- return a ? n : {};
135
- o = la(n, s, i);
136
- }
137
- }
138
- l || (l = new dr());
139
- var _ = l.get(n);
140
- if (_)
141
- return _;
142
- l.set(n, o), ma(n) ? n.forEach(function(h) {
143
- o.add(We(h, e, t, h, n, l));
144
- }) : da(n) && n.forEach(function(h, d) {
145
- o.set(d, We(h, e, t, d, n, l));
146
- });
147
- var f = V ? p ? qr : cr : p ? pt : dn, v = c ? void 0 : f(n);
148
- return $r(v || n, function(h, d) {
149
- v && (d = h, h = n[d]), Or(o, d, We(h, e, t, d, n, l));
150
- }), o;
151
- }
152
- var Ua = 4;
153
- function Dt(n) {
154
- return We(n, Ua);
155
- }
156
- const Da = ce({
157
- size: {
158
- type: String,
159
- values: Ot
160
- },
161
- disabled: Boolean
162
- }), Ba = ce({
163
- ...Da,
164
- model: Object,
165
- rules: {
166
- type: Te(Object)
167
- },
168
- labelPosition: {
169
- type: String,
170
- values: ["left", "right", "top"],
171
- default: "right"
172
- },
173
- requireAsteriskPosition: {
174
- type: String,
175
- values: ["left", "right"],
176
- default: "left"
177
- },
178
- labelWidth: {
179
- type: [String, Number],
180
- default: ""
181
- },
182
- labelSuffix: {
183
- type: String,
184
- default: ""
185
- },
186
- inline: Boolean,
187
- inlineMessage: Boolean,
188
- statusIcon: Boolean,
189
- showMessage: {
190
- type: Boolean,
191
- default: !0
192
- },
193
- validateOnRuleChange: {
194
- type: Boolean,
195
- default: !0
196
- },
197
- hideRequiredAsterisk: Boolean,
198
- scrollToError: Boolean,
199
- scrollIntoViewOptions: {
200
- type: [Object, Boolean]
201
- }
202
- }), za = {
203
- validate: (n, e, t) => (Dn(n) || _e(n)) && Ke(e) && _e(t)
204
- }, Wa = "ElForm";
205
- function Ga() {
206
- const n = Q([]), e = N(() => {
207
- if (!n.value.length)
208
- return "0";
209
- const l = Math.max(...n.value);
210
- return l ? `${l}px` : "";
211
- });
212
- function t(l) {
213
- const o = n.value.indexOf(l);
214
- return o === -1 && e.value === "0" && pe(Wa, `unexpected width ${l}`), o;
215
- }
216
- function r(l, o) {
217
- if (l && o) {
218
- const i = t(o);
219
- n.value.splice(i, 1, l);
220
- } else
221
- l && n.value.push(l);
222
- }
223
- function a(l) {
224
- const o = t(l);
225
- o > -1 && n.value.splice(o, 1);
226
- }
227
- return {
228
- autoLabelWidth: e,
229
- registerLabelWidth: r,
230
- deregisterLabelWidth: a
231
- };
232
- }
233
- const De = (n, e) => {
234
- const t = lt(e);
235
- return t.length > 0 ? n.filter((r) => r.prop && t.includes(r.prop)) : n;
236
- }, Ge = "ElForm", Ya = Z({
237
- name: Ge
238
- }), Ka = /* @__PURE__ */ Z({
239
- ...Ya,
240
- props: Ba,
241
- emits: za,
242
- setup(n, { expose: e, emit: t }) {
243
- const r = n, a = [], l = je(), o = ye("form"), i = N(() => {
244
- const { labelPosition: g, inline: y } = r;
245
- return [
246
- o.b(),
247
- o.m(l.value || "default"),
248
- {
249
- [o.m(`label-${g}`)]: g,
250
- [o.m("inline")]: y
251
- }
252
- ];
253
- }), p = (g) => {
254
- a.push(g);
255
- }, V = (g) => {
256
- g.prop && a.splice(a.indexOf(g), 1);
257
- }, c = (g = []) => {
258
- if (!r.model) {
259
- pe(Ge, "model is required for resetFields to work.");
260
- return;
261
- }
262
- De(a, g).forEach((y) => y.resetField());
263
- }, s = (g = []) => {
264
- De(a, g).forEach((y) => y.clearValidate());
265
- }, x = N(() => {
266
- const g = !!r.model;
267
- return g || pe(Ge, "model is required for validate to work."), g;
268
- }), _ = (g) => {
269
- if (a.length === 0)
270
- return [];
271
- const y = De(a, g);
272
- return y.length ? y : (pe(Ge, "please pass correct props!"), []);
273
- }, f = async (g) => h(void 0, g), v = async (g = []) => {
274
- if (!x.value)
275
- return !1;
276
- const y = _(g);
277
- if (y.length === 0)
278
- return !0;
279
- let w = {};
280
- for (const k of y)
281
- try {
282
- await k.validate("");
283
- } catch ($) {
284
- w = {
285
- ...w,
286
- ...$
287
- };
288
- }
289
- return Object.keys(w).length === 0 ? !0 : Promise.reject(w);
290
- }, h = async (g = [], y) => {
291
- const w = !xe(y);
292
- try {
293
- const k = await v(g);
294
- return k === !0 && (y == null || y(k)), k;
295
- } catch (k) {
296
- if (k instanceof Error)
297
- throw k;
298
- const $ = k;
299
- return r.scrollToError && d(Object.keys($)[0]), y == null || y(!1, $), w && Promise.reject($);
300
- }
301
- }, d = (g) => {
302
- var y;
303
- const w = De(a, g)[0];
304
- w && ((y = w.$el) == null || y.scrollIntoView(r.scrollIntoViewOptions));
305
- };
306
- return ve(() => r.rules, () => {
307
- r.validateOnRuleChange && f().catch((g) => pe(g));
308
- }, { deep: !0 }), mt(kt, Ze({
309
- ...vt(r),
310
- emit: t,
311
- resetFields: c,
312
- clearValidate: s,
313
- validateField: h,
314
- addField: p,
315
- removeField: V,
316
- ...Ga()
317
- })), e({
318
- validate: f,
319
- validateField: h,
320
- resetFields: c,
321
- clearValidate: s,
322
- scrollToField: d
323
- }), (g, y) => (I(), q("form", {
324
- class: L(u(i))
325
- }, [
326
- me(g.$slots, "default")
327
- ], 2));
328
- }
329
- });
330
- var Qa = /* @__PURE__ */ be(Ka, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/form/src/form.vue"]]);
331
- function we() {
332
- return we = Object.assign ? Object.assign.bind() : function(n) {
333
- for (var e = 1; e < arguments.length; e++) {
334
- var t = arguments[e];
335
- for (var r in t)
336
- Object.prototype.hasOwnProperty.call(t, r) && (n[r] = t[r]);
337
- }
338
- return n;
339
- }, we.apply(this, arguments);
340
- }
341
- function Ha(n, e) {
342
- n.prototype = Object.create(e.prototype), n.prototype.constructor = n, Ne(n, e);
343
- }
344
- function it(n) {
345
- return it = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
346
- return t.__proto__ || Object.getPrototypeOf(t);
347
- }, it(n);
348
- }
349
- function Ne(n, e) {
350
- return Ne = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, a) {
351
- return r.__proto__ = a, r;
352
- }, Ne(n, e);
353
- }
354
- function Ja() {
355
- if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
356
- return !1;
357
- if (typeof Proxy == "function")
358
- return !0;
359
- try {
360
- return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
361
- })), !0;
362
- } catch {
363
- return !1;
364
- }
365
- }
366
- function Ye(n, e, t) {
367
- return Ja() ? Ye = Reflect.construct.bind() : Ye = function(a, l, o) {
368
- var i = [null];
369
- i.push.apply(i, l);
370
- var p = Function.bind.apply(a, i), V = new p();
371
- return o && Ne(V, o.prototype), V;
372
- }, Ye.apply(null, arguments);
373
- }
374
- function Za(n) {
375
- return Function.toString.call(n).indexOf("[native code]") !== -1;
376
- }
377
- function st(n) {
378
- var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
379
- return st = function(r) {
380
- if (r === null || !Za(r))
381
- return r;
382
- if (typeof r != "function")
383
- throw new TypeError("Super expression must either be null or a function");
384
- if (typeof e < "u") {
385
- if (e.has(r))
386
- return e.get(r);
387
- e.set(r, a);
388
- }
389
- function a() {
390
- return Ye(r, arguments, it(this).constructor);
391
- }
392
- return a.prototype = Object.create(r.prototype, {
393
- constructor: {
394
- value: a,
395
- enumerable: !1,
396
- writable: !0,
397
- configurable: !0
398
- }
399
- }), Ne(a, r);
400
- }, st(n);
401
- }
402
- var Xa = /%[sdj%]/g, In = function() {
403
- };
404
- typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (In = function(e, t) {
405
- typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && t.every(function(r) {
406
- return typeof r == "string";
407
- }) && console.warn(e, t);
408
- });
409
- function ut(n) {
410
- if (!n || !n.length)
411
- return null;
412
- var e = {};
413
- return n.forEach(function(t) {
414
- var r = t.field;
415
- e[r] = e[r] || [], e[r].push(t);
416
- }), e;
417
- }
418
- function ue(n) {
419
- for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++)
420
- t[r - 1] = arguments[r];
421
- var a = 0, l = t.length;
422
- if (typeof n == "function")
423
- return n.apply(null, t);
424
- if (typeof n == "string") {
425
- var o = n.replace(Xa, function(i) {
426
- if (i === "%%")
427
- return "%";
428
- if (a >= l)
429
- return i;
430
- switch (i) {
431
- case "%s":
432
- return String(t[a++]);
433
- case "%d":
434
- return Number(t[a++]);
435
- case "%j":
436
- try {
437
- return JSON.stringify(t[a++]);
438
- } catch {
439
- return "[Circular]";
440
- }
441
- break;
442
- default:
443
- return i;
444
- }
445
- });
446
- return o;
447
- }
448
- return n;
449
- }
450
- function eo(n) {
451
- return n === "string" || n === "url" || n === "hex" || n === "email" || n === "date" || n === "pattern";
452
- }
453
- function J(n, e) {
454
- return !!(n == null || e === "array" && Array.isArray(n) && !n.length || eo(e) && typeof n == "string" && !n);
455
- }
456
- function to(n, e, t) {
457
- var r = [], a = 0, l = n.length;
458
- function o(i) {
459
- r.push.apply(r, i || []), a++, a === l && t(r);
460
- }
461
- n.forEach(function(i) {
462
- e(i, o);
463
- });
464
- }
465
- function Bt(n, e, t) {
466
- var r = 0, a = n.length;
467
- function l(o) {
468
- if (o && o.length) {
469
- t(o);
470
- return;
471
- }
472
- var i = r;
473
- r = r + 1, i < a ? e(n[i], l) : t([]);
474
- }
475
- l([]);
476
- }
477
- function no(n) {
478
- var e = [];
479
- return Object.keys(n).forEach(function(t) {
480
- e.push.apply(e, n[t] || []);
481
- }), e;
482
- }
483
- var zt = /* @__PURE__ */ function(n) {
484
- Ha(e, n);
485
- function e(t, r) {
486
- var a;
487
- return a = n.call(this, "Async Validation Error") || this, a.errors = t, a.fields = r, a;
488
- }
489
- return e;
490
- }(/* @__PURE__ */ st(Error));
491
- function ro(n, e, t, r, a) {
492
- if (e.first) {
493
- var l = new Promise(function(x, _) {
494
- var f = function(d) {
495
- return r(d), d.length ? _(new zt(d, ut(d))) : x(a);
496
- }, v = no(n);
497
- Bt(v, t, f);
498
- });
499
- return l.catch(function(x) {
500
- return x;
501
- }), l;
502
- }
503
- var o = e.firstFields === !0 ? Object.keys(n) : e.firstFields || [], i = Object.keys(n), p = i.length, V = 0, c = [], s = new Promise(function(x, _) {
504
- var f = function(h) {
505
- if (c.push.apply(c, h), V++, V === p)
506
- return r(c), c.length ? _(new zt(c, ut(c))) : x(a);
507
- };
508
- i.length || (r(c), x(a)), i.forEach(function(v) {
509
- var h = n[v];
510
- o.indexOf(v) !== -1 ? Bt(h, t, f) : to(h, t, f);
511
- });
512
- });
513
- return s.catch(function(x) {
514
- return x;
515
- }), s;
516
- }
517
- function ao(n) {
518
- return !!(n && n.message !== void 0);
519
- }
520
- function oo(n, e) {
521
- for (var t = n, r = 0; r < e.length; r++) {
522
- if (t == null)
523
- return t;
524
- t = t[e[r]];
525
- }
526
- return t;
527
- }
528
- function Wt(n, e) {
529
- return function(t) {
530
- var r;
531
- return n.fullFields ? r = oo(e, n.fullFields) : r = e[t.field || n.fullField], ao(t) ? (t.field = t.field || n.fullField, t.fieldValue = r, t) : {
532
- message: typeof t == "function" ? t() : t,
533
- fieldValue: r,
534
- field: t.field || n.fullField
535
- };
536
- };
537
- }
538
- function Gt(n, e) {
539
- if (e) {
540
- for (var t in e)
541
- if (e.hasOwnProperty(t)) {
542
- var r = e[t];
543
- typeof r == "object" && typeof n[t] == "object" ? n[t] = we({}, n[t], r) : n[t] = r;
544
- }
545
- }
546
- return n;
547
- }
548
- var $n = function(e, t, r, a, l, o) {
549
- e.required && (!r.hasOwnProperty(e.field) || J(t, o || e.type)) && a.push(ue(l.messages.required, e.fullField));
550
- }, lo = function(e, t, r, a, l) {
551
- (/^\s+$/.test(t) || t === "") && a.push(ue(l.messages.whitespace, e.fullField));
552
- }, Be, io = function() {
553
- if (Be)
554
- return Be;
555
- var n = "[a-fA-F\\d:]", e = function(w) {
556
- return w && w.includeBoundaries ? "(?:(?<=\\s|^)(?=" + n + ")|(?<=" + n + ")(?=\\s|$))" : "";
557
- }, 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}", a = (`
558
- (?:
559
- (?:` + r + ":){7}(?:" + r + `|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
560
- (?:` + 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
561
- (?:` + 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
562
- (?:` + 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
563
- (?:` + 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
564
- (?:` + 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
565
- (?:` + 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
566
- (?::(?:(?::` + 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
567
- )(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
568
- `).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), l = new RegExp("(?:^" + t + "$)|(?:^" + a + "$)"), o = new RegExp("^" + t + "$"), i = new RegExp("^" + a + "$"), p = function(w) {
569
- return w && w.exact ? l : new RegExp("(?:" + e(w) + t + e(w) + ")|(?:" + e(w) + a + e(w) + ")", "g");
570
- };
571
- p.v4 = function(y) {
572
- return y && y.exact ? o : new RegExp("" + e(y) + t + e(y), "g");
573
- }, p.v6 = function(y) {
574
- return y && y.exact ? i : new RegExp("" + e(y) + a + e(y), "g");
575
- };
576
- var V = "(?:(?:[a-z]+:)?//)", c = "(?:\\S+(?::\\S*)?@)?", s = p.v4().source, x = p.v6().source, _ = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", f = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", v = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", h = "(?::\\d{2,5})?", d = '(?:[/?#][^\\s"]*)?', g = "(?:" + V + "|www\\.)" + c + "(?:localhost|" + s + "|" + x + "|" + _ + f + v + ")" + h + d;
577
- return Be = new RegExp("(?:^" + g + "$)", "i"), Be;
578
- }, Yt = {
579
- // http://emailregex.com/
580
- 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,}))$/,
581
- // url: new RegExp(
582
- // '^(?!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]*)?$',
583
- // 'i',
584
- // ),
585
- hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
586
- }, Ee = {
587
- integer: function(e) {
588
- return Ee.number(e) && parseInt(e, 10) === e;
589
- },
590
- float: function(e) {
591
- return Ee.number(e) && !Ee.integer(e);
592
- },
593
- array: function(e) {
594
- return Array.isArray(e);
595
- },
596
- regexp: function(e) {
597
- if (e instanceof RegExp)
598
- return !0;
599
- try {
600
- return !!new RegExp(e);
601
- } catch {
602
- return !1;
603
- }
604
- },
605
- date: function(e) {
606
- return typeof e.getTime == "function" && typeof e.getMonth == "function" && typeof e.getYear == "function" && !isNaN(e.getTime());
607
- },
608
- number: function(e) {
609
- return isNaN(e) ? !1 : typeof e == "number";
610
- },
611
- object: function(e) {
612
- return typeof e == "object" && !Ee.array(e);
613
- },
614
- method: function(e) {
615
- return typeof e == "function";
616
- },
617
- email: function(e) {
618
- return typeof e == "string" && e.length <= 320 && !!e.match(Yt.email);
619
- },
620
- url: function(e) {
621
- return typeof e == "string" && e.length <= 2048 && !!e.match(io());
622
- },
623
- hex: function(e) {
624
- return typeof e == "string" && !!e.match(Yt.hex);
625
- }
626
- }, so = function(e, t, r, a, l) {
627
- if (e.required && t === void 0) {
628
- $n(e, t, r, a, l);
629
- return;
630
- }
631
- var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], i = e.type;
632
- o.indexOf(i) > -1 ? Ee[i](t) || a.push(ue(l.messages.types[i], e.fullField, e.type)) : i && typeof t !== e.type && a.push(ue(l.messages.types[i], e.fullField, e.type));
633
- }, uo = function(e, t, r, a, l) {
634
- var o = typeof e.len == "number", i = typeof e.min == "number", p = typeof e.max == "number", V = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, c = t, s = null, x = typeof t == "number", _ = typeof t == "string", f = Array.isArray(t);
635
- if (x ? s = "number" : _ ? s = "string" : f && (s = "array"), !s)
636
- return !1;
637
- f && (c = t.length), _ && (c = t.replace(V, "_").length), o ? c !== e.len && a.push(ue(l.messages[s].len, e.fullField, e.len)) : i && !p && c < e.min ? a.push(ue(l.messages[s].min, e.fullField, e.min)) : p && !i && c > e.max ? a.push(ue(l.messages[s].max, e.fullField, e.max)) : i && p && (c < e.min || c > e.max) && a.push(ue(l.messages[s].range, e.fullField, e.min, e.max));
638
- }, ke = "enum", co = function(e, t, r, a, l) {
639
- e[ke] = Array.isArray(e[ke]) ? e[ke] : [], e[ke].indexOf(t) === -1 && a.push(ue(l.messages[ke], e.fullField, e[ke].join(", ")));
640
- }, fo = function(e, t, r, a, l) {
641
- if (e.pattern) {
642
- if (e.pattern instanceof RegExp)
643
- e.pattern.lastIndex = 0, e.pattern.test(t) || a.push(ue(l.messages.pattern.mismatch, e.fullField, t, e.pattern));
644
- else if (typeof e.pattern == "string") {
645
- var o = new RegExp(e.pattern);
646
- o.test(t) || a.push(ue(l.messages.pattern.mismatch, e.fullField, t, e.pattern));
647
- }
648
- }
649
- }, M = {
650
- required: $n,
651
- whitespace: lo,
652
- type: so,
653
- range: uo,
654
- enum: co,
655
- pattern: fo
656
- }, po = function(e, t, r, a, l) {
657
- var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
658
- if (i) {
659
- if (J(t, "string") && !e.required)
660
- return r();
661
- M.required(e, t, a, o, l, "string"), J(t, "string") || (M.type(e, t, a, o, l), M.range(e, t, a, o, l), M.pattern(e, t, a, o, l), e.whitespace === !0 && M.whitespace(e, t, a, o, l));
662
- }
663
- r(o);
664
- }, mo = function(e, t, r, a, l) {
665
- var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
666
- if (i) {
667
- if (J(t) && !e.required)
668
- return r();
669
- M.required(e, t, a, o, l), t !== void 0 && M.type(e, t, a, o, l);
670
- }
671
- r(o);
672
- }, vo = function(e, t, r, a, l) {
673
- var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
674
- if (i) {
675
- if (t === "" && (t = void 0), J(t) && !e.required)
676
- return r();
677
- M.required(e, t, a, o, l), t !== void 0 && (M.type(e, t, a, o, l), M.range(e, t, a, o, l));
678
- }
679
- r(o);
680
- }, go = function(e, t, r, a, l) {
681
- var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
682
- if (i) {
683
- if (J(t) && !e.required)
684
- return r();
685
- M.required(e, t, a, o, l), t !== void 0 && M.type(e, t, a, o, l);
686
- }
687
- r(o);
688
- }, yo = function(e, t, r, a, l) {
689
- var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
690
- if (i) {
691
- if (J(t) && !e.required)
692
- return r();
693
- M.required(e, t, a, o, l), J(t) || M.type(e, t, a, o, l);
694
- }
695
- r(o);
696
- }, bo = function(e, t, r, a, l) {
697
- var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
698
- if (i) {
699
- if (J(t) && !e.required)
700
- return r();
701
- M.required(e, t, a, o, l), t !== void 0 && (M.type(e, t, a, o, l), M.range(e, t, a, o, l));
702
- }
703
- r(o);
704
- }, ho = function(e, t, r, a, l) {
705
- var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
706
- if (i) {
707
- if (J(t) && !e.required)
708
- return r();
709
- M.required(e, t, a, o, l), t !== void 0 && (M.type(e, t, a, o, l), M.range(e, t, a, o, l));
710
- }
711
- r(o);
712
- }, _o = function(e, t, r, a, l) {
713
- var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
714
- if (i) {
715
- if (t == null && !e.required)
716
- return r();
717
- M.required(e, t, a, o, l, "array"), t != null && (M.type(e, t, a, o, l), M.range(e, t, a, o, l));
718
- }
719
- r(o);
720
- }, wo = function(e, t, r, a, l) {
721
- var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
722
- if (i) {
723
- if (J(t) && !e.required)
724
- return r();
725
- M.required(e, t, a, o, l), t !== void 0 && M.type(e, t, a, o, l);
726
- }
727
- r(o);
728
- }, xo = "enum", Oo = function(e, t, r, a, l) {
729
- var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
730
- if (i) {
731
- if (J(t) && !e.required)
732
- return r();
733
- M.required(e, t, a, o, l), t !== void 0 && M[xo](e, t, a, o, l);
734
- }
735
- r(o);
736
- }, ko = function(e, t, r, a, l) {
737
- var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
738
- if (i) {
739
- if (J(t, "string") && !e.required)
740
- return r();
741
- M.required(e, t, a, o, l), J(t, "string") || M.pattern(e, t, a, o, l);
742
- }
743
- r(o);
744
- }, Io = function(e, t, r, a, l) {
745
- var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
746
- if (i) {
747
- if (J(t, "date") && !e.required)
748
- return r();
749
- if (M.required(e, t, a, o, l), !J(t, "date")) {
750
- var p;
751
- t instanceof Date ? p = t : p = new Date(t), M.type(e, p, a, o, l), p && M.range(e, p.getTime(), a, o, l);
752
- }
753
- }
754
- r(o);
755
- }, $o = function(e, t, r, a, l) {
756
- var o = [], i = Array.isArray(t) ? "array" : typeof t;
757
- M.required(e, t, a, o, l, i), r(o);
758
- }, rt = function(e, t, r, a, l) {
759
- var o = e.type, i = [], p = e.required || !e.required && a.hasOwnProperty(e.field);
760
- if (p) {
761
- if (J(t, o) && !e.required)
762
- return r();
763
- M.required(e, t, a, i, l, o), J(t, o) || M.type(e, t, a, i, l);
764
- }
765
- r(i);
766
- }, Vo = function(e, t, r, a, l) {
767
- var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
768
- if (i) {
769
- if (J(t) && !e.required)
770
- return r();
771
- M.required(e, t, a, o, l);
772
- }
773
- r(o);
774
- }, Fe = {
775
- string: po,
776
- method: mo,
777
- number: vo,
778
- boolean: go,
779
- regexp: yo,
780
- integer: bo,
781
- float: ho,
782
- array: _o,
783
- object: wo,
784
- enum: Oo,
785
- pattern: ko,
786
- date: Io,
787
- url: rt,
788
- hex: rt,
789
- email: rt,
790
- required: $o,
791
- any: Vo
792
- };
793
- function dt() {
794
- return {
795
- default: "Validation error on field %s",
796
- required: "%s is required",
797
- enum: "%s must be one of %s",
798
- whitespace: "%s cannot be empty",
799
- date: {
800
- format: "%s date %s is invalid for format %s",
801
- parse: "%s date could not be parsed, %s is invalid ",
802
- invalid: "%s date %s is invalid"
803
- },
804
- types: {
805
- string: "%s is not a %s",
806
- method: "%s is not a %s (function)",
807
- array: "%s is not an %s",
808
- object: "%s is not an %s",
809
- number: "%s is not a %s",
810
- date: "%s is not a %s",
811
- boolean: "%s is not a %s",
812
- integer: "%s is not an %s",
813
- float: "%s is not a %s",
814
- regexp: "%s is not a valid %s",
815
- email: "%s is not a valid %s",
816
- url: "%s is not a valid %s",
817
- hex: "%s is not a valid %s"
818
- },
819
- string: {
820
- len: "%s must be exactly %s characters",
821
- min: "%s must be at least %s characters",
822
- max: "%s cannot be longer than %s characters",
823
- range: "%s must be between %s and %s characters"
824
- },
825
- number: {
826
- len: "%s must equal %s",
827
- min: "%s cannot be less than %s",
828
- max: "%s cannot be greater than %s",
829
- range: "%s must be between %s and %s"
830
- },
831
- array: {
832
- len: "%s must be exactly %s in length",
833
- min: "%s cannot be less than %s in length",
834
- max: "%s cannot be greater than %s in length",
835
- range: "%s must be between %s and %s in length"
836
- },
837
- pattern: {
838
- mismatch: "%s value %s does not match pattern %s"
839
- },
840
- clone: function() {
841
- var e = JSON.parse(JSON.stringify(this));
842
- return e.clone = this.clone, e;
843
- }
844
- };
845
- }
846
- var ct = dt(), Pe = /* @__PURE__ */ function() {
847
- function n(t) {
848
- this.rules = null, this._messages = ct, this.define(t);
849
- }
850
- var e = n.prototype;
851
- return e.define = function(r) {
852
- var a = this;
853
- if (!r)
854
- throw new Error("Cannot configure a schema with no rules");
855
- if (typeof r != "object" || Array.isArray(r))
856
- throw new Error("Rules must be an object");
857
- this.rules = {}, Object.keys(r).forEach(function(l) {
858
- var o = r[l];
859
- a.rules[l] = Array.isArray(o) ? o : [o];
860
- });
861
- }, e.messages = function(r) {
862
- return r && (this._messages = Gt(dt(), r)), this._messages;
863
- }, e.validate = function(r, a, l) {
864
- var o = this;
865
- a === void 0 && (a = {}), l === void 0 && (l = function() {
866
- });
867
- var i = r, p = a, V = l;
868
- if (typeof p == "function" && (V = p, p = {}), !this.rules || Object.keys(this.rules).length === 0)
869
- return V && V(null, i), Promise.resolve(i);
870
- function c(v) {
871
- var h = [], d = {};
872
- function g(w) {
873
- if (Array.isArray(w)) {
874
- var k;
875
- h = (k = h).concat.apply(k, w);
876
- } else
877
- h.push(w);
878
- }
879
- for (var y = 0; y < v.length; y++)
880
- g(v[y]);
881
- h.length ? (d = ut(h), V(h, d)) : V(null, i);
882
- }
883
- if (p.messages) {
884
- var s = this.messages();
885
- s === ct && (s = dt()), Gt(s, p.messages), p.messages = s;
886
- } else
887
- p.messages = this.messages();
888
- var x = {}, _ = p.keys || Object.keys(this.rules);
889
- _.forEach(function(v) {
890
- var h = o.rules[v], d = i[v];
891
- h.forEach(function(g) {
892
- var y = g;
893
- typeof y.transform == "function" && (i === r && (i = we({}, i)), d = i[v] = y.transform(d)), typeof y == "function" ? y = {
894
- validator: y
895
- } : y = we({}, y), y.validator = o.getValidationMethod(y), y.validator && (y.field = v, y.fullField = y.fullField || v, y.type = o.getType(y), x[v] = x[v] || [], x[v].push({
896
- rule: y,
897
- value: d,
898
- source: i,
899
- field: v
900
- }));
901
- });
902
- });
903
- var f = {};
904
- return ro(x, p, function(v, h) {
905
- var d = v.rule, g = (d.type === "object" || d.type === "array") && (typeof d.fields == "object" || typeof d.defaultField == "object");
906
- g = g && (d.required || !d.required && v.value), d.field = v.field;
907
- function y($, b) {
908
- return we({}, b, {
909
- fullField: d.fullField + "." + $,
910
- fullFields: d.fullFields ? [].concat(d.fullFields, [$]) : [$]
911
- });
912
- }
913
- function w($) {
914
- $ === void 0 && ($ = []);
915
- var b = Array.isArray($) ? $ : [$];
916
- !p.suppressWarning && b.length && n.warning("async-validator:", b), b.length && d.message !== void 0 && (b = [].concat(d.message));
917
- var O = b.map(Wt(d, i));
918
- if (p.first && O.length)
919
- return f[d.field] = 1, h(O);
920
- if (!g)
921
- h(O);
922
- else {
923
- if (d.required && !v.value)
924
- return d.message !== void 0 ? O = [].concat(d.message).map(Wt(d, i)) : p.error && (O = [p.error(d, ue(p.messages.required, d.field))]), h(O);
925
- var G = {};
926
- d.defaultField && Object.keys(v.value).map(function(X) {
927
- G[X] = d.defaultField;
928
- }), G = we({}, G, v.rule.fields);
929
- var oe = {};
930
- Object.keys(G).forEach(function(X) {
931
- var m = G[X], E = Array.isArray(m) ? m : [m];
932
- oe[X] = E.map(y.bind(null, X));
933
- });
934
- var le = new n(oe);
935
- le.messages(p.messages), v.rule.options && (v.rule.options.messages = p.messages, v.rule.options.error = p.error), le.validate(v.value, v.rule.options || p, function(X) {
936
- var m = [];
937
- O && O.length && m.push.apply(m, O), X && X.length && m.push.apply(m, X), h(m.length ? m : null);
938
- });
939
- }
940
- }
941
- var k;
942
- if (d.asyncValidator)
943
- k = d.asyncValidator(d, v.value, w, v.source, p);
944
- else if (d.validator) {
945
- try {
946
- k = d.validator(d, v.value, w, v.source, p);
947
- } catch ($) {
948
- console.error == null || console.error($), p.suppressValidatorError || setTimeout(function() {
949
- throw $;
950
- }, 0), w($.message);
951
- }
952
- k === !0 ? w() : k === !1 ? w(typeof d.message == "function" ? d.message(d.fullField || d.field) : d.message || (d.fullField || d.field) + " fails") : k instanceof Array ? w(k) : k instanceof Error && w(k.message);
953
- }
954
- k && k.then && k.then(function() {
955
- return w();
956
- }, function($) {
957
- return w($);
958
- });
959
- }, function(v) {
960
- c(v);
961
- }, i);
962
- }, e.getType = function(r) {
963
- if (r.type === void 0 && r.pattern instanceof RegExp && (r.type = "pattern"), typeof r.validator != "function" && r.type && !Fe.hasOwnProperty(r.type))
964
- throw new Error(ue("Unknown rule type %s", r.type));
965
- return r.type || "string";
966
- }, e.getValidationMethod = function(r) {
967
- if (typeof r.validator == "function")
968
- return r.validator;
969
- var a = Object.keys(r), l = a.indexOf("message");
970
- return l !== -1 && a.splice(l, 1), a.length === 1 && a[0] === "required" ? Fe.required : Fe[this.getType(r)] || void 0;
971
- }, n;
972
- }();
973
- Pe.register = function(e, t) {
974
- if (typeof t != "function")
975
- throw new Error("Cannot register a validator by type, validator is not a function");
976
- Fe[e] = t;
977
- };
978
- Pe.warning = In;
979
- Pe.messages = ct;
980
- Pe.validators = Fe;
981
- const Eo = [
982
- "",
983
- "error",
984
- "validating",
985
- "success"
986
- ], So = ce({
987
- label: String,
988
- labelWidth: {
989
- type: [String, Number],
990
- default: ""
991
- },
992
- prop: {
993
- type: Te([String, Array])
994
- },
995
- required: {
996
- type: Boolean,
997
- default: void 0
998
- },
999
- rules: {
1000
- type: Te([Object, Array])
1001
- },
1002
- error: String,
1003
- validateStatus: {
1004
- type: String,
1005
- values: Eo
1006
- },
1007
- for: String,
1008
- inlineMessage: {
1009
- type: [String, Boolean],
1010
- default: ""
1011
- },
1012
- showMessage: {
1013
- type: Boolean,
1014
- default: !0
1015
- },
1016
- size: {
1017
- type: String,
1018
- values: Ot
1019
- }
1020
- }), Kt = "ElLabelWrap";
1021
- var Fo = Z({
1022
- name: Kt,
1023
- props: {
1024
- isAutoWidth: Boolean,
1025
- updateAll: Boolean
1026
- },
1027
- setup(n, {
1028
- slots: e
1029
- }) {
1030
- const t = Ce(kt, void 0), r = Ce(at);
1031
- r || Zt(Kt, "usage: <el-form-item><label-wrap /></el-form-item>");
1032
- const a = ye("form"), l = Q(), o = Q(0), i = () => {
1033
- var c;
1034
- if ((c = l.value) != null && c.firstElementChild) {
1035
- const s = window.getComputedStyle(l.value.firstElementChild).width;
1036
- return Math.ceil(Number.parseFloat(s));
1037
- } else
1038
- return 0;
1039
- }, p = (c = "update") => {
1040
- Xe(() => {
1041
- e.default && n.isAutoWidth && (c === "update" ? o.value = i() : c === "remove" && (t == null || t.deregisterLabelWidth(o.value)));
1042
- });
1043
- }, V = () => p("update");
1044
- return Ae(() => {
1045
- V();
1046
- }), nn(() => {
1047
- p("remove");
1048
- }), rn(() => V()), ve(o, (c, s) => {
1049
- n.updateAll && (t == null || t.registerLabelWidth(c, s));
1050
- }), pn(N(() => {
1051
- var c, s;
1052
- return (s = (c = l.value) == null ? void 0 : c.firstElementChild) != null ? s : null;
1053
- }), V), () => {
1054
- var c, s;
1055
- if (!e)
1056
- return null;
1057
- const {
1058
- isAutoWidth: x
1059
- } = n;
1060
- if (x) {
1061
- const _ = t == null ? void 0 : t.autoLabelWidth, f = r == null ? void 0 : r.hasLabel, v = {};
1062
- if (f && _ && _ !== "auto") {
1063
- const h = Math.max(0, Number.parseInt(_, 10) - o.value), d = t.labelPosition === "left" ? "marginRight" : "marginLeft";
1064
- h && (v[d] = `${h}px`);
1065
- }
1066
- return F("div", {
1067
- ref: l,
1068
- class: [a.be("item", "label-wrap")],
1069
- style: v
1070
- }, [(c = e.default) == null ? void 0 : c.call(e)]);
1071
- } else
1072
- return F(H, {
1073
- ref: l
1074
- }, [(s = e.default) == null ? void 0 : s.call(e)]);
1075
- };
1076
- }
1077
- });
1078
- const To = ["role", "aria-labelledby"], Co = Z({
1079
- name: "ElFormItem"
1080
- }), qo = /* @__PURE__ */ Z({
1081
- ...Co,
1082
- props: So,
1083
- setup(n, { expose: e }) {
1084
- const t = n, r = rr(), a = Ce(kt, void 0), l = Ce(at, void 0), o = je(void 0, { formItem: !1 }), i = ye("form-item"), p = Xt().value, V = Q([]), c = Q(""), s = Bn(c, 100), x = Q(""), _ = Q();
1085
- let f, v = !1;
1086
- const h = N(() => {
1087
- if ((a == null ? void 0 : a.labelPosition) === "top")
1088
- return {};
1089
- const T = qt(t.labelWidth || (a == null ? void 0 : a.labelWidth) || "");
1090
- return T ? { width: T } : {};
1091
- }), d = N(() => {
1092
- if ((a == null ? void 0 : a.labelPosition) === "top" || a != null && a.inline)
1093
- return {};
1094
- if (!t.label && !t.labelWidth && G)
1095
- return {};
1096
- const T = qt(t.labelWidth || (a == null ? void 0 : a.labelWidth) || "");
1097
- return !t.label && !r.label ? { marginLeft: T } : {};
1098
- }), g = N(() => [
1099
- i.b(),
1100
- i.m(o.value),
1101
- i.is("error", c.value === "error"),
1102
- i.is("validating", c.value === "validating"),
1103
- i.is("success", c.value === "success"),
1104
- i.is("required", E.value || t.required),
1105
- i.is("no-asterisk", a == null ? void 0 : a.hideRequiredAsterisk),
1106
- (a == null ? void 0 : a.requireAsteriskPosition) === "right" ? "asterisk-right" : "asterisk-left",
1107
- { [i.m("feedback")]: a == null ? void 0 : a.statusIcon }
1108
- ]), y = N(() => Ke(t.inlineMessage) ? t.inlineMessage : (a == null ? void 0 : a.inlineMessage) || !1), w = N(() => [
1109
- i.e("error"),
1110
- { [i.em("error", "inline")]: y.value }
1111
- ]), k = N(() => t.prop ? _e(t.prop) ? t.prop : t.prop.join(".") : ""), $ = N(() => !!(t.label || r.label)), b = N(() => t.for || V.value.length === 1 ? V.value[0] : void 0), O = N(() => !b.value && $.value), G = !!l, oe = N(() => {
1112
- const T = a == null ? void 0 : a.model;
1113
- if (!(!T || !t.prop))
1114
- return nt(T, t.prop).value;
1115
- }), le = N(() => {
1116
- const { required: T } = t, R = [];
1117
- t.rules && R.push(...lt(t.rules));
1118
- const ne = a == null ? void 0 : a.rules;
1119
- if (ne && t.prop) {
1120
- const ee = nt(ne, t.prop).value;
1121
- ee && R.push(...lt(ee));
1122
- }
1123
- if (T !== void 0) {
1124
- const ee = R.map((fe, Oe) => [fe, Oe]).filter(([fe]) => Object.keys(fe).includes("required"));
1125
- if (ee.length > 0)
1126
- for (const [fe, Oe] of ee)
1127
- fe.required !== T && (R[Oe] = { ...fe, required: T });
1128
- else
1129
- R.push({ required: T });
1130
- }
1131
- return R;
1132
- }), X = N(() => le.value.length > 0), m = (T) => le.value.filter((ne) => !ne.trigger || !T ? !0 : Array.isArray(ne.trigger) ? ne.trigger.includes(T) : ne.trigger === T).map(({ trigger: ne, ...ee }) => ee), E = N(() => le.value.some((T) => T.required)), A = N(() => {
1133
- var T;
1134
- return s.value === "error" && t.showMessage && ((T = a == null ? void 0 : a.showMessage) != null ? T : !0);
1135
- }), W = N(() => `${t.label || ""}${(a == null ? void 0 : a.labelSuffix) || ""}`), D = (T) => {
1136
- c.value = T;
1137
- }, j = (T) => {
1138
- var R, ne;
1139
- const { errors: ee, fields: fe } = T;
1140
- (!ee || !fe) && console.error(T), D("error"), x.value = ee ? (ne = (R = ee == null ? void 0 : ee[0]) == null ? void 0 : R.message) != null ? ne : `${t.prop} is required` : "", a == null || a.emit("validate", t.prop, !1, x.value);
1141
- }, re = () => {
1142
- D("success"), a == null || a.emit("validate", t.prop, !0, "");
1143
- }, Y = async (T) => {
1144
- const R = k.value;
1145
- return new Pe({
1146
- [R]: T
1147
- }).validate({ [R]: oe.value }, { firstFields: !0 }).then(() => (re(), !0)).catch((ee) => (j(ee), Promise.reject(ee)));
1148
- }, K = async (T, R) => {
1149
- if (v || !t.prop)
1150
- return !1;
1151
- const ne = xe(R);
1152
- if (!X.value)
1153
- return R == null || R(!1), !1;
1154
- const ee = m(T);
1155
- return ee.length === 0 ? (R == null || R(!0), !0) : (D("validating"), Y(ee).then(() => (R == null || R(!0), !0)).catch((fe) => {
1156
- const { fields: Oe } = fe;
1157
- return R == null || R(!1, Oe), ne ? !1 : Promise.reject(Oe);
1158
- }));
1159
- }, et = () => {
1160
- D(""), x.value = "", v = !1;
1161
- }, Tt = async () => {
1162
- const T = a == null ? void 0 : a.model;
1163
- if (!T || !t.prop)
1164
- return;
1165
- const R = nt(T, t.prop);
1166
- v = !0, R.value = Dt(f), await Xe(), et(), v = !1;
1167
- }, Pn = (T) => {
1168
- V.value.includes(T) || V.value.push(T);
1169
- }, Rn = (T) => {
1170
- V.value = V.value.filter((R) => R !== T);
1171
- };
1172
- ve(() => t.error, (T) => {
1173
- x.value = T || "", D(T ? "error" : "");
1174
- }, { immediate: !0 }), ve(() => t.validateStatus, (T) => D(T || ""));
1175
- const tt = Ze({
1176
- ...vt(t),
1177
- $el: _,
1178
- size: o,
1179
- validateState: c,
1180
- labelId: p,
1181
- inputIds: V,
1182
- isGroup: O,
1183
- hasLabel: $,
1184
- addInputId: Pn,
1185
- removeInputId: Rn,
1186
- resetField: Tt,
1187
- clearValidate: et,
1188
- validate: K
1189
- });
1190
- return mt(at, tt), Ae(() => {
1191
- t.prop && (a == null || a.addField(tt), f = Dt(oe.value));
1192
- }), nn(() => {
1193
- a == null || a.removeField(tt);
1194
- }), e({
1195
- size: o,
1196
- validateMessage: x,
1197
- validateState: c,
1198
- validate: K,
1199
- clearValidate: et,
1200
- resetField: Tt
1201
- }), (T, R) => {
1202
- var ne;
1203
- return I(), q("div", {
1204
- ref_key: "formItemRef",
1205
- ref: _,
1206
- class: L(u(g)),
1207
- role: u(O) ? "group" : void 0,
1208
- "aria-labelledby": u(O) ? u(p) : void 0
1209
- }, [
1210
- F(u(Fo), {
1211
- "is-auto-width": u(h).width === "auto",
1212
- "update-all": ((ne = u(a)) == null ? void 0 : ne.labelWidth) === "auto"
1213
- }, {
1214
- default: S(() => [
1215
- u($) ? (I(), U(gt(u(b) ? "label" : "div"), {
1216
- key: 0,
1217
- id: u(p),
1218
- for: u(b),
1219
- class: L(u(i).e("label")),
1220
- style: Qe(u(h))
1221
- }, {
1222
- default: S(() => [
1223
- me(T.$slots, "label", { label: u(W) }, () => [
1224
- P(te(u(W)), 1)
1225
- ])
1226
- ]),
1227
- _: 3
1228
- }, 8, ["id", "for", "class", "style"])) : z("v-if", !0)
1229
- ]),
1230
- _: 3
1231
- }, 8, ["is-auto-width", "update-all"]),
1232
- C("div", {
1233
- class: L(u(i).e("content")),
1234
- style: Qe(u(d))
1235
- }, [
1236
- me(T.$slots, "default"),
1237
- F(ar, {
1238
- name: `${u(i).namespace.value}-zoom-in-top`
1239
- }, {
1240
- default: S(() => [
1241
- u(A) ? me(T.$slots, "error", {
1242
- key: 0,
1243
- error: x.value
1244
- }, () => [
1245
- C("div", {
1246
- class: L(u(w))
1247
- }, te(x.value), 3)
1248
- ]) : z("v-if", !0)
1249
- ]),
1250
- _: 3
1251
- }, 8, ["name"])
1252
- ], 6)
1253
- ], 10, To);
1254
- };
1255
- }
1256
- });
1257
- var Vn = /* @__PURE__ */ be(qo, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/form/src/form-item.vue"]]);
1258
- const No = Me(Qa, {
1259
- FormItem: Vn
1260
- }), Mo = ft(Vn), Ao = ce({
25
+ const _t = re({
1261
26
  value: {
1262
27
  type: [String, Number],
1263
28
  default: ""
@@ -1273,34 +38,34 @@ const No = Me(Qa, {
1273
38
  values: ["primary", "success", "warning", "info", "danger"],
1274
39
  default: "danger"
1275
40
  }
1276
- }), jo = ["textContent"], Po = Z({
41
+ }), kt = ["textContent"], bt = Z({
1277
42
  name: "ElBadge"
1278
- }), Ro = /* @__PURE__ */ Z({
1279
- ...Po,
1280
- props: Ao,
1281
- setup(n, { expose: e }) {
1282
- const t = n, r = ye("badge"), a = N(() => t.isDot ? "" : ae(t.value) && ae(t.max) ? t.max < t.value ? `${t.max}+` : `${t.value}` : `${t.value}`);
1283
- return e({
1284
- content: a
1285
- }), (l, o) => (I(), q("div", {
1286
- class: L(u(r).b())
43
+ }), xt = /* @__PURE__ */ Z({
44
+ ...bt,
45
+ props: _t,
46
+ setup(a, { expose: d }) {
47
+ const o = a, l = we("badge"), p = L(() => o.isDot ? "" : oe(o.value) && oe(o.max) ? o.max < o.value ? `${o.max}+` : `${o.value}` : `${o.value}`);
48
+ return d({
49
+ content: p
50
+ }), (_, e) => (s(), h("div", {
51
+ class: Q(V(l).b())
1287
52
  }, [
1288
- me(l.$slots, "default"),
1289
- F(an, {
1290
- name: `${u(r).namespace.value}-zoom-in-center`,
53
+ de(_.$slots, "default"),
54
+ c(Me, {
55
+ name: `${V(l).namespace.value}-zoom-in-center`,
1291
56
  persisted: ""
1292
57
  }, {
1293
- default: S(() => [
1294
- $e(C("sup", {
1295
- class: L([
1296
- u(r).e("content"),
1297
- u(r).em("content", l.type),
1298
- u(r).is("fixed", !!l.$slots.default),
1299
- u(r).is("dot", l.isDot)
58
+ default: u(() => [
59
+ Ee(b("sup", {
60
+ class: Q([
61
+ V(l).e("content"),
62
+ V(l).em("content", _.type),
63
+ V(l).is("fixed", !!_.$slots.default),
64
+ V(l).is("dot", _.isDot)
1300
65
  ]),
1301
- textContent: te(u(a))
1302
- }, null, 10, jo), [
1303
- [on, !l.hidden && (u(a) || l.isDot)]
66
+ textContent: R(V(p))
67
+ }, null, 10, kt), [
68
+ [Ue, !_.hidden && (V(p) || _.isDot)]
1304
69
  ])
1305
70
  ]),
1306
71
  _: 1
@@ -1308,496 +73,8 @@ const No = Me(Qa, {
1308
73
  ], 2));
1309
74
  }
1310
75
  });
1311
- var Lo = /* @__PURE__ */ be(Ro, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/badge/src/badge.vue"]]);
1312
- const Uo = Me(Lo), Do = 100, Bo = 600, Qt = {
1313
- beforeMount(n, e) {
1314
- const t = e.value, { interval: r = Do, delay: a = Bo } = xe(t) ? {} : t;
1315
- let l, o;
1316
- const i = () => xe(t) ? t() : t.handler(), p = () => {
1317
- o && (clearTimeout(o), o = void 0), l && (clearInterval(l), l = void 0);
1318
- };
1319
- n.addEventListener("mousedown", (V) => {
1320
- V.button === 0 && (p(), i(), document.addEventListener("mouseup", () => p(), {
1321
- once: !0
1322
- }), o = setTimeout(() => {
1323
- l = setInterval(() => {
1324
- i();
1325
- }, r);
1326
- }, a));
1327
- });
1328
- }
1329
- }, En = ce({
1330
- size: It,
1331
- disabled: Boolean,
1332
- label: {
1333
- type: [String, Number, Boolean],
1334
- default: ""
1335
- }
1336
- }), zo = ce({
1337
- ...En,
1338
- modelValue: {
1339
- type: [String, Number, Boolean],
1340
- default: ""
1341
- },
1342
- name: {
1343
- type: String,
1344
- default: ""
1345
- },
1346
- border: Boolean
1347
- }), Sn = {
1348
- [he]: (n) => _e(n) || ae(n) || Ke(n),
1349
- [Vt]: (n) => _e(n) || ae(n) || Ke(n)
1350
- }, Fn = Symbol("radioGroupKey"), Tn = (n, e) => {
1351
- const t = Q(), r = Ce(Fn, void 0), a = N(() => !!r), l = N({
1352
- get() {
1353
- return a.value ? r.modelValue : n.modelValue;
1354
- },
1355
- set(c) {
1356
- a.value ? r.changeEvent(c) : e && e(he, c), t.value.checked = n.modelValue === n.label;
1357
- }
1358
- }), o = je(N(() => r == null ? void 0 : r.size)), i = hn(N(() => r == null ? void 0 : r.disabled)), p = Q(!1), V = N(() => i.value || a.value && l.value !== n.label ? -1 : 0);
1359
- return {
1360
- radioRef: t,
1361
- isGroup: a,
1362
- radioGroup: r,
1363
- focus: p,
1364
- size: o,
1365
- disabled: i,
1366
- tabIndex: V,
1367
- modelValue: l
1368
- };
1369
- }, Wo = ["value", "name", "disabled"], Go = Z({
1370
- name: "ElRadio"
1371
- }), Yo = /* @__PURE__ */ Z({
1372
- ...Go,
1373
- props: zo,
1374
- emits: Sn,
1375
- setup(n, { emit: e }) {
1376
- const t = n, r = ye("radio"), { radioRef: a, radioGroup: l, focus: o, size: i, disabled: p, modelValue: V } = Tn(t, e);
1377
- function c() {
1378
- Xe(() => e("change", V.value));
1379
- }
1380
- return (s, x) => {
1381
- var _;
1382
- return I(), q("label", {
1383
- class: L([
1384
- u(r).b(),
1385
- u(r).is("disabled", u(p)),
1386
- u(r).is("focus", u(o)),
1387
- u(r).is("bordered", s.border),
1388
- u(r).is("checked", u(V) === s.label),
1389
- u(r).m(u(i))
1390
- ])
1391
- }, [
1392
- C("span", {
1393
- class: L([
1394
- u(r).e("input"),
1395
- u(r).is("disabled", u(p)),
1396
- u(r).is("checked", u(V) === s.label)
1397
- ])
1398
- }, [
1399
- $e(C("input", {
1400
- ref_key: "radioRef",
1401
- ref: a,
1402
- "onUpdate:modelValue": x[0] || (x[0] = (f) => ln(V) ? V.value = f : null),
1403
- class: L(u(r).e("original")),
1404
- value: s.label,
1405
- name: s.name || ((_ = u(l)) == null ? void 0 : _.name),
1406
- disabled: u(p),
1407
- type: "radio",
1408
- onFocus: x[1] || (x[1] = (f) => o.value = !0),
1409
- onBlur: x[2] || (x[2] = (f) => o.value = !1),
1410
- onChange: c,
1411
- onClick: x[3] || (x[3] = ge(() => {
1412
- }, ["stop"]))
1413
- }, null, 42, Wo), [
1414
- [sn, u(V)]
1415
- ]),
1416
- C("span", {
1417
- class: L(u(r).e("inner"))
1418
- }, null, 2)
1419
- ], 2),
1420
- C("span", {
1421
- class: L(u(r).e("label")),
1422
- onKeydown: x[4] || (x[4] = ge(() => {
1423
- }, ["stop"]))
1424
- }, [
1425
- me(s.$slots, "default", {}, () => [
1426
- P(te(s.label), 1)
1427
- ])
1428
- ], 34)
1429
- ], 2);
1430
- };
1431
- }
1432
- });
1433
- var Ko = /* @__PURE__ */ be(Yo, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio.vue"]]);
1434
- const Qo = ce({
1435
- ...En,
1436
- name: {
1437
- type: String,
1438
- default: ""
1439
- }
1440
- }), Ho = ["value", "name", "disabled"], Jo = Z({
1441
- name: "ElRadioButton"
1442
- }), Zo = /* @__PURE__ */ Z({
1443
- ...Jo,
1444
- props: Qo,
1445
- setup(n) {
1446
- const e = n, t = ye("radio"), { radioRef: r, focus: a, size: l, disabled: o, modelValue: i, radioGroup: p } = Tn(e), V = N(() => ({
1447
- backgroundColor: (p == null ? void 0 : p.fill) || "",
1448
- borderColor: (p == null ? void 0 : p.fill) || "",
1449
- boxShadow: p != null && p.fill ? `-1px 0 0 0 ${p.fill}` : "",
1450
- color: (p == null ? void 0 : p.textColor) || ""
1451
- }));
1452
- return (c, s) => {
1453
- var x;
1454
- return I(), q("label", {
1455
- class: L([
1456
- u(t).b("button"),
1457
- u(t).is("active", u(i) === c.label),
1458
- u(t).is("disabled", u(o)),
1459
- u(t).is("focus", u(a)),
1460
- u(t).bm("button", u(l))
1461
- ])
1462
- }, [
1463
- $e(C("input", {
1464
- ref_key: "radioRef",
1465
- ref: r,
1466
- "onUpdate:modelValue": s[0] || (s[0] = (_) => ln(i) ? i.value = _ : null),
1467
- class: L(u(t).be("button", "original-radio")),
1468
- value: c.label,
1469
- type: "radio",
1470
- name: c.name || ((x = u(p)) == null ? void 0 : x.name),
1471
- disabled: u(o),
1472
- onFocus: s[1] || (s[1] = (_) => a.value = !0),
1473
- onBlur: s[2] || (s[2] = (_) => a.value = !1),
1474
- onClick: s[3] || (s[3] = ge(() => {
1475
- }, ["stop"]))
1476
- }, null, 42, Ho), [
1477
- [sn, u(i)]
1478
- ]),
1479
- C("span", {
1480
- class: L(u(t).be("button", "inner")),
1481
- style: Qe(u(i) === c.label ? u(V) : {}),
1482
- onKeydown: s[4] || (s[4] = ge(() => {
1483
- }, ["stop"]))
1484
- }, [
1485
- me(c.$slots, "default", {}, () => [
1486
- P(te(c.label), 1)
1487
- ])
1488
- ], 38)
1489
- ], 2);
1490
- };
1491
- }
1492
- });
1493
- var Cn = /* @__PURE__ */ be(Zo, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-button.vue"]]);
1494
- const Xo = ce({
1495
- id: {
1496
- type: String,
1497
- default: void 0
1498
- },
1499
- size: It,
1500
- disabled: Boolean,
1501
- modelValue: {
1502
- type: [String, Number, Boolean],
1503
- default: ""
1504
- },
1505
- fill: {
1506
- type: String,
1507
- default: ""
1508
- },
1509
- label: {
1510
- type: String,
1511
- default: void 0
1512
- },
1513
- textColor: {
1514
- type: String,
1515
- default: ""
1516
- },
1517
- name: {
1518
- type: String,
1519
- default: void 0
1520
- },
1521
- validateEvent: {
1522
- type: Boolean,
1523
- default: !0
1524
- }
1525
- }), el = Sn, tl = ["id", "aria-label", "aria-labelledby"], nl = Z({
1526
- name: "ElRadioGroup"
1527
- }), rl = /* @__PURE__ */ Z({
1528
- ...nl,
1529
- props: Xo,
1530
- emits: el,
1531
- setup(n, { emit: e }) {
1532
- const t = n, r = ye("radio"), a = Xt(), l = Q(), { formItem: o } = _n(), { inputId: i, isLabeledByFormItem: p } = mr(t, {
1533
- formItemContext: o
1534
- }), V = (s) => {
1535
- e(he, s), Xe(() => e("change", s));
1536
- };
1537
- Ae(() => {
1538
- const s = l.value.querySelectorAll("[type=radio]"), x = s[0];
1539
- !Array.from(s).some((_) => _.checked) && x && (x.tabIndex = 0);
1540
- });
1541
- const c = N(() => t.name || a.value);
1542
- return mt(Fn, Ze({
1543
- ...vt(t),
1544
- changeEvent: V,
1545
- name: c
1546
- })), ve(() => t.modelValue, () => {
1547
- t.validateEvent && (o == null || o.validate("change").catch((s) => pe(s)));
1548
- }), (s, x) => (I(), q("div", {
1549
- id: u(i),
1550
- ref_key: "radioGroupRef",
1551
- ref: l,
1552
- class: L(u(r).b("group")),
1553
- role: "radiogroup",
1554
- "aria-label": u(p) ? void 0 : s.label || "radio-group",
1555
- "aria-labelledby": u(p) ? u(o).labelId : void 0
1556
- }, [
1557
- me(s.$slots, "default")
1558
- ], 10, tl));
1559
- }
1560
- });
1561
- var qn = /* @__PURE__ */ be(rl, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-group.vue"]]);
1562
- const Et = Me(Ko, {
1563
- RadioButton: Cn,
1564
- RadioGroup: qn
1565
- }), St = ft(qn);
1566
- ft(Cn);
1567
- const al = ce({
1568
- id: {
1569
- type: String,
1570
- default: void 0
1571
- },
1572
- step: {
1573
- type: Number,
1574
- default: 1
1575
- },
1576
- stepStrictly: Boolean,
1577
- max: {
1578
- type: Number,
1579
- default: Number.POSITIVE_INFINITY
1580
- },
1581
- min: {
1582
- type: Number,
1583
- default: Number.NEGATIVE_INFINITY
1584
- },
1585
- modelValue: Number,
1586
- readonly: Boolean,
1587
- disabled: Boolean,
1588
- size: It,
1589
- controls: {
1590
- type: Boolean,
1591
- default: !0
1592
- },
1593
- controlsPosition: {
1594
- type: String,
1595
- default: "",
1596
- values: ["", "right"]
1597
- },
1598
- valueOnClear: {
1599
- type: [String, Number, null],
1600
- validator: (n) => n === null || ae(n) || ["min", "max"].includes(n),
1601
- default: null
1602
- },
1603
- name: String,
1604
- label: String,
1605
- placeholder: String,
1606
- precision: {
1607
- type: Number,
1608
- validator: (n) => n >= 0 && n === Number.parseInt(`${n}`, 10)
1609
- },
1610
- validateEvent: {
1611
- type: Boolean,
1612
- default: !0
1613
- }
1614
- }), ol = {
1615
- [Vt]: (n, e) => e !== n,
1616
- blur: (n) => n instanceof FocusEvent,
1617
- focus: (n) => n instanceof FocusEvent,
1618
- [ze]: (n) => ae(n) || Se(n),
1619
- [he]: (n) => ae(n) || Se(n)
1620
- }, ll = ["aria-label", "onKeydown"], il = ["aria-label", "onKeydown"], sl = Z({
1621
- name: "ElInputNumber"
1622
- }), ul = /* @__PURE__ */ Z({
1623
- ...sl,
1624
- props: al,
1625
- emits: ol,
1626
- setup(n, { expose: e, emit: t }) {
1627
- const r = n, { t: a } = zn(), l = ye("input-number"), o = Q(), i = Ze({
1628
- currentValue: r.modelValue,
1629
- userInput: null
1630
- }), { formItem: p } = _n(), V = N(() => ae(r.modelValue) && r.modelValue <= r.min), c = N(() => ae(r.modelValue) && r.modelValue >= r.max), s = N(() => {
1631
- const m = d(r.step);
1632
- return Le(r.precision) ? Math.max(d(r.modelValue), m) : (m > r.precision && pe("InputNumber", "precision should not be less than the decimal places of step"), r.precision);
1633
- }), x = N(() => r.controls && r.controlsPosition === "right"), _ = je(), f = hn(), v = N(() => {
1634
- if (i.userInput !== null)
1635
- return i.userInput;
1636
- let m = i.currentValue;
1637
- if (Se(m))
1638
- return "";
1639
- if (ae(m)) {
1640
- if (Number.isNaN(m))
1641
- return "";
1642
- Le(r.precision) || (m = m.toFixed(r.precision));
1643
- }
1644
- return m;
1645
- }), h = (m, E) => {
1646
- if (Le(E) && (E = s.value), E === 0)
1647
- return Math.round(m);
1648
- let A = String(m);
1649
- const W = A.indexOf(".");
1650
- if (W === -1 || !A.replace(".", "").split("")[W + E])
1651
- return m;
1652
- const re = A.length;
1653
- return A.charAt(re - 1) === "5" && (A = `${A.slice(0, Math.max(0, re - 1))}6`), Number.parseFloat(Number(A).toFixed(E));
1654
- }, d = (m) => {
1655
- if (Se(m))
1656
- return 0;
1657
- const E = m.toString(), A = E.indexOf(".");
1658
- let W = 0;
1659
- return A !== -1 && (W = E.length - A - 1), W;
1660
- }, g = (m, E = 1) => ae(m) ? h(m + r.step * E) : i.currentValue, y = () => {
1661
- if (r.readonly || f.value || c.value)
1662
- return;
1663
- const m = Number(v.value) || 0, E = g(m);
1664
- $(E), t(ze, i.currentValue);
1665
- }, w = () => {
1666
- if (r.readonly || f.value || V.value)
1667
- return;
1668
- const m = Number(v.value) || 0, E = g(m, -1);
1669
- $(E), t(ze, i.currentValue);
1670
- }, k = (m, E) => {
1671
- const { max: A, min: W, step: D, precision: j, stepStrictly: re, valueOnClear: Y } = r;
1672
- A < W && Zt("InputNumber", "min should not be greater than max.");
1673
- let K = Number(m);
1674
- if (Se(m) || Number.isNaN(K))
1675
- return null;
1676
- if (m === "") {
1677
- if (Y === null)
1678
- return null;
1679
- K = _e(Y) ? { min: W, max: A }[Y] : Y;
1680
- }
1681
- return re && (K = h(Math.round(K / D) * D, j)), Le(j) || (K = h(K, j)), (K > A || K < W) && (K = K > A ? A : W, E && t(he, K)), K;
1682
- }, $ = (m, E = !0) => {
1683
- var A;
1684
- const W = i.currentValue, D = k(m);
1685
- if (!E) {
1686
- t(he, D);
1687
- return;
1688
- }
1689
- W !== D && (i.userInput = null, t(he, D), t(Vt, D, W), r.validateEvent && ((A = p == null ? void 0 : p.validate) == null || A.call(p, "change").catch((j) => pe(j))), i.currentValue = D);
1690
- }, b = (m) => {
1691
- i.userInput = m;
1692
- const E = m === "" ? null : Number(m);
1693
- t(ze, E), $(E, !1);
1694
- }, O = (m) => {
1695
- const E = m !== "" ? Number(m) : "";
1696
- (ae(E) && !Number.isNaN(E) || m === "") && $(E), i.userInput = null;
1697
- }, G = () => {
1698
- var m, E;
1699
- (E = (m = o.value) == null ? void 0 : m.focus) == null || E.call(m);
1700
- }, oe = () => {
1701
- var m, E;
1702
- (E = (m = o.value) == null ? void 0 : m.blur) == null || E.call(m);
1703
- }, le = (m) => {
1704
- t("focus", m);
1705
- }, X = (m) => {
1706
- var E;
1707
- t("blur", m), r.validateEvent && ((E = p == null ? void 0 : p.validate) == null || E.call(p, "blur").catch((A) => pe(A)));
1708
- };
1709
- return ve(() => r.modelValue, (m) => {
1710
- const E = k(i.userInput), A = k(m, !0);
1711
- !ae(E) && (!E || E !== A) && (i.currentValue = A, i.userInput = null);
1712
- }, { immediate: !0 }), Ae(() => {
1713
- var m;
1714
- const { min: E, max: A, modelValue: W } = r, D = (m = o.value) == null ? void 0 : m.input;
1715
- if (D.setAttribute("role", "spinbutton"), Number.isFinite(A) ? D.setAttribute("aria-valuemax", String(A)) : D.removeAttribute("aria-valuemax"), Number.isFinite(E) ? D.setAttribute("aria-valuemin", String(E)) : D.removeAttribute("aria-valuemin"), D.setAttribute("aria-valuenow", i.currentValue || i.currentValue === 0 ? String(i.currentValue) : ""), D.setAttribute("aria-disabled", String(f.value)), !ae(W) && W != null) {
1716
- let j = Number(W);
1717
- Number.isNaN(j) && (j = null), t(he, j);
1718
- }
1719
- }), rn(() => {
1720
- var m, E;
1721
- const A = (m = o.value) == null ? void 0 : m.input;
1722
- A == null || A.setAttribute("aria-valuenow", `${(E = i.currentValue) != null ? E : ""}`);
1723
- }), e({
1724
- focus: G,
1725
- blur: oe
1726
- }), (m, E) => (I(), q("div", {
1727
- class: L([
1728
- u(l).b(),
1729
- u(l).m(u(_)),
1730
- u(l).is("disabled", u(f)),
1731
- u(l).is("without-controls", !m.controls),
1732
- u(l).is("controls-right", u(x))
1733
- ]),
1734
- onDragstart: E[1] || (E[1] = ge(() => {
1735
- }, ["prevent"]))
1736
- }, [
1737
- m.controls ? $e((I(), q("span", {
1738
- key: 0,
1739
- role: "button",
1740
- "aria-label": u(a)("el.inputNumber.decrease"),
1741
- class: L([u(l).e("decrease"), u(l).is("disabled", u(V))]),
1742
- onKeydown: Ue(w, ["enter"])
1743
- }, [
1744
- F(u(qe), null, {
1745
- default: S(() => [
1746
- u(x) ? (I(), U(u(vr), { key: 0 })) : (I(), U(u(gr), { key: 1 }))
1747
- ]),
1748
- _: 1
1749
- })
1750
- ], 42, ll)), [
1751
- [u(Qt), w]
1752
- ]) : z("v-if", !0),
1753
- m.controls ? $e((I(), q("span", {
1754
- key: 1,
1755
- role: "button",
1756
- "aria-label": u(a)("el.inputNumber.increase"),
1757
- class: L([u(l).e("increase"), u(l).is("disabled", u(c))]),
1758
- onKeydown: Ue(y, ["enter"])
1759
- }, [
1760
- F(u(qe), null, {
1761
- default: S(() => [
1762
- u(x) ? (I(), U(u(yr), { key: 0 })) : (I(), U(u(ot), { key: 1 }))
1763
- ]),
1764
- _: 1
1765
- })
1766
- ], 42, il)), [
1767
- [u(Qt), y]
1768
- ]) : z("v-if", !0),
1769
- F(u(xt), {
1770
- id: m.id,
1771
- ref_key: "input",
1772
- ref: o,
1773
- type: "number",
1774
- step: m.step,
1775
- "model-value": u(v),
1776
- placeholder: m.placeholder,
1777
- readonly: m.readonly,
1778
- disabled: u(f),
1779
- size: u(_),
1780
- max: m.max,
1781
- min: m.min,
1782
- name: m.name,
1783
- label: m.label,
1784
- "validate-event": !1,
1785
- onWheel: E[0] || (E[0] = ge(() => {
1786
- }, ["prevent"])),
1787
- onKeydown: [
1788
- Ue(ge(y, ["prevent"]), ["up"]),
1789
- Ue(ge(w, ["prevent"]), ["down"])
1790
- ],
1791
- onBlur: X,
1792
- onFocus: le,
1793
- onInput: b,
1794
- onChange: O
1795
- }, null, 8, ["id", "step", "model-value", "placeholder", "readonly", "disabled", "size", "max", "min", "name", "label", "onKeydown"])
1796
- ], 34));
1797
- }
1798
- });
1799
- var dl = /* @__PURE__ */ be(ul, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/input-number/src/input-number.vue"]]);
1800
- const Nn = Me(dl), cl = ce({
76
+ var ht = /* @__PURE__ */ ie(xt, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/badge/src/badge.vue"]]);
77
+ const Ot = Ce(ht), It = re({
1801
78
  type: {
1802
79
  type: String,
1803
80
  values: ["primary", "success", "info", "warning", "danger", ""],
@@ -1805,7 +82,7 @@ const Nn = Me(dl), cl = ce({
1805
82
  },
1806
83
  size: {
1807
84
  type: String,
1808
- values: Ot,
85
+ values: ut,
1809
86
  default: ""
1810
87
  },
1811
88
  truncated: {
@@ -1815,30 +92,30 @@ const Nn = Me(dl), cl = ce({
1815
92
  type: String,
1816
93
  default: "span"
1817
94
  }
1818
- }), fl = Z({
95
+ }), Vt = Z({
1819
96
  name: "ElText"
1820
- }), pl = /* @__PURE__ */ Z({
1821
- ...fl,
1822
- props: cl,
1823
- setup(n) {
1824
- const e = n, t = je(), r = ye("text"), a = N(() => [
1825
- r.b(),
1826
- r.m(e.type),
1827
- r.m(t.value),
1828
- r.is("truncated", e.truncated)
97
+ }), $t = /* @__PURE__ */ Z({
98
+ ...Vt,
99
+ props: It,
100
+ setup(a) {
101
+ const d = a, o = ct(), l = we("text"), p = L(() => [
102
+ l.b(),
103
+ l.m(d.type),
104
+ l.m(o.value),
105
+ l.is("truncated", d.truncated)
1829
106
  ]);
1830
- return (l, o) => (I(), U(gt(l.tag), {
1831
- class: L(u(a))
107
+ return (_, e) => (s(), C(De(_.tag), {
108
+ class: Q(V(p))
1832
109
  }, {
1833
- default: S(() => [
1834
- me(l.$slots, "default")
110
+ default: u(() => [
111
+ de(_.$slots, "default")
1835
112
  ]),
1836
113
  _: 3
1837
114
  }, 8, ["class"]));
1838
115
  }
1839
116
  });
1840
- var ml = /* @__PURE__ */ be(pl, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/text/src/text.vue"]]);
1841
- const vl = Me(ml), Mn = ["success", "info", "warning", "error"], ie = xr({
117
+ var wt = /* @__PURE__ */ ie($t, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/text/src/text.vue"]]);
118
+ const Ct = Ce(wt), Be = ["success", "info", "warning", "error"], P = ft({
1842
119
  customClass: "",
1843
120
  center: !1,
1844
121
  dangerouslyUseHTMLString: !1,
@@ -1853,266 +130,265 @@ const vl = Me(ml), Mn = ["success", "info", "warning", "error"], ie = xr({
1853
130
  zIndex: 0,
1854
131
  grouping: !1,
1855
132
  repeatNum: 1,
1856
- appendTo: en ? document.body : void 0
1857
- }), gl = ce({
133
+ appendTo: Te ? document.body : void 0
134
+ }), Tt = re({
1858
135
  customClass: {
1859
136
  type: String,
1860
- default: ie.customClass
137
+ default: P.customClass
1861
138
  },
1862
139
  center: {
1863
140
  type: Boolean,
1864
- default: ie.center
141
+ default: P.center
1865
142
  },
1866
143
  dangerouslyUseHTMLString: {
1867
144
  type: Boolean,
1868
- default: ie.dangerouslyUseHTMLString
145
+ default: P.dangerouslyUseHTMLString
1869
146
  },
1870
147
  duration: {
1871
148
  type: Number,
1872
- default: ie.duration
149
+ default: P.duration
1873
150
  },
1874
151
  icon: {
1875
- type: br,
1876
- default: ie.icon
152
+ type: dt,
153
+ default: P.icon
1877
154
  },
1878
155
  id: {
1879
156
  type: String,
1880
- default: ie.id
157
+ default: P.id
1881
158
  },
1882
159
  message: {
1883
- type: Te([
160
+ type: ke([
1884
161
  String,
1885
162
  Object,
1886
163
  Function
1887
164
  ]),
1888
- default: ie.message
165
+ default: P.message
1889
166
  },
1890
167
  onClose: {
1891
- type: Te(Function),
168
+ type: ke(Function),
1892
169
  required: !1
1893
170
  },
1894
171
  showClose: {
1895
172
  type: Boolean,
1896
- default: ie.showClose
173
+ default: P.showClose
1897
174
  },
1898
175
  type: {
1899
176
  type: String,
1900
- values: Mn,
1901
- default: ie.type
177
+ values: Be,
178
+ default: P.type
1902
179
  },
1903
180
  offset: {
1904
181
  type: Number,
1905
- default: ie.offset
182
+ default: P.offset
1906
183
  },
1907
184
  zIndex: {
1908
185
  type: Number,
1909
- default: ie.zIndex
186
+ default: P.zIndex
1910
187
  },
1911
188
  grouping: {
1912
189
  type: Boolean,
1913
- default: ie.grouping
190
+ default: P.grouping
1914
191
  },
1915
192
  repeatNum: {
1916
193
  type: Number,
1917
- default: ie.repeatNum
194
+ default: P.repeatNum
1918
195
  }
1919
- }), yl = {
196
+ }), St = {
1920
197
  destroy: () => !0
1921
- }, de = or([]), bl = (n) => {
1922
- const e = de.findIndex((a) => a.id === n), t = de[e];
1923
- let r;
1924
- return e > 0 && (r = de[e - 1]), { current: t, prev: r };
1925
- }, hl = (n) => {
1926
- const { prev: e } = bl(n);
1927
- return e ? e.vm.exposed.bottom.value : 0;
1928
- }, _l = (n, e) => de.findIndex((r) => r.id === n) > 0 ? 20 : e, wl = ["id"], xl = ["innerHTML"], Ol = Z({
198
+ }, Y = nt([]), Mt = (a) => {
199
+ const d = Y.findIndex((p) => p.id === a), o = Y[d];
200
+ let l;
201
+ return d > 0 && (l = Y[d - 1]), { current: o, prev: l };
202
+ }, Et = (a) => {
203
+ const { prev: d } = Mt(a);
204
+ return d ? d.vm.exposed.bottom.value : 0;
205
+ }, Ut = (a, d) => Y.findIndex((l) => l.id === a) > 0 ? 20 : d, Dt = ["id"], qt = ["innerHTML"], Ft = Z({
1929
206
  name: "ElMessage"
1930
- }), kl = /* @__PURE__ */ Z({
1931
- ...Ol,
1932
- props: gl,
1933
- emits: yl,
1934
- setup(n, { expose: e }) {
1935
- const t = n, { Close: r } = hr, { ns: a, zIndex: l } = kr("message"), { currentZIndex: o, nextZIndex: i } = l, p = Q(), V = Q(!1), c = Q(0);
1936
- let s;
1937
- const x = N(() => t.type ? t.type === "error" ? "danger" : t.type : "info"), _ = N(() => {
1938
- const b = t.type;
1939
- return { [a.bm("icon", b)]: b && At[b] };
1940
- }), f = N(() => t.icon || At[t.type] || ""), v = N(() => hl(t.id)), h = N(() => _l(t.id, t.offset) + v.value), d = N(() => c.value + h.value), g = N(() => ({
1941
- top: `${h.value}px`,
1942
- zIndex: o.value
207
+ }), Lt = /* @__PURE__ */ Z({
208
+ ...Ft,
209
+ props: Tt,
210
+ emits: St,
211
+ setup(a, { expose: d }) {
212
+ const o = a, { Close: l } = pt, { ns: p, zIndex: _ } = gt("message"), { currentZIndex: e, nextZIndex: D } = _, N = G(), E = G(!1), g = G(0);
213
+ let r;
214
+ const S = L(() => o.type ? o.type === "error" ? "danger" : o.type : "info"), m = L(() => {
215
+ const t = o.type;
216
+ return { [p.bm("icon", t)]: t && Oe[t] };
217
+ }), n = L(() => o.icon || Oe[o.type] || ""), O = L(() => Et(o.id)), x = L(() => Ut(o.id, o.offset) + O.value), v = L(() => g.value + x.value), f = L(() => ({
218
+ top: `${x.value}px`,
219
+ zIndex: e.value
1943
220
  }));
1944
- function y() {
1945
- t.duration !== 0 && ({ stop: s } = Wn(() => {
1946
- k();
1947
- }, t.duration));
221
+ function $() {
222
+ o.duration !== 0 && ({ stop: r } = Ge(() => {
223
+ y();
224
+ }, o.duration));
1948
225
  }
1949
- function w() {
1950
- s == null || s();
226
+ function I() {
227
+ r == null || r();
1951
228
  }
1952
- function k() {
1953
- V.value = !1;
229
+ function y() {
230
+ E.value = !1;
1954
231
  }
1955
- function $({ code: b }) {
1956
- b === Ir.esc && k();
232
+ function k({ code: t }) {
233
+ t === yt.esc && y();
1957
234
  }
1958
- return Ae(() => {
1959
- y(), i(), V.value = !0;
1960
- }), ve(() => t.repeatNum, () => {
1961
- w(), y();
1962
- }), pr(document, "keydown", $), pn(p, () => {
1963
- c.value = p.value.getBoundingClientRect().height;
1964
- }), e({
1965
- visible: V,
1966
- bottom: d,
1967
- close: k
1968
- }), (b, O) => (I(), U(an, {
1969
- name: u(a).b("fade"),
1970
- onBeforeLeave: b.onClose,
1971
- onAfterLeave: O[0] || (O[0] = (G) => b.$emit("destroy")),
235
+ return lt(() => {
236
+ $(), D(), E.value = !0;
237
+ }), ne(() => o.repeatNum, () => {
238
+ I(), $();
239
+ }), rt(document, "keydown", k), it(N, () => {
240
+ g.value = N.value.getBoundingClientRect().height;
241
+ }), d({
242
+ visible: E,
243
+ bottom: v,
244
+ close: y
245
+ }), (t, i) => (s(), C(Me, {
246
+ name: V(p).b("fade"),
247
+ onBeforeLeave: t.onClose,
248
+ onAfterLeave: i[0] || (i[0] = (j) => t.$emit("destroy")),
1972
249
  persisted: ""
1973
250
  }, {
1974
- default: S(() => [
1975
- $e(C("div", {
1976
- id: b.id,
251
+ default: u(() => [
252
+ Ee(b("div", {
253
+ id: t.id,
1977
254
  ref_key: "messageRef",
1978
- ref: p,
1979
- class: L([
1980
- u(a).b(),
1981
- { [u(a).m(b.type)]: b.type && !b.icon },
1982
- u(a).is("center", b.center),
1983
- u(a).is("closable", b.showClose),
1984
- b.customClass
255
+ ref: N,
256
+ class: Q([
257
+ V(p).b(),
258
+ { [V(p).m(t.type)]: t.type && !t.icon },
259
+ V(p).is("center", t.center),
260
+ V(p).is("closable", t.showClose),
261
+ t.customClass
1985
262
  ]),
1986
- style: Qe(u(g)),
263
+ style: ot(V(f)),
1987
264
  role: "alert",
1988
- onMouseenter: w,
1989
- onMouseleave: y
265
+ onMouseenter: I,
266
+ onMouseleave: $
1990
267
  }, [
1991
- b.repeatNum > 1 ? (I(), U(u(Uo), {
268
+ t.repeatNum > 1 ? (s(), C(V(Ot), {
1992
269
  key: 0,
1993
- value: b.repeatNum,
1994
- type: u(x),
1995
- class: L(u(a).e("badge"))
1996
- }, null, 8, ["value", "type", "class"])) : z("v-if", !0),
1997
- u(f) ? (I(), U(u(qe), {
270
+ value: t.repeatNum,
271
+ type: V(S),
272
+ class: Q(V(p).e("badge"))
273
+ }, null, 8, ["value", "type", "class"])) : T("v-if", !0),
274
+ V(n) ? (s(), C(V(se), {
1998
275
  key: 1,
1999
- class: L([u(a).e("icon"), u(_)])
276
+ class: Q([V(p).e("icon"), V(m)])
2000
277
  }, {
2001
- default: S(() => [
2002
- (I(), U(gt(u(f))))
278
+ default: u(() => [
279
+ (s(), C(De(V(n))))
2003
280
  ]),
2004
281
  _: 1
2005
- }, 8, ["class"])) : z("v-if", !0),
2006
- me(b.$slots, "default", {}, () => [
2007
- b.dangerouslyUseHTMLString ? (I(), q(H, { key: 1 }, [
2008
- z(" Caution here, message could've been compromised, never use user's input as message "),
2009
- C("p", {
2010
- class: L(u(a).e("content")),
2011
- innerHTML: b.message
2012
- }, null, 10, xl)
2013
- ], 2112)) : (I(), q("p", {
282
+ }, 8, ["class"])) : T("v-if", !0),
283
+ de(t.$slots, "default", {}, () => [
284
+ t.dangerouslyUseHTMLString ? (s(), h(U, { key: 1 }, [
285
+ T(" Caution here, message could've been compromised, never use user's input as message "),
286
+ b("p", {
287
+ class: Q(V(p).e("content")),
288
+ innerHTML: t.message
289
+ }, null, 10, qt)
290
+ ], 2112)) : (s(), h("p", {
2014
291
  key: 0,
2015
- class: L(u(a).e("content"))
2016
- }, te(b.message), 3))
292
+ class: Q(V(p).e("content"))
293
+ }, R(t.message), 3))
2017
294
  ]),
2018
- b.showClose ? (I(), U(u(qe), {
295
+ t.showClose ? (s(), C(V(se), {
2019
296
  key: 2,
2020
- class: L(u(a).e("closeBtn")),
2021
- onClick: ge(k, ["stop"])
297
+ class: Q(V(p).e("closeBtn")),
298
+ onClick: at(y, ["stop"])
2022
299
  }, {
2023
- default: S(() => [
2024
- F(u(r))
300
+ default: u(() => [
301
+ c(V(l))
2025
302
  ]),
2026
303
  _: 1
2027
- }, 8, ["class", "onClick"])) : z("v-if", !0)
2028
- ], 46, wl), [
2029
- [on, V.value]
304
+ }, 8, ["class", "onClick"])) : T("v-if", !0)
305
+ ], 46, Dt), [
306
+ [Ue, E.value]
2030
307
  ])
2031
308
  ]),
2032
309
  _: 3
2033
310
  }, 8, ["name", "onBeforeLeave"]));
2034
311
  }
2035
312
  });
2036
- var Il = /* @__PURE__ */ be(kl, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/message/src/message.vue"]]);
2037
- let $l = 1;
2038
- const An = (n) => {
2039
- const e = !n || _e(n) || un(n) || xe(n) ? { message: n } : n, t = {
2040
- ...ie,
2041
- ...e
313
+ var Nt = /* @__PURE__ */ ie(Lt, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/message/src/message.vue"]]);
314
+ let zt = 1;
315
+ const je = (a) => {
316
+ const d = !a || be(a) || qe(a) || ae(a) ? { message: a } : a, o = {
317
+ ...P,
318
+ ...d
2042
319
  };
2043
- if (!t.appendTo)
2044
- t.appendTo = document.body;
2045
- else if (_e(t.appendTo)) {
2046
- let r = document.querySelector(t.appendTo);
2047
- Gn(r) || (pe("ElMessage", "the appendTo option is not an HTMLElement. Falling back to document.body."), r = document.body), t.appendTo = r;
320
+ if (!o.appendTo)
321
+ o.appendTo = document.body;
322
+ else if (be(o.appendTo)) {
323
+ let l = document.querySelector(o.appendTo);
324
+ He(l) || (Ae("ElMessage", "the appendTo option is not an HTMLElement. Falling back to document.body."), l = document.body), o.appendTo = l;
2048
325
  }
2049
- return t;
2050
- }, Vl = (n) => {
2051
- const e = de.indexOf(n);
2052
- if (e === -1)
326
+ return o;
327
+ }, Pt = (a) => {
328
+ const d = Y.indexOf(a);
329
+ if (d === -1)
2053
330
  return;
2054
- de.splice(e, 1);
2055
- const { handler: t } = n;
2056
- t.close();
2057
- }, El = ({ appendTo: n, ...e }, t) => {
2058
- const r = `message_${$l++}`, a = e.onClose, l = document.createElement("div"), o = {
2059
- ...e,
2060
- id: r,
331
+ Y.splice(d, 1);
332
+ const { handler: o } = a;
333
+ o.close();
334
+ }, Rt = ({ appendTo: a, ...d }, o) => {
335
+ const l = `message_${zt++}`, p = d.onClose, _ = document.createElement("div"), e = {
336
+ ...d,
337
+ id: l,
2061
338
  onClose: () => {
2062
- a == null || a(), Vl(c);
339
+ p == null || p(), Pt(g);
2063
340
  },
2064
341
  onDestroy: () => {
2065
- Nt(null, l);
342
+ xe(null, _);
2066
343
  }
2067
- }, i = F(Il, o, xe(o.message) || un(o.message) ? {
2068
- default: xe(o.message) ? o.message : () => o.message
344
+ }, D = c(Nt, e, ae(e.message) || qe(e.message) ? {
345
+ default: ae(e.message) ? e.message : () => e.message
2069
346
  } : null);
2070
- i.appContext = t || Ve._context, Nt(i, l), n.appendChild(l.firstElementChild);
2071
- const p = i.component, c = {
2072
- id: r,
2073
- vnode: i,
2074
- vm: p,
347
+ D.appContext = o || K._context, xe(D, _), a.appendChild(_.firstElementChild);
348
+ const N = D.component, g = {
349
+ id: l,
350
+ vnode: D,
351
+ vm: N,
2075
352
  handler: {
2076
353
  close: () => {
2077
- p.exposed.visible.value = !1;
354
+ N.exposed.visible.value = !1;
2078
355
  }
2079
356
  },
2080
- props: i.component.props
357
+ props: D.component.props
2081
358
  };
2082
- return c;
2083
- }, Ve = (n = {}, e) => {
2084
- if (!en)
359
+ return g;
360
+ }, K = (a = {}, d) => {
361
+ if (!Te)
2085
362
  return { close: () => {
2086
363
  } };
2087
- if (ae(jt.max) && de.length >= jt.max)
364
+ if (oe(Ve.max) && Y.length >= Ve.max)
2088
365
  return { close: () => {
2089
366
  } };
2090
- const t = An(n);
2091
- if (t.grouping && de.length) {
2092
- const a = de.find(({ vnode: l }) => {
2093
- var o;
2094
- return ((o = l.props) == null ? void 0 : o.message) === t.message;
367
+ const o = je(a);
368
+ if (o.grouping && Y.length) {
369
+ const p = Y.find(({ vnode: _ }) => {
370
+ var e;
371
+ return ((e = _.props) == null ? void 0 : e.message) === o.message;
2095
372
  });
2096
- if (a)
2097
- return a.props.repeatNum += 1, a.props.type = t.type, a.handler;
373
+ if (p)
374
+ return p.props.repeatNum += 1, p.props.type = o.type, p.handler;
2098
375
  }
2099
- const r = El(t, e);
2100
- return de.push(r), r.handler;
376
+ const l = Rt(o, d);
377
+ return Y.push(l), l.handler;
2101
378
  };
2102
- Mn.forEach((n) => {
2103
- Ve[n] = (e = {}, t) => {
2104
- const r = An(e);
2105
- return Ve({ ...r, type: n }, t);
379
+ Be.forEach((a) => {
380
+ K[a] = (d = {}, o) => {
381
+ const l = je(d);
382
+ return K({ ...l, type: a }, o);
2106
383
  };
2107
384
  });
2108
- function Sl(n) {
2109
- for (const e of de)
2110
- (!n || n === e.props.type) && e.handler.close();
385
+ function Bt(a) {
386
+ for (const d of Y)
387
+ (!a || a === d.props.type) && d.handler.close();
2111
388
  }
2112
- Ve.closeAll = Sl;
2113
- Ve._context = null;
2114
- const Ie = Yn(Ve, "$message");
2115
- const Ht = {
389
+ K.closeAll = Bt;
390
+ K._context = null;
391
+ const J = Je(K, "$message"), $e = {
2116
392
  // 品种市场 [选项: 前端默认]
2117
393
  varietyMarket: {
2118
394
  show: !0,
@@ -2306,7 +582,7 @@ const Ht = {
2306
582
  },
2307
583
  // 便捷选项
2308
584
  convenientOptions: [
2309
- { range: [0, 0], unit: [], text: "亏损" },
585
+ { range: [null, 0], unit: [], text: "亏损" },
2310
586
  { range: [0, null], unit: [], text: "≥0" },
2311
587
  { range: [0, 20], unit: [], text: "0~20" },
2312
588
  { range: [20, 40], unit: [], text: "20~40" },
@@ -2604,9 +880,9 @@ const Ht = {
2604
880
  ]
2605
881
  }
2606
882
  };
2607
- const jn = (n) => (ht("data-v-d76a610e"), n = n(), _t(), n), Fl = { class: "factor-screen" }, Tl = { class: "custom-header" }, Cl = ["id"], ql = { class: "form-row" }, Nl = { style: { display: "flex", "align-items": "center", width: "100%", height: "24px" } }, Ml = /* @__PURE__ */ jn(() => /* @__PURE__ */ C("span", null, "~", -1)), Al = /* @__PURE__ */ jn(() => /* @__PURE__ */ C("span", null, "&&代表and,||代表or", -1)), jl = { class: "dialog-footer" }, Pl = {
883
+ const Ye = (a) => (ve("data-v-d76a610e"), a = a(), fe(), a), jt = { class: "factor-screen" }, Yt = { class: "custom-header" }, Qt = ["id"], Gt = { class: "form-row" }, Ht = { style: { display: "flex", "align-items": "center", width: "100%", height: "24px" } }, At = /* @__PURE__ */ Ye(() => /* @__PURE__ */ b("span", null, "~", -1)), Jt = /* @__PURE__ */ Ye(() => /* @__PURE__ */ b("span", null, "&&代表and,||代表or", -1)), Kt = { class: "dialog-footer" }, Zt = {
2608
884
  __name: "index",
2609
- props: /* @__PURE__ */ yt({
885
+ props: /* @__PURE__ */ pe({
2610
886
  config: {
2611
887
  type: Object,
2612
888
  default: {
@@ -2635,12 +911,12 @@ const jn = (n) => (ht("data-v-d76a610e"), n = n(), _t(), n), Fl = { class: "fact
2635
911
  dataModifiers: {}
2636
912
  }),
2637
913
  emits: ["update:data"],
2638
- setup(n) {
2639
- const e = bt(n, "data"), t = n, r = Q(!1), a = Q(!1), l = Q(null), o = Q({
914
+ setup(a) {
915
+ const d = me(a, "data"), o = a, l = G(!1), p = G(!1), _ = G(null), e = G({
2640
916
  // 筛选因子列表
2641
917
  list: [
2642
918
  {
2643
- cycle: t.config.cycleDefault ?? null,
919
+ cycle: o.config.cycleDefault ?? null,
2644
920
  // 周期
2645
921
  factor: null,
2646
922
  // 因子
@@ -2652,127 +928,127 @@ const jn = (n) => (ht("data-v-d76a610e"), n = n(), _t(), n), Fl = { class: "fact
2652
928
  sqlEnable: 0,
2653
929
  // SQL语句
2654
930
  sqlValue: null
2655
- }), i = () => {
2656
- const { list: h, sqlEnable: d, sqlValue: g } = e.value;
2657
- o.value = {
2658
- list: JSON.parse(JSON.stringify(h)),
2659
- sqlEnable: d,
2660
- sqlValue: g
2661
- }, o.value.list.length || p(), r.value = !0;
2662
- }, p = () => {
2663
- o.value.list.push({
2664
- cycle: t.config.cycleDefault ?? null,
931
+ }), D = () => {
932
+ const { list: x, sqlEnable: v, sqlValue: f } = d.value;
933
+ e.value = {
934
+ list: JSON.parse(JSON.stringify(x)),
935
+ sqlEnable: v,
936
+ sqlValue: f
937
+ }, e.value.list.length || N(), l.value = !0;
938
+ }, N = () => {
939
+ e.value.list.push({
940
+ cycle: o.config.cycleDefault ?? null,
2665
941
  factor: null,
2666
942
  score: [null, null]
2667
943
  });
2668
- }, V = () => {
2669
- l.value.validate((h) => {
2670
- h && (o.value.sqlValue = o.value.list.reduce((d, g, y) => {
2671
- let w = `factor_id = ${g.factor} and `;
2672
- return t.config.cycleShow && (w += `freq_id = ${g.cycle} and `), (g.score[0] || g.score[0] === 0) && (g.score[1] || g.score[1] === 0) ? w += `score >= ${g.score[0]} and score <= ${g.score[1]}` : g.score[0] || g.score[0] === 0 ? w += `score >= ${g.score[0]}` : (g.score[1] || g.score[1] === 0) && (w += `score <= ${g.score[1]}`), w = `(${w})`, y !== 0 && (w = ` && ${w}`), d += w, d;
944
+ }, E = () => {
945
+ _.value.validate((x) => {
946
+ x && (e.value.sqlValue = e.value.list.reduce((v, f, $) => {
947
+ let I = `factor_id = ${f.factor} and `;
948
+ return o.config.cycleShow && (I += `freq_id = ${f.cycle} and `), (f.score[0] || f.score[0] === 0) && (f.score[1] || f.score[1] === 0) ? I += `score >= ${f.score[0]} and score <= ${f.score[1]}` : f.score[0] || f.score[0] === 0 ? I += `score >= ${f.score[0]}` : (f.score[1] || f.score[1] === 0) && (I += `score <= ${f.score[1]}`), I = `(${I})`, $ !== 0 && (I = ` && ${I}`), v += I, v;
2673
949
  }, ""));
2674
950
  });
2675
- }, c = () => {
2676
- e.value = {
951
+ }, g = () => {
952
+ d.value = {
2677
953
  list: [],
2678
954
  sqlEnable: 0,
2679
955
  sqlValue: null
2680
956
  };
2681
- }, s = (h) => {
2682
- e.value.list.splice(h, 1);
2683
- }, x = (h) => {
2684
- o.value.list.splice(h, 1);
2685
- }, _ = () => {
2686
- l.value.validate((h) => {
2687
- const { list: d, sqlEnable: g, sqlValue: y } = o.value;
2688
- if (h) {
2689
- if (g && !y)
2690
- return Ie.error("SQL语句不能为空");
2691
- e.value = {
2692
- list: JSON.parse(JSON.stringify(d)),
2693
- sqlEnable: g,
2694
- sqlValue: y
2695
- }, r.value = !1;
957
+ }, r = (x) => {
958
+ d.value.list.splice(x, 1);
959
+ }, S = (x) => {
960
+ e.value.list.splice(x, 1);
961
+ }, m = () => {
962
+ _.value.validate((x) => {
963
+ const { list: v, sqlEnable: f, sqlValue: $ } = e.value;
964
+ if (x) {
965
+ if (f && !$)
966
+ return J.error("SQL语句不能为空");
967
+ d.value = {
968
+ list: JSON.parse(JSON.stringify(v)),
969
+ sqlEnable: f,
970
+ sqlValue: $
971
+ }, l.value = !1;
2696
972
  }
2697
973
  });
2698
- }, f = (h) => {
2699
- const { cycle: d, factor: g, score: y } = h;
2700
- let w = "";
2701
- return w += ` ${t.config.cycleOptions.find(({ value: k }) => k === d).label}`, w += ` ${t.config.factorOptions.find(({ value: k }) => k === g).label}`, w += ` ${y[0] || y[0] === 0 ? `${y[0]}分` : "∞"}`, w += " ~", w += ` ${y[1] || y[1] === 0 ? `${y[1]}分` : "∞"}`, w;
2702
- }, v = (h, d, g) => {
2703
- !d[0] && d[0] !== 0 && !d[1] && d[1] !== 0 ? g(new Error("至少填写一个分数")) : g();
974
+ }, n = (x) => {
975
+ const { cycle: v, factor: f, score: $ } = x;
976
+ let I = "";
977
+ return I += ` ${o.config.cycleOptions.find(({ value: y }) => y === v).label}`, I += ` ${o.config.factorOptions.find(({ value: y }) => y === f).label}`, I += ` ${$[0] || $[0] === 0 ? `${$[0]}分` : "∞"}`, I += " ~", I += ` ${$[1] || $[1] === 0 ? `${$[1]}分` : "∞"}`, I;
978
+ }, O = (x, v, f) => {
979
+ !v[0] && v[0] !== 0 && !v[1] && v[1] !== 0 ? f(new Error("至少填写一个分数")) : f();
2704
980
  };
2705
- return (h, d) => {
2706
- const g = vl, y = vn, w = bn, k = qe, $ = fr, b = gn, O = yn, G = Mo, oe = Nn, le = Et, X = St, m = xt, E = No, A = mn, W = Xn, D = er;
2707
- return I(), q("div", Fl, [
2708
- e.value.sqlEnable && e.value.sqlValue ? (I(), U(y, {
981
+ return (x, v) => {
982
+ const f = Ct, $ = Ne, I = Re, y = se, k = st, t = ze, i = Pe, j = Ke, A = Se, W = ue, te = ce, q = Le, F = Ze, _e = Fe, le = We, Qe = Xe;
983
+ return s(), h("div", jt, [
984
+ d.value.sqlEnable && d.value.sqlValue ? (s(), C($, {
2709
985
  key: 0,
2710
986
  closable: "",
2711
987
  type: "info",
2712
- title: e.value.sqlValue,
2713
- onClose: c
988
+ title: d.value.sqlValue,
989
+ onClose: g
2714
990
  }, {
2715
- default: S(() => [
2716
- F(g, {
991
+ default: u(() => [
992
+ c(f, {
2717
993
  type: "info",
2718
994
  truncated: "",
2719
995
  style: { "max-width": "500px" }
2720
996
  }, {
2721
- default: S(() => [
2722
- P(te(e.value.sqlValue), 1)
997
+ default: u(() => [
998
+ w(R(d.value.sqlValue), 1)
2723
999
  ]),
2724
1000
  _: 1
2725
1001
  })
2726
1002
  ]),
2727
1003
  _: 1
2728
- }, 8, ["title"])) : z("", !0),
2729
- !e.value.sqlEnable && e.value.list.length ? (I(!0), q(H, { key: 1 }, se(e.value.list, (j, re) => (I(), U(y, {
1004
+ }, 8, ["title"])) : T("", !0),
1005
+ !d.value.sqlEnable && d.value.list.length ? (s(!0), h(U, { key: 1 }, B(d.value.list, (M, H) => (s(), C($, {
2730
1006
  closable: "",
2731
1007
  type: "info",
2732
- onClose: (Y) => s(re)
1008
+ onClose: (z) => r(H)
2733
1009
  }, {
2734
- default: S(() => [
2735
- P(te(f(j)), 1)
1010
+ default: u(() => [
1011
+ w(R(n(M)), 1)
2736
1012
  ]),
2737
1013
  _: 2
2738
- }, 1032, ["onClose"]))), 256)) : z("", !0),
2739
- F(w, {
1014
+ }, 1032, ["onClose"]))), 256)) : T("", !0),
1015
+ c(I, {
2740
1016
  class: "screen-btn",
2741
1017
  type: "primary",
2742
1018
  plain: "",
2743
1019
  size: "small",
2744
- icon: u(ot),
2745
- onClick: i
1020
+ icon: V(Ie),
1021
+ onClick: D
2746
1022
  }, {
2747
- default: S(() => [
2748
- P("添加因子")
1023
+ default: u(() => [
1024
+ w("添加因子")
2749
1025
  ]),
2750
1026
  _: 1
2751
1027
  }, 8, ["icon"]),
2752
- F(A, {
2753
- modelValue: r.value,
2754
- "onUpdate:modelValue": d[3] || (d[3] = (j) => r.value = j),
1028
+ c(_e, {
1029
+ modelValue: l.value,
1030
+ "onUpdate:modelValue": v[3] || (v[3] = (M) => l.value = M),
2755
1031
  width: "500",
2756
1032
  "align-center": "",
2757
1033
  "destroy-on-close": ""
2758
1034
  }, {
2759
- header: S(({ titleId: j, titleClass: re }) => [
2760
- C("div", Tl, [
2761
- C("span", {
2762
- id: j,
2763
- class: L(re)
2764
- }, " 因子筛选 ", 10, Cl),
2765
- F($, {
1035
+ header: u(({ titleId: M, titleClass: H }) => [
1036
+ b("div", Yt, [
1037
+ b("span", {
1038
+ id: M,
1039
+ class: Q(H)
1040
+ }, " 因子筛选 ", 10, Qt),
1041
+ c(k, {
2766
1042
  effect: "dark",
2767
1043
  content: "点击查看: 因子使用说明",
2768
1044
  placement: "right"
2769
1045
  }, {
2770
- default: S(() => [
2771
- F(k, {
2772
- onClick: d[0] || (d[0] = (Y) => a.value = !0)
1046
+ default: u(() => [
1047
+ c(y, {
1048
+ onClick: v[0] || (v[0] = (z) => p.value = !0)
2773
1049
  }, {
2774
- default: S(() => [
2775
- F(u(_r))
1050
+ default: u(() => [
1051
+ c(V(mt))
2776
1052
  ]),
2777
1053
  _: 1
2778
1054
  })
@@ -2781,71 +1057,71 @@ const jn = (n) => (ht("data-v-d76a610e"), n = n(), _t(), n), Fl = { class: "fact
2781
1057
  })
2782
1058
  ])
2783
1059
  ]),
2784
- footer: S(() => [
2785
- C("div", jl, [
2786
- F(w, {
1060
+ footer: u(() => [
1061
+ b("div", Kt, [
1062
+ c(I, {
2787
1063
  type: "primary",
2788
- onClick: _
1064
+ onClick: m
2789
1065
  }, {
2790
- default: S(() => [
2791
- P("确定")
1066
+ default: u(() => [
1067
+ w("确定")
2792
1068
  ]),
2793
1069
  _: 1
2794
1070
  })
2795
1071
  ])
2796
1072
  ]),
2797
- default: S(() => [
2798
- F(E, {
1073
+ default: u(() => [
1074
+ c(F, {
2799
1075
  ref_key: "dialogFormRef",
2800
- ref: l,
2801
- model: o.value
1076
+ ref: _,
1077
+ model: e.value
2802
1078
  }, {
2803
- default: S(() => [
2804
- (I(!0), q(H, null, se(o.value.list, (j, re) => (I(), q("div", ql, [
2805
- n.config.cycleShow ? (I(), U(G, {
1079
+ default: u(() => [
1080
+ (s(!0), h(U, null, B(e.value.list, (M, H) => (s(), h("div", Gt, [
1081
+ a.config.cycleShow ? (s(), C(j, {
2806
1082
  key: 0,
2807
- prop: "list." + re + ".cycle",
1083
+ prop: "list." + H + ".cycle",
2808
1084
  rules: { required: !0, message: "周期不能为空", trigger: "blur" },
2809
1085
  style: { width: "100px", "margin-right": "10px" }
2810
1086
  }, {
2811
- default: S(() => [
2812
- F(O, {
2813
- modelValue: j.cycle,
2814
- "onUpdate:modelValue": (Y) => j.cycle = Y,
1087
+ default: u(() => [
1088
+ c(i, {
1089
+ modelValue: M.cycle,
1090
+ "onUpdate:modelValue": (z) => M.cycle = z,
2815
1091
  placeholder: "选择周期",
2816
1092
  size: "small"
2817
1093
  }, {
2818
- default: S(() => [
2819
- (I(!0), q(H, null, se(n.config.cycleOptions, ({ label: Y, value: K }) => (I(), U(b, {
2820
- label: Y,
2821
- value: K,
2822
- key: K
1094
+ default: u(() => [
1095
+ (s(!0), h(U, null, B(a.config.cycleOptions, ({ label: z, value: X }) => (s(), C(t, {
1096
+ label: z,
1097
+ value: X,
1098
+ key: X
2823
1099
  }, null, 8, ["label", "value"]))), 128))
2824
1100
  ]),
2825
1101
  _: 2
2826
1102
  }, 1032, ["modelValue", "onUpdate:modelValue"])
2827
1103
  ]),
2828
1104
  _: 2
2829
- }, 1032, ["prop"])) : z("", !0),
2830
- F(G, {
2831
- prop: "list." + re + ".factor",
1105
+ }, 1032, ["prop"])) : T("", !0),
1106
+ c(j, {
1107
+ prop: "list." + H + ".factor",
2832
1108
  rules: { required: !0, message: "因子不能为空", trigger: "blur" },
2833
1109
  style: { width: "100px", "margin-right": "10px" }
2834
1110
  }, {
2835
- default: S(() => [
2836
- F(O, {
2837
- modelValue: j.factor,
2838
- "onUpdate:modelValue": (Y) => j.factor = Y,
1111
+ default: u(() => [
1112
+ c(i, {
1113
+ modelValue: M.factor,
1114
+ "onUpdate:modelValue": (z) => M.factor = z,
2839
1115
  placeholder: "选择因子",
2840
1116
  filterable: "",
2841
1117
  size: "small",
2842
1118
  "no-match-text": "无匹配数据"
2843
1119
  }, {
2844
- default: S(() => [
2845
- (I(!0), q(H, null, se(n.config.factorOptions, ({ label: Y, value: K }) => (I(), U(b, {
2846
- label: Y,
2847
- value: K,
2848
- key: K
1120
+ default: u(() => [
1121
+ (s(!0), h(U, null, B(a.config.factorOptions, ({ label: z, value: X }) => (s(), C(t, {
1122
+ label: z,
1123
+ value: X,
1124
+ key: X
2849
1125
  }, null, 8, ["label", "value"]))), 128))
2850
1126
  ]),
2851
1127
  _: 2
@@ -2853,23 +1129,23 @@ const jn = (n) => (ht("data-v-d76a610e"), n = n(), _t(), n), Fl = { class: "fact
2853
1129
  ]),
2854
1130
  _: 2
2855
1131
  }, 1032, ["prop"]),
2856
- F(G, {
2857
- prop: "list." + re + ".score",
2858
- rules: { validator: v, trigger: "blur" },
1132
+ c(j, {
1133
+ prop: "list." + H + ".score",
1134
+ rules: { validator: O, trigger: "blur" },
2859
1135
  style: { width: "200px", "margin-right": "10px" }
2860
1136
  }, {
2861
- default: S(() => [
2862
- C("div", Nl, [
2863
- F(oe, {
2864
- modelValue: j.score[0],
2865
- "onUpdate:modelValue": (Y) => j.score[0] = Y,
1137
+ default: u(() => [
1138
+ b("div", Ht, [
1139
+ c(A, {
1140
+ modelValue: M.score[0],
1141
+ "onUpdate:modelValue": (z) => M.score[0] = z,
2866
1142
  size: "small",
2867
1143
  "controls-position": "right"
2868
1144
  }, null, 8, ["modelValue", "onUpdate:modelValue"]),
2869
- Ml,
2870
- F(oe, {
2871
- modelValue: j.score[1],
2872
- "onUpdate:modelValue": (Y) => j.score[1] = Y,
1145
+ At,
1146
+ c(A, {
1147
+ modelValue: M.score[1],
1148
+ "onUpdate:modelValue": (z) => M.score[1] = z,
2873
1149
  size: "small",
2874
1150
  "controls-position": "right"
2875
1151
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
@@ -2877,108 +1153,108 @@ const jn = (n) => (ht("data-v-d76a610e"), n = n(), _t(), n), Fl = { class: "fact
2877
1153
  ]),
2878
1154
  _: 2
2879
1155
  }, 1032, ["prop", "rules"]),
2880
- F(k, {
2881
- onClick: (Y) => x(re)
1156
+ c(y, {
1157
+ onClick: (z) => S(H)
2882
1158
  }, {
2883
- default: S(() => [
2884
- F(u(wr))
1159
+ default: u(() => [
1160
+ c(V(vt))
2885
1161
  ]),
2886
1162
  _: 2
2887
1163
  }, 1032, ["onClick"])
2888
1164
  ]))), 256)),
2889
- F(w, {
1165
+ c(I, {
2890
1166
  type: "primary",
2891
1167
  plain: "",
2892
1168
  size: "small",
2893
- icon: u(ot),
2894
- onClick: p,
1169
+ icon: V(Ie),
1170
+ onClick: N,
2895
1171
  style: { "margin-bottom": "10px" }
2896
1172
  }, {
2897
- default: S(() => [
2898
- P("添加因子")
1173
+ default: u(() => [
1174
+ w("添加因子")
2899
1175
  ]),
2900
1176
  _: 1
2901
1177
  }, 8, ["icon"]),
2902
- n.config.sqlShow ? (I(), q(H, { key: 0 }, [
2903
- F(G, { label: "SQL功能: " }, {
2904
- default: S(() => [
2905
- F(X, {
2906
- modelValue: o.value.sqlEnable,
2907
- "onUpdate:modelValue": d[1] || (d[1] = (j) => o.value.sqlEnable = j)
1178
+ a.config.sqlShow ? (s(), h(U, { key: 0 }, [
1179
+ c(j, { label: "SQL功能: " }, {
1180
+ default: u(() => [
1181
+ c(te, {
1182
+ modelValue: e.value.sqlEnable,
1183
+ "onUpdate:modelValue": v[1] || (v[1] = (M) => e.value.sqlEnable = M)
2908
1184
  }, {
2909
- default: S(() => [
2910
- F(le, { label: 0 }, {
2911
- default: S(() => [
2912
- P("关闭")
1185
+ default: u(() => [
1186
+ c(W, { label: 0 }, {
1187
+ default: u(() => [
1188
+ w("关闭")
2913
1189
  ]),
2914
1190
  _: 1
2915
1191
  }),
2916
- F(le, { label: 1 }, {
2917
- default: S(() => [
2918
- P("启用")
1192
+ c(W, { label: 1 }, {
1193
+ default: u(() => [
1194
+ w("启用")
2919
1195
  ]),
2920
1196
  _: 1
2921
1197
  })
2922
1198
  ]),
2923
1199
  _: 1
2924
1200
  }, 8, ["modelValue"]),
2925
- o.value.sqlEnable ? (I(), U(w, {
1201
+ e.value.sqlEnable ? (s(), C(I, {
2926
1202
  key: 0,
2927
1203
  type: "primary",
2928
1204
  size: "small",
2929
- onClick: V,
1205
+ onClick: E,
2930
1206
  style: { "margin-left": "auto" }
2931
1207
  }, {
2932
- default: S(() => [
2933
- P("生成SQL")
1208
+ default: u(() => [
1209
+ w("生成SQL")
2934
1210
  ]),
2935
1211
  _: 1
2936
- })) : z("", !0)
1212
+ })) : T("", !0)
2937
1213
  ]),
2938
1214
  _: 1
2939
1215
  }),
2940
- o.value.sqlEnable ? (I(), q(H, { key: 0 }, [
2941
- F(m, {
2942
- modelValue: o.value.sqlValue,
2943
- "onUpdate:modelValue": d[2] || (d[2] = (j) => o.value.sqlValue = j),
1216
+ e.value.sqlEnable ? (s(), h(U, { key: 0 }, [
1217
+ c(q, {
1218
+ modelValue: e.value.sqlValue,
1219
+ "onUpdate:modelValue": v[2] || (v[2] = (M) => e.value.sqlValue = M),
2944
1220
  autosize: { minRows: 4 },
2945
1221
  type: "textarea",
2946
1222
  style: { "margin-bottom": "10px" }
2947
1223
  }, null, 8, ["modelValue"]),
2948
- Al
2949
- ], 64)) : z("", !0)
2950
- ], 64)) : z("", !0)
1224
+ Jt
1225
+ ], 64)) : T("", !0)
1226
+ ], 64)) : T("", !0)
2951
1227
  ]),
2952
1228
  _: 1
2953
1229
  }, 8, ["model"])
2954
1230
  ]),
2955
1231
  _: 1
2956
1232
  }, 8, ["modelValue"]),
2957
- F(A, {
2958
- modelValue: a.value,
2959
- "onUpdate:modelValue": d[4] || (d[4] = (j) => a.value = j),
1233
+ c(_e, {
1234
+ modelValue: p.value,
1235
+ "onUpdate:modelValue": v[4] || (v[4] = (M) => p.value = M),
2960
1236
  title: "因子使用说明",
2961
1237
  width: "1000",
2962
1238
  "align-center": "",
2963
1239
  "destroy-on-close": ""
2964
1240
  }, {
2965
- default: S(() => [
2966
- F(D, {
2967
- data: n.config.factorDescriptions,
1241
+ default: u(() => [
1242
+ c(Qe, {
1243
+ data: a.config.factorDescriptions,
2968
1244
  border: "",
2969
1245
  height: "500"
2970
1246
  }, {
2971
- default: S(() => [
2972
- F(W, {
1247
+ default: u(() => [
1248
+ c(le, {
2973
1249
  prop: "factorName",
2974
1250
  label: "因子名称",
2975
1251
  width: "200"
2976
1252
  }),
2977
- F(W, {
1253
+ c(le, {
2978
1254
  prop: "factorDesc",
2979
1255
  label: "因子说明"
2980
1256
  }),
2981
- F(W, {
1257
+ c(le, {
2982
1258
  prop: "factorScoreDefine",
2983
1259
  label: "分值定义"
2984
1260
  })
@@ -2991,19 +1267,19 @@ const jn = (n) => (ht("data-v-d76a610e"), n = n(), _t(), n), Fl = { class: "fact
2991
1267
  ]);
2992
1268
  };
2993
1269
  }
2994
- }, Rl = /* @__PURE__ */ $t(Pl, [["__scopeId", "data-v-d76a610e"]]);
2995
- const Ft = (n) => (ht("data-v-bfc7b27f"), n = n(), _t(), n), Ll = {
1270
+ }, Wt = /* @__PURE__ */ ge(Zt, [["__scopeId", "data-v-d76a610e"]]);
1271
+ const ye = (a) => (ve("data-v-5e6e795d"), a = a(), fe(), a), Xt = {
2996
1272
  key: 0,
2997
1273
  class: "common-indicator"
2998
- }, Ul = { class: "indicator" }, Dl = /* @__PURE__ */ Ft(() => /* @__PURE__ */ C("div", { class: "title" }, [
2999
- /* @__PURE__ */ C("span", null, "常用指标: "),
3000
- /* @__PURE__ */ C("span", null, "不限")
3001
- ], -1)), Bl = { class: "options" }, zl = ["onClick"], Wl = { class: "tags" }, Gl = ["onClick"], Yl = {
1274
+ }, en = { class: "indicator" }, tn = /* @__PURE__ */ ye(() => /* @__PURE__ */ b("div", { class: "title" }, [
1275
+ /* @__PURE__ */ b("span", null, "常用指标: "),
1276
+ /* @__PURE__ */ b("span", null, "不限")
1277
+ ], -1)), nn = { class: "options" }, ln = ["onClick"], on = { class: "tags" }, an = ["onClick"], sn = {
3002
1278
  key: 0,
3003
1279
  class: "convenient-option-box"
3004
- }, Kl = { class: "out-box" }, Ql = /* @__PURE__ */ Ft(() => /* @__PURE__ */ C("span", null, "自定义: ", -1)), Hl = { key: 0 }, Jl = { key: 0 }, Zl = { key: 0 }, Xl = { key: 1 }, ei = { class: "tFeaturelncomes-option-box" }, ti = { class: "tFeaturelncomes-out-box" }, ni = /* @__PURE__ */ Ft(() => /* @__PURE__ */ C("span", null, "自定义: ", -1)), ri = { key: 2 }, ai = { key: 3 }, oi = { class: "dialog-footer" }, li = {
1280
+ }, rn = { class: "out-box" }, un = /* @__PURE__ */ ye(() => /* @__PURE__ */ b("span", null, "自定义: ", -1)), cn = { key: 0 }, dn = { key: 0 }, pn = { key: 0 }, mn = { key: 1 }, vn = { class: "tFeaturelncomes-option-box" }, fn = { class: "tFeaturelncomes-out-box" }, gn = /* @__PURE__ */ ye(() => /* @__PURE__ */ b("span", null, "自定义: ", -1)), yn = { key: 2 }, _n = { key: 3 }, kn = { class: "dialog-footer" }, bn = {
3005
1281
  __name: "index",
3006
- props: /* @__PURE__ */ yt({
1282
+ props: /* @__PURE__ */ pe({
3007
1283
  config: { type: Object, default: () => {
3008
1284
  } },
3009
1285
  varietyMarket: { type: Number, default: () => null },
@@ -3015,49 +1291,49 @@ const Ft = (n) => (ht("data-v-bfc7b27f"), n = n(), _t(), n), Ll = {
3015
1291
  dataModifiers: {}
3016
1292
  }),
3017
1293
  emits: ["update:data"],
3018
- setup(n) {
3019
- const e = n, t = bt(n, "data"), r = N(() => {
3020
- let _ = [];
3021
- return e.varietyMarket === null && !e.commonOption.length ? _ = e.config.options : (_ = e.config.options, e.varietyMarket && (_ = _.filter(({ parent: f }) => f.varietyMarketIds.includes(e.varietyMarket))), e.commonOption.length && (_ = _.filter(({ parent: f }) => {
3022
- const { commonOptionIds: v } = f;
3023
- return [.../* @__PURE__ */ new Set([...v, ...e.commonOption])].length !== [...v, ...e.commonOption].length;
3024
- }))), _;
1294
+ setup(a) {
1295
+ const d = a, o = me(a, "data"), l = L(() => {
1296
+ let m = [];
1297
+ return d.varietyMarket === null && !d.commonOption.length ? m = d.config.options : (m = d.config.options, d.varietyMarket && (m = m.filter(({ parent: n }) => n.varietyMarketIds.includes(d.varietyMarket))), d.commonOption.length && (m = m.filter(({ parent: n }) => {
1298
+ const { commonOptionIds: O } = n;
1299
+ return [.../* @__PURE__ */ new Set([...O, ...d.commonOption])].length !== [...O, ...d.commonOption].length;
1300
+ }))), m;
3025
1301
  });
3026
- ve(
3027
- () => r.value,
1302
+ ne(
1303
+ () => l.value,
3028
1304
  () => {
3029
- t.value.length && (t.value = t.value.filter(({ key: _ }) => r.value.find((f) => f.key === _)));
1305
+ o.value.length && (o.value = o.value.filter(({ key: m }) => l.value.find((n) => n.key === m)));
3030
1306
  }
3031
1307
  );
3032
- const a = Q(!1), l = Q({}), o = Q({}), i = (_) => {
3033
- l.value = _;
3034
- const f = {
3035
- label: _.label,
3036
- key: _.key,
3037
- type: _.type
1308
+ const p = G(!1), _ = G({}), e = G({}), D = (m) => {
1309
+ _.value = m;
1310
+ const n = {
1311
+ label: m.label,
1312
+ key: m.key,
1313
+ type: m.type
3038
1314
  };
3039
- _.type === void 0 ? o.value = {
3040
- ...f,
1315
+ m.type === void 0 ? e.value = {
1316
+ ...n,
3041
1317
  range: [null, null],
3042
- unit: _.defaultUnit.length ? [..._.defaultUnit] : [null, null]
3043
- } : _.key === "st" ? o.value = { ...f, st: null } : _.key === "tFeaturelncomes" ? o.value = {
3044
- ...f,
1318
+ unit: m.defaultUnit.length ? [...m.defaultUnit] : [null, null]
1319
+ } : m.key === "st" ? e.value = { ...n, st: null } : m.key === "tFeaturelncomes" ? e.value = {
1320
+ ...n,
3045
1321
  rule: 1,
3046
1322
  // 1超 2跌
3047
1323
  withFewYears: null,
3048
1324
  yearsCount: null,
3049
1325
  netProfit: null
3050
- } : _.key === "priceLevels" ? o.value = { ...f, priceLevels: null } : _.key === "optionsCpType" && (o.value = {
3051
- ...f,
1326
+ } : m.key === "priceLevels" ? e.value = { ...n, priceLevels: null } : m.key === "optionsCpType" && (e.value = {
1327
+ ...n,
3052
1328
  optionsCpType: null
3053
1329
  // 1看涨 2看跌
3054
- }), a.value = !0;
3055
- }, p = (_) => {
3056
- o.value.range = [..._.range], o.value.unit = [..._.unit];
3057
- }, V = (_) => {
3058
- switch (_) {
1330
+ }), p.value = !0;
1331
+ }, N = (m) => {
1332
+ e.value.range = [...m.range], e.value.unit = [...m.unit];
1333
+ }, E = (m) => {
1334
+ switch (m) {
3059
1335
  case "≤0":
3060
- Object.assign(o.value, {
1336
+ Object.assign(e.value, {
3061
1337
  rule: 2,
3062
1338
  // 1超 2跌
3063
1339
  withFewYears: 1,
@@ -3066,7 +1342,7 @@ const Ft = (n) => (ht("data-v-bfc7b27f"), n = n(), _t(), n), Ll = {
3066
1342
  });
3067
1343
  break;
3068
1344
  case "≥0":
3069
- Object.assign(o.value, {
1345
+ Object.assign(e.value, {
3070
1346
  rule: 1,
3071
1347
  withFewYears: 1,
3072
1348
  yearsCount: 1,
@@ -3074,7 +1350,7 @@ const Ft = (n) => (ht("data-v-bfc7b27f"), n = n(), _t(), n), Ll = {
3074
1350
  });
3075
1351
  break;
3076
1352
  case "五年内有四年以上盈利超过5千万":
3077
- Object.assign(o.value, {
1353
+ Object.assign(e.value, {
3078
1354
  rule: 1,
3079
1355
  withFewYears: 5,
3080
1356
  yearsCount: 4,
@@ -3082,7 +1358,7 @@ const Ft = (n) => (ht("data-v-bfc7b27f"), n = n(), _t(), n), Ll = {
3082
1358
  });
3083
1359
  break;
3084
1360
  case "≥10亿":
3085
- Object.assign(o.value, {
1361
+ Object.assign(e.value, {
3086
1362
  rule: 1,
3087
1363
  withFewYears: 1,
3088
1364
  yearsCount: 1,
@@ -3090,7 +1366,7 @@ const Ft = (n) => (ht("data-v-bfc7b27f"), n = n(), _t(), n), Ll = {
3090
1366
  });
3091
1367
  break;
3092
1368
  case "≥20亿":
3093
- Object.assign(o.value, {
1369
+ Object.assign(e.value, {
3094
1370
  rule: 1,
3095
1371
  withFewYears: 1,
3096
1372
  yearsCount: 1,
@@ -3098,132 +1374,132 @@ const Ft = (n) => (ht("data-v-bfc7b27f"), n = n(), _t(), n), Ll = {
3098
1374
  });
3099
1375
  break;
3100
1376
  }
3101
- }, c = () => {
3102
- switch (o.value.key) {
1377
+ }, g = () => {
1378
+ switch (e.value.key) {
3103
1379
  case "st": {
3104
- const { label: f, st: v } = o.value;
3105
- if (v === null)
3106
- return Ie.warning("格式错误: 请至少选择一个值");
3107
- o.value.tagText = `${f}: ${v ? "是" : "否"}`;
1380
+ const { label: n, st: O } = e.value;
1381
+ if (O === null)
1382
+ return J.warning("格式错误: 请至少选择一个值");
1383
+ e.value.tagText = `${n}: ${O ? "是" : "否"}`;
3108
1384
  break;
3109
1385
  }
3110
1386
  case "tFeaturelncomes": {
3111
- const { label: f, rule: v, withFewYears: h, yearsCount: d, netProfit: g } = o.value;
3112
- if (["", null].includes(h) || ["", null].includes(d) || ["", null].includes(g))
3113
- return Ie.warning("格式错误: 请填写完整");
3114
- o.value.tagText = `${f}: ${h}年内${d}年以上盈利${v === 1 ? "超" : "跌"}过${g}亿`;
1387
+ const { label: n, rule: O, withFewYears: x, yearsCount: v, netProfit: f } = e.value;
1388
+ if (["", null].includes(x) || ["", null].includes(v) || ["", null].includes(f))
1389
+ return J.warning("格式错误: 请填写完整");
1390
+ e.value.tagText = `${n}: ${x}年内${v}年以上盈利${O === 1 ? "超" : "跌"}过${f}亿`;
3115
1391
  break;
3116
1392
  }
3117
1393
  case "priceLevels": {
3118
- const { label: f, priceLevels: v } = o.value;
3119
- if (!v || v.length === 0)
3120
- return Ie.warning("格式错误: 请至少选择一个值");
3121
- o.value.tagText = `${f}: 已选${v}分位`;
1394
+ const { label: n, priceLevels: O } = e.value;
1395
+ if (!O || O.length === 0)
1396
+ return J.warning("格式错误: 请至少选择一个值");
1397
+ e.value.tagText = `${n}: 已选${O}分位`;
3122
1398
  break;
3123
1399
  }
3124
1400
  case "optionsCpType": {
3125
- const { label: f, optionsCpType: v } = o.value;
3126
- if (v === null)
3127
- return Ie.warning("格式错误: 请至少选择一个值");
3128
- o.value.tagText = `${f}: ${v === 1 ? "看涨" : "看跌"}`;
1401
+ const { label: n, optionsCpType: O } = e.value;
1402
+ if (O === null)
1403
+ return J.warning("格式错误: 请至少选择一个值");
1404
+ e.value.tagText = `${n}: ${O === 1 ? "看涨" : "看跌"}`;
3129
1405
  break;
3130
1406
  }
3131
1407
  default: {
3132
- const { label: f, range: v, unit: h } = o.value;
3133
- if (["", null].includes(v[0]) && ["", null].includes(v[1]))
3134
- return Ie.warning("格式错误: 请至少填写一个值");
3135
- !["", null].includes(v[0]) && !["", null].includes(v[1]) ? o.value.tagText = `${f}: ${v[0]}${h[0] ?? ""} ~ ${v[1]}${h[1] ?? ""}` : ["", null].includes(v[0]) ? o.value.tagText = `${f}: ≤${v[1]}${h[1] ?? ""}` : o.value.tagText = `${f}: ≥${v[0]}${h[0] ?? ""}`;
1408
+ const { label: n, range: O, unit: x } = e.value;
1409
+ if (["", null].includes(O[0]) && ["", null].includes(O[1]))
1410
+ return J.warning("格式错误: 请至少填写一个值");
1411
+ !["", null].includes(O[0]) && !["", null].includes(O[1]) ? e.value.tagText = `${n}: ${O[0]}${x[0] ?? ""} ~ ${O[1]}${x[1] ?? ""}` : ["", null].includes(O[0]) ? e.value.tagText = `${n}: ≤${O[1]}${x[1] ?? ""}` : e.value.tagText = `${n}: ≥${O[0]}${x[0] ?? ""}`;
3136
1412
  }
3137
1413
  }
3138
- const _ = t.value.findIndex(({ key: f }) => f === o.value.key);
3139
- _ === -1 ? t.value.push(o.value) : t.value.splice(_, 1, o.value), a.value = !1;
3140
- }, s = (_) => {
3141
- t.value.splice(_, 1);
3142
- }, x = (_) => {
3143
- l.value = r.value.find(({ key: f }) => f === _.key), o.value = _, a.value = !0;
1414
+ const m = o.value.findIndex(({ key: n }) => n === e.value.key);
1415
+ m === -1 ? o.value.push(e.value) : o.value.splice(m, 1, e.value), p.value = !1;
1416
+ }, r = (m) => {
1417
+ o.value.splice(m, 1);
1418
+ }, S = (m) => {
1419
+ _.value = l.value.find(({ key: n }) => n === m.key), e.value = JSON.parse(JSON.stringify(m)), p.value = !0;
3144
1420
  };
3145
- return (_, f) => {
3146
- const v = vn, h = bn, d = gn, g = yn, y = xt, w = Et, k = St, $ = Nn, b = mn;
3147
- return n.config.show && r.value.length ? (I(), q("div", Ll, [
3148
- C("div", Ul, [
3149
- Dl,
3150
- C("div", Bl, [
3151
- (I(!0), q(H, null, se(r.value, (O) => (I(), q("span", {
3152
- key: O.key,
3153
- onClick: (G) => i(O)
3154
- }, te(O.label), 9, zl))), 128))
1421
+ return (m, n) => {
1422
+ const O = Ne, x = Re, v = ze, f = Pe, $ = Le, I = ue, y = ce, k = Se, t = Fe;
1423
+ return a.config.show && l.value.length ? (s(), h("div", Xt, [
1424
+ b("div", en, [
1425
+ tn,
1426
+ b("div", nn, [
1427
+ (s(!0), h(U, null, B(l.value, (i) => (s(), h("span", {
1428
+ key: i.key,
1429
+ onClick: (j) => D(i)
1430
+ }, R(i.label), 9, ln))), 128))
3155
1431
  ])
3156
1432
  ]),
3157
- C("div", Wl, [
3158
- (I(!0), q(H, null, se(t.value, (O, G) => (I(), U(v, {
1433
+ b("div", on, [
1434
+ (s(!0), h(U, null, B(o.value, (i, j) => (s(), C(O, {
3159
1435
  closable: "",
3160
1436
  type: "info",
3161
- onClose: (oe) => s(G)
1437
+ onClose: (A) => r(j)
3162
1438
  }, {
3163
- default: S(() => [
3164
- C("span", null, te(O.tagText), 1),
3165
- C("span", {
1439
+ default: u(() => [
1440
+ b("span", null, R(i.tagText), 1),
1441
+ b("span", {
3166
1442
  class: "edit",
3167
- onClick: (oe) => x(O)
3168
- }, "编辑", 8, Gl)
1443
+ onClick: (A) => S(i)
1444
+ }, "编辑", 8, an)
3169
1445
  ]),
3170
1446
  _: 2
3171
1447
  }, 1032, ["onClose"]))), 256))
3172
1448
  ]),
3173
- F(b, {
3174
- modelValue: a.value,
3175
- "onUpdate:modelValue": f[15] || (f[15] = (O) => a.value = O),
3176
- title: l.value.label,
1449
+ c(t, {
1450
+ modelValue: p.value,
1451
+ "onUpdate:modelValue": n[15] || (n[15] = (i) => p.value = i),
1452
+ title: _.value.label,
3177
1453
  width: "600",
3178
1454
  "align-center": "",
3179
1455
  "destroy-on-close": ""
3180
1456
  }, {
3181
- footer: S(() => [
3182
- C("div", oi, [
3183
- F(h, {
1457
+ footer: u(() => [
1458
+ b("div", kn, [
1459
+ c(x, {
3184
1460
  type: "primary",
3185
- onClick: c
1461
+ onClick: g
3186
1462
  }, {
3187
- default: S(() => [
3188
- P("确定")
1463
+ default: u(() => [
1464
+ w("确定")
3189
1465
  ]),
3190
1466
  _: 1
3191
1467
  })
3192
1468
  ])
3193
1469
  ]),
3194
- default: S(() => [
3195
- l.value.type === void 0 ? (I(), q(H, { key: 0 }, [
3196
- l.value.convenientOptions.length ? (I(), q("div", Yl, [
3197
- (I(!0), q(H, null, se(l.value.convenientOptions, (O) => (I(), U(h, {
3198
- key: O.text,
3199
- onClick: (G) => p(O)
1470
+ default: u(() => [
1471
+ _.value.type === void 0 ? (s(), h(U, { key: 0 }, [
1472
+ _.value.convenientOptions.length ? (s(), h("div", sn, [
1473
+ (s(!0), h(U, null, B(_.value.convenientOptions, (i) => (s(), C(x, {
1474
+ key: i.text,
1475
+ onClick: (j) => N(i)
3200
1476
  }, {
3201
- default: S(() => [
3202
- P(te(O.text), 1)
1477
+ default: u(() => [
1478
+ w(R(i.text), 1)
3203
1479
  ]),
3204
1480
  _: 2
3205
1481
  }, 1032, ["onClick"]))), 128))
3206
- ])) : z("", !0),
3207
- C("div", Kl, [
3208
- Ql,
3209
- F(y, {
3210
- modelValue: o.value.range[0],
3211
- "onUpdate:modelValue": f[1] || (f[1] = (O) => o.value.range[0] = O),
1482
+ ])) : T("", !0),
1483
+ b("div", rn, [
1484
+ un,
1485
+ c($, {
1486
+ modelValue: e.value.range[0],
1487
+ "onUpdate:modelValue": n[1] || (n[1] = (i) => e.value.range[0] = i),
3212
1488
  style: { flex: "1" }
3213
- }, Mt({ _: 2 }, [
3214
- l.value.unitOptions.length ? {
1489
+ }, he({ _: 2 }, [
1490
+ _.value.unitOptions.length ? {
3215
1491
  name: "append",
3216
- fn: S(() => [
3217
- l.value.unitOptions.length === 1 ? (I(), q("span", Hl, te(o.value.unit[0]), 1)) : (I(), U(g, {
1492
+ fn: u(() => [
1493
+ _.value.unitOptions.length === 1 ? (s(), h("span", cn, R(e.value.unit[0]), 1)) : (s(), C(f, {
3218
1494
  key: 1,
3219
- modelValue: o.value.unit[0],
3220
- "onUpdate:modelValue": f[0] || (f[0] = (O) => o.value.unit[0] = O),
1495
+ modelValue: e.value.unit[0],
1496
+ "onUpdate:modelValue": n[0] || (n[0] = (i) => e.value.unit[0] = i),
3221
1497
  style: { width: "72px" }
3222
1498
  }, {
3223
- default: S(() => [
3224
- (I(!0), q(H, null, se(l.value.unitOptions, (O) => (I(), U(d, {
3225
- label: O,
3226
- value: O
1499
+ default: u(() => [
1500
+ (s(!0), h(U, null, B(_.value.unitOptions, (i) => (s(), C(v, {
1501
+ label: i,
1502
+ value: i
3227
1503
  }, null, 8, ["label", "value"]))), 256))
3228
1504
  ]),
3229
1505
  _: 1
@@ -3232,25 +1508,25 @@ const Ft = (n) => (ht("data-v-bfc7b27f"), n = n(), _t(), n), Ll = {
3232
1508
  key: "0"
3233
1509
  } : void 0
3234
1510
  ]), 1032, ["modelValue"]),
3235
- P(" ~ "),
3236
- F(y, {
3237
- modelValue: o.value.range[1],
3238
- "onUpdate:modelValue": f[3] || (f[3] = (O) => o.value.range[1] = O),
1511
+ w(" ~ "),
1512
+ c($, {
1513
+ modelValue: e.value.range[1],
1514
+ "onUpdate:modelValue": n[3] || (n[3] = (i) => e.value.range[1] = i),
3239
1515
  style: { flex: "1" }
3240
- }, Mt({ _: 2 }, [
3241
- l.value.unitOptions.length ? {
1516
+ }, he({ _: 2 }, [
1517
+ _.value.unitOptions.length ? {
3242
1518
  name: "append",
3243
- fn: S(() => [
3244
- l.value.unitOptions.length === 1 ? (I(), q("span", Jl, te(o.value.unit[1]), 1)) : (I(), U(g, {
1519
+ fn: u(() => [
1520
+ _.value.unitOptions.length === 1 ? (s(), h("span", dn, R(e.value.unit[1]), 1)) : (s(), C(f, {
3245
1521
  key: 1,
3246
- modelValue: o.value.unit[1],
3247
- "onUpdate:modelValue": f[2] || (f[2] = (O) => o.value.unit[1] = O),
1522
+ modelValue: e.value.unit[1],
1523
+ "onUpdate:modelValue": n[2] || (n[2] = (i) => e.value.unit[1] = i),
3248
1524
  style: { width: "72px" }
3249
1525
  }, {
3250
- default: S(() => [
3251
- (I(!0), q(H, null, se(l.value.unitOptions, (O) => (I(), U(d, {
3252
- label: O,
3253
- value: O
1526
+ default: u(() => [
1527
+ (s(!0), h(U, null, B(_.value.unitOptions, (i) => (s(), C(v, {
1528
+ label: i,
1529
+ value: i
3254
1530
  }, null, 8, ["label", "value"]))), 256))
3255
1531
  ]),
3256
1532
  _: 1
@@ -3260,169 +1536,170 @@ const Ft = (n) => (ht("data-v-bfc7b27f"), n = n(), _t(), n), Ll = {
3260
1536
  } : void 0
3261
1537
  ]), 1032, ["modelValue"])
3262
1538
  ])
3263
- ], 64)) : (I(), q(H, { key: 1 }, [
3264
- l.value.key === "st" ? (I(), q("div", Zl, [
3265
- F(k, {
3266
- modelValue: o.value.st,
3267
- "onUpdate:modelValue": f[4] || (f[4] = (O) => o.value.st = O)
1539
+ ], 64)) : (s(), h(U, { key: 1 }, [
1540
+ _.value.key === "st" ? (s(), h("div", pn, [
1541
+ c(y, {
1542
+ modelValue: e.value.st,
1543
+ "onUpdate:modelValue": n[4] || (n[4] = (i) => e.value.st = i)
3268
1544
  }, {
3269
- default: S(() => [
3270
- F(w, { label: 1 }, {
3271
- default: S(() => [
3272
- P("是")
1545
+ default: u(() => [
1546
+ c(I, { label: 1 }, {
1547
+ default: u(() => [
1548
+ w("是")
3273
1549
  ]),
3274
1550
  _: 1
3275
1551
  }),
3276
- F(w, { label: 0 }, {
3277
- default: S(() => [
3278
- P("否")
1552
+ c(I, { label: 0 }, {
1553
+ default: u(() => [
1554
+ w("否")
3279
1555
  ]),
3280
1556
  _: 1
3281
1557
  })
3282
1558
  ]),
3283
1559
  _: 1
3284
1560
  }, 8, ["modelValue"])
3285
- ])) : z("", !0),
3286
- l.value.key === "tFeaturelncomes" ? (I(), q("div", Xl, [
3287
- C("div", ei, [
3288
- F(h, {
3289
- onClick: f[5] || (f[5] = (O) => V("≤0"))
1561
+ ])) : T("", !0),
1562
+ _.value.key === "tFeaturelncomes" ? (s(), h("div", mn, [
1563
+ b("div", vn, [
1564
+ c(x, {
1565
+ onClick: n[5] || (n[5] = (i) => E("≤0"))
3290
1566
  }, {
3291
- default: S(() => [
3292
- P("≤0")
1567
+ default: u(() => [
1568
+ w("≤0")
3293
1569
  ]),
3294
1570
  _: 1
3295
1571
  }),
3296
- F(h, {
3297
- onClick: f[6] || (f[6] = (O) => V("≥0"))
1572
+ c(x, {
1573
+ onClick: n[6] || (n[6] = (i) => E("≥0"))
3298
1574
  }, {
3299
- default: S(() => [
3300
- P("≥0")
1575
+ default: u(() => [
1576
+ w("≥0")
3301
1577
  ]),
3302
1578
  _: 1
3303
1579
  }),
3304
- F(h, {
3305
- onClick: f[7] || (f[7] = (O) => V("五年内有四年以上盈利超过5千万"))
1580
+ c(x, {
1581
+ onClick: n[7] || (n[7] = (i) => E("五年内有四年以上盈利超过5千万"))
3306
1582
  }, {
3307
- default: S(() => [
3308
- P("五年内有四年以上盈利超过5千万")
1583
+ default: u(() => [
1584
+ w("五年内有四年以上盈利超过5千万")
3309
1585
  ]),
3310
1586
  _: 1
3311
1587
  }),
3312
- F(h, {
3313
- onClick: f[8] || (f[8] = (O) => V("≥10亿"))
1588
+ c(x, {
1589
+ onClick: n[8] || (n[8] = (i) => E("≥10亿"))
3314
1590
  }, {
3315
- default: S(() => [
3316
- P("≥10亿")
1591
+ default: u(() => [
1592
+ w("≥10亿")
3317
1593
  ]),
3318
1594
  _: 1
3319
1595
  }),
3320
- F(h, {
3321
- onClick: f[9] || (f[9] = (O) => V("≥20亿"))
1596
+ c(x, {
1597
+ onClick: n[9] || (n[9] = (i) => E("≥20亿"))
3322
1598
  }, {
3323
- default: S(() => [
3324
- P("≥20亿")
1599
+ default: u(() => [
1600
+ w("≥20亿")
3325
1601
  ]),
3326
1602
  _: 1
3327
1603
  })
3328
1604
  ]),
3329
- C("div", ti, [
3330
- ni,
3331
- C("div", null, [
3332
- F($, {
3333
- modelValue: o.value.withFewYears,
3334
- "onUpdate:modelValue": f[10] || (f[10] = (O) => o.value.withFewYears = O),
1605
+ b("div", fn, [
1606
+ gn,
1607
+ b("div", null, [
1608
+ c(k, {
1609
+ modelValue: e.value.withFewYears,
1610
+ "onUpdate:modelValue": n[10] || (n[10] = (i) => e.value.withFewYears = i),
3335
1611
  "controls-position": "right"
3336
1612
  }, null, 8, ["modelValue"]),
3337
- P(" 年内 "),
3338
- F($, {
3339
- modelValue: o.value.yearsCount,
3340
- "onUpdate:modelValue": f[11] || (f[11] = (O) => o.value.yearsCount = O),
1613
+ w(" 年内 "),
1614
+ c(k, {
1615
+ modelValue: e.value.yearsCount,
1616
+ "onUpdate:modelValue": n[11] || (n[11] = (i) => e.value.yearsCount = i),
3341
1617
  "controls-position": "right"
3342
1618
  }, null, 8, ["modelValue"]),
3343
- P(" 年以上盈利" + te(o.value.rule === 1 ? "超" : "跌") + "过 ", 1),
3344
- F($, {
3345
- modelValue: o.value.netProfit,
3346
- "onUpdate:modelValue": f[12] || (f[12] = (O) => o.value.netProfit = O),
1619
+ w(" 年以上盈利" + R(e.value.rule === 1 ? "超" : "跌") + "过 ", 1),
1620
+ c(k, {
1621
+ modelValue: e.value.netProfit,
1622
+ "onUpdate:modelValue": n[12] || (n[12] = (i) => e.value.netProfit = i),
3347
1623
  "controls-position": "right"
3348
1624
  }, null, 8, ["modelValue"]),
3349
- P(" 亿 ")
1625
+ w(" 亿 ")
3350
1626
  ])
3351
1627
  ])
3352
- ])) : z("", !0),
3353
- l.value.key === "priceLevels" ? (I(), q("div", ri, [
3354
- F(g, {
3355
- modelValue: o.value.priceLevels,
3356
- "onUpdate:modelValue": f[13] || (f[13] = (O) => o.value.priceLevels = O),
1628
+ ])) : T("", !0),
1629
+ _.value.key === "priceLevels" ? (s(), h("div", yn, [
1630
+ c(f, {
1631
+ modelValue: e.value.priceLevels,
1632
+ "onUpdate:modelValue": n[13] || (n[13] = (i) => e.value.priceLevels = i),
3357
1633
  multiple: "",
1634
+ clearable: "",
3358
1635
  placeholder: "请选择",
3359
- style: { width: "100%" }
1636
+ style: { width: "420px" }
3360
1637
  }, {
3361
- default: S(() => [
3362
- (I(), q(H, null, se([1, 2, 3, 4, 5], (O) => F(d, {
3363
- key: O,
3364
- label: `${O}分位`,
3365
- value: O
1638
+ default: u(() => [
1639
+ (s(), h(U, null, B([1, 2, 3, 4, 5], (i) => c(v, {
1640
+ key: i,
1641
+ label: `${i}分位`,
1642
+ value: i
3366
1643
  }, null, 8, ["label", "value"])), 64))
3367
1644
  ]),
3368
1645
  _: 1
3369
1646
  }, 8, ["modelValue"])
3370
- ])) : z("", !0),
3371
- l.value.key === "optionsCpType" ? (I(), q("div", ai, [
3372
- F(k, {
3373
- modelValue: o.value.optionsCpType,
3374
- "onUpdate:modelValue": f[14] || (f[14] = (O) => o.value.optionsCpType = O)
1647
+ ])) : T("", !0),
1648
+ _.value.key === "optionsCpType" ? (s(), h("div", _n, [
1649
+ c(y, {
1650
+ modelValue: e.value.optionsCpType,
1651
+ "onUpdate:modelValue": n[14] || (n[14] = (i) => e.value.optionsCpType = i)
3375
1652
  }, {
3376
- default: S(() => [
3377
- F(w, { label: 1 }, {
3378
- default: S(() => [
3379
- P("看涨")
1653
+ default: u(() => [
1654
+ c(I, { label: 1 }, {
1655
+ default: u(() => [
1656
+ w("看涨")
3380
1657
  ]),
3381
1658
  _: 1
3382
1659
  }),
3383
- F(w, { label: 2 }, {
3384
- default: S(() => [
3385
- P("看跌")
1660
+ c(I, { label: 2 }, {
1661
+ default: u(() => [
1662
+ w("看跌")
3386
1663
  ]),
3387
1664
  _: 1
3388
1665
  })
3389
1666
  ]),
3390
1667
  _: 1
3391
1668
  }, 8, ["modelValue"])
3392
- ])) : z("", !0)
1669
+ ])) : T("", !0)
3393
1670
  ], 64))
3394
1671
  ]),
3395
1672
  _: 1
3396
1673
  }, 8, ["modelValue", "title"])
3397
- ])) : z("", !0);
1674
+ ])) : T("", !0);
3398
1675
  };
3399
1676
  }
3400
- }, ii = /* @__PURE__ */ $t(li, [["__scopeId", "data-v-bfc7b27f"]]);
3401
- const Re = (n) => (ht("data-v-c7dfa2d4"), n = n(), _t(), n), si = { class: "variety-search" }, ui = {
1677
+ }, xn = /* @__PURE__ */ ge(bn, [["__scopeId", "data-v-5e6e795d"]]);
1678
+ const ee = (a) => (ve("data-v-e077f597"), a = a(), fe(), a), hn = { class: "variety-search" }, On = {
3402
1679
  key: 0,
3403
1680
  class: "variety-search-row"
3404
- }, di = { class: "title" }, ci = /* @__PURE__ */ Re(() => /* @__PURE__ */ C("span", null, "品种市场: ", -1)), fi = {
1681
+ }, In = { class: "title" }, Vn = /* @__PURE__ */ ee(() => /* @__PURE__ */ b("span", null, "品种市场: ", -1)), $n = {
3405
1682
  key: 1,
3406
1683
  class: "variety-search-row"
3407
- }, pi = { class: "title" }, mi = /* @__PURE__ */ Re(() => /* @__PURE__ */ C("span", null, "常用选项: ", -1)), vi = {
1684
+ }, wn = { class: "title" }, Cn = /* @__PURE__ */ ee(() => /* @__PURE__ */ b("span", null, "常用选项: ", -1)), Tn = {
3408
1685
  key: 2,
3409
1686
  class: "variety-search-row"
3410
- }, gi = { class: "title" }, yi = /* @__PURE__ */ Re(() => /* @__PURE__ */ C("span", null, "上市板块: ", -1)), bi = {
1687
+ }, Sn = { class: "title" }, Mn = /* @__PURE__ */ ee(() => /* @__PURE__ */ b("span", null, "上市板块: ", -1)), En = {
3411
1688
  key: 3,
3412
1689
  class: "variety-search-row"
3413
- }, hi = { class: "title" }, _i = /* @__PURE__ */ Re(() => /* @__PURE__ */ C("span", null, "自定标签: ", -1)), wi = {
1690
+ }, Un = { class: "title" }, Dn = /* @__PURE__ */ ee(() => /* @__PURE__ */ b("span", null, "自定标签: ", -1)), qn = {
3414
1691
  key: 4,
3415
1692
  class: "variety-search-row"
3416
- }, xi = { class: "title" }, Oi = /* @__PURE__ */ Re(() => /* @__PURE__ */ C("span", null, "因子筛选: ", -1)), ki = {
1693
+ }, Fn = { class: "title" }, Ln = /* @__PURE__ */ ee(() => /* @__PURE__ */ b("span", null, "因子筛选: ", -1)), Nn = {
3417
1694
  __name: "index",
3418
- props: /* @__PURE__ */ yt({ config: { type: Object, default: {} } }, {
1695
+ props: /* @__PURE__ */ pe({ config: { type: Object, default: {} } }, {
3419
1696
  searchData: {},
3420
1697
  searchDataModifiers: {}
3421
1698
  }),
3422
1699
  emits: ["update:searchData"],
3423
- setup(n, { expose: e }) {
3424
- const t = n, r = bt(n, "searchData");
3425
- r.value = Object.assign(r.value, {
1700
+ setup(a, { expose: d }) {
1701
+ const o = a, l = me(a, "searchData");
1702
+ l.value = Object.assign(l.value, {
3426
1703
  // 品种市场
3427
1704
  varietyMarket: null,
3428
1705
  // 常用选项
@@ -3440,276 +1717,299 @@ const Re = (n) => (ht("data-v-c7dfa2d4"), n = n(), _t(), n), si = { class: "vari
3440
1717
  // 常用指标
3441
1718
  commonIndicator: []
3442
1719
  });
3443
- const a = N(() => {
3444
- const c = {};
3445
- return Object.keys(Ht).forEach((s) => {
3446
- const x = Ht[s], _ = t.config[s] ?? {}, f = { ...x, ..._ };
3447
- c[s] = f;
3448
- }), c;
3449
- }), l = N(() => a.value.varietyMarket.options), o = N(() => {
3450
- const { varietyMarket: c } = r.value;
3451
- if (c) {
3452
- const s = l.value.find(({ value: x }) => x === c).memo;
3453
- return a.value.commonOption.options.filter(({ value: x }) => s.includes(x));
1720
+ const p = L(() => {
1721
+ const g = {};
1722
+ return Object.keys($e).forEach((r) => {
1723
+ const S = $e[r], m = o.config[r] ?? {}, n = { ...S, ...m };
1724
+ g[r] = n;
1725
+ }), g;
1726
+ }), _ = L(() => p.value.varietyMarket.options), e = L(() => {
1727
+ const { varietyMarket: g } = l.value;
1728
+ if (g) {
1729
+ const r = _.value.find(({ value: S }) => S === g).memo;
1730
+ return p.value.commonOption.options.filter(({ value: S }) => r.includes(S));
3454
1731
  } else
3455
- return a.value.commonOption.options;
3456
- }), i = N(() => {
3457
- const { varietyMarket: c } = r.value;
3458
- return c ? a.value.marketIds.options.filter((s) => s.varietyMarketIds.includes(c)) : a.value.marketIds.options;
3459
- }), p = N(() => a.value.customTag.options), V = (c) => {
3460
- ["commonOption", "marketIds", "customTag", "factorScreen", "commonIndicator"].includes(c) ? r.value[c] = [] : r.value[c] = null;
1732
+ return p.value.commonOption.options;
1733
+ }), D = L(() => {
1734
+ const { varietyMarket: g } = l.value;
1735
+ return g ? p.value.marketIds.options.filter((r) => r.varietyMarketIds.includes(g)) : p.value.marketIds.options;
1736
+ }), N = L(() => p.value.customTag.options), E = (g) => {
1737
+ ["commonOption", "marketIds", "customTag", "factorScreen", "commonIndicator"].includes(g) ? l.value[g] = [] : l.value[g] = null;
3461
1738
  };
3462
- return ve(
3463
- () => o.value,
3464
- (c) => {
3465
- r.value.commonOption.length && (r.value.commonOption = r.value.commonOption.filter((s) => c.find(({ value: x }) => x === s)));
1739
+ return ne(
1740
+ () => e.value,
1741
+ (g) => {
1742
+ var r;
1743
+ (r = l.value.commonOption) != null && r.length && (l.value.commonOption = l.value.commonOption.filter((S) => g.find(({ value: m }) => m === S)));
3466
1744
  }
3467
- ), ve(
3468
- () => i.value,
3469
- (c) => {
3470
- r.value.marketIds.length && (r.value.marketIds = r.value.marketIds.filter((s) => c.find(({ value: x }) => x === s)));
1745
+ ), ne(
1746
+ () => D.value,
1747
+ (g) => {
1748
+ var r;
1749
+ (r = l.value.marketIds) != null && r.length && (l.value.marketIds = l.value.marketIds.filter((S) => g.find(({ value: m }) => m === S)));
3471
1750
  }
3472
- ), e({
1751
+ ), d({
3473
1752
  // 生成接口传参结构的数据
3474
- formatData: (c) => {
3475
- var x, _, f, v, h;
1753
+ formatData: (g) => {
1754
+ var S, m, n, O, x;
3476
1755
  console.log("%c[st-varietySearch]: 正在生成接口传参结构的数据...", "color: tomato");
3477
- const s = {};
3478
- if (c.varietyMarket && (s.exchangeId = String(c.varietyMarket)), (x = c.commonOption) != null && x.length && (s.optionId = c.commonOption.join(",")), (_ = c.marketIds) != null && _.length && (s.marketIds = c.marketIds), (f = c.customTag) != null && f.length && (s.tagIds = c.customTag), (v = a.value.factorScreen) != null && v.show) {
3479
- const { factorScreen: d } = c;
3480
- (h = d == null ? void 0 : d.list) != null && h.length && (s.tbFeatureFactorScores = d.list.map((g) => ({
3481
- freqId: g.cycle,
3482
- factorId: g.factor,
3483
- startScore: g.score[0],
3484
- endScore: g.score[1]
3485
- }))), s.enableSql = d.sqlEnable === 1 ? 2 : 1, d.sqlEnable && (s.sql = d.sqlValue);
1756
+ const r = {};
1757
+ if (g.varietyMarket && (r.exchangeId = String(g.varietyMarket)), (S = g.commonOption) != null && S.length && (r.optionId = g.commonOption.join(",")), (m = g.marketIds) != null && m.length && (r.marketIds = g.marketIds), (n = g.customTag) != null && n.length && (r.tagIds = g.customTag), (O = p.value.factorScreen) != null && O.show) {
1758
+ const { factorScreen: v } = g;
1759
+ (x = v == null ? void 0 : v.list) != null && x.length && (r.tbFeatureFactorScores = v.list.map((f) => ({
1760
+ freqId: f.cycle,
1761
+ factorId: f.factor,
1762
+ startScore: f.score[0],
1763
+ endScore: f.score[1]
1764
+ }))), r.enableSql = v.sqlEnable === 1 ? 2 : 1, v.sqlEnable && (r.sql = v.sqlValue);
3486
1765
  }
3487
1766
  {
3488
- const d = ["expireDays", "virtualRealDegree", "yearProfitRate", "impliedVolatility", "levelMultiplier", "turnover", "volume", "openInterest", "optionsCpType", "optionGear"], g = c.commonIndicator.reduce((b, O) => {
3489
- const { key: G, type: oe, range: le, unit: X } = O;
3490
- if (G === "dividendYield") {
3491
- let [m, E] = le;
3492
- ["", null].includes(m) || (m = m / 100), ["", null].includes(E) || (E = E / 100), b.push({
3493
- column: O.key,
3494
- start: m,
3495
- end: E
1767
+ const v = ["expireDays", "virtualRealDegree", "yearProfitRate", "impliedVolatility", "levelMultiplier", "turnover", "volume", "openInterest", "optionsCpType", "optionGear"], f = g.commonIndicator.reduce((t, i) => {
1768
+ const { key: j, type: A, range: W, unit: te } = i;
1769
+ if (j === "dividendYield") {
1770
+ let [q, F] = W;
1771
+ ["", null].includes(q) || (q = q / 100), ["", null].includes(F) || (F = F / 100), t.push({
1772
+ column: i.key,
1773
+ start: q,
1774
+ end: F
3496
1775
  });
3497
- } else if (oe === void 0 && !d.includes(G)) {
3498
- let [m, E] = le;
3499
- if (!["", null].includes(m))
3500
- switch (X[0]) {
1776
+ } else if (A === void 0 && !v.includes(j)) {
1777
+ let [q, F] = W;
1778
+ if (!["", null].includes(q))
1779
+ switch (te[0]) {
3501
1780
  case "亿":
3502
- m = m * 1e8;
1781
+ q = q * 1e8;
3503
1782
  break;
3504
1783
  case "千万":
3505
- m = m * 1e7;
1784
+ q = q * 1e7;
3506
1785
  break;
3507
1786
  default:
3508
- m = m;
1787
+ q = q;
3509
1788
  break;
3510
1789
  }
3511
- if (!["", null].includes(E))
3512
- switch (X[1]) {
1790
+ if (!["", null].includes(F))
1791
+ switch (te[1]) {
3513
1792
  case "亿":
3514
- E = E * 1e8;
1793
+ F = F * 1e8;
3515
1794
  break;
3516
1795
  case "千万":
3517
- E = E * 1e7;
1796
+ F = F * 1e7;
3518
1797
  break;
3519
1798
  default:
3520
- E = E;
1799
+ F = F;
3521
1800
  break;
3522
1801
  }
3523
- b.push({
3524
- column: O.key,
3525
- start: m,
3526
- end: E
1802
+ t.push({
1803
+ column: i.key,
1804
+ start: q,
1805
+ end: F
3527
1806
  });
3528
1807
  }
3529
- return b;
1808
+ return t;
3530
1809
  }, []);
3531
- g.length && (s.query = g);
3532
- const y = c.commonIndicator.find(({ key: b }) => b === "st");
3533
- y && (s.st = y.st);
3534
- const w = c.commonIndicator.find(({ key: b }) => b === "tFeaturelncomes");
3535
- w && (s.netProfitQueryDto = { ...w, netProfit: w.netProfit * 1e8 });
3536
- const k = c.commonIndicator.find(({ key: b }) => b === "priceLevels");
3537
- k && (s.priceLevels = k.priceLevels);
3538
- const $ = {};
3539
- c.commonIndicator.forEach((b) => {
3540
- const { key: O } = b;
3541
- switch (O) {
1810
+ f.length && (r.query = f);
1811
+ const $ = g.commonIndicator.find(({ key: t }) => t === "st");
1812
+ $ && (r.st = $.st);
1813
+ const I = g.commonIndicator.find(({ key: t }) => t === "tFeaturelncomes");
1814
+ I && (r.netProfitQueryDto = { ...I, netProfit: I.netProfit * 1e8 });
1815
+ const y = g.commonIndicator.find(({ key: t }) => t === "priceLevels");
1816
+ y && (r.priceLevels = y.priceLevels);
1817
+ const k = {};
1818
+ g.commonIndicator.forEach((t) => {
1819
+ const { key: i } = t;
1820
+ switch (i) {
3542
1821
  case "expireDays":
3543
- ["", null].includes(b.range[0]) || ($.minExpireDays = b.range[0]), ["", null].includes(b.range[1]) || ($.maxExpireDays = b.range[1]);
1822
+ ["", null].includes(t.range[0]) || (k.minExpireDays = t.range[0]), ["", null].includes(t.range[1]) || (k.maxExpireDays = t.range[1]);
3544
1823
  break;
3545
1824
  case "virtualRealDegree":
3546
- ["", null].includes(b.range[0]) || ($.minVirtualRealDegree = b.range[0] / 100), ["", null].includes(b.range[1]) || ($.maxVirtualRealDegree = b.range[1] / 100);
1825
+ ["", null].includes(t.range[0]) || (k.minVirtualRealDegree = t.range[0] / 100), ["", null].includes(t.range[1]) || (k.maxVirtualRealDegree = t.range[1] / 100);
3547
1826
  break;
3548
1827
  case "yearProfitRate":
3549
- ["", null].includes(b.range[0]) || ($.minYearProfitRate = b.range[0] / 100), ["", null].includes(b.range[1]) || ($.maxYearProfitRate = b.range[1] / 100);
1828
+ ["", null].includes(t.range[0]) || (k.minYearProfitRate = t.range[0] / 100), ["", null].includes(t.range[1]) || (k.maxYearProfitRate = t.range[1] / 100);
3550
1829
  break;
3551
1830
  case "impliedVolatility":
3552
- ["", null].includes(b.range[0]) || ($.minImpliedVolatility = b.range[0] / 100), ["", null].includes(b.range[1]) || ($.maxImpliedVolatility = b.range[1] / 100);
1831
+ ["", null].includes(t.range[0]) || (k.minImpliedVolatility = t.range[0] / 100), ["", null].includes(t.range[1]) || (k.maxImpliedVolatility = t.range[1] / 100);
3553
1832
  break;
3554
1833
  case "levelMultiplier":
3555
- ["", null].includes(b.range[0]) || ($.minLevelMultiplier = b.range[0]), ["", null].includes(b.range[1]) || ($.maxLevelMultiplier = b.range[1]);
1834
+ ["", null].includes(t.range[0]) || (k.minLevelMultiplier = t.range[0]), ["", null].includes(t.range[1]) || (k.maxLevelMultiplier = t.range[1]);
3556
1835
  break;
3557
1836
  case "turnover":
3558
- ["", null].includes(b.range[0]) || ($.minTurnover = b.range[0] * 1e4), ["", null].includes(b.range[1]) || ($.maxTurnover = b.range[1] * 1e4);
1837
+ ["", null].includes(t.range[0]) || (k.minTurnover = t.range[0] * 1e4), ["", null].includes(t.range[1]) || (k.maxTurnover = t.range[1] * 1e4);
3559
1838
  break;
3560
1839
  case "volume":
3561
- ["", null].includes(b.range[0]) || ($.minVolume = b.range[0]), ["", null].includes(b.range[1]) || ($.maxVolume = b.range[1]);
1840
+ ["", null].includes(t.range[0]) || (k.minVolume = t.range[0]), ["", null].includes(t.range[1]) || (k.maxVolume = t.range[1]);
3562
1841
  break;
3563
1842
  case "openInterest":
3564
- ["", null].includes(b.range[0]) || ($.minOpenInterest = b.range[0]), ["", null].includes(b.range[1]) || ($.maxOpenInterest = b.range[1]);
1843
+ ["", null].includes(t.range[0]) || (k.minOpenInterest = t.range[0]), ["", null].includes(t.range[1]) || (k.maxOpenInterest = t.range[1]);
3565
1844
  break;
3566
1845
  case "optionsCpType":
3567
- $.optionsCpType = b.optionsCpType;
1846
+ k.optionsCpType = t.optionsCpType;
3568
1847
  break;
3569
1848
  case "optionGear":
3570
- ["", null].includes(b.range[0]) || ($.minOptionGear = b.range[0]), ["", null].includes(b.range[1]) || ($.maxOptionGear = b.range[1]);
1849
+ ["", null].includes(t.range[0]) || (k.minOptionGear = t.range[0]), ["", null].includes(t.range[1]) || (k.maxOptionGear = t.range[1]);
3571
1850
  break;
3572
1851
  }
3573
- }), Object.keys($).length && (s.searchOptionDto = $);
1852
+ }), Object.keys(k).length && (r.searchOptionDto = k);
3574
1853
  }
3575
- return console.log("%c[st-varietySearch]: 接口传参数据生成完毕", "color: green", s), s;
1854
+ return console.log("%c[st-varietySearch]: 接口传参数据生成完毕", "color: green", r), r;
1855
+ },
1856
+ // 重置函数
1857
+ reset: () => {
1858
+ l.value = {
1859
+ // 品种市场
1860
+ varietyMarket: null,
1861
+ // 常用选项
1862
+ commonOption: [],
1863
+ // 上市板块
1864
+ marketIds: [],
1865
+ // 自定标签
1866
+ customTag: [],
1867
+ // 因子筛选
1868
+ factorScreen: {
1869
+ list: [],
1870
+ sqlEnable: 0,
1871
+ sqlValue: null
1872
+ },
1873
+ // 常用指标
1874
+ commonIndicator: []
1875
+ };
3576
1876
  }
3577
- }), (c, s) => {
3578
- var h, d, g, y, w;
3579
- const x = Et, _ = St, f = tr, v = nr;
3580
- return I(), q("div", si, [
3581
- (h = a.value.varietyMarket) != null && h.show ? (I(), q("div", ui, [
3582
- C("div", di, [
3583
- ci,
3584
- C("span", {
3585
- onClick: s[0] || (s[0] = (k) => V("varietyMarket"))
1877
+ }), (g, r) => {
1878
+ var x, v, f, $, I;
1879
+ const S = ue, m = ce, n = et, O = tt;
1880
+ return s(), h("div", hn, [
1881
+ (x = p.value.varietyMarket) != null && x.show ? (s(), h("div", On, [
1882
+ b("div", In, [
1883
+ Vn,
1884
+ b("span", {
1885
+ onClick: r[0] || (r[0] = (y) => E("varietyMarket"))
3586
1886
  }, "不限")
3587
1887
  ]),
3588
- F(_, {
3589
- modelValue: r.value.varietyMarket,
3590
- "onUpdate:modelValue": s[1] || (s[1] = (k) => r.value.varietyMarket = k),
1888
+ c(m, {
1889
+ modelValue: l.value.varietyMarket,
1890
+ "onUpdate:modelValue": r[1] || (r[1] = (y) => l.value.varietyMarket = y),
3591
1891
  size: "small"
3592
1892
  }, {
3593
- default: S(() => [
3594
- (I(!0), q(H, null, se(l.value, ({ label: k, value: $ }) => (I(), U(x, {
3595
- label: $,
3596
- key: $
1893
+ default: u(() => [
1894
+ (s(!0), h(U, null, B(_.value, ({ label: y, value: k }) => (s(), C(S, {
1895
+ label: k,
1896
+ key: k
3597
1897
  }, {
3598
- default: S(() => [
3599
- P(te(k), 1)
1898
+ default: u(() => [
1899
+ w(R(y), 1)
3600
1900
  ]),
3601
1901
  _: 2
3602
1902
  }, 1032, ["label"]))), 128))
3603
1903
  ]),
3604
1904
  _: 1
3605
1905
  }, 8, ["modelValue"])
3606
- ])) : z("", !0),
3607
- (d = a.value.commonOption) != null && d.show && o.value.length ? (I(), q("div", fi, [
3608
- C("div", pi, [
3609
- mi,
3610
- C("span", {
3611
- onClick: s[2] || (s[2] = (k) => V("commonOption"))
1906
+ ])) : T("", !0),
1907
+ (v = p.value.commonOption) != null && v.show && e.value.length ? (s(), h("div", $n, [
1908
+ b("div", wn, [
1909
+ Cn,
1910
+ b("span", {
1911
+ onClick: r[2] || (r[2] = (y) => E("commonOption"))
3612
1912
  }, "不限")
3613
1913
  ]),
3614
- F(v, {
3615
- modelValue: r.value.commonOption,
3616
- "onUpdate:modelValue": s[3] || (s[3] = (k) => r.value.commonOption = k),
1914
+ c(O, {
1915
+ modelValue: l.value.commonOption,
1916
+ "onUpdate:modelValue": r[3] || (r[3] = (y) => l.value.commonOption = y),
3617
1917
  size: "small"
3618
1918
  }, {
3619
- default: S(() => [
3620
- (I(!0), q(H, null, se(o.value, ({ label: k, value: $ }) => (I(), U(f, {
3621
- label: $,
3622
- key: $
1919
+ default: u(() => [
1920
+ (s(!0), h(U, null, B(e.value, ({ label: y, value: k }) => (s(), C(n, {
1921
+ label: k,
1922
+ key: k
3623
1923
  }, {
3624
- default: S(() => [
3625
- P(te(k), 1)
1924
+ default: u(() => [
1925
+ w(R(y), 1)
3626
1926
  ]),
3627
1927
  _: 2
3628
1928
  }, 1032, ["label"]))), 128))
3629
1929
  ]),
3630
1930
  _: 1
3631
1931
  }, 8, ["modelValue"])
3632
- ])) : z("", !0),
3633
- (g = a.value.marketIds) != null && g.show && i.value.length ? (I(), q("div", vi, [
3634
- C("div", gi, [
3635
- yi,
3636
- C("span", {
3637
- onClick: s[4] || (s[4] = (k) => V("marketIds"))
1932
+ ])) : T("", !0),
1933
+ (f = p.value.marketIds) != null && f.show && D.value.length ? (s(), h("div", Tn, [
1934
+ b("div", Sn, [
1935
+ Mn,
1936
+ b("span", {
1937
+ onClick: r[4] || (r[4] = (y) => E("marketIds"))
3638
1938
  }, "不限")
3639
1939
  ]),
3640
- F(v, {
3641
- modelValue: r.value.marketIds,
3642
- "onUpdate:modelValue": s[5] || (s[5] = (k) => r.value.marketIds = k),
1940
+ c(O, {
1941
+ modelValue: l.value.marketIds,
1942
+ "onUpdate:modelValue": r[5] || (r[5] = (y) => l.value.marketIds = y),
3643
1943
  size: "small"
3644
1944
  }, {
3645
- default: S(() => [
3646
- (I(!0), q(H, null, se(i.value, ({ label: k, value: $ }) => (I(), U(f, {
3647
- label: $,
3648
- key: $
1945
+ default: u(() => [
1946
+ (s(!0), h(U, null, B(D.value, ({ label: y, value: k }) => (s(), C(n, {
1947
+ label: k,
1948
+ key: k
3649
1949
  }, {
3650
- default: S(() => [
3651
- P(te(k), 1)
1950
+ default: u(() => [
1951
+ w(R(y), 1)
3652
1952
  ]),
3653
1953
  _: 2
3654
1954
  }, 1032, ["label"]))), 128))
3655
1955
  ]),
3656
1956
  _: 1
3657
1957
  }, 8, ["modelValue"])
3658
- ])) : z("", !0),
3659
- (y = a.value.customTag) != null && y.show && p.value.length ? (I(), q("div", bi, [
3660
- C("div", hi, [
3661
- _i,
3662
- C("span", {
3663
- onClick: s[6] || (s[6] = (k) => V("customTag"))
1958
+ ])) : T("", !0),
1959
+ ($ = p.value.customTag) != null && $.show && N.value.length ? (s(), h("div", En, [
1960
+ b("div", Un, [
1961
+ Dn,
1962
+ b("span", {
1963
+ onClick: r[6] || (r[6] = (y) => E("customTag"))
3664
1964
  }, "不限")
3665
1965
  ]),
3666
- F(v, {
3667
- modelValue: r.value.customTag,
3668
- "onUpdate:modelValue": s[7] || (s[7] = (k) => r.value.customTag = k),
1966
+ c(O, {
1967
+ modelValue: l.value.customTag,
1968
+ "onUpdate:modelValue": r[7] || (r[7] = (y) => l.value.customTag = y),
3669
1969
  size: "small"
3670
1970
  }, {
3671
- default: S(() => [
3672
- (I(!0), q(H, null, se(p.value, ({ label: k, value: $ }) => (I(), U(f, {
3673
- label: $,
3674
- key: $
1971
+ default: u(() => [
1972
+ (s(!0), h(U, null, B(N.value, ({ label: y, value: k }) => (s(), C(n, {
1973
+ label: k,
1974
+ key: k
3675
1975
  }, {
3676
- default: S(() => [
3677
- P(te(k), 1)
1976
+ default: u(() => [
1977
+ w(R(y), 1)
3678
1978
  ]),
3679
1979
  _: 2
3680
1980
  }, 1032, ["label"]))), 128))
3681
1981
  ]),
3682
1982
  _: 1
3683
1983
  }, 8, ["modelValue"])
3684
- ])) : z("", !0),
3685
- (w = a.value.factorScreen) != null && w.show ? (I(), q("div", wi, [
3686
- C("div", xi, [
3687
- Oi,
3688
- C("span", {
3689
- onClick: s[8] || (s[8] = (k) => V("factorScreen"))
1984
+ ])) : T("", !0),
1985
+ (I = p.value.factorScreen) != null && I.show ? (s(), h("div", qn, [
1986
+ b("div", Fn, [
1987
+ Ln,
1988
+ b("span", {
1989
+ onClick: r[8] || (r[8] = (y) => E("factorScreen"))
3690
1990
  }, "不限")
3691
1991
  ]),
3692
- F(Rl, {
3693
- data: r.value.factorScreen,
3694
- "onUpdate:data": s[9] || (s[9] = (k) => r.value.factorScreen = k),
3695
- config: a.value.factorScreen
1992
+ c(Wt, {
1993
+ data: l.value.factorScreen,
1994
+ "onUpdate:data": r[9] || (r[9] = (y) => l.value.factorScreen = y),
1995
+ config: p.value.factorScreen
3696
1996
  }, null, 8, ["data", "config"])
3697
- ])) : z("", !0),
3698
- F(ii, {
3699
- data: r.value.commonIndicator,
3700
- "onUpdate:data": s[10] || (s[10] = (k) => r.value.commonIndicator = k),
3701
- varietyMarket: r.value.varietyMarket,
3702
- commonOption: r.value.commonOption,
3703
- config: a.value.commonIndicator
1997
+ ])) : T("", !0),
1998
+ c(xn, {
1999
+ data: l.value.commonIndicator,
2000
+ "onUpdate:data": r[10] || (r[10] = (y) => l.value.commonIndicator = y),
2001
+ varietyMarket: l.value.varietyMarket,
2002
+ commonOption: l.value.commonOption,
2003
+ config: p.value.commonIndicator
3704
2004
  }, null, 8, ["data", "varietyMarket", "commonOption", "config"])
3705
2005
  ]);
3706
2006
  };
3707
2007
  }
3708
- }, Ii = /* @__PURE__ */ $t(ki, [["__scopeId", "data-v-c7dfa2d4"]]), Yi = {
3709
- install(n) {
3710
- n.component("st-varietySearch", Ii);
2008
+ }, zn = /* @__PURE__ */ ge(Nn, [["__scopeId", "data-v-e077f597"]]), cl = {
2009
+ install(a) {
2010
+ a.component("st-varietySearch", zn);
3711
2011
  }
3712
2012
  };
3713
2013
  export {
3714
- Yi as default
2014
+ cl as default
3715
2015
  };