@idmwx/idmui-gl3 5.2.0 → 5.2.2

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 CHANGED
@@ -25,38 +25,38 @@ var F0 = { exports: {} }, G0 = { exports: {} };
25
25
  b.exports ? b.exports = z(K) : z(M.moment);
26
26
  })(b1, function(M) {
27
27
  M.version === void 0 && M.default && (M = M.default);
28
- var z = "0.5.47", O = {}, p = {}, o = {}, A = {}, a = {}, q;
28
+ var z = "0.5.47", O = {}, p = {}, o = {}, A = {}, q = {}, a;
29
29
  (!M || typeof M.version != "string") && e0("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");
30
- var r = M.version.split("."), t = +r[0], n = +r[1];
31
- (t < 2 || t === 2 && n < 6) && e0("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js " + M.version + ". See momentjs.com");
32
- function l(e) {
33
- return e > 96 ? e - 87 : e > 64 ? e - 29 : e - 48;
34
- }
35
- function d(e) {
36
- var i = 0, L = e.split("."), N = L[0], w = L[1] || "", D = 1, Z, S = 0, G = 1;
37
- for (e.charCodeAt(0) === 45 && (i = 1, G = -1), i; i < N.length; i++)
30
+ var r = M.version.split("."), e = +r[0], n = +r[1];
31
+ (e < 2 || e === 2 && n < 6) && e0("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js " + M.version + ". See momentjs.com");
32
+ function l(t) {
33
+ return t > 96 ? t - 87 : t > 64 ? t - 29 : t - 48;
34
+ }
35
+ function d(t) {
36
+ var i = 0, L = t.split("."), N = L[0], w = L[1] || "", D = 1, Z, S = 0, G = 1;
37
+ for (t.charCodeAt(0) === 45 && (i = 1, G = -1), i; i < N.length; i++)
38
38
  Z = l(N.charCodeAt(i)), S = 60 * S + Z;
39
39
  for (i = 0; i < w.length; i++)
40
40
  D = D / 60, Z = l(w.charCodeAt(i)), S += Z * D;
41
41
  return S * G;
42
42
  }
43
- function B(e) {
44
- for (var i = 0; i < e.length; i++)
45
- e[i] = d(e[i]);
43
+ function B(t) {
44
+ for (var i = 0; i < t.length; i++)
45
+ t[i] = d(t[i]);
46
46
  }
47
- function R(e, i) {
47
+ function R(t, i) {
48
48
  for (var L = 0; L < i; L++)
49
- e[L] = Math.round((e[L - 1] || 0) + e[L] * 6e4);
50
- e[i - 1] = 1 / 0;
49
+ t[L] = Math.round((t[L - 1] || 0) + t[L] * 6e4);
50
+ t[i - 1] = 1 / 0;
51
51
  }
52
- function f(e, i) {
52
+ function f(t, i) {
53
53
  var L = [], N;
54
54
  for (N = 0; N < i.length; N++)
55
- L[N] = e[i[N]];
55
+ L[N] = t[i[N]];
56
56
  return L;
57
57
  }
58
- function h(e) {
59
- var i = e.split("|"), L = i[2].split(" "), N = i[3].split(""), w = i[4].split(" ");
58
+ function h(t) {
59
+ var i = t.split("|"), L = i[2].split(" "), N = i[3].split(""), w = i[4].split(" ");
60
60
  return B(L), B(N), B(w), R(w, N.length), {
61
61
  name: i[0],
62
62
  abbrs: f(i[1].split(" "), N),
@@ -65,92 +65,92 @@ var F0 = { exports: {} }, G0 = { exports: {} };
65
65
  population: i[5] | 0
66
66
  };
67
67
  }
68
- function m(e) {
69
- e && this._set(h(e));
68
+ function m(t) {
69
+ t && this._set(h(t));
70
70
  }
71
- function X(e, i) {
71
+ function X(t, i) {
72
72
  var L = i.length;
73
- if (e < i[0])
73
+ if (t < i[0])
74
74
  return 0;
75
- if (L > 1 && i[L - 1] === 1 / 0 && e >= i[L - 2])
75
+ if (L > 1 && i[L - 1] === 1 / 0 && t >= i[L - 2])
76
76
  return L - 1;
77
- if (e >= i[L - 1])
77
+ if (t >= i[L - 1])
78
78
  return -1;
79
79
  for (var N, w = 0, D = L - 1; D - w > 1; )
80
- N = Math.floor((w + D) / 2), i[N] <= e ? w = N : D = N;
80
+ N = Math.floor((w + D) / 2), i[N] <= t ? w = N : D = N;
81
81
  return D;
82
82
  }
83
83
  m.prototype = {
84
- _set: function(e) {
85
- this.name = e.name, this.abbrs = e.abbrs, this.untils = e.untils, this.offsets = e.offsets, this.population = e.population;
84
+ _set: function(t) {
85
+ this.name = t.name, this.abbrs = t.abbrs, this.untils = t.untils, this.offsets = t.offsets, this.population = t.population;
86
86
  },
87
- _index: function(e) {
88
- var i = +e, L = this.untils, N;
87
+ _index: function(t) {
88
+ var i = +t, L = this.untils, N;
89
89
  if (N = X(i, L), N >= 0)
90
90
  return N;
91
91
  },
92
92
  countries: function() {
93
- var e = this.name;
93
+ var t = this.name;
94
94
  return Object.keys(o).filter(function(i) {
95
- return o[i].zones.indexOf(e) !== -1;
95
+ return o[i].zones.indexOf(t) !== -1;
96
96
  });
97
97
  },
98
- parse: function(e) {
99
- var i = +e, L = this.offsets, N = this.untils, w = N.length - 1, D, Z, S, G;
98
+ parse: function(t) {
99
+ var i = +t, L = this.offsets, N = this.untils, w = N.length - 1, D, Z, S, G;
100
100
  for (G = 0; G < w; G++)
101
101
  if (D = L[G], Z = L[G + 1], S = L[G && G - 1], D < Z && I.moveAmbiguousForward ? D = Z : D > S && I.moveInvalidForward && (D = S), i < N[G] - D * 6e4)
102
102
  return L[G];
103
103
  return L[w];
104
104
  },
105
- abbr: function(e) {
106
- return this.abbrs[this._index(e)];
105
+ abbr: function(t) {
106
+ return this.abbrs[this._index(t)];
107
107
  },
108
- offset: function(e) {
109
- return e0("zone.offset has been deprecated in favor of zone.utcOffset"), this.offsets[this._index(e)];
108
+ offset: function(t) {
109
+ return e0("zone.offset has been deprecated in favor of zone.utcOffset"), this.offsets[this._index(t)];
110
110
  },
111
- utcOffset: function(e) {
112
- return this.offsets[this._index(e)];
111
+ utcOffset: function(t) {
112
+ return this.offsets[this._index(t)];
113
113
  }
114
114
  };
115
- function E(e, i) {
116
- this.name = e, this.zones = i;
115
+ function E(t, i) {
116
+ this.name = t, this.zones = i;
117
117
  }
118
- function y(e) {
119
- var i = e.toTimeString(), L = i.match(/\([a-z ]+\)/i);
120
- L && L[0] ? (L = L[0].match(/[A-Z]/g), L = L ? L.join("") : void 0) : (L = i.match(/[A-Z]{3,5}/g), L = L ? L[0] : void 0), L === "GMT" && (L = void 0), this.at = +e, this.abbr = L, this.offset = e.getTimezoneOffset();
118
+ function y(t) {
119
+ var i = t.toTimeString(), L = i.match(/\([a-z ]+\)/i);
120
+ L && L[0] ? (L = L[0].match(/[A-Z]/g), L = L ? L.join("") : void 0) : (L = i.match(/[A-Z]{3,5}/g), L = L ? L[0] : void 0), L === "GMT" && (L = void 0), this.at = +t, this.abbr = L, this.offset = t.getTimezoneOffset();
121
121
  }
122
- function F(e) {
123
- this.zone = e, this.offsetScore = 0, this.abbrScore = 0;
122
+ function F(t) {
123
+ this.zone = t, this.offsetScore = 0, this.abbrScore = 0;
124
124
  }
125
- F.prototype.scoreOffsetAt = function(e) {
126
- this.offsetScore += Math.abs(this.zone.utcOffset(e.at) - e.offset), this.zone.abbr(e.at).replace(/[^A-Z]/g, "") !== e.abbr && this.abbrScore++;
125
+ F.prototype.scoreOffsetAt = function(t) {
126
+ this.offsetScore += Math.abs(this.zone.utcOffset(t.at) - t.offset), this.zone.abbr(t.at).replace(/[^A-Z]/g, "") !== t.abbr && this.abbrScore++;
127
127
  };
128
- function J(e, i) {
129
- for (var L, N; N = ((i.at - e.at) / 12e4 | 0) * 6e4; )
130
- L = new y(new Date(e.at + N)), L.offset === e.offset ? e = L : i = L;
131
- return e;
128
+ function J(t, i) {
129
+ for (var L, N; N = ((i.at - t.at) / 12e4 | 0) * 6e4; )
130
+ L = new y(new Date(t.at + N)), L.offset === t.offset ? t = L : i = L;
131
+ return t;
132
132
  }
133
133
  function V() {
134
- var e = (/* @__PURE__ */ new Date()).getFullYear() - 2, i = new y(new Date(e, 0, 1)), L = i.offset, N = [i], w, D, Z, S;
134
+ var t = (/* @__PURE__ */ new Date()).getFullYear() - 2, i = new y(new Date(t, 0, 1)), L = i.offset, N = [i], w, D, Z, S;
135
135
  for (S = 1; S < 48; S++)
136
- Z = new Date(e, S, 1).getTimezoneOffset(), Z !== L && (D = new y(new Date(e, S, 1)), w = J(i, D), N.push(w), N.push(new y(new Date(w.at + 6e4))), i = D, L = Z);
136
+ Z = new Date(t, S, 1).getTimezoneOffset(), Z !== L && (D = new y(new Date(t, S, 1)), w = J(i, D), N.push(w), N.push(new y(new Date(w.at + 6e4))), i = D, L = Z);
137
137
  for (S = 0; S < 4; S++)
138
- N.push(new y(new Date(e + S, 0, 1))), N.push(new y(new Date(e + S, 6, 1)));
138
+ N.push(new y(new Date(t + S, 0, 1))), N.push(new y(new Date(t + S, 6, 1)));
139
139
  return N;
140
140
  }
141
- function u(e, i) {
142
- return e.offsetScore !== i.offsetScore ? e.offsetScore - i.offsetScore : e.abbrScore !== i.abbrScore ? e.abbrScore - i.abbrScore : e.zone.population !== i.zone.population ? i.zone.population - e.zone.population : i.zone.name.localeCompare(e.zone.name);
141
+ function u(t, i) {
142
+ return t.offsetScore !== i.offsetScore ? t.offsetScore - i.offsetScore : t.abbrScore !== i.abbrScore ? t.abbrScore - i.abbrScore : t.zone.population !== i.zone.population ? i.zone.population - t.zone.population : i.zone.name.localeCompare(t.zone.name);
143
143
  }
144
- function g(e, i) {
144
+ function g(t, i) {
145
145
  var L, N;
146
146
  for (B(i), L = 0; L < i.length; L++)
147
- N = i[L], a[N] = a[N] || {}, a[N][e] = !0;
147
+ N = i[L], q[N] = q[N] || {}, q[N][t] = !0;
148
148
  }
149
- function A0(e) {
150
- var i = e.length, L = {}, N = [], w = {}, D, Z, S, G;
149
+ function A0(t) {
150
+ var i = t.length, L = {}, N = [], w = {}, D, Z, S, G;
151
151
  for (D = 0; D < i; D++)
152
- if (S = e[D].offset, !w.hasOwnProperty(S)) {
153
- G = a[S] || {};
152
+ if (S = t[D].offset, !w.hasOwnProperty(S)) {
153
+ G = q[S] || {};
154
154
  for (Z in G)
155
155
  G.hasOwnProperty(Z) && (L[Z] = !0);
156
156
  w[S] = !0;
@@ -161,12 +161,12 @@ var F0 = { exports: {} }, G0 = { exports: {} };
161
161
  }
162
162
  function n0() {
163
163
  try {
164
- var e = Intl.DateTimeFormat().resolvedOptions().timeZone;
165
- if (e && e.length > 3) {
166
- var i = A[i0(e)];
164
+ var t = Intl.DateTimeFormat().resolvedOptions().timeZone;
165
+ if (t && t.length > 3) {
166
+ var i = A[i0(t)];
167
167
  if (i)
168
168
  return i;
169
- e0("Moment Timezone found " + e + " from the Intl api, but did not have that data loaded.");
169
+ e0("Moment Timezone found " + t + " from the Intl api, but did not have that data loaded.");
170
170
  }
171
171
  } catch {
172
172
  }
@@ -178,52 +178,52 @@ var F0 = { exports: {} }, G0 = { exports: {} };
178
178
  }
179
179
  return D.sort(u), D.length > 0 ? D[0].zone.name : void 0;
180
180
  }
181
- function h0(e) {
182
- return (!q || e) && (q = n0()), q;
181
+ function h0(t) {
182
+ return (!a || t) && (a = n0()), a;
183
183
  }
184
- function i0(e) {
185
- return (e || "").toLowerCase().replace(/\//g, "_");
184
+ function i0(t) {
185
+ return (t || "").toLowerCase().replace(/\//g, "_");
186
186
  }
187
- function u0(e) {
187
+ function u0(t) {
188
188
  var i, L, N, w;
189
- for (typeof e == "string" && (e = [e]), i = 0; i < e.length; i++)
190
- N = e[i].split("|"), L = N[0], w = i0(L), O[w] = e[i], A[w] = L, g(w, N[2].split(" "));
189
+ for (typeof t == "string" && (t = [t]), i = 0; i < t.length; i++)
190
+ N = t[i].split("|"), L = N[0], w = i0(L), O[w] = t[i], A[w] = L, g(w, N[2].split(" "));
191
191
  }
192
- function p0(e, i) {
193
- e = i0(e);
194
- var L = O[e], N;
195
- return L instanceof m ? L : typeof L == "string" ? (L = new m(L), O[e] = L, L) : p[e] && i !== p0 && (N = p0(p[e], p0)) ? (L = O[e] = new m(), L._set(N), L.name = A[e], L) : null;
192
+ function p0(t, i) {
193
+ t = i0(t);
194
+ var L = O[t], N;
195
+ return L instanceof m ? L : typeof L == "string" ? (L = new m(L), O[t] = L, L) : p[t] && i !== p0 && (N = p0(p[t], p0)) ? (L = O[t] = new m(), L._set(N), L.name = A[t], L) : null;
196
196
  }
197
197
  function m0() {
198
- var e, i = [];
199
- for (e in A)
200
- A.hasOwnProperty(e) && (O[e] || O[p[e]]) && A[e] && i.push(A[e]);
198
+ var t, i = [];
199
+ for (t in A)
200
+ A.hasOwnProperty(t) && (O[t] || O[p[t]]) && A[t] && i.push(A[t]);
201
201
  return i.sort();
202
202
  }
203
203
  function B0() {
204
204
  return Object.keys(o);
205
205
  }
206
- function L0(e) {
206
+ function L0(t) {
207
207
  var i, L, N, w;
208
- for (typeof e == "string" && (e = [e]), i = 0; i < e.length; i++)
209
- L = e[i].split("|"), N = i0(L[0]), w = i0(L[1]), p[N] = w, A[N] = L[0], p[w] = N, A[w] = L[1];
208
+ for (typeof t == "string" && (t = [t]), i = 0; i < t.length; i++)
209
+ L = t[i].split("|"), N = i0(L[0]), w = i0(L[1]), p[N] = w, A[N] = L[0], p[w] = N, A[w] = L[1];
210
210
  }
211
- function r0(e) {
211
+ function r0(t) {
212
212
  var i, L, N, w;
213
- if (!(!e || !e.length))
214
- for (i = 0; i < e.length; i++)
215
- w = e[i].split("|"), L = w[0].toUpperCase(), N = w[1].split(" "), o[L] = new E(
213
+ if (!(!t || !t.length))
214
+ for (i = 0; i < t.length; i++)
215
+ w = t[i].split("|"), L = w[0].toUpperCase(), N = w[1].split(" "), o[L] = new E(
216
216
  L,
217
217
  N
218
218
  );
219
219
  }
220
- function d0(e) {
221
- return e = e.toUpperCase(), o[e] || null;
220
+ function d0(t) {
221
+ return t = t.toUpperCase(), o[t] || null;
222
222
  }
223
- function g0(e, i) {
224
- if (e = d0(e), !e)
223
+ function g0(t, i) {
224
+ if (t = d0(t), !t)
225
225
  return null;
226
- var L = e.zones.sort();
226
+ var L = t.zones.sort();
227
227
  return i ? L.map(function(N) {
228
228
  var w = p0(N);
229
229
  return {
@@ -232,59 +232,59 @@ var F0 = { exports: {} }, G0 = { exports: {} };
232
232
  };
233
233
  }) : L;
234
234
  }
235
- function s0(e) {
236
- u0(e.zones), L0(e.links), r0(e.countries), I.dataVersion = e.version;
235
+ function s0(t) {
236
+ u0(t.zones), L0(t.links), r0(t.countries), I.dataVersion = t.version;
237
237
  }
238
- function P(e) {
239
- return P.didShowError || (P.didShowError = !0, e0("moment.tz.zoneExists('" + e + "') has been deprecated in favor of !moment.tz.zone('" + e + "')")), !!p0(e);
238
+ function P(t) {
239
+ return P.didShowError || (P.didShowError = !0, e0("moment.tz.zoneExists('" + t + "') has been deprecated in favor of !moment.tz.zone('" + t + "')")), !!p0(t);
240
240
  }
241
- function M0(e) {
242
- var i = e._f === "X" || e._f === "x";
243
- return !!(e._a && e._tzm === void 0 && !i);
241
+ function M0(t) {
242
+ var i = t._f === "X" || t._f === "x";
243
+ return !!(t._a && t._tzm === void 0 && !i);
244
244
  }
245
- function e0(e) {
246
- typeof console < "u" && typeof console.error == "function" && console.error(e);
245
+ function e0(t) {
246
+ typeof console < "u" && typeof console.error == "function" && console.error(t);
247
247
  }
248
- function I(e) {
248
+ function I(t) {
249
249
  var i = Array.prototype.slice.call(arguments, 0, -1), L = arguments[arguments.length - 1], N = M.utc.apply(null, i), w;
250
- return !M.isMoment(e) && M0(N) && (w = p0(L)) && N.add(w.parse(N), "minutes"), N.tz(L), N;
250
+ return !M.isMoment(t) && M0(N) && (w = p0(L)) && N.add(w.parse(N), "minutes"), N.tz(L), N;
251
251
  }
252
252
  I.version = z, I.dataVersion = "", I._zones = O, I._links = p, I._names = A, I._countries = o, I.add = u0, I.link = L0, I.load = s0, I.zone = p0, I.zoneExists = P, I.guess = h0, I.names = m0, I.Zone = m, I.unpack = h, I.unpackBase60 = d, I.needsOffset = M0, I.moveInvalidForward = !0, I.moveAmbiguousForward = !1, I.countries = B0, I.zonesForCountry = g0;
253
253
  var b0 = M.fn;
254
- M.tz = I, M.defaultZone = null, M.updateOffset = function(e, i) {
254
+ M.tz = I, M.defaultZone = null, M.updateOffset = function(t, i) {
255
255
  var L = M.defaultZone, N;
256
- if (e._z === void 0 && (L && M0(e) && !e._isUTC && e.isValid() && (e._d = M.utc(e._a)._d, e.utc().add(L.parse(e), "minutes")), e._z = L), e._z)
257
- if (N = e._z.utcOffset(e), Math.abs(N) < 16 && (N = N / 60), e.utcOffset !== void 0) {
258
- var w = e._z;
259
- e.utcOffset(-N, i), e._z = w;
256
+ if (t._z === void 0 && (L && M0(t) && !t._isUTC && t.isValid() && (t._d = M.utc(t._a)._d, t.utc().add(L.parse(t), "minutes")), t._z = L), t._z)
257
+ if (N = t._z.utcOffset(t), Math.abs(N) < 16 && (N = N / 60), t.utcOffset !== void 0) {
258
+ var w = t._z;
259
+ t.utcOffset(-N, i), t._z = w;
260
260
  } else
261
- e.zone(N, i);
262
- }, b0.tz = function(e, i) {
263
- if (e) {
264
- if (typeof e != "string")
265
- throw new Error("Time zone name must be a string, got " + e + " [" + typeof e + "]");
266
- return this._z = p0(e), this._z ? M.updateOffset(this, i) : e0("Moment Timezone has no data for " + e + ". See http://momentjs.com/timezone/docs/#/data-loading/."), this;
261
+ t.zone(N, i);
262
+ }, b0.tz = function(t, i) {
263
+ if (t) {
264
+ if (typeof t != "string")
265
+ throw new Error("Time zone name must be a string, got " + t + " [" + typeof t + "]");
266
+ return this._z = p0(t), this._z ? M.updateOffset(this, i) : e0("Moment Timezone has no data for " + t + ". See http://momentjs.com/timezone/docs/#/data-loading/."), this;
267
267
  }
268
268
  if (this._z)
269
269
  return this._z.name;
270
270
  };
271
- function W0(e) {
271
+ function W0(t) {
272
272
  return function() {
273
- return this._z ? this._z.abbr(this) : e.call(this);
273
+ return this._z ? this._z.abbr(this) : t.call(this);
274
274
  };
275
275
  }
276
- function l0(e) {
276
+ function l0(t) {
277
277
  return function() {
278
- return this._z = null, e.apply(this, arguments);
278
+ return this._z = null, t.apply(this, arguments);
279
279
  };
280
280
  }
281
- function R0(e) {
281
+ function R0(t) {
282
282
  return function() {
283
- return arguments.length > 0 && (this._z = null), e.apply(this, arguments);
283
+ return arguments.length > 0 && (this._z = null), t.apply(this, arguments);
284
284
  };
285
285
  }
286
- b0.zoneName = W0(b0.zoneName), b0.zoneAbbr = W0(b0.zoneAbbr), b0.utc = l0(b0.utc), b0.local = l0(b0.local), b0.utcOffset = R0(b0.utcOffset), M.tz.setDefault = function(e) {
287
- return (t < 2 || t === 2 && n < 9) && e0("Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js " + M.version + "."), M.defaultZone = e ? p0(e) : null, M;
286
+ b0.zoneName = W0(b0.zoneName), b0.zoneAbbr = W0(b0.zoneAbbr), b0.utc = l0(b0.utc), b0.local = l0(b0.local), b0.utcOffset = R0(b0.utcOffset), M.tz.setDefault = function(t) {
287
+ return (e < 2 || e === 2 && n < 9) && e0("Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js " + M.version + "."), M.defaultZone = t ? p0(t) : null, M;
288
288
  };
289
289
  var o0 = M.momentProperties;
290
290
  return Object.prototype.toString.call(o0) === "[object Array]" ? (o0.push("_z"), o0.push("_a")) : o0 && (o0._z = null), M;
@@ -1405,7 +1405,7 @@ const k = (b, M) => {
1405
1405
  class: "radio-tip"
1406
1406
  };
1407
1407
  function K1(b, M, z, O, p, o) {
1408
- const A = x("ElTooltip"), a = x("ElRadio"), q = x("ElRadioGroup"), r = x("ElScrollbar");
1408
+ const A = x("ElTooltip"), q = x("ElRadio"), a = x("ElRadioGroup"), r = x("ElScrollbar");
1409
1409
  return s(), W("div", i1, [
1410
1410
  c("div", {
1411
1411
  class: "menu-bar-box",
@@ -1421,7 +1421,7 @@ function K1(b, M, z, O, p, o) {
1421
1421
  default: a0(() => [
1422
1422
  c("div", {
1423
1423
  class: U(z.layerToggle ? "menu-icon active" : "menu-icon"),
1424
- onClick: M[0] || (M[0] = (...t) => o.handleMenuToggle && o.handleMenuToggle(...t))
1424
+ onClick: M[0] || (M[0] = (...e) => o.handleMenuToggle && o.handleMenuToggle(...e))
1425
1425
  }, M[17] || (M[17] = [
1426
1426
  c("span", { class: "iconfont" }, "", -1)
1427
1427
  ]), 2)
@@ -1444,7 +1444,7 @@ function K1(b, M, z, O, p, o) {
1444
1444
  default: a0(() => [
1445
1445
  c("div", {
1446
1446
  class: U(p.showMeasure ? "menu-icon active" : "menu-icon"),
1447
- onClick: M[1] || (M[1] = (...t) => o.handleMeasureToggle && o.handleMeasureToggle(...t))
1447
+ onClick: M[1] || (M[1] = (...e) => o.handleMeasureToggle && o.handleMeasureToggle(...e))
1448
1448
  }, M[18] || (M[18] = [
1449
1449
  c("span", { class: "iconfont" }, "", -1)
1450
1450
  ]), 2)
@@ -1460,7 +1460,7 @@ function K1(b, M, z, O, p, o) {
1460
1460
  default: a0(() => [
1461
1461
  c("div", {
1462
1462
  class: U(p.showPoint ? "menu-icon active" : "menu-icon"),
1463
- onClick: M[2] || (M[2] = (...t) => o.handlePointToggle && o.handlePointToggle(...t))
1463
+ onClick: M[2] || (M[2] = (...e) => o.handlePointToggle && o.handlePointToggle(...e))
1464
1464
  }, M[19] || (M[19] = [
1465
1465
  c("span", { class: "iconfont" }, "", -1)
1466
1466
  ]), 2)
@@ -1476,7 +1476,7 @@ function K1(b, M, z, O, p, o) {
1476
1476
  default: a0(() => [
1477
1477
  c("div", {
1478
1478
  class: U(p.showCoord ? "menu-icon active" : "menu-icon"),
1479
- onClick: M[3] || (M[3] = (...t) => o.handleCoordToggle && o.handleCoordToggle(...t))
1479
+ onClick: M[3] || (M[3] = (...e) => o.handleCoordToggle && o.handleCoordToggle(...e))
1480
1480
  }, M[20] || (M[20] = [
1481
1481
  c("span", { class: "iconfont" }, "", -1)
1482
1482
  ]), 2)
@@ -1492,7 +1492,7 @@ function K1(b, M, z, O, p, o) {
1492
1492
  default: a0(() => [
1493
1493
  c("div", {
1494
1494
  class: U(p.show3d ? "menu-icon active" : "menu-icon"),
1495
- onClick: M[4] || (M[4] = (...t) => o.handle3DToggle && o.handle3DToggle(...t))
1495
+ onClick: M[4] || (M[4] = (...e) => o.handle3DToggle && o.handle3DToggle(...e))
1496
1496
  }, M[21] || (M[21] = [
1497
1497
  c("span", { class: "iconfont" }, "", -1)
1498
1498
  ]), 2)
@@ -1511,24 +1511,24 @@ function K1(b, M, z, O, p, o) {
1511
1511
  c("div", {
1512
1512
  class: "switch flex-center",
1513
1513
  style: { "font-size": "28px", "margin-right": "0" },
1514
- onClick: M[5] || (M[5] = (...t) => o.toggleAutoActive && o.toggleAutoActive(...t))
1514
+ onClick: M[5] || (M[5] = (...e) => o.toggleAutoActive && o.toggleAutoActive(...e))
1515
1515
  }, [
1516
1516
  p.autoActive ? (s(), W("i", s1, "")) : (s(), W("i", W1, ""))
1517
1517
  ])
1518
1518
  ]),
1519
- (s(!0), W(H, null, _(p.layers.weather.filter((t) => t.collected), (t) => (s(), W("div", {
1520
- key: t.key,
1521
- class: U(o.computeLayerClass(t, p.activeWeatherLayers))
1519
+ (s(!0), W(H, null, _(p.layers.weather.filter((e) => e.collected), (e) => (s(), W("div", {
1520
+ key: e.key,
1521
+ class: U(o.computeLayerClass(e, p.activeWeatherLayers))
1522
1522
  }, [
1523
1523
  c("div", {
1524
1524
  class: "checkbox",
1525
- onClick: (n) => o.handleWeatherLayerPick(t)
1525
+ onClick: (n) => o.handleWeatherLayerPick(e)
1526
1526
  }, null, 8, l1),
1527
1527
  c("span", {
1528
1528
  class: "name",
1529
- onClick: (n) => o.handleWeatherLayerPick(t)
1530
- }, C(t.name), 9, f1),
1531
- t.key === "wind" && p.activeWeatherLayers.some((n) => n.key === t.key) ? (s(), W("div", u1, [
1529
+ onClick: (n) => o.handleWeatherLayerPick(e)
1530
+ }, C(e.name), 9, f1),
1531
+ e.key === "wind" && p.activeWeatherLayers.some((n) => n.key === e.key) ? (s(), W("div", u1, [
1532
1532
  c("i", {
1533
1533
  class: U(["iconfont sub-layer-icon", z.showWindParticle ? "active" : ""]),
1534
1534
  onClick: M[6] || (M[6] = (n) => o.handleToggleWindParticle())
@@ -1538,7 +1538,7 @@ function K1(b, M, z, O, p, o) {
1538
1538
  onClick: M[7] || (M[7] = (n) => o.handleToggleWindFeather())
1539
1539
  }, "", 2)
1540
1540
  ])) : j("", !0),
1541
- t.key === "current" && p.activeWeatherLayers.some((n) => n.key === t.key) ? (s(), W("div", L1, [
1541
+ e.key === "current" && p.activeWeatherLayers.some((n) => n.key === e.key) ? (s(), W("div", L1, [
1542
1542
  c("i", {
1543
1543
  class: U(["iconfont sub-layer-icon", z.showCurrentParticle ? "active" : ""]),
1544
1544
  onClick: M[8] || (M[8] = (n) => o.handleToggleCurrentParticle())
@@ -1561,7 +1561,7 @@ function K1(b, M, z, O, p, o) {
1561
1561
  M[23] || (M[23] = c("div", null, "Layers", -1)),
1562
1562
  c("div", {
1563
1563
  class: "iconfont close-btn",
1564
- onClick: M[10] || (M[10] = (...t) => o.handleMenuToggle && o.handleMenuToggle(...t))
1564
+ onClick: M[10] || (M[10] = (...e) => o.handleMenuToggle && o.handleMenuToggle(...e))
1565
1565
  }, "")
1566
1566
  ]),
1567
1567
  T(r, { style: { flex: "1" } }, {
@@ -1572,29 +1572,29 @@ function K1(b, M, z, O, p, o) {
1572
1572
  c("div", {
1573
1573
  class: "switch flex-center",
1574
1574
  style: { "margin-right": "0" },
1575
- onClick: M[11] || (M[11] = (...t) => o.toggleAutoActive && o.toggleAutoActive(...t))
1575
+ onClick: M[11] || (M[11] = (...e) => o.toggleAutoActive && o.toggleAutoActive(...e))
1576
1576
  }, [
1577
1577
  p.autoActive ? (s(), W("i", B1, "")) : (s(), W("i", g1, ""))
1578
1578
  ])
1579
1579
  ]),
1580
1580
  c("div", N1, [
1581
- (s(!0), W(H, null, _(p.layers.weather, (t) => (s(), W(H, {
1582
- key: t.key
1581
+ (s(!0), W(H, null, _(p.layers.weather, (e) => (s(), W(H, {
1582
+ key: e.key
1583
1583
  }, [
1584
- t.hide ? j("", !0) : (s(), W("div", {
1584
+ e.hide ? j("", !0) : (s(), W("div", {
1585
1585
  key: 0,
1586
- class: U(o.computeLayerClass(t, p.activeWeatherLayers))
1586
+ class: U(o.computeLayerClass(e, p.activeWeatherLayers))
1587
1587
  }, [
1588
1588
  c("div", y1, [
1589
1589
  c("div", {
1590
1590
  class: "checkbox",
1591
- onClick: (n) => o.handleWeatherLayerPick(t)
1591
+ onClick: (n) => o.handleWeatherLayerPick(e)
1592
1592
  }, null, 8, X1),
1593
1593
  c("span", {
1594
1594
  class: "name",
1595
- onClick: (n) => o.handleWeatherLayerPick(t)
1596
- }, C(t.name), 9, w1),
1597
- t.key === "wind" && p.activeWeatherLayers.some((n) => n.key === t.key) ? (s(), W("div", C1, [
1595
+ onClick: (n) => o.handleWeatherLayerPick(e)
1596
+ }, C(e.name), 9, w1),
1597
+ e.key === "wind" && p.activeWeatherLayers.some((n) => n.key === e.key) ? (s(), W("div", C1, [
1598
1598
  c("i", {
1599
1599
  class: U(["iconfont sub-layer-icon", z.showWindParticle ? "active" : ""]),
1600
1600
  onClick: M[12] || (M[12] = (n) => o.handleToggleWindParticle())
@@ -1604,7 +1604,7 @@ function K1(b, M, z, O, p, o) {
1604
1604
  onClick: M[13] || (M[13] = (n) => o.handleToggleWindFeather())
1605
1605
  }, "", 2)
1606
1606
  ])) : j("", !0),
1607
- t.key === "current" && p.activeWeatherLayers.some((n) => n.key === t.key) ? (s(), W("div", v1, [
1607
+ e.key === "current" && p.activeWeatherLayers.some((n) => n.key === e.key) ? (s(), W("div", v1, [
1608
1608
  c("i", {
1609
1609
  class: U(["iconfont sub-layer-icon", z.showCurrentParticle ? "active" : ""]),
1610
1610
  onClick: M[14] || (M[14] = (n) => o.handleToggleCurrentParticle())
@@ -1616,9 +1616,9 @@ function K1(b, M, z, O, p, o) {
1616
1616
  ])) : j("", !0)
1617
1617
  ]),
1618
1618
  c("div", {
1619
- onClick: (n) => o.handleWeatherLayerCollect(t)
1619
+ onClick: (n) => o.handleWeatherLayerCollect(e)
1620
1620
  }, [
1621
- t.collected ? (s(), W("i", E1, "")) : (s(), W("i", x1, ""))
1621
+ e.collected ? (s(), W("i", E1, "")) : (s(), W("i", x1, ""))
1622
1622
  ], 8, T1)
1623
1623
  ], 2))
1624
1624
  ], 64))), 128)),
@@ -1634,18 +1634,18 @@ function K1(b, M, z, O, p, o) {
1634
1634
  c("div", I1, [
1635
1635
  M[26] || (M[26] = c("div", { class: "layers-title" }, "Other Layers", -1)),
1636
1636
  c("div", D1, [
1637
- (s(!0), W(H, null, _(p.layers.other, (t) => {
1637
+ (s(!0), W(H, null, _(p.layers.other, (e) => {
1638
1638
  var n;
1639
1639
  return s(), W("div", {
1640
- key: t.key,
1641
- class: U(["layer flex-between", o.computeLayerClass(t, p.activeOtherLayers)]),
1642
- onClick: (l) => o.handleOtherLayerPick(t)
1640
+ key: e.key,
1641
+ class: U(["layer flex-between", o.computeLayerClass(e, p.activeOtherLayers)]),
1642
+ onClick: (l) => o.handleOtherLayerPick(e)
1643
1643
  }, [
1644
1644
  c("div", S1, [
1645
1645
  c("div", k1, [
1646
- (n = o.computeLayerClass(t, p.activeOtherLayers)) != null && n.includes("active") ? (s(), W("i", Q1, "")) : (s(), W("i", H1, ""))
1646
+ (n = o.computeLayerClass(e, p.activeOtherLayers)) != null && n.includes("active") ? (s(), W("i", Q1, "")) : (s(), W("i", H1, ""))
1647
1647
  ]),
1648
- c("span", null, C(t.name), 1)
1648
+ c("span", null, C(e.name), 1)
1649
1649
  ])
1650
1650
  ], 10, P1);
1651
1651
  }), 128))
@@ -1654,23 +1654,23 @@ function K1(b, M, z, O, p, o) {
1654
1654
  c("div", _1, [
1655
1655
  M[27] || (M[27] = c("span", { class: "layers-title" }, "Forecast Model", -1)),
1656
1656
  c("div", j1, [
1657
- T(q, {
1657
+ T(a, {
1658
1658
  modelValue: p.source,
1659
- "onUpdate:modelValue": M[16] || (M[16] = (t) => p.source = t),
1659
+ "onUpdate:modelValue": M[16] || (M[16] = (e) => p.source = e),
1660
1660
  class: "layer-radio flex-col-start-start",
1661
1661
  style: { width: "180px", "align-items": "flex-start" }
1662
1662
  }, {
1663
1663
  default: a0(() => [
1664
- (s(!0), W(H, null, _(p.sourceList, (t, n) => (s(), V0(a, {
1665
- key: `source${t.name}`,
1666
- value: t.name
1664
+ (s(!0), W(H, null, _(p.sourceList, (e, n) => (s(), V0(q, {
1665
+ key: `source${e.name}`,
1666
+ value: e.name
1667
1667
  }, {
1668
1668
  default: a0(() => {
1669
1669
  var l, d, B, R, f, h;
1670
1670
  return [
1671
- z0(C(t.name) + " ", 1),
1672
- n !== 0 ? (s(), W("span", F1, C(t.resolution) + "km " + C(t.length) + "days", 1)) : j("", !0),
1673
- n === 0 ? (s(), W("div", G1, "Provides the best forecast")) : (B = (d = (l = t == null ? void 0 : t.update) == null ? void 0 : l.default) == null ? void 0 : d.meta) != null && B.initialisationTime ? (s(), W("div", U1, "Update: " + C(o.computeDateZ((h = (f = (R = t == null ? void 0 : t.update) == null ? void 0 : R.default) == null ? void 0 : f.meta) == null ? void 0 : h.initialisationTime)), 1)) : j("", !0)
1671
+ z0(C(e.name) + " ", 1),
1672
+ n !== 0 ? (s(), W("span", F1, C(e.resolution) + "km " + C(e.length) + "days", 1)) : j("", !0),
1673
+ n === 0 ? (s(), W("div", G1, "Provides the best forecast")) : (B = (d = (l = e == null ? void 0 : e.update) == null ? void 0 : l.default) == null ? void 0 : d.meta) != null && B.initialisationTime ? (s(), W("div", U1, "Update: " + C(o.computeDateZ((h = (f = (R = e == null ? void 0 : e.update) == null ? void 0 : R.default) == null ? void 0 : f.meta) == null ? void 0 : h.initialisationTime)), 1)) : j("", !0)
1674
1674
  ];
1675
1675
  }),
1676
1676
  _: 2
@@ -1771,13 +1771,13 @@ const Y1 = {
1771
1771
  }, 500);
1772
1772
  else if (this.wind) {
1773
1773
  const p = (/* @__PURE__ */ new Date()).valueOf();
1774
- let o = 0, A = 0, a = this.empty;
1775
- if ((b = this.wind) != null && b.active && (a = (M = this.wind) == null ? void 0 : M.data), (z = this.map) != null && z.getSource(this.source))
1776
- (O = this.map) == null || O.getSource(this.source).setData(a), A = (/* @__PURE__ */ new Date()).valueOf() - (p + o), console.log("[wind] update elapsed: ", A, ", total: ", o += A);
1774
+ let o = 0, A = 0, q = this.empty;
1775
+ if ((b = this.wind) != null && b.active && (q = (M = this.wind) == null ? void 0 : M.data), (z = this.map) != null && z.getSource(this.source))
1776
+ (O = this.map) == null || O.getSource(this.source).setData(q), A = (/* @__PURE__ */ new Date()).valueOf() - (p + o), console.log("[wind] update elapsed: ", A, ", total: ", o += A);
1777
1777
  else {
1778
- this.map.addSource(this.source, { type: "geojson", data: a });
1779
- for (let q = 0; q < (this.barbs ?? []).length - 1; q++) {
1780
- const r = (this.barbs ?? [])[q] || 0, t = (this.barbs ?? [])[q + 1] || 0, n = r < 10 ? `00${r}kts` : r < 100 ? `0${r}kts` : `${r}kts`;
1778
+ this.map.addSource(this.source, { type: "geojson", data: q });
1779
+ for (let a = 0; a < (this.barbs ?? []).length - 1; a++) {
1780
+ const r = (this.barbs ?? [])[a] || 0, e = (this.barbs ?? [])[a + 1] || 0, n = r < 10 ? `00${r}kts` : r < 100 ? `0${r}kts` : `${r}kts`;
1781
1781
  this.map.addLayer(
1782
1782
  {
1783
1783
  id: n,
@@ -1787,7 +1787,7 @@ const Y1 = {
1787
1787
  // @ts-ignore
1788
1788
  [">=", "spd", r],
1789
1789
  // @ts-ignore
1790
- ["<", "spd", t]
1790
+ ["<", "spd", e]
1791
1791
  ],
1792
1792
  source: this.source,
1793
1793
  layout: {
@@ -1886,8 +1886,8 @@ class S0 {
1886
1886
  * @param [lb.x, lb.y, rt.x, rt.y]
1887
1887
  */
1888
1888
  getBoundPixel() {
1889
- const M = this.map.getBounds(), z = this.map.getZoom() + 1, O = [M._ne.lng, M._ne.lat], p = [M._sw.lng, M._sw.lat], [o, A] = this.convertNLng(O[0]), [a, q] = this.convertNLng(p[0]), [r, t] = this.mercator.px([o, O[1]], z), [n, l] = this.mercator.px([a, p[1]], z), d = Math.round(this.mercator.size * Math.pow(2, z) * (A + q));
1890
- return [n, l, r + d, t];
1889
+ const M = this.map.getBounds(), z = this.map.getZoom() + 1, O = [M._ne.lng, M._ne.lat], p = [M._sw.lng, M._sw.lat], [o, A] = this.convertNLng(O[0]), [q, a] = this.convertNLng(p[0]), [r, e] = this.mercator.px([o, O[1]], z), [n, l] = this.mercator.px([q, p[1]], z), d = Math.round(this.mercator.size * Math.pow(2, z) * (A + a));
1890
+ return [n, l, r + d, e];
1891
1891
  }
1892
1892
  /**
1893
1893
  * [视窗边界像素宽度]
@@ -1902,13 +1902,13 @@ class S0 {
1902
1902
  * @param zoom
1903
1903
  */
1904
1904
  getWorldCopy(M, z) {
1905
- const O = 2 ** z, [p, o, A, a] = M.map((t) => ~~(t / (O * 256))), q = [];
1906
- for (let t = a; t <= o; t++)
1905
+ const O = 2 ** z, [p, o, A, q] = M.map((e) => ~~(e / (O * 256))), a = [];
1906
+ for (let e = q; e <= o; e++)
1907
1907
  for (let n = p; n <= A; n++)
1908
- q.push([n, t]);
1909
- return q.map((t) => {
1908
+ a.push([n, e]);
1909
+ return a.map((e) => {
1910
1910
  const n = 2 ** z * 256;
1911
- return [t[0] * n, t[1] * n, n];
1911
+ return [e[0] * n, e[1] * n, n];
1912
1912
  });
1913
1913
  }
1914
1914
  resize() {
@@ -1949,9 +1949,9 @@ class C0 {
1949
1949
  * @param width??
1950
1950
  * @param height??
1951
1951
  */
1952
- createTexture(M, z, O, p, o, A, a) {
1953
- const q = M.createTexture();
1954
- return M.bindTexture(M.TEXTURE_2D, q), M.texParameteri(M.TEXTURE_2D, M.TEXTURE_MIN_FILTER, z), M.texParameteri(M.TEXTURE_2D, M.TEXTURE_MAG_FILTER, O), M.texParameteri(M.TEXTURE_2D, M.TEXTURE_WRAP_S, p), M.texParameteri(M.TEXTURE_2D, M.TEXTURE_WRAP_T, p), o instanceof Uint8Array ? M.texImage2D(M.TEXTURE_2D, 0, M.RGBA, A, a, 0, M.RGBA, M.UNSIGNED_BYTE, o) : M.texImage2D(M.TEXTURE_2D, 0, M.RGBA, M.RGBA, M.UNSIGNED_BYTE, o), M.bindTexture(M.TEXTURE_2D, null), q;
1952
+ createTexture(M, z, O, p, o, A, q) {
1953
+ const a = M.createTexture();
1954
+ return M.bindTexture(M.TEXTURE_2D, a), M.texParameteri(M.TEXTURE_2D, M.TEXTURE_MIN_FILTER, z), M.texParameteri(M.TEXTURE_2D, M.TEXTURE_MAG_FILTER, O), M.texParameteri(M.TEXTURE_2D, M.TEXTURE_WRAP_S, p), M.texParameteri(M.TEXTURE_2D, M.TEXTURE_WRAP_T, p), o instanceof Uint8Array ? M.texImage2D(M.TEXTURE_2D, 0, M.RGBA, A, q, 0, M.RGBA, M.UNSIGNED_BYTE, o) : M.texImage2D(M.TEXTURE_2D, 0, M.RGBA, M.RGBA, M.UNSIGNED_BYTE, o), M.bindTexture(M.TEXTURE_2D, null), a;
1955
1955
  }
1956
1956
  /**
1957
1957
  * 创建数据资源
@@ -1989,13 +1989,13 @@ class C0 {
1989
1989
  const p = this.createProgram(M, z, O);
1990
1990
  if (p) {
1991
1991
  const o = { program: p }, A = M.getProgramParameter(p, M.ACTIVE_ATTRIBUTES);
1992
- for (let q = 0; q < A; q++) {
1993
- const r = M.getActiveAttrib(p, q);
1992
+ for (let a = 0; a < A; a++) {
1993
+ const r = M.getActiveAttrib(p, a);
1994
1994
  o[r.name] = M.getAttribLocation(p, r.name);
1995
1995
  }
1996
- const a = M.getProgramParameter(p, M.ACTIVE_UNIFORMS);
1997
- for (let q = 0; q < a; q++) {
1998
- const r = M.getActiveUniform(p, q);
1996
+ const q = M.getProgramParameter(p, M.ACTIVE_UNIFORMS);
1997
+ for (let a = 0; a < q; a++) {
1998
+ const r = M.getActiveUniform(p, a);
1999
1999
  o[r.name] = M.getUniformLocation(p, r.name);
2000
2000
  }
2001
2001
  return o;
@@ -2008,19 +2008,19 @@ class C0 {
2008
2008
  setup(M, z, O = !1, p, o) {
2009
2009
  const A = document.createElement("canvas");
2010
2010
  A.width = 256, A.height = 1;
2011
- const a = A.getContext("2d");
2012
- if (a && M) {
2013
- const q = a == null ? void 0 : a.createLinearGradient(0, 0, 256, 0);
2014
- return z.forEach(([r, t]) => {
2015
- q.addColorStop(r, t);
2016
- }), a.fillStyle = q, a.fillRect(0, 0, 256, 1), {
2011
+ const q = A.getContext("2d");
2012
+ if (q && M) {
2013
+ const a = q == null ? void 0 : q.createLinearGradient(0, 0, 256, 0);
2014
+ return z.forEach(([r, e]) => {
2015
+ a.addColorStop(r, e);
2016
+ }), q.fillStyle = a, q.fillRect(0, 0, 256, 1), {
2017
2017
  canvas: A,
2018
2018
  texture: this.createTexture(
2019
2019
  M,
2020
2020
  M.LINEAR,
2021
2021
  M.LINEAR,
2022
2022
  M.CLAMP_TO_EDGE,
2023
- O ? new Uint8Array(a.getImageData(0, 0, 256, 1).data) : A,
2023
+ O ? new Uint8Array(q.getImageData(0, 0, 256, 1).data) : A,
2024
2024
  p,
2025
2025
  o
2026
2026
  )
@@ -2029,53 +2029,53 @@ class C0 {
2029
2029
  }
2030
2030
  setupParticle(M, z = 1e3) {
2031
2031
  const O = Math.ceil(Math.sqrt(z)), p = O * O, o = new Uint8Array(p * 4);
2032
- for (let t = 0; t < o.length; t++)
2033
- o[t] = Math.floor(Math.random() * 256);
2034
- const A = this.createTexture(M, M.NEAREST, M.NEAREST, M.CLAMP_TO_EDGE, o, O, O), a = this.createTexture(M, M.NEAREST, M.NEAREST, M.CLAMP_TO_EDGE, o, O, O), q = new Float32Array(p);
2035
- for (let t = 0; t < p; t++)
2036
- q[t] = t;
2037
- const r = this.createDataBuffer(M, "array", q);
2038
- return { resolution: O, total: p, texture0: A, texture1: a, indexBuffer: r };
2032
+ for (let e = 0; e < o.length; e++)
2033
+ o[e] = Math.floor(Math.random() * 256);
2034
+ const A = this.createTexture(M, M.NEAREST, M.NEAREST, M.CLAMP_TO_EDGE, o, O, O), q = this.createTexture(M, M.NEAREST, M.NEAREST, M.CLAMP_TO_EDGE, o, O, O), a = new Float32Array(p);
2035
+ for (let e = 0; e < p; e++)
2036
+ a[e] = e;
2037
+ const r = this.createDataBuffer(M, "array", a);
2038
+ return { resolution: O, total: p, texture0: A, texture1: q, indexBuffer: r };
2039
2039
  }
2040
2040
  bind(M, z, O) {
2041
2041
  const p = this.createProgram(M, z, O);
2042
2042
  if (p) {
2043
2043
  const o = this.createDataBuffer(M, "array", void 0), A = M.getAttribLocation(p, "a_position");
2044
2044
  M.enableVertexAttribArray(A), M.vertexAttribPointer(A, 2, M.FLOAT, !1, 0, 0);
2045
- const a = new Float32Array([0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1]);
2046
- this.createDataBuffer(M, "array", a);
2047
- const q = M.getAttribLocation(p, "a_texCoord");
2048
- return M.enableVertexAttribArray(q), M.vertexAttribPointer(q, 2, M.FLOAT, !1, 0, 0), { program: p, aPositionBuffer: o };
2045
+ const q = new Float32Array([0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1]);
2046
+ this.createDataBuffer(M, "array", q);
2047
+ const a = M.getAttribLocation(p, "a_texCoord");
2048
+ return M.enableVertexAttribArray(a), M.vertexAttribPointer(a, 2, M.FLOAT, !1, 0, 0), { program: p, aPositionBuffer: o };
2049
2049
  }
2050
2050
  return {};
2051
2051
  }
2052
2052
  bindParticle(M, z, O, p, o, A) {
2053
- const a = this.createProgramWrapper(M, z, O), q = this.createProgramWrapper(M, p, o), r = this.createProgramWrapper(M, p, A), t = this.createDataBuffer(M, "array", new Float32Array([0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1])), n = M.createFramebuffer();
2054
- return { particle: a, screen: q, update: r, quadBuffer: t, frameBuffer: n };
2053
+ const q = this.createProgramWrapper(M, z, O), a = this.createProgramWrapper(M, p, o), r = this.createProgramWrapper(M, p, A), e = this.createDataBuffer(M, "array", new Float32Array([0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1])), n = M.createFramebuffer();
2054
+ return { particle: q, screen: a, update: r, quadBuffer: e, frameBuffer: n };
2055
2055
  }
2056
- draw(M, z, O, p, o, A, a) {
2057
- var q, r;
2056
+ draw(M, z, O, p, o, A, q) {
2057
+ var a, r;
2058
2058
  if (z && O) {
2059
- M.resize(), z == null || z.viewport(0, 0, (q = z == null ? void 0 : z.canvas) == null ? void 0 : q.width, (r = z == null ? void 0 : z.canvas) == null ? void 0 : r.height), z.clearColor(0, 0, 0, 0), z.clear(z.COLOR_BUFFER_BIT | z.DEPTH_BUFFER_BIT);
2059
+ M.resize(), z == null || z.viewport(0, 0, (a = z == null ? void 0 : z.canvas) == null ? void 0 : a.width, (r = z == null ? void 0 : z.canvas) == null ? void 0 : r.height), z.clearColor(0, 0, 0, 0), z.clear(z.COLOR_BUFFER_BIT | z.DEPTH_BUFFER_BIT);
2060
2060
  try {
2061
- const t = z.getUniformLocation(O, "u_resolution"), n = z.getUniformLocation(O, "u_image"), l = z.getUniformLocation(O, "u_color");
2062
- if (z.useProgram(O), z.uniform2f(t, z.canvas.width * M.ratio, z.canvas.height * M.ratio), z.activeTexture(z.TEXTURE0), z.bindTexture(z.TEXTURE_2D, p), z.uniform1i(n, 0), z.activeTexture(z.TEXTURE1), z.bindTexture(z.TEXTURE_2D, o), z.uniform1i(l, 1), a != null && a.uvRange && (a != null && a.sRange)) {
2061
+ const e = z.getUniformLocation(O, "u_resolution"), n = z.getUniformLocation(O, "u_image"), l = z.getUniformLocation(O, "u_color");
2062
+ if (z.useProgram(O), z.uniform2f(e, z.canvas.width * M.ratio, z.canvas.height * M.ratio), z.activeTexture(z.TEXTURE0), z.bindTexture(z.TEXTURE_2D, p), z.uniform1i(n, 0), z.activeTexture(z.TEXTURE1), z.bindTexture(z.TEXTURE_2D, o), z.uniform1i(l, 1), q != null && q.uvRange && (q != null && q.sRange)) {
2063
2063
  const f = z.getUniformLocation(O, "u_range_u_v"), h = z.getUniformLocation(O, "u_range_s");
2064
- z.uniform2f(f, a.uvRange[0], a.uvRange[1]), z.uniform2f(h, a.sRange[0], a.sRange[1]);
2064
+ z.uniform2f(f, q.uvRange[0], q.uvRange[1]), z.uniform2f(h, q.sRange[0], q.sRange[1]);
2065
2065
  }
2066
2066
  const d = M.getBoundPixel(), B = M.map.getZoom() + 1, R = M.getWorldCopy(d, B);
2067
2067
  for (const f of R) {
2068
2068
  const h = (f[0] - d[0]) * M.ratio, m = (f[1] - d[3]) * M.ratio, X = f[2] * M.ratio, [E, y, F, J] = [h, X + h, m, X + m], V = new Float32Array([E, F, y, F, E, J, E, J, y, F, y, J]);
2069
2069
  z.bindBuffer(z.ARRAY_BUFFER, A), z.bufferData(z.ARRAY_BUFFER, V, z.STATIC_DRAW), z.drawArrays(z.TRIANGLES, 0, 6);
2070
2070
  }
2071
- } catch (t) {
2072
- console.log(`render failed...${t}`);
2071
+ } catch (e) {
2072
+ console.log(`render failed...${e}`);
2073
2073
  }
2074
2074
  }
2075
2075
  }
2076
2076
  drawParticle(M, z, O, p, o) {
2077
- var A, a;
2078
- z && (z == null || z.viewport(0, 0, (A = z == null ? void 0 : z.canvas) == null ? void 0 : A.width, (a = z == null ? void 0 : z.canvas) == null ? void 0 : a.height), z.disable(z.DEPTH_TEST), z.disable(z.STENCIL_TEST), z.activeTexture(z.TEXTURE0), z.bindTexture(z.TEXTURE_2D, O), z.activeTexture(z.TEXTURE1), z.bindTexture(z.TEXTURE_2D, p.texture0), this.renderScreen(M, z, p, o), this.updateParticles(M, z, p, o));
2077
+ var A, q;
2078
+ z && (z == null || z.viewport(0, 0, (A = z == null ? void 0 : z.canvas) == null ? void 0 : A.width, (q = z == null ? void 0 : z.canvas) == null ? void 0 : q.height), z.disable(z.DEPTH_TEST), z.disable(z.STENCIL_TEST), z.activeTexture(z.TEXTURE0), z.bindTexture(z.TEXTURE_2D, O), z.activeTexture(z.TEXTURE1), z.bindTexture(z.TEXTURE_2D, p.texture0), this.renderScreen(M, z, p, o), this.updateParticles(M, z, p, o));
2079
2079
  }
2080
2080
  renderScreen(M, z, O, p) {
2081
2081
  z.bindFramebuffer(z.FRAMEBUFFER, O.frameBuffer), z.framebufferTexture2D(z.FRAMEBUFFER, z.COLOR_ATTACHMENT0, z.TEXTURE_2D, O.screenTexture, 0), z.viewport(0, 0, z.canvas.width, z.canvas.height), this.renderScreenTexture(z, O.backgroundTexture, O.screen, O.quadBuffer, 0.95), this.renderParticles(M, z, O, p), z.bindFramebuffer(z.FRAMEBUFFER, null), this.renderScreenTexture(z, O.screenTexture, O.screen, O.quadBuffer, 1);
@@ -2093,11 +2093,11 @@ class C0 {
2093
2093
  }
2094
2094
  }
2095
2095
  updateParticles(M, z, O, p) {
2096
- var A, a;
2096
+ var A, q;
2097
2097
  if (z) {
2098
2098
  z.bindFramebuffer(z.FRAMEBUFFER, O.frameBuffer), z.framebufferTexture2D(z.FRAMEBUFFER, z.COLOR_ATTACHMENT0, z.TEXTURE_2D, O.texture1, 0), z.viewport(0, 0, O.resolution, O.resolution), z.useProgram(O.update.program), z.bindBuffer(z.ARRAY_BUFFER, O.quadBuffer), z.enableVertexAttribArray(O.update.a_pos), z.vertexAttribPointer(O.update.a_pos, 2, z.FLOAT, !1, 0, 0), z.uniform1i(O.update.u_factor, 0), z.uniform1i(O.update.u_particles, 1);
2099
- const q = M.getBoundRange();
2100
- z.uniform4f(O.update.u_viewport, q[0], q[1], q[2], q[3]), z.uniform1f(O.update.u_rand_seed, Math.random()), z.uniform2f(O.update.u_factor_res, (A = O == null ? void 0 : O.image) == null ? void 0 : A.width, (a = O == null ? void 0 : O.image) == null ? void 0 : a.height), z.uniform2f(O.update.u_factor_min, p.uvRange[0], p.uvRange[0]), z.uniform2f(O.update.u_factor_max, p.uvRange[1], p.uvRange[1]), z.uniform1f(O.update.u_speed_factor, p.speedFactor * M.ratio), z.uniform1f(O.update.u_drop_rate, p.dropRate), z.uniform1f(O.update.u_drop_rate_bump, p.dropRateBump), z.drawArrays(z.TRIANGLES, 0, 6);
2099
+ const a = M.getBoundRange();
2100
+ z.uniform4f(O.update.u_viewport, a[0], a[1], a[2], a[3]), z.uniform1f(O.update.u_rand_seed, Math.random()), z.uniform2f(O.update.u_factor_res, (A = O == null ? void 0 : O.image) == null ? void 0 : A.width, (q = O == null ? void 0 : O.image) == null ? void 0 : q.height), z.uniform2f(O.update.u_factor_min, p.uvRange[0], p.uvRange[0]), z.uniform2f(O.update.u_factor_max, p.uvRange[1], p.uvRange[1]), z.uniform1f(O.update.u_speed_factor, p.speedFactor * M.ratio), z.uniform1f(O.update.u_drop_rate, p.dropRate), z.uniform1f(O.update.u_drop_rate_bump, p.dropRateBump), z.drawArrays(z.TRIANGLES, 0, 6);
2101
2101
  }
2102
2102
  const o = O.texture0;
2103
2103
  O.texture0 = O.texture1, O.texture1 = o;
@@ -4094,8 +4094,8 @@ const b2 = {
4094
4094
  }
4095
4095
  },
4096
4096
  handleClear() {
4097
- var b, M, z, O, p, o, A, a;
4098
- (b = this.viewport) == null || b.toggle(!1), (M = this.viewport) == null || M.toggleParticle(!1), this.context = void 0, this.particleContext = void 0, this.etime = void 0, this.initial = !0, (O = (z = this.viewport) == null ? void 0 : z.map) == null || O.off("resize", this.handleResize), (o = (p = this.viewport) == null ? void 0 : p.map) == null || o.off("movestart", this.handlePause), (a = (A = this.viewport) == null ? void 0 : A.map) == null || a.off("moveend", this.handlePlay), this.handlePause();
4097
+ var b, M, z, O, p, o, A, q;
4098
+ (b = this.viewport) == null || b.toggle(!1), (M = this.viewport) == null || M.toggleParticle(!1), this.context = void 0, this.particleContext = void 0, this.etime = void 0, this.initial = !0, (O = (z = this.viewport) == null ? void 0 : z.map) == null || O.off("resize", this.handleResize), (o = (p = this.viewport) == null ? void 0 : p.map) == null || o.off("movestart", this.handlePause), (q = (A = this.viewport) == null ? void 0 : A.map) == null || q.off("moveend", this.handlePlay), this.handlePause();
4099
4099
  },
4100
4100
  handleSetup() {
4101
4101
  if (!this.context) {
@@ -4435,8 +4435,8 @@ const t2 = {
4435
4435
  }
4436
4436
  },
4437
4437
  handleClear() {
4438
- var b, M, z, O, p, o, A, a;
4439
- (b = this.viewport) == null || b.toggle(!1), (M = this.viewport) == null || M.toggleParticle(!1), this.context = void 0, this.particleContext = void 0, this.etime = void 0, this.initial = !0, (O = (z = this.viewport) == null ? void 0 : z.map) == null || O.off("resize", this.handleResize), (o = (p = this.viewport) == null ? void 0 : p.map) == null || o.off("movestart", this.handlePause), (a = (A = this.viewport) == null ? void 0 : A.map) == null || a.off("moveend", this.handlePlay), this.handlePause();
4438
+ var b, M, z, O, p, o, A, q;
4439
+ (b = this.viewport) == null || b.toggle(!1), (M = this.viewport) == null || M.toggleParticle(!1), this.context = void 0, this.particleContext = void 0, this.etime = void 0, this.initial = !0, (O = (z = this.viewport) == null ? void 0 : z.map) == null || O.off("resize", this.handleResize), (o = (p = this.viewport) == null ? void 0 : p.map) == null || o.off("movestart", this.handlePause), (q = (A = this.viewport) == null ? void 0 : A.map) == null || q.off("moveend", this.handlePlay), this.handlePause();
4440
4440
  },
4441
4441
  handleSetup() {
4442
4442
  if (!this.context) {
@@ -5099,29 +5099,29 @@ const B2 = {
5099
5099
  var O, p;
5100
5100
  const b = ((p = (O = this.tropicals) == null ? void 0 : O.data) == null ? void 0 : p.features) || [], M = K().utc().hour(), z = [];
5101
5101
  b.forEach((o) => {
5102
- var A, a, q;
5103
- (A = o.properties) != null && A.name && !z.includes((a = o.properties) == null ? void 0 : a.name) && z.push((q = o.properties) == null ? void 0 : q.name);
5102
+ var A, q, a;
5103
+ (A = o.properties) != null && A.name && !z.includes((q = o.properties) == null ? void 0 : q.name) && z.push((a = o.properties) == null ? void 0 : a.name);
5104
5104
  }), z.forEach((o) => {
5105
5105
  var r;
5106
- let A = 0, a;
5107
- const q = b.filter((t) => {
5106
+ let A = 0, q;
5107
+ const a = b.filter((e) => {
5108
5108
  var n, l;
5109
- return ((l = (n = t.properties) == null ? void 0 : n.category) == null ? void 0 : l.split("-")[0]) === o;
5109
+ return ((l = (n = e.properties) == null ? void 0 : n.category) == null ? void 0 : l.split("-")[0]) === o;
5110
5110
  });
5111
- (r = q.filter((t) => {
5111
+ (r = a.filter((e) => {
5112
5112
  var n, l;
5113
- return ((n = t.geometry) == null ? void 0 : n.type) === "LineString" && ((l = t.properties) == null ? void 0 : l.type) === "forecast";
5114
- })[0]) == null || r.properties.model, q.forEach((t, n) => {
5113
+ return ((n = e.geometry) == null ? void 0 : n.type) === "LineString" && ((l = e.properties) == null ? void 0 : l.type) === "forecast";
5114
+ })[0]) == null || r.properties.model, a.forEach((e, n) => {
5115
5115
  var l, d, B, R, f, h;
5116
- ((l = t.geometry) == null ? void 0 : l.type) === "Point" && ((d = t.properties) == null ? void 0 : d.type) === "history" && (A = n, a = a === void 0 ? n : a), ((B = t.geometry) == null ? void 0 : B.type) === "Point" && ((R = t.properties) == null ? void 0 : R.type) === "forecast" && a === void 0 && (a = n), ((f = t.geometry) == null ? void 0 : f.type) === "LineString" && ((h = t.properties) == null || h.type);
5117
- }), q.map((t, n) => {
5116
+ ((l = e.geometry) == null ? void 0 : l.type) === "Point" && ((d = e.properties) == null ? void 0 : d.type) === "history" && (A = n, q = q === void 0 ? n : q), ((B = e.geometry) == null ? void 0 : B.type) === "Point" && ((R = e.properties) == null ? void 0 : R.type) === "forecast" && q === void 0 && (q = n), ((f = e.geometry) == null ? void 0 : f.type) === "LineString" && ((h = e.properties) == null || h.type);
5117
+ }), a.map((e, n) => {
5118
5118
  var l, d, B, R, f, h, m;
5119
- if (((l = t.geometry) == null ? void 0 : l.type) === "LineString" && ((d = t.properties) == null || d.type), ((B = t.geometry) == null ? void 0 : B.type) === "Point" && ((R = t.properties) == null ? void 0 : R.type) === "forecast" && (t.properties.name = o, t.properties.format = K(t.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`)), ((f = t.geometry) == null ? void 0 : f.type) === "Point" && ((h = t.properties) == null ? void 0 : h.type) === "history") {
5120
- t.properties.format = K(t.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`);
5121
- const X = K((m = t.properties) == null ? void 0 : m.date).utc().format("HHmm") === K().utc().hour(Math.floor(M / 6) * 6).minute("00").format("HHmm");
5122
- t.properties.showHistoryLabel = X || n === A, t.properties.showNameLabel = n === A, t.properties.name = o;
5119
+ if (((l = e.geometry) == null ? void 0 : l.type) === "LineString" && ((d = e.properties) == null || d.type), ((B = e.geometry) == null ? void 0 : B.type) === "Point" && ((R = e.properties) == null ? void 0 : R.type) === "forecast" && (e.properties.name = o, e.properties.format = K(e.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`)), ((f = e.geometry) == null ? void 0 : f.type) === "Point" && ((h = e.properties) == null ? void 0 : h.type) === "history") {
5120
+ e.properties.format = K(e.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`);
5121
+ const X = K((m = e.properties) == null ? void 0 : m.date).utc().format("HHmm") === K().utc().hour(Math.floor(M / 6) * 6).minute("00").format("HHmm");
5122
+ e.properties.showHistoryLabel = X || n === A, e.properties.showNameLabel = n === A, e.properties.name = o;
5123
5123
  }
5124
- return t;
5124
+ return e;
5125
5125
  });
5126
5126
  }), this.handleInit();
5127
5127
  },
@@ -5156,7 +5156,7 @@ const B2 = {
5156
5156
  ));
5157
5157
  },
5158
5158
  handleRender() {
5159
- var b, M, z, O, p, o, A, a, q, r;
5159
+ var b, M, z, O, p, o, A, q, a, r;
5160
5160
  if (!this.map)
5161
5161
  setTimeout(() => {
5162
5162
  this.handleRender();
@@ -5262,9 +5262,9 @@ const B2 = {
5262
5262
  ],
5263
5263
  "text-halo-width": 4
5264
5264
  }
5265
- }), d = (/* @__PURE__ */ new Date()).valueOf() - (n + l), console.log("[tropical] add elapsed: ", d, ", total: ", l += d)), (o = this.map) != null && o.getSource(this.clusterSource) ? ((a = this.map) == null || a.getSource(this.clusterSource).setData((A = this.tropicals) != null && A.active ? this.tropicals.data : this.empty), d = (/* @__PURE__ */ new Date()).valueOf() - (n + l), console.log("[tropical] update elapsed: ", d, ", total: ", l += d)) : (this.map.addSource(this.clusterSource, {
5265
+ }), d = (/* @__PURE__ */ new Date()).valueOf() - (n + l), console.log("[tropical] add elapsed: ", d, ", total: ", l += d)), (o = this.map) != null && o.getSource(this.clusterSource) ? ((q = this.map) == null || q.getSource(this.clusterSource).setData((A = this.tropicals) != null && A.active ? this.tropicals.data : this.empty), d = (/* @__PURE__ */ new Date()).valueOf() - (n + l), console.log("[tropical] update elapsed: ", d, ", total: ", l += d)) : (this.map.addSource(this.clusterSource, {
5266
5266
  type: "geojson",
5267
- data: (q = this.tropicals) != null && q.active ? (r = this.tropicals) == null ? void 0 : r.data : this.empty
5267
+ data: (a = this.tropicals) != null && a.active ? (r = this.tropicals) == null ? void 0 : r.data : this.empty
5268
5268
  // cluster: true,
5269
5269
  // clusterRadius: 10, // 聚合半径
5270
5270
  }), this.map.addLayer({
@@ -5382,8 +5382,8 @@ const B2 = {
5382
5382
  }), d = (/* @__PURE__ */ new Date()).valueOf() - (n + l), console.log("[tropical] add elapsed: ", d, ", total: ", l += d));
5383
5383
  }
5384
5384
  this.handleDrawCircle();
5385
- const t = j0.interpolate(this.tropicals, 1);
5386
- this.interpolateData = JSON.parse(JSON.stringify(t)), this.interpolateData.filter((n) => n.properties.name === "kristy" && n.properties.model === "ecmwf"), this.handleDateChange();
5385
+ const e = j0.interpolate(this.tropicals, 1);
5386
+ this.interpolateData = JSON.parse(JSON.stringify(e)), this.interpolateData.filter((n) => n.properties.name === "kristy" && n.properties.model === "ecmwf"), this.handleDateChange();
5387
5387
  }
5388
5388
  },
5389
5389
  handleClear() {
@@ -5391,7 +5391,7 @@ const B2 = {
5391
5391
  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), (b = this.interpolateMarkers) == null || b.forEach((M) => M == null ? void 0 : M.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));
5392
5392
  },
5393
5393
  handleDateChange() {
5394
- var b, M, z, O, p, o, A, a, q, r, t, n, l, d, B, R, f, h, m, X, E, y, F, J, V, u, g, A0, n0, h0, i0, u0, p0, m0, B0, L0;
5394
+ var b, M, z, O, p, o, A, q, a, r, e, n, l, d, B, R, f, h, m, X, E, y, F, J, V, u, g, A0, n0, h0, i0, u0, p0, m0, B0, L0;
5395
5395
  if ((b = this.interpolateMarkers) == null || b.forEach((r0) => r0 == null ? void 0 : r0.remove()), this.circleSourceData.features = [], (M = this.interpolateData) != null && M.length && this.tropicals.active) {
5396
5396
  const r0 = K(this.date).utc().set({ minute: 0, second: 0, millisecond: 0 }), d0 = this.interpolateData.filter((P) => P.properties.date === r0.format() && !P.properties.disabled), g0 = this.handleComputePolygons(d0), s0 = v.featureCollection([...d0]);
5397
5397
  g0.forEach((P) => {
@@ -5413,7 +5413,7 @@ const B2 = {
5413
5413
  for (const P of d0)
5414
5414
  if (!P.properties.disabled) {
5415
5415
  let M0 = "#f44336";
5416
- ((a = (A = P.properties) == null ? void 0 : A.wind) == null ? void 0 : a.spd) < 17.2 || !((r = (q = P.properties) == null ? void 0 : q.wind) != null && r.spd) ? M0 = "#03f869" : ((n = (t = P.properties) == null ? void 0 : t.wind) == null ? void 0 : n.spd) >= 17.2 && ((d = (l = P.properties) == null ? void 0 : l.wind) == null ? void 0 : d.spd) < 24.5 ? M0 = "#f2f202" : ((R = (B = P.properties) == null ? void 0 : B.wind) == null ? void 0 : R.spd) >= 24.5 && ((h = (f = P.properties) == null ? void 0 : f.wind) == null ? void 0 : h.spd) < 32.7 ? M0 = "#ff9100" : ((X = (m = P.properties) == null ? void 0 : m.wind) == null ? void 0 : X.spd) >= 32.7 && ((y = (E = P.properties) == null ? void 0 : E.wind) == null ? void 0 : y.spd) < 41.5 ? M0 = "#f44336" : ((J = (F = P.properties) == null ? void 0 : F.wind) == null ? void 0 : J.spd) >= 41.5 && ((u = (V = P.properties) == null ? void 0 : V.wind) == null ? void 0 : u.spd) < 51 ? M0 = "#f903d0" : ((A0 = (g = P.properties) == null ? void 0 : g.wind) == null ? void 0 : A0.spd) >= 51 ? M0 = "#8702f9" : M0 = "#f44336";
5416
+ ((q = (A = P.properties) == null ? void 0 : A.wind) == null ? void 0 : q.spd) < 17.2 || !((r = (a = P.properties) == null ? void 0 : a.wind) != null && r.spd) ? M0 = "#03f869" : ((n = (e = P.properties) == null ? void 0 : e.wind) == null ? void 0 : n.spd) >= 17.2 && ((d = (l = P.properties) == null ? void 0 : l.wind) == null ? void 0 : d.spd) < 24.5 ? M0 = "#f2f202" : ((R = (B = P.properties) == null ? void 0 : B.wind) == null ? void 0 : R.spd) >= 24.5 && ((h = (f = P.properties) == null ? void 0 : f.wind) == null ? void 0 : h.spd) < 32.7 ? M0 = "#ff9100" : ((X = (m = P.properties) == null ? void 0 : m.wind) == null ? void 0 : X.spd) >= 32.7 && ((y = (E = P.properties) == null ? void 0 : E.wind) == null ? void 0 : y.spd) < 41.5 ? M0 = "#f44336" : ((J = (F = P.properties) == null ? void 0 : F.wind) == null ? void 0 : J.spd) >= 41.5 && ((u = (V = P.properties) == null ? void 0 : V.wind) == null ? void 0 : u.spd) < 51 ? M0 = "#f903d0" : ((A0 = (g = P.properties) == null ? void 0 : g.wind) == null ? void 0 : A0.spd) >= 51 ? M0 = "#8702f9" : M0 = "#f44336";
5417
5417
  const e0 = `<svg t="1719918955501"
5418
5418
  class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" p-id="18382"
5419
5419
  xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
@@ -5447,7 +5447,7 @@ const B2 = {
5447
5447
  (B0 = this.map) != null && B0.getSource(this.interpolateSource) && ((L0 = this.map) == null || L0.getSource(this.interpolateSource).setData(this.empty));
5448
5448
  },
5449
5449
  handleClick(b) {
5450
- var o, A, a, q, r, t, n, l;
5450
+ var o, A, q, a, r, e, n, l;
5451
5451
  const M = b.features[0], z = (A = (o = this.tropicals) == null ? void 0 : o.data) == null ? void 0 : A.features.filter(
5452
5452
  (d) => {
5453
5453
  var B;
@@ -5458,7 +5458,7 @@ const B2 = {
5458
5458
  var R, f, h, m;
5459
5459
  return ((R = d.properties) == null ? void 0 : R.model) === "cma" ? -1 : ((f = d.properties) == null ? void 0 : f.model) === "jma" ? ((h = B.properties) == null ? void 0 : h.model) === "cma" ? 1 : -1 : d.properties.model === "ecmwf" ? ["jma", "cma"].includes((m = B.properties) == null ? void 0 : m.model) ? 1 : -1 : 0;
5460
5460
  });
5461
- const O = (q = (a = this.tropicals) == null ? void 0 : a.data) == null ? void 0 : q.features.filter(
5461
+ const O = (a = (q = this.tropicals) == null ? void 0 : q.data) == null ? void 0 : a.features.filter(
5462
5462
  (d) => {
5463
5463
  var B;
5464
5464
  return d.geometry.type === "LineString" && d.properties.type === "history" && d.properties.name === ((B = M == null ? void 0 : M.properties) == null ? void 0 : B.name);
@@ -5467,21 +5467,21 @@ const B2 = {
5467
5467
  this.activeTropicals = {
5468
5468
  name: (r = M == null ? void 0 : M.properties) == null ? void 0 : r.name,
5469
5469
  forecasts: z.map((d) => d.properties),
5470
- history: (t = O[0]) == null ? void 0 : t.properties,
5470
+ history: (e = O[0]) == null ? void 0 : e.properties,
5471
5471
  showCircle: (l = (n = z[0]) == null ? void 0 : n.properties) == null ? void 0 : l.showCircle
5472
5472
  }, this.showTropicals = !0;
5473
5473
  const p = document.getElementById("active-tropical");
5474
5474
  this.activeTropicalsMarker ? this.activeTropicalsMarker.setLngLat([b.lngLat.lng, b.lngLat.lat]) : this.activeTropicalsMarker = new w0.Marker(p).setLngLat([b.lngLat.lng, b.lngLat.lat]).setOffset([220, 0]).addTo(this.map);
5475
5475
  },
5476
5476
  handleForecastToggle(b) {
5477
- var O, p, o, A, a, q;
5477
+ var O, p, o, A, q, a;
5478
5478
  b.disabled = !b.disabled;
5479
5479
  const M = `${b.name}-${b.model}`, z = (p = (O = this.map) == null ? void 0 : O.getSource(this.source)._data) == null ? void 0 : p.features;
5480
5480
  z.forEach((r) => {
5481
5481
  r.properties.category === M && (r.properties.disabled = b.disabled);
5482
5482
  }), this.interpolateData.forEach((r) => {
5483
5483
  r.properties.category === M && (r.properties.disabled = b.disabled);
5484
- }), (A = (o = this.map) == null ? void 0 : o.getSource(this.source)) == null || A.setData(v.featureCollection(z)), (q = (a = this.map) == null ? void 0 : a.getSource(this.clusterSource)) == null || q.setData(v.featureCollection(z)), this.handleDateChange();
5484
+ }), (A = (o = this.map) == null ? void 0 : o.getSource(this.source)) == null || A.setData(v.featureCollection(z)), (a = (q = this.map) == null ? void 0 : q.getSource(this.clusterSource)) == null || a.setData(v.featureCollection(z)), this.handleDateChange();
5485
5485
  },
5486
5486
  handleStrikeProbability(b) {
5487
5487
  this.$emit("tropicalProbability", b);
@@ -5525,8 +5525,8 @@ const B2 = {
5525
5525
  se: O.r10se >= 0 ? O.r10se : void 0,
5526
5526
  sw: O.r10sw >= 0 ? O.r10sw : void 0,
5527
5527
  nw: O.r10nw >= 0 ? O.r10nw : void 0
5528
- }, a = this.handleComputeArc(z.geometry.coordinates, A, { ...z.properties, level: 10 });
5529
- M.push(a);
5528
+ }, q = this.handleComputeArc(z.geometry.coordinates, A, { ...z.properties, level: 10 });
5529
+ M.push(q);
5530
5530
  }
5531
5531
  return M;
5532
5532
  },
@@ -5534,23 +5534,23 @@ const B2 = {
5534
5534
  var o;
5535
5535
  const O = [];
5536
5536
  for (const A in M) {
5537
- const a = M[A] ?? 0;
5538
- let q;
5537
+ const q = M[A] ?? 0;
5538
+ let a;
5539
5539
  switch (A) {
5540
5540
  case "ne":
5541
- q = v.lineArc(b, a * 1.852, 0, 90, { steps: a > 0 ? 64 : 1 });
5541
+ a = v.lineArc(b, q * 1.852, 0, 90, { steps: q > 0 ? 64 : 1 });
5542
5542
  break;
5543
5543
  case "se":
5544
- q = v.lineArc(b, a * 1.852, 90, 180, { steps: a > 0 ? 64 : 1 });
5544
+ a = v.lineArc(b, q * 1.852, 90, 180, { steps: q > 0 ? 64 : 1 });
5545
5545
  break;
5546
5546
  case "sw":
5547
- q = v.lineArc(b, a * 1.852, 180, 270, { steps: a > 0 ? 64 : 1 });
5547
+ a = v.lineArc(b, q * 1.852, 180, 270, { steps: q > 0 ? 64 : 1 });
5548
5548
  break;
5549
5549
  case "nw":
5550
- q = v.lineArc(b, a * 1.852, 270, 360, { steps: a > 0 ? 64 : 1 });
5550
+ a = v.lineArc(b, q * 1.852, 270, 360, { steps: q > 0 ? 64 : 1 });
5551
5551
  break;
5552
5552
  }
5553
- O.push(...(o = q == null ? void 0 : q.geometry) == null ? void 0 : o.coordinates);
5553
+ O.push(...(o = a == null ? void 0 : a.geometry) == null ? void 0 : o.coordinates);
5554
5554
  }
5555
5555
  const p = v.lineString(O);
5556
5556
  return v.lineToPolygon(p, { properties: z });
@@ -5573,7 +5573,7 @@ const B2 = {
5573
5573
  style: { "justify-content": "flex-start" }
5574
5574
  }, P2 = { class: "forecast-models" }, S2 = ["onClick"], k2 = { class: "more" };
5575
5575
  function Q2(b, M, z, O, p, o) {
5576
- var A, a, q, r, t, n, l, d, B, R, f, h, m, X, E;
5576
+ var A, q, a, r, e, n, l, d, B, R, f, h, m, X, E;
5577
5577
  return y0((s(), W("div", g2, [
5578
5578
  c("div", N2, [
5579
5579
  c("div", {
@@ -5581,8 +5581,8 @@ function Q2(b, M, z, O, p, o) {
5581
5581
  onClick: M[0] || (M[0] = (y) => p.showTropicals = !1)
5582
5582
  }, ""),
5583
5583
  c("div", y2, [
5584
- (a = (A = p.activeTropicals) == null ? void 0 : A.history) != null && a.level ? (s(), W("span", X2, C((r = (q = p.activeTropicals) == null ? void 0 : q.history) == null ? void 0 : r.level) + " , ", 1)) : j("", !0),
5585
- z0(C((t = p.activeTropicals) == null ? void 0 : t.name), 1)
5584
+ (q = (A = p.activeTropicals) == null ? void 0 : A.history) != null && q.level ? (s(), W("span", X2, C((r = (a = p.activeTropicals) == null ? void 0 : a.history) == null ? void 0 : r.level) + " , ", 1)) : j("", !0),
5585
+ z0(C((e = p.activeTropicals) == null ? void 0 : e.name), 1)
5586
5586
  ]),
5587
5587
  c("div", w2, " Last update: " + C(o.computeTime(((l = (n = p.activeTropicals) == null ? void 0 : n.history) == null ? void 0 : l.updated) || ((R = (B = (d = p.activeTropicals) == null ? void 0 : d.forecasts) == null ? void 0 : B.filter((y) => !y.disabled)[0]) == null ? void 0 : R.date))), 1)
5588
5588
  ]),
@@ -6353,9 +6353,9 @@ const qM = {
6353
6353
  var b;
6354
6354
  if (this.showMeteo && this.ts) {
6355
6355
  const M = K(), z = (b = K(this.ts)) == null ? void 0 : b.diff(M, "d", !0), p = [0, 1, 2, 3, 4, 5, 6, 7].every((o) => {
6356
- var a;
6356
+ var q;
6357
6357
  const A = T0(this.ts).tz(this.positionGmt).add(3 * o, "h").format();
6358
- return (a = v0.pickHourly(this.meteoData, A)) == null ? void 0 : a[0];
6358
+ return (q = v0.pickHourly(this.meteoData, A)) == null ? void 0 : q[0];
6359
6359
  });
6360
6360
  if (this.meteoData && p ? this.initTableData(this.meteoData) : (this.loading || (z >= 0 ? await this.fetchMeteoData(this.point, this.ts, 7) : await this.fetchHistoryData(this.point, this.ts)), this.initTableData(this.meteoData)), this.activeIndex === 4) {
6361
6361
  const o = I0.pickDailyExtremes(this.tideData, this.ts);
@@ -6409,12 +6409,12 @@ const qM = {
6409
6409
  forecastDays: z ?? 7,
6410
6410
  weatherModels: p,
6411
6411
  marineModels: o
6412
- }, a = await f0.post(`${this.gateway}/api/arc/meteo2/spot/forecast`, A, {
6412
+ }, q = await f0.post(`${this.gateway}/api/arc/meteo2/spot/forecast`, A, {
6413
6413
  headers: {
6414
6414
  Authorization: this.token || this.defaultMeteoToken
6415
6415
  }
6416
6416
  });
6417
- (a == null ? void 0 : a.data.code) === 0 && (this.meteoData = a == null ? void 0 : a.data.data, this.loading = !1);
6417
+ (q == null ? void 0 : q.data.code) === 0 && (this.meteoData = q == null ? void 0 : q.data.data, this.loading = !1);
6418
6418
  },
6419
6419
  async fetchHistoryData(b, M) {
6420
6420
  this.loading = !0, this.meteoData = [];
@@ -6434,24 +6434,24 @@ const qM = {
6434
6434
  (A == null ? void 0 : A.data.code) === 0 && (this.meteoData = A == null ? void 0 : A.data.data, this.loading = !1);
6435
6435
  },
6436
6436
  initTableData(b) {
6437
- var M, z, O, p, o, A, a;
6438
- this.clearTable(), this.positionGmt = (z = (M = b == null ? void 0 : b.weather) == null ? void 0 : M[0]) == null ? void 0 : z.timezone, this.positionOffset = (p = (O = b == null ? void 0 : b.weather) == null ? void 0 : O[0]) == null ? void 0 : p.offset, this.localDate = (A = (o = T0(this.ts)) == null ? void 0 : o.tz(this.positionGmt)) == null ? void 0 : A.format("MMM-DD/HHmm[LT]"), this.currentHourData = (a = v0.pickHourly(b, K(this.ts))) == null ? void 0 : a[0], this.$nextTick(() => {
6439
- var r, t, n, l, d, B, R, f, h, m, X, E, y, F, J, V, u, g, A0, n0, h0, i0, u0, p0, m0, B0, L0, r0, d0, g0, s0, P, M0, e0, I, b0, W0, l0, R0;
6440
- const q = document.getElementById("meteoMainBox");
6441
- if (!q)
6437
+ var M, z, O, p, o, A, q;
6438
+ this.clearTable(), this.positionGmt = (z = (M = b == null ? void 0 : b.weather) == null ? void 0 : M[0]) == null ? void 0 : z.timezone, this.positionOffset = (p = (O = b == null ? void 0 : b.weather) == null ? void 0 : O[0]) == null ? void 0 : p.offset, this.localDate = (A = (o = T0(this.ts)) == null ? void 0 : o.tz(this.positionGmt)) == null ? void 0 : A.format("MMM-DD/HHmm[LT]"), this.currentHourData = (q = v0.pickHourly(b, K(this.ts))) == null ? void 0 : q[0], this.$nextTick(() => {
6439
+ var r, e, n, l, d, B, R, f, h, m, X, E, y, F, J, V, u, g, A0, n0, h0, i0, u0, p0, m0, B0, L0, r0, d0, g0, s0, P, M0, e0, I, b0, W0, l0, R0;
6440
+ const a = document.getElementById("meteoMainBox");
6441
+ if (!a)
6442
6442
  return !1;
6443
- if (q.className = "main-box", q.style.backgroundImage = null, q.style.backgroundPosition = "top left", ((t = (r = this.currentHourData) == null ? void 0 : r.weather) == null ? void 0 : t.code) === 0 && ((l = (n = this.currentHourData) == null ? void 0 : n.weather) == null ? void 0 : l.isDay) === 0)
6444
- q.className = "main-box night-bg";
6443
+ if (a.className = "main-box", a.style.backgroundImage = null, a.style.backgroundPosition = "top left", ((e = (r = this.currentHourData) == null ? void 0 : r.weather) == null ? void 0 : e.code) === 0 && ((l = (n = this.currentHourData) == null ? void 0 : n.weather) == null ? void 0 : l.isDay) === 0)
6444
+ a.className = "main-box night-bg";
6445
6445
  else {
6446
6446
  const o0 = (B = (d = this.currentHourData) == null ? void 0 : d.weather) == null ? void 0 : B.bg;
6447
- o0 ? (q.className = "main-box font-color-white", q.style.backgroundImage = `url(${o0})`, (o0 === "https://osshz.idmwx.com/asset/weather/bg2.png" || o0 === "https://osshz.idmwx.com/asset/weather/bg5.png") && (q.style.backgroundPosition = "right bottom")) : q.className = "main-box day-bg";
6447
+ o0 ? (a.className = "main-box font-color-white", a.style.backgroundImage = `url(${o0})`, (o0 === "https://osshz.idmwx.com/asset/weather/bg2.png" || o0 === "https://osshz.idmwx.com/asset/weather/bg5.png") && (a.style.backgroundPosition = "right bottom")) : a.className = "main-box day-bg";
6448
6448
  }
6449
6449
  if (!this.currentHourData)
6450
6450
  return this.loading = !1, this.tableData.hours = [void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0], this.handleRender(), !1;
6451
6451
  for (let o0 = 0; o0 < 8; o0++) {
6452
- const e = T0(this.ts).tz(this.positionGmt).add(3 * o0, "h").format();
6453
- this.tableData.hours.push(e);
6454
- const i = ((R = v0.pickHourly(b, e)) == null ? void 0 : R[0]) || {};
6452
+ const t = T0(this.ts).tz(this.positionGmt).add(3 * o0, "h").format();
6453
+ this.tableData.hours.push(t);
6454
+ const i = ((R = v0.pickHourly(b, t)) == null ? void 0 : R[0]) || {};
6455
6455
  this.tableData.temp.push(this.roundPrecision((f = i == null ? void 0 : i.weather) == null ? void 0 : f.temp, 0) ?? "-"), this.tableData.precipProbability.push(this.roundPrecision((m = (h = i == null ? void 0 : i.weather) == null ? void 0 : h.precip) == null ? void 0 : m.probability, 0) ?? "-"), this.tableData.precip1h.push(this.roundPrecision((E = (X = i == null ? void 0 : i.weather) == null ? void 0 : X.precip) == null ? void 0 : E.sum, 0) ?? "-"), this.tableData.visibility.push(this.roundPrecision((y = i == null ? void 0 : i.weather) == null ? void 0 : y.visibility, 0) ?? "-"), this.tableData.windSpeed.push(this.roundPrecision((J = (F = i == null ? void 0 : i.weather) == null ? void 0 : F.wind) == null ? void 0 : J.kts, 1) ?? "-"), this.tableData.windDir.push((u = (V = i == null ? void 0 : i.weather) == null ? void 0 : V.wind) == null ? void 0 : u.bearing), this.tableData.windGust.push(this.roundPrecision((A0 = (g = i == null ? void 0 : i.weather) == null ? void 0 : g.wind) == null ? void 0 : A0.gusts, 1) ?? "-"), this.tableData.sigwaveHeight.push(this.roundPrecision((h0 = (n0 = i == null ? void 0 : i.wave) == null ? void 0 : n0.sig) == null ? void 0 : h0.height, 1) ?? "-"), this.tableData.sigwaveDir.push((u0 = (i0 = i == null ? void 0 : i.wave) == null ? void 0 : i0.sig) == null ? void 0 : u0.bearing), this.tableData.windwaveHeight.push(this.roundPrecision((m0 = (p0 = i == null ? void 0 : i.wave) == null ? void 0 : p0.wd) == null ? void 0 : m0.height, 1) ?? "-"), this.tableData.windwaveDir.push((L0 = (B0 = i == null ? void 0 : i.wave) == null ? void 0 : B0.wd) == null ? void 0 : L0.bearing), this.tableData.windwavePeriod.push(this.roundPrecision((d0 = (r0 = i == null ? void 0 : i.wave) == null ? void 0 : r0.wd) == null ? void 0 : d0.period, 1) ?? "-"), this.tableData.swellHeight.push(this.roundPrecision((s0 = (g0 = i == null ? void 0 : i.wave) == null ? void 0 : g0.swell) == null ? void 0 : s0.height, 1) ?? "-"), this.tableData.swellDir.push((M0 = (P = i == null ? void 0 : i.wave) == null ? void 0 : P.swell) == null ? void 0 : M0.bearing), this.tableData.swellPeriod.push(this.roundPrecision((I = (e0 = i == null ? void 0 : i.wave) == null ? void 0 : e0.swell) == null ? void 0 : I.period, 1) ?? "-"), this.tableData.currentSpeed.push(this.roundPrecision((b0 = i == null ? void 0 : i.current) == null ? void 0 : b0.speed, 1) ?? "-"), this.tableData.currentDir.push((W0 = i == null ? void 0 : i.current) == null ? void 0 : W0.bearing), this.tableData.seaLevel.push(this.roundPrecision(i == null ? void 0 : i.height, 1) ?? "-"), this.tableData.seaTemp.push(this.roundPrecision(i == null ? void 0 : i.sst, 0) ?? "-"), this.tableData.weatherUrls.push((l0 = i == null ? void 0 : i.weather) == null ? void 0 : l0.url), this.tableData.weatherNames.push(((R0 = i == null ? void 0 : i.weather) == null ? void 0 : R0.name) ?? "-");
6456
6456
  }
6457
6457
  });
@@ -6546,19 +6546,19 @@ const qM = {
6546
6546
  class: "main-box flex-center"
6547
6547
  };
6548
6548
  function ab(b, M, z, O, p, o) {
6549
- var r, t, n, l, d, B, R, f, h, m, X, E, y, F, J, V;
6550
- const A = x("LocationFilled"), a = x("ElIcon"), q = x("ElTooltip");
6549
+ var r, e, n, l, d, B, R, f, h, m, X, E, y, F, J, V;
6550
+ const A = x("LocationFilled"), q = x("ElIcon"), a = x("ElTooltip");
6551
6551
  return y0((s(), W("div", iM, [
6552
6552
  c("div", rM, [
6553
6553
  c("div", nM, [
6554
6554
  c("div", dM, [
6555
- T(a, { size: "22" }, {
6555
+ T(q, { size: "22" }, {
6556
6556
  default: a0(() => [
6557
6557
  T(A)
6558
6558
  ]),
6559
6559
  _: 1
6560
6560
  }),
6561
- c("div", sM, C(o.computeLat((r = p.point) == null ? void 0 : r.lat)) + "," + C(o.computeLng((t = p.point) == null ? void 0 : t.lng)), 1)
6561
+ c("div", sM, C(o.computeLat((r = p.point) == null ? void 0 : r.lat)) + "," + C(o.computeLng((e = p.point) == null ? void 0 : e.lng)), 1)
6562
6562
  ]),
6563
6563
  c("div", {
6564
6564
  class: "iconfont close",
@@ -6570,7 +6570,7 @@ function ab(b, M, z, O, p, o) {
6570
6570
  ]))) : (s(), W("div", WM, [
6571
6571
  c("div", lM, [
6572
6572
  c("div", fM, [
6573
- T(q, {
6573
+ T(a, {
6574
6574
  placement: "top",
6575
6575
  effect: "light",
6576
6576
  content: (l = (n = p.currentHourData) == null ? void 0 : n.weather) == null ? void 0 : l.name,
@@ -6676,7 +6676,7 @@ function ab(b, M, z, O, p, o) {
6676
6676
  colspan: "1",
6677
6677
  key: `weatherUrls${g}${u}`
6678
6678
  }, [
6679
- T(q, {
6679
+ T(a, {
6680
6680
  placement: "top",
6681
6681
  effect: "light",
6682
6682
  content: p.tableData.weatherNames[g],
@@ -6804,7 +6804,7 @@ function ab(b, M, z, O, p, o) {
6804
6804
  colspan: "1",
6805
6805
  key: `currentweatherUrls${g}${u}`
6806
6806
  }, [
6807
- T(q, {
6807
+ T(a, {
6808
6808
  placement: "top",
6809
6809
  effect: "light",
6810
6810
  content: p.tableData.weatherNames[g],
@@ -6955,7 +6955,7 @@ function ab(b, M, z, O, p, o) {
6955
6955
  colspan: "1",
6956
6956
  key: `seaweatherUrls${g}${u}`
6957
6957
  }, [
6958
- T(q, {
6958
+ T(a, {
6959
6959
  placement: "top",
6960
6960
  effect: "light",
6961
6961
  content: p.tableData.weatherNames[g],
@@ -7518,7 +7518,7 @@ function mb(b, M, z, O, p, o) {
7518
7518
  return y0((s(), W("div", Rb, [
7519
7519
  c("div", {
7520
7520
  class: "iconfont close",
7521
- onClick: M[0] || (M[0] = (a) => p.showZone = !1)
7521
+ onClick: M[0] || (M[0] = (q) => p.showZone = !1)
7522
7522
  }, ""),
7523
7523
  c("div", {
7524
7524
  class: "rich-context",
@@ -8338,44 +8338,51 @@ const K0 = /* @__PURE__ */ k(Vb, [["render", Zb], ["__scopeId", "data-v-ad66a24c
8338
8338
  watch: {
8339
8339
  show: {
8340
8340
  handler() {
8341
- this.handleBind();
8341
+ var b, M, z;
8342
+ if (this.show)
8343
+ this.handleBind();
8344
+ else {
8345
+ (b = this.map) == null || b.getCanvas().removeEventListener("keydown", this.handleKeydown), (M = this.map) == null || M.off("mousemove", this.handleMove), (z = this.map) == null || z.off("dblclick", this.handleDblClick), this.map && (this.map.getCanvas().style.cursor = "grab");
8346
+ let O = this.geojson.find((p) => !p.closed);
8347
+ O && this.handleClear(O, !0), this.geojson = this.geojson.filter((p) => !!p.closed), O = v.featureCollection([], { id: (/* @__PURE__ */ new Date()).getTime().toString() }), this.geojson.push(O);
8348
+ }
8342
8349
  },
8343
8350
  immediate: !0
8344
8351
  },
8345
8352
  map: {
8346
8353
  handler() {
8347
- this.map && this.handleBind();
8354
+ this.map && (this.show ? this.handleBind() : this.handleUnbind());
8348
8355
  }
8349
8356
  }
8350
8357
  },
8351
8358
  methods: {
8352
8359
  handleBind() {
8353
- var b, M, z, O, p, o, A, a, q, r;
8354
- if (this.show)
8355
- (b = this.map) == null || b.getCanvas().addEventListener("keydown", this.handleKeydown), (M = this.map) == null || M.on("mousemove", this.handleMove), (z = this.map) == null || z.on("dblclick", this.handleDblClick), (O = this.map) == null || O.on("click", this.handleClick), (p = this.map) == null || p.on("contextmenu", this.handleContextmenu), this.map && (this.map.getCanvas().style.cursor = "crosshair");
8356
- else {
8357
- (o = this.map) == null || o.getCanvas().removeEventListener("keydown", this.handleKeydown), (A = this.map) == null || A.off("mousemove", this.handleMove), (a = this.map) == null || a.off("dblclick", this.handleDblClick), (q = this.map) == null || q.off("click", this.handleClick), (r = this.map) == null || r.off("contextmenu", this.handleContextmenu);
8358
- for (const t of this.geojson)
8359
- this.handleClear(t, !0);
8360
- this.geojson = [], this.map && (this.map.getCanvas().style.cursor = "grab");
8361
- }
8360
+ var b, M, z, O, p;
8361
+ (b = this.map) == null || b.getCanvas().addEventListener("keydown", this.handleKeydown), (M = this.map) == null || M.on("mousemove", this.handleMove), (z = this.map) == null || z.on("dblclick", this.handleDblClick), (O = this.map) == null || O.on("click", this.handleClick), (p = this.map) == null || p.on("contextmenu", this.handleContextmenu), this.map && (this.map.getCanvas().style.cursor = "crosshair");
8362
+ },
8363
+ handleUnbind() {
8364
+ var b, M, z, O, p;
8365
+ (b = this.map) == null || b.getCanvas().removeEventListener("keydown", this.handleKeydown), (M = this.map) == null || M.off("mousemove", this.handleMove), (z = this.map) == null || z.off("dblclick", this.handleDblClick), (O = this.map) == null || O.off("click", this.handleClick), (p = this.map) == null || p.off("contextmenu", this.handleContextmenu);
8366
+ for (const o of this.geojson)
8367
+ this.handleClear(o, !0);
8368
+ this.geojson = [], this.map && (this.map.getCanvas().style.cursor = "grab");
8362
8369
  },
8363
8370
  handleKeydown(b) {
8364
8371
  if (b.key === "Shift") {
8365
8372
  this.navigation = this.navigation === "RL" ? "GC" : "RL";
8366
- const z = this.geojson.at(-1).features.filter((O) => O.geometry.type === "Point");
8367
- z.length && (z.at(-1).properties.mode = this.navigation);
8373
+ const M = this.geojson.at(-1), z = M.features.filter((O) => O.geometry.type === "Point");
8374
+ z.length && (z.at(-1).properties.mode = this.navigation), this.handleRender(M);
8368
8375
  }
8369
8376
  },
8370
8377
  handleDrag(b) {
8371
- var z, O, p, o, A, a, q, r, t, n;
8378
+ var z, O, p, o, A, q, a, r, e, n;
8372
8379
  const M = (O = (z = b.target) == null ? void 0 : z._element) == null ? void 0 : O.id;
8373
8380
  if ((M == null ? void 0 : M.split("-").length) === 2) {
8374
8381
  const l = this.geojson.filter((f) => f.id === M.split("-")[0])[0];
8375
8382
  this.pointMarkers[l.id].filter((f) => {
8376
8383
  var h;
8377
8384
  return ((h = f._element) == null ? void 0 : h.id) === M;
8378
- })[0].setLngLat([(o = (p = b.target) == null ? void 0 : p._lngLat) == null ? void 0 : o.lng, (a = (A = b.target) == null ? void 0 : A._lngLat) == null ? void 0 : a.lat]);
8385
+ })[0].setLngLat([(o = (p = b.target) == null ? void 0 : p._lngLat) == null ? void 0 : o.lng, (q = (A = b.target) == null ? void 0 : A._lngLat) == null ? void 0 : q.lat]);
8379
8386
  let B;
8380
8387
  l.features.forEach((f, h) => {
8381
8388
  if (f.geometry.type === "Point" && f.properties.id == M.split("-")[1]) {
@@ -8387,22 +8394,22 @@ const K0 = /* @__PURE__ */ k(Vb, [["render", Zb], ["__scopeId", "data-v-ad66a24c
8387
8394
  this.handleTmpPointUpdate(
8388
8395
  l,
8389
8396
  R[B - 1],
8390
- { lng: (r = (q = b.target) == null ? void 0 : q._lngLat) == null ? void 0 : r.lng, lat: (n = (t = b.target) == null ? void 0 : t._lngLat) == null ? void 0 : n.lat, properties: R[B].properties },
8397
+ { lng: (r = (a = b.target) == null ? void 0 : a._lngLat) == null ? void 0 : r.lng, lat: (n = (e = b.target) == null ? void 0 : e._lngLat) == null ? void 0 : n.lat, properties: R[B].properties },
8391
8398
  B === R.length - 1 ? void 0 : R[B + 1]
8392
8399
  );
8393
8400
  }
8394
8401
  },
8395
8402
  handleDragEnd(b) {
8396
- var z, O, p, o, A, a, q, r, t, n;
8403
+ var z, O, p, o, A, q, a, r, e, n;
8397
8404
  const M = (O = (z = b.target) == null ? void 0 : z._element) == null ? void 0 : O.id;
8398
8405
  if ((M == null ? void 0 : M.split("-").length) === 2) {
8399
8406
  const l = this.geojson.filter((R) => R.id === M.split("-")[0])[0];
8400
8407
  this.pointMarkers[l.id].filter((R) => {
8401
8408
  var f;
8402
8409
  return ((f = R._element) == null ? void 0 : f.id) === M;
8403
- })[0].setLngLat([(o = (p = b.target) == null ? void 0 : p._lngLat) == null ? void 0 : o.lng, (a = (A = b.target) == null ? void 0 : A._lngLat) == null ? void 0 : a.lat]);
8410
+ })[0].setLngLat([(o = (p = b.target) == null ? void 0 : p._lngLat) == null ? void 0 : o.lng, (q = (A = b.target) == null ? void 0 : A._lngLat) == null ? void 0 : q.lat]);
8404
8411
  const B = l.features.filter((R) => R.geometry.type === "Point" && R.properties.id == M.split("-")[1])[0];
8405
- B.geometry.coordinates = [(r = (q = b.target) == null ? void 0 : q._lngLat) == null ? void 0 : r.lng, (n = (t = b.target) == null ? void 0 : t._lngLat) == null ? void 0 : n.lat], l.features = l.features.filter((R) => R.geometry.type === "Point"), this.handlePointUpdate(l);
8412
+ B.geometry.coordinates = [(r = (a = b.target) == null ? void 0 : a._lngLat) == null ? void 0 : r.lng, (n = (e = b.target) == null ? void 0 : e._lngLat) == null ? void 0 : n.lat], l.features = l.features.filter((R) => R.geometry.type === "Point"), this.handlePointUpdate(l);
8406
8413
  }
8407
8414
  },
8408
8415
  handleContextmenu(b) {
@@ -8410,27 +8417,27 @@ const K0 = /* @__PURE__ */ k(Vb, [["render", Zb], ["__scopeId", "data-v-ad66a24c
8410
8417
  b.preventDefault(), (z = this.contextmenu) == null || z.remove();
8411
8418
  const M = (o = (p = (O = b.originalEvent) == null ? void 0 : O.target) == null ? void 0 : p.parentElement) == null ? void 0 : o.id;
8412
8419
  if ((M == null ? void 0 : M.split("-").length) === 2) {
8413
- const a = this.geojson.filter((q) => q.id === M.split("-")[0])[0].features.filter((q) => q.geometry.type === "Point");
8414
- if (a.length > 2 && a.filter((r) => r.properties.id === (M == null ? void 0 : M.split("-")[1]))[0]) {
8420
+ const q = this.geojson.filter((a) => a.id === M.split("-")[0])[0].features.filter((a) => a.geometry.type === "Point");
8421
+ if (q.length > 2 && q.filter((r) => r.properties.id === (M == null ? void 0 : M.split("-")[1]))[0]) {
8415
8422
  const r = document.createElement("div");
8416
8423
  r.className = "point-contextmenu-marker", r.innerHTML = `<span id="del-${M}" class="del-point">Del</span>`, this.contextmenu = new w0.Marker(r).setOffset([24, 0]).setLngLat([b.lngLat.lng, b.lngLat.lat]).addTo(this.map);
8417
8424
  }
8418
8425
  }
8419
8426
  },
8420
8427
  handleClick(b) {
8421
- var z, O, p, o, A;
8428
+ var z, O, p, o, A, q;
8422
8429
  (z = this.contextmenu) == null || z.remove();
8423
8430
  const M = b.originalEvent.target.className;
8424
8431
  if (M === "marker-close") {
8425
- const a = (p = (O = b.originalEvent) == null ? void 0 : O.srcElement) == null ? void 0 : p.id, q = this.geojson.filter((r) => r.id === a)[0];
8426
- q && this.handleClear(q, !0), this.geojson = this.geojson.filter((r) => r.id !== a);
8432
+ const a = (p = (O = b.originalEvent) == null ? void 0 : O.srcElement) == null ? void 0 : p.id, r = this.geojson.filter((e) => e.id === a)[0];
8433
+ r && this.handleClear(r, !0), this.geojson = this.geojson.filter((e) => e.id !== a), !this.show && !((o = this.geojson) != null && o.some((e) => e.closed)) && this.handleUnbind();
8427
8434
  } else if (M === "del-point") {
8428
- const a = (A = (o = b.originalEvent.target.id) == null ? void 0 : o.replace("del-", "")) == null ? void 0 : A.split("-"), q = this.geojson.filter((r) => r.id === a[0])[0];
8429
- q.features = q.features.filter((r) => r.geometry.type === "Point" && r.properties.id !== a[1]), this.handlePointUpdate(q);
8430
- } else if (M !== "marker-label") {
8435
+ const a = (q = (A = b.originalEvent.target.id) == null ? void 0 : A.replace("del-", "")) == null ? void 0 : q.split("-"), r = this.geojson.filter((e) => e.id === a[0])[0];
8436
+ r.features = r.features.filter((e) => e.geometry.type === "Point" && e.properties.id !== a[1]), this.handlePointUpdate(r);
8437
+ } else if (M !== "marker-label" && this.show) {
8431
8438
  let a = this.geojson.at(-1);
8432
- a || (a = v.featureCollection([], { id: (/* @__PURE__ */ new Date()).getTime().toString() }), this.geojson.push(a)), a.features = a.features.filter((r) => r.geometry.type === "Point");
8433
- const q = v.feature(
8439
+ a || (a = v.featureCollection([], { id: (/* @__PURE__ */ new Date()).getTime().toString() }), this.geojson.push(a)), a.features = a.features.filter((e) => e.geometry.type === "Point");
8440
+ const r = v.feature(
8434
8441
  {
8435
8442
  type: "Point",
8436
8443
  coordinates: [b.lngLat.lng, b.lngLat.lat]
@@ -8440,7 +8447,7 @@ const K0 = /* @__PURE__ */ k(Vb, [["render", Zb], ["__scopeId", "data-v-ad66a24c
8440
8447
  mode: this.navigation
8441
8448
  }
8442
8449
  );
8443
- a.features.push(q), this.handlePointUpdate(a);
8450
+ a.features.push(r), this.handlePointUpdate(a);
8444
8451
  }
8445
8452
  },
8446
8453
  handlePointUpdate(b) {
@@ -8449,12 +8456,12 @@ const K0 = /* @__PURE__ */ k(Vb, [["render", Zb], ["__scopeId", "data-v-ad66a24c
8449
8456
  let z = 0;
8450
8457
  const O = [];
8451
8458
  for (let p = 1; p < M.length; p++) {
8452
- const o = M[p - 1], A = M[p], a = o.properties, q = { lng: o.geometry.coordinates[0], lat: o.geometry.coordinates[1] }, r = { lng: A.geometry.coordinates[0], lat: A.geometry.coordinates[1] }, t = N0.calculateDistance(q, r, a.mode === "RL", 2), n = N0.calculateBearing(q, r, a.mode === "RL", 2);
8453
- z = $.roundPrecision(z + t, 2);
8459
+ const o = M[p - 1], A = M[p], q = o.properties, a = { lng: o.geometry.coordinates[0], lat: o.geometry.coordinates[1] }, r = { lng: A.geometry.coordinates[0], lat: A.geometry.coordinates[1] }, e = N0.calculateDistance(a, r, q.mode === "RL", 2), n = N0.calculateBearing(a, r, q.mode === "RL", 2);
8460
+ z = $.roundPrecision(z + e, 2);
8454
8461
  let l;
8455
- a.mode === "RL" ? l = $.convertToMonotonicLng([q, r]) : l = $.convertToMonotonicLng(N0.interpolateCoordinates(q, r, 200));
8462
+ q.mode === "RL" ? l = $.convertToMonotonicLng([a, r]) : l = $.convertToMonotonicLng(N0.interpolateCoordinates(a, r, 200));
8456
8463
  const d = v.lineString(l.map((B) => [B.lng, B.lat]));
8457
- d.properties.dist = t, d.properties.bearing = n, d.properties.total = z, O.push(d);
8464
+ d.properties.dist = e, d.properties.bearing = n, d.properties.total = z, O.push(d);
8458
8465
  }
8459
8466
  M.push(...O), b.total = z;
8460
8467
  }
@@ -8464,18 +8471,18 @@ const K0 = /* @__PURE__ */ k(Vb, [["render", Zb], ["__scopeId", "data-v-ad66a24c
8464
8471
  const p = v.featureCollection([]);
8465
8472
  let o, A;
8466
8473
  if (M) {
8467
- const q = M.properties, r = { lng: M.geometry.coordinates[0], lat: M.geometry.coordinates[1] }, t = { lng: z.lng, lat: z.lat };
8468
- o = N0.calculateDistance(r, t, q.mode === "RL", 2), A = N0.calculateBearing(r, t, q.mode === "RL", 2);
8474
+ const a = M.properties, r = { lng: M.geometry.coordinates[0], lat: M.geometry.coordinates[1] }, e = { lng: z.lng, lat: z.lat };
8475
+ o = N0.calculateDistance(r, e, a.mode === "RL", 2), A = N0.calculateBearing(r, e, a.mode === "RL", 2);
8469
8476
  let n;
8470
- q.mode === "RL" ? n = $.convertToMonotonicLng([r, t]) : n = $.convertToMonotonicLng(N0.interpolateCoordinates(r, t, 200));
8477
+ a.mode === "RL" ? n = $.convertToMonotonicLng([r, e]) : n = $.convertToMonotonicLng(N0.interpolateCoordinates(r, e, 200));
8471
8478
  const l = v.lineString(n.map((d) => [d.lng, d.lat]));
8472
8479
  l.properties.dist = o, l.properties.bearing = A, p.features.push(l);
8473
8480
  }
8474
8481
  if (O) {
8475
- const q = z.properties, r = z, t = { lng: O.geometry.coordinates[0], lat: O.geometry.coordinates[1] };
8476
- o = N0.calculateDistance(r, t, q.mode === "RL", 2), A = N0.calculateBearing(r, t, q.mode === "RL", 2);
8482
+ const a = z.properties, r = z, e = { lng: O.geometry.coordinates[0], lat: O.geometry.coordinates[1] };
8483
+ o = N0.calculateDistance(r, e, a.mode === "RL", 2), A = N0.calculateBearing(r, e, a.mode === "RL", 2);
8477
8484
  let n;
8478
- q.mode === "RL" ? n = $.convertToMonotonicLng([r, t]) : n = $.convertToMonotonicLng(N0.interpolateCoordinates(r, t, 200));
8485
+ a.mode === "RL" ? n = $.convertToMonotonicLng([r, e]) : n = $.convertToMonotonicLng(N0.interpolateCoordinates(r, e, 200));
8479
8486
  const l = v.lineString(n.map((d) => [d.lng, d.lat]));
8480
8487
  l.properties.dist = o, l.properties.bearing = A, p.features.push(l);
8481
8488
  }
@@ -8516,12 +8523,12 @@ const K0 = /* @__PURE__ */ k(Vb, [["render", Zb], ["__scopeId", "data-v-ad66a24c
8516
8523
  "text-halo-blur": 0
8517
8524
  }
8518
8525
  });
8519
- let a;
8520
- if (O ? a = '<div class="marker-label">Drag and drop</div>' : a = `<div class="marker-label">Tol distance: <b>${$.roundPrecision((b.total ?? 0) + o, 2)}</b>nm, bearing: <b>${A}</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)
8521
- this.tipMarker._element.innerHTML = a, this.tipMarker.setLngLat([z.lng, z.lat]);
8526
+ let q;
8527
+ if (O ? q = '<div class="marker-label">Drag and drop</div>' : q = `<div class="marker-label">Total distance: <b>${$.roundPrecision((b.total ?? 0) + o, 2)}</b>nm, bearing: <b>${A}</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)
8528
+ this.tipMarker._element.innerHTML = q, this.tipMarker.setLngLat([z.lng, z.lat]);
8522
8529
  else {
8523
- const q = document.createElement("div");
8524
- q.className = "tip-marker", q.innerHTML = a, this.tipMarker = new w0.Marker(q).setOffset([140, 0]).setLngLat([z.lng, z.lat]).addTo(this.map);
8530
+ const a = document.createElement("div");
8531
+ a.className = "tip-marker", a.innerHTML = q, this.tipMarker = new w0.Marker(a).setOffset([140, 0]).setLngLat([z.lng, z.lat]).addTo(this.map);
8525
8532
  }
8526
8533
  },
8527
8534
  handleMove(b) {
@@ -8577,21 +8584,21 @@ const K0 = /* @__PURE__ */ k(Vb, [["render", Zb], ["__scopeId", "data-v-ad66a24c
8577
8584
  });
8578
8585
  const o = b.features.filter((A) => A.geometry.type === "Point");
8579
8586
  for (const A of o) {
8580
- const a = document.createElement("div");
8581
- a.id = `${b.id}-${A.properties.id}`, a.className = `${b.closed ? "point-marker closed" : "point-marker"}`, a.innerHTML = '<div class="marker-circle"></div>';
8582
- const q = new w0.Marker({ element: a, draggable: !0, contextmenu: !0 }).setLngLat(A.geometry.coordinates).addTo(this.map);
8583
- q.on("drag", this.handleDrag), q.on("dragend", this.handleDragEnd), this.pointMarkers[b.id] ? this.pointMarkers[b.id].push(q) : this.pointMarkers[b.id] = [q];
8587
+ const q = document.createElement("div");
8588
+ q.id = `${b.id}-${A.properties.id}`, q.className = `${b.closed ? "point-marker closed" : "point-marker"}`, q.innerHTML = '<div class="marker-circle"></div>';
8589
+ const a = new w0.Marker({ element: q, draggable: !0, contextmenu: !0 }).setLngLat(A.geometry.coordinates).addTo(this.map);
8590
+ a.on("drag", this.handleDrag), a.on("dragend", this.handleDragEnd), this.pointMarkers[b.id] ? this.pointMarkers[b.id].push(a) : this.pointMarkers[b.id] = [a];
8584
8591
  }
8585
8592
  if (b.closed) {
8586
- const A = o.at(-1), q = b.features.filter((t) => t.geometry.type === "LineString").at(-1), r = document.createElement("div");
8587
- r.className = "point-summary-marker", r.innerHTML = `<div id="${b.id}" class="marker-close">×</div><div class="marker-label">Tol: ${q.properties.total}nm</div>`, this.closeMarkers[b.id] = new w0.Marker(r).setOffset([60, 0]).setLngLat(A.geometry.coordinates).addTo(this.map);
8593
+ const A = o.at(-1), a = b.features.filter((e) => e.geometry.type === "LineString").at(-1), r = document.createElement("div");
8594
+ r.className = "point-summary-marker", r.innerHTML = `<div id="${b.id}" class="marker-close">×</div><div class="marker-label">Tol: ${a.properties.total}nm</div>`, this.closeMarkers[b.id] = new w0.Marker(r).setOffset([60, 0]).setLngLat(A.geometry.coordinates).addTo(this.map);
8588
8595
  }
8589
8596
  }
8590
8597
  },
8591
8598
  handleClear(b, M = !0) {
8592
- var o, A, a, q, r, t, n, l, d;
8599
+ var o, A, q, a, r, e, n, l, d;
8593
8600
  const z = `${b.id}-${this.source}`, O = `${b.id}-${this.layer}`, p = `${b.id}-${this.labelLayer}`;
8594
- (o = this.map) != null && o.getLayer(O) && this.map.removeLayer(O), (A = this.map) != null && A.getLayer(p) && this.map.removeLayer(p), (a = this.map) != null && a.getLayer(this.tmpLayer) && this.map.removeLayer(this.tmpLayer), (q = this.map) != null && q.getLayer(this.tmpLabelLayer) && this.map.removeLayer(this.tmpLabelLayer), (r = this.closeMarkers[b.id]) == null || r.remove(), this.closeMarkers[b.id] = void 0, (t = this.pointMarkers[b.id]) == null || t.forEach((B) => {
8601
+ (o = this.map) != null && o.getLayer(O) && this.map.removeLayer(O), (A = this.map) != null && A.getLayer(p) && this.map.removeLayer(p), (q = this.map) != null && q.getLayer(this.tmpLayer) && this.map.removeLayer(this.tmpLayer), (a = this.map) != null && a.getLayer(this.tmpLabelLayer) && this.map.removeLayer(this.tmpLabelLayer), (r = this.closeMarkers[b.id]) == null || r.remove(), this.closeMarkers[b.id] = void 0, (e = this.pointMarkers[b.id]) == null || e.forEach((B) => {
8595
8602
  B == null || B.remove();
8596
8603
  }), this.pointMarkers[b.id] = [], (n = this.tipMarker) == null || n.remove(), this.tipMarker = void 0, M && ((l = this.map) != null && l.getSource(z)) && this.map.removeSource(z), M && ((d = this.map) != null && d.getSource(this.tmpSource)) && this.map.removeSource(this.tmpSource);
8597
8604
  }
@@ -8671,7 +8678,7 @@ function oz(b, M, z, O, p, o) {
8671
8678
  default: a0(() => [
8672
8679
  c("div", {
8673
8680
  class: U(p.vendor === "hi" ? "menu-icon active" : "menu-icon"),
8674
- onClick: M[0] || (M[0] = (a) => p.vendor = "hi")
8681
+ onClick: M[0] || (M[0] = (q) => p.vendor = "hi")
8675
8682
  }, M[2] || (M[2] = [
8676
8683
  c("span", { class: "iconfont" }, "HI", -1)
8677
8684
  ]), 2)
@@ -8687,7 +8694,7 @@ function oz(b, M, z, O, p, o) {
8687
8694
  default: a0(() => [
8688
8695
  c("div", {
8689
8696
  class: U(p.vendor === "i4" ? "menu-icon active" : "menu-icon"),
8690
- onClick: M[1] || (M[1] = (a) => p.vendor = "i4")
8697
+ onClick: M[1] || (M[1] = (q) => p.vendor = "i4")
8691
8698
  }, M[3] || (M[3] = [
8692
8699
  c("span", { class: "iconfont" }, "I4", -1)
8693
8700
  ]), 2)
@@ -8863,16 +8870,16 @@ const az = {
8863
8870
  },
8864
8871
  enc: {
8865
8872
  handler(b, M) {
8866
- var z, O, p, o, A, a, q, r;
8867
- b ? ((O = (z = this.map) == null ? void 0 : z.getLayer(b)) == null || O.setLayoutProperty("visibility", "visible"), (o = (p = this.map) == null ? void 0 : p.getLayer(M)) == null || o.setLayoutProperty("visibility", "none")) : ((a = (A = this.map) == null ? void 0 : A.getLayer("i4")) == null || a.setLayoutProperty("visibility", "none"), (r = (q = this.map) == null ? void 0 : q.getLayer("hi")) == null || r.setLayoutProperty("visibility", "none"));
8873
+ var z, O, p, o, A, q, a, r;
8874
+ b ? ((O = (z = this.map) == null ? void 0 : z.getLayer(b)) == null || O.setLayoutProperty("visibility", "visible"), (o = (p = this.map) == null ? void 0 : p.getLayer(M)) == null || o.setLayoutProperty("visibility", "none")) : ((q = (A = this.map) == null ? void 0 : A.getLayer("i4")) == null || q.setLayoutProperty("visibility", "none"), (r = (a = this.map) == null ? void 0 : a.getLayer("hi")) == null || r.setLayoutProperty("visibility", "none"));
8868
8875
  }
8869
8876
  },
8870
8877
  activeWeatherLayers: {
8871
8878
  handler() {
8872
- var b, M, z, O, p, o, A, a, q, r, t, n, l, d;
8879
+ var b, M, z, O, p, o, A, q, a, r, e, n, l, d;
8873
8880
  if (!this.map)
8874
8881
  return !1;
8875
- this.activeWeatherLayers.length > 0 ? ((M = (b = this.map) == null ? void 0 : b.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || M.setLayoutProperty("visibility", "visible"), (O = this.map) != null && O.getLayer((z = this.viewport) == null ? void 0 : z.rampColorLayer) && ((p = this.map) != null && p.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && this.mapProjection === "mercator" && ((A = this.map) == null || A.moveLayer((o = this.viewport) == null ? void 0 : o.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), (q = this.map) != null && q.getLayer((a = this.viewport) == null ? void 0 : a.particleLayer) && ((r = this.map) != null && r.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && this.mapProjection === "mercator" && ((n = this.map) == null || n.moveLayer((t = this.viewport) == null ? void 0 : t.particleLayer, this.helper.mapboxCustomer.layers.countryBoundary.id))) : (d = (l = this.map) == null ? void 0 : l.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || d.setLayoutProperty("visibility", "none"), this.$emit("activeWeatherLayers", this.activeWeatherLayers);
8882
+ this.activeWeatherLayers.length > 0 ? ((M = (b = this.map) == null ? void 0 : b.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || M.setLayoutProperty("visibility", "visible"), (O = this.map) != null && O.getLayer((z = this.viewport) == null ? void 0 : z.rampColorLayer) && ((p = this.map) != null && p.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && this.mapProjection === "mercator" && ((A = this.map) == null || A.moveLayer((o = this.viewport) == null ? void 0 : o.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), (a = this.map) != null && a.getLayer((q = this.viewport) == null ? void 0 : q.particleLayer) && ((r = this.map) != null && r.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && this.mapProjection === "mercator" && ((n = this.map) == null || n.moveLayer((e = this.viewport) == null ? void 0 : e.particleLayer, this.helper.mapboxCustomer.layers.countryBoundary.id))) : (d = (l = this.map) == null ? void 0 : l.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || d.setLayoutProperty("visibility", "none"), this.$emit("activeWeatherLayers", this.activeWeatherLayers);
8876
8883
  },
8877
8884
  immediate: !0
8878
8885
  },
@@ -8924,7 +8931,7 @@ const az = {
8924
8931
  },
8925
8932
  methods: {
8926
8933
  async fetchWeatherLayers(b = { tropicals: !1 }) {
8927
- var p, o, A, a, q, r, t, n;
8934
+ var p, o, A, q, a, r, e, n;
8928
8935
  const M = (/* @__PURE__ */ new Date()).valueOf();
8929
8936
  let z = 0, O = 0;
8930
8937
  if (this.map) {
@@ -8945,7 +8952,7 @@ const az = {
8945
8952
  }
8946
8953
  });
8947
8954
  if (O = (/* @__PURE__ */ new Date()).valueOf() - (M + z), console.log("weather links elapsed: ", O, ", total: ", z += O), ((A = h == null ? void 0 : h.data) == null ? void 0 : A.code) === 0) {
8948
- const m = (a = h == null ? void 0 : h.data) == null ? void 0 : a.data, X = [];
8955
+ const m = (q = h == null ? void 0 : h.data) == null ? void 0 : q.data, X = [];
8949
8956
  for (const y in m)
8950
8957
  y === "ice-edge" && (m[y] = "https://idm-hz.oss-cn-hangzhou.aliyuncs.com/test/sea_ice_contours.geojson"), y !== "tropicals" && X.push(
8951
8958
  f0.get(m[y], {
@@ -8986,7 +8993,7 @@ const az = {
8986
8993
  });
8987
8994
  }
8988
8995
  if (O = (/* @__PURE__ */ new Date()).valueOf() - (M + z), console.log("weather layers elapsed: ", O, ", total: ", z += O), this.weatherLayers["swell-direction"] || this.weatherLayers["swell-height"]) {
8989
- const m = (q = this.weatherLayers["swell-direction"]) == null ? void 0 : q.raw, X = (r = this.weatherLayers["swell-height"]) == null ? void 0 : r.raw;
8996
+ const m = (a = this.weatherLayers["swell-direction"]) == null ? void 0 : a.raw, X = (r = this.weatherLayers["swell-height"]) == null ? void 0 : r.raw;
8990
8997
  delete this.weatherLayers["swell-direction"], delete this.weatherLayers["swell-height"], this.weatherLayers.swell = {
8991
8998
  type: "json",
8992
8999
  direction: m,
@@ -8995,7 +9002,7 @@ const az = {
8995
9002
  };
8996
9003
  }
8997
9004
  if (this.weatherLayers["current-direction"] || this.weatherLayers["current-speed"]) {
8998
- const m = (t = this.weatherLayers["current-direction"]) == null ? void 0 : t.raw, X = (n = this.weatherLayers["current-speed"]) == null ? void 0 : n.raw;
9005
+ const m = (e = this.weatherLayers["current-direction"]) == null ? void 0 : e.raw, X = (n = this.weatherLayers["current-speed"]) == null ? void 0 : n.raw;
8999
9006
  delete this.weatherLayers["current-direction"], delete this.weatherLayers["current-speed"], this.weatherLayers.current = {
9000
9007
  type: "json",
9001
9008
  direction: m,
@@ -9015,18 +9022,18 @@ const az = {
9015
9022
  if (this.map) {
9016
9023
  let o = this.otherWeight;
9017
9024
  if (o) {
9018
- let A = !1, a = !1;
9019
- if (this.otherWeight & 2048 && (o = this.otherWeight - 2048, A = !0), this.otherWeight & 8192 && (o = o - 8192, a = !0), o) {
9025
+ let A = !1, q = !1;
9026
+ if (this.otherWeight & 2048 && (o = this.otherWeight - 2048, A = !0), this.otherWeight & 8192 && (o = o - 8192, q = !0), o) {
9020
9027
  if (b.all) {
9021
- const q = await f0.get(`${this.gateway}/api/arc/other/layers/links?l=${o}&t=${this.ts}`, {
9028
+ const a = await f0.get(`${this.gateway}/api/arc/other/layers/links?l=${o}&t=${this.ts}`, {
9022
9029
  headers: {
9023
9030
  Authorization: this.token || this.defaultMeteoToken
9024
9031
  }
9025
9032
  });
9026
- if (((M = q == null ? void 0 : q.data) == null ? void 0 : M.code) === 0) {
9027
- const r = (z = q == null ? void 0 : q.data) == null ? void 0 : z.data, t = [];
9033
+ if (((M = a == null ? void 0 : a.data) == null ? void 0 : M.code) === 0) {
9034
+ const r = (z = a == null ? void 0 : a.data) == null ? void 0 : z.data, e = [];
9028
9035
  for (const l in r)
9029
- t.push(
9036
+ e.push(
9030
9037
  f0.get(r[l], {
9031
9038
  headers: {
9032
9039
  Authorization: this.token || this.defaultMeteoToken,
@@ -9034,23 +9041,23 @@ const az = {
9034
9041
  }
9035
9042
  })
9036
9043
  );
9037
- const n = await Promise.all(t);
9038
- this.otherLayers = { enc: A, world12nm: a }, n.map((l) => {
9044
+ const n = await Promise.all(e);
9045
+ this.otherLayers = { enc: A, world12nm: q }, n.map((l) => {
9039
9046
  var R, f, h;
9040
9047
  const d = ((R = l == null ? void 0 : l.data) == null ? void 0 : R.data) || (l == null ? void 0 : l.data), B = (h = (f = l == null ? void 0 : l.config) == null ? void 0 : f.headers) == null ? void 0 : h.key;
9041
9048
  this.otherLayers[B] = d;
9042
9049
  });
9043
9050
  }
9044
9051
  } else if (b.dayNight && o & 1024) {
9045
- const q = await f0.get(`${this.gateway}/api/arc/other/layers/links?l=1024&t=${this.ts}`, {
9052
+ const a = await f0.get(`${this.gateway}/api/arc/other/layers/links?l=1024&t=${this.ts}`, {
9046
9053
  headers: {
9047
9054
  Authorization: this.token || this.defaultMeteoToken
9048
9055
  }
9049
9056
  });
9050
- if (((O = q == null ? void 0 : q.data) == null ? void 0 : O.code) === 0) {
9051
- const r = (p = q == null ? void 0 : q.data) == null ? void 0 : p.data, t = [];
9057
+ if (((O = a == null ? void 0 : a.data) == null ? void 0 : O.code) === 0) {
9058
+ const r = (p = a == null ? void 0 : a.data) == null ? void 0 : p.data, e = [];
9052
9059
  for (const l in r)
9053
- t.push(
9060
+ e.push(
9054
9061
  f0.get(r[l], {
9055
9062
  headers: {
9056
9063
  Authorization: this.token || this.defaultMeteoToken,
@@ -9058,7 +9065,7 @@ const az = {
9058
9065
  }
9059
9066
  })
9060
9067
  );
9061
- (await Promise.all(t)).map((l) => {
9068
+ (await Promise.all(e)).map((l) => {
9062
9069
  var R, f, h;
9063
9070
  const d = ((R = l == null ? void 0 : l.data) == null ? void 0 : R.data) || (l == null ? void 0 : l.data), B = (h = (f = l == null ? void 0 : l.config) == null ? void 0 : f.headers) == null ? void 0 : h.key;
9064
9071
  this.otherLayers[B] = d;
@@ -9066,7 +9073,7 @@ const az = {
9066
9073
  }
9067
9074
  }
9068
9075
  } else
9069
- this.otherLayers = { enc: A, world12nm: a };
9076
+ this.otherLayers = { enc: A, world12nm: q };
9070
9077
  } else
9071
9078
  this.otherLayers = {};
9072
9079
  this.handleBeforeLayerToggle();
@@ -9082,7 +9089,7 @@ const az = {
9082
9089
  this.activeWindLayer = !!this.activeWeatherLayers.find((M) => M.key === "wind"), this.$refs.layer && (this.$refs.layer.activeWeatherLayers = this.activeWeatherLayers);
9083
9090
  },
9084
9091
  handleRampColorInitial() {
9085
- var b, M, z, O, p, o, A, a, q, r, t, n;
9092
+ var b, M, z, O, p, o, A, q, a, r, e, n;
9086
9093
  this.viewport.map.getSource((b = this.viewport) == null ? void 0 : b.rampColorSource) || this.viewport.map.addSource((M = this.viewport) == null ? void 0 : M.rampColorSource, {
9087
9094
  type: "canvas",
9088
9095
  canvas: (z = this.viewport) == null ? void 0 : z.rampColorCanvas,
@@ -9098,15 +9105,15 @@ const az = {
9098
9105
  }
9099
9106
  },
9100
9107
  this.beforeLayer
9101
- ), this.viewport.map.getSource((A = this.viewport) == null ? void 0 : A.particleSource) || this.viewport.map.addSource((a = this.viewport) == null ? void 0 : a.particleSource, {
9108
+ ), this.viewport.map.getSource((A = this.viewport) == null ? void 0 : A.particleSource) || this.viewport.map.addSource((q = this.viewport) == null ? void 0 : q.particleSource, {
9102
9109
  type: "canvas",
9103
- canvas: (q = this.viewport) == null ? void 0 : q.particleCanvas,
9110
+ canvas: (a = this.viewport) == null ? void 0 : a.particleCanvas,
9104
9111
  animate: !0,
9105
9112
  coordinates: this.viewport.getBoundLngLat()
9106
9113
  }), this.viewport.map.getLayer((r = this.viewport) == null ? void 0 : r.particleLayer) || this.viewport.map.addLayer(
9107
9114
  {
9108
9115
  type: "raster",
9109
- id: (t = this.viewport) == null ? void 0 : t.particleLayer,
9116
+ id: (e = this.viewport) == null ? void 0 : e.particleLayer,
9110
9117
  source: (n = this.viewport) == null ? void 0 : n.particleSource,
9111
9118
  layout: {
9112
9119
  visibility: "none"
@@ -9116,18 +9123,18 @@ const az = {
9116
9123
  );
9117
9124
  },
9118
9125
  handleDragEndWithZoom4Json() {
9119
- var r, t, n, l;
9126
+ var r, e, n, l;
9120
9127
  const b = (/* @__PURE__ */ new Date()).valueOf();
9121
9128
  let M = 0, z = 0;
9122
- const O = (r = this.map) == null ? void 0 : r.getBounds(), p = this.map.getZoom(), o = $.convertToStdLng(O._sw.lng), A = $.convertToStdLng(O._ne.lng), a = Math.floor(O._sw.lat), q = Math.ceil(O._ne.lat);
9129
+ const O = (r = this.map) == null ? void 0 : r.getBounds(), p = this.map.getZoom(), o = $.convertToStdLng(O._sw.lng), A = $.convertToStdLng(O._ne.lng), q = Math.floor(O._sw.lat), a = Math.ceil(O._ne.lat);
9123
9130
  for (const d in this.weatherLayers)
9124
9131
  if (this.weatherLayers[d].active && this.weatherLayers[d].type === "json") {
9125
9132
  this.weatherLayers[d].active = !1, this.weatherLayers[d].version = Math.random() + 1;
9126
9133
  let B = [];
9127
9134
  if (["swell", "current"].includes(d)) {
9128
- const R = ((t = this.weatherLayers[d]) == null ? void 0 : t.direction) || {};
9135
+ const R = ((e = this.weatherLayers[d]) == null ? void 0 : e.direction) || {};
9129
9136
  for (const f in R)
9130
- if (f > a && f < q && (!(p <= this.zoom) || f % (p < this.zoom / 2 ? 5 : 3) === 0)) {
9137
+ if (f > q && f < a && (!(p <= this.zoom) || f % (p < this.zoom / 2 ? 5 : 3) === 0)) {
9131
9138
  const h = R[f].lng;
9132
9139
  o > A ? h.forEach((m, X) => {
9133
9140
  var E;
@@ -9195,7 +9202,7 @@ const az = {
9195
9202
  } else if (d === "wind") {
9196
9203
  const R = this.weatherLayers.wind.raw;
9197
9204
  for (const f in R)
9198
- if (f > a && f < q && (!(p <= this.zoom) || f % (p < this.zoom / 2 ? 5 : 3) === 0)) {
9205
+ if (f > q && f < a && (!(p <= this.zoom) || f % (p < this.zoom / 2 ? 5 : 3) === 0)) {
9199
9206
  const h = R[f].lng;
9200
9207
  o > A ? h.forEach((m, X) => {
9201
9208
  if ((m >= o && m <= 180 || m >= -180 && m <= A) && (!(p <= this.zoom) || m % (p < this.zoom / 2 ? 5 : 3) === 0)) {
@@ -9307,11 +9314,11 @@ const az = {
9307
9314
  return b.features.forEach((o) => {
9308
9315
  if (o.geometry.type !== "Point")
9309
9316
  if (O > p) {
9310
- let A = [O, M._sw.lat, 180, M._ne.lat], a = v.bboxClip(o, A);
9311
- a.geometry.coordinates.length && z.push(a), A = [-180, M._sw.lat, p, M._ne.lat], a = v.bboxClip(o, A), a.geometry.coordinates.length && z.push(a);
9317
+ let A = [O, M._sw.lat, 180, M._ne.lat], q = v.bboxClip(o, A);
9318
+ q.geometry.coordinates.length && z.push(q), A = [-180, M._sw.lat, p, M._ne.lat], q = v.bboxClip(o, A), q.geometry.coordinates.length && z.push(q);
9312
9319
  } else {
9313
- const A = [O, M._sw.lat, p, M._ne.lat], a = v.bboxClip(o, A);
9314
- a.geometry.coordinates.length && z.push(a);
9320
+ const A = [O, M._sw.lat, p, M._ne.lat], q = v.bboxClip(o, A);
9321
+ q.geometry.coordinates.length && z.push(q);
9315
9322
  }
9316
9323
  else
9317
9324
  z.push(o);
@@ -9328,8 +9335,8 @@ const az = {
9328
9335
  this.handleBeforeLayerToggle();
9329
9336
  },
9330
9337
  handleBeforeLayerToggle() {
9331
- var b, M, z, O, p, o, A, a, q, r, t, n, l, d;
9332
- (b = this.map) != null && b.getLayer(this.beforeLayer) && ((M = this.activeWeatherLayers) != null && M.length || (z = this.otherLayers) != null && z["war-zones"] || (O = this.otherLayers) != null && O["gmdss-areas"] || (p = this.otherLayers) != null && p["load-lines"] || (o = this.otherLayers) != null && o["high-risk-area"] || (A = this.otherLayers) != null && A["time-zones"] || (a = this.otherLayers) != null && a.pirates || (q = this.otherLayers) != null && q.ports || (r = this.otherLayers) != null && r.enc || (t = this.otherLayers) != null && t.world12nm || (n = this.otherLayers) != null && n["voluntary-reporting-area"] || (l = this.otherLayers) != null && l["eca-zones"] || (d = this.otherLayers) != null && d["special-area"]) && this.map.setLayoutProperty(this.beforeLayer, "visibility", "visible");
9338
+ var b, M, z, O, p, o, A, q, a, r, e, n, l, d;
9339
+ (b = this.map) != null && b.getLayer(this.beforeLayer) && ((M = this.activeWeatherLayers) != null && M.length || (z = this.otherLayers) != null && z["war-zones"] || (O = this.otherLayers) != null && O["gmdss-areas"] || (p = this.otherLayers) != null && p["load-lines"] || (o = this.otherLayers) != null && o["high-risk-area"] || (A = this.otherLayers) != null && A["time-zones"] || (q = this.otherLayers) != null && q.pirates || (a = this.otherLayers) != null && a.ports || (r = this.otherLayers) != null && r.enc || (e = this.otherLayers) != null && e.world12nm || (n = this.otherLayers) != null && n["voluntary-reporting-area"] || (l = this.otherLayers) != null && l["eca-zones"] || (d = this.otherLayers) != null && d["special-area"]) && this.map.setLayoutProperty(this.beforeLayer, "visibility", "visible");
9333
9340
  },
9334
9341
  handleDateChange(b = { tropicals: !1 }) {
9335
9342
  this.fetchWeatherLayers(b), this.fetchOtherLayers({ dayNight: !0 });
@@ -9340,7 +9347,7 @@ const az = {
9340
9347
  const z = this.activeWeatherLayers.some(
9341
9348
  (o) => {
9342
9349
  var A;
9343
- return ["wind", "current"].includes(o.key) && (!((A = Object.keys(o)) != null && A.some((a) => a === "particle")) || !!o.particle);
9350
+ return ["wind", "current"].includes(o.key) && (!((A = Object.keys(o)) != null && A.some((q) => q === "particle")) || !!o.particle);
9344
9351
  }
9345
9352
  ), O = this.activeWeatherLayers.some((o) => ["png", "jpg"].includes(o.type));
9346
9353
  z && !O ? (this.activeWeatherLayers.forEach((o) => {
@@ -9363,8 +9370,8 @@ const az = {
9363
9370
  }
9364
9371
  },
9365
9372
  handle3dToggle(b) {
9366
- var M, z, O, p, o, A, a, q, r, t, n, l, d, B, R, f, h, m, X, E;
9367
- b ? (this.map.setProjection("globe"), this.mapProjection = "globe", (z = this.map) != null && z.getLayer((M = this.viewport) == null ? void 0 : M.rampColorLayer) && ((O = this.map) != null && O.getLayer(this.helper.mapboxCustomer.layers.water.id)) && ((o = this.map) == null || o.moveLayer((p = this.viewport) == null ? void 0 : p.rampColorLayer, this.helper.mapboxCustomer.layers.water.id)), (a = this.map) != null && a.getLayer((A = this.viewport) == null ? void 0 : A.particleLayer) && ((q = this.map) != null && q.getLayer(this.helper.mapboxCustomer.layers.water.id)) && ((t = this.map) == null || t.moveLayer((r = this.viewport) == null ? void 0 : r.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(), (l = this.map) != null && l.getLayer((n = this.viewport) == null ? void 0 : n.rampColorLayer) && ((d = this.map) != null && d.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && ((R = this.map) == null || R.moveLayer((B = this.viewport) == null ? void 0 : B.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), (h = this.map) != null && h.getLayer((f = this.viewport) == null ? void 0 : f.particleLayer) && ((m = this.map) != null && m.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && ((E = this.map) == null || E.moveLayer((X = this.viewport) == null ? void 0 : X.particleLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)));
9373
+ var M, z, O, p, o, A, q, a, r, e, n, l, d, B, R, f, h, m, X, E;
9374
+ b ? (this.map.setProjection("globe"), this.mapProjection = "globe", (z = this.map) != null && z.getLayer((M = this.viewport) == null ? void 0 : M.rampColorLayer) && ((O = this.map) != null && O.getLayer(this.helper.mapboxCustomer.layers.water.id)) && ((o = this.map) == null || o.moveLayer((p = this.viewport) == null ? void 0 : p.rampColorLayer, this.helper.mapboxCustomer.layers.water.id)), (q = this.map) != null && q.getLayer((A = this.viewport) == null ? void 0 : A.particleLayer) && ((a = this.map) != null && a.getLayer(this.helper.mapboxCustomer.layers.water.id)) && ((e = this.map) == null || e.moveLayer((r = this.viewport) == null ? void 0 : r.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(), (l = this.map) != null && l.getLayer((n = this.viewport) == null ? void 0 : n.rampColorLayer) && ((d = this.map) != null && d.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && ((R = this.map) == null || R.moveLayer((B = this.viewport) == null ? void 0 : B.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), (h = this.map) != null && h.getLayer((f = this.viewport) == null ? void 0 : f.particleLayer) && ((m = this.map) != null && m.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && ((E = this.map) == null || E.moveLayer((X = this.viewport) == null ? void 0 : X.particleLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)));
9368
9375
  },
9369
9376
  handleParticle(b) {
9370
9377
  this.particleFactor = b, this.weatherLayers[b.key] && (this.weatherLayers[b.key].particle = b.particle), this.activeWeatherLayers.map((O) => {
@@ -9388,8 +9395,8 @@ const az = {
9388
9395
  className: "map-gl-home"
9389
9396
  };
9390
9397
  function iz(b, M, z, O, p, o) {
9391
- var r0, d0, g0, s0, P, M0, e0, I, b0, W0, l0, R0, o0, e, i, L, N, w, D, Z, S, G, x0, k0, Q0, H0, _0;
9392
- const A = x("IdmGlLayer"), a = x("IdmENC"), q = x("IdmWorld12nm"), r = x("IdmSigWave"), t = x("IdmSwell"), n = x("IdmPrmsl"), l = x("IdmIceberg"), d = x("IdmTropicals"), B = x("IdmCurrents"), R = x("IdmCurrentParticle"), f = x("IdmWindBarb"), h = x("IdmWindParticle"), m = x("IdmPrecip3h"), X = x("IdmVisibility"), E = x("IdmWaterTemp"), y = x("IdmTemp"), F = x("IdmArctic"), J = x("IdmWarZone"), V = x("IdmGmdssArea"), u = x("IdmEcaZone"), g = x("IdmAlertZone"), A0 = x("IdmPort"), n0 = x("IdmLoadLine"), h0 = x("IdmTimezone"), i0 = x("IdmVRA"), u0 = x("IdmSpecialArea"), p0 = x("IdmTerminator"), m0 = x("IdmLatLng"), B0 = x("IdmMeasure"), L0 = x("IdmPoint");
9398
+ var r0, d0, g0, s0, P, M0, e0, I, b0, W0, l0, R0, o0, t, i, L, N, w, D, Z, S, G, x0, k0, Q0, H0, _0;
9399
+ const A = x("IdmGlLayer"), q = x("IdmENC"), a = x("IdmWorld12nm"), r = x("IdmSigWave"), e = x("IdmSwell"), n = x("IdmPrmsl"), l = x("IdmIceberg"), d = x("IdmTropicals"), B = x("IdmCurrents"), R = x("IdmCurrentParticle"), f = x("IdmWindBarb"), h = x("IdmWindParticle"), m = x("IdmPrecip3h"), X = x("IdmVisibility"), E = x("IdmWaterTemp"), y = x("IdmTemp"), F = x("IdmArctic"), J = x("IdmWarZone"), V = x("IdmGmdssArea"), u = x("IdmEcaZone"), g = x("IdmAlertZone"), A0 = x("IdmPort"), n0 = x("IdmLoadLine"), h0 = x("IdmTimezone"), i0 = x("IdmVRA"), u0 = x("IdmSpecialArea"), p0 = x("IdmTerminator"), m0 = x("IdmLatLng"), B0 = x("IdmMeasure"), L0 = x("IdmPoint");
9393
9400
  return z.map ? (s(), W("div", qz, [
9394
9401
  T(A, Q({
9395
9402
  ref: "layer",
@@ -9416,7 +9423,7 @@ function iz(b, M, z, O, p, o) {
9416
9423
  on3d: o.handle3dToggle,
9417
9424
  onHandleToggleVersion: o.handleToggleVersion
9418
9425
  }), null, 16, ["map", "toggle-version", "map-projection", "showWindFeather", "showWindParticle", "showCurrentIsoband", "showCurrentParticle", "token", "gateway", "forecastModel", "onWeather", "onOther", "on3d", "onHandleToggleVersion"]),
9419
- T(a, Q({
9426
+ T(q, Q({
9420
9427
  map: z.map,
9421
9428
  token: z.token,
9422
9429
  enabled: (r0 = p.otherLayers) == null ? void 0 : r0.enc,
@@ -9424,7 +9431,7 @@ function iz(b, M, z, O, p, o) {
9424
9431
  }, b.$attrs, {
9425
9432
  onEnc: M[7] || (M[7] = (t0) => p.enc = t0)
9426
9433
  }), null, 16, ["map", "token", "enabled", "toggle-version"]),
9427
- T(q, Q({
9434
+ T(a, Q({
9428
9435
  map: z.map,
9429
9436
  token: z.token,
9430
9437
  "weather-layers": p.weatherLayers,
@@ -9436,7 +9443,7 @@ function iz(b, M, z, O, p, o) {
9436
9443
  "before-layer": z.beforeLayer,
9437
9444
  activeWeatherLayers: p.activeWeatherLayers
9438
9445
  }, b.$attrs), null, 16, ["map", "sig-wave", "before-layer", "activeWeatherLayers"]),
9439
- T(t, Q({
9446
+ T(e, Q({
9440
9447
  map: z.map,
9441
9448
  swell: (s0 = p.weatherLayers) == null ? void 0 : s0.swell,
9442
9449
  "before-layer": z.beforeLayer,
@@ -9508,7 +9515,7 @@ function iz(b, M, z, O, p, o) {
9508
9515
  }, b.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
9509
9516
  T(X, Q({
9510
9517
  viewport: p.viewport,
9511
- factor: (e = p.weatherLayers) == null ? void 0 : e.visibility,
9518
+ factor: (t = p.weatherLayers) == null ? void 0 : t.visibility,
9512
9519
  "before-layer": z.beforeLayer,
9513
9520
  "toggle-version": z.toggleVersion
9514
9521
  }, b.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),