@eox/layercontrol 0.6.3 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/eox-layercontrol.js +918 -795
- package/dist/eox-layercontrol.umd.cjs +93 -65
- package/package.json +1 -1
- package/test/_mockMap.ts +5 -2
- package/test/general.cy.ts +14 -0
package/dist/eox-layercontrol.js
CHANGED
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const
|
|
7
|
-
let
|
|
6
|
+
const re = window, je = re.ShadowRoot && (re.ShadyCSS === void 0 || re.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, bi = Symbol(), qe = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
let Qi = class {
|
|
8
8
|
constructor(t, e, n) {
|
|
9
|
-
if (this._$cssResult$ = !0, n !==
|
|
9
|
+
if (this._$cssResult$ = !0, n !== bi)
|
|
10
10
|
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
11
11
|
this.cssText = t, this.t = e;
|
|
12
12
|
}
|
|
13
13
|
get styleSheet() {
|
|
14
14
|
let t = this.o;
|
|
15
15
|
const e = this.t;
|
|
16
|
-
if (
|
|
16
|
+
if (je && t === void 0) {
|
|
17
17
|
const n = e !== void 0 && e.length === 1;
|
|
18
|
-
n && (t =
|
|
18
|
+
n && (t = qe.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), n && qe.set(e, t));
|
|
19
19
|
}
|
|
20
20
|
return t;
|
|
21
21
|
}
|
|
@@ -23,27 +23,27 @@ let Bi = class {
|
|
|
23
23
|
return this.cssText;
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
const n = document.createElement("style"), r =
|
|
26
|
+
const Ji = (i) => new Qi(typeof i == "string" ? i : i + "", void 0, bi), tn = (i, t) => {
|
|
27
|
+
je ? i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => {
|
|
28
|
+
const n = document.createElement("style"), r = re.litNonce;
|
|
29
29
|
r !== void 0 && n.setAttribute("nonce", r), n.textContent = e.cssText, i.appendChild(n);
|
|
30
30
|
});
|
|
31
|
-
},
|
|
31
|
+
}, Ke = je ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
|
|
32
32
|
let e = "";
|
|
33
33
|
for (const n of t.cssRules)
|
|
34
34
|
e += n.cssText;
|
|
35
|
-
return
|
|
35
|
+
return Ji(e);
|
|
36
36
|
})(i) : i;
|
|
37
37
|
/**
|
|
38
38
|
* @license
|
|
39
39
|
* Copyright 2017 Google LLC
|
|
40
40
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
41
41
|
*/
|
|
42
|
-
var
|
|
43
|
-
const
|
|
42
|
+
var be;
|
|
43
|
+
const ue = window, Qe = ue.trustedTypes, en = Qe ? Qe.emptyScript : "", Je = ue.reactiveElementPolyfillSupport, ke = { toAttribute(i, t) {
|
|
44
44
|
switch (t) {
|
|
45
45
|
case Boolean:
|
|
46
|
-
i = i ?
|
|
46
|
+
i = i ? en : null;
|
|
47
47
|
break;
|
|
48
48
|
case Object:
|
|
49
49
|
case Array:
|
|
@@ -68,8 +68,8 @@ const Zt = window, ke = Zt.trustedTypes, Fi = ke ? ke.emptyScript : "", Ve = Zt.
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
return e;
|
|
71
|
-
} },
|
|
72
|
-
let
|
|
71
|
+
} }, _i = (i, t) => t !== i && (t == t || i == i), _e = { attribute: !0, type: String, converter: ke, reflect: !1, hasChanged: _i }, Ne = "finalized";
|
|
72
|
+
let At = class extends HTMLElement {
|
|
73
73
|
constructor() {
|
|
74
74
|
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
|
|
75
75
|
}
|
|
@@ -85,7 +85,7 @@ let ft = class extends HTMLElement {
|
|
|
85
85
|
r !== void 0 && (this._$Ev.set(r, n), t.push(r));
|
|
86
86
|
}), t;
|
|
87
87
|
}
|
|
88
|
-
static createProperty(t, e =
|
|
88
|
+
static createProperty(t, e = _e) {
|
|
89
89
|
if (e.state && (e.attribute = !1), this.finalize(), this.elementProperties.set(t, e), !e.noAccessor && !this.prototype.hasOwnProperty(t)) {
|
|
90
90
|
const n = typeof t == "symbol" ? Symbol() : "__" + t, r = this.getPropertyDescriptor(t, n, e);
|
|
91
91
|
r !== void 0 && Object.defineProperty(this.prototype, t, r);
|
|
@@ -100,12 +100,12 @@ let ft = class extends HTMLElement {
|
|
|
100
100
|
}, configurable: !0, enumerable: !0 };
|
|
101
101
|
}
|
|
102
102
|
static getPropertyOptions(t) {
|
|
103
|
-
return this.elementProperties.get(t) ||
|
|
103
|
+
return this.elementProperties.get(t) || _e;
|
|
104
104
|
}
|
|
105
105
|
static finalize() {
|
|
106
|
-
if (this.hasOwnProperty(
|
|
106
|
+
if (this.hasOwnProperty(Ne))
|
|
107
107
|
return !1;
|
|
108
|
-
this[
|
|
108
|
+
this[Ne] = !0;
|
|
109
109
|
const t = Object.getPrototypeOf(this);
|
|
110
110
|
if (t.finalize(), t.h !== void 0 && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
|
|
111
111
|
const e = this.properties, n = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)];
|
|
@@ -119,9 +119,9 @@ let ft = class extends HTMLElement {
|
|
|
119
119
|
if (Array.isArray(t)) {
|
|
120
120
|
const n = new Set(t.flat(1 / 0).reverse());
|
|
121
121
|
for (const r of n)
|
|
122
|
-
e.unshift(
|
|
122
|
+
e.unshift(Ke(r));
|
|
123
123
|
} else
|
|
124
|
-
t !== void 0 && e.push(
|
|
124
|
+
t !== void 0 && e.push(Ke(t));
|
|
125
125
|
return e;
|
|
126
126
|
}
|
|
127
127
|
static _$Ep(t, e) {
|
|
@@ -148,7 +148,7 @@ let ft = class extends HTMLElement {
|
|
|
148
148
|
createRenderRoot() {
|
|
149
149
|
var t;
|
|
150
150
|
const e = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
|
|
151
|
-
return
|
|
151
|
+
return tn(e, this.constructor.elementStyles), e;
|
|
152
152
|
}
|
|
153
153
|
connectedCallback() {
|
|
154
154
|
var t;
|
|
@@ -169,11 +169,11 @@ let ft = class extends HTMLElement {
|
|
|
169
169
|
attributeChangedCallback(t, e, n) {
|
|
170
170
|
this._$AK(t, n);
|
|
171
171
|
}
|
|
172
|
-
_$EO(t, e, n =
|
|
172
|
+
_$EO(t, e, n = _e) {
|
|
173
173
|
var r;
|
|
174
174
|
const o = this.constructor._$Ep(t, n);
|
|
175
175
|
if (o !== void 0 && n.reflect === !0) {
|
|
176
|
-
const a = (((r = n.converter) === null || r === void 0 ? void 0 : r.toAttribute) !== void 0 ? n.converter :
|
|
176
|
+
const a = (((r = n.converter) === null || r === void 0 ? void 0 : r.toAttribute) !== void 0 ? n.converter : ke).toAttribute(e, n.type);
|
|
177
177
|
this._$El = t, a == null ? this.removeAttribute(o) : this.setAttribute(o, a), this._$El = null;
|
|
178
178
|
}
|
|
179
179
|
}
|
|
@@ -181,13 +181,13 @@ let ft = class extends HTMLElement {
|
|
|
181
181
|
var n;
|
|
182
182
|
const r = this.constructor, o = r._$Ev.get(t);
|
|
183
183
|
if (o !== void 0 && this._$El !== o) {
|
|
184
|
-
const a = r.getPropertyOptions(o),
|
|
185
|
-
this._$El = o, this[o] =
|
|
184
|
+
const a = r.getPropertyOptions(o), s = typeof a.converter == "function" ? { fromAttribute: a.converter } : ((n = a.converter) === null || n === void 0 ? void 0 : n.fromAttribute) !== void 0 ? a.converter : ke;
|
|
185
|
+
this._$El = o, this[o] = s.fromAttribute(e, a.type), this._$El = null;
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
requestUpdate(t, e, n) {
|
|
189
189
|
let r = !0;
|
|
190
|
-
t !== void 0 && (((n = n || this.constructor.getPropertyOptions(t)).hasChanged ||
|
|
190
|
+
t !== void 0 && (((n = n || this.constructor.getPropertyOptions(t)).hasChanged || _i)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), n.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, n))) : r = !1), !this.isUpdatePending && r && (this._$E_ = this._$Ej());
|
|
191
191
|
}
|
|
192
192
|
async _$Ej() {
|
|
193
193
|
this.isUpdatePending = !0;
|
|
@@ -248,91 +248,91 @@ let ft = class extends HTMLElement {
|
|
|
248
248
|
firstUpdated(t) {
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
|
-
|
|
251
|
+
At[Ne] = !0, At.elementProperties = /* @__PURE__ */ new Map(), At.elementStyles = [], At.shadowRootOptions = { mode: "open" }, Je == null || Je({ ReactiveElement: At }), ((be = ue.reactiveElementVersions) !== null && be !== void 0 ? be : ue.reactiveElementVersions = []).push("1.6.2");
|
|
252
252
|
/**
|
|
253
253
|
* @license
|
|
254
254
|
* Copyright 2017 Google LLC
|
|
255
255
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
256
256
|
*/
|
|
257
|
-
var
|
|
258
|
-
const
|
|
259
|
-
\f\r]`,
|
|
260
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
257
|
+
var Ee;
|
|
258
|
+
const ce = window, Tt = ce.trustedTypes, ti = Tt ? Tt.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, he = "$lit$", tt = `lit$${(Math.random() + "").slice(9)}$`, Ye = "?" + tt, nn = `<${Ye}>`, bt = document, Wt = () => bt.createComment(""), Gt = (i) => i === null || typeof i != "object" && typeof i != "function", Ei = Array.isArray, wi = (i) => Ei(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", we = `[
|
|
259
|
+
\f\r]`, Nt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ei = /-->/g, ii = />/g, ht = RegExp(`>|${we}(?:([^\\s"'>=/]+)(${we}*=${we}*(?:[^
|
|
260
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), ni = /'/g, ri = /"/g, xi = /^(?:script|style|textarea|title)$/i, rn = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), H = rn(1), W = Symbol.for("lit-noChange"), w = Symbol.for("lit-nothing"), oi = /* @__PURE__ */ new WeakMap(), yt = bt.createTreeWalker(bt, 129, null, !1), Ai = (i, t) => {
|
|
261
261
|
const e = i.length - 1, n = [];
|
|
262
|
-
let r, o = t === 2 ? "<svg>" : "", a =
|
|
263
|
-
for (let
|
|
264
|
-
const d = i[
|
|
265
|
-
let p, u,
|
|
266
|
-
for (;
|
|
267
|
-
|
|
268
|
-
const f = a ===
|
|
269
|
-
o += a ===
|
|
270
|
-
}
|
|
271
|
-
const
|
|
262
|
+
let r, o = t === 2 ? "<svg>" : "", a = Nt;
|
|
263
|
+
for (let l = 0; l < e; l++) {
|
|
264
|
+
const d = i[l];
|
|
265
|
+
let p, u, h = -1, g = 0;
|
|
266
|
+
for (; g < d.length && (a.lastIndex = g, u = a.exec(d), u !== null); )
|
|
267
|
+
g = a.lastIndex, a === Nt ? u[1] === "!--" ? a = ei : u[1] !== void 0 ? a = ii : u[2] !== void 0 ? (xi.test(u[2]) && (r = RegExp("</" + u[2], "g")), a = ht) : u[3] !== void 0 && (a = ht) : a === ht ? u[0] === ">" ? (a = r ?? Nt, h = -1) : u[1] === void 0 ? h = -2 : (h = a.lastIndex - u[2].length, p = u[1], a = u[3] === void 0 ? ht : u[3] === '"' ? ri : ni) : a === ri || a === ni ? a = ht : a === ei || a === ii ? a = Nt : (a = ht, r = void 0);
|
|
268
|
+
const f = a === ht && i[l + 1].startsWith("/>") ? " " : "";
|
|
269
|
+
o += a === Nt ? d + nn : h >= 0 ? (n.push(p), d.slice(0, h) + he + d.slice(h) + tt + f) : d + tt + (h === -2 ? (n.push(void 0), l) : f);
|
|
270
|
+
}
|
|
271
|
+
const s = o + (i[e] || "<?>") + (t === 2 ? "</svg>" : "");
|
|
272
272
|
if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
|
|
273
273
|
throw Error("invalid template strings array");
|
|
274
|
-
return [
|
|
274
|
+
return [ti !== void 0 ? ti.createHTML(s) : s, n];
|
|
275
275
|
};
|
|
276
|
-
class
|
|
276
|
+
class Zt {
|
|
277
277
|
constructor({ strings: t, _$litType$: e }, n) {
|
|
278
278
|
let r;
|
|
279
279
|
this.parts = [];
|
|
280
280
|
let o = 0, a = 0;
|
|
281
|
-
const
|
|
282
|
-
if (this.el =
|
|
283
|
-
const u = this.el.content,
|
|
284
|
-
|
|
281
|
+
const s = t.length - 1, l = this.parts, [d, p] = Ai(t, e);
|
|
282
|
+
if (this.el = Zt.createElement(d, n), yt.currentNode = this.el.content, e === 2) {
|
|
283
|
+
const u = this.el.content, h = u.firstChild;
|
|
284
|
+
h.remove(), u.append(...h.childNodes);
|
|
285
285
|
}
|
|
286
|
-
for (; (r =
|
|
286
|
+
for (; (r = yt.nextNode()) !== null && l.length < s; ) {
|
|
287
287
|
if (r.nodeType === 1) {
|
|
288
288
|
if (r.hasAttributes()) {
|
|
289
289
|
const u = [];
|
|
290
|
-
for (const
|
|
291
|
-
if (
|
|
292
|
-
const
|
|
293
|
-
if (u.push(
|
|
294
|
-
const f = r.getAttribute(
|
|
295
|
-
|
|
290
|
+
for (const h of r.getAttributeNames())
|
|
291
|
+
if (h.endsWith(he) || h.startsWith(tt)) {
|
|
292
|
+
const g = p[a++];
|
|
293
|
+
if (u.push(h), g !== void 0) {
|
|
294
|
+
const f = r.getAttribute(g.toLowerCase() + he).split(tt), m = /([.?@])?(.*)/.exec(g);
|
|
295
|
+
l.push({ type: 1, index: o, name: m[2], strings: f, ctor: m[1] === "." ? $i : m[1] === "?" ? Si : m[1] === "@" ? Di : qt });
|
|
296
296
|
} else
|
|
297
|
-
|
|
297
|
+
l.push({ type: 6, index: o });
|
|
298
298
|
}
|
|
299
|
-
for (const
|
|
300
|
-
r.removeAttribute(
|
|
299
|
+
for (const h of u)
|
|
300
|
+
r.removeAttribute(h);
|
|
301
301
|
}
|
|
302
|
-
if (
|
|
303
|
-
const u = r.textContent.split(
|
|
304
|
-
if (
|
|
305
|
-
r.textContent =
|
|
306
|
-
for (let
|
|
307
|
-
r.append(u[
|
|
308
|
-
r.append(u[
|
|
302
|
+
if (xi.test(r.tagName)) {
|
|
303
|
+
const u = r.textContent.split(tt), h = u.length - 1;
|
|
304
|
+
if (h > 0) {
|
|
305
|
+
r.textContent = Tt ? Tt.emptyScript : "";
|
|
306
|
+
for (let g = 0; g < h; g++)
|
|
307
|
+
r.append(u[g], Wt()), yt.nextNode(), l.push({ type: 2, index: ++o });
|
|
308
|
+
r.append(u[h], Wt());
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
} else if (r.nodeType === 8)
|
|
312
|
-
if (r.data ===
|
|
313
|
-
|
|
312
|
+
if (r.data === Ye)
|
|
313
|
+
l.push({ type: 2, index: o });
|
|
314
314
|
else {
|
|
315
315
|
let u = -1;
|
|
316
|
-
for (; (u = r.data.indexOf(
|
|
317
|
-
|
|
316
|
+
for (; (u = r.data.indexOf(tt, u + 1)) !== -1; )
|
|
317
|
+
l.push({ type: 7, index: o }), u += tt.length - 1;
|
|
318
318
|
}
|
|
319
319
|
o++;
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
322
|
static createElement(t, e) {
|
|
323
|
-
const n =
|
|
323
|
+
const n = bt.createElement("template");
|
|
324
324
|
return n.innerHTML = t, n;
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
|
-
function
|
|
328
|
-
var r, o, a,
|
|
329
|
-
if (t ===
|
|
327
|
+
function _t(i, t, e = i, n) {
|
|
328
|
+
var r, o, a, s;
|
|
329
|
+
if (t === W)
|
|
330
330
|
return t;
|
|
331
|
-
let
|
|
332
|
-
const d =
|
|
333
|
-
return (
|
|
331
|
+
let l = n !== void 0 ? (r = e._$Co) === null || r === void 0 ? void 0 : r[n] : e._$Cl;
|
|
332
|
+
const d = Gt(t) ? void 0 : t._$litDirective$;
|
|
333
|
+
return (l == null ? void 0 : l.constructor) !== d && ((o = l == null ? void 0 : l._$AO) === null || o === void 0 || o.call(l, !1), d === void 0 ? l = void 0 : (l = new d(i), l._$AT(i, e, n)), n !== void 0 ? ((a = (s = e)._$Co) !== null && a !== void 0 ? a : s._$Co = [])[n] = l : e._$Cl = l), l !== void 0 && (t = _t(i, l._$AS(i, t.values), l, n)), t;
|
|
334
334
|
}
|
|
335
|
-
class
|
|
335
|
+
class Ci {
|
|
336
336
|
constructor(t, e) {
|
|
337
337
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
338
338
|
}
|
|
@@ -344,17 +344,17 @@ class hi {
|
|
|
344
344
|
}
|
|
345
345
|
u(t) {
|
|
346
346
|
var e;
|
|
347
|
-
const { el: { content: n }, parts: r } = this._$AD, o = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e :
|
|
348
|
-
|
|
349
|
-
let a =
|
|
347
|
+
const { el: { content: n }, parts: r } = this._$AD, o = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : bt).importNode(n, !0);
|
|
348
|
+
yt.currentNode = o;
|
|
349
|
+
let a = yt.nextNode(), s = 0, l = 0, d = r[0];
|
|
350
350
|
for (; d !== void 0; ) {
|
|
351
|
-
if (
|
|
351
|
+
if (s === d.index) {
|
|
352
352
|
let p;
|
|
353
|
-
d.type === 2 ? p = new
|
|
353
|
+
d.type === 2 ? p = new Lt(a, a.nextSibling, this, t) : d.type === 1 ? p = new d.ctor(a, d.name, d.strings, this, t) : d.type === 6 && (p = new Ti(a, this, t)), this._$AV.push(p), d = r[++l];
|
|
354
354
|
}
|
|
355
|
-
|
|
355
|
+
s !== (d == null ? void 0 : d.index) && (a = yt.nextNode(), s++);
|
|
356
356
|
}
|
|
357
|
-
return
|
|
357
|
+
return yt.currentNode = bt, o;
|
|
358
358
|
}
|
|
359
359
|
v(t) {
|
|
360
360
|
let e = 0;
|
|
@@ -362,10 +362,10 @@ class hi {
|
|
|
362
362
|
n !== void 0 && (n.strings !== void 0 ? (n._$AI(t, n, e), e += n.strings.length - 2) : n._$AI(t[e])), e++;
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
|
-
class
|
|
365
|
+
class Lt {
|
|
366
366
|
constructor(t, e, n, r) {
|
|
367
367
|
var o;
|
|
368
|
-
this.type = 2, this._$AH =
|
|
368
|
+
this.type = 2, this._$AH = w, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = n, this.options = r, this._$Cp = (o = r == null ? void 0 : r.isConnected) === null || o === void 0 || o;
|
|
369
369
|
}
|
|
370
370
|
get _$AU() {
|
|
371
371
|
var t, e;
|
|
@@ -383,7 +383,7 @@ class Et {
|
|
|
383
383
|
return this._$AB;
|
|
384
384
|
}
|
|
385
385
|
_$AI(t, e = this) {
|
|
386
|
-
t =
|
|
386
|
+
t = _t(this, t, e), Gt(t) ? t === w || t == null || t === "" ? (this._$AH !== w && this._$AR(), this._$AH = w) : t !== this._$AH && t !== W && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : wi(t) ? this.T(t) : this._(t);
|
|
387
387
|
}
|
|
388
388
|
k(t) {
|
|
389
389
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -392,28 +392,28 @@ class Et {
|
|
|
392
392
|
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
|
393
393
|
}
|
|
394
394
|
_(t) {
|
|
395
|
-
this._$AH !==
|
|
395
|
+
this._$AH !== w && Gt(this._$AH) ? this._$AA.nextSibling.data = t : this.$(bt.createTextNode(t)), this._$AH = t;
|
|
396
396
|
}
|
|
397
397
|
g(t) {
|
|
398
398
|
var e;
|
|
399
|
-
const { values: n, _$litType$: r } = t, o = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el =
|
|
399
|
+
const { values: n, _$litType$: r } = t, o = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = Zt.createElement(r.h, this.options)), r);
|
|
400
400
|
if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === o)
|
|
401
401
|
this._$AH.v(n);
|
|
402
402
|
else {
|
|
403
|
-
const a = new
|
|
404
|
-
a.v(n), this.$(
|
|
403
|
+
const a = new Ci(o, this), s = a.u(this.options);
|
|
404
|
+
a.v(n), this.$(s), this._$AH = a;
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
407
|
_$AC(t) {
|
|
408
|
-
let e =
|
|
409
|
-
return e === void 0 &&
|
|
408
|
+
let e = oi.get(t.strings);
|
|
409
|
+
return e === void 0 && oi.set(t.strings, e = new Zt(t)), e;
|
|
410
410
|
}
|
|
411
411
|
T(t) {
|
|
412
|
-
|
|
412
|
+
Ei(this._$AH) || (this._$AH = [], this._$AR());
|
|
413
413
|
const e = this._$AH;
|
|
414
414
|
let n, r = 0;
|
|
415
415
|
for (const o of t)
|
|
416
|
-
r === e.length ? e.push(n = new
|
|
416
|
+
r === e.length ? e.push(n = new Lt(this.k(Wt()), this.k(Wt()), this, this.options)) : n = e[r], n._$AI(o), r++;
|
|
417
417
|
r < e.length && (this._$AR(n && n._$AB.nextSibling, r), e.length = r);
|
|
418
418
|
}
|
|
419
419
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
@@ -428,9 +428,9 @@ class Et {
|
|
|
428
428
|
this._$AM === void 0 && (this._$Cp = t, (e = this._$AP) === null || e === void 0 || e.call(this, t));
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
|
-
class
|
|
431
|
+
class qt {
|
|
432
432
|
constructor(t, e, n, r, o) {
|
|
433
|
-
this.type = 1, this._$AH =
|
|
433
|
+
this.type = 1, this._$AH = w, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = o, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(new String()), this.strings = n) : this._$AH = w;
|
|
434
434
|
}
|
|
435
435
|
get tagName() {
|
|
436
436
|
return this.element.tagName;
|
|
@@ -442,45 +442,45 @@ class Nt {
|
|
|
442
442
|
const o = this.strings;
|
|
443
443
|
let a = !1;
|
|
444
444
|
if (o === void 0)
|
|
445
|
-
t =
|
|
445
|
+
t = _t(this, t, e, 0), a = !Gt(t) || t !== this._$AH && t !== W, a && (this._$AH = t);
|
|
446
446
|
else {
|
|
447
|
-
const
|
|
448
|
-
let
|
|
449
|
-
for (t = o[0],
|
|
450
|
-
d =
|
|
447
|
+
const s = t;
|
|
448
|
+
let l, d;
|
|
449
|
+
for (t = o[0], l = 0; l < o.length - 1; l++)
|
|
450
|
+
d = _t(this, s[n + l], e, l), d === W && (d = this._$AH[l]), a || (a = !Gt(d) || d !== this._$AH[l]), d === w ? t = w : t !== w && (t += (d ?? "") + o[l + 1]), this._$AH[l] = d;
|
|
451
451
|
}
|
|
452
452
|
a && !r && this.j(t);
|
|
453
453
|
}
|
|
454
454
|
j(t) {
|
|
455
|
-
t ===
|
|
455
|
+
t === w ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
456
456
|
}
|
|
457
457
|
}
|
|
458
|
-
class
|
|
458
|
+
class $i extends qt {
|
|
459
459
|
constructor() {
|
|
460
460
|
super(...arguments), this.type = 3;
|
|
461
461
|
}
|
|
462
462
|
j(t) {
|
|
463
|
-
this.element[this.name] = t ===
|
|
463
|
+
this.element[this.name] = t === w ? void 0 : t;
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
const
|
|
467
|
-
class
|
|
466
|
+
const on = Tt ? Tt.emptyScript : "";
|
|
467
|
+
class Si extends qt {
|
|
468
468
|
constructor() {
|
|
469
469
|
super(...arguments), this.type = 4;
|
|
470
470
|
}
|
|
471
471
|
j(t) {
|
|
472
|
-
t && t !==
|
|
472
|
+
t && t !== w ? this.element.setAttribute(this.name, on) : this.element.removeAttribute(this.name);
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
|
-
class
|
|
475
|
+
class Di extends qt {
|
|
476
476
|
constructor(t, e, n, r, o) {
|
|
477
477
|
super(t, e, n, r, o), this.type = 5;
|
|
478
478
|
}
|
|
479
479
|
_$AI(t, e = this) {
|
|
480
480
|
var n;
|
|
481
|
-
if ((t = (n =
|
|
481
|
+
if ((t = (n = _t(this, t, e, 0)) !== null && n !== void 0 ? n : w) === W)
|
|
482
482
|
return;
|
|
483
|
-
const r = this._$AH, o = t ===
|
|
483
|
+
const r = this._$AH, o = t === w && r !== w || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, a = t !== w && (r === w || o);
|
|
484
484
|
o && this.element.removeEventListener(this.name, this, r), a && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
485
485
|
}
|
|
486
486
|
handleEvent(t) {
|
|
@@ -488,7 +488,7 @@ class pi extends Nt {
|
|
|
488
488
|
typeof this._$AH == "function" ? this._$AH.call((n = (e = this.options) === null || e === void 0 ? void 0 : e.host) !== null && n !== void 0 ? n : this.element, t) : this._$AH.handleEvent(t);
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
|
-
class
|
|
491
|
+
class Ti {
|
|
492
492
|
constructor(t, e, n) {
|
|
493
493
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = n;
|
|
494
494
|
}
|
|
@@ -496,18 +496,18 @@ class fi {
|
|
|
496
496
|
return this._$AM._$AU;
|
|
497
497
|
}
|
|
498
498
|
_$AI(t) {
|
|
499
|
-
|
|
499
|
+
_t(this, t);
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
const
|
|
503
|
-
|
|
504
|
-
const
|
|
502
|
+
const an = { O: he, P: tt, A: Ye, C: 1, M: Ai, L: Ci, D: wi, R: _t, I: Lt, V: qt, H: Si, N: Di, U: $i, F: Ti }, ai = ce.litHtmlPolyfillSupport;
|
|
503
|
+
ai == null || ai(Zt, Lt), ((Ee = ce.litHtmlVersions) !== null && Ee !== void 0 ? Ee : ce.litHtmlVersions = []).push("2.7.4");
|
|
504
|
+
const sn = (i, t, e) => {
|
|
505
505
|
var n, r;
|
|
506
506
|
const o = (n = e == null ? void 0 : e.renderBefore) !== null && n !== void 0 ? n : t;
|
|
507
507
|
let a = o._$litPart$;
|
|
508
508
|
if (a === void 0) {
|
|
509
|
-
const
|
|
510
|
-
o._$litPart$ = a = new
|
|
509
|
+
const s = (r = e == null ? void 0 : e.renderBefore) !== null && r !== void 0 ? r : null;
|
|
510
|
+
o._$litPart$ = a = new Lt(t.insertBefore(Wt(), s), s, void 0, e ?? {});
|
|
511
511
|
}
|
|
512
512
|
return a._$AI(i), a;
|
|
513
513
|
};
|
|
@@ -516,8 +516,8 @@ const Wi = (i, t, e) => {
|
|
|
516
516
|
* Copyright 2017 Google LLC
|
|
517
517
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
518
518
|
*/
|
|
519
|
-
var
|
|
520
|
-
let
|
|
519
|
+
var xe, Ae;
|
|
520
|
+
let St = class extends At {
|
|
521
521
|
constructor() {
|
|
522
522
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
523
523
|
}
|
|
@@ -528,7 +528,7 @@ let vt = class extends ft {
|
|
|
528
528
|
}
|
|
529
529
|
update(t) {
|
|
530
530
|
const e = this.render();
|
|
531
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
531
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = sn(e, this.renderRoot, this.renderOptions);
|
|
532
532
|
}
|
|
533
533
|
connectedCallback() {
|
|
534
534
|
var t;
|
|
@@ -539,19 +539,19 @@ let vt = class extends ft {
|
|
|
539
539
|
super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1);
|
|
540
540
|
}
|
|
541
541
|
render() {
|
|
542
|
-
return
|
|
542
|
+
return W;
|
|
543
543
|
}
|
|
544
544
|
};
|
|
545
|
-
|
|
546
|
-
const
|
|
547
|
-
|
|
548
|
-
((
|
|
545
|
+
St.finalized = !0, St._$litElement$ = !0, (xe = globalThis.litElementHydrateSupport) === null || xe === void 0 || xe.call(globalThis, { LitElement: St });
|
|
546
|
+
const si = globalThis.litElementPolyfillSupport;
|
|
547
|
+
si == null || si({ LitElement: St });
|
|
548
|
+
((Ae = globalThis.litElementVersions) !== null && Ae !== void 0 ? Ae : globalThis.litElementVersions = []).push("3.3.2");
|
|
549
549
|
/**
|
|
550
550
|
* @license
|
|
551
551
|
* Copyright 2017 Google LLC
|
|
552
552
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
553
553
|
*/
|
|
554
|
-
const
|
|
554
|
+
const Oi = (i) => (t) => typeof t == "function" ? ((e, n) => (customElements.define(e, n), n))(i, t) : ((e, n) => {
|
|
555
555
|
const { kind: r, elements: o } = n;
|
|
556
556
|
return { kind: r, elements: o, finisher(a) {
|
|
557
557
|
customElements.define(e, a);
|
|
@@ -562,40 +562,40 @@ const gi = (i) => (t) => typeof t == "function" ? ((e, n) => (customElements.def
|
|
|
562
562
|
* Copyright 2017 Google LLC
|
|
563
563
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
564
564
|
*/
|
|
565
|
-
const
|
|
565
|
+
const ln = (i, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) {
|
|
566
566
|
e.createProperty(t.key, i);
|
|
567
567
|
} } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
|
|
568
568
|
typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
|
|
569
569
|
}, finisher(e) {
|
|
570
570
|
e.createProperty(t.key, i);
|
|
571
|
-
} },
|
|
571
|
+
} }, dn = (i, t, e) => {
|
|
572
572
|
t.constructor.createProperty(e, i);
|
|
573
573
|
};
|
|
574
|
-
function
|
|
575
|
-
return (t, e) => e !== void 0 ?
|
|
574
|
+
function N(i) {
|
|
575
|
+
return (t, e) => e !== void 0 ? dn(i, t, e) : ln(i, t);
|
|
576
576
|
}
|
|
577
577
|
/**
|
|
578
578
|
* @license
|
|
579
579
|
* Copyright 2017 Google LLC
|
|
580
580
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
581
581
|
*/
|
|
582
|
-
function
|
|
583
|
-
return
|
|
582
|
+
function Et(i) {
|
|
583
|
+
return N({ ...i, state: !0 });
|
|
584
584
|
}
|
|
585
585
|
/**
|
|
586
586
|
* @license
|
|
587
587
|
* Copyright 2021 Google LLC
|
|
588
588
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
589
589
|
*/
|
|
590
|
-
var
|
|
591
|
-
((
|
|
590
|
+
var Ce;
|
|
591
|
+
((Ce = window.HTMLSlotElement) === null || Ce === void 0 ? void 0 : Ce.prototype.assignedElements) != null;
|
|
592
592
|
/**
|
|
593
593
|
* @license
|
|
594
594
|
* Copyright 2017 Google LLC
|
|
595
595
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
596
596
|
*/
|
|
597
|
-
const
|
|
598
|
-
class
|
|
597
|
+
const mt = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Li = (i) => (...t) => ({ _$litDirective$: i, values: t });
|
|
598
|
+
class Hi {
|
|
599
599
|
constructor(t) {
|
|
600
600
|
}
|
|
601
601
|
get _$AU() {
|
|
@@ -616,19 +616,19 @@ class vi {
|
|
|
616
616
|
* Copyright 2020 Google LLC
|
|
617
617
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
618
618
|
*/
|
|
619
|
-
const { I:
|
|
619
|
+
const { I: un } = an, cn = (i) => i.strings === void 0, li = () => document.createComment(""), Vt = (i, t, e) => {
|
|
620
620
|
var n;
|
|
621
621
|
const r = i._$AA.parentNode, o = t === void 0 ? i._$AB : t._$AA;
|
|
622
622
|
if (e === void 0) {
|
|
623
|
-
const a = r.insertBefore(
|
|
624
|
-
e = new
|
|
623
|
+
const a = r.insertBefore(li(), o), s = r.insertBefore(li(), o);
|
|
624
|
+
e = new un(a, s, i, i.options);
|
|
625
625
|
} else {
|
|
626
|
-
const a = e._$AB.nextSibling,
|
|
627
|
-
if (
|
|
626
|
+
const a = e._$AB.nextSibling, s = e._$AM, l = s !== i;
|
|
627
|
+
if (l) {
|
|
628
628
|
let d;
|
|
629
|
-
(n = e._$AQ) === null || n === void 0 || n.call(e, i), e._$AM = i, e._$AP !== void 0 && (d = i._$AU) !==
|
|
629
|
+
(n = e._$AQ) === null || n === void 0 || n.call(e, i), e._$AM = i, e._$AP !== void 0 && (d = i._$AU) !== s._$AU && e._$AP(d);
|
|
630
630
|
}
|
|
631
|
-
if (a !== o ||
|
|
631
|
+
if (a !== o || l) {
|
|
632
632
|
let d = e._$AA;
|
|
633
633
|
for (; d !== a; ) {
|
|
634
634
|
const p = d.nextSibling;
|
|
@@ -637,7 +637,7 @@ const { I: qi } = Yi, Ki = (i) => i.strings === void 0, We = () => document.crea
|
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
639
|
return e;
|
|
640
|
-
},
|
|
640
|
+
}, pt = (i, t, e = i) => (i._$AI(t, e), i), hn = {}, Ii = (i, t = hn) => i._$AH = t, pn = (i) => i._$AH, $e = (i) => {
|
|
641
641
|
var t;
|
|
642
642
|
(t = i._$AP) === null || t === void 0 || t.call(i, !1, !0);
|
|
643
643
|
let e = i._$AA;
|
|
@@ -652,14 +652,14 @@ const { I: qi } = Yi, Ki = (i) => i.strings === void 0, We = () => document.crea
|
|
|
652
652
|
* Copyright 2017 Google LLC
|
|
653
653
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
654
654
|
*/
|
|
655
|
-
const
|
|
655
|
+
const di = (i, t, e) => {
|
|
656
656
|
const n = /* @__PURE__ */ new Map();
|
|
657
657
|
for (let r = t; r <= e; r++)
|
|
658
658
|
n.set(i[r], r);
|
|
659
659
|
return n;
|
|
660
|
-
},
|
|
660
|
+
}, Ve = Li(class extends Hi {
|
|
661
661
|
constructor(i) {
|
|
662
|
-
if (super(i), i.type !==
|
|
662
|
+
if (super(i), i.type !== mt.CHILD)
|
|
663
663
|
throw Error("repeat() can only be used in text expressions");
|
|
664
664
|
}
|
|
665
665
|
dt(i, t, e) {
|
|
@@ -667,8 +667,8 @@ const Ge = (i, t, e) => {
|
|
|
667
667
|
e === void 0 ? e = t : t !== void 0 && (n = t);
|
|
668
668
|
const r = [], o = [];
|
|
669
669
|
let a = 0;
|
|
670
|
-
for (const
|
|
671
|
-
r[a] = n ? n(
|
|
670
|
+
for (const s of i)
|
|
671
|
+
r[a] = n ? n(s, a) : a, o[a] = e(s, a), a++;
|
|
672
672
|
return { values: o, keys: r };
|
|
673
673
|
}
|
|
674
674
|
render(i, t, e) {
|
|
@@ -676,46 +676,46 @@ const Ge = (i, t, e) => {
|
|
|
676
676
|
}
|
|
677
677
|
update(i, [t, e, n]) {
|
|
678
678
|
var r;
|
|
679
|
-
const o =
|
|
679
|
+
const o = pn(i), { values: a, keys: s } = this.dt(t, e, n);
|
|
680
680
|
if (!Array.isArray(o))
|
|
681
|
-
return this.ht =
|
|
682
|
-
const
|
|
683
|
-
let p, u,
|
|
684
|
-
for (;
|
|
685
|
-
if (o[
|
|
686
|
-
|
|
687
|
-
else if (o[
|
|
688
|
-
|
|
689
|
-
else if (
|
|
690
|
-
d[f] =
|
|
691
|
-
else if (
|
|
692
|
-
d[
|
|
693
|
-
else if (
|
|
694
|
-
d[
|
|
695
|
-
else if (
|
|
696
|
-
d[f] =
|
|
697
|
-
else if (p === void 0 && (p =
|
|
698
|
-
if (p.has(
|
|
699
|
-
const S = u.get(
|
|
700
|
-
if (
|
|
701
|
-
const
|
|
702
|
-
|
|
681
|
+
return this.ht = s, a;
|
|
682
|
+
const l = (r = this.ht) !== null && r !== void 0 ? r : this.ht = [], d = [];
|
|
683
|
+
let p, u, h = 0, g = o.length - 1, f = 0, m = a.length - 1;
|
|
684
|
+
for (; h <= g && f <= m; )
|
|
685
|
+
if (o[h] === null)
|
|
686
|
+
h++;
|
|
687
|
+
else if (o[g] === null)
|
|
688
|
+
g--;
|
|
689
|
+
else if (l[h] === s[f])
|
|
690
|
+
d[f] = pt(o[h], a[f]), h++, f++;
|
|
691
|
+
else if (l[g] === s[m])
|
|
692
|
+
d[m] = pt(o[g], a[m]), g--, m--;
|
|
693
|
+
else if (l[h] === s[m])
|
|
694
|
+
d[m] = pt(o[h], a[m]), Vt(i, d[m + 1], o[h]), h++, m--;
|
|
695
|
+
else if (l[g] === s[f])
|
|
696
|
+
d[f] = pt(o[g], a[f]), Vt(i, o[h], o[g]), g--, f++;
|
|
697
|
+
else if (p === void 0 && (p = di(s, f, m), u = di(l, h, g)), p.has(l[h]))
|
|
698
|
+
if (p.has(l[g])) {
|
|
699
|
+
const S = u.get(s[f]), V = S !== void 0 ? o[S] : null;
|
|
700
|
+
if (V === null) {
|
|
701
|
+
const O = Vt(i, o[h]);
|
|
702
|
+
pt(O, a[f]), d[f] = O;
|
|
703
703
|
} else
|
|
704
|
-
d[f] =
|
|
704
|
+
d[f] = pt(V, a[f]), Vt(i, o[h], V), o[S] = null;
|
|
705
705
|
f++;
|
|
706
706
|
} else
|
|
707
|
-
|
|
707
|
+
$e(o[g]), g--;
|
|
708
708
|
else
|
|
709
|
-
|
|
710
|
-
for (; f <=
|
|
711
|
-
const S =
|
|
712
|
-
|
|
709
|
+
$e(o[h]), h++;
|
|
710
|
+
for (; f <= m; ) {
|
|
711
|
+
const S = Vt(i, d[m + 1]);
|
|
712
|
+
pt(S, a[f]), d[f++] = S;
|
|
713
713
|
}
|
|
714
|
-
for (;
|
|
715
|
-
const S = o[
|
|
716
|
-
S !== null &&
|
|
714
|
+
for (; h <= g; ) {
|
|
715
|
+
const S = o[h++];
|
|
716
|
+
S !== null && $e(S);
|
|
717
717
|
}
|
|
718
|
-
return this.ht =
|
|
718
|
+
return this.ht = s, Ii(i, d), W;
|
|
719
719
|
}
|
|
720
720
|
});
|
|
721
721
|
/**
|
|
@@ -723,29 +723,29 @@ const Ge = (i, t, e) => {
|
|
|
723
723
|
* Copyright 2020 Google LLC
|
|
724
724
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
725
725
|
*/
|
|
726
|
-
const
|
|
726
|
+
const Be = Li(class extends Hi {
|
|
727
727
|
constructor(i) {
|
|
728
|
-
if (super(i), i.type !==
|
|
728
|
+
if (super(i), i.type !== mt.PROPERTY && i.type !== mt.ATTRIBUTE && i.type !== mt.BOOLEAN_ATTRIBUTE)
|
|
729
729
|
throw Error("The `live` directive is not allowed on child or event bindings");
|
|
730
|
-
if (!
|
|
730
|
+
if (!cn(i))
|
|
731
731
|
throw Error("`live` bindings can only contain a single expression");
|
|
732
732
|
}
|
|
733
733
|
render(i) {
|
|
734
734
|
return i;
|
|
735
735
|
}
|
|
736
736
|
update(i, [t]) {
|
|
737
|
-
if (t ===
|
|
737
|
+
if (t === W || t === w)
|
|
738
738
|
return t;
|
|
739
739
|
const e = i.element, n = i.name;
|
|
740
|
-
if (i.type ===
|
|
740
|
+
if (i.type === mt.PROPERTY) {
|
|
741
741
|
if (t === e[n])
|
|
742
|
-
return
|
|
743
|
-
} else if (i.type ===
|
|
742
|
+
return W;
|
|
743
|
+
} else if (i.type === mt.BOOLEAN_ATTRIBUTE) {
|
|
744
744
|
if (!!t === e.hasAttribute(n))
|
|
745
|
-
return
|
|
746
|
-
} else if (i.type ===
|
|
747
|
-
return
|
|
748
|
-
return
|
|
745
|
+
return W;
|
|
746
|
+
} else if (i.type === mt.ATTRIBUTE && e.getAttribute(n) === t + "")
|
|
747
|
+
return W;
|
|
748
|
+
return Ii(i), t;
|
|
749
749
|
}
|
|
750
750
|
});
|
|
751
751
|
/**
|
|
@@ -753,7 +753,7 @@ const Ce = mi(class extends vi {
|
|
|
753
753
|
* Copyright 2021 Google LLC
|
|
754
754
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
755
755
|
*/
|
|
756
|
-
function
|
|
756
|
+
function Pi(i, t, e) {
|
|
757
757
|
return i ? t() : e == null ? void 0 : e();
|
|
758
758
|
}
|
|
759
759
|
/**!
|
|
@@ -762,7 +762,7 @@ function bi(i, t, e) {
|
|
|
762
762
|
* @author owenm <owen23355@gmail.com>
|
|
763
763
|
* @license MIT
|
|
764
764
|
*/
|
|
765
|
-
function
|
|
765
|
+
function ui(i, t) {
|
|
766
766
|
var e = Object.keys(i);
|
|
767
767
|
if (Object.getOwnPropertySymbols) {
|
|
768
768
|
var n = Object.getOwnPropertySymbols(i);
|
|
@@ -772,26 +772,26 @@ function Ze(i, t) {
|
|
|
772
772
|
}
|
|
773
773
|
return e;
|
|
774
774
|
}
|
|
775
|
-
function
|
|
775
|
+
function K(i) {
|
|
776
776
|
for (var t = 1; t < arguments.length; t++) {
|
|
777
777
|
var e = arguments[t] != null ? arguments[t] : {};
|
|
778
|
-
t % 2 ?
|
|
779
|
-
|
|
780
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(e)) :
|
|
778
|
+
t % 2 ? ui(Object(e), !0).forEach(function(n) {
|
|
779
|
+
fn(i, n, e[n]);
|
|
780
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(e)) : ui(Object(e)).forEach(function(n) {
|
|
781
781
|
Object.defineProperty(i, n, Object.getOwnPropertyDescriptor(e, n));
|
|
782
782
|
});
|
|
783
783
|
}
|
|
784
784
|
return i;
|
|
785
785
|
}
|
|
786
|
-
function
|
|
786
|
+
function oe(i) {
|
|
787
787
|
"@babel/helpers - typeof";
|
|
788
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ?
|
|
788
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? oe = function(t) {
|
|
789
789
|
return typeof t;
|
|
790
|
-
} :
|
|
790
|
+
} : oe = function(t) {
|
|
791
791
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
792
|
-
},
|
|
792
|
+
}, oe(i);
|
|
793
793
|
}
|
|
794
|
-
function
|
|
794
|
+
function fn(i, t, e) {
|
|
795
795
|
return t in i ? Object.defineProperty(i, t, {
|
|
796
796
|
value: e,
|
|
797
797
|
enumerable: !0,
|
|
@@ -799,17 +799,17 @@ function tn(i, t, e) {
|
|
|
799
799
|
writable: !0
|
|
800
800
|
}) : i[t] = e, i;
|
|
801
801
|
}
|
|
802
|
-
function
|
|
803
|
-
return
|
|
802
|
+
function it() {
|
|
803
|
+
return it = Object.assign || function(i) {
|
|
804
804
|
for (var t = 1; t < arguments.length; t++) {
|
|
805
805
|
var e = arguments[t];
|
|
806
806
|
for (var n in e)
|
|
807
807
|
Object.prototype.hasOwnProperty.call(e, n) && (i[n] = e[n]);
|
|
808
808
|
}
|
|
809
809
|
return i;
|
|
810
|
-
},
|
|
810
|
+
}, it.apply(this, arguments);
|
|
811
811
|
}
|
|
812
|
-
function
|
|
812
|
+
function gn(i, t) {
|
|
813
813
|
if (i == null)
|
|
814
814
|
return {};
|
|
815
815
|
var e = {}, n = Object.keys(i), r, o;
|
|
@@ -817,10 +817,10 @@ function en(i, t) {
|
|
|
817
817
|
r = n[o], !(t.indexOf(r) >= 0) && (e[r] = i[r]);
|
|
818
818
|
return e;
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function mn(i, t) {
|
|
821
821
|
if (i == null)
|
|
822
822
|
return {};
|
|
823
|
-
var e =
|
|
823
|
+
var e = gn(i, t), n, r;
|
|
824
824
|
if (Object.getOwnPropertySymbols) {
|
|
825
825
|
var o = Object.getOwnPropertySymbols(i);
|
|
826
826
|
for (r = 0; r < o.length; r++)
|
|
@@ -828,22 +828,22 @@ function nn(i, t) {
|
|
|
828
828
|
}
|
|
829
829
|
return e;
|
|
830
830
|
}
|
|
831
|
-
var
|
|
832
|
-
function
|
|
831
|
+
var vn = "1.15.0";
|
|
832
|
+
function et(i) {
|
|
833
833
|
if (typeof window < "u" && window.navigator)
|
|
834
834
|
return !!/* @__PURE__ */ navigator.userAgent.match(i);
|
|
835
835
|
}
|
|
836
|
-
var
|
|
836
|
+
var nt = et(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Kt = et(/Edge/i), ci = et(/firefox/i), Ut = et(/safari/i) && !et(/chrome/i) && !et(/android/i), Mi = et(/iP(ad|od|hone)/i), ki = et(/chrome/i) && et(/android/i), Ni = {
|
|
837
837
|
capture: !1,
|
|
838
838
|
passive: !1
|
|
839
839
|
};
|
|
840
|
-
function w(i, t, e) {
|
|
841
|
-
i.addEventListener(t, e, !tt && wi);
|
|
842
|
-
}
|
|
843
840
|
function E(i, t, e) {
|
|
844
|
-
i.
|
|
841
|
+
i.addEventListener(t, e, !nt && Ni);
|
|
842
|
+
}
|
|
843
|
+
function _(i, t, e) {
|
|
844
|
+
i.removeEventListener(t, e, !nt && Ni);
|
|
845
845
|
}
|
|
846
|
-
function
|
|
846
|
+
function pe(i, t) {
|
|
847
847
|
if (t) {
|
|
848
848
|
if (t[0] === ">" && (t = t.substring(1)), i)
|
|
849
849
|
try {
|
|
@@ -859,32 +859,32 @@ function Jt(i, t) {
|
|
|
859
859
|
return !1;
|
|
860
860
|
}
|
|
861
861
|
}
|
|
862
|
-
function
|
|
862
|
+
function yn(i) {
|
|
863
863
|
return i.host && i !== document && i.host.nodeType ? i.host : i.parentNode;
|
|
864
864
|
}
|
|
865
|
-
function
|
|
865
|
+
function Z(i, t, e, n) {
|
|
866
866
|
if (i) {
|
|
867
867
|
e = e || document;
|
|
868
868
|
do {
|
|
869
|
-
if (t != null && (t[0] === ">" ? i.parentNode === e &&
|
|
869
|
+
if (t != null && (t[0] === ">" ? i.parentNode === e && pe(i, t) : pe(i, t)) || n && i === e)
|
|
870
870
|
return i;
|
|
871
871
|
if (i === e)
|
|
872
872
|
break;
|
|
873
|
-
} while (i =
|
|
873
|
+
} while (i = yn(i));
|
|
874
874
|
}
|
|
875
875
|
return null;
|
|
876
876
|
}
|
|
877
|
-
var
|
|
878
|
-
function
|
|
877
|
+
var hi = /\s+/g;
|
|
878
|
+
function F(i, t, e) {
|
|
879
879
|
if (i && t)
|
|
880
880
|
if (i.classList)
|
|
881
881
|
i.classList[e ? "add" : "remove"](t);
|
|
882
882
|
else {
|
|
883
|
-
var n = (" " + i.className + " ").replace(
|
|
884
|
-
i.className = (n + (e ? " " + t : "")).replace(
|
|
883
|
+
var n = (" " + i.className + " ").replace(hi, " ").replace(" " + t + " ", " ");
|
|
884
|
+
i.className = (n + (e ? " " + t : "")).replace(hi, " ");
|
|
885
885
|
}
|
|
886
886
|
}
|
|
887
|
-
function
|
|
887
|
+
function v(i, t, e) {
|
|
888
888
|
var n = i && i.style;
|
|
889
889
|
if (n) {
|
|
890
890
|
if (e === void 0)
|
|
@@ -892,19 +892,19 @@ function g(i, t, e) {
|
|
|
892
892
|
!(t in n) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), n[t] = e + (typeof e == "string" ? "" : "px");
|
|
893
893
|
}
|
|
894
894
|
}
|
|
895
|
-
function
|
|
895
|
+
function Dt(i, t) {
|
|
896
896
|
var e = "";
|
|
897
897
|
if (typeof i == "string")
|
|
898
898
|
e = i;
|
|
899
899
|
else
|
|
900
900
|
do {
|
|
901
|
-
var n =
|
|
901
|
+
var n = v(i, "transform");
|
|
902
902
|
n && n !== "none" && (e = n + " " + e);
|
|
903
903
|
} while (!t && (i = i.parentNode));
|
|
904
904
|
var r = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
905
905
|
return r && new r(e);
|
|
906
906
|
}
|
|
907
|
-
function
|
|
907
|
+
function Vi(i, t, e) {
|
|
908
908
|
if (i) {
|
|
909
909
|
var n = i.getElementsByTagName(t), r = 0, o = n.length;
|
|
910
910
|
if (e)
|
|
@@ -914,49 +914,49 @@ function xi(i, t, e) {
|
|
|
914
914
|
}
|
|
915
915
|
return [];
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function q() {
|
|
918
918
|
var i = document.scrollingElement;
|
|
919
919
|
return i || document.documentElement;
|
|
920
920
|
}
|
|
921
|
-
function
|
|
921
|
+
function T(i, t, e, n, r) {
|
|
922
922
|
if (!(!i.getBoundingClientRect && i !== window)) {
|
|
923
|
-
var o, a,
|
|
924
|
-
if (i !== window && i.parentNode && i !==
|
|
923
|
+
var o, a, s, l, d, p, u;
|
|
924
|
+
if (i !== window && i.parentNode && i !== q() ? (o = i.getBoundingClientRect(), a = o.top, s = o.left, l = o.bottom, d = o.right, p = o.height, u = o.width) : (a = 0, s = 0, l = window.innerHeight, d = window.innerWidth, p = window.innerHeight, u = window.innerWidth), (t || e) && i !== window && (r = r || i.parentNode, !nt))
|
|
925
925
|
do
|
|
926
|
-
if (r && r.getBoundingClientRect && (
|
|
927
|
-
var
|
|
928
|
-
a -=
|
|
926
|
+
if (r && r.getBoundingClientRect && (v(r, "transform") !== "none" || e && v(r, "position") !== "static")) {
|
|
927
|
+
var h = r.getBoundingClientRect();
|
|
928
|
+
a -= h.top + parseInt(v(r, "border-top-width")), s -= h.left + parseInt(v(r, "border-left-width")), l = a + o.height, d = s + o.width;
|
|
929
929
|
break;
|
|
930
930
|
}
|
|
931
931
|
while (r = r.parentNode);
|
|
932
932
|
if (n && i !== window) {
|
|
933
|
-
var
|
|
934
|
-
|
|
933
|
+
var g = Dt(r || i), f = g && g.a, m = g && g.d;
|
|
934
|
+
g && (a /= m, s /= f, u /= f, p /= m, l = a + p, d = s + u);
|
|
935
935
|
}
|
|
936
936
|
return {
|
|
937
937
|
top: a,
|
|
938
|
-
left:
|
|
939
|
-
bottom:
|
|
938
|
+
left: s,
|
|
939
|
+
bottom: l,
|
|
940
940
|
right: d,
|
|
941
941
|
width: u,
|
|
942
942
|
height: p
|
|
943
943
|
};
|
|
944
944
|
}
|
|
945
945
|
}
|
|
946
|
-
function
|
|
947
|
-
for (var n =
|
|
948
|
-
var o =
|
|
946
|
+
function pi(i, t, e) {
|
|
947
|
+
for (var n = lt(i, !0), r = T(i)[t]; n; ) {
|
|
948
|
+
var o = T(n)[e], a = void 0;
|
|
949
949
|
if (e === "top" || e === "left" ? a = r >= o : a = r <= o, !a)
|
|
950
950
|
return n;
|
|
951
|
-
if (n ===
|
|
951
|
+
if (n === q())
|
|
952
952
|
break;
|
|
953
|
-
n =
|
|
953
|
+
n = lt(n, !1);
|
|
954
954
|
}
|
|
955
955
|
return !1;
|
|
956
956
|
}
|
|
957
|
-
function
|
|
957
|
+
function Ot(i, t, e, n) {
|
|
958
958
|
for (var r = 0, o = 0, a = i.children; o < a.length; ) {
|
|
959
|
-
if (a[o].style.display !== "none" && a[o] !== y.ghost && (n || a[o] !== y.dragged) &&
|
|
959
|
+
if (a[o].style.display !== "none" && a[o] !== y.ghost && (n || a[o] !== y.dragged) && Z(a[o], e.draggable, i, !1)) {
|
|
960
960
|
if (r === t)
|
|
961
961
|
return a[o];
|
|
962
962
|
r++;
|
|
@@ -965,29 +965,29 @@ function _t(i, t, e, n) {
|
|
|
965
965
|
}
|
|
966
966
|
return null;
|
|
967
967
|
}
|
|
968
|
-
function
|
|
969
|
-
for (var e = i.lastElementChild; e && (e === y.ghost ||
|
|
968
|
+
function Xe(i, t) {
|
|
969
|
+
for (var e = i.lastElementChild; e && (e === y.ghost || v(e, "display") === "none" || t && !pe(e, t)); )
|
|
970
970
|
e = e.previousElementSibling;
|
|
971
971
|
return e || null;
|
|
972
972
|
}
|
|
973
|
-
function
|
|
973
|
+
function j(i, t) {
|
|
974
974
|
var e = 0;
|
|
975
975
|
if (!i || !i.parentNode)
|
|
976
976
|
return -1;
|
|
977
977
|
for (; i = i.previousElementSibling; )
|
|
978
|
-
i.nodeName.toUpperCase() !== "TEMPLATE" && i !== y.clone && (!t ||
|
|
978
|
+
i.nodeName.toUpperCase() !== "TEMPLATE" && i !== y.clone && (!t || pe(i, t)) && e++;
|
|
979
979
|
return e;
|
|
980
980
|
}
|
|
981
|
-
function
|
|
982
|
-
var t = 0, e = 0, n =
|
|
981
|
+
function fi(i) {
|
|
982
|
+
var t = 0, e = 0, n = q();
|
|
983
983
|
if (i)
|
|
984
984
|
do {
|
|
985
|
-
var r =
|
|
985
|
+
var r = Dt(i), o = r.a, a = r.d;
|
|
986
986
|
t += i.scrollLeft * o, e += i.scrollTop * a;
|
|
987
987
|
} while (i !== n && (i = i.parentNode));
|
|
988
988
|
return [t, e];
|
|
989
989
|
}
|
|
990
|
-
function
|
|
990
|
+
function bn(i, t) {
|
|
991
991
|
for (var e in i)
|
|
992
992
|
if (i.hasOwnProperty(e)) {
|
|
993
993
|
for (var n in t)
|
|
@@ -996,67 +996,70 @@ function an(i, t) {
|
|
|
996
996
|
}
|
|
997
997
|
return -1;
|
|
998
998
|
}
|
|
999
|
-
function
|
|
999
|
+
function lt(i, t) {
|
|
1000
1000
|
if (!i || !i.getBoundingClientRect)
|
|
1001
|
-
return
|
|
1001
|
+
return q();
|
|
1002
1002
|
var e = i, n = !1;
|
|
1003
1003
|
do
|
|
1004
1004
|
if (e.clientWidth < e.scrollWidth || e.clientHeight < e.scrollHeight) {
|
|
1005
|
-
var r =
|
|
1005
|
+
var r = v(e);
|
|
1006
1006
|
if (e.clientWidth < e.scrollWidth && (r.overflowX == "auto" || r.overflowX == "scroll") || e.clientHeight < e.scrollHeight && (r.overflowY == "auto" || r.overflowY == "scroll")) {
|
|
1007
1007
|
if (!e.getBoundingClientRect || e === document.body)
|
|
1008
|
-
return
|
|
1008
|
+
return q();
|
|
1009
1009
|
if (n || t)
|
|
1010
1010
|
return e;
|
|
1011
1011
|
n = !0;
|
|
1012
1012
|
}
|
|
1013
1013
|
}
|
|
1014
1014
|
while (e = e.parentNode);
|
|
1015
|
-
return
|
|
1015
|
+
return q();
|
|
1016
1016
|
}
|
|
1017
|
-
function
|
|
1017
|
+
function _n(i, t) {
|
|
1018
1018
|
if (i && t)
|
|
1019
1019
|
for (var e in t)
|
|
1020
1020
|
t.hasOwnProperty(e) && (i[e] = t[e]);
|
|
1021
1021
|
return i;
|
|
1022
1022
|
}
|
|
1023
|
-
function
|
|
1023
|
+
function Se(i, t) {
|
|
1024
1024
|
return Math.round(i.top) === Math.round(t.top) && Math.round(i.left) === Math.round(t.left) && Math.round(i.height) === Math.round(t.height) && Math.round(i.width) === Math.round(t.width);
|
|
1025
1025
|
}
|
|
1026
|
-
var
|
|
1027
|
-
function
|
|
1026
|
+
var zt;
|
|
1027
|
+
function Bi(i, t) {
|
|
1028
1028
|
return function() {
|
|
1029
|
-
if (!
|
|
1029
|
+
if (!zt) {
|
|
1030
1030
|
var e = arguments, n = this;
|
|
1031
|
-
e.length === 1 ? i.call(n, e[0]) : i.apply(n, e),
|
|
1032
|
-
|
|
1031
|
+
e.length === 1 ? i.call(n, e[0]) : i.apply(n, e), zt = setTimeout(function() {
|
|
1032
|
+
zt = void 0;
|
|
1033
1033
|
}, t);
|
|
1034
1034
|
}
|
|
1035
1035
|
};
|
|
1036
1036
|
}
|
|
1037
|
-
function
|
|
1037
|
+
function En() {
|
|
1038
|
+
clearTimeout(zt), zt = void 0;
|
|
1039
|
+
}
|
|
1040
|
+
function Ri(i, t, e) {
|
|
1038
1041
|
i.scrollLeft += t, i.scrollTop += e;
|
|
1039
1042
|
}
|
|
1040
|
-
function
|
|
1043
|
+
function Fi(i) {
|
|
1041
1044
|
var t = window.Polymer, e = window.jQuery || window.Zepto;
|
|
1042
1045
|
return t && t.dom ? t.dom(i).cloneNode(!0) : e ? e(i).clone(!0)[0] : i.cloneNode(!0);
|
|
1043
1046
|
}
|
|
1044
|
-
var
|
|
1045
|
-
function
|
|
1047
|
+
var z = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
1048
|
+
function wn() {
|
|
1046
1049
|
var i = [], t;
|
|
1047
1050
|
return {
|
|
1048
1051
|
captureAnimationState: function() {
|
|
1049
1052
|
if (i = [], !!this.options.animation) {
|
|
1050
1053
|
var n = [].slice.call(this.el.children);
|
|
1051
1054
|
n.forEach(function(r) {
|
|
1052
|
-
if (!(
|
|
1055
|
+
if (!(v(r, "display") === "none" || r === y.ghost)) {
|
|
1053
1056
|
i.push({
|
|
1054
1057
|
target: r,
|
|
1055
|
-
rect:
|
|
1058
|
+
rect: T(r)
|
|
1056
1059
|
});
|
|
1057
|
-
var o =
|
|
1060
|
+
var o = K({}, i[i.length - 1].rect);
|
|
1058
1061
|
if (r.thisAnimationDuration) {
|
|
1059
|
-
var a =
|
|
1062
|
+
var a = Dt(r, !0);
|
|
1060
1063
|
a && (o.top -= a.f, o.left -= a.e);
|
|
1061
1064
|
}
|
|
1062
1065
|
r.fromRect = o;
|
|
@@ -1068,7 +1071,7 @@ function hn() {
|
|
|
1068
1071
|
i.push(n);
|
|
1069
1072
|
},
|
|
1070
1073
|
removeAnimationState: function(n) {
|
|
1071
|
-
i.splice(
|
|
1074
|
+
i.splice(bn(i, {
|
|
1072
1075
|
target: n
|
|
1073
1076
|
}), 1);
|
|
1074
1077
|
},
|
|
@@ -1079,43 +1082,43 @@ function hn() {
|
|
|
1079
1082
|
return;
|
|
1080
1083
|
}
|
|
1081
1084
|
var o = !1, a = 0;
|
|
1082
|
-
i.forEach(function(
|
|
1083
|
-
var
|
|
1084
|
-
|
|
1085
|
-
(f.top - u.top) / (f.left - u.left) === (p.top - u.top) / (p.left - u.left) && (
|
|
1085
|
+
i.forEach(function(s) {
|
|
1086
|
+
var l = 0, d = s.target, p = d.fromRect, u = T(d), h = d.prevFromRect, g = d.prevToRect, f = s.rect, m = Dt(d, !0);
|
|
1087
|
+
m && (u.top -= m.f, u.left -= m.e), d.toRect = u, d.thisAnimationDuration && Se(h, u) && !Se(p, u) && // Make sure animatingRect is on line between toRect & fromRect
|
|
1088
|
+
(f.top - u.top) / (f.left - u.left) === (p.top - u.top) / (p.left - u.left) && (l = An(f, h, g, r.options)), Se(u, p) || (d.prevFromRect = p, d.prevToRect = u, l || (l = r.options.animation), r.animate(d, f, u, l)), l && (o = !0, a = Math.max(a, l), clearTimeout(d.animationResetTimer), d.animationResetTimer = setTimeout(function() {
|
|
1086
1089
|
d.animationTime = 0, d.prevFromRect = null, d.fromRect = null, d.prevToRect = null, d.thisAnimationDuration = null;
|
|
1087
|
-
},
|
|
1090
|
+
}, l), d.thisAnimationDuration = l);
|
|
1088
1091
|
}), clearTimeout(t), o ? t = setTimeout(function() {
|
|
1089
1092
|
typeof n == "function" && n();
|
|
1090
1093
|
}, a) : typeof n == "function" && n(), i = [];
|
|
1091
1094
|
},
|
|
1092
1095
|
animate: function(n, r, o, a) {
|
|
1093
1096
|
if (a) {
|
|
1094
|
-
|
|
1095
|
-
var
|
|
1096
|
-
n.animatingX = !!p, n.animatingY = !!u,
|
|
1097
|
-
|
|
1097
|
+
v(n, "transition", ""), v(n, "transform", "");
|
|
1098
|
+
var s = Dt(this.el), l = s && s.a, d = s && s.d, p = (r.left - o.left) / (l || 1), u = (r.top - o.top) / (d || 1);
|
|
1099
|
+
n.animatingX = !!p, n.animatingY = !!u, v(n, "transform", "translate3d(" + p + "px," + u + "px,0)"), this.forRepaintDummy = xn(n), v(n, "transition", "transform " + a + "ms" + (this.options.easing ? " " + this.options.easing : "")), v(n, "transform", "translate3d(0,0,0)"), typeof n.animated == "number" && clearTimeout(n.animated), n.animated = setTimeout(function() {
|
|
1100
|
+
v(n, "transition", ""), v(n, "transform", ""), n.animated = !1, n.animatingX = !1, n.animatingY = !1;
|
|
1098
1101
|
}, a);
|
|
1099
1102
|
}
|
|
1100
1103
|
}
|
|
1101
1104
|
};
|
|
1102
1105
|
}
|
|
1103
|
-
function
|
|
1106
|
+
function xn(i) {
|
|
1104
1107
|
return i.offsetWidth;
|
|
1105
1108
|
}
|
|
1106
|
-
function
|
|
1109
|
+
function An(i, t, e, n) {
|
|
1107
1110
|
return Math.sqrt(Math.pow(t.top - i.top, 2) + Math.pow(t.left - i.left, 2)) / Math.sqrt(Math.pow(t.top - e.top, 2) + Math.pow(t.left - e.left, 2)) * n.animation;
|
|
1108
1111
|
}
|
|
1109
|
-
var
|
|
1112
|
+
var wt = [], De = {
|
|
1110
1113
|
initializeByDefault: !0
|
|
1111
|
-
},
|
|
1114
|
+
}, Qt = {
|
|
1112
1115
|
mount: function(t) {
|
|
1113
|
-
for (var e in
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
+
for (var e in De)
|
|
1117
|
+
De.hasOwnProperty(e) && !(e in t) && (t[e] = De[e]);
|
|
1118
|
+
wt.forEach(function(n) {
|
|
1116
1119
|
if (n.pluginName === t.pluginName)
|
|
1117
1120
|
throw "Sortable: Cannot mount plugin ".concat(t.pluginName, " more than once");
|
|
1118
|
-
}),
|
|
1121
|
+
}), wt.push(t);
|
|
1119
1122
|
},
|
|
1120
1123
|
pluginEvent: function(t, e, n) {
|
|
1121
1124
|
var r = this;
|
|
@@ -1123,20 +1126,20 @@ var ct = [], me = {
|
|
|
1123
1126
|
r.eventCanceled = !0;
|
|
1124
1127
|
};
|
|
1125
1128
|
var o = t + "Global";
|
|
1126
|
-
|
|
1127
|
-
e[a.pluginName] && (e[a.pluginName][o] && e[a.pluginName][o](
|
|
1129
|
+
wt.forEach(function(a) {
|
|
1130
|
+
e[a.pluginName] && (e[a.pluginName][o] && e[a.pluginName][o](K({
|
|
1128
1131
|
sortable: e
|
|
1129
|
-
}, n)), e.options[a.pluginName] && e[a.pluginName][t] && e[a.pluginName][t](
|
|
1132
|
+
}, n)), e.options[a.pluginName] && e[a.pluginName][t] && e[a.pluginName][t](K({
|
|
1130
1133
|
sortable: e
|
|
1131
1134
|
}, n)));
|
|
1132
1135
|
});
|
|
1133
1136
|
},
|
|
1134
1137
|
initializePlugins: function(t, e, n, r) {
|
|
1135
|
-
|
|
1136
|
-
var
|
|
1137
|
-
if (!(!t.options[
|
|
1138
|
-
var d = new
|
|
1139
|
-
d.sortable = t, d.options = t.options, t[
|
|
1138
|
+
wt.forEach(function(s) {
|
|
1139
|
+
var l = s.pluginName;
|
|
1140
|
+
if (!(!t.options[l] && !s.initializeByDefault)) {
|
|
1141
|
+
var d = new s(t, e, t.options);
|
|
1142
|
+
d.sortable = t, d.options = t.options, t[l] = d, it(n, d.defaults);
|
|
1140
1143
|
}
|
|
1141
1144
|
});
|
|
1142
1145
|
for (var o in t.options)
|
|
@@ -1147,114 +1150,114 @@ var ct = [], me = {
|
|
|
1147
1150
|
},
|
|
1148
1151
|
getEventProperties: function(t, e) {
|
|
1149
1152
|
var n = {};
|
|
1150
|
-
return
|
|
1151
|
-
typeof r.eventProperties == "function" &&
|
|
1153
|
+
return wt.forEach(function(r) {
|
|
1154
|
+
typeof r.eventProperties == "function" && it(n, r.eventProperties.call(e[r.pluginName], t));
|
|
1152
1155
|
}), n;
|
|
1153
1156
|
},
|
|
1154
1157
|
modifyOption: function(t, e, n) {
|
|
1155
1158
|
var r;
|
|
1156
|
-
return
|
|
1159
|
+
return wt.forEach(function(o) {
|
|
1157
1160
|
t[o.pluginName] && o.optionListeners && typeof o.optionListeners[e] == "function" && (r = o.optionListeners[e].call(t[o.pluginName], n));
|
|
1158
1161
|
}), r;
|
|
1159
1162
|
}
|
|
1160
1163
|
};
|
|
1161
|
-
function
|
|
1162
|
-
var t = i.sortable, e = i.rootEl, n = i.name, r = i.targetEl, o = i.cloneEl, a = i.toEl,
|
|
1163
|
-
if (t = t || e && e[
|
|
1164
|
-
var
|
|
1165
|
-
window.CustomEvent && !
|
|
1164
|
+
function Cn(i) {
|
|
1165
|
+
var t = i.sortable, e = i.rootEl, n = i.name, r = i.targetEl, o = i.cloneEl, a = i.toEl, s = i.fromEl, l = i.oldIndex, d = i.newIndex, p = i.oldDraggableIndex, u = i.newDraggableIndex, h = i.originalEvent, g = i.putSortable, f = i.extraEventProperties;
|
|
1166
|
+
if (t = t || e && e[z], !!t) {
|
|
1167
|
+
var m, S = t.options, V = "on" + n.charAt(0).toUpperCase() + n.substr(1);
|
|
1168
|
+
window.CustomEvent && !nt && !Kt ? m = new CustomEvent(n, {
|
|
1166
1169
|
bubbles: !0,
|
|
1167
1170
|
cancelable: !0
|
|
1168
|
-
}) : (
|
|
1169
|
-
var
|
|
1170
|
-
for (var
|
|
1171
|
-
|
|
1172
|
-
e && e.dispatchEvent(
|
|
1173
|
-
}
|
|
1174
|
-
}
|
|
1175
|
-
var
|
|
1176
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, o =
|
|
1177
|
-
|
|
1178
|
-
dragEl:
|
|
1179
|
-
parentEl:
|
|
1171
|
+
}) : (m = document.createEvent("Event"), m.initEvent(n, !0, !0)), m.to = a || e, m.from = s || e, m.item = r || e, m.clone = o, m.oldIndex = l, m.newIndex = d, m.oldDraggableIndex = p, m.newDraggableIndex = u, m.originalEvent = h, m.pullMode = g ? g.lastPutMode : void 0;
|
|
1172
|
+
var O = K(K({}, f), Qt.getEventProperties(n, t));
|
|
1173
|
+
for (var Y in O)
|
|
1174
|
+
m[Y] = O[Y];
|
|
1175
|
+
e && e.dispatchEvent(m), S[V] && S[V].call(t, m);
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
var $n = ["evt"], M = function(t, e) {
|
|
1179
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, o = mn(n, $n);
|
|
1180
|
+
Qt.pluginEvent.bind(y)(t, e, K({
|
|
1181
|
+
dragEl: c,
|
|
1182
|
+
parentEl: C,
|
|
1180
1183
|
ghostEl: b,
|
|
1181
1184
|
rootEl: x,
|
|
1182
|
-
nextEl:
|
|
1183
|
-
lastDownEl:
|
|
1184
|
-
cloneEl:
|
|
1185
|
-
cloneHidden:
|
|
1186
|
-
dragStarted:
|
|
1187
|
-
putSortable:
|
|
1185
|
+
nextEl: vt,
|
|
1186
|
+
lastDownEl: ae,
|
|
1187
|
+
cloneEl: A,
|
|
1188
|
+
cloneHidden: st,
|
|
1189
|
+
dragStarted: Bt,
|
|
1190
|
+
putSortable: L,
|
|
1188
1191
|
activeSortable: y.active,
|
|
1189
1192
|
originalEvent: r,
|
|
1190
|
-
oldIndex:
|
|
1191
|
-
oldDraggableIndex:
|
|
1192
|
-
newIndex:
|
|
1193
|
-
newDraggableIndex:
|
|
1194
|
-
hideGhostForTarget:
|
|
1195
|
-
unhideGhostForTarget:
|
|
1193
|
+
oldIndex: $t,
|
|
1194
|
+
oldDraggableIndex: jt,
|
|
1195
|
+
newIndex: U,
|
|
1196
|
+
newDraggableIndex: at,
|
|
1197
|
+
hideGhostForTarget: Yi,
|
|
1198
|
+
unhideGhostForTarget: Xi,
|
|
1196
1199
|
cloneNowHidden: function() {
|
|
1197
|
-
|
|
1200
|
+
st = !0;
|
|
1198
1201
|
},
|
|
1199
1202
|
cloneNowShown: function() {
|
|
1200
|
-
|
|
1203
|
+
st = !1;
|
|
1201
1204
|
},
|
|
1202
|
-
dispatchSortableEvent: function(
|
|
1203
|
-
|
|
1205
|
+
dispatchSortableEvent: function(s) {
|
|
1206
|
+
P({
|
|
1204
1207
|
sortable: e,
|
|
1205
|
-
name:
|
|
1208
|
+
name: s,
|
|
1206
1209
|
originalEvent: r
|
|
1207
1210
|
});
|
|
1208
1211
|
}
|
|
1209
1212
|
}, o));
|
|
1210
1213
|
};
|
|
1211
|
-
function
|
|
1212
|
-
|
|
1213
|
-
putSortable:
|
|
1214
|
-
cloneEl:
|
|
1215
|
-
targetEl:
|
|
1214
|
+
function P(i) {
|
|
1215
|
+
Cn(K({
|
|
1216
|
+
putSortable: L,
|
|
1217
|
+
cloneEl: A,
|
|
1218
|
+
targetEl: c,
|
|
1216
1219
|
rootEl: x,
|
|
1217
|
-
oldIndex:
|
|
1218
|
-
oldDraggableIndex:
|
|
1219
|
-
newIndex:
|
|
1220
|
-
newDraggableIndex:
|
|
1220
|
+
oldIndex: $t,
|
|
1221
|
+
oldDraggableIndex: jt,
|
|
1222
|
+
newIndex: U,
|
|
1223
|
+
newDraggableIndex: at
|
|
1221
1224
|
}, i));
|
|
1222
1225
|
}
|
|
1223
|
-
var
|
|
1224
|
-
if (
|
|
1225
|
-
if (
|
|
1226
|
+
var c, C, b, x, vt, ae, A, st, $t, U, jt, at, te, L, Ct = !1, fe = !1, ge = [], ft, X, Te, Oe, gi, mi, Bt, xt, Yt, Xt = !1, ee = !1, se, I, Le = [], Re = !1, me = [], ye = typeof document < "u", ie = Mi, vi = Kt || nt ? "cssFloat" : "float", Sn = ye && !ki && !Mi && "draggable" in document.createElement("div"), Ui = function() {
|
|
1227
|
+
if (ye) {
|
|
1228
|
+
if (nt)
|
|
1226
1229
|
return !1;
|
|
1227
1230
|
var i = document.createElement("x");
|
|
1228
1231
|
return i.style.cssText = "pointer-events:auto", i.style.pointerEvents === "auto";
|
|
1229
1232
|
}
|
|
1230
|
-
}(),
|
|
1231
|
-
var n =
|
|
1233
|
+
}(), zi = function(t, e) {
|
|
1234
|
+
var n = v(t), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), o = Ot(t, 0, e), a = Ot(t, 1, e), s = o && v(o), l = a && v(a), d = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + T(o).width, p = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + T(a).width;
|
|
1232
1235
|
if (n.display === "flex")
|
|
1233
1236
|
return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
1234
1237
|
if (n.display === "grid")
|
|
1235
1238
|
return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
1236
|
-
if (o &&
|
|
1237
|
-
var u =
|
|
1238
|
-
return a && (
|
|
1239
|
-
}
|
|
1240
|
-
return o && (
|
|
1241
|
-
},
|
|
1242
|
-
var r = n ? t.left : t.top, o = n ? t.right : t.bottom, a = n ? t.width : t.height,
|
|
1243
|
-
return r ===
|
|
1244
|
-
},
|
|
1239
|
+
if (o && s.float && s.float !== "none") {
|
|
1240
|
+
var u = s.float === "left" ? "left" : "right";
|
|
1241
|
+
return a && (l.clear === "both" || l.clear === u) ? "vertical" : "horizontal";
|
|
1242
|
+
}
|
|
1243
|
+
return o && (s.display === "block" || s.display === "flex" || s.display === "table" || s.display === "grid" || d >= r && n[vi] === "none" || a && n[vi] === "none" && d + p > r) ? "vertical" : "horizontal";
|
|
1244
|
+
}, Dn = function(t, e, n) {
|
|
1245
|
+
var r = n ? t.left : t.top, o = n ? t.right : t.bottom, a = n ? t.width : t.height, s = n ? e.left : e.top, l = n ? e.right : e.bottom, d = n ? e.width : e.height;
|
|
1246
|
+
return r === s || o === l || r + a / 2 === s + d / 2;
|
|
1247
|
+
}, Tn = function(t, e) {
|
|
1245
1248
|
var n;
|
|
1246
|
-
return
|
|
1247
|
-
var o = r[
|
|
1248
|
-
if (!(!o ||
|
|
1249
|
-
var a =
|
|
1250
|
-
if (
|
|
1249
|
+
return ge.some(function(r) {
|
|
1250
|
+
var o = r[z].options.emptyInsertThreshold;
|
|
1251
|
+
if (!(!o || Xe(r))) {
|
|
1252
|
+
var a = T(r), s = t >= a.left - o && t <= a.right + o, l = e >= a.top - o && e <= a.bottom + o;
|
|
1253
|
+
if (s && l)
|
|
1251
1254
|
return n = r;
|
|
1252
1255
|
}
|
|
1253
1256
|
}), n;
|
|
1254
|
-
},
|
|
1257
|
+
}, ji = function(t) {
|
|
1255
1258
|
function e(o, a) {
|
|
1256
|
-
return function(
|
|
1257
|
-
var u =
|
|
1259
|
+
return function(s, l, d, p) {
|
|
1260
|
+
var u = s.options.group.name && l.options.group.name && s.options.group.name === l.options.group.name;
|
|
1258
1261
|
if (o == null && (a || u))
|
|
1259
1262
|
return !0;
|
|
1260
1263
|
if (o == null || o === !1)
|
|
@@ -1262,42 +1265,42 @@ var h, $, b, x, st, Yt, C, K, mt, k, Ot, q, Bt, T, gt = !1, Qt = !1, te = [], rt
|
|
|
1262
1265
|
if (a && o === "clone")
|
|
1263
1266
|
return o;
|
|
1264
1267
|
if (typeof o == "function")
|
|
1265
|
-
return e(o(
|
|
1266
|
-
var
|
|
1267
|
-
return o === !0 || typeof o == "string" && o ===
|
|
1268
|
+
return e(o(s, l, d, p), a)(s, l, d, p);
|
|
1269
|
+
var h = (a ? s : l).options.group.name;
|
|
1270
|
+
return o === !0 || typeof o == "string" && o === h || o.join && o.indexOf(h) > -1;
|
|
1268
1271
|
};
|
|
1269
1272
|
}
|
|
1270
1273
|
var n = {}, r = t.group;
|
|
1271
|
-
(!r ||
|
|
1274
|
+
(!r || oe(r) != "object") && (r = {
|
|
1272
1275
|
name: r
|
|
1273
1276
|
}), n.name = r.name, n.checkPull = e(r.pull, !0), n.checkPut = e(r.put), n.revertClone = r.revertClone, t.group = n;
|
|
1274
|
-
},
|
|
1275
|
-
|
|
1276
|
-
},
|
|
1277
|
-
|
|
1277
|
+
}, Yi = function() {
|
|
1278
|
+
!Ui && b && v(b, "display", "none");
|
|
1279
|
+
}, Xi = function() {
|
|
1280
|
+
!Ui && b && v(b, "display", "");
|
|
1278
1281
|
};
|
|
1279
|
-
|
|
1280
|
-
if (
|
|
1281
|
-
return i.preventDefault(), i.stopPropagation && i.stopPropagation(), i.stopImmediatePropagation && i.stopImmediatePropagation(),
|
|
1282
|
+
ye && !ki && document.addEventListener("click", function(i) {
|
|
1283
|
+
if (fe)
|
|
1284
|
+
return i.preventDefault(), i.stopPropagation && i.stopPropagation(), i.stopImmediatePropagation && i.stopImmediatePropagation(), fe = !1, !1;
|
|
1282
1285
|
}, !0);
|
|
1283
|
-
var
|
|
1284
|
-
if (
|
|
1286
|
+
var gt = function(t) {
|
|
1287
|
+
if (c) {
|
|
1285
1288
|
t = t.touches ? t.touches[0] : t;
|
|
1286
|
-
var e =
|
|
1289
|
+
var e = Tn(t.clientX, t.clientY);
|
|
1287
1290
|
if (e) {
|
|
1288
1291
|
var n = {};
|
|
1289
1292
|
for (var r in t)
|
|
1290
1293
|
t.hasOwnProperty(r) && (n[r] = t[r]);
|
|
1291
|
-
n.target = n.rootEl = e, n.preventDefault = void 0, n.stopPropagation = void 0, e[
|
|
1294
|
+
n.target = n.rootEl = e, n.preventDefault = void 0, n.stopPropagation = void 0, e[z]._onDragOver(n);
|
|
1292
1295
|
}
|
|
1293
1296
|
}
|
|
1294
|
-
},
|
|
1295
|
-
|
|
1297
|
+
}, On = function(t) {
|
|
1298
|
+
c && c.parentNode[z]._isOutsideThisEl(t.target);
|
|
1296
1299
|
};
|
|
1297
1300
|
function y(i, t) {
|
|
1298
1301
|
if (!(i && i.nodeType && i.nodeType === 1))
|
|
1299
1302
|
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(i));
|
|
1300
|
-
this.el = i, this.options = t =
|
|
1303
|
+
this.el = i, this.options = t = it({}, t), i[z] = this;
|
|
1301
1304
|
var e = {
|
|
1302
1305
|
group: null,
|
|
1303
1306
|
sort: !0,
|
|
@@ -1313,7 +1316,7 @@ function y(i, t) {
|
|
|
1313
1316
|
// will be set to same as swapThreshold if default
|
|
1314
1317
|
removeCloneOnHide: !0,
|
|
1315
1318
|
direction: function() {
|
|
1316
|
-
return
|
|
1319
|
+
return zi(i, this.options);
|
|
1317
1320
|
},
|
|
1318
1321
|
ghostClass: "sortable-ghost",
|
|
1319
1322
|
chosenClass: "sortable-chosen",
|
|
@@ -1323,8 +1326,8 @@ function y(i, t) {
|
|
|
1323
1326
|
preventOnFilter: !0,
|
|
1324
1327
|
animation: 0,
|
|
1325
1328
|
easing: null,
|
|
1326
|
-
setData: function(a,
|
|
1327
|
-
a.setData("Text",
|
|
1329
|
+
setData: function(a, s) {
|
|
1330
|
+
a.setData("Text", s.textContent);
|
|
1328
1331
|
},
|
|
1329
1332
|
dropBubble: !1,
|
|
1330
1333
|
dragoverBubble: !1,
|
|
@@ -1340,96 +1343,96 @@ function y(i, t) {
|
|
|
1340
1343
|
x: 0,
|
|
1341
1344
|
y: 0
|
|
1342
1345
|
},
|
|
1343
|
-
supportPointer: y.supportPointer !== !1 && "PointerEvent" in window && !
|
|
1346
|
+
supportPointer: y.supportPointer !== !1 && "PointerEvent" in window && !Ut,
|
|
1344
1347
|
emptyInsertThreshold: 5
|
|
1345
1348
|
};
|
|
1346
|
-
|
|
1349
|
+
Qt.initializePlugins(this, i, e);
|
|
1347
1350
|
for (var n in e)
|
|
1348
1351
|
!(n in t) && (t[n] = e[n]);
|
|
1349
|
-
|
|
1352
|
+
ji(t);
|
|
1350
1353
|
for (var r in this)
|
|
1351
1354
|
r.charAt(0) === "_" && typeof this[r] == "function" && (this[r] = this[r].bind(this));
|
|
1352
|
-
this.nativeDraggable = t.forceFallback ? !1 :
|
|
1355
|
+
this.nativeDraggable = t.forceFallback ? !1 : Sn, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? E(i, "pointerdown", this._onTapStart) : (E(i, "mousedown", this._onTapStart), E(i, "touchstart", this._onTapStart)), this.nativeDraggable && (E(i, "dragover", this), E(i, "dragenter", this)), ge.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), it(this, wn());
|
|
1353
1356
|
}
|
|
1354
1357
|
y.prototype = /** @lends Sortable.prototype */
|
|
1355
1358
|
{
|
|
1356
1359
|
constructor: y,
|
|
1357
1360
|
_isOutsideThisEl: function(t) {
|
|
1358
|
-
!this.el.contains(t) && t !== this.el && (
|
|
1361
|
+
!this.el.contains(t) && t !== this.el && (xt = null);
|
|
1359
1362
|
},
|
|
1360
1363
|
_getDirection: function(t, e) {
|
|
1361
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, t, e,
|
|
1364
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, t, e, c) : this.options.direction;
|
|
1362
1365
|
},
|
|
1363
1366
|
_onTapStart: function(t) {
|
|
1364
1367
|
if (t.cancelable) {
|
|
1365
|
-
var e = this, n = this.el, r = this.options, o = r.preventOnFilter, a = t.type,
|
|
1366
|
-
if (
|
|
1367
|
-
if (
|
|
1368
|
-
if (p.call(this, t,
|
|
1369
|
-
|
|
1368
|
+
var e = this, n = this.el, r = this.options, o = r.preventOnFilter, a = t.type, s = t.touches && t.touches[0] || t.pointerType && t.pointerType === "touch" && t, l = (s || t).target, d = t.target.shadowRoot && (t.path && t.path[0] || t.composedPath && t.composedPath()[0]) || l, p = r.filter;
|
|
1369
|
+
if (Vn(n), !c && !(/mousedown|pointerdown/.test(a) && t.button !== 0 || r.disabled) && !d.isContentEditable && !(!this.nativeDraggable && Ut && l && l.tagName.toUpperCase() === "SELECT") && (l = Z(l, r.draggable, n, !1), !(l && l.animated) && ae !== l)) {
|
|
1370
|
+
if ($t = j(l), jt = j(l, r.draggable), typeof p == "function") {
|
|
1371
|
+
if (p.call(this, t, l, this)) {
|
|
1372
|
+
P({
|
|
1370
1373
|
sortable: e,
|
|
1371
1374
|
rootEl: d,
|
|
1372
1375
|
name: "filter",
|
|
1373
|
-
targetEl:
|
|
1376
|
+
targetEl: l,
|
|
1374
1377
|
toEl: n,
|
|
1375
1378
|
fromEl: n
|
|
1376
|
-
}),
|
|
1379
|
+
}), M("filter", e, {
|
|
1377
1380
|
evt: t
|
|
1378
1381
|
}), o && t.cancelable && t.preventDefault();
|
|
1379
1382
|
return;
|
|
1380
1383
|
}
|
|
1381
1384
|
} else if (p && (p = p.split(",").some(function(u) {
|
|
1382
|
-
if (u =
|
|
1383
|
-
return
|
|
1385
|
+
if (u = Z(d, u.trim(), n, !1), u)
|
|
1386
|
+
return P({
|
|
1384
1387
|
sortable: e,
|
|
1385
1388
|
rootEl: u,
|
|
1386
1389
|
name: "filter",
|
|
1387
|
-
targetEl:
|
|
1390
|
+
targetEl: l,
|
|
1388
1391
|
fromEl: n,
|
|
1389
1392
|
toEl: n
|
|
1390
|
-
}),
|
|
1393
|
+
}), M("filter", e, {
|
|
1391
1394
|
evt: t
|
|
1392
1395
|
}), !0;
|
|
1393
1396
|
}), p)) {
|
|
1394
1397
|
o && t.cancelable && t.preventDefault();
|
|
1395
1398
|
return;
|
|
1396
1399
|
}
|
|
1397
|
-
r.handle && !
|
|
1400
|
+
r.handle && !Z(d, r.handle, n, !1) || this._prepareDragStart(t, s, l);
|
|
1398
1401
|
}
|
|
1399
1402
|
}
|
|
1400
1403
|
},
|
|
1401
1404
|
_prepareDragStart: function(t, e, n) {
|
|
1402
|
-
var r = this, o = r.el, a = r.options,
|
|
1403
|
-
if (n && !
|
|
1404
|
-
var d =
|
|
1405
|
-
if (x = o,
|
|
1406
|
-
target:
|
|
1405
|
+
var r = this, o = r.el, a = r.options, s = o.ownerDocument, l;
|
|
1406
|
+
if (n && !c && n.parentNode === o) {
|
|
1407
|
+
var d = T(n);
|
|
1408
|
+
if (x = o, c = n, C = c.parentNode, vt = c.nextSibling, ae = n, te = a.group, y.dragged = c, ft = {
|
|
1409
|
+
target: c,
|
|
1407
1410
|
clientX: (e || t).clientX,
|
|
1408
1411
|
clientY: (e || t).clientY
|
|
1409
|
-
},
|
|
1410
|
-
if (
|
|
1412
|
+
}, gi = ft.clientX - d.left, mi = ft.clientY - d.top, this._lastX = (e || t).clientX, this._lastY = (e || t).clientY, c.style["will-change"] = "all", l = function() {
|
|
1413
|
+
if (M("delayEnded", r, {
|
|
1411
1414
|
evt: t
|
|
1412
1415
|
}), y.eventCanceled) {
|
|
1413
1416
|
r._onDrop();
|
|
1414
1417
|
return;
|
|
1415
1418
|
}
|
|
1416
|
-
r._disableDelayedDragEvents(), !
|
|
1419
|
+
r._disableDelayedDragEvents(), !ci && r.nativeDraggable && (c.draggable = !0), r._triggerDragStart(t, e), P({
|
|
1417
1420
|
sortable: r,
|
|
1418
1421
|
name: "choose",
|
|
1419
1422
|
originalEvent: t
|
|
1420
|
-
}),
|
|
1423
|
+
}), F(c, a.chosenClass, !0);
|
|
1421
1424
|
}, a.ignore.split(",").forEach(function(p) {
|
|
1422
|
-
|
|
1423
|
-
}),
|
|
1425
|
+
Vi(c, p.trim(), He);
|
|
1426
|
+
}), E(s, "dragover", gt), E(s, "mousemove", gt), E(s, "touchmove", gt), E(s, "mouseup", r._onDrop), E(s, "touchend", r._onDrop), E(s, "touchcancel", r._onDrop), ci && this.nativeDraggable && (this.options.touchStartThreshold = 4, c.draggable = !0), M("delayStart", this, {
|
|
1424
1427
|
evt: t
|
|
1425
|
-
}), a.delay && (!a.delayOnTouchOnly || e) && (!this.nativeDraggable || !(
|
|
1428
|
+
}), a.delay && (!a.delayOnTouchOnly || e) && (!this.nativeDraggable || !(Kt || nt))) {
|
|
1426
1429
|
if (y.eventCanceled) {
|
|
1427
1430
|
this._onDrop();
|
|
1428
1431
|
return;
|
|
1429
1432
|
}
|
|
1430
|
-
|
|
1433
|
+
E(s, "mouseup", r._disableDelayedDrag), E(s, "touchend", r._disableDelayedDrag), E(s, "touchcancel", r._disableDelayedDrag), E(s, "mousemove", r._delayedDragTouchMoveHandler), E(s, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && E(s, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(l, a.delay);
|
|
1431
1434
|
} else
|
|
1432
|
-
|
|
1435
|
+
l();
|
|
1433
1436
|
}
|
|
1434
1437
|
},
|
|
1435
1438
|
_delayedDragTouchMoveHandler: function(t) {
|
|
@@ -1437,28 +1440,28 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1437
1440
|
Math.max(Math.abs(e.clientX - this._lastX), Math.abs(e.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
1438
1441
|
},
|
|
1439
1442
|
_disableDelayedDrag: function() {
|
|
1440
|
-
|
|
1443
|
+
c && He(c), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
1441
1444
|
},
|
|
1442
1445
|
_disableDelayedDragEvents: function() {
|
|
1443
1446
|
var t = this.el.ownerDocument;
|
|
1444
|
-
|
|
1447
|
+
_(t, "mouseup", this._disableDelayedDrag), _(t, "touchend", this._disableDelayedDrag), _(t, "touchcancel", this._disableDelayedDrag), _(t, "mousemove", this._delayedDragTouchMoveHandler), _(t, "touchmove", this._delayedDragTouchMoveHandler), _(t, "pointermove", this._delayedDragTouchMoveHandler);
|
|
1445
1448
|
},
|
|
1446
1449
|
_triggerDragStart: function(t, e) {
|
|
1447
|
-
e = e || t.pointerType == "touch" && t, !this.nativeDraggable || e ? this.options.supportPointer ?
|
|
1450
|
+
e = e || t.pointerType == "touch" && t, !this.nativeDraggable || e ? this.options.supportPointer ? E(document, "pointermove", this._onTouchMove) : e ? E(document, "touchmove", this._onTouchMove) : E(document, "mousemove", this._onTouchMove) : (E(c, "dragend", this), E(x, "dragstart", this._onDragStart));
|
|
1448
1451
|
try {
|
|
1449
|
-
document.selection ?
|
|
1452
|
+
document.selection ? le(function() {
|
|
1450
1453
|
document.selection.empty();
|
|
1451
1454
|
}) : window.getSelection().removeAllRanges();
|
|
1452
1455
|
} catch {
|
|
1453
1456
|
}
|
|
1454
1457
|
},
|
|
1455
1458
|
_dragStarted: function(t, e) {
|
|
1456
|
-
if (
|
|
1457
|
-
|
|
1459
|
+
if (Ct = !1, x && c) {
|
|
1460
|
+
M("dragStarted", this, {
|
|
1458
1461
|
evt: e
|
|
1459
|
-
}), this.nativeDraggable &&
|
|
1462
|
+
}), this.nativeDraggable && E(document, "dragover", On);
|
|
1460
1463
|
var n = this.options;
|
|
1461
|
-
!t &&
|
|
1464
|
+
!t && F(c, n.dragClass, !1), F(c, n.ghostClass, !0), y.active = this, t && this._appendGhost(), P({
|
|
1462
1465
|
sortable: this,
|
|
1463
1466
|
name: "start",
|
|
1464
1467
|
originalEvent: e
|
|
@@ -1467,17 +1470,17 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1467
1470
|
this._nulling();
|
|
1468
1471
|
},
|
|
1469
1472
|
_emulateDragOver: function() {
|
|
1470
|
-
if (
|
|
1471
|
-
this._lastX =
|
|
1472
|
-
for (var t = document.elementFromPoint(
|
|
1473
|
+
if (X) {
|
|
1474
|
+
this._lastX = X.clientX, this._lastY = X.clientY, Yi();
|
|
1475
|
+
for (var t = document.elementFromPoint(X.clientX, X.clientY), e = t; t && t.shadowRoot && (t = t.shadowRoot.elementFromPoint(X.clientX, X.clientY), t !== e); )
|
|
1473
1476
|
e = t;
|
|
1474
|
-
if (
|
|
1477
|
+
if (c.parentNode[z]._isOutsideThisEl(t), e)
|
|
1475
1478
|
do {
|
|
1476
|
-
if (e[
|
|
1479
|
+
if (e[z]) {
|
|
1477
1480
|
var n = void 0;
|
|
1478
|
-
if (n = e[
|
|
1479
|
-
clientX:
|
|
1480
|
-
clientY:
|
|
1481
|
+
if (n = e[z]._onDragOver({
|
|
1482
|
+
clientX: X.clientX,
|
|
1483
|
+
clientY: X.clientY,
|
|
1481
1484
|
target: t,
|
|
1482
1485
|
rootEl: e
|
|
1483
1486
|
}), n && !this.options.dragoverBubble)
|
|
@@ -1485,19 +1488,19 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1485
1488
|
}
|
|
1486
1489
|
t = e;
|
|
1487
1490
|
} while (e = e.parentNode);
|
|
1488
|
-
|
|
1491
|
+
Xi();
|
|
1489
1492
|
}
|
|
1490
1493
|
},
|
|
1491
1494
|
_onTouchMove: function(t) {
|
|
1492
|
-
if (
|
|
1493
|
-
var e = this.options, n = e.fallbackTolerance, r = e.fallbackOffset, o = t.touches ? t.touches[0] : t, a = b &&
|
|
1494
|
-
if (!y.active && !
|
|
1495
|
+
if (ft) {
|
|
1496
|
+
var e = this.options, n = e.fallbackTolerance, r = e.fallbackOffset, o = t.touches ? t.touches[0] : t, a = b && Dt(b, !0), s = b && a && a.a, l = b && a && a.d, d = ie && I && fi(I), p = (o.clientX - ft.clientX + r.x) / (s || 1) + (d ? d[0] - Le[0] : 0) / (s || 1), u = (o.clientY - ft.clientY + r.y) / (l || 1) + (d ? d[1] - Le[1] : 0) / (l || 1);
|
|
1497
|
+
if (!y.active && !Ct) {
|
|
1495
1498
|
if (n && Math.max(Math.abs(o.clientX - this._lastX), Math.abs(o.clientY - this._lastY)) < n)
|
|
1496
1499
|
return;
|
|
1497
1500
|
this._onDragStart(t, !0);
|
|
1498
1501
|
}
|
|
1499
1502
|
if (b) {
|
|
1500
|
-
a ? (a.e += p - (
|
|
1503
|
+
a ? (a.e += p - (Te || 0), a.f += u - (Oe || 0)) : a = {
|
|
1501
1504
|
a: 1,
|
|
1502
1505
|
b: 0,
|
|
1503
1506
|
c: 0,
|
|
@@ -1505,193 +1508,193 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1505
1508
|
e: p,
|
|
1506
1509
|
f: u
|
|
1507
1510
|
};
|
|
1508
|
-
var
|
|
1509
|
-
|
|
1511
|
+
var h = "matrix(".concat(a.a, ",").concat(a.b, ",").concat(a.c, ",").concat(a.d, ",").concat(a.e, ",").concat(a.f, ")");
|
|
1512
|
+
v(b, "webkitTransform", h), v(b, "mozTransform", h), v(b, "msTransform", h), v(b, "transform", h), Te = p, Oe = u, X = o;
|
|
1510
1513
|
}
|
|
1511
1514
|
t.cancelable && t.preventDefault();
|
|
1512
1515
|
}
|
|
1513
1516
|
},
|
|
1514
1517
|
_appendGhost: function() {
|
|
1515
1518
|
if (!b) {
|
|
1516
|
-
var t = this.options.fallbackOnBody ? document.body : x, e =
|
|
1517
|
-
if (
|
|
1518
|
-
for (
|
|
1519
|
-
|
|
1520
|
-
|
|
1519
|
+
var t = this.options.fallbackOnBody ? document.body : x, e = T(c, !0, ie, !0, t), n = this.options;
|
|
1520
|
+
if (ie) {
|
|
1521
|
+
for (I = t; v(I, "position") === "static" && v(I, "transform") === "none" && I !== document; )
|
|
1522
|
+
I = I.parentNode;
|
|
1523
|
+
I !== document.body && I !== document.documentElement ? (I === document && (I = q()), e.top += I.scrollTop, e.left += I.scrollLeft) : I = q(), Le = fi(I);
|
|
1521
1524
|
}
|
|
1522
|
-
b =
|
|
1525
|
+
b = c.cloneNode(!0), F(b, n.ghostClass, !1), F(b, n.fallbackClass, !0), F(b, n.dragClass, !0), v(b, "transition", ""), v(b, "transform", ""), v(b, "box-sizing", "border-box"), v(b, "margin", 0), v(b, "top", e.top), v(b, "left", e.left), v(b, "width", e.width), v(b, "height", e.height), v(b, "opacity", "0.8"), v(b, "position", ie ? "absolute" : "fixed"), v(b, "zIndex", "100000"), v(b, "pointerEvents", "none"), y.ghost = b, t.appendChild(b), v(b, "transform-origin", gi / parseInt(b.style.width) * 100 + "% " + mi / parseInt(b.style.height) * 100 + "%");
|
|
1523
1526
|
}
|
|
1524
1527
|
},
|
|
1525
1528
|
_onDragStart: function(t, e) {
|
|
1526
1529
|
var n = this, r = t.dataTransfer, o = n.options;
|
|
1527
|
-
if (
|
|
1530
|
+
if (M("dragStart", this, {
|
|
1528
1531
|
evt: t
|
|
1529
1532
|
}), y.eventCanceled) {
|
|
1530
1533
|
this._onDrop();
|
|
1531
1534
|
return;
|
|
1532
1535
|
}
|
|
1533
|
-
|
|
1534
|
-
|
|
1536
|
+
M("setupClone", this), y.eventCanceled || (A = Fi(c), A.removeAttribute("id"), A.draggable = !1, A.style["will-change"] = "", this._hideClone(), F(A, this.options.chosenClass, !1), y.clone = A), n.cloneId = le(function() {
|
|
1537
|
+
M("clone", n), !y.eventCanceled && (n.options.removeCloneOnHide || x.insertBefore(A, c), n._hideClone(), P({
|
|
1535
1538
|
sortable: n,
|
|
1536
1539
|
name: "clone"
|
|
1537
1540
|
}));
|
|
1538
|
-
}), !e &&
|
|
1541
|
+
}), !e && F(c, o.dragClass, !0), e ? (fe = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (_(document, "mouseup", n._onDrop), _(document, "touchend", n._onDrop), _(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", o.setData && o.setData.call(n, r, c)), E(document, "drop", n), v(c, "transform", "translateZ(0)")), Ct = !0, n._dragStartId = le(n._dragStarted.bind(n, e, t)), E(document, "selectstart", n), Bt = !0, Ut && v(document.body, "user-select", "none");
|
|
1539
1542
|
},
|
|
1540
1543
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
1541
1544
|
_onDragOver: function(t) {
|
|
1542
|
-
var e = this.el, n = t.target, r, o, a,
|
|
1543
|
-
if (
|
|
1545
|
+
var e = this.el, n = t.target, r, o, a, s = this.options, l = s.group, d = y.active, p = te === l, u = s.sort, h = L || d, g, f = this, m = !1;
|
|
1546
|
+
if (Re)
|
|
1544
1547
|
return;
|
|
1545
|
-
function S(
|
|
1546
|
-
|
|
1548
|
+
function S(kt, qi) {
|
|
1549
|
+
M(kt, f, K({
|
|
1547
1550
|
evt: t,
|
|
1548
1551
|
isOwner: p,
|
|
1549
|
-
axis:
|
|
1552
|
+
axis: g ? "vertical" : "horizontal",
|
|
1550
1553
|
revert: a,
|
|
1551
1554
|
dragRect: r,
|
|
1552
1555
|
targetRect: o,
|
|
1553
1556
|
canSort: u,
|
|
1554
|
-
fromSortable:
|
|
1557
|
+
fromSortable: h,
|
|
1555
1558
|
target: n,
|
|
1556
|
-
completed:
|
|
1557
|
-
onMove: function(
|
|
1558
|
-
return
|
|
1559
|
+
completed: O,
|
|
1560
|
+
onMove: function(Ze, Ki) {
|
|
1561
|
+
return ne(x, e, c, r, Ze, T(Ze), t, Ki);
|
|
1559
1562
|
},
|
|
1560
|
-
changed:
|
|
1561
|
-
},
|
|
1563
|
+
changed: Y
|
|
1564
|
+
}, qi));
|
|
1562
1565
|
}
|
|
1563
|
-
function
|
|
1564
|
-
S("dragOverAnimationCapture"), f.captureAnimationState(), f !==
|
|
1566
|
+
function V() {
|
|
1567
|
+
S("dragOverAnimationCapture"), f.captureAnimationState(), f !== h && h.captureAnimationState();
|
|
1565
1568
|
}
|
|
1566
|
-
function
|
|
1569
|
+
function O(kt) {
|
|
1567
1570
|
return S("dragOverCompleted", {
|
|
1568
|
-
insertion:
|
|
1569
|
-
}),
|
|
1571
|
+
insertion: kt
|
|
1572
|
+
}), kt && (p ? d._hideClone() : d._showClone(f), f !== h && (F(c, L ? L.options.ghostClass : d.options.ghostClass, !1), F(c, s.ghostClass, !0)), L !== f && f !== y.active ? L = f : f === y.active && L && (L = null), h === f && (f._ignoreWhileAnimating = n), f.animateAll(function() {
|
|
1570
1573
|
S("dragOverAnimationComplete"), f._ignoreWhileAnimating = null;
|
|
1571
|
-
}), f !==
|
|
1574
|
+
}), f !== h && (h.animateAll(), h._ignoreWhileAnimating = null)), (n === c && !c.animated || n === e && !n.animated) && (xt = null), !s.dragoverBubble && !t.rootEl && n !== document && (c.parentNode[z]._isOutsideThisEl(t.target), !kt && gt(t)), !s.dragoverBubble && t.stopPropagation && t.stopPropagation(), m = !0;
|
|
1572
1575
|
}
|
|
1573
|
-
function
|
|
1574
|
-
|
|
1576
|
+
function Y() {
|
|
1577
|
+
U = j(c), at = j(c, s.draggable), P({
|
|
1575
1578
|
sortable: f,
|
|
1576
1579
|
name: "change",
|
|
1577
1580
|
toEl: e,
|
|
1578
|
-
newIndex:
|
|
1579
|
-
newDraggableIndex:
|
|
1581
|
+
newIndex: U,
|
|
1582
|
+
newDraggableIndex: at,
|
|
1580
1583
|
originalEvent: t
|
|
1581
1584
|
});
|
|
1582
1585
|
}
|
|
1583
|
-
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), n =
|
|
1584
|
-
return
|
|
1585
|
-
if (
|
|
1586
|
-
return
|
|
1587
|
-
if (
|
|
1588
|
-
if (
|
|
1589
|
-
return
|
|
1586
|
+
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), n = Z(n, s.draggable, e, !0), S("dragOver"), y.eventCanceled)
|
|
1587
|
+
return m;
|
|
1588
|
+
if (c.contains(t.target) || n.animated && n.animatingX && n.animatingY || f._ignoreWhileAnimating === n)
|
|
1589
|
+
return O(!1);
|
|
1590
|
+
if (fe = !1, d && !s.disabled && (p ? u || (a = C !== x) : L === this || (this.lastPutMode = te.checkPull(this, d, c, t)) && l.checkPut(this, d, c, t))) {
|
|
1591
|
+
if (g = this._getDirection(t, n) === "vertical", r = T(c), S("dragOverValid"), y.eventCanceled)
|
|
1592
|
+
return m;
|
|
1590
1593
|
if (a)
|
|
1591
|
-
return
|
|
1592
|
-
var
|
|
1593
|
-
if (!
|
|
1594
|
-
if (
|
|
1595
|
-
return
|
|
1596
|
-
if (
|
|
1597
|
-
return
|
|
1598
|
-
} else if (
|
|
1599
|
-
var
|
|
1600
|
-
if (
|
|
1601
|
-
return
|
|
1602
|
-
if (n =
|
|
1603
|
-
return
|
|
1594
|
+
return C = x, V(), this._hideClone(), S("revert"), y.eventCanceled || (vt ? x.insertBefore(c, vt) : x.appendChild(c)), O(!0);
|
|
1595
|
+
var B = Xe(e, s.draggable);
|
|
1596
|
+
if (!B || Pn(t, g, this) && !B.animated) {
|
|
1597
|
+
if (B === c)
|
|
1598
|
+
return O(!1);
|
|
1599
|
+
if (B && e === t.target && (n = B), n && (o = T(n)), ne(x, e, c, r, n, o, t, !!n) !== !1)
|
|
1600
|
+
return V(), B && B.nextSibling ? e.insertBefore(c, B.nextSibling) : e.appendChild(c), C = e, Y(), O(!0);
|
|
1601
|
+
} else if (B && In(t, g, this)) {
|
|
1602
|
+
var dt = Ot(e, 0, s, !0);
|
|
1603
|
+
if (dt === c)
|
|
1604
|
+
return O(!1);
|
|
1605
|
+
if (n = dt, o = T(n), ne(x, e, c, r, n, o, t, !1) !== !1)
|
|
1606
|
+
return V(), e.insertBefore(c, dt), C = e, Y(), O(!0);
|
|
1604
1607
|
} else if (n.parentNode === e) {
|
|
1605
|
-
o =
|
|
1606
|
-
var
|
|
1607
|
-
|
|
1608
|
-
var
|
|
1609
|
-
if (
|
|
1610
|
-
var
|
|
1608
|
+
o = T(n);
|
|
1609
|
+
var G = 0, ut, Ht = c.parentNode !== e, R = !Dn(c.animated && c.toRect || r, n.animated && n.toRect || o, g), It = g ? "top" : "left", rt = pi(n, "top", "top") || pi(c, "top", "top"), Pt = rt ? rt.scrollTop : void 0;
|
|
1610
|
+
xt !== n && (ut = o[It], Xt = !1, ee = !R && s.invertSwap || Ht), G = Mn(t, n, o, g, R ? 1 : s.swapThreshold, s.invertedSwapThreshold == null ? s.swapThreshold : s.invertedSwapThreshold, ee, xt === n);
|
|
1611
|
+
var J;
|
|
1612
|
+
if (G !== 0) {
|
|
1613
|
+
var ct = j(c);
|
|
1611
1614
|
do
|
|
1612
|
-
|
|
1613
|
-
while (
|
|
1615
|
+
ct -= G, J = C.children[ct];
|
|
1616
|
+
while (J && (v(J, "display") === "none" || J === b));
|
|
1614
1617
|
}
|
|
1615
|
-
if (
|
|
1616
|
-
return
|
|
1617
|
-
|
|
1618
|
-
var
|
|
1619
|
-
|
|
1620
|
-
var
|
|
1621
|
-
if (
|
|
1622
|
-
return (
|
|
1618
|
+
if (G === 0 || J === n)
|
|
1619
|
+
return O(!1);
|
|
1620
|
+
xt = n, Yt = G;
|
|
1621
|
+
var Mt = n.nextElementSibling, ot = !1;
|
|
1622
|
+
ot = G === 1;
|
|
1623
|
+
var Jt = ne(x, e, c, r, n, o, t, ot);
|
|
1624
|
+
if (Jt !== !1)
|
|
1625
|
+
return (Jt === 1 || Jt === -1) && (ot = Jt === 1), Re = !0, setTimeout(Hn, 30), V(), ot && !Mt ? e.appendChild(c) : n.parentNode.insertBefore(c, ot ? Mt : n), rt && Ri(rt, 0, Pt - rt.scrollTop), C = c.parentNode, ut !== void 0 && !ee && (se = Math.abs(ut - T(n)[It])), Y(), O(!0);
|
|
1623
1626
|
}
|
|
1624
|
-
if (e.contains(
|
|
1625
|
-
return
|
|
1627
|
+
if (e.contains(c))
|
|
1628
|
+
return O(!1);
|
|
1626
1629
|
}
|
|
1627
1630
|
return !1;
|
|
1628
1631
|
},
|
|
1629
1632
|
_ignoreWhileAnimating: null,
|
|
1630
1633
|
_offMoveEvents: function() {
|
|
1631
|
-
|
|
1634
|
+
_(document, "mousemove", this._onTouchMove), _(document, "touchmove", this._onTouchMove), _(document, "pointermove", this._onTouchMove), _(document, "dragover", gt), _(document, "mousemove", gt), _(document, "touchmove", gt);
|
|
1632
1635
|
},
|
|
1633
1636
|
_offUpEvents: function() {
|
|
1634
1637
|
var t = this.el.ownerDocument;
|
|
1635
|
-
|
|
1638
|
+
_(t, "mouseup", this._onDrop), _(t, "touchend", this._onDrop), _(t, "pointerup", this._onDrop), _(t, "touchcancel", this._onDrop), _(document, "selectstart", this);
|
|
1636
1639
|
},
|
|
1637
1640
|
_onDrop: function(t) {
|
|
1638
1641
|
var e = this.el, n = this.options;
|
|
1639
|
-
if (
|
|
1642
|
+
if (U = j(c), at = j(c, n.draggable), M("drop", this, {
|
|
1640
1643
|
evt: t
|
|
1641
|
-
}),
|
|
1644
|
+
}), C = c && c.parentNode, U = j(c), at = j(c, n.draggable), y.eventCanceled) {
|
|
1642
1645
|
this._nulling();
|
|
1643
1646
|
return;
|
|
1644
1647
|
}
|
|
1645
|
-
|
|
1648
|
+
Ct = !1, ee = !1, Xt = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Fe(this.cloneId), Fe(this._dragStartId), this.nativeDraggable && (_(document, "drop", this), _(e, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Ut && v(document.body, "user-select", ""), v(c, "transform", ""), t && (Bt && (t.cancelable && t.preventDefault(), !n.dropBubble && t.stopPropagation()), b && b.parentNode && b.parentNode.removeChild(b), (x === C || L && L.lastPutMode !== "clone") && A && A.parentNode && A.parentNode.removeChild(A), c && (this.nativeDraggable && _(c, "dragend", this), He(c), c.style["will-change"] = "", Bt && !Ct && F(c, L ? L.options.ghostClass : this.options.ghostClass, !1), F(c, this.options.chosenClass, !1), P({
|
|
1646
1649
|
sortable: this,
|
|
1647
1650
|
name: "unchoose",
|
|
1648
|
-
toEl:
|
|
1651
|
+
toEl: C,
|
|
1649
1652
|
newIndex: null,
|
|
1650
1653
|
newDraggableIndex: null,
|
|
1651
1654
|
originalEvent: t
|
|
1652
|
-
}), x !==
|
|
1653
|
-
rootEl:
|
|
1655
|
+
}), x !== C ? (U >= 0 && (P({
|
|
1656
|
+
rootEl: C,
|
|
1654
1657
|
name: "add",
|
|
1655
|
-
toEl:
|
|
1658
|
+
toEl: C,
|
|
1656
1659
|
fromEl: x,
|
|
1657
1660
|
originalEvent: t
|
|
1658
|
-
}),
|
|
1661
|
+
}), P({
|
|
1659
1662
|
sortable: this,
|
|
1660
1663
|
name: "remove",
|
|
1661
|
-
toEl:
|
|
1664
|
+
toEl: C,
|
|
1662
1665
|
originalEvent: t
|
|
1663
|
-
}),
|
|
1664
|
-
rootEl:
|
|
1666
|
+
}), P({
|
|
1667
|
+
rootEl: C,
|
|
1665
1668
|
name: "sort",
|
|
1666
|
-
toEl:
|
|
1669
|
+
toEl: C,
|
|
1667
1670
|
fromEl: x,
|
|
1668
1671
|
originalEvent: t
|
|
1669
|
-
}),
|
|
1672
|
+
}), P({
|
|
1670
1673
|
sortable: this,
|
|
1671
1674
|
name: "sort",
|
|
1672
|
-
toEl:
|
|
1675
|
+
toEl: C,
|
|
1673
1676
|
originalEvent: t
|
|
1674
|
-
})),
|
|
1677
|
+
})), L && L.save()) : U !== $t && U >= 0 && (P({
|
|
1675
1678
|
sortable: this,
|
|
1676
1679
|
name: "update",
|
|
1677
|
-
toEl:
|
|
1680
|
+
toEl: C,
|
|
1678
1681
|
originalEvent: t
|
|
1679
|
-
}),
|
|
1682
|
+
}), P({
|
|
1680
1683
|
sortable: this,
|
|
1681
1684
|
name: "sort",
|
|
1682
|
-
toEl:
|
|
1685
|
+
toEl: C,
|
|
1683
1686
|
originalEvent: t
|
|
1684
|
-
})), y.active && ((
|
|
1687
|
+
})), y.active && ((U == null || U === -1) && (U = $t, at = jt), P({
|
|
1685
1688
|
sortable: this,
|
|
1686
1689
|
name: "end",
|
|
1687
|
-
toEl:
|
|
1690
|
+
toEl: C,
|
|
1688
1691
|
originalEvent: t
|
|
1689
1692
|
}), this.save()))), this._nulling();
|
|
1690
1693
|
},
|
|
1691
1694
|
_nulling: function() {
|
|
1692
|
-
|
|
1695
|
+
M("nulling", this), x = c = C = b = vt = A = ae = st = ft = X = Bt = U = at = $t = jt = xt = Yt = L = te = y.dragged = y.ghost = y.clone = y.active = null, me.forEach(function(t) {
|
|
1693
1696
|
t.checked = !0;
|
|
1694
|
-
}),
|
|
1697
|
+
}), me.length = Te = Oe = 0;
|
|
1695
1698
|
},
|
|
1696
1699
|
handleEvent: function(t) {
|
|
1697
1700
|
switch (t.type) {
|
|
@@ -1701,7 +1704,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1701
1704
|
break;
|
|
1702
1705
|
case "dragenter":
|
|
1703
1706
|
case "dragover":
|
|
1704
|
-
|
|
1707
|
+
c && (this._onDragOver(t), Ln(t));
|
|
1705
1708
|
break;
|
|
1706
1709
|
case "selectstart":
|
|
1707
1710
|
t.preventDefault();
|
|
@@ -1714,7 +1717,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1714
1717
|
*/
|
|
1715
1718
|
toArray: function() {
|
|
1716
1719
|
for (var t = [], e, n = this.el.children, r = 0, o = n.length, a = this.options; r < o; r++)
|
|
1717
|
-
e = n[r],
|
|
1720
|
+
e = n[r], Z(e, a.draggable, this.el, !1) && t.push(e.getAttribute(a.dataIdAttr) || Nn(e));
|
|
1718
1721
|
return t;
|
|
1719
1722
|
},
|
|
1720
1723
|
/**
|
|
@@ -1724,8 +1727,8 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1724
1727
|
sort: function(t, e) {
|
|
1725
1728
|
var n = {}, r = this.el;
|
|
1726
1729
|
this.toArray().forEach(function(o, a) {
|
|
1727
|
-
var
|
|
1728
|
-
|
|
1730
|
+
var s = r.children[a];
|
|
1731
|
+
Z(s, this.options.draggable, r, !1) && (n[o] = s);
|
|
1729
1732
|
}, this), e && this.captureAnimationState(), t.forEach(function(o) {
|
|
1730
1733
|
n[o] && (r.removeChild(n[o]), r.appendChild(n[o]));
|
|
1731
1734
|
}), e && this.animateAll();
|
|
@@ -1744,7 +1747,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1744
1747
|
* @returns {HTMLElement|null}
|
|
1745
1748
|
*/
|
|
1746
1749
|
closest: function(t, e) {
|
|
1747
|
-
return
|
|
1750
|
+
return Z(t, e || this.options.draggable, this.el, !1);
|
|
1748
1751
|
},
|
|
1749
1752
|
/**
|
|
1750
1753
|
* Set/get option
|
|
@@ -1756,24 +1759,24 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1756
1759
|
var n = this.options;
|
|
1757
1760
|
if (e === void 0)
|
|
1758
1761
|
return n[t];
|
|
1759
|
-
var r =
|
|
1760
|
-
typeof r < "u" ? n[t] = r : n[t] = e, t === "group" &&
|
|
1762
|
+
var r = Qt.modifyOption(this, t, e);
|
|
1763
|
+
typeof r < "u" ? n[t] = r : n[t] = e, t === "group" && ji(n);
|
|
1761
1764
|
},
|
|
1762
1765
|
/**
|
|
1763
1766
|
* Destroy
|
|
1764
1767
|
*/
|
|
1765
1768
|
destroy: function() {
|
|
1766
|
-
|
|
1769
|
+
M("destroy", this);
|
|
1767
1770
|
var t = this.el;
|
|
1768
|
-
t[
|
|
1771
|
+
t[z] = null, _(t, "mousedown", this._onTapStart), _(t, "touchstart", this._onTapStart), _(t, "pointerdown", this._onTapStart), this.nativeDraggable && (_(t, "dragover", this), _(t, "dragenter", this)), Array.prototype.forEach.call(t.querySelectorAll("[draggable]"), function(e) {
|
|
1769
1772
|
e.removeAttribute("draggable");
|
|
1770
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
1773
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), ge.splice(ge.indexOf(this.el), 1), this.el = t = null;
|
|
1771
1774
|
},
|
|
1772
1775
|
_hideClone: function() {
|
|
1773
|
-
if (!
|
|
1774
|
-
if (
|
|
1776
|
+
if (!st) {
|
|
1777
|
+
if (M("hideClone", this), y.eventCanceled)
|
|
1775
1778
|
return;
|
|
1776
|
-
|
|
1779
|
+
v(A, "display", "none"), this.options.removeCloneOnHide && A.parentNode && A.parentNode.removeChild(A), st = !0;
|
|
1777
1780
|
}
|
|
1778
1781
|
},
|
|
1779
1782
|
_showClone: function(t) {
|
|
@@ -1781,95 +1784,95 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1781
1784
|
this._hideClone();
|
|
1782
1785
|
return;
|
|
1783
1786
|
}
|
|
1784
|
-
if (
|
|
1785
|
-
if (
|
|
1787
|
+
if (st) {
|
|
1788
|
+
if (M("showClone", this), y.eventCanceled)
|
|
1786
1789
|
return;
|
|
1787
|
-
|
|
1790
|
+
c.parentNode == x && !this.options.group.revertClone ? x.insertBefore(A, c) : vt ? x.insertBefore(A, vt) : x.appendChild(A), this.options.group.revertClone && this.animate(c, A), v(A, "display", ""), st = !1;
|
|
1788
1791
|
}
|
|
1789
1792
|
}
|
|
1790
1793
|
};
|
|
1791
|
-
function
|
|
1794
|
+
function Ln(i) {
|
|
1792
1795
|
i.dataTransfer && (i.dataTransfer.dropEffect = "move"), i.cancelable && i.preventDefault();
|
|
1793
1796
|
}
|
|
1794
|
-
function
|
|
1795
|
-
var
|
|
1796
|
-
return window.CustomEvent && !
|
|
1797
|
+
function ne(i, t, e, n, r, o, a, s) {
|
|
1798
|
+
var l, d = i[z], p = d.options.onMove, u;
|
|
1799
|
+
return window.CustomEvent && !nt && !Kt ? l = new CustomEvent("move", {
|
|
1797
1800
|
bubbles: !0,
|
|
1798
1801
|
cancelable: !0
|
|
1799
|
-
}) : (
|
|
1802
|
+
}) : (l = document.createEvent("Event"), l.initEvent("move", !0, !0)), l.to = t, l.from = i, l.dragged = e, l.draggedRect = n, l.related = r || t, l.relatedRect = o || T(t), l.willInsertAfter = s, l.originalEvent = a, i.dispatchEvent(l), p && (u = p.call(d, l, a)), u;
|
|
1800
1803
|
}
|
|
1801
|
-
function
|
|
1804
|
+
function He(i) {
|
|
1802
1805
|
i.draggable = !1;
|
|
1803
1806
|
}
|
|
1804
|
-
function
|
|
1805
|
-
|
|
1807
|
+
function Hn() {
|
|
1808
|
+
Re = !1;
|
|
1806
1809
|
}
|
|
1807
|
-
function
|
|
1808
|
-
var n =
|
|
1810
|
+
function In(i, t, e) {
|
|
1811
|
+
var n = T(Ot(e.el, 0, e.options, !0)), r = 10;
|
|
1809
1812
|
return t ? i.clientX < n.left - r || i.clientY < n.top && i.clientX < n.right : i.clientY < n.top - r || i.clientY < n.bottom && i.clientX < n.left;
|
|
1810
1813
|
}
|
|
1811
|
-
function
|
|
1812
|
-
var n =
|
|
1814
|
+
function Pn(i, t, e) {
|
|
1815
|
+
var n = T(Xe(e.el, e.options.draggable)), r = 10;
|
|
1813
1816
|
return t ? i.clientX > n.right + r || i.clientX <= n.right && i.clientY > n.bottom && i.clientX >= n.left : i.clientX > n.right && i.clientY > n.top || i.clientX <= n.right && i.clientY > n.bottom + r;
|
|
1814
1817
|
}
|
|
1815
|
-
function
|
|
1816
|
-
var
|
|
1818
|
+
function Mn(i, t, e, n, r, o, a, s) {
|
|
1819
|
+
var l = n ? i.clientY : i.clientX, d = n ? e.height : e.width, p = n ? e.top : e.left, u = n ? e.bottom : e.right, h = !1;
|
|
1817
1820
|
if (!a) {
|
|
1818
|
-
if (
|
|
1819
|
-
if (!
|
|
1820
|
-
|
|
1821
|
-
else if (
|
|
1822
|
-
return -
|
|
1823
|
-
} else if (
|
|
1824
|
-
return
|
|
1821
|
+
if (s && se < d * r) {
|
|
1822
|
+
if (!Xt && (Yt === 1 ? l > p + d * o / 2 : l < u - d * o / 2) && (Xt = !0), Xt)
|
|
1823
|
+
h = !0;
|
|
1824
|
+
else if (Yt === 1 ? l < p + se : l > u - se)
|
|
1825
|
+
return -Yt;
|
|
1826
|
+
} else if (l > p + d * (1 - r) / 2 && l < u - d * (1 - r) / 2)
|
|
1827
|
+
return kn(t);
|
|
1825
1828
|
}
|
|
1826
|
-
return
|
|
1829
|
+
return h = h || a, h && (l < p + d * o / 2 || l > u - d * o / 2) ? l > p + d / 2 ? 1 : -1 : 0;
|
|
1827
1830
|
}
|
|
1828
|
-
function
|
|
1829
|
-
return
|
|
1831
|
+
function kn(i) {
|
|
1832
|
+
return j(c) < j(i) ? 1 : -1;
|
|
1830
1833
|
}
|
|
1831
|
-
function
|
|
1834
|
+
function Nn(i) {
|
|
1832
1835
|
for (var t = i.tagName + i.className + i.src + i.href + i.textContent, e = t.length, n = 0; e--; )
|
|
1833
1836
|
n += t.charCodeAt(e);
|
|
1834
1837
|
return n.toString(36);
|
|
1835
1838
|
}
|
|
1836
|
-
function
|
|
1837
|
-
|
|
1839
|
+
function Vn(i) {
|
|
1840
|
+
me.length = 0;
|
|
1838
1841
|
for (var t = i.getElementsByTagName("input"), e = t.length; e--; ) {
|
|
1839
1842
|
var n = t[e];
|
|
1840
|
-
n.checked &&
|
|
1843
|
+
n.checked && me.push(n);
|
|
1841
1844
|
}
|
|
1842
1845
|
}
|
|
1843
|
-
function
|
|
1846
|
+
function le(i) {
|
|
1844
1847
|
return setTimeout(i, 0);
|
|
1845
1848
|
}
|
|
1846
|
-
function
|
|
1849
|
+
function Fe(i) {
|
|
1847
1850
|
return clearTimeout(i);
|
|
1848
1851
|
}
|
|
1849
|
-
|
|
1850
|
-
(y.active ||
|
|
1852
|
+
ye && E(document, "touchmove", function(i) {
|
|
1853
|
+
(y.active || Ct) && i.cancelable && i.preventDefault();
|
|
1851
1854
|
});
|
|
1852
1855
|
y.utils = {
|
|
1853
|
-
on:
|
|
1854
|
-
off:
|
|
1855
|
-
css:
|
|
1856
|
-
find:
|
|
1856
|
+
on: E,
|
|
1857
|
+
off: _,
|
|
1858
|
+
css: v,
|
|
1859
|
+
find: Vi,
|
|
1857
1860
|
is: function(t, e) {
|
|
1858
|
-
return !!
|
|
1861
|
+
return !!Z(t, e, t, !1);
|
|
1859
1862
|
},
|
|
1860
|
-
extend:
|
|
1861
|
-
throttle:
|
|
1862
|
-
closest:
|
|
1863
|
-
toggleClass:
|
|
1864
|
-
clone:
|
|
1865
|
-
index:
|
|
1866
|
-
nextTick:
|
|
1867
|
-
cancelNextTick:
|
|
1868
|
-
detectDirection:
|
|
1869
|
-
getChild:
|
|
1863
|
+
extend: _n,
|
|
1864
|
+
throttle: Bi,
|
|
1865
|
+
closest: Z,
|
|
1866
|
+
toggleClass: F,
|
|
1867
|
+
clone: Fi,
|
|
1868
|
+
index: j,
|
|
1869
|
+
nextTick: le,
|
|
1870
|
+
cancelNextTick: Fe,
|
|
1871
|
+
detectDirection: zi,
|
|
1872
|
+
getChild: Ot
|
|
1870
1873
|
};
|
|
1871
1874
|
y.get = function(i) {
|
|
1872
|
-
return i[
|
|
1875
|
+
return i[z];
|
|
1873
1876
|
};
|
|
1874
1877
|
y.mount = function() {
|
|
1875
1878
|
for (var i = arguments.length, t = new Array(i), e = 0; e < i; e++)
|
|
@@ -1877,28 +1880,111 @@ y.mount = function() {
|
|
|
1877
1880
|
t[0].constructor === Array && (t = t[0]), t.forEach(function(n) {
|
|
1878
1881
|
if (!n.prototype || !n.prototype.constructor)
|
|
1879
1882
|
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));
|
|
1880
|
-
n.utils && (y.utils =
|
|
1883
|
+
n.utils && (y.utils = K(K({}, y.utils), n.utils)), Qt.mount(n);
|
|
1881
1884
|
});
|
|
1882
1885
|
};
|
|
1883
1886
|
y.create = function(i, t) {
|
|
1884
1887
|
return new y(i, t);
|
|
1885
1888
|
};
|
|
1886
|
-
y.version =
|
|
1887
|
-
var
|
|
1888
|
-
|
|
1889
|
+
y.version = vn;
|
|
1890
|
+
var D = [], Rt, Ue, ze = !1, Ie, Pe, ve, Ft;
|
|
1891
|
+
function Bn() {
|
|
1892
|
+
function i() {
|
|
1893
|
+
this.defaults = {
|
|
1894
|
+
scroll: !0,
|
|
1895
|
+
forceAutoScrollFallback: !1,
|
|
1896
|
+
scrollSensitivity: 30,
|
|
1897
|
+
scrollSpeed: 10,
|
|
1898
|
+
bubbleScroll: !0
|
|
1899
|
+
};
|
|
1900
|
+
for (var t in this)
|
|
1901
|
+
t.charAt(0) === "_" && typeof this[t] == "function" && (this[t] = this[t].bind(this));
|
|
1902
|
+
}
|
|
1903
|
+
return i.prototype = {
|
|
1904
|
+
dragStarted: function(e) {
|
|
1905
|
+
var n = e.originalEvent;
|
|
1906
|
+
this.sortable.nativeDraggable ? E(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? E(document, "pointermove", this._handleFallbackAutoScroll) : n.touches ? E(document, "touchmove", this._handleFallbackAutoScroll) : E(document, "mousemove", this._handleFallbackAutoScroll);
|
|
1907
|
+
},
|
|
1908
|
+
dragOverCompleted: function(e) {
|
|
1909
|
+
var n = e.originalEvent;
|
|
1910
|
+
!this.options.dragOverBubble && !n.rootEl && this._handleAutoScroll(n);
|
|
1911
|
+
},
|
|
1912
|
+
drop: function() {
|
|
1913
|
+
this.sortable.nativeDraggable ? _(document, "dragover", this._handleAutoScroll) : (_(document, "pointermove", this._handleFallbackAutoScroll), _(document, "touchmove", this._handleFallbackAutoScroll), _(document, "mousemove", this._handleFallbackAutoScroll)), yi(), de(), En();
|
|
1914
|
+
},
|
|
1915
|
+
nulling: function() {
|
|
1916
|
+
ve = Ue = Rt = ze = Ft = Ie = Pe = null, D.length = 0;
|
|
1917
|
+
},
|
|
1918
|
+
_handleFallbackAutoScroll: function(e) {
|
|
1919
|
+
this._handleAutoScroll(e, !0);
|
|
1920
|
+
},
|
|
1921
|
+
_handleAutoScroll: function(e, n) {
|
|
1922
|
+
var r = this, o = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, s = document.elementFromPoint(o, a);
|
|
1923
|
+
if (ve = e, n || this.options.forceAutoScrollFallback || Kt || nt || Ut) {
|
|
1924
|
+
Me(e, this.options, s, n);
|
|
1925
|
+
var l = lt(s, !0);
|
|
1926
|
+
ze && (!Ft || o !== Ie || a !== Pe) && (Ft && yi(), Ft = setInterval(function() {
|
|
1927
|
+
var d = lt(document.elementFromPoint(o, a), !0);
|
|
1928
|
+
d !== l && (l = d, de()), Me(e, r.options, d, n);
|
|
1929
|
+
}, 10), Ie = o, Pe = a);
|
|
1930
|
+
} else {
|
|
1931
|
+
if (!this.options.bubbleScroll || lt(s, !0) === q()) {
|
|
1932
|
+
de();
|
|
1933
|
+
return;
|
|
1934
|
+
}
|
|
1935
|
+
Me(e, this.options, lt(s, !1), !1);
|
|
1936
|
+
}
|
|
1937
|
+
}
|
|
1938
|
+
}, it(i, {
|
|
1939
|
+
pluginName: "scroll",
|
|
1940
|
+
initializeByDefault: !0
|
|
1941
|
+
});
|
|
1942
|
+
}
|
|
1943
|
+
function de() {
|
|
1944
|
+
D.forEach(function(i) {
|
|
1945
|
+
clearInterval(i.pid);
|
|
1946
|
+
}), D = [];
|
|
1947
|
+
}
|
|
1948
|
+
function yi() {
|
|
1949
|
+
clearInterval(Ft);
|
|
1950
|
+
}
|
|
1951
|
+
var Me = Bi(function(i, t, e, n) {
|
|
1952
|
+
if (t.scroll) {
|
|
1953
|
+
var r = (i.touches ? i.touches[0] : i).clientX, o = (i.touches ? i.touches[0] : i).clientY, a = t.scrollSensitivity, s = t.scrollSpeed, l = q(), d = !1, p;
|
|
1954
|
+
Ue !== e && (Ue = e, de(), Rt = t.scroll, p = t.scrollFn, Rt === !0 && (Rt = lt(e, !0)));
|
|
1955
|
+
var u = 0, h = Rt;
|
|
1956
|
+
do {
|
|
1957
|
+
var g = h, f = T(g), m = f.top, S = f.bottom, V = f.left, O = f.right, Y = f.width, B = f.height, dt = void 0, G = void 0, ut = g.scrollWidth, Ht = g.scrollHeight, R = v(g), It = g.scrollLeft, rt = g.scrollTop;
|
|
1958
|
+
g === l ? (dt = Y < ut && (R.overflowX === "auto" || R.overflowX === "scroll" || R.overflowX === "visible"), G = B < Ht && (R.overflowY === "auto" || R.overflowY === "scroll" || R.overflowY === "visible")) : (dt = Y < ut && (R.overflowX === "auto" || R.overflowX === "scroll"), G = B < Ht && (R.overflowY === "auto" || R.overflowY === "scroll"));
|
|
1959
|
+
var Pt = dt && (Math.abs(O - r) <= a && It + Y < ut) - (Math.abs(V - r) <= a && !!It), J = G && (Math.abs(S - o) <= a && rt + B < Ht) - (Math.abs(m - o) <= a && !!rt);
|
|
1960
|
+
if (!D[u])
|
|
1961
|
+
for (var ct = 0; ct <= u; ct++)
|
|
1962
|
+
D[ct] || (D[ct] = {});
|
|
1963
|
+
(D[u].vx != Pt || D[u].vy != J || D[u].el !== g) && (D[u].el = g, D[u].vx = Pt, D[u].vy = J, clearInterval(D[u].pid), (Pt != 0 || J != 0) && (d = !0, D[u].pid = setInterval(function() {
|
|
1964
|
+
n && this.layer === 0 && y.active._onTouchMove(ve);
|
|
1965
|
+
var Mt = D[this.layer].vy ? D[this.layer].vy * s : 0, ot = D[this.layer].vx ? D[this.layer].vx * s : 0;
|
|
1966
|
+
typeof p == "function" && p.call(y.dragged.parentNode[z], ot, Mt, i, ve, D[this.layer].el) !== "continue" || Ri(D[this.layer].el, ot, Mt);
|
|
1967
|
+
}.bind({
|
|
1968
|
+
layer: u
|
|
1969
|
+
}), 24))), u++;
|
|
1970
|
+
} while (t.bubbleScroll && h !== l && (h = lt(h, !1)));
|
|
1971
|
+
ze = d;
|
|
1972
|
+
}
|
|
1973
|
+
}, 30), Wi = function(t) {
|
|
1974
|
+
var e = t.originalEvent, n = t.putSortable, r = t.dragEl, o = t.activeSortable, a = t.dispatchSortableEvent, s = t.hideGhostForTarget, l = t.unhideGhostForTarget;
|
|
1889
1975
|
if (e) {
|
|
1890
1976
|
var d = n || o;
|
|
1891
|
-
|
|
1977
|
+
s();
|
|
1892
1978
|
var p = e.changedTouches && e.changedTouches.length ? e.changedTouches[0] : e, u = document.elementFromPoint(p.clientX, p.clientY);
|
|
1893
|
-
|
|
1979
|
+
l(), d && !d.el.contains(u) && (a("spill"), this.onSpill({
|
|
1894
1980
|
dragEl: r,
|
|
1895
1981
|
putSortable: n
|
|
1896
1982
|
}));
|
|
1897
1983
|
}
|
|
1898
1984
|
};
|
|
1899
|
-
function
|
|
1985
|
+
function We() {
|
|
1900
1986
|
}
|
|
1901
|
-
|
|
1987
|
+
We.prototype = {
|
|
1902
1988
|
startIndex: null,
|
|
1903
1989
|
dragStart: function(t) {
|
|
1904
1990
|
var e = t.oldDraggableIndex;
|
|
@@ -1907,29 +1993,33 @@ Hi.prototype = {
|
|
|
1907
1993
|
onSpill: function(t) {
|
|
1908
1994
|
var e = t.dragEl, n = t.putSortable;
|
|
1909
1995
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
1910
|
-
var r =
|
|
1996
|
+
var r = Ot(this.sortable.el, this.startIndex, this.options);
|
|
1911
1997
|
r ? this.sortable.el.insertBefore(e, r) : this.sortable.el.appendChild(e), this.sortable.animateAll(), n && n.animateAll();
|
|
1912
1998
|
},
|
|
1913
|
-
drop:
|
|
1999
|
+
drop: Wi
|
|
1914
2000
|
};
|
|
1915
|
-
|
|
2001
|
+
it(We, {
|
|
1916
2002
|
pluginName: "revertOnSpill"
|
|
1917
2003
|
});
|
|
1918
|
-
function
|
|
2004
|
+
function Ge() {
|
|
1919
2005
|
}
|
|
1920
|
-
|
|
2006
|
+
Ge.prototype = {
|
|
1921
2007
|
onSpill: function(t) {
|
|
1922
2008
|
var e = t.dragEl, n = t.putSortable, r = n || this.sortable;
|
|
1923
2009
|
r.captureAnimationState(), e.parentNode && e.parentNode.removeChild(e), r.animateAll();
|
|
1924
2010
|
},
|
|
1925
|
-
drop:
|
|
2011
|
+
drop: Wi
|
|
1926
2012
|
};
|
|
1927
|
-
|
|
2013
|
+
it(Ge, {
|
|
1928
2014
|
pluginName: "removeOnSpill"
|
|
1929
2015
|
});
|
|
1930
|
-
|
|
2016
|
+
y.mount(new Bn());
|
|
2017
|
+
y.mount(Ge, We);
|
|
2018
|
+
const Gi = `
|
|
1931
2019
|
:host {
|
|
1932
2020
|
display: block;
|
|
2021
|
+
overflow-y: auto;
|
|
2022
|
+
height: 100%;
|
|
1933
2023
|
}
|
|
1934
2024
|
.layer {
|
|
1935
2025
|
display: inline-flex;
|
|
@@ -1938,7 +2028,7 @@ const Ii = `
|
|
|
1938
2028
|
ul[data-group] {
|
|
1939
2029
|
padding-inline-start: 40px;
|
|
1940
2030
|
}
|
|
1941
|
-
`,
|
|
2031
|
+
`, Rn = `
|
|
1942
2032
|
button {
|
|
1943
2033
|
/* TODO: why does this only work here and not from :root? */
|
|
1944
2034
|
--primary-color: #004170;
|
|
@@ -2014,7 +2104,13 @@ button.icon-text:before {
|
|
|
2014
2104
|
width: 18px;
|
|
2015
2105
|
height: 18px;
|
|
2016
2106
|
}
|
|
2017
|
-
|
|
2107
|
+
|
|
2108
|
+
button.small {
|
|
2109
|
+
height: 28px;
|
|
2110
|
+
padding: 12.4px;
|
|
2111
|
+
font-size: .75rem;
|
|
2112
|
+
}
|
|
2113
|
+
`, Fn = `
|
|
2018
2114
|
input[type="range"] {
|
|
2019
2115
|
-webkit-appearance: none;
|
|
2020
2116
|
width: 90%;
|
|
@@ -2091,7 +2187,7 @@ input[type="range"]:focus::-webkit-slider-thumb {
|
|
|
2091
2187
|
input::-moz-focus-inner, input::-moz-focus-outer {
|
|
2092
2188
|
border: 0;
|
|
2093
2189
|
}
|
|
2094
|
-
`,
|
|
2190
|
+
`, Un = `
|
|
2095
2191
|
input[type=radio] {
|
|
2096
2192
|
appearance: none;
|
|
2097
2193
|
margin: 0;
|
|
@@ -2111,7 +2207,7 @@ input[type=radio]:checked:after {
|
|
|
2111
2207
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eradiobox-marked%3C/title%3E%3Cpath d='M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7Z' /%3E%3C/svg%3E");
|
|
2112
2208
|
|
|
2113
2209
|
}
|
|
2114
|
-
`,
|
|
2210
|
+
`, zn = `
|
|
2115
2211
|
input[type=checkbox] {
|
|
2116
2212
|
appearance: none;
|
|
2117
2213
|
margin: 0;
|
|
@@ -2131,34 +2227,48 @@ input[type=checkbox]:checked:after {
|
|
|
2131
2227
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echeckbox-marked%3C/title%3E%3Cpath d='M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z' /%3E%3C/svg%3E");
|
|
2132
2228
|
|
|
2133
2229
|
}
|
|
2134
|
-
`,
|
|
2230
|
+
`, Zi = `
|
|
2135
2231
|
* {
|
|
2136
2232
|
font-family: Roboto, sans-serif;
|
|
2137
2233
|
}
|
|
2138
2234
|
|
|
2139
|
-
${
|
|
2140
|
-
${
|
|
2141
|
-
${
|
|
2142
|
-
${
|
|
2235
|
+
${Rn}
|
|
2236
|
+
${Fn}
|
|
2237
|
+
${Un}
|
|
2238
|
+
${zn}
|
|
2143
2239
|
|
|
2144
2240
|
summary > .layer {
|
|
2145
|
-
height: 36px;
|
|
2146
|
-
border-bottom: 1px solid #00417000;
|
|
2241
|
+
min-height: 36px;
|
|
2147
2242
|
display: flex;
|
|
2148
|
-
align-items:
|
|
2243
|
+
align-items: flex-start;
|
|
2149
2244
|
padding-right: 12px;
|
|
2245
|
+
padding-top: 0px;
|
|
2246
|
+
}
|
|
2247
|
+
|
|
2248
|
+
ul[data-group] {
|
|
2249
|
+
overflow-y: auto;
|
|
2250
|
+
max-height: calc(var(--container-height) * 0.3);
|
|
2150
2251
|
}
|
|
2151
2252
|
|
|
2152
2253
|
[data-type=group] .title {
|
|
2254
|
+
display: flex;
|
|
2255
|
+
align-items: flex-start;
|
|
2153
2256
|
font-style: italic;
|
|
2257
|
+
line-height: 1.3rem;
|
|
2258
|
+
}
|
|
2259
|
+
|
|
2260
|
+
[data-type] .title span {
|
|
2261
|
+
margin-bottom: 8px;
|
|
2154
2262
|
}
|
|
2155
2263
|
|
|
2156
2264
|
|
|
2157
2265
|
[data-type] .title::before {
|
|
2158
2266
|
width: 24px;
|
|
2267
|
+
min-width: 24px;
|
|
2159
2268
|
height: 24px;
|
|
2160
2269
|
margin-right: 6px;
|
|
2161
2270
|
margin-left: -1px;
|
|
2271
|
+
transform: translateY(-2px);
|
|
2162
2272
|
}
|
|
2163
2273
|
|
|
2164
2274
|
[data-layerconfig] button {
|
|
@@ -2330,13 +2440,19 @@ li .layer {
|
|
|
2330
2440
|
li .layer .left,
|
|
2331
2441
|
li .layer .right {
|
|
2332
2442
|
display: flex;
|
|
2443
|
+
align-items: flex-start;
|
|
2333
2444
|
}
|
|
2334
|
-
li .layer .left
|
|
2445
|
+
li .layer .left .title {
|
|
2335
2446
|
cursor: pointer;
|
|
2336
2447
|
display: flex;
|
|
2337
|
-
align-items: center;
|
|
2338
2448
|
margin-left: 6px;
|
|
2339
2449
|
}
|
|
2450
|
+
li .layer .left {
|
|
2451
|
+
margin-top: 7px;
|
|
2452
|
+
}
|
|
2453
|
+
li .layer .right {
|
|
2454
|
+
margin-top: 5px;
|
|
2455
|
+
}
|
|
2340
2456
|
.drag-handle span {
|
|
2341
2457
|
display: none;
|
|
2342
2458
|
}
|
|
@@ -2359,35 +2475,35 @@ li.sortable-drag {
|
|
|
2359
2475
|
li.sortable-ghost {
|
|
2360
2476
|
}
|
|
2361
2477
|
`;
|
|
2362
|
-
var
|
|
2363
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
2478
|
+
var jn = Object.defineProperty, Yn = Object.getOwnPropertyDescriptor, $ = (i, t, e, n) => {
|
|
2479
|
+
for (var r = n > 1 ? void 0 : n ? Yn(t, e) : t, o = i.length - 1, a; o >= 0; o--)
|
|
2364
2480
|
(a = i[o]) && (r = (n ? a(t, e, r) : a(r)) || r);
|
|
2365
|
-
return n && r &&
|
|
2481
|
+
return n && r && jn(t, e, r), r;
|
|
2366
2482
|
};
|
|
2367
|
-
let
|
|
2483
|
+
let k = class extends St {
|
|
2368
2484
|
constructor() {
|
|
2369
2485
|
super(...arguments), this.for = "eox-map", this.layerIdentifier = "id", this.layerTitle = "title", this.sortBy = "layerOrder", this.layerConfig = ["opacity"], this.externalLayerConfig = void 0, this.filterLayers = (i, t, e) => {
|
|
2370
2486
|
let n = [];
|
|
2371
|
-
const r = (o, a,
|
|
2372
|
-
n = [...n, ...o.filter((d) => d.get(a) ===
|
|
2373
|
-
const
|
|
2374
|
-
return
|
|
2375
|
-
(d) => (
|
|
2376
|
-
// @ts-ignore
|
|
2377
|
-
r(d.getLayers().getArray(), a, l)
|
|
2378
|
-
)
|
|
2487
|
+
const r = (o, a, s) => {
|
|
2488
|
+
n = [...n, ...o.filter((d) => d.get(a) === s)];
|
|
2489
|
+
const l = o.filter((d) => d.getLayers);
|
|
2490
|
+
return l.length > 0 && l.forEach(
|
|
2491
|
+
(d) => r(d.getLayers().getArray(), a, s)
|
|
2379
2492
|
), n;
|
|
2380
2493
|
};
|
|
2381
2494
|
return r(i, t, e), n;
|
|
2382
2495
|
}, this.findLayerById = (i, t) => this.filterLayers(i, "id", t)[0], this.getLayerType = (i, t) => {
|
|
2383
2496
|
var e;
|
|
2384
|
-
return i.getLayers ? "group" : t.getInteractions().getArray().filter(
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2497
|
+
return i.getLayers ? "group" : t.getInteractions().getArray().filter(
|
|
2498
|
+
(n) => n.freehand_ !== void 0
|
|
2499
|
+
).map(
|
|
2500
|
+
(n) => {
|
|
2501
|
+
var r;
|
|
2502
|
+
return (r = n.source_) == null ? void 0 : r.ol_uid;
|
|
2503
|
+
}
|
|
2504
|
+
).includes(
|
|
2505
|
+
i.getSource ? (e = i.getSource()) == null ? void 0 : e.ol_uid : void 0
|
|
2506
|
+
) ? "draw" : i.declutter_ !== void 0 ? "vector" : "raster";
|
|
2391
2507
|
};
|
|
2392
2508
|
}
|
|
2393
2509
|
_updateControl(i) {
|
|
@@ -2417,7 +2533,6 @@ let V = class extends vt {
|
|
|
2417
2533
|
}
|
|
2418
2534
|
changeStyleProperty(i, t, e) {
|
|
2419
2535
|
i.updateStyleVariables({
|
|
2420
|
-
// @ts-ignore
|
|
2421
2536
|
...i.style_,
|
|
2422
2537
|
[t]: e
|
|
2423
2538
|
});
|
|
@@ -2443,43 +2558,59 @@ let V = class extends vt {
|
|
|
2443
2558
|
}
|
|
2444
2559
|
this.requestUpdate();
|
|
2445
2560
|
}
|
|
2561
|
+
// Set up Resize Observer
|
|
2562
|
+
firstUpdated() {
|
|
2563
|
+
this.resizeObserver = new ResizeObserver((i) => {
|
|
2564
|
+
for (let t of i)
|
|
2565
|
+
t.target === this && (this.style.setProperty(
|
|
2566
|
+
"--container-height",
|
|
2567
|
+
`${t.contentRect.height}px`
|
|
2568
|
+
), this.requestUpdate());
|
|
2569
|
+
}), this.resizeObserver.observe(this);
|
|
2570
|
+
}
|
|
2571
|
+
// Deinitialize Resize Observer
|
|
2572
|
+
disconnectedCallback() {
|
|
2573
|
+
this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = null), super.disconnectedCallback();
|
|
2574
|
+
}
|
|
2446
2575
|
render() {
|
|
2447
2576
|
var r;
|
|
2448
2577
|
const i = document.querySelector(this.for);
|
|
2449
|
-
if (i && (this.olMap =
|
|
2450
|
-
return
|
|
2578
|
+
if (i && (i.map ? this.olMap = i.map : this.olMap = i), !this.olMap)
|
|
2579
|
+
return w;
|
|
2451
2580
|
const t = this.olMap.getLayers();
|
|
2452
2581
|
this._updateControl(t), t.on("change:length", () => {
|
|
2453
2582
|
this._currentlySorting || this._updateControl(t);
|
|
2454
2583
|
});
|
|
2455
2584
|
const e = (o, a) => {
|
|
2456
|
-
var
|
|
2457
|
-
return
|
|
2458
|
-
<details>
|
|
2585
|
+
var s;
|
|
2586
|
+
return H`
|
|
2587
|
+
<details open="${o.get("layerControlExpanded") ? !0 : w}">
|
|
2459
2588
|
<summary>
|
|
2460
2589
|
<div class="layer">
|
|
2461
2590
|
<div class="left">
|
|
2462
2591
|
<input
|
|
2463
2592
|
type="${o.get("layerControlExclusive") ? "radio" : "checkbox"}"
|
|
2464
|
-
.checked="${
|
|
2593
|
+
.checked="${Be(o.getVisible())}"
|
|
2465
2594
|
@click=${() => {
|
|
2466
2595
|
this.toggleLayerVisibility(o, a);
|
|
2467
2596
|
}}
|
|
2468
2597
|
/>
|
|
2469
2598
|
<span class="title"
|
|
2470
|
-
|
|
2599
|
+
><span
|
|
2600
|
+
>${o.get(this.layerTitle) || `${o.get(this.layerIdentifier)}`}</span
|
|
2601
|
+
>
|
|
2471
2602
|
</span>
|
|
2472
2603
|
</div>
|
|
2473
2604
|
<div class="right">
|
|
2474
|
-
${this.sortBy === "layerOrder" && !this.unstyled ?
|
|
2605
|
+
${this.sortBy === "layerOrder" && !this.unstyled ? H` <div
|
|
2475
2606
|
class="drag-handle ${o.get("layerControlDisable") ? "disabled" : ""}"
|
|
2476
2607
|
>
|
|
2477
2608
|
<span>=</span>
|
|
2478
|
-
</div>` :
|
|
2609
|
+
</div>` : w}
|
|
2479
2610
|
</div>
|
|
2480
2611
|
</div>
|
|
2481
2612
|
</summary>
|
|
2482
|
-
${this.layerConfig ?
|
|
2613
|
+
${this.layerConfig ? H`
|
|
2483
2614
|
<eox-layerconfig
|
|
2484
2615
|
.layerConfig="${this.layerConfig}"
|
|
2485
2616
|
.layerControl="${this}"
|
|
@@ -2487,63 +2618,61 @@ let V = class extends vt {
|
|
|
2487
2618
|
.external=${this.externalLayerConfig}
|
|
2488
2619
|
.unstyled="${this.unstyled}"
|
|
2489
2620
|
></eox-layerconfig>
|
|
2490
|
-
` :
|
|
2491
|
-
${
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
o.getLayers ? O`
|
|
2499
|
-
${n(
|
|
2621
|
+
` : w}
|
|
2622
|
+
${this.externalLayerConfig && ((s = o.style_) != null && s.color) ? H`
|
|
2623
|
+
<button @click=${() => this._emitLayerconfig(o)}>
|
|
2624
|
+
configure
|
|
2625
|
+
</button>
|
|
2626
|
+
` : w}
|
|
2627
|
+
${o.getLayers ? H`
|
|
2628
|
+
${n(
|
|
2500
2629
|
this.preFilterLayers(
|
|
2501
|
-
|
|
2502
|
-
|
|
2630
|
+
[
|
|
2631
|
+
...o.getLayers().getArray()
|
|
2632
|
+
].reverse()
|
|
2503
2633
|
),
|
|
2504
2634
|
o.get(this.layerIdentifier)
|
|
2505
2635
|
)}
|
|
2506
|
-
|
|
2636
|
+
` : w}
|
|
2507
2637
|
</details>
|
|
2508
2638
|
`;
|
|
2509
|
-
}, n = (o, a) =>
|
|
2510
|
-
<ul data-group="${a ??
|
|
2511
|
-
${
|
|
2639
|
+
}, n = (o, a) => H`
|
|
2640
|
+
<ul data-group="${a ?? w}">
|
|
2641
|
+
${Ve(
|
|
2512
2642
|
o,
|
|
2513
|
-
(
|
|
2514
|
-
(
|
|
2515
|
-
var
|
|
2516
|
-
return
|
|
2643
|
+
(s) => s.get(this.layerIdentifier),
|
|
2644
|
+
(s) => {
|
|
2645
|
+
var l;
|
|
2646
|
+
return H`
|
|
2517
2647
|
<li
|
|
2518
|
-
data-layer="${
|
|
2519
|
-
|
|
2520
|
-
data-
|
|
2521
|
-
data-
|
|
2522
|
-
data-layerconfig="${((s = this.layerConfig) == null ? void 0 : s.length) > 0}"
|
|
2648
|
+
data-layer="${s.get(this.layerIdentifier)}"
|
|
2649
|
+
data-disabled="${s.get("layerControlDisable") || w}"
|
|
2650
|
+
data-type="${this.getLayerType(s, this.olMap)}"
|
|
2651
|
+
data-layerconfig="${((l = this.layerConfig) == null ? void 0 : l.length) > 0}"
|
|
2523
2652
|
>
|
|
2524
|
-
${e(
|
|
2653
|
+
${e(s, a)}
|
|
2525
2654
|
</li>
|
|
2526
2655
|
`;
|
|
2527
2656
|
}
|
|
2528
2657
|
)}
|
|
2529
2658
|
</ul>
|
|
2530
2659
|
`;
|
|
2531
|
-
return
|
|
2660
|
+
return H`
|
|
2532
2661
|
<style>
|
|
2533
|
-
${
|
|
2534
|
-
${!this.unstyled &&
|
|
2662
|
+
${Gi}
|
|
2663
|
+
${!this.unstyled && Zi}
|
|
2535
2664
|
</style>
|
|
2536
2665
|
<div>
|
|
2537
2666
|
<slot></slot>
|
|
2538
|
-
${this.layerCollection.getArray().length > 10 ?
|
|
2667
|
+
${this.layerCollection.getArray().length > 10 ? H`<input type="text" placeholder="Find layer" />` : w}
|
|
2539
2668
|
<div class="layers">
|
|
2540
2669
|
${n(
|
|
2541
2670
|
this.preFilterLayers(t.getArray())
|
|
2542
2671
|
)}
|
|
2543
2672
|
</div>
|
|
2544
|
-
${
|
|
2673
|
+
${Pi(
|
|
2545
2674
|
((r = this.optionalLayerArray) == null ? void 0 : r.length) > 0,
|
|
2546
|
-
() =>
|
|
2675
|
+
() => H`
|
|
2547
2676
|
<label for="optional">Optional layers</label>
|
|
2548
2677
|
|
|
2549
2678
|
<select name="optional" data-cy="optionalLayers">
|
|
@@ -2551,13 +2680,9 @@ let V = class extends vt {
|
|
|
2551
2680
|
-- select an optional layer to add --
|
|
2552
2681
|
</option>
|
|
2553
2682
|
${this.optionalLayerArray.map(
|
|
2554
|
-
(o) =>
|
|
2555
|
-
<option
|
|
2556
|
-
|
|
2557
|
-
o.get(this.layerIdentifier)}"
|
|
2558
|
-
>
|
|
2559
|
-
${o.get(this.layerTitle) || `layer ${// @ts-ignore
|
|
2560
|
-
o.get(this.layerIdentifier)}`}
|
|
2683
|
+
(o) => H`
|
|
2684
|
+
<option value="${o.get(this.layerIdentifier)}">
|
|
2685
|
+
${o.get(this.layerTitle) || `layer ${o.get(this.layerIdentifier)}`}
|
|
2561
2686
|
</option>
|
|
2562
2687
|
`
|
|
2563
2688
|
)}
|
|
@@ -2565,9 +2690,7 @@ let V = class extends vt {
|
|
|
2565
2690
|
<button
|
|
2566
2691
|
@click="${() => {
|
|
2567
2692
|
const o = this.optionalLayerArray.find(
|
|
2568
|
-
|
|
2569
|
-
(a) => a.get(this.layerIdentifier) === // @ts-ignore
|
|
2570
|
-
this.shadowRoot.querySelector("select[name=optional]").value
|
|
2693
|
+
(a) => a.get(this.layerIdentifier) === this.shadowRoot.querySelector("select[name=optional]").value
|
|
2571
2694
|
);
|
|
2572
2695
|
if (o.get("group")) {
|
|
2573
2696
|
const a = this.findLayerById(
|
|
@@ -2612,20 +2735,20 @@ let V = class extends vt {
|
|
|
2612
2735
|
set: (n) => {
|
|
2613
2736
|
n.toArray().reverse().forEach((o, a) => {
|
|
2614
2737
|
if (e) {
|
|
2615
|
-
const
|
|
2738
|
+
const l = this.findLayerById(
|
|
2616
2739
|
this.layerCollection.getArray(),
|
|
2617
2740
|
e
|
|
2618
2741
|
).getLayers(), d = this.findLayerById(
|
|
2619
|
-
|
|
2742
|
+
l.getArray(),
|
|
2620
2743
|
o
|
|
2621
2744
|
);
|
|
2622
|
-
|
|
2745
|
+
l.remove(d), l.insertAt(a, d);
|
|
2623
2746
|
} else {
|
|
2624
|
-
const
|
|
2747
|
+
const s = this.findLayerById(
|
|
2625
2748
|
this.layerCollection.getArray(),
|
|
2626
2749
|
o
|
|
2627
2750
|
);
|
|
2628
|
-
this.layerCollection.remove(
|
|
2751
|
+
this.layerCollection.remove(s), this.layerCollection.insertAt(a, s);
|
|
2629
2752
|
}
|
|
2630
2753
|
});
|
|
2631
2754
|
}
|
|
@@ -2635,43 +2758,46 @@ let V = class extends vt {
|
|
|
2635
2758
|
});
|
|
2636
2759
|
}
|
|
2637
2760
|
};
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
],
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
],
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
],
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
],
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
],
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
],
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
],
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
],
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
],
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
],
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
],
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
],
|
|
2674
|
-
|
|
2761
|
+
$([
|
|
2762
|
+
Et()
|
|
2763
|
+
], k.prototype, "olMap", 2);
|
|
2764
|
+
$([
|
|
2765
|
+
Et()
|
|
2766
|
+
], k.prototype, "layerCollection", 2);
|
|
2767
|
+
$([
|
|
2768
|
+
Et()
|
|
2769
|
+
], k.prototype, "layerArray", 2);
|
|
2770
|
+
$([
|
|
2771
|
+
Et()
|
|
2772
|
+
], k.prototype, "optionalLayerArray", 2);
|
|
2773
|
+
$([
|
|
2774
|
+
Et()
|
|
2775
|
+
], k.prototype, "resizeObserver", 2);
|
|
2776
|
+
$([
|
|
2777
|
+
N()
|
|
2778
|
+
], k.prototype, "for", 2);
|
|
2779
|
+
$([
|
|
2780
|
+
N()
|
|
2781
|
+
], k.prototype, "layerIdentifier", 2);
|
|
2782
|
+
$([
|
|
2783
|
+
N()
|
|
2784
|
+
], k.prototype, "layerTitle", 2);
|
|
2785
|
+
$([
|
|
2786
|
+
N()
|
|
2787
|
+
], k.prototype, "sortBy", 2);
|
|
2788
|
+
$([
|
|
2789
|
+
N({ type: Array })
|
|
2790
|
+
], k.prototype, "layerConfig", 2);
|
|
2791
|
+
$([
|
|
2792
|
+
N({ type: Boolean })
|
|
2793
|
+
], k.prototype, "externalLayerConfig", 2);
|
|
2794
|
+
$([
|
|
2795
|
+
N({ type: Boolean })
|
|
2796
|
+
], k.prototype, "unstyled", 2);
|
|
2797
|
+
k = $([
|
|
2798
|
+
Oi("eox-layercontrol")
|
|
2799
|
+
], k);
|
|
2800
|
+
let Q = class extends St {
|
|
2675
2801
|
constructor() {
|
|
2676
2802
|
super(...arguments), this._configList = {};
|
|
2677
2803
|
}
|
|
@@ -2697,23 +2823,23 @@ let Y = class extends vt {
|
|
|
2697
2823
|
}))) : (this._layerControlElement = this.layerControl, this._currentLayer = this.layer, this._parseConfigs(this._currentLayer));
|
|
2698
2824
|
}
|
|
2699
2825
|
render() {
|
|
2700
|
-
return
|
|
2826
|
+
return H`
|
|
2701
2827
|
<style>
|
|
2702
|
-
${
|
|
2703
|
-
${!this.unstyled &&
|
|
2828
|
+
${Gi}
|
|
2829
|
+
${!this.unstyled && Zi}
|
|
2704
2830
|
</style>
|
|
2705
|
-
${
|
|
2831
|
+
${Pi(
|
|
2706
2832
|
this._currentLayer,
|
|
2707
|
-
() =>
|
|
2833
|
+
() => H`
|
|
2708
2834
|
<div>
|
|
2709
2835
|
<slot></slot>
|
|
2710
|
-
${this.for ?
|
|
2711
|
-
${
|
|
2836
|
+
${this.for ? H`layer: ${this._currentLayer.get("name")}` : w}
|
|
2837
|
+
${Ve(
|
|
2712
2838
|
this.layerConfig.filter(
|
|
2713
2839
|
(i) => this.for ? i !== "opacity" : !0
|
|
2714
2840
|
),
|
|
2715
2841
|
(i) => i,
|
|
2716
|
-
(i) =>
|
|
2842
|
+
(i) => H`
|
|
2717
2843
|
<div class="slider-control">
|
|
2718
2844
|
<div class="slider-property">${i}</div>
|
|
2719
2845
|
<input
|
|
@@ -2721,70 +2847,67 @@ let Y = class extends vt {
|
|
|
2721
2847
|
min="0"
|
|
2722
2848
|
max="1"
|
|
2723
2849
|
step="0.01"
|
|
2724
|
-
value="${
|
|
2850
|
+
value="${Be(this._currentLayer.getOpacity())}"
|
|
2725
2851
|
@input=${(t) => this._handleInput(t, i)}
|
|
2726
2852
|
/>
|
|
2727
2853
|
</div>
|
|
2728
2854
|
`
|
|
2729
2855
|
)}
|
|
2730
|
-
${Object.keys(this._configList).length > 0 && !this.external ?
|
|
2731
|
-
<details open="${this.for ? !0 :
|
|
2856
|
+
${Object.keys(this._configList).length > 0 && !this.external ? H`
|
|
2857
|
+
<details open="${this.for ? !0 : w}">
|
|
2732
2858
|
<summary>Layer config</summary>
|
|
2733
2859
|
<ul>
|
|
2734
|
-
${
|
|
2860
|
+
${Ve(
|
|
2735
2861
|
Object.keys(this._configList),
|
|
2736
2862
|
(i) => i,
|
|
2737
|
-
(i) =>
|
|
2863
|
+
(i) => H` <li>
|
|
2738
2864
|
<div>${i}</div>
|
|
2739
2865
|
<input
|
|
2740
2866
|
type="range"
|
|
2741
2867
|
min="${["red", "green", "blue"].includes(i) ? 1 : 2e3}"
|
|
2742
2868
|
max="${["red", "green", "blue"].includes(i) ? 4 : 5e3}"
|
|
2743
|
-
value="${
|
|
2744
|
-
// @ts-ignore
|
|
2745
|
-
this._configList[i]
|
|
2746
|
-
)}"
|
|
2869
|
+
value="${Be(this._configList[i])}"
|
|
2747
2870
|
@input=${(t) => this._handleInput(t, i)}
|
|
2748
2871
|
/>
|
|
2749
2872
|
</li>`
|
|
2750
2873
|
)}
|
|
2751
2874
|
</ul>
|
|
2752
2875
|
</details>
|
|
2753
|
-
` :
|
|
2876
|
+
` : w}
|
|
2754
2877
|
</div>
|
|
2755
2878
|
`
|
|
2756
2879
|
)}
|
|
2757
2880
|
`;
|
|
2758
2881
|
}
|
|
2759
2882
|
};
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
],
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
],
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
],
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
],
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
],
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
],
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
],
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
],
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
],
|
|
2883
|
+
$([
|
|
2884
|
+
N()
|
|
2885
|
+
], Q.prototype, "for", 2);
|
|
2886
|
+
$([
|
|
2887
|
+
N({ type: Array })
|
|
2888
|
+
], Q.prototype, "layerConfig", 2);
|
|
2889
|
+
$([
|
|
2890
|
+
N({ type: Object, attribute: !1 })
|
|
2891
|
+
], Q.prototype, "layerControl", 2);
|
|
2892
|
+
$([
|
|
2893
|
+
N({ type: Object, attribute: !1 })
|
|
2894
|
+
], Q.prototype, "layer", 2);
|
|
2895
|
+
$([
|
|
2896
|
+
N({ type: Boolean })
|
|
2897
|
+
], Q.prototype, "external", 2);
|
|
2898
|
+
$([
|
|
2899
|
+
N({ type: Boolean })
|
|
2900
|
+
], Q.prototype, "unstyled", 2);
|
|
2901
|
+
$([
|
|
2902
|
+
Et()
|
|
2903
|
+
], Q.prototype, "_currentLayer", 2);
|
|
2904
|
+
$([
|
|
2905
|
+
Et()
|
|
2906
|
+
], Q.prototype, "_configList", 2);
|
|
2907
|
+
Q = $([
|
|
2908
|
+
Oi("eox-layerconfig")
|
|
2909
|
+
], Q);
|
|
2787
2910
|
export {
|
|
2788
|
-
|
|
2789
|
-
|
|
2911
|
+
Q as EOxLayerConfig,
|
|
2912
|
+
k as EOxLayerControl
|
|
2790
2913
|
};
|