@xto/form 1.6.0 → 1.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/es/index.mjs +479 -469
  2. package/lib/index.cjs +1 -1
  3. package/package.json +10 -10
package/es/index.mjs CHANGED
@@ -219,7 +219,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
219
219
  width: t.value,
220
220
  height: t.value,
221
221
  color: a.color
222
- })), c = V(() => ({
222
+ })), v = V(() => ({
223
223
  strokeWidth: a.strokeWidth
224
224
  })), m = V(() => [
225
225
  e.b(),
@@ -229,7 +229,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
229
229
  iconSize: t,
230
230
  iconStyle: l,
231
231
  iconPath: b
232
- }), (T, z) => (i(), d("span", {
232
+ }), (T, S) => (i(), d("span", {
233
233
  class: u(m.value),
234
234
  style: te(l.value),
235
235
  "aria-hidden": !s.name,
@@ -244,7 +244,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
244
244
  "stroke-width": s.strokeWidth,
245
245
  "stroke-linecap": "round",
246
246
  "stroke-linejoin": "round",
247
- style: te(c.value),
247
+ style: te(v.value),
248
248
  "aria-hidden": "true"
249
249
  }, [
250
250
  r("path", { d: b.value }, null, 8, Qe)
@@ -274,9 +274,9 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
274
274
  },
275
275
  emits: ["update:modelValue", "update:value", "input", "change", "focus", "blur", "clear"],
276
276
  setup(s, { expose: k, emit: a }) {
277
- const e = s, t = a, l = ae("input"), c = R(), m = R(!1), b = R(!1), T = Le(), z = V(
277
+ const e = s, t = a, l = ae("input"), v = R(), m = R(!1), b = R(!1), T = Le(), S = V(
278
278
  () => e.type === "password" && e.showPassword && !e.disabled
279
- ), D = V(() => z.value ? b.value ? "text" : "password" : e.type);
279
+ ), D = V(() => S.value ? b.value ? "text" : "password" : e.type);
280
280
  V(() => e.modelValue !== void 0), V(() => e.value !== void 0);
281
281
  const $ = R("");
282
282
  ie(
@@ -287,7 +287,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
287
287
  },
288
288
  { immediate: !0 }
289
289
  );
290
- const S = (B) => {
290
+ const z = (B) => {
291
291
  $.value = B, t("update:modelValue", B), t("update:value", B), t("input", B);
292
292
  }, I = V(() => String($.value).length), y = V(() => [
293
293
  l.b(),
@@ -295,7 +295,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
295
295
  l.is("disabled", e.disabled),
296
296
  l.is("focus", m.value),
297
297
  l.is("has-prefix", e.prefixIcon || T.prefix),
298
- l.is("has-suffix", e.suffixIcon || T.suffix || e.clearable || z.value || e.showWordLimit)
298
+ l.is("has-suffix", e.suffixIcon || T.suffix || e.clearable || S.value || e.showWordLimit)
299
299
  ]), L = (B) => {
300
300
  const F = B.target.value;
301
301
  t("change", F);
@@ -311,13 +311,13 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
311
311
  return k({
312
312
  focus: () => {
313
313
  var B;
314
- (B = c.value) == null || B.focus();
314
+ (B = v.value) == null || B.focus();
315
315
  },
316
316
  blur: () => {
317
317
  var B;
318
- (B = c.value) == null || B.blur();
318
+ (B = v.value) == null || B.blur();
319
319
  },
320
- inputRef: c
320
+ inputRef: v
321
321
  }), (B, F) => (i(), d("div", {
322
322
  class: u(y.value)
323
323
  }, [
@@ -333,7 +333,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
333
333
  ], 2)) : N("", !0),
334
334
  oe(r("input", {
335
335
  ref_key: "inputRef",
336
- ref: c,
336
+ ref: v,
337
337
  "onUpdate:modelValue": F[0] || (F[0] = (O) => $.value = O),
338
338
  type: D.value,
339
339
  placeholder: s.placeholder,
@@ -342,14 +342,14 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
342
342
  maxlength: s.maxlength,
343
343
  minlength: s.minlength,
344
344
  class: u(n(l).e("inner")),
345
- onInput: F[1] || (F[1] = (O) => S(O.target.value)),
345
+ onInput: F[1] || (F[1] = (O) => z(O.target.value)),
346
346
  onChange: L,
347
347
  onFocus: H,
348
348
  onBlur: P
349
349
  }, null, 42, _e), [
350
350
  [Ke, $.value]
351
351
  ]),
352
- B.$slots.suffix || s.suffixIcon || s.clearable || z.value || s.showWordLimit ? (i(), d("span", {
352
+ B.$slots.suffix || s.suffixIcon || s.clearable || S.value || s.showWordLimit ? (i(), d("span", {
353
353
  key: 1,
354
354
  class: u(n(l).e("suffix"))
355
355
  }, [
@@ -364,7 +364,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
364
364
  size: 14
365
365
  })
366
366
  ], 2)) : N("", !0),
367
- z.value ? (i(), d("span", {
367
+ S.value ? (i(), d("span", {
368
368
  key: 1,
369
369
  class: u([n(l).e("icon"), n(l).e("password")]),
370
370
  onClick: h
@@ -402,7 +402,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
402
402
  },
403
403
  emits: ["update:modelValue", "update:value", "change", "focus", "blur"],
404
404
  setup(s, { expose: k, emit: a }) {
405
- const e = s, t = a, l = ae("input-number"), c = R(), m = R(!1), b = R(null), T = R(e.modelValue), z = V(() => {
405
+ const e = s, t = a, l = ae("input-number"), v = R(), m = R(!1), b = R(null), T = R(e.modelValue), S = V(() => {
406
406
  if (e.precision !== void 0)
407
407
  return e.precision;
408
408
  const o = D(e.step), f = e.modelValue !== void 0 && e.modelValue !== null ? D(e.modelValue) : 0;
@@ -413,12 +413,12 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
413
413
  const f = o.toString(), g = f.indexOf(".");
414
414
  return g === -1 ? 0 : f.length - g - 1;
415
415
  }
416
- function $(o, f = z.value) {
416
+ function $(o, f = S.value) {
417
417
  if (f === 0) return Math.round(o);
418
418
  let g = o.toFixed(f);
419
419
  return Number(g);
420
420
  }
421
- function S(o) {
421
+ function z(o) {
422
422
  return o > e.max ? e.max : o < e.min ? e.min : o;
423
423
  }
424
424
  const I = V(() => e.modelValue ?? e.value ?? void 0), y = V(() => b.value !== null ? b.value : I.value === void 0 || I.value === null ? "" : $(I.value)), L = V(() => e.disabled ? !0 : I.value === void 0 ? e.min !== -1 / 0 : I.value <= e.min), H = V(() => e.disabled ? !0 : I.value === void 0 ? e.max !== 1 / 0 : I.value >= e.max), P = V(() => [
@@ -430,20 +430,20 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
430
430
  ]);
431
431
  function M() {
432
432
  if (e.disabled || H.value) return;
433
- const o = I.value ?? (e.min === -1 / 0 ? 0 : e.min), f = $(o + e.step), g = S(f);
434
- v(g);
433
+ const o = I.value ?? (e.min === -1 / 0 ? 0 : e.min), f = $(o + e.step), g = z(f);
434
+ c(g);
435
435
  }
436
436
  function h() {
437
437
  if (e.disabled || L.value) return;
438
- const o = I.value ?? (e.min === -1 / 0 ? 0 : e.min), f = $(o - e.step), g = S(f);
439
- v(g);
438
+ const o = I.value ?? (e.min === -1 / 0 ? 0 : e.min), f = $(o - e.step), g = z(f);
439
+ c(g);
440
440
  }
441
- function v(o) {
441
+ function c(o) {
442
442
  const f = T.value;
443
443
  if (o === void 0)
444
444
  e.modelValue !== void 0 && t("update:modelValue", void 0), e.value !== void 0 && t("update:value", void 0), e.modelValue === void 0 && e.value === void 0 && t("update:modelValue", void 0), t("change", void 0, f);
445
445
  else {
446
- const g = $(o), X = S(g);
446
+ const g = $(o), X = z(g);
447
447
  if (e.stepStrictly) {
448
448
  const ne = Math.round((X - e.min) / e.step), K = $(e.min + ne * e.step);
449
449
  e.modelValue !== void 0 && t("update:modelValue", K), e.value !== void 0 && t("update:value", K), e.modelValue === void 0 && e.value === void 0 && t("update:modelValue", K), t("change", K, f);
@@ -469,7 +469,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
469
469
  function F(o) {
470
470
  if (m.value = !1, b.value !== null) {
471
471
  const f = x(b.value);
472
- f === void 0 ? e.valueOnClear !== null ? v(e.valueOnClear) : b.value = null : v(f);
472
+ f === void 0 ? e.valueOnClear !== null ? c(e.valueOnClear) : b.value = null : c(f);
473
473
  }
474
474
  t("blur", o);
475
475
  }
@@ -487,20 +487,20 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
487
487
  o.preventDefault(), h();
488
488
  break;
489
489
  case "Enter":
490
- (f = c.value) == null || f.blur();
490
+ (f = v.value) == null || f.blur();
491
491
  break;
492
492
  }
493
493
  }
494
494
  function p() {
495
- b.value = null, e.valueOnClear !== null && e.valueOnClear !== void 0 ? v(e.valueOnClear) : (e.modelValue !== void 0 && t("update:modelValue", void 0), e.value !== void 0 && t("update:value", void 0), e.modelValue === void 0 && e.value === void 0 && t("update:modelValue", void 0), t("change", void 0, T.value), T.value = void 0);
495
+ b.value = null, e.valueOnClear !== null && e.valueOnClear !== void 0 ? c(e.valueOnClear) : (e.modelValue !== void 0 && t("update:modelValue", void 0), e.value !== void 0 && t("update:value", void 0), e.modelValue === void 0 && e.value === void 0 && t("update:modelValue", void 0), t("change", void 0, T.value), T.value = void 0);
496
496
  }
497
497
  function w() {
498
498
  var o;
499
- (o = c.value) == null || o.focus();
499
+ (o = v.value) == null || o.focus();
500
500
  }
501
501
  function C() {
502
502
  var o;
503
- (o = c.value) == null || o.blur();
503
+ (o = v.value) == null || o.blur();
504
504
  }
505
505
  return ie([() => e.modelValue, () => e.value], ([o, f]) => {
506
506
  T.value = o ?? f, b.value = null;
@@ -525,7 +525,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
525
525
  }, [
526
526
  r("input", {
527
527
  ref_key: "inputRef",
528
- ref: c,
528
+ ref: v,
529
529
  value: y.value,
530
530
  placeholder: s.placeholder,
531
531
  disabled: s.disabled,
@@ -565,32 +565,32 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
565
565
  },
566
566
  emits: ["update:modelValue", "update:value", "input", "change", "focus", "blur"],
567
567
  setup(s, { expose: k, emit: a }) {
568
- const e = s, t = a, l = ae("textarea"), c = R(), m = R(!1), b = R("");
568
+ const e = s, t = a, l = ae("textarea"), v = R(), m = R(!1), b = R("");
569
569
  ie(
570
570
  [() => e.modelValue, () => e.value],
571
571
  ([M, h]) => {
572
- const v = M ?? h ?? "";
573
- v !== b.value && (b.value = v);
572
+ const c = M ?? h ?? "";
573
+ c !== b.value && (b.value = c);
574
574
  },
575
575
  { immediate: !0 }
576
576
  );
577
577
  const T = (M) => {
578
578
  b.value = M, t("update:modelValue", M), t("update:value", M), t("input", M);
579
- }, z = V(() => String(b.value).length), D = V(() => {
579
+ }, S = V(() => String(b.value).length), D = V(() => {
580
580
  const M = {};
581
581
  if (e.resize && (M.resize = e.resize), e.autosize && (M.minHeight = "auto", typeof e.autosize == "object")) {
582
- const h = e.autosize.minRows || 1, v = e.autosize.maxRows;
583
- M.minHeight = `${h * 22 + 12}px`, v && (M.maxHeight = `${v * 22 + 12}px`);
582
+ const h = e.autosize.minRows || 1, c = e.autosize.maxRows;
583
+ M.minHeight = `${h * 22 + 12}px`, c && (M.maxHeight = `${c * 22 + 12}px`);
584
584
  }
585
585
  return M;
586
586
  }), $ = V(() => [
587
587
  l.b(),
588
588
  l.is("disabled", e.disabled),
589
589
  l.is("focus", m.value),
590
- l.is("exceed", e.maxlength && z.value > e.maxlength)
591
- ]), S = (M) => {
590
+ l.is("exceed", e.maxlength && S.value > e.maxlength)
591
+ ]), z = (M) => {
592
592
  const h = M.target.value;
593
- T(h), e.autosize && c.value && (c.value.style.height = "auto", c.value.style.height = `${c.value.scrollHeight}px`);
593
+ T(h), e.autosize && v.value && (v.value.style.height = "auto", v.value.style.height = `${v.value.scrollHeight}px`);
594
594
  }, I = (M) => {
595
595
  const h = M.target.value;
596
596
  t("change", h);
@@ -602,21 +602,21 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
602
602
  return k({
603
603
  focus: () => {
604
604
  var M;
605
- (M = c.value) == null || M.focus();
605
+ (M = v.value) == null || M.focus();
606
606
  },
607
607
  blur: () => {
608
608
  var M;
609
- (M = c.value) == null || M.blur();
609
+ (M = v.value) == null || M.blur();
610
610
  },
611
- textareaRef: c
611
+ textareaRef: v
612
612
  }), (M, h) => (i(), d("div", {
613
613
  class: u($.value),
614
614
  style: te(s.disabled ? void 0 : { cursor: "text" })
615
615
  }, [
616
616
  oe(r("textarea", {
617
617
  ref_key: "textareaRef",
618
- ref: c,
619
- "onUpdate:modelValue": h[0] || (h[0] = (v) => b.value = v),
618
+ ref: v,
619
+ "onUpdate:modelValue": h[0] || (h[0] = (c) => b.value = c),
620
620
  placeholder: s.placeholder,
621
621
  disabled: s.disabled,
622
622
  readonly: s.readonly,
@@ -625,7 +625,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
625
625
  rows: s.rows,
626
626
  style: te(D.value),
627
627
  class: u(n(l).e("inner")),
628
- onInput: S,
628
+ onInput: z,
629
629
  onChange: I,
630
630
  onFocus: y,
631
631
  onBlur: L
@@ -635,7 +635,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
635
635
  s.showWordLimit && s.maxlength ? (i(), d("span", {
636
636
  key: 0,
637
637
  class: u(n(l).e("count"))
638
- }, U(z.value) + "/" + U(s.maxlength), 3)) : N("", !0)
638
+ }, U(S.value) + "/" + U(s.maxlength), 3)) : N("", !0)
639
639
  ], 6));
640
640
  }
641
641
  }), Za = /* @__PURE__ */ le({
@@ -653,20 +653,20 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
653
653
  },
654
654
  emits: ["update:modelValue", "update:checked", "change"],
655
655
  setup(s, { emit: k }) {
656
- const a = s, e = k, t = ae("switch"), l = V(() => a.modelValue !== void 0 ? a.modelValue : a.checked !== void 0 ? a.checked : !1), c = V(() => l.value === a.activeValue), m = V(() => [
656
+ const a = s, e = k, t = ae("switch"), l = V(() => a.modelValue !== void 0 ? a.modelValue : a.checked !== void 0 ? a.checked : !1), v = V(() => l.value === a.activeValue), m = V(() => [
657
657
  t.b(),
658
658
  t.is("disabled", a.disabled),
659
- t.is("checked", c.value)
659
+ t.is("checked", v.value)
660
660
  ]), b = V(() => ({
661
661
  width: typeof a.width == "number" ? `${a.width}px` : a.width,
662
662
  height: "20px",
663
- backgroundColor: c.value ? a.activeColor : a.inactiveColor
663
+ backgroundColor: v.value ? a.activeColor : a.inactiveColor
664
664
  })), T = () => {
665
665
  if (a.disabled) return;
666
- const z = c.value ? a.inactiveValue : a.activeValue;
667
- a.modelValue !== void 0 && e("update:modelValue", z), a.checked !== void 0 && e("update:checked", z), a.modelValue === void 0 && a.checked === void 0 && e("update:modelValue", z), e("change", z);
666
+ const S = v.value ? a.inactiveValue : a.activeValue;
667
+ a.modelValue !== void 0 && e("update:modelValue", S), a.checked !== void 0 && e("update:checked", S), a.modelValue === void 0 && a.checked === void 0 && e("update:modelValue", S), e("change", S);
668
668
  };
669
- return (z, D) => (i(), d("span", {
669
+ return (S, D) => (i(), d("span", {
670
670
  class: u(m.value),
671
671
  onClick: T
672
672
  }, [
@@ -674,11 +674,11 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
674
674
  class: u(n(t).e("core")),
675
675
  style: te(b.value)
676
676
  }, null, 6),
677
- z.$slots.default ? (i(), d("span", {
677
+ S.$slots.default ? (i(), d("span", {
678
678
  key: 0,
679
679
  class: u(n(t).e("text"))
680
680
  }, [
681
- se(z.$slots, "default")
681
+ se(S.$slots, "default")
682
682
  ], 2)) : N("", !0)
683
683
  ], 2));
684
684
  }
@@ -694,16 +694,16 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
694
694
  },
695
695
  emits: ["update:modelValue", "change"],
696
696
  setup(s, { emit: k }) {
697
- const a = s, e = k, t = ae("radio"), l = Ve("radioGroup", null), c = V(() => !!l), m = V(() => c.value ? l.modelValue.value : a.modelValue), b = V(() => a.value ?? a.label), T = V(() => m.value === b.value), z = V(() => a.disabled || c.value && l.disabled), D = V(() => a.name || (c.value ? l.name : void 0)), $ = V(() => [
697
+ const a = s, e = k, t = ae("radio"), l = Ve("radioGroup", null), v = V(() => !!l), m = V(() => v.value ? l.modelValue.value : a.modelValue), b = V(() => a.value ?? a.label), T = V(() => m.value === b.value), S = V(() => a.disabled || v.value && l.disabled), D = V(() => a.name || (v.value ? l.name : void 0)), $ = V(() => [
698
698
  t.b(),
699
699
  t.is("checked", T.value),
700
- t.is("disabled", z.value)
701
- ]), S = () => {
702
- z.value || (c.value ? l.changeValue(b.value) : (e("update:modelValue", b.value), e("change", b.value)));
700
+ t.is("disabled", S.value)
701
+ ]), z = () => {
702
+ S.value || (v.value ? l.changeValue(b.value) : (e("update:modelValue", b.value), e("change", b.value)));
703
703
  };
704
704
  return (I, y) => (i(), d("label", {
705
705
  class: u($.value),
706
- onClick: ue(S, ["prevent"])
706
+ onClick: ue(z, ["prevent"])
707
707
  }, [
708
708
  r("span", {
709
709
  class: u(n(t).e("input"))
@@ -711,7 +711,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
711
711
  r("input", {
712
712
  type: "radio",
713
713
  checked: T.value,
714
- disabled: z.value,
714
+ disabled: S.value,
715
715
  name: D.value,
716
716
  value: b.value
717
717
  }, null, 8, nl)
@@ -737,19 +737,19 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
737
737
  },
738
738
  emits: ["update:modelValue", "update:value", "change"],
739
739
  setup(s, { emit: k }) {
740
- const a = s, e = k, t = ae("radio-group"), l = (c) => {
741
- a.modelValue !== void 0 && e("update:modelValue", c), a.value !== void 0 && e("update:value", c), a.modelValue === void 0 && a.value === void 0 && e("update:modelValue", c), e("change", c);
740
+ const a = s, e = k, t = ae("radio-group"), l = (v) => {
741
+ a.modelValue !== void 0 && e("update:modelValue", v), a.value !== void 0 && e("update:value", v), a.modelValue === void 0 && a.value === void 0 && e("update:modelValue", v), e("change", v);
742
742
  };
743
743
  return Ce("radioGroup", {
744
744
  modelValue: V(() => a.modelValue ?? a.value),
745
745
  name: a.name || `radio-group-${Date.now()}`,
746
746
  disabled: a.disabled,
747
747
  changeValue: l
748
- }), (c, m) => (i(), d("div", {
748
+ }), (v, m) => (i(), d("div", {
749
749
  class: u(n(t).b()),
750
750
  role: "radiogroup"
751
751
  }, [
752
- se(c.$slots, "default")
752
+ se(v.$slots, "default")
753
753
  ], 2));
754
754
  }
755
755
  }), sl = ["checked", "disabled", "value"], et = /* @__PURE__ */ le({
@@ -763,15 +763,15 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
763
763
  },
764
764
  emits: ["update:modelValue", "change"],
765
765
  setup(s, { emit: k }) {
766
- const a = s, e = ae("radio-button"), t = Ve("radioGroup", null), l = V(() => !!t), c = V(() => l.value ? t.modelValue.value : null), m = V(() => a.value ?? a.label), b = V(() => c.value === m.value), T = V(() => a.disabled || l.value && t.disabled), z = V(() => [
766
+ const a = s, e = ae("radio-button"), t = Ve("radioGroup", null), l = V(() => !!t), v = V(() => l.value ? t.modelValue.value : null), m = V(() => a.value ?? a.label), b = V(() => v.value === m.value), T = V(() => a.disabled || l.value && t.disabled), S = V(() => [
767
767
  e.b(),
768
768
  e.is("active", b.value),
769
769
  e.is("disabled", T.value)
770
770
  ]), D = () => {
771
771
  T.value || l.value && t.changeValue(m.value);
772
772
  };
773
- return ($, S) => (i(), d("label", {
774
- class: u(z.value),
773
+ return ($, z) => (i(), d("label", {
774
+ class: u(S.value),
775
775
  onClick: ue(D, ["prevent"])
776
776
  }, [
777
777
  r("input", {
@@ -803,34 +803,34 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
803
803
  },
804
804
  emits: ["update:modelValue", "change"],
805
805
  setup(s, { emit: k }) {
806
- const a = s, e = k, t = ae("checkbox"), l = Ve("checkboxGroup", null), c = V(() => !!l), m = V(() => a.value ?? a.label), b = V(() => c.value ? l.modelValue.value.includes(m.value) : Array.isArray(a.modelValue) ? a.modelValue.includes(m.value) : !!a.modelValue), T = V(() => {
806
+ const a = s, e = k, t = ae("checkbox"), l = Ve("checkboxGroup", null), v = V(() => !!l), m = V(() => a.value ?? a.label), b = V(() => v.value ? l.modelValue.value.includes(m.value) : Array.isArray(a.modelValue) ? a.modelValue.includes(m.value) : !!a.modelValue), T = V(() => {
807
807
  if (a.disabled) return !0;
808
- if (c.value) {
809
- const $ = l.disabled, S = l.min > 0 && l.modelValue.value.length <= l.min, I = l.max > 0 && l.modelValue.value.length >= l.max;
810
- return b.value && S || !b.value && I ? !0 : $;
808
+ if (v.value) {
809
+ const $ = l.disabled, z = l.min > 0 && l.modelValue.value.length <= l.min, I = l.max > 0 && l.modelValue.value.length >= l.max;
810
+ return b.value && z || !b.value && I ? !0 : $;
811
811
  }
812
812
  return !1;
813
- }), z = V(() => [
813
+ }), S = V(() => [
814
814
  t.b(),
815
815
  t.is("checked", b.value),
816
816
  t.is("disabled", T.value),
817
817
  t.is("indeterminate", a.indeterminate && !b.value)
818
818
  ]), D = () => {
819
819
  if (!T.value)
820
- if (c.value)
820
+ if (v.value)
821
821
  l.changeValue(m.value);
822
822
  else {
823
823
  let $;
824
824
  if (Array.isArray(a.modelValue)) {
825
- const S = a.modelValue.indexOf(m.value);
826
- S > -1 ? $ = [...a.modelValue.slice(0, S), ...a.modelValue.slice(S + 1)] : $ = [...a.modelValue, m.value];
825
+ const z = a.modelValue.indexOf(m.value);
826
+ z > -1 ? $ = [...a.modelValue.slice(0, z), ...a.modelValue.slice(z + 1)] : $ = [...a.modelValue, m.value];
827
827
  } else
828
828
  $ = !a.modelValue;
829
829
  e("update:modelValue", $), e("change", $);
830
830
  }
831
831
  };
832
- return ($, S) => (i(), d("label", {
833
- class: u(z.value),
832
+ return ($, z) => (i(), d("label", {
833
+ class: u(S.value),
834
834
  onClick: ue(D, ["prevent"])
835
835
  }, [
836
836
  r("span", {
@@ -865,9 +865,9 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
865
865
  },
866
866
  emits: ["update:modelValue", "change"],
867
867
  setup(s, { emit: k }) {
868
- const a = s, e = k, t = ae("checkbox-group"), l = (c) => {
869
- const m = [...a.modelValue], b = m.indexOf(c);
870
- b > -1 ? m.splice(b, 1) : m.push(c), e("update:modelValue", m), e("change", m);
868
+ const a = s, e = k, t = ae("checkbox-group"), l = (v) => {
869
+ const m = [...a.modelValue], b = m.indexOf(v);
870
+ b > -1 ? m.splice(b, 1) : m.push(v), e("update:modelValue", m), e("change", m);
871
871
  };
872
872
  return Ce("checkboxGroup", {
873
873
  modelValue: V(() => a.modelValue),
@@ -875,11 +875,11 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
875
875
  min: a.min,
876
876
  max: a.max,
877
877
  changeValue: l
878
- }), (c, m) => (i(), d("div", {
878
+ }), (v, m) => (i(), d("div", {
879
879
  class: u(n(t).b()),
880
880
  role: "group"
881
881
  }, [
882
- se(c.$slots, "default")
882
+ se(v.$slots, "default")
883
883
  ], 2));
884
884
  }
885
885
  }), tt = /* @__PURE__ */ le({
@@ -897,40 +897,40 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
897
897
  },
898
898
  emits: ["validate", "submit", "reset"],
899
899
  setup(s, { expose: k, emit: a }) {
900
- const e = s, t = a, l = ae("form"), c = R([]), m = V(() => e.layout === "inline" || e.inline), b = V(() => e.layout === "vertical" || e.labelPosition === "top"), T = V(() => [
900
+ const e = s, t = a, l = ae("form"), v = R([]), m = V(() => e.layout === "inline" || e.inline), b = V(() => e.layout === "vertical" || e.labelPosition === "top"), T = V(() => [
901
901
  l.b(),
902
902
  l.m(`label-${b.value ? "top" : e.labelPosition}`),
903
903
  l.is("inline", m.value),
904
904
  l.is("vertical", b.value)
905
- ]), z = V(() => ({ width: typeof e.labelWidth == "number" ? `${e.labelWidth}px` : e.labelWidth })), D = (h) => {
906
- c.value.push(h);
905
+ ]), S = V(() => ({ width: typeof e.labelWidth == "number" ? `${e.labelWidth}px` : e.labelWidth })), D = (h) => {
906
+ v.value.push(h);
907
907
  }, $ = (h) => {
908
- const v = c.value.indexOf(h);
909
- v > -1 && c.value.splice(v, 1);
910
- }, S = async () => {
908
+ const c = v.value.indexOf(h);
909
+ c > -1 && v.value.splice(c, 1);
910
+ }, z = async () => {
911
911
  let h = !0;
912
- for (const v of c.value)
913
- await v.validate() || (h = !1);
912
+ for (const c of v.value)
913
+ await c.validate() || (h = !1);
914
914
  return h;
915
915
  }, I = async (h) => {
916
- const v = Array.isArray(h) ? h : [h];
916
+ const c = Array.isArray(h) ? h : [h];
917
917
  let x = !0;
918
- for (const B of c.value)
919
- v.includes(B.prop) && (await B.validate() || (x = !1));
918
+ for (const B of v.value)
919
+ c.includes(B.prop) && (await B.validate() || (x = !1));
920
920
  return x;
921
921
  }, y = () => {
922
- c.value.forEach((h) => {
922
+ v.value.forEach((h) => {
923
923
  h.resetField();
924
924
  });
925
925
  }, L = (h) => {
926
926
  if (h) {
927
- const v = Array.isArray(h) ? h : [h];
928
- c.value.forEach((x) => {
929
- v.includes(x.prop) && x.clearValidate();
927
+ const c = Array.isArray(h) ? h : [h];
928
+ v.value.forEach((x) => {
929
+ c.includes(x.prop) && x.clearValidate();
930
930
  });
931
931
  } else
932
- c.value.forEach((v) => {
933
- v.clearValidate();
932
+ v.value.forEach((c) => {
933
+ c.clearValidate();
934
934
  });
935
935
  }, H = (h) => {
936
936
  console.log("[XForm] handleSubmit triggered", h), h.preventDefault(), t("submit");
@@ -944,16 +944,16 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
944
944
  labelPosition: b.value ? "top" : e.labelPosition,
945
945
  disabled: e.disabled,
946
946
  size: e.size,
947
- labelStyle: z,
947
+ labelStyle: S,
948
948
  addField: D,
949
949
  removeField: $,
950
950
  emit: t
951
951
  }), k({
952
- validate: S,
952
+ validate: z,
953
953
  validateField: I,
954
954
  resetFields: y,
955
955
  clearValidate: L
956
- }), (h, v) => (i(), d("form", {
956
+ }), (h, c) => (i(), d("form", {
957
957
  class: u(T.value),
958
958
  onSubmit: H,
959
959
  onReset: P
@@ -973,10 +973,10 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
973
973
  showMessage: { type: Boolean }
974
974
  },
975
975
  setup(s, { expose: k }) {
976
- const a = s, e = Le(), t = ae("form-item"), l = Ve("form", null), c = R(""), m = R(""), b = V(() => a.required ? !0 : T().some((P) => P.required)), T = () => {
976
+ const a = s, e = Le(), t = ae("form-item"), l = Ve("form", null), v = R(""), m = R(""), b = V(() => a.required ? !0 : T().some((P) => P.required)), T = () => {
977
977
  const H = [];
978
978
  return a.rules && H.push(...a.rules), l && a.prop && l.rules[a.prop] && H.push(...l.rules[a.prop]), H;
979
- }, z = () => {
979
+ }, S = () => {
980
980
  var H;
981
981
  if (!(!l || !a.prop))
982
982
  return (H = l.model.value) == null ? void 0 : H[a.prop];
@@ -985,28 +985,28 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
985
985
  }, $ = async (H) => {
986
986
  const P = T();
987
987
  if (P.length === 0)
988
- return c.value = "valid", !0;
989
- const M = z();
990
- let h = !0, v = "";
988
+ return v.value = "valid", !0;
989
+ const M = S();
990
+ let h = !0, c = "";
991
991
  for (const x of P)
992
992
  if (!(H && x.trigger && x.trigger !== H)) {
993
993
  if (x.required && (M == null || M === "" || Array.isArray(M) && M.length === 0)) {
994
- h = !1, v = x.message || "该字段为必填项";
994
+ h = !1, c = x.message || "该字段为必填项";
995
995
  break;
996
996
  }
997
997
  if (x.min !== void 0 || x.max !== void 0) {
998
998
  const B = typeof M == "string" ? M.length : 0;
999
999
  if (x.min !== void 0 && B < x.min) {
1000
- h = !1, v = x.message || `长度不能小于 ${x.min} 个字符`;
1000
+ h = !1, c = x.message || `长度不能小于 ${x.min} 个字符`;
1001
1001
  break;
1002
1002
  }
1003
1003
  if (x.max !== void 0 && B > x.max) {
1004
- h = !1, v = x.message || `长度不能大于 ${x.max} 个字符`;
1004
+ h = !1, c = x.message || `长度不能大于 ${x.max} 个字符`;
1005
1005
  break;
1006
1006
  }
1007
1007
  }
1008
1008
  if (x.pattern && M && !x.pattern.test(M)) {
1009
- h = !1, v = x.message || "格式不正确";
1009
+ h = !1, c = x.message || "格式不正确";
1010
1010
  break;
1011
1011
  }
1012
1012
  if (x.validator)
@@ -1017,43 +1017,43 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
1017
1017
  });
1018
1018
  });
1019
1019
  } catch (B) {
1020
- h = !1, v = B.message || x.message || "验证失败";
1020
+ h = !1, c = B.message || x.message || "验证失败";
1021
1021
  break;
1022
1022
  }
1023
1023
  }
1024
- return c.value = h ? "valid" : "invalid", m.value = v, l && a.prop && l.emit("validate", a.prop, h, v), h;
1025
- }, S = () => {
1024
+ return v.value = h ? "valid" : "invalid", m.value = c, l && a.prop && l.emit("validate", a.prop, h, c), h;
1025
+ }, z = () => {
1026
1026
  D(void 0), I();
1027
1027
  }, I = () => {
1028
- c.value = "", m.value = "";
1028
+ v.value = "", m.value = "";
1029
1029
  }, y = V(() => [
1030
1030
  t.b(),
1031
1031
  t.is("required", b.value),
1032
- t.is("error", c.value === "invalid"),
1033
- t.is("success", c.value === "valid")
1032
+ t.is("error", v.value === "invalid"),
1033
+ t.is("success", v.value === "valid")
1034
1034
  ]), L = V(() => {
1035
1035
  const H = a.labelWidth ?? (l == null ? void 0 : l.labelWidth) ?? "100px";
1036
1036
  return { width: typeof H == "number" ? `${H}px` : H };
1037
1037
  });
1038
- return ie(() => z(), () => {
1039
- c.value === "invalid" && $("change");
1038
+ return ie(() => S(), () => {
1039
+ v.value === "invalid" && $("change");
1040
1040
  }), pe(() => {
1041
1041
  l && a.prop && l.addField({
1042
1042
  prop: a.prop,
1043
1043
  validate: $,
1044
- resetField: S,
1044
+ resetField: z,
1045
1045
  clearValidate: I
1046
1046
  });
1047
1047
  }), $e(() => {
1048
1048
  l && a.prop && l.removeField({
1049
1049
  prop: a.prop,
1050
1050
  validate: $,
1051
- resetField: S,
1051
+ resetField: z,
1052
1052
  clearValidate: I
1053
1053
  });
1054
1054
  }), k({
1055
1055
  validate: $,
1056
- resetField: S,
1056
+ resetField: z,
1057
1057
  clearValidate: I
1058
1058
  }), (H, P) => (i(), d("div", {
1059
1059
  class: u(y.value)
@@ -1071,7 +1071,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
1071
1071
  class: u(n(t).e("content"))
1072
1072
  }, [
1073
1073
  se(H.$slots, "default"),
1074
- s.showMessage !== !1 && c.value === "invalid" ? (i(), d("div", {
1074
+ s.showMessage !== !1 && v.value === "invalid" ? (i(), d("div", {
1075
1075
  key: 0,
1076
1076
  class: u(n(t).e("error"))
1077
1077
  }, U(m.value), 3)) : N("", !0)
@@ -1098,18 +1098,18 @@ function Ye(s, k, a) {
1098
1098
  }
1099
1099
  function dl(s, k, a = 0) {
1100
1100
  const e = [], t = ol(s, k), l = il(s, k);
1101
- let c = new Date(s, k, 1);
1101
+ let v = new Date(s, k, 1);
1102
1102
  const m = (l - a + 7) % 7;
1103
- c.setDate(1 - m);
1104
- let b = [], T = new Date(c);
1103
+ v.setDate(1 - m);
1104
+ let b = [], T = new Date(v);
1105
1105
  for (; (T.getMonth() <= k || T.getMonth() === k && T.getDate() <= t) && (b.push(new Date(T)), !(b.length === 7 && (e.push(b), b = [], T.getMonth() > k) || (T.setDate(T.getDate() + 1), e.length > 7))); )
1106
1106
  ;
1107
1107
  return b.length > 0 && e.push(b), e;
1108
1108
  }
1109
1109
  function ce(s, k = "YYYY-MM-DD") {
1110
1110
  if (!s) return "";
1111
- const a = s.getFullYear(), e = s.getMonth() + 1, t = s.getDate(), l = s.getHours(), c = s.getMinutes(), m = s.getSeconds();
1112
- return k.replace(/YYYY/g, String(a)).replace(/YY/g, String(a).slice(-2)).replace(/MM/g, String(e).padStart(2, "0")).replace(/M/g, String(e)).replace(/DD/g, String(t).padStart(2, "0")).replace(/D/g, String(t)).replace(/HH/g, String(l).padStart(2, "0")).replace(/H/g, String(l)).replace(/mm/g, String(c).padStart(2, "0")).replace(/m/g, String(c)).replace(/ss/g, String(m).padStart(2, "0")).replace(/s/g, String(m));
1111
+ const a = s.getFullYear(), e = s.getMonth() + 1, t = s.getDate(), l = s.getHours(), v = s.getMinutes(), m = s.getSeconds();
1112
+ return k.replace(/YYYY/g, String(a)).replace(/YY/g, String(a).slice(-2)).replace(/MM/g, String(e).padStart(2, "0")).replace(/M/g, String(e)).replace(/DD/g, String(t).padStart(2, "0")).replace(/D/g, String(t)).replace(/HH/g, String(l).padStart(2, "0")).replace(/H/g, String(l)).replace(/mm/g, String(v).padStart(2, "0")).replace(/m/g, String(v)).replace(/ss/g, String(m).padStart(2, "0")).replace(/s/g, String(m));
1113
1113
  }
1114
1114
  function ve(s) {
1115
1115
  if (!s || Array.isArray(s)) return null;
@@ -1186,37 +1186,37 @@ const pl = [
1186
1186
  },
1187
1187
  emits: ["pick", "range-select", "range-move", "update:viewedMonth"],
1188
1188
  setup(s, { emit: k }) {
1189
- const a = s, e = k, t = ae("date-table"), l = R(null), c = V(() => a.viewedMonth.getFullYear()), m = V(() => a.viewedMonth.getMonth()), b = V(() => dl(c.value, m.value, 0)), T = (h) => a.modelValue ? he(h, a.modelValue) : !1, z = (h) => he(h, /* @__PURE__ */ new Date()), D = (h) => rl(h, a.viewedMonth), $ = (h) => {
1189
+ const a = s, e = k, t = ae("date-table"), l = R(null), v = V(() => a.viewedMonth.getFullYear()), m = V(() => a.viewedMonth.getMonth()), b = V(() => dl(v.value, m.value, 0)), T = (h) => a.modelValue ? he(h, a.modelValue) : !1, S = (h) => he(h, /* @__PURE__ */ new Date()), D = (h) => rl(h, a.viewedMonth), $ = (h) => {
1190
1190
  if (a.selectionMode !== "range") return !1;
1191
- const { startDate: v, endDate: x, selecting: B } = a.rangeState || {};
1192
- if (B && v) {
1191
+ const { startDate: c, endDate: x, selecting: B } = a.rangeState || {};
1192
+ if (B && c) {
1193
1193
  const F = l.value;
1194
1194
  if (F) {
1195
- const O = v < F ? v : F, j = v < F ? F : v;
1195
+ const O = c < F ? c : F, j = c < F ? F : c;
1196
1196
  return Ye(h, O, j);
1197
1197
  }
1198
- return he(h, v);
1198
+ return he(h, c);
1199
1199
  }
1200
- return v && x ? Ye(h, v, x) : !1;
1201
- }, S = (h) => {
1200
+ return c && x ? Ye(h, c, x) : !1;
1201
+ }, z = (h) => {
1202
1202
  if (a.selectionMode !== "range") return !1;
1203
- const { startDate: v, selecting: x } = a.rangeState || {};
1204
- return x && v && l.value ? he(h, v < l.value ? v : l.value) : v ? he(h, v) : !1;
1203
+ const { startDate: c, selecting: x } = a.rangeState || {};
1204
+ return x && c && l.value ? he(h, c < l.value ? c : l.value) : c ? he(h, c) : !1;
1205
1205
  }, I = (h) => {
1206
1206
  if (a.selectionMode !== "range") return !1;
1207
- const { endDate: v, selecting: x } = a.rangeState || {};
1207
+ const { endDate: c, selecting: x } = a.rangeState || {};
1208
1208
  if (x && l.value) {
1209
1209
  const { startDate: B } = a.rangeState || {};
1210
1210
  return he(h, B < l.value ? l.value : B);
1211
1211
  }
1212
- return v ? he(h, v) : !1;
1212
+ return c ? he(h, c) : !1;
1213
1213
  }, y = (h) => hl(h, a.disabledDate, a.minDate, a.maxDate), L = (h) => [
1214
1214
  t.e("cell"),
1215
1215
  t.is("selected", T(h)),
1216
- t.is("today", z(h)),
1216
+ t.is("today", S(h)),
1217
1217
  t.is("disabled", y(h)),
1218
1218
  t.is("in-range", $(h)),
1219
- t.is("range-start", S(h)),
1219
+ t.is("range-start", z(h)),
1220
1220
  t.is("range-end", I(h)),
1221
1221
  t.is("prev-month", !D(h) && h.getMonth() < m.value),
1222
1222
  t.is("next-month", !D(h) && h.getMonth() > m.value)
@@ -1227,7 +1227,7 @@ const pl = [
1227
1227
  }, M = () => {
1228
1228
  l.value = null;
1229
1229
  };
1230
- return (h, v) => (i(), d("table", {
1230
+ return (h, c) => (i(), d("table", {
1231
1231
  class: u(n(t).b()),
1232
1232
  cellspacing: "0",
1233
1233
  cellpadding: "0"
@@ -1269,21 +1269,21 @@ const pl = [
1269
1269
  setup(s, { emit: k }) {
1270
1270
  const a = s, e = k, t = ae("month-table");
1271
1271
  V(() => a.modelValue ? a.modelValue.getMonth() : -1);
1272
- const l = (D) => a.modelValue ? a.modelValue.getFullYear() === a.viewedYear && a.modelValue.getMonth() === D : !1, c = (D) => {
1272
+ const l = (D) => a.modelValue ? a.modelValue.getFullYear() === a.viewedYear && a.modelValue.getMonth() === D : !1, v = (D) => {
1273
1273
  const $ = /* @__PURE__ */ new Date();
1274
1274
  return $.getFullYear() === a.viewedYear && $.getMonth() === D;
1275
1275
  }, m = (D) => {
1276
1276
  if (!a.disabledDate) return !1;
1277
- const $ = new Date(a.viewedYear, D, 1), S = new Date(a.viewedYear, D + 1, 0);
1278
- return a.disabledDate($) && a.disabledDate(S);
1277
+ const $ = new Date(a.viewedYear, D, 1), z = new Date(a.viewedYear, D + 1, 0);
1278
+ return a.disabledDate($) && a.disabledDate(z);
1279
1279
  }, b = (D) => [
1280
1280
  t.e("cell"),
1281
1281
  t.is("selected", l(D)),
1282
- t.is("current", c(D)),
1282
+ t.is("current", v(D)),
1283
1283
  t.is("disabled", m(D))
1284
1284
  ], T = (D) => {
1285
1285
  m(D) || e("pick", D);
1286
- }, z = V(() => {
1286
+ }, S = V(() => {
1287
1287
  const D = [];
1288
1288
  for (let $ = 0; $ < 12; $ += 3)
1289
1289
  D.push([$, $ + 1, $ + 2]);
@@ -1295,8 +1295,8 @@ const pl = [
1295
1295
  cellpadding: "0"
1296
1296
  }, [
1297
1297
  r("tbody", null, [
1298
- (i(!0), d(J, null, _(z.value, (S, I) => (i(), d("tr", { key: I }, [
1299
- (i(!0), d(J, null, _(S, (y) => (i(), d("td", {
1298
+ (i(!0), d(J, null, _(S.value, (z, I) => (i(), d("tr", { key: I }, [
1299
+ (i(!0), d(J, null, _(z, (y) => (i(), d("td", {
1300
1300
  key: y,
1301
1301
  class: u(b(y)),
1302
1302
  onClick: (L) => T(y)
@@ -1319,8 +1319,8 @@ const pl = [
1319
1319
  },
1320
1320
  emits: ["pick"],
1321
1321
  setup(s, { emit: k }) {
1322
- const a = s, e = k, t = ae("year-table"), l = V(() => (/* @__PURE__ */ new Date()).getFullYear()), c = V(() => Ne(a.viewedYear)), m = V(() => {
1323
- const [y] = c.value, L = [];
1322
+ const a = s, e = k, t = ae("year-table"), l = V(() => (/* @__PURE__ */ new Date()).getFullYear()), v = V(() => Ne(a.viewedYear)), m = V(() => {
1323
+ const [y] = v.value, L = [];
1324
1324
  L.push(y - 1);
1325
1325
  for (let H = 0; H < 10; H++)
1326
1326
  L.push(y + H);
@@ -1330,17 +1330,17 @@ const pl = [
1330
1330
  for (let L = 0; L < m.value.length; L += 3)
1331
1331
  y.push(m.value.slice(L, L + 3));
1332
1332
  return y;
1333
- }), T = (y) => a.modelValue ? a.modelValue.getFullYear() === y : !1, z = (y) => y === l.value, D = (y) => {
1334
- const [L, H] = c.value;
1333
+ }), T = (y) => a.modelValue ? a.modelValue.getFullYear() === y : !1, S = (y) => y === l.value, D = (y) => {
1334
+ const [L, H] = v.value;
1335
1335
  return y >= L && y <= H;
1336
1336
  }, $ = (y) => {
1337
1337
  if (!a.disabledDate) return !1;
1338
1338
  const L = new Date(y, 0, 1), H = new Date(y, 11, 31);
1339
1339
  return a.disabledDate(L) && a.disabledDate(H);
1340
- }, S = (y) => [
1340
+ }, z = (y) => [
1341
1341
  t.e("cell"),
1342
1342
  t.is("selected", T(y)),
1343
- t.is("current", z(y)),
1343
+ t.is("current", S(y)),
1344
1344
  t.is("disabled", $(y)),
1345
1345
  t.is("in-decade", D(y))
1346
1346
  ], I = (y) => {
@@ -1355,7 +1355,7 @@ const pl = [
1355
1355
  (i(!0), d(J, null, _(b.value, (H, P) => (i(), d("tr", { key: P }, [
1356
1356
  (i(!0), d(J, null, _(H, (M) => (i(), d("td", {
1357
1357
  key: M,
1358
- class: u(S(M)),
1358
+ class: u(z(M)),
1359
1359
  onClick: (h) => I(M)
1360
1360
  }, [
1361
1361
  r("span", {
@@ -1366,7 +1366,7 @@ const pl = [
1366
1366
  ])
1367
1367
  ], 2));
1368
1368
  }
1369
- }), wl = ["placeholder", "disabled", "value"], Cl = ["placeholder", "disabled", "value"], $l = ["placeholder", "disabled", "value"], Dl = ["value"], zl = ["value"], Sl = ["value"], st = /* @__PURE__ */ le({
1369
+ }), wl = ["placeholder", "disabled", "value"], Cl = ["placeholder", "disabled", "value"], $l = ["placeholder", "disabled", "value"], Dl = ["value"], Sl = ["value"], zl = ["value"], st = /* @__PURE__ */ le({
1370
1370
  name: "XDatePicker",
1371
1371
  __name: "index",
1372
1372
  props: {
@@ -1389,9 +1389,9 @@ const pl = [
1389
1389
  },
1390
1390
  emits: ["update:modelValue", "update:value", "change", "focus", "blur", "clear"],
1391
1391
  setup(s, { expose: k, emit: a }) {
1392
- const e = s, t = a, l = ae("date-picker"), c = R(!1), m = R(2e3), b = R(), T = () => e.modelValue !== void 0 && e.modelValue !== null ? e.modelValue : e.value !== void 0 && e.value !== null ? e.value : null, z = (A) => {
1392
+ const e = s, t = a, l = ae("date-picker"), v = R(!1), m = R(2e3), b = R(), T = () => e.modelValue !== void 0 && e.modelValue !== null ? e.modelValue : e.value !== void 0 && e.value !== null ? e.value : null, S = (A) => {
1393
1393
  e.modelValue !== void 0 && t("update:modelValue", A), e.value !== void 0 && t("update:value", A), e.modelValue === void 0 && e.value === void 0 && t("update:modelValue", A), t("change", A);
1394
- }, D = R(), $ = R(), S = R({
1394
+ }, D = R(), $ = R(), z = R({
1395
1395
  top: "0px",
1396
1396
  left: "0px"
1397
1397
  }), I = () => Oe().next(), y = R("date"), L = R(/* @__PURE__ */ new Date()), H = R({
@@ -1422,7 +1422,7 @@ const pl = [
1422
1422
  if (!Y) return "";
1423
1423
  const W = e.showTime ? "YYYY-MM-DD HH:mm:ss" : e.format;
1424
1424
  return ce(Y, W);
1425
- }), v = V(() => {
1425
+ }), c = V(() => {
1426
1426
  const A = T();
1427
1427
  if (!A || !Array.isArray(A)) return "";
1428
1428
  const [Y] = A;
@@ -1446,28 +1446,28 @@ const pl = [
1446
1446
  l.is("range", e.type === "daterange")
1447
1447
  ]), C = V(() => [
1448
1448
  l.e("input"),
1449
- l.is("focus", c.value),
1450
- l.is("has-value", !!h.value || !!(v.value || x.value))
1449
+ l.is("focus", v.value),
1450
+ l.is("has-value", !!h.value || !!(c.value || x.value))
1451
1451
  ]), o = () => {
1452
- e.disabled || e.readonly || (c.value ? g() : f());
1452
+ e.disabled || e.readonly || (v.value ? g() : f());
1453
1453
  }, f = () => {
1454
- c.value = !0, m.value = I(), De(() => {
1454
+ v.value = !0, m.value = I(), De(() => {
1455
1455
  if (b.value && D.value) {
1456
1456
  const A = b.value.getBoundingClientRect(), Y = D.value.getBoundingClientRect();
1457
1457
  let W = A.bottom + 8, Te = A.left;
1458
- Te + Y.width > window.innerWidth && (Te = window.innerWidth - Y.width - 8), W + Y.height > window.innerHeight && (W = A.top - Y.height - 8), S.value = {
1458
+ Te + Y.width > window.innerWidth && (Te = window.innerWidth - Y.width - 8), W + Y.height > window.innerHeight && (W = A.top - Y.height - 8), z.value = {
1459
1459
  top: `${W}px`,
1460
1460
  left: `${Te}px`
1461
1461
  };
1462
1462
  }
1463
1463
  }), t("focus", {});
1464
1464
  }, g = () => {
1465
- c.value = !1, y.value = "date", t("blur", {});
1465
+ v.value = !1, y.value = "date", t("blur", {});
1466
1466
  }, X = (A) => {
1467
1467
  if (e.type === "date") {
1468
1468
  e.showTime && (A.setHours(H.value.hours), A.setMinutes(H.value.minutes), A.setSeconds(H.value.seconds));
1469
1469
  const Y = e.showTime ? "YYYY-MM-DD HH:mm:ss" : e.valueFormat, W = Y ? ce(A, Y) : A;
1470
- z(W), e.showTime || g();
1470
+ S(W), e.showTime || g();
1471
1471
  }
1472
1472
  }, ne = () => {
1473
1473
  const A = T();
@@ -1476,13 +1476,13 @@ const pl = [
1476
1476
  if (Y) {
1477
1477
  Y.setHours(H.value.hours), Y.setMinutes(H.value.minutes), Y.setSeconds(H.value.seconds);
1478
1478
  const W = e.valueFormat ? ce(Y, e.valueFormat) : Y;
1479
- z(W);
1479
+ S(W);
1480
1480
  }
1481
1481
  } else {
1482
1482
  const Y = /* @__PURE__ */ new Date();
1483
1483
  Y.setHours(H.value.hours), Y.setMinutes(H.value.minutes), Y.setSeconds(H.value.seconds);
1484
1484
  const W = e.valueFormat ? ce(Y, e.valueFormat) : Y;
1485
- z(W);
1485
+ S(W);
1486
1486
  }
1487
1487
  g();
1488
1488
  }, K = (A) => {
@@ -1491,34 +1491,34 @@ const pl = [
1491
1491
  else {
1492
1492
  P.value.selecting = !1, P.value.startDate && A < P.value.startDate ? [P.value.startDate, P.value.endDate] = [A, P.value.startDate] : P.value.endDate = A;
1493
1493
  const Y = e.valueFormat ? ce(P.value.startDate, e.valueFormat) : P.value.startDate, W = e.valueFormat ? ce(P.value.endDate, e.valueFormat) : P.value.endDate;
1494
- z([Y, W]), g();
1494
+ S([Y, W]), g();
1495
1495
  }
1496
1496
  }, re = (A) => {
1497
1497
  if (L.value = new Date(F.value, A, 1), e.type === "month") {
1498
1498
  const Y = new Date(F.value, A, 1), W = e.valueFormat ? ce(Y, e.valueFormat) : Y;
1499
- z(W), g();
1499
+ S(W), g();
1500
1500
  } else
1501
1501
  y.value = "date";
1502
1502
  }, q = (A) => {
1503
1503
  if (L.value = new Date(A, O.value, 1), e.type === "year") {
1504
1504
  const Y = new Date(A, 0, 1), W = e.valueFormat ? ce(Y, e.valueFormat) : Y;
1505
- z(W), g();
1505
+ S(W), g();
1506
1506
  } else
1507
1507
  y.value = "month";
1508
1508
  }, me = () => {
1509
1509
  L.value = cl(L.value);
1510
1510
  }, be = () => {
1511
1511
  L.value = vl(L.value);
1512
- }, ze = () => {
1512
+ }, Se = () => {
1513
1513
  y.value === "year" ? L.value = new Date(F.value - 10, O.value, 1) : L.value = fl(L.value);
1514
1514
  }, xe = () => {
1515
1515
  y.value === "year" ? L.value = new Date(F.value + 10, O.value, 1) : L.value = ml(L.value);
1516
- }, Se = () => {
1516
+ }, ze = () => {
1517
1517
  y.value = "month";
1518
1518
  }, Re = () => {
1519
1519
  y.value = "year";
1520
1520
  }, E = () => {
1521
- z(null), t("clear"), P.value = {
1521
+ S(null), t("clear"), P.value = {
1522
1522
  selecting: !1,
1523
1523
  startDate: null,
1524
1524
  endDate: null
@@ -1538,7 +1538,7 @@ const pl = [
1538
1538
  } else M.value && (L.value = new Date(M.value));
1539
1539
  },
1540
1540
  { immediate: !0 }
1541
- ), ie(c, (A) => {
1541
+ ), ie(v, (A) => {
1542
1542
  A && (y.value = "date", e.type === "daterange" && (P.value = {
1543
1543
  selecting: !1,
1544
1544
  startDate: Array.isArray(M.value) ? M.value[0] : null,
@@ -1613,7 +1613,7 @@ const pl = [
1613
1613
  placeholder: s.startPlaceholder,
1614
1614
  disabled: s.disabled,
1615
1615
  readonly: !0,
1616
- value: v.value,
1616
+ value: c.value,
1617
1617
  class: u(n(l).e("input-inner"))
1618
1618
  }, null, 10, Cl),
1619
1619
  r("span", {
@@ -1630,7 +1630,7 @@ const pl = [
1630
1630
  r("span", {
1631
1631
  class: u(n(l).e("suffix"))
1632
1632
  }, [
1633
- s.clearable && (v.value || x.value) && !s.disabled ? (i(), d("span", {
1633
+ s.clearable && (c.value || x.value) && !s.disabled ? (i(), d("span", {
1634
1634
  key: 0,
1635
1635
  class: u(n(l).e("clear")),
1636
1636
  onClick: ue(E, ["stop"])
@@ -1657,7 +1657,7 @@ const pl = [
1657
1657
  ref_key: "popperRef",
1658
1658
  ref: D,
1659
1659
  class: u(n(l).e("popper")),
1660
- style: te({ zIndex: m.value, ...S.value })
1660
+ style: te({ zIndex: m.value, ...z.value })
1661
1661
  }, [
1662
1662
  r("div", {
1663
1663
  class: u(n(l).e("header"))
@@ -1665,7 +1665,7 @@ const pl = [
1665
1665
  r("button", {
1666
1666
  type: "button",
1667
1667
  class: u(n(l).e("prev-btn")),
1668
- onClick: Y[0] || (Y[0] = (W) => y.value === "date" ? me() : ze())
1668
+ onClick: Y[0] || (Y[0] = (W) => y.value === "date" ? me() : Se())
1669
1669
  }, " ‹ ", 2),
1670
1670
  r("div", {
1671
1671
  class: u(n(l).e("header-title"))
@@ -1677,7 +1677,7 @@ const pl = [
1677
1677
  r("span", { onClick: Re }, U(F.value) + " 年", 1),
1678
1678
  y.value === "date" ? (i(), d("span", {
1679
1679
  key: 0,
1680
- onClick: Se
1680
+ onClick: ze
1681
1681
  }, U(O.value + 1) + " 月", 1)) : N("", !0)
1682
1682
  ], 64))
1683
1683
  ], 2),
@@ -1750,7 +1750,7 @@ const pl = [
1750
1750
  (i(), d(J, null, _(60, (W) => r("option", {
1751
1751
  key: W,
1752
1752
  value: W - 1
1753
- }, U(String(W - 1).padStart(2, "0")), 9, zl)), 64))
1753
+ }, U(String(W - 1).padStart(2, "0")), 9, Sl)), 64))
1754
1754
  ], 2), [
1755
1755
  [
1756
1756
  we,
@@ -1771,7 +1771,7 @@ const pl = [
1771
1771
  (i(), d(J, null, _(60, (W) => r("option", {
1772
1772
  key: W,
1773
1773
  value: W - 1
1774
- }, U(String(W - 1).padStart(2, "0")), 9, Sl)), 64))
1774
+ }, U(String(W - 1).padStart(2, "0")), 9, zl)), 64))
1775
1775
  ], 2), [
1776
1776
  [
1777
1777
  we,
@@ -1794,7 +1794,7 @@ const pl = [
1794
1794
  }, "确定", 2)
1795
1795
  ], 2)) : N("", !0)
1796
1796
  ], 6), [
1797
- [ge, c.value]
1797
+ [ge, v.value]
1798
1798
  ])
1799
1799
  ]),
1800
1800
  _: 1
@@ -1842,12 +1842,12 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
1842
1842
  },
1843
1843
  emits: ["confirm", "cancel"],
1844
1844
  setup(s, { emit: k }) {
1845
- const a = s, e = k, t = ae("time-panel"), l = R(0), c = R(0), m = R(0), b = R(), T = R(), z = R(), D = V(() => a.format.includes("ss") || a.format.includes("s")), $ = V(() => {
1845
+ const a = s, e = k, t = ae("time-panel"), l = R(0), v = R(0), m = R(0), b = R(), T = R(), S = R(), D = V(() => a.format.includes("ss") || a.format.includes("s")), $ = V(() => {
1846
1846
  const K = [], re = Math.max(1, a.hourStep);
1847
1847
  for (let q = 0; q < 24; q += re)
1848
1848
  K.push(q);
1849
1849
  return K;
1850
- }), S = V(() => {
1850
+ }), z = V(() => {
1851
1851
  const K = [], re = Math.max(1, a.minuteStep);
1852
1852
  for (let q = 0; q < 60; q += re)
1853
1853
  K.push(q);
@@ -1857,13 +1857,13 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
1857
1857
  for (let q = 0; q < 60; q += re)
1858
1858
  K.push(q);
1859
1859
  return K;
1860
- }), y = V(() => a.disabledHours ? new Set(a.disabledHours()) : /* @__PURE__ */ new Set()), L = V(() => a.disabledMinutes ? new Set(a.disabledMinutes(l.value)) : /* @__PURE__ */ new Set()), H = V(() => a.disabledSeconds ? new Set(a.disabledSeconds(l.value, c.value)) : /* @__PURE__ */ new Set()), P = V(() => `${ke(l.value)}:${ke(c.value)}${D.value ? ":" + ke(m.value) : ""}`), M = (K) => y.value.has(K), h = (K) => L.value.has(K), v = (K) => H.value.has(K), x = (K) => {
1860
+ }), y = V(() => a.disabledHours ? new Set(a.disabledHours()) : /* @__PURE__ */ new Set()), L = V(() => a.disabledMinutes ? new Set(a.disabledMinutes(l.value)) : /* @__PURE__ */ new Set()), H = V(() => a.disabledSeconds ? new Set(a.disabledSeconds(l.value, v.value)) : /* @__PURE__ */ new Set()), P = V(() => `${ke(l.value)}:${ke(v.value)}${D.value ? ":" + ke(m.value) : ""}`), M = (K) => y.value.has(K), h = (K) => L.value.has(K), c = (K) => H.value.has(K), x = (K) => {
1861
1861
  M(K) || (l.value = K, w(b.value, O(K)));
1862
1862
  }, B = (K) => {
1863
- h(K) || (c.value = K, w(T.value, j(K)));
1863
+ h(K) || (v.value = K, w(T.value, j(K)));
1864
1864
  }, F = (K) => {
1865
- v(K) || (m.value = K, w(z.value, p(K)));
1866
- }, O = (K) => $.value.indexOf(K), j = (K) => S.value.indexOf(K), p = (K) => I.value.indexOf(K), w = (K, re) => {
1865
+ c(K) || (m.value = K, w(S.value, p(K)));
1866
+ }, O = (K) => $.value.indexOf(K), j = (K) => z.value.indexOf(K), p = (K) => I.value.indexOf(K), w = (K, re) => {
1867
1867
  if (!K) return;
1868
1868
  const q = 32, be = re * q + 84 - 200 / 2 + q / 2;
1869
1869
  K.scrollTop = Math.max(0, be);
@@ -1873,26 +1873,26 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
1873
1873
  q !== void 0 && !M(q) && (l.value = q);
1874
1874
  }, o = () => {
1875
1875
  if (!T.value) return;
1876
- const K = T.value.scrollTop, re = Math.round((K - 84 + 100) / 32), q = S.value[Math.max(0, Math.min(re, S.value.length - 1))];
1877
- q !== void 0 && !h(q) && (c.value = q);
1876
+ const K = T.value.scrollTop, re = Math.round((K - 84 + 100) / 32), q = z.value[Math.max(0, Math.min(re, z.value.length - 1))];
1877
+ q !== void 0 && !h(q) && (v.value = q);
1878
1878
  }, f = () => {
1879
- if (!z.value) return;
1880
- const K = z.value.scrollTop, re = Math.round((K - 84 + 100) / 32), q = I.value[Math.max(0, Math.min(re, I.value.length - 1))];
1881
- q !== void 0 && !v(q) && (m.value = q);
1879
+ if (!S.value) return;
1880
+ const K = S.value.scrollTop, re = Math.round((K - 84 + 100) / 32), q = I.value[Math.max(0, Math.min(re, I.value.length - 1))];
1881
+ q !== void 0 && !c(q) && (m.value = q);
1882
1882
  }, g = () => {
1883
1883
  const K = a.modelValue ? new Date(a.modelValue) : /* @__PURE__ */ new Date();
1884
- K.setHours(l.value, c.value, m.value, 0), e("confirm", K);
1884
+ K.setHours(l.value, v.value, m.value, 0), e("confirm", K);
1885
1885
  }, X = () => {
1886
1886
  e("cancel");
1887
1887
  }, ne = () => {
1888
1888
  if (a.modelValue)
1889
- l.value = a.modelValue.getHours(), c.value = a.modelValue.getMinutes(), m.value = a.modelValue.getSeconds();
1889
+ l.value = a.modelValue.getHours(), v.value = a.modelValue.getMinutes(), m.value = a.modelValue.getSeconds();
1890
1890
  else {
1891
1891
  const K = /* @__PURE__ */ new Date();
1892
- l.value = K.getHours(), c.value = K.getMinutes(), m.value = K.getSeconds();
1892
+ l.value = K.getHours(), v.value = K.getMinutes(), m.value = K.getSeconds();
1893
1893
  }
1894
1894
  De(() => {
1895
- w(b.value, O(l.value)), w(T.value, j(c.value)), D.value && w(z.value, p(m.value));
1895
+ w(b.value, O(l.value)), w(T.value, j(v.value)), D.value && w(S.value, p(m.value));
1896
1896
  });
1897
1897
  };
1898
1898
  return ie(
@@ -1939,9 +1939,9 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
1939
1939
  r("div", {
1940
1940
  class: u(n(t).e("padding"))
1941
1941
  }, null, 2),
1942
- (i(!0), d(J, null, _(S.value, (q) => (i(), d("div", {
1942
+ (i(!0), d(J, null, _(z.value, (q) => (i(), d("div", {
1943
1943
  key: q,
1944
- class: u([n(t).e("item"), n(t).is("selected", c.value === q), n(t).is("disabled", h(q))]),
1944
+ class: u([n(t).e("item"), n(t).is("selected", v.value === q), n(t).is("disabled", h(q))]),
1945
1945
  onClick: (me) => B(q)
1946
1946
  }, U(n(ke)(q)), 11, Hl))), 128)),
1947
1947
  r("div", {
@@ -1951,7 +1951,7 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
1951
1951
  D.value ? (i(), d("div", {
1952
1952
  key: 0,
1953
1953
  ref_key: "secondListRef",
1954
- ref: z,
1954
+ ref: S,
1955
1955
  class: u(n(t).e("list")),
1956
1956
  onScroll: f
1957
1957
  }, [
@@ -1960,7 +1960,7 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
1960
1960
  }, null, 2),
1961
1961
  (i(!0), d(J, null, _(I.value, (q) => (i(), d("div", {
1962
1962
  key: q,
1963
- class: u([n(t).e("item"), n(t).is("selected", m.value === q), n(t).is("disabled", v(q))]),
1963
+ class: u([n(t).e("item"), n(t).is("selected", m.value === q), n(t).is("disabled", c(q))]),
1964
1964
  onClick: (me) => F(q)
1965
1965
  }, U(n(ke)(q)), 11, Ll))), 128)),
1966
1966
  r("div", {
@@ -2013,10 +2013,10 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
2013
2013
  },
2014
2014
  emits: ["update:modelValue", "change", "focus", "blur", "clear"],
2015
2015
  setup(s, { expose: k, emit: a }) {
2016
- const e = s, t = a, l = ae("time-picker"), c = () => Oe().next(), m = R(!1), b = R(2e3), T = R(), z = R(), D = R(), $ = R({
2016
+ const e = s, t = a, l = ae("time-picker"), v = () => Oe().next(), m = R(!1), b = R(2e3), T = R(), S = R(), D = R(), $ = R({
2017
2017
  top: "0px",
2018
2018
  left: "0px"
2019
- }), S = R({
2019
+ }), z = R({
2020
2020
  startTime: null,
2021
2021
  endTime: null
2022
2022
  }), I = R("start"), y = V(() => {
@@ -2034,12 +2034,12 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
2034
2034
  if (!Array.isArray(y.value)) return "";
2035
2035
  const [, f] = y.value;
2036
2036
  return f ? ye(f, e.format) : "";
2037
- }), M = V(() => e.type === "timerange" ? I.value === "start" ? S.value.startTime : S.value.endTime || S.value.startTime : y.value), h = V(() => [
2037
+ }), M = V(() => e.type === "timerange" ? I.value === "start" ? z.value.startTime : z.value.endTime || z.value.startTime : y.value), h = V(() => [
2038
2038
  l.b(),
2039
2039
  l.m(e.size),
2040
2040
  l.is("disabled", e.disabled),
2041
2041
  l.is("range", e.type === "timerange")
2042
- ]), v = V(() => [
2042
+ ]), c = V(() => [
2043
2043
  l.e("input"),
2044
2044
  l.is("focus", m.value)
2045
2045
  ]), x = () => {
@@ -2047,9 +2047,9 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
2047
2047
  }, B = (f) => {
2048
2048
  e.disabled || e.readonly || (I.value = f, m.value || F());
2049
2049
  }, F = () => {
2050
- m.value = !0, b.value = c(), De(() => {
2051
- if (T.value && z.value) {
2052
- const f = T.value.getBoundingClientRect(), g = z.value.getBoundingClientRect();
2050
+ m.value = !0, b.value = v(), De(() => {
2051
+ if (T.value && S.value) {
2052
+ const f = T.value.getBoundingClientRect(), g = S.value.getBoundingClientRect();
2053
2053
  let X = f.bottom + 8, ne = f.left;
2054
2054
  ne + g.width > window.innerWidth && (ne = window.innerWidth - g.width - 8), X + g.height > window.innerHeight && (X = f.top - g.height - 8), $.value = {
2055
2055
  top: `${X}px`,
@@ -2062,10 +2062,10 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
2062
2062
  }, j = (f) => {
2063
2063
  if (e.type === "timerange")
2064
2064
  if (I.value === "start")
2065
- S.value.startTime = f, I.value = "end", S.value.endTime && S.value.endTime < f && (S.value.endTime = null);
2065
+ z.value.startTime = f, I.value = "end", z.value.endTime && z.value.endTime < f && (z.value.endTime = null);
2066
2066
  else {
2067
- S.value.startTime && f < S.value.startTime ? (S.value.endTime = S.value.startTime, S.value.startTime = f) : S.value.endTime = f;
2068
- const g = e.valueFormat ? ye(S.value.startTime, e.valueFormat) : S.value.startTime, X = e.valueFormat ? ye(S.value.endTime, e.valueFormat) : S.value.endTime;
2067
+ z.value.startTime && f < z.value.startTime ? (z.value.endTime = z.value.startTime, z.value.startTime = f) : z.value.endTime = f;
2068
+ const g = e.valueFormat ? ye(z.value.startTime, e.valueFormat) : z.value.startTime, X = e.valueFormat ? ye(z.value.endTime, e.valueFormat) : z.value.endTime;
2069
2069
  t("update:modelValue", [g, X]), t("change", [g, X]), O();
2070
2070
  }
2071
2071
  else {
@@ -2075,21 +2075,21 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
2075
2075
  }, p = () => {
2076
2076
  O();
2077
2077
  }, w = () => {
2078
- t("update:modelValue", null), t("change", null), t("clear"), S.value = {
2078
+ t("update:modelValue", null), t("change", null), t("clear"), z.value = {
2079
2079
  startTime: null,
2080
2080
  endTime: null
2081
2081
  };
2082
2082
  }, C = (f) => {
2083
2083
  if (!T.value) return;
2084
2084
  const g = f.target;
2085
- T.value.contains(g) || z.value && z.value.contains(g) || O();
2085
+ T.value.contains(g) || S.value && S.value.contains(g) || O();
2086
2086
  };
2087
2087
  ie(
2088
2088
  () => e.modelValue,
2089
2089
  (f) => {
2090
2090
  if (f && e.type === "timerange") {
2091
2091
  const [g, X] = y.value;
2092
- S.value = {
2092
+ z.value = {
2093
2093
  startTime: g,
2094
2094
  endTime: X
2095
2095
  };
@@ -2097,7 +2097,7 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
2097
2097
  },
2098
2098
  { immediate: !0 }
2099
2099
  ), ie(m, (f) => {
2100
- f && e.type === "timerange" && (S.value = {
2100
+ f && e.type === "timerange" && (z.value = {
2101
2101
  startTime: Array.isArray(y.value) ? y.value[0] : null,
2102
2102
  endTime: Array.isArray(y.value) ? y.value[1] : null
2103
2103
  }, I.value = "start");
@@ -2125,7 +2125,7 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
2125
2125
  }, [
2126
2126
  s.type !== "timerange" ? (i(), d("div", {
2127
2127
  key: 0,
2128
- class: u(v.value),
2128
+ class: u(c.value),
2129
2129
  onClick: x
2130
2130
  }, [
2131
2131
  r("input", {
@@ -2162,7 +2162,7 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
2162
2162
  ], 2)
2163
2163
  ], 2)) : (i(), d("div", {
2164
2164
  key: 1,
2165
- class: u(v.value),
2165
+ class: u(c.value),
2166
2166
  onClick: x
2167
2167
  }, [
2168
2168
  r("input", {
@@ -2214,7 +2214,7 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
2214
2214
  default: He(() => [
2215
2215
  oe(r("div", {
2216
2216
  ref_key: "popperRef",
2217
- ref: z,
2217
+ ref: S,
2218
2218
  class: u(n(l).e("popper")),
2219
2219
  style: te({ zIndex: b.value, ...$.value })
2220
2220
  }, [
@@ -2260,8 +2260,8 @@ function Xe(s, k, a = "value", e = "children") {
2260
2260
  }
2261
2261
  function Fe(s, k, a = "value", e = "children") {
2262
2262
  const t = [];
2263
- function l(c) {
2264
- for (const m of c) {
2263
+ function l(v) {
2264
+ for (const m of v) {
2265
2265
  if (m[a] === k)
2266
2266
  return t.push(m), !0;
2267
2267
  if (m[e] && m[e].length > 0) {
@@ -2276,9 +2276,9 @@ function Fe(s, k, a = "value", e = "children") {
2276
2276
  }
2277
2277
  function Pl(s, k = "children") {
2278
2278
  const a = [];
2279
- function e(t, l = 0, c = null) {
2279
+ function e(t, l = 0, v = null) {
2280
2280
  for (const m of t)
2281
- a.push({ ...m, level: l, parent: c }), m[k] && m[k].length > 0 && e(m[k], l + 1, m);
2281
+ a.push({ ...m, level: l, parent: v }), m[k] && m[k].length > 0 && e(m[k], l + 1, m);
2282
2282
  }
2283
2283
  return e(s), a;
2284
2284
  }
@@ -2318,23 +2318,33 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2318
2318
  return (A = G.default) == null ? void 0 : A.call(G);
2319
2319
  };
2320
2320
  }
2321
- }), e = s, t = k, l = ae("select"), c = Le(), m = () => Oe().next(), b = R(), T = R(), z = R(), D = R(!1), $ = R(2e3), S = R(""), I = R(-1), y = R({ top: "0px", left: "0px" }), L = R([]), H = (E) => {
2321
+ }), e = s, t = k, l = ae("select"), v = Le(), m = () => Oe().next(), b = R(), T = R(), S = R(), D = R(!1), $ = R(2e3), z = R(""), I = R(-1), y = R({ top: "0px", left: "0px" }), L = R([]), H = (E) => {
2322
2322
  L.value.find((G) => G.value === E.value) || L.value.push(E);
2323
- }, P = V(() => e.type === "multiple" || e.mode === "multiple"), M = V(() => e.type === "cascader"), h = R([]), v = V(() => e.options && e.options.length > 0 ? e.options : L.value), x = (E) => {
2323
+ }, P = V(() => e.type === "multiple" || e.mode === "multiple"), M = V(() => e.type === "cascader"), h = R([]), c = V(() => e.options && e.options.length > 0 ? e.options : L.value), x = (E) => {
2324
2324
  t("update:modelValue", E), t("update:value", E), t("change", E);
2325
2325
  }, B = V(() => {
2326
2326
  const E = e.modelValue ?? e.value;
2327
2327
  return P.value ? Array.isArray(E) ? E : [] : M.value ? Array.isArray(E) ? E : E != null && E !== "" ? [E] : [] : E != null && E !== "" ? [E] : [];
2328
2328
  }), F = V(() => {
2329
- const E = v.value;
2329
+ const E = c.value;
2330
2330
  return M.value ? Pl(E, e.childrenKey) : E.map((G) => ({ ...G, level: 0 }));
2331
- }), O = V(() => !e.filterable || !S.value ? F.value : F.value.filter((E) => {
2332
- const G = E[e.labelKey] || "";
2333
- return Il(G, S.value, e.filterMethod);
2334
- })), j = V(() => {
2331
+ }), O = V(() => {
2332
+ var E;
2333
+ return console.log("[XSelect] filteredOptions recalc:", {
2334
+ "props.options.length": (E = e.options) == null ? void 0 : E.length,
2335
+ "slotOptions.length": L.value.length,
2336
+ "mergedOptions.length": c.value.length,
2337
+ "flatOptions.length": F.value.length,
2338
+ filterable: e.filterable,
2339
+ query: z.value
2340
+ }), !e.filterable || !z.value ? F.value : F.value.filter((G) => {
2341
+ const Z = G[e.labelKey] || "";
2342
+ return Il(Z, z.value, e.filterMethod);
2343
+ });
2344
+ }), j = V(() => {
2335
2345
  const E = [];
2336
2346
  for (const G of B.value) {
2337
- const Z = Xe(v.value, G, e.valueKey, e.childrenKey);
2347
+ const Z = Xe(c.value, G, e.valueKey, e.childrenKey);
2338
2348
  Z && E.push(Z);
2339
2349
  }
2340
2350
  return E;
@@ -2342,7 +2352,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2342
2352
  if (P.value)
2343
2353
  return "";
2344
2354
  if (M.value)
2345
- return Fe(v.value, B.value[B.value.length - 1], e.valueKey, e.childrenKey).map((Z) => Z[e.labelKey]).join(e.separator);
2355
+ return Fe(c.value, B.value[B.value.length - 1], e.valueKey, e.childrenKey).map((Z) => Z[e.labelKey]).join(e.separator);
2346
2356
  const E = j.value[0];
2347
2357
  return E ? E[e.labelKey] : "";
2348
2358
  }), w = V(() => P.value ? j.value : []), C = V(() => e.collapseTags ? w.value.slice(0, e.maxCollapseTags) : w.value), o = V(() => e.collapseTags ? Math.max(0, w.value.length - e.maxCollapseTags) : 0), f = V(() => [
@@ -2354,19 +2364,19 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2354
2364
  l.is("filterable", e.filterable),
2355
2365
  l.is("focus", D.value)
2356
2366
  ]), g = () => {
2357
- if (!b.value || !z.value || !D.value) return;
2358
- const E = b.value.getBoundingClientRect(), G = z.value.getBoundingClientRect();
2367
+ if (!b.value || !S.value || !D.value) return;
2368
+ const E = b.value.getBoundingClientRect(), G = S.value.getBoundingClientRect();
2359
2369
  let Z = E.bottom + 4, A = E.left;
2360
2370
  A + G.width > window.innerWidth && (A = window.innerWidth - G.width - 8), Z + G.height > window.innerHeight && (Z = E.top - G.height - 4), y.value = {
2361
2371
  top: `${Z}px`,
2362
2372
  left: `${A}px`
2363
2373
  };
2364
2374
  }, X = () => {
2365
- e.disabled || (D.value = !0, $.value = m(), S.value = "", De(() => {
2375
+ e.disabled || (D.value = !0, $.value = m(), z.value = "", De(() => {
2366
2376
  g();
2367
2377
  }), t("visible-change", !0), t("focus", {}));
2368
2378
  }, ne = () => {
2369
- D.value = !1, S.value = "", h.value = [], t("visible-change", !1), t("blur", {});
2379
+ D.value = !1, z.value = "", h.value = [], t("visible-change", !1), t("blur", {});
2370
2380
  }, K = (E) => {
2371
2381
  if (!E.disabled)
2372
2382
  if (P.value) {
@@ -2381,10 +2391,10 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2381
2391
  x(G);
2382
2392
  } else if (M.value)
2383
2393
  if (E.children && E.children.length > 0) {
2384
- const G = Fe(v.value, E[e.valueKey], e.valueKey, e.childrenKey);
2394
+ const G = Fe(c.value, E[e.valueKey], e.valueKey, e.childrenKey);
2385
2395
  h.value = G;
2386
2396
  } else {
2387
- const Z = Fe(v.value, E[e.valueKey], e.valueKey, e.childrenKey).map((A) => A[e.valueKey]);
2397
+ const Z = Fe(c.value, E[e.valueKey], e.valueKey, e.childrenKey).map((A) => A[e.valueKey]);
2388
2398
  x(Z), ne();
2389
2399
  }
2390
2400
  else
@@ -2396,19 +2406,19 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2396
2406
  const E = P.value ? [] : "";
2397
2407
  x(E), t("clear");
2398
2408
  }, me = (E) => {
2399
- S.value = E.target.value;
2409
+ z.value = E.target.value;
2400
2410
  }, be = (E) => {
2401
2411
  if (!b.value) return;
2402
- const G = E.target, Z = z.value && z.value.contains(G);
2412
+ const G = E.target, Z = S.value && S.value.contains(G);
2403
2413
  b.value.contains(G) || Z || ne();
2404
- }, ze = (E) => {
2414
+ }, Se = (E) => {
2405
2415
  if (E.key === "Escape")
2406
2416
  ne();
2407
2417
  else if (E.key === "Enter" && D.value) {
2408
2418
  const G = O.value[I.value];
2409
2419
  G && K(G);
2410
2420
  } else E.key === "ArrowDown" && D.value ? (E.preventDefault(), I.value = Math.min(I.value + 1, O.value.length - 1)) : E.key === "ArrowUp" && D.value && (E.preventDefault(), I.value = Math.max(I.value - 1, 0));
2411
- }, xe = (E) => B.value.includes(E[e.valueKey]), Se = (E, G) => [
2421
+ }, xe = (E) => B.value.includes(E[e.valueKey]), ze = (E, G) => [
2412
2422
  l.e("option"),
2413
2423
  l.is("selected", xe(E)),
2414
2424
  l.is("disabled", E.disabled === !0),
@@ -2416,15 +2426,15 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2416
2426
  l.is("group", !!(E.children && E.children.length > 0))
2417
2427
  ], Re = V(() => {
2418
2428
  if (!M.value) return [];
2419
- const E = [v.value];
2429
+ const E = [c.value];
2420
2430
  for (const G of h.value)
2421
2431
  G.children && G.children.length > 0 && E.push(G.children);
2422
2432
  return E;
2423
2433
  });
2424
2434
  return pe(() => {
2425
- document.addEventListener("mousedown", be), document.addEventListener("keydown", ze);
2435
+ document.addEventListener("mousedown", be), document.addEventListener("keydown", Se);
2426
2436
  }), $e(() => {
2427
- document.removeEventListener("mousedown", be), document.removeEventListener("keydown", ze), document.removeEventListener("scroll", g, !0);
2437
+ document.removeEventListener("mousedown", be), document.removeEventListener("keydown", Se), document.removeEventListener("scroll", g, !0);
2428
2438
  }), ie(D, (E) => {
2429
2439
  E ? document.addEventListener("scroll", g, !0) : document.removeEventListener("scroll", g, !0);
2430
2440
  }), Ce("select", {
@@ -2469,7 +2479,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2469
2479
  placeholder: P.value && w.value.length > 0 ? "" : s.placeholder,
2470
2480
  disabled: s.disabled,
2471
2481
  readonly: !s.filterable || !D.value,
2472
- value: s.filterable && D.value ? S.value : p.value,
2482
+ value: s.filterable && D.value ? z.value : p.value,
2473
2483
  onInput: me
2474
2484
  }, null, 42, El),
2475
2485
  r("span", {
@@ -2495,7 +2505,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2495
2505
  default: He(() => [
2496
2506
  oe(r("div", {
2497
2507
  ref_key: "popperRef",
2498
- ref: z,
2508
+ ref: S,
2499
2509
  class: u([n(l).e("popper"), n(l).is("cascader", M.value)]),
2500
2510
  style: te({ zIndex: $.value, ...y.value })
2501
2511
  }, [
@@ -2509,7 +2519,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2509
2519
  }, [
2510
2520
  (i(!0), d(J, null, _(Z, (Y, W) => (i(), d("div", {
2511
2521
  key: Y[s.valueKey],
2512
- class: u(Se(Y, W)),
2522
+ class: u(ze(Y, W)),
2513
2523
  onClick: ue((Te) => K(Y), ["stop", "prevent"])
2514
2524
  }, [
2515
2525
  r("span", {
@@ -2522,10 +2532,10 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2522
2532
  ], 10, Yl))), 128))
2523
2533
  ], 2))), 128))
2524
2534
  ], 2)) : (i(), d(J, { key: 1 }, [
2525
- O.value.length === 0 && !n(c).default ? (i(), d("div", {
2535
+ O.value.length === 0 && !n(v).default ? (i(), d("div", {
2526
2536
  key: 0,
2527
2537
  class: u(n(l).e("empty"))
2528
- }, U(S.value ? s.noMatchText : s.noDataText), 3)) : (i(), d(J, { key: 1 }, [
2538
+ }, U(z.value ? s.noMatchText : s.noDataText), 3)) : (i(), d(J, { key: 1 }, [
2529
2539
  E.$slots.default ? (i(), d("div", {
2530
2540
  key: 0,
2531
2541
  class: u(n(l).e("options"))
@@ -2542,7 +2552,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2542
2552
  }, [
2543
2553
  (i(!0), d(J, null, _(O.value, (Z, A) => (i(), d("div", {
2544
2554
  key: Z[s.valueKey],
2545
- class: u(Se(Z, A)),
2555
+ class: u(ze(Z, A)),
2546
2556
  onClick: ue((Y) => K(Z), ["stop", "prevent"])
2547
2557
  }, [
2548
2558
  r("span", {
@@ -2582,14 +2592,14 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2582
2592
  disabled: k.disabled
2583
2593
  });
2584
2594
  });
2585
- const t = V(() => !e || !e.selectedValues ? !1 : e.selectedValues.value.includes(k.value)), l = (c) => {
2586
- c.stopPropagation(), c.preventDefault(), !k.disabled && e && e.handleSelect && e.handleSelect({
2595
+ const t = V(() => !e || !e.selectedValues ? !1 : e.selectedValues.value.includes(k.value)), l = (v) => {
2596
+ v.stopPropagation(), v.preventDefault(), !k.disabled && e && e.handleSelect && e.handleSelect({
2587
2597
  value: k.value,
2588
2598
  label: k.label,
2589
2599
  disabled: k.disabled
2590
2600
  });
2591
2601
  };
2592
- return (c, m) => (i(), d("div", {
2602
+ return (v, m) => (i(), d("div", {
2593
2603
  class: u([
2594
2604
  n(a).e("option"),
2595
2605
  n(a).is("selected", t.value),
@@ -2624,7 +2634,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2624
2634
  },
2625
2635
  emits: ["update:modelValue", "change", "left-check-change", "right-check-change"],
2626
2636
  setup(s, { expose: k, emit: a }) {
2627
- const e = s, t = a, l = ae("transfer"), c = V(() => {
2637
+ const e = s, t = a, l = ae("transfer"), v = V(() => {
2628
2638
  var o;
2629
2639
  return ((o = e.props) == null ? void 0 : o.key) || "key";
2630
2640
  }), m = V(() => {
@@ -2633,26 +2643,26 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2633
2643
  }), b = V(() => {
2634
2644
  var o;
2635
2645
  return ((o = e.props) == null ? void 0 : o.disabled) || "disabled";
2636
- }), T = R(""), z = R(""), D = R([]), $ = R([]), S = (o) => o[c.value], I = (o) => o[m.value], y = (o) => o[b.value] || !1, L = V(() => e.data.filter((o) => {
2637
- const f = S(o);
2646
+ }), T = R(""), S = R(""), D = R([]), $ = R([]), z = (o) => o[v.value], I = (o) => o[m.value], y = (o) => o[b.value] || !1, L = V(() => e.data.filter((o) => {
2647
+ const f = z(o);
2638
2648
  return e.modelValue.includes(f) ? !1 : e.filterable && T.value ? e.filterMethod ? e.filterMethod(T.value, o) : I(o).toLowerCase().includes(T.value.toLowerCase()) : !0;
2639
2649
  })), H = V(() => {
2640
2650
  const o = e.modelValue;
2641
2651
  let f = e.data.filter((g) => {
2642
- const X = S(g);
2652
+ const X = z(g);
2643
2653
  return o.includes(X);
2644
2654
  });
2645
- return e.filterable && z.value && (f = f.filter((g) => e.filterMethod ? e.filterMethod(z.value, g) : I(g).toLowerCase().includes(z.value.toLowerCase()))), e.targetOrder === "push" ? f.sort((g, X) => o.indexOf(S(g)) - o.indexOf(S(X))) : e.targetOrder === "unshift" ? f.sort((g, X) => o.indexOf(S(X)) - o.indexOf(S(g))) : f;
2646
- }), P = V(() => L.value.filter((o) => D.value.includes(S(o))).every((o) => y(o))), M = V(() => H.value.filter((o) => $.value.includes(S(o))).every((o) => y(o))), h = V(() => D.value.length === 0 || P.value), v = V(() => $.value.length === 0 || M.value), x = () => {
2655
+ return e.filterable && S.value && (f = f.filter((g) => e.filterMethod ? e.filterMethod(S.value, g) : I(g).toLowerCase().includes(S.value.toLowerCase()))), e.targetOrder === "push" ? f.sort((g, X) => o.indexOf(z(g)) - o.indexOf(z(X))) : e.targetOrder === "unshift" ? f.sort((g, X) => o.indexOf(z(X)) - o.indexOf(z(g))) : f;
2656
+ }), P = V(() => L.value.filter((o) => D.value.includes(z(o))).every((o) => y(o))), M = V(() => H.value.filter((o) => $.value.includes(z(o))).every((o) => y(o))), h = V(() => D.value.length === 0 || P.value), c = V(() => $.value.length === 0 || M.value), x = () => {
2647
2657
  const o = D.value.filter((g) => {
2648
- const X = e.data.find((ne) => S(ne) === g);
2658
+ const X = e.data.find((ne) => z(ne) === g);
2649
2659
  return X && !y(X);
2650
2660
  });
2651
2661
  let f;
2652
2662
  e.targetOrder === "unshift" ? f = [...o, ...e.modelValue] : f = [...e.modelValue, ...o], t("update:modelValue", f), t("change", f, "right", o), D.value = [];
2653
2663
  }, B = () => {
2654
2664
  const o = $.value.filter((g) => {
2655
- const X = e.data.find((ne) => S(ne) === g);
2665
+ const X = e.data.find((ne) => z(ne) === g);
2656
2666
  return X && !y(X);
2657
2667
  }), f = e.modelValue.filter((g) => !o.includes(g));
2658
2668
  t("update:modelValue", f), t("change", f, "left", o), $.value = [];
@@ -2663,11 +2673,11 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2663
2673
  const f = $.value.indexOf(o);
2664
2674
  f > -1 ? $.value.splice(f, 1) : $.value.push(o), t("right-check-change", [...$.value]);
2665
2675
  }, j = () => {
2666
- D.value.length === L.value.filter((o) => !y(o)).length ? D.value = [] : D.value = L.value.filter((o) => !y(o)).map((o) => S(o)), t("left-check-change", [...D.value]);
2676
+ D.value.length === L.value.filter((o) => !y(o)).length ? D.value = [] : D.value = L.value.filter((o) => !y(o)).map((o) => z(o)), t("left-check-change", [...D.value]);
2667
2677
  }, p = () => {
2668
- $.value.length === H.value.filter((o) => !y(o)).length ? $.value = [] : $.value = H.value.filter((o) => !y(o)).map((o) => S(o)), t("right-check-change", [...$.value]);
2678
+ $.value.length === H.value.filter((o) => !y(o)).length ? $.value = [] : $.value = H.value.filter((o) => !y(o)).map((o) => z(o)), t("right-check-change", [...$.value]);
2669
2679
  }, w = (o) => {
2670
- o === "left" ? T.value = "" : z.value = "";
2680
+ o === "left" ? T.value = "" : S.value = "";
2671
2681
  }, C = V(() => [l.b()]);
2672
2682
  return k({
2673
2683
  clearQuery: w
@@ -2716,24 +2726,24 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2716
2726
  class: u(n(l).e("body"))
2717
2727
  }, [
2718
2728
  (i(!0), d(J, null, _(L.value, (g) => (i(), d("div", {
2719
- key: S(g),
2729
+ key: z(g),
2720
2730
  class: u([
2721
2731
  n(l).e("item"),
2722
2732
  n(l).is("disabled", y(g)),
2723
- n(l).is("checked", D.value.includes(S(g)))
2733
+ n(l).is("checked", D.value.includes(z(g)))
2724
2734
  ]),
2725
- onClick: (X) => !y(g) && F(S(g))
2735
+ onClick: (X) => !y(g) && F(z(g))
2726
2736
  }, [
2727
2737
  r("label", {
2728
2738
  class: u(n(l).e("checkbox"))
2729
2739
  }, [
2730
2740
  r("input", {
2731
2741
  type: "checkbox",
2732
- checked: D.value.includes(S(g)),
2742
+ checked: D.value.includes(z(g)),
2733
2743
  disabled: y(g),
2734
2744
  onClick: f[2] || (f[2] = ue(() => {
2735
2745
  }, ["stop"])),
2736
- onChange: (X) => F(S(g))
2746
+ onChange: (X) => F(z(g))
2737
2747
  }, null, 40, Wl),
2738
2748
  r("span", null, U(I(g)), 1)
2739
2749
  ], 2)
@@ -2757,8 +2767,8 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2757
2767
  onClick: x
2758
2768
  }, U(s.buttonTexts[0] || ">"), 11, ql),
2759
2769
  r("button", {
2760
- class: u([n(l).e("button"), n(l).is("disabled", v.value)]),
2761
- disabled: v.value,
2770
+ class: u([n(l).e("button"), n(l).is("disabled", c.value)]),
2771
+ disabled: c.value,
2762
2772
  onClick: B
2763
2773
  }, U(s.buttonTexts[1] || "<"), 11, jl)
2764
2774
  ], 2),
@@ -2788,13 +2798,13 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2788
2798
  class: u(n(l).e("filter"))
2789
2799
  }, [
2790
2800
  oe(r("input", {
2791
- "onUpdate:modelValue": f[3] || (f[3] = (g) => z.value = g),
2801
+ "onUpdate:modelValue": f[3] || (f[3] = (g) => S.value = g),
2792
2802
  placeholder: s.filterPlaceholder,
2793
2803
  class: u(n(l).e("filter-input"))
2794
2804
  }, null, 10, Jl), [
2795
- [Me, z.value]
2805
+ [Me, S.value]
2796
2806
  ]),
2797
- z.value ? (i(), d("span", {
2807
+ S.value ? (i(), d("span", {
2798
2808
  key: 0,
2799
2809
  class: u(n(l).e("filter-clear")),
2800
2810
  onClick: f[4] || (f[4] = (g) => w("right"))
@@ -2804,24 +2814,24 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2804
2814
  class: u(n(l).e("body"))
2805
2815
  }, [
2806
2816
  (i(!0), d(J, null, _(H.value, (g) => (i(), d("div", {
2807
- key: S(g),
2817
+ key: z(g),
2808
2818
  class: u([
2809
2819
  n(l).e("item"),
2810
2820
  n(l).is("disabled", y(g)),
2811
- n(l).is("checked", $.value.includes(S(g)))
2821
+ n(l).is("checked", $.value.includes(z(g)))
2812
2822
  ]),
2813
- onClick: (X) => !y(g) && O(S(g))
2823
+ onClick: (X) => !y(g) && O(z(g))
2814
2824
  }, [
2815
2825
  r("label", {
2816
2826
  class: u(n(l).e("checkbox"))
2817
2827
  }, [
2818
2828
  r("input", {
2819
2829
  type: "checkbox",
2820
- checked: $.value.includes(S(g)),
2830
+ checked: $.value.includes(z(g)),
2821
2831
  disabled: y(g),
2822
2832
  onClick: f[5] || (f[5] = ue(() => {
2823
2833
  }, ["stop"])),
2824
- onChange: (X) => O(S(g))
2834
+ onChange: (X) => O(z(g))
2825
2835
  }, null, 40, Ql),
2826
2836
  r("span", null, U(I(g)), 1)
2827
2837
  ], 2)
@@ -2856,10 +2866,10 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2856
2866
  },
2857
2867
  emits: ["update:modelValue", "change", "input"],
2858
2868
  setup(s, { emit: k }) {
2859
- const a = s, e = k, t = ae("slider"), l = R(), c = R(), m = R(!1), b = R(!1), T = V(() => {
2869
+ const a = s, e = k, t = ae("slider"), l = R(), v = R(), m = R(!1), b = R(!1), T = V(() => {
2860
2870
  const w = a.max - a.min;
2861
2871
  return (a.modelValue - a.min) / w * 100;
2862
- }), z = V(() => a.formatTooltip ? a.formatTooltip(a.modelValue) : a.modelValue), D = V(() => {
2872
+ }), S = V(() => a.formatTooltip ? a.formatTooltip(a.modelValue) : a.modelValue), D = V(() => {
2863
2873
  if (!a.showStops || a.min >= a.max) return [];
2864
2874
  const w = [], C = (a.max - a.min) / a.step;
2865
2875
  for (let o = 0; o <= C; o++) {
@@ -2871,9 +2881,9 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2871
2881
  const C = Number(w), o = a.marks[C], f = (C - a.min) / (a.max - a.min) * 100;
2872
2882
  let g, X = {};
2873
2883
  return typeof o == "string" ? g = o : (g = o.label || String(C), X = o.style || {}), { value: C, pos: f, label: g, style: X };
2874
- }) : []), S = () => l.value ? a.vertical ? l.value.offsetHeight : l.value.offsetWidth : 0, I = (w, C) => {
2884
+ }) : []), z = () => l.value ? a.vertical ? l.value.offsetHeight : l.value.offsetWidth : 0, I = (w, C) => {
2875
2885
  if (!l.value) return a.modelValue;
2876
- const o = l.value.getBoundingClientRect(), f = S();
2886
+ const o = l.value.getBoundingClientRect(), f = z();
2877
2887
  let g;
2878
2888
  a.vertical ? g = (o.bottom - C) / f * 100 : g = (w - o.left) / f * 100, g = Math.max(0, Math.min(100, g));
2879
2889
  const X = a.min + g / 100 * (a.max - a.min), ne = Math.round(X / a.step) * a.step;
@@ -2902,7 +2912,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2902
2912
  if (!b.value) return;
2903
2913
  const C = w.touches[0], o = I(C.clientX, C.clientY);
2904
2914
  y(o);
2905
- }, v = () => {
2915
+ }, c = () => {
2906
2916
  b.value = !1, e("change", a.modelValue);
2907
2917
  }, x = () => {
2908
2918
  a.showTooltip && (m.value = !0);
@@ -2952,18 +2962,18 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2952
2962
  ])) : N("", !0),
2953
2963
  r("div", {
2954
2964
  ref_key: "buttonRef",
2955
- ref: c,
2965
+ ref: v,
2956
2966
  class: u(n(t).e("button-wrapper")),
2957
2967
  style: te(p.value),
2958
2968
  onMouseenter: x,
2959
2969
  onMouseleave: B,
2960
2970
  onTouchmove: h,
2961
- onTouchend: v
2971
+ onTouchend: c
2962
2972
  }, [
2963
2973
  s.showTooltip && m.value ? (i(), d("div", {
2964
2974
  key: 0,
2965
2975
  class: u(n(t).e("tooltip"))
2966
- }, U(z.value), 3)) : N("", !0),
2976
+ }, U(S.value), 3)) : N("", !0),
2967
2977
  r("div", {
2968
2978
  class: u(n(t).e("button"))
2969
2979
  }, null, 2)
@@ -3018,9 +3028,9 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3018
3028
  setup(s, { expose: k, emit: a }) {
3019
3029
  const e = s, t = a, l = ae("upload");
3020
3030
  Le();
3021
- const c = R(), m = R([...e.fileList]), b = R(!1);
3031
+ const v = R(), m = R([...e.fileList]), b = R(!1);
3022
3032
  let T = 1;
3023
- const z = () => Date.now() + T++, D = (p) => {
3033
+ const S = () => Date.now() + T++, D = (p) => {
3024
3034
  var o;
3025
3035
  const w = (o = p.name.split(".").pop()) == null ? void 0 : o.toLowerCase(), C = {
3026
3036
  pdf: "📄",
@@ -3037,14 +3047,14 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3037
3047
  default: "📁"
3038
3048
  };
3039
3049
  return C[w || ""] || C.default;
3040
- }, $ = V(() => e.limit ? m.value.length < e.limit : !0), S = V(() => [
3050
+ }, $ = V(() => e.limit ? m.value.length < e.limit : !0), z = V(() => [
3041
3051
  l.b(),
3042
3052
  l.is("disabled", e.disabled),
3043
3053
  l.is("drag", e.drag),
3044
3054
  l.m(e.listType)
3045
3055
  ]), I = (p) => {
3046
3056
  const w = p.target.files;
3047
- !w || w.length === 0 || (y(Array.from(w)), c.value && (c.value.value = ""));
3057
+ !w || w.length === 0 || (y(Array.from(w)), v.value && (v.value.value = ""));
3048
3058
  }, y = async (p) => {
3049
3059
  var w, C;
3050
3060
  if (e.limit && m.value.length + p.length > e.limit) {
@@ -3059,7 +3069,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3059
3069
  size: o.size,
3060
3070
  status: "ready",
3061
3071
  percentage: 0,
3062
- uid: z(),
3072
+ uid: S(),
3063
3073
  raw: o
3064
3074
  };
3065
3075
  o.type.startsWith("image/") && (f.thumbUrl = await L(o), f.url = f.thumbUrl), m.value.push(f), t("update:fileList", m.value), t("change", f, m.value), (C = e.onChange) == null || C.call(e, f, m.value), e.autoUpload && H(f);
@@ -3124,11 +3134,11 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3124
3134
  w > -1 && (m.value.splice(w, 1), t("update:fileList", m.value), t("remove", p, m.value), (C = e.onRemove) == null || C.call(e, p, m.value));
3125
3135
  }, h = () => {
3126
3136
  m.value.filter((p) => p.status === "ready" && p.raw).forEach((p) => H(p));
3127
- }, v = () => {
3137
+ }, c = () => {
3128
3138
  m.value = [], t("update:fileList", m.value);
3129
3139
  }, x = () => {
3130
3140
  var p;
3131
- e.disabled || (p = c.value) == null || p.click();
3141
+ e.disabled || (p = v.value) == null || p.click();
3132
3142
  }, B = (p) => {
3133
3143
  p.preventDefault(), !e.disabled && e.drag && (b.value = !0);
3134
3144
  }, F = () => {
@@ -3148,10 +3158,10 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3148
3158
  };
3149
3159
  return k({
3150
3160
  submit: h,
3151
- clearFiles: v,
3161
+ clearFiles: c,
3152
3162
  uploadFiles: m
3153
3163
  }), (p, w) => (i(), d("div", {
3154
- class: u(S.value)
3164
+ class: u(z.value)
3155
3165
  }, [
3156
3166
  s.drag ? (i(), d("div", {
3157
3167
  key: 0,
@@ -3360,7 +3370,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3360
3370
  ], 64)),
3361
3371
  r("input", {
3362
3372
  ref_key: "inputRef",
3363
- ref: c,
3373
+ ref: v,
3364
3374
  type: "file",
3365
3375
  class: u(n(l).e("input")),
3366
3376
  multiple: s.multiple,
@@ -3402,15 +3412,15 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3402
3412
  },
3403
3413
  emits: ["update:modelValue", "change"],
3404
3414
  setup(s, { emit: k }) {
3405
- const a = s, e = k, t = ae("rate"), l = R(-1), c = V(() => l.value > -1 ? l.value : a.modelValue), m = V(() => [
3415
+ const a = s, e = k, t = ae("rate"), l = R(-1), v = V(() => l.value > -1 ? l.value : a.modelValue), m = V(() => [
3406
3416
  t.b(),
3407
3417
  t.m(a.size),
3408
3418
  t.is("disabled", a.disabled),
3409
3419
  t.is("readonly", a.readonly)
3410
3420
  ]), b = (y) => a.disabled ? a.disabledVoidColor : y <= a.lowThreshold ? a.colors[0] : y <= a.highThreshold ? a.colors[1] || a.colors[0] : a.colors[2] || a.colors[1] || a.colors[0], T = (y) => {
3411
- const L = c.value;
3421
+ const L = v.value;
3412
3422
  return L >= y ? 100 : a.allowHalf && L >= y - 0.5 ? 50 : 0;
3413
- }, z = (y) => T(y) > 0 ? b(c.value) : a.disabled ? a.disabledVoidColor : a.voidColor, D = V(() => {
3423
+ }, S = (y) => T(y) > 0 ? b(v.value) : a.disabled ? a.disabledVoidColor : a.voidColor, D = V(() => {
3414
3424
  if (a.showScore)
3415
3425
  return a.scoreTemplate.replace("{value}", String(a.modelValue));
3416
3426
  if (a.showText) {
@@ -3425,7 +3435,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3425
3435
  l.value = M ? y - 0.5 : y;
3426
3436
  } else
3427
3437
  l.value = y;
3428
- }, S = () => {
3438
+ }, z = () => {
3429
3439
  a.disabled || a.readonly || (l.value = -1);
3430
3440
  }, I = (y, L) => {
3431
3441
  if (a.disabled || a.readonly) return;
@@ -3439,7 +3449,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3439
3449
  };
3440
3450
  return (y, L) => (i(), d("div", {
3441
3451
  class: u(m.value),
3442
- onMouseleave: S
3452
+ onMouseleave: z
3443
3453
  }, [
3444
3454
  r("div", {
3445
3455
  class: u(n(t).e("items"))
@@ -3457,7 +3467,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3457
3467
  r("span", {
3458
3468
  class: u([n(t).e("fill"), T(H) > 0 ? "is-active" : ""]),
3459
3469
  style: te({
3460
- color: z(H),
3470
+ color: S(H),
3461
3471
  clipPath: `inset(0 ${100 - T(H)}% 0 0)`
3462
3472
  })
3463
3473
  }, U(s.icon), 7)
@@ -3473,7 +3483,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3473
3483
  }), ga = ["value"], ba = { class: "field-type" }, ya = { class: "field-name" }, ka = { class: "field-label" }, Ma = {
3474
3484
  key: 0,
3475
3485
  class: "field-required"
3476
- }, Va = ["onClick"], xa = ["onClick"], wa = ["onClick"], Ca = ["onClick"], $a = { class: "modal-content" }, Da = { class: "modal-header" }, za = { class: "modal-body" }, Sa = { class: "edit-field" }, Ta = { class: "edit-field" }, Ha = { class: "edit-field" }, La = ["value"], Ra = { class: "edit-field" }, Ba = { class: "edit-field" }, ft = /* @__PURE__ */ le({
3486
+ }, Va = ["onClick"], xa = ["onClick"], wa = ["onClick"], Ca = ["onClick"], $a = { class: "modal-content" }, Da = { class: "modal-header" }, Sa = { class: "modal-body" }, za = { class: "edit-field" }, Ta = { class: "edit-field" }, Ha = { class: "edit-field" }, La = ["value"], Ra = { class: "edit-field" }, Ba = { class: "edit-field" }, ft = /* @__PURE__ */ le({
3477
3487
  name: "XDynamicFields",
3478
3488
  __name: "index",
3479
3489
  props: {
@@ -3493,17 +3503,17 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3493
3503
  },
3494
3504
  emits: ["update:fields", "add", "remove", "sort", "update"],
3495
3505
  setup(s, { emit: k }) {
3496
- const a = s, e = k, t = ae("dynamic-fields"), l = R([]), c = R(null), m = R("input"), b = V(() => [
3506
+ const a = s, e = k, t = ae("dynamic-fields"), l = R([]), v = R(null), m = R("input"), b = V(() => [
3497
3507
  t.b(),
3498
3508
  t.is("editable", a.editable)
3499
3509
  ]), T = V(() => l.value.length < a.maxFields);
3500
3510
  ie(() => a.fields, (h) => {
3501
- l.value = [...h].sort((v, x) => (v.order || 0) - (x.order || 0));
3511
+ l.value = [...h].sort((c, x) => (c.order || 0) - (x.order || 0));
3502
3512
  }, { immediate: !0, deep: !0 });
3503
- const z = () => `field_${Date.now()}_${Math.random().toString(36).slice(2, 7)}`, D = () => {
3513
+ const S = () => `field_${Date.now()}_${Math.random().toString(36).slice(2, 7)}`, D = () => {
3504
3514
  if (!T.value) return;
3505
3515
  const h = {
3506
- id: z(),
3516
+ id: S(),
3507
3517
  name: `field_${l.value.length + 1}`,
3508
3518
  label: "新字段",
3509
3519
  type: m.value,
@@ -3512,38 +3522,38 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3512
3522
  };
3513
3523
  l.value.push(h), e("add", h), e("update:fields", l.value);
3514
3524
  }, $ = (h) => {
3515
- const v = l.value.findIndex((x) => x.id === h);
3516
- v !== -1 && (l.value[v], l.value.splice(v, 1), e("remove", h), e("update:fields", l.value));
3517
- }, S = (h) => {
3518
- const v = l.value.findIndex((x) => x.id === h);
3519
- if (v > 0) {
3520
- const x = l.value[v];
3521
- l.value[v] = l.value[v - 1], l.value[v - 1] = x, y(), e("sort", l.value), e("update:fields", l.value);
3525
+ const c = l.value.findIndex((x) => x.id === h);
3526
+ c !== -1 && (l.value[c], l.value.splice(c, 1), e("remove", h), e("update:fields", l.value));
3527
+ }, z = (h) => {
3528
+ const c = l.value.findIndex((x) => x.id === h);
3529
+ if (c > 0) {
3530
+ const x = l.value[c];
3531
+ l.value[c] = l.value[c - 1], l.value[c - 1] = x, y(), e("sort", l.value), e("update:fields", l.value);
3522
3532
  }
3523
3533
  }, I = (h) => {
3524
- const v = l.value.findIndex((x) => x.id === h);
3525
- if (v < l.value.length - 1) {
3526
- const x = l.value[v];
3527
- l.value[v] = l.value[v + 1], l.value[v + 1] = x, y(), e("sort", l.value), e("update:fields", l.value);
3534
+ const c = l.value.findIndex((x) => x.id === h);
3535
+ if (c < l.value.length - 1) {
3536
+ const x = l.value[c];
3537
+ l.value[c] = l.value[c + 1], l.value[c + 1] = x, y(), e("sort", l.value), e("update:fields", l.value);
3528
3538
  }
3529
3539
  }, y = () => {
3530
- l.value.forEach((h, v) => {
3531
- h.order = v;
3540
+ l.value.forEach((h, c) => {
3541
+ h.order = c;
3532
3542
  });
3533
3543
  }, L = (h) => {
3534
- c.value = { ...h };
3544
+ v.value = { ...h };
3535
3545
  }, H = () => {
3536
- if (c.value) {
3537
- const h = l.value.findIndex((v) => v.id === c.value.id);
3538
- h !== -1 && (l.value[h] = c.value, e("update", c.value.id, c.value), e("update:fields", l.value)), c.value = null;
3546
+ if (v.value) {
3547
+ const h = l.value.findIndex((c) => c.id === v.value.id);
3548
+ h !== -1 && (l.value[h] = v.value, e("update", v.value.id, v.value), e("update:fields", l.value)), v.value = null;
3539
3549
  }
3540
3550
  }, P = () => {
3541
- c.value = null;
3551
+ v.value = null;
3542
3552
  }, M = (h) => {
3543
- const v = a.availableTypes.find((x) => x.value === h);
3544
- return (v == null ? void 0 : v.label) || h;
3553
+ const c = a.availableTypes.find((x) => x.value === h);
3554
+ return (c == null ? void 0 : c.label) || h;
3545
3555
  };
3546
- return (h, v) => (i(), d("div", {
3556
+ return (h, c) => (i(), d("div", {
3547
3557
  class: u(b.value)
3548
3558
  }, [
3549
3559
  s.editable && T.value ? (i(), d("div", {
@@ -3551,7 +3561,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3551
3561
  class: u(n(t).e("add"))
3552
3562
  }, [
3553
3563
  oe(r("select", {
3554
- "onUpdate:modelValue": v[0] || (v[0] = (x) => m.value = x),
3564
+ "onUpdate:modelValue": c[0] || (c[0] = (x) => m.value = x),
3555
3565
  class: u(n(t).e("type-select"))
3556
3566
  }, [
3557
3567
  (i(!0), d(J, null, _(s.availableTypes, (x) => (i(), d("option", {
@@ -3589,7 +3599,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3589
3599
  key: 0,
3590
3600
  class: "action-btn",
3591
3601
  title: "上移",
3592
- onClick: (B) => S(x.id)
3602
+ onClick: (B) => z(x.id)
3593
3603
  }, [
3594
3604
  Q(n(ee), {
3595
3605
  name: "move-up",
@@ -3633,16 +3643,16 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3633
3643
  l.value.length === 0 ? (i(), d("div", {
3634
3644
  key: 1,
3635
3645
  class: u(n(t).e("empty"))
3636
- }, [...v[6] || (v[6] = [
3646
+ }, [...c[6] || (c[6] = [
3637
3647
  r("span", null, "暂无字段配置", -1)
3638
3648
  ])], 2)) : N("", !0),
3639
- c.value ? (i(), d("div", {
3649
+ v.value ? (i(), d("div", {
3640
3650
  key: 2,
3641
3651
  class: u(n(t).e("edit-modal"))
3642
3652
  }, [
3643
3653
  r("div", $a, [
3644
3654
  r("div", Da, [
3645
- v[7] || (v[7] = r("span", null, "编辑字段", -1)),
3655
+ c[7] || (c[7] = r("span", null, "编辑字段", -1)),
3646
3656
  r("button", {
3647
3657
  class: "close-btn",
3648
3658
  onClick: P
@@ -3653,55 +3663,55 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3653
3663
  })
3654
3664
  ])
3655
3665
  ]),
3656
- r("div", za, [
3657
- r("div", Sa, [
3658
- v[8] || (v[8] = r("label", null, "字段名称", -1)),
3666
+ r("div", Sa, [
3667
+ r("div", za, [
3668
+ c[8] || (c[8] = r("label", null, "字段名称", -1)),
3659
3669
  oe(r("input", {
3660
- "onUpdate:modelValue": v[1] || (v[1] = (x) => c.value.name = x),
3670
+ "onUpdate:modelValue": c[1] || (c[1] = (x) => v.value.name = x),
3661
3671
  type: "text",
3662
3672
  placeholder: "变量名称"
3663
3673
  }, null, 512), [
3664
- [Me, c.value.name]
3674
+ [Me, v.value.name]
3665
3675
  ])
3666
3676
  ]),
3667
3677
  r("div", Ta, [
3668
- v[9] || (v[9] = r("label", null, "字段标签", -1)),
3678
+ c[9] || (c[9] = r("label", null, "字段标签", -1)),
3669
3679
  oe(r("input", {
3670
- "onUpdate:modelValue": v[2] || (v[2] = (x) => c.value.label = x),
3680
+ "onUpdate:modelValue": c[2] || (c[2] = (x) => v.value.label = x),
3671
3681
  type: "text",
3672
3682
  placeholder: "显示标签"
3673
3683
  }, null, 512), [
3674
- [Me, c.value.label]
3684
+ [Me, v.value.label]
3675
3685
  ])
3676
3686
  ]),
3677
3687
  r("div", Ha, [
3678
- v[10] || (v[10] = r("label", null, "字段类型", -1)),
3688
+ c[10] || (c[10] = r("label", null, "字段类型", -1)),
3679
3689
  oe(r("select", {
3680
- "onUpdate:modelValue": v[3] || (v[3] = (x) => c.value.type = x)
3690
+ "onUpdate:modelValue": c[3] || (c[3] = (x) => v.value.type = x)
3681
3691
  }, [
3682
3692
  (i(!0), d(J, null, _(s.availableTypes, (x) => (i(), d("option", {
3683
3693
  key: x.value,
3684
3694
  value: x.value
3685
3695
  }, U(x.label), 9, La))), 128))
3686
3696
  ], 512), [
3687
- [we, c.value.type]
3697
+ [we, v.value.type]
3688
3698
  ])
3689
3699
  ]),
3690
3700
  r("div", Ra, [
3691
- v[11] || (v[11] = r("label", null, "是否必填", -1)),
3701
+ c[11] || (c[11] = r("label", null, "是否必填", -1)),
3692
3702
  r("button", {
3693
- class: u(["switch-btn", { "is-on": c.value.required }]),
3694
- onClick: v[4] || (v[4] = (x) => c.value.required = !c.value.required)
3695
- }, U(c.value.required ? "必填" : "可选"), 3)
3703
+ class: u(["switch-btn", { "is-on": v.value.required }]),
3704
+ onClick: c[4] || (c[4] = (x) => v.value.required = !v.value.required)
3705
+ }, U(v.value.required ? "必填" : "可选"), 3)
3696
3706
  ]),
3697
3707
  r("div", Ba, [
3698
- v[12] || (v[12] = r("label", null, "占位文本", -1)),
3708
+ c[12] || (c[12] = r("label", null, "占位文本", -1)),
3699
3709
  oe(r("input", {
3700
- "onUpdate:modelValue": v[5] || (v[5] = (x) => c.value.placeholder = x),
3710
+ "onUpdate:modelValue": c[5] || (c[5] = (x) => v.value.placeholder = x),
3701
3711
  type: "text",
3702
3712
  placeholder: "输入提示"
3703
3713
  }, null, 512), [
3704
- [Me, c.value.placeholder]
3714
+ [Me, v.value.placeholder]
3705
3715
  ])
3706
3716
  ])
3707
3717
  ]),
@@ -3734,20 +3744,20 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3734
3744
  emits: ["update:modelValue", "change", "focus", "blur"],
3735
3745
  setup(s, { expose: k, emit: a }) {
3736
3746
  const e = s, t = a, l = Ee(
3737
- () => import("./index.esm-C9sEwyHF.mjs").then((v) => v.Editor)
3738
- ), c = Ee(
3739
- () => import("./index.esm-C9sEwyHF.mjs").then((v) => v.Toolbar)
3747
+ () => import("./index.esm-C9sEwyHF.mjs").then((c) => c.Editor)
3748
+ ), v = Ee(
3749
+ () => import("./index.esm-C9sEwyHF.mjs").then((c) => c.Toolbar)
3740
3750
  ), m = qe(), b = R(e.modelValue), T = R(!1);
3741
3751
  pe(() => {
3742
3752
  T.value = !0;
3743
3753
  }), ie(
3744
3754
  () => e.modelValue,
3745
- (v) => {
3746
- v !== b.value && (b.value = v);
3755
+ (c) => {
3756
+ c !== b.value && (b.value = c);
3747
3757
  }
3748
3758
  );
3749
- const z = V(() => ({ height: typeof e.height == "number" ? `${e.height}px` : e.height })), D = V(() => {
3750
- const v = {
3759
+ const S = V(() => ({ height: typeof e.height == "number" ? `${e.height}px` : e.height })), D = V(() => {
3760
+ const c = {
3751
3761
  excludeKeys: []
3752
3762
  };
3753
3763
  if (Array.isArray(e.toolbar)) {
@@ -3806,9 +3816,9 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3806
3816
  "redo",
3807
3817
  "fullScreen"
3808
3818
  ];
3809
- v.excludeKeys = x.filter((B) => !e.toolbar.includes(B));
3819
+ c.excludeKeys = x.filter((B) => !e.toolbar.includes(B));
3810
3820
  }
3811
- return v;
3821
+ return c;
3812
3822
  }), $ = V(() => ({
3813
3823
  placeholder: e.placeholder,
3814
3824
  readOnly: e.disabled,
@@ -3817,50 +3827,50 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3817
3827
  // 上传图片配置
3818
3828
  uploadImage: {
3819
3829
  // 自定义上传
3820
- async customUpload(v, x) {
3821
- const B = URL.createObjectURL(v);
3822
- x(B, v.name, B);
3830
+ async customUpload(c, x) {
3831
+ const B = URL.createObjectURL(c);
3832
+ x(B, c.name, B);
3823
3833
  }
3824
3834
  },
3825
3835
  // 上传视频配置
3826
3836
  uploadVideo: {
3827
- async customUpload(v, x) {
3828
- const B = URL.createObjectURL(v);
3837
+ async customUpload(c, x) {
3838
+ const B = URL.createObjectURL(c);
3829
3839
  x(B, "");
3830
3840
  }
3831
3841
  }
3832
3842
  }
3833
- })), S = (v) => {
3834
- m.value = v;
3835
- }, I = (v) => {
3836
- const x = v.getHtml();
3843
+ })), z = (c) => {
3844
+ m.value = c;
3845
+ }, I = (c) => {
3846
+ const x = c.getHtml();
3837
3847
  b.value = x, t("update:modelValue", x), t("change", x);
3838
- }, y = (v) => {
3839
- t("focus", v);
3840
- }, L = (v) => {
3841
- t("blur", v);
3848
+ }, y = (c) => {
3849
+ t("focus", c);
3850
+ }, L = (c) => {
3851
+ t("blur", c);
3842
3852
  };
3843
3853
  return k({
3844
3854
  getEditor: () => m.value,
3845
3855
  getText: () => {
3846
- var v;
3847
- return ((v = m.value) == null ? void 0 : v.getText()) || "";
3856
+ var c;
3857
+ return ((c = m.value) == null ? void 0 : c.getText()) || "";
3848
3858
  },
3849
- setHtml: (v) => {
3850
- b.value = v;
3859
+ setHtml: (c) => {
3860
+ b.value = c;
3851
3861
  },
3852
3862
  clear: () => {
3853
- var v;
3854
- b.value = "", (v = m.value) == null || v.clear();
3863
+ var c;
3864
+ b.value = "", (c = m.value) == null || c.clear();
3855
3865
  }
3856
3866
  }), je(() => {
3857
- const v = m.value;
3858
- v && v.destroy();
3859
- }), (v, x) => (i(), d("div", {
3867
+ const c = m.value;
3868
+ c && c.destroy();
3869
+ }), (c, x) => (i(), d("div", {
3860
3870
  class: u(["x-rich-editor", { "is-disabled": s.disabled }])
3861
3871
  }, [
3862
3872
  T.value ? (i(), d(J, { key: 0 }, [
3863
- s.toolbar !== !1 ? (i(), fe(n(c), {
3873
+ s.toolbar !== !1 ? (i(), fe(n(v), {
3864
3874
  key: 0,
3865
3875
  editor: m.value,
3866
3876
  "default-config": D.value,
@@ -3872,16 +3882,16 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3872
3882
  "onUpdate:modelValue": x[0] || (x[0] = (B) => b.value = B),
3873
3883
  "default-config": $.value,
3874
3884
  mode: s.mode,
3875
- style: te(z.value),
3885
+ style: te(S.value),
3876
3886
  class: "x-rich-editor__content",
3877
- onOnCreated: S,
3887
+ onOnCreated: z,
3878
3888
  onOnChange: I,
3879
3889
  onOnFocus: y,
3880
3890
  onOnBlur: L
3881
3891
  }, null, 8, ["modelValue", "default-config", "mode", "style"])
3882
3892
  ], 64)) : (i(), d("div", {
3883
3893
  key: 1,
3884
- style: te(z.value),
3894
+ style: te(S.value),
3885
3895
  class: "x-rich-editor__placeholder"
3886
3896
  }, U(s.placeholder), 5))
3887
3897
  ], 2));
@@ -3903,7 +3913,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3903
3913
  },
3904
3914
  emits: ["update:modelValue", "change"],
3905
3915
  setup(s, { emit: k }) {
3906
- const a = s, e = k, t = ae("cascader"), l = R(!1), c = R([]), m = R([]);
3916
+ const a = s, e = k, t = ae("cascader"), l = R(!1), v = R([]), m = R([]);
3907
3917
  R("");
3908
3918
  const b = R(""), T = R();
3909
3919
  V(() => ({
@@ -3912,20 +3922,20 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3912
3922
  children: a.props.children || "children",
3913
3923
  disabled: a.props.disabled || "disabled"
3914
3924
  }));
3915
- const z = V(() => a.props.multiple), D = V(() => a.props.checkStrictly), $ = V(() => {
3916
- if (z.value)
3925
+ const S = V(() => a.props.multiple), D = V(() => a.props.checkStrictly), $ = V(() => {
3926
+ if (S.value)
3917
3927
  return m.value.length === 0 ? "" : m.value.map((w) => y(w)).join(", ");
3918
- if (c.value.length === 0) return "";
3928
+ if (v.value.length === 0) return "";
3919
3929
  if (a.showAllLevels)
3920
- return c.value.map((w) => L(w, c.value)).join(a.separator);
3921
- const p = c.value[c.value.length - 1];
3922
- return L(p, c.value);
3923
- }), S = V(() => {
3930
+ return v.value.map((w) => L(w, v.value)).join(a.separator);
3931
+ const p = v.value[v.value.length - 1];
3932
+ return L(p, v.value);
3933
+ }), z = V(() => {
3924
3934
  var w;
3925
3935
  const p = [a.options];
3926
- if (c.value.length > 0) {
3936
+ if (v.value.length > 0) {
3927
3937
  let C = a.options;
3928
- for (const o of c.value) {
3938
+ for (const o of v.value) {
3929
3939
  const f = C.find((g) => g.value === o);
3930
3940
  if ((w = f == null ? void 0 : f.children) != null && w.length)
3931
3941
  p.push(f.children), C = f.children;
@@ -3958,33 +3968,33 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3958
3968
  }, H = (p, w) => {
3959
3969
  var o;
3960
3970
  if (p.disabled) return;
3961
- const C = c.value.slice(0, w);
3962
- C.push(p.value), c.value = C, (!((o = p.children) != null && o.length) || D.value) && (z.value || (l.value = !1, v(C)));
3971
+ const C = v.value.slice(0, w);
3972
+ C.push(p.value), v.value = C, (!((o = p.children) != null && o.length) || D.value) && (S.value || (l.value = !1, c(C)));
3963
3973
  }, P = (p, w, C) => {
3964
- const o = [...c.value.slice(0, w), p.value];
3974
+ const o = [...v.value.slice(0, w), p.value];
3965
3975
  C ? m.value.some((f) => JSON.stringify(f) === JSON.stringify(o)) || m.value.push(o) : m.value = m.value.filter((f) => JSON.stringify(f) !== JSON.stringify(o)), x();
3966
3976
  }, M = (p, w) => {
3967
- const C = [...c.value.slice(0, w), p.value];
3977
+ const C = [...v.value.slice(0, w), p.value];
3968
3978
  return m.value.some((o) => JSON.stringify(o) === JSON.stringify(C));
3969
- }, h = (p, w) => c.value[w] === p.value, v = (p) => {
3979
+ }, h = (p, w) => v.value[w] === p.value, c = (p) => {
3970
3980
  const w = a.props.emitPath !== !1 ? p : p[p.length - 1];
3971
3981
  e("update:modelValue", w), e("change", w);
3972
3982
  }, x = () => {
3973
3983
  const p = a.props.emitPath !== !1 ? m.value : m.value.map((w) => w[w.length - 1]);
3974
3984
  e("update:modelValue", p), e("change", p);
3975
3985
  }, B = () => {
3976
- c.value = [], m.value = [], e("update:modelValue", z.value ? [] : ""), e("change", z.value ? [] : "");
3986
+ v.value = [], m.value = [], e("update:modelValue", S.value ? [] : ""), e("change", S.value ? [] : "");
3977
3987
  }, F = (p) => {
3978
3988
  b.value = p.target.value;
3979
3989
  }, O = (p) => {
3980
- c.value = p.map((w) => w.value), b.value = "", l.value = !1, v(c.value);
3990
+ v.value = p.map((w) => w.value), b.value = "", l.value = !1, c(v.value);
3981
3991
  }, j = (p) => {
3982
3992
  p.target.closest(`.${t.b()}`) || (l.value = !1);
3983
3993
  };
3984
3994
  return ie(l, (p) => {
3985
3995
  p ? document.addEventListener("click", j) : (document.removeEventListener("click", j), b.value = "");
3986
3996
  }), ie(() => a.modelValue, (p) => {
3987
- z.value ? m.value = Array.isArray(p) ? p : [] : Array.isArray(p) ? c.value = p : p !== "" && p !== null && p !== void 0 ? c.value = [p] : c.value = [];
3997
+ S.value ? m.value = Array.isArray(p) ? p : [] : Array.isArray(p) ? v.value = p : p !== "" && p !== null && p !== void 0 ? v.value = [p] : v.value = [];
3988
3998
  }, { immediate: !0 }), (p, w) => (i(), d("div", {
3989
3999
  class: u([n(t).b(), n(t).m(s.size), n(t).is("disabled", s.disabled)]),
3990
4000
  onClick: w[2] || (w[2] = ue(() => {
@@ -4052,7 +4062,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4052
4062
  ref_key: "menuRef",
4053
4063
  ref: T
4054
4064
  }, [
4055
- (i(!0), d(J, null, _(S.value, (C, o) => (i(), d("div", {
4065
+ (i(!0), d(J, null, _(z.value, (C, o) => (i(), d("div", {
4056
4066
  key: o,
4057
4067
  class: u(n(t).e("column"))
4058
4068
  }, [
@@ -4067,7 +4077,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4067
4077
  ]),
4068
4078
  onClick: (X) => H(f, o)
4069
4079
  }, [
4070
- z.value ? (i(), d("span", {
4080
+ S.value ? (i(), d("span", {
4071
4081
  key: 0,
4072
4082
  class: u(n(t).e("checkbox")),
4073
4083
  onClick: w[1] || (w[1] = ue(() => {
@@ -4112,7 +4122,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4112
4122
  },
4113
4123
  emits: ["update:modelValue", "change"],
4114
4124
  setup(s, { emit: k }) {
4115
- const a = s, e = k, t = ae("color-picker"), l = R(!1), c = R(0), m = R(100), b = R(100), T = R(100), z = R(), D = R(), $ = V(() => y(c.value, m.value, b.value)), S = V(() => a.showAlpha ? `${$.value}${Math.round(T.value * 2.55).toString(16).padStart(2, "0")}` : $.value), I = V(() => a.modelValue || $.value), y = (F, O, j) => {
4125
+ const a = s, e = k, t = ae("color-picker"), l = R(!1), v = R(0), m = R(100), b = R(100), T = R(100), S = R(), D = R(), $ = V(() => y(v.value, m.value, b.value)), z = V(() => a.showAlpha ? `${$.value}${Math.round(T.value * 2.55).toString(16).padStart(2, "0")}` : $.value), I = V(() => a.modelValue || $.value), y = (F, O, j) => {
4116
4126
  O /= 100, j /= 100;
4117
4127
  const p = j * O, w = p * (1 - Math.abs(F / 60 % 2 - 1)), C = j - p;
4118
4128
  let o = 0, f = 0, g = 0;
@@ -4138,22 +4148,22 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4138
4148
  }
4139
4149
  return { h: f, s: g * 100, v: X * 100 };
4140
4150
  }, H = (F) => {
4141
- if (!z.value) return;
4142
- const O = z.value.getBoundingClientRect(), j = Math.max(0, Math.min(1, (F.clientX - O.left) / O.width)), p = Math.max(0, Math.min(1, (F.clientY - O.top) / O.height));
4151
+ if (!S.value) return;
4152
+ const O = S.value.getBoundingClientRect(), j = Math.max(0, Math.min(1, (F.clientX - O.left) / O.width)), p = Math.max(0, Math.min(1, (F.clientY - O.top) / O.height));
4143
4153
  m.value = Math.round(j * 100), b.value = Math.round((1 - p) * 100);
4144
4154
  }, P = (F) => {
4145
4155
  if (!D.value) return;
4146
4156
  const O = D.value.getBoundingClientRect(), j = Math.max(0, Math.min(1, (F.clientX - O.left) / O.width));
4147
- c.value = Math.round(j * 360);
4157
+ v.value = Math.round(j * 360);
4148
4158
  }, M = (F) => {
4149
4159
  if (!D.value) return;
4150
4160
  const O = D.value.getBoundingClientRect(), j = Math.max(0, Math.min(1, (F.clientX - O.left) / O.width));
4151
4161
  T.value = Math.round(j * 100);
4152
4162
  }, h = (F) => {
4153
4163
  const O = L(F);
4154
- c.value = O.h, m.value = O.s, b.value = O.v, e("update:modelValue", F), e("change", F);
4155
- }, v = () => {
4156
- e("update:modelValue", S.value), e("change", S.value), l.value = !1;
4164
+ v.value = O.h, m.value = O.s, b.value = O.v, e("update:modelValue", F), e("change", F);
4165
+ }, c = () => {
4166
+ e("update:modelValue", z.value), e("change", z.value), l.value = !1;
4157
4167
  }, x = () => {
4158
4168
  e("update:modelValue", ""), e("change", ""), l.value = !1;
4159
4169
  }, B = (F) => {
@@ -4163,7 +4173,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4163
4173
  if (F) {
4164
4174
  if (document.addEventListener("click", B), a.modelValue) {
4165
4175
  const O = L(a.modelValue.slice(0, 7));
4166
- c.value = O.h, m.value = O.s, b.value = O.v, a.showAlpha && a.modelValue.length === 9 && (T.value = Math.round(parseInt(a.modelValue.slice(7, 9), 16) / 2.55));
4176
+ v.value = O.h, m.value = O.s, b.value = O.v, a.showAlpha && a.modelValue.length === 9 && (T.value = Math.round(parseInt(a.modelValue.slice(7, 9), 16) / 2.55));
4167
4177
  }
4168
4178
  } else
4169
4179
  document.removeEventListener("click", B);
@@ -4192,10 +4202,10 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4192
4202
  }, [
4193
4203
  r("div", {
4194
4204
  ref_key: "panelRef",
4195
- ref: z,
4205
+ ref: S,
4196
4206
  class: u(n(t).e("panel")),
4197
4207
  style: te({
4198
- backgroundColor: `hsl(${c.value}, 100%, 50%)`
4208
+ backgroundColor: `hsl(${v.value}, 100%, 50%)`
4199
4209
  }),
4200
4210
  onClick: H
4201
4211
  }, [
@@ -4224,7 +4234,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4224
4234
  }, [
4225
4235
  r("div", {
4226
4236
  class: u(n(t).e("hue-thumb")),
4227
- style: te({ left: `${c.value / 360 * 100}%` })
4237
+ style: te({ left: `${v.value / 360 * 100}%` })
4228
4238
  }, null, 6)
4229
4239
  ], 2)
4230
4240
  ], 2),
@@ -4261,7 +4271,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4261
4271
  }, [
4262
4272
  r("span", {
4263
4273
  class: u(n(t).e("value"))
4264
- }, U(S.value), 3),
4274
+ }, U(z.value), 3),
4265
4275
  r("div", {
4266
4276
  class: u(n(t).e("btns"))
4267
4277
  }, [
@@ -4271,7 +4281,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4271
4281
  }, "清空", 2),
4272
4282
  r("button", {
4273
4283
  class: u([n(t).e("btn"), n(t).e("btn--primary")]),
4274
- onClick: v
4284
+ onClick: c
4275
4285
  }, "确定", 2)
4276
4286
  ], 2)
4277
4287
  ], 2)
@@ -4297,23 +4307,23 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4297
4307
  },
4298
4308
  emits: ["update:modelValue", "select", "clear"],
4299
4309
  setup(s, { emit: k }) {
4300
- const a = s, e = k, t = ae("auto-complete"), l = R(!1), c = R(a.modelValue), m = R([]), b = R(-1), T = R(), z = R(!1);
4310
+ const a = s, e = k, t = ae("auto-complete"), l = R(!1), v = R(a.modelValue), m = R([]), b = R(-1), T = R(), S = R(!1);
4301
4311
  let D = null;
4302
4312
  const $ = (M) => {
4303
- a.fetchSuggestions ? (z.value = !0, a.fetchSuggestions(M, (h) => {
4304
- m.value = h, z.value = !1, l.value = h.length > 0;
4313
+ a.fetchSuggestions ? (S.value = !0, a.fetchSuggestions(M, (h) => {
4314
+ m.value = h, S.value = !1, l.value = h.length > 0;
4305
4315
  })) : a.suggestions.length && (m.value = a.suggestions.filter(
4306
4316
  (h) => h[a.valueKey].toLowerCase().includes(M.toLowerCase())
4307
4317
  ), l.value = m.value.length > 0);
4308
- }, S = (M) => {
4318
+ }, z = (M) => {
4309
4319
  const h = M.target.value;
4310
- c.value = h, e("update:modelValue", h), b.value = -1, D && clearTimeout(D), D = setTimeout(() => {
4320
+ v.value = h, e("update:modelValue", h), b.value = -1, D && clearTimeout(D), D = setTimeout(() => {
4311
4321
  h || a.triggerOnFocus ? $(h) : l.value = !1;
4312
4322
  }, a.debounce);
4313
4323
  }, I = () => {
4314
- a.triggerOnFocus && c.value === "" && $("");
4324
+ a.triggerOnFocus && v.value === "" && $("");
4315
4325
  }, y = (M) => {
4316
- c.value = M[a.valueKey], e("update:modelValue", c.value), e("select", M), l.value = !1;
4326
+ v.value = M[a.valueKey], e("update:modelValue", v.value), e("select", M), l.value = !1;
4317
4327
  }, L = (M) => {
4318
4328
  if (l.value)
4319
4329
  switch (M.key) {
@@ -4335,14 +4345,14 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4335
4345
  }
4336
4346
  }, H = () => {
4337
4347
  var M;
4338
- c.value = "", e("update:modelValue", ""), e("clear"), l.value = !1, (M = T.value) == null || M.focus();
4348
+ v.value = "", e("update:modelValue", ""), e("clear"), l.value = !1, (M = T.value) == null || M.focus();
4339
4349
  }, P = (M) => {
4340
4350
  M.target.closest(`.${t.b()}`) || (l.value = !1);
4341
4351
  };
4342
4352
  return ie(l, (M) => {
4343
4353
  M ? document.addEventListener("click", P) : (document.removeEventListener("click", P), b.value = -1);
4344
4354
  }), ie(() => a.modelValue, (M) => {
4345
- c.value = M;
4355
+ v.value = M;
4346
4356
  }), (M, h) => (i(), d("div", {
4347
4357
  class: u([n(t).b(), n(t).m(s.size)]),
4348
4358
  onClick: h[0] || (h[0] = ue(() => {
@@ -4354,15 +4364,15 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4354
4364
  r("input", {
4355
4365
  ref_key: "inputRef",
4356
4366
  ref: T,
4357
- value: c.value,
4367
+ value: v.value,
4358
4368
  placeholder: s.placeholder,
4359
4369
  disabled: s.disabled,
4360
4370
  class: u(n(t).e("inner")),
4361
- onInput: S,
4371
+ onInput: z,
4362
4372
  onFocus: I,
4363
4373
  onKeydown: L
4364
4374
  }, null, 42, Ea),
4365
- s.clearable && c.value ? (i(), d("span", {
4375
+ s.clearable && v.value ? (i(), d("span", {
4366
4376
  key: 0,
4367
4377
  class: u(n(t).e("clear")),
4368
4378
  onClick: H
@@ -4372,7 +4382,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4372
4382
  size: 14
4373
4383
  })
4374
4384
  ], 2)) : N("", !0),
4375
- z.value ? (i(), d("span", {
4385
+ S.value ? (i(), d("span", {
4376
4386
  key: 1,
4377
4387
  class: u(n(t).e("loading"))
4378
4388
  }, [
@@ -4388,16 +4398,16 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4388
4398
  r("ul", {
4389
4399
  class: u(n(t).e("list"))
4390
4400
  }, [
4391
- (i(!0), d(J, null, _(m.value, (v, x) => (i(), d("li", {
4401
+ (i(!0), d(J, null, _(m.value, (c, x) => (i(), d("li", {
4392
4402
  key: x,
4393
4403
  class: u([
4394
4404
  n(t).e("item"),
4395
4405
  n(t).is("highlighted", x === b.value)
4396
4406
  ]),
4397
- onClick: (B) => y(v)
4407
+ onClick: (B) => y(c)
4398
4408
  }, [
4399
- se(M.$slots, "default", { item: v }, () => [
4400
- de(U(v[s.valueKey]), 1)
4409
+ se(M.$slots, "default", { item: c }, () => [
4410
+ de(U(c[s.valueKey]), 1)
4401
4411
  ])
4402
4412
  ], 10, Ya))), 128))
4403
4413
  ], 2)
@@ -4418,17 +4428,17 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4418
4428
  },
4419
4429
  emits: ["update:modelValue", "change"],
4420
4430
  setup(s, { emit: k }) {
4421
- const a = s, e = k, t = ae("segmented"), l = R(), c = V(() => a.options.map((z) => typeof z == "string" || typeof z == "number" ? { label: String(z), value: z } : z)), m = V(() => c.value.findIndex((z) => z.value === a.modelValue)), b = V(() => {
4431
+ const a = s, e = k, t = ae("segmented"), l = R(), v = V(() => a.options.map((S) => typeof S == "string" || typeof S == "number" ? { label: String(S), value: S } : S)), m = V(() => v.value.findIndex((S) => S.value === a.modelValue)), b = V(() => {
4422
4432
  if (!l.value || m.value < 0) return {};
4423
4433
  const D = l.value.querySelectorAll(`.${t.e("item")}`)[m.value];
4424
4434
  return D ? {
4425
4435
  width: `${D.offsetWidth}px`,
4426
4436
  transform: `translateX(${D.offsetLeft}px)`
4427
4437
  } : {};
4428
- }), T = (z) => {
4429
- a.disabled || z.disabled || (e("update:modelValue", z.value), e("change", z.value));
4438
+ }), T = (S) => {
4439
+ a.disabled || S.disabled || (e("update:modelValue", S.value), e("change", S.value));
4430
4440
  };
4431
- return (z, D) => (i(), d("div", {
4441
+ return (S, D) => (i(), d("div", {
4432
4442
  ref_key: "containerRef",
4433
4443
  ref: l,
4434
4444
  class: u([
@@ -4442,16 +4452,16 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4442
4452
  class: u(n(t).e("thumb")),
4443
4453
  style: te(b.value)
4444
4454
  }, null, 6),
4445
- (i(!0), d(J, null, _(c.value, ($, S) => (i(), d("div", {
4446
- key: S,
4455
+ (i(!0), d(J, null, _(v.value, ($, z) => (i(), d("div", {
4456
+ key: z,
4447
4457
  class: u([
4448
4458
  n(t).e("item"),
4449
- n(t).is("selected", S === m.value),
4459
+ n(t).is("selected", z === m.value),
4450
4460
  n(t).is("disabled", $.disabled)
4451
4461
  ]),
4452
4462
  onClick: (I) => T($)
4453
4463
  }, [
4454
- se(z.$slots, "default", { option: $ }, () => [
4464
+ se(S.$slots, "default", { option: $ }, () => [
4455
4465
  de(U($.label), 1)
4456
4466
  ])
4457
4467
  ], 10, Ua))), 128))
@@ -4472,26 +4482,26 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4472
4482
  },
4473
4483
  emits: ["update:modelValue", "select", "change"],
4474
4484
  setup(s, { emit: k }) {
4475
- const a = s, e = k, t = ae("mention"), l = R(a.modelValue), c = R(!1), m = R([]), b = R(-1), T = R(), z = R(), D = R(0), $ = R(-1), S = (M) => {
4476
- m.value = a.options.filter((h) => h.disabled ? !1 : (h.label || h.value).toLowerCase().includes(M.toLowerCase())), c.value = m.value.length > 0, b.value = -1;
4485
+ const a = s, e = k, t = ae("mention"), l = R(a.modelValue), v = R(!1), m = R([]), b = R(-1), T = R(), S = R(), D = R(0), $ = R(-1), z = (M) => {
4486
+ m.value = a.options.filter((h) => h.disabled ? !1 : (h.label || h.value).toLowerCase().includes(M.toLowerCase())), v.value = m.value.length > 0, b.value = -1;
4477
4487
  }, I = (M) => {
4478
4488
  const h = M.target;
4479
4489
  l.value = h.value, D.value = h.selectionStart || 0;
4480
- const v = l.value.slice(0, D.value), x = v.lastIndexOf(a.prefix);
4490
+ const c = l.value.slice(0, D.value), x = c.lastIndexOf(a.prefix);
4481
4491
  if (x >= 0) {
4482
- const B = v.slice(x + a.prefix.length);
4483
- $.value = x, S(B);
4492
+ const B = c.slice(x + a.prefix.length);
4493
+ $.value = x, z(B);
4484
4494
  } else
4485
- c.value = !1;
4495
+ v.value = !1;
4486
4496
  e("update:modelValue", l.value), e("change", l.value);
4487
4497
  }, y = (M) => {
4488
- const h = l.value.slice(0, $.value), v = l.value.slice(D.value), x = `${a.prefix}${M.value}${a.split}`;
4489
- l.value = h + x + v, e("update:modelValue", l.value), e("select", M, a.prefix), e("change", l.value), c.value = !1, De(() => {
4498
+ const h = l.value.slice(0, $.value), c = l.value.slice(D.value), x = `${a.prefix}${M.value}${a.split}`;
4499
+ l.value = h + x + c, e("update:modelValue", l.value), e("select", M, a.prefix), e("change", l.value), v.value = !1, De(() => {
4490
4500
  const B = h.length + x.length;
4491
- T.value && (T.value.setSelectionRange(B, B), T.value.focus()), z.value && (z.value.setSelectionRange(B, B), z.value.focus());
4501
+ T.value && (T.value.setSelectionRange(B, B), T.value.focus()), S.value && (S.value.setSelectionRange(B, B), S.value.focus());
4492
4502
  });
4493
4503
  }, L = (M) => {
4494
- if (c.value)
4504
+ if (v.value)
4495
4505
  switch (M.key) {
4496
4506
  case "ArrowDown":
4497
4507
  M.preventDefault(), b.value = Math.min(
@@ -4506,15 +4516,15 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4506
4516
  M.preventDefault(), b.value >= 0 && y(m.value[b.value]);
4507
4517
  break;
4508
4518
  case "Escape":
4509
- c.value = !1;
4519
+ v.value = !1;
4510
4520
  break;
4511
4521
  }
4512
4522
  }, H = () => {
4513
4523
  l.value = "", e("update:modelValue", ""), e("change", "");
4514
4524
  }, P = (M) => {
4515
- M.target.closest(`.${t.b()}`) || (c.value = !1);
4525
+ M.target.closest(`.${t.b()}`) || (v.value = !1);
4516
4526
  };
4517
- return ie(c, (M) => {
4527
+ return ie(v, (M) => {
4518
4528
  M ? document.addEventListener("click", P) : document.removeEventListener("click", P);
4519
4529
  }), ie(() => a.modelValue, (M) => {
4520
4530
  l.value = M;
@@ -4524,7 +4534,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4524
4534
  }, ["stop"]))
4525
4535
  }, [
4526
4536
  r("div", {
4527
- class: u([n(t).e("input"), n(t).is("focus", c.value)])
4537
+ class: u([n(t).e("input"), n(t).is("focus", v.value)])
4528
4538
  }, [
4529
4539
  r("input", {
4530
4540
  ref_key: "inputRef",
@@ -4553,30 +4563,30 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4553
4563
  r("ul", {
4554
4564
  class: u(n(t).e("list"))
4555
4565
  }, [
4556
- (i(!0), d(J, null, _(m.value, (v, x) => (i(), d("li", {
4557
- key: v.value,
4566
+ (i(!0), d(J, null, _(m.value, (c, x) => (i(), d("li", {
4567
+ key: c.value,
4558
4568
  class: u([
4559
4569
  n(t).e("item"),
4560
4570
  n(t).is("highlighted", x === b.value),
4561
- n(t).is("disabled", v.disabled)
4571
+ n(t).is("disabled", c.disabled)
4562
4572
  ]),
4563
- onClick: (B) => y(v)
4573
+ onClick: (B) => y(c)
4564
4574
  }, [
4565
- v.avatar ? (i(), d("img", {
4575
+ c.avatar ? (i(), d("img", {
4566
4576
  key: 0,
4567
- src: v.avatar,
4577
+ src: c.avatar,
4568
4578
  class: u(n(t).e("avatar"))
4569
4579
  }, null, 10, Ka)) : N("", !0),
4570
4580
  r("span", {
4571
4581
  class: u(n(t).e("label"))
4572
- }, U(v.label || v.value), 3),
4582
+ }, U(c.label || c.value), 3),
4573
4583
  r("span", {
4574
4584
  class: u(n(t).e("value"))
4575
- }, U(v.value), 3)
4585
+ }, U(c.value), 3)
4576
4586
  ], 10, Xa))), 128))
4577
4587
  ], 2)
4578
4588
  ], 2), [
4579
- [ge, c.value]
4589
+ [ge, v.value]
4580
4590
  ])
4581
4591
  ], 2));
4582
4592
  }