@nhdropshipping/y-components 1.0.36 → 1.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -49,47 +49,47 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
49
49
  return "group-pos-single";
50
50
  }
51
51
  }), h = Y(() => Array.isArray(t.groupItems) && t.groupItems.length > 0);
52
- function I(C, T) {
52
+ function I(C, z) {
53
53
  if (t.disabled || t.loading || C.disabled || C.loading) {
54
- T.preventDefault(), T.stopPropagation();
54
+ z.preventDefault(), z.stopPropagation();
55
55
  return;
56
56
  }
57
- n("group-click", C.value, T);
57
+ n("group-click", C.value, z);
58
58
  }
59
- return (C, T) => h.value ? (i(), u("div", dt, [
60
- (i(!0), u(ae, null, de(e.groupItems, (k, w) => {
59
+ return (C, z) => h.value ? (i(), u("div", dt, [
60
+ (i(!0), u(ae, null, de(e.groupItems, (x, b) => {
61
61
  var g;
62
62
  return i(), u("button", {
63
- key: k.value ?? w,
63
+ key: x.value ?? b,
64
64
  class: E(["y-btn", [
65
- `y-btn--${k.variant ?? e.variant}`,
66
- `y-btn--${k.size ?? e.size}`,
65
+ `y-btn--${x.variant ?? e.variant}`,
66
+ `y-btn--${x.size ?? e.size}`,
67
67
  "is-grouped",
68
- w === 0 ? "group-pos-start" : w === (((g = e.groupItems) == null ? void 0 : g.length) || 0) - 1 ? "group-pos-end" : "group-pos-middle",
69
- { "is-loading": k.loading || e.loading }
68
+ b === 0 ? "group-pos-start" : b === (((g = e.groupItems) == null ? void 0 : g.length) || 0) - 1 ? "group-pos-end" : "group-pos-middle",
69
+ { "is-loading": x.loading || e.loading }
70
70
  ]]),
71
71
  type: e.htmlType,
72
- disabled: (k.disabled ?? !1) || e.disabled || e.loading || k.loading,
73
- "aria-busy": k.loading || e.loading ? "true" : "false",
74
- "aria-disabled": (k.disabled ?? !1) || e.disabled || e.loading || k.loading ? "true" : "false",
75
- "aria-label": k.ariaLabel || k.label,
76
- onClick: (x) => I(k, x)
72
+ disabled: (x.disabled ?? !1) || e.disabled || e.loading || x.loading,
73
+ "aria-busy": x.loading || e.loading ? "true" : "false",
74
+ "aria-disabled": (x.disabled ?? !1) || e.disabled || e.loading || x.loading ? "true" : "false",
75
+ "aria-label": x.ariaLabel || x.label,
76
+ onClick: (k) => I(x, k)
77
77
  }, [
78
78
  o("span", vt, [
79
- k.icon === "chevron-left" ? (i(), u("svg", ht, [...T[0] || (T[0] = [
79
+ x.icon === "chevron-left" ? (i(), u("svg", ht, [...z[0] || (z[0] = [
80
80
  o("path", {
81
81
  "fill-rule": "evenodd",
82
82
  d: "M12.78 15.22a.75.75 0 01-1.06 0l-5-5a.75.75 0 010-1.06l5-5a.75.75 0 111.06 1.06L8.81 10l3.97 3.97a.75.75 0 010 1.06z",
83
83
  "clip-rule": "evenodd"
84
84
  }, null, -1)
85
- ])])) : k.icon === "chevron-right" ? (i(), u("svg", pt, [...T[1] || (T[1] = [
85
+ ])])) : x.icon === "chevron-right" ? (i(), u("svg", pt, [...z[1] || (z[1] = [
86
86
  o("path", {
87
87
  "fill-rule": "evenodd",
88
88
  d: "M7.22 4.78a.75.75 0 011.06 0l5 5a.75.75 0 010 1.06l-5 5a.75.75 0 11-1.06-1.06L11.19 10 7.22 6.03a.75.75 0 010-1.06z",
89
89
  "clip-rule": "evenodd"
90
90
  }, null, -1)
91
91
  ])])) : W("", !0),
92
- k.label && !k.onlyIcon ? (i(), u("span", yt, ee(k.label), 1)) : W("", !0)
92
+ x.label && !x.onlyIcon ? (i(), u("span", yt, ee(x.label), 1)) : W("", !0)
93
93
  ])
94
94
  ], 10, ft);
95
95
  }), 128))
@@ -141,17 +141,17 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
141
141
  te(() => t.placeholder, (g) => {
142
142
  I.value || (C.value = g || "");
143
143
  });
144
- function T(g) {
145
- const x = g.target;
146
- h.value = !0, n("update:modelValue", x.value);
144
+ function z(g) {
145
+ const k = g.target;
146
+ h.value = !0, n("update:modelValue", k.value);
147
147
  }
148
- function k() {
148
+ function x() {
149
149
  I.value = !0, t.clearOnFocus && (y.value = t.modelValue || "", h.value = !1, C.value = y.value || t.placeholder || "", n("update:modelValue", ""));
150
150
  }
151
- function w() {
151
+ function b() {
152
152
  I.value = !1, t.clearOnFocus && !h.value && (!t.modelValue || t.modelValue === "") && n("update:modelValue", y.value), C.value = t.placeholder || "";
153
153
  }
154
- return (g, x) => (i(), u("div", {
154
+ return (g, k) => (i(), u("div", {
155
155
  class: E(["y-input-wrap", { "is-block": e.block }]),
156
156
  style: ve({ width: e.width })
157
157
  }, [
@@ -168,9 +168,9 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
168
168
  disabled: e.disabled,
169
169
  required: e.required,
170
170
  value: e.modelValue,
171
- onInput: T,
172
- onFocus: k,
173
- onBlur: w
171
+ onInput: z,
172
+ onFocus: x,
173
+ onBlur: b
174
174
  }, null, 42, mt)
175
175
  ], 6));
176
176
  }
@@ -234,13 +234,13 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
234
234
  },
235
235
  emits: ["edit", "select", "update:selectedItems", "page-change", "page-size-change"],
236
236
  setup(e, { emit: $ }) {
237
- const t = e, n = $, m = K(t.currentPage || 1), y = K(t.pageSize), h = K([]), I = K(/* @__PURE__ */ new Set()), C = K("none"), T = K(), k = K(), w = K(), g = K(), x = K([]), P = K({}), J = Y(
237
+ const t = e, n = $, m = K(t.currentPage || 1), y = K(t.pageSize), h = K([]), I = K(/* @__PURE__ */ new Set()), C = K("none"), z = K(), x = K(), b = K(), g = K(), k = K([]), P = K({}), J = Y(
238
238
  () => t.columns.filter((l) => !U(l.width)).map((l) => l.key)
239
239
  );
240
240
  function A() {
241
241
  return `${(100 / (J.value.length || 1)).toFixed(6)}%`;
242
242
  }
243
- const D = K(), z = K({
243
+ const D = K(), T = K({
244
244
  show: !1,
245
245
  thumbHeight: 40,
246
246
  thumbTop: 0
@@ -284,7 +284,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
284
284
  if (M.fixed === "left") {
285
285
  let S = 80;
286
286
  const H = re(M.width);
287
- H !== null ? S = H : x.value[_] && (S = re(x.value[_]) ?? S), l.push(c), c += S;
287
+ H !== null ? S = H : k.value[_] && (S = re(k.value[_]) ?? S), l.push(c), c += S;
288
288
  }
289
289
  }
290
290
  return l;
@@ -297,7 +297,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
297
297
  if (S.fixed === "right") {
298
298
  let H = 80;
299
299
  const O = re(S.width);
300
- O !== null ? H = O : x.value[M] && (H = re(x.value[M]) ?? H), _.push({ index: M, width: H });
300
+ O !== null ? H = O : k.value[M] && (H = re(k.value[M]) ?? H), _.push({ index: M, width: H });
301
301
  }
302
302
  }
303
303
  for (let M = 0; M < _.length; M++)
@@ -333,7 +333,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
333
333
  const _ = [];
334
334
  return l.align && _.push(`text-${l.align}`), l.fixed === "right" && (_.push("col-fixed-right"), c && _.push("col-fixed-right-header")), l.fixed === "left" && (_.push("col-fixed-left"), c && _.push("col-fixed-left-header")), _.join(" ");
335
335
  }
336
- function b(l, c, _) {
336
+ function w(l, c, _) {
337
337
  const M = {}, S = U(l.width);
338
338
  if (S)
339
339
  M.width = S, M.minWidth = S, M.maxWidth = S;
@@ -389,37 +389,37 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
389
389
  y.value !== c && (y.value = c);
390
390
  });
391
391
  function pe() {
392
- T.value && oe(() => {
393
- const l = T.value.getBoundingClientRect(), c = window.innerHeight, _ = l.top, M = T.value.querySelector(".table-header"), S = M ? M.offsetHeight : 40, H = T.value.querySelector(".ypagination"), O = H ? H.offsetHeight : 60, fe = T.value.querySelector(".bulk-bar"), ye = fe ? fe.offsetHeight : 0, ze = S + O + ye + 20, le = c - _ - ze, nt = Math.max(200, le), Ze = T.value.querySelector(".table-body-wrap .table");
392
+ z.value && oe(() => {
393
+ const l = z.value.getBoundingClientRect(), c = window.innerHeight, _ = l.top, M = z.value.querySelector(".table-header"), S = M ? M.offsetHeight : 40, H = z.value.querySelector(".ypagination"), O = H ? H.offsetHeight : 60, fe = z.value.querySelector(".bulk-bar"), ye = fe ? fe.offsetHeight : 0, ze = S + O + ye + 20, le = c - _ - ze, nt = Math.max(200, le), Ze = z.value.querySelector(".table-body-wrap .table");
394
394
  Ze && (Ze.offsetHeight > le ? C.value = `${nt}px` : C.value = "none");
395
395
  });
396
396
  }
397
397
  let xe = !1;
398
398
  function Ie() {
399
- !k.value || !w.value || xe || k.value.scrollLeft !== w.value.scrollLeft && (xe = !0, k.value.scrollLeft = w.value.scrollLeft, requestAnimationFrame(() => {
399
+ !x.value || !b.value || xe || x.value.scrollLeft !== b.value.scrollLeft && (xe = !0, x.value.scrollLeft = b.value.scrollLeft, requestAnimationFrame(() => {
400
400
  xe = !1;
401
401
  }));
402
402
  }
403
403
  function Pe() {
404
- !k.value || !w.value || xe || w.value.scrollLeft !== k.value.scrollLeft && (xe = !0, w.value.scrollLeft = k.value.scrollLeft, requestAnimationFrame(() => {
404
+ !x.value || !b.value || xe || b.value.scrollLeft !== x.value.scrollLeft && (xe = !0, b.value.scrollLeft = x.value.scrollLeft, requestAnimationFrame(() => {
405
405
  xe = !1;
406
406
  }));
407
407
  }
408
408
  function We() {
409
409
  oe(() => {
410
- if (!w.value) return;
411
- const l = w.value, c = l.scrollHeight, _ = l.clientHeight, M = l.scrollTop, S = c > _ + 1;
412
- if (z.value.show = S, !S) return;
410
+ if (!b.value) return;
411
+ const l = b.value, c = l.scrollHeight, _ = l.clientHeight, M = l.scrollTop, S = c > _ + 1;
412
+ if (T.value.show = S, !S) return;
413
413
  const H = 24, O = _ / c, fe = D.value ? D.value.clientHeight : _, ye = Math.max(H, Math.floor(fe * O));
414
- z.value.thumbHeight = ye;
414
+ T.value.thumbHeight = ye;
415
415
  const ze = Math.max(0, fe - ye), le = Math.max(1, c - _);
416
- z.value.thumbTop = Math.min(ze, Math.floor(M / le * ze));
416
+ T.value.thumbTop = Math.min(ze, Math.floor(M / le * ze));
417
417
  });
418
418
  }
419
419
  function Re(l) {
420
- if (!B || !w.value || !D.value) return;
420
+ if (!B || !b.value || !D.value) return;
421
421
  l.preventDefault();
422
- const c = D.value.clientHeight, _ = Math.max(0, c - z.value.thumbHeight), M = w.value, S = M.scrollHeight, H = M.clientHeight, O = Math.max(1, S - H), ye = (l.clientY - F) / Math.max(1, _) * O;
422
+ const c = D.value.clientHeight, _ = Math.max(0, c - T.value.thumbHeight), M = b.value, S = M.scrollHeight, H = M.clientHeight, O = Math.max(1, S - H), ye = (l.clientY - F) / Math.max(1, _) * O;
423
423
  M.scrollTop = Math.min(O, Math.max(0, N + ye)), We();
424
424
  }
425
425
  function Ye() {
@@ -428,7 +428,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
428
428
  function Ve() {
429
429
  oe(() => {
430
430
  var _, M;
431
- if (x.value.length === t.columns.length && x.value.every((S) => !!S))
431
+ if (k.value.length === t.columns.length && k.value.every((S) => !!S))
432
432
  return;
433
433
  const l = [];
434
434
  t.columns.forEach((S, H) => {
@@ -438,7 +438,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
438
438
  else if (P.value[S.key])
439
439
  l.push(P.value[S.key]);
440
440
  else {
441
- const fe = x.value[H];
441
+ const fe = k.value[H];
442
442
  if (fe)
443
443
  l.push(fe), P.value[S.key] = fe;
444
444
  else {
@@ -465,9 +465,9 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
465
465
  for (let S = 0; S < l.length; S++)
466
466
  if (!l[S]) {
467
467
  const H = P.value[((M = t.columns[S]) == null ? void 0 : M.key) || ""];
468
- l[S] = H || x.value[S] || "80px", t.columns[S] && (P.value[t.columns[S].key] = l[S]);
468
+ l[S] = H || k.value[S] || "80px", t.columns[S] && (P.value[t.columns[S].key] = l[S]);
469
469
  }
470
- x.value = l;
470
+ k.value = l;
471
471
  });
472
472
  }
473
473
  function He() {
@@ -485,12 +485,12 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
485
485
  const l = [], c = { ...P.value };
486
486
  t.columns.forEach((M, S) => {
487
487
  const H = U(M.width);
488
- H ? (l.push(H), c[M.key] = H) : c[M.key] ? l.push(c[M.key]) : x.value[S] ? (l.push(x.value[S]), c[M.key] = x.value[S]) : l.push("");
488
+ H ? (l.push(H), c[M.key] = H) : c[M.key] ? l.push(c[M.key]) : k.value[S] ? (l.push(k.value[S]), c[M.key] = k.value[S]) : l.push("");
489
489
  });
490
490
  const _ = new Set(t.columns.map((M) => M.key));
491
491
  Object.keys(c).forEach((M) => {
492
492
  _.has(M) || delete c[M];
493
- }), P.value = c, x.value = l, oe(() => {
493
+ }), P.value = c, k.value = l, oe(() => {
494
494
  Ve(), Ie(), s();
495
495
  });
496
496
  }, { deep: !0 }), te(() => h.value, () => {
@@ -505,26 +505,26 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
505
505
  var l, c;
506
506
  oe(() => {
507
507
  pe(), Ve(), s(), We();
508
- }), window.addEventListener("resize", He), window.addEventListener("scroll", He, !0), (l = w.value) == null || l.addEventListener("scroll", () => {
508
+ }), window.addEventListener("resize", He), window.addEventListener("scroll", He, !0), (l = b.value) == null || l.addEventListener("scroll", () => {
509
509
  Ie(), We(), s();
510
- }, { passive: !0 }), (c = k.value) == null || c.addEventListener("scroll", () => {
510
+ }, { passive: !0 }), (c = x.value) == null || c.addEventListener("scroll", () => {
511
511
  Pe();
512
- }, { passive: !0 }), oe(() => Ie()), w.value && typeof ResizeObserver < "u" && (v = new ResizeObserver(() => {
512
+ }, { passive: !0 }), oe(() => Ie()), b.value && typeof ResizeObserver < "u" && (v = new ResizeObserver(() => {
513
513
  s();
514
- }), v.observe(w.value));
514
+ }), v.observe(b.value));
515
515
  }), Ee(() => {
516
516
  var l, c;
517
- window.removeEventListener("resize", He), window.removeEventListener("scroll", He, !0), (l = w.value) == null || l.removeEventListener("scroll", Ie), (c = k.value) == null || c.removeEventListener("scroll", Pe), window.removeEventListener("mousemove", Re), window.removeEventListener("mouseup", Ye), v && (v.disconnect(), v = null);
517
+ window.removeEventListener("resize", He), window.removeEventListener("scroll", He, !0), (l = b.value) == null || l.removeEventListener("scroll", Ie), (c = x.value) == null || c.removeEventListener("scroll", Pe), window.removeEventListener("mousemove", Re), window.removeEventListener("mouseup", Ye), v && (v.disconnect(), v = null);
518
518
  });
519
519
  let Te = -1;
520
520
  function s() {
521
- !k.value || !w.value || requestAnimationFrame(() => {
522
- if (!k.value || !w.value) return;
523
- const l = w.value, c = Math.ceil(l.offsetWidth - l.clientWidth);
521
+ !x.value || !b.value || requestAnimationFrame(() => {
522
+ if (!x.value || !b.value) return;
523
+ const l = b.value, c = Math.ceil(l.offsetWidth - l.clientWidth);
524
524
  if (q.value = c, c !== Te) {
525
525
  Te = c;
526
- const _ = k.value.querySelector(".table"), M = g.value;
527
- _ && M && (k.value.style.paddingRight = "0px", _.style.width = "", _.style.marginRight = "", c > 0 ? (k.value.style.paddingRight = `${c}px`, _.style.width = "100%", _.style.marginRight = `-${c}px`) : (k.value.style.paddingRight = "0px", _.style.width = "100%", _.style.marginRight = "0px"));
526
+ const _ = x.value.querySelector(".table"), M = g.value;
527
+ _ && M && (x.value.style.paddingRight = "0px", _.style.width = "", _.style.marginRight = "", c > 0 ? (x.value.style.paddingRight = `${c}px`, _.style.width = "100%", _.style.marginRight = `-${c}px`) : (x.value.style.paddingRight = "0px", _.style.width = "100%", _.style.marginRight = "0px"));
528
528
  }
529
529
  });
530
530
  }
@@ -534,7 +534,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
534
534
  return i(), u("div", {
535
535
  class: "ytable-container",
536
536
  ref_key: "tableContainer",
537
- ref: T
537
+ ref: z
538
538
  }, [
539
539
  ie($e, { name: "bulk-slide" }, {
540
540
  default: ue(() => [
@@ -565,7 +565,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
565
565
  o("div", {
566
566
  class: "table-header",
567
567
  ref_key: "headerRef",
568
- ref: k
568
+ ref: x
569
569
  }, [
570
570
  o("table", Ct, [
571
571
  o("colgroup", null, [
@@ -573,7 +573,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
573
573
  e.selectable ? (i(), u("col", _t)) : W("", !0),
574
574
  (i(!0), u(ae, null, de(e.columns, (S, H) => (i(), u("col", {
575
575
  key: S.key,
576
- style: ve({ width: x.value[H] || void 0, minWidth: x.value[H] || "80px" })
576
+ style: ve({ width: k.value[H] || void 0, minWidth: k.value[H] || "80px" })
577
577
  }, null, 4))), 128))
578
578
  ]),
579
579
  o("thead", null, [
@@ -589,7 +589,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
589
589
  (i(!0), u(ae, null, de(e.columns, (S, H) => (i(), u("th", {
590
590
  key: S.key,
591
591
  class: E(f(S, !0)),
592
- style: ve(b(S, H, !0))
592
+ style: ve(w(S, H, !0))
593
593
  }, ee(S.title), 7))), 128))
594
594
  ])
595
595
  ])
@@ -598,7 +598,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
598
598
  o("div", {
599
599
  class: E(["table-body-wrap", { "is-loading": e.loading, "is-empty": !he.value.length && !e.loading }]),
600
600
  ref_key: "bodyWrapRef",
601
- ref: w,
601
+ ref: b,
602
602
  style: ve({ maxHeight: C.value })
603
603
  }, [
604
604
  e.loading ? (i(), u("div", It, [...c[3] || (c[3] = [
@@ -620,7 +620,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
620
620
  e.selectable ? (i(), u("col", Tt)) : W("", !0),
621
621
  (i(!0), u(ae, null, de(e.columns, (S, H) => (i(), u("col", {
622
622
  key: S.key,
623
- style: ve({ width: x.value[H] || void 0, minWidth: x.value[H] || "80px" })
623
+ style: ve({ width: k.value[H] || void 0, minWidth: k.value[H] || "80px" })
624
624
  }, null, 4))), 128))
625
625
  ]),
626
626
  o("tbody", null, [
@@ -650,7 +650,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
650
650
  (i(!0), u(ae, null, de(e.columns, (O, fe) => (i(), u("td", {
651
651
  key: O.key,
652
652
  class: E(f(O)),
653
- style: ve(b(O, fe, !1))
653
+ style: ve(w(O, fe, !1))
654
654
  }, [
655
655
  se(l.$slots, `cell-${O.key}`, {
656
656
  item: S,
@@ -714,7 +714,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
714
714
  },
715
715
  emits: ["update:modelValue", "change", "focus", "blur", "clear"],
716
716
  setup(e, { emit: $ }) {
717
- const t = e, n = $, m = K(!1), y = K(-1), h = K(), I = K(), C = K(), T = K(), k = K(!1), w = K(), g = K(""), x = Y(() => t.options.find((a) => z(a) === t.modelValue) || null), P = Y(() => x.value ? B(x.value) : ""), J = Y(() => {
717
+ const t = e, n = $, m = K(!1), y = K(-1), h = K(), I = K(), C = K(), z = K(), x = K(!1), b = K(), g = K(""), k = Y(() => t.options.find((a) => T(a) === t.modelValue) || null), P = Y(() => k.value ? B(k.value) : ""), J = Y(() => {
718
718
  if (!t.filterable) return t.options;
719
719
  const a = g.value.trim().toLowerCase();
720
720
  return a ? t.options.filter((r) => {
@@ -725,28 +725,28 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
725
725
  var L;
726
726
  const a = { position: "fixed", zIndex: "4000" }, r = I.value;
727
727
  if (!r) return a;
728
- const f = r.getBoundingClientRect(), b = ((L = C.value) == null ? void 0 : L.getBoundingClientRect().width) || f.width;
729
- return a.left = `${f.left}px`, a.width = `${b}px`, k.value ? (a.bottom = `${window.innerHeight - f.top + 4}px`, a.top = "auto") : a.top = `${f.bottom + 4}px`, a;
728
+ const f = r.getBoundingClientRect(), w = ((L = C.value) == null ? void 0 : L.getBoundingClientRect().width) || f.width;
729
+ return a.left = `${f.left}px`, a.width = `${w}px`, x.value ? (a.bottom = `${window.innerHeight - f.top + 4}px`, a.top = "auto") : a.top = `${f.bottom + 4}px`, a;
730
730
  });
731
731
  function D() {
732
732
  !m.value || !I.value || oe(() => {
733
733
  const a = I.value;
734
734
  if (!a) return;
735
- const r = a.getBoundingClientRect(), f = window.innerHeight, b = 200, L = r.bottom + b + 4, j = r.top - b - 4, X = L <= f - 20, R = j >= 20;
736
- k.value = !X && R;
735
+ const r = a.getBoundingClientRect(), f = window.innerHeight, w = 200, L = r.bottom + w + 4, j = r.top - w - 4, X = L <= f - 20, R = j >= 20;
736
+ x.value = !X && R;
737
737
  });
738
738
  }
739
- function z(a) {
739
+ function T(a) {
740
740
  return typeof a == "object" && a !== null ? a[t.valueKey] : a;
741
741
  }
742
742
  function B(a) {
743
743
  return typeof a == "object" && a !== null ? a[t.labelKey] || String(a[t.valueKey]) : String(a);
744
744
  }
745
745
  function F(a, r) {
746
- return typeof a == "object" && a !== null && a.id !== void 0 ? a.id : z(a) || r;
746
+ return typeof a == "object" && a !== null && a.id !== void 0 ? a.id : T(a) || r;
747
747
  }
748
748
  function N(a) {
749
- return z(a) === t.modelValue;
749
+ return T(a) === t.modelValue;
750
750
  }
751
751
  function q(a) {
752
752
  return typeof a == "object" && a !== null ? a[t.disabledKey] === !0 : !1;
@@ -756,15 +756,15 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
756
756
  }
757
757
  function re() {
758
758
  t.disabled || (m.value = !0, oe(() => {
759
- D(), V(), t.filterable && w.value && (w.value.focus(), g.value = "");
759
+ D(), V(), t.filterable && b.value && (b.value.focus(), g.value = "");
760
760
  }));
761
761
  }
762
762
  function ce() {
763
- m.value = !1, y.value = -1, k.value = !1, t.filterable && (g.value = "");
763
+ m.value = !1, y.value = -1, x.value = !1, t.filterable && (g.value = "");
764
764
  }
765
765
  function ne(a, r) {
766
766
  if (q(a)) return;
767
- const f = z(a);
767
+ const f = T(a);
768
768
  n("update:modelValue", f), n("change", f, a), ce();
769
769
  }
770
770
  function he() {
@@ -780,10 +780,10 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
780
780
  let r = y.value;
781
781
  const f = J.value.length;
782
782
  r === -1 ? r = a > 0 ? 0 : f - 1 : r = (r + a + f) % f;
783
- let b = 0;
784
- for (; b < f && q(J.value[r]); )
785
- r = (r + a + f) % f, b++;
786
- y.value = b >= f ? -1 : r, Z();
783
+ let w = 0;
784
+ for (; w < f && q(J.value[r]); )
785
+ r = (r + a + f) % f, w++;
786
+ y.value = w >= f ? -1 : r, Z();
787
787
  }
788
788
  function me() {
789
789
  if (y.value < 0) return;
@@ -846,16 +846,16 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
846
846
  class: E(["yselect__value", { yselect__placeholder: !P.value }])
847
847
  }, [
848
848
  se(a.$slots, "value", {
849
- value: x.value,
849
+ value: k.value,
850
850
  label: P.value
851
851
  }, () => {
852
852
  var f;
853
853
  return [
854
- x.value ? (i(), u(ae, { key: 0 }, [
855
- (f = x.value) != null && f.flagImg ? (i(), u("img", {
854
+ k.value ? (i(), u(ae, { key: 0 }, [
855
+ (f = k.value) != null && f.flagImg ? (i(), u("img", {
856
856
  key: 0,
857
857
  class: "yselect__flag",
858
- src: x.value.flagImg,
858
+ src: k.value.flagImg,
859
859
  alt: "flag"
860
860
  }, null, 8, Pt)) : W("", !0),
861
861
  Ce(" " + ee(P.value), 1)
@@ -867,7 +867,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
867
867
  ], 2)) : Be((i(), u("input", {
868
868
  key: 1,
869
869
  ref_key: "inputElement",
870
- ref: w,
870
+ ref: b,
871
871
  class: "yselect__input",
872
872
  type: "text",
873
873
  placeholder: P.value || e.placeholder,
@@ -884,7 +884,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
884
884
  }, null, 40, Yt)), [
885
885
  [lt, g.value]
886
886
  ]),
887
- e.clearable && !e.disabled && x.value ? (i(), u("span", {
887
+ e.clearable && !e.disabled && k.value ? (i(), u("span", {
888
888
  key: 2,
889
889
  class: "yselect__clear",
890
890
  title: "清空",
@@ -929,8 +929,8 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
929
929
  m.value ? (i(), u("div", {
930
930
  key: 0,
931
931
  ref_key: "dropdownEl",
932
- ref: T,
933
- class: E(["yselect__dropdown yselect__dropdown--portal", { "yselect__dropdown--top": k.value }]),
932
+ ref: z,
933
+ class: E(["yselect__dropdown yselect__dropdown--portal", { "yselect__dropdown--top": x.value }]),
934
934
  style: ve(A.value),
935
935
  onMousedown: r[6] || (r[6] = Q(() => {
936
936
  }, ["stop"])),
@@ -942,20 +942,20 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
942
942
  ref_key: "optionsContainer",
943
943
  ref: h
944
944
  }, [
945
- (i(!0), u(ae, null, de(J.value, (f, b) => (i(), u("div", {
946
- key: F(f, b),
945
+ (i(!0), u(ae, null, de(J.value, (f, w) => (i(), u("div", {
946
+ key: F(f, w),
947
947
  class: E(["yselect__option", {
948
948
  "yselect__option--selected": N(f),
949
949
  "yselect__option--disabled": q(f),
950
- "yselect__option--hover": y.value === b
950
+ "yselect__option--hover": y.value === w
951
951
  }]),
952
952
  onClick: (L) => ne(f),
953
- onMouseenter: (L) => y.value = b,
953
+ onMouseenter: (L) => y.value = w,
954
954
  onMouseleave: r[5] || (r[5] = (L) => y.value = -1)
955
955
  }, [
956
956
  se(a.$slots, "option", {
957
957
  option: f,
958
- index: b,
958
+ index: w,
959
959
  selected: N(f)
960
960
  }, () => [
961
961
  f != null && f.flagImg ? (i(), u("img", {
@@ -992,35 +992,35 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
992
992
  setup(e, { emit: $ }) {
993
993
  const t = e, n = $, m = K(t.pageSize), y = Y(() => t.pageSizeOptions), h = Y({
994
994
  get: () => t.currentPage,
995
- set: (k) => {
996
- n("update:currentPage", k), n("page-change", k);
995
+ set: (x) => {
996
+ n("update:currentPage", x), n("page-change", x);
997
997
  }
998
998
  });
999
- function I(k) {
1000
- t.loading || k >= 1 && k !== t.currentPage && (h.value = k);
999
+ function I(x) {
1000
+ t.loading || x >= 1 && x !== t.currentPage && (h.value = x);
1001
1001
  }
1002
- function C(k) {
1003
- t.loading || (m.value = k, n("update:pageSize", k), n("page-size-change", k), h.value = 1);
1002
+ function C(x) {
1003
+ t.loading || (m.value = x, n("update:pageSize", x), n("page-size-change", x), h.value = 1);
1004
1004
  }
1005
- function T(k) {
1006
- t.loading || (k === "prev" ? I(h.value - 1) : k === "next" && I(h.value + 1));
1005
+ function z(x) {
1006
+ t.loading || (x === "prev" ? I(h.value - 1) : x === "next" && I(h.value + 1));
1007
1007
  }
1008
1008
  return m.value = t.pageSize, te(
1009
1009
  () => t.pageSize,
1010
- (k) => {
1011
- typeof k == "number" && m.value !== k && (m.value = k);
1010
+ (x) => {
1011
+ typeof x == "number" && m.value !== x && (m.value = x);
1012
1012
  }
1013
- ), (k, w) => {
1014
- const g = Ae("YButton"), x = Ae("YSelect");
1013
+ ), (x, b) => {
1014
+ const g = Ae("YButton"), k = Ae("YSelect");
1015
1015
  return i(), u("div", qt, [
1016
1016
  o("div", Ut, [
1017
1017
  ie(g, {
1018
1018
  size: "small",
1019
1019
  variant: "secondary",
1020
1020
  disabled: h.value === 1 || e.loading,
1021
- onClick: w[0] || (w[0] = (P) => I(1))
1021
+ onClick: b[0] || (b[0] = (P) => I(1))
1022
1022
  }, {
1023
- default: ue(() => [...w[2] || (w[2] = [
1023
+ default: ue(() => [...b[2] || (b[2] = [
1024
1024
  Ce("首页", -1)
1025
1025
  ])]),
1026
1026
  _: 1
@@ -1033,12 +1033,12 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
1033
1033
  { label: "上一页", value: "prev", disabled: h.value === 1 || e.loading, icon: "chevron-left", onlyIcon: !0, ariaLabel: "上一页" },
1034
1034
  { label: "下一页", value: "next", disabled: e.loading, icon: "chevron-right", onlyIcon: !0, ariaLabel: "下一页" }
1035
1035
  ],
1036
- onGroupClick: T
1036
+ onGroupClick: z
1037
1037
  }, null, 8, ["groupItems"]),
1038
1038
  o("div", Zt, [
1039
- ie(x, {
1039
+ ie(k, {
1040
1040
  modelValue: m.value,
1041
- "onUpdate:modelValue": w[1] || (w[1] = (P) => m.value = P),
1041
+ "onUpdate:modelValue": b[1] || (b[1] = (P) => m.value = P),
1042
1042
  options: y.value,
1043
1043
  size: "small",
1044
1044
  width: "105px",
@@ -1222,10 +1222,10 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
1222
1222
  setup(e, { emit: $ }) {
1223
1223
  const t = e, n = $, m = Y({
1224
1224
  get: () => t.modelValue,
1225
- set: (w) => n("update:modelValue", w)
1225
+ set: (b) => n("update:modelValue", b)
1226
1226
  }), y = K(null), h = Y(() => {
1227
- const w = {};
1228
- return w.width = typeof t.width == "number" ? `${t.width}px` : String(t.width), w.margin = "0 auto", w.top = t.top, w;
1227
+ const b = {};
1228
+ return b.width = typeof t.width == "number" ? `${t.width}px` : String(t.width), b.margin = "0 auto", b.top = t.top, b;
1229
1229
  });
1230
1230
  function I() {
1231
1231
  t.maskClosable && C();
@@ -1233,22 +1233,22 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
1233
1233
  function C() {
1234
1234
  m.value && (m.value = !1, n("close"));
1235
1235
  }
1236
- function T() {
1236
+ function z() {
1237
1237
  t.closable && C();
1238
1238
  }
1239
- function k(w) {
1240
- w.key === "Escape" && T();
1239
+ function x(b) {
1240
+ b.key === "Escape" && z();
1241
1241
  }
1242
- return te(() => t.modelValue, (w) => {
1243
- w ? (n("open"), requestAnimationFrame(() => {
1242
+ return te(() => t.modelValue, (b) => {
1243
+ b ? (n("open"), requestAnimationFrame(() => {
1244
1244
  var g;
1245
1245
  return (g = y.value) == null ? void 0 : g.focus();
1246
- }), document.addEventListener("keydown", k), document.body.style.overflow = "hidden") : (document.removeEventListener("keydown", k), document.body.style.overflow = "");
1246
+ }), document.addEventListener("keydown", x), document.body.style.overflow = "hidden") : (document.removeEventListener("keydown", x), document.body.style.overflow = "");
1247
1247
  }), De(() => {
1248
- t.modelValue && (document.addEventListener("keydown", k), document.body.style.overflow = "hidden");
1248
+ t.modelValue && (document.addEventListener("keydown", x), document.body.style.overflow = "hidden");
1249
1249
  }), Ee(() => {
1250
- document.removeEventListener("keydown", k), document.body.style.overflow = "";
1251
- }), (w, g) => (i(), Le(Fe, { to: "body" }, [
1250
+ document.removeEventListener("keydown", x), document.body.style.overflow = "";
1251
+ }), (b, g) => (i(), Le(Fe, { to: "body" }, [
1252
1252
  Be(o("div", {
1253
1253
  class: "y-dialog-root",
1254
1254
  role: "dialog",
@@ -1267,11 +1267,11 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
1267
1267
  ref: y,
1268
1268
  class: E(["y-dialog-panel", [e.center ? "is-center" : ""]]),
1269
1269
  style: ve(h.value),
1270
- onKeydown: ke(Q(T, ["prevent", "stop"]), ["esc"]),
1270
+ onKeydown: ke(Q(z, ["prevent", "stop"]), ["esc"]),
1271
1271
  tabindex: "-1"
1272
1272
  }, [
1273
1273
  e.showHeader ? (i(), u("div", pn, [
1274
- se(w.$slots, "header", {}, () => [
1274
+ se(b.$slots, "header", {}, () => [
1275
1275
  o("div", yn, ee(e.title), 1)
1276
1276
  ], !0),
1277
1277
  e.closable ? (i(), u("button", {
@@ -1283,10 +1283,10 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
1283
1283
  }, " ✕ ")) : W("", !0)
1284
1284
  ])) : W("", !0),
1285
1285
  o("div", gn, [
1286
- se(w.$slots, "default", {}, void 0, !0)
1286
+ se(b.$slots, "default", {}, void 0, !0)
1287
1287
  ]),
1288
- w.$slots.footer ? (i(), u("div", mn, [
1289
- se(w.$slots, "footer", {}, void 0, !0)
1288
+ b.$slots.footer ? (i(), u("div", mn, [
1289
+ se(b.$slots, "footer", {}, void 0, !0)
1290
1290
  ])) : W("", !0)
1291
1291
  ], 46, hn), [
1292
1292
  [Ke, m.value]
@@ -1319,73 +1319,73 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
1319
1319
  },
1320
1320
  emits: ["update:modelValue", "show", "hide", "before-show", "before-hide"],
1321
1321
  setup(e, { expose: $, emit: t }) {
1322
- const n = e, m = t, y = K(), h = K(), I = K(), C = K(!1), T = K(), k = K(), w = K({});
1323
- let g = null, x = null;
1322
+ const n = e, m = t, y = K(), h = K(), I = K(), C = K(!1), z = K(), x = K(), b = K({});
1323
+ let g = null, k = null;
1324
1324
  const P = Y(() => {
1325
- if (!C.value || !T.value) return {};
1325
+ if (!C.value || !z.value) return {};
1326
1326
  const V = {};
1327
1327
  n.width !== "auto" && (V.width = typeof n.width == "number" ? `${n.width}px` : n.width), n.maxWidth && (V.maxWidth = typeof n.maxWidth == "number" ? `${n.maxWidth}px` : n.maxWidth);
1328
1328
  const { top: Z, left: d } = A();
1329
1329
  return V.top = `${Z}px`, V.left = `${d}px`, V;
1330
1330
  }), J = Y(() => {
1331
1331
  if (!n.showArrow) return {};
1332
- if (Object.keys(w.value).length > 0)
1333
- return w.value;
1332
+ if (Object.keys(b.value).length > 0)
1333
+ return b.value;
1334
1334
  const V = {};
1335
1335
  return n.placement.startsWith("top") || n.placement.startsWith("bottom") ? V.left = "50%" : V.top = "50%", V;
1336
1336
  });
1337
1337
  function A() {
1338
1338
  var X, R;
1339
- if (!T.value) return { top: 0, left: 0 };
1340
- const { width: V, height: Z, top: d, left: p } = T.value, a = ((X = I.value) == null ? void 0 : X.offsetWidth) || 200, r = ((R = I.value) == null ? void 0 : R.offsetHeight) || 100;
1341
- let f = 0, b = 0;
1339
+ if (!z.value) return { top: 0, left: 0 };
1340
+ const { width: V, height: Z, top: d, left: p } = z.value, a = ((X = I.value) == null ? void 0 : X.offsetWidth) || 200, r = ((R = I.value) == null ? void 0 : R.offsetHeight) || 100;
1341
+ let f = 0, w = 0;
1342
1342
  switch (n.placement) {
1343
1343
  case "top":
1344
- f = d - r - n.offset, b = p + (V - a) / 2;
1344
+ f = d - r - n.offset, w = p + (V - a) / 2;
1345
1345
  break;
1346
1346
  case "top-start":
1347
- f = d - r - n.offset, b = p;
1347
+ f = d - r - n.offset, w = p;
1348
1348
  break;
1349
1349
  case "top-end":
1350
- f = d - r - n.offset, b = p + V - a;
1350
+ f = d - r - n.offset, w = p + V - a;
1351
1351
  break;
1352
1352
  case "bottom":
1353
- f = d + Z + n.offset, b = p + (V - a) / 2;
1353
+ f = d + Z + n.offset, w = p + (V - a) / 2;
1354
1354
  break;
1355
1355
  case "bottom-start":
1356
- f = d + Z + n.offset, b = p;
1356
+ f = d + Z + n.offset, w = p;
1357
1357
  break;
1358
1358
  case "bottom-end":
1359
- f = d + Z + n.offset, b = p + V - a;
1359
+ f = d + Z + n.offset, w = p + V - a;
1360
1360
  break;
1361
1361
  case "left":
1362
- f = d + (Z - r) / 2, b = p - a - n.offset;
1362
+ f = d + (Z - r) / 2, w = p - a - n.offset;
1363
1363
  break;
1364
1364
  case "left-start":
1365
- f = d, b = p - a - n.offset;
1365
+ f = d, w = p - a - n.offset;
1366
1366
  break;
1367
1367
  case "left-end":
1368
- f = d + Z - r, b = p - a - n.offset;
1368
+ f = d + Z - r, w = p - a - n.offset;
1369
1369
  break;
1370
1370
  case "right":
1371
- f = d + (Z - r) / 2, b = p + V + n.offset;
1371
+ f = d + (Z - r) / 2, w = p + V + n.offset;
1372
1372
  break;
1373
1373
  case "right-start":
1374
- f = d, b = p + V + n.offset;
1374
+ f = d, w = p + V + n.offset;
1375
1375
  break;
1376
1376
  case "right-end":
1377
- f = d + Z - r, b = p + V + n.offset;
1377
+ f = d + Z - r, w = p + V + n.offset;
1378
1378
  break;
1379
1379
  }
1380
1380
  const L = window.innerWidth, j = window.innerHeight;
1381
- return b < 8 && (b = 8), b + a > L - 8 && (b = L - a - 8), f < 8 && (f = 8), f + r > j - 8 && (f = j - r - 8), { top: f, left: b };
1381
+ return w < 8 && (w = 8), w + a > L - 8 && (w = L - a - 8), f < 8 && (f = 8), f + r > j - 8 && (f = j - r - 8), { top: f, left: w };
1382
1382
  }
1383
1383
  function D() {
1384
1384
  n.disabled || C.value || (N(), n.openDelay > 0 ? g = setTimeout(() => {
1385
- z();
1386
- }, n.openDelay) : z());
1385
+ T();
1386
+ }, n.openDelay) : T());
1387
1387
  }
1388
- function z() {
1388
+ function T() {
1389
1389
  m("before-show"), C.value = !0, m("update:modelValue", !0), m("show"), oe(() => {
1390
1390
  oe(() => {
1391
1391
  U();
@@ -1393,7 +1393,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
1393
1393
  });
1394
1394
  }
1395
1395
  function B() {
1396
- C.value && (N(), n.closeDelay > 0 ? x = setTimeout(() => {
1396
+ C.value && (N(), n.closeDelay > 0 ? k = setTimeout(() => {
1397
1397
  F();
1398
1398
  }, n.closeDelay) : F());
1399
1399
  }
@@ -1401,17 +1401,17 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
1401
1401
  m("before-hide"), C.value = !1, m("update:modelValue", !1), m("hide");
1402
1402
  }
1403
1403
  function N() {
1404
- g && (clearTimeout(g), g = null), x && (clearTimeout(x), x = null);
1404
+ g && (clearTimeout(g), g = null), k && (clearTimeout(k), k = null);
1405
1405
  }
1406
1406
  function q() {
1407
- if (!n.showArrow || !T.value || !I.value) {
1408
- w.value = {};
1407
+ if (!n.showArrow || !z.value || !I.value) {
1408
+ b.value = {};
1409
1409
  return;
1410
1410
  }
1411
- const V = T.value, Z = I.value.getBoundingClientRect();
1411
+ const V = z.value, Z = I.value.getBoundingClientRect();
1412
1412
  if (Z.width === 0 || Z.height === 0) {
1413
1413
  const p = {};
1414
- n.placement.startsWith("top") || n.placement.startsWith("bottom") ? p.left = "50%" : p.top = "50%", w.value = p;
1414
+ n.placement.startsWith("top") || n.placement.startsWith("bottom") ? p.left = "50%" : p.top = "50%", b.value = p;
1415
1415
  return;
1416
1416
  }
1417
1417
  const d = {};
@@ -1432,11 +1432,11 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
1432
1432
  const p = V.top + V.height / 2, a = Z.top, r = p - a;
1433
1433
  d.top = `${Math.max(12, Math.min(r, Z.height - 12))}px`;
1434
1434
  }
1435
- w.value = d;
1435
+ b.value = d;
1436
1436
  }
1437
1437
  function U() {
1438
- h.value && (T.value = h.value.getBoundingClientRect(), I.value && (k.value = I.value.getBoundingClientRect(), q(), C.value && requestAnimationFrame(() => {
1439
- I.value && (k.value = I.value.getBoundingClientRect(), q());
1438
+ h.value && (z.value = h.value.getBoundingClientRect(), I.value && (x.value = I.value.getBoundingClientRect(), q(), C.value && requestAnimationFrame(() => {
1439
+ I.value && (x.value = I.value.getBoundingClientRect(), q());
1440
1440
  })));
1441
1441
  }
1442
1442
  function re() {
@@ -1586,28 +1586,28 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
1586
1586
  },
1587
1587
  emits: ["update:modelValue", "change"],
1588
1588
  setup(e, { emit: $ }) {
1589
- const t = e, n = $, m = K(!1), y = K(-1), h = K(-1), I = K(null), C = K(), T = K(), k = K({
1589
+ const t = e, n = $, m = K(!1), y = K(-1), h = K(-1), I = K(null), C = K(), z = K(), x = K({
1590
1590
  top: !0,
1591
1591
  left: !0
1592
- }), w = K({
1592
+ }), b = K({
1593
1593
  year: (/* @__PURE__ */ new Date()).getFullYear(),
1594
1594
  month: (/* @__PURE__ */ new Date()).getMonth()
1595
1595
  }), g = K({
1596
1596
  year: (/* @__PURE__ */ new Date()).getFullYear(),
1597
1597
  month: (/* @__PURE__ */ new Date()).getMonth() + 1
1598
- }), x = () => {
1599
- const s = new Date(w.value.year, w.value.month).getTime(), v = new Date(g.value.year, g.value.month).getTime();
1598
+ }), k = () => {
1599
+ const s = new Date(b.value.year, b.value.month).getTime(), v = new Date(g.value.year, g.value.month).getTime();
1600
1600
  if (s >= v) {
1601
- const l = new Date(w.value.year, w.value.month + 1);
1601
+ const l = new Date(b.value.year, b.value.month + 1);
1602
1602
  g.value.year = l.getFullYear(), g.value.month = l.getMonth();
1603
1603
  }
1604
1604
  }, P = () => {
1605
- const s = new Date(w.value.year, w.value.month).getTime();
1605
+ const s = new Date(b.value.year, b.value.month).getTime();
1606
1606
  if (new Date(g.value.year, g.value.month).getTime() <= s) {
1607
1607
  const l = new Date(g.value.year, g.value.month - 1);
1608
- w.value.year = l.getFullYear(), w.value.month = l.getMonth();
1608
+ b.value.year = l.getFullYear(), b.value.month = l.getMonth();
1609
1609
  }
1610
- }, J = ["一", "二", "三", "四", "五", "六", "日"], A = K(null), D = K(null), z = (s) => {
1610
+ }, J = ["一", "二", "三", "四", "五", "六", "日"], A = K(null), D = K(null), T = (s) => {
1611
1611
  if (!s) return null;
1612
1612
  if (s instanceof Date) return s;
1613
1613
  if (typeof s == "number")
@@ -1626,8 +1626,8 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
1626
1626
  } else
1627
1627
  return `${v}-${l}-${c}`;
1628
1628
  }, F = (s) => s ? s.getTime() : null, N = (s) => s ? {
1629
- startDate: z(s.startDate),
1630
- endDate: z(s.endDate)
1629
+ startDate: T(s.startDate),
1630
+ endDate: T(s.endDate)
1631
1631
  } : { startDate: null, endDate: null }, q = (s) => t.format === "string" ? {
1632
1632
  startDate: B(s.startDate),
1633
1633
  endDate: B(s.endDate)
@@ -1712,30 +1712,30 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
1712
1712
  const v = q(s);
1713
1713
  n("update:modelValue", v), n("change", v);
1714
1714
  }, me = () => {
1715
- if (!C.value || !T.value) return;
1716
- const s = C.value.getBoundingClientRect(), v = T.value.getBoundingClientRect(), l = window.innerWidth, _ = window.innerHeight - s.bottom, M = s.top, S = v.height || 400;
1717
- _ < S && M > S ? k.value.top = !1 : k.value.top = !0;
1715
+ if (!C.value || !z.value) return;
1716
+ const s = C.value.getBoundingClientRect(), v = z.value.getBoundingClientRect(), l = window.innerWidth, _ = window.innerHeight - s.bottom, M = s.top, S = v.height || 400;
1717
+ _ < S && M > S ? x.value.top = !1 : x.value.top = !0;
1718
1718
  const H = l - s.left, O = v.width || 640;
1719
- H < O ? k.value.left = !1 : k.value.left = !0;
1719
+ H < O ? x.value.left = !1 : x.value.left = !0;
1720
1720
  }, V = () => {
1721
1721
  if (m.value = !m.value, m.value) {
1722
1722
  const s = N(t.modelValue);
1723
- if (A.value = (s == null ? void 0 : s.startDate) || null, D.value = (s == null ? void 0 : s.endDate) || null, h.value = ne(t.modelValue), y.value = -1, s != null && s.startDate && (w.value.year = s.startDate.getFullYear(), w.value.month = s.startDate.getMonth()), s != null && s.endDate)
1723
+ if (A.value = (s == null ? void 0 : s.startDate) || null, D.value = (s == null ? void 0 : s.endDate) || null, h.value = ne(t.modelValue), y.value = -1, s != null && s.startDate && (b.value.year = s.startDate.getFullYear(), b.value.month = s.startDate.getMonth()), s != null && s.endDate)
1724
1724
  g.value.year = s.endDate.getFullYear(), g.value.month = s.endDate.getMonth();
1725
1725
  else {
1726
- const v = new Date(w.value.year, w.value.month + 1);
1726
+ const v = new Date(b.value.year, b.value.month + 1);
1727
1727
  g.value.year = v.getFullYear(), g.value.month = v.getMonth();
1728
1728
  }
1729
- x(), oe(() => {
1729
+ k(), oe(() => {
1730
1730
  me();
1731
1731
  });
1732
1732
  }
1733
1733
  }, Z = (s) => {
1734
- const v = s.target, l = C.value, c = T.value;
1734
+ const v = s.target, l = C.value, c = z.value;
1735
1735
  l && c && !l.contains(v) && !c.contains(v) && (m.value = !1, y.value = -1);
1736
1736
  }, d = (s) => {
1737
1737
  s.key === "Enter" || s.key === " " ? (s.preventDefault(), V()) : s.key === "ArrowDown" && (s.preventDefault(), m.value = !0, oe(() => {
1738
- me(), b();
1738
+ me(), w();
1739
1739
  }));
1740
1740
  }, p = (s) => {
1741
1741
  var v;
@@ -1746,11 +1746,11 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
1746
1746
  y.value = s;
1747
1747
  }, f = () => {
1748
1748
  y.value = -1;
1749
- }, b = () => {
1749
+ }, w = () => {
1750
1750
  y.value = 0, L(0);
1751
1751
  }, L = (s) => {
1752
- if (T.value) {
1753
- const l = T.value.querySelectorAll(".nh-time-shortcut")[s];
1752
+ if (z.value) {
1753
+ const l = z.value.querySelectorAll(".nh-time-shortcut")[s];
1754
1754
  l && l.focus();
1755
1755
  }
1756
1756
  }, j = (s) => {
@@ -1790,7 +1790,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
1790
1790
  m.value && oe(() => {
1791
1791
  me();
1792
1792
  });
1793
- }, xe = Y(() => he(w.value.year, w.value.month)), Ie = Y(() => he(g.value.year, g.value.month)), Pe = Y(() => {
1793
+ }, xe = Y(() => he(b.value.year, b.value.month)), Ie = Y(() => he(g.value.year, g.value.month)), Pe = Y(() => {
1794
1794
  const s = N(t.modelValue);
1795
1795
  if (!s || !s.startDate || !s.endDate)
1796
1796
  return "";
@@ -1802,8 +1802,8 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
1802
1802
  }), We = Y(() => [
1803
1803
  "nh-time-dropdown",
1804
1804
  {
1805
- "nh-time-dropdown-top": !k.value.top,
1806
- "nh-time-dropdown-right": !k.value.left
1805
+ "nh-time-dropdown-top": !x.value.top,
1806
+ "nh-time-dropdown-right": !x.value.left
1807
1807
  }
1808
1808
  ]), Re = Y(() => {
1809
1809
  const s = N(t.modelValue);
@@ -1815,32 +1815,32 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
1815
1815
  const v = N(s);
1816
1816
  if (v != null && v.startDate) {
1817
1817
  const l = v.startDate;
1818
- w.value.year = l.getFullYear(), w.value.month = l.getMonth();
1818
+ b.value.year = l.getFullYear(), b.value.month = l.getMonth();
1819
1819
  }
1820
1820
  if (v != null && v.endDate) {
1821
1821
  const l = v.endDate;
1822
1822
  g.value.year = l.getFullYear(), g.value.month = l.getMonth();
1823
1823
  } else if (v != null && v.startDate) {
1824
- const l = new Date(w.value.year, w.value.month + 1);
1824
+ const l = new Date(b.value.year, b.value.month + 1);
1825
1825
  g.value.year = l.getFullYear(), g.value.month = l.getMonth();
1826
1826
  }
1827
- (v != null && v.startDate || v != null && v.endDate) && x(), m.value || (h.value = ne(s));
1828
- }, { immediate: !0, deep: !0 }), te([w, g], () => {
1829
- const s = new Date(w.value.year, w.value.month).getTime(), v = new Date(g.value.year, g.value.month).getTime();
1827
+ (v != null && v.startDate || v != null && v.endDate) && k(), m.value || (h.value = ne(s));
1828
+ }, { immediate: !0, deep: !0 }), te([b, g], () => {
1829
+ const s = new Date(b.value.year, b.value.month).getTime(), v = new Date(g.value.year, g.value.month).getTime();
1830
1830
  if (s === v) {
1831
- const l = new Date(w.value.year, w.value.month + 1);
1831
+ const l = new Date(b.value.year, b.value.month + 1);
1832
1832
  g.value.year = l.getFullYear(), g.value.month = l.getMonth();
1833
1833
  }
1834
1834
  }, { deep: !0 }), De(() => {
1835
1835
  document.addEventListener("click", Z), window.addEventListener("resize", pe), window.addEventListener("scroll", pe), h.value = ne(t.modelValue);
1836
1836
  const s = N(t.modelValue);
1837
- if (s != null && s.startDate && (w.value.year = s.startDate.getFullYear(), w.value.month = s.startDate.getMonth()), s != null && s.endDate)
1837
+ if (s != null && s.startDate && (b.value.year = s.startDate.getFullYear(), b.value.month = s.startDate.getMonth()), s != null && s.endDate)
1838
1838
  g.value.year = s.endDate.getFullYear(), g.value.month = s.endDate.getMonth();
1839
1839
  else {
1840
- const v = new Date(w.value.year, w.value.month + 1);
1840
+ const v = new Date(b.value.year, b.value.month + 1);
1841
1841
  g.value.year = v.getFullYear(), g.value.month = v.getMonth();
1842
1842
  }
1843
- x();
1843
+ k();
1844
1844
  }), Ee(() => {
1845
1845
  document.removeEventListener("click", Z), window.removeEventListener("resize", pe), window.removeEventListener("scroll", pe);
1846
1846
  });
@@ -1848,8 +1848,8 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
1848
1848
  t.clearable && (ge({ startDate: null, endDate: null }), Ve(), y.value = -1);
1849
1849
  }, Te = (s, v) => {
1850
1850
  if (s === "start") {
1851
- const l = new Date(w.value.year, w.value.month + v, 1);
1852
- w.value.year = l.getFullYear(), w.value.month = l.getMonth(), x();
1851
+ const l = new Date(b.value.year, b.value.month + v, 1);
1852
+ b.value.year = l.getFullYear(), b.value.month = l.getMonth(), k();
1853
1853
  } else {
1854
1854
  const l = new Date(g.value.year, g.value.month + v, 1);
1855
1855
  g.value.year = l.getFullYear(), g.value.month = l.getMonth(), P();
@@ -1925,7 +1925,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
1925
1925
  m.value ? (i(), u("div", {
1926
1926
  key: 0,
1927
1927
  ref_key: "dropdown",
1928
- ref: T,
1928
+ ref: z,
1929
1929
  class: E(We.value),
1930
1930
  onKeydown: p
1931
1931
  }, [
@@ -1976,7 +1976,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
1976
1976
  })
1977
1977
  ], -1)
1978
1978
  ])]),
1979
- o("span", An, ee(U(w.value.year, w.value.month)), 1),
1979
+ o("span", An, ee(U(b.value.year, b.value.month)), 1),
1980
1980
  o("button", {
1981
1981
  onClick: v[1] || (v[1] = (c) => Te("start", 1)),
1982
1982
  class: "nh-date-picker-btn nh-date-picker-next-btn",
@@ -2155,8 +2155,8 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2155
2155
  }
2156
2156
  return De(() => {
2157
2157
  const C = m.value;
2158
- C && (C.addEventListener("focus", (T) => n("focus", T)), C.addEventListener("blur", (T) => n("blur", T)));
2159
- }), (C, T) => (i(), u("button", {
2158
+ C && (C.addEventListener("focus", (z) => n("focus", z)), C.addEventListener("blur", (z) => n("blur", z)));
2159
+ }), (C, z) => (i(), u("button", {
2160
2160
  ref_key: "rootEl",
2161
2161
  ref: m,
2162
2162
  class: E(["yswitch", [
@@ -2174,7 +2174,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2174
2174
  ke(Q(I, ["prevent"]), ["space"])
2175
2175
  ]
2176
2176
  }, [
2177
- T[0] || (T[0] = o("span", { class: "yswitch__track" }, null, -1)),
2177
+ z[0] || (z[0] = o("span", { class: "yswitch__track" }, null, -1)),
2178
2178
  o("span", ol, [
2179
2179
  e.loading ? (i(), u("span", al)) : W("", !0)
2180
2180
  ]),
@@ -2200,10 +2200,10 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2200
2200
  },
2201
2201
  emits: ["load", "error", "preview"],
2202
2202
  setup(e, { expose: $, emit: t }) {
2203
- const n = e, m = t, y = K(), h = K(), I = K(), C = K(!1), T = K(!1), k = K(!1), w = K(!1), g = K(!1), x = K("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPCEtLSDog4zmma8gLS0+CiAgPHJlY3Qgd2lkdGg9IjIwMCIgaGVpZ2h0PSIyMDAiIGZpbGw9IiNGM0Y0RjYiLz4KICAKICA8IS0tIOWbvueJh+WbvuaghyAtLT4KICA8cmVjdCB4PSI1MCIgeT0iNDAiIHdpZHRoPSIxMDAiIGhlaWdodD0iODAiIHJ4PSI0IiBmaWxsPSIjRDFENURCIiBzdHJva2U9IiM5Q0EzQUYiIHN0cm9rZS13aWR0aD0iMiIvPgogIAogIDwhLS0g5Zu+54mH5YaF6YOo6KOF6aWwIC0tPgogIDxjaXJjbGUgY3g9IjgwIiBjeT0iNzAiIHI9IjgiIGZpbGw9IiM5Q0EzQUYiLz4KICA8cGF0aCBkPSJNNjAgMTAwIEw5MCA4NSBMMTIwIDk1IEwxNDAgODAiIHN0cm9rZT0iIzlDQTNBRiIgc3Ryb2tlLXdpZHRoPSIyIiBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KICAKICA8IS0tIOaWh+WtlyAtLT4KICA8dGV4dCB4PSIxMDAiIHk9IjE2MCIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzZCNzI4MCIgZm9udC1mYW1pbHk9IkFyaWFsLCBzYW5zLXNlcmlmIiBmb250LXNpemU9IjEyIiBmb250LXdlaWdodD0iNTAwIj4KICAgIEltYWdlIG5vdCBhdmFpbGFibGUKICA8L3RleHQ+Cjwvc3ZnPiA="), P = K(""), J = K(1), A = K(!1), D = K({
2203
+ const n = e, m = t, y = K(), h = K(), I = K(), C = K(!1), z = K(!1), x = K(!1), b = K(!1), g = K(!1), k = K("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPCEtLSDog4zmma8gLS0+CiAgPHJlY3Qgd2lkdGg9IjIwMCIgaGVpZ2h0PSIyMDAiIGZpbGw9IiNGM0Y0RjYiLz4KICAKICA8IS0tIOWbvueJh+WbvuaghyAtLT4KICA8cmVjdCB4PSI1MCIgeT0iNDAiIHdpZHRoPSIxMDAiIGhlaWdodD0iODAiIHJ4PSI0IiBmaWxsPSIjRDFENURCIiBzdHJva2U9IiM5Q0EzQUYiIHN0cm9rZS13aWR0aD0iMiIvPgogIAogIDwhLS0g5Zu+54mH5YaF6YOo6KOF6aWwIC0tPgogIDxjaXJjbGUgY3g9IjgwIiBjeT0iNzAiIHI9IjgiIGZpbGw9IiM5Q0EzQUYiLz4KICA8cGF0aCBkPSJNNjAgMTAwIEw5MCA4NSBMMTIwIDk1IEwxNDAgODAiIHN0cm9rZT0iIzlDQTNBRiIgc3Ryb2tlLXdpZHRoPSIyIiBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KICAKICA8IS0tIOaWh+WtlyAtLT4KICA8dGV4dCB4PSIxMDAiIHk9IjE2MCIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzZCNzI4MCIgZm9udC1mYW1pbHk9IkFyaWFsLCBzYW5zLXNlcmlmIiBmb250LXNpemU9IjEyIiBmb250LXdlaWdodD0iNTAwIj4KICAgIEltYWdlIG5vdCBhdmFpbGFibGUKICA8L3RleHQ+Cjwvc3ZnPiA="), P = K(""), J = K(1), A = K(!1), D = K({
2204
2204
  overflow: "",
2205
2205
  paddingRight: ""
2206
- }), z = Y(() => [
2206
+ }), T = Y(() => [
2207
2207
  n.className,
2208
2208
  "overflow-hidden"
2209
2209
  ].filter(Boolean).join(" ")), B = Y(() => [
@@ -2248,7 +2248,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2248
2248
  !n.lazy || !y.value || (V = new IntersectionObserver(
2249
2249
  (R) => {
2250
2250
  R.forEach((G) => {
2251
- G.isIntersecting && (w.value = !0, x.value = n.src, V == null || V.unobserve(G.target));
2251
+ G.isIntersecting && (b.value = !0, k.value = n.src, V == null || V.unobserve(G.target));
2252
2252
  });
2253
2253
  },
2254
2254
  {
@@ -2256,16 +2256,16 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2256
2256
  }
2257
2257
  ), V.observe(y.value));
2258
2258
  }, d = (R) => {
2259
- C.value = !0, T.value = !1, k.value = !1, m("load", R);
2259
+ C.value = !0, z.value = !1, x.value = !1, m("load", R);
2260
2260
  }, p = (R) => {
2261
- k.value = !0, T.value = !1, C.value = !1, m("error", R);
2261
+ x.value = !0, z.value = !1, C.value = !1, m("error", R);
2262
2262
  }, a = () => {
2263
- k.value = !1, T.value = !0, C.value = !1, oe(() => {
2263
+ x.value = !1, z.value = !0, C.value = !1, oe(() => {
2264
2264
  h.value && (h.value.src = n.src);
2265
2265
  });
2266
2266
  }, r = () => Array.isArray(n.previewSrcList) ? n.previewSrcList.find(Boolean) || n.src : n.previewSrcList || n.src, f = () => {
2267
- n.preview && (n.previewSrcList || n.src) ? b() : a();
2268
- }, b = () => {
2267
+ n.preview && (n.previewSrcList || n.src) ? w() : a();
2268
+ }, w = () => {
2269
2269
  if (console.log("handlePreview", n.preview), !n.preview) return;
2270
2270
  J.value = 1;
2271
2271
  const R = r();
@@ -2299,22 +2299,22 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2299
2299
  pe = Math.max(0.5, Math.min(2, pe)), J.value = pe;
2300
2300
  };
2301
2301
  return De(() => {
2302
- n.lazy ? Z() : w.value = !0, w.value && (T.value = !0), A.value = !0;
2302
+ n.lazy ? Z() : b.value = !0, b.value && (z.value = !0), A.value = !0;
2303
2303
  }), Ee(() => {
2304
2304
  V && V.disconnect(), g.value && me();
2305
- }), te(() => x.value, () => {
2306
- n.src && w.value && (T.value = !0, k.value = !1, C.value = !1);
2305
+ }), te(() => k.value, () => {
2306
+ n.src && b.value && (z.value = !0, x.value = !1, C.value = !1);
2307
2307
  }), te(() => n.src, (R) => {
2308
- x.value = R || "";
2308
+ k.value = R || "";
2309
2309
  }), $({
2310
2310
  retryLoad: a,
2311
2311
  closePreview: L
2312
2312
  }), (R, G) => (i(), u("div", {
2313
2313
  ref_key: "containerRef",
2314
2314
  ref: y,
2315
- class: E(["relative inline-block", z.value])
2315
+ class: E(["relative inline-block", T.value])
2316
2316
  }, [
2317
- !C.value && !k.value && !w.value ? (i(), u("div", {
2317
+ !C.value && !x.value && !b.value ? (i(), u("div", {
2318
2318
  key: 0,
2319
2319
  class: E(["bg-gray-200 animate-pulse rounded", B.value])
2320
2320
  }, [...G[1] || (G[1] = [
@@ -2334,7 +2334,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2334
2334
  ])
2335
2335
  ], -1)
2336
2336
  ])], 2)) : W("", !0),
2337
- T.value && !k.value ? (i(), u("div", {
2337
+ z.value && !x.value ? (i(), u("div", {
2338
2338
  key: 1,
2339
2339
  class: E(["absolute inset-0 flex items-center justify-center bg-gray-100 rounded pointer-events-none", F.value])
2340
2340
  }, [...G[2] || (G[2] = [
@@ -2342,7 +2342,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2342
2342
  o("div", { class: "w-8 h-8 border-4 border-primary/20 border-t-primary rounded-full animate-spin" })
2343
2343
  ], -1)
2344
2344
  ])], 2)) : W("", !0),
2345
- k.value ? (i(), u("div", {
2345
+ x.value ? (i(), u("div", {
2346
2346
  key: 2,
2347
2347
  class: E(["bg-gray-100 rounded flex items-center justify-center", N.value]),
2348
2348
  onClick: f
@@ -2356,20 +2356,20 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2356
2356
  Be(o("img", {
2357
2357
  ref_key: "imageRef",
2358
2358
  ref: h,
2359
- src: x.value,
2359
+ src: k.value,
2360
2360
  alt: e.alt,
2361
2361
  class: E(F.value),
2362
2362
  onLoad: d,
2363
2363
  onError: p,
2364
- onClick: Q(b, ["stop"]),
2364
+ onClick: Q(w, ["stop"]),
2365
2365
  style: ve(q.value)
2366
2366
  }, null, 46, rl), [
2367
- [Ke, C.value && !k.value]
2367
+ [Ke, C.value && !x.value]
2368
2368
  ]),
2369
- n.preview && (!C.value || T.value || k.value || !w.value) ? (i(), u("div", {
2369
+ n.preview ? (i(), u("div", {
2370
2370
  key: 3,
2371
2371
  class: "absolute inset-0 cursor-pointer z-10",
2372
- onClick: Q(b, ["stop"])
2372
+ onClick: Q(w, ["stop"])
2373
2373
  })) : W("", !0),
2374
2374
  A.value ? (i(), Le(Fe, {
2375
2375
  key: 4,
@@ -2405,7 +2405,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2405
2405
  ])) : W("", !0)
2406
2406
  ], 2));
2407
2407
  }
2408
- }), dl = /* @__PURE__ */ be(cl, [["__scopeId", "data-v-a5aebe97"]]), fl = /* @__PURE__ */ we({
2408
+ }), dl = /* @__PURE__ */ be(cl, [["__scopeId", "data-v-57ed6bed"]]), fl = /* @__PURE__ */ we({
2409
2409
  __name: "ydropdown",
2410
2410
  props: {
2411
2411
  trigger: { default: "hover" },
@@ -2426,34 +2426,34 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2426
2426
  };
2427
2427
  }), I = () => {
2428
2428
  console.log("显示下拉菜单", t.value), !$.disabled && (m && (clearTimeout(m), m = null), t.value = !0, console.log("设置 visible 为 true", t.value), oe(() => {
2429
- T();
2429
+ z();
2430
2430
  }));
2431
2431
  }, C = () => {
2432
2432
  console.log("隐藏下拉菜单"), m = setTimeout(() => {
2433
2433
  t.value = !1, console.log("设置 visible 为 false", t.value);
2434
2434
  }, 150);
2435
- }, T = () => {
2435
+ }, z = () => {
2436
2436
  if (!n.value) return;
2437
- const g = n.value.querySelector(".y-dropdown__trigger"), x = n.value.querySelector(".y-dropdown__menu");
2438
- if (!g || !x) return;
2439
- const P = g.getBoundingClientRect(), J = x.getBoundingClientRect(), A = window.innerWidth, D = window.innerHeight;
2440
- x.style.top = "", x.style.left = "", x.style.right = "", x.style.bottom = "", x.style.transform = "";
2441
- let z = 0, B = 0;
2437
+ const g = n.value.querySelector(".y-dropdown__trigger"), k = n.value.querySelector(".y-dropdown__menu");
2438
+ if (!g || !k) return;
2439
+ const P = g.getBoundingClientRect(), J = k.getBoundingClientRect(), A = window.innerWidth, D = window.innerHeight;
2440
+ k.style.top = "", k.style.left = "", k.style.right = "", k.style.bottom = "", k.style.transform = "";
2441
+ let T = 0, B = 0;
2442
2442
  switch ($.placement) {
2443
2443
  case "bottom":
2444
- z = P.height + 4, B = 0;
2444
+ T = P.height + 4, B = 0;
2445
2445
  break;
2446
2446
  case "top":
2447
- z = -(J.height + 4), B = 0;
2447
+ T = -(J.height + 4), B = 0;
2448
2448
  break;
2449
2449
  case "right":
2450
- z = 0, B = P.width + 4;
2450
+ T = 0, B = P.width + 4;
2451
2451
  break;
2452
2452
  case "left":
2453
- z = 0, B = -(J.width + 4);
2453
+ T = 0, B = -(J.width + 4);
2454
2454
  break;
2455
2455
  }
2456
- let F = P.top + z, N = P.left + B;
2456
+ let F = P.top + T, N = P.left + B;
2457
2457
  if ($.placement === "bottom" || $.placement === "top") {
2458
2458
  const q = J.width || 260;
2459
2459
  N + q > A - 10 && (N = A - q - 10), N < 10 && (N = 10);
@@ -2462,24 +2462,24 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2462
2462
  const q = J.height || 200;
2463
2463
  F + q > D - 10 && (F = D - q - 10), F < 10 && (F = 10);
2464
2464
  }
2465
- x.style.top = `${F}px`, x.style.left = `${N}px`;
2466
- }, k = (g) => {
2465
+ k.style.top = `${F}px`, k.style.left = `${N}px`;
2466
+ }, x = (g) => {
2467
2467
  $.trigger === "click" && n.value && !n.value.contains(g.target) && (t.value = !1);
2468
- }, w = () => {
2469
- t.value && T();
2468
+ }, b = () => {
2469
+ t.value && z();
2470
2470
  };
2471
2471
  return De(() => {
2472
- $.trigger === "click" && document.addEventListener("click", k), window.addEventListener("resize", w), window.addEventListener("scroll", w);
2472
+ $.trigger === "click" && document.addEventListener("click", x), window.addEventListener("resize", b), window.addEventListener("scroll", b);
2473
2473
  }), Ee(() => {
2474
- $.trigger === "click" && document.removeEventListener("click", k), m && clearTimeout(m), window.removeEventListener("resize", w), window.removeEventListener("scroll", w);
2474
+ $.trigger === "click" && document.removeEventListener("click", x), m && clearTimeout(m), window.removeEventListener("resize", b), window.removeEventListener("scroll", b);
2475
2475
  }), te(
2476
2476
  () => $.menuWidth,
2477
2477
  () => {
2478
2478
  t.value && oe(() => {
2479
- T();
2479
+ z();
2480
2480
  });
2481
2481
  }
2482
- ), (g, x) => (i(), u("div", {
2482
+ ), (g, k) => (i(), u("div", {
2483
2483
  class: "y-dropdown",
2484
2484
  ref_key: "dropdownRef",
2485
2485
  ref: n
@@ -2490,7 +2490,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2490
2490
  onMouseleave: C
2491
2491
  }, [
2492
2492
  se(g.$slots, "trigger", {}, () => [
2493
- x[0] || (x[0] = o("button", { class: "y-dropdown__button" }, " 下拉菜单 ", -1))
2493
+ k[0] || (k[0] = o("button", { class: "y-dropdown__button" }, " 下拉菜单 ", -1))
2494
2494
  ], !0)
2495
2495
  ], 32),
2496
2496
  ie($e, {
@@ -2505,9 +2505,9 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2505
2505
  onMouseleave: C
2506
2506
  }, [
2507
2507
  se(g.$slots, "default", {}, () => [
2508
- x[1] || (x[1] = o("div", { class: "y-dropdown__item" }, "选项 1", -1)),
2509
- x[2] || (x[2] = o("div", { class: "y-dropdown__item" }, "选项 2", -1)),
2510
- x[3] || (x[3] = o("div", { class: "y-dropdown__item" }, "选项 3", -1))
2508
+ k[1] || (k[1] = o("div", { class: "y-dropdown__item" }, "选项 1", -1)),
2509
+ k[2] || (k[2] = o("div", { class: "y-dropdown__item" }, "选项 2", -1)),
2510
+ k[3] || (k[3] = o("div", { class: "y-dropdown__item" }, "选项 3", -1))
2511
2511
  ], !0)
2512
2512
  ], 38), [
2513
2513
  [Ke, t.value]
@@ -2540,25 +2540,25 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2540
2540
  setup(e, { emit: $ }) {
2541
2541
  const t = e, n = $, m = Y({
2542
2542
  get: () => t.modelValue,
2543
- set: (x) => n("update:modelValue", x)
2543
+ set: (k) => n("update:modelValue", k)
2544
2544
  }), y = K(null), h = Y(() => t.placement === "right" ? "drawer-slide-right" : "drawer-slide-bottom"), I = Y(() => t.placement === "right" ? "rounded-left" : "rounded-top"), C = Y(() => {
2545
- const x = {};
2546
- return t.placement === "right" ? (x.width = typeof t.width == "number" ? `${t.width}px` : String(t.width), x.height = "100%", x.right = "0", x.top = "0") : (x.height = typeof t.height == "number" ? `${t.height}px` : String(t.height), x.width = "100%", x.bottom = "0", x.left = "0"), x;
2545
+ const k = {};
2546
+ return t.placement === "right" ? (k.width = typeof t.width == "number" ? `${t.width}px` : String(t.width), k.height = "100%", k.right = "0", k.top = "0") : (k.height = typeof t.height == "number" ? `${t.height}px` : String(t.height), k.width = "100%", k.bottom = "0", k.left = "0"), k;
2547
2547
  });
2548
- function T() {
2549
- t.maskClosable && k();
2548
+ function z() {
2549
+ t.maskClosable && x();
2550
2550
  }
2551
- function k() {
2551
+ function x() {
2552
2552
  m.value && (m.value = !1, n("close"));
2553
2553
  }
2554
- function w() {
2555
- t.closable && k();
2554
+ function b() {
2555
+ t.closable && x();
2556
2556
  }
2557
- function g(x) {
2558
- x.key === "Escape" && w();
2557
+ function g(k) {
2558
+ k.key === "Escape" && b();
2559
2559
  }
2560
- return te(() => t.modelValue, (x) => {
2561
- x ? (n("open"), requestAnimationFrame(() => {
2560
+ return te(() => t.modelValue, (k) => {
2561
+ k ? (n("open"), requestAnimationFrame(() => {
2562
2562
  var P;
2563
2563
  return (P = y.value) == null ? void 0 : P.focus();
2564
2564
  }), document.addEventListener("keydown", g), document.body.style.overflow = "hidden") : (document.removeEventListener("keydown", g), document.body.style.overflow = "");
@@ -2566,7 +2566,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2566
2566
  t.modelValue && (document.addEventListener("keydown", g), document.body.style.overflow = "hidden");
2567
2567
  }), Ee(() => {
2568
2568
  document.removeEventListener("keydown", g), document.body.style.overflow = "";
2569
- }), (x, P) => (i(), Le(Fe, { to: "body" }, [
2569
+ }), (k, P) => (i(), Le(Fe, { to: "body" }, [
2570
2570
  Be(o("div", {
2571
2571
  class: "y-drawer-root",
2572
2572
  role: "dialog",
@@ -2576,7 +2576,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2576
2576
  }, [
2577
2577
  o("div", {
2578
2578
  class: "y-drawer-mask",
2579
- onClick: T
2579
+ onClick: z
2580
2580
  }),
2581
2581
  ie($e, { name: h.value }, {
2582
2582
  default: ue(() => [
@@ -2588,7 +2588,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2588
2588
  I.value
2589
2589
  ]]),
2590
2590
  style: ve(C.value),
2591
- onKeydown: ke(Q(w, ["prevent", "stop"]), ["esc"]),
2591
+ onKeydown: ke(Q(b, ["prevent", "stop"]), ["esc"]),
2592
2592
  tabindex: "-1"
2593
2593
  }, [
2594
2594
  e.showHeader ? (i(), u("div", yl, [
@@ -2598,14 +2598,14 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2598
2598
  type: "button",
2599
2599
  class: "y-drawer-close",
2600
2600
  "aria-label": "Close",
2601
- onClick: k
2601
+ onClick: x
2602
2602
  }, " ✕ ")) : W("", !0)
2603
2603
  ])) : W("", !0),
2604
2604
  o("div", ml, [
2605
- se(x.$slots, "default", {}, void 0, !0)
2605
+ se(k.$slots, "default", {}, void 0, !0)
2606
2606
  ]),
2607
- x.$slots.footer ? (i(), u("div", wl, [
2608
- se(x.$slots, "footer", {}, void 0, !0)
2607
+ k.$slots.footer ? (i(), u("div", wl, [
2608
+ se(k.$slots, "footer", {}, void 0, !0)
2609
2609
  ])) : W("", !0)
2610
2610
  ], 46, pl), [
2611
2611
  [Ke, m.value]
@@ -2767,36 +2767,36 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2767
2767
  function C(d) {
2768
2768
  return d[n.nodeKey] || d.id || Math.random();
2769
2769
  }
2770
- function T(d) {
2770
+ function z(d) {
2771
2771
  var p;
2772
2772
  return ((p = n.props) != null && p.label ? d[n.props.label] : void 0) || d.label || "";
2773
2773
  }
2774
- function k(d) {
2774
+ function x(d) {
2775
2775
  var p;
2776
2776
  return !!((p = d == null ? void 0 : d.data) != null && p.isEmployee);
2777
2777
  }
2778
- function w(d, p) {
2778
+ function b(d, p) {
2779
2779
  var L;
2780
- const a = n.deptIconUrl || ho, r = n.personIconUrl || po, f = n.buttonIconUrl || "", b = n.childStyleIconUrl || "";
2781
- return p && b && J(d, p) ? b : (L = d == null ? void 0 : d.data) != null && L.isButton && f ? f : k(d) ? r : a;
2780
+ const a = n.deptIconUrl || ho, r = n.personIconUrl || po, f = n.buttonIconUrl || "", w = n.childStyleIconUrl || "";
2781
+ return p && w && J(d, p) ? w : (L = d == null ? void 0 : d.data) != null && L.isButton && f ? f : x(d) ? r : a;
2782
2782
  }
2783
2783
  function g(d) {
2784
2784
  var a;
2785
2785
  const p = ((a = n.props) != null && a.children ? d[n.props.children] : void 0) || d.children;
2786
2786
  return p && p.length > 0;
2787
2787
  }
2788
- function x(d) {
2788
+ function k(d) {
2789
2789
  var p;
2790
2790
  return ((p = n.props) != null && p.children ? d[n.props.children] : void 0) || d.children || [];
2791
2791
  }
2792
2792
  function P(d, p, a = 1) {
2793
2793
  if (d === p)
2794
2794
  return a;
2795
- const r = x(d);
2795
+ const r = k(d);
2796
2796
  for (const f of r) {
2797
- const b = P(f, p, a + 1);
2798
- if (b > 0)
2799
- return b;
2797
+ const w = P(f, p, a + 1);
2798
+ if (w > 0)
2799
+ return w;
2800
2800
  }
2801
2801
  return 0;
2802
2802
  }
@@ -2811,25 +2811,25 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2811
2811
  const p = C(d);
2812
2812
  if (h.value.checkedKeys.has(p)) {
2813
2813
  if (g(d)) {
2814
- const r = x(d), f = r.filter((L) => D(L)), b = r.filter(
2815
- (L) => z(L)
2814
+ const r = k(d), f = r.filter((L) => D(L)), w = r.filter(
2815
+ (L) => T(L)
2816
2816
  );
2817
- return f.length === r.length && b.length === 0;
2817
+ return f.length === r.length && w.length === 0;
2818
2818
  }
2819
2819
  return !0;
2820
2820
  }
2821
2821
  if (g(d)) {
2822
- const r = x(d);
2822
+ const r = k(d);
2823
2823
  return r.some(
2824
- (b) => z(b)
2825
- ) ? !1 : r.length > 0 && r.every((b) => D(b));
2824
+ (w) => T(w)
2825
+ ) ? !1 : r.length > 0 && r.every((w) => D(w));
2826
2826
  }
2827
2827
  return !1;
2828
2828
  }
2829
- function z(d) {
2829
+ function T(d) {
2830
2830
  if (!g(d)) return !1;
2831
- const p = x(d), a = p.filter((f) => D(f)), r = p.filter(
2832
- (f) => z(f)
2831
+ const p = k(d), a = p.filter((f) => D(f)), r = p.filter(
2832
+ (f) => T(f)
2833
2833
  );
2834
2834
  return a.length === p.length ? !1 : a.length > 0 || r.length > 0;
2835
2835
  }
@@ -2845,13 +2845,13 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2845
2845
  if (n.disabled) return;
2846
2846
  const p = C(d), r = !h.value.checkedKeys.has(p), f = new Set(h.value.expandedKeys);
2847
2847
  r ? h.value.checkedKeys.add(p) : h.value.checkedKeys.delete(p);
2848
- function b(L, j) {
2848
+ function w(L, j) {
2849
2849
  L.forEach((X) => {
2850
2850
  const R = C(X);
2851
- j ? h.value.checkedKeys.add(R) : h.value.checkedKeys.delete(R), g(X) && b(x(X), j);
2851
+ j ? h.value.checkedKeys.add(R) : h.value.checkedKeys.delete(R), g(X) && w(k(X), j);
2852
2852
  });
2853
2853
  }
2854
- b(x(d), r), r && q(), re(), h.value.expandedKeys = f, m("check-change", d, r, !1), m("check", d, r, !1), m("checked-keys-change", Array.from(h.value.checkedKeys));
2854
+ w(k(d), r), r && q(), re(), h.value.expandedKeys = f, m("check-change", d, r, !1), m("check", d, r, !1), m("checked-keys-change", Array.from(h.value.checkedKeys));
2855
2855
  }
2856
2856
  function q(d) {
2857
2857
  I.value && console.log(
@@ -2866,16 +2866,16 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2866
2866
  const d = [];
2867
2867
  function p(r) {
2868
2868
  r.forEach((f) => {
2869
- d.push(f), g(f) && p(x(f));
2869
+ d.push(f), g(f) && p(k(f));
2870
2870
  });
2871
2871
  }
2872
2872
  p(y.value);
2873
2873
  function a(r) {
2874
2874
  if (g(r)) {
2875
- const f = x(r), b = C(r), L = f.filter((X) => D(X)), j = f.filter(
2876
- (X) => z(X)
2875
+ const f = k(r), w = C(r), L = f.filter((X) => D(X)), j = f.filter(
2876
+ (X) => T(X)
2877
2877
  );
2878
- L.length === f.length && j.length === 0 || L.length > 0 || j.length > 0 ? h.value.checkedKeys.add(b) : h.value.checkedKeys.delete(b);
2878
+ L.length === f.length && j.length === 0 || L.length > 0 || j.length > 0 ? h.value.checkedKeys.add(w) : h.value.checkedKeys.delete(w);
2879
2879
  }
2880
2880
  }
2881
2881
  for (let r = d.length - 1; r >= 0; r--)
@@ -2907,23 +2907,23 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2907
2907
  for (const R of j) {
2908
2908
  if (C(R) === L) return X;
2909
2909
  if (g(R)) {
2910
- const G = a(L, x(R), X + 1);
2910
+ const G = a(L, k(R), X + 1);
2911
2911
  if (G > 0) return G;
2912
2912
  }
2913
2913
  }
2914
2914
  return 0;
2915
2915
  }, r = function(L, j, X) {
2916
2916
  L.forEach((R) => {
2917
- j < X && g(R) ? (b.add(C(R)), r(x(R), j + 1, X)) : j < X && g(R);
2917
+ j < X && g(R) ? (w.add(C(R)), r(k(R), j + 1, X)) : j < X && g(R);
2918
2918
  });
2919
2919
  };
2920
2920
  const f = (d || []).filter((L) => {
2921
2921
  const j = a(L, y.value, 1);
2922
2922
  return j > 0 && j < p;
2923
- }), b = new Set(f);
2923
+ }), w = new Set(f);
2924
2924
  r(y.value, 1, p), h.value.expandedKeys.forEach((L) => {
2925
- a(L, y.value, 1) >= p && b.add(L);
2926
- }), h.value.expandedKeys = b;
2925
+ a(L, y.value, 1) >= p && w.add(L);
2926
+ }), h.value.expandedKeys = w;
2927
2927
  } else
2928
2928
  h.value.expandedKeys = new Set(d);
2929
2929
  }
@@ -2933,14 +2933,14 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2933
2933
  function he() {
2934
2934
  if (n.defaultExpandAll) {
2935
2935
  let d = function(r, f = 1) {
2936
- r.forEach((b) => {
2937
- if (!g(b)) return;
2938
- const L = x(b);
2936
+ r.forEach((w) => {
2937
+ if (!g(w)) return;
2938
+ const L = k(w);
2939
2939
  if (a) {
2940
2940
  if (f >= a) return;
2941
- f + 1 === a || p.add(C(b)), d(L, f + 1);
2941
+ f + 1 === a || p.add(C(w)), d(L, f + 1);
2942
2942
  } else
2943
- p.add(C(b)), d(L, f + 1);
2943
+ p.add(C(w)), d(L, f + 1);
2944
2944
  });
2945
2945
  };
2946
2946
  const p = /* @__PURE__ */ new Set(), a = I.value;
@@ -2949,10 +2949,10 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2949
2949
  }
2950
2950
  function ge() {
2951
2951
  if (n.defaultCheckedKeys && n.defaultCheckedKeys.length > 0) {
2952
- let d = function(f, b = []) {
2952
+ let d = function(f, w = []) {
2953
2953
  f.forEach((L) => {
2954
- const j = C(L), X = [...b, j];
2955
- p.has(j) && b.forEach((R) => a.add(R)), g(L) && d(x(L), X);
2954
+ const j = C(L), X = [...w, j];
2955
+ p.has(j) && w.forEach((R) => a.add(R)), g(L) && d(k(L), X);
2956
2956
  });
2957
2957
  };
2958
2958
  const p = new Set(n.defaultCheckedKeys), a = /* @__PURE__ */ new Set();
@@ -2976,12 +2976,12 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2976
2976
  );
2977
2977
  function me(d) {
2978
2978
  try {
2979
- let p = function(f, b, L = []) {
2979
+ let p = function(f, w, L = []) {
2980
2980
  for (const j of f) {
2981
2981
  const X = C(j), R = [...L, X];
2982
- if (X === b) return R;
2982
+ if (X === w) return R;
2983
2983
  if (g(j)) {
2984
- const G = p(x(j), b, R);
2984
+ const G = p(k(j), w, R);
2985
2985
  if (G) return G;
2986
2986
  }
2987
2987
  }
@@ -2992,8 +2992,8 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
2992
2992
  h.value.highlightedKeys.clear();
2993
2993
  const r = new Set(h.value.expandedKeys);
2994
2994
  a.forEach((f) => {
2995
- const b = p(y.value, f);
2996
- b && b.length > 0 && (b.slice(0, -1).forEach((L) => r.add(L)), h.value.highlightedKeys.add(b[b.length - 1]));
2995
+ const w = p(y.value, f);
2996
+ w && w.length > 0 && (w.slice(0, -1).forEach((L) => r.add(L)), h.value.highlightedKeys.add(w[w.length - 1]));
2997
2997
  }), h.value.expandedKeys = r;
2998
2998
  } catch (p) {
2999
2999
  console.warn("highlightAndExpandByIds 执行失败", p);
@@ -3050,7 +3050,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3050
3050
  key: 2,
3051
3051
  class: E(["ytree-node__checkbox", {
3052
3052
  "is-checked": D(a),
3053
- "is-indeterminate": z(a)
3053
+ "is-indeterminate": T(a)
3054
3054
  }]),
3055
3055
  onClick: Q((r) => N(a), ["stop"])
3056
3056
  }, [
@@ -3062,7 +3062,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3062
3062
  "stroke-linecap": "round",
3063
3063
  "stroke-linejoin": "round"
3064
3064
  }, null, -1)
3065
- ])])) : z(a) ? (i(), u("svg", Ml, [...p[2] || (p[2] = [
3065
+ ])])) : T(a) ? (i(), u("svg", Ml, [...p[2] || (p[2] = [
3066
3066
  o("path", {
3067
3067
  d: "M2 6L10 6",
3068
3068
  stroke: "currentColor",
@@ -3077,12 +3077,12 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3077
3077
  }, null, 2)) : W("", !0),
3078
3078
  o("img", {
3079
3079
  class: "ytree-node__avatar",
3080
- src: w(a, a),
3081
- alt: k(a) ? "person" : "dept"
3080
+ src: b(a, a),
3081
+ alt: x(a) ? "person" : "dept"
3082
3082
  }, null, 8, Ll),
3083
3083
  o("span", {
3084
- class: E(["ytree-node__label", { "is-employee": k(a) }])
3085
- }, ee(T(a)), 3),
3084
+ class: E(["ytree-node__label", { "is-employee": x(a) }])
3085
+ }, ee(z(a)), 3),
3086
3086
  o("div", Il, [
3087
3087
  se(d.$slots, "node-content", {
3088
3088
  node: a,
@@ -3095,7 +3095,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3095
3095
  ie($e, { name: "ytree-node" }, {
3096
3096
  default: ue(() => [
3097
3097
  g(a) && A(a) ? (i(), u("div", Bl, [
3098
- (i(!0), u(ae, null, de(x(a), (r) => (i(), u("div", {
3098
+ (i(!0), u(ae, null, de(k(a), (r) => (i(), u("div", {
3099
3099
  key: C(r),
3100
3100
  class: E(["ytree-node", { "ytree-node--current": B(r), "ytree-node--highlight": F(r) }])
3101
3101
  }, [
@@ -3130,7 +3130,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3130
3130
  key: 2,
3131
3131
  class: E(["ytree-node__checkbox", {
3132
3132
  "is-checked": D(r),
3133
- "is-indeterminate": z(r)
3133
+ "is-indeterminate": T(r)
3134
3134
  }]),
3135
3135
  onClick: Q((f) => N(r), ["stop"])
3136
3136
  }, [
@@ -3142,7 +3142,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3142
3142
  "stroke-linecap": "round",
3143
3143
  "stroke-linejoin": "round"
3144
3144
  }, null, -1)
3145
- ])])) : z(r) ? (i(), u("svg", Wl, [...p[5] || (p[5] = [
3145
+ ])])) : T(r) ? (i(), u("svg", Wl, [...p[5] || (p[5] = [
3146
3146
  o("path", {
3147
3147
  d: "M2 6L10 6",
3148
3148
  stroke: "currentColor",
@@ -3157,12 +3157,12 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3157
3157
  }, null, 2)) : W("", !0),
3158
3158
  o("img", {
3159
3159
  class: "ytree-node__avatar",
3160
- src: w(r, a),
3161
- alt: k(r) ? "person" : "dept"
3160
+ src: b(r, a),
3161
+ alt: x(r) ? "person" : "dept"
3162
3162
  }, null, 8, Rl),
3163
3163
  o("span", {
3164
- class: E(["ytree-node__label", { "is-employee": k(r) }])
3165
- }, ee(T(r)), 3),
3164
+ class: E(["ytree-node__label", { "is-employee": x(r) }])
3165
+ }, ee(z(r)), 3),
3166
3166
  o("div", Vl, [
3167
3167
  se(d.$slots, "node-content", {
3168
3168
  node: r,
@@ -3175,7 +3175,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3175
3175
  ie($e, { name: "ytree-node" }, {
3176
3176
  default: ue(() => [
3177
3177
  g(r) && A(r) ? (i(), u("div", Al, [
3178
- (i(!0), u(ae, null, de(x(r), (f) => (i(), u("div", {
3178
+ (i(!0), u(ae, null, de(k(r), (f) => (i(), u("div", {
3179
3179
  key: C(f),
3180
3180
  class: E(["ytree-node", {
3181
3181
  "ytree-node--current": B(f),
@@ -3186,9 +3186,9 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3186
3186
  class: E(["ytree-node__content", { "is-child-style": J(f, a) }]),
3187
3187
  style: { paddingLeft: "38px" },
3188
3188
  "data-level": P(a, f),
3189
- onClick: (b) => ce(f, f, null, a),
3190
- onContextmenu: (b) => ne(
3191
- b,
3189
+ onClick: (w) => ce(f, f, null, a),
3190
+ onContextmenu: (w) => ne(
3191
+ w,
3192
3192
  f,
3193
3193
  f,
3194
3194
  null
@@ -3197,7 +3197,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3197
3197
  g(f) ? (i(), u("span", {
3198
3198
  key: 0,
3199
3199
  class: E(["ytree-node__expand-icon", { "is-expanded": A(f) }]),
3200
- onClick: Q((b) => U(f), ["stop"])
3200
+ onClick: Q((w) => U(f), ["stop"])
3201
3201
  }, [...p[6] || (p[6] = [
3202
3202
  o("svg", {
3203
3203
  width: "12",
@@ -3218,9 +3218,9 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3218
3218
  key: 2,
3219
3219
  class: E(["ytree-node__checkbox", {
3220
3220
  "is-checked": D(f),
3221
- "is-indeterminate": z(f)
3221
+ "is-indeterminate": T(f)
3222
3222
  }]),
3223
- onClick: Q((b) => N(f), ["stop"])
3223
+ onClick: Q((w) => N(f), ["stop"])
3224
3224
  }, [
3225
3225
  D(f) ? (i(), u("svg", Ol, [...p[7] || (p[7] = [
3226
3226
  o("path", {
@@ -3230,7 +3230,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3230
3230
  "stroke-linecap": "round",
3231
3231
  "stroke-linejoin": "round"
3232
3232
  }, null, -1)
3233
- ])])) : z(f) ? (i(), u("svg", jl, [...p[8] || (p[8] = [
3233
+ ])])) : T(f) ? (i(), u("svg", jl, [...p[8] || (p[8] = [
3234
3234
  o("path", {
3235
3235
  d: "M2 6L10 6",
3236
3236
  stroke: "currentColor",
@@ -3245,12 +3245,12 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3245
3245
  }, null, 2)) : W("", !0),
3246
3246
  o("img", {
3247
3247
  class: "ytree-node__avatar",
3248
- src: w(f, a),
3249
- alt: k(f) ? "person" : "dept"
3248
+ src: b(f, a),
3249
+ alt: x(f) ? "person" : "dept"
3250
3250
  }, null, 8, ql),
3251
3251
  o("span", {
3252
- class: E(["ytree-node__label", { "is-employee": k(f) }])
3253
- }, ee(T(f)), 3),
3252
+ class: E(["ytree-node__label", { "is-employee": x(f) }])
3253
+ }, ee(z(f)), 3),
3254
3254
  o("div", Ul, [
3255
3255
  se(d.$slots, "node-content", {
3256
3256
  node: f,
@@ -3263,38 +3263,38 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3263
3263
  ie($e, { name: "ytree-node" }, {
3264
3264
  default: ue(() => [
3265
3265
  g(f) && A(f) ? (i(), u("div", Zl, [
3266
- (i(!0), u(ae, null, de(x(f), (b) => (i(), u("div", {
3267
- key: C(b),
3266
+ (i(!0), u(ae, null, de(k(f), (w) => (i(), u("div", {
3267
+ key: C(w),
3268
3268
  class: E(["ytree-node", {
3269
- "ytree-node--current": B(b),
3270
- "ytree-node--highlight": F(b)
3269
+ "ytree-node--current": B(w),
3270
+ "ytree-node--highlight": F(w)
3271
3271
  }])
3272
3272
  }, [
3273
3273
  o("div", {
3274
- class: E(["ytree-node__content", { "is-child-style": J(b, a) }]),
3274
+ class: E(["ytree-node__content", { "is-child-style": J(w, a) }]),
3275
3275
  style: {
3276
3276
  paddingLeft: "54px"
3277
3277
  },
3278
- "data-level": P(a, b),
3278
+ "data-level": P(a, w),
3279
3279
  onClick: (L) => ce(
3280
- b,
3281
- b,
3280
+ w,
3281
+ w,
3282
3282
  null,
3283
3283
  a
3284
3284
  ),
3285
3285
  onContextmenu: (L) => ne(
3286
3286
  L,
3287
- b,
3288
- b,
3287
+ w,
3288
+ w,
3289
3289
  null
3290
3290
  )
3291
3291
  }, [
3292
- g(b) ? (i(), u("span", {
3292
+ g(w) ? (i(), u("span", {
3293
3293
  key: 0,
3294
3294
  class: E(["ytree-node__expand-icon", {
3295
- "is-expanded": A(b)
3295
+ "is-expanded": A(w)
3296
3296
  }]),
3297
- onClick: Q((L) => U(b), ["stop"])
3297
+ onClick: Q((L) => U(w), ["stop"])
3298
3298
  }, [...p[9] || (p[9] = [
3299
3299
  o("svg", {
3300
3300
  width: "12",
@@ -3314,12 +3314,12 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3314
3314
  e.showCheckbox ? (i(), u("span", {
3315
3315
  key: 2,
3316
3316
  class: E(["ytree-node__checkbox", {
3317
- "is-checked": D(b),
3318
- "is-indeterminate": z(b)
3317
+ "is-checked": D(w),
3318
+ "is-indeterminate": T(w)
3319
3319
  }]),
3320
- onClick: Q((L) => N(b), ["stop"])
3320
+ onClick: Q((L) => N(w), ["stop"])
3321
3321
  }, [
3322
- D(b) ? (i(), u("svg", eo, [...p[10] || (p[10] = [
3322
+ D(w) ? (i(), u("svg", eo, [...p[10] || (p[10] = [
3323
3323
  o("path", {
3324
3324
  d: "M2 6L4.5 8.5L10 3",
3325
3325
  stroke: "currentColor",
@@ -3327,7 +3327,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3327
3327
  "stroke-linecap": "round",
3328
3328
  "stroke-linejoin": "round"
3329
3329
  }, null, -1)
3330
- ])])) : z(b) ? (i(), u("svg", to, [...p[11] || (p[11] = [
3330
+ ])])) : T(w) ? (i(), u("svg", to, [...p[11] || (p[11] = [
3331
3331
  o("path", {
3332
3332
  d: "M2 6L10 6",
3333
3333
  stroke: "currentColor",
@@ -3342,28 +3342,28 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3342
3342
  }, null, 2)) : W("", !0),
3343
3343
  o("img", {
3344
3344
  class: "ytree-node__avatar",
3345
- src: w(b, a),
3346
- alt: k(b) ? "person" : "dept"
3345
+ src: b(w, a),
3346
+ alt: x(w) ? "person" : "dept"
3347
3347
  }, null, 8, no),
3348
3348
  o("span", {
3349
3349
  class: E(["ytree-node__label", {
3350
- "is-employee": k(b)
3350
+ "is-employee": x(w)
3351
3351
  }])
3352
- }, ee(T(b)), 3),
3352
+ }, ee(z(w)), 3),
3353
3353
  o("div", lo, [
3354
3354
  se(d.$slots, "node-content", {
3355
- node: b,
3356
- isCurrent: B(b),
3357
- isExpanded: A(b),
3358
- hasChildren: g(b)
3355
+ node: w,
3356
+ isCurrent: B(w),
3357
+ isExpanded: A(w),
3358
+ hasChildren: g(w)
3359
3359
  }, void 0, !0)
3360
3360
  ])
3361
3361
  ], 42, Ql),
3362
3362
  ie($e, { name: "ytree-node" }, {
3363
3363
  default: ue(() => [
3364
- g(b) && A(b) ? (i(), u("div", oo, [
3365
- (i(!0), u(ae, null, de(x(
3366
- b
3364
+ g(w) && A(w) ? (i(), u("div", oo, [
3365
+ (i(!0), u(ae, null, de(k(
3366
+ w
3367
3367
  ), (L) => (i(), u("div", {
3368
3368
  key: C(L),
3369
3369
  class: E(["ytree-node", {
@@ -3415,7 +3415,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3415
3415
  key: 2,
3416
3416
  class: E(["ytree-node__checkbox", {
3417
3417
  "is-checked": D(L),
3418
- "is-indeterminate": z(
3418
+ "is-indeterminate": T(
3419
3419
  L
3420
3420
  )
3421
3421
  }]),
@@ -3429,7 +3429,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3429
3429
  "stroke-linecap": "round",
3430
3430
  "stroke-linejoin": "round"
3431
3431
  }, null, -1)
3432
- ])])) : z(
3432
+ ])])) : T(
3433
3433
  L
3434
3434
  ) ? (i(), u("svg", co, [...p[14] || (p[14] = [
3435
3435
  o("path", {
@@ -3446,14 +3446,14 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3446
3446
  }, null, 2)) : W("", !0),
3447
3447
  o("img", {
3448
3448
  class: "ytree-node__avatar",
3449
- src: w(L, a),
3450
- alt: k(L) ? "person" : "dept"
3449
+ src: b(L, a),
3450
+ alt: x(L) ? "person" : "dept"
3451
3451
  }, null, 8, fo),
3452
3452
  o("span", {
3453
3453
  class: E(["ytree-node__label", {
3454
- "is-employee": k(L)
3454
+ "is-employee": x(L)
3455
3455
  }])
3456
- }, ee(T(L)), 3),
3456
+ }, ee(z(L)), 3),
3457
3457
  o("div", vo, [
3458
3458
  se(d.$slots, "node-content", {
3459
3459
  node: L,
@@ -3505,7 +3505,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3505
3505
  emits: ["update:modelValue", "search", "reset", "field-change"],
3506
3506
  setup(e, { emit: $ }) {
3507
3507
  const t = e, n = $, m = K(!1), y = at({}), h = Y(() => t.fields.filter((D) => !D.hidden)), I = Y(() => m.value ? h.value : h.value.slice(0, t.maxVisibleFields)), C = Y(() => h.value.length > t.maxVisibleFields);
3508
- function T(D) {
3508
+ function z(D) {
3509
3509
  switch (D) {
3510
3510
  case "select":
3511
3511
  return et;
@@ -3517,56 +3517,56 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3517
3517
  return Ge;
3518
3518
  }
3519
3519
  }
3520
- function k(D) {
3520
+ function x(D) {
3521
3521
  n("field-change", D, y[D.key]), n("update:modelValue", { ...y });
3522
3522
  }
3523
- function w() {
3524
- const D = P(y), z = J(D), B = { ...y };
3525
- n("search", { data: z, raw: B });
3523
+ function b() {
3524
+ const D = P(y), T = J(D), B = { ...y };
3525
+ n("search", { data: T, raw: B });
3526
3526
  }
3527
3527
  function g() {
3528
3528
  Object.keys(y).forEach((D) => {
3529
- const z = t.fields.find((B) => B.key === D);
3530
- (z == null ? void 0 : z.type) === "daterange" ? y[D] = { startDate: null, endDate: null } : (z == null ? void 0 : z.type) === "date" ? y[D] = null : y[D] = "";
3529
+ const T = t.fields.find((B) => B.key === D);
3530
+ (T == null ? void 0 : T.type) === "daterange" ? y[D] = { startDate: null, endDate: null } : (T == null ? void 0 : T.type) === "date" ? y[D] = null : y[D] = "";
3531
3531
  }), n("reset"), n("update:modelValue", { ...y });
3532
3532
  }
3533
- function x() {
3533
+ function k() {
3534
3534
  m.value = !m.value;
3535
3535
  }
3536
3536
  function P(D) {
3537
- const z = {};
3537
+ const T = {};
3538
3538
  return Object.keys(D).forEach((B) => {
3539
3539
  const F = t.fields.find((U) => U.key === B), N = D[B], q = typeof N == "string" ? N.trim() : N;
3540
3540
  if (!(q == null || q === "")) {
3541
3541
  if (typeof q == "object" && q.startDate && q.endDate) {
3542
- q.startDate && q.endDate && (z[B] = q);
3542
+ q.startDate && q.endDate && (T[B] = q);
3543
3543
  return;
3544
3544
  }
3545
3545
  if (F && (F.type === "date" || F.type === "daterange")) {
3546
- q !== 0 && (z[B] = q);
3546
+ q !== 0 && (T[B] = q);
3547
3547
  return;
3548
3548
  }
3549
- z[B] = q;
3549
+ T[B] = q;
3550
3550
  }
3551
- }), z;
3551
+ }), T;
3552
3552
  }
3553
3553
  function J(D) {
3554
- const z = {};
3554
+ const T = {};
3555
3555
  return Object.keys(D).forEach((B) => {
3556
3556
  const F = D[B], N = t.fields.find((q) => q.key === B);
3557
3557
  if (N)
3558
3558
  if (N.type === "daterange" && typeof F == "object") {
3559
3559
  const q = N.startKey || `${B}Start`, U = N.endKey || `${B}End`;
3560
- F.startDate && F.endDate && F.startDate !== 0 && F.endDate !== 0 && (N.format === "timestamp" ? (z[q] = new Date(F.startDate).getTime(), z[U] = new Date(F.endDate).getTime()) : (z[q] = F.startDate, z[U] = F.endDate));
3561
- } else N.type === "date" && F && F !== 0 && N.format === "timestamp" ? z[B] = new Date(F).getTime() : z[B] = F;
3560
+ F.startDate && F.endDate && F.startDate !== 0 && F.endDate !== 0 && (N.format === "timestamp" ? (T[q] = new Date(F.startDate).getTime(), T[U] = new Date(F.endDate).getTime()) : (T[q] = F.startDate, T[U] = F.endDate));
3561
+ } else N.type === "date" && F && F !== 0 && N.format === "timestamp" ? T[B] = new Date(F).getTime() : T[B] = F;
3562
3562
  else
3563
- z[B] = F;
3564
- }), z;
3563
+ T[B] = F;
3564
+ }), T;
3565
3565
  }
3566
3566
  function A() {
3567
3567
  t.fields.forEach((D) => {
3568
- var z, B, F;
3569
- y[D.key] === void 0 && (D.type === "daterange" ? y[D.key] = ((z = t.modelValue) == null ? void 0 : z[D.key]) || {
3568
+ var T, B, F;
3569
+ y[D.key] === void 0 && (D.type === "daterange" ? y[D.key] = ((T = t.modelValue) == null ? void 0 : T[D.key]) || {
3570
3570
  startDate: null,
3571
3571
  endDate: null
3572
3572
  } : D.type === "date" ? y[D.key] = ((B = t.modelValue) == null ? void 0 : B[D.key]) || null : y[D.key] = ((F = t.modelValue) == null ? void 0 : F[D.key]) || "");
@@ -3580,7 +3580,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3580
3580
  { deep: !0, immediate: !0 }
3581
3581
  ), De(() => {
3582
3582
  A();
3583
- }), (D, z) => (i(), u("div", mo, [
3583
+ }), (D, T) => (i(), u("div", mo, [
3584
3584
  o("div", wo, [
3585
3585
  o("div", bo, [
3586
3586
  o("div", ko, [
@@ -3596,7 +3596,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3596
3596
  }, [
3597
3597
  o("div", xo, [
3598
3598
  e.Iflabel ? (i(), u("label", $o, ee(B.label), 1)) : W("", !0),
3599
- (i(), Le(it(T(B.type)), {
3599
+ (i(), Le(it(z(B.type)), {
3600
3600
  modelValue: y[B.key],
3601
3601
  "onUpdate:modelValue": (F) => y[B.key] = F,
3602
3602
  placeholder: B.placeholder || `请输入${B.label}`,
@@ -3607,8 +3607,8 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3607
3607
  format: B.format || "timestamp",
3608
3608
  "include-time": B.includeTime || !1,
3609
3609
  filterable: B.filterable === !0,
3610
- onInput: (F) => k(B),
3611
- onChange: (F) => k(B)
3610
+ onInput: (F) => x(B),
3611
+ onChange: (F) => x(B)
3612
3612
  }, null, 40, ["modelValue", "onUpdate:modelValue", "placeholder", "options", "clearable", "size", "width", "format", "include-time", "filterable", "onInput", "onChange"]))
3613
3613
  ])
3614
3614
  ]))), 128))
@@ -3619,7 +3619,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3619
3619
  ie(Ne, {
3620
3620
  variant: "secondary",
3621
3621
  size: "small",
3622
- onClick: x
3622
+ onClick: k
3623
3623
  }, {
3624
3624
  default: ue(() => [
3625
3625
  Ce(ee(m.value ? "收起" : "展开") + " ", 1),
@@ -3635,10 +3635,10 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3635
3635
  ie(Ne, {
3636
3636
  variant: "primary",
3637
3637
  size: "small",
3638
- onClick: w,
3638
+ onClick: b,
3639
3639
  loading: e.loading
3640
3640
  }, {
3641
- default: ue(() => [...z[0] || (z[0] = [
3641
+ default: ue(() => [...T[0] || (T[0] = [
3642
3642
  Ce(" 搜索 ", -1)
3643
3643
  ])]),
3644
3644
  _: 1
@@ -3649,7 +3649,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
3649
3649
  onClick: g,
3650
3650
  loading: e.loading
3651
3651
  }, {
3652
- default: ue(() => [...z[1] || (z[1] = [
3652
+ default: ue(() => [...T[1] || (T[1] = [
3653
3653
  Ce(" 重置 ", -1)
3654
3654
  ])]),
3655
3655
  _: 1
@@ -3809,7 +3809,7 @@ function qe(e) {
3809
3809
  return Me.push({ id: $, el: t, vm: n, height: m, leaving: !1 }), je(), requestAnimationFrame(() => {
3810
3810
  const h = t.firstElementChild;
3811
3811
  if (!h) return;
3812
- const I = h.offsetHeight || m || 0, C = Me.find((T) => T.id === $);
3812
+ const I = h.offsetHeight || m || 0, C = Me.find((z) => z.id === $);
3813
3813
  C && (C.height = I, je());
3814
3814
  }), { close: () => Qe($) };
3815
3815
  }