@idmui/spot 0.1.3 → 0.1.5
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/Spot/src/index.vue.d.ts +1 -0
- package/dist/index.js +582 -526
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,513 +1,568 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Q from "moment";
|
|
2
2
|
import X from "moment-timezone";
|
|
3
|
-
import { Search as
|
|
4
|
-
import { LngLatHelper as
|
|
5
|
-
import * as
|
|
6
|
-
import { markRaw as
|
|
7
|
-
import
|
|
8
|
-
class
|
|
9
|
-
static pickHourly(
|
|
10
|
-
var
|
|
11
|
-
const
|
|
12
|
-
if (
|
|
13
|
-
const
|
|
14
|
-
let j,
|
|
15
|
-
if (
|
|
16
|
-
for (const
|
|
17
|
-
const c =
|
|
3
|
+
import { Search as zt } from "@element-plus/icons-vue";
|
|
4
|
+
import { LngLatHelper as lt } from "@idm-plugin/geo";
|
|
5
|
+
import * as gt from "echarts";
|
|
6
|
+
import { markRaw as kt, resolveComponent as ht, openBlock as n, createElementBlock as o, createElementVNode as i, createVNode as dt, withCtx as ct, Fragment as b, renderList as x, createBlock as Dt, toDisplayString as f, createCommentVNode as pt, createTextVNode as y, normalizeClass as _, normalizeStyle as nt } from "vue";
|
|
7
|
+
import vt from "axios";
|
|
8
|
+
class bt {
|
|
9
|
+
static pickHourly(t, e) {
|
|
10
|
+
var h, s, v, M, C, S, L, N, I, P, H, a, r, q, D, T, R, A, E, G, F, B, O, V, U, J, Z, Y, u, k, w, z, W, p, K, m, $, g, st, at;
|
|
11
|
+
const it = typeof e == "string" ? Q(e) : e, et = t.weather, mt = t.marine, wt = Q(et[0].hourly.date).utc(), ot = wt.clone().add(et[0].hourly.time.at(0), "h"), xt = wt.clone().add(et[0].hourly.time.at(-1), "h"), ut = [];
|
|
12
|
+
if (it.isBetween(ot, xt, "millisecond", "[]")) {
|
|
13
|
+
const d = it.utc().diff(ot, "h", !1);
|
|
14
|
+
let j, tt;
|
|
15
|
+
if (et)
|
|
16
|
+
for (const rt of et) {
|
|
17
|
+
const c = rt.hourly;
|
|
18
18
|
j = {
|
|
19
|
-
temp: (
|
|
20
|
-
apparentTemp: (s = c.apparent_temperature) == null ? void 0 : s.at(
|
|
21
|
-
rh: (v = c.relative_humidity_2m) == null ? void 0 : v.at(
|
|
22
|
-
dp: (M = c.dew_point_2m) == null ? void 0 : M.at(
|
|
19
|
+
temp: (h = c.temperature_2m) == null ? void 0 : h.at(d),
|
|
20
|
+
apparentTemp: (s = c.apparent_temperature) == null ? void 0 : s.at(d),
|
|
21
|
+
rh: (v = c.relative_humidity_2m) == null ? void 0 : v.at(d),
|
|
22
|
+
dp: (M = c.dew_point_2m) == null ? void 0 : M.at(d),
|
|
23
23
|
precip: {
|
|
24
|
-
probability: (C = c.precipitation_probability) == null ? void 0 : C.at(
|
|
25
|
-
sum: (S = c.precipitation) == null ? void 0 : S.at(
|
|
24
|
+
probability: (C = c.precipitation_probability) == null ? void 0 : C.at(d),
|
|
25
|
+
sum: (S = c.precipitation) == null ? void 0 : S.at(d)
|
|
26
26
|
},
|
|
27
|
-
pmsl: (L = c.pressure_msl) == null ? void 0 : L.at(
|
|
28
|
-
psurf: (N = c.surface_pressure) == null ? void 0 : N.at(
|
|
29
|
-
code: (I = c.weather_code) == null ? void 0 : I.at(
|
|
30
|
-
visibility: this.m2nm((P = c.visibility) == null ? void 0 : P.at(
|
|
27
|
+
pmsl: (L = c.pressure_msl) == null ? void 0 : L.at(d),
|
|
28
|
+
psurf: (N = c.surface_pressure) == null ? void 0 : N.at(d),
|
|
29
|
+
code: (I = c.weather_code) == null ? void 0 : I.at(d),
|
|
30
|
+
visibility: this.m2nm((P = c.visibility) == null ? void 0 : P.at(d)),
|
|
31
31
|
wind: {
|
|
32
|
-
speed: (H = c.wind_speed_10m) == null ? void 0 : H.at(
|
|
33
|
-
kts: (a = c.wind_speed_10m) == null ? void 0 : a.at(
|
|
34
|
-
degree: (r = c.wind_direction_10m) == null ? void 0 : r.at(
|
|
35
|
-
bearing: ((q = c.wind_direction_10m) == null ? void 0 : q.at(
|
|
36
|
-
gusts: (T = c.wind_gusts_10m) == null ? void 0 : T.at(
|
|
32
|
+
speed: (H = c.wind_speed_10m) == null ? void 0 : H.at(d),
|
|
33
|
+
kts: (a = c.wind_speed_10m) == null ? void 0 : a.at(d),
|
|
34
|
+
degree: (r = c.wind_direction_10m) == null ? void 0 : r.at(d),
|
|
35
|
+
bearing: ((q = c.wind_direction_10m) == null ? void 0 : q.at(d)) !== null ? (((D = c.wind_direction_10m) == null ? void 0 : D.at(d)) + 180) % 360 : null,
|
|
36
|
+
gusts: (T = c.wind_gusts_10m) == null ? void 0 : T.at(d)
|
|
37
37
|
},
|
|
38
|
-
isDay: (R = c.is_day) == null ? void 0 : R.at(
|
|
38
|
+
isDay: (R = c.is_day) == null ? void 0 : R.at(d)
|
|
39
39
|
};
|
|
40
|
-
const { name:
|
|
41
|
-
j.name =
|
|
40
|
+
const { name: ft, url: yt, bg: _t } = this.parseWeatherCode(j.code, j.isDay);
|
|
41
|
+
j.name = ft, j.url = yt, j.bg = _t, j.wind.scale = this.beaufort(this.kts2ms(j.wind.kts)), j.wind.direction = this.degree2Direction(j.wind.degree);
|
|
42
42
|
}
|
|
43
|
-
if (
|
|
44
|
-
for (const
|
|
45
|
-
const c =
|
|
46
|
-
|
|
43
|
+
if (mt)
|
|
44
|
+
for (const rt of mt) {
|
|
45
|
+
const c = rt.hourly;
|
|
46
|
+
tt = {
|
|
47
47
|
wave: {
|
|
48
48
|
sig: {
|
|
49
|
-
height: (A = c.wave_height) == null ? void 0 : A.at(
|
|
50
|
-
degree: (E = c.wave_direction) == null ? void 0 : E.at(
|
|
51
|
-
bearing: ((G = c.wave_direction) == null ? void 0 : G.at(
|
|
52
|
-
period: (B = c.wave_period) == null ? void 0 : B.at(
|
|
49
|
+
height: (A = c.wave_height) == null ? void 0 : A.at(d),
|
|
50
|
+
degree: (E = c.wave_direction) == null ? void 0 : E.at(d),
|
|
51
|
+
bearing: ((G = c.wave_direction) == null ? void 0 : G.at(d)) !== null ? (((F = c.wave_direction) == null ? void 0 : F.at(d)) + 180) % 360 : null,
|
|
52
|
+
period: (B = c.wave_period) == null ? void 0 : B.at(d)
|
|
53
53
|
},
|
|
54
54
|
swell: {
|
|
55
|
-
height: (
|
|
56
|
-
degree: (
|
|
57
|
-
bearing: ((U = c.swell_wave_direction) == null ? void 0 : U.at(
|
|
58
|
-
period: (Z = c.swell_wave_period) == null ? void 0 : Z.at(
|
|
59
|
-
peakPeriod: (Y = c.swell_wave_peak_period) == null ? void 0 : Y.at(
|
|
55
|
+
height: (O = c.swell_wave_height) == null ? void 0 : O.at(d),
|
|
56
|
+
degree: (V = c.swell_wave_direction) == null ? void 0 : V.at(d),
|
|
57
|
+
bearing: ((U = c.swell_wave_direction) == null ? void 0 : U.at(d)) !== null ? (((J = c.swell_wave_direction) == null ? void 0 : J.at(d)) + 180) % 360 : null,
|
|
58
|
+
period: (Z = c.swell_wave_period) == null ? void 0 : Z.at(d),
|
|
59
|
+
peakPeriod: (Y = c.swell_wave_peak_period) == null ? void 0 : Y.at(d)
|
|
60
60
|
},
|
|
61
61
|
wd: {
|
|
62
|
-
height: (
|
|
63
|
-
degree: (
|
|
64
|
-
bearing: ((
|
|
65
|
-
period: (W = c.wind_wave_period) == null ? void 0 : W.at(
|
|
66
|
-
peakPeriod: (
|
|
62
|
+
height: (u = c.wind_wave_height) == null ? void 0 : u.at(d),
|
|
63
|
+
degree: (k = c.wind_wave_direction) == null ? void 0 : k.at(d),
|
|
64
|
+
bearing: ((w = c.wind_wave_direction) == null ? void 0 : w.at(d)) !== null ? (((z = c.wind_wave_direction) == null ? void 0 : z.at(d)) + 180) % 360 : null,
|
|
65
|
+
period: (W = c.wind_wave_period) == null ? void 0 : W.at(d),
|
|
66
|
+
peakPeriod: (p = c.wind_wave_peak_period) == null ? void 0 : p.at(d)
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
current: {
|
|
70
|
-
speed: (
|
|
71
|
-
kts: (
|
|
72
|
-
degree: ($ = c.ocean_current_direction) == null ? void 0 : $.at(
|
|
73
|
-
bearing: ((g = c.ocean_current_direction) == null ? void 0 : g.at(
|
|
70
|
+
speed: (K = c.ocean_current_velocity) == null ? void 0 : K.at(d),
|
|
71
|
+
kts: (m = c.ocean_current_velocity) == null ? void 0 : m.at(d),
|
|
72
|
+
degree: ($ = c.ocean_current_direction) == null ? void 0 : $.at(d),
|
|
73
|
+
bearing: ((g = c.ocean_current_direction) == null ? void 0 : g.at(d)) ?? null
|
|
74
74
|
},
|
|
75
|
-
sst: (
|
|
76
|
-
height: (
|
|
77
|
-
},
|
|
75
|
+
sst: (st = c.sea_surface_temperature) == null ? void 0 : st.at(d),
|
|
76
|
+
height: (at = c.sea_level_height_msl) == null ? void 0 : at.at(d)
|
|
77
|
+
}, tt.wave = this.parseWave(tt.wave), tt.current.direction = this.degree2Direction(tt.current.degree);
|
|
78
78
|
}
|
|
79
|
-
|
|
80
|
-
utc:
|
|
79
|
+
ut.push({
|
|
80
|
+
utc: ot.add(d, "h").format(),
|
|
81
81
|
weather: { ...j },
|
|
82
|
-
...
|
|
82
|
+
...tt
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
-
return
|
|
85
|
+
return ut;
|
|
86
86
|
}
|
|
87
|
-
static toLegacy(
|
|
87
|
+
static toLegacy(t) {
|
|
88
88
|
return {
|
|
89
|
-
wind:
|
|
90
|
-
visibility:
|
|
91
|
-
temp:
|
|
92
|
-
prmsl:
|
|
89
|
+
wind: t.weather.wind,
|
|
90
|
+
visibility: t.weather.visibility,
|
|
91
|
+
temp: t.weather.temp,
|
|
92
|
+
prmsl: t.weather.pmsl,
|
|
93
93
|
gusts: {
|
|
94
|
-
kts:
|
|
94
|
+
kts: t.weather.wind.gusts
|
|
95
95
|
},
|
|
96
|
-
precip:
|
|
97
|
-
code:
|
|
98
|
-
name:
|
|
99
|
-
url:
|
|
100
|
-
wave:
|
|
101
|
-
current:
|
|
102
|
-
sst:
|
|
103
|
-
height:
|
|
104
|
-
utc:
|
|
96
|
+
precip: t.weather.precip,
|
|
97
|
+
code: t.weather.code,
|
|
98
|
+
name: t.weather.name,
|
|
99
|
+
url: t.weather.url,
|
|
100
|
+
wave: t.wave,
|
|
101
|
+
current: t.current,
|
|
102
|
+
sst: t.sst,
|
|
103
|
+
height: t.height,
|
|
104
|
+
utc: t.utc
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
static pickDaily(
|
|
108
|
-
var
|
|
109
|
-
const Y = typeof
|
|
110
|
-
if (Y.isBetween(
|
|
111
|
-
let
|
|
112
|
-
const
|
|
113
|
-
if (
|
|
114
|
-
for (const $ of
|
|
107
|
+
static pickDaily(t, e) {
|
|
108
|
+
var h, s, v, M, C, S, L, N, I, P, H, a, r, q, D, T, R, A, E, G, F, B, O, V, U, J, Z;
|
|
109
|
+
const Y = typeof e == "string" ? Q(e) : e, u = t.weather, k = t.marine, w = Q(u[0].daily.time.at(0)), z = Q(u[0].daily.time.at(-1)), W = [];
|
|
110
|
+
if (Y.isBetween(w, z, "millisecond", "[]")) {
|
|
111
|
+
let p, K;
|
|
112
|
+
const m = Y.diff(w, "d", !1);
|
|
113
|
+
if (u)
|
|
114
|
+
for (const $ of u) {
|
|
115
115
|
const g = $.daily;
|
|
116
|
-
|
|
117
|
-
code: (
|
|
116
|
+
p = {
|
|
117
|
+
code: (h = g.weather_code) == null ? void 0 : h.at(m),
|
|
118
118
|
temp: {
|
|
119
|
-
max: (s = g.temperature_2m_max) == null ? void 0 : s.at(
|
|
120
|
-
min: (v = g.temperature_2m_min) == null ? void 0 : v.at(
|
|
121
|
-
mean: (M = g.temperature_2m_mean) == null ? void 0 : M.at(
|
|
119
|
+
max: (s = g.temperature_2m_max) == null ? void 0 : s.at(m),
|
|
120
|
+
min: (v = g.temperature_2m_min) == null ? void 0 : v.at(m),
|
|
121
|
+
mean: (M = g.temperature_2m_mean) == null ? void 0 : M.at(m)
|
|
122
122
|
},
|
|
123
123
|
apparentTemp: {
|
|
124
|
-
max: (C = g.apparent_temperature_max) == null ? void 0 : C.at(
|
|
125
|
-
min: (S = g.apparent_temperature_min) == null ? void 0 : S.at(
|
|
124
|
+
max: (C = g.apparent_temperature_max) == null ? void 0 : C.at(m),
|
|
125
|
+
min: (S = g.apparent_temperature_min) == null ? void 0 : S.at(m)
|
|
126
126
|
},
|
|
127
127
|
precip: {
|
|
128
|
-
sum: (L = g.precipitation_sum) == null ? void 0 : L.at(
|
|
129
|
-
hours: (N = g.precipitation_hours) == null ? void 0 : N.at(
|
|
130
|
-
probability: (I = g.precipitation_probability_max) == null ? void 0 : I.at(
|
|
128
|
+
sum: (L = g.precipitation_sum) == null ? void 0 : L.at(m),
|
|
129
|
+
hours: (N = g.precipitation_hours) == null ? void 0 : N.at(m),
|
|
130
|
+
probability: (I = g.precipitation_probability_max) == null ? void 0 : I.at(m)
|
|
131
131
|
},
|
|
132
132
|
rh: {
|
|
133
|
-
max: (P = g.relative_humidity_2m_max) == null ? void 0 : P.at(
|
|
134
|
-
min: (H = g.relative_humidity_2m_min) == null ? void 0 : H.at(
|
|
135
|
-
mean: (a = g.relative_humidity_2m_mean) == null ? void 0 : a.at(
|
|
133
|
+
max: (P = g.relative_humidity_2m_max) == null ? void 0 : P.at(m),
|
|
134
|
+
min: (H = g.relative_humidity_2m_min) == null ? void 0 : H.at(m),
|
|
135
|
+
mean: (a = g.relative_humidity_2m_mean) == null ? void 0 : a.at(m)
|
|
136
136
|
},
|
|
137
137
|
wind: {
|
|
138
|
-
speed: (r = g.wind_speed_10m_max) == null ? void 0 : r.at(
|
|
139
|
-
kts: (q = g.wind_speed_10m_max) == null ? void 0 : q.at(
|
|
140
|
-
degree: (
|
|
141
|
-
gusts: (T = g.wind_gusts_10m_max) == null ? void 0 : T.at(
|
|
138
|
+
speed: (r = g.wind_speed_10m_max) == null ? void 0 : r.at(m),
|
|
139
|
+
kts: (q = g.wind_speed_10m_max) == null ? void 0 : q.at(m),
|
|
140
|
+
degree: (D = g.wind_direction_10m_dominant) == null ? void 0 : D.at(m),
|
|
141
|
+
gusts: (T = g.wind_gusts_10m_max) == null ? void 0 : T.at(m)
|
|
142
142
|
}
|
|
143
143
|
};
|
|
144
|
-
const { name:
|
|
145
|
-
|
|
144
|
+
const { name: st, url: at, bg: it } = this.parseWeatherCode(p.code, !0);
|
|
145
|
+
p.name = st, p.url = at, p.bg = it, p.wind.scale = this.beaufort(this.kts2ms(p.wind.kts)), p.wind.direction = this.degree2Direction(p.wind.degree);
|
|
146
146
|
}
|
|
147
|
-
if (
|
|
148
|
-
for (const $ of
|
|
147
|
+
if (k)
|
|
148
|
+
for (const $ of k) {
|
|
149
149
|
const g = $.daily;
|
|
150
|
-
|
|
150
|
+
K = {
|
|
151
151
|
wave: {
|
|
152
152
|
sig: {
|
|
153
|
-
height: (R = g.wave_height_max) == null ? void 0 : R.at(
|
|
154
|
-
degree: (A = g.wave_direction_dominant) == null ? void 0 : A.at(
|
|
155
|
-
period: (E = g.wave_period_max) == null ? void 0 : E.at(
|
|
153
|
+
height: (R = g.wave_height_max) == null ? void 0 : R.at(m),
|
|
154
|
+
degree: (A = g.wave_direction_dominant) == null ? void 0 : A.at(m),
|
|
155
|
+
period: (E = g.wave_period_max) == null ? void 0 : E.at(m)
|
|
156
156
|
},
|
|
157
157
|
swell: {
|
|
158
|
-
height: (G = g.swell_wave_height_max) == null ? void 0 : G.at(
|
|
159
|
-
degree: (F = g.wave_direction_dominant) == null ? void 0 : F.at(
|
|
160
|
-
period: (B = g.swell_wave_period_max) == null ? void 0 : B.at(
|
|
161
|
-
peakPeriod: (
|
|
158
|
+
height: (G = g.swell_wave_height_max) == null ? void 0 : G.at(m),
|
|
159
|
+
degree: (F = g.wave_direction_dominant) == null ? void 0 : F.at(m),
|
|
160
|
+
period: (B = g.swell_wave_period_max) == null ? void 0 : B.at(m),
|
|
161
|
+
peakPeriod: (O = g.swell_wave_peak_period_max) == null ? void 0 : O.at(m)
|
|
162
162
|
},
|
|
163
163
|
wd: {
|
|
164
|
-
height: (
|
|
165
|
-
degree: (U = g.wind_wave_direction_dominant) == null ? void 0 : U.at(
|
|
166
|
-
period: (J = g.wind_wave_period_max) == null ? void 0 : J.at(
|
|
167
|
-
peakPeriod: (Z = g.wind_wave_peak_period_max) == null ? void 0 : Z.at(
|
|
164
|
+
height: (V = g.wind_wave_height_max) == null ? void 0 : V.at(m),
|
|
165
|
+
degree: (U = g.wind_wave_direction_dominant) == null ? void 0 : U.at(m),
|
|
166
|
+
period: (J = g.wind_wave_period_max) == null ? void 0 : J.at(m),
|
|
167
|
+
peakPeriod: (Z = g.wind_wave_peak_period_max) == null ? void 0 : Z.at(m)
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
},
|
|
170
|
+
}, K.wave = this.parseWave(K.wave);
|
|
171
171
|
}
|
|
172
172
|
W.push({
|
|
173
|
-
utc:
|
|
174
|
-
weather: { ...
|
|
175
|
-
...
|
|
173
|
+
utc: w.add(m, "d").utc().format(),
|
|
174
|
+
weather: { ...p },
|
|
175
|
+
...K
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
178
|
return W;
|
|
179
179
|
}
|
|
180
|
-
static parseWave(
|
|
181
|
-
return
|
|
180
|
+
static parseWave(t) {
|
|
181
|
+
return t.sig.direction = this.degree2Direction(t.sig.degree), t.swell.direction = this.degree2Direction(t.swell.degree), t.wd.direction = this.degree2Direction(t.wd.degree), t.sig.scale = this.douglas(t.sig.height), t.swell.scale = this.douglas(t.swell.height), t.wd.scale = this.douglas(t.wd.height), t;
|
|
182
182
|
}
|
|
183
|
-
static parseWeatherCode(
|
|
184
|
-
const
|
|
185
|
-
return (
|
|
183
|
+
static parseWeatherCode(t, e) {
|
|
184
|
+
const h = this.weatherCode(t);
|
|
185
|
+
return (e ? h.day : h.night) || {};
|
|
186
186
|
}
|
|
187
|
-
static weatherCode(
|
|
188
|
-
const
|
|
189
|
-
code:
|
|
187
|
+
static weatherCode(t) {
|
|
188
|
+
const e = {
|
|
189
|
+
code: t
|
|
190
190
|
};
|
|
191
|
-
switch (
|
|
191
|
+
switch (t) {
|
|
192
192
|
case 0:
|
|
193
|
-
|
|
193
|
+
e.day = {
|
|
194
194
|
name: "Sunny",
|
|
195
|
-
url: "https://osshz.idmwx.com/asset/weather/01d.svg"
|
|
196
|
-
|
|
195
|
+
url: "https://osshz.idmwx.com/asset/weather/01d.svg",
|
|
196
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg1.png"
|
|
197
|
+
}, e.night = {
|
|
197
198
|
name: "Clear",
|
|
198
|
-
url: "https://osshz.idmwx.com/asset/weather/01n.svg"
|
|
199
|
+
url: "https://osshz.idmwx.com/asset/weather/01n.svg",
|
|
200
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg1.png"
|
|
199
201
|
};
|
|
200
202
|
break;
|
|
201
203
|
case 1:
|
|
202
|
-
|
|
204
|
+
e.day = {
|
|
203
205
|
name: "Mainly Sunny",
|
|
204
|
-
url: "https://osshz.idmwx.com/asset/weather/01d.svg"
|
|
205
|
-
|
|
206
|
+
url: "https://osshz.idmwx.com/asset/weather/01d.svg",
|
|
207
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg1.png"
|
|
208
|
+
}, e.night = {
|
|
206
209
|
name: "Mainly Clear",
|
|
207
|
-
url: "https://osshz.idmwx.com/asset/weather/01n.svg"
|
|
210
|
+
url: "https://osshz.idmwx.com/asset/weather/01n.svg",
|
|
211
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg1.png"
|
|
208
212
|
};
|
|
209
213
|
break;
|
|
210
214
|
case 2:
|
|
211
|
-
|
|
215
|
+
e.day = {
|
|
212
216
|
name: "Partly Cloudy",
|
|
213
|
-
url: "https://osshz.idmwx.com/asset/weather/02d.svg"
|
|
214
|
-
|
|
217
|
+
url: "https://osshz.idmwx.com/asset/weather/02d.svg",
|
|
218
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg2.png"
|
|
219
|
+
}, e.night = {
|
|
215
220
|
name: "Partly Cloudy",
|
|
216
|
-
url: "https://osshz.idmwx.com/asset/weather/02n.svg"
|
|
221
|
+
url: "https://osshz.idmwx.com/asset/weather/02n.svg",
|
|
222
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg2.png"
|
|
217
223
|
};
|
|
218
224
|
break;
|
|
219
225
|
case 3:
|
|
220
|
-
|
|
221
|
-
name: "
|
|
222
|
-
url: "https://osshz.idmwx.com/asset/weather/
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
+
e.day = {
|
|
227
|
+
name: "Overcast",
|
|
228
|
+
url: "https://osshz.idmwx.com/asset/weather/04d.svg",
|
|
229
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg3.png"
|
|
230
|
+
}, e.night = {
|
|
231
|
+
name: "Overcast",
|
|
232
|
+
url: "https://osshz.idmwx.com/asset/weather/04n.svg",
|
|
233
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg3.png"
|
|
226
234
|
};
|
|
227
235
|
break;
|
|
228
236
|
case 45:
|
|
229
|
-
|
|
237
|
+
e.day = {
|
|
230
238
|
name: "Foggy",
|
|
231
|
-
url: "https://osshz.idmwx.com/asset/weather/50d.svg"
|
|
232
|
-
|
|
239
|
+
url: "https://osshz.idmwx.com/asset/weather/50d.svg",
|
|
240
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg4.png"
|
|
241
|
+
}, e.night = {
|
|
233
242
|
name: "Foggy",
|
|
234
|
-
url: "https://osshz.idmwx.com/asset/weather/50n.svg"
|
|
243
|
+
url: "https://osshz.idmwx.com/asset/weather/50n.svg",
|
|
244
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg4.png"
|
|
235
245
|
};
|
|
236
246
|
break;
|
|
237
247
|
case 48:
|
|
238
|
-
|
|
248
|
+
e.day = {
|
|
239
249
|
name: "Rime Fog",
|
|
240
|
-
url: "https://osshz.idmwx.com/asset/weather/50d.svg"
|
|
241
|
-
|
|
250
|
+
url: "https://osshz.idmwx.com/asset/weather/50d.svg",
|
|
251
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg4.png"
|
|
252
|
+
}, e.night = {
|
|
242
253
|
name: "Rime Fog",
|
|
243
|
-
url: "https://osshz.idmwx.com/asset/weather/50n.svg"
|
|
254
|
+
url: "https://osshz.idmwx.com/asset/weather/50n.svg",
|
|
255
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg4.png"
|
|
244
256
|
};
|
|
245
257
|
break;
|
|
246
258
|
case 51:
|
|
247
|
-
|
|
259
|
+
e.day = {
|
|
248
260
|
name: "Light Drizzle",
|
|
249
|
-
url: "https://osshz.idmwx.com/asset/weather/
|
|
250
|
-
|
|
261
|
+
url: "https://osshz.idmwx.com/asset/weather/14d.svg",
|
|
262
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
263
|
+
}, e.night = {
|
|
251
264
|
name: "Light Drizzle",
|
|
252
|
-
url: "https://osshz.idmwx.com/asset/weather/09n.svg"
|
|
265
|
+
url: "https://osshz.idmwx.com/asset/weather/09n.svg",
|
|
266
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
253
267
|
};
|
|
254
268
|
break;
|
|
255
269
|
case 53:
|
|
256
|
-
|
|
270
|
+
e.day = {
|
|
257
271
|
name: "Drizzle",
|
|
258
|
-
url: "https://osshz.idmwx.com/asset/weather/
|
|
259
|
-
|
|
272
|
+
url: "https://osshz.idmwx.com/asset/weather/14d.svg",
|
|
273
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
274
|
+
}, e.night = {
|
|
260
275
|
name: "Drizzle",
|
|
261
|
-
url: "https://osshz.idmwx.com/asset/weather/09n.svg"
|
|
276
|
+
url: "https://osshz.idmwx.com/asset/weather/09n.svg",
|
|
277
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
262
278
|
};
|
|
263
279
|
break;
|
|
264
280
|
case 55:
|
|
265
|
-
|
|
281
|
+
e.day = {
|
|
266
282
|
name: "Heavy Drizzle",
|
|
267
|
-
url: "https://osshz.idmwx.com/asset/weather/
|
|
268
|
-
|
|
283
|
+
url: "https://osshz.idmwx.com/asset/weather/15d.svg",
|
|
284
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
285
|
+
}, e.night = {
|
|
269
286
|
name: "Heavy Drizzle",
|
|
270
|
-
url: "https://osshz.idmwx.com/asset/weather/
|
|
287
|
+
url: "https://osshz.idmwx.com/asset/weather/15n.svg",
|
|
288
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
271
289
|
};
|
|
272
290
|
break;
|
|
273
291
|
case 56:
|
|
274
|
-
|
|
292
|
+
e.day = {
|
|
275
293
|
name: "Light Freezing Drizzle",
|
|
276
|
-
url: "https://osshz.idmwx.com/asset/weather/
|
|
277
|
-
|
|
294
|
+
url: "https://osshz.idmwx.com/asset/weather/14d.svg",
|
|
295
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
296
|
+
}, e.night = {
|
|
278
297
|
name: "Light Freezing Drizzle",
|
|
279
|
-
url: "https://osshz.idmwx.com/asset/weather/09n.svg"
|
|
298
|
+
url: "https://osshz.idmwx.com/asset/weather/09n.svg",
|
|
299
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
280
300
|
};
|
|
281
301
|
break;
|
|
282
302
|
case 57:
|
|
283
|
-
|
|
303
|
+
e.day = {
|
|
284
304
|
name: "Freezing Drizzle",
|
|
285
|
-
url: "https://osshz.idmwx.com/asset/weather/
|
|
286
|
-
|
|
305
|
+
url: "https://osshz.idmwx.com/asset/weather/14d.svg",
|
|
306
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
307
|
+
}, e.night = {
|
|
287
308
|
name: "Freezing Drizzle",
|
|
288
|
-
url: "https://osshz.idmwx.com/asset/weather/09n.svg"
|
|
309
|
+
url: "https://osshz.idmwx.com/asset/weather/09n.svg",
|
|
310
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
289
311
|
};
|
|
290
312
|
break;
|
|
291
313
|
case 61:
|
|
292
|
-
|
|
314
|
+
e.day = {
|
|
293
315
|
name: "Light Rain",
|
|
294
|
-
url: "https://osshz.idmwx.com/asset/weather/
|
|
295
|
-
|
|
316
|
+
url: "https://osshz.idmwx.com/asset/weather/16d.svg",
|
|
317
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
318
|
+
}, e.night = {
|
|
296
319
|
name: "Light Rain",
|
|
297
|
-
url: "https://osshz.idmwx.com/asset/weather/10n.svg"
|
|
320
|
+
url: "https://osshz.idmwx.com/asset/weather/10n.svg",
|
|
321
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
298
322
|
};
|
|
299
323
|
break;
|
|
300
324
|
case 63:
|
|
301
|
-
|
|
325
|
+
e.day = {
|
|
302
326
|
name: "Rain",
|
|
303
|
-
url: "https://osshz.idmwx.com/asset/weather/
|
|
304
|
-
|
|
327
|
+
url: "https://osshz.idmwx.com/asset/weather/16d.svg",
|
|
328
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
329
|
+
}, e.night = {
|
|
305
330
|
name: "Rain",
|
|
306
|
-
url: "https://osshz.idmwx.com/asset/weather/10n.svg"
|
|
331
|
+
url: "https://osshz.idmwx.com/asset/weather/10n.svg",
|
|
332
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
307
333
|
};
|
|
308
334
|
break;
|
|
309
335
|
case 65:
|
|
310
|
-
|
|
336
|
+
e.day = {
|
|
311
337
|
name: "Heavy Rain",
|
|
312
|
-
url: "https://osshz.idmwx.com/asset/weather/
|
|
313
|
-
|
|
338
|
+
url: "https://osshz.idmwx.com/asset/weather/16d.svg",
|
|
339
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
340
|
+
}, e.night = {
|
|
314
341
|
name: "Heavy Rain",
|
|
315
|
-
url: "https://osshz.idmwx.com/asset/weather/10n.svg"
|
|
342
|
+
url: "https://osshz.idmwx.com/asset/weather/10n.svg",
|
|
343
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
316
344
|
};
|
|
317
345
|
break;
|
|
318
346
|
case 66:
|
|
319
|
-
|
|
347
|
+
e.day = {
|
|
320
348
|
name: "Light Freezing Rain",
|
|
321
|
-
url: "https://osshz.idmwx.com/asset/weather/
|
|
322
|
-
|
|
349
|
+
url: "https://osshz.idmwx.com/asset/weather/16d.svg",
|
|
350
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
351
|
+
}, e.night = {
|
|
323
352
|
name: "Light Freezing Rain",
|
|
324
|
-
url: "https://osshz.idmwx.com/asset/weather/10n.svg"
|
|
353
|
+
url: "https://osshz.idmwx.com/asset/weather/10n.svg",
|
|
354
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
325
355
|
};
|
|
326
356
|
break;
|
|
327
357
|
case 67:
|
|
328
|
-
|
|
358
|
+
e.day = {
|
|
329
359
|
name: "Freezing Rain",
|
|
330
|
-
url: "https://osshz.idmwx.com/asset/weather/
|
|
331
|
-
|
|
360
|
+
url: "https://osshz.idmwx.com/asset/weather/16d.svg",
|
|
361
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
362
|
+
}, e.night = {
|
|
332
363
|
name: "Freezing Rain",
|
|
333
|
-
url: "https://osshz.idmwx.com/asset/weather/10n.svg"
|
|
364
|
+
url: "https://osshz.idmwx.com/asset/weather/10n.svg",
|
|
365
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
334
366
|
};
|
|
335
367
|
break;
|
|
336
368
|
case 71:
|
|
337
|
-
|
|
369
|
+
e.day = {
|
|
338
370
|
name: "Light Snow",
|
|
339
|
-
url: "https://osshz.idmwx.com/asset/weather/
|
|
340
|
-
|
|
371
|
+
url: "https://osshz.idmwx.com/asset/weather/17d.svg",
|
|
372
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg6.png"
|
|
373
|
+
}, e.night = {
|
|
341
374
|
name: "Light Snow",
|
|
342
|
-
url: "https://osshz.idmwx.com/asset/weather/13n.svg"
|
|
375
|
+
url: "https://osshz.idmwx.com/asset/weather/13n.svg",
|
|
376
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg6.png"
|
|
343
377
|
};
|
|
344
378
|
break;
|
|
345
379
|
case 73:
|
|
346
|
-
|
|
380
|
+
e.day = {
|
|
347
381
|
name: "Snow",
|
|
348
|
-
url: "https://osshz.idmwx.com/asset/weather/
|
|
349
|
-
|
|
382
|
+
url: "https://osshz.idmwx.com/asset/weather/17d.svg",
|
|
383
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg6.png"
|
|
384
|
+
}, e.night = {
|
|
350
385
|
name: "Snow",
|
|
351
|
-
url: "https://osshz.idmwx.com/asset/weather/13n.svg"
|
|
386
|
+
url: "https://osshz.idmwx.com/asset/weather/13n.svg",
|
|
387
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg6.png"
|
|
352
388
|
};
|
|
353
389
|
break;
|
|
354
390
|
case 75:
|
|
355
|
-
|
|
391
|
+
e.day = {
|
|
356
392
|
name: "Heavy Snow",
|
|
357
|
-
url: "https://osshz.idmwx.com/asset/weather/
|
|
358
|
-
|
|
393
|
+
url: "https://osshz.idmwx.com/asset/weather/17d.svg",
|
|
394
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg6.png"
|
|
395
|
+
}, e.night = {
|
|
359
396
|
name: "Heavy Snow",
|
|
360
|
-
url: "https://osshz.idmwx.com/asset/weather/13n.svg"
|
|
397
|
+
url: "https://osshz.idmwx.com/asset/weather/13n.svg",
|
|
398
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg6.png"
|
|
361
399
|
};
|
|
362
400
|
break;
|
|
363
401
|
case 77:
|
|
364
|
-
|
|
402
|
+
e.day = {
|
|
365
403
|
name: "Snow Grains",
|
|
366
|
-
url: "https://osshz.idmwx.com/asset/weather/
|
|
367
|
-
|
|
404
|
+
url: "https://osshz.idmwx.com/asset/weather/17d.svg",
|
|
405
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg6.png"
|
|
406
|
+
}, e.night = {
|
|
368
407
|
name: "Snow Grains",
|
|
369
|
-
url: "https://osshz.idmwx.com/asset/weather/13n.svg"
|
|
408
|
+
url: "https://osshz.idmwx.com/asset/weather/13n.svg",
|
|
409
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg6.png"
|
|
370
410
|
};
|
|
371
411
|
break;
|
|
372
412
|
case 80:
|
|
373
|
-
|
|
413
|
+
e.day = {
|
|
374
414
|
name: "Light Showers",
|
|
375
|
-
url: "https://osshz.idmwx.com/asset/weather/09d.svg"
|
|
376
|
-
|
|
415
|
+
url: "https://osshz.idmwx.com/asset/weather/09d.svg",
|
|
416
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
417
|
+
}, e.night = {
|
|
377
418
|
name: "Light Showers",
|
|
378
|
-
url: "https://osshz.idmwx.com/asset/weather/09n.svg"
|
|
419
|
+
url: "https://osshz.idmwx.com/asset/weather/09n.svg",
|
|
420
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
379
421
|
};
|
|
380
422
|
break;
|
|
381
423
|
case 81:
|
|
382
|
-
|
|
424
|
+
e.day = {
|
|
383
425
|
name: "Showers",
|
|
384
|
-
url: "https://osshz.idmwx.com/asset/weather/09d.svg"
|
|
385
|
-
|
|
426
|
+
url: "https://osshz.idmwx.com/asset/weather/09d.svg",
|
|
427
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
428
|
+
}, e.night = {
|
|
386
429
|
name: "Showers",
|
|
387
|
-
url: "https://osshz.idmwx.com/asset/weather/09n.svg"
|
|
430
|
+
url: "https://osshz.idmwx.com/asset/weather/09n.svg",
|
|
431
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
388
432
|
};
|
|
389
433
|
break;
|
|
390
434
|
case 82:
|
|
391
|
-
|
|
435
|
+
e.day = {
|
|
392
436
|
name: "Heavy Showers",
|
|
393
|
-
url: "https://osshz.idmwx.com/asset/weather/09d.svg"
|
|
394
|
-
|
|
437
|
+
url: "https://osshz.idmwx.com/asset/weather/09d.svg",
|
|
438
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
439
|
+
}, e.night = {
|
|
395
440
|
name: "Heavy Showers",
|
|
396
|
-
url: "https://osshz.idmwx.com/asset/weather/09n.svg"
|
|
441
|
+
url: "https://osshz.idmwx.com/asset/weather/09n.svg",
|
|
442
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
397
443
|
};
|
|
398
444
|
break;
|
|
399
445
|
case 85:
|
|
400
|
-
|
|
446
|
+
e.day = {
|
|
401
447
|
name: "Light Snow Showers",
|
|
402
|
-
url: "https://osshz.idmwx.com/asset/weather/13d.svg"
|
|
403
|
-
|
|
448
|
+
url: "https://osshz.idmwx.com/asset/weather/13d.svg",
|
|
449
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg6.png"
|
|
450
|
+
}, e.night = {
|
|
404
451
|
name: "Light Snow Showers",
|
|
405
|
-
url: "https://osshz.idmwx.com/asset/weather/13n.svg"
|
|
452
|
+
url: "https://osshz.idmwx.com/asset/weather/13n.svg",
|
|
453
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg6.png"
|
|
406
454
|
};
|
|
407
455
|
break;
|
|
408
456
|
case 86:
|
|
409
|
-
|
|
457
|
+
e.day = {
|
|
410
458
|
name: "Snow Showers",
|
|
411
|
-
url: "https://osshz.idmwx.com/asset/weather/13d.svg"
|
|
412
|
-
|
|
459
|
+
url: "https://osshz.idmwx.com/asset/weather/13d.svg",
|
|
460
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg6.png"
|
|
461
|
+
}, e.night = {
|
|
413
462
|
name: "Snow Showers",
|
|
414
|
-
url: "https://osshz.idmwx.com/asset/weather/13n.svg"
|
|
463
|
+
url: "https://osshz.idmwx.com/asset/weather/13n.svg",
|
|
464
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg6.png"
|
|
415
465
|
};
|
|
416
466
|
break;
|
|
417
467
|
case 95:
|
|
418
|
-
|
|
468
|
+
e.day = {
|
|
419
469
|
name: "Thunderstorm",
|
|
420
|
-
url: "https://osshz.idmwx.com/asset/weather/11d.svg"
|
|
421
|
-
|
|
470
|
+
url: "https://osshz.idmwx.com/asset/weather/11d.svg",
|
|
471
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
472
|
+
}, e.night = {
|
|
422
473
|
name: "Thunderstorm",
|
|
423
|
-
url: "https://osshz.idmwx.com/asset/weather/11n.svg"
|
|
474
|
+
url: "https://osshz.idmwx.com/asset/weather/11n.svg",
|
|
475
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
424
476
|
};
|
|
425
477
|
break;
|
|
426
478
|
case 96:
|
|
427
|
-
|
|
479
|
+
e.day = {
|
|
428
480
|
name: "Light Thunderstorms With Hail",
|
|
429
|
-
url: "https://osshz.idmwx.com/asset/weather/11d.svg"
|
|
430
|
-
|
|
481
|
+
url: "https://osshz.idmwx.com/asset/weather/11d.svg",
|
|
482
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
483
|
+
}, e.night = {
|
|
431
484
|
name: "Light Thunderstorms With Hail",
|
|
432
|
-
url: "https://osshz.idmwx.com/asset/weather/11n.svg"
|
|
485
|
+
url: "https://osshz.idmwx.com/asset/weather/11n.svg",
|
|
486
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
433
487
|
};
|
|
434
488
|
break;
|
|
435
489
|
case 99:
|
|
436
|
-
|
|
490
|
+
e.day = {
|
|
437
491
|
name: "Thunderstorms With Hail",
|
|
438
|
-
url: "https://osshz.idmwx.com/asset/weather/11d.svg"
|
|
439
|
-
|
|
492
|
+
url: "https://osshz.idmwx.com/asset/weather/11d.svg",
|
|
493
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
494
|
+
}, e.night = {
|
|
440
495
|
name: "Thunderstorms With Hail",
|
|
441
|
-
url: "https://osshz.idmwx.com/asset/weather/11n.svg"
|
|
496
|
+
url: "https://osshz.idmwx.com/asset/weather/11n.svg",
|
|
497
|
+
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
442
498
|
};
|
|
443
499
|
break;
|
|
444
500
|
}
|
|
445
|
-
return
|
|
501
|
+
return e;
|
|
446
502
|
}
|
|
447
|
-
static kts2ms(
|
|
448
|
-
return isNaN(
|
|
503
|
+
static kts2ms(t) {
|
|
504
|
+
return isNaN(t) || t === null ? t : Math.round(t * 1852 / 3600 * 1e4) / 1e4;
|
|
449
505
|
}
|
|
450
|
-
static kts2kmh(
|
|
451
|
-
return isNaN(
|
|
506
|
+
static kts2kmh(t) {
|
|
507
|
+
return isNaN(t) || t === null ? t : t * 1.852;
|
|
452
508
|
}
|
|
453
|
-
static m2nm(
|
|
454
|
-
return isNaN(
|
|
509
|
+
static m2nm(t) {
|
|
510
|
+
return isNaN(t) || t === null ? t : Math.round(t / 1e3 / 1.852 * 1e4) / 1e4;
|
|
455
511
|
}
|
|
456
|
-
static kmh2kts(
|
|
457
|
-
return isNaN(
|
|
512
|
+
static kmh2kts(t) {
|
|
513
|
+
return isNaN(t) || t === null ? t : this.ms2kts(t * 1e3 / 3600);
|
|
458
514
|
}
|
|
459
|
-
static ms2kts(
|
|
460
|
-
return isNaN(
|
|
515
|
+
static ms2kts(t) {
|
|
516
|
+
return isNaN(t) || t === null ? t : Math.round(t * 3600 / 1852 * 1e4) / 1e4;
|
|
461
517
|
}
|
|
462
518
|
/**
|
|
463
519
|
* 角度转为弧度
|
|
464
520
|
* @param degree
|
|
465
521
|
*/
|
|
466
|
-
static degree2Radian(
|
|
467
|
-
if (isNaN(
|
|
468
|
-
return
|
|
469
|
-
let
|
|
470
|
-
return
|
|
522
|
+
static degree2Radian(t) {
|
|
523
|
+
if (isNaN(t) || t === null)
|
|
524
|
+
return t;
|
|
525
|
+
let e = t % 360 / 360 * 2 * Math.PI;
|
|
526
|
+
return e = e < 0 ? e + 2 * Math.PI : e, e;
|
|
471
527
|
}
|
|
472
528
|
/**
|
|
473
529
|
* 将方位角转换为方向
|
|
474
530
|
* @param degree 角度[-360,360]
|
|
475
531
|
* @return {string}
|
|
476
532
|
*/
|
|
477
|
-
static degree2Direction(
|
|
478
|
-
const
|
|
479
|
-
if (isNaN(
|
|
533
|
+
static degree2Direction(t) {
|
|
534
|
+
const e = this.degree2Radian(t);
|
|
535
|
+
if (isNaN(e) || e === null)
|
|
480
536
|
return null;
|
|
481
|
-
let
|
|
537
|
+
let h = "N/A";
|
|
482
538
|
const s = Math.PI / 16;
|
|
483
|
-
return
|
|
539
|
+
return e < s ? h = "N" : e >= s && e < 3 * s ? h = "NNE" : e >= 3 * s && e < 5 * s ? h = "NE" : e >= 5 * s && e < 7 * s ? h = "ENE" : e >= 7 * s && e < 9 * s ? h = "E" : e >= 9 * s && e < 11 * s ? h = "ESE" : e >= 11 * s && e < 13 * s ? h = "SE" : e >= 13 * s && e < 15 * s ? h = "SSE" : e >= 15 * s && e < 17 * s ? h = "S" : e >= 17 * s && e < 19 * s ? h = "SSW" : e >= 19 * s && e < 21 * s ? h = "SW" : e >= 21 * s && e < 23 * s ? h = "WSW" : e >= 23 * s && e < 25 * s ? h = "W" : e >= 25 * s && e < 27 * s ? h = "WNW" : e >= 27 * s && e < 29 * s ? h = "NW" : e >= 29 * s && e < 31 * s ? h = "NNW" : e >= 31 * s && e < 32 * s && (h = "N"), h;
|
|
484
540
|
}
|
|
485
541
|
/**
|
|
486
542
|
* 计算风力蒲福等级
|
|
487
543
|
* @param speed m/s
|
|
488
544
|
* @returns {number}
|
|
489
545
|
*/
|
|
490
|
-
static beaufort(
|
|
491
|
-
let
|
|
492
|
-
return isNaN(
|
|
546
|
+
static beaufort(t) {
|
|
547
|
+
let e = 0;
|
|
548
|
+
return isNaN(t) || (t = Math.round(t * 10) / 10, t <= 0.2 ? e = 0 : t <= 1.5 ? e = 1 : t <= 3.3 ? e = 2 : t <= 5.4 ? e = 3 : t <= 7.9 ? e = 4 : t <= 10.7 ? e = 5 : t <= 13.8 ? e = 6 : t <= 17.1 ? e = 7 : t <= 20.7 ? e = 8 : t <= 22.4 ? e = 9 : t <= 28.4 ? e = 10 : t <= 32.6 ? e = 11 : t > 32.6 && (e = 12)), e;
|
|
493
549
|
}
|
|
494
550
|
/**
|
|
495
551
|
* 计算海浪等级
|
|
496
552
|
* @param height 高度 m
|
|
497
553
|
*/
|
|
498
|
-
static douglas(
|
|
499
|
-
let
|
|
500
|
-
return isNaN(
|
|
554
|
+
static douglas(t) {
|
|
555
|
+
let e = "Calm";
|
|
556
|
+
return isNaN(t) || t <= 0.1 ? e = "Calm" : t <= 0.5 ? e = "Smooth" : t <= 1.25 ? e = "Slight" : t <= 2.5 ? e = "Moderate" : t <= 4 ? e = "Rough" : t <= 6 ? e = "VeryRough" : t <= 9 ? e = "High" : t <= 14 ? e = "VeryHigh" : e = "Precipitous", e;
|
|
501
557
|
}
|
|
502
558
|
}
|
|
503
|
-
const
|
|
504
|
-
const
|
|
505
|
-
for (const [
|
|
506
|
-
|
|
507
|
-
return
|
|
508
|
-
},
|
|
559
|
+
const St = (l, t) => {
|
|
560
|
+
const e = l.__vccOpts || l;
|
|
561
|
+
for (const [h, s] of t)
|
|
562
|
+
e[h] = s;
|
|
563
|
+
return e;
|
|
564
|
+
}, Lt = {
|
|
509
565
|
name: "SpotReport",
|
|
510
|
-
// components: { Search }, //Download
|
|
511
566
|
props: {
|
|
512
567
|
token: {
|
|
513
568
|
type: String,
|
|
@@ -515,7 +570,7 @@ const ze = (l, e) => {
|
|
|
515
570
|
},
|
|
516
571
|
ts: {
|
|
517
572
|
type: String,
|
|
518
|
-
default:
|
|
573
|
+
default: Q().utc().format()
|
|
519
574
|
},
|
|
520
575
|
timeZone: {
|
|
521
576
|
type: Number,
|
|
@@ -526,11 +581,12 @@ const ze = (l, e) => {
|
|
|
526
581
|
default: () => ({})
|
|
527
582
|
}
|
|
528
583
|
},
|
|
584
|
+
emits: ["url"],
|
|
529
585
|
data() {
|
|
530
586
|
return {
|
|
531
587
|
placeholder: "search for port name or coordinates",
|
|
532
588
|
searchName: void 0,
|
|
533
|
-
rawSearchIcon:
|
|
589
|
+
rawSearchIcon: kt(zt),
|
|
534
590
|
positionGmt: void 0,
|
|
535
591
|
issuedDate: void 0,
|
|
536
592
|
meteoData: {},
|
|
@@ -554,7 +610,7 @@ const ze = (l, e) => {
|
|
|
554
610
|
},
|
|
555
611
|
computeHourZ() {
|
|
556
612
|
return function(l) {
|
|
557
|
-
return l ? `${
|
|
613
|
+
return l ? `${Q(l).utc().format("HH")}Z` : "-";
|
|
558
614
|
};
|
|
559
615
|
},
|
|
560
616
|
computeWeek() {
|
|
@@ -568,30 +624,30 @@ const ze = (l, e) => {
|
|
|
568
624
|
};
|
|
569
625
|
},
|
|
570
626
|
computeLat() {
|
|
571
|
-
return function(l,
|
|
572
|
-
return
|
|
627
|
+
return function(l, t = 4) {
|
|
628
|
+
return lt.lat2pretty(l, t).pretty;
|
|
573
629
|
};
|
|
574
630
|
},
|
|
575
631
|
computeLng() {
|
|
576
|
-
return function(l,
|
|
577
|
-
return
|
|
632
|
+
return function(l, t = 4) {
|
|
633
|
+
return lt.lng2pretty(l, t).pretty;
|
|
578
634
|
};
|
|
579
635
|
},
|
|
580
636
|
roundPrecision() {
|
|
581
|
-
return function(l,
|
|
582
|
-
return isNaN(l) ? "-" :
|
|
637
|
+
return function(l, t = 4) {
|
|
638
|
+
return isNaN(l) ? "-" : lt.roundPrecision(l, t);
|
|
583
639
|
};
|
|
584
640
|
}
|
|
585
641
|
},
|
|
586
642
|
watch: {
|
|
587
643
|
"report.version": {
|
|
588
644
|
handler() {
|
|
589
|
-
var l, e;
|
|
645
|
+
var l, t, e;
|
|
590
646
|
this.report && (this.meteoData = this.report, this.position = {
|
|
591
647
|
id: this.report.portId,
|
|
592
648
|
lat: (l = this.report) == null ? void 0 : l.lat,
|
|
593
|
-
lng: (
|
|
594
|
-
name: this.computeLat(this.report.lat) + "," + this.computeLng(this.report.lng)
|
|
649
|
+
lng: (t = this.report) == null ? void 0 : t.lng,
|
|
650
|
+
name: ((e = this.report) == null ? void 0 : e.searchName) || this.computeLat(this.report.lat) + "," + this.computeLng(this.report.lng)
|
|
595
651
|
}, this.handleRender());
|
|
596
652
|
}
|
|
597
653
|
}
|
|
@@ -603,14 +659,14 @@ const ze = (l, e) => {
|
|
|
603
659
|
});
|
|
604
660
|
},
|
|
605
661
|
initInfo() {
|
|
606
|
-
var l,
|
|
607
|
-
this.loading = !1, this.positionGmt = (
|
|
608
|
-
var
|
|
609
|
-
return
|
|
662
|
+
var l, t;
|
|
663
|
+
this.loading = !1, this.positionGmt = (t = (l = this.meteoData.weather) == null ? void 0 : l[0]) == null ? void 0 : t.timezone, this.issuedDate = Q(this.ts).utc().format("MMM-DD/HHmm[Z], YYYY"), this.activeIndex = X(this.ts).tz(this.positionGmt).hour(), this.pickedDate = X(this.ts).tz(this.positionGmt).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).format(), this.collectList = JSON.parse(localStorage.getItem("idmCollectList") || "[]"), this.positionList = JSON.parse(JSON.stringify(this.collectList)), this.isCollected = this.collectList.some((e) => {
|
|
664
|
+
var h;
|
|
665
|
+
return e.name === ((h = this.position) == null ? void 0 : h.name);
|
|
610
666
|
});
|
|
611
667
|
},
|
|
612
668
|
initTableData() {
|
|
613
|
-
var l,
|
|
669
|
+
var l, t, e, h, s, v, M, C, S, L, N, I, P, H, a, r, q, D, T, R, A, E, G, F, B, O, V, U, J, Z, Y, u, k, w;
|
|
614
670
|
this.tableData = {
|
|
615
671
|
hours: [],
|
|
616
672
|
utcHours: [],
|
|
@@ -637,23 +693,23 @@ const ze = (l, e) => {
|
|
|
637
693
|
seaLevel: [],
|
|
638
694
|
seaTemp: []
|
|
639
695
|
};
|
|
640
|
-
for (let
|
|
641
|
-
const W =
|
|
696
|
+
for (let z = 0; z < 24; z++) {
|
|
697
|
+
const W = Q(this.pickedDate).clone().add(z, "h").format();
|
|
642
698
|
this.tableData.hours.push(W);
|
|
643
|
-
const
|
|
644
|
-
this.tableData.weatherUrls.push((
|
|
699
|
+
const p = ((l = bt.pickHourly(this.meteoData, W)) == null ? void 0 : l[0]) || {};
|
|
700
|
+
this.tableData.weatherUrls.push((t = p.weather) == null ? void 0 : t.url), this.tableData.weatherNames.push(((e = p.weather) == null ? void 0 : e.name) ?? "-"), this.tableData.temp.push(this.roundPrecision((h = p.weather) == null ? void 0 : h.temp, 0) ?? "-"), this.tableData.precipProbability.push(this.roundPrecision((v = (s = p.weather) == null ? void 0 : s.precip) == null ? void 0 : v.probability, 0) ?? "-"), this.tableData.precip1h.push(this.roundPrecision((C = (M = p.weather) == null ? void 0 : M.precip) == null ? void 0 : C.sum, 0) ?? "-"), this.tableData.visibility.push(this.roundPrecision((S = p.weather) == null ? void 0 : S.visibility, 0) ?? "-"), this.tableData.humidity.push(this.roundPrecision((L = p.weather) == null ? void 0 : L.rh, 0) ?? "-"), this.tableData.windSpeed.push(this.roundPrecision((I = (N = p.weather) == null ? void 0 : N.wind) == null ? void 0 : I.kts, 1)), this.tableData.windDir.push((H = (P = p.weather) == null ? void 0 : P.wind) == null ? void 0 : H.bearing), this.tableData.windGust.push(this.roundPrecision((r = (a = p.weather) == null ? void 0 : a.wind) == null ? void 0 : r.gusts, 1) ?? "-"), this.tableData.sigwaveHeight.push(this.roundPrecision((D = (q = p.wave) == null ? void 0 : q.sig) == null ? void 0 : D.height, 1) ?? "-"), this.tableData.sigwaveDir.push((R = (T = p.wave) == null ? void 0 : T.sig) == null ? void 0 : R.bearing), this.tableData.windwaveHeight.push(this.roundPrecision((E = (A = p.wave) == null ? void 0 : A.wd) == null ? void 0 : E.height, 1) ?? "-"), this.tableData.windwaveDir.push((F = (G = p.wave) == null ? void 0 : G.wd) == null ? void 0 : F.bearing), this.tableData.windwavePeriod.push(this.roundPrecision((O = (B = p.wave) == null ? void 0 : B.wd) == null ? void 0 : O.period, 1) ?? "-"), this.tableData.swellHeight.push(this.roundPrecision((U = (V = p.wave) == null ? void 0 : V.swell) == null ? void 0 : U.height, 1) ?? "-"), this.tableData.swellDir.push((Z = (J = p.wave) == null ? void 0 : J.swell) == null ? void 0 : Z.bearing), this.tableData.swellPeriod.push(this.roundPrecision((u = (Y = p.wave) == null ? void 0 : Y.swell) == null ? void 0 : u.period, 1) ?? "-"), this.tableData.currentSpeed.push(this.roundPrecision((k = p.current) == null ? void 0 : k.speed, 1) ?? "-"), this.tableData.currentDir.push((w = p.current) == null ? void 0 : w.bearing), this.tableData.seaLevel.push(this.roundPrecision(p.height, 1) ?? "-"), this.tableData.seaTemp.push(this.roundPrecision(p.sst, 0) ?? "-");
|
|
645
701
|
}
|
|
646
702
|
},
|
|
647
703
|
initEchart() {
|
|
648
|
-
var T, R, A, E, G, F, B,
|
|
649
|
-
const l = [],
|
|
650
|
-
for (let
|
|
651
|
-
const
|
|
652
|
-
l.push(X(
|
|
653
|
-
const
|
|
654
|
-
|
|
704
|
+
var T, R, A, E, G, F, B, O, V, U, J, Z, Y;
|
|
705
|
+
const l = [], t = [], e = [], h = [], s = [], v = [], M = [], C = [], S = [], L = [], N = {};
|
|
706
|
+
for (let u = 0; u < 7; u++) {
|
|
707
|
+
const k = Q(this.pickedDate).clone().add(u, "d");
|
|
708
|
+
l.push(X(k).tz(this.positionGmt).format("yyyy-MM-DD")), t.push(this.computeMMMDD(k)), e.push(u === 0 ? "Today" : this.computeWeek(k));
|
|
709
|
+
const w = ((T = bt.pickDaily(this.meteoData, k)) == null ? void 0 : T[0]) || {};
|
|
710
|
+
h.push(this.roundPrecision((A = (R = w.weather) == null ? void 0 : R.temp) == null ? void 0 : A.min, 0)), s.push(this.roundPrecision((G = (E = w.weather) == null ? void 0 : E.temp) == null ? void 0 : G.max, 0)), C.push(this.roundPrecision((B = (F = w.weather) == null ? void 0 : F.wind) == null ? void 0 : B.kts, 1) ?? "- kts"), L.push(this.roundPrecision((V = (O = w.weather) == null ? void 0 : O.precip) == null ? void 0 : V.sum, 0) ?? "- mm"), v.push({ symbol: "image://" + ((U = w.weather) == null ? void 0 : U.url) }), M.push((J = w.weather) == null ? void 0 : J.name), S.push((Y = (Z = w.weather) == null ? void 0 : Z.wind) == null ? void 0 : Y.degree);
|
|
655
711
|
}
|
|
656
|
-
const I = Math.max(...s.filter((
|
|
712
|
+
const I = Math.max(...s.filter((u) => typeof u == "number" && !isNaN(u))) - Math.min(...h.filter((u) => typeof u == "number" && !isNaN(u))), P = Math.min(...h.filter((u) => typeof u == "number" && !isNaN(u))) - 1.5 * I, H = Math.max(...s.filter((u) => typeof u == "number" && !isNaN(u))) + 2 * I, a = 4 + 0.5 / l.length * 92 + "%", r = "data:image/svg+xml;base64," + window.btoa(
|
|
657
713
|
unescape(
|
|
658
714
|
encodeURIComponent(
|
|
659
715
|
'<svg t="1740385441519" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10951" width="200" height="200"><path d="M512 804.83593751A276.87183211 276.87183211 0 0 1 235.12816789 527.9641054Q235.12816789 375.21005376 512 13.82031251q276.87183211 361.30792288 276.87183211 514.14379289a276.87183211 276.87183211 0 0 1-276.87183211 276.87183211zM294.4461577 527.9641054a217.47202472 217.47202472 0 0 0 217.5538423 217.55384231 19.79993605 19.79993605 0 1 0 0-39.51805453 177.9539702 177.9539702 0 0 1-177.9539702-178.03578778 19.79993605 19.79993605 0 0 0-39.5998721 0z" fill="#0c73a8" p-id="10952"></path></svg>'
|
|
@@ -665,24 +721,24 @@ const ze = (l, e) => {
|
|
|
665
721
|
'<svg t="1740383449285" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10797" width="200" height="200"><path d="M133.8 579l-44.4-44.4c-18.8-18.8-18.8-49.2 0-67.8L478 78c18.8-18.8 49.2-18.8 67.8 0l388.6 388.6c18.8 18.8 18.8 49.2 0 67.8L890 578.8c-19 19-50 18.6-68.6-0.8L592 337.2V912c0 26.6-21.4 48-48 48h-64c-26.6 0-48-21.4-48-48V337.2L202.4 578.2c-18.6 19.6-49.6 20-68.6 0.8z" fill="#ffffff" p-id="10798"></path></svg>'
|
|
666
722
|
)
|
|
667
723
|
)
|
|
668
|
-
),
|
|
669
|
-
|
|
670
|
-
for (let
|
|
671
|
-
const
|
|
672
|
-
|
|
673
|
-
const
|
|
674
|
-
W.translate(
|
|
675
|
-
const
|
|
676
|
-
N[`WindIcon${
|
|
724
|
+
), D = new Image(64, 64);
|
|
725
|
+
D.src = q, D.onload = () => {
|
|
726
|
+
for (let w = 0; w < 7; w++) {
|
|
727
|
+
const z = document.createElement("canvas"), W = z.getContext("2d");
|
|
728
|
+
z.width = D.width, z.height = D.height;
|
|
729
|
+
const K = S[w] * (Math.PI / 180);
|
|
730
|
+
W.translate(z.width / 2, z.height / 2), W.rotate(K), W.translate(-D.width / 2, -D.height / 2), W.drawImage(D, 0, 0, 64, 64);
|
|
731
|
+
const m = z.toDataURL();
|
|
732
|
+
N[`WindIcon${w}`] = {
|
|
677
733
|
height: 12,
|
|
678
734
|
width: 12,
|
|
679
735
|
align: "left",
|
|
680
736
|
backgroundColor: {
|
|
681
|
-
image:
|
|
737
|
+
image: m
|
|
682
738
|
}
|
|
683
739
|
};
|
|
684
740
|
}
|
|
685
|
-
const
|
|
741
|
+
const u = gt.init(document.getElementById("weather-chart")), k = {
|
|
686
742
|
grid: {
|
|
687
743
|
bottom: 0,
|
|
688
744
|
top: 0,
|
|
@@ -693,8 +749,8 @@ const ze = (l, e) => {
|
|
|
693
749
|
trigger: "item",
|
|
694
750
|
show: !0,
|
|
695
751
|
position: "right",
|
|
696
|
-
formatter: function(
|
|
697
|
-
return
|
|
752
|
+
formatter: function(w) {
|
|
753
|
+
return w.seriesName === "Weather Icon" ? M[w.dataIndex] : !1;
|
|
698
754
|
}
|
|
699
755
|
},
|
|
700
756
|
legend: {
|
|
@@ -856,7 +912,7 @@ const ze = (l, e) => {
|
|
|
856
912
|
singleAxisIndex: 0,
|
|
857
913
|
coordinateSystem: "singleAxis",
|
|
858
914
|
type: "scatter",
|
|
859
|
-
data:
|
|
915
|
+
data: e,
|
|
860
916
|
label: {
|
|
861
917
|
show: !0,
|
|
862
918
|
color: "#fff",
|
|
@@ -869,7 +925,7 @@ const ze = (l, e) => {
|
|
|
869
925
|
singleAxisIndex: 1,
|
|
870
926
|
coordinateSystem: "singleAxis",
|
|
871
927
|
type: "scatter",
|
|
872
|
-
data:
|
|
928
|
+
data: t,
|
|
873
929
|
label: {
|
|
874
930
|
show: !0,
|
|
875
931
|
color: "#fff",
|
|
@@ -888,7 +944,7 @@ const ze = (l, e) => {
|
|
|
888
944
|
{
|
|
889
945
|
name: "温度(℃)",
|
|
890
946
|
type: "line",
|
|
891
|
-
data:
|
|
947
|
+
data: h,
|
|
892
948
|
smooth: !0,
|
|
893
949
|
itemStyle: {
|
|
894
950
|
color: "rgba(255,255,255,0.7)"
|
|
@@ -948,8 +1004,8 @@ const ze = (l, e) => {
|
|
|
948
1004
|
vertical: "center"
|
|
949
1005
|
}
|
|
950
1006
|
},
|
|
951
|
-
formatter: function(
|
|
952
|
-
return `{WindIcon${
|
|
1007
|
+
formatter: function(w) {
|
|
1008
|
+
return `{WindIcon${w.dataIndex}|}{title|${w.value}} kts`;
|
|
953
1009
|
}
|
|
954
1010
|
},
|
|
955
1011
|
symbolSize: 0
|
|
@@ -977,31 +1033,31 @@ const ze = (l, e) => {
|
|
|
977
1033
|
vertical: "center"
|
|
978
1034
|
}
|
|
979
1035
|
},
|
|
980
|
-
formatter: function(
|
|
981
|
-
return `{dIcon|}{title|${
|
|
1036
|
+
formatter: function(w) {
|
|
1037
|
+
return `{dIcon|}{title|${w.value}} mm`;
|
|
982
1038
|
}
|
|
983
1039
|
},
|
|
984
1040
|
symbolSize: 0
|
|
985
1041
|
}
|
|
986
1042
|
]
|
|
987
1043
|
};
|
|
988
|
-
|
|
989
|
-
const
|
|
990
|
-
this.pickedDate = X(l[
|
|
1044
|
+
u.setOption(k), u.on("click", (w) => {
|
|
1045
|
+
const z = w.dataIndex;
|
|
1046
|
+
this.pickedDate = X(l[z]).tz(this.positionGmt).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).format(), this.pickedWeek = z === 0 ? "Today" : this.computeWeek(this.pickedDate), this.activeIndex = z === 0 ? X(this.ts).tz(this.positionGmt).hour() : void 0, this.initTableData(), k.series[3].markArea = {
|
|
991
1047
|
itemStyle: {
|
|
992
1048
|
color: "rgb(71,143,206)"
|
|
993
1049
|
},
|
|
994
1050
|
data: [
|
|
995
1051
|
[
|
|
996
1052
|
{
|
|
997
|
-
x: 4 +
|
|
1053
|
+
x: 4 + z / l.length * 92 + "%"
|
|
998
1054
|
},
|
|
999
1055
|
{
|
|
1000
|
-
x: 4 + (
|
|
1056
|
+
x: 4 + (z + 1) / l.length * 92 + "%"
|
|
1001
1057
|
}
|
|
1002
1058
|
]
|
|
1003
1059
|
]
|
|
1004
|
-
},
|
|
1060
|
+
}, u.setOption(k);
|
|
1005
1061
|
});
|
|
1006
1062
|
};
|
|
1007
1063
|
},
|
|
@@ -1009,75 +1065,75 @@ const ze = (l, e) => {
|
|
|
1009
1065
|
this.isCollected = !this.isCollected, this.isCollected ? this.collectList.push({ name: this.position.name, lat: this.position.lat, lng: this.position.lng }) : this.collectList = this.collectList.filter((l) => l.name !== this.position.name), localStorage.setItem("idmCollectList", JSON.stringify(this.collectList));
|
|
1010
1066
|
},
|
|
1011
1067
|
async fetchSuggestPosition(l) {
|
|
1012
|
-
var
|
|
1013
|
-
const
|
|
1014
|
-
if (!
|
|
1068
|
+
var h;
|
|
1069
|
+
const t = l.replaceAll(",", ",");
|
|
1070
|
+
if (!t)
|
|
1015
1071
|
return this.positionList = this.collectList, !1;
|
|
1016
|
-
const
|
|
1072
|
+
const e = await vt.get(`https://cbe.idmwx.com/api/arc/ports/suggest?n=${t}`, {
|
|
1017
1073
|
headers: {
|
|
1018
1074
|
Authorization: this.token
|
|
1019
1075
|
}
|
|
1020
1076
|
});
|
|
1021
|
-
(
|
|
1077
|
+
(e == null ? void 0 : e.data.code) === 0 && (this.positionList = (h = e == null ? void 0 : e.data.data) == null ? void 0 : h.map((s) => (s.name = s.id ? s.name : this.computeLat(s.lat) + ", " + this.computeLng(s.lng), s)));
|
|
1022
1078
|
},
|
|
1023
1079
|
async handleFetchMeteo() {
|
|
1024
|
-
var
|
|
1080
|
+
var e, h, s;
|
|
1025
1081
|
if (!this.searchName)
|
|
1026
1082
|
return !1;
|
|
1027
1083
|
this.position = {
|
|
1028
|
-
portId: (
|
|
1029
|
-
lat: (
|
|
1084
|
+
portId: (e = this.positionList.find((v) => v.name === this.searchName)) == null ? void 0 : e.id,
|
|
1085
|
+
lat: (h = this.positionList.find((v) => v.name === this.searchName)) == null ? void 0 : h.lat,
|
|
1030
1086
|
lng: (s = this.positionList.find((v) => v.name === this.searchName)) == null ? void 0 : s.lng,
|
|
1031
1087
|
name: this.searchName
|
|
1032
|
-
}, this.handleClear();
|
|
1088
|
+
}, this.$emit("url", this.position), this.handleClear();
|
|
1033
1089
|
const l = {
|
|
1034
1090
|
lat: this.position.lat,
|
|
1035
1091
|
lng: this.position.lng,
|
|
1036
1092
|
// datetime: this.ts ? moment(this.ts).utc().add(-1,'d').format() : moment().add(-1,'d').utc().format(),
|
|
1037
1093
|
forecastDays: 8,
|
|
1038
1094
|
selfHosted: !1
|
|
1039
|
-
},
|
|
1095
|
+
}, t = await vt.post("https://cbe.idmwx.com/api/arc/meteo2/spot/forecast", l, {
|
|
1040
1096
|
headers: {
|
|
1041
1097
|
Authorization: this.token
|
|
1042
1098
|
}
|
|
1043
1099
|
});
|
|
1044
|
-
(
|
|
1045
|
-
...
|
|
1100
|
+
(t == null ? void 0 : t.data.code) === 0 && (this.meteoData = {
|
|
1101
|
+
...t == null ? void 0 : t.data.data
|
|
1046
1102
|
}), this.handleRender();
|
|
1047
1103
|
},
|
|
1048
1104
|
handleClear() {
|
|
1049
|
-
this.loading = !0, this.meteoData = {}, this.isCollected = !1,
|
|
1105
|
+
this.loading = !0, this.meteoData = {}, this.isCollected = !1, gt.dispose(document.getElementById("weather-chart"));
|
|
1050
1106
|
}
|
|
1051
1107
|
}
|
|
1052
|
-
},
|
|
1108
|
+
}, Nt = { class: "spot-report" }, It = { class: "header-box flex-between" }, Mt = { class: "bg" }, Ct = { class: "search-box flex-start" }, Pt = { class: "content-box" }, Ht = { class: "title-box flex-between" }, Wt = { class: "main-title" }, Tt = { class: "sub-title" }, Rt = { class: "flex-end" }, At = {
|
|
1053
1109
|
key: 0,
|
|
1054
1110
|
id: "weather-chart"
|
|
1055
|
-
},
|
|
1111
|
+
}, Et = {
|
|
1056
1112
|
key: 1,
|
|
1057
1113
|
class: "weather-chart flex-center"
|
|
1058
|
-
},
|
|
1114
|
+
}, Gt = {
|
|
1059
1115
|
key: 2,
|
|
1060
1116
|
class: "weather-chart flex-center"
|
|
1061
|
-
},
|
|
1117
|
+
}, Ft = {
|
|
1062
1118
|
key: 3,
|
|
1063
1119
|
class: "card-box"
|
|
1064
|
-
},
|
|
1120
|
+
}, Bt = { class: "date" }, Ot = { class: "basic-table" }, Vt = { class: "day" }, Ut = { class: "hour" }, Jt = { class: "icon" }, Zt = ["src"], Yt = { class: "text" }, jt = { class: "text" }, qt = { class: "text" }, Qt = { class: "text" }, Kt = { class: "text" }, Xt = { class: "text" }, $t = { key: 1 }, te = { class: "text" }, ee = { class: "text" }, se = { class: "wave-current-table" }, ae = { class: "text" }, ie = { class: "text" }, ne = { key: 1 }, oe = { class: "text" }, re = { class: "text" }, le = { class: "text" }, he = { key: 1 }, de = { class: "text" }, ce = { class: "text" }, pe = { class: "text" }, me = { key: 1 }, we = { class: "text" }, ue = { class: "sea-table" }, ge = { class: "text" }, ve = { class: "text" }, be = {
|
|
1065
1121
|
key: 4,
|
|
1066
1122
|
class: "card-box flex-center"
|
|
1067
|
-
},
|
|
1123
|
+
}, xe = {
|
|
1068
1124
|
key: 5,
|
|
1069
1125
|
class: "card-box flex-center"
|
|
1070
1126
|
};
|
|
1071
|
-
function
|
|
1127
|
+
function fe(l, t, e, h, s, v) {
|
|
1072
1128
|
var L, N, I, P, H;
|
|
1073
|
-
const M =
|
|
1074
|
-
return n(), o("div",
|
|
1075
|
-
i("div",
|
|
1076
|
-
i("div",
|
|
1077
|
-
i("div",
|
|
1078
|
-
|
|
1129
|
+
const M = ht("ElOption"), C = ht("ElSelect"), S = ht("ElTooltip");
|
|
1130
|
+
return n(), o("div", Nt, [
|
|
1131
|
+
i("div", It, [
|
|
1132
|
+
i("div", Mt, [
|
|
1133
|
+
i("div", Ct, [
|
|
1134
|
+
dt(C, {
|
|
1079
1135
|
modelValue: s.searchName,
|
|
1080
|
-
"onUpdate:modelValue":
|
|
1136
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => s.searchName = a),
|
|
1081
1137
|
filterable: "",
|
|
1082
1138
|
class: "input",
|
|
1083
1139
|
clearable: "",
|
|
@@ -1085,13 +1141,13 @@ function yt(l, e, t, d, s, v) {
|
|
|
1085
1141
|
placeholder: s.placeholder,
|
|
1086
1142
|
autocomplete: "",
|
|
1087
1143
|
"remote-show-suffix": "",
|
|
1088
|
-
onFocus:
|
|
1089
|
-
onBlur:
|
|
1144
|
+
onFocus: t[1] || (t[1] = (a) => s.placeholder = ""),
|
|
1145
|
+
onBlur: t[2] || (t[2] = (a) => s.placeholder = "search for port name or coordinates"),
|
|
1090
1146
|
"remote-method": v.fetchSuggestPosition,
|
|
1091
1147
|
onChange: v.handleFetchMeteo
|
|
1092
1148
|
}, {
|
|
1093
|
-
default:
|
|
1094
|
-
(n(!0), o(
|
|
1149
|
+
default: ct(() => [
|
|
1150
|
+
(n(!0), o(b, null, x(s.positionList, (a) => (n(), Dt(M, {
|
|
1095
1151
|
key: a.name,
|
|
1096
1152
|
label: a.name,
|
|
1097
1153
|
value: a.name
|
|
@@ -1102,447 +1158,447 @@ function yt(l, e, t, d, s, v) {
|
|
|
1102
1158
|
])
|
|
1103
1159
|
])
|
|
1104
1160
|
]),
|
|
1105
|
-
i("div",
|
|
1106
|
-
i("div",
|
|
1161
|
+
i("div", Pt, [
|
|
1162
|
+
i("div", Ht, [
|
|
1107
1163
|
i("div", null, [
|
|
1108
|
-
i("div",
|
|
1109
|
-
i("div",
|
|
1164
|
+
i("div", Wt, "Weather forecast for " + f(((L = s.position) == null ? void 0 : L.name) || "-") + " ( " + f(s.positionGmt) + " )", 1),
|
|
1165
|
+
i("div", Tt, "At " + f((N = s.position) != null && N.portId ? "port" : "coordinates") + ", issued " + f(s.issuedDate), 1)
|
|
1110
1166
|
]),
|
|
1111
|
-
i("div",
|
|
1112
|
-
|
|
1167
|
+
i("div", Rt, [
|
|
1168
|
+
dt(S, {
|
|
1113
1169
|
placement: "left",
|
|
1114
1170
|
effect: "light",
|
|
1115
1171
|
content: s.isCollected ? "remove the port/coordinate from the search list" : "add the port/coordinate to the search list",
|
|
1116
1172
|
"show-after": 1e3
|
|
1117
1173
|
}, {
|
|
1118
|
-
default:
|
|
1174
|
+
default: ct(() => [
|
|
1119
1175
|
s.isCollected ? (n(), o("span", {
|
|
1120
1176
|
key: 0,
|
|
1121
1177
|
class: "iconfont icon active",
|
|
1122
|
-
onClick:
|
|
1178
|
+
onClick: t[3] || (t[3] = (...a) => v.handleCollect && v.handleCollect(...a))
|
|
1123
1179
|
}, "")) : (n(), o("span", {
|
|
1124
1180
|
key: 1,
|
|
1125
1181
|
class: "iconfont icon",
|
|
1126
|
-
onClick:
|
|
1182
|
+
onClick: t[4] || (t[4] = (...a) => v.handleCollect && v.handleCollect(...a))
|
|
1127
1183
|
}, ""))
|
|
1128
1184
|
]),
|
|
1129
1185
|
_: 1
|
|
1130
1186
|
}, 8, ["content"])
|
|
1131
1187
|
])
|
|
1132
1188
|
]),
|
|
1133
|
-
(I = s.position) != null && I.name && !s.loading ? (n(), o("div",
|
|
1134
|
-
(P = s.position) != null && P.name && !s.loading ? (n(), o("div",
|
|
1135
|
-
i("div",
|
|
1136
|
-
i("table",
|
|
1137
|
-
i("tr",
|
|
1138
|
-
|
|
1189
|
+
(I = s.position) != null && I.name && !s.loading ? (n(), o("div", At)) : s.loading ? (n(), o("div", Et, "Loading....")) : s.position.name ? pt("", !0) : (n(), o("div", Gt, "No Data")),
|
|
1190
|
+
(P = s.position) != null && P.name && !s.loading ? (n(), o("div", Ft, [
|
|
1191
|
+
i("div", Bt, f(s.pickedWeek) + " " + f(v.computeMMMDD(s.pickedDate)), 1),
|
|
1192
|
+
i("table", Ot, [
|
|
1193
|
+
i("tr", Vt, [
|
|
1194
|
+
t[5] || (t[5] = i("th", {
|
|
1139
1195
|
rowspan: "1",
|
|
1140
1196
|
colspan: "1",
|
|
1141
1197
|
class: "tr-title"
|
|
1142
1198
|
}, [
|
|
1143
|
-
|
|
1199
|
+
y("Local time"),
|
|
1144
1200
|
i("span", { class: "unit" }, "(LT)")
|
|
1145
1201
|
], -1)),
|
|
1146
|
-
(n(!0), o(
|
|
1202
|
+
(n(!0), o(b, null, x(s.tableData.hours, (a, r) => (n(), o("th", {
|
|
1147
1203
|
rowspan: "1",
|
|
1148
1204
|
colspan: "1",
|
|
1149
|
-
class:
|
|
1205
|
+
class: _(s.activeIndex === r ? "active" : ""),
|
|
1150
1206
|
key: Math.random() + "local"
|
|
1151
|
-
},
|
|
1207
|
+
}, f(v.computeHourL(a)), 3))), 128))
|
|
1152
1208
|
]),
|
|
1153
|
-
i("tr",
|
|
1154
|
-
|
|
1209
|
+
i("tr", Ut, [
|
|
1210
|
+
t[6] || (t[6] = i("th", {
|
|
1155
1211
|
rowspan: "1",
|
|
1156
1212
|
colspan: "1",
|
|
1157
1213
|
class: "tr-title"
|
|
1158
1214
|
}, [
|
|
1159
|
-
|
|
1215
|
+
y("UTC"),
|
|
1160
1216
|
i("span", { class: "unit" })
|
|
1161
1217
|
], -1)),
|
|
1162
|
-
(n(!0), o(
|
|
1218
|
+
(n(!0), o(b, null, x(s.tableData.hours, (a, r) => (n(), o("th", {
|
|
1163
1219
|
rowspan: "1",
|
|
1164
1220
|
colspan: "1",
|
|
1165
|
-
class:
|
|
1221
|
+
class: _(s.activeIndex === r ? "active" : ""),
|
|
1166
1222
|
key: Math.random() + "z"
|
|
1167
|
-
},
|
|
1223
|
+
}, f(v.computeHourZ(a)), 3))), 128))
|
|
1168
1224
|
]),
|
|
1169
|
-
i("tr",
|
|
1170
|
-
|
|
1225
|
+
i("tr", Jt, [
|
|
1226
|
+
t[7] || (t[7] = i("td", {
|
|
1171
1227
|
rowspan: "1",
|
|
1172
1228
|
colspan: "1",
|
|
1173
1229
|
class: "tr-title"
|
|
1174
1230
|
}, [
|
|
1175
|
-
|
|
1231
|
+
y("Weather"),
|
|
1176
1232
|
i("span", { class: "unit" })
|
|
1177
1233
|
], -1)),
|
|
1178
|
-
(n(!0), o(
|
|
1234
|
+
(n(!0), o(b, null, x(s.tableData.weatherUrls, (a, r) => (n(), o("td", {
|
|
1179
1235
|
rowspan: "1",
|
|
1180
1236
|
colspan: "1",
|
|
1181
|
-
class:
|
|
1237
|
+
class: _(s.activeIndex === r ? "active" : ""),
|
|
1182
1238
|
key: Math.random() + "url"
|
|
1183
1239
|
}, [
|
|
1184
|
-
|
|
1240
|
+
dt(S, {
|
|
1185
1241
|
placement: "top",
|
|
1186
1242
|
effect: "light",
|
|
1187
1243
|
content: s.tableData.weatherNames[r],
|
|
1188
1244
|
"show-after": 500
|
|
1189
1245
|
}, {
|
|
1190
|
-
default:
|
|
1246
|
+
default: ct(() => [
|
|
1191
1247
|
a ? (n(), o("img", {
|
|
1192
1248
|
key: 0,
|
|
1193
1249
|
class: "iconfont weather-icon",
|
|
1194
1250
|
src: a
|
|
1195
|
-
}, null, 8,
|
|
1251
|
+
}, null, 8, Zt)) : pt("", !0)
|
|
1196
1252
|
]),
|
|
1197
1253
|
_: 2
|
|
1198
1254
|
}, 1032, ["content"])
|
|
1199
1255
|
], 2))), 128))
|
|
1200
1256
|
]),
|
|
1201
|
-
i("tr",
|
|
1202
|
-
|
|
1257
|
+
i("tr", Yt, [
|
|
1258
|
+
t[8] || (t[8] = i("td", {
|
|
1203
1259
|
rowspan: "1",
|
|
1204
1260
|
colspan: "1",
|
|
1205
1261
|
class: "tr-title"
|
|
1206
1262
|
}, [
|
|
1207
|
-
|
|
1263
|
+
y("Temperature"),
|
|
1208
1264
|
i("span", { class: "unit" }, "°C")
|
|
1209
1265
|
], -1)),
|
|
1210
|
-
(n(!0), o(
|
|
1266
|
+
(n(!0), o(b, null, x(s.tableData.temp, (a, r) => (n(), o("td", {
|
|
1211
1267
|
rowspan: "1",
|
|
1212
1268
|
colspan: "1",
|
|
1213
|
-
class:
|
|
1269
|
+
class: _(s.activeIndex === r ? "active" : ""),
|
|
1214
1270
|
key: Math.random() + a
|
|
1215
|
-
},
|
|
1271
|
+
}, f(a), 3))), 128))
|
|
1216
1272
|
]),
|
|
1217
|
-
i("tr",
|
|
1218
|
-
|
|
1273
|
+
i("tr", jt, [
|
|
1274
|
+
t[9] || (t[9] = i("td", {
|
|
1219
1275
|
rowspan: "1",
|
|
1220
1276
|
colspan: "1",
|
|
1221
1277
|
class: "tr-title"
|
|
1222
1278
|
}, [
|
|
1223
|
-
|
|
1279
|
+
y("Precipitation Probability"),
|
|
1224
1280
|
i("span", { class: "unit" }, "%")
|
|
1225
1281
|
], -1)),
|
|
1226
|
-
(n(!0), o(
|
|
1282
|
+
(n(!0), o(b, null, x(s.tableData.precipProbability, (a, r) => (n(), o("td", {
|
|
1227
1283
|
rowspan: "1",
|
|
1228
1284
|
colspan: "1",
|
|
1229
|
-
class:
|
|
1285
|
+
class: _(s.activeIndex === r ? "active" : ""),
|
|
1230
1286
|
key: Math.random() + a
|
|
1231
|
-
},
|
|
1287
|
+
}, f(a), 3))), 128))
|
|
1232
1288
|
]),
|
|
1233
|
-
i("tr",
|
|
1234
|
-
|
|
1289
|
+
i("tr", qt, [
|
|
1290
|
+
t[10] || (t[10] = i("td", {
|
|
1235
1291
|
rowspan: "1",
|
|
1236
1292
|
colspan: "1",
|
|
1237
1293
|
class: "tr-title"
|
|
1238
1294
|
}, [
|
|
1239
|
-
|
|
1295
|
+
y("Precipitation 1h"),
|
|
1240
1296
|
i("span", { class: "unit" }, "mm")
|
|
1241
1297
|
], -1)),
|
|
1242
|
-
(n(!0), o(
|
|
1298
|
+
(n(!0), o(b, null, x(s.tableData.precip1h, (a, r) => (n(), o("td", {
|
|
1243
1299
|
rowspan: "1",
|
|
1244
1300
|
colspan: "1",
|
|
1245
|
-
class:
|
|
1301
|
+
class: _(s.activeIndex === r ? "active" : ""),
|
|
1246
1302
|
key: Math.random() + a
|
|
1247
|
-
},
|
|
1303
|
+
}, f(a), 3))), 128))
|
|
1248
1304
|
]),
|
|
1249
|
-
i("tr",
|
|
1250
|
-
|
|
1305
|
+
i("tr", Qt, [
|
|
1306
|
+
t[11] || (t[11] = i("td", {
|
|
1251
1307
|
rowspan: "1",
|
|
1252
1308
|
colspan: "1",
|
|
1253
1309
|
class: "tr-title"
|
|
1254
1310
|
}, [
|
|
1255
|
-
|
|
1311
|
+
y("Visibility"),
|
|
1256
1312
|
i("span", { class: "unit" }, "nm")
|
|
1257
1313
|
], -1)),
|
|
1258
|
-
(n(!0), o(
|
|
1314
|
+
(n(!0), o(b, null, x(s.tableData.visibility, (a, r) => (n(), o("td", {
|
|
1259
1315
|
rowspan: "1",
|
|
1260
1316
|
colspan: "1",
|
|
1261
|
-
class:
|
|
1317
|
+
class: _(s.activeIndex === r ? "active" : ""),
|
|
1262
1318
|
key: Math.random() + a
|
|
1263
|
-
},
|
|
1319
|
+
}, f(a), 3))), 128))
|
|
1264
1320
|
]),
|
|
1265
|
-
i("tr",
|
|
1266
|
-
|
|
1321
|
+
i("tr", Kt, [
|
|
1322
|
+
t[12] || (t[12] = i("td", {
|
|
1267
1323
|
rowspan: "1",
|
|
1268
1324
|
colspan: "1",
|
|
1269
1325
|
class: "tr-title"
|
|
1270
1326
|
}, [
|
|
1271
|
-
|
|
1327
|
+
y("Relative Humidity"),
|
|
1272
1328
|
i("span", { class: "unit" }, "%")
|
|
1273
1329
|
], -1)),
|
|
1274
|
-
(n(!0), o(
|
|
1330
|
+
(n(!0), o(b, null, x(s.tableData.humidity, (a, r) => (n(), o("td", {
|
|
1275
1331
|
rowspan: "1",
|
|
1276
1332
|
colspan: "1",
|
|
1277
|
-
class:
|
|
1333
|
+
class: _(s.activeIndex === r ? "active" : ""),
|
|
1278
1334
|
key: Math.random() + a
|
|
1279
|
-
},
|
|
1335
|
+
}, f(a), 3))), 128))
|
|
1280
1336
|
]),
|
|
1281
|
-
i("tr",
|
|
1282
|
-
|
|
1337
|
+
i("tr", Xt, [
|
|
1338
|
+
t[13] || (t[13] = i("td", {
|
|
1283
1339
|
rowspan: "1",
|
|
1284
1340
|
colspan: "1",
|
|
1285
1341
|
class: "tr-title"
|
|
1286
1342
|
}, [
|
|
1287
|
-
|
|
1343
|
+
y("Wind direction"),
|
|
1288
1344
|
i("span", { class: "unit" })
|
|
1289
1345
|
], -1)),
|
|
1290
|
-
(n(!0), o(
|
|
1346
|
+
(n(!0), o(b, null, x(s.tableData.windDir, (a, r) => (n(), o("td", {
|
|
1291
1347
|
rowspan: "1",
|
|
1292
1348
|
colspan: "1",
|
|
1293
|
-
class:
|
|
1349
|
+
class: _(s.activeIndex === r ? "active" : ""),
|
|
1294
1350
|
key: Math.random() + a
|
|
1295
1351
|
}, [
|
|
1296
|
-
isNaN(a) ? (n(), o("span",
|
|
1352
|
+
isNaN(a) ? (n(), o("span", $t, "-")) : (n(), o("span", {
|
|
1297
1353
|
key: 0,
|
|
1298
1354
|
class: "iconfont icon",
|
|
1299
|
-
style:
|
|
1355
|
+
style: nt({ display: "inline-block", transform: `rotate(${a}deg)` })
|
|
1300
1356
|
}, "", 4))
|
|
1301
1357
|
], 2))), 128))
|
|
1302
1358
|
]),
|
|
1303
|
-
i("tr",
|
|
1304
|
-
|
|
1359
|
+
i("tr", te, [
|
|
1360
|
+
t[14] || (t[14] = i("td", {
|
|
1305
1361
|
rowspan: "1",
|
|
1306
1362
|
colspan: "1",
|
|
1307
1363
|
class: "tr-title"
|
|
1308
1364
|
}, [
|
|
1309
|
-
|
|
1365
|
+
y("Wind speed"),
|
|
1310
1366
|
i("span", { class: "unit" }, "kts")
|
|
1311
1367
|
], -1)),
|
|
1312
|
-
(n(!0), o(
|
|
1368
|
+
(n(!0), o(b, null, x(s.tableData.windSpeed, (a, r) => (n(), o("td", {
|
|
1313
1369
|
rowspan: "1",
|
|
1314
1370
|
colspan: "1",
|
|
1315
|
-
class:
|
|
1371
|
+
class: _(s.activeIndex === r ? "active" : ""),
|
|
1316
1372
|
key: Math.random() + a
|
|
1317
|
-
},
|
|
1373
|
+
}, f(a), 3))), 128))
|
|
1318
1374
|
]),
|
|
1319
|
-
i("tr",
|
|
1320
|
-
|
|
1375
|
+
i("tr", ee, [
|
|
1376
|
+
t[15] || (t[15] = i("td", {
|
|
1321
1377
|
rowspan: "1",
|
|
1322
1378
|
colspan: "1",
|
|
1323
1379
|
class: "tr-title"
|
|
1324
1380
|
}, [
|
|
1325
|
-
|
|
1381
|
+
y("Wind gust"),
|
|
1326
1382
|
i("span", { class: "unit" }, "kts")
|
|
1327
1383
|
], -1)),
|
|
1328
|
-
(n(!0), o(
|
|
1384
|
+
(n(!0), o(b, null, x(s.tableData.windGust, (a, r) => (n(), o("td", {
|
|
1329
1385
|
rowspan: "1",
|
|
1330
1386
|
colspan: "1",
|
|
1331
|
-
class:
|
|
1387
|
+
class: _(s.activeIndex === r ? "active" : ""),
|
|
1332
1388
|
key: Math.random() + a
|
|
1333
|
-
},
|
|
1389
|
+
}, f(a), 3))), 128))
|
|
1334
1390
|
])
|
|
1335
1391
|
]),
|
|
1336
|
-
|
|
1337
|
-
i("table",
|
|
1338
|
-
i("tr",
|
|
1339
|
-
|
|
1392
|
+
t[27] || (t[27] = i("div", { style: { "text-align": "center", padding: "3px" } }, null, -1)),
|
|
1393
|
+
i("table", se, [
|
|
1394
|
+
i("tr", ae, [
|
|
1395
|
+
t[16] || (t[16] = i("td", {
|
|
1340
1396
|
rowspan: "1",
|
|
1341
1397
|
colspan: "1",
|
|
1342
1398
|
class: "tr-title"
|
|
1343
1399
|
}, [
|
|
1344
|
-
|
|
1400
|
+
y("Wind wave height"),
|
|
1345
1401
|
i("span", { class: "unit" }, "m")
|
|
1346
1402
|
], -1)),
|
|
1347
|
-
(n(!0), o(
|
|
1403
|
+
(n(!0), o(b, null, x(s.tableData.windwaveHeight, (a, r) => (n(), o("td", {
|
|
1348
1404
|
rowspan: "1",
|
|
1349
1405
|
colspan: "1",
|
|
1350
|
-
class:
|
|
1406
|
+
class: _(s.activeIndex === r ? "active" : ""),
|
|
1351
1407
|
key: Math.random() + a
|
|
1352
|
-
},
|
|
1408
|
+
}, f(a), 3))), 128))
|
|
1353
1409
|
]),
|
|
1354
|
-
i("tr",
|
|
1355
|
-
|
|
1410
|
+
i("tr", ie, [
|
|
1411
|
+
t[17] || (t[17] = i("td", {
|
|
1356
1412
|
rowspan: "1",
|
|
1357
1413
|
colspan: "1",
|
|
1358
1414
|
class: "tr-title"
|
|
1359
1415
|
}, [
|
|
1360
|
-
|
|
1416
|
+
y("Wind wave direction"),
|
|
1361
1417
|
i("span", { class: "unit" })
|
|
1362
1418
|
], -1)),
|
|
1363
|
-
(n(!0), o(
|
|
1419
|
+
(n(!0), o(b, null, x(s.tableData.windwaveDir, (a, r) => (n(), o("td", {
|
|
1364
1420
|
rowspan: "1",
|
|
1365
1421
|
colspan: "1",
|
|
1366
|
-
class:
|
|
1422
|
+
class: _(s.activeIndex === r ? "active" : ""),
|
|
1367
1423
|
key: Math.random() + a
|
|
1368
1424
|
}, [
|
|
1369
|
-
isNaN(a) ? (n(), o("span",
|
|
1425
|
+
isNaN(a) ? (n(), o("span", ne, "-")) : (n(), o("span", {
|
|
1370
1426
|
key: 0,
|
|
1371
1427
|
class: "iconfont icon",
|
|
1372
|
-
style:
|
|
1428
|
+
style: nt({ display: "inline-block", transform: `rotate(${a}deg)` })
|
|
1373
1429
|
}, "", 4))
|
|
1374
1430
|
], 2))), 128))
|
|
1375
1431
|
]),
|
|
1376
|
-
i("tr",
|
|
1377
|
-
|
|
1432
|
+
i("tr", oe, [
|
|
1433
|
+
t[18] || (t[18] = i("td", {
|
|
1378
1434
|
rowspan: "1",
|
|
1379
1435
|
colspan: "1",
|
|
1380
1436
|
class: "tr-title"
|
|
1381
1437
|
}, [
|
|
1382
|
-
|
|
1438
|
+
y("Wind wave period"),
|
|
1383
1439
|
i("span", { class: "unit" }, "s")
|
|
1384
1440
|
], -1)),
|
|
1385
|
-
(n(!0), o(
|
|
1441
|
+
(n(!0), o(b, null, x(s.tableData.windwavePeriod, (a, r) => (n(), o("td", {
|
|
1386
1442
|
rowspan: "1",
|
|
1387
1443
|
colspan: "1",
|
|
1388
|
-
class:
|
|
1444
|
+
class: _(s.activeIndex === r ? "active" : ""),
|
|
1389
1445
|
key: Math.random() + a
|
|
1390
|
-
},
|
|
1446
|
+
}, f(a), 3))), 128))
|
|
1391
1447
|
]),
|
|
1392
|
-
i("tr",
|
|
1393
|
-
|
|
1448
|
+
i("tr", re, [
|
|
1449
|
+
t[19] || (t[19] = i("td", {
|
|
1394
1450
|
rowspan: "1",
|
|
1395
1451
|
colspan: "1",
|
|
1396
1452
|
class: "tr-title"
|
|
1397
1453
|
}, [
|
|
1398
|
-
|
|
1454
|
+
y("Swell height"),
|
|
1399
1455
|
i("span", { class: "unit" }, "m")
|
|
1400
1456
|
], -1)),
|
|
1401
|
-
(n(!0), o(
|
|
1457
|
+
(n(!0), o(b, null, x(s.tableData.swellHeight, (a, r) => (n(), o("td", {
|
|
1402
1458
|
rowspan: "1",
|
|
1403
1459
|
colspan: "1",
|
|
1404
|
-
class:
|
|
1460
|
+
class: _(s.activeIndex === r ? "active" : ""),
|
|
1405
1461
|
key: Math.random() + a
|
|
1406
|
-
},
|
|
1462
|
+
}, f(a), 3))), 128))
|
|
1407
1463
|
]),
|
|
1408
|
-
i("tr",
|
|
1409
|
-
|
|
1464
|
+
i("tr", le, [
|
|
1465
|
+
t[20] || (t[20] = i("td", {
|
|
1410
1466
|
rowspan: "1",
|
|
1411
1467
|
colspan: "1",
|
|
1412
1468
|
class: "tr-title"
|
|
1413
1469
|
}, [
|
|
1414
|
-
|
|
1470
|
+
y("Swell direction"),
|
|
1415
1471
|
i("span", { class: "unit" })
|
|
1416
1472
|
], -1)),
|
|
1417
|
-
(n(!0), o(
|
|
1473
|
+
(n(!0), o(b, null, x(s.tableData.swellDir, (a, r) => (n(), o("td", {
|
|
1418
1474
|
rowspan: "1",
|
|
1419
1475
|
colspan: "1",
|
|
1420
|
-
class:
|
|
1476
|
+
class: _(s.activeIndex === r ? "active" : ""),
|
|
1421
1477
|
key: Math.random() + a
|
|
1422
1478
|
}, [
|
|
1423
|
-
isNaN(a) ? (n(), o("span",
|
|
1479
|
+
isNaN(a) ? (n(), o("span", he, "-")) : (n(), o("span", {
|
|
1424
1480
|
key: 0,
|
|
1425
1481
|
class: "iconfont icon",
|
|
1426
|
-
style:
|
|
1482
|
+
style: nt({ display: "inline-block", transform: `rotate(${a}deg)` })
|
|
1427
1483
|
}, "", 4))
|
|
1428
1484
|
], 2))), 128))
|
|
1429
1485
|
]),
|
|
1430
|
-
i("tr",
|
|
1431
|
-
|
|
1486
|
+
i("tr", de, [
|
|
1487
|
+
t[21] || (t[21] = i("td", {
|
|
1432
1488
|
rowspan: "1",
|
|
1433
1489
|
colspan: "1",
|
|
1434
1490
|
class: "tr-title"
|
|
1435
1491
|
}, [
|
|
1436
|
-
|
|
1492
|
+
y("Swell period"),
|
|
1437
1493
|
i("span", { class: "unit" }, "s")
|
|
1438
1494
|
], -1)),
|
|
1439
|
-
(n(!0), o(
|
|
1495
|
+
(n(!0), o(b, null, x(s.tableData.swellPeriod, (a, r) => (n(), o("td", {
|
|
1440
1496
|
rowspan: "1",
|
|
1441
1497
|
colspan: "1",
|
|
1442
|
-
class:
|
|
1498
|
+
class: _(s.activeIndex === r ? "active" : ""),
|
|
1443
1499
|
key: Math.random() + a
|
|
1444
|
-
},
|
|
1500
|
+
}, f(a), 3))), 128))
|
|
1445
1501
|
]),
|
|
1446
|
-
i("tr",
|
|
1447
|
-
|
|
1502
|
+
i("tr", ce, [
|
|
1503
|
+
t[22] || (t[22] = i("td", {
|
|
1448
1504
|
rowspan: "1",
|
|
1449
1505
|
colspan: "1",
|
|
1450
1506
|
class: "tr-title"
|
|
1451
1507
|
}, [
|
|
1452
|
-
|
|
1508
|
+
y("Sig wave height"),
|
|
1453
1509
|
i("span", { class: "unit" }, "m")
|
|
1454
1510
|
], -1)),
|
|
1455
|
-
(n(!0), o(
|
|
1511
|
+
(n(!0), o(b, null, x(s.tableData.sigwaveHeight, (a, r) => (n(), o("td", {
|
|
1456
1512
|
rowspan: "1",
|
|
1457
1513
|
colspan: "1",
|
|
1458
|
-
class:
|
|
1514
|
+
class: _(s.activeIndex === r ? "active" : ""),
|
|
1459
1515
|
key: Math.random() + a
|
|
1460
|
-
},
|
|
1516
|
+
}, f(a), 3))), 128))
|
|
1461
1517
|
]),
|
|
1462
|
-
i("tr",
|
|
1463
|
-
|
|
1518
|
+
i("tr", pe, [
|
|
1519
|
+
t[23] || (t[23] = i("td", {
|
|
1464
1520
|
rowspan: "1",
|
|
1465
1521
|
colspan: "1",
|
|
1466
1522
|
class: "tr-title"
|
|
1467
1523
|
}, [
|
|
1468
|
-
|
|
1524
|
+
y("Current direction"),
|
|
1469
1525
|
i("span", { class: "unit" })
|
|
1470
1526
|
], -1)),
|
|
1471
|
-
(n(!0), o(
|
|
1527
|
+
(n(!0), o(b, null, x(s.tableData.currentDir, (a, r) => (n(), o("td", {
|
|
1472
1528
|
rowspan: "1",
|
|
1473
1529
|
colspan: "1",
|
|
1474
|
-
class:
|
|
1530
|
+
class: _(s.activeIndex === r ? "active" : ""),
|
|
1475
1531
|
key: Math.random() + a
|
|
1476
1532
|
}, [
|
|
1477
|
-
isNaN(a) ? (n(), o("span",
|
|
1533
|
+
isNaN(a) ? (n(), o("span", me, "-")) : (n(), o("span", {
|
|
1478
1534
|
key: 0,
|
|
1479
1535
|
class: "iconfont icon",
|
|
1480
|
-
style:
|
|
1536
|
+
style: nt({ display: "inline-block", transform: `rotate(${a}deg)` })
|
|
1481
1537
|
}, "", 4))
|
|
1482
1538
|
], 2))), 128))
|
|
1483
1539
|
]),
|
|
1484
|
-
i("tr",
|
|
1485
|
-
|
|
1540
|
+
i("tr", we, [
|
|
1541
|
+
t[24] || (t[24] = i("td", {
|
|
1486
1542
|
rowspan: "1",
|
|
1487
1543
|
colspan: "1",
|
|
1488
1544
|
class: "tr-title"
|
|
1489
1545
|
}, [
|
|
1490
|
-
|
|
1546
|
+
y("Current speed"),
|
|
1491
1547
|
i("span", { class: "unit" }, "kts")
|
|
1492
1548
|
], -1)),
|
|
1493
|
-
(n(!0), o(
|
|
1549
|
+
(n(!0), o(b, null, x(s.tableData.currentSpeed, (a, r) => (n(), o("td", {
|
|
1494
1550
|
rowspan: "1",
|
|
1495
1551
|
colspan: "1",
|
|
1496
|
-
class:
|
|
1552
|
+
class: _(s.activeIndex === r ? "active" : ""),
|
|
1497
1553
|
key: Math.random() + a
|
|
1498
|
-
},
|
|
1554
|
+
}, f(a), 3))), 128))
|
|
1499
1555
|
])
|
|
1500
1556
|
]),
|
|
1501
|
-
|
|
1502
|
-
i("table",
|
|
1503
|
-
i("tr",
|
|
1504
|
-
|
|
1557
|
+
t[28] || (t[28] = i("div", { style: { "text-align": "center", padding: "3px" } }, null, -1)),
|
|
1558
|
+
i("table", ue, [
|
|
1559
|
+
i("tr", ge, [
|
|
1560
|
+
t[25] || (t[25] = i("td", {
|
|
1505
1561
|
rowspan: "1",
|
|
1506
1562
|
colspan: "1",
|
|
1507
1563
|
class: "tr-title"
|
|
1508
1564
|
}, [
|
|
1509
|
-
|
|
1565
|
+
y("Sea level height"),
|
|
1510
1566
|
i("span", { class: "unit" }, "m")
|
|
1511
1567
|
], -1)),
|
|
1512
|
-
(n(!0), o(
|
|
1568
|
+
(n(!0), o(b, null, x(s.tableData.seaLevel, (a, r) => (n(), o("td", {
|
|
1513
1569
|
rowspan: "1",
|
|
1514
1570
|
colspan: "1",
|
|
1515
|
-
class:
|
|
1571
|
+
class: _(s.activeIndex === r ? "active" : ""),
|
|
1516
1572
|
key: Math.random() + a
|
|
1517
|
-
},
|
|
1573
|
+
}, f(a), 3))), 128))
|
|
1518
1574
|
]),
|
|
1519
|
-
i("tr",
|
|
1520
|
-
|
|
1575
|
+
i("tr", ve, [
|
|
1576
|
+
t[26] || (t[26] = i("td", {
|
|
1521
1577
|
rowspan: "1",
|
|
1522
1578
|
colspan: "1",
|
|
1523
1579
|
class: "tr-title"
|
|
1524
1580
|
}, [
|
|
1525
|
-
|
|
1581
|
+
y("Sea surface temperature"),
|
|
1526
1582
|
i("span", { class: "unit" }, "°C")
|
|
1527
1583
|
], -1)),
|
|
1528
|
-
(n(!0), o(
|
|
1584
|
+
(n(!0), o(b, null, x(s.tableData.seaTemp, (a, r) => (n(), o("td", {
|
|
1529
1585
|
rowspan: "1",
|
|
1530
1586
|
colspan: "1",
|
|
1531
|
-
class:
|
|
1587
|
+
class: _(s.activeIndex === r ? "active" : ""),
|
|
1532
1588
|
key: Math.random() + a
|
|
1533
|
-
},
|
|
1589
|
+
}, f(a), 3))), 128))
|
|
1534
1590
|
])
|
|
1535
1591
|
])
|
|
1536
|
-
])) : s.loading ? (n(), o("div",
|
|
1592
|
+
])) : s.loading ? (n(), o("div", be, "Loading....")) : (H = s.position) != null && H.name ? pt("", !0) : (n(), o("div", xe, "No Data"))
|
|
1537
1593
|
])
|
|
1538
1594
|
]);
|
|
1539
1595
|
}
|
|
1540
|
-
const
|
|
1596
|
+
const ye = /* @__PURE__ */ St(Lt, [["render", fe], ["__scopeId", "data-v-299b53fa"]]), Ne = {
|
|
1541
1597
|
install(l) {
|
|
1542
|
-
l.component("SpotReport",
|
|
1598
|
+
l.component("SpotReport", ye);
|
|
1543
1599
|
}
|
|
1544
1600
|
};
|
|
1545
1601
|
export {
|
|
1546
|
-
|
|
1547
|
-
|
|
1602
|
+
ye as SpotReport,
|
|
1603
|
+
Ne as SpotReportPlugin
|
|
1548
1604
|
};
|