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