@sayue_ltr/fleq 1.49.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/CHANGELOG.md +898 -0
- package/LICENSE +21 -0
- package/README.md +535 -0
- package/assets/icons/.gitkeep +0 -0
- package/assets/sounds/.gitkeep +0 -0
- package/assets/sounds/cancel.mp3 +0 -0
- package/assets/sounds/critical.mp3 +0 -0
- package/assets/sounds/info.mp3 +0 -0
- package/assets/sounds/normal.mp3 +0 -0
- package/assets/sounds/warning.mp3 +0 -0
- package/dist/config.js +638 -0
- package/dist/dmdata/connection-manager.js +2 -0
- package/dist/dmdata/endpoint-selector.js +185 -0
- package/dist/dmdata/multi-connection-manager.js +158 -0
- package/dist/dmdata/rest-client.js +281 -0
- package/dist/dmdata/telegram-parser.js +704 -0
- package/dist/dmdata/volcano-parser.js +647 -0
- package/dist/dmdata/ws-client.js +336 -0
- package/dist/engine/cli/cli-init.js +266 -0
- package/dist/engine/cli/cli-run.js +121 -0
- package/dist/engine/cli/cli.js +121 -0
- package/dist/engine/eew/eew-logger.js +355 -0
- package/dist/engine/eew/eew-tracker.js +229 -0
- package/dist/engine/messages/message-router.js +261 -0
- package/dist/engine/messages/tsunami-state.js +96 -0
- package/dist/engine/messages/volcano-state.js +131 -0
- package/dist/engine/messages/volcano-vfvo53-aggregator.js +173 -0
- package/dist/engine/monitor/monitor.js +118 -0
- package/dist/engine/monitor/repl-coordinator.js +63 -0
- package/dist/engine/monitor/shutdown.js +114 -0
- package/dist/engine/notification/node-notifier-loader.js +19 -0
- package/dist/engine/notification/notifier.js +338 -0
- package/dist/engine/notification/sound-player.js +230 -0
- package/dist/engine/notification/volcano-presentation.js +166 -0
- package/dist/engine/startup/config-resolver.js +139 -0
- package/dist/engine/startup/tsunami-initializer.js +91 -0
- package/dist/engine/startup/update-checker.js +229 -0
- package/dist/engine/startup/volcano-initializer.js +89 -0
- package/dist/index.js +24 -0
- package/dist/logger.js +95 -0
- package/dist/types.js +61 -0
- package/dist/ui/earthquake-formatter.js +871 -0
- package/dist/ui/eew-formatter.js +335 -0
- package/dist/ui/formatter.js +689 -0
- package/dist/ui/repl.js +2059 -0
- package/dist/ui/test-samples.js +880 -0
- package/dist/ui/theme.js +516 -0
- package/dist/ui/volcano-formatter.js +667 -0
- package/dist/ui/waiting-tips.js +227 -0
- package/dist/utils/intensity.js +13 -0
- package/dist/utils/secrets.js +14 -0
- package/package.json +69 -0
|
@@ -0,0 +1,880 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TEST_TABLES = exports.SAMPLE_LG_OBSERVATION = exports.SAMPLE_NANKAI_TROUGH = exports.SAMPLE_SEISMIC_TEXT = exports.SAMPLE_TSUNAMI = exports.SAMPLE_EEW = exports.SAMPLE_EARTHQUAKE = void 0;
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const zlib_1 = __importDefault(require("zlib"));
|
|
10
|
+
const eew_formatter_1 = require("./eew-formatter");
|
|
11
|
+
const earthquake_formatter_1 = require("./earthquake-formatter");
|
|
12
|
+
const volcano_formatter_1 = require("./volcano-formatter");
|
|
13
|
+
const telegram_parser_1 = require("../dmdata/telegram-parser");
|
|
14
|
+
const volcano_parser_1 = require("../dmdata/volcano-parser");
|
|
15
|
+
const volcano_presentation_1 = require("../engine/notification/volcano-presentation");
|
|
16
|
+
const volcano_state_1 = require("../engine/messages/volcano-state");
|
|
17
|
+
// ── フィクスチャ読み込みヘルパー ──
|
|
18
|
+
/** フィクスチャディレクトリを解決する (dist/ui/ → ../../test/fixtures/) */
|
|
19
|
+
function resolveFixturesDir() {
|
|
20
|
+
return path_1.default.resolve(__dirname, "../../test/fixtures");
|
|
21
|
+
}
|
|
22
|
+
/** フィクスチャXMLを読み込み WsDataMessage を構築する */
|
|
23
|
+
function loadFixture(filename) {
|
|
24
|
+
try {
|
|
25
|
+
const fixturesDir = resolveFixturesDir();
|
|
26
|
+
let xmlPath = path_1.default.join(fixturesDir, filename);
|
|
27
|
+
if (!fs_1.default.existsSync(xmlPath)) {
|
|
28
|
+
xmlPath = path_1.default.join(fixturesDir, "selected_xml", filename);
|
|
29
|
+
}
|
|
30
|
+
if (!fs_1.default.existsSync(xmlPath))
|
|
31
|
+
return null;
|
|
32
|
+
const xml = fs_1.default.readFileSync(xmlPath, "utf-8");
|
|
33
|
+
const body = zlib_1.default.gzipSync(Buffer.from(xml, "utf-8")).toString("base64");
|
|
34
|
+
const typeMatch = filename.match(/(V[TXYZ]SE\d+|VFVO\d+|VFSVii|VZVO\d+)/);
|
|
35
|
+
const type = typeMatch ? typeMatch[1] : "VXSE53";
|
|
36
|
+
const classification = type === "VXSE43"
|
|
37
|
+
? "eew.warning"
|
|
38
|
+
: type === "VXSE44" || type === "VXSE45"
|
|
39
|
+
? "eew.forecast"
|
|
40
|
+
: type.startsWith("VFVO") || type.startsWith("VFSV") || type.startsWith("VZVO")
|
|
41
|
+
? "telegram.volcano"
|
|
42
|
+
: "telegram.earthquake";
|
|
43
|
+
return {
|
|
44
|
+
type: "data",
|
|
45
|
+
version: "2.0",
|
|
46
|
+
classification,
|
|
47
|
+
id: "test-sample-001",
|
|
48
|
+
passing: [{ name: "test", time: new Date().toISOString() }],
|
|
49
|
+
head: {
|
|
50
|
+
type,
|
|
51
|
+
author: "気象庁",
|
|
52
|
+
time: new Date().toISOString(),
|
|
53
|
+
test: false,
|
|
54
|
+
xml: true,
|
|
55
|
+
},
|
|
56
|
+
xmlReport: {
|
|
57
|
+
control: {
|
|
58
|
+
title: "テスト電文",
|
|
59
|
+
dateTime: new Date().toISOString(),
|
|
60
|
+
status: "通常",
|
|
61
|
+
editorialOffice: "気象庁本庁",
|
|
62
|
+
publishingOffice: "気象庁",
|
|
63
|
+
},
|
|
64
|
+
head: {
|
|
65
|
+
title: "テスト電文",
|
|
66
|
+
reportDateTime: new Date().toISOString(),
|
|
67
|
+
targetDateTime: new Date().toISOString(),
|
|
68
|
+
eventId: null,
|
|
69
|
+
serial: null,
|
|
70
|
+
infoType: "発表",
|
|
71
|
+
infoKind: "テスト",
|
|
72
|
+
infoKindVersion: "1.0_0",
|
|
73
|
+
headline: null,
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
format: "xml",
|
|
77
|
+
compression: "gzip",
|
|
78
|
+
encoding: "base64",
|
|
79
|
+
body,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/** フィクスチャからパース済みデータを取得する */
|
|
87
|
+
function fromFixture(filename, parser) {
|
|
88
|
+
const msg = loadFixture(filename);
|
|
89
|
+
if (msg == null)
|
|
90
|
+
return null;
|
|
91
|
+
return parser(msg);
|
|
92
|
+
}
|
|
93
|
+
// ── フィクスチャファイル名定数 ──
|
|
94
|
+
const FIX_VXSE53_DRILL_1 = "32-35_01_03_240613_VXSE53.xml";
|
|
95
|
+
const FIX_VXSE53_CANCEL = "32-39_05_12_100915_VXSE53.xml";
|
|
96
|
+
const FIX_VXSE53_ENCHI = "32-35_01_03_100514_VXSE53.xml";
|
|
97
|
+
const FIX_VXSE51_SHINDO = "32-35_08_03_100915_VXSE51.xml";
|
|
98
|
+
const FIX_VXSE43_WARNING_S1 = "37_01_01_240613_VXSE43.xml";
|
|
99
|
+
const FIX_VXSE45_CANCEL = "77_01_33_240613_VXSE45.xml";
|
|
100
|
+
const FIX_VXSE45_PLUM = "77_02_01_260101_VXSE45_PLUM.xml";
|
|
101
|
+
const FIX_VXSE45_FINAL = "77_01_30_260101_VXSE45_FINAL.xml";
|
|
102
|
+
const FIX_VTSE41_WARN = "32-39_11_02_250206_VTSE41.xml";
|
|
103
|
+
const FIX_VTSE41_CANCEL = "38-39_03_01_210805_VTSE41.xml";
|
|
104
|
+
const FIX_VTSE51_INFO = "32-39_11_03_250206_VTSE51.xml";
|
|
105
|
+
const FIX_VTSE52_OFFSHORE = "61_11_01_250206_VTSE52.xml";
|
|
106
|
+
const FIX_VXSE60_CANCEL = "32-35_10_02_220510_VXSE60.xml";
|
|
107
|
+
const FIX_VYSE50_CAUTION = "74_01_06_200512_VYSE50.xml";
|
|
108
|
+
const FIX_VYSE50_CLOSED = "74_01_07_200512_VYSE50.xml";
|
|
109
|
+
const FIX_VXSE62_LGOBS = "78_01_01_240613_VXSE62.xml";
|
|
110
|
+
// ── 既存ハードコードサンプル (#1: 各タイプのデフォルト) ──
|
|
111
|
+
/** 地震情報サンプル */
|
|
112
|
+
exports.SAMPLE_EARTHQUAKE = {
|
|
113
|
+
type: "VXSE53",
|
|
114
|
+
infoType: "発表",
|
|
115
|
+
title: "震源・震度に関する情報",
|
|
116
|
+
reportDateTime: "2024/01/01 00:00:00",
|
|
117
|
+
headline: "1日00時00分ころ、地震がありました。",
|
|
118
|
+
publishingOffice: "気象庁",
|
|
119
|
+
earthquake: {
|
|
120
|
+
originTime: "2024/01/01 00:00:00",
|
|
121
|
+
hypocenterName: "石川県能登地方",
|
|
122
|
+
latitude: "北緯37.5度",
|
|
123
|
+
longitude: "東経137.3度",
|
|
124
|
+
depth: "10km",
|
|
125
|
+
magnitude: "7.6",
|
|
126
|
+
},
|
|
127
|
+
intensity: {
|
|
128
|
+
maxInt: "7",
|
|
129
|
+
areas: [
|
|
130
|
+
{ name: "石川県能登", intensity: "7" },
|
|
131
|
+
{ name: "新潟県上越", intensity: "6強" },
|
|
132
|
+
{ name: "新潟県中越", intensity: "6弱" },
|
|
133
|
+
{ name: "富山県東部", intensity: "5強" },
|
|
134
|
+
{ name: "富山県西部", intensity: "5弱" },
|
|
135
|
+
{ name: "石川県加賀", intensity: "5弱" },
|
|
136
|
+
{ name: "福井県嶺北", intensity: "4" },
|
|
137
|
+
{ name: "長野県北部", intensity: "4" },
|
|
138
|
+
],
|
|
139
|
+
},
|
|
140
|
+
tsunami: {
|
|
141
|
+
text: "この地震により、日本の沿岸では若干の海面変動があるかもしれませんが、被害の心配はありません。",
|
|
142
|
+
},
|
|
143
|
+
isTest: true,
|
|
144
|
+
};
|
|
145
|
+
/** 緊急地震速報サンプル */
|
|
146
|
+
exports.SAMPLE_EEW = {
|
|
147
|
+
type: "VXSE44",
|
|
148
|
+
infoType: "発表",
|
|
149
|
+
title: "緊急地震速報(予報)",
|
|
150
|
+
reportDateTime: "2024/01/01 00:00:05",
|
|
151
|
+
headline: null,
|
|
152
|
+
publishingOffice: "気象庁",
|
|
153
|
+
serial: "3",
|
|
154
|
+
eventId: "20240101000000",
|
|
155
|
+
earthquake: {
|
|
156
|
+
originTime: "2024/01/01 00:00:00",
|
|
157
|
+
hypocenterName: "石川県能登地方",
|
|
158
|
+
latitude: "北緯37.5度",
|
|
159
|
+
longitude: "東経137.3度",
|
|
160
|
+
depth: "10km",
|
|
161
|
+
magnitude: "7.2",
|
|
162
|
+
},
|
|
163
|
+
isAssumedHypocenter: false,
|
|
164
|
+
forecastIntensity: {
|
|
165
|
+
areas: [
|
|
166
|
+
{ name: "石川県能登", intensity: "6強", hasArrived: true },
|
|
167
|
+
{ name: "新潟県上越", intensity: "5強" },
|
|
168
|
+
{ name: "富山県東部", intensity: "5弱" },
|
|
169
|
+
{ name: "石川県加賀", intensity: "4" },
|
|
170
|
+
{ name: "福井県嶺北", intensity: "4" },
|
|
171
|
+
{ name: "新潟県中越", intensity: "3" },
|
|
172
|
+
],
|
|
173
|
+
},
|
|
174
|
+
isTest: true,
|
|
175
|
+
isWarning: false,
|
|
176
|
+
};
|
|
177
|
+
/** 津波情報サンプル */
|
|
178
|
+
exports.SAMPLE_TSUNAMI = {
|
|
179
|
+
type: "VTSE41",
|
|
180
|
+
infoType: "発表",
|
|
181
|
+
title: "津波警報・注意報・予報a",
|
|
182
|
+
reportDateTime: "2024/01/01 00:03:00",
|
|
183
|
+
headline: "津波警報を発表しました。",
|
|
184
|
+
publishingOffice: "気象庁",
|
|
185
|
+
forecast: [
|
|
186
|
+
{
|
|
187
|
+
areaName: "石川県能登",
|
|
188
|
+
kind: "津波警報",
|
|
189
|
+
maxHeightDescription: "3m",
|
|
190
|
+
firstHeight: "すでに津波到達と推測",
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
areaName: "新潟県上中下越",
|
|
194
|
+
kind: "津波注意報",
|
|
195
|
+
maxHeightDescription: "1m",
|
|
196
|
+
firstHeight: "01日00時30分",
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
areaName: "富山県",
|
|
200
|
+
kind: "津波注意報",
|
|
201
|
+
maxHeightDescription: "1m",
|
|
202
|
+
firstHeight: "01日00時20分",
|
|
203
|
+
},
|
|
204
|
+
],
|
|
205
|
+
earthquake: {
|
|
206
|
+
originTime: "2024/01/01 00:00:00",
|
|
207
|
+
hypocenterName: "石川県能登地方",
|
|
208
|
+
latitude: "北緯37.5度",
|
|
209
|
+
longitude: "東経137.3度",
|
|
210
|
+
depth: "10km",
|
|
211
|
+
magnitude: "7.6",
|
|
212
|
+
},
|
|
213
|
+
warningComment: "津波による被害のおそれがあります。警報が発表された沿岸部や川沿いにいる人はただちに高台や避難ビルなど安全な場所へ避難してください。",
|
|
214
|
+
isTest: true,
|
|
215
|
+
};
|
|
216
|
+
/** 地震活動テキスト情報サンプル */
|
|
217
|
+
exports.SAMPLE_SEISMIC_TEXT = {
|
|
218
|
+
type: "VXSE56",
|
|
219
|
+
infoType: "発表",
|
|
220
|
+
title: "地震の活動状況等に関する情報",
|
|
221
|
+
reportDateTime: "2024/01/01 12:00:00",
|
|
222
|
+
headline: null,
|
|
223
|
+
publishingOffice: "気象庁",
|
|
224
|
+
bodyText: "令和6年1月1日16時10分頃の石川県能登地方の地震について\n\n" +
|
|
225
|
+
"** 概要 **\n" +
|
|
226
|
+
"1日16時10分頃、石川県能登地方を震源とするマグニチュード7.6の地震が発生し、石川県志賀町で震度7を観測しました。\n" +
|
|
227
|
+
"この地震について、緊急地震速報(警報)を発表しています。",
|
|
228
|
+
isTest: true,
|
|
229
|
+
};
|
|
230
|
+
/** 南海トラフ情報サンプル */
|
|
231
|
+
exports.SAMPLE_NANKAI_TROUGH = {
|
|
232
|
+
type: "VYSE50",
|
|
233
|
+
infoType: "発表",
|
|
234
|
+
title: "南海トラフ地震臨時情報",
|
|
235
|
+
reportDateTime: "2024/01/01 00:30:00",
|
|
236
|
+
headline: "南海トラフ地震臨時情報(調査中)が発表されました。",
|
|
237
|
+
publishingOffice: "気象庁",
|
|
238
|
+
infoSerial: {
|
|
239
|
+
name: "南海トラフ地震臨時情報",
|
|
240
|
+
code: "120",
|
|
241
|
+
},
|
|
242
|
+
bodyText: "本日、南海トラフ地震の想定震源域でマグニチュード6.8の地震が発生しました。\n" +
|
|
243
|
+
"この地震と南海トラフ地震との関連性について調査を開始します。\n" +
|
|
244
|
+
"今後の情報に注意してください。",
|
|
245
|
+
nextAdvisory: "続報は2時間後を目途に発表します。",
|
|
246
|
+
isTest: true,
|
|
247
|
+
};
|
|
248
|
+
/** 長周期地震動観測情報サンプル */
|
|
249
|
+
exports.SAMPLE_LG_OBSERVATION = {
|
|
250
|
+
type: "VXSE62",
|
|
251
|
+
infoType: "発表",
|
|
252
|
+
title: "長周期地震動に関する観測情報",
|
|
253
|
+
reportDateTime: "2024/01/01 00:10:00",
|
|
254
|
+
headline: null,
|
|
255
|
+
publishingOffice: "気象庁",
|
|
256
|
+
earthquake: {
|
|
257
|
+
originTime: "2024/01/01 00:00:00",
|
|
258
|
+
hypocenterName: "石川県能登地方",
|
|
259
|
+
latitude: "北緯37.5度",
|
|
260
|
+
longitude: "東経137.3度",
|
|
261
|
+
depth: "10km",
|
|
262
|
+
magnitude: "7.6",
|
|
263
|
+
},
|
|
264
|
+
maxInt: "7",
|
|
265
|
+
maxLgInt: "4",
|
|
266
|
+
lgCategory: "長周期地震動階級4",
|
|
267
|
+
areas: [
|
|
268
|
+
{ name: "石川県能登", maxInt: "7", maxLgInt: "4" },
|
|
269
|
+
{ name: "新潟県上越", maxInt: "6強", maxLgInt: "3" },
|
|
270
|
+
{ name: "富山県東部", maxInt: "5強", maxLgInt: "2" },
|
|
271
|
+
{ name: "富山県西部", maxInt: "5弱", maxLgInt: "1" },
|
|
272
|
+
],
|
|
273
|
+
isTest: true,
|
|
274
|
+
};
|
|
275
|
+
// ── リテラルフォールバック (フィクスチャが無い場合) ──
|
|
276
|
+
const FALLBACK_EARTHQUAKE_WARNING = {
|
|
277
|
+
type: "VXSE53",
|
|
278
|
+
infoType: "発表",
|
|
279
|
+
title: "震源・震度に関する情報",
|
|
280
|
+
reportDateTime: "2024/01/02 10:00:00",
|
|
281
|
+
headline: "長野県北部で震度4を観測しました。",
|
|
282
|
+
publishingOffice: "気象庁",
|
|
283
|
+
earthquake: {
|
|
284
|
+
originTime: "2024/01/02 09:58:00",
|
|
285
|
+
hypocenterName: "長野県北部",
|
|
286
|
+
latitude: "北緯36.7度",
|
|
287
|
+
longitude: "東経138.0度",
|
|
288
|
+
depth: "10km",
|
|
289
|
+
magnitude: "4.8",
|
|
290
|
+
},
|
|
291
|
+
intensity: {
|
|
292
|
+
maxInt: "4",
|
|
293
|
+
areas: [
|
|
294
|
+
{ name: "長野県北部", intensity: "4" },
|
|
295
|
+
{ name: "長野県中部", intensity: "3" },
|
|
296
|
+
],
|
|
297
|
+
},
|
|
298
|
+
tsunami: { text: "この地震による津波の心配はありません。" },
|
|
299
|
+
isTest: true,
|
|
300
|
+
};
|
|
301
|
+
const FALLBACK_EARTHQUAKE_CANCEL = {
|
|
302
|
+
type: "VXSE53",
|
|
303
|
+
infoType: "取消",
|
|
304
|
+
title: "震源・震度に関する情報",
|
|
305
|
+
reportDateTime: "2024/01/02 10:05:00",
|
|
306
|
+
headline: "先ほどの地震情報を取り消します。",
|
|
307
|
+
publishingOffice: "気象庁",
|
|
308
|
+
isTest: true,
|
|
309
|
+
};
|
|
310
|
+
const FALLBACK_EARTHQUAKE_ENCHI = {
|
|
311
|
+
type: "VXSE53",
|
|
312
|
+
infoType: "発表",
|
|
313
|
+
title: "遠地地震に関する情報",
|
|
314
|
+
reportDateTime: "2024/01/03 08:20:00",
|
|
315
|
+
headline: "日本への津波の影響はありません。",
|
|
316
|
+
publishingOffice: "気象庁",
|
|
317
|
+
earthquake: {
|
|
318
|
+
originTime: "2024/01/03 08:10:00",
|
|
319
|
+
hypocenterName: "台湾付近",
|
|
320
|
+
latitude: "北緯24.0度",
|
|
321
|
+
longitude: "東経121.7度",
|
|
322
|
+
depth: "70km",
|
|
323
|
+
magnitude: "6.9",
|
|
324
|
+
},
|
|
325
|
+
tsunami: { text: "日本への津波の影響はありません。" },
|
|
326
|
+
isTest: true,
|
|
327
|
+
};
|
|
328
|
+
const FALLBACK_EARTHQUAKE_SHINDO = {
|
|
329
|
+
type: "VXSE51",
|
|
330
|
+
infoType: "発表",
|
|
331
|
+
title: "震度速報",
|
|
332
|
+
reportDateTime: "2024/01/04 14:00:00",
|
|
333
|
+
headline: "各地の震度に関する情報です。",
|
|
334
|
+
publishingOffice: "気象庁",
|
|
335
|
+
intensity: {
|
|
336
|
+
maxInt: "5弱",
|
|
337
|
+
areas: [
|
|
338
|
+
{ name: "石川県能登", intensity: "5弱" },
|
|
339
|
+
{ name: "富山県東部", intensity: "4" },
|
|
340
|
+
{ name: "新潟県上越", intensity: "4" },
|
|
341
|
+
],
|
|
342
|
+
},
|
|
343
|
+
isTest: true,
|
|
344
|
+
};
|
|
345
|
+
const FALLBACK_EARTHQUAKE_LG = {
|
|
346
|
+
type: "VXSE53",
|
|
347
|
+
infoType: "発表",
|
|
348
|
+
title: "震源・震度に関する情報",
|
|
349
|
+
reportDateTime: "2024/01/05 19:30:00",
|
|
350
|
+
headline: "関東地方で長周期地震動階級4を観測しました。",
|
|
351
|
+
publishingOffice: "気象庁",
|
|
352
|
+
earthquake: {
|
|
353
|
+
originTime: "2024/01/05 19:27:00",
|
|
354
|
+
hypocenterName: "千葉県北西部",
|
|
355
|
+
latitude: "北緯35.7度",
|
|
356
|
+
longitude: "東経140.1度",
|
|
357
|
+
depth: "80km",
|
|
358
|
+
magnitude: "6.8",
|
|
359
|
+
},
|
|
360
|
+
intensity: {
|
|
361
|
+
maxInt: "5強",
|
|
362
|
+
maxLgInt: "4",
|
|
363
|
+
areas: [
|
|
364
|
+
{ name: "東京都23区", intensity: "5強", lgIntensity: "4" },
|
|
365
|
+
{ name: "千葉県北西部", intensity: "5弱", lgIntensity: "3" },
|
|
366
|
+
{ name: "神奈川県東部", intensity: "4", lgIntensity: "3" },
|
|
367
|
+
],
|
|
368
|
+
},
|
|
369
|
+
tsunami: { text: "この地震による津波の心配はありません。" },
|
|
370
|
+
isTest: true,
|
|
371
|
+
};
|
|
372
|
+
const FALLBACK_EEW_WARNING = {
|
|
373
|
+
type: "VXSE43",
|
|
374
|
+
infoType: "発表",
|
|
375
|
+
title: "緊急地震速報(警報)",
|
|
376
|
+
reportDateTime: "2024/01/02 00:00:05",
|
|
377
|
+
headline: "強い揺れに警戒してください。",
|
|
378
|
+
publishingOffice: "気象庁",
|
|
379
|
+
serial: "1",
|
|
380
|
+
eventId: "20240102000000",
|
|
381
|
+
earthquake: {
|
|
382
|
+
originTime: "2024/01/02 00:00:00",
|
|
383
|
+
hypocenterName: "茨城県南部",
|
|
384
|
+
latitude: "北緯36.0度",
|
|
385
|
+
longitude: "東経140.1度",
|
|
386
|
+
depth: "50km",
|
|
387
|
+
magnitude: "6.5",
|
|
388
|
+
},
|
|
389
|
+
isAssumedHypocenter: false,
|
|
390
|
+
forecastIntensity: {
|
|
391
|
+
areas: [
|
|
392
|
+
{ name: "茨城県南部", intensity: "6弱" },
|
|
393
|
+
{ name: "千葉県北西部", intensity: "5強" },
|
|
394
|
+
],
|
|
395
|
+
maxLgInt: "3",
|
|
396
|
+
},
|
|
397
|
+
isTest: true,
|
|
398
|
+
isWarning: true,
|
|
399
|
+
};
|
|
400
|
+
const FALLBACK_EEW_CANCEL = {
|
|
401
|
+
type: "VXSE45",
|
|
402
|
+
infoType: "取消",
|
|
403
|
+
title: "緊急地震速報(予報)",
|
|
404
|
+
reportDateTime: "2024/01/02 00:00:20",
|
|
405
|
+
headline: "先ほどの緊急地震速報を取り消します。",
|
|
406
|
+
publishingOffice: "気象庁",
|
|
407
|
+
serial: "2",
|
|
408
|
+
eventId: "20240102000000",
|
|
409
|
+
earthquake: {
|
|
410
|
+
originTime: "2024/01/02 00:00:00",
|
|
411
|
+
hypocenterName: "茨城県南部",
|
|
412
|
+
latitude: "北緯36.0度",
|
|
413
|
+
longitude: "東経140.1度",
|
|
414
|
+
depth: "50km",
|
|
415
|
+
magnitude: "6.5",
|
|
416
|
+
},
|
|
417
|
+
isAssumedHypocenter: false,
|
|
418
|
+
isTest: true,
|
|
419
|
+
isWarning: false,
|
|
420
|
+
};
|
|
421
|
+
const FALLBACK_EEW_PLUM = {
|
|
422
|
+
type: "VXSE45",
|
|
423
|
+
infoType: "発表",
|
|
424
|
+
title: "緊急地震速報(予報)",
|
|
425
|
+
reportDateTime: "2024/01/02 00:10:05",
|
|
426
|
+
headline: null,
|
|
427
|
+
publishingOffice: "気象庁",
|
|
428
|
+
serial: "1",
|
|
429
|
+
eventId: "20240102001000",
|
|
430
|
+
earthquake: {
|
|
431
|
+
originTime: "",
|
|
432
|
+
hypocenterName: "能登地方",
|
|
433
|
+
latitude: "",
|
|
434
|
+
longitude: "",
|
|
435
|
+
depth: "",
|
|
436
|
+
magnitude: "",
|
|
437
|
+
},
|
|
438
|
+
isAssumedHypocenter: true,
|
|
439
|
+
maxIntChangeReason: 9,
|
|
440
|
+
forecastIntensity: {
|
|
441
|
+
areas: [
|
|
442
|
+
{ name: "石川県能登", intensity: "5強", isPlum: true },
|
|
443
|
+
{ name: "富山県東部", intensity: "5弱", isPlum: true, hasArrived: true },
|
|
444
|
+
],
|
|
445
|
+
},
|
|
446
|
+
isTest: true,
|
|
447
|
+
isWarning: false,
|
|
448
|
+
};
|
|
449
|
+
const FALLBACK_EEW_FINAL = {
|
|
450
|
+
type: "VXSE45",
|
|
451
|
+
infoType: "発表",
|
|
452
|
+
title: "緊急地震速報(予報)",
|
|
453
|
+
reportDateTime: "2024/01/02 00:12:00",
|
|
454
|
+
headline: null,
|
|
455
|
+
publishingOffice: "気象庁",
|
|
456
|
+
serial: "5",
|
|
457
|
+
eventId: "20240102001000",
|
|
458
|
+
earthquake: {
|
|
459
|
+
originTime: "2024/01/02 00:11:52",
|
|
460
|
+
hypocenterName: "福島県沖",
|
|
461
|
+
latitude: "北緯37.4度",
|
|
462
|
+
longitude: "東経141.7度",
|
|
463
|
+
depth: "40km",
|
|
464
|
+
magnitude: "5.9",
|
|
465
|
+
},
|
|
466
|
+
isAssumedHypocenter: false,
|
|
467
|
+
forecastIntensity: {
|
|
468
|
+
areas: [
|
|
469
|
+
{ name: "福島県浜通り", intensity: "4" },
|
|
470
|
+
{ name: "宮城県南部", intensity: "4" },
|
|
471
|
+
],
|
|
472
|
+
},
|
|
473
|
+
nextAdvisory: "この情報をもって、緊急地震速報を終了します。",
|
|
474
|
+
isTest: true,
|
|
475
|
+
isWarning: false,
|
|
476
|
+
};
|
|
477
|
+
const FALLBACK_TSUNAMI_MAJOR = {
|
|
478
|
+
type: "VTSE41",
|
|
479
|
+
infoType: "発表",
|
|
480
|
+
title: "大津波警報・津波警報・津波注意報",
|
|
481
|
+
reportDateTime: "2024/01/02 03:00:00",
|
|
482
|
+
headline: "大津波警報を発表しました。",
|
|
483
|
+
publishingOffice: "気象庁",
|
|
484
|
+
forecast: [
|
|
485
|
+
{
|
|
486
|
+
areaName: "北海道太平洋沿岸東部",
|
|
487
|
+
kind: "大津波警報",
|
|
488
|
+
maxHeightDescription: "5m",
|
|
489
|
+
firstHeight: "到達と推定",
|
|
490
|
+
},
|
|
491
|
+
],
|
|
492
|
+
earthquake: {
|
|
493
|
+
originTime: "2024/01/02 02:55:00",
|
|
494
|
+
hypocenterName: "千島列島",
|
|
495
|
+
latitude: "北緯44.0度",
|
|
496
|
+
longitude: "東経149.0度",
|
|
497
|
+
depth: "30km",
|
|
498
|
+
magnitude: "8.4",
|
|
499
|
+
},
|
|
500
|
+
warningComment: "海岸や川沿いから直ちに避難してください。",
|
|
501
|
+
isTest: true,
|
|
502
|
+
};
|
|
503
|
+
const FALLBACK_TSUNAMI_ADVISORY = {
|
|
504
|
+
type: "VTSE41",
|
|
505
|
+
infoType: "発表",
|
|
506
|
+
title: "大津波警報・津波警報・津波注意報",
|
|
507
|
+
reportDateTime: "2024/01/02 04:00:00",
|
|
508
|
+
headline: "津波注意報を発表しました。",
|
|
509
|
+
publishingOffice: "気象庁",
|
|
510
|
+
forecast: [
|
|
511
|
+
{
|
|
512
|
+
areaName: "伊豆諸島",
|
|
513
|
+
kind: "津波注意報",
|
|
514
|
+
maxHeightDescription: "1m",
|
|
515
|
+
firstHeight: "02日04時20分",
|
|
516
|
+
},
|
|
517
|
+
],
|
|
518
|
+
earthquake: {
|
|
519
|
+
originTime: "2024/01/02 03:56:00",
|
|
520
|
+
hypocenterName: "八丈島東方沖",
|
|
521
|
+
latitude: "北緯33.4度",
|
|
522
|
+
longitude: "東経141.8度",
|
|
523
|
+
depth: "50km",
|
|
524
|
+
magnitude: "6.8",
|
|
525
|
+
},
|
|
526
|
+
warningComment: "海の中では速い流れに注意してください。",
|
|
527
|
+
isTest: true,
|
|
528
|
+
};
|
|
529
|
+
const FALLBACK_TSUNAMI_CANCEL = {
|
|
530
|
+
type: "VTSE41",
|
|
531
|
+
infoType: "取消",
|
|
532
|
+
title: "大津波警報・津波警報・津波注意報",
|
|
533
|
+
reportDateTime: "2024/01/02 04:30:00",
|
|
534
|
+
headline: "津波警報等を解除しました。",
|
|
535
|
+
publishingOffice: "気象庁",
|
|
536
|
+
warningComment: "現在、津波の心配はありません。",
|
|
537
|
+
isTest: true,
|
|
538
|
+
};
|
|
539
|
+
const FALLBACK_TSUNAMI_OBS = {
|
|
540
|
+
type: "VTSE51",
|
|
541
|
+
infoType: "発表",
|
|
542
|
+
title: "津波情報",
|
|
543
|
+
reportDateTime: "2024/01/02 05:00:00",
|
|
544
|
+
headline: "津波を観測しました。",
|
|
545
|
+
publishingOffice: "気象庁",
|
|
546
|
+
forecast: [
|
|
547
|
+
{
|
|
548
|
+
areaName: "宮城県",
|
|
549
|
+
kind: "津波警報",
|
|
550
|
+
maxHeightDescription: "3m",
|
|
551
|
+
firstHeight: "到達",
|
|
552
|
+
},
|
|
553
|
+
],
|
|
554
|
+
observations: [
|
|
555
|
+
{
|
|
556
|
+
name: "石巻沖GPS波浪計",
|
|
557
|
+
sensor: "GPS波浪計",
|
|
558
|
+
arrivalTime: "02日04時58分",
|
|
559
|
+
initial: "第1波到達",
|
|
560
|
+
maxHeightCondition: "1.2m観測中",
|
|
561
|
+
},
|
|
562
|
+
],
|
|
563
|
+
earthquake: {
|
|
564
|
+
originTime: "2024/01/02 04:50:00",
|
|
565
|
+
hypocenterName: "三陸沖",
|
|
566
|
+
latitude: "北緯38.2度",
|
|
567
|
+
longitude: "東経143.5度",
|
|
568
|
+
depth: "20km",
|
|
569
|
+
magnitude: "7.7",
|
|
570
|
+
},
|
|
571
|
+
warningComment: "今後さらに高い津波が到達するおそれがあります。",
|
|
572
|
+
isTest: true,
|
|
573
|
+
};
|
|
574
|
+
const FALLBACK_TSUNAMI_OFFSHORE = {
|
|
575
|
+
type: "VTSE52",
|
|
576
|
+
infoType: "発表",
|
|
577
|
+
title: "沖合の津波観測に関する情報",
|
|
578
|
+
reportDateTime: "2024/01/02 05:20:00",
|
|
579
|
+
headline: "沖合で津波を観測しました。",
|
|
580
|
+
publishingOffice: "気象庁",
|
|
581
|
+
forecast: [
|
|
582
|
+
{
|
|
583
|
+
areaName: "岩手県",
|
|
584
|
+
kind: "津波警報",
|
|
585
|
+
maxHeightDescription: "3m",
|
|
586
|
+
firstHeight: "到達",
|
|
587
|
+
},
|
|
588
|
+
],
|
|
589
|
+
estimations: [
|
|
590
|
+
{
|
|
591
|
+
areaName: "岩手県",
|
|
592
|
+
maxHeightDescription: "3m",
|
|
593
|
+
firstHeight: "02日05時35分",
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
areaName: "宮城県",
|
|
597
|
+
maxHeightDescription: "2m",
|
|
598
|
+
firstHeight: "02日05時40分",
|
|
599
|
+
},
|
|
600
|
+
],
|
|
601
|
+
warningComment: "沿岸では引き続き警戒してください。",
|
|
602
|
+
isTest: true,
|
|
603
|
+
};
|
|
604
|
+
const FALLBACK_SEISMIC_TEXT_CANCEL = {
|
|
605
|
+
type: "VXSE60",
|
|
606
|
+
infoType: "取消",
|
|
607
|
+
title: "地震回数に関する情報",
|
|
608
|
+
reportDateTime: "2024/01/02 12:30:00",
|
|
609
|
+
headline: "先ほどの情報を取り消します。",
|
|
610
|
+
publishingOffice: "気象庁",
|
|
611
|
+
bodyText: "先ほど発表した地震回数に関する情報は取り消します。",
|
|
612
|
+
isTest: true,
|
|
613
|
+
};
|
|
614
|
+
const FALLBACK_NANKAI_CAUTION = {
|
|
615
|
+
type: "VYSE50",
|
|
616
|
+
infoType: "発表",
|
|
617
|
+
title: "南海トラフ地震臨時情報",
|
|
618
|
+
reportDateTime: "2024/01/02 06:00:00",
|
|
619
|
+
headline: "南海トラフ地震臨時情報(巨大地震注意)を発表しました。",
|
|
620
|
+
publishingOffice: "気象庁",
|
|
621
|
+
infoSerial: { name: "巨大地震注意", code: "130" },
|
|
622
|
+
bodyText: "南海トラフ沿いで規模の大きな地震が発生しました。\n今後の地震活動に注意してください。",
|
|
623
|
+
nextAdvisory: "今後の情報に注意してください。",
|
|
624
|
+
isTest: true,
|
|
625
|
+
};
|
|
626
|
+
const FALLBACK_NANKAI_CLOSED = {
|
|
627
|
+
type: "VYSE50",
|
|
628
|
+
infoType: "発表",
|
|
629
|
+
title: "南海トラフ地震臨時情報",
|
|
630
|
+
reportDateTime: "2024/01/02 09:00:00",
|
|
631
|
+
headline: "南海トラフ地震臨時情報(調査終了)を発表しました。",
|
|
632
|
+
publishingOffice: "気象庁",
|
|
633
|
+
infoSerial: { name: "調査終了", code: "190" },
|
|
634
|
+
bodyText: "今回の地震について調査した結果、特段の防災対応をとるべき状況ではありません。",
|
|
635
|
+
isTest: true,
|
|
636
|
+
};
|
|
637
|
+
const FALLBACK_LG_OBS_3 = {
|
|
638
|
+
type: "VXSE62",
|
|
639
|
+
infoType: "発表",
|
|
640
|
+
title: "長周期地震動に関する観測情報",
|
|
641
|
+
reportDateTime: "2024/01/02 00:20:00",
|
|
642
|
+
headline: null,
|
|
643
|
+
publishingOffice: "気象庁",
|
|
644
|
+
earthquake: {
|
|
645
|
+
originTime: "2024/01/02 00:15:00",
|
|
646
|
+
hypocenterName: "東京湾",
|
|
647
|
+
latitude: "北緯35.5度",
|
|
648
|
+
longitude: "東経139.8度",
|
|
649
|
+
depth: "70km",
|
|
650
|
+
magnitude: "6.1",
|
|
651
|
+
},
|
|
652
|
+
maxInt: "4",
|
|
653
|
+
maxLgInt: "3",
|
|
654
|
+
lgCategory: "長周期地震動階級3",
|
|
655
|
+
areas: [
|
|
656
|
+
{ name: "東京都23区", maxInt: "4", maxLgInt: "3" },
|
|
657
|
+
{ name: "神奈川県東部", maxInt: "4", maxLgInt: "2" },
|
|
658
|
+
],
|
|
659
|
+
comment: "高層ビルでは大きな揺れを感じることがあります。",
|
|
660
|
+
isTest: true,
|
|
661
|
+
};
|
|
662
|
+
const FALLBACK_LG_OBS_2 = {
|
|
663
|
+
type: "VXSE62",
|
|
664
|
+
infoType: "発表",
|
|
665
|
+
title: "長周期地震動に関する観測情報",
|
|
666
|
+
reportDateTime: "2024/01/02 00:40:00",
|
|
667
|
+
headline: null,
|
|
668
|
+
publishingOffice: "気象庁",
|
|
669
|
+
earthquake: {
|
|
670
|
+
originTime: "2024/01/02 00:36:00",
|
|
671
|
+
hypocenterName: "大阪府北部",
|
|
672
|
+
latitude: "北緯34.8度",
|
|
673
|
+
longitude: "東経135.5度",
|
|
674
|
+
depth: "15km",
|
|
675
|
+
magnitude: "5.4",
|
|
676
|
+
},
|
|
677
|
+
maxInt: "3",
|
|
678
|
+
maxLgInt: "2",
|
|
679
|
+
lgCategory: "長周期地震動階級2",
|
|
680
|
+
areas: [
|
|
681
|
+
{ name: "大阪府北部", maxInt: "3", maxLgInt: "2" },
|
|
682
|
+
{ name: "兵庫県南東部", maxInt: "3", maxLgInt: "1" },
|
|
683
|
+
],
|
|
684
|
+
isTest: true,
|
|
685
|
+
};
|
|
686
|
+
// ── ヘルパー: フィクスチャ優先でデータ取得 ──
|
|
687
|
+
function earthquakeFromFixture(filename) {
|
|
688
|
+
return fromFixture(filename, telegram_parser_1.parseEarthquakeTelegram);
|
|
689
|
+
}
|
|
690
|
+
function eewFromFixture(filename) {
|
|
691
|
+
return fromFixture(filename, telegram_parser_1.parseEewTelegram);
|
|
692
|
+
}
|
|
693
|
+
function tsunamiFromFixture(filename) {
|
|
694
|
+
return fromFixture(filename, telegram_parser_1.parseTsunamiTelegram);
|
|
695
|
+
}
|
|
696
|
+
function seismicTextFromFixture(filename) {
|
|
697
|
+
return fromFixture(filename, telegram_parser_1.parseSeismicTextTelegram);
|
|
698
|
+
}
|
|
699
|
+
function nankaiFromFixture(filename) {
|
|
700
|
+
return fromFixture(filename, telegram_parser_1.parseNankaiTroughTelegram);
|
|
701
|
+
}
|
|
702
|
+
function lgObsFromFixture(filename) {
|
|
703
|
+
return fromFixture(filename, telegram_parser_1.parseLgObservationTelegram);
|
|
704
|
+
}
|
|
705
|
+
// ── テスト表示ディスパッチマップ ──
|
|
706
|
+
/** テスト表示マップ (バリエーション番号付き) */
|
|
707
|
+
exports.TEST_TABLES = {
|
|
708
|
+
earthquake: {
|
|
709
|
+
label: "地震情報",
|
|
710
|
+
variants: [
|
|
711
|
+
{
|
|
712
|
+
label: "震源・震度情報(震度7・critical)",
|
|
713
|
+
run: () => (0, earthquake_formatter_1.displayEarthquakeInfo)(exports.SAMPLE_EARTHQUAKE),
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
label: "震源・震度情報(震度4・warning)",
|
|
717
|
+
run: () => (0, earthquake_formatter_1.displayEarthquakeInfo)(earthquakeFromFixture(FIX_VXSE53_DRILL_1) ??
|
|
718
|
+
FALLBACK_EARTHQUAKE_WARNING),
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
label: "取消",
|
|
722
|
+
run: () => (0, earthquake_formatter_1.displayEarthquakeInfo)(earthquakeFromFixture(FIX_VXSE53_CANCEL) ??
|
|
723
|
+
FALLBACK_EARTHQUAKE_CANCEL),
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
label: "遠地地震",
|
|
727
|
+
run: () => (0, earthquake_formatter_1.displayEarthquakeInfo)(earthquakeFromFixture(FIX_VXSE53_ENCHI) ??
|
|
728
|
+
FALLBACK_EARTHQUAKE_ENCHI),
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
label: "震度速報(震源未確定)",
|
|
732
|
+
run: () => (0, earthquake_formatter_1.displayEarthquakeInfo)(earthquakeFromFixture(FIX_VXSE51_SHINDO) ??
|
|
733
|
+
FALLBACK_EARTHQUAKE_SHINDO),
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
label: "長周期地震動階級付き",
|
|
737
|
+
run: () => (0, earthquake_formatter_1.displayEarthquakeInfo)(FALLBACK_EARTHQUAKE_LG),
|
|
738
|
+
},
|
|
739
|
+
],
|
|
740
|
+
},
|
|
741
|
+
eew: {
|
|
742
|
+
label: "緊急地震速報",
|
|
743
|
+
variants: [
|
|
744
|
+
{
|
|
745
|
+
label: "予報",
|
|
746
|
+
run: () => (0, eew_formatter_1.displayEewInfo)(exports.SAMPLE_EEW, { activeCount: 1, colorIndex: 0 }),
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
label: "警報(critical)",
|
|
750
|
+
run: () => (0, eew_formatter_1.displayEewInfo)(eewFromFixture(FIX_VXSE43_WARNING_S1) ?? FALLBACK_EEW_WARNING, { activeCount: 1, colorIndex: 0 }),
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
label: "取消",
|
|
754
|
+
run: () => (0, eew_formatter_1.displayEewInfo)(eewFromFixture(FIX_VXSE45_CANCEL) ?? FALLBACK_EEW_CANCEL, { activeCount: 1, colorIndex: 0 }),
|
|
755
|
+
},
|
|
756
|
+
{
|
|
757
|
+
label: "PLUM法(仮定震源要素)",
|
|
758
|
+
run: () => (0, eew_formatter_1.displayEewInfo)(eewFromFixture(FIX_VXSE45_PLUM) ?? FALLBACK_EEW_PLUM, { activeCount: 1, colorIndex: 0 }),
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
label: "最終報",
|
|
762
|
+
run: () => (0, eew_formatter_1.displayEewInfo)(eewFromFixture(FIX_VXSE45_FINAL) ?? FALLBACK_EEW_FINAL, { activeCount: 1, colorIndex: 0 }),
|
|
763
|
+
},
|
|
764
|
+
],
|
|
765
|
+
},
|
|
766
|
+
tsunami: {
|
|
767
|
+
label: "津波情報",
|
|
768
|
+
variants: [
|
|
769
|
+
{
|
|
770
|
+
label: "津波警報(warning)",
|
|
771
|
+
run: () => (0, earthquake_formatter_1.displayTsunamiInfo)(exports.SAMPLE_TSUNAMI),
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
label: "大津波警報(critical)",
|
|
775
|
+
run: () => (0, earthquake_formatter_1.displayTsunamiInfo)(tsunamiFromFixture(FIX_VTSE41_WARN) ?? FALLBACK_TSUNAMI_MAJOR),
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
label: "津波注意報(normal)",
|
|
779
|
+
run: () => (0, earthquake_formatter_1.displayTsunamiInfo)(FALLBACK_TSUNAMI_ADVISORY),
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
label: "取消",
|
|
783
|
+
run: () => (0, earthquake_formatter_1.displayTsunamiInfo)(tsunamiFromFixture(FIX_VTSE41_CANCEL) ?? FALLBACK_TSUNAMI_CANCEL),
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
label: "観測情報(VTSE51)",
|
|
787
|
+
run: () => (0, earthquake_formatter_1.displayTsunamiInfo)(tsunamiFromFixture(FIX_VTSE51_INFO) ?? FALLBACK_TSUNAMI_OBS),
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
label: "沖合観測情報(VTSE52)",
|
|
791
|
+
run: () => (0, earthquake_formatter_1.displayTsunamiInfo)(tsunamiFromFixture(FIX_VTSE52_OFFSHORE) ??
|
|
792
|
+
FALLBACK_TSUNAMI_OFFSHORE),
|
|
793
|
+
},
|
|
794
|
+
],
|
|
795
|
+
},
|
|
796
|
+
seismicText: {
|
|
797
|
+
label: "地震活動テキスト",
|
|
798
|
+
variants: [
|
|
799
|
+
{
|
|
800
|
+
label: "通常発表",
|
|
801
|
+
run: () => (0, earthquake_formatter_1.displaySeismicTextInfo)(exports.SAMPLE_SEISMIC_TEXT),
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
label: "取消",
|
|
805
|
+
run: () => (0, earthquake_formatter_1.displaySeismicTextInfo)(seismicTextFromFixture(FIX_VXSE60_CANCEL) ??
|
|
806
|
+
FALLBACK_SEISMIC_TEXT_CANCEL),
|
|
807
|
+
},
|
|
808
|
+
],
|
|
809
|
+
},
|
|
810
|
+
nankaiTrough: {
|
|
811
|
+
label: "南海トラフ情報",
|
|
812
|
+
variants: [
|
|
813
|
+
{
|
|
814
|
+
label: "調査中(コード120・critical)",
|
|
815
|
+
run: () => (0, earthquake_formatter_1.displayNankaiTroughInfo)(exports.SAMPLE_NANKAI_TROUGH),
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
label: "巨大地震注意(コード130・warning)",
|
|
819
|
+
run: () => (0, earthquake_formatter_1.displayNankaiTroughInfo)(nankaiFromFixture(FIX_VYSE50_CAUTION) ?? FALLBACK_NANKAI_CAUTION),
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
label: "調査終了(コード190・info)",
|
|
823
|
+
run: () => (0, earthquake_formatter_1.displayNankaiTroughInfo)(nankaiFromFixture(FIX_VYSE50_CLOSED) ?? FALLBACK_NANKAI_CLOSED),
|
|
824
|
+
},
|
|
825
|
+
],
|
|
826
|
+
},
|
|
827
|
+
lgObservation: {
|
|
828
|
+
label: "長周期地震動観測",
|
|
829
|
+
variants: [
|
|
830
|
+
{
|
|
831
|
+
label: "長周期階級4(critical)",
|
|
832
|
+
run: () => (0, earthquake_formatter_1.displayLgObservationInfo)(exports.SAMPLE_LG_OBSERVATION),
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
label: "長周期階級3(warning)",
|
|
836
|
+
run: () => (0, earthquake_formatter_1.displayLgObservationInfo)(lgObsFromFixture(FIX_VXSE62_LGOBS) ?? FALLBACK_LG_OBS_3),
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
label: "長周期階級2(normal)",
|
|
840
|
+
run: () => (0, earthquake_formatter_1.displayLgObservationInfo)(FALLBACK_LG_OBS_2),
|
|
841
|
+
},
|
|
842
|
+
],
|
|
843
|
+
},
|
|
844
|
+
volcano: {
|
|
845
|
+
label: "火山情報",
|
|
846
|
+
variants: volcanoVariants(),
|
|
847
|
+
},
|
|
848
|
+
};
|
|
849
|
+
// ── 火山テストバリエーション ──
|
|
850
|
+
function volcanoVariants() {
|
|
851
|
+
const fixtures = [
|
|
852
|
+
{ file: "45_01_01_200522_VFVO50.xml", label: "噴火警報(Lv3引上げ)" },
|
|
853
|
+
{ file: "45_02_01_200522_VFVO50.xml", label: "噴火警報(Lv5引上げ)" },
|
|
854
|
+
{ file: "67_01_01_140927_VFVO56.xml", label: "噴火速報" },
|
|
855
|
+
{ file: "43_01_01_200522_VFVO52.xml", label: "火山観測報(噴火)" },
|
|
856
|
+
{ file: "66_01_02_210514_VFVO54.xml", label: "降灰予報(速報)" },
|
|
857
|
+
{ file: "66_01_03_210514_VFVO55.xml", label: "降灰予報(詳細)" },
|
|
858
|
+
{ file: "46_01_01_170103_VFSVii.xml", label: "海上警報" },
|
|
859
|
+
{ file: "79_01_01_210527_VFVO60.xml", label: "推定噴煙流向報" },
|
|
860
|
+
{ file: "42_02_01_071130_VZVO40.xml", label: "火山に関するお知らせ" },
|
|
861
|
+
];
|
|
862
|
+
const tempState = new volcano_state_1.VolcanoStateHolder();
|
|
863
|
+
return fixtures.map(({ file, label }) => ({
|
|
864
|
+
label,
|
|
865
|
+
run: () => {
|
|
866
|
+
const msg = loadFixture(file);
|
|
867
|
+
if (!msg) {
|
|
868
|
+
console.log(` フィクスチャが見つかりません: ${file}`);
|
|
869
|
+
return;
|
|
870
|
+
}
|
|
871
|
+
const info = (0, volcano_parser_1.parseVolcanoTelegram)(msg);
|
|
872
|
+
if (!info) {
|
|
873
|
+
console.log(` パースに失敗しました: ${file}`);
|
|
874
|
+
return;
|
|
875
|
+
}
|
|
876
|
+
const presentation = (0, volcano_presentation_1.resolveVolcanoPresentation)(info, tempState);
|
|
877
|
+
(0, volcano_formatter_1.displayVolcanoInfo)(info, presentation);
|
|
878
|
+
},
|
|
879
|
+
}));
|
|
880
|
+
}
|