@ianicdev/datatables2 0.10.9 → 0.11.1

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