@idmwx/idmui-gl3 5.6.6 → 5.6.7
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.js +157 -157
- package/dist/index.umd.cjs +3 -3
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -307,7 +307,7 @@ const S = (t, e) => {
|
|
|
307
307
|
class: "radio-tip"
|
|
308
308
|
};
|
|
309
309
|
function $t(t, e, a, r, i, o) {
|
|
310
|
-
const l = z("ElTooltip"), c = z("ElRadio"), h = z("ElRadioGroup"),
|
|
310
|
+
const l = z("ElTooltip"), c = z("ElRadio"), h = z("ElRadioGroup"), d = z("ElScrollbar");
|
|
311
311
|
return m(), g("div", ft, [
|
|
312
312
|
s("div", {
|
|
313
313
|
class: "menu-bar-box",
|
|
@@ -424,30 +424,30 @@ function $t(t, e, a, r, i, o) {
|
|
|
424
424
|
}, [
|
|
425
425
|
s("div", {
|
|
426
426
|
class: "checkbox",
|
|
427
|
-
onClick: (
|
|
427
|
+
onClick: (p) => o.handleWeatherLayerPick(n)
|
|
428
428
|
}, null, 8, Ct),
|
|
429
429
|
s("span", {
|
|
430
430
|
class: "name",
|
|
431
|
-
onClick: (
|
|
431
|
+
onClick: (p) => o.handleWeatherLayerPick(n)
|
|
432
432
|
}, I(n.name), 9, xt),
|
|
433
|
-
n.key === "wind" && i.activeWeatherLayersCollected.some((
|
|
433
|
+
n.key === "wind" && i.activeWeatherLayersCollected.some((p) => p.key === n.key) ? (m(), g("div", Bt, [
|
|
434
434
|
s("i", {
|
|
435
435
|
class: F(["iconfont sub-layer-icon", i.showWindParticleCollected ? "active" : ""]),
|
|
436
|
-
onClick: e[6] || (e[6] = (
|
|
436
|
+
onClick: e[6] || (e[6] = (p) => o.handleToggleWindParticle())
|
|
437
437
|
}, "", 2),
|
|
438
438
|
s("i", {
|
|
439
439
|
class: F(["iconfont sub-layer-icon", i.showWindFeatherCollected ? "active" : ""]),
|
|
440
|
-
onClick: e[7] || (e[7] = (
|
|
440
|
+
onClick: e[7] || (e[7] = (p) => o.handleToggleWindFeather())
|
|
441
441
|
}, "", 2)
|
|
442
442
|
])) : j("", !0),
|
|
443
|
-
n.key === "current" && i.activeWeatherLayersCollected.some((
|
|
443
|
+
n.key === "current" && i.activeWeatherLayersCollected.some((p) => p.key === n.key) ? (m(), g("div", It, [
|
|
444
444
|
s("i", {
|
|
445
445
|
class: F(["iconfont sub-layer-icon", i.showCurrentParticleCollected ? "active" : ""]),
|
|
446
|
-
onClick: e[8] || (e[8] = (
|
|
446
|
+
onClick: e[8] || (e[8] = (p) => o.handleToggleCurrentParticle())
|
|
447
447
|
}, "", 2),
|
|
448
448
|
s("i", {
|
|
449
449
|
class: F(["iconfont sub-layer-icon", i.showCurrentIsobandCollected ? "active" : ""]),
|
|
450
|
-
onClick: e[9] || (e[9] = (
|
|
450
|
+
onClick: e[9] || (e[9] = (p) => o.handleToggleCurrentIsoband())
|
|
451
451
|
}, "", 2)
|
|
452
452
|
])) : j("", !0)
|
|
453
453
|
], 2))), 128))
|
|
@@ -466,7 +466,7 @@ function $t(t, e, a, r, i, o) {
|
|
|
466
466
|
onClick: e[10] || (e[10] = (...n) => o.handleMenuToggle && o.handleMenuToggle(...n))
|
|
467
467
|
}, "")
|
|
468
468
|
]),
|
|
469
|
-
M(
|
|
469
|
+
M(d, { style: { flex: "1" } }, {
|
|
470
470
|
default: ae(() => [
|
|
471
471
|
s("div", Dt, [
|
|
472
472
|
s("div", Pt, [
|
|
@@ -490,35 +490,35 @@ function $t(t, e, a, r, i, o) {
|
|
|
490
490
|
s("div", Tt, [
|
|
491
491
|
s("div", {
|
|
492
492
|
class: "checkbox",
|
|
493
|
-
onClick: (
|
|
493
|
+
onClick: (p) => o.handleWeatherLayerPick(n)
|
|
494
494
|
}, null, 8, Qt),
|
|
495
495
|
s("span", {
|
|
496
496
|
class: "name",
|
|
497
|
-
onClick: (
|
|
497
|
+
onClick: (p) => o.handleWeatherLayerPick(n)
|
|
498
498
|
}, I(n.name), 9, St),
|
|
499
|
-
n.key === "wind" && i.activeWeatherLayersCollected.some((
|
|
499
|
+
n.key === "wind" && i.activeWeatherLayersCollected.some((p) => p.key === n.key) ? (m(), g("div", _t, [
|
|
500
500
|
s("i", {
|
|
501
501
|
class: F(["iconfont sub-layer-icon", i.showWindParticleCollected ? "active" : ""]),
|
|
502
|
-
onClick: e[12] || (e[12] = (
|
|
502
|
+
onClick: e[12] || (e[12] = (p) => o.handleToggleWindParticle())
|
|
503
503
|
}, "", 2),
|
|
504
504
|
s("i", {
|
|
505
505
|
class: F(["iconfont sub-layer-icon", i.showWindFeatherCollected ? "active" : ""]),
|
|
506
|
-
onClick: e[13] || (e[13] = (
|
|
506
|
+
onClick: e[13] || (e[13] = (p) => o.handleToggleWindFeather())
|
|
507
507
|
}, "", 2)
|
|
508
508
|
])) : j("", !0),
|
|
509
|
-
n.key === "current" && i.activeWeatherLayersCollected.some((
|
|
509
|
+
n.key === "current" && i.activeWeatherLayersCollected.some((p) => p.key === n.key) ? (m(), g("div", Ht, [
|
|
510
510
|
s("i", {
|
|
511
511
|
class: F(["iconfont sub-layer-icon", i.showCurrentParticleCollected ? "active" : ""]),
|
|
512
|
-
onClick: e[14] || (e[14] = (
|
|
512
|
+
onClick: e[14] || (e[14] = (p) => o.handleToggleCurrentParticle())
|
|
513
513
|
}, "", 2),
|
|
514
514
|
s("i", {
|
|
515
515
|
class: F(["iconfont sub-layer-icon", i.showCurrentIsobandCollected ? "active" : ""]),
|
|
516
|
-
onClick: e[15] || (e[15] = (
|
|
516
|
+
onClick: e[15] || (e[15] = (p) => o.handleToggleCurrentIsoband())
|
|
517
517
|
}, "", 2)
|
|
518
518
|
])) : j("", !0)
|
|
519
519
|
]),
|
|
520
520
|
s("div", {
|
|
521
|
-
onClick: (
|
|
521
|
+
onClick: (p) => o.handleWeatherLayerCollect(n)
|
|
522
522
|
}, [
|
|
523
523
|
n.collected ? (m(), g("i", Nt, "")) : (m(), g("i", jt, ""))
|
|
524
524
|
], 8, Ot)
|
|
@@ -537,7 +537,7 @@ function $t(t, e, a, r, i, o) {
|
|
|
537
537
|
e[26] || (e[26] = s("div", { class: "layers-title" }, "Other Layers", -1)),
|
|
538
538
|
s("div", Ft, [
|
|
539
539
|
(m(!0), g(R, null, G(i.layers.other, (n) => {
|
|
540
|
-
var
|
|
540
|
+
var p;
|
|
541
541
|
return m(), g("div", {
|
|
542
542
|
key: n.key,
|
|
543
543
|
class: F(["layer flex-between", o.computeLayerClass(n, i.activeOtherLayers)]),
|
|
@@ -545,7 +545,7 @@ function $t(t, e, a, r, i, o) {
|
|
|
545
545
|
}, [
|
|
546
546
|
s("div", Wt, [
|
|
547
547
|
s("div", Ut, [
|
|
548
|
-
(
|
|
548
|
+
(p = o.computeLayerClass(n, i.activeOtherLayers)) != null && p.includes("active") ? (m(), g("i", Yt, "")) : (m(), g("i", Kt, ""))
|
|
549
549
|
]),
|
|
550
550
|
s("span", null, I(n.name), 1)
|
|
551
551
|
])
|
|
@@ -563,7 +563,7 @@ function $t(t, e, a, r, i, o) {
|
|
|
563
563
|
style: { width: "180px", "align-items": "flex-start" }
|
|
564
564
|
}, {
|
|
565
565
|
default: ae(() => [
|
|
566
|
-
(m(!0), g(R, null, G(i.sourceList, (n,
|
|
566
|
+
(m(!0), g(R, null, G(i.sourceList, (n, p) => (m(), pt(c, {
|
|
567
567
|
key: `source${n.name}`,
|
|
568
568
|
value: n.name
|
|
569
569
|
}, {
|
|
@@ -571,8 +571,8 @@ function $t(t, e, a, r, i, o) {
|
|
|
571
571
|
var w, b, A, E, v, f;
|
|
572
572
|
return [
|
|
573
573
|
q(I(n.name) + " ", 1),
|
|
574
|
-
|
|
575
|
-
|
|
574
|
+
p !== 0 ? (m(), g("span", qt, I(n.resolution) + "km " + I(n.length) + "days", 1)) : j("", !0),
|
|
575
|
+
p === 0 ? (m(), g("div", Vt, "Provides the best forecast")) : (A = (b = (w = n == null ? void 0 : n.update) == null ? void 0 : w.default) == null ? void 0 : b.meta) != null && A.initialisationTime ? (m(), g("div", Zt, "Update: " + I(o.computeDateZ((f = (v = (E = n == null ? void 0 : n.update) == null ? void 0 : E.default) == null ? void 0 : v.meta) == null ? void 0 : f.initialisationTime)), 1)) : j("", !0)
|
|
576
576
|
];
|
|
577
577
|
}),
|
|
578
578
|
_: 2
|
|
@@ -673,22 +673,22 @@ const ta = {
|
|
|
673
673
|
else {
|
|
674
674
|
this.map.addSource(this.source, { type: "geojson", data: c });
|
|
675
675
|
for (let h = 0; h < (this.barbs ?? []).length - 1; h++) {
|
|
676
|
-
const
|
|
676
|
+
const d = (this.barbs ?? [])[h] || 0, n = (this.barbs ?? [])[h + 1] || 0, p = d < 10 ? `00${d}kts` : d < 100 ? `0${d}kts` : `${d}kts`;
|
|
677
677
|
this.map.addLayer(
|
|
678
678
|
{
|
|
679
|
-
id:
|
|
679
|
+
id: p,
|
|
680
680
|
type: "symbol",
|
|
681
681
|
filter: [
|
|
682
682
|
"all",
|
|
683
683
|
// @ts-ignore
|
|
684
|
-
[">=", "spd",
|
|
684
|
+
[">=", "spd", d],
|
|
685
685
|
// @ts-ignore
|
|
686
686
|
["<", "spd", n]
|
|
687
687
|
],
|
|
688
688
|
source: this.source,
|
|
689
689
|
layout: {
|
|
690
690
|
"symbol-placement": "point",
|
|
691
|
-
"icon-image":
|
|
691
|
+
"icon-image": p,
|
|
692
692
|
// mapbox sprite
|
|
693
693
|
"icon-size": 0.14,
|
|
694
694
|
"icon-offset": [0, -20],
|
|
@@ -781,8 +781,8 @@ class Je {
|
|
|
781
781
|
* @param [lb.x, lb.y, rt.x, rt.y]
|
|
782
782
|
*/
|
|
783
783
|
getBoundPixel() {
|
|
784
|
-
const e = this.map.getBounds(), a = this.map.getZoom() + 1, r = [e._ne.lng, e._ne.lat], i = [e._sw.lng, e._sw.lat], [o, l] = this.convertNLng(r[0]), [c, h] = this.convertNLng(i[0]), [
|
|
785
|
-
return [
|
|
784
|
+
const e = this.map.getBounds(), a = this.map.getZoom() + 1, r = [e._ne.lng, e._ne.lat], i = [e._sw.lng, e._sw.lat], [o, l] = this.convertNLng(r[0]), [c, h] = this.convertNLng(i[0]), [d, n] = this.mercator.px([o, r[1]], a), [p, w] = this.mercator.px([c, i[1]], a), b = Math.round(this.mercator.size * Math.pow(2, a) * (l + h));
|
|
785
|
+
return [p, w, d + b, n];
|
|
786
786
|
}
|
|
787
787
|
/**
|
|
788
788
|
* [视窗边界像素宽度]
|
|
@@ -799,11 +799,11 @@ class Je {
|
|
|
799
799
|
getWorldCopy(e, a) {
|
|
800
800
|
const r = 2 ** a, [i, o, l, c] = e.map((n) => ~~(n / (r * 256))), h = [];
|
|
801
801
|
for (let n = c; n <= o; n++)
|
|
802
|
-
for (let
|
|
803
|
-
h.push([
|
|
802
|
+
for (let p = i; p <= l; p++)
|
|
803
|
+
h.push([p, n]);
|
|
804
804
|
return h.map((n) => {
|
|
805
|
-
const
|
|
806
|
-
return [n[0] *
|
|
805
|
+
const p = 2 ** a * 256;
|
|
806
|
+
return [n[0] * p, n[1] * p, p];
|
|
807
807
|
});
|
|
808
808
|
}
|
|
809
809
|
resize() {
|
|
@@ -885,13 +885,13 @@ class Ce {
|
|
|
885
885
|
if (i) {
|
|
886
886
|
const o = { program: i }, l = e.getProgramParameter(i, e.ACTIVE_ATTRIBUTES);
|
|
887
887
|
for (let h = 0; h < l; h++) {
|
|
888
|
-
const
|
|
889
|
-
o[
|
|
888
|
+
const d = e.getActiveAttrib(i, h);
|
|
889
|
+
o[d.name] = e.getAttribLocation(i, d.name);
|
|
890
890
|
}
|
|
891
891
|
const c = e.getProgramParameter(i, e.ACTIVE_UNIFORMS);
|
|
892
892
|
for (let h = 0; h < c; h++) {
|
|
893
|
-
const
|
|
894
|
-
o[
|
|
893
|
+
const d = e.getActiveUniform(i, h);
|
|
894
|
+
o[d.name] = e.getUniformLocation(i, d.name);
|
|
895
895
|
}
|
|
896
896
|
return o;
|
|
897
897
|
}
|
|
@@ -906,8 +906,8 @@ class Ce {
|
|
|
906
906
|
const c = l.getContext("2d");
|
|
907
907
|
if (c && e) {
|
|
908
908
|
const h = c == null ? void 0 : c.createLinearGradient(0, 0, 256, 0);
|
|
909
|
-
return a.forEach(([
|
|
910
|
-
h.addColorStop(
|
|
909
|
+
return a.forEach(([d, n]) => {
|
|
910
|
+
h.addColorStop(d, n);
|
|
911
911
|
}), c.fillStyle = h, c.fillRect(0, 0, 256, 1), {
|
|
912
912
|
canvas: l,
|
|
913
913
|
texture: this.createTexture(
|
|
@@ -929,8 +929,8 @@ class Ce {
|
|
|
929
929
|
const l = this.createTexture(e, e.NEAREST, e.NEAREST, e.CLAMP_TO_EDGE, o, r, r), c = this.createTexture(e, e.NEAREST, e.NEAREST, e.CLAMP_TO_EDGE, o, r, r), h = new Float32Array(i);
|
|
930
930
|
for (let n = 0; n < i; n++)
|
|
931
931
|
h[n] = n;
|
|
932
|
-
const
|
|
933
|
-
return { resolution: r, total: i, texture0: l, texture1: c, indexBuffer:
|
|
932
|
+
const d = this.createDataBuffer(e, "array", h);
|
|
933
|
+
return { resolution: r, total: i, texture0: l, texture1: c, indexBuffer: d };
|
|
934
934
|
}
|
|
935
935
|
bind(e, a, r) {
|
|
936
936
|
const i = this.createProgram(e, a, r);
|
|
@@ -945,13 +945,13 @@ class Ce {
|
|
|
945
945
|
return {};
|
|
946
946
|
}
|
|
947
947
|
bindParticle(e, a, r, i, o, l) {
|
|
948
|
-
const c = this.createProgramWrapper(e, a, r), h = this.createProgramWrapper(e, i, o),
|
|
949
|
-
return { particle: c, screen: h, update:
|
|
948
|
+
const c = this.createProgramWrapper(e, a, r), h = this.createProgramWrapper(e, i, o), d = this.createProgramWrapper(e, i, l), n = this.createDataBuffer(e, "array", new Float32Array([0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1])), p = e.createFramebuffer();
|
|
949
|
+
return { particle: c, screen: h, update: d, quadBuffer: n, frameBuffer: p };
|
|
950
950
|
}
|
|
951
951
|
draw(e, a, r, i, o, l, c) {
|
|
952
|
-
var h,
|
|
952
|
+
var h, d;
|
|
953
953
|
if (a && r) {
|
|
954
|
-
e.resize(), a == null || a.viewport(0, 0, (h = a == null ? void 0 : a.canvas) == null ? void 0 : h.width, (
|
|
954
|
+
e.resize(), a == null || a.viewport(0, 0, (h = a == null ? void 0 : a.canvas) == null ? void 0 : h.width, (d = a == null ? void 0 : a.canvas) == null ? void 0 : d.height), a.clearColor(0, 0, 0, 0), a.clear(a.COLOR_BUFFER_BIT | a.DEPTH_BUFFER_BIT);
|
|
955
955
|
try {
|
|
956
956
|
a.useProgram(r);
|
|
957
957
|
const n = {
|
|
@@ -963,9 +963,9 @@ class Ce {
|
|
|
963
963
|
sRange: a.getUniformLocation(r, "u_range_s")
|
|
964
964
|
};
|
|
965
965
|
n.resolution && a.uniform2f(n.resolution, a.canvas.width * e.ratio, a.canvas.height * e.ratio), a.activeTexture(a.TEXTURE0), a.bindTexture(a.TEXTURE_2D, i), n.image && a.uniform1i(n.image, 0), a.activeTexture(a.TEXTURE1), a.bindTexture(a.TEXTURE_2D, o), n.color && a.uniform1i(n.color, 1), c != null && c.uvRange && (c != null && c.sRange) && (n.uvRange && a.uniform2f(n.uvRange, c.uvRange[0], c.uvRange[1]), n.sRange && a.uniform2f(n.sRange, c.sRange[0], c.sRange[1])), n.scale && a.uniform1f(n.scale, (c == null ? void 0 : c.scale) || 1);
|
|
966
|
-
const
|
|
966
|
+
const p = e.getBoundPixel(), w = e.map.getZoom() + 1, b = e.getWorldCopy(p, w);
|
|
967
967
|
for (const A of b) {
|
|
968
|
-
const E = (A[0] -
|
|
968
|
+
const E = (A[0] - p[0]) * e.ratio, v = (A[1] - p[3]) * e.ratio, f = A[2] * e.ratio, [u, C, y, B] = [E, f + E, v, f + v], D = new Float32Array([u, y, C, y, u, B, u, B, C, y, C, B]);
|
|
969
969
|
a.bindBuffer(a.ARRAY_BUFFER, l), a.bufferData(a.ARRAY_BUFFER, D, a.STATIC_DRAW), a.drawArrays(a.TRIANGLES, 0, 6);
|
|
970
970
|
}
|
|
971
971
|
} catch (n) {
|
|
@@ -4288,24 +4288,24 @@ const Ta = {
|
|
|
4288
4288
|
var l, c, h;
|
|
4289
4289
|
(l = o.properties) != null && l.name && !a.includes((c = o.properties) == null ? void 0 : c.name) && a.push((h = o.properties) == null ? void 0 : h.name);
|
|
4290
4290
|
}), a.forEach((o) => {
|
|
4291
|
-
var
|
|
4291
|
+
var d;
|
|
4292
4292
|
let l = 0, c;
|
|
4293
4293
|
const h = t.filter((n) => {
|
|
4294
|
-
var
|
|
4295
|
-
return ((w = (
|
|
4294
|
+
var p, w;
|
|
4295
|
+
return ((w = (p = n.properties) == null ? void 0 : p.category) == null ? void 0 : w.split("-")[0]) === o;
|
|
4296
4296
|
});
|
|
4297
|
-
(
|
|
4298
|
-
var
|
|
4299
|
-
return ((
|
|
4300
|
-
})[0]) == null ||
|
|
4297
|
+
(d = h.filter((n) => {
|
|
4298
|
+
var p, w;
|
|
4299
|
+
return ((p = n.geometry) == null ? void 0 : p.type) === "LineString" && ((w = n.properties) == null ? void 0 : w.type) === "forecast";
|
|
4300
|
+
})[0]) == null || d.properties.model, h.forEach((n, p) => {
|
|
4301
4301
|
var w, b, A, E, v, f;
|
|
4302
|
-
((w = n.geometry) == null ? void 0 : w.type) === "Point" && ((b = n.properties) == null ? void 0 : b.type) === "history" && (l =
|
|
4303
|
-
}), h.map((n,
|
|
4302
|
+
((w = n.geometry) == null ? void 0 : w.type) === "Point" && ((b = n.properties) == null ? void 0 : b.type) === "history" && (l = p, c = c === void 0 ? p : c), ((A = n.geometry) == null ? void 0 : A.type) === "Point" && ((E = n.properties) == null ? void 0 : E.type) === "forecast" && c === void 0 && (c = p), ((v = n.geometry) == null ? void 0 : v.type) === "LineString" && ((f = n.properties) == null || f.type);
|
|
4303
|
+
}), h.map((n, p) => {
|
|
4304
4304
|
var w, b, A, E, v, f, u;
|
|
4305
4305
|
if (((w = n.geometry) == null ? void 0 : w.type) === "LineString" && ((b = n.properties) == null || b.type), ((A = n.geometry) == null ? void 0 : A.type) === "Point" && ((E = n.properties) == null ? void 0 : E.type) === "forecast" && (n.properties.name = o, n.properties.format = U(n.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`)), ((v = n.geometry) == null ? void 0 : v.type) === "Point" && ((f = n.properties) == null ? void 0 : f.type) === "history") {
|
|
4306
4306
|
n.properties.format = U(n.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`);
|
|
4307
4307
|
const C = U((u = n.properties) == null ? void 0 : u.date).utc().format("HHmm") === U().utc().hour(Math.floor(e / 6) * 6).minute("00").format("HHmm");
|
|
4308
|
-
n.properties.showHistoryLabel = C ||
|
|
4308
|
+
n.properties.showHistoryLabel = C || p === l, n.properties.showNameLabel = p === l, n.properties.name = o;
|
|
4309
4309
|
}
|
|
4310
4310
|
return n;
|
|
4311
4311
|
});
|
|
@@ -4342,16 +4342,16 @@ const Ta = {
|
|
|
4342
4342
|
));
|
|
4343
4343
|
},
|
|
4344
4344
|
handleRender() {
|
|
4345
|
-
var t, e, a, r, i, o, l, c, h,
|
|
4345
|
+
var t, e, a, r, i, o, l, c, h, d;
|
|
4346
4346
|
if (!this.map)
|
|
4347
4347
|
setTimeout(() => {
|
|
4348
4348
|
this.handleRender();
|
|
4349
4349
|
}, 500);
|
|
4350
4350
|
else {
|
|
4351
4351
|
if (this.tropicals) {
|
|
4352
|
-
const
|
|
4352
|
+
const p = (/* @__PURE__ */ new Date()).valueOf();
|
|
4353
4353
|
let w = 0, b = 0;
|
|
4354
|
-
(t = this.map) != null && t.getSource(this.source) ? ((a = this.map) == null || a.getSource(this.source).setData((e = this.tropicals) != null && e.active ? this.tropicals.data : this.empty), b = (/* @__PURE__ */ new Date()).valueOf() - (
|
|
4354
|
+
(t = this.map) != null && t.getSource(this.source) ? ((a = this.map) == null || a.getSource(this.source).setData((e = this.tropicals) != null && e.active ? this.tropicals.data : this.empty), b = (/* @__PURE__ */ new Date()).valueOf() - (p + w), console.log("[tropicals] update elapsed: ", b, ", total: ", w += b)) : (this.map.addSource(this.source, {
|
|
4355
4355
|
type: "geojson",
|
|
4356
4356
|
data: (r = this.tropicals) != null && r.active ? (i = this.tropicals) == null ? void 0 : i.data : this.empty
|
|
4357
4357
|
}), this.map.addLayer({
|
|
@@ -4448,9 +4448,9 @@ const Ta = {
|
|
|
4448
4448
|
],
|
|
4449
4449
|
"text-halo-width": 4
|
|
4450
4450
|
}
|
|
4451
|
-
}), b = (/* @__PURE__ */ new Date()).valueOf() - (
|
|
4451
|
+
}), b = (/* @__PURE__ */ new Date()).valueOf() - (p + w), console.log("[tropical] add elapsed: ", b, ", total: ", w += b)), (o = this.map) != null && o.getSource(this.clusterSource) ? ((c = this.map) == null || c.getSource(this.clusterSource).setData((l = this.tropicals) != null && l.active ? this.tropicals.data : this.empty), b = (/* @__PURE__ */ new Date()).valueOf() - (p + w), console.log("[tropical] update elapsed: ", b, ", total: ", w += b)) : (this.map.addSource(this.clusterSource, {
|
|
4452
4452
|
type: "geojson",
|
|
4453
|
-
data: (h = this.tropicals) != null && h.active ? (
|
|
4453
|
+
data: (h = this.tropicals) != null && h.active ? (d = this.tropicals) == null ? void 0 : d.data : this.empty
|
|
4454
4454
|
// cluster: true,
|
|
4455
4455
|
// clusterRadius: 10, // 聚合半径
|
|
4456
4456
|
}), this.map.addLayer({
|
|
@@ -4471,19 +4471,19 @@ const Ta = {
|
|
|
4471
4471
|
"circle-radius": 4,
|
|
4472
4472
|
"circle-color": [
|
|
4473
4473
|
"case",
|
|
4474
|
-
["boolean", ["==", ["get", "
|
|
4474
|
+
["boolean", ["==", ["get", "kts", ["get", "wind"]], null]],
|
|
4475
4475
|
"#03f869",
|
|
4476
|
-
["boolean", ["<", ["get", "
|
|
4476
|
+
["boolean", ["<", ["get", "kts", ["get", "wind"]], 32]],
|
|
4477
4477
|
"#03f869",
|
|
4478
|
-
["boolean", ["<=", ["get", "
|
|
4478
|
+
["boolean", ["<=", ["get", "kts", ["get", "wind"]], 47]],
|
|
4479
4479
|
"#f2f202",
|
|
4480
|
-
["boolean", ["<=", ["get", "
|
|
4480
|
+
["boolean", ["<=", ["get", "kts", ["get", "wind"]], 63]],
|
|
4481
4481
|
"#ff9100",
|
|
4482
|
-
["boolean", ["<=", ["get", "
|
|
4482
|
+
["boolean", ["<=", ["get", "kts", ["get", "wind"]], 79]],
|
|
4483
4483
|
"#f44336",
|
|
4484
|
-
["boolean", ["<", ["get", "
|
|
4484
|
+
["boolean", ["<", ["get", "kts", ["get", "wind"]], 94]],
|
|
4485
4485
|
"#f903d0",
|
|
4486
|
-
["boolean", [">=", ["get", "
|
|
4486
|
+
["boolean", [">=", ["get", "kts", ["get", "wind"]], 94]],
|
|
4487
4487
|
"#8702f9",
|
|
4488
4488
|
"#fff"
|
|
4489
4489
|
]
|
|
@@ -4565,11 +4565,11 @@ const Ta = {
|
|
|
4565
4565
|
"text-halo-color": "#0033ff",
|
|
4566
4566
|
"text-halo-width": 4
|
|
4567
4567
|
}
|
|
4568
|
-
}), b = (/* @__PURE__ */ new Date()).valueOf() - (
|
|
4568
|
+
}), b = (/* @__PURE__ */ new Date()).valueOf() - (p + w), console.log("[tropical] add elapsed: ", b, ", total: ", w += b));
|
|
4569
4569
|
}
|
|
4570
4570
|
this.handleDrawCircle();
|
|
4571
4571
|
const n = nt.interpolate(this.tropicals, 1);
|
|
4572
|
-
this.interpolateData = JSON.parse(JSON.stringify(n)), this.
|
|
4572
|
+
this.interpolateData = JSON.parse(JSON.stringify(n)), this.handleDateChange();
|
|
4573
4573
|
}
|
|
4574
4574
|
},
|
|
4575
4575
|
handleClear() {
|
|
@@ -4577,7 +4577,7 @@ const Ta = {
|
|
|
4577
4577
|
this.map && (this.map.getLayer(this.historyLayer) && this.map.removeLayer(this.historyLayer), this.map.getLayer(this.forecastLayer) && this.map.removeLayer(this.forecastLayer), this.map.getLayer(this.forecastModelLayer) && this.map.removeLayer(this.forecastModelLayer), this.map.getLayer(this.forecastNameLayer) && this.map.removeLayer(this.forecastNameLayer), this.map.getLayer(this.pointCircleLayer) && this.map.removeLayer(this.pointCircleLayer), this.map.getLayer(this.pointCircleLayer + "-border") && this.map.removeLayer(this.pointCircleLayer + "-border"), this.map.getLayer(this.pointLabelLayer) && this.map.removeLayer(this.pointLabelLayer), this.map.getLayer(this.historyPointCircleLayer) && this.map.removeLayer(this.historyPointCircleLayer), this.map.getLayer(this.historyPointCircleLayer + "-border") && this.map.removeLayer(this.historyPointCircleLayer + "-border"), this.map.getLayer(this.historyPointCircleLayer + "-inner") && this.map.removeLayer(this.historyPointCircleLayer + "-inner"), this.map.getLayer(this.historyPointLabelLayer) && this.map.removeLayer(this.historyPointLabelLayer), this.map.getLayer(this.interpolateLineLayer) && this.map.removeLayer(this.interpolateLineLayer), (t = this.interpolateMarkers) == null || t.forEach((e) => e == null ? void 0 : e.remove()), this.map.getSource(this.source) && this.map.removeSource(this.source), this.map.getSource(this.clusterSource) && this.map.removeSource(this.clusterSource), this.map.getSource(this.interpolateSource) && this.map.removeSource(this.interpolateSource), this.map.getLayer(this.circleLayer) && this.map.removeLayer(this.circleLayer), this.map.getSource(this.circleSource) && this.map.removeSource(this.circleSource));
|
|
4578
4578
|
},
|
|
4579
4579
|
handleDateChange() {
|
|
4580
|
-
var t, e, a, r, i, o, l, c, h,
|
|
4580
|
+
var t, e, a, r, i, o, l, c, h, d, n, p, w, b, A, E, v, f, u, C, y, B, D, T, N, O, Q, Y, K, ce, he, de, pe, ue, me, ge;
|
|
4581
4581
|
if ((t = this.interpolateMarkers) == null || t.forEach((te) => te == null ? void 0 : te.remove()), this.circleSourceData.features = [], (e = this.interpolateData) != null && e.length && this.tropicals.active) {
|
|
4582
4582
|
const te = U(this.date).utc().set({ minute: 0, second: 0, millisecond: 0 }), oe = this.interpolateData.filter((_) => _.properties.date === te.format() && !_.properties.disabled), Ae = this.handleComputePolygons(oe), ie = k.featureCollection([...oe]);
|
|
4583
4583
|
Ae.forEach((_) => {
|
|
@@ -4599,7 +4599,7 @@ const Ta = {
|
|
|
4599
4599
|
for (const _ of oe)
|
|
4600
4600
|
if (!_.properties.disabled) {
|
|
4601
4601
|
let $ = "#f44336";
|
|
4602
|
-
((c = (l = _.properties) == null ? void 0 : l.wind) == null ? void 0 : c.
|
|
4602
|
+
((c = (l = _.properties) == null ? void 0 : l.wind) == null ? void 0 : c.kts) < 32 || !((d = (h = _.properties) == null ? void 0 : h.wind) != null && d.kts) ? $ = "#03f869" : ((p = (n = _.properties) == null ? void 0 : n.wind) == null ? void 0 : p.kts) >= 32 && ((b = (w = _.properties) == null ? void 0 : w.wind) == null ? void 0 : b.kts) < 47 ? $ = "#f2f202" : ((E = (A = _.properties) == null ? void 0 : A.wind) == null ? void 0 : E.kts) >= 47 && ((f = (v = _.properties) == null ? void 0 : v.wind) == null ? void 0 : f.kts) < 63 ? $ = "#ff9100" : ((C = (u = _.properties) == null ? void 0 : u.wind) == null ? void 0 : C.kts) >= 63 && ((B = (y = _.properties) == null ? void 0 : y.wind) == null ? void 0 : B.kts) < 79 ? $ = "#f44336" : ((T = (D = _.properties) == null ? void 0 : D.wind) == null ? void 0 : T.kts) >= 79 && ((O = (N = _.properties) == null ? void 0 : N.wind) == null ? void 0 : O.kts) < 94 ? $ = "#f903d0" : ((Y = (Q = _.properties) == null ? void 0 : Q.wind) == null ? void 0 : Y.kts) >= 94 ? $ = "#8702f9" : $ = "#f44336";
|
|
4603
4603
|
const fe = `<svg t="1719918955501"
|
|
4604
4604
|
class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" p-id="18382"
|
|
4605
4605
|
xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
|
|
@@ -4633,7 +4633,7 @@ const Ta = {
|
|
|
4633
4633
|
(me = this.map) != null && me.getSource(this.interpolateSource) && ((ge = this.map) == null || ge.getSource(this.interpolateSource).setData(this.empty));
|
|
4634
4634
|
},
|
|
4635
4635
|
handleClick(t) {
|
|
4636
|
-
var o, l, c, h,
|
|
4636
|
+
var o, l, c, h, d, n, p, w;
|
|
4637
4637
|
const e = t.features[0], a = (l = (o = this.tropicals) == null ? void 0 : o.data) == null ? void 0 : l.features.filter(
|
|
4638
4638
|
(b) => {
|
|
4639
4639
|
var A;
|
|
@@ -4651,22 +4651,22 @@ const Ta = {
|
|
|
4651
4651
|
}
|
|
4652
4652
|
);
|
|
4653
4653
|
this.activeTropicals = {
|
|
4654
|
-
name: (
|
|
4654
|
+
name: (d = e == null ? void 0 : e.properties) == null ? void 0 : d.name,
|
|
4655
4655
|
forecasts: a.map((b) => b.properties),
|
|
4656
4656
|
history: (n = r[0]) == null ? void 0 : n.properties,
|
|
4657
|
-
showCircle: (w = (
|
|
4657
|
+
showCircle: (w = (p = a[0]) == null ? void 0 : p.properties) == null ? void 0 : w.showCircle
|
|
4658
4658
|
}, this.showTropicals = !0;
|
|
4659
|
-
const i = document.getElementById("
|
|
4659
|
+
const i = document.getElementById("idm-tropical-gl3");
|
|
4660
4660
|
this.activeTropicalsMarker ? this.activeTropicalsMarker.setLngLat([t.lngLat.lng, t.lngLat.lat]) : this.activeTropicalsMarker = new ve.Marker(i).setLngLat([t.lngLat.lng, t.lngLat.lat]).setOffset([220, 0]).addTo(this.map);
|
|
4661
4661
|
},
|
|
4662
4662
|
handleForecastToggle(t) {
|
|
4663
4663
|
var r, i, o, l, c, h;
|
|
4664
4664
|
t.disabled = !t.disabled;
|
|
4665
4665
|
const e = `${t.name}-${t.model}`, a = (i = (r = this.map) == null ? void 0 : r.getSource(this.source)._data) == null ? void 0 : i.features;
|
|
4666
|
-
a.forEach((
|
|
4667
|
-
|
|
4668
|
-
}), this.interpolateData.forEach((
|
|
4669
|
-
|
|
4666
|
+
a.forEach((d) => {
|
|
4667
|
+
d.properties.category === e && (d.properties.disabled = t.disabled);
|
|
4668
|
+
}), this.interpolateData.forEach((d) => {
|
|
4669
|
+
d.properties.category === e && (d.properties.disabled = t.disabled);
|
|
4670
4670
|
}), (l = (o = this.map) == null ? void 0 : o.getSource(this.source)) == null || l.setData(k.featureCollection(a)), (h = (c = this.map) == null ? void 0 : c.getSource(this.clusterSource)) == null || h.setData(k.featureCollection(a)), this.handleDateChange();
|
|
4671
4671
|
},
|
|
4672
4672
|
handleStrikeProbability(t) {
|
|
@@ -4743,8 +4743,8 @@ const Ta = {
|
|
|
4743
4743
|
}
|
|
4744
4744
|
}
|
|
4745
4745
|
}, Qa = {
|
|
4746
|
-
id: "
|
|
4747
|
-
class: "
|
|
4746
|
+
id: "idm-tropical-gl3",
|
|
4747
|
+
class: "idm-tropical-gl3"
|
|
4748
4748
|
}, Sa = { class: "header-box" }, _a = { class: "main" }, Ha = { key: 0 }, Oa = { class: "sub" }, Na = {
|
|
4749
4749
|
id: "meteoBox",
|
|
4750
4750
|
class: "main-box"
|
|
@@ -4759,7 +4759,7 @@ const Ta = {
|
|
|
4759
4759
|
style: { "justify-content": "flex-start" }
|
|
4760
4760
|
}, Ya = { class: "forecast-models" }, Ka = ["onClick"], Xa = { class: "more" };
|
|
4761
4761
|
function Ja(t, e, a, r, i, o) {
|
|
4762
|
-
var l, c, h,
|
|
4762
|
+
var l, c, h, d, n, p, w, b, A, E, v, f, u, C, y;
|
|
4763
4763
|
return ye((m(), g("div", Qa, [
|
|
4764
4764
|
s("div", Sa, [
|
|
4765
4765
|
s("div", {
|
|
@@ -4767,10 +4767,10 @@ function Ja(t, e, a, r, i, o) {
|
|
|
4767
4767
|
onClick: e[0] || (e[0] = (B) => i.showTropicals = !1)
|
|
4768
4768
|
}, ""),
|
|
4769
4769
|
s("div", _a, [
|
|
4770
|
-
(c = (l = i.activeTropicals) == null ? void 0 : l.history) != null && c.level ? (m(), g("span", Ha, I((
|
|
4770
|
+
(c = (l = i.activeTropicals) == null ? void 0 : l.history) != null && c.level ? (m(), g("span", Ha, I((d = (h = i.activeTropicals) == null ? void 0 : h.history) == null ? void 0 : d.level) + " , ", 1)) : j("", !0),
|
|
4771
4771
|
q(I((n = i.activeTropicals) == null ? void 0 : n.name), 1)
|
|
4772
4772
|
]),
|
|
4773
|
-
s("div", Oa, " Last update: " + I(o.computeTime(((w = (
|
|
4773
|
+
s("div", Oa, " Last update: " + I(o.computeTime(((w = (p = i.activeTropicals) == null ? void 0 : p.history) == null ? void 0 : w.updated) || ((E = (A = (b = i.activeTropicals) == null ? void 0 : b.forecasts) == null ? void 0 : A.filter((B) => !B.disabled)[0]) == null ? void 0 : E.date))), 1)
|
|
4774
4774
|
]),
|
|
4775
4775
|
s("div", Na, [
|
|
4776
4776
|
s("div", ja, [
|
|
@@ -4807,7 +4807,7 @@ function Ja(t, e, a, r, i, o) {
|
|
|
4807
4807
|
])
|
|
4808
4808
|
])
|
|
4809
4809
|
]),
|
|
4810
|
-
e[5] || (e[5] = ut('<div class="row" style="padding:0;height:1px;margin:10px 0;background:var(--idm-black-1);" data-v-
|
|
4810
|
+
e[5] || (e[5] = ut('<div class="row" style="padding:0;height:1px;margin:10px 0;background:var(--idm-black-1);" data-v-3a107ba1></div><div class="row" style="padding:2px 10px;" data-v-3a107ba1><div class="legend" data-v-3a107ba1><div class="icon td" data-v-3a107ba1></div><div class="label" data-v-3a107ba1>TD</div></div><div class="legend" data-v-3a107ba1><div class="icon ts" data-v-3a107ba1></div><div class="label" data-v-3a107ba1>TS</div></div><div class="legend" data-v-3a107ba1><div class="icon sts" data-v-3a107ba1></div><div class="label" data-v-3a107ba1>STS</div></div><div class="legend" data-v-3a107ba1><div class="icon ty" data-v-3a107ba1></div><div class="label" data-v-3a107ba1>TY</div></div><div class="legend" data-v-3a107ba1><div class="icon sty" data-v-3a107ba1></div><div class="label" data-v-3a107ba1>STY</div></div><div class="legend" data-v-3a107ba1><div class="icon supper-ty" data-v-3a107ba1></div><div class="label" data-v-3a107ba1>Super TY</div></div></div><div class="row" style="padding:2px 10px;" data-v-3a107ba1><div class="legend" data-v-3a107ba1><div class="icon history" data-v-3a107ba1></div><div class="label" data-v-3a107ba1>History</div></div><div class="legend" data-v-3a107ba1><div class="icon r7" data-v-3a107ba1></div><div class="label" data-v-3a107ba1>35kts Radii</div></div><div class="legend" data-v-3a107ba1><div class="icon r10" data-v-3a107ba1></div><div class="label" data-v-3a107ba1>50kts Radii</div></div></div>', 3))
|
|
4811
4811
|
]),
|
|
4812
4812
|
s("div", Xa, [
|
|
4813
4813
|
s("div", {
|
|
@@ -4820,7 +4820,7 @@ function Ja(t, e, a, r, i, o) {
|
|
|
4820
4820
|
[we, i.showTropicals && !t.$attrs.hideTropicalsLegend]
|
|
4821
4821
|
]);
|
|
4822
4822
|
}
|
|
4823
|
-
const lt = /* @__PURE__ */ S(Ta, [["render", Ja], ["__scopeId", "data-v-
|
|
4823
|
+
const lt = /* @__PURE__ */ S(Ta, [["render", Ja], ["__scopeId", "data-v-3a107ba1"]]);
|
|
4824
4824
|
const qa = {
|
|
4825
4825
|
name: "IdmPrecip3h",
|
|
4826
4826
|
props: {
|
|
@@ -5508,9 +5508,9 @@ const gi = {
|
|
|
5508
5508
|
(l == null ? void 0 : l.data.code) === 0 && (this.meteoData = l == null ? void 0 : l.data.data, this.loading = !1);
|
|
5509
5509
|
},
|
|
5510
5510
|
initTableData(t) {
|
|
5511
|
-
var e, a, r, i, o, l, c, h,
|
|
5512
|
-
this.clearTable(), this.positionGmt = (a = (e = t == null ? void 0 : t.weather) == null ? void 0 : e[0]) == null ? void 0 : a.timezone, this.positionOffset = (i = (r = t == null ? void 0 : t.weather) == null ? void 0 : r[0]) == null ? void 0 : i.offset, this.localDate = (l = (o = Ge(this.ts)) == null ? void 0 : o.tz(this.positionGmt)) == null ? void 0 : l.format("MMM-DD/HHmm[LT]"), this.currentHourData = (c = We.pickHourly(t, U(this.ts))) == null ? void 0 : c[0], ((
|
|
5513
|
-
var
|
|
5511
|
+
var e, a, r, i, o, l, c, h, d;
|
|
5512
|
+
this.clearTable(), this.positionGmt = (a = (e = t == null ? void 0 : t.weather) == null ? void 0 : e[0]) == null ? void 0 : a.timezone, this.positionOffset = (i = (r = t == null ? void 0 : t.weather) == null ? void 0 : r[0]) == null ? void 0 : i.offset, this.localDate = (l = (o = Ge(this.ts)) == null ? void 0 : o.tz(this.positionGmt)) == null ? void 0 : l.format("MMM-DD/HHmm[LT]"), this.currentHourData = (c = We.pickHourly(t, U(this.ts))) == null ? void 0 : c[0], ((d = (h = this.currentHourData) == null ? void 0 : h.weather) == null ? void 0 : d.isDay) === 0 ? this.isDay = !1 : this.isDay = !0, this.$nextTick(() => {
|
|
5513
|
+
var p, w, b, A, E, v, f, u, C, y, B, D, T, N, O, Q, Y, K, ce, he, de, pe, ue, me, ge, te, oe, Ae, ie, _, $, fe, re;
|
|
5514
5514
|
if (!document.getElementById("meteoMainBox"))
|
|
5515
5515
|
return !1;
|
|
5516
5516
|
if (!this.currentHourData)
|
|
@@ -5518,7 +5518,7 @@ const gi = {
|
|
|
5518
5518
|
for (let se = 0; se < 8; se++) {
|
|
5519
5519
|
const ne = Ge(this.ts).tz(this.positionGmt).add(3 * se, "h").format();
|
|
5520
5520
|
this.tableData.hours.push(ne);
|
|
5521
|
-
const x = ((
|
|
5521
|
+
const x = ((p = We.pickHourly(t, ne)) == null ? void 0 : p[0]) || {};
|
|
5522
5522
|
this.tableData.temp.push(this.roundPrecision((w = x == null ? void 0 : x.weather) == null ? void 0 : w.temp, 0) ?? "-"), this.tableData.precipProbability.push(this.roundPrecision((A = (b = x == null ? void 0 : x.weather) == null ? void 0 : b.precip) == null ? void 0 : A.probability, 0) ?? "-"), this.tableData.precip1h.push(this.roundPrecision((v = (E = x == null ? void 0 : x.weather) == null ? void 0 : E.precip) == null ? void 0 : v.sum, 0) ?? "-"), this.tableData.visibility.push(this.roundPrecision((f = x == null ? void 0 : x.weather) == null ? void 0 : f.visibility, 0) ?? "-"), this.tableData.windSpeed.push(this.roundPrecision((C = (u = x == null ? void 0 : x.weather) == null ? void 0 : u.wind) == null ? void 0 : C.kts, 1) ?? "-"), this.tableData.windDir.push((B = (y = x == null ? void 0 : x.weather) == null ? void 0 : y.wind) == null ? void 0 : B.bearing), this.tableData.windGust.push(this.roundPrecision((T = (D = x == null ? void 0 : x.weather) == null ? void 0 : D.wind) == null ? void 0 : T.gusts, 1) ?? "-"), this.tableData.sigwaveHeight.push(this.roundPrecision((O = (N = x == null ? void 0 : x.wave) == null ? void 0 : N.sig) == null ? void 0 : O.height, 1) ?? "-"), this.tableData.sigwaveDir.push((Y = (Q = x == null ? void 0 : x.wave) == null ? void 0 : Q.sig) == null ? void 0 : Y.bearing), this.tableData.windwaveHeight.push(this.roundPrecision((ce = (K = x == null ? void 0 : x.wave) == null ? void 0 : K.wd) == null ? void 0 : ce.height, 1) ?? "-"), this.tableData.windwaveDir.push((de = (he = x == null ? void 0 : x.wave) == null ? void 0 : he.wd) == null ? void 0 : de.bearing), this.tableData.windwavePeriod.push(this.roundPrecision((ue = (pe = x == null ? void 0 : x.wave) == null ? void 0 : pe.wd) == null ? void 0 : ue.period, 1) ?? "-"), this.tableData.swellHeight.push(this.roundPrecision((ge = (me = x == null ? void 0 : x.wave) == null ? void 0 : me.swell) == null ? void 0 : ge.height, 1) ?? "-"), this.tableData.swellDir.push((oe = (te = x == null ? void 0 : x.wave) == null ? void 0 : te.swell) == null ? void 0 : oe.bearing), this.tableData.swellPeriod.push(this.roundPrecision((ie = (Ae = x == null ? void 0 : x.wave) == null ? void 0 : Ae.swell) == null ? void 0 : ie.period, 1) ?? "-"), this.tableData.currentSpeed.push(this.roundPrecision((_ = x == null ? void 0 : x.current) == null ? void 0 : _.speed, 1) ?? "-"), this.tableData.currentDir.push(($ = x == null ? void 0 : x.current) == null ? void 0 : $.bearing), this.tableData.seaLevel.push(this.roundPrecision(x == null ? void 0 : x.height, 1) ?? "-"), this.tableData.seaTemp.push(this.roundPrecision(x == null ? void 0 : x.sst, 0) ?? "-"), this.tableData.weatherUrls.push((fe = x == null ? void 0 : x.weather) == null ? void 0 : fe.url), this.tableData.weatherNames.push(((re = x == null ? void 0 : x.weather) == null ? void 0 : re.name) ?? "-");
|
|
5523
5523
|
}
|
|
5524
5524
|
});
|
|
@@ -5642,7 +5642,7 @@ const gi = {
|
|
|
5642
5642
|
class: "main-box flex-center"
|
|
5643
5643
|
};
|
|
5644
5644
|
function Ir(t, e, a, r, i, o) {
|
|
5645
|
-
var
|
|
5645
|
+
var d, n, p, w, b, A, E, v, f, u, C, y, B, D, T, N, O, Q, Y, K, ce, he, de, pe, ue, me, ge, te, oe, Ae, ie, _, $, fe, re, se, ne, x, Le, xe, Be, Ie, Ee, De, Pe, ke, Me, ze, Te, Qe, Se, _e, He, Oe, Ne, je, Re, Fe, J, qe, Ve, Ze, $e, et, tt, at, it, rt;
|
|
5646
5646
|
const l = z("LocationFilled"), c = z("ElIcon"), h = z("ElTooltip");
|
|
5647
5647
|
return ye((m(), g("div", Ai, [
|
|
5648
5648
|
s("div", fi, [
|
|
@@ -5654,7 +5654,7 @@ function Ir(t, e, a, r, i, o) {
|
|
|
5654
5654
|
]),
|
|
5655
5655
|
_: 1
|
|
5656
5656
|
}),
|
|
5657
|
-
s("div", bi, I(o.computeLat((
|
|
5657
|
+
s("div", bi, I(o.computeLat((d = i.point) == null ? void 0 : d.lat)) + "," + I(o.computeLng((n = i.point) == null ? void 0 : n.lng)), 1)
|
|
5658
5658
|
]),
|
|
5659
5659
|
s("div", vi, [
|
|
5660
5660
|
i.showTables ? (m(), g("div", {
|
|
@@ -5684,7 +5684,7 @@ function Ir(t, e, a, r, i, o) {
|
|
|
5684
5684
|
M(h, {
|
|
5685
5685
|
placement: "top",
|
|
5686
5686
|
effect: "light",
|
|
5687
|
-
content: (w = (
|
|
5687
|
+
content: (w = (p = i.currentHourData) == null ? void 0 : p.weather) == null ? void 0 : w.name,
|
|
5688
5688
|
"show-after": 1e3
|
|
5689
5689
|
}, {
|
|
5690
5690
|
default: ae(() => {
|
|
@@ -7482,7 +7482,7 @@ const ct = /* @__PURE__ */ S(mo, [["render", go], ["__scopeId", "data-v-ad66a24c
|
|
|
7482
7482
|
}
|
|
7483
7483
|
},
|
|
7484
7484
|
handleDrag(t) {
|
|
7485
|
-
var a, r, i, o, l, c, h,
|
|
7485
|
+
var a, r, i, o, l, c, h, d, n, p;
|
|
7486
7486
|
const e = (r = (a = t.target) == null ? void 0 : a._element) == null ? void 0 : r.id;
|
|
7487
7487
|
if ((e == null ? void 0 : e.split("-").length) === 2) {
|
|
7488
7488
|
const w = this.geojson.filter((v) => v.id === e.split("-")[0])[0];
|
|
@@ -7501,13 +7501,13 @@ const ct = /* @__PURE__ */ S(mo, [["render", go], ["__scopeId", "data-v-ad66a24c
|
|
|
7501
7501
|
this.handleTmpPointUpdate(
|
|
7502
7502
|
w,
|
|
7503
7503
|
E[A - 1],
|
|
7504
|
-
{ lng: (
|
|
7504
|
+
{ lng: (d = (h = t.target) == null ? void 0 : h._lngLat) == null ? void 0 : d.lng, lat: (p = (n = t.target) == null ? void 0 : n._lngLat) == null ? void 0 : p.lat, properties: E[A].properties },
|
|
7505
7505
|
A === E.length - 1 ? void 0 : E[A + 1]
|
|
7506
7506
|
);
|
|
7507
7507
|
}
|
|
7508
7508
|
},
|
|
7509
7509
|
handleDragEnd(t) {
|
|
7510
|
-
var a, r, i, o, l, c, h,
|
|
7510
|
+
var a, r, i, o, l, c, h, d, n, p;
|
|
7511
7511
|
const e = (r = (a = t.target) == null ? void 0 : a._element) == null ? void 0 : r.id;
|
|
7512
7512
|
if ((e == null ? void 0 : e.split("-").length) === 2) {
|
|
7513
7513
|
const w = this.geojson.filter((E) => E.id === e.split("-")[0])[0];
|
|
@@ -7516,7 +7516,7 @@ const ct = /* @__PURE__ */ S(mo, [["render", go], ["__scopeId", "data-v-ad66a24c
|
|
|
7516
7516
|
return ((v = E._element) == null ? void 0 : v.id) === e;
|
|
7517
7517
|
})[0].setLngLat([(o = (i = t.target) == null ? void 0 : i._lngLat) == null ? void 0 : o.lng, (c = (l = t.target) == null ? void 0 : l._lngLat) == null ? void 0 : c.lat]);
|
|
7518
7518
|
const A = w.features.filter((E) => E.geometry.type === "Point" && E.properties.id == e.split("-")[1])[0];
|
|
7519
|
-
A.geometry.coordinates = [(
|
|
7519
|
+
A.geometry.coordinates = [(d = (h = t.target) == null ? void 0 : h._lngLat) == null ? void 0 : d.lng, (p = (n = t.target) == null ? void 0 : n._lngLat) == null ? void 0 : p.lat], w.features = w.features.filter((E) => E.geometry.type === "Point"), this.handlePointUpdate(w);
|
|
7520
7520
|
}
|
|
7521
7521
|
},
|
|
7522
7522
|
handleContextmenu(t) {
|
|
@@ -7525,9 +7525,9 @@ const ct = /* @__PURE__ */ S(mo, [["render", go], ["__scopeId", "data-v-ad66a24c
|
|
|
7525
7525
|
const e = (o = (i = (r = t.originalEvent) == null ? void 0 : r.target) == null ? void 0 : i.parentElement) == null ? void 0 : o.id;
|
|
7526
7526
|
if ((e == null ? void 0 : e.split("-").length) === 2) {
|
|
7527
7527
|
const c = this.geojson.filter((h) => h.id === e.split("-")[0])[0].features.filter((h) => h.geometry.type === "Point");
|
|
7528
|
-
if (c.length > 2 && c.filter((
|
|
7529
|
-
const
|
|
7530
|
-
|
|
7528
|
+
if (c.length > 2 && c.filter((d) => d.properties.id === (e == null ? void 0 : e.split("-")[1]))[0]) {
|
|
7529
|
+
const d = document.createElement("div");
|
|
7530
|
+
d.className = "point-contextmenu-marker", d.innerHTML = `<span id="del-${e}" class="del-point">Del</span>`, this.contextmenu = new ve.Marker(d).setOffset([24, 0]).setLngLat([t.lngLat.lng, t.lngLat.lat]).addTo(this.map);
|
|
7531
7531
|
}
|
|
7532
7532
|
}
|
|
7533
7533
|
},
|
|
@@ -7536,15 +7536,15 @@ const ct = /* @__PURE__ */ S(mo, [["render", go], ["__scopeId", "data-v-ad66a24c
|
|
|
7536
7536
|
(a = this.contextmenu) == null || a.remove();
|
|
7537
7537
|
const e = t.originalEvent.target.className;
|
|
7538
7538
|
if (e === "marker-close") {
|
|
7539
|
-
const h = (i = (r = t.originalEvent) == null ? void 0 : r.srcElement) == null ? void 0 : i.id,
|
|
7540
|
-
|
|
7539
|
+
const h = (i = (r = t.originalEvent) == null ? void 0 : r.srcElement) == null ? void 0 : i.id, d = this.geojson.filter((n) => n.id === h)[0];
|
|
7540
|
+
d && this.handleClear(d, !0), this.geojson = this.geojson.filter((n) => n.id !== h), !this.show && !((o = this.geojson) != null && o.some((n) => n.closed)) && this.handleUnbind();
|
|
7541
7541
|
} else if (e === "del-point") {
|
|
7542
|
-
const h = (c = (l = t.originalEvent.target.id) == null ? void 0 : l.replace("del-", "")) == null ? void 0 : c.split("-"),
|
|
7543
|
-
|
|
7542
|
+
const h = (c = (l = t.originalEvent.target.id) == null ? void 0 : l.replace("del-", "")) == null ? void 0 : c.split("-"), d = this.geojson.filter((n) => n.id === h[0])[0];
|
|
7543
|
+
d.features = d.features.filter((n) => n.geometry.type === "Point" && n.properties.id !== h[1]), this.handlePointUpdate(d);
|
|
7544
7544
|
} else if (e !== "marker-label" && this.show) {
|
|
7545
7545
|
let h = this.geojson.at(-1);
|
|
7546
7546
|
h || (h = k.featureCollection([], { id: (/* @__PURE__ */ new Date()).getTime().toString() }), this.geojson.push(h)), h.features = h.features.filter((n) => n.geometry.type === "Point");
|
|
7547
|
-
const
|
|
7547
|
+
const d = k.feature(
|
|
7548
7548
|
{
|
|
7549
7549
|
type: "Point",
|
|
7550
7550
|
coordinates: [t.lngLat.lng, t.lngLat.lat]
|
|
@@ -7554,7 +7554,7 @@ const ct = /* @__PURE__ */ S(mo, [["render", go], ["__scopeId", "data-v-ad66a24c
|
|
|
7554
7554
|
mode: this.navigation
|
|
7555
7555
|
}
|
|
7556
7556
|
);
|
|
7557
|
-
h.features.push(
|
|
7557
|
+
h.features.push(d), this.handlePointUpdate(h);
|
|
7558
7558
|
}
|
|
7559
7559
|
},
|
|
7560
7560
|
handlePointUpdate(t) {
|
|
@@ -7563,12 +7563,12 @@ const ct = /* @__PURE__ */ S(mo, [["render", go], ["__scopeId", "data-v-ad66a24c
|
|
|
7563
7563
|
let a = 0;
|
|
7564
7564
|
const r = [];
|
|
7565
7565
|
for (let i = 1; i < e.length; i++) {
|
|
7566
|
-
const o = e[i - 1], l = e[i], c = o.properties, h = { lng: o.geometry.coordinates[0], lat: o.geometry.coordinates[1] },
|
|
7566
|
+
const o = e[i - 1], l = e[i], c = o.properties, h = { lng: o.geometry.coordinates[0], lat: o.geometry.coordinates[1] }, d = { lng: l.geometry.coordinates[0], lat: l.geometry.coordinates[1] }, n = be.calculateDistance(h, d, c.mode === "RL", 2), p = be.calculateBearing(h, d, c.mode === "RL", 2);
|
|
7567
7567
|
a = X.roundPrecision(a + n, 2);
|
|
7568
7568
|
let w;
|
|
7569
|
-
c.mode === "RL" ? w = X.convertToMonotonicLng([h,
|
|
7569
|
+
c.mode === "RL" ? w = X.convertToMonotonicLng([h, d]) : w = X.convertToMonotonicLng(be.interpolateCoordinates(h, d, 200));
|
|
7570
7570
|
const b = k.lineString(w.map((A) => [A.lng, A.lat]));
|
|
7571
|
-
b.properties.dist = n, b.properties.bearing =
|
|
7571
|
+
b.properties.dist = n, b.properties.bearing = p, b.properties.total = a, r.push(b);
|
|
7572
7572
|
}
|
|
7573
7573
|
e.push(...r), t.total = a;
|
|
7574
7574
|
}
|
|
@@ -7578,19 +7578,19 @@ const ct = /* @__PURE__ */ S(mo, [["render", go], ["__scopeId", "data-v-ad66a24c
|
|
|
7578
7578
|
const i = k.featureCollection([]);
|
|
7579
7579
|
let o, l;
|
|
7580
7580
|
if (e) {
|
|
7581
|
-
const h = e.properties,
|
|
7582
|
-
o = be.calculateDistance(
|
|
7583
|
-
let
|
|
7584
|
-
h.mode === "RL" ?
|
|
7585
|
-
const w = k.lineString(
|
|
7581
|
+
const h = e.properties, d = { lng: e.geometry.coordinates[0], lat: e.geometry.coordinates[1] }, n = { lng: a.lng, lat: a.lat };
|
|
7582
|
+
o = be.calculateDistance(d, n, h.mode === "RL", 2), l = be.calculateBearing(d, n, h.mode === "RL", 2);
|
|
7583
|
+
let p;
|
|
7584
|
+
h.mode === "RL" ? p = X.convertToMonotonicLng([d, n]) : p = X.convertToMonotonicLng(be.interpolateCoordinates(d, n, 200));
|
|
7585
|
+
const w = k.lineString(p.map((b) => [b.lng, b.lat]));
|
|
7586
7586
|
w.properties.dist = o, w.properties.bearing = l, i.features.push(w);
|
|
7587
7587
|
}
|
|
7588
7588
|
if (r) {
|
|
7589
|
-
const h = a.properties,
|
|
7590
|
-
o = be.calculateDistance(
|
|
7591
|
-
let
|
|
7592
|
-
h.mode === "RL" ?
|
|
7593
|
-
const w = k.lineString(
|
|
7589
|
+
const h = a.properties, d = a, n = { lng: r.geometry.coordinates[0], lat: r.geometry.coordinates[1] };
|
|
7590
|
+
o = be.calculateDistance(d, n, h.mode === "RL", 2), l = be.calculateBearing(d, n, h.mode === "RL", 2);
|
|
7591
|
+
let p;
|
|
7592
|
+
h.mode === "RL" ? p = X.convertToMonotonicLng([d, n]) : p = X.convertToMonotonicLng(be.interpolateCoordinates(d, n, 200));
|
|
7593
|
+
const w = k.lineString(p.map((b) => [b.lng, b.lat]));
|
|
7594
7594
|
w.properties.dist = o, w.properties.bearing = l, i.features.push(w);
|
|
7595
7595
|
}
|
|
7596
7596
|
this.map.getSource(this.tmpSource) ? this.map.getSource(this.tmpSource).setData(i) : this.map.addSource(this.tmpSource, {
|
|
@@ -7697,17 +7697,17 @@ const ct = /* @__PURE__ */ S(mo, [["render", go], ["__scopeId", "data-v-ad66a24c
|
|
|
7697
7697
|
h.on("drag", this.handleDrag), h.on("dragend", this.handleDragEnd), this.pointMarkers[t.id] ? this.pointMarkers[t.id].push(h) : this.pointMarkers[t.id] = [h];
|
|
7698
7698
|
}
|
|
7699
7699
|
if (t.closed) {
|
|
7700
|
-
const l = o.at(-1), h = t.features.filter((n) => n.geometry.type === "LineString").at(-1),
|
|
7701
|
-
|
|
7700
|
+
const l = o.at(-1), h = t.features.filter((n) => n.geometry.type === "LineString").at(-1), d = document.createElement("div");
|
|
7701
|
+
d.className = "point-summary-marker", d.innerHTML = `<div id="${t.id}" class="marker-close">×</div><div class="marker-label">Tol: ${h.properties.total}nm</div>`, this.closeMarkers[t.id] = new ve.Marker(d).setOffset([60, 0]).setLngLat(l.geometry.coordinates).addTo(this.map);
|
|
7702
7702
|
}
|
|
7703
7703
|
}
|
|
7704
7704
|
},
|
|
7705
7705
|
handleClear(t, e = !0) {
|
|
7706
|
-
var o, l, c, h,
|
|
7706
|
+
var o, l, c, h, d, n, p, w, b;
|
|
7707
7707
|
const a = `${t.id}-${this.source}`, r = `${t.id}-${this.layer}`, i = `${t.id}-${this.labelLayer}`;
|
|
7708
|
-
(o = this.map) != null && o.getLayer(r) && this.map.removeLayer(r), (l = this.map) != null && l.getLayer(i) && this.map.removeLayer(i), (c = this.map) != null && c.getLayer(this.tmpLayer) && this.map.removeLayer(this.tmpLayer), (h = this.map) != null && h.getLayer(this.tmpLabelLayer) && this.map.removeLayer(this.tmpLabelLayer), (
|
|
7708
|
+
(o = this.map) != null && o.getLayer(r) && this.map.removeLayer(r), (l = this.map) != null && l.getLayer(i) && this.map.removeLayer(i), (c = this.map) != null && c.getLayer(this.tmpLayer) && this.map.removeLayer(this.tmpLayer), (h = this.map) != null && h.getLayer(this.tmpLabelLayer) && this.map.removeLayer(this.tmpLabelLayer), (d = this.closeMarkers[t.id]) == null || d.remove(), this.closeMarkers[t.id] = void 0, (n = this.pointMarkers[t.id]) == null || n.forEach((A) => {
|
|
7709
7709
|
A == null || A.remove();
|
|
7710
|
-
}), this.pointMarkers[t.id] = [], (
|
|
7710
|
+
}), this.pointMarkers[t.id] = [], (p = this.tipMarker) == null || p.remove(), this.tipMarker = void 0, e && ((w = this.map) != null && w.getSource(a)) && this.map.removeSource(a), e && ((b = this.map) != null && b.getSource(this.tmpSource)) && this.map.removeSource(this.tmpSource);
|
|
7711
7711
|
}
|
|
7712
7712
|
}
|
|
7713
7713
|
};
|
|
@@ -8061,17 +8061,17 @@ const To = {
|
|
|
8061
8061
|
},
|
|
8062
8062
|
enc: {
|
|
8063
8063
|
handler(t, e) {
|
|
8064
|
-
var a, r, i, o, l, c, h,
|
|
8065
|
-
t ? ((r = (a = this.map) == null ? void 0 : a.getLayer(t)) == null || r.setLayoutProperty("visibility", "visible"), (o = (i = this.map) == null ? void 0 : i.getLayer(e)) == null || o.setLayoutProperty("visibility", "none")) : ((c = (l = this.map) == null ? void 0 : l.getLayer("i4")) == null || c.setLayoutProperty("visibility", "none"), (
|
|
8064
|
+
var a, r, i, o, l, c, h, d;
|
|
8065
|
+
t ? ((r = (a = this.map) == null ? void 0 : a.getLayer(t)) == null || r.setLayoutProperty("visibility", "visible"), (o = (i = this.map) == null ? void 0 : i.getLayer(e)) == null || o.setLayoutProperty("visibility", "none")) : ((c = (l = this.map) == null ? void 0 : l.getLayer("i4")) == null || c.setLayoutProperty("visibility", "none"), (d = (h = this.map) == null ? void 0 : h.getLayer("hi")) == null || d.setLayoutProperty("visibility", "none"));
|
|
8066
8066
|
}
|
|
8067
8067
|
},
|
|
8068
8068
|
activeWeatherLayers: {
|
|
8069
8069
|
handler() {
|
|
8070
|
-
var a, r, i, o, l, c, h,
|
|
8070
|
+
var a, r, i, o, l, c, h, d, n, p, w, b, A, E, v, f, u;
|
|
8071
8071
|
if (!this.map)
|
|
8072
8072
|
return !1;
|
|
8073
8073
|
const t = this.activeWeatherLayers.some((C) => C.key === "wind" && C.particle === !0 || C.key === "current" && C.particle === !0 || C.key === "ice-thickness" || C.key === "ice-cover" || C.key === "temp" || C.key === "water-temp"), e = this.activeWeatherLayers.some((C) => C.key === "visibility" || C.key === "precip3h");
|
|
8074
|
-
this.activeWeatherLayers.length > 0 ? (t ? (r = (a = this.map) == null ? void 0 : a.getLayer(this.enc)) == null || r.setLayoutProperty("visibility", "none") : (o = (i = this.map) == null ? void 0 : i.getLayer(this.enc)) == null || o.setLayoutProperty("visibility", "visible"), (c = (l = this.map) == null ? void 0 : l.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || c.setLayoutProperty("visibility", "visible"), (
|
|
8074
|
+
this.activeWeatherLayers.length > 0 ? (t ? (r = (a = this.map) == null ? void 0 : a.getLayer(this.enc)) == null || r.setLayoutProperty("visibility", "none") : (o = (i = this.map) == null ? void 0 : i.getLayer(this.enc)) == null || o.setLayoutProperty("visibility", "visible"), (c = (l = this.map) == null ? void 0 : l.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || c.setLayoutProperty("visibility", "visible"), (d = this.map) != null && d.getLayer((h = this.viewport) == null ? void 0 : h.rampColorLayer) && ((n = this.map) != null && n.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && this.mapProjection === "mercator" && ((w = this.map) == null || w.moveLayer((p = this.viewport) == null ? void 0 : p.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), e && ((A = this.map) == null || A.moveLayer(this.helper.mapboxCustomer.layers.countryBoundary.id, (b = this.viewport) == null ? void 0 : b.rampColorLayer))) : ((v = (E = this.map) == null ? void 0 : E.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || v.setLayoutProperty("visibility", "none"), (u = (f = this.map) == null ? void 0 : f.getLayer(this.enc)) == null || u.setLayoutProperty("visibility", "visible")), this.$emit("activeWeatherLayers", this.activeWeatherLayers);
|
|
8075
8075
|
},
|
|
8076
8076
|
immediate: !0
|
|
8077
8077
|
},
|
|
@@ -8123,7 +8123,7 @@ const To = {
|
|
|
8123
8123
|
},
|
|
8124
8124
|
methods: {
|
|
8125
8125
|
async fetchWeatherLayers(t = { tropicals: !1 }) {
|
|
8126
|
-
var i, o, l, c, h,
|
|
8126
|
+
var i, o, l, c, h, d, n, p, w;
|
|
8127
8127
|
const e = (/* @__PURE__ */ new Date()).valueOf();
|
|
8128
8128
|
let a = 0, r = 0;
|
|
8129
8129
|
if (this.map) {
|
|
@@ -8185,7 +8185,7 @@ const To = {
|
|
|
8185
8185
|
});
|
|
8186
8186
|
}
|
|
8187
8187
|
if (r = (/* @__PURE__ */ new Date()).valueOf() - (e + a), console.log("weather layers elapsed: ", r, ", total: ", a += r), this.weatherLayers["swell-direction"] || this.weatherLayers["swell-height"]) {
|
|
8188
|
-
const C = (
|
|
8188
|
+
const C = (d = this.weatherLayers["swell-direction"]) == null ? void 0 : d.raw, y = (n = this.weatherLayers["swell-height"]) == null ? void 0 : n.raw;
|
|
8189
8189
|
delete this.weatherLayers["swell-direction"], delete this.weatherLayers["swell-height"], this.weatherLayers.swell = {
|
|
8190
8190
|
type: "json",
|
|
8191
8191
|
direction: C,
|
|
@@ -8194,7 +8194,7 @@ const To = {
|
|
|
8194
8194
|
};
|
|
8195
8195
|
}
|
|
8196
8196
|
if (this.weatherLayers["current-direction"] || this.weatherLayers["current-speed"]) {
|
|
8197
|
-
const C = (
|
|
8197
|
+
const C = (p = this.weatherLayers["current-direction"]) == null ? void 0 : p.raw, y = (w = this.weatherLayers["current-speed"]) == null ? void 0 : w.raw;
|
|
8198
8198
|
delete this.weatherLayers["current-direction"], delete this.weatherLayers["current-speed"], this.weatherLayers.current = {
|
|
8199
8199
|
type: "json",
|
|
8200
8200
|
direction: C,
|
|
@@ -8214,8 +8214,8 @@ const To = {
|
|
|
8214
8214
|
if (this.map) {
|
|
8215
8215
|
let o = this.otherWeight;
|
|
8216
8216
|
if (o) {
|
|
8217
|
-
let l = !1, c = !1, h = !1,
|
|
8218
|
-
if (this.otherWeight & 2048 && (o = this.otherWeight - 2048, l = !0), this.otherWeight & 8192 && (o = o - 8192, c = !0), this.otherWeight & 16384 && (o = o - 16384, h = !0), this.otherWeight & 32768 && (o = o - 32768,
|
|
8217
|
+
let l = !1, c = !1, h = !1, d = !1;
|
|
8218
|
+
if (this.otherWeight & 2048 && (o = this.otherWeight - 2048, l = !0), this.otherWeight & 8192 && (o = o - 8192, c = !0), this.otherWeight & 16384 && (o = o - 16384, h = !0), this.otherWeight & 32768 && (o = o - 32768, d = !0), o) {
|
|
8219
8219
|
if (t.all) {
|
|
8220
8220
|
const n = await le.get(`${this.gateway}/api/arc/other/layers/links?l=${o}&t=${this.ts}`, {
|
|
8221
8221
|
headers: {
|
|
@@ -8223,10 +8223,10 @@ const To = {
|
|
|
8223
8223
|
}
|
|
8224
8224
|
});
|
|
8225
8225
|
if (((e = n == null ? void 0 : n.data) == null ? void 0 : e.code) === 0) {
|
|
8226
|
-
const
|
|
8227
|
-
for (const A in
|
|
8226
|
+
const p = (a = n == null ? void 0 : n.data) == null ? void 0 : a.data, w = [];
|
|
8227
|
+
for (const A in p)
|
|
8228
8228
|
w.push(
|
|
8229
|
-
le.get(
|
|
8229
|
+
le.get(p[A], {
|
|
8230
8230
|
headers: {
|
|
8231
8231
|
Authorization: this.token || this.defaultMeteoToken,
|
|
8232
8232
|
key: A
|
|
@@ -8234,7 +8234,7 @@ const To = {
|
|
|
8234
8234
|
})
|
|
8235
8235
|
);
|
|
8236
8236
|
const b = await Promise.all(w);
|
|
8237
|
-
this.otherLayers = { enc: l, world12nm: c, worldMarine: h, chinaRoute:
|
|
8237
|
+
this.otherLayers = { enc: l, world12nm: c, worldMarine: h, chinaRoute: d }, b.map((A) => {
|
|
8238
8238
|
var f, u, C;
|
|
8239
8239
|
const E = ((f = A == null ? void 0 : A.data) == null ? void 0 : f.data) || (A == null ? void 0 : A.data), v = (C = (u = A == null ? void 0 : A.config) == null ? void 0 : u.headers) == null ? void 0 : C.key;
|
|
8240
8240
|
this.otherLayers[v] = E;
|
|
@@ -8247,10 +8247,10 @@ const To = {
|
|
|
8247
8247
|
}
|
|
8248
8248
|
});
|
|
8249
8249
|
if (((r = n == null ? void 0 : n.data) == null ? void 0 : r.code) === 0) {
|
|
8250
|
-
const
|
|
8251
|
-
for (const A in
|
|
8250
|
+
const p = (i = n == null ? void 0 : n.data) == null ? void 0 : i.data, w = [];
|
|
8251
|
+
for (const A in p)
|
|
8252
8252
|
w.push(
|
|
8253
|
-
le.get(
|
|
8253
|
+
le.get(p[A], {
|
|
8254
8254
|
headers: {
|
|
8255
8255
|
Authorization: this.token || this.defaultMeteoToken,
|
|
8256
8256
|
key: A
|
|
@@ -8265,7 +8265,7 @@ const To = {
|
|
|
8265
8265
|
}
|
|
8266
8266
|
}
|
|
8267
8267
|
} else
|
|
8268
|
-
this.otherLayers = { enc: l, world12nm: c, worldMarine: h, chinaRoute:
|
|
8268
|
+
this.otherLayers = { enc: l, world12nm: c, worldMarine: h, chinaRoute: d };
|
|
8269
8269
|
} else
|
|
8270
8270
|
this.otherLayers = {};
|
|
8271
8271
|
this.handleBeforeLayerToggle();
|
|
@@ -8281,7 +8281,7 @@ const To = {
|
|
|
8281
8281
|
this.activeWindLayer = !!this.activeWeatherLayers.find((e) => e.key === "wind"), this.$refs.layer && (this.$refs.layer.activeWeatherLayers = this.activeWeatherLayers);
|
|
8282
8282
|
},
|
|
8283
8283
|
handleRampColorInitial() {
|
|
8284
|
-
var t, e, a, r, i, o, l, c, h,
|
|
8284
|
+
var t, e, a, r, i, o, l, c, h, d, n, p;
|
|
8285
8285
|
this.viewport.map.getSource((t = this.viewport) == null ? void 0 : t.rampColorSource) || this.viewport.map.addSource((e = this.viewport) == null ? void 0 : e.rampColorSource, {
|
|
8286
8286
|
type: "canvas",
|
|
8287
8287
|
canvas: (a = this.viewport) == null ? void 0 : a.rampColorCanvas,
|
|
@@ -8302,11 +8302,11 @@ const To = {
|
|
|
8302
8302
|
canvas: (h = this.viewport) == null ? void 0 : h.particleCanvas,
|
|
8303
8303
|
animate: !0,
|
|
8304
8304
|
coordinates: this.viewport.getBoundLngLat()
|
|
8305
|
-
}), this.viewport.map.getLayer((
|
|
8305
|
+
}), this.viewport.map.getLayer((d = this.viewport) == null ? void 0 : d.particleLayer) || this.viewport.map.addLayer(
|
|
8306
8306
|
{
|
|
8307
8307
|
type: "raster",
|
|
8308
8308
|
id: (n = this.viewport) == null ? void 0 : n.particleLayer,
|
|
8309
|
-
source: (
|
|
8309
|
+
source: (p = this.viewport) == null ? void 0 : p.particleSource,
|
|
8310
8310
|
layout: {
|
|
8311
8311
|
visibility: "none"
|
|
8312
8312
|
}
|
|
@@ -8315,10 +8315,10 @@ const To = {
|
|
|
8315
8315
|
);
|
|
8316
8316
|
},
|
|
8317
8317
|
handleDrawWeather4Json() {
|
|
8318
|
-
var
|
|
8318
|
+
var d, n, p, w, b;
|
|
8319
8319
|
const t = (/* @__PURE__ */ new Date()).valueOf();
|
|
8320
8320
|
let e = 0, a = 0;
|
|
8321
|
-
const r = (
|
|
8321
|
+
const r = (d = this.map) == null ? void 0 : d.getBounds(), i = this.map.getZoom(), o = X.convertToStdLng(r._sw.lng), l = X.convertToStdLng(r._ne.lng), c = Math.floor(r._sw.lat), h = Math.ceil(r._ne.lat);
|
|
8322
8322
|
for (const A in this.weatherLayers) {
|
|
8323
8323
|
let E = !1;
|
|
8324
8324
|
if (this.weatherLayers[A].active && this.weatherLayers[A].type === "json") {
|
|
@@ -8370,7 +8370,7 @@ const To = {
|
|
|
8370
8370
|
if (u) {
|
|
8371
8371
|
if (!u.data) {
|
|
8372
8372
|
const C = [];
|
|
8373
|
-
for (const y in (
|
|
8373
|
+
for (const y in (p = u.raw) == null ? void 0 : p.LineString) {
|
|
8374
8374
|
const B = u.raw.LineString[y];
|
|
8375
8375
|
for (const D of B)
|
|
8376
8376
|
C.push(
|
|
@@ -8547,8 +8547,8 @@ const To = {
|
|
|
8547
8547
|
this.handleBeforeLayerToggle();
|
|
8548
8548
|
},
|
|
8549
8549
|
handleBeforeLayerToggle() {
|
|
8550
|
-
var t, e, a, r, i, o, l, c, h,
|
|
8551
|
-
(t = this.map) != null && t.getLayer(this.beforeLayer) && ((e = this.activeWeatherLayers) != null && e.length || (a = this.otherLayers) != null && a["war-zones"] || (r = this.otherLayers) != null && r["gmdss-areas"] || (i = this.otherLayers) != null && i["load-lines"] || (o = this.otherLayers) != null && o["high-risk-area"] || (l = this.otherLayers) != null && l["time-zones"] || (c = this.otherLayers) != null && c.pirates || (h = this.otherLayers) != null && h.ports || (
|
|
8550
|
+
var t, e, a, r, i, o, l, c, h, d, n, p, w, b, A, E;
|
|
8551
|
+
(t = this.map) != null && t.getLayer(this.beforeLayer) && ((e = this.activeWeatherLayers) != null && e.length || (a = this.otherLayers) != null && a["war-zones"] || (r = this.otherLayers) != null && r["gmdss-areas"] || (i = this.otherLayers) != null && i["load-lines"] || (o = this.otherLayers) != null && o["high-risk-area"] || (l = this.otherLayers) != null && l["time-zones"] || (c = this.otherLayers) != null && c.pirates || (h = this.otherLayers) != null && h.ports || (d = this.otherLayers) != null && d.enc || (n = this.otherLayers) != null && n.world12nm || (p = this.otherLayers) != null && p.worldMarine || (w = this.otherLayers) != null && w.chinaRoute || (b = this.otherLayers) != null && b["voluntary-reporting-area"] || (A = this.otherLayers) != null && A["eca-zones"] || (E = this.otherLayers) != null && E["special-area"]) && this.map.setLayoutProperty(this.beforeLayer, "visibility", "visible");
|
|
8552
8552
|
},
|
|
8553
8553
|
handleDateChange(t = { tropicals: !1 }) {
|
|
8554
8554
|
this.fetchWeatherLayers(t), this.fetchOtherLayers({ dayNight: !0 });
|
|
@@ -8582,8 +8582,8 @@ const To = {
|
|
|
8582
8582
|
}
|
|
8583
8583
|
},
|
|
8584
8584
|
handle3dToggle(t) {
|
|
8585
|
-
var e, a, r, i, o, l, c, h,
|
|
8586
|
-
t ? (this.map.setProjection("globe"), this.mapProjection = "globe", (a = this.map) != null && a.getLayer((e = this.viewport) == null ? void 0 : e.rampColorLayer) && ((r = this.map) != null && r.getLayer(this.helper.mapboxCustomer.layers.water.id)) && ((o = this.map) == null || o.moveLayer((i = this.viewport) == null ? void 0 : i.rampColorLayer, this.helper.mapboxCustomer.layers.water.id)), (c = this.map) != null && c.getLayer((l = this.viewport) == null ? void 0 : l.particleLayer) && ((h = this.map) != null && h.getLayer(this.helper.mapboxCustomer.layers.water.id)) && ((n = this.map) == null || n.moveLayer((
|
|
8585
|
+
var e, a, r, i, o, l, c, h, d, n, p, w, b, A, E, v, f, u, C, y;
|
|
8586
|
+
t ? (this.map.setProjection("globe"), this.mapProjection = "globe", (a = this.map) != null && a.getLayer((e = this.viewport) == null ? void 0 : e.rampColorLayer) && ((r = this.map) != null && r.getLayer(this.helper.mapboxCustomer.layers.water.id)) && ((o = this.map) == null || o.moveLayer((i = this.viewport) == null ? void 0 : i.rampColorLayer, this.helper.mapboxCustomer.layers.water.id)), (c = this.map) != null && c.getLayer((l = this.viewport) == null ? void 0 : l.particleLayer) && ((h = this.map) != null && h.getLayer(this.helper.mapboxCustomer.layers.water.id)) && ((n = this.map) == null || n.moveLayer((d = this.viewport) == null ? void 0 : d.particleLayer, this.helper.mapboxCustomer.layers.water.id)), this.map.off("move", this.handleDraWeather4Image)) : (this.map.setProjection("mercator"), this.mapProjection = "mercator", this.map.on("move", this.handleDraWeather4Image), this.handleDraWeather4Image(), (w = this.map) != null && w.getLayer((p = this.viewport) == null ? void 0 : p.rampColorLayer) && ((b = this.map) != null && b.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && ((E = this.map) == null || E.moveLayer((A = this.viewport) == null ? void 0 : A.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), (f = this.map) != null && f.getLayer((v = this.viewport) == null ? void 0 : v.particleLayer) && ((u = this.map) != null && u.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && ((y = this.map) == null || y.moveLayer((C = this.viewport) == null ? void 0 : C.particleLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)));
|
|
8587
8587
|
},
|
|
8588
8588
|
handleParticle(t) {
|
|
8589
8589
|
this.particleFactor = t, this.weatherLayers[t.key] && (this.weatherLayers[t.key].particle = t.particle), this.activeWeatherLayers.map((r) => {
|
|
@@ -8608,7 +8608,7 @@ const To = {
|
|
|
8608
8608
|
};
|
|
8609
8609
|
function So(t, e, a, r, i, o) {
|
|
8610
8610
|
var Ae, ie, _, $, fe, re, se, ne, x, Le, xe, Be, Ie, Ee, De, Pe, ke, Me, ze, Te, Qe, Se, _e, He, Oe, Ne, je, Re, Fe;
|
|
8611
|
-
const l = z("IdmGlLayer"), c = z("IdmENC"), h = z("IdmWorld12nm"),
|
|
8611
|
+
const l = z("IdmGlLayer"), c = z("IdmENC"), h = z("IdmWorld12nm"), d = z("IdmWorldMarine"), n = z("IdmChinaRoute"), p = z("IdmSigWave"), w = z("IdmSwell"), b = z("IdmPrmsl"), A = z("IdmIceCover"), E = z("IdmIceThickness"), v = z("IdmTropicals"), f = z("IdmCurrents"), u = z("IdmCurrentParticle"), C = z("IdmWindBarb"), y = z("IdmWindParticle"), B = z("IdmPrecip3h"), D = z("IdmVisibility"), T = z("IdmWaterTemp"), N = z("IdmTemp"), O = z("IdmWarZone"), Q = z("IdmGmdssArea"), Y = z("IdmEcaZone"), K = z("IdmAlertZone"), ce = z("IdmPort"), he = z("IdmLoadLine"), de = z("IdmTimezone"), pe = z("IdmVRA"), ue = z("IdmSpecialArea"), me = z("IdmTerminator"), ge = z("IdmLatLng"), te = z("IdmMeasure"), oe = z("IdmPoint");
|
|
8612
8612
|
return a.map ? (m(), g("div", Qo, [
|
|
8613
8613
|
M(l, H({
|
|
8614
8614
|
ref: "layer",
|
|
@@ -8651,7 +8651,7 @@ function So(t, e, a, r, i, o) {
|
|
|
8651
8651
|
"weather-layers": i.weatherLayers,
|
|
8652
8652
|
enabled: (ie = i.otherLayers) == null ? void 0 : ie.world12nm
|
|
8653
8653
|
}, t.$attrs), null, 16, ["map", "token", "weather-layers", "enabled"]),
|
|
8654
|
-
M(
|
|
8654
|
+
M(d, H({
|
|
8655
8655
|
map: a.map,
|
|
8656
8656
|
token: a.token,
|
|
8657
8657
|
"weather-layers": i.weatherLayers,
|
|
@@ -8663,7 +8663,7 @@ function So(t, e, a, r, i, o) {
|
|
|
8663
8663
|
"weather-layers": i.weatherLayers,
|
|
8664
8664
|
enabled: ($ = i.otherLayers) == null ? void 0 : $.chinaRoute
|
|
8665
8665
|
}, t.$attrs), null, 16, ["map", "token", "weather-layers", "enabled"]),
|
|
8666
|
-
M(
|
|
8666
|
+
M(p, H({
|
|
8667
8667
|
map: a.map,
|
|
8668
8668
|
"sig-wave": (fe = i.weatherLayers) == null ? void 0 : fe["sig-wave-height"],
|
|
8669
8669
|
"before-layer": a.beforeLayer,
|