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