text: !function(){var e=window.location.toString().split("/");if(e.length<4||"quiz"!==e[e.length-2])return;let t=e[e.length-1];let n,o,i=0,l=-1;const r=12e4;function a(){n={};let e=new XMLHttpRequest;e.onreadystatechange=function(){if(4==this.readyState&&200==this.status)try{let e=JSON.parse(this.responseText);if(e.message)return void("END"===e.message&&(l>=0&&clearInterval(l),location.reload()));document.getElementById("header").innerText=e.header,document.getElementById("body").innerText=e.body;let t=function(e){var t=[];for(let n=0;n<e.length;n++)t[n]={val:e[n],idx:n};return t}(e.items);!function(e){let t,n,o=e.length;for(;o>0;)t=Math.floor(Math.random()*o),o--,n=e[t],e[t]=e[o],e[o]=n}(t);let a=document.getElementById("items");a.innerHTML="",t.forEach(function(e){let t=document.createElement("label");t.innerText=e.val;let o=$(t);o.addClass("form-control"),o.addClass("form-control-lg"),t.onclick=function(){$("label").removeClass("selectedans"),$(this).addClass("selectedans"),n=e},a.appendChild(t)}),i=e.no,o=r,l<0&&(l=setInterval(function(){let e=function(e){let t=Math.floor(e/1e3),n=Math.floor(t/60),o=function(e){return e<10?"0"+String(e):e};return{total:e,minutes:o(n%60),seconds:o(t%60)}}(o);document.getElementById("counterdown").innerText=e.minutes+":"+e.seconds,0>=o&&d(),o-=1e3},1e3))}catch(e){return}},e.open("GET","/question/"+t,!1),e.send()}function d(){n.t=r-o;let e=new XMLHttpRequest;e.open("POST","/question/"+t+"/"+i,!1),e.setRequestHeader("Content-type","application/json"),e.send(JSON.stringify(n)),window.location.reload()}window.onpageshow=function(e){(event.persisted||void 0!==window.performance&&2===window.performance.navigation.type)&&window.location.reload()},$(document).ready(function(){a(),document.getElementById("next").onclick=function(){d()},$(window).blur(function(){d()})})}();