{"size": 2451, "ext": "js", "max_stars_repo_path": "slides/js/mithril-slideshow.min.js", "max_stars_repo_name": "Kjronning/websoft", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "slides/js/mithril-slideshow.min.js", "max_issues_repo_name": "Kjronning/websoft", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "slides/js/mithril-slideshow.min.js", "max_forks_repo_name": "Kjronning/websoft", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 2451.0, "max_line_length": 2451, "alphanum_fraction": 0.7711138311}
var app={};app.initCodeBlocks=function(){for(var e=document.querySelectorAll('[lotto-json-role="code"]'),n=0;n<e.length;++n){var t=e[n],o=t.dataset.language;hljs.configure({languages:[o]}),hljs.highlightBlock(t)}},app.loadCodeBlocksIntoSlide=function(){for(var e=document.querySelectorAll("[lotto-json-code]"),n=0;n<e.length;++n){var t=e[n],o=document.getElementById(t.dataset.code);t.innerHTML=o.innerHTML.substr(1)}},app.initMarkdown=function(){for(var e=document.querySelectorAll("[lotto-json-markdown]"),n=new showdown.Converter({tables:!0}),t=0;t<e.length;++t){var o=e[t];o.innerHTML=n.makeHtml(o.innerHTML)}},app.enterFullscreen=function(e){e=document.body,e.webkitRequestFullScreen&&!document.webkitFullscreenElement?e.webkitRequestFullScreen():e.mozRequestFullScreen&&!document.mozFullScreenElement?e.mozRequestFullScreen():e.msRequestFullscreen&&!document.msFullscreenElement&&e.msRequestFullscreen()},app.exitFullscreen=function(){document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()},app.play=function(e,n){m.startComputation(),e.rotateSlide(n),m.endComputation()},app.useTheme=function(e){var n=document.getElementsByTagName("html").item(0);console.log(n),n.classList.remove("theme-1","theme-2","theme-3","theme-4","theme-5"),n.classList.add("theme-"+e)};var cp={};cp.navigate=function(e,n){switch(console.log(n.keyCode),n.keyCode){case 0:case 13:case 32:case 39:case 40:app.play(e);break;case 8:case 37:case 38:app.play(e,!0);break;case 70:app.enterFullscreen();break;case 190:app.exitFullscreen();break;case 49:case 50:case 51:case 52:case 53:app.useTheme(n.keyCode-48);break;default:return}return!1},app.config=function(e){return function(n,t){if(app.loadCodeBlocksIntoSlide(),!t){var o=function(n){cp.navigate(e,n)};window.onclick=o,window.onkeydown=o,window.ontouchend=o}}},app.slideList=function(){return document.querySelectorAll('[lotto-json-role="slide"]')},app.controller=function(){var e=app.slideList(),n=0;return{currentSlide:function(){return e.item(n)},rotateSlide:function(t){n=t?0===n?e.length-1:n-1:n===e.length-1?0:n+1}}},app.view=function(e){var n=e.currentSlide();return m("div#slide",{config:app.config(e)},[m("div#objects",{class:n.classList.toString()},m.trust(n.innerHTML))])},app.initCodeBlocks(),app.initMarkdown(),document.body=document.createElement("body"),m.module(document.body,app);