@idmwx/idmui-gl3 5.5.2 → 5.5.3
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 +358 -358
- package/dist/index.umd.cjs +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { LayerHelper as Ke, CompanyHelper as Xe } from "@idm-plugin/tag";
|
|
|
5
5
|
import F from "moment";
|
|
6
6
|
import le from "axios";
|
|
7
7
|
import Ge from "moment-timezone";
|
|
8
|
-
import { resolveComponent as z, openBlock as g, createElementBlock as
|
|
8
|
+
import { resolveComponent as z, openBlock as g, createElementBlock as f, createElementVNode as s, normalizeStyle as J, createVNode as k, withCtx as ae, normalizeClass as H, Fragment as _, renderList as N, toDisplayString as B, createCommentVNode as O, createBlock as pt, createTextVNode as U, withDirectives as fe, createStaticVNode as mt, vShow as we, defineComponent as ut, withModifiers as Ue, mergeProps as S } from "vue";
|
|
9
9
|
import * as D from "@turf/turf";
|
|
10
10
|
import gt from "@mapbox/sphericalmercator";
|
|
11
11
|
import ve from "mapbox-gl";
|
|
@@ -293,14 +293,14 @@ const T = (t, e) => {
|
|
|
293
293
|
class: "radio-tip"
|
|
294
294
|
};
|
|
295
295
|
function $t(t, e, a, r, i, o) {
|
|
296
|
-
const
|
|
297
|
-
return g(),
|
|
296
|
+
const l = z("ElTooltip"), c = z("ElRadio"), h = z("ElRadioGroup"), p = z("ElScrollbar");
|
|
297
|
+
return g(), f("div", yt, [
|
|
298
298
|
s("div", {
|
|
299
299
|
class: "menu-bar-box",
|
|
300
300
|
style: J({ top: a.top + 10 + "px", right: i.right + "px" })
|
|
301
301
|
}, [
|
|
302
302
|
s("div", ft, [
|
|
303
|
-
k(
|
|
303
|
+
k(l, {
|
|
304
304
|
placement: "left",
|
|
305
305
|
effect: "light",
|
|
306
306
|
content: "Menu",
|
|
@@ -309,7 +309,7 @@ function $t(t, e, a, r, i, o) {
|
|
|
309
309
|
default: ae(() => [
|
|
310
310
|
s("div", {
|
|
311
311
|
class: H(a.layerToggle ? "menu-icon active" : "menu-icon"),
|
|
312
|
-
onClick: e[0] || (e[0] = (...
|
|
312
|
+
onClick: e[0] || (e[0] = (...n) => o.handleMenuToggle && o.handleMenuToggle(...n))
|
|
313
313
|
}, e[17] || (e[17] = [
|
|
314
314
|
s("span", { class: "iconfont" }, "", -1)
|
|
315
315
|
]), 2)
|
|
@@ -323,7 +323,7 @@ function $t(t, e, a, r, i, o) {
|
|
|
323
323
|
style: J({ top: a.top + 160 + "px", right: i.right + "px" })
|
|
324
324
|
}, [
|
|
325
325
|
s("div", wt, [
|
|
326
|
-
k(
|
|
326
|
+
k(l, {
|
|
327
327
|
placement: "left",
|
|
328
328
|
effect: "light",
|
|
329
329
|
content: "Measure",
|
|
@@ -332,14 +332,14 @@ function $t(t, e, a, r, i, o) {
|
|
|
332
332
|
default: ae(() => [
|
|
333
333
|
s("div", {
|
|
334
334
|
class: H(i.showMeasure ? "menu-icon active" : "menu-icon"),
|
|
335
|
-
onClick: e[1] || (e[1] = (...
|
|
335
|
+
onClick: e[1] || (e[1] = (...n) => o.handleMeasureToggle && o.handleMeasureToggle(...n))
|
|
336
336
|
}, e[18] || (e[18] = [
|
|
337
337
|
s("span", { class: "iconfont" }, "", -1)
|
|
338
338
|
]), 2)
|
|
339
339
|
]),
|
|
340
340
|
_: 1
|
|
341
341
|
}),
|
|
342
|
-
k(
|
|
342
|
+
k(l, {
|
|
343
343
|
placement: "left",
|
|
344
344
|
effect: "light",
|
|
345
345
|
content: "Point Meteo",
|
|
@@ -348,14 +348,14 @@ function $t(t, e, a, r, i, o) {
|
|
|
348
348
|
default: ae(() => [
|
|
349
349
|
s("div", {
|
|
350
350
|
class: H(i.showPoint ? "menu-icon active" : "menu-icon"),
|
|
351
|
-
onClick: e[2] || (e[2] = (...
|
|
351
|
+
onClick: e[2] || (e[2] = (...n) => o.handlePointToggle && o.handlePointToggle(...n))
|
|
352
352
|
}, e[19] || (e[19] = [
|
|
353
353
|
s("span", { class: "iconfont" }, "", -1)
|
|
354
354
|
]), 2)
|
|
355
355
|
]),
|
|
356
356
|
_: 1
|
|
357
357
|
}),
|
|
358
|
-
k(
|
|
358
|
+
k(l, {
|
|
359
359
|
placement: "left",
|
|
360
360
|
effect: "light",
|
|
361
361
|
content: "Grid",
|
|
@@ -364,14 +364,14 @@ function $t(t, e, a, r, i, o) {
|
|
|
364
364
|
default: ae(() => [
|
|
365
365
|
s("div", {
|
|
366
366
|
class: H(i.showCoord ? "menu-icon active" : "menu-icon"),
|
|
367
|
-
onClick: e[3] || (e[3] = (...
|
|
367
|
+
onClick: e[3] || (e[3] = (...n) => o.handleCoordToggle && o.handleCoordToggle(...n))
|
|
368
368
|
}, e[20] || (e[20] = [
|
|
369
369
|
s("span", { class: "iconfont" }, "", -1)
|
|
370
370
|
]), 2)
|
|
371
371
|
]),
|
|
372
372
|
_: 1
|
|
373
373
|
}),
|
|
374
|
-
k(
|
|
374
|
+
k(l, {
|
|
375
375
|
placement: "left",
|
|
376
376
|
effect: "light",
|
|
377
377
|
content: "3D",
|
|
@@ -380,7 +380,7 @@ function $t(t, e, a, r, i, o) {
|
|
|
380
380
|
default: ae(() => [
|
|
381
381
|
s("div", {
|
|
382
382
|
class: H(i.show3d ? "menu-icon active" : "menu-icon"),
|
|
383
|
-
onClick: e[4] || (e[4] = (...
|
|
383
|
+
onClick: e[4] || (e[4] = (...n) => o.handle3DToggle && o.handle3DToggle(...n))
|
|
384
384
|
}, e[21] || (e[21] = [
|
|
385
385
|
s("span", { class: "iconfont" }, "", -1)
|
|
386
386
|
]), 2)
|
|
@@ -389,7 +389,7 @@ function $t(t, e, a, r, i, o) {
|
|
|
389
389
|
})
|
|
390
390
|
])
|
|
391
391
|
], 4),
|
|
392
|
-
o.hasCollectedLayers ? (g(),
|
|
392
|
+
o.hasCollectedLayers ? (g(), f("div", {
|
|
393
393
|
key: 0,
|
|
394
394
|
class: "active-layers",
|
|
395
395
|
style: J({ right: i.right + "px", bottom: "100px" })
|
|
@@ -399,24 +399,24 @@ function $t(t, e, a, r, i, o) {
|
|
|
399
399
|
s("div", {
|
|
400
400
|
class: "switch flex-center",
|
|
401
401
|
style: { "font-size": "28px", "margin-right": "0" },
|
|
402
|
-
onClick: e[5] || (e[5] = (...
|
|
402
|
+
onClick: e[5] || (e[5] = (...n) => o.toggleAutoActive && o.toggleAutoActive(...n))
|
|
403
403
|
}, [
|
|
404
|
-
i.autoActive ? (g(),
|
|
404
|
+
i.autoActive ? (g(), f("i", vt, "")) : (g(), f("i", Lt, ""))
|
|
405
405
|
])
|
|
406
406
|
]),
|
|
407
|
-
(g(!0),
|
|
408
|
-
key:
|
|
409
|
-
class: H(o.computeLayerClass(
|
|
407
|
+
(g(!0), f(_, null, N(i.layers.weather.filter((n) => n.collected), (n) => (g(), f("div", {
|
|
408
|
+
key: n.key,
|
|
409
|
+
class: H(o.computeLayerClass(n, i.activeWeatherLayers))
|
|
410
410
|
}, [
|
|
411
411
|
s("div", {
|
|
412
412
|
class: "checkbox",
|
|
413
|
-
onClick: (d) => o.handleWeatherLayerPick(
|
|
413
|
+
onClick: (d) => o.handleWeatherLayerPick(n)
|
|
414
414
|
}, null, 8, Ct),
|
|
415
415
|
s("span", {
|
|
416
416
|
class: "name",
|
|
417
|
-
onClick: (d) => o.handleWeatherLayerPick(
|
|
418
|
-
}, B(
|
|
419
|
-
|
|
417
|
+
onClick: (d) => o.handleWeatherLayerPick(n)
|
|
418
|
+
}, B(n.name), 9, xt),
|
|
419
|
+
n.key === "wind" && i.activeWeatherLayers.some((d) => d.key === n.key) ? (g(), f("div", Bt, [
|
|
420
420
|
s("i", {
|
|
421
421
|
class: H(["iconfont sub-layer-icon", i.showWindParticleCollected ? "active" : ""]),
|
|
422
422
|
onClick: e[6] || (e[6] = (d) => o.handleToggleWindParticle())
|
|
@@ -426,7 +426,7 @@ function $t(t, e, a, r, i, o) {
|
|
|
426
426
|
onClick: e[7] || (e[7] = (d) => o.handleToggleWindFeather())
|
|
427
427
|
}, "", 2)
|
|
428
428
|
])) : O("", !0),
|
|
429
|
-
|
|
429
|
+
n.key === "current" && i.activeWeatherLayers.some((d) => d.key === n.key) ? (g(), f("div", It, [
|
|
430
430
|
s("i", {
|
|
431
431
|
class: H(["iconfont sub-layer-icon", i.showCurrentParticleCollected ? "active" : ""]),
|
|
432
432
|
onClick: e[8] || (e[8] = (d) => o.handleToggleCurrentParticle())
|
|
@@ -449,7 +449,7 @@ function $t(t, e, a, r, i, o) {
|
|
|
449
449
|
e[23] || (e[23] = s("div", null, "Layers", -1)),
|
|
450
450
|
s("div", {
|
|
451
451
|
class: "iconfont close-btn",
|
|
452
|
-
onClick: e[10] || (e[10] = (...
|
|
452
|
+
onClick: e[10] || (e[10] = (...n) => o.handleMenuToggle && o.handleMenuToggle(...n))
|
|
453
453
|
}, "")
|
|
454
454
|
]),
|
|
455
455
|
k(p, { style: { flex: "1" } }, {
|
|
@@ -460,29 +460,29 @@ function $t(t, e, a, r, i, o) {
|
|
|
460
460
|
s("div", {
|
|
461
461
|
class: "switch flex-center",
|
|
462
462
|
style: { "margin-right": "0" },
|
|
463
|
-
onClick: e[11] || (e[11] = (...
|
|
463
|
+
onClick: e[11] || (e[11] = (...n) => o.toggleAutoActive && o.toggleAutoActive(...n))
|
|
464
464
|
}, [
|
|
465
|
-
i.autoActive ? (g(),
|
|
465
|
+
i.autoActive ? (g(), f("i", kt, "")) : (g(), f("i", zt, ""))
|
|
466
466
|
])
|
|
467
467
|
]),
|
|
468
468
|
s("div", Mt, [
|
|
469
|
-
(g(!0),
|
|
470
|
-
key:
|
|
469
|
+
(g(!0), f(_, null, N(i.layers.weather, (n) => (g(), f(_, {
|
|
470
|
+
key: n.key
|
|
471
471
|
}, [
|
|
472
|
-
|
|
472
|
+
n.hide ? O("", !0) : (g(), f("div", {
|
|
473
473
|
key: 0,
|
|
474
|
-
class: H(o.computeLayerClass(
|
|
474
|
+
class: H(o.computeLayerClass(n, i.activeWeatherLayers))
|
|
475
475
|
}, [
|
|
476
476
|
s("div", Tt, [
|
|
477
477
|
s("div", {
|
|
478
478
|
class: "checkbox",
|
|
479
|
-
onClick: (d) => o.handleWeatherLayerPick(
|
|
479
|
+
onClick: (d) => o.handleWeatherLayerPick(n)
|
|
480
480
|
}, null, 8, Qt),
|
|
481
481
|
s("span", {
|
|
482
482
|
class: "name",
|
|
483
|
-
onClick: (d) => o.handleWeatherLayerPick(
|
|
484
|
-
}, B(
|
|
485
|
-
|
|
483
|
+
onClick: (d) => o.handleWeatherLayerPick(n)
|
|
484
|
+
}, B(n.name), 9, St),
|
|
485
|
+
n.key === "wind" && i.activeWeatherLayers.some((d) => d.key === n.key) ? (g(), f("div", _t, [
|
|
486
486
|
s("i", {
|
|
487
487
|
class: H(["iconfont sub-layer-icon", i.showWindParticleCollected ? "active" : ""]),
|
|
488
488
|
onClick: e[12] || (e[12] = (d) => o.handleToggleWindParticle())
|
|
@@ -492,7 +492,7 @@ function $t(t, e, a, r, i, o) {
|
|
|
492
492
|
onClick: e[13] || (e[13] = (d) => o.handleToggleWindFeather())
|
|
493
493
|
}, "", 2)
|
|
494
494
|
])) : O("", !0),
|
|
495
|
-
|
|
495
|
+
n.key === "current" && i.activeWeatherLayers.some((d) => d.key === n.key) ? (g(), f("div", Ht, [
|
|
496
496
|
s("i", {
|
|
497
497
|
class: H(["iconfont sub-layer-icon", i.showCurrentParticleCollected ? "active" : ""]),
|
|
498
498
|
onClick: e[14] || (e[14] = (d) => o.handleToggleCurrentParticle())
|
|
@@ -504,9 +504,9 @@ function $t(t, e, a, r, i, o) {
|
|
|
504
504
|
])) : O("", !0)
|
|
505
505
|
]),
|
|
506
506
|
s("div", {
|
|
507
|
-
onClick: (d) => o.handleWeatherLayerCollect(
|
|
507
|
+
onClick: (d) => o.handleWeatherLayerCollect(n)
|
|
508
508
|
}, [
|
|
509
|
-
|
|
509
|
+
n.collected ? (g(), f("i", Nt, "")) : (g(), f("i", jt, ""))
|
|
510
510
|
], 8, Ot)
|
|
511
511
|
], 2))
|
|
512
512
|
], 64))), 128)),
|
|
@@ -522,18 +522,18 @@ function $t(t, e, a, r, i, o) {
|
|
|
522
522
|
s("div", Rt, [
|
|
523
523
|
e[26] || (e[26] = s("div", { class: "layers-title" }, "Other Layers", -1)),
|
|
524
524
|
s("div", Ft, [
|
|
525
|
-
(g(!0),
|
|
525
|
+
(g(!0), f(_, null, N(i.layers.other, (n) => {
|
|
526
526
|
var d;
|
|
527
|
-
return g(),
|
|
528
|
-
key:
|
|
529
|
-
class: H(["layer flex-between", o.computeLayerClass(
|
|
530
|
-
onClick: (b) => o.handleOtherLayerPick(
|
|
527
|
+
return g(), f("div", {
|
|
528
|
+
key: n.key,
|
|
529
|
+
class: H(["layer flex-between", o.computeLayerClass(n, i.activeOtherLayers)]),
|
|
530
|
+
onClick: (b) => o.handleOtherLayerPick(n)
|
|
531
531
|
}, [
|
|
532
532
|
s("div", Wt, [
|
|
533
533
|
s("div", Ut, [
|
|
534
|
-
(d = o.computeLayerClass(
|
|
534
|
+
(d = o.computeLayerClass(n, i.activeOtherLayers)) != null && d.includes("active") ? (g(), f("i", Yt, "")) : (g(), f("i", Kt, ""))
|
|
535
535
|
]),
|
|
536
|
-
s("span", null, B(
|
|
536
|
+
s("span", null, B(n.name), 1)
|
|
537
537
|
])
|
|
538
538
|
], 10, Gt);
|
|
539
539
|
}), 128))
|
|
@@ -544,21 +544,21 @@ function $t(t, e, a, r, i, o) {
|
|
|
544
544
|
s("div", Jt, [
|
|
545
545
|
k(h, {
|
|
546
546
|
modelValue: i.source,
|
|
547
|
-
"onUpdate:modelValue": e[16] || (e[16] = (
|
|
547
|
+
"onUpdate:modelValue": e[16] || (e[16] = (n) => i.source = n),
|
|
548
548
|
class: "layer-radio flex-col-start-start",
|
|
549
549
|
style: { width: "180px", "align-items": "flex-start" }
|
|
550
550
|
}, {
|
|
551
551
|
default: ae(() => [
|
|
552
|
-
(g(!0),
|
|
553
|
-
key: `source${
|
|
554
|
-
value:
|
|
552
|
+
(g(!0), f(_, null, N(i.sourceList, (n, d) => (g(), pt(c, {
|
|
553
|
+
key: `source${n.name}`,
|
|
554
|
+
value: n.name
|
|
555
555
|
}, {
|
|
556
556
|
default: ae(() => {
|
|
557
557
|
var b, u, A, w, m, v;
|
|
558
558
|
return [
|
|
559
|
-
U(B(
|
|
560
|
-
d !== 0 ? (g(),
|
|
561
|
-
d === 0 ? (g(),
|
|
559
|
+
U(B(n.name) + " ", 1),
|
|
560
|
+
d !== 0 ? (g(), f("span", qt, B(n.resolution) + "km " + B(n.length) + "days", 1)) : O("", !0),
|
|
561
|
+
d === 0 ? (g(), f("div", Vt, "Provides the best forecast")) : (A = (u = (b = n == null ? void 0 : n.update) == null ? void 0 : b.default) == null ? void 0 : u.meta) != null && A.initialisationTime ? (g(), f("div", Zt, "Update: " + B(o.computeDateZ((v = (m = (w = n == null ? void 0 : n.update) == null ? void 0 : w.default) == null ? void 0 : m.meta) == null ? void 0 : v.initialisationTime)), 1)) : O("", !0)
|
|
562
562
|
];
|
|
563
563
|
}),
|
|
564
564
|
_: 2
|
|
@@ -653,13 +653,13 @@ const ta = {
|
|
|
653
653
|
}, 500);
|
|
654
654
|
else if (this.wind) {
|
|
655
655
|
const i = (/* @__PURE__ */ new Date()).valueOf();
|
|
656
|
-
let o = 0,
|
|
656
|
+
let o = 0, l = 0, c = this.empty;
|
|
657
657
|
if ((t = this.wind) != null && t.active && (c = (e = this.wind) == null ? void 0 : e.data), (a = this.map) != null && a.getSource(this.source))
|
|
658
|
-
(r = this.map) == null || r.getSource(this.source).setData(c),
|
|
658
|
+
(r = this.map) == null || r.getSource(this.source).setData(c), l = (/* @__PURE__ */ new Date()).valueOf() - (i + o), console.log("[wind] update elapsed: ", l, ", total: ", o += l);
|
|
659
659
|
else {
|
|
660
660
|
this.map.addSource(this.source, { type: "geojson", data: c });
|
|
661
661
|
for (let h = 0; h < (this.barbs ?? []).length - 1; h++) {
|
|
662
|
-
const p = (this.barbs ?? [])[h] || 0,
|
|
662
|
+
const p = (this.barbs ?? [])[h] || 0, n = (this.barbs ?? [])[h + 1] || 0, d = p < 10 ? `00${p}kts` : p < 100 ? `0${p}kts` : `${p}kts`;
|
|
663
663
|
this.map.addLayer(
|
|
664
664
|
{
|
|
665
665
|
id: d,
|
|
@@ -669,7 +669,7 @@ const ta = {
|
|
|
669
669
|
// @ts-ignore
|
|
670
670
|
[">=", "spd", p],
|
|
671
671
|
// @ts-ignore
|
|
672
|
-
["<", "spd",
|
|
672
|
+
["<", "spd", n]
|
|
673
673
|
],
|
|
674
674
|
source: this.source,
|
|
675
675
|
layout: {
|
|
@@ -696,7 +696,7 @@ const ta = {
|
|
|
696
696
|
this.beforeLayer
|
|
697
697
|
);
|
|
698
698
|
}
|
|
699
|
-
this.windBarbLoaded = !0,
|
|
699
|
+
this.windBarbLoaded = !0, l = (/* @__PURE__ */ new Date()).valueOf() - (i + o), console.log("[wind] add elapsed: ", l, ", total: ", o += l);
|
|
700
700
|
}
|
|
701
701
|
}
|
|
702
702
|
},
|
|
@@ -767,8 +767,8 @@ class Je {
|
|
|
767
767
|
* @param [lb.x, lb.y, rt.x, rt.y]
|
|
768
768
|
*/
|
|
769
769
|
getBoundPixel() {
|
|
770
|
-
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,
|
|
771
|
-
return [d, b, p + u,
|
|
770
|
+
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]), [p, n] = this.mercator.px([o, r[1]], a), [d, b] = this.mercator.px([c, i[1]], a), u = Math.round(this.mercator.size * Math.pow(2, a) * (l + h));
|
|
771
|
+
return [d, b, p + u, n];
|
|
772
772
|
}
|
|
773
773
|
/**
|
|
774
774
|
* [视窗边界像素宽度]
|
|
@@ -783,13 +783,13 @@ class Je {
|
|
|
783
783
|
* @param zoom
|
|
784
784
|
*/
|
|
785
785
|
getWorldCopy(e, a) {
|
|
786
|
-
const r = 2 ** a, [i, o,
|
|
787
|
-
for (let
|
|
788
|
-
for (let d = i; d <=
|
|
789
|
-
h.push([d,
|
|
790
|
-
return h.map((
|
|
786
|
+
const r = 2 ** a, [i, o, l, c] = e.map((n) => ~~(n / (r * 256))), h = [];
|
|
787
|
+
for (let n = c; n <= o; n++)
|
|
788
|
+
for (let d = i; d <= l; d++)
|
|
789
|
+
h.push([d, n]);
|
|
790
|
+
return h.map((n) => {
|
|
791
791
|
const d = 2 ** a * 256;
|
|
792
|
-
return [
|
|
792
|
+
return [n[0] * d, n[1] * d, d];
|
|
793
793
|
});
|
|
794
794
|
}
|
|
795
795
|
resize() {
|
|
@@ -830,9 +830,9 @@ class Ce {
|
|
|
830
830
|
* @param width??
|
|
831
831
|
* @param height??
|
|
832
832
|
*/
|
|
833
|
-
createTexture(e, a, r, i, o,
|
|
833
|
+
createTexture(e, a, r, i, o, l, c) {
|
|
834
834
|
const h = e.createTexture();
|
|
835
|
-
return e.bindTexture(e.TEXTURE_2D, h), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, a), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, r), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, i), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, i), o instanceof Uint8Array ? e.texImage2D(e.TEXTURE_2D, 0, e.RGBA,
|
|
835
|
+
return e.bindTexture(e.TEXTURE_2D, h), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, a), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, r), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, i), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, i), o instanceof Uint8Array ? e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, l, c, 0, e.RGBA, e.UNSIGNED_BYTE, o) : e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, e.RGBA, e.UNSIGNED_BYTE, o), e.bindTexture(e.TEXTURE_2D, null), h;
|
|
836
836
|
}
|
|
837
837
|
/**
|
|
838
838
|
* 创建数据资源
|
|
@@ -855,8 +855,8 @@ class Ce {
|
|
|
855
855
|
* @param fragmentSchema
|
|
856
856
|
*/
|
|
857
857
|
createProgram(e, a, r) {
|
|
858
|
-
const i = e.createProgram(), o = this.createShader(e, e.VERTEX_SHADER, a),
|
|
859
|
-
if (i && o &&
|
|
858
|
+
const i = e.createProgram(), o = this.createShader(e, e.VERTEX_SHADER, a), l = this.createShader(e, e.FRAGMENT_SHADER, r);
|
|
859
|
+
if (i && o && l && (e.attachShader(i, o), e.attachShader(i, l), e.linkProgram(i), !e.getProgramParameter(i, e.LINK_STATUS)))
|
|
860
860
|
throw new Error(e.getProgramInfoLog(i) || "error happened while creating ramp color program");
|
|
861
861
|
return i;
|
|
862
862
|
}
|
|
@@ -869,8 +869,8 @@ class Ce {
|
|
|
869
869
|
createProgramWrapper(e, a, r) {
|
|
870
870
|
const i = this.createProgram(e, a, r);
|
|
871
871
|
if (i) {
|
|
872
|
-
const o = { program: i },
|
|
873
|
-
for (let h = 0; h <
|
|
872
|
+
const o = { program: i }, l = e.getProgramParameter(i, e.ACTIVE_ATTRIBUTES);
|
|
873
|
+
for (let h = 0; h < l; h++) {
|
|
874
874
|
const p = e.getActiveAttrib(i, h);
|
|
875
875
|
o[p.name] = e.getAttribLocation(i, p.name);
|
|
876
876
|
}
|
|
@@ -887,21 +887,21 @@ class Ce {
|
|
|
887
887
|
* @param colors
|
|
888
888
|
*/
|
|
889
889
|
setup(e, a, r = !1, i, o) {
|
|
890
|
-
const
|
|
891
|
-
|
|
892
|
-
const c =
|
|
890
|
+
const l = document.createElement("canvas");
|
|
891
|
+
l.width = 256, l.height = 1;
|
|
892
|
+
const c = l.getContext("2d");
|
|
893
893
|
if (c && e) {
|
|
894
894
|
const h = c == null ? void 0 : c.createLinearGradient(0, 0, 256, 0);
|
|
895
|
-
return a.forEach(([p,
|
|
896
|
-
h.addColorStop(p,
|
|
895
|
+
return a.forEach(([p, n]) => {
|
|
896
|
+
h.addColorStop(p, n);
|
|
897
897
|
}), c.fillStyle = h, c.fillRect(0, 0, 256, 1), {
|
|
898
|
-
canvas:
|
|
898
|
+
canvas: l,
|
|
899
899
|
texture: this.createTexture(
|
|
900
900
|
e,
|
|
901
901
|
e.LINEAR,
|
|
902
902
|
e.LINEAR,
|
|
903
903
|
e.CLAMP_TO_EDGE,
|
|
904
|
-
r ? new Uint8Array(c.getImageData(0, 0, 256, 1).data) :
|
|
904
|
+
r ? new Uint8Array(c.getImageData(0, 0, 256, 1).data) : l,
|
|
905
905
|
i,
|
|
906
906
|
o
|
|
907
907
|
)
|
|
@@ -910,19 +910,19 @@ class Ce {
|
|
|
910
910
|
}
|
|
911
911
|
setupParticle(e, a = 1e3) {
|
|
912
912
|
const r = Math.ceil(Math.sqrt(a)), i = r * r, o = new Uint8Array(i * 4);
|
|
913
|
-
for (let
|
|
914
|
-
o[
|
|
915
|
-
const
|
|
916
|
-
for (let
|
|
917
|
-
h[
|
|
913
|
+
for (let n = 0; n < o.length; n++)
|
|
914
|
+
o[n] = Math.floor(Math.random() * 256);
|
|
915
|
+
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);
|
|
916
|
+
for (let n = 0; n < i; n++)
|
|
917
|
+
h[n] = n;
|
|
918
918
|
const p = this.createDataBuffer(e, "array", h);
|
|
919
|
-
return { resolution: r, total: i, texture0:
|
|
919
|
+
return { resolution: r, total: i, texture0: l, texture1: c, indexBuffer: p };
|
|
920
920
|
}
|
|
921
921
|
bind(e, a, r) {
|
|
922
922
|
const i = this.createProgram(e, a, r);
|
|
923
923
|
if (i) {
|
|
924
|
-
const o = this.createDataBuffer(e, "array", void 0),
|
|
925
|
-
e.enableVertexAttribArray(
|
|
924
|
+
const o = this.createDataBuffer(e, "array", void 0), l = e.getAttribLocation(i, "a_position");
|
|
925
|
+
e.enableVertexAttribArray(l), e.vertexAttribPointer(l, 2, e.FLOAT, !1, 0, 0);
|
|
926
926
|
const c = new Float32Array([0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1]);
|
|
927
927
|
this.createDataBuffer(e, "array", c);
|
|
928
928
|
const h = e.getAttribLocation(i, "a_texCoord");
|
|
@@ -930,33 +930,33 @@ class Ce {
|
|
|
930
930
|
}
|
|
931
931
|
return {};
|
|
932
932
|
}
|
|
933
|
-
bindParticle(e, a, r, i, o,
|
|
934
|
-
const c = this.createProgramWrapper(e, a, r), h = this.createProgramWrapper(e, i, o), p = this.createProgramWrapper(e, i,
|
|
935
|
-
return { particle: c, screen: h, update: p, quadBuffer:
|
|
933
|
+
bindParticle(e, a, r, i, o, l) {
|
|
934
|
+
const c = this.createProgramWrapper(e, a, r), h = this.createProgramWrapper(e, i, o), p = this.createProgramWrapper(e, i, l), n = this.createDataBuffer(e, "array", new Float32Array([0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1])), d = e.createFramebuffer();
|
|
935
|
+
return { particle: c, screen: h, update: p, quadBuffer: n, frameBuffer: d };
|
|
936
936
|
}
|
|
937
|
-
draw(e, a, r, i, o,
|
|
937
|
+
draw(e, a, r, i, o, l, c) {
|
|
938
938
|
var h, p;
|
|
939
939
|
if (a && r) {
|
|
940
940
|
e.resize(), a == null || a.viewport(0, 0, (h = a == null ? void 0 : a.canvas) == null ? void 0 : h.width, (p = a == null ? void 0 : a.canvas) == null ? void 0 : p.height), a.clearColor(0, 0, 0, 0), a.clear(a.COLOR_BUFFER_BIT | a.DEPTH_BUFFER_BIT);
|
|
941
941
|
try {
|
|
942
|
-
const
|
|
943
|
-
if (a.useProgram(r), a.uniform2f(
|
|
942
|
+
const n = a.getUniformLocation(r, "u_resolution"), d = a.getUniformLocation(r, "u_image"), b = a.getUniformLocation(r, "u_color");
|
|
943
|
+
if (a.useProgram(r), a.uniform2f(n, a.canvas.width * e.ratio, a.canvas.height * e.ratio), a.activeTexture(a.TEXTURE0), a.bindTexture(a.TEXTURE_2D, i), a.uniform1i(d, 0), a.activeTexture(a.TEXTURE1), a.bindTexture(a.TEXTURE_2D, o), a.uniform1i(b, 1), c != null && c.uvRange && (c != null && c.sRange)) {
|
|
944
944
|
const m = a.getUniformLocation(r, "u_range_u_v"), v = a.getUniformLocation(r, "u_range_s");
|
|
945
945
|
a.uniform2f(m, c.uvRange[0], c.uvRange[1]), a.uniform2f(v, c.sRange[0], c.sRange[1]);
|
|
946
946
|
}
|
|
947
947
|
const u = e.getBoundPixel(), A = e.map.getZoom() + 1, w = e.getWorldCopy(u, A);
|
|
948
948
|
for (const m of w) {
|
|
949
|
-
const v = (m[0] - u[0]) * e.ratio,
|
|
950
|
-
a.bindBuffer(a.ARRAY_BUFFER,
|
|
949
|
+
const v = (m[0] - u[0]) * e.ratio, y = (m[1] - u[3]) * e.ratio, L = m[2] * e.ratio, [P, M, I, j] = [v, L + v, y, L + y], W = new Float32Array([P, I, M, I, P, j, P, j, M, I, M, j]);
|
|
950
|
+
a.bindBuffer(a.ARRAY_BUFFER, l), a.bufferData(a.ARRAY_BUFFER, W, a.STATIC_DRAW), a.drawArrays(a.TRIANGLES, 0, 6);
|
|
951
951
|
}
|
|
952
|
-
} catch (
|
|
953
|
-
console.log(`render failed...${
|
|
952
|
+
} catch (n) {
|
|
953
|
+
console.log(`render failed...${n}`);
|
|
954
954
|
}
|
|
955
955
|
}
|
|
956
956
|
}
|
|
957
957
|
drawParticle(e, a, r, i, o) {
|
|
958
|
-
var
|
|
959
|
-
a && (a == null || a.viewport(0, 0, (
|
|
958
|
+
var l, c;
|
|
959
|
+
a && (a == null || a.viewport(0, 0, (l = a == null ? void 0 : a.canvas) == null ? void 0 : l.width, (c = a == null ? void 0 : a.canvas) == null ? void 0 : c.height), a.disable(a.DEPTH_TEST), a.disable(a.STENCIL_TEST), a.activeTexture(a.TEXTURE0), a.bindTexture(a.TEXTURE_2D, r), a.activeTexture(a.TEXTURE1), a.bindTexture(a.TEXTURE_2D, i.texture0), this.renderScreen(e, a, i, o), this.updateParticles(e, a, i, o));
|
|
960
960
|
}
|
|
961
961
|
renderScreen(e, a, r, i) {
|
|
962
962
|
a.bindFramebuffer(a.FRAMEBUFFER, r.frameBuffer), a.framebufferTexture2D(a.FRAMEBUFFER, a.COLOR_ATTACHMENT0, a.TEXTURE_2D, r.screenTexture, 0), a.viewport(0, 0, a.canvas.width, a.canvas.height), this.renderScreenTexture(a, r.backgroundTexture, r.screen, r.quadBuffer, 0.95), this.renderParticles(e, a, r, i), a.bindFramebuffer(a.FRAMEBUFFER, null), this.renderScreenTexture(a, r.screenTexture, r.screen, r.quadBuffer, 1);
|
|
@@ -974,11 +974,11 @@ class Ce {
|
|
|
974
974
|
}
|
|
975
975
|
}
|
|
976
976
|
updateParticles(e, a, r, i) {
|
|
977
|
-
var
|
|
977
|
+
var l, c;
|
|
978
978
|
if (a) {
|
|
979
979
|
a.bindFramebuffer(a.FRAMEBUFFER, r.frameBuffer), a.framebufferTexture2D(a.FRAMEBUFFER, a.COLOR_ATTACHMENT0, a.TEXTURE_2D, r.texture1, 0), a.viewport(0, 0, r.resolution, r.resolution), a.useProgram(r.update.program), a.bindBuffer(a.ARRAY_BUFFER, r.quadBuffer), a.enableVertexAttribArray(r.update.a_pos), a.vertexAttribPointer(r.update.a_pos, 2, a.FLOAT, !1, 0, 0), a.uniform1i(r.update.u_factor, 0), a.uniform1i(r.update.u_particles, 1);
|
|
980
980
|
const h = e.getBoundRange();
|
|
981
|
-
a.uniform4f(r.update.u_viewport, h[0], h[1], h[2], h[3]), a.uniform1f(r.update.u_rand_seed, Math.random()), a.uniform2f(r.update.u_factor_res, (
|
|
981
|
+
a.uniform4f(r.update.u_viewport, h[0], h[1], h[2], h[3]), a.uniform1f(r.update.u_rand_seed, Math.random()), a.uniform2f(r.update.u_factor_res, (l = r == null ? void 0 : r.image) == null ? void 0 : l.width, (c = r == null ? void 0 : r.image) == null ? void 0 : c.height), a.uniform2f(r.update.u_factor_min, i.uvRange[0], i.uvRange[0]), a.uniform2f(r.update.u_factor_max, i.uvRange[1], i.uvRange[1]), a.uniform1f(r.update.u_speed_factor, i.speedFactor * e.ratio), a.uniform1f(r.update.u_drop_rate, i.dropRate), a.uniform1f(r.update.u_drop_rate_bump, i.dropRateBump), a.drawArrays(a.TRIANGLES, 0, 6);
|
|
982
982
|
}
|
|
983
983
|
const o = r.texture0;
|
|
984
984
|
r.texture0 = r.texture1, r.texture1 = o;
|
|
@@ -3222,8 +3222,8 @@ const oa = {
|
|
|
3222
3222
|
}
|
|
3223
3223
|
},
|
|
3224
3224
|
handleClear() {
|
|
3225
|
-
var t, e, a, r, i, o,
|
|
3226
|
-
(t = this.viewport) == null || t.toggle(!1), (e = this.viewport) == null || e.toggleParticle(!1), this.context = void 0, this.particleContext = void 0, this.etime = void 0, this.initial = !0, (r = (a = this.viewport) == null ? void 0 : a.map) == null || r.off("resize", this.handleResize), (o = (i = this.viewport) == null ? void 0 : i.map) == null || o.off("movestart", this.handlePause), (c = (
|
|
3225
|
+
var t, e, a, r, i, o, l, c;
|
|
3226
|
+
(t = this.viewport) == null || t.toggle(!1), (e = this.viewport) == null || e.toggleParticle(!1), this.context = void 0, this.particleContext = void 0, this.etime = void 0, this.initial = !0, (r = (a = this.viewport) == null ? void 0 : a.map) == null || r.off("resize", this.handleResize), (o = (i = this.viewport) == null ? void 0 : i.map) == null || o.off("movestart", this.handlePause), (c = (l = this.viewport) == null ? void 0 : l.map) == null || c.off("moveend", this.handlePlay), this.handlePause();
|
|
3227
3227
|
},
|
|
3228
3228
|
handleSetup() {
|
|
3229
3229
|
if (!this.context) {
|
|
@@ -3308,8 +3308,8 @@ const oa = {
|
|
|
3308
3308
|
}
|
|
3309
3309
|
}, sa = { key: 0 };
|
|
3310
3310
|
function na(t, e, a, r, i, o) {
|
|
3311
|
-
var
|
|
3312
|
-
return (
|
|
3311
|
+
var l;
|
|
3312
|
+
return (l = a.factor) != null && l.active ? (g(), f("div", sa, [
|
|
3313
3313
|
s("div", {
|
|
3314
3314
|
class: "legend-bars flex-center",
|
|
3315
3315
|
style: J([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
@@ -3558,8 +3558,8 @@ const pa = {
|
|
|
3558
3558
|
}
|
|
3559
3559
|
},
|
|
3560
3560
|
handleClear() {
|
|
3561
|
-
var t, e, a, r, i, o,
|
|
3562
|
-
(t = this.viewport) == null || t.toggle(!1), (e = this.viewport) == null || e.toggleParticle(!1), this.context = void 0, this.particleContext = void 0, this.etime = void 0, this.initial = !0, (r = (a = this.viewport) == null ? void 0 : a.map) == null || r.off("resize", this.handleResize), (o = (i = this.viewport) == null ? void 0 : i.map) == null || o.off("movestart", this.handlePause), (c = (
|
|
3561
|
+
var t, e, a, r, i, o, l, c;
|
|
3562
|
+
(t = this.viewport) == null || t.toggle(!1), (e = this.viewport) == null || e.toggleParticle(!1), this.context = void 0, this.particleContext = void 0, this.etime = void 0, this.initial = !0, (r = (a = this.viewport) == null ? void 0 : a.map) == null || r.off("resize", this.handleResize), (o = (i = this.viewport) == null ? void 0 : i.map) == null || o.off("movestart", this.handlePause), (c = (l = this.viewport) == null ? void 0 : l.map) == null || c.off("moveend", this.handlePlay), this.handlePause();
|
|
3563
3563
|
},
|
|
3564
3564
|
handleSetup() {
|
|
3565
3565
|
if (!this.context) {
|
|
@@ -3639,8 +3639,8 @@ const pa = {
|
|
|
3639
3639
|
}
|
|
3640
3640
|
}, ma = { key: 0 };
|
|
3641
3641
|
function ua(t, e, a, r, i, o) {
|
|
3642
|
-
var
|
|
3643
|
-
return (
|
|
3642
|
+
var l;
|
|
3643
|
+
return (l = a.factor) != null && l.active ? (g(), f("div", ma, [
|
|
3644
3644
|
s("div", {
|
|
3645
3645
|
class: "legend-bars flex-center",
|
|
3646
3646
|
style: J([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
@@ -3775,7 +3775,7 @@ const ga = /* @__PURE__ */ T(pa, [["render", ua], ["__scopeId", "data-v-163d1f9a
|
|
|
3775
3775
|
}
|
|
3776
3776
|
};
|
|
3777
3777
|
function ya(t, e, a, r, i, o) {
|
|
3778
|
-
return g(),
|
|
3778
|
+
return g(), f("div");
|
|
3779
3779
|
}
|
|
3780
3780
|
const fa = /* @__PURE__ */ T(Aa, [["render", ya]]), wa = {
|
|
3781
3781
|
name: "IdmSwell",
|
|
@@ -3933,7 +3933,7 @@ const fa = /* @__PURE__ */ T(Aa, [["render", ya]]), wa = {
|
|
|
3933
3933
|
}
|
|
3934
3934
|
};
|
|
3935
3935
|
function ba(t, e, a, r, i, o) {
|
|
3936
|
-
return g(),
|
|
3936
|
+
return g(), f("div");
|
|
3937
3937
|
}
|
|
3938
3938
|
const va = /* @__PURE__ */ T(wa, [["render", ba]]), La = {
|
|
3939
3939
|
name: "IdmPrmsl",
|
|
@@ -3990,8 +3990,8 @@ const va = /* @__PURE__ */ T(wa, [["render", ba]]), La = {
|
|
|
3990
3990
|
}, 500);
|
|
3991
3991
|
else if (this.prmsl) {
|
|
3992
3992
|
const r = (/* @__PURE__ */ new Date()).valueOf();
|
|
3993
|
-
let i = 0, o = 0,
|
|
3994
|
-
this.prmsl.active && (
|
|
3993
|
+
let i = 0, o = 0, l = this.empty;
|
|
3994
|
+
this.prmsl.active && (l = this.prmsl.data), (t = this.map) != null && t.getSource(this.source) ? ((e = this.map) == null || e.getSource(this.source).setData(l), o = (/* @__PURE__ */ new Date()).valueOf() - (r + i), console.log("[prmsl] update elapsed: ", o, ", total: ", i += o)) : (this.map.addSource(this.source, { type: "geojson", data: l }), this.map.addLayer(
|
|
3995
3995
|
{
|
|
3996
3996
|
id: this.layer,
|
|
3997
3997
|
type: "line",
|
|
@@ -4072,7 +4072,7 @@ const va = /* @__PURE__ */ T(wa, [["render", ba]]), La = {
|
|
|
4072
4072
|
}
|
|
4073
4073
|
};
|
|
4074
4074
|
function Ca(t, e, a, r, i, o) {
|
|
4075
|
-
return g(),
|
|
4075
|
+
return g(), f("div");
|
|
4076
4076
|
}
|
|
4077
4077
|
const xa = /* @__PURE__ */ T(La, [["render", Ca]]), Ba = {
|
|
4078
4078
|
name: "IdmIceberg",
|
|
@@ -4132,7 +4132,7 @@ const xa = /* @__PURE__ */ T(La, [["render", Ca]]), Ba = {
|
|
|
4132
4132
|
}
|
|
4133
4133
|
};
|
|
4134
4134
|
function Ia(t, e, a, r, i, o) {
|
|
4135
|
-
return g(),
|
|
4135
|
+
return g(), f("div");
|
|
4136
4136
|
}
|
|
4137
4137
|
const Ea = /* @__PURE__ */ T(Ba, [["render", Ia]]);
|
|
4138
4138
|
const Da = {
|
|
@@ -4222,29 +4222,29 @@ const Da = {
|
|
|
4222
4222
|
var r, i;
|
|
4223
4223
|
const t = ((i = (r = this.tropicals) == null ? void 0 : r.data) == null ? void 0 : i.features) || [], e = F().utc().hour(), a = [];
|
|
4224
4224
|
t.forEach((o) => {
|
|
4225
|
-
var
|
|
4226
|
-
(
|
|
4225
|
+
var l, c, h;
|
|
4226
|
+
(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);
|
|
4227
4227
|
}), a.forEach((o) => {
|
|
4228
4228
|
var p;
|
|
4229
|
-
let
|
|
4230
|
-
const h = t.filter((
|
|
4229
|
+
let l = 0, c;
|
|
4230
|
+
const h = t.filter((n) => {
|
|
4231
4231
|
var d, b;
|
|
4232
|
-
return ((b = (d =
|
|
4232
|
+
return ((b = (d = n.properties) == null ? void 0 : d.category) == null ? void 0 : b.split("-")[0]) === o;
|
|
4233
4233
|
});
|
|
4234
|
-
(p = h.filter((
|
|
4234
|
+
(p = h.filter((n) => {
|
|
4235
4235
|
var d, b;
|
|
4236
|
-
return ((d =
|
|
4237
|
-
})[0]) == null || p.properties.model, h.forEach((
|
|
4236
|
+
return ((d = n.geometry) == null ? void 0 : d.type) === "LineString" && ((b = n.properties) == null ? void 0 : b.type) === "forecast";
|
|
4237
|
+
})[0]) == null || p.properties.model, h.forEach((n, d) => {
|
|
4238
4238
|
var b, u, A, w, m, v;
|
|
4239
|
-
((b =
|
|
4240
|
-
}), h.map((
|
|
4241
|
-
var b, u, A, w, m, v,
|
|
4242
|
-
if (((b =
|
|
4243
|
-
|
|
4244
|
-
const L = F((
|
|
4245
|
-
|
|
4239
|
+
((b = n.geometry) == null ? void 0 : b.type) === "Point" && ((u = n.properties) == null ? void 0 : u.type) === "history" && (l = d, c = c === void 0 ? d : c), ((A = n.geometry) == null ? void 0 : A.type) === "Point" && ((w = n.properties) == null ? void 0 : w.type) === "forecast" && c === void 0 && (c = d), ((m = n.geometry) == null ? void 0 : m.type) === "LineString" && ((v = n.properties) == null || v.type);
|
|
4240
|
+
}), h.map((n, d) => {
|
|
4241
|
+
var b, u, A, w, m, v, y;
|
|
4242
|
+
if (((b = n.geometry) == null ? void 0 : b.type) === "LineString" && ((u = n.properties) == null || u.type), ((A = n.geometry) == null ? void 0 : A.type) === "Point" && ((w = n.properties) == null ? void 0 : w.type) === "forecast" && (n.properties.name = o, n.properties.format = F(n.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`)), ((m = n.geometry) == null ? void 0 : m.type) === "Point" && ((v = n.properties) == null ? void 0 : v.type) === "history") {
|
|
4243
|
+
n.properties.format = F(n.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`);
|
|
4244
|
+
const L = F((y = n.properties) == null ? void 0 : y.date).utc().format("HHmm") === F().utc().hour(Math.floor(e / 6) * 6).minute("00").format("HHmm");
|
|
4245
|
+
n.properties.showHistoryLabel = L || d === l, n.properties.showNameLabel = d === l, n.properties.name = o;
|
|
4246
4246
|
}
|
|
4247
|
-
return
|
|
4247
|
+
return n;
|
|
4248
4248
|
});
|
|
4249
4249
|
}), this.handleInit();
|
|
4250
4250
|
},
|
|
@@ -4279,7 +4279,7 @@ const Da = {
|
|
|
4279
4279
|
));
|
|
4280
4280
|
},
|
|
4281
4281
|
handleRender() {
|
|
4282
|
-
var t, e, a, r, i, o,
|
|
4282
|
+
var t, e, a, r, i, o, l, c, h, p;
|
|
4283
4283
|
if (!this.map)
|
|
4284
4284
|
setTimeout(() => {
|
|
4285
4285
|
this.handleRender();
|
|
@@ -4385,7 +4385,7 @@ const Da = {
|
|
|
4385
4385
|
],
|
|
4386
4386
|
"text-halo-width": 4
|
|
4387
4387
|
}
|
|
4388
|
-
}), u = (/* @__PURE__ */ new Date()).valueOf() - (d + b), console.log("[tropical] add elapsed: ", u, ", total: ", b += u)), (o = this.map) != null && o.getSource(this.clusterSource) ? ((c = this.map) == null || c.getSource(this.clusterSource).setData((
|
|
4388
|
+
}), u = (/* @__PURE__ */ new Date()).valueOf() - (d + b), console.log("[tropical] add elapsed: ", u, ", total: ", b += u)), (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), u = (/* @__PURE__ */ new Date()).valueOf() - (d + b), console.log("[tropical] update elapsed: ", u, ", total: ", b += u)) : (this.map.addSource(this.clusterSource, {
|
|
4389
4389
|
type: "geojson",
|
|
4390
4390
|
data: (h = this.tropicals) != null && h.active ? (p = this.tropicals) == null ? void 0 : p.data : this.empty
|
|
4391
4391
|
// cluster: true,
|
|
@@ -4505,8 +4505,8 @@ const Da = {
|
|
|
4505
4505
|
}), u = (/* @__PURE__ */ new Date()).valueOf() - (d + b), console.log("[tropical] add elapsed: ", u, ", total: ", b += u));
|
|
4506
4506
|
}
|
|
4507
4507
|
this.handleDrawCircle();
|
|
4508
|
-
const
|
|
4509
|
-
this.interpolateData = JSON.parse(JSON.stringify(
|
|
4508
|
+
const n = nt.interpolate(this.tropicals, 1);
|
|
4509
|
+
this.interpolateData = JSON.parse(JSON.stringify(n)), this.interpolateData.filter((d) => d.properties.name === "kristy" && d.properties.model === "ecmwf"), this.handleDateChange();
|
|
4510
4510
|
}
|
|
4511
4511
|
},
|
|
4512
4512
|
handleClear() {
|
|
@@ -4514,7 +4514,7 @@ const Da = {
|
|
|
4514
4514
|
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));
|
|
4515
4515
|
},
|
|
4516
4516
|
handleDateChange() {
|
|
4517
|
-
var t, e, a, r, i, o,
|
|
4517
|
+
var t, e, a, r, i, o, l, c, h, p, n, d, b, u, A, w, m, v, y, L, P, M, I, j, W, Y, K, V, ee, ce, he, de, pe, me, ue, ge;
|
|
4518
4518
|
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) {
|
|
4519
4519
|
const te = F(this.date).utc().set({ minute: 0, second: 0, millisecond: 0 }), oe = this.interpolateData.filter((Q) => Q.properties.date === te.format() && !Q.properties.disabled), Ae = this.handleComputePolygons(oe), ie = D.featureCollection([...oe]);
|
|
4520
4520
|
Ae.forEach((Q) => {
|
|
@@ -4536,7 +4536,7 @@ const Da = {
|
|
|
4536
4536
|
for (const Q of oe)
|
|
4537
4537
|
if (!Q.properties.disabled) {
|
|
4538
4538
|
let q = "#f44336";
|
|
4539
|
-
((c = (
|
|
4539
|
+
((c = (l = Q.properties) == null ? void 0 : l.wind) == null ? void 0 : c.spd) < 17.2 || !((p = (h = Q.properties) == null ? void 0 : h.wind) != null && p.spd) ? q = "#03f869" : ((d = (n = Q.properties) == null ? void 0 : n.wind) == null ? void 0 : d.spd) >= 17.2 && ((u = (b = Q.properties) == null ? void 0 : b.wind) == null ? void 0 : u.spd) < 24.5 ? q = "#f2f202" : ((w = (A = Q.properties) == null ? void 0 : A.wind) == null ? void 0 : w.spd) >= 24.5 && ((v = (m = Q.properties) == null ? void 0 : m.wind) == null ? void 0 : v.spd) < 32.7 ? q = "#ff9100" : ((L = (y = Q.properties) == null ? void 0 : y.wind) == null ? void 0 : L.spd) >= 32.7 && ((M = (P = Q.properties) == null ? void 0 : P.wind) == null ? void 0 : M.spd) < 41.5 ? q = "#f44336" : ((j = (I = Q.properties) == null ? void 0 : I.wind) == null ? void 0 : j.spd) >= 41.5 && ((Y = (W = Q.properties) == null ? void 0 : W.wind) == null ? void 0 : Y.spd) < 51 ? q = "#f903d0" : ((V = (K = Q.properties) == null ? void 0 : K.wind) == null ? void 0 : V.spd) >= 51 ? q = "#8702f9" : q = "#f44336";
|
|
4540
4540
|
const ye = `<svg t="1719918955501"
|
|
4541
4541
|
class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" p-id="18382"
|
|
4542
4542
|
xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
|
|
@@ -4570,16 +4570,16 @@ const Da = {
|
|
|
4570
4570
|
(ue = this.map) != null && ue.getSource(this.interpolateSource) && ((ge = this.map) == null || ge.getSource(this.interpolateSource).setData(this.empty));
|
|
4571
4571
|
},
|
|
4572
4572
|
handleClick(t) {
|
|
4573
|
-
var o,
|
|
4574
|
-
const e = t.features[0], a = (
|
|
4573
|
+
var o, l, c, h, p, n, d, b;
|
|
4574
|
+
const e = t.features[0], a = (l = (o = this.tropicals) == null ? void 0 : o.data) == null ? void 0 : l.features.filter(
|
|
4575
4575
|
(u) => {
|
|
4576
4576
|
var A;
|
|
4577
4577
|
return u.geometry.type === "LineString" && u.properties.type === "forecast" && u.properties.name === ((A = e == null ? void 0 : e.properties) == null ? void 0 : A.name);
|
|
4578
4578
|
}
|
|
4579
4579
|
);
|
|
4580
4580
|
a.sort((u, A) => {
|
|
4581
|
-
var w, m, v,
|
|
4582
|
-
return ((w = u.properties) == null ? void 0 : w.model) === "cma" ? -1 : ((m = u.properties) == null ? void 0 : m.model) === "jma" ? ((v = A.properties) == null ? void 0 : v.model) === "cma" ? 1 : -1 : u.properties.model === "ecmwf" ? ["jma", "cma"].includes((
|
|
4581
|
+
var w, m, v, y;
|
|
4582
|
+
return ((w = u.properties) == null ? void 0 : w.model) === "cma" ? -1 : ((m = u.properties) == null ? void 0 : m.model) === "jma" ? ((v = A.properties) == null ? void 0 : v.model) === "cma" ? 1 : -1 : u.properties.model === "ecmwf" ? ["jma", "cma"].includes((y = A.properties) == null ? void 0 : y.model) ? 1 : -1 : 0;
|
|
4583
4583
|
});
|
|
4584
4584
|
const r = (h = (c = this.tropicals) == null ? void 0 : c.data) == null ? void 0 : h.features.filter(
|
|
4585
4585
|
(u) => {
|
|
@@ -4590,21 +4590,21 @@ const Da = {
|
|
|
4590
4590
|
this.activeTropicals = {
|
|
4591
4591
|
name: (p = e == null ? void 0 : e.properties) == null ? void 0 : p.name,
|
|
4592
4592
|
forecasts: a.map((u) => u.properties),
|
|
4593
|
-
history: (
|
|
4593
|
+
history: (n = r[0]) == null ? void 0 : n.properties,
|
|
4594
4594
|
showCircle: (b = (d = a[0]) == null ? void 0 : d.properties) == null ? void 0 : b.showCircle
|
|
4595
4595
|
}, this.showTropicals = !0;
|
|
4596
4596
|
const i = document.getElementById("active-tropical");
|
|
4597
4597
|
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);
|
|
4598
4598
|
},
|
|
4599
4599
|
handleForecastToggle(t) {
|
|
4600
|
-
var r, i, o,
|
|
4600
|
+
var r, i, o, l, c, h;
|
|
4601
4601
|
t.disabled = !t.disabled;
|
|
4602
4602
|
const e = `${t.name}-${t.model}`, a = (i = (r = this.map) == null ? void 0 : r.getSource(this.source)._data) == null ? void 0 : i.features;
|
|
4603
4603
|
a.forEach((p) => {
|
|
4604
4604
|
p.properties.category === e && (p.properties.disabled = t.disabled);
|
|
4605
4605
|
}), this.interpolateData.forEach((p) => {
|
|
4606
4606
|
p.properties.category === e && (p.properties.disabled = t.disabled);
|
|
4607
|
-
}), (
|
|
4607
|
+
}), (l = (o = this.map) == null ? void 0 : o.getSource(this.source)) == null || l.setData(D.featureCollection(a)), (h = (c = this.map) == null ? void 0 : c.getSource(this.clusterSource)) == null || h.setData(D.featureCollection(a)), this.handleDateChange();
|
|
4608
4608
|
},
|
|
4609
4609
|
handleStrikeProbability(t) {
|
|
4610
4610
|
this.$emit("tropicalProbability", t);
|
|
@@ -4643,12 +4643,12 @@ const Da = {
|
|
|
4643
4643
|
nw: r.r7nw >= 0 ? r.r7nw : void 0
|
|
4644
4644
|
}, o = this.handleComputeArc(a.geometry.coordinates, i, { ...a.properties, level: 7 });
|
|
4645
4645
|
e.push(o);
|
|
4646
|
-
const
|
|
4646
|
+
const l = {
|
|
4647
4647
|
ne: r.r10ne >= 0 ? r.r10ne : void 0,
|
|
4648
4648
|
se: r.r10se >= 0 ? r.r10se : void 0,
|
|
4649
4649
|
sw: r.r10sw >= 0 ? r.r10sw : void 0,
|
|
4650
4650
|
nw: r.r10nw >= 0 ? r.r10nw : void 0
|
|
4651
|
-
}, c = this.handleComputeArc(a.geometry.coordinates,
|
|
4651
|
+
}, c = this.handleComputeArc(a.geometry.coordinates, l, { ...a.properties, level: 10 });
|
|
4652
4652
|
e.push(c);
|
|
4653
4653
|
}
|
|
4654
4654
|
return e;
|
|
@@ -4656,10 +4656,10 @@ const Da = {
|
|
|
4656
4656
|
handleComputeArc(t, e, a) {
|
|
4657
4657
|
var o;
|
|
4658
4658
|
const r = [];
|
|
4659
|
-
for (const
|
|
4660
|
-
const c = e[
|
|
4659
|
+
for (const l in e) {
|
|
4660
|
+
const c = e[l] ?? 0;
|
|
4661
4661
|
let h;
|
|
4662
|
-
switch (
|
|
4662
|
+
switch (l) {
|
|
4663
4663
|
case "ne":
|
|
4664
4664
|
h = D.lineArc(t, c * 1.852, 0, 90, { steps: c > 0 ? 64 : 1 });
|
|
4665
4665
|
break;
|
|
@@ -4696,16 +4696,16 @@ const Da = {
|
|
|
4696
4696
|
style: { "justify-content": "flex-start" }
|
|
4697
4697
|
}, Ra = { class: "forecast-models" }, Fa = ["onClick"], Ga = { class: "more" };
|
|
4698
4698
|
function Wa(t, e, a, r, i, o) {
|
|
4699
|
-
var
|
|
4700
|
-
return fe((g(),
|
|
4699
|
+
var l, c, h, p, n, d, b, u, A, w, m, v, y, L, P;
|
|
4700
|
+
return fe((g(), f("div", Pa, [
|
|
4701
4701
|
s("div", ka, [
|
|
4702
4702
|
s("div", {
|
|
4703
4703
|
class: "iconfont close-btn",
|
|
4704
4704
|
onClick: e[0] || (e[0] = (M) => i.showTropicals = !1)
|
|
4705
4705
|
}, ""),
|
|
4706
4706
|
s("div", za, [
|
|
4707
|
-
(c = (
|
|
4708
|
-
U(B((
|
|
4707
|
+
(c = (l = i.activeTropicals) == null ? void 0 : l.history) != null && c.level ? (g(), f("span", Ma, B((p = (h = i.activeTropicals) == null ? void 0 : h.history) == null ? void 0 : p.level) + " , ", 1)) : O("", !0),
|
|
4708
|
+
U(B((n = i.activeTropicals) == null ? void 0 : n.name), 1)
|
|
4709
4709
|
]),
|
|
4710
4710
|
s("div", Ta, " Last update: " + B(o.computeTime(((b = (d = i.activeTropicals) == null ? void 0 : d.history) == null ? void 0 : b.updated) || ((w = (A = (u = i.activeTropicals) == null ? void 0 : u.forecasts) == null ? void 0 : A.filter((M) => !M.disabled)[0]) == null ? void 0 : w.date))), 1)
|
|
4711
4711
|
]),
|
|
@@ -4718,16 +4718,16 @@ function Wa(t, e, a, r, i, o) {
|
|
|
4718
4718
|
]),
|
|
4719
4719
|
s("div", Oa, [
|
|
4720
4720
|
e[3] || (e[3] = s("label", null, "Pressure : ", -1)),
|
|
4721
|
-
s("span", null, B(((L = (
|
|
4721
|
+
s("span", null, B(((L = (y = i.activeTropicals) == null ? void 0 : y.history) == null ? void 0 : L.pressure) || "-") + "[hPa]", 1)
|
|
4722
4722
|
])
|
|
4723
4723
|
]),
|
|
4724
4724
|
s("div", Na, [
|
|
4725
4725
|
s("div", ja, [
|
|
4726
4726
|
e[4] || (e[4] = s("label", { style: { width: "max-content" } }, "Forecast Models : ", -1)),
|
|
4727
4727
|
s("div", Ra, [
|
|
4728
|
-
(g(!0),
|
|
4728
|
+
(g(!0), f(_, null, N((P = i.activeTropicals) == null ? void 0 : P.forecasts, (M, I) => {
|
|
4729
4729
|
var j, W, Y, K;
|
|
4730
|
-
return g(),
|
|
4730
|
+
return g(), f("div", {
|
|
4731
4731
|
key: I,
|
|
4732
4732
|
class: H([
|
|
4733
4733
|
"model",
|
|
@@ -4861,8 +4861,8 @@ const Ua = {
|
|
|
4861
4861
|
}
|
|
4862
4862
|
}, Ya = { key: 0 };
|
|
4863
4863
|
function Ka(t, e, a, r, i, o) {
|
|
4864
|
-
var
|
|
4865
|
-
return (
|
|
4864
|
+
var l;
|
|
4865
|
+
return (l = a.factor) != null && l.active ? (g(), f("div", Ya, [
|
|
4866
4866
|
s("div", {
|
|
4867
4867
|
class: "legend-bars flex-center",
|
|
4868
4868
|
style: J([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
@@ -4975,8 +4975,8 @@ const Ja = {
|
|
|
4975
4975
|
}
|
|
4976
4976
|
}, qa = { key: 0 };
|
|
4977
4977
|
function Va(t, e, a, r, i, o) {
|
|
4978
|
-
var
|
|
4979
|
-
return (
|
|
4978
|
+
var l;
|
|
4979
|
+
return (l = a.factor) != null && l.active ? (g(), f("div", qa, [
|
|
4980
4980
|
s("div", {
|
|
4981
4981
|
class: "legend-bars flex-center",
|
|
4982
4982
|
style: J([{ position: "absolute" }, { right: t.right + "px", bottom: a.bottom }])
|
|
@@ -5095,8 +5095,8 @@ const $a = {
|
|
|
5095
5095
|
}
|
|
5096
5096
|
}, ei = { key: 0 };
|
|
5097
5097
|
function ti(t, e, a, r, i, o) {
|
|
5098
|
-
var
|
|
5099
|
-
return (
|
|
5098
|
+
var l;
|
|
5099
|
+
return (l = a.factor) != null && l.active ? (g(), f("div", ei, [
|
|
5100
5100
|
s("div", {
|
|
5101
5101
|
class: "legend-bars flex-center",
|
|
5102
5102
|
style: J([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
@@ -5218,8 +5218,8 @@ const ii = {
|
|
|
5218
5218
|
}
|
|
5219
5219
|
}, ri = { key: 0 };
|
|
5220
5220
|
function oi(t, e, a, r, i, o) {
|
|
5221
|
-
var
|
|
5222
|
-
return (
|
|
5221
|
+
var l;
|
|
5222
|
+
return (l = a.factor) != null && l.active ? (g(), f("div", ri, [
|
|
5223
5223
|
s("div", {
|
|
5224
5224
|
class: "legend-bars flex-center",
|
|
5225
5225
|
style: J([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
@@ -5334,8 +5334,8 @@ const ni = {
|
|
|
5334
5334
|
}
|
|
5335
5335
|
}, li = { key: 0 };
|
|
5336
5336
|
function ci(t, e, a, r, i, o) {
|
|
5337
|
-
var
|
|
5338
|
-
return (
|
|
5337
|
+
var l;
|
|
5338
|
+
return (l = a.factor) != null && l.active ? (g(), f("div", li, [
|
|
5339
5339
|
s("div", {
|
|
5340
5340
|
class: "legend-bars flex-center",
|
|
5341
5341
|
style: J([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
@@ -5355,7 +5355,7 @@ var di = /* @__PURE__ */ ut({
|
|
|
5355
5355
|
name: "LocationFilled",
|
|
5356
5356
|
__name: "location-filled",
|
|
5357
5357
|
setup(t) {
|
|
5358
|
-
return (e, a) => (g(),
|
|
5358
|
+
return (e, a) => (g(), f("svg", {
|
|
5359
5359
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5360
5360
|
viewBox: "0 0 1024 1024"
|
|
5361
5361
|
}, [
|
|
@@ -5479,8 +5479,8 @@ const ui = {
|
|
|
5479
5479
|
if (this.showMeteo && this.ts) {
|
|
5480
5480
|
const e = F(), a = (t = F(this.ts)) == null ? void 0 : t.diff(e, "d", !0), i = [0, 1, 2, 3, 4, 5, 6, 7].every((o) => {
|
|
5481
5481
|
var c;
|
|
5482
|
-
const
|
|
5483
|
-
return (c = We.pickHourly(this.meteoData,
|
|
5482
|
+
const l = Ge(this.ts).tz(this.positionGmt).add(3 * o, "h").format();
|
|
5483
|
+
return (c = We.pickHourly(this.meteoData, l)) == null ? void 0 : c[0];
|
|
5484
5484
|
});
|
|
5485
5485
|
if (this.meteoData && i ? this.initTableData(this.meteoData) : (this.loading || (a >= 0 ? await this.fetchMeteoData(this.point, this.ts, 7) : await this.fetchHistoryData(this.point, this.ts)), this.initTableData(this.meteoData)), this.activeIndex === 4) {
|
|
5486
5486
|
const o = Ye.pickDailyExtremes(this.tideData, this.ts);
|
|
@@ -5527,14 +5527,14 @@ const ui = {
|
|
|
5527
5527
|
this.loading = !0, this.meteoData = [];
|
|
5528
5528
|
let r = e ? F(e).utc().format() : F().utc().format();
|
|
5529
5529
|
const { weatherModels: i, marineModels: o } = We.autoPickMeteoModel(this.forecastModel);
|
|
5530
|
-
let
|
|
5530
|
+
let l = {
|
|
5531
5531
|
lat: t.lat,
|
|
5532
5532
|
lng: t.lng,
|
|
5533
5533
|
datetime: r,
|
|
5534
5534
|
forecastDays: a ?? 7,
|
|
5535
5535
|
weatherModels: i,
|
|
5536
5536
|
marineModels: o
|
|
5537
|
-
}, c = await le.post(`${this.gateway}/api/arc/meteo2/spot/forecast`,
|
|
5537
|
+
}, c = await le.post(`${this.gateway}/api/arc/meteo2/spot/forecast`, l, {
|
|
5538
5538
|
headers: {
|
|
5539
5539
|
Authorization: this.token || this.defaultMeteoToken
|
|
5540
5540
|
}
|
|
@@ -5551,17 +5551,17 @@ const ui = {
|
|
|
5551
5551
|
pastDays: 1,
|
|
5552
5552
|
weatherModels: r,
|
|
5553
5553
|
marineModels: i
|
|
5554
|
-
},
|
|
5554
|
+
}, l = await le.post(`${this.gateway}/api/arc/meteo2/spot/forecast`, o, {
|
|
5555
5555
|
headers: {
|
|
5556
5556
|
Authorization: this.token || this.defaultMeteoToken
|
|
5557
5557
|
}
|
|
5558
5558
|
});
|
|
5559
|
-
(
|
|
5559
|
+
(l == null ? void 0 : l.data.code) === 0 && (this.meteoData = l == null ? void 0 : l.data.data, this.loading = !1);
|
|
5560
5560
|
},
|
|
5561
5561
|
initTableData(t) {
|
|
5562
|
-
var e, a, r, i, o,
|
|
5563
|
-
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 = (
|
|
5564
|
-
var d, b, u, A, w, m, v,
|
|
5562
|
+
var e, a, r, i, o, l, c, h, p;
|
|
5563
|
+
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, F(this.ts))) == null ? void 0 : c[0], ((p = (h = this.currentHourData) == null ? void 0 : h.weather) == null ? void 0 : p.isDay) === 0 ? this.isDay = !1 : this.isDay = !0, this.$nextTick(() => {
|
|
5564
|
+
var d, b, u, A, w, m, v, y, L, P, M, I, j, W, Y, K, V, ee, ce, he, de, pe, me, ue, ge, te, oe, Ae, ie, Q, q, ye, re;
|
|
5565
5565
|
if (!document.getElementById("meteoMainBox"))
|
|
5566
5566
|
return !1;
|
|
5567
5567
|
if (!this.currentHourData)
|
|
@@ -5570,7 +5570,7 @@ const ui = {
|
|
|
5570
5570
|
const ne = Ge(this.ts).tz(this.positionGmt).add(3 * se, "h").format();
|
|
5571
5571
|
this.tableData.hours.push(ne);
|
|
5572
5572
|
const x = ((d = We.pickHourly(t, ne)) == null ? void 0 : d[0]) || {};
|
|
5573
|
-
this.tableData.temp.push(this.roundPrecision((b = x == null ? void 0 : x.weather) == null ? void 0 : b.temp, 0) ?? "-"), this.tableData.precipProbability.push(this.roundPrecision((A = (u = x == null ? void 0 : x.weather) == null ? void 0 : u.precip) == null ? void 0 : A.probability, 0) ?? "-"), this.tableData.precip1h.push(this.roundPrecision((m = (w = x == null ? void 0 : x.weather) == null ? void 0 : w.precip) == null ? void 0 : m.sum, 0) ?? "-"), this.tableData.visibility.push(this.roundPrecision((v = x == null ? void 0 : x.weather) == null ? void 0 : v.visibility, 0) ?? "-"), this.tableData.windSpeed.push(this.roundPrecision((L = (
|
|
5573
|
+
this.tableData.temp.push(this.roundPrecision((b = x == null ? void 0 : x.weather) == null ? void 0 : b.temp, 0) ?? "-"), this.tableData.precipProbability.push(this.roundPrecision((A = (u = x == null ? void 0 : x.weather) == null ? void 0 : u.precip) == null ? void 0 : A.probability, 0) ?? "-"), this.tableData.precip1h.push(this.roundPrecision((m = (w = x == null ? void 0 : x.weather) == null ? void 0 : w.precip) == null ? void 0 : m.sum, 0) ?? "-"), this.tableData.visibility.push(this.roundPrecision((v = x == null ? void 0 : x.weather) == null ? void 0 : v.visibility, 0) ?? "-"), this.tableData.windSpeed.push(this.roundPrecision((L = (y = x == null ? void 0 : x.weather) == null ? void 0 : y.wind) == null ? void 0 : L.kts, 1) ?? "-"), this.tableData.windDir.push((M = (P = x == null ? void 0 : x.weather) == null ? void 0 : P.wind) == null ? void 0 : M.bearing), this.tableData.windGust.push(this.roundPrecision((j = (I = x == null ? void 0 : x.weather) == null ? void 0 : I.wind) == null ? void 0 : j.gusts, 1) ?? "-"), this.tableData.sigwaveHeight.push(this.roundPrecision((Y = (W = x == null ? void 0 : x.wave) == null ? void 0 : W.sig) == null ? void 0 : Y.height, 1) ?? "-"), this.tableData.sigwaveDir.push((V = (K = x == null ? void 0 : x.wave) == null ? void 0 : K.sig) == null ? void 0 : V.bearing), this.tableData.windwaveHeight.push(this.roundPrecision((ce = (ee = x == null ? void 0 : x.wave) == null ? void 0 : ee.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((me = (pe = x == null ? void 0 : x.wave) == null ? void 0 : pe.wd) == null ? void 0 : me.period, 1) ?? "-"), this.tableData.swellHeight.push(this.roundPrecision((ge = (ue = x == null ? void 0 : x.wave) == null ? void 0 : ue.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((Q = x == null ? void 0 : x.current) == null ? void 0 : Q.speed, 1) ?? "-"), this.tableData.currentDir.push((q = x == null ? void 0 : x.current) == null ? void 0 : q.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((ye = x == null ? void 0 : x.weather) == null ? void 0 : ye.url), this.tableData.weatherNames.push(((re = x == null ? void 0 : x.weather) == null ? void 0 : re.name) ?? "-");
|
|
5574
5574
|
}
|
|
5575
5575
|
});
|
|
5576
5576
|
},
|
|
@@ -5620,8 +5620,8 @@ const ui = {
|
|
|
5620
5620
|
});
|
|
5621
5621
|
if ((o == null ? void 0 : o.data.code) === 0) {
|
|
5622
5622
|
this.tideData = (o == null ? void 0 : o.data.data) || {}, this.tideLoading = !1;
|
|
5623
|
-
const
|
|
5624
|
-
this.tideTableData =
|
|
5623
|
+
const l = Ye.pickDailyExtremes(this.tideData, this.ts);
|
|
5624
|
+
this.tideTableData = l;
|
|
5625
5625
|
}
|
|
5626
5626
|
},
|
|
5627
5627
|
handleBind() {
|
|
@@ -5693,26 +5693,26 @@ const ui = {
|
|
|
5693
5693
|
class: "main-box flex-center"
|
|
5694
5694
|
};
|
|
5695
5695
|
function Br(t, e, a, r, i, o) {
|
|
5696
|
-
var p,
|
|
5697
|
-
const
|
|
5698
|
-
return fe((g(),
|
|
5696
|
+
var p, n, d, b, u, A, w, m, v, y, L, P, M, I, j, W, Y, K, V, ee, ce, he, de, pe, me, ue, ge, te, oe, Ae, ie, Q, q, ye, re, se, ne, x, Le, xe, Be, Ie, Ee, De, Pe, ke, ze, Me, Te, Qe, Se, _e, He, Oe, Ne, je, Re, Fe, X, qe, Ve, Ze, $e, et, tt, at, it, rt;
|
|
5697
|
+
const l = z("LocationFilled"), c = z("ElIcon"), h = z("ElTooltip");
|
|
5698
|
+
return fe((g(), f("div", gi, [
|
|
5699
5699
|
s("div", Ai, [
|
|
5700
5700
|
s("div", yi, [
|
|
5701
5701
|
s("div", fi, [
|
|
5702
5702
|
k(c, { size: "22" }, {
|
|
5703
5703
|
default: ae(() => [
|
|
5704
|
-
k(
|
|
5704
|
+
k(l)
|
|
5705
5705
|
]),
|
|
5706
5706
|
_: 1
|
|
5707
5707
|
}),
|
|
5708
|
-
s("div", wi, B(o.computeLat((p = i.point) == null ? void 0 : p.lat)) + "," + B(o.computeLng((
|
|
5708
|
+
s("div", wi, B(o.computeLat((p = i.point) == null ? void 0 : p.lat)) + "," + B(o.computeLng((n = i.point) == null ? void 0 : n.lng)), 1)
|
|
5709
5709
|
]),
|
|
5710
5710
|
s("div", bi, [
|
|
5711
|
-
i.showTables ? (g(),
|
|
5711
|
+
i.showTables ? (g(), f("div", {
|
|
5712
5712
|
key: 0,
|
|
5713
5713
|
class: "iconfont toggle",
|
|
5714
5714
|
onClick: e[0] || (e[0] = (C) => i.showTables = !i.showTables)
|
|
5715
|
-
}, "")) : (g(),
|
|
5715
|
+
}, "")) : (g(), f("div", {
|
|
5716
5716
|
key: 1,
|
|
5717
5717
|
class: "iconfont toggle",
|
|
5718
5718
|
onClick: e[1] || (e[1] = (C) => i.showTables = !i.showTables)
|
|
@@ -5723,9 +5723,9 @@ function Br(t, e, a, r, i, o) {
|
|
|
5723
5723
|
}, "")
|
|
5724
5724
|
])
|
|
5725
5725
|
]),
|
|
5726
|
-
i.loading ? (g(),
|
|
5726
|
+
i.loading ? (g(), f("div", xr, e[42] || (e[42] = [
|
|
5727
5727
|
s("img", { src: mi }, null, -1)
|
|
5728
|
-
]))) : (g(),
|
|
5728
|
+
]))) : (g(), f("div", {
|
|
5729
5729
|
key: 0,
|
|
5730
5730
|
class: H(["main-box", i.isDay ? "day-bg" : "night-bg"]),
|
|
5731
5731
|
id: "meteoMainBox"
|
|
@@ -5741,12 +5741,12 @@ function Br(t, e, a, r, i, o) {
|
|
|
5741
5741
|
default: ae(() => {
|
|
5742
5742
|
var C, E, ot, st;
|
|
5743
5743
|
return [
|
|
5744
|
-
(E = (C = i.currentHourData) == null ? void 0 : C.weather) != null && E.url ? (g(),
|
|
5744
|
+
(E = (C = i.currentHourData) == null ? void 0 : C.weather) != null && E.url ? (g(), f("img", {
|
|
5745
5745
|
key: 0,
|
|
5746
5746
|
class: "iconfont icon",
|
|
5747
5747
|
style: { "margin-right": "5px" },
|
|
5748
5748
|
src: (st = (ot = i.currentHourData) == null ? void 0 : ot.weather) == null ? void 0 : st.url
|
|
5749
|
-
}, null, 8, Ci)) : (g(),
|
|
5749
|
+
}, null, 8, Ci)) : (g(), f("span", xi))
|
|
5750
5750
|
];
|
|
5751
5751
|
}),
|
|
5752
5752
|
_: 1
|
|
@@ -5764,7 +5764,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
5764
5764
|
]),
|
|
5765
5765
|
s("div", Di, [
|
|
5766
5766
|
e[10] || (e[10] = s("label", null, "Visibility : ", -1)),
|
|
5767
|
-
s("span", null, B(o.roundPrecision((L = (
|
|
5767
|
+
s("span", null, B(o.roundPrecision((L = (y = i.currentHourData) == null ? void 0 : y.weather) == null ? void 0 : L.visibility, 0)) + " nm", 1)
|
|
5768
5768
|
]),
|
|
5769
5769
|
s("div", Pi, [
|
|
5770
5770
|
e[11] || (e[11] = s("label", null, "Wind : ", -1)),
|
|
@@ -5806,7 +5806,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
5806
5806
|
U("Hours"),
|
|
5807
5807
|
s("span", { class: "unit" }, "(LT)")
|
|
5808
5808
|
], -1)),
|
|
5809
|
-
(g(!0),
|
|
5809
|
+
(g(!0), f(_, null, N(i.tableData.hours, (C) => (g(), f("th", {
|
|
5810
5810
|
rowspan: "1",
|
|
5811
5811
|
colspan: "1",
|
|
5812
5812
|
key: `HourL${C}`
|
|
@@ -5821,7 +5821,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
5821
5821
|
U("UTC"),
|
|
5822
5822
|
s("span", { class: "unit" })
|
|
5823
5823
|
], -1)),
|
|
5824
|
-
(g(!0),
|
|
5824
|
+
(g(!0), f(_, null, N(i.tableData.hours, (C) => (g(), f("th", {
|
|
5825
5825
|
rowspan: "1",
|
|
5826
5826
|
colspan: "1",
|
|
5827
5827
|
key: `HourZ${C}`
|
|
@@ -5833,7 +5833,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
5833
5833
|
colspan: "1",
|
|
5834
5834
|
class: "tr-title"
|
|
5835
5835
|
}, null, -1)),
|
|
5836
|
-
(g(!0),
|
|
5836
|
+
(g(!0), f(_, null, N(i.tableData.weatherUrls, (C, E) => (g(), f("th", {
|
|
5837
5837
|
rowspan: "1",
|
|
5838
5838
|
colspan: "1",
|
|
5839
5839
|
key: `weatherUrls${E}${C}`
|
|
@@ -5845,7 +5845,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
5845
5845
|
"show-after": 500
|
|
5846
5846
|
}, {
|
|
5847
5847
|
default: ae(() => [
|
|
5848
|
-
C ? (g(),
|
|
5848
|
+
C ? (g(), f("img", {
|
|
5849
5849
|
key: 0,
|
|
5850
5850
|
class: "iconfont weather-icon",
|
|
5851
5851
|
src: C
|
|
@@ -5864,7 +5864,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
5864
5864
|
U("Temp"),
|
|
5865
5865
|
s("span", { class: "unit" }, "°C")
|
|
5866
5866
|
], -1)),
|
|
5867
|
-
(g(!0),
|
|
5867
|
+
(g(!0), f(_, null, N(i.tableData.temp, (C, E) => (g(), f("td", {
|
|
5868
5868
|
rowspan: "1",
|
|
5869
5869
|
colspan: "1",
|
|
5870
5870
|
key: `weatherUrls${E}${C}`
|
|
@@ -5879,7 +5879,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
5879
5879
|
U("Precip"),
|
|
5880
5880
|
s("span", { class: "unit" }, "mm")
|
|
5881
5881
|
], -1)),
|
|
5882
|
-
(g(!0),
|
|
5882
|
+
(g(!0), f(_, null, N(i.tableData.precip1h, (C, E) => (g(), f("td", {
|
|
5883
5883
|
rowspan: "1",
|
|
5884
5884
|
colspan: "1",
|
|
5885
5885
|
key: `precip1h${E}${C}`
|
|
@@ -5894,7 +5894,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
5894
5894
|
U("Visibility"),
|
|
5895
5895
|
s("span", { class: "unit" }, "nm")
|
|
5896
5896
|
], -1)),
|
|
5897
|
-
(g(!0),
|
|
5897
|
+
(g(!0), f(_, null, N(i.tableData.visibility, (C, E) => (g(), f("td", {
|
|
5898
5898
|
rowspan: "1",
|
|
5899
5899
|
colspan: "1",
|
|
5900
5900
|
key: `visibility${E}${C}`
|
|
@@ -5909,12 +5909,12 @@ function Br(t, e, a, r, i, o) {
|
|
|
5909
5909
|
U("Wind gust"),
|
|
5910
5910
|
s("span", { class: "unit" }, "kts")
|
|
5911
5911
|
], -1)),
|
|
5912
|
-
(g(!0),
|
|
5912
|
+
(g(!0), f(_, null, N(i.tableData.windGust, (C, E) => (g(), f("td", {
|
|
5913
5913
|
rowspan: "1",
|
|
5914
5914
|
colspan: "1",
|
|
5915
5915
|
key: `windGust${E}${C}`
|
|
5916
5916
|
}, [
|
|
5917
|
-
isNaN(i.tableData.windDir[E]) ? O("", !0) : (g(),
|
|
5917
|
+
isNaN(i.tableData.windDir[E]) ? O("", !0) : (g(), f("span", {
|
|
5918
5918
|
key: 0,
|
|
5919
5919
|
class: "iconfont icon blue",
|
|
5920
5920
|
style: J({ display: "inline-block", transform: `rotate(${i.tableData.windDir[E]}deg)` })
|
|
@@ -5935,7 +5935,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
5935
5935
|
U("Hours"),
|
|
5936
5936
|
s("span", { class: "unit" }, "(LT)")
|
|
5937
5937
|
], -1)),
|
|
5938
|
-
(g(!0),
|
|
5938
|
+
(g(!0), f(_, null, N(i.tableData.hours, (C, E) => (g(), f("th", {
|
|
5939
5939
|
rowspan: "1",
|
|
5940
5940
|
colspan: "1",
|
|
5941
5941
|
key: `currenthoursL${E}${C}`
|
|
@@ -5950,7 +5950,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
5950
5950
|
U("UTC"),
|
|
5951
5951
|
s("span", { class: "unit" })
|
|
5952
5952
|
], -1)),
|
|
5953
|
-
(g(!0),
|
|
5953
|
+
(g(!0), f(_, null, N(i.tableData.hours, (C, E) => (g(), f("th", {
|
|
5954
5954
|
rowspan: "1",
|
|
5955
5955
|
colspan: "1",
|
|
5956
5956
|
key: `currenthoursZ${E}${C}`
|
|
@@ -5965,12 +5965,12 @@ function Br(t, e, a, r, i, o) {
|
|
|
5965
5965
|
U("Wind"),
|
|
5966
5966
|
s("span", { class: "unit" }, "kts")
|
|
5967
5967
|
], -1)),
|
|
5968
|
-
(g(!0),
|
|
5968
|
+
(g(!0), f(_, null, N(i.tableData.windSpeed, (C, E) => (g(), f("td", {
|
|
5969
5969
|
rowspan: "1",
|
|
5970
5970
|
colspan: "1",
|
|
5971
5971
|
key: `windSpeed${E}${C}`
|
|
5972
5972
|
}, [
|
|
5973
|
-
isNaN(i.tableData.windDir[E]) ? O("", !0) : (g(),
|
|
5973
|
+
isNaN(i.tableData.windDir[E]) ? O("", !0) : (g(), f("span", {
|
|
5974
5974
|
key: 0,
|
|
5975
5975
|
class: "iconfont icon wind",
|
|
5976
5976
|
style: J({ display: "inline-block", transform: `rotate(${i.tableData.windDir[E]}deg)` })
|
|
@@ -5987,12 +5987,12 @@ function Br(t, e, a, r, i, o) {
|
|
|
5987
5987
|
U("Sig Wave"),
|
|
5988
5988
|
s("span", { class: "unit" }, "m")
|
|
5989
5989
|
], -1)),
|
|
5990
|
-
(g(!0),
|
|
5990
|
+
(g(!0), f(_, null, N(i.tableData.sigwaveHeight, (C, E) => (g(), f("td", {
|
|
5991
5991
|
rowspan: "1",
|
|
5992
5992
|
colspan: "1",
|
|
5993
5993
|
key: `sigwaveHeight${E}${C}`
|
|
5994
5994
|
}, [
|
|
5995
|
-
isNaN(i.tableData.sigwaveDir[E]) ? O("", !0) : (g(),
|
|
5995
|
+
isNaN(i.tableData.sigwaveDir[E]) ? O("", !0) : (g(), f("span", {
|
|
5996
5996
|
key: 0,
|
|
5997
5997
|
class: "iconfont icon sigwave",
|
|
5998
5998
|
style: J({ display: "inline-block", transform: `rotate(${i.tableData.sigwaveDir[E]}deg)` })
|
|
@@ -6009,12 +6009,12 @@ function Br(t, e, a, r, i, o) {
|
|
|
6009
6009
|
U("Wind Wave"),
|
|
6010
6010
|
s("span", { class: "unit" }, "m")
|
|
6011
6011
|
], -1)),
|
|
6012
|
-
(g(!0),
|
|
6012
|
+
(g(!0), f(_, null, N(i.tableData.windwaveHeight, (C, E) => (g(), f("td", {
|
|
6013
6013
|
rowspan: "1",
|
|
6014
6014
|
colspan: "1",
|
|
6015
6015
|
key: `windwaveHeight${E}${C}`
|
|
6016
6016
|
}, [
|
|
6017
|
-
isNaN(i.tableData.sigwaveDir[E]) ? O("", !0) : (g(),
|
|
6017
|
+
isNaN(i.tableData.sigwaveDir[E]) ? O("", !0) : (g(), f("span", {
|
|
6018
6018
|
key: 0,
|
|
6019
6019
|
class: "iconfont icon windwave",
|
|
6020
6020
|
style: J({ display: "inline-block", transform: `rotate(${i.tableData.windwaveDir[E]}deg)` })
|
|
@@ -6031,12 +6031,12 @@ function Br(t, e, a, r, i, o) {
|
|
|
6031
6031
|
U("Swell"),
|
|
6032
6032
|
s("span", { class: "unit" }, "m")
|
|
6033
6033
|
], -1)),
|
|
6034
|
-
(g(!0),
|
|
6034
|
+
(g(!0), f(_, null, N(i.tableData.swellHeight, (C, E) => (g(), f("td", {
|
|
6035
6035
|
rowspan: "1",
|
|
6036
6036
|
colspan: "1",
|
|
6037
6037
|
key: `swellHeight${E}${C}`
|
|
6038
6038
|
}, [
|
|
6039
|
-
isNaN(i.tableData.swellDir[E]) ? O("", !0) : (g(),
|
|
6039
|
+
isNaN(i.tableData.swellDir[E]) ? O("", !0) : (g(), f("span", {
|
|
6040
6040
|
key: 0,
|
|
6041
6041
|
class: "iconfont icon swell",
|
|
6042
6042
|
style: J({ display: "inline-block", transform: `rotate(${i.tableData.swellDir[E]}deg)` })
|
|
@@ -6053,12 +6053,12 @@ function Br(t, e, a, r, i, o) {
|
|
|
6053
6053
|
U("Current"),
|
|
6054
6054
|
s("span", { class: "unit" }, "kts")
|
|
6055
6055
|
], -1)),
|
|
6056
|
-
(g(!0),
|
|
6056
|
+
(g(!0), f(_, null, N(i.tableData.currentSpeed, (C, E) => (g(), f("td", {
|
|
6057
6057
|
rowspan: "1",
|
|
6058
6058
|
colspan: "1",
|
|
6059
6059
|
key: `currentSpeed${E}${C}`
|
|
6060
6060
|
}, [
|
|
6061
|
-
isNaN(i.tableData.currentDir[E]) ? O("", !0) : (g(),
|
|
6061
|
+
isNaN(i.tableData.currentDir[E]) ? O("", !0) : (g(), f("span", {
|
|
6062
6062
|
key: 0,
|
|
6063
6063
|
class: "iconfont icon current",
|
|
6064
6064
|
id: "meteoGrayIcon",
|
|
@@ -6080,7 +6080,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
6080
6080
|
U("Hours"),
|
|
6081
6081
|
s("span", { class: "unit" }, "(LT)")
|
|
6082
6082
|
], -1)),
|
|
6083
|
-
(g(!0),
|
|
6083
|
+
(g(!0), f(_, null, N(i.tableData.hours, (C, E) => (g(), f("th", {
|
|
6084
6084
|
rowspan: "1",
|
|
6085
6085
|
colspan: "1",
|
|
6086
6086
|
key: `seahoursL${E}${C}`
|
|
@@ -6095,7 +6095,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
6095
6095
|
U("UTC"),
|
|
6096
6096
|
s("span", { class: "unit" })
|
|
6097
6097
|
], -1)),
|
|
6098
|
-
(g(!0),
|
|
6098
|
+
(g(!0), f(_, null, N(i.tableData.hours, (C, E) => (g(), f("th", {
|
|
6099
6099
|
rowspan: "1",
|
|
6100
6100
|
colspan: "1",
|
|
6101
6101
|
key: `seahoursZ${E}${C}`
|
|
@@ -6110,7 +6110,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
6110
6110
|
U("SeaLevel"),
|
|
6111
6111
|
s("span", { class: "unit" }, "m")
|
|
6112
6112
|
], -1)),
|
|
6113
|
-
(g(!0),
|
|
6113
|
+
(g(!0), f(_, null, N(i.tableData.seaLevel, (C, E) => (g(), f("td", {
|
|
6114
6114
|
rowspan: "1",
|
|
6115
6115
|
colspan: "1",
|
|
6116
6116
|
key: `SeaLevel${E}${C}`
|
|
@@ -6125,7 +6125,7 @@ function Br(t, e, a, r, i, o) {
|
|
|
6125
6125
|
U("SeaTemp"),
|
|
6126
6126
|
s("span", { class: "unit" }, "°C")
|
|
6127
6127
|
], -1)),
|
|
6128
|
-
(g(!0),
|
|
6128
|
+
(g(!0), f(_, null, N(i.tableData.seaTemp, (C, E) => (g(), f("td", {
|
|
6129
6129
|
rowspan: "1",
|
|
6130
6130
|
colspan: "1",
|
|
6131
6131
|
key: `SeaTemp${E}${C}`
|
|
@@ -6134,26 +6134,26 @@ function Br(t, e, a, r, i, o) {
|
|
|
6134
6134
|
], 512), [
|
|
6135
6135
|
[we, i.activeIndex === 3]
|
|
6136
6136
|
]),
|
|
6137
|
-
i.activeIndex === 3 ? (g(),
|
|
6137
|
+
i.activeIndex === 3 ? (g(), f("div", ir, e[30] || (e[30] = [
|
|
6138
6138
|
s("p", { style: { "font-size": "12px", padding: "12px 20px 0 20px", "line-height": "16px" } }, "*Sea level height accounts for tides, barometer effects, and global variations. Based on mean sea level, accuracy is limited in coastal areas. For coastal navigation, use data from Tides Tab.", -1)
|
|
6139
6139
|
]))) : O("", !0),
|
|
6140
6140
|
fe(s("table", rr, [
|
|
6141
6141
|
s("tr", or, [
|
|
6142
|
-
(g(!0),
|
|
6142
|
+
(g(!0), f(_, null, N(i.tideTableData, (C, E) => (g(), f("th", {
|
|
6143
6143
|
rowspan: "1",
|
|
6144
6144
|
colspan: "1",
|
|
6145
6145
|
key: `Tide-tr-${E}${C}`
|
|
6146
6146
|
}, B(C.type) + " Tide", 1))), 128))
|
|
6147
6147
|
]),
|
|
6148
6148
|
s("tr", sr, [
|
|
6149
|
-
(g(!0),
|
|
6149
|
+
(g(!0), f(_, null, N(i.tideTableData, (C, E) => (g(), f("td", {
|
|
6150
6150
|
rowspan: "1",
|
|
6151
6151
|
colspan: "1",
|
|
6152
6152
|
key: `Tide-date-${E}${C}`
|
|
6153
6153
|
}, B(o.computeHourHmmLT(C == null ? void 0 : C.date)), 1))), 128))
|
|
6154
6154
|
]),
|
|
6155
6155
|
s("tr", nr, [
|
|
6156
|
-
(g(!0),
|
|
6156
|
+
(g(!0), f(_, null, N(i.tideTableData, (C, E) => (g(), f("td", {
|
|
6157
6157
|
rowspan: "1",
|
|
6158
6158
|
colspan: "1",
|
|
6159
6159
|
key: `Tide-height-${E}${C}`
|
|
@@ -6323,7 +6323,7 @@ const Ir = /* @__PURE__ */ T(ui, [["render", Br], ["__scopeId", "data-v-cdc6da70
|
|
|
6323
6323
|
}
|
|
6324
6324
|
};
|
|
6325
6325
|
function Dr(t, e, a, r, i, o) {
|
|
6326
|
-
return g(),
|
|
6326
|
+
return g(), f("div");
|
|
6327
6327
|
}
|
|
6328
6328
|
const Pr = /* @__PURE__ */ T(Er, [["render", Dr]]), kr = {
|
|
6329
6329
|
name: "IdmGmdssArea",
|
|
@@ -6446,7 +6446,7 @@ const Pr = /* @__PURE__ */ T(Er, [["render", Dr]]), kr = {
|
|
|
6446
6446
|
}
|
|
6447
6447
|
};
|
|
6448
6448
|
function zr(t, e, a, r, i, o) {
|
|
6449
|
-
return g(),
|
|
6449
|
+
return g(), f("div");
|
|
6450
6450
|
}
|
|
6451
6451
|
const Mr = /* @__PURE__ */ T(kr, [["render", zr]]), Tr = {
|
|
6452
6452
|
name: "IdmEcaZone",
|
|
@@ -6537,7 +6537,7 @@ const Mr = /* @__PURE__ */ T(kr, [["render", zr]]), Tr = {
|
|
|
6537
6537
|
}
|
|
6538
6538
|
};
|
|
6539
6539
|
function Qr(t, e, a, r, i, o) {
|
|
6540
|
-
return g(),
|
|
6540
|
+
return g(), f("div");
|
|
6541
6541
|
}
|
|
6542
6542
|
const Sr = /* @__PURE__ */ T(Tr, [["render", Qr]]);
|
|
6543
6543
|
const _r = {
|
|
@@ -6672,15 +6672,15 @@ const _r = {
|
|
|
6672
6672
|
}
|
|
6673
6673
|
}, Hr = { id: "idm-gl3-zone-info" }, Or = ["innerHTML"];
|
|
6674
6674
|
function Nr(t, e, a, r, i, o) {
|
|
6675
|
-
var
|
|
6676
|
-
return fe((g(),
|
|
6675
|
+
var l;
|
|
6676
|
+
return fe((g(), f("div", Hr, [
|
|
6677
6677
|
s("div", {
|
|
6678
6678
|
class: "iconfont close",
|
|
6679
6679
|
onClick: e[0] || (e[0] = (c) => i.showZone = !1)
|
|
6680
6680
|
}, ""),
|
|
6681
6681
|
s("div", {
|
|
6682
6682
|
class: "rich-context",
|
|
6683
|
-
innerHTML: (
|
|
6683
|
+
innerHTML: (l = i.form) == null ? void 0 : l.name
|
|
6684
6684
|
}, null, 8, Or)
|
|
6685
6685
|
], 512)), [
|
|
6686
6686
|
[we, i.showZone]
|
|
@@ -6790,10 +6790,10 @@ const Rr = {
|
|
|
6790
6790
|
style: { "align-items": "flex-start" }
|
|
6791
6791
|
}, Xr = { class: "meteo-forecast flex-end" };
|
|
6792
6792
|
function Jr(t, e, a, r, i, o) {
|
|
6793
|
-
return fe((g(),
|
|
6793
|
+
return fe((g(), f("div", Fr, [
|
|
6794
6794
|
s("div", {
|
|
6795
6795
|
class: "close iconfont",
|
|
6796
|
-
onClick: e[0] || (e[0] = (
|
|
6796
|
+
onClick: e[0] || (e[0] = (l) => i.showPort = !1)
|
|
6797
6797
|
}, ""),
|
|
6798
6798
|
s("div", Gr, [
|
|
6799
6799
|
s("div", Wr, [
|
|
@@ -6814,7 +6814,7 @@ function Jr(t, e, a, r, i, o) {
|
|
|
6814
6814
|
]),
|
|
6815
6815
|
s("div", Xr, [
|
|
6816
6816
|
s("span", {
|
|
6817
|
-
onClick: e[1] || (e[1] = (
|
|
6817
|
+
onClick: e[1] || (e[1] = (l) => o.handleClickMeteo(i.form))
|
|
6818
6818
|
}, "Meteo Forecast")
|
|
6819
6819
|
])
|
|
6820
6820
|
])
|
|
@@ -6893,7 +6893,7 @@ const qr = /* @__PURE__ */ T(Rr, [["render", Jr], ["__scopeId", "data-v-2fc5fc5e
|
|
|
6893
6893
|
}
|
|
6894
6894
|
};
|
|
6895
6895
|
function Zr(t, e, a, r, i, o) {
|
|
6896
|
-
return g(),
|
|
6896
|
+
return g(), f("div");
|
|
6897
6897
|
}
|
|
6898
6898
|
const $r = /* @__PURE__ */ T(Vr, [["render", Zr]]), eo = {
|
|
6899
6899
|
name: "IdmTimezone",
|
|
@@ -7061,7 +7061,7 @@ const $r = /* @__PURE__ */ T(Vr, [["render", Zr]]), eo = {
|
|
|
7061
7061
|
}
|
|
7062
7062
|
};
|
|
7063
7063
|
function to(t, e, a, r, i, o) {
|
|
7064
|
-
return g(),
|
|
7064
|
+
return g(), f("div");
|
|
7065
7065
|
}
|
|
7066
7066
|
const ao = /* @__PURE__ */ T(eo, [["render", to]]), io = {
|
|
7067
7067
|
name: "IdmVoluntaryReportingArea",
|
|
@@ -7152,7 +7152,7 @@ const ao = /* @__PURE__ */ T(eo, [["render", to]]), io = {
|
|
|
7152
7152
|
}
|
|
7153
7153
|
};
|
|
7154
7154
|
function ro(t, e, a, r, i, o) {
|
|
7155
|
-
return g(),
|
|
7155
|
+
return g(), f("div");
|
|
7156
7156
|
}
|
|
7157
7157
|
const oo = /* @__PURE__ */ T(io, [["render", ro]]), so = {
|
|
7158
7158
|
name: "IdmSpecialArea",
|
|
@@ -7245,7 +7245,7 @@ const oo = /* @__PURE__ */ T(io, [["render", ro]]), so = {
|
|
|
7245
7245
|
}
|
|
7246
7246
|
};
|
|
7247
7247
|
function no(t, e, a, r, i, o) {
|
|
7248
|
-
return g(),
|
|
7248
|
+
return g(), f("div");
|
|
7249
7249
|
}
|
|
7250
7250
|
const lo = /* @__PURE__ */ T(so, [["render", no]]), co = {
|
|
7251
7251
|
name: "IdmTerminator",
|
|
@@ -7297,7 +7297,7 @@ const lo = /* @__PURE__ */ T(so, [["render", no]]), co = {
|
|
|
7297
7297
|
}
|
|
7298
7298
|
};
|
|
7299
7299
|
function ho(t, e, a, r, i, o) {
|
|
7300
|
-
return g(),
|
|
7300
|
+
return g(), f("div");
|
|
7301
7301
|
}
|
|
7302
7302
|
const po = /* @__PURE__ */ T(co, [["render", ho]]);
|
|
7303
7303
|
const mo = {
|
|
@@ -7457,7 +7457,7 @@ const mo = {
|
|
|
7457
7457
|
}
|
|
7458
7458
|
};
|
|
7459
7459
|
function uo(t, e, a, r, i, o) {
|
|
7460
|
-
return i.lngLat ? (g(),
|
|
7460
|
+
return i.lngLat ? (g(), f("div", {
|
|
7461
7461
|
key: 0,
|
|
7462
7462
|
class: "lat-lng-tip",
|
|
7463
7463
|
style: J({ right: i.right + "px", bottom: a.bottom })
|
|
@@ -7533,14 +7533,14 @@ const ct = /* @__PURE__ */ T(mo, [["render", uo], ["__scopeId", "data-v-ad66a24c
|
|
|
7533
7533
|
}
|
|
7534
7534
|
},
|
|
7535
7535
|
handleDrag(t) {
|
|
7536
|
-
var a, r, i, o,
|
|
7536
|
+
var a, r, i, o, l, c, h, p, n, d;
|
|
7537
7537
|
const e = (r = (a = t.target) == null ? void 0 : a._element) == null ? void 0 : r.id;
|
|
7538
7538
|
if ((e == null ? void 0 : e.split("-").length) === 2) {
|
|
7539
7539
|
const b = this.geojson.filter((m) => m.id === e.split("-")[0])[0];
|
|
7540
7540
|
this.pointMarkers[b.id].filter((m) => {
|
|
7541
7541
|
var v;
|
|
7542
7542
|
return ((v = m._element) == null ? void 0 : v.id) === e;
|
|
7543
|
-
})[0].setLngLat([(o = (i = t.target) == null ? void 0 : i._lngLat) == null ? void 0 : o.lng, (c = (
|
|
7543
|
+
})[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]);
|
|
7544
7544
|
let A;
|
|
7545
7545
|
b.features.forEach((m, v) => {
|
|
7546
7546
|
if (m.geometry.type === "Point" && m.properties.id == e.split("-")[1]) {
|
|
@@ -7552,22 +7552,22 @@ const ct = /* @__PURE__ */ T(mo, [["render", uo], ["__scopeId", "data-v-ad66a24c
|
|
|
7552
7552
|
this.handleTmpPointUpdate(
|
|
7553
7553
|
b,
|
|
7554
7554
|
w[A - 1],
|
|
7555
|
-
{ lng: (p = (h = t.target) == null ? void 0 : h._lngLat) == null ? void 0 : p.lng, lat: (d = (
|
|
7555
|
+
{ lng: (p = (h = t.target) == null ? void 0 : h._lngLat) == null ? void 0 : p.lng, lat: (d = (n = t.target) == null ? void 0 : n._lngLat) == null ? void 0 : d.lat, properties: w[A].properties },
|
|
7556
7556
|
A === w.length - 1 ? void 0 : w[A + 1]
|
|
7557
7557
|
);
|
|
7558
7558
|
}
|
|
7559
7559
|
},
|
|
7560
7560
|
handleDragEnd(t) {
|
|
7561
|
-
var a, r, i, o,
|
|
7561
|
+
var a, r, i, o, l, c, h, p, n, d;
|
|
7562
7562
|
const e = (r = (a = t.target) == null ? void 0 : a._element) == null ? void 0 : r.id;
|
|
7563
7563
|
if ((e == null ? void 0 : e.split("-").length) === 2) {
|
|
7564
7564
|
const b = this.geojson.filter((w) => w.id === e.split("-")[0])[0];
|
|
7565
7565
|
this.pointMarkers[b.id].filter((w) => {
|
|
7566
7566
|
var m;
|
|
7567
7567
|
return ((m = w._element) == null ? void 0 : m.id) === e;
|
|
7568
|
-
})[0].setLngLat([(o = (i = t.target) == null ? void 0 : i._lngLat) == null ? void 0 : o.lng, (c = (
|
|
7568
|
+
})[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]);
|
|
7569
7569
|
const A = b.features.filter((w) => w.geometry.type === "Point" && w.properties.id == e.split("-")[1])[0];
|
|
7570
|
-
A.geometry.coordinates = [(p = (h = t.target) == null ? void 0 : h._lngLat) == null ? void 0 : p.lng, (d = (
|
|
7570
|
+
A.geometry.coordinates = [(p = (h = t.target) == null ? void 0 : h._lngLat) == null ? void 0 : p.lng, (d = (n = t.target) == null ? void 0 : n._lngLat) == null ? void 0 : d.lat], b.features = b.features.filter((w) => w.geometry.type === "Point"), this.handlePointUpdate(b);
|
|
7571
7571
|
}
|
|
7572
7572
|
},
|
|
7573
7573
|
handleContextmenu(t) {
|
|
@@ -7583,18 +7583,18 @@ const ct = /* @__PURE__ */ T(mo, [["render", uo], ["__scopeId", "data-v-ad66a24c
|
|
|
7583
7583
|
}
|
|
7584
7584
|
},
|
|
7585
7585
|
handleClick(t) {
|
|
7586
|
-
var a, r, i, o,
|
|
7586
|
+
var a, r, i, o, l, c;
|
|
7587
7587
|
(a = this.contextmenu) == null || a.remove();
|
|
7588
7588
|
const e = t.originalEvent.target.className;
|
|
7589
7589
|
if (e === "marker-close") {
|
|
7590
|
-
const h = (i = (r = t.originalEvent) == null ? void 0 : r.srcElement) == null ? void 0 : i.id, p = this.geojson.filter((
|
|
7591
|
-
p && this.handleClear(p, !0), this.geojson = this.geojson.filter((
|
|
7590
|
+
const h = (i = (r = t.originalEvent) == null ? void 0 : r.srcElement) == null ? void 0 : i.id, p = this.geojson.filter((n) => n.id === h)[0];
|
|
7591
|
+
p && this.handleClear(p, !0), this.geojson = this.geojson.filter((n) => n.id !== h), !this.show && !((o = this.geojson) != null && o.some((n) => n.closed)) && this.handleUnbind();
|
|
7592
7592
|
} else if (e === "del-point") {
|
|
7593
|
-
const h = (c = (
|
|
7594
|
-
p.features = p.features.filter((
|
|
7593
|
+
const h = (c = (l = t.originalEvent.target.id) == null ? void 0 : l.replace("del-", "")) == null ? void 0 : c.split("-"), p = this.geojson.filter((n) => n.id === h[0])[0];
|
|
7594
|
+
p.features = p.features.filter((n) => n.geometry.type === "Point" && n.properties.id !== h[1]), this.handlePointUpdate(p);
|
|
7595
7595
|
} else if (e !== "marker-label" && this.show) {
|
|
7596
7596
|
let h = this.geojson.at(-1);
|
|
7597
|
-
h || (h = D.featureCollection([], { id: (/* @__PURE__ */ new Date()).getTime().toString() }), this.geojson.push(h)), h.features = h.features.filter((
|
|
7597
|
+
h || (h = D.featureCollection([], { id: (/* @__PURE__ */ new Date()).getTime().toString() }), this.geojson.push(h)), h.features = h.features.filter((n) => n.geometry.type === "Point");
|
|
7598
7598
|
const p = D.feature(
|
|
7599
7599
|
{
|
|
7600
7600
|
type: "Point",
|
|
@@ -7614,12 +7614,12 @@ const ct = /* @__PURE__ */ T(mo, [["render", uo], ["__scopeId", "data-v-ad66a24c
|
|
|
7614
7614
|
let a = 0;
|
|
7615
7615
|
const r = [];
|
|
7616
7616
|
for (let i = 1; i < e.length; i++) {
|
|
7617
|
-
const o = e[i - 1],
|
|
7618
|
-
a = G.roundPrecision(a +
|
|
7617
|
+
const o = e[i - 1], l = e[i], c = o.properties, h = { lng: o.geometry.coordinates[0], lat: o.geometry.coordinates[1] }, p = { lng: l.geometry.coordinates[0], lat: l.geometry.coordinates[1] }, n = be.calculateDistance(h, p, c.mode === "RL", 2), d = be.calculateBearing(h, p, c.mode === "RL", 2);
|
|
7618
|
+
a = G.roundPrecision(a + n, 2);
|
|
7619
7619
|
let b;
|
|
7620
7620
|
c.mode === "RL" ? b = G.convertToMonotonicLng([h, p]) : b = G.convertToMonotonicLng(be.interpolateCoordinates(h, p, 200));
|
|
7621
7621
|
const u = D.lineString(b.map((A) => [A.lng, A.lat]));
|
|
7622
|
-
u.properties.dist =
|
|
7622
|
+
u.properties.dist = n, u.properties.bearing = d, u.properties.total = a, r.push(u);
|
|
7623
7623
|
}
|
|
7624
7624
|
e.push(...r), t.total = a;
|
|
7625
7625
|
}
|
|
@@ -7627,22 +7627,22 @@ const ct = /* @__PURE__ */ T(mo, [["render", uo], ["__scopeId", "data-v-ad66a24c
|
|
|
7627
7627
|
},
|
|
7628
7628
|
handleTmpPointUpdate(t, e, a, r) {
|
|
7629
7629
|
const i = D.featureCollection([]);
|
|
7630
|
-
let o,
|
|
7630
|
+
let o, l;
|
|
7631
7631
|
if (e) {
|
|
7632
|
-
const h = e.properties, p = { lng: e.geometry.coordinates[0], lat: e.geometry.coordinates[1] },
|
|
7633
|
-
o = be.calculateDistance(p,
|
|
7632
|
+
const h = e.properties, p = { lng: e.geometry.coordinates[0], lat: e.geometry.coordinates[1] }, n = { lng: a.lng, lat: a.lat };
|
|
7633
|
+
o = be.calculateDistance(p, n, h.mode === "RL", 2), l = be.calculateBearing(p, n, h.mode === "RL", 2);
|
|
7634
7634
|
let d;
|
|
7635
|
-
h.mode === "RL" ? d = G.convertToMonotonicLng([p,
|
|
7635
|
+
h.mode === "RL" ? d = G.convertToMonotonicLng([p, n]) : d = G.convertToMonotonicLng(be.interpolateCoordinates(p, n, 200));
|
|
7636
7636
|
const b = D.lineString(d.map((u) => [u.lng, u.lat]));
|
|
7637
|
-
b.properties.dist = o, b.properties.bearing =
|
|
7637
|
+
b.properties.dist = o, b.properties.bearing = l, i.features.push(b);
|
|
7638
7638
|
}
|
|
7639
7639
|
if (r) {
|
|
7640
|
-
const h = a.properties, p = a,
|
|
7641
|
-
o = be.calculateDistance(p,
|
|
7640
|
+
const h = a.properties, p = a, n = { lng: r.geometry.coordinates[0], lat: r.geometry.coordinates[1] };
|
|
7641
|
+
o = be.calculateDistance(p, n, h.mode === "RL", 2), l = be.calculateBearing(p, n, h.mode === "RL", 2);
|
|
7642
7642
|
let d;
|
|
7643
|
-
h.mode === "RL" ? d = G.convertToMonotonicLng([p,
|
|
7643
|
+
h.mode === "RL" ? d = G.convertToMonotonicLng([p, n]) : d = G.convertToMonotonicLng(be.interpolateCoordinates(p, n, 200));
|
|
7644
7644
|
const b = D.lineString(d.map((u) => [u.lng, u.lat]));
|
|
7645
|
-
b.properties.dist = o, b.properties.bearing =
|
|
7645
|
+
b.properties.dist = o, b.properties.bearing = l, i.features.push(b);
|
|
7646
7646
|
}
|
|
7647
7647
|
this.map.getSource(this.tmpSource) ? this.map.getSource(this.tmpSource).setData(i) : this.map.addSource(this.tmpSource, {
|
|
7648
7648
|
type: "geojson",
|
|
@@ -7682,7 +7682,7 @@ const ct = /* @__PURE__ */ T(mo, [["render", uo], ["__scopeId", "data-v-ad66a24c
|
|
|
7682
7682
|
}
|
|
7683
7683
|
});
|
|
7684
7684
|
let c;
|
|
7685
|
-
if (r ? c = '<div class="marker-label">Drag and drop</div>' : c = `<div class="marker-label">Total distance: <b>${G.roundPrecision((t.total ?? 0) + o, 2)}</b>nm, bearing: <b>${
|
|
7685
|
+
if (r ? c = '<div class="marker-label">Drag and drop</div>' : c = `<div class="marker-label">Total distance: <b>${G.roundPrecision((t.total ?? 0) + o, 2)}</b>nm, bearing: <b>${l}</b>°</div><div class="marker-label">${this.navigation === "RL" ? "RL" : "GC"} mode, using 'Shift' to switch</div><div class="marker-label">Double click to end</div>`, this.tipMarker)
|
|
7686
7686
|
this.tipMarker._element.innerHTML = c, this.tipMarker.setLngLat([a.lng, a.lat]);
|
|
7687
7687
|
else {
|
|
7688
7688
|
const h = document.createElement("div");
|
|
@@ -7740,30 +7740,30 @@ const ct = /* @__PURE__ */ T(mo, [["render", uo], ["__scopeId", "data-v-ad66a24c
|
|
|
7740
7740
|
"text-halo-blur": 0
|
|
7741
7741
|
}
|
|
7742
7742
|
});
|
|
7743
|
-
const o = t.features.filter((
|
|
7744
|
-
for (const
|
|
7743
|
+
const o = t.features.filter((l) => l.geometry.type === "Point");
|
|
7744
|
+
for (const l of o) {
|
|
7745
7745
|
const c = document.createElement("div");
|
|
7746
|
-
c.id = `${t.id}-${
|
|
7747
|
-
const h = new ve.Marker({ element: c, draggable: !0, contextmenu: !0 }).setLngLat(
|
|
7746
|
+
c.id = `${t.id}-${l.properties.id}`, c.className = `${t.closed ? "point-marker closed" : "point-marker"}`, c.innerHTML = '<div class="marker-circle"></div>';
|
|
7747
|
+
const h = new ve.Marker({ element: c, draggable: !0, contextmenu: !0 }).setLngLat(l.geometry.coordinates).addTo(this.map);
|
|
7748
7748
|
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];
|
|
7749
7749
|
}
|
|
7750
7750
|
if (t.closed) {
|
|
7751
|
-
const
|
|
7752
|
-
p.className = "point-summary-marker", p.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(p).setOffset([60, 0]).setLngLat(
|
|
7751
|
+
const l = o.at(-1), h = t.features.filter((n) => n.geometry.type === "LineString").at(-1), p = document.createElement("div");
|
|
7752
|
+
p.className = "point-summary-marker", p.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(p).setOffset([60, 0]).setLngLat(l.geometry.coordinates).addTo(this.map);
|
|
7753
7753
|
}
|
|
7754
7754
|
}
|
|
7755
7755
|
},
|
|
7756
7756
|
handleClear(t, e = !0) {
|
|
7757
|
-
var o,
|
|
7757
|
+
var o, l, c, h, p, n, d, b, u;
|
|
7758
7758
|
const a = `${t.id}-${this.source}`, r = `${t.id}-${this.layer}`, i = `${t.id}-${this.labelLayer}`;
|
|
7759
|
-
(o = this.map) != null && o.getLayer(r) && this.map.removeLayer(r), (
|
|
7759
|
+
(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), (p = this.closeMarkers[t.id]) == null || p.remove(), this.closeMarkers[t.id] = void 0, (n = this.pointMarkers[t.id]) == null || n.forEach((A) => {
|
|
7760
7760
|
A == null || A.remove();
|
|
7761
7761
|
}), this.pointMarkers[t.id] = [], (d = this.tipMarker) == null || d.remove(), this.tipMarker = void 0, e && ((b = this.map) != null && b.getSource(a)) && this.map.removeSource(a), e && ((u = this.map) != null && u.getSource(this.tmpSource)) && this.map.removeSource(this.tmpSource);
|
|
7762
7762
|
}
|
|
7763
7763
|
}
|
|
7764
7764
|
};
|
|
7765
7765
|
function Ao(t, e, a, r, i, o) {
|
|
7766
|
-
return g(),
|
|
7766
|
+
return g(), f("div");
|
|
7767
7767
|
}
|
|
7768
7768
|
const yo = /* @__PURE__ */ T(go, [["render", Ao]]);
|
|
7769
7769
|
const fo = {
|
|
@@ -7820,14 +7820,14 @@ const fo = {
|
|
|
7820
7820
|
methods: {}
|
|
7821
7821
|
}, wo = { key: 0 }, bo = { class: "bar-item" };
|
|
7822
7822
|
function vo(t, e, a, r, i, o) {
|
|
7823
|
-
const
|
|
7824
|
-
return a.enabled && a.permission & i.helper.LEVEL.Supper ? (g(),
|
|
7823
|
+
const l = z("ElTooltip");
|
|
7824
|
+
return a.enabled && a.permission & i.helper.LEVEL.Supper ? (g(), f("div", wo, [
|
|
7825
7825
|
s("div", {
|
|
7826
7826
|
class: "menu-bar-box",
|
|
7827
7827
|
style: J({ position: "absolute", right: i.right + "px", bottom: a.bottom })
|
|
7828
7828
|
}, [
|
|
7829
7829
|
s("div", bo, [
|
|
7830
|
-
k(
|
|
7830
|
+
k(l, {
|
|
7831
7831
|
placement: "left",
|
|
7832
7832
|
effect: "light",
|
|
7833
7833
|
content: "Hifleet",
|
|
@@ -7843,7 +7843,7 @@ function vo(t, e, a, r, i, o) {
|
|
|
7843
7843
|
]),
|
|
7844
7844
|
_: 1
|
|
7845
7845
|
}),
|
|
7846
|
-
k(
|
|
7846
|
+
k(l, {
|
|
7847
7847
|
placement: "left",
|
|
7848
7848
|
effect: "light",
|
|
7849
7849
|
content: "I4insight",
|
|
@@ -8112,16 +8112,17 @@ const Mo = {
|
|
|
8112
8112
|
},
|
|
8113
8113
|
enc: {
|
|
8114
8114
|
handler(t, e) {
|
|
8115
|
-
var a, r, i, o,
|
|
8116
|
-
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 = (
|
|
8115
|
+
var a, r, i, o, l, c, h, p;
|
|
8116
|
+
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"), (p = (h = this.map) == null ? void 0 : h.getLayer("hi")) == null || p.setLayoutProperty("visibility", "none"));
|
|
8117
8117
|
}
|
|
8118
8118
|
},
|
|
8119
8119
|
activeWeatherLayers: {
|
|
8120
8120
|
handler() {
|
|
8121
|
-
var
|
|
8121
|
+
var a, r, i, o, l, c, h, p, n, d, b, u, A, w, m, v, y;
|
|
8122
8122
|
if (!this.map)
|
|
8123
8123
|
return !1;
|
|
8124
|
-
|
|
8124
|
+
const t = this.activeWeatherLayers.some((L) => L.key === "wind" && L.particle === !0 || L.key === "current" && L.particle === !0 || L.key === "temp" || L.key === "water-temp"), e = this.activeWeatherLayers.some((L) => L.key === "visibility" || L.key === "precip3h");
|
|
8125
|
+
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"), (p = this.map) != null && p.getLayer((h = this.viewport) == null ? void 0 : h.rampColorLayer) && ((n = this.map) != null && n.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && this.mapProjection === "mercator" && ((b = this.map) == null || b.moveLayer((d = this.viewport) == null ? void 0 : d.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), e && ((A = this.map) == null || A.moveLayer(this.helper.mapboxCustomer.layers.countryBoundary.id, (u = this.viewport) == null ? void 0 : u.rampColorLayer))) : ((m = (w = this.map) == null ? void 0 : w.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || m.setLayoutProperty("visibility", "none"), (y = (v = this.map) == null ? void 0 : v.getLayer(this.enc)) == null || y.setLayoutProperty("visibility", "visible")), this.$emit("activeWeatherLayers", this.activeWeatherLayers);
|
|
8125
8126
|
},
|
|
8126
8127
|
immediate: !0
|
|
8127
8128
|
},
|
|
@@ -8173,28 +8174,28 @@ const Mo = {
|
|
|
8173
8174
|
},
|
|
8174
8175
|
methods: {
|
|
8175
8176
|
async fetchWeatherLayers(t = { tropicals: !1 }) {
|
|
8176
|
-
var i, o,
|
|
8177
|
+
var i, o, l, c, h, p, n, d, b;
|
|
8177
8178
|
const e = (/* @__PURE__ */ new Date()).valueOf();
|
|
8178
8179
|
let a = 0, r = 0;
|
|
8179
8180
|
if (this.map) {
|
|
8180
8181
|
const u = ((i = this.map) == null ? void 0 : i.getZoom()) + 1, A = (o = this.map) == null ? void 0 : o.getBounds(), w = `${A._sw.lng},${A._sw.lat},${A._ne.lng},${A._ne.lat}`;
|
|
8181
|
-
if (this.particleFactor && ((
|
|
8182
|
+
if (this.particleFactor && ((l = this.$refs.layer) != null && l.autoActive)) {
|
|
8182
8183
|
const m = Ke.WEATHER_LAYERS.find((v) => {
|
|
8183
|
-
var
|
|
8184
|
-
return ((
|
|
8184
|
+
var y;
|
|
8185
|
+
return ((y = v.peer) == null ? void 0 : y.weight) === this.particleFactor.weight;
|
|
8185
8186
|
});
|
|
8186
8187
|
this.particleFactor.particle && (this.showWindParticle || this.showCurrentParticle) ? this.weatherWeight = this.weatherWeight & m.weight ? this.weatherWeight : this.weatherWeight + m.weight : this.weatherWeight = this.weatherWeight & m.weight ? this.weatherWeight - m.weight : this.weatherWeight;
|
|
8187
8188
|
}
|
|
8188
8189
|
if (this.weatherWeight > 0) {
|
|
8189
8190
|
let m = this.weatherWeight, v;
|
|
8190
8191
|
if (t.tropicals || this.weatherWeight & 256 && (v = this.weatherLayers.tropicals, v && (m -= 256, v.version = Math.random() + 1)), m > 0) {
|
|
8191
|
-
const
|
|
8192
|
+
const y = await le.get(`${this.gateway}/api/arc/weather/layers/links?l=${m}&v=${this.source}&z=${u}&bbox=${w}&t=${this.ts}`, {
|
|
8192
8193
|
headers: {
|
|
8193
8194
|
Authorization: this.token || this.defaultMeteoToken
|
|
8194
8195
|
}
|
|
8195
8196
|
});
|
|
8196
|
-
if (r = (/* @__PURE__ */ new Date()).valueOf() - (e + a), console.log("weather links elapsed: ", r, ", total: ", a += r), ((c =
|
|
8197
|
-
const L = (h =
|
|
8197
|
+
if (r = (/* @__PURE__ */ new Date()).valueOf() - (e + a), console.log("weather links elapsed: ", r, ", total: ", a += r), ((c = y == null ? void 0 : y.data) == null ? void 0 : c.code) === 0) {
|
|
8198
|
+
const L = (h = y == null ? void 0 : y.data) == null ? void 0 : h.data, P = [];
|
|
8198
8199
|
for (const I in L)
|
|
8199
8200
|
I === "ice-edge" && (L[I] = "https://idm-hz.oss-cn-hangzhou.aliyuncs.com/test/sea_ice_contours.geojson"), I !== "tropicals" && P.push(
|
|
8200
8201
|
le.get(L[I], {
|
|
@@ -8235,7 +8236,7 @@ const Mo = {
|
|
|
8235
8236
|
});
|
|
8236
8237
|
}
|
|
8237
8238
|
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"]) {
|
|
8238
|
-
const L = (p = this.weatherLayers["swell-direction"]) == null ? void 0 : p.raw, P = (
|
|
8239
|
+
const L = (p = this.weatherLayers["swell-direction"]) == null ? void 0 : p.raw, P = (n = this.weatherLayers["swell-height"]) == null ? void 0 : n.raw;
|
|
8239
8240
|
delete this.weatherLayers["swell-direction"], delete this.weatherLayers["swell-height"], this.weatherLayers.swell = {
|
|
8240
8241
|
type: "json",
|
|
8241
8242
|
direction: L,
|
|
@@ -8264,16 +8265,16 @@ const Mo = {
|
|
|
8264
8265
|
if (this.map) {
|
|
8265
8266
|
let o = this.otherWeight;
|
|
8266
8267
|
if (o) {
|
|
8267
|
-
let
|
|
8268
|
-
if (this.otherWeight & 2048 && (o = this.otherWeight - 2048,
|
|
8268
|
+
let l = !1, c = !1, h = !1, p = !1;
|
|
8269
|
+
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, p = !0), o) {
|
|
8269
8270
|
if (t.all) {
|
|
8270
|
-
const
|
|
8271
|
+
const n = await le.get(`${this.gateway}/api/arc/other/layers/links?l=${o}&t=${this.ts}`, {
|
|
8271
8272
|
headers: {
|
|
8272
8273
|
Authorization: this.token || this.defaultMeteoToken
|
|
8273
8274
|
}
|
|
8274
8275
|
});
|
|
8275
|
-
if (((e =
|
|
8276
|
-
const d = (a =
|
|
8276
|
+
if (((e = n == null ? void 0 : n.data) == null ? void 0 : e.code) === 0) {
|
|
8277
|
+
const d = (a = n == null ? void 0 : n.data) == null ? void 0 : a.data, b = [];
|
|
8277
8278
|
for (const A in d)
|
|
8278
8279
|
b.push(
|
|
8279
8280
|
le.get(d[A], {
|
|
@@ -8284,20 +8285,20 @@ const Mo = {
|
|
|
8284
8285
|
})
|
|
8285
8286
|
);
|
|
8286
8287
|
const u = await Promise.all(b);
|
|
8287
|
-
this.otherLayers = { enc:
|
|
8288
|
-
var v,
|
|
8289
|
-
const w = ((v = A == null ? void 0 : A.data) == null ? void 0 : v.data) || (A == null ? void 0 : A.data), m = (L = (
|
|
8288
|
+
this.otherLayers = { enc: l, world12nm: c, worldMarine: h, chinaRoute: p }, u.map((A) => {
|
|
8289
|
+
var v, y, L;
|
|
8290
|
+
const w = ((v = A == null ? void 0 : A.data) == null ? void 0 : v.data) || (A == null ? void 0 : A.data), m = (L = (y = A == null ? void 0 : A.config) == null ? void 0 : y.headers) == null ? void 0 : L.key;
|
|
8290
8291
|
this.otherLayers[m] = w;
|
|
8291
8292
|
});
|
|
8292
8293
|
}
|
|
8293
8294
|
} else if (t.dayNight && o & 1024) {
|
|
8294
|
-
const
|
|
8295
|
+
const n = await le.get(`${this.gateway}/api/arc/other/layers/links?l=1024&t=${this.ts}`, {
|
|
8295
8296
|
headers: {
|
|
8296
8297
|
Authorization: this.token || this.defaultMeteoToken
|
|
8297
8298
|
}
|
|
8298
8299
|
});
|
|
8299
|
-
if (((r =
|
|
8300
|
-
const d = (i =
|
|
8300
|
+
if (((r = n == null ? void 0 : n.data) == null ? void 0 : r.code) === 0) {
|
|
8301
|
+
const d = (i = n == null ? void 0 : n.data) == null ? void 0 : i.data, b = [];
|
|
8301
8302
|
for (const A in d)
|
|
8302
8303
|
b.push(
|
|
8303
8304
|
le.get(d[A], {
|
|
@@ -8308,14 +8309,14 @@ const Mo = {
|
|
|
8308
8309
|
})
|
|
8309
8310
|
);
|
|
8310
8311
|
(await Promise.all(b)).map((A) => {
|
|
8311
|
-
var v,
|
|
8312
|
-
const w = ((v = A == null ? void 0 : A.data) == null ? void 0 : v.data) || (A == null ? void 0 : A.data), m = (L = (
|
|
8312
|
+
var v, y, L;
|
|
8313
|
+
const w = ((v = A == null ? void 0 : A.data) == null ? void 0 : v.data) || (A == null ? void 0 : A.data), m = (L = (y = A == null ? void 0 : A.config) == null ? void 0 : y.headers) == null ? void 0 : L.key;
|
|
8313
8314
|
this.otherLayers[m] = w;
|
|
8314
8315
|
});
|
|
8315
8316
|
}
|
|
8316
8317
|
}
|
|
8317
8318
|
} else
|
|
8318
|
-
this.otherLayers = { enc:
|
|
8319
|
+
this.otherLayers = { enc: l, world12nm: c, worldMarine: h, chinaRoute: p };
|
|
8319
8320
|
} else
|
|
8320
8321
|
this.otherLayers = {};
|
|
8321
8322
|
this.handleBeforeLayerToggle();
|
|
@@ -8331,7 +8332,7 @@ const Mo = {
|
|
|
8331
8332
|
this.activeWindLayer = !!this.activeWeatherLayers.find((e) => e.key === "wind"), this.$refs.layer && (this.$refs.layer.activeWeatherLayers = this.activeWeatherLayers);
|
|
8332
8333
|
},
|
|
8333
8334
|
handleRampColorInitial() {
|
|
8334
|
-
var t, e, a, r, i, o,
|
|
8335
|
+
var t, e, a, r, i, o, l, c, h, p, n, d;
|
|
8335
8336
|
this.viewport.map.getSource((t = this.viewport) == null ? void 0 : t.rampColorSource) || this.viewport.map.addSource((e = this.viewport) == null ? void 0 : e.rampColorSource, {
|
|
8336
8337
|
type: "canvas",
|
|
8337
8338
|
canvas: (a = this.viewport) == null ? void 0 : a.rampColorCanvas,
|
|
@@ -8347,7 +8348,7 @@ const Mo = {
|
|
|
8347
8348
|
}
|
|
8348
8349
|
},
|
|
8349
8350
|
this.beforeLayer
|
|
8350
|
-
), this.viewport.map.getSource((
|
|
8351
|
+
), this.viewport.map.getSource((l = this.viewport) == null ? void 0 : l.particleSource) || this.viewport.map.addSource((c = this.viewport) == null ? void 0 : c.particleSource, {
|
|
8351
8352
|
type: "canvas",
|
|
8352
8353
|
canvas: (h = this.viewport) == null ? void 0 : h.particleCanvas,
|
|
8353
8354
|
animate: !0,
|
|
@@ -8355,7 +8356,7 @@ const Mo = {
|
|
|
8355
8356
|
}), this.viewport.map.getLayer((p = this.viewport) == null ? void 0 : p.particleLayer) || this.viewport.map.addLayer(
|
|
8356
8357
|
{
|
|
8357
8358
|
type: "raster",
|
|
8358
|
-
id: (
|
|
8359
|
+
id: (n = this.viewport) == null ? void 0 : n.particleLayer,
|
|
8359
8360
|
source: (d = this.viewport) == null ? void 0 : d.particleSource,
|
|
8360
8361
|
layout: {
|
|
8361
8362
|
visibility: "none"
|
|
@@ -8365,49 +8366,48 @@ const Mo = {
|
|
|
8365
8366
|
);
|
|
8366
8367
|
},
|
|
8367
8368
|
handleDragEndWithZoom4Json() {
|
|
8368
|
-
var p,
|
|
8369
|
+
var p, n, d, b;
|
|
8369
8370
|
const t = (/* @__PURE__ */ new Date()).valueOf();
|
|
8370
8371
|
let e = 0, a = 0;
|
|
8371
|
-
const r = (p = this.map) == null ? void 0 : p.getBounds(), i = this.map.getZoom(), o = G.convertToStdLng(r._sw.lng),
|
|
8372
|
-
console.log(o, n, i);
|
|
8372
|
+
const r = (p = this.map) == null ? void 0 : p.getBounds(), i = this.map.getZoom(), o = G.convertToStdLng(r._sw.lng), l = G.convertToStdLng(r._ne.lng), c = Math.floor(r._sw.lat), h = Math.ceil(r._ne.lat);
|
|
8373
8373
|
for (const u in this.weatherLayers)
|
|
8374
8374
|
if (this.weatherLayers[u].active && this.weatherLayers[u].type === "json") {
|
|
8375
8375
|
this.weatherLayers[u].active = !1, this.weatherLayers[u].version = Math.random() + 1;
|
|
8376
8376
|
let A = [];
|
|
8377
8377
|
if (["swell", "current"].includes(u)) {
|
|
8378
|
-
const w = ((
|
|
8378
|
+
const w = ((n = this.weatherLayers[u]) == null ? void 0 : n.direction) || {};
|
|
8379
8379
|
for (const m in w)
|
|
8380
8380
|
if (m > c && m < h && (!(i <= this.zoom) || m % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8381
8381
|
const v = w[m].lng;
|
|
8382
|
-
o >
|
|
8382
|
+
o > l ? v.forEach((y, L) => {
|
|
8383
8383
|
var P, M;
|
|
8384
8384
|
if (i < 2) {
|
|
8385
|
-
if ((
|
|
8386
|
-
const I = D.point([
|
|
8385
|
+
if ((y >= 0 && y <= 360 || y >= -360 && y <= 0) && (!(i <= this.zoom) || y % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8386
|
+
const I = D.point([y, m], {
|
|
8387
8387
|
val: w[m].val[L],
|
|
8388
8388
|
spd: (P = w[m].spd) == null ? void 0 : P[L]
|
|
8389
8389
|
});
|
|
8390
8390
|
A.push(I);
|
|
8391
8391
|
}
|
|
8392
|
-
} else if ((
|
|
8393
|
-
const I = D.point([
|
|
8392
|
+
} else if ((y >= o && y <= 180 || y >= -180 && y <= l) && (!(i <= this.zoom) || y % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8393
|
+
const I = D.point([y, m], {
|
|
8394
8394
|
val: w[m].val[L],
|
|
8395
8395
|
spd: (M = w[m].spd) == null ? void 0 : M[L]
|
|
8396
8396
|
});
|
|
8397
8397
|
A.push(I);
|
|
8398
8398
|
}
|
|
8399
|
-
}) : v.forEach((
|
|
8399
|
+
}) : v.forEach((y, L) => {
|
|
8400
8400
|
var P, M;
|
|
8401
8401
|
if (o < 2) {
|
|
8402
|
-
if ((
|
|
8403
|
-
const I = D.point([
|
|
8402
|
+
if ((y >= 0 && y <= 360 || y >= -360 && y <= 0) && (!(i <= this.zoom) || y % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8403
|
+
const I = D.point([y, m], {
|
|
8404
8404
|
val: w[m].val[L],
|
|
8405
8405
|
spd: (P = w[m].spd) == null ? void 0 : P[L]
|
|
8406
8406
|
});
|
|
8407
8407
|
A.push(I);
|
|
8408
8408
|
}
|
|
8409
|
-
} else if (
|
|
8410
|
-
const I = D.point([
|
|
8409
|
+
} else if (y >= o && y <= l && (!(i <= this.zoom) || y % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8410
|
+
const I = D.point([y, m], {
|
|
8411
8411
|
val: w[m].val[L],
|
|
8412
8412
|
spd: (M = w[m].spd) == null ? void 0 : M[L]
|
|
8413
8413
|
});
|
|
@@ -8420,12 +8420,12 @@ const Mo = {
|
|
|
8420
8420
|
if (m) {
|
|
8421
8421
|
if (!m.data) {
|
|
8422
8422
|
const v = [];
|
|
8423
|
-
for (const
|
|
8424
|
-
const L = m.raw.LineString[
|
|
8423
|
+
for (const y in (d = m.raw) == null ? void 0 : d.LineString) {
|
|
8424
|
+
const L = m.raw.LineString[y];
|
|
8425
8425
|
for (const P of L)
|
|
8426
8426
|
v.push(
|
|
8427
8427
|
D.lineString(P, {
|
|
8428
|
-
val: Number(
|
|
8428
|
+
val: Number(y)
|
|
8429
8429
|
})
|
|
8430
8430
|
);
|
|
8431
8431
|
m.data = D.featureCollection(v);
|
|
@@ -8442,19 +8442,19 @@ const Mo = {
|
|
|
8442
8442
|
const m = this.weatherLayers[u].speed;
|
|
8443
8443
|
if (m) {
|
|
8444
8444
|
if (!m.data) {
|
|
8445
|
-
const
|
|
8445
|
+
const y = [];
|
|
8446
8446
|
for (const L in (b = m.raw) == null ? void 0 : b.Polygon) {
|
|
8447
8447
|
const P = m.raw.Polygon[L];
|
|
8448
8448
|
for (const M of P)
|
|
8449
|
-
|
|
8449
|
+
y.push(
|
|
8450
8450
|
D.polygon(M, {
|
|
8451
8451
|
val: Number(L)
|
|
8452
8452
|
})
|
|
8453
8453
|
);
|
|
8454
8454
|
}
|
|
8455
|
-
m.data = D.featureCollection(
|
|
8455
|
+
m.data = D.featureCollection(y);
|
|
8456
8456
|
}
|
|
8457
|
-
const v = i < this.zoom ? m.data.features.filter((
|
|
8457
|
+
const v = i < this.zoom ? m.data.features.filter((y) => y.properties.val > 0.5) : m.data.features;
|
|
8458
8458
|
A = A.concat(v), a = (/* @__PURE__ */ new Date()).valueOf() - (t + e), console.log("speed elapsed: ", a, ", total: ", e += a);
|
|
8459
8459
|
}
|
|
8460
8460
|
}
|
|
@@ -8463,33 +8463,33 @@ const Mo = {
|
|
|
8463
8463
|
for (const m in w)
|
|
8464
8464
|
if (m > c && m < h && (!(i <= this.zoom) || m % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8465
8465
|
const v = w[m].lng;
|
|
8466
|
-
o >
|
|
8466
|
+
o > l ? v.forEach((y, L) => {
|
|
8467
8467
|
if (i < 2) {
|
|
8468
|
-
if ((
|
|
8469
|
-
const P = D.point([
|
|
8468
|
+
if ((y >= 0 && y <= 360 || y >= -360 && y <= 0) && (!(i <= this.zoom) || y % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8469
|
+
const P = D.point([y, m], {
|
|
8470
8470
|
val: w[m].val[L],
|
|
8471
8471
|
spd: w[m].spd[L]
|
|
8472
8472
|
});
|
|
8473
8473
|
A.push(P);
|
|
8474
8474
|
}
|
|
8475
|
-
} else if ((
|
|
8476
|
-
const P = D.point([
|
|
8475
|
+
} else if ((y >= o && y <= 180 || y >= -180 && y <= l) && (!(i <= this.zoom) || y % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8476
|
+
const P = D.point([y, m], {
|
|
8477
8477
|
val: w[m].val[L],
|
|
8478
8478
|
spd: w[m].spd[L]
|
|
8479
8479
|
});
|
|
8480
8480
|
A.push(P);
|
|
8481
8481
|
}
|
|
8482
|
-
}) : v.forEach((
|
|
8482
|
+
}) : v.forEach((y, L) => {
|
|
8483
8483
|
if (i < 2) {
|
|
8484
|
-
if ((
|
|
8485
|
-
const P = D.point([
|
|
8484
|
+
if ((y >= 0 && y <= 360 || y >= -360 && y <= 0) && (!(i <= this.zoom) || y % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8485
|
+
const P = D.point([y, m], {
|
|
8486
8486
|
val: w[m].val[L],
|
|
8487
8487
|
spd: w[m].spd[L]
|
|
8488
8488
|
});
|
|
8489
8489
|
A.push(P);
|
|
8490
8490
|
}
|
|
8491
|
-
} else if (
|
|
8492
|
-
const P = D.point([
|
|
8491
|
+
} else if (y >= o && y <= l && (!(i <= this.zoom) || y % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
8492
|
+
const P = D.point([y, m], {
|
|
8493
8493
|
val: w[m].val[L],
|
|
8494
8494
|
spd: w[m].spd[L]
|
|
8495
8495
|
});
|
|
@@ -8506,8 +8506,8 @@ const Mo = {
|
|
|
8506
8506
|
if (w) {
|
|
8507
8507
|
const m = [];
|
|
8508
8508
|
for (const v in w.Polygon) {
|
|
8509
|
-
const
|
|
8510
|
-
for (const L of
|
|
8509
|
+
const y = w.Polygon[v];
|
|
8510
|
+
for (const L of y)
|
|
8511
8511
|
m.push(
|
|
8512
8512
|
D.polygon(L, {
|
|
8513
8513
|
val: Number(v)
|
|
@@ -8515,8 +8515,8 @@ const Mo = {
|
|
|
8515
8515
|
);
|
|
8516
8516
|
}
|
|
8517
8517
|
for (const v in w.Point) {
|
|
8518
|
-
const
|
|
8519
|
-
for (const L of
|
|
8518
|
+
const y = w.Point[v];
|
|
8519
|
+
for (const L of y)
|
|
8520
8520
|
m.push(
|
|
8521
8521
|
...D.points(L, {
|
|
8522
8522
|
val: Number(v)
|
|
@@ -8535,8 +8535,8 @@ const Mo = {
|
|
|
8535
8535
|
if (w) {
|
|
8536
8536
|
const m = [];
|
|
8537
8537
|
for (const v in w.LineString) {
|
|
8538
|
-
const
|
|
8539
|
-
for (const L of
|
|
8538
|
+
const y = w.LineString[v];
|
|
8539
|
+
for (const L of y)
|
|
8540
8540
|
m.push(
|
|
8541
8541
|
D.lineString(L, {
|
|
8542
8542
|
val: Number(v)
|
|
@@ -8544,9 +8544,9 @@ const Mo = {
|
|
|
8544
8544
|
);
|
|
8545
8545
|
}
|
|
8546
8546
|
for (const v in w.Point)
|
|
8547
|
-
w.Point[v].lng.forEach((
|
|
8548
|
-
|
|
8549
|
-
D.point([
|
|
8547
|
+
w.Point[v].lng.forEach((y, L) => {
|
|
8548
|
+
y = G.convertToStdLng(y), m.push(
|
|
8549
|
+
D.point([y, v], {
|
|
8550
8550
|
val: w.Point[v].val[L],
|
|
8551
8551
|
type: w.Point[v].type[L]
|
|
8552
8552
|
})
|
|
@@ -8564,8 +8564,8 @@ const Mo = {
|
|
|
8564
8564
|
if (w) {
|
|
8565
8565
|
const m = [];
|
|
8566
8566
|
for (const v in w.LineString) {
|
|
8567
|
-
const
|
|
8568
|
-
for (const L of
|
|
8567
|
+
const y = w.LineString[v];
|
|
8568
|
+
for (const L of y)
|
|
8569
8569
|
m.push(
|
|
8570
8570
|
D.lineString(L, {
|
|
8571
8571
|
val: Number(v)
|
|
@@ -8589,10 +8589,10 @@ const Mo = {
|
|
|
8589
8589
|
return t.features.forEach((o) => {
|
|
8590
8590
|
if (o.geometry.type !== "Point")
|
|
8591
8591
|
if (r > i) {
|
|
8592
|
-
let
|
|
8593
|
-
c.geometry.coordinates.length && a.push(c),
|
|
8592
|
+
let l = [r, e._sw.lat, 180, e._ne.lat], c = D.bboxClip(o, l);
|
|
8593
|
+
c.geometry.coordinates.length && a.push(c), l = [-180, e._sw.lat, i, e._ne.lat], c = D.bboxClip(o, l), c.geometry.coordinates.length && a.push(c);
|
|
8594
8594
|
} else {
|
|
8595
|
-
const
|
|
8595
|
+
const l = [r, e._sw.lat, i, e._ne.lat], c = D.bboxClip(o, l);
|
|
8596
8596
|
c.geometry.coordinates.length && a.push(c);
|
|
8597
8597
|
}
|
|
8598
8598
|
else
|
|
@@ -8610,8 +8610,8 @@ const Mo = {
|
|
|
8610
8610
|
this.handleBeforeLayerToggle();
|
|
8611
8611
|
},
|
|
8612
8612
|
handleBeforeLayerToggle() {
|
|
8613
|
-
var t, e, a, r, i, o,
|
|
8614
|
-
(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"] || (
|
|
8613
|
+
var t, e, a, r, i, o, l, c, h, p, n, d, b, u, A, w;
|
|
8614
|
+
(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 || (p = this.otherLayers) != null && p.enc || (n = this.otherLayers) != null && n.world12nm || (d = this.otherLayers) != null && d.worldMarine || (b = this.otherLayers) != null && b.chinaRoute || (u = this.otherLayers) != null && u["voluntary-reporting-area"] || (A = this.otherLayers) != null && A["eca-zones"] || (w = this.otherLayers) != null && w["special-area"]) && this.map.setLayoutProperty(this.beforeLayer, "visibility", "visible");
|
|
8615
8615
|
},
|
|
8616
8616
|
handleDateChange(t = { tropicals: !1 }) {
|
|
8617
8617
|
this.fetchWeatherLayers(t), this.fetchOtherLayers({ dayNight: !0 });
|
|
@@ -8621,14 +8621,14 @@ const Mo = {
|
|
|
8621
8621
|
this.activeWeatherLayers = JSON.parse(JSON.stringify(t));
|
|
8622
8622
|
const a = this.activeWeatherLayers.some(
|
|
8623
8623
|
(o) => {
|
|
8624
|
-
var
|
|
8625
|
-
return ["wind", "current"].includes(o.key) && (!((
|
|
8624
|
+
var l;
|
|
8625
|
+
return ["wind", "current"].includes(o.key) && (!((l = Object.keys(o)) != null && l.some((c) => c === "particle")) || !!o.particle);
|
|
8626
8626
|
}
|
|
8627
8627
|
), r = this.activeWeatherLayers.some((o) => ["png", "jpg"].includes(o.type));
|
|
8628
8628
|
a && !r ? (this.activeWeatherLayers.forEach((o) => {
|
|
8629
8629
|
o.key === "wind" && o.particle && (this.particleFactor = o, this.showWindParticle = !0), o.key === "current" && o.particle && (this.particleFactor = o, this.showCurrentParticle = !0);
|
|
8630
8630
|
}), this.particleFactor.particle = !0) : r && this.particleFactor && (this.particleFactor.particle = !1);
|
|
8631
|
-
const i = t == null ? void 0 : t.reduce((o,
|
|
8631
|
+
const i = t == null ? void 0 : t.reduce((o, l) => o + (o & (l == null ? void 0 : l.weight) ? 0 : l == null ? void 0 : l.weight), 0);
|
|
8632
8632
|
this.weatherWeight !== i || this.source !== e ? (this.source = e, this.weatherWeight = i, this.fetchWeatherLayers({ tropicals: !1 })) : this.handleWeatherLayerToggle();
|
|
8633
8633
|
}) : setTimeout(() => {
|
|
8634
8634
|
this.handleWeatherLayerChange(t, e);
|
|
@@ -8645,8 +8645,8 @@ const Mo = {
|
|
|
8645
8645
|
}
|
|
8646
8646
|
},
|
|
8647
8647
|
handle3dToggle(t) {
|
|
8648
|
-
var e, a, r, i, o,
|
|
8649
|
-
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((
|
|
8648
|
+
var e, a, r, i, o, l, c, h, p, n, d, b, u, A, w, m, v, y, L, P;
|
|
8649
|
+
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((p = this.viewport) == null ? void 0 : p.particleLayer, this.helper.mapboxCustomer.layers.water.id)), this.map.off("zoomend", this.handleDragEndWithZoom4Json), this.map.off("dragend", this.handleDragEndWithZoom4Json), this.map.off("move", this.handleDragEndWithZoom4Image)) : (this.map.setProjection("mercator"), this.mapProjection = "mercator", this.map.on("zoomend", this.handleDragEndWithZoom4Json), this.map.on("dragend", this.handleDragEndWithZoom4Json), this.map.on("move", this.handleDragEndWithZoom4Image), this.handleDragEndWithZoom4Image(), this.handleDragEndWithZoom4Json(), (b = this.map) != null && b.getLayer((d = this.viewport) == null ? void 0 : d.rampColorLayer) && ((u = this.map) != null && u.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && ((w = this.map) == null || w.moveLayer((A = this.viewport) == null ? void 0 : A.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), (v = this.map) != null && v.getLayer((m = this.viewport) == null ? void 0 : m.particleLayer) && ((y = this.map) != null && y.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && ((P = this.map) == null || P.moveLayer((L = this.viewport) == null ? void 0 : L.particleLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)));
|
|
8650
8650
|
},
|
|
8651
8651
|
handleParticle(t) {
|
|
8652
8652
|
this.particleFactor = t, this.weatherLayers[t.key] && (this.weatherLayers[t.key].particle = t.particle), this.activeWeatherLayers.map((r) => {
|
|
@@ -8671,9 +8671,9 @@ const Mo = {
|
|
|
8671
8671
|
};
|
|
8672
8672
|
function Qo(t, e, a, r, i, o) {
|
|
8673
8673
|
var Ae, ie, Q, q, ye, re, se, ne, x, Le, xe, Be, Ie, Ee, De, Pe, ke, ze, Me, Te, Qe, Se, _e, He, Oe, Ne, je, Re, Fe;
|
|
8674
|
-
const
|
|
8675
|
-
return a.map ? (g(),
|
|
8676
|
-
k(
|
|
8674
|
+
const l = z("IdmGlLayer"), c = z("IdmENC"), h = z("IdmWorld12nm"), p = z("IdmWorldMarine"), n = z("IdmChinaRoute"), d = z("IdmSigWave"), b = z("IdmSwell"), u = z("IdmPrmsl"), A = z("IdmIceberg"), w = z("IdmTropicals"), m = z("IdmCurrents"), v = z("IdmCurrentParticle"), y = z("IdmWindBarb"), L = z("IdmWindParticle"), P = z("IdmPrecip3h"), M = z("IdmVisibility"), I = z("IdmWaterTemp"), j = z("IdmTemp"), W = z("IdmArctic"), Y = z("IdmWarZone"), K = z("IdmGmdssArea"), V = z("IdmEcaZone"), ee = z("IdmAlertZone"), ce = z("IdmPort"), he = z("IdmLoadLine"), de = z("IdmTimezone"), pe = z("IdmVRA"), me = z("IdmSpecialArea"), ue = z("IdmTerminator"), ge = z("IdmLatLng"), te = z("IdmMeasure"), oe = z("IdmPoint");
|
|
8675
|
+
return a.map ? (g(), f("div", To, [
|
|
8676
|
+
k(l, S({
|
|
8677
8677
|
ref: "layer",
|
|
8678
8678
|
map: a.map,
|
|
8679
8679
|
"toggle-version": a.toggleVersion,
|
|
@@ -8719,7 +8719,7 @@ function Qo(t, e, a, r, i, o) {
|
|
|
8719
8719
|
"weather-layers": i.weatherLayers,
|
|
8720
8720
|
enabled: (Q = i.otherLayers) == null ? void 0 : Q.worldMarine
|
|
8721
8721
|
}, t.$attrs), null, 16, ["map", "token", "weather-layers", "enabled"]),
|
|
8722
|
-
k(
|
|
8722
|
+
k(n, S({
|
|
8723
8723
|
map: a.map,
|
|
8724
8724
|
token: a.token,
|
|
8725
8725
|
"weather-layers": i.weatherLayers,
|
|
@@ -8775,7 +8775,7 @@ function Qo(t, e, a, r, i, o) {
|
|
|
8775
8775
|
"before-layer": a.beforeLayer,
|
|
8776
8776
|
"toggle-version": a.toggleVersion
|
|
8777
8777
|
}, t.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
8778
|
-
k(
|
|
8778
|
+
k(y, S({
|
|
8779
8779
|
ref: "windBarb",
|
|
8780
8780
|
map: a.map,
|
|
8781
8781
|
"map-projection": i.mapProjection,
|