@since2006/pages 2026.4.8 → 2026.4.9

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