@orchidui/dashboard 0.8.0 → 0.9.0

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