@gopowerteam/form-render 0.0.75 → 0.0.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/es/index.mjs CHANGED
@@ -1,21 +1,21 @@
1
- import { getCurrentInstance as q, inject as ye, defineComponent as z, computed as F, openBlock as $, createElementBlock as T, normalizeClass as le, normalizeStyle as R, createElementVNode as x, shallowRef as N, ref as _, provide as he, onMounted as W, Fragment as re, renderSlot as Qe, createBlock as ne, Teleport as Ze, createVNode as d, TransitionGroup as et, withCtx as tt, renderList as rt, mergeProps as ge, createCommentVNode as U, defineAsyncComponent as nt, triggerRef as Q, useCssVars as lt, onUnmounted as at, withModifiers as ut, toDisplayString as A, resolveDynamicComponent as De, normalizeProps as ot, guardReactiveProps as ct, watch as Z, unref as it, isRef as ae, toRefs as st, customRef as dt, nextTick as Ie, getCurrentScope as ft, onScopeDispose as mt, pushScopeId as ze, popScopeId as Ee, isVNode as be, createTextVNode as D, h as Oe, onUpdated as ht } from "vue";
2
- import { DatePicker as vt, YearPicker as pt, QuarterPicker as yt, MonthPicker as gt, WeekPicker as bt, Input as kt, InputNumber as Re, Select as wt, Option as xt, Switch as Ct, RangePicker as St, Textarea as _t, TreeSelect as $t, Cascader as Ft, FormItem as ve, Divider as Ye, Button as I, Tabs as Ot, TabPane as Yt, Form as Mt, Grid as Tt, GridItem as ce, Space as Me, Tag as Lt } from "@arco-design/web-vue";
1
+ import { getCurrentInstance as q, inject as ye, defineComponent as E, computed as F, openBlock as $, createElementBlock as T, normalizeClass as le, normalizeStyle as R, createElementVNode as x, shallowRef as N, ref as _, provide as he, onMounted as W, Fragment as ne, renderSlot as tt, createBlock as re, Teleport as nt, createVNode as f, TransitionGroup as rt, withCtx as lt, renderList as at, mergeProps as ge, createCommentVNode as U, defineAsyncComponent as ut, triggerRef as Q, useCssVars as ot, onUnmounted as ct, withModifiers as it, toDisplayString as A, resolveDynamicComponent as Ee, normalizeProps as st, guardReactiveProps as dt, watch as Z, unref as ze, isRef as ae, toRefs as ft, customRef as mt, nextTick as Re, getCurrentScope as ht, onScopeDispose as vt, pushScopeId as Ae, popScopeId as Ne, isVNode as be, createTextVNode as I, h as Oe, onUpdated as pt } from "vue";
2
+ import { DatePicker as yt, YearPicker as gt, QuarterPicker as bt, MonthPicker as kt, WeekPicker as wt, Input as xt, InputNumber as Ve, Select as Ct, Option as St, Switch as _t, RangePicker as $t, Textarea as Ft, TreeSelect as Ot, Cascader as Yt, FormItem as ve, Divider as Ye, Button as D, Tabs as Mt, TabPane as Tt, Form as Pt, Grid as jt, GridItem as ce, Space as Me, Tag as Lt } from "@arco-design/web-vue";
3
3
  import S from "dayjs";
4
- import { FormRenderResolver as yn } from "./resolver.mjs";
5
- const jt = Symbol("ArcoConfigProvider"), Pt = "arco", Dt = "$arco", ke = (e) => {
6
- var n, r, t;
7
- const a = q(), u = ye(jt, void 0);
8
- return `${(t = (r = u == null ? void 0 : u.prefixCls) != null ? r : (n = a == null ? void 0 : a.appContext.config.globalProperties[Dt]) == null ? void 0 : n.classPrefix) != null ? t : Pt}-${e}`;
9
- }, It = Object.prototype.toString;
4
+ import { FormRenderResolver as xr } from "./resolver.mjs";
5
+ const It = Symbol("ArcoConfigProvider"), Dt = "arco", Et = "$arco", ke = (e) => {
6
+ var r, n, t;
7
+ const a = q(), u = ye(It, void 0);
8
+ return `${(t = (n = u == null ? void 0 : u.prefixCls) != null ? n : (r = a == null ? void 0 : a.appContext.config.globalProperties[Et]) == null ? void 0 : r.classPrefix) != null ? t : Dt}-${e}`;
9
+ }, zt = Object.prototype.toString;
10
10
  function we(e) {
11
- return It.call(e) === "[object Number]" && e === e;
11
+ return zt.call(e) === "[object Number]" && e === e;
12
12
  }
