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B,IAAA,CAAK,AAAA,GAAK,EAAE,OAAxD,EACA,YAAY,SACb,CAEA,GAAG,E,G,4D","sources":["","frontend/timeline/index.js"],"sourcesContent":["(function () {\nvar $3b2d986bab347b73$exports = {};\nasync function $3b2d986bab347b73$var$display(data) {\n // Display previous\n getel(\"prev_start\").innerHTML = data[0] ? `from ${human_time(data[0].start)}` : \"\";\n getel(\"prev_end\").innerHTML = data[0] ? `until ${human_time(data[0].end)}` : \"\";\n getel(\"prev_name\").innerHTML = period_html(data[0]);\n // Display next\n getel(\"next_start\").innerHTML = data[2] ? `at ${human_time(data[2]?.start)}` : \"\";\n getel(\"next_end\").innerHTML = data[2] ? `until ${human_time(data[2]?.end)}` : \"\";\n getel(\"next_name\").innerHTML = period_html(data[2]);\n // Display currents\n const currents = [];\n const ends = [];\n for (const current of data[1]){\n const new_text = getel(\"current\").innerHTML;\n currents.push(new_text.replace(\"CURR_START\", human_time(current.start)).replace(\"CURR_NAME\", period_html(current)).replace(\"CURR_END\", human_time(current.end)));\n ends.push(human_time_left(current.end));\n }\n getel(\"current_parent\").innerHTML = currents.join(getel(\"current_separator\").innerHTML);\n getel(\"time_left\").innerHTML = `Ending in ${human_list(ends)}${ends.length > 1 ? \", respectively.\" : \".\"}`;\n window.all_data = await get(\"api/v1/today\").then((v)=>v.periods);\n place_boxes(all_data);\n}\ngo($3b2d986bab347b73$var$display);\n\n})();\n//# sourceMappingURL=index.4ca31f9b.js.map\n","async function display(data) {\n\t// Display previous\n\tgetel('prev_start').innerHTML = data[0] ? `from ${human_time(data[0].start)}` : '';\n\tgetel('prev_end').innerHTML = data[0] ? `until ${human_time(data[0].end)}` : '';\n\tgetel('prev_name').innerHTML = period_html(data[0]);\n\t// Display next\n\tgetel('next_start').innerHTML = data[2] ? `at ${human_time(data[2]?.start)}` : '';\n\tgetel('next_end').innerHTML = data[2] ? `until ${human_time(data[2]?.end)}` : '';\n\tgetel('next_name').innerHTML = period_html(data[2]);\n\t// Display currents\n\tconst currents = [];\n\tconst ends = [];\n\tfor (const current of data[1]) {\n\t\tconst new_text = getel('current').innerHTML;\n\t\tcurrents.push(new_text.replace('CURR_START', human_time(current.start)).replace('CURR_NAME', period_html(current)).replace('CURR_END', human_time(current.end)));\n\t\tends.push(human_time_left(current.end));\n\t}\n\n\tgetel('current_parent').innerHTML = currents.join(getel('current_separator').innerHTML);\n\tgetel('time_left').innerHTML = `Ending in ${human_list(ends)}${ends.length > 1 ? ', respectively.' : '.'}`;\n\twindow.all_data = await get('api/v1/today').then(v => v.periods);\n\tplace_boxes(all_data);\n}\n\ngo(display);\n"],"names":["$3b2d986bab347b73$var$display","data","getel","innerHTML","human_time","start","end","period_html","currents","ends","current","new_text","push","replace","human_time_left","join","human_list","length","window","all_data","get","then","v","periods","place_boxes","go"],"version":3,"file":"index.4ca31f9b.js.map"}