geekin-devtoys 0.1.4 → 0.1.5

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.
@@ -1,111 +1,1511 @@
1
- import { defineComponent as B, useSlots as P, computed as N, resolveComponent as o, createElementBlock as g, openBlock as a, createElementVNode as f, createVNode as s, createBlock as p, createCommentVNode as u, renderSlot as n, mergeProps as _, withCtx as t, createTextVNode as V, unref as E } from "vue";
2
- import { b as O } from "../index-BPwO5l8J.mjs";
3
- import { _ as T } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
4
- const A = { class: "g-table" }, L = { key: 1 }, W = { class: "g-dropdown-link" }, G = /* @__PURE__ */ B({
5
- name: "CmTable",
1
+ import { defineComponent as Vt, useSlots as qt, useAttrs as Ut, ref as vt, onMounted as Kt, resolveComponent as se, createElementBlock as bt, openBlock as ue, createElementVNode as Ze, createVNode as de, createBlock as Fe, createCommentVNode as ke, renderSlot as Ee, mergeProps as yt, withCtx as q, createTextVNode as wt, toDisplayString as Zt, unref as _t } from "vue";
2
+ import { o as Qt, b as Jt } from "../index-DSzb017c.mjs";
3
+ import { _ as en } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
4
+ function Et(o, e) {
5
+ var t = Object.keys(o);
6
+ if (Object.getOwnPropertySymbols) {
7
+ var n = Object.getOwnPropertySymbols(o);
8
+ e && (n = n.filter(function(r) {
9
+ return Object.getOwnPropertyDescriptor(o, r).enumerable;
10
+ })), t.push.apply(t, n);
11
+ }
12
+ return t;
13
+ }
14
+ function j(o) {
15
+ for (var e = 1; e < arguments.length; e++) {
16
+ var t = arguments[e] != null ? arguments[e] : {};
17
+ e % 2 ? Et(Object(t), !0).forEach(function(n) {
18
+ tn(o, n, t[n]);
19
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : Et(Object(t)).forEach(function(n) {
20
+ Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
21
+ });
22
+ }
23
+ return o;
24
+ }
25
+ function ze(o) {
26
+ "@babel/helpers - typeof";
27
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? ze = function(e) {
28
+ return typeof e;
29
+ } : ze = function(e) {
30
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
31
+ }, ze(o);
32
+ }
33
+ function tn(o, e, t) {
34
+ return e in o ? Object.defineProperty(o, e, {
35
+ value: t,
36
+ enumerable: !0,
37
+ configurable: !0,
38
+ writable: !0
39
+ }) : o[e] = t, o;
40
+ }
41
+ function K() {
42
+ return K = Object.assign || function(o) {
43
+ for (var e = 1; e < arguments.length; e++) {
44
+ var t = arguments[e];
45
+ for (var n in t)
46
+ Object.prototype.hasOwnProperty.call(t, n) && (o[n] = t[n]);
47
+ }
48
+ return o;
49
+ }, K.apply(this, arguments);
50
+ }
51
+ function nn(o, e) {
52
+ if (o == null) return {};
53
+ var t = {}, n = Object.keys(o), r, i;
54
+ for (i = 0; i < n.length; i++)
55
+ r = n[i], !(e.indexOf(r) >= 0) && (t[r] = o[r]);
56
+ return t;
57
+ }
58
+ function on(o, e) {
59
+ if (o == null) return {};
60
+ var t = nn(o, e), n, r;
61
+ if (Object.getOwnPropertySymbols) {
62
+ var i = Object.getOwnPropertySymbols(o);
63
+ for (r = 0; r < i.length; r++)
64
+ n = i[r], !(e.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(o, n) && (t[n] = o[n]);
65
+ }
66
+ return t;
67
+ }
68
+ var rn = "1.15.6";
69
+ function U(o) {
70
+ if (typeof window < "u" && window.navigator)
71
+ return !!/* @__PURE__ */ navigator.userAgent.match(o);
72
+ }
73
+ var Z = U(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), xe = U(/Edge/i), St = U(/firefox/i), Ce = U(/safari/i) && !U(/chrome/i) && !U(/android/i), ft = U(/iP(ad|od|hone)/i), xt = U(/chrome/i) && U(/android/i), Nt = {
74
+ capture: !1,
75
+ passive: !1
76
+ };
77
+ function _(o, e, t) {
78
+ o.addEventListener(e, t, !Z && Nt);
79
+ }
80
+ function w(o, e, t) {
81
+ o.removeEventListener(e, t, !Z && Nt);
82
+ }
83
+ function $e(o, e) {
84
+ if (e) {
85
+ if (e[0] === ">" && (e = e.substring(1)), o)
86
+ try {
87
+ if (o.matches)
88
+ return o.matches(e);
89
+ if (o.msMatchesSelector)
90
+ return o.msMatchesSelector(e);
91
+ if (o.webkitMatchesSelector)
92
+ return o.webkitMatchesSelector(e);
93
+ } catch {
94
+ return !1;
95
+ }
96
+ return !1;
97
+ }
98
+ }
99
+ function Mt(o) {
100
+ return o.host && o !== document && o.host.nodeType ? o.host : o.parentNode;
101
+ }
102
+ function G(o, e, t, n) {
103
+ if (o) {
104
+ t = t || document;
105
+ do {
106
+ if (e != null && (e[0] === ">" ? o.parentNode === t && $e(o, e) : $e(o, e)) || n && o === t)
107
+ return o;
108
+ if (o === t) break;
109
+ } while (o = Mt(o));
110
+ }
111
+ return null;
112
+ }
113
+ var Dt = /\s+/g;
114
+ function z(o, e, t) {
115
+ if (o && e)
116
+ if (o.classList)
117
+ o.classList[t ? "add" : "remove"](e);
118
+ else {
119
+ var n = (" " + o.className + " ").replace(Dt, " ").replace(" " + e + " ", " ");
120
+ o.className = (n + (t ? " " + e : "")).replace(Dt, " ");
121
+ }
122
+ }
123
+ function p(o, e, t) {
124
+ var n = o && o.style;
125
+ if (n) {
126
+ if (t === void 0)
127
+ return document.defaultView && document.defaultView.getComputedStyle ? t = document.defaultView.getComputedStyle(o, "") : o.currentStyle && (t = o.currentStyle), e === void 0 ? t : t[e];
128
+ !(e in n) && e.indexOf("webkit") === -1 && (e = "-webkit-" + e), n[e] = t + (typeof t == "string" ? "" : "px");
129
+ }
130
+ }
131
+ function ge(o, e) {
132
+ var t = "";
133
+ if (typeof o == "string")
134
+ t = o;
135
+ else
136
+ do {
137
+ var n = p(o, "transform");
138
+ n && n !== "none" && (t = n + " " + t);
139
+ } while (!e && (o = o.parentNode));
140
+ var r = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
141
+ return r && new r(t);
142
+ }
143
+ function Ft(o, e, t) {
144
+ if (o) {
145
+ var n = o.getElementsByTagName(e), r = 0, i = n.length;
146
+ if (t)
147
+ for (; r < i; r++)
148
+ t(n[r], r);
149
+ return n;
150
+ }
151
+ return [];
152
+ }
153
+ function $() {
154
+ var o = document.scrollingElement;
155
+ return o || document.documentElement;
156
+ }
157
+ function I(o, e, t, n, r) {
158
+ if (!(!o.getBoundingClientRect && o !== window)) {
159
+ var i, a, l, s, u, f, c;
160
+ if (o !== window && o.parentNode && o !== $() ? (i = o.getBoundingClientRect(), a = i.top, l = i.left, s = i.bottom, u = i.right, f = i.height, c = i.width) : (a = 0, l = 0, s = window.innerHeight, u = window.innerWidth, f = window.innerHeight, c = window.innerWidth), (e || t) && o !== window && (r = r || o.parentNode, !Z))
161
+ do
162
+ if (r && r.getBoundingClientRect && (p(r, "transform") !== "none" || t && p(r, "position") !== "static")) {
163
+ var y = r.getBoundingClientRect();
164
+ a -= y.top + parseInt(p(r, "border-top-width")), l -= y.left + parseInt(p(r, "border-left-width")), s = a + i.height, u = l + i.width;
165
+ break;
166
+ }
167
+ while (r = r.parentNode);
168
+ if (n && o !== window) {
169
+ var h = ge(r || o), v = h && h.a, b = h && h.d;
170
+ h && (a /= b, l /= v, c /= v, f /= b, s = a + f, u = l + c);
171
+ }
172
+ return {
173
+ top: a,
174
+ left: l,
175
+ bottom: s,
176
+ right: u,
177
+ width: c,
178
+ height: f
179
+ };
180
+ }
181
+ }
182
+ function Tt(o, e, t) {
183
+ for (var n = ne(o, !0), r = I(o)[e]; n; ) {
184
+ var i = I(n)[t], a = void 0;
185
+ if (a = r >= i, !a) return n;
186
+ if (n === $()) break;
187
+ n = ne(n, !1);
188
+ }
189
+ return !1;
190
+ }
191
+ function me(o, e, t, n) {
192
+ for (var r = 0, i = 0, a = o.children; i < a.length; ) {
193
+ if (a[i].style.display !== "none" && a[i] !== g.ghost && (n || a[i] !== g.dragged) && G(a[i], t.draggable, o, !1)) {
194
+ if (r === e)
195
+ return a[i];
196
+ r++;
197
+ }
198
+ i++;
199
+ }
200
+ return null;
201
+ }
202
+ function ht(o, e) {
203
+ for (var t = o.lastElementChild; t && (t === g.ghost || p(t, "display") === "none" || e && !$e(t, e)); )
204
+ t = t.previousElementSibling;
205
+ return t || null;
206
+ }
207
+ function L(o, e) {
208
+ var t = 0;
209
+ if (!o || !o.parentNode)
210
+ return -1;
211
+ for (; o = o.previousElementSibling; )
212
+ o.nodeName.toUpperCase() !== "TEMPLATE" && o !== g.clone && (!e || $e(o, e)) && t++;
213
+ return t;
214
+ }
215
+ function Ct(o) {
216
+ var e = 0, t = 0, n = $();
217
+ if (o)
218
+ do {
219
+ var r = ge(o), i = r.a, a = r.d;
220
+ e += o.scrollLeft * i, t += o.scrollTop * a;
221
+ } while (o !== n && (o = o.parentNode));
222
+ return [e, t];
223
+ }
224
+ function an(o, e) {
225
+ for (var t in o)
226
+ if (o.hasOwnProperty(t)) {
227
+ for (var n in e)
228
+ if (e.hasOwnProperty(n) && e[n] === o[t][n]) return Number(t);
229
+ }
230
+ return -1;
231
+ }
232
+ function ne(o, e) {
233
+ if (!o || !o.getBoundingClientRect) return $();
234
+ var t = o, n = !1;
235
+ do
236
+ if (t.clientWidth < t.scrollWidth || t.clientHeight < t.scrollHeight) {
237
+ var r = p(t);
238
+ if (t.clientWidth < t.scrollWidth && (r.overflowX == "auto" || r.overflowX == "scroll") || t.clientHeight < t.scrollHeight && (r.overflowY == "auto" || r.overflowY == "scroll")) {
239
+ if (!t.getBoundingClientRect || t === document.body) return $();
240
+ if (n || e) return t;
241
+ n = !0;
242
+ }
243
+ }
244
+ while (t = t.parentNode);
245
+ return $();
246
+ }
247
+ function ln(o, e) {
248
+ if (o && e)
249
+ for (var t in e)
250
+ e.hasOwnProperty(t) && (o[t] = e[t]);
251
+ return o;
252
+ }
253
+ function Qe(o, e) {
254
+ return Math.round(o.top) === Math.round(e.top) && Math.round(o.left) === Math.round(e.left) && Math.round(o.height) === Math.round(e.height) && Math.round(o.width) === Math.round(e.width);
255
+ }
256
+ var Ie;
257
+ function kt(o, e) {
258
+ return function() {
259
+ if (!Ie) {
260
+ var t = arguments, n = this;
261
+ t.length === 1 ? o.call(n, t[0]) : o.apply(n, t), Ie = setTimeout(function() {
262
+ Ie = void 0;
263
+ }, e);
264
+ }
265
+ };
266
+ }
267
+ function sn() {
268
+ clearTimeout(Ie), Ie = void 0;
269
+ }
270
+ function Rt(o, e, t) {
271
+ o.scrollLeft += e, o.scrollTop += t;
272
+ }
273
+ function Xt(o) {
274
+ var e = window.Polymer, t = window.jQuery || window.Zepto;
275
+ return e && e.dom ? e.dom(o).cloneNode(!0) : t ? t(o).clone(!0)[0] : o.cloneNode(!0);
276
+ }
277
+ function Yt(o, e, t) {
278
+ var n = {};
279
+ return Array.from(o.children).forEach(function(r) {
280
+ var i, a, l, s;
281
+ if (!(!G(r, e.draggable, o, !1) || r.animated || r === t)) {
282
+ var u = I(r);
283
+ n.left = Math.min((i = n.left) !== null && i !== void 0 ? i : 1 / 0, u.left), n.top = Math.min((a = n.top) !== null && a !== void 0 ? a : 1 / 0, u.top), n.right = Math.max((l = n.right) !== null && l !== void 0 ? l : -1 / 0, u.right), n.bottom = Math.max((s = n.bottom) !== null && s !== void 0 ? s : -1 / 0, u.bottom);
284
+ }
285
+ }), n.width = n.right - n.left, n.height = n.bottom - n.top, n.x = n.left, n.y = n.top, n;
286
+ }
287
+ var X = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
288
+ function un() {
289
+ var o = [], e;
290
+ return {
291
+ captureAnimationState: function() {
292
+ if (o = [], !!this.options.animation) {
293
+ var n = [].slice.call(this.el.children);
294
+ n.forEach(function(r) {
295
+ if (!(p(r, "display") === "none" || r === g.ghost)) {
296
+ o.push({
297
+ target: r,
298
+ rect: I(r)
299
+ });
300
+ var i = j({}, o[o.length - 1].rect);
301
+ if (r.thisAnimationDuration) {
302
+ var a = ge(r, !0);
303
+ a && (i.top -= a.f, i.left -= a.e);
304
+ }
305
+ r.fromRect = i;
306
+ }
307
+ });
308
+ }
309
+ },
310
+ addAnimationState: function(n) {
311
+ o.push(n);
312
+ },
313
+ removeAnimationState: function(n) {
314
+ o.splice(an(o, {
315
+ target: n
316
+ }), 1);
317
+ },
318
+ animateAll: function(n) {
319
+ var r = this;
320
+ if (!this.options.animation) {
321
+ clearTimeout(e), typeof n == "function" && n();
322
+ return;
323
+ }
324
+ var i = !1, a = 0;
325
+ o.forEach(function(l) {
326
+ var s = 0, u = l.target, f = u.fromRect, c = I(u), y = u.prevFromRect, h = u.prevToRect, v = l.rect, b = ge(u, !0);
327
+ b && (c.top -= b.f, c.left -= b.e), u.toRect = c, u.thisAnimationDuration && Qe(y, c) && !Qe(f, c) && // Make sure animatingRect is on line between toRect & fromRect
328
+ (v.top - c.top) / (v.left - c.left) === (f.top - c.top) / (f.left - c.left) && (s = cn(v, y, h, r.options)), Qe(c, f) || (u.prevFromRect = f, u.prevToRect = c, s || (s = r.options.animation), r.animate(u, v, c, s)), s && (i = !0, a = Math.max(a, s), clearTimeout(u.animationResetTimer), u.animationResetTimer = setTimeout(function() {
329
+ u.animationTime = 0, u.prevFromRect = null, u.fromRect = null, u.prevToRect = null, u.thisAnimationDuration = null;
330
+ }, s), u.thisAnimationDuration = s);
331
+ }), clearTimeout(e), i ? e = setTimeout(function() {
332
+ typeof n == "function" && n();
333
+ }, a) : typeof n == "function" && n(), o = [];
334
+ },
335
+ animate: function(n, r, i, a) {
336
+ if (a) {
337
+ p(n, "transition", ""), p(n, "transform", "");
338
+ var l = ge(this.el), s = l && l.a, u = l && l.d, f = (r.left - i.left) / (s || 1), c = (r.top - i.top) / (u || 1);
339
+ n.animatingX = !!f, n.animatingY = !!c, p(n, "transform", "translate3d(" + f + "px," + c + "px,0)"), this.forRepaintDummy = dn(n), p(n, "transition", "transform " + a + "ms" + (this.options.easing ? " " + this.options.easing : "")), p(n, "transform", "translate3d(0,0,0)"), typeof n.animated == "number" && clearTimeout(n.animated), n.animated = setTimeout(function() {
340
+ p(n, "transition", ""), p(n, "transform", ""), n.animated = !1, n.animatingX = !1, n.animatingY = !1;
341
+ }, a);
342
+ }
343
+ }
344
+ };
345
+ }
346
+ function dn(o) {
347
+ return o.offsetWidth;
348
+ }
349
+ function cn(o, e, t, n) {
350
+ return Math.sqrt(Math.pow(e.top - o.top, 2) + Math.pow(e.left - o.left, 2)) / Math.sqrt(Math.pow(e.top - t.top, 2) + Math.pow(e.left - t.left, 2)) * n.animation;
351
+ }
352
+ var ce = [], Je = {
353
+ initializeByDefault: !0
354
+ }, Ne = {
355
+ mount: function(e) {
356
+ for (var t in Je)
357
+ Je.hasOwnProperty(t) && !(t in e) && (e[t] = Je[t]);
358
+ ce.forEach(function(n) {
359
+ if (n.pluginName === e.pluginName)
360
+ throw "Sortable: Cannot mount plugin ".concat(e.pluginName, " more than once");
361
+ }), ce.push(e);
362
+ },
363
+ pluginEvent: function(e, t, n) {
364
+ var r = this;
365
+ this.eventCanceled = !1, n.cancel = function() {
366
+ r.eventCanceled = !0;
367
+ };
368
+ var i = e + "Global";
369
+ ce.forEach(function(a) {
370
+ t[a.pluginName] && (t[a.pluginName][i] && t[a.pluginName][i](j({
371
+ sortable: t
372
+ }, n)), t.options[a.pluginName] && t[a.pluginName][e] && t[a.pluginName][e](j({
373
+ sortable: t
374
+ }, n)));
375
+ });
376
+ },
377
+ initializePlugins: function(e, t, n, r) {
378
+ ce.forEach(function(l) {
379
+ var s = l.pluginName;
380
+ if (!(!e.options[s] && !l.initializeByDefault)) {
381
+ var u = new l(e, t, e.options);
382
+ u.sortable = e, u.options = e.options, e[s] = u, K(n, u.defaults);
383
+ }
384
+ });
385
+ for (var i in e.options)
386
+ if (e.options.hasOwnProperty(i)) {
387
+ var a = this.modifyOption(e, i, e.options[i]);
388
+ typeof a < "u" && (e.options[i] = a);
389
+ }
390
+ },
391
+ getEventProperties: function(e, t) {
392
+ var n = {};
393
+ return ce.forEach(function(r) {
394
+ typeof r.eventProperties == "function" && K(n, r.eventProperties.call(t[r.pluginName], e));
395
+ }), n;
396
+ },
397
+ modifyOption: function(e, t, n) {
398
+ var r;
399
+ return ce.forEach(function(i) {
400
+ e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
401
+ }), r;
402
+ }
403
+ };
404
+ function fn(o) {
405
+ var e = o.sortable, t = o.rootEl, n = o.name, r = o.targetEl, i = o.cloneEl, a = o.toEl, l = o.fromEl, s = o.oldIndex, u = o.newIndex, f = o.oldDraggableIndex, c = o.newDraggableIndex, y = o.originalEvent, h = o.putSortable, v = o.extraEventProperties;
406
+ if (e = e || t && t[X], !!e) {
407
+ var b, D = e.options, P = "on" + n.charAt(0).toUpperCase() + n.substr(1);
408
+ window.CustomEvent && !Z && !xe ? b = new CustomEvent(n, {
409
+ bubbles: !0,
410
+ cancelable: !0
411
+ }) : (b = document.createEvent("Event"), b.initEvent(n, !0, !0)), b.to = a || t, b.from = l || t, b.item = r || t, b.clone = i, b.oldIndex = s, b.newIndex = u, b.oldDraggableIndex = f, b.newDraggableIndex = c, b.originalEvent = y, b.pullMode = h ? h.lastPutMode : void 0;
412
+ var O = j(j({}, v), Ne.getEventProperties(n, e));
413
+ for (var F in O)
414
+ b[F] = O[F];
415
+ t && t.dispatchEvent(b), D[P] && D[P].call(e, b);
416
+ }
417
+ }
418
+ var hn = ["evt"], R = function(e, t) {
419
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = on(n, hn);
420
+ Ne.pluginEvent.bind(g)(e, t, j({
421
+ dragEl: d,
422
+ parentEl: T,
423
+ ghostEl: m,
424
+ rootEl: E,
425
+ nextEl: le,
426
+ lastDownEl: He,
427
+ cloneEl: S,
428
+ cloneHidden: te,
429
+ dragStarted: Se,
430
+ putSortable: N,
431
+ activeSortable: g.active,
432
+ originalEvent: r,
433
+ oldIndex: pe,
434
+ oldDraggableIndex: Oe,
435
+ newIndex: H,
436
+ newDraggableIndex: ee,
437
+ hideGhostForTarget: Lt,
438
+ unhideGhostForTarget: Wt,
439
+ cloneNowHidden: function() {
440
+ te = !0;
441
+ },
442
+ cloneNowShown: function() {
443
+ te = !1;
444
+ },
445
+ dispatchSortableEvent: function(l) {
446
+ k({
447
+ sortable: t,
448
+ name: l,
449
+ originalEvent: r
450
+ });
451
+ }
452
+ }, i));
453
+ };
454
+ function k(o) {
455
+ fn(j({
456
+ putSortable: N,
457
+ cloneEl: S,
458
+ targetEl: d,
459
+ rootEl: E,
460
+ oldIndex: pe,
461
+ oldDraggableIndex: Oe,
462
+ newIndex: H,
463
+ newDraggableIndex: ee
464
+ }, o));
465
+ }
466
+ var d, T, m, E, le, He, S, te, pe, H, Oe, ee, Re, N, he = !1, je = !1, Ve = [], ie, W, et, tt, It, Ot, Se, fe, Pe, Ae = !1, Xe = !1, Le, M, nt = [], st = !1, qe = [], Ke = typeof document < "u", Ye = ft, Pt = xe || Z ? "cssFloat" : "float", pn = Ke && !xt && !ft && "draggable" in document.createElement("div"), Bt = (function() {
467
+ if (Ke) {
468
+ if (Z)
469
+ return !1;
470
+ var o = document.createElement("x");
471
+ return o.style.cssText = "pointer-events:auto", o.style.pointerEvents === "auto";
472
+ }
473
+ })(), zt = function(e, t) {
474
+ var n = p(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = me(e, 0, t), a = me(e, 1, t), l = i && p(i), s = a && p(a), u = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + I(i).width, f = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + I(a).width;
475
+ if (n.display === "flex")
476
+ return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
477
+ if (n.display === "grid")
478
+ return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
479
+ if (i && l.float && l.float !== "none") {
480
+ var c = l.float === "left" ? "left" : "right";
481
+ return a && (s.clear === "both" || s.clear === c) ? "vertical" : "horizontal";
482
+ }
483
+ return i && (l.display === "block" || l.display === "flex" || l.display === "table" || l.display === "grid" || u >= r && n[Pt] === "none" || a && n[Pt] === "none" && u + f > r) ? "vertical" : "horizontal";
484
+ }, gn = function(e, t, n) {
485
+ var r = n ? e.left : e.top, i = n ? e.right : e.bottom, a = n ? e.width : e.height, l = n ? t.left : t.top, s = n ? t.right : t.bottom, u = n ? t.width : t.height;
486
+ return r === l || i === s || r + a / 2 === l + u / 2;
487
+ }, mn = function(e, t) {
488
+ var n;
489
+ return Ve.some(function(r) {
490
+ var i = r[X].options.emptyInsertThreshold;
491
+ if (!(!i || ht(r))) {
492
+ var a = I(r), l = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
493
+ if (l && s)
494
+ return n = r;
495
+ }
496
+ }), n;
497
+ }, Ht = function(e) {
498
+ function t(i, a) {
499
+ return function(l, s, u, f) {
500
+ var c = l.options.group.name && s.options.group.name && l.options.group.name === s.options.group.name;
501
+ if (i == null && (a || c))
502
+ return !0;
503
+ if (i == null || i === !1)
504
+ return !1;
505
+ if (a && i === "clone")
506
+ return i;
507
+ if (typeof i == "function")
508
+ return t(i(l, s, u, f), a)(l, s, u, f);
509
+ var y = (a ? l : s).options.group.name;
510
+ return i === !0 || typeof i == "string" && i === y || i.join && i.indexOf(y) > -1;
511
+ };
512
+ }
513
+ var n = {}, r = e.group;
514
+ (!r || ze(r) != "object") && (r = {
515
+ name: r
516
+ }), n.name = r.name, n.checkPull = t(r.pull, !0), n.checkPut = t(r.put), n.revertClone = r.revertClone, e.group = n;
517
+ }, Lt = function() {
518
+ !Bt && m && p(m, "display", "none");
519
+ }, Wt = function() {
520
+ !Bt && m && p(m, "display", "");
521
+ };
522
+ Ke && !xt && document.addEventListener("click", function(o) {
523
+ if (je)
524
+ return o.preventDefault(), o.stopPropagation && o.stopPropagation(), o.stopImmediatePropagation && o.stopImmediatePropagation(), je = !1, !1;
525
+ }, !0);
526
+ var ae = function(e) {
527
+ if (d) {
528
+ e = e.touches ? e.touches[0] : e;
529
+ var t = mn(e.clientX, e.clientY);
530
+ if (t) {
531
+ var n = {};
532
+ for (var r in e)
533
+ e.hasOwnProperty(r) && (n[r] = e[r]);
534
+ n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[X]._onDragOver(n);
535
+ }
536
+ }
537
+ }, vn = function(e) {
538
+ d && d.parentNode[X]._isOutsideThisEl(e.target);
539
+ };
540
+ function g(o, e) {
541
+ if (!(o && o.nodeType && o.nodeType === 1))
542
+ throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));
543
+ this.el = o, this.options = e = K({}, e), o[X] = this;
544
+ var t = {
545
+ group: null,
546
+ sort: !0,
547
+ disabled: !1,
548
+ store: null,
549
+ handle: null,
550
+ draggable: /^[uo]l$/i.test(o.nodeName) ? ">li" : ">*",
551
+ swapThreshold: 1,
552
+ // percentage; 0 <= x <= 1
553
+ invertSwap: !1,
554
+ // invert always
555
+ invertedSwapThreshold: null,
556
+ // will be set to same as swapThreshold if default
557
+ removeCloneOnHide: !0,
558
+ direction: function() {
559
+ return zt(o, this.options);
560
+ },
561
+ ghostClass: "sortable-ghost",
562
+ chosenClass: "sortable-chosen",
563
+ dragClass: "sortable-drag",
564
+ ignore: "a, img",
565
+ filter: null,
566
+ preventOnFilter: !0,
567
+ animation: 0,
568
+ easing: null,
569
+ setData: function(a, l) {
570
+ a.setData("Text", l.textContent);
571
+ },
572
+ dropBubble: !1,
573
+ dragoverBubble: !1,
574
+ dataIdAttr: "data-id",
575
+ delay: 0,
576
+ delayOnTouchOnly: !1,
577
+ touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
578
+ forceFallback: !1,
579
+ fallbackClass: "sortable-fallback",
580
+ fallbackOnBody: !1,
581
+ fallbackTolerance: 0,
582
+ fallbackOffset: {
583
+ x: 0,
584
+ y: 0
585
+ },
586
+ // Disabled on Safari: #1571; Enabled on Safari IOS: #2244
587
+ supportPointer: g.supportPointer !== !1 && "PointerEvent" in window && (!Ce || ft),
588
+ emptyInsertThreshold: 5
589
+ };
590
+ Ne.initializePlugins(this, o, t);
591
+ for (var n in t)
592
+ !(n in e) && (e[n] = t[n]);
593
+ Ht(e);
594
+ for (var r in this)
595
+ r.charAt(0) === "_" && typeof this[r] == "function" && (this[r] = this[r].bind(this));
596
+ this.nativeDraggable = e.forceFallback ? !1 : pn, this.nativeDraggable && (this.options.touchStartThreshold = 1), e.supportPointer ? _(o, "pointerdown", this._onTapStart) : (_(o, "mousedown", this._onTapStart), _(o, "touchstart", this._onTapStart)), this.nativeDraggable && (_(o, "dragover", this), _(o, "dragenter", this)), Ve.push(this.el), e.store && e.store.get && this.sort(e.store.get(this) || []), K(this, un());
597
+ }
598
+ g.prototype = /** @lends Sortable.prototype */
599
+ {
600
+ constructor: g,
601
+ _isOutsideThisEl: function(e) {
602
+ !this.el.contains(e) && e !== this.el && (fe = null);
603
+ },
604
+ _getDirection: function(e, t) {
605
+ return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, d) : this.options.direction;
606
+ },
607
+ _onTapStart: function(e) {
608
+ if (e.cancelable) {
609
+ var t = this, n = this.el, r = this.options, i = r.preventOnFilter, a = e.type, l = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (l || e).target, u = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, f = r.filter;
610
+ if (Tn(n), !d && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !u.isContentEditable && !(!this.nativeDraggable && Ce && s && s.tagName.toUpperCase() === "SELECT") && (s = G(s, r.draggable, n, !1), !(s && s.animated) && He !== s)) {
611
+ if (pe = L(s), Oe = L(s, r.draggable), typeof f == "function") {
612
+ if (f.call(this, e, s, this)) {
613
+ k({
614
+ sortable: t,
615
+ rootEl: u,
616
+ name: "filter",
617
+ targetEl: s,
618
+ toEl: n,
619
+ fromEl: n
620
+ }), R("filter", t, {
621
+ evt: e
622
+ }), i && e.preventDefault();
623
+ return;
624
+ }
625
+ } else if (f && (f = f.split(",").some(function(c) {
626
+ if (c = G(u, c.trim(), n, !1), c)
627
+ return k({
628
+ sortable: t,
629
+ rootEl: c,
630
+ name: "filter",
631
+ targetEl: s,
632
+ fromEl: n,
633
+ toEl: n
634
+ }), R("filter", t, {
635
+ evt: e
636
+ }), !0;
637
+ }), f)) {
638
+ i && e.preventDefault();
639
+ return;
640
+ }
641
+ r.handle && !G(u, r.handle, n, !1) || this._prepareDragStart(e, l, s);
642
+ }
643
+ }
644
+ },
645
+ _prepareDragStart: function(e, t, n) {
646
+ var r = this, i = r.el, a = r.options, l = i.ownerDocument, s;
647
+ if (n && !d && n.parentNode === i) {
648
+ var u = I(n);
649
+ if (E = i, d = n, T = d.parentNode, le = d.nextSibling, He = n, Re = a.group, g.dragged = d, ie = {
650
+ target: d,
651
+ clientX: (t || e).clientX,
652
+ clientY: (t || e).clientY
653
+ }, It = ie.clientX - u.left, Ot = ie.clientY - u.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, d.style["will-change"] = "all", s = function() {
654
+ if (R("delayEnded", r, {
655
+ evt: e
656
+ }), g.eventCanceled) {
657
+ r._onDrop();
658
+ return;
659
+ }
660
+ r._disableDelayedDragEvents(), !St && r.nativeDraggable && (d.draggable = !0), r._triggerDragStart(e, t), k({
661
+ sortable: r,
662
+ name: "choose",
663
+ originalEvent: e
664
+ }), z(d, a.chosenClass, !0);
665
+ }, a.ignore.split(",").forEach(function(f) {
666
+ Ft(d, f.trim(), ot);
667
+ }), _(l, "dragover", ae), _(l, "mousemove", ae), _(l, "touchmove", ae), a.supportPointer ? (_(l, "pointerup", r._onDrop), !this.nativeDraggable && _(l, "pointercancel", r._onDrop)) : (_(l, "mouseup", r._onDrop), _(l, "touchend", r._onDrop), _(l, "touchcancel", r._onDrop)), St && this.nativeDraggable && (this.options.touchStartThreshold = 4, d.draggable = !0), R("delayStart", this, {
668
+ evt: e
669
+ }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(xe || Z))) {
670
+ if (g.eventCanceled) {
671
+ this._onDrop();
672
+ return;
673
+ }
674
+ a.supportPointer ? (_(l, "pointerup", r._disableDelayedDrag), _(l, "pointercancel", r._disableDelayedDrag)) : (_(l, "mouseup", r._disableDelayedDrag), _(l, "touchend", r._disableDelayedDrag), _(l, "touchcancel", r._disableDelayedDrag)), _(l, "mousemove", r._delayedDragTouchMoveHandler), _(l, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && _(l, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
675
+ } else
676
+ s();
677
+ }
678
+ },
679
+ _delayedDragTouchMoveHandler: function(e) {
680
+ var t = e.touches ? e.touches[0] : e;
681
+ Math.max(Math.abs(t.clientX - this._lastX), Math.abs(t.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
682
+ },
683
+ _disableDelayedDrag: function() {
684
+ d && ot(d), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
685
+ },
686
+ _disableDelayedDragEvents: function() {
687
+ var e = this.el.ownerDocument;
688
+ w(e, "mouseup", this._disableDelayedDrag), w(e, "touchend", this._disableDelayedDrag), w(e, "touchcancel", this._disableDelayedDrag), w(e, "pointerup", this._disableDelayedDrag), w(e, "pointercancel", this._disableDelayedDrag), w(e, "mousemove", this._delayedDragTouchMoveHandler), w(e, "touchmove", this._delayedDragTouchMoveHandler), w(e, "pointermove", this._delayedDragTouchMoveHandler);
689
+ },
690
+ _triggerDragStart: function(e, t) {
691
+ t = t || e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? _(document, "pointermove", this._onTouchMove) : t ? _(document, "touchmove", this._onTouchMove) : _(document, "mousemove", this._onTouchMove) : (_(d, "dragend", this), _(E, "dragstart", this._onDragStart));
692
+ try {
693
+ document.selection ? We(function() {
694
+ document.selection.empty();
695
+ }) : window.getSelection().removeAllRanges();
696
+ } catch {
697
+ }
698
+ },
699
+ _dragStarted: function(e, t) {
700
+ if (he = !1, E && d) {
701
+ R("dragStarted", this, {
702
+ evt: t
703
+ }), this.nativeDraggable && _(document, "dragover", vn);
704
+ var n = this.options;
705
+ !e && z(d, n.dragClass, !1), z(d, n.ghostClass, !0), g.active = this, e && this._appendGhost(), k({
706
+ sortable: this,
707
+ name: "start",
708
+ originalEvent: t
709
+ });
710
+ } else
711
+ this._nulling();
712
+ },
713
+ _emulateDragOver: function() {
714
+ if (W) {
715
+ this._lastX = W.clientX, this._lastY = W.clientY, Lt();
716
+ for (var e = document.elementFromPoint(W.clientX, W.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(W.clientX, W.clientY), e !== t); )
717
+ t = e;
718
+ if (d.parentNode[X]._isOutsideThisEl(e), t)
719
+ do {
720
+ if (t[X]) {
721
+ var n = void 0;
722
+ if (n = t[X]._onDragOver({
723
+ clientX: W.clientX,
724
+ clientY: W.clientY,
725
+ target: e,
726
+ rootEl: t
727
+ }), n && !this.options.dragoverBubble)
728
+ break;
729
+ }
730
+ e = t;
731
+ } while (t = Mt(t));
732
+ Wt();
733
+ }
734
+ },
735
+ _onTouchMove: function(e) {
736
+ if (ie) {
737
+ var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = m && ge(m, !0), l = m && a && a.a, s = m && a && a.d, u = Ye && M && Ct(M), f = (i.clientX - ie.clientX + r.x) / (l || 1) + (u ? u[0] - nt[0] : 0) / (l || 1), c = (i.clientY - ie.clientY + r.y) / (s || 1) + (u ? u[1] - nt[1] : 0) / (s || 1);
738
+ if (!g.active && !he) {
739
+ if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n)
740
+ return;
741
+ this._onDragStart(e, !0);
742
+ }
743
+ if (m) {
744
+ a ? (a.e += f - (et || 0), a.f += c - (tt || 0)) : a = {
745
+ a: 1,
746
+ b: 0,
747
+ c: 0,
748
+ d: 1,
749
+ e: f,
750
+ f: c
751
+ };
752
+ var y = "matrix(".concat(a.a, ",").concat(a.b, ",").concat(a.c, ",").concat(a.d, ",").concat(a.e, ",").concat(a.f, ")");
753
+ p(m, "webkitTransform", y), p(m, "mozTransform", y), p(m, "msTransform", y), p(m, "transform", y), et = f, tt = c, W = i;
754
+ }
755
+ e.cancelable && e.preventDefault();
756
+ }
757
+ },
758
+ _appendGhost: function() {
759
+ if (!m) {
760
+ var e = this.options.fallbackOnBody ? document.body : E, t = I(d, !0, Ye, !0, e), n = this.options;
761
+ if (Ye) {
762
+ for (M = e; p(M, "position") === "static" && p(M, "transform") === "none" && M !== document; )
763
+ M = M.parentNode;
764
+ M !== document.body && M !== document.documentElement ? (M === document && (M = $()), t.top += M.scrollTop, t.left += M.scrollLeft) : M = $(), nt = Ct(M);
765
+ }
766
+ m = d.cloneNode(!0), z(m, n.ghostClass, !1), z(m, n.fallbackClass, !0), z(m, n.dragClass, !0), p(m, "transition", ""), p(m, "transform", ""), p(m, "box-sizing", "border-box"), p(m, "margin", 0), p(m, "top", t.top), p(m, "left", t.left), p(m, "width", t.width), p(m, "height", t.height), p(m, "opacity", "0.8"), p(m, "position", Ye ? "absolute" : "fixed"), p(m, "zIndex", "100000"), p(m, "pointerEvents", "none"), g.ghost = m, e.appendChild(m), p(m, "transform-origin", It / parseInt(m.style.width) * 100 + "% " + Ot / parseInt(m.style.height) * 100 + "%");
767
+ }
768
+ },
769
+ _onDragStart: function(e, t) {
770
+ var n = this, r = e.dataTransfer, i = n.options;
771
+ if (R("dragStart", this, {
772
+ evt: e
773
+ }), g.eventCanceled) {
774
+ this._onDrop();
775
+ return;
776
+ }
777
+ R("setupClone", this), g.eventCanceled || (S = Xt(d), S.removeAttribute("id"), S.draggable = !1, S.style["will-change"] = "", this._hideClone(), z(S, this.options.chosenClass, !1), g.clone = S), n.cloneId = We(function() {
778
+ R("clone", n), !g.eventCanceled && (n.options.removeCloneOnHide || E.insertBefore(S, d), n._hideClone(), k({
779
+ sortable: n,
780
+ name: "clone"
781
+ }));
782
+ }), !t && z(d, i.dragClass, !0), t ? (je = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (w(document, "mouseup", n._onDrop), w(document, "touchend", n._onDrop), w(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, d)), _(document, "drop", n), p(d, "transform", "translateZ(0)")), he = !0, n._dragStartId = We(n._dragStarted.bind(n, t, e)), _(document, "selectstart", n), Se = !0, window.getSelection().removeAllRanges(), Ce && p(document.body, "user-select", "none");
783
+ },
784
+ // Returns true - if no further action is needed (either inserted or another condition)
785
+ _onDragOver: function(e) {
786
+ var t = this.el, n = e.target, r, i, a, l = this.options, s = l.group, u = g.active, f = Re === s, c = l.sort, y = N || u, h, v = this, b = !1;
787
+ if (st) return;
788
+ function D(_e, $t) {
789
+ R(_e, v, j({
790
+ evt: e,
791
+ isOwner: f,
792
+ axis: h ? "vertical" : "horizontal",
793
+ revert: a,
794
+ dragRect: r,
795
+ targetRect: i,
796
+ canSort: c,
797
+ fromSortable: y,
798
+ target: n,
799
+ completed: O,
800
+ onMove: function(mt, jt) {
801
+ return Be(E, t, d, r, mt, I(mt), e, jt);
802
+ },
803
+ changed: F
804
+ }, $t));
805
+ }
806
+ function P() {
807
+ D("dragOverAnimationCapture"), v.captureAnimationState(), v !== y && y.captureAnimationState();
808
+ }
809
+ function O(_e) {
810
+ return D("dragOverCompleted", {
811
+ insertion: _e
812
+ }), _e && (f ? u._hideClone() : u._showClone(v), v !== y && (z(d, N ? N.options.ghostClass : u.options.ghostClass, !1), z(d, l.ghostClass, !0)), N !== v && v !== g.active ? N = v : v === g.active && N && (N = null), y === v && (v._ignoreWhileAnimating = n), v.animateAll(function() {
813
+ D("dragOverAnimationComplete"), v._ignoreWhileAnimating = null;
814
+ }), v !== y && (y.animateAll(), y._ignoreWhileAnimating = null)), (n === d && !d.animated || n === t && !n.animated) && (fe = null), !l.dragoverBubble && !e.rootEl && n !== document && (d.parentNode[X]._isOutsideThisEl(e.target), !_e && ae(e)), !l.dragoverBubble && e.stopPropagation && e.stopPropagation(), b = !0;
815
+ }
816
+ function F() {
817
+ H = L(d), ee = L(d, l.draggable), k({
818
+ sortable: v,
819
+ name: "change",
820
+ toEl: t,
821
+ newIndex: H,
822
+ newDraggableIndex: ee,
823
+ originalEvent: e
824
+ });
825
+ }
826
+ if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = G(n, l.draggable, t, !0), D("dragOver"), g.eventCanceled) return b;
827
+ if (d.contains(e.target) || n.animated && n.animatingX && n.animatingY || v._ignoreWhileAnimating === n)
828
+ return O(!1);
829
+ if (je = !1, u && !l.disabled && (f ? c || (a = T !== E) : N === this || (this.lastPutMode = Re.checkPull(this, u, d, e)) && s.checkPut(this, u, d, e))) {
830
+ if (h = this._getDirection(e, n) === "vertical", r = I(d), D("dragOverValid"), g.eventCanceled) return b;
831
+ if (a)
832
+ return T = E, P(), this._hideClone(), D("revert"), g.eventCanceled || (le ? E.insertBefore(d, le) : E.appendChild(d)), O(!0);
833
+ var A = ht(t, l.draggable);
834
+ if (!A || _n(e, h, this) && !A.animated) {
835
+ if (A === d)
836
+ return O(!1);
837
+ if (A && t === e.target && (n = A), n && (i = I(n)), Be(E, t, d, r, n, i, e, !!n) !== !1)
838
+ return P(), A && A.nextSibling ? t.insertBefore(d, A.nextSibling) : t.appendChild(d), T = t, F(), O(!0);
839
+ } else if (A && wn(e, h, this)) {
840
+ var x = me(t, 0, l, !0);
841
+ if (x === d)
842
+ return O(!1);
843
+ if (n = x, i = I(n), Be(E, t, d, r, n, i, e, !1) !== !1)
844
+ return P(), t.insertBefore(d, x), T = t, F(), O(!0);
845
+ } else if (n.parentNode === t) {
846
+ i = I(n);
847
+ var Y = 0, oe, ve = d.parentNode !== t, B = !gn(d.animated && d.toRect || r, n.animated && n.toRect || i, h), be = h ? "top" : "left", Q = Tt(n, "top", "top") || Tt(d, "top", "top"), ye = Q ? Q.scrollTop : void 0;
848
+ fe !== n && (oe = i[be], Ae = !1, Xe = !B && l.invertSwap || ve), Y = En(e, n, i, h, B ? 1 : l.swapThreshold, l.invertedSwapThreshold == null ? l.swapThreshold : l.invertedSwapThreshold, Xe, fe === n);
849
+ var V;
850
+ if (Y !== 0) {
851
+ var re = L(d);
852
+ do
853
+ re -= Y, V = T.children[re];
854
+ while (V && (p(V, "display") === "none" || V === m));
855
+ }
856
+ if (Y === 0 || V === n)
857
+ return O(!1);
858
+ fe = n, Pe = Y;
859
+ var we = n.nextElementSibling, J = !1;
860
+ J = Y === 1;
861
+ var Me = Be(E, t, d, r, n, i, e, J);
862
+ if (Me !== !1)
863
+ return (Me === 1 || Me === -1) && (J = Me === 1), st = !0, setTimeout(yn, 30), P(), J && !we ? t.appendChild(d) : n.parentNode.insertBefore(d, J ? we : n), Q && Rt(Q, 0, ye - Q.scrollTop), T = d.parentNode, oe !== void 0 && !Xe && (Le = Math.abs(oe - I(n)[be])), F(), O(!0);
864
+ }
865
+ if (t.contains(d))
866
+ return O(!1);
867
+ }
868
+ return !1;
869
+ },
870
+ _ignoreWhileAnimating: null,
871
+ _offMoveEvents: function() {
872
+ w(document, "mousemove", this._onTouchMove), w(document, "touchmove", this._onTouchMove), w(document, "pointermove", this._onTouchMove), w(document, "dragover", ae), w(document, "mousemove", ae), w(document, "touchmove", ae);
873
+ },
874
+ _offUpEvents: function() {
875
+ var e = this.el.ownerDocument;
876
+ w(e, "mouseup", this._onDrop), w(e, "touchend", this._onDrop), w(e, "pointerup", this._onDrop), w(e, "pointercancel", this._onDrop), w(e, "touchcancel", this._onDrop), w(document, "selectstart", this);
877
+ },
878
+ _onDrop: function(e) {
879
+ var t = this.el, n = this.options;
880
+ if (H = L(d), ee = L(d, n.draggable), R("drop", this, {
881
+ evt: e
882
+ }), T = d && d.parentNode, H = L(d), ee = L(d, n.draggable), g.eventCanceled) {
883
+ this._nulling();
884
+ return;
885
+ }
886
+ he = !1, Xe = !1, Ae = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), ut(this.cloneId), ut(this._dragStartId), this.nativeDraggable && (w(document, "drop", this), w(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Ce && p(document.body, "user-select", ""), p(d, "transform", ""), e && (Se && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), m && m.parentNode && m.parentNode.removeChild(m), (E === T || N && N.lastPutMode !== "clone") && S && S.parentNode && S.parentNode.removeChild(S), d && (this.nativeDraggable && w(d, "dragend", this), ot(d), d.style["will-change"] = "", Se && !he && z(d, N ? N.options.ghostClass : this.options.ghostClass, !1), z(d, this.options.chosenClass, !1), k({
887
+ sortable: this,
888
+ name: "unchoose",
889
+ toEl: T,
890
+ newIndex: null,
891
+ newDraggableIndex: null,
892
+ originalEvent: e
893
+ }), E !== T ? (H >= 0 && (k({
894
+ rootEl: T,
895
+ name: "add",
896
+ toEl: T,
897
+ fromEl: E,
898
+ originalEvent: e
899
+ }), k({
900
+ sortable: this,
901
+ name: "remove",
902
+ toEl: T,
903
+ originalEvent: e
904
+ }), k({
905
+ rootEl: T,
906
+ name: "sort",
907
+ toEl: T,
908
+ fromEl: E,
909
+ originalEvent: e
910
+ }), k({
911
+ sortable: this,
912
+ name: "sort",
913
+ toEl: T,
914
+ originalEvent: e
915
+ })), N && N.save()) : H !== pe && H >= 0 && (k({
916
+ sortable: this,
917
+ name: "update",
918
+ toEl: T,
919
+ originalEvent: e
920
+ }), k({
921
+ sortable: this,
922
+ name: "sort",
923
+ toEl: T,
924
+ originalEvent: e
925
+ })), g.active && ((H == null || H === -1) && (H = pe, ee = Oe), k({
926
+ sortable: this,
927
+ name: "end",
928
+ toEl: T,
929
+ originalEvent: e
930
+ }), this.save()))), this._nulling();
931
+ },
932
+ _nulling: function() {
933
+ R("nulling", this), E = d = T = m = le = S = He = te = ie = W = Se = H = ee = pe = Oe = fe = Pe = N = Re = g.dragged = g.ghost = g.clone = g.active = null, qe.forEach(function(e) {
934
+ e.checked = !0;
935
+ }), qe.length = et = tt = 0;
936
+ },
937
+ handleEvent: function(e) {
938
+ switch (e.type) {
939
+ case "drop":
940
+ case "dragend":
941
+ this._onDrop(e);
942
+ break;
943
+ case "dragenter":
944
+ case "dragover":
945
+ d && (this._onDragOver(e), bn(e));
946
+ break;
947
+ case "selectstart":
948
+ e.preventDefault();
949
+ break;
950
+ }
951
+ },
952
+ /**
953
+ * Serializes the item into an array of string.
954
+ * @returns {String[]}
955
+ */
956
+ toArray: function() {
957
+ for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++)
958
+ t = n[r], G(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Dn(t));
959
+ return e;
960
+ },
961
+ /**
962
+ * Sorts the elements according to the array.
963
+ * @param {String[]} order order of the items
964
+ */
965
+ sort: function(e, t) {
966
+ var n = {}, r = this.el;
967
+ this.toArray().forEach(function(i, a) {
968
+ var l = r.children[a];
969
+ G(l, this.options.draggable, r, !1) && (n[i] = l);
970
+ }, this), t && this.captureAnimationState(), e.forEach(function(i) {
971
+ n[i] && (r.removeChild(n[i]), r.appendChild(n[i]));
972
+ }), t && this.animateAll();
973
+ },
974
+ /**
975
+ * Save the current sorting
976
+ */
977
+ save: function() {
978
+ var e = this.options.store;
979
+ e && e.set && e.set(this);
980
+ },
981
+ /**
982
+ * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
983
+ * @param {HTMLElement} el
984
+ * @param {String} [selector] default: `options.draggable`
985
+ * @returns {HTMLElement|null}
986
+ */
987
+ closest: function(e, t) {
988
+ return G(e, t || this.options.draggable, this.el, !1);
989
+ },
990
+ /**
991
+ * Set/get option
992
+ * @param {string} name
993
+ * @param {*} [value]
994
+ * @returns {*}
995
+ */
996
+ option: function(e, t) {
997
+ var n = this.options;
998
+ if (t === void 0)
999
+ return n[e];
1000
+ var r = Ne.modifyOption(this, e, t);
1001
+ typeof r < "u" ? n[e] = r : n[e] = t, e === "group" && Ht(n);
1002
+ },
1003
+ /**
1004
+ * Destroy
1005
+ */
1006
+ destroy: function() {
1007
+ R("destroy", this);
1008
+ var e = this.el;
1009
+ e[X] = null, w(e, "mousedown", this._onTapStart), w(e, "touchstart", this._onTapStart), w(e, "pointerdown", this._onTapStart), this.nativeDraggable && (w(e, "dragover", this), w(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(t) {
1010
+ t.removeAttribute("draggable");
1011
+ }), this._onDrop(), this._disableDelayedDragEvents(), Ve.splice(Ve.indexOf(this.el), 1), this.el = e = null;
1012
+ },
1013
+ _hideClone: function() {
1014
+ if (!te) {
1015
+ if (R("hideClone", this), g.eventCanceled) return;
1016
+ p(S, "display", "none"), this.options.removeCloneOnHide && S.parentNode && S.parentNode.removeChild(S), te = !0;
1017
+ }
1018
+ },
1019
+ _showClone: function(e) {
1020
+ if (e.lastPutMode !== "clone") {
1021
+ this._hideClone();
1022
+ return;
1023
+ }
1024
+ if (te) {
1025
+ if (R("showClone", this), g.eventCanceled) return;
1026
+ d.parentNode == E && !this.options.group.revertClone ? E.insertBefore(S, d) : le ? E.insertBefore(S, le) : E.appendChild(S), this.options.group.revertClone && this.animate(d, S), p(S, "display", ""), te = !1;
1027
+ }
1028
+ }
1029
+ };
1030
+ function bn(o) {
1031
+ o.dataTransfer && (o.dataTransfer.dropEffect = "move"), o.cancelable && o.preventDefault();
1032
+ }
1033
+ function Be(o, e, t, n, r, i, a, l) {
1034
+ var s, u = o[X], f = u.options.onMove, c;
1035
+ return window.CustomEvent && !Z && !xe ? s = new CustomEvent("move", {
1036
+ bubbles: !0,
1037
+ cancelable: !0
1038
+ }) : (s = document.createEvent("Event"), s.initEvent("move", !0, !0)), s.to = e, s.from = o, s.dragged = t, s.draggedRect = n, s.related = r || e, s.relatedRect = i || I(e), s.willInsertAfter = l, s.originalEvent = a, o.dispatchEvent(s), f && (c = f.call(u, s, a)), c;
1039
+ }
1040
+ function ot(o) {
1041
+ o.draggable = !1;
1042
+ }
1043
+ function yn() {
1044
+ st = !1;
1045
+ }
1046
+ function wn(o, e, t) {
1047
+ var n = I(me(t.el, 0, t.options, !0)), r = Yt(t.el, t.options, m), i = 10;
1048
+ return e ? o.clientX < r.left - i || o.clientY < n.top && o.clientX < n.right : o.clientY < r.top - i || o.clientY < n.bottom && o.clientX < n.left;
1049
+ }
1050
+ function _n(o, e, t) {
1051
+ var n = I(ht(t.el, t.options.draggable)), r = Yt(t.el, t.options, m), i = 10;
1052
+ return e ? o.clientX > r.right + i || o.clientY > n.bottom && o.clientX > n.left : o.clientY > r.bottom + i || o.clientX > n.right && o.clientY > n.top;
1053
+ }
1054
+ function En(o, e, t, n, r, i, a, l) {
1055
+ var s = n ? o.clientY : o.clientX, u = n ? t.height : t.width, f = n ? t.top : t.left, c = n ? t.bottom : t.right, y = !1;
1056
+ if (!a) {
1057
+ if (l && Le < u * r) {
1058
+ if (!Ae && (Pe === 1 ? s > f + u * i / 2 : s < c - u * i / 2) && (Ae = !0), Ae)
1059
+ y = !0;
1060
+ else if (Pe === 1 ? s < f + Le : s > c - Le)
1061
+ return -Pe;
1062
+ } else if (s > f + u * (1 - r) / 2 && s < c - u * (1 - r) / 2)
1063
+ return Sn(e);
1064
+ }
1065
+ return y = y || a, y && (s < f + u * i / 2 || s > c - u * i / 2) ? s > f + u / 2 ? 1 : -1 : 0;
1066
+ }
1067
+ function Sn(o) {
1068
+ return L(d) < L(o) ? 1 : -1;
1069
+ }
1070
+ function Dn(o) {
1071
+ for (var e = o.tagName + o.className + o.src + o.href + o.textContent, t = e.length, n = 0; t--; )
1072
+ n += e.charCodeAt(t);
1073
+ return n.toString(36);
1074
+ }
1075
+ function Tn(o) {
1076
+ qe.length = 0;
1077
+ for (var e = o.getElementsByTagName("input"), t = e.length; t--; ) {
1078
+ var n = e[t];
1079
+ n.checked && qe.push(n);
1080
+ }
1081
+ }
1082
+ function We(o) {
1083
+ return setTimeout(o, 0);
1084
+ }
1085
+ function ut(o) {
1086
+ return clearTimeout(o);
1087
+ }
1088
+ Ke && _(document, "touchmove", function(o) {
1089
+ (g.active || he) && o.cancelable && o.preventDefault();
1090
+ });
1091
+ g.utils = {
1092
+ on: _,
1093
+ off: w,
1094
+ css: p,
1095
+ find: Ft,
1096
+ is: function(e, t) {
1097
+ return !!G(e, t, e, !1);
1098
+ },
1099
+ extend: ln,
1100
+ throttle: kt,
1101
+ closest: G,
1102
+ toggleClass: z,
1103
+ clone: Xt,
1104
+ index: L,
1105
+ nextTick: We,
1106
+ cancelNextTick: ut,
1107
+ detectDirection: zt,
1108
+ getChild: me,
1109
+ expando: X
1110
+ };
1111
+ g.get = function(o) {
1112
+ return o[X];
1113
+ };
1114
+ g.mount = function() {
1115
+ for (var o = arguments.length, e = new Array(o), t = 0; t < o; t++)
1116
+ e[t] = arguments[t];
1117
+ e[0].constructor === Array && (e = e[0]), e.forEach(function(n) {
1118
+ if (!n.prototype || !n.prototype.constructor)
1119
+ throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));
1120
+ n.utils && (g.utils = j(j({}, g.utils), n.utils)), Ne.mount(n);
1121
+ });
1122
+ };
1123
+ g.create = function(o, e) {
1124
+ return new g(o, e);
1125
+ };
1126
+ g.version = rn;
1127
+ var C = [], De, dt, ct = !1, rt, it, Ue, Te;
1128
+ function Cn() {
1129
+ function o() {
1130
+ this.defaults = {
1131
+ scroll: !0,
1132
+ forceAutoScrollFallback: !1,
1133
+ scrollSensitivity: 30,
1134
+ scrollSpeed: 10,
1135
+ bubbleScroll: !0
1136
+ };
1137
+ for (var e in this)
1138
+ e.charAt(0) === "_" && typeof this[e] == "function" && (this[e] = this[e].bind(this));
1139
+ }
1140
+ return o.prototype = {
1141
+ dragStarted: function(t) {
1142
+ var n = t.originalEvent;
1143
+ this.sortable.nativeDraggable ? _(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? _(document, "pointermove", this._handleFallbackAutoScroll) : n.touches ? _(document, "touchmove", this._handleFallbackAutoScroll) : _(document, "mousemove", this._handleFallbackAutoScroll);
1144
+ },
1145
+ dragOverCompleted: function(t) {
1146
+ var n = t.originalEvent;
1147
+ !this.options.dragOverBubble && !n.rootEl && this._handleAutoScroll(n);
1148
+ },
1149
+ drop: function() {
1150
+ this.sortable.nativeDraggable ? w(document, "dragover", this._handleAutoScroll) : (w(document, "pointermove", this._handleFallbackAutoScroll), w(document, "touchmove", this._handleFallbackAutoScroll), w(document, "mousemove", this._handleFallbackAutoScroll)), At(), Ge(), sn();
1151
+ },
1152
+ nulling: function() {
1153
+ Ue = dt = De = ct = Te = rt = it = null, C.length = 0;
1154
+ },
1155
+ _handleFallbackAutoScroll: function(t) {
1156
+ this._handleAutoScroll(t, !0);
1157
+ },
1158
+ _handleAutoScroll: function(t, n) {
1159
+ var r = this, i = (t.touches ? t.touches[0] : t).clientX, a = (t.touches ? t.touches[0] : t).clientY, l = document.elementFromPoint(i, a);
1160
+ if (Ue = t, n || this.options.forceAutoScrollFallback || xe || Z || Ce) {
1161
+ at(t, this.options, l, n);
1162
+ var s = ne(l, !0);
1163
+ ct && (!Te || i !== rt || a !== it) && (Te && At(), Te = setInterval(function() {
1164
+ var u = ne(document.elementFromPoint(i, a), !0);
1165
+ u !== s && (s = u, Ge()), at(t, r.options, u, n);
1166
+ }, 10), rt = i, it = a);
1167
+ } else {
1168
+ if (!this.options.bubbleScroll || ne(l, !0) === $()) {
1169
+ Ge();
1170
+ return;
1171
+ }
1172
+ at(t, this.options, ne(l, !1), !1);
1173
+ }
1174
+ }
1175
+ }, K(o, {
1176
+ pluginName: "scroll",
1177
+ initializeByDefault: !0
1178
+ });
1179
+ }
1180
+ function Ge() {
1181
+ C.forEach(function(o) {
1182
+ clearInterval(o.pid);
1183
+ }), C = [];
1184
+ }
1185
+ function At() {
1186
+ clearInterval(Te);
1187
+ }
1188
+ var at = kt(function(o, e, t, n) {
1189
+ if (e.scroll) {
1190
+ var r = (o.touches ? o.touches[0] : o).clientX, i = (o.touches ? o.touches[0] : o).clientY, a = e.scrollSensitivity, l = e.scrollSpeed, s = $(), u = !1, f;
1191
+ dt !== t && (dt = t, Ge(), De = e.scroll, f = e.scrollFn, De === !0 && (De = ne(t, !0)));
1192
+ var c = 0, y = De;
1193
+ do {
1194
+ var h = y, v = I(h), b = v.top, D = v.bottom, P = v.left, O = v.right, F = v.width, A = v.height, x = void 0, Y = void 0, oe = h.scrollWidth, ve = h.scrollHeight, B = p(h), be = h.scrollLeft, Q = h.scrollTop;
1195
+ h === s ? (x = F < oe && (B.overflowX === "auto" || B.overflowX === "scroll" || B.overflowX === "visible"), Y = A < ve && (B.overflowY === "auto" || B.overflowY === "scroll" || B.overflowY === "visible")) : (x = F < oe && (B.overflowX === "auto" || B.overflowX === "scroll"), Y = A < ve && (B.overflowY === "auto" || B.overflowY === "scroll"));
1196
+ var ye = x && (Math.abs(O - r) <= a && be + F < oe) - (Math.abs(P - r) <= a && !!be), V = Y && (Math.abs(D - i) <= a && Q + A < ve) - (Math.abs(b - i) <= a && !!Q);
1197
+ if (!C[c])
1198
+ for (var re = 0; re <= c; re++)
1199
+ C[re] || (C[re] = {});
1200
+ (C[c].vx != ye || C[c].vy != V || C[c].el !== h) && (C[c].el = h, C[c].vx = ye, C[c].vy = V, clearInterval(C[c].pid), (ye != 0 || V != 0) && (u = !0, C[c].pid = setInterval((function() {
1201
+ n && this.layer === 0 && g.active._onTouchMove(Ue);
1202
+ var we = C[this.layer].vy ? C[this.layer].vy * l : 0, J = C[this.layer].vx ? C[this.layer].vx * l : 0;
1203
+ typeof f == "function" && f.call(g.dragged.parentNode[X], J, we, o, Ue, C[this.layer].el) !== "continue" || Rt(C[this.layer].el, J, we);
1204
+ }).bind({
1205
+ layer: c
1206
+ }), 24))), c++;
1207
+ } while (e.bubbleScroll && y !== s && (y = ne(y, !1)));
1208
+ ct = u;
1209
+ }
1210
+ }, 30), Gt = function(e) {
1211
+ var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, l = e.hideGhostForTarget, s = e.unhideGhostForTarget;
1212
+ if (t) {
1213
+ var u = n || i;
1214
+ l();
1215
+ var f = t.changedTouches && t.changedTouches.length ? t.changedTouches[0] : t, c = document.elementFromPoint(f.clientX, f.clientY);
1216
+ s(), u && !u.el.contains(c) && (a("spill"), this.onSpill({
1217
+ dragEl: r,
1218
+ putSortable: n
1219
+ }));
1220
+ }
1221
+ };
1222
+ function pt() {
1223
+ }
1224
+ pt.prototype = {
1225
+ startIndex: null,
1226
+ dragStart: function(e) {
1227
+ var t = e.oldDraggableIndex;
1228
+ this.startIndex = t;
1229
+ },
1230
+ onSpill: function(e) {
1231
+ var t = e.dragEl, n = e.putSortable;
1232
+ this.sortable.captureAnimationState(), n && n.captureAnimationState();
1233
+ var r = me(this.sortable.el, this.startIndex, this.options);
1234
+ r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
1235
+ },
1236
+ drop: Gt
1237
+ };
1238
+ K(pt, {
1239
+ pluginName: "revertOnSpill"
1240
+ });
1241
+ function gt() {
1242
+ }
1243
+ gt.prototype = {
1244
+ onSpill: function(e) {
1245
+ var t = e.dragEl, n = e.putSortable, r = n || this.sortable;
1246
+ r.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), r.animateAll();
1247
+ },
1248
+ drop: Gt
1249
+ };
1250
+ K(gt, {
1251
+ pluginName: "removeOnSpill"
1252
+ });
1253
+ g.mount(new Cn());
1254
+ g.mount(gt, pt);
1255
+ const In = { class: "g-table" }, On = { key: 1 }, Pn = { class: "g-dropdown-link" }, An = /* @__PURE__ */ Vt({
1256
+ name: "GTable",
6
1257
  inheritAttrs: !1,
7
1258
  __name: "index",
8
1259
  props: {
9
- data: { default: () => [] },
10
- loading: { type: Boolean, default: !1 },
11
- pagination: { type: Boolean, default: !1 },
12
- total: { default: 0 },
13
- operationLabel: { default: "操作" },
14
- isExpandAll: { type: Boolean, default: !1 },
15
- currentPage: { default: 1 },
16
- pageSize: { default: 10 },
17
- operaWidth: { default: 150 }
18
- },
19
- emits: ["update:currentPage", "update:pageSize", "size-change", "current-change"],
20
- setup(i, { emit: h }) {
21
- const d = i, l = h, b = (e) => {
22
- l("update:pageSize", e), l("size-change", e);
23
- }, w = (e) => {
24
- l("update:currentPage", e), l("current-change", e);
25
- }, y = P();
26
- return N(() => y.moreOperations ? 150 : 100), (e, c) => {
27
- const z = o("el-icon"), $ = o("el-dropdown-menu"), C = o("el-dropdown"), k = o("el-table-column"), v = o("el-table"), S = o("el-pagination");
28
- return a(), g("div", A, [
29
- f("div", null, [
30
- n(e.$slots, "operate", {}, void 0, !0)
1260
+ /**
1261
+ * @description 表格数据数组,默认为空数组
1262
+ * @version 0.1.5
1263
+ * @default []
1264
+ */
1265
+ data: {
1266
+ type: Array,
1267
+ default: () => []
1268
+ },
1269
+ /**
1270
+ * @description 是否显示分页组件,默认为false
1271
+ * @version 0.1.5
1272
+ * @default false
1273
+ */
1274
+ pagination: {
1275
+ type: Boolean,
1276
+ default: () => !1
1277
+ },
1278
+ /**
1279
+ * @description 操作列标题,默认为'操作'
1280
+ * @version 0.1.5
1281
+ * @default '操作'
1282
+ */
1283
+ operationLabel: {
1284
+ type: String,
1285
+ default: () => "操作"
1286
+ },
1287
+ /**
1288
+ * @description 操作列宽度,默认为150
1289
+ * @version 0.1.5
1290
+ * @default 150
1291
+ */
1292
+ operaWidth: {
1293
+ type: Number,
1294
+ default: () => 150
1295
+ },
1296
+ /**
1297
+ * @description 是否开启拖动排序
1298
+ * @version 0.1.5
1299
+ * @default false
1300
+ */
1301
+ dragSort: {
1302
+ type: Boolean,
1303
+ default: () => !1
1304
+ },
1305
+ /**
1306
+ * @description 拖动排序后,排序后数组里哪些字段需要返回
1307
+ * @version 0.1.5
1308
+ * @default []
1309
+ */
1310
+ dragSortProps: {
1311
+ type: Array,
1312
+ default: () => []
1313
+ }
1314
+ },
1315
+ emits: {
1316
+ /**
1317
+ * @description 当前页改变时触发,返回当前页号
1318
+ * @version 0.1.5
1319
+ * @default number
1320
+ */
1321
+ "update:currentPage": (o) => !0,
1322
+ /**
1323
+ * @description 当前页改变时触发,返回当前页号
1324
+ * @version 0.1.5
1325
+ * @default number
1326
+ */
1327
+ "update:pageSize": (o) => !0,
1328
+ /**
1329
+ * @description 拖动排序后,返回排序后的数组
1330
+ * @version 0.1.5
1331
+ * @default any[]
1332
+ */
1333
+ "sorted:data": (o) => !0
1334
+ },
1335
+ setup(o, { emit: e }) {
1336
+ const t = o, n = e, r = (h) => {
1337
+ n("update:pageSize", h);
1338
+ }, i = (h) => {
1339
+ n("update:currentPage", h);
1340
+ }, a = qt(), l = (h) => !!a[h], s = Ut(), u = (h) => {
1341
+ const v = !!s["page-size"], b = !!s["current-page"];
1342
+ if (v && b) {
1343
+ const D = Number(s["page-size"] || 10), P = Number(s["current-page"] || 1);
1344
+ return h + 1 + D * (P - 1);
1345
+ }
1346
+ return h;
1347
+ }, f = vt(null);
1348
+ let c = vt(null);
1349
+ const y = () => {
1350
+ if (f.value)
1351
+ try {
1352
+ const h = f.value.$el.querySelectorAll("tbody");
1353
+ let v = null;
1354
+ for (let b = 0; b < h.length; b++) {
1355
+ const D = h[b];
1356
+ if (D.querySelectorAll("tr").length > 0) {
1357
+ v = D;
1358
+ break;
1359
+ }
1360
+ }
1361
+ if (!v) {
1362
+ console.error("未找到包含数据行的 tbody 元素");
1363
+ return;
1364
+ }
1365
+ c.value && c.value?.destroy?.(), c.value = new g(v, {
1366
+ // 拖拽的元素选择器
1367
+ draggable: "tr",
1368
+ // 拖拽的触发元素选择器
1369
+ handle: ".g-drag-icon",
1370
+ // 拖拽动画时长
1371
+ animation: 200,
1372
+ // 拖拽时占位元素的类名
1373
+ ghostClass: "g-sortable-ghost",
1374
+ // 禁用 Sortable 的默认拖拽反馈
1375
+ forceFallback: !0,
1376
+ onStart: function(b) {
1377
+ b.item.classList.add("dragging");
1378
+ },
1379
+ onEnd: async function(b) {
1380
+ b.item.classList.remove("dragging");
1381
+ const { oldIndex: D, newIndex: P } = b;
1382
+ if (D === void 0 || P === void 0) {
1383
+ console.error("无效的索引值");
1384
+ return;
1385
+ }
1386
+ const [O] = t.data.splice(D, 1);
1387
+ if (t.data.splice(P, 0, O), t.dragSortProps.length === 0) {
1388
+ n("sorted:data", t.data);
1389
+ return;
1390
+ }
1391
+ if (t.dragSortProps.length > 0) {
1392
+ const F = t.data.map((A) => {
1393
+ const x = {};
1394
+ return t.dragSortProps.forEach((Y) => {
1395
+ x[Y] = A[Y];
1396
+ }), x;
1397
+ });
1398
+ n("sorted:data", F);
1399
+ }
1400
+ }
1401
+ });
1402
+ } catch (h) {
1403
+ console.error("初始化拖拽排序失败:", h);
1404
+ }
1405
+ };
1406
+ return Kt(() => {
1407
+ t.dragSort && setTimeout(() => {
1408
+ y();
1409
+ }, 2e3);
1410
+ }), (h, v) => {
1411
+ const b = se("el-icon"), D = se("el-table-column"), P = se("el-dropdown-menu"), O = se("el-dropdown"), F = se("el-table"), A = se("el-pagination");
1412
+ return ue(), bt("div", In, [
1413
+ Ze("div", null, [
1414
+ Ee(h.$slots, "action", {}, void 0, !0)
31
1415
  ]),
32
- s(v, _({
33
- data: e.data || []
34
- }, e.$attrs, {
35
- loading: e.loading || !1,
36
- stripe: ""
1416
+ de(F, yt({
1417
+ data: o.data || []
1418
+ }, h.$attrs, {
1419
+ stripe: "",
1420
+ ref_key: "tableRef",
1421
+ ref: f
37
1422
  }), {
38
- empty: t(() => [
39
- e.$slots.empty ? n(e.$slots, "empty", { key: 0 }, void 0, !0) : (a(), g("span", L, "暂无数据"))
1423
+ empty: q(() => [
1424
+ h.$slots.empty ? Ee(h.$slots, "empty", { key: 0 }, void 0, !0) : (ue(), bt("span", On, "暂无数据"))
40
1425
  ]),
41
- default: t(() => [
42
- n(e.$slots, "default", {}, void 0, !0),
43
- e.$slots.operations ? (a(), p(k, {
1426
+ default: q(() => [
1427
+ o.dragSort ? (ue(), Fe(D, {
44
1428
  key: 0,
1429
+ label: "序号",
1430
+ width: "65"
1431
+ }, {
1432
+ default: q((x) => [
1433
+ Ze("div", null, [
1434
+ wt(Zt(u(x.$index)) + " ", 1),
1435
+ de(b, { class: "g-drag-icon" }, {
1436
+ default: q(() => [
1437
+ de(_t(Qt))
1438
+ ]),
1439
+ _: 1
1440
+ })
1441
+ ])
1442
+ ]),
1443
+ _: 1
1444
+ })) : ke("", !0),
1445
+ Ee(h.$slots, "default", {}, void 0, !0),
1446
+ l("operations") ? (ue(), Fe(D, {
1447
+ key: 1,
45
1448
  fixed: "right",
46
- label: e.operationLabel || "操作",
47
- width: e.operaWidth
1449
+ label: o.operationLabel || "操作",
1450
+ width: o.operaWidth
48
1451
  }, {
49
- default: t((r) => [
50
- n(e.$slots, "operations", {
51
- row: r.row,
52
- index: r.$index
1452
+ default: q((x) => [
1453
+ Ee(h.$slots, "operations", {
1454
+ row: x.row,
1455
+ index: x.$index
53
1456
  }, void 0, !0),
54
- e.$slots.moreOperations ? (a(), p(C, {
1457
+ l("more") ? (ue(), Fe(O, {
55
1458
  key: 0,
56
1459
  size: "small",
57
1460
  style: { "vertical-align": "baseline" }
58
1461
  }, {
59
- dropdown: t(() => [
60
- s($, null, {
61
- default: t(() => [
62
- n(e.$slots, "moreOperations", {
63
- row: r.row,
64
- index: r.$index
1462
+ dropdown: q(() => [
1463
+ de(P, null, {
1464
+ default: q(() => [
1465
+ Ee(h.$slots, "more", {
1466
+ row: x.row,
1467
+ index: x.$index
65
1468
  }, void 0, !0)
66
1469
  ]),
67
1470
  _: 2
68
1471
  }, 1024)
69
1472
  ]),
70
- default: t(() => [
71
- f("span", W, [
72
- c[0] || (c[0] = V(" 更多 ")),
73
- s(z, null, {
74
- default: t(() => [
75
- s(E(O))
1473
+ default: q(() => [
1474
+ Ze("span", Pn, [
1475
+ v[0] || (v[0] = wt(" 更多 ")),
1476
+ de(b, null, {
1477
+ default: q(() => [
1478
+ de(_t(Jt))
76
1479
  ]),
77
1480
  _: 1
78
1481
  })
79
1482
  ])
80
1483
  ]),
81
1484
  _: 2
82
- }, 1024)) : u("", !0)
1485
+ }, 1024)) : ke("", !0)
83
1486
  ]),
84
1487
  _: 3
85
- }, 8, ["label", "width"])) : u("", !0)
1488
+ }, 8, ["label", "width"])) : ke("", !0)
86
1489
  ]),
87
1490
  _: 3
88
- }, 16, ["data", "loading"]),
89
- e.pagination ? (a(), p(S, _({
1491
+ }, 16, ["data"]),
1492
+ o.pagination ? (ue(), Fe(A, yt({
90
1493
  key: 0,
91
1494
  class: "g-pagination-contianer"
92
- }, e.$attrs, {
93
- "current-page": d.currentPage,
94
- "page-size": d.pageSize,
1495
+ }, h.$attrs, {
95
1496
  "page-sizes": [10, 20, 50, 100],
96
- total: d.total || 0,
97
1497
  layout: "total, sizes, prev, pager, next",
98
- onSizeChange: b,
99
- onCurrentChange: w
100
- }), null, 16, ["current-page", "page-size", "total"])) : u("", !0)
1498
+ onSizeChange: r,
1499
+ onCurrentChange: i
1500
+ }), null, 16)) : ke("", !0)
101
1501
  ]);
102
1502
  };
103
1503
  }
104
- }), m = /* @__PURE__ */ T(G, [["__scopeId", "data-v-6bd5b10b"]]);
105
- m.install = (i) => {
106
- i.component(m.name, m);
1504
+ }), lt = /* @__PURE__ */ en(An, [["__scopeId", "data-v-ddc979a1"]]);
1505
+ lt.install = (o) => {
1506
+ o.component(lt.name, lt);
107
1507
  };
108
1508
  export {
109
- m as GTable,
110
- m as default
1509
+ lt as GTable,
1510
+ lt as default
111
1511
  };