@aguacerowx/javascript-sdk 0.0.27 → 0.0.28
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/AguaceroCore.js +207 -794
- package/dist/default-colormaps.js +437 -556
- package/dist/dictionaries.js +2413 -2071
- package/dist/events.js +2 -2
- package/dist/getBundleId.js +20 -9
- package/dist/index.js +1 -172
- package/dist/unitConversions.js +10 -10
- package/package.json +99 -99
- package/src/coordinate_configs.js +374 -374
- package/src/default-colormaps.js +3369 -3369
- package/src/dictionaries.js +3857 -3857
- package/src/events.js +31 -31
- package/src/fill-layer-worker.js +26 -26
- package/src/getBundleId.js +8 -8
- package/src/getBundleId.native.js +14 -14
- package/src/gridDecodePipeline.js +32 -32
- package/src/gridDecodeWorker.js +24 -24
- package/src/index.js +48 -48
- package/src/map-styles.js +101 -101
- package/src/nexradTiltCoalesce.js +95 -95
- package/src/nexradTilts.js +128 -128
- package/src/nexrad_level3_catalog.js +26 -26
- package/src/nws/nwsAlertsFetchSpec.js +93 -93
- package/src/nws/nwsEventColorsDefaults.js +133 -133
- package/src/nws/nwsSdkConstants.js +368 -368
- package/src/satellite_support.js +376 -376
- package/src/spawnGridDecodeWorker.js +5 -5
- package/src/unitConversions.js +102 -102
- package/dist/getBundleId.native.js +0 -18
- package/dist/gridDecodePipeline.js +0 -37
- package/dist/gridDecodeWorker.js +0 -31
- package/dist/nexradTiltCoalesce.js +0 -95
- package/dist/nexradTilts.js +0 -129
- package/dist/nexrad_level3_catalog.js +0 -56
- package/dist/nexrad_support.js +0 -269
- package/dist/satellite_support.js +0 -395
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* NWWS `/alerts?hours=` sizing (aguacero-frontend baseline + overlap window parity).
|
|
3
|
-
*
|
|
4
|
-
* Hours follow the **active** observational mode only: NEXRAD → `nexradDurationValue`,
|
|
5
|
-
* MRMS → `mrmsDurationValue`, satellite → `satelliteDurationValue`, otherwise `1` (e.g. model-only).
|
|
6
|
-
* Tier cap uses {@link AguaceroCore} `satelliteTier` — the only subscription-style field on core today
|
|
7
|
-
* (same values as the frontend board tier: basic / enthusiast / professional).
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import { parseTimelineDurationHours } from '../satellite_support.js';
|
|
11
|
-
|
|
12
|
-
const MAX_ALERT_HISTORY_HOURS = 8760;
|
|
13
|
-
|
|
14
|
-
/** Max option span (hours) per tier from frontend `RADAR_DURATION_CONFIG`. */
|
|
15
|
-
const TIER_MAX_HOURS = {
|
|
16
|
-
professional: 12,
|
|
17
|
-
enthusiast: 4,
|
|
18
|
-
basic: 1,
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* @param {string | undefined} tier
|
|
23
|
-
* @returns {'professional'|'enthusiast'|'basic'}
|
|
24
|
-
*/
|
|
25
|
-
export function normalizeNwsSubscriptionTier(tier) {
|
|
26
|
-
const t = String(tier || 'basic').toLowerCase();
|
|
27
|
-
if (t === 'commercial' || t === 'lifetime' || t === 'partner') return 'professional';
|
|
28
|
-
if (t === 'professional' || t === 'enthusiast' || t === 'basic') return t;
|
|
29
|
-
return 'basic';
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* @param {string | undefined} tier
|
|
34
|
-
* @returns {number}
|
|
35
|
-
*/
|
|
36
|
-
export function getMaxRadarHistoryHoursForTier(tier) {
|
|
37
|
-
const k = normalizeNwsSubscriptionTier(tier);
|
|
38
|
-
return TIER_MAX_HOURS[k] ?? TIER_MAX_HOURS.basic;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* @param {object | null | undefined} state - {@link AguaceroCore} `state`
|
|
43
|
-
* @returns {number} integer hours in [1, MAX_ALERT_HISTORY_HOURS]
|
|
44
|
-
*/
|
|
45
|
-
export function computeNwsAlertsFetchHoursFromAguaceroState(state) {
|
|
46
|
-
const tierMax = getMaxRadarHistoryHoursForTier(state?.satelliteTier);
|
|
47
|
-
let desired = 1;
|
|
48
|
-
if (state?.isNexrad) {
|
|
49
|
-
desired = parseTimelineDurationHours(state.nexradDurationValue);
|
|
50
|
-
} else if (state?.isMRMS) {
|
|
51
|
-
desired = parseTimelineDurationHours(state.mrmsDurationValue);
|
|
52
|
-
} else if (state?.isSatellite) {
|
|
53
|
-
desired = parseTimelineDurationHours(state.satelliteDurationValue);
|
|
54
|
-
}
|
|
55
|
-
const clamped = Math.min(tierMax, Math.max(1, desired));
|
|
56
|
-
return Math.min(MAX_ALERT_HISTORY_HOURS, Math.floor(clamped));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* @param {number} hours
|
|
61
|
-
* @returns {string}
|
|
62
|
-
*/
|
|
63
|
-
export function nwsAlertsFetchSpecCacheKey(hours) {
|
|
64
|
-
return `h${hours}`;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Unix window [start, end] for client-side validity overlap (wall-clock end at “now”).
|
|
69
|
-
*
|
|
70
|
-
* @param {number} hours
|
|
71
|
-
* @param {number | null} [anchorSec] - reserved; default now (matches frontend `anchorSec: null`)
|
|
72
|
-
* @returns {{ winStartSec: number; winEndSec: number }}
|
|
73
|
-
*/
|
|
74
|
-
export function nwwsAlertsFetchUnixWindow(hours, anchorSec = null) {
|
|
75
|
-
const nowSec = Math.floor(Date.now() / 1000);
|
|
76
|
-
const winEndSec = anchorSec ?? nowSec;
|
|
77
|
-
const winStartSec = winEndSec - hours * 3600;
|
|
78
|
-
return { winStartSec, winEndSec };
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* @param {string} baseUrl - `/alerts` root (no query)
|
|
83
|
-
* @param {number} hours
|
|
84
|
-
* @returns {string}
|
|
85
|
-
*/
|
|
86
|
-
export function buildNwwsActiveAlertsUrl(baseUrl, hours) {
|
|
87
|
-
const h = Math.max(1, Math.floor(Number(hours) || 1));
|
|
88
|
-
const params = new URLSearchParams();
|
|
89
|
-
params.set('hours', String(h));
|
|
90
|
-
const q = params.toString();
|
|
91
|
-
const base = String(baseUrl || '').replace(/\/$/, '');
|
|
92
|
-
return q ? `${base}?${q}` : base;
|
|
93
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* NWWS `/alerts?hours=` sizing (aguacero-frontend baseline + overlap window parity).
|
|
3
|
+
*
|
|
4
|
+
* Hours follow the **active** observational mode only: NEXRAD → `nexradDurationValue`,
|
|
5
|
+
* MRMS → `mrmsDurationValue`, satellite → `satelliteDurationValue`, otherwise `1` (e.g. model-only).
|
|
6
|
+
* Tier cap uses {@link AguaceroCore} `satelliteTier` — the only subscription-style field on core today
|
|
7
|
+
* (same values as the frontend board tier: basic / enthusiast / professional).
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { parseTimelineDurationHours } from '../satellite_support.js';
|
|
11
|
+
|
|
12
|
+
const MAX_ALERT_HISTORY_HOURS = 8760;
|
|
13
|
+
|
|
14
|
+
/** Max option span (hours) per tier from frontend `RADAR_DURATION_CONFIG`. */
|
|
15
|
+
const TIER_MAX_HOURS = {
|
|
16
|
+
professional: 12,
|
|
17
|
+
enthusiast: 4,
|
|
18
|
+
basic: 1,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @param {string | undefined} tier
|
|
23
|
+
* @returns {'professional'|'enthusiast'|'basic'}
|
|
24
|
+
*/
|
|
25
|
+
export function normalizeNwsSubscriptionTier(tier) {
|
|
26
|
+
const t = String(tier || 'basic').toLowerCase();
|
|
27
|
+
if (t === 'commercial' || t === 'lifetime' || t === 'partner') return 'professional';
|
|
28
|
+
if (t === 'professional' || t === 'enthusiast' || t === 'basic') return t;
|
|
29
|
+
return 'basic';
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @param {string | undefined} tier
|
|
34
|
+
* @returns {number}
|
|
35
|
+
*/
|
|
36
|
+
export function getMaxRadarHistoryHoursForTier(tier) {
|
|
37
|
+
const k = normalizeNwsSubscriptionTier(tier);
|
|
38
|
+
return TIER_MAX_HOURS[k] ?? TIER_MAX_HOURS.basic;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @param {object | null | undefined} state - {@link AguaceroCore} `state`
|
|
43
|
+
* @returns {number} integer hours in [1, MAX_ALERT_HISTORY_HOURS]
|
|
44
|
+
*/
|
|
45
|
+
export function computeNwsAlertsFetchHoursFromAguaceroState(state) {
|
|
46
|
+
const tierMax = getMaxRadarHistoryHoursForTier(state?.satelliteTier);
|
|
47
|
+
let desired = 1;
|
|
48
|
+
if (state?.isNexrad) {
|
|
49
|
+
desired = parseTimelineDurationHours(state.nexradDurationValue);
|
|
50
|
+
} else if (state?.isMRMS) {
|
|
51
|
+
desired = parseTimelineDurationHours(state.mrmsDurationValue);
|
|
52
|
+
} else if (state?.isSatellite) {
|
|
53
|
+
desired = parseTimelineDurationHours(state.satelliteDurationValue);
|
|
54
|
+
}
|
|
55
|
+
const clamped = Math.min(tierMax, Math.max(1, desired));
|
|
56
|
+
return Math.min(MAX_ALERT_HISTORY_HOURS, Math.floor(clamped));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @param {number} hours
|
|
61
|
+
* @returns {string}
|
|
62
|
+
*/
|
|
63
|
+
export function nwsAlertsFetchSpecCacheKey(hours) {
|
|
64
|
+
return `h${hours}`;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Unix window [start, end] for client-side validity overlap (wall-clock end at “now”).
|
|
69
|
+
*
|
|
70
|
+
* @param {number} hours
|
|
71
|
+
* @param {number | null} [anchorSec] - reserved; default now (matches frontend `anchorSec: null`)
|
|
72
|
+
* @returns {{ winStartSec: number; winEndSec: number }}
|
|
73
|
+
*/
|
|
74
|
+
export function nwwsAlertsFetchUnixWindow(hours, anchorSec = null) {
|
|
75
|
+
const nowSec = Math.floor(Date.now() / 1000);
|
|
76
|
+
const winEndSec = anchorSec ?? nowSec;
|
|
77
|
+
const winStartSec = winEndSec - hours * 3600;
|
|
78
|
+
return { winStartSec, winEndSec };
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @param {string} baseUrl - `/alerts` root (no query)
|
|
83
|
+
* @param {number} hours
|
|
84
|
+
* @returns {string}
|
|
85
|
+
*/
|
|
86
|
+
export function buildNwwsActiveAlertsUrl(baseUrl, hours) {
|
|
87
|
+
const h = Math.max(1, Math.floor(Number(hours) || 1));
|
|
88
|
+
const params = new URLSearchParams();
|
|
89
|
+
params.set('hours', String(h));
|
|
90
|
+
const q = params.toString();
|
|
91
|
+
const base = String(baseUrl || '').replace(/\/$/, '');
|
|
92
|
+
return q ? `${base}?${q}` : base;
|
|
93
|
+
}
|
|
@@ -1,133 +1,133 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Default NWS/IPAWS alert fill colors — kept in sync with
|
|
3
|
-
* `aguacero-frontend/src/lib/defaultColormaps.ts` (`NWS_EVENT_COLORS`).
|
|
4
|
-
* Update both when the palette changes.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
export const NWS_EVENT_COLORS = {
|
|
8
|
-
'Tsunami Warning': '#FD6347',
|
|
9
|
-
'Tsunami Advisory': '#D2691E',
|
|
10
|
-
'Tsunami Watch': '#FF00FF',
|
|
11
|
-
'Tornado Warning': '#FF0000',
|
|
12
|
-
'Tornado Warning (Observed)': '#FF0000',
|
|
13
|
-
'Tornado Warning (PDS)': '#FF0000',
|
|
14
|
-
'Tornado Warning (Emergency)': '#FF0000',
|
|
15
|
-
'Tornado Watch': '#FFFF00',
|
|
16
|
-
'Severe Thunderstorm Warning': '#FFA500',
|
|
17
|
-
'Severe Thunderstorm Warning (Considerable)': '#FFA500',
|
|
18
|
-
'Severe Thunderstorm Warning (Destructive)': '#FFA500',
|
|
19
|
-
'Severe Thunderstorm Watch': '#DB7093',
|
|
20
|
-
'Severe Weather Statement': '#00FFFF',
|
|
21
|
-
'Extreme Wind Warning': '#FF8C00',
|
|
22
|
-
'High Wind Warning': '#DAA520',
|
|
23
|
-
'High Wind Watch': '#B8860B',
|
|
24
|
-
'Wind Advisory': '#D2B48C',
|
|
25
|
-
'Lake Wind Advisory': '#D2B48C',
|
|
26
|
-
'Flash Flood Warning': '#8B0000',
|
|
27
|
-
'Flash Flood Warning (Considerable)': '#8B0000',
|
|
28
|
-
'Flash Flood Warning (Emergency)': '#8B0000',
|
|
29
|
-
'Flash Flood Statement': '#8B0000',
|
|
30
|
-
'Flash Flood Watch': '#2E8B57',
|
|
31
|
-
'Flood Warning': '#00FF00',
|
|
32
|
-
'Flood Statement': '#00FF00',
|
|
33
|
-
'Flood Watch': '#2E8B57',
|
|
34
|
-
'Flood Advisory': '#00FF7F',
|
|
35
|
-
'Coastal Flood Warning': '#228B22',
|
|
36
|
-
'Coastal Flood Watch': '#66CDAA',
|
|
37
|
-
'Coastal Flood Advisory': '#7CFC00',
|
|
38
|
-
'Coastal Flood Statement': '#6B8E23',
|
|
39
|
-
'Lakeshore Flood Warning': '#228B22',
|
|
40
|
-
'Lakeshore Flood Watch': '#66CDAA',
|
|
41
|
-
'Lakeshore Flood Advisory': '#7CFC00',
|
|
42
|
-
'Lakeshore Flood Statement': '#6B8E23',
|
|
43
|
-
'Hydrologic Outlook': '#90EE90',
|
|
44
|
-
'Shelter In Place Warning': '#FA8072',
|
|
45
|
-
'Evacuation Immediate': '#7FFF00',
|
|
46
|
-
'Civil Danger Warning': '#FFB6C1',
|
|
47
|
-
'Civil Emergency Message': '#FFB6C1',
|
|
48
|
-
'Law Enforcement Warning': '#C0C0C0',
|
|
49
|
-
'Local Area Emergency': '#C0C0C0',
|
|
50
|
-
'911 Telephone Outage': '#C0C0C0',
|
|
51
|
-
'Nuclear Power Plant Warning': '#4B0082',
|
|
52
|
-
'Radiological Hazard Warning': '#4B0082',
|
|
53
|
-
'Hazardous Materials Warning': '#4B0082',
|
|
54
|
-
'Fire Warning': '#A0522D',
|
|
55
|
-
'Red Flag Warning': '#FF1493',
|
|
56
|
-
'Fire Weather Watch': '#FFDEAD',
|
|
57
|
-
'Extreme Fire Danger': '#E9967A',
|
|
58
|
-
'Storm Surge Warning': '#B524F7',
|
|
59
|
-
'Storm Surge Watch': '#DB7FF7',
|
|
60
|
-
'Hurricane Force Wind Warning': '#CD5C5C',
|
|
61
|
-
'Hurricane Force Wind Watch': '#9932CC',
|
|
62
|
-
'Hurricane Warning': '#DC143C',
|
|
63
|
-
'Hurricane Watch': '#FF00FF',
|
|
64
|
-
'Typhoon Warning': '#DC143C',
|
|
65
|
-
'Typhoon Watch': '#FF00FF',
|
|
66
|
-
'Tropical Storm Warning': '#B22222',
|
|
67
|
-
'Tropical Storm Watch': '#F08080',
|
|
68
|
-
'Tropical Cyclone Local Statement': '#FFE4B5',
|
|
69
|
-
'Special Marine Warning': '#FFA500',
|
|
70
|
-
'Gale Warning': '#DDA0DD',
|
|
71
|
-
'Gale Watch': '#FFC0CB',
|
|
72
|
-
'Storm Warning': '#9400D3',
|
|
73
|
-
'Storm Watch': '#FFE4B5',
|
|
74
|
-
'Small Craft Advisory': '#D8BFD8',
|
|
75
|
-
'Brisk Wind Advisory': '#D8BFD8',
|
|
76
|
-
'Hazardous Seas Warning': '#D8BFD8',
|
|
77
|
-
'Hazardous Seas Watch': '#483D8B',
|
|
78
|
-
'Heavy Freezing Spray Warning': '#00BFFF',
|
|
79
|
-
'Heavy Freezing Spray Watch': '#BC8F8F',
|
|
80
|
-
'Marine Weather Statement': '#FFDAB9',
|
|
81
|
-
'Low Water Advisory': '#A52A2A',
|
|
82
|
-
'High Surf Warning': '#228B22',
|
|
83
|
-
'High Surf Advisory': '#BA55D3',
|
|
84
|
-
'Beach Hazards Statement': '#40E0D0',
|
|
85
|
-
'Rip Current Statement': '#40E0D0',
|
|
86
|
-
'Blizzard Warning': '#FF4500',
|
|
87
|
-
'Snow Squall Warning': '#C71585',
|
|
88
|
-
'Ice Storm Warning': '#8B008B',
|
|
89
|
-
'Winter Storm Warning': '#FF69B4',
|
|
90
|
-
'Lake Effect Snow Warning': '#008B8B',
|
|
91
|
-
'Winter Storm Watch': '#4682B4',
|
|
92
|
-
'Winter Weather Advisory': '#7B68EE',
|
|
93
|
-
'Freeze Warning': '#483D8B',
|
|
94
|
-
'Freeze Watch': '#00FFFF',
|
|
95
|
-
'Frost Advisory': '#6495ED',
|
|
96
|
-
'Freezing Fog Advisory': '#008080',
|
|
97
|
-
'Freezing Spray Advisory': '#00BFFF',
|
|
98
|
-
'Freezing Rain Advisory': '#DA70D6',
|
|
99
|
-
'Wind Chill Warning': '#B0C4DE',
|
|
100
|
-
'Cold Weather Advisory': '#AFEEEE',
|
|
101
|
-
'Extreme Heat Warning': '#C71585',
|
|
102
|
-
'Extreme Heat Watch': '#800000',
|
|
103
|
-
'Heat Advisory': '#FF7F50',
|
|
104
|
-
'Extreme Cold Warning': '#0000FF',
|
|
105
|
-
'Extreme Cold Watch': '#5F9EA0',
|
|
106
|
-
'Dust Storm Warning': '#FFE4C4',
|
|
107
|
-
'Blowing Dust Warning': '#FFE4C4',
|
|
108
|
-
'Dust Advisory': '#BDB76B',
|
|
109
|
-
'Blowing Dust Advisory': '#BDB76B',
|
|
110
|
-
'Ashfall Warning': '#A9A9A9',
|
|
111
|
-
'Ashfall Advisory': '#696969',
|
|
112
|
-
'Avalanche Warning': '#1E90FF',
|
|
113
|
-
'Avalanche Watch': '#F4A460',
|
|
114
|
-
'Avalanche Advisory': '#CD853F',
|
|
115
|
-
'Earthquake Warning': '#8B4513',
|
|
116
|
-
'Volcano Warning': '#2F4F4F',
|
|
117
|
-
'Dense Fog Advisory': '#708090',
|
|
118
|
-
'Dense Smoke Advisory': '#F0E68C',
|
|
119
|
-
'Air Quality Alert': '#808080',
|
|
120
|
-
'Air Stagnation Advisory': '#808080',
|
|
121
|
-
'Special Weather Statement': '#FFE4B5',
|
|
122
|
-
'Hazardous Weather Outlook': '#EEE8AA',
|
|
123
|
-
'Short Term Forecast': '#98FB98',
|
|
124
|
-
'Administrative Message': '#C0C0C0',
|
|
125
|
-
'Test': '#F0FFFF',
|
|
126
|
-
'Child Abduction Emergency': '#FFFFFF',
|
|
127
|
-
'Blue Alert': '#FFFFFF',
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
/** Same ordering as frontend `NWS_ALERT_EVENT_NAMES`. */
|
|
131
|
-
export const NWS_ALERT_EVENT_NAMES = Object.keys(NWS_EVENT_COLORS).sort((a, b) =>
|
|
132
|
-
a.localeCompare(b, undefined, { sensitivity: 'base' })
|
|
133
|
-
);
|
|
1
|
+
/**
|
|
2
|
+
* Default NWS/IPAWS alert fill colors — kept in sync with
|
|
3
|
+
* `aguacero-frontend/src/lib/defaultColormaps.ts` (`NWS_EVENT_COLORS`).
|
|
4
|
+
* Update both when the palette changes.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const NWS_EVENT_COLORS = {
|
|
8
|
+
'Tsunami Warning': '#FD6347',
|
|
9
|
+
'Tsunami Advisory': '#D2691E',
|
|
10
|
+
'Tsunami Watch': '#FF00FF',
|
|
11
|
+
'Tornado Warning': '#FF0000',
|
|
12
|
+
'Tornado Warning (Observed)': '#FF0000',
|
|
13
|
+
'Tornado Warning (PDS)': '#FF0000',
|
|
14
|
+
'Tornado Warning (Emergency)': '#FF0000',
|
|
15
|
+
'Tornado Watch': '#FFFF00',
|
|
16
|
+
'Severe Thunderstorm Warning': '#FFA500',
|
|
17
|
+
'Severe Thunderstorm Warning (Considerable)': '#FFA500',
|
|
18
|
+
'Severe Thunderstorm Warning (Destructive)': '#FFA500',
|
|
19
|
+
'Severe Thunderstorm Watch': '#DB7093',
|
|
20
|
+
'Severe Weather Statement': '#00FFFF',
|
|
21
|
+
'Extreme Wind Warning': '#FF8C00',
|
|
22
|
+
'High Wind Warning': '#DAA520',
|
|
23
|
+
'High Wind Watch': '#B8860B',
|
|
24
|
+
'Wind Advisory': '#D2B48C',
|
|
25
|
+
'Lake Wind Advisory': '#D2B48C',
|
|
26
|
+
'Flash Flood Warning': '#8B0000',
|
|
27
|
+
'Flash Flood Warning (Considerable)': '#8B0000',
|
|
28
|
+
'Flash Flood Warning (Emergency)': '#8B0000',
|
|
29
|
+
'Flash Flood Statement': '#8B0000',
|
|
30
|
+
'Flash Flood Watch': '#2E8B57',
|
|
31
|
+
'Flood Warning': '#00FF00',
|
|
32
|
+
'Flood Statement': '#00FF00',
|
|
33
|
+
'Flood Watch': '#2E8B57',
|
|
34
|
+
'Flood Advisory': '#00FF7F',
|
|
35
|
+
'Coastal Flood Warning': '#228B22',
|
|
36
|
+
'Coastal Flood Watch': '#66CDAA',
|
|
37
|
+
'Coastal Flood Advisory': '#7CFC00',
|
|
38
|
+
'Coastal Flood Statement': '#6B8E23',
|
|
39
|
+
'Lakeshore Flood Warning': '#228B22',
|
|
40
|
+
'Lakeshore Flood Watch': '#66CDAA',
|
|
41
|
+
'Lakeshore Flood Advisory': '#7CFC00',
|
|
42
|
+
'Lakeshore Flood Statement': '#6B8E23',
|
|
43
|
+
'Hydrologic Outlook': '#90EE90',
|
|
44
|
+
'Shelter In Place Warning': '#FA8072',
|
|
45
|
+
'Evacuation Immediate': '#7FFF00',
|
|
46
|
+
'Civil Danger Warning': '#FFB6C1',
|
|
47
|
+
'Civil Emergency Message': '#FFB6C1',
|
|
48
|
+
'Law Enforcement Warning': '#C0C0C0',
|
|
49
|
+
'Local Area Emergency': '#C0C0C0',
|
|
50
|
+
'911 Telephone Outage': '#C0C0C0',
|
|
51
|
+
'Nuclear Power Plant Warning': '#4B0082',
|
|
52
|
+
'Radiological Hazard Warning': '#4B0082',
|
|
53
|
+
'Hazardous Materials Warning': '#4B0082',
|
|
54
|
+
'Fire Warning': '#A0522D',
|
|
55
|
+
'Red Flag Warning': '#FF1493',
|
|
56
|
+
'Fire Weather Watch': '#FFDEAD',
|
|
57
|
+
'Extreme Fire Danger': '#E9967A',
|
|
58
|
+
'Storm Surge Warning': '#B524F7',
|
|
59
|
+
'Storm Surge Watch': '#DB7FF7',
|
|
60
|
+
'Hurricane Force Wind Warning': '#CD5C5C',
|
|
61
|
+
'Hurricane Force Wind Watch': '#9932CC',
|
|
62
|
+
'Hurricane Warning': '#DC143C',
|
|
63
|
+
'Hurricane Watch': '#FF00FF',
|
|
64
|
+
'Typhoon Warning': '#DC143C',
|
|
65
|
+
'Typhoon Watch': '#FF00FF',
|
|
66
|
+
'Tropical Storm Warning': '#B22222',
|
|
67
|
+
'Tropical Storm Watch': '#F08080',
|
|
68
|
+
'Tropical Cyclone Local Statement': '#FFE4B5',
|
|
69
|
+
'Special Marine Warning': '#FFA500',
|
|
70
|
+
'Gale Warning': '#DDA0DD',
|
|
71
|
+
'Gale Watch': '#FFC0CB',
|
|
72
|
+
'Storm Warning': '#9400D3',
|
|
73
|
+
'Storm Watch': '#FFE4B5',
|
|
74
|
+
'Small Craft Advisory': '#D8BFD8',
|
|
75
|
+
'Brisk Wind Advisory': '#D8BFD8',
|
|
76
|
+
'Hazardous Seas Warning': '#D8BFD8',
|
|
77
|
+
'Hazardous Seas Watch': '#483D8B',
|
|
78
|
+
'Heavy Freezing Spray Warning': '#00BFFF',
|
|
79
|
+
'Heavy Freezing Spray Watch': '#BC8F8F',
|
|
80
|
+
'Marine Weather Statement': '#FFDAB9',
|
|
81
|
+
'Low Water Advisory': '#A52A2A',
|
|
82
|
+
'High Surf Warning': '#228B22',
|
|
83
|
+
'High Surf Advisory': '#BA55D3',
|
|
84
|
+
'Beach Hazards Statement': '#40E0D0',
|
|
85
|
+
'Rip Current Statement': '#40E0D0',
|
|
86
|
+
'Blizzard Warning': '#FF4500',
|
|
87
|
+
'Snow Squall Warning': '#C71585',
|
|
88
|
+
'Ice Storm Warning': '#8B008B',
|
|
89
|
+
'Winter Storm Warning': '#FF69B4',
|
|
90
|
+
'Lake Effect Snow Warning': '#008B8B',
|
|
91
|
+
'Winter Storm Watch': '#4682B4',
|
|
92
|
+
'Winter Weather Advisory': '#7B68EE',
|
|
93
|
+
'Freeze Warning': '#483D8B',
|
|
94
|
+
'Freeze Watch': '#00FFFF',
|
|
95
|
+
'Frost Advisory': '#6495ED',
|
|
96
|
+
'Freezing Fog Advisory': '#008080',
|
|
97
|
+
'Freezing Spray Advisory': '#00BFFF',
|
|
98
|
+
'Freezing Rain Advisory': '#DA70D6',
|
|
99
|
+
'Wind Chill Warning': '#B0C4DE',
|
|
100
|
+
'Cold Weather Advisory': '#AFEEEE',
|
|
101
|
+
'Extreme Heat Warning': '#C71585',
|
|
102
|
+
'Extreme Heat Watch': '#800000',
|
|
103
|
+
'Heat Advisory': '#FF7F50',
|
|
104
|
+
'Extreme Cold Warning': '#0000FF',
|
|
105
|
+
'Extreme Cold Watch': '#5F9EA0',
|
|
106
|
+
'Dust Storm Warning': '#FFE4C4',
|
|
107
|
+
'Blowing Dust Warning': '#FFE4C4',
|
|
108
|
+
'Dust Advisory': '#BDB76B',
|
|
109
|
+
'Blowing Dust Advisory': '#BDB76B',
|
|
110
|
+
'Ashfall Warning': '#A9A9A9',
|
|
111
|
+
'Ashfall Advisory': '#696969',
|
|
112
|
+
'Avalanche Warning': '#1E90FF',
|
|
113
|
+
'Avalanche Watch': '#F4A460',
|
|
114
|
+
'Avalanche Advisory': '#CD853F',
|
|
115
|
+
'Earthquake Warning': '#8B4513',
|
|
116
|
+
'Volcano Warning': '#2F4F4F',
|
|
117
|
+
'Dense Fog Advisory': '#708090',
|
|
118
|
+
'Dense Smoke Advisory': '#F0E68C',
|
|
119
|
+
'Air Quality Alert': '#808080',
|
|
120
|
+
'Air Stagnation Advisory': '#808080',
|
|
121
|
+
'Special Weather Statement': '#FFE4B5',
|
|
122
|
+
'Hazardous Weather Outlook': '#EEE8AA',
|
|
123
|
+
'Short Term Forecast': '#98FB98',
|
|
124
|
+
'Administrative Message': '#C0C0C0',
|
|
125
|
+
'Test': '#F0FFFF',
|
|
126
|
+
'Child Abduction Emergency': '#FFFFFF',
|
|
127
|
+
'Blue Alert': '#FFFFFF',
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
/** Same ordering as frontend `NWS_ALERT_EVENT_NAMES`. */
|
|
131
|
+
export const NWS_ALERT_EVENT_NAMES = Object.keys(NWS_EVENT_COLORS).sort((a, b) =>
|
|
132
|
+
a.localeCompare(b, undefined, { sensitivity: 'base' })
|
|
133
|
+
);
|