Created At: 2026-06-14T16:19:42Z
Completed At: 2026-06-14T16:19:43Z
File Path: `file:///c:/Users/HP/Downloads/climate-system/climate-system/index.php`
Total Lines: 4013
Total Bytes: 169761
Showing lines 3920 to 3960
The following code has been modified to include a line number before every line, in the format: <line_number>: <original_line>. Please note that any changes targeting the original code should remove the line number, colon, and leading space.
3920:         
3921:         const reader = new FileReader();
3922:         reader.onload = function(evt) {
3923:           const text = evt.target.result;
3924:           const rows = parseCsvText(text);
3925:           if (rows.length > 0) {
3926:             if (hiddenInput) {
3927:               hiddenInput.value = JSON.stringify(rows);
3928:               updateSettingsChartPreview(); // Trigger real-time settings preview
3929:             }
3930:             const years = rows.map(r => r.year).filter(y => !isNaN(y));
3931:             const minYear = Math.min(...years);
3932:             const maxYear = Math.max(...years);
3933:             if (indicator) {
3934:               indicator.innerText = `CSV Terdeteksi: ${rows.length} baris data (${minYear} - ${maxYear}).`;
3935:               indicator.style.color = '#16a34a';
3936:             }
3937:           } else {
3938:             alert('Gagal mendeteksi data valid di file CSV. Pastikan file memiliki kolom Tahun/Year.');
3939:             e.target.value = '';
3940:             if (hiddenInput) {
3941:               hiddenInput.value = '';
3942:               updateSettingsChartPreview();
3943:             }
3944:             if (indicator) indicator.innerText = '';
3945:           }
3946:         };
3947:         reader.readAsText(file);
3948:       }
3949:     });
3950: 
3951:     function updateSettingsChartPreview() {
3952:       const variable = document.getElementById('futureSetVariable')?.value.trim() || 'Precipitation';
3953:       const period = document.getElementById('futureSetPeriod')?.value.trim() || '2031-2060';
3954:       const baseVal = document.getElementById('futureSetGraphBaseValue')?.value.trim();
3955:       const uncertainty = document.getElementById('futureSetGraphUncertainty')?.value.trim();
3956:       const ssp1 = document.getElementById('futureSetGraphSSP1Slope')?.value.trim();
3957:       const ssp2 = document.getElementById('futureSetGraphSSP2Slope')?.value.trim();
3958:       const ssp3 = document.getElementById('futureSetGraphSSP3Slope')?.value.trim();
3959:       const ssp5 = document.getElementById('futureSetGraphSSP5Slope')?.value.trim();
3960:       const csvData = document.getElementById('futureSetCsvData')?.value.trim();
The above content does NOT show the entire file contents. If you need to view any lines of the file which were not shown to complete your task, call this tool again to view those lines.
