${ ListGet.filter( item=>item.id == SelectedGet )[0]?.name }
${
ListGet.map( (item, index) =>
{
return h(BroadcastItem,
{
item: item,
previous: ListGet[index-1],
priority: item.id == LeadingGet?.id,
selected: item.id == SelectedGet,
select: () => SelectionTransition(item)
});
})
}
${item.start.Hours}:${item.start.Minutes} ${item.start.M}
${item.name}
${ pointerText }
`;
};
/** @type {(inDate:string)=>Boxcast.Date} */
const DateParse = (inDateString) =>
{
let date = new Date(inDateString);
/** @type {Boxcast.Date} */
let obj = {
Zone: date.toString().match(/\(([A-Za-z\s].*)\)/),
Day: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"][date.getDay()],
Month: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"][date.getMonth()],
Date: date.getDate(),
Hours: date.getHours(),
Minutes: date.getMinutes(),
Epoch: date.valueOf()
};
obj.Zone = obj.Zone ? obj.Zone[1] : "local time";
obj.M = obj.Hours >= 12 ? "PM" : "AM";
obj.Hours %= 12;
if(obj.Hours == 0){ obj.Hours = 12; }
if(obj.Minutes < 10){ obj.Minutes = "0"+obj.Minutes; }
return obj;
};
/** @type {(inChannel:string, inSelector:string, inInterval:number)=>void} */
const Init = (inChannel, inSelector, inInterval) => createRoot(document.querySelector(inSelector)).render(h(App, {channel:inChannel, interval:inInterval}));
const Channel = { Basics: "sfz7ja3rlpoous6usu8a", Sunday: "gzahmhugrzogttfdtbjj", Dev: "r3os2zfdnhlquhuypgtp" };
Init(Channel.Basics, "#boxcast", 5000);