@eox/layercontrol 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eox-layercontrol.js +777 -731
- package/dist/eox-layercontrol.umd.cjs +80 -69
- package/package.json +1 -1
package/dist/eox-layercontrol.js
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
var wn = Object.defineProperty;
|
|
2
|
-
var Cn = (i, t, e) => t in i ? wn(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
|
-
var S = (i, t, e) => (Cn(i, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
1
|
/**
|
|
5
2
|
* @license
|
|
6
3
|
* Copyright 2019 Google LLC
|
|
7
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
8
5
|
*/
|
|
9
|
-
const
|
|
10
|
-
let
|
|
6
|
+
const Bt = window, $e = Bt.ShadowRoot && (Bt.ShadyCSS === void 0 || Bt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ze = Symbol(), Oe = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
let $n = class {
|
|
11
8
|
constructor(t, e, n) {
|
|
12
|
-
if (this._$cssResult$ = !0, n !==
|
|
9
|
+
if (this._$cssResult$ = !0, n !== Ze)
|
|
13
10
|
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
14
11
|
this.cssText = t, this.t = e;
|
|
15
12
|
}
|
|
16
13
|
get styleSheet() {
|
|
17
14
|
let t = this.o;
|
|
18
15
|
const e = this.t;
|
|
19
|
-
if (
|
|
16
|
+
if ($e && t === void 0) {
|
|
20
17
|
const n = e !== void 0 && e.length === 1;
|
|
21
18
|
n && (t = Oe.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), n && Oe.set(e, t));
|
|
22
19
|
}
|
|
@@ -26,27 +23,27 @@ let Sn = class {
|
|
|
26
23
|
return this.cssText;
|
|
27
24
|
}
|
|
28
25
|
};
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
const n = document.createElement("style"), r =
|
|
26
|
+
const wn = (i) => new $n(typeof i == "string" ? i : i + "", void 0, Ze), Cn = (i, t) => {
|
|
27
|
+
$e ? i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => {
|
|
28
|
+
const n = document.createElement("style"), r = Bt.litNonce;
|
|
32
29
|
r !== void 0 && n.setAttribute("nonce", r), n.textContent = e.cssText, i.appendChild(n);
|
|
33
30
|
});
|
|
34
|
-
},
|
|
31
|
+
}, xe = $e ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
|
|
35
32
|
let e = "";
|
|
36
33
|
for (const n of t.cssRules)
|
|
37
34
|
e += n.cssText;
|
|
38
|
-
return
|
|
35
|
+
return wn(e);
|
|
39
36
|
})(i) : i;
|
|
40
37
|
/**
|
|
41
38
|
* @license
|
|
42
39
|
* Copyright 2017 Google LLC
|
|
43
40
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
44
41
|
*/
|
|
45
|
-
var
|
|
46
|
-
const
|
|
42
|
+
var ne;
|
|
43
|
+
const Xt = window, Pe = Xt.trustedTypes, Sn = Pe ? Pe.emptyScript : "", Ie = Xt.reactiveElementPolyfillSupport, me = { toAttribute(i, t) {
|
|
47
44
|
switch (t) {
|
|
48
45
|
case Boolean:
|
|
49
|
-
i = i ?
|
|
46
|
+
i = i ? Sn : null;
|
|
50
47
|
break;
|
|
51
48
|
case Object:
|
|
52
49
|
case Array:
|
|
@@ -71,8 +68,8 @@ const Wt = window, Ie = Wt.trustedTypes, Tn = Ie ? Ie.emptyScript : "", Ne = Wt.
|
|
|
71
68
|
}
|
|
72
69
|
}
|
|
73
70
|
return e;
|
|
74
|
-
} },
|
|
75
|
-
let
|
|
71
|
+
} }, Ke = (i, t) => t !== i && (t == t || i == i), ie = { attribute: !0, type: String, converter: me, reflect: !1, hasChanged: Ke }, ve = "finalized";
|
|
72
|
+
let ht = class extends HTMLElement {
|
|
76
73
|
constructor() {
|
|
77
74
|
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
|
|
78
75
|
}
|
|
@@ -88,7 +85,7 @@ let ut = class extends HTMLElement {
|
|
|
88
85
|
r !== void 0 && (this._$Ev.set(r, n), t.push(r));
|
|
89
86
|
}), t;
|
|
90
87
|
}
|
|
91
|
-
static createProperty(t, e =
|
|
88
|
+
static createProperty(t, e = ie) {
|
|
92
89
|
if (e.state && (e.attribute = !1), this.finalize(), this.elementProperties.set(t, e), !e.noAccessor && !this.prototype.hasOwnProperty(t)) {
|
|
93
90
|
const n = typeof t == "symbol" ? Symbol() : "__" + t, r = this.getPropertyDescriptor(t, n, e);
|
|
94
91
|
r !== void 0 && Object.defineProperty(this.prototype, t, r);
|
|
@@ -103,12 +100,12 @@ let ut = class extends HTMLElement {
|
|
|
103
100
|
}, configurable: !0, enumerable: !0 };
|
|
104
101
|
}
|
|
105
102
|
static getPropertyOptions(t) {
|
|
106
|
-
return this.elementProperties.get(t) ||
|
|
103
|
+
return this.elementProperties.get(t) || ie;
|
|
107
104
|
}
|
|
108
105
|
static finalize() {
|
|
109
|
-
if (this.hasOwnProperty(
|
|
106
|
+
if (this.hasOwnProperty(ve))
|
|
110
107
|
return !1;
|
|
111
|
-
this[
|
|
108
|
+
this[ve] = !0;
|
|
112
109
|
const t = Object.getPrototypeOf(this);
|
|
113
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")) {
|
|
114
111
|
const e = this.properties, n = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)];
|
|
@@ -122,9 +119,9 @@ let ut = class extends HTMLElement {
|
|
|
122
119
|
if (Array.isArray(t)) {
|
|
123
120
|
const n = new Set(t.flat(1 / 0).reverse());
|
|
124
121
|
for (const r of n)
|
|
125
|
-
e.unshift(
|
|
122
|
+
e.unshift(xe(r));
|
|
126
123
|
} else
|
|
127
|
-
t !== void 0 && e.push(
|
|
124
|
+
t !== void 0 && e.push(xe(t));
|
|
128
125
|
return e;
|
|
129
126
|
}
|
|
130
127
|
static _$Ep(t, e) {
|
|
@@ -151,7 +148,7 @@ let ut = class extends HTMLElement {
|
|
|
151
148
|
createRenderRoot() {
|
|
152
149
|
var t;
|
|
153
150
|
const e = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
|
|
154
|
-
return
|
|
151
|
+
return Cn(e, this.constructor.elementStyles), e;
|
|
155
152
|
}
|
|
156
153
|
connectedCallback() {
|
|
157
154
|
var t;
|
|
@@ -172,11 +169,11 @@ let ut = class extends HTMLElement {
|
|
|
172
169
|
attributeChangedCallback(t, e, n) {
|
|
173
170
|
this._$AK(t, n);
|
|
174
171
|
}
|
|
175
|
-
_$EO(t, e, n =
|
|
172
|
+
_$EO(t, e, n = ie) {
|
|
176
173
|
var r;
|
|
177
174
|
const o = this.constructor._$Ep(t, n);
|
|
178
175
|
if (o !== void 0 && n.reflect === !0) {
|
|
179
|
-
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 : me).toAttribute(e, n.type);
|
|
180
177
|
this._$El = t, a == null ? this.removeAttribute(o) : this.setAttribute(o, a), this._$El = null;
|
|
181
178
|
}
|
|
182
179
|
}
|
|
@@ -184,13 +181,13 @@ let ut = class extends HTMLElement {
|
|
|
184
181
|
var n;
|
|
185
182
|
const r = this.constructor, o = r._$Ev.get(t);
|
|
186
183
|
if (o !== void 0 && this._$El !== o) {
|
|
187
|
-
const a = r.getPropertyOptions(o),
|
|
188
|
-
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 : me;
|
|
185
|
+
this._$El = o, this[o] = s.fromAttribute(e, a.type), this._$El = null;
|
|
189
186
|
}
|
|
190
187
|
}
|
|
191
188
|
requestUpdate(t, e, n) {
|
|
192
189
|
let r = !0;
|
|
193
|
-
t !== void 0 && (((n = n || this.constructor.getPropertyOptions(t)).hasChanged ||
|
|
190
|
+
t !== void 0 && (((n = n || this.constructor.getPropertyOptions(t)).hasChanged || Ke)(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());
|
|
194
191
|
}
|
|
195
192
|
async _$Ej() {
|
|
196
193
|
this.isUpdatePending = !0;
|
|
@@ -251,91 +248,91 @@ let ut = class extends HTMLElement {
|
|
|
251
248
|
firstUpdated(t) {
|
|
252
249
|
}
|
|
253
250
|
};
|
|
254
|
-
|
|
251
|
+
ht[ve] = !0, ht.elementProperties = /* @__PURE__ */ new Map(), ht.elementStyles = [], ht.shadowRootOptions = { mode: "open" }, Ie == null || Ie({ ReactiveElement: ht }), ((ne = Xt.reactiveElementVersions) !== null && ne !== void 0 ? ne : Xt.reactiveElementVersions = []).push("1.6.2");
|
|
255
252
|
/**
|
|
256
253
|
* @license
|
|
257
254
|
* Copyright 2017 Google LLC
|
|
258
255
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
259
256
|
*/
|
|
260
|
-
var
|
|
261
|
-
const
|
|
262
|
-
\f\r]`,
|
|
263
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
257
|
+
var re;
|
|
258
|
+
const Wt = window, gt = Wt.trustedTypes, Ne = gt ? gt.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, ye = "$lit$", G = `lit$${(Math.random() + "").slice(9)}$`, Je = "?" + G, An = `<${Je}>`, at = document, Ot = () => at.createComment(""), xt = (i) => i === null || typeof i != "object" && typeof i != "function", Qe = Array.isArray, Dn = (i) => Qe(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", oe = `[
|
|
259
|
+
\f\r]`, Ct = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Le = /-->/g, Me = />/g, et = RegExp(`>|${oe}(?:([^\\s"'>=/]+)(${oe}*=${oe}*(?:[^
|
|
260
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), He = /'/g, ke = /"/g, tn = /^(?:script|style|textarea|title)$/i, Tn = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), I = Tn(1), mt = Symbol.for("lit-noChange"), E = Symbol.for("lit-nothing"), Re = /* @__PURE__ */ new WeakMap(), ot = at.createTreeWalker(at, 129, null, !1), On = (i, t) => {
|
|
264
261
|
const e = i.length - 1, n = [];
|
|
265
|
-
let r, o = t === 2 ? "<svg>" : "", a =
|
|
266
|
-
for (let
|
|
267
|
-
const d = i[
|
|
262
|
+
let r, o = t === 2 ? "<svg>" : "", a = Ct;
|
|
263
|
+
for (let l = 0; l < e; l++) {
|
|
264
|
+
const d = i[l];
|
|
268
265
|
let c, u, f = -1, _ = 0;
|
|
269
266
|
for (; _ < d.length && (a.lastIndex = _, u = a.exec(d), u !== null); )
|
|
270
|
-
_ = a.lastIndex, a ===
|
|
271
|
-
const y = a ===
|
|
272
|
-
o += a ===
|
|
267
|
+
_ = a.lastIndex, a === Ct ? u[1] === "!--" ? a = Le : u[1] !== void 0 ? a = Me : u[2] !== void 0 ? (tn.test(u[2]) && (r = RegExp("</" + u[2], "g")), a = et) : u[3] !== void 0 && (a = et) : a === et ? u[0] === ">" ? (a = r ?? Ct, f = -1) : u[1] === void 0 ? f = -2 : (f = a.lastIndex - u[2].length, c = u[1], a = u[3] === void 0 ? et : u[3] === '"' ? ke : He) : a === ke || a === He ? a = et : a === Le || a === Me ? a = Ct : (a = et, r = void 0);
|
|
268
|
+
const y = a === et && i[l + 1].startsWith("/>") ? " " : "";
|
|
269
|
+
o += a === Ct ? d + An : f >= 0 ? (n.push(c), d.slice(0, f) + ye + d.slice(f) + G + y) : d + G + (f === -2 ? (n.push(void 0), l) : y);
|
|
273
270
|
}
|
|
274
|
-
const
|
|
271
|
+
const s = o + (i[e] || "<?>") + (t === 2 ? "</svg>" : "");
|
|
275
272
|
if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
|
|
276
273
|
throw Error("invalid template strings array");
|
|
277
|
-
return [
|
|
274
|
+
return [Ne !== void 0 ? Ne.createHTML(s) : s, n];
|
|
278
275
|
};
|
|
279
|
-
class
|
|
276
|
+
class Pt {
|
|
280
277
|
constructor({ strings: t, _$litType$: e }, n) {
|
|
281
278
|
let r;
|
|
282
279
|
this.parts = [];
|
|
283
280
|
let o = 0, a = 0;
|
|
284
|
-
const
|
|
285
|
-
if (this.el =
|
|
281
|
+
const s = t.length - 1, l = this.parts, [d, c] = On(t, e);
|
|
282
|
+
if (this.el = Pt.createElement(d, n), ot.currentNode = this.el.content, e === 2) {
|
|
286
283
|
const u = this.el.content, f = u.firstChild;
|
|
287
284
|
f.remove(), u.append(...f.childNodes);
|
|
288
285
|
}
|
|
289
|
-
for (; (r =
|
|
286
|
+
for (; (r = ot.nextNode()) !== null && l.length < s; ) {
|
|
290
287
|
if (r.nodeType === 1) {
|
|
291
288
|
if (r.hasAttributes()) {
|
|
292
289
|
const u = [];
|
|
293
290
|
for (const f of r.getAttributeNames())
|
|
294
|
-
if (f.endsWith(
|
|
291
|
+
if (f.endsWith(ye) || f.startsWith(G)) {
|
|
295
292
|
const _ = c[a++];
|
|
296
293
|
if (u.push(f), _ !== void 0) {
|
|
297
|
-
const y = r.getAttribute(_.toLowerCase() +
|
|
298
|
-
|
|
294
|
+
const y = r.getAttribute(_.toLowerCase() + ye).split(G), v = /([.?@])?(.*)/.exec(_);
|
|
295
|
+
l.push({ type: 1, index: o, name: v[2], strings: y, ctor: v[1] === "." ? Pn : v[1] === "?" ? Nn : v[1] === "@" ? Ln : Kt });
|
|
299
296
|
} else
|
|
300
|
-
|
|
297
|
+
l.push({ type: 6, index: o });
|
|
301
298
|
}
|
|
302
299
|
for (const f of u)
|
|
303
300
|
r.removeAttribute(f);
|
|
304
301
|
}
|
|
305
|
-
if (
|
|
306
|
-
const u = r.textContent.split(
|
|
302
|
+
if (tn.test(r.tagName)) {
|
|
303
|
+
const u = r.textContent.split(G), f = u.length - 1;
|
|
307
304
|
if (f > 0) {
|
|
308
|
-
r.textContent =
|
|
305
|
+
r.textContent = gt ? gt.emptyScript : "";
|
|
309
306
|
for (let _ = 0; _ < f; _++)
|
|
310
|
-
r.append(u[_], Ot()),
|
|
307
|
+
r.append(u[_], Ot()), ot.nextNode(), l.push({ type: 2, index: ++o });
|
|
311
308
|
r.append(u[f], Ot());
|
|
312
309
|
}
|
|
313
310
|
}
|
|
314
311
|
} else if (r.nodeType === 8)
|
|
315
|
-
if (r.data ===
|
|
316
|
-
|
|
312
|
+
if (r.data === Je)
|
|
313
|
+
l.push({ type: 2, index: o });
|
|
317
314
|
else {
|
|
318
315
|
let u = -1;
|
|
319
|
-
for (; (u = r.data.indexOf(
|
|
320
|
-
|
|
316
|
+
for (; (u = r.data.indexOf(G, u + 1)) !== -1; )
|
|
317
|
+
l.push({ type: 7, index: o }), u += G.length - 1;
|
|
321
318
|
}
|
|
322
319
|
o++;
|
|
323
320
|
}
|
|
324
321
|
}
|
|
325
322
|
static createElement(t, e) {
|
|
326
|
-
const n =
|
|
323
|
+
const n = at.createElement("template");
|
|
327
324
|
return n.innerHTML = t, n;
|
|
328
325
|
}
|
|
329
326
|
}
|
|
330
|
-
function
|
|
331
|
-
var r, o, a,
|
|
332
|
-
if (t ===
|
|
327
|
+
function vt(i, t, e = i, n) {
|
|
328
|
+
var r, o, a, s;
|
|
329
|
+
if (t === mt)
|
|
333
330
|
return t;
|
|
334
|
-
let
|
|
335
|
-
const d =
|
|
336
|
-
return (
|
|
331
|
+
let l = n !== void 0 ? (r = e._$Co) === null || r === void 0 ? void 0 : r[n] : e._$Cl;
|
|
332
|
+
const d = xt(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 = vt(i, l._$AS(i, t.values), l, n)), t;
|
|
337
334
|
}
|
|
338
|
-
class
|
|
335
|
+
class xn {
|
|
339
336
|
constructor(t, e) {
|
|
340
337
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
341
338
|
}
|
|
@@ -347,17 +344,17 @@ class Nn {
|
|
|
347
344
|
}
|
|
348
345
|
u(t) {
|
|
349
346
|
var e;
|
|
350
|
-
const { el: { content: n }, parts: r } = this._$AD, o = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e :
|
|
351
|
-
|
|
352
|
-
let a =
|
|
347
|
+
const { el: { content: n }, parts: r } = this._$AD, o = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : at).importNode(n, !0);
|
|
348
|
+
ot.currentNode = o;
|
|
349
|
+
let a = ot.nextNode(), s = 0, l = 0, d = r[0];
|
|
353
350
|
for (; d !== void 0; ) {
|
|
354
|
-
if (
|
|
351
|
+
if (s === d.index) {
|
|
355
352
|
let c;
|
|
356
|
-
d.type === 2 ? c = new
|
|
353
|
+
d.type === 2 ? c = new It(a, a.nextSibling, this, t) : d.type === 1 ? c = new d.ctor(a, d.name, d.strings, this, t) : d.type === 6 && (c = new Mn(a, this, t)), this._$AV.push(c), d = r[++l];
|
|
357
354
|
}
|
|
358
|
-
|
|
355
|
+
s !== (d == null ? void 0 : d.index) && (a = ot.nextNode(), s++);
|
|
359
356
|
}
|
|
360
|
-
return
|
|
357
|
+
return ot.currentNode = at, o;
|
|
361
358
|
}
|
|
362
359
|
v(t) {
|
|
363
360
|
let e = 0;
|
|
@@ -365,10 +362,10 @@ class Nn {
|
|
|
365
362
|
n !== void 0 && (n.strings !== void 0 ? (n._$AI(t, n, e), e += n.strings.length - 2) : n._$AI(t[e])), e++;
|
|
366
363
|
}
|
|
367
364
|
}
|
|
368
|
-
class
|
|
365
|
+
class It {
|
|
369
366
|
constructor(t, e, n, r) {
|
|
370
367
|
var o;
|
|
371
|
-
this.type = 2, this._$AH =
|
|
368
|
+
this.type = 2, this._$AH = E, 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;
|
|
372
369
|
}
|
|
373
370
|
get _$AU() {
|
|
374
371
|
var t, e;
|
|
@@ -386,7 +383,7 @@ class Nt {
|
|
|
386
383
|
return this._$AB;
|
|
387
384
|
}
|
|
388
385
|
_$AI(t, e = this) {
|
|
389
|
-
t =
|
|
386
|
+
t = vt(this, t, e), xt(t) ? t === E || t == null || t === "" ? (this._$AH !== E && this._$AR(), this._$AH = E) : t !== this._$AH && t !== mt && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : Dn(t) ? this.T(t) : this._(t);
|
|
390
387
|
}
|
|
391
388
|
k(t) {
|
|
392
389
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -395,28 +392,28 @@ class Nt {
|
|
|
395
392
|
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
|
396
393
|
}
|
|
397
394
|
_(t) {
|
|
398
|
-
this._$AH !==
|
|
395
|
+
this._$AH !== E && xt(this._$AH) ? this._$AA.nextSibling.data = t : this.$(at.createTextNode(t)), this._$AH = t;
|
|
399
396
|
}
|
|
400
397
|
g(t) {
|
|
401
398
|
var e;
|
|
402
|
-
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 = Pt.createElement(r.h, this.options)), r);
|
|
403
400
|
if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === o)
|
|
404
401
|
this._$AH.v(n);
|
|
405
402
|
else {
|
|
406
|
-
const a = new
|
|
407
|
-
a.v(n), this.$(
|
|
403
|
+
const a = new xn(o, this), s = a.u(this.options);
|
|
404
|
+
a.v(n), this.$(s), this._$AH = a;
|
|
408
405
|
}
|
|
409
406
|
}
|
|
410
407
|
_$AC(t) {
|
|
411
|
-
let e =
|
|
412
|
-
return e === void 0 &&
|
|
408
|
+
let e = Re.get(t.strings);
|
|
409
|
+
return e === void 0 && Re.set(t.strings, e = new Pt(t)), e;
|
|
413
410
|
}
|
|
414
411
|
T(t) {
|
|
415
|
-
|
|
412
|
+
Qe(this._$AH) || (this._$AH = [], this._$AR());
|
|
416
413
|
const e = this._$AH;
|
|
417
414
|
let n, r = 0;
|
|
418
415
|
for (const o of t)
|
|
419
|
-
r === e.length ? e.push(n = new
|
|
416
|
+
r === e.length ? e.push(n = new It(this.k(Ot()), this.k(Ot()), this, this.options)) : n = e[r], n._$AI(o), r++;
|
|
420
417
|
r < e.length && (this._$AR(n && n._$AB.nextSibling, r), e.length = r);
|
|
421
418
|
}
|
|
422
419
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
@@ -431,9 +428,9 @@ class Nt {
|
|
|
431
428
|
this._$AM === void 0 && (this._$Cp = t, (e = this._$AP) === null || e === void 0 || e.call(this, t));
|
|
432
429
|
}
|
|
433
430
|
}
|
|
434
|
-
class
|
|
431
|
+
class Kt {
|
|
435
432
|
constructor(t, e, n, r, o) {
|
|
436
|
-
this.type = 1, this._$AH =
|
|
433
|
+
this.type = 1, this._$AH = E, 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 = E;
|
|
437
434
|
}
|
|
438
435
|
get tagName() {
|
|
439
436
|
return this.element.tagName;
|
|
@@ -445,45 +442,45 @@ class Jt {
|
|
|
445
442
|
const o = this.strings;
|
|
446
443
|
let a = !1;
|
|
447
444
|
if (o === void 0)
|
|
448
|
-
t =
|
|
445
|
+
t = vt(this, t, e, 0), a = !xt(t) || t !== this._$AH && t !== mt, a && (this._$AH = t);
|
|
449
446
|
else {
|
|
450
|
-
const
|
|
451
|
-
let
|
|
452
|
-
for (t = o[0],
|
|
453
|
-
d =
|
|
447
|
+
const s = t;
|
|
448
|
+
let l, d;
|
|
449
|
+
for (t = o[0], l = 0; l < o.length - 1; l++)
|
|
450
|
+
d = vt(this, s[n + l], e, l), d === mt && (d = this._$AH[l]), a || (a = !xt(d) || d !== this._$AH[l]), d === E ? t = E : t !== E && (t += (d ?? "") + o[l + 1]), this._$AH[l] = d;
|
|
454
451
|
}
|
|
455
452
|
a && !r && this.j(t);
|
|
456
453
|
}
|
|
457
454
|
j(t) {
|
|
458
|
-
t ===
|
|
455
|
+
t === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
459
456
|
}
|
|
460
457
|
}
|
|
461
|
-
class
|
|
458
|
+
class Pn extends Kt {
|
|
462
459
|
constructor() {
|
|
463
460
|
super(...arguments), this.type = 3;
|
|
464
461
|
}
|
|
465
462
|
j(t) {
|
|
466
|
-
this.element[this.name] = t ===
|
|
463
|
+
this.element[this.name] = t === E ? void 0 : t;
|
|
467
464
|
}
|
|
468
465
|
}
|
|
469
|
-
const
|
|
470
|
-
class
|
|
466
|
+
const In = gt ? gt.emptyScript : "";
|
|
467
|
+
class Nn extends Kt {
|
|
471
468
|
constructor() {
|
|
472
469
|
super(...arguments), this.type = 4;
|
|
473
470
|
}
|
|
474
471
|
j(t) {
|
|
475
|
-
t && t !==
|
|
472
|
+
t && t !== E ? this.element.setAttribute(this.name, In) : this.element.removeAttribute(this.name);
|
|
476
473
|
}
|
|
477
474
|
}
|
|
478
|
-
class
|
|
475
|
+
class Ln extends Kt {
|
|
479
476
|
constructor(t, e, n, r, o) {
|
|
480
477
|
super(t, e, n, r, o), this.type = 5;
|
|
481
478
|
}
|
|
482
479
|
_$AI(t, e = this) {
|
|
483
480
|
var n;
|
|
484
|
-
if ((t = (n =
|
|
481
|
+
if ((t = (n = vt(this, t, e, 0)) !== null && n !== void 0 ? n : E) === mt)
|
|
485
482
|
return;
|
|
486
|
-
const r = this._$AH, o = t ===
|
|
483
|
+
const r = this._$AH, o = t === E && r !== E || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, a = t !== E && (r === E || o);
|
|
487
484
|
o && this.element.removeEventListener(this.name, this, r), a && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
488
485
|
}
|
|
489
486
|
handleEvent(t) {
|
|
@@ -491,7 +488,7 @@ class kn extends Jt {
|
|
|
491
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);
|
|
492
489
|
}
|
|
493
490
|
}
|
|
494
|
-
class
|
|
491
|
+
class Mn {
|
|
495
492
|
constructor(t, e, n) {
|
|
496
493
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = n;
|
|
497
494
|
}
|
|
@@ -499,18 +496,18 @@ class Rn {
|
|
|
499
496
|
return this._$AM._$AU;
|
|
500
497
|
}
|
|
501
498
|
_$AI(t) {
|
|
502
|
-
|
|
499
|
+
vt(this, t);
|
|
503
500
|
}
|
|
504
501
|
}
|
|
505
|
-
const
|
|
506
|
-
|
|
507
|
-
const
|
|
502
|
+
const Be = Wt.litHtmlPolyfillSupport;
|
|
503
|
+
Be == null || Be(Pt, It), ((re = Wt.litHtmlVersions) !== null && re !== void 0 ? re : Wt.litHtmlVersions = []).push("2.7.4");
|
|
504
|
+
const Hn = (i, t, e) => {
|
|
508
505
|
var n, r;
|
|
509
506
|
const o = (n = e == null ? void 0 : e.renderBefore) !== null && n !== void 0 ? n : t;
|
|
510
507
|
let a = o._$litPart$;
|
|
511
508
|
if (a === void 0) {
|
|
512
|
-
const
|
|
513
|
-
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 It(t.insertBefore(Ot(), s), s, void 0, e ?? {});
|
|
514
511
|
}
|
|
515
512
|
return a._$AI(i), a;
|
|
516
513
|
};
|
|
@@ -519,8 +516,8 @@ const Bn = (i, t, e) => {
|
|
|
519
516
|
* Copyright 2017 Google LLC
|
|
520
517
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
521
518
|
*/
|
|
522
|
-
var
|
|
523
|
-
class
|
|
519
|
+
var ae, se;
|
|
520
|
+
class ft extends ht {
|
|
524
521
|
constructor() {
|
|
525
522
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
526
523
|
}
|
|
@@ -531,7 +528,7 @@ class pt extends ut {
|
|
|
531
528
|
}
|
|
532
529
|
update(t) {
|
|
533
530
|
const e = this.render();
|
|
534
|
-
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 = Hn(e, this.renderRoot, this.renderOptions);
|
|
535
532
|
}
|
|
536
533
|
connectedCallback() {
|
|
537
534
|
var t;
|
|
@@ -542,19 +539,19 @@ class pt extends ut {
|
|
|
542
539
|
super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1);
|
|
543
540
|
}
|
|
544
541
|
render() {
|
|
545
|
-
return
|
|
542
|
+
return mt;
|
|
546
543
|
}
|
|
547
544
|
}
|
|
548
|
-
|
|
549
|
-
const
|
|
550
|
-
|
|
551
|
-
((
|
|
545
|
+
ft.finalized = !0, ft._$litElement$ = !0, (ae = globalThis.litElementHydrateSupport) === null || ae === void 0 || ae.call(globalThis, { LitElement: ft });
|
|
546
|
+
const Ue = globalThis.litElementPolyfillSupport;
|
|
547
|
+
Ue == null || Ue({ LitElement: ft });
|
|
548
|
+
((se = globalThis.litElementVersions) !== null && se !== void 0 ? se : globalThis.litElementVersions = []).push("3.3.2");
|
|
552
549
|
/**
|
|
553
550
|
* @license
|
|
554
551
|
* Copyright 2017 Google LLC
|
|
555
552
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
556
553
|
*/
|
|
557
|
-
const
|
|
554
|
+
const en = (i) => (t) => typeof t == "function" ? ((e, n) => (customElements.define(e, n), n))(i, t) : ((e, n) => {
|
|
558
555
|
const { kind: r, elements: o } = n;
|
|
559
556
|
return { kind: r, elements: o, finisher(a) {
|
|
560
557
|
customElements.define(e, a);
|
|
@@ -565,39 +562,39 @@ const nn = (i) => (t) => typeof t == "function" ? ((e, n) => (customElements.def
|
|
|
565
562
|
* Copyright 2017 Google LLC
|
|
566
563
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
567
564
|
*/
|
|
568
|
-
const
|
|
565
|
+
const kn = (i, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) {
|
|
569
566
|
e.createProperty(t.key, i);
|
|
570
567
|
} } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
|
|
571
568
|
typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
|
|
572
569
|
}, finisher(e) {
|
|
573
570
|
e.createProperty(t.key, i);
|
|
574
|
-
} },
|
|
571
|
+
} }, Rn = (i, t, e) => {
|
|
575
572
|
t.constructor.createProperty(e, i);
|
|
576
573
|
};
|
|
577
|
-
function
|
|
578
|
-
return (t, e) => e !== void 0 ?
|
|
574
|
+
function k(i) {
|
|
575
|
+
return (t, e) => e !== void 0 ? Rn(i, t, e) : kn(i, t);
|
|
579
576
|
}
|
|
580
577
|
/**
|
|
581
578
|
* @license
|
|
582
579
|
* Copyright 2017 Google LLC
|
|
583
580
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
584
581
|
*/
|
|
585
|
-
function
|
|
586
|
-
return
|
|
582
|
+
function _t(i) {
|
|
583
|
+
return k({ ...i, state: !0 });
|
|
587
584
|
}
|
|
588
585
|
/**
|
|
589
586
|
* @license
|
|
590
587
|
* Copyright 2021 Google LLC
|
|
591
588
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
592
589
|
*/
|
|
593
|
-
var
|
|
594
|
-
((
|
|
590
|
+
var le;
|
|
591
|
+
((le = window.HTMLSlotElement) === null || le === void 0 ? void 0 : le.prototype.assignedElements) != null;
|
|
595
592
|
/**
|
|
596
593
|
* @license
|
|
597
594
|
* Copyright 2021 Google LLC
|
|
598
595
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
599
596
|
*/
|
|
600
|
-
function*
|
|
597
|
+
function* _e(i, t) {
|
|
601
598
|
if (i !== void 0) {
|
|
602
599
|
let e = 0;
|
|
603
600
|
for (const n of i)
|
|
@@ -609,7 +606,7 @@ function* be(i, t) {
|
|
|
609
606
|
* Copyright 2021 Google LLC
|
|
610
607
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
611
608
|
*/
|
|
612
|
-
function
|
|
609
|
+
function nn(i, t, e) {
|
|
613
610
|
return i ? t() : e == null ? void 0 : e();
|
|
614
611
|
}
|
|
615
612
|
/**!
|
|
@@ -618,7 +615,7 @@ function rn(i, t, e) {
|
|
|
618
615
|
* @author owenm <owen23355@gmail.com>
|
|
619
616
|
* @license MIT
|
|
620
617
|
*/
|
|
621
|
-
function
|
|
618
|
+
function Ve(i, t) {
|
|
622
619
|
var e = Object.keys(i);
|
|
623
620
|
if (Object.getOwnPropertySymbols) {
|
|
624
621
|
var n = Object.getOwnPropertySymbols(i);
|
|
@@ -628,26 +625,26 @@ function ze(i, t) {
|
|
|
628
625
|
}
|
|
629
626
|
return e;
|
|
630
627
|
}
|
|
631
|
-
function
|
|
628
|
+
function F(i) {
|
|
632
629
|
for (var t = 1; t < arguments.length; t++) {
|
|
633
630
|
var e = arguments[t] != null ? arguments[t] : {};
|
|
634
|
-
t % 2 ?
|
|
635
|
-
|
|
636
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(e)) :
|
|
631
|
+
t % 2 ? Ve(Object(e), !0).forEach(function(n) {
|
|
632
|
+
Bn(i, n, e[n]);
|
|
633
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(e)) : Ve(Object(e)).forEach(function(n) {
|
|
637
634
|
Object.defineProperty(i, n, Object.getOwnPropertyDescriptor(e, n));
|
|
638
635
|
});
|
|
639
636
|
}
|
|
640
637
|
return i;
|
|
641
638
|
}
|
|
642
|
-
function
|
|
639
|
+
function Ut(i) {
|
|
643
640
|
"@babel/helpers - typeof";
|
|
644
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ?
|
|
641
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Ut = function(t) {
|
|
645
642
|
return typeof t;
|
|
646
|
-
} :
|
|
643
|
+
} : Ut = function(t) {
|
|
647
644
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
648
|
-
},
|
|
645
|
+
}, Ut(i);
|
|
649
646
|
}
|
|
650
|
-
function
|
|
647
|
+
function Bn(i, t, e) {
|
|
651
648
|
return t in i ? Object.defineProperty(i, t, {
|
|
652
649
|
value: e,
|
|
653
650
|
enumerable: !0,
|
|
@@ -655,17 +652,17 @@ function zn(i, t, e) {
|
|
|
655
652
|
writable: !0
|
|
656
653
|
}) : i[t] = e, i;
|
|
657
654
|
}
|
|
658
|
-
function
|
|
659
|
-
return
|
|
655
|
+
function K() {
|
|
656
|
+
return K = Object.assign || function(i) {
|
|
660
657
|
for (var t = 1; t < arguments.length; t++) {
|
|
661
658
|
var e = arguments[t];
|
|
662
659
|
for (var n in e)
|
|
663
660
|
Object.prototype.hasOwnProperty.call(e, n) && (i[n] = e[n]);
|
|
664
661
|
}
|
|
665
662
|
return i;
|
|
666
|
-
},
|
|
663
|
+
}, K.apply(this, arguments);
|
|
667
664
|
}
|
|
668
|
-
function
|
|
665
|
+
function Un(i, t) {
|
|
669
666
|
if (i == null)
|
|
670
667
|
return {};
|
|
671
668
|
var e = {}, n = Object.keys(i), r, o;
|
|
@@ -673,10 +670,10 @@ function jn(i, t) {
|
|
|
673
670
|
r = n[o], !(t.indexOf(r) >= 0) && (e[r] = i[r]);
|
|
674
671
|
return e;
|
|
675
672
|
}
|
|
676
|
-
function
|
|
673
|
+
function Vn(i, t) {
|
|
677
674
|
if (i == null)
|
|
678
675
|
return {};
|
|
679
|
-
var e =
|
|
676
|
+
var e = Un(i, t), n, r;
|
|
680
677
|
if (Object.getOwnPropertySymbols) {
|
|
681
678
|
var o = Object.getOwnPropertySymbols(i);
|
|
682
679
|
for (r = 0; r < o.length; r++)
|
|
@@ -684,22 +681,22 @@ function Fn(i, t) {
|
|
|
684
681
|
}
|
|
685
682
|
return e;
|
|
686
683
|
}
|
|
687
|
-
var
|
|
688
|
-
function
|
|
684
|
+
var Fn = "1.15.0";
|
|
685
|
+
function X(i) {
|
|
689
686
|
if (typeof window < "u" && window.navigator)
|
|
690
687
|
return !!/* @__PURE__ */ navigator.userAgent.match(i);
|
|
691
688
|
}
|
|
692
|
-
var
|
|
689
|
+
var J = X(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Jt = X(/Edge/i), Fe = X(/firefox/i), Vt = X(/safari/i) && !X(/chrome/i) && !X(/android/i), rn = X(/iP(ad|od|hone)/i), on = X(/chrome/i) && X(/android/i), an = {
|
|
693
690
|
capture: !1,
|
|
694
691
|
passive: !1
|
|
695
692
|
};
|
|
696
|
-
function
|
|
697
|
-
i.addEventListener(t, e, !
|
|
693
|
+
function $(i, t, e) {
|
|
694
|
+
i.addEventListener(t, e, !J && an);
|
|
698
695
|
}
|
|
699
696
|
function b(i, t, e) {
|
|
700
|
-
i.removeEventListener(t, e, !
|
|
697
|
+
i.removeEventListener(t, e, !J && an);
|
|
701
698
|
}
|
|
702
|
-
function
|
|
699
|
+
function Yt(i, t) {
|
|
703
700
|
if (t) {
|
|
704
701
|
if (t[0] === ">" && (t = t.substring(1)), i)
|
|
705
702
|
try {
|
|
@@ -715,29 +712,29 @@ function Gt(i, t) {
|
|
|
715
712
|
return !1;
|
|
716
713
|
}
|
|
717
714
|
}
|
|
718
|
-
function
|
|
715
|
+
function jn(i) {
|
|
719
716
|
return i.host && i !== document && i.host.nodeType ? i.host : i.parentNode;
|
|
720
717
|
}
|
|
721
|
-
function
|
|
718
|
+
function V(i, t, e, n) {
|
|
722
719
|
if (i) {
|
|
723
720
|
e = e || document;
|
|
724
721
|
do {
|
|
725
|
-
if (t != null && (t[0] === ">" ? i.parentNode === e &&
|
|
722
|
+
if (t != null && (t[0] === ">" ? i.parentNode === e && Yt(i, t) : Yt(i, t)) || n && i === e)
|
|
726
723
|
return i;
|
|
727
724
|
if (i === e)
|
|
728
725
|
break;
|
|
729
|
-
} while (i =
|
|
726
|
+
} while (i = jn(i));
|
|
730
727
|
}
|
|
731
728
|
return null;
|
|
732
729
|
}
|
|
733
|
-
var
|
|
734
|
-
function
|
|
730
|
+
var je = /\s+/g;
|
|
731
|
+
function L(i, t, e) {
|
|
735
732
|
if (i && t)
|
|
736
733
|
if (i.classList)
|
|
737
734
|
i.classList[e ? "add" : "remove"](t);
|
|
738
735
|
else {
|
|
739
|
-
var n = (" " + i.className + " ").replace(
|
|
740
|
-
i.className = (n + (e ? " " + t : "")).replace(
|
|
736
|
+
var n = (" " + i.className + " ").replace(je, " ").replace(" " + t + " ", " ");
|
|
737
|
+
i.className = (n + (e ? " " + t : "")).replace(je, " ");
|
|
741
738
|
}
|
|
742
739
|
}
|
|
743
740
|
function p(i, t, e) {
|
|
@@ -748,7 +745,7 @@ function p(i, t, e) {
|
|
|
748
745
|
!(t in n) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), n[t] = e + (typeof e == "string" ? "" : "px");
|
|
749
746
|
}
|
|
750
747
|
}
|
|
751
|
-
function
|
|
748
|
+
function pt(i, t) {
|
|
752
749
|
var e = "";
|
|
753
750
|
if (typeof i == "string")
|
|
754
751
|
e = i;
|
|
@@ -760,7 +757,7 @@ function gt(i, t) {
|
|
|
760
757
|
var r = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
761
758
|
return r && new r(e);
|
|
762
759
|
}
|
|
763
|
-
function
|
|
760
|
+
function sn(i, t, e) {
|
|
764
761
|
if (i) {
|
|
765
762
|
var n = i.getElementsByTagName(t), r = 0, o = n.length;
|
|
766
763
|
if (e)
|
|
@@ -770,49 +767,49 @@ function ln(i, t, e) {
|
|
|
770
767
|
}
|
|
771
768
|
return [];
|
|
772
769
|
}
|
|
773
|
-
function
|
|
770
|
+
function Z() {
|
|
774
771
|
var i = document.scrollingElement;
|
|
775
772
|
return i || document.documentElement;
|
|
776
773
|
}
|
|
777
|
-
function
|
|
774
|
+
function D(i, t, e, n, r) {
|
|
778
775
|
if (!(!i.getBoundingClientRect && i !== window)) {
|
|
779
|
-
var o, a,
|
|
780
|
-
if (i !== window && i.parentNode && i !==
|
|
776
|
+
var o, a, s, l, d, c, u;
|
|
777
|
+
if (i !== window && i.parentNode && i !== Z() ? (o = i.getBoundingClientRect(), a = o.top, s = o.left, l = o.bottom, d = o.right, c = o.height, u = o.width) : (a = 0, s = 0, l = window.innerHeight, d = window.innerWidth, c = window.innerHeight, u = window.innerWidth), (t || e) && i !== window && (r = r || i.parentNode, !J))
|
|
781
778
|
do
|
|
782
779
|
if (r && r.getBoundingClientRect && (p(r, "transform") !== "none" || e && p(r, "position") !== "static")) {
|
|
783
780
|
var f = r.getBoundingClientRect();
|
|
784
|
-
a -= f.top + parseInt(p(r, "border-top-width")),
|
|
781
|
+
a -= f.top + parseInt(p(r, "border-top-width")), s -= f.left + parseInt(p(r, "border-left-width")), l = a + o.height, d = s + o.width;
|
|
785
782
|
break;
|
|
786
783
|
}
|
|
787
784
|
while (r = r.parentNode);
|
|
788
785
|
if (n && i !== window) {
|
|
789
|
-
var _ =
|
|
790
|
-
_ && (a /= v,
|
|
786
|
+
var _ = pt(r || i), y = _ && _.a, v = _ && _.d;
|
|
787
|
+
_ && (a /= v, s /= y, u /= y, c /= v, l = a + c, d = s + u);
|
|
791
788
|
}
|
|
792
789
|
return {
|
|
793
790
|
top: a,
|
|
794
|
-
left:
|
|
795
|
-
bottom:
|
|
791
|
+
left: s,
|
|
792
|
+
bottom: l,
|
|
796
793
|
right: d,
|
|
797
794
|
width: u,
|
|
798
795
|
height: c
|
|
799
796
|
};
|
|
800
797
|
}
|
|
801
798
|
}
|
|
802
|
-
function
|
|
803
|
-
for (var n =
|
|
804
|
-
var o =
|
|
799
|
+
function ze(i, t, e) {
|
|
800
|
+
for (var n = We(i, !0), r = D(i)[t]; n; ) {
|
|
801
|
+
var o = D(n)[e], a = void 0;
|
|
805
802
|
if (e === "top" || e === "left" ? a = r >= o : a = r <= o, !a)
|
|
806
803
|
return n;
|
|
807
|
-
if (n ===
|
|
804
|
+
if (n === Z())
|
|
808
805
|
break;
|
|
809
|
-
n =
|
|
806
|
+
n = We(n, !1);
|
|
810
807
|
}
|
|
811
808
|
return !1;
|
|
812
809
|
}
|
|
813
|
-
function
|
|
810
|
+
function yt(i, t, e, n) {
|
|
814
811
|
for (var r = 0, o = 0, a = i.children; o < a.length; ) {
|
|
815
|
-
if (a[o].style.display !== "none" && a[o] !== g.ghost && (n || a[o] !== g.dragged) &&
|
|
812
|
+
if (a[o].style.display !== "none" && a[o] !== g.ghost && (n || a[o] !== g.dragged) && V(a[o], e.draggable, i, !1)) {
|
|
816
813
|
if (r === t)
|
|
817
814
|
return a[o];
|
|
818
815
|
r++;
|
|
@@ -821,29 +818,29 @@ function _t(i, t, e, n) {
|
|
|
821
818
|
}
|
|
822
819
|
return null;
|
|
823
820
|
}
|
|
824
|
-
function
|
|
825
|
-
for (var e = i.lastElementChild; e && (e === g.ghost || p(e, "display") === "none" || t && !
|
|
821
|
+
function we(i, t) {
|
|
822
|
+
for (var e = i.lastElementChild; e && (e === g.ghost || p(e, "display") === "none" || t && !Yt(e, t)); )
|
|
826
823
|
e = e.previousElementSibling;
|
|
827
824
|
return e || null;
|
|
828
825
|
}
|
|
829
|
-
function
|
|
826
|
+
function R(i, t) {
|
|
830
827
|
var e = 0;
|
|
831
828
|
if (!i || !i.parentNode)
|
|
832
829
|
return -1;
|
|
833
830
|
for (; i = i.previousElementSibling; )
|
|
834
|
-
i.nodeName.toUpperCase() !== "TEMPLATE" && i !== g.clone && (!t ||
|
|
831
|
+
i.nodeName.toUpperCase() !== "TEMPLATE" && i !== g.clone && (!t || Yt(i, t)) && e++;
|
|
835
832
|
return e;
|
|
836
833
|
}
|
|
837
|
-
function
|
|
838
|
-
var t = 0, e = 0, n =
|
|
834
|
+
function Xe(i) {
|
|
835
|
+
var t = 0, e = 0, n = Z();
|
|
839
836
|
if (i)
|
|
840
837
|
do {
|
|
841
|
-
var r =
|
|
838
|
+
var r = pt(i), o = r.a, a = r.d;
|
|
842
839
|
t += i.scrollLeft * o, e += i.scrollTop * a;
|
|
843
840
|
} while (i !== n && (i = i.parentNode));
|
|
844
841
|
return [t, e];
|
|
845
842
|
}
|
|
846
|
-
function
|
|
843
|
+
function zn(i, t) {
|
|
847
844
|
for (var e in i)
|
|
848
845
|
if (i.hasOwnProperty(e)) {
|
|
849
846
|
for (var n in t)
|
|
@@ -852,53 +849,53 @@ function Yn(i, t) {
|
|
|
852
849
|
}
|
|
853
850
|
return -1;
|
|
854
851
|
}
|
|
855
|
-
function
|
|
852
|
+
function We(i, t) {
|
|
856
853
|
if (!i || !i.getBoundingClientRect)
|
|
857
|
-
return
|
|
854
|
+
return Z();
|
|
858
855
|
var e = i, n = !1;
|
|
859
856
|
do
|
|
860
857
|
if (e.clientWidth < e.scrollWidth || e.clientHeight < e.scrollHeight) {
|
|
861
858
|
var r = p(e);
|
|
862
859
|
if (e.clientWidth < e.scrollWidth && (r.overflowX == "auto" || r.overflowX == "scroll") || e.clientHeight < e.scrollHeight && (r.overflowY == "auto" || r.overflowY == "scroll")) {
|
|
863
860
|
if (!e.getBoundingClientRect || e === document.body)
|
|
864
|
-
return
|
|
861
|
+
return Z();
|
|
865
862
|
if (n || t)
|
|
866
863
|
return e;
|
|
867
864
|
n = !0;
|
|
868
865
|
}
|
|
869
866
|
}
|
|
870
867
|
while (e = e.parentNode);
|
|
871
|
-
return
|
|
868
|
+
return Z();
|
|
872
869
|
}
|
|
873
|
-
function
|
|
870
|
+
function Xn(i, t) {
|
|
874
871
|
if (i && t)
|
|
875
872
|
for (var e in t)
|
|
876
873
|
t.hasOwnProperty(e) && (i[e] = t[e]);
|
|
877
874
|
return i;
|
|
878
875
|
}
|
|
879
|
-
function
|
|
876
|
+
function de(i, t) {
|
|
880
877
|
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);
|
|
881
878
|
}
|
|
882
|
-
var
|
|
883
|
-
function
|
|
879
|
+
var he;
|
|
880
|
+
function Wn(i, t) {
|
|
884
881
|
return function() {
|
|
885
|
-
if (!
|
|
882
|
+
if (!he) {
|
|
886
883
|
var e = arguments, n = this;
|
|
887
|
-
e.length === 1 ? i.call(n, e[0]) : i.apply(n, e),
|
|
888
|
-
|
|
884
|
+
e.length === 1 ? i.call(n, e[0]) : i.apply(n, e), he = setTimeout(function() {
|
|
885
|
+
he = void 0;
|
|
889
886
|
}, t);
|
|
890
887
|
}
|
|
891
888
|
};
|
|
892
889
|
}
|
|
893
|
-
function
|
|
890
|
+
function Yn(i, t, e) {
|
|
894
891
|
i.scrollLeft += t, i.scrollTop += e;
|
|
895
892
|
}
|
|
896
|
-
function
|
|
893
|
+
function ln(i) {
|
|
897
894
|
var t = window.Polymer, e = window.jQuery || window.Zepto;
|
|
898
895
|
return t && t.dom ? t.dom(i).cloneNode(!0) : e ? e(i).clone(!0)[0] : i.cloneNode(!0);
|
|
899
896
|
}
|
|
900
|
-
var
|
|
901
|
-
function
|
|
897
|
+
var B = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
898
|
+
function Gn() {
|
|
902
899
|
var i = [], t;
|
|
903
900
|
return {
|
|
904
901
|
captureAnimationState: function() {
|
|
@@ -908,11 +905,11 @@ function Kn() {
|
|
|
908
905
|
if (!(p(r, "display") === "none" || r === g.ghost)) {
|
|
909
906
|
i.push({
|
|
910
907
|
target: r,
|
|
911
|
-
rect:
|
|
908
|
+
rect: D(r)
|
|
912
909
|
});
|
|
913
|
-
var o =
|
|
910
|
+
var o = F({}, i[i.length - 1].rect);
|
|
914
911
|
if (r.thisAnimationDuration) {
|
|
915
|
-
var a =
|
|
912
|
+
var a = pt(r, !0);
|
|
916
913
|
a && (o.top -= a.f, o.left -= a.e);
|
|
917
914
|
}
|
|
918
915
|
r.fromRect = o;
|
|
@@ -924,7 +921,7 @@ function Kn() {
|
|
|
924
921
|
i.push(n);
|
|
925
922
|
},
|
|
926
923
|
removeAnimationState: function(n) {
|
|
927
|
-
i.splice(
|
|
924
|
+
i.splice(zn(i, {
|
|
928
925
|
target: n
|
|
929
926
|
}), 1);
|
|
930
927
|
},
|
|
@@ -935,12 +932,12 @@ function Kn() {
|
|
|
935
932
|
return;
|
|
936
933
|
}
|
|
937
934
|
var o = !1, a = 0;
|
|
938
|
-
i.forEach(function(
|
|
939
|
-
var
|
|
940
|
-
v && (u.top -= v.f, u.left -= v.e), d.toRect = u, d.thisAnimationDuration &&
|
|
941
|
-
(y.top - u.top) / (y.left - u.left) === (c.top - u.top) / (c.left - u.left) && (
|
|
935
|
+
i.forEach(function(s) {
|
|
936
|
+
var l = 0, d = s.target, c = d.fromRect, u = D(d), f = d.prevFromRect, _ = d.prevToRect, y = s.rect, v = pt(d, !0);
|
|
937
|
+
v && (u.top -= v.f, u.left -= v.e), d.toRect = u, d.thisAnimationDuration && de(f, u) && !de(c, u) && // Make sure animatingRect is on line between toRect & fromRect
|
|
938
|
+
(y.top - u.top) / (y.left - u.left) === (c.top - u.top) / (c.left - u.left) && (l = Zn(y, f, _, r.options)), de(u, c) || (d.prevFromRect = c, d.prevToRect = u, l || (l = r.options.animation), r.animate(d, y, u, l)), l && (o = !0, a = Math.max(a, l), clearTimeout(d.animationResetTimer), d.animationResetTimer = setTimeout(function() {
|
|
942
939
|
d.animationTime = 0, d.prevFromRect = null, d.fromRect = null, d.prevToRect = null, d.thisAnimationDuration = null;
|
|
943
|
-
},
|
|
940
|
+
}, l), d.thisAnimationDuration = l);
|
|
944
941
|
}), clearTimeout(t), o ? t = setTimeout(function() {
|
|
945
942
|
typeof n == "function" && n();
|
|
946
943
|
}, a) : typeof n == "function" && n(), i = [];
|
|
@@ -948,30 +945,30 @@ function Kn() {
|
|
|
948
945
|
animate: function(n, r, o, a) {
|
|
949
946
|
if (a) {
|
|
950
947
|
p(n, "transition", ""), p(n, "transform", "");
|
|
951
|
-
var
|
|
952
|
-
n.animatingX = !!c, n.animatingY = !!u, p(n, "transform", "translate3d(" + c + "px," + u + "px,0)"), this.forRepaintDummy =
|
|
948
|
+
var s = pt(this.el), l = s && s.a, d = s && s.d, c = (r.left - o.left) / (l || 1), u = (r.top - o.top) / (d || 1);
|
|
949
|
+
n.animatingX = !!c, n.animatingY = !!u, p(n, "transform", "translate3d(" + c + "px," + u + "px,0)"), this.forRepaintDummy = qn(n), p(n, "transition", "transform " + a + "ms" + (this.options.easing ? " " + this.options.easing : "")), p(n, "transform", "translate3d(0,0,0)"), typeof n.animated == "number" && clearTimeout(n.animated), n.animated = setTimeout(function() {
|
|
953
950
|
p(n, "transition", ""), p(n, "transform", ""), n.animated = !1, n.animatingX = !1, n.animatingY = !1;
|
|
954
951
|
}, a);
|
|
955
952
|
}
|
|
956
953
|
}
|
|
957
954
|
};
|
|
958
955
|
}
|
|
959
|
-
function
|
|
956
|
+
function qn(i) {
|
|
960
957
|
return i.offsetWidth;
|
|
961
958
|
}
|
|
962
|
-
function
|
|
959
|
+
function Zn(i, t, e, n) {
|
|
963
960
|
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;
|
|
964
961
|
}
|
|
965
|
-
var
|
|
962
|
+
var lt = [], ue = {
|
|
966
963
|
initializeByDefault: !0
|
|
967
|
-
},
|
|
964
|
+
}, Nt = {
|
|
968
965
|
mount: function(t) {
|
|
969
|
-
for (var e in
|
|
970
|
-
|
|
971
|
-
|
|
966
|
+
for (var e in ue)
|
|
967
|
+
ue.hasOwnProperty(e) && !(e in t) && (t[e] = ue[e]);
|
|
968
|
+
lt.forEach(function(n) {
|
|
972
969
|
if (n.pluginName === t.pluginName)
|
|
973
970
|
throw "Sortable: Cannot mount plugin ".concat(t.pluginName, " more than once");
|
|
974
|
-
}),
|
|
971
|
+
}), lt.push(t);
|
|
975
972
|
},
|
|
976
973
|
pluginEvent: function(t, e, n) {
|
|
977
974
|
var r = this;
|
|
@@ -979,20 +976,20 @@ var dt = [], ce = {
|
|
|
979
976
|
r.eventCanceled = !0;
|
|
980
977
|
};
|
|
981
978
|
var o = t + "Global";
|
|
982
|
-
|
|
983
|
-
e[a.pluginName] && (e[a.pluginName][o] && e[a.pluginName][o](
|
|
979
|
+
lt.forEach(function(a) {
|
|
980
|
+
e[a.pluginName] && (e[a.pluginName][o] && e[a.pluginName][o](F({
|
|
984
981
|
sortable: e
|
|
985
|
-
}, n)), e.options[a.pluginName] && e[a.pluginName][t] && e[a.pluginName][t](
|
|
982
|
+
}, n)), e.options[a.pluginName] && e[a.pluginName][t] && e[a.pluginName][t](F({
|
|
986
983
|
sortable: e
|
|
987
984
|
}, n)));
|
|
988
985
|
});
|
|
989
986
|
},
|
|
990
987
|
initializePlugins: function(t, e, n, r) {
|
|
991
|
-
|
|
992
|
-
var
|
|
993
|
-
if (!(!t.options[
|
|
994
|
-
var d = new
|
|
995
|
-
d.sortable = t, d.options = t.options, t[
|
|
988
|
+
lt.forEach(function(s) {
|
|
989
|
+
var l = s.pluginName;
|
|
990
|
+
if (!(!t.options[l] && !s.initializeByDefault)) {
|
|
991
|
+
var d = new s(t, e, t.options);
|
|
992
|
+
d.sortable = t, d.options = t.options, t[l] = d, K(n, d.defaults);
|
|
996
993
|
}
|
|
997
994
|
});
|
|
998
995
|
for (var o in t.options)
|
|
@@ -1003,114 +1000,114 @@ var dt = [], ce = {
|
|
|
1003
1000
|
},
|
|
1004
1001
|
getEventProperties: function(t, e) {
|
|
1005
1002
|
var n = {};
|
|
1006
|
-
return
|
|
1007
|
-
typeof r.eventProperties == "function" &&
|
|
1003
|
+
return lt.forEach(function(r) {
|
|
1004
|
+
typeof r.eventProperties == "function" && K(n, r.eventProperties.call(e[r.pluginName], t));
|
|
1008
1005
|
}), n;
|
|
1009
1006
|
},
|
|
1010
1007
|
modifyOption: function(t, e, n) {
|
|
1011
1008
|
var r;
|
|
1012
|
-
return
|
|
1009
|
+
return lt.forEach(function(o) {
|
|
1013
1010
|
t[o.pluginName] && o.optionListeners && typeof o.optionListeners[e] == "function" && (r = o.optionListeners[e].call(t[o.pluginName], n));
|
|
1014
1011
|
}), r;
|
|
1015
1012
|
}
|
|
1016
1013
|
};
|
|
1017
|
-
function
|
|
1018
|
-
var t = i.sortable, e = i.rootEl, n = i.name, r = i.targetEl, o = i.cloneEl, a = i.toEl,
|
|
1019
|
-
if (t = t || e && e[
|
|
1020
|
-
var v,
|
|
1021
|
-
window.CustomEvent && !
|
|
1014
|
+
function Kn(i) {
|
|
1015
|
+
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, c = i.oldDraggableIndex, u = i.newDraggableIndex, f = i.originalEvent, _ = i.putSortable, y = i.extraEventProperties;
|
|
1016
|
+
if (t = t || e && e[B], !!t) {
|
|
1017
|
+
var v, j = t.options, Q = "on" + n.charAt(0).toUpperCase() + n.substr(1);
|
|
1018
|
+
window.CustomEvent && !J && !Jt ? v = new CustomEvent(n, {
|
|
1022
1019
|
bubbles: !0,
|
|
1023
1020
|
cancelable: !0
|
|
1024
|
-
}) : (v = document.createEvent("Event"), v.initEvent(n, !0, !0)), v.to = a || e, v.from =
|
|
1025
|
-
var N =
|
|
1026
|
-
for (var
|
|
1027
|
-
v[
|
|
1028
|
-
e && e.dispatchEvent(v),
|
|
1021
|
+
}) : (v = document.createEvent("Event"), v.initEvent(n, !0, !0)), v.to = a || e, v.from = s || e, v.item = r || e, v.clone = o, v.oldIndex = l, v.newIndex = d, v.oldDraggableIndex = c, v.newDraggableIndex = u, v.originalEvent = f, v.pullMode = _ ? _.lastPutMode : void 0;
|
|
1022
|
+
var N = F(F({}, y), Nt.getEventProperties(n, t));
|
|
1023
|
+
for (var tt in N)
|
|
1024
|
+
v[tt] = N[tt];
|
|
1025
|
+
e && e.dispatchEvent(v), j[Q] && j[Q].call(t, v);
|
|
1029
1026
|
}
|
|
1030
1027
|
}
|
|
1031
|
-
var
|
|
1032
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, o =
|
|
1033
|
-
|
|
1028
|
+
var Jn = ["evt"], P = function(t, e) {
|
|
1029
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, o = Vn(n, Jn);
|
|
1030
|
+
Nt.pluginEvent.bind(g)(t, e, F({
|
|
1034
1031
|
dragEl: h,
|
|
1035
|
-
parentEl:
|
|
1032
|
+
parentEl: S,
|
|
1036
1033
|
ghostEl: m,
|
|
1037
1034
|
rootEl: w,
|
|
1038
|
-
nextEl:
|
|
1039
|
-
lastDownEl:
|
|
1035
|
+
nextEl: rt,
|
|
1036
|
+
lastDownEl: Ft,
|
|
1040
1037
|
cloneEl: C,
|
|
1041
|
-
cloneHidden:
|
|
1042
|
-
dragStarted:
|
|
1043
|
-
putSortable:
|
|
1038
|
+
cloneHidden: q,
|
|
1039
|
+
dragStarted: St,
|
|
1040
|
+
putSortable: T,
|
|
1044
1041
|
activeSortable: g.active,
|
|
1045
1042
|
originalEvent: r,
|
|
1046
|
-
oldIndex:
|
|
1047
|
-
oldDraggableIndex:
|
|
1048
|
-
newIndex:
|
|
1049
|
-
newDraggableIndex:
|
|
1050
|
-
hideGhostForTarget:
|
|
1051
|
-
unhideGhostForTarget:
|
|
1043
|
+
oldIndex: ct,
|
|
1044
|
+
oldDraggableIndex: At,
|
|
1045
|
+
newIndex: M,
|
|
1046
|
+
newDraggableIndex: Y,
|
|
1047
|
+
hideGhostForTarget: cn,
|
|
1048
|
+
unhideGhostForTarget: fn,
|
|
1052
1049
|
cloneNowHidden: function() {
|
|
1053
|
-
|
|
1050
|
+
q = !0;
|
|
1054
1051
|
},
|
|
1055
1052
|
cloneNowShown: function() {
|
|
1056
|
-
|
|
1053
|
+
q = !1;
|
|
1057
1054
|
},
|
|
1058
|
-
dispatchSortableEvent: function(
|
|
1059
|
-
|
|
1055
|
+
dispatchSortableEvent: function(s) {
|
|
1056
|
+
x({
|
|
1060
1057
|
sortable: e,
|
|
1061
|
-
name:
|
|
1058
|
+
name: s,
|
|
1062
1059
|
originalEvent: r
|
|
1063
1060
|
});
|
|
1064
1061
|
}
|
|
1065
1062
|
}, o));
|
|
1066
1063
|
};
|
|
1067
|
-
function
|
|
1068
|
-
|
|
1069
|
-
putSortable:
|
|
1064
|
+
function x(i) {
|
|
1065
|
+
Kn(F({
|
|
1066
|
+
putSortable: T,
|
|
1070
1067
|
cloneEl: C,
|
|
1071
1068
|
targetEl: h,
|
|
1072
1069
|
rootEl: w,
|
|
1073
|
-
oldIndex:
|
|
1074
|
-
oldDraggableIndex:
|
|
1075
|
-
newIndex:
|
|
1076
|
-
newDraggableIndex:
|
|
1070
|
+
oldIndex: ct,
|
|
1071
|
+
oldDraggableIndex: At,
|
|
1072
|
+
newIndex: M,
|
|
1073
|
+
newDraggableIndex: Y
|
|
1077
1074
|
}, i));
|
|
1078
1075
|
}
|
|
1079
|
-
var h,
|
|
1080
|
-
if (
|
|
1081
|
-
if (
|
|
1076
|
+
var h, S, m, w, rt, Ft, C, q, ct, M, At, Y, Mt, T, ut = !1, Gt = !1, qt = [], nt, U, ce, fe, Ye, Ge, St, dt, Dt, Tt = !1, Ht = !1, jt, O, pe = [], be = !1, Zt = [], Qt = typeof document < "u", kt = rn, qe = Jt || J ? "cssFloat" : "float", Qn = Qt && !on && !rn && "draggable" in document.createElement("div"), dn = function() {
|
|
1077
|
+
if (Qt) {
|
|
1078
|
+
if (J)
|
|
1082
1079
|
return !1;
|
|
1083
1080
|
var i = document.createElement("x");
|
|
1084
1081
|
return i.style.cssText = "pointer-events:auto", i.style.pointerEvents === "auto";
|
|
1085
1082
|
}
|
|
1086
|
-
}(),
|
|
1087
|
-
var n = p(t), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), o =
|
|
1083
|
+
}(), hn = function(t, e) {
|
|
1084
|
+
var n = p(t), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), o = yt(t, 0, e), a = yt(t, 1, e), s = o && p(o), l = a && p(a), d = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + D(o).width, c = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + D(a).width;
|
|
1088
1085
|
if (n.display === "flex")
|
|
1089
1086
|
return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
1090
1087
|
if (n.display === "grid")
|
|
1091
1088
|
return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
1092
|
-
if (o &&
|
|
1093
|
-
var u =
|
|
1094
|
-
return a && (
|
|
1095
|
-
}
|
|
1096
|
-
return o && (
|
|
1097
|
-
},
|
|
1098
|
-
var r = n ? t.left : t.top, o = n ? t.right : t.bottom, a = n ? t.width : t.height,
|
|
1099
|
-
return r ===
|
|
1100
|
-
},
|
|
1089
|
+
if (o && s.float && s.float !== "none") {
|
|
1090
|
+
var u = s.float === "left" ? "left" : "right";
|
|
1091
|
+
return a && (l.clear === "both" || l.clear === u) ? "vertical" : "horizontal";
|
|
1092
|
+
}
|
|
1093
|
+
return o && (s.display === "block" || s.display === "flex" || s.display === "table" || s.display === "grid" || d >= r && n[qe] === "none" || a && n[qe] === "none" && d + c > r) ? "vertical" : "horizontal";
|
|
1094
|
+
}, ti = function(t, e, n) {
|
|
1095
|
+
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;
|
|
1096
|
+
return r === s || o === l || r + a / 2 === s + d / 2;
|
|
1097
|
+
}, ei = function(t, e) {
|
|
1101
1098
|
var n;
|
|
1102
|
-
return
|
|
1103
|
-
var o = r[
|
|
1104
|
-
if (!(!o ||
|
|
1105
|
-
var a =
|
|
1106
|
-
if (
|
|
1099
|
+
return qt.some(function(r) {
|
|
1100
|
+
var o = r[B].options.emptyInsertThreshold;
|
|
1101
|
+
if (!(!o || we(r))) {
|
|
1102
|
+
var a = D(r), s = t >= a.left - o && t <= a.right + o, l = e >= a.top - o && e <= a.bottom + o;
|
|
1103
|
+
if (s && l)
|
|
1107
1104
|
return n = r;
|
|
1108
1105
|
}
|
|
1109
1106
|
}), n;
|
|
1110
|
-
},
|
|
1107
|
+
}, un = function(t) {
|
|
1111
1108
|
function e(o, a) {
|
|
1112
|
-
return function(
|
|
1113
|
-
var u =
|
|
1109
|
+
return function(s, l, d, c) {
|
|
1110
|
+
var u = s.options.group.name && l.options.group.name && s.options.group.name === l.options.group.name;
|
|
1114
1111
|
if (o == null && (a || u))
|
|
1115
1112
|
return !0;
|
|
1116
1113
|
if (o == null || o === !1)
|
|
@@ -1118,42 +1115,42 @@ var h, A, m, w, ot, jt, C, Z, ft, H, Dt, G, Lt, x, ct = !1, qt = !1, Zt = [], it
|
|
|
1118
1115
|
if (a && o === "clone")
|
|
1119
1116
|
return o;
|
|
1120
1117
|
if (typeof o == "function")
|
|
1121
|
-
return e(o(
|
|
1122
|
-
var f = (a ?
|
|
1118
|
+
return e(o(s, l, d, c), a)(s, l, d, c);
|
|
1119
|
+
var f = (a ? s : l).options.group.name;
|
|
1123
1120
|
return o === !0 || typeof o == "string" && o === f || o.join && o.indexOf(f) > -1;
|
|
1124
1121
|
};
|
|
1125
1122
|
}
|
|
1126
1123
|
var n = {}, r = t.group;
|
|
1127
|
-
(!r ||
|
|
1124
|
+
(!r || Ut(r) != "object") && (r = {
|
|
1128
1125
|
name: r
|
|
1129
1126
|
}), n.name = r.name, n.checkPull = e(r.pull, !0), n.checkPut = e(r.put), n.revertClone = r.revertClone, t.group = n;
|
|
1127
|
+
}, cn = function() {
|
|
1128
|
+
!dn && m && p(m, "display", "none");
|
|
1130
1129
|
}, fn = function() {
|
|
1131
|
-
!
|
|
1132
|
-
}, pn = function() {
|
|
1133
|
-
!hn && m && p(m, "display", "");
|
|
1130
|
+
!dn && m && p(m, "display", "");
|
|
1134
1131
|
};
|
|
1135
|
-
|
|
1136
|
-
if (
|
|
1137
|
-
return i.preventDefault(), i.stopPropagation && i.stopPropagation(), i.stopImmediatePropagation && i.stopImmediatePropagation(),
|
|
1132
|
+
Qt && !on && document.addEventListener("click", function(i) {
|
|
1133
|
+
if (Gt)
|
|
1134
|
+
return i.preventDefault(), i.stopPropagation && i.stopPropagation(), i.stopImmediatePropagation && i.stopImmediatePropagation(), Gt = !1, !1;
|
|
1138
1135
|
}, !0);
|
|
1139
|
-
var
|
|
1136
|
+
var it = function(t) {
|
|
1140
1137
|
if (h) {
|
|
1141
1138
|
t = t.touches ? t.touches[0] : t;
|
|
1142
|
-
var e =
|
|
1139
|
+
var e = ei(t.clientX, t.clientY);
|
|
1143
1140
|
if (e) {
|
|
1144
1141
|
var n = {};
|
|
1145
1142
|
for (var r in t)
|
|
1146
1143
|
t.hasOwnProperty(r) && (n[r] = t[r]);
|
|
1147
|
-
n.target = n.rootEl = e, n.preventDefault = void 0, n.stopPropagation = void 0, e[
|
|
1144
|
+
n.target = n.rootEl = e, n.preventDefault = void 0, n.stopPropagation = void 0, e[B]._onDragOver(n);
|
|
1148
1145
|
}
|
|
1149
1146
|
}
|
|
1150
|
-
},
|
|
1151
|
-
h && h.parentNode[
|
|
1147
|
+
}, ni = function(t) {
|
|
1148
|
+
h && h.parentNode[B]._isOutsideThisEl(t.target);
|
|
1152
1149
|
};
|
|
1153
1150
|
function g(i, t) {
|
|
1154
1151
|
if (!(i && i.nodeType && i.nodeType === 1))
|
|
1155
1152
|
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(i));
|
|
1156
|
-
this.el = i, this.options = t =
|
|
1153
|
+
this.el = i, this.options = t = K({}, t), i[B] = this;
|
|
1157
1154
|
var e = {
|
|
1158
1155
|
group: null,
|
|
1159
1156
|
sort: !0,
|
|
@@ -1169,7 +1166,7 @@ function g(i, t) {
|
|
|
1169
1166
|
// will be set to same as swapThreshold if default
|
|
1170
1167
|
removeCloneOnHide: !0,
|
|
1171
1168
|
direction: function() {
|
|
1172
|
-
return
|
|
1169
|
+
return hn(i, this.options);
|
|
1173
1170
|
},
|
|
1174
1171
|
ghostClass: "sortable-ghost",
|
|
1175
1172
|
chosenClass: "sortable-chosen",
|
|
@@ -1179,8 +1176,8 @@ function g(i, t) {
|
|
|
1179
1176
|
preventOnFilter: !0,
|
|
1180
1177
|
animation: 0,
|
|
1181
1178
|
easing: null,
|
|
1182
|
-
setData: function(a,
|
|
1183
|
-
a.setData("Text",
|
|
1179
|
+
setData: function(a, s) {
|
|
1180
|
+
a.setData("Text", s.textContent);
|
|
1184
1181
|
},
|
|
1185
1182
|
dropBubble: !1,
|
|
1186
1183
|
dragoverBubble: !1,
|
|
@@ -1196,96 +1193,96 @@ function g(i, t) {
|
|
|
1196
1193
|
x: 0,
|
|
1197
1194
|
y: 0
|
|
1198
1195
|
},
|
|
1199
|
-
supportPointer: g.supportPointer !== !1 && "PointerEvent" in window && !
|
|
1196
|
+
supportPointer: g.supportPointer !== !1 && "PointerEvent" in window && !Vt,
|
|
1200
1197
|
emptyInsertThreshold: 5
|
|
1201
1198
|
};
|
|
1202
|
-
|
|
1199
|
+
Nt.initializePlugins(this, i, e);
|
|
1203
1200
|
for (var n in e)
|
|
1204
1201
|
!(n in t) && (t[n] = e[n]);
|
|
1205
|
-
|
|
1202
|
+
un(t);
|
|
1206
1203
|
for (var r in this)
|
|
1207
1204
|
r.charAt(0) === "_" && typeof this[r] == "function" && (this[r] = this[r].bind(this));
|
|
1208
|
-
this.nativeDraggable = t.forceFallback ? !1 :
|
|
1205
|
+
this.nativeDraggable = t.forceFallback ? !1 : Qn, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? $(i, "pointerdown", this._onTapStart) : ($(i, "mousedown", this._onTapStart), $(i, "touchstart", this._onTapStart)), this.nativeDraggable && ($(i, "dragover", this), $(i, "dragenter", this)), qt.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), K(this, Gn());
|
|
1209
1206
|
}
|
|
1210
1207
|
g.prototype = /** @lends Sortable.prototype */
|
|
1211
1208
|
{
|
|
1212
1209
|
constructor: g,
|
|
1213
1210
|
_isOutsideThisEl: function(t) {
|
|
1214
|
-
!this.el.contains(t) && t !== this.el && (
|
|
1211
|
+
!this.el.contains(t) && t !== this.el && (dt = null);
|
|
1215
1212
|
},
|
|
1216
1213
|
_getDirection: function(t, e) {
|
|
1217
1214
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, t, e, h) : this.options.direction;
|
|
1218
1215
|
},
|
|
1219
1216
|
_onTapStart: function(t) {
|
|
1220
1217
|
if (t.cancelable) {
|
|
1221
|
-
var e = this, n = this.el, r = this.options, o = r.preventOnFilter, a = t.type,
|
|
1222
|
-
if (
|
|
1223
|
-
if (
|
|
1224
|
-
if (c.call(this, t,
|
|
1225
|
-
|
|
1218
|
+
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, c = r.filter;
|
|
1219
|
+
if (hi(n), !h && !(/mousedown|pointerdown/.test(a) && t.button !== 0 || r.disabled) && !d.isContentEditable && !(!this.nativeDraggable && Vt && l && l.tagName.toUpperCase() === "SELECT") && (l = V(l, r.draggable, n, !1), !(l && l.animated) && Ft !== l)) {
|
|
1220
|
+
if (ct = R(l), At = R(l, r.draggable), typeof c == "function") {
|
|
1221
|
+
if (c.call(this, t, l, this)) {
|
|
1222
|
+
x({
|
|
1226
1223
|
sortable: e,
|
|
1227
1224
|
rootEl: d,
|
|
1228
1225
|
name: "filter",
|
|
1229
|
-
targetEl:
|
|
1226
|
+
targetEl: l,
|
|
1230
1227
|
toEl: n,
|
|
1231
1228
|
fromEl: n
|
|
1232
|
-
}),
|
|
1229
|
+
}), P("filter", e, {
|
|
1233
1230
|
evt: t
|
|
1234
1231
|
}), o && t.cancelable && t.preventDefault();
|
|
1235
1232
|
return;
|
|
1236
1233
|
}
|
|
1237
1234
|
} else if (c && (c = c.split(",").some(function(u) {
|
|
1238
|
-
if (u =
|
|
1239
|
-
return
|
|
1235
|
+
if (u = V(d, u.trim(), n, !1), u)
|
|
1236
|
+
return x({
|
|
1240
1237
|
sortable: e,
|
|
1241
1238
|
rootEl: u,
|
|
1242
1239
|
name: "filter",
|
|
1243
|
-
targetEl:
|
|
1240
|
+
targetEl: l,
|
|
1244
1241
|
fromEl: n,
|
|
1245
1242
|
toEl: n
|
|
1246
|
-
}),
|
|
1243
|
+
}), P("filter", e, {
|
|
1247
1244
|
evt: t
|
|
1248
1245
|
}), !0;
|
|
1249
1246
|
}), c)) {
|
|
1250
1247
|
o && t.cancelable && t.preventDefault();
|
|
1251
1248
|
return;
|
|
1252
1249
|
}
|
|
1253
|
-
r.handle && !
|
|
1250
|
+
r.handle && !V(d, r.handle, n, !1) || this._prepareDragStart(t, s, l);
|
|
1254
1251
|
}
|
|
1255
1252
|
}
|
|
1256
1253
|
},
|
|
1257
1254
|
_prepareDragStart: function(t, e, n) {
|
|
1258
|
-
var r = this, o = r.el, a = r.options,
|
|
1255
|
+
var r = this, o = r.el, a = r.options, s = o.ownerDocument, l;
|
|
1259
1256
|
if (n && !h && n.parentNode === o) {
|
|
1260
|
-
var d =
|
|
1261
|
-
if (w = o, h = n,
|
|
1257
|
+
var d = D(n);
|
|
1258
|
+
if (w = o, h = n, S = h.parentNode, rt = h.nextSibling, Ft = n, Mt = a.group, g.dragged = h, nt = {
|
|
1262
1259
|
target: h,
|
|
1263
1260
|
clientX: (e || t).clientX,
|
|
1264
1261
|
clientY: (e || t).clientY
|
|
1265
|
-
},
|
|
1266
|
-
if (
|
|
1262
|
+
}, Ye = nt.clientX - d.left, Ge = nt.clientY - d.top, this._lastX = (e || t).clientX, this._lastY = (e || t).clientY, h.style["will-change"] = "all", l = function() {
|
|
1263
|
+
if (P("delayEnded", r, {
|
|
1267
1264
|
evt: t
|
|
1268
1265
|
}), g.eventCanceled) {
|
|
1269
1266
|
r._onDrop();
|
|
1270
1267
|
return;
|
|
1271
1268
|
}
|
|
1272
|
-
r._disableDelayedDragEvents(), !
|
|
1269
|
+
r._disableDelayedDragEvents(), !Fe && r.nativeDraggable && (h.draggable = !0), r._triggerDragStart(t, e), x({
|
|
1273
1270
|
sortable: r,
|
|
1274
1271
|
name: "choose",
|
|
1275
1272
|
originalEvent: t
|
|
1276
|
-
}),
|
|
1273
|
+
}), L(h, a.chosenClass, !0);
|
|
1277
1274
|
}, a.ignore.split(",").forEach(function(c) {
|
|
1278
|
-
|
|
1279
|
-
}),
|
|
1275
|
+
sn(h, c.trim(), ge);
|
|
1276
|
+
}), $(s, "dragover", it), $(s, "mousemove", it), $(s, "touchmove", it), $(s, "mouseup", r._onDrop), $(s, "touchend", r._onDrop), $(s, "touchcancel", r._onDrop), Fe && this.nativeDraggable && (this.options.touchStartThreshold = 4, h.draggable = !0), P("delayStart", this, {
|
|
1280
1277
|
evt: t
|
|
1281
|
-
}), a.delay && (!a.delayOnTouchOnly || e) && (!this.nativeDraggable || !(
|
|
1278
|
+
}), a.delay && (!a.delayOnTouchOnly || e) && (!this.nativeDraggable || !(Jt || J))) {
|
|
1282
1279
|
if (g.eventCanceled) {
|
|
1283
1280
|
this._onDrop();
|
|
1284
1281
|
return;
|
|
1285
1282
|
}
|
|
1286
|
-
|
|
1283
|
+
$(s, "mouseup", r._disableDelayedDrag), $(s, "touchend", r._disableDelayedDrag), $(s, "touchcancel", r._disableDelayedDrag), $(s, "mousemove", r._delayedDragTouchMoveHandler), $(s, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && $(s, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(l, a.delay);
|
|
1287
1284
|
} else
|
|
1288
|
-
|
|
1285
|
+
l();
|
|
1289
1286
|
}
|
|
1290
1287
|
},
|
|
1291
1288
|
_delayedDragTouchMoveHandler: function(t) {
|
|
@@ -1293,28 +1290,28 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1293
1290
|
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();
|
|
1294
1291
|
},
|
|
1295
1292
|
_disableDelayedDrag: function() {
|
|
1296
|
-
h &&
|
|
1293
|
+
h && ge(h), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
1297
1294
|
},
|
|
1298
1295
|
_disableDelayedDragEvents: function() {
|
|
1299
1296
|
var t = this.el.ownerDocument;
|
|
1300
1297
|
b(t, "mouseup", this._disableDelayedDrag), b(t, "touchend", this._disableDelayedDrag), b(t, "touchcancel", this._disableDelayedDrag), b(t, "mousemove", this._delayedDragTouchMoveHandler), b(t, "touchmove", this._delayedDragTouchMoveHandler), b(t, "pointermove", this._delayedDragTouchMoveHandler);
|
|
1301
1298
|
},
|
|
1302
1299
|
_triggerDragStart: function(t, e) {
|
|
1303
|
-
e = e || t.pointerType == "touch" && t, !this.nativeDraggable || e ? this.options.supportPointer ?
|
|
1300
|
+
e = e || t.pointerType == "touch" && t, !this.nativeDraggable || e ? this.options.supportPointer ? $(document, "pointermove", this._onTouchMove) : e ? $(document, "touchmove", this._onTouchMove) : $(document, "mousemove", this._onTouchMove) : ($(h, "dragend", this), $(w, "dragstart", this._onDragStart));
|
|
1304
1301
|
try {
|
|
1305
|
-
document.selection ?
|
|
1302
|
+
document.selection ? zt(function() {
|
|
1306
1303
|
document.selection.empty();
|
|
1307
1304
|
}) : window.getSelection().removeAllRanges();
|
|
1308
1305
|
} catch {
|
|
1309
1306
|
}
|
|
1310
1307
|
},
|
|
1311
1308
|
_dragStarted: function(t, e) {
|
|
1312
|
-
if (
|
|
1313
|
-
|
|
1309
|
+
if (ut = !1, w && h) {
|
|
1310
|
+
P("dragStarted", this, {
|
|
1314
1311
|
evt: e
|
|
1315
|
-
}), this.nativeDraggable &&
|
|
1312
|
+
}), this.nativeDraggable && $(document, "dragover", ni);
|
|
1316
1313
|
var n = this.options;
|
|
1317
|
-
!t &&
|
|
1314
|
+
!t && L(h, n.dragClass, !1), L(h, n.ghostClass, !0), g.active = this, t && this._appendGhost(), x({
|
|
1318
1315
|
sortable: this,
|
|
1319
1316
|
name: "start",
|
|
1320
1317
|
originalEvent: e
|
|
@@ -1323,17 +1320,17 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1323
1320
|
this._nulling();
|
|
1324
1321
|
},
|
|
1325
1322
|
_emulateDragOver: function() {
|
|
1326
|
-
if (
|
|
1327
|
-
this._lastX =
|
|
1328
|
-
for (var t = document.elementFromPoint(
|
|
1323
|
+
if (U) {
|
|
1324
|
+
this._lastX = U.clientX, this._lastY = U.clientY, cn();
|
|
1325
|
+
for (var t = document.elementFromPoint(U.clientX, U.clientY), e = t; t && t.shadowRoot && (t = t.shadowRoot.elementFromPoint(U.clientX, U.clientY), t !== e); )
|
|
1329
1326
|
e = t;
|
|
1330
|
-
if (h.parentNode[
|
|
1327
|
+
if (h.parentNode[B]._isOutsideThisEl(t), e)
|
|
1331
1328
|
do {
|
|
1332
|
-
if (e[
|
|
1329
|
+
if (e[B]) {
|
|
1333
1330
|
var n = void 0;
|
|
1334
|
-
if (n = e[
|
|
1335
|
-
clientX:
|
|
1336
|
-
clientY:
|
|
1331
|
+
if (n = e[B]._onDragOver({
|
|
1332
|
+
clientX: U.clientX,
|
|
1333
|
+
clientY: U.clientY,
|
|
1337
1334
|
target: t,
|
|
1338
1335
|
rootEl: e
|
|
1339
1336
|
}), n && !this.options.dragoverBubble)
|
|
@@ -1341,19 +1338,19 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1341
1338
|
}
|
|
1342
1339
|
t = e;
|
|
1343
1340
|
} while (e = e.parentNode);
|
|
1344
|
-
|
|
1341
|
+
fn();
|
|
1345
1342
|
}
|
|
1346
1343
|
},
|
|
1347
1344
|
_onTouchMove: function(t) {
|
|
1348
|
-
if (
|
|
1349
|
-
var e = this.options, n = e.fallbackTolerance, r = e.fallbackOffset, o = t.touches ? t.touches[0] : t, a = m &&
|
|
1350
|
-
if (!g.active && !
|
|
1345
|
+
if (nt) {
|
|
1346
|
+
var e = this.options, n = e.fallbackTolerance, r = e.fallbackOffset, o = t.touches ? t.touches[0] : t, a = m && pt(m, !0), s = m && a && a.a, l = m && a && a.d, d = kt && O && Xe(O), c = (o.clientX - nt.clientX + r.x) / (s || 1) + (d ? d[0] - pe[0] : 0) / (s || 1), u = (o.clientY - nt.clientY + r.y) / (l || 1) + (d ? d[1] - pe[1] : 0) / (l || 1);
|
|
1347
|
+
if (!g.active && !ut) {
|
|
1351
1348
|
if (n && Math.max(Math.abs(o.clientX - this._lastX), Math.abs(o.clientY - this._lastY)) < n)
|
|
1352
1349
|
return;
|
|
1353
1350
|
this._onDragStart(t, !0);
|
|
1354
1351
|
}
|
|
1355
1352
|
if (m) {
|
|
1356
|
-
a ? (a.e += c - (
|
|
1353
|
+
a ? (a.e += c - (ce || 0), a.f += u - (fe || 0)) : a = {
|
|
1357
1354
|
a: 1,
|
|
1358
1355
|
b: 0,
|
|
1359
1356
|
c: 0,
|
|
@@ -1362,44 +1359,44 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1362
1359
|
f: u
|
|
1363
1360
|
};
|
|
1364
1361
|
var f = "matrix(".concat(a.a, ",").concat(a.b, ",").concat(a.c, ",").concat(a.d, ",").concat(a.e, ",").concat(a.f, ")");
|
|
1365
|
-
p(m, "webkitTransform", f), p(m, "mozTransform", f), p(m, "msTransform", f), p(m, "transform", f),
|
|
1362
|
+
p(m, "webkitTransform", f), p(m, "mozTransform", f), p(m, "msTransform", f), p(m, "transform", f), ce = c, fe = u, U = o;
|
|
1366
1363
|
}
|
|
1367
1364
|
t.cancelable && t.preventDefault();
|
|
1368
1365
|
}
|
|
1369
1366
|
},
|
|
1370
1367
|
_appendGhost: function() {
|
|
1371
1368
|
if (!m) {
|
|
1372
|
-
var t = this.options.fallbackOnBody ? document.body : w, e =
|
|
1373
|
-
if (
|
|
1369
|
+
var t = this.options.fallbackOnBody ? document.body : w, e = D(h, !0, kt, !0, t), n = this.options;
|
|
1370
|
+
if (kt) {
|
|
1374
1371
|
for (O = t; p(O, "position") === "static" && p(O, "transform") === "none" && O !== document; )
|
|
1375
1372
|
O = O.parentNode;
|
|
1376
|
-
O !== document.body && O !== document.documentElement ? (O === document && (O =
|
|
1373
|
+
O !== document.body && O !== document.documentElement ? (O === document && (O = Z()), e.top += O.scrollTop, e.left += O.scrollLeft) : O = Z(), pe = Xe(O);
|
|
1377
1374
|
}
|
|
1378
|
-
m = h.cloneNode(!0),
|
|
1375
|
+
m = h.cloneNode(!0), L(m, n.ghostClass, !1), L(m, n.fallbackClass, !0), L(m, n.dragClass, !0), p(m, "transition", ""), p(m, "transform", ""), p(m, "box-sizing", "border-box"), p(m, "margin", 0), p(m, "top", e.top), p(m, "left", e.left), p(m, "width", e.width), p(m, "height", e.height), p(m, "opacity", "0.8"), p(m, "position", kt ? "absolute" : "fixed"), p(m, "zIndex", "100000"), p(m, "pointerEvents", "none"), g.ghost = m, t.appendChild(m), p(m, "transform-origin", Ye / parseInt(m.style.width) * 100 + "% " + Ge / parseInt(m.style.height) * 100 + "%");
|
|
1379
1376
|
}
|
|
1380
1377
|
},
|
|
1381
1378
|
_onDragStart: function(t, e) {
|
|
1382
1379
|
var n = this, r = t.dataTransfer, o = n.options;
|
|
1383
|
-
if (
|
|
1380
|
+
if (P("dragStart", this, {
|
|
1384
1381
|
evt: t
|
|
1385
1382
|
}), g.eventCanceled) {
|
|
1386
1383
|
this._onDrop();
|
|
1387
1384
|
return;
|
|
1388
1385
|
}
|
|
1389
|
-
|
|
1390
|
-
|
|
1386
|
+
P("setupClone", this), g.eventCanceled || (C = ln(h), C.removeAttribute("id"), C.draggable = !1, C.style["will-change"] = "", this._hideClone(), L(C, this.options.chosenClass, !1), g.clone = C), n.cloneId = zt(function() {
|
|
1387
|
+
P("clone", n), !g.eventCanceled && (n.options.removeCloneOnHide || w.insertBefore(C, h), n._hideClone(), x({
|
|
1391
1388
|
sortable: n,
|
|
1392
1389
|
name: "clone"
|
|
1393
1390
|
}));
|
|
1394
|
-
}), !e &&
|
|
1391
|
+
}), !e && L(h, o.dragClass, !0), e ? (Gt = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (b(document, "mouseup", n._onDrop), b(document, "touchend", n._onDrop), b(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", o.setData && o.setData.call(n, r, h)), $(document, "drop", n), p(h, "transform", "translateZ(0)")), ut = !0, n._dragStartId = zt(n._dragStarted.bind(n, e, t)), $(document, "selectstart", n), St = !0, Vt && p(document.body, "user-select", "none");
|
|
1395
1392
|
},
|
|
1396
1393
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
1397
1394
|
_onDragOver: function(t) {
|
|
1398
|
-
var e = this.el, n = t.target, r, o, a,
|
|
1399
|
-
if (
|
|
1395
|
+
var e = this.el, n = t.target, r, o, a, s = this.options, l = s.group, d = g.active, c = Mt === l, u = s.sort, f = T || d, _, y = this, v = !1;
|
|
1396
|
+
if (be)
|
|
1400
1397
|
return;
|
|
1401
|
-
function
|
|
1402
|
-
|
|
1398
|
+
function j(wt, bn) {
|
|
1399
|
+
P(wt, y, F({
|
|
1403
1400
|
evt: t,
|
|
1404
1401
|
isOwner: c,
|
|
1405
1402
|
axis: _ ? "vertical" : "horizontal",
|
|
@@ -1410,72 +1407,72 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1410
1407
|
fromSortable: f,
|
|
1411
1408
|
target: n,
|
|
1412
1409
|
completed: N,
|
|
1413
|
-
onMove: function(
|
|
1414
|
-
return
|
|
1410
|
+
onMove: function(Te, En) {
|
|
1411
|
+
return Rt(w, e, h, r, Te, D(Te), t, En);
|
|
1415
1412
|
},
|
|
1416
|
-
changed:
|
|
1417
|
-
},
|
|
1413
|
+
changed: tt
|
|
1414
|
+
}, bn));
|
|
1418
1415
|
}
|
|
1419
|
-
function
|
|
1420
|
-
|
|
1416
|
+
function Q() {
|
|
1417
|
+
j("dragOverAnimationCapture"), y.captureAnimationState(), y !== f && f.captureAnimationState();
|
|
1421
1418
|
}
|
|
1422
|
-
function N(
|
|
1423
|
-
return
|
|
1424
|
-
insertion:
|
|
1425
|
-
}),
|
|
1426
|
-
|
|
1427
|
-
}), y !== f && (f.animateAll(), f._ignoreWhileAnimating = null)), (n === h && !h.animated || n === e && !n.animated) && (
|
|
1419
|
+
function N(wt) {
|
|
1420
|
+
return j("dragOverCompleted", {
|
|
1421
|
+
insertion: wt
|
|
1422
|
+
}), wt && (c ? d._hideClone() : d._showClone(y), y !== f && (L(h, T ? T.options.ghostClass : d.options.ghostClass, !1), L(h, s.ghostClass, !0)), T !== y && y !== g.active ? T = y : y === g.active && T && (T = null), f === y && (y._ignoreWhileAnimating = n), y.animateAll(function() {
|
|
1423
|
+
j("dragOverAnimationComplete"), y._ignoreWhileAnimating = null;
|
|
1424
|
+
}), y !== f && (f.animateAll(), f._ignoreWhileAnimating = null)), (n === h && !h.animated || n === e && !n.animated) && (dt = null), !s.dragoverBubble && !t.rootEl && n !== document && (h.parentNode[B]._isOutsideThisEl(t.target), !wt && it(t)), !s.dragoverBubble && t.stopPropagation && t.stopPropagation(), v = !0;
|
|
1428
1425
|
}
|
|
1429
|
-
function
|
|
1430
|
-
|
|
1426
|
+
function tt() {
|
|
1427
|
+
M = R(h), Y = R(h, s.draggable), x({
|
|
1431
1428
|
sortable: y,
|
|
1432
1429
|
name: "change",
|
|
1433
1430
|
toEl: e,
|
|
1434
|
-
newIndex:
|
|
1435
|
-
newDraggableIndex:
|
|
1431
|
+
newIndex: M,
|
|
1432
|
+
newDraggableIndex: Y,
|
|
1436
1433
|
originalEvent: t
|
|
1437
1434
|
});
|
|
1438
1435
|
}
|
|
1439
|
-
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), n =
|
|
1436
|
+
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), n = V(n, s.draggable, e, !0), j("dragOver"), g.eventCanceled)
|
|
1440
1437
|
return v;
|
|
1441
1438
|
if (h.contains(t.target) || n.animated && n.animatingX && n.animatingY || y._ignoreWhileAnimating === n)
|
|
1442
1439
|
return N(!1);
|
|
1443
|
-
if (
|
|
1444
|
-
if (_ = this._getDirection(t, n) === "vertical", r =
|
|
1440
|
+
if (Gt = !1, d && !s.disabled && (c ? u || (a = S !== w) : T === this || (this.lastPutMode = Mt.checkPull(this, d, h, t)) && l.checkPut(this, d, h, t))) {
|
|
1441
|
+
if (_ = this._getDirection(t, n) === "vertical", r = D(h), j("dragOverValid"), g.eventCanceled)
|
|
1445
1442
|
return v;
|
|
1446
1443
|
if (a)
|
|
1447
|
-
return
|
|
1448
|
-
var
|
|
1449
|
-
if (!
|
|
1450
|
-
if (
|
|
1444
|
+
return S = w, Q(), this._hideClone(), j("revert"), g.eventCanceled || (rt ? w.insertBefore(h, rt) : w.appendChild(h)), N(!0);
|
|
1445
|
+
var z = we(e, s.draggable);
|
|
1446
|
+
if (!z || ai(t, _, this) && !z.animated) {
|
|
1447
|
+
if (z === h)
|
|
1451
1448
|
return N(!1);
|
|
1452
|
-
if (
|
|
1453
|
-
return
|
|
1454
|
-
} else if (
|
|
1455
|
-
var
|
|
1456
|
-
if (
|
|
1449
|
+
if (z && e === t.target && (n = z), n && (o = D(n)), Rt(w, e, h, r, n, o, t, !!n) !== !1)
|
|
1450
|
+
return Q(), z && z.nextSibling ? e.insertBefore(h, z.nextSibling) : e.appendChild(h), S = e, tt(), N(!0);
|
|
1451
|
+
} else if (z && oi(t, _, this)) {
|
|
1452
|
+
var te = yt(e, 0, s, !0);
|
|
1453
|
+
if (te === h)
|
|
1457
1454
|
return N(!1);
|
|
1458
|
-
if (n =
|
|
1459
|
-
return
|
|
1455
|
+
if (n = te, o = D(n), Rt(w, e, h, r, n, o, t, !1) !== !1)
|
|
1456
|
+
return Q(), e.insertBefore(h, te), S = e, tt(), N(!0);
|
|
1460
1457
|
} else if (n.parentNode === e) {
|
|
1461
|
-
o =
|
|
1462
|
-
var
|
|
1463
|
-
|
|
1464
|
-
var
|
|
1465
|
-
if (
|
|
1466
|
-
var
|
|
1458
|
+
o = D(n);
|
|
1459
|
+
var st = 0, ee, yn = h.parentNode !== e, Ce = !ti(h.animated && h.toRect || r, n.animated && n.toRect || o, _), Se = _ ? "top" : "left", bt = ze(n, "top", "top") || ze(h, "top", "top"), _n = bt ? bt.scrollTop : void 0;
|
|
1460
|
+
dt !== n && (ee = o[Se], Tt = !1, Ht = !Ce && s.invertSwap || yn), st = si(t, n, o, _, Ce ? 1 : s.swapThreshold, s.invertedSwapThreshold == null ? s.swapThreshold : s.invertedSwapThreshold, Ht, dt === n);
|
|
1461
|
+
var Et;
|
|
1462
|
+
if (st !== 0) {
|
|
1463
|
+
var Ae = R(h);
|
|
1467
1464
|
do
|
|
1468
|
-
|
|
1469
|
-
while (
|
|
1465
|
+
Ae -= st, Et = S.children[Ae];
|
|
1466
|
+
while (Et && (p(Et, "display") === "none" || Et === m));
|
|
1470
1467
|
}
|
|
1471
|
-
if (
|
|
1468
|
+
if (st === 0 || Et === n)
|
|
1472
1469
|
return N(!1);
|
|
1473
|
-
|
|
1474
|
-
var
|
|
1475
|
-
|
|
1476
|
-
var
|
|
1477
|
-
if (
|
|
1478
|
-
return (
|
|
1470
|
+
dt = n, Dt = st;
|
|
1471
|
+
var De = n.nextElementSibling, $t = !1;
|
|
1472
|
+
$t = st === 1;
|
|
1473
|
+
var Lt = Rt(w, e, h, r, n, o, t, $t);
|
|
1474
|
+
if (Lt !== !1)
|
|
1475
|
+
return (Lt === 1 || Lt === -1) && ($t = Lt === 1), be = !0, setTimeout(ri, 30), Q(), $t && !De ? e.appendChild(h) : n.parentNode.insertBefore(h, $t ? De : n), bt && Yn(bt, 0, _n - bt.scrollTop), S = h.parentNode, ee !== void 0 && !Ht && (jt = Math.abs(ee - D(n)[Se])), tt(), N(!0);
|
|
1479
1476
|
}
|
|
1480
1477
|
if (e.contains(h))
|
|
1481
1478
|
return N(!1);
|
|
@@ -1484,7 +1481,7 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1484
1481
|
},
|
|
1485
1482
|
_ignoreWhileAnimating: null,
|
|
1486
1483
|
_offMoveEvents: function() {
|
|
1487
|
-
b(document, "mousemove", this._onTouchMove), b(document, "touchmove", this._onTouchMove), b(document, "pointermove", this._onTouchMove), b(document, "dragover",
|
|
1484
|
+
b(document, "mousemove", this._onTouchMove), b(document, "touchmove", this._onTouchMove), b(document, "pointermove", this._onTouchMove), b(document, "dragover", it), b(document, "mousemove", it), b(document, "touchmove", it);
|
|
1488
1485
|
},
|
|
1489
1486
|
_offUpEvents: function() {
|
|
1490
1487
|
var t = this.el.ownerDocument;
|
|
@@ -1492,62 +1489,62 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1492
1489
|
},
|
|
1493
1490
|
_onDrop: function(t) {
|
|
1494
1491
|
var e = this.el, n = this.options;
|
|
1495
|
-
if (
|
|
1492
|
+
if (M = R(h), Y = R(h, n.draggable), P("drop", this, {
|
|
1496
1493
|
evt: t
|
|
1497
|
-
}),
|
|
1494
|
+
}), S = h && h.parentNode, M = R(h), Y = R(h, n.draggable), g.eventCanceled) {
|
|
1498
1495
|
this._nulling();
|
|
1499
1496
|
return;
|
|
1500
1497
|
}
|
|
1501
|
-
|
|
1498
|
+
ut = !1, Ht = !1, Tt = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Ee(this.cloneId), Ee(this._dragStartId), this.nativeDraggable && (b(document, "drop", this), b(e, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Vt && p(document.body, "user-select", ""), p(h, "transform", ""), t && (St && (t.cancelable && t.preventDefault(), !n.dropBubble && t.stopPropagation()), m && m.parentNode && m.parentNode.removeChild(m), (w === S || T && T.lastPutMode !== "clone") && C && C.parentNode && C.parentNode.removeChild(C), h && (this.nativeDraggable && b(h, "dragend", this), ge(h), h.style["will-change"] = "", St && !ut && L(h, T ? T.options.ghostClass : this.options.ghostClass, !1), L(h, this.options.chosenClass, !1), x({
|
|
1502
1499
|
sortable: this,
|
|
1503
1500
|
name: "unchoose",
|
|
1504
|
-
toEl:
|
|
1501
|
+
toEl: S,
|
|
1505
1502
|
newIndex: null,
|
|
1506
1503
|
newDraggableIndex: null,
|
|
1507
1504
|
originalEvent: t
|
|
1508
|
-
}), w !==
|
|
1509
|
-
rootEl:
|
|
1505
|
+
}), w !== S ? (M >= 0 && (x({
|
|
1506
|
+
rootEl: S,
|
|
1510
1507
|
name: "add",
|
|
1511
|
-
toEl:
|
|
1508
|
+
toEl: S,
|
|
1512
1509
|
fromEl: w,
|
|
1513
1510
|
originalEvent: t
|
|
1514
|
-
}),
|
|
1511
|
+
}), x({
|
|
1515
1512
|
sortable: this,
|
|
1516
1513
|
name: "remove",
|
|
1517
|
-
toEl:
|
|
1514
|
+
toEl: S,
|
|
1518
1515
|
originalEvent: t
|
|
1519
|
-
}),
|
|
1520
|
-
rootEl:
|
|
1516
|
+
}), x({
|
|
1517
|
+
rootEl: S,
|
|
1521
1518
|
name: "sort",
|
|
1522
|
-
toEl:
|
|
1519
|
+
toEl: S,
|
|
1523
1520
|
fromEl: w,
|
|
1524
1521
|
originalEvent: t
|
|
1525
|
-
}),
|
|
1522
|
+
}), x({
|
|
1526
1523
|
sortable: this,
|
|
1527
1524
|
name: "sort",
|
|
1528
|
-
toEl:
|
|
1525
|
+
toEl: S,
|
|
1529
1526
|
originalEvent: t
|
|
1530
|
-
})),
|
|
1527
|
+
})), T && T.save()) : M !== ct && M >= 0 && (x({
|
|
1531
1528
|
sortable: this,
|
|
1532
1529
|
name: "update",
|
|
1533
|
-
toEl:
|
|
1530
|
+
toEl: S,
|
|
1534
1531
|
originalEvent: t
|
|
1535
|
-
}),
|
|
1532
|
+
}), x({
|
|
1536
1533
|
sortable: this,
|
|
1537
1534
|
name: "sort",
|
|
1538
|
-
toEl:
|
|
1535
|
+
toEl: S,
|
|
1539
1536
|
originalEvent: t
|
|
1540
|
-
})), g.active && ((
|
|
1537
|
+
})), g.active && ((M == null || M === -1) && (M = ct, Y = At), x({
|
|
1541
1538
|
sortable: this,
|
|
1542
1539
|
name: "end",
|
|
1543
|
-
toEl:
|
|
1540
|
+
toEl: S,
|
|
1544
1541
|
originalEvent: t
|
|
1545
1542
|
}), this.save()))), this._nulling();
|
|
1546
1543
|
},
|
|
1547
1544
|
_nulling: function() {
|
|
1548
|
-
|
|
1545
|
+
P("nulling", this), w = h = S = m = rt = C = Ft = q = nt = U = St = M = Y = ct = At = dt = Dt = T = Mt = g.dragged = g.ghost = g.clone = g.active = null, Zt.forEach(function(t) {
|
|
1549
1546
|
t.checked = !0;
|
|
1550
|
-
}),
|
|
1547
|
+
}), Zt.length = ce = fe = 0;
|
|
1551
1548
|
},
|
|
1552
1549
|
handleEvent: function(t) {
|
|
1553
1550
|
switch (t.type) {
|
|
@@ -1557,7 +1554,7 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1557
1554
|
break;
|
|
1558
1555
|
case "dragenter":
|
|
1559
1556
|
case "dragover":
|
|
1560
|
-
h && (this._onDragOver(t),
|
|
1557
|
+
h && (this._onDragOver(t), ii(t));
|
|
1561
1558
|
break;
|
|
1562
1559
|
case "selectstart":
|
|
1563
1560
|
t.preventDefault();
|
|
@@ -1570,7 +1567,7 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1570
1567
|
*/
|
|
1571
1568
|
toArray: function() {
|
|
1572
1569
|
for (var t = [], e, n = this.el.children, r = 0, o = n.length, a = this.options; r < o; r++)
|
|
1573
|
-
e = n[r],
|
|
1570
|
+
e = n[r], V(e, a.draggable, this.el, !1) && t.push(e.getAttribute(a.dataIdAttr) || di(e));
|
|
1574
1571
|
return t;
|
|
1575
1572
|
},
|
|
1576
1573
|
/**
|
|
@@ -1580,8 +1577,8 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1580
1577
|
sort: function(t, e) {
|
|
1581
1578
|
var n = {}, r = this.el;
|
|
1582
1579
|
this.toArray().forEach(function(o, a) {
|
|
1583
|
-
var
|
|
1584
|
-
|
|
1580
|
+
var s = r.children[a];
|
|
1581
|
+
V(s, this.options.draggable, r, !1) && (n[o] = s);
|
|
1585
1582
|
}, this), e && this.captureAnimationState(), t.forEach(function(o) {
|
|
1586
1583
|
n[o] && (r.removeChild(n[o]), r.appendChild(n[o]));
|
|
1587
1584
|
}), e && this.animateAll();
|
|
@@ -1600,7 +1597,7 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1600
1597
|
* @returns {HTMLElement|null}
|
|
1601
1598
|
*/
|
|
1602
1599
|
closest: function(t, e) {
|
|
1603
|
-
return
|
|
1600
|
+
return V(t, e || this.options.draggable, this.el, !1);
|
|
1604
1601
|
},
|
|
1605
1602
|
/**
|
|
1606
1603
|
* Set/get option
|
|
@@ -1612,24 +1609,24 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1612
1609
|
var n = this.options;
|
|
1613
1610
|
if (e === void 0)
|
|
1614
1611
|
return n[t];
|
|
1615
|
-
var r =
|
|
1616
|
-
typeof r < "u" ? n[t] = r : n[t] = e, t === "group" &&
|
|
1612
|
+
var r = Nt.modifyOption(this, t, e);
|
|
1613
|
+
typeof r < "u" ? n[t] = r : n[t] = e, t === "group" && un(n);
|
|
1617
1614
|
},
|
|
1618
1615
|
/**
|
|
1619
1616
|
* Destroy
|
|
1620
1617
|
*/
|
|
1621
1618
|
destroy: function() {
|
|
1622
|
-
|
|
1619
|
+
P("destroy", this);
|
|
1623
1620
|
var t = this.el;
|
|
1624
|
-
t[
|
|
1621
|
+
t[B] = null, b(t, "mousedown", this._onTapStart), b(t, "touchstart", this._onTapStart), b(t, "pointerdown", this._onTapStart), this.nativeDraggable && (b(t, "dragover", this), b(t, "dragenter", this)), Array.prototype.forEach.call(t.querySelectorAll("[draggable]"), function(e) {
|
|
1625
1622
|
e.removeAttribute("draggable");
|
|
1626
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
1623
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), qt.splice(qt.indexOf(this.el), 1), this.el = t = null;
|
|
1627
1624
|
},
|
|
1628
1625
|
_hideClone: function() {
|
|
1629
|
-
if (!
|
|
1630
|
-
if (
|
|
1626
|
+
if (!q) {
|
|
1627
|
+
if (P("hideClone", this), g.eventCanceled)
|
|
1631
1628
|
return;
|
|
1632
|
-
p(C, "display", "none"), this.options.removeCloneOnHide && C.parentNode && C.parentNode.removeChild(C),
|
|
1629
|
+
p(C, "display", "none"), this.options.removeCloneOnHide && C.parentNode && C.parentNode.removeChild(C), q = !0;
|
|
1633
1630
|
}
|
|
1634
1631
|
},
|
|
1635
1632
|
_showClone: function(t) {
|
|
@@ -1637,95 +1634,95 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1637
1634
|
this._hideClone();
|
|
1638
1635
|
return;
|
|
1639
1636
|
}
|
|
1640
|
-
if (
|
|
1641
|
-
if (
|
|
1637
|
+
if (q) {
|
|
1638
|
+
if (P("showClone", this), g.eventCanceled)
|
|
1642
1639
|
return;
|
|
1643
|
-
h.parentNode == w && !this.options.group.revertClone ? w.insertBefore(C, h) :
|
|
1640
|
+
h.parentNode == w && !this.options.group.revertClone ? w.insertBefore(C, h) : rt ? w.insertBefore(C, rt) : w.appendChild(C), this.options.group.revertClone && this.animate(h, C), p(C, "display", ""), q = !1;
|
|
1644
1641
|
}
|
|
1645
1642
|
}
|
|
1646
1643
|
};
|
|
1647
|
-
function
|
|
1644
|
+
function ii(i) {
|
|
1648
1645
|
i.dataTransfer && (i.dataTransfer.dropEffect = "move"), i.cancelable && i.preventDefault();
|
|
1649
1646
|
}
|
|
1650
|
-
function
|
|
1651
|
-
var
|
|
1652
|
-
return window.CustomEvent && !
|
|
1647
|
+
function Rt(i, t, e, n, r, o, a, s) {
|
|
1648
|
+
var l, d = i[B], c = d.options.onMove, u;
|
|
1649
|
+
return window.CustomEvent && !J && !Jt ? l = new CustomEvent("move", {
|
|
1653
1650
|
bubbles: !0,
|
|
1654
1651
|
cancelable: !0
|
|
1655
|
-
}) : (
|
|
1652
|
+
}) : (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 || D(t), l.willInsertAfter = s, l.originalEvent = a, i.dispatchEvent(l), c && (u = c.call(d, l, a)), u;
|
|
1656
1653
|
}
|
|
1657
|
-
function
|
|
1654
|
+
function ge(i) {
|
|
1658
1655
|
i.draggable = !1;
|
|
1659
1656
|
}
|
|
1660
|
-
function
|
|
1661
|
-
|
|
1657
|
+
function ri() {
|
|
1658
|
+
be = !1;
|
|
1662
1659
|
}
|
|
1663
|
-
function
|
|
1664
|
-
var n =
|
|
1660
|
+
function oi(i, t, e) {
|
|
1661
|
+
var n = D(yt(e.el, 0, e.options, !0)), r = 10;
|
|
1665
1662
|
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;
|
|
1666
1663
|
}
|
|
1667
|
-
function
|
|
1668
|
-
var n =
|
|
1664
|
+
function ai(i, t, e) {
|
|
1665
|
+
var n = D(we(e.el, e.options.draggable)), r = 10;
|
|
1669
1666
|
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;
|
|
1670
1667
|
}
|
|
1671
|
-
function
|
|
1672
|
-
var
|
|
1668
|
+
function si(i, t, e, n, r, o, a, s) {
|
|
1669
|
+
var l = n ? i.clientY : i.clientX, d = n ? e.height : e.width, c = n ? e.top : e.left, u = n ? e.bottom : e.right, f = !1;
|
|
1673
1670
|
if (!a) {
|
|
1674
|
-
if (
|
|
1675
|
-
if (!
|
|
1671
|
+
if (s && jt < d * r) {
|
|
1672
|
+
if (!Tt && (Dt === 1 ? l > c + d * o / 2 : l < u - d * o / 2) && (Tt = !0), Tt)
|
|
1676
1673
|
f = !0;
|
|
1677
|
-
else if (
|
|
1678
|
-
return -
|
|
1679
|
-
} else if (
|
|
1680
|
-
return
|
|
1674
|
+
else if (Dt === 1 ? l < c + jt : l > u - jt)
|
|
1675
|
+
return -Dt;
|
|
1676
|
+
} else if (l > c + d * (1 - r) / 2 && l < u - d * (1 - r) / 2)
|
|
1677
|
+
return li(t);
|
|
1681
1678
|
}
|
|
1682
|
-
return f = f || a, f && (
|
|
1679
|
+
return f = f || a, f && (l < c + d * o / 2 || l > u - d * o / 2) ? l > c + d / 2 ? 1 : -1 : 0;
|
|
1683
1680
|
}
|
|
1684
|
-
function
|
|
1685
|
-
return
|
|
1681
|
+
function li(i) {
|
|
1682
|
+
return R(h) < R(i) ? 1 : -1;
|
|
1686
1683
|
}
|
|
1687
|
-
function
|
|
1684
|
+
function di(i) {
|
|
1688
1685
|
for (var t = i.tagName + i.className + i.src + i.href + i.textContent, e = t.length, n = 0; e--; )
|
|
1689
1686
|
n += t.charCodeAt(e);
|
|
1690
1687
|
return n.toString(36);
|
|
1691
1688
|
}
|
|
1692
|
-
function
|
|
1693
|
-
|
|
1689
|
+
function hi(i) {
|
|
1690
|
+
Zt.length = 0;
|
|
1694
1691
|
for (var t = i.getElementsByTagName("input"), e = t.length; e--; ) {
|
|
1695
1692
|
var n = t[e];
|
|
1696
|
-
n.checked &&
|
|
1693
|
+
n.checked && Zt.push(n);
|
|
1697
1694
|
}
|
|
1698
1695
|
}
|
|
1699
|
-
function
|
|
1696
|
+
function zt(i) {
|
|
1700
1697
|
return setTimeout(i, 0);
|
|
1701
1698
|
}
|
|
1702
|
-
function
|
|
1699
|
+
function Ee(i) {
|
|
1703
1700
|
return clearTimeout(i);
|
|
1704
1701
|
}
|
|
1705
|
-
|
|
1706
|
-
(g.active ||
|
|
1702
|
+
Qt && $(document, "touchmove", function(i) {
|
|
1703
|
+
(g.active || ut) && i.cancelable && i.preventDefault();
|
|
1707
1704
|
});
|
|
1708
1705
|
g.utils = {
|
|
1709
|
-
on:
|
|
1706
|
+
on: $,
|
|
1710
1707
|
off: b,
|
|
1711
1708
|
css: p,
|
|
1712
|
-
find:
|
|
1709
|
+
find: sn,
|
|
1713
1710
|
is: function(t, e) {
|
|
1714
|
-
return !!
|
|
1711
|
+
return !!V(t, e, t, !1);
|
|
1715
1712
|
},
|
|
1716
|
-
extend:
|
|
1717
|
-
throttle:
|
|
1718
|
-
closest:
|
|
1719
|
-
toggleClass:
|
|
1720
|
-
clone:
|
|
1721
|
-
index:
|
|
1722
|
-
nextTick:
|
|
1723
|
-
cancelNextTick:
|
|
1724
|
-
detectDirection:
|
|
1725
|
-
getChild:
|
|
1713
|
+
extend: Xn,
|
|
1714
|
+
throttle: Wn,
|
|
1715
|
+
closest: V,
|
|
1716
|
+
toggleClass: L,
|
|
1717
|
+
clone: ln,
|
|
1718
|
+
index: R,
|
|
1719
|
+
nextTick: zt,
|
|
1720
|
+
cancelNextTick: Ee,
|
|
1721
|
+
detectDirection: hn,
|
|
1722
|
+
getChild: yt
|
|
1726
1723
|
};
|
|
1727
1724
|
g.get = function(i) {
|
|
1728
|
-
return i[
|
|
1725
|
+
return i[B];
|
|
1729
1726
|
};
|
|
1730
1727
|
g.mount = function() {
|
|
1731
1728
|
for (var i = arguments.length, t = new Array(i), e = 0; e < i; e++)
|
|
@@ -1733,28 +1730,28 @@ g.mount = function() {
|
|
|
1733
1730
|
t[0].constructor === Array && (t = t[0]), t.forEach(function(n) {
|
|
1734
1731
|
if (!n.prototype || !n.prototype.constructor)
|
|
1735
1732
|
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));
|
|
1736
|
-
n.utils && (g.utils =
|
|
1733
|
+
n.utils && (g.utils = F(F({}, g.utils), n.utils)), Nt.mount(n);
|
|
1737
1734
|
});
|
|
1738
1735
|
};
|
|
1739
1736
|
g.create = function(i, t) {
|
|
1740
1737
|
return new g(i, t);
|
|
1741
1738
|
};
|
|
1742
|
-
g.version =
|
|
1743
|
-
var
|
|
1744
|
-
var e = t.originalEvent, n = t.putSortable, r = t.dragEl, o = t.activeSortable, a = t.dispatchSortableEvent,
|
|
1739
|
+
g.version = Fn;
|
|
1740
|
+
var pn = function(t) {
|
|
1741
|
+
var e = t.originalEvent, n = t.putSortable, r = t.dragEl, o = t.activeSortable, a = t.dispatchSortableEvent, s = t.hideGhostForTarget, l = t.unhideGhostForTarget;
|
|
1745
1742
|
if (e) {
|
|
1746
1743
|
var d = n || o;
|
|
1747
|
-
|
|
1744
|
+
s();
|
|
1748
1745
|
var c = e.changedTouches && e.changedTouches.length ? e.changedTouches[0] : e, u = document.elementFromPoint(c.clientX, c.clientY);
|
|
1749
|
-
|
|
1746
|
+
l(), d && !d.el.contains(u) && (a("spill"), this.onSpill({
|
|
1750
1747
|
dragEl: r,
|
|
1751
1748
|
putSortable: n
|
|
1752
1749
|
}));
|
|
1753
1750
|
}
|
|
1754
1751
|
};
|
|
1755
|
-
function
|
|
1752
|
+
function gn() {
|
|
1756
1753
|
}
|
|
1757
|
-
|
|
1754
|
+
gn.prototype = {
|
|
1758
1755
|
startIndex: null,
|
|
1759
1756
|
dragStart: function(t) {
|
|
1760
1757
|
var e = t.oldDraggableIndex;
|
|
@@ -1763,27 +1760,27 @@ mn.prototype = {
|
|
|
1763
1760
|
onSpill: function(t) {
|
|
1764
1761
|
var e = t.dragEl, n = t.putSortable;
|
|
1765
1762
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
1766
|
-
var r =
|
|
1763
|
+
var r = yt(this.sortable.el, this.startIndex, this.options);
|
|
1767
1764
|
r ? this.sortable.el.insertBefore(e, r) : this.sortable.el.appendChild(e), this.sortable.animateAll(), n && n.animateAll();
|
|
1768
1765
|
},
|
|
1769
|
-
drop:
|
|
1766
|
+
drop: pn
|
|
1770
1767
|
};
|
|
1771
|
-
|
|
1768
|
+
K(gn, {
|
|
1772
1769
|
pluginName: "revertOnSpill"
|
|
1773
1770
|
});
|
|
1774
|
-
function
|
|
1771
|
+
function mn() {
|
|
1775
1772
|
}
|
|
1776
|
-
|
|
1773
|
+
mn.prototype = {
|
|
1777
1774
|
onSpill: function(t) {
|
|
1778
1775
|
var e = t.dragEl, n = t.putSortable, r = n || this.sortable;
|
|
1779
1776
|
r.captureAnimationState(), e.parentNode && e.parentNode.removeChild(e), r.animateAll();
|
|
1780
1777
|
},
|
|
1781
|
-
drop:
|
|
1778
|
+
drop: pn
|
|
1782
1779
|
};
|
|
1783
|
-
|
|
1780
|
+
K(mn, {
|
|
1784
1781
|
pluginName: "removeOnSpill"
|
|
1785
1782
|
});
|
|
1786
|
-
const
|
|
1783
|
+
const vn = `
|
|
1787
1784
|
:host {
|
|
1788
1785
|
display: block;
|
|
1789
1786
|
}
|
|
@@ -1794,7 +1791,10 @@ const yn = `
|
|
|
1794
1791
|
.dragHandle {
|
|
1795
1792
|
cursor: ns-resize;
|
|
1796
1793
|
}
|
|
1797
|
-
|
|
1794
|
+
ul[data-group] {
|
|
1795
|
+
padding-inline-start: 40px;
|
|
1796
|
+
}
|
|
1797
|
+
`, ui = `
|
|
1798
1798
|
ul {
|
|
1799
1799
|
padding: 0;
|
|
1800
1800
|
}
|
|
@@ -1829,121 +1829,144 @@ li label > input[type=checkbox]:checked:after {
|
|
|
1829
1829
|
height: 24px;
|
|
1830
1830
|
}
|
|
1831
1831
|
`;
|
|
1832
|
-
var
|
|
1833
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
1832
|
+
var ci = Object.defineProperty, fi = Object.getOwnPropertyDescriptor, A = (i, t, e, n) => {
|
|
1833
|
+
for (var r = n > 1 ? void 0 : n ? fi(t, e) : t, o = i.length - 1, a; o >= 0; o--)
|
|
1834
1834
|
(a = i[o]) && (r = (n ? a(t, e, r) : a(r)) || r);
|
|
1835
|
-
return n && r &&
|
|
1835
|
+
return n && r && ci(t, e, r), r;
|
|
1836
1836
|
};
|
|
1837
|
-
let
|
|
1837
|
+
let H = class extends ft {
|
|
1838
1838
|
constructor() {
|
|
1839
|
-
super(...arguments)
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
}
|
|
1854
|
-
_updateControl(
|
|
1855
|
-
this.layerCollection =
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
_emitLayerconfig(t) {
|
|
1864
|
-
const e = {
|
|
1839
|
+
super(...arguments), this.layerIdentifier = "ol_uid", this.layerTitle = "title", this.sortBy = "layerOrder", this.layerConfig = ["opacity"], this.externalLayerConfig = void 0, this.filterLayers = (i, t, e) => {
|
|
1840
|
+
let n = [];
|
|
1841
|
+
const r = (o, a, s) => {
|
|
1842
|
+
n = [...n, ...o.filter((d) => d.get(a) === s)];
|
|
1843
|
+
const l = o.filter((d) => d.getLayers);
|
|
1844
|
+
return l.length > 0 && l.forEach(
|
|
1845
|
+
(d) => (
|
|
1846
|
+
// @ts-ignore
|
|
1847
|
+
r(d.getLayers().getArray(), a, s)
|
|
1848
|
+
)
|
|
1849
|
+
), n;
|
|
1850
|
+
};
|
|
1851
|
+
return r(i, t, e), n;
|
|
1852
|
+
}, this.findLayerById = (i, t) => this.filterLayers(i, "id", t)[0];
|
|
1853
|
+
}
|
|
1854
|
+
_updateControl(i) {
|
|
1855
|
+
this.layerCollection = i, this.optionalLayerArray = this.filterLayers(
|
|
1856
|
+
i.getArray(),
|
|
1857
|
+
"layerControlOptional",
|
|
1858
|
+
!0
|
|
1859
|
+
), this.requestUpdate();
|
|
1860
|
+
}
|
|
1861
|
+
_emitLayerconfig(i) {
|
|
1862
|
+
const t = {
|
|
1865
1863
|
detail: {
|
|
1866
|
-
layer:
|
|
1864
|
+
layer: i
|
|
1867
1865
|
},
|
|
1868
1866
|
bubbles: !0,
|
|
1869
1867
|
composed: !0
|
|
1870
1868
|
};
|
|
1871
|
-
this.dispatchEvent(new CustomEvent("layerconfig",
|
|
1869
|
+
this.dispatchEvent(new CustomEvent("layerconfig", t));
|
|
1872
1870
|
}
|
|
1873
|
-
changeOpacity(
|
|
1874
|
-
|
|
1871
|
+
changeOpacity(i, t) {
|
|
1872
|
+
i.setOpacity(t);
|
|
1875
1873
|
}
|
|
1876
|
-
changeStyleProperty(t, e
|
|
1877
|
-
|
|
1874
|
+
changeStyleProperty(i, t, e) {
|
|
1875
|
+
i.updateStyleVariables({
|
|
1878
1876
|
// @ts-ignore
|
|
1879
|
-
...
|
|
1880
|
-
[
|
|
1877
|
+
...i.style_,
|
|
1878
|
+
[t]: e
|
|
1881
1879
|
});
|
|
1882
1880
|
}
|
|
1881
|
+
preFilterLayers(i) {
|
|
1882
|
+
return [...i].filter(
|
|
1883
|
+
(t) => t.get("layerControlHide") !== !0 && t.get("layerControlOptional") !== !0
|
|
1884
|
+
);
|
|
1885
|
+
}
|
|
1883
1886
|
resetLayerConfig() {
|
|
1884
|
-
|
|
1885
|
-
|
|
1887
|
+
const i = this.layerConfig;
|
|
1888
|
+
this.layerConfig = [], this.hideList = !0, setTimeout(() => {
|
|
1889
|
+
this.layerConfig = i, this.hideList = !1, this.requestUpdate();
|
|
1886
1890
|
}, 0);
|
|
1887
1891
|
}
|
|
1888
1892
|
render() {
|
|
1889
1893
|
var r;
|
|
1890
|
-
const
|
|
1891
|
-
|
|
1892
|
-
this._currentlySorting || this._updateControl(
|
|
1893
|
-
})
|
|
1894
|
+
const i = document.querySelector(this.for), e = (i.map || i).getLayers();
|
|
1895
|
+
this._updateControl(e), e.on("change:length", () => {
|
|
1896
|
+
this._currentlySorting || this._updateControl(e);
|
|
1897
|
+
});
|
|
1898
|
+
const n = (o, a) => I`
|
|
1899
|
+
<ul data-group="${a ?? E}">
|
|
1900
|
+
${_e(
|
|
1901
|
+
o,
|
|
1902
|
+
(s) => I`
|
|
1903
|
+
<li
|
|
1904
|
+
data-layer="${//@ts-ignore
|
|
1905
|
+
s.get(this.layerIdentifier)}"
|
|
1906
|
+
data-disabled="${s.get("layerControlDisable") || E}"
|
|
1907
|
+
>
|
|
1908
|
+
<div class="layer">
|
|
1909
|
+
<label>
|
|
1910
|
+
<input
|
|
1911
|
+
type="checkbox"
|
|
1912
|
+
checked="${s.getVisible() || E}"
|
|
1913
|
+
@click=${() => {
|
|
1914
|
+
s.setVisible(!s.getVisible()), this.requestUpdate();
|
|
1915
|
+
}}
|
|
1916
|
+
/>
|
|
1917
|
+
<span class="title"
|
|
1918
|
+
>${s.get(this.layerTitle) || `layer ${// @ts-ignore
|
|
1919
|
+
s.get(this.layerIdentifier)}`}</span
|
|
1920
|
+
>
|
|
1921
|
+
</label>
|
|
1922
|
+
${this.sortBy === "layerOrder" && !s.get("layerControlDisable") ? I`<div class="dragHandle">
|
|
1923
|
+
<span>=</span>
|
|
1924
|
+
</div>` : E}
|
|
1925
|
+
</div>
|
|
1926
|
+
${this.layerConfig ? I`
|
|
1927
|
+
<eox-layerconfig
|
|
1928
|
+
.layerConfig="${this.layerConfig}"
|
|
1929
|
+
.layerControl="${this}"
|
|
1930
|
+
.layer=${s}
|
|
1931
|
+
.external=${this.externalLayerConfig}
|
|
1932
|
+
></eox-layerconfig>
|
|
1933
|
+
` : E}
|
|
1934
|
+
${// @ts-ignore
|
|
1935
|
+
this.externalLayerConfig && s.style_ ? I`
|
|
1936
|
+
<button
|
|
1937
|
+
@click=${() => this._emitLayerconfig(s)}
|
|
1938
|
+
>
|
|
1939
|
+
configure
|
|
1940
|
+
</button>
|
|
1941
|
+
` : E}
|
|
1942
|
+
${// @ts-ignore
|
|
1943
|
+
s.getLayers ? n(
|
|
1944
|
+
this.preFilterLayers(
|
|
1945
|
+
// @ts-ignore
|
|
1946
|
+
[...s.getLayers().getArray()].reverse()
|
|
1947
|
+
),
|
|
1948
|
+
s.get("id")
|
|
1949
|
+
) : E}
|
|
1950
|
+
</li>
|
|
1951
|
+
`
|
|
1952
|
+
)}
|
|
1953
|
+
</ul>
|
|
1954
|
+
`;
|
|
1955
|
+
return I`
|
|
1894
1956
|
<style>
|
|
1895
|
-
${
|
|
1896
|
-
${!this.unstyled &&
|
|
1957
|
+
${vn}
|
|
1958
|
+
${!this.unstyled && ui}
|
|
1897
1959
|
</style>
|
|
1898
1960
|
<div>
|
|
1899
1961
|
<slot></slot>
|
|
1900
|
-
<
|
|
1901
|
-
${
|
|
1902
|
-
this.
|
|
1903
|
-
(o) => L`
|
|
1904
|
-
<li
|
|
1905
|
-
layerid="${//@ts-ignore
|
|
1906
|
-
o.get(this.layerIdentifier)}"
|
|
1907
|
-
>
|
|
1908
|
-
<div class="layer">
|
|
1909
|
-
<label>
|
|
1910
|
-
<input
|
|
1911
|
-
type="checkbox"
|
|
1912
|
-
checked="${o.getVisible() || $}"
|
|
1913
|
-
@click=${() => {
|
|
1914
|
-
o.setVisible(!o.getVisible()), this.requestUpdate();
|
|
1915
|
-
}}
|
|
1916
|
-
/>
|
|
1917
|
-
<span class="title"
|
|
1918
|
-
>${o.get(this.layerTitle) || `layer ${// @ts-ignore
|
|
1919
|
-
o.get(this.layerIdentifier)}`}</span
|
|
1920
|
-
>
|
|
1921
|
-
</label>
|
|
1922
|
-
${this.sortBy === "layerOrder" ? L`<div class="dragHandle">
|
|
1923
|
-
<span>=</span>
|
|
1924
|
-
</div>` : $}
|
|
1925
|
-
</div>
|
|
1926
|
-
${this.layerConfig && !this.hideConfigs ? L`
|
|
1927
|
-
<eox-layerconfig
|
|
1928
|
-
.layerConfig="${this.layerConfig}"
|
|
1929
|
-
.layerControl="${this}"
|
|
1930
|
-
.layer=${o}
|
|
1931
|
-
.external=${this.externalLayerConfig}
|
|
1932
|
-
></eox-layerconfig>
|
|
1933
|
-
` : $}
|
|
1934
|
-
${// @ts-ignore
|
|
1935
|
-
this.externalLayerConfig && o.style_ ? L`
|
|
1936
|
-
<button @click=${() => this._emitLayerconfig(o)}>
|
|
1937
|
-
configure
|
|
1938
|
-
</button>
|
|
1939
|
-
` : $}
|
|
1940
|
-
</li>
|
|
1941
|
-
`
|
|
1962
|
+
<div>
|
|
1963
|
+
${!this.hideList && n(
|
|
1964
|
+
this.preFilterLayers(e.getArray())
|
|
1942
1965
|
)}
|
|
1943
|
-
</
|
|
1944
|
-
${
|
|
1966
|
+
</div>
|
|
1967
|
+
${nn(
|
|
1945
1968
|
((r = this.optionalLayerArray) == null ? void 0 : r.length) > 0,
|
|
1946
|
-
() =>
|
|
1969
|
+
() => I`
|
|
1947
1970
|
<label for="optional">Optional layers</label>
|
|
1948
1971
|
|
|
1949
1972
|
<select name="optional">
|
|
@@ -1951,7 +1974,7 @@ let k = class extends pt {
|
|
|
1951
1974
|
-- select an optional layer to add --
|
|
1952
1975
|
</option>
|
|
1953
1976
|
${this.optionalLayerArray.map(
|
|
1954
|
-
(o) =>
|
|
1977
|
+
(o) => I`
|
|
1955
1978
|
<option
|
|
1956
1979
|
value="${// @ts-ignore
|
|
1957
1980
|
o.get(this.layerIdentifier)}"
|
|
@@ -1969,10 +1992,18 @@ let k = class extends pt {
|
|
|
1969
1992
|
(a) => a.get(this.layerIdentifier) === // @ts-ignore
|
|
1970
1993
|
this.shadowRoot.querySelector("select[name=optional]").value
|
|
1971
1994
|
);
|
|
1972
|
-
|
|
1973
|
-
this.
|
|
1974
|
-
|
|
1975
|
-
|
|
1995
|
+
if (o.get("group")) {
|
|
1996
|
+
const a = this.findLayerById(
|
|
1997
|
+
this.layerCollection.getArray(),
|
|
1998
|
+
o.get("group")
|
|
1999
|
+
);
|
|
2000
|
+
a.getLayers().remove(o), a.getLayers().insertAt(a.getLayers().getLength(), o);
|
|
2001
|
+
} else
|
|
2002
|
+
this.layerCollection.remove(o), this.layerCollection.insertAt(
|
|
2003
|
+
this.layerCollection.getLength(),
|
|
2004
|
+
o
|
|
2005
|
+
);
|
|
2006
|
+
o.set("layerControlOptional", !1), o.setVisible(!0), this.resetLayerConfig();
|
|
1976
2007
|
}}"
|
|
1977
2008
|
>
|
|
1978
2009
|
add
|
|
@@ -1983,176 +2014,191 @@ let k = class extends pt {
|
|
|
1983
2014
|
`;
|
|
1984
2015
|
}
|
|
1985
2016
|
updated() {
|
|
1986
|
-
this.sortBy == "layerOrder" &&
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
)
|
|
1998
|
-
|
|
1999
|
-
|
|
2017
|
+
this.sortBy == "layerOrder" && this.renderRoot.querySelectorAll("ul").forEach((t) => {
|
|
2018
|
+
const e = t.dataset.group;
|
|
2019
|
+
g.create(t, {
|
|
2020
|
+
handle: ".dragHandle",
|
|
2021
|
+
dataIdAttr: "data-layer",
|
|
2022
|
+
filter: "data-disabled",
|
|
2023
|
+
store: {
|
|
2024
|
+
get: () => e ? [
|
|
2025
|
+
...this.findLayerById(
|
|
2026
|
+
this.layerCollection.getArray(),
|
|
2027
|
+
e
|
|
2028
|
+
).getLayers().getArray().map((o) => o.get(this.layerIdentifier))
|
|
2029
|
+
].reverse() : [
|
|
2030
|
+
...this.layerCollection.getArray().map((n) => n.get(this.layerIdentifier))
|
|
2031
|
+
].reverse(),
|
|
2032
|
+
set: (n) => {
|
|
2033
|
+
var r = n.toArray().reverse();
|
|
2034
|
+
r.forEach((o, a) => {
|
|
2035
|
+
if (e) {
|
|
2036
|
+
const l = this.findLayerById(
|
|
2037
|
+
this.layerCollection.getArray(),
|
|
2038
|
+
e
|
|
2039
|
+
).getLayers(), d = this.findLayerById(
|
|
2040
|
+
l.getArray(),
|
|
2041
|
+
o
|
|
2042
|
+
);
|
|
2043
|
+
l.remove(d), l.insertAt(a, d);
|
|
2044
|
+
} else {
|
|
2045
|
+
const s = this.findLayerById(
|
|
2046
|
+
this.layerCollection.getArray(),
|
|
2047
|
+
o
|
|
2048
|
+
);
|
|
2049
|
+
this.layerCollection.remove(s), this.layerCollection.insertAt(a, s);
|
|
2050
|
+
}
|
|
2051
|
+
});
|
|
2052
|
+
}
|
|
2053
|
+
},
|
|
2054
|
+
onMove: (n) => !n.related.dataset.disabled,
|
|
2055
|
+
onSort: () => {
|
|
2056
|
+
this.resetLayerConfig();
|
|
2000
2057
|
}
|
|
2001
|
-
}
|
|
2002
|
-
onSort: () => {
|
|
2003
|
-
this.resetLayerConfig();
|
|
2004
|
-
}
|
|
2058
|
+
});
|
|
2005
2059
|
});
|
|
2006
2060
|
}
|
|
2007
2061
|
};
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
],
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
],
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
],
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
],
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
],
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
],
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
],
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
],
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
],
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
],
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
],
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
],
|
|
2044
|
-
let
|
|
2062
|
+
A([
|
|
2063
|
+
_t()
|
|
2064
|
+
], H.prototype, "olMap", 2);
|
|
2065
|
+
A([
|
|
2066
|
+
_t()
|
|
2067
|
+
], H.prototype, "layerCollection", 2);
|
|
2068
|
+
A([
|
|
2069
|
+
_t()
|
|
2070
|
+
], H.prototype, "layerArray", 2);
|
|
2071
|
+
A([
|
|
2072
|
+
_t()
|
|
2073
|
+
], H.prototype, "optionalLayerArray", 2);
|
|
2074
|
+
A([
|
|
2075
|
+
k()
|
|
2076
|
+
], H.prototype, "for", 2);
|
|
2077
|
+
A([
|
|
2078
|
+
k()
|
|
2079
|
+
], H.prototype, "layerIdentifier", 2);
|
|
2080
|
+
A([
|
|
2081
|
+
k()
|
|
2082
|
+
], H.prototype, "layerTitle", 2);
|
|
2083
|
+
A([
|
|
2084
|
+
k()
|
|
2085
|
+
], H.prototype, "sortBy", 2);
|
|
2086
|
+
A([
|
|
2087
|
+
k({ type: Array })
|
|
2088
|
+
], H.prototype, "layerConfig", 2);
|
|
2089
|
+
A([
|
|
2090
|
+
k({ type: Boolean })
|
|
2091
|
+
], H.prototype, "externalLayerConfig", 2);
|
|
2092
|
+
A([
|
|
2093
|
+
k({ type: Boolean })
|
|
2094
|
+
], H.prototype, "unstyled", 2);
|
|
2095
|
+
H = A([
|
|
2096
|
+
en("eox-layercontrol")
|
|
2097
|
+
], H);
|
|
2098
|
+
let W = class extends ft {
|
|
2045
2099
|
constructor() {
|
|
2046
|
-
super(...arguments);
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
S(this, "layer");
|
|
2051
|
-
S(this, "external");
|
|
2052
|
-
S(this, "_layerControlElement");
|
|
2053
|
-
S(this, "_currentLayer");
|
|
2054
|
-
S(this, "_configList", {});
|
|
2055
|
-
}
|
|
2056
|
-
_handleInput(t, e) {
|
|
2057
|
-
e === "opacity" ? this._layerControlElement.changeOpacity(
|
|
2100
|
+
super(...arguments), this._configList = {};
|
|
2101
|
+
}
|
|
2102
|
+
_handleInput(i, t) {
|
|
2103
|
+
t === "opacity" ? this._layerControlElement.changeOpacity(
|
|
2058
2104
|
this._currentLayer,
|
|
2059
|
-
parseFloat(
|
|
2105
|
+
parseFloat(i.target.value)
|
|
2060
2106
|
) : this._layerControlElement.changeStyleProperty(
|
|
2061
2107
|
this._currentLayer,
|
|
2062
|
-
|
|
2063
|
-
parseFloat(
|
|
2108
|
+
t,
|
|
2109
|
+
parseFloat(i.target.value)
|
|
2064
2110
|
);
|
|
2065
2111
|
}
|
|
2066
|
-
_parseConfigs(
|
|
2067
|
-
if (!
|
|
2112
|
+
_parseConfigs(i) {
|
|
2113
|
+
if (!i)
|
|
2068
2114
|
return;
|
|
2069
|
-
const
|
|
2070
|
-
|
|
2115
|
+
const t = i.style_;
|
|
2116
|
+
t && t.color && t.color[0] === "array" && (this._configList = t.variables);
|
|
2071
2117
|
}
|
|
2072
2118
|
connectedCallback() {
|
|
2073
|
-
super.connectedCallback(), !this.layerConfig && !this.layerControl ? (this._layerControlElement = document.querySelector(this.for), this.layerConfig = this._layerControlElement.layerConfig, this._layerControlElement && this._layerControlElement.addEventListener("layerconfig", (
|
|
2074
|
-
this._currentLayer =
|
|
2119
|
+
super.connectedCallback(), !this.layerConfig && !this.layerControl ? (this._layerControlElement = document.querySelector(this.for), this.layerConfig = this._layerControlElement.layerConfig, this._layerControlElement && this._layerControlElement.addEventListener("layerconfig", (i) => {
|
|
2120
|
+
this._currentLayer = i.detail.layer, this._parseConfigs(this._currentLayer), this.requestUpdate();
|
|
2075
2121
|
})) : (this._layerControlElement = this.layerControl, this._currentLayer = this.layer, this._parseConfigs(this._currentLayer));
|
|
2076
2122
|
}
|
|
2077
2123
|
render() {
|
|
2078
|
-
return
|
|
2124
|
+
return I`
|
|
2079
2125
|
<style>
|
|
2080
|
-
${
|
|
2126
|
+
${vn}
|
|
2081
2127
|
</style>
|
|
2082
|
-
${
|
|
2128
|
+
${nn(
|
|
2083
2129
|
this._currentLayer,
|
|
2084
|
-
() =>
|
|
2130
|
+
() => I`
|
|
2085
2131
|
<div>
|
|
2086
2132
|
<slot></slot>
|
|
2087
|
-
${this.for ?
|
|
2088
|
-
${
|
|
2133
|
+
${this.for ? I`layer: ${this._currentLayer.get("name")}` : E}
|
|
2134
|
+
${_e(
|
|
2089
2135
|
this.layerConfig.filter(
|
|
2090
|
-
(
|
|
2136
|
+
(i) => this.for ? i !== "opacity" : !0
|
|
2091
2137
|
),
|
|
2092
|
-
(
|
|
2093
|
-
<div>${
|
|
2138
|
+
(i) => I`
|
|
2139
|
+
<div>${i}</div>
|
|
2094
2140
|
<input
|
|
2095
2141
|
type="range"
|
|
2096
2142
|
min="0"
|
|
2097
2143
|
max="1"
|
|
2098
2144
|
step="0.01"
|
|
2099
2145
|
value="${this._currentLayer.getOpacity()}"
|
|
2100
|
-
@input=${(
|
|
2146
|
+
@input=${(t) => this._handleInput(t, i)}
|
|
2101
2147
|
/>
|
|
2102
2148
|
`
|
|
2103
2149
|
)}
|
|
2104
|
-
${Object.keys(this._configList).length > 0 && !this.external ?
|
|
2105
|
-
<details open="${this.for ? !0 :
|
|
2150
|
+
${Object.keys(this._configList).length > 0 && !this.external ? I`
|
|
2151
|
+
<details open="${this.for ? !0 : E}">
|
|
2106
2152
|
<summary>Layer config</summary>
|
|
2107
2153
|
<ul>
|
|
2108
|
-
${
|
|
2154
|
+
${_e(
|
|
2109
2155
|
Object.keys(this._configList),
|
|
2110
|
-
(
|
|
2111
|
-
<div>${
|
|
2156
|
+
(i) => I` <li>
|
|
2157
|
+
<div>${i}</div>
|
|
2112
2158
|
<input
|
|
2113
2159
|
type="range"
|
|
2114
|
-
min="${["red", "green", "blue"].includes(
|
|
2115
|
-
max="${["red", "green", "blue"].includes(
|
|
2160
|
+
min="${["red", "green", "blue"].includes(i) ? 1 : 2e3}"
|
|
2161
|
+
max="${["red", "green", "blue"].includes(i) ? 4 : 5e3}"
|
|
2116
2162
|
value="${// @ts-ignore
|
|
2117
|
-
this._configList[
|
|
2118
|
-
@input=${(
|
|
2163
|
+
this._configList[i]}"
|
|
2164
|
+
@input=${(t) => this._handleInput(t, i)}
|
|
2119
2165
|
/>
|
|
2120
2166
|
</li>`
|
|
2121
2167
|
)}
|
|
2122
2168
|
</ul>
|
|
2123
2169
|
</details>
|
|
2124
|
-
` :
|
|
2170
|
+
` : E}
|
|
2125
2171
|
</div>
|
|
2126
2172
|
`
|
|
2127
2173
|
)}
|
|
2128
2174
|
`;
|
|
2129
2175
|
}
|
|
2130
2176
|
};
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
],
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
],
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
],
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
],
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
],
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
],
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
],
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
],
|
|
2177
|
+
A([
|
|
2178
|
+
k()
|
|
2179
|
+
], W.prototype, "for", 2);
|
|
2180
|
+
A([
|
|
2181
|
+
k({ type: Array })
|
|
2182
|
+
], W.prototype, "layerConfig", 2);
|
|
2183
|
+
A([
|
|
2184
|
+
k({ type: Object, attribute: !1 })
|
|
2185
|
+
], W.prototype, "layerControl", 2);
|
|
2186
|
+
A([
|
|
2187
|
+
k({ type: Object, attribute: !1 })
|
|
2188
|
+
], W.prototype, "layer", 2);
|
|
2189
|
+
A([
|
|
2190
|
+
k({ type: Boolean })
|
|
2191
|
+
], W.prototype, "external", 2);
|
|
2192
|
+
A([
|
|
2193
|
+
_t()
|
|
2194
|
+
], W.prototype, "_currentLayer", 2);
|
|
2195
|
+
A([
|
|
2196
|
+
_t()
|
|
2197
|
+
], W.prototype, "_configList", 2);
|
|
2198
|
+
W = A([
|
|
2199
|
+
en("eox-layerconfig")
|
|
2200
|
+
], W);
|
|
2155
2201
|
export {
|
|
2156
|
-
|
|
2157
|
-
|
|
2202
|
+
W as EOxLayerConfig,
|
|
2203
|
+
H as EOxLayerControl
|
|
2158
2204
|
};
|