<% let playbackPosition = workspace.playbackPosition==cue.uniqueID ? "playback-position" : "" %>
<% if(cue.broken){ %> <% }else if(cue.running){ %> <% }else if(cue.paused){ %> <% }else if(cue.loaded){ %> <% }else if(cue.flagged){ %> <% }else{ %> <% } %>
<%= cue.number || " " %>
<% for(let i=0; i <% if(cue.cues && cue.cues.length==0 && i==cue.nestedGroupModes.length-1){ %> <% }else if(cue.cues && i==cue.nestedGroupModes.length-1){ %> <% }else if(cue.nestedGroupPosition[i]<=0){ %> <% if(i <% }else{ %> <% } %> <% }else if(i <% }else{ %> <% } %> <% } %> <% if(cue.type=="Group"){ %> <% if(cue.cues.length==0){ %> <%= cue.listName %> <% }else{ %> <%= cue.listName %> <% } %> <% }else if(cue.nestedGroupPosition[1]==0){ %> <%= cue.listName %> <% }else{ %> <%= cue.listName %> <% } %> <%= cue.target %> <% if(cue.preWait){ %> <%= elapsedTime(cue.preWait, cue.preWaitElapsed, "preWait", cue) %> <% }else{ %> 00:00.00 <% } %> <% let cueTypesWithAction = ["Audio", "Mic", "Video", "Camera", "Text", "Light", "Fade", "Network", "MIDI File", "Timecode", "Wait"]; %> <% if((cue.type=="Group" && cue.groupMode==3) || cueTypesWithAction.indexOf(cue.type)>=0){ %> <%= elapsedTime(cue.duration, cue.actionElapsed, "action", cue) %> <% }else{ %> <% } %> <% if(cue.postWait){ %> <%= elapsedTime(cue.postWait, cue.postWaitElapsed, "postWait", cue) %> <% }else{ %> 00:00.00 <% } %> <% if(cue.continueMode==2){ %>
<% }else if(cue.continueMode==1){ %>
<% }else{ %> <% } %> <% function prettyFormatTime(seconds){ if(!seconds){ return "00:00.00"; } var startIndex = 14; if(seconds>=3600){ startIndex = 11; } var string = new Date(seconds * 1000).toISOString() return string.substring(startIndex, string.length-2) } function elapsedTime(def, value, type, cue){ if(type=="action" && cue.paused){ value-=cue.preWait; } let border, fill; if(cue.paused){ border = "#f6e737"; fill = "rgba(255, 240, 60, 0.7)"; }else{ border = "#48ba41"; fill = "rgba(0, 200, 50, 0.5)"; } if(value>0){ let percent = value/def*100; let bg = `style='background: black; background: linear-gradient(90deg, ${fill} ${percent}%, transparent ${percent}%);`; if(cue.paused){ bg+= "outline-color: "+border+";"; bg+= "color: white;"; } bg+="'"; return `
${prettyFormatTime(Math.min(def, value))}`; }else if(type=="postWait" || type=="action"){ return `${prettyFormatTime(def)}`; }else{ return prettyFormatTime(def); } } %>