\n\n\n
'+V.right.name.toUpperCase()+'
\n'+V.right.description+"\n
"}for(var A='\n'+u.title+'
\n
\n\n'+S+'\n
\n
\n\n
\nWhat is '+u.title+"?
\n"+u.description+"
\n\n"+u.valDescription+'
\n\n'+O+"\n
\n
\n
",D=""+u.title+'
\n
\nInstructions
\n\n\tYou will be presented with '+d.length+' statements. For each one, click the\n\tbutton with your opinion on it.\n
\n\n
\n\n
\n'+(c?'\n
\n\n
':"")+'\n\n
',z="",N=0,U=s;N"+G.name+"
"}var P,Q,Z=""+u.title+'
\n
\nLoading...
\n\n'+z+'\n',W=0,X=[];function Y(t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var e=n?t?c.sort((function(){return.5-Math.random()})):c:t?d.sort((function(){return.5-Math.random()})):d;function i(){P.innerText="Question "+(W+1)+" of "+e.length,Q.innerText=e[W].question}document.body.innerHTML=Z+v;for(var o=document.getElementsByClassName("button"),l=function(t){o[t].addEventListener("click",(function(){if(W+10?(W--,i()):nt(tt.index)})),P=document.getElementById("questionNumber"),Q=document.getElementById("questionText"),i()}function J(t){for(var n=["Neutral","Moderate","Strong","Extreme","Fanatic"],e=0;e50?n.left.name:n.right.name:"")}function $(){var t,n=Object.fromEntries(location.href.split("?")[1].split(",").map((function(t,n){return[a[n].id,parseFloat(t)]}))),e=(t=n,h[h.map((function(n,e){var i={},o=function(e){i[e]=Math.abs(n.stats[e]-t[e])*(a.find((function(t){return t.id===e})).weight?a.find((function(t){return t.id===e})).weight:1)};for(var l in t)o(l);return[e,Object.values(i).reduce((function(t,n){return t+n}))]})).sort((function(t,n){return t[1]-n[1]}))[0][0]]),i=function(t){for(var n,e,i,o,l,r,s=[],d=0;d50){if(100-t[a[d].id]<=f[u]||u===f.length-1){s[d]=a[d].tiers[u];break}}else if(t[a[d].id]<=f[u]||u===f.length-1){s[d]=a[d].tiers[a[d].tiers.length-u-1];break}}else s[d]=!1;return s}(n);document.body.innerHTML=function(t,n,e){for(var i,l="",r=0;r"+(e[r]?s.name+" Axis: "+e[r]:""+K(t[s.id],s))+''+(t[s.id]>d?t[s.id].toFixed(1)+"%":"")+'
'+(100-t[s.id]>d?(100-t[s.id]).toFixed(1)+"%":"")+'
'}return""+u.title+"
\n
\nResults
\n"+l+"\nClosest Match: "+n.name+'
\n
\n\n\n\n
'}(n,e,i)+v,document.getElementById("backButton").addEventListener("click",(function(){location.search=""})),document.getElementById("downloadButton").addEventListener("click",(function(){var t=document.createElement("a");t.download="result.png",t.href=document.getElementById("banner").toDataURL(),t.click()})),window.onload=function(){!function(t,n,e){var i=-24,l=document.getElementById("banner").getContext("2d");l.fillStyle=f.bgColor,l.fillRect(0,0,800,170+120*a.length+i),l.fillStyle=f.fgColor,l.font="700 "+4e3/l.measureText(u.title).width+"px "+u.mainFont,l.textAlign="left",l.fillText(u.title,20,66),l.font="50px "+u.mainFont,l.fillText(n.name,20,116),l.textAlign="right",l.font="300 "+12e3/l.measureText(u.link).width+"px "+u.mainFont,l.fillText(u.link,780,42),l.fillText(u.version,780,72),a.forEach((function(n,r){var a,s,d,c,h,v,g,m,b,p,x,w,y,k,C,T,B,E,L=72,M=120*r+i,_=170+M,q=180+M-((null!==(a=f.barThickness)&&void 0!==a?a:L)+2*(null!==(s=f.outlineThickness)&&void 0!==s?s:4)-80)/2,I=184+M-((null!==(d=f.barThickness)&&void 0!==d?d:L)-L)/2,S=237.5+M+((null!==(c=f.barThickness)&&void 0!==c?c:L)-L)/4,F=175+M-((null!==(h=f.barThickness)&&void 0!==h?h:L)+2*(null!==(v=f.outlineThickness)&&void 0!==v?v:4)-80)/2,H=new Image(200,200);H.onload=function(){l.drawImage(H,20,_,100,100)},H.src=o(n,!1);var O=new Image(200,200);O.onload=function(){l.drawImage(O,680,_,100,100)},O.src=o(n,!0),l.fillStyle=null!==(g=f.valColor)&&void 0!==g?g:f.fgColor,l.fillRect(120,q,560,(null!==(m=f.barThickness)&&void 0!==m?m:L)+2*(null!==(b=f.outlineThickness)&&void 0!==b?b:4)),l.fillStyle=n.left.color,l.fillRect(120,I,5.6*t[n.id]-(null!==(p=f.outlineThickness)&&void 0!==p?p:4)/2,null!==(x=f.barThickness)&&void 0!==x?x:L),l.fillStyle=n.right.color,l.fillRect(120+5.6*t[n.id]+(null!==(w=f.outlineThickness)&&void 0!==w?w:4)/2,I,5.6*(100-t[n.id])-(null!==(y=f.outlineThickness)&&void 0!==y?y:4)/2,null!==(k=f.barThickness)&&void 0!==k?k:L),l.fillStyle=null!==(C=f.valColor)&&void 0!==C?C:f.fgColor,l.font=.625*(null!==(T=f.barThickness)&&void 0!==T?T:L)+"px "+u.mainFont,l.textAlign="left",t[n.id]>(null!==(B=f.limit)&&void 0!==B?B:30)&&l.fillText(t[n.id].toFixed(1)+"%",130,S),l.textAlign="right",100-t[n.id]>(null!==(E=f.limit)&&void 0!==E?E:30)&&l.fillText((100-t[n.id]).toFixed(1)+"%",670,S),l.fillStyle=f.fgColor,l.font="300 30px "+u.mainFont,l.textAlign="center",l.fillText(e[r]?n.name+" Axis: "+e[r]:""+K(t[n.id],n),400,F)}))}(n,e,i)}}var tt;function nt(t){switch(t){case tt.index:document.body.innerHTML=A+v,document.getElementById("instructionButton").addEventListener("click",(function(){nt(tt.instructions)}));break;case tt.instructions:document.body.innerHTML=D+v,document.getElementById("quizButton").addEventListener("click",(function(){nt(tt.quiz)})),document.getElementById("backButton").addEventListener("click",(function(){nt(tt.index)})),document.getElementById("shuffleButton").addEventListener("click",(function(){Y(!0)})),c&&(document.getElementById("shortButton").addEventListener("click",(function(){Y(!1,!0)})),document.getElementById("shortShuffleButton").addEventListener("click",(function(){Y(!0,!0)})));break;case tt.quiz:Y();break;case tt.results:$()}}!function(t){t[t.index=0]="index",t[t.instructions=1]="instructions",t[t.quiz=2]="quiz",t[t.results=3]="results"}(tt||(tt={})),document.title=u.title,location.search?nt(tt.results):nt(tt.index)})();