-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathweatherForecaster.html
767 lines (675 loc) · 30.6 KB
/
weatherForecaster.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="An advanced weather forecaster for fishing research." />
<meta name="author" content="Carbuncle Plushy (Balmung)" />
<link rel="icon" type="image/png" href="favicon.png" />
<title>FFX|V Weather Forecaster</title>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XYY4Q1MGX8"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XYY4Q1MGX8');
</script>
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.11/semantic.css" /> -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.9.1/underscore-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dot/1.1.3/doT.min.js"></script>
<script src="public/js/lib/dateFns/2.25.0/dateFns.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.9.0/semantic.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.9.0/semantic.min.js"></script>
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.11/semantic.min.js"></script> -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/6.5.2/rxjs.umd.min.js"></script>
<link rel="stylesheet" href="public/images/sprite.css" />
<!-- Spinner Control (http://jsfiddle.net/cqkr7z1h/4/) -->
<!--
<div class="ui form segment">
<div class="field">
<label for="number">Number</label>
<div class="ui spinner input">
<input type="text" id="number" name="number" placeholder="Number" value="2" />
<div class="ui vertical buttons">
<button type="button" class="ui spinner up icon button">
<i class="chevron up icon"></i>
</button>
<button type="button" class="ui spinner down icon button">
<i class="chevron down icon"></i>
</button>
</div>
</div>
</div>
</div>
-->
<script type="text/javascript">
/*
Fuel UX Spinner
https://github.com/ExactTarget/fuelux *
Copyright (c) 2012 ExactTarget
Licensed under the MIT license. */
! function ($) {
"use strict"; // jshint ;_;
var old = $.fn.spinner;
// SPINNER CONSTRUCTOR AND PROTOTYPE
var Spinner = function (element, options) {
this.$element = $(element);
this.options = $.extend({}, $.fn.spinner.defaults, options);
this.$input = this.$element.find('input');
this.$element.on('keyup', this.$input, $.proxy(this.change, this));
this.$element.on('keydown', this.$input, $.proxy(this.keydown, this));
if (this.options.hold) {
this.$element.on('mousedown', '.spinner.up', $.proxy(function () {
this.startSpin(true);
}, this));
this.$element.on('mouseup', '.spinner.up, .spinner.down', $.proxy(this.stopSpin, this));
this.$element.on('mouseout', '.spinner.up, .spinner.down', $.proxy(this.stopSpin, this));
this.$element.on('mousedown', '.spinner.down', $.proxy(function () {
this.startSpin(false);
}, this));
} else {
this.$element.on('click', '.spinner.up', $.proxy(function () {
this.step(true);
}, this));
this.$element.on('click', '.spinner.down', $.proxy(function () {
this.step(false);
}, this));
}
// this.$element.find('.spinner.up, .spinner.down').attr('tabIndex', -1);
this.switches = {
count: 1,
enabled: true
};
if (this.options.speed === 'medium') {
this.switches.speed = 300;
} else if (this.options.speed === 'fast') {
this.switches.speed = 100;
} else {
this.switches.speed = 500;
}
this.lastValue = null;
this.render();
if (this.options.disabled) {
this.disable();
}
};
Spinner.prototype = {
constructor: Spinner,
render: function () {
var inputValue = this.$input.val();
if (inputValue) {
this.value(inputValue);
} else {
this.$input.val(this.options.value);
}
this.$input.attr('maxlength', (this.options.max + '').split('').length);
},
change: function () {
var newVal = this.$input.val();
if (newVal / 1) {
this.options.value = newVal / 1;
} else {
newVal = newVal.replace(/[^0-9]/g, '') || '';
this.$input.val(newVal);
this.options.value = newVal / 1;
}
this.triggerChangedEvent();
},
stopSpin: function () {
if (this.switches.timeout !== undefined) {
clearTimeout(this.switches.timeout);
this.switches.count = 1;
this.triggerChangedEvent();
}
},
triggerChangedEvent: function () {
var currentValue = this.value();
if (currentValue === this.lastValue) return;
this.lastValue = currentValue;
// Primary changed event
this.$element.trigger('changed', currentValue);
// Undocumented, kept for backward compatibility
this.$element.trigger('change');
},
startSpin: function (type) {
if (!this.options.disabled) {
var divisor = this.switches.count;
if (divisor === 1) {
this.step(type);
divisor = 1;
} else if (divisor < 3) {
divisor = 1.5;
} else if (divisor < 8) {
divisor = 2.5;
} else {
divisor = 4;
}
this.switches.timeout = setTimeout($.proxy(function () {
this.iterator(type);
}, this), this.switches.speed / divisor);
this.switches.count++;
}
},
iterator: function (type) {
this.step(type);
this.startSpin(type);
},
step: function (dir) {
var curValue = this.options.value;
var limValue = dir ? this.options.max : this.options.min;
var digits, multiple;
if ((dir ? curValue < limValue : curValue > limValue)) {
var newVal = curValue + (dir ? 1 : -1) * this.options.step;
if (this.options.step % 1 !== 0) {
digits = (this.options.step + '').split('.')[1].length;
multiple = Math.pow(10, digits);
newVal = Math.round(newVal * multiple) / multiple;
}
if (dir ? newVal > limValue : newVal < limValue) {
this.value(limValue);
} else {
this.value(newVal);
}
} else if (this.options.cycle) {
var cycleVal = dir ? this.options.min : this.options.max;
this.value(cycleVal);
}
},
value: function (value) {
if (!isNaN(parseFloat(value)) && isFinite(value)) {
value = parseFloat(value);
this.options.value = value;
this.$input.val(value);
return this;
} else {
return this.options.value;
}
},
disable: function () {
this.options.disabled = true;
this.$input.attr('disabled', '');
this.$element.find('button').addClass('disabled');
},
enable: function () {
this.options.disabled = false;
this.$input.removeAttr("disabled");
this.$element.find('button').removeClass('disabled');
},
keydown: function (event) {
var keyCode = event.keyCode;
if (keyCode === 38) {
this.step(true);
} else if (keyCode === 40) {
this.step(false);
}
}
};
// SPINNER PLUGIN DEFINITION
$.fn.spinner = function (option) {
var args = Array.prototype.slice.call(arguments, 1);
var methodReturn;
var $set = this.each(function () {
var $this = $(this);
var data = $this.data('spinner');
var options = typeof option === 'object' && option;
if (!data) $this.data('spinner', (data = new Spinner(this, options)));
if (typeof option === 'string') methodReturn = data[option].apply(data, args);
});
return (methodReturn === undefined) ? $set : methodReturn;
};
$.fn.spinner.defaults = {
value: 1,
min: 1,
max: 999,
step: 1,
hold: true,
speed: 'medium',
disabled: false
};
$.fn.spinner.Constructor = Spinner;
$.fn.spinner.noConflict = function () {
$.fn.spinner = old;
return this;
};
// SPINNER DATA-API
$(function () {
$('body').on('mousedown.spinner.data-api', '.spinner.button', function () {
var $this = $(this);
if ($this.data('spinner')) return;
$this.spinner($this.data());
});
});
}(window.jQuery);
</script>
<style type="text/css">
.ui.spinner.input input {
border-top-right-radius: 0 !important;
border-bottom-right-radius: 0 !important;
}
.ui.spinner.input .button.disabled {
cursor: not-allowed;
}
.ui.spinner.input .ui.icon.buttons .button {
/* background-color: #fff;
border: 1px solid rgba(34, 36, 38, 0.15); */
border-left: none;
padding: .2em .3em .2em;
/* height: 21px; */
}
.ui.spinner.input .spinner.up.button {
border-bottom: none;
border-top-left-radius: 0;
}
.ui.spinner.input .spinner.down.button {
border-bottom-left-radius: 0;
}
.ui.spinner.input .button .icon {
margin: 0;
}
</style>
<link rel="stylesheet" href="css/semantic_ui_overrides.css" />
<link rel="stylesheet" href="css/overlay.css" />
<link rel="stylesheet" href="css/dark_overlay.css" />
<!-- Localization Support script -->
<script type="text/javascript" src="js/app/localization.js"></script>
<!-- Include the data -->
<script type="text/javascript" src="js/app/data.js"></script>
<script type="text/javascript" src="js/app/time.js"></script>
<script type="text/javascript" src="js/app/weather.js"></script>
<script type="text/javascript" src="/js/app/templates.js?20240619_2325"></script>
<style type="text/css">
span.window-qualifier-text {
font-size: 125%;
font-style: italic;
}
.ui {
transition: none !important;
-webkit-transition: none !important;
}
</style>
<script id="weatherTable-template" type="text/html;x-dot-template">
<tbody>
<tr>
<td></td>
{{~it :weather:idx}}
<td class="weather-to-colheader" data-id="{{=weather.id}}">
<div class="ui middle aligned sprite-icon sprite-icon-weather sprite-icon-weather-{{=weather.icon}}" title="{{=__p(weather,'name')}}"></div>
</td>
{{~}}
</tr>
{{~it :weather:idx}}
<tr>
<td class="weather-from-rowheader" data-id="{{=weather.id}}">
<div class="ui middle aligned sprite-icon sprite-icon-weather sprite-icon-weather-{{=weather.icon}}" title="{{=__p(weather,'name')}}"></div>
</td>
{{~it :weatherB:idxB}}
<td class="center aligned">
<div class="ui icon tiny circular button weather-lookup-button" data-from="{{=weather.id}}" data-to="{{=weatherB.id}}">
<i class="list ul icon"></i>
</div>
</td>
{{~}}
</tr>
{{~}}
<tr>
<td class="weather-from-rowheader" data-id="0"></td>
{{~it :weatherB:idxB}}
<td class="center aligned">
<div class="ui icon tiny circular button weather-lookup-button" data-from="0" data-to="{{=weatherB.id}}">
<i class="list ul icon"></i>
</div>
</td>
{{~}}
</tr>
</tbody>
</script>
<script id="weatherWindows-template" type="text/html;x-dot-template">
{{~it :w:idx}}
<div class="item">
<div class="header">{{=dateFns.format(eorzeaTime.toEarth(w.start), "PPPPpppp")}}</div>
{{=dateFns.format(dateFns.utc.toDate(w.start), "HH:mm")}} - {{=dateFns.format(dateFns.utc.toDate(w.end), "HH:mm")}}
</div>
{{~}}
</script>
<script type="text/javascript">
const { interval } = rxjs;
const { timestamp, skip } = rxjs.operators;
$(() => {
// Main header needs to display the current time.
interval(1000 /*ms*/).pipe(
timestamp()
).subscribe(x => {
// Update the main header's earth and eorzea times.
$("#eorzeaClock").text(dateFns.format(dateFns.utc.toDate(eorzeaTime.toEorzea(x.timestamp)), "HH:mm"));
});
Templates.applyTemplates();
// Initialize the weather service.
weatherService.initializeWeatherTracking();
$nextWindows = $("#nextWindows");
$nextWindowsLabel = $("#nextWindowsLabel");
var weatherWindowsTemplate = doT.template($('#weatherWindows-template').text());
$weatherTable = $('#weatherTable');
var weatherTableTemplate = doT.template($('#weatherTable-template').text());
var territory_id = null;
var territory_name = null;
// Populate the region selector...
var REGION_GROUPS = _(DATA.WEATHER_RATES).chain()
.map((v,k) => _({id: Number(k)}).extend(_(v).pick('region_id', 'zone_id')))
.groupBy('region_id')
.value();
$territory = $('#territory');
// Initialize zone selector.
_(REGION_GROUPS).each((zones, region_id) => {
$('.menu', $territory).append("<div class='header'><span class='localized-region' data-id='" + region_id + "'>" + __p(DATA.REGIONS[Number(region_id)], 'name') + "</span></div>");
_(zones).each((zone) => {
$('.menu', $territory).append("<div class='item' data-value='" + zone.id + "'><span class='localized-zone' data-id='" + zone.zone_id + "'>" + __p(DATA.ZONES[Number(zone.zone_id)], 'name') + "</span></div>");
});
});
// The language selection isn't managed by ViewModel's settings, so we need
// to set the active language here...
$('#languageChoice.dropdown')
.dropdown('set selected', localizationHelper.getLanguage())
.dropdown({
onChange: (value, text, $choice) => localizationHelper.setLanguage(value),
});
localizationHelper.languageChanged.pipe(
skip(1)
).subscribe((x) => {
// Just reload the page... it's easier that way...
window.location.replace(
window.location.origin + window.location.pathname + "?lang=" +
localizationHelper.getLanguage());
});
$maxWindows = $('#maxWindows').spinner({min: 5, max: 20});
$clusterWindows = $('#clusterWindows').first().checkbox();
$timePeriods = $('#times .ui.checkbox').checkbox();
$('#downloadCSV').click(function() {
var file;
var data = ["fromWeather, toWeather, earthTime, eorzeaTimeStart, eorzeaTimeEnd\n"];
var properties = {type: 'text/csv'};
var numWindows = $maxWindows.spinner('value')
var clustered = $clusterWindows.checkbox('is checked');
var possible_weathers = _(DATA.WEATHER_RATES[Number(territory_id)].weather_rates).chain()
.map((v) => v[0])
.sort()
.uniq()
.map((v) => Object({id:v, name:__p(DATA.WEATHER_TYPES[v],'name')}))
.value();
var currentTime = +eorzeaTime.getCurrentEorzeaDate();
_(possible_weathers).each((toWeather) => {
_(possible_weathers.concat([null])).each((fromWeather) => {
var iter = null;
if (fromWeather === null) {
console.log("Getting windows for " + toWeather.name);
var iter = weatherService.findWeatherPattern(currentTime, territory_id, [], [toWeather.id]);
} else {
console.log("Getting windows for " + fromWeather.name + " to " + toWeather.name);
var iter = weatherService.findWeatherPattern(currentTime, territory_id, [fromWeather.id], [toWeather.id]);
}
var rows = [];
while (rows.length < numWindows) {
var _iterItem = iter.next();
if (_iterItem.done) {
console.warn("Stopped iterating early!");
break;
}
var w = _iterItem.value;
rows.push("\"" + (fromWeather === null ? "" : fromWeather.name) + "\",\"" + toWeather.name + "\"," +
new Date(eorzeaTime.toEarth(w.start)).toISOString() + "," +
dateFns.format(dateFns.utc.toDate(w.start), "HH:mm") + "," +
dateFns.format(dateFns.utc.toDate(w.end), "HH:mm") + "\n");
}
data = data.concat(rows);
});
});
try {
file = new File(data, 'weatherForecast.csv', properties);
} catch (e) {
console.info("Falling back to Blob constructor...");
file = new Blob(data, properties);
}
var url = URL.createObjectURL(file);
var downloadElement = document.createElement('a');
downloadElement.setAttribute('href', url);
downloadElement.setAttribute('download', 'weatherForecast.csv');
downloadElement.style.display = 'none';
document.body.appendChild(downloadElement);
downloadElement.click();
document.body.removeChild(downloadElement);
});
$territory.dropdown({
onChange: function(value, text, $selectedItem) {
console.log("Displaying weather for zone", value, ": ", text);
var possible_weathers = _(DATA.WEATHER_RATES[Number(value)].weather_rates).chain()
.map((v) => v[0])
.sort()
.uniq()
.map((v) => _({id:v}).extend(DATA.WEATHER_TYPES[v]))
.value();
$weatherTable.siblings(".placeholder").remove();
$weatherTable.empty();
$weatherTable.append(weatherTableTemplate(possible_weathers));
territory_id = value;
territory_name = text;
$('#downloadCSV').removeClass('disabled');
$('.weather-lookup-button').parents('td').hover(function(event) {
var $this = $('.weather-lookup-button', this)
// console.log("Hovering over:", $this.attr('data-from'), $this.attr('data-to'));
if (event.type == 'mouseenter') {
$('.weather-from-rowheader[data-id='+$this.attr('data-from')+']').css({backgroundColor: 'rgba(0,0,0,0.20)'});
$('.weather-to-colheader[data-id='+$this.attr('data-to')+']').css({backgroundColor: 'rgba(0,0,0,0.20)'});
} else {
$('.weather-from-rowheader[data-id='+$this.attr('data-from')+']').css({backgroundColor: ''});
$('.weather-to-colheader[data-id='+$this.attr('data-to')+']').css({backgroundColor: ''});
}
});
$('.weather-lookup-button').click(function() {
var $this = $(this);
var prevWeatherSet = Number($this.attr('data-from'));
var currentWeatherSet = [Number($this.attr('data-to'))];
if (prevWeatherSet != 0) {
prevWeatherSet = [prevWeatherSet];
} else {
prevWeatherSet = [];
}
var numWindows = $maxWindows.spinner('value');
var timePeriods = _.reduce($("input", $timePeriods), (x, e) => {
if (e.checked) { x.push(Number(e.value)); }
return x;
}, []);
// Compute the next 10 instances of this weather transition.
var iter = weatherService.findWeatherPattern(
+eorzeaTime.getCurrentEorzeaDate(),
territory_id,
prevWeatherSet,
currentWeatherSet);
var windows = [];
while (windows.length < numWindows) {
var _iterItem = iter.next();
if (_iterItem.done) {
console.warn("Stopped iterating early!");
break;
}
if (timePeriods.length != 3) {
var w = _iterItem.value;
if (timePeriods.includes(dateFns.utc.getHours(w.start))) {
windows.push(w);
}
} else {
// Don't bother checking, all three choices were entered.
windows.push(_iterItem.value);
}
}
$nextWindows.empty();
var labelText = "Next Windows for <span class='window-qualifier-text'>";
if (prevWeatherSet.length != 0) {
labelText += __p(DATA.WEATHER_TYPES[prevWeatherSet[0]],'name');
labelText += "</span> to <span class='window-qualifier-text'>";
}
labelText += __p(DATA.WEATHER_TYPES[currentWeatherSet[0]],'name');
labelText += "</span> in <span class='window-qualifier-text'>";
labelText += territory_name;
labelText += "</span>";
$nextWindowsLabel.html(labelText);
$nextWindows.append(weatherWindowsTemplate(windows));
});
}
});
let siteTheme = 'dark';
if ('fishTrackerSettings' in window.localStorage) {
siteTheme = JSON.parse(window.localStorage.fishTrackerSettings).theme;
} else if ('theme' in window.localStorage) {
siteTheme = window.localStorage.theme;
}
function applyTheme(theme) {
if (theme === 'dark') {
$('body').addClass('dark');
$('*[data-tooltip]').attr('data-inverted', '');
} else {
$('body').removeClass('dark');
$('*[data-tooltip]').removeAttr('data-inverted');
}
$('.ui.container').toggleClass('inverted', theme === 'dark');
$('.ui.form').toggleClass('inverted', theme === 'dark');
$('.ui.segment').toggleClass('inverted', theme === 'dark');
$('.ui.table').toggleClass('inverted', theme === 'dark');
$('.ui.list').toggleClass('inverted', theme === 'dark');
$('.ui.top.attached.label').toggleClass('black', theme === 'dark');
$('.ui.menu').toggleClass('inverted', theme === 'dark');
$('.ui.placeholder').toggleClass('inverted', theme === 'dark');
}
function themeButtonClicked(e) {
if (e) e.stopPropagation();
let $this = $(this);
let theme = $this.data('theme');
// Apply the theme.
applyTheme(theme);
}
$('#theme-toggle .toggle').on('click', themeButtonClicked);
// Set the theme.
applyTheme(siteTheme);
});
</script>
</head>
<body>
<div id="topmenu" class="ui text top fixed menu">
<div class="ui container">
<div class="header item">FFX|V Weather Forecaster</div>
<div class="ui right borderless menu">
<!-- Eorzea Time (realtime updated) -->
<div class="item" id="eorzeaClock" title="Eorzea Time">##:##</div>
<!-- Light/Dark Mode Toggle (sun/moon) -->
<div class="item" id="theme-toggle" title="Toggle theme">
<span class="toggle dark-mode-toggle" data-theme="dark">🌙</span>
<span class="toggle light-mode-toggle" data-theme="light">☀️</span>
</div>
<!-- Language Selector -->
<div class="ui dropdown item" id="languageChoice">
<input type="hidden" name="language">
<!-- <i class="dropdown icon"></i> -->
<div class="default text" title="Switch language"><i class="flag icon"></i></div>
<div class="ui left mini menu">
<div class="item" data-value="en"><i class="us flag"></i><span class="text">English</span></div>
<div class="item" data-value="ja"><i class="jp flag"></i><span class="text">日本語</span></div>
<div class="item" data-value="de"><i class="de flag"></i><span class="text">Deutsch</span></div>
<div class="item" data-value="fr"><i class="fr flag"></i><span class="text">Français</span></div>
<div class="item" data-value="ko"><i class="kr flag"></i><span class="text">한국어</span></div>
</div>
</div>
</div>
</div>
</div>
<div class="ui main container">
<h1>FFX|V Weather Forecaster</h1>
<div class="ui basic form segment">
<div class="fields">
<div class="seven wide field" style="flex-grow: 7;">
<label>Zone</label>
<div class="ui fluid search selection dropdown" id="territory">
<input type="hidden" name="territory" />
<i class="dropdown icon"></i>
<div class="default text">Select Zone</div>
<div class="menu"></div>
</div>
</div>
<div class="two wide field" style="flex-shrink: 2;">
<label>Max Windows</label>
<div class="ui spinner input" id="maxWindows">
<input type="text" value="10" name="maxWindows" autocomplete="off" />
<div class="ui vertical icon buttons">
<div class="ui spinner up icon button">
<i class="chevron up icon"></i>
</div>
<div class="ui spinner down icon button">
<i class="chevron down icon"></i>
</div>
</div>
</div>
</div>
<div class="three wide field" style="flex-shrink: 3;">
<label> </label>
<div class="ui checkbox disabled" id="clusterWindows">
<input type="checkbox" name="clusterWindows" />
<label>Cluster Windows</label>
</div>
</div>
<div class="four wide field" style="flex: 1 1 0;">
<label> </label>
<div class="ui labeled icon button disabled" id="downloadCSV">
<i class="download icon"></i>
Download <abbr title="Comma Seprated Values format">CSV</abbr>
</div>
</div>
</div>
</div>
<!-- <div class="ui grid">
<div class="nine wide column"> -->
<div style="display: flex;">
<div style="width: fit-contents !important; padding: 0.5em;">
<div class="ui segment">
<div class="ui top attached label">Weather Transitions</div>
<div class="ui placeholder header">Please select a zone first.</div>
<table id="weatherTable" class="ui very compact collapsing celled table">
</table>
</div>
</div>
<!-- <div class="seven wide column"> -->
<div style="flex-grow: 10; padding: 0.5em;">
<div class="ui segment">
<div class="ui top attached label" id="nextWindowsLabel">Next Windows for Weather</div>
<div class="ui fluid container">
<div class="ui basic form segment" style="padding-left: inherit; padding-right: inherit; padding-bottom: inherit;">
<div class="fields">
<div class="sixteen wide field" id="times">
<label>Time Periods</label>
<div class="inline fields">
<div class="ui field checkbox checked" style="float: left; margin-right: 1rem;">
<input type="checkbox" name="timePeriods" checked="checked" class="hidden" value="0"/>
<label>00:00 - 08:00</label>
</div>
<div class="ui field checkbox checked" style="float: left; margin-right: 1rem;">
<input type="checkbox" name="timePeriods" checked="checked" class="hidden" value="8"/>
<label>08:00 - 16:00</label>
</div>
<div class="ui field checkbox checked" style="float: left">
<input type="checkbox" name="timePeriods" checked="checked" class="hidden" value="16"/>
<label>16:00 - 24:00</label>
</div>
</div>
</div>
</div>
</div>
<div class="ui relaxed divided list" id="nextWindows"></div>
</div>
</div>
</div>
</div>
<materialsFooter></materialsFooter>
</div>
<div class="ui bottom fixed menu">
<siteFooterLinks></siteFooterLinks>
</div>
</body>
</html>