@lazycatcloud/lzc-toolkit 0.0.50 → 0.0.52

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.es.js CHANGED
@@ -1,106 +1,120 @@
1
- import { unref as b, getCurrentScope as Ce, onScopeDispose as Re, getCurrentInstance as Be, onMounted as te, nextTick as oe, ref as g, watch as $, shallowRef as Pe, computed as f, onUnmounted as fe, inject as T, provide as x, defineComponent as F, openBlock as I, createBlock as pe, Transition as he, withCtx as me, createElementBlock as R, createElementVNode as H, withModifiers as $e, normalizeClass as Fe, renderSlot as ne, createCommentVNode as Ae, render as J, h as P, normalizeStyle as j, toDisplayString as Le, useSlots as De, withDirectives as We, vShow as Me, pushScopeId as ke, popScopeId as Ve, toRef as ze, mergeProps as Ke, normalizeProps as se, guardReactiveProps as re, Fragment as je, renderList as Ne } from "vue";
2
- var ae;
3
- const A = typeof window < "u";
4
- A && ((ae = window?.navigator) == null ? void 0 : ae.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
5
- function X(t) {
6
- return typeof t == "function" ? t() : b(t);
1
+ import { unref as B, getCurrentScope as Ke, onScopeDispose as Qe, getCurrentInstance as Ue, onMounted as de, nextTick as fe, ref as w, watch as ne, shallowRef as qe, computed as S, onUnmounted as Te, inject as F, provide as $, defineComponent as Z, h as Q, render as ae, openBlock as k, createBlock as Oe, Transition as Re, withCtx as De, createElementBlock as J, createElementVNode as M, withModifiers as Ye, normalizeClass as Ge, renderSlot as he, createCommentVNode as Xe, normalizeStyle as le, toDisplayString as Je, useSlots as Ze, withDirectives as et, vShow as tt, pushScopeId as nt, popScopeId as lt, toRef as ot, mergeProps as rt, normalizeProps as me, guardReactiveProps as ge, Fragment as at, renderList as st } from "vue";
2
+ var ye;
3
+ const Ce = typeof window < "u";
4
+ Ce && ((ye = window?.navigator) == null ? void 0 : ye.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
5
+ function se(t) {
6
+ return typeof t == "function" ? t() : B(t);
7
7
  }
8
- function Qe(t, e) {
9
- function o(...n) {
10
- t(() => e.apply(this, n), { fn: e, thisArg: this, args: n });
8
+ function Be(t, e) {
9
+ function n(...l) {
10
+ t(() => e.apply(this, l), { fn: e, thisArg: this, args: l });
11
11
  }
12
- return o;
12
+ return n;
13
13
  }
14
- function Ue(t, e = {}) {
15
- let o, n;
16
- return (r) => {
17
- const l = X(t), d = X(e.maxWait);
18
- if (o && clearTimeout(o), l <= 0 || d !== void 0 && d <= 0)
19
- return n && (clearTimeout(n), n = null), r();
20
- d && !n && (n = setTimeout(() => {
21
- o && clearTimeout(o), n = null, r();
22
- }, d)), o = setTimeout(() => {
23
- n && clearTimeout(n), n = null, r();
24
- }, l);
14
+ function ut(t, e = {}) {
15
+ let n, l;
16
+ return (a) => {
17
+ const r = se(t), i = se(e.maxWait);
18
+ if (n && clearTimeout(n), r <= 0 || i !== void 0 && i <= 0)
19
+ return l && (clearTimeout(l), l = null), a();
20
+ i && !l && (l = setTimeout(() => {
21
+ n && clearTimeout(n), l = null, a();
22
+ }, i)), n = setTimeout(() => {
23
+ l && clearTimeout(l), l = null, a();
24
+ }, r);
25
25
  };
26
26
  }
27
- function qe(t) {
27
+ function it(t, e = !0, n = !0) {
28
+ let l = 0, o, a = !0;
29
+ const r = () => {
30
+ o && (clearTimeout(o), o = void 0);
31
+ };
32
+ return (m) => {
33
+ const p = se(t), d = Date.now() - l;
34
+ if (r(), p <= 0)
35
+ return l = Date.now(), m();
36
+ d > p && (n || !a) ? (l = Date.now(), m()) : e && (o = setTimeout(() => {
37
+ l = Date.now(), a = !0, r(), m();
38
+ }, p)), !n && !o && (o = setTimeout(() => a = !0, p)), a = !1;
39
+ };
40
+ }
41
+ function ct(t) {
28
42
  return t;
29
43
  }
30
- function Ye(t) {
31
- return Ce() ? (Re(t), !0) : !1;
44
+ function vt(t) {
45
+ return Ke() ? (Qe(t), !0) : !1;
46
+ }
47
+ function Ie(t, e = 200, n = {}) {
48
+ return Be(ut(e, n), t);
32
49
  }
33
- function ge(t, e = 200, o = {}) {
34
- return Qe(Ue(e, o), t);
50
+ function be(t, e = 200, n = !1, l = !0) {
51
+ return Be(it(e, n, l), t);
35
52
  }
36
- function Ge(t, e = !0) {
37
- Be() ? te(t) : e ? t() : oe(t);
53
+ function dt(t, e = !0) {
54
+ Ue() ? de(t) : e ? t() : fe(t);
38
55
  }
39
- function _e(t) {
56
+ function Le(t) {
40
57
  var e;
41
- const o = X(t);
42
- return (e = o?.$el) != null ? e : o;
58
+ const n = se(t);
59
+ return (e = n?.$el) != null ? e : n;
43
60
  }
44
- const Je = A ? window : void 0;
45
- A && window.document;
46
- A && window.navigator;
47
- A && window.location;
48
- function Xe(t, e = !1) {
49
- const o = g(), n = () => o.value = Boolean(t());
50
- return n(), Ge(n, e), o;
61
+ const ft = Ce ? window : void 0;
62
+ function ht(t, e = !1) {
63
+ const n = w(), l = () => n.value = Boolean(t());
64
+ return l(), dt(l, e), n;
51
65
  }
52
- const Z = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ee = "__vueuse_ssr_handlers__";
53
- Z[ee] = Z[ee] || {};
54
- Z[ee];
55
- var ie = Object.getOwnPropertySymbols, Ze = Object.prototype.hasOwnProperty, et = Object.prototype.propertyIsEnumerable, tt = (t, e) => {
56
- var o = {};
57
- for (var n in t)
58
- Ze.call(t, n) && e.indexOf(n) < 0 && (o[n] = t[n]);
59
- if (t != null && ie)
60
- for (var n of ie(t))
61
- e.indexOf(n) < 0 && et.call(t, n) && (o[n] = t[n]);
62
- return o;
66
+ const ce = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ve = "__vueuse_ssr_handlers__";
67
+ ce[ve] = ce[ve] || {};
68
+ ce[ve];
69
+ var Se = Object.getOwnPropertySymbols, pt = Object.prototype.hasOwnProperty, mt = Object.prototype.propertyIsEnumerable, gt = (t, e) => {
70
+ var n = {};
71
+ for (var l in t)
72
+ pt.call(t, l) && e.indexOf(l) < 0 && (n[l] = t[l]);
73
+ if (t != null && Se)
74
+ for (var l of Se(t))
75
+ e.indexOf(l) < 0 && mt.call(t, l) && (n[l] = t[l]);
76
+ return n;
63
77
  };
64
- function ot(t, e, o = {}) {
65
- const n = o, { window: s = Je } = n, r = tt(n, ["window"]);
66
- let l;
67
- const d = Xe(() => s && "ResizeObserver" in s), m = () => {
68
- l && (l.disconnect(), l = void 0);
69
- }, p = $(() => _e(t), (h) => {
70
- m(), d.value && s && h && (l = new ResizeObserver(e), l.observe(h, r));
71
- }, { immediate: !0, flush: "post" }), v = () => {
78
+ function yt(t, e, n = {}) {
79
+ const l = n, { window: o = ft } = l, a = gt(l, ["window"]);
80
+ let r;
81
+ const i = ht(() => o && "ResizeObserver" in o), m = () => {
82
+ r && (r.disconnect(), r = void 0);
83
+ }, p = ne(() => Le(t), (c) => {
84
+ m(), i.value && o && c && (r = new ResizeObserver(e), r.observe(c, a));
85
+ }, { immediate: !0, flush: "post" }), d = () => {
72
86
  m(), p();
73
87
  };
74
- return Ye(v), {
75
- isSupported: d,
76
- stop: v
88
+ return vt(d), {
89
+ isSupported: i,
90
+ stop: d
77
91
  };
78
92
  }
79
- function nt(t, e = { width: 0, height: 0 }, o = {}) {
80
- const { box: n = "content-box" } = o, s = g(e.width), r = g(e.height);
81
- return ot(t, ([l]) => {
82
- const d = n === "border-box" ? l.borderBoxSize : n === "content-box" ? l.contentBoxSize : l.devicePixelContentBoxSize;
83
- d ? (s.value = d.reduce((m, { inlineSize: p }) => m + p, 0), r.value = d.reduce((m, { blockSize: p }) => m + p, 0)) : (s.value = l.contentRect.width, r.value = l.contentRect.height);
84
- }, o), $(() => _e(t), (l) => {
85
- s.value = l ? e.width : 0, r.value = l ? e.height : 0;
93
+ function bt(t, e = { width: 0, height: 0 }, n = {}) {
94
+ const { box: l = "content-box" } = n, o = w(e.width), a = w(e.height);
95
+ return yt(t, ([r]) => {
96
+ const i = l === "border-box" ? r.borderBoxSize : l === "content-box" ? r.contentBoxSize : r.devicePixelContentBoxSize;
97
+ i ? (o.value = i.reduce((m, { inlineSize: p }) => m + p, 0), a.value = i.reduce((m, { blockSize: p }) => m + p, 0)) : (o.value = r.contentRect.width, a.value = r.contentRect.height);
98
+ }, n), ne(() => Le(t), (r) => {
99
+ o.value = r ? e.width : 0, a.value = r ? e.height : 0;
86
100
  }), {
87
- width: s,
88
- height: r
101
+ width: o,
102
+ height: a
89
103
  };
90
104
  }
91
- var ue;
105
+ var Ee;
92
106
  (function(t) {
93
107
  t.UP = "UP", t.RIGHT = "RIGHT", t.DOWN = "DOWN", t.LEFT = "LEFT", t.NONE = "NONE";
94
- })(ue || (ue = {}));
95
- var lt = Object.defineProperty, ce = Object.getOwnPropertySymbols, st = Object.prototype.hasOwnProperty, rt = Object.prototype.propertyIsEnumerable, de = (t, e, o) => e in t ? lt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o, at = (t, e) => {
96
- for (var o in e || (e = {}))
97
- st.call(e, o) && de(t, o, e[o]);
98
- if (ce)
99
- for (var o of ce(e))
100
- rt.call(e, o) && de(t, o, e[o]);
108
+ })(Ee || (Ee = {}));
109
+ var St = Object.defineProperty, we = Object.getOwnPropertySymbols, Et = Object.prototype.hasOwnProperty, wt = Object.prototype.propertyIsEnumerable, _e = (t, e, n) => e in t ? St(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, _t = (t, e) => {
110
+ for (var n in e || (e = {}))
111
+ Et.call(e, n) && _e(t, n, e[n]);
112
+ if (we)
113
+ for (var n of we(e))
114
+ wt.call(e, n) && _e(t, n, e[n]);
101
115
  return t;
102
116
  };
103
- const it = {
117
+ const xt = {
104
118
  easeInSine: [0.12, 0, 0.39, 0],
105
119
  easeOutSine: [0.61, 1, 0.88, 1],
106
120
  easeInOutSine: [0.37, 0, 0.63, 1],
@@ -126,183 +140,415 @@ const it = {
126
140
  easeOutBack: [0.34, 1.56, 0.64, 1],
127
141
  easeInOutBack: [0.68, -0.6, 0.32, 1.6]
128
142
  };
129
- at({
130
- linear: qe
131
- }, it);
132
- function ut(t, e) {
133
- const { scrollEndHook: o, itemHeight: n, overscan: s = 5 } = e, r = g(null), l = nt(r), d = g(!0), m = ge(Q, 100);
143
+ _t({
144
+ linear: ct
145
+ }, xt);
146
+ function Tt(t, e) {
147
+ const { scrollEndHook: n, itemHeight: l, overscan: o = 5 } = e, a = w(null), r = bt(a), i = w(!0), m = Ie(ee, 100);
134
148
  let p;
135
- const v = Pe(t), h = g(0), i = g({ start: 0, end: 10 });
149
+ const d = qe(t), c = w(0), s = w({ start: 0, end: 10 });
136
150
  let u = 0;
137
- const E = g([]), _ = f(() => {
138
- let { sum: a, height: c } = { sum: 0, height: 0 };
139
- return v.value.map((w, y) => (typeof n == "number" ? c = n : c = n(y), a += c, { height: c, sum: a }));
140
- }), N = f(() => V(i.value.start)), C = f(() => typeof n == "number" ? _.value.length * n : _.value[_.value.length - 1]?.sum || 0), L = f(() => {
141
- let a = E.value.length - s, c = Math.max(a - u, 0);
142
- return E.value.slice(c, a);
151
+ const b = w([]), _ = S(() => {
152
+ let { sum: f, height: y } = { sum: 0, height: 0 };
153
+ return d.value.map((I, C) => (typeof l == "number" ? y = l : y = l(C), f += y, { height: y, sum: f }));
154
+ }), E = S(() => V(s.value.start)), g = S(() => typeof l == "number" ? _.value.length * l : _.value[_.value.length - 1]?.sum || 0), R = S(() => {
155
+ let f = b.value.length - o, y = Math.max(f - u, 0);
156
+ return b.value.slice(y, f);
143
157
  });
144
- te(() => {
145
- }), fe(() => cancelAnimationFrame(p)), $(
146
- [l.width, l.height, v],
147
- ([a, c]) => {
148
- (a || c) && W();
158
+ de(() => {
159
+ }), Te(() => cancelAnimationFrame(p)), ne(
160
+ [r.width, r.height, d],
161
+ ([f, y]) => {
162
+ (f || y) && U();
149
163
  },
150
164
  { deep: !0 }
151
- ), $(h, () => {
152
- D(), m();
165
+ ), ne(c, () => {
166
+ L(), m();
153
167
  });
154
- function D() {
155
- d.value = !1;
168
+ function L() {
169
+ i.value = !1;
156
170
  }
157
- function Q() {
158
- d.value = !0, o?.();
171
+ function ee() {
172
+ i.value = !0, n?.();
159
173
  }
160
- function W() {
161
- cancelAnimationFrame(p), p = requestAnimationFrame(M);
162
- }
163
- function M() {
164
- if (r.value) {
165
- h.value = r.value.scrollTop, u = B();
166
- let a = k(h.value), c = a + u + s;
167
- a = a - s, a = a < 0 ? 0 : a, c = c > v.value.length ? v.value.length : c, i.value = { start: a, end: c }, E.value = v.value.slice(a, c).map((w, y) => ({
168
- data: w,
169
- index: y + a
174
+ function U() {
175
+ cancelAnimationFrame(p), p = requestAnimationFrame(N);
176
+ }
177
+ function N() {
178
+ if (a.value) {
179
+ c.value = a.value.scrollTop, u = z();
180
+ let f = A(c.value), y = f + u + o;
181
+ f = f - o, f = f < 0 ? 0 : f, y = y > d.value.length ? d.value.length : y, s.value = { start: f, end: y }, b.value = d.value.slice(f, y).map((I, C) => ({
182
+ data: I,
183
+ index: C + f
170
184
  }));
171
185
  }
172
186
  }
173
- function k(a) {
174
- let c = 0, w = _.value.length - 1, y = -1;
175
- for (; c <= w; ) {
176
- const S = Math.floor((c + w) / 2);
177
- _.value[S].sum >= a ? (y = S, w = S - 1) : c = S + 1;
187
+ function A(f) {
188
+ let y = 0, I = _.value.length - 1, C = -1;
189
+ for (; y <= I; ) {
190
+ const O = Math.floor((y + I) / 2);
191
+ _.value[O].sum >= f ? (C = O, I = O - 1) : y = O + 1;
178
192
  }
179
- return Math.max(0, y);
193
+ return Math.max(0, C);
180
194
  }
181
- function B() {
182
- let a = 0, c = 0, w = U();
183
- for (let y = w; y < _.value.length && (a++, c += _.value[y].height, !(c >= l.height.value)); y++)
195
+ function z() {
196
+ let f = 0, y = 0, I = H();
197
+ for (let C = I; C < _.value.length && (f++, y += _.value[C].height, !(y >= r.height.value)); C++)
184
198
  ;
185
- return a;
199
+ return f;
186
200
  }
187
- function V(a) {
188
- if (typeof n == "number")
189
- return a * n;
190
- let c = _.value[a];
191
- return c ? c.sum - c.height : 0;
201
+ function V(f) {
202
+ if (typeof l == "number")
203
+ return f * l;
204
+ let y = _.value[f];
205
+ return y ? y.sum - y.height : 0;
192
206
  }
193
- function z(a) {
194
- return _.value[a] || { sum: 0, height: 0 };
207
+ function j(f) {
208
+ return _.value[f] || { sum: 0, height: 0 };
195
209
  }
196
- function U() {
197
- let a = i.value.start;
198
- return a >= s && (a += s), a;
210
+ function H() {
211
+ let f = s.value.start;
212
+ return f >= o && (f += o), f;
199
213
  }
200
- function q(a) {
201
- if (r.value) {
202
- const c = z(a);
203
- r.value.scrollTop = c.sum - c.height, M();
214
+ function q(f) {
215
+ if (a.value) {
216
+ const y = j(f);
217
+ a.value.scrollTop = y.sum - y.height, N();
204
218
  }
205
219
  }
206
- const Y = f(() => ({
220
+ const te = S(() => ({
207
221
  style: {
208
222
  width: "100%",
209
- height: `${C.value}px`,
210
- pointerEvents: d.value ? void 0 : "none"
223
+ height: `${g.value}px`,
224
+ pointerEvents: i.value ? void 0 : "none"
211
225
  }
212
- })), K = f(() => ({
226
+ })), K = S(() => ({
213
227
  style: {
214
- transform: `translate3d(0, ${N.value}px, 0)`,
228
+ transform: `translate3d(0, ${E.value}px, 0)`,
215
229
  "will-change": "transform"
216
230
  }
217
- })), G = {
231
+ })), Y = {
218
232
  overflowY: "auto"
219
233
  };
220
234
  return {
221
- list: E,
222
- visiableList: L,
223
- getItemHeightData: z,
224
- getoffsetTopIndex: k,
225
- totalHeight: C,
226
- clientHeight: l.height,
235
+ list: b,
236
+ visiableList: R,
237
+ getItemHeightData: j,
238
+ getoffsetTopIndex: A,
239
+ totalHeight: g,
240
+ clientHeight: r.height,
227
241
  scrollTo: q,
228
- scrollTop: h,
229
- isScrollEnd: d,
242
+ scrollTop: c,
243
+ isScrollEnd: i,
230
244
  containerProps: {
231
- ref: r,
245
+ ref: a,
232
246
  onScroll: () => {
233
- W();
247
+ U();
234
248
  },
235
- style: G
249
+ style: Y
236
250
  },
237
- wrapperProps: Y,
251
+ wrapperProps: te,
238
252
  innerProps: K
239
253
  };
240
254
  }
241
- const be = Symbol(), ye = Symbol(), Se = Symbol(), we = Symbol(), Oe = Symbol(), xe = Symbol(), Ee = Symbol(), Te = Symbol(), He = Symbol();
242
- function xt() {
243
- const { voidFn: t, boolFn: e, boolRef: o, arrayRef: n } = {
255
+ const He = Symbol(), $e = Symbol(), Ae = Symbol(), Pe = Symbol(), Fe = Symbol(), Me = Symbol(), ze = Symbol(), We = Symbol(), ke = Symbol();
256
+ function Mt() {
257
+ const { voidFn: t, boolFn: e, boolRef: n, arrayRef: l } = {
244
258
  voidFn: (u) => {
245
259
  },
246
260
  boolFn: (u) => !1,
247
- boolRef: f(() => !1),
248
- arrayRef: f(() => [])
249
- }, s = T(we, n), r = T(Se, e), l = T(Te, o), d = T(ye, t), m = T(be, t), p = T(Oe, t), v = T(xe, t), h = T(Ee, t), i = T(He, t);
261
+ boolRef: S(() => !1),
262
+ arrayRef: S(() => [])
263
+ }, o = F(Pe, l), a = F(Ae, e), r = F(We, n), i = F($e, t), m = F(He, t), p = F(Fe, t), d = F(Me, t), c = F(ze, t), s = F(ke, t);
250
264
  return {
251
- selected: s,
252
- isSelected: r,
253
- isAllSelected: l,
254
- toggle: d,
265
+ selected: o,
266
+ isSelected: a,
267
+ isAllSelected: r,
268
+ toggle: i,
255
269
  toggleAll: m,
256
270
  select: p,
257
- selectAll: v,
258
- unselect: h,
259
- unselectAll: i
271
+ selectAll: d,
272
+ unselect: c,
273
+ unselectAll: s
260
274
  };
261
275
  }
262
- function Et(t, e) {
263
- const o = g({}), n = f(() => t.value.filter((i) => o.value[i[e]])), s = f(() => n.value.length != 0 && Object.keys(o.value).length == t.value.length);
264
- function r() {
265
- t.value.forEach((i) => {
266
- o.value[i[e]] = !0;
276
+ function zt(t, e) {
277
+ const n = w({}), l = S(() => t.value.filter((s) => n.value[s[e]])), o = S(() => l.value.length != 0 && Object.keys(n.value).length == t.value.length);
278
+ function a() {
279
+ t.value.forEach((s) => {
280
+ n.value[s[e]] = !0;
267
281
  });
268
282
  }
269
- function l() {
270
- o.value = {};
283
+ function r() {
284
+ n.value = {};
271
285
  }
272
- function d(i) {
273
- i.forEach((u) => {
274
- o.value[u[e]] || (o.value[u[e]] = !0);
286
+ function i(s) {
287
+ s.forEach((u) => {
288
+ n.value[u[e]] || (n.value[u[e]] = !0);
275
289
  });
276
290
  }
277
- function m(i) {
278
- i.forEach((u) => {
279
- o.value[u[e]] && delete o.value[u[e]];
291
+ function m(s) {
292
+ s.forEach((u) => {
293
+ n.value[u[e]] && delete n.value[u[e]];
280
294
  });
281
295
  }
282
- function p(i) {
283
- return !!o.value[i[e]];
296
+ function p(s) {
297
+ return !!n.value[s[e]];
284
298
  }
285
- function v(i) {
286
- i.forEach((u) => {
287
- p(u) ? delete o.value[u[e]] : o.value[u[e]] = !0;
299
+ function d(s) {
300
+ s.forEach((u) => {
301
+ p(u) ? delete n.value[u[e]] : n.value[u[e]] = !0;
288
302
  });
289
303
  }
290
- function h() {
291
- s.value ? l() : r();
304
+ function c() {
305
+ o.value ? r() : a();
292
306
  }
293
- return x(be, h), x(ye, v), x(Se, p), x(we, n), x(Oe, d), x(xe, r), x(Ee, m), x(Te, s), x(He, l), {
294
- selected: n,
295
- select: d,
296
- selectAll: r,
307
+ return $(He, c), $($e, d), $(Ae, p), $(Pe, l), $(Fe, i), $(Me, a), $(ze, m), $(We, o), $(ke, r), {
308
+ selected: l,
309
+ select: i,
310
+ selectAll: a,
297
311
  unselect: m,
298
- unselectAll: l,
299
- toggle: v,
300
- toggleAll: h,
312
+ unselectAll: r,
313
+ toggle: d,
314
+ toggleAll: c,
301
315
  isSelected: p,
302
- isAllSelected: s
316
+ isAllSelected: o
317
+ };
318
+ }
319
+ function ie(t) {
320
+ return () => {
321
+ console.debug(`\u9ED8\u8BA4${t}\u65B9\u6CD5,\u9700\u8981\u81EA\u5B9A\u4E49\u751F\u6548`);
322
+ };
323
+ }
324
+ function Ne({
325
+ attribute: t,
326
+ selectWay: e = "colum",
327
+ scrollOptions: n = {},
328
+ getSelectMap: l = () => ({})
329
+ }) {
330
+ const {
331
+ select: o = ie("\u9009\u62E9"),
332
+ unselect: a = ie("\u53D6\u6D88\u9009\u62E9"),
333
+ unselectAll: r = ie("\u53D6\u6D88\u5168\u9009")
334
+ } = l();
335
+ let i = {};
336
+ const m = S(
337
+ () => be(e === "colum" ? W : oe, 50)
338
+ ), p = /* @__PURE__ */ new Set(), d = w(!0), c = w(), s = w(!1), u = w({ x: 0, y: 0 }), b = w({ x: 0, y: 0, scrollTop: 0 }), _ = new ResizeObserver(
339
+ (v) => E.value = v[0].target.getBoundingClientRect()
340
+ ), E = w({}), g = w({
341
+ top: 0,
342
+ height: 0,
343
+ sync(v = !1) {
344
+ g.value.top = c.value?.scrollTop || 0, v && (g.value.height = c.value?.scrollHeight || 0);
345
+ }
346
+ }), R = S(() => s.value ? {
347
+ left: Math.min(u.value.x, b.value.x) - E.value.left,
348
+ top: Math.min(u.value.y, b.value.y) - E.value.top,
349
+ width: Math.abs(u.value.x - b.value.x),
350
+ height: Math.abs(u.value.y - b.value.y)
351
+ } : { left: 0, top: 0, width: 0, height: 0 }), { margin: L = 50, startSpeed: ee = 30, maxSpeed: U = 30 } = n;
352
+ let N;
353
+ const A = L, z = ee, V = U, j = (v) => v ** 1;
354
+ let H = 0;
355
+ function q(v) {
356
+ if (cancelAnimationFrame(N), H = te(v), H = Math.max(
357
+ Math.min(H, V),
358
+ -V
359
+ ), H !== 0) {
360
+ const h = c.value;
361
+ if (!h || !s.value)
362
+ return;
363
+ const D = g.value.height - E.value.height;
364
+ let x = g.value.top + Number(H);
365
+ x = Math.min(Math.max(0, x), D), h.scrollTop = x, Y(), N = requestAnimationFrame(() => q(v));
366
+ }
367
+ }
368
+ function te(v) {
369
+ if (c.value) {
370
+ const D = E.value, x = D.bottom - v;
371
+ if (x < A)
372
+ return z * j(1 - x / A);
373
+ const P = v - D.top;
374
+ if (P < A)
375
+ return -z * j(1 - P / A);
376
+ }
377
+ return 0;
378
+ }
379
+ function K(v) {
380
+ const h = { ...R.value, right: 0, bottom: 0 };
381
+ return h.left += E.value.left, h.top += E.value.top - g.value.top, h.right = h.width + h.left, h.bottom = h.height + h.top, h.left < v.right && h.right > v.left && h.top < v.bottom && h.bottom > v.top;
382
+ }
383
+ function Y() {
384
+ g.value.sync();
385
+ const { top: v, height: h } = g.value;
386
+ b.value.y = Math.min(
387
+ h + E.value.top,
388
+ b.value.y + v - b.value.scrollTop
389
+ ), b.value.scrollTop = v;
390
+ }
391
+ function f(v, h, D = "dynamic-styles") {
392
+ let x = document.getElementById(D);
393
+ x || (x = document.createElement("style"), x.id = D, document.head.appendChild(x));
394
+ const P = x.sheet.cssRules, X = P.length, je = `${v} { ${h} }`;
395
+ for (let ue = 0; ue < X; ue++) {
396
+ const pe = P[ue];
397
+ if (pe.selectorText === v && pe.style.cssText === h)
398
+ return;
399
+ }
400
+ x.sheet.insertRule(je, X);
401
+ }
402
+ function y(v, h) {
403
+ d.value = !0, s.value = !0, g.value.height ? g.value.sync() : g.value.sync(!0), u.value.x = v, u.value.y = h + g.value.top, b.value.x = u.value.x, b.value.y = u.value.y, c.value?.classList.add("disable-scroll-behavior"), p.clear();
404
+ }
405
+ function I(v, h, D) {
406
+ !s.value || (d.value && e === "colum" && !T() && (r(), d.value = !1), D?.(), q(h), b.value.x = Math.max(v, E.value.left), b.value.y = Math.min(
407
+ h + g.value.top,
408
+ g.value.height + E.value.top
409
+ ), b.value.scrollTop = g.value.top, m.value());
410
+ }
411
+ function C() {
412
+ s.value = !1, c.value?.classList.remove("disable-scroll-behavior");
413
+ }
414
+ function O() {
415
+ !s.value || (H || Y(), m.value());
416
+ }
417
+ function T() {
418
+ if (!s.value)
419
+ return !1;
420
+ const { width: v, height: h } = R.value;
421
+ return !(Math.max(v, h) > 5);
422
+ }
423
+ function G() {
424
+ T() && r();
425
+ }
426
+ function W() {
427
+ T() || c.value?.querySelectorAll(`[${t}]`).forEach((v) => {
428
+ i[`${t}`] = v.getAttribute(`${t}`), K(v.getBoundingClientRect()) ? o([i]) : a([i]);
429
+ });
430
+ }
431
+ function oe() {
432
+ const v = [];
433
+ let h = null, D = 0;
434
+ c.value?.querySelectorAll(`[${t}]`).forEach((x, P) => {
435
+ const X = x.getAttribute(`${t}`);
436
+ v.push(X), K(x.getBoundingClientRect()) ? (h === null && (h = P), h = Math.min(h, P), D = Math.max(D, P)) : (i[`${t}`] = X, p.has(X) && a([i]));
437
+ });
438
+ for (let x = h; x < D + 1; x++)
439
+ i[`${t}`] = v[x], o([i]), p.add(v[x]);
440
+ }
441
+ function re(v) {
442
+ return !v?.value || (c.value = v.value, !c?.value) ? !1 : (_.observe(c.value), f(
443
+ ".disable-scroll-behavior",
444
+ "scroll-behavior: unset !important;"
445
+ ), !0);
446
+ }
447
+ return {
448
+ init: re,
449
+ dragStart: y,
450
+ dragMove: I,
451
+ dragEnd: C,
452
+ onScroll: O,
453
+ isSingleClick: T,
454
+ cancelSelectAllBySingleClick: G,
455
+ selectFn: m,
456
+ selectRange: R,
457
+ isPressing: s,
458
+ containerEl: c,
459
+ observer: _
303
460
  };
304
461
  }
305
- const ct = Symbol(), dt = /* @__PURE__ */ F({
462
+ function Wt(t) {
463
+ const e = Ne(t), { observer: n, selectRange: l } = e, {
464
+ onScroll: o,
465
+ dragStart: a,
466
+ dragMove: r,
467
+ dragEnd: i,
468
+ cancelSelectAllBySingleClick: m
469
+ } = e, p = S(() => ({
470
+ left: `${l.value.left}px`,
471
+ top: `${l.value.top}px`,
472
+ width: `${l.value.width}px`,
473
+ height: `${l.value.height}px`
474
+ })), d = Z({
475
+ render() {
476
+ return Q("div", {
477
+ id: "selectBoxEl",
478
+ class: "absolute z-50 bg-blue-200 opacity-50",
479
+ style: p.value
480
+ });
481
+ }
482
+ });
483
+ function c(E) {
484
+ E.button === 0 && a(E.x, E.y);
485
+ }
486
+ function s(E) {
487
+ r(E.x, E.y);
488
+ }
489
+ function u(E) {
490
+ E.composedPath().some((R) => R?.getAttribute?.(t.attribute)) || m(), i();
491
+ }
492
+ function b(E) {
493
+ try {
494
+ if (!e.init(E))
495
+ throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
496
+ if (!e.containerEl?.value)
497
+ return !1;
498
+ ae(Q(d), e.containerEl.value), e.containerEl.value?.addEventListener("scroll", o), e.containerEl.value?.addEventListener("mousedown", c), window.addEventListener("mousemove", s), window.addEventListener("mouseup", u);
499
+ } catch (g) {
500
+ console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", g);
501
+ }
502
+ }
503
+ function _() {
504
+ n.disconnect(), e.containerEl.value?.removeEventListener("scroll", o), e.containerEl.value?.removeEventListener("mousedown", c), window.removeEventListener("mousemove", s), window.removeEventListener("mouseup", u);
505
+ }
506
+ return { init: b, unMount: _ };
507
+ }
508
+ function kt(t, e, n = 600) {
509
+ const l = Ne({
510
+ ...t,
511
+ selectWay: "row",
512
+ scrollOptions: {
513
+ startSpeed: 5,
514
+ maxSpeed: 5
515
+ }
516
+ }), { observer: o } = l, { onScroll: a, dragStart: r, dragMove: i, dragEnd: m, selectFn: p } = l;
517
+ let d;
518
+ function c() {
519
+ clearTimeout(d);
520
+ }
521
+ function s(g) {
522
+ c(), d = setTimeout(() => {
523
+ const { clientX: R, clientY: L } = g.targetTouches[0];
524
+ r(R, L), e?.(), p.value(), g.preventDefault();
525
+ }, n);
526
+ }
527
+ function u(g) {
528
+ c();
529
+ const { clientX: R, clientY: L } = g.targetTouches[0];
530
+ i(R, L, () => g.preventDefault());
531
+ }
532
+ function b() {
533
+ c(), m();
534
+ }
535
+ function _(g) {
536
+ try {
537
+ if (!l.init(g))
538
+ throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
539
+ if (!l.containerEl?.value)
540
+ return !1;
541
+ l.containerEl.value?.addEventListener("scroll", a), l.containerEl.value?.addEventListener("touchstart", s), l.containerEl.value?.addEventListener("touchmove", u), window.addEventListener("touchcancel", b), window.addEventListener("touchend", b);
542
+ } catch (R) {
543
+ console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", R);
544
+ }
545
+ }
546
+ function E() {
547
+ o.disconnect(), l.containerEl.value?.removeEventListener("scroll", a), l.containerEl.value?.removeEventListener("touchstart", s), l.containerEl.value?.removeEventListener("touchmove", u), window.removeEventListener("touchcancel", b), window.removeEventListener("touchEnd", b);
548
+ }
549
+ return { init: _, unMount: E };
550
+ }
551
+ const Ot = Symbol(), Rt = /* @__PURE__ */ Z({
306
552
  __name: "Dialog",
307
553
  props: {
308
554
  visiable: { type: Boolean, default: !1 },
@@ -311,64 +557,64 @@ const ct = Symbol(), dt = /* @__PURE__ */ F({
311
557
  },
312
558
  emits: ["update:visiable"],
313
559
  setup(t, { emit: e }) {
314
- const o = t, n = () => {
315
- o.closeOnClickOverlay && e("update:visiable", !1);
560
+ const n = t, l = () => {
561
+ n.closeOnClickOverlay && e("update:visiable", !1);
316
562
  };
317
- return x(ct, () => e("update:visiable", !1)), (s, r) => (I(), pe(he, { name: "modal" }, {
318
- default: me(() => [
319
- t.visiable ? (I(), R("div", {
563
+ return $(Ot, () => e("update:visiable", !1)), (o, a) => (k(), Oe(Re, { name: "modal" }, {
564
+ default: De(() => [
565
+ t.visiable ? (k(), J("div", {
320
566
  key: 0,
321
- onClick: n,
322
- class: "modal absolute inset-0 bottom-0 flex bg-stone-900 bg-opacity-50 z-[999]"
567
+ onClick: l,
568
+ class: "modal absolute left-0 right-0 top-0 bottom-0 flex bg-stone-900 bg-opacity-50 z-[999]"
323
569
  }, [
324
- H("div", {
325
- onClick: r[0] || (r[0] = $e(() => {
570
+ M("div", {
571
+ onClick: a[0] || (a[0] = Ye(() => {
326
572
  }, ["stop"])),
327
- class: Fe(["dialog m-auto flex flex-col", t.dialogClass])
573
+ class: Ge(["dialog m-auto flex flex-col", t.dialogClass])
328
574
  }, [
329
- ne(s.$slots, "default")
575
+ he(o.$slots, "default")
330
576
  ], 2)
331
- ])) : Ae("", !0)
577
+ ])) : Xe("", !0)
332
578
  ]),
333
579
  _: 3
334
580
  }));
335
581
  }
336
582
  });
337
- function Tt(t) {
338
- function e(o, n) {
339
- const s = document.createElement("div"), r = {
583
+ function Nt(t) {
584
+ function e(n, l) {
585
+ const o = document.createElement("div"), a = {
340
586
  setup() {
341
- return () => P(
342
- dt,
587
+ return () => Q(
588
+ Rt,
343
589
  {
344
590
  visiable: !0,
345
591
  "onUpdate:visiable": () => {
346
- s?.remove();
592
+ o?.remove();
347
593
  },
348
594
  ...t
349
595
  },
350
596
  {
351
- default: () => P(o, n)
597
+ default: () => Q(n, l)
352
598
  }
353
599
  );
354
600
  }
355
601
  };
356
- return document.body.appendChild(s), J(P(r), s), {
357
- close: () => s?.remove()
602
+ return document.body.appendChild(o), ae(Q(a), o), {
603
+ close: () => o?.remove()
358
604
  };
359
605
  }
360
606
  return {
361
607
  create: e
362
608
  };
363
609
  }
364
- const vt = { class: "toast" }, ft = /* @__PURE__ */ F({
610
+ const Dt = /* @__PURE__ */ Z({
365
611
  __name: "Toast",
366
612
  props: {
367
613
  message: null,
368
614
  position: null
369
615
  },
370
616
  setup(t) {
371
- const e = t, o = g(), n = g(), s = g(), r = f(() => {
617
+ const e = t, n = w(), l = w(), o = w(), a = S(() => {
372
618
  switch (e.position) {
373
619
  case "top":
374
620
  return 10;
@@ -377,60 +623,63 @@ const vt = { class: "toast" }, ft = /* @__PURE__ */ F({
377
623
  case "bottom":
378
624
  return 85;
379
625
  }
380
- }), l = f(() => ({
626
+ }), r = S(() => ({
381
627
  position: "absolute",
382
628
  borderRadius: "10px",
383
629
  backgroundColor: "rgba(0, 0, 0, 0.8)",
384
630
  padding: "14px 19px",
385
- top: `calc(${r.value}% - ${s.value}px)`,
386
- left: `calc(50% - ${n.value}px)`
631
+ top: `calc(${a.value}% - ${o.value}px)`,
632
+ left: `calc(50% - ${l.value}px)`
633
+ })), i = S(() => ({
634
+ width: "fit-content",
635
+ display: "flex",
636
+ justifyContent: "center",
637
+ alignItems: "center",
638
+ color: "white",
639
+ fontSize: "14px"
387
640
  }));
388
- return oe(() => {
389
- n.value = o.value.offsetWidth / 2, s.value = o.value.offsetHeight / 2;
390
- }), (d, m) => (I(), R("div", {
641
+ return fe(() => {
642
+ l.value = n.value.offsetWidth / 2, o.value = n.value.offsetHeight / 2;
643
+ }), (m, p) => (k(), J("div", {
391
644
  id: "toastWrapper",
392
645
  ref_key: "toastWrapper",
393
- ref: o,
646
+ ref: n,
394
647
  class: "toastWrapper",
395
- style: j([b(l), { zIndex: 9999 }])
648
+ style: le([B(r), { zIndex: 9999 }])
396
649
  }, [
397
- H("div", vt, [
398
- H("span", null, Le(t.message), 1)
399
- ])
650
+ M("div", {
651
+ style: le(B(i))
652
+ }, [
653
+ M("span", null, Je(t.message), 1)
654
+ ], 4)
400
655
  ], 4));
401
656
  }
402
- });
403
- const le = (t, e) => {
404
- const o = t.__vccOpts || t;
405
- for (const [n, s] of e)
406
- o[n] = s;
407
- return o;
408
- }, pt = /* @__PURE__ */ le(ft, [["__scopeId", "data-v-4a518cee"]]), ve = {
657
+ }), xe = {
409
658
  message: "\u61D2\u732B\u4E91 Yes!!!",
410
659
  position: "middle",
411
660
  duration: 1500
412
661
  };
413
- class Ht {
662
+ class Vt {
414
663
  options;
415
664
  container;
416
665
  constructor(e) {
417
666
  this.options = e, this.container = document.createElement("div");
418
667
  }
419
668
  present() {
420
- const e = P(P(pt), { ...ve, ...this.options });
421
- J(e, this.container), document.body.insertBefore(this.container, document.body.firstChild);
422
- const o = this.options.duration || ve.duration;
669
+ const e = Q(Q(Dt), { ...xe, ...this.options });
670
+ ae(e, this.container), document.body.insertBefore(this.container, document.body.firstChild);
671
+ const n = this.options.duration || xe.duration;
423
672
  setTimeout(() => {
424
673
  this.dismiss();
425
- }, o);
674
+ }, n);
426
675
  }
427
676
  dismiss() {
428
677
  this.container && (this.container.querySelector("#toastWrapper")?.classList.add("animate-toastAnimation"), setTimeout(() => {
429
- this.container && (J(null, this.container), document.body.removeChild(this.container));
678
+ this.container && (ae(null, this.container), document.body.removeChild(this.container));
430
679
  }, 500));
431
680
  }
432
681
  }
433
- const ht = ["xlink:href", "fill", "color"], It = /* @__PURE__ */ F({
682
+ const Ct = ["xlink:href", "fill", "color"], jt = /* @__PURE__ */ Z({
434
683
  __name: "SvgIcon",
435
684
  props: {
436
685
  name: null,
@@ -440,127 +689,132 @@ const ht = ["xlink:href", "fill", "color"], It = /* @__PURE__ */ F({
440
689
  height: null
441
690
  },
442
691
  setup(t) {
443
- const e = t, o = f(() => `#${e.prefix}-${e.name}`), n = f(() => ({
692
+ const e = t, n = S(() => `#${e.prefix}-${e.name}`), l = S(() => ({
444
693
  width: `${e.width ?? e.height}px`,
445
694
  height: `${e.height ?? e.width}px`,
446
695
  aspectRatio: e.width && e.height ? void 0 : "1/1"
447
696
  }));
448
- return (s, r) => (I(), R("svg", {
697
+ return (o, a) => (k(), J("svg", {
449
698
  "aria-hidden": "",
450
- style: j(b(n))
699
+ style: le(B(l))
451
700
  }, [
452
- H("use", {
453
- "xlink:href": b(o),
701
+ M("use", {
702
+ "xlink:href": B(n),
454
703
  fill: t.color,
455
704
  color: t.color
456
- }, null, 8, ht)
705
+ }, null, 8, Ct)
457
706
  ], 4));
458
707
  }
459
708
  });
460
- function mt(t) {
709
+ function Bt(t) {
461
710
  const {
462
711
  containerEl: e,
463
- sliderEl: o,
464
- autoHeight: n,
465
- performance: s = {},
466
- maxHeightRatio: r = 0.9
467
- } = t, l = g(!0), d = ge(V, 100);
712
+ sliderEl: n,
713
+ autoHeight: l,
714
+ performance: o = {},
715
+ maxHeightRatio: a = 0.9
716
+ } = t, r = w(!0), i = Ie(V, 100);
468
717
  let m, p = "";
469
- const v = g(0), h = g(0), i = g(0), u = g({
718
+ const d = w(0), c = w(0), s = w(0), u = w({
470
719
  top: 0,
471
720
  scrollTop: 0,
472
721
  scrollHeight: 0,
473
722
  clientHeight: 0
474
- }), E = g({
723
+ }), b = w({
475
724
  clientHeight: 0
476
- }), _ = f(() => !!h.value), N = f(() => u.value.scrollHeight > u.value.clientHeight), C = f(() => u.value.clientHeight - E.value.clientHeight), L = f(() => u.value.scrollHeight - u.value.clientHeight), D = f(() => Math.max(
725
+ }), _ = S(() => !!c.value), E = S(() => u.value.scrollHeight > u.value.clientHeight), g = S(() => u.value.clientHeight - b.value.clientHeight), R = S(() => u.value.scrollHeight - u.value.clientHeight), L = S(() => Math.max(
477
726
  u.value.clientHeight / u.value.scrollHeight,
478
727
  0.05
479
- )), Q = f(() => D.value > r ? 0 : D.value * u.value.clientHeight), W = f(() => ({
728
+ )), ee = S(() => L.value > a ? 0 : L.value * u.value.clientHeight), U = S(() => ({
480
729
  willChange: "transform",
481
- transform: `translate3d(0,${i.value}px,0)`,
482
- height: n ? `${Q.value}px` : void 0
730
+ transform: `translate3d(0,${s.value}px,0)`,
731
+ height: l ? `${ee.value}px` : void 0
483
732
  }));
484
- function M(S) {
485
- B(), h.value = S.clientY - o.value.getBoundingClientRect().top || 1, p = getComputedStyle(e.value).scrollBehavior, p === "smooth" && (e.value.style.scrollBehavior = "unset");
733
+ function N(O) {
734
+ z(), c.value = O.clientY - n.value.getBoundingClientRect().top || 1, p = getComputedStyle(e.value).scrollBehavior, p === "smooth" && (e.value.style.scrollBehavior = "unset");
486
735
  }
487
- function k() {
488
- e.value.style.scrollBehavior = p, h.value = 0, d();
736
+ function A() {
737
+ e.value.style.scrollBehavior = p, c.value = 0, i();
489
738
  }
490
- function B() {
491
- l.value = !1;
739
+ function z() {
740
+ r.value = !1;
492
741
  }
493
742
  function V() {
494
- _.value || (l.value = !0);
743
+ _.value || (r.value = !0);
495
744
  }
496
- function z(S) {
745
+ function j(O) {
497
746
  if (!_.value)
498
747
  return;
499
- let O = S.clientY - u.value.top - h.value;
500
- O < 0 ? i.value = 0 : O >= C.value ? i.value = C.value : i.value = O, e.value.scrollTo({
501
- top: i.value / C.value * L.value
748
+ let T = O.clientY - u.value.top - c.value;
749
+ T < 0 ? s.value = 0 : T >= g.value ? s.value = g.value : s.value = T, e.value.scrollTo({
750
+ top: s.value / g.value * R.value
502
751
  });
503
752
  }
504
- function U() {
753
+ function H() {
505
754
  _.value || q();
506
755
  }
507
756
  function q() {
508
- cancelAnimationFrame(m), m = requestAnimationFrame(Y);
757
+ cancelAnimationFrame(m), m = requestAnimationFrame(te);
509
758
  }
510
- function Y() {
511
- e.value && (v.value = s.scrollTop?.value ?? e.value.scrollTop, i.value = v.value / L.value * C.value);
759
+ function te() {
760
+ e.value && (d.value = o.scrollTop?.value ?? e.value.scrollTop, s.value = d.value / R.value * g.value);
512
761
  }
513
- function K(S) {
514
- let O = "addEventListener";
515
- S === "add" ? O = "addEventListener" : O = "removeEventListener", o.value?.[O]("pointerdown", M, {
762
+ function K(O) {
763
+ let T = "addEventListener";
764
+ O === "add" ? T = "addEventListener" : T = "removeEventListener", n.value?.[T]("pointerdown", N, {
516
765
  passive: !0
517
- }), window[O]("pointermove", z, { passive: !0 }), window[O]("pointerup", k, { passive: !0 });
766
+ }), window[T]("pointermove", j, { passive: !0 }), window[T]("pointerup", A, { passive: !0 });
518
767
  }
519
- const G = new MutationObserver((S) => {
520
- S.map((Ie) => Ie.oldValue).join().includes("height") && a();
768
+ const Y = new MutationObserver((O) => {
769
+ O.map((G) => G.oldValue).join().includes("height") && f();
521
770
  });
522
- function a() {
771
+ function f() {
523
772
  u.value.top = e.value?.getBoundingClientRect().top ?? 0, u.value.scrollHeight = e.value?.scrollHeight ?? 0, u.value.clientHeight = e.value?.clientHeight ?? 0;
524
773
  }
525
- function c() {
526
- B(), setTimeout(() => {
527
- E.value.clientHeight = o.value?.clientHeight ?? 0, V();
774
+ function y() {
775
+ z(), setTimeout(() => {
776
+ b.value.clientHeight = n.value?.clientHeight ?? 0, V();
528
777
  }, 150);
529
778
  }
530
- function w() {
531
- document.styleSheets[0].insertRule(
532
- ".hide-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }",
533
- 0
534
- ), document.styleSheets[0].insertRule(
535
- ".hide-scrollbar::-webkit-scrollbar{ display: none }",
536
- 0
537
- ), e.value?.classList.add("hide-scrollbar");
779
+ function I(O, T, G = "dynamic-styles") {
780
+ let W = document.getElementById(G);
781
+ W || (W = document.createElement("style"), W.id = G, document.head.appendChild(W));
782
+ const oe = W.sheet.cssRules, re = oe.length, v = `${O} { ${T} }`;
783
+ for (let h = 0; h < re; h++) {
784
+ const D = oe[h];
785
+ if (D.selectorText === O && D.style.cssText === T)
786
+ return;
787
+ }
788
+ W.sheet.insertRule(v, re);
538
789
  }
539
- function y() {
540
- e.value && o.value ? (w(), e.value.addEventListener("scroll", U, {
790
+ function C() {
791
+ e.value && n.value ? (I(
792
+ ".hide-scrollbar",
793
+ "scrollbar-width: none; -ms-overflow-style: none;"
794
+ ), I(".hide-scrollbar::-webkit-scrollbar", "display: none"), e.value.addEventListener("scroll", H, {
541
795
  passive: !0
542
- }), K("add"), G.observe(e.value, {
796
+ }), K("add"), Y.observe(e.value, {
543
797
  subtree: !0,
544
798
  attributeOldValue: !0,
545
799
  attributeFilter: ["style"]
546
800
  }), setTimeout(() => {
547
- a();
548
- }, 100), c()) : console.error("useScrollBar:", "\u521D\u59CB\u5316\u5931\u8D25!", { containerEl: e, sliderEl: o });
801
+ f();
802
+ }, 100), y()) : console.error("useScrollBar:", "\u521D\u59CB\u5316\u5931\u8D25!", { containerEl: e, sliderEl: n });
549
803
  }
550
- return $(v, () => {
551
- B(), d();
804
+ return ne(d, () => {
805
+ z(), i();
552
806
  }), {
553
- isScrollEnd: l,
807
+ isScrollEnd: r,
554
808
  isDragSlider: _,
555
- offsetTop: i,
556
- scrollTop: v,
557
- scrollable: N,
558
- sliderPos: W,
559
- init: y,
809
+ offsetTop: s,
810
+ scrollTop: d,
811
+ scrollable: E,
812
+ sliderPos: U,
813
+ init: C,
560
814
  modifySliderEventListener: K
561
815
  };
562
816
  }
563
- const gt = (t) => (ke("data-v-edec7292"), t = t(), Ve(), t), _t = /* @__PURE__ */ gt(() => /* @__PURE__ */ H("div", { class: "default-slider" }, null, -1)), bt = /* @__PURE__ */ F({
817
+ const It = (t) => (nt("data-v-edec7292"), t = t(), lt(), t), Lt = /* @__PURE__ */ It(() => /* @__PURE__ */ M("div", { class: "default-slider" }, null, -1)), Ht = /* @__PURE__ */ Z({
564
818
  __name: "ScrollBar",
565
819
  props: {
566
820
  containerEl: null,
@@ -569,50 +823,55 @@ const gt = (t) => (ke("data-v-edec7292"), t = t(), Ve(), t), _t = /* @__PURE__ *
569
823
  performance: null
570
824
  },
571
825
  setup(t, { expose: e }) {
572
- const o = t, n = !!De().default, s = g(null), r = f(() => o.containerEl), l = mt({
573
- containerEl: r,
574
- sliderEl: s,
575
- autoHeight: n ? o.autoHeight : !0,
576
- performance: o.performance
577
- }), { scrollable: d, isScrollEnd: m, sliderPos: p } = l, v = g(!1), h = o.autoHide ? f(() => v.value || !m.value) : f(() => d.value);
578
- te(() => {
579
- oe(() => {
580
- l.init();
826
+ const n = t, l = !!Ze().default, o = w(null), a = S(() => n.containerEl), r = Bt({
827
+ containerEl: a,
828
+ sliderEl: o,
829
+ autoHeight: l ? n.autoHeight : !0,
830
+ performance: n.performance
831
+ }), { scrollable: i, isScrollEnd: m, sliderPos: p } = r, d = w(!1), c = n.autoHide ? S(() => d.value || !m.value) : S(() => i.value);
832
+ de(() => {
833
+ fe(() => {
834
+ r.init();
581
835
  });
582
- }), fe(() => {
583
- l.modifySliderEventListener("remove");
836
+ }), Te(() => {
837
+ r.modifySliderEventListener("remove");
584
838
  });
585
- function i() {
586
- v.value = !0;
839
+ function s() {
840
+ d.value = !0;
587
841
  }
588
842
  function u() {
589
- v.value = !1;
843
+ d.value = !1;
590
844
  }
591
- return e({ uScrollBarReturn: l }), (E, _) => (I(), pe(he, null, {
592
- default: me(() => [
593
- We(H("div", {
845
+ return e({ uScrollBarReturn: r }), (b, _) => (k(), Oe(Re, null, {
846
+ default: De(() => [
847
+ et(M("div", {
594
848
  ref_key: "sliderRef",
595
- ref: s,
849
+ ref: o,
596
850
  class: "slider-wrapper",
597
- onMouseenter: i,
851
+ onMouseenter: s,
598
852
  onMouseleave: u,
599
- style: j(b(p))
853
+ style: le(B(p))
600
854
  }, [
601
- ne(E.$slots, "default", {}, () => [
602
- _t
855
+ he(b.$slots, "default", {}, () => [
856
+ Lt
603
857
  ], !0)
604
858
  ], 36), [
605
- [Me, b(h)]
859
+ [tt, B(c)]
606
860
  ])
607
861
  ]),
608
862
  _: 3
609
863
  }));
610
864
  }
611
865
  });
612
- const Ct = /* @__PURE__ */ le(bt, [["__scopeId", "data-v-edec7292"]]), yt = { class: "virtualListWrapper" }, St = {
866
+ const Ve = (t, e) => {
867
+ const n = t.__vccOpts || t;
868
+ for (const [l, o] of e)
869
+ n[l] = o;
870
+ return n;
871
+ }, Kt = /* @__PURE__ */ Ve(Ht, [["__scopeId", "data-v-edec7292"]]), $t = { class: "virtualListWrapper" }, At = {
613
872
  inheritAttrs: !1
614
- }, wt = /* @__PURE__ */ F({
615
- ...St,
873
+ }, Pt = /* @__PURE__ */ Z({
874
+ ...At,
616
875
  __name: "VirtualList",
617
876
  props: {
618
877
  data: null,
@@ -620,34 +879,34 @@ const Ct = /* @__PURE__ */ le(bt, [["__scopeId", "data-v-edec7292"]]), yt = { cl
620
879
  overscan: { default: 10 }
621
880
  },
622
881
  emits: ["scrollEnd"],
623
- setup(t, { expose: e, emit: o }) {
624
- const n = t, s = ut(ze(n, "data"), {
625
- itemHeight: (v) => n.itemHeight(n.data[v]),
626
- overscan: n.overscan,
882
+ setup(t, { expose: e, emit: n }) {
883
+ const l = t, o = Tt(ot(l, "data"), {
884
+ itemHeight: (d) => l.itemHeight(l.data[d]),
885
+ overscan: l.overscan,
627
886
  scrollEndHook: () => {
628
- o("scrollEnd");
887
+ n("scrollEnd");
629
888
  }
630
- }), { list: r, containerProps: l, wrapperProps: d, innerProps: m, getItemHeightData: p } = s;
889
+ }), { list: a, containerProps: r, wrapperProps: i, innerProps: m, getItemHeightData: p } = o;
631
890
  return e({
632
- vListReturn: s
633
- }), (v, h) => (I(), R("div", yt, [
634
- H("div", Ke({
635
- onScrollPassive: h[0] || (h[0] = (...i) => b(l).onScroll && b(l).onScroll(...i)),
636
- ref: b(l).ref,
891
+ vListReturn: o
892
+ }), (d, c) => (k(), J("div", $t, [
893
+ M("div", rt({
894
+ onScrollPassive: c[0] || (c[0] = (...s) => B(r).onScroll && B(r).onScroll(...s)),
895
+ ref: B(r).ref,
637
896
  class: "virtualList"
638
- }, v.$attrs), [
639
- H("div", se(re(b(d))), [
640
- H("div", se(re(b(m))), [
641
- (I(!0), R(je, null, Ne(b(r), ({ index: i, data: u }) => (I(), R("div", {
642
- key: i,
643
- style: j({
644
- height: `${b(p)(i).height}px`,
897
+ }, d.$attrs), [
898
+ M("div", me(ge(B(i))), [
899
+ M("div", me(ge(B(m))), [
900
+ (k(!0), J(at, null, st(B(a), ({ index: s, data: u }) => (k(), J("div", {
901
+ key: s,
902
+ style: le({
903
+ height: `${B(p)(s).height}px`,
645
904
  display: "flex"
646
905
  })
647
906
  }, [
648
- ne(v.$slots, "default", {
907
+ he(d.$slots, "default", {
649
908
  data: u,
650
- index: i
909
+ index: s
651
910
  }, void 0, !0)
652
911
  ], 4))), 128))
653
912
  ], 16)
@@ -656,24 +915,27 @@ const Ct = /* @__PURE__ */ le(bt, [["__scopeId", "data-v-edec7292"]]), yt = { cl
656
915
  ]));
657
916
  }
658
917
  });
659
- const Rt = /* @__PURE__ */ le(wt, [["__scopeId", "data-v-4ba97cce"]]);
918
+ const Qt = /* @__PURE__ */ Ve(Pt, [["__scopeId", "data-v-4ba97cce"]]);
660
919
  export {
661
- Ct as ScrollBar,
662
- It as SvgIcon,
663
- Ht as ToastCreator,
664
- Rt as VirtualList,
665
- we as allSelectedKey,
666
- ct as closeDialogKey,
667
- Tt as dialogController,
668
- Te as isAllSelectedKey,
669
- Se as isSelectedKey,
670
- xe as selectAllKey,
671
- Oe as selectKey,
672
- be as toggleAllKey,
673
- ye as toggleKey,
674
- He as unselectAllKey,
675
- Ee as unselectKey,
676
- Et as useSelectable,
677
- xt as useSelectableInjectors,
678
- ut as useVirtualList
920
+ Kt as ScrollBar,
921
+ jt as SvgIcon,
922
+ Vt as ToastCreator,
923
+ Qt as VirtualList,
924
+ Pe as allSelectedKey,
925
+ Ot as closeDialogKey,
926
+ Nt as dialogController,
927
+ We as isAllSelectedKey,
928
+ Ae as isSelectedKey,
929
+ Me as selectAllKey,
930
+ Fe as selectKey,
931
+ He as toggleAllKey,
932
+ $e as toggleKey,
933
+ ke as unselectAllKey,
934
+ ze as unselectKey,
935
+ Ne as useDragSelect,
936
+ kt as useDragSelectByMobile,
937
+ Wt as useDragSelectByPc,
938
+ zt as useSelectable,
939
+ Mt as useSelectableInjectors,
940
+ Tt as useVirtualList
679
941
  };