@teritorio/openstreetmap-logical-history-component 0.5.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.js +335 -292
- 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 +1 -1
package/dist/index.js
CHANGED
|
@@ -263,15 +263,15 @@ function Pe(e) {
|
|
|
263
263
|
}
|
|
264
264
|
//#endregion
|
|
265
265
|
//#region node_modules/geojson-equality-ts/dist/esm/index.js
|
|
266
|
-
var Fe = Object.defineProperty,
|
|
266
|
+
var Fe = Object.defineProperty, V = (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 Fe = Object.defineProperty, Ie = (e, t) => Fe(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 Fe = Object.defineProperty, Ie = (e, t) => Fe(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,51 +319,51 @@ var Fe = Object.defineProperty, Ie = (e, t) => Fe(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
|
-
Ie
|
|
335
|
-
var
|
|
336
|
-
function
|
|
334
|
+
V(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
|
-
|
|
340
|
-
function
|
|
339
|
+
V(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
|
-
|
|
347
|
-
function
|
|
348
|
-
return new
|
|
346
|
+
V(ze, "explode");
|
|
347
|
+
function Be(e, t, n) {
|
|
348
|
+
return new Le(n).compare(e, t);
|
|
349
349
|
}
|
|
350
|
-
|
|
351
|
-
function
|
|
350
|
+
V(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
|
-
|
|
363
|
-
var
|
|
362
|
+
V(Ve, "equal");
|
|
363
|
+
var He = /* @__PURE__ */ V((e) => typeof e == "object" && !!e, "isObject");
|
|
364
364
|
//#endregion
|
|
365
365
|
//#region node_modules/@turf/invariant/dist/esm/index.js
|
|
366
|
-
function
|
|
366
|
+
function H(e) {
|
|
367
367
|
if (!e) throw Error("coord is required");
|
|
368
368
|
if (!Array.isArray(e)) {
|
|
369
369
|
if (e.type === "Feature" && e.geometry !== null && e.geometry.type === "Point") return [...e.geometry.coordinates];
|
|
@@ -372,30 +372,30 @@ function V(e) {
|
|
|
372
372
|
if (Array.isArray(e) && e.length >= 2 && !Array.isArray(e[0]) && !Array.isArray(e[1])) return [...e];
|
|
373
373
|
throw Error("coord must be GeoJSON Point or an Array of numbers");
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function U(e) {
|
|
376
376
|
if (Array.isArray(e)) return e;
|
|
377
377
|
if (e.type === "Feature") {
|
|
378
378
|
if (e.geometry !== null) return e.geometry.coordinates;
|
|
379
379
|
} else if (e.coordinates) return e.coordinates;
|
|
380
380
|
throw Error("coords must be GeoJSON Feature, Geometry Object or an Array");
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function W(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
|
|
389
389
|
//#region node_modules/@turf/boolean-point-on-line/dist/esm/index.js
|
|
390
|
-
function
|
|
391
|
-
let r =
|
|
390
|
+
function G(e, t, n = {}) {
|
|
391
|
+
let r = H(e), i = U(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,32 +404,32 @@ function Ge(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
|
-
|
|
418
|
-
i.push(
|
|
417
|
+
U(e).forEach(function(e) {
|
|
418
|
+
i.push(Ke(e, r));
|
|
419
419
|
});
|
|
420
420
|
break;
|
|
421
421
|
case "MultiPolygon":
|
|
422
|
-
|
|
422
|
+
U(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;
|
|
429
429
|
case "Point": return e;
|
|
430
430
|
case "MultiPoint":
|
|
431
431
|
var a = {};
|
|
432
|
-
|
|
432
|
+
U(e).forEach(function(e) {
|
|
433
433
|
var t = e.join("-");
|
|
434
434
|
Object.prototype.hasOwnProperty.call(a, t) || (i.push(e), a[t] = !0);
|
|
435
435
|
});
|
|
@@ -447,31 +447,31 @@ function Ke(e, t = {}) {
|
|
|
447
447
|
id: e.id
|
|
448
448
|
});
|
|
449
449
|
}
|
|
450
|
-
function
|
|
451
|
-
let n =
|
|
452
|
-
if (n.length === 2 && !
|
|
450
|
+
function Ke(e, t) {
|
|
451
|
+
let n = U(e);
|
|
452
|
+
if (n.length === 2 && !qe(n[0], n[1])) return n;
|
|
453
453
|
let r = [], i = 0, a = 1, o = 2;
|
|
454
|
-
for (r.push(n[i]); o < n.length;)
|
|
454
|
+
for (r.push(n[i]); o < n.length;) G(n[a], R([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
|
-
if (
|
|
457
|
-
if (!
|
|
456
|
+
if (G(r[0], R([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 (!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
|
|
469
|
+
return W(e).type === W(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 Ze(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,
|
|
@@ -514,18 +514,18 @@ function Ze(e) {
|
|
|
514
514
|
}
|
|
515
515
|
//#endregion
|
|
516
516
|
//#region src/composables/useLoCha.ts
|
|
517
|
-
var
|
|
517
|
+
var K = {
|
|
518
518
|
new: "#52c41a",
|
|
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
|
|
528
|
+
function Qe() {
|
|
529
529
|
let e = T(), n = T([]), r = t(() => e.value?.features.length);
|
|
530
530
|
function i(e) {
|
|
531
531
|
return e.reduce((e, t) => {
|
|
@@ -537,7 +537,7 @@ function $e() {
|
|
|
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 $e() {
|
|
|
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 = [];
|
|
@@ -558,6 +558,7 @@ function $e() {
|
|
|
558
558
|
loCha: e,
|
|
559
559
|
groups: n,
|
|
560
560
|
setLoCha: a,
|
|
561
|
+
resetLoCha: l,
|
|
561
562
|
getStatus: c,
|
|
562
563
|
getBeforeFeatures: o,
|
|
563
564
|
getAfterFeatures: s
|
|
@@ -565,32 +566,32 @@ function $e() {
|
|
|
565
566
|
}
|
|
566
567
|
//#endregion
|
|
567
568
|
//#region src/constants/injectionKeys.ts
|
|
568
|
-
var
|
|
569
|
+
var $e = Symbol("reasonCollapsed"), et = Symbol("loCha"), tt = Symbol("loChaInstanceId"), nt = Symbol("mapStyleUrl"), rt = {
|
|
569
570
|
n: "node",
|
|
570
571
|
w: "way",
|
|
571
572
|
r: "relation"
|
|
572
573
|
};
|
|
573
|
-
function
|
|
574
|
-
return `https://www.openstreetmap.org/${
|
|
574
|
+
function it(e, t) {
|
|
575
|
+
return `https://www.openstreetmap.org/${rt[e]}/${t}/history`;
|
|
575
576
|
}
|
|
576
|
-
function
|
|
577
|
+
function at(e) {
|
|
577
578
|
return `https://www.openstreetmap.org/user/${encodeURIComponent(e)}`;
|
|
578
579
|
}
|
|
579
|
-
function
|
|
580
|
+
function ot(e, t) {
|
|
580
581
|
return `http://127.0.0.1:8111/load_object?objects=${e}${t}`;
|
|
581
582
|
}
|
|
582
|
-
function
|
|
583
|
-
return `https://osmlab.github.io/osm-deep-history/#/${
|
|
583
|
+
function st(e, t) {
|
|
584
|
+
return `https://osmlab.github.io/osm-deep-history/#/${rt[e]}/${t}`;
|
|
584
585
|
}
|
|
585
|
-
function
|
|
586
|
-
return `https://pewu.github.io/osm-history/#/${
|
|
586
|
+
function ct(e, t) {
|
|
587
|
+
return `https://pewu.github.io/osm-history/#/${rt[e]}/${t}`;
|
|
587
588
|
}
|
|
588
589
|
//#endregion
|
|
589
590
|
//#region src/components/LoCha/LoChaObject.vue?vue&type=script&setup=true&lang.ts
|
|
590
|
-
var
|
|
591
|
+
var lt = { class: "locha-object" }, ut = { class: "header-row" }, dt = { class: "before-content" }, ft = { class: "wrap" }, pt = ["href"], mt = {
|
|
591
592
|
key: 1,
|
|
592
593
|
class: "fab"
|
|
593
|
-
},
|
|
594
|
+
}, ht = { class: "fab-menu" }, gt = ["href"], _t = ["href", "target"], vt = ["href"], yt = ["href"], bt = { class: "date" }, xt = ["href", "title"], St = /* @__PURE__ */ l({
|
|
594
595
|
__name: "LoChaObject",
|
|
595
596
|
props: {
|
|
596
597
|
feature: {},
|
|
@@ -600,24 +601,24 @@ var ut = { class: "locha-object" }, dt = { class: "header-row" }, ft = { class:
|
|
|
600
601
|
setup(n) {
|
|
601
602
|
ee((e) => ({
|
|
602
603
|
v5f3a8926: u.value,
|
|
603
|
-
v41a8bc86: M(
|
|
604
|
-
v532f58a5: M(
|
|
604
|
+
v41a8bc86: M(K).delete,
|
|
605
|
+
v532f58a5: M(K).new
|
|
605
606
|
}));
|
|
606
|
-
let o = n, { getStatus: s } = p(
|
|
607
|
+
let o = n, { getStatus: s } = p(et), c = t(() => s(o.feature)), l = t(() => {
|
|
607
608
|
switch (c.value) {
|
|
608
609
|
case "new": return "new";
|
|
609
610
|
case "delete": return "deleted";
|
|
610
611
|
default: return "";
|
|
611
612
|
}
|
|
612
|
-
}), u = t(() =>
|
|
613
|
-
return (t, s) => (S(), i("article",
|
|
614
|
-
a("div",
|
|
613
|
+
}), u = t(() => K[c.value]);
|
|
614
|
+
return (t, s) => (S(), i("article", lt, [a("div", ut, [t.$slots.before ? (S(), i(e, { key: 0 }, [a("div", dt, [D(t.$slots, "before", {}, void 0, !0)]), s[6] ||= a("span", { class: "header-arrow" }, "→", -1)], 64)) : r("", !0), a("header", null, [
|
|
615
|
+
a("div", ft, [
|
|
615
616
|
a("a", {
|
|
616
|
-
href: M(
|
|
617
|
+
href: M(it)(n.feature.properties.objtype, n.feature.properties.id),
|
|
617
618
|
title: "OSM History",
|
|
618
619
|
target: "_blank",
|
|
619
620
|
onClick: s[0] ||= F(() => {}, ["stop"])
|
|
620
|
-
}, k(`${n.feature.properties.objtype}${n.feature.properties.id}-v${n.feature.properties.version}`), 9,
|
|
621
|
+
}, k(`${n.feature.properties.objtype}${n.feature.properties.id}-v${n.feature.properties.version}`), 9, pt),
|
|
621
622
|
!n.compact && (c.value === "new" || c.value === "delete") ? (S(), i("div", {
|
|
622
623
|
key: 0,
|
|
623
624
|
class: g(["status-content", {
|
|
@@ -625,59 +626,59 @@ var ut = { class: "locha-object" }, dt = { class: "header-row" }, ft = { class:
|
|
|
625
626
|
"object-deleted": c.value === "delete"
|
|
626
627
|
}])
|
|
627
628
|
}, k(l.value), 3)) : r("", !0),
|
|
628
|
-
n.compact ? r("", !0) : (S(), i("div",
|
|
629
|
+
n.compact ? r("", !0) : (S(), i("div", mt, [s[7] ||= a("button", {
|
|
629
630
|
class: "fab-toggle",
|
|
630
631
|
type: "button",
|
|
631
632
|
title: "Tools"
|
|
632
|
-
}, " 🔧 Tools ", -1), a("div",
|
|
633
|
+
}, " 🔧 Tools ", -1), a("div", ht, [
|
|
633
634
|
a("a", {
|
|
634
|
-
href: M(
|
|
635
|
+
href: M(it)(n.feature.properties.objtype, n.feature.properties.id),
|
|
635
636
|
class: "action-btn",
|
|
636
637
|
title: "Edit in OSM iD",
|
|
637
638
|
target: "_blank",
|
|
638
639
|
onClick: s[1] ||= F(() => {}, ["stop"])
|
|
639
|
-
}, " OSM iD ", 8,
|
|
640
|
+
}, " OSM iD ", 8, gt),
|
|
640
641
|
a("a", {
|
|
641
|
-
href: M(
|
|
642
|
+
href: M(ot)(n.feature.properties.objtype, n.feature.properties.id),
|
|
642
643
|
class: "action-btn",
|
|
643
644
|
title: "Edit in JOSM",
|
|
644
645
|
target: n.josmTarget || "hidden_josm_target",
|
|
645
646
|
onClick: s[2] ||= F(() => {}, ["stop"])
|
|
646
|
-
}, " JOSM ", 8,
|
|
647
|
+
}, " JOSM ", 8, _t),
|
|
647
648
|
a("a", {
|
|
648
|
-
href: M(
|
|
649
|
+
href: M(st)(n.feature.properties.objtype, n.feature.properties.id),
|
|
649
650
|
class: "action-btn",
|
|
650
651
|
title: "OSM Deep History",
|
|
651
652
|
target: "_blank",
|
|
652
653
|
onClick: s[3] ||= F(() => {}, ["stop"])
|
|
653
|
-
}, " Deep H ", 8,
|
|
654
|
+
}, " Deep H ", 8, vt),
|
|
654
655
|
a("a", {
|
|
655
|
-
href: M(
|
|
656
|
+
href: M(ct)(n.feature.properties.objtype, n.feature.properties.id),
|
|
656
657
|
class: "action-btn",
|
|
657
658
|
title: "OSM History Viewer",
|
|
658
659
|
target: "_blank",
|
|
659
660
|
onClick: s[4] ||= F(() => {}, ["stop"])
|
|
660
|
-
}, " OSM H ", 8,
|
|
661
|
+
}, " OSM H ", 8, yt)
|
|
661
662
|
])]))
|
|
662
663
|
]),
|
|
663
|
-
a("p",
|
|
664
|
+
a("p", bt, " 📅 " + k(o.feature.properties.created), 1),
|
|
664
665
|
n.feature.properties.username ? (S(), i("a", {
|
|
665
666
|
key: 0,
|
|
666
|
-
href: M(
|
|
667
|
+
href: M(at)(n.feature.properties.username),
|
|
667
668
|
title: `View ${n.feature.properties.username} OSM profile`,
|
|
668
669
|
target: "_blank",
|
|
669
670
|
onClick: s[5] ||= F(() => {}, ["stop"])
|
|
670
|
-
}, " 👤" + k(n.feature.properties.username), 9,
|
|
671
|
+
}, " 👤" + k(n.feature.properties.username), 9, xt)) : r("", !0)
|
|
671
672
|
])]), n.compact ? r("", !0) : D(t.$slots, "object-detail", { key: 0 }, void 0, !0)]));
|
|
672
673
|
}
|
|
673
|
-
}),
|
|
674
|
+
}), Ct = (e, t) => {
|
|
674
675
|
let n = e.__vccOpts || e;
|
|
675
676
|
for (let [e, r] of t) n[e] = r;
|
|
676
677
|
return n;
|
|
677
|
-
},
|
|
678
|
+
}, wt = /* @__PURE__ */ Ct(St, [["__scopeId", "data-v-094314b7"]]);
|
|
678
679
|
//#endregion
|
|
679
680
|
//#region node_modules/@turf/bbox/dist/esm/index.js
|
|
680
|
-
function
|
|
681
|
+
function q(e, t = {}) {
|
|
681
682
|
if (e.bbox != null && !0 !== t.recompute) return e.bbox;
|
|
682
683
|
let n = [
|
|
683
684
|
Infinity,
|
|
@@ -689,31 +690,31 @@ function K(e, t = {}) {
|
|
|
689
690
|
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]);
|
|
690
691
|
}), n;
|
|
691
692
|
}
|
|
692
|
-
var
|
|
693
|
+
var Tt = q;
|
|
693
694
|
//#endregion
|
|
694
695
|
//#region node_modules/@vueuse/shared/dist/index.js
|
|
695
|
-
function
|
|
696
|
+
function Et(e, t) {
|
|
696
697
|
return d() ? (b(e, t), !0) : !1;
|
|
697
698
|
}
|
|
698
|
-
var
|
|
699
|
+
var Dt = typeof window < "u" && typeof document < "u";
|
|
699
700
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
700
|
-
var
|
|
701
|
-
function
|
|
701
|
+
var Ot = (e) => e != null, kt = Object.prototype.toString, At = (e) => kt.call(e) === "[object Object]", jt = () => {}, Mt = /* @__PURE__ */ Nt();
|
|
702
|
+
function Nt() {
|
|
702
703
|
var e, t;
|
|
703
|
-
return
|
|
704
|
+
return Dt && !!(!((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));
|
|
704
705
|
}
|
|
705
|
-
function
|
|
706
|
+
function Pt(...e) {
|
|
706
707
|
if (e.length !== 1) return A(...e);
|
|
707
708
|
let t = e[0];
|
|
708
709
|
return typeof t == "function" ? w(c(() => ({
|
|
709
710
|
get: t,
|
|
710
|
-
set:
|
|
711
|
+
set: jt
|
|
711
712
|
}))) : T(t);
|
|
712
713
|
}
|
|
713
|
-
function
|
|
714
|
+
function Ft(e) {
|
|
714
715
|
return Array.isArray(e) ? e : [e];
|
|
715
716
|
}
|
|
716
|
-
function
|
|
717
|
+
function It(e, t, n) {
|
|
717
718
|
return N(e, t, {
|
|
718
719
|
...n,
|
|
719
720
|
immediate: !0
|
|
@@ -721,64 +722,64 @@ function Lt(e, t, n) {
|
|
|
721
722
|
}
|
|
722
723
|
//#endregion
|
|
723
724
|
//#region node_modules/@vueuse/core/dist/index.js
|
|
724
|
-
var
|
|
725
|
-
|
|
726
|
-
function
|
|
725
|
+
var Lt = Dt ? window : void 0;
|
|
726
|
+
Dt && window.document, Dt && window.navigator, Dt && window.location;
|
|
727
|
+
function Rt(e) {
|
|
727
728
|
let t = j(e);
|
|
728
729
|
return t?.$el ?? t;
|
|
729
730
|
}
|
|
730
|
-
function
|
|
731
|
+
function zt(...e) {
|
|
731
732
|
let n = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), r = t(() => {
|
|
732
|
-
let t =
|
|
733
|
+
let t = Ft(j(e[0])).filter((e) => e != null);
|
|
733
734
|
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
734
735
|
});
|
|
735
|
-
return
|
|
736
|
-
r.value?.map((e) =>
|
|
737
|
-
|
|
738
|
-
|
|
736
|
+
return It(() => [
|
|
737
|
+
r.value?.map((e) => Rt(e)) ?? [Lt].filter((e) => e != null),
|
|
738
|
+
Ft(j(r.value ? e[1] : e[0])),
|
|
739
|
+
Ft(M(r.value ? e[2] : e[1])),
|
|
739
740
|
j(r.value ? e[3] : e[2])
|
|
740
741
|
], ([e, t, r, i], a, o) => {
|
|
741
742
|
if (!e?.length || !t?.length || !r?.length) return;
|
|
742
|
-
let s =
|
|
743
|
+
let s = At(i) ? { ...i } : i, c = e.flatMap((e) => t.flatMap((t) => r.map((r) => n(e, t, r, s))));
|
|
743
744
|
o(() => {
|
|
744
745
|
c.forEach((e) => e());
|
|
745
746
|
});
|
|
746
747
|
}, { flush: "post" });
|
|
747
748
|
}
|
|
748
|
-
function
|
|
749
|
+
function Bt() {
|
|
749
750
|
let e = O(!1), t = u();
|
|
750
751
|
return t && y(() => {
|
|
751
752
|
e.value = !0;
|
|
752
753
|
}, t), e;
|
|
753
754
|
}
|
|
754
755
|
/* @__NO_SIDE_EFFECTS__ */
|
|
755
|
-
function
|
|
756
|
-
let n =
|
|
756
|
+
function Vt(e) {
|
|
757
|
+
let n = Bt();
|
|
757
758
|
return t(() => (n.value, !!e()));
|
|
758
759
|
}
|
|
759
|
-
function
|
|
760
|
-
let { root: i, rootMargin: a, threshold: o = 0, window: s =
|
|
760
|
+
function Ht(e, n, r = {}) {
|
|
761
|
+
let { root: i, rootMargin: a, threshold: o = 0, window: s = Lt, immediate: c = !0 } = r, l = /* @__PURE__ */ Vt(() => s && "IntersectionObserver" in s), u = t(() => Ft(j(e)).map(Rt).filter(Ot)), d = jt, f = O(c), p = l.value ? N(() => [
|
|
761
762
|
u.value,
|
|
762
|
-
|
|
763
|
+
Rt(i),
|
|
763
764
|
j(a),
|
|
764
765
|
f.value
|
|
765
766
|
], ([e, t, r]) => {
|
|
766
767
|
if (d(), !f.value || !e.length) return;
|
|
767
768
|
let i = new IntersectionObserver(n, {
|
|
768
|
-
root:
|
|
769
|
+
root: Rt(t),
|
|
769
770
|
rootMargin: r,
|
|
770
771
|
threshold: o
|
|
771
772
|
});
|
|
772
773
|
e.forEach((e) => e && i.observe(e)), d = () => {
|
|
773
|
-
i.disconnect(), d =
|
|
774
|
+
i.disconnect(), d = jt;
|
|
774
775
|
};
|
|
775
776
|
}, {
|
|
776
777
|
immediate: c,
|
|
777
778
|
flush: "post"
|
|
778
|
-
}) :
|
|
779
|
+
}) : jt, m = () => {
|
|
779
780
|
d(), p(), f.value = !1;
|
|
780
781
|
};
|
|
781
|
-
return
|
|
782
|
+
return Et(m), {
|
|
782
783
|
isSupported: l,
|
|
783
784
|
isActive: f,
|
|
784
785
|
pause() {
|
|
@@ -790,42 +791,42 @@ function Ut(e, n, r = {}) {
|
|
|
790
791
|
stop: m
|
|
791
792
|
};
|
|
792
793
|
}
|
|
793
|
-
function
|
|
794
|
+
function Ut(e) {
|
|
794
795
|
return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
|
|
795
796
|
}
|
|
796
|
-
function
|
|
797
|
+
function Wt(e) {
|
|
797
798
|
let t = window.getComputedStyle(e);
|
|
798
799
|
if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight) return !0;
|
|
799
800
|
{
|
|
800
801
|
let t = e.parentNode;
|
|
801
|
-
return !t || t.tagName === "BODY" ? !1 :
|
|
802
|
+
return !t || t.tagName === "BODY" ? !1 : Wt(t);
|
|
802
803
|
}
|
|
803
804
|
}
|
|
804
|
-
function
|
|
805
|
+
function Gt(e) {
|
|
805
806
|
let t = e || window.event, n = t.target;
|
|
806
|
-
return
|
|
807
|
+
return Wt(n) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
|
|
807
808
|
}
|
|
808
|
-
var
|
|
809
|
-
function
|
|
809
|
+
var Kt = /* @__PURE__ */ new WeakMap();
|
|
810
|
+
function qt(e, n = !1) {
|
|
810
811
|
let r = O(n), i = null, a = "";
|
|
811
|
-
N(
|
|
812
|
-
let t =
|
|
812
|
+
N(Pt(e), (e) => {
|
|
813
|
+
let t = Ut(j(e));
|
|
813
814
|
if (t) {
|
|
814
815
|
let e = t;
|
|
815
|
-
if (
|
|
816
|
+
if (Kt.get(e) || Kt.set(e, e.style.overflow), e.style.overflow !== "hidden" && (a = e.style.overflow), e.style.overflow === "hidden") return r.value = !0;
|
|
816
817
|
if (r.value) return e.style.overflow = "hidden";
|
|
817
818
|
}
|
|
818
819
|
}, { immediate: !0 });
|
|
819
820
|
let o = () => {
|
|
820
|
-
let t =
|
|
821
|
-
!t || r.value || (
|
|
822
|
-
|
|
821
|
+
let t = Ut(j(e));
|
|
822
|
+
!t || r.value || (Mt && (i = zt(t, "touchmove", (e) => {
|
|
823
|
+
Gt(e);
|
|
823
824
|
}, { passive: !1 })), t.style.overflow = "hidden", r.value = !0);
|
|
824
825
|
}, s = () => {
|
|
825
|
-
let t =
|
|
826
|
-
!t || !r.value || (
|
|
826
|
+
let t = Ut(j(e));
|
|
827
|
+
!t || !r.value || (Mt && i?.(), t.style.overflow = a, Kt.delete(t), r.value = !1);
|
|
827
828
|
};
|
|
828
|
-
return
|
|
829
|
+
return Et(s), t({
|
|
829
830
|
get() {
|
|
830
831
|
return r.value;
|
|
831
832
|
},
|
|
@@ -836,26 +837,26 @@ function Jt(e, n = !1) {
|
|
|
836
837
|
}
|
|
837
838
|
//#endregion
|
|
838
839
|
//#region node_modules/@vueuse/components/dist/index.js
|
|
839
|
-
var
|
|
840
|
-
typeof t.value == "function" ?
|
|
840
|
+
var Jt = { mounted(e, t) {
|
|
841
|
+
typeof t.value == "function" ? Ht(e, t.value) : Ht(e, ...t.value);
|
|
841
842
|
} };
|
|
842
|
-
function
|
|
843
|
+
function Yt() {
|
|
843
844
|
let e = !1, t = O(!1);
|
|
844
845
|
return (n, r) => {
|
|
845
846
|
if (t.value = r.value, e) return;
|
|
846
847
|
e = !0;
|
|
847
|
-
let i =
|
|
848
|
+
let i = qt(n, r.value);
|
|
848
849
|
N(t, (e) => i.value = e);
|
|
849
850
|
};
|
|
850
851
|
}
|
|
851
|
-
|
|
852
|
+
Yt();
|
|
852
853
|
//#endregion
|
|
853
854
|
//#region src/constants/map.ts
|
|
854
|
-
var
|
|
855
|
+
var Xt = "https://maps.cartoway.com/styles/positron/style.json", Zt = "#f4f4f5", Qt = "bbox", $t = "lochas", J = {
|
|
855
856
|
Bbox: {
|
|
856
857
|
id: "bbox-layer",
|
|
857
858
|
type: "line",
|
|
858
|
-
source:
|
|
859
|
+
source: Qt,
|
|
859
860
|
layout: { "line-join": "miter" },
|
|
860
861
|
paint: {
|
|
861
862
|
"line-color": "#000000",
|
|
@@ -867,7 +868,7 @@ var Zt = "https://maps.cartoway.com/styles/positron/style.json", Qt = "#f4f4f5",
|
|
|
867
868
|
PolygonBorder: {
|
|
868
869
|
id: "feature-polygons-border",
|
|
869
870
|
type: "line",
|
|
870
|
-
source:
|
|
871
|
+
source: $t,
|
|
871
872
|
paint: {
|
|
872
873
|
"line-width": [
|
|
873
874
|
"case",
|
|
@@ -890,7 +891,7 @@ var Zt = "https://maps.cartoway.com/styles/positron/style.json", Qt = "#f4f4f5",
|
|
|
890
891
|
Polygon: {
|
|
891
892
|
id: "feature-polygons",
|
|
892
893
|
type: "fill",
|
|
893
|
-
source:
|
|
894
|
+
source: $t,
|
|
894
895
|
paint: {
|
|
895
896
|
"fill-opacity": [
|
|
896
897
|
"case",
|
|
@@ -909,26 +910,26 @@ var Zt = "https://maps.cartoway.com/styles/positron/style.json", Qt = "#f4f4f5",
|
|
|
909
910
|
["get", "geom"],
|
|
910
911
|
!1
|
|
911
912
|
],
|
|
912
|
-
|
|
913
|
+
Zt,
|
|
913
914
|
[
|
|
914
915
|
"==",
|
|
915
916
|
["get", "is_new"],
|
|
916
917
|
!0
|
|
917
918
|
],
|
|
918
|
-
|
|
919
|
+
K.new,
|
|
919
920
|
[
|
|
920
921
|
"==",
|
|
921
922
|
["get", "deleted"],
|
|
922
923
|
!0
|
|
923
924
|
],
|
|
924
|
-
|
|
925
|
+
K.delete,
|
|
925
926
|
[
|
|
926
927
|
"==",
|
|
927
928
|
["get", "is_before"],
|
|
928
929
|
!0
|
|
929
930
|
],
|
|
930
|
-
|
|
931
|
-
|
|
931
|
+
K.updateBefore,
|
|
932
|
+
K.updateAfter
|
|
932
933
|
]
|
|
933
934
|
},
|
|
934
935
|
filter: [
|
|
@@ -940,7 +941,7 @@ var Zt = "https://maps.cartoway.com/styles/positron/style.json", Qt = "#f4f4f5",
|
|
|
940
941
|
LineString: {
|
|
941
942
|
id: "feature-lines",
|
|
942
943
|
type: "line",
|
|
943
|
-
source:
|
|
944
|
+
source: $t,
|
|
944
945
|
paint: {
|
|
945
946
|
"line-width": 6,
|
|
946
947
|
"line-color": [
|
|
@@ -950,26 +951,26 @@ var Zt = "https://maps.cartoway.com/styles/positron/style.json", Qt = "#f4f4f5",
|
|
|
950
951
|
["get", "geom"],
|
|
951
952
|
!1
|
|
952
953
|
],
|
|
953
|
-
|
|
954
|
+
Zt,
|
|
954
955
|
[
|
|
955
956
|
"==",
|
|
956
957
|
["get", "is_new"],
|
|
957
958
|
!0
|
|
958
959
|
],
|
|
959
|
-
|
|
960
|
+
K.new,
|
|
960
961
|
[
|
|
961
962
|
"==",
|
|
962
963
|
["get", "deleted"],
|
|
963
964
|
!0
|
|
964
965
|
],
|
|
965
|
-
|
|
966
|
+
K.delete,
|
|
966
967
|
[
|
|
967
968
|
"==",
|
|
968
969
|
["get", "is_before"],
|
|
969
970
|
!0
|
|
970
971
|
],
|
|
971
|
-
|
|
972
|
-
|
|
972
|
+
K.updateBefore,
|
|
973
|
+
K.updateAfter
|
|
973
974
|
],
|
|
974
975
|
"line-opacity": [
|
|
975
976
|
"case",
|
|
@@ -1002,7 +1003,7 @@ var Zt = "https://maps.cartoway.com/styles/positron/style.json", Qt = "#f4f4f5",
|
|
|
1002
1003
|
LineStringBorder: {
|
|
1003
1004
|
id: "feature-lines-border",
|
|
1004
1005
|
type: "line",
|
|
1005
|
-
source:
|
|
1006
|
+
source: $t,
|
|
1006
1007
|
paint: {
|
|
1007
1008
|
"line-width": [
|
|
1008
1009
|
"case",
|
|
@@ -1036,7 +1037,7 @@ var Zt = "https://maps.cartoway.com/styles/positron/style.json", Qt = "#f4f4f5",
|
|
|
1036
1037
|
Point: {
|
|
1037
1038
|
id: "feature-points",
|
|
1038
1039
|
type: "circle",
|
|
1039
|
-
source:
|
|
1040
|
+
source: $t,
|
|
1040
1041
|
paint: {
|
|
1041
1042
|
"circle-radius": [
|
|
1042
1043
|
"case",
|
|
@@ -1076,26 +1077,26 @@ var Zt = "https://maps.cartoway.com/styles/positron/style.json", Qt = "#f4f4f5",
|
|
|
1076
1077
|
["get", "geom"],
|
|
1077
1078
|
!1
|
|
1078
1079
|
],
|
|
1079
|
-
|
|
1080
|
+
Zt,
|
|
1080
1081
|
[
|
|
1081
1082
|
"==",
|
|
1082
1083
|
["get", "is_new"],
|
|
1083
1084
|
!0
|
|
1084
1085
|
],
|
|
1085
|
-
|
|
1086
|
+
K.new,
|
|
1086
1087
|
[
|
|
1087
1088
|
"==",
|
|
1088
1089
|
["get", "deleted"],
|
|
1089
1090
|
!0
|
|
1090
1091
|
],
|
|
1091
|
-
|
|
1092
|
+
K.delete,
|
|
1092
1093
|
[
|
|
1093
1094
|
"==",
|
|
1094
1095
|
["get", "is_before"],
|
|
1095
1096
|
!0
|
|
1096
1097
|
],
|
|
1097
|
-
|
|
1098
|
-
|
|
1098
|
+
K.updateBefore,
|
|
1099
|
+
K.updateAfter
|
|
1099
1100
|
]
|
|
1100
1101
|
},
|
|
1101
1102
|
filter: [
|
|
@@ -1136,7 +1137,7 @@ function rn(e, t) {
|
|
|
1136
1137
|
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;
|
|
1137
1138
|
}
|
|
1138
1139
|
function an(e, t) {
|
|
1139
|
-
let n =
|
|
1140
|
+
let n = W(e), r = n.type, i = e.type === "Feature" ? e.properties : {}, a = n.coordinates;
|
|
1140
1141
|
switch (r) {
|
|
1141
1142
|
case "LineString":
|
|
1142
1143
|
case "MultiLineString": {
|
|
@@ -1238,7 +1239,7 @@ function Sn(e, t) {
|
|
|
1238
1239
|
function Cn(e, t, n = {}) {
|
|
1239
1240
|
if (!e) throw Error("point is required");
|
|
1240
1241
|
if (!t) throw Error("polygon is required");
|
|
1241
|
-
let r =
|
|
1242
|
+
let r = H(e), i = W(t), a = i.type, o = t.bbox, s = i.coordinates;
|
|
1242
1243
|
if (o && wn(r, o) === !1) return !1;
|
|
1243
1244
|
a === "Polygon" && (s = [s]);
|
|
1244
1245
|
let c = !1;
|
|
@@ -1482,8 +1483,8 @@ function En(e) {
|
|
|
1482
1483
|
e[3],
|
|
1483
1484
|
e[4]
|
|
1484
1485
|
];
|
|
1485
|
-
else if (e.type === "Feature") t =
|
|
1486
|
-
else if (e.type === "FeatureCollection") t =
|
|
1486
|
+
else if (e.type === "Feature") t = q(e);
|
|
1487
|
+
else if (e.type === "FeatureCollection") t = q(e);
|
|
1487
1488
|
else throw Error("invalid geojson");
|
|
1488
1489
|
return {
|
|
1489
1490
|
minX: t[0],
|
|
@@ -1498,21 +1499,21 @@ var Dn = class {
|
|
|
1498
1499
|
}
|
|
1499
1500
|
insert(e) {
|
|
1500
1501
|
if (e.type !== "Feature") throw Error("invalid feature");
|
|
1501
|
-
return e.bbox = e.bbox ? e.bbox :
|
|
1502
|
+
return e.bbox = e.bbox ? e.bbox : q(e), this.tree.insert(e), this;
|
|
1502
1503
|
}
|
|
1503
1504
|
load(e) {
|
|
1504
1505
|
var t = [];
|
|
1505
1506
|
return Array.isArray(e) ? e.forEach(function(e) {
|
|
1506
1507
|
if (e.type !== "Feature") throw Error("invalid features");
|
|
1507
|
-
e.bbox = e.bbox ? e.bbox :
|
|
1508
|
+
e.bbox = e.bbox ? e.bbox : q(e), t.push(e);
|
|
1508
1509
|
}) : we(e, function(e) {
|
|
1509
1510
|
if (e.type !== "Feature") throw Error("invalid features");
|
|
1510
|
-
e.bbox = e.bbox ? e.bbox :
|
|
1511
|
+
e.bbox = e.bbox ? e.bbox : q(e), t.push(e);
|
|
1511
1512
|
}), this.tree.load(t), this;
|
|
1512
1513
|
}
|
|
1513
1514
|
remove(e, t) {
|
|
1514
1515
|
if (e.type !== "Feature") throw Error("invalid feature");
|
|
1515
|
-
return e.bbox = e.bbox ? e.bbox :
|
|
1516
|
+
return e.bbox = e.bbox ? e.bbox : q(e), this.tree.remove(e, t), this;
|
|
1516
1517
|
}
|
|
1517
1518
|
clear() {
|
|
1518
1519
|
return this.tree.clear(), this;
|
|
@@ -1569,9 +1570,9 @@ function Mn(e, t) {
|
|
|
1569
1570
|
if (r !== null) {
|
|
1570
1571
|
switch (r.type) {
|
|
1571
1572
|
case "Polygon":
|
|
1572
|
-
n =
|
|
1573
|
+
n = U(r);
|
|
1573
1574
|
break;
|
|
1574
|
-
case "LineString": n = [
|
|
1575
|
+
case "LineString": n = [U(r)];
|
|
1575
1576
|
}
|
|
1576
1577
|
n.forEach((n) => {
|
|
1577
1578
|
Nn(n, e.properties).forEach((e) => {
|
|
@@ -1726,7 +1727,7 @@ function Xn(e, t, n = {}) {
|
|
|
1726
1727
|
//#endregion
|
|
1727
1728
|
//#region node_modules/@turf/distance/dist/esm/index.js
|
|
1728
1729
|
function Zn(e, t, n = {}) {
|
|
1729
|
-
var r =
|
|
1730
|
+
var r = H(e), i = H(t), a = B(i[1] - r[1]), o = B(i[0] - r[0]), s = B(r[1]), c = B(i[1]), l = Math.sin(a / 2) ** 2 + Math.sin(o / 2) ** 2 * Math.cos(s) * Math.cos(c);
|
|
1730
1731
|
return ye(2 * Math.atan2(Math.sqrt(l), Math.sqrt(1 - l)), n.units);
|
|
1731
1732
|
}
|
|
1732
1733
|
//#endregion
|
|
@@ -1743,7 +1744,7 @@ var Qn = Object.defineProperty, $n = Object.defineProperties, er = Object.getOwn
|
|
|
1743
1744
|
}, or = (e, t) => $n(e, er(t));
|
|
1744
1745
|
function sr(e, t, n = {}) {
|
|
1745
1746
|
if (!e || !t) throw Error("lines and inputPoint are required arguments");
|
|
1746
|
-
let r =
|
|
1747
|
+
let r = H(t), i = he([Infinity, Infinity], {
|
|
1747
1748
|
lineStringIndex: -1,
|
|
1748
1749
|
segmentIndex: -1,
|
|
1749
1750
|
totalDistance: -1,
|
|
@@ -1757,9 +1758,9 @@ function sr(e, t, n = {}) {
|
|
|
1757
1758
|
}), a = 0, o = 0, s = -1;
|
|
1758
1759
|
return Oe(e, function(e, c, l) {
|
|
1759
1760
|
s !== l && (s = l, o = 0);
|
|
1760
|
-
let u =
|
|
1761
|
+
let u = U(e);
|
|
1761
1762
|
for (let e = 0; e < u.length - 1; e++) {
|
|
1762
|
-
let s = he(u[e]), c =
|
|
1763
|
+
let s = he(u[e]), c = H(s), d = he(u[e + 1]), f = H(d), p = Zn(s, d, n), m, h;
|
|
1763
1764
|
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] = pr(c, f, r);
|
|
1764
1765
|
let g = Zn(t, m, n);
|
|
1765
1766
|
if (g < i.properties.pointDistance) {
|
|
@@ -1838,7 +1839,7 @@ function pr(e, t, n) {
|
|
|
1838
1839
|
function mr(e, t) {
|
|
1839
1840
|
if (!e) throw Error("line is required");
|
|
1840
1841
|
if (!t) throw Error("splitter is required");
|
|
1841
|
-
let n =
|
|
1842
|
+
let n = Ue(e), r = Ue(t);
|
|
1842
1843
|
if (n !== "LineString") throw Error("line must be LineString");
|
|
1843
1844
|
if (r === "FeatureCollection") throw Error("splitter cannot be a FeatureCollection");
|
|
1844
1845
|
if (r === "GeometryCollection") throw Error("splitter cannot be a GeometryCollection");
|
|
@@ -1872,14 +1873,14 @@ function hr(e, t) {
|
|
|
1872
1873
|
}), z(n);
|
|
1873
1874
|
}
|
|
1874
1875
|
function gr(e, t) {
|
|
1875
|
-
var n = [], r =
|
|
1876
|
-
if (vr(r,
|
|
1876
|
+
var n = [], r = U(e)[0], i = U(e)[e.geometry.coordinates.length - 1];
|
|
1877
|
+
if (vr(r, H(t)) || vr(i, H(t))) return z([e]);
|
|
1877
1878
|
var a = On(), o = jn(e);
|
|
1878
1879
|
a.load(o);
|
|
1879
1880
|
var s = a.search(t);
|
|
1880
1881
|
if (!s.features.length) return z([e]);
|
|
1881
1882
|
var c = _r(t, s), l = Te(o, function(e, r, i) {
|
|
1882
|
-
var a =
|
|
1883
|
+
var a = U(r)[1], o = H(t);
|
|
1883
1884
|
return i === c.id ? (e.push(o), n.push(R(e)), vr(o, a) ? [o] : [o, a]) : (e.push(a), e);
|
|
1884
1885
|
}, [r]);
|
|
1885
1886
|
return l.length > 1 && n.push(R(l)), z(n);
|
|
@@ -1899,7 +1900,7 @@ function vr(e, t) {
|
|
|
1899
1900
|
//#endregion
|
|
1900
1901
|
//#region node_modules/@turf/boolean-contains/dist/esm/index.js
|
|
1901
1902
|
function yr(e, t) {
|
|
1902
|
-
let n =
|
|
1903
|
+
let n = W(e), r = W(t), i = n.type, a = r.type, o = n.coordinates, s = r.coordinates;
|
|
1903
1904
|
switch (i) {
|
|
1904
1905
|
case "Point": switch (a) {
|
|
1905
1906
|
case "Point": return jr(o, s);
|
|
@@ -1911,7 +1912,7 @@ function yr(e, t) {
|
|
|
1911
1912
|
default: throw Error("feature2 " + a + " geometry not supported");
|
|
1912
1913
|
}
|
|
1913
1914
|
case "LineString": switch (a) {
|
|
1914
|
-
case "Point": return
|
|
1915
|
+
case "Point": return G(r, n, { ignoreEndVertices: !0 });
|
|
1915
1916
|
case "LineString": return Er(n, r);
|
|
1916
1917
|
case "MultiPoint": return wr(n, r);
|
|
1917
1918
|
default: throw Error("feature2 " + a + " geometry not supported");
|
|
@@ -1964,7 +1965,7 @@ function Cr(e, t) {
|
|
|
1964
1965
|
}
|
|
1965
1966
|
function wr(e, t) {
|
|
1966
1967
|
let n = !1;
|
|
1967
|
-
for (let r of t.coordinates) if (
|
|
1968
|
+
for (let r of t.coordinates) if (G(r, e, { ignoreEndVertices: !0 }) && (n = !0), !G(r, e)) return !1;
|
|
1968
1969
|
return !!n;
|
|
1969
1970
|
}
|
|
1970
1971
|
function Tr(e, t) {
|
|
@@ -1973,10 +1974,10 @@ function Tr(e, t) {
|
|
|
1973
1974
|
}
|
|
1974
1975
|
function Er(e, t) {
|
|
1975
1976
|
let n = !1;
|
|
1976
|
-
for (let r of t.coordinates) if (
|
|
1977
|
+
for (let r of t.coordinates) if (G({
|
|
1977
1978
|
type: "Point",
|
|
1978
1979
|
coordinates: r
|
|
1979
|
-
}, e, { ignoreEndVertices: !0 }) && (n = !0), !
|
|
1980
|
+
}, e, { ignoreEndVertices: !0 }) && (n = !0), !G({
|
|
1980
1981
|
type: "Point",
|
|
1981
1982
|
coordinates: r
|
|
1982
1983
|
}, e, { ignoreEndVertices: !1 })) return !1;
|
|
@@ -1991,7 +1992,7 @@ function Dr(e, t) {
|
|
|
1991
1992
|
return z(r);
|
|
1992
1993
|
}
|
|
1993
1994
|
function Or(e, t) {
|
|
1994
|
-
if (!Ar(
|
|
1995
|
+
if (!Ar(q(e), q(t))) return !1;
|
|
1995
1996
|
for (let n of t.coordinates) if (!Cn(n, e)) return !1;
|
|
1996
1997
|
let n = !1, r = Dr(t, e);
|
|
1997
1998
|
for (let t of r.features) {
|
|
@@ -2002,8 +2003,8 @@ function Or(e, t) {
|
|
|
2002
2003
|
return n;
|
|
2003
2004
|
}
|
|
2004
2005
|
function kr(e, t) {
|
|
2005
|
-
if (e.type === "Feature" && e.geometry === null || t.type === "Feature" && t.geometry === null || !Ar(
|
|
2006
|
-
let n =
|
|
2006
|
+
if (e.type === "Feature" && e.geometry === null || t.type === "Feature" && t.geometry === null || !Ar(q(e), q(t))) return !1;
|
|
2007
|
+
let n = W(t).coordinates;
|
|
2007
2008
|
for (let t of n) for (let n of t) if (!Cn(n, e)) return !1;
|
|
2008
2009
|
return !0;
|
|
2009
2010
|
}
|
|
@@ -2020,7 +2021,7 @@ var Nr = yr;
|
|
|
2020
2021
|
//#endregion
|
|
2021
2022
|
//#region node_modules/@turf/envelope/dist/esm/index.js
|
|
2022
2023
|
function Pr(e) {
|
|
2023
|
-
return cn(
|
|
2024
|
+
return cn(q(e));
|
|
2024
2025
|
}
|
|
2025
2026
|
var Fr = Pr;
|
|
2026
2027
|
//#endregion
|
|
@@ -2049,7 +2050,7 @@ function Vr(e) {
|
|
|
2049
2050
|
}
|
|
2050
2051
|
//#endregion
|
|
2051
2052
|
//#region src/components/VMap.vue?vue&type=script&setup=true&lang.ts
|
|
2052
|
-
var Hr = ["id"], Ur = /* @__PURE__ */
|
|
2053
|
+
var Hr = ["id"], Ur = /* @__PURE__ */ Ct(/* @__PURE__ */ l({
|
|
2053
2054
|
__name: "VMap",
|
|
2054
2055
|
props: {
|
|
2055
2056
|
id: {},
|
|
@@ -2057,12 +2058,17 @@ var Hr = ["id"], Ur = /* @__PURE__ */ wt(/* @__PURE__ */ l({
|
|
|
2057
2058
|
bbox: {}
|
|
2058
2059
|
},
|
|
2059
2060
|
setup(e) {
|
|
2060
|
-
let t = e, n = p(
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2061
|
+
let t = e, n = p(nt, Xt);
|
|
2062
|
+
function r(e) {
|
|
2063
|
+
let t = e.offsetWidth, n = e.offsetHeight;
|
|
2064
|
+
return {
|
|
2065
|
+
top: Math.min(60, Math.floor(n * .15)),
|
|
2066
|
+
left: Math.min(60, Math.floor(t * .15)),
|
|
2067
|
+
right: Math.min(60, Math.floor(t * .15)),
|
|
2068
|
+
bottom: Math.min(80, Math.floor(n * .2))
|
|
2069
|
+
};
|
|
2070
|
+
}
|
|
2071
|
+
let a = O(), o = O(!1), s = O(), c = O(), l;
|
|
2066
2072
|
N(o, (e) => {
|
|
2067
2073
|
e ? u() : (a.value && a.value.remove(), a.value = void 0);
|
|
2068
2074
|
}), N(() => t.features, (e) => {
|
|
@@ -2070,16 +2076,32 @@ var Hr = ["id"], Ur = /* @__PURE__ */ wt(/* @__PURE__ */ l({
|
|
|
2070
2076
|
});
|
|
2071
2077
|
function u() {
|
|
2072
2078
|
if (!a.value) {
|
|
2079
|
+
let e = document.getElementById(`map-${t.id}`);
|
|
2080
|
+
if (!e) return;
|
|
2073
2081
|
l = t.bbox ? Br(t.bbox) : void 0;
|
|
2074
|
-
let
|
|
2075
|
-
if (
|
|
2076
|
-
|
|
2082
|
+
let i = t.features.filter((e) => e.geometry != null);
|
|
2083
|
+
if (!i.length) return;
|
|
2084
|
+
let o = l ? Lr(i, l) : z(i);
|
|
2085
|
+
if (o) {
|
|
2086
|
+
let i = Tt(o);
|
|
2087
|
+
Vr(i) && (i = [
|
|
2088
|
+
i[0] - 1e-4,
|
|
2089
|
+
i[1] - 1e-4,
|
|
2090
|
+
i[2] + 1e-4,
|
|
2091
|
+
i[3] + 1e-4
|
|
2092
|
+
]);
|
|
2093
|
+
let s = t.bbox, c = s ? [
|
|
2094
|
+
Math.max(i[0], s[0]),
|
|
2095
|
+
Math.max(i[1], s[1]),
|
|
2096
|
+
Math.min(i[2], s[2]),
|
|
2097
|
+
Math.min(i[3], s[3])
|
|
2098
|
+
] : i, l = [[c[0], c[1]], [c[2], c[3]]];
|
|
2077
2099
|
a.value = new ie.Map({
|
|
2078
2100
|
hash: !1,
|
|
2079
2101
|
container: `map-${t.id}`,
|
|
2080
|
-
bounds:
|
|
2102
|
+
bounds: l,
|
|
2081
2103
|
fitBoundsOptions: {
|
|
2082
|
-
padding: r,
|
|
2104
|
+
padding: r(e),
|
|
2083
2105
|
animate: !1,
|
|
2084
2106
|
maxZoom: 17
|
|
2085
2107
|
},
|
|
@@ -2092,7 +2114,7 @@ var Hr = ["id"], Ur = /* @__PURE__ */ wt(/* @__PURE__ */ l({
|
|
|
2092
2114
|
}
|
|
2093
2115
|
function d(e) {
|
|
2094
2116
|
if (!a.value) throw Error("Call initMap() function first.");
|
|
2095
|
-
a.value.addSource(
|
|
2117
|
+
a.value.addSource(Qt, {
|
|
2096
2118
|
type: "geojson",
|
|
2097
2119
|
data: {
|
|
2098
2120
|
type: "Feature",
|
|
@@ -2117,7 +2139,7 @@ var Hr = ["id"], Ur = /* @__PURE__ */ wt(/* @__PURE__ */ l({
|
|
|
2117
2139
|
t.bbox[1] - 1e-4,
|
|
2118
2140
|
t.bbox[2] + 1e-4,
|
|
2119
2141
|
t.bbox[3] + 1e-4
|
|
2120
|
-
] : t.bbox), a.value.addSource(
|
|
2142
|
+
] : t.bbox), a.value.addSource($t, {
|
|
2121
2143
|
type: "geojson",
|
|
2122
2144
|
data: {
|
|
2123
2145
|
type: "FeatureCollection",
|
|
@@ -2146,7 +2168,7 @@ var Hr = ["id"], Ur = /* @__PURE__ */ wt(/* @__PURE__ */ l({
|
|
|
2146
2168
|
}
|
|
2147
2169
|
function y(e, t) {
|
|
2148
2170
|
if (!a.value) throw Error("Call initMap() function first.");
|
|
2149
|
-
s.value = new ie.Popup().setLngLat(e).setHTML(`${
|
|
2171
|
+
s.value = new ie.Popup().setLngLat(e).setHTML(`${rt[t.properties.objtype]}-${t.properties.id}-v${t.properties.version}`).addTo(a.value);
|
|
2150
2172
|
}
|
|
2151
2173
|
function b() {
|
|
2152
2174
|
s.value?.remove(), s.value = void 0;
|
|
@@ -2157,9 +2179,9 @@ var Hr = ["id"], Ur = /* @__PURE__ */ wt(/* @__PURE__ */ l({
|
|
|
2157
2179
|
return (t, n) => re((S(), i("div", {
|
|
2158
2180
|
id: `map-${e.id}`,
|
|
2159
2181
|
class: "v-map"
|
|
2160
|
-
}, null, 8, Hr)), [[M(
|
|
2182
|
+
}, null, 8, Hr)), [[M(Jt), x]]);
|
|
2161
2183
|
}
|
|
2162
|
-
}), [["__scopeId", "data-v-
|
|
2184
|
+
}), [["__scopeId", "data-v-1249c7ee"]]), Wr = ["id"], Gr = { class: "group-header" }, Kr = { class: "header-start" }, qr = ["href"], Jr = ["title"], Yr = {
|
|
2163
2185
|
key: 0,
|
|
2164
2186
|
class: "name-before"
|
|
2165
2187
|
}, Xr = {
|
|
@@ -2171,7 +2193,7 @@ var Hr = ["id"], Ur = /* @__PURE__ */ wt(/* @__PURE__ */ l({
|
|
|
2171
2193
|
}, Qr = { class: "header-center" }, $r = { class: "header-end" }, ei = { class: "group-content" }, ti = {
|
|
2172
2194
|
key: 0,
|
|
2173
2195
|
class: "content-start"
|
|
2174
|
-
}, ni = { key: 0 }, ri = { key: 1 }, ii = /* @__PURE__ */
|
|
2196
|
+
}, ni = { key: 0 }, ri = { key: 1 }, ii = /* @__PURE__ */ Ct(/* @__PURE__ */ l({
|
|
2175
2197
|
__name: "LoChaGroup",
|
|
2176
2198
|
props: {
|
|
2177
2199
|
id: {},
|
|
@@ -2180,12 +2202,17 @@ var Hr = ["id"], Ur = /* @__PURE__ */ wt(/* @__PURE__ */ l({
|
|
|
2180
2202
|
josmTarget: {}
|
|
2181
2203
|
},
|
|
2182
2204
|
emits: ["navigate"],
|
|
2183
|
-
setup(
|
|
2184
|
-
ee((e) => ({
|
|
2185
|
-
let
|
|
2186
|
-
if (!
|
|
2187
|
-
let
|
|
2188
|
-
|
|
2205
|
+
setup(c) {
|
|
2206
|
+
ee((e) => ({ v289cf7e2: f.value }));
|
|
2207
|
+
let l = c, u = te(), d = t(() => !!u["content-start"]), f = t(() => d.value ? "repeat(4, minmax(0, 1fr))" : "repeat(3, minmax(0, 1fr))"), m = t(() => d.value ? 3 : 2), h = t(() => d.value ? 4 : 3), _ = p(tt), { loCha: y, getBeforeFeatures: b, getAfterFeatures: x } = p(et);
|
|
2208
|
+
if (!y.value) throw Error("LoCha is empty.");
|
|
2209
|
+
let C = t(() => b(l.features)), w = t(() => x(l.features)), T = t(() => C.value.length > 0 && w.value.length === 0), O = t(() => C.value.length === 0 && w.value.length > 0), A = t(() => C.value.length === 1 && w.value.length === 1 && !!w.value[0]?.properties.deleted), j = t(() => C.value.length === 1 && w.value.length === 1 && !w.value[0]?.properties.deleted);
|
|
2210
|
+
function ne(e) {
|
|
2211
|
+
let t = (y.value?.metadata.links[l.index] ?? []).filter((t) => t.after === e.id).map((e) => e.before).filter(Boolean);
|
|
2212
|
+
return l.features.filter((e) => t.includes(e.id));
|
|
2213
|
+
}
|
|
2214
|
+
let N = t(() => {
|
|
2215
|
+
let e = [...new Set(C.value.map((e) => e.properties.tags?.name).filter(Boolean))], t = [...new Set(w.value.map((e) => e.properties.tags?.name).filter(Boolean))], n = e.length > 0 ? e.join(", ") : null, r = t.length > 0 ? t.join(", ") : null;
|
|
2189
2216
|
return n === r ? {
|
|
2190
2217
|
before: null,
|
|
2191
2218
|
after: r
|
|
@@ -2193,87 +2220,95 @@ var Hr = ["id"], Ur = /* @__PURE__ */ wt(/* @__PURE__ */ l({
|
|
|
2193
2220
|
before: n,
|
|
2194
2221
|
after: r
|
|
2195
2222
|
};
|
|
2196
|
-
}),
|
|
2197
|
-
let { before: e, after: t } =
|
|
2223
|
+
}), re = t(() => {
|
|
2224
|
+
let { before: e, after: t } = N.value;
|
|
2198
2225
|
return e && t ? `${e} → ${t}` : e ?? t ?? void 0;
|
|
2199
2226
|
});
|
|
2200
|
-
return (t,
|
|
2201
|
-
id:
|
|
2227
|
+
return (t, u) => (S(), i("div", {
|
|
2228
|
+
id: c.id,
|
|
2202
2229
|
class: "locha-group"
|
|
2203
2230
|
}, [a("div", Gr, [
|
|
2204
2231
|
a("div", Kr, [a("a", {
|
|
2205
2232
|
class: "anchor-button",
|
|
2206
|
-
href: `#${
|
|
2207
|
-
onClick:
|
|
2233
|
+
href: `#${c.id}`,
|
|
2234
|
+
onClick: u[0] ||= F((e) => t.$emit("navigate", `#${c.id}`), ["prevent"])
|
|
2208
2235
|
}, "🔗", 8, qr), a("h3", {
|
|
2209
2236
|
class: "group-name",
|
|
2210
|
-
title:
|
|
2237
|
+
title: re.value
|
|
2211
2238
|
}, [
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2239
|
+
N.value.before ? (S(), i("span", Yr, k(N.value.before), 1)) : r("", !0),
|
|
2240
|
+
N.value.before ? (S(), i("span", Xr, " → ")) : r("", !0),
|
|
2241
|
+
N.value.after ? (S(), i("span", Zr, k(N.value.after), 1)) : r("", !0)
|
|
2215
2242
|
], 8, Jr)]),
|
|
2216
|
-
a("div", Qr, [D(t.$slots, "header-center", { index:
|
|
2217
|
-
a("div", $r, [D(t.$slots, "header-end", { index:
|
|
2243
|
+
a("div", Qr, [D(t.$slots, "header-center", { index: c.index }, void 0, !0)]),
|
|
2244
|
+
a("div", $r, [D(t.$slots, "header-end", { index: c.index }, void 0, !0)])
|
|
2218
2245
|
]), a("div", ei, [
|
|
2219
|
-
t.$slots["content-start"] ? (S(), i("div", ti, [D(t.$slots, "content-start", { index:
|
|
2220
|
-
!
|
|
2246
|
+
t.$slots["content-start"] ? (S(), i("div", ti, [D(t.$slots, "content-start", { index: c.index }, void 0, !0)])) : r("", !0),
|
|
2247
|
+
!j.value && !O.value && !A.value ? (S(), i("div", {
|
|
2221
2248
|
key: 1,
|
|
2222
2249
|
class: "before-list",
|
|
2223
|
-
style: v(
|
|
2224
|
-
}, [a("ul", null, [(S(!0), i(e, null, E(
|
|
2250
|
+
style: v(T.value ? { gridColumnStart: 2 } : {})
|
|
2251
|
+
}, [a("ul", null, [(S(!0), i(e, null, E(C.value, (e) => (S(), i("li", { key: e.id }, [s(wt, {
|
|
2225
2252
|
feature: e,
|
|
2226
|
-
"josm-target":
|
|
2253
|
+
"josm-target": c.josmTarget
|
|
2227
2254
|
}, o({ _: 2 }, [t.$slots["object-detail"] ? {
|
|
2228
2255
|
name: "object-detail",
|
|
2229
2256
|
fn: P(() => [D(t.$slots, "object-detail", {
|
|
2230
2257
|
feature: e,
|
|
2231
|
-
index:
|
|
2258
|
+
index: c.index
|
|
2232
2259
|
}, void 0, !0)]),
|
|
2233
2260
|
key: "0"
|
|
2234
2261
|
} : void 0]), 1032, ["feature", "josm-target"])]))), 128))])], 4)) : r("", !0),
|
|
2235
|
-
|
|
2262
|
+
T.value ? r("", !0) : (S(), i("div", {
|
|
2236
2263
|
key: 2,
|
|
2237
|
-
class: g(["after-list", { "list--wide":
|
|
2238
|
-
style: v(
|
|
2239
|
-
}, [a("ul", null, [
|
|
2240
|
-
feature:
|
|
2241
|
-
"josm-target":
|
|
2264
|
+
class: g(["after-list", { "list--wide": j.value }]),
|
|
2265
|
+
style: v(O.value ? { gridColumnStart: m.value } : A.value ? { gridColumnStart: 2 } : {})
|
|
2266
|
+
}, [a("ul", null, [A.value ? (S(), i("li", ni, [s(wt, {
|
|
2267
|
+
feature: w.value[0],
|
|
2268
|
+
"josm-target": c.josmTarget
|
|
2242
2269
|
}, {
|
|
2243
2270
|
"object-detail": P(() => [D(t.$slots, "object-detail", {
|
|
2244
|
-
feature:
|
|
2245
|
-
index:
|
|
2271
|
+
feature: C.value[0],
|
|
2272
|
+
index: c.index
|
|
2246
2273
|
}, void 0, !0)]),
|
|
2247
2274
|
_: 3
|
|
2248
|
-
}, 8, ["feature", "josm-target"])])) :
|
|
2249
|
-
feature:
|
|
2250
|
-
"josm-target":
|
|
2275
|
+
}, 8, ["feature", "josm-target"])])) : j.value ? (S(), i("li", ri, [s(wt, {
|
|
2276
|
+
feature: w.value[0],
|
|
2277
|
+
"josm-target": c.josmTarget
|
|
2251
2278
|
}, {
|
|
2252
|
-
before: P(() => [s(
|
|
2253
|
-
feature:
|
|
2279
|
+
before: P(() => [s(wt, {
|
|
2280
|
+
feature: C.value[0],
|
|
2254
2281
|
compact: !0
|
|
2255
2282
|
}, null, 8, ["feature"])]),
|
|
2256
2283
|
"object-detail": P(() => [D(t.$slots, "object-detail", {
|
|
2257
|
-
feature:
|
|
2258
|
-
index:
|
|
2284
|
+
feature: w.value[0],
|
|
2285
|
+
index: c.index
|
|
2259
2286
|
}, void 0, !0)]),
|
|
2260
2287
|
_: 3
|
|
2261
|
-
}, 8, ["feature", "josm-target"])])) : (S(!0), i(e, { key: 2 }, E(
|
|
2262
|
-
feature:
|
|
2263
|
-
"josm-target":
|
|
2264
|
-
}, o({ _: 2 }, [
|
|
2288
|
+
}, 8, ["feature", "josm-target"])])) : (S(!0), i(e, { key: 2 }, E(w.value, (r) => (S(), i("li", { key: r.id }, [s(wt, {
|
|
2289
|
+
feature: r,
|
|
2290
|
+
"josm-target": c.josmTarget
|
|
2291
|
+
}, o({ _: 2 }, [ne(r).length ? {
|
|
2292
|
+
name: "before",
|
|
2293
|
+
fn: P(() => [(S(!0), i(e, null, E(ne(r), (e) => (S(), n(wt, {
|
|
2294
|
+
key: e.id,
|
|
2295
|
+
feature: e,
|
|
2296
|
+
compact: !0
|
|
2297
|
+
}, null, 8, ["feature"]))), 128))]),
|
|
2298
|
+
key: "0"
|
|
2299
|
+
} : void 0, t.$slots["object-detail"] ? {
|
|
2265
2300
|
name: "object-detail",
|
|
2266
2301
|
fn: P(() => [D(t.$slots, "object-detail", {
|
|
2267
|
-
feature:
|
|
2268
|
-
index:
|
|
2302
|
+
feature: r,
|
|
2303
|
+
index: c.index
|
|
2269
2304
|
}, void 0, !0)]),
|
|
2270
|
-
key: "
|
|
2305
|
+
key: "1"
|
|
2271
2306
|
} : void 0]), 1032, ["feature", "josm-target"])]))), 128))])], 6)),
|
|
2272
2307
|
s(Ur, {
|
|
2273
|
-
id: `${M(
|
|
2274
|
-
features:
|
|
2275
|
-
bbox: M(
|
|
2276
|
-
style: v({ gridColumnStart:
|
|
2308
|
+
id: `${M(_)}-${l.index}`,
|
|
2309
|
+
features: c.features,
|
|
2310
|
+
bbox: M(y)?.bbox,
|
|
2311
|
+
style: v({ gridColumnStart: h.value })
|
|
2277
2312
|
}, null, 8, [
|
|
2278
2313
|
"id",
|
|
2279
2314
|
"features",
|
|
@@ -2282,7 +2317,7 @@ var Hr = ["id"], Ur = /* @__PURE__ */ wt(/* @__PURE__ */ l({
|
|
|
2282
2317
|
])
|
|
2283
2318
|
])], 8, Wr));
|
|
2284
2319
|
}
|
|
2285
|
-
}), [["__scopeId", "data-v-
|
|
2320
|
+
}), [["__scopeId", "data-v-966e155d"]]);
|
|
2286
2321
|
//#endregion
|
|
2287
2322
|
//#region src/utils/scrollToSection.ts
|
|
2288
2323
|
function ai(e, t = {}) {
|
|
@@ -2295,61 +2330,69 @@ function ai(e, t = {}) {
|
|
|
2295
2330
|
}
|
|
2296
2331
|
//#endregion
|
|
2297
2332
|
//#region src/components/LoCha/LoChaGroupList.vue?vue&type=script&setup=true&lang.ts
|
|
2298
|
-
var oi = ["name"], si = /* @__PURE__ */
|
|
2333
|
+
var oi = ["name"], si = /* @__PURE__ */ Ct(/* @__PURE__ */ l({
|
|
2299
2334
|
__name: "LoChaGroupList",
|
|
2300
2335
|
props: { hash: {} },
|
|
2301
2336
|
setup(t) {
|
|
2302
|
-
ee((e) => ({
|
|
2303
|
-
let n = t, { groups: r } = p(
|
|
2304
|
-
|
|
2337
|
+
ee((e) => ({ v3a327003: M(l) }));
|
|
2338
|
+
let n = t, { groups: r } = p(et), c = p(tt), l = K.delete, u = T(), d = ne("listRef"), f = ne("scrollRef");
|
|
2339
|
+
N(r, () => {
|
|
2340
|
+
h(() => {
|
|
2341
|
+
f.value && (f.value.scrollTop = 0);
|
|
2342
|
+
});
|
|
2343
|
+
});
|
|
2344
|
+
function _(e) {
|
|
2305
2345
|
return `locha-${c}-group-${e}`;
|
|
2306
2346
|
}
|
|
2307
|
-
function
|
|
2347
|
+
function v() {
|
|
2308
2348
|
return `hidden_josm_target_${c}`;
|
|
2309
2349
|
}
|
|
2310
|
-
let
|
|
2311
|
-
function
|
|
2350
|
+
let b = !1;
|
|
2351
|
+
function C(e) {
|
|
2312
2352
|
if (u.value === e) {
|
|
2313
|
-
|
|
2353
|
+
b = !0, u.value = void 0, history.replaceState(null, "", `${location.pathname}${location.search}`), window.dispatchEvent(new CustomEvent("locha-navigate", { detail: {
|
|
2314
2354
|
hash: void 0,
|
|
2315
2355
|
instanceId: c
|
|
2316
2356
|
} })), h(() => {
|
|
2317
|
-
|
|
2357
|
+
b = !1;
|
|
2318
2358
|
});
|
|
2319
2359
|
return;
|
|
2320
2360
|
}
|
|
2321
|
-
|
|
2361
|
+
b = !0, u.value = e, history.replaceState(null, "", e), window.dispatchEvent(new CustomEvent("locha-navigate", { detail: {
|
|
2322
2362
|
hash: e,
|
|
2323
2363
|
instanceId: c
|
|
2324
2364
|
} })), h(() => {
|
|
2325
|
-
|
|
2365
|
+
b = !1, ai(e, { container: d.value ?? void 0 });
|
|
2326
2366
|
});
|
|
2327
2367
|
}
|
|
2328
|
-
function
|
|
2368
|
+
function w(e) {
|
|
2329
2369
|
let { instanceId: t } = e.detail;
|
|
2330
2370
|
t !== c && (u.value = void 0);
|
|
2331
2371
|
}
|
|
2332
2372
|
return N(() => n.hash, (e) => {
|
|
2333
|
-
|
|
2373
|
+
b || (u.value = e, e && h(() => ai(e, { container: d.value ?? void 0 })));
|
|
2334
2374
|
}, { immediate: !0 }), y(() => {
|
|
2335
|
-
window.addEventListener("locha-navigate",
|
|
2375
|
+
window.addEventListener("locha-navigate", w);
|
|
2336
2376
|
let e = window.location.hash;
|
|
2337
|
-
e && !n.hash &&
|
|
2377
|
+
e && !n.hash && C(e);
|
|
2338
2378
|
}), x(() => {
|
|
2339
|
-
window.removeEventListener("locha-navigate",
|
|
2379
|
+
window.removeEventListener("locha-navigate", w);
|
|
2340
2380
|
}), (t, n) => (S(), i("div", {
|
|
2341
2381
|
ref_key: "listRef",
|
|
2342
2382
|
ref: d,
|
|
2343
2383
|
class: "locha-group-list"
|
|
2344
|
-
}, [a("ul",
|
|
2384
|
+
}, [a("ul", {
|
|
2385
|
+
ref_key: "scrollRef",
|
|
2386
|
+
ref: f
|
|
2387
|
+
}, [(S(!0), i(e, null, E(M(r), (e, n) => (S(), i("li", {
|
|
2345
2388
|
key: n,
|
|
2346
|
-
class: g({ selected: u.value === `#${
|
|
2389
|
+
class: g({ selected: u.value === `#${_(n)}` })
|
|
2347
2390
|
}, [s(ii, {
|
|
2348
|
-
id:
|
|
2391
|
+
id: _(n),
|
|
2349
2392
|
features: e,
|
|
2350
2393
|
index: n,
|
|
2351
|
-
"josm-target":
|
|
2352
|
-
onNavigate:
|
|
2394
|
+
"josm-target": v(),
|
|
2395
|
+
onNavigate: C
|
|
2353
2396
|
}, o({ _: 2 }, [
|
|
2354
2397
|
t.$slots["object-detail"] ? {
|
|
2355
2398
|
name: "object-detail",
|
|
@@ -2376,20 +2419,20 @@ var oi = ["name"], si = /* @__PURE__ */ wt(/* @__PURE__ */ l({
|
|
|
2376
2419
|
"features",
|
|
2377
2420
|
"index",
|
|
2378
2421
|
"josm-target"
|
|
2379
|
-
])], 2))), 128))]), a("iframe", {
|
|
2380
|
-
name:
|
|
2422
|
+
])], 2))), 128))], 512), a("iframe", {
|
|
2423
|
+
name: v(),
|
|
2381
2424
|
style: { display: "none" }
|
|
2382
2425
|
}, null, 8, oi)], 512));
|
|
2383
2426
|
}
|
|
2384
|
-
}), [["__scopeId", "data-v-
|
|
2427
|
+
}), [["__scopeId", "data-v-ed63cb3b"]]), ci = {
|
|
2385
2428
|
key: 0,
|
|
2386
2429
|
class: "user-feedback"
|
|
2387
|
-
}, li = /* @__PURE__ */
|
|
2430
|
+
}, li = /* @__PURE__ */ Ct(/* @__PURE__ */ l({
|
|
2388
2431
|
__name: "LoCha",
|
|
2389
2432
|
props: {
|
|
2390
2433
|
id: {},
|
|
2391
2434
|
data: {},
|
|
2392
|
-
mapStyleUrl: { default:
|
|
2435
|
+
mapStyleUrl: { default: Xt },
|
|
2393
2436
|
reasonCollapsed: {
|
|
2394
2437
|
type: Boolean,
|
|
2395
2438
|
default: !0
|
|
@@ -2398,13 +2441,13 @@ var oi = ["name"], si = /* @__PURE__ */ wt(/* @__PURE__ */ l({
|
|
|
2398
2441
|
},
|
|
2399
2442
|
setup(e) {
|
|
2400
2443
|
let r = e;
|
|
2401
|
-
C(
|
|
2402
|
-
let a =
|
|
2403
|
-
C(
|
|
2404
|
-
let { featureCount: s, groups: c, setLoCha: l } = a,
|
|
2444
|
+
C($e, r.reasonCollapsed), C(tt, r.id), C(nt, r.mapStyleUrl);
|
|
2445
|
+
let a = Qe();
|
|
2446
|
+
C(et, a);
|
|
2447
|
+
let { featureCount: s, groups: c, setLoCha: l, resetLoCha: u } = a, d = t(() => c.value.length === 1);
|
|
2405
2448
|
return N(() => r.data, (e) => {
|
|
2406
|
-
e
|
|
2407
|
-
}, { immediate: !0 }), (t, r) => (S(), i("section", { class: g(["locha", { "locha--single":
|
|
2449
|
+
e ? l(e) : u();
|
|
2450
|
+
}, { immediate: !0 }), (t, r) => (S(), i("section", { class: g(["locha", { "locha--single": d.value }]) }, [M(s) ? (S(), n(si, {
|
|
2408
2451
|
key: 1,
|
|
2409
2452
|
hash: e.hash
|
|
2410
2453
|
}, o({ _: 2 }, [
|
|
@@ -2430,7 +2473,7 @@ var oi = ["name"], si = /* @__PURE__ */ wt(/* @__PURE__ */ l({
|
|
|
2430
2473
|
} : void 0
|
|
2431
2474
|
]), 1032, ["hash"])) : (S(), i("p", ci, " ⚠️ No data "))], 2));
|
|
2432
2475
|
}
|
|
2433
|
-
}), [["__scopeId", "data-v-
|
|
2476
|
+
}), [["__scopeId", "data-v-849ebbbc"]]);
|
|
2434
2477
|
//#endregion
|
|
2435
2478
|
export { li as LoCha, ai as scrollToSection };
|
|
2436
2479
|
|