@teritorio/openstreetmap-logical-history-component 0.3.1 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -18
- package/dist/index.css +1 -1
- package/dist/index.d.ts +26 -26
- package/dist/index.js +608 -521
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a,
|
|
2
|
-
import
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createVNode as s, customRef as c, defineComponent as l, getCurrentInstance as u, getCurrentScope as d, guardReactiveProps as f, inject as p, mergeProps as m, nextTick as h, normalizeClass as g, normalizeProps as _, onMounted as v, onScopeDispose as y, openBlock as b, provide as x, readonly as S, ref as C, renderList as w, renderSlot as T, shallowRef as E, toDisplayString as D, toRef as O, toValue as k, unref as A, useCssVars as ee, useSlots as te, useTemplateRef as ne, watch as j, withCtx as M, withDirectives as re, withModifiers as N } from "vue";
|
|
2
|
+
import ie from "maplibre-gl";
|
|
3
3
|
//#region \0rolldown/runtime.js
|
|
4
|
-
var
|
|
5
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i =
|
|
4
|
+
var ae = Object.create, oe = Object.defineProperty, se = Object.getOwnPropertyDescriptor, ce = Object.getOwnPropertyNames, le = Object.getPrototypeOf, ue = Object.prototype.hasOwnProperty, de = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), fe = (e, t, n, r) => {
|
|
5
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = ce(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !ue.call(e, s) && s !== n && oe(e, s, {
|
|
6
6
|
get: ((e) => t[e]).bind(null, s),
|
|
7
|
-
enumerable: !(r =
|
|
7
|
+
enumerable: !(r = se(t, s)) || r.enumerable
|
|
8
8
|
});
|
|
9
9
|
return e;
|
|
10
|
-
},
|
|
10
|
+
}, pe = (e, t, n) => (n = e == null ? {} : ae(le(e)), fe(t || !e || !e.__esModule ? oe(n, "default", {
|
|
11
11
|
value: e,
|
|
12
12
|
enumerable: !0
|
|
13
|
-
}) : n, e)), P = 6371008.8,
|
|
13
|
+
}) : n, e)), P = 6371008.8, me = {
|
|
14
14
|
centimeters: P * 100,
|
|
15
15
|
centimetres: P * 100,
|
|
16
16
|
degrees: 360 / (2 * Math.PI),
|
|
@@ -31,17 +31,17 @@ function F(e, t, n = {}) {
|
|
|
31
31
|
let r = { type: "Feature" };
|
|
32
32
|
return (n.id === 0 || n.id) && (r.id = n.id), n.bbox && (r.bbox = n.bbox), r.properties = t || {}, r.geometry = e, r;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function he(e, t, n = {}) {
|
|
35
35
|
if (!e) throw Error("coordinates is required");
|
|
36
36
|
if (!Array.isArray(e)) throw Error("coordinates must be an Array");
|
|
37
37
|
if (e.length < 2) throw Error("coordinates must be at least 2 numbers long");
|
|
38
|
-
if (!
|
|
38
|
+
if (!xe(e[0]) || !xe(e[1])) throw Error("coordinates must contain numbers");
|
|
39
39
|
return F({
|
|
40
40
|
type: "Point",
|
|
41
41
|
coordinates: e
|
|
42
42
|
}, t, n);
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function ge(e, t, n = {}) {
|
|
45
45
|
for (let t of e) {
|
|
46
46
|
if (t.length < 4) throw Error("Each LinearRing of a Polygon must have 4 or more Positions.");
|
|
47
47
|
if (t[t.length - 1].length !== t[0].length) throw Error("First and last Position are not equivalent.");
|
|
@@ -63,38 +63,38 @@ function L(e, t = {}) {
|
|
|
63
63
|
let n = { type: "FeatureCollection" };
|
|
64
64
|
return t.id && (n.id = t.id), t.bbox && (n.bbox = t.bbox), n.features = e, n;
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function _e(e, t, n = {}) {
|
|
67
67
|
return F({
|
|
68
68
|
type: "MultiLineString",
|
|
69
69
|
coordinates: e
|
|
70
70
|
}, t, n);
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function ve(e, t, n = {}) {
|
|
73
73
|
return F({
|
|
74
74
|
type: "MultiPolygon",
|
|
75
75
|
coordinates: e
|
|
76
76
|
}, t, n);
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
let n =
|
|
78
|
+
function ye(e, t = "kilometers") {
|
|
79
|
+
let n = me[t];
|
|
80
80
|
if (!n) throw Error(t + " units is invalid");
|
|
81
81
|
return e * n;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function be(e) {
|
|
84
84
|
return e % (2 * Math.PI) * 180 / Math.PI;
|
|
85
85
|
}
|
|
86
86
|
function R(e) {
|
|
87
87
|
return e % 360 * Math.PI / 180;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function xe(e) {
|
|
90
90
|
return !isNaN(e) && e !== null && !Array.isArray(e);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function Se(e) {
|
|
93
93
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
94
94
|
}
|
|
95
95
|
//#endregion
|
|
96
96
|
//#region node_modules/@turf/meta/dist/esm/index.js
|
|
97
|
-
function
|
|
97
|
+
function Ce(e, t, n) {
|
|
98
98
|
if (e !== null) for (var r, i, a, o, s, c, l, u = 0, d = 0, f, p = e.type, m = p === "FeatureCollection", h = p === "Feature", g = m ? e.features.length : 1, _ = 0; _ < g; _++) {
|
|
99
99
|
l = m ? e.features[_].geometry : h ? e.geometry : e, f = l ? l.type === "GeometryCollection" : !1, s = f ? l.geometries.length : 1;
|
|
100
100
|
for (var v = 0; v < s; v++) {
|
|
@@ -140,7 +140,7 @@ function Se(e, t, n) {
|
|
|
140
140
|
}
|
|
141
141
|
break;
|
|
142
142
|
case "GeometryCollection":
|
|
143
|
-
for (r = 0; r < o.geometries.length; r++) if (
|
|
143
|
+
for (r = 0; r < o.geometries.length; r++) if (Ce(o.geometries[r], t, n) === !1) return !1;
|
|
144
144
|
break;
|
|
145
145
|
default: throw Error("Unknown Geometry Type");
|
|
146
146
|
}
|
|
@@ -148,17 +148,17 @@ function Se(e, t, n) {
|
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function we(e, t) {
|
|
152
152
|
if (e.type === "Feature") t(e, 0);
|
|
153
153
|
else if (e.type === "FeatureCollection") for (var n = 0; n < e.features.length && t(e.features[n], n) !== !1; n++);
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function Te(e, t, n) {
|
|
156
156
|
var r = n;
|
|
157
|
-
return
|
|
157
|
+
return we(e, function(e, i) {
|
|
158
158
|
r = i === 0 && n === void 0 ? e : t(r, e, i);
|
|
159
159
|
}), r;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function Ee(e, t) {
|
|
162
162
|
var n, r, i, a, o, s, c, l, u, d, f = 0, p = e.type === "FeatureCollection", m = e.type === "Feature", h = p ? e.features.length : 1;
|
|
163
163
|
for (n = 0; n < h; n++) {
|
|
164
164
|
for (s = p ? e.features[n].geometry : m ? e.geometry : e, l = p ? e.features[n].properties : m ? e.properties : {}, u = p ? e.features[n].bbox : m ? e.bbox : void 0, d = p ? e.features[n].id : m ? e.id : void 0, c = s ? s.type === "GeometryCollection" : !1, o = c ? s.geometries.length : 1, i = 0; i < o; i++) {
|
|
@@ -184,14 +184,14 @@ function Te(e, t) {
|
|
|
184
184
|
f++;
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function De(e, t, n) {
|
|
188
188
|
var r = n;
|
|
189
|
-
return
|
|
189
|
+
return Ee(e, function(e, i, a, o, s) {
|
|
190
190
|
r = i === 0 && n === void 0 ? e : t(r, e, i, a, o, s);
|
|
191
191
|
}), r;
|
|
192
192
|
}
|
|
193
|
-
function
|
|
194
|
-
|
|
193
|
+
function Oe(e, t) {
|
|
194
|
+
Ee(e, function(e, n, r, i, a) {
|
|
195
195
|
var o = e === null ? null : e.type;
|
|
196
196
|
switch (o) {
|
|
197
197
|
case null:
|
|
@@ -225,15 +225,15 @@ function De(e, t) {
|
|
|
225
225
|
}
|
|
226
226
|
//#endregion
|
|
227
227
|
//#region node_modules/@turf/area/dist/esm/index.js
|
|
228
|
-
function Oe(e) {
|
|
229
|
-
return Ee(e, (e, t) => e + ke(t), 0);
|
|
230
|
-
}
|
|
231
228
|
function ke(e) {
|
|
229
|
+
return De(e, (e, t) => e + Ae(t), 0);
|
|
230
|
+
}
|
|
231
|
+
function Ae(e) {
|
|
232
232
|
let t = 0, n;
|
|
233
233
|
switch (e.type) {
|
|
234
|
-
case "Polygon": return
|
|
234
|
+
case "Polygon": return je(e.coordinates);
|
|
235
235
|
case "MultiPolygon":
|
|
236
|
-
for (n = 0; n < e.coordinates.length; n++) t +=
|
|
236
|
+
for (n = 0; n < e.coordinates.length; n++) t += je(e.coordinates[n]);
|
|
237
237
|
return t;
|
|
238
238
|
case "Point":
|
|
239
239
|
case "MultiPoint":
|
|
@@ -242,36 +242,36 @@ function ke(e) {
|
|
|
242
242
|
}
|
|
243
243
|
return 0;
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function je(e) {
|
|
246
246
|
let t = 0;
|
|
247
247
|
if (e && e.length > 0) {
|
|
248
|
-
t += Math.abs(
|
|
249
|
-
for (let n = 1; n < e.length; n++) t -= Math.abs(
|
|
248
|
+
t += Math.abs(Pe(e[0]));
|
|
249
|
+
for (let n = 1; n < e.length; n++) t -= Math.abs(Pe(e[n]));
|
|
250
250
|
}
|
|
251
251
|
return t;
|
|
252
252
|
}
|
|
253
|
-
var
|
|
254
|
-
function
|
|
253
|
+
var Me = P * P / 2, Ne = Math.PI / 180;
|
|
254
|
+
function Pe(e) {
|
|
255
255
|
let t = e.length - 1;
|
|
256
256
|
if (t <= 2) return 0;
|
|
257
257
|
let n = 0, r = 0;
|
|
258
258
|
for (; r < t;) {
|
|
259
|
-
let i = e[r], a = e[r + 1 === t ? 0 : r + 1], o = e[r + 2 >= t ? (r + 2) % t : r + 2], s = i[0] *
|
|
259
|
+
let i = e[r], a = e[r + 1 === t ? 0 : r + 1], o = e[r + 2 >= t ? (r + 2) % t : r + 2], s = i[0] * Ne, c = a[1] * Ne, l = o[0] * Ne;
|
|
260
260
|
n += (l - s) * Math.sin(c), r++;
|
|
261
261
|
}
|
|
262
|
-
return n *
|
|
262
|
+
return n * Me;
|
|
263
263
|
}
|
|
264
264
|
//#endregion
|
|
265
265
|
//#region node_modules/geojson-equality-ts/dist/esm/index.js
|
|
266
|
-
var
|
|
266
|
+
var Fe = Object.defineProperty, z = (e, t) => Fe(e, "name", {
|
|
267
267
|
value: t,
|
|
268
268
|
configurable: !0
|
|
269
|
-
}),
|
|
269
|
+
}), Ie = class {
|
|
270
270
|
constructor(e) {
|
|
271
271
|
this.direction = !1, this.compareProperties = !0, this.precision = 10 ** -(e?.precision ?? 17), this.direction = e?.direction ?? !1, this.compareProperties = e?.compareProperties ?? !0;
|
|
272
272
|
}
|
|
273
273
|
compare(e, t) {
|
|
274
|
-
if (e.type !== t.type || !
|
|
274
|
+
if (e.type !== t.type || !Re(e, t)) return !1;
|
|
275
275
|
switch (e.type) {
|
|
276
276
|
case "Point": return this.compareCoord(e.coordinates, t.coordinates);
|
|
277
277
|
case "LineString": return this.compareLine(e.coordinates, t.coordinates);
|
|
@@ -280,7 +280,7 @@ var Pe = Object.defineProperty, z = (e, t) => Pe(e, "name", {
|
|
|
280
280
|
case "Feature": return this.compareFeature(e, t);
|
|
281
281
|
case "FeatureCollection": return this.compareFeatureCollection(e, t);
|
|
282
282
|
default: if (e.type.startsWith("Multi")) {
|
|
283
|
-
let n =
|
|
283
|
+
let n = ze(e), r = ze(t);
|
|
284
284
|
return n.every((e) => r.some((t) => this.compare(e, t)));
|
|
285
285
|
}
|
|
286
286
|
}
|
|
@@ -290,7 +290,7 @@ var Pe = Object.defineProperty, z = (e, t) => Pe(e, "name", {
|
|
|
290
290
|
return e.length === t.length && e.every((e, n) => Math.abs(e - t[n]) < this.precision);
|
|
291
291
|
}
|
|
292
292
|
compareLine(e, t, n = 0, r = !1) {
|
|
293
|
-
if (!
|
|
293
|
+
if (!Re(e, t)) return !1;
|
|
294
294
|
let i = e, a = t;
|
|
295
295
|
if (r && !this.compareCoord(i[0], a[0])) {
|
|
296
296
|
let e = this.fixStartIndex(a, i);
|
|
@@ -319,48 +319,48 @@ var Pe = Object.defineProperty, z = (e, t) => Pe(e, "name", {
|
|
|
319
319
|
return !1;
|
|
320
320
|
}
|
|
321
321
|
compareGeometryCollection(e, t) {
|
|
322
|
-
return
|
|
322
|
+
return Re(e.geometries, t.geometries) && this.compareBBox(e, t) && e.geometries.every((e, n) => this.compare(e, t.geometries[n]));
|
|
323
323
|
}
|
|
324
324
|
compareFeature(e, t) {
|
|
325
|
-
return e.id === t.id && (this.compareProperties ?
|
|
325
|
+
return e.id === t.id && (this.compareProperties ? Ve(e.properties, t.properties) : !0) && this.compareBBox(e, t) && this.compare(e.geometry, t.geometry);
|
|
326
326
|
}
|
|
327
327
|
compareFeatureCollection(e, t) {
|
|
328
|
-
return
|
|
328
|
+
return Re(e.features, t.features) && this.compareBBox(e, t) && e.features.every((e, n) => this.compare(e, t.features[n]));
|
|
329
329
|
}
|
|
330
330
|
compareBBox(e, t) {
|
|
331
331
|
return !e.bbox && !t.bbox || (e.bbox && t.bbox ? this.compareCoord(e.bbox, t.bbox) : !1);
|
|
332
332
|
}
|
|
333
333
|
};
|
|
334
|
-
z(
|
|
335
|
-
var
|
|
336
|
-
function
|
|
334
|
+
z(Ie, "GeojsonEquality");
|
|
335
|
+
var Le = Ie;
|
|
336
|
+
function Re(e, t) {
|
|
337
337
|
return e.coordinates ? e.coordinates.length === t.coordinates.length : e.length === t.length;
|
|
338
338
|
}
|
|
339
|
-
z(
|
|
340
|
-
function
|
|
339
|
+
z(Re, "sameLength");
|
|
340
|
+
function ze(e) {
|
|
341
341
|
return e.coordinates.map((t) => ({
|
|
342
342
|
type: e.type.replace("Multi", ""),
|
|
343
343
|
coordinates: t
|
|
344
344
|
}));
|
|
345
345
|
}
|
|
346
|
-
z(
|
|
347
|
-
function
|
|
348
|
-
return new
|
|
346
|
+
z(ze, "explode");
|
|
347
|
+
function Be(e, t, n) {
|
|
348
|
+
return new Le(n).compare(e, t);
|
|
349
349
|
}
|
|
350
|
-
z(
|
|
351
|
-
function
|
|
350
|
+
z(Be, "geojsonEquality");
|
|
351
|
+
function Ve(e, t) {
|
|
352
352
|
if (e === null && t === null) return !0;
|
|
353
353
|
if (e === null || t === null) return !1;
|
|
354
354
|
let n = Object.keys(e), r = Object.keys(t);
|
|
355
355
|
if (n.length !== r.length) return !1;
|
|
356
356
|
for (var i of n) {
|
|
357
|
-
let n = e[i], r = t[i], a =
|
|
358
|
-
if (a && !
|
|
357
|
+
let n = e[i], r = t[i], a = He(n) && He(r);
|
|
358
|
+
if (a && !Ve(n, r) || !a && n !== r) return !1;
|
|
359
359
|
}
|
|
360
360
|
return !0;
|
|
361
361
|
}
|
|
362
|
-
z(
|
|
363
|
-
var
|
|
362
|
+
z(Ve, "equal");
|
|
363
|
+
var He = /* @__PURE__ */ z((e) => typeof e == "object" && !!e, "isObject");
|
|
364
364
|
//#endregion
|
|
365
365
|
//#region node_modules/@turf/invariant/dist/esm/index.js
|
|
366
366
|
function B(e) {
|
|
@@ -382,7 +382,7 @@ function V(e) {
|
|
|
382
382
|
function H(e) {
|
|
383
383
|
return e.type === "Feature" ? e.geometry : e;
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function Ue(e, t) {
|
|
386
386
|
return e.type === "FeatureCollection" ? "FeatureCollection" : e.type === "GeometryCollection" ? "GeometryCollection" : e.type === "Feature" && e.geometry !== null ? e.geometry.type : e.type;
|
|
387
387
|
}
|
|
388
388
|
//#endregion
|
|
@@ -391,11 +391,11 @@ function U(e, t, n = {}) {
|
|
|
391
391
|
let r = B(e), i = V(t);
|
|
392
392
|
for (let e = 0; e < i.length - 1; e++) {
|
|
393
393
|
let t = !1;
|
|
394
|
-
if (n.ignoreEndVertices && (e === 0 && (t = "start"), e === i.length - 2 && (t = "end"), e === 0 && e + 1 === i.length - 1 && (t = "both")),
|
|
394
|
+
if (n.ignoreEndVertices && (e === 0 && (t = "start"), e === i.length - 2 && (t = "end"), e === 0 && e + 1 === i.length - 1 && (t = "both")), We(i[e], i[e + 1], r, t, n.epsilon === void 0 ? null : n.epsilon)) return !0;
|
|
395
395
|
}
|
|
396
396
|
return !1;
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function We(e, t, n, r, i) {
|
|
399
399
|
let a = n[0], o = n[1], s = e[0], c = e[1], l = t[0], u = t[1], d = n[0] - s, f = n[1] - c, p = l - s, m = u - c, h = d * m - f * p;
|
|
400
400
|
if (i !== null) {
|
|
401
401
|
if (Math.abs(h) > i) return !1;
|
|
@@ -404,25 +404,25 @@ function Ue(e, t, n, r, i) {
|
|
|
404
404
|
}
|
|
405
405
|
//#endregion
|
|
406
406
|
//#region node_modules/@turf/clean-coords/dist/esm/index.js
|
|
407
|
-
function
|
|
407
|
+
function Ge(e, t = {}) {
|
|
408
408
|
var n = typeof t == "object" ? t.mutate : t;
|
|
409
409
|
if (!e) throw Error("geojson is required");
|
|
410
|
-
var r =
|
|
410
|
+
var r = Ue(e), i = [];
|
|
411
411
|
switch (r) {
|
|
412
412
|
case "LineString":
|
|
413
|
-
i =
|
|
413
|
+
i = Ke(e, r);
|
|
414
414
|
break;
|
|
415
415
|
case "MultiLineString":
|
|
416
416
|
case "Polygon":
|
|
417
417
|
V(e).forEach(function(e) {
|
|
418
|
-
i.push(
|
|
418
|
+
i.push(Ke(e, r));
|
|
419
419
|
});
|
|
420
420
|
break;
|
|
421
421
|
case "MultiPolygon":
|
|
422
422
|
V(e).forEach(function(e) {
|
|
423
423
|
var t = [];
|
|
424
424
|
e.forEach(function(e) {
|
|
425
|
-
t.push(
|
|
425
|
+
t.push(Ke(e, r));
|
|
426
426
|
}), i.push(t);
|
|
427
427
|
});
|
|
428
428
|
break;
|
|
@@ -447,31 +447,31 @@ function We(e, t = {}) {
|
|
|
447
447
|
id: e.id
|
|
448
448
|
});
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function Ke(e, t) {
|
|
451
451
|
let n = V(e);
|
|
452
|
-
if (n.length === 2 && !
|
|
452
|
+
if (n.length === 2 && !qe(n[0], n[1])) return n;
|
|
453
453
|
let r = [], i = 0, a = 1, o = 2;
|
|
454
454
|
for (r.push(n[i]); o < n.length;) U(n[a], I([n[i], n[o]])) ? a = o : (r.push(n[a]), i = a, a++, o = a), o++;
|
|
455
455
|
if (r.push(n[a]), t === "Polygon" || t === "MultiPolygon") {
|
|
456
456
|
if (U(r[0], I([r[1], r[r.length - 2]])) && (r.shift(), r.pop(), r.push(r[0])), r.length < 4) throw Error("invalid polygon, fewer than 4 points");
|
|
457
|
-
if (!
|
|
457
|
+
if (!qe(r[0], r[r.length - 1])) throw Error("invalid polygon, first and last points not equal");
|
|
458
458
|
}
|
|
459
459
|
return r;
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function qe(e, t) {
|
|
462
462
|
return e[0] === t[0] && e[1] === t[1];
|
|
463
463
|
}
|
|
464
464
|
//#endregion
|
|
465
465
|
//#region node_modules/@turf/boolean-equal/dist/esm/index.js
|
|
466
|
-
function
|
|
466
|
+
function Je(e, t, n = {}) {
|
|
467
467
|
let r = n.precision;
|
|
468
468
|
if (r = r == null || isNaN(r) ? 6 : r, typeof r != "number" || !(r >= 0)) throw Error("precision must be a positive number");
|
|
469
|
-
return H(e).type === H(t).type ?
|
|
469
|
+
return H(e).type === H(t).type ? Be(Ge(e), Ge(t), { precision: r }) : !1;
|
|
470
470
|
}
|
|
471
|
-
var
|
|
471
|
+
var Ye = Je;
|
|
472
472
|
//#endregion
|
|
473
473
|
//#region src/utils/feature-transform.ts
|
|
474
|
-
function
|
|
474
|
+
function Xe(e) {
|
|
475
475
|
return e.features.map((t) => {
|
|
476
476
|
if (t.id == null) {
|
|
477
477
|
console.warn("Skipping feature with null id");
|
|
@@ -488,7 +488,7 @@ function Ye(e) {
|
|
|
488
488
|
return;
|
|
489
489
|
}
|
|
490
490
|
let i = e.features.find((e) => e.properties.links === t.properties.links && e.id !== t.id);
|
|
491
|
-
return i?.geometry && t.geometry && (t.properties.geom = !
|
|
491
|
+
return i?.geometry && t.geometry && (t.properties.geom = !Ye(t.geometry, i.geometry)), t.id === r.before ? {
|
|
492
492
|
...t,
|
|
493
493
|
properties: {
|
|
494
494
|
...t.properties,
|
|
@@ -509,7 +509,7 @@ function Ye(e) {
|
|
|
509
509
|
} : t;
|
|
510
510
|
}).filter((e) => e !== void 0).sort((e, t) => {
|
|
511
511
|
let n = e.geometry, r = t.geometry;
|
|
512
|
-
return !n && !r ? 0 : n ? r ?
|
|
512
|
+
return !n && !r ? 0 : n ? r ? ke(t) - ke(e) : -1 : 1;
|
|
513
513
|
});
|
|
514
514
|
}
|
|
515
515
|
//#endregion
|
|
@@ -519,14 +519,14 @@ var W = {
|
|
|
519
519
|
delete: "#FF0000",
|
|
520
520
|
updateBefore: "#FFA479",
|
|
521
521
|
updateAfter: "#F2BE00"
|
|
522
|
-
},
|
|
522
|
+
}, Ze = Object.fromEntries([
|
|
523
523
|
"new",
|
|
524
524
|
"delete",
|
|
525
525
|
"updateAfter",
|
|
526
526
|
"updateBefore"
|
|
527
527
|
].map((e) => [e, e]));
|
|
528
|
-
function
|
|
529
|
-
let e =
|
|
528
|
+
function Qe() {
|
|
529
|
+
let e = C(), n = C([]), r = t(() => e.value?.features.length);
|
|
530
530
|
function i(e) {
|
|
531
531
|
return e.reduce((e, t) => {
|
|
532
532
|
let n = t.properties.links;
|
|
@@ -537,7 +537,7 @@ function Ze() {
|
|
|
537
537
|
l();
|
|
538
538
|
let r = {
|
|
539
539
|
...t,
|
|
540
|
-
features:
|
|
540
|
+
features: Xe(t)
|
|
541
541
|
};
|
|
542
542
|
e.value = r, n.value = i(r.features);
|
|
543
543
|
}
|
|
@@ -548,7 +548,7 @@ function Ze() {
|
|
|
548
548
|
return e.filter((e) => e.properties.is_after || e.properties.is_new);
|
|
549
549
|
}
|
|
550
550
|
function c(e) {
|
|
551
|
-
return e.properties.is_new ?
|
|
551
|
+
return e.properties.is_new ? Ze.new : e.properties.deleted ? Ze.delete : e.properties.is_before ? Ze.updateBefore : Ze.updateAfter;
|
|
552
552
|
}
|
|
553
553
|
function l() {
|
|
554
554
|
e.value = void 0, n.value = [];
|
|
@@ -565,108 +565,112 @@ function Ze() {
|
|
|
565
565
|
}
|
|
566
566
|
//#endregion
|
|
567
567
|
//#region src/constants/injectionKeys.ts
|
|
568
|
-
var
|
|
568
|
+
var $e = Symbol("reasonCollapsed"), et = Symbol("loCha"), tt = Symbol("loChaInstanceId"), nt = Symbol("mapStyleUrl"), rt = {
|
|
569
569
|
n: "node",
|
|
570
570
|
w: "way",
|
|
571
571
|
r: "relation"
|
|
572
572
|
};
|
|
573
|
-
function
|
|
574
|
-
return `https://www.openstreetmap.org/${
|
|
573
|
+
function it(e, t) {
|
|
574
|
+
return `https://www.openstreetmap.org/${rt[e]}/${t}/history`;
|
|
575
575
|
}
|
|
576
|
-
function
|
|
576
|
+
function at(e) {
|
|
577
577
|
return `https://www.openstreetmap.org/user/${encodeURIComponent(e)}`;
|
|
578
578
|
}
|
|
579
|
-
function at(e, t) {
|
|
580
|
-
return `http://127.0.0.1:8111/load_object?objects=${e}${t}`;
|
|
581
|
-
}
|
|
582
579
|
function ot(e, t) {
|
|
583
|
-
return `
|
|
580
|
+
return `http://127.0.0.1:8111/load_object?objects=${e}${t}`;
|
|
584
581
|
}
|
|
585
582
|
function st(e, t) {
|
|
586
|
-
return `https://
|
|
583
|
+
return `https://osmlab.github.io/osm-deep-history/#/${rt[e]}/${t}`;
|
|
584
|
+
}
|
|
585
|
+
function ct(e, t) {
|
|
586
|
+
return `https://pewu.github.io/osm-history/#/${rt[e]}/${t}`;
|
|
587
587
|
}
|
|
588
588
|
//#endregion
|
|
589
589
|
//#region src/components/LoCha/LoChaObject.vue?vue&type=script&setup=true&lang.ts
|
|
590
|
-
var
|
|
590
|
+
var lt = { class: "locha-object" }, ut = { class: "wrap" }, dt = ["href"], ft = { class: "fab" }, pt = { class: "fab-menu" }, mt = ["href"], ht = ["href", "target"], gt = ["href"], _t = ["href"], vt = { class: "date" }, yt = ["href", "title"], bt = /* @__PURE__ */ l({
|
|
591
591
|
__name: "LoChaObject",
|
|
592
592
|
props: {
|
|
593
593
|
feature: {},
|
|
594
594
|
josmTarget: {}
|
|
595
595
|
},
|
|
596
596
|
setup(e) {
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
597
|
+
ee((e) => ({
|
|
598
|
+
v642a69b5: l.value,
|
|
599
|
+
e2a6f984: A(W).delete,
|
|
600
|
+
v6c07cced: A(W).new
|
|
601
601
|
}));
|
|
602
|
-
let n = e, { getStatus: o } =
|
|
602
|
+
let n = e, { getStatus: o } = p(et), s = t(() => o(n.feature)), c = t(() => {
|
|
603
603
|
switch (s.value) {
|
|
604
604
|
case "new": return "new";
|
|
605
605
|
case "delete": return "deleted";
|
|
606
606
|
default: return "";
|
|
607
607
|
}
|
|
608
608
|
}), l = t(() => W[s.value]);
|
|
609
|
-
return (t, o) => (
|
|
610
|
-
a("
|
|
611
|
-
a("
|
|
612
|
-
href:
|
|
609
|
+
return (t, o) => (b(), i("article", lt, [a("header", null, [
|
|
610
|
+
a("div", ut, [
|
|
611
|
+
a("a", {
|
|
612
|
+
href: A(it)(e.feature.properties.objtype, e.feature.properties.id),
|
|
613
613
|
title: "OSM History",
|
|
614
614
|
target: "_blank",
|
|
615
615
|
onClick: o[0] ||= N(() => {}, ["stop"])
|
|
616
|
-
},
|
|
616
|
+
}, D(`${e.feature.properties.objtype}${e.feature.properties.id}-v${e.feature.properties.version}`), 9, dt),
|
|
617
|
+
s.value === "new" || s.value === "delete" ? (b(), i("div", {
|
|
617
618
|
key: 0,
|
|
618
|
-
class:
|
|
619
|
+
class: g(["status-content", {
|
|
619
620
|
"object-new": s.value === "new",
|
|
620
621
|
"object-deleted": s.value === "delete"
|
|
621
622
|
}])
|
|
622
|
-
},
|
|
623
|
-
a("
|
|
624
|
-
|
|
625
|
-
a("a", {
|
|
626
|
-
href: k(it)(e.feature.properties.username),
|
|
627
|
-
title: `View ${e.feature.properties.username} OSM profile`,
|
|
628
|
-
target: "_blank",
|
|
629
|
-
onClick: o[1] ||= N(() => {}, ["stop"])
|
|
630
|
-
}, " 👤" + E(e.feature.properties.username), 9, ft)
|
|
631
|
-
]),
|
|
632
|
-
w(t.$slots, "tags-diff", {}, void 0, !0),
|
|
633
|
-
a("div", pt, [
|
|
634
|
-
a("a", {
|
|
635
|
-
href: k(rt)(e.feature.properties.objtype, e.feature.properties.id),
|
|
636
|
-
type: "button",
|
|
637
|
-
title: "Edit in OSM iD",
|
|
638
|
-
target: "_blank",
|
|
639
|
-
onClick: o[2] ||= N(() => {}, ["stop"])
|
|
640
|
-
}, " OSM iD ", 8, mt),
|
|
641
|
-
a("a", {
|
|
642
|
-
href: k(at)(e.feature.properties.objtype, e.feature.properties.id),
|
|
643
|
-
type: "button",
|
|
644
|
-
title: "Edit in JOSM",
|
|
645
|
-
target: e.josmTarget || "hidden_josm_target",
|
|
646
|
-
onClick: o[3] ||= N(() => {}, ["stop"])
|
|
647
|
-
}, " JOSM ", 8, ht),
|
|
648
|
-
a("a", {
|
|
649
|
-
href: k(ot)(e.feature.properties.objtype, e.feature.properties.id),
|
|
650
|
-
type: "button",
|
|
651
|
-
title: "OSM Deep History",
|
|
652
|
-
target: "_blank",
|
|
653
|
-
onClick: o[4] ||= N(() => {}, ["stop"])
|
|
654
|
-
}, " Deep H ", 8, gt),
|
|
655
|
-
a("a", {
|
|
656
|
-
href: k(st)(e.feature.properties.objtype, e.feature.properties.id),
|
|
623
|
+
}, D(c.value), 3)) : r("", !0),
|
|
624
|
+
a("div", ft, [o[6] ||= a("button", {
|
|
625
|
+
class: "fab-toggle",
|
|
657
626
|
type: "button",
|
|
658
|
-
title: "
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
627
|
+
title: "Tools"
|
|
628
|
+
}, " 🔧 Tools ", -1), a("div", pt, [
|
|
629
|
+
a("a", {
|
|
630
|
+
href: A(it)(e.feature.properties.objtype, e.feature.properties.id),
|
|
631
|
+
class: "action-btn",
|
|
632
|
+
title: "Edit in OSM iD",
|
|
633
|
+
target: "_blank",
|
|
634
|
+
onClick: o[1] ||= N(() => {}, ["stop"])
|
|
635
|
+
}, " OSM iD ", 8, mt),
|
|
636
|
+
a("a", {
|
|
637
|
+
href: A(ot)(e.feature.properties.objtype, e.feature.properties.id),
|
|
638
|
+
class: "action-btn",
|
|
639
|
+
title: "Edit in JOSM",
|
|
640
|
+
target: e.josmTarget || "hidden_josm_target",
|
|
641
|
+
onClick: o[2] ||= N(() => {}, ["stop"])
|
|
642
|
+
}, " JOSM ", 8, ht),
|
|
643
|
+
a("a", {
|
|
644
|
+
href: A(st)(e.feature.properties.objtype, e.feature.properties.id),
|
|
645
|
+
class: "action-btn",
|
|
646
|
+
title: "OSM Deep History",
|
|
647
|
+
target: "_blank",
|
|
648
|
+
onClick: o[3] ||= N(() => {}, ["stop"])
|
|
649
|
+
}, " Deep H ", 8, gt),
|
|
650
|
+
a("a", {
|
|
651
|
+
href: A(ct)(e.feature.properties.objtype, e.feature.properties.id),
|
|
652
|
+
class: "action-btn",
|
|
653
|
+
title: "OSM History Viewer",
|
|
654
|
+
target: "_blank",
|
|
655
|
+
onClick: o[4] ||= N(() => {}, ["stop"])
|
|
656
|
+
}, " OSM H ", 8, _t)
|
|
657
|
+
])])
|
|
658
|
+
]),
|
|
659
|
+
a("p", vt, " 📅 " + D(n.feature.properties.created), 1),
|
|
660
|
+
e.feature.properties.username ? (b(), i("a", {
|
|
661
|
+
key: 0,
|
|
662
|
+
href: A(at)(e.feature.properties.username),
|
|
663
|
+
title: `View ${e.feature.properties.username} OSM profile`,
|
|
664
|
+
target: "_blank",
|
|
665
|
+
onClick: o[5] ||= N(() => {}, ["stop"])
|
|
666
|
+
}, " 👤" + D(e.feature.properties.username), 9, yt)) : r("", !0)
|
|
667
|
+
]), T(t.$slots, "object-detail", {}, void 0, !0)]));
|
|
668
|
+
}
|
|
669
|
+
}), xt = (e, t) => {
|
|
666
670
|
let n = e.__vccOpts || e;
|
|
667
671
|
for (let [e, r] of t) n[e] = r;
|
|
668
672
|
return n;
|
|
669
|
-
},
|
|
673
|
+
}, St = /* @__PURE__ */ xt(bt, [["__scopeId", "data-v-fac1b144"]]);
|
|
670
674
|
//#endregion
|
|
671
675
|
//#region node_modules/@turf/bbox/dist/esm/index.js
|
|
672
676
|
function G(e, t = {}) {
|
|
@@ -677,35 +681,35 @@ function G(e, t = {}) {
|
|
|
677
681
|
-Infinity,
|
|
678
682
|
-Infinity
|
|
679
683
|
];
|
|
680
|
-
return
|
|
684
|
+
return Ce(e, (e) => {
|
|
681
685
|
n[0] > e[0] && (n[0] = e[0]), n[1] > e[1] && (n[1] = e[1]), n[2] < e[0] && (n[2] = e[0]), n[3] < e[1] && (n[3] = e[1]);
|
|
682
686
|
}), n;
|
|
683
687
|
}
|
|
684
|
-
var
|
|
688
|
+
var Ct = G;
|
|
685
689
|
//#endregion
|
|
686
690
|
//#region node_modules/@vueuse/shared/dist/index.js
|
|
687
|
-
function
|
|
688
|
-
return
|
|
691
|
+
function wt(e, t) {
|
|
692
|
+
return d() ? (y(e, t), !0) : !1;
|
|
689
693
|
}
|
|
690
|
-
var
|
|
694
|
+
var Tt = typeof window < "u" && typeof document < "u";
|
|
691
695
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
692
|
-
var
|
|
693
|
-
function
|
|
696
|
+
var Et = (e) => e != null, Dt = Object.prototype.toString, Ot = (e) => Dt.call(e) === "[object Object]", kt = () => {}, At = /* @__PURE__ */ jt();
|
|
697
|
+
function jt() {
|
|
694
698
|
var e, t;
|
|
695
|
-
return
|
|
699
|
+
return Tt && !!(!((e = window) == null || (e = e.navigator) == null) && e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window) == null || (t = t.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
|
|
696
700
|
}
|
|
697
|
-
function
|
|
698
|
-
if (e.length !== 1) return
|
|
701
|
+
function Mt(...e) {
|
|
702
|
+
if (e.length !== 1) return O(...e);
|
|
699
703
|
let t = e[0];
|
|
700
|
-
return typeof t == "function" ?
|
|
704
|
+
return typeof t == "function" ? S(c(() => ({
|
|
701
705
|
get: t,
|
|
702
|
-
set:
|
|
703
|
-
}))) :
|
|
706
|
+
set: kt
|
|
707
|
+
}))) : C(t);
|
|
704
708
|
}
|
|
705
|
-
function
|
|
709
|
+
function Nt(e) {
|
|
706
710
|
return Array.isArray(e) ? e : [e];
|
|
707
711
|
}
|
|
708
|
-
function
|
|
712
|
+
function Pt(e, t, n) {
|
|
709
713
|
return j(e, t, {
|
|
710
714
|
...n,
|
|
711
715
|
immediate: !0
|
|
@@ -713,64 +717,64 @@ function Mt(e, t, n) {
|
|
|
713
717
|
}
|
|
714
718
|
//#endregion
|
|
715
719
|
//#region node_modules/@vueuse/core/dist/index.js
|
|
716
|
-
var
|
|
717
|
-
|
|
718
|
-
function
|
|
719
|
-
let t =
|
|
720
|
+
var Ft = Tt ? window : void 0;
|
|
721
|
+
Tt && window.document, Tt && window.navigator, Tt && window.location;
|
|
722
|
+
function It(e) {
|
|
723
|
+
let t = k(e);
|
|
720
724
|
return t?.$el ?? t;
|
|
721
725
|
}
|
|
722
|
-
function
|
|
726
|
+
function Lt(...e) {
|
|
723
727
|
let n = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), r = t(() => {
|
|
724
|
-
let t =
|
|
728
|
+
let t = Nt(k(e[0])).filter((e) => e != null);
|
|
725
729
|
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
726
730
|
});
|
|
727
|
-
return
|
|
728
|
-
r.value?.map((e) =>
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
731
|
+
return Pt(() => [
|
|
732
|
+
r.value?.map((e) => It(e)) ?? [Ft].filter((e) => e != null),
|
|
733
|
+
Nt(k(r.value ? e[1] : e[0])),
|
|
734
|
+
Nt(A(r.value ? e[2] : e[1])),
|
|
735
|
+
k(r.value ? e[3] : e[2])
|
|
732
736
|
], ([e, t, r, i], a, o) => {
|
|
733
737
|
if (!e?.length || !t?.length || !r?.length) return;
|
|
734
|
-
let s =
|
|
738
|
+
let s = Ot(i) ? { ...i } : i, c = e.flatMap((e) => t.flatMap((t) => r.map((r) => n(e, t, r, s))));
|
|
735
739
|
o(() => {
|
|
736
740
|
c.forEach((e) => e());
|
|
737
741
|
});
|
|
738
742
|
}, { flush: "post" });
|
|
739
743
|
}
|
|
740
|
-
function
|
|
741
|
-
let e =
|
|
742
|
-
return t &&
|
|
744
|
+
function Rt() {
|
|
745
|
+
let e = E(!1), t = u();
|
|
746
|
+
return t && v(() => {
|
|
743
747
|
e.value = !0;
|
|
744
748
|
}, t), e;
|
|
745
749
|
}
|
|
746
750
|
/* @__NO_SIDE_EFFECTS__ */
|
|
747
|
-
function
|
|
748
|
-
let n =
|
|
751
|
+
function zt(e) {
|
|
752
|
+
let n = Rt();
|
|
749
753
|
return t(() => (n.value, !!e()));
|
|
750
754
|
}
|
|
751
|
-
function
|
|
752
|
-
let { root: i, rootMargin: a, threshold: o = 0, window: s =
|
|
755
|
+
function Bt(e, n, r = {}) {
|
|
756
|
+
let { root: i, rootMargin: a, threshold: o = 0, window: s = Ft, immediate: c = !0 } = r, l = /* @__PURE__ */ zt(() => s && "IntersectionObserver" in s), u = t(() => Nt(k(e)).map(It).filter(Et)), d = kt, f = E(c), p = l.value ? j(() => [
|
|
753
757
|
u.value,
|
|
754
|
-
|
|
755
|
-
|
|
758
|
+
It(i),
|
|
759
|
+
k(a),
|
|
756
760
|
f.value
|
|
757
761
|
], ([e, t, r]) => {
|
|
758
762
|
if (d(), !f.value || !e.length) return;
|
|
759
763
|
let i = new IntersectionObserver(n, {
|
|
760
|
-
root:
|
|
764
|
+
root: It(t),
|
|
761
765
|
rootMargin: r,
|
|
762
766
|
threshold: o
|
|
763
767
|
});
|
|
764
768
|
e.forEach((e) => e && i.observe(e)), d = () => {
|
|
765
|
-
i.disconnect(), d =
|
|
769
|
+
i.disconnect(), d = kt;
|
|
766
770
|
};
|
|
767
771
|
}, {
|
|
768
772
|
immediate: c,
|
|
769
773
|
flush: "post"
|
|
770
|
-
}) :
|
|
774
|
+
}) : kt, m = () => {
|
|
771
775
|
d(), p(), f.value = !1;
|
|
772
776
|
};
|
|
773
|
-
return
|
|
777
|
+
return wt(m), {
|
|
774
778
|
isSupported: l,
|
|
775
779
|
isActive: f,
|
|
776
780
|
pause() {
|
|
@@ -782,42 +786,42 @@ function Rt(e, n, r = {}) {
|
|
|
782
786
|
stop: m
|
|
783
787
|
};
|
|
784
788
|
}
|
|
785
|
-
function
|
|
789
|
+
function Vt(e) {
|
|
786
790
|
return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
|
|
787
791
|
}
|
|
788
|
-
function
|
|
792
|
+
function Ht(e) {
|
|
789
793
|
let t = window.getComputedStyle(e);
|
|
790
794
|
if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight) return !0;
|
|
791
795
|
{
|
|
792
796
|
let t = e.parentNode;
|
|
793
|
-
return !t || t.tagName === "BODY" ? !1 :
|
|
797
|
+
return !t || t.tagName === "BODY" ? !1 : Ht(t);
|
|
794
798
|
}
|
|
795
799
|
}
|
|
796
|
-
function
|
|
800
|
+
function Ut(e) {
|
|
797
801
|
let t = e || window.event, n = t.target;
|
|
798
|
-
return
|
|
802
|
+
return Ht(n) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
|
|
799
803
|
}
|
|
800
|
-
var
|
|
801
|
-
function
|
|
802
|
-
let r =
|
|
803
|
-
j(
|
|
804
|
-
let t =
|
|
804
|
+
var Wt = /* @__PURE__ */ new WeakMap();
|
|
805
|
+
function Gt(e, n = !1) {
|
|
806
|
+
let r = E(n), i = null, a = "";
|
|
807
|
+
j(Mt(e), (e) => {
|
|
808
|
+
let t = Vt(k(e));
|
|
805
809
|
if (t) {
|
|
806
810
|
let e = t;
|
|
807
|
-
if (
|
|
811
|
+
if (Wt.get(e) || Wt.set(e, e.style.overflow), e.style.overflow !== "hidden" && (a = e.style.overflow), e.style.overflow === "hidden") return r.value = !0;
|
|
808
812
|
if (r.value) return e.style.overflow = "hidden";
|
|
809
813
|
}
|
|
810
814
|
}, { immediate: !0 });
|
|
811
815
|
let o = () => {
|
|
812
|
-
let t =
|
|
813
|
-
!t || r.value || (
|
|
814
|
-
|
|
816
|
+
let t = Vt(k(e));
|
|
817
|
+
!t || r.value || (At && (i = Lt(t, "touchmove", (e) => {
|
|
818
|
+
Ut(e);
|
|
815
819
|
}, { passive: !1 })), t.style.overflow = "hidden", r.value = !0);
|
|
816
820
|
}, s = () => {
|
|
817
|
-
let t =
|
|
818
|
-
!t || !r.value || (
|
|
821
|
+
let t = Vt(k(e));
|
|
822
|
+
!t || !r.value || (At && i?.(), t.style.overflow = a, Wt.delete(t), r.value = !1);
|
|
819
823
|
};
|
|
820
|
-
return
|
|
824
|
+
return wt(s), t({
|
|
821
825
|
get() {
|
|
822
826
|
return r.value;
|
|
823
827
|
},
|
|
@@ -828,26 +832,26 @@ function Ut(e, n = !1) {
|
|
|
828
832
|
}
|
|
829
833
|
//#endregion
|
|
830
834
|
//#region node_modules/@vueuse/components/dist/index.js
|
|
831
|
-
var
|
|
832
|
-
typeof t.value == "function" ?
|
|
835
|
+
var Kt = { mounted(e, t) {
|
|
836
|
+
typeof t.value == "function" ? Bt(e, t.value) : Bt(e, ...t.value);
|
|
833
837
|
} };
|
|
834
|
-
function
|
|
835
|
-
let e = !1, t =
|
|
838
|
+
function qt() {
|
|
839
|
+
let e = !1, t = E(!1);
|
|
836
840
|
return (n, r) => {
|
|
837
841
|
if (t.value = r.value, e) return;
|
|
838
842
|
e = !0;
|
|
839
|
-
let i =
|
|
843
|
+
let i = Gt(n, r.value);
|
|
840
844
|
j(t, (e) => i.value = e);
|
|
841
845
|
};
|
|
842
846
|
}
|
|
843
|
-
|
|
847
|
+
qt();
|
|
844
848
|
//#endregion
|
|
845
849
|
//#region src/constants/map.ts
|
|
846
|
-
var
|
|
850
|
+
var Jt = "https://maps.cartoway.com/styles/positron/style.json", Yt = "#f4f4f5", Xt = "bbox", K = "lochas", q = {
|
|
847
851
|
Bbox: {
|
|
848
852
|
id: "bbox-layer",
|
|
849
853
|
type: "line",
|
|
850
|
-
source:
|
|
854
|
+
source: Xt,
|
|
851
855
|
paint: {
|
|
852
856
|
"line-color": "#000000",
|
|
853
857
|
"line-width": 1,
|
|
@@ -899,7 +903,7 @@ var Kt = "https://maps.cartoway.com/styles/positron/style.json", qt = "#f4f4f5",
|
|
|
899
903
|
["get", "geom"],
|
|
900
904
|
!1
|
|
901
905
|
],
|
|
902
|
-
|
|
906
|
+
Yt,
|
|
903
907
|
[
|
|
904
908
|
"==",
|
|
905
909
|
["get", "is_new"],
|
|
@@ -940,7 +944,7 @@ var Kt = "https://maps.cartoway.com/styles/positron/style.json", qt = "#f4f4f5",
|
|
|
940
944
|
["get", "geom"],
|
|
941
945
|
!1
|
|
942
946
|
],
|
|
943
|
-
|
|
947
|
+
Yt,
|
|
944
948
|
[
|
|
945
949
|
"==",
|
|
946
950
|
["get", "is_new"],
|
|
@@ -1066,7 +1070,7 @@ var Kt = "https://maps.cartoway.com/styles/positron/style.json", qt = "#f4f4f5",
|
|
|
1066
1070
|
["get", "geom"],
|
|
1067
1071
|
!1
|
|
1068
1072
|
],
|
|
1069
|
-
|
|
1073
|
+
Yt,
|
|
1070
1074
|
[
|
|
1071
1075
|
"==",
|
|
1072
1076
|
["get", "is_new"],
|
|
@@ -1097,7 +1101,7 @@ var Kt = "https://maps.cartoway.com/styles/positron/style.json", qt = "#f4f4f5",
|
|
|
1097
1101
|
};
|
|
1098
1102
|
//#endregion
|
|
1099
1103
|
//#region node_modules/@turf/bbox-clip/dist/esm/index.js
|
|
1100
|
-
function
|
|
1104
|
+
function Zt(e, t, n) {
|
|
1101
1105
|
var r = e.length, i = J(e[0], t), a = [], o, s, c;
|
|
1102
1106
|
let l, u;
|
|
1103
1107
|
for (n ||= [], o = 1; o < r; o++) {
|
|
@@ -1105,57 +1109,57 @@ function Yt(e, t, n) {
|
|
|
1105
1109
|
a.push(l), s === c ? o === r - 1 && a.push(u) : (a.push(u), o < r - 1 && (n.push(a), a = []));
|
|
1106
1110
|
break;
|
|
1107
1111
|
} else if (i & s) break;
|
|
1108
|
-
else i ? (l =
|
|
1112
|
+
else i ? (l = $t(l, u, i, t), i = J(l, t)) : (u = $t(l, u, s, t), s = J(u, t));
|
|
1109
1113
|
i = c;
|
|
1110
1114
|
}
|
|
1111
1115
|
return a.length && n.push(a), n;
|
|
1112
1116
|
}
|
|
1113
|
-
function
|
|
1117
|
+
function Qt(e, t) {
|
|
1114
1118
|
var n, r, i, a, o, s, c;
|
|
1115
1119
|
for (r = 1; r <= 8; r *= 2) {
|
|
1116
|
-
for (n = [], i = e[e.length - 1], a = !(J(i, t) & r), o = 0; o < e.length; o++) s = e[o], c = !(J(s, t) & r), c !== a && n.push(
|
|
1120
|
+
for (n = [], i = e[e.length - 1], a = !(J(i, t) & r), o = 0; o < e.length; o++) s = e[o], c = !(J(s, t) & r), c !== a && n.push($t(i, s, r, t)), c && n.push(s), i = s, a = c;
|
|
1117
1121
|
if (e = n, !e.length) break;
|
|
1118
1122
|
}
|
|
1119
1123
|
return n;
|
|
1120
1124
|
}
|
|
1121
|
-
function
|
|
1125
|
+
function $t(e, t, n, r) {
|
|
1122
1126
|
return n & 8 ? [e[0] + (t[0] - e[0]) * (r[3] - e[1]) / (t[1] - e[1]), r[3]] : n & 4 ? [e[0] + (t[0] - e[0]) * (r[1] - e[1]) / (t[1] - e[1]), r[1]] : n & 2 ? [r[2], e[1] + (t[1] - e[1]) * (r[2] - e[0]) / (t[0] - e[0])] : n & 1 ? [r[0], e[1] + (t[1] - e[1]) * (r[0] - e[0]) / (t[0] - e[0])] : null;
|
|
1123
1127
|
}
|
|
1124
1128
|
function J(e, t) {
|
|
1125
1129
|
var n = 0;
|
|
1126
1130
|
return e[0] < t[0] ? n |= 1 : e[0] > t[2] && (n |= 2), e[1] < t[1] ? n |= 4 : e[1] > t[3] && (n |= 8), n;
|
|
1127
1131
|
}
|
|
1128
|
-
function
|
|
1132
|
+
function en(e, t) {
|
|
1129
1133
|
let n = H(e), r = n.type, i = e.type === "Feature" ? e.properties : {}, a = n.coordinates;
|
|
1130
1134
|
switch (r) {
|
|
1131
1135
|
case "LineString":
|
|
1132
1136
|
case "MultiLineString": {
|
|
1133
1137
|
let e = [];
|
|
1134
1138
|
return r === "LineString" && (a = [a]), a.forEach((n) => {
|
|
1135
|
-
|
|
1136
|
-
}), e.length === 1 ? I(e[0], i) :
|
|
1139
|
+
Zt(n, t, e);
|
|
1140
|
+
}), e.length === 1 ? I(e[0], i) : _e(e, i);
|
|
1137
1141
|
}
|
|
1138
|
-
case "Polygon": return
|
|
1139
|
-
case "MultiPolygon": return
|
|
1142
|
+
case "Polygon": return ge(tn(a, t), i);
|
|
1143
|
+
case "MultiPolygon": return ve(a.map((e) => tn(e, t)), i);
|
|
1140
1144
|
default: throw Error("geometry " + r + " not supported");
|
|
1141
1145
|
}
|
|
1142
1146
|
}
|
|
1143
|
-
function
|
|
1147
|
+
function tn(e, t) {
|
|
1144
1148
|
let n = [];
|
|
1145
1149
|
for (let r of e) {
|
|
1146
|
-
let e =
|
|
1150
|
+
let e = Qt(r, t);
|
|
1147
1151
|
e.length > 0 && ((e[0][0] !== e[e.length - 1][0] || e[0][1] !== e[e.length - 1][1]) && e.push(e[0]), e.length >= 4 && n.push(e));
|
|
1148
1152
|
}
|
|
1149
1153
|
return n;
|
|
1150
1154
|
}
|
|
1151
|
-
var
|
|
1155
|
+
var nn = en;
|
|
1152
1156
|
//#endregion
|
|
1153
1157
|
//#region node_modules/@turf/bbox-polygon/dist/esm/index.js
|
|
1154
|
-
function
|
|
1158
|
+
function rn(e, t = {}) {
|
|
1155
1159
|
let n = Number(e[0]), r = Number(e[1]), i = Number(e[2]), a = Number(e[3]);
|
|
1156
1160
|
if (e.length === 6) throw Error("@turf/bbox-polygon does not support BBox with 6 positions");
|
|
1157
1161
|
let o = [n, r];
|
|
1158
|
-
return
|
|
1162
|
+
return ge([[
|
|
1159
1163
|
o,
|
|
1160
1164
|
[i, r],
|
|
1161
1165
|
[i, a],
|
|
@@ -1166,8 +1170,8 @@ function tn(e, t = {}) {
|
|
|
1166
1170
|
id: t.id
|
|
1167
1171
|
});
|
|
1168
1172
|
}
|
|
1169
|
-
var
|
|
1170
|
-
function
|
|
1173
|
+
var an = rn, Y = 11102230246251565e-32, X = 134217729, on = (3 + 8 * Y) * Y;
|
|
1174
|
+
function sn(e, t, n, r, i) {
|
|
1171
1175
|
let a, o, s, c, l = t[0], u = r[0], d = 0, f = 0;
|
|
1172
1176
|
u > l == u > -l ? (a = l, l = t[++d]) : (a = u, u = r[++f]);
|
|
1173
1177
|
let p = 0;
|
|
@@ -1176,7 +1180,7 @@ function an(e, t, n, r, i) {
|
|
|
1176
1180
|
for (; f < n;) o = a + u, c = o - a, s = a - (o - c) + (u - c), u = r[++f], a = o, s !== 0 && (i[p++] = s);
|
|
1177
1181
|
return (a !== 0 || p === 0) && (i[p++] = a), p;
|
|
1178
1182
|
}
|
|
1179
|
-
function
|
|
1183
|
+
function cn(e, t) {
|
|
1180
1184
|
let n = t[0];
|
|
1181
1185
|
for (let r = 1; r < e; r++) n += t[r];
|
|
1182
1186
|
return n;
|
|
@@ -1186,26 +1190,26 @@ function Z(e) {
|
|
|
1186
1190
|
}
|
|
1187
1191
|
//#endregion
|
|
1188
1192
|
//#region node_modules/robust-predicates/esm/orient2d.js
|
|
1189
|
-
var
|
|
1190
|
-
function
|
|
1193
|
+
var ln = (3 + 16 * Y) * Y, un = (2 + 12 * Y) * Y, dn = (9 + 64 * Y) * Y * Y, fn = Z(4), pn = Z(8), mn = Z(12), hn = Z(16), Q = Z(4);
|
|
1194
|
+
function gn(e, t, n, r, i, a, o) {
|
|
1191
1195
|
let s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, T = e - i, E = n - i, D = t - a, O = r - a;
|
|
1192
|
-
b = T * O, f = X * T, p = f - (f - T), m = T - p, f = X * O, h = f - (f - O), g = O - h, x = m * g - (b - p * h - m * h - p * g), S = D * E, f = X * D, p = f - (f - D), m = D - p, f = X * E, h = f - (f - E), g = E - h, C = m * g - (S - p * h - m * h - p * g), _ = x - C, d = x - _,
|
|
1193
|
-
let k =
|
|
1194
|
-
if (k >= A || -k >= A || (d = e - T, s = e - (T + d) + (d - i), d = n - E, l = n - (E + d) + (d - i), d = t - D, c = t - (D + d) + (d - a), d = r - O, u = r - (O + d) + (d - a), s === 0 && c === 0 && l === 0 && u === 0) || (A =
|
|
1196
|
+
b = T * O, f = X * T, p = f - (f - T), m = T - p, f = X * O, h = f - (f - O), g = O - h, x = m * g - (b - p * h - m * h - p * g), S = D * E, f = X * D, p = f - (f - D), m = D - p, f = X * E, h = f - (f - E), g = E - h, C = m * g - (S - p * h - m * h - p * g), _ = x - C, d = x - _, fn[0] = x - (_ + d) + (d - C), v = b + _, d = v - b, y = b - (v - d) + (_ - d), _ = y - S, d = y - _, fn[1] = y - (_ + d) + (d - S), w = v + _, d = w - v, fn[2] = v - (w - d) + (_ - d), fn[3] = w;
|
|
1197
|
+
let k = cn(4, fn), A = un * o;
|
|
1198
|
+
if (k >= A || -k >= A || (d = e - T, s = e - (T + d) + (d - i), d = n - E, l = n - (E + d) + (d - i), d = t - D, c = t - (D + d) + (d - a), d = r - O, u = r - (O + d) + (d - a), s === 0 && c === 0 && l === 0 && u === 0) || (A = dn * o + on * Math.abs(k), k += T * u + O * s - (D * l + E * c), k >= A || -k >= A)) return k;
|
|
1195
1199
|
b = s * O, f = X * s, p = f - (f - s), m = s - p, f = X * O, h = f - (f - O), g = O - h, x = m * g - (b - p * h - m * h - p * g), S = c * E, f = X * c, p = f - (f - c), m = c - p, f = X * E, h = f - (f - E), g = E - h, C = m * g - (S - p * h - m * h - p * g), _ = x - C, d = x - _, Q[0] = x - (_ + d) + (d - C), v = b + _, d = v - b, y = b - (v - d) + (_ - d), _ = y - S, d = y - _, Q[1] = y - (_ + d) + (d - S), w = v + _, d = w - v, Q[2] = v - (w - d) + (_ - d), Q[3] = w;
|
|
1196
|
-
let ee =
|
|
1200
|
+
let ee = sn(4, fn, 4, Q, pn);
|
|
1197
1201
|
b = T * u, f = X * T, p = f - (f - T), m = T - p, f = X * u, h = f - (f - u), g = u - h, x = m * g - (b - p * h - m * h - p * g), S = D * l, f = X * D, p = f - (f - D), m = D - p, f = X * l, h = f - (f - l), g = l - h, C = m * g - (S - p * h - m * h - p * g), _ = x - C, d = x - _, Q[0] = x - (_ + d) + (d - C), v = b + _, d = v - b, y = b - (v - d) + (_ - d), _ = y - S, d = y - _, Q[1] = y - (_ + d) + (d - S), w = v + _, d = w - v, Q[2] = v - (w - d) + (_ - d), Q[3] = w;
|
|
1198
|
-
let te =
|
|
1199
|
-
return b = s * u, f = X * s, p = f - (f - s), m = s - p, f = X * u, h = f - (f - u), g = u - h, x = m * g - (b - p * h - m * h - p * g), S = c * l, f = X * c, p = f - (f - c), m = c - p, f = X * l, h = f - (f - l), g = l - h, C = m * g - (S - p * h - m * h - p * g), _ = x - C, d = x - _, Q[0] = x - (_ + d) + (d - C), v = b + _, d = v - b, y = b - (v - d) + (_ - d), _ = y - S, d = y - _, Q[1] = y - (_ + d) + (d - S), w = v + _, d = w - v, Q[2] = v - (w - d) + (_ - d), Q[3] = w,
|
|
1202
|
+
let te = sn(ee, pn, 4, Q, mn);
|
|
1203
|
+
return b = s * u, f = X * s, p = f - (f - s), m = s - p, f = X * u, h = f - (f - u), g = u - h, x = m * g - (b - p * h - m * h - p * g), S = c * l, f = X * c, p = f - (f - c), m = c - p, f = X * l, h = f - (f - l), g = l - h, C = m * g - (S - p * h - m * h - p * g), _ = x - C, d = x - _, Q[0] = x - (_ + d) + (d - C), v = b + _, d = v - b, y = b - (v - d) + (_ - d), _ = y - S, d = y - _, Q[1] = y - (_ + d) + (d - S), w = v + _, d = w - v, Q[2] = v - (w - d) + (_ - d), Q[3] = w, hn[sn(te, mn, 4, Q, hn) - 1];
|
|
1200
1204
|
}
|
|
1201
|
-
function
|
|
1205
|
+
function _n(e, t, n, r, i, a) {
|
|
1202
1206
|
let o = (t - a) * (n - i), s = (e - i) * (r - a), c = o - s, l = Math.abs(o + s);
|
|
1203
|
-
return Math.abs(c) >=
|
|
1207
|
+
return Math.abs(c) >= ln * l ? c : -gn(e, t, n, r, i, a, l);
|
|
1204
1208
|
}
|
|
1205
1209
|
(7 + 56 * Y) * Y, (3 + 28 * Y) * Y, (26 + 288 * Y) * Y * Y, Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(8), Z(8), Z(8), Z(4), Z(8), Z(8), Z(8), Z(12), Z(192), Z(192), (10 + 96 * Y) * Y, (4 + 48 * Y) * Y, (44 + 576 * Y) * Y * Y, Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(8), Z(8), Z(8), Z(8), Z(8), Z(8), Z(8), Z(8), Z(8), Z(4), Z(4), Z(4), Z(8), Z(16), Z(16), Z(16), Z(32), Z(32), Z(48), Z(64), Z(1152), Z(1152), (16 + 224 * Y) * Y, (5 + 72 * Y) * Y, (71 + 1408 * Y) * Y * Y, Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(24), Z(24), Z(24), Z(24), Z(24), Z(24), Z(24), Z(24), Z(24), Z(24), Z(1152), Z(1152), Z(1152), Z(1152), Z(1152), Z(2304), Z(2304), Z(3456), Z(5760), Z(8), Z(8), Z(8), Z(16), Z(24), Z(48), Z(48), Z(96), Z(192), Z(384), Z(384), Z(384), Z(768), Z(96), Z(96), Z(96), Z(1152);
|
|
1206
1210
|
//#endregion
|
|
1207
1211
|
//#region node_modules/point-in-polygon-hao/dist/esm/index.js
|
|
1208
|
-
function
|
|
1212
|
+
function vn(e, t) {
|
|
1209
1213
|
var n, r, i = 0, a, o, s, c, l, u, d, f = e[0], p = e[1], m = t.length;
|
|
1210
1214
|
for (n = 0; n < m; n++) {
|
|
1211
1215
|
r = 0;
|
|
@@ -1215,7 +1219,7 @@ function gn(e, t) {
|
|
|
1215
1219
|
if (d = h[r + 1], c = d[0] - f, l = d[1] - p, s === 0 && l === 0) {
|
|
1216
1220
|
if (c <= 0 && o >= 0 || o <= 0 && c >= 0) return 0;
|
|
1217
1221
|
} else if (l >= 0 && s <= 0 || l <= 0 && s >= 0) {
|
|
1218
|
-
if (a =
|
|
1222
|
+
if (a = _n(o, c, s, l, 0, 0), a === 0) return 0;
|
|
1219
1223
|
(a > 0 && l > 0 && s <= 0 || a < 0 && l <= 0 && s > 0) && i++;
|
|
1220
1224
|
}
|
|
1221
1225
|
u = d, s = l, o = c;
|
|
@@ -1225,26 +1229,26 @@ function gn(e, t) {
|
|
|
1225
1229
|
}
|
|
1226
1230
|
//#endregion
|
|
1227
1231
|
//#region node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js
|
|
1228
|
-
function
|
|
1232
|
+
function yn(e, t, n = {}) {
|
|
1229
1233
|
if (!e) throw Error("point is required");
|
|
1230
1234
|
if (!t) throw Error("polygon is required");
|
|
1231
1235
|
let r = B(e), i = H(t), a = i.type, o = t.bbox, s = i.coordinates;
|
|
1232
|
-
if (o &&
|
|
1236
|
+
if (o && bn(r, o) === !1) return !1;
|
|
1233
1237
|
a === "Polygon" && (s = [s]);
|
|
1234
1238
|
let c = !1;
|
|
1235
1239
|
for (var l = 0; l < s.length; ++l) {
|
|
1236
|
-
let e =
|
|
1240
|
+
let e = vn(r, s[l]);
|
|
1237
1241
|
if (e === 0) return !n.ignoreBoundary;
|
|
1238
1242
|
e && (c = !0);
|
|
1239
1243
|
}
|
|
1240
1244
|
return c;
|
|
1241
1245
|
}
|
|
1242
|
-
function
|
|
1246
|
+
function bn(e, t) {
|
|
1243
1247
|
return t[0] <= e[0] && t[1] <= e[1] && t[2] >= e[0] && t[3] >= e[1];
|
|
1244
1248
|
}
|
|
1245
1249
|
//#endregion
|
|
1246
1250
|
//#region node_modules/@turf/geojson-rbush/dist/esm/index.js
|
|
1247
|
-
var
|
|
1251
|
+
var xn = /* @__PURE__ */ pe((/* @__PURE__ */ de(((e, t) => {
|
|
1248
1252
|
(function(n, r) {
|
|
1249
1253
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n ||= self).RBush = r();
|
|
1250
1254
|
})(e, function() {
|
|
@@ -1462,7 +1466,7 @@ var yn = /* @__PURE__ */ fe((/* @__PURE__ */ ue(((e, t) => {
|
|
|
1462
1466
|
}, r;
|
|
1463
1467
|
});
|
|
1464
1468
|
})))(), 1);
|
|
1465
|
-
function
|
|
1469
|
+
function Sn(e) {
|
|
1466
1470
|
var t;
|
|
1467
1471
|
if (e.bbox) t = e.bbox;
|
|
1468
1472
|
else if (Array.isArray(e) && e.length === 4) t = e;
|
|
@@ -1482,9 +1486,9 @@ function bn(e) {
|
|
|
1482
1486
|
maxY: t[3]
|
|
1483
1487
|
};
|
|
1484
1488
|
}
|
|
1485
|
-
var
|
|
1489
|
+
var Cn = class {
|
|
1486
1490
|
constructor(e = 9) {
|
|
1487
|
-
this.tree = new
|
|
1491
|
+
this.tree = new xn.default(e), this.tree.toBBox = Sn;
|
|
1488
1492
|
}
|
|
1489
1493
|
insert(e) {
|
|
1490
1494
|
if (e.type !== "Feature") throw Error("invalid feature");
|
|
@@ -1495,7 +1499,7 @@ var xn = class {
|
|
|
1495
1499
|
return Array.isArray(e) ? e.forEach(function(e) {
|
|
1496
1500
|
if (e.type !== "Feature") throw Error("invalid features");
|
|
1497
1501
|
e.bbox = e.bbox ? e.bbox : G(e), t.push(e);
|
|
1498
|
-
}) :
|
|
1502
|
+
}) : we(e, function(e) {
|
|
1499
1503
|
if (e.type !== "Feature") throw Error("invalid features");
|
|
1500
1504
|
e.bbox = e.bbox ? e.bbox : G(e), t.push(e);
|
|
1501
1505
|
}), this.tree.load(t), this;
|
|
@@ -1508,10 +1512,10 @@ var xn = class {
|
|
|
1508
1512
|
return this.tree.clear(), this;
|
|
1509
1513
|
}
|
|
1510
1514
|
search(e) {
|
|
1511
|
-
return L(this.tree.search(
|
|
1515
|
+
return L(this.tree.search(Sn(e)));
|
|
1512
1516
|
}
|
|
1513
1517
|
collides(e) {
|
|
1514
|
-
return this.tree.collides(
|
|
1518
|
+
return this.tree.collides(Sn(e));
|
|
1515
1519
|
}
|
|
1516
1520
|
all() {
|
|
1517
1521
|
return L(this.tree.all());
|
|
@@ -1523,38 +1527,38 @@ var xn = class {
|
|
|
1523
1527
|
return this.tree.fromJSON(e), this;
|
|
1524
1528
|
}
|
|
1525
1529
|
};
|
|
1526
|
-
function
|
|
1527
|
-
return new
|
|
1530
|
+
function wn(e) {
|
|
1531
|
+
return new Cn(e);
|
|
1528
1532
|
}
|
|
1529
1533
|
//#endregion
|
|
1530
1534
|
//#region node_modules/@turf/truncate/dist/esm/index.js
|
|
1531
|
-
function
|
|
1532
|
-
if (t ??= {}, !
|
|
1535
|
+
function Tn(e, t) {
|
|
1536
|
+
if (t ??= {}, !Se(t)) throw Error("options is invalid");
|
|
1533
1537
|
var n = t.precision, r = t.coordinates, i = t.mutate;
|
|
1534
1538
|
if (n = n == null || isNaN(n) ? 6 : n, r = r == null || isNaN(r) ? 3 : r, !e) throw Error("<geojson> is required");
|
|
1535
1539
|
if (typeof n != "number") throw Error("<precision> must be a number");
|
|
1536
1540
|
if (typeof r != "number") throw Error("<coordinates> must be a number");
|
|
1537
1541
|
(i === !1 || i === void 0) && (e = JSON.parse(JSON.stringify(e)));
|
|
1538
1542
|
var a = 10 ** n;
|
|
1539
|
-
return
|
|
1540
|
-
|
|
1543
|
+
return Ce(e, function(e) {
|
|
1544
|
+
En(e, a, r);
|
|
1541
1545
|
}), e;
|
|
1542
1546
|
}
|
|
1543
|
-
function
|
|
1547
|
+
function En(e, t, n) {
|
|
1544
1548
|
e.length > n && e.splice(n, e.length);
|
|
1545
1549
|
for (var r = 0; r < e.length; r++) e[r] = Math.round(e[r] * t) / t;
|
|
1546
1550
|
return e;
|
|
1547
1551
|
}
|
|
1548
1552
|
//#endregion
|
|
1549
1553
|
//#region node_modules/@turf/line-segment/dist/esm/index.js
|
|
1550
|
-
function
|
|
1554
|
+
function Dn(e) {
|
|
1551
1555
|
if (!e) throw Error("geojson is required");
|
|
1552
1556
|
let t = [];
|
|
1553
|
-
return
|
|
1554
|
-
|
|
1557
|
+
return Oe(e, (e) => {
|
|
1558
|
+
On(e, t);
|
|
1555
1559
|
}), L(t);
|
|
1556
1560
|
}
|
|
1557
|
-
function
|
|
1561
|
+
function On(e, t) {
|
|
1558
1562
|
let n = [], r = e.geometry;
|
|
1559
1563
|
if (r !== null) {
|
|
1560
1564
|
switch (r.type) {
|
|
@@ -1564,20 +1568,20 @@ function En(e, t) {
|
|
|
1564
1568
|
case "LineString": n = [V(r)];
|
|
1565
1569
|
}
|
|
1566
1570
|
n.forEach((n) => {
|
|
1567
|
-
|
|
1571
|
+
kn(n, e.properties).forEach((e) => {
|
|
1568
1572
|
e.id = t.length, t.push(e);
|
|
1569
1573
|
});
|
|
1570
1574
|
});
|
|
1571
1575
|
}
|
|
1572
1576
|
}
|
|
1573
|
-
function
|
|
1577
|
+
function kn(e, t) {
|
|
1574
1578
|
let n = [];
|
|
1575
1579
|
return e.reduce((e, r) => {
|
|
1576
1580
|
let i = I([e, r], t);
|
|
1577
|
-
return i.bbox =
|
|
1581
|
+
return i.bbox = An(e, r), n.push(i), r;
|
|
1578
1582
|
}), n;
|
|
1579
1583
|
}
|
|
1580
|
-
function
|
|
1584
|
+
function An(e, t) {
|
|
1581
1585
|
let n = e[0], r = e[1], i = t[0], a = t[1];
|
|
1582
1586
|
return [
|
|
1583
1587
|
n < i ? n : i,
|
|
@@ -1588,8 +1592,8 @@ function On(e, t) {
|
|
|
1588
1592
|
}
|
|
1589
1593
|
//#endregion
|
|
1590
1594
|
//#region node_modules/sweepline-intersections/dist/sweeplineIntersections.esm.js
|
|
1591
|
-
var
|
|
1592
|
-
constructor(e = [], t =
|
|
1595
|
+
var jn = class {
|
|
1596
|
+
constructor(e = [], t = Mn) {
|
|
1593
1597
|
if (this.data = e, this.length = this.data.length, this.compare = t, this.length > 0) for (let e = (this.length >> 1) - 1; e >= 0; e--) this._down(e);
|
|
1594
1598
|
}
|
|
1595
1599
|
push(e) {
|
|
@@ -1622,16 +1626,16 @@ var kn = class {
|
|
|
1622
1626
|
t[e] = i;
|
|
1623
1627
|
}
|
|
1624
1628
|
};
|
|
1625
|
-
function
|
|
1629
|
+
function Mn(e, t) {
|
|
1626
1630
|
return e < t ? -1 : e > t ? 1 : 0;
|
|
1627
1631
|
}
|
|
1628
|
-
function
|
|
1632
|
+
function Nn(e, t) {
|
|
1629
1633
|
return e.p.x > t.p.x ? 1 : e.p.x < t.p.x ? -1 : e.p.y === t.p.y || e.p.y > t.p.y ? 1 : -1;
|
|
1630
1634
|
}
|
|
1631
|
-
function
|
|
1635
|
+
function Pn(e, t) {
|
|
1632
1636
|
return e.rightSweepEvent.p.x > t.rightSweepEvent.p.x ? 1 : e.rightSweepEvent.p.x < t.rightSweepEvent.p.x ? -1 : e.rightSweepEvent.p.y === t.rightSweepEvent.p.y || e.rightSweepEvent.p.y < t.rightSweepEvent.p.y ? 1 : -1;
|
|
1633
1637
|
}
|
|
1634
|
-
var
|
|
1638
|
+
var Fn = class {
|
|
1635
1639
|
constructor(e, t, n, r) {
|
|
1636
1640
|
this.p = {
|
|
1637
1641
|
x: e[0],
|
|
@@ -1642,50 +1646,50 @@ var Nn = class {
|
|
|
1642
1646
|
return this.p.x === e.p.x && this.p.y === e.p.y;
|
|
1643
1647
|
}
|
|
1644
1648
|
};
|
|
1645
|
-
function
|
|
1649
|
+
function In(e, t) {
|
|
1646
1650
|
if (e.type === "FeatureCollection") {
|
|
1647
1651
|
let n = e.features;
|
|
1648
|
-
for (let e = 0; e < n.length; e++)
|
|
1649
|
-
} else
|
|
1652
|
+
for (let e = 0; e < n.length; e++) Bn(n[e], t);
|
|
1653
|
+
} else Bn(e, t);
|
|
1650
1654
|
}
|
|
1651
|
-
var
|
|
1652
|
-
function
|
|
1655
|
+
var Ln = 0, Rn = 0, zn = 0;
|
|
1656
|
+
function Bn(e, t) {
|
|
1653
1657
|
let n = e.type === "Feature" ? e.geometry : e, r = n.coordinates;
|
|
1654
1658
|
(n.type === "Polygon" || n.type === "MultiLineString") && (r = [r]), n.type === "LineString" && (r = [[r]]);
|
|
1655
1659
|
for (let e = 0; e < r.length; e++) for (let n = 0; n < r[e].length; n++) {
|
|
1656
1660
|
let i = r[e][n][0], a = null;
|
|
1657
|
-
|
|
1661
|
+
Rn += 1;
|
|
1658
1662
|
for (let o = 0; o < r[e][n].length - 1; o++) {
|
|
1659
1663
|
a = r[e][n][o + 1];
|
|
1660
|
-
let s = new
|
|
1661
|
-
s.otherEvent = c, c.otherEvent = s,
|
|
1664
|
+
let s = new Fn(i, Ln, Rn, zn), c = new Fn(a, Ln, Rn, zn + 1);
|
|
1665
|
+
s.otherEvent = c, c.otherEvent = s, Nn(s, c) > 0 ? (c.isLeftEndpoint = !0, s.isLeftEndpoint = !1) : (s.isLeftEndpoint = !0, c.isLeftEndpoint = !1), t.push(s), t.push(c), i = a, zn += 1;
|
|
1662
1666
|
}
|
|
1663
1667
|
}
|
|
1664
|
-
|
|
1668
|
+
Ln += 1;
|
|
1665
1669
|
}
|
|
1666
|
-
var
|
|
1670
|
+
var Vn = class {
|
|
1667
1671
|
constructor(e) {
|
|
1668
1672
|
this.leftSweepEvent = e, this.rightSweepEvent = e.otherEvent;
|
|
1669
1673
|
}
|
|
1670
1674
|
};
|
|
1671
|
-
function
|
|
1675
|
+
function Hn(e, t) {
|
|
1672
1676
|
if (e === null || t === null || e.leftSweepEvent.ringId === t.leftSweepEvent.ringId && (e.rightSweepEvent.isSamePoint(t.leftSweepEvent) || e.rightSweepEvent.isSamePoint(t.leftSweepEvent) || e.rightSweepEvent.isSamePoint(t.rightSweepEvent) || e.leftSweepEvent.isSamePoint(t.leftSweepEvent) || e.leftSweepEvent.isSamePoint(t.rightSweepEvent))) return !1;
|
|
1673
1677
|
let n = e.leftSweepEvent.p.x, r = e.leftSweepEvent.p.y, i = e.rightSweepEvent.p.x, a = e.rightSweepEvent.p.y, o = t.leftSweepEvent.p.x, s = t.leftSweepEvent.p.y, c = t.rightSweepEvent.p.x, l = t.rightSweepEvent.p.y, u = (l - s) * (i - n) - (c - o) * (a - r), d = (c - o) * (r - s) - (l - s) * (n - o), f = (i - n) * (r - s) - (a - r) * (n - o);
|
|
1674
1678
|
if (u === 0) return !1;
|
|
1675
1679
|
let p = d / u, m = f / u;
|
|
1676
1680
|
return p >= 0 && p <= 1 && m >= 0 && m <= 1 ? [n + p * (i - n), r + p * (a - r)] : !1;
|
|
1677
1681
|
}
|
|
1678
|
-
function
|
|
1682
|
+
function Un(e, t) {
|
|
1679
1683
|
t ||= !1;
|
|
1680
|
-
let n = [], r = new
|
|
1684
|
+
let n = [], r = new jn([], Pn);
|
|
1681
1685
|
for (; e.length;) {
|
|
1682
1686
|
let i = e.pop();
|
|
1683
1687
|
if (i.isLeftEndpoint) {
|
|
1684
|
-
let e = new
|
|
1688
|
+
let e = new Vn(i);
|
|
1685
1689
|
for (let a = 0; a < r.data.length; a++) {
|
|
1686
1690
|
let o = r.data[a];
|
|
1687
1691
|
if (t && o.leftSweepEvent.featureId === i.featureId) continue;
|
|
1688
|
-
let s =
|
|
1692
|
+
let s = Hn(e, o);
|
|
1689
1693
|
s !== !1 && n.push(s);
|
|
1690
1694
|
}
|
|
1691
1695
|
r.push(e);
|
|
@@ -1693,17 +1697,17 @@ function Vn(e, t) {
|
|
|
1693
1697
|
}
|
|
1694
1698
|
return n;
|
|
1695
1699
|
}
|
|
1696
|
-
function
|
|
1697
|
-
let n = new
|
|
1698
|
-
return
|
|
1700
|
+
function Wn(e, t) {
|
|
1701
|
+
let n = new jn([], Nn);
|
|
1702
|
+
return In(e, n), Un(n, t);
|
|
1699
1703
|
}
|
|
1700
1704
|
//#endregion
|
|
1701
1705
|
//#region node_modules/@turf/line-intersect/dist/esm/index.js
|
|
1702
|
-
var
|
|
1703
|
-
function
|
|
1706
|
+
var Gn = Wn;
|
|
1707
|
+
function Kn(e, t, n = {}) {
|
|
1704
1708
|
let { removeDuplicates: r = !0, ignoreSelfIntersections: i = !0 } = n, a = [];
|
|
1705
1709
|
e.type === "FeatureCollection" ? a = a.concat(e.features) : e.type === "Feature" ? a.push(e) : (e.type === "LineString" || e.type === "Polygon" || e.type === "MultiLineString" || e.type === "MultiPolygon") && a.push(F(e)), t.type === "FeatureCollection" ? a = a.concat(t.features) : t.type === "Feature" ? a.push(t) : (t.type === "LineString" || t.type === "Polygon" || t.type === "MultiLineString" || t.type === "MultiPolygon") && a.push(F(t));
|
|
1706
|
-
let o =
|
|
1710
|
+
let o = Gn(L(a), i), s = [];
|
|
1707
1711
|
if (r) {
|
|
1708
1712
|
let e = {};
|
|
1709
1713
|
o.forEach((t) => {
|
|
@@ -1711,29 +1715,29 @@ function Wn(e, t, n = {}) {
|
|
|
1711
1715
|
e[n] || (e[n] = !0, s.push(t));
|
|
1712
1716
|
});
|
|
1713
1717
|
} else s = o;
|
|
1714
|
-
return L(s.map((e) =>
|
|
1718
|
+
return L(s.map((e) => he(e)));
|
|
1715
1719
|
}
|
|
1716
1720
|
//#endregion
|
|
1717
1721
|
//#region node_modules/@turf/distance/dist/esm/index.js
|
|
1718
|
-
function
|
|
1722
|
+
function qn(e, t, n = {}) {
|
|
1719
1723
|
var r = B(e), i = B(t), a = R(i[1] - r[1]), o = R(i[0] - r[0]), s = R(r[1]), c = R(i[1]), l = Math.sin(a / 2) ** 2 + Math.sin(o / 2) ** 2 * Math.cos(s) * Math.cos(c);
|
|
1720
|
-
return
|
|
1724
|
+
return ye(2 * Math.atan2(Math.sqrt(l), Math.sqrt(1 - l)), n.units);
|
|
1721
1725
|
}
|
|
1722
1726
|
//#endregion
|
|
1723
1727
|
//#region node_modules/@turf/nearest-point-on-line/dist/esm/index.js
|
|
1724
|
-
var
|
|
1728
|
+
var Jn = Object.defineProperty, Yn = Object.defineProperties, Xn = Object.getOwnPropertyDescriptors, Zn = Object.getOwnPropertySymbols, Qn = Object.prototype.hasOwnProperty, $n = Object.prototype.propertyIsEnumerable, er = (e, t, n) => t in e ? Jn(e, t, {
|
|
1725
1729
|
enumerable: !0,
|
|
1726
1730
|
configurable: !0,
|
|
1727
1731
|
writable: !0,
|
|
1728
1732
|
value: n
|
|
1729
|
-
}) : e[t] = n,
|
|
1730
|
-
for (var n in t ||= {})
|
|
1731
|
-
if (
|
|
1733
|
+
}) : e[t] = n, tr = (e, t) => {
|
|
1734
|
+
for (var n in t ||= {}) Qn.call(t, n) && er(e, n, t[n]);
|
|
1735
|
+
if (Zn) for (var n of Zn(t)) $n.call(t, n) && er(e, n, t[n]);
|
|
1732
1736
|
return e;
|
|
1733
|
-
},
|
|
1734
|
-
function
|
|
1737
|
+
}, nr = (e, t) => Yn(e, Xn(t));
|
|
1738
|
+
function rr(e, t, n = {}) {
|
|
1735
1739
|
if (!e || !t) throw Error("lines and inputPoint are required arguments");
|
|
1736
|
-
let r = B(t), i =
|
|
1740
|
+
let r = B(t), i = he([Infinity, Infinity], {
|
|
1737
1741
|
lineStringIndex: -1,
|
|
1738
1742
|
segmentIndex: -1,
|
|
1739
1743
|
totalDistance: -1,
|
|
@@ -1745,16 +1749,16 @@ function tr(e, t, n = {}) {
|
|
|
1745
1749
|
location: -1,
|
|
1746
1750
|
dist: Infinity
|
|
1747
1751
|
}), a = 0, o = 0, s = -1;
|
|
1748
|
-
return
|
|
1752
|
+
return Oe(e, function(e, c, l) {
|
|
1749
1753
|
s !== l && (s = l, o = 0);
|
|
1750
1754
|
let u = V(e);
|
|
1751
1755
|
for (let e = 0; e < u.length - 1; e++) {
|
|
1752
|
-
let s =
|
|
1753
|
-
f[0] === r[0] && f[1] === r[1] ? [m, h] = [f, !0] : c[0] === r[0] && c[1] === r[1] ? [m, h] = [c, !1] : [m, h] =
|
|
1754
|
-
let g =
|
|
1756
|
+
let s = he(u[e]), c = B(s), d = he(u[e + 1]), f = B(d), p = qn(s, d, n), m, h;
|
|
1757
|
+
f[0] === r[0] && f[1] === r[1] ? [m, h] = [f, !0] : c[0] === r[0] && c[1] === r[1] ? [m, h] = [c, !1] : [m, h] = lr(c, f, r);
|
|
1758
|
+
let g = qn(t, m, n);
|
|
1755
1759
|
if (g < i.properties.pointDistance) {
|
|
1756
|
-
let t =
|
|
1757
|
-
i =
|
|
1760
|
+
let t = qn(s, m, n);
|
|
1761
|
+
i = he(m, {
|
|
1758
1762
|
lineStringIndex: l,
|
|
1759
1763
|
segmentIndex: h ? e + 1 : e,
|
|
1760
1764
|
totalDistance: a + t,
|
|
@@ -1765,7 +1769,7 @@ function tr(e, t, n = {}) {
|
|
|
1765
1769
|
index: -1,
|
|
1766
1770
|
location: -1,
|
|
1767
1771
|
dist: Infinity
|
|
1768
|
-
}), i.properties =
|
|
1772
|
+
}), i.properties = nr(tr({}, i.properties), {
|
|
1769
1773
|
multiFeatureIndex: i.properties.lineStringIndex,
|
|
1770
1774
|
index: i.properties.segmentIndex,
|
|
1771
1775
|
location: i.properties.totalDistance,
|
|
@@ -1780,7 +1784,7 @@ function $(e, t) {
|
|
|
1780
1784
|
let [n, r, i] = e, [a, o, s] = t;
|
|
1781
1785
|
return n * a + r * o + i * s;
|
|
1782
1786
|
}
|
|
1783
|
-
function
|
|
1787
|
+
function ir(e, t) {
|
|
1784
1788
|
let [n, r, i] = e, [a, o, s] = t;
|
|
1785
1789
|
return [
|
|
1786
1790
|
r * s - i * o,
|
|
@@ -1788,18 +1792,18 @@ function nr(e, t) {
|
|
|
1788
1792
|
n * o - r * a
|
|
1789
1793
|
];
|
|
1790
1794
|
}
|
|
1791
|
-
function
|
|
1795
|
+
function ar(e) {
|
|
1792
1796
|
return Math.sqrt(e[0] ** 2 + e[1] ** 2 + e[2] ** 2);
|
|
1793
1797
|
}
|
|
1794
|
-
function
|
|
1795
|
-
let t =
|
|
1798
|
+
function or(e) {
|
|
1799
|
+
let t = ar(e);
|
|
1796
1800
|
return [
|
|
1797
1801
|
e[0] / t,
|
|
1798
1802
|
e[1] / t,
|
|
1799
1803
|
e[2] / t
|
|
1800
1804
|
];
|
|
1801
1805
|
}
|
|
1802
|
-
function
|
|
1806
|
+
function sr(e) {
|
|
1803
1807
|
let t = R(e[1]), n = R(e[0]);
|
|
1804
1808
|
return [
|
|
1805
1809
|
Math.cos(t) * Math.cos(n),
|
|
@@ -1807,144 +1811,144 @@ function ar(e) {
|
|
|
1807
1811
|
Math.sin(t)
|
|
1808
1812
|
];
|
|
1809
1813
|
}
|
|
1810
|
-
function
|
|
1811
|
-
let [t, n, r] = e, i = Math.min(Math.max(r, -1), 1), a =
|
|
1812
|
-
return [
|
|
1814
|
+
function cr(e) {
|
|
1815
|
+
let [t, n, r] = e, i = Math.min(Math.max(r, -1), 1), a = be(Math.asin(i));
|
|
1816
|
+
return [be(Math.atan2(n, t)), a];
|
|
1813
1817
|
}
|
|
1814
|
-
function
|
|
1815
|
-
let r =
|
|
1818
|
+
function lr(e, t, n) {
|
|
1819
|
+
let r = sr(e), i = sr(t), a = sr(n), o = ir(r, i);
|
|
1816
1820
|
if (o[0] === 0 && o[1] === 0 && o[2] === 0) return $(r, i) > 0 ? [[...t], !0] : [[...n], !1];
|
|
1817
|
-
let s =
|
|
1821
|
+
let s = ir(o, a);
|
|
1818
1822
|
if (s[0] === 0 && s[1] === 0 && s[2] === 0) return [[...t], !0];
|
|
1819
|
-
let c = ir(
|
|
1823
|
+
let c = or(ir(s, o)), l = [
|
|
1820
1824
|
-c[0],
|
|
1821
1825
|
-c[1],
|
|
1822
1826
|
-c[2]
|
|
1823
|
-
], u = $(a, c) > $(a, l) ? c : l, d =
|
|
1824
|
-
return f >= 0 && p >= 0 ? [
|
|
1827
|
+
], u = $(a, c) > $(a, l) ? c : l, d = or(o), f = $(ir(r, u), d), p = $(ir(u, i), d);
|
|
1828
|
+
return f >= 0 && p >= 0 ? [cr(u), !1] : $(r, a) > $(i, a) ? [[...e], !1] : [[...t], !0];
|
|
1825
1829
|
}
|
|
1826
1830
|
//#endregion
|
|
1827
1831
|
//#region node_modules/@turf/line-split/dist/esm/index.js
|
|
1828
|
-
function
|
|
1832
|
+
function ur(e, t) {
|
|
1829
1833
|
if (!e) throw Error("line is required");
|
|
1830
1834
|
if (!t) throw Error("splitter is required");
|
|
1831
|
-
let n =
|
|
1835
|
+
let n = Ue(e), r = Ue(t);
|
|
1832
1836
|
if (n !== "LineString") throw Error("line must be LineString");
|
|
1833
1837
|
if (r === "FeatureCollection") throw Error("splitter cannot be a FeatureCollection");
|
|
1834
1838
|
if (r === "GeometryCollection") throw Error("splitter cannot be a GeometryCollection");
|
|
1835
|
-
var i =
|
|
1839
|
+
var i = Tn(t, { precision: 7 });
|
|
1836
1840
|
switch (e.type !== "Feature" && (e = F(e)), r) {
|
|
1837
|
-
case "Point": return
|
|
1838
|
-
case "MultiPoint": return
|
|
1841
|
+
case "Point": return fr(e, i);
|
|
1842
|
+
case "MultiPoint": return dr(e, i);
|
|
1839
1843
|
case "LineString":
|
|
1840
1844
|
case "MultiLineString":
|
|
1841
1845
|
case "Polygon":
|
|
1842
|
-
case "MultiPolygon": return
|
|
1846
|
+
case "MultiPolygon": return dr(e, Kn(e, i, { ignoreSelfIntersections: !0 }));
|
|
1843
1847
|
}
|
|
1844
1848
|
}
|
|
1845
|
-
function
|
|
1846
|
-
var n = [], r =
|
|
1847
|
-
return
|
|
1849
|
+
function dr(e, t) {
|
|
1850
|
+
var n = [], r = wn();
|
|
1851
|
+
return Oe(t, function(t) {
|
|
1848
1852
|
if (n.forEach(function(e, t) {
|
|
1849
1853
|
e.id = t;
|
|
1850
|
-
}), !n.length) n =
|
|
1854
|
+
}), !n.length) n = fr(e, t).features, r.load(L(n));
|
|
1851
1855
|
else {
|
|
1852
1856
|
var i = r.search(t);
|
|
1853
1857
|
if (i.features.length) {
|
|
1854
|
-
var a =
|
|
1858
|
+
var a = pr(t, i);
|
|
1855
1859
|
n = n.filter(function(e) {
|
|
1856
1860
|
return e.id !== a.id;
|
|
1857
|
-
}), r.remove(a),
|
|
1861
|
+
}), r.remove(a), we(fr(a, t), function(e) {
|
|
1858
1862
|
n.push(e), r.insert(e);
|
|
1859
1863
|
});
|
|
1860
1864
|
}
|
|
1861
1865
|
}
|
|
1862
1866
|
}), L(n);
|
|
1863
1867
|
}
|
|
1864
|
-
function
|
|
1868
|
+
function fr(e, t) {
|
|
1865
1869
|
var n = [], r = V(e)[0], i = V(e)[e.geometry.coordinates.length - 1];
|
|
1866
|
-
if (
|
|
1867
|
-
var a =
|
|
1870
|
+
if (mr(r, B(t)) || mr(i, B(t))) return L([e]);
|
|
1871
|
+
var a = wn(), o = Dn(e);
|
|
1868
1872
|
a.load(o);
|
|
1869
1873
|
var s = a.search(t);
|
|
1870
1874
|
if (!s.features.length) return L([e]);
|
|
1871
|
-
var c =
|
|
1875
|
+
var c = pr(t, s), l = Te(o, function(e, r, i) {
|
|
1872
1876
|
var a = V(r)[1], o = B(t);
|
|
1873
|
-
return i === c.id ? (e.push(o), n.push(I(e)),
|
|
1877
|
+
return i === c.id ? (e.push(o), n.push(I(e)), mr(o, a) ? [o] : [o, a]) : (e.push(a), e);
|
|
1874
1878
|
}, [r]);
|
|
1875
1879
|
return l.length > 1 && n.push(I(l)), L(n);
|
|
1876
1880
|
}
|
|
1877
|
-
function
|
|
1881
|
+
function pr(e, t) {
|
|
1878
1882
|
if (!t.features.length) throw Error("lines must contain features");
|
|
1879
1883
|
if (t.features.length === 1) return t.features[0];
|
|
1880
1884
|
var n, r = Infinity;
|
|
1881
|
-
return
|
|
1882
|
-
var i =
|
|
1885
|
+
return we(t, function(t) {
|
|
1886
|
+
var i = rr(t, e).properties.dist;
|
|
1883
1887
|
i < r && (n = t, r = i);
|
|
1884
1888
|
}), n;
|
|
1885
1889
|
}
|
|
1886
|
-
function
|
|
1890
|
+
function mr(e, t) {
|
|
1887
1891
|
return e[0] === t[0] && e[1] === t[1];
|
|
1888
1892
|
}
|
|
1889
1893
|
//#endregion
|
|
1890
1894
|
//#region node_modules/@turf/boolean-contains/dist/esm/index.js
|
|
1891
|
-
function
|
|
1895
|
+
function hr(e, t) {
|
|
1892
1896
|
let n = H(e), r = H(t), i = n.type, a = r.type, o = n.coordinates, s = r.coordinates;
|
|
1893
1897
|
switch (i) {
|
|
1894
1898
|
case "Point": switch (a) {
|
|
1895
|
-
case "Point": return
|
|
1899
|
+
case "Point": return Dr(o, s);
|
|
1896
1900
|
default: throw Error("feature2 " + a + " geometry not supported");
|
|
1897
1901
|
}
|
|
1898
1902
|
case "MultiPoint": switch (a) {
|
|
1899
|
-
case "Point": return
|
|
1900
|
-
case "MultiPoint": return
|
|
1903
|
+
case "Point": return vr(n, r);
|
|
1904
|
+
case "MultiPoint": return yr(n, r);
|
|
1901
1905
|
default: throw Error("feature2 " + a + " geometry not supported");
|
|
1902
1906
|
}
|
|
1903
1907
|
case "LineString": switch (a) {
|
|
1904
1908
|
case "Point": return U(r, n, { ignoreEndVertices: !0 });
|
|
1905
|
-
case "LineString": return
|
|
1906
|
-
case "MultiPoint": return
|
|
1909
|
+
case "LineString": return Sr(n, r);
|
|
1910
|
+
case "MultiPoint": return br(n, r);
|
|
1907
1911
|
default: throw Error("feature2 " + a + " geometry not supported");
|
|
1908
1912
|
}
|
|
1909
1913
|
case "Polygon": switch (a) {
|
|
1910
|
-
case "Point": return
|
|
1911
|
-
case "LineString": return
|
|
1912
|
-
case "Polygon": return
|
|
1913
|
-
case "MultiPoint": return
|
|
1914
|
-
case "MultiPolygon": return
|
|
1914
|
+
case "Point": return yn(r, n, { ignoreBoundary: !0 });
|
|
1915
|
+
case "LineString": return wr(n, r);
|
|
1916
|
+
case "Polygon": return Tr(n, r);
|
|
1917
|
+
case "MultiPoint": return xr(n, r);
|
|
1918
|
+
case "MultiPolygon": return _r(n, r);
|
|
1915
1919
|
default: throw Error("feature2 " + a + " geometry not supported");
|
|
1916
1920
|
}
|
|
1917
1921
|
case "MultiPolygon": switch (a) {
|
|
1918
|
-
case "Polygon": return
|
|
1922
|
+
case "Polygon": return gr(n, r);
|
|
1919
1923
|
default: throw Error("feature2 " + a + " geometry not supported");
|
|
1920
1924
|
}
|
|
1921
1925
|
default: throw Error("feature1 " + i + " geometry not supported");
|
|
1922
1926
|
}
|
|
1923
1927
|
}
|
|
1924
|
-
function
|
|
1925
|
-
return e.coordinates.some((e) =>
|
|
1928
|
+
function gr(e, t) {
|
|
1929
|
+
return e.coordinates.some((e) => Tr({
|
|
1926
1930
|
type: "Polygon",
|
|
1927
1931
|
coordinates: e
|
|
1928
1932
|
}, t));
|
|
1929
1933
|
}
|
|
1930
|
-
function
|
|
1931
|
-
return t.coordinates.every((t) =>
|
|
1934
|
+
function _r(e, t) {
|
|
1935
|
+
return t.coordinates.every((t) => Tr(e, {
|
|
1932
1936
|
type: "Polygon",
|
|
1933
1937
|
coordinates: t
|
|
1934
1938
|
}));
|
|
1935
1939
|
}
|
|
1936
|
-
function
|
|
1940
|
+
function vr(e, t) {
|
|
1937
1941
|
let n, r = !1;
|
|
1938
|
-
for (n = 0; n < e.coordinates.length; n++) if (
|
|
1942
|
+
for (n = 0; n < e.coordinates.length; n++) if (Dr(e.coordinates[n], t.coordinates)) {
|
|
1939
1943
|
r = !0;
|
|
1940
1944
|
break;
|
|
1941
1945
|
}
|
|
1942
1946
|
return r;
|
|
1943
1947
|
}
|
|
1944
|
-
function
|
|
1948
|
+
function yr(e, t) {
|
|
1945
1949
|
for (let n of t.coordinates) {
|
|
1946
1950
|
let t = !1;
|
|
1947
|
-
for (let r of e.coordinates) if (
|
|
1951
|
+
for (let r of e.coordinates) if (Dr(n, r)) {
|
|
1948
1952
|
t = !0;
|
|
1949
1953
|
break;
|
|
1950
1954
|
}
|
|
@@ -1952,16 +1956,16 @@ function _r(e, t) {
|
|
|
1952
1956
|
}
|
|
1953
1957
|
return !0;
|
|
1954
1958
|
}
|
|
1955
|
-
function
|
|
1959
|
+
function br(e, t) {
|
|
1956
1960
|
let n = !1;
|
|
1957
1961
|
for (let r of t.coordinates) if (U(r, e, { ignoreEndVertices: !0 }) && (n = !0), !U(r, e)) return !1;
|
|
1958
1962
|
return !!n;
|
|
1959
1963
|
}
|
|
1960
|
-
function
|
|
1961
|
-
for (let n of t.coordinates) if (!
|
|
1964
|
+
function xr(e, t) {
|
|
1965
|
+
for (let n of t.coordinates) if (!yn(n, e, { ignoreBoundary: !0 })) return !1;
|
|
1962
1966
|
return !0;
|
|
1963
1967
|
}
|
|
1964
|
-
function
|
|
1968
|
+
function Sr(e, t) {
|
|
1965
1969
|
let n = !1;
|
|
1966
1970
|
for (let r of t.coordinates) if (U({
|
|
1967
1971
|
type: "Point",
|
|
@@ -1972,68 +1976,74 @@ function br(e, t) {
|
|
|
1972
1976
|
}, e, { ignoreEndVertices: !1 })) return !1;
|
|
1973
1977
|
return n;
|
|
1974
1978
|
}
|
|
1975
|
-
function
|
|
1979
|
+
function Cr(e, t) {
|
|
1976
1980
|
let n = e.coordinates, r = [];
|
|
1977
1981
|
for (let e = 0; e < n.length - 1; e++) {
|
|
1978
|
-
let i = I([n[e], n[e + 1]]), a =
|
|
1982
|
+
let i = I([n[e], n[e + 1]]), a = ur(i, F(t));
|
|
1979
1983
|
a.features.length === 0 ? r.push(i) : r.push(...a.features);
|
|
1980
1984
|
}
|
|
1981
1985
|
return L(r);
|
|
1982
1986
|
}
|
|
1983
|
-
function
|
|
1984
|
-
if (!
|
|
1985
|
-
for (let n of t.coordinates) if (!
|
|
1986
|
-
let n = !1, r =
|
|
1987
|
+
function wr(e, t) {
|
|
1988
|
+
if (!Er(G(e), G(t))) return !1;
|
|
1989
|
+
for (let n of t.coordinates) if (!yn(n, e)) return !1;
|
|
1990
|
+
let n = !1, r = Cr(t, e);
|
|
1987
1991
|
for (let t of r.features) {
|
|
1988
|
-
let r =
|
|
1989
|
-
if (!
|
|
1990
|
-
!n &&
|
|
1992
|
+
let r = Or(t.geometry.coordinates[0], t.geometry.coordinates[1]);
|
|
1993
|
+
if (!yn(r, e)) return !1;
|
|
1994
|
+
!n && yn(r, e, { ignoreBoundary: !0 }) && (n = !0);
|
|
1991
1995
|
}
|
|
1992
1996
|
return n;
|
|
1993
1997
|
}
|
|
1994
|
-
function
|
|
1995
|
-
if (e.type === "Feature" && e.geometry === null || t.type === "Feature" && t.geometry === null || !
|
|
1998
|
+
function Tr(e, t) {
|
|
1999
|
+
if (e.type === "Feature" && e.geometry === null || t.type === "Feature" && t.geometry === null || !Er(G(e), G(t))) return !1;
|
|
1996
2000
|
let n = H(t).coordinates;
|
|
1997
|
-
for (let t of n) for (let n of t) if (!
|
|
2001
|
+
for (let t of n) for (let n of t) if (!yn(n, e)) return !1;
|
|
1998
2002
|
return !0;
|
|
1999
2003
|
}
|
|
2000
|
-
function
|
|
2004
|
+
function Er(e, t) {
|
|
2001
2005
|
return !(e[0] > t[0] || e[2] < t[2] || e[1] > t[1] || e[3] < t[3]);
|
|
2002
2006
|
}
|
|
2003
|
-
function
|
|
2007
|
+
function Dr(e, t) {
|
|
2004
2008
|
return e[0] === t[0] && e[1] === t[1];
|
|
2005
2009
|
}
|
|
2006
|
-
function
|
|
2010
|
+
function Or(e, t) {
|
|
2007
2011
|
return [(e[0] + t[0]) / 2, (e[1] + t[1]) / 2];
|
|
2008
2012
|
}
|
|
2009
|
-
var
|
|
2013
|
+
var kr = hr;
|
|
2010
2014
|
//#endregion
|
|
2011
2015
|
//#region node_modules/@turf/envelope/dist/esm/index.js
|
|
2012
|
-
function
|
|
2013
|
-
return
|
|
2016
|
+
function Ar(e) {
|
|
2017
|
+
return rn(G(e));
|
|
2014
2018
|
}
|
|
2015
|
-
var
|
|
2019
|
+
var jr = Ar;
|
|
2016
2020
|
//#endregion
|
|
2017
2021
|
//#region src/utils/geom.ts
|
|
2018
|
-
function
|
|
2022
|
+
function Mr(e) {
|
|
2019
2023
|
return e.geometry && (e.geometry.type === "LineString" || e.geometry.type === "MultiLineString" || e.geometry.type === "Polygon" || e.geometry.type === "MultiPolygon");
|
|
2020
2024
|
}
|
|
2021
|
-
function
|
|
2022
|
-
let n = e.map((e) => e.geometry ? e.geometry.type === "Point" || e.geometry.type === "MultiPoint" ?
|
|
2023
|
-
return n.length === 0 ? null :
|
|
2025
|
+
function Nr(e, t) {
|
|
2026
|
+
let n = e.map((e) => e.geometry ? e.geometry.type === "Point" || e.geometry.type === "MultiPoint" ? kr(an(t), e) ? e : null : Mr(e) ? nn(e, t) : null : null).filter((e) => e !== null);
|
|
2027
|
+
return n.length === 0 ? null : jr(L(n));
|
|
2024
2028
|
}
|
|
2025
|
-
var
|
|
2026
|
-
function
|
|
2029
|
+
var Pr = .001, Fr = 1e-4;
|
|
2030
|
+
function Ir(e, t) {
|
|
2027
2031
|
return [
|
|
2028
|
-
e[0] -
|
|
2029
|
-
e[1] -
|
|
2030
|
-
e[2] +
|
|
2031
|
-
e[3] +
|
|
2032
|
+
e[0] - t,
|
|
2033
|
+
e[1] - t,
|
|
2034
|
+
e[2] + t,
|
|
2035
|
+
e[3] + t
|
|
2032
2036
|
];
|
|
2033
2037
|
}
|
|
2038
|
+
function Lr(e) {
|
|
2039
|
+
return Ir(e, Pr);
|
|
2040
|
+
}
|
|
2041
|
+
function Rr(e) {
|
|
2042
|
+
return Ir(e, Fr);
|
|
2043
|
+
}
|
|
2034
2044
|
//#endregion
|
|
2035
2045
|
//#region src/components/VMap.vue?vue&type=script&setup=true&lang.ts
|
|
2036
|
-
var
|
|
2046
|
+
var zr = ["id"], Br = /* @__PURE__ */ xt(/* @__PURE__ */ l({
|
|
2037
2047
|
__name: "VMap",
|
|
2038
2048
|
props: {
|
|
2039
2049
|
id: {},
|
|
@@ -2041,12 +2051,12 @@ var Pr = ["id"], Fr = /* @__PURE__ */ yt(/* @__PURE__ */ c({
|
|
|
2041
2051
|
bbox: {}
|
|
2042
2052
|
},
|
|
2043
2053
|
setup(e) {
|
|
2044
|
-
let t = e, n =
|
|
2054
|
+
let t = e, n = p(nt, Jt), r = {
|
|
2045
2055
|
top: 60,
|
|
2046
2056
|
left: 60,
|
|
2047
2057
|
right: 60,
|
|
2048
2058
|
bottom: 80
|
|
2049
|
-
}, a =
|
|
2059
|
+
}, a = E(), o = E(!1), s = E(), c = E(), l;
|
|
2050
2060
|
j(o, (e) => {
|
|
2051
2061
|
e ? u() : (a.value && a.value.remove(), a.value = void 0);
|
|
2052
2062
|
}), j(() => t.features, (e) => {
|
|
@@ -2054,11 +2064,11 @@ var Pr = ["id"], Fr = /* @__PURE__ */ yt(/* @__PURE__ */ c({
|
|
|
2054
2064
|
});
|
|
2055
2065
|
function u() {
|
|
2056
2066
|
if (!a.value) {
|
|
2057
|
-
l = t.bbox ?
|
|
2058
|
-
let e = l ?
|
|
2067
|
+
l = t.bbox ? Lr(t.bbox) : void 0;
|
|
2068
|
+
let e = l ? Nr(t.features, l) : L(t.features);
|
|
2059
2069
|
if (e) {
|
|
2060
|
-
let i =
|
|
2061
|
-
a.value = new
|
|
2070
|
+
let i = Rr(Ct(e)), o = [[i[0], i[1]], [i[2], i[3]]];
|
|
2071
|
+
a.value = new ie.Map({
|
|
2062
2072
|
hash: !1,
|
|
2063
2073
|
container: `map-${t.id}`,
|
|
2064
2074
|
bounds: o,
|
|
@@ -2069,14 +2079,14 @@ var Pr = ["id"], Fr = /* @__PURE__ */ yt(/* @__PURE__ */ c({
|
|
|
2069
2079
|
},
|
|
2070
2080
|
style: n,
|
|
2071
2081
|
cooperativeGestures: !0,
|
|
2072
|
-
attributionControl:
|
|
2073
|
-
}), a.value.addControl(new
|
|
2082
|
+
attributionControl: !1
|
|
2083
|
+
}), a.value.addControl(new ie.FullscreenControl()), a.value.on("load", f);
|
|
2074
2084
|
}
|
|
2075
2085
|
}
|
|
2076
2086
|
}
|
|
2077
2087
|
function d(e) {
|
|
2078
2088
|
if (!a.value) throw Error("Call initMap() function first.");
|
|
2079
|
-
a.value.addSource(
|
|
2089
|
+
a.value.addSource(Xt, {
|
|
2080
2090
|
type: "geojson",
|
|
2081
2091
|
data: {
|
|
2082
2092
|
type: "Feature",
|
|
@@ -2094,7 +2104,7 @@ var Pr = ["id"], Fr = /* @__PURE__ */ yt(/* @__PURE__ */ c({
|
|
|
2094
2104
|
}
|
|
2095
2105
|
}), a.value.addLayer(q.Bbox);
|
|
2096
2106
|
}
|
|
2097
|
-
function
|
|
2107
|
+
function f() {
|
|
2098
2108
|
if (!a.value) throw Error("Call initMap() function first.");
|
|
2099
2109
|
l && d(l), a.value.addSource(K, {
|
|
2100
2110
|
type: "geojson",
|
|
@@ -2109,7 +2119,7 @@ var Pr = ["id"], Fr = /* @__PURE__ */ yt(/* @__PURE__ */ c({
|
|
|
2109
2119
|
a.value.getLayer(q.Polygon.id) || a.value.addLayer(q.Polygon), a.value.getLayer(q.PolygonBorder.id) || a.value.addLayer(q.PolygonBorder), a.value.getLayer(q.LineStringBorder.id) || a.value.addLayer(q.LineStringBorder), a.value.getLayer(q.LineString.id) || a.value.addLayer(q.LineString), a.value.getLayer(q.Point.id) || a.value.addLayer(q.Point);
|
|
2110
2120
|
}
|
|
2111
2121
|
function h(e) {
|
|
2112
|
-
!e.features || e.features.length === 0 || (c.value !== void 0 && x(), c.value = e.features[0],
|
|
2122
|
+
!e.features || e.features.length === 0 || (c.value !== void 0 && x(), c.value = e.features[0], y(e.lngLat, e.features[0]));
|
|
2113
2123
|
}
|
|
2114
2124
|
function g() {
|
|
2115
2125
|
a.value.getCanvas().style.cursor = "pointer";
|
|
@@ -2123,9 +2133,9 @@ var Pr = ["id"], Fr = /* @__PURE__ */ yt(/* @__PURE__ */ c({
|
|
|
2123
2133
|
e.id !== "bbox-layer" && (a.value.on("mousemove", e.id, h), a.value.on("mouseenter", e.id, g), a.value.on("mouseleave", e.id, _));
|
|
2124
2134
|
});
|
|
2125
2135
|
}
|
|
2126
|
-
function
|
|
2136
|
+
function y(e, t) {
|
|
2127
2137
|
if (!a.value) throw Error("Call initMap() function first.");
|
|
2128
|
-
s.value = new
|
|
2138
|
+
s.value = new ie.Popup().setLngLat(e).setHTML(`${rt[t.properties.objtype]}-${t.properties.id}-v${t.properties.version}`).addTo(a.value);
|
|
2129
2139
|
}
|
|
2130
2140
|
function x() {
|
|
2131
2141
|
s.value?.remove(), s.value = void 0;
|
|
@@ -2133,83 +2143,112 @@ var Pr = ["id"], Fr = /* @__PURE__ */ yt(/* @__PURE__ */ c({
|
|
|
2133
2143
|
function S([e]) {
|
|
2134
2144
|
o.value = e?.isIntersecting || !1;
|
|
2135
2145
|
}
|
|
2136
|
-
return (t, n) =>
|
|
2146
|
+
return (t, n) => re((b(), i("div", {
|
|
2137
2147
|
id: `map-${e.id}`,
|
|
2138
2148
|
class: "v-map"
|
|
2139
|
-
}, null, 8,
|
|
2149
|
+
}, null, 8, zr)), [[A(Kt), S]]);
|
|
2140
2150
|
}
|
|
2141
|
-
}), [["__scopeId", "data-v-
|
|
2151
|
+
}), [["__scopeId", "data-v-e1815a55"]]), Vr = ["id"], Hr = { class: "group-header" }, Ur = { class: "header-start" }, Wr = ["href"], Gr = ["title"], Kr = {
|
|
2152
|
+
key: 0,
|
|
2153
|
+
class: "name-before"
|
|
2154
|
+
}, qr = {
|
|
2155
|
+
key: 1,
|
|
2156
|
+
class: "name-separator"
|
|
2157
|
+
}, Jr = {
|
|
2158
|
+
key: 2,
|
|
2159
|
+
class: "name-after"
|
|
2160
|
+
}, Yr = { class: "header-center" }, Xr = {
|
|
2161
|
+
key: 0,
|
|
2162
|
+
class: "header-end"
|
|
2163
|
+
}, Zr = { class: "group-content" }, Qr = {
|
|
2164
|
+
key: 0,
|
|
2165
|
+
class: "content-start"
|
|
2166
|
+
}, $r = { class: "before-list" }, ei = { class: "after-list" }, ti = /* @__PURE__ */ xt(/* @__PURE__ */ l({
|
|
2142
2167
|
__name: "LoChaGroup",
|
|
2143
2168
|
props: {
|
|
2169
|
+
id: {},
|
|
2144
2170
|
index: {},
|
|
2145
2171
|
features: {},
|
|
2146
2172
|
josmTarget: {}
|
|
2147
2173
|
},
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
_:
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
},
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2174
|
+
emits: ["navigate"],
|
|
2175
|
+
setup(n) {
|
|
2176
|
+
ee((e) => ({
|
|
2177
|
+
eeed199c: u.value,
|
|
2178
|
+
v303e73b6: d.value
|
|
2179
|
+
}));
|
|
2180
|
+
let c = n, l = te(), u = t(() => l["content-start"] ? "repeat(4, minmax(0, 1fr))" : "repeat(3, minmax(0, 1fr))"), d = t(() => l["header-end"] ? "minmax(0, 1fr) minmax(0, 1fr) auto" : "minmax(0, 1fr) minmax(0, 1fr)"), f = p(tt), { loCha: m, getBeforeFeatures: h, getAfterFeatures: g } = p(et);
|
|
2181
|
+
if (!m.value) throw Error("LoCha is empty.");
|
|
2182
|
+
let _ = t(() => {
|
|
2183
|
+
let e = [...new Set(h(c.features).map((e) => e.properties.tags?.name).filter(Boolean))], t = [...new Set(g(c.features).map((e) => e.properties.tags?.name).filter(Boolean))], n = e.length > 0 ? e.join(", ") : null, r = t.length > 0 ? t.join(", ") : null;
|
|
2184
|
+
return n === r ? {
|
|
2185
|
+
before: null,
|
|
2186
|
+
after: r
|
|
2187
|
+
} : {
|
|
2188
|
+
before: n,
|
|
2189
|
+
after: r
|
|
2190
|
+
};
|
|
2191
|
+
}), v = t(() => {
|
|
2192
|
+
let { before: e, after: t } = _.value;
|
|
2193
|
+
return e && t ? `${e} → ${t}` : e ?? t ?? void 0;
|
|
2194
|
+
});
|
|
2195
|
+
return (t, l) => (b(), i("div", {
|
|
2196
|
+
id: n.id,
|
|
2197
|
+
class: "locha-group"
|
|
2198
|
+
}, [a("div", Hr, [
|
|
2199
|
+
a("div", Ur, [a("a", {
|
|
2200
|
+
class: "anchor-button",
|
|
2201
|
+
href: `#${n.id}`,
|
|
2202
|
+
onClick: l[0] ||= N((e) => t.$emit("navigate", `#${n.id}`), ["prevent"])
|
|
2203
|
+
}, "🔗", 8, Wr), a("h3", {
|
|
2204
|
+
class: "group-name",
|
|
2205
|
+
title: v.value
|
|
2206
|
+
}, [
|
|
2207
|
+
_.value.before ? (b(), i("span", Kr, D(_.value.before), 1)) : r("", !0),
|
|
2208
|
+
_.value.before ? (b(), i("span", qr, " → ")) : r("", !0),
|
|
2209
|
+
_.value.after ? (b(), i("span", Jr, D(_.value.after), 1)) : r("", !0)
|
|
2210
|
+
], 8, Gr)]),
|
|
2211
|
+
a("div", Yr, [T(t.$slots, "header-center", { index: n.index }, void 0, !0)]),
|
|
2212
|
+
t.$slots["header-end"] ? (b(), i("div", Xr, [T(t.$slots, "header-end", { index: n.index }, void 0, !0)])) : r("", !0)
|
|
2213
|
+
]), a("div", Zr, [
|
|
2214
|
+
t.$slots["content-start"] ? (b(), i("div", Qr, [T(t.$slots, "content-start", { index: n.index }, void 0, !0)])) : r("", !0),
|
|
2215
|
+
a("div", $r, [a("ul", null, [(b(!0), i(e, null, w(A(h)(n.features), (e) => (b(), i("li", { key: e.id }, [s(St, {
|
|
2216
|
+
feature: e,
|
|
2217
|
+
"josm-target": n.josmTarget
|
|
2218
|
+
}, o({ _: 2 }, [t.$slots["object-detail"] ? {
|
|
2219
|
+
name: "object-detail",
|
|
2220
|
+
fn: M(() => [T(t.$slots, "object-detail", {
|
|
2221
|
+
feature: e,
|
|
2222
|
+
index: n.index
|
|
2223
|
+
}, void 0, !0)]),
|
|
2224
|
+
key: "0"
|
|
2225
|
+
} : void 0]), 1032, ["feature", "josm-target"])]))), 128))])]),
|
|
2226
|
+
a("div", ei, [a("ul", null, [(b(!0), i(e, null, w(A(g)(n.features), (e) => (b(), i("li", { key: e.id }, [s(St, {
|
|
2227
|
+
feature: e,
|
|
2228
|
+
"josm-target": n.josmTarget
|
|
2229
|
+
}, o({ _: 2 }, [t.$slots["object-detail"] ? {
|
|
2230
|
+
name: "object-detail",
|
|
2231
|
+
fn: M(() => [T(t.$slots, "object-detail", {
|
|
2232
|
+
feature: e,
|
|
2233
|
+
index: n.index
|
|
2234
|
+
}, void 0, !0)]),
|
|
2235
|
+
key: "0"
|
|
2236
|
+
} : void 0]), 1032, ["feature", "josm-target"])]))), 128))])]),
|
|
2237
|
+
s(Br, {
|
|
2238
|
+
id: `${A(f)}-${c.index}`,
|
|
2239
|
+
features: n.features,
|
|
2240
|
+
bbox: A(m)?.bbox
|
|
2202
2241
|
}, null, 8, [
|
|
2203
2242
|
"id",
|
|
2204
2243
|
"features",
|
|
2205
2244
|
"bbox"
|
|
2206
2245
|
])
|
|
2207
|
-
]));
|
|
2246
|
+
])], 8, Vr));
|
|
2208
2247
|
}
|
|
2209
|
-
}), [["__scopeId", "data-v-
|
|
2248
|
+
}), [["__scopeId", "data-v-7ac50a68"]]);
|
|
2210
2249
|
//#endregion
|
|
2211
2250
|
//#region src/utils/scrollToSection.ts
|
|
2212
|
-
function
|
|
2251
|
+
function ni(e, t = {}) {
|
|
2213
2252
|
let { container: n = document, behavior: r = "smooth", block: i = "start", inline: a = "nearest" } = t, o = e.startsWith("#") ? e.slice(1) : e, s = n.querySelector(`#${CSS.escape(o)}`);
|
|
2214
2253
|
return s ? (s.scrollIntoView({
|
|
2215
2254
|
behavior: r,
|
|
@@ -2219,57 +2258,88 @@ function Vr(e, t = {}) {
|
|
|
2219
2258
|
}
|
|
2220
2259
|
//#endregion
|
|
2221
2260
|
//#region src/components/LoCha/LoChaGroupList.vue?vue&type=script&setup=true&lang.ts
|
|
2222
|
-
var
|
|
2261
|
+
var ri = ["name"], ii = /* @__PURE__ */ xt(/* @__PURE__ */ l({
|
|
2223
2262
|
__name: "LoChaGroupList",
|
|
2224
2263
|
props: { hash: {} },
|
|
2225
2264
|
setup(t) {
|
|
2226
|
-
|
|
2227
|
-
let n = t, { groups: r } =
|
|
2228
|
-
function
|
|
2229
|
-
return `locha-${
|
|
2265
|
+
ee((e) => ({ ebc4accc: A(l) }));
|
|
2266
|
+
let n = t, { groups: r } = p(et), c = p(tt), l = W.delete, u = C(), d = ne("listRef");
|
|
2267
|
+
function f(e) {
|
|
2268
|
+
return `locha-${c}-group-${e}`;
|
|
2230
2269
|
}
|
|
2231
|
-
function
|
|
2232
|
-
return `hidden_josm_target_${
|
|
2270
|
+
function _() {
|
|
2271
|
+
return `hidden_josm_target_${c}`;
|
|
2272
|
+
}
|
|
2273
|
+
let y = !1;
|
|
2274
|
+
function x(e) {
|
|
2275
|
+
if (u.value === e) {
|
|
2276
|
+
y = !0, u.value = void 0, history.replaceState(null, "", `${location.pathname}${location.search}`), h(() => {
|
|
2277
|
+
y = !1;
|
|
2278
|
+
});
|
|
2279
|
+
return;
|
|
2280
|
+
}
|
|
2281
|
+
y = !0, u.value = e, history.replaceState(null, "", e), h(() => {
|
|
2282
|
+
y = !1, ni(e, { container: d.value ?? void 0 });
|
|
2283
|
+
});
|
|
2233
2284
|
}
|
|
2234
2285
|
return j(() => n.hash, (e) => {
|
|
2235
|
-
|
|
2236
|
-
}, { immediate: !0 }), (
|
|
2286
|
+
y || (u.value = e, e && h(() => ni(e, { container: d.value ?? void 0 })));
|
|
2287
|
+
}, { immediate: !0 }), v(() => {
|
|
2288
|
+
let e = window.location.hash;
|
|
2289
|
+
e && !n.hash && x(e);
|
|
2290
|
+
}), (t, n) => (b(), i("div", {
|
|
2237
2291
|
ref_key: "listRef",
|
|
2238
|
-
ref:
|
|
2292
|
+
ref: d,
|
|
2239
2293
|
class: "locha-group-list"
|
|
2240
|
-
}, [a("ul", null, [(
|
|
2294
|
+
}, [a("ul", null, [(b(!0), i(e, null, w(A(r), (e, n) => (b(), i("li", {
|
|
2241
2295
|
key: n,
|
|
2242
|
-
class:
|
|
2243
|
-
}, [
|
|
2244
|
-
|
|
2245
|
-
href: `#${d(n)}`
|
|
2246
|
-
}, "🔗", 8, Hr), o(Br, {
|
|
2247
|
-
id: d(n),
|
|
2296
|
+
class: g({ selected: u.value === `#${f(n)}` })
|
|
2297
|
+
}, [s(ti, {
|
|
2298
|
+
id: f(n),
|
|
2248
2299
|
features: e,
|
|
2249
2300
|
index: n,
|
|
2250
|
-
"josm-target":
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2301
|
+
"josm-target": _(),
|
|
2302
|
+
onNavigate: x
|
|
2303
|
+
}, o({ _: 2 }, [
|
|
2304
|
+
t.$slots["object-detail"] ? {
|
|
2305
|
+
name: "object-detail",
|
|
2306
|
+
fn: M((e) => [T(t.$slots, "object-detail", m({ ref_for: !0 }, e), void 0, !0)]),
|
|
2307
|
+
key: "0"
|
|
2308
|
+
} : void 0,
|
|
2309
|
+
t.$slots["header-center"] ? {
|
|
2310
|
+
name: "header-center",
|
|
2311
|
+
fn: M((e) => [T(t.$slots, "header-center", m({ ref_for: !0 }, e), void 0, !0)]),
|
|
2312
|
+
key: "1"
|
|
2313
|
+
} : void 0,
|
|
2314
|
+
t.$slots["header-end"] ? {
|
|
2315
|
+
name: "header-end",
|
|
2316
|
+
fn: M((e) => [T(t.$slots, "header-end", m({ ref_for: !0 }, e), void 0, !0)]),
|
|
2317
|
+
key: "2"
|
|
2318
|
+
} : void 0,
|
|
2319
|
+
t.$slots["content-start"] ? {
|
|
2320
|
+
name: "content-start",
|
|
2321
|
+
fn: M((e) => [T(t.$slots, "content-start", m({ ref_for: !0 }, e), void 0, !0)]),
|
|
2322
|
+
key: "3"
|
|
2323
|
+
} : void 0
|
|
2324
|
+
]), 1032, [
|
|
2256
2325
|
"id",
|
|
2257
2326
|
"features",
|
|
2258
2327
|
"index",
|
|
2259
2328
|
"josm-target"
|
|
2260
2329
|
])], 2))), 128))]), a("iframe", {
|
|
2261
|
-
name:
|
|
2330
|
+
name: _(),
|
|
2262
2331
|
style: { display: "none" }
|
|
2263
|
-
}, null, 8,
|
|
2332
|
+
}, null, 8, ri)], 512));
|
|
2264
2333
|
}
|
|
2265
|
-
}), [["__scopeId", "data-v-
|
|
2334
|
+
}), [["__scopeId", "data-v-144b95c7"]]), ai = { class: "locha" }, oi = {
|
|
2266
2335
|
key: 0,
|
|
2267
2336
|
class: "user-feedback"
|
|
2268
|
-
},
|
|
2337
|
+
}, si = /* @__PURE__ */ xt(/* @__PURE__ */ l({
|
|
2269
2338
|
__name: "LoCha",
|
|
2270
2339
|
props: {
|
|
2340
|
+
id: {},
|
|
2271
2341
|
data: {},
|
|
2272
|
-
mapStyleUrl: { default:
|
|
2342
|
+
mapStyleUrl: { default: Jt },
|
|
2273
2343
|
reasonCollapsed: {
|
|
2274
2344
|
type: Boolean,
|
|
2275
2345
|
default: !0
|
|
@@ -2277,24 +2347,41 @@ var Hr = ["href"], Ur = ["name"], Wr = /* @__PURE__ */ yt(/* @__PURE__ */ c({
|
|
|
2277
2347
|
hash: {}
|
|
2278
2348
|
},
|
|
2279
2349
|
setup(e) {
|
|
2280
|
-
let t = e
|
|
2281
|
-
|
|
2282
|
-
let
|
|
2283
|
-
|
|
2284
|
-
let { featureCount:
|
|
2350
|
+
let t = e;
|
|
2351
|
+
x($e, t.reasonCollapsed), x(tt, t.id), x(nt, t.mapStyleUrl);
|
|
2352
|
+
let r = Qe();
|
|
2353
|
+
x(et, r);
|
|
2354
|
+
let { featureCount: a, setLoCha: s } = r;
|
|
2285
2355
|
return j(() => t.data, (e) => {
|
|
2286
2356
|
e && s(e);
|
|
2287
|
-
}, { immediate: !0 }), (t, r) => (
|
|
2357
|
+
}, { immediate: !0 }), (t, r) => (b(), i("section", ai, [A(a) ? (b(), n(ii, {
|
|
2288
2358
|
key: 1,
|
|
2289
2359
|
hash: e.hash
|
|
2290
|
-
}, {
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2360
|
+
}, o({ _: 2 }, [
|
|
2361
|
+
t.$slots["object-detail"] ? {
|
|
2362
|
+
name: "object-detail",
|
|
2363
|
+
fn: M((e) => [T(t.$slots, "object-detail", _(f(e)), void 0, !0)]),
|
|
2364
|
+
key: "0"
|
|
2365
|
+
} : void 0,
|
|
2366
|
+
t.$slots["header-center"] ? {
|
|
2367
|
+
name: "header-center",
|
|
2368
|
+
fn: M((e) => [T(t.$slots, "header-center", _(f(e)), void 0, !0)]),
|
|
2369
|
+
key: "1"
|
|
2370
|
+
} : void 0,
|
|
2371
|
+
t.$slots["header-end"] ? {
|
|
2372
|
+
name: "header-end",
|
|
2373
|
+
fn: M((e) => [T(t.$slots, "header-end", _(f(e)), void 0, !0)]),
|
|
2374
|
+
key: "2"
|
|
2375
|
+
} : void 0,
|
|
2376
|
+
t.$slots["content-start"] ? {
|
|
2377
|
+
name: "content-start",
|
|
2378
|
+
fn: M((e) => [T(t.$slots, "content-start", _(f(e)), void 0, !0)]),
|
|
2379
|
+
key: "3"
|
|
2380
|
+
} : void 0
|
|
2381
|
+
]), 1032, ["hash"])) : (b(), i("p", oi, " ⚠️ No data "))]));
|
|
2382
|
+
}
|
|
2383
|
+
}), [["__scopeId", "data-v-34eb8402"]]);
|
|
2297
2384
|
//#endregion
|
|
2298
|
-
export {
|
|
2385
|
+
export { si as LoCha, ni as scrollToSection };
|
|
2299
2386
|
|
|
2300
2387
|
//# sourceMappingURL=index.js.map
|