@eox/layercontrol 0.8.0 → 0.10.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 +1094 -984
- package/dist/eox-layercontrol.umd.cjs +96 -73
- package/package.json +2 -2
- package/test/_mockMap.js +20 -2
- package/test/layersUpdate.cy.js +57 -4
package/dist/eox-layercontrol.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
if (!t.has(
|
|
1
|
+
var no = Object.defineProperty;
|
|
2
|
+
var ro = (o, t, e) => t in o ? no(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
|
|
3
|
+
var N = (o, t, e) => (ro(o, typeof t != "symbol" ? t + "" : t, e), e), so = (o, t, e) => {
|
|
4
|
+
if (!t.has(o))
|
|
5
5
|
throw TypeError("Cannot " + e);
|
|
6
6
|
};
|
|
7
|
-
var
|
|
8
|
-
if (t.has(
|
|
7
|
+
var H = (o, t, e) => (so(o, t, "read from private field"), e ? e.call(o) : t.get(o)), M = (o, t, e) => {
|
|
8
|
+
if (t.has(o))
|
|
9
9
|
throw TypeError("Cannot add the same private member more than once");
|
|
10
|
-
t instanceof WeakSet ? t.add(
|
|
10
|
+
t instanceof WeakSet ? t.add(o) : t.set(o, e);
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
13
|
* @license
|
|
14
14
|
* Copyright 2019 Google LLC
|
|
15
15
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
16
|
*/
|
|
17
|
-
const
|
|
18
|
-
let
|
|
17
|
+
const ie = globalThis, Ke = ie.ShadowRoot && (ie.ShadyCSS === void 0 || ie.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Si = Symbol(), ri = /* @__PURE__ */ new WeakMap();
|
|
18
|
+
let ao = class {
|
|
19
19
|
constructor(t, e, i) {
|
|
20
|
-
if (this._$cssResult$ = !0, i !==
|
|
20
|
+
if (this._$cssResult$ = !0, i !== Si)
|
|
21
21
|
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
22
22
|
this.cssText = t, this.t = e;
|
|
23
23
|
}
|
|
24
24
|
get styleSheet() {
|
|
25
25
|
let t = this.o;
|
|
26
26
|
const e = this.t;
|
|
27
|
-
if (
|
|
27
|
+
if (Ke && t === void 0) {
|
|
28
28
|
const i = e !== void 0 && e.length === 1;
|
|
29
|
-
i && (t =
|
|
29
|
+
i && (t = ri.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && ri.set(e, t));
|
|
30
30
|
}
|
|
31
31
|
return t;
|
|
32
32
|
}
|
|
@@ -34,176 +34,201 @@ let un = class {
|
|
|
34
34
|
return this.cssText;
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
const lo = (o) => new ao(typeof o == "string" ? o : o + "", void 0, Si), ho = (o, t) => {
|
|
38
|
+
if (Ke)
|
|
39
|
+
o.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
40
|
+
else
|
|
41
|
+
for (const e of t) {
|
|
42
|
+
const i = document.createElement("style"), n = ie.litNonce;
|
|
43
|
+
n !== void 0 && i.setAttribute("nonce", n), i.textContent = e.cssText, o.appendChild(i);
|
|
44
|
+
}
|
|
45
|
+
}, si = Ke ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((t) => {
|
|
43
46
|
let e = "";
|
|
44
47
|
for (const i of t.cssRules)
|
|
45
48
|
e += i.cssText;
|
|
46
|
-
return
|
|
47
|
-
})(
|
|
49
|
+
return lo(e);
|
|
50
|
+
})(o) : o;
|
|
48
51
|
/**
|
|
49
52
|
* @license
|
|
50
53
|
* Copyright 2017 Google LLC
|
|
51
54
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
52
55
|
*/
|
|
53
|
-
|
|
54
|
-
const ae = window, ui = ae.trustedTypes, pn = ui ? ui.emptyScript : "", ci = ae.reactiveElementPolyfillSupport, Ye = { toAttribute(n, t) {
|
|
56
|
+
const { is: uo, defineProperty: co, getOwnPropertyDescriptor: po, getOwnPropertyNames: fo, getOwnPropertySymbols: go, getPrototypeOf: mo } = Object, dt = globalThis, ai = dt.trustedTypes, yo = ai ? ai.emptyScript : "", Pe = dt.reactiveElementPolyfillSupport, Vt = (o, t) => o, ze = { toAttribute(o, t) {
|
|
55
57
|
switch (t) {
|
|
56
58
|
case Boolean:
|
|
57
|
-
|
|
59
|
+
o = o ? yo : null;
|
|
58
60
|
break;
|
|
59
61
|
case Object:
|
|
60
62
|
case Array:
|
|
61
|
-
|
|
63
|
+
o = o == null ? o : JSON.stringify(o);
|
|
62
64
|
}
|
|
63
|
-
return
|
|
64
|
-
}, fromAttribute(
|
|
65
|
-
let e =
|
|
65
|
+
return o;
|
|
66
|
+
}, fromAttribute(o, t) {
|
|
67
|
+
let e = o;
|
|
66
68
|
switch (t) {
|
|
67
69
|
case Boolean:
|
|
68
|
-
e =
|
|
70
|
+
e = o !== null;
|
|
69
71
|
break;
|
|
70
72
|
case Number:
|
|
71
|
-
e =
|
|
73
|
+
e = o === null ? null : Number(o);
|
|
72
74
|
break;
|
|
73
75
|
case Object:
|
|
74
76
|
case Array:
|
|
75
77
|
try {
|
|
76
|
-
e = JSON.parse(
|
|
78
|
+
e = JSON.parse(o);
|
|
77
79
|
} catch {
|
|
78
80
|
e = null;
|
|
79
81
|
}
|
|
80
82
|
}
|
|
81
83
|
return e;
|
|
82
|
-
} },
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
|
|
86
|
-
}
|
|
84
|
+
} }, Ai = (o, t) => !uo(o, t), li = { attribute: !0, type: String, converter: ze, reflect: !1, hasChanged: Ai };
|
|
85
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), dt.litPropertyMetadata ?? (dt.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
86
|
+
class $t extends HTMLElement {
|
|
87
87
|
static addInitializer(t) {
|
|
88
|
-
|
|
89
|
-
this.finalize(), ((e = this.h) !== null && e !== void 0 ? e : this.h = []).push(t);
|
|
88
|
+
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
90
89
|
}
|
|
91
90
|
static get observedAttributes() {
|
|
92
|
-
this.finalize();
|
|
93
|
-
const t = [];
|
|
94
|
-
return this.elementProperties.forEach((e, i) => {
|
|
95
|
-
const o = this._$Ep(i, e);
|
|
96
|
-
o !== void 0 && (this._$Ev.set(o, i), t.push(o));
|
|
97
|
-
}), t;
|
|
91
|
+
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
98
92
|
}
|
|
99
|
-
static createProperty(t, e =
|
|
100
|
-
if (e.state && (e.attribute = !1), this.
|
|
101
|
-
const i =
|
|
102
|
-
|
|
93
|
+
static createProperty(t, e = li) {
|
|
94
|
+
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
95
|
+
const i = Symbol(), n = this.getPropertyDescriptor(t, i, e);
|
|
96
|
+
n !== void 0 && co(this.prototype, t, n);
|
|
103
97
|
}
|
|
104
98
|
}
|
|
105
99
|
static getPropertyDescriptor(t, e, i) {
|
|
106
|
-
|
|
100
|
+
const { get: n, set: r } = po(this.prototype, t) ?? { get() {
|
|
107
101
|
return this[e];
|
|
108
|
-
}, set(
|
|
109
|
-
|
|
110
|
-
|
|
102
|
+
}, set(s) {
|
|
103
|
+
this[e] = s;
|
|
104
|
+
} };
|
|
105
|
+
return { get() {
|
|
106
|
+
return n == null ? void 0 : n.call(this);
|
|
107
|
+
}, set(s) {
|
|
108
|
+
const l = n == null ? void 0 : n.call(this);
|
|
109
|
+
r.call(this, s), this.requestUpdate(t, l, i);
|
|
111
110
|
}, configurable: !0, enumerable: !0 };
|
|
112
111
|
}
|
|
113
112
|
static getPropertyOptions(t) {
|
|
114
|
-
return this.elementProperties.get(t)
|
|
113
|
+
return this.elementProperties.get(t) ?? li;
|
|
114
|
+
}
|
|
115
|
+
static _$Ei() {
|
|
116
|
+
if (this.hasOwnProperty(Vt("elementProperties")))
|
|
117
|
+
return;
|
|
118
|
+
const t = mo(this);
|
|
119
|
+
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
115
120
|
}
|
|
116
121
|
static finalize() {
|
|
117
|
-
if (this.hasOwnProperty(
|
|
118
|
-
return
|
|
119
|
-
this
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
if (this.hasOwnProperty(Vt("finalized")))
|
|
123
|
+
return;
|
|
124
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(Vt("properties"))) {
|
|
125
|
+
const e = this.properties, i = [...fo(e), ...go(e)];
|
|
126
|
+
for (const n of i)
|
|
127
|
+
this.createProperty(n, e[n]);
|
|
128
|
+
}
|
|
129
|
+
const t = this[Symbol.metadata];
|
|
130
|
+
if (t !== null) {
|
|
131
|
+
const e = litPropertyMetadata.get(t);
|
|
132
|
+
if (e !== void 0)
|
|
133
|
+
for (const [i, n] of e)
|
|
134
|
+
this.elementProperties.set(i, n);
|
|
125
135
|
}
|
|
126
|
-
|
|
136
|
+
this._$Eh = /* @__PURE__ */ new Map();
|
|
137
|
+
for (const [e, i] of this.elementProperties) {
|
|
138
|
+
const n = this._$Eu(e, i);
|
|
139
|
+
n !== void 0 && this._$Eh.set(n, e);
|
|
140
|
+
}
|
|
141
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
|
127
142
|
}
|
|
128
143
|
static finalizeStyles(t) {
|
|
129
144
|
const e = [];
|
|
130
145
|
if (Array.isArray(t)) {
|
|
131
146
|
const i = new Set(t.flat(1 / 0).reverse());
|
|
132
|
-
for (const
|
|
133
|
-
e.unshift(
|
|
147
|
+
for (const n of i)
|
|
148
|
+
e.unshift(si(n));
|
|
134
149
|
} else
|
|
135
|
-
t !== void 0 && e.push(
|
|
150
|
+
t !== void 0 && e.push(si(t));
|
|
136
151
|
return e;
|
|
137
152
|
}
|
|
138
|
-
static _$
|
|
153
|
+
static _$Eu(t, e) {
|
|
139
154
|
const i = e.attribute;
|
|
140
155
|
return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
141
156
|
}
|
|
142
|
-
|
|
157
|
+
constructor() {
|
|
158
|
+
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
159
|
+
}
|
|
160
|
+
_$Ev() {
|
|
143
161
|
var t;
|
|
144
|
-
this._$
|
|
162
|
+
this._$Eg = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(this));
|
|
145
163
|
}
|
|
146
164
|
addController(t) {
|
|
147
|
-
var e
|
|
148
|
-
(
|
|
165
|
+
var e;
|
|
166
|
+
(this._$ES ?? (this._$ES = [])).push(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
|
|
149
167
|
}
|
|
150
168
|
removeController(t) {
|
|
151
169
|
var e;
|
|
152
|
-
(e = this._$ES)
|
|
170
|
+
(e = this._$ES) == null || e.splice(this._$ES.indexOf(t) >>> 0, 1);
|
|
153
171
|
}
|
|
154
|
-
_$
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
172
|
+
_$E_() {
|
|
173
|
+
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
174
|
+
for (const i of e.keys())
|
|
175
|
+
this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
|
|
176
|
+
t.size > 0 && (this._$Ep = t);
|
|
158
177
|
}
|
|
159
178
|
createRenderRoot() {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
return hn(e, this.constructor.elementStyles), e;
|
|
179
|
+
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
180
|
+
return ho(t, this.constructor.elementStyles), t;
|
|
163
181
|
}
|
|
164
182
|
connectedCallback() {
|
|
165
183
|
var t;
|
|
166
|
-
this.renderRoot
|
|
184
|
+
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) == null || t.forEach((e) => {
|
|
167
185
|
var i;
|
|
168
|
-
return (i = e.hostConnected)
|
|
186
|
+
return (i = e.hostConnected) == null ? void 0 : i.call(e);
|
|
169
187
|
});
|
|
170
188
|
}
|
|
171
189
|
enableUpdating(t) {
|
|
172
190
|
}
|
|
173
191
|
disconnectedCallback() {
|
|
174
192
|
var t;
|
|
175
|
-
(t = this._$ES)
|
|
193
|
+
(t = this._$ES) == null || t.forEach((e) => {
|
|
176
194
|
var i;
|
|
177
|
-
return (i = e.hostDisconnected)
|
|
195
|
+
return (i = e.hostDisconnected) == null ? void 0 : i.call(e);
|
|
178
196
|
});
|
|
179
197
|
}
|
|
180
198
|
attributeChangedCallback(t, e, i) {
|
|
181
199
|
this._$AK(t, i);
|
|
182
200
|
}
|
|
183
|
-
_$EO(t, e
|
|
184
|
-
var
|
|
185
|
-
const
|
|
186
|
-
if (
|
|
187
|
-
const s = (((
|
|
188
|
-
this._$
|
|
201
|
+
_$EO(t, e) {
|
|
202
|
+
var r;
|
|
203
|
+
const i = this.constructor.elementProperties.get(t), n = this.constructor._$Eu(t, i);
|
|
204
|
+
if (n !== void 0 && i.reflect === !0) {
|
|
205
|
+
const s = (((r = i.converter) == null ? void 0 : r.toAttribute) !== void 0 ? i.converter : ze).toAttribute(e, i.type);
|
|
206
|
+
this._$Em = t, s == null ? this.removeAttribute(n) : this.setAttribute(n, s), this._$Em = null;
|
|
189
207
|
}
|
|
190
208
|
}
|
|
191
209
|
_$AK(t, e) {
|
|
192
|
-
var
|
|
193
|
-
const
|
|
194
|
-
if (
|
|
195
|
-
const s =
|
|
196
|
-
this._$
|
|
210
|
+
var r;
|
|
211
|
+
const i = this.constructor, n = i._$Eh.get(t);
|
|
212
|
+
if (n !== void 0 && this._$Em !== n) {
|
|
213
|
+
const s = i.getPropertyOptions(n), l = typeof s.converter == "function" ? { fromAttribute: s.converter } : ((r = s.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? s.converter : ze;
|
|
214
|
+
this._$Em = n, this[n] = l.fromAttribute(e, s.type), this._$Em = null;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
requestUpdate(t, e, i, n = !1, r) {
|
|
218
|
+
if (t !== void 0) {
|
|
219
|
+
if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ?? Ai)(n ? r : this[t], e))
|
|
220
|
+
return;
|
|
221
|
+
this.C(t, e, i);
|
|
197
222
|
}
|
|
223
|
+
this.isUpdatePending === !1 && (this._$Eg = this._$EP());
|
|
198
224
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
t !== void 0 && (((i = i || this.constructor.getPropertyOptions(t)).hasChanged || Pi)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, i))) : o = !1), !this.isUpdatePending && o && (this._$E_ = this._$Ej());
|
|
225
|
+
C(t, e, i) {
|
|
226
|
+
this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
|
|
202
227
|
}
|
|
203
|
-
async _$
|
|
228
|
+
async _$EP() {
|
|
204
229
|
this.isUpdatePending = !0;
|
|
205
230
|
try {
|
|
206
|
-
await this._$
|
|
231
|
+
await this._$Eg;
|
|
207
232
|
} catch (e) {
|
|
208
233
|
Promise.reject(e);
|
|
209
234
|
}
|
|
@@ -214,139 +239,141 @@ let _t = class extends HTMLElement {
|
|
|
214
239
|
return this.performUpdate();
|
|
215
240
|
}
|
|
216
241
|
performUpdate() {
|
|
217
|
-
var
|
|
242
|
+
var i;
|
|
218
243
|
if (!this.isUpdatePending)
|
|
219
244
|
return;
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
245
|
+
if (!this.hasUpdated) {
|
|
246
|
+
if (this._$Ep) {
|
|
247
|
+
for (const [r, s] of this._$Ep)
|
|
248
|
+
this[r] = s;
|
|
249
|
+
this._$Ep = void 0;
|
|
250
|
+
}
|
|
251
|
+
const n = this.constructor.elementProperties;
|
|
252
|
+
if (n.size > 0)
|
|
253
|
+
for (const [r, s] of n)
|
|
254
|
+
s.wrapped !== !0 || this._$AL.has(r) || this[r] === void 0 || this.C(r, this[r], s);
|
|
255
|
+
}
|
|
256
|
+
let t = !1;
|
|
257
|
+
const e = this._$AL;
|
|
223
258
|
try {
|
|
224
|
-
|
|
259
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$ES) == null || i.forEach((n) => {
|
|
225
260
|
var r;
|
|
226
|
-
return (r =
|
|
227
|
-
}), this.update(
|
|
228
|
-
} catch (
|
|
229
|
-
throw
|
|
261
|
+
return (r = n.hostUpdate) == null ? void 0 : r.call(n);
|
|
262
|
+
}), this.update(e)) : this._$ET();
|
|
263
|
+
} catch (n) {
|
|
264
|
+
throw t = !1, this._$ET(), n;
|
|
230
265
|
}
|
|
231
|
-
|
|
266
|
+
t && this._$AE(e);
|
|
232
267
|
}
|
|
233
268
|
willUpdate(t) {
|
|
234
269
|
}
|
|
235
270
|
_$AE(t) {
|
|
236
271
|
var e;
|
|
237
|
-
(e = this._$ES)
|
|
238
|
-
var
|
|
239
|
-
return (
|
|
272
|
+
(e = this._$ES) == null || e.forEach((i) => {
|
|
273
|
+
var n;
|
|
274
|
+
return (n = i.hostUpdated) == null ? void 0 : n.call(i);
|
|
240
275
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
241
276
|
}
|
|
242
|
-
_$
|
|
277
|
+
_$ET() {
|
|
243
278
|
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
244
279
|
}
|
|
245
280
|
get updateComplete() {
|
|
246
281
|
return this.getUpdateComplete();
|
|
247
282
|
}
|
|
248
283
|
getUpdateComplete() {
|
|
249
|
-
return this._$
|
|
284
|
+
return this._$Eg;
|
|
250
285
|
}
|
|
251
286
|
shouldUpdate(t) {
|
|
252
287
|
return !0;
|
|
253
288
|
}
|
|
254
289
|
update(t) {
|
|
255
|
-
this._$
|
|
290
|
+
this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EO(e, this[e]))), this._$ET();
|
|
256
291
|
}
|
|
257
292
|
updated(t) {
|
|
258
293
|
}
|
|
259
294
|
firstUpdated(t) {
|
|
260
295
|
}
|
|
261
|
-
}
|
|
262
|
-
|
|
296
|
+
}
|
|
297
|
+
$t.elementStyles = [], $t.shadowRootOptions = { mode: "open" }, $t[Vt("elementProperties")] = /* @__PURE__ */ new Map(), $t[Vt("finalized")] = /* @__PURE__ */ new Map(), Pe == null || Pe({ ReactiveElement: $t }), (dt.reactiveElementVersions ?? (dt.reactiveElementVersions = [])).push("2.0.1");
|
|
263
298
|
/**
|
|
264
299
|
* @license
|
|
265
300
|
* Copyright 2017 Google LLC
|
|
266
301
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
267
302
|
*/
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
\f\r]
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
if (!Array.isArray(n) || !n.hasOwnProperty("raw"))
|
|
303
|
+
const Rt = globalThis, he = Rt.trustedTypes, hi = he ? he.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, Ci = "$lit$", at = `lit$${(Math.random() + "").slice(9)}$`, Ti = "?" + at, vo = `<${Ti}>`, wt = document, Xt = () => wt.createComment(""), Yt = (o) => o === null || typeof o != "object" && typeof o != "function", Di = Array.isArray, bo = (o) => Di(o) || typeof (o == null ? void 0 : o[Symbol.iterator]) == "function", He = `[
|
|
304
|
+
\f\r]`, Lt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, di = /-->/g, ui = />/g, ft = RegExp(`>|${He}(?:([^\\s"'>=/]+)(${He}*=${He}*(?:[^
|
|
305
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), ci = /'/g, pi = /"/g, Oi = /^(?:script|style|textarea|title)$/i, wo = (o) => (t, ...e) => ({ _$litType$: o, strings: t, values: e }), _ = wo(1), q = Symbol.for("lit-noChange"), $ = Symbol.for("lit-nothing"), fi = /* @__PURE__ */ new WeakMap(), bt = wt.createTreeWalker(wt, 129);
|
|
306
|
+
function Pi(o, t) {
|
|
307
|
+
if (!Array.isArray(o) || !o.hasOwnProperty("raw"))
|
|
274
308
|
throw Error("invalid template strings array");
|
|
275
309
|
return hi !== void 0 ? hi.createHTML(t) : t;
|
|
276
310
|
}
|
|
277
|
-
const
|
|
278
|
-
const e =
|
|
279
|
-
let
|
|
311
|
+
const Eo = (o, t) => {
|
|
312
|
+
const e = o.length - 1, i = [];
|
|
313
|
+
let n, r = t === 2 ? "<svg>" : "", s = Lt;
|
|
280
314
|
for (let l = 0; l < e; l++) {
|
|
281
|
-
const a =
|
|
282
|
-
let
|
|
283
|
-
for (;
|
|
284
|
-
|
|
285
|
-
const v = s ===
|
|
286
|
-
r += s ===
|
|
287
|
-
}
|
|
288
|
-
return [
|
|
315
|
+
const a = o[l];
|
|
316
|
+
let h, c, d = -1, g = 0;
|
|
317
|
+
for (; g < a.length && (s.lastIndex = g, c = s.exec(a), c !== null); )
|
|
318
|
+
g = s.lastIndex, s === Lt ? c[1] === "!--" ? s = di : c[1] !== void 0 ? s = ui : c[2] !== void 0 ? (Oi.test(c[2]) && (n = RegExp("</" + c[2], "g")), s = ft) : c[3] !== void 0 && (s = ft) : s === ft ? c[0] === ">" ? (s = n ?? Lt, d = -1) : c[1] === void 0 ? d = -2 : (d = s.lastIndex - c[2].length, h = c[1], s = c[3] === void 0 ? ft : c[3] === '"' ? pi : ci) : s === pi || s === ci ? s = ft : s === di || s === ui ? s = Lt : (s = ft, n = void 0);
|
|
319
|
+
const v = s === ft && o[l + 1].startsWith("/>") ? " " : "";
|
|
320
|
+
r += s === Lt ? a + vo : d >= 0 ? (i.push(h), a.slice(0, d) + Ci + a.slice(d) + at + v) : a + at + (d === -2 ? l : v);
|
|
321
|
+
}
|
|
322
|
+
return [Pi(o, r + (o[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
|
|
289
323
|
};
|
|
290
|
-
class
|
|
324
|
+
class qt {
|
|
291
325
|
constructor({ strings: t, _$litType$: e }, i) {
|
|
292
|
-
let
|
|
326
|
+
let n;
|
|
293
327
|
this.parts = [];
|
|
294
328
|
let r = 0, s = 0;
|
|
295
|
-
const l = t.length - 1, a = this.parts, [
|
|
296
|
-
if (this.el =
|
|
297
|
-
const
|
|
298
|
-
|
|
299
|
-
}
|
|
300
|
-
for (; (
|
|
301
|
-
if (
|
|
302
|
-
if (
|
|
303
|
-
const
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
if (Mi.test(o.tagName)) {
|
|
317
|
-
const u = o.textContent.split(at), p = u.length - 1;
|
|
318
|
-
if (p > 0) {
|
|
319
|
-
o.textContent = Ct ? Ct.emptyScript : "";
|
|
320
|
-
for (let v = 0; v < p; v++)
|
|
321
|
-
o.append(u[v], zt()), yt.nextNode(), a.push({ type: 2, index: ++r });
|
|
322
|
-
o.append(u[p], zt());
|
|
329
|
+
const l = t.length - 1, a = this.parts, [h, c] = Eo(t, e);
|
|
330
|
+
if (this.el = qt.createElement(h, i), bt.currentNode = this.el.content, e === 2) {
|
|
331
|
+
const d = this.el.content.firstChild;
|
|
332
|
+
d.replaceWith(...d.childNodes);
|
|
333
|
+
}
|
|
334
|
+
for (; (n = bt.nextNode()) !== null && a.length < l; ) {
|
|
335
|
+
if (n.nodeType === 1) {
|
|
336
|
+
if (n.hasAttributes())
|
|
337
|
+
for (const d of n.getAttributeNames())
|
|
338
|
+
if (d.endsWith(Ci)) {
|
|
339
|
+
const g = c[s++], v = n.getAttribute(d).split(at), y = /([.?@])?(.*)/.exec(g);
|
|
340
|
+
a.push({ type: 1, index: r, name: y[2], strings: v, ctor: y[1] === "." ? $o : y[1] === "?" ? xo : y[1] === "@" ? So : De }), n.removeAttribute(d);
|
|
341
|
+
} else
|
|
342
|
+
d.startsWith(at) && (a.push({ type: 6, index: r }), n.removeAttribute(d));
|
|
343
|
+
if (Oi.test(n.tagName)) {
|
|
344
|
+
const d = n.textContent.split(at), g = d.length - 1;
|
|
345
|
+
if (g > 0) {
|
|
346
|
+
n.textContent = he ? he.emptyScript : "";
|
|
347
|
+
for (let v = 0; v < g; v++)
|
|
348
|
+
n.append(d[v], Xt()), bt.nextNode(), a.push({ type: 2, index: ++r });
|
|
349
|
+
n.append(d[g], Xt());
|
|
323
350
|
}
|
|
324
351
|
}
|
|
325
|
-
} else if (
|
|
326
|
-
if (
|
|
352
|
+
} else if (n.nodeType === 8)
|
|
353
|
+
if (n.data === Ti)
|
|
327
354
|
a.push({ type: 2, index: r });
|
|
328
355
|
else {
|
|
329
|
-
let
|
|
330
|
-
for (; (
|
|
331
|
-
a.push({ type: 7, index: r }),
|
|
356
|
+
let d = -1;
|
|
357
|
+
for (; (d = n.data.indexOf(at, d + 1)) !== -1; )
|
|
358
|
+
a.push({ type: 7, index: r }), d += at.length - 1;
|
|
332
359
|
}
|
|
333
360
|
r++;
|
|
334
361
|
}
|
|
335
362
|
}
|
|
336
363
|
static createElement(t, e) {
|
|
337
|
-
const i =
|
|
364
|
+
const i = wt.createElement("template");
|
|
338
365
|
return i.innerHTML = t, i;
|
|
339
366
|
}
|
|
340
367
|
}
|
|
341
|
-
function
|
|
342
|
-
var
|
|
368
|
+
function Ct(o, t, e = o, i) {
|
|
369
|
+
var s, l;
|
|
343
370
|
if (t === q)
|
|
344
371
|
return t;
|
|
345
|
-
let
|
|
346
|
-
const
|
|
347
|
-
return (
|
|
372
|
+
let n = i !== void 0 ? (s = e._$Co) == null ? void 0 : s[i] : e._$Cl;
|
|
373
|
+
const r = Yt(t) ? void 0 : t._$litDirective$;
|
|
374
|
+
return (n == null ? void 0 : n.constructor) !== r && ((l = n == null ? void 0 : n._$AO) == null || l.call(n, !1), r === void 0 ? n = void 0 : (n = new r(o), n._$AT(o, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = n : e._$Cl = n), n !== void 0 && (t = Ct(o, n._$AS(o, t.values), n, i)), t;
|
|
348
375
|
}
|
|
349
|
-
class
|
|
376
|
+
class _o {
|
|
350
377
|
constructor(t, e) {
|
|
351
378
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
352
379
|
}
|
|
@@ -357,33 +384,31 @@ class yn {
|
|
|
357
384
|
return this._$AM._$AU;
|
|
358
385
|
}
|
|
359
386
|
u(t) {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
if (l === d.index) {
|
|
387
|
+
const { el: { content: e }, parts: i } = this._$AD, n = ((t == null ? void 0 : t.creationScope) ?? wt).importNode(e, !0);
|
|
388
|
+
bt.currentNode = n;
|
|
389
|
+
let r = bt.nextNode(), s = 0, l = 0, a = i[0];
|
|
390
|
+
for (; a !== void 0; ) {
|
|
391
|
+
if (s === a.index) {
|
|
366
392
|
let h;
|
|
367
|
-
|
|
393
|
+
a.type === 2 ? h = new Wt(r, r.nextSibling, this, t) : a.type === 1 ? h = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (h = new Ao(r, this, t)), this._$AV.push(h), a = i[++l];
|
|
368
394
|
}
|
|
369
|
-
|
|
395
|
+
s !== (a == null ? void 0 : a.index) && (r = bt.nextNode(), s++);
|
|
370
396
|
}
|
|
371
|
-
return
|
|
397
|
+
return bt.currentNode = wt, n;
|
|
372
398
|
}
|
|
373
|
-
|
|
399
|
+
p(t) {
|
|
374
400
|
let e = 0;
|
|
375
401
|
for (const i of this._$AV)
|
|
376
402
|
i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
|
|
377
403
|
}
|
|
378
404
|
}
|
|
379
|
-
class
|
|
380
|
-
constructor(t, e, i, o) {
|
|
381
|
-
var r;
|
|
382
|
-
this.type = 2, this._$AH = $, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = o, this._$Cp = (r = o == null ? void 0 : o.isConnected) === null || r === void 0 || r;
|
|
383
|
-
}
|
|
405
|
+
class Wt {
|
|
384
406
|
get _$AU() {
|
|
385
|
-
var t
|
|
386
|
-
return (
|
|
407
|
+
var t;
|
|
408
|
+
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
409
|
+
}
|
|
410
|
+
constructor(t, e, i, n) {
|
|
411
|
+
this.type = 2, this._$AH = $, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = n, this._$Cv = (n == null ? void 0 : n.isConnected) ?? !0;
|
|
387
412
|
}
|
|
388
413
|
get parentNode() {
|
|
389
414
|
let t = this._$AA.parentNode;
|
|
@@ -397,7 +422,7 @@ class jt {
|
|
|
397
422
|
return this._$AB;
|
|
398
423
|
}
|
|
399
424
|
_$AI(t, e = this) {
|
|
400
|
-
t =
|
|
425
|
+
t = Ct(this, t, e), Yt(t) ? t === $ || t == null || t === "" ? (this._$AH !== $ && this._$AR(), this._$AH = $) : t !== this._$AH && t !== q && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : bo(t) ? this.T(t) : this._(t);
|
|
401
426
|
}
|
|
402
427
|
k(t) {
|
|
403
428
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -406,103 +431,101 @@ class jt {
|
|
|
406
431
|
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
|
407
432
|
}
|
|
408
433
|
_(t) {
|
|
409
|
-
this._$AH !== $ &&
|
|
434
|
+
this._$AH !== $ && Yt(this._$AH) ? this._$AA.nextSibling.data = t : this.$(wt.createTextNode(t)), this._$AH = t;
|
|
410
435
|
}
|
|
411
436
|
g(t) {
|
|
412
|
-
var
|
|
413
|
-
const { values:
|
|
414
|
-
if (((
|
|
415
|
-
this._$AH.
|
|
437
|
+
var r;
|
|
438
|
+
const { values: e, _$litType$: i } = t, n = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = qt.createElement(Pi(i.h, i.h[0]), this.options)), i);
|
|
439
|
+
if (((r = this._$AH) == null ? void 0 : r._$AD) === n)
|
|
440
|
+
this._$AH.p(e);
|
|
416
441
|
else {
|
|
417
|
-
const s = new
|
|
418
|
-
s.
|
|
442
|
+
const s = new _o(n, this), l = s.u(this.options);
|
|
443
|
+
s.p(e), this.$(l), this._$AH = s;
|
|
419
444
|
}
|
|
420
445
|
}
|
|
421
446
|
_$AC(t) {
|
|
422
|
-
let e =
|
|
423
|
-
return e === void 0 &&
|
|
447
|
+
let e = fi.get(t.strings);
|
|
448
|
+
return e === void 0 && fi.set(t.strings, e = new qt(t)), e;
|
|
424
449
|
}
|
|
425
450
|
T(t) {
|
|
426
|
-
|
|
451
|
+
Di(this._$AH) || (this._$AH = [], this._$AR());
|
|
427
452
|
const e = this._$AH;
|
|
428
|
-
let i,
|
|
453
|
+
let i, n = 0;
|
|
429
454
|
for (const r of t)
|
|
430
|
-
|
|
431
|
-
|
|
455
|
+
n === e.length ? e.push(i = new Wt(this.k(Xt()), this.k(Xt()), this, this.options)) : i = e[n], i._$AI(r), n++;
|
|
456
|
+
n < e.length && (this._$AR(i && i._$AB.nextSibling, n), e.length = n);
|
|
432
457
|
}
|
|
433
458
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
434
459
|
var i;
|
|
435
|
-
for ((i = this._$AP)
|
|
436
|
-
const
|
|
437
|
-
t.remove(), t =
|
|
460
|
+
for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, e); t && t !== this._$AB; ) {
|
|
461
|
+
const n = t.nextSibling;
|
|
462
|
+
t.remove(), t = n;
|
|
438
463
|
}
|
|
439
464
|
}
|
|
440
465
|
setConnected(t) {
|
|
441
466
|
var e;
|
|
442
|
-
this._$AM === void 0 && (this._$
|
|
467
|
+
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
|
443
468
|
}
|
|
444
469
|
}
|
|
445
|
-
class
|
|
446
|
-
constructor(t, e, i, o, r) {
|
|
447
|
-
this.type = 1, this._$AH = $, this._$AN = void 0, this.element = t, this.name = e, this._$AM = o, this.options = r, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = $;
|
|
448
|
-
}
|
|
470
|
+
class De {
|
|
449
471
|
get tagName() {
|
|
450
472
|
return this.element.tagName;
|
|
451
473
|
}
|
|
452
474
|
get _$AU() {
|
|
453
475
|
return this._$AM._$AU;
|
|
454
476
|
}
|
|
455
|
-
|
|
477
|
+
constructor(t, e, i, n, r) {
|
|
478
|
+
this.type = 1, this._$AH = $, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options = r, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = $;
|
|
479
|
+
}
|
|
480
|
+
_$AI(t, e = this, i, n) {
|
|
456
481
|
const r = this.strings;
|
|
457
482
|
let s = !1;
|
|
458
483
|
if (r === void 0)
|
|
459
|
-
t =
|
|
484
|
+
t = Ct(this, t, e, 0), s = !Yt(t) || t !== this._$AH && t !== q, s && (this._$AH = t);
|
|
460
485
|
else {
|
|
461
486
|
const l = t;
|
|
462
|
-
let a,
|
|
487
|
+
let a, h;
|
|
463
488
|
for (t = r[0], a = 0; a < r.length - 1; a++)
|
|
464
|
-
|
|
489
|
+
h = Ct(this, l[i + a], e, a), h === q && (h = this._$AH[a]), s || (s = !Yt(h) || h !== this._$AH[a]), h === $ ? t = $ : t !== $ && (t += (h ?? "") + r[a + 1]), this._$AH[a] = h;
|
|
465
490
|
}
|
|
466
|
-
s && !
|
|
491
|
+
s && !n && this.O(t);
|
|
467
492
|
}
|
|
468
|
-
|
|
493
|
+
O(t) {
|
|
469
494
|
t === $ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
470
495
|
}
|
|
471
496
|
}
|
|
472
|
-
class
|
|
497
|
+
class $o extends De {
|
|
473
498
|
constructor() {
|
|
474
499
|
super(...arguments), this.type = 3;
|
|
475
500
|
}
|
|
476
|
-
|
|
501
|
+
O(t) {
|
|
477
502
|
this.element[this.name] = t === $ ? void 0 : t;
|
|
478
503
|
}
|
|
479
504
|
}
|
|
480
|
-
|
|
481
|
-
class wn extends Te {
|
|
505
|
+
class xo extends De {
|
|
482
506
|
constructor() {
|
|
483
507
|
super(...arguments), this.type = 4;
|
|
484
508
|
}
|
|
485
|
-
|
|
486
|
-
|
|
509
|
+
O(t) {
|
|
510
|
+
this.element.toggleAttribute(this.name, !!t && t !== $);
|
|
487
511
|
}
|
|
488
512
|
}
|
|
489
|
-
class
|
|
490
|
-
constructor(t, e, i,
|
|
491
|
-
super(t, e, i,
|
|
513
|
+
class So extends De {
|
|
514
|
+
constructor(t, e, i, n, r) {
|
|
515
|
+
super(t, e, i, n, r), this.type = 5;
|
|
492
516
|
}
|
|
493
517
|
_$AI(t, e = this) {
|
|
494
|
-
|
|
495
|
-
if ((t = (i = St(this, t, e, 0)) !== null && i !== void 0 ? i : $) === q)
|
|
518
|
+
if ((t = Ct(this, t, e, 0) ?? $) === q)
|
|
496
519
|
return;
|
|
497
|
-
const
|
|
498
|
-
|
|
520
|
+
const i = this._$AH, n = t === $ && i !== $ || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, r = t !== $ && (i === $ || n);
|
|
521
|
+
n && this.element.removeEventListener(this.name, this, i), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
499
522
|
}
|
|
500
523
|
handleEvent(t) {
|
|
501
|
-
var e
|
|
502
|
-
typeof this._$AH == "function" ? this._$AH.call((
|
|
524
|
+
var e;
|
|
525
|
+
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
503
526
|
}
|
|
504
527
|
}
|
|
505
|
-
class
|
|
528
|
+
class Ao {
|
|
506
529
|
constructor(t, e, i) {
|
|
507
530
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
|
508
531
|
}
|
|
@@ -510,71 +533,70 @@ class $n {
|
|
|
510
533
|
return this._$AM._$AU;
|
|
511
534
|
}
|
|
512
535
|
_$AI(t) {
|
|
513
|
-
|
|
536
|
+
Ct(this, t);
|
|
514
537
|
}
|
|
515
538
|
}
|
|
516
|
-
const
|
|
517
|
-
|
|
518
|
-
const
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
r._$litPart$ = s = new jt(t.insertBefore(zt(), l), l, void 0, e ?? {});
|
|
539
|
+
const Me = Rt.litHtmlPolyfillSupport;
|
|
540
|
+
Me == null || Me(qt, Wt), (Rt.litHtmlVersions ?? (Rt.litHtmlVersions = [])).push("3.0.2");
|
|
541
|
+
const Co = (o, t, e) => {
|
|
542
|
+
const i = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
543
|
+
let n = i._$litPart$;
|
|
544
|
+
if (n === void 0) {
|
|
545
|
+
const r = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
546
|
+
i._$litPart$ = n = new Wt(t.insertBefore(Xt(), r), r, void 0, e ?? {});
|
|
525
547
|
}
|
|
526
|
-
return
|
|
548
|
+
return n._$AI(o), n;
|
|
527
549
|
};
|
|
528
550
|
/**
|
|
529
551
|
* @license
|
|
530
552
|
* Copyright 2017 Google LLC
|
|
531
553
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
532
554
|
*/
|
|
533
|
-
|
|
534
|
-
let z = class extends _t {
|
|
555
|
+
class F extends $t {
|
|
535
556
|
constructor() {
|
|
536
557
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
537
558
|
}
|
|
538
559
|
createRenderRoot() {
|
|
539
|
-
var
|
|
540
|
-
const
|
|
541
|
-
return (
|
|
560
|
+
var e;
|
|
561
|
+
const t = super.createRenderRoot();
|
|
562
|
+
return (e = this.renderOptions).renderBefore ?? (e.renderBefore = t.firstChild), t;
|
|
542
563
|
}
|
|
543
564
|
update(t) {
|
|
544
565
|
const e = this.render();
|
|
545
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
566
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Co(e, this.renderRoot, this.renderOptions);
|
|
546
567
|
}
|
|
547
568
|
connectedCallback() {
|
|
548
569
|
var t;
|
|
549
|
-
super.connectedCallback(), (t = this._$Do)
|
|
570
|
+
super.connectedCallback(), (t = this._$Do) == null || t.setConnected(!0);
|
|
550
571
|
}
|
|
551
572
|
disconnectedCallback() {
|
|
552
573
|
var t;
|
|
553
|
-
super.disconnectedCallback(), (t = this._$Do)
|
|
574
|
+
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
|
554
575
|
}
|
|
555
576
|
render() {
|
|
556
577
|
return q;
|
|
557
578
|
}
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
579
|
+
}
|
|
580
|
+
var xi;
|
|
581
|
+
F._$litElement$ = !0, F.finalized = !0, (xi = globalThis.litElementHydrateSupport) == null || xi.call(globalThis, { LitElement: F });
|
|
582
|
+
const Le = globalThis.litElementPolyfillSupport;
|
|
583
|
+
Le == null || Le({ LitElement: F });
|
|
584
|
+
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.1");
|
|
563
585
|
/**
|
|
564
586
|
* @license
|
|
565
587
|
* Copyright 2021 Google LLC
|
|
566
588
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
567
589
|
*/
|
|
568
|
-
function et(
|
|
569
|
-
return
|
|
590
|
+
function et(o, t, e) {
|
|
591
|
+
return o ? t(o) : e == null ? void 0 : e(o);
|
|
570
592
|
}
|
|
571
593
|
/**
|
|
572
594
|
* @license
|
|
573
595
|
* Copyright 2017 Google LLC
|
|
574
596
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
575
597
|
*/
|
|
576
|
-
const
|
|
577
|
-
let
|
|
598
|
+
const yt = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Je = (o) => (...t) => ({ _$litDirective$: o, values: t });
|
|
599
|
+
let Qe = class {
|
|
578
600
|
constructor(t) {
|
|
579
601
|
}
|
|
580
602
|
get _$AU() {
|
|
@@ -595,21 +617,21 @@ let ii = class {
|
|
|
595
617
|
* Copyright 2020 Google LLC
|
|
596
618
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
597
619
|
*/
|
|
598
|
-
const
|
|
620
|
+
const To = (o) => o.strings === void 0, Do = {}, Hi = (o, t = Do) => o._$AH = t;
|
|
599
621
|
/**
|
|
600
622
|
* @license
|
|
601
623
|
* Copyright 2021 Google LLC
|
|
602
624
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
603
625
|
*/
|
|
604
|
-
const
|
|
626
|
+
const Oo = Je(class extends Qe {
|
|
605
627
|
constructor() {
|
|
606
628
|
super(...arguments), this.key = $;
|
|
607
629
|
}
|
|
608
|
-
render(
|
|
609
|
-
return this.key =
|
|
630
|
+
render(o, t) {
|
|
631
|
+
return this.key = o, t;
|
|
610
632
|
}
|
|
611
|
-
update(
|
|
612
|
-
return t !== this.key && (
|
|
633
|
+
update(o, [t, e]) {
|
|
634
|
+
return t !== this.key && (Hi(o), this.key = t), e;
|
|
613
635
|
}
|
|
614
636
|
});
|
|
615
637
|
/**!
|
|
@@ -618,248 +640,248 @@ const Sn = ei(class extends ii {
|
|
|
618
640
|
* @author owenm <owen23355@gmail.com>
|
|
619
641
|
* @license MIT
|
|
620
642
|
*/
|
|
621
|
-
function
|
|
622
|
-
var e = Object.keys(
|
|
643
|
+
function gi(o, t) {
|
|
644
|
+
var e = Object.keys(o);
|
|
623
645
|
if (Object.getOwnPropertySymbols) {
|
|
624
|
-
var i = Object.getOwnPropertySymbols(
|
|
625
|
-
t && (i = i.filter(function(
|
|
626
|
-
return Object.getOwnPropertyDescriptor(
|
|
646
|
+
var i = Object.getOwnPropertySymbols(o);
|
|
647
|
+
t && (i = i.filter(function(n) {
|
|
648
|
+
return Object.getOwnPropertyDescriptor(o, n).enumerable;
|
|
627
649
|
})), e.push.apply(e, i);
|
|
628
650
|
}
|
|
629
651
|
return e;
|
|
630
652
|
}
|
|
631
|
-
function K(
|
|
653
|
+
function K(o) {
|
|
632
654
|
for (var t = 1; t < arguments.length; t++) {
|
|
633
655
|
var e = arguments[t] != null ? arguments[t] : {};
|
|
634
|
-
t % 2 ?
|
|
635
|
-
|
|
636
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
637
|
-
Object.defineProperty(
|
|
656
|
+
t % 2 ? gi(Object(e), !0).forEach(function(i) {
|
|
657
|
+
Po(o, i, e[i]);
|
|
658
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(e)) : gi(Object(e)).forEach(function(i) {
|
|
659
|
+
Object.defineProperty(o, i, Object.getOwnPropertyDescriptor(e, i));
|
|
638
660
|
});
|
|
639
661
|
}
|
|
640
|
-
return
|
|
662
|
+
return o;
|
|
641
663
|
}
|
|
642
|
-
function
|
|
664
|
+
function oe(o) {
|
|
643
665
|
"@babel/helpers - typeof";
|
|
644
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ?
|
|
666
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? oe = function(t) {
|
|
645
667
|
return typeof t;
|
|
646
|
-
} :
|
|
668
|
+
} : oe = function(t) {
|
|
647
669
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
648
|
-
},
|
|
670
|
+
}, oe(o);
|
|
649
671
|
}
|
|
650
|
-
function
|
|
651
|
-
return t in
|
|
672
|
+
function Po(o, t, e) {
|
|
673
|
+
return t in o ? Object.defineProperty(o, t, {
|
|
652
674
|
value: e,
|
|
653
675
|
enumerable: !0,
|
|
654
676
|
configurable: !0,
|
|
655
677
|
writable: !0
|
|
656
|
-
}) :
|
|
678
|
+
}) : o[t] = e, o;
|
|
657
679
|
}
|
|
658
680
|
function it() {
|
|
659
|
-
return it = Object.assign || function(
|
|
681
|
+
return it = Object.assign || function(o) {
|
|
660
682
|
for (var t = 1; t < arguments.length; t++) {
|
|
661
683
|
var e = arguments[t];
|
|
662
684
|
for (var i in e)
|
|
663
|
-
Object.prototype.hasOwnProperty.call(e, i) && (
|
|
685
|
+
Object.prototype.hasOwnProperty.call(e, i) && (o[i] = e[i]);
|
|
664
686
|
}
|
|
665
|
-
return
|
|
687
|
+
return o;
|
|
666
688
|
}, it.apply(this, arguments);
|
|
667
689
|
}
|
|
668
|
-
function
|
|
669
|
-
if (
|
|
690
|
+
function Ho(o, t) {
|
|
691
|
+
if (o == null)
|
|
670
692
|
return {};
|
|
671
|
-
var e = {}, i = Object.keys(
|
|
693
|
+
var e = {}, i = Object.keys(o), n, r;
|
|
672
694
|
for (r = 0; r < i.length; r++)
|
|
673
|
-
|
|
695
|
+
n = i[r], !(t.indexOf(n) >= 0) && (e[n] = o[n]);
|
|
674
696
|
return e;
|
|
675
697
|
}
|
|
676
|
-
function
|
|
677
|
-
if (
|
|
698
|
+
function Mo(o, t) {
|
|
699
|
+
if (o == null)
|
|
678
700
|
return {};
|
|
679
|
-
var e =
|
|
701
|
+
var e = Ho(o, t), i, n;
|
|
680
702
|
if (Object.getOwnPropertySymbols) {
|
|
681
|
-
var r = Object.getOwnPropertySymbols(
|
|
682
|
-
for (
|
|
683
|
-
i = r[
|
|
703
|
+
var r = Object.getOwnPropertySymbols(o);
|
|
704
|
+
for (n = 0; n < r.length; n++)
|
|
705
|
+
i = r[n], !(t.indexOf(i) >= 0) && Object.prototype.propertyIsEnumerable.call(o, i) && (e[i] = o[i]);
|
|
684
706
|
}
|
|
685
707
|
return e;
|
|
686
708
|
}
|
|
687
|
-
var
|
|
688
|
-
function tt(
|
|
709
|
+
var Lo = "1.15.0";
|
|
710
|
+
function tt(o) {
|
|
689
711
|
if (typeof window < "u" && window.navigator)
|
|
690
|
-
return !!/* @__PURE__ */ navigator.userAgent.match(
|
|
712
|
+
return !!/* @__PURE__ */ navigator.userAgent.match(o);
|
|
691
713
|
}
|
|
692
|
-
var
|
|
714
|
+
var ot = tt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), jt = tt(/Edge/i), mi = tt(/firefox/i), Bt = tt(/safari/i) && !tt(/chrome/i) && !tt(/android/i), Mi = tt(/iP(ad|od|hone)/i), Li = tt(/chrome/i) && tt(/android/i), Ni = {
|
|
693
715
|
capture: !1,
|
|
694
716
|
passive: !1
|
|
695
717
|
};
|
|
696
|
-
function w(
|
|
697
|
-
|
|
718
|
+
function w(o, t, e) {
|
|
719
|
+
o.addEventListener(t, e, !ot && Ni);
|
|
698
720
|
}
|
|
699
|
-
function
|
|
700
|
-
|
|
721
|
+
function b(o, t, e) {
|
|
722
|
+
o.removeEventListener(t, e, !ot && Ni);
|
|
701
723
|
}
|
|
702
|
-
function de(
|
|
724
|
+
function de(o, t) {
|
|
703
725
|
if (t) {
|
|
704
|
-
if (t[0] === ">" && (t = t.substring(1)),
|
|
726
|
+
if (t[0] === ">" && (t = t.substring(1)), o)
|
|
705
727
|
try {
|
|
706
|
-
if (
|
|
707
|
-
return
|
|
708
|
-
if (
|
|
709
|
-
return
|
|
710
|
-
if (
|
|
711
|
-
return
|
|
728
|
+
if (o.matches)
|
|
729
|
+
return o.matches(t);
|
|
730
|
+
if (o.msMatchesSelector)
|
|
731
|
+
return o.msMatchesSelector(t);
|
|
732
|
+
if (o.webkitMatchesSelector)
|
|
733
|
+
return o.webkitMatchesSelector(t);
|
|
712
734
|
} catch {
|
|
713
735
|
return !1;
|
|
714
736
|
}
|
|
715
737
|
return !1;
|
|
716
738
|
}
|
|
717
739
|
}
|
|
718
|
-
function
|
|
719
|
-
return
|
|
740
|
+
function No(o) {
|
|
741
|
+
return o.host && o !== document && o.host.nodeType ? o.host : o.parentNode;
|
|
720
742
|
}
|
|
721
|
-
function
|
|
722
|
-
if (
|
|
743
|
+
function j(o, t, e, i) {
|
|
744
|
+
if (o) {
|
|
723
745
|
e = e || document;
|
|
724
746
|
do {
|
|
725
|
-
if (t != null && (t[0] === ">" ?
|
|
726
|
-
return
|
|
727
|
-
if (
|
|
747
|
+
if (t != null && (t[0] === ">" ? o.parentNode === e && de(o, t) : de(o, t)) || i && o === e)
|
|
748
|
+
return o;
|
|
749
|
+
if (o === e)
|
|
728
750
|
break;
|
|
729
|
-
} while (
|
|
751
|
+
} while (o = No(o));
|
|
730
752
|
}
|
|
731
753
|
return null;
|
|
732
754
|
}
|
|
733
|
-
var
|
|
734
|
-
function
|
|
735
|
-
if (
|
|
736
|
-
if (
|
|
737
|
-
|
|
755
|
+
var yi = /\s+/g;
|
|
756
|
+
function R(o, t, e) {
|
|
757
|
+
if (o && t)
|
|
758
|
+
if (o.classList)
|
|
759
|
+
o.classList[e ? "add" : "remove"](t);
|
|
738
760
|
else {
|
|
739
|
-
var i = (" " +
|
|
740
|
-
|
|
761
|
+
var i = (" " + o.className + " ").replace(yi, " ").replace(" " + t + " ", " ");
|
|
762
|
+
o.className = (i + (e ? " " + t : "")).replace(yi, " ");
|
|
741
763
|
}
|
|
742
764
|
}
|
|
743
|
-
function
|
|
744
|
-
var i =
|
|
765
|
+
function p(o, t, e) {
|
|
766
|
+
var i = o && o.style;
|
|
745
767
|
if (i) {
|
|
746
768
|
if (e === void 0)
|
|
747
|
-
return document.defaultView && document.defaultView.getComputedStyle ? e = document.defaultView.getComputedStyle(
|
|
769
|
+
return document.defaultView && document.defaultView.getComputedStyle ? e = document.defaultView.getComputedStyle(o, "") : o.currentStyle && (e = o.currentStyle), t === void 0 ? e : e[t];
|
|
748
770
|
!(t in i) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), i[t] = e + (typeof e == "string" ? "" : "px");
|
|
749
771
|
}
|
|
750
772
|
}
|
|
751
|
-
function At(
|
|
773
|
+
function At(o, t) {
|
|
752
774
|
var e = "";
|
|
753
|
-
if (typeof
|
|
754
|
-
e =
|
|
775
|
+
if (typeof o == "string")
|
|
776
|
+
e = o;
|
|
755
777
|
else
|
|
756
778
|
do {
|
|
757
|
-
var i =
|
|
779
|
+
var i = p(o, "transform");
|
|
758
780
|
i && i !== "none" && (e = i + " " + e);
|
|
759
|
-
} while (!t && (
|
|
760
|
-
var
|
|
761
|
-
return
|
|
781
|
+
} while (!t && (o = o.parentNode));
|
|
782
|
+
var n = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
783
|
+
return n && new n(e);
|
|
762
784
|
}
|
|
763
|
-
function
|
|
764
|
-
if (
|
|
765
|
-
var i =
|
|
785
|
+
function ki(o, t, e) {
|
|
786
|
+
if (o) {
|
|
787
|
+
var i = o.getElementsByTagName(t), n = 0, r = i.length;
|
|
766
788
|
if (e)
|
|
767
|
-
for (;
|
|
768
|
-
e(i[
|
|
789
|
+
for (; n < r; n++)
|
|
790
|
+
e(i[n], n);
|
|
769
791
|
return i;
|
|
770
792
|
}
|
|
771
793
|
return [];
|
|
772
794
|
}
|
|
773
795
|
function G() {
|
|
774
|
-
var
|
|
775
|
-
return
|
|
796
|
+
var o = document.scrollingElement;
|
|
797
|
+
return o || document.documentElement;
|
|
776
798
|
}
|
|
777
|
-
function T(
|
|
778
|
-
if (!(!
|
|
779
|
-
var r, s, l, a,
|
|
780
|
-
if (
|
|
799
|
+
function T(o, t, e, i, n) {
|
|
800
|
+
if (!(!o.getBoundingClientRect && o !== window)) {
|
|
801
|
+
var r, s, l, a, h, c, d;
|
|
802
|
+
if (o !== window && o.parentNode && o !== G() ? (r = o.getBoundingClientRect(), s = r.top, l = r.left, a = r.bottom, h = r.right, c = r.height, d = r.width) : (s = 0, l = 0, a = window.innerHeight, h = window.innerWidth, c = window.innerHeight, d = window.innerWidth), (t || e) && o !== window && (n = n || o.parentNode, !ot))
|
|
781
803
|
do
|
|
782
|
-
if (
|
|
783
|
-
var
|
|
784
|
-
s -=
|
|
804
|
+
if (n && n.getBoundingClientRect && (p(n, "transform") !== "none" || e && p(n, "position") !== "static")) {
|
|
805
|
+
var g = n.getBoundingClientRect();
|
|
806
|
+
s -= g.top + parseInt(p(n, "border-top-width")), l -= g.left + parseInt(p(n, "border-left-width")), a = s + r.height, h = l + r.width;
|
|
785
807
|
break;
|
|
786
808
|
}
|
|
787
|
-
while (
|
|
788
|
-
if (i &&
|
|
789
|
-
var v = At(
|
|
790
|
-
v && (s /=
|
|
809
|
+
while (n = n.parentNode);
|
|
810
|
+
if (i && o !== window) {
|
|
811
|
+
var v = At(n || o), y = v && v.a, E = v && v.d;
|
|
812
|
+
v && (s /= E, l /= y, d /= y, c /= E, a = s + c, h = l + d);
|
|
791
813
|
}
|
|
792
814
|
return {
|
|
793
815
|
top: s,
|
|
794
816
|
left: l,
|
|
795
817
|
bottom: a,
|
|
796
|
-
right:
|
|
797
|
-
width:
|
|
798
|
-
height:
|
|
818
|
+
right: h,
|
|
819
|
+
width: d,
|
|
820
|
+
height: c
|
|
799
821
|
};
|
|
800
822
|
}
|
|
801
823
|
}
|
|
802
|
-
function
|
|
803
|
-
for (var i =
|
|
824
|
+
function vi(o, t, e) {
|
|
825
|
+
for (var i = ht(o, !0), n = T(o)[t]; i; ) {
|
|
804
826
|
var r = T(i)[e], s = void 0;
|
|
805
|
-
if (e === "top" || e === "left" ? s =
|
|
827
|
+
if (e === "top" || e === "left" ? s = n >= r : s = n <= r, !s)
|
|
806
828
|
return i;
|
|
807
829
|
if (i === G())
|
|
808
830
|
break;
|
|
809
|
-
i =
|
|
831
|
+
i = ht(i, !1);
|
|
810
832
|
}
|
|
811
833
|
return !1;
|
|
812
834
|
}
|
|
813
|
-
function Tt(
|
|
814
|
-
for (var
|
|
815
|
-
if (s[r].style.display !== "none" && s[r] !==
|
|
816
|
-
if (
|
|
835
|
+
function Tt(o, t, e, i) {
|
|
836
|
+
for (var n = 0, r = 0, s = o.children; r < s.length; ) {
|
|
837
|
+
if (s[r].style.display !== "none" && s[r] !== f.ghost && (i || s[r] !== f.dragged) && j(s[r], e.draggable, o, !1)) {
|
|
838
|
+
if (n === t)
|
|
817
839
|
return s[r];
|
|
818
|
-
|
|
840
|
+
n++;
|
|
819
841
|
}
|
|
820
842
|
r++;
|
|
821
843
|
}
|
|
822
844
|
return null;
|
|
823
845
|
}
|
|
824
|
-
function
|
|
825
|
-
for (var e =
|
|
846
|
+
function ti(o, t) {
|
|
847
|
+
for (var e = o.lastElementChild; e && (e === f.ghost || p(e, "display") === "none" || t && !de(e, t)); )
|
|
826
848
|
e = e.previousElementSibling;
|
|
827
849
|
return e || null;
|
|
828
850
|
}
|
|
829
|
-
function
|
|
851
|
+
function Z(o, t) {
|
|
830
852
|
var e = 0;
|
|
831
|
-
if (!
|
|
853
|
+
if (!o || !o.parentNode)
|
|
832
854
|
return -1;
|
|
833
|
-
for (;
|
|
834
|
-
|
|
855
|
+
for (; o = o.previousElementSibling; )
|
|
856
|
+
o.nodeName.toUpperCase() !== "TEMPLATE" && o !== f.clone && (!t || de(o, t)) && e++;
|
|
835
857
|
return e;
|
|
836
858
|
}
|
|
837
|
-
function
|
|
859
|
+
function bi(o) {
|
|
838
860
|
var t = 0, e = 0, i = G();
|
|
839
|
-
if (
|
|
861
|
+
if (o)
|
|
840
862
|
do {
|
|
841
|
-
var
|
|
842
|
-
t +=
|
|
843
|
-
} while (
|
|
863
|
+
var n = At(o), r = n.a, s = n.d;
|
|
864
|
+
t += o.scrollLeft * r, e += o.scrollTop * s;
|
|
865
|
+
} while (o !== i && (o = o.parentNode));
|
|
844
866
|
return [t, e];
|
|
845
867
|
}
|
|
846
|
-
function
|
|
847
|
-
for (var e in
|
|
848
|
-
if (
|
|
868
|
+
function ko(o, t) {
|
|
869
|
+
for (var e in o)
|
|
870
|
+
if (o.hasOwnProperty(e)) {
|
|
849
871
|
for (var i in t)
|
|
850
|
-
if (t.hasOwnProperty(i) && t[i] ===
|
|
872
|
+
if (t.hasOwnProperty(i) && t[i] === o[e][i])
|
|
851
873
|
return Number(e);
|
|
852
874
|
}
|
|
853
875
|
return -1;
|
|
854
876
|
}
|
|
855
|
-
function
|
|
856
|
-
if (!
|
|
877
|
+
function ht(o, t) {
|
|
878
|
+
if (!o || !o.getBoundingClientRect)
|
|
857
879
|
return G();
|
|
858
|
-
var e =
|
|
880
|
+
var e = o, i = !1;
|
|
859
881
|
do
|
|
860
882
|
if (e.clientWidth < e.scrollWidth || e.clientHeight < e.scrollHeight) {
|
|
861
|
-
var
|
|
862
|
-
if (e.clientWidth < e.scrollWidth && (
|
|
883
|
+
var n = p(e);
|
|
884
|
+
if (e.clientWidth < e.scrollWidth && (n.overflowX == "auto" || n.overflowX == "scroll") || e.clientHeight < e.scrollHeight && (n.overflowY == "auto" || n.overflowY == "scroll")) {
|
|
863
885
|
if (!e.getBoundingClientRect || e === document.body)
|
|
864
886
|
return G();
|
|
865
887
|
if (i || t)
|
|
@@ -870,116 +892,116 @@ function dt(n, t) {
|
|
|
870
892
|
while (e = e.parentNode);
|
|
871
893
|
return G();
|
|
872
894
|
}
|
|
873
|
-
function
|
|
874
|
-
if (
|
|
895
|
+
function Io(o, t) {
|
|
896
|
+
if (o && t)
|
|
875
897
|
for (var e in t)
|
|
876
|
-
t.hasOwnProperty(e) && (
|
|
877
|
-
return
|
|
898
|
+
t.hasOwnProperty(e) && (o[e] = t[e]);
|
|
899
|
+
return o;
|
|
878
900
|
}
|
|
879
|
-
function
|
|
880
|
-
return Math.round(
|
|
901
|
+
function Ne(o, t) {
|
|
902
|
+
return Math.round(o.top) === Math.round(t.top) && Math.round(o.left) === Math.round(t.left) && Math.round(o.height) === Math.round(t.height) && Math.round(o.width) === Math.round(t.width);
|
|
881
903
|
}
|
|
882
|
-
var
|
|
883
|
-
function
|
|
904
|
+
var Ut;
|
|
905
|
+
function Ii(o, t) {
|
|
884
906
|
return function() {
|
|
885
|
-
if (!
|
|
907
|
+
if (!Ut) {
|
|
886
908
|
var e = arguments, i = this;
|
|
887
|
-
e.length === 1 ?
|
|
888
|
-
|
|
909
|
+
e.length === 1 ? o.call(i, e[0]) : o.apply(i, e), Ut = setTimeout(function() {
|
|
910
|
+
Ut = void 0;
|
|
889
911
|
}, t);
|
|
890
912
|
}
|
|
891
913
|
};
|
|
892
914
|
}
|
|
893
|
-
function
|
|
894
|
-
clearTimeout(
|
|
915
|
+
function Vo() {
|
|
916
|
+
clearTimeout(Ut), Ut = void 0;
|
|
895
917
|
}
|
|
896
|
-
function
|
|
897
|
-
|
|
918
|
+
function Vi(o, t, e) {
|
|
919
|
+
o.scrollLeft += t, o.scrollTop += e;
|
|
898
920
|
}
|
|
899
|
-
function
|
|
921
|
+
function Ri(o) {
|
|
900
922
|
var t = window.Polymer, e = window.jQuery || window.Zepto;
|
|
901
|
-
return t && t.dom ? t.dom(
|
|
923
|
+
return t && t.dom ? t.dom(o).cloneNode(!0) : e ? e(o).clone(!0)[0] : o.cloneNode(!0);
|
|
902
924
|
}
|
|
903
925
|
var U = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
904
|
-
function
|
|
905
|
-
var
|
|
926
|
+
function Ro() {
|
|
927
|
+
var o = [], t;
|
|
906
928
|
return {
|
|
907
929
|
captureAnimationState: function() {
|
|
908
|
-
if (
|
|
930
|
+
if (o = [], !!this.options.animation) {
|
|
909
931
|
var i = [].slice.call(this.el.children);
|
|
910
|
-
i.forEach(function(
|
|
911
|
-
if (!(
|
|
912
|
-
|
|
913
|
-
target:
|
|
914
|
-
rect: T(
|
|
932
|
+
i.forEach(function(n) {
|
|
933
|
+
if (!(p(n, "display") === "none" || n === f.ghost)) {
|
|
934
|
+
o.push({
|
|
935
|
+
target: n,
|
|
936
|
+
rect: T(n)
|
|
915
937
|
});
|
|
916
|
-
var r = K({},
|
|
917
|
-
if (
|
|
918
|
-
var s = At(
|
|
938
|
+
var r = K({}, o[o.length - 1].rect);
|
|
939
|
+
if (n.thisAnimationDuration) {
|
|
940
|
+
var s = At(n, !0);
|
|
919
941
|
s && (r.top -= s.f, r.left -= s.e);
|
|
920
942
|
}
|
|
921
|
-
|
|
943
|
+
n.fromRect = r;
|
|
922
944
|
}
|
|
923
945
|
});
|
|
924
946
|
}
|
|
925
947
|
},
|
|
926
948
|
addAnimationState: function(i) {
|
|
927
|
-
|
|
949
|
+
o.push(i);
|
|
928
950
|
},
|
|
929
951
|
removeAnimationState: function(i) {
|
|
930
|
-
|
|
952
|
+
o.splice(ko(o, {
|
|
931
953
|
target: i
|
|
932
954
|
}), 1);
|
|
933
955
|
},
|
|
934
956
|
animateAll: function(i) {
|
|
935
|
-
var
|
|
957
|
+
var n = this;
|
|
936
958
|
if (!this.options.animation) {
|
|
937
959
|
clearTimeout(t), typeof i == "function" && i();
|
|
938
960
|
return;
|
|
939
961
|
}
|
|
940
962
|
var r = !1, s = 0;
|
|
941
|
-
|
|
942
|
-
var a = 0,
|
|
943
|
-
|
|
944
|
-
(y.top -
|
|
945
|
-
|
|
946
|
-
}, a),
|
|
963
|
+
o.forEach(function(l) {
|
|
964
|
+
var a = 0, h = l.target, c = h.fromRect, d = T(h), g = h.prevFromRect, v = h.prevToRect, y = l.rect, E = At(h, !0);
|
|
965
|
+
E && (d.top -= E.f, d.left -= E.e), h.toRect = d, h.thisAnimationDuration && Ne(g, d) && !Ne(c, d) && // Make sure animatingRect is on line between toRect & fromRect
|
|
966
|
+
(y.top - d.top) / (y.left - d.left) === (c.top - d.top) / (c.left - d.left) && (a = Uo(y, g, v, n.options)), Ne(d, c) || (h.prevFromRect = c, h.prevToRect = d, a || (a = n.options.animation), n.animate(h, y, d, a)), a && (r = !0, s = Math.max(s, a), clearTimeout(h.animationResetTimer), h.animationResetTimer = setTimeout(function() {
|
|
967
|
+
h.animationTime = 0, h.prevFromRect = null, h.fromRect = null, h.prevToRect = null, h.thisAnimationDuration = null;
|
|
968
|
+
}, a), h.thisAnimationDuration = a);
|
|
947
969
|
}), clearTimeout(t), r ? t = setTimeout(function() {
|
|
948
970
|
typeof i == "function" && i();
|
|
949
|
-
}, s) : typeof i == "function" && i(),
|
|
971
|
+
}, s) : typeof i == "function" && i(), o = [];
|
|
950
972
|
},
|
|
951
|
-
animate: function(i,
|
|
973
|
+
animate: function(i, n, r, s) {
|
|
952
974
|
if (s) {
|
|
953
|
-
|
|
954
|
-
var l = At(this.el), a = l && l.a,
|
|
955
|
-
i.animatingX = !!
|
|
956
|
-
|
|
975
|
+
p(i, "transition", ""), p(i, "transform", "");
|
|
976
|
+
var l = At(this.el), a = l && l.a, h = l && l.d, c = (n.left - r.left) / (a || 1), d = (n.top - r.top) / (h || 1);
|
|
977
|
+
i.animatingX = !!c, i.animatingY = !!d, p(i, "transform", "translate3d(" + c + "px," + d + "px,0)"), this.forRepaintDummy = Bo(i), p(i, "transition", "transform " + s + "ms" + (this.options.easing ? " " + this.options.easing : "")), p(i, "transform", "translate3d(0,0,0)"), typeof i.animated == "number" && clearTimeout(i.animated), i.animated = setTimeout(function() {
|
|
978
|
+
p(i, "transition", ""), p(i, "transform", ""), i.animated = !1, i.animatingX = !1, i.animatingY = !1;
|
|
957
979
|
}, s);
|
|
958
980
|
}
|
|
959
981
|
}
|
|
960
982
|
};
|
|
961
983
|
}
|
|
962
|
-
function
|
|
963
|
-
return
|
|
984
|
+
function Bo(o) {
|
|
985
|
+
return o.offsetWidth;
|
|
964
986
|
}
|
|
965
|
-
function
|
|
966
|
-
return Math.sqrt(Math.pow(t.top -
|
|
987
|
+
function Uo(o, t, e, i) {
|
|
988
|
+
return Math.sqrt(Math.pow(t.top - o.top, 2) + Math.pow(t.left - o.left, 2)) / Math.sqrt(Math.pow(t.top - e.top, 2) + Math.pow(t.left - e.left, 2)) * i.animation;
|
|
967
989
|
}
|
|
968
|
-
var Et = [],
|
|
990
|
+
var Et = [], ke = {
|
|
969
991
|
initializeByDefault: !0
|
|
970
|
-
},
|
|
992
|
+
}, Gt = {
|
|
971
993
|
mount: function(t) {
|
|
972
|
-
for (var e in
|
|
973
|
-
|
|
994
|
+
for (var e in ke)
|
|
995
|
+
ke.hasOwnProperty(e) && !(e in t) && (t[e] = ke[e]);
|
|
974
996
|
Et.forEach(function(i) {
|
|
975
997
|
if (i.pluginName === t.pluginName)
|
|
976
998
|
throw "Sortable: Cannot mount plugin ".concat(t.pluginName, " more than once");
|
|
977
999
|
}), Et.push(t);
|
|
978
1000
|
},
|
|
979
1001
|
pluginEvent: function(t, e, i) {
|
|
980
|
-
var
|
|
1002
|
+
var n = this;
|
|
981
1003
|
this.eventCanceled = !1, i.cancel = function() {
|
|
982
|
-
|
|
1004
|
+
n.eventCanceled = !0;
|
|
983
1005
|
};
|
|
984
1006
|
var r = t + "Global";
|
|
985
1007
|
Et.forEach(function(s) {
|
|
@@ -990,12 +1012,12 @@ var Et = [], Ve = {
|
|
|
990
1012
|
}, i)));
|
|
991
1013
|
});
|
|
992
1014
|
},
|
|
993
|
-
initializePlugins: function(t, e, i,
|
|
1015
|
+
initializePlugins: function(t, e, i, n) {
|
|
994
1016
|
Et.forEach(function(l) {
|
|
995
1017
|
var a = l.pluginName;
|
|
996
1018
|
if (!(!t.options[a] && !l.initializeByDefault)) {
|
|
997
|
-
var
|
|
998
|
-
|
|
1019
|
+
var h = new l(t, e, t.options);
|
|
1020
|
+
h.sortable = t, h.options = t.options, t[a] = h, it(i, h.defaults);
|
|
999
1021
|
}
|
|
1000
1022
|
});
|
|
1001
1023
|
for (var r in t.options)
|
|
@@ -1006,52 +1028,52 @@ var Et = [], Ve = {
|
|
|
1006
1028
|
},
|
|
1007
1029
|
getEventProperties: function(t, e) {
|
|
1008
1030
|
var i = {};
|
|
1009
|
-
return Et.forEach(function(
|
|
1010
|
-
typeof
|
|
1031
|
+
return Et.forEach(function(n) {
|
|
1032
|
+
typeof n.eventProperties == "function" && it(i, n.eventProperties.call(e[n.pluginName], t));
|
|
1011
1033
|
}), i;
|
|
1012
1034
|
},
|
|
1013
1035
|
modifyOption: function(t, e, i) {
|
|
1014
|
-
var
|
|
1036
|
+
var n;
|
|
1015
1037
|
return Et.forEach(function(r) {
|
|
1016
|
-
t[r.pluginName] && r.optionListeners && typeof r.optionListeners[e] == "function" && (
|
|
1017
|
-
}),
|
|
1038
|
+
t[r.pluginName] && r.optionListeners && typeof r.optionListeners[e] == "function" && (n = r.optionListeners[e].call(t[r.pluginName], i));
|
|
1039
|
+
}), n;
|
|
1018
1040
|
}
|
|
1019
1041
|
};
|
|
1020
|
-
function
|
|
1021
|
-
var t =
|
|
1042
|
+
function Zo(o) {
|
|
1043
|
+
var t = o.sortable, e = o.rootEl, i = o.name, n = o.targetEl, r = o.cloneEl, s = o.toEl, l = o.fromEl, a = o.oldIndex, h = o.newIndex, c = o.oldDraggableIndex, d = o.newDraggableIndex, g = o.originalEvent, v = o.putSortable, y = o.extraEventProperties;
|
|
1022
1044
|
if (t = t || e && e[U], !!t) {
|
|
1023
|
-
var
|
|
1024
|
-
window.CustomEvent && !
|
|
1045
|
+
var E, z = t.options, J = "on" + i.charAt(0).toUpperCase() + i.substr(1);
|
|
1046
|
+
window.CustomEvent && !ot && !jt ? E = new CustomEvent(i, {
|
|
1025
1047
|
bubbles: !0,
|
|
1026
1048
|
cancelable: !0
|
|
1027
|
-
}) : (
|
|
1028
|
-
var
|
|
1029
|
-
for (var
|
|
1030
|
-
|
|
1031
|
-
e && e.dispatchEvent(
|
|
1032
|
-
}
|
|
1033
|
-
}
|
|
1034
|
-
var
|
|
1035
|
-
var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {},
|
|
1036
|
-
|
|
1037
|
-
dragEl:
|
|
1038
|
-
parentEl:
|
|
1049
|
+
}) : (E = document.createEvent("Event"), E.initEvent(i, !0, !0)), E.to = s || e, E.from = l || e, E.item = n || e, E.clone = r, E.oldIndex = a, E.newIndex = h, E.oldDraggableIndex = c, E.newDraggableIndex = d, E.originalEvent = g, E.pullMode = v ? v.lastPutMode : void 0;
|
|
1050
|
+
var P = K(K({}, y), Gt.getEventProperties(i, t));
|
|
1051
|
+
for (var X in P)
|
|
1052
|
+
E[X] = P[X];
|
|
1053
|
+
e && e.dispatchEvent(E), z[J] && z[J].call(t, E);
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
var Fo = ["evt"], k = function(t, e) {
|
|
1057
|
+
var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = i.evt, r = Mo(i, Fo);
|
|
1058
|
+
Gt.pluginEvent.bind(f)(t, e, K({
|
|
1059
|
+
dragEl: u,
|
|
1060
|
+
parentEl: A,
|
|
1039
1061
|
ghostEl: m,
|
|
1040
1062
|
rootEl: x,
|
|
1041
1063
|
nextEl: vt,
|
|
1042
|
-
lastDownEl:
|
|
1043
|
-
cloneEl:
|
|
1064
|
+
lastDownEl: ne,
|
|
1065
|
+
cloneEl: S,
|
|
1044
1066
|
cloneHidden: lt,
|
|
1045
|
-
dragStarted:
|
|
1067
|
+
dragStarted: Nt,
|
|
1046
1068
|
putSortable: D,
|
|
1047
|
-
activeSortable:
|
|
1048
|
-
originalEvent:
|
|
1049
|
-
oldIndex:
|
|
1050
|
-
oldDraggableIndex:
|
|
1051
|
-
newIndex:
|
|
1069
|
+
activeSortable: f.active,
|
|
1070
|
+
originalEvent: n,
|
|
1071
|
+
oldIndex: St,
|
|
1072
|
+
oldDraggableIndex: Zt,
|
|
1073
|
+
newIndex: B,
|
|
1052
1074
|
newDraggableIndex: st,
|
|
1053
|
-
hideGhostForTarget:
|
|
1054
|
-
unhideGhostForTarget:
|
|
1075
|
+
hideGhostForTarget: Fi,
|
|
1076
|
+
unhideGhostForTarget: zi,
|
|
1055
1077
|
cloneNowHidden: function() {
|
|
1056
1078
|
lt = !0;
|
|
1057
1079
|
},
|
|
@@ -1059,111 +1081,111 @@ var Rn = ["evt"], k = function(t, e) {
|
|
|
1059
1081
|
lt = !1;
|
|
1060
1082
|
},
|
|
1061
1083
|
dispatchSortableEvent: function(l) {
|
|
1062
|
-
|
|
1084
|
+
L({
|
|
1063
1085
|
sortable: e,
|
|
1064
1086
|
name: l,
|
|
1065
|
-
originalEvent:
|
|
1087
|
+
originalEvent: n
|
|
1066
1088
|
});
|
|
1067
1089
|
}
|
|
1068
1090
|
}, r));
|
|
1069
1091
|
};
|
|
1070
|
-
function
|
|
1071
|
-
|
|
1092
|
+
function L(o) {
|
|
1093
|
+
Zo(K({
|
|
1072
1094
|
putSortable: D,
|
|
1073
|
-
cloneEl:
|
|
1074
|
-
targetEl:
|
|
1095
|
+
cloneEl: S,
|
|
1096
|
+
targetEl: u,
|
|
1075
1097
|
rootEl: x,
|
|
1076
|
-
oldIndex:
|
|
1077
|
-
oldDraggableIndex:
|
|
1078
|
-
newIndex:
|
|
1098
|
+
oldIndex: St,
|
|
1099
|
+
oldDraggableIndex: Zt,
|
|
1100
|
+
newIndex: B,
|
|
1079
1101
|
newDraggableIndex: st
|
|
1080
|
-
},
|
|
1102
|
+
}, o));
|
|
1081
1103
|
}
|
|
1082
|
-
var
|
|
1083
|
-
if (
|
|
1084
|
-
if (
|
|
1104
|
+
var u, A, m, x, vt, ne, S, lt, St, B, Zt, st, Jt, D, xt = !1, ue = !1, ce = [], gt, Y, Ie, Ve, wi, Ei, Nt, _t, Ft, zt = !1, Qt = !1, re, O, Re = [], Xe = !1, pe = [], Oe = typeof document < "u", te = Mi, _i = jt || ot ? "cssFloat" : "float", zo = Oe && !Li && !Mi && "draggable" in document.createElement("div"), Bi = function() {
|
|
1105
|
+
if (Oe) {
|
|
1106
|
+
if (ot)
|
|
1085
1107
|
return !1;
|
|
1086
|
-
var
|
|
1087
|
-
return
|
|
1108
|
+
var o = document.createElement("x");
|
|
1109
|
+
return o.style.cssText = "pointer-events:auto", o.style.pointerEvents === "auto";
|
|
1088
1110
|
}
|
|
1089
|
-
}(),
|
|
1090
|
-
var i =
|
|
1111
|
+
}(), Ui = function(t, e) {
|
|
1112
|
+
var i = p(t), n = parseInt(i.width) - parseInt(i.paddingLeft) - parseInt(i.paddingRight) - parseInt(i.borderLeftWidth) - parseInt(i.borderRightWidth), r = Tt(t, 0, e), s = Tt(t, 1, e), l = r && p(r), a = s && p(s), h = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + T(r).width, c = a && parseInt(a.marginLeft) + parseInt(a.marginRight) + T(s).width;
|
|
1091
1113
|
if (i.display === "flex")
|
|
1092
1114
|
return i.flexDirection === "column" || i.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
1093
1115
|
if (i.display === "grid")
|
|
1094
1116
|
return i.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
1095
1117
|
if (r && l.float && l.float !== "none") {
|
|
1096
|
-
var
|
|
1097
|
-
return s && (a.clear === "both" || a.clear ===
|
|
1098
|
-
}
|
|
1099
|
-
return r && (l.display === "block" || l.display === "flex" || l.display === "table" || l.display === "grid" ||
|
|
1100
|
-
},
|
|
1101
|
-
var
|
|
1102
|
-
return
|
|
1103
|
-
},
|
|
1118
|
+
var d = l.float === "left" ? "left" : "right";
|
|
1119
|
+
return s && (a.clear === "both" || a.clear === d) ? "vertical" : "horizontal";
|
|
1120
|
+
}
|
|
1121
|
+
return r && (l.display === "block" || l.display === "flex" || l.display === "table" || l.display === "grid" || h >= n && i[_i] === "none" || s && i[_i] === "none" && h + c > n) ? "vertical" : "horizontal";
|
|
1122
|
+
}, Xo = function(t, e, i) {
|
|
1123
|
+
var n = i ? t.left : t.top, r = i ? t.right : t.bottom, s = i ? t.width : t.height, l = i ? e.left : e.top, a = i ? e.right : e.bottom, h = i ? e.width : e.height;
|
|
1124
|
+
return n === l || r === a || n + s / 2 === l + h / 2;
|
|
1125
|
+
}, Yo = function(t, e) {
|
|
1104
1126
|
var i;
|
|
1105
|
-
return ce.some(function(
|
|
1106
|
-
var r =
|
|
1107
|
-
if (!(!r ||
|
|
1108
|
-
var s = T(
|
|
1127
|
+
return ce.some(function(n) {
|
|
1128
|
+
var r = n[U].options.emptyInsertThreshold;
|
|
1129
|
+
if (!(!r || ti(n))) {
|
|
1130
|
+
var s = T(n), l = t >= s.left - r && t <= s.right + r, a = e >= s.top - r && e <= s.bottom + r;
|
|
1109
1131
|
if (l && a)
|
|
1110
|
-
return i =
|
|
1132
|
+
return i = n;
|
|
1111
1133
|
}
|
|
1112
1134
|
}), i;
|
|
1113
|
-
},
|
|
1135
|
+
}, Zi = function(t) {
|
|
1114
1136
|
function e(r, s) {
|
|
1115
|
-
return function(l, a,
|
|
1116
|
-
var
|
|
1117
|
-
if (r == null && (s ||
|
|
1137
|
+
return function(l, a, h, c) {
|
|
1138
|
+
var d = l.options.group.name && a.options.group.name && l.options.group.name === a.options.group.name;
|
|
1139
|
+
if (r == null && (s || d))
|
|
1118
1140
|
return !0;
|
|
1119
1141
|
if (r == null || r === !1)
|
|
1120
1142
|
return !1;
|
|
1121
1143
|
if (s && r === "clone")
|
|
1122
1144
|
return r;
|
|
1123
1145
|
if (typeof r == "function")
|
|
1124
|
-
return e(r(l, a,
|
|
1125
|
-
var
|
|
1126
|
-
return r === !0 || typeof r == "string" && r ===
|
|
1146
|
+
return e(r(l, a, h, c), s)(l, a, h, c);
|
|
1147
|
+
var g = (s ? l : a).options.group.name;
|
|
1148
|
+
return r === !0 || typeof r == "string" && r === g || r.join && r.indexOf(g) > -1;
|
|
1127
1149
|
};
|
|
1128
1150
|
}
|
|
1129
|
-
var i = {},
|
|
1130
|
-
(!
|
|
1131
|
-
name:
|
|
1132
|
-
}), i.name =
|
|
1133
|
-
},
|
|
1134
|
-
!
|
|
1135
|
-
},
|
|
1136
|
-
!
|
|
1151
|
+
var i = {}, n = t.group;
|
|
1152
|
+
(!n || oe(n) != "object") && (n = {
|
|
1153
|
+
name: n
|
|
1154
|
+
}), i.name = n.name, i.checkPull = e(n.pull, !0), i.checkPut = e(n.put), i.revertClone = n.revertClone, t.group = i;
|
|
1155
|
+
}, Fi = function() {
|
|
1156
|
+
!Bi && m && p(m, "display", "none");
|
|
1157
|
+
}, zi = function() {
|
|
1158
|
+
!Bi && m && p(m, "display", "");
|
|
1137
1159
|
};
|
|
1138
|
-
|
|
1160
|
+
Oe && !Li && document.addEventListener("click", function(o) {
|
|
1139
1161
|
if (ue)
|
|
1140
|
-
return
|
|
1162
|
+
return o.preventDefault(), o.stopPropagation && o.stopPropagation(), o.stopImmediatePropagation && o.stopImmediatePropagation(), ue = !1, !1;
|
|
1141
1163
|
}, !0);
|
|
1142
|
-
var
|
|
1143
|
-
if (
|
|
1164
|
+
var mt = function(t) {
|
|
1165
|
+
if (u) {
|
|
1144
1166
|
t = t.touches ? t.touches[0] : t;
|
|
1145
|
-
var e =
|
|
1167
|
+
var e = Yo(t.clientX, t.clientY);
|
|
1146
1168
|
if (e) {
|
|
1147
1169
|
var i = {};
|
|
1148
|
-
for (var
|
|
1149
|
-
t.hasOwnProperty(
|
|
1170
|
+
for (var n in t)
|
|
1171
|
+
t.hasOwnProperty(n) && (i[n] = t[n]);
|
|
1150
1172
|
i.target = i.rootEl = e, i.preventDefault = void 0, i.stopPropagation = void 0, e[U]._onDragOver(i);
|
|
1151
1173
|
}
|
|
1152
1174
|
}
|
|
1153
|
-
},
|
|
1154
|
-
|
|
1175
|
+
}, qo = function(t) {
|
|
1176
|
+
u && u.parentNode[U]._isOutsideThisEl(t.target);
|
|
1155
1177
|
};
|
|
1156
|
-
function
|
|
1157
|
-
if (!(
|
|
1158
|
-
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(
|
|
1159
|
-
this.el =
|
|
1178
|
+
function f(o, t) {
|
|
1179
|
+
if (!(o && o.nodeType && o.nodeType === 1))
|
|
1180
|
+
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));
|
|
1181
|
+
this.el = o, this.options = t = it({}, t), o[U] = this;
|
|
1160
1182
|
var e = {
|
|
1161
1183
|
group: null,
|
|
1162
1184
|
sort: !0,
|
|
1163
1185
|
disabled: !1,
|
|
1164
1186
|
store: null,
|
|
1165
1187
|
handle: null,
|
|
1166
|
-
draggable: /^[uo]l$/i.test(
|
|
1188
|
+
draggable: /^[uo]l$/i.test(o.nodeName) ? ">li" : ">*",
|
|
1167
1189
|
swapThreshold: 1,
|
|
1168
1190
|
// percentage; 0 <= x <= 1
|
|
1169
1191
|
invertSwap: !1,
|
|
@@ -1172,7 +1194,7 @@ function g(n, t) {
|
|
|
1172
1194
|
// will be set to same as swapThreshold if default
|
|
1173
1195
|
removeCloneOnHide: !0,
|
|
1174
1196
|
direction: function() {
|
|
1175
|
-
return
|
|
1197
|
+
return Ui(o, this.options);
|
|
1176
1198
|
},
|
|
1177
1199
|
ghostClass: "sortable-ghost",
|
|
1178
1200
|
chosenClass: "sortable-chosen",
|
|
@@ -1199,35 +1221,35 @@ function g(n, t) {
|
|
|
1199
1221
|
x: 0,
|
|
1200
1222
|
y: 0
|
|
1201
1223
|
},
|
|
1202
|
-
supportPointer:
|
|
1224
|
+
supportPointer: f.supportPointer !== !1 && "PointerEvent" in window && !Bt,
|
|
1203
1225
|
emptyInsertThreshold: 5
|
|
1204
1226
|
};
|
|
1205
|
-
|
|
1227
|
+
Gt.initializePlugins(this, o, e);
|
|
1206
1228
|
for (var i in e)
|
|
1207
1229
|
!(i in t) && (t[i] = e[i]);
|
|
1208
|
-
|
|
1209
|
-
for (var
|
|
1210
|
-
|
|
1211
|
-
this.nativeDraggable = t.forceFallback ? !1 :
|
|
1230
|
+
Zi(t);
|
|
1231
|
+
for (var n in this)
|
|
1232
|
+
n.charAt(0) === "_" && typeof this[n] == "function" && (this[n] = this[n].bind(this));
|
|
1233
|
+
this.nativeDraggable = t.forceFallback ? !1 : zo, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? w(o, "pointerdown", this._onTapStart) : (w(o, "mousedown", this._onTapStart), w(o, "touchstart", this._onTapStart)), this.nativeDraggable && (w(o, "dragover", this), w(o, "dragenter", this)), ce.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), it(this, Ro());
|
|
1212
1234
|
}
|
|
1213
|
-
|
|
1235
|
+
f.prototype = /** @lends Sortable.prototype */
|
|
1214
1236
|
{
|
|
1215
|
-
constructor:
|
|
1237
|
+
constructor: f,
|
|
1216
1238
|
_isOutsideThisEl: function(t) {
|
|
1217
|
-
!this.el.contains(t) && t !== this.el && (
|
|
1239
|
+
!this.el.contains(t) && t !== this.el && (_t = null);
|
|
1218
1240
|
},
|
|
1219
1241
|
_getDirection: function(t, e) {
|
|
1220
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, t, e,
|
|
1242
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, t, e, u) : this.options.direction;
|
|
1221
1243
|
},
|
|
1222
1244
|
_onTapStart: function(t) {
|
|
1223
1245
|
if (t.cancelable) {
|
|
1224
|
-
var e = this, i = this.el,
|
|
1225
|
-
if (
|
|
1226
|
-
if (
|
|
1227
|
-
if (
|
|
1228
|
-
|
|
1246
|
+
var e = this, i = this.el, n = this.options, r = n.preventOnFilter, s = t.type, l = t.touches && t.touches[0] || t.pointerType && t.pointerType === "touch" && t, a = (l || t).target, h = t.target.shadowRoot && (t.path && t.path[0] || t.composedPath && t.composedPath()[0]) || a, c = n.filter;
|
|
1247
|
+
if (en(i), !u && !(/mousedown|pointerdown/.test(s) && t.button !== 0 || n.disabled) && !h.isContentEditable && !(!this.nativeDraggable && Bt && a && a.tagName.toUpperCase() === "SELECT") && (a = j(a, n.draggable, i, !1), !(a && a.animated) && ne !== a)) {
|
|
1248
|
+
if (St = Z(a), Zt = Z(a, n.draggable), typeof c == "function") {
|
|
1249
|
+
if (c.call(this, t, a, this)) {
|
|
1250
|
+
L({
|
|
1229
1251
|
sortable: e,
|
|
1230
|
-
rootEl:
|
|
1252
|
+
rootEl: h,
|
|
1231
1253
|
name: "filter",
|
|
1232
1254
|
targetEl: a,
|
|
1233
1255
|
toEl: i,
|
|
@@ -1237,11 +1259,11 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1237
1259
|
}), r && t.cancelable && t.preventDefault();
|
|
1238
1260
|
return;
|
|
1239
1261
|
}
|
|
1240
|
-
} else if (
|
|
1241
|
-
if (
|
|
1242
|
-
return
|
|
1262
|
+
} else if (c && (c = c.split(",").some(function(d) {
|
|
1263
|
+
if (d = j(h, d.trim(), i, !1), d)
|
|
1264
|
+
return L({
|
|
1243
1265
|
sortable: e,
|
|
1244
|
-
rootEl:
|
|
1266
|
+
rootEl: d,
|
|
1245
1267
|
name: "filter",
|
|
1246
1268
|
targetEl: a,
|
|
1247
1269
|
fromEl: i,
|
|
@@ -1249,44 +1271,44 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1249
1271
|
}), k("filter", e, {
|
|
1250
1272
|
evt: t
|
|
1251
1273
|
}), !0;
|
|
1252
|
-
}),
|
|
1274
|
+
}), c)) {
|
|
1253
1275
|
r && t.cancelable && t.preventDefault();
|
|
1254
1276
|
return;
|
|
1255
1277
|
}
|
|
1256
|
-
|
|
1278
|
+
n.handle && !j(h, n.handle, i, !1) || this._prepareDragStart(t, l, a);
|
|
1257
1279
|
}
|
|
1258
1280
|
}
|
|
1259
1281
|
},
|
|
1260
1282
|
_prepareDragStart: function(t, e, i) {
|
|
1261
|
-
var
|
|
1262
|
-
if (i && !
|
|
1263
|
-
var
|
|
1264
|
-
if (x = r,
|
|
1265
|
-
target:
|
|
1283
|
+
var n = this, r = n.el, s = n.options, l = r.ownerDocument, a;
|
|
1284
|
+
if (i && !u && i.parentNode === r) {
|
|
1285
|
+
var h = T(i);
|
|
1286
|
+
if (x = r, u = i, A = u.parentNode, vt = u.nextSibling, ne = i, Jt = s.group, f.dragged = u, gt = {
|
|
1287
|
+
target: u,
|
|
1266
1288
|
clientX: (e || t).clientX,
|
|
1267
1289
|
clientY: (e || t).clientY
|
|
1268
|
-
},
|
|
1269
|
-
if (k("delayEnded",
|
|
1290
|
+
}, wi = gt.clientX - h.left, Ei = gt.clientY - h.top, this._lastX = (e || t).clientX, this._lastY = (e || t).clientY, u.style["will-change"] = "all", a = function() {
|
|
1291
|
+
if (k("delayEnded", n, {
|
|
1270
1292
|
evt: t
|
|
1271
|
-
}),
|
|
1272
|
-
|
|
1293
|
+
}), f.eventCanceled) {
|
|
1294
|
+
n._onDrop();
|
|
1273
1295
|
return;
|
|
1274
1296
|
}
|
|
1275
|
-
|
|
1276
|
-
sortable:
|
|
1297
|
+
n._disableDelayedDragEvents(), !mi && n.nativeDraggable && (u.draggable = !0), n._triggerDragStart(t, e), L({
|
|
1298
|
+
sortable: n,
|
|
1277
1299
|
name: "choose",
|
|
1278
1300
|
originalEvent: t
|
|
1279
|
-
}),
|
|
1280
|
-
}, s.ignore.split(",").forEach(function(
|
|
1281
|
-
|
|
1282
|
-
}), w(l, "dragover",
|
|
1301
|
+
}), R(u, s.chosenClass, !0);
|
|
1302
|
+
}, s.ignore.split(",").forEach(function(c) {
|
|
1303
|
+
ki(u, c.trim(), Be);
|
|
1304
|
+
}), w(l, "dragover", mt), w(l, "mousemove", mt), w(l, "touchmove", mt), w(l, "mouseup", n._onDrop), w(l, "touchend", n._onDrop), w(l, "touchcancel", n._onDrop), mi && this.nativeDraggable && (this.options.touchStartThreshold = 4, u.draggable = !0), k("delayStart", this, {
|
|
1283
1305
|
evt: t
|
|
1284
|
-
}), s.delay && (!s.delayOnTouchOnly || e) && (!this.nativeDraggable || !(
|
|
1285
|
-
if (
|
|
1306
|
+
}), s.delay && (!s.delayOnTouchOnly || e) && (!this.nativeDraggable || !(jt || ot))) {
|
|
1307
|
+
if (f.eventCanceled) {
|
|
1286
1308
|
this._onDrop();
|
|
1287
1309
|
return;
|
|
1288
1310
|
}
|
|
1289
|
-
w(l, "mouseup",
|
|
1311
|
+
w(l, "mouseup", n._disableDelayedDrag), w(l, "touchend", n._disableDelayedDrag), w(l, "touchcancel", n._disableDelayedDrag), w(l, "mousemove", n._delayedDragTouchMoveHandler), w(l, "touchmove", n._delayedDragTouchMoveHandler), s.supportPointer && w(l, "pointermove", n._delayedDragTouchMoveHandler), n._dragStartTimer = setTimeout(a, s.delay);
|
|
1290
1312
|
} else
|
|
1291
1313
|
a();
|
|
1292
1314
|
}
|
|
@@ -1296,28 +1318,28 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1296
1318
|
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();
|
|
1297
1319
|
},
|
|
1298
1320
|
_disableDelayedDrag: function() {
|
|
1299
|
-
|
|
1321
|
+
u && Be(u), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
1300
1322
|
},
|
|
1301
1323
|
_disableDelayedDragEvents: function() {
|
|
1302
1324
|
var t = this.el.ownerDocument;
|
|
1303
|
-
|
|
1325
|
+
b(t, "mouseup", this._disableDelayedDrag), b(t, "touchend", this._disableDelayedDrag), b(t, "touchcancel", this._disableDelayedDrag), b(t, "mousemove", this._delayedDragTouchMoveHandler), b(t, "touchmove", this._delayedDragTouchMoveHandler), b(t, "pointermove", this._delayedDragTouchMoveHandler);
|
|
1304
1326
|
},
|
|
1305
1327
|
_triggerDragStart: function(t, e) {
|
|
1306
|
-
e = e || t.pointerType == "touch" && t, !this.nativeDraggable || e ? this.options.supportPointer ? w(document, "pointermove", this._onTouchMove) : e ? w(document, "touchmove", this._onTouchMove) : w(document, "mousemove", this._onTouchMove) : (w(
|
|
1328
|
+
e = e || t.pointerType == "touch" && t, !this.nativeDraggable || e ? this.options.supportPointer ? w(document, "pointermove", this._onTouchMove) : e ? w(document, "touchmove", this._onTouchMove) : w(document, "mousemove", this._onTouchMove) : (w(u, "dragend", this), w(x, "dragstart", this._onDragStart));
|
|
1307
1329
|
try {
|
|
1308
|
-
document.selection ?
|
|
1330
|
+
document.selection ? se(function() {
|
|
1309
1331
|
document.selection.empty();
|
|
1310
1332
|
}) : window.getSelection().removeAllRanges();
|
|
1311
1333
|
} catch {
|
|
1312
1334
|
}
|
|
1313
1335
|
},
|
|
1314
1336
|
_dragStarted: function(t, e) {
|
|
1315
|
-
if (
|
|
1337
|
+
if (xt = !1, x && u) {
|
|
1316
1338
|
k("dragStarted", this, {
|
|
1317
1339
|
evt: e
|
|
1318
|
-
}), this.nativeDraggable && w(document, "dragover",
|
|
1340
|
+
}), this.nativeDraggable && w(document, "dragover", qo);
|
|
1319
1341
|
var i = this.options;
|
|
1320
|
-
!t &&
|
|
1342
|
+
!t && R(u, i.dragClass, !1), R(u, i.ghostClass, !0), f.active = this, t && this._appendGhost(), L({
|
|
1321
1343
|
sortable: this,
|
|
1322
1344
|
name: "start",
|
|
1323
1345
|
originalEvent: e
|
|
@@ -1326,17 +1348,17 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1326
1348
|
this._nulling();
|
|
1327
1349
|
},
|
|
1328
1350
|
_emulateDragOver: function() {
|
|
1329
|
-
if (
|
|
1330
|
-
this._lastX =
|
|
1331
|
-
for (var t = document.elementFromPoint(
|
|
1351
|
+
if (Y) {
|
|
1352
|
+
this._lastX = Y.clientX, this._lastY = Y.clientY, Fi();
|
|
1353
|
+
for (var t = document.elementFromPoint(Y.clientX, Y.clientY), e = t; t && t.shadowRoot && (t = t.shadowRoot.elementFromPoint(Y.clientX, Y.clientY), t !== e); )
|
|
1332
1354
|
e = t;
|
|
1333
|
-
if (
|
|
1355
|
+
if (u.parentNode[U]._isOutsideThisEl(t), e)
|
|
1334
1356
|
do {
|
|
1335
1357
|
if (e[U]) {
|
|
1336
1358
|
var i = void 0;
|
|
1337
1359
|
if (i = e[U]._onDragOver({
|
|
1338
|
-
clientX:
|
|
1339
|
-
clientY:
|
|
1360
|
+
clientX: Y.clientX,
|
|
1361
|
+
clientY: Y.clientY,
|
|
1340
1362
|
target: t,
|
|
1341
1363
|
rootEl: e
|
|
1342
1364
|
}), i && !this.options.dragoverBubble)
|
|
@@ -1344,213 +1366,213 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1344
1366
|
}
|
|
1345
1367
|
t = e;
|
|
1346
1368
|
} while (e = e.parentNode);
|
|
1347
|
-
|
|
1369
|
+
zi();
|
|
1348
1370
|
}
|
|
1349
1371
|
},
|
|
1350
1372
|
_onTouchMove: function(t) {
|
|
1351
|
-
if (
|
|
1352
|
-
var e = this.options, i = e.fallbackTolerance,
|
|
1353
|
-
if (!
|
|
1373
|
+
if (gt) {
|
|
1374
|
+
var e = this.options, i = e.fallbackTolerance, n = e.fallbackOffset, r = t.touches ? t.touches[0] : t, s = m && At(m, !0), l = m && s && s.a, a = m && s && s.d, h = te && O && bi(O), c = (r.clientX - gt.clientX + n.x) / (l || 1) + (h ? h[0] - Re[0] : 0) / (l || 1), d = (r.clientY - gt.clientY + n.y) / (a || 1) + (h ? h[1] - Re[1] : 0) / (a || 1);
|
|
1375
|
+
if (!f.active && !xt) {
|
|
1354
1376
|
if (i && Math.max(Math.abs(r.clientX - this._lastX), Math.abs(r.clientY - this._lastY)) < i)
|
|
1355
1377
|
return;
|
|
1356
1378
|
this._onDragStart(t, !0);
|
|
1357
1379
|
}
|
|
1358
1380
|
if (m) {
|
|
1359
|
-
s ? (s.e +=
|
|
1381
|
+
s ? (s.e += c - (Ie || 0), s.f += d - (Ve || 0)) : s = {
|
|
1360
1382
|
a: 1,
|
|
1361
1383
|
b: 0,
|
|
1362
1384
|
c: 0,
|
|
1363
1385
|
d: 1,
|
|
1364
|
-
e:
|
|
1365
|
-
f:
|
|
1386
|
+
e: c,
|
|
1387
|
+
f: d
|
|
1366
1388
|
};
|
|
1367
|
-
var
|
|
1368
|
-
|
|
1389
|
+
var g = "matrix(".concat(s.a, ",").concat(s.b, ",").concat(s.c, ",").concat(s.d, ",").concat(s.e, ",").concat(s.f, ")");
|
|
1390
|
+
p(m, "webkitTransform", g), p(m, "mozTransform", g), p(m, "msTransform", g), p(m, "transform", g), Ie = c, Ve = d, Y = r;
|
|
1369
1391
|
}
|
|
1370
1392
|
t.cancelable && t.preventDefault();
|
|
1371
1393
|
}
|
|
1372
1394
|
},
|
|
1373
1395
|
_appendGhost: function() {
|
|
1374
1396
|
if (!m) {
|
|
1375
|
-
var t = this.options.fallbackOnBody ? document.body : x, e = T(
|
|
1376
|
-
if (
|
|
1377
|
-
for (
|
|
1378
|
-
|
|
1379
|
-
|
|
1397
|
+
var t = this.options.fallbackOnBody ? document.body : x, e = T(u, !0, te, !0, t), i = this.options;
|
|
1398
|
+
if (te) {
|
|
1399
|
+
for (O = t; p(O, "position") === "static" && p(O, "transform") === "none" && O !== document; )
|
|
1400
|
+
O = O.parentNode;
|
|
1401
|
+
O !== document.body && O !== document.documentElement ? (O === document && (O = G()), e.top += O.scrollTop, e.left += O.scrollLeft) : O = G(), Re = bi(O);
|
|
1380
1402
|
}
|
|
1381
|
-
m =
|
|
1403
|
+
m = u.cloneNode(!0), R(m, i.ghostClass, !1), R(m, i.fallbackClass, !0), R(m, i.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", te ? "absolute" : "fixed"), p(m, "zIndex", "100000"), p(m, "pointerEvents", "none"), f.ghost = m, t.appendChild(m), p(m, "transform-origin", wi / parseInt(m.style.width) * 100 + "% " + Ei / parseInt(m.style.height) * 100 + "%");
|
|
1382
1404
|
}
|
|
1383
1405
|
},
|
|
1384
1406
|
_onDragStart: function(t, e) {
|
|
1385
|
-
var i = this,
|
|
1407
|
+
var i = this, n = t.dataTransfer, r = i.options;
|
|
1386
1408
|
if (k("dragStart", this, {
|
|
1387
1409
|
evt: t
|
|
1388
|
-
}),
|
|
1410
|
+
}), f.eventCanceled) {
|
|
1389
1411
|
this._onDrop();
|
|
1390
1412
|
return;
|
|
1391
1413
|
}
|
|
1392
|
-
k("setupClone", this),
|
|
1393
|
-
k("clone", i), !
|
|
1414
|
+
k("setupClone", this), f.eventCanceled || (S = Ri(u), S.removeAttribute("id"), S.draggable = !1, S.style["will-change"] = "", this._hideClone(), R(S, this.options.chosenClass, !1), f.clone = S), i.cloneId = se(function() {
|
|
1415
|
+
k("clone", i), !f.eventCanceled && (i.options.removeCloneOnHide || x.insertBefore(S, u), i._hideClone(), L({
|
|
1394
1416
|
sortable: i,
|
|
1395
1417
|
name: "clone"
|
|
1396
1418
|
}));
|
|
1397
|
-
}), !e &&
|
|
1419
|
+
}), !e && R(u, r.dragClass, !0), e ? (ue = !0, i._loopId = setInterval(i._emulateDragOver, 50)) : (b(document, "mouseup", i._onDrop), b(document, "touchend", i._onDrop), b(document, "touchcancel", i._onDrop), n && (n.effectAllowed = "move", r.setData && r.setData.call(i, n, u)), w(document, "drop", i), p(u, "transform", "translateZ(0)")), xt = !0, i._dragStartId = se(i._dragStarted.bind(i, e, t)), w(document, "selectstart", i), Nt = !0, Bt && p(document.body, "user-select", "none");
|
|
1398
1420
|
},
|
|
1399
1421
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
1400
1422
|
_onDragOver: function(t) {
|
|
1401
|
-
var e = this.el, i = t.target,
|
|
1402
|
-
if (
|
|
1423
|
+
var e = this.el, i = t.target, n, r, s, l = this.options, a = l.group, h = f.active, c = Jt === a, d = l.sort, g = D || h, v, y = this, E = !1;
|
|
1424
|
+
if (Xe)
|
|
1403
1425
|
return;
|
|
1404
|
-
function
|
|
1426
|
+
function z(Mt, io) {
|
|
1405
1427
|
k(Mt, y, K({
|
|
1406
1428
|
evt: t,
|
|
1407
|
-
isOwner:
|
|
1429
|
+
isOwner: c,
|
|
1408
1430
|
axis: v ? "vertical" : "horizontal",
|
|
1409
1431
|
revert: s,
|
|
1410
|
-
dragRect:
|
|
1432
|
+
dragRect: n,
|
|
1411
1433
|
targetRect: r,
|
|
1412
|
-
canSort:
|
|
1413
|
-
fromSortable:
|
|
1434
|
+
canSort: d,
|
|
1435
|
+
fromSortable: g,
|
|
1414
1436
|
target: i,
|
|
1415
|
-
completed:
|
|
1416
|
-
onMove: function(
|
|
1417
|
-
return
|
|
1437
|
+
completed: P,
|
|
1438
|
+
onMove: function(ni, oo) {
|
|
1439
|
+
return ee(x, e, u, n, ni, T(ni), t, oo);
|
|
1418
1440
|
},
|
|
1419
|
-
changed:
|
|
1420
|
-
},
|
|
1441
|
+
changed: X
|
|
1442
|
+
}, io));
|
|
1421
1443
|
}
|
|
1422
1444
|
function J() {
|
|
1423
|
-
|
|
1445
|
+
z("dragOverAnimationCapture"), y.captureAnimationState(), y !== g && g.captureAnimationState();
|
|
1424
1446
|
}
|
|
1425
|
-
function
|
|
1426
|
-
return
|
|
1447
|
+
function P(Mt) {
|
|
1448
|
+
return z("dragOverCompleted", {
|
|
1427
1449
|
insertion: Mt
|
|
1428
|
-
}), Mt && (
|
|
1429
|
-
|
|
1430
|
-
}), y !==
|
|
1450
|
+
}), Mt && (c ? h._hideClone() : h._showClone(y), y !== g && (R(u, D ? D.options.ghostClass : h.options.ghostClass, !1), R(u, l.ghostClass, !0)), D !== y && y !== f.active ? D = y : y === f.active && D && (D = null), g === y && (y._ignoreWhileAnimating = i), y.animateAll(function() {
|
|
1451
|
+
z("dragOverAnimationComplete"), y._ignoreWhileAnimating = null;
|
|
1452
|
+
}), y !== g && (g.animateAll(), g._ignoreWhileAnimating = null)), (i === u && !u.animated || i === e && !i.animated) && (_t = null), !l.dragoverBubble && !t.rootEl && i !== document && (u.parentNode[U]._isOutsideThisEl(t.target), !Mt && mt(t)), !l.dragoverBubble && t.stopPropagation && t.stopPropagation(), E = !0;
|
|
1431
1453
|
}
|
|
1432
|
-
function
|
|
1433
|
-
|
|
1454
|
+
function X() {
|
|
1455
|
+
B = Z(u), st = Z(u, l.draggable), L({
|
|
1434
1456
|
sortable: y,
|
|
1435
1457
|
name: "change",
|
|
1436
1458
|
toEl: e,
|
|
1437
|
-
newIndex:
|
|
1459
|
+
newIndex: B,
|
|
1438
1460
|
newDraggableIndex: st,
|
|
1439
1461
|
originalEvent: t
|
|
1440
1462
|
});
|
|
1441
1463
|
}
|
|
1442
|
-
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), i =
|
|
1443
|
-
return
|
|
1444
|
-
if (
|
|
1445
|
-
return
|
|
1446
|
-
if (ue = !1,
|
|
1447
|
-
if (v = this._getDirection(t, i) === "vertical",
|
|
1448
|
-
return
|
|
1464
|
+
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), i = j(i, l.draggable, e, !0), z("dragOver"), f.eventCanceled)
|
|
1465
|
+
return E;
|
|
1466
|
+
if (u.contains(t.target) || i.animated && i.animatingX && i.animatingY || y._ignoreWhileAnimating === i)
|
|
1467
|
+
return P(!1);
|
|
1468
|
+
if (ue = !1, h && !l.disabled && (c ? d || (s = A !== x) : D === this || (this.lastPutMode = Jt.checkPull(this, h, u, t)) && a.checkPut(this, h, u, t))) {
|
|
1469
|
+
if (v = this._getDirection(t, i) === "vertical", n = T(u), z("dragOverValid"), f.eventCanceled)
|
|
1470
|
+
return E;
|
|
1449
1471
|
if (s)
|
|
1450
|
-
return
|
|
1451
|
-
var I =
|
|
1452
|
-
if (!I ||
|
|
1453
|
-
if (I ===
|
|
1454
|
-
return
|
|
1455
|
-
if (I && e === t.target && (i = I), i && (r = T(i)),
|
|
1456
|
-
return J(), I && I.nextSibling ? e.insertBefore(
|
|
1457
|
-
} else if (I &&
|
|
1472
|
+
return A = x, J(), this._hideClone(), z("revert"), f.eventCanceled || (vt ? x.insertBefore(u, vt) : x.appendChild(u)), P(!0);
|
|
1473
|
+
var I = ti(e, l.draggable);
|
|
1474
|
+
if (!I || Ko(t, v, this) && !I.animated) {
|
|
1475
|
+
if (I === u)
|
|
1476
|
+
return P(!1);
|
|
1477
|
+
if (I && e === t.target && (i = I), i && (r = T(i)), ee(x, e, u, n, i, r, t, !!i) !== !1)
|
|
1478
|
+
return J(), I && I.nextSibling ? e.insertBefore(u, I.nextSibling) : e.appendChild(u), A = e, X(), P(!0);
|
|
1479
|
+
} else if (I && Go(t, v, this)) {
|
|
1458
1480
|
var ut = Tt(e, 0, l, !0);
|
|
1459
|
-
if (ut ===
|
|
1460
|
-
return
|
|
1461
|
-
if (i = ut, r = T(i),
|
|
1462
|
-
return J(), e.insertBefore(
|
|
1481
|
+
if (ut === u)
|
|
1482
|
+
return P(!1);
|
|
1483
|
+
if (i = ut, r = T(i), ee(x, e, u, n, i, r, t, !1) !== !1)
|
|
1484
|
+
return J(), e.insertBefore(u, ut), A = e, X(), P(!0);
|
|
1463
1485
|
} else if (i.parentNode === e) {
|
|
1464
1486
|
r = T(i);
|
|
1465
|
-
var W = 0, ct, Dt =
|
|
1466
|
-
|
|
1487
|
+
var W = 0, ct, Dt = u.parentNode !== e, V = !Xo(u.animated && u.toRect || n, i.animated && i.toRect || r, v), Ot = v ? "top" : "left", nt = vi(i, "top", "top") || vi(u, "top", "top"), Pt = nt ? nt.scrollTop : void 0;
|
|
1488
|
+
_t !== i && (ct = r[Ot], zt = !1, Qt = !V && l.invertSwap || Dt), W = Jo(t, i, r, v, V ? 1 : l.swapThreshold, l.invertedSwapThreshold == null ? l.swapThreshold : l.invertedSwapThreshold, Qt, _t === i);
|
|
1467
1489
|
var Q;
|
|
1468
1490
|
if (W !== 0) {
|
|
1469
|
-
var
|
|
1491
|
+
var pt = Z(u);
|
|
1470
1492
|
do
|
|
1471
|
-
|
|
1472
|
-
while (Q && (
|
|
1493
|
+
pt -= W, Q = A.children[pt];
|
|
1494
|
+
while (Q && (p(Q, "display") === "none" || Q === m));
|
|
1473
1495
|
}
|
|
1474
1496
|
if (W === 0 || Q === i)
|
|
1475
|
-
return
|
|
1476
|
-
|
|
1477
|
-
var
|
|
1497
|
+
return P(!1);
|
|
1498
|
+
_t = i, Ft = W;
|
|
1499
|
+
var Ht = i.nextElementSibling, rt = !1;
|
|
1478
1500
|
rt = W === 1;
|
|
1479
|
-
var
|
|
1480
|
-
if (
|
|
1481
|
-
return (
|
|
1501
|
+
var Kt = ee(x, e, u, n, i, r, t, rt);
|
|
1502
|
+
if (Kt !== !1)
|
|
1503
|
+
return (Kt === 1 || Kt === -1) && (rt = Kt === 1), Xe = !0, setTimeout(jo, 30), J(), rt && !Ht ? e.appendChild(u) : i.parentNode.insertBefore(u, rt ? Ht : i), nt && Vi(nt, 0, Pt - nt.scrollTop), A = u.parentNode, ct !== void 0 && !Qt && (re = Math.abs(ct - T(i)[Ot])), X(), P(!0);
|
|
1482
1504
|
}
|
|
1483
|
-
if (e.contains(
|
|
1484
|
-
return
|
|
1505
|
+
if (e.contains(u))
|
|
1506
|
+
return P(!1);
|
|
1485
1507
|
}
|
|
1486
1508
|
return !1;
|
|
1487
1509
|
},
|
|
1488
1510
|
_ignoreWhileAnimating: null,
|
|
1489
1511
|
_offMoveEvents: function() {
|
|
1490
|
-
|
|
1512
|
+
b(document, "mousemove", this._onTouchMove), b(document, "touchmove", this._onTouchMove), b(document, "pointermove", this._onTouchMove), b(document, "dragover", mt), b(document, "mousemove", mt), b(document, "touchmove", mt);
|
|
1491
1513
|
},
|
|
1492
1514
|
_offUpEvents: function() {
|
|
1493
1515
|
var t = this.el.ownerDocument;
|
|
1494
|
-
|
|
1516
|
+
b(t, "mouseup", this._onDrop), b(t, "touchend", this._onDrop), b(t, "pointerup", this._onDrop), b(t, "touchcancel", this._onDrop), b(document, "selectstart", this);
|
|
1495
1517
|
},
|
|
1496
1518
|
_onDrop: function(t) {
|
|
1497
1519
|
var e = this.el, i = this.options;
|
|
1498
|
-
if (
|
|
1520
|
+
if (B = Z(u), st = Z(u, i.draggable), k("drop", this, {
|
|
1499
1521
|
evt: t
|
|
1500
|
-
}),
|
|
1522
|
+
}), A = u && u.parentNode, B = Z(u), st = Z(u, i.draggable), f.eventCanceled) {
|
|
1501
1523
|
this._nulling();
|
|
1502
1524
|
return;
|
|
1503
1525
|
}
|
|
1504
|
-
|
|
1526
|
+
xt = !1, Qt = !1, zt = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Ye(this.cloneId), Ye(this._dragStartId), this.nativeDraggable && (b(document, "drop", this), b(e, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Bt && p(document.body, "user-select", ""), p(u, "transform", ""), t && (Nt && (t.cancelable && t.preventDefault(), !i.dropBubble && t.stopPropagation()), m && m.parentNode && m.parentNode.removeChild(m), (x === A || D && D.lastPutMode !== "clone") && S && S.parentNode && S.parentNode.removeChild(S), u && (this.nativeDraggable && b(u, "dragend", this), Be(u), u.style["will-change"] = "", Nt && !xt && R(u, D ? D.options.ghostClass : this.options.ghostClass, !1), R(u, this.options.chosenClass, !1), L({
|
|
1505
1527
|
sortable: this,
|
|
1506
1528
|
name: "unchoose",
|
|
1507
|
-
toEl:
|
|
1529
|
+
toEl: A,
|
|
1508
1530
|
newIndex: null,
|
|
1509
1531
|
newDraggableIndex: null,
|
|
1510
1532
|
originalEvent: t
|
|
1511
|
-
}), x !==
|
|
1512
|
-
rootEl:
|
|
1533
|
+
}), x !== A ? (B >= 0 && (L({
|
|
1534
|
+
rootEl: A,
|
|
1513
1535
|
name: "add",
|
|
1514
|
-
toEl:
|
|
1536
|
+
toEl: A,
|
|
1515
1537
|
fromEl: x,
|
|
1516
1538
|
originalEvent: t
|
|
1517
|
-
}),
|
|
1539
|
+
}), L({
|
|
1518
1540
|
sortable: this,
|
|
1519
1541
|
name: "remove",
|
|
1520
|
-
toEl:
|
|
1542
|
+
toEl: A,
|
|
1521
1543
|
originalEvent: t
|
|
1522
|
-
}),
|
|
1523
|
-
rootEl:
|
|
1544
|
+
}), L({
|
|
1545
|
+
rootEl: A,
|
|
1524
1546
|
name: "sort",
|
|
1525
|
-
toEl:
|
|
1547
|
+
toEl: A,
|
|
1526
1548
|
fromEl: x,
|
|
1527
1549
|
originalEvent: t
|
|
1528
|
-
}),
|
|
1550
|
+
}), L({
|
|
1529
1551
|
sortable: this,
|
|
1530
1552
|
name: "sort",
|
|
1531
|
-
toEl:
|
|
1553
|
+
toEl: A,
|
|
1532
1554
|
originalEvent: t
|
|
1533
|
-
})), D && D.save()) :
|
|
1555
|
+
})), D && D.save()) : B !== St && B >= 0 && (L({
|
|
1534
1556
|
sortable: this,
|
|
1535
1557
|
name: "update",
|
|
1536
|
-
toEl:
|
|
1558
|
+
toEl: A,
|
|
1537
1559
|
originalEvent: t
|
|
1538
|
-
}),
|
|
1560
|
+
}), L({
|
|
1539
1561
|
sortable: this,
|
|
1540
1562
|
name: "sort",
|
|
1541
|
-
toEl:
|
|
1563
|
+
toEl: A,
|
|
1542
1564
|
originalEvent: t
|
|
1543
|
-
})),
|
|
1565
|
+
})), f.active && ((B == null || B === -1) && (B = St, st = Zt), L({
|
|
1544
1566
|
sortable: this,
|
|
1545
1567
|
name: "end",
|
|
1546
|
-
toEl:
|
|
1568
|
+
toEl: A,
|
|
1547
1569
|
originalEvent: t
|
|
1548
1570
|
}), this.save()))), this._nulling();
|
|
1549
1571
|
},
|
|
1550
1572
|
_nulling: function() {
|
|
1551
|
-
k("nulling", this), x =
|
|
1573
|
+
k("nulling", this), x = u = A = m = vt = S = ne = lt = gt = Y = Nt = B = st = St = Zt = _t = Ft = D = Jt = f.dragged = f.ghost = f.clone = f.active = null, pe.forEach(function(t) {
|
|
1552
1574
|
t.checked = !0;
|
|
1553
|
-
}),
|
|
1575
|
+
}), pe.length = Ie = Ve = 0;
|
|
1554
1576
|
},
|
|
1555
1577
|
handleEvent: function(t) {
|
|
1556
1578
|
switch (t.type) {
|
|
@@ -1560,7 +1582,7 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1560
1582
|
break;
|
|
1561
1583
|
case "dragenter":
|
|
1562
1584
|
case "dragover":
|
|
1563
|
-
|
|
1585
|
+
u && (this._onDragOver(t), Wo(t));
|
|
1564
1586
|
break;
|
|
1565
1587
|
case "selectstart":
|
|
1566
1588
|
t.preventDefault();
|
|
@@ -1572,8 +1594,8 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1572
1594
|
* @returns {String[]}
|
|
1573
1595
|
*/
|
|
1574
1596
|
toArray: function() {
|
|
1575
|
-
for (var t = [], e, i = this.el.children,
|
|
1576
|
-
e = i[
|
|
1597
|
+
for (var t = [], e, i = this.el.children, n = 0, r = i.length, s = this.options; n < r; n++)
|
|
1598
|
+
e = i[n], j(e, s.draggable, this.el, !1) && t.push(e.getAttribute(s.dataIdAttr) || tn(e));
|
|
1577
1599
|
return t;
|
|
1578
1600
|
},
|
|
1579
1601
|
/**
|
|
@@ -1581,12 +1603,12 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1581
1603
|
* @param {String[]} order order of the items
|
|
1582
1604
|
*/
|
|
1583
1605
|
sort: function(t, e) {
|
|
1584
|
-
var i = {},
|
|
1606
|
+
var i = {}, n = this.el;
|
|
1585
1607
|
this.toArray().forEach(function(r, s) {
|
|
1586
|
-
var l =
|
|
1587
|
-
|
|
1608
|
+
var l = n.children[s];
|
|
1609
|
+
j(l, this.options.draggable, n, !1) && (i[r] = l);
|
|
1588
1610
|
}, this), e && this.captureAnimationState(), t.forEach(function(r) {
|
|
1589
|
-
i[r] && (
|
|
1611
|
+
i[r] && (n.removeChild(i[r]), n.appendChild(i[r]));
|
|
1590
1612
|
}), e && this.animateAll();
|
|
1591
1613
|
},
|
|
1592
1614
|
/**
|
|
@@ -1603,7 +1625,7 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1603
1625
|
* @returns {HTMLElement|null}
|
|
1604
1626
|
*/
|
|
1605
1627
|
closest: function(t, e) {
|
|
1606
|
-
return
|
|
1628
|
+
return j(t, e || this.options.draggable, this.el, !1);
|
|
1607
1629
|
},
|
|
1608
1630
|
/**
|
|
1609
1631
|
* Set/get option
|
|
@@ -1615,8 +1637,8 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1615
1637
|
var i = this.options;
|
|
1616
1638
|
if (e === void 0)
|
|
1617
1639
|
return i[t];
|
|
1618
|
-
var
|
|
1619
|
-
typeof
|
|
1640
|
+
var n = Gt.modifyOption(this, t, e);
|
|
1641
|
+
typeof n < "u" ? i[t] = n : i[t] = e, t === "group" && Zi(i);
|
|
1620
1642
|
},
|
|
1621
1643
|
/**
|
|
1622
1644
|
* Destroy
|
|
@@ -1624,15 +1646,15 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1624
1646
|
destroy: function() {
|
|
1625
1647
|
k("destroy", this);
|
|
1626
1648
|
var t = this.el;
|
|
1627
|
-
t[U] = null,
|
|
1649
|
+
t[U] = null, b(t, "mousedown", this._onTapStart), b(t, "touchstart", this._onTapStart), b(t, "pointerdown", this._onTapStart), this.nativeDraggable && (b(t, "dragover", this), b(t, "dragenter", this)), Array.prototype.forEach.call(t.querySelectorAll("[draggable]"), function(e) {
|
|
1628
1650
|
e.removeAttribute("draggable");
|
|
1629
1651
|
}), this._onDrop(), this._disableDelayedDragEvents(), ce.splice(ce.indexOf(this.el), 1), this.el = t = null;
|
|
1630
1652
|
},
|
|
1631
1653
|
_hideClone: function() {
|
|
1632
1654
|
if (!lt) {
|
|
1633
|
-
if (k("hideClone", this),
|
|
1655
|
+
if (k("hideClone", this), f.eventCanceled)
|
|
1634
1656
|
return;
|
|
1635
|
-
|
|
1657
|
+
p(S, "display", "none"), this.options.removeCloneOnHide && S.parentNode && S.parentNode.removeChild(S), lt = !0;
|
|
1636
1658
|
}
|
|
1637
1659
|
},
|
|
1638
1660
|
_showClone: function(t) {
|
|
@@ -1641,111 +1663,111 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1641
1663
|
return;
|
|
1642
1664
|
}
|
|
1643
1665
|
if (lt) {
|
|
1644
|
-
if (k("showClone", this),
|
|
1666
|
+
if (k("showClone", this), f.eventCanceled)
|
|
1645
1667
|
return;
|
|
1646
|
-
|
|
1668
|
+
u.parentNode == x && !this.options.group.revertClone ? x.insertBefore(S, u) : vt ? x.insertBefore(S, vt) : x.appendChild(S), this.options.group.revertClone && this.animate(u, S), p(S, "display", ""), lt = !1;
|
|
1647
1669
|
}
|
|
1648
1670
|
}
|
|
1649
1671
|
};
|
|
1650
|
-
function
|
|
1651
|
-
|
|
1672
|
+
function Wo(o) {
|
|
1673
|
+
o.dataTransfer && (o.dataTransfer.dropEffect = "move"), o.cancelable && o.preventDefault();
|
|
1652
1674
|
}
|
|
1653
|
-
function
|
|
1654
|
-
var a,
|
|
1655
|
-
return window.CustomEvent && !
|
|
1675
|
+
function ee(o, t, e, i, n, r, s, l) {
|
|
1676
|
+
var a, h = o[U], c = h.options.onMove, d;
|
|
1677
|
+
return window.CustomEvent && !ot && !jt ? a = new CustomEvent("move", {
|
|
1656
1678
|
bubbles: !0,
|
|
1657
1679
|
cancelable: !0
|
|
1658
|
-
}) : (a = document.createEvent("Event"), a.initEvent("move", !0, !0)), a.to = t, a.from =
|
|
1680
|
+
}) : (a = document.createEvent("Event"), a.initEvent("move", !0, !0)), a.to = t, a.from = o, a.dragged = e, a.draggedRect = i, a.related = n || t, a.relatedRect = r || T(t), a.willInsertAfter = l, a.originalEvent = s, o.dispatchEvent(a), c && (d = c.call(h, a, s)), d;
|
|
1659
1681
|
}
|
|
1660
|
-
function
|
|
1661
|
-
|
|
1682
|
+
function Be(o) {
|
|
1683
|
+
o.draggable = !1;
|
|
1662
1684
|
}
|
|
1663
|
-
function
|
|
1664
|
-
|
|
1685
|
+
function jo() {
|
|
1686
|
+
Xe = !1;
|
|
1665
1687
|
}
|
|
1666
|
-
function
|
|
1667
|
-
var i = T(Tt(e.el, 0, e.options, !0)),
|
|
1668
|
-
return t ?
|
|
1688
|
+
function Go(o, t, e) {
|
|
1689
|
+
var i = T(Tt(e.el, 0, e.options, !0)), n = 10;
|
|
1690
|
+
return t ? o.clientX < i.left - n || o.clientY < i.top && o.clientX < i.right : o.clientY < i.top - n || o.clientY < i.bottom && o.clientX < i.left;
|
|
1669
1691
|
}
|
|
1670
|
-
function
|
|
1671
|
-
var i = T(
|
|
1672
|
-
return t ?
|
|
1692
|
+
function Ko(o, t, e) {
|
|
1693
|
+
var i = T(ti(e.el, e.options.draggable)), n = 10;
|
|
1694
|
+
return t ? o.clientX > i.right + n || o.clientX <= i.right && o.clientY > i.bottom && o.clientX >= i.left : o.clientX > i.right && o.clientY > i.top || o.clientX <= i.right && o.clientY > i.bottom + n;
|
|
1673
1695
|
}
|
|
1674
|
-
function
|
|
1675
|
-
var a = i ?
|
|
1696
|
+
function Jo(o, t, e, i, n, r, s, l) {
|
|
1697
|
+
var a = i ? o.clientY : o.clientX, h = i ? e.height : e.width, c = i ? e.top : e.left, d = i ? e.bottom : e.right, g = !1;
|
|
1676
1698
|
if (!s) {
|
|
1677
|
-
if (l &&
|
|
1678
|
-
if (!
|
|
1679
|
-
|
|
1680
|
-
else if (
|
|
1681
|
-
return -
|
|
1682
|
-
} else if (a >
|
|
1683
|
-
return
|
|
1699
|
+
if (l && re < h * n) {
|
|
1700
|
+
if (!zt && (Ft === 1 ? a > c + h * r / 2 : a < d - h * r / 2) && (zt = !0), zt)
|
|
1701
|
+
g = !0;
|
|
1702
|
+
else if (Ft === 1 ? a < c + re : a > d - re)
|
|
1703
|
+
return -Ft;
|
|
1704
|
+
} else if (a > c + h * (1 - n) / 2 && a < d - h * (1 - n) / 2)
|
|
1705
|
+
return Qo(t);
|
|
1684
1706
|
}
|
|
1685
|
-
return
|
|
1707
|
+
return g = g || s, g && (a < c + h * r / 2 || a > d - h * r / 2) ? a > c + h / 2 ? 1 : -1 : 0;
|
|
1686
1708
|
}
|
|
1687
|
-
function
|
|
1688
|
-
return
|
|
1709
|
+
function Qo(o) {
|
|
1710
|
+
return Z(u) < Z(o) ? 1 : -1;
|
|
1689
1711
|
}
|
|
1690
|
-
function
|
|
1691
|
-
for (var t =
|
|
1712
|
+
function tn(o) {
|
|
1713
|
+
for (var t = o.tagName + o.className + o.src + o.href + o.textContent, e = t.length, i = 0; e--; )
|
|
1692
1714
|
i += t.charCodeAt(e);
|
|
1693
1715
|
return i.toString(36);
|
|
1694
1716
|
}
|
|
1695
|
-
function
|
|
1696
|
-
|
|
1697
|
-
for (var t =
|
|
1717
|
+
function en(o) {
|
|
1718
|
+
pe.length = 0;
|
|
1719
|
+
for (var t = o.getElementsByTagName("input"), e = t.length; e--; ) {
|
|
1698
1720
|
var i = t[e];
|
|
1699
|
-
i.checked &&
|
|
1721
|
+
i.checked && pe.push(i);
|
|
1700
1722
|
}
|
|
1701
1723
|
}
|
|
1702
|
-
function
|
|
1703
|
-
return setTimeout(
|
|
1724
|
+
function se(o) {
|
|
1725
|
+
return setTimeout(o, 0);
|
|
1704
1726
|
}
|
|
1705
|
-
function
|
|
1706
|
-
return clearTimeout(
|
|
1727
|
+
function Ye(o) {
|
|
1728
|
+
return clearTimeout(o);
|
|
1707
1729
|
}
|
|
1708
|
-
|
|
1709
|
-
(
|
|
1730
|
+
Oe && w(document, "touchmove", function(o) {
|
|
1731
|
+
(f.active || xt) && o.cancelable && o.preventDefault();
|
|
1710
1732
|
});
|
|
1711
|
-
|
|
1733
|
+
f.utils = {
|
|
1712
1734
|
on: w,
|
|
1713
|
-
off:
|
|
1714
|
-
css:
|
|
1715
|
-
find:
|
|
1735
|
+
off: b,
|
|
1736
|
+
css: p,
|
|
1737
|
+
find: ki,
|
|
1716
1738
|
is: function(t, e) {
|
|
1717
|
-
return !!
|
|
1739
|
+
return !!j(t, e, t, !1);
|
|
1718
1740
|
},
|
|
1719
|
-
extend:
|
|
1720
|
-
throttle:
|
|
1721
|
-
closest:
|
|
1722
|
-
toggleClass:
|
|
1723
|
-
clone:
|
|
1724
|
-
index:
|
|
1725
|
-
nextTick:
|
|
1726
|
-
cancelNextTick:
|
|
1727
|
-
detectDirection:
|
|
1741
|
+
extend: Io,
|
|
1742
|
+
throttle: Ii,
|
|
1743
|
+
closest: j,
|
|
1744
|
+
toggleClass: R,
|
|
1745
|
+
clone: Ri,
|
|
1746
|
+
index: Z,
|
|
1747
|
+
nextTick: se,
|
|
1748
|
+
cancelNextTick: Ye,
|
|
1749
|
+
detectDirection: Ui,
|
|
1728
1750
|
getChild: Tt
|
|
1729
1751
|
};
|
|
1730
|
-
|
|
1731
|
-
return
|
|
1752
|
+
f.get = function(o) {
|
|
1753
|
+
return o[U];
|
|
1732
1754
|
};
|
|
1733
|
-
|
|
1734
|
-
for (var
|
|
1755
|
+
f.mount = function() {
|
|
1756
|
+
for (var o = arguments.length, t = new Array(o), e = 0; e < o; e++)
|
|
1735
1757
|
t[e] = arguments[e];
|
|
1736
1758
|
t[0].constructor === Array && (t = t[0]), t.forEach(function(i) {
|
|
1737
1759
|
if (!i.prototype || !i.prototype.constructor)
|
|
1738
1760
|
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));
|
|
1739
|
-
i.utils && (
|
|
1761
|
+
i.utils && (f.utils = K(K({}, f.utils), i.utils)), Gt.mount(i);
|
|
1740
1762
|
});
|
|
1741
1763
|
};
|
|
1742
|
-
|
|
1743
|
-
return new
|
|
1764
|
+
f.create = function(o, t) {
|
|
1765
|
+
return new f(o, t);
|
|
1744
1766
|
};
|
|
1745
|
-
|
|
1746
|
-
var
|
|
1747
|
-
function
|
|
1748
|
-
function
|
|
1767
|
+
f.version = Lo;
|
|
1768
|
+
var C = [], kt, qe, We = !1, Ue, Ze, fe, It;
|
|
1769
|
+
function on() {
|
|
1770
|
+
function o() {
|
|
1749
1771
|
this.defaults = {
|
|
1750
1772
|
scroll: !0,
|
|
1751
1773
|
forceAutoScrollFallback: !1,
|
|
@@ -1756,7 +1778,7 @@ function Qn() {
|
|
|
1756
1778
|
for (var t in this)
|
|
1757
1779
|
t.charAt(0) === "_" && typeof this[t] == "function" && (this[t] = this[t].bind(this));
|
|
1758
1780
|
}
|
|
1759
|
-
return
|
|
1781
|
+
return o.prototype = {
|
|
1760
1782
|
dragStarted: function(e) {
|
|
1761
1783
|
var i = e.originalEvent;
|
|
1762
1784
|
this.sortable.nativeDraggable ? w(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? w(document, "pointermove", this._handleFallbackAutoScroll) : i.touches ? w(document, "touchmove", this._handleFallbackAutoScroll) : w(document, "mousemove", this._handleFallbackAutoScroll);
|
|
@@ -1766,81 +1788,81 @@ function Qn() {
|
|
|
1766
1788
|
!this.options.dragOverBubble && !i.rootEl && this._handleAutoScroll(i);
|
|
1767
1789
|
},
|
|
1768
1790
|
drop: function() {
|
|
1769
|
-
this.sortable.nativeDraggable ?
|
|
1791
|
+
this.sortable.nativeDraggable ? b(document, "dragover", this._handleAutoScroll) : (b(document, "pointermove", this._handleFallbackAutoScroll), b(document, "touchmove", this._handleFallbackAutoScroll), b(document, "mousemove", this._handleFallbackAutoScroll)), $i(), ae(), Vo();
|
|
1770
1792
|
},
|
|
1771
1793
|
nulling: function() {
|
|
1772
|
-
|
|
1794
|
+
fe = qe = kt = We = It = Ue = Ze = null, C.length = 0;
|
|
1773
1795
|
},
|
|
1774
1796
|
_handleFallbackAutoScroll: function(e) {
|
|
1775
1797
|
this._handleAutoScroll(e, !0);
|
|
1776
1798
|
},
|
|
1777
1799
|
_handleAutoScroll: function(e, i) {
|
|
1778
|
-
var
|
|
1779
|
-
if (
|
|
1780
|
-
|
|
1781
|
-
var a =
|
|
1782
|
-
|
|
1783
|
-
var
|
|
1784
|
-
|
|
1785
|
-
}, 10),
|
|
1800
|
+
var n = this, r = (e.touches ? e.touches[0] : e).clientX, s = (e.touches ? e.touches[0] : e).clientY, l = document.elementFromPoint(r, s);
|
|
1801
|
+
if (fe = e, i || this.options.forceAutoScrollFallback || jt || ot || Bt) {
|
|
1802
|
+
Fe(e, this.options, l, i);
|
|
1803
|
+
var a = ht(l, !0);
|
|
1804
|
+
We && (!It || r !== Ue || s !== Ze) && (It && $i(), It = setInterval(function() {
|
|
1805
|
+
var h = ht(document.elementFromPoint(r, s), !0);
|
|
1806
|
+
h !== a && (a = h, ae()), Fe(e, n.options, h, i);
|
|
1807
|
+
}, 10), Ue = r, Ze = s);
|
|
1786
1808
|
} else {
|
|
1787
|
-
if (!this.options.bubbleScroll ||
|
|
1788
|
-
|
|
1809
|
+
if (!this.options.bubbleScroll || ht(l, !0) === G()) {
|
|
1810
|
+
ae();
|
|
1789
1811
|
return;
|
|
1790
1812
|
}
|
|
1791
|
-
|
|
1813
|
+
Fe(e, this.options, ht(l, !1), !1);
|
|
1792
1814
|
}
|
|
1793
1815
|
}
|
|
1794
|
-
}, it(
|
|
1816
|
+
}, it(o, {
|
|
1795
1817
|
pluginName: "scroll",
|
|
1796
1818
|
initializeByDefault: !0
|
|
1797
1819
|
});
|
|
1798
1820
|
}
|
|
1799
|
-
function
|
|
1800
|
-
|
|
1801
|
-
clearInterval(
|
|
1802
|
-
}),
|
|
1821
|
+
function ae() {
|
|
1822
|
+
C.forEach(function(o) {
|
|
1823
|
+
clearInterval(o.pid);
|
|
1824
|
+
}), C = [];
|
|
1803
1825
|
}
|
|
1804
|
-
function
|
|
1805
|
-
clearInterval(
|
|
1826
|
+
function $i() {
|
|
1827
|
+
clearInterval(It);
|
|
1806
1828
|
}
|
|
1807
|
-
var
|
|
1829
|
+
var Fe = Ii(function(o, t, e, i) {
|
|
1808
1830
|
if (t.scroll) {
|
|
1809
|
-
var
|
|
1810
|
-
|
|
1811
|
-
var
|
|
1831
|
+
var n = (o.touches ? o.touches[0] : o).clientX, r = (o.touches ? o.touches[0] : o).clientY, s = t.scrollSensitivity, l = t.scrollSpeed, a = G(), h = !1, c;
|
|
1832
|
+
qe !== e && (qe = e, ae(), kt = t.scroll, c = t.scrollFn, kt === !0 && (kt = ht(e, !0)));
|
|
1833
|
+
var d = 0, g = kt;
|
|
1812
1834
|
do {
|
|
1813
|
-
var v =
|
|
1814
|
-
v === a ? (ut =
|
|
1815
|
-
var
|
|
1816
|
-
if (!
|
|
1817
|
-
for (var
|
|
1818
|
-
|
|
1819
|
-
(
|
|
1820
|
-
i && this.layer === 0 &&
|
|
1821
|
-
var
|
|
1822
|
-
typeof
|
|
1835
|
+
var v = g, y = T(v), E = y.top, z = y.bottom, J = y.left, P = y.right, X = y.width, I = y.height, ut = void 0, W = void 0, ct = v.scrollWidth, Dt = v.scrollHeight, V = p(v), Ot = v.scrollLeft, nt = v.scrollTop;
|
|
1836
|
+
v === a ? (ut = X < ct && (V.overflowX === "auto" || V.overflowX === "scroll" || V.overflowX === "visible"), W = I < Dt && (V.overflowY === "auto" || V.overflowY === "scroll" || V.overflowY === "visible")) : (ut = X < ct && (V.overflowX === "auto" || V.overflowX === "scroll"), W = I < Dt && (V.overflowY === "auto" || V.overflowY === "scroll"));
|
|
1837
|
+
var Pt = ut && (Math.abs(P - n) <= s && Ot + X < ct) - (Math.abs(J - n) <= s && !!Ot), Q = W && (Math.abs(z - r) <= s && nt + I < Dt) - (Math.abs(E - r) <= s && !!nt);
|
|
1838
|
+
if (!C[d])
|
|
1839
|
+
for (var pt = 0; pt <= d; pt++)
|
|
1840
|
+
C[pt] || (C[pt] = {});
|
|
1841
|
+
(C[d].vx != Pt || C[d].vy != Q || C[d].el !== v) && (C[d].el = v, C[d].vx = Pt, C[d].vy = Q, clearInterval(C[d].pid), (Pt != 0 || Q != 0) && (h = !0, C[d].pid = setInterval((function() {
|
|
1842
|
+
i && this.layer === 0 && f.active._onTouchMove(fe);
|
|
1843
|
+
var Ht = C[this.layer].vy ? C[this.layer].vy * l : 0, rt = C[this.layer].vx ? C[this.layer].vx * l : 0;
|
|
1844
|
+
typeof c == "function" && c.call(f.dragged.parentNode[U], rt, Ht, o, fe, C[this.layer].el) !== "continue" || Vi(C[this.layer].el, rt, Ht);
|
|
1823
1845
|
}).bind({
|
|
1824
|
-
layer:
|
|
1825
|
-
}), 24))),
|
|
1826
|
-
} while (t.bubbleScroll &&
|
|
1827
|
-
|
|
1846
|
+
layer: d
|
|
1847
|
+
}), 24))), d++;
|
|
1848
|
+
} while (t.bubbleScroll && g !== a && (g = ht(g, !1)));
|
|
1849
|
+
We = h;
|
|
1828
1850
|
}
|
|
1829
|
-
}, 30),
|
|
1830
|
-
var e = t.originalEvent, i = t.putSortable,
|
|
1851
|
+
}, 30), Xi = function(t) {
|
|
1852
|
+
var e = t.originalEvent, i = t.putSortable, n = t.dragEl, r = t.activeSortable, s = t.dispatchSortableEvent, l = t.hideGhostForTarget, a = t.unhideGhostForTarget;
|
|
1831
1853
|
if (e) {
|
|
1832
|
-
var
|
|
1854
|
+
var h = i || r;
|
|
1833
1855
|
l();
|
|
1834
|
-
var
|
|
1835
|
-
a(),
|
|
1836
|
-
dragEl:
|
|
1856
|
+
var c = e.changedTouches && e.changedTouches.length ? e.changedTouches[0] : e, d = document.elementFromPoint(c.clientX, c.clientY);
|
|
1857
|
+
a(), h && !h.el.contains(d) && (s("spill"), this.onSpill({
|
|
1858
|
+
dragEl: n,
|
|
1837
1859
|
putSortable: i
|
|
1838
1860
|
}));
|
|
1839
1861
|
}
|
|
1840
1862
|
};
|
|
1841
|
-
function
|
|
1863
|
+
function ei() {
|
|
1842
1864
|
}
|
|
1843
|
-
|
|
1865
|
+
ei.prototype = {
|
|
1844
1866
|
startIndex: null,
|
|
1845
1867
|
dragStart: function(t) {
|
|
1846
1868
|
var e = t.oldDraggableIndex;
|
|
@@ -1849,110 +1871,120 @@ oi.prototype = {
|
|
|
1849
1871
|
onSpill: function(t) {
|
|
1850
1872
|
var e = t.dragEl, i = t.putSortable;
|
|
1851
1873
|
this.sortable.captureAnimationState(), i && i.captureAnimationState();
|
|
1852
|
-
var
|
|
1853
|
-
|
|
1874
|
+
var n = Tt(this.sortable.el, this.startIndex, this.options);
|
|
1875
|
+
n ? this.sortable.el.insertBefore(e, n) : this.sortable.el.appendChild(e), this.sortable.animateAll(), i && i.animateAll();
|
|
1854
1876
|
},
|
|
1855
|
-
drop:
|
|
1877
|
+
drop: Xi
|
|
1856
1878
|
};
|
|
1857
|
-
it(
|
|
1879
|
+
it(ei, {
|
|
1858
1880
|
pluginName: "revertOnSpill"
|
|
1859
1881
|
});
|
|
1860
|
-
function
|
|
1882
|
+
function ii() {
|
|
1861
1883
|
}
|
|
1862
|
-
|
|
1884
|
+
ii.prototype = {
|
|
1863
1885
|
onSpill: function(t) {
|
|
1864
|
-
var e = t.dragEl, i = t.putSortable,
|
|
1865
|
-
|
|
1886
|
+
var e = t.dragEl, i = t.putSortable, n = i || this.sortable;
|
|
1887
|
+
n.captureAnimationState(), e.parentNode && e.parentNode.removeChild(e), n.animateAll();
|
|
1866
1888
|
},
|
|
1867
|
-
drop:
|
|
1889
|
+
drop: Xi
|
|
1868
1890
|
};
|
|
1869
|
-
it(
|
|
1891
|
+
it(ii, {
|
|
1870
1892
|
pluginName: "removeOnSpill"
|
|
1871
1893
|
});
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
const
|
|
1894
|
+
f.mount(new on());
|
|
1895
|
+
f.mount(ii, ei);
|
|
1896
|
+
const nn = (o, t, e) => {
|
|
1875
1897
|
let i = [];
|
|
1876
|
-
|
|
1898
|
+
o._sortable = f.create(o, {
|
|
1877
1899
|
handle: ".drag-handle",
|
|
1878
1900
|
filter: ".drag-handle.disabled",
|
|
1879
1901
|
swapThreshold: 0.5,
|
|
1880
1902
|
animation: 150,
|
|
1881
1903
|
easing: "cubic-bezier(1, 0, 0, 1)",
|
|
1882
|
-
onStart: (
|
|
1883
|
-
const r =
|
|
1904
|
+
onStart: (n) => {
|
|
1905
|
+
const r = n.item;
|
|
1884
1906
|
i = Array.prototype.slice.call(r.parentNode.childNodes), i = i.filter(
|
|
1885
1907
|
(s) => s.nodeType != Node.ELEMENT_NODE || !s.classList.contains("sortable-fallback")
|
|
1886
1908
|
);
|
|
1887
1909
|
},
|
|
1888
|
-
onEnd: (
|
|
1889
|
-
const s =
|
|
1910
|
+
onEnd: (n) => {
|
|
1911
|
+
const s = n.item.parentNode;
|
|
1890
1912
|
for (const a of i)
|
|
1891
1913
|
s.appendChild(a);
|
|
1892
|
-
if (
|
|
1914
|
+
if (n.oldIndex == n.newIndex)
|
|
1893
1915
|
return;
|
|
1894
1916
|
const l = t.getArray().find(
|
|
1895
1917
|
(a) => (
|
|
1896
1918
|
// @ts-ignore
|
|
1897
1919
|
a.ol_uid === /** @type Element & {layer: import("ol/layer").Layer} */
|
|
1898
|
-
|
|
1920
|
+
n.item.querySelector("eox-layercontrol-layer").layer.ol_uid
|
|
1899
1921
|
)
|
|
1900
1922
|
);
|
|
1901
|
-
t.remove(l), t.insertAt(t.getLength() -
|
|
1923
|
+
t.remove(l), t.insertAt(t.getLength() - n.newIndex, l), e.requestUpdate();
|
|
1902
1924
|
}
|
|
1903
1925
|
});
|
|
1904
|
-
},
|
|
1926
|
+
}, je = (o, t, e) => {
|
|
1905
1927
|
let i = [];
|
|
1906
|
-
const
|
|
1907
|
-
i = [...i, ...r.filter((
|
|
1908
|
-
const a = r.filter((
|
|
1928
|
+
const n = (r, s, l) => {
|
|
1929
|
+
i = [...i, ...r.filter((h) => h.get(s) === l)];
|
|
1930
|
+
const a = r.filter((h) => h.getLayers);
|
|
1909
1931
|
return a.length > 0 && a.forEach(
|
|
1910
|
-
(
|
|
1932
|
+
(h) => n(h.getLayers().getArray(), s, l)
|
|
1911
1933
|
), i;
|
|
1912
1934
|
};
|
|
1913
|
-
return o
|
|
1914
|
-
},
|
|
1915
|
-
var e, i,
|
|
1916
|
-
if (!(!
|
|
1935
|
+
return n(o, t, e), i;
|
|
1936
|
+
}, rn = (o, t) => {
|
|
1937
|
+
var e, i, n;
|
|
1938
|
+
if (!(!o || !t))
|
|
1917
1939
|
return (
|
|
1918
1940
|
/** @type {import("ol/layer").Group} */
|
|
1919
|
-
|
|
1941
|
+
o.getLayers ? "group" : (n = (e = t.getInteractions().getArray().filter((r) => r.freehand_ !== void 0).map((r) => r.source_)) == null ? void 0 : e.ol_uid) != null && n.includes(
|
|
1920
1942
|
// @ts-ignore
|
|
1921
|
-
|
|
1943
|
+
o.getSource ? (i = o.getSource()) == null ? void 0 : i.ol_uid : void 0
|
|
1922
1944
|
) ? "draw" : (
|
|
1923
1945
|
// @ts-ignore
|
|
1924
|
-
|
|
1946
|
+
o.declutter_ !== void 0 ? "vector" : "raster"
|
|
1925
1947
|
)
|
|
1926
1948
|
);
|
|
1949
|
+
}, Yi = (o, t) => {
|
|
1950
|
+
const e = o.get("minZoom"), i = o.get("maxZoom");
|
|
1951
|
+
return !!(t && (e !== -1 / 0 || i !== 1 / 0));
|
|
1952
|
+
}, sn = (o, t, e) => {
|
|
1953
|
+
if (!o || !t)
|
|
1954
|
+
return !1;
|
|
1955
|
+
if (!Yi(o, e))
|
|
1956
|
+
return !0;
|
|
1957
|
+
const i = o.get("minZoom"), n = o.get("maxZoom"), r = t.getView().getZoom();
|
|
1958
|
+
return r > i && r < n;
|
|
1927
1959
|
};
|
|
1928
1960
|
/**
|
|
1929
1961
|
* @license
|
|
1930
1962
|
* Copyright 2020 Google LLC
|
|
1931
1963
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1932
1964
|
*/
|
|
1933
|
-
const
|
|
1934
|
-
constructor(
|
|
1935
|
-
if (super(
|
|
1965
|
+
const oi = Je(class extends Qe {
|
|
1966
|
+
constructor(o) {
|
|
1967
|
+
if (super(o), o.type !== yt.PROPERTY && o.type !== yt.ATTRIBUTE && o.type !== yt.BOOLEAN_ATTRIBUTE)
|
|
1936
1968
|
throw Error("The `live` directive is not allowed on child or event bindings");
|
|
1937
|
-
if (!
|
|
1969
|
+
if (!To(o))
|
|
1938
1970
|
throw Error("`live` bindings can only contain a single expression");
|
|
1939
1971
|
}
|
|
1940
|
-
render(
|
|
1941
|
-
return
|
|
1972
|
+
render(o) {
|
|
1973
|
+
return o;
|
|
1942
1974
|
}
|
|
1943
|
-
update(
|
|
1975
|
+
update(o, [t]) {
|
|
1944
1976
|
if (t === q || t === $)
|
|
1945
1977
|
return t;
|
|
1946
|
-
const e =
|
|
1947
|
-
if (
|
|
1978
|
+
const e = o.element, i = o.name;
|
|
1979
|
+
if (o.type === yt.PROPERTY) {
|
|
1948
1980
|
if (t === e[i])
|
|
1949
1981
|
return q;
|
|
1950
|
-
} else if (
|
|
1982
|
+
} else if (o.type === yt.BOOLEAN_ATTRIBUTE) {
|
|
1951
1983
|
if (!!t === e.hasAttribute(i))
|
|
1952
1984
|
return q;
|
|
1953
|
-
} else if (
|
|
1985
|
+
} else if (o.type === yt.ATTRIBUTE && e.getAttribute(i) === t + "")
|
|
1954
1986
|
return q;
|
|
1955
|
-
return
|
|
1987
|
+
return Hi(o), t;
|
|
1956
1988
|
}
|
|
1957
1989
|
});
|
|
1958
1990
|
/**
|
|
@@ -1960,67 +1992,70 @@ const si = ei(class extends ii {
|
|
|
1960
1992
|
* Copyright 2017 Google LLC
|
|
1961
1993
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1962
1994
|
*/
|
|
1963
|
-
class
|
|
1995
|
+
class Ge extends Qe {
|
|
1964
1996
|
constructor(t) {
|
|
1965
|
-
if (super(t), this.et = $, t.type !==
|
|
1997
|
+
if (super(t), this.et = $, t.type !== yt.CHILD)
|
|
1966
1998
|
throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
1967
1999
|
}
|
|
1968
2000
|
render(t) {
|
|
1969
2001
|
if (t === $ || t == null)
|
|
1970
|
-
return this.
|
|
2002
|
+
return this.vt = void 0, this.et = t;
|
|
1971
2003
|
if (t === q)
|
|
1972
2004
|
return t;
|
|
1973
2005
|
if (typeof t != "string")
|
|
1974
2006
|
throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
1975
2007
|
if (t === this.et)
|
|
1976
|
-
return this.
|
|
2008
|
+
return this.vt;
|
|
1977
2009
|
this.et = t;
|
|
1978
2010
|
const e = [t];
|
|
1979
|
-
return e.raw = e, this.
|
|
2011
|
+
return e.raw = e, this.vt = { _$litType$: this.constructor.resultType, strings: e, values: [] };
|
|
1980
2012
|
}
|
|
1981
2013
|
}
|
|
1982
|
-
|
|
1983
|
-
const
|
|
2014
|
+
Ge.directiveName = "unsafeHTML", Ge.resultType = 1;
|
|
2015
|
+
const an = Je(Ge);
|
|
1984
2016
|
/**
|
|
1985
2017
|
* @license
|
|
1986
2018
|
* Copyright 2021 Google LLC
|
|
1987
2019
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1988
2020
|
*/
|
|
1989
|
-
function*
|
|
1990
|
-
if (
|
|
2021
|
+
function* le(o, t) {
|
|
2022
|
+
if (o !== void 0) {
|
|
1991
2023
|
let e = 0;
|
|
1992
|
-
for (const i of
|
|
2024
|
+
for (const i of o)
|
|
1993
2025
|
yield t(i, e++);
|
|
1994
2026
|
}
|
|
1995
2027
|
}
|
|
1996
|
-
var
|
|
1997
|
-
class
|
|
2028
|
+
var ge, me;
|
|
2029
|
+
class qi extends F {
|
|
1998
2030
|
constructor() {
|
|
1999
2031
|
super();
|
|
2000
|
-
M(this, fe, "");
|
|
2001
2032
|
M(this, ge, "");
|
|
2002
|
-
this
|
|
2033
|
+
M(this, me, "");
|
|
2034
|
+
this.layer = null, this.unstyled = !1, this.noShadow = !0;
|
|
2035
|
+
}
|
|
2036
|
+
createRenderRoot() {
|
|
2037
|
+
return this.noShadow ? this : super.createRenderRoot();
|
|
2003
2038
|
}
|
|
2004
2039
|
render() {
|
|
2005
2040
|
var e;
|
|
2006
2041
|
return _`
|
|
2007
2042
|
<style>
|
|
2008
|
-
${
|
|
2009
|
-
${!this.unstyled &&
|
|
2043
|
+
${H(this, ge)}
|
|
2044
|
+
${!this.unstyled && H(this, me)}
|
|
2010
2045
|
</style>
|
|
2011
2046
|
<input
|
|
2012
2047
|
type="range"
|
|
2013
2048
|
min="0"
|
|
2014
2049
|
max="1"
|
|
2015
2050
|
step="0.01"
|
|
2016
|
-
value=${
|
|
2051
|
+
value=${oi((e = this.layer) == null ? void 0 : e.getOpacity())}
|
|
2017
2052
|
@input=${(i) => this.layer.setOpacity(parseFloat(i.target.value))}
|
|
2018
2053
|
/>
|
|
2019
2054
|
<button
|
|
2020
2055
|
class="delete"
|
|
2021
2056
|
@click=${() => {
|
|
2022
|
-
var i,
|
|
2023
|
-
(i = this.layer) == null || i.set("layerControlOptional", !0), (
|
|
2057
|
+
var i, n;
|
|
2058
|
+
(i = this.layer) == null || i.set("layerControlOptional", !0), (n = this.layer) == null || n.setVisible(!1), this.dispatchEvent(
|
|
2024
2059
|
new CustomEvent("changed", { detail: this.layer, bubbles: !0 })
|
|
2025
2060
|
);
|
|
2026
2061
|
}}
|
|
@@ -2030,19 +2065,20 @@ class Zi extends z {
|
|
|
2030
2065
|
`;
|
|
2031
2066
|
}
|
|
2032
2067
|
}
|
|
2033
|
-
|
|
2068
|
+
ge = new WeakMap(), me = new WeakMap(), N(qi, "properties", {
|
|
2034
2069
|
layer: { attribute: !1 },
|
|
2035
|
-
unstyled: { type: Boolean }
|
|
2070
|
+
unstyled: { type: Boolean },
|
|
2071
|
+
noShadow: { type: Boolean }
|
|
2036
2072
|
});
|
|
2037
2073
|
customElements.define(
|
|
2038
2074
|
"eox-layercontrol-layerconfig",
|
|
2039
|
-
|
|
2075
|
+
qi
|
|
2040
2076
|
);
|
|
2041
|
-
var
|
|
2042
|
-
class
|
|
2077
|
+
var ye, ve;
|
|
2078
|
+
class Wi extends F {
|
|
2043
2079
|
constructor() {
|
|
2044
2080
|
super();
|
|
2045
|
-
M(this,
|
|
2081
|
+
M(this, ye, `
|
|
2046
2082
|
.tabbed figure {
|
|
2047
2083
|
margin: 0;
|
|
2048
2084
|
}
|
|
@@ -2084,13 +2120,16 @@ class Gi extends z {
|
|
|
2084
2120
|
border-top: 1px solid #0041701a;
|
|
2085
2121
|
}
|
|
2086
2122
|
`);
|
|
2087
|
-
this.actions = [], this.selectedTab = 0, this.tabs = [], this.unstyled = !1;
|
|
2123
|
+
this.actions = [], this.selectedTab = 0, this.tabs = [], this.unstyled = !1, this.noShadow = !0;
|
|
2124
|
+
}
|
|
2125
|
+
createRenderRoot() {
|
|
2126
|
+
return this.noShadow ? this : super.createRenderRoot();
|
|
2088
2127
|
}
|
|
2089
2128
|
render() {
|
|
2090
2129
|
return _`
|
|
2091
2130
|
<style>
|
|
2092
|
-
${
|
|
2093
|
-
${!this.unstyled &&
|
|
2131
|
+
${H(this, ye)}
|
|
2132
|
+
${!this.unstyled && H(this, ve)}
|
|
2094
2133
|
</style>
|
|
2095
2134
|
<div class="tabbed">
|
|
2096
2135
|
${et(
|
|
@@ -2098,7 +2137,7 @@ class Gi extends z {
|
|
|
2098
2137
|
() => _`
|
|
2099
2138
|
<nav>
|
|
2100
2139
|
<div>
|
|
2101
|
-
${
|
|
2140
|
+
${le(
|
|
2102
2141
|
this.tabs,
|
|
2103
2142
|
(e, i) => _`
|
|
2104
2143
|
<label
|
|
@@ -2111,7 +2150,7 @@ class Gi extends z {
|
|
|
2111
2150
|
)}
|
|
2112
2151
|
</div>
|
|
2113
2152
|
<div>
|
|
2114
|
-
${
|
|
2153
|
+
${le(
|
|
2115
2154
|
this.actions,
|
|
2116
2155
|
(e) => _`
|
|
2117
2156
|
<span>
|
|
@@ -2124,7 +2163,7 @@ class Gi extends z {
|
|
|
2124
2163
|
`
|
|
2125
2164
|
)}
|
|
2126
2165
|
<figure>
|
|
2127
|
-
${
|
|
2166
|
+
${le(
|
|
2128
2167
|
this.tabs,
|
|
2129
2168
|
(e, i) => _`
|
|
2130
2169
|
<div class="tab ${this.selectedTab === i && "highlighted"}">
|
|
@@ -2137,14 +2176,15 @@ class Gi extends z {
|
|
|
2137
2176
|
`;
|
|
2138
2177
|
}
|
|
2139
2178
|
}
|
|
2140
|
-
|
|
2179
|
+
ye = new WeakMap(), ve = new WeakMap(), N(Wi, "properties", {
|
|
2141
2180
|
actions: { attribute: !1 },
|
|
2142
2181
|
selectedTab: { state: !0 },
|
|
2143
2182
|
tabs: { attribute: !1 },
|
|
2144
|
-
unstyled: { type: Boolean }
|
|
2183
|
+
unstyled: { type: Boolean },
|
|
2184
|
+
noShadow: { type: Boolean }
|
|
2145
2185
|
});
|
|
2146
|
-
customElements.define("eox-layercontrol-tabs",
|
|
2147
|
-
const
|
|
2186
|
+
customElements.define("eox-layercontrol-tabs", Wi);
|
|
2187
|
+
const ln = `
|
|
2148
2188
|
button {
|
|
2149
2189
|
/* TODO: why does this only work here and not from :root? */
|
|
2150
2190
|
--primary-color: #004170;
|
|
@@ -2233,7 +2273,7 @@ button.small {
|
|
|
2233
2273
|
padding: 12.4px;
|
|
2234
2274
|
font-size: .75rem;
|
|
2235
2275
|
}
|
|
2236
|
-
`,
|
|
2276
|
+
`, hn = `
|
|
2237
2277
|
input[type=radio] {
|
|
2238
2278
|
appearance: none;
|
|
2239
2279
|
-webkit-appearance: none;
|
|
@@ -2261,7 +2301,7 @@ input[type=radio]:checked:after {
|
|
|
2261
2301
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eradiobox-marked%3C/title%3E%3Cpath d='M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7Z' /%3E%3C/svg%3E");
|
|
2262
2302
|
|
|
2263
2303
|
}
|
|
2264
|
-
`,
|
|
2304
|
+
`, ji = `
|
|
2265
2305
|
input[type=checkbox] {
|
|
2266
2306
|
appearance: none;
|
|
2267
2307
|
-webkit-appearance: none;
|
|
@@ -2284,7 +2324,7 @@ input[type=checkbox]:checked:after {
|
|
|
2284
2324
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echeckbox-marked%3C/title%3E%3Cpath d='M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z' /%3E%3C/svg%3E");
|
|
2285
2325
|
|
|
2286
2326
|
}
|
|
2287
|
-
`,
|
|
2327
|
+
`, dn = `
|
|
2288
2328
|
input[type="range"] {
|
|
2289
2329
|
-webkit-appearance: none;
|
|
2290
2330
|
width: 90%;
|
|
@@ -2362,19 +2402,19 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
2362
2402
|
border: 0;
|
|
2363
2403
|
}
|
|
2364
2404
|
`;
|
|
2365
|
-
var
|
|
2366
|
-
class
|
|
2405
|
+
var be, we;
|
|
2406
|
+
class Gi extends F {
|
|
2367
2407
|
constructor() {
|
|
2368
2408
|
super();
|
|
2369
2409
|
/**
|
|
2370
2410
|
*
|
|
2371
2411
|
* @param {Array<string>} tools
|
|
2372
2412
|
*/
|
|
2373
|
-
|
|
2413
|
+
N(this, "_parseActions", (e) => e == null ? void 0 : e.filter(
|
|
2374
2414
|
(i) => ["remove", "sort"].filter(
|
|
2375
|
-
(
|
|
2415
|
+
(n) => {
|
|
2376
2416
|
var r;
|
|
2377
|
-
return (r = this.layer) != null && r.get("layerControlDisable") ?
|
|
2417
|
+
return (r = this.layer) != null && r.get("layerControlDisable") ? n !== "sort" : !0;
|
|
2378
2418
|
}
|
|
2379
2419
|
).includes(i)
|
|
2380
2420
|
));
|
|
@@ -2382,12 +2422,12 @@ class Ji extends z {
|
|
|
2382
2422
|
*
|
|
2383
2423
|
* @param {Array<string>} tools
|
|
2384
2424
|
*/
|
|
2385
|
-
|
|
2425
|
+
N(this, "_parseTools", (e) => e == null ? void 0 : e.filter((i) => {
|
|
2386
2426
|
var r;
|
|
2387
|
-
let
|
|
2388
|
-
return ["remove", "sort"].includes(i) && (
|
|
2427
|
+
let n = !0;
|
|
2428
|
+
return ["remove", "sort"].includes(i) && (n = !1), i === "info" && (n = this.layer.get("description")), i === "config" && (n = (r = this.layer.style_) == null ? void 0 : r.color), n;
|
|
2389
2429
|
}));
|
|
2390
|
-
|
|
2430
|
+
N(this, "_removeButton", _`
|
|
2391
2431
|
<button
|
|
2392
2432
|
class="remove-icon icon"
|
|
2393
2433
|
@click=${() => {
|
|
@@ -2403,17 +2443,17 @@ class Ji extends z {
|
|
|
2403
2443
|
${this.unstyled ? "x" : $}
|
|
2404
2444
|
</button>
|
|
2405
2445
|
`);
|
|
2406
|
-
|
|
2446
|
+
N(this, "_sortButton", _`
|
|
2407
2447
|
<button class="sort-icon icon drag-handle">
|
|
2408
2448
|
${this.unstyled ? "sort" : $}
|
|
2409
2449
|
</button>
|
|
2410
2450
|
`);
|
|
2411
|
-
M(this,
|
|
2412
|
-
M(this,
|
|
2413
|
-
${
|
|
2414
|
-
${
|
|
2415
|
-
${
|
|
2416
|
-
${
|
|
2451
|
+
M(this, be, "");
|
|
2452
|
+
M(this, we, `
|
|
2453
|
+
${ln}
|
|
2454
|
+
${hn}
|
|
2455
|
+
${ji}
|
|
2456
|
+
${dn}
|
|
2417
2457
|
button.icon.drag-handle {
|
|
2418
2458
|
cursor: n-resize;
|
|
2419
2459
|
}
|
|
@@ -2504,25 +2544,25 @@ class Ji extends z {
|
|
|
2504
2544
|
padding: 12px 6px;
|
|
2505
2545
|
}
|
|
2506
2546
|
`);
|
|
2507
|
-
this.layer = null, this.tools = [], this.unstyled = !1;
|
|
2547
|
+
this.layer = null, this.tools = [], this.unstyled = !1, this.noShadow = !0;
|
|
2508
2548
|
}
|
|
2509
2549
|
createRenderRoot() {
|
|
2510
|
-
return this;
|
|
2550
|
+
return this.noShadow ? this : super.createRenderRoot();
|
|
2511
2551
|
}
|
|
2512
2552
|
render() {
|
|
2513
2553
|
var e, i;
|
|
2514
2554
|
return _`
|
|
2515
2555
|
<style>
|
|
2516
|
-
${
|
|
2517
|
-
${!this.unstyled &&
|
|
2556
|
+
${H(this, be)}
|
|
2557
|
+
${!this.unstyled && H(this, we)}
|
|
2518
2558
|
</style>
|
|
2519
2559
|
${et(
|
|
2520
2560
|
((e = this._parseActions(this.tools)) == null ? void 0 : e.length) + ((i = this._parseTools(this.tools)) == null ? void 0 : i.length) > 0,
|
|
2521
2561
|
() => {
|
|
2522
|
-
var
|
|
2562
|
+
var n, r;
|
|
2523
2563
|
return _`
|
|
2524
2564
|
${et(
|
|
2525
|
-
((
|
|
2565
|
+
((n = this._parseActions(this.tools)) == null ? void 0 : n.length) === 1 && ((r = this._parseTools(this.tools)) == null ? void 0 : r.length) === 0,
|
|
2526
2566
|
() => _`
|
|
2527
2567
|
<div class="single-action-container">
|
|
2528
2568
|
<div class="single-action">
|
|
@@ -2546,11 +2586,12 @@ class Ji extends z {
|
|
|
2546
2586
|
</button>
|
|
2547
2587
|
</summary>
|
|
2548
2588
|
<eox-layercontrol-tabs
|
|
2589
|
+
.noShadow=${!1}
|
|
2549
2590
|
.actions=${this._parseActions(this.tools)}
|
|
2550
2591
|
.tabs=${this._parseTools(this.tools)}
|
|
2551
2592
|
.unstyled=${this.unstyled}
|
|
2552
2593
|
>
|
|
2553
|
-
${
|
|
2594
|
+
${le(
|
|
2554
2595
|
this._parseTools(this.tools),
|
|
2555
2596
|
(l) => _`
|
|
2556
2597
|
<button slot="${l}-icon" class="icon">
|
|
@@ -2560,7 +2601,7 @@ class Ji extends z {
|
|
|
2560
2601
|
)}
|
|
2561
2602
|
|
|
2562
2603
|
<div slot="info-content">
|
|
2563
|
-
${
|
|
2604
|
+
${an(this.layer.get("description"))}
|
|
2564
2605
|
</div>
|
|
2565
2606
|
<div slot="opacity-content">
|
|
2566
2607
|
<input
|
|
@@ -2568,7 +2609,7 @@ class Ji extends z {
|
|
|
2568
2609
|
min="0"
|
|
2569
2610
|
max="1"
|
|
2570
2611
|
step="0.01"
|
|
2571
|
-
value=${
|
|
2612
|
+
value=${oi((s = this.layer) == null ? void 0 : s.getOpacity())}
|
|
2572
2613
|
@input=${(l) => this.layer.setOpacity(parseFloat(l.target.value))}
|
|
2573
2614
|
/>
|
|
2574
2615
|
</div>
|
|
@@ -2592,25 +2633,34 @@ class Ji extends z {
|
|
|
2592
2633
|
`;
|
|
2593
2634
|
}
|
|
2594
2635
|
}
|
|
2595
|
-
|
|
2636
|
+
be = new WeakMap(), we = new WeakMap(), N(Gi, "properties", {
|
|
2596
2637
|
layer: { attribute: !1 },
|
|
2597
2638
|
tools: { attribute: !1 },
|
|
2598
|
-
unstyled: { type: Boolean }
|
|
2639
|
+
unstyled: { type: Boolean },
|
|
2640
|
+
noShadow: { type: Boolean }
|
|
2599
2641
|
});
|
|
2600
2642
|
customElements.define(
|
|
2601
2643
|
"eox-layercontrol-layer-tools",
|
|
2602
|
-
|
|
2644
|
+
Gi
|
|
2603
2645
|
);
|
|
2604
|
-
var Ee,
|
|
2605
|
-
class
|
|
2646
|
+
var Ee, _e;
|
|
2647
|
+
class Ki extends F {
|
|
2606
2648
|
constructor() {
|
|
2607
2649
|
super();
|
|
2650
|
+
/**
|
|
2651
|
+
* @type Boolean
|
|
2652
|
+
*/
|
|
2653
|
+
N(this, "currLayerVisibilityBasedOnZoom", !0);
|
|
2608
2654
|
M(this, Ee, "");
|
|
2609
|
-
M(this,
|
|
2610
|
-
${
|
|
2655
|
+
M(this, _e, `
|
|
2656
|
+
${ji}
|
|
2611
2657
|
eox-layercontrol-layer {
|
|
2612
2658
|
width: 100%;
|
|
2613
2659
|
}
|
|
2660
|
+
.layer.zoom-state-invisible {
|
|
2661
|
+
background: #d2e2ee;
|
|
2662
|
+
opacity: 0.3;
|
|
2663
|
+
}
|
|
2614
2664
|
.layer {
|
|
2615
2665
|
width: 100%;
|
|
2616
2666
|
align-items: center;
|
|
@@ -2644,29 +2694,54 @@ class Qi extends z {
|
|
|
2644
2694
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230041703a' viewBox='0 0 24 24'%3E%3Ctitle%3Evector-square-edit%3C/title%3E%3Cpath d='M22.7 14.4L21.7 15.4L19.6 13.3L20.6 12.3C20.8 12.1 21.2 12.1 21.4 12.3L22.7 13.6C22.9 13.8 22.9 14.1 22.7 14.4M13 19.9L19.1 13.8L21.2 15.9L15.1 22H13V19.9M11 19.9V19.1L11.6 18.5L12.1 18H8V16H6V8H8V6H16V8H18V12.1L19.1 11L19.3 10.8C19.5 10.6 19.8 10.4 20.1 10.3V8H22.1V2H16.1V4H8V2H2V8H4V16H2V22H8V20L11 19.9M18 4H20V6H18V4M4 4H6V6H4V4M6 20H4V18H6V20Z' /%3E%3C/svg%3E");
|
|
2645
2695
|
}
|
|
2646
2696
|
`);
|
|
2647
|
-
this.layer = null, this.titleProperty = "title", this.tools = [], this.unstyled = !1;
|
|
2697
|
+
this.layer = null, this.map = null, this.titleProperty = "title", this.showLayerZoomState = !1, this.tools = [], this.unstyled = !1, this.noShadow = !0;
|
|
2698
|
+
}
|
|
2699
|
+
/**
|
|
2700
|
+
* Check and update layer visibility based on zoom level
|
|
2701
|
+
* and only update DOM if visibility gets updated
|
|
2702
|
+
*/
|
|
2703
|
+
updateLayerZoomVisibility() {
|
|
2704
|
+
const e = sn(
|
|
2705
|
+
this.layer,
|
|
2706
|
+
this.map,
|
|
2707
|
+
this.showLayerZoomState
|
|
2708
|
+
);
|
|
2709
|
+
let i = !1;
|
|
2710
|
+
!e && this.currLayerVisibilityBasedOnZoom ? (this.currLayerVisibilityBasedOnZoom = !1, i = !0) : e && !this.currLayerVisibilityBasedOnZoom && (this.currLayerVisibilityBasedOnZoom = !0, i = !0), i && (this.requestUpdate(), this.dispatchEvent(
|
|
2711
|
+
new CustomEvent("change:resolution", { bubbles: !0 })
|
|
2712
|
+
));
|
|
2713
|
+
}
|
|
2714
|
+
/**
|
|
2715
|
+
* Check and update layer zoom visibility at beginning
|
|
2716
|
+
* and register "change:resolution" ones at the beginning if `showLayerZoomState` is present
|
|
2717
|
+
*/
|
|
2718
|
+
firstUpdated() {
|
|
2719
|
+
Yi(this.layer, this.showLayerZoomState) && (this.updateLayerZoomVisibility(), this.map.getView().on("change:resolution", () => this.updateLayerZoomVisibility()));
|
|
2648
2720
|
}
|
|
2649
2721
|
createRenderRoot() {
|
|
2650
|
-
return this;
|
|
2722
|
+
return this.noShadow ? this : super.createRenderRoot();
|
|
2651
2723
|
}
|
|
2652
2724
|
render() {
|
|
2653
2725
|
return _`
|
|
2654
2726
|
<style>
|
|
2655
|
-
${
|
|
2656
|
-
${!this.unstyled &&
|
|
2727
|
+
${H(this, Ee)}
|
|
2728
|
+
${!this.unstyled && H(this, _e)}
|
|
2657
2729
|
</style>
|
|
2658
2730
|
${et(
|
|
2659
2731
|
this.layer,
|
|
2660
2732
|
() => {
|
|
2661
2733
|
var e;
|
|
2662
2734
|
return _`
|
|
2663
|
-
<div
|
|
2735
|
+
<div
|
|
2736
|
+
class="layer ${this.layer.getVisible() ? "visible" : ""}
|
|
2737
|
+
${this.currLayerVisibilityBasedOnZoom ? "" : "zoom-state-invisible"}"
|
|
2738
|
+
>
|
|
2664
2739
|
<label
|
|
2665
2740
|
class="${this.layer.get("layerControlDisable") ? "disabled" : ""}"
|
|
2666
2741
|
>
|
|
2667
2742
|
<input
|
|
2668
2743
|
type=${this.layer.get("layerControlExclusive") ? "radio" : "checkbox"}
|
|
2669
|
-
.checked=${
|
|
2744
|
+
.checked=${oi(this.layer.getVisible())}
|
|
2670
2745
|
@click=${(i) => {
|
|
2671
2746
|
this.layer.setVisible(i.target.checked), i.target.checked && this.layer.get("layerControlExclusive") && this.parentNode.parentNode.querySelectorAll(
|
|
2672
2747
|
"li > eox-layercontrol-layer"
|
|
@@ -2686,6 +2761,7 @@ class Qi extends z {
|
|
|
2686
2761
|
</label>
|
|
2687
2762
|
</div>
|
|
2688
2763
|
<eox-layercontrol-layer-tools
|
|
2764
|
+
.noShadow=${!0}
|
|
2689
2765
|
.layer=${this.layer}
|
|
2690
2766
|
.tools=${this.tools}
|
|
2691
2767
|
.unstyled=${this.unstyled}
|
|
@@ -2696,19 +2772,22 @@ class Qi extends z {
|
|
|
2696
2772
|
`;
|
|
2697
2773
|
}
|
|
2698
2774
|
}
|
|
2699
|
-
Ee = new WeakMap(),
|
|
2775
|
+
Ee = new WeakMap(), _e = new WeakMap(), N(Ki, "properties", {
|
|
2700
2776
|
layer: { attribute: !1 },
|
|
2777
|
+
map: { attribute: !1, state: !0 },
|
|
2701
2778
|
titleProperty: { attribute: "title-property", type: String },
|
|
2779
|
+
showLayerZoomState: { attribute: "show-layer-zoom-state", type: Boolean },
|
|
2702
2780
|
tools: { attribute: !1 },
|
|
2703
|
-
unstyled: { type: Boolean }
|
|
2781
|
+
unstyled: { type: Boolean },
|
|
2782
|
+
noShadow: { type: Boolean }
|
|
2704
2783
|
});
|
|
2705
|
-
customElements.define("eox-layercontrol-layer",
|
|
2706
|
-
var
|
|
2707
|
-
class
|
|
2784
|
+
customElements.define("eox-layercontrol-layer", Ki);
|
|
2785
|
+
var $e, xe;
|
|
2786
|
+
class Ji extends F {
|
|
2708
2787
|
constructor() {
|
|
2709
2788
|
super();
|
|
2710
|
-
M(this,
|
|
2711
|
-
M(this,
|
|
2789
|
+
M(this, $e, "");
|
|
2790
|
+
M(this, xe, `
|
|
2712
2791
|
details summary {
|
|
2713
2792
|
cursor: pointer;
|
|
2714
2793
|
display: flex;
|
|
@@ -2730,16 +2809,16 @@ class tn extends z {
|
|
|
2730
2809
|
transform: rotate(90deg);
|
|
2731
2810
|
}
|
|
2732
2811
|
`);
|
|
2733
|
-
this.group = null, this.idProperty = "id", this.map = null, this.titleProperty = "title", this.tools = [], this.unstyled = !1;
|
|
2812
|
+
this.group = null, this.idProperty = "id", this.map = null, this.titleProperty = "title", this.showLayerZoomState = !1, this.tools = [], this.unstyled = !1, this.noShadow = !0;
|
|
2734
2813
|
}
|
|
2735
2814
|
createRenderRoot() {
|
|
2736
|
-
return this;
|
|
2815
|
+
return this.noShadow ? this : super.createRenderRoot();
|
|
2737
2816
|
}
|
|
2738
2817
|
render() {
|
|
2739
2818
|
return _`
|
|
2740
2819
|
<style>
|
|
2741
|
-
${
|
|
2742
|
-
${!this.unstyled &&
|
|
2820
|
+
${H(this, $e)}
|
|
2821
|
+
${!this.unstyled && H(this, xe)}
|
|
2743
2822
|
</style>
|
|
2744
2823
|
${et(
|
|
2745
2824
|
this.group,
|
|
@@ -2747,18 +2826,23 @@ class tn extends z {
|
|
|
2747
2826
|
<details open=${this.group.get("layerControlExpand") || $}>
|
|
2748
2827
|
<summary>
|
|
2749
2828
|
<eox-layercontrol-layer
|
|
2829
|
+
.noShadow=${!0}
|
|
2750
2830
|
.layer=${this.group}
|
|
2831
|
+
.map=${this.map}
|
|
2751
2832
|
.titleProperty=${this.titleProperty}
|
|
2833
|
+
.showLayerZoomState=${this.showLayerZoomState}
|
|
2752
2834
|
.tools=${this.tools}
|
|
2753
2835
|
.unstyled=${this.unstyled}
|
|
2754
2836
|
@changed=${() => this.requestUpdate()}
|
|
2755
2837
|
></eox-layercontrol-layer>
|
|
2756
2838
|
</summary>
|
|
2757
2839
|
<eox-layercontrol-layer-list
|
|
2840
|
+
.noShadow=${!0}
|
|
2758
2841
|
.idProperty=${this.idProperty}
|
|
2759
2842
|
.layers=${this.group.getLayers()}
|
|
2760
2843
|
.map=${this.map}
|
|
2761
2844
|
.titleProperty=${this.titleProperty}
|
|
2845
|
+
.showLayerZoomState=${this.showLayerZoomState}
|
|
2762
2846
|
.tools=${this.tools}
|
|
2763
2847
|
.unstyled=${this.unstyled}
|
|
2764
2848
|
@changed=${() => this.requestUpdate()}
|
|
@@ -2769,23 +2853,25 @@ class tn extends z {
|
|
|
2769
2853
|
`;
|
|
2770
2854
|
}
|
|
2771
2855
|
}
|
|
2772
|
-
|
|
2856
|
+
$e = new WeakMap(), xe = new WeakMap(), N(Ji, "properties", {
|
|
2773
2857
|
group: { attribute: !1 },
|
|
2774
2858
|
idProperty: { attribute: "id-property" },
|
|
2775
2859
|
map: { attribute: !1, state: !0 },
|
|
2776
2860
|
titleProperty: { attribute: "title-property", type: String },
|
|
2861
|
+
showLayerZoomState: { attribute: "show-layer-zoom-state", type: Boolean },
|
|
2777
2862
|
tools: { attribute: !1 },
|
|
2778
|
-
unstyled: { type: Boolean }
|
|
2863
|
+
unstyled: { type: Boolean },
|
|
2864
|
+
noShadow: { type: Boolean }
|
|
2779
2865
|
});
|
|
2780
2866
|
customElements.define(
|
|
2781
2867
|
"eox-layercontrol-layer-group",
|
|
2782
|
-
|
|
2868
|
+
Ji
|
|
2783
2869
|
);
|
|
2784
|
-
var
|
|
2785
|
-
class
|
|
2870
|
+
var Se, Ae;
|
|
2871
|
+
class Qi extends F {
|
|
2786
2872
|
constructor() {
|
|
2787
2873
|
super();
|
|
2788
|
-
M(this,
|
|
2874
|
+
M(this, Se, "");
|
|
2789
2875
|
M(this, Ae, `
|
|
2790
2876
|
ul {
|
|
2791
2877
|
padding: 0;
|
|
@@ -2814,21 +2900,21 @@ class en extends z {
|
|
|
2814
2900
|
li.sortable-ghost {
|
|
2815
2901
|
}
|
|
2816
2902
|
`);
|
|
2817
|
-
this.idProperty = "id", this.layers = null, this.map = null, this.tools = void 0, this.titleProperty = "title", this.unstyled = !1;
|
|
2903
|
+
this.idProperty = "id", this.layers = null, this.map = null, this.tools = void 0, this.titleProperty = "title", this.showLayerZoomState = !1, this.unstyled = !1, this.noShadow = !0;
|
|
2818
2904
|
}
|
|
2819
2905
|
updated() {
|
|
2820
2906
|
this.layers && (this.layers.on("change:length", () => {
|
|
2821
2907
|
this.requestUpdate(), this.dispatchEvent(new CustomEvent("changed", { bubbles: !0 }));
|
|
2822
|
-
}),
|
|
2908
|
+
}), nn(this.renderRoot.querySelector("ul"), this.layers, this));
|
|
2823
2909
|
}
|
|
2824
2910
|
createRenderRoot() {
|
|
2825
|
-
return this;
|
|
2911
|
+
return this.noShadow ? this : super.createRenderRoot();
|
|
2826
2912
|
}
|
|
2827
2913
|
render() {
|
|
2828
2914
|
return _`
|
|
2829
2915
|
<style>
|
|
2830
|
-
${
|
|
2831
|
-
${!this.unstyled &&
|
|
2916
|
+
${H(this, Se)}
|
|
2917
|
+
${!this.unstyled && H(this, Ae)}
|
|
2832
2918
|
</style>
|
|
2833
2919
|
<ul>
|
|
2834
2920
|
${et(
|
|
@@ -2837,20 +2923,22 @@ class en extends z {
|
|
|
2837
2923
|
${this.layers.getArray().filter(
|
|
2838
2924
|
(e) => !e.get("layerControlHide") && !e.get("layerControlOptional")
|
|
2839
2925
|
).reverse().map(
|
|
2840
|
-
(e) =>
|
|
2926
|
+
(e) => Oo(
|
|
2841
2927
|
e.get(this.idProperty),
|
|
2842
2928
|
_`
|
|
2843
2929
|
<li
|
|
2844
2930
|
data-layer="${e.get(this.idProperty)}"
|
|
2845
|
-
data-type="${
|
|
2931
|
+
data-type="${rn(e, this.map)}"
|
|
2846
2932
|
>
|
|
2847
2933
|
${/** @type {import("ol/layer").Group} */
|
|
2848
2934
|
e.getLayers ? _`
|
|
2849
2935
|
<eox-layercontrol-layer-group
|
|
2936
|
+
.noShadow=${!0}
|
|
2850
2937
|
.group=${e}
|
|
2851
2938
|
.idProperty=${this.idProperty}
|
|
2852
2939
|
.map=${this.map}
|
|
2853
2940
|
.titleProperty=${this.titleProperty}
|
|
2941
|
+
.showLayerZoomState=${this.showLayerZoomState}
|
|
2854
2942
|
.tools=${this.tools}
|
|
2855
2943
|
.unstyled=${this.unstyled}
|
|
2856
2944
|
@changed=${() => this.requestUpdate()}
|
|
@@ -2858,8 +2946,11 @@ class en extends z {
|
|
|
2858
2946
|
</eox-layercontrol-layer-group>
|
|
2859
2947
|
` : _`
|
|
2860
2948
|
<eox-layercontrol-layer
|
|
2949
|
+
.noShadow=${!0}
|
|
2861
2950
|
.layer=${e}
|
|
2951
|
+
.map=${this.map}
|
|
2862
2952
|
.titleProperty=${this.titleProperty}
|
|
2953
|
+
.showLayerZoomState=${this.showLayerZoomState}
|
|
2863
2954
|
.tools=${this.tools}
|
|
2864
2955
|
.unstyled=${this.unstyled}
|
|
2865
2956
|
@changed=${() => {
|
|
@@ -2877,21 +2968,23 @@ class en extends z {
|
|
|
2877
2968
|
`;
|
|
2878
2969
|
}
|
|
2879
2970
|
}
|
|
2880
|
-
|
|
2971
|
+
Se = new WeakMap(), Ae = new WeakMap(), N(Qi, "properties", {
|
|
2881
2972
|
idProperty: { attribute: "id-property" },
|
|
2882
2973
|
layers: { attribute: !1 },
|
|
2883
2974
|
map: { attribute: !1, state: !0 },
|
|
2884
2975
|
titleProperty: { attribute: "title-property", type: String },
|
|
2976
|
+
showLayerZoomState: { attribute: "show-layer-zoom-state", type: Boolean },
|
|
2885
2977
|
tools: { attribute: !1 },
|
|
2886
|
-
unstyled: { type: Boolean }
|
|
2978
|
+
unstyled: { type: Boolean },
|
|
2979
|
+
noShadow: { type: Boolean }
|
|
2887
2980
|
});
|
|
2888
|
-
customElements.define("eox-layercontrol-layer-list",
|
|
2889
|
-
class
|
|
2981
|
+
customElements.define("eox-layercontrol-layer-list", Qi);
|
|
2982
|
+
class to extends F {
|
|
2890
2983
|
constructor() {
|
|
2891
|
-
super(), this.idProperty = "id", this.layers = null, this.titleProperty = "title", this.unstyled = !1;
|
|
2984
|
+
super(), this.idProperty = "id", this.layers = null, this.titleProperty = "title", this.unstyled = !1, this.noShadow = !0;
|
|
2892
2985
|
}
|
|
2893
2986
|
createRenderRoot() {
|
|
2894
|
-
return this;
|
|
2987
|
+
return this.noShadow ? this : super.createRenderRoot();
|
|
2895
2988
|
}
|
|
2896
2989
|
render() {
|
|
2897
2990
|
return _`
|
|
@@ -2901,7 +2994,7 @@ class nn extends z {
|
|
|
2901
2994
|
<option disabled selected value>
|
|
2902
2995
|
-- select an optional layer to add --
|
|
2903
2996
|
</option>
|
|
2904
|
-
${
|
|
2997
|
+
${je(
|
|
2905
2998
|
this.layers.getArray(),
|
|
2906
2999
|
"layerControlOptional",
|
|
2907
3000
|
!0
|
|
@@ -2918,7 +3011,7 @@ class nn extends z {
|
|
|
2918
3011
|
</select>
|
|
2919
3012
|
<button
|
|
2920
3013
|
@click="${() => {
|
|
2921
|
-
const t =
|
|
3014
|
+
const t = je(
|
|
2922
3015
|
this.layers.getArray(),
|
|
2923
3016
|
"layerControlOptional",
|
|
2924
3017
|
!0
|
|
@@ -2940,27 +3033,28 @@ class nn extends z {
|
|
|
2940
3033
|
`;
|
|
2941
3034
|
}
|
|
2942
3035
|
}
|
|
2943
|
-
|
|
3036
|
+
N(to, "properties", {
|
|
2944
3037
|
idProperty: { attribute: "id-property" },
|
|
2945
3038
|
layers: { attribute: !1 },
|
|
2946
3039
|
titleProperty: { attribute: "title-property", type: String },
|
|
2947
|
-
unstyled: { type: Boolean }
|
|
3040
|
+
unstyled: { type: Boolean },
|
|
3041
|
+
noShadow: { type: Boolean }
|
|
2948
3042
|
});
|
|
2949
3043
|
customElements.define(
|
|
2950
3044
|
"eox-layercontrol-optional-list",
|
|
2951
|
-
|
|
3045
|
+
to
|
|
2952
3046
|
);
|
|
2953
|
-
var Ce,
|
|
2954
|
-
class
|
|
3047
|
+
var Ce, Te;
|
|
3048
|
+
class eo extends F {
|
|
2955
3049
|
constructor() {
|
|
2956
3050
|
super();
|
|
2957
3051
|
M(this, Ce, "");
|
|
2958
|
-
M(this,
|
|
3052
|
+
M(this, Te, `
|
|
2959
3053
|
* {
|
|
2960
3054
|
font-family: Roboto, sans-serif;
|
|
2961
3055
|
}
|
|
2962
3056
|
`);
|
|
2963
|
-
this.for = "eox-map", this.idProperty = "id", this.map = null, this.titleProperty = "title", this.tools = ["info", "opacity", "remove", "sort"], this.unstyled = !1;
|
|
3057
|
+
this.for = "eox-map", this.idProperty = "id", this.map = null, this.titleProperty = "title", this.showLayerZoomState = !1, this.tools = ["info", "opacity", "remove", "sort"], this.unstyled = !1, this.styleOverride = "";
|
|
2964
3058
|
}
|
|
2965
3059
|
updated() {
|
|
2966
3060
|
const e = document.querySelector(this.for);
|
|
@@ -2970,26 +3064,39 @@ class on extends z {
|
|
|
2970
3064
|
var e;
|
|
2971
3065
|
return _`
|
|
2972
3066
|
<style>
|
|
2973
|
-
${
|
|
2974
|
-
${!this.unstyled &&
|
|
3067
|
+
${H(this, Ce)}
|
|
3068
|
+
${!this.unstyled && H(this, Te)}
|
|
3069
|
+
${this.styleOverride}
|
|
2975
3070
|
</style>
|
|
2976
3071
|
${et(
|
|
2977
3072
|
this.map,
|
|
2978
3073
|
() => _`
|
|
2979
3074
|
<eox-layercontrol-layer-list
|
|
3075
|
+
.noShadow=${!0}
|
|
2980
3076
|
class="layers"
|
|
2981
3077
|
.idProperty=${this.idProperty}
|
|
2982
3078
|
.layers=${this.map.getLayers()}
|
|
2983
3079
|
.map=${this.map}
|
|
2984
3080
|
.titleProperty=${this.titleProperty}
|
|
3081
|
+
.showLayerZoomState=${this.showLayerZoomState}
|
|
2985
3082
|
.tools=${this.tools}
|
|
2986
3083
|
.unstyled=${this.unstyled}
|
|
2987
|
-
@changed=${
|
|
3084
|
+
@changed=${/**
|
|
3085
|
+
* @param {CustomEvent & {target: Element}} e
|
|
3086
|
+
*/
|
|
3087
|
+
(i) => {
|
|
3088
|
+
if (this.requestUpdate(), i.target.tagName === "EOX-LAYERCONTROL-LAYER-TOOLS") {
|
|
3089
|
+
const n = this.renderRoot.querySelector(
|
|
3090
|
+
"eox-layercontrol-optional-list"
|
|
3091
|
+
);
|
|
3092
|
+
n == null || n.requestUpdate();
|
|
3093
|
+
}
|
|
3094
|
+
}}
|
|
2988
3095
|
></eox-layercontrol-layer-list>
|
|
2989
3096
|
`
|
|
2990
3097
|
)}
|
|
2991
3098
|
${et(
|
|
2992
|
-
this.map && ((e =
|
|
3099
|
+
this.map && ((e = je(
|
|
2993
3100
|
// @ts-ignore
|
|
2994
3101
|
this.map.getLayers().getArray(),
|
|
2995
3102
|
"layerControlOptional",
|
|
@@ -2997,6 +3104,7 @@ class on extends z {
|
|
|
2997
3104
|
)) == null ? void 0 : e.length) > 0,
|
|
2998
3105
|
() => _`
|
|
2999
3106
|
<eox-layercontrol-optional-list
|
|
3107
|
+
.noShadow=${!0}
|
|
3000
3108
|
.idProperty=${this.idProperty}
|
|
3001
3109
|
.layers=${this.map.getLayers()}
|
|
3002
3110
|
.titleProperty=${this.titleProperty}
|
|
@@ -3007,15 +3115,17 @@ class on extends z {
|
|
|
3007
3115
|
`;
|
|
3008
3116
|
}
|
|
3009
3117
|
}
|
|
3010
|
-
Ce = new WeakMap(),
|
|
3118
|
+
Ce = new WeakMap(), Te = new WeakMap(), N(eo, "properties", {
|
|
3011
3119
|
for: { type: String },
|
|
3012
3120
|
idProperty: { attribute: "id-property" },
|
|
3013
3121
|
map: { attribute: !1, state: !0 },
|
|
3014
3122
|
titleProperty: { attribute: "title-property", type: String },
|
|
3123
|
+
showLayerZoomState: { attribute: "show-layer-zoom-state", type: Boolean },
|
|
3015
3124
|
tools: { attribute: !1 },
|
|
3016
|
-
unstyled: { type: Boolean }
|
|
3125
|
+
unstyled: { type: Boolean },
|
|
3126
|
+
styleOverride: { type: String }
|
|
3017
3127
|
});
|
|
3018
|
-
customElements.define("eox-layercontrol",
|
|
3128
|
+
customElements.define("eox-layercontrol", eo);
|
|
3019
3129
|
export {
|
|
3020
|
-
|
|
3130
|
+
eo as EOxLayerControl
|
|
3021
3131
|
};
|