@pantograph/sortable 2.2.2 → 2.2.4

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