13
- var xe = (e, n) => {
14
- for (const [r, t] of n)
15
- e[r] = t;
13
+ var xe = (e, r) => {
14
+ for (const [n, t] of r)
15
+ e[n] = t;
16
16
  return e;
17
17
  };
18
- const zt = z({
18
+ const Rt = E({
19
19
  name: "IconDown",
20
20
  props: {
21
21
  size: {
@@ -42,10 +42,10 @@ const zt = z({
42
42
  click: (e) => !0
43
43
  },
44
44
  setup(e, {
45
- emit: n
45
+ emit: r
46
46
  }) {
47
- const r = ke("icon"), t = F(() => [r, `${r}-down`, {
48
- [`${r}-spin`]: e.spin
47
+ const n = ke("icon"), t = F(() => [n, `${n}-down`, {
48
+ [`${n}-spin`]: e.spin
49
49
  }]), a = F(() => {
50
50
  const l = {};
51
51
  return e.size && (l.fontSize = we(e.size) ? `${e.size}px` : e.size), e.rotate && (l.transform = `rotate(${e.rotate}deg)`), l;
@@ -54,14 +54,14 @@ const zt = z({
54
54
  cls: t,
55
55
  innerStyle: a,
56
56
  onClick: (l) => {
57
- n("click", l);
57
+ r("click", l);
58
58
  }
59
59
  };
60
60
  }
61
- }), Et = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Rt = /* @__PURE__ */ x("path", {
61
+ }), At = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Nt = /* @__PURE__ */ x("path", {
62
62
  d: "M39.6 17.443 24.043 33 8.487 17.443"
63
- }, null, -1), At = [Rt];
64
- function Nt(e, n, r, t, a, u) {
63
+ }, null, -1), Vt = [Nt];
64
+ function Bt(e, r, n, t, a, u) {
65
65
  return $(), T("svg", {
66
66
  viewBox: "0 0 48 48",
67
67
  fill: "none",
@@ -72,17 +72,17 @@ function Nt(e, n, r, t, a, u) {
72
72
  "stroke-width": e.strokeWidth,
73
73
  "stroke-linecap": e.strokeLinecap,
74
74
  "stroke-linejoin": e.strokeLinejoin,
75
- onClick: n[0] || (n[0] = (...l) => e.onClick && e.onClick(...l))
76
- }, At, 14, Et);
75
+ onClick: r[0] || (r[0] = (...l) => e.onClick && e.onClick(...l))
76
+ }, Vt, 14, At);
77
77
  }
78
- var ie = /* @__PURE__ */ xe(zt, [["render", Nt]]);
79
- const Bt = Object.assign(ie, {
80
- install: (e, n) => {
81
- var r;
82
- const t = (r = n == null ? void 0 : n.iconPrefix) != null ? r : "";
78
+ var ie = /* @__PURE__ */ xe(Rt, [["render", Bt]]);
79
+ const Ut = Object.assign(ie, {
80
+ install: (e, r) => {
81
+ var n;
82
+ const t = (n = r == null ? void 0 : r.iconPrefix) != null ? n : "";
83
83
  e.component(t + ie.name, ie);
84
84
  }
85
- }), Vt = z({
85
+ }), qt = E({
86
86
  name: "IconUp",
87
87
  props: {
88
88
  size: {
@@ -109,10 +109,10 @@ const Bt = Object.assign(ie, {
109
109
  click: (e) => !0
110
110
  },
111
111
  setup(e, {
112
- emit: n
112
+ emit: r
113
113
  }) {
114
- const r = ke("icon"), t = F(() => [r, `${r}-up`, {
115
- [`${r}-spin`]: e.spin
114
+ const n = ke("icon"), t = F(() => [n, `${n}-up`, {
115
+ [`${n}-spin`]: e.spin
116
116
  }]), a = F(() => {
117
117
  const l = {};
118
118
  return e.size && (l.fontSize = we(e.size) ? `${e.size}px` : e.size), e.rotate && (l.transform = `rotate(${e.rotate}deg)`), l;
@@ -121,14 +121,14 @@ const Bt = Object.assign(ie, {
121
121
  cls: t,
122
122
  innerStyle: a,
123
123
  onClick: (l) => {
124
- n("click", l);
124
+ r("click", l);
125
125
  }
126
126
  };
127
127
  }
128
- }), Ut = ["stroke-width", "stroke-linecap", "stroke-linejoin"], qt = /* @__PURE__ */ x("path", {
128
+ }), Wt = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Ht = /* @__PURE__ */ x("path", {
129
129
  d: "M39.6 30.557 24.043 15 8.487 30.557"
130
- }, null, -1), Wt = [qt];
131
- function Ht(e, n, r, t, a, u) {
130
+ }, null, -1), Gt = [Ht];
131
+ function Kt(e, r, n, t, a, u) {
132
132
  return $(), T("svg", {
133
133
  viewBox: "0 0 48 48",
134
134
  fill: "none",
@@ -139,17 +139,17 @@ function Ht(e, n, r, t, a, u) {
139
139
  "stroke-width": e.strokeWidth,
140
140
  "stroke-linecap": e.strokeLinecap,
141
141
  "stroke-linejoin": e.strokeLinejoin,
142
- onClick: n[0] || (n[0] = (...l) => e.onClick && e.onClick(...l))
143
- }, Wt, 14, Ut);
142
+ onClick: r[0] || (r[0] = (...l) => e.onClick && e.onClick(...l))
143
+ }, Gt, 14, Wt);
144
144
  }
145
- var se = /* @__PURE__ */ xe(Vt, [["render", Ht]]);
146
- const Gt = Object.assign(se, {
147
- install: (e, n) => {
148
- var r;
149
- const t = (r = n == null ? void 0 : n.iconPrefix) != null ? r : "";
145
+ var se = /* @__PURE__ */ xe(qt, [["render", Kt]]);
146
+ const Xt = Object.assign(se, {
147
+ install: (e, r) => {
148
+ var n;
149
+ const t = (n = r == null ? void 0 : r.iconPrefix) != null ? n : "";
150
150
  e.component(t + se.name, se);
151
151
  }
152
- }), Kt = z({
152
+ }), Jt = E({
153
153
  name: "IconSearch",
154
154
  props: {
155
155
  size: {
@@ -176,10 +176,10 @@ const Gt = Object.assign(se, {
176
176
  click: (e) => !0
177
177
  },
178
178
  setup(e, {
179
- emit: n
179
+ emit: r
180
180
  }) {
181
- const r = ke("icon"), t = F(() => [r, `${r}-search`, {
182
- [`${r}-spin`]: e.spin
181
+ const n = ke("icon"), t = F(() => [n, `${n}-search`, {
182
+ [`${n}-spin`]: e.spin
183
183
  }]), a = F(() => {
184
184
  const l = {};
185
185
  return e.size && (l.fontSize = we(e.size) ? `${e.size}px` : e.size), e.rotate && (l.transform = `rotate(${e.rotate}deg)`), l;
@@ -188,14 +188,14 @@ const Gt = Object.assign(se, {
188
188
  cls: t,
189
189
  innerStyle: a,
190
190
  onClick: (l) => {
191
- n("click", l);
191
+ r("click", l);
192
192
  }
193
193
  };
194
194
  }
195
- }), Xt = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Jt = /* @__PURE__ */ x("path", {
195
+ }), Qt = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Zt = /* @__PURE__ */ x("path", {
196
196
  d: "M33.072 33.071c6.248-6.248 6.248-16.379 0-22.627-6.249-6.249-16.38-6.249-22.628 0-6.248 6.248-6.248 16.379 0 22.627 6.248 6.248 16.38 6.248 22.628 0Zm0 0 8.485 8.485"
197
- }, null, -1), Qt = [Jt];
198
- function Zt(e, n, r, t, a, u) {
197
+ }, null, -1), en = [Zt];
198
+ function tn(e, r, n, t, a, u) {
199
199
  return $(), T("svg", {
200
200
  viewBox: "0 0 48 48",
201
201
  fill: "none",
@@ -206,42 +206,42 @@ function Zt(e, n, r, t, a, u) {
206
206
  "stroke-width": e.strokeWidth,
207
207
  "stroke-linecap": e.strokeLinecap,
208
208
  "stroke-linejoin": e.strokeLinejoin,
209
- onClick: n[0] || (n[0] = (...l) => e.onClick && e.onClick(...l))
210
- }, Qt, 14, Xt);
209
+ onClick: r[0] || (r[0] = (...l) => e.onClick && e.onClick(...l))
210
+ }, en, 14, Qt);
211
211
  }
212
- var de = /* @__PURE__ */ xe(Kt, [["render", Zt]]);
213
- const er = Object.assign(de, {
214
- install: (e, n) => {
215
- var r;
216
- const t = (r = n == null ? void 0 : n.iconPrefix) != null ? r : "";
212
+ var de = /* @__PURE__ */ xe(Jt, [["render", tn]]);
213
+ const nn = Object.assign(de, {
214
+ install: (e, r) => {
215
+ var n;
216
+ const t = (n = r == null ? void 0 : r.iconPrefix) != null ? n : "";
217
217
  e.component(t + de.name, de);
218
218
  }
219
219
  }), Ce = Symbol("__MODAL__");
220
- function Ae(e) {
221
- return ft() ? (mt(e), !0) : !1;
220
+ function Be(e) {
221
+ return ht() ? (vt(e), !0) : !1;
222
222
  }
223
223
  function M(e) {
224
- return typeof e == "function" ? e() : it(e);
224
+ return typeof e == "function" ? e() : ze(e);
225
225
  }
226
- const Ne = typeof window < "u" && typeof document < "u";
226
+ const Ue = typeof window < "u" && typeof document < "u";
227
227
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
228
- const tr = Object.prototype.toString, rr = (e) => tr.call(e) === "[object Object]", nr = () => {
228
+ const rn = Object.prototype.toString, ln = (e) => rn.call(e) === "[object Object]", an = () => {
229
229
  };
230
- function lr(e) {
230
+ function un(e) {
231
231
  return q();
232
232
  }
233
- function ar(e, n = {}) {
233
+ function on(e, r = {}) {
234
234
  if (!ae(e))
235
- return st(e);
236
- const r = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
235
+ return ft(e);
236
+ const n = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
237
237
  for (const t in e.value)
238
- r[t] = dt(() => ({
238
+ n[t] = mt(() => ({
239
239
  get() {
240
240
  return e.value[t];
241
241
  },
242
242
  set(a) {
243
243
  var u;
244
- if ((u = M(n.replaceRef)) == null || u)
244
+ if ((u = M(r.replaceRef)) == null || u)
245
245
  if (Array.isArray(e.value)) {
246
246
  const l = [...e.value];
247
247
  l[t] = a, e.value = l;
@@ -253,96 +253,96 @@ function ar(e, n = {}) {
253
253
  e.value[t] = a;
254
254
  }
255
255
  }));
256
- return r;
256
+ return n;
257
257
  }
258
- function ur(e, n = !0, r) {
259
- lr() ? W(e, r) : n ? e() : Ie(e);
258
+ function cn(e, r = !0, n) {
259
+ un() ? W(e, n) : r ? e() : Re(e);
260
260
  }
261
- function B(e) {
262
- var n;
263
- const r = M(e);
264
- return (n = r == null ? void 0 : r.$el) != null ? n : r;
261
+ function V(e) {
262
+ var r;
263
+ const n = M(e);
264
+ return (r = n == null ? void 0 : n.$el) != null ? r : n;
265
265
  }
266
- const ue = Ne ? window : void 0;
266
+ const ue = Ue ? window : void 0;
267
267
  function fe(...e) {
268
- let n, r, t, a;
269
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, t, a] = e, n = ue) : [n, r, t, a] = e, !n)
270
- return nr;
271
- Array.isArray(r) || (r = [r]), Array.isArray(t) || (t = [t]);
268
+ let r, n, t, a;
269
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, t, a] = e, r = ue) : [r, n, t, a] = e, !r)
270
+ return an;
271
+ Array.isArray(n) || (n = [n]), Array.isArray(t) || (t = [t]);
272
272
  const u = [], l = () => {
273
273
  u.forEach((o) => o()), u.length = 0;
274
- }, h = (o, i, s, f) => (o.addEventListener(i, s, f), () => o.removeEventListener(i, s, f)), v = Z(
275
- () => [B(n), M(a)],
274
+ }, h = (o, i, d, m) => (o.addEventListener(i, d, m), () => o.removeEventListener(i, d, m)), s = Z(
275
+ () => [V(r), M(a)],
276
276
  ([o, i]) => {
277
277
  if (l(), !o)
278
278
  return;
279
- const s = rr(i) ? { ...i } : i;
279
+ const d = ln(i) ? { ...i } : i;
280
280
  u.push(
281
- ...r.flatMap((f) => t.map((m) => h(o, f, m, s)))
281
+ ...n.flatMap((m) => t.map((v) => h(o, m, v, d)))
282
282
  );
283
283
  },
284
284
  { immediate: !0, flush: "post" }
285
285
  ), c = () => {
286
- v(), l();
286
+ s(), l();
287
287
  };
288
- return Ae(c), c;
288
+ return Be(c), c;
289
289
  }
290
- function or() {
291
- const e = _(!1), n = q();
292
- return n && W(() => {
290
+ function sn() {
291
+ const e = _(!1), r = q();
292
+ return r && W(() => {
293
293
  e.value = !0;
294
- }, n), e;
294
+ }, r), e;
295
295
  }
296
- function cr(e) {
297
- const n = or();
298
- return F(() => (n.value, !!e()));
296
+ function dn(e) {
297
+ const r = sn();
298
+ return F(() => (r.value, !!e()));
299
299
  }
300
- function ir(e, n = {}) {
301
- var r, t;
300
+ function fn(e, r = {}) {
301
+ var n, t;
302
302
  const {
303
303
  pointerTypes: a,
304
304
  preventDefault: u,
305
305
  stopPropagation: l,
306
306
  exact: h,
307
- onMove: v,
307
+ onMove: s,
308
308
  onEnd: c,
309
309
  onStart: o,
310
310
  initialValue: i,
311
- axis: s = "both",
312
- draggingElement: f = ue,
313
- containerElement: m,
311
+ axis: d = "both",
312
+ draggingElement: m = ue,
313
+ containerElement: v,
314
314
  handle: k = e
315
- } = n, y = _(
316
- (r = M(i)) != null ? r : { x: 0, y: 0 }
317
- ), C = _(), j = (w) => a ? a.includes(w.pointerType) : !0, L = (w) => {
315
+ } = r, y = _(
316
+ (n = M(i)) != null ? n : { x: 0, y: 0 }
317
+ ), C = _(), j = (w) => a ? a.includes(w.pointerType) : !0, P = (w) => {
318
318
  M(u) && w.preventDefault(), M(l) && w.stopPropagation();
319
- }, E = (w) => {
319
+ }, z = (w) => {
320
320
  var g;
321
- if (M(n.disabled) || !j(w) || M(h) && w.target !== M(e))
321
+ if (M(r.disabled) || !j(w) || M(h) && w.target !== M(e))
322
322
  return;
323
- const b = M(m), O = (g = b == null ? void 0 : b.getBoundingClientRect) == null ? void 0 : g.call(b), Y = M(e).getBoundingClientRect(), ee = {
323
+ const b = M(v), O = (g = b == null ? void 0 : b.getBoundingClientRect) == null ? void 0 : g.call(b), Y = M(e).getBoundingClientRect(), ee = {
324
324
  x: w.clientX - (b ? Y.left - O.left + b.scrollLeft : Y.left),
325
325
  y: w.clientY - (b ? Y.top - O.top + b.scrollTop : Y.top)
326
326
  };
327
- (o == null ? void 0 : o(ee, w)) !== !1 && (C.value = ee, L(w));
327
+ (o == null ? void 0 : o(ee, w)) !== !1 && (C.value = ee, P(w));
328
328
  }, H = (w) => {
329
- if (M(n.disabled) || !j(w) || !C.value)
329
+ if (M(r.disabled) || !j(w) || !C.value)
330
330
  return;
331
- const g = M(m), b = M(e).getBoundingClientRect();
331
+ const g = M(v), b = M(e).getBoundingClientRect();
332
332
  let { x: O, y: Y } = y.value;
333
- (s === "x" || s === "both") && (O = w.clientX - C.value.x, g && (O = Math.min(Math.max(0, O), g.scrollWidth - b.width))), (s === "y" || s === "both") && (Y = w.clientY - C.value.y, g && (Y = Math.min(Math.max(0, Y), g.scrollHeight - b.height))), y.value = {
333
+ (d === "x" || d === "both") && (O = w.clientX - C.value.x, g && (O = Math.min(Math.max(0, O), g.scrollWidth - b.width))), (d === "y" || d === "both") && (Y = w.clientY - C.value.y, g && (Y = Math.min(Math.max(0, Y), g.scrollHeight - b.height))), y.value = {
334
334
  x: O,
335
335
  y: Y
336
- }, v == null || v(y.value, w), L(w);
337
- }, V = (w) => {
338
- M(n.disabled) || !j(w) || C.value && (C.value = void 0, c == null || c(y.value, w), L(w));
336
+ }, s == null || s(y.value, w), P(w);
337
+ }, B = (w) => {
338
+ M(r.disabled) || !j(w) || C.value && (C.value = void 0, c == null || c(y.value, w), P(w));
339
339
  };
340
- if (Ne) {
341
- const w = { capture: (t = n.capture) != null ? t : !0 };
342
- fe(k, "pointerdown", E, w), fe(f, "pointermove", H, w), fe(f, "pointerup", V, w);
340
+ if (Ue) {
341
+ const w = { capture: (t = r.capture) != null ? t : !0 };
342
+ fe(k, "pointerdown", z, w), fe(m, "pointermove", H, w), fe(m, "pointerup", B, w);
343
343
  }
344
344
  return {
345
- ...ar(y),
345
+ ...on(y),
346
346
  position: y,
347
347
  isDragging: F(() => !!C.value),
348
348
  style: F(
@@ -350,63 +350,63 @@ function ir(e, n = {}) {
350
350
  )
351
351
  };
352
352
  }
353
- function sr(e, n, r = {}) {
354
- const { window: t = ue, ...a } = r;
353
+ function mn(e, r, n = {}) {
354
+ const { window: t = ue, ...a } = n;
355
355
  let u;
356
- const l = cr(() => t && "ResizeObserver" in t), h = () => {
356
+ const l = dn(() => t && "ResizeObserver" in t), h = () => {
357
357
  u && (u.disconnect(), u = void 0);
358
- }, v = F(() => Array.isArray(e) ? e.map((i) => B(i)) : [B(e)]), c = Z(
359
- v,
358
+ }, s = F(() => Array.isArray(e) ? e.map((i) => V(i)) : [V(e)]), c = Z(
359
+ s,
360
360
  (i) => {
361
361
  if (h(), l.value && t) {
362
- u = new ResizeObserver(n);
363
- for (const s of i)
364
- s && u.observe(s, a);
362
+ u = new ResizeObserver(r);
363
+ for (const d of i)
364
+ d && u.observe(d, a);
365
365
  }
366
366
  },
367
367
  { immediate: !0, flush: "post" }
368
368
  ), o = () => {
369
369
  h(), c();
370
370
  };
371
- return Ae(o), {
371
+ return Be(o), {
372
372
  isSupported: l,
373
373
  stop: o
374
374
  };
375
375
  }
376
- function G(e, n = { width: 0, height: 0 }, r = {}) {
377
- const { window: t = ue, box: a = "content-box" } = r, u = F(() => {
378
- var i, s;
379
- return (s = (i = B(e)) == null ? void 0 : i.namespaceURI) == null ? void 0 : s.includes("svg");
380
- }), l = _(n.width), h = _(n.height), { stop: v } = sr(
376
+ function G(e, r = { width: 0, height: 0 }, n = {}) {
377
+ const { window: t = ue, box: a = "content-box" } = n, u = F(() => {
378
+ var i, d;
379
+ return (d = (i = V(e)) == null ? void 0 : i.namespaceURI) == null ? void 0 : d.includes("svg");
380
+ }), l = _(r.width), h = _(r.height), { stop: s } = mn(
381
381
  e,
382
382
  ([i]) => {
383
- const s = a === "border-box" ? i.borderBoxSize : a === "content-box" ? i.contentBoxSize : i.devicePixelContentBoxSize;
383
+ const d = a === "border-box" ? i.borderBoxSize : a === "content-box" ? i.contentBoxSize : i.devicePixelContentBoxSize;
384
384
  if (t && u.value) {
385
- const f = B(e);
386
- if (f) {
387
- const m = t.getComputedStyle(f);
388
- l.value = Number.parseFloat(m.width), h.value = Number.parseFloat(m.height);
385
+ const m = V(e);
386
+ if (m) {
387
+ const v = t.getComputedStyle(m);
388
+ l.value = Number.parseFloat(v.width), h.value = Number.parseFloat(v.height);
389
389
  }
390
- } else if (s) {
391
- const f = Array.isArray(s) ? s : [s];
392
- l.value = f.reduce((m, { inlineSize: k }) => m + k, 0), h.value = f.reduce((m, { blockSize: k }) => m + k, 0);
390
+ } else if (d) {
391
+ const m = Array.isArray(d) ? d : [d];
392
+ l.value = m.reduce((v, { inlineSize: k }) => v + k, 0), h.value = m.reduce((v, { blockSize: k }) => v + k, 0);
393
393
  } else
394
394
  l.value = i.contentRect.width, h.value = i.contentRect.height;
395
395
  },
396
- r
396
+ n
397
397
  );
398
- ur(() => {
399
- const i = B(e);
400
- i && (l.value = "offsetWidth" in i ? i.offsetWidth : n.width, h.value = "offsetHeight" in i ? i.offsetHeight : n.height);
398
+ cn(() => {
399
+ const i = V(e);
400
+ i && (l.value = "offsetWidth" in i ? i.offsetWidth : r.width, h.value = "offsetHeight" in i ? i.offsetHeight : r.height);
401
401
  });
402
402
  const c = Z(
403
- () => B(e),
403
+ () => V(e),
404
404
  (i) => {
405
- l.value = i ? n.width : 0, h.value = i ? n.height : 0;
405
+ l.value = i ? r.width : 0, h.value = i ? r.height : 0;
406
406
  }
407
407
  );
408
408
  function o() {
409
- v(), c();
409
+ s(), c();
410
410
  }
411
411
  return {
412
412
  width: l,
@@ -414,21 +414,21 @@ function G(e, n = { width: 0, height: 0 }, r = {}) {
414
414
  stop: o
415
415
  };
416
416
  }
417
- const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "title text-16px font-bold" }, mr = { class: "action" }, hr = ["form"], vr = {
417
+ const hn = (e) => (Ae("data-v-9a7af353"), e = e(), Ne(), e), vn = { class: "title text-16px font-bold" }, pn = { class: "action" }, yn = ["form"], gn = {
418
418
  key: 2,
419
419
  class: "modal-loading"
420
- }, pr = /* @__PURE__ */ dr(() => /* @__PURE__ */ x("div", { class: "lds-ring" }, [
420
+ }, bn = /* @__PURE__ */ hn(() => /* @__PURE__ */ x("div", { class: "lds-ring" }, [
421
421
  /* @__PURE__ */ x("div"),
422
422
  /* @__PURE__ */ x("div"),
423
423
  /* @__PURE__ */ x("div"),
424
424
  /* @__PURE__ */ x("div")
425
- ], -1)), yr = [
426
- pr
427
- ], gr = {
425
+ ], -1)), kn = [
426
+ bn
427
+ ], wn = {
428
428
  name: "ModalContainer",
429
429
  inheritAttrs: !0
430
- }, br = /* @__PURE__ */ z({
431
- ...gr,
430
+ }, xn = /* @__PURE__ */ E({
431
+ ...wn,
432
432
  props: {
433
433
  id: {},
434
434
  form: {},
@@ -459,16 +459,16 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
459
459
  zIndex: { default: 1e3 }
460
460
  },
461
461
  emits: ["submit"],
462
- setup(e, { expose: n, emit: r }) {
463
- lt((p) => ({
462
+ setup(e, { expose: r, emit: n }) {
463
+ ot((p) => ({
464
464
  "5751bf6b": p.zIndex
465
465
  }));
466
- const t = e, a = r, u = ye(Ce), l = _(!1);
467
- let h = 0, v = 0;
468
- const c = N(), o = N(), i = N(), s = N(), f = N(), m = N(), { height: k } = G(c), { height: y } = G(i, void 0, { box: "border-box" }), { height: C } = G(s, void 0, { box: "border-box" }), { height: j } = G(f), { height: L } = G(m), { x: E, y: H } = ir(i, {
466
+ const t = e, a = n, u = ye(Ce), l = _(!1);
467
+ let h = 0, s = 0;
468
+ const c = N(), o = N(), i = N(), d = N(), m = N(), v = N(), { height: k } = G(c), { height: y } = G(i, void 0, { box: "border-box" }), { height: C } = G(d, void 0, { box: "border-box" }), { height: j } = G(m), { height: P } = G(v), { x: z, y: H } = fn(i, {
469
469
  initialValue: { x: 0, y: 0 }
470
470
  });
471
- function V() {
471
+ function B() {
472
472
  u == null || u.close(t.id);
473
473
  }
474
474
  function w(p) {
@@ -489,60 +489,60 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
489
489
  }[t.position]), p;
490
490
  }), b = F(() => {
491
491
  const p = {};
492
- return t.mode === "drawer" && ["top", "bottom"].includes(t.position) ? p.maxHeight = w(t.maxHeight) : (p.width = w(t.sizes[t.size]), p.maxWidth = w(t.maxWidth)), t.width && (p.width = w(t.width)), t.height && (p.height = w(t.height)), t.fullscreen && (p.maxWidth = "unset", p.width = "100%", p.position = "fixed", p.top = 0, p.left = 0, p.bottom = 0, p.right = 0, p.borderRadius = 0), t.draggable && !t.fullscreen && t.mode === "dialog" && (p.transform = `translate3d(${E.value - h}px, ${H.value - v}px, 0px)`), t.mode === "drawer" && (p.borderRadius = 0, ["left", "right"].includes(t.position) ? p.height = "100%" : p.width = "100%"), t.offset && t.mode === "dialog" && (p.marginLeft = `${t.offset.x || 0}px`, p.marginTop = `${t.offset.y || 0}px`), t.backgroundColor && (p.backgroundColor = t.backgroundColor), p;
492
+ return t.mode === "drawer" && ["top", "bottom"].includes(t.position) ? p.maxHeight = w(t.maxHeight) : (p.width = w(t.sizes[t.size]), p.maxWidth = w(t.maxWidth)), t.width && (p.width = w(t.width)), t.height && (p.height = w(t.height)), t.fullscreen && (p.maxWidth = "unset", p.width = "100%", p.position = "fixed", p.top = 0, p.left = 0, p.bottom = 0, p.right = 0, p.borderRadius = 0), t.draggable && !t.fullscreen && t.mode === "dialog" && (p.transform = `translate3d(${z.value - h}px, ${H.value - s}px, 0px)`), t.mode === "drawer" && (p.borderRadius = 0, ["left", "right"].includes(t.position) ? p.height = "100%" : p.width = "100%"), t.offset && t.mode === "dialog" && (p.marginLeft = `${t.offset.x || 0}px`, p.marginTop = `${t.offset.y || 0}px`), t.backgroundColor && (p.backgroundColor = t.backgroundColor), p;
493
493
  }), O = F(() => {
494
494
  const p = {};
495
495
  return t.draggable && !t.fullscreen && t.mode === "dialog" && (p.cursor = "move"), p;
496
496
  }), Y = F(() => {
497
- const p = {}, P = j.value + L.value + y.value + C.value, Fe = Math.floor(k.value * (Number(w(t.maxHeight).replace("%", "")) / 100));
498
- return t.maxHeight && (p.maxHeight = `${Fe - P}px`), t.mode === "drawer" && (p.maxHeight = "unset", ["left", "right"].includes(t.position) && (p.height = `${k.value - P}px`)), t.fullscreen && (p.maxHeight = "unset", p.height = `calc(100% - ${P}px)`), t.type !== "component" && (p.padding = "0"), t.bodyStyle && Object.assign(p, t.bodyStyle), p;
497
+ const p = {}, L = j.value + P.value + y.value + C.value, Fe = Math.floor(k.value * (Number(w(t.maxHeight).replace("%", "")) / 100));
498
+ return t.maxHeight && (p.maxHeight = `${Fe - L}px`), t.mode === "drawer" && (p.maxHeight = "unset", ["left", "right"].includes(t.position) && (p.height = `${k.value - L}px`)), t.fullscreen && (p.maxHeight = "unset", p.height = `calc(100% - ${L}px)`), t.type !== "component" && (p.padding = "0"), t.bodyStyle && Object.assign(p, t.bodyStyle), p;
499
499
  });
500
500
  function ee() {
501
501
  const p = o.value;
502
502
  if (t.form && p) {
503
- const P = p.querySelector(`form[name="${t.form}"]`);
504
- P && P.dispatchEvent(new Event("submit"));
503
+ const L = p.querySelector(`form[name="${t.form}"]`);
504
+ L && L.dispatchEvent(new Event("submit"));
505
505
  }
506
506
  a("submit");
507
507
  }
508
- function He() {
508
+ function Xe() {
509
509
  u == null || u.close(t.id);
510
510
  }
511
- function Ge() {
511
+ function Je() {
512
512
  window && window.addEventListener("resize", () => {
513
- Q(c), Q(o), o.value && (h = o.value.offsetLeft, v = o.value.offsetTop);
513
+ Q(c), Q(o), o.value && (h = o.value.offsetLeft, s = o.value.offsetTop);
514
514
  });
515
515
  }
516
- function Ke() {
516
+ function Qe() {
517
517
  if (t.closeable && t.esc) {
518
- const p = ({ key: P }) => {
519
- P === "Escape" && (u == null || u.close(t.id), window.removeEventListener("keydown", p));
518
+ const p = ({ key: L }) => {
519
+ L === "Escape" && (u == null || u.close(t.id), window.removeEventListener("keydown", p));
520
520
  };
521
521
  window.addEventListener("keydown", p);
522
522
  }
523
523
  }
524
- function Xe() {
525
- h = o.value.offsetLeft, v = o.value.offsetTop;
524
+ function Ze() {
525
+ h = o.value.offsetLeft, s = o.value.offsetTop;
526
526
  }
527
527
  W(() => {
528
- Ke(), Ge();
529
- }), at(() => {
528
+ Qe(), Je();
529
+ }), ct(() => {
530
530
  });
531
- function Je() {
531
+ function et() {
532
532
  return l.value = !0, () => $e();
533
533
  }
534
534
  function $e() {
535
535
  l.value = !1;
536
536
  }
537
- return n({
538
- showLoading: Je,
537
+ return r({
538
+ showLoading: et,
539
539
  hideLoading: $e
540
- }), (p, P) => ($(), T("div", {
540
+ }), (p, L) => ($(), T("div", {
541
541
  ref_key: "wrapperRef",
542
542
  ref: c,
543
543
  class: "modal-wrapper",
544
544
  style: R(g.value),
545
- onClick: P[0] || (P[0] = ut((Fe) => p.maskClosable && V(), ["self"]))
545
+ onClick: L[0] || (L[0] = it((Fe) => p.maskClosable && B(), ["self"]))
546
546
  }, [
547
547
  x("div", {
548
548
  ref_key: "contentRef",
@@ -556,61 +556,61 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
556
556
  ref: i,
557
557
  class: "modal-header",
558
558
  style: R(O.value),
559
- onMousedown: Xe
559
+ onMousedown: Ze
560
560
  }, [
561
- x("div", fr, A(p.title), 1),
562
- x("div", mr, [
561
+ x("div", vn, A(p.title), 1),
562
+ x("div", pn, [
563
563
  p.closeable ? ($(), T("div", {
564
564
  key: 0,
565
565
  class: "i-icon-park-outline:close block cursor-pointer",
566
- onClick: V
566
+ onClick: B
567
567
  })) : U("", !0)
568
568
  ])
569
569
  ], 36)) : U("", !0),
570
570
  x("div", {
571
571
  id: "modal-header-slot",
572
572
  ref_key: "headerSlotRef",
573
- ref: f
573
+ ref: m
574
574
  }, null, 512),
575
575
  x("div", {
576
576
  class: "modal-body",
577
577
  style: R(Y.value)
578
578
  }, [
579
- ($(), ne(De(p.component), ot(ct(p.componentProps)), null, 16))
579
+ ($(), re(Ee(p.component), st(dt(p.componentProps)), null, 16))
580
580
  ], 4),
581
581
  x("div", {
582
582
  id: "modal-footer-slot",
583
583
  ref_key: "footerSlotRef",
584
- ref: m
584
+ ref: v
585
585
  }, null, 512),
586
586
  p.footer ? ($(), T("div", {
587
587
  key: 1,
588
588
  ref_key: "footerRef",
589
- ref: s,
589
+ ref: d,
590
590
  class: "modal-footer space-x-2"
591
591
  }, [
592
592
  x("button", {
593
593
  class: "cancel-button",
594
594
  type: "button",
595
- onClick: He
595
+ onClick: Xe
596
596
  }, A(p.cancelText), 1),
597
597
  x("button", {
598
598
  class: "submit-button",
599
599
  form: p.form,
600
600
  type: "submit",
601
601
  onClick: ee
602
- }, A(p.submitText), 9, hr)
602
+ }, A(p.submitText), 9, yn)
603
603
  ], 512)) : U("", !0),
604
- l.value ? ($(), T("div", vr, yr)) : U("", !0)
604
+ l.value ? ($(), T("div", gn, kn)) : U("", !0)
605
605
  ], 6)
606
606
  ], 4));
607
607
  }
608
- }), oe = (e, n) => {
609
- const r = e.__vccOpts || e;
610
- for (const [t, a] of n)
611
- r[t] = a;
612
- return r;
613
- }, kr = /* @__PURE__ */ oe(br, [["__scopeId", "data-v-9a7af353"]]), wr = { class: "modal-dialog" }, xr = { class: "dialog-body" }, Cr = { class: "dialog-title" }, Sr = { class: "dialog-content" }, _r = /* @__PURE__ */ z({
608
+ }), oe = (e, r) => {
609
+ const n = e.__vccOpts || e;
610
+ for (const [t, a] of r)
611
+ n[t] = a;
612
+ return n;
613
+ }, Cn = /* @__PURE__ */ oe(xn, [["__scopeId", "data-v-9a7af353"]]), Sn = { class: "modal-dialog" }, _n = { class: "dialog-body" }, $n = { class: "dialog-title" }, Fn = { class: "dialog-content" }, On = /* @__PURE__ */ E({
614
614
  __name: "modal-dialog",
615
615
  props: {
616
616
  type: {},
@@ -623,29 +623,29 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
623
623
  footer: {}
624
624
  },
625
625
  setup(e) {
626
- const n = e, r = Be(), t = F(() => n.title ? n.title : {
626
+ const r = e, n = qe(), t = F(() => r.title ? r.title : {
627
627
  confirm: "提示",
628
628
  info: "提示",
629
629
  warning: "警告",
630
630
  error: "错误",
631
631
  success: "成功"
632
- }[n.type]);
632
+ }[r.type]);
633
633
  async function a() {
634
- n.onOk && await n.onOk(), r.close();
634
+ r.onOk && await r.onOk(), n.close();
635
635
  }
636
636
  async function u() {
637
- n.onCancel && await n.onCancel(), r.close();
637
+ r.onCancel && await r.onCancel(), n.close();
638
638
  }
639
- return (l, h) => ($(), T("section", wr, [
640
- x("div", xr, [
641
- x("div", Cr, A(t.value), 1),
642
- x("div", Sr, A(l.content), 1)
639
+ return (l, h) => ($(), T("section", Sn, [
640
+ x("div", _n, [
641
+ x("div", $n, A(t.value), 1),
642
+ x("div", Fn, A(l.content), 1)
643
643
  ]),
644
644
  x("div", {
645
645
  class: "dialog-footer space-x-2",
646
646
  style: R(l.type === "confirm" ? { "justify-content": "end" } : { "border-top": "none" })
647
647
  }, [
648
- l.footer ? ($(), ne(De(l.footer), { key: 0 })) : ($(), T(re, { key: 1 }, [
648
+ l.footer ? ($(), re(Ee(l.footer), { key: 0 })) : ($(), T(ne, { key: 1 }, [
649
649
  x("button", {
650
650
  class: "submit-button",
651
651
  type: "submit",
@@ -661,32 +661,32 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
661
661
  ], 4)
662
662
  ]));
663
663
  }
664
- }), $r = /* @__PURE__ */ oe(_r, [["__scopeId", "data-v-0c6b8db2"]]), Fr = (e) => (ze("data-v-559bdf2e"), e = e(), Ee(), e), Or = { class: "flex-center" }, Yr = /* @__PURE__ */ Fr(() => /* @__PURE__ */ x("div", { class: "modal-loading" }, [
664
+ }), Yn = /* @__PURE__ */ oe(On, [["__scopeId", "data-v-0c6b8db2"]]), Mn = (e) => (Ae("data-v-559bdf2e"), e = e(), Ne(), e), Tn = { class: "flex-center" }, Pn = /* @__PURE__ */ Mn(() => /* @__PURE__ */ x("div", { class: "modal-loading" }, [
665
665
  /* @__PURE__ */ x("div", { class: "lds-ring" }, [
666
666
  /* @__PURE__ */ x("div"),
667
667
  /* @__PURE__ */ x("div"),
668
668
  /* @__PURE__ */ x("div"),
669
669
  /* @__PURE__ */ x("div")
670
670
  ])
671
- ], -1)), Mr = { class: "modal-loading-text" }, Tr = /* @__PURE__ */ z({
671
+ ], -1)), jn = { class: "modal-loading-text" }, Ln = /* @__PURE__ */ E({
672
672
  __name: "modal-loading",
673
673
  props: {
674
674
  text: { default: "加载中" }
675
675
  },
676
676
  setup(e) {
677
- return (n, r) => ($(), T("section", Or, [
678
- Yr,
679
- x("div", Mr, A(n.text), 1)
677
+ return (r, n) => ($(), T("section", Tn, [
678
+ Pn,
679
+ x("div", jn, A(r.text), 1)
680
680
  ]));
681
681
  }
682
- }), Lr = /* @__PURE__ */ oe(Tr, [["__scopeId", "data-v-559bdf2e"]]), jr = {
682
+ }), In = /* @__PURE__ */ oe(Ln, [["__scopeId", "data-v-559bdf2e"]]), Dn = {
683
683
  key: 0,
684
684
  class: "modal-teleport"
685
- }, Pr = {
685
+ }, En = {
686
686
  name: "ModalProvider",
687
687
  inheritAttrs: !0
688
- }, Dr = /* @__PURE__ */ z({
689
- ...Pr,
688
+ }, zn = /* @__PURE__ */ E({
689
+ ...En,
690
690
  props: {
691
691
  appendToBody: { type: [Boolean, String], default: !1 },
692
692
  sizes: { default: () => ({
@@ -698,57 +698,57 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
698
698
  maxHeight: { default: "90%" },
699
699
  offset: { default: () => ({ x: 0, y: 0 }) }
700
700
  },
701
- setup(e, { expose: n }) {
702
- const r = N([]), t = _(!1), a = q();
703
- function u(s, f = {}, m = {}) {
704
- const k = nt(
705
- () => Promise.resolve(typeof s == "string" ? $r : s)
701
+ setup(e, { expose: r }) {
702
+ const n = N([]), t = _(!1), a = q();
703
+ function u(d, m = {}, v = {}) {
704
+ const k = ut(
705
+ () => Promise.resolve(typeof d == "string" ? Yn : d)
706
706
  );
707
- typeof s == "string" && (f.type = s, m.size = "small", m.fullscreen = !1, m.mode = "dialog", m.footer = !1, m.header = !1);
707
+ typeof d == "string" && (m.type = d, v.size = "small", v.fullscreen = !1, v.mode = "dialog", v.footer = !1, v.header = !1);
708
708
  const y = Math.random().toString(32).slice(2), C = Object.assign({
709
- zIndex: typeof s == "string" ? 1100 : 1e3
710
- }, m), j = new Promise((L, E) => {
711
- r.value.push({
709
+ zIndex: typeof d == "string" ? 1100 : 1e3
710
+ }, v), j = new Promise((P, z) => {
711
+ n.value.push({
712
712
  id: y,
713
713
  component: k,
714
- props: f || {},
714
+ props: m || {},
715
715
  options: {
716
716
  ...C,
717
- type: typeof s == "string" ? s : "component"
717
+ type: typeof d == "string" ? d : "component"
718
718
  },
719
- resolve: L,
720
- reject: E,
719
+ resolve: P,
720
+ reject: z,
721
721
  listeners: []
722
- }), Q(r);
723
- }).catch((L) => L === "CANCEL" ? new Promise(() => {
724
- }) : Promise.reject(L));
722
+ }), Q(n);
723
+ }).catch((P) => P === "CANCEL" ? new Promise(() => {
724
+ }) : Promise.reject(P));
725
725
  return Object.assign(j, {
726
726
  close: () => l(y)
727
727
  });
728
728
  }
729
- function l(s, f) {
730
- const m = r.value.findIndex((y) => y.id === s);
731
- if (m < 0)
729
+ function l(d, m) {
730
+ const v = n.value.findIndex((y) => y.id === d);
731
+ if (v < 0)
732
732
  return;
733
- const k = r.value[m];
734
- f === void 0 ? k == null || k.reject("CANCEL") : k == null || k.resolve(f), r.value.splice(m, 1), Q(r);
733
+ const k = n.value[v];
734
+ m === void 0 ? k == null || k.reject("CANCEL") : k == null || k.resolve(m), n.value.splice(v, 1), Q(n);
735
735
  }
736
736
  function h() {
737
- !r.value || r.value.length === 0 || (r.value.forEach((s) => {
738
- s == null || s.reject("CANCEL");
739
- }), r.value = [], Q(r));
737
+ !n.value || n.value.length === 0 || (n.value.forEach((d) => {
738
+ d == null || d.reject("CANCEL");
739
+ }), n.value = [], Q(n));
740
740
  }
741
- function v(s, f) {
742
- const m = r.value.find((y) => y.id === s);
743
- if (!m)
741
+ function s(d, m) {
742
+ const v = n.value.find((y) => y.id === d);
743
+ if (!v)
744
744
  return;
745
- const k = m.listeners.find((y) => y.event === f);
745
+ const k = v.listeners.find((y) => y.event === m);
746
746
  k && k.callback({
747
747
  open: u,
748
- close: (y) => l(m.id, y),
748
+ close: (y) => l(v.id, y),
749
749
  closeAll: h,
750
- showLoading: () => c(m.id),
751
- hideLoading: () => o(m.id),
750
+ showLoading: () => c(v.id),
751
+ hideLoading: () => o(v.id),
752
752
  confirm: (y) => u("confirm", y),
753
753
  success: (y) => u("success", y),
754
754
  error: (y) => u("error", y),
@@ -756,41 +756,41 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
756
756
  info: (y) => u("info", y)
757
757
  });
758
758
  }
759
- function c(s, f) {
759
+ function c(d, m) {
760
760
  if (!a)
761
761
  return;
762
- const [m] = a.refs[`modal-container_${s}`] || [];
763
- if (m)
764
- return m.showLoading();
762
+ const [v] = a.refs[`modal-container_${d}`] || [];
763
+ if (v)
764
+ return v.showLoading();
765
765
  {
766
- const { close: k } = u(Lr, {
767
- text: f == null ? void 0 : f.text
766
+ const { close: k } = u(In, {
767
+ text: m == null ? void 0 : m.text
768
768
  }, {
769
769
  footer: !1,
770
770
  header: !1,
771
771
  closeable: !1,
772
772
  backgroundColor: "transparent"
773
773
  });
774
- return f != null && f.duration && setTimeout(
774
+ return m != null && m.duration && setTimeout(
775
775
  () => {
776
776
  k();
777
777
  },
778
- f == null ? void 0 : f.duration
778
+ m == null ? void 0 : m.duration
779
779
  ), k;
780
780
  }
781
781
  }
782
- function o(s) {
782
+ function o(d) {
783
783
  if (!a)
784
784
  return;
785
- const [f] = a.refs[`modal-container_${s}`];
786
- if (f)
787
- return f.hideLoading();
785
+ const [m] = a.refs[`modal-container_${d}`];
786
+ if (m)
787
+ return m.hideLoading();
788
788
  }
789
- function i(s, f, m) {
790
- const k = r.value.find((y) => y.id === s);
789
+ function i(d, m, v) {
790
+ const k = n.value.find((y) => y.id === d);
791
791
  k && k.listeners.push({
792
- event: f,
793
- callback: m
792
+ event: m,
793
+ callback: v
794
794
  });
795
795
  }
796
796
  return he(Ce, {
@@ -800,35 +800,35 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
800
800
  addEventListener: i,
801
801
  showLoading: c,
802
802
  hideLoading: o
803
- }), n({
804
- elements: r,
803
+ }), r({
804
+ elements: n,
805
805
  open: u,
806
806
  close: l,
807
807
  closeAll: h
808
808
  }), W(() => {
809
809
  t.value = !0;
810
- }), (s, f) => ($(), T(re, null, [
811
- Qe(s.$slots, "default", {}, void 0, !0),
812
- t.value ? ($(), T("div", jr, [
813
- ($(), ne(Ze, {
814
- disabled: !s.appendToBody,
815
- to: typeof s.appendToBody == "string" ? s.appendToBody : "body"
810
+ }), (d, m) => ($(), T(ne, null, [
811
+ tt(d.$slots, "default", {}, void 0, !0),
812
+ t.value ? ($(), T("div", Dn, [
813
+ ($(), re(nt, {
814
+ disabled: !d.appendToBody,
815
+ to: typeof d.appendToBody == "string" ? d.appendToBody : "body"
816
816
  }, [
817
- d(et, { name: "modal-fade" }, {
818
- default: tt(() => [
819
- ($(!0), T(re, null, rt(r.value, (m) => ($(), ne(kr, ge({
820
- id: m.id,
821
- key: m.id,
817
+ f(rt, { name: "modal-fade" }, {
818
+ default: lt(() => [
819
+ ($(!0), T(ne, null, at(n.value, (v) => ($(), re(Cn, ge({
820
+ id: v.id,
821
+ key: v.id,
822
822
  ref_for: !0,
823
- ref: `modal-container_${m.id}`,
824
- component: m.component,
825
- "component-props": m.props,
826
- "max-height": s.maxHeight,
827
- "max-width": s.maxWidth,
828
- offset: s.offset,
829
- sizes: s.sizes
830
- }, m.options, {
831
- onSubmit: () => v(m.id, "submit")
823
+ ref: `modal-container_${v.id}`,
824
+ component: v.component,
825
+ "component-props": v.props,
826
+ "max-height": d.maxHeight,
827
+ "max-width": d.maxWidth,
828
+ offset: d.offset,
829
+ sizes: d.sizes
830
+ }, v.options, {
831
+ onSubmit: () => s(v.id, "submit")
832
832
  }), null, 16, ["id", "component", "component-props", "max-height", "max-width", "offset", "sizes", "onSubmit"]))), 128))
833
833
  ]),
834
834
  _: 1
@@ -837,28 +837,28 @@ const dr = (e) => (ze("data-v-9a7af353"), e = e(), Ee(), e), fr = { class: "titl
837
837
  ])) : U("", !0)
838
838
  ], 64));
839
839
  }
840
- }), Ir = /* @__PURE__ */ oe(Dr, [["__scopeId", "data-v-60414811"]]);
841
- function me(e, n) {
842
- var r, t;
840
+ }), Rn = /* @__PURE__ */ oe(zn, [["__scopeId", "data-v-60414811"]]);
841
+ function me(e, r) {
842
+ var n, t;
843
843
  let a = e == null ? void 0 : e.parent;
844
- for (; a && ((r = a == null ? void 0 : a.type) == null ? void 0 : r.name) !== n; )
844
+ for (; a && ((n = a == null ? void 0 : a.type) == null ? void 0 : n.name) !== r; )
845
845
  a = a.parent;
846
- return ((t = a == null ? void 0 : a.type) == null ? void 0 : t.name) === n ? a : null;
846
+ return ((t = a == null ? void 0 : a.type) == null ? void 0 : t.name) === r ? a : null;
847
847
  }
848
- function Be() {
849
- const e = ye(Ce), n = q();
850
- function r(t, a, u) {
848
+ function qe() {
849
+ const e = ye(Ce), r = q();
850
+ function n(t, a, u) {
851
851
  if (!e)
852
852
  throw new Error("Not Found Modal Provider Component");
853
853
  return e.open(t, a, u);
854
854
  }
855
855
  return {
856
- open: r,
856
+ open: n,
857
857
  close(t) {
858
858
  var a;
859
859
  if (!e)
860
860
  throw new Error("Not Found Modal Provider Component");
861
- const u = me(n, "ModalContainer"), l = (a = u == null ? void 0 : u.props) == null ? void 0 : a.id;
861
+ const u = me(r, "ModalContainer"), l = (a = u == null ? void 0 : u.props) == null ? void 0 : a.id;
862
862
  if (!l)
863
863
  throw new Error("Not Found Current Modal Container");
864
864
  e.close(l, t);
@@ -872,14 +872,14 @@ function Be() {
872
872
  var a;
873
873
  if (!e)
874
874
  throw new Error("Not Found Modal Provider Component");
875
- const u = me(n, "ModalContainer"), l = (a = u == null ? void 0 : u.props) == null ? void 0 : a.id;
875
+ const u = me(r, "ModalContainer"), l = (a = u == null ? void 0 : u.props) == null ? void 0 : a.id;
876
876
  return e.showLoading(l, t);
877
877
  },
878
878
  hideLoading() {
879
879
  var t;
880
880
  if (!e)
881
881
  throw new Error("Not Found Modal Provider Component");
882
- const a = me(n, "ModalContainer"), u = (t = a == null ? void 0 : a.props) == null ? void 0 : t.id;
882
+ const a = me(r, "ModalContainer"), u = (t = a == null ? void 0 : a.props) == null ? void 0 : t.id;
883
883
  return e.hideLoading(u);
884
884
  },
885
885
  confirm(t) {
@@ -903,30 +903,30 @@ const Te = {
903
903
  id: Symbol("ID"),
904
904
  source: Symbol("Source")
905
905
  };
906
- function zr(e, n) {
907
- const r = _({});
906
+ function An(e, r) {
907
+ const n = _({});
908
908
  return e == null || e.forEach((a) => {
909
909
  let u = null;
910
- a.default && (u = (typeof a.default == "function" ? a.default() : a.default) || null), n && n[a.key] !== void 0 && (u = n[a.key]), r.value[a.key] = u;
911
- }), [r, (a) => {
912
- r.value = a;
910
+ a.default && (u = (typeof a.default == "function" ? a.default() : a.default) || null), r && r[a.key] !== void 0 && (u = r[a.key]), n.value[a.key] = u;
911
+ }), [n, (a) => {
912
+ n.value = a;
913
913
  }];
914
914
  }
915
915
  var Se = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
916
- function Ve(e) {
916
+ function We(e) {
917
917
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
918
918
  }
919
- var Er = { exports: {} };
920
- (function(e, n) {
921
- (function(r, t) {
919
+ var Nn = { exports: {} };
920
+ (function(e, r) {
921
+ (function(n, t) {
922
922
  e.exports = t(S);
923
- })(Se, function(r) {
923
+ })(Se, function(n) {
924
924
  function t(l) {
925
925
  return l && typeof l == "object" && "default" in l ? l : {
926
926
  default: l
927
927
  };
928
928
  }
929
- var a = t(r), u = {
929
+ var a = t(n), u = {
930
930
  name: "zh-cn",
931
931
  weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
932
932
  weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"),
@@ -966,46 +966,46 @@ var Er = { exports: {} };
966
966
  yy: "%d 年"
967
967
  },
968
968
  meridiem: function(l, h) {
969
- var v = 100 * l + h;
970
- return v < 600 ? "凌晨" : v < 900 ? "早上" : v < 1100 ? "上午" : v < 1300 ? "中午" : v < 1800 ? "下午" : "晚上";
969
+ var s = 100 * l + h;
970
+ return s < 600 ? "凌晨" : s < 900 ? "早上" : s < 1100 ? "上午" : s < 1300 ? "中午" : s < 1800 ? "下午" : "晚上";
971
971
  }
972
972
  };
973
973
  return a.default.locale(u, null, !0), u;
974
974
  });
975
- })(Er);
976
- var Ue = { exports: {} };
977
- (function(e, n) {
978
- (function(r, t) {
975
+ })(Nn);
976
+ var He = { exports: {} };
977
+ (function(e, r) {
978
+ (function(n, t) {
979
979
  e.exports = t();
980
980
  })(Se, function() {
981
- var r = "week", t = "year";
981
+ var n = "week", t = "year";
982
982
  return function(a, u, l) {
983
983
  var h = u.prototype;
984
- h.week = function(v) {
985
- if (v === void 0 && (v = null), v !== null)
986
- return this.add(7 * (v - this.week()), "day");
984
+ h.week = function(s) {
985
+ if (s === void 0 && (s = null), s !== null)
986
+ return this.add(7 * (s - this.week()), "day");
987
987
  var c = this.$locale().yearStart || 1;
988
988
  if (this.month() === 11 && this.date() > 25) {
989
- var o = l(this).startOf(t).add(1, t).date(c), i = l(this).endOf(r);
989
+ var o = l(this).startOf(t).add(1, t).date(c), i = l(this).endOf(n);
990
990
  if (o.isBefore(i))
991
991
  return 1;
992
992
  }
993
- var s = l(this).startOf(t).date(c).startOf(r).subtract(1, "millisecond"), f = this.diff(s, r, !0);
994
- return f < 0 ? l(this).startOf("week").week() : Math.ceil(f);
995
- }, h.weeks = function(v) {
996
- return v === void 0 && (v = null), this.week(v);
993
+ var d = l(this).startOf(t).date(c).startOf(n).subtract(1, "millisecond"), m = this.diff(d, n, !0);
994
+ return m < 0 ? l(this).startOf("week").week() : Math.ceil(m);
995
+ }, h.weeks = function(s) {
996
+ return s === void 0 && (s = null), this.week(s);
997
997
  };
998
998
  };
999
999
  });
1000
- })(Ue);
1001
- var Rr = Ue.exports;
1002
- const Ar = /* @__PURE__ */ Ve(Rr);
1003
- var qe = { exports: {} };
1004
- (function(e, n) {
1005
- (function(r, t) {
1000
+ })(He);
1001
+ var Vn = He.exports;
1002
+ const Bn = /* @__PURE__ */ We(Vn);
1003
+ var Ge = { exports: {} };
1004
+ (function(e, r) {
1005
+ (function(n, t) {
1006
1006
  e.exports = t();
1007
1007
  })(Se, function() {
1008
- var r = "month", t = "quarter";
1008
+ var n = "month", t = "quarter";
1009
1009
  return function(a, u) {
1010
1010
  var l = u.prototype;
1011
1011
  l.quarter = function(c) {
@@ -1013,90 +1013,90 @@ var qe = { exports: {} };
1013
1013
  };
1014
1014
  var h = l.add;
1015
1015
  l.add = function(c, o) {
1016
- return c = Number(c), this.$utils().p(o) === t ? this.add(3 * c, r) : h.bind(this)(c, o);
1016
+ return c = Number(c), this.$utils().p(o) === t ? this.add(3 * c, n) : h.bind(this)(c, o);
1017
1017
  };
1018
- var v = l.startOf;
1018
+ var s = l.startOf;
1019
1019
  l.startOf = function(c, o) {
1020
- var i = this.$utils(), s = !!i.u(o) || o;
1020
+ var i = this.$utils(), d = !!i.u(o) || o;
1021
1021
  if (i.p(c) === t) {
1022
- var f = this.quarter() - 1;
1023
- return s ? this.month(3 * f).startOf(r).startOf("day") : this.month(3 * f + 2).endOf(r).endOf("day");
1022
+ var m = this.quarter() - 1;
1023
+ return d ? this.month(3 * m).startOf(n).startOf("day") : this.month(3 * m + 2).endOf(n).endOf("day");
1024
1024
  }
1025
- return v.bind(this)(c, o);
1025
+ return s.bind(this)(c, o);
1026
1026
  };
1027
1027
  };
1028
1028
  });
1029
- })(qe);
1030
- var Nr = qe.exports;
1031
- const Br = /* @__PURE__ */ Ve(Nr);
1032
- S.extend(Ar);
1033
- S.extend(Br);
1029
+ })(Ge);
1030
+ var Un = Ge.exports;
1031
+ const qn = /* @__PURE__ */ We(Un);
1032
+ S.extend(Bn);
1033
+ S.extend(qn);
1034
1034
  S.locale("zh-cn", {
1035
1035
  weekStart: 1
1036
1036
  });
1037
- function Vr(e) {
1038
- function n(r, t) {
1039
- return e != null && e.disabledDate ? e.disabledDate(r, t) : !1;
1037
+ function Wn(e) {
1038
+ function r(n, t) {
1039
+ return e != null && e.disabledDate ? e.disabledDate(n, t) : !1;
1040
1040
  }
1041
- return (r, t) => {
1041
+ return (n, t) => {
1042
1042
  function a() {
1043
- const l = r[t.key];
1043
+ const l = n[t.key];
1044
1044
  switch (e == null ? void 0 : e.type) {
1045
1045
  case "week":
1046
- return d("span", null, [`${S(l).format("YYYY年")}${S(l).week()}周`]);
1046
+ return f("span", null, [`${S(l).format("YYYY年")}${S(l).week()}周`]);
1047
1047
  case "month":
1048
- return d("span", null, [S(l).format("YYYY年MM月")]);
1048
+ return f("span", null, [S(l).format("YYYY年MM月")]);
1049
1049
  case "quarter":
1050
- return d("span", null, [`${S(l).format("YYYY年")}${S(l).quarter()}季度`]);
1050
+ return f("span", null, [`${S(l).format("YYYY年")}${S(l).quarter()}季度`]);
1051
1051
  case "year":
1052
- return d("span", null, [S(l).format("YYYY年")]);
1052
+ return f("span", null, [S(l).format("YYYY年")]);
1053
1053
  case "date":
1054
1054
  default:
1055
- return d("span", null, [S(l).format("YYYY年MM月DD日")]);
1055
+ return f("span", null, [S(l).format("YYYY年MM月DD日")]);
1056
1056
  }
1057
1057
  }
1058
1058
  function u() {
1059
1059
  switch (e == null ? void 0 : e.type) {
1060
1060
  case "week":
1061
- return d(bt, {
1061
+ return f(wt, {
1062
1062
  "day-start-of-week": 1,
1063
- modelValue: r[t.key],
1064
- "onUpdate:modelValue": (l) => r[t.key] = l,
1065
- "disabled-date": n,
1063
+ modelValue: n[t.key],
1064
+ "onUpdate:modelValue": (l) => n[t.key] = l,
1065
+ "disabled-date": r,
1066
1066
  format: e == null ? void 0 : e.labelFormat,
1067
1067
  "value-format": e == null ? void 0 : e.valueFormat
1068
1068
  }, null);
1069
1069
  case "month":
1070
- return d(gt, {
1071
- modelValue: r[t.key],
1072
- "onUpdate:modelValue": (l) => r[t.key] = l,
1073
- "disabled-date": n,
1070
+ return f(kt, {
1071
+ modelValue: n[t.key],
1072
+ "onUpdate:modelValue": (l) => n[t.key] = l,
1073
+ "disabled-date": r,
1074
1074
  format: e == null ? void 0 : e.labelFormat,
1075
1075
  "value-format": e == null ? void 0 : e.valueFormat
1076
1076
  }, null);
1077
1077
  case "quarter":
1078
- return d(yt, {
1079
- modelValue: r[t.key],
1080
- "onUpdate:modelValue": (l) => r[t.key] = l,
1081
- "disabled-date": n,
1078
+ return f(bt, {
1079
+ modelValue: n[t.key],
1080
+ "onUpdate:modelValue": (l) => n[t.key] = l,
1081
+ "disabled-date": r,
1082
1082
  format: e == null ? void 0 : e.labelFormat,
1083
1083
  "value-format": e == null ? void 0 : e.valueFormat
1084
1084
  }, null);
1085
1085
  case "year":
1086
- return d(pt, {
1087
- modelValue: r[t.key],
1088
- "onUpdate:modelValue": (l) => r[t.key] = l,
1089
- "disabled-date": n,
1086
+ return f(gt, {
1087
+ modelValue: n[t.key],
1088
+ "onUpdate:modelValue": (l) => n[t.key] = l,
1089
+ "disabled-date": r,
1090
1090
  format: e == null ? void 0 : e.labelFormat,
1091
1091
  "value-format": e == null ? void 0 : e.valueFormat
1092
1092
  }, null);
1093
1093
  case "date":
1094
1094
  default:
1095
- return d(vt, ge({
1095
+ return f(yt, ge({
1096
1096
  "disabled-input": !0,
1097
- modelValue: r[t.key],
1098
- "onUpdate:modelValue": (l) => r[t.key] = l,
1099
- "disabled-date": n,
1097
+ modelValue: n[t.key],
1098
+ "onUpdate:modelValue": (l) => n[t.key] = l,
1099
+ "disabled-date": r,
1100
1100
  format: e == null ? void 0 : e.labelFormat,
1101
1101
  "value-format": e == null ? void 0 : e.valueFormat
1102
1102
  }, {
@@ -1113,61 +1113,115 @@ function Vr(e) {
1113
1113
  }
1114
1114
  };
1115
1115
  }
1116
- function Ur(e) {
1117
- return (n, r) => {
1118
- function t() {
1119
- return d("span", null, [n[r.key]]);
1120
- }
1116
+ function Pe(e) {
1117
+ return typeof e == "function" ? e() : ze(e);
1118
+ }
1119
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
1120
+ const je = () => {
1121
+ };
1122
+ function Hn(e, r) {
1123
+ function n(...t) {
1124
+ return new Promise((a, u) => {
1125
+ Promise.resolve(e(() => r.apply(this, t), { fn: r, thisArg: this, args: t })).then(a).catch(u);
1126
+ });
1127
+ }
1128
+ return n;
1129
+ }
1130
+ function Gn(e, r = {}) {
1131
+ let n, t, a = je;
1132
+ const u = (h) => {
1133
+ clearTimeout(h), a(), a = je;
1134
+ };
1135
+ return (h) => {
1136
+ const s = Pe(e), c = Pe(r.maxWait);
1137
+ return n && u(n), s <= 0 || c !== void 0 && c <= 0 ? (t && (u(t), t = null), Promise.resolve(h())) : new Promise((o, i) => {
1138
+ a = r.rejectOnCancel ? i : o, c && !t && (t = setTimeout(() => {
1139
+ n && u(n), t = null, o(h());
1140
+ }, c)), n = setTimeout(() => {
1141
+ t && u(t), t = null, o(h());
1142
+ }, s);
1143
+ });
1144
+ };
1145
+ }
1146
+ function Kn(e, r = 200, n = {}) {
1147
+ return Hn(
1148
+ Gn(r, n),
1149
+ e
1150
+ );
1151
+ }
1152
+ function _e(e, r, n) {
1153
+ const t = Z(e, (...a) => (Re(() => t()), r(...a)), n);
1154
+ return t;
1155
+ }
1156
+ function Xn(e) {
1157
+ let r;
1158
+ return (n, t) => {
1121
1159
  function a() {
1160
+ return f("span", null, [n[t.key]]);
1161
+ }
1162
+ const u = Kn((s) => {
1163
+ s && s.dispatchEvent(new Event("submit"));
1164
+ }, 1e3);
1165
+ function l() {
1166
+ if (!(e != null && e.autoSumbit))
1167
+ return;
1168
+ let s = r;
1169
+ for (; s && s.$el.tagName !== "FORM"; )
1170
+ s = s.$parent;
1171
+ if (s && s.$el) {
1172
+ const c = s.$el;
1173
+ u(c);
1174
+ }
1175
+ }
1176
+ function h() {
1122
1177
  switch (e == null ? void 0 : e.type) {
1123
1178
  case "number":
1124
- return d(Re, {
1125
- modelValue: n[r.key],
1126
- "onUpdate:modelValue": (u) => n[r.key] = u,
1179
+ return f(Ve, {
1180
+ ref: (s) => r = s,
1181
+ modelValue: n[t.key],
1182
+ "onUpdate:modelValue": (s) => n[t.key] = s,
1127
1183
  hideButton: !0,
1128
1184
  "read-only": e == null ? void 0 : e.readonly,
1129
1185
  placeholder: e == null ? void 0 : e.placeholder,
1186
+ onInput: l,
1130
1187
  allowClear: e == null ? void 0 : e.clearable
1131
1188
  }, null);
1132
1189
  case "string":
1133
1190
  default:
1134
- return d(kt, {
1135
- modelValue: n[r.key],
1136
- "onUpdate:modelValue": (u) => n[r.key] = u,
1191
+ return f(xt, {
1192
+ ref: (s) => r = s,
1193
+ modelValue: n[t.key],
1194
+ "onUpdate:modelValue": (s) => n[t.key] = s,
1137
1195
  placeholder: e == null ? void 0 : e.placeholder,
1138
1196
  readonly: e == null ? void 0 : e.readonly,
1197
+ onInput: l,
1139
1198
  allowClear: e == null ? void 0 : e.clearable
1140
1199
  }, null);
1141
1200
  }
1142
1201
  }
1143
- switch (r.mode) {
1202
+ switch (t.mode) {
1144
1203
  case "text":
1145
- return t();
1204
+ return a();
1146
1205
  case "component":
1147
1206
  default:
1148
- return a();
1207
+ return h();
1149
1208
  }
1150
1209
  };
1151
1210
  }
1152
- typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
1153
- function _e(e, n, r) {
1154
- const t = Z(e, (...a) => (Ie(() => t()), n(...a)), r);
1155
- return t;
1156
- }
1157
- function qr(e) {
1211
+ function Jn(e) {
1158
1212
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !be(e);
1159
1213
  }
1160
1214
  const K = /* @__PURE__ */ new WeakMap();
1161
- function Wr() {
1215
+ function Qn() {
1162
1216
  const e = _(/* @__PURE__ */ new Map());
1163
- return [e, (r) => e.value = r];
1217
+ return [e, (n) => e.value = n];
1164
1218
  }
1165
- function Hr(e) {
1166
- let n, r = !1;
1167
- const [t, a] = Wr(), u = (c) => {
1168
- if (e.onChange && e.onChange(c), !e.autoSumbit || !n)
1219
+ function Zn(e) {
1220
+ let r, n = !1;
1221
+ const [t, a] = Qn(), u = (c) => {
1222
+ if (e.onChange && e.onChange(c), !e.autoSumbit || !r)
1169
1223
  return;
1170
- let o = n;
1224
+ let o = r;
1171
1225
  for (; o && o.$el.tagName !== "FORM"; )
1172
1226
  o = o.$parent;
1173
1227
  o && o.$el && o.$el.dispatchEvent(new Event("submit"));
@@ -1188,14 +1242,14 @@ function Hr(e) {
1188
1242
  const i = K.get(e.options);
1189
1243
  K.set(e.options, o), i(o);
1190
1244
  });
1191
- }, v = () => {
1245
+ }, s = () => {
1192
1246
  l(e.options, (c) => {
1193
1247
  a(c);
1194
1248
  });
1195
1249
  };
1196
1250
  switch (!0) {
1197
1251
  case e.options instanceof Function: {
1198
- e.cache !== !1 ? h() : v();
1252
+ e.cache !== !1 ? h() : s();
1199
1253
  break;
1200
1254
  }
1201
1255
  case ae(e.options): {
@@ -1210,30 +1264,30 @@ function Hr(e) {
1210
1264
  t.value = e.options;
1211
1265
  }
1212
1266
  return (c, o) => {
1213
- e.default && !r && (c[o.key] = e.default, r = !0);
1267
+ e.default && !n && (c[o.key] = e.default, n = !0);
1214
1268
  function i() {
1215
- const f = c[o.key];
1216
- return e.multiple ? d("span", null, [f.map((m) => t.value.get(m)).join(" ,")]) : d("span", null, [t.value.get(f)]);
1269
+ const m = c[o.key];
1270
+ return e.multiple ? f("span", null, [m.map((v) => t.value.get(v)).join(" ,")]) : f("span", null, [t.value.get(m)]);
1217
1271
  }
1218
- function s() {
1219
- let f;
1220
- return d(wt, {
1221
- ref: (m) => n = m,
1272
+ function d() {
1273
+ let m;
1274
+ return f(Ct, {
1275
+ ref: (v) => r = v,
1222
1276
  multiple: e.multiple,
1223
1277
  modelValue: c[o.key],
1224
- "onUpdate:modelValue": (m) => c[o.key] = m,
1278
+ "onUpdate:modelValue": (v) => c[o.key] = v,
1225
1279
  placeholder: e.placeholder,
1226
1280
  allowClear: e.clearable,
1227
1281
  allowSearch: e.searchable,
1228
1282
  "allow-create": e.createable,
1229
1283
  maxTagCount: e.maxTagCount ?? 2,
1230
1284
  onChange: u
1231
- }, qr(f = Array.from(t.value.entries()).map(([m, k]) => d(xt, {
1232
- key: m,
1233
- value: m,
1285
+ }, Jn(m = Array.from(t.value.entries()).map(([v, k]) => f(St, {
1286
+ key: v,
1287
+ value: v,
1234
1288
  label: k
1235
- }, null))) ? f : {
1236
- default: () => [f]
1289
+ }, null))) ? m : {
1290
+ default: () => [m]
1237
1291
  });
1238
1292
  }
1239
1293
  switch (o.mode) {
@@ -1241,16 +1295,16 @@ function Hr(e) {
1241
1295
  return i();
1242
1296
  case "component":
1243
1297
  default:
1244
- return s();
1298
+ return d();
1245
1299
  }
1246
1300
  };
1247
1301
  }
1248
- function Gr(e) {
1249
- let n;
1250
- function r() {
1251
- if (!(e != null && e.autoSumbit) || !n)
1302
+ function er(e) {
1303
+ let r;
1304
+ function n() {
1305
+ if (!(e != null && e.autoSumbit) || !r)
1252
1306
  return;
1253
- let t = n;
1307
+ let t = r;
1254
1308
  for (; t && t.$el.tagName !== "FORM"; )
1255
1309
  t = t.$parent;
1256
1310
  t && t.$el && t.$el.dispatchEvent(new Event("submit"));
@@ -1259,18 +1313,18 @@ function Gr(e) {
1259
1313
  e != null && e.default && (t[a.key] = e.default);
1260
1314
  function u() {
1261
1315
  const h = t[a.key];
1262
- return d("span", null, [h ? (e == null ? void 0 : e.openLabel) ?? "是" : (e == null ? void 0 : e.closeLabel) ?? "否"]);
1316
+ return f("span", null, [h ? (e == null ? void 0 : e.openLabel) ?? "是" : (e == null ? void 0 : e.closeLabel) ?? "否"]);
1263
1317
  }
1264
1318
  function l() {
1265
- return d(Ct, {
1266
- ref: (h) => n = h,
1319
+ return f(_t, {
1320
+ ref: (h) => r = h,
1267
1321
  modelValue: t[a.key],
1268
1322
  "onUpdate:modelValue": (h) => t[a.key] = h,
1269
1323
  checkedText: (e == null ? void 0 : e.openLabel) ?? "是",
1270
1324
  uncheckedText: (e == null ? void 0 : e.closeLabel) ?? "否",
1271
1325
  checkedValue: (e == null ? void 0 : e.openValue) ?? !0,
1272
1326
  uncheckedValue: (e == null ? void 0 : e.closeValue) ?? !1,
1273
- onChange: r
1327
+ onChange: n
1274
1328
  }, null);
1275
1329
  }
1276
1330
  switch (a.mode) {
@@ -1282,47 +1336,47 @@ function Gr(e) {
1282
1336
  }
1283
1337
  };
1284
1338
  }
1285
- function Kr(e) {
1286
- return (n, r) => {
1339
+ function tr(e) {
1340
+ return (r, n) => {
1287
1341
  let t = [];
1288
1342
  function a(c) {
1289
1343
  t = c;
1290
1344
  }
1291
1345
  function u(c) {
1292
1346
  if (c && c.length === 2) {
1293
- const [o, i] = c.sort(), s = S(o).startOf("days"), f = S(i).endOf("days");
1294
- n[r.key] = [s.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD"), f.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD")];
1347
+ const [o, i] = c.sort(), d = S(o).startOf("days"), m = S(i).endOf("days");
1348
+ r[n.key] = [d.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD"), m.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD")];
1295
1349
  }
1296
1350
  }
1297
1351
  function l(c) {
1298
1352
  return e != null && e.disabledDate ? e.disabledDate(t.filter(Boolean), c) : !1;
1299
1353
  }
1300
1354
  function h() {
1301
- const c = n[r.key], [o, i] = c, s = (f) => {
1355
+ const c = r[n.key], [o, i] = c, d = (m) => {
1302
1356
  switch (e == null ? void 0 : e.type) {
1303
1357
  case "week":
1304
- return d("span", null, [`${S(f).format("YYYY年")}${S(f).week()}周`]);
1358
+ return f("span", null, [`${S(m).format("YYYY年")}${S(m).week()}周`]);
1305
1359
  case "month":
1306
- return d("span", null, [S(f).format("YYYY年MM月")]);
1360
+ return f("span", null, [S(m).format("YYYY年MM月")]);
1307
1361
  case "quarter":
1308
- return d("span", null, [`${S(f).format("YYYY年")}${S(f).quarter()}季度`]);
1362
+ return f("span", null, [`${S(m).format("YYYY年")}${S(m).quarter()}季度`]);
1309
1363
  case "year":
1310
- return d("span", null, [S(f).format("YYYY年")]);
1364
+ return f("span", null, [S(m).format("YYYY年")]);
1311
1365
  case "date":
1312
1366
  default:
1313
- return d("span", null, [S(f).format("YYYY年MM月DD日")]);
1367
+ return f("span", null, [S(m).format("YYYY年MM月DD日")]);
1314
1368
  }
1315
1369
  };
1316
- return d("span", null, [s(o), D(" - "), s(i)]);
1370
+ return f("span", null, [d(o), I(" - "), d(i)]);
1317
1371
  }
1318
- function v() {
1319
- return d("div", null, [d(St, {
1372
+ function s() {
1373
+ return f("div", null, [f($t, {
1320
1374
  "disabled-input": !0,
1321
1375
  style: {
1322
1376
  width: "300px"
1323
1377
  },
1324
- modelValue: n[r.key],
1325
- "onUpdate:modelValue": (c) => n[r.key] = c,
1378
+ modelValue: r[n.key],
1379
+ "onUpdate:modelValue": (c) => r[n.key] = c,
1326
1380
  onSelect: a,
1327
1381
  onChange: u,
1328
1382
  mode: e == null ? void 0 : e.type,
@@ -1333,30 +1387,30 @@ function Kr(e) {
1333
1387
  "value-format": e == null ? void 0 : e.valueFormat
1334
1388
  }, null)]);
1335
1389
  }
1336
- switch (r.mode) {
1390
+ switch (n.mode) {
1337
1391
  case "text":
1338
1392
  return h();
1339
1393
  case "component":
1340
1394
  default:
1341
- return v();
1395
+ return s();
1342
1396
  }
1343
1397
  };
1344
1398
  }
1345
- function Xr(e) {
1346
- return (n, r) => {
1399
+ function nr(e) {
1400
+ return (r, n) => {
1347
1401
  function t() {
1348
- return d("span", null, [n[r.key]]);
1402
+ return f("span", null, [r[n.key]]);
1349
1403
  }
1350
1404
  function a() {
1351
- return d(_t, {
1352
- modelValue: n[r.key],
1353
- "onUpdate:modelValue": (u) => n[r.key] = u,
1405
+ return f(Ft, {
1406
+ modelValue: r[n.key],
1407
+ "onUpdate:modelValue": (u) => r[n.key] = u,
1354
1408
  placeholder: e == null ? void 0 : e.placeholder,
1355
1409
  autoSize: e == null ? void 0 : e.autosize,
1356
1410
  maxLength: e == null ? void 0 : e.maxLength
1357
1411
  }, null);
1358
1412
  }
1359
- switch (r.mode) {
1413
+ switch (n.mode) {
1360
1414
  case "text":
1361
1415
  return t();
1362
1416
  case "component":
@@ -1365,46 +1419,46 @@ function Xr(e) {
1365
1419
  }
1366
1420
  };
1367
1421
  }
1368
- function We(e) {
1369
- let n = !1;
1370
- const r = [], t = (a) => {
1422
+ function Ke(e) {
1423
+ let r = !1;
1424
+ const n = [], t = (a) => {
1371
1425
  var u;
1372
- if (!n) {
1373
- if (r.push(a), a[e.valueProp] === e.key) {
1374
- n = !0;
1426
+ if (!r) {
1427
+ if (n.push(a), a[e.valueProp] === e.key) {
1428
+ r = !0;
1375
1429
  return;
1376
1430
  }
1377
- (u = a.children) != null && u.length && a.children.forEach(t), n || r.pop();
1431
+ (u = a.children) != null && u.length && a.children.forEach(t), r || n.pop();
1378
1432
  }
1379
1433
  };
1380
- return e.data.forEach(t), r;
1434
+ return e.data.forEach(t), n;
1381
1435
  }
1382
- function Jr(e) {
1383
- let n = e.data;
1384
- const r = [];
1436
+ function rr(e) {
1437
+ let r = e.data;
1438
+ const n = [];
1385
1439
  return e.path.forEach((t) => {
1386
1440
  var u;
1387
- const a = n.find((l) => l[e.valueProp] === t);
1388
- a && r.push(a), a && ((u = a.children) != null && u.length) && (n = a.children);
1389
- }), r;
1441
+ const a = r.find((l) => l[e.valueProp] === t);
1442
+ a && n.push(a), a && ((u = a.children) != null && u.length) && (r = a.children);
1443
+ }), n;
1390
1444
  }
1391
1445
  const X = /* @__PURE__ */ new WeakMap();
1392
- function Qr() {
1446
+ function lr() {
1393
1447
  const e = _([]);
1394
- return [e, (r) => e.value = r];
1448
+ return [e, (n) => e.value = n];
1395
1449
  }
1396
- function Zr(e) {
1397
- let n, r = !1;
1398
- const [t, a] = Qr(), u = () => {
1399
- if (!e.autoSumbit || !n)
1450
+ function ar(e) {
1451
+ let r, n = !1;
1452
+ const [t, a] = lr(), u = () => {
1453
+ if (!e.autoSumbit || !r)
1400
1454
  return;
1401
- let o = n;
1455
+ let o = r;
1402
1456
  for (; o && o.$el.tagName !== "FORM"; )
1403
1457
  o = o.$parent;
1404
1458
  o && o.$el && o.$el.dispatchEvent(new Event("submit"));
1405
1459
  }, l = (o, i) => {
1406
- const s = o();
1407
- s instanceof Promise ? s.then(i) : i(s);
1460
+ const d = o();
1461
+ d instanceof Promise ? d.then(i) : i(d);
1408
1462
  }, h = async () => {
1409
1463
  const o = X.get(e.options);
1410
1464
  switch (typeof o) {
@@ -1416,17 +1470,17 @@ function Zr(e) {
1416
1470
  return;
1417
1471
  }
1418
1472
  X.set(e.options, a), l(e.options, (i) => {
1419
- const s = X.get(e.options);
1420
- X.set(e.options, i), s(i);
1473
+ const d = X.get(e.options);
1474
+ X.set(e.options, i), d(i);
1421
1475
  });
1422
- }, v = () => {
1476
+ }, s = () => {
1423
1477
  l(e.options, (o) => {
1424
1478
  a(o);
1425
1479
  });
1426
1480
  };
1427
1481
  switch (!0) {
1428
1482
  case e.options instanceof Function: {
1429
- e.cache !== !1 ? h() : v();
1483
+ e.cache !== !1 ? h() : s();
1430
1484
  break;
1431
1485
  }
1432
1486
  case ae(e.options): {
@@ -1441,15 +1495,15 @@ function Zr(e) {
1441
1495
  t.value = e.options;
1442
1496
  }
1443
1497
  function c(o, i) {
1444
- var m;
1445
- const s = ((m = e.fieldNames) == null ? void 0 : m.title) || "title", f = i[s];
1446
- return f ? f.toLowerCase().includes(o.toLowerCase()) : !1;
1498
+ var v;
1499
+ const d = ((v = e.fieldNames) == null ? void 0 : v.title) || "title", m = i[d];
1500
+ return m ? m.toLowerCase().includes(o.toLowerCase()) : !1;
1447
1501
  }
1448
1502
  return (o, i) => {
1449
- e.default && !r && (o[i.key] = e.default, r = !0);
1450
- function s() {
1451
- const m = o[i.key], k = (y) => {
1452
- const [C] = We({
1503
+ e.default && !n && (o[i.key] = e.default, n = !0);
1504
+ function d() {
1505
+ const v = o[i.key], k = (y) => {
1506
+ const [C] = Ke({
1453
1507
  data: t.value,
1454
1508
  labelProp: "title",
1455
1509
  valueProp: "key",
@@ -1458,19 +1512,19 @@ function Zr(e) {
1458
1512
  return C == null ? void 0 : C.title;
1459
1513
  };
1460
1514
  if (e.multiple) {
1461
- const y = m.map((C) => k(C));
1462
- return d("span", null, [y.join(", ")]);
1515
+ const y = v.map((C) => k(C));
1516
+ return f("span", null, [y.join(", ")]);
1463
1517
  } else {
1464
- const y = k(m);
1465
- return d("span", null, [y]);
1518
+ const y = k(v);
1519
+ return f("span", null, [y]);
1466
1520
  }
1467
1521
  }
1468
- function f() {
1469
- return d($t, {
1470
- ref: (m) => n = m,
1522
+ function m() {
1523
+ return f(Ot, {
1524
+ ref: (v) => r = v,
1471
1525
  multiple: e.multiple,
1472
1526
  modelValue: o[i.key],
1473
- "onUpdate:modelValue": (m) => o[i.key] = m,
1527
+ "onUpdate:modelValue": (v) => o[i.key] = v,
1474
1528
  placeholder: e.placeholder,
1475
1529
  allowClear: e.clearable,
1476
1530
  allowSearch: e.searchable,
@@ -1486,24 +1540,24 @@ function Zr(e) {
1486
1540
  }
1487
1541
  switch (i.mode) {
1488
1542
  case "text":
1489
- return s();
1543
+ return d();
1490
1544
  case "component":
1491
1545
  default:
1492
- return f();
1546
+ return m();
1493
1547
  }
1494
1548
  };
1495
1549
  }
1496
1550
  const J = /* @__PURE__ */ new WeakMap();
1497
- function en() {
1551
+ function ur() {
1498
1552
  const e = _([]);
1499
- return [e, (r) => e.value = r];
1553
+ return [e, (n) => e.value = n];
1500
1554
  }
1501
- function tn(e) {
1502
- let n, r = !1;
1503
- const [t, a] = en(), u = () => {
1504
- if (!e.autoSumbit || !n)
1555
+ function or(e) {
1556
+ let r, n = !1;
1557
+ const [t, a] = ur(), u = () => {
1558
+ if (!e.autoSumbit || !r)
1505
1559
  return;
1506
- let c = n;
1560
+ let c = r;
1507
1561
  for (; c && c.$el.tagName !== "FORM"; )
1508
1562
  c = c.$parent;
1509
1563
  c && c.$el && c.$el.dispatchEvent(new Event("submit"));
@@ -1524,14 +1578,14 @@ function tn(e) {
1524
1578
  const i = J.get(e.options);
1525
1579
  J.set(e.options, o), i(o);
1526
1580
  });
1527
- }, v = () => {
1581
+ }, s = () => {
1528
1582
  l(e.options, (c) => {
1529
1583
  a(c);
1530
1584
  });
1531
1585
  };
1532
1586
  switch (!0) {
1533
1587
  case e.options instanceof Function: {
1534
- e.cache !== !1 ? h() : v();
1588
+ e.cache !== !1 ? h() : s();
1535
1589
  break;
1536
1590
  }
1537
1591
  case ae(e.options): {
@@ -1546,14 +1600,14 @@ function tn(e) {
1546
1600
  t.value = e.options;
1547
1601
  }
1548
1602
  return (c, o) => {
1549
- e.default && !r && (c[o.key] = e.default, r = !0);
1603
+ e.default && !n && (c[o.key] = e.default, n = !0);
1550
1604
  function i() {
1551
- const f = c[o.key], m = (y) => We({
1605
+ const m = c[o.key], v = (y) => Ke({
1552
1606
  data: t.value,
1553
1607
  labelProp: "label",
1554
1608
  valueProp: "value",
1555
1609
  key: y
1556
- }).map((j) => j.label).join("/"), k = (y) => Jr({
1610
+ }).map((j) => j.label).join("/"), k = (y) => rr({
1557
1611
  data: t.value,
1558
1612
  labelProp: "label",
1559
1613
  valueProp: "value",
@@ -1561,32 +1615,32 @@ function tn(e) {
1561
1615
  }).map((j) => j.label).join("/");
1562
1616
  switch (!0) {
1563
1617
  case (!e.pathMode && !e.multiple): {
1564
- const y = m(f);
1565
- return d("span", null, [y]);
1618
+ const y = v(m);
1619
+ return f("span", null, [y]);
1566
1620
  }
1567
1621
  case (!e.pathMode && e.multiple): {
1568
- const y = f.map((C) => m(C));
1569
- return d("span", null, [y.join(", ")]);
1622
+ const y = m.map((C) => v(C));
1623
+ return f("span", null, [y.join(", ")]);
1570
1624
  }
1571
1625
  case (e.pathMode && !e.multiple): {
1572
- const y = k(f);
1573
- return d("span", null, [y]);
1626
+ const y = k(m);
1627
+ return f("span", null, [y]);
1574
1628
  }
1575
1629
  case (e.pathMode && e.multiple): {
1576
- const y = f.map((C) => k(C));
1577
- return d("span", null, [y.join(", ")]);
1630
+ const y = m.map((C) => k(C));
1631
+ return f("span", null, [y.join(", ")]);
1578
1632
  }
1579
1633
  default:
1580
- return d("span", null, null);
1634
+ return f("span", null, null);
1581
1635
  }
1582
1636
  }
1583
- function s() {
1584
- return d(Ft, {
1637
+ function d() {
1638
+ return f(Yt, {
1585
1639
  pathMode: e.pathMode,
1586
- ref: (f) => n = f,
1640
+ ref: (m) => r = m,
1587
1641
  multiple: e.multiple,
1588
1642
  modelValue: c[o.key],
1589
- "onUpdate:modelValue": (f) => c[o.key] = f,
1643
+ "onUpdate:modelValue": (m) => c[o.key] = m,
1590
1644
  placeholder: e.placeholder,
1591
1645
  allowClear: e.clearable,
1592
1646
  allowSearch: e.searchable,
@@ -1600,14 +1654,14 @@ function tn(e) {
1600
1654
  return i();
1601
1655
  case "component":
1602
1656
  default:
1603
- return s();
1657
+ return d();
1604
1658
  }
1605
1659
  };
1606
1660
  }
1607
- function rn(e) {
1608
- return (n, r) => e(n, r);
1661
+ function cr(e) {
1662
+ return (r, n) => e(r, n);
1609
1663
  }
1610
- const nn = {
1664
+ const ir = {
1611
1665
  thousands: !0,
1612
1666
  inputUnit: "元",
1613
1667
  outputUnit: "元"
@@ -1616,19 +1670,19 @@ const nn = {
1616
1670
  元: 10 ** 2,
1617
1671
  万: 10 ** 4
1618
1672
  };
1619
- function ln(e) {
1673
+ function sr(e) {
1620
1674
  e = {
1621
- ...nn,
1675
+ ...ir,
1622
1676
  ...e || {}
1623
1677
  };
1624
- const n = (l) => {
1678
+ const r = (l) => {
1625
1679
  if (l == null)
1626
1680
  return;
1627
1681
  if ((e == null ? void 0 : e.inputUnit) === (e == null ? void 0 : e.outputUnit))
1628
1682
  return l;
1629
1683
  const h = te[e.outputUnit] / te[e.inputUnit];
1630
1684
  return parseFloat((l * h).toFixed(10));
1631
- }, r = (l) => {
1685
+ }, n = (l) => {
1632
1686
  if (l == null)
1633
1687
  return;
1634
1688
  if ((e == null ? void 0 : e.inputUnit) === (e == null ? void 0 : e.outputUnit))
@@ -1643,18 +1697,18 @@ function ln(e) {
1643
1697
  return e != null && e.thousands ? t(h) : h;
1644
1698
  }, u = (l) => l.replace(/,/g, "");
1645
1699
  return (l, h) => {
1646
- const v = _(n(l[h.key]));
1647
- Z(v, (f) => {
1648
- l[h.key] = r(f);
1700
+ const s = _(r(l[h.key]));
1701
+ Z(s, (m) => {
1702
+ l[h.key] = n(m);
1649
1703
  });
1650
- const c = (e == null ? void 0 : e.prefix) && (() => typeof (e == null ? void 0 : e.prefix) == "string" ? d("span", null, [e.prefix]) : e.prefix()), o = () => typeof (e == null ? void 0 : e.suffix) == "string" ? d("span", null, [e.suffix]) : typeof (e == null ? void 0 : e.suffix) == "function" ? e.suffix() : e == null ? void 0 : e.inputUnit;
1704
+ const c = (e == null ? void 0 : e.prefix) && (() => typeof (e == null ? void 0 : e.prefix) == "string" ? f("span", null, [e.prefix]) : e.prefix()), o = () => typeof (e == null ? void 0 : e.suffix) == "string" ? f("span", null, [e.suffix]) : typeof (e == null ? void 0 : e.suffix) == "function" ? e.suffix() : e == null ? void 0 : e.inputUnit;
1651
1705
  function i() {
1652
- return d("span", null, [a(v.value.toString()), o()]);
1706
+ return f("span", null, [a(s.value.toString()), o()]);
1653
1707
  }
1654
- function s() {
1655
- return d(Re, {
1656
- modelValue: v.value,
1657
- "onUpdate:modelValue": (f) => v.value = f,
1708
+ function d() {
1709
+ return f(Ve, {
1710
+ modelValue: s.value,
1711
+ "onUpdate:modelValue": (m) => s.value = m,
1658
1712
  formatter: a,
1659
1713
  parser: u,
1660
1714
  precision: e == null ? void 0 : e.precision,
@@ -1672,52 +1726,52 @@ function ln(e) {
1672
1726
  return i();
1673
1727
  case "component":
1674
1728
  default:
1675
- return s();
1729
+ return d();
1676
1730
  }
1677
1731
  };
1678
1732
  }
1679
- function an() {
1733
+ function dr() {
1680
1734
  return {
1681
- input: Ur,
1682
- textarea: Xr,
1683
- select: Hr,
1684
- treeSelect: Zr,
1685
- date: Vr,
1686
- switch: Gr,
1687
- dateRange: Kr,
1688
- render: rn,
1689
- cascader: tn,
1690
- currency: ln
1735
+ input: Xn,
1736
+ textarea: nr,
1737
+ select: Zn,
1738
+ treeSelect: ar,
1739
+ date: Wn,
1740
+ switch: er,
1741
+ dateRange: tr,
1742
+ render: cr,
1743
+ cascader: or,
1744
+ currency: sr
1691
1745
  };
1692
1746
  }
1693
- function Le(e, n) {
1694
- n.render || (n.render = (t) => t.input());
1695
- const r = n.render({
1696
- ...an()
1747
+ function Le(e, r) {
1748
+ r.render || (r.render = (t) => t.input());
1749
+ const n = r.render({
1750
+ ...dr()
1697
1751
  });
1698
1752
  return {
1699
- default: () => r(e, n)
1753
+ default: () => n(e, r)
1700
1754
  };
1701
1755
  }
1702
- function je(e, n) {
1703
- switch (n.mode) {
1756
+ function Ie(e, r) {
1757
+ switch (r.mode) {
1704
1758
  case "text":
1705
- return Oe(Le(e, n).default);
1759
+ return Oe(Le(e, r).default);
1706
1760
  case "component":
1707
1761
  default:
1708
1762
  return Oe(ve, {
1709
- field: n.key,
1710
- label: n.title,
1711
- hideLabel: n.hideLabel,
1712
- labelColStyle: n.labelStyle,
1713
- wrapperColStyle: n.contentStyle
1714
- }, Le(e, n));
1763
+ field: r.key,
1764
+ label: r.title,
1765
+ hideLabel: r.hideLabel,
1766
+ labelColStyle: r.labelStyle,
1767
+ wrapperColStyle: r.contentStyle
1768
+ }, Le(e, r));
1715
1769
  }
1716
1770
  }
1717
- function un(e) {
1771
+ function fr(e) {
1718
1772
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !be(e);
1719
1773
  }
1720
- const on = /* @__PURE__ */ z({
1774
+ const mr = /* @__PURE__ */ E({
1721
1775
  props: {
1722
1776
  form: {
1723
1777
  type: Object,
@@ -1728,98 +1782,98 @@ const on = /* @__PURE__ */ z({
1728
1782
  }
1729
1783
  },
1730
1784
  setup(e) {
1731
- const n = Be(), r = e.form.map((v) => ({
1732
- ...v,
1785
+ const r = qe(), n = e.form.map((s) => ({
1786
+ ...s,
1733
1787
  collapsed: !1
1734
- })), t = Array.from(new Set(r.map((v) => v.group).flat().filter(Boolean))), a = r.reduce((v, c) => ((c.group ? [c.group].flat() : ["默认"]).forEach((o) => {
1735
- let i = v.find((s) => s.group === o);
1788
+ })), t = Array.from(new Set(n.map((s) => s.group).flat().filter(Boolean))), a = n.reduce((s, c) => ((c.group ? [c.group].flat() : ["默认"]).forEach((o) => {
1789
+ let i = s.find((d) => d.group === o);
1736
1790
  i || (i = {
1737
1791
  group: o,
1738
1792
  instance: void 0,
1739
1793
  form: []
1740
- }, v.push(i)), i.form.push(c);
1741
- }), v), []).sort((v, c) => v.group === "默认" ? -1 : c.group === "默认" ? 1 : v.group > c.group ? -1 : 1), u = _("默认");
1794
+ }, s.push(i)), i.form.push(c);
1795
+ }), s), []).sort((s, c) => s.group === "默认" ? -1 : c.group === "默认" ? 1 : s.group > c.group ? -1 : 1), u = _("默认");
1742
1796
  return {
1743
- formItems: r,
1797
+ formItems: n,
1744
1798
  groups: t,
1745
1799
  groupForms: a,
1746
1800
  activeTab: u,
1747
1801
  onSubmit: () => {
1748
- const v = a.find((c) => c.group === u.value);
1749
- if (v && v.instance) {
1750
- const c = v.instance.formSource;
1751
- v.instance.validate().then((o) => {
1752
- o || n.close(c);
1802
+ const s = a.find((c) => c.group === u.value);
1803
+ if (s && s.instance) {
1804
+ const c = s.instance.formSource;
1805
+ s.instance.validate().then((o) => {
1806
+ o || r.close(c);
1753
1807
  });
1754
1808
  }
1755
1809
  },
1756
1810
  onReset: () => {
1757
- const v = a.find((c) => c.group === u.value);
1758
- v && v.instance && v.instance.reset();
1811
+ const s = a.find((c) => c.group === u.value);
1812
+ s && s.instance && s.instance.reset();
1759
1813
  }
1760
1814
  };
1761
1815
  },
1762
1816
  render() {
1763
- const e = this.groupForms.find((n) => n.group === this.activeTab);
1817
+ const e = this.groupForms.find((r) => r.group === this.activeTab);
1764
1818
  if (this.groups.length) {
1765
- let n;
1766
- return d(Ot, {
1819
+ let r;
1820
+ return f(Mt, {
1767
1821
  "active-key": this.activeTab,
1768
- "onUpdate:active-key": (r) => this.activeTab = r
1769
- }, un(n = this.groupForms.map((r) => d(Yt, {
1770
- title: r.group,
1771
- key: r.group
1822
+ "onUpdate:active-key": (n) => this.activeTab = n
1823
+ }, fr(r = this.groupForms.map((n) => f(Tt, {
1824
+ title: n.group,
1825
+ key: n.group
1772
1826
  }, {
1773
- default: () => [d(pe, {
1774
- form: r.form,
1827
+ default: () => [f(pe, {
1828
+ form: n.form,
1775
1829
  value: this.value,
1776
- ref: (t) => r.instance = t
1777
- }, null), d(Ye, null, null), d("div", {
1830
+ ref: (t) => n.instance = t
1831
+ }, null), f(Ye, null, null), f("div", {
1778
1832
  class: "flex items-center justify-between space-x-2"
1779
- }, [d(I, {
1833
+ }, [f(D, {
1780
1834
  type: "secondary",
1781
1835
  size: "large",
1782
1836
  onClick: this.onReset
1783
1837
  }, {
1784
- default: () => [D("重置")]
1785
- }), d(I, {
1838
+ default: () => [I("重置")]
1839
+ }), f(D, {
1786
1840
  class: "w-100px",
1787
1841
  type: "primary",
1788
1842
  size: "large",
1789
1843
  onClick: this.onSubmit
1790
1844
  }, {
1791
- default: () => [D("搜索")]
1845
+ default: () => [I("搜索")]
1792
1846
  })])]
1793
- }))) ? n : {
1794
- default: () => [n]
1847
+ }))) ? r : {
1848
+ default: () => [r]
1795
1849
  });
1796
1850
  } else
1797
- return d(re, null, [d(pe, {
1851
+ return f(ne, null, [f(pe, {
1798
1852
  form: this.formItems,
1799
1853
  value: this.value,
1800
- ref: (n) => e.instance = n
1801
- }, null), d(Ye, null, null), d("div", {
1854
+ ref: (r) => e.instance = r
1855
+ }, null), f(Ye, null, null), f("div", {
1802
1856
  class: "flex items-center justify-between space-x-2"
1803
- }, [d(I, {
1857
+ }, [f(D, {
1804
1858
  type: "secondary",
1805
1859
  size: "large",
1806
1860
  onClick: this.onReset
1807
1861
  }, {
1808
- default: () => [D("重置")]
1809
- }), d(I, {
1862
+ default: () => [I("重置")]
1863
+ }), f(D, {
1810
1864
  class: "w-100px",
1811
1865
  type: "primary",
1812
1866
  size: "large",
1813
1867
  onClick: this.onSubmit
1814
1868
  }, {
1815
- default: () => [D("搜索")]
1869
+ default: () => [I("搜索")]
1816
1870
  })])]);
1817
1871
  }
1818
1872
  });
1819
- function Pe(e) {
1873
+ function De(e) {
1820
1874
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !be(e);
1821
1875
  }
1822
- const pe = /* @__PURE__ */ z({
1876
+ const pe = /* @__PURE__ */ E({
1823
1877
  props: {
1824
1878
  form: {
1825
1879
  type: Object,
@@ -1884,13 +1938,13 @@ const pe = /* @__PURE__ */ z({
1884
1938
  emits: ["submit", "cancel", "update:model-value"],
1885
1939
  expose: ["formSource", "updateFormField", "updateFormSource", "reset", "validate"],
1886
1940
  setup(e, {
1887
- emit: n
1941
+ emit: r
1888
1942
  }) {
1889
- const r = _(), [t, a] = zr(e.form, e.modelValue || e.value), u = _(e.columns || 0), l = _(!0), h = _(), v = () => l.value = !l.value, c = _(""), o = _("");
1943
+ const n = _(), [t, a] = An(e.form, e.modelValue || e.value), u = _(e.columns || 0), l = _(!0), h = _(), s = () => l.value = !l.value, c = _(""), o = _("");
1890
1944
  he(Te.id, c), he(Te.source, t);
1891
1945
  const i = () => {
1892
- n("submit", t.value), n("update:model-value", t.value);
1893
- }, s = F(() => e.form.filter((g) => l.value ? !g.collapsed : !0).filter((g) => {
1946
+ r("submit", t.value), r("update:model-value", t.value);
1947
+ }, d = F(() => e.form.filter((g) => l.value ? !g.collapsed : !0).filter((g) => {
1894
1948
  switch (!0) {
1895
1949
  case typeof g.visiable == "boolean":
1896
1950
  return g.visiable;
@@ -1899,33 +1953,33 @@ const pe = /* @__PURE__ */ z({
1899
1953
  default:
1900
1954
  return !0;
1901
1955
  }
1902
- })), f = F(() => {
1956
+ })), m = F(() => {
1903
1957
  if (!u.value)
1904
1958
  return 1;
1905
- const g = s.value.reduce((b, O) => b + ((O == null ? void 0 : O.span) || 1), 0);
1959
+ const g = d.value.reduce((b, O) => b + ((O == null ? void 0 : O.span) || 1), 0);
1906
1960
  return u.value - g % u.value;
1907
- }), m = (g) => g != null && g.validator ? {
1961
+ }), v = (g) => g != null && g.validator ? {
1908
1962
  ...g,
1909
1963
  validator: (b, O) => {
1910
1964
  const Y = g.validator(b, O);
1911
1965
  if (typeof Y == "function")
1912
1966
  return Y(t.value);
1913
1967
  }
1914
- } : g, k = F(() => e.form.reduce((g, b) => (b.rule && (Array.isArray(b.rule) ? g[b.key] = b.rule.map(m) : g[b.key] = m(b.rule)), g), {}));
1968
+ } : g, k = F(() => e.form.reduce((g, b) => (b.rule && (Array.isArray(b.rule) ? g[b.key] = b.rule.map(v) : g[b.key] = v(b.rule)), g), {}));
1915
1969
  function y() {
1916
1970
  var b;
1917
1971
  if (e.columns)
1918
1972
  return;
1919
- const g = (b = r.value) == null ? void 0 : b.$el;
1973
+ const g = (b = n.value) == null ? void 0 : b.$el;
1920
1974
  g && (u.value = Math.max(Math.floor(g.offsetWidth / e.minWidth), 1));
1921
1975
  }
1922
1976
  function C() {
1923
1977
  var b;
1924
- const g = (b = r.value) == null ? void 0 : b.$el;
1978
+ const g = (b = n.value) == null ? void 0 : b.$el;
1925
1979
  g && (g.id = c.value);
1926
1980
  }
1927
1981
  function j() {
1928
- h.value.open(on, {
1982
+ h.value.open(mr, {
1929
1983
  form: e.form,
1930
1984
  value: t.value
1931
1985
  }, {
@@ -1933,51 +1987,51 @@ const pe = /* @__PURE__ */ z({
1933
1987
  footer: !1,
1934
1988
  submitText: "搜索"
1935
1989
  }).then((g) => {
1936
- g && (L(g), i());
1990
+ g && (P(g), i());
1937
1991
  });
1938
1992
  }
1939
1993
  W(() => {
1940
1994
  const g = Math.random().toString(32).slice(2);
1941
1995
  c.value = e.id ?? g, o.value = e.name ?? g, y(), C(), window && window.addEventListener("resize", y);
1942
1996
  });
1943
- function L(g) {
1997
+ function P(g) {
1944
1998
  a({
1945
1999
  ...t.value,
1946
2000
  ...g || {}
1947
2001
  });
1948
2002
  }
1949
- function E(g, b) {
1950
- t.value[g] = b, L({
2003
+ function z(g, b) {
2004
+ t.value[g] = b, P({
1951
2005
  ...t.value
1952
2006
  });
1953
2007
  }
1954
2008
  function H(g) {
1955
2009
  const b = e.form.find((Y) => Y.key === g), O = (typeof b.default == "function" ? b.default() : b.default) || null;
1956
- E(g, O);
2010
+ z(g, O);
1957
2011
  }
1958
- function V() {
2012
+ function B() {
1959
2013
  var g;
1960
- (g = r.value) == null || g.resetFields();
2014
+ (g = n.value) == null || g.resetFields();
1961
2015
  }
1962
2016
  function w() {
1963
2017
  var g;
1964
- return (g = r.value) == null ? void 0 : g.validate();
2018
+ return (g = n.value) == null ? void 0 : g.validate();
1965
2019
  }
1966
2020
  return {
1967
2021
  formId: c,
1968
2022
  formName: o,
1969
2023
  formSource: t,
1970
- formInstance: r,
2024
+ formInstance: n,
1971
2025
  formColumns: u,
1972
2026
  formRules: k,
1973
2027
  formCollspased: l,
1974
- formActiosSpan: f,
1975
- formItems: s,
1976
- toggleFormCollapsed: v,
1977
- updateFormField: E,
2028
+ formActiosSpan: m,
2029
+ formItems: d,
2030
+ toggleFormCollapsed: s,
2031
+ updateFormField: z,
1978
2032
  resetFormField: H,
1979
- updateFormSource: L,
1980
- reset: V,
2033
+ updateFormSource: P,
2034
+ reset: B,
1981
2035
  validate: w,
1982
2036
  onSubmitSuccess: i,
1983
2037
  openCollapsedDialog: j,
@@ -1988,7 +2042,7 @@ const pe = /* @__PURE__ */ z({
1988
2042
  const e = () => {
1989
2043
  if (!this.showFormResult)
1990
2044
  return;
1991
- const r = this.form.filter((a) => {
2045
+ const n = this.form.filter((a) => {
1992
2046
  const u = this.formSource[a.key];
1993
2047
  switch (!0) {
1994
2048
  case typeof u == "string":
@@ -2003,96 +2057,96 @@ const pe = /* @__PURE__ */ z({
2003
2057
  const u = this.formItems.find((h) => h.key === a);
2004
2058
  u && !(u != null && u.collapsed) ? (l = this.formInstance) == null || l.resetFields(a) : this.resetFormField(a);
2005
2059
  };
2006
- return d(ce, {
2060
+ return f(ce, {
2007
2061
  span: this.formColumns
2008
2062
  }, {
2009
- default: () => [d(ve, {
2063
+ default: () => [f(ve, {
2010
2064
  label: "搜索条件"
2011
2065
  }, {
2012
- default: () => [d("div", {
2066
+ default: () => [f("div", {
2013
2067
  class: "w-full mt-5px text-left"
2014
- }, [d(Me, {
2068
+ }, [f(Me, {
2015
2069
  wrap: !0,
2016
2070
  align: "center"
2017
2071
  }, {
2018
- default: () => [r.length > 0 ? r.map((a) => d(Lt, {
2072
+ default: () => [n.length > 0 ? n.map((a) => f(Lt, {
2019
2073
  key: a.key,
2020
2074
  closable: !0,
2021
2075
  onClose: () => t(a.key)
2022
2076
  }, {
2023
- default: () => [d("div", {
2077
+ default: () => [f("div", {
2024
2078
  class: "flex space-x-2"
2025
- }, [d("div", {
2079
+ }, [f("div", {
2026
2080
  class: "text-#999"
2027
- }, [a.title, D(":")]), d("div", {
2081
+ }, [a.title, I(":")]), f("div", {
2028
2082
  class: "text-#333"
2029
- }, [je(this.formSource, {
2083
+ }, [Ie(this.formSource, {
2030
2084
  ...a,
2031
2085
  key: a.key,
2032
2086
  mode: "text"
2033
2087
  })])])]
2034
- })) : d("div", {
2088
+ })) : f("div", {
2035
2089
  class: "text-#999"
2036
- }, [D("暂无搜索条件")])]
2090
+ }, [I("暂无搜索条件")])]
2037
2091
  })])]
2038
2092
  })]
2039
2093
  });
2040
- }, n = () => {
2041
- const r = [], t = this.footer ? {
2094
+ }, r = () => {
2095
+ const n = [], t = this.footer ? {
2042
2096
  span: this.formColumns
2043
2097
  } : {
2044
2098
  span: this.formActiosSpan
2045
2099
  };
2046
- if (this.searchable && (r.push(d(I, {
2100
+ if (this.searchable && (n.push(f(D, {
2047
2101
  type: "primary",
2048
2102
  htmlType: "submit"
2049
2103
  }, {
2050
- default: () => [D("搜索")]
2051
- })), r.push(d(I, {
2104
+ default: () => [I("搜索")]
2105
+ })), n.push(f(D, {
2052
2106
  type: "secondary",
2053
2107
  onClick: () => {
2054
2108
  var a;
2055
2109
  return (a = this.formInstance) == null ? void 0 : a.resetFields();
2056
2110
  }
2057
2111
  }, {
2058
- default: () => [D("重置")]
2059
- }))), this.submitable && (r.push(d(I, {
2112
+ default: () => [I("重置")]
2113
+ }))), this.submitable && (n.push(f(D, {
2060
2114
  type: "primary",
2061
2115
  htmlType: "submit"
2062
2116
  }, {
2063
- default: () => [D("提交")]
2064
- })), r.push(d(I, {
2117
+ default: () => [I("提交")]
2118
+ })), n.push(f(D, {
2065
2119
  type: "secondary",
2066
2120
  onClick: () => this.$emit("cancel")
2067
2121
  }, {
2068
- default: () => [D("取消")]
2069
- }))), this.form.some((a) => !!a.collapsed) && (this.collapsedMode === "append" && r.push(d(I, {
2122
+ default: () => [I("取消")]
2123
+ }))), this.form.some((a) => !!a.collapsed) && (this.collapsedMode === "append" && n.push(f(D, {
2070
2124
  onClick: this.toggleFormCollapsed
2071
2125
  }, {
2072
2126
  default: () => this.formCollspased ? "展开" : "收起",
2073
- icon: () => this.formCollspased ? d(Bt, null, null) : d(Gt, null, null)
2074
- })), this.collapsedMode === "dialog" && r.push(d(I, {
2127
+ icon: () => this.formCollspased ? f(Ut, null, null) : f(Xt, null, null)
2128
+ })), this.collapsedMode === "dialog" && n.push(f(D, {
2075
2129
  onClick: this.openCollapsedDialog
2076
2130
  }, {
2077
2131
  default: () => "高级搜索",
2078
- icon: () => d(er, null, null)
2079
- }))), this.$slots.actions && r.push(...this.$slots.actions()), r.length)
2080
- return d(ce, t, {
2081
- default: () => [d(ve, {
2132
+ icon: () => f(nn, null, null)
2133
+ }))), this.$slots.actions && n.push(...this.$slots.actions()), n.length)
2134
+ return f(ce, t, {
2135
+ default: () => [f(ve, {
2082
2136
  contentClass: this.footer ? "form-footer" : ""
2083
2137
  }, {
2084
- default: () => [d(Me, null, Pe(r) ? r : {
2085
- default: () => [r]
2138
+ default: () => [f(Me, null, De(n) ? n : {
2139
+ default: () => [n]
2086
2140
  })]
2087
2141
  })]
2088
2142
  });
2089
2143
  };
2090
- return d("div", {
2144
+ return f("div", {
2091
2145
  class: "form-render"
2092
- }, [d(Ir, {
2093
- ref: (r) => this.modalInstance = r
2146
+ }, [f(Rn, {
2147
+ ref: (n) => this.modalInstance = n
2094
2148
  }, {
2095
- default: () => [d(Mt, ge({
2149
+ default: () => [f(Pt, ge({
2096
2150
  name: this.formName
2097
2151
  }, {
2098
2152
  labelAlign: "right",
@@ -2100,48 +2154,48 @@ const pe = /* @__PURE__ */ z({
2100
2154
  rules: this.formRules,
2101
2155
  onSubmitSuccess: this.onSubmitSuccess,
2102
2156
  "auto-label-width": !0,
2103
- ref: (r) => this.formInstance = r,
2157
+ ref: (n) => this.formInstance = n,
2104
2158
  model: this.formSource
2105
2159
  }), {
2106
- default: () => [d(Tt, {
2160
+ default: () => [f(jt, {
2107
2161
  cols: this.formColumns,
2108
2162
  "col-gap": 24,
2109
2163
  "rol-gap": 10
2110
2164
  }, {
2111
- default: () => [this.formItems.filter(() => this.formColumns !== 0).map((r) => {
2165
+ default: () => [this.formItems.filter(() => this.formColumns !== 0).map((n) => {
2112
2166
  let t;
2113
- return d(ce, {
2114
- span: r.span
2115
- }, Pe(t = je(this.formSource, r)) ? t : {
2167
+ return f(ce, {
2168
+ span: n.span
2169
+ }, De(t = Ie(this.formSource, n)) ? t : {
2116
2170
  default: () => [t]
2117
2171
  });
2118
- }), n(), e()]
2172
+ }), r(), e()]
2119
2173
  })]
2120
2174
  })]
2121
2175
  })]);
2122
2176
  }
2123
2177
  });
2124
- function fn(e) {
2178
+ function yr(e) {
2125
2179
  return e;
2126
2180
  }
2127
- function mn(e) {
2128
- const n = q(), r = _();
2181
+ function gr(e) {
2182
+ const r = q(), n = _();
2129
2183
  function t() {
2130
2184
  var u, l;
2131
- const a = (l = (u = n == null ? void 0 : n.proxy) == null ? void 0 : u.$refs) == null ? void 0 : l[e];
2132
- a && (r.value = a);
2185
+ const a = (l = (u = r == null ? void 0 : r.proxy) == null ? void 0 : u.$refs) == null ? void 0 : l[e];
2186
+ a && (n.value = a);
2133
2187
  }
2134
- return W(t), ht(t), r;
2188
+ return W(t), pt(t), n;
2135
2189
  }
2136
- const hn = {
2137
- install(e, n) {
2190
+ const br = {
2191
+ install(e, r) {
2138
2192
  e.component("FormRender", pe);
2139
2193
  }
2140
2194
  };
2141
2195
  export {
2142
2196
  pe as FormRender,
2143
- yn as FormRenderResolver,
2144
- hn as default,
2145
- fn as defineForm,
2146
- mn as useForm
2197
+ xr as FormRenderResolver,
2198
+ br as default,
2199
+ yr as defineForm,
2200
+ gr as useForm
2147
2201
  };