@eox/drawtools 0.13.4 → 0.14.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-drawtools.js +713 -678
- package/dist/eox-drawtools.umd.cjs +35 -31
- package/package.json +4 -4
- package/src/components/list.js +18 -2
- package/src/enums/draw.js +4 -1
- package/src/main.js +28 -2
- package/src/methods/draw/on-draw-end.js +14 -0
- package/src/methods/list/select-deselect-feature.js +8 -3
- package/types/drawtools/src/components/list.d.ts +17 -0
- package/types/drawtools/src/components/list.d.ts.map +1 -1
- package/types/drawtools/src/enums/draw.d.ts +1 -0
- package/types/drawtools/src/main.d.ts +19 -2
- package/types/drawtools/src/main.d.ts.map +1 -1
- package/types/drawtools/src/methods/draw/on-draw-end.d.ts.map +1 -1
- package/types/drawtools/src/methods/list/select-deselect-feature.d.ts.map +1 -1
- package/types/map/src/helpers/generate.d.ts.map +1 -1
package/dist/eox-drawtools.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _n = Object.defineProperty;
|
|
2
2
|
var Ue = (n) => {
|
|
3
3
|
throw TypeError(n);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
5
|
+
var vn = (n, t, e) => t in n ? _n(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
6
|
+
var R = (n, t, e) => vn(n, typeof t != "symbol" ? t + "" : t, e), Xe = (n, t, e) => t.has(n) || Ue("Cannot " + e);
|
|
7
|
+
var M = (n, t, e) => (Xe(n, t, "read from private field"), e ? e.call(n) : t.get(n)), F = (n, t, e) => t.has(n) ? Ue("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, e), $ = (n, t, e, i) => (Xe(n, t, "write to private field"), i ? i.call(n, e) : t.set(n, e), 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 Lt = globalThis, fe = Lt.ShadowRoot && (Lt.ShadyCSS === void 0 || Lt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, bi = Symbol(), Ye = /* @__PURE__ */ new WeakMap();
|
|
14
|
+
let Cn = class {
|
|
15
15
|
constructor(t, e, i) {
|
|
16
|
-
if (this._$cssResult$ = !0, i !==
|
|
16
|
+
if (this._$cssResult$ = !0, i !== bi) 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 (fe && t === void 0) {
|
|
23
23
|
const i = e !== void 0 && e.length === 1;
|
|
24
|
-
i && (t =
|
|
24
|
+
i && (t = Ye.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Ye.set(e, t));
|
|
25
25
|
}
|
|
26
26
|
return t;
|
|
27
27
|
}
|
|
@@ -29,26 +29,26 @@ let vn = class {
|
|
|
29
29
|
return this.cssText;
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
const
|
|
33
|
-
if (
|
|
32
|
+
const wn = (n) => new Cn(typeof n == "string" ? n : n + "", void 0, bi), bn = (n, t) => {
|
|
33
|
+
if (fe) n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
34
34
|
else for (const e of t) {
|
|
35
|
-
const i = document.createElement("style"), r =
|
|
35
|
+
const i = document.createElement("style"), r = Lt.litNonce;
|
|
36
36
|
r !== void 0 && i.setAttribute("nonce", r), i.textContent = e.cssText, n.appendChild(i);
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, Be = fe ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => {
|
|
39
39
|
let e = "";
|
|
40
40
|
for (const i of t.cssRules) e += i.cssText;
|
|
41
|
-
return
|
|
41
|
+
return wn(e);
|
|
42
42
|
})(n) : n;
|
|
43
43
|
/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is:
|
|
48
|
+
const { is: En, defineProperty: xn, getOwnPropertyDescriptor: Pn, getOwnPropertyNames: Mn, getOwnPropertySymbols: Sn, getPrototypeOf: $n } = Object, I = globalThis, Ve = I.trustedTypes, An = Ve ? Ve.emptyScript : "", Kt = I.reactiveElementPolyfillSupport, dt = (n, t) => n, se = { toAttribute(n, t) {
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
n = n ?
|
|
51
|
+
n = n ? An : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
@@ -73,8 +73,8 @@ const { is: bn, defineProperty: En, getOwnPropertyDescriptor: xn, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return e;
|
|
76
|
-
} },
|
|
77
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
76
|
+
} }, Ei = (n, t) => !En(n, t), ze = { attribute: !0, type: String, converter: se, reflect: !1, hasChanged: Ei };
|
|
77
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), I.litPropertyMetadata ?? (I.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
78
|
class tt extends HTMLElement {
|
|
79
79
|
static addInitializer(t) {
|
|
80
80
|
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
@@ -82,14 +82,14 @@ class tt extends HTMLElement {
|
|
|
82
82
|
static get observedAttributes() {
|
|
83
83
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
84
84
|
}
|
|
85
|
-
static createProperty(t, e =
|
|
85
|
+
static createProperty(t, e = ze) {
|
|
86
86
|
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
87
87
|
const i = Symbol(), r = this.getPropertyDescriptor(t, i, e);
|
|
88
|
-
r !== void 0 &&
|
|
88
|
+
r !== void 0 && xn(this.prototype, t, r);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
static getPropertyDescriptor(t, e, i) {
|
|
92
|
-
const { get: r, set: s } =
|
|
92
|
+
const { get: r, set: s } = Pn(this.prototype, t) ?? { get() {
|
|
93
93
|
return this[e];
|
|
94
94
|
}, set(o) {
|
|
95
95
|
this[e] = o;
|
|
@@ -102,7 +102,7 @@ class tt extends HTMLElement {
|
|
|
102
102
|
}, configurable: !0, enumerable: !0 };
|
|
103
103
|
}
|
|
104
104
|
static getPropertyOptions(t) {
|
|
105
|
-
return this.elementProperties.get(t) ??
|
|
105
|
+
return this.elementProperties.get(t) ?? ze;
|
|
106
106
|
}
|
|
107
107
|
static _$Ei() {
|
|
108
108
|
if (this.hasOwnProperty(dt("elementProperties"))) return;
|
|
@@ -112,7 +112,7 @@ class tt extends HTMLElement {
|
|
|
112
112
|
static finalize() {
|
|
113
113
|
if (this.hasOwnProperty(dt("finalized"))) return;
|
|
114
114
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(dt("properties"))) {
|
|
115
|
-
const e = this.properties, i = [...
|
|
115
|
+
const e = this.properties, i = [...Mn(e), ...Sn(e)];
|
|
116
116
|
for (const r of i) this.createProperty(r, e[r]);
|
|
117
117
|
}
|
|
118
118
|
const t = this[Symbol.metadata];
|
|
@@ -131,8 +131,8 @@ class tt extends HTMLElement {
|
|
|
131
131
|
const e = [];
|
|
132
132
|
if (Array.isArray(t)) {
|
|
133
133
|
const i = new Set(t.flat(1 / 0).reverse());
|
|
134
|
-
for (const r of i) e.unshift(
|
|
135
|
-
} else t !== void 0 && e.push(
|
|
134
|
+
for (const r of i) e.unshift(Be(r));
|
|
135
|
+
} else t !== void 0 && e.push(Be(t));
|
|
136
136
|
return e;
|
|
137
137
|
}
|
|
138
138
|
static _$Eu(t, e) {
|
|
@@ -161,7 +161,7 @@ class tt extends HTMLElement {
|
|
|
161
161
|
}
|
|
162
162
|
createRenderRoot() {
|
|
163
163
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
164
|
-
return
|
|
164
|
+
return bn(t, this.constructor.elementStyles), t;
|
|
165
165
|
}
|
|
166
166
|
connectedCallback() {
|
|
167
167
|
var t;
|
|
@@ -186,7 +186,7 @@ class tt extends HTMLElement {
|
|
|
186
186
|
var s;
|
|
187
187
|
const i = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, i);
|
|
188
188
|
if (r !== void 0 && i.reflect === !0) {
|
|
189
|
-
const o = (((s = i.converter) == null ? void 0 : s.toAttribute) !== void 0 ? i.converter :
|
|
189
|
+
const o = (((s = i.converter) == null ? void 0 : s.toAttribute) !== void 0 ? i.converter : se).toAttribute(e, i.type);
|
|
190
190
|
this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
@@ -194,13 +194,13 @@ class tt extends HTMLElement {
|
|
|
194
194
|
var s;
|
|
195
195
|
const i = this.constructor, r = i._$Eh.get(t);
|
|
196
196
|
if (r !== void 0 && this._$Em !== r) {
|
|
197
|
-
const o = i.getPropertyOptions(r), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((s = o.converter) == null ? void 0 : s.fromAttribute) !== void 0 ? o.converter :
|
|
197
|
+
const o = i.getPropertyOptions(r), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((s = o.converter) == null ? void 0 : s.fromAttribute) !== void 0 ? o.converter : se;
|
|
198
198
|
this._$Em = r, this[r] = a.fromAttribute(e, o.type), this._$Em = null;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
requestUpdate(t, e, i) {
|
|
202
202
|
if (t !== void 0) {
|
|
203
|
-
if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ??
|
|
203
|
+
if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ?? Ei)(this[t], e)) return;
|
|
204
204
|
this.P(t, e, i);
|
|
205
205
|
}
|
|
206
206
|
this.isUpdatePending === !1 && (this._$ES = this._$ET());
|
|
@@ -273,59 +273,59 @@ class tt extends HTMLElement {
|
|
|
273
273
|
firstUpdated(t) {
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
tt.elementStyles = [], tt.shadowRootOptions = { mode: "open" }, tt[dt("elementProperties")] = /* @__PURE__ */ new Map(), tt[dt("finalized")] = /* @__PURE__ */ new Map(),
|
|
276
|
+
tt.elementStyles = [], tt.shadowRootOptions = { mode: "open" }, tt[dt("elementProperties")] = /* @__PURE__ */ new Map(), tt[dt("finalized")] = /* @__PURE__ */ new Map(), Kt == null || Kt({ ReactiveElement: tt }), (I.reactiveElementVersions ?? (I.reactiveElementVersions = [])).push("2.0.4");
|
|
277
277
|
/**
|
|
278
278
|
* @license
|
|
279
279
|
* Copyright 2017 Google LLC
|
|
280
280
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
281
281
|
*/
|
|
282
|
-
const gt = globalThis,
|
|
283
|
-
\f\r]`, ut = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
284
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
285
|
-
function
|
|
286
|
-
if (!
|
|
287
|
-
return
|
|
288
|
-
}
|
|
289
|
-
const
|
|
282
|
+
const gt = globalThis, Tt = gt.trustedTypes, Je = Tt ? Tt.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, xi = "$lit$", G = `lit$${Math.random().toFixed(9).slice(2)}$`, Pi = "?" + G, Fn = `<${Pi}>`, Y = document, ft = () => Y.createComment(""), pt = (n) => n === null || typeof n != "object" && typeof n != "function", pe = Array.isArray, Gn = (n) => pe(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", Qt = `[
|
|
283
|
+
\f\r]`, ut = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, We = /-->/g, qe = />/g, T = RegExp(`>|${Qt}(?:([^\\s"'>=/]+)(${Qt}*=${Qt}*(?:[^
|
|
284
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Ze = /'/g, De = /"/g, Mi = /^(?:script|style|textarea|title)$/i, In = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), H = In(1), ot = Symbol.for("lit-noChange"), C = Symbol.for("lit-nothing"), Ke = /* @__PURE__ */ new WeakMap(), O = Y.createTreeWalker(Y, 129);
|
|
285
|
+
function Si(n, t) {
|
|
286
|
+
if (!pe(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
287
|
+
return Je !== void 0 ? Je.createHTML(t) : t;
|
|
288
|
+
}
|
|
289
|
+
const Ln = (n, t) => {
|
|
290
290
|
const e = n.length - 1, i = [];
|
|
291
291
|
let r, s = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = ut;
|
|
292
292
|
for (let a = 0; a < e; a++) {
|
|
293
293
|
const l = n[a];
|
|
294
294
|
let h, c, u = -1, d = 0;
|
|
295
|
-
for (; d < l.length && (o.lastIndex = d, c = o.exec(l), c !== null); ) d = o.lastIndex, o === ut ? c[1] === "!--" ? o =
|
|
296
|
-
const g = o ===
|
|
297
|
-
s += o === ut ? l +
|
|
295
|
+
for (; d < l.length && (o.lastIndex = d, c = o.exec(l), c !== null); ) d = o.lastIndex, o === ut ? c[1] === "!--" ? o = We : c[1] !== void 0 ? o = qe : c[2] !== void 0 ? (Mi.test(c[2]) && (r = RegExp("</" + c[2], "g")), o = T) : c[3] !== void 0 && (o = T) : o === T ? c[0] === ">" ? (o = r ?? ut, u = -1) : c[1] === void 0 ? u = -2 : (u = o.lastIndex - c[2].length, h = c[1], o = c[3] === void 0 ? T : c[3] === '"' ? De : Ze) : o === De || o === Ze ? o = T : o === We || o === qe ? o = ut : (o = T, r = void 0);
|
|
296
|
+
const g = o === T && n[a + 1].startsWith("/>") ? " " : "";
|
|
297
|
+
s += o === ut ? l + Fn : u >= 0 ? (i.push(h), l.slice(0, u) + xi + l.slice(u) + G + g) : l + G + (u === -2 ? a : g);
|
|
298
298
|
}
|
|
299
|
-
return [
|
|
299
|
+
return [Si(n, s + (n[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
|
300
300
|
};
|
|
301
301
|
class yt {
|
|
302
302
|
constructor({ strings: t, _$litType$: e }, i) {
|
|
303
303
|
let r;
|
|
304
304
|
this.parts = [];
|
|
305
305
|
let s = 0, o = 0;
|
|
306
|
-
const a = t.length - 1, l = this.parts, [h, c] =
|
|
306
|
+
const a = t.length - 1, l = this.parts, [h, c] = Ln(t, e);
|
|
307
307
|
if (this.el = yt.createElement(h, i), O.currentNode = this.el.content, e === 2 || e === 3) {
|
|
308
308
|
const u = this.el.content.firstChild;
|
|
309
309
|
u.replaceWith(...u.childNodes);
|
|
310
310
|
}
|
|
311
311
|
for (; (r = O.nextNode()) !== null && l.length < a; ) {
|
|
312
312
|
if (r.nodeType === 1) {
|
|
313
|
-
if (r.hasAttributes()) for (const u of r.getAttributeNames()) if (u.endsWith(
|
|
314
|
-
const d = c[o++], g = r.getAttribute(u).split(
|
|
315
|
-
l.push({ type: 1, index: s, name: f[2], strings: g, ctor: f[1] === "." ?
|
|
316
|
-
} else u.startsWith(
|
|
317
|
-
if (
|
|
318
|
-
const u = r.textContent.split(
|
|
313
|
+
if (r.hasAttributes()) for (const u of r.getAttributeNames()) if (u.endsWith(xi)) {
|
|
314
|
+
const d = c[o++], g = r.getAttribute(u).split(G), f = /([.?@])?(.*)/.exec(d);
|
|
315
|
+
l.push({ type: 1, index: s, name: f[2], strings: g, ctor: f[1] === "." ? Tn : f[1] === "?" ? Nn : f[1] === "@" ? On : Xt }), r.removeAttribute(u);
|
|
316
|
+
} else u.startsWith(G) && (l.push({ type: 6, index: s }), r.removeAttribute(u));
|
|
317
|
+
if (Mi.test(r.tagName)) {
|
|
318
|
+
const u = r.textContent.split(G), d = u.length - 1;
|
|
319
319
|
if (d > 0) {
|
|
320
|
-
r.textContent =
|
|
320
|
+
r.textContent = Tt ? Tt.emptyScript : "";
|
|
321
321
|
for (let g = 0; g < d; g++) r.append(u[g], ft()), O.nextNode(), l.push({ type: 2, index: ++s });
|
|
322
322
|
r.append(u[d], ft());
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
} else if (r.nodeType === 8) if (r.data ===
|
|
325
|
+
} else if (r.nodeType === 8) if (r.data === Pi) l.push({ type: 2, index: s });
|
|
326
326
|
else {
|
|
327
327
|
let u = -1;
|
|
328
|
-
for (; (u = r.data.indexOf(
|
|
328
|
+
for (; (u = r.data.indexOf(G, u + 1)) !== -1; ) l.push({ type: 7, index: s }), u += G.length - 1;
|
|
329
329
|
}
|
|
330
330
|
s++;
|
|
331
331
|
}
|
|
@@ -342,7 +342,7 @@ function at(n, t, e = n, i) {
|
|
|
342
342
|
const s = pt(t) ? void 0 : t._$litDirective$;
|
|
343
343
|
return (r == null ? void 0 : r.constructor) !== s && ((a = r == null ? void 0 : r._$AO) == null || a.call(r, !1), s === void 0 ? r = void 0 : (r = new s(n), r._$AT(n, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = r : e._$Cl = r), r !== void 0 && (t = at(n, r._$AS(n, t.values), r, i)), t;
|
|
344
344
|
}
|
|
345
|
-
let
|
|
345
|
+
let Rn = class {
|
|
346
346
|
constructor(t, e) {
|
|
347
347
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
348
348
|
}
|
|
@@ -359,7 +359,7 @@ let In = class {
|
|
|
359
359
|
for (; l !== void 0; ) {
|
|
360
360
|
if (o === l.index) {
|
|
361
361
|
let h;
|
|
362
|
-
l.type === 2 ? h = new
|
|
362
|
+
l.type === 2 ? h = new ye(s, s.nextSibling, this, t) : l.type === 1 ? h = new l.ctor(s, l.name, l.strings, this, t) : l.type === 6 && (h = new kn(s, this, t)), this._$AV.push(h), l = i[++a];
|
|
363
363
|
}
|
|
364
364
|
o !== (l == null ? void 0 : l.index) && (s = O.nextNode(), o++);
|
|
365
365
|
}
|
|
@@ -369,7 +369,7 @@ let In = class {
|
|
|
369
369
|
let e = 0;
|
|
370
370
|
for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
|
|
371
371
|
}
|
|
372
|
-
},
|
|
372
|
+
}, ye = class $i {
|
|
373
373
|
get _$AU() {
|
|
374
374
|
var t;
|
|
375
375
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
@@ -389,7 +389,7 @@ let In = class {
|
|
|
389
389
|
return this._$AB;
|
|
390
390
|
}
|
|
391
391
|
_$AI(t, e = this) {
|
|
392
|
-
t = at(this, t, e), pt(t) ? t === C || t == null || t === "" ? (this._$AH !== C && this._$AR(), this._$AH = C) : t !== this._$AH && t !== ot && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) :
|
|
392
|
+
t = at(this, t, e), pt(t) ? t === C || t == null || t === "" ? (this._$AH !== C && this._$AR(), this._$AH = C) : t !== this._$AH && t !== ot && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Gn(t) ? this.k(t) : this._(t);
|
|
393
393
|
}
|
|
394
394
|
O(t) {
|
|
395
395
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -402,19 +402,19 @@ let In = class {
|
|
|
402
402
|
}
|
|
403
403
|
$(t) {
|
|
404
404
|
var s;
|
|
405
|
-
const { values: e, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = yt.createElement(
|
|
405
|
+
const { values: e, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = yt.createElement(Si(i.h, i.h[0]), this.options)), i);
|
|
406
406
|
if (((s = this._$AH) == null ? void 0 : s._$AD) === r) this._$AH.p(e);
|
|
407
407
|
else {
|
|
408
|
-
const o = new
|
|
408
|
+
const o = new Rn(r, this), a = o.u(this.options);
|
|
409
409
|
o.p(e), this.T(a), this._$AH = o;
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
412
|
_$AC(t) {
|
|
413
|
-
let e =
|
|
414
|
-
return e === void 0 &&
|
|
413
|
+
let e = Ke.get(t.strings);
|
|
414
|
+
return e === void 0 && Ke.set(t.strings, e = new yt(t)), e;
|
|
415
415
|
}
|
|
416
416
|
k(t) {
|
|
417
|
-
|
|
417
|
+
pe(this._$AH) || (this._$AH = [], this._$AR());
|
|
418
418
|
const e = this._$AH;
|
|
419
419
|
let i, r = 0;
|
|
420
420
|
for (const s of t) r === e.length ? e.push(i = new $i(this.O(ft()), this.O(ft()), this, this.options)) : i = e[r], i._$AI(s), r++;
|
|
@@ -432,7 +432,7 @@ let In = class {
|
|
|
432
432
|
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
|
433
433
|
}
|
|
434
434
|
};
|
|
435
|
-
class
|
|
435
|
+
class Xt {
|
|
436
436
|
get tagName() {
|
|
437
437
|
return this.element.tagName;
|
|
438
438
|
}
|
|
@@ -457,7 +457,7 @@ class jt {
|
|
|
457
457
|
t === C ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
|
-
class
|
|
460
|
+
class Tn extends Xt {
|
|
461
461
|
constructor() {
|
|
462
462
|
super(...arguments), this.type = 3;
|
|
463
463
|
}
|
|
@@ -465,7 +465,7 @@ class Ln extends jt {
|
|
|
465
465
|
this.element[this.name] = t === C ? void 0 : t;
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
|
-
class
|
|
468
|
+
class Nn extends Xt {
|
|
469
469
|
constructor() {
|
|
470
470
|
super(...arguments), this.type = 4;
|
|
471
471
|
}
|
|
@@ -473,7 +473,7 @@ class Rn extends jt {
|
|
|
473
473
|
this.element.toggleAttribute(this.name, !!t && t !== C);
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
|
-
class
|
|
476
|
+
class On extends Xt {
|
|
477
477
|
constructor(t, e, i, r, s) {
|
|
478
478
|
super(t, e, i, r, s), this.type = 5;
|
|
479
479
|
}
|
|
@@ -487,7 +487,7 @@ class Nn extends jt {
|
|
|
487
487
|
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
|
-
class
|
|
490
|
+
class kn {
|
|
491
491
|
constructor(t, e, i) {
|
|
492
492
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
|
493
493
|
}
|
|
@@ -498,14 +498,14 @@ class On {
|
|
|
498
498
|
at(this, t);
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
|
-
const
|
|
502
|
-
|
|
503
|
-
const
|
|
501
|
+
const te = gt.litHtmlPolyfillSupport;
|
|
502
|
+
te == null || te(yt, ye), (gt.litHtmlVersions ?? (gt.litHtmlVersions = [])).push("3.2.1");
|
|
503
|
+
const jn = (n, t, e) => {
|
|
504
504
|
const i = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
505
505
|
let r = i._$litPart$;
|
|
506
506
|
if (r === void 0) {
|
|
507
507
|
const s = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
508
|
-
i._$litPart$ = r = new
|
|
508
|
+
i._$litPart$ = r = new ye(t.insertBefore(ft(), s), s, void 0, e ?? {});
|
|
509
509
|
}
|
|
510
510
|
return r._$AI(n), r;
|
|
511
511
|
};
|
|
@@ -514,7 +514,7 @@ const kn = (n, t, e) => {
|
|
|
514
514
|
* Copyright 2017 Google LLC
|
|
515
515
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
516
516
|
*/
|
|
517
|
-
class
|
|
517
|
+
class U extends tt {
|
|
518
518
|
constructor() {
|
|
519
519
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
520
520
|
}
|
|
@@ -525,7 +525,7 @@ class j extends tt {
|
|
|
525
525
|
}
|
|
526
526
|
update(t) {
|
|
527
527
|
const e = this.render();
|
|
528
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
528
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = jn(e, this.renderRoot, this.renderOptions);
|
|
529
529
|
}
|
|
530
530
|
connectedCallback() {
|
|
531
531
|
var t;
|
|
@@ -539,10 +539,10 @@ class j extends tt {
|
|
|
539
539
|
return ot;
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
|
-
var
|
|
543
|
-
|
|
544
|
-
const
|
|
545
|
-
|
|
542
|
+
var wi;
|
|
543
|
+
U._$litElement$ = !0, U.finalized = !0, (wi = globalThis.litElementHydrateSupport) == null || wi.call(globalThis, { LitElement: U });
|
|
544
|
+
const ee = globalThis.litElementPolyfillSupport;
|
|
545
|
+
ee == null || ee({ LitElement: U });
|
|
546
546
|
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.1");
|
|
547
547
|
/**
|
|
548
548
|
* @license
|
|
@@ -571,13 +571,13 @@ let Un = class {
|
|
|
571
571
|
* Copyright 2020 Google LLC
|
|
572
572
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
573
573
|
*/
|
|
574
|
-
const
|
|
574
|
+
const Xn = {}, Yn = (n, t = Xn) => n._$AH = t;
|
|
575
575
|
/**
|
|
576
576
|
* @license
|
|
577
577
|
* Copyright 2021 Google LLC
|
|
578
578
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
579
579
|
*/
|
|
580
|
-
const
|
|
580
|
+
const Bn = Hn(class extends Un {
|
|
581
581
|
constructor() {
|
|
582
582
|
super(...arguments), this.key = C;
|
|
583
583
|
}
|
|
@@ -585,9 +585,9 @@ const Yn = Hn(class extends Un {
|
|
|
585
585
|
return this.key = n, t;
|
|
586
586
|
}
|
|
587
587
|
update(n, [t, e]) {
|
|
588
|
-
return t !== this.key && (
|
|
588
|
+
return t !== this.key && (Yn(n), this.key = t), e;
|
|
589
589
|
}
|
|
590
|
-
}),
|
|
590
|
+
}), Vn = (n) => {
|
|
591
591
|
n.hoverInteraction = n.eoxMap.selectInteractions.selectHover, n.clickInteraction = n.eoxMap.selectInteractions.selectClick;
|
|
592
592
|
const t = () => {
|
|
593
593
|
n.requestUpdate();
|
|
@@ -599,48 +599,51 @@ const Yn = Hn(class extends Un {
|
|
|
599
599
|
"change",
|
|
600
600
|
t
|
|
601
601
|
);
|
|
602
|
-
},
|
|
602
|
+
}, zn = (n, t, e) => {
|
|
603
603
|
if (n.clickId === t) return;
|
|
604
604
|
const i = e ? [] : [t];
|
|
605
605
|
n.hoverInteraction.highlightById(i);
|
|
606
|
-
},
|
|
606
|
+
}, Jn = (n, t) => {
|
|
607
607
|
n.stopPropagation();
|
|
608
608
|
const e = Number(n.target.getAttribute("index")), i = t.drawnFeatures[e];
|
|
609
609
|
t.drawLayer.getSource().removeFeature(i), t.drawnFeatures.splice(e, 1), t.requestUpdate();
|
|
610
|
-
},
|
|
610
|
+
}, Qe = {
|
|
611
|
+
duration: 750,
|
|
612
|
+
padding: [20, 20, 20, 20]
|
|
613
|
+
}, ti = {
|
|
611
614
|
type: "FeatureCollection",
|
|
612
615
|
features: []
|
|
613
|
-
},
|
|
614
|
-
const
|
|
615
|
-
if (
|
|
616
|
-
const
|
|
617
|
-
|
|
616
|
+
}, Wn = (n, t) => {
|
|
617
|
+
const { clickId: e, drawLayer: i, olMap: r, clickInteraction: s } = t, o = s.getId(n);
|
|
618
|
+
if (e === o) {
|
|
619
|
+
const l = i.getSource().getExtent();
|
|
620
|
+
r.getView().fit(l, Qe), s.highlightById([]);
|
|
618
621
|
} else {
|
|
619
|
-
const h = l.getExtent();
|
|
620
|
-
|
|
622
|
+
const l = t.eoxMap.projection || "EPSG:3857", h = t.eoxDrawTools.projection, c = n.clone().getGeometry().transform(h, l).getExtent();
|
|
623
|
+
s.highlightById([o]), r.getView().fit(c, Qe);
|
|
621
624
|
}
|
|
622
625
|
t.requestUpdate();
|
|
623
|
-
},
|
|
624
|
-
class
|
|
626
|
+
}, qn = "ul.list-wrap { padding: 0;}ul.list-wrap li:hover,ul.list-wrap li.selected { background: var(--secondary-bg-color-hover);}ul.list-wrap li { list-style: none; padding: 4px;}ul.list-wrap li { border-bottom: 1.2px solid var(--secondary-color);}ul.list-wrap li:first-child { border-top: 1.2px solid var(--secondary-color);}ul.list-wrap li .list { width: 100%; align-items: center; justify-content: space-between; display: flex; align-items: center; cursor: pointer; font-size: small; gap: 10px;}ul.list-wrap li .list span { display: flex; align-items: center; cursor: pointer; font-size: small; flex-grow: 1;}";
|
|
627
|
+
class Ai extends U {
|
|
625
628
|
constructor() {
|
|
626
629
|
super();
|
|
627
630
|
/**
|
|
628
631
|
* @type {import("@eox/map").EOxMap["selectInteractions"][string]}
|
|
629
632
|
*/
|
|
630
|
-
|
|
633
|
+
R(this, "hoverInteraction");
|
|
631
634
|
/**
|
|
632
635
|
* @type {import("@eox/map").EOxMap["selectInteractions"][string]}
|
|
633
636
|
*/
|
|
634
|
-
|
|
637
|
+
R(this, "clickInteraction");
|
|
635
638
|
/**
|
|
636
639
|
* @type string | number
|
|
637
640
|
*/
|
|
638
|
-
|
|
641
|
+
R(this, "hoverId");
|
|
639
642
|
/**
|
|
640
643
|
* @type string | number
|
|
641
644
|
*/
|
|
642
|
-
|
|
643
|
-
this.eoxMap = null, this.olMap = null, this.draw = null, this.drawLayer = null, this.drawnFeatures = [], this.modify = null, this.unstyled = !1;
|
|
645
|
+
R(this, "clickId");
|
|
646
|
+
this.eoxDrawTools = null, this.eoxMap = null, this.olMap = null, this.draw = null, this.drawLayer = null, this.drawnFeatures = [], this.featureName = "Feature", this.modify = null, this.unstyled = !1;
|
|
644
647
|
}
|
|
645
648
|
/**
|
|
646
649
|
* Handles the deletion of an individual feature.
|
|
@@ -648,7 +651,7 @@ class Si extends j {
|
|
|
648
651
|
* @param {Event & { target: HTMLButtonElement }} evt - Event object containing button target.
|
|
649
652
|
*/
|
|
650
653
|
_handleDelete(e) {
|
|
651
|
-
|
|
654
|
+
Jn(e, this), this.dispatchEvent(new CustomEvent("changed", { bubbles: !0 }));
|
|
652
655
|
}
|
|
653
656
|
/**
|
|
654
657
|
* Handles the selection and deselection of a feature from the list.
|
|
@@ -656,7 +659,7 @@ class Si extends j {
|
|
|
656
659
|
* @param {import("ol").Feature} feature - The selected feature.
|
|
657
660
|
*/
|
|
658
661
|
_handleFeatureSelectAndDeselect(e) {
|
|
659
|
-
|
|
662
|
+
Wn(e, this);
|
|
660
663
|
}
|
|
661
664
|
/**
|
|
662
665
|
*
|
|
@@ -664,13 +667,13 @@ class Si extends j {
|
|
|
664
667
|
* @param {Boolean} mouseOut - Flag indicating mouse out event.
|
|
665
668
|
*/
|
|
666
669
|
_handleHoverFeature(e, i = !1) {
|
|
667
|
-
|
|
670
|
+
zn(this, e, i);
|
|
668
671
|
}
|
|
669
672
|
/**
|
|
670
673
|
* Initiates initial settings and event triggers upon the component's first update.
|
|
671
674
|
*/
|
|
672
675
|
firstUpdated() {
|
|
673
|
-
|
|
676
|
+
Vn(this);
|
|
674
677
|
}
|
|
675
678
|
/**
|
|
676
679
|
* Overrides createRenderRoot to handle shadow DOM.
|
|
@@ -680,16 +683,18 @@ class Si extends j {
|
|
|
680
683
|
}
|
|
681
684
|
render() {
|
|
682
685
|
var e, i;
|
|
683
|
-
return this.hoverId = (e = this.hoverInteraction) == null ? void 0 : e.selectedFids[0], this.clickId = (i = this.clickInteraction) == null ? void 0 : i.selectedFids[0],
|
|
686
|
+
return this.hoverId = (e = this.hoverInteraction) == null ? void 0 : e.selectedFids[0], this.clickId = (i = this.clickInteraction) == null ? void 0 : i.selectedFids[0], H`
|
|
684
687
|
<style>
|
|
685
|
-
${!this.unstyled &&
|
|
688
|
+
${!this.unstyled && qn}
|
|
686
689
|
</style>
|
|
687
690
|
<ul class="list-wrap">
|
|
688
691
|
${this.drawnFeatures.map((r, s) => {
|
|
689
|
-
const o = s + 1, a =
|
|
690
|
-
|
|
692
|
+
const o = s + 1, a = Object.values(
|
|
693
|
+
this.eoxMap.selectInteractions
|
|
694
|
+
)[0].getId(r), l = this.hoverId === a, h = this.clickId === a;
|
|
695
|
+
return Bn(
|
|
691
696
|
o,
|
|
692
|
-
|
|
697
|
+
H`
|
|
693
698
|
<li
|
|
694
699
|
class="${l || h ? "selected" : C}"
|
|
695
700
|
@mouseover=${() => this._handleHoverFeature(a)}
|
|
@@ -699,7 +704,9 @@ class Si extends j {
|
|
|
699
704
|
class="list"
|
|
700
705
|
@click="${() => this._handleFeatureSelectAndDeselect(r)}"
|
|
701
706
|
>
|
|
702
|
-
<span class="title"
|
|
707
|
+
<span class="title"
|
|
708
|
+
>${this.featureName} ${o}</span
|
|
709
|
+
>
|
|
703
710
|
<button
|
|
704
711
|
index=${s}
|
|
705
712
|
class="icon smallest discard"
|
|
@@ -716,21 +723,23 @@ class Si extends j {
|
|
|
716
723
|
`;
|
|
717
724
|
}
|
|
718
725
|
}
|
|
719
|
-
|
|
726
|
+
R(Ai, "properties", {
|
|
727
|
+
eoxDrawTools: { attribute: !1, state: !0 },
|
|
720
728
|
eoxMap: { attribute: !1, state: !0 },
|
|
721
729
|
olMap: { attribute: !1, state: !0 },
|
|
722
730
|
draw: { attribute: !1, state: !0 },
|
|
723
731
|
drawLayer: { attribute: !1, state: !0 },
|
|
724
732
|
drawnFeatures: { attribute: !1, state: !0, type: Array },
|
|
733
|
+
featureName: { attribute: !1, state: !0, type: String },
|
|
725
734
|
modify: { attribute: !1, state: !0 },
|
|
726
735
|
unstyled: { type: Boolean }
|
|
727
736
|
});
|
|
728
|
-
customElements.define("eox-drawtools-list",
|
|
729
|
-
const
|
|
737
|
+
customElements.define("eox-drawtools-list", Ai);
|
|
738
|
+
const Zn = (n) => {
|
|
730
739
|
const { multipleFeatures: t, drawnFeatures: e, currentlyDrawing: i } = n, r = !t && (e == null ? void 0 : e.length) > 0 || i, s = !(e != null && e.length) && !i;
|
|
731
740
|
return { drawDisabled: r, discardDisabled: s };
|
|
732
|
-
},
|
|
733
|
-
function
|
|
741
|
+
}, Dn = "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;}", Kn = 'textarea { height: 90px; resize: none; border-radius: 4px; box-sizing: border-box !important; width: 100%; padding: 5px 7px; border: 1px solid var(--secondary-color); font-size: smaller; background: var(--background-color);}input,input[type="text"],input[type="url"],input[type="email"],input[type="password"],input[type="text"],input[type="number"],input[type="search"],input[type="tel"],select { box-sizing: border-box; width: 100%; margin-top: 0.5rem; margin-bottom: 0.5rem; padding: 5px 7px; border-radius: 4px; border: 1px solid #0004; background-color: var(--background-color);}';
|
|
742
|
+
function Qn(n) {
|
|
734
743
|
navigator.clipboard.writeText(n).then(
|
|
735
744
|
function() {
|
|
736
745
|
},
|
|
@@ -739,14 +748,14 @@ function Kn(n) {
|
|
|
739
748
|
}
|
|
740
749
|
);
|
|
741
750
|
}
|
|
742
|
-
const
|
|
751
|
+
const tr = {
|
|
743
752
|
/**
|
|
744
753
|
* Triggered when a property is changed.
|
|
745
754
|
* @event module:ol/Object.ObjectEvent#propertychange
|
|
746
755
|
* @api
|
|
747
756
|
*/
|
|
748
757
|
PROPERTYCHANGE: "propertychange"
|
|
749
|
-
},
|
|
758
|
+
}, me = {
|
|
750
759
|
/**
|
|
751
760
|
* Generic change event. Triggered when the revision counter is increased.
|
|
752
761
|
* @event module:ol/events/Event~BaseEvent#change
|
|
@@ -754,7 +763,7 @@ const Qn = {
|
|
|
754
763
|
*/
|
|
755
764
|
CHANGE: "change"
|
|
756
765
|
};
|
|
757
|
-
class
|
|
766
|
+
class er {
|
|
758
767
|
constructor() {
|
|
759
768
|
this.disposed = !1;
|
|
760
769
|
}
|
|
@@ -771,23 +780,23 @@ class tr {
|
|
|
771
780
|
disposeInternal() {
|
|
772
781
|
}
|
|
773
782
|
}
|
|
774
|
-
function
|
|
783
|
+
function ir(n, t, e) {
|
|
775
784
|
let i, r;
|
|
776
|
-
e = e ||
|
|
785
|
+
e = e || Fi;
|
|
777
786
|
let s = 0, o = n.length, a = !1;
|
|
778
787
|
for (; s < o; )
|
|
779
788
|
i = s + (o - s >> 1), r = +e(n[i], t), r < 0 ? s = i + 1 : (o = i, a = !r);
|
|
780
789
|
return a ? s : ~s;
|
|
781
790
|
}
|
|
782
|
-
function
|
|
791
|
+
function Fi(n, t) {
|
|
783
792
|
return n > t ? 1 : n < t ? -1 : 0;
|
|
784
793
|
}
|
|
785
|
-
function
|
|
794
|
+
function A(n, t) {
|
|
786
795
|
const e = Array.isArray(t) ? t : [t], i = e.length;
|
|
787
796
|
for (let r = 0; r < i; r++)
|
|
788
797
|
n[n.length] = e[r];
|
|
789
798
|
}
|
|
790
|
-
function
|
|
799
|
+
function nr(n, t) {
|
|
791
800
|
const e = n.length;
|
|
792
801
|
if (e !== t.length)
|
|
793
802
|
return !1;
|
|
@@ -796,26 +805,26 @@ function ir(n, t) {
|
|
|
796
805
|
return !1;
|
|
797
806
|
return !0;
|
|
798
807
|
}
|
|
799
|
-
function
|
|
808
|
+
function ei() {
|
|
800
809
|
}
|
|
801
|
-
function
|
|
810
|
+
function Gi(n) {
|
|
802
811
|
let t, e, i;
|
|
803
812
|
return function() {
|
|
804
813
|
const r = Array.prototype.slice.call(arguments);
|
|
805
|
-
return (!e || this !== i || !
|
|
814
|
+
return (!e || this !== i || !nr(r, e)) && (i = this, e = r, t = n.apply(this, arguments)), t;
|
|
806
815
|
};
|
|
807
816
|
}
|
|
808
|
-
function
|
|
817
|
+
function Ii(n) {
|
|
809
818
|
for (const t in n)
|
|
810
819
|
delete n[t];
|
|
811
820
|
}
|
|
812
|
-
function
|
|
821
|
+
function Li(n) {
|
|
813
822
|
let t;
|
|
814
823
|
for (t in n)
|
|
815
824
|
return !1;
|
|
816
825
|
return !t;
|
|
817
826
|
}
|
|
818
|
-
class
|
|
827
|
+
class Ri {
|
|
819
828
|
/**
|
|
820
829
|
* @param {string} type Type.
|
|
821
830
|
*/
|
|
@@ -838,7 +847,7 @@ class Ii {
|
|
|
838
847
|
this.propagationStopped = !0;
|
|
839
848
|
}
|
|
840
849
|
}
|
|
841
|
-
class
|
|
850
|
+
class rr extends er {
|
|
842
851
|
/**
|
|
843
852
|
* @param {*} [target] Default event target for dispatched events.
|
|
844
853
|
*/
|
|
@@ -869,7 +878,7 @@ class nr extends tr {
|
|
|
869
878
|
const e = typeof t == "string", i = e ? t : t.type, r = this.listeners_ && this.listeners_[i];
|
|
870
879
|
if (!r)
|
|
871
880
|
return;
|
|
872
|
-
const s = e ? new
|
|
881
|
+
const s = e ? new Ri(t) : (
|
|
873
882
|
/** @type {Event} */
|
|
874
883
|
t
|
|
875
884
|
);
|
|
@@ -887,7 +896,7 @@ class nr extends tr {
|
|
|
887
896
|
if (--o[i] === 0) {
|
|
888
897
|
let h = a[i];
|
|
889
898
|
for (delete a[i]; h--; )
|
|
890
|
-
this.removeEventListener(i,
|
|
899
|
+
this.removeEventListener(i, ei);
|
|
891
900
|
delete o[i];
|
|
892
901
|
}
|
|
893
902
|
return l;
|
|
@@ -897,7 +906,7 @@ class nr extends tr {
|
|
|
897
906
|
* @override
|
|
898
907
|
*/
|
|
899
908
|
disposeInternal() {
|
|
900
|
-
this.listeners_ &&
|
|
909
|
+
this.listeners_ && Ii(this.listeners_);
|
|
901
910
|
}
|
|
902
911
|
/**
|
|
903
912
|
* Get the listeners for a specified event type. Listeners are returned in the
|
|
@@ -928,7 +937,7 @@ class nr extends tr {
|
|
|
928
937
|
if (!i)
|
|
929
938
|
return;
|
|
930
939
|
const r = i.indexOf(e);
|
|
931
|
-
r !== -1 && (this.pendingRemovals_ && t in this.pendingRemovals_ ? (i[r] =
|
|
940
|
+
r !== -1 && (this.pendingRemovals_ && t in this.pendingRemovals_ ? (i[r] = ei, ++this.pendingRemovals_[t]) : (i.splice(r, 1), i.length === 0 && delete this.listeners_[t]));
|
|
932
941
|
}
|
|
933
942
|
}
|
|
934
943
|
function mt(n, t, e, i, r) {
|
|
@@ -945,13 +954,13 @@ function mt(n, t, e, i, r) {
|
|
|
945
954
|
};
|
|
946
955
|
return n.addEventListener(t, e), s;
|
|
947
956
|
}
|
|
948
|
-
function
|
|
957
|
+
function ii(n, t, e, i) {
|
|
949
958
|
return mt(n, t, e, i, !0);
|
|
950
959
|
}
|
|
951
|
-
function
|
|
952
|
-
n && n.target && (n.target.removeEventListener(n.type, n.listener),
|
|
960
|
+
function Nt(n) {
|
|
961
|
+
n && n.target && (n.target.removeEventListener(n.type, n.listener), Ii(n));
|
|
953
962
|
}
|
|
954
|
-
class
|
|
963
|
+
class Yt extends rr {
|
|
955
964
|
constructor() {
|
|
956
965
|
super(), this.on = /** @type {ObservableOnSignature<import("./events").EventsKey>} */
|
|
957
966
|
this.onInternal, this.once = /** @type {ObservableOnSignature<import("./events").EventsKey>} */
|
|
@@ -963,7 +972,7 @@ class Xt extends nr {
|
|
|
963
972
|
* @api
|
|
964
973
|
*/
|
|
965
974
|
changed() {
|
|
966
|
-
++this.revision_, this.dispatchEvent(
|
|
975
|
+
++this.revision_, this.dispatchEvent(me.CHANGE);
|
|
967
976
|
}
|
|
968
977
|
/**
|
|
969
978
|
* Get the version number for this object. Each time the object is modified,
|
|
@@ -1006,9 +1015,9 @@ class Xt extends nr {
|
|
|
1006
1015
|
const r = t.length;
|
|
1007
1016
|
i = new Array(r);
|
|
1008
1017
|
for (let s = 0; s < r; ++s)
|
|
1009
|
-
i[s] =
|
|
1018
|
+
i[s] = ii(this, t[s], e);
|
|
1010
1019
|
} else
|
|
1011
|
-
i =
|
|
1020
|
+
i = ii(
|
|
1012
1021
|
this,
|
|
1013
1022
|
/** @type {string} */
|
|
1014
1023
|
t,
|
|
@@ -1028,7 +1037,7 @@ class Xt extends nr {
|
|
|
1028
1037
|
e.ol_key
|
|
1029
1038
|
);
|
|
1030
1039
|
if (i)
|
|
1031
|
-
|
|
1040
|
+
sr(i);
|
|
1032
1041
|
else if (Array.isArray(t))
|
|
1033
1042
|
for (let r = 0, s = t.length; r < s; ++r)
|
|
1034
1043
|
this.removeEventListener(t[r], e);
|
|
@@ -1036,15 +1045,15 @@ class Xt extends nr {
|
|
|
1036
1045
|
this.removeEventListener(t, e);
|
|
1037
1046
|
}
|
|
1038
1047
|
}
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
function
|
|
1048
|
+
Yt.prototype.on;
|
|
1049
|
+
Yt.prototype.once;
|
|
1050
|
+
Yt.prototype.un;
|
|
1051
|
+
function sr(n) {
|
|
1043
1052
|
if (Array.isArray(n))
|
|
1044
1053
|
for (let t = 0, e = n.length; t < e; ++t)
|
|
1045
|
-
|
|
1054
|
+
Nt(n[t]);
|
|
1046
1055
|
else
|
|
1047
|
-
|
|
1056
|
+
Nt(
|
|
1048
1057
|
/** @type {import("./events.js").EventsKey} */
|
|
1049
1058
|
n
|
|
1050
1059
|
);
|
|
@@ -1052,11 +1061,11 @@ function rr(n) {
|
|
|
1052
1061
|
function y() {
|
|
1053
1062
|
throw new Error("Unimplemented abstract method.");
|
|
1054
1063
|
}
|
|
1055
|
-
let
|
|
1056
|
-
function
|
|
1057
|
-
return n.ol_uid || (n.ol_uid = String(++
|
|
1064
|
+
let or = 0;
|
|
1065
|
+
function ar(n) {
|
|
1066
|
+
return n.ol_uid || (n.ol_uid = String(++or));
|
|
1058
1067
|
}
|
|
1059
|
-
class
|
|
1068
|
+
class ni extends Ri {
|
|
1060
1069
|
/**
|
|
1061
1070
|
* @param {string} type The event type.
|
|
1062
1071
|
* @param {string} key The property name.
|
|
@@ -1066,12 +1075,12 @@ class ii extends Ii {
|
|
|
1066
1075
|
super(t), this.key = e, this.oldValue = i;
|
|
1067
1076
|
}
|
|
1068
1077
|
}
|
|
1069
|
-
class
|
|
1078
|
+
class Ti extends Yt {
|
|
1070
1079
|
/**
|
|
1071
1080
|
* @param {Object<string, *>} [values] An object with key-value pairs.
|
|
1072
1081
|
*/
|
|
1073
1082
|
constructor(t) {
|
|
1074
|
-
super(), this.on, this.once, this.un,
|
|
1083
|
+
super(), this.on, this.once, this.un, ar(this), this.values_ = null, t !== void 0 && this.setProperties(t);
|
|
1075
1084
|
}
|
|
1076
1085
|
/**
|
|
1077
1086
|
* Gets a value.
|
|
@@ -1118,7 +1127,7 @@ class Li extends Xt {
|
|
|
1118
1127
|
*/
|
|
1119
1128
|
notify(t, e) {
|
|
1120
1129
|
let i;
|
|
1121
|
-
i = `change:${t}`, this.hasListener(i) && this.dispatchEvent(new
|
|
1130
|
+
i = `change:${t}`, this.hasListener(i) && this.dispatchEvent(new ni(i, t, e)), i = tr.PROPERTYCHANGE, this.hasListener(i) && this.dispatchEvent(new ni(i, t, e));
|
|
1122
1131
|
}
|
|
1123
1132
|
/**
|
|
1124
1133
|
* @param {string} key Key name.
|
|
@@ -1178,15 +1187,15 @@ class Li extends Xt {
|
|
|
1178
1187
|
unset(t, e) {
|
|
1179
1188
|
if (this.values_ && t in this.values_) {
|
|
1180
1189
|
const i = this.values_[t];
|
|
1181
|
-
delete this.values_[t],
|
|
1190
|
+
delete this.values_[t], Li(this.values_) && (this.values_ = null), e || this.notify(t, i);
|
|
1182
1191
|
}
|
|
1183
1192
|
}
|
|
1184
1193
|
}
|
|
1185
|
-
function
|
|
1194
|
+
function lr(n, t) {
|
|
1186
1195
|
if (!n)
|
|
1187
1196
|
throw new Error(t);
|
|
1188
1197
|
}
|
|
1189
|
-
class lt extends
|
|
1198
|
+
class lt extends Ti {
|
|
1190
1199
|
/**
|
|
1191
1200
|
* @param {Geometry|ObjectWithGeometry<Geometry>} [geometryOrProperties]
|
|
1192
1201
|
* You may pass a Geometry object directly, or an object literal containing
|
|
@@ -1289,11 +1298,11 @@ class lt extends Li {
|
|
|
1289
1298
|
* @private
|
|
1290
1299
|
*/
|
|
1291
1300
|
handleGeometryChanged_() {
|
|
1292
|
-
this.geometryChangeKey_ && (
|
|
1301
|
+
this.geometryChangeKey_ && (Nt(this.geometryChangeKey_), this.geometryChangeKey_ = null);
|
|
1293
1302
|
const t = this.getGeometry();
|
|
1294
1303
|
t && (this.geometryChangeKey_ = mt(
|
|
1295
1304
|
t,
|
|
1296
|
-
|
|
1305
|
+
me.CHANGE,
|
|
1297
1306
|
this.handleGeometryChange_,
|
|
1298
1307
|
this
|
|
1299
1308
|
)), this.changed();
|
|
@@ -1318,7 +1327,7 @@ class lt extends Li {
|
|
|
1318
1327
|
* @fires module:ol/events/Event~BaseEvent#event:change
|
|
1319
1328
|
*/
|
|
1320
1329
|
setStyle(t) {
|
|
1321
|
-
this.style_ = t, this.styleFunction_ = t ?
|
|
1330
|
+
this.style_ = t, this.styleFunction_ = t ? hr(t) : void 0, this.changed();
|
|
1322
1331
|
}
|
|
1323
1332
|
/**
|
|
1324
1333
|
* Set the feature id. The feature id is considered stable and may be used when
|
|
@@ -1343,11 +1352,11 @@ class lt extends Li {
|
|
|
1343
1352
|
this.removeChangeListener(this.geometryName_, this.handleGeometryChanged_), this.geometryName_ = t, this.addChangeListener(this.geometryName_, this.handleGeometryChanged_), this.handleGeometryChanged_();
|
|
1344
1353
|
}
|
|
1345
1354
|
}
|
|
1346
|
-
function
|
|
1355
|
+
function hr(n) {
|
|
1347
1356
|
if (typeof n == "function")
|
|
1348
1357
|
return n;
|
|
1349
1358
|
let t;
|
|
1350
|
-
return Array.isArray(n) ? t = n : (
|
|
1359
|
+
return Array.isArray(n) ? t = n : (lr(
|
|
1351
1360
|
typeof /** @type {?} */
|
|
1352
1361
|
n.getZIndex == "function",
|
|
1353
1362
|
"Expected an `ol/style/Style` or an array of `ol/style/Style.js`"
|
|
@@ -1366,77 +1375,77 @@ const w = {
|
|
|
1366
1375
|
BELOW: 8,
|
|
1367
1376
|
LEFT: 16
|
|
1368
1377
|
};
|
|
1369
|
-
function
|
|
1378
|
+
function q(n, t, e) {
|
|
1370
1379
|
let i, r;
|
|
1371
1380
|
return t < n[0] ? i = n[0] - t : n[2] < t ? i = t - n[2] : i = 0, e < n[1] ? r = n[1] - e : n[3] < e ? r = e - n[3] : r = 0, i * i + r * r;
|
|
1372
1381
|
}
|
|
1373
|
-
function
|
|
1382
|
+
function Ni(n, t, e) {
|
|
1374
1383
|
return n[0] <= t && t <= n[2] && n[1] <= e && e <= n[3];
|
|
1375
1384
|
}
|
|
1376
|
-
function
|
|
1385
|
+
function ri(n, t) {
|
|
1377
1386
|
const e = n[0], i = n[1], r = n[2], s = n[3], o = t[0], a = t[1];
|
|
1378
1387
|
let l = w.UNKNOWN;
|
|
1379
1388
|
return o < e ? l = l | w.LEFT : o > r && (l = l | w.RIGHT), a < i ? l = l | w.BELOW : a > s && (l = l | w.ABOVE), l === w.UNKNOWN && (l = w.INTERSECTING), l;
|
|
1380
1389
|
}
|
|
1381
|
-
function
|
|
1390
|
+
function _e() {
|
|
1382
1391
|
return [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
1383
1392
|
}
|
|
1384
|
-
function
|
|
1393
|
+
function Oi(n, t, e, i, r) {
|
|
1385
1394
|
return r ? (r[0] = n, r[1] = t, r[2] = e, r[3] = i, r) : [n, t, e, i];
|
|
1386
1395
|
}
|
|
1387
|
-
function
|
|
1388
|
-
return
|
|
1396
|
+
function ve(n) {
|
|
1397
|
+
return Oi(1 / 0, 1 / 0, -1 / 0, -1 / 0, n);
|
|
1389
1398
|
}
|
|
1390
|
-
function
|
|
1399
|
+
function ki(n, t) {
|
|
1391
1400
|
const e = n[0], i = n[1];
|
|
1392
|
-
return
|
|
1401
|
+
return Oi(e, i, e, i, t);
|
|
1393
1402
|
}
|
|
1394
|
-
function
|
|
1395
|
-
const s =
|
|
1396
|
-
return
|
|
1403
|
+
function Ce(n, t, e, i, r) {
|
|
1404
|
+
const s = ve(r);
|
|
1405
|
+
return ji(s, n, t, e, i);
|
|
1397
1406
|
}
|
|
1398
|
-
function
|
|
1407
|
+
function cr(n, t) {
|
|
1399
1408
|
return t[0] < n[0] && (n[0] = t[0]), t[2] > n[2] && (n[2] = t[2]), t[1] < n[1] && (n[1] = t[1]), t[3] > n[3] && (n[3] = t[3]), n;
|
|
1400
1409
|
}
|
|
1401
|
-
function
|
|
1410
|
+
function ji(n, t, e, i, r) {
|
|
1402
1411
|
for (; e < i; e += r)
|
|
1403
|
-
|
|
1412
|
+
ur(n, t[e], t[e + 1]);
|
|
1404
1413
|
return n;
|
|
1405
1414
|
}
|
|
1406
|
-
function
|
|
1415
|
+
function ur(n, t, e) {
|
|
1407
1416
|
n[0] = Math.min(n[0], t), n[1] = Math.min(n[1], e), n[2] = Math.max(n[2], t), n[3] = Math.max(n[3], e);
|
|
1408
1417
|
}
|
|
1409
|
-
function
|
|
1418
|
+
function dr(n, t) {
|
|
1410
1419
|
let e;
|
|
1411
|
-
return e = t(
|
|
1420
|
+
return e = t(gr(n)), e || (e = t(fr(n)), e) || (e = t(yr(n)), e) || (e = t(pr(n)), e) ? e : !1;
|
|
1412
1421
|
}
|
|
1413
|
-
function
|
|
1422
|
+
function gr(n) {
|
|
1414
1423
|
return [n[0], n[1]];
|
|
1415
1424
|
}
|
|
1416
|
-
function
|
|
1425
|
+
function fr(n) {
|
|
1417
1426
|
return [n[2], n[1]];
|
|
1418
1427
|
}
|
|
1419
|
-
function
|
|
1428
|
+
function Bt(n) {
|
|
1420
1429
|
return [(n[0] + n[2]) / 2, (n[1] + n[3]) / 2];
|
|
1421
1430
|
}
|
|
1422
|
-
function
|
|
1431
|
+
function Ot(n) {
|
|
1423
1432
|
return n[3] - n[1];
|
|
1424
1433
|
}
|
|
1425
|
-
function
|
|
1434
|
+
function pr(n) {
|
|
1426
1435
|
return [n[0], n[3]];
|
|
1427
1436
|
}
|
|
1428
|
-
function
|
|
1437
|
+
function yr(n) {
|
|
1429
1438
|
return [n[2], n[3]];
|
|
1430
1439
|
}
|
|
1431
|
-
function
|
|
1440
|
+
function mr(n, t) {
|
|
1432
1441
|
return n[0] <= t[2] && n[2] >= t[0] && n[1] <= t[3] && n[3] >= t[1];
|
|
1433
1442
|
}
|
|
1434
|
-
function
|
|
1443
|
+
function _r(n, t) {
|
|
1435
1444
|
return t ? (t[0] = n[0], t[1] = n[1], t[2] = n[2], t[3] = n[3], t) : n;
|
|
1436
1445
|
}
|
|
1437
|
-
function
|
|
1446
|
+
function vr(n, t, e) {
|
|
1438
1447
|
let i = !1;
|
|
1439
|
-
const r =
|
|
1448
|
+
const r = ri(n, t), s = ri(n, e);
|
|
1440
1449
|
if (r === w.INTERSECTING || s === w.INTERSECTING)
|
|
1441
1450
|
i = !0;
|
|
1442
1451
|
else {
|
|
@@ -1446,7 +1455,7 @@ function _r(n, t, e) {
|
|
|
1446
1455
|
}
|
|
1447
1456
|
return i;
|
|
1448
1457
|
}
|
|
1449
|
-
function
|
|
1458
|
+
function Cr(n, t, e, i, r, s) {
|
|
1450
1459
|
const o = r - e, a = s - i;
|
|
1451
1460
|
if (o !== 0 || a !== 0) {
|
|
1452
1461
|
const l = ((n - e) * o + (t - i) * a) / (o * o + a * a);
|
|
@@ -1458,22 +1467,22 @@ function X(n, t, e, i) {
|
|
|
1458
1467
|
const r = e - n, s = i - t;
|
|
1459
1468
|
return r * r + s * s;
|
|
1460
1469
|
}
|
|
1461
|
-
function
|
|
1470
|
+
function si(n) {
|
|
1462
1471
|
return n * 180 / Math.PI;
|
|
1463
1472
|
}
|
|
1464
|
-
function
|
|
1473
|
+
function Rt(n) {
|
|
1465
1474
|
return n * Math.PI / 180;
|
|
1466
1475
|
}
|
|
1467
|
-
function
|
|
1476
|
+
function we(n, t, e) {
|
|
1468
1477
|
return n + e * (t - n);
|
|
1469
1478
|
}
|
|
1470
|
-
function
|
|
1479
|
+
function oe(n, t, e) {
|
|
1471
1480
|
if (n >= t && n < e)
|
|
1472
1481
|
return n;
|
|
1473
1482
|
const i = e - t;
|
|
1474
1483
|
return ((n - t) % i + i) % i + t;
|
|
1475
1484
|
}
|
|
1476
|
-
const
|
|
1485
|
+
const wr = {
|
|
1477
1486
|
// use the radius of the Normal sphere
|
|
1478
1487
|
radians: 6370997 / (2 * Math.PI),
|
|
1479
1488
|
degrees: 2 * Math.PI * 6370997 / 360,
|
|
@@ -1481,7 +1490,7 @@ const Cr = {
|
|
|
1481
1490
|
m: 1,
|
|
1482
1491
|
"us-ft": 1200 / 3937
|
|
1483
1492
|
};
|
|
1484
|
-
class
|
|
1493
|
+
class be {
|
|
1485
1494
|
/**
|
|
1486
1495
|
* @param {Options} options Projection options.
|
|
1487
1496
|
*/
|
|
@@ -1527,7 +1536,7 @@ class we {
|
|
|
1527
1536
|
* @api
|
|
1528
1537
|
*/
|
|
1529
1538
|
getMetersPerUnit() {
|
|
1530
|
-
return this.metersPerUnit_ ||
|
|
1539
|
+
return this.metersPerUnit_ || wr[this.units_];
|
|
1531
1540
|
}
|
|
1532
1541
|
/**
|
|
1533
1542
|
* Get the world extent for this projection.
|
|
@@ -1614,8 +1623,8 @@ class we {
|
|
|
1614
1623
|
return this.getPointResolutionFunc_;
|
|
1615
1624
|
}
|
|
1616
1625
|
}
|
|
1617
|
-
const
|
|
1618
|
-
class K extends
|
|
1626
|
+
const St = 6378137, et = Math.PI * St, br = [-et, -et, et, et], Er = [-180, -85, 180, 85], Ft = St * Math.log(Math.tan(Math.PI / 2));
|
|
1627
|
+
class K extends be {
|
|
1619
1628
|
/**
|
|
1620
1629
|
* @param {string} code Code.
|
|
1621
1630
|
*/
|
|
@@ -1623,16 +1632,16 @@ class K extends we {
|
|
|
1623
1632
|
super({
|
|
1624
1633
|
code: t,
|
|
1625
1634
|
units: "m",
|
|
1626
|
-
extent:
|
|
1635
|
+
extent: br,
|
|
1627
1636
|
global: !0,
|
|
1628
|
-
worldExtent:
|
|
1637
|
+
worldExtent: Er,
|
|
1629
1638
|
getPointResolution: function(e, i) {
|
|
1630
|
-
return e / Math.cosh(i[1] /
|
|
1639
|
+
return e / Math.cosh(i[1] / St);
|
|
1631
1640
|
}
|
|
1632
1641
|
});
|
|
1633
1642
|
}
|
|
1634
1643
|
}
|
|
1635
|
-
const
|
|
1644
|
+
const oi = [
|
|
1636
1645
|
new K("EPSG:3857"),
|
|
1637
1646
|
new K("EPSG:102100"),
|
|
1638
1647
|
new K("EPSG:102113"),
|
|
@@ -1640,25 +1649,25 @@ const si = [
|
|
|
1640
1649
|
new K("http://www.opengis.net/def/crs/EPSG/0/3857"),
|
|
1641
1650
|
new K("http://www.opengis.net/gml/srs/epsg.xml#3857")
|
|
1642
1651
|
];
|
|
1643
|
-
function
|
|
1652
|
+
function xr(n, t, e, i) {
|
|
1644
1653
|
const r = n.length;
|
|
1645
1654
|
e = e > 1 ? e : 2, i = i ?? e, t === void 0 && (e > 2 ? t = n.slice() : t = new Array(r));
|
|
1646
1655
|
for (let s = 0; s < r; s += i) {
|
|
1647
1656
|
t[s] = et * n[s] / 180;
|
|
1648
|
-
let o =
|
|
1649
|
-
o >
|
|
1657
|
+
let o = St * Math.log(Math.tan(Math.PI * (+n[s + 1] + 90) / 360));
|
|
1658
|
+
o > Ft ? o = Ft : o < -Ft && (o = -Ft), t[s + 1] = o;
|
|
1650
1659
|
}
|
|
1651
1660
|
return t;
|
|
1652
1661
|
}
|
|
1653
|
-
function
|
|
1662
|
+
function Pr(n, t, e, i) {
|
|
1654
1663
|
const r = n.length;
|
|
1655
1664
|
e = e > 1 ? e : 2, i = i ?? e, t === void 0 && (e > 2 ? t = n.slice() : t = new Array(r));
|
|
1656
1665
|
for (let s = 0; s < r; s += i)
|
|
1657
|
-
t[s] = 180 * n[s] / et, t[s + 1] = 360 * Math.atan(Math.exp(n[s + 1] /
|
|
1666
|
+
t[s] = 180 * n[s] / et, t[s + 1] = 360 * Math.atan(Math.exp(n[s + 1] / St)) / Math.PI - 90;
|
|
1658
1667
|
return t;
|
|
1659
1668
|
}
|
|
1660
|
-
const
|
|
1661
|
-
class N extends
|
|
1669
|
+
const Mr = 6378137, ai = [-180, -90, 180, 90], Sr = Math.PI * Mr / 180;
|
|
1670
|
+
class N extends be {
|
|
1662
1671
|
/**
|
|
1663
1672
|
* @param {string} code Code.
|
|
1664
1673
|
* @param {string} [axisOrientation] Axis orientation.
|
|
@@ -1667,15 +1676,15 @@ class N extends we {
|
|
|
1667
1676
|
super({
|
|
1668
1677
|
code: t,
|
|
1669
1678
|
units: "degrees",
|
|
1670
|
-
extent:
|
|
1679
|
+
extent: ai,
|
|
1671
1680
|
axisOrientation: e,
|
|
1672
1681
|
global: !0,
|
|
1673
|
-
metersPerUnit:
|
|
1674
|
-
worldExtent:
|
|
1682
|
+
metersPerUnit: Sr,
|
|
1683
|
+
worldExtent: ai
|
|
1675
1684
|
});
|
|
1676
1685
|
}
|
|
1677
1686
|
}
|
|
1678
|
-
const
|
|
1687
|
+
const li = [
|
|
1679
1688
|
new N("CRS:84"),
|
|
1680
1689
|
new N("EPSG:4326", "neu"),
|
|
1681
1690
|
new N("urn:ogc:def:crs:OGC:1.3:CRS84"),
|
|
@@ -1684,39 +1693,39 @@ const ai = [
|
|
|
1684
1693
|
new N("http://www.opengis.net/gml/srs/epsg.xml#4326", "neu"),
|
|
1685
1694
|
new N("http://www.opengis.net/def/crs/EPSG/0/4326", "neu")
|
|
1686
1695
|
];
|
|
1687
|
-
let
|
|
1696
|
+
let ae = {};
|
|
1688
1697
|
function $r(n) {
|
|
1689
|
-
return
|
|
1698
|
+
return ae[n] || ae[n.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/, "EPSG:$3")] || null;
|
|
1690
1699
|
}
|
|
1691
|
-
function
|
|
1692
|
-
|
|
1700
|
+
function Ar(n, t) {
|
|
1701
|
+
ae[n] = t;
|
|
1693
1702
|
}
|
|
1694
1703
|
let it = {};
|
|
1695
1704
|
function _t(n, t, e) {
|
|
1696
1705
|
const i = n.getCode(), r = t.getCode();
|
|
1697
1706
|
i in it || (it[i] = {}), it[i][r] = e;
|
|
1698
1707
|
}
|
|
1699
|
-
function
|
|
1708
|
+
function ie(n, t) {
|
|
1700
1709
|
return n in it && t in it[n] ? it[n][t] : null;
|
|
1701
1710
|
}
|
|
1702
|
-
const
|
|
1703
|
-
function
|
|
1704
|
-
const i = n - 5e5, o = (e.north ? t : t - 1e7) /
|
|
1705
|
-
let
|
|
1706
|
-
return
|
|
1707
|
-
|
|
1711
|
+
const kt = 0.9996, P = 669438e-8, Vt = P * P, zt = Vt * P, k = P / (1 - P), hi = Math.sqrt(1 - P), ht = (1 - hi) / (1 + hi), Hi = ht * ht, Ee = Hi * ht, xe = Ee * ht, Ui = xe * ht, Xi = 1 - P / 4 - 3 * Vt / 64 - 5 * zt / 256, Fr = 3 * P / 8 + 3 * Vt / 32 + 45 * zt / 1024, Gr = 15 * Vt / 256 + 45 * zt / 1024, Ir = 35 * zt / 3072, Lr = 3 / 2 * ht - 27 / 32 * Ee + 269 / 512 * Ui, Rr = 21 / 16 * Hi - 55 / 32 * xe, Tr = 151 / 96 * Ee - 417 / 128 * Ui, Nr = 1097 / 512 * xe, jt = 6378137;
|
|
1712
|
+
function Or(n, t, e) {
|
|
1713
|
+
const i = n - 5e5, o = (e.north ? t : t - 1e7) / kt / (jt * Xi), a = o + Lr * Math.sin(2 * o) + Rr * Math.sin(4 * o) + Tr * Math.sin(6 * o) + Nr * Math.sin(8 * o), l = Math.sin(a), h = l * l, c = Math.cos(a), u = l / c, d = u * u, g = d * d, f = 1 - P * h, p = Math.sqrt(1 - P * h), _ = jt / p, b = (1 - P) / f, v = k * c ** 2, S = v * v, E = i / (_ * kt), L = E * E, ct = L * E, je = ct * E, He = je * E, yn = He * E, mn = a - u / b * (L / 2 - je / 24 * (5 + 3 * d + 10 * v - 4 * S - 9 * k)) + yn / 720 * (61 + 90 * d + 298 * v + 45 * g - 252 * k - 3 * S);
|
|
1714
|
+
let Dt = (E - ct / 6 * (1 + 2 * d + v) + He / 120 * (5 - 2 * v + 28 * d - 3 * S + 8 * k + 24 * g)) / c;
|
|
1715
|
+
return Dt = oe(
|
|
1716
|
+
Dt + Rt(Yi(e.number)),
|
|
1708
1717
|
-Math.PI,
|
|
1709
1718
|
Math.PI
|
|
1710
|
-
), [
|
|
1719
|
+
), [si(Dt), si(mn)];
|
|
1711
1720
|
}
|
|
1712
|
-
const
|
|
1721
|
+
const ci = -80, ui = 84, kr = -180, jr = 180;
|
|
1713
1722
|
function Hr(n, t, e) {
|
|
1714
|
-
n =
|
|
1715
|
-
const i =
|
|
1716
|
-
let ct =
|
|
1717
|
-
return e.north || (ct += 1e7), [
|
|
1723
|
+
n = oe(n, kr, jr), t < ci ? t = ci : t > ui && (t = ui);
|
|
1724
|
+
const i = Rt(t), r = Math.sin(i), s = Math.cos(i), o = r / s, a = o * o, l = a * a, h = Rt(n), c = Yi(e.number), u = Rt(c), d = jt / Math.sqrt(1 - P * r ** 2), g = k * s ** 2, f = s * oe(h - u, -Math.PI, Math.PI), p = f * f, _ = p * f, b = _ * f, v = b * f, S = v * f, E = jt * (Xi * i - Fr * Math.sin(2 * i) + Gr * Math.sin(4 * i) - Ir * Math.sin(6 * i)), L = kt * d * (f + _ / 6 * (1 - a + g) + v / 120 * (5 - 18 * a + l + 72 * g - 58 * k)) + 5e5;
|
|
1725
|
+
let ct = kt * (E + d * o * (p / 2 + b / 24 * (5 - a + 9 * g + 4 * g ** 2) + S / 720 * (61 - 58 * a + l + 600 * g - 330 * k)));
|
|
1726
|
+
return e.north || (ct += 1e7), [L, ct];
|
|
1718
1727
|
}
|
|
1719
|
-
function
|
|
1728
|
+
function Yi(n) {
|
|
1720
1729
|
return (n - 1) * 6 - 180 + 3;
|
|
1721
1730
|
}
|
|
1722
1731
|
const Ur = [
|
|
@@ -1724,7 +1733,7 @@ const Ur = [
|
|
|
1724
1733
|
/^urn:ogc:def:crs:EPSG::(\d+)$/,
|
|
1725
1734
|
/^http:\/\/www\.opengis\.net\/def\/crs\/EPSG\/0\/(\d+)$/
|
|
1726
1735
|
];
|
|
1727
|
-
function
|
|
1736
|
+
function Bi(n) {
|
|
1728
1737
|
let t = 0;
|
|
1729
1738
|
for (const r of Ur) {
|
|
1730
1739
|
const s = n.match(r);
|
|
@@ -1738,7 +1747,7 @@ function Yi(n) {
|
|
|
1738
1747
|
let e = 0, i = !1;
|
|
1739
1748
|
return t > 32700 && t < 32761 ? e = t - 32700 : t > 32600 && t < 32661 && (i = !0, e = t - 32600), e ? { number: e, north: i } : null;
|
|
1740
1749
|
}
|
|
1741
|
-
function
|
|
1750
|
+
function di(n, t) {
|
|
1742
1751
|
return function(e, i, r, s) {
|
|
1743
1752
|
const o = e.length;
|
|
1744
1753
|
r = r > 1 ? r : 2, s = s ?? r, i || (r > 2 ? i = e.slice() : i = new Array(o));
|
|
@@ -1749,18 +1758,18 @@ function ui(n, t) {
|
|
|
1749
1758
|
return i;
|
|
1750
1759
|
};
|
|
1751
1760
|
}
|
|
1752
|
-
function jr(n) {
|
|
1753
|
-
return Yi(n) ? new we({ code: n, units: "m" }) : null;
|
|
1754
|
-
}
|
|
1755
1761
|
function Xr(n) {
|
|
1756
|
-
|
|
1762
|
+
return Bi(n) ? new be({ code: n, units: "m" }) : null;
|
|
1763
|
+
}
|
|
1764
|
+
function Yr(n) {
|
|
1765
|
+
const t = Bi(n.getCode());
|
|
1757
1766
|
return t ? {
|
|
1758
|
-
forward:
|
|
1759
|
-
inverse:
|
|
1767
|
+
forward: di(Hr, t),
|
|
1768
|
+
inverse: di(Or, t)
|
|
1760
1769
|
} : null;
|
|
1761
1770
|
}
|
|
1762
|
-
const
|
|
1763
|
-
function
|
|
1771
|
+
const Br = [Yr], Vr = [Xr];
|
|
1772
|
+
function Pe(n, t) {
|
|
1764
1773
|
if (t !== void 0) {
|
|
1765
1774
|
for (let e = 0, i = n.length; e < i; ++e)
|
|
1766
1775
|
t[e] = n[e];
|
|
@@ -1769,11 +1778,11 @@ function xe(n, t) {
|
|
|
1769
1778
|
t = n.slice();
|
|
1770
1779
|
return t;
|
|
1771
1780
|
}
|
|
1772
|
-
function
|
|
1773
|
-
|
|
1781
|
+
function le(n) {
|
|
1782
|
+
Ar(n.getCode(), n), _t(n, n, Pe);
|
|
1774
1783
|
}
|
|
1775
|
-
function
|
|
1776
|
-
n.forEach(
|
|
1784
|
+
function zr(n) {
|
|
1785
|
+
n.forEach(le);
|
|
1777
1786
|
}
|
|
1778
1787
|
function x(n) {
|
|
1779
1788
|
if (typeof n != "string")
|
|
@@ -1781,93 +1790,93 @@ function x(n) {
|
|
|
1781
1790
|
const t = $r(n);
|
|
1782
1791
|
if (t)
|
|
1783
1792
|
return t;
|
|
1784
|
-
for (const e of
|
|
1793
|
+
for (const e of Vr) {
|
|
1785
1794
|
const i = e(n);
|
|
1786
1795
|
if (i)
|
|
1787
1796
|
return i;
|
|
1788
1797
|
}
|
|
1789
1798
|
return null;
|
|
1790
1799
|
}
|
|
1791
|
-
function
|
|
1792
|
-
|
|
1800
|
+
function gi(n) {
|
|
1801
|
+
zr(n), n.forEach(function(t) {
|
|
1793
1802
|
n.forEach(function(e) {
|
|
1794
|
-
t !== e && _t(t, e,
|
|
1803
|
+
t !== e && _t(t, e, Pe);
|
|
1795
1804
|
});
|
|
1796
1805
|
});
|
|
1797
1806
|
}
|
|
1798
|
-
function
|
|
1807
|
+
function Jr(n, t, e, i) {
|
|
1799
1808
|
n.forEach(function(r) {
|
|
1800
1809
|
t.forEach(function(s) {
|
|
1801
1810
|
_t(r, s, e), _t(s, r, i);
|
|
1802
1811
|
});
|
|
1803
1812
|
});
|
|
1804
1813
|
}
|
|
1805
|
-
function
|
|
1814
|
+
function Wr(n, t) {
|
|
1806
1815
|
if (n === t)
|
|
1807
1816
|
return !0;
|
|
1808
1817
|
const e = n.getUnits() === t.getUnits();
|
|
1809
|
-
return (n.getCode() === t.getCode() ||
|
|
1818
|
+
return (n.getCode() === t.getCode() || Vi(n, t) === Pe) && e;
|
|
1810
1819
|
}
|
|
1811
|
-
function
|
|
1820
|
+
function Vi(n, t) {
|
|
1812
1821
|
const e = n.getCode(), i = t.getCode();
|
|
1813
|
-
let r =
|
|
1822
|
+
let r = ie(e, i);
|
|
1814
1823
|
if (r)
|
|
1815
1824
|
return r;
|
|
1816
1825
|
let s = null, o = null;
|
|
1817
|
-
for (const l of
|
|
1826
|
+
for (const l of Br)
|
|
1818
1827
|
s || (s = l(n)), o || (o = l(t));
|
|
1819
1828
|
if (!s && !o)
|
|
1820
1829
|
return null;
|
|
1821
1830
|
const a = "EPSG:4326";
|
|
1822
1831
|
if (o)
|
|
1823
1832
|
if (s)
|
|
1824
|
-
r =
|
|
1833
|
+
r = ne(
|
|
1825
1834
|
s.inverse,
|
|
1826
1835
|
o.forward
|
|
1827
1836
|
);
|
|
1828
1837
|
else {
|
|
1829
|
-
const l =
|
|
1830
|
-
l && (r =
|
|
1838
|
+
const l = ie(e, a);
|
|
1839
|
+
l && (r = ne(
|
|
1831
1840
|
l,
|
|
1832
1841
|
o.forward
|
|
1833
1842
|
));
|
|
1834
1843
|
}
|
|
1835
1844
|
else {
|
|
1836
|
-
const l =
|
|
1837
|
-
l && (r =
|
|
1845
|
+
const l = ie(a, i);
|
|
1846
|
+
l && (r = ne(
|
|
1838
1847
|
s.inverse,
|
|
1839
1848
|
l
|
|
1840
1849
|
));
|
|
1841
1850
|
}
|
|
1842
|
-
return r && (
|
|
1851
|
+
return r && (le(n), le(t), _t(n, t, r)), r;
|
|
1843
1852
|
}
|
|
1844
|
-
function
|
|
1853
|
+
function ne(n, t) {
|
|
1845
1854
|
return function(e, i, r, s) {
|
|
1846
1855
|
return i = n(e, i, r, s), t(i, i, r, s);
|
|
1847
1856
|
};
|
|
1848
1857
|
}
|
|
1849
|
-
function
|
|
1858
|
+
function he(n, t) {
|
|
1850
1859
|
const e = x(n), i = x(t);
|
|
1851
|
-
return
|
|
1852
|
-
}
|
|
1853
|
-
function
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1860
|
+
return Vi(e, i);
|
|
1861
|
+
}
|
|
1862
|
+
function qr() {
|
|
1863
|
+
gi(oi), gi(li), Jr(
|
|
1864
|
+
li,
|
|
1865
|
+
oi,
|
|
1866
|
+
xr,
|
|
1867
|
+
Pr
|
|
1859
1868
|
);
|
|
1860
1869
|
}
|
|
1861
|
-
|
|
1870
|
+
qr();
|
|
1862
1871
|
new Array(6);
|
|
1863
|
-
function
|
|
1872
|
+
function zi() {
|
|
1864
1873
|
return [1, 0, 0, 1, 0, 0];
|
|
1865
1874
|
}
|
|
1866
|
-
function
|
|
1875
|
+
function Ji(n, t, e, i, r, s, o, a) {
|
|
1867
1876
|
const l = Math.sin(s), h = Math.cos(s);
|
|
1868
1877
|
return n[0] = i * h, n[1] = r * l, n[2] = -i * l, n[3] = r * h, n[4] = o * i * h - a * i * l + t, n[5] = o * r * l + a * r * h + e, n;
|
|
1869
1878
|
}
|
|
1870
|
-
function
|
|
1879
|
+
function Wi(n, t, e, i, r, s, o) {
|
|
1871
1880
|
s = s || [], o = o || 2;
|
|
1872
1881
|
let a = 0;
|
|
1873
1882
|
for (let l = t; l < e; l += i) {
|
|
@@ -1878,7 +1887,7 @@ function Ji(n, t, e, i, r, s, o) {
|
|
|
1878
1887
|
}
|
|
1879
1888
|
return s && s.length != a && (s.length = a), s;
|
|
1880
1889
|
}
|
|
1881
|
-
function
|
|
1890
|
+
function Zr(n, t, e, i, r, s, o) {
|
|
1882
1891
|
o = o || [];
|
|
1883
1892
|
const a = Math.cos(r), l = Math.sin(r), h = s[0], c = s[1];
|
|
1884
1893
|
let u = 0;
|
|
@@ -1890,7 +1899,7 @@ function Dr(n, t, e, i, r, s, o) {
|
|
|
1890
1899
|
}
|
|
1891
1900
|
return o && o.length != u && (o.length = u), o;
|
|
1892
1901
|
}
|
|
1893
|
-
function
|
|
1902
|
+
function Dr(n, t, e, i, r, s, o, a) {
|
|
1894
1903
|
a = a || [];
|
|
1895
1904
|
const l = o[0], h = o[1];
|
|
1896
1905
|
let c = 0;
|
|
@@ -1902,7 +1911,7 @@ function qr(n, t, e, i, r, s, o, a) {
|
|
|
1902
1911
|
}
|
|
1903
1912
|
return a && a.length != c && (a.length = c), a;
|
|
1904
1913
|
}
|
|
1905
|
-
function
|
|
1914
|
+
function Kr(n, t, e, i, r, s, o) {
|
|
1906
1915
|
o = o || [];
|
|
1907
1916
|
let a = 0;
|
|
1908
1917
|
for (let l = t; l < e; l += i) {
|
|
@@ -1912,10 +1921,10 @@ function Zr(n, t, e, i, r, s, o) {
|
|
|
1912
1921
|
}
|
|
1913
1922
|
return o && o.length != a && (o.length = a), o;
|
|
1914
1923
|
}
|
|
1915
|
-
const
|
|
1916
|
-
class
|
|
1924
|
+
const fi = zi(), Qr = [NaN, NaN];
|
|
1925
|
+
class qi extends Ti {
|
|
1917
1926
|
constructor() {
|
|
1918
|
-
super(), this.extent_ =
|
|
1927
|
+
super(), this.extent_ = _e(), this.extentRevision_ = -1, this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = 0, this.simplifyTransformedInternal = Gi(
|
|
1919
1928
|
(t, e, i) => {
|
|
1920
1929
|
if (!i)
|
|
1921
1930
|
return this.getSimplifiedGeometry(e);
|
|
@@ -1963,7 +1972,7 @@ class Wi extends Li {
|
|
|
1963
1972
|
* @return {boolean} Contains (x, y).
|
|
1964
1973
|
*/
|
|
1965
1974
|
containsXY(t, e) {
|
|
1966
|
-
return this.closestPointXY(t, e,
|
|
1975
|
+
return this.closestPointXY(t, e, Qr, Number.MIN_VALUE) === 0;
|
|
1967
1976
|
}
|
|
1968
1977
|
/**
|
|
1969
1978
|
* Return the closest point of the geometry to the passed point as
|
|
@@ -2004,9 +2013,9 @@ class Wi extends Li {
|
|
|
2004
2013
|
getExtent(t) {
|
|
2005
2014
|
if (this.extentRevision_ != this.getRevision()) {
|
|
2006
2015
|
const e = this.computeExtent(this.extent_);
|
|
2007
|
-
(isNaN(e[0]) || isNaN(e[1])) &&
|
|
2016
|
+
(isNaN(e[0]) || isNaN(e[1])) && ve(e), this.extentRevision_ = this.getRevision();
|
|
2008
2017
|
}
|
|
2009
|
-
return
|
|
2018
|
+
return _r(this.extent_, t);
|
|
2010
2019
|
}
|
|
2011
2020
|
/**
|
|
2012
2021
|
* Rotate the geometry around a given coordinate. This modifies the geometry
|
|
@@ -2112,9 +2121,9 @@ class Wi extends Li {
|
|
|
2112
2121
|
*/
|
|
2113
2122
|
transform(t, e) {
|
|
2114
2123
|
const i = x(t), r = i.getUnits() == "tile-pixels" ? function(s, o, a) {
|
|
2115
|
-
const l = i.getExtent(), h = i.getWorldExtent(), c =
|
|
2116
|
-
|
|
2117
|
-
|
|
2124
|
+
const l = i.getExtent(), h = i.getWorldExtent(), c = Ot(h) / Ot(l);
|
|
2125
|
+
Ji(
|
|
2126
|
+
fi,
|
|
2118
2127
|
h[0],
|
|
2119
2128
|
h[3],
|
|
2120
2129
|
c,
|
|
@@ -2123,20 +2132,20 @@ class Wi extends Li {
|
|
|
2123
2132
|
0,
|
|
2124
2133
|
0
|
|
2125
2134
|
);
|
|
2126
|
-
const u =
|
|
2135
|
+
const u = Wi(
|
|
2127
2136
|
s,
|
|
2128
2137
|
0,
|
|
2129
2138
|
s.length,
|
|
2130
2139
|
a,
|
|
2131
|
-
|
|
2140
|
+
fi,
|
|
2132
2141
|
o
|
|
2133
|
-
), d =
|
|
2142
|
+
), d = he(i, e);
|
|
2134
2143
|
return d ? d(u, u, a) : u;
|
|
2135
|
-
} :
|
|
2144
|
+
} : he(i, e);
|
|
2136
2145
|
return this.applyTransform(r), this;
|
|
2137
2146
|
}
|
|
2138
2147
|
}
|
|
2139
|
-
class
|
|
2148
|
+
class Z extends qi {
|
|
2140
2149
|
constructor() {
|
|
2141
2150
|
super(), this.layout = "XY", this.stride = 2, this.flatCoordinates;
|
|
2142
2151
|
}
|
|
@@ -2147,7 +2156,7 @@ class q extends Wi {
|
|
|
2147
2156
|
* @override
|
|
2148
2157
|
*/
|
|
2149
2158
|
computeExtent(t) {
|
|
2150
|
-
return
|
|
2159
|
+
return Ce(
|
|
2151
2160
|
this.flatCoordinates,
|
|
2152
2161
|
0,
|
|
2153
2162
|
this.flatCoordinates.length,
|
|
@@ -2225,7 +2234,7 @@ class q extends Wi {
|
|
|
2225
2234
|
* @param {Array<number>} flatCoordinates Flat coordinates.
|
|
2226
2235
|
*/
|
|
2227
2236
|
setFlatCoordinates(t, e) {
|
|
2228
|
-
this.stride =
|
|
2237
|
+
this.stride = pi(t), this.layout = t, this.flatCoordinates = e;
|
|
2229
2238
|
}
|
|
2230
2239
|
/**
|
|
2231
2240
|
* @abstract
|
|
@@ -2244,7 +2253,7 @@ class q extends Wi {
|
|
|
2244
2253
|
setLayout(t, e, i) {
|
|
2245
2254
|
let r;
|
|
2246
2255
|
if (t)
|
|
2247
|
-
r =
|
|
2256
|
+
r = pi(t);
|
|
2248
2257
|
else {
|
|
2249
2258
|
for (let s = 0; s < i; ++s) {
|
|
2250
2259
|
if (e.length === 0) {
|
|
@@ -2254,7 +2263,7 @@ class q extends Wi {
|
|
|
2254
2263
|
e = /** @type {Array<unknown>} */
|
|
2255
2264
|
e[0];
|
|
2256
2265
|
}
|
|
2257
|
-
r = e.length, t =
|
|
2266
|
+
r = e.length, t = D(r);
|
|
2258
2267
|
}
|
|
2259
2268
|
this.layout = t, this.stride = r;
|
|
2260
2269
|
}
|
|
@@ -2288,7 +2297,7 @@ class q extends Wi {
|
|
|
2288
2297
|
const i = this.getFlatCoordinates();
|
|
2289
2298
|
if (i) {
|
|
2290
2299
|
const r = this.getStride();
|
|
2291
|
-
|
|
2300
|
+
Zr(
|
|
2292
2301
|
i,
|
|
2293
2302
|
0,
|
|
2294
2303
|
i.length,
|
|
@@ -2310,11 +2319,11 @@ class q extends Wi {
|
|
|
2310
2319
|
* @override
|
|
2311
2320
|
*/
|
|
2312
2321
|
scale(t, e, i) {
|
|
2313
|
-
e === void 0 && (e = t), i || (i =
|
|
2322
|
+
e === void 0 && (e = t), i || (i = Bt(this.getExtent()));
|
|
2314
2323
|
const r = this.getFlatCoordinates();
|
|
2315
2324
|
if (r) {
|
|
2316
2325
|
const s = this.getStride();
|
|
2317
|
-
|
|
2326
|
+
Dr(
|
|
2318
2327
|
r,
|
|
2319
2328
|
0,
|
|
2320
2329
|
r.length,
|
|
@@ -2338,7 +2347,7 @@ class q extends Wi {
|
|
|
2338
2347
|
const i = this.getFlatCoordinates();
|
|
2339
2348
|
if (i) {
|
|
2340
2349
|
const r = this.getStride();
|
|
2341
|
-
|
|
2350
|
+
Kr(
|
|
2342
2351
|
i,
|
|
2343
2352
|
0,
|
|
2344
2353
|
i.length,
|
|
@@ -2350,22 +2359,22 @@ class q extends Wi {
|
|
|
2350
2359
|
}
|
|
2351
2360
|
}
|
|
2352
2361
|
}
|
|
2353
|
-
function
|
|
2362
|
+
function D(n) {
|
|
2354
2363
|
let t;
|
|
2355
2364
|
return n == 2 ? t = "XY" : n == 3 ? t = "XYZ" : n == 4 && (t = "XYZM"), /** @type {import("./Geometry.js").GeometryLayout} */
|
|
2356
2365
|
t;
|
|
2357
2366
|
}
|
|
2358
|
-
function
|
|
2367
|
+
function pi(n) {
|
|
2359
2368
|
let t;
|
|
2360
2369
|
return n == "XY" ? t = 2 : n == "XYZ" || n == "XYM" ? t = 3 : n == "XYZM" && (t = 4), /** @type {number} */
|
|
2361
2370
|
t;
|
|
2362
2371
|
}
|
|
2363
|
-
function
|
|
2372
|
+
function ts(n, t, e, i) {
|
|
2364
2373
|
for (let r = 0, s = e.length; r < s; ++r)
|
|
2365
2374
|
n[t++] = e[r];
|
|
2366
2375
|
return t;
|
|
2367
2376
|
}
|
|
2368
|
-
function
|
|
2377
|
+
function Jt(n, t, e, i) {
|
|
2369
2378
|
for (let r = 0, s = e.length; r < s; ++r) {
|
|
2370
2379
|
const o = e[r];
|
|
2371
2380
|
for (let a = 0; a < i; ++a)
|
|
@@ -2377,7 +2386,7 @@ function $t(n, t, e, i, r) {
|
|
|
2377
2386
|
r = r || [];
|
|
2378
2387
|
let s = 0;
|
|
2379
2388
|
for (let o = 0, a = e.length; o < a; ++o) {
|
|
2380
|
-
const l =
|
|
2389
|
+
const l = Jt(
|
|
2381
2390
|
n,
|
|
2382
2391
|
t,
|
|
2383
2392
|
e[o],
|
|
@@ -2387,7 +2396,7 @@ function $t(n, t, e, i, r) {
|
|
|
2387
2396
|
}
|
|
2388
2397
|
return r.length = s, r;
|
|
2389
2398
|
}
|
|
2390
|
-
function
|
|
2399
|
+
function Zi(n, t, e, i, r) {
|
|
2391
2400
|
r = r || [];
|
|
2392
2401
|
let s = 0;
|
|
2393
2402
|
for (let o = 0, a = e.length; o < a; ++o) {
|
|
@@ -2402,12 +2411,12 @@ function Di(n, t, e, i, r) {
|
|
|
2402
2411
|
}
|
|
2403
2412
|
return r.length = s, r;
|
|
2404
2413
|
}
|
|
2405
|
-
function
|
|
2414
|
+
function Di(n, t, e, i) {
|
|
2406
2415
|
const r = [];
|
|
2407
|
-
let s =
|
|
2416
|
+
let s = _e();
|
|
2408
2417
|
for (let o = 0, a = e.length; o < a; ++o) {
|
|
2409
2418
|
const l = e[o];
|
|
2410
|
-
s =
|
|
2419
|
+
s = Ce(
|
|
2411
2420
|
n,
|
|
2412
2421
|
t,
|
|
2413
2422
|
l[0],
|
|
@@ -2416,15 +2425,15 @@ function qi(n, t, e, i) {
|
|
|
2416
2425
|
}
|
|
2417
2426
|
return r;
|
|
2418
2427
|
}
|
|
2419
|
-
function
|
|
2420
|
-
return !
|
|
2428
|
+
function es(n, t, e, i, r) {
|
|
2429
|
+
return !dr(
|
|
2421
2430
|
r,
|
|
2422
2431
|
/**
|
|
2423
2432
|
* @param {import("../../coordinate.js").Coordinate} coordinate Coordinate.
|
|
2424
2433
|
* @return {boolean} Contains (x, y).
|
|
2425
2434
|
*/
|
|
2426
2435
|
function(o) {
|
|
2427
|
-
return !
|
|
2436
|
+
return !j(
|
|
2428
2437
|
n,
|
|
2429
2438
|
t,
|
|
2430
2439
|
e,
|
|
@@ -2435,7 +2444,7 @@ function ts(n, t, e, i, r) {
|
|
|
2435
2444
|
}
|
|
2436
2445
|
);
|
|
2437
2446
|
}
|
|
2438
|
-
function
|
|
2447
|
+
function j(n, t, e, i, r, s) {
|
|
2439
2448
|
let o = 0, a = n[e - i], l = n[e - i + 1];
|
|
2440
2449
|
for (; t < e; t += i) {
|
|
2441
2450
|
const h = n[t], c = n[t + 1];
|
|
@@ -2443,46 +2452,46 @@ function H(n, t, e, i, r, s) {
|
|
|
2443
2452
|
}
|
|
2444
2453
|
return o !== 0;
|
|
2445
2454
|
}
|
|
2446
|
-
function
|
|
2447
|
-
if (e.length === 0 || !
|
|
2455
|
+
function Me(n, t, e, i, r, s) {
|
|
2456
|
+
if (e.length === 0 || !j(n, t, e[0], i, r, s))
|
|
2448
2457
|
return !1;
|
|
2449
2458
|
for (let o = 1, a = e.length; o < a; ++o)
|
|
2450
|
-
if (
|
|
2459
|
+
if (j(n, e[o - 1], e[o], i, r, s))
|
|
2451
2460
|
return !1;
|
|
2452
2461
|
return !0;
|
|
2453
2462
|
}
|
|
2454
|
-
function
|
|
2463
|
+
function is(n, t, e, i, r, s) {
|
|
2455
2464
|
if (e.length === 0)
|
|
2456
2465
|
return !1;
|
|
2457
2466
|
for (let o = 0, a = e.length; o < a; ++o) {
|
|
2458
2467
|
const l = e[o];
|
|
2459
|
-
if (
|
|
2468
|
+
if (Me(n, t, l, i, r, s))
|
|
2460
2469
|
return !0;
|
|
2461
2470
|
t = l[l.length - 1];
|
|
2462
2471
|
}
|
|
2463
2472
|
return !1;
|
|
2464
2473
|
}
|
|
2465
|
-
function
|
|
2474
|
+
function Se(n, t, e, i, r, s, o) {
|
|
2466
2475
|
let a, l, h, c, u, d, g;
|
|
2467
2476
|
const f = r[s + 1], p = [];
|
|
2468
|
-
for (let v = 0,
|
|
2477
|
+
for (let v = 0, S = e.length; v < S; ++v) {
|
|
2469
2478
|
const E = e[v];
|
|
2470
2479
|
for (c = n[E - i], d = n[E - i + 1], a = t; a < E; a += i)
|
|
2471
2480
|
u = n[a], g = n[a + 1], (f <= d && g <= f || d <= f && f <= g) && (h = (f - d) / (g - d) * (u - c) + c, p.push(h)), c = u, d = g;
|
|
2472
2481
|
}
|
|
2473
2482
|
let _ = NaN, b = -1 / 0;
|
|
2474
|
-
for (p.sort(
|
|
2483
|
+
for (p.sort(Fi), c = p[0], a = 1, l = p.length; a < l; ++a) {
|
|
2475
2484
|
u = p[a];
|
|
2476
2485
|
const v = Math.abs(u - c);
|
|
2477
|
-
v > b && (h = (c + u) / 2,
|
|
2486
|
+
v > b && (h = (c + u) / 2, Me(n, t, e, i, h, f) && (_ = h, b = v)), c = u;
|
|
2478
2487
|
}
|
|
2479
2488
|
return isNaN(_) && (_ = r[s]), o ? (o.push(_, f, b), o) : [_, f, b];
|
|
2480
2489
|
}
|
|
2481
|
-
function
|
|
2490
|
+
function Ki(n, t, e, i, r) {
|
|
2482
2491
|
let s = [];
|
|
2483
2492
|
for (let o = 0, a = e.length; o < a; ++o) {
|
|
2484
2493
|
const l = e[o];
|
|
2485
|
-
s =
|
|
2494
|
+
s = Se(
|
|
2486
2495
|
n,
|
|
2487
2496
|
t,
|
|
2488
2497
|
l,
|
|
@@ -2508,15 +2517,15 @@ function Ht(n, t, e, i, r, s, o) {
|
|
|
2508
2517
|
const b = n[_], v = n[_ + 1];
|
|
2509
2518
|
d += Math.sqrt((b - c) * (b - c) + (v - u) * (v - u)), g.push(d), c = b, u = v;
|
|
2510
2519
|
}
|
|
2511
|
-
const f = r * d, p =
|
|
2520
|
+
const f = r * d, p = ir(g, f);
|
|
2512
2521
|
p < 0 ? (l = (f - g[-p - 2]) / (g[-p - 1] - g[-p - 2]), a = t + (-p - 2) * i) : a = t + p * i;
|
|
2513
2522
|
}
|
|
2514
2523
|
o = o > 1 ? o : 2, s = s || new Array(o);
|
|
2515
2524
|
for (let c = 0; c < o; ++c)
|
|
2516
|
-
s[c] = a === void 0 ? NaN : l === void 0 ? n[a + c] :
|
|
2525
|
+
s[c] = a === void 0 ? NaN : l === void 0 ? n[a + c] : we(n[a + c], n[a + i + c], l);
|
|
2517
2526
|
return s;
|
|
2518
2527
|
}
|
|
2519
|
-
function
|
|
2528
|
+
function ce(n, t, e, i, r, s) {
|
|
2520
2529
|
if (e == t)
|
|
2521
2530
|
return null;
|
|
2522
2531
|
let o;
|
|
@@ -2538,7 +2547,7 @@ function he(n, t, e, i, r, s) {
|
|
|
2538
2547
|
o = [];
|
|
2539
2548
|
for (let d = 0; d < i - 1; ++d)
|
|
2540
2549
|
o.push(
|
|
2541
|
-
|
|
2550
|
+
we(
|
|
2542
2551
|
n[(a - 1) * i + d],
|
|
2543
2552
|
n[a * i + d],
|
|
2544
2553
|
u
|
|
@@ -2546,9 +2555,9 @@ function he(n, t, e, i, r, s) {
|
|
|
2546
2555
|
);
|
|
2547
2556
|
return o.push(r), o;
|
|
2548
2557
|
}
|
|
2549
|
-
function
|
|
2558
|
+
function ns(n, t, e, i, r, s, o) {
|
|
2550
2559
|
if (o)
|
|
2551
|
-
return
|
|
2560
|
+
return ce(
|
|
2552
2561
|
n,
|
|
2553
2562
|
t,
|
|
2554
2563
|
e[e.length - 1],
|
|
@@ -2567,7 +2576,7 @@ function is(n, t, e, i, r, s, o) {
|
|
|
2567
2576
|
if (r < n[t + i - 1])
|
|
2568
2577
|
return null;
|
|
2569
2578
|
if (r <= n[c - 1])
|
|
2570
|
-
return
|
|
2579
|
+
return ce(
|
|
2571
2580
|
n,
|
|
2572
2581
|
t,
|
|
2573
2582
|
c,
|
|
@@ -2580,7 +2589,7 @@ function is(n, t, e, i, r, s, o) {
|
|
|
2580
2589
|
}
|
|
2581
2590
|
return null;
|
|
2582
2591
|
}
|
|
2583
|
-
function
|
|
2592
|
+
function rs(n, t, e, i) {
|
|
2584
2593
|
for (; t < e - i; ) {
|
|
2585
2594
|
for (let r = 0; r < i; ++r) {
|
|
2586
2595
|
const s = n[t + r];
|
|
@@ -2597,7 +2606,7 @@ function $e(n, t, e, i) {
|
|
|
2597
2606
|
}
|
|
2598
2607
|
return r === 0 ? void 0 : r > 0;
|
|
2599
2608
|
}
|
|
2600
|
-
function
|
|
2609
|
+
function Ae(n, t, e, i, r) {
|
|
2601
2610
|
r = r !== void 0 ? r : !1;
|
|
2602
2611
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
2603
2612
|
const a = e[s], l = $e(
|
|
@@ -2615,10 +2624,10 @@ function Se(n, t, e, i, r) {
|
|
|
2615
2624
|
}
|
|
2616
2625
|
return !0;
|
|
2617
2626
|
}
|
|
2618
|
-
function
|
|
2627
|
+
function Qi(n, t, e, i, r) {
|
|
2619
2628
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
2620
2629
|
const a = e[s];
|
|
2621
|
-
if (!
|
|
2630
|
+
if (!Ae(n, t, a, i, r))
|
|
2622
2631
|
return !1;
|
|
2623
2632
|
a.length && (t = a[a.length - 1]);
|
|
2624
2633
|
}
|
|
@@ -2633,11 +2642,11 @@ function Ut(n, t, e, i, r) {
|
|
|
2633
2642
|
a,
|
|
2634
2643
|
i
|
|
2635
2644
|
);
|
|
2636
|
-
(s === 0 ? r && l || !r && !l : r && !l || !r && l) &&
|
|
2645
|
+
(s === 0 ? r && l || !r && !l : r && !l || !r && l) && rs(n, t, a, i), t = a;
|
|
2637
2646
|
}
|
|
2638
2647
|
return t;
|
|
2639
2648
|
}
|
|
2640
|
-
function
|
|
2649
|
+
function ue(n, t, e, i, r) {
|
|
2641
2650
|
for (let s = 0, o = e.length; s < o; ++s)
|
|
2642
2651
|
t = Ut(
|
|
2643
2652
|
n,
|
|
@@ -2648,7 +2657,7 @@ function ce(n, t, e, i, r) {
|
|
|
2648
2657
|
);
|
|
2649
2658
|
return t;
|
|
2650
2659
|
}
|
|
2651
|
-
function
|
|
2660
|
+
function ss(n, t) {
|
|
2652
2661
|
const e = [];
|
|
2653
2662
|
let i = 0, r = 0, s;
|
|
2654
2663
|
for (let o = 0, a = t.length; o < a; ++o) {
|
|
@@ -2664,7 +2673,7 @@ function rs(n, t) {
|
|
|
2664
2673
|
}
|
|
2665
2674
|
return e;
|
|
2666
2675
|
}
|
|
2667
|
-
function
|
|
2676
|
+
function Wt(n, t, e, i, r, s, o) {
|
|
2668
2677
|
const a = (e - t) / i;
|
|
2669
2678
|
if (a < 3) {
|
|
2670
2679
|
for (; t < e; t += i)
|
|
@@ -2680,8 +2689,8 @@ function Jt(n, t, e, i, r, s, o) {
|
|
|
2680
2689
|
let g = 0;
|
|
2681
2690
|
const f = n[d], p = n[d + 1], _ = n[u], b = n[u + 1];
|
|
2682
2691
|
for (let v = d + i; v < u; v += i) {
|
|
2683
|
-
const
|
|
2684
|
-
|
|
2692
|
+
const S = n[v], E = n[v + 1], L = Cr(S, E, f, p, _, b);
|
|
2693
|
+
L > g && (c = v, g = L);
|
|
2685
2694
|
}
|
|
2686
2695
|
g > r && (l[(c - t) / i] = 1, d + i < c && h.push(d, c), c + i < u && h.push(c, u));
|
|
2687
2696
|
}
|
|
@@ -2689,10 +2698,10 @@ function Jt(n, t, e, i, r, s, o) {
|
|
|
2689
2698
|
l[u] && (s[o++] = n[t + u * i], s[o++] = n[t + u * i + 1]);
|
|
2690
2699
|
return o;
|
|
2691
2700
|
}
|
|
2692
|
-
function
|
|
2701
|
+
function tn(n, t, e, i, r, s, o, a) {
|
|
2693
2702
|
for (let l = 0, h = e.length; l < h; ++l) {
|
|
2694
2703
|
const c = e[l];
|
|
2695
|
-
o =
|
|
2704
|
+
o = Wt(
|
|
2696
2705
|
n,
|
|
2697
2706
|
t,
|
|
2698
2707
|
c,
|
|
@@ -2707,7 +2716,7 @@ function Qi(n, t, e, i, r, s, o, a) {
|
|
|
2707
2716
|
function Q(n, t) {
|
|
2708
2717
|
return t * Math.round(n / t);
|
|
2709
2718
|
}
|
|
2710
|
-
function
|
|
2719
|
+
function os(n, t, e, i, r, s, o) {
|
|
2711
2720
|
if (t == e)
|
|
2712
2721
|
return o;
|
|
2713
2722
|
let a = Q(n[t], r), l = Q(n[t + 1], r);
|
|
@@ -2730,10 +2739,10 @@ function ss(n, t, e, i, r, s, o) {
|
|
|
2730
2739
|
}
|
|
2731
2740
|
return s[o++] = h, s[o++] = c, o;
|
|
2732
2741
|
}
|
|
2733
|
-
function
|
|
2742
|
+
function Fe(n, t, e, i, r, s, o, a) {
|
|
2734
2743
|
for (let l = 0, h = e.length; l < h; ++l) {
|
|
2735
2744
|
const c = e[l];
|
|
2736
|
-
o =
|
|
2745
|
+
o = os(
|
|
2737
2746
|
n,
|
|
2738
2747
|
t,
|
|
2739
2748
|
c,
|
|
@@ -2745,10 +2754,10 @@ function Ae(n, t, e, i, r, s, o, a) {
|
|
|
2745
2754
|
}
|
|
2746
2755
|
return o;
|
|
2747
2756
|
}
|
|
2748
|
-
function
|
|
2757
|
+
function as(n, t, e, i, r, s, o, a) {
|
|
2749
2758
|
for (let l = 0, h = e.length; l < h; ++l) {
|
|
2750
2759
|
const c = e[l], u = [];
|
|
2751
|
-
o =
|
|
2760
|
+
o = Fe(
|
|
2752
2761
|
n,
|
|
2753
2762
|
t,
|
|
2754
2763
|
c,
|
|
@@ -2761,7 +2770,7 @@ function os(n, t, e, i, r, s, o, a) {
|
|
|
2761
2770
|
}
|
|
2762
2771
|
return o;
|
|
2763
2772
|
}
|
|
2764
|
-
class B extends
|
|
2773
|
+
class B extends qi {
|
|
2765
2774
|
/**
|
|
2766
2775
|
* @param {Array<Geometry>} geometries Geometries.
|
|
2767
2776
|
*/
|
|
@@ -2772,7 +2781,7 @@ class B extends Wi {
|
|
|
2772
2781
|
* @private
|
|
2773
2782
|
*/
|
|
2774
2783
|
unlistenGeometriesChange_() {
|
|
2775
|
-
this.changeEventsKeys_.forEach(
|
|
2784
|
+
this.changeEventsKeys_.forEach(Nt), this.changeEventsKeys_.length = 0;
|
|
2776
2785
|
}
|
|
2777
2786
|
/**
|
|
2778
2787
|
* @private
|
|
@@ -2781,7 +2790,7 @@ class B extends Wi {
|
|
|
2781
2790
|
const t = this.geometries_;
|
|
2782
2791
|
for (let e = 0, i = t.length; e < i; ++e)
|
|
2783
2792
|
this.changeEventsKeys_.push(
|
|
2784
|
-
mt(t[e],
|
|
2793
|
+
mt(t[e], me.CHANGE, this.changed, this)
|
|
2785
2794
|
);
|
|
2786
2795
|
}
|
|
2787
2796
|
/**
|
|
@@ -2792,7 +2801,7 @@ class B extends Wi {
|
|
|
2792
2801
|
*/
|
|
2793
2802
|
clone() {
|
|
2794
2803
|
const t = new B(
|
|
2795
|
-
|
|
2804
|
+
re(this.geometries_)
|
|
2796
2805
|
);
|
|
2797
2806
|
return t.applyProperties(this), t;
|
|
2798
2807
|
}
|
|
@@ -2805,7 +2814,7 @@ class B extends Wi {
|
|
|
2805
2814
|
* @override
|
|
2806
2815
|
*/
|
|
2807
2816
|
closestPointXY(t, e, i, r) {
|
|
2808
|
-
if (r <
|
|
2817
|
+
if (r < q(this.getExtent(), t, e))
|
|
2809
2818
|
return r;
|
|
2810
2819
|
const s = this.geometries_;
|
|
2811
2820
|
for (let o = 0, a = s.length; o < a; ++o)
|
|
@@ -2837,10 +2846,10 @@ class B extends Wi {
|
|
|
2837
2846
|
* @override
|
|
2838
2847
|
*/
|
|
2839
2848
|
computeExtent(t) {
|
|
2840
|
-
|
|
2849
|
+
ve(t);
|
|
2841
2850
|
const e = this.geometries_;
|
|
2842
2851
|
for (let i = 0, r = e.length; i < r; ++i)
|
|
2843
|
-
|
|
2852
|
+
cr(t, e[i].getExtent());
|
|
2844
2853
|
return t;
|
|
2845
2854
|
}
|
|
2846
2855
|
/**
|
|
@@ -2849,7 +2858,7 @@ class B extends Wi {
|
|
|
2849
2858
|
* @api
|
|
2850
2859
|
*/
|
|
2851
2860
|
getGeometries() {
|
|
2852
|
-
return
|
|
2861
|
+
return re(this.geometries_);
|
|
2853
2862
|
}
|
|
2854
2863
|
/**
|
|
2855
2864
|
* @return {Array<Geometry>} Geometries.
|
|
@@ -2944,7 +2953,7 @@ class B extends Wi {
|
|
|
2944
2953
|
* @override
|
|
2945
2954
|
*/
|
|
2946
2955
|
scale(t, e, i) {
|
|
2947
|
-
i || (i =
|
|
2956
|
+
i || (i = Bt(this.getExtent()));
|
|
2948
2957
|
const r = this.geometries_;
|
|
2949
2958
|
for (let s = 0, o = r.length; s < o; ++s)
|
|
2950
2959
|
r[s].scale(t, e, i);
|
|
@@ -2956,7 +2965,7 @@ class B extends Wi {
|
|
|
2956
2965
|
* @api
|
|
2957
2966
|
*/
|
|
2958
2967
|
setGeometries(t) {
|
|
2959
|
-
this.setGeometriesArray(
|
|
2968
|
+
this.setGeometriesArray(re(t));
|
|
2960
2969
|
}
|
|
2961
2970
|
/**
|
|
2962
2971
|
* @param {Array<Geometry>} geometries Geometries.
|
|
@@ -3002,10 +3011,10 @@ class B extends Wi {
|
|
|
3002
3011
|
this.unlistenGeometriesChange_(), super.disposeInternal();
|
|
3003
3012
|
}
|
|
3004
3013
|
}
|
|
3005
|
-
function
|
|
3014
|
+
function re(n) {
|
|
3006
3015
|
return n.map((t) => t.clone());
|
|
3007
3016
|
}
|
|
3008
|
-
function
|
|
3017
|
+
function en(n, t, e, i) {
|
|
3009
3018
|
let r = 0;
|
|
3010
3019
|
const s = n[e - i], o = n[e - i + 1];
|
|
3011
3020
|
let a = 0, l = 0;
|
|
@@ -3015,23 +3024,23 @@ function tn(n, t, e, i) {
|
|
|
3015
3024
|
}
|
|
3016
3025
|
return r / 2;
|
|
3017
3026
|
}
|
|
3018
|
-
function
|
|
3027
|
+
function nn(n, t, e, i) {
|
|
3019
3028
|
let r = 0;
|
|
3020
3029
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
3021
3030
|
const a = e[s];
|
|
3022
|
-
r +=
|
|
3031
|
+
r += en(n, t, a, i), t = a;
|
|
3023
3032
|
}
|
|
3024
3033
|
return r;
|
|
3025
3034
|
}
|
|
3026
|
-
function
|
|
3035
|
+
function ls(n, t, e, i) {
|
|
3027
3036
|
let r = 0;
|
|
3028
3037
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
3029
3038
|
const a = e[s];
|
|
3030
|
-
r +=
|
|
3039
|
+
r += nn(n, t, a, i), t = a[a.length - 1];
|
|
3031
3040
|
}
|
|
3032
3041
|
return r;
|
|
3033
3042
|
}
|
|
3034
|
-
function
|
|
3043
|
+
function yi(n, t, e, i, r, s, o) {
|
|
3035
3044
|
const a = n[t], l = n[t + 1], h = n[e] - a, c = n[e + 1] - l;
|
|
3036
3045
|
let u;
|
|
3037
3046
|
if (h === 0 && c === 0)
|
|
@@ -3042,7 +3051,7 @@ function pi(n, t, e, i, r, s, o) {
|
|
|
3042
3051
|
u = e;
|
|
3043
3052
|
else if (d > 0) {
|
|
3044
3053
|
for (let g = 0; g < i; ++g)
|
|
3045
|
-
o[g] =
|
|
3054
|
+
o[g] = we(
|
|
3046
3055
|
n[t + g],
|
|
3047
3056
|
n[e + g],
|
|
3048
3057
|
d
|
|
@@ -3056,7 +3065,7 @@ function pi(n, t, e, i, r, s, o) {
|
|
|
3056
3065
|
o[d] = n[u + d];
|
|
3057
3066
|
o.length = i;
|
|
3058
3067
|
}
|
|
3059
|
-
function
|
|
3068
|
+
function Ge(n, t, e, i, r) {
|
|
3060
3069
|
let s = n[t], o = n[t + 1];
|
|
3061
3070
|
for (t += i; t < e; t += i) {
|
|
3062
3071
|
const a = n[t], l = n[t + 1], h = X(s, o, a, l);
|
|
@@ -3064,21 +3073,21 @@ function Fe(n, t, e, i, r) {
|
|
|
3064
3073
|
}
|
|
3065
3074
|
return r;
|
|
3066
3075
|
}
|
|
3067
|
-
function
|
|
3076
|
+
function Ie(n, t, e, i, r) {
|
|
3068
3077
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
3069
3078
|
const a = e[s];
|
|
3070
|
-
r =
|
|
3079
|
+
r = Ge(n, t, a, i, r), t = a;
|
|
3071
3080
|
}
|
|
3072
3081
|
return r;
|
|
3073
3082
|
}
|
|
3074
|
-
function
|
|
3083
|
+
function hs(n, t, e, i, r) {
|
|
3075
3084
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
3076
3085
|
const a = e[s];
|
|
3077
|
-
r =
|
|
3086
|
+
r = Ie(n, t, a, i, r), t = a[a.length - 1];
|
|
3078
3087
|
}
|
|
3079
3088
|
return r;
|
|
3080
3089
|
}
|
|
3081
|
-
function
|
|
3090
|
+
function Le(n, t, e, i, r, s, o, a, l, h, c) {
|
|
3082
3091
|
if (t == e)
|
|
3083
3092
|
return h;
|
|
3084
3093
|
let u, d;
|
|
@@ -3098,7 +3107,7 @@ function Te(n, t, e, i, r, s, o, a, l, h, c) {
|
|
|
3098
3107
|
c = c || [NaN, NaN];
|
|
3099
3108
|
let g = t + i;
|
|
3100
3109
|
for (; g < e; )
|
|
3101
|
-
if (
|
|
3110
|
+
if (yi(
|
|
3102
3111
|
n,
|
|
3103
3112
|
g - i,
|
|
3104
3113
|
g,
|
|
@@ -3115,7 +3124,7 @@ function Te(n, t, e, i, r, s, o, a, l, h, c) {
|
|
|
3115
3124
|
(Math.sqrt(d) - Math.sqrt(h)) / r | 0,
|
|
3116
3125
|
1
|
|
3117
3126
|
);
|
|
3118
|
-
if (s && (
|
|
3127
|
+
if (s && (yi(
|
|
3119
3128
|
n,
|
|
3120
3129
|
e - i,
|
|
3121
3130
|
t,
|
|
@@ -3130,11 +3139,11 @@ function Te(n, t, e, i, r, s, o, a, l, h, c) {
|
|
|
3130
3139
|
}
|
|
3131
3140
|
return h;
|
|
3132
3141
|
}
|
|
3133
|
-
function
|
|
3142
|
+
function Re(n, t, e, i, r, s, o, a, l, h, c) {
|
|
3134
3143
|
c = c || [NaN, NaN];
|
|
3135
3144
|
for (let u = 0, d = e.length; u < d; ++u) {
|
|
3136
3145
|
const g = e[u];
|
|
3137
|
-
h =
|
|
3146
|
+
h = Le(
|
|
3138
3147
|
n,
|
|
3139
3148
|
t,
|
|
3140
3149
|
g,
|
|
@@ -3150,11 +3159,11 @@ function Ie(n, t, e, i, r, s, o, a, l, h, c) {
|
|
|
3150
3159
|
}
|
|
3151
3160
|
return h;
|
|
3152
3161
|
}
|
|
3153
|
-
function
|
|
3162
|
+
function cs(n, t, e, i, r, s, o, a, l, h, c) {
|
|
3154
3163
|
c = c || [NaN, NaN];
|
|
3155
3164
|
for (let u = 0, d = e.length; u < d; ++u) {
|
|
3156
3165
|
const g = e[u];
|
|
3157
|
-
h =
|
|
3166
|
+
h = Re(
|
|
3158
3167
|
n,
|
|
3159
3168
|
t,
|
|
3160
3169
|
g,
|
|
@@ -3170,19 +3179,19 @@ function hs(n, t, e, i, r, s, o, a, l, h, c) {
|
|
|
3170
3179
|
}
|
|
3171
3180
|
return h;
|
|
3172
3181
|
}
|
|
3173
|
-
function
|
|
3182
|
+
function qt(n, t, e, i, r) {
|
|
3174
3183
|
r = r !== void 0 ? r : [];
|
|
3175
3184
|
let s = 0;
|
|
3176
3185
|
for (let o = t; o < e; o += i)
|
|
3177
3186
|
r[s++] = n.slice(o, o + i);
|
|
3178
3187
|
return r.length = s, r;
|
|
3179
3188
|
}
|
|
3180
|
-
function
|
|
3189
|
+
function Te(n, t, e, i, r) {
|
|
3181
3190
|
r = r !== void 0 ? r : [];
|
|
3182
3191
|
let s = 0;
|
|
3183
3192
|
for (let o = 0, a = e.length; o < a; ++o) {
|
|
3184
3193
|
const l = e[o];
|
|
3185
|
-
r[s++] =
|
|
3194
|
+
r[s++] = qt(
|
|
3186
3195
|
n,
|
|
3187
3196
|
t,
|
|
3188
3197
|
l,
|
|
@@ -3192,12 +3201,12 @@ function Le(n, t, e, i, r) {
|
|
|
3192
3201
|
}
|
|
3193
3202
|
return r.length = s, r;
|
|
3194
3203
|
}
|
|
3195
|
-
function
|
|
3204
|
+
function us(n, t, e, i, r) {
|
|
3196
3205
|
r = r !== void 0 ? r : [];
|
|
3197
3206
|
let s = 0;
|
|
3198
3207
|
for (let o = 0, a = e.length; o < a; ++o) {
|
|
3199
3208
|
const l = e[o];
|
|
3200
|
-
r[s++] = l.length === 1 && l[0] === t ? [] :
|
|
3209
|
+
r[s++] = l.length === 1 && l[0] === t ? [] : Te(
|
|
3201
3210
|
n,
|
|
3202
3211
|
t,
|
|
3203
3212
|
l,
|
|
@@ -3207,7 +3216,7 @@ function cs(n, t, e, i, r) {
|
|
|
3207
3216
|
}
|
|
3208
3217
|
return r.length = s, r;
|
|
3209
3218
|
}
|
|
3210
|
-
class vt extends
|
|
3219
|
+
class vt extends Z {
|
|
3211
3220
|
/**
|
|
3212
3221
|
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
|
|
3213
3222
|
* For internal use, flat coordinates in combination with `layout` are also accepted.
|
|
@@ -3242,15 +3251,15 @@ class vt extends q {
|
|
|
3242
3251
|
* @override
|
|
3243
3252
|
*/
|
|
3244
3253
|
closestPointXY(t, e, i, r) {
|
|
3245
|
-
return r <
|
|
3246
|
-
|
|
3254
|
+
return r < q(this.getExtent(), t, e) ? r : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
|
|
3255
|
+
Ge(
|
|
3247
3256
|
this.flatCoordinates,
|
|
3248
3257
|
0,
|
|
3249
3258
|
this.flatCoordinates.length,
|
|
3250
3259
|
this.stride,
|
|
3251
3260
|
0
|
|
3252
3261
|
)
|
|
3253
|
-
), this.maxDeltaRevision_ = this.getRevision()),
|
|
3262
|
+
), this.maxDeltaRevision_ = this.getRevision()), Le(
|
|
3254
3263
|
this.flatCoordinates,
|
|
3255
3264
|
0,
|
|
3256
3265
|
this.flatCoordinates.length,
|
|
@@ -3269,7 +3278,7 @@ class vt extends q {
|
|
|
3269
3278
|
* @api
|
|
3270
3279
|
*/
|
|
3271
3280
|
getArea() {
|
|
3272
|
-
return
|
|
3281
|
+
return en(
|
|
3273
3282
|
this.flatCoordinates,
|
|
3274
3283
|
0,
|
|
3275
3284
|
this.flatCoordinates.length,
|
|
@@ -3283,7 +3292,7 @@ class vt extends q {
|
|
|
3283
3292
|
* @override
|
|
3284
3293
|
*/
|
|
3285
3294
|
getCoordinates() {
|
|
3286
|
-
return
|
|
3295
|
+
return qt(
|
|
3287
3296
|
this.flatCoordinates,
|
|
3288
3297
|
0,
|
|
3289
3298
|
this.flatCoordinates.length,
|
|
@@ -3298,7 +3307,7 @@ class vt extends q {
|
|
|
3298
3307
|
*/
|
|
3299
3308
|
getSimplifiedGeometryInternal(t) {
|
|
3300
3309
|
const e = [];
|
|
3301
|
-
return e.length =
|
|
3310
|
+
return e.length = Wt(
|
|
3302
3311
|
this.flatCoordinates,
|
|
3303
3312
|
0,
|
|
3304
3313
|
this.flatCoordinates.length,
|
|
@@ -3335,7 +3344,7 @@ class vt extends q {
|
|
|
3335
3344
|
* @override
|
|
3336
3345
|
*/
|
|
3337
3346
|
setCoordinates(t, e) {
|
|
3338
|
-
this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length =
|
|
3347
|
+
this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = Jt(
|
|
3339
3348
|
this.flatCoordinates,
|
|
3340
3349
|
0,
|
|
3341
3350
|
t,
|
|
@@ -3343,7 +3352,7 @@ class vt extends q {
|
|
|
3343
3352
|
), this.changed();
|
|
3344
3353
|
}
|
|
3345
3354
|
}
|
|
3346
|
-
function
|
|
3355
|
+
function rn(n, t, e, i, r) {
|
|
3347
3356
|
let s;
|
|
3348
3357
|
for (t += i; t < e; t += i)
|
|
3349
3358
|
if (s = r(
|
|
@@ -3353,8 +3362,8 @@ function nn(n, t, e, i, r) {
|
|
|
3353
3362
|
return s;
|
|
3354
3363
|
return !1;
|
|
3355
3364
|
}
|
|
3356
|
-
function
|
|
3357
|
-
return s = s ??
|
|
3365
|
+
function Zt(n, t, e, i, r, s) {
|
|
3366
|
+
return s = s ?? ji(_e(), n, t, e, i), mr(r, s) ? s[0] >= r[0] && s[2] <= r[2] || s[1] >= r[1] && s[3] <= r[3] ? !0 : rn(
|
|
3358
3367
|
n,
|
|
3359
3368
|
t,
|
|
3360
3369
|
e,
|
|
@@ -3366,41 +3375,41 @@ function Dt(n, t, e, i, r, s) {
|
|
|
3366
3375
|
* `false` otherwise.
|
|
3367
3376
|
*/
|
|
3368
3377
|
function(o, a) {
|
|
3369
|
-
return
|
|
3378
|
+
return vr(r, o, a);
|
|
3370
3379
|
}
|
|
3371
3380
|
) : !1;
|
|
3372
3381
|
}
|
|
3373
|
-
function
|
|
3382
|
+
function ds(n, t, e, i, r) {
|
|
3374
3383
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
3375
|
-
if (
|
|
3384
|
+
if (Zt(n, t, e[s], i, r))
|
|
3376
3385
|
return !0;
|
|
3377
3386
|
t = e[s];
|
|
3378
3387
|
}
|
|
3379
3388
|
return !1;
|
|
3380
3389
|
}
|
|
3381
|
-
function
|
|
3382
|
-
return !!(
|
|
3390
|
+
function gs(n, t, e, i, r) {
|
|
3391
|
+
return !!(Zt(n, t, e, i, r) || j(
|
|
3383
3392
|
n,
|
|
3384
3393
|
t,
|
|
3385
3394
|
e,
|
|
3386
3395
|
i,
|
|
3387
3396
|
r[0],
|
|
3388
3397
|
r[1]
|
|
3389
|
-
) ||
|
|
3398
|
+
) || j(
|
|
3390
3399
|
n,
|
|
3391
3400
|
t,
|
|
3392
3401
|
e,
|
|
3393
3402
|
i,
|
|
3394
3403
|
r[0],
|
|
3395
3404
|
r[3]
|
|
3396
|
-
) ||
|
|
3405
|
+
) || j(
|
|
3397
3406
|
n,
|
|
3398
3407
|
t,
|
|
3399
3408
|
e,
|
|
3400
3409
|
i,
|
|
3401
3410
|
r[2],
|
|
3402
3411
|
r[1]
|
|
3403
|
-
) ||
|
|
3412
|
+
) || j(
|
|
3404
3413
|
n,
|
|
3405
3414
|
t,
|
|
3406
3415
|
e,
|
|
@@ -3409,19 +3418,19 @@ function ds(n, t, e, i, r) {
|
|
|
3409
3418
|
r[3]
|
|
3410
3419
|
));
|
|
3411
3420
|
}
|
|
3412
|
-
function
|
|
3413
|
-
if (!
|
|
3421
|
+
function sn(n, t, e, i, r) {
|
|
3422
|
+
if (!gs(n, t, e[0], i, r))
|
|
3414
3423
|
return !1;
|
|
3415
3424
|
if (e.length === 1)
|
|
3416
3425
|
return !0;
|
|
3417
3426
|
for (let s = 1, o = e.length; s < o; ++s)
|
|
3418
|
-
if (
|
|
3427
|
+
if (es(
|
|
3419
3428
|
n,
|
|
3420
3429
|
e[s - 1],
|
|
3421
3430
|
e[s],
|
|
3422
3431
|
i,
|
|
3423
3432
|
r
|
|
3424
|
-
) && !
|
|
3433
|
+
) && !Zt(
|
|
3425
3434
|
n,
|
|
3426
3435
|
e[s - 1],
|
|
3427
3436
|
e[s],
|
|
@@ -3431,16 +3440,16 @@ function rn(n, t, e, i, r) {
|
|
|
3431
3440
|
return !1;
|
|
3432
3441
|
return !0;
|
|
3433
3442
|
}
|
|
3434
|
-
function
|
|
3443
|
+
function fs(n, t, e, i, r) {
|
|
3435
3444
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
3436
3445
|
const a = e[s];
|
|
3437
|
-
if (
|
|
3446
|
+
if (sn(n, t, a, i, r))
|
|
3438
3447
|
return !0;
|
|
3439
3448
|
t = a[a.length - 1];
|
|
3440
3449
|
}
|
|
3441
3450
|
return !1;
|
|
3442
3451
|
}
|
|
3443
|
-
function
|
|
3452
|
+
function ps(n, t, e, i) {
|
|
3444
3453
|
let r = n[t], s = n[t + 1], o = 0;
|
|
3445
3454
|
for (let a = t + i; a < e; a += i) {
|
|
3446
3455
|
const l = n[a], h = n[a + 1];
|
|
@@ -3448,7 +3457,7 @@ function fs(n, t, e, i) {
|
|
|
3448
3457
|
}
|
|
3449
3458
|
return o;
|
|
3450
3459
|
}
|
|
3451
|
-
class V extends
|
|
3460
|
+
class V extends Z {
|
|
3452
3461
|
/**
|
|
3453
3462
|
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
|
|
3454
3463
|
* For internal use, flat coordinates in combination with `layout` are also accepted.
|
|
@@ -3471,7 +3480,7 @@ class V extends q {
|
|
|
3471
3480
|
* @api
|
|
3472
3481
|
*/
|
|
3473
3482
|
appendCoordinate(t) {
|
|
3474
|
-
|
|
3483
|
+
A(this.flatCoordinates, t), this.changed();
|
|
3475
3484
|
}
|
|
3476
3485
|
/**
|
|
3477
3486
|
* Make a complete copy of the geometry.
|
|
@@ -3495,15 +3504,15 @@ class V extends q {
|
|
|
3495
3504
|
* @override
|
|
3496
3505
|
*/
|
|
3497
3506
|
closestPointXY(t, e, i, r) {
|
|
3498
|
-
return r <
|
|
3499
|
-
|
|
3507
|
+
return r < q(this.getExtent(), t, e) ? r : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
|
|
3508
|
+
Ge(
|
|
3500
3509
|
this.flatCoordinates,
|
|
3501
3510
|
0,
|
|
3502
3511
|
this.flatCoordinates.length,
|
|
3503
3512
|
this.stride,
|
|
3504
3513
|
0
|
|
3505
3514
|
)
|
|
3506
|
-
), this.maxDeltaRevision_ = this.getRevision()),
|
|
3515
|
+
), this.maxDeltaRevision_ = this.getRevision()), Le(
|
|
3507
3516
|
this.flatCoordinates,
|
|
3508
3517
|
0,
|
|
3509
3518
|
this.flatCoordinates.length,
|
|
@@ -3528,7 +3537,7 @@ class V extends q {
|
|
|
3528
3537
|
* @api
|
|
3529
3538
|
*/
|
|
3530
3539
|
forEachSegment(t) {
|
|
3531
|
-
return
|
|
3540
|
+
return rn(
|
|
3532
3541
|
this.flatCoordinates,
|
|
3533
3542
|
0,
|
|
3534
3543
|
this.flatCoordinates.length,
|
|
@@ -3551,7 +3560,7 @@ class V extends q {
|
|
|
3551
3560
|
* @api
|
|
3552
3561
|
*/
|
|
3553
3562
|
getCoordinateAtM(t, e) {
|
|
3554
|
-
return this.layout != "XYM" && this.layout != "XYZM" ? null : (e = e !== void 0 ? e : !1,
|
|
3563
|
+
return this.layout != "XYM" && this.layout != "XYZM" ? null : (e = e !== void 0 ? e : !1, ce(
|
|
3555
3564
|
this.flatCoordinates,
|
|
3556
3565
|
0,
|
|
3557
3566
|
this.flatCoordinates.length,
|
|
@@ -3567,7 +3576,7 @@ class V extends q {
|
|
|
3567
3576
|
* @override
|
|
3568
3577
|
*/
|
|
3569
3578
|
getCoordinates() {
|
|
3570
|
-
return
|
|
3579
|
+
return qt(
|
|
3571
3580
|
this.flatCoordinates,
|
|
3572
3581
|
0,
|
|
3573
3582
|
this.flatCoordinates.length,
|
|
@@ -3601,7 +3610,7 @@ class V extends q {
|
|
|
3601
3610
|
* @api
|
|
3602
3611
|
*/
|
|
3603
3612
|
getLength() {
|
|
3604
|
-
return
|
|
3613
|
+
return ps(
|
|
3605
3614
|
this.flatCoordinates,
|
|
3606
3615
|
0,
|
|
3607
3616
|
this.flatCoordinates.length,
|
|
@@ -3626,7 +3635,7 @@ class V extends q {
|
|
|
3626
3635
|
*/
|
|
3627
3636
|
getSimplifiedGeometryInternal(t) {
|
|
3628
3637
|
const e = [];
|
|
3629
|
-
return e.length =
|
|
3638
|
+
return e.length = Wt(
|
|
3630
3639
|
this.flatCoordinates,
|
|
3631
3640
|
0,
|
|
3632
3641
|
this.flatCoordinates.length,
|
|
@@ -3653,7 +3662,7 @@ class V extends q {
|
|
|
3653
3662
|
* @override
|
|
3654
3663
|
*/
|
|
3655
3664
|
intersectsExtent(t) {
|
|
3656
|
-
return
|
|
3665
|
+
return Zt(
|
|
3657
3666
|
this.flatCoordinates,
|
|
3658
3667
|
0,
|
|
3659
3668
|
this.flatCoordinates.length,
|
|
@@ -3670,7 +3679,7 @@ class V extends q {
|
|
|
3670
3679
|
* @override
|
|
3671
3680
|
*/
|
|
3672
3681
|
setCoordinates(t, e) {
|
|
3673
|
-
this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length =
|
|
3682
|
+
this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = Jt(
|
|
3674
3683
|
this.flatCoordinates,
|
|
3675
3684
|
0,
|
|
3676
3685
|
t,
|
|
@@ -3678,7 +3687,7 @@ class V extends q {
|
|
|
3678
3687
|
), this.changed();
|
|
3679
3688
|
}
|
|
3680
3689
|
}
|
|
3681
|
-
class Ct extends
|
|
3690
|
+
class Ct extends Z {
|
|
3682
3691
|
/**
|
|
3683
3692
|
* @param {Array<Array<import("../coordinate.js").Coordinate>|LineString>|Array<number>} coordinates
|
|
3684
3693
|
* Coordinates or LineString geometries. (For internal use, flat coordinates in
|
|
@@ -3706,7 +3715,7 @@ class Ct extends q {
|
|
|
3706
3715
|
), s = [], o = [];
|
|
3707
3716
|
for (let l = 0, h = r.length; l < h; ++l) {
|
|
3708
3717
|
const c = r[l];
|
|
3709
|
-
|
|
3718
|
+
A(s, c.getFlatCoordinates()), o.push(s.length);
|
|
3710
3719
|
}
|
|
3711
3720
|
const a = r.length === 0 ? this.getLayout() : r[0].getLayout();
|
|
3712
3721
|
this.setFlatCoordinates(a, s), this.ends_ = o;
|
|
@@ -3718,7 +3727,7 @@ class Ct extends q {
|
|
|
3718
3727
|
* @api
|
|
3719
3728
|
*/
|
|
3720
3729
|
appendLineString(t) {
|
|
3721
|
-
|
|
3730
|
+
A(this.flatCoordinates, t.getFlatCoordinates().slice()), this.ends_.push(this.flatCoordinates.length), this.changed();
|
|
3722
3731
|
}
|
|
3723
3732
|
/**
|
|
3724
3733
|
* Make a complete copy of the geometry.
|
|
@@ -3743,15 +3752,15 @@ class Ct extends q {
|
|
|
3743
3752
|
* @override
|
|
3744
3753
|
*/
|
|
3745
3754
|
closestPointXY(t, e, i, r) {
|
|
3746
|
-
return r <
|
|
3747
|
-
|
|
3755
|
+
return r < q(this.getExtent(), t, e) ? r : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
|
|
3756
|
+
Ie(
|
|
3748
3757
|
this.flatCoordinates,
|
|
3749
3758
|
0,
|
|
3750
3759
|
this.ends_,
|
|
3751
3760
|
this.stride,
|
|
3752
3761
|
0
|
|
3753
3762
|
)
|
|
3754
|
-
), this.maxDeltaRevision_ = this.getRevision()),
|
|
3763
|
+
), this.maxDeltaRevision_ = this.getRevision()), Re(
|
|
3755
3764
|
this.flatCoordinates,
|
|
3756
3765
|
0,
|
|
3757
3766
|
this.ends_,
|
|
@@ -3787,7 +3796,7 @@ class Ct extends q {
|
|
|
3787
3796
|
* @api
|
|
3788
3797
|
*/
|
|
3789
3798
|
getCoordinateAtM(t, e, i) {
|
|
3790
|
-
return this.layout != "XYM" && this.layout != "XYZM" || this.flatCoordinates.length === 0 ? null : (e = e !== void 0 ? e : !1, i = i !== void 0 ? i : !1,
|
|
3799
|
+
return this.layout != "XYM" && this.layout != "XYZM" || this.flatCoordinates.length === 0 ? null : (e = e !== void 0 ? e : !1, i = i !== void 0 ? i : !1, ns(
|
|
3791
3800
|
this.flatCoordinates,
|
|
3792
3801
|
0,
|
|
3793
3802
|
this.ends_,
|
|
@@ -3804,7 +3813,7 @@ class Ct extends q {
|
|
|
3804
3813
|
* @override
|
|
3805
3814
|
*/
|
|
3806
3815
|
getCoordinates() {
|
|
3807
|
-
return
|
|
3816
|
+
return Te(
|
|
3808
3817
|
this.flatCoordinates,
|
|
3809
3818
|
0,
|
|
3810
3819
|
this.ends_,
|
|
@@ -3864,7 +3873,7 @@ class Ct extends q {
|
|
|
3864
3873
|
s,
|
|
3865
3874
|
0.5
|
|
3866
3875
|
);
|
|
3867
|
-
|
|
3876
|
+
A(t, h), i = l;
|
|
3868
3877
|
}
|
|
3869
3878
|
return t;
|
|
3870
3879
|
}
|
|
@@ -3876,7 +3885,7 @@ class Ct extends q {
|
|
|
3876
3885
|
*/
|
|
3877
3886
|
getSimplifiedGeometryInternal(t) {
|
|
3878
3887
|
const e = [], i = [];
|
|
3879
|
-
return e.length =
|
|
3888
|
+
return e.length = tn(
|
|
3880
3889
|
this.flatCoordinates,
|
|
3881
3890
|
0,
|
|
3882
3891
|
this.ends_,
|
|
@@ -3904,7 +3913,7 @@ class Ct extends q {
|
|
|
3904
3913
|
* @override
|
|
3905
3914
|
*/
|
|
3906
3915
|
intersectsExtent(t) {
|
|
3907
|
-
return
|
|
3916
|
+
return ds(
|
|
3908
3917
|
this.flatCoordinates,
|
|
3909
3918
|
0,
|
|
3910
3919
|
this.ends_,
|
|
@@ -3931,7 +3940,7 @@ class Ct extends q {
|
|
|
3931
3940
|
this.flatCoordinates.length = i.length === 0 ? 0 : i[i.length - 1], this.changed();
|
|
3932
3941
|
}
|
|
3933
3942
|
}
|
|
3934
|
-
class z extends
|
|
3943
|
+
class z extends Z {
|
|
3935
3944
|
/**
|
|
3936
3945
|
* @param {import("../coordinate.js").Coordinate} coordinates Coordinates.
|
|
3937
3946
|
* @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
|
|
@@ -3988,7 +3997,7 @@ class z extends q {
|
|
|
3988
3997
|
* @override
|
|
3989
3998
|
*/
|
|
3990
3999
|
computeExtent(t) {
|
|
3991
|
-
return
|
|
4000
|
+
return ki(this.flatCoordinates, t);
|
|
3992
4001
|
}
|
|
3993
4002
|
/**
|
|
3994
4003
|
* Get the type of this geometry.
|
|
@@ -4007,7 +4016,7 @@ class z extends q {
|
|
|
4007
4016
|
* @override
|
|
4008
4017
|
*/
|
|
4009
4018
|
intersectsExtent(t) {
|
|
4010
|
-
return
|
|
4019
|
+
return Ni(t, this.flatCoordinates[0], this.flatCoordinates[1]);
|
|
4011
4020
|
}
|
|
4012
4021
|
/**
|
|
4013
4022
|
* @param {!Array<*>} coordinates Coordinates.
|
|
@@ -4016,7 +4025,7 @@ class z extends q {
|
|
|
4016
4025
|
* @override
|
|
4017
4026
|
*/
|
|
4018
4027
|
setCoordinates(t, e) {
|
|
4019
|
-
this.setLayout(e, t, 0), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length =
|
|
4028
|
+
this.setLayout(e, t, 0), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = ts(
|
|
4020
4029
|
this.flatCoordinates,
|
|
4021
4030
|
0,
|
|
4022
4031
|
t,
|
|
@@ -4024,7 +4033,7 @@ class z extends q {
|
|
|
4024
4033
|
), this.changed();
|
|
4025
4034
|
}
|
|
4026
4035
|
}
|
|
4027
|
-
class
|
|
4036
|
+
class At extends Z {
|
|
4028
4037
|
/**
|
|
4029
4038
|
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
|
|
4030
4039
|
* For internal use, flat coordinates in combination with `layout` are also accepted.
|
|
@@ -4047,7 +4056,7 @@ class St extends q {
|
|
|
4047
4056
|
* @api
|
|
4048
4057
|
*/
|
|
4049
4058
|
appendPoint(t) {
|
|
4050
|
-
|
|
4059
|
+
A(this.flatCoordinates, t.getFlatCoordinates()), this.changed();
|
|
4051
4060
|
}
|
|
4052
4061
|
/**
|
|
4053
4062
|
* Make a complete copy of the geometry.
|
|
@@ -4056,7 +4065,7 @@ class St extends q {
|
|
|
4056
4065
|
* @override
|
|
4057
4066
|
*/
|
|
4058
4067
|
clone() {
|
|
4059
|
-
const t = new
|
|
4068
|
+
const t = new At(
|
|
4060
4069
|
this.flatCoordinates.slice(),
|
|
4061
4070
|
this.layout
|
|
4062
4071
|
);
|
|
@@ -4071,7 +4080,7 @@ class St extends q {
|
|
|
4071
4080
|
* @override
|
|
4072
4081
|
*/
|
|
4073
4082
|
closestPointXY(t, e, i, r) {
|
|
4074
|
-
if (r <
|
|
4083
|
+
if (r < q(this.getExtent(), t, e))
|
|
4075
4084
|
return r;
|
|
4076
4085
|
const s = this.flatCoordinates, o = this.stride;
|
|
4077
4086
|
for (let a = 0, l = s.length; a < l; a += o) {
|
|
@@ -4097,7 +4106,7 @@ class St extends q {
|
|
|
4097
4106
|
* @override
|
|
4098
4107
|
*/
|
|
4099
4108
|
getCoordinates() {
|
|
4100
|
-
return
|
|
4109
|
+
return qt(
|
|
4101
4110
|
this.flatCoordinates,
|
|
4102
4111
|
0,
|
|
4103
4112
|
this.flatCoordinates.length,
|
|
@@ -4153,7 +4162,7 @@ class St extends q {
|
|
|
4153
4162
|
const e = this.flatCoordinates, i = this.stride;
|
|
4154
4163
|
for (let r = 0, s = e.length; r < s; r += i) {
|
|
4155
4164
|
const o = e[r], a = e[r + 1];
|
|
4156
|
-
if (
|
|
4165
|
+
if (Ni(t, o, a))
|
|
4157
4166
|
return !0;
|
|
4158
4167
|
}
|
|
4159
4168
|
return !1;
|
|
@@ -4166,7 +4175,7 @@ class St extends q {
|
|
|
4166
4175
|
* @override
|
|
4167
4176
|
*/
|
|
4168
4177
|
setCoordinates(t, e) {
|
|
4169
|
-
this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length =
|
|
4178
|
+
this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = Jt(
|
|
4170
4179
|
this.flatCoordinates,
|
|
4171
4180
|
0,
|
|
4172
4181
|
t,
|
|
@@ -4174,7 +4183,7 @@ class St extends q {
|
|
|
4174
4183
|
), this.changed();
|
|
4175
4184
|
}
|
|
4176
4185
|
}
|
|
4177
|
-
class J extends
|
|
4186
|
+
class J extends Z {
|
|
4178
4187
|
/**
|
|
4179
4188
|
* @param {!Array<Array<import("../coordinate.js").Coordinate>>|!Array<number>} coordinates
|
|
4180
4189
|
* Array of linear rings that define the polygon. The first linear ring of the
|
|
@@ -4203,7 +4212,7 @@ class J extends q {
|
|
|
4203
4212
|
* @api
|
|
4204
4213
|
*/
|
|
4205
4214
|
appendLinearRing(t) {
|
|
4206
|
-
this.flatCoordinates ?
|
|
4215
|
+
this.flatCoordinates ? A(this.flatCoordinates, t.getFlatCoordinates()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.ends_.push(this.flatCoordinates.length), this.changed();
|
|
4207
4216
|
}
|
|
4208
4217
|
/**
|
|
4209
4218
|
* Make a complete copy of the geometry.
|
|
@@ -4228,15 +4237,15 @@ class J extends q {
|
|
|
4228
4237
|
* @override
|
|
4229
4238
|
*/
|
|
4230
4239
|
closestPointXY(t, e, i, r) {
|
|
4231
|
-
return r <
|
|
4232
|
-
|
|
4240
|
+
return r < q(this.getExtent(), t, e) ? r : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
|
|
4241
|
+
Ie(
|
|
4233
4242
|
this.flatCoordinates,
|
|
4234
4243
|
0,
|
|
4235
4244
|
this.ends_,
|
|
4236
4245
|
this.stride,
|
|
4237
4246
|
0
|
|
4238
4247
|
)
|
|
4239
|
-
), this.maxDeltaRevision_ = this.getRevision()),
|
|
4248
|
+
), this.maxDeltaRevision_ = this.getRevision()), Re(
|
|
4240
4249
|
this.flatCoordinates,
|
|
4241
4250
|
0,
|
|
4242
4251
|
this.ends_,
|
|
@@ -4256,7 +4265,7 @@ class J extends q {
|
|
|
4256
4265
|
* @override
|
|
4257
4266
|
*/
|
|
4258
4267
|
containsXY(t, e) {
|
|
4259
|
-
return
|
|
4268
|
+
return Me(
|
|
4260
4269
|
this.getOrientedFlatCoordinates(),
|
|
4261
4270
|
0,
|
|
4262
4271
|
this.ends_,
|
|
@@ -4271,7 +4280,7 @@ class J extends q {
|
|
|
4271
4280
|
* @api
|
|
4272
4281
|
*/
|
|
4273
4282
|
getArea() {
|
|
4274
|
-
return
|
|
4283
|
+
return nn(
|
|
4275
4284
|
this.getOrientedFlatCoordinates(),
|
|
4276
4285
|
0,
|
|
4277
4286
|
this.ends_,
|
|
@@ -4294,7 +4303,7 @@ class J extends q {
|
|
|
4294
4303
|
*/
|
|
4295
4304
|
getCoordinates(t) {
|
|
4296
4305
|
let e;
|
|
4297
|
-
return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(), Ut(e, 0, this.ends_, this.stride, t)) : e = this.flatCoordinates,
|
|
4306
|
+
return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(), Ut(e, 0, this.ends_, this.stride, t)) : e = this.flatCoordinates, Te(e, 0, this.ends_, this.stride);
|
|
4298
4307
|
}
|
|
4299
4308
|
/**
|
|
4300
4309
|
* @return {Array<number>} Ends.
|
|
@@ -4307,8 +4316,8 @@ class J extends q {
|
|
|
4307
4316
|
*/
|
|
4308
4317
|
getFlatInteriorPoint() {
|
|
4309
4318
|
if (this.flatInteriorPointRevision_ != this.getRevision()) {
|
|
4310
|
-
const t =
|
|
4311
|
-
this.flatInteriorPoint_ =
|
|
4319
|
+
const t = Bt(this.getExtent());
|
|
4320
|
+
this.flatInteriorPoint_ = Se(
|
|
4312
4321
|
this.getOrientedFlatCoordinates(),
|
|
4313
4322
|
0,
|
|
4314
4323
|
this.ends_,
|
|
@@ -4383,7 +4392,7 @@ class J extends q {
|
|
|
4383
4392
|
getOrientedFlatCoordinates() {
|
|
4384
4393
|
if (this.orientedRevision_ != this.getRevision()) {
|
|
4385
4394
|
const t = this.flatCoordinates;
|
|
4386
|
-
|
|
4395
|
+
Ae(t, 0, this.ends_, this.stride) ? this.orientedFlatCoordinates_ = t : (this.orientedFlatCoordinates_ = t.slice(), this.orientedFlatCoordinates_.length = Ut(
|
|
4387
4396
|
this.orientedFlatCoordinates_,
|
|
4388
4397
|
0,
|
|
4389
4398
|
this.ends_,
|
|
@@ -4403,7 +4412,7 @@ class J extends q {
|
|
|
4403
4412
|
*/
|
|
4404
4413
|
getSimplifiedGeometryInternal(t) {
|
|
4405
4414
|
const e = [], i = [];
|
|
4406
|
-
return e.length =
|
|
4415
|
+
return e.length = Fe(
|
|
4407
4416
|
this.flatCoordinates,
|
|
4408
4417
|
0,
|
|
4409
4418
|
this.ends_,
|
|
@@ -4431,7 +4440,7 @@ class J extends q {
|
|
|
4431
4440
|
* @override
|
|
4432
4441
|
*/
|
|
4433
4442
|
intersectsExtent(t) {
|
|
4434
|
-
return
|
|
4443
|
+
return sn(
|
|
4435
4444
|
this.getOrientedFlatCoordinates(),
|
|
4436
4445
|
0,
|
|
4437
4446
|
this.ends_,
|
|
@@ -4458,7 +4467,7 @@ class J extends q {
|
|
|
4458
4467
|
this.flatCoordinates.length = i.length === 0 ? 0 : i[i.length - 1], this.changed();
|
|
4459
4468
|
}
|
|
4460
4469
|
}
|
|
4461
|
-
class wt extends
|
|
4470
|
+
class wt extends Z {
|
|
4462
4471
|
/**
|
|
4463
4472
|
* @param {Array<Array<Array<import("../coordinate.js").Coordinate>>|Polygon>|Array<number>} coordinates Coordinates.
|
|
4464
4473
|
* For internal use, flat coordinates in combination with `layout` and `endss` are also accepted.
|
|
@@ -4475,7 +4484,7 @@ class wt extends q {
|
|
|
4475
4484
|
const h = r[a], c = s.length, u = h.getEnds();
|
|
4476
4485
|
for (let d = 0, g = u.length; d < g; ++d)
|
|
4477
4486
|
u[d] += c;
|
|
4478
|
-
|
|
4487
|
+
A(s, h.getFlatCoordinates()), o.push(u);
|
|
4479
4488
|
}
|
|
4480
4489
|
e = r.length === 0 ? this.getLayout() : r[0].getLayout(), t = s, i = o;
|
|
4481
4490
|
}
|
|
@@ -4500,7 +4509,7 @@ class wt extends q {
|
|
|
4500
4509
|
this.flatCoordinates = t.getFlatCoordinates().slice(), e = t.getEnds().slice(), this.endss_.push();
|
|
4501
4510
|
else {
|
|
4502
4511
|
const i = this.flatCoordinates.length;
|
|
4503
|
-
|
|
4512
|
+
A(this.flatCoordinates, t.getFlatCoordinates()), e = t.getEnds().slice();
|
|
4504
4513
|
for (let r = 0, s = e.length; r < s; ++r)
|
|
4505
4514
|
e[r] += i;
|
|
4506
4515
|
}
|
|
@@ -4532,15 +4541,15 @@ class wt extends q {
|
|
|
4532
4541
|
* @override
|
|
4533
4542
|
*/
|
|
4534
4543
|
closestPointXY(t, e, i, r) {
|
|
4535
|
-
return r <
|
|
4536
|
-
|
|
4544
|
+
return r < q(this.getExtent(), t, e) ? r : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
|
|
4545
|
+
hs(
|
|
4537
4546
|
this.flatCoordinates,
|
|
4538
4547
|
0,
|
|
4539
4548
|
this.endss_,
|
|
4540
4549
|
this.stride,
|
|
4541
4550
|
0
|
|
4542
4551
|
)
|
|
4543
|
-
), this.maxDeltaRevision_ = this.getRevision()),
|
|
4552
|
+
), this.maxDeltaRevision_ = this.getRevision()), cs(
|
|
4544
4553
|
this.getOrientedFlatCoordinates(),
|
|
4545
4554
|
0,
|
|
4546
4555
|
this.endss_,
|
|
@@ -4560,7 +4569,7 @@ class wt extends q {
|
|
|
4560
4569
|
* @override
|
|
4561
4570
|
*/
|
|
4562
4571
|
containsXY(t, e) {
|
|
4563
|
-
return
|
|
4572
|
+
return is(
|
|
4564
4573
|
this.getOrientedFlatCoordinates(),
|
|
4565
4574
|
0,
|
|
4566
4575
|
this.endss_,
|
|
@@ -4575,7 +4584,7 @@ class wt extends q {
|
|
|
4575
4584
|
* @api
|
|
4576
4585
|
*/
|
|
4577
4586
|
getArea() {
|
|
4578
|
-
return
|
|
4587
|
+
return ls(
|
|
4579
4588
|
this.getOrientedFlatCoordinates(),
|
|
4580
4589
|
0,
|
|
4581
4590
|
this.endss_,
|
|
@@ -4598,13 +4607,13 @@ class wt extends q {
|
|
|
4598
4607
|
*/
|
|
4599
4608
|
getCoordinates(t) {
|
|
4600
4609
|
let e;
|
|
4601
|
-
return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(),
|
|
4610
|
+
return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(), ue(
|
|
4602
4611
|
e,
|
|
4603
4612
|
0,
|
|
4604
4613
|
this.endss_,
|
|
4605
4614
|
this.stride,
|
|
4606
4615
|
t
|
|
4607
|
-
)) : e = this.flatCoordinates,
|
|
4616
|
+
)) : e = this.flatCoordinates, us(
|
|
4608
4617
|
e,
|
|
4609
4618
|
0,
|
|
4610
4619
|
this.endss_,
|
|
@@ -4622,13 +4631,13 @@ class wt extends q {
|
|
|
4622
4631
|
*/
|
|
4623
4632
|
getFlatInteriorPoints() {
|
|
4624
4633
|
if (this.flatInteriorPointsRevision_ != this.getRevision()) {
|
|
4625
|
-
const t =
|
|
4634
|
+
const t = Di(
|
|
4626
4635
|
this.flatCoordinates,
|
|
4627
4636
|
0,
|
|
4628
4637
|
this.endss_,
|
|
4629
4638
|
this.stride
|
|
4630
4639
|
);
|
|
4631
|
-
this.flatInteriorPoints_ =
|
|
4640
|
+
this.flatInteriorPoints_ = Ki(
|
|
4632
4641
|
this.getOrientedFlatCoordinates(),
|
|
4633
4642
|
0,
|
|
4634
4643
|
this.endss_,
|
|
@@ -4648,7 +4657,7 @@ class wt extends q {
|
|
|
4648
4657
|
* @api
|
|
4649
4658
|
*/
|
|
4650
4659
|
getInteriorPoints() {
|
|
4651
|
-
return new
|
|
4660
|
+
return new At(this.getFlatInteriorPoints().slice(), "XYM");
|
|
4652
4661
|
}
|
|
4653
4662
|
/**
|
|
4654
4663
|
* @return {Array<number>} Oriented flat coordinates.
|
|
@@ -4656,7 +4665,7 @@ class wt extends q {
|
|
|
4656
4665
|
getOrientedFlatCoordinates() {
|
|
4657
4666
|
if (this.orientedRevision_ != this.getRevision()) {
|
|
4658
4667
|
const t = this.flatCoordinates;
|
|
4659
|
-
|
|
4668
|
+
Qi(t, 0, this.endss_, this.stride) ? this.orientedFlatCoordinates_ = t : (this.orientedFlatCoordinates_ = t.slice(), this.orientedFlatCoordinates_.length = ue(
|
|
4660
4669
|
this.orientedFlatCoordinates_,
|
|
4661
4670
|
0,
|
|
4662
4671
|
this.endss_,
|
|
@@ -4676,7 +4685,7 @@ class wt extends q {
|
|
|
4676
4685
|
*/
|
|
4677
4686
|
getSimplifiedGeometryInternal(t) {
|
|
4678
4687
|
const e = [], i = [];
|
|
4679
|
-
return e.length =
|
|
4688
|
+
return e.length = as(
|
|
4680
4689
|
this.flatCoordinates,
|
|
4681
4690
|
0,
|
|
4682
4691
|
this.endss_,
|
|
@@ -4752,7 +4761,7 @@ class wt extends q {
|
|
|
4752
4761
|
* @override
|
|
4753
4762
|
*/
|
|
4754
4763
|
intersectsExtent(t) {
|
|
4755
|
-
return
|
|
4764
|
+
return fs(
|
|
4756
4765
|
this.getOrientedFlatCoordinates(),
|
|
4757
4766
|
0,
|
|
4758
4767
|
this.endss_,
|
|
@@ -4769,7 +4778,7 @@ class wt extends q {
|
|
|
4769
4778
|
*/
|
|
4770
4779
|
setCoordinates(t, e) {
|
|
4771
4780
|
this.setLayout(e, t, 3), this.flatCoordinates || (this.flatCoordinates = []);
|
|
4772
|
-
const i =
|
|
4781
|
+
const i = Zi(
|
|
4773
4782
|
this.flatCoordinates,
|
|
4774
4783
|
0,
|
|
4775
4784
|
t,
|
|
@@ -4785,7 +4794,7 @@ class wt extends q {
|
|
|
4785
4794
|
this.changed();
|
|
4786
4795
|
}
|
|
4787
4796
|
}
|
|
4788
|
-
const
|
|
4797
|
+
const mi = zi();
|
|
4789
4798
|
class W {
|
|
4790
4799
|
/**
|
|
4791
4800
|
* @param {Type} type Geometry type.
|
|
@@ -4814,7 +4823,7 @@ class W {
|
|
|
4814
4823
|
* @api
|
|
4815
4824
|
*/
|
|
4816
4825
|
getExtent() {
|
|
4817
|
-
return this.extent_ || (this.extent_ = this.type_ === "Point" ?
|
|
4826
|
+
return this.extent_ || (this.extent_ = this.type_ === "Point" ? ki(this.flatCoordinates_) : Ce(
|
|
4818
4827
|
this.flatCoordinates_,
|
|
4819
4828
|
0,
|
|
4820
4829
|
this.flatCoordinates_.length,
|
|
@@ -4826,8 +4835,8 @@ class W {
|
|
|
4826
4835
|
*/
|
|
4827
4836
|
getFlatInteriorPoint() {
|
|
4828
4837
|
if (!this.flatInteriorPoints_) {
|
|
4829
|
-
const t =
|
|
4830
|
-
this.flatInteriorPoints_ =
|
|
4838
|
+
const t = Bt(this.getExtent());
|
|
4839
|
+
this.flatInteriorPoints_ = Se(
|
|
4831
4840
|
this.flatCoordinates_,
|
|
4832
4841
|
0,
|
|
4833
4842
|
this.ends_,
|
|
@@ -4843,8 +4852,8 @@ class W {
|
|
|
4843
4852
|
*/
|
|
4844
4853
|
getFlatInteriorPoints() {
|
|
4845
4854
|
if (!this.flatInteriorPoints_) {
|
|
4846
|
-
const t =
|
|
4847
|
-
this.flatInteriorPoints_ =
|
|
4855
|
+
const t = ss(this.flatCoordinates_, this.ends_), e = Di(this.flatCoordinates_, 0, t, 2);
|
|
4856
|
+
this.flatInteriorPoints_ = Ki(
|
|
4848
4857
|
this.flatCoordinates_,
|
|
4849
4858
|
0,
|
|
4850
4859
|
t,
|
|
@@ -4880,7 +4889,7 @@ class W {
|
|
|
4880
4889
|
);
|
|
4881
4890
|
for (let r = 0, s = i.length; r < s; ++r) {
|
|
4882
4891
|
const o = i[r], a = Ht(t, e, o, 2, 0.5);
|
|
4883
|
-
|
|
4892
|
+
A(this.flatMidpoints_, a), e = o;
|
|
4884
4893
|
}
|
|
4885
4894
|
}
|
|
4886
4895
|
return this.flatMidpoints_;
|
|
@@ -4970,9 +4979,9 @@ class W {
|
|
|
4970
4979
|
t = x(t);
|
|
4971
4980
|
const e = t.getExtent(), i = t.getWorldExtent();
|
|
4972
4981
|
if (e && i) {
|
|
4973
|
-
const r =
|
|
4974
|
-
|
|
4975
|
-
|
|
4982
|
+
const r = Ot(i) / Ot(e);
|
|
4983
|
+
Ji(
|
|
4984
|
+
mi,
|
|
4976
4985
|
i[0],
|
|
4977
4986
|
i[3],
|
|
4978
4987
|
r,
|
|
@@ -4980,12 +4989,12 @@ class W {
|
|
|
4980
4989
|
0,
|
|
4981
4990
|
0,
|
|
4982
4991
|
0
|
|
4983
|
-
),
|
|
4992
|
+
), Wi(
|
|
4984
4993
|
this.flatCoordinates_,
|
|
4985
4994
|
0,
|
|
4986
4995
|
this.flatCoordinates_.length,
|
|
4987
4996
|
2,
|
|
4988
|
-
|
|
4997
|
+
mi,
|
|
4989
4998
|
this.flatCoordinates_
|
|
4990
4999
|
);
|
|
4991
5000
|
}
|
|
@@ -5025,7 +5034,7 @@ class W {
|
|
|
5025
5034
|
* @return {RenderFeature} This render feature.
|
|
5026
5035
|
*/
|
|
5027
5036
|
enableSimplifyTransformed() {
|
|
5028
|
-
return this.simplifyTransformed =
|
|
5037
|
+
return this.simplifyTransformed = Gi((t, e) => {
|
|
5029
5038
|
if (t === this.squaredTolerance_)
|
|
5030
5039
|
return this.simplifiedGeometry_;
|
|
5031
5040
|
this.simplifiedGeometry_ = this.clone(), e && this.simplifiedGeometry_.applyTransform(e);
|
|
@@ -5033,7 +5042,7 @@ class W {
|
|
|
5033
5042
|
let r;
|
|
5034
5043
|
switch (this.type_) {
|
|
5035
5044
|
case "LineString":
|
|
5036
|
-
i.length =
|
|
5045
|
+
i.length = Wt(
|
|
5037
5046
|
i,
|
|
5038
5047
|
0,
|
|
5039
5048
|
this.simplifiedGeometry_.flatCoordinates_.length,
|
|
@@ -5044,7 +5053,7 @@ class W {
|
|
|
5044
5053
|
), r = [i.length];
|
|
5045
5054
|
break;
|
|
5046
5055
|
case "MultiLineString":
|
|
5047
|
-
r = [], i.length =
|
|
5056
|
+
r = [], i.length = tn(
|
|
5048
5057
|
i,
|
|
5049
5058
|
0,
|
|
5050
5059
|
this.simplifiedGeometry_.ends_,
|
|
@@ -5056,7 +5065,7 @@ class W {
|
|
|
5056
5065
|
);
|
|
5057
5066
|
break;
|
|
5058
5067
|
case "Polygon":
|
|
5059
|
-
r = [], i.length =
|
|
5068
|
+
r = [], i.length = Fe(
|
|
5060
5069
|
i,
|
|
5061
5070
|
0,
|
|
5062
5071
|
this.simplifiedGeometry_.ends_,
|
|
@@ -5080,7 +5089,7 @@ class W {
|
|
|
5080
5089
|
}
|
|
5081
5090
|
}
|
|
5082
5091
|
W.prototype.getFlatCoordinates = W.prototype.getOrientedFlatCoordinates;
|
|
5083
|
-
class
|
|
5092
|
+
class on {
|
|
5084
5093
|
constructor() {
|
|
5085
5094
|
this.dataProjection = void 0, this.defaultFeatureProjection = void 0, this.featureClass = /** @type {FeatureToFeatureClass<FeatureType>} */
|
|
5086
5095
|
lt, this.supportedMediaTypes = null;
|
|
@@ -5208,11 +5217,11 @@ class sn {
|
|
|
5208
5217
|
function bt(n, t, e) {
|
|
5209
5218
|
const i = e ? x(e.featureProjection) : null, r = e ? x(e.dataProjection) : null;
|
|
5210
5219
|
let s = n;
|
|
5211
|
-
if (i && r && !
|
|
5220
|
+
if (i && r && !Wr(i, r)) {
|
|
5212
5221
|
t && (s = /** @type {T} */
|
|
5213
5222
|
n.clone());
|
|
5214
5223
|
const o = t ? i : r, a = t ? r : i;
|
|
5215
|
-
o.getUnits() === "tile-pixels" ? s.transform(o, a) : s.applyTransform(
|
|
5224
|
+
o.getUnits() === "tile-pixels" ? s.transform(o, a) : s.applyTransform(he(o, a));
|
|
5216
5225
|
}
|
|
5217
5226
|
if (t && e && /** @type {WriteOptions} */
|
|
5218
5227
|
e.decimals !== void 0) {
|
|
@@ -5230,24 +5239,24 @@ function bt(n, t, e) {
|
|
|
5230
5239
|
}
|
|
5231
5240
|
return s;
|
|
5232
5241
|
}
|
|
5233
|
-
const
|
|
5242
|
+
const ys = {
|
|
5234
5243
|
Point: z,
|
|
5235
5244
|
LineString: V,
|
|
5236
5245
|
Polygon: J,
|
|
5237
|
-
MultiPoint:
|
|
5246
|
+
MultiPoint: At,
|
|
5238
5247
|
MultiLineString: Ct,
|
|
5239
5248
|
MultiPolygon: wt
|
|
5240
5249
|
};
|
|
5241
|
-
function
|
|
5242
|
-
return Array.isArray(t[0]) ? (
|
|
5250
|
+
function ms(n, t, e) {
|
|
5251
|
+
return Array.isArray(t[0]) ? (Qi(n, 0, t, e) || (n = n.slice(), ue(n, 0, t, e)), n) : (Ae(n, 0, t, e) || (n = n.slice(), Ut(n, 0, t, e)), n);
|
|
5243
5252
|
}
|
|
5244
|
-
function
|
|
5253
|
+
function an(n, t) {
|
|
5245
5254
|
var s;
|
|
5246
5255
|
const e = n.geometry;
|
|
5247
5256
|
if (!e)
|
|
5248
5257
|
return [];
|
|
5249
5258
|
if (Array.isArray(e))
|
|
5250
|
-
return e.map((o) =>
|
|
5259
|
+
return e.map((o) => an({ ...n, geometry: o })).flat();
|
|
5251
5260
|
const i = e.type === "MultiPolygon" ? "Polygon" : e.type;
|
|
5252
5261
|
if (i === "GeometryCollection" || i === "Circle")
|
|
5253
5262
|
throw new Error("Unsupported geometry type: " + i);
|
|
@@ -5255,7 +5264,7 @@ function on(n, t) {
|
|
|
5255
5264
|
return bt(
|
|
5256
5265
|
new W(
|
|
5257
5266
|
i,
|
|
5258
|
-
i === "Polygon" ?
|
|
5267
|
+
i === "Polygon" ? ms(e.flatCoordinates, e.ends, r) : e.flatCoordinates,
|
|
5259
5268
|
(s = e.ends) == null ? void 0 : s.flat(),
|
|
5260
5269
|
r,
|
|
5261
5270
|
n.properties || {},
|
|
@@ -5265,23 +5274,23 @@ function on(n, t) {
|
|
|
5265
5274
|
t
|
|
5266
5275
|
);
|
|
5267
5276
|
}
|
|
5268
|
-
function
|
|
5277
|
+
function Ne(n, t) {
|
|
5269
5278
|
if (!n)
|
|
5270
5279
|
return null;
|
|
5271
5280
|
if (Array.isArray(n)) {
|
|
5272
5281
|
const i = n.map(
|
|
5273
|
-
(r) =>
|
|
5282
|
+
(r) => Ne(r, t)
|
|
5274
5283
|
);
|
|
5275
5284
|
return new B(i);
|
|
5276
5285
|
}
|
|
5277
|
-
const e =
|
|
5286
|
+
const e = ys[n.type];
|
|
5278
5287
|
return bt(
|
|
5279
5288
|
new e(n.flatCoordinates, n.layout || "XY", n.ends),
|
|
5280
5289
|
!1,
|
|
5281
5290
|
t
|
|
5282
5291
|
);
|
|
5283
5292
|
}
|
|
5284
|
-
class
|
|
5293
|
+
class _s extends on {
|
|
5285
5294
|
constructor() {
|
|
5286
5295
|
super();
|
|
5287
5296
|
}
|
|
@@ -5304,7 +5313,7 @@ class ms extends sn {
|
|
|
5304
5313
|
*/
|
|
5305
5314
|
readFeature(t, e) {
|
|
5306
5315
|
return this.readFeatureFromObject(
|
|
5307
|
-
|
|
5316
|
+
Gt(t),
|
|
5308
5317
|
this.getReadOptions(t, e)
|
|
5309
5318
|
);
|
|
5310
5319
|
}
|
|
@@ -5320,7 +5329,7 @@ class ms extends sn {
|
|
|
5320
5329
|
*/
|
|
5321
5330
|
readFeatures(t, e) {
|
|
5322
5331
|
return this.readFeaturesFromObject(
|
|
5323
|
-
|
|
5332
|
+
Gt(t),
|
|
5324
5333
|
this.getReadOptions(t, e)
|
|
5325
5334
|
);
|
|
5326
5335
|
}
|
|
@@ -5355,7 +5364,7 @@ class ms extends sn {
|
|
|
5355
5364
|
*/
|
|
5356
5365
|
readGeometry(t, e) {
|
|
5357
5366
|
return this.readGeometryFromObject(
|
|
5358
|
-
|
|
5367
|
+
Gt(t),
|
|
5359
5368
|
this.getReadOptions(t, e)
|
|
5360
5369
|
);
|
|
5361
5370
|
}
|
|
@@ -5378,7 +5387,7 @@ class ms extends sn {
|
|
|
5378
5387
|
* @override
|
|
5379
5388
|
*/
|
|
5380
5389
|
readProjection(t) {
|
|
5381
|
-
return this.readProjectionFromObject(
|
|
5390
|
+
return this.readProjectionFromObject(Gt(t));
|
|
5382
5391
|
}
|
|
5383
5392
|
/**
|
|
5384
5393
|
* @abstract
|
|
@@ -5453,14 +5462,14 @@ class ms extends sn {
|
|
|
5453
5462
|
return y();
|
|
5454
5463
|
}
|
|
5455
5464
|
}
|
|
5456
|
-
function
|
|
5465
|
+
function Gt(n) {
|
|
5457
5466
|
if (typeof n == "string") {
|
|
5458
5467
|
const t = JSON.parse(n);
|
|
5459
5468
|
return t || null;
|
|
5460
5469
|
}
|
|
5461
5470
|
return n !== null ? n : null;
|
|
5462
5471
|
}
|
|
5463
|
-
class
|
|
5472
|
+
class vs extends _s {
|
|
5464
5473
|
/**
|
|
5465
5474
|
* @param {Options<FeatureType>} [options] Options.
|
|
5466
5475
|
*/
|
|
@@ -5490,11 +5499,11 @@ class _s extends ms {
|
|
|
5490
5499
|
),
|
|
5491
5500
|
properties: null
|
|
5492
5501
|
};
|
|
5493
|
-
const r =
|
|
5502
|
+
const r = Oe(i.geometry);
|
|
5494
5503
|
if (this.featureClass === W)
|
|
5495
5504
|
return (
|
|
5496
5505
|
/** @type {FeatureType|Array<FeatureType>} */
|
|
5497
|
-
|
|
5506
|
+
an(
|
|
5498
5507
|
{
|
|
5499
5508
|
geometry: r,
|
|
5500
5509
|
id: i.id,
|
|
@@ -5504,7 +5513,7 @@ class _s extends ms {
|
|
|
5504
5513
|
)
|
|
5505
5514
|
);
|
|
5506
5515
|
const s = new lt();
|
|
5507
|
-
return this.geometryName_ ? s.setGeometryName(this.geometryName_) : this.extractGeometryName_ && i.geometry_name && s.setGeometryName(i.geometry_name), s.setGeometry(
|
|
5516
|
+
return this.geometryName_ ? s.setGeometryName(this.geometryName_) : this.extractGeometryName_ && i.geometry_name && s.setGeometryName(i.geometry_name), s.setGeometry(Ne(r, e)), "id" in i && s.setId(i.id), i.properties && s.setProperties(i.properties, !0), /** @type {FeatureType|Array<FeatureType>} */
|
|
5508
5517
|
s;
|
|
5509
5518
|
}
|
|
5510
5519
|
/**
|
|
@@ -5549,7 +5558,7 @@ class _s extends ms {
|
|
|
5549
5558
|
* @override
|
|
5550
5559
|
*/
|
|
5551
5560
|
readGeometryFromObject(t, e) {
|
|
5552
|
-
return
|
|
5561
|
+
return Cs(t, e);
|
|
5553
5562
|
}
|
|
5554
5563
|
/**
|
|
5555
5564
|
* @param {Object} object Object.
|
|
@@ -5593,7 +5602,7 @@ class _s extends ms {
|
|
|
5593
5602
|
if (r !== void 0 && (i.id = r), !t.hasProperties())
|
|
5594
5603
|
return i;
|
|
5595
5604
|
const s = t.getProperties(), o = t.getGeometry();
|
|
5596
|
-
return o && (i.geometry =
|
|
5605
|
+
return o && (i.geometry = de(o, e), delete s[t.getGeometryName()]), Li(s) || (i.properties = s), i;
|
|
5597
5606
|
}
|
|
5598
5607
|
/**
|
|
5599
5608
|
* Encode an array of features as a GeoJSON object.
|
|
@@ -5624,58 +5633,58 @@ class _s extends ms {
|
|
|
5624
5633
|
* @override
|
|
5625
5634
|
*/
|
|
5626
5635
|
writeGeometryObject(t, e) {
|
|
5627
|
-
return
|
|
5636
|
+
return de(t, this.adaptOptions(e));
|
|
5628
5637
|
}
|
|
5629
5638
|
}
|
|
5630
|
-
function
|
|
5639
|
+
function Oe(n, t) {
|
|
5631
5640
|
if (!n)
|
|
5632
5641
|
return null;
|
|
5633
5642
|
let e;
|
|
5634
5643
|
switch (n.type) {
|
|
5635
5644
|
case "Point": {
|
|
5636
|
-
e =
|
|
5645
|
+
e = bs(
|
|
5637
5646
|
/** @type {GeoJSONPoint} */
|
|
5638
5647
|
n
|
|
5639
5648
|
);
|
|
5640
5649
|
break;
|
|
5641
5650
|
}
|
|
5642
5651
|
case "LineString": {
|
|
5643
|
-
e =
|
|
5652
|
+
e = Es(
|
|
5644
5653
|
/** @type {GeoJSONLineString} */
|
|
5645
5654
|
n
|
|
5646
5655
|
);
|
|
5647
5656
|
break;
|
|
5648
5657
|
}
|
|
5649
5658
|
case "Polygon": {
|
|
5650
|
-
e =
|
|
5659
|
+
e = Ss(
|
|
5651
5660
|
/** @type {GeoJSONPolygon} */
|
|
5652
5661
|
n
|
|
5653
5662
|
);
|
|
5654
5663
|
break;
|
|
5655
5664
|
}
|
|
5656
5665
|
case "MultiPoint": {
|
|
5657
|
-
e =
|
|
5666
|
+
e = Ps(
|
|
5658
5667
|
/** @type {GeoJSONMultiPoint} */
|
|
5659
5668
|
n
|
|
5660
5669
|
);
|
|
5661
5670
|
break;
|
|
5662
5671
|
}
|
|
5663
5672
|
case "MultiLineString": {
|
|
5664
|
-
e =
|
|
5673
|
+
e = xs(
|
|
5665
5674
|
/** @type {GeoJSONMultiLineString} */
|
|
5666
5675
|
n
|
|
5667
5676
|
);
|
|
5668
5677
|
break;
|
|
5669
5678
|
}
|
|
5670
5679
|
case "MultiPolygon": {
|
|
5671
|
-
e =
|
|
5680
|
+
e = Ms(
|
|
5672
5681
|
/** @type {GeoJSONMultiPolygon} */
|
|
5673
5682
|
n
|
|
5674
5683
|
);
|
|
5675
5684
|
break;
|
|
5676
5685
|
}
|
|
5677
5686
|
case "GeometryCollection": {
|
|
5678
|
-
e =
|
|
5687
|
+
e = ws(
|
|
5679
5688
|
/** @type {GeoJSONGeometryCollection} */
|
|
5680
5689
|
n
|
|
5681
5690
|
);
|
|
@@ -5686,61 +5695,61 @@ function Ne(n, t) {
|
|
|
5686
5695
|
}
|
|
5687
5696
|
return e;
|
|
5688
5697
|
}
|
|
5689
|
-
function vs(n, t) {
|
|
5690
|
-
const e = Ne(n);
|
|
5691
|
-
return Re(e, t);
|
|
5692
|
-
}
|
|
5693
5698
|
function Cs(n, t) {
|
|
5699
|
+
const e = Oe(n);
|
|
5700
|
+
return Ne(e, t);
|
|
5701
|
+
}
|
|
5702
|
+
function ws(n, t) {
|
|
5694
5703
|
return n.geometries.map(
|
|
5695
5704
|
/**
|
|
5696
5705
|
* @param {GeoJSONGeometry} geometry Geometry.
|
|
5697
5706
|
* @return {import("./Feature.js").GeometryObject} geometry Geometry.
|
|
5698
5707
|
*/
|
|
5699
5708
|
function(i) {
|
|
5700
|
-
return
|
|
5709
|
+
return Oe(i);
|
|
5701
5710
|
}
|
|
5702
5711
|
);
|
|
5703
5712
|
}
|
|
5704
|
-
function
|
|
5713
|
+
function bs(n) {
|
|
5705
5714
|
const t = n.coordinates;
|
|
5706
5715
|
return {
|
|
5707
5716
|
type: "Point",
|
|
5708
5717
|
flatCoordinates: t,
|
|
5709
|
-
layout:
|
|
5718
|
+
layout: D(t.length)
|
|
5710
5719
|
};
|
|
5711
5720
|
}
|
|
5712
|
-
function
|
|
5721
|
+
function Es(n) {
|
|
5713
5722
|
var i;
|
|
5714
5723
|
const t = n.coordinates, e = t.flat();
|
|
5715
5724
|
return {
|
|
5716
5725
|
type: "LineString",
|
|
5717
5726
|
flatCoordinates: e,
|
|
5718
5727
|
ends: [e.length],
|
|
5719
|
-
layout:
|
|
5728
|
+
layout: D(((i = t[0]) == null ? void 0 : i.length) || 2)
|
|
5720
5729
|
};
|
|
5721
5730
|
}
|
|
5722
|
-
function
|
|
5731
|
+
function xs(n) {
|
|
5723
5732
|
var s, o;
|
|
5724
5733
|
const t = n.coordinates, e = ((o = (s = t[0]) == null ? void 0 : s[0]) == null ? void 0 : o.length) || 2, i = [], r = $t(i, 0, t, e);
|
|
5725
5734
|
return {
|
|
5726
5735
|
type: "MultiLineString",
|
|
5727
5736
|
flatCoordinates: i,
|
|
5728
5737
|
ends: r,
|
|
5729
|
-
layout:
|
|
5738
|
+
layout: D(e)
|
|
5730
5739
|
};
|
|
5731
5740
|
}
|
|
5732
|
-
function
|
|
5741
|
+
function Ps(n) {
|
|
5733
5742
|
var e;
|
|
5734
5743
|
const t = n.coordinates;
|
|
5735
5744
|
return {
|
|
5736
5745
|
type: "MultiPoint",
|
|
5737
5746
|
flatCoordinates: t.flat(),
|
|
5738
|
-
layout:
|
|
5747
|
+
layout: D(((e = t[0]) == null ? void 0 : e.length) || 2)
|
|
5739
5748
|
};
|
|
5740
5749
|
}
|
|
5741
|
-
function
|
|
5750
|
+
function Ms(n) {
|
|
5742
5751
|
var s, o;
|
|
5743
|
-
const t = n.coordinates, e = [], i = ((o = (s = t[0]) == null ? void 0 : s[0]) == null ? void 0 : o[0].length) || 2, r =
|
|
5752
|
+
const t = n.coordinates, e = [], i = ((o = (s = t[0]) == null ? void 0 : s[0]) == null ? void 0 : o[0].length) || 2, r = Zi(
|
|
5744
5753
|
e,
|
|
5745
5754
|
0,
|
|
5746
5755
|
t,
|
|
@@ -5750,40 +5759,40 @@ function Ps(n) {
|
|
|
5750
5759
|
type: "MultiPolygon",
|
|
5751
5760
|
flatCoordinates: e,
|
|
5752
5761
|
ends: r,
|
|
5753
|
-
layout:
|
|
5762
|
+
layout: D(i)
|
|
5754
5763
|
};
|
|
5755
5764
|
}
|
|
5756
|
-
function
|
|
5765
|
+
function Ss(n) {
|
|
5757
5766
|
var s, o;
|
|
5758
5767
|
const t = n.coordinates, e = [], i = (o = (s = t[0]) == null ? void 0 : s[0]) == null ? void 0 : o.length, r = $t(e, 0, t, i);
|
|
5759
5768
|
return {
|
|
5760
5769
|
type: "Polygon",
|
|
5761
5770
|
flatCoordinates: e,
|
|
5762
5771
|
ends: r,
|
|
5763
|
-
layout:
|
|
5772
|
+
layout: D(i)
|
|
5764
5773
|
};
|
|
5765
5774
|
}
|
|
5766
|
-
function
|
|
5775
|
+
function de(n, t) {
|
|
5767
5776
|
n = bt(n, !0, t);
|
|
5768
5777
|
const e = n.getType();
|
|
5769
5778
|
let i;
|
|
5770
5779
|
switch (e) {
|
|
5771
5780
|
case "Point": {
|
|
5772
|
-
i =
|
|
5781
|
+
i = Ls(
|
|
5773
5782
|
/** @type {import("../geom/Point.js").default} */
|
|
5774
5783
|
n
|
|
5775
5784
|
);
|
|
5776
5785
|
break;
|
|
5777
5786
|
}
|
|
5778
5787
|
case "LineString": {
|
|
5779
|
-
i =
|
|
5788
|
+
i = As(
|
|
5780
5789
|
/** @type {import("../geom/LineString.js").default} */
|
|
5781
5790
|
n
|
|
5782
5791
|
);
|
|
5783
5792
|
break;
|
|
5784
5793
|
}
|
|
5785
5794
|
case "Polygon": {
|
|
5786
|
-
i =
|
|
5795
|
+
i = Rs(
|
|
5787
5796
|
/** @type {import("../geom/Polygon.js").default} */
|
|
5788
5797
|
n,
|
|
5789
5798
|
t
|
|
@@ -5791,21 +5800,21 @@ function ue(n, t) {
|
|
|
5791
5800
|
break;
|
|
5792
5801
|
}
|
|
5793
5802
|
case "MultiPoint": {
|
|
5794
|
-
i =
|
|
5803
|
+
i = Gs(
|
|
5795
5804
|
/** @type {import("../geom/MultiPoint.js").default} */
|
|
5796
5805
|
n
|
|
5797
5806
|
);
|
|
5798
5807
|
break;
|
|
5799
5808
|
}
|
|
5800
5809
|
case "MultiLineString": {
|
|
5801
|
-
i =
|
|
5810
|
+
i = Fs(
|
|
5802
5811
|
/** @type {import("../geom/MultiLineString.js").default} */
|
|
5803
5812
|
n
|
|
5804
5813
|
);
|
|
5805
5814
|
break;
|
|
5806
5815
|
}
|
|
5807
5816
|
case "MultiPolygon": {
|
|
5808
|
-
i =
|
|
5817
|
+
i = Is(
|
|
5809
5818
|
/** @type {import("../geom/MultiPolygon.js").default} */
|
|
5810
5819
|
n,
|
|
5811
5820
|
t
|
|
@@ -5836,50 +5845,50 @@ function $s(n, t) {
|
|
|
5836
5845
|
return t = Object.assign({}, t), delete t.featureProjection, {
|
|
5837
5846
|
type: "GeometryCollection",
|
|
5838
5847
|
geometries: n.getGeometriesArray().map(function(i) {
|
|
5839
|
-
return
|
|
5848
|
+
return de(i, t);
|
|
5840
5849
|
})
|
|
5841
5850
|
};
|
|
5842
5851
|
}
|
|
5843
|
-
function
|
|
5852
|
+
function As(n, t) {
|
|
5844
5853
|
return {
|
|
5845
5854
|
type: "LineString",
|
|
5846
5855
|
coordinates: n.getCoordinates()
|
|
5847
5856
|
};
|
|
5848
5857
|
}
|
|
5849
|
-
function
|
|
5858
|
+
function Fs(n, t) {
|
|
5850
5859
|
return {
|
|
5851
5860
|
type: "MultiLineString",
|
|
5852
5861
|
coordinates: n.getCoordinates()
|
|
5853
5862
|
};
|
|
5854
5863
|
}
|
|
5855
|
-
function
|
|
5864
|
+
function Gs(n, t) {
|
|
5856
5865
|
return {
|
|
5857
5866
|
type: "MultiPoint",
|
|
5858
5867
|
coordinates: n.getCoordinates()
|
|
5859
5868
|
};
|
|
5860
5869
|
}
|
|
5861
|
-
function
|
|
5870
|
+
function Is(n, t) {
|
|
5862
5871
|
let e;
|
|
5863
5872
|
return t && (e = t.rightHanded), {
|
|
5864
5873
|
type: "MultiPolygon",
|
|
5865
5874
|
coordinates: n.getCoordinates(e)
|
|
5866
5875
|
};
|
|
5867
5876
|
}
|
|
5868
|
-
function
|
|
5877
|
+
function Ls(n, t) {
|
|
5869
5878
|
return {
|
|
5870
5879
|
type: "Point",
|
|
5871
5880
|
coordinates: n.getCoordinates()
|
|
5872
5881
|
};
|
|
5873
5882
|
}
|
|
5874
|
-
function
|
|
5883
|
+
function Rs(n, t) {
|
|
5875
5884
|
let e;
|
|
5876
5885
|
return t && (e = t.rightHanded), {
|
|
5877
5886
|
type: "Polygon",
|
|
5878
5887
|
coordinates: n.getCoordinates(e)
|
|
5879
5888
|
};
|
|
5880
5889
|
}
|
|
5881
|
-
const
|
|
5882
|
-
class
|
|
5890
|
+
const Ts = (n, t) => new vs().writeFeaturesObject(n, t);
|
|
5891
|
+
class Ns extends on {
|
|
5883
5892
|
constructor() {
|
|
5884
5893
|
super();
|
|
5885
5894
|
}
|
|
@@ -5901,7 +5910,7 @@ class Rs extends sn {
|
|
|
5901
5910
|
*/
|
|
5902
5911
|
readFeature(t, e) {
|
|
5903
5912
|
return this.readFeatureFromText(
|
|
5904
|
-
|
|
5913
|
+
It(t),
|
|
5905
5914
|
this.adaptOptions(e)
|
|
5906
5915
|
);
|
|
5907
5916
|
}
|
|
@@ -5926,7 +5935,7 @@ class Rs extends sn {
|
|
|
5926
5935
|
*/
|
|
5927
5936
|
readFeatures(t, e) {
|
|
5928
5937
|
return this.readFeaturesFromText(
|
|
5929
|
-
|
|
5938
|
+
It(t),
|
|
5930
5939
|
this.adaptOptions(e)
|
|
5931
5940
|
);
|
|
5932
5941
|
}
|
|
@@ -5951,7 +5960,7 @@ class Rs extends sn {
|
|
|
5951
5960
|
*/
|
|
5952
5961
|
readGeometry(t, e) {
|
|
5953
5962
|
return this.readGeometryFromText(
|
|
5954
|
-
|
|
5963
|
+
It(t),
|
|
5955
5964
|
this.adaptOptions(e)
|
|
5956
5965
|
);
|
|
5957
5966
|
}
|
|
@@ -5974,7 +5983,7 @@ class Rs extends sn {
|
|
|
5974
5983
|
* @override
|
|
5975
5984
|
*/
|
|
5976
5985
|
readProjection(t) {
|
|
5977
|
-
return this.readProjectionFromText(
|
|
5986
|
+
return this.readProjectionFromText(It(t));
|
|
5978
5987
|
}
|
|
5979
5988
|
/**
|
|
5980
5989
|
* @param {string} text Text.
|
|
@@ -6051,17 +6060,17 @@ class Rs extends sn {
|
|
|
6051
6060
|
return y();
|
|
6052
6061
|
}
|
|
6053
6062
|
}
|
|
6054
|
-
function
|
|
6063
|
+
function It(n) {
|
|
6055
6064
|
return typeof n == "string" ? n : "";
|
|
6056
6065
|
}
|
|
6057
|
-
const
|
|
6066
|
+
const Os = {
|
|
6058
6067
|
POINT: z,
|
|
6059
6068
|
LINESTRING: V,
|
|
6060
6069
|
POLYGON: J,
|
|
6061
|
-
MULTIPOINT:
|
|
6070
|
+
MULTIPOINT: At,
|
|
6062
6071
|
MULTILINESTRING: Ct,
|
|
6063
6072
|
MULTIPOLYGON: wt
|
|
6064
|
-
},
|
|
6073
|
+
}, ln = "EMPTY", hn = "Z", cn = "M", ks = "ZM", m = {
|
|
6065
6074
|
START: 0,
|
|
6066
6075
|
TEXT: 1,
|
|
6067
6076
|
LEFT_PAREN: 2,
|
|
@@ -6069,7 +6078,7 @@ const Ns = {
|
|
|
6069
6078
|
NUMBER: 4,
|
|
6070
6079
|
COMMA: 5,
|
|
6071
6080
|
EOF: 6
|
|
6072
|
-
},
|
|
6081
|
+
}, js = {
|
|
6073
6082
|
Point: "POINT",
|
|
6074
6083
|
LineString: "LINESTRING",
|
|
6075
6084
|
Polygon: "POLYGON",
|
|
@@ -6228,7 +6237,7 @@ class Us {
|
|
|
6228
6237
|
const e = this.token_;
|
|
6229
6238
|
if (this.isTokenType(m.TEXT)) {
|
|
6230
6239
|
const i = e.value;
|
|
6231
|
-
i ===
|
|
6240
|
+
i === hn ? t = "XYZ" : i === cn ? t = "XYM" : i === ks && (t = "XYZM"), t !== "XY" && this.consume_();
|
|
6232
6241
|
}
|
|
6233
6242
|
return t;
|
|
6234
6243
|
}
|
|
@@ -6385,7 +6394,7 @@ class Us {
|
|
|
6385
6394
|
* @private
|
|
6386
6395
|
*/
|
|
6387
6396
|
isEmptyGeometry_() {
|
|
6388
|
-
const t = this.isTokenType(m.TEXT) && this.token_.value ==
|
|
6397
|
+
const t = this.isTokenType(m.TEXT) && this.token_.value == ln;
|
|
6389
6398
|
return t && this.consume_(), t;
|
|
6390
6399
|
}
|
|
6391
6400
|
/**
|
|
@@ -6415,7 +6424,7 @@ class Us {
|
|
|
6415
6424
|
const o = this.parseGeometryCollectionText_();
|
|
6416
6425
|
return new B(o);
|
|
6417
6426
|
}
|
|
6418
|
-
const r =
|
|
6427
|
+
const r = Os[e];
|
|
6419
6428
|
if (!r)
|
|
6420
6429
|
throw new Error("Invalid geometry type: " + e);
|
|
6421
6430
|
let s;
|
|
@@ -6453,7 +6462,7 @@ class Us {
|
|
|
6453
6462
|
throw new Error(this.formatErrorMessage_());
|
|
6454
6463
|
}
|
|
6455
6464
|
}
|
|
6456
|
-
class
|
|
6465
|
+
class Xs extends Ns {
|
|
6457
6466
|
/**
|
|
6458
6467
|
* @param {Options} [options] Options.
|
|
6459
6468
|
*/
|
|
@@ -6547,105 +6556,105 @@ class js extends Rs {
|
|
|
6547
6556
|
* @override
|
|
6548
6557
|
*/
|
|
6549
6558
|
writeGeometryText(t, e) {
|
|
6550
|
-
return
|
|
6559
|
+
return gn(bt(t, !0, e));
|
|
6551
6560
|
}
|
|
6552
6561
|
}
|
|
6553
|
-
function
|
|
6562
|
+
function un(n) {
|
|
6554
6563
|
const t = n.getCoordinates();
|
|
6555
6564
|
return t.length === 0 ? "" : t.join(" ");
|
|
6556
6565
|
}
|
|
6557
|
-
function
|
|
6566
|
+
function Ys(n) {
|
|
6558
6567
|
const t = [], e = n.getPoints();
|
|
6559
6568
|
for (let i = 0, r = e.length; i < r; ++i)
|
|
6560
|
-
t.push("(" +
|
|
6569
|
+
t.push("(" + un(e[i]) + ")");
|
|
6561
6570
|
return t.join(",");
|
|
6562
6571
|
}
|
|
6563
|
-
function
|
|
6572
|
+
function Bs(n) {
|
|
6564
6573
|
const t = [], e = n.getGeometries();
|
|
6565
6574
|
for (let i = 0, r = e.length; i < r; ++i)
|
|
6566
|
-
t.push(
|
|
6575
|
+
t.push(gn(e[i]));
|
|
6567
6576
|
return t.join(",");
|
|
6568
6577
|
}
|
|
6569
|
-
function
|
|
6578
|
+
function ke(n) {
|
|
6570
6579
|
const t = n.getCoordinates(), e = [];
|
|
6571
6580
|
for (let i = 0, r = t.length; i < r; ++i)
|
|
6572
6581
|
e.push(t[i].join(" "));
|
|
6573
6582
|
return e.join(",");
|
|
6574
6583
|
}
|
|
6575
|
-
function
|
|
6584
|
+
function Vs(n) {
|
|
6576
6585
|
const t = [], e = n.getLineStrings();
|
|
6577
6586
|
for (let i = 0, r = e.length; i < r; ++i)
|
|
6578
|
-
t.push("(" +
|
|
6587
|
+
t.push("(" + ke(e[i]) + ")");
|
|
6579
6588
|
return t.join(",");
|
|
6580
6589
|
}
|
|
6581
|
-
function
|
|
6590
|
+
function dn(n) {
|
|
6582
6591
|
const t = [], e = n.getLinearRings();
|
|
6583
6592
|
for (let i = 0, r = e.length; i < r; ++i)
|
|
6584
|
-
t.push("(" +
|
|
6593
|
+
t.push("(" + ke(e[i]) + ")");
|
|
6585
6594
|
return t.join(",");
|
|
6586
6595
|
}
|
|
6587
|
-
function
|
|
6596
|
+
function zs(n) {
|
|
6588
6597
|
const t = [], e = n.getPolygons();
|
|
6589
6598
|
for (let i = 0, r = e.length; i < r; ++i)
|
|
6590
|
-
t.push("(" +
|
|
6599
|
+
t.push("(" + dn(e[i]) + ")");
|
|
6591
6600
|
return t.join(",");
|
|
6592
6601
|
}
|
|
6593
|
-
function
|
|
6602
|
+
function Js(n) {
|
|
6594
6603
|
const t = n.getLayout();
|
|
6595
6604
|
let e = "";
|
|
6596
|
-
return (t === "XYZ" || t === "XYZM") && (e +=
|
|
6597
|
-
}
|
|
6598
|
-
const
|
|
6599
|
-
Point:
|
|
6600
|
-
LineString:
|
|
6601
|
-
Polygon:
|
|
6602
|
-
MultiPoint:
|
|
6603
|
-
MultiLineString:
|
|
6604
|
-
MultiPolygon:
|
|
6605
|
-
GeometryCollection:
|
|
6605
|
+
return (t === "XYZ" || t === "XYZM") && (e += hn), (t === "XYM" || t === "XYZM") && (e += cn), e;
|
|
6606
|
+
}
|
|
6607
|
+
const Ws = {
|
|
6608
|
+
Point: un,
|
|
6609
|
+
LineString: ke,
|
|
6610
|
+
Polygon: dn,
|
|
6611
|
+
MultiPoint: Ys,
|
|
6612
|
+
MultiLineString: Vs,
|
|
6613
|
+
MultiPolygon: zs,
|
|
6614
|
+
GeometryCollection: Bs
|
|
6606
6615
|
};
|
|
6607
|
-
function
|
|
6608
|
-
const t = n.getType(), e =
|
|
6609
|
-
let r =
|
|
6616
|
+
function gn(n) {
|
|
6617
|
+
const t = n.getType(), e = Ws[t], i = e(n);
|
|
6618
|
+
let r = js[t];
|
|
6610
6619
|
if (typeof /** @type {?} */
|
|
6611
6620
|
n.getFlatCoordinates == "function") {
|
|
6612
|
-
const s =
|
|
6621
|
+
const s = Js(
|
|
6613
6622
|
/** @type {import("../geom/SimpleGeometry.js").default} */
|
|
6614
6623
|
n
|
|
6615
6624
|
);
|
|
6616
6625
|
s.length > 0 && (r += " " + s);
|
|
6617
6626
|
}
|
|
6618
|
-
return i.length === 0 ? r + " " +
|
|
6627
|
+
return i.length === 0 ? r + " " + ln : r + "(" + i + ")";
|
|
6619
6628
|
}
|
|
6620
|
-
const
|
|
6629
|
+
const qs = (n, t) => new Xs().writeFeatures(n, t);
|
|
6621
6630
|
/**
|
|
6622
6631
|
* @license
|
|
6623
6632
|
* Copyright 2021 Google LLC
|
|
6624
6633
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6625
6634
|
*/
|
|
6626
|
-
function
|
|
6635
|
+
function _i(n, t, e) {
|
|
6627
6636
|
return n ? t(n) : e == null ? void 0 : e(n);
|
|
6628
6637
|
}
|
|
6629
6638
|
var Et, xt;
|
|
6630
|
-
class
|
|
6639
|
+
class fn extends U {
|
|
6631
6640
|
constructor() {
|
|
6632
6641
|
super();
|
|
6633
6642
|
/**
|
|
6634
6643
|
* @type boolean | import("lit").nothing
|
|
6635
6644
|
*/
|
|
6636
|
-
|
|
6645
|
+
F(this, Et, !0);
|
|
6637
6646
|
/**
|
|
6638
6647
|
* @type boolean | import("lit").nothing
|
|
6639
6648
|
*/
|
|
6640
|
-
|
|
6649
|
+
F(this, xt, !0);
|
|
6641
6650
|
this.multipleFeatures = !1, this.drawnFeatures = [], this.importFeatures = !1, this.showEditor = !1, this.currentlyDrawing = !1, this.drawFunc = null, this.geoJSON = "", this.unstyled = !1, this.select = !1;
|
|
6642
6651
|
}
|
|
6643
6652
|
/**
|
|
6644
6653
|
* Updates button states based on conditions
|
|
6645
6654
|
*/
|
|
6646
6655
|
updateButtonStates() {
|
|
6647
|
-
const { drawDisabled: e, discardDisabled: i } =
|
|
6648
|
-
|
|
6656
|
+
const { drawDisabled: e, discardDisabled: i } = Zn(this);
|
|
6657
|
+
$(this, Et, e), $(this, xt, i);
|
|
6649
6658
|
}
|
|
6650
6659
|
/**
|
|
6651
6660
|
* Overrides createRenderRoot to handle shadow DOM
|
|
@@ -6656,10 +6665,10 @@ class gn extends j {
|
|
|
6656
6665
|
render() {
|
|
6657
6666
|
this.updateButtonStates();
|
|
6658
6667
|
const e = this.currentlyDrawing ? "drawing" : "draw";
|
|
6659
|
-
return
|
|
6668
|
+
return H`
|
|
6660
6669
|
<style>
|
|
6661
|
-
${!this.unstyled &&
|
|
6662
|
-
${!this.unstyled &&
|
|
6670
|
+
${!this.unstyled && Dn}
|
|
6671
|
+
${!this.unstyled && Kn}
|
|
6663
6672
|
</style>
|
|
6664
6673
|
<div class="wrap-btn">
|
|
6665
6674
|
<slot></slot>
|
|
@@ -6668,7 +6677,7 @@ class gn extends j {
|
|
|
6668
6677
|
<button
|
|
6669
6678
|
data-cy="drawBtn"
|
|
6670
6679
|
class="${this.select ? "pointer" : "polygon"} icon"
|
|
6671
|
-
?disabled="${
|
|
6680
|
+
?disabled="${M(this, Et) || C}"
|
|
6672
6681
|
@click="${() => this.drawFunc.start()}"
|
|
6673
6682
|
>
|
|
6674
6683
|
${e}
|
|
@@ -6678,7 +6687,7 @@ class gn extends j {
|
|
|
6678
6687
|
<button
|
|
6679
6688
|
data-cy="discardBtn"
|
|
6680
6689
|
class="discard icon"
|
|
6681
|
-
?disabled="${
|
|
6690
|
+
?disabled="${M(this, xt) || C}"
|
|
6682
6691
|
@click="${() => this.drawFunc.discard()}"
|
|
6683
6692
|
>
|
|
6684
6693
|
discard
|
|
@@ -6686,9 +6695,9 @@ class gn extends j {
|
|
|
6686
6695
|
</div>
|
|
6687
6696
|
|
|
6688
6697
|
<!-- Import Button -->
|
|
6689
|
-
${
|
|
6698
|
+
${_i(
|
|
6690
6699
|
this.importFeatures,
|
|
6691
|
-
() =>
|
|
6700
|
+
() => H`
|
|
6692
6701
|
<!-- Import Input Field : Hidden -->
|
|
6693
6702
|
<input
|
|
6694
6703
|
type="file"
|
|
@@ -6713,9 +6722,9 @@ class gn extends j {
|
|
|
6713
6722
|
</div>
|
|
6714
6723
|
|
|
6715
6724
|
<!-- Geo JSON Wrapper -->
|
|
6716
|
-
${
|
|
6725
|
+
${_i(
|
|
6717
6726
|
this.showEditor,
|
|
6718
|
-
() =>
|
|
6727
|
+
() => H`
|
|
6719
6728
|
<div class="json-wrapper">
|
|
6720
6729
|
<!-- Geo JSON Editor -->
|
|
6721
6730
|
<textarea
|
|
@@ -6728,7 +6737,7 @@ class gn extends j {
|
|
|
6728
6737
|
<button
|
|
6729
6738
|
data-cy="copyBtn"
|
|
6730
6739
|
class="icon-copy"
|
|
6731
|
-
@click=${() =>
|
|
6740
|
+
@click=${() => Qn(this.geoJSON)}
|
|
6732
6741
|
>
|
|
6733
6742
|
${this.unstyled ? "copy" : C}
|
|
6734
6743
|
</button>
|
|
@@ -6739,7 +6748,7 @@ class gn extends j {
|
|
|
6739
6748
|
}
|
|
6740
6749
|
}
|
|
6741
6750
|
Et = new WeakMap(), xt = new WeakMap(), // Define properties with default values and types
|
|
6742
|
-
|
|
6751
|
+
R(fn, "properties", {
|
|
6743
6752
|
multipleFeatures: { attribute: !1, type: Boolean },
|
|
6744
6753
|
drawnFeatures: { attribute: !1, state: !0, type: Array },
|
|
6745
6754
|
currentlyDrawing: { attribute: !1, state: !0, type: Boolean },
|
|
@@ -6750,8 +6759,8 @@ I(gn, "properties", {
|
|
|
6750
6759
|
geoJSON: { attribute: "geo-json", type: String },
|
|
6751
6760
|
unstyled: { type: Boolean }
|
|
6752
6761
|
});
|
|
6753
|
-
customElements.define("eox-drawtools-controller",
|
|
6754
|
-
const
|
|
6762
|
+
customElements.define("eox-drawtools-controller", fn);
|
|
6763
|
+
const Zs = `
|
|
6755
6764
|
button.discard:before {
|
|
6756
6765
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23FF5252' viewBox='0 0 24 24'%3E%3Ctitle%3Etrash-can-outline%3C/title%3E%3Cpath d='M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z' /%3E%3C/svg%3E")
|
|
6757
6766
|
}
|
|
@@ -6796,24 +6805,32 @@ const Ds = `
|
|
|
6796
6805
|
color: white;
|
|
6797
6806
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Econtent-copy%3C/title%3E%3Cpath d='M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z' fill='white' /%3E%3C/svg%3E")
|
|
6798
6807
|
}
|
|
6799
|
-
`,
|
|
6808
|
+
`, Ds = (n) => {
|
|
6800
6809
|
(() => {
|
|
6801
|
-
n.emitDrawnFeatures(), n.multipleFeatures
|
|
6810
|
+
if (n.emitDrawnFeatures(), !n.multipleFeatures)
|
|
6811
|
+
n.draw.setActive(!1), n.selectionEvents.removeSelectionEvent(), n.currentlyDrawing = !1;
|
|
6812
|
+
else if (n.continuous)
|
|
6813
|
+
if (!n.layerId)
|
|
6814
|
+
n.drawLayer.getSource().clear(!0), n.drawnFeatures = [];
|
|
6815
|
+
else {
|
|
6816
|
+
const i = n.drawLayer.getSource().getFeatures().at(-1);
|
|
6817
|
+
n.drawLayer.getSource().clear(!0), n.drawLayer.getSource().addFeature(i), n.drawnFeatures = [i];
|
|
6818
|
+
}
|
|
6802
6819
|
})(), n.requestUpdate();
|
|
6803
|
-
},
|
|
6820
|
+
}, Ks = (n) => {
|
|
6804
6821
|
const t = () => {
|
|
6805
6822
|
n.drawLayer.set("isDrawingEnabled", !0), n.draw.setActive(!0), n.selectionEvents.addSelectionEvent();
|
|
6806
6823
|
}, e = () => {
|
|
6807
6824
|
n.currentlyDrawing = !0, n.requestUpdate();
|
|
6808
6825
|
};
|
|
6809
6826
|
t(), e();
|
|
6810
|
-
},
|
|
6827
|
+
}, Qs = (n) => {
|
|
6811
6828
|
let t;
|
|
6812
6829
|
return typeof n == "string" ? t = /** @type {HTMLElement} */
|
|
6813
6830
|
document.querySelector(n) : t = n, t;
|
|
6814
|
-
},
|
|
6831
|
+
}, vi = (n, t) => {
|
|
6815
6832
|
var s, o, a, l, h;
|
|
6816
|
-
const i =
|
|
6833
|
+
const i = Qs(n.for), r = i.map;
|
|
6817
6834
|
return n.drawLayer = i.addOrUpdateLayer({
|
|
6818
6835
|
zIndex: 100,
|
|
6819
6836
|
type: "Vector",
|
|
@@ -6870,15 +6887,15 @@ const Ds = `
|
|
|
6870
6887
|
/** @type {unknown} */
|
|
6871
6888
|
i.interactions.drawInteraction, n.modify = /** @type {import("ol/interaction").Modify} */
|
|
6872
6889
|
/** @type {unknown} */
|
|
6873
|
-
i.interactions.drawInteractionmodify,
|
|
6874
|
-
},
|
|
6890
|
+
i.interactions.drawInteractionmodify, ge(n, i, n.layerId), (h = n.modify) == null || h.on("modifyend", () => n.onModifyEnd()), i.addEventListener("addfeatures", () => Ds(n)), { EoxMap: i, OlMap: r };
|
|
6891
|
+
}, to = (n) => {
|
|
6875
6892
|
const t = () => {
|
|
6876
6893
|
n.drawnFeatures = [], n.draw.setActive(!1), n.selectionEvents.removeSelectionEvent(), n.drawLayer.getSource().clear(), n.geoJSON = null;
|
|
6877
6894
|
}, e = () => {
|
|
6878
6895
|
n.emitDrawnFeatures(), n.currentlyDrawing = !1, n.requestUpdate();
|
|
6879
6896
|
};
|
|
6880
6897
|
t(), e();
|
|
6881
|
-
},
|
|
6898
|
+
}, eo = (n, t) => {
|
|
6882
6899
|
setTimeout(() => {
|
|
6883
6900
|
const i = n.drawLayer.getSource().getFeatures(), r = n.eoxMap.projection || "EPSG:3857", s = n.projection;
|
|
6884
6901
|
n.drawnFeatures = s ? i.map((a) => {
|
|
@@ -6889,10 +6906,10 @@ const Ds = `
|
|
|
6889
6906
|
let o;
|
|
6890
6907
|
switch (n.format) {
|
|
6891
6908
|
case "geojson":
|
|
6892
|
-
o =
|
|
6909
|
+
o = Ts(n.drawnFeatures);
|
|
6893
6910
|
break;
|
|
6894
6911
|
case "wkt":
|
|
6895
|
-
o =
|
|
6912
|
+
o = qs(n.drawnFeatures);
|
|
6896
6913
|
break;
|
|
6897
6914
|
case "feature":
|
|
6898
6915
|
o = n.drawnFeatures;
|
|
@@ -6903,7 +6920,7 @@ const Ds = `
|
|
|
6903
6920
|
}
|
|
6904
6921
|
n.updateGeoJSON(), n.requestUpdate(), t(o);
|
|
6905
6922
|
}, 0);
|
|
6906
|
-
},
|
|
6923
|
+
}, io = (n) => {
|
|
6907
6924
|
const t = (r) => {
|
|
6908
6925
|
(r == null ? void 0 : r.detail.id) !== "SelectLayerClickInteraction" || !r.detail.feature || (n.drawLayer.getSource().addFeature(r.detail.feature), n.eoxMap.dispatchEvent(
|
|
6909
6926
|
new CustomEvent("addfeatures", { detail: r.detail })
|
|
@@ -6916,7 +6933,7 @@ const Ds = `
|
|
|
6916
6933
|
const r = (s = n.eoxMap.selectInteractions) == null ? void 0 : s.SelectLayerHoverInteraction;
|
|
6917
6934
|
r && (r.selectedFids = [], r.setActive(!1)), n.eoxMap.removeEventListener("select", t);
|
|
6918
6935
|
} };
|
|
6919
|
-
},
|
|
6936
|
+
}, ge = (n, t, e) => {
|
|
6920
6937
|
var a, l;
|
|
6921
6938
|
if (!e || !t)
|
|
6922
6939
|
return;
|
|
@@ -6960,24 +6977,24 @@ const Ds = `
|
|
|
6960
6977
|
i.interactions = [r, s], t.addOrUpdateLayer(i);
|
|
6961
6978
|
const o = n.draw;
|
|
6962
6979
|
n.draw = t.selectInteractions.SelectLayerClickInteraction, o.setActive(!1), t.selectInteractions.SelectLayerClickInteraction.setActive(!1), t.selectInteractions.SelectLayerHoverInteraction.setActive(!1);
|
|
6963
|
-
},
|
|
6980
|
+
}, no = (n, t, e, i) => {
|
|
6964
6981
|
if (t) {
|
|
6965
6982
|
if (e) {
|
|
6966
|
-
i && e !== i &&
|
|
6983
|
+
i && e !== i && Ci(n, t), ge(n, t, e);
|
|
6967
6984
|
return;
|
|
6968
6985
|
}
|
|
6969
6986
|
if (!e && i) {
|
|
6970
|
-
|
|
6987
|
+
Ci(n, t);
|
|
6971
6988
|
return;
|
|
6972
6989
|
}
|
|
6973
6990
|
}
|
|
6974
6991
|
};
|
|
6975
|
-
function
|
|
6992
|
+
function Ci(n, t) {
|
|
6976
6993
|
t && (n.discardDrawing(), n.selectionEvents.removeSelectionEvent(), n.draw = /** @type {import("ol/interaction").Draw} */
|
|
6977
6994
|
t.interactions.drawInteraction, t.selectInteractions.SelectLayerClickInteraction.remove(), t.selectInteractions.SelectLayerHoverInteraction.remove());
|
|
6978
6995
|
}
|
|
6979
|
-
const
|
|
6980
|
-
function
|
|
6996
|
+
const ro = ':root,:host { --spacing: 1rem; --block-spacing-vertical: calc(var(--spacing) * 2); --block-spacing-horizontal: var(--spacing); --background-color: var(--eox-background-color, transparent); --color: var(--eox-color, #2c3d49); --h-color: var(--eox-h-color, var(--color)); --hover-transparency: var(--eox-hover-transparency, 20%); --bg-hover-transparency: var(--eox-bg-hover-transparency, 40%); --btn-hover-transparency: var(--eox-btn-hover-transparency, 80%); --primary-color: var(--eox-primary-color, #004170); --primary-color-hover: color-mix( in srgb, var(--primary-color) var(--hover-transparency), transparent ); --primary-bg-color-hover: color-mix( in srgb, var(--primary-color) var(--bg-hover-transparency), transparent ); --primary-btn-color-hover: color-mix( in srgb, var(--primary-color) var(--btn-hover-transparency), transparent ); --secondary-color: var(--eox-secondary-color, #c6d4df); --secondary-color-hover: color-mix( in srgb, var(--secondary-color) var(--hover-transparency), transparent ); --secondary-bg-color-hover: color-mix( in srgb, var(--secondary-color) var(--bg-hover-transparency), transparent ); --secondary-btn-color-hover: color-mix( in srgb, var(--secondary-color) var(--btn-hover-transparency), transparent ); --success: var(--eox-success, #26cc0f); --warning: var(--eox-warning, #f18e32); --error: var(--eox-error, #ff5252); --header-font-family: var(--eox-header-font-family, "Roboto", sans-serif); --body-font-family: var(--eox-body-font-family, "Roboto", sans-serif);}* { font-size: normal; font-family: var(--body-font-family); color: var(--eox-color);}h1,h2,h3,h4,h5,h6 { font-family: var(--header-font-family);}span,p,div,main,label { font-family: var(--body-font-family);}@media (min-width: 576px) { .container { max-width: 510px; padding-right: 0; padding-left: 0; --block-spacing-vertical: calc(var(--spacing) * 2.5); }}@media (min-width: 768px) { .container { max-width: 700px; --block-spacing-vertical: calc(var(--spacing) * 3); }}@media (min-width: 992px) { .container { max-width: 920px; --block-spacing-vertical: calc(var(--spacing) * 3.5); }}@media (min-width: 1200px) { .container { max-width: 1130px; --block-spacing-vertical: calc(var(--spacing) * 4); }}.container { width: 100%; margin-right: auto; margin-left: auto; display: block; padding: var(--block-spacing-vertical) var(--block-spacing-horizontal);}h1,h2,h3 { line-height: 120%; margin-top: 0.8rem; margin-bottom: 0.8rem;}p { --font-size: 1rem; font-weight: 400; line-height: 170%; margin-top: 0.8rem; margin-bottom: 1.6rem; font-size: var(--font-size);}body { padding: 0; margin: 0;}.sb-show-main.sb-main-padded { padding: 0;}h1,h2,h3,h4,h5,h6 { --font-weight: 700;}h1 { --font-size: 3rem; --typography-spacing-vertical: 0.5rem;}h2 { --font-size: 2rem; --typography-spacing-vertical: 0.5rem;}h3 { --font-size: 1.75rem; --typography-spacing-vertical: 0.5rem;}h4 { --font-size: 1.5rem; --typography-spacing-vertical: 0.5rem;}h5 { --font-size: 1.25rem; --typography-spacing-vertical: 0.5rem;}h1,h2,h3,h4,h5,h6 { margin-top: 0; margin-bottom: var(--typography-spacing-vertical); color: var(--h-color); font-weight: var(--font-weight); font-size: var(--font-size); font-family: var(--header-font-family);}pre { position: relative; border-radius: 4px; z-index: 1; margin: 0; padding: 20px 0; background: transparent; background: var(--code-bg-color, #8e96aa24); overflow: auto;}code { display: block; padding: 0 24px; width: fit-content; min-width: 100%; line-height: var(--code-line-height, 1.7); font-family: var(--code-font-family, monospace); font-size: var(--code-font-size, var(--font-size)); color: var(--code-color, #004170);}:not(pre) > code { display: inline; border-radius: 4px; background: var(--code-bg-color, #8e96aa24); padding: var(--code-padding, 3px 6px);}';
|
|
6997
|
+
function so(n, t) {
|
|
6981
6998
|
function e(s) {
|
|
6982
6999
|
s.preventDefault(), s.stopPropagation();
|
|
6983
7000
|
}
|
|
@@ -6989,46 +7006,50 @@ function ro(n, t) {
|
|
|
6989
7006
|
}
|
|
6990
7007
|
["dragenter", "dragover", "dragleave", "drop"].forEach((s) => {
|
|
6991
7008
|
t.addEventListener(s, e, !1), ["dragenter", "dragover"].includes(s) ? t.addEventListener(s, i, !1) : t.addEventListener(s, r, !1);
|
|
6992
|
-
}), t.addEventListener("drop", (s) =>
|
|
7009
|
+
}), t.addEventListener("drop", (s) => pn(s, n), !1);
|
|
6993
7010
|
}
|
|
6994
|
-
function
|
|
7011
|
+
function oo(n) {
|
|
6995
7012
|
n.preventDefault(), n.stopPropagation();
|
|
6996
7013
|
}
|
|
6997
|
-
function
|
|
6998
|
-
|
|
7014
|
+
function pn(n, t) {
|
|
7015
|
+
oo(n);
|
|
6999
7016
|
const e = n.dataTransfer ? n.dataTransfer.files : (
|
|
7000
7017
|
/**@type {HTMLInputElement}*/
|
|
7001
7018
|
n.target.files
|
|
7002
7019
|
);
|
|
7003
|
-
Array.from(e).forEach((i) =>
|
|
7020
|
+
Array.from(e).forEach((i) => ao(i, t));
|
|
7004
7021
|
}
|
|
7005
|
-
function
|
|
7022
|
+
function ao(n, t) {
|
|
7006
7023
|
const e = new FileReader();
|
|
7007
7024
|
e.readAsText(n), e.onloadend = function() {
|
|
7008
7025
|
typeof e.result == "string" && t.handleFeatureChange(e.result);
|
|
7009
7026
|
};
|
|
7010
7027
|
}
|
|
7011
|
-
var nt, rt, Pt, st;
|
|
7012
|
-
class
|
|
7028
|
+
var nt, rt, Pt, st, Mt;
|
|
7029
|
+
class lo extends U {
|
|
7013
7030
|
constructor() {
|
|
7014
7031
|
super();
|
|
7015
7032
|
/**
|
|
7016
7033
|
* @type import("@eox/map").EOxMap
|
|
7017
7034
|
*/
|
|
7018
|
-
|
|
7035
|
+
F(this, nt);
|
|
7019
7036
|
/**
|
|
7020
7037
|
* @type import("ol").Map
|
|
7021
7038
|
*/
|
|
7022
|
-
|
|
7039
|
+
F(this, rt);
|
|
7023
7040
|
/**
|
|
7024
7041
|
* @type string
|
|
7025
7042
|
*/
|
|
7026
|
-
|
|
7043
|
+
F(this, Pt);
|
|
7027
7044
|
/**
|
|
7028
7045
|
* @type string
|
|
7029
7046
|
*/
|
|
7030
|
-
|
|
7031
|
-
|
|
7047
|
+
F(this, st);
|
|
7048
|
+
/**
|
|
7049
|
+
* @type boolean
|
|
7050
|
+
*/
|
|
7051
|
+
F(this, Mt);
|
|
7052
|
+
this.allowModify = !1, this.for = "eox-map", this.currentlyDrawing = !1, this.draw = null, this.drawLayer = null, this.layerId = "", this.drawnFeatures = [], this.featureName = "Feature", this.featureStyles = null, this.modify = null, this.multipleFeatures = !1, this.importFeatures = !1, this.showEditor = !1, this.showList = !1, this.projection = "EPSG:4326", this.type = "Polygon", this.selectionEvents = null, this.format = "feature", this.unstyled = !1, this.noShadow = !1;
|
|
7032
7053
|
}
|
|
7033
7054
|
// Define properties with defaults and types
|
|
7034
7055
|
static get properties() {
|
|
@@ -7036,9 +7057,11 @@ class ao extends j {
|
|
|
7036
7057
|
allowModify: { attribute: "allow-modify", type: Boolean },
|
|
7037
7058
|
for: { type: String },
|
|
7038
7059
|
currentlyDrawing: { attribute: !1, state: !0, type: Boolean },
|
|
7060
|
+
continuous: { type: Boolean },
|
|
7039
7061
|
draw: { attribute: !1, state: !0 },
|
|
7040
7062
|
drawLayer: { attribute: !1, state: !0 },
|
|
7041
7063
|
drawnFeatures: { attribute: !1, state: !0, type: Array },
|
|
7064
|
+
featureName: { attribute: "feature-name", type: String },
|
|
7042
7065
|
layerId: { attribute: "layer-id", type: String },
|
|
7043
7066
|
featureStyles: { attribute: !1 },
|
|
7044
7067
|
modify: { attribute: !1, state: !0 },
|
|
@@ -7054,28 +7077,38 @@ class ao extends j {
|
|
|
7054
7077
|
};
|
|
7055
7078
|
}
|
|
7056
7079
|
/**
|
|
7057
|
-
*
|
|
7058
|
-
*
|
|
7080
|
+
* Enables the user to draw continuously one feature after another
|
|
7081
|
+
* without having to discard previous ones manually
|
|
7082
|
+
* @type {boolean}
|
|
7083
|
+
*/
|
|
7084
|
+
set continuous(e) {
|
|
7085
|
+
$(this, Mt, e), e && (this.multipleFeatures = !0);
|
|
7086
|
+
}
|
|
7087
|
+
get continuous() {
|
|
7088
|
+
return M(this, Mt);
|
|
7089
|
+
}
|
|
7090
|
+
/**
|
|
7091
|
+
* Enables selection mode for the passed layer
|
|
7059
7092
|
* @type {string}
|
|
7060
7093
|
*/
|
|
7061
7094
|
set layerId(e) {
|
|
7062
|
-
|
|
7095
|
+
no(this, this.eoxMap, e, M(this, st)), $(this, st, e);
|
|
7063
7096
|
}
|
|
7064
7097
|
get layerId() {
|
|
7065
|
-
return
|
|
7098
|
+
return M(this, st);
|
|
7066
7099
|
}
|
|
7067
7100
|
/**
|
|
7068
7101
|
* @onClick Event handler triggered to start drawing on the map.
|
|
7069
7102
|
*/
|
|
7070
7103
|
startDrawing() {
|
|
7071
|
-
|
|
7104
|
+
Ks(this);
|
|
7072
7105
|
}
|
|
7073
7106
|
/**
|
|
7074
7107
|
* @onClick Event handler triggered to discard/stop drawing
|
|
7075
7108
|
* on the map and delete the drawn shapes.
|
|
7076
7109
|
*/
|
|
7077
7110
|
discardDrawing() {
|
|
7078
|
-
|
|
7111
|
+
to(this);
|
|
7079
7112
|
}
|
|
7080
7113
|
/**
|
|
7081
7114
|
* @param {string} text - The string representation of the features to be parsed.
|
|
@@ -7083,7 +7116,7 @@ class ao extends j {
|
|
|
7083
7116
|
*/
|
|
7084
7117
|
handleFeatureChange(e, i = !1) {
|
|
7085
7118
|
this.eoxMap.parseTextToFeature(
|
|
7086
|
-
e || JSON.stringify(
|
|
7119
|
+
e || JSON.stringify(ti),
|
|
7087
7120
|
this.drawLayer,
|
|
7088
7121
|
this.eoxMap,
|
|
7089
7122
|
i
|
|
@@ -7093,7 +7126,7 @@ class ao extends j {
|
|
|
7093
7126
|
* @param {DragEvent} evt - The event object from the file input interaction.
|
|
7094
7127
|
*/
|
|
7095
7128
|
handleFilesChange(e) {
|
|
7096
|
-
|
|
7129
|
+
pn(e, this);
|
|
7097
7130
|
}
|
|
7098
7131
|
/**
|
|
7099
7132
|
* @event onModifyEnd triggered when the modification of a shape is completed.
|
|
@@ -7105,8 +7138,8 @@ class ao extends j {
|
|
|
7105
7138
|
* Update #geoJSON with stringify feature.
|
|
7106
7139
|
*/
|
|
7107
7140
|
updateGeoJSON() {
|
|
7108
|
-
|
|
7109
|
-
this.eoxMap.parseFeature(this.drawnFeatures) ||
|
|
7141
|
+
$(this, Pt, JSON.stringify(
|
|
7142
|
+
this.eoxMap.parseFeature(this.drawnFeatures) || ti,
|
|
7110
7143
|
void 0,
|
|
7111
7144
|
2
|
|
7112
7145
|
));
|
|
@@ -7115,7 +7148,7 @@ class ao extends j {
|
|
|
7115
7148
|
* Triggers different events when the drawing of a shape is completed.
|
|
7116
7149
|
*/
|
|
7117
7150
|
emitDrawnFeatures() {
|
|
7118
|
-
|
|
7151
|
+
eo(this, (i) => {
|
|
7119
7152
|
this.dispatchEvent(new CustomEvent("drawupdate", { detail: i }));
|
|
7120
7153
|
});
|
|
7121
7154
|
}
|
|
@@ -7131,21 +7164,21 @@ class ao extends j {
|
|
|
7131
7164
|
* It then calls requestUpdate to trigger a re-render.
|
|
7132
7165
|
*/
|
|
7133
7166
|
firstUpdated() {
|
|
7134
|
-
const { EoxMap: e, OlMap: i } =
|
|
7135
|
-
this.eoxMap = e,
|
|
7167
|
+
const { EoxMap: e, OlMap: i } = vi(this, this.multipleFeatures);
|
|
7168
|
+
this.eoxMap = e, $(this, rt, i), this.selectionEvents = io(this), this.importFeatures && so(this, this.eoxMap), this.updateGeoJSON(), this.requestUpdate();
|
|
7136
7169
|
}
|
|
7137
7170
|
updated(e) {
|
|
7138
7171
|
if (e.has("for")) {
|
|
7139
|
-
const { EoxMap: i, OlMap: r } =
|
|
7140
|
-
this.eoxMap = i,
|
|
7172
|
+
const { EoxMap: i, OlMap: r } = vi(this, this.multipleFeatures);
|
|
7173
|
+
this.eoxMap = i, $(this, rt, r);
|
|
7141
7174
|
}
|
|
7142
7175
|
}
|
|
7143
7176
|
get eoxMap() {
|
|
7144
|
-
return
|
|
7177
|
+
return M(this, nt);
|
|
7145
7178
|
}
|
|
7146
7179
|
set eoxMap(e) {
|
|
7147
|
-
const i =
|
|
7148
|
-
|
|
7180
|
+
const i = M(this, nt);
|
|
7181
|
+
$(this, nt, e), this.requestUpdate("eoxMap", i);
|
|
7149
7182
|
}
|
|
7150
7183
|
disconnectedCallback() {
|
|
7151
7184
|
var e;
|
|
@@ -7154,11 +7187,11 @@ class ao extends j {
|
|
|
7154
7187
|
// Render method for UI display
|
|
7155
7188
|
render() {
|
|
7156
7189
|
var e;
|
|
7157
|
-
return
|
|
7190
|
+
return H`
|
|
7158
7191
|
<style>
|
|
7159
7192
|
:host { display: block; }
|
|
7160
|
-
${!this.unstyled &&
|
|
7161
|
-
${!this.unstyled &&
|
|
7193
|
+
${!this.unstyled && ro}
|
|
7194
|
+
${!this.unstyled && Zs}
|
|
7162
7195
|
</style>
|
|
7163
7196
|
|
|
7164
7197
|
<!-- Controller Component -->
|
|
@@ -7176,16 +7209,18 @@ class ao extends j {
|
|
|
7176
7209
|
.multipleFeatures=${this.multipleFeatures}
|
|
7177
7210
|
.importFeatures=${this.importFeatures}
|
|
7178
7211
|
.showEditor=${this.showEditor}
|
|
7179
|
-
.geoJSON=${
|
|
7212
|
+
.geoJSON=${M(this, Pt)}
|
|
7180
7213
|
></eox-drawtools-controller>
|
|
7181
7214
|
|
|
7182
7215
|
<!-- List Component -->
|
|
7183
|
-
${this.showList && ((e = this.drawnFeatures) != null && e.length) ?
|
|
7216
|
+
${this.showList && ((e = this.drawnFeatures) != null && e.length) ? H`<eox-drawtools-list
|
|
7217
|
+
.eoxDrawTools=${this}
|
|
7184
7218
|
.eoxMap=${this.eoxMap}
|
|
7185
|
-
.olMap=${
|
|
7219
|
+
.olMap=${M(this, rt)}
|
|
7186
7220
|
.draw=${this.draw}
|
|
7187
7221
|
.drawLayer=${this.drawLayer}
|
|
7188
7222
|
.drawnFeatures=${this.drawnFeatures}
|
|
7223
|
+
.featureName=${this.featureName}
|
|
7189
7224
|
.modify=${this.modify}
|
|
7190
7225
|
.unstyled=${this.unstyled}
|
|
7191
7226
|
@changed=${() => {
|
|
@@ -7195,8 +7230,8 @@ class ao extends j {
|
|
|
7195
7230
|
`;
|
|
7196
7231
|
}
|
|
7197
7232
|
}
|
|
7198
|
-
nt = new WeakMap(), rt = new WeakMap(), Pt = new WeakMap(), st = new WeakMap();
|
|
7199
|
-
customElements.define("eox-drawtools",
|
|
7233
|
+
nt = new WeakMap(), rt = new WeakMap(), Pt = new WeakMap(), st = new WeakMap(), Mt = new WeakMap();
|
|
7234
|
+
customElements.define("eox-drawtools", lo);
|
|
7200
7235
|
export {
|
|
7201
|
-
|
|
7236
|
+
lo as EOxDrawTools
|
|
7202
7237
|
};
|