@eox/layercontrol 0.28.2-dev.1736966655.0 → 0.28.2-dev.1737128144.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 +1028 -1018
- package/dist/eox-layercontrol.umd.cjs +131 -144
- package/package.json +1 -1
- package/src/components/layer-config.js +5 -5
- package/src/components/layer-legend.js +60 -50
- package/src/helpers/get-legend-config.js +50 -27
- package/types/layercontrol/src/components/layer-config.d.ts +10 -12
- package/types/layercontrol/src/components/layer-config.d.ts.map +1 -1
- package/types/layercontrol/src/components/layer-legend.d.ts +8 -7
- package/types/layercontrol/src/components/layer-legend.d.ts.map +1 -1
- package/types/layercontrol/src/helpers/get-legend-config.d.ts +1 -1
- package/types/layercontrol/src/helpers/get-legend-config.d.ts.map +1 -1
package/dist/eox-layercontrol.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var to = Object.defineProperty;
|
|
2
|
+
var bn = (i) => {
|
|
3
3
|
throw TypeError(i);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var j = (i, t, e) =>
|
|
7
|
-
var
|
|
5
|
+
var eo = (i, t, e) => t in i ? to(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
6
|
+
var j = (i, t, e) => eo(i, typeof t != "symbol" ? t + "" : t, e), Ti = (i, t, e) => t.has(i) || bn("Cannot " + e);
|
|
7
|
+
var S = (i, t, e) => (Ti(i, t, "read from private field"), e ? e.call(i) : t.get(i)), D = (i, t, e) => t.has(i) ? bn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(i) : t.set(i, e), _t = (i, t, e, n) => (Ti(i, t, "write to private field"), n ? n.call(i, e) : t.set(i, e), e), B = (i, t, e) => (Ti(i, t, "access private method"), e);
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2019 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
14
|
-
let
|
|
13
|
+
const je = globalThis, en = je.ShadowRoot && (je.ShadyCSS === void 0 || je.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, nn = Symbol(), vn = /* @__PURE__ */ new WeakMap();
|
|
14
|
+
let qn = class {
|
|
15
15
|
constructor(t, e, n) {
|
|
16
|
-
if (this._$cssResult$ = !0, n !==
|
|
16
|
+
if (this._$cssResult$ = !0, n !== nn) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
17
17
|
this.cssText = t, this.t = e;
|
|
18
18
|
}
|
|
19
19
|
get styleSheet() {
|
|
20
20
|
let t = this.o;
|
|
21
21
|
const e = this.t;
|
|
22
|
-
if (
|
|
22
|
+
if (en && t === void 0) {
|
|
23
23
|
const n = e !== void 0 && e.length === 1;
|
|
24
|
-
n && (t =
|
|
24
|
+
n && (t = vn.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), n && vn.set(e, t));
|
|
25
25
|
}
|
|
26
26
|
return t;
|
|
27
27
|
}
|
|
@@ -29,33 +29,33 @@ let Zn = class {
|
|
|
29
29
|
return this.cssText;
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
const
|
|
32
|
+
const io = (i) => new qn(typeof i == "string" ? i : i + "", void 0, nn), Xn = (i, ...t) => {
|
|
33
33
|
const e = i.length === 1 ? i[0] : t.reduce((n, r, o) => n + ((s) => {
|
|
34
34
|
if (s._$cssResult$ === !0) return s.cssText;
|
|
35
35
|
if (typeof s == "number") return s;
|
|
36
36
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + s + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
37
37
|
})(r) + i[o + 1], i[0]);
|
|
38
|
-
return new
|
|
39
|
-
},
|
|
40
|
-
if (
|
|
38
|
+
return new qn(e, i, nn);
|
|
39
|
+
}, no = (i, t) => {
|
|
40
|
+
if (en) i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
41
41
|
else for (const e of t) {
|
|
42
|
-
const n = document.createElement("style"), r =
|
|
42
|
+
const n = document.createElement("style"), r = je.litNonce;
|
|
43
43
|
r !== void 0 && n.setAttribute("nonce", r), n.textContent = e.cssText, i.appendChild(n);
|
|
44
44
|
}
|
|
45
|
-
},
|
|
45
|
+
}, wn = en ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
|
|
46
46
|
let e = "";
|
|
47
47
|
for (const n of t.cssRules) e += n.cssText;
|
|
48
|
-
return
|
|
48
|
+
return io(e);
|
|
49
49
|
})(i) : i;
|
|
50
50
|
/**
|
|
51
51
|
* @license
|
|
52
52
|
* Copyright 2017 Google LLC
|
|
53
53
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
54
54
|
*/
|
|
55
|
-
const { is:
|
|
55
|
+
const { is: ro, defineProperty: oo, getOwnPropertyDescriptor: so, getOwnPropertyNames: ao, getOwnPropertySymbols: lo, getPrototypeOf: co } = Object, Ft = globalThis, xn = Ft.trustedTypes, uo = xn ? xn.emptyScript : "", Di = Ft.reactiveElementPolyfillSupport, ve = (i, t) => i, Xi = { toAttribute(i, t) {
|
|
56
56
|
switch (t) {
|
|
57
57
|
case Boolean:
|
|
58
|
-
i = i ?
|
|
58
|
+
i = i ? uo : null;
|
|
59
59
|
break;
|
|
60
60
|
case Object:
|
|
61
61
|
case Array:
|
|
@@ -80,8 +80,8 @@ const { is: no, defineProperty: ro, getOwnPropertyDescriptor: oo, getOwnProperty
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
return e;
|
|
83
|
-
} },
|
|
84
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
83
|
+
} }, Yn = (i, t) => !ro(i, t), En = { attribute: !0, type: String, converter: Xi, reflect: !1, hasChanged: Yn };
|
|
84
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), Ft.litPropertyMetadata ?? (Ft.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
85
85
|
class re extends HTMLElement {
|
|
86
86
|
static addInitializer(t) {
|
|
87
87
|
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
@@ -89,14 +89,14 @@ class re extends HTMLElement {
|
|
|
89
89
|
static get observedAttributes() {
|
|
90
90
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
91
91
|
}
|
|
92
|
-
static createProperty(t, e =
|
|
92
|
+
static createProperty(t, e = En) {
|
|
93
93
|
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
94
94
|
const n = Symbol(), r = this.getPropertyDescriptor(t, n, e);
|
|
95
|
-
r !== void 0 &&
|
|
95
|
+
r !== void 0 && oo(this.prototype, t, r);
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
static getPropertyDescriptor(t, e, n) {
|
|
99
|
-
const { get: r, set: o } =
|
|
99
|
+
const { get: r, set: o } = so(this.prototype, t) ?? { get() {
|
|
100
100
|
return this[e];
|
|
101
101
|
}, set(s) {
|
|
102
102
|
this[e] = s;
|
|
@@ -109,17 +109,17 @@ class re extends HTMLElement {
|
|
|
109
109
|
}, configurable: !0, enumerable: !0 };
|
|
110
110
|
}
|
|
111
111
|
static getPropertyOptions(t) {
|
|
112
|
-
return this.elementProperties.get(t) ??
|
|
112
|
+
return this.elementProperties.get(t) ?? En;
|
|
113
113
|
}
|
|
114
114
|
static _$Ei() {
|
|
115
115
|
if (this.hasOwnProperty(ve("elementProperties"))) return;
|
|
116
|
-
const t =
|
|
116
|
+
const t = co(this);
|
|
117
117
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
118
118
|
}
|
|
119
119
|
static finalize() {
|
|
120
120
|
if (this.hasOwnProperty(ve("finalized"))) return;
|
|
121
121
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(ve("properties"))) {
|
|
122
|
-
const e = this.properties, n = [...
|
|
122
|
+
const e = this.properties, n = [...ao(e), ...lo(e)];
|
|
123
123
|
for (const r of n) this.createProperty(r, e[r]);
|
|
124
124
|
}
|
|
125
125
|
const t = this[Symbol.metadata];
|
|
@@ -138,8 +138,8 @@ class re extends HTMLElement {
|
|
|
138
138
|
const e = [];
|
|
139
139
|
if (Array.isArray(t)) {
|
|
140
140
|
const n = new Set(t.flat(1 / 0).reverse());
|
|
141
|
-
for (const r of n) e.unshift(
|
|
142
|
-
} else t !== void 0 && e.push(
|
|
141
|
+
for (const r of n) e.unshift(wn(r));
|
|
142
|
+
} else t !== void 0 && e.push(wn(t));
|
|
143
143
|
return e;
|
|
144
144
|
}
|
|
145
145
|
static _$Eu(t, e) {
|
|
@@ -168,7 +168,7 @@ class re extends HTMLElement {
|
|
|
168
168
|
}
|
|
169
169
|
createRenderRoot() {
|
|
170
170
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
171
|
-
return
|
|
171
|
+
return no(t, this.constructor.elementStyles), t;
|
|
172
172
|
}
|
|
173
173
|
connectedCallback() {
|
|
174
174
|
var t;
|
|
@@ -193,7 +193,7 @@ class re extends HTMLElement {
|
|
|
193
193
|
var o;
|
|
194
194
|
const n = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, n);
|
|
195
195
|
if (r !== void 0 && n.reflect === !0) {
|
|
196
|
-
const s = (((o = n.converter) == null ? void 0 : o.toAttribute) !== void 0 ? n.converter :
|
|
196
|
+
const s = (((o = n.converter) == null ? void 0 : o.toAttribute) !== void 0 ? n.converter : Xi).toAttribute(e, n.type);
|
|
197
197
|
this._$Em = t, s == null ? this.removeAttribute(r) : this.setAttribute(r, s), this._$Em = null;
|
|
198
198
|
}
|
|
199
199
|
}
|
|
@@ -201,13 +201,13 @@ class re extends HTMLElement {
|
|
|
201
201
|
var o;
|
|
202
202
|
const n = this.constructor, r = n._$Eh.get(t);
|
|
203
203
|
if (r !== void 0 && this._$Em !== r) {
|
|
204
|
-
const s = n.getPropertyOptions(r), a = typeof s.converter == "function" ? { fromAttribute: s.converter } : ((o = s.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? s.converter :
|
|
204
|
+
const s = n.getPropertyOptions(r), a = typeof s.converter == "function" ? { fromAttribute: s.converter } : ((o = s.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? s.converter : Xi;
|
|
205
205
|
this._$Em = r, this[r] = a.fromAttribute(e, s.type), this._$Em = null;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
requestUpdate(t, e, n) {
|
|
209
209
|
if (t !== void 0) {
|
|
210
|
-
if (n ?? (n = this.constructor.getPropertyOptions(t)), !(n.hasChanged ??
|
|
210
|
+
if (n ?? (n = this.constructor.getPropertyOptions(t)), !(n.hasChanged ?? Yn)(this[t], e)) return;
|
|
211
211
|
this.P(t, e, n);
|
|
212
212
|
}
|
|
213
213
|
this.isUpdatePending === !1 && (this._$ES = this._$ET());
|
|
@@ -280,76 +280,76 @@ class re extends HTMLElement {
|
|
|
280
280
|
firstUpdated(t) {
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
|
-
re.elementStyles = [], re.shadowRootOptions = { mode: "open" }, re[ve("elementProperties")] = /* @__PURE__ */ new Map(), re[ve("finalized")] = /* @__PURE__ */ new Map(),
|
|
283
|
+
re.elementStyles = [], re.shadowRootOptions = { mode: "open" }, re[ve("elementProperties")] = /* @__PURE__ */ new Map(), re[ve("finalized")] = /* @__PURE__ */ new Map(), Di == null || Di({ ReactiveElement: re }), (Ft.reactiveElementVersions ?? (Ft.reactiveElementVersions = [])).push("2.0.4");
|
|
284
284
|
/**
|
|
285
285
|
* @license
|
|
286
286
|
* Copyright 2017 Google LLC
|
|
287
287
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
288
288
|
*/
|
|
289
|
-
const we = globalThis,
|
|
290
|
-
\f\r]`, fe = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
291
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
292
|
-
function
|
|
293
|
-
if (!
|
|
289
|
+
const we = globalThis, Je = we.trustedTypes, $n = Je ? Je.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, rn = "$lit$", Dt = `lit$${Math.random().toFixed(9).slice(2)}$`, on = "?" + Dt, ho = `<${on}>`, te = document, Ce = () => te.createComment(""), _e = (i) => i === null || typeof i != "object" && typeof i != "function", sn = Array.isArray, Wn = (i) => sn(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", Pi = `[
|
|
290
|
+
\f\r]`, fe = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Sn = /-->/g, An = />/g, Xt = RegExp(`>|${Pi}(?:([^\\s"'>=/]+)(${Pi}*=${Pi}*(?:[^
|
|
291
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Cn = /'/g, _n = /"/g, Gn = /^(?:script|style|textarea|title)$/i, po = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), x = po(1), wt = Symbol.for("lit-noChange"), P = Symbol.for("lit-nothing"), Tn = /* @__PURE__ */ new WeakMap(), Kt = te.createTreeWalker(te, 129);
|
|
292
|
+
function Jn(i, t) {
|
|
293
|
+
if (!sn(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
294
294
|
return $n !== void 0 ? $n.createHTML(t) : t;
|
|
295
295
|
}
|
|
296
|
-
const
|
|
296
|
+
const Kn = (i, t) => {
|
|
297
297
|
const e = i.length - 1, n = [];
|
|
298
298
|
let r, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", s = fe;
|
|
299
299
|
for (let a = 0; a < e; a++) {
|
|
300
300
|
const l = i[a];
|
|
301
301
|
let d, u, c = -1, p = 0;
|
|
302
|
-
for (; p < l.length && (s.lastIndex = p, u = s.exec(l), u !== null); ) p = s.lastIndex, s === fe ? u[1] === "!--" ? s =
|
|
303
|
-
const f = s ===
|
|
304
|
-
o += s === fe ? l +
|
|
302
|
+
for (; p < l.length && (s.lastIndex = p, u = s.exec(l), u !== null); ) p = s.lastIndex, s === fe ? u[1] === "!--" ? s = Sn : u[1] !== void 0 ? s = An : u[2] !== void 0 ? (Gn.test(u[2]) && (r = RegExp("</" + u[2], "g")), s = Xt) : u[3] !== void 0 && (s = Xt) : s === Xt ? u[0] === ">" ? (s = r ?? fe, c = -1) : u[1] === void 0 ? c = -2 : (c = s.lastIndex - u[2].length, d = u[1], s = u[3] === void 0 ? Xt : u[3] === '"' ? _n : Cn) : s === _n || s === Cn ? s = Xt : s === Sn || s === An ? s = fe : (s = Xt, r = void 0);
|
|
303
|
+
const f = s === Xt && i[a + 1].startsWith("/>") ? " " : "";
|
|
304
|
+
o += s === fe ? l + ho : c >= 0 ? (n.push(d), l.slice(0, c) + rn + l.slice(c) + Dt + f) : l + Dt + (c === -2 ? a : f);
|
|
305
305
|
}
|
|
306
|
-
return [
|
|
306
|
+
return [Jn(i, o + (i[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), n];
|
|
307
307
|
};
|
|
308
308
|
class Te {
|
|
309
309
|
constructor({ strings: t, _$litType$: e }, n) {
|
|
310
310
|
let r;
|
|
311
311
|
this.parts = [];
|
|
312
312
|
let o = 0, s = 0;
|
|
313
|
-
const a = t.length - 1, l = this.parts, [d, u] =
|
|
314
|
-
if (this.el = Te.createElement(d, n),
|
|
313
|
+
const a = t.length - 1, l = this.parts, [d, u] = Kn(t, e);
|
|
314
|
+
if (this.el = Te.createElement(d, n), Kt.currentNode = this.el.content, e === 2 || e === 3) {
|
|
315
315
|
const c = this.el.content.firstChild;
|
|
316
316
|
c.replaceWith(...c.childNodes);
|
|
317
317
|
}
|
|
318
|
-
for (; (r =
|
|
318
|
+
for (; (r = Kt.nextNode()) !== null && l.length < a; ) {
|
|
319
319
|
if (r.nodeType === 1) {
|
|
320
|
-
if (r.hasAttributes()) for (const c of r.getAttributeNames()) if (c.endsWith(
|
|
321
|
-
const p = u[s++], f = r.getAttribute(c).split(
|
|
322
|
-
l.push({ type: 1, index: o, name: g[2], strings: f, ctor: g[1] === "." ?
|
|
323
|
-
} else c.startsWith(
|
|
324
|
-
if (
|
|
325
|
-
const c = r.textContent.split(
|
|
320
|
+
if (r.hasAttributes()) for (const c of r.getAttributeNames()) if (c.endsWith(rn)) {
|
|
321
|
+
const p = u[s++], f = r.getAttribute(c).split(Dt), g = /([.?@])?(.*)/.exec(p);
|
|
322
|
+
l.push({ type: 1, index: o, name: g[2], strings: f, ctor: g[1] === "." ? tr : g[1] === "?" ? er : g[1] === "@" ? ir : Le }), r.removeAttribute(c);
|
|
323
|
+
} else c.startsWith(Dt) && (l.push({ type: 6, index: o }), r.removeAttribute(c));
|
|
324
|
+
if (Gn.test(r.tagName)) {
|
|
325
|
+
const c = r.textContent.split(Dt), p = c.length - 1;
|
|
326
326
|
if (p > 0) {
|
|
327
|
-
r.textContent =
|
|
328
|
-
for (let f = 0; f < p; f++) r.append(c[f],
|
|
329
|
-
r.append(c[p],
|
|
327
|
+
r.textContent = Je ? Je.emptyScript : "";
|
|
328
|
+
for (let f = 0; f < p; f++) r.append(c[f], Ce()), Kt.nextNode(), l.push({ type: 2, index: ++o });
|
|
329
|
+
r.append(c[p], Ce());
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
|
-
} else if (r.nodeType === 8) if (r.data ===
|
|
332
|
+
} else if (r.nodeType === 8) if (r.data === on) l.push({ type: 2, index: o });
|
|
333
333
|
else {
|
|
334
334
|
let c = -1;
|
|
335
|
-
for (; (c = r.data.indexOf(
|
|
335
|
+
for (; (c = r.data.indexOf(Dt, c + 1)) !== -1; ) l.push({ type: 7, index: o }), c += Dt.length - 1;
|
|
336
336
|
}
|
|
337
337
|
o++;
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
340
|
static createElement(t, e) {
|
|
341
|
-
const n =
|
|
341
|
+
const n = te.createElement("template");
|
|
342
342
|
return n.innerHTML = t, n;
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
|
-
function
|
|
345
|
+
function ee(i, t, e = i, n) {
|
|
346
346
|
var s, a;
|
|
347
|
-
if (t ===
|
|
347
|
+
if (t === wt) return t;
|
|
348
348
|
let r = n !== void 0 ? (s = e._$Co) == null ? void 0 : s[n] : e._$Cl;
|
|
349
|
-
const o =
|
|
350
|
-
return (r == null ? void 0 : r.constructor) !== o && ((a = r == null ? void 0 : r._$AO) == null || a.call(r, !1), o === void 0 ? r = void 0 : (r = new o(i), r._$AT(i, e, n)), n !== void 0 ? (e._$Co ?? (e._$Co = []))[n] = r : e._$Cl = r), r !== void 0 && (t =
|
|
349
|
+
const o = _e(t) ? void 0 : t._$litDirective$;
|
|
350
|
+
return (r == null ? void 0 : r.constructor) !== o && ((a = r == null ? void 0 : r._$AO) == null || a.call(r, !1), o === void 0 ? r = void 0 : (r = new o(i), r._$AT(i, e, n)), n !== void 0 ? (e._$Co ?? (e._$Co = []))[n] = r : e._$Cl = r), r !== void 0 && (t = ee(i, r._$AS(i, t.values), r, n)), t;
|
|
351
351
|
}
|
|
352
|
-
let
|
|
352
|
+
let Qn = class {
|
|
353
353
|
constructor(t, e) {
|
|
354
354
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
355
355
|
}
|
|
@@ -360,17 +360,17 @@ let Kn = class {
|
|
|
360
360
|
return this._$AM._$AU;
|
|
361
361
|
}
|
|
362
362
|
u(t) {
|
|
363
|
-
const { el: { content: e }, parts: n } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ??
|
|
364
|
-
|
|
365
|
-
let o =
|
|
363
|
+
const { el: { content: e }, parts: n } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ?? te).importNode(e, !0);
|
|
364
|
+
Kt.currentNode = r;
|
|
365
|
+
let o = Kt.nextNode(), s = 0, a = 0, l = n[0];
|
|
366
366
|
for (; l !== void 0; ) {
|
|
367
367
|
if (s === l.index) {
|
|
368
368
|
let d;
|
|
369
|
-
l.type === 2 ? d = new he(o, o.nextSibling, this, t) : l.type === 1 ? d = new l.ctor(o, l.name, l.strings, this, t) : l.type === 6 && (d = new
|
|
369
|
+
l.type === 2 ? d = new he(o, o.nextSibling, this, t) : l.type === 1 ? d = new l.ctor(o, l.name, l.strings, this, t) : l.type === 6 && (d = new nr(o, this, t)), this._$AV.push(d), l = n[++a];
|
|
370
370
|
}
|
|
371
|
-
s !== (l == null ? void 0 : l.index) && (o =
|
|
371
|
+
s !== (l == null ? void 0 : l.index) && (o = Kt.nextNode(), s++);
|
|
372
372
|
}
|
|
373
|
-
return
|
|
373
|
+
return Kt.currentNode = te, r;
|
|
374
374
|
}
|
|
375
375
|
p(t) {
|
|
376
376
|
let e = 0;
|
|
@@ -383,7 +383,7 @@ class he {
|
|
|
383
383
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
384
384
|
}
|
|
385
385
|
constructor(t, e, n, r) {
|
|
386
|
-
this.type = 2, this._$AH =
|
|
386
|
+
this.type = 2, this._$AH = P, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = n, this.options = r, this._$Cv = (r == null ? void 0 : r.isConnected) ?? !0;
|
|
387
387
|
}
|
|
388
388
|
get parentNode() {
|
|
389
389
|
let t = this._$AA.parentNode;
|
|
@@ -397,7 +397,7 @@ class he {
|
|
|
397
397
|
return this._$AB;
|
|
398
398
|
}
|
|
399
399
|
_$AI(t, e = this) {
|
|
400
|
-
t =
|
|
400
|
+
t = ee(this, t, e), _e(t) ? t === P || t == null || t === "" ? (this._$AH !== P && this._$AR(), this._$AH = P) : t !== this._$AH && t !== wt && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Wn(t) ? this.k(t) : this._(t);
|
|
401
401
|
}
|
|
402
402
|
O(t) {
|
|
403
403
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -406,26 +406,26 @@ class he {
|
|
|
406
406
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
407
407
|
}
|
|
408
408
|
_(t) {
|
|
409
|
-
this._$AH !==
|
|
409
|
+
this._$AH !== P && _e(this._$AH) ? this._$AA.nextSibling.data = t : this.T(te.createTextNode(t)), this._$AH = t;
|
|
410
410
|
}
|
|
411
411
|
$(t) {
|
|
412
412
|
var o;
|
|
413
|
-
const { values: e, _$litType$: n } = t, r = typeof n == "number" ? this._$AC(t) : (n.el === void 0 && (n.el = Te.createElement(
|
|
413
|
+
const { values: e, _$litType$: n } = t, r = typeof n == "number" ? this._$AC(t) : (n.el === void 0 && (n.el = Te.createElement(Jn(n.h, n.h[0]), this.options)), n);
|
|
414
414
|
if (((o = this._$AH) == null ? void 0 : o._$AD) === r) this._$AH.p(e);
|
|
415
415
|
else {
|
|
416
|
-
const s = new
|
|
416
|
+
const s = new Qn(r, this), a = s.u(this.options);
|
|
417
417
|
s.p(e), this.T(a), this._$AH = s;
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
420
|
_$AC(t) {
|
|
421
|
-
let e =
|
|
422
|
-
return e === void 0 &&
|
|
421
|
+
let e = Tn.get(t.strings);
|
|
422
|
+
return e === void 0 && Tn.set(t.strings, e = new Te(t)), e;
|
|
423
423
|
}
|
|
424
424
|
k(t) {
|
|
425
|
-
|
|
425
|
+
sn(this._$AH) || (this._$AH = [], this._$AR());
|
|
426
426
|
const e = this._$AH;
|
|
427
427
|
let n, r = 0;
|
|
428
|
-
for (const o of t) r === e.length ? e.push(n = new he(this.O(
|
|
428
|
+
for (const o of t) r === e.length ? e.push(n = new he(this.O(Ce()), this.O(Ce()), this, this.options)) : n = e[r], n._$AI(o), r++;
|
|
429
429
|
r < e.length && (this._$AR(n && n._$AB.nextSibling, r), e.length = r);
|
|
430
430
|
}
|
|
431
431
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
@@ -440,7 +440,7 @@ class he {
|
|
|
440
440
|
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
|
-
class
|
|
443
|
+
class Le {
|
|
444
444
|
get tagName() {
|
|
445
445
|
return this.element.tagName;
|
|
446
446
|
}
|
|
@@ -448,46 +448,46 @@ class Re {
|
|
|
448
448
|
return this._$AM._$AU;
|
|
449
449
|
}
|
|
450
450
|
constructor(t, e, n, r, o) {
|
|
451
|
-
this.type = 1, this._$AH =
|
|
451
|
+
this.type = 1, this._$AH = P, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = o, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(new String()), this.strings = n) : this._$AH = P;
|
|
452
452
|
}
|
|
453
453
|
_$AI(t, e = this, n, r) {
|
|
454
454
|
const o = this.strings;
|
|
455
455
|
let s = !1;
|
|
456
|
-
if (o === void 0) t =
|
|
456
|
+
if (o === void 0) t = ee(this, t, e, 0), s = !_e(t) || t !== this._$AH && t !== wt, s && (this._$AH = t);
|
|
457
457
|
else {
|
|
458
458
|
const a = t;
|
|
459
459
|
let l, d;
|
|
460
|
-
for (t = o[0], l = 0; l < o.length - 1; l++) d =
|
|
460
|
+
for (t = o[0], l = 0; l < o.length - 1; l++) d = ee(this, a[n + l], e, l), d === wt && (d = this._$AH[l]), s || (s = !_e(d) || d !== this._$AH[l]), d === P ? t = P : t !== P && (t += (d ?? "") + o[l + 1]), this._$AH[l] = d;
|
|
461
461
|
}
|
|
462
462
|
s && !r && this.j(t);
|
|
463
463
|
}
|
|
464
464
|
j(t) {
|
|
465
|
-
t ===
|
|
465
|
+
t === P ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
|
-
class
|
|
468
|
+
class tr extends Le {
|
|
469
469
|
constructor() {
|
|
470
470
|
super(...arguments), this.type = 3;
|
|
471
471
|
}
|
|
472
472
|
j(t) {
|
|
473
|
-
this.element[this.name] = t ===
|
|
473
|
+
this.element[this.name] = t === P ? void 0 : t;
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
|
-
class
|
|
476
|
+
class er extends Le {
|
|
477
477
|
constructor() {
|
|
478
478
|
super(...arguments), this.type = 4;
|
|
479
479
|
}
|
|
480
480
|
j(t) {
|
|
481
|
-
this.element.toggleAttribute(this.name, !!t && t !==
|
|
481
|
+
this.element.toggleAttribute(this.name, !!t && t !== P);
|
|
482
482
|
}
|
|
483
483
|
}
|
|
484
|
-
class
|
|
484
|
+
class ir extends Le {
|
|
485
485
|
constructor(t, e, n, r, o) {
|
|
486
486
|
super(t, e, n, r, o), this.type = 5;
|
|
487
487
|
}
|
|
488
488
|
_$AI(t, e = this) {
|
|
489
|
-
if ((t =
|
|
490
|
-
const n = this._$AH, r = t ===
|
|
489
|
+
if ((t = ee(this, t, e, 0) ?? P) === wt) return;
|
|
490
|
+
const n = this._$AH, r = t === P && n !== P || t.capture !== n.capture || t.once !== n.once || t.passive !== n.passive, o = t !== P && (n === P || r);
|
|
491
491
|
r && this.element.removeEventListener(this.name, this, n), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
492
492
|
}
|
|
493
493
|
handleEvent(t) {
|
|
@@ -495,7 +495,7 @@ class er extends Re {
|
|
|
495
495
|
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
|
-
class
|
|
498
|
+
class nr {
|
|
499
499
|
constructor(t, e, n) {
|
|
500
500
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = n;
|
|
501
501
|
}
|
|
@@ -503,17 +503,17 @@ class ir {
|
|
|
503
503
|
return this._$AM._$AU;
|
|
504
504
|
}
|
|
505
505
|
_$AI(t) {
|
|
506
|
-
|
|
506
|
+
ee(this, t);
|
|
507
507
|
}
|
|
508
508
|
}
|
|
509
|
-
const
|
|
510
|
-
|
|
511
|
-
const
|
|
509
|
+
const fo = { M: rn, P: Dt, A: on, C: 1, L: Kn, R: Qn, D: Wn, V: ee, I: he, H: Le, N: er, U: ir, B: tr, F: nr }, Oi = we.litHtmlPolyfillSupport;
|
|
510
|
+
Oi == null || Oi(Te, he), (we.litHtmlVersions ?? (we.litHtmlVersions = [])).push("3.2.1");
|
|
511
|
+
const go = (i, t, e) => {
|
|
512
512
|
const n = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
513
513
|
let r = n._$litPart$;
|
|
514
514
|
if (r === void 0) {
|
|
515
515
|
const o = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
516
|
-
n._$litPart$ = r = new he(t.insertBefore(
|
|
516
|
+
n._$litPart$ = r = new he(t.insertBefore(Ce(), o), o, void 0, e ?? {});
|
|
517
517
|
}
|
|
518
518
|
return r._$AI(i), r;
|
|
519
519
|
};
|
|
@@ -533,7 +533,7 @@ let lt = class extends re {
|
|
|
533
533
|
}
|
|
534
534
|
update(t) {
|
|
535
535
|
const e = this.render();
|
|
536
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
536
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = go(e, this.renderRoot, this.renderOptions);
|
|
537
537
|
}
|
|
538
538
|
connectedCallback() {
|
|
539
539
|
var t;
|
|
@@ -544,13 +544,13 @@ let lt = class extends re {
|
|
|
544
544
|
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
|
545
545
|
}
|
|
546
546
|
render() {
|
|
547
|
-
return
|
|
547
|
+
return wt;
|
|
548
548
|
}
|
|
549
549
|
};
|
|
550
|
-
var
|
|
551
|
-
lt._$litElement$ = !0, lt.finalized = !0, (
|
|
552
|
-
const
|
|
553
|
-
|
|
550
|
+
var Zn;
|
|
551
|
+
lt._$litElement$ = !0, lt.finalized = !0, (Zn = globalThis.litElementHydrateSupport) == null || Zn.call(globalThis, { LitElement: lt });
|
|
552
|
+
const Ri = globalThis.litElementPolyfillSupport;
|
|
553
|
+
Ri == null || Ri({ LitElement: lt });
|
|
554
554
|
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.1");
|
|
555
555
|
/**
|
|
556
556
|
* @license
|
|
@@ -565,8 +565,8 @@ function G(i, t, e) {
|
|
|
565
565
|
* Copyright 2017 Google LLC
|
|
566
566
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
567
567
|
*/
|
|
568
|
-
const
|
|
569
|
-
class
|
|
568
|
+
const Nt = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, an = (i) => (...t) => ({ _$litDirective$: i, values: t });
|
|
569
|
+
class ln {
|
|
570
570
|
constructor(t) {
|
|
571
571
|
}
|
|
572
572
|
get _$AU() {
|
|
@@ -587,12 +587,12 @@ class an {
|
|
|
587
587
|
* Copyright 2020 Google LLC
|
|
588
588
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
589
589
|
*/
|
|
590
|
-
const { I:
|
|
590
|
+
const { I: mo } = fo, yo = (i) => i.strings === void 0, Dn = () => document.createComment(""), ge = (i, t, e) => {
|
|
591
591
|
var o;
|
|
592
592
|
const n = i._$AA.parentNode, r = t === void 0 ? i._$AB : t._$AA;
|
|
593
593
|
if (e === void 0) {
|
|
594
|
-
const s = n.insertBefore(
|
|
595
|
-
e = new
|
|
594
|
+
const s = n.insertBefore(Dn(), r), a = n.insertBefore(Dn(), r);
|
|
595
|
+
e = new mo(s, a, i, i.options);
|
|
596
596
|
} else {
|
|
597
597
|
const s = e._$AB.nextSibling, a = e._$AM, l = a !== i;
|
|
598
598
|
if (l) {
|
|
@@ -608,7 +608,7 @@ const { I: go } = po, mo = (i) => i.strings === void 0, Tn = () => document.crea
|
|
|
608
608
|
}
|
|
609
609
|
}
|
|
610
610
|
return e;
|
|
611
|
-
},
|
|
611
|
+
}, Yt = (i, t, e = i) => (i._$AI(t, e), i), bo = {}, rr = (i, t = bo) => i._$AH = t, vo = (i) => i._$AH, Li = (i) => {
|
|
612
612
|
var n;
|
|
613
613
|
(n = i._$AP) == null || n.call(i, !1, !0);
|
|
614
614
|
let t = i._$AA;
|
|
@@ -623,13 +623,13 @@ const { I: go } = po, mo = (i) => i.strings === void 0, Tn = () => document.crea
|
|
|
623
623
|
* Copyright 2017 Google LLC
|
|
624
624
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
625
625
|
*/
|
|
626
|
-
const
|
|
626
|
+
const Pn = (i, t, e) => {
|
|
627
627
|
const n = /* @__PURE__ */ new Map();
|
|
628
628
|
for (let r = t; r <= e; r++) n.set(i[r], r);
|
|
629
629
|
return n;
|
|
630
|
-
},
|
|
630
|
+
}, wo = an(class extends ln {
|
|
631
631
|
constructor(i) {
|
|
632
|
-
if (super(i), i.type !==
|
|
632
|
+
if (super(i), i.type !== Nt.CHILD) throw Error("repeat() can only be used in text expressions");
|
|
633
633
|
}
|
|
634
634
|
dt(i, t, e) {
|
|
635
635
|
let n;
|
|
@@ -643,34 +643,34 @@ const Dn = (i, t, e) => {
|
|
|
643
643
|
return this.dt(i, t, e).values;
|
|
644
644
|
}
|
|
645
645
|
update(i, [t, e, n]) {
|
|
646
|
-
const r =
|
|
646
|
+
const r = vo(i), { values: o, keys: s } = this.dt(t, e, n);
|
|
647
647
|
if (!Array.isArray(r)) return this.ut = s, o;
|
|
648
648
|
const a = this.ut ?? (this.ut = []), l = [];
|
|
649
649
|
let d, u, c = 0, p = r.length - 1, f = 0, g = o.length - 1;
|
|
650
650
|
for (; c <= p && f <= g; ) if (r[c] === null) c++;
|
|
651
651
|
else if (r[p] === null) p--;
|
|
652
|
-
else if (a[c] === s[f]) l[f] =
|
|
653
|
-
else if (a[p] === s[g]) l[g] =
|
|
654
|
-
else if (a[c] === s[g]) l[g] =
|
|
655
|
-
else if (a[p] === s[f]) l[f] =
|
|
656
|
-
else if (d === void 0 && (d =
|
|
652
|
+
else if (a[c] === s[f]) l[f] = Yt(r[c], o[f]), c++, f++;
|
|
653
|
+
else if (a[p] === s[g]) l[g] = Yt(r[p], o[g]), p--, g--;
|
|
654
|
+
else if (a[c] === s[g]) l[g] = Yt(r[c], o[g]), ge(i, l[g + 1], r[c]), c++, g--;
|
|
655
|
+
else if (a[p] === s[f]) l[f] = Yt(r[p], o[f]), ge(i, r[c], r[p]), p--, f++;
|
|
656
|
+
else if (d === void 0 && (d = Pn(s, f, g), u = Pn(a, c, p)), d.has(a[c])) if (d.has(a[p])) {
|
|
657
657
|
const b = u.get(s[f]), N = b !== void 0 ? r[b] : null;
|
|
658
658
|
if (N === null) {
|
|
659
659
|
const J = ge(i, r[c]);
|
|
660
|
-
|
|
661
|
-
} else l[f] =
|
|
660
|
+
Yt(J, o[f]), l[f] = J;
|
|
661
|
+
} else l[f] = Yt(N, o[f]), ge(i, r[c], N), r[b] = null;
|
|
662
662
|
f++;
|
|
663
|
-
} else
|
|
664
|
-
else
|
|
663
|
+
} else Li(r[p]), p--;
|
|
664
|
+
else Li(r[c]), c++;
|
|
665
665
|
for (; f <= g; ) {
|
|
666
666
|
const b = ge(i, l[g + 1]);
|
|
667
|
-
|
|
667
|
+
Yt(b, o[f]), l[f++] = b;
|
|
668
668
|
}
|
|
669
669
|
for (; c <= p; ) {
|
|
670
670
|
const b = r[c++];
|
|
671
|
-
b !== null &&
|
|
671
|
+
b !== null && Li(b);
|
|
672
672
|
}
|
|
673
|
-
return this.ut = s,
|
|
673
|
+
return this.ut = s, rr(i, l), wt;
|
|
674
674
|
}
|
|
675
675
|
});
|
|
676
676
|
/**
|
|
@@ -679,7 +679,7 @@ const Dn = (i, t, e) => {
|
|
|
679
679
|
* @license BSD-2-Clause
|
|
680
680
|
* @preserve
|
|
681
681
|
*/
|
|
682
|
-
var
|
|
682
|
+
var A = (i) => i !== void 0, or = (i, t, e) => t in i ? i[t] : i[t] = e;
|
|
683
683
|
const De = {
|
|
684
684
|
ELEMENT: 1,
|
|
685
685
|
ATTRIBUTE: 2,
|
|
@@ -694,7 +694,7 @@ const De = {
|
|
|
694
694
|
DOCUMENT_FRAGMENT: 11,
|
|
695
695
|
NOTATION: 12
|
|
696
696
|
};
|
|
697
|
-
class
|
|
697
|
+
class xo {
|
|
698
698
|
/**
|
|
699
699
|
* XML DOM parser
|
|
700
700
|
* @constructor
|
|
@@ -719,28 +719,28 @@ class wo {
|
|
|
719
719
|
* @api
|
|
720
720
|
*/
|
|
721
721
|
getAllTextContent(t, e) {
|
|
722
|
-
return
|
|
722
|
+
return Ai(t, e).join("");
|
|
723
723
|
}
|
|
724
724
|
}
|
|
725
|
-
function
|
|
726
|
-
return
|
|
725
|
+
function Ai(i, t) {
|
|
726
|
+
return sr(i, t, []).join("");
|
|
727
727
|
}
|
|
728
|
-
function
|
|
728
|
+
function sr(i, t, e) {
|
|
729
729
|
if (i.nodeType === De.CDATA_SECTION || i.nodeType === De.TEXT)
|
|
730
730
|
t ? e.push(String(i.nodeValue).replace(/(\r\n|\r|\n)/g, "")) : e.push(i.nodeValue);
|
|
731
731
|
else {
|
|
732
732
|
var n;
|
|
733
733
|
for (n = i.firstChild; n; n = n.nextSibling)
|
|
734
|
-
|
|
734
|
+
sr(n, t, e);
|
|
735
735
|
}
|
|
736
736
|
return e;
|
|
737
737
|
}
|
|
738
|
-
function
|
|
739
|
-
for (var r = $o(t); r; r =
|
|
738
|
+
function Eo(i, t, e, n) {
|
|
739
|
+
for (var r = $o(t); r; r = So(r)) {
|
|
740
740
|
var o = r.namespaceURI || null, s = i[o];
|
|
741
|
-
if (
|
|
741
|
+
if (A(s)) {
|
|
742
742
|
var a = s[r.localName];
|
|
743
|
-
|
|
743
|
+
A(a) && a.call(n, r, e);
|
|
744
744
|
}
|
|
745
745
|
}
|
|
746
746
|
}
|
|
@@ -750,7 +750,7 @@ function $o(i) {
|
|
|
750
750
|
t = t.nextSibling;
|
|
751
751
|
return t;
|
|
752
752
|
}
|
|
753
|
-
function
|
|
753
|
+
function So(i) {
|
|
754
754
|
let t = i.nextElementSibling || i.nextSibling;
|
|
755
755
|
for (; t && t.nodeType !== De.ELEMENT; )
|
|
756
756
|
t = t.nextSibling;
|
|
@@ -759,16 +759,16 @@ function Eo(i) {
|
|
|
759
759
|
function nt(i, t, e) {
|
|
760
760
|
return (
|
|
761
761
|
/** @type {Object.<string, Object.<string, XMLParser.Parser>>} */
|
|
762
|
-
|
|
762
|
+
Ao(i, t, e)
|
|
763
763
|
);
|
|
764
764
|
}
|
|
765
|
-
function
|
|
766
|
-
var n =
|
|
765
|
+
function Ao(i, t, e) {
|
|
766
|
+
var n = A(e) ? e : {}, r, o;
|
|
767
767
|
for (r = 0, o = i.length; r < o; ++r)
|
|
768
768
|
n[i[r]] = t;
|
|
769
769
|
return n;
|
|
770
770
|
}
|
|
771
|
-
function
|
|
771
|
+
function ar(i, t) {
|
|
772
772
|
return (
|
|
773
773
|
/**
|
|
774
774
|
* @param {Node} node Node.
|
|
@@ -776,11 +776,11 @@ function sr(i, t) {
|
|
|
776
776
|
*/
|
|
777
777
|
function(e, n) {
|
|
778
778
|
var r = i.call(
|
|
779
|
-
|
|
779
|
+
A(t) ? t : this,
|
|
780
780
|
e,
|
|
781
781
|
n
|
|
782
782
|
);
|
|
783
|
-
if (
|
|
783
|
+
if (A(r)) {
|
|
784
784
|
var o = n[n.length - 1];
|
|
785
785
|
o.push(r);
|
|
786
786
|
}
|
|
@@ -788,7 +788,7 @@ function sr(i, t) {
|
|
|
788
788
|
);
|
|
789
789
|
}
|
|
790
790
|
function Q(i, t, e, n, r) {
|
|
791
|
-
return n.push(i),
|
|
791
|
+
return n.push(i), Eo(t, e, n, r), n.pop();
|
|
792
792
|
}
|
|
793
793
|
function y(i, t, e) {
|
|
794
794
|
return (
|
|
@@ -798,15 +798,15 @@ function y(i, t, e) {
|
|
|
798
798
|
*/
|
|
799
799
|
function(n, r) {
|
|
800
800
|
let o = i.call(
|
|
801
|
-
|
|
801
|
+
A(e) ? e : this,
|
|
802
802
|
n,
|
|
803
803
|
r
|
|
804
804
|
);
|
|
805
|
-
if (
|
|
805
|
+
if (A(o)) {
|
|
806
806
|
var s = (
|
|
807
807
|
/** @type {Object} */
|
|
808
808
|
r[r.length - 1]
|
|
809
|
-
), a =
|
|
809
|
+
), a = A(t) ? t : n.localName;
|
|
810
810
|
s[a] = o;
|
|
811
811
|
}
|
|
812
812
|
}
|
|
@@ -820,67 +820,67 @@ function pt(i, t, e) {
|
|
|
820
820
|
*/
|
|
821
821
|
function(n, r) {
|
|
822
822
|
var o = i.call(
|
|
823
|
-
|
|
823
|
+
A(e) ? e : this,
|
|
824
824
|
n,
|
|
825
825
|
r
|
|
826
826
|
);
|
|
827
|
-
if (
|
|
827
|
+
if (A(o)) {
|
|
828
828
|
var s = (
|
|
829
829
|
/** @type {Object} */
|
|
830
830
|
r[r.length - 1]
|
|
831
|
-
), a =
|
|
831
|
+
), a = A(t) ? t : n.localName, l = or(s, a, []);
|
|
832
832
|
l.push(o);
|
|
833
833
|
}
|
|
834
834
|
}
|
|
835
835
|
);
|
|
836
836
|
}
|
|
837
|
-
const
|
|
837
|
+
const Co = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
|
|
838
838
|
function _o(i) {
|
|
839
|
-
return i.replace(
|
|
839
|
+
return i.replace(Co, "");
|
|
840
840
|
}
|
|
841
|
-
function
|
|
841
|
+
function Qt(i) {
|
|
842
842
|
const t = /^\s*(true|1)|(false|0)\s*$/.exec(i);
|
|
843
843
|
if (t)
|
|
844
|
-
return
|
|
844
|
+
return A(t[1]) || !1;
|
|
845
845
|
}
|
|
846
846
|
function ae(i) {
|
|
847
|
-
return
|
|
847
|
+
return Pt(Ai(i, !1));
|
|
848
848
|
}
|
|
849
|
-
function
|
|
849
|
+
function Pt(i) {
|
|
850
850
|
const t = /^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(i);
|
|
851
851
|
if (t)
|
|
852
852
|
return parseFloat(t[1]);
|
|
853
853
|
}
|
|
854
|
-
function
|
|
855
|
-
return
|
|
854
|
+
function Mi(i) {
|
|
855
|
+
return Ke(Ai(i, !1));
|
|
856
856
|
}
|
|
857
|
-
function
|
|
857
|
+
function Ke(i) {
|
|
858
858
|
const t = /^\s*(\d+)\s*$/.exec(i);
|
|
859
859
|
if (t)
|
|
860
860
|
return parseInt(t[1], 10);
|
|
861
861
|
}
|
|
862
|
-
function
|
|
863
|
-
return _o(
|
|
862
|
+
function O(i) {
|
|
863
|
+
return _o(Ai(i, !1));
|
|
864
864
|
}
|
|
865
|
-
const
|
|
866
|
-
function
|
|
867
|
-
return i.getAttributeNS(
|
|
865
|
+
const To = "http://www.w3.org/1999/xlink";
|
|
866
|
+
function dn(i) {
|
|
867
|
+
return i.getAttributeNS(To, "href");
|
|
868
868
|
}
|
|
869
|
-
function
|
|
870
|
-
return Q({},
|
|
869
|
+
function Do(i, t) {
|
|
870
|
+
return Q({}, is, i, t);
|
|
871
871
|
}
|
|
872
|
-
function
|
|
872
|
+
function lr(i) {
|
|
873
873
|
return [
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
874
|
+
Pt(i.getAttribute("minx")),
|
|
875
|
+
Pt(i.getAttribute("miny")),
|
|
876
|
+
Pt(i.getAttribute("maxx")),
|
|
877
|
+
Pt(i.getAttribute("maxy"))
|
|
878
878
|
];
|
|
879
879
|
}
|
|
880
|
-
function
|
|
881
|
-
const e =
|
|
882
|
-
|
|
883
|
-
|
|
880
|
+
function Po(i, t) {
|
|
881
|
+
const e = lr(i), n = [
|
|
882
|
+
Pt(i.getAttribute("resx")),
|
|
883
|
+
Pt(i.getAttribute("resy"))
|
|
884
884
|
];
|
|
885
885
|
return {
|
|
886
886
|
crs: i.getAttribute("CRS") || i.getAttribute("SRS"),
|
|
@@ -888,23 +888,23 @@ function Do(i, t) {
|
|
|
888
888
|
res: n
|
|
889
889
|
};
|
|
890
890
|
}
|
|
891
|
-
function
|
|
892
|
-
const e =
|
|
893
|
-
if (!(!
|
|
891
|
+
function Oo(i, t) {
|
|
892
|
+
const e = lr(i);
|
|
893
|
+
if (!(!A(e[0]) || !A(e[1]) || !A(e[2]) || !A(e[3])))
|
|
894
894
|
return e;
|
|
895
895
|
}
|
|
896
|
-
function
|
|
896
|
+
function Ro(i, t) {
|
|
897
897
|
const e = parseFloat(i.getAttribute("min")), n = parseFloat(i.getAttribute("max"));
|
|
898
898
|
return { min: e, max: n };
|
|
899
899
|
}
|
|
900
|
-
function
|
|
900
|
+
function Lo(i, t) {
|
|
901
901
|
const e = Q(
|
|
902
902
|
{},
|
|
903
|
-
|
|
903
|
+
ns,
|
|
904
904
|
i,
|
|
905
905
|
t
|
|
906
906
|
);
|
|
907
|
-
if (!
|
|
907
|
+
if (!A(e)) return;
|
|
908
908
|
const n = (
|
|
909
909
|
/** @type {number|undefined} */
|
|
910
910
|
e.westBoundLongitude
|
|
@@ -918,7 +918,7 @@ function Oo(i, t) {
|
|
|
918
918
|
/** @type {number|undefined} */
|
|
919
919
|
e.northBoundLatitude
|
|
920
920
|
);
|
|
921
|
-
if (!(!
|
|
921
|
+
if (!(!A(n) || !A(r) || !A(o) || !A(s)))
|
|
922
922
|
return [
|
|
923
923
|
n,
|
|
924
924
|
r,
|
|
@@ -926,32 +926,32 @@ function Oo(i, t) {
|
|
|
926
926
|
s
|
|
927
927
|
];
|
|
928
928
|
}
|
|
929
|
-
function Ro(i, t) {
|
|
930
|
-
return Q({}, Wo, i, t);
|
|
931
|
-
}
|
|
932
929
|
function Mo(i, t) {
|
|
933
930
|
return Q({}, Go, i, t);
|
|
934
931
|
}
|
|
935
932
|
function Io(i, t) {
|
|
933
|
+
return Q({}, Jo, i, t);
|
|
934
|
+
}
|
|
935
|
+
function No(i, t) {
|
|
936
936
|
return Q(
|
|
937
937
|
{},
|
|
938
|
-
|
|
938
|
+
Ko,
|
|
939
939
|
i,
|
|
940
940
|
t
|
|
941
941
|
);
|
|
942
942
|
}
|
|
943
|
-
function
|
|
943
|
+
function Ho(i, t) {
|
|
944
944
|
return Q(
|
|
945
945
|
{},
|
|
946
|
-
|
|
946
|
+
Qo,
|
|
947
947
|
i,
|
|
948
948
|
t
|
|
949
949
|
);
|
|
950
950
|
}
|
|
951
|
-
function
|
|
951
|
+
function Vo(i, t) {
|
|
952
952
|
return Q(
|
|
953
953
|
{},
|
|
954
|
-
|
|
954
|
+
ts,
|
|
955
955
|
i,
|
|
956
956
|
t
|
|
957
957
|
);
|
|
@@ -959,23 +959,23 @@ function Ho(i, t) {
|
|
|
959
959
|
function ko(i, t) {
|
|
960
960
|
return Q(
|
|
961
961
|
[],
|
|
962
|
-
|
|
962
|
+
es,
|
|
963
963
|
i,
|
|
964
964
|
t
|
|
965
965
|
);
|
|
966
966
|
}
|
|
967
|
-
function
|
|
968
|
-
const e =
|
|
967
|
+
function Bo(i, t) {
|
|
968
|
+
const e = Qt(i.getAttribute("queryable"));
|
|
969
969
|
return Q(
|
|
970
970
|
{
|
|
971
|
-
queryable:
|
|
971
|
+
queryable: A(e) ? e : !1
|
|
972
972
|
},
|
|
973
|
-
|
|
973
|
+
ur,
|
|
974
974
|
i,
|
|
975
975
|
t
|
|
976
976
|
);
|
|
977
977
|
}
|
|
978
|
-
function
|
|
978
|
+
function Uo(i, t) {
|
|
979
979
|
var e = (
|
|
980
980
|
/** @type {Object.<string,*>} */
|
|
981
981
|
t[t.length - 1]
|
|
@@ -984,29 +984,29 @@ function Bo(i, t) {
|
|
|
984
984
|
/** @type {Object.<string,*>} */
|
|
985
985
|
Q(
|
|
986
986
|
{},
|
|
987
|
-
|
|
987
|
+
ur,
|
|
988
988
|
i,
|
|
989
989
|
t
|
|
990
990
|
)
|
|
991
991
|
);
|
|
992
|
-
if (!
|
|
993
|
-
let r =
|
|
994
|
-
|
|
995
|
-
let o =
|
|
996
|
-
|
|
997
|
-
let s =
|
|
998
|
-
|
|
999
|
-
let a =
|
|
1000
|
-
|
|
1001
|
-
let l =
|
|
1002
|
-
|
|
1003
|
-
let d =
|
|
1004
|
-
|
|
992
|
+
if (!A(n)) return;
|
|
993
|
+
let r = Qt(i.getAttribute("queryable"));
|
|
994
|
+
A(r) || (r = e.queryable), n.queryable = A(r) ? r : !1;
|
|
995
|
+
let o = Ke(i.getAttribute("cascaded"));
|
|
996
|
+
A(o) || (o = e.cascaded), n.cascaded = o;
|
|
997
|
+
let s = Qt(i.getAttribute("opaque"));
|
|
998
|
+
A(s) || (s = e.opaque), n.opaque = A(s) ? s : !1;
|
|
999
|
+
let a = Qt(i.getAttribute("noSubsets"));
|
|
1000
|
+
A(a) || (a = e.noSubsets), n.noSubsets = A(a) ? a : !1;
|
|
1001
|
+
let l = Pt(i.getAttribute("fixedWidth"));
|
|
1002
|
+
A(l) || (l = e.fixedWidth), n.fixedWidth = l;
|
|
1003
|
+
let d = Pt(i.getAttribute("fixedHeight"));
|
|
1004
|
+
A(d) || (d = e.fixedHeight), n.fixedHeight = d;
|
|
1005
1005
|
const u = ["Style", "CRS", "AuthorityURL"];
|
|
1006
1006
|
for (let p = 0, f = u.length; p < f; p++) {
|
|
1007
1007
|
const g = u[p], b = e[g];
|
|
1008
|
-
if (
|
|
1009
|
-
let N =
|
|
1008
|
+
if (A(b)) {
|
|
1009
|
+
let N = or(n, g, []);
|
|
1010
1010
|
N = N.concat(b), n[g] = N;
|
|
1011
1011
|
}
|
|
1012
1012
|
}
|
|
@@ -1020,72 +1020,72 @@ function Bo(i, t) {
|
|
|
1020
1020
|
];
|
|
1021
1021
|
for (let p = 0, f = c.length; p < f; p++) {
|
|
1022
1022
|
const g = c[p], b = n[g];
|
|
1023
|
-
if (!
|
|
1023
|
+
if (!A(b)) {
|
|
1024
1024
|
const N = e[g];
|
|
1025
1025
|
n[g] = N;
|
|
1026
1026
|
}
|
|
1027
1027
|
}
|
|
1028
1028
|
return n;
|
|
1029
1029
|
}
|
|
1030
|
-
function
|
|
1030
|
+
function Fo(i, t) {
|
|
1031
1031
|
return {
|
|
1032
1032
|
name: i.getAttribute("name"),
|
|
1033
1033
|
units: i.getAttribute("units"),
|
|
1034
1034
|
unitSymbol: i.getAttribute("unitSymbol"),
|
|
1035
1035
|
default: i.getAttribute("default"),
|
|
1036
|
-
multipleValues:
|
|
1037
|
-
nearestValue:
|
|
1038
|
-
current:
|
|
1039
|
-
values:
|
|
1036
|
+
multipleValues: Qt(i.getAttribute("multipleValues")),
|
|
1037
|
+
nearestValue: Qt(i.getAttribute("nearestValue")),
|
|
1038
|
+
current: Qt(i.getAttribute("current")),
|
|
1039
|
+
values: O(i)
|
|
1040
1040
|
};
|
|
1041
1041
|
}
|
|
1042
|
-
function
|
|
1042
|
+
function Rt(i, t) {
|
|
1043
1043
|
return Q(
|
|
1044
1044
|
{},
|
|
1045
|
-
|
|
1045
|
+
ds,
|
|
1046
1046
|
i,
|
|
1047
1047
|
t
|
|
1048
1048
|
);
|
|
1049
1049
|
}
|
|
1050
|
-
function Fo(i, t) {
|
|
1051
|
-
return Q({}, ns, i, t);
|
|
1052
|
-
}
|
|
1053
1050
|
function jo(i, t) {
|
|
1054
|
-
return Q({},
|
|
1051
|
+
return Q({}, rs, i, t);
|
|
1055
1052
|
}
|
|
1056
1053
|
function zo(i, t) {
|
|
1057
1054
|
return Q({}, ss, i, t);
|
|
1058
1055
|
}
|
|
1059
|
-
function
|
|
1060
|
-
return Q({},
|
|
1056
|
+
function Zo(i, t) {
|
|
1057
|
+
return Q({}, as, i, t);
|
|
1061
1058
|
}
|
|
1062
|
-
function
|
|
1063
|
-
|
|
1064
|
-
|
|
1059
|
+
function Ii(i, t) {
|
|
1060
|
+
return Q({}, os, i, t);
|
|
1061
|
+
}
|
|
1062
|
+
function dr(i, t) {
|
|
1063
|
+
var e = Rt(i, t);
|
|
1064
|
+
if (A(e)) {
|
|
1065
1065
|
const n = [
|
|
1066
|
-
|
|
1067
|
-
|
|
1066
|
+
Ke(i.getAttribute("width")),
|
|
1067
|
+
Ke(i.getAttribute("height"))
|
|
1068
1068
|
];
|
|
1069
1069
|
return e.size = n, e;
|
|
1070
1070
|
}
|
|
1071
1071
|
}
|
|
1072
|
-
function
|
|
1073
|
-
var e =
|
|
1074
|
-
if (
|
|
1072
|
+
function qo(i, t) {
|
|
1073
|
+
var e = Rt(i, t);
|
|
1074
|
+
if (A(e))
|
|
1075
1075
|
return e.name = i.getAttribute("name"), e;
|
|
1076
1076
|
}
|
|
1077
|
-
function
|
|
1078
|
-
var e =
|
|
1079
|
-
if (
|
|
1077
|
+
function Xo(i, t) {
|
|
1078
|
+
var e = Rt(i, t);
|
|
1079
|
+
if (A(e))
|
|
1080
1080
|
return e.type = i.getAttribute("type"), e;
|
|
1081
1081
|
}
|
|
1082
|
-
function
|
|
1083
|
-
return Q({},
|
|
1082
|
+
function Yo(i, t) {
|
|
1083
|
+
return Q({}, ls, i, t);
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1085
|
+
function cr(i, t) {
|
|
1086
1086
|
return Q(
|
|
1087
1087
|
[],
|
|
1088
|
-
|
|
1088
|
+
cs,
|
|
1089
1089
|
i,
|
|
1090
1090
|
t
|
|
1091
1091
|
);
|
|
@@ -1093,163 +1093,163 @@ function dr(i, t) {
|
|
|
1093
1093
|
const rt = [
|
|
1094
1094
|
null,
|
|
1095
1095
|
"http://www.opengis.net/wms"
|
|
1096
|
-
],
|
|
1097
|
-
rt,
|
|
1098
|
-
{
|
|
1099
|
-
Service: y(Mo),
|
|
1100
|
-
Capability: y(Ro)
|
|
1101
|
-
}
|
|
1102
|
-
), Wo = nt(
|
|
1096
|
+
], Wo = nt(
|
|
1103
1097
|
rt,
|
|
1104
1098
|
{
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
Layer: y(Vo)
|
|
1099
|
+
Service: y(Io),
|
|
1100
|
+
Capability: y(Mo)
|
|
1108
1101
|
}
|
|
1109
1102
|
), Go = nt(
|
|
1110
1103
|
rt,
|
|
1111
1104
|
{
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
KeywordList: y(dr),
|
|
1116
|
-
OnlineResource: y(ln),
|
|
1117
|
-
ContactInformation: y(Io),
|
|
1118
|
-
Fees: y(D),
|
|
1119
|
-
AccessConstraints: y(D),
|
|
1120
|
-
LayerLimit: y(Ri),
|
|
1121
|
-
MaxWidth: y(Ri),
|
|
1122
|
-
MaxHeight: y(Ri)
|
|
1105
|
+
Request: y(jo),
|
|
1106
|
+
Exception: y(ko),
|
|
1107
|
+
Layer: y(Bo)
|
|
1123
1108
|
}
|
|
1124
1109
|
), Jo = nt(
|
|
1125
1110
|
rt,
|
|
1126
1111
|
{
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1112
|
+
Name: y(O),
|
|
1113
|
+
Title: y(O),
|
|
1114
|
+
Abstract: y(O),
|
|
1115
|
+
KeywordList: y(cr),
|
|
1116
|
+
OnlineResource: y(dn),
|
|
1117
|
+
ContactInformation: y(No),
|
|
1118
|
+
Fees: y(O),
|
|
1119
|
+
AccessConstraints: y(O),
|
|
1120
|
+
LayerLimit: y(Mi),
|
|
1121
|
+
MaxWidth: y(Mi),
|
|
1122
|
+
MaxHeight: y(Mi)
|
|
1133
1123
|
}
|
|
1134
1124
|
), Ko = nt(
|
|
1135
1125
|
rt,
|
|
1136
1126
|
{
|
|
1137
|
-
|
|
1138
|
-
|
|
1127
|
+
ContactPersonPrimary: y(Ho),
|
|
1128
|
+
ContactPosition: y(O),
|
|
1129
|
+
ContactAddress: y(Vo),
|
|
1130
|
+
ContactVoiceTelephone: y(O),
|
|
1131
|
+
ContactFacsimileTelephone: y(O),
|
|
1132
|
+
ContactElectronicMailAddress: y(O)
|
|
1139
1133
|
}
|
|
1140
1134
|
), Qo = nt(
|
|
1141
1135
|
rt,
|
|
1142
1136
|
{
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
City: y(D),
|
|
1146
|
-
StateOrProvince: y(D),
|
|
1147
|
-
PostCode: y(D),
|
|
1148
|
-
Country: y(D)
|
|
1137
|
+
ContactPerson: y(O),
|
|
1138
|
+
ContactOrganization: y(O)
|
|
1149
1139
|
}
|
|
1150
1140
|
), ts = nt(
|
|
1151
1141
|
rt,
|
|
1152
1142
|
{
|
|
1153
|
-
|
|
1143
|
+
AddressType: y(O),
|
|
1144
|
+
Address: y(O),
|
|
1145
|
+
City: y(O),
|
|
1146
|
+
StateOrProvince: y(O),
|
|
1147
|
+
PostCode: y(O),
|
|
1148
|
+
Country: y(O)
|
|
1154
1149
|
}
|
|
1155
|
-
),
|
|
1150
|
+
), es = nt(
|
|
1156
1151
|
rt,
|
|
1157
1152
|
{
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1153
|
+
Format: ar(O)
|
|
1154
|
+
}
|
|
1155
|
+
), ur = nt(
|
|
1156
|
+
rt,
|
|
1157
|
+
{
|
|
1158
|
+
Name: y(O),
|
|
1159
|
+
Title: y(O),
|
|
1160
|
+
Abstract: y(O),
|
|
1161
|
+
KeywordList: y(cr),
|
|
1162
|
+
CRS: pt(O),
|
|
1163
|
+
SRS: pt(O),
|
|
1164
|
+
EX_GeographicBoundingBox: y(Lo),
|
|
1165
|
+
LatLonBoundingBox: y(Oo),
|
|
1166
|
+
BoundingBox: pt(Po),
|
|
1167
|
+
Dimension: pt(Fo),
|
|
1168
|
+
Attribution: y(Do),
|
|
1169
|
+
AuthorityURL: pt(qo),
|
|
1170
|
+
Identifier: pt(O),
|
|
1171
|
+
MetadataURL: pt(Xo),
|
|
1172
|
+
DataURL: pt(Rt),
|
|
1173
|
+
FeatureListURL: pt(Rt),
|
|
1174
|
+
Style: pt(Yo),
|
|
1175
1175
|
MinScaleDenominator: y(ae),
|
|
1176
1176
|
MaxScaleDenominator: y(ae),
|
|
1177
|
-
ScaleHint: y(
|
|
1178
|
-
Layer: pt(
|
|
1177
|
+
ScaleHint: y(Ro),
|
|
1178
|
+
Layer: pt(Uo)
|
|
1179
1179
|
}
|
|
1180
|
-
),
|
|
1180
|
+
), is = nt(
|
|
1181
1181
|
rt,
|
|
1182
1182
|
{
|
|
1183
|
-
Title: y(
|
|
1184
|
-
OnlineResource: y(
|
|
1185
|
-
LogoURL: y(
|
|
1183
|
+
Title: y(O),
|
|
1184
|
+
OnlineResource: y(dn),
|
|
1185
|
+
LogoURL: y(dr)
|
|
1186
1186
|
}
|
|
1187
|
-
),
|
|
1187
|
+
), ns = nt(rt, {
|
|
1188
1188
|
westBoundLongitude: y(ae),
|
|
1189
1189
|
eastBoundLongitude: y(ae),
|
|
1190
1190
|
southBoundLatitude: y(ae),
|
|
1191
1191
|
northBoundLatitude: y(ae)
|
|
1192
|
-
}),
|
|
1192
|
+
}), rs = nt(
|
|
1193
1193
|
rt,
|
|
1194
1194
|
{
|
|
1195
1195
|
GetCapabilities: y(
|
|
1196
|
-
|
|
1196
|
+
Ii
|
|
1197
1197
|
),
|
|
1198
1198
|
GetMap: y(
|
|
1199
|
-
|
|
1199
|
+
Ii
|
|
1200
1200
|
),
|
|
1201
1201
|
GetFeatureInfo: y(
|
|
1202
|
-
|
|
1202
|
+
Ii
|
|
1203
1203
|
)
|
|
1204
1204
|
}
|
|
1205
|
-
),
|
|
1205
|
+
), os = nt(
|
|
1206
1206
|
rt,
|
|
1207
1207
|
{
|
|
1208
|
-
Format: pt(
|
|
1208
|
+
Format: pt(O),
|
|
1209
1209
|
DCPType: pt(
|
|
1210
|
-
|
|
1210
|
+
zo
|
|
1211
1211
|
)
|
|
1212
1212
|
}
|
|
1213
|
-
),
|
|
1213
|
+
), ss = nt(
|
|
1214
1214
|
rt,
|
|
1215
1215
|
{
|
|
1216
1216
|
HTTP: y(
|
|
1217
|
-
|
|
1217
|
+
Zo
|
|
1218
1218
|
)
|
|
1219
1219
|
}
|
|
1220
|
-
),
|
|
1220
|
+
), as = nt(
|
|
1221
1221
|
rt,
|
|
1222
1222
|
{
|
|
1223
1223
|
Get: y(
|
|
1224
|
-
|
|
1224
|
+
Rt
|
|
1225
1225
|
),
|
|
1226
1226
|
Post: y(
|
|
1227
|
-
|
|
1227
|
+
Rt
|
|
1228
1228
|
)
|
|
1229
1229
|
}
|
|
1230
|
-
),
|
|
1230
|
+
), ls = nt(
|
|
1231
1231
|
rt,
|
|
1232
1232
|
{
|
|
1233
|
-
Name: y(
|
|
1234
|
-
Title: y(
|
|
1235
|
-
Abstract: y(
|
|
1236
|
-
LegendURL: pt(
|
|
1237
|
-
StyleSheetURL: y(
|
|
1238
|
-
StyleURL: y(
|
|
1233
|
+
Name: y(O),
|
|
1234
|
+
Title: y(O),
|
|
1235
|
+
Abstract: y(O),
|
|
1236
|
+
LegendURL: pt(dr),
|
|
1237
|
+
StyleSheetURL: y(Rt),
|
|
1238
|
+
StyleURL: y(Rt)
|
|
1239
1239
|
}
|
|
1240
|
-
),
|
|
1240
|
+
), ds = nt(
|
|
1241
1241
|
rt,
|
|
1242
1242
|
{
|
|
1243
|
-
Format: y(
|
|
1244
|
-
OnlineResource: y(
|
|
1243
|
+
Format: y(O),
|
|
1244
|
+
OnlineResource: y(dn)
|
|
1245
1245
|
}
|
|
1246
|
-
),
|
|
1246
|
+
), cs = nt(
|
|
1247
1247
|
rt,
|
|
1248
1248
|
{
|
|
1249
|
-
Keyword:
|
|
1249
|
+
Keyword: ar(O)
|
|
1250
1250
|
}
|
|
1251
1251
|
);
|
|
1252
|
-
class
|
|
1252
|
+
class us {
|
|
1253
1253
|
/**
|
|
1254
1254
|
* WMS Capabilities parser
|
|
1255
1255
|
*
|
|
@@ -1257,7 +1257,7 @@ class cs {
|
|
|
1257
1257
|
* @constructor
|
|
1258
1258
|
*/
|
|
1259
1259
|
constructor(t, e) {
|
|
1260
|
-
!e && typeof window < "u" && (e = window.DOMParser), this.version = void 0, this._parser = new
|
|
1260
|
+
!e && typeof window < "u" && (e = window.DOMParser), this.version = void 0, this._parser = new xo(e), this._data = t;
|
|
1261
1261
|
}
|
|
1262
1262
|
/**
|
|
1263
1263
|
* @param {String} xmlString
|
|
@@ -1297,42 +1297,42 @@ class cs {
|
|
|
1297
1297
|
readFromNode(t) {
|
|
1298
1298
|
return this.version = t.getAttribute("version"), Q({
|
|
1299
1299
|
version: this.version
|
|
1300
|
-
},
|
|
1300
|
+
}, Wo, t, []) || null;
|
|
1301
1301
|
}
|
|
1302
1302
|
}
|
|
1303
|
-
async function
|
|
1303
|
+
async function hs(i) {
|
|
1304
1304
|
let t = new URL(i), e = t.searchParams;
|
|
1305
1305
|
e.set("SERVICE", "WMS"), e.set("REQUEST", "GetCapabilities");
|
|
1306
1306
|
let n = t.toString();
|
|
1307
1307
|
const r = await fetch(n);
|
|
1308
1308
|
if (r.ok) {
|
|
1309
1309
|
const o = await r.text();
|
|
1310
|
-
return new
|
|
1310
|
+
return new us(o).toJSON();
|
|
1311
1311
|
} else
|
|
1312
1312
|
throw new Error(`Error: ${r.status}`);
|
|
1313
1313
|
}
|
|
1314
|
-
function
|
|
1314
|
+
function cn(i) {
|
|
1315
1315
|
const t = /\b(?:wms|ows)\b/i, e = /{(?:z|x|y-?)}\/{(?:z|x|y-?)}\/{(?:z|x|y-?)}/i;
|
|
1316
1316
|
return t.test(i) ? "TileWMS" : e.test(i) ? "XYZ" : !1;
|
|
1317
1317
|
}
|
|
1318
|
-
function
|
|
1319
|
-
const e = /^(?:(?:https?|ftp):\/\/|\/\/)?(?:localhost|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|(?:\w+[\w-]*\.)+\w+)(?::\d+)?(?:\/\S*)?$/.test(i), n =
|
|
1318
|
+
function ps(i) {
|
|
1319
|
+
const e = /^(?:(?:https?|ftp):\/\/|\/\/)?(?:localhost|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|(?:\w+[\w-]*\.)+\w+)(?::\d+)?(?:\/\S*)?$/.test(i), n = cn(i);
|
|
1320
1320
|
return !!(i && e && n);
|
|
1321
1321
|
}
|
|
1322
|
-
function
|
|
1322
|
+
function hr(i) {
|
|
1323
1323
|
return i.replace(
|
|
1324
1324
|
/(['"])?([a-zA-Z0-9_]+)(['"])?:/g,
|
|
1325
1325
|
'"$2": '
|
|
1326
1326
|
).replace(/,\s*}/g, "}").replace(/,\s*]/g, "]").replace(/\s*(\{|}|\[|\]|,)\s*/g, "$1").replaceAll('": //', "://");
|
|
1327
1327
|
}
|
|
1328
|
-
function
|
|
1328
|
+
function fs(i) {
|
|
1329
1329
|
try {
|
|
1330
|
-
return JSON.parse(
|
|
1330
|
+
return JSON.parse(hr(i)), !!i;
|
|
1331
1331
|
} catch {
|
|
1332
1332
|
return !1;
|
|
1333
1333
|
}
|
|
1334
1334
|
}
|
|
1335
|
-
function
|
|
1335
|
+
function gs(i, t) {
|
|
1336
1336
|
const e = new URL(i).searchParams;
|
|
1337
1337
|
Object.entries(t).forEach(([s, a]) => {
|
|
1338
1338
|
typeof a == "object" && !Array.isArray(a) && a !== null ? Object.keys(a).forEach((l) => {
|
|
@@ -1348,7 +1348,7 @@ function fs(i, t) {
|
|
|
1348
1348
|
* @author owenm <owen23355@gmail.com>
|
|
1349
1349
|
* @license MIT
|
|
1350
1350
|
*/
|
|
1351
|
-
function
|
|
1351
|
+
function On(i, t) {
|
|
1352
1352
|
var e = Object.keys(i);
|
|
1353
1353
|
if (Object.getOwnPropertySymbols) {
|
|
1354
1354
|
var n = Object.getOwnPropertySymbols(i);
|
|
@@ -1358,26 +1358,26 @@ function Pn(i, t) {
|
|
|
1358
1358
|
}
|
|
1359
1359
|
return e;
|
|
1360
1360
|
}
|
|
1361
|
-
function
|
|
1361
|
+
function At(i) {
|
|
1362
1362
|
for (var t = 1; t < arguments.length; t++) {
|
|
1363
1363
|
var e = arguments[t] != null ? arguments[t] : {};
|
|
1364
|
-
t % 2 ?
|
|
1365
|
-
|
|
1366
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(e)) :
|
|
1364
|
+
t % 2 ? On(Object(e), !0).forEach(function(n) {
|
|
1365
|
+
ms(i, n, e[n]);
|
|
1366
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(e)) : On(Object(e)).forEach(function(n) {
|
|
1367
1367
|
Object.defineProperty(i, n, Object.getOwnPropertyDescriptor(e, n));
|
|
1368
1368
|
});
|
|
1369
1369
|
}
|
|
1370
1370
|
return i;
|
|
1371
1371
|
}
|
|
1372
|
-
function
|
|
1372
|
+
function ze(i) {
|
|
1373
1373
|
"@babel/helpers - typeof";
|
|
1374
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ?
|
|
1374
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? ze = function(t) {
|
|
1375
1375
|
return typeof t;
|
|
1376
|
-
} :
|
|
1376
|
+
} : ze = function(t) {
|
|
1377
1377
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1378
|
-
},
|
|
1378
|
+
}, ze(i);
|
|
1379
1379
|
}
|
|
1380
|
-
function
|
|
1380
|
+
function ms(i, t, e) {
|
|
1381
1381
|
return t in i ? Object.defineProperty(i, t, {
|
|
1382
1382
|
value: e,
|
|
1383
1383
|
enumerable: !0,
|
|
@@ -1395,16 +1395,16 @@ function Lt() {
|
|
|
1395
1395
|
return i;
|
|
1396
1396
|
}, Lt.apply(this, arguments);
|
|
1397
1397
|
}
|
|
1398
|
-
function
|
|
1398
|
+
function ys(i, t) {
|
|
1399
1399
|
if (i == null) return {};
|
|
1400
1400
|
var e = {}, n = Object.keys(i), r, o;
|
|
1401
1401
|
for (o = 0; o < n.length; o++)
|
|
1402
1402
|
r = n[o], !(t.indexOf(r) >= 0) && (e[r] = i[r]);
|
|
1403
1403
|
return e;
|
|
1404
1404
|
}
|
|
1405
|
-
function
|
|
1405
|
+
function bs(i, t) {
|
|
1406
1406
|
if (i == null) return {};
|
|
1407
|
-
var e =
|
|
1407
|
+
var e = ys(i, t), n, r;
|
|
1408
1408
|
if (Object.getOwnPropertySymbols) {
|
|
1409
1409
|
var o = Object.getOwnPropertySymbols(i);
|
|
1410
1410
|
for (r = 0; r < o.length; r++)
|
|
@@ -1412,22 +1412,22 @@ function ys(i, t) {
|
|
|
1412
1412
|
}
|
|
1413
1413
|
return e;
|
|
1414
1414
|
}
|
|
1415
|
-
var
|
|
1416
|
-
function
|
|
1415
|
+
var vs = "1.15.6";
|
|
1416
|
+
function Ot(i) {
|
|
1417
1417
|
if (typeof window < "u" && window.navigator)
|
|
1418
1418
|
return !!/* @__PURE__ */ navigator.userAgent.match(i);
|
|
1419
1419
|
}
|
|
1420
|
-
var
|
|
1420
|
+
var Mt = Ot(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Me = Ot(/Edge/i), Rn = Ot(/firefox/i), xe = Ot(/safari/i) && !Ot(/chrome/i) && !Ot(/android/i), un = Ot(/iP(ad|od|hone)/i), pr = Ot(/chrome/i) && Ot(/android/i), fr = {
|
|
1421
1421
|
capture: !1,
|
|
1422
1422
|
passive: !1
|
|
1423
1423
|
};
|
|
1424
|
-
function
|
|
1425
|
-
i.addEventListener(t, e, !
|
|
1424
|
+
function T(i, t, e) {
|
|
1425
|
+
i.addEventListener(t, e, !Mt && fr);
|
|
1426
1426
|
}
|
|
1427
1427
|
function _(i, t, e) {
|
|
1428
|
-
i.removeEventListener(t, e, !
|
|
1428
|
+
i.removeEventListener(t, e, !Mt && fr);
|
|
1429
1429
|
}
|
|
1430
|
-
function
|
|
1430
|
+
function Qe(i, t) {
|
|
1431
1431
|
if (t) {
|
|
1432
1432
|
if (t[0] === ">" && (t = t.substring(1)), i)
|
|
1433
1433
|
try {
|
|
@@ -1443,28 +1443,28 @@ function Ke(i, t) {
|
|
|
1443
1443
|
return !1;
|
|
1444
1444
|
}
|
|
1445
1445
|
}
|
|
1446
|
-
function
|
|
1446
|
+
function gr(i) {
|
|
1447
1447
|
return i.host && i !== document && i.host.nodeType ? i.host : i.parentNode;
|
|
1448
1448
|
}
|
|
1449
|
-
function
|
|
1449
|
+
function Et(i, t, e, n) {
|
|
1450
1450
|
if (i) {
|
|
1451
1451
|
e = e || document;
|
|
1452
1452
|
do {
|
|
1453
|
-
if (t != null && (t[0] === ">" ? i.parentNode === e &&
|
|
1453
|
+
if (t != null && (t[0] === ">" ? i.parentNode === e && Qe(i, t) : Qe(i, t)) || n && i === e)
|
|
1454
1454
|
return i;
|
|
1455
1455
|
if (i === e) break;
|
|
1456
|
-
} while (i =
|
|
1456
|
+
} while (i = gr(i));
|
|
1457
1457
|
}
|
|
1458
1458
|
return null;
|
|
1459
1459
|
}
|
|
1460
|
-
var
|
|
1460
|
+
var Ln = /\s+/g;
|
|
1461
1461
|
function mt(i, t, e) {
|
|
1462
1462
|
if (i && t)
|
|
1463
1463
|
if (i.classList)
|
|
1464
1464
|
i.classList[e ? "add" : "remove"](t);
|
|
1465
1465
|
else {
|
|
1466
|
-
var n = (" " + i.className + " ").replace(
|
|
1467
|
-
i.className = (n + (e ? " " + t : "")).replace(
|
|
1466
|
+
var n = (" " + i.className + " ").replace(Ln, " ").replace(" " + t + " ", " ");
|
|
1467
|
+
i.className = (n + (e ? " " + t : "")).replace(Ln, " ");
|
|
1468
1468
|
}
|
|
1469
1469
|
}
|
|
1470
1470
|
function v(i, t, e) {
|
|
@@ -1487,7 +1487,7 @@ function de(i, t) {
|
|
|
1487
1487
|
var r = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
1488
1488
|
return r && new r(e);
|
|
1489
1489
|
}
|
|
1490
|
-
function
|
|
1490
|
+
function mr(i, t, e) {
|
|
1491
1491
|
if (i) {
|
|
1492
1492
|
var n = i.getElementsByTagName(t), r = 0, o = n.length;
|
|
1493
1493
|
if (e)
|
|
@@ -1497,14 +1497,14 @@ function gr(i, t, e) {
|
|
|
1497
1497
|
}
|
|
1498
1498
|
return [];
|
|
1499
1499
|
}
|
|
1500
|
-
function
|
|
1500
|
+
function St() {
|
|
1501
1501
|
var i = document.scrollingElement;
|
|
1502
1502
|
return i || document.documentElement;
|
|
1503
1503
|
}
|
|
1504
1504
|
function W(i, t, e, n, r) {
|
|
1505
1505
|
if (!(!i.getBoundingClientRect && i !== window)) {
|
|
1506
1506
|
var o, s, a, l, d, u, c;
|
|
1507
|
-
if (i !== window && i.parentNode && i !==
|
|
1507
|
+
if (i !== window && i.parentNode && i !== St() ? (o = i.getBoundingClientRect(), s = o.top, a = o.left, l = o.bottom, d = o.right, u = o.height, c = o.width) : (s = 0, a = 0, l = window.innerHeight, d = window.innerWidth, u = window.innerHeight, c = window.innerWidth), (t || e) && i !== window && (r = r || i.parentNode, !Mt))
|
|
1508
1508
|
do
|
|
1509
1509
|
if (r && r.getBoundingClientRect && (v(r, "transform") !== "none" || e && v(r, "position") !== "static")) {
|
|
1510
1510
|
var p = r.getBoundingClientRect();
|
|
@@ -1526,18 +1526,18 @@ function W(i, t, e, n, r) {
|
|
|
1526
1526
|
};
|
|
1527
1527
|
}
|
|
1528
1528
|
}
|
|
1529
|
-
function
|
|
1530
|
-
for (var n =
|
|
1529
|
+
function Mn(i, t, e) {
|
|
1530
|
+
for (var n = Bt(i, !0), r = W(i)[t]; n; ) {
|
|
1531
1531
|
var o = W(n)[e], s = void 0;
|
|
1532
1532
|
if (s = r >= o, !s) return n;
|
|
1533
|
-
if (n ===
|
|
1534
|
-
n =
|
|
1533
|
+
if (n === St()) break;
|
|
1534
|
+
n = Bt(n, !1);
|
|
1535
1535
|
}
|
|
1536
1536
|
return !1;
|
|
1537
1537
|
}
|
|
1538
1538
|
function ue(i, t, e, n) {
|
|
1539
1539
|
for (var r = 0, o = 0, s = i.children; o < s.length; ) {
|
|
1540
|
-
if (s[o].style.display !== "none" && s[o] !== w.ghost && (n || s[o] !== w.dragged) &&
|
|
1540
|
+
if (s[o].style.display !== "none" && s[o] !== w.ghost && (n || s[o] !== w.dragged) && Et(s[o], e.draggable, i, !1)) {
|
|
1541
1541
|
if (r === t)
|
|
1542
1542
|
return s[o];
|
|
1543
1543
|
r++;
|
|
@@ -1546,8 +1546,8 @@ function ue(i, t, e, n) {
|
|
|
1546
1546
|
}
|
|
1547
1547
|
return null;
|
|
1548
1548
|
}
|
|
1549
|
-
function
|
|
1550
|
-
for (var e = i.lastElementChild; e && (e === w.ghost || v(e, "display") === "none" || t && !
|
|
1549
|
+
function hn(i, t) {
|
|
1550
|
+
for (var e = i.lastElementChild; e && (e === w.ghost || v(e, "display") === "none" || t && !Qe(e, t)); )
|
|
1551
1551
|
e = e.previousElementSibling;
|
|
1552
1552
|
return e || null;
|
|
1553
1553
|
}
|
|
@@ -1556,11 +1556,11 @@ function bt(i, t) {
|
|
|
1556
1556
|
if (!i || !i.parentNode)
|
|
1557
1557
|
return -1;
|
|
1558
1558
|
for (; i = i.previousElementSibling; )
|
|
1559
|
-
i.nodeName.toUpperCase() !== "TEMPLATE" && i !== w.clone && (!t ||
|
|
1559
|
+
i.nodeName.toUpperCase() !== "TEMPLATE" && i !== w.clone && (!t || Qe(i, t)) && e++;
|
|
1560
1560
|
return e;
|
|
1561
1561
|
}
|
|
1562
|
-
function
|
|
1563
|
-
var t = 0, e = 0, n =
|
|
1562
|
+
function In(i) {
|
|
1563
|
+
var t = 0, e = 0, n = St();
|
|
1564
1564
|
if (i)
|
|
1565
1565
|
do {
|
|
1566
1566
|
var r = de(i), o = r.a, s = r.d;
|
|
@@ -1568,7 +1568,7 @@ function Mn(i) {
|
|
|
1568
1568
|
} while (i !== n && (i = i.parentNode));
|
|
1569
1569
|
return [t, e];
|
|
1570
1570
|
}
|
|
1571
|
-
function
|
|
1571
|
+
function ws(i, t) {
|
|
1572
1572
|
for (var e in i)
|
|
1573
1573
|
if (i.hasOwnProperty(e)) {
|
|
1574
1574
|
for (var n in t)
|
|
@@ -1576,56 +1576,56 @@ function vs(i, t) {
|
|
|
1576
1576
|
}
|
|
1577
1577
|
return -1;
|
|
1578
1578
|
}
|
|
1579
|
-
function
|
|
1580
|
-
if (!i || !i.getBoundingClientRect) return
|
|
1579
|
+
function Bt(i, t) {
|
|
1580
|
+
if (!i || !i.getBoundingClientRect) return St();
|
|
1581
1581
|
var e = i, n = !1;
|
|
1582
1582
|
do
|
|
1583
1583
|
if (e.clientWidth < e.scrollWidth || e.clientHeight < e.scrollHeight) {
|
|
1584
1584
|
var r = v(e);
|
|
1585
1585
|
if (e.clientWidth < e.scrollWidth && (r.overflowX == "auto" || r.overflowX == "scroll") || e.clientHeight < e.scrollHeight && (r.overflowY == "auto" || r.overflowY == "scroll")) {
|
|
1586
|
-
if (!e.getBoundingClientRect || e === document.body) return
|
|
1586
|
+
if (!e.getBoundingClientRect || e === document.body) return St();
|
|
1587
1587
|
if (n || t) return e;
|
|
1588
1588
|
n = !0;
|
|
1589
1589
|
}
|
|
1590
1590
|
}
|
|
1591
1591
|
while (e = e.parentNode);
|
|
1592
|
-
return
|
|
1592
|
+
return St();
|
|
1593
1593
|
}
|
|
1594
|
-
function
|
|
1594
|
+
function xs(i, t) {
|
|
1595
1595
|
if (i && t)
|
|
1596
1596
|
for (var e in t)
|
|
1597
1597
|
t.hasOwnProperty(e) && (i[e] = t[e]);
|
|
1598
1598
|
return i;
|
|
1599
1599
|
}
|
|
1600
|
-
function
|
|
1600
|
+
function Ni(i, t) {
|
|
1601
1601
|
return Math.round(i.top) === Math.round(t.top) && Math.round(i.left) === Math.round(t.left) && Math.round(i.height) === Math.round(t.height) && Math.round(i.width) === Math.round(t.width);
|
|
1602
1602
|
}
|
|
1603
|
-
var
|
|
1604
|
-
function
|
|
1603
|
+
var Ee;
|
|
1604
|
+
function yr(i, t) {
|
|
1605
1605
|
return function() {
|
|
1606
|
-
if (
|
|
1606
|
+
if (!Ee) {
|
|
1607
1607
|
var e = arguments, n = this;
|
|
1608
|
-
e.length === 1 ? i.call(n, e[0]) : i.apply(n, e),
|
|
1609
|
-
|
|
1608
|
+
e.length === 1 ? i.call(n, e[0]) : i.apply(n, e), Ee = setTimeout(function() {
|
|
1609
|
+
Ee = void 0;
|
|
1610
1610
|
}, t);
|
|
1611
1611
|
}
|
|
1612
1612
|
};
|
|
1613
1613
|
}
|
|
1614
|
-
function
|
|
1615
|
-
clearTimeout(
|
|
1614
|
+
function Es() {
|
|
1615
|
+
clearTimeout(Ee), Ee = void 0;
|
|
1616
1616
|
}
|
|
1617
|
-
function
|
|
1617
|
+
function br(i, t, e) {
|
|
1618
1618
|
i.scrollLeft += t, i.scrollTop += e;
|
|
1619
1619
|
}
|
|
1620
|
-
function
|
|
1620
|
+
function vr(i) {
|
|
1621
1621
|
var t = window.Polymer, e = window.jQuery || window.Zepto;
|
|
1622
1622
|
return t && t.dom ? t.dom(i).cloneNode(!0) : e ? e(i).clone(!0)[0] : i.cloneNode(!0);
|
|
1623
1623
|
}
|
|
1624
|
-
function
|
|
1624
|
+
function wr(i, t, e) {
|
|
1625
1625
|
var n = {};
|
|
1626
1626
|
return Array.from(i.children).forEach(function(r) {
|
|
1627
1627
|
var o, s, a, l;
|
|
1628
|
-
if (!(!
|
|
1628
|
+
if (!(!Et(r, t.draggable, i, !1) || r.animated || r === e)) {
|
|
1629
1629
|
var d = W(r);
|
|
1630
1630
|
n.left = Math.min((o = n.left) !== null && o !== void 0 ? o : 1 / 0, d.left), n.top = Math.min((s = n.top) !== null && s !== void 0 ? s : 1 / 0, d.top), n.right = Math.max((a = n.right) !== null && a !== void 0 ? a : -1 / 0, d.right), n.bottom = Math.max((l = n.bottom) !== null && l !== void 0 ? l : -1 / 0, d.bottom);
|
|
1631
1631
|
}
|
|
@@ -1644,7 +1644,7 @@ function $s() {
|
|
|
1644
1644
|
target: r,
|
|
1645
1645
|
rect: W(r)
|
|
1646
1646
|
});
|
|
1647
|
-
var o =
|
|
1647
|
+
var o = At({}, i[i.length - 1].rect);
|
|
1648
1648
|
if (r.thisAnimationDuration) {
|
|
1649
1649
|
var s = de(r, !0);
|
|
1650
1650
|
s && (o.top -= s.f, o.left -= s.e);
|
|
@@ -1658,7 +1658,7 @@ function $s() {
|
|
|
1658
1658
|
i.push(n);
|
|
1659
1659
|
},
|
|
1660
1660
|
removeAnimationState: function(n) {
|
|
1661
|
-
i.splice(
|
|
1661
|
+
i.splice(ws(i, {
|
|
1662
1662
|
target: n
|
|
1663
1663
|
}), 1);
|
|
1664
1664
|
},
|
|
@@ -1671,8 +1671,8 @@ function $s() {
|
|
|
1671
1671
|
var o = !1, s = 0;
|
|
1672
1672
|
i.forEach(function(a) {
|
|
1673
1673
|
var l = 0, d = a.target, u = d.fromRect, c = W(d), p = d.prevFromRect, f = d.prevToRect, g = a.rect, b = de(d, !0);
|
|
1674
|
-
b && (c.top -= b.f, c.left -= b.e), d.toRect = c, d.thisAnimationDuration &&
|
|
1675
|
-
(g.top - c.top) / (g.left - c.left) === (u.top - c.top) / (u.left - c.left) && (l =
|
|
1674
|
+
b && (c.top -= b.f, c.left -= b.e), d.toRect = c, d.thisAnimationDuration && Ni(p, c) && !Ni(u, c) && // Make sure animatingRect is on line between toRect & fromRect
|
|
1675
|
+
(g.top - c.top) / (g.left - c.left) === (u.top - c.top) / (u.left - c.left) && (l = As(g, p, f, r.options)), Ni(c, u) || (d.prevFromRect = u, d.prevToRect = c, l || (l = r.options.animation), r.animate(d, g, c, l)), l && (o = !0, s = Math.max(s, l), clearTimeout(d.animationResetTimer), d.animationResetTimer = setTimeout(function() {
|
|
1676
1676
|
d.animationTime = 0, d.prevFromRect = null, d.fromRect = null, d.prevToRect = null, d.thisAnimationDuration = null;
|
|
1677
1677
|
}, l), d.thisAnimationDuration = l);
|
|
1678
1678
|
}), clearTimeout(t), o ? t = setTimeout(function() {
|
|
@@ -1683,25 +1683,25 @@ function $s() {
|
|
|
1683
1683
|
if (s) {
|
|
1684
1684
|
v(n, "transition", ""), v(n, "transform", "");
|
|
1685
1685
|
var a = de(this.el), l = a && a.a, d = a && a.d, u = (r.left - o.left) / (l || 1), c = (r.top - o.top) / (d || 1);
|
|
1686
|
-
n.animatingX = !!u, n.animatingY = !!c, v(n, "transform", "translate3d(" + u + "px," + c + "px,0)"), this.forRepaintDummy =
|
|
1686
|
+
n.animatingX = !!u, n.animatingY = !!c, v(n, "transform", "translate3d(" + u + "px," + c + "px,0)"), this.forRepaintDummy = Ss(n), v(n, "transition", "transform " + s + "ms" + (this.options.easing ? " " + this.options.easing : "")), v(n, "transform", "translate3d(0,0,0)"), typeof n.animated == "number" && clearTimeout(n.animated), n.animated = setTimeout(function() {
|
|
1687
1687
|
v(n, "transition", ""), v(n, "transform", ""), n.animated = !1, n.animatingX = !1, n.animatingY = !1;
|
|
1688
1688
|
}, s);
|
|
1689
1689
|
}
|
|
1690
1690
|
}
|
|
1691
1691
|
};
|
|
1692
1692
|
}
|
|
1693
|
-
function
|
|
1693
|
+
function Ss(i) {
|
|
1694
1694
|
return i.offsetWidth;
|
|
1695
1695
|
}
|
|
1696
|
-
function
|
|
1696
|
+
function As(i, t, e, n) {
|
|
1697
1697
|
return Math.sqrt(Math.pow(t.top - i.top, 2) + Math.pow(t.left - i.left, 2)) / Math.sqrt(Math.pow(t.top - e.top, 2) + Math.pow(t.left - e.left, 2)) * n.animation;
|
|
1698
1698
|
}
|
|
1699
|
-
var ie = [],
|
|
1699
|
+
var ie = [], Hi = {
|
|
1700
1700
|
initializeByDefault: !0
|
|
1701
1701
|
}, Ie = {
|
|
1702
1702
|
mount: function(t) {
|
|
1703
|
-
for (var e in
|
|
1704
|
-
|
|
1703
|
+
for (var e in Hi)
|
|
1704
|
+
Hi.hasOwnProperty(e) && !(e in t) && (t[e] = Hi[e]);
|
|
1705
1705
|
ie.forEach(function(n) {
|
|
1706
1706
|
if (n.pluginName === t.pluginName)
|
|
1707
1707
|
throw "Sortable: Cannot mount plugin ".concat(t.pluginName, " more than once");
|
|
@@ -1714,9 +1714,9 @@ var ie = [], Ni = {
|
|
|
1714
1714
|
};
|
|
1715
1715
|
var o = t + "Global";
|
|
1716
1716
|
ie.forEach(function(s) {
|
|
1717
|
-
e[s.pluginName] && (e[s.pluginName][o] && e[s.pluginName][o](
|
|
1717
|
+
e[s.pluginName] && (e[s.pluginName][o] && e[s.pluginName][o](At({
|
|
1718
1718
|
sortable: e
|
|
1719
|
-
}, n)), e.options[s.pluginName] && e[s.pluginName][t] && e[s.pluginName][t](
|
|
1719
|
+
}, n)), e.options[s.pluginName] && e[s.pluginName][t] && e[s.pluginName][t](At({
|
|
1720
1720
|
sortable: e
|
|
1721
1721
|
}, n)));
|
|
1722
1722
|
});
|
|
@@ -1748,46 +1748,46 @@ var ie = [], Ni = {
|
|
|
1748
1748
|
}), r;
|
|
1749
1749
|
}
|
|
1750
1750
|
};
|
|
1751
|
-
function
|
|
1751
|
+
function Cs(i) {
|
|
1752
1752
|
var t = i.sortable, e = i.rootEl, n = i.name, r = i.targetEl, o = i.cloneEl, s = i.toEl, a = i.fromEl, l = i.oldIndex, d = i.newIndex, u = i.oldDraggableIndex, c = i.newDraggableIndex, p = i.originalEvent, f = i.putSortable, g = i.extraEventProperties;
|
|
1753
1753
|
if (t = t || e && e[ft], !!t) {
|
|
1754
1754
|
var b, N = t.options, J = "on" + n.charAt(0).toUpperCase() + n.substr(1);
|
|
1755
|
-
window.CustomEvent && !
|
|
1755
|
+
window.CustomEvent && !Mt && !Me ? b = new CustomEvent(n, {
|
|
1756
1756
|
bubbles: !0,
|
|
1757
1757
|
cancelable: !0
|
|
1758
1758
|
}) : (b = document.createEvent("Event"), b.initEvent(n, !0, !0)), b.to = s || e, b.from = a || e, b.item = r || e, b.clone = o, b.oldIndex = l, b.newIndex = d, b.oldDraggableIndex = u, b.newDraggableIndex = c, b.originalEvent = p, b.pullMode = f ? f.lastPutMode : void 0;
|
|
1759
|
-
var F =
|
|
1759
|
+
var F = At(At({}, g), Ie.getEventProperties(n, t));
|
|
1760
1760
|
for (var st in F)
|
|
1761
1761
|
b[st] = F[st];
|
|
1762
1762
|
e && e.dispatchEvent(b), N[J] && N[J].call(t, b);
|
|
1763
1763
|
}
|
|
1764
1764
|
}
|
|
1765
1765
|
var _s = ["evt"], ht = function(t, e) {
|
|
1766
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, o =
|
|
1767
|
-
Ie.pluginEvent.bind(w)(t, e,
|
|
1766
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, o = bs(n, _s);
|
|
1767
|
+
Ie.pluginEvent.bind(w)(t, e, At({
|
|
1768
1768
|
dragEl: h,
|
|
1769
1769
|
parentEl: z,
|
|
1770
|
-
ghostEl:
|
|
1771
|
-
rootEl:
|
|
1772
|
-
nextEl:
|
|
1773
|
-
lastDownEl:
|
|
1770
|
+
ghostEl: E,
|
|
1771
|
+
rootEl: V,
|
|
1772
|
+
nextEl: Jt,
|
|
1773
|
+
lastDownEl: Ze,
|
|
1774
1774
|
cloneEl: U,
|
|
1775
|
-
cloneHidden:
|
|
1775
|
+
cloneHidden: Vt,
|
|
1776
1776
|
dragStarted: me,
|
|
1777
1777
|
putSortable: et,
|
|
1778
1778
|
activeSortable: w.active,
|
|
1779
1779
|
originalEvent: r,
|
|
1780
1780
|
oldIndex: le,
|
|
1781
|
-
oldDraggableIndex:
|
|
1781
|
+
oldDraggableIndex: $e,
|
|
1782
1782
|
newIndex: yt,
|
|
1783
|
-
newDraggableIndex:
|
|
1784
|
-
hideGhostForTarget:
|
|
1785
|
-
unhideGhostForTarget:
|
|
1783
|
+
newDraggableIndex: Ht,
|
|
1784
|
+
hideGhostForTarget: Sr,
|
|
1785
|
+
unhideGhostForTarget: Ar,
|
|
1786
1786
|
cloneNowHidden: function() {
|
|
1787
|
-
|
|
1787
|
+
Vt = !0;
|
|
1788
1788
|
},
|
|
1789
1789
|
cloneNowShown: function() {
|
|
1790
|
-
|
|
1790
|
+
Vt = !1;
|
|
1791
1791
|
},
|
|
1792
1792
|
dispatchSortableEvent: function(a) {
|
|
1793
1793
|
at({
|
|
@@ -1799,25 +1799,25 @@ var _s = ["evt"], ht = function(t, e) {
|
|
|
1799
1799
|
}, o));
|
|
1800
1800
|
};
|
|
1801
1801
|
function at(i) {
|
|
1802
|
-
|
|
1802
|
+
Cs(At({
|
|
1803
1803
|
putSortable: et,
|
|
1804
1804
|
cloneEl: U,
|
|
1805
1805
|
targetEl: h,
|
|
1806
|
-
rootEl:
|
|
1806
|
+
rootEl: V,
|
|
1807
1807
|
oldIndex: le,
|
|
1808
|
-
oldDraggableIndex:
|
|
1808
|
+
oldDraggableIndex: $e,
|
|
1809
1809
|
newIndex: yt,
|
|
1810
|
-
newDraggableIndex:
|
|
1810
|
+
newDraggableIndex: Ht
|
|
1811
1811
|
}, i));
|
|
1812
1812
|
}
|
|
1813
|
-
var h, z,
|
|
1814
|
-
if (
|
|
1815
|
-
if (
|
|
1813
|
+
var h, z, E, V, Jt, Ze, U, Vt, le, yt, $e, Ht, Ve, et, oe = !1, ti = !1, ei = [], Wt, xt, Vi, ki, Nn, Hn, me, ne, Se, Ae = !1, ke = !1, qe, ot, Bi = [], Yi = !1, ii = [], Ci = typeof document < "u", Be = un, Vn = Me || Mt ? "cssFloat" : "float", Ts = Ci && !pr && !un && "draggable" in document.createElement("div"), xr = function() {
|
|
1814
|
+
if (Ci) {
|
|
1815
|
+
if (Mt)
|
|
1816
1816
|
return !1;
|
|
1817
1817
|
var i = document.createElement("x");
|
|
1818
1818
|
return i.style.cssText = "pointer-events:auto", i.style.pointerEvents === "auto";
|
|
1819
1819
|
}
|
|
1820
|
-
}(),
|
|
1820
|
+
}(), Er = function(t, e) {
|
|
1821
1821
|
var n = v(t), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), o = ue(t, 0, e), s = ue(t, 1, e), a = o && v(o), l = s && v(s), d = a && parseInt(a.marginLeft) + parseInt(a.marginRight) + W(o).width, u = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + W(s).width;
|
|
1822
1822
|
if (n.display === "flex")
|
|
1823
1823
|
return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
@@ -1827,15 +1827,15 @@ var h, z, $, k, Gt, ze, U, Ht, le, yt, Ee, Nt, ke, et, oe = !1, Qe = !1, ti = []
|
|
|
1827
1827
|
var c = a.float === "left" ? "left" : "right";
|
|
1828
1828
|
return s && (l.clear === "both" || l.clear === c) ? "vertical" : "horizontal";
|
|
1829
1829
|
}
|
|
1830
|
-
return o && (a.display === "block" || a.display === "flex" || a.display === "table" || a.display === "grid" || d >= r && n[
|
|
1831
|
-
},
|
|
1830
|
+
return o && (a.display === "block" || a.display === "flex" || a.display === "table" || a.display === "grid" || d >= r && n[Vn] === "none" || s && n[Vn] === "none" && d + u > r) ? "vertical" : "horizontal";
|
|
1831
|
+
}, Ds = function(t, e, n) {
|
|
1832
1832
|
var r = n ? t.left : t.top, o = n ? t.right : t.bottom, s = n ? t.width : t.height, a = n ? e.left : e.top, l = n ? e.right : e.bottom, d = n ? e.width : e.height;
|
|
1833
1833
|
return r === a || o === l || r + s / 2 === a + d / 2;
|
|
1834
|
-
},
|
|
1834
|
+
}, Ps = function(t, e) {
|
|
1835
1835
|
var n;
|
|
1836
|
-
return
|
|
1836
|
+
return ei.some(function(r) {
|
|
1837
1837
|
var o = r[ft].options.emptyInsertThreshold;
|
|
1838
|
-
if (!(!o ||
|
|
1838
|
+
if (!(!o || hn(r))) {
|
|
1839
1839
|
var s = W(r), a = t >= s.left - o && t <= s.right + o, l = e >= s.top - o && e <= s.bottom + o;
|
|
1840
1840
|
if (a && l)
|
|
1841
1841
|
return n = r;
|
|
@@ -1858,22 +1858,22 @@ var h, z, $, k, Gt, ze, U, Ht, le, yt, Ee, Nt, ke, et, oe = !1, Qe = !1, ti = []
|
|
|
1858
1858
|
};
|
|
1859
1859
|
}
|
|
1860
1860
|
var n = {}, r = t.group;
|
|
1861
|
-
(!r ||
|
|
1861
|
+
(!r || ze(r) != "object") && (r = {
|
|
1862
1862
|
name: r
|
|
1863
1863
|
}), n.name = r.name, n.checkPull = e(r.pull, !0), n.checkPut = e(r.put), n.revertClone = r.revertClone, t.group = n;
|
|
1864
|
-
}, Er = function() {
|
|
1865
|
-
!wr && $ && v($, "display", "none");
|
|
1866
1864
|
}, Sr = function() {
|
|
1867
|
-
!
|
|
1865
|
+
!xr && E && v(E, "display", "none");
|
|
1866
|
+
}, Ar = function() {
|
|
1867
|
+
!xr && E && v(E, "display", "");
|
|
1868
1868
|
};
|
|
1869
|
-
|
|
1870
|
-
if (
|
|
1871
|
-
return i.preventDefault(), i.stopPropagation && i.stopPropagation(), i.stopImmediatePropagation && i.stopImmediatePropagation(),
|
|
1869
|
+
Ci && !pr && document.addEventListener("click", function(i) {
|
|
1870
|
+
if (ti)
|
|
1871
|
+
return i.preventDefault(), i.stopPropagation && i.stopPropagation(), i.stopImmediatePropagation && i.stopImmediatePropagation(), ti = !1, !1;
|
|
1872
1872
|
}, !0);
|
|
1873
|
-
var
|
|
1873
|
+
var Gt = function(t) {
|
|
1874
1874
|
if (h) {
|
|
1875
1875
|
t = t.touches ? t.touches[0] : t;
|
|
1876
|
-
var e =
|
|
1876
|
+
var e = Ps(t.clientX, t.clientY);
|
|
1877
1877
|
if (e) {
|
|
1878
1878
|
var n = {};
|
|
1879
1879
|
for (var r in t)
|
|
@@ -1881,7 +1881,7 @@ var Wt = function(t) {
|
|
|
1881
1881
|
n.target = n.rootEl = e, n.preventDefault = void 0, n.stopPropagation = void 0, e[ft]._onDragOver(n);
|
|
1882
1882
|
}
|
|
1883
1883
|
}
|
|
1884
|
-
},
|
|
1884
|
+
}, Os = function(t) {
|
|
1885
1885
|
h && h.parentNode[ft]._isOutsideThisEl(t.target);
|
|
1886
1886
|
};
|
|
1887
1887
|
function w(i, t) {
|
|
@@ -1903,7 +1903,7 @@ function w(i, t) {
|
|
|
1903
1903
|
// will be set to same as swapThreshold if default
|
|
1904
1904
|
removeCloneOnHide: !0,
|
|
1905
1905
|
direction: function() {
|
|
1906
|
-
return
|
|
1906
|
+
return Er(i, this.options);
|
|
1907
1907
|
},
|
|
1908
1908
|
ghostClass: "sortable-ghost",
|
|
1909
1909
|
chosenClass: "sortable-chosen",
|
|
@@ -1931,7 +1931,7 @@ function w(i, t) {
|
|
|
1931
1931
|
y: 0
|
|
1932
1932
|
},
|
|
1933
1933
|
// Disabled on Safari: #1571; Enabled on Safari IOS: #2244
|
|
1934
|
-
supportPointer: w.supportPointer !== !1 && "PointerEvent" in window && (!xe ||
|
|
1934
|
+
supportPointer: w.supportPointer !== !1 && "PointerEvent" in window && (!xe || un),
|
|
1935
1935
|
emptyInsertThreshold: 5
|
|
1936
1936
|
};
|
|
1937
1937
|
Ie.initializePlugins(this, i, e);
|
|
@@ -1940,7 +1940,7 @@ function w(i, t) {
|
|
|
1940
1940
|
$r(t);
|
|
1941
1941
|
for (var r in this)
|
|
1942
1942
|
r.charAt(0) === "_" && typeof this[r] == "function" && (this[r] = this[r].bind(this));
|
|
1943
|
-
this.nativeDraggable = t.forceFallback ? !1 :
|
|
1943
|
+
this.nativeDraggable = t.forceFallback ? !1 : Ts, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? T(i, "pointerdown", this._onTapStart) : (T(i, "mousedown", this._onTapStart), T(i, "touchstart", this._onTapStart)), this.nativeDraggable && (T(i, "dragover", this), T(i, "dragenter", this)), ei.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), Lt(this, $s());
|
|
1944
1944
|
}
|
|
1945
1945
|
w.prototype = /** @lends Sortable.prototype */
|
|
1946
1946
|
{
|
|
@@ -1954,8 +1954,8 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
1954
1954
|
_onTapStart: function(t) {
|
|
1955
1955
|
if (t.cancelable) {
|
|
1956
1956
|
var e = this, n = this.el, r = this.options, o = r.preventOnFilter, s = t.type, a = t.touches && t.touches[0] || t.pointerType && t.pointerType === "touch" && t, l = (a || t).target, d = t.target.shadowRoot && (t.path && t.path[0] || t.composedPath && t.composedPath()[0]) || l, u = r.filter;
|
|
1957
|
-
if (ks(n), !h && !(/mousedown|pointerdown/.test(s) && t.button !== 0 || r.disabled) && !d.isContentEditable && !(!this.nativeDraggable && xe && l && l.tagName.toUpperCase() === "SELECT") && (l =
|
|
1958
|
-
if (le = bt(l),
|
|
1957
|
+
if (ks(n), !h && !(/mousedown|pointerdown/.test(s) && t.button !== 0 || r.disabled) && !d.isContentEditable && !(!this.nativeDraggable && xe && l && l.tagName.toUpperCase() === "SELECT") && (l = Et(l, r.draggable, n, !1), !(l && l.animated) && Ze !== l)) {
|
|
1958
|
+
if (le = bt(l), $e = bt(l, r.draggable), typeof u == "function") {
|
|
1959
1959
|
if (u.call(this, t, l, this)) {
|
|
1960
1960
|
at({
|
|
1961
1961
|
sortable: e,
|
|
@@ -1970,7 +1970,7 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
1970
1970
|
return;
|
|
1971
1971
|
}
|
|
1972
1972
|
} else if (u && (u = u.split(",").some(function(c) {
|
|
1973
|
-
if (c =
|
|
1973
|
+
if (c = Et(d, c.trim(), n, !1), c)
|
|
1974
1974
|
return at({
|
|
1975
1975
|
sortable: e,
|
|
1976
1976
|
rootEl: c,
|
|
@@ -1985,7 +1985,7 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
1985
1985
|
o && t.preventDefault();
|
|
1986
1986
|
return;
|
|
1987
1987
|
}
|
|
1988
|
-
r.handle && !
|
|
1988
|
+
r.handle && !Et(d, r.handle, n, !1) || this._prepareDragStart(t, a, l);
|
|
1989
1989
|
}
|
|
1990
1990
|
}
|
|
1991
1991
|
},
|
|
@@ -1993,32 +1993,32 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
1993
1993
|
var r = this, o = r.el, s = r.options, a = o.ownerDocument, l;
|
|
1994
1994
|
if (n && !h && n.parentNode === o) {
|
|
1995
1995
|
var d = W(n);
|
|
1996
|
-
if (
|
|
1996
|
+
if (V = o, h = n, z = h.parentNode, Jt = h.nextSibling, Ze = n, Ve = s.group, w.dragged = h, Wt = {
|
|
1997
1997
|
target: h,
|
|
1998
1998
|
clientX: (e || t).clientX,
|
|
1999
1999
|
clientY: (e || t).clientY
|
|
2000
|
-
},
|
|
2000
|
+
}, Nn = Wt.clientX - d.left, Hn = Wt.clientY - d.top, this._lastX = (e || t).clientX, this._lastY = (e || t).clientY, h.style["will-change"] = "all", l = function() {
|
|
2001
2001
|
if (ht("delayEnded", r, {
|
|
2002
2002
|
evt: t
|
|
2003
2003
|
}), w.eventCanceled) {
|
|
2004
2004
|
r._onDrop();
|
|
2005
2005
|
return;
|
|
2006
2006
|
}
|
|
2007
|
-
r._disableDelayedDragEvents(), !
|
|
2007
|
+
r._disableDelayedDragEvents(), !Rn && r.nativeDraggable && (h.draggable = !0), r._triggerDragStart(t, e), at({
|
|
2008
2008
|
sortable: r,
|
|
2009
2009
|
name: "choose",
|
|
2010
2010
|
originalEvent: t
|
|
2011
2011
|
}), mt(h, s.chosenClass, !0);
|
|
2012
2012
|
}, s.ignore.split(",").forEach(function(u) {
|
|
2013
|
-
|
|
2014
|
-
}),
|
|
2013
|
+
mr(h, u.trim(), Ui);
|
|
2014
|
+
}), T(a, "dragover", Gt), T(a, "mousemove", Gt), T(a, "touchmove", Gt), s.supportPointer ? (T(a, "pointerup", r._onDrop), !this.nativeDraggable && T(a, "pointercancel", r._onDrop)) : (T(a, "mouseup", r._onDrop), T(a, "touchend", r._onDrop), T(a, "touchcancel", r._onDrop)), Rn && this.nativeDraggable && (this.options.touchStartThreshold = 4, h.draggable = !0), ht("delayStart", this, {
|
|
2015
2015
|
evt: t
|
|
2016
|
-
}), s.delay && (!s.delayOnTouchOnly || e) && (!this.nativeDraggable || !(Me ||
|
|
2016
|
+
}), s.delay && (!s.delayOnTouchOnly || e) && (!this.nativeDraggable || !(Me || Mt))) {
|
|
2017
2017
|
if (w.eventCanceled) {
|
|
2018
2018
|
this._onDrop();
|
|
2019
2019
|
return;
|
|
2020
2020
|
}
|
|
2021
|
-
s.supportPointer ? (
|
|
2021
|
+
s.supportPointer ? (T(a, "pointerup", r._disableDelayedDrag), T(a, "pointercancel", r._disableDelayedDrag)) : (T(a, "mouseup", r._disableDelayedDrag), T(a, "touchend", r._disableDelayedDrag), T(a, "touchcancel", r._disableDelayedDrag)), T(a, "mousemove", r._delayedDragTouchMoveHandler), T(a, "touchmove", r._delayedDragTouchMoveHandler), s.supportPointer && T(a, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(l, s.delay);
|
|
2022
2022
|
} else
|
|
2023
2023
|
l();
|
|
2024
2024
|
}
|
|
@@ -2028,26 +2028,26 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2028
2028
|
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();
|
|
2029
2029
|
},
|
|
2030
2030
|
_disableDelayedDrag: function() {
|
|
2031
|
-
h &&
|
|
2031
|
+
h && Ui(h), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
2032
2032
|
},
|
|
2033
2033
|
_disableDelayedDragEvents: function() {
|
|
2034
2034
|
var t = this.el.ownerDocument;
|
|
2035
2035
|
_(t, "mouseup", this._disableDelayedDrag), _(t, "touchend", this._disableDelayedDrag), _(t, "touchcancel", this._disableDelayedDrag), _(t, "pointerup", this._disableDelayedDrag), _(t, "pointercancel", this._disableDelayedDrag), _(t, "mousemove", this._delayedDragTouchMoveHandler), _(t, "touchmove", this._delayedDragTouchMoveHandler), _(t, "pointermove", this._delayedDragTouchMoveHandler);
|
|
2036
2036
|
},
|
|
2037
2037
|
_triggerDragStart: function(t, e) {
|
|
2038
|
-
e = e || t.pointerType == "touch" && t, !this.nativeDraggable || e ? this.options.supportPointer ?
|
|
2038
|
+
e = e || t.pointerType == "touch" && t, !this.nativeDraggable || e ? this.options.supportPointer ? T(document, "pointermove", this._onTouchMove) : e ? T(document, "touchmove", this._onTouchMove) : T(document, "mousemove", this._onTouchMove) : (T(h, "dragend", this), T(V, "dragstart", this._onDragStart));
|
|
2039
2039
|
try {
|
|
2040
|
-
document.selection ?
|
|
2040
|
+
document.selection ? Xe(function() {
|
|
2041
2041
|
document.selection.empty();
|
|
2042
2042
|
}) : window.getSelection().removeAllRanges();
|
|
2043
2043
|
} catch {
|
|
2044
2044
|
}
|
|
2045
2045
|
},
|
|
2046
2046
|
_dragStarted: function(t, e) {
|
|
2047
|
-
if (oe = !1,
|
|
2047
|
+
if (oe = !1, V && h) {
|
|
2048
2048
|
ht("dragStarted", this, {
|
|
2049
2049
|
evt: e
|
|
2050
|
-
}), this.nativeDraggable &&
|
|
2050
|
+
}), this.nativeDraggable && T(document, "dragover", Os);
|
|
2051
2051
|
var n = this.options;
|
|
2052
2052
|
!t && mt(h, n.dragClass, !1), mt(h, n.ghostClass, !0), w.active = this, t && this._appendGhost(), at({
|
|
2053
2053
|
sortable: this,
|
|
@@ -2058,37 +2058,37 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2058
2058
|
this._nulling();
|
|
2059
2059
|
},
|
|
2060
2060
|
_emulateDragOver: function() {
|
|
2061
|
-
if (
|
|
2062
|
-
this._lastX =
|
|
2063
|
-
for (var t = document.elementFromPoint(
|
|
2061
|
+
if (xt) {
|
|
2062
|
+
this._lastX = xt.clientX, this._lastY = xt.clientY, Sr();
|
|
2063
|
+
for (var t = document.elementFromPoint(xt.clientX, xt.clientY), e = t; t && t.shadowRoot && (t = t.shadowRoot.elementFromPoint(xt.clientX, xt.clientY), t !== e); )
|
|
2064
2064
|
e = t;
|
|
2065
2065
|
if (h.parentNode[ft]._isOutsideThisEl(t), e)
|
|
2066
2066
|
do {
|
|
2067
2067
|
if (e[ft]) {
|
|
2068
2068
|
var n = void 0;
|
|
2069
2069
|
if (n = e[ft]._onDragOver({
|
|
2070
|
-
clientX:
|
|
2071
|
-
clientY:
|
|
2070
|
+
clientX: xt.clientX,
|
|
2071
|
+
clientY: xt.clientY,
|
|
2072
2072
|
target: t,
|
|
2073
2073
|
rootEl: e
|
|
2074
2074
|
}), n && !this.options.dragoverBubble)
|
|
2075
2075
|
break;
|
|
2076
2076
|
}
|
|
2077
2077
|
t = e;
|
|
2078
|
-
} while (e =
|
|
2079
|
-
|
|
2078
|
+
} while (e = gr(e));
|
|
2079
|
+
Ar();
|
|
2080
2080
|
}
|
|
2081
2081
|
},
|
|
2082
2082
|
_onTouchMove: function(t) {
|
|
2083
|
-
if (
|
|
2084
|
-
var e = this.options, n = e.fallbackTolerance, r = e.fallbackOffset, o = t.touches ? t.touches[0] : t, s =
|
|
2083
|
+
if (Wt) {
|
|
2084
|
+
var e = this.options, n = e.fallbackTolerance, r = e.fallbackOffset, o = t.touches ? t.touches[0] : t, s = E && de(E, !0), a = E && s && s.a, l = E && s && s.d, d = Be && ot && In(ot), u = (o.clientX - Wt.clientX + r.x) / (a || 1) + (d ? d[0] - Bi[0] : 0) / (a || 1), c = (o.clientY - Wt.clientY + r.y) / (l || 1) + (d ? d[1] - Bi[1] : 0) / (l || 1);
|
|
2085
2085
|
if (!w.active && !oe) {
|
|
2086
2086
|
if (n && Math.max(Math.abs(o.clientX - this._lastX), Math.abs(o.clientY - this._lastY)) < n)
|
|
2087
2087
|
return;
|
|
2088
2088
|
this._onDragStart(t, !0);
|
|
2089
2089
|
}
|
|
2090
|
-
if (
|
|
2091
|
-
s ? (s.e += u - (
|
|
2090
|
+
if (E) {
|
|
2091
|
+
s ? (s.e += u - (Vi || 0), s.f += c - (ki || 0)) : s = {
|
|
2092
2092
|
a: 1,
|
|
2093
2093
|
b: 0,
|
|
2094
2094
|
c: 0,
|
|
@@ -2097,20 +2097,20 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2097
2097
|
f: c
|
|
2098
2098
|
};
|
|
2099
2099
|
var p = "matrix(".concat(s.a, ",").concat(s.b, ",").concat(s.c, ",").concat(s.d, ",").concat(s.e, ",").concat(s.f, ")");
|
|
2100
|
-
v(
|
|
2100
|
+
v(E, "webkitTransform", p), v(E, "mozTransform", p), v(E, "msTransform", p), v(E, "transform", p), Vi = u, ki = c, xt = o;
|
|
2101
2101
|
}
|
|
2102
2102
|
t.cancelable && t.preventDefault();
|
|
2103
2103
|
}
|
|
2104
2104
|
},
|
|
2105
2105
|
_appendGhost: function() {
|
|
2106
|
-
if (
|
|
2107
|
-
var t = this.options.fallbackOnBody ? document.body :
|
|
2106
|
+
if (!E) {
|
|
2107
|
+
var t = this.options.fallbackOnBody ? document.body : V, e = W(h, !0, Be, !0, t), n = this.options;
|
|
2108
2108
|
if (Be) {
|
|
2109
2109
|
for (ot = t; v(ot, "position") === "static" && v(ot, "transform") === "none" && ot !== document; )
|
|
2110
2110
|
ot = ot.parentNode;
|
|
2111
|
-
ot !== document.body && ot !== document.documentElement ? (ot === document && (ot =
|
|
2111
|
+
ot !== document.body && ot !== document.documentElement ? (ot === document && (ot = St()), e.top += ot.scrollTop, e.left += ot.scrollLeft) : ot = St(), Bi = In(ot);
|
|
2112
2112
|
}
|
|
2113
|
-
|
|
2113
|
+
E = h.cloneNode(!0), mt(E, n.ghostClass, !1), mt(E, n.fallbackClass, !0), mt(E, n.dragClass, !0), v(E, "transition", ""), v(E, "transform", ""), v(E, "box-sizing", "border-box"), v(E, "margin", 0), v(E, "top", e.top), v(E, "left", e.left), v(E, "width", e.width), v(E, "height", e.height), v(E, "opacity", "0.8"), v(E, "position", Be ? "absolute" : "fixed"), v(E, "zIndex", "100000"), v(E, "pointerEvents", "none"), w.ghost = E, t.appendChild(E), v(E, "transform-origin", Nn / parseInt(E.style.width) * 100 + "% " + Hn / parseInt(E.style.height) * 100 + "%");
|
|
2114
2114
|
}
|
|
2115
2115
|
},
|
|
2116
2116
|
_onDragStart: function(t, e) {
|
|
@@ -2121,19 +2121,19 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2121
2121
|
this._onDrop();
|
|
2122
2122
|
return;
|
|
2123
2123
|
}
|
|
2124
|
-
ht("setupClone", this), w.eventCanceled || (U =
|
|
2125
|
-
ht("clone", n), !w.eventCanceled && (n.options.removeCloneOnHide ||
|
|
2124
|
+
ht("setupClone", this), w.eventCanceled || (U = vr(h), U.removeAttribute("id"), U.draggable = !1, U.style["will-change"] = "", this._hideClone(), mt(U, this.options.chosenClass, !1), w.clone = U), n.cloneId = Xe(function() {
|
|
2125
|
+
ht("clone", n), !w.eventCanceled && (n.options.removeCloneOnHide || V.insertBefore(U, h), n._hideClone(), at({
|
|
2126
2126
|
sortable: n,
|
|
2127
2127
|
name: "clone"
|
|
2128
2128
|
}));
|
|
2129
|
-
}), !e && mt(h, o.dragClass, !0), e ? (
|
|
2129
|
+
}), !e && mt(h, o.dragClass, !0), e ? (ti = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (_(document, "mouseup", n._onDrop), _(document, "touchend", n._onDrop), _(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", o.setData && o.setData.call(n, r, h)), T(document, "drop", n), v(h, "transform", "translateZ(0)")), oe = !0, n._dragStartId = Xe(n._dragStarted.bind(n, e, t)), T(document, "selectstart", n), me = !0, window.getSelection().removeAllRanges(), xe && v(document.body, "user-select", "none");
|
|
2130
2130
|
},
|
|
2131
2131
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
2132
2132
|
_onDragOver: function(t) {
|
|
2133
|
-
var e = this.el, n = t.target, r, o, s, a = this.options, l = a.group, d = w.active, u =
|
|
2134
|
-
if (
|
|
2135
|
-
function N(gt,
|
|
2136
|
-
ht(gt, g,
|
|
2133
|
+
var e = this.el, n = t.target, r, o, s, a = this.options, l = a.group, d = w.active, u = Ve === l, c = a.sort, p = et || d, f, g = this, b = !1;
|
|
2134
|
+
if (Yi) return;
|
|
2135
|
+
function N(gt, zt) {
|
|
2136
|
+
ht(gt, g, At({
|
|
2137
2137
|
evt: t,
|
|
2138
2138
|
isOwner: u,
|
|
2139
2139
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -2144,11 +2144,11 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2144
2144
|
fromSortable: p,
|
|
2145
2145
|
target: n,
|
|
2146
2146
|
completed: F,
|
|
2147
|
-
onMove: function(
|
|
2148
|
-
return Ue(
|
|
2147
|
+
onMove: function(Zt, Ct) {
|
|
2148
|
+
return Ue(V, e, h, r, Zt, W(Zt), t, Ct);
|
|
2149
2149
|
},
|
|
2150
2150
|
changed: st
|
|
2151
|
-
},
|
|
2151
|
+
}, zt));
|
|
2152
2152
|
}
|
|
2153
2153
|
function J() {
|
|
2154
2154
|
N("dragOverAnimationCapture"), g.captureAnimationState(), g !== p && p.captureAnimationState();
|
|
@@ -2158,56 +2158,56 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2158
2158
|
insertion: gt
|
|
2159
2159
|
}), gt && (u ? d._hideClone() : d._showClone(g), g !== p && (mt(h, et ? et.options.ghostClass : d.options.ghostClass, !1), mt(h, a.ghostClass, !0)), et !== g && g !== w.active ? et = g : g === w.active && et && (et = null), p === g && (g._ignoreWhileAnimating = n), g.animateAll(function() {
|
|
2160
2160
|
N("dragOverAnimationComplete"), g._ignoreWhileAnimating = null;
|
|
2161
|
-
}), g !== p && (p.animateAll(), p._ignoreWhileAnimating = null)), (n === h && !h.animated || n === e && !n.animated) && (ne = null), !a.dragoverBubble && !t.rootEl && n !== document && (h.parentNode[ft]._isOutsideThisEl(t.target), !gt &&
|
|
2161
|
+
}), g !== p && (p.animateAll(), p._ignoreWhileAnimating = null)), (n === h && !h.animated || n === e && !n.animated) && (ne = null), !a.dragoverBubble && !t.rootEl && n !== document && (h.parentNode[ft]._isOutsideThisEl(t.target), !gt && Gt(t)), !a.dragoverBubble && t.stopPropagation && t.stopPropagation(), b = !0;
|
|
2162
2162
|
}
|
|
2163
2163
|
function st() {
|
|
2164
|
-
yt = bt(h),
|
|
2164
|
+
yt = bt(h), Ht = bt(h, a.draggable), at({
|
|
2165
2165
|
sortable: g,
|
|
2166
2166
|
name: "change",
|
|
2167
2167
|
toEl: e,
|
|
2168
2168
|
newIndex: yt,
|
|
2169
|
-
newDraggableIndex:
|
|
2169
|
+
newDraggableIndex: Ht,
|
|
2170
2170
|
originalEvent: t
|
|
2171
2171
|
});
|
|
2172
2172
|
}
|
|
2173
|
-
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), n =
|
|
2173
|
+
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), n = Et(n, a.draggable, e, !0), N("dragOver"), w.eventCanceled) return b;
|
|
2174
2174
|
if (h.contains(t.target) || n.animated && n.animatingX && n.animatingY || g._ignoreWhileAnimating === n)
|
|
2175
2175
|
return F(!1);
|
|
2176
|
-
if (
|
|
2176
|
+
if (ti = !1, d && !a.disabled && (u ? c || (s = z !== V) : et === this || (this.lastPutMode = Ve.checkPull(this, d, h, t)) && l.checkPut(this, d, h, t))) {
|
|
2177
2177
|
if (f = this._getDirection(t, n) === "vertical", r = W(h), N("dragOverValid"), w.eventCanceled) return b;
|
|
2178
2178
|
if (s)
|
|
2179
|
-
return z =
|
|
2180
|
-
var K =
|
|
2181
|
-
if (!K ||
|
|
2179
|
+
return z = V, J(), this._hideClone(), N("revert"), w.eventCanceled || (Jt ? V.insertBefore(h, Jt) : V.appendChild(h)), F(!0);
|
|
2180
|
+
var K = hn(e, a.draggable);
|
|
2181
|
+
if (!K || Is(t, f, this) && !K.animated) {
|
|
2182
2182
|
if (K === h)
|
|
2183
2183
|
return F(!1);
|
|
2184
|
-
if (K && e === t.target && (n = K), n && (o = W(n)), Ue(
|
|
2184
|
+
if (K && e === t.target && (n = K), n && (o = W(n)), Ue(V, e, h, r, n, o, t, !!n) !== !1)
|
|
2185
2185
|
return J(), K && K.nextSibling ? e.insertBefore(h, K.nextSibling) : e.appendChild(h), z = e, st(), F(!0);
|
|
2186
|
-
} else if (K &&
|
|
2187
|
-
var
|
|
2188
|
-
if (
|
|
2186
|
+
} else if (K && Ms(t, f, this)) {
|
|
2187
|
+
var $ = ue(e, 0, a, !0);
|
|
2188
|
+
if ($ === h)
|
|
2189
2189
|
return F(!1);
|
|
2190
|
-
if (n =
|
|
2191
|
-
return J(), e.insertBefore(h,
|
|
2190
|
+
if (n = $, o = W(n), Ue(V, e, h, r, n, o, t, !1) !== !1)
|
|
2191
|
+
return J(), e.insertBefore(h, $), z = e, st(), F(!0);
|
|
2192
2192
|
} else if (n.parentNode === e) {
|
|
2193
2193
|
o = W(n);
|
|
2194
|
-
var m = 0,
|
|
2195
|
-
ne !== n && (
|
|
2196
|
-
var
|
|
2194
|
+
var m = 0, C, M = h.parentNode !== e, R = !Ds(h.animated && h.toRect || r, n.animated && n.toRect || o, f), q = f ? "top" : "left", X = Mn(n, "top", "top") || Mn(h, "top", "top"), H = X ? X.scrollTop : void 0;
|
|
2195
|
+
ne !== n && (C = o[q], Ae = !1, ke = !R && a.invertSwap || M), m = Ns(t, n, o, f, R ? 1 : a.swapThreshold, a.invertedSwapThreshold == null ? a.swapThreshold : a.invertedSwapThreshold, ke, ne === n);
|
|
2196
|
+
var L;
|
|
2197
2197
|
if (m !== 0) {
|
|
2198
2198
|
var Z = bt(h);
|
|
2199
2199
|
do
|
|
2200
|
-
Z -= m,
|
|
2201
|
-
while (
|
|
2200
|
+
Z -= m, L = z.children[Z];
|
|
2201
|
+
while (L && (v(L, "display") === "none" || L === E));
|
|
2202
2202
|
}
|
|
2203
|
-
if (m === 0 ||
|
|
2203
|
+
if (m === 0 || L === n)
|
|
2204
2204
|
return F(!1);
|
|
2205
2205
|
ne = n, Se = m;
|
|
2206
2206
|
var dt = n.nextElementSibling, tt = !1;
|
|
2207
2207
|
tt = m === 1;
|
|
2208
|
-
var ct = Ue(
|
|
2208
|
+
var ct = Ue(V, e, h, r, n, o, t, tt);
|
|
2209
2209
|
if (ct !== !1)
|
|
2210
|
-
return (ct === 1 || ct === -1) && (tt = ct === 1),
|
|
2210
|
+
return (ct === 1 || ct === -1) && (tt = ct === 1), Yi = !0, setTimeout(Ls, 30), J(), tt && !dt ? e.appendChild(h) : n.parentNode.insertBefore(h, tt ? dt : n), X && br(X, 0, H - X.scrollTop), z = h.parentNode, C !== void 0 && !ke && (qe = Math.abs(C - W(n)[q])), st(), F(!0);
|
|
2211
2211
|
}
|
|
2212
2212
|
if (e.contains(h))
|
|
2213
2213
|
return F(!1);
|
|
@@ -2216,7 +2216,7 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2216
2216
|
},
|
|
2217
2217
|
_ignoreWhileAnimating: null,
|
|
2218
2218
|
_offMoveEvents: function() {
|
|
2219
|
-
_(document, "mousemove", this._onTouchMove), _(document, "touchmove", this._onTouchMove), _(document, "pointermove", this._onTouchMove), _(document, "dragover",
|
|
2219
|
+
_(document, "mousemove", this._onTouchMove), _(document, "touchmove", this._onTouchMove), _(document, "pointermove", this._onTouchMove), _(document, "dragover", Gt), _(document, "mousemove", Gt), _(document, "touchmove", Gt);
|
|
2220
2220
|
},
|
|
2221
2221
|
_offUpEvents: function() {
|
|
2222
2222
|
var t = this.el.ownerDocument;
|
|
@@ -2224,24 +2224,24 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2224
2224
|
},
|
|
2225
2225
|
_onDrop: function(t) {
|
|
2226
2226
|
var e = this.el, n = this.options;
|
|
2227
|
-
if (yt = bt(h),
|
|
2227
|
+
if (yt = bt(h), Ht = bt(h, n.draggable), ht("drop", this, {
|
|
2228
2228
|
evt: t
|
|
2229
|
-
}), z = h && h.parentNode, yt = bt(h),
|
|
2229
|
+
}), z = h && h.parentNode, yt = bt(h), Ht = bt(h, n.draggable), w.eventCanceled) {
|
|
2230
2230
|
this._nulling();
|
|
2231
2231
|
return;
|
|
2232
2232
|
}
|
|
2233
|
-
oe = !1,
|
|
2233
|
+
oe = !1, ke = !1, Ae = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Wi(this.cloneId), Wi(this._dragStartId), this.nativeDraggable && (_(document, "drop", this), _(e, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), xe && v(document.body, "user-select", ""), v(h, "transform", ""), t && (me && (t.cancelable && t.preventDefault(), !n.dropBubble && t.stopPropagation()), E && E.parentNode && E.parentNode.removeChild(E), (V === z || et && et.lastPutMode !== "clone") && U && U.parentNode && U.parentNode.removeChild(U), h && (this.nativeDraggable && _(h, "dragend", this), Ui(h), h.style["will-change"] = "", me && !oe && mt(h, et ? et.options.ghostClass : this.options.ghostClass, !1), mt(h, this.options.chosenClass, !1), at({
|
|
2234
2234
|
sortable: this,
|
|
2235
2235
|
name: "unchoose",
|
|
2236
2236
|
toEl: z,
|
|
2237
2237
|
newIndex: null,
|
|
2238
2238
|
newDraggableIndex: null,
|
|
2239
2239
|
originalEvent: t
|
|
2240
|
-
}),
|
|
2240
|
+
}), V !== z ? (yt >= 0 && (at({
|
|
2241
2241
|
rootEl: z,
|
|
2242
2242
|
name: "add",
|
|
2243
2243
|
toEl: z,
|
|
2244
|
-
fromEl:
|
|
2244
|
+
fromEl: V,
|
|
2245
2245
|
originalEvent: t
|
|
2246
2246
|
}), at({
|
|
2247
2247
|
sortable: this,
|
|
@@ -2252,7 +2252,7 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2252
2252
|
rootEl: z,
|
|
2253
2253
|
name: "sort",
|
|
2254
2254
|
toEl: z,
|
|
2255
|
-
fromEl:
|
|
2255
|
+
fromEl: V,
|
|
2256
2256
|
originalEvent: t
|
|
2257
2257
|
}), at({
|
|
2258
2258
|
sortable: this,
|
|
@@ -2269,7 +2269,7 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2269
2269
|
name: "sort",
|
|
2270
2270
|
toEl: z,
|
|
2271
2271
|
originalEvent: t
|
|
2272
|
-
})), w.active && ((yt == null || yt === -1) && (yt = le,
|
|
2272
|
+
})), w.active && ((yt == null || yt === -1) && (yt = le, Ht = $e), at({
|
|
2273
2273
|
sortable: this,
|
|
2274
2274
|
name: "end",
|
|
2275
2275
|
toEl: z,
|
|
@@ -2277,9 +2277,9 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2277
2277
|
}), this.save()))), this._nulling();
|
|
2278
2278
|
},
|
|
2279
2279
|
_nulling: function() {
|
|
2280
|
-
ht("nulling", this),
|
|
2280
|
+
ht("nulling", this), V = h = z = E = Jt = U = Ze = Vt = Wt = xt = me = yt = Ht = le = $e = ne = Se = et = Ve = w.dragged = w.ghost = w.clone = w.active = null, ii.forEach(function(t) {
|
|
2281
2281
|
t.checked = !0;
|
|
2282
|
-
}),
|
|
2282
|
+
}), ii.length = Vi = ki = 0;
|
|
2283
2283
|
},
|
|
2284
2284
|
handleEvent: function(t) {
|
|
2285
2285
|
switch (t.type) {
|
|
@@ -2289,7 +2289,7 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2289
2289
|
break;
|
|
2290
2290
|
case "dragenter":
|
|
2291
2291
|
case "dragover":
|
|
2292
|
-
h && (this._onDragOver(t),
|
|
2292
|
+
h && (this._onDragOver(t), Rs(t));
|
|
2293
2293
|
break;
|
|
2294
2294
|
case "selectstart":
|
|
2295
2295
|
t.preventDefault();
|
|
@@ -2302,7 +2302,7 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2302
2302
|
*/
|
|
2303
2303
|
toArray: function() {
|
|
2304
2304
|
for (var t = [], e, n = this.el.children, r = 0, o = n.length, s = this.options; r < o; r++)
|
|
2305
|
-
e = n[r],
|
|
2305
|
+
e = n[r], Et(e, s.draggable, this.el, !1) && t.push(e.getAttribute(s.dataIdAttr) || Vs(e));
|
|
2306
2306
|
return t;
|
|
2307
2307
|
},
|
|
2308
2308
|
/**
|
|
@@ -2313,7 +2313,7 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2313
2313
|
var n = {}, r = this.el;
|
|
2314
2314
|
this.toArray().forEach(function(o, s) {
|
|
2315
2315
|
var a = r.children[s];
|
|
2316
|
-
|
|
2316
|
+
Et(a, this.options.draggable, r, !1) && (n[o] = a);
|
|
2317
2317
|
}, this), e && this.captureAnimationState(), t.forEach(function(o) {
|
|
2318
2318
|
n[o] && (r.removeChild(n[o]), r.appendChild(n[o]));
|
|
2319
2319
|
}), e && this.animateAll();
|
|
@@ -2332,7 +2332,7 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2332
2332
|
* @returns {HTMLElement|null}
|
|
2333
2333
|
*/
|
|
2334
2334
|
closest: function(t, e) {
|
|
2335
|
-
return
|
|
2335
|
+
return Et(t, e || this.options.draggable, this.el, !1);
|
|
2336
2336
|
},
|
|
2337
2337
|
/**
|
|
2338
2338
|
* Set/get option
|
|
@@ -2355,12 +2355,12 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2355
2355
|
var t = this.el;
|
|
2356
2356
|
t[ft] = null, _(t, "mousedown", this._onTapStart), _(t, "touchstart", this._onTapStart), _(t, "pointerdown", this._onTapStart), this.nativeDraggable && (_(t, "dragover", this), _(t, "dragenter", this)), Array.prototype.forEach.call(t.querySelectorAll("[draggable]"), function(e) {
|
|
2357
2357
|
e.removeAttribute("draggable");
|
|
2358
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
2358
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), ei.splice(ei.indexOf(this.el), 1), this.el = t = null;
|
|
2359
2359
|
},
|
|
2360
2360
|
_hideClone: function() {
|
|
2361
|
-
if (!
|
|
2361
|
+
if (!Vt) {
|
|
2362
2362
|
if (ht("hideClone", this), w.eventCanceled) return;
|
|
2363
|
-
v(U, "display", "none"), this.options.removeCloneOnHide && U.parentNode && U.parentNode.removeChild(U),
|
|
2363
|
+
v(U, "display", "none"), this.options.removeCloneOnHide && U.parentNode && U.parentNode.removeChild(U), Vt = !0;
|
|
2364
2364
|
}
|
|
2365
2365
|
},
|
|
2366
2366
|
_showClone: function(t) {
|
|
@@ -2368,90 +2368,90 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
2368
2368
|
this._hideClone();
|
|
2369
2369
|
return;
|
|
2370
2370
|
}
|
|
2371
|
-
if (
|
|
2371
|
+
if (Vt) {
|
|
2372
2372
|
if (ht("showClone", this), w.eventCanceled) return;
|
|
2373
|
-
h.parentNode ==
|
|
2373
|
+
h.parentNode == V && !this.options.group.revertClone ? V.insertBefore(U, h) : Jt ? V.insertBefore(U, Jt) : V.appendChild(U), this.options.group.revertClone && this.animate(h, U), v(U, "display", ""), Vt = !1;
|
|
2374
2374
|
}
|
|
2375
2375
|
}
|
|
2376
2376
|
};
|
|
2377
|
-
function
|
|
2377
|
+
function Rs(i) {
|
|
2378
2378
|
i.dataTransfer && (i.dataTransfer.dropEffect = "move"), i.cancelable && i.preventDefault();
|
|
2379
2379
|
}
|
|
2380
2380
|
function Ue(i, t, e, n, r, o, s, a) {
|
|
2381
2381
|
var l, d = i[ft], u = d.options.onMove, c;
|
|
2382
|
-
return window.CustomEvent && !
|
|
2382
|
+
return window.CustomEvent && !Mt && !Me ? l = new CustomEvent("move", {
|
|
2383
2383
|
bubbles: !0,
|
|
2384
2384
|
cancelable: !0
|
|
2385
2385
|
}) : (l = document.createEvent("Event"), l.initEvent("move", !0, !0)), l.to = t, l.from = i, l.dragged = e, l.draggedRect = n, l.related = r || t, l.relatedRect = o || W(t), l.willInsertAfter = a, l.originalEvent = s, i.dispatchEvent(l), u && (c = u.call(d, l, s)), c;
|
|
2386
2386
|
}
|
|
2387
|
-
function
|
|
2387
|
+
function Ui(i) {
|
|
2388
2388
|
i.draggable = !1;
|
|
2389
2389
|
}
|
|
2390
|
-
function
|
|
2391
|
-
|
|
2390
|
+
function Ls() {
|
|
2391
|
+
Yi = !1;
|
|
2392
2392
|
}
|
|
2393
|
-
function
|
|
2394
|
-
var n = W(ue(e.el, 0, e.options, !0)), r =
|
|
2393
|
+
function Ms(i, t, e) {
|
|
2394
|
+
var n = W(ue(e.el, 0, e.options, !0)), r = wr(e.el, e.options, E), o = 10;
|
|
2395
2395
|
return t ? i.clientX < r.left - o || i.clientY < n.top && i.clientX < n.right : i.clientY < r.top - o || i.clientY < n.bottom && i.clientX < n.left;
|
|
2396
2396
|
}
|
|
2397
|
-
function
|
|
2398
|
-
var n = W(
|
|
2397
|
+
function Is(i, t, e) {
|
|
2398
|
+
var n = W(hn(e.el, e.options.draggable)), r = wr(e.el, e.options, E), o = 10;
|
|
2399
2399
|
return t ? i.clientX > r.right + o || i.clientY > n.bottom && i.clientX > n.left : i.clientY > r.bottom + o || i.clientX > n.right && i.clientY > n.top;
|
|
2400
2400
|
}
|
|
2401
|
-
function
|
|
2401
|
+
function Ns(i, t, e, n, r, o, s, a) {
|
|
2402
2402
|
var l = n ? i.clientY : i.clientX, d = n ? e.height : e.width, u = n ? e.top : e.left, c = n ? e.bottom : e.right, p = !1;
|
|
2403
2403
|
if (!s) {
|
|
2404
|
-
if (a &&
|
|
2404
|
+
if (a && qe < d * r) {
|
|
2405
2405
|
if (!Ae && (Se === 1 ? l > u + d * o / 2 : l < c - d * o / 2) && (Ae = !0), Ae)
|
|
2406
2406
|
p = !0;
|
|
2407
|
-
else if (Se === 1 ? l < u +
|
|
2407
|
+
else if (Se === 1 ? l < u + qe : l > c - qe)
|
|
2408
2408
|
return -Se;
|
|
2409
2409
|
} else if (l > u + d * (1 - r) / 2 && l < c - d * (1 - r) / 2)
|
|
2410
|
-
return
|
|
2410
|
+
return Hs(t);
|
|
2411
2411
|
}
|
|
2412
2412
|
return p = p || s, p && (l < u + d * o / 2 || l > c - d * o / 2) ? l > u + d / 2 ? 1 : -1 : 0;
|
|
2413
2413
|
}
|
|
2414
|
-
function
|
|
2414
|
+
function Hs(i) {
|
|
2415
2415
|
return bt(h) < bt(i) ? 1 : -1;
|
|
2416
2416
|
}
|
|
2417
|
-
function
|
|
2417
|
+
function Vs(i) {
|
|
2418
2418
|
for (var t = i.tagName + i.className + i.src + i.href + i.textContent, e = t.length, n = 0; e--; )
|
|
2419
2419
|
n += t.charCodeAt(e);
|
|
2420
2420
|
return n.toString(36);
|
|
2421
2421
|
}
|
|
2422
2422
|
function ks(i) {
|
|
2423
|
-
|
|
2423
|
+
ii.length = 0;
|
|
2424
2424
|
for (var t = i.getElementsByTagName("input"), e = t.length; e--; ) {
|
|
2425
2425
|
var n = t[e];
|
|
2426
|
-
n.checked &&
|
|
2426
|
+
n.checked && ii.push(n);
|
|
2427
2427
|
}
|
|
2428
2428
|
}
|
|
2429
|
-
function
|
|
2429
|
+
function Xe(i) {
|
|
2430
2430
|
return setTimeout(i, 0);
|
|
2431
2431
|
}
|
|
2432
|
-
function
|
|
2432
|
+
function Wi(i) {
|
|
2433
2433
|
return clearTimeout(i);
|
|
2434
2434
|
}
|
|
2435
|
-
|
|
2435
|
+
Ci && T(document, "touchmove", function(i) {
|
|
2436
2436
|
(w.active || oe) && i.cancelable && i.preventDefault();
|
|
2437
2437
|
});
|
|
2438
2438
|
w.utils = {
|
|
2439
|
-
on:
|
|
2439
|
+
on: T,
|
|
2440
2440
|
off: _,
|
|
2441
2441
|
css: v,
|
|
2442
|
-
find:
|
|
2442
|
+
find: mr,
|
|
2443
2443
|
is: function(t, e) {
|
|
2444
|
-
return !!
|
|
2444
|
+
return !!Et(t, e, t, !1);
|
|
2445
2445
|
},
|
|
2446
|
-
extend:
|
|
2447
|
-
throttle:
|
|
2448
|
-
closest:
|
|
2446
|
+
extend: xs,
|
|
2447
|
+
throttle: yr,
|
|
2448
|
+
closest: Et,
|
|
2449
2449
|
toggleClass: mt,
|
|
2450
|
-
clone:
|
|
2450
|
+
clone: vr,
|
|
2451
2451
|
index: bt,
|
|
2452
|
-
nextTick:
|
|
2453
|
-
cancelNextTick:
|
|
2454
|
-
detectDirection:
|
|
2452
|
+
nextTick: Xe,
|
|
2453
|
+
cancelNextTick: Wi,
|
|
2454
|
+
detectDirection: Er,
|
|
2455
2455
|
getChild: ue,
|
|
2456
2456
|
expando: ft
|
|
2457
2457
|
};
|
|
@@ -2464,15 +2464,15 @@ w.mount = function() {
|
|
|
2464
2464
|
t[0].constructor === Array && (t = t[0]), t.forEach(function(n) {
|
|
2465
2465
|
if (!n.prototype || !n.prototype.constructor)
|
|
2466
2466
|
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));
|
|
2467
|
-
n.utils && (w.utils =
|
|
2467
|
+
n.utils && (w.utils = At(At({}, w.utils), n.utils)), Ie.mount(n);
|
|
2468
2468
|
});
|
|
2469
2469
|
};
|
|
2470
2470
|
w.create = function(i, t) {
|
|
2471
2471
|
return new w(i, t);
|
|
2472
2472
|
};
|
|
2473
|
-
w.version =
|
|
2474
|
-
var Y = [], ye,
|
|
2475
|
-
function
|
|
2473
|
+
w.version = vs;
|
|
2474
|
+
var Y = [], ye, Gi, Ji = !1, Fi, ji, ni, be;
|
|
2475
|
+
function Bs() {
|
|
2476
2476
|
function i() {
|
|
2477
2477
|
this.defaults = {
|
|
2478
2478
|
scroll: !0,
|
|
@@ -2487,36 +2487,36 @@ function Vs() {
|
|
|
2487
2487
|
return i.prototype = {
|
|
2488
2488
|
dragStarted: function(e) {
|
|
2489
2489
|
var n = e.originalEvent;
|
|
2490
|
-
this.sortable.nativeDraggable ?
|
|
2490
|
+
this.sortable.nativeDraggable ? T(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? T(document, "pointermove", this._handleFallbackAutoScroll) : n.touches ? T(document, "touchmove", this._handleFallbackAutoScroll) : T(document, "mousemove", this._handleFallbackAutoScroll);
|
|
2491
2491
|
},
|
|
2492
2492
|
dragOverCompleted: function(e) {
|
|
2493
2493
|
var n = e.originalEvent;
|
|
2494
2494
|
!this.options.dragOverBubble && !n.rootEl && this._handleAutoScroll(n);
|
|
2495
2495
|
},
|
|
2496
2496
|
drop: function() {
|
|
2497
|
-
this.sortable.nativeDraggable ? _(document, "dragover", this._handleAutoScroll) : (_(document, "pointermove", this._handleFallbackAutoScroll), _(document, "touchmove", this._handleFallbackAutoScroll), _(document, "mousemove", this._handleFallbackAutoScroll)), kn(),
|
|
2497
|
+
this.sortable.nativeDraggable ? _(document, "dragover", this._handleAutoScroll) : (_(document, "pointermove", this._handleFallbackAutoScroll), _(document, "touchmove", this._handleFallbackAutoScroll), _(document, "mousemove", this._handleFallbackAutoScroll)), kn(), Ye(), Es();
|
|
2498
2498
|
},
|
|
2499
2499
|
nulling: function() {
|
|
2500
|
-
|
|
2500
|
+
ni = Gi = ye = Ji = be = Fi = ji = null, Y.length = 0;
|
|
2501
2501
|
},
|
|
2502
2502
|
_handleFallbackAutoScroll: function(e) {
|
|
2503
2503
|
this._handleAutoScroll(e, !0);
|
|
2504
2504
|
},
|
|
2505
2505
|
_handleAutoScroll: function(e, n) {
|
|
2506
2506
|
var r = this, o = (e.touches ? e.touches[0] : e).clientX, s = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(o, s);
|
|
2507
|
-
if (
|
|
2508
|
-
|
|
2509
|
-
var l =
|
|
2510
|
-
|
|
2511
|
-
var d =
|
|
2512
|
-
d !== l && (l = d,
|
|
2513
|
-
}, 10),
|
|
2507
|
+
if (ni = e, n || this.options.forceAutoScrollFallback || Me || Mt || xe) {
|
|
2508
|
+
zi(e, this.options, a, n);
|
|
2509
|
+
var l = Bt(a, !0);
|
|
2510
|
+
Ji && (!be || o !== Fi || s !== ji) && (be && kn(), be = setInterval(function() {
|
|
2511
|
+
var d = Bt(document.elementFromPoint(o, s), !0);
|
|
2512
|
+
d !== l && (l = d, Ye()), zi(e, r.options, d, n);
|
|
2513
|
+
}, 10), Fi = o, ji = s);
|
|
2514
2514
|
} else {
|
|
2515
|
-
if (!this.options.bubbleScroll ||
|
|
2516
|
-
|
|
2515
|
+
if (!this.options.bubbleScroll || Bt(a, !0) === St()) {
|
|
2516
|
+
Ye();
|
|
2517
2517
|
return;
|
|
2518
2518
|
}
|
|
2519
|
-
|
|
2519
|
+
zi(e, this.options, Bt(a, !1), !1);
|
|
2520
2520
|
}
|
|
2521
2521
|
}
|
|
2522
2522
|
}, Lt(i, {
|
|
@@ -2524,7 +2524,7 @@ function Vs() {
|
|
|
2524
2524
|
initializeByDefault: !0
|
|
2525
2525
|
});
|
|
2526
2526
|
}
|
|
2527
|
-
function
|
|
2527
|
+
function Ye() {
|
|
2528
2528
|
Y.forEach(function(i) {
|
|
2529
2529
|
clearInterval(i.pid);
|
|
2530
2530
|
}), Y = [];
|
|
@@ -2532,29 +2532,29 @@ function Xe() {
|
|
|
2532
2532
|
function kn() {
|
|
2533
2533
|
clearInterval(be);
|
|
2534
2534
|
}
|
|
2535
|
-
var
|
|
2535
|
+
var zi = yr(function(i, t, e, n) {
|
|
2536
2536
|
if (t.scroll) {
|
|
2537
|
-
var r = (i.touches ? i.touches[0] : i).clientX, o = (i.touches ? i.touches[0] : i).clientY, s = t.scrollSensitivity, a = t.scrollSpeed, l =
|
|
2538
|
-
|
|
2537
|
+
var r = (i.touches ? i.touches[0] : i).clientX, o = (i.touches ? i.touches[0] : i).clientY, s = t.scrollSensitivity, a = t.scrollSpeed, l = St(), d = !1, u;
|
|
2538
|
+
Gi !== e && (Gi = e, Ye(), ye = t.scroll, u = t.scrollFn, ye === !0 && (ye = Bt(e, !0)));
|
|
2539
2539
|
var c = 0, p = ye;
|
|
2540
2540
|
do {
|
|
2541
|
-
var f = p, g = W(f), b = g.top, N = g.bottom, J = g.left, F = g.right, st = g.width, K = g.height,
|
|
2542
|
-
f === l ? (
|
|
2543
|
-
var H =
|
|
2541
|
+
var f = p, g = W(f), b = g.top, N = g.bottom, J = g.left, F = g.right, st = g.width, K = g.height, $ = void 0, m = void 0, C = f.scrollWidth, M = f.scrollHeight, R = v(f), q = f.scrollLeft, X = f.scrollTop;
|
|
2542
|
+
f === l ? ($ = st < C && (R.overflowX === "auto" || R.overflowX === "scroll" || R.overflowX === "visible"), m = K < M && (R.overflowY === "auto" || R.overflowY === "scroll" || R.overflowY === "visible")) : ($ = st < C && (R.overflowX === "auto" || R.overflowX === "scroll"), m = K < M && (R.overflowY === "auto" || R.overflowY === "scroll"));
|
|
2543
|
+
var H = $ && (Math.abs(F - r) <= s && q + st < C) - (Math.abs(J - r) <= s && !!q), L = m && (Math.abs(N - o) <= s && X + K < M) - (Math.abs(b - o) <= s && !!X);
|
|
2544
2544
|
if (!Y[c])
|
|
2545
2545
|
for (var Z = 0; Z <= c; Z++)
|
|
2546
2546
|
Y[Z] || (Y[Z] = {});
|
|
2547
|
-
(Y[c].vx != H || Y[c].vy !=
|
|
2548
|
-
n && this.layer === 0 && w.active._onTouchMove(
|
|
2547
|
+
(Y[c].vx != H || Y[c].vy != L || Y[c].el !== f) && (Y[c].el = f, Y[c].vx = H, Y[c].vy = L, clearInterval(Y[c].pid), (H != 0 || L != 0) && (d = !0, Y[c].pid = setInterval((function() {
|
|
2548
|
+
n && this.layer === 0 && w.active._onTouchMove(ni);
|
|
2549
2549
|
var dt = Y[this.layer].vy ? Y[this.layer].vy * a : 0, tt = Y[this.layer].vx ? Y[this.layer].vx * a : 0;
|
|
2550
|
-
typeof u == "function" && u.call(w.dragged.parentNode[ft], tt, dt, i,
|
|
2550
|
+
typeof u == "function" && u.call(w.dragged.parentNode[ft], tt, dt, i, ni, Y[this.layer].el) !== "continue" || br(Y[this.layer].el, tt, dt);
|
|
2551
2551
|
}).bind({
|
|
2552
2552
|
layer: c
|
|
2553
2553
|
}), 24))), c++;
|
|
2554
|
-
} while (t.bubbleScroll && p !== l && (p =
|
|
2555
|
-
|
|
2554
|
+
} while (t.bubbleScroll && p !== l && (p = Bt(p, !1)));
|
|
2555
|
+
Ji = d;
|
|
2556
2556
|
}
|
|
2557
|
-
}, 30),
|
|
2557
|
+
}, 30), Cr = function(t) {
|
|
2558
2558
|
var e = t.originalEvent, n = t.putSortable, r = t.dragEl, o = t.activeSortable, s = t.dispatchSortableEvent, a = t.hideGhostForTarget, l = t.unhideGhostForTarget;
|
|
2559
2559
|
if (e) {
|
|
2560
2560
|
var d = n || o;
|
|
@@ -2566,9 +2566,9 @@ var ji = mr(function(i, t, e, n) {
|
|
|
2566
2566
|
}));
|
|
2567
2567
|
}
|
|
2568
2568
|
};
|
|
2569
|
-
function
|
|
2569
|
+
function pn() {
|
|
2570
2570
|
}
|
|
2571
|
-
|
|
2571
|
+
pn.prototype = {
|
|
2572
2572
|
startIndex: null,
|
|
2573
2573
|
dragStart: function(t) {
|
|
2574
2574
|
var e = t.oldDraggableIndex;
|
|
@@ -2580,32 +2580,32 @@ hn.prototype = {
|
|
|
2580
2580
|
var r = ue(this.sortable.el, this.startIndex, this.options);
|
|
2581
2581
|
r ? this.sortable.el.insertBefore(e, r) : this.sortable.el.appendChild(e), this.sortable.animateAll(), n && n.animateAll();
|
|
2582
2582
|
},
|
|
2583
|
-
drop:
|
|
2583
|
+
drop: Cr
|
|
2584
2584
|
};
|
|
2585
|
-
Lt(
|
|
2585
|
+
Lt(pn, {
|
|
2586
2586
|
pluginName: "revertOnSpill"
|
|
2587
2587
|
});
|
|
2588
|
-
function
|
|
2588
|
+
function fn() {
|
|
2589
2589
|
}
|
|
2590
|
-
|
|
2590
|
+
fn.prototype = {
|
|
2591
2591
|
onSpill: function(t) {
|
|
2592
2592
|
var e = t.dragEl, n = t.putSortable, r = n || this.sortable;
|
|
2593
2593
|
r.captureAnimationState(), e.parentNode && e.parentNode.removeChild(e), r.animateAll();
|
|
2594
2594
|
},
|
|
2595
|
-
drop:
|
|
2595
|
+
drop: Cr
|
|
2596
2596
|
};
|
|
2597
|
-
Lt(
|
|
2597
|
+
Lt(fn, {
|
|
2598
2598
|
pluginName: "removeOnSpill"
|
|
2599
2599
|
});
|
|
2600
|
-
w.mount(new
|
|
2601
|
-
w.mount(
|
|
2602
|
-
const
|
|
2600
|
+
w.mount(new Bs());
|
|
2601
|
+
w.mount(fn, pn);
|
|
2602
|
+
const Us = (i) => {
|
|
2603
2603
|
const t = i.item;
|
|
2604
2604
|
let e = Array.prototype.slice.call(t.parentNode.childNodes);
|
|
2605
2605
|
return e = e.filter(
|
|
2606
2606
|
(n) => n.nodeType != Node.ELEMENT_NODE || !n.classList.contains("sortable-fallback")
|
|
2607
2607
|
), e;
|
|
2608
|
-
},
|
|
2608
|
+
}, Fs = (i, t, e, n, r, o) => {
|
|
2609
2609
|
const a = i.item.parentNode;
|
|
2610
2610
|
for (const b of e)
|
|
2611
2611
|
a.appendChild(b);
|
|
@@ -2629,7 +2629,7 @@ const Bs = (i) => {
|
|
|
2629
2629
|
}
|
|
2630
2630
|
t.requestUpdate();
|
|
2631
2631
|
};
|
|
2632
|
-
function
|
|
2632
|
+
function js(i, t, e, n) {
|
|
2633
2633
|
let r = [], o = null;
|
|
2634
2634
|
i._sortable = w.create(i, {
|
|
2635
2635
|
handle: ".drag-handle",
|
|
@@ -2637,14 +2637,14 @@ function Fs(i, t, e, n) {
|
|
|
2637
2637
|
swapThreshold: 0.5,
|
|
2638
2638
|
animation: 150,
|
|
2639
2639
|
easing: "cubic-bezier(1, 0, 0, 1)",
|
|
2640
|
-
onStart: (s) => r =
|
|
2640
|
+
onStart: (s) => r = Us(s),
|
|
2641
2641
|
onMove: (s) => {
|
|
2642
2642
|
o = s.related;
|
|
2643
2643
|
},
|
|
2644
|
-
onEnd: (s) =>
|
|
2644
|
+
onEnd: (s) => Fs(s, n, r, t, e, o)
|
|
2645
2645
|
});
|
|
2646
2646
|
}
|
|
2647
|
-
function
|
|
2647
|
+
function zs(i, t, e, n) {
|
|
2648
2648
|
const r = i.getArray();
|
|
2649
2649
|
let o = !1;
|
|
2650
2650
|
r.forEach((s) => {
|
|
@@ -2652,7 +2652,7 @@ function js(i, t, e, n) {
|
|
|
2652
2652
|
s.get(t) || (s.set(t, a), o = !0), s.get(e) || (s.set(e, `layer ${a}`), o = !0), o && n.requestUpdate();
|
|
2653
2653
|
});
|
|
2654
2654
|
}
|
|
2655
|
-
function
|
|
2655
|
+
function gn(i, t, e) {
|
|
2656
2656
|
let n = [];
|
|
2657
2657
|
const r = (o, s, a) => {
|
|
2658
2658
|
n = [
|
|
@@ -2674,7 +2674,7 @@ function fn(i, t, e) {
|
|
|
2674
2674
|
};
|
|
2675
2675
|
return r(i, t, e), n;
|
|
2676
2676
|
}
|
|
2677
|
-
function
|
|
2677
|
+
function Zs(i, t, e) {
|
|
2678
2678
|
if (!i || !t) return !1;
|
|
2679
2679
|
if (!_r(i, e)) return !0;
|
|
2680
2680
|
const n = i.get("minZoom"), r = i.get("maxZoom"), o = t.getView().getZoom();
|
|
@@ -2684,45 +2684,45 @@ function _r(i, t) {
|
|
|
2684
2684
|
const e = i.get("minZoom"), n = i.get("maxZoom");
|
|
2685
2685
|
return !!(t && (e !== -1 / 0 || n !== 1 / 0));
|
|
2686
2686
|
}
|
|
2687
|
-
function
|
|
2687
|
+
function qs(i, t) {
|
|
2688
2688
|
var r, o, s;
|
|
2689
2689
|
return !i || !t ? void 0 : i.getLayers ? "group" : ((s = (r = t.getInteractions().getArray().filter((a) => a.freehand_ !== void 0).map((a) => a.source_)) == null ? void 0 : r.ol_uid) == null ? void 0 : s.includes(
|
|
2690
2690
|
// @ts-expect-error TODO
|
|
2691
2691
|
i.getSource ? (o = i.getSource()) == null ? void 0 : o.ol_uid : void 0
|
|
2692
2692
|
)) ? "draw" : i.declutter_ !== void 0 ? "vector" : "raster";
|
|
2693
2693
|
}
|
|
2694
|
-
const
|
|
2694
|
+
const Xs = (i, t, e) => {
|
|
2695
2695
|
let n = t;
|
|
2696
2696
|
return e.layer.getSource().getTileUrlFunction() && (n || (n = e.layer.getSource().getTileUrlFunction()), e.layer.getSource().setTileUrlFunction(
|
|
2697
|
-
(...r) =>
|
|
2697
|
+
(...r) => gs(n(...r), i)
|
|
2698
2698
|
), e.layer.getSource().setKey(/* @__PURE__ */ new Date())), n;
|
|
2699
2699
|
};
|
|
2700
|
-
function
|
|
2700
|
+
function Ys(i, t, e) {
|
|
2701
2701
|
const n = "updateStyleVariables" in t, r = "setStyle" in t, o = n ? (
|
|
2702
2702
|
/** @type {import('ol/layer/WebGLTile').default} */
|
|
2703
2703
|
t.style_
|
|
2704
2704
|
) : e.style;
|
|
2705
2705
|
let s = o == null ? void 0 : o.variables;
|
|
2706
2706
|
if (s) {
|
|
2707
|
-
const a =
|
|
2707
|
+
const a = mn(i);
|
|
2708
2708
|
if (o.variables = {
|
|
2709
2709
|
...s,
|
|
2710
2710
|
...a
|
|
2711
2711
|
}, n)
|
|
2712
2712
|
t.updateStyleVariables(a);
|
|
2713
2713
|
else if (r) {
|
|
2714
|
-
const l =
|
|
2714
|
+
const l = Ws(o);
|
|
2715
2715
|
t.setStyle(
|
|
2716
2716
|
l
|
|
2717
2717
|
);
|
|
2718
2718
|
}
|
|
2719
2719
|
}
|
|
2720
2720
|
}
|
|
2721
|
-
const
|
|
2721
|
+
const mn = (i) => {
|
|
2722
2722
|
const t = {};
|
|
2723
2723
|
for (const e in i)
|
|
2724
2724
|
if (typeof i[e] == "object" && i[e] !== null) {
|
|
2725
|
-
const n =
|
|
2725
|
+
const n = mn(
|
|
2726
2726
|
/** @type {Record<string,any>} */
|
|
2727
2727
|
i[e]
|
|
2728
2728
|
);
|
|
@@ -2732,7 +2732,7 @@ const gn = (i) => {
|
|
|
2732
2732
|
t[e] = i == null ? void 0 : i[e];
|
|
2733
2733
|
return t;
|
|
2734
2734
|
};
|
|
2735
|
-
function
|
|
2735
|
+
function Ws(i) {
|
|
2736
2736
|
let t = i;
|
|
2737
2737
|
if ("variables" in i) {
|
|
2738
2738
|
let e = JSON.stringify(i);
|
|
@@ -2746,23 +2746,27 @@ function Ys(i) {
|
|
|
2746
2746
|
}
|
|
2747
2747
|
return t;
|
|
2748
2748
|
}
|
|
2749
|
-
const
|
|
2750
|
-
if (!i)
|
|
2751
|
-
|
|
2752
|
-
const
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
return !(
|
|
2759
|
-
|
|
2749
|
+
const Gs = (i, t) => {
|
|
2750
|
+
if (!i)
|
|
2751
|
+
return;
|
|
2752
|
+
const e = mn(t);
|
|
2753
|
+
let n, r;
|
|
2754
|
+
return Array.isArray(i) ? r = structuredClone(i) : r = [structuredClone(i)], n = r.filter((o) => {
|
|
2755
|
+
if (!("boundTo" in o))
|
|
2756
|
+
return !0;
|
|
2757
|
+
const s = o.boundTo.key, a = o.boundTo.value;
|
|
2758
|
+
return !(s in e) || e[s] == a;
|
|
2759
|
+
}), n.length || (n = r), /** @type {import("../components/layer-legend").LegendConfig[]} */
|
|
2760
|
+
n.map((o) => {
|
|
2761
|
+
var s;
|
|
2762
|
+
return delete o.boundTo, !("domainProperties" in o) || "domain" in o ? o : (s = Object.keys(o)) == null ? void 0 : s.reduce(
|
|
2763
|
+
(a, l) => (l === "domainProperties" ? a.domain = o[l].map((d) => e[d]) : a[l] = o[l], a),
|
|
2760
2764
|
/** @type {import("../components/layer-legend").LegendConfig} */
|
|
2761
2765
|
{}
|
|
2762
2766
|
);
|
|
2763
2767
|
});
|
|
2764
2768
|
};
|
|
2765
|
-
function
|
|
2769
|
+
function Tr(i, t) {
|
|
2766
2770
|
var n;
|
|
2767
2771
|
let e = {};
|
|
2768
2772
|
for (const r in i) {
|
|
@@ -2770,7 +2774,7 @@ function Cr(i, t) {
|
|
|
2770
2774
|
if (o && o !== "object")
|
|
2771
2775
|
e[r] = o === "number" ? Number(t[r]) : t[r];
|
|
2772
2776
|
else if (typeof i[r] == "object" && ((n = i[r]) != null && n.properties)) {
|
|
2773
|
-
const s =
|
|
2777
|
+
const s = Tr(
|
|
2774
2778
|
i[r].properties,
|
|
2775
2779
|
t
|
|
2776
2780
|
);
|
|
@@ -2779,7 +2783,7 @@ function Cr(i, t) {
|
|
|
2779
2783
|
}
|
|
2780
2784
|
return e;
|
|
2781
2785
|
}
|
|
2782
|
-
function
|
|
2786
|
+
function Js(i, t) {
|
|
2783
2787
|
var o, s, a, l, d;
|
|
2784
2788
|
if (!t) return null;
|
|
2785
2789
|
let e = {}, n = "updateStyleVariables" in i ? (
|
|
@@ -2792,20 +2796,20 @@ function Gs(i, t) {
|
|
|
2792
2796
|
const u = new URL(i.getSource().getTileUrlFunction()([0, 0, 0]));
|
|
2793
2797
|
e = Object.fromEntries(u.searchParams.entries());
|
|
2794
2798
|
} else return null;
|
|
2795
|
-
const r =
|
|
2799
|
+
const r = Tr(
|
|
2796
2800
|
((d = t.schema) == null ? void 0 : d.properties) || t.schema,
|
|
2797
2801
|
e
|
|
2798
2802
|
);
|
|
2799
2803
|
return Object.keys(r).length ? r : null;
|
|
2800
2804
|
}
|
|
2801
|
-
const
|
|
2805
|
+
const Ks = (i, t) => i == null ? void 0 : i.filter(
|
|
2802
2806
|
(e) => ["remove", "sort"].filter((n) => t != null && t.get("layerControlDisable") ? n !== "sort" : !0).includes(e)
|
|
2803
|
-
),
|
|
2807
|
+
), Qs = (i, t) => i == null ? void 0 : i.filter((e) => {
|
|
2804
2808
|
let n = !0;
|
|
2805
2809
|
return ["remove", "sort"].includes(e) && (n = !1), e === "info" && (n = t.get("description")), e === "config" && (n = t.get("layerConfig")), e === "datetime" && (n = t.get("layerDatetime")), e === "legend" && (n = t.get("layerLegend")), n;
|
|
2806
|
-
}),
|
|
2807
|
-
<button slot="${i}-icon" class="icon">${t ? i :
|
|
2808
|
-
`,
|
|
2810
|
+
}), ta = (i, t) => x`
|
|
2811
|
+
<button slot="${i}-icon" class="icon">${t ? i : P}</button>
|
|
2812
|
+
`, ea = (i) => x`
|
|
2809
2813
|
<button
|
|
2810
2814
|
class="remove-icon icon"
|
|
2811
2815
|
@click=${() => {
|
|
@@ -2818,13 +2822,13 @@ const Js = (i, t) => i == null ? void 0 : i.filter(
|
|
|
2818
2822
|
);
|
|
2819
2823
|
}}
|
|
2820
2824
|
>
|
|
2821
|
-
${i.unstyled ? "x" :
|
|
2825
|
+
${i.unstyled ? "x" : P}
|
|
2822
2826
|
</button>
|
|
2823
|
-
`,
|
|
2827
|
+
`, ia = (i) => x`
|
|
2824
2828
|
<span class="button sort-icon icon drag-handle">
|
|
2825
|
-
${i ? "═" :
|
|
2829
|
+
${i ? "═" : P}
|
|
2826
2830
|
</span>
|
|
2827
|
-
`,
|
|
2831
|
+
`, Dr = (i) => {
|
|
2828
2832
|
var e;
|
|
2829
2833
|
const t = ["layerControlHide", "layerControlOptional"];
|
|
2830
2834
|
return (e = i == null ? void 0 : i.getArray()) == null ? void 0 : e.filter((n) => t.every((r) => !n.get(r)));
|
|
@@ -2834,23 +2838,23 @@ const Js = (i, t) => i == null ? void 0 : i.filter(
|
|
|
2834
2838
|
* Copyright 2020 Google LLC
|
|
2835
2839
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2836
2840
|
*/
|
|
2837
|
-
const
|
|
2841
|
+
const Pr = an(class extends ln {
|
|
2838
2842
|
constructor(i) {
|
|
2839
|
-
if (super(i), i.type !==
|
|
2840
|
-
if (!
|
|
2843
|
+
if (super(i), i.type !== Nt.PROPERTY && i.type !== Nt.ATTRIBUTE && i.type !== Nt.BOOLEAN_ATTRIBUTE) throw Error("The `live` directive is not allowed on child or event bindings");
|
|
2844
|
+
if (!yo(i)) throw Error("`live` bindings can only contain a single expression");
|
|
2841
2845
|
}
|
|
2842
2846
|
render(i) {
|
|
2843
2847
|
return i;
|
|
2844
2848
|
}
|
|
2845
2849
|
update(i, [t]) {
|
|
2846
|
-
if (t ===
|
|
2850
|
+
if (t === wt || t === P) return t;
|
|
2847
2851
|
const e = i.element, n = i.name;
|
|
2848
|
-
if (i.type ===
|
|
2849
|
-
if (t === e[n]) return
|
|
2850
|
-
} else if (i.type ===
|
|
2851
|
-
if (!!t === e.hasAttribute(n)) return
|
|
2852
|
-
} else if (i.type ===
|
|
2853
|
-
return
|
|
2852
|
+
if (i.type === Nt.PROPERTY) {
|
|
2853
|
+
if (t === e[n]) return wt;
|
|
2854
|
+
} else if (i.type === Nt.BOOLEAN_ATTRIBUTE) {
|
|
2855
|
+
if (!!t === e.hasAttribute(n)) return wt;
|
|
2856
|
+
} else if (i.type === Nt.ATTRIBUTE && e.getAttribute(n) === t + "") return wt;
|
|
2857
|
+
return rr(i), t;
|
|
2854
2858
|
}
|
|
2855
2859
|
});
|
|
2856
2860
|
/**
|
|
@@ -2858,13 +2862,13 @@ const Dr = sn(class extends an {
|
|
|
2858
2862
|
* Copyright 2017 Google LLC
|
|
2859
2863
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2860
2864
|
*/
|
|
2861
|
-
class
|
|
2865
|
+
class Ki extends ln {
|
|
2862
2866
|
constructor(t) {
|
|
2863
|
-
if (super(t), this.it =
|
|
2867
|
+
if (super(t), this.it = P, t.type !== Nt.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
2864
2868
|
}
|
|
2865
2869
|
render(t) {
|
|
2866
|
-
if (t ===
|
|
2867
|
-
if (t ===
|
|
2870
|
+
if (t === P || t == null) return this._t = void 0, this.it = t;
|
|
2871
|
+
if (t === wt) return t;
|
|
2868
2872
|
if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
2869
2873
|
if (t === this.it) return this._t;
|
|
2870
2874
|
this.it = t;
|
|
@@ -2872,90 +2876,90 @@ class Ji extends an {
|
|
|
2872
2876
|
return e.raw = e, this._t = { _$litType$: this.constructor.resultType, strings: e, values: [] };
|
|
2873
2877
|
}
|
|
2874
2878
|
}
|
|
2875
|
-
|
|
2876
|
-
const
|
|
2879
|
+
Ki.directiveName = "unsafeHTML", Ki.resultType = 1;
|
|
2880
|
+
const na = an(Ki);
|
|
2877
2881
|
/**
|
|
2878
2882
|
* @license
|
|
2879
2883
|
* Copyright 2021 Google LLC
|
|
2880
2884
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2881
2885
|
*/
|
|
2882
|
-
function*
|
|
2886
|
+
function* We(i, t) {
|
|
2883
2887
|
if (i !== void 0) {
|
|
2884
2888
|
let e = 0;
|
|
2885
2889
|
for (const n of i) yield t(n, e++);
|
|
2886
2890
|
}
|
|
2887
2891
|
}
|
|
2888
|
-
var
|
|
2889
|
-
function
|
|
2892
|
+
var Ut = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2893
|
+
function Or(i) {
|
|
2890
2894
|
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
|
|
2891
2895
|
}
|
|
2892
|
-
var
|
|
2893
|
-
function
|
|
2894
|
-
if (
|
|
2895
|
-
|
|
2896
|
-
var i = "Expected a function", t = NaN, e = "[object Symbol]", n = /^\s+|\s+$/g, r = /^[-+]0x[0-9a-f]+$/i, o = /^0b[01]+$/i, s = /^0o[0-7]+$/i, a = parseInt, l = typeof
|
|
2896
|
+
var Zi, Bn;
|
|
2897
|
+
function ra() {
|
|
2898
|
+
if (Bn) return Zi;
|
|
2899
|
+
Bn = 1;
|
|
2900
|
+
var i = "Expected a function", t = NaN, e = "[object Symbol]", n = /^\s+|\s+$/g, r = /^[-+]0x[0-9a-f]+$/i, o = /^0b[01]+$/i, s = /^0o[0-7]+$/i, a = parseInt, l = typeof Ut == "object" && Ut && Ut.Object === Object && Ut, d = typeof self == "object" && self && self.Object === Object && self, u = l || d || Function("return this")(), c = Object.prototype, p = c.toString, f = Math.max, g = Math.min, b = function() {
|
|
2897
2901
|
return u.Date.now();
|
|
2898
2902
|
};
|
|
2899
|
-
function N(m,
|
|
2900
|
-
var
|
|
2903
|
+
function N(m, C, M) {
|
|
2904
|
+
var R, q, X, H, L, Z, dt = 0, tt = !1, ct = !1, gt = !0;
|
|
2901
2905
|
if (typeof m != "function")
|
|
2902
2906
|
throw new TypeError(i);
|
|
2903
|
-
|
|
2904
|
-
function
|
|
2905
|
-
var ut =
|
|
2906
|
-
return
|
|
2907
|
+
C = $(C) || 0, F(M) && (tt = !!M.leading, ct = "maxWait" in M, X = ct ? f($(M.maxWait) || 0, C) : X, gt = "trailing" in M ? !!M.trailing : gt);
|
|
2908
|
+
function zt(I) {
|
|
2909
|
+
var ut = R, It = q;
|
|
2910
|
+
return R = q = void 0, dt = I, H = m.apply(It, ut), H;
|
|
2907
2911
|
}
|
|
2908
2912
|
function Ne(I) {
|
|
2909
|
-
return dt = I,
|
|
2913
|
+
return dt = I, L = setTimeout(qt, C), tt ? zt(I) : H;
|
|
2910
2914
|
}
|
|
2911
|
-
function
|
|
2912
|
-
var ut = I - Z,
|
|
2913
|
-
return ct ? g(
|
|
2915
|
+
function Zt(I) {
|
|
2916
|
+
var ut = I - Z, It = I - dt, yn = C - ut;
|
|
2917
|
+
return ct ? g(yn, X - It) : yn;
|
|
2914
2918
|
}
|
|
2915
|
-
function
|
|
2916
|
-
var ut = I - Z,
|
|
2917
|
-
return Z === void 0 || ut >=
|
|
2919
|
+
function Ct(I) {
|
|
2920
|
+
var ut = I - Z, It = I - dt;
|
|
2921
|
+
return Z === void 0 || ut >= C || ut < 0 || ct && It >= X;
|
|
2918
2922
|
}
|
|
2919
|
-
function
|
|
2923
|
+
function qt() {
|
|
2920
2924
|
var I = b();
|
|
2921
|
-
if (
|
|
2925
|
+
if (Ct(I))
|
|
2922
2926
|
return He(I);
|
|
2923
|
-
|
|
2927
|
+
L = setTimeout(qt, Zt(I));
|
|
2924
2928
|
}
|
|
2925
2929
|
function He(I) {
|
|
2926
|
-
return
|
|
2930
|
+
return L = void 0, gt && R ? zt(I) : (R = q = void 0, H);
|
|
2927
2931
|
}
|
|
2928
2932
|
function _i() {
|
|
2929
|
-
|
|
2933
|
+
L !== void 0 && clearTimeout(L), dt = 0, R = Z = q = L = void 0;
|
|
2930
2934
|
}
|
|
2931
2935
|
function pe() {
|
|
2932
|
-
return
|
|
2936
|
+
return L === void 0 ? H : He(b());
|
|
2933
2937
|
}
|
|
2934
|
-
function
|
|
2935
|
-
var I = b(), ut =
|
|
2936
|
-
if (
|
|
2937
|
-
if (
|
|
2938
|
+
function k() {
|
|
2939
|
+
var I = b(), ut = Ct(I);
|
|
2940
|
+
if (R = arguments, q = this, Z = I, ut) {
|
|
2941
|
+
if (L === void 0)
|
|
2938
2942
|
return Ne(Z);
|
|
2939
2943
|
if (ct)
|
|
2940
|
-
return
|
|
2944
|
+
return L = setTimeout(qt, C), zt(Z);
|
|
2941
2945
|
}
|
|
2942
|
-
return
|
|
2946
|
+
return L === void 0 && (L = setTimeout(qt, C)), H;
|
|
2943
2947
|
}
|
|
2944
|
-
return
|
|
2948
|
+
return k.cancel = _i, k.flush = pe, k;
|
|
2945
2949
|
}
|
|
2946
|
-
function J(m,
|
|
2947
|
-
var
|
|
2950
|
+
function J(m, C, M) {
|
|
2951
|
+
var R = !0, q = !0;
|
|
2948
2952
|
if (typeof m != "function")
|
|
2949
2953
|
throw new TypeError(i);
|
|
2950
|
-
return F(M) && (
|
|
2951
|
-
leading:
|
|
2952
|
-
maxWait:
|
|
2954
|
+
return F(M) && (R = "leading" in M ? !!M.leading : R, q = "trailing" in M ? !!M.trailing : q), N(m, C, {
|
|
2955
|
+
leading: R,
|
|
2956
|
+
maxWait: C,
|
|
2953
2957
|
trailing: q
|
|
2954
2958
|
});
|
|
2955
2959
|
}
|
|
2956
2960
|
function F(m) {
|
|
2957
|
-
var
|
|
2958
|
-
return !!m && (
|
|
2961
|
+
var C = typeof m;
|
|
2962
|
+
return !!m && (C == "object" || C == "function");
|
|
2959
2963
|
}
|
|
2960
2964
|
function st(m) {
|
|
2961
2965
|
return !!m && typeof m == "object";
|
|
@@ -2963,14 +2967,14 @@ function na() {
|
|
|
2963
2967
|
function K(m) {
|
|
2964
2968
|
return typeof m == "symbol" || st(m) && p.call(m) == e;
|
|
2965
2969
|
}
|
|
2966
|
-
function
|
|
2970
|
+
function $(m) {
|
|
2967
2971
|
if (typeof m == "number")
|
|
2968
2972
|
return m;
|
|
2969
2973
|
if (K(m))
|
|
2970
2974
|
return t;
|
|
2971
2975
|
if (F(m)) {
|
|
2972
|
-
var
|
|
2973
|
-
m = F(
|
|
2976
|
+
var C = typeof m.valueOf == "function" ? m.valueOf() : m;
|
|
2977
|
+
m = F(C) ? C + "" : C;
|
|
2974
2978
|
}
|
|
2975
2979
|
if (typeof m != "string")
|
|
2976
2980
|
return m === 0 ? m : +m;
|
|
@@ -2978,21 +2982,26 @@ function na() {
|
|
|
2978
2982
|
var M = o.test(m);
|
|
2979
2983
|
return M || s.test(m) ? a(m.slice(2), M ? 2 : 8) : r.test(m) ? t : +m;
|
|
2980
2984
|
}
|
|
2981
|
-
return
|
|
2985
|
+
return Zi = J, Zi;
|
|
2982
2986
|
}
|
|
2983
|
-
var
|
|
2984
|
-
const
|
|
2987
|
+
var oa = ra();
|
|
2988
|
+
const Un = /* @__PURE__ */ Or(oa);
|
|
2985
2989
|
/**
|
|
2986
2990
|
* @license
|
|
2987
2991
|
* Copyright 2018 Google LLC
|
|
2988
2992
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2989
2993
|
*/
|
|
2990
|
-
const
|
|
2991
|
-
var
|
|
2992
|
-
class
|
|
2994
|
+
const Fe = (i) => i ?? P;
|
|
2995
|
+
var vt, ri, oi;
|
|
2996
|
+
class Rr extends lt {
|
|
2993
2997
|
constructor() {
|
|
2994
2998
|
super();
|
|
2995
|
-
|
|
2999
|
+
/** @type {(LegendConfig & {id:string})[]}} */
|
|
3000
|
+
D(this, vt, []);
|
|
3001
|
+
D(this, ri, Xn`
|
|
3002
|
+
.separator {
|
|
3003
|
+
margin: 0 0 24px 0;
|
|
3004
|
+
}
|
|
2996
3005
|
color-legend {
|
|
2997
3006
|
--cle-background: transparent;
|
|
2998
3007
|
--cle-font-family: inherit;
|
|
@@ -3002,8 +3011,31 @@ class Lr extends lt {
|
|
|
3002
3011
|
--cle-padding: 0;
|
|
3003
3012
|
}
|
|
3004
3013
|
`);
|
|
3005
|
-
|
|
3006
|
-
this.unstyled = !1, this.noShadow = !1, this.
|
|
3014
|
+
D(this, oi, "");
|
|
3015
|
+
this.unstyled = !1, this.noShadow = !1, this.layer = null;
|
|
3016
|
+
}
|
|
3017
|
+
get layerLegend() {
|
|
3018
|
+
return S(this, vt) ? S(this, vt).length > 1 ? S(this, vt) : S(this, vt)[0] : null;
|
|
3019
|
+
}
|
|
3020
|
+
/**
|
|
3021
|
+
* Legend configurations
|
|
3022
|
+
* @param {LegendConfig | LegendConfig[]} value
|
|
3023
|
+
* @see {@link https://clhenrick.github.io/color-legend-element/}
|
|
3024
|
+
**/
|
|
3025
|
+
set layerLegend(e) {
|
|
3026
|
+
var n;
|
|
3027
|
+
Array.isArray(e) ? _t(this, vt, e.map((r, o) => {
|
|
3028
|
+
var s;
|
|
3029
|
+
return {
|
|
3030
|
+
id: (((s = this.layer) == null ? void 0 : s.get("id")) ?? "") + o,
|
|
3031
|
+
...r
|
|
3032
|
+
};
|
|
3033
|
+
})) : _t(this, vt, [
|
|
3034
|
+
{
|
|
3035
|
+
id: (((n = this.layer) == null ? void 0 : n.get("id")) ?? "") + 0,
|
|
3036
|
+
...e
|
|
3037
|
+
}
|
|
3038
|
+
]);
|
|
3007
3039
|
}
|
|
3008
3040
|
/**
|
|
3009
3041
|
* Overrides createRenderRoot to handle shadow DOM creation based on the noShadow property.
|
|
@@ -3012,67 +3044,45 @@ class Lr extends lt {
|
|
|
3012
3044
|
return this.noShadow ? this : super.createRenderRoot();
|
|
3013
3045
|
}
|
|
3014
3046
|
firstUpdated() {
|
|
3015
|
-
this.layerLegend
|
|
3016
|
-
|
|
3047
|
+
this.layerLegend && new ResizeObserver(() => {
|
|
3048
|
+
var e;
|
|
3049
|
+
_t(this, vt, (e = S(this, vt)) == null ? void 0 : e.map((n) => (this.offsetWidth !== n.width && (n.width = this.offsetWidth), { ...n }))), this.requestUpdate();
|
|
3017
3050
|
}).observe(this.renderRoot.querySelector(".legend-container"));
|
|
3018
3051
|
}
|
|
3019
3052
|
/**
|
|
3020
|
-
* Renders
|
|
3053
|
+
* Renders color legends based on the layerLegend property.
|
|
3021
3054
|
*/
|
|
3022
3055
|
render() {
|
|
3023
3056
|
return customElements.get("color-legend") || console.error(
|
|
3024
3057
|
"Please import `color-legend-element` in order to use layerLegend"
|
|
3025
3058
|
), x`
|
|
3026
3059
|
<style>
|
|
3027
|
-
${
|
|
3028
|
-
${!this.unstyled &&
|
|
3060
|
+
${S(this, ri)}
|
|
3061
|
+
${!this.unstyled && S(this, oi)}
|
|
3029
3062
|
</style>
|
|
3030
3063
|
${G(
|
|
3031
3064
|
this.layerLegend,
|
|
3032
3065
|
() => x`
|
|
3033
3066
|
<div class="legend-container">
|
|
3034
3067
|
<!-- Render color-legend-->
|
|
3035
|
-
${
|
|
3036
|
-
|
|
3037
|
-
() => (
|
|
3038
|
-
/** @type {LegendConfig[]} */
|
|
3039
|
-
this.layerLegend.map(
|
|
3040
|
-
(e, n) => x`
|
|
3041
|
-
<color-legend
|
|
3042
|
-
id="${this.layer.get("id") + n}"
|
|
3043
|
-
width=${e.width ?? 325}
|
|
3044
|
-
scaleType="${Mt(e.scaleType)}"
|
|
3045
|
-
markType="${Mt(e.markType)}"
|
|
3046
|
-
titleText="${Mt(e.title)}"
|
|
3047
|
-
.range=${e.range}
|
|
3048
|
-
.domain=${e.domain}
|
|
3049
|
-
tickFormat="${Mt(e.tickFormat)}"
|
|
3050
|
-
.ticks=${e.ticks ?? 5}
|
|
3051
|
-
.tickValues=${e.tickValues}
|
|
3052
|
-
.marginLeft=${0}
|
|
3053
|
-
.marginRight=${0}
|
|
3054
|
-
>
|
|
3055
|
-
</color-legend>
|
|
3056
|
-
<div></div>
|
|
3057
|
-
`
|
|
3058
|
-
)
|
|
3059
|
-
),
|
|
3060
|
-
() => x`
|
|
3068
|
+
${S(this, vt).map(
|
|
3069
|
+
(e, n, r) => x`
|
|
3061
3070
|
<color-legend
|
|
3062
|
-
id="${
|
|
3063
|
-
width=${
|
|
3064
|
-
scaleType="${
|
|
3065
|
-
markType="${
|
|
3066
|
-
titleText="${
|
|
3067
|
-
.range=${
|
|
3068
|
-
.domain=${
|
|
3069
|
-
tickFormat="${
|
|
3070
|
-
.ticks=${
|
|
3071
|
-
.tickValues=${
|
|
3071
|
+
id="${e.id}"
|
|
3072
|
+
width=${e.width ?? 325}
|
|
3073
|
+
scaleType="${Fe(e.scaleType)}"
|
|
3074
|
+
markType="${Fe(e.markType)}"
|
|
3075
|
+
titleText="${Fe(e.title)}"
|
|
3076
|
+
.range=${e.range}
|
|
3077
|
+
.domain=${e.domain}
|
|
3078
|
+
tickFormat="${Fe(e.tickFormat)}"
|
|
3079
|
+
.ticks=${e.ticks ?? 5}
|
|
3080
|
+
.tickValues=${e.tickValues}
|
|
3072
3081
|
.marginLeft=${0}
|
|
3073
3082
|
.marginRight=${0}
|
|
3074
3083
|
>
|
|
3075
3084
|
</color-legend>
|
|
3085
|
+
${n !== r.length - 1 ? x`<div class="separator"></div>` : P}
|
|
3076
3086
|
`
|
|
3077
3087
|
)}
|
|
3078
3088
|
</div>
|
|
@@ -3081,8 +3091,8 @@ class Lr extends lt {
|
|
|
3081
3091
|
`;
|
|
3082
3092
|
}
|
|
3083
3093
|
}
|
|
3084
|
-
|
|
3085
|
-
j(
|
|
3094
|
+
vt = new WeakMap(), ri = new WeakMap(), oi = new WeakMap(), // Define static properties for the component
|
|
3095
|
+
j(Rr, "properties", {
|
|
3086
3096
|
unstyled: { type: Boolean },
|
|
3087
3097
|
noShadow: { type: Boolean },
|
|
3088
3098
|
layerLegend: { attribute: !1 },
|
|
@@ -3090,32 +3100,32 @@ j(Lr, "properties", {
|
|
|
3090
3100
|
});
|
|
3091
3101
|
customElements.define(
|
|
3092
3102
|
"eox-layercontrol-layer-legend",
|
|
3093
|
-
|
|
3103
|
+
Rr
|
|
3094
3104
|
);
|
|
3095
|
-
var
|
|
3096
|
-
class
|
|
3105
|
+
var Tt, ce, Pe, Oe, Qi, si, ai;
|
|
3106
|
+
class Lr extends lt {
|
|
3097
3107
|
constructor() {
|
|
3098
3108
|
super();
|
|
3099
|
-
|
|
3109
|
+
D(this, Oe);
|
|
3100
3110
|
/**
|
|
3101
3111
|
* data input by the user
|
|
3102
3112
|
*
|
|
3103
3113
|
* @type {{[key: string]: any}}
|
|
3104
3114
|
*/
|
|
3105
|
-
|
|
3115
|
+
D(this, Tt, {});
|
|
3106
3116
|
/**
|
|
3107
3117
|
* data input by the user
|
|
3108
3118
|
*
|
|
3109
3119
|
* @type {{[key: string]: any}}
|
|
3110
3120
|
*/
|
|
3111
|
-
|
|
3121
|
+
D(this, ce, null);
|
|
3112
3122
|
/**
|
|
3113
3123
|
* Original tile url function, if it exist
|
|
3114
3124
|
*
|
|
3115
3125
|
* @type {Function}
|
|
3116
3126
|
*/
|
|
3117
|
-
|
|
3118
|
-
|
|
3127
|
+
D(this, Pe);
|
|
3128
|
+
D(this, si, Xn`
|
|
3119
3129
|
color-legend {
|
|
3120
3130
|
--cle-background: transparent;
|
|
3121
3131
|
--cle-font-family: inherit;
|
|
@@ -3124,8 +3134,8 @@ class Or extends lt {
|
|
|
3124
3134
|
--cle-letter-spacing-title: inherit;
|
|
3125
3135
|
}
|
|
3126
3136
|
`);
|
|
3127
|
-
|
|
3128
|
-
this.layer = null, this.unstyled = !1, this.noShadow = !1, this.layerConfig = null, this.throttleDataChange =
|
|
3137
|
+
D(this, ai, "");
|
|
3138
|
+
this.layer = null, this.unstyled = !1, this.noShadow = !1, this.layerConfig = null, this.throttleDataChange = Un(B(this, Oe, Qi), 1e3);
|
|
3129
3139
|
}
|
|
3130
3140
|
/** Decide what type of throttling to do based on layerConfig type
|
|
3131
3141
|
*
|
|
@@ -3134,7 +3144,7 @@ class Or extends lt {
|
|
|
3134
3144
|
updated(e) {
|
|
3135
3145
|
if (e.has("layerConfig")) {
|
|
3136
3146
|
const n = this.layerConfig.type === "style" || this.layerConfig.style ? 100 : 1e3;
|
|
3137
|
-
this.throttleDataChange =
|
|
3147
|
+
this.throttleDataChange = Un(B(this, Oe, Qi), n), this.requestUpdate();
|
|
3138
3148
|
}
|
|
3139
3149
|
}
|
|
3140
3150
|
/**
|
|
@@ -3147,7 +3157,7 @@ class Or extends lt {
|
|
|
3147
3157
|
* Renders a JSON form for configuration options of a layer.
|
|
3148
3158
|
*/
|
|
3149
3159
|
render() {
|
|
3150
|
-
|
|
3160
|
+
_t(this, ce, Js(this.layer, this.layerConfig)), Object.keys(S(this, Tt)).length !== 0 && _t(this, ce, S(this, Tt)), customElements.get("eox-jsonform") || console.error("Please import @eox/jsonform in order to use layerconfig");
|
|
3151
3161
|
const e = {
|
|
3152
3162
|
disable_edit_json: !0,
|
|
3153
3163
|
disable_collapse: !0,
|
|
@@ -3155,8 +3165,8 @@ class Or extends lt {
|
|
|
3155
3165
|
};
|
|
3156
3166
|
return x`
|
|
3157
3167
|
<style>
|
|
3158
|
-
${
|
|
3159
|
-
${!this.unstyled &&
|
|
3168
|
+
${S(this, si)}
|
|
3169
|
+
${!this.unstyled && S(this, ai)}
|
|
3160
3170
|
</style>
|
|
3161
3171
|
${G(
|
|
3162
3172
|
this.layerConfig,
|
|
@@ -3168,9 +3178,9 @@ class Or extends lt {
|
|
|
3168
3178
|
.noShadow=${!0}
|
|
3169
3179
|
.unstyled=${this.unstyled}
|
|
3170
3180
|
.layer=${this.layer}
|
|
3171
|
-
.layerLegend=${
|
|
3181
|
+
.layerLegend=${Gs(
|
|
3172
3182
|
this.layerConfig.legend,
|
|
3173
|
-
|
|
3183
|
+
S(this, Tt)
|
|
3174
3184
|
)}
|
|
3175
3185
|
></eox-layercontrol-layer-legend>
|
|
3176
3186
|
`
|
|
@@ -3178,7 +3188,7 @@ class Or extends lt {
|
|
|
3178
3188
|
<!-- Render a JSON form for layer configuration -->
|
|
3179
3189
|
<eox-jsonform
|
|
3180
3190
|
.schema=${this.layerConfig.schema}
|
|
3181
|
-
.value=${
|
|
3191
|
+
.value=${S(this, ce)}
|
|
3182
3192
|
.options=${e}
|
|
3183
3193
|
@change=${this.throttleDataChange}
|
|
3184
3194
|
></eox-jsonform>
|
|
@@ -3187,17 +3197,17 @@ class Or extends lt {
|
|
|
3187
3197
|
`;
|
|
3188
3198
|
}
|
|
3189
3199
|
}
|
|
3190
|
-
|
|
3200
|
+
Tt = new WeakMap(), ce = new WeakMap(), Pe = new WeakMap(), Oe = new WeakSet(), /**
|
|
3191
3201
|
* Handles changes in eox-jsonform values.
|
|
3192
3202
|
*
|
|
3193
3203
|
* @param {{ detail: { value: string; }; }} e
|
|
3194
3204
|
*/
|
|
3195
|
-
|
|
3196
|
-
|
|
3205
|
+
Qi = function(e) {
|
|
3206
|
+
_t(this, Tt, e.detail), this.layerConfig.type === "style" || this.layerConfig.style ? "setStyle" in this.layer || "updateStyleVariables" in this.layer ? Ys(S(this, Tt), this.layer, this.layerConfig) : console.error(
|
|
3197
3207
|
`Layer type ${this.layer.get("type") ?? ""} does not support styles configuration`
|
|
3198
|
-
) :
|
|
3199
|
-
|
|
3200
|
-
|
|
3208
|
+
) : _t(this, Pe, Xs(
|
|
3209
|
+
S(this, Tt),
|
|
3210
|
+
S(this, Pe),
|
|
3201
3211
|
this
|
|
3202
3212
|
)), this.dispatchEvent(
|
|
3203
3213
|
new CustomEvent("layerConfig:change", {
|
|
@@ -3208,8 +3218,8 @@ Ki = function(e) {
|
|
|
3208
3218
|
}
|
|
3209
3219
|
})
|
|
3210
3220
|
), this.requestUpdate();
|
|
3211
|
-
},
|
|
3212
|
-
j(
|
|
3221
|
+
}, si = new WeakMap(), ai = new WeakMap(), // Define static properties for the component
|
|
3222
|
+
j(Lr, "properties", {
|
|
3213
3223
|
layer: { attribute: !1 },
|
|
3214
3224
|
unstyled: { type: Boolean },
|
|
3215
3225
|
noShadow: { type: Boolean },
|
|
@@ -3217,15 +3227,15 @@ j(Or, "properties", {
|
|
|
3217
3227
|
});
|
|
3218
3228
|
customElements.define(
|
|
3219
3229
|
"eox-layercontrol-layerconfig",
|
|
3220
|
-
|
|
3230
|
+
Lr
|
|
3221
3231
|
);
|
|
3222
|
-
var
|
|
3223
|
-
class
|
|
3232
|
+
var li, Ir, di, ci;
|
|
3233
|
+
class Mr extends lt {
|
|
3224
3234
|
constructor() {
|
|
3225
3235
|
super();
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3236
|
+
D(this, li);
|
|
3237
|
+
D(this, di, "");
|
|
3238
|
+
D(this, ci, "");
|
|
3229
3239
|
this.unstyled = !1, this.noShadow = !1, this.layerDatetime = null, this.layer = null;
|
|
3230
3240
|
}
|
|
3231
3241
|
/**
|
|
@@ -3242,8 +3252,8 @@ class Rr extends lt {
|
|
|
3242
3252
|
"Please import @eox/timecontrol in order to use layerDatetime"
|
|
3243
3253
|
), x`
|
|
3244
3254
|
<style>
|
|
3245
|
-
${
|
|
3246
|
-
${!this.unstyled &&
|
|
3255
|
+
${S(this, di)}
|
|
3256
|
+
${!this.unstyled && S(this, ci)}
|
|
3247
3257
|
</style>
|
|
3248
3258
|
${G(
|
|
3249
3259
|
this.layerDatetime,
|
|
@@ -3260,20 +3270,20 @@ class Rr extends lt {
|
|
|
3260
3270
|
.controlProperty=${void 0}
|
|
3261
3271
|
current-step=${this.layerDatetime.currentStep}
|
|
3262
3272
|
.displayFormat=${this.layerDatetime.displayFormat}
|
|
3263
|
-
@stepchange=${B(this,
|
|
3273
|
+
@stepchange=${B(this, li, Ir)}
|
|
3264
3274
|
></eox-timecontrol>
|
|
3265
3275
|
`
|
|
3266
3276
|
)}
|
|
3267
3277
|
`;
|
|
3268
3278
|
}
|
|
3269
3279
|
}
|
|
3270
|
-
|
|
3280
|
+
li = new WeakSet(), /**
|
|
3271
3281
|
* Handles timecontrol Stepchange &
|
|
3272
3282
|
* triggers `datetime:updated` event on step change
|
|
3273
3283
|
*
|
|
3274
3284
|
* @param {CustomEvent<{currentStep:string|number}>} evt
|
|
3275
3285
|
**/
|
|
3276
|
-
|
|
3286
|
+
Ir = function(e) {
|
|
3277
3287
|
this.dispatchEvent(
|
|
3278
3288
|
new CustomEvent("datetime:updated", {
|
|
3279
3289
|
bubbles: !0,
|
|
@@ -3283,8 +3293,8 @@ Mr = function(e) {
|
|
|
3283
3293
|
}
|
|
3284
3294
|
})
|
|
3285
3295
|
), this.layerDatetime.currentStep = e.detail.currentStep, this.requestUpdate();
|
|
3286
|
-
},
|
|
3287
|
-
j(
|
|
3296
|
+
}, di = new WeakMap(), ci = new WeakMap(), // Define static properties for the component
|
|
3297
|
+
j(Mr, "properties", {
|
|
3288
3298
|
unstyled: { type: Boolean },
|
|
3289
3299
|
noShadow: { type: Boolean },
|
|
3290
3300
|
layerDatetime: { attribute: !1 },
|
|
@@ -3292,15 +3302,15 @@ j(Rr, "properties", {
|
|
|
3292
3302
|
});
|
|
3293
3303
|
customElements.define(
|
|
3294
3304
|
"eox-layercontrol-layer-datetime",
|
|
3295
|
-
|
|
3305
|
+
Mr
|
|
3296
3306
|
);
|
|
3297
|
-
var
|
|
3298
|
-
class
|
|
3307
|
+
var Re, ui, hi;
|
|
3308
|
+
class Nr extends lt {
|
|
3299
3309
|
constructor() {
|
|
3300
3310
|
super();
|
|
3301
3311
|
/** @param {number} index */
|
|
3302
|
-
|
|
3303
|
-
|
|
3312
|
+
D(this, Re, (e) => (this.selectedTab === e || this.toolsAsList) && "highlighted");
|
|
3313
|
+
D(this, ui, `
|
|
3304
3314
|
.tabbed figure,
|
|
3305
3315
|
.listed figure {
|
|
3306
3316
|
margin: 0;
|
|
@@ -3323,7 +3333,7 @@ class Ir extends lt {
|
|
|
3323
3333
|
display: block;
|
|
3324
3334
|
}
|
|
3325
3335
|
`);
|
|
3326
|
-
|
|
3336
|
+
D(this, hi, `
|
|
3327
3337
|
.listed label {
|
|
3328
3338
|
display: flex;
|
|
3329
3339
|
justify-content: start;
|
|
@@ -3378,8 +3388,8 @@ class Ir extends lt {
|
|
|
3378
3388
|
const e = this.tabs, n = this.actions, r = n.length + e.length > 1;
|
|
3379
3389
|
return x`
|
|
3380
3390
|
<style>
|
|
3381
|
-
${
|
|
3382
|
-
${!this.unstyled &&
|
|
3391
|
+
${S(this, ui)}
|
|
3392
|
+
${!this.unstyled && S(this, hi)}
|
|
3383
3393
|
</style>
|
|
3384
3394
|
<div class="${this.toolsAsList ? "listed" : "tabbed"}">
|
|
3385
3395
|
<!-- Navigation for tabs and actions -->
|
|
@@ -3392,11 +3402,11 @@ class Ir extends lt {
|
|
|
3392
3402
|
() => x`
|
|
3393
3403
|
<div>
|
|
3394
3404
|
<!-- Labels for tabs -->
|
|
3395
|
-
${
|
|
3405
|
+
${We(
|
|
3396
3406
|
e,
|
|
3397
3407
|
(o, s) => x`
|
|
3398
3408
|
<label
|
|
3399
|
-
class=${
|
|
3409
|
+
class=${S(this, Re).call(this, s)}
|
|
3400
3410
|
@click=${() => this.selectedTab = s}
|
|
3401
3411
|
>
|
|
3402
3412
|
<!-- Customizable icon for each tab -->
|
|
@@ -3407,7 +3417,7 @@ class Ir extends lt {
|
|
|
3407
3417
|
</div>
|
|
3408
3418
|
<div>
|
|
3409
3419
|
<!-- Icons for actions -->
|
|
3410
|
-
${
|
|
3420
|
+
${We(
|
|
3411
3421
|
n,
|
|
3412
3422
|
(o) => x`
|
|
3413
3423
|
<span>
|
|
@@ -3424,7 +3434,7 @@ class Ir extends lt {
|
|
|
3424
3434
|
)}
|
|
3425
3435
|
<figure>
|
|
3426
3436
|
<!-- Content for each tab -->
|
|
3427
|
-
${
|
|
3437
|
+
${We(
|
|
3428
3438
|
e,
|
|
3429
3439
|
(o, s) => x`
|
|
3430
3440
|
${G(
|
|
@@ -3437,7 +3447,7 @@ class Ir extends lt {
|
|
|
3437
3447
|
</label>
|
|
3438
3448
|
`
|
|
3439
3449
|
)}
|
|
3440
|
-
<div class="tab ${
|
|
3450
|
+
<div class="tab ${S(this, Re).call(this, s)}">
|
|
3441
3451
|
<!-- Content slot for each tab -->
|
|
3442
3452
|
<slot name=${`${o}-content`}>${o}</slot>
|
|
3443
3453
|
</div>
|
|
@@ -3448,8 +3458,8 @@ class Ir extends lt {
|
|
|
3448
3458
|
`;
|
|
3449
3459
|
}
|
|
3450
3460
|
}
|
|
3451
|
-
|
|
3452
|
-
j(
|
|
3461
|
+
Re = new WeakMap(), ui = new WeakMap(), hi = new WeakMap(), // Define static properties for the component
|
|
3462
|
+
j(Nr, "properties", {
|
|
3453
3463
|
actions: { attribute: !1 },
|
|
3454
3464
|
selectedTab: { state: !0 },
|
|
3455
3465
|
tabs: { attribute: !1 },
|
|
@@ -3457,16 +3467,16 @@ j(Ir, "properties", {
|
|
|
3457
3467
|
noShadow: { type: Boolean },
|
|
3458
3468
|
toolsAsList: { type: Boolean }
|
|
3459
3469
|
});
|
|
3460
|
-
customElements.define("eox-layercontrol-tools-items",
|
|
3461
|
-
const
|
|
3462
|
-
var
|
|
3463
|
-
class
|
|
3470
|
+
customElements.define("eox-layercontrol-tools-items", Nr);
|
|
3471
|
+
const sa = "button,.button { /* TODO: why does this only work here and not from :root? */ --primary-color: #004170; --primary-color-hover: #004170cc; --error-color: #ff5252; display: inline-flex; position: relative; align-items: center; color: #fff; border-width: 0; outline: none; border-radius: 4px; padding: 16px; height: 36px; cursor: pointer; font-family: inherit; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 1.25px; font-weight: 500; box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12); transition-property: box-shadow, transform, opacity, background; transition-duration: 0.28s; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);}button:hover:not([disabled]):not(.icon),.button:hover:not([disabled]):not(.icon) { box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12); background: var(--primary-color-hover);}button,button:active,.button,.button:active { background: var(--primary-color);}button[disabled],.button[disabled] { opacity: 0.5; cursor: not-allowed;}button.block,.button.block { display: block;}button.outline,.button.outline { background: transparent; box-shadow: none; color: var(--primary-color); outline: 1px solid var(--primary-color);}button.outline:hover,.button.outline:hover { background: transparent;}button.icon,.button.icon { background: transparent; border: none; box-shadow: none; padding: 0; border-radius: 50%; width: 24px; height: 24px; text-indent: -9999px;}button.icon-text,.button.icon-text { text-indent: 26px;}button.icon-text.block,.button.icon-text.block { text-indent: 20px;}button.icon:before,button.icon-text:before,.button.icon:before,.button.icon-text:before { position: absolute; text-indent: 0; line-height: initial;}button.icon-text.block:before,.button.icon-text.block:before { text-indent: -54px;}button.icon:before,.button.icon:before { width: 24px; height: 24px; margin-right: 0;}button.icon-text:before,.button.icon-text:before { width: 18px; height: 18px;}button.small,.button.small { height: 28px; padding: 12.4px; font-size: 0.75rem;}button.smallest.icon,button.smallest.icon::before { height: 16px; width: 16px; padding: 0px;}", aa = `input[type="radio"] { appearance: none; -webkit-appearance: none; margin: 0; cursor: pointer; display: flex; flex-direction: row; align-items: center; width: 24px; height: 24px;}label span { font-size: small;}input[type="radio"]:after { display: block; content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eradiobox-blank%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,2Z' /%3E%3C/svg%3E"); width: 20px; height: 20px; margin-right: 4px;}input[type="radio"]:checked:after { 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");}`, Hr = `input[type="checkbox"] { appearance: none; -webkit-appearance: none; margin: 0; cursor: pointer; display: flex; flex-direction: row; align-items: center; width: 24px; height: 24px;}input[type="checkbox"]:after { display: block; content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echeckbox-blank-outline%3C/title%3E%3Cpath d='M19,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,3M19,5V19H5V5H19Z' /%3E%3C/svg%3E"); width: 20px; height: 20px; margin-right: 4px;}input[type="checkbox"]:checked:after { 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");}`, la = ':root,:host { --range-slider-height: 6px; --range-slider-thumb-size: 15px; --range-slider-thumb-border-radius: 50%; --range-slider-color: #004170; --range-slider-track-color: #d7dcdf; --range-slider-track-border-radius: 0;}input[type="range"] { -webkit-appearance: none; border: none; color: var(--range-slider-color); overflow: hidden; padding-left: 0; margin-left: 7px;}/*webkit*/input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: var(--range-slider-thumb-size); height: var(--range-slider-thumb-size); border-radius: var(--range-slider-thumb-border-radius); background: var(--range-slider-color); border: none; box-shadow: none; margin-top: calc( var(--range-slider-height) * 0.5 - var(--range-slider-thumb-size) * 0.5 );}input[type="range"]::-webkit-slider-runnable-track { height: var(--range-slider-height); border: none; border-radius: var(--range-slider-track-border-radius); background: var(--range-slider-track-color); box-shadow: none;}input[type="range"]::-webkit-slider-thumb { cursor: grab; --clip-edges: 4px; --clip-top: calc( (var(--range-slider-thumb-size) - var(--range-slider-height)) * 0.5 ); --clip-bottom: calc(var(--range-slider-thumb-size) - var(--clip-top)); --clip-further: calc(100% + 1px); --box-fill: calc( -100vmax - var(--range-slider-thumb-size, var(--range-slider-thumb-size)) + 1px ) 0 0 100vmax currentColor; background: linear-gradient(currentColor 0 0) scroll no-repeat left center / 50% calc(var(--range-slider-height) + 1px); background-color: currentColor; box-shadow: var(--box-fill); border-radius: var(--range-slider-thumb-size, var(--range-slider-thumb-size)); filter: brightness(100%); clip-path: polygon( 100% -1px, var(--clip-edges) -1px, 0 var(--clip-top), -100vmax var(--clip-top), -100vmax var(--clip-bottom), 0 var(--clip-bottom), var(--clip-edges) 100%, var(--clip-further) var(--clip-further) );}/*mozilla*/input[type="range"]::-moz-range-thumb { width: var(--range-slider-thumb-size); height: var(--range-slider-thumb-size); border-radius: var(--range-slider-thumb-border-radius); background: var(--range-slider-color); border: none; box-shadow: none; cursor: grab;}input[type="range"]::-moz-range-track { border: none; border-radius: var(--range-slider-track-border-radius); background: var(--range-slider-track-color); box-shadow: none;}input[type="range"]::-moz-range-progress { appearance: none; background: currentColor; transition-delay: 30ms;}input[type="range"]::-moz-range-track,input[type="range"]::-moz-range-progress { height: calc(var(--range-slider-height)); border-radius: var(--range-slider-track-border-radius);}/*toolcool slider*/tc-range-slider { --height: var(--range-slider-height); --panel-bg: var(--range-slider-track-color); --panel-bg-hover: var(--range-slider-track-color); --panel-bg-fill: var(--range-slider-color); --panel-bg-border-radius: var(--range-slider-track-border-radius); --pointer-bg: var(--range-slider-color); --pointer-bg-hover: var(--range-slider-color); --pointer-bg-focus: var(--range-slider-color); --pointer-width: var(--range-slider-thumb-size); --pointer-height: var(--range-slider-thumb-size); --pointer-shadow: none; --pointer-shadow-hover: none; --pointer-shadow-focus: none; --pointer-border: none; --pointer-border-hover: 0; --pointer-border-focus: 0; --pointer-border-radius: var(--range-slider-thumb-border-radius);}';
|
|
3472
|
+
var pi, fi;
|
|
3473
|
+
class Vr extends lt {
|
|
3464
3474
|
constructor() {
|
|
3465
3475
|
super();
|
|
3466
3476
|
// Initializes '_removeButton' invoking 'removeButton' function with 'this' context.
|
|
3467
|
-
j(this, "_removeButton", () =>
|
|
3477
|
+
j(this, "_removeButton", () => ea(this));
|
|
3468
3478
|
// Initializes '_sortButton' invoking 'sortButton' function with 'unstyled' property as a parameter.
|
|
3469
|
-
j(this, "_sortButton", () =>
|
|
3479
|
+
j(this, "_sortButton", () => ia(this.unstyled));
|
|
3470
3480
|
/**
|
|
3471
3481
|
* Initializes '_button' as a function accepting 'tool' parameter to generate a Button.
|
|
3472
3482
|
* Uses 'this.unstyled' as a context parameter for Button generation.
|
|
@@ -3474,12 +3484,12 @@ class Hr extends lt {
|
|
|
3474
3484
|
* @param {string} tool - Tool parameter for Button generation.
|
|
3475
3485
|
* @returns {import("lit").HTMLTemplateResult} - The generated Button element.
|
|
3476
3486
|
*/
|
|
3477
|
-
j(this, "_button", (e) =>
|
|
3487
|
+
j(this, "_button", (e) => ta(e, this.unstyled));
|
|
3478
3488
|
j(this, "_getDefaultTools", () => {
|
|
3479
3489
|
var e;
|
|
3480
3490
|
return x`
|
|
3481
3491
|
<div slot="info-content">
|
|
3482
|
-
${
|
|
3492
|
+
${na(this.layer.get("description"))}
|
|
3483
3493
|
</div>
|
|
3484
3494
|
<div slot="opacity-content">
|
|
3485
3495
|
<!-- Input for opacity -->
|
|
@@ -3488,7 +3498,7 @@ class Hr extends lt {
|
|
|
3488
3498
|
min="0"
|
|
3489
3499
|
max="1"
|
|
3490
3500
|
step="0.01"
|
|
3491
|
-
value=${
|
|
3501
|
+
value=${Pr((e = this.layer) == null ? void 0 : e.getOpacity())}
|
|
3492
3502
|
@input=${(n) => this.layer.setOpacity(parseFloat(n.target.value))}
|
|
3493
3503
|
/>
|
|
3494
3504
|
</div>
|
|
@@ -3544,12 +3554,12 @@ class Hr extends lt {
|
|
|
3544
3554
|
<div slot="sort-icon">${this._sortButton()}</div>
|
|
3545
3555
|
`;
|
|
3546
3556
|
});
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
${
|
|
3550
|
-
${sa}
|
|
3551
|
-
${Nr}
|
|
3557
|
+
D(this, pi, "");
|
|
3558
|
+
D(this, fi, `
|
|
3559
|
+
${sa}
|
|
3552
3560
|
${aa}
|
|
3561
|
+
${Hr}
|
|
3562
|
+
${la}
|
|
3553
3563
|
.drag-handle {
|
|
3554
3564
|
cursor: n-resize;
|
|
3555
3565
|
}
|
|
@@ -3677,14 +3687,14 @@ class Hr extends lt {
|
|
|
3677
3687
|
}
|
|
3678
3688
|
render() {
|
|
3679
3689
|
var l;
|
|
3680
|
-
const e =
|
|
3690
|
+
const e = Ks(this.tools, this.layer), n = Qs(this.tools, this.layer), r = this[`_${e == null ? void 0 : e[0]}Button`] ? (
|
|
3681
3691
|
// @ts-expect-error TODO
|
|
3682
3692
|
this[`_${e == null ? void 0 : e[0]}Button`]()
|
|
3683
|
-
) :
|
|
3693
|
+
) : P, o = ((l = this.tools) == null ? void 0 : l.length) === 1 ? `${this.tools[0]}-icon` : "", s = e == null ? void 0 : e.length, a = n == null ? void 0 : n.length;
|
|
3684
3694
|
return x`
|
|
3685
3695
|
<style>
|
|
3686
|
-
${
|
|
3687
|
-
${!this.unstyled &&
|
|
3696
|
+
${S(this, pi)}
|
|
3697
|
+
${!this.unstyled && S(this, fi)}
|
|
3688
3698
|
</style>
|
|
3689
3699
|
${G(
|
|
3690
3700
|
s + a > 0,
|
|
@@ -3699,7 +3709,7 @@ class Hr extends lt {
|
|
|
3699
3709
|
() => x`
|
|
3700
3710
|
<details
|
|
3701
3711
|
class="tools"
|
|
3702
|
-
open=${this.layer.get("layerControlToolsExpand") ||
|
|
3712
|
+
open=${this.layer.get("layerControlToolsExpand") || P}
|
|
3703
3713
|
>
|
|
3704
3714
|
<summary>
|
|
3705
3715
|
<button class="icon ${o}">Tools</button>
|
|
@@ -3713,7 +3723,7 @@ class Hr extends lt {
|
|
|
3713
3723
|
.toolsAsList=${this.toolsAsList}
|
|
3714
3724
|
>
|
|
3715
3725
|
<!-- Rendering tabs and content -->
|
|
3716
|
-
${
|
|
3726
|
+
${We(n, (d) => this._button(d))}
|
|
3717
3727
|
<!-- Including default tools -->
|
|
3718
3728
|
${this._getDefaultTools()}
|
|
3719
3729
|
</eox-layercontrol-tools-items>
|
|
@@ -3725,8 +3735,8 @@ class Hr extends lt {
|
|
|
3725
3735
|
`;
|
|
3726
3736
|
}
|
|
3727
3737
|
}
|
|
3728
|
-
|
|
3729
|
-
j(
|
|
3738
|
+
pi = new WeakMap(), fi = new WeakMap(), // Define static properties for the component
|
|
3739
|
+
j(Vr, "properties", {
|
|
3730
3740
|
layer: { attribute: !1 },
|
|
3731
3741
|
tools: { attribute: !1 },
|
|
3732
3742
|
unstyled: { type: Boolean },
|
|
@@ -3735,11 +3745,11 @@ j(Hr, "properties", {
|
|
|
3735
3745
|
});
|
|
3736
3746
|
customElements.define(
|
|
3737
3747
|
"eox-layercontrol-layer-tools",
|
|
3738
|
-
|
|
3748
|
+
Vr
|
|
3739
3749
|
);
|
|
3740
|
-
const
|
|
3750
|
+
const da = (i) => {
|
|
3741
3751
|
const t = () => {
|
|
3742
|
-
const e =
|
|
3752
|
+
const e = Zs(
|
|
3743
3753
|
i.layer,
|
|
3744
3754
|
i.map,
|
|
3745
3755
|
i.showLayerZoomState
|
|
@@ -3753,7 +3763,7 @@ const la = (i) => {
|
|
|
3753
3763
|
i.layer,
|
|
3754
3764
|
i.showLayerZoomState
|
|
3755
3765
|
) && (t(), i.map.getView().on("change:resolution", () => t()));
|
|
3756
|
-
},
|
|
3766
|
+
}, ca = (i, t) => {
|
|
3757
3767
|
const e = t.layer;
|
|
3758
3768
|
e.setVisible(i.target.checked), i.target.checked && e.get("layerControlExclusive") && t.closest(
|
|
3759
3769
|
".layers > ul"
|
|
@@ -3764,20 +3774,20 @@ const la = (i) => {
|
|
|
3764
3774
|
new CustomEvent("changed", { bubbles: !0, detail: e })
|
|
3765
3775
|
), t.requestUpdate();
|
|
3766
3776
|
};
|
|
3767
|
-
var $t, se,
|
|
3777
|
+
var $t, se, Br, gi, mi;
|
|
3768
3778
|
class kr extends lt {
|
|
3769
3779
|
constructor() {
|
|
3770
3780
|
super();
|
|
3771
|
-
|
|
3781
|
+
D(this, $t);
|
|
3772
3782
|
/**
|
|
3773
3783
|
* Represents the current layer visibility based on zoom level.
|
|
3774
3784
|
*
|
|
3775
3785
|
* @type {Boolean}
|
|
3776
3786
|
*/
|
|
3777
3787
|
j(this, "currLayerVisibilityBasedOnZoom", !0);
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
${
|
|
3788
|
+
D(this, gi, "");
|
|
3789
|
+
D(this, mi, `
|
|
3790
|
+
${Hr}
|
|
3781
3791
|
eox-layercontrol-layer {
|
|
3782
3792
|
width: 100%;
|
|
3783
3793
|
position: relative;
|
|
@@ -3849,7 +3859,7 @@ class kr extends lt {
|
|
|
3849
3859
|
* and register "change:resolution" ones at the beginning if `showLayerZoomState` is present
|
|
3850
3860
|
*/
|
|
3851
3861
|
firstUpdated() {
|
|
3852
|
-
|
|
3862
|
+
da(this);
|
|
3853
3863
|
}
|
|
3854
3864
|
/**
|
|
3855
3865
|
* Renders layer controls and tools with conditional display based on certain properties.
|
|
@@ -3861,8 +3871,8 @@ class kr extends lt {
|
|
|
3861
3871
|
const e = this.layer.getVisible(), n = e ? "visible" : "", r = this.currLayerVisibilityBasedOnZoom ? "" : "zoom-state-invisible", o = B(this, $t, se).call(this, "layerControlDisable") ? "disabled" : "", s = B(this, $t, se).call(this, "layerControlExclusive") ? "radio" : "checkbox", a = ((l = this.tools) == null ? void 0 : l.length) > 0;
|
|
3862
3872
|
return x`
|
|
3863
3873
|
<style>
|
|
3864
|
-
${
|
|
3865
|
-
${!this.unstyled &&
|
|
3874
|
+
${S(this, gi)}
|
|
3875
|
+
${!this.unstyled && S(this, mi)}
|
|
3866
3876
|
</style>
|
|
3867
3877
|
${G(
|
|
3868
3878
|
this.layer,
|
|
@@ -3873,8 +3883,8 @@ class kr extends lt {
|
|
|
3873
3883
|
<!-- Input element for layer visibility -->
|
|
3874
3884
|
<input
|
|
3875
3885
|
type=${s}
|
|
3876
|
-
.checked=${
|
|
3877
|
-
@click=${B(this, $t,
|
|
3886
|
+
.checked=${Pr(e)}
|
|
3887
|
+
@click=${B(this, $t, Br)}
|
|
3878
3888
|
/>
|
|
3879
3889
|
|
|
3880
3890
|
<!-- Layer title -->
|
|
@@ -3918,9 +3928,9 @@ se = function(e) {
|
|
|
3918
3928
|
*
|
|
3919
3929
|
* @param {{target: { checked: boolean }}} evt - The input change event.
|
|
3920
3930
|
*/
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
},
|
|
3931
|
+
Br = function(e) {
|
|
3932
|
+
ca(e, this);
|
|
3933
|
+
}, gi = new WeakMap(), mi = new WeakMap(), // Define static properties for the component
|
|
3924
3934
|
j(kr, "properties", {
|
|
3925
3935
|
layer: { attribute: !1 },
|
|
3926
3936
|
map: { attribute: !1, state: !0 },
|
|
@@ -3932,12 +3942,12 @@ j(kr, "properties", {
|
|
|
3932
3942
|
toolsAsList: { type: Boolean }
|
|
3933
3943
|
});
|
|
3934
3944
|
customElements.define("eox-layercontrol-layer", kr);
|
|
3935
|
-
var
|
|
3936
|
-
class
|
|
3945
|
+
var yi, bi;
|
|
3946
|
+
class Ur extends lt {
|
|
3937
3947
|
constructor() {
|
|
3938
3948
|
super();
|
|
3939
|
-
|
|
3940
|
-
|
|
3949
|
+
D(this, yi, "");
|
|
3950
|
+
D(this, bi, `
|
|
3941
3951
|
details summary {
|
|
3942
3952
|
cursor: pointer;
|
|
3943
3953
|
display: var(--layer-summary-visibility);
|
|
@@ -3977,20 +3987,20 @@ class Br extends lt {
|
|
|
3977
3987
|
*/
|
|
3978
3988
|
render() {
|
|
3979
3989
|
var r, o;
|
|
3980
|
-
const e = !!((r = this.group) != null && r.get("layerControlExpand")), n = (o =
|
|
3990
|
+
const e = !!((r = this.group) != null && r.get("layerControlExpand")), n = (o = Dr(
|
|
3981
3991
|
this.group.getLayers()
|
|
3982
3992
|
)) == null ? void 0 : o.length;
|
|
3983
3993
|
return x`
|
|
3984
3994
|
<style>
|
|
3985
|
-
${
|
|
3986
|
-
${!this.unstyled &&
|
|
3995
|
+
${S(this, yi)}
|
|
3996
|
+
${!this.unstyled && S(this, bi)}
|
|
3987
3997
|
</style>
|
|
3988
3998
|
${G(
|
|
3989
3999
|
this.group,
|
|
3990
4000
|
() => x`
|
|
3991
4001
|
<!-- Render the details element with the layer control -->
|
|
3992
4002
|
<details
|
|
3993
|
-
open=${e ||
|
|
4003
|
+
open=${e || P}
|
|
3994
4004
|
data-children-length=${n}
|
|
3995
4005
|
>
|
|
3996
4006
|
<summary>
|
|
@@ -4027,8 +4037,8 @@ class Br extends lt {
|
|
|
4027
4037
|
`;
|
|
4028
4038
|
}
|
|
4029
4039
|
}
|
|
4030
|
-
|
|
4031
|
-
j(
|
|
4040
|
+
yi = new WeakMap(), bi = new WeakMap(), // Define static properties for the component
|
|
4041
|
+
j(Ur, "properties", {
|
|
4032
4042
|
group: { attribute: !1 },
|
|
4033
4043
|
idProperty: { attribute: "id-property" },
|
|
4034
4044
|
map: { attribute: !1, state: !0 },
|
|
@@ -4041,112 +4051,112 @@ j(Br, "properties", {
|
|
|
4041
4051
|
});
|
|
4042
4052
|
customElements.define(
|
|
4043
4053
|
"eox-layercontrol-layer-group",
|
|
4044
|
-
|
|
4054
|
+
Ur
|
|
4045
4055
|
);
|
|
4046
|
-
var
|
|
4047
|
-
function
|
|
4048
|
-
if (
|
|
4049
|
-
|
|
4050
|
-
var i = "Expected a function", t = NaN, e = "[object Symbol]", n = /^\s+|\s+$/g, r = /^[-+]0x[0-9a-f]+$/i, o = /^0b[01]+$/i, s = /^0o[0-7]+$/i, a = parseInt, l = typeof
|
|
4056
|
+
var qi, Fn;
|
|
4057
|
+
function ua() {
|
|
4058
|
+
if (Fn) return qi;
|
|
4059
|
+
Fn = 1;
|
|
4060
|
+
var i = "Expected a function", t = NaN, e = "[object Symbol]", n = /^\s+|\s+$/g, r = /^[-+]0x[0-9a-f]+$/i, o = /^0b[01]+$/i, s = /^0o[0-7]+$/i, a = parseInt, l = typeof Ut == "object" && Ut && Ut.Object === Object && Ut, d = typeof self == "object" && self && self.Object === Object && self, u = l || d || Function("return this")(), c = Object.prototype, p = c.toString, f = Math.max, g = Math.min, b = function() {
|
|
4051
4061
|
return u.Date.now();
|
|
4052
4062
|
};
|
|
4053
|
-
function N(
|
|
4054
|
-
var M,
|
|
4055
|
-
if (typeof
|
|
4063
|
+
function N($, m, C) {
|
|
4064
|
+
var M, R, q, X, H, L, Z = 0, dt = !1, tt = !1, ct = !0;
|
|
4065
|
+
if (typeof $ != "function")
|
|
4056
4066
|
throw new TypeError(i);
|
|
4057
|
-
m = K(m) || 0, J(
|
|
4058
|
-
function gt(
|
|
4059
|
-
var I = M, ut =
|
|
4060
|
-
return M =
|
|
4067
|
+
m = K(m) || 0, J(C) && (dt = !!C.leading, tt = "maxWait" in C, q = tt ? f(K(C.maxWait) || 0, m) : q, ct = "trailing" in C ? !!C.trailing : ct);
|
|
4068
|
+
function gt(k) {
|
|
4069
|
+
var I = M, ut = R;
|
|
4070
|
+
return M = R = void 0, Z = k, X = $.apply(ut, I), X;
|
|
4061
4071
|
}
|
|
4062
|
-
function
|
|
4063
|
-
return Z =
|
|
4072
|
+
function zt(k) {
|
|
4073
|
+
return Z = k, H = setTimeout(Ct, m), dt ? gt(k) : X;
|
|
4064
4074
|
}
|
|
4065
|
-
function Ne(
|
|
4066
|
-
var I =
|
|
4067
|
-
return tt ? g(
|
|
4075
|
+
function Ne(k) {
|
|
4076
|
+
var I = k - L, ut = k - Z, It = m - I;
|
|
4077
|
+
return tt ? g(It, q - ut) : It;
|
|
4068
4078
|
}
|
|
4069
|
-
function
|
|
4070
|
-
var I =
|
|
4071
|
-
return
|
|
4079
|
+
function Zt(k) {
|
|
4080
|
+
var I = k - L, ut = k - Z;
|
|
4081
|
+
return L === void 0 || I >= m || I < 0 || tt && ut >= q;
|
|
4072
4082
|
}
|
|
4073
|
-
function
|
|
4074
|
-
var
|
|
4075
|
-
if (
|
|
4076
|
-
return
|
|
4077
|
-
H = setTimeout(
|
|
4083
|
+
function Ct() {
|
|
4084
|
+
var k = b();
|
|
4085
|
+
if (Zt(k))
|
|
4086
|
+
return qt(k);
|
|
4087
|
+
H = setTimeout(Ct, Ne(k));
|
|
4078
4088
|
}
|
|
4079
|
-
function
|
|
4080
|
-
return H = void 0, ct && M ? gt(
|
|
4089
|
+
function qt(k) {
|
|
4090
|
+
return H = void 0, ct && M ? gt(k) : (M = R = void 0, X);
|
|
4081
4091
|
}
|
|
4082
4092
|
function He() {
|
|
4083
|
-
H !== void 0 && clearTimeout(H), Z = 0, M =
|
|
4093
|
+
H !== void 0 && clearTimeout(H), Z = 0, M = L = R = H = void 0;
|
|
4084
4094
|
}
|
|
4085
4095
|
function _i() {
|
|
4086
|
-
return H === void 0 ? X :
|
|
4096
|
+
return H === void 0 ? X : qt(b());
|
|
4087
4097
|
}
|
|
4088
4098
|
function pe() {
|
|
4089
|
-
var
|
|
4090
|
-
if (M = arguments,
|
|
4099
|
+
var k = b(), I = Zt(k);
|
|
4100
|
+
if (M = arguments, R = this, L = k, I) {
|
|
4091
4101
|
if (H === void 0)
|
|
4092
|
-
return
|
|
4102
|
+
return zt(L);
|
|
4093
4103
|
if (tt)
|
|
4094
|
-
return H = setTimeout(
|
|
4104
|
+
return H = setTimeout(Ct, m), gt(L);
|
|
4095
4105
|
}
|
|
4096
|
-
return H === void 0 && (H = setTimeout(
|
|
4106
|
+
return H === void 0 && (H = setTimeout(Ct, m)), X;
|
|
4097
4107
|
}
|
|
4098
4108
|
return pe.cancel = He, pe.flush = _i, pe;
|
|
4099
4109
|
}
|
|
4100
|
-
function J(
|
|
4101
|
-
var m = typeof
|
|
4102
|
-
return
|
|
4110
|
+
function J($) {
|
|
4111
|
+
var m = typeof $;
|
|
4112
|
+
return !!$ && (m == "object" || m == "function");
|
|
4103
4113
|
}
|
|
4104
|
-
function F(
|
|
4105
|
-
return
|
|
4114
|
+
function F($) {
|
|
4115
|
+
return !!$ && typeof $ == "object";
|
|
4106
4116
|
}
|
|
4107
|
-
function st(
|
|
4108
|
-
return typeof
|
|
4117
|
+
function st($) {
|
|
4118
|
+
return typeof $ == "symbol" || F($) && p.call($) == e;
|
|
4109
4119
|
}
|
|
4110
|
-
function K(
|
|
4111
|
-
if (typeof
|
|
4112
|
-
return
|
|
4113
|
-
if (st(
|
|
4120
|
+
function K($) {
|
|
4121
|
+
if (typeof $ == "number")
|
|
4122
|
+
return $;
|
|
4123
|
+
if (st($))
|
|
4114
4124
|
return t;
|
|
4115
|
-
if (J(
|
|
4116
|
-
var m = typeof
|
|
4117
|
-
|
|
4125
|
+
if (J($)) {
|
|
4126
|
+
var m = typeof $.valueOf == "function" ? $.valueOf() : $;
|
|
4127
|
+
$ = J(m) ? m + "" : m;
|
|
4118
4128
|
}
|
|
4119
|
-
if (typeof
|
|
4120
|
-
return
|
|
4121
|
-
|
|
4122
|
-
var
|
|
4123
|
-
return
|
|
4129
|
+
if (typeof $ != "string")
|
|
4130
|
+
return $ === 0 ? $ : +$;
|
|
4131
|
+
$ = $.replace(n, "");
|
|
4132
|
+
var C = o.test($);
|
|
4133
|
+
return C || s.test($) ? a($.slice(2), C ? 2 : 8) : r.test($) ? t : +$;
|
|
4124
4134
|
}
|
|
4125
|
-
return
|
|
4135
|
+
return qi = N, qi;
|
|
4126
4136
|
}
|
|
4127
|
-
var
|
|
4128
|
-
const
|
|
4129
|
-
const { layers: t, idProperty: e, titleProperty: n, renderRoot: r } = i, o =
|
|
4137
|
+
var ha = ua();
|
|
4138
|
+
const pa = /* @__PURE__ */ Or(ha), fa = (i) => {
|
|
4139
|
+
const { layers: t, idProperty: e, titleProperty: n, renderRoot: r } = i, o = pa(() => {
|
|
4130
4140
|
i.requestUpdate(), i.dispatchEvent(
|
|
4131
4141
|
new CustomEvent("changed", { bubbles: !0 })
|
|
4132
4142
|
);
|
|
4133
4143
|
}, 50), s = () => o();
|
|
4134
4144
|
if (t && (t.hasListener("change:length") && (t == null || t.un("change:length", s)), t.on("change:length", s), t)) {
|
|
4135
4145
|
const a = r.querySelector("ul");
|
|
4136
|
-
|
|
4146
|
+
zs(
|
|
4137
4147
|
t,
|
|
4138
4148
|
e,
|
|
4139
4149
|
n,
|
|
4140
4150
|
i
|
|
4141
|
-
),
|
|
4151
|
+
), js(a, t, e, i);
|
|
4142
4152
|
}
|
|
4143
4153
|
};
|
|
4144
|
-
var
|
|
4145
|
-
class
|
|
4154
|
+
var vi, wi;
|
|
4155
|
+
class Fr extends lt {
|
|
4146
4156
|
constructor() {
|
|
4147
4157
|
super();
|
|
4148
|
-
|
|
4149
|
-
|
|
4158
|
+
D(this, vi, "");
|
|
4159
|
+
D(this, wi, `
|
|
4150
4160
|
ul {
|
|
4151
4161
|
padding: 0;
|
|
4152
4162
|
margin: 0;
|
|
@@ -4180,7 +4190,7 @@ class Ur extends lt {
|
|
|
4180
4190
|
* Executes specific logic after the initial render of the component.
|
|
4181
4191
|
*/
|
|
4182
4192
|
firstUpdated() {
|
|
4183
|
-
|
|
4193
|
+
fa(this);
|
|
4184
4194
|
}
|
|
4185
4195
|
/**
|
|
4186
4196
|
* Overrides createRenderRoot to handle shadow DOM creation based on the noShadow property.
|
|
@@ -4193,23 +4203,23 @@ class Ur extends lt {
|
|
|
4193
4203
|
* layer groups or individual layers accordingly. Utilizes conditional rendering and iterates through available layers.
|
|
4194
4204
|
*/
|
|
4195
4205
|
render() {
|
|
4196
|
-
const e = this.layers ?
|
|
4206
|
+
const e = this.layers ? Dr(this.layers).reverse() : [];
|
|
4197
4207
|
return x`
|
|
4198
4208
|
<style>
|
|
4199
|
-
${
|
|
4200
|
-
${!this.unstyled &&
|
|
4209
|
+
${S(this, vi)}
|
|
4210
|
+
${!this.unstyled && S(this, wi)}
|
|
4201
4211
|
</style>
|
|
4202
4212
|
<ul>
|
|
4203
4213
|
${G(
|
|
4204
4214
|
this.layers,
|
|
4205
4215
|
() => x`
|
|
4206
|
-
${
|
|
4216
|
+
${wo(
|
|
4207
4217
|
e,
|
|
4208
4218
|
(n) => n,
|
|
4209
4219
|
(n) => x`
|
|
4210
4220
|
<li
|
|
4211
4221
|
data-layer="${n.get(this.idProperty)}"
|
|
4212
|
-
data-type="${
|
|
4222
|
+
data-type="${qs(n, this.map)}"
|
|
4213
4223
|
>
|
|
4214
4224
|
${/** Checks if the layer is a group or individual layer and renders accordingly */
|
|
4215
4225
|
/** @type {import("ol/layer").Group} */
|
|
@@ -4249,8 +4259,8 @@ class Ur extends lt {
|
|
|
4249
4259
|
`;
|
|
4250
4260
|
}
|
|
4251
4261
|
}
|
|
4252
|
-
|
|
4253
|
-
j(
|
|
4262
|
+
vi = new WeakMap(), wi = new WeakMap(), // Define static properties for the component
|
|
4263
|
+
j(Fr, "properties", {
|
|
4254
4264
|
idProperty: { attribute: "id-property" },
|
|
4255
4265
|
layers: { attribute: !1 },
|
|
4256
4266
|
map: { attribute: !1, state: !0 },
|
|
@@ -4261,11 +4271,11 @@ j(Ur, "properties", {
|
|
|
4261
4271
|
noShadow: { type: Boolean },
|
|
4262
4272
|
toolsAsList: { type: Boolean }
|
|
4263
4273
|
});
|
|
4264
|
-
customElements.define("eox-layercontrol-layer-list",
|
|
4265
|
-
const
|
|
4274
|
+
customElements.define("eox-layercontrol-layer-list", Fr);
|
|
4275
|
+
const ga = (i) => {
|
|
4266
4276
|
const t = i.querySelector(
|
|
4267
4277
|
"select[name=optional]"
|
|
4268
|
-
), e = t ? t.value : null, n =
|
|
4278
|
+
), e = t ? t.value : null, n = gn(
|
|
4269
4279
|
i.layers.getArray(),
|
|
4270
4280
|
"layerControlOptional",
|
|
4271
4281
|
!0
|
|
@@ -4284,11 +4294,11 @@ const fa = (i) => {
|
|
|
4284
4294
|
)
|
|
4285
4295
|
), i.requestUpdate();
|
|
4286
4296
|
};
|
|
4287
|
-
var
|
|
4288
|
-
class
|
|
4297
|
+
var xi, zr;
|
|
4298
|
+
class jr extends lt {
|
|
4289
4299
|
constructor() {
|
|
4290
4300
|
super();
|
|
4291
|
-
|
|
4301
|
+
D(this, xi);
|
|
4292
4302
|
this.idProperty = "id", this.layers = null, this.titleProperty = "title", this.unstyled = !1, this.noShadow = !1;
|
|
4293
4303
|
}
|
|
4294
4304
|
/**
|
|
@@ -4303,7 +4313,7 @@ class Fr extends lt {
|
|
|
4303
4313
|
* Generates dropdown options based on the extracted layer information.
|
|
4304
4314
|
*/
|
|
4305
4315
|
render() {
|
|
4306
|
-
const e =
|
|
4316
|
+
const e = gn(
|
|
4307
4317
|
this.layers.getArray(),
|
|
4308
4318
|
"layerControlOptional",
|
|
4309
4319
|
!0
|
|
@@ -4327,18 +4337,18 @@ class Fr extends lt {
|
|
|
4327
4337
|
</select>
|
|
4328
4338
|
|
|
4329
4339
|
<!-- Button to handle adding layers -->
|
|
4330
|
-
<button @click="${B(this,
|
|
4340
|
+
<button @click="${B(this, xi, zr)}">add</button>
|
|
4331
4341
|
`;
|
|
4332
4342
|
}
|
|
4333
4343
|
}
|
|
4334
|
-
|
|
4344
|
+
xi = new WeakSet(), /**
|
|
4335
4345
|
* Handles the addition of selected layers to a list.
|
|
4336
4346
|
* Invokes the 'addToListMethod' with the current context.
|
|
4337
4347
|
*/
|
|
4338
|
-
|
|
4339
|
-
|
|
4348
|
+
zr = function() {
|
|
4349
|
+
ga(this);
|
|
4340
4350
|
}, // Define static properties for the component
|
|
4341
|
-
j(
|
|
4351
|
+
j(jr, "properties", {
|
|
4342
4352
|
idProperty: { attribute: "id-property" },
|
|
4343
4353
|
layers: { attribute: !1 },
|
|
4344
4354
|
titleProperty: { attribute: "title-property", type: String },
|
|
@@ -4347,27 +4357,27 @@ j(Fr, "properties", {
|
|
|
4347
4357
|
});
|
|
4348
4358
|
customElements.define(
|
|
4349
4359
|
"eox-layercontrol-optional-list",
|
|
4350
|
-
|
|
4360
|
+
jr
|
|
4351
4361
|
);
|
|
4352
|
-
const
|
|
4362
|
+
const ma = (i, t) => {
|
|
4353
4363
|
t.jsonInput = i.target.value, t.requestUpdate();
|
|
4354
|
-
},
|
|
4364
|
+
}, jn = (i) => {
|
|
4355
4365
|
const t = JSON.parse(
|
|
4356
|
-
`{"data":${
|
|
4366
|
+
`{"data":${hr(i.jsonInput)}}`
|
|
4357
4367
|
);
|
|
4358
4368
|
Array.isArray(t.data) ? t.data.forEach((e) => {
|
|
4359
4369
|
i.eoxMap.addOrUpdateLayer(e);
|
|
4360
4370
|
}) : i.eoxMap.addOrUpdateLayer(t.data), i.jsonInput = null, i.requestUpdate();
|
|
4361
|
-
},
|
|
4371
|
+
}, ya = (i, t) => {
|
|
4362
4372
|
t.urlInput = i.target.value, t.requestUpdate();
|
|
4363
4373
|
};
|
|
4364
|
-
async function
|
|
4374
|
+
async function ba(i) {
|
|
4365
4375
|
const t = i.urlInput;
|
|
4366
4376
|
if (i.wmsCapabilities = null, i.searchLoad = !0, i.requestUpdate(), !t) return !1;
|
|
4367
|
-
if (
|
|
4377
|
+
if (cn(t) === "XYZ")
|
|
4368
4378
|
return { Name: t };
|
|
4369
4379
|
try {
|
|
4370
|
-
const e = await
|
|
4380
|
+
const e = await hs(t);
|
|
4371
4381
|
i.wmsCapabilities = e;
|
|
4372
4382
|
} catch {
|
|
4373
4383
|
} finally {
|
|
@@ -4375,8 +4385,8 @@ async function ya(i) {
|
|
|
4375
4385
|
}
|
|
4376
4386
|
return !1;
|
|
4377
4387
|
}
|
|
4378
|
-
const
|
|
4379
|
-
const { Name: e } = i, n =
|
|
4388
|
+
const va = (i, t) => {
|
|
4389
|
+
const { Name: e } = i, n = cn(t.urlInput) || "XYZ", r = {
|
|
4380
4390
|
type: "Tile",
|
|
4381
4391
|
properties: {
|
|
4382
4392
|
id: e,
|
|
@@ -4394,14 +4404,14 @@ const ba = (i, t) => {
|
|
|
4394
4404
|
}
|
|
4395
4405
|
};
|
|
4396
4406
|
t.jsonInput = JSON.stringify(r);
|
|
4397
|
-
},
|
|
4407
|
+
}, wa = (i, t) => {
|
|
4398
4408
|
t.open = i || null, t.urlInput = null, t.jsonInput = null, t.wmsCapabilities = null, t.requestUpdate();
|
|
4399
4409
|
};
|
|
4400
|
-
var it,
|
|
4401
|
-
class
|
|
4410
|
+
var it, qr, Xr, tn, Yr, Wr, Ge, Ei, $i;
|
|
4411
|
+
class Zr extends lt {
|
|
4402
4412
|
constructor() {
|
|
4403
4413
|
super();
|
|
4404
|
-
|
|
4414
|
+
D(this, it);
|
|
4405
4415
|
/**
|
|
4406
4416
|
* State for URL Input for WMS/XYZ URLs
|
|
4407
4417
|
*
|
|
@@ -4432,7 +4442,7 @@ class zr extends lt {
|
|
|
4432
4442
|
* @type {import("wms-capabilities").WMSCapabilitiesJSON}
|
|
4433
4443
|
*/
|
|
4434
4444
|
j(this, "wmsCapabilities", null);
|
|
4435
|
-
|
|
4445
|
+
D(this, Ei, `
|
|
4436
4446
|
.eox-add-layer-main .open {
|
|
4437
4447
|
position: relative;
|
|
4438
4448
|
}
|
|
@@ -4440,7 +4450,7 @@ class zr extends lt {
|
|
|
4440
4450
|
display: none;
|
|
4441
4451
|
}
|
|
4442
4452
|
`);
|
|
4443
|
-
|
|
4453
|
+
D(this, $i, `
|
|
4444
4454
|
.eox-add {
|
|
4445
4455
|
background: #f0f2f5;
|
|
4446
4456
|
border-top: 1px solid #0041701a;
|
|
@@ -4589,24 +4599,24 @@ class zr extends lt {
|
|
|
4589
4599
|
* Handles input fields, search, and addition of layers.
|
|
4590
4600
|
*/
|
|
4591
4601
|
render() {
|
|
4592
|
-
const e = this.open ? "open" : "close", n = this.open === "url", r = this.open === "json", o = !
|
|
4602
|
+
const e = this.open ? "open" : "close", n = this.open === "url", r = this.open === "json", o = !ps(this.urlInput) || this.searchLoad ? !0 : P;
|
|
4593
4603
|
return x`
|
|
4594
4604
|
<style>
|
|
4595
|
-
${
|
|
4596
|
-
${!this.unstyled &&
|
|
4605
|
+
${S(this, Ei)}
|
|
4606
|
+
${!this.unstyled && S(this, $i)}
|
|
4597
4607
|
</style>
|
|
4598
4608
|
<div class="eox-add-layer-main">
|
|
4599
4609
|
<div class="eox-add-layer-col">
|
|
4600
4610
|
<!-- Tabbed interface for URL and JSON -->
|
|
4601
4611
|
<ul class="eox-add-layer-tab ${e}">
|
|
4602
4612
|
<li
|
|
4603
|
-
@click=${() => B(this, it,
|
|
4613
|
+
@click=${() => B(this, it, Ge).call(this, "url")}
|
|
4604
4614
|
class="${n ? "active" : ""}"
|
|
4605
4615
|
>
|
|
4606
4616
|
URL
|
|
4607
4617
|
</li>
|
|
4608
4618
|
<li
|
|
4609
|
-
@click=${() => B(this, it,
|
|
4619
|
+
@click=${() => B(this, it, Ge).call(this, "json")}
|
|
4610
4620
|
class="${r ? "active" : ""}"
|
|
4611
4621
|
>
|
|
4612
4622
|
JSON
|
|
@@ -4616,7 +4626,7 @@ class zr extends lt {
|
|
|
4616
4626
|
<!-- Button to toggle tabs -->
|
|
4617
4627
|
<button
|
|
4618
4628
|
class="add-icon icon"
|
|
4619
|
-
@click=${() => B(this, it,
|
|
4629
|
+
@click=${() => B(this, it, Ge).call(this, this.open ? null : "url")}
|
|
4620
4630
|
>
|
|
4621
4631
|
${this.unstyled ? "Add Layer" : ""}
|
|
4622
4632
|
</button>
|
|
@@ -4630,14 +4640,14 @@ class zr extends lt {
|
|
|
4630
4640
|
class="add-url"
|
|
4631
4641
|
placeholder="Add URL (WMS/XYZ)"
|
|
4632
4642
|
.value="${this.urlInput}"
|
|
4633
|
-
@input=${B(this, it,
|
|
4643
|
+
@input=${B(this, it, qr)}
|
|
4634
4644
|
>
|
|
4635
4645
|
</input>
|
|
4636
4646
|
<!-- Search button for URL -->
|
|
4637
4647
|
<button
|
|
4638
4648
|
class="search-icon"
|
|
4639
4649
|
disabled=${o}
|
|
4640
|
-
@click=${B(this, it,
|
|
4650
|
+
@click=${B(this, it, Xr)}
|
|
4641
4651
|
>
|
|
4642
4652
|
${this.unstyled ? "Search" : ""}
|
|
4643
4653
|
</button>
|
|
@@ -4656,7 +4666,7 @@ class zr extends lt {
|
|
|
4656
4666
|
class="add-layer-icon icon"
|
|
4657
4667
|
@click=${() => (
|
|
4658
4668
|
// @ts-expect-error TODO
|
|
4659
|
-
B(this, it,
|
|
4669
|
+
B(this, it, tn).call(this, s)
|
|
4660
4670
|
)}
|
|
4661
4671
|
>
|
|
4662
4672
|
${this.unstyled ? "+" : ""}
|
|
@@ -4665,21 +4675,21 @@ class zr extends lt {
|
|
|
4665
4675
|
`;
|
|
4666
4676
|
}
|
|
4667
4677
|
)}
|
|
4668
|
-
</ul>` :
|
|
4678
|
+
</ul>` : P}
|
|
4669
4679
|
` : x`
|
|
4670
4680
|
<!-- Textarea for JSON input -->
|
|
4671
4681
|
<textarea
|
|
4672
4682
|
class="add-layer-input"
|
|
4673
4683
|
placeholder="Please put a valid eox-map layer JSON."
|
|
4674
|
-
@input=${B(this, it,
|
|
4684
|
+
@input=${B(this, it, Wr)}
|
|
4675
4685
|
.value=${this.jsonInput}
|
|
4676
4686
|
></textarea>
|
|
4677
4687
|
|
|
4678
4688
|
<!-- Button to add JSON layer -->
|
|
4679
4689
|
<button
|
|
4680
4690
|
class="add-layer-icon json-add-layer"
|
|
4681
|
-
disabled=${
|
|
4682
|
-
@click=${B(this, it,
|
|
4691
|
+
disabled=${fs(this.jsonInput) ? P : !0}
|
|
4692
|
+
@click=${B(this, it, Yr)}
|
|
4683
4693
|
>
|
|
4684
4694
|
${this.unstyled ? "Add JSON" : ""}
|
|
4685
4695
|
</button>
|
|
@@ -4695,72 +4705,72 @@ it = new WeakSet(), /**
|
|
|
4695
4705
|
*
|
|
4696
4706
|
* @param {Event} evt - The input change event triggering the method.
|
|
4697
4707
|
*/
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
},
|
|
4701
|
-
const e = await
|
|
4702
|
-
e && B(this, it,
|
|
4708
|
+
qr = function(e) {
|
|
4709
|
+
ya(e, this);
|
|
4710
|
+
}, Xr = async function() {
|
|
4711
|
+
const e = await ba(this);
|
|
4712
|
+
e && B(this, it, tn).call(this, e);
|
|
4703
4713
|
}, /**
|
|
4704
4714
|
* Handles input field changes by triggering layer processing and adding layers.
|
|
4705
4715
|
*
|
|
4706
4716
|
* @param {{"Name": string}} layer - The layer information triggering the method.
|
|
4707
4717
|
*/
|
|
4708
|
-
|
|
4709
|
-
|
|
4718
|
+
tn = function(e) {
|
|
4719
|
+
va(e, this), jn(this);
|
|
4710
4720
|
}, /**
|
|
4711
4721
|
* Initiates the addition of layers, triggering the handleAddLayerMethod.
|
|
4712
4722
|
*/
|
|
4713
|
-
|
|
4714
|
-
|
|
4723
|
+
Yr = function() {
|
|
4724
|
+
jn(this);
|
|
4715
4725
|
}, /**
|
|
4716
4726
|
* Handles input field changes by invoking the 'handleJsonInputChangeMethod'.
|
|
4717
4727
|
*
|
|
4718
4728
|
* @param {{target: { value: string }}} evt - The input change event triggering the method.
|
|
4719
4729
|
*/
|
|
4720
|
-
|
|
4721
|
-
|
|
4730
|
+
Wr = function(e) {
|
|
4731
|
+
ma(e, this);
|
|
4722
4732
|
}, /**
|
|
4723
4733
|
* Handles tab changes by invoking the 'openCloseTabMethod'.
|
|
4724
4734
|
*
|
|
4725
4735
|
* @param {"url" | "json" | null} tab - The tab identifier triggering the method.
|
|
4726
4736
|
*/
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
},
|
|
4730
|
-
j(
|
|
4737
|
+
Ge = function(e) {
|
|
4738
|
+
wa(e, this);
|
|
4739
|
+
}, Ei = new WeakMap(), $i = new WeakMap(), // Define static properties for the component
|
|
4740
|
+
j(Zr, "properties", {
|
|
4731
4741
|
eoxMap: { attribute: !1, state: !0 },
|
|
4732
4742
|
unstyled: { type: Boolean },
|
|
4733
4743
|
noShadow: { type: Boolean }
|
|
4734
4744
|
});
|
|
4735
|
-
customElements.define("eox-layercontrol-add-layers",
|
|
4736
|
-
const
|
|
4745
|
+
customElements.define("eox-layercontrol-add-layers", Zr);
|
|
4746
|
+
const xa = (i, t) => {
|
|
4737
4747
|
if (t.requestUpdate(), i.target.tagName === "EOX-LAYERCONTROL-LAYER-TOOLS") {
|
|
4738
4748
|
const e = t.renderRoot.querySelector(
|
|
4739
4749
|
"eox-layercontrol-optional-list"
|
|
4740
4750
|
);
|
|
4741
4751
|
e == null || e.requestUpdate();
|
|
4742
4752
|
}
|
|
4743
|
-
},
|
|
4753
|
+
}, Ea = (i) => {
|
|
4744
4754
|
let t;
|
|
4745
4755
|
return typeof i == "string" ? t = /** @type {HTMLElement} */
|
|
4746
4756
|
document.querySelector(i) : t = i, t;
|
|
4747
|
-
},
|
|
4748
|
-
const t =
|
|
4757
|
+
}, zn = (i) => {
|
|
4758
|
+
const t = Ea(i.for);
|
|
4749
4759
|
return t && t.map !== i.map && (i.map = t.map), t;
|
|
4750
4760
|
};
|
|
4751
|
-
var kt,
|
|
4752
|
-
class
|
|
4761
|
+
var kt, jt, Jr, Kr, Qr, Si;
|
|
4762
|
+
class Gr extends lt {
|
|
4753
4763
|
// Constructor to set default values for properties
|
|
4754
4764
|
constructor() {
|
|
4755
4765
|
super();
|
|
4756
|
-
|
|
4766
|
+
D(this, jt);
|
|
4757
4767
|
/**
|
|
4758
4768
|
* Instance of `eox-map` which is a wrapper for the OL
|
|
4759
4769
|
*
|
|
4760
4770
|
* @type {import("../../map/src/main").EOxMap}
|
|
4761
4771
|
*/
|
|
4762
|
-
|
|
4763
|
-
|
|
4772
|
+
D(this, kt);
|
|
4773
|
+
D(this, Si, `
|
|
4764
4774
|
:host, :root {
|
|
4765
4775
|
font-family: Roboto, sans-serif;
|
|
4766
4776
|
--padding: 0.5rem;
|
|
@@ -4789,34 +4799,34 @@ class Wr extends lt {
|
|
|
4789
4799
|
* Updated #eoxMap after first update.
|
|
4790
4800
|
*/
|
|
4791
4801
|
firstUpdated() {
|
|
4792
|
-
this.eoxMap =
|
|
4802
|
+
this.eoxMap = zn(this);
|
|
4793
4803
|
}
|
|
4794
4804
|
updated(e) {
|
|
4795
|
-
e.has("for") && (this.eoxMap =
|
|
4805
|
+
e.has("for") && (this.eoxMap = zn(this));
|
|
4796
4806
|
}
|
|
4797
4807
|
get eoxMap() {
|
|
4798
|
-
return
|
|
4808
|
+
return S(this, kt);
|
|
4799
4809
|
}
|
|
4800
4810
|
set eoxMap(e) {
|
|
4801
|
-
const n =
|
|
4802
|
-
|
|
4811
|
+
const n = S(this, kt);
|
|
4812
|
+
_t(this, kt, e), this.requestUpdate("eoxMap", n);
|
|
4803
4813
|
}
|
|
4804
4814
|
render() {
|
|
4805
4815
|
var r, o, s;
|
|
4806
|
-
const e = (r = this.map) == null ? void 0 : r.getLayers().getArray(), n = e && ((o =
|
|
4816
|
+
const e = (r = this.map) == null ? void 0 : r.getLayers().getArray(), n = e && ((o = gn(e, "layerControlOptional", !0)) == null ? void 0 : o.length) > 0;
|
|
4807
4817
|
return x`
|
|
4808
4818
|
<style>
|
|
4809
|
-
${!this.unstyled &&
|
|
4819
|
+
${!this.unstyled && S(this, Si)}
|
|
4810
4820
|
${this.styleOverride}
|
|
4811
4821
|
</style>
|
|
4812
4822
|
|
|
4813
4823
|
<!-- Conditional rendering of add layers component -->
|
|
4814
4824
|
${G(
|
|
4815
|
-
this.addExternalLayers && ((s =
|
|
4825
|
+
this.addExternalLayers && ((s = S(this, kt)) == null ? void 0 : s.addOrUpdateLayer),
|
|
4816
4826
|
() => x`
|
|
4817
4827
|
<eox-layercontrol-add-layers
|
|
4818
4828
|
.noShadow=${!0}
|
|
4819
|
-
.eoxMap=${
|
|
4829
|
+
.eoxMap=${S(this, kt)}
|
|
4820
4830
|
.unstyled=${this.unstyled}
|
|
4821
4831
|
></eox-layercontrol-add-layers>
|
|
4822
4832
|
`
|
|
@@ -4837,9 +4847,9 @@ class Wr extends lt {
|
|
|
4837
4847
|
.tools=${this.tools}
|
|
4838
4848
|
.unstyled=${this.unstyled}
|
|
4839
4849
|
.toolsAsList=${this.toolsAsList}
|
|
4840
|
-
@changed=${B(this,
|
|
4841
|
-
@datetime:updated=${B(this,
|
|
4842
|
-
@layerConfig:change=${B(this,
|
|
4850
|
+
@changed=${B(this, jt, Jr)}
|
|
4851
|
+
@datetime:updated=${B(this, jt, Kr)}
|
|
4852
|
+
@layerConfig:change=${B(this, jt, Qr)}
|
|
4843
4853
|
></eox-layercontrol-layer-list>
|
|
4844
4854
|
`
|
|
4845
4855
|
)}
|
|
@@ -4860,18 +4870,18 @@ class Wr extends lt {
|
|
|
4860
4870
|
`;
|
|
4861
4871
|
}
|
|
4862
4872
|
}
|
|
4863
|
-
kt = new WeakMap(),
|
|
4873
|
+
kt = new WeakMap(), jt = new WeakSet(), /**
|
|
4864
4874
|
* Event handler for changes in the layer list
|
|
4865
4875
|
*
|
|
4866
4876
|
* @param {CustomEvent & {target: Element}} evt
|
|
4867
4877
|
*/
|
|
4868
|
-
|
|
4869
|
-
|
|
4878
|
+
Jr = function(e) {
|
|
4879
|
+
xa(e, this), this.dispatchEvent(new CustomEvent("layerchange", { detail: e.detail }));
|
|
4870
4880
|
}, /**
|
|
4871
4881
|
* Dispatches datetime updates from layer datetime to the layercontrol
|
|
4872
4882
|
* @param {CustomEvent} evt
|
|
4873
4883
|
*/
|
|
4874
|
-
|
|
4884
|
+
Kr = function(e) {
|
|
4875
4885
|
this.dispatchEvent(
|
|
4876
4886
|
new CustomEvent("datetime:updated", { detail: e.detail })
|
|
4877
4887
|
);
|
|
@@ -4879,12 +4889,12 @@ Jr = function(e) {
|
|
|
4879
4889
|
* Dispatches jsonform updates from layer config to the layercontrol
|
|
4880
4890
|
* @param {CustomEvent} evt
|
|
4881
4891
|
*/
|
|
4882
|
-
|
|
4892
|
+
Qr = function(e) {
|
|
4883
4893
|
this.dispatchEvent(
|
|
4884
4894
|
new CustomEvent("layerConfig:change", { detail: e.detail })
|
|
4885
4895
|
);
|
|
4886
|
-
},
|
|
4887
|
-
j(
|
|
4896
|
+
}, Si = new WeakMap(), // Define static properties for the component
|
|
4897
|
+
j(Gr, "properties", {
|
|
4888
4898
|
for: { type: String },
|
|
4889
4899
|
idProperty: { attribute: "id-property" },
|
|
4890
4900
|
map: { attribute: !1, state: !0 },
|
|
@@ -4896,7 +4906,7 @@ j(Wr, "properties", {
|
|
|
4896
4906
|
styleOverride: { type: String },
|
|
4897
4907
|
toolsAsList: { type: Boolean }
|
|
4898
4908
|
});
|
|
4899
|
-
customElements.define("eox-layercontrol",
|
|
4909
|
+
customElements.define("eox-layercontrol", Gr);
|
|
4900
4910
|
export {
|
|
4901
|
-
|
|
4911
|
+
Gr as EOxLayerControl
|
|
4902
4912
|
};
|