Miguel270 / AresBot

// ==UserScript==
// @name        AresBot
// @author      Cybernus L.L.C
// @namespace   AresBot
// @include     http://agar.io/*
// @include     https://agar.io/*
// @version     0.3.7
// @updateURL   http://aresbot.com/bot/ares.js
// @run-at      document-start
// @grant       GM_xmlhttpRequest
// ==/UserScript==

function inject(e){var t=e.replace(/main_out.js/i,"empty.js");return t=t.replace("</head>",colorpickerCSS+ogarioScript+"</head>"),t=t.replace("</body>",colorpickerJS+"</body>")}var ogario=function(e,t){function o(e){var t=window.event?event:e,o=t.charCode?t.charCode:t.keyCode,n=String.fromCharCode(o);"1"==n&&(Dt=!0,Pt=!1),"2"==n&&(Dt=!1,Pt=!1),"3"==n&&(Dt=!1,Pt=!0),"x"==n&&l(),"d"==n&&T(),"c"==n&&s(),"0"==n&&(p(),c(),setTimeout(function(){g(token),setTimeout(function(){location=!0},5e3)},2e3))}function n(){var e,t;Dt?(e=Bt,t=Ot):Dt?Pt&&(e=It,t=Ct):(e=Ut,t=At),Lt=e,Rt=t,xt.send(JSON.stringify({id:"moveTo",cX:Lt,cY:Rt}))}function a(e,t){var o=new XMLHttpRequest;o.open("GET","http://"+Ft+":8080/api/getBots",!0),o.onreadystatechange=function(){4==o.readyState&&"function"==typeof t&&t.apply(o)},o.send()}function r(){a("http://example.com/",function(){var e=JSON.parse(this.responseText);Nt=e.message,Gt=e.total,qt="Bots: "+Nt})}function s(){Jt.open("POST","http://"+Ft+":8080/api/eject",!0),Jt.setRequestHeader("Content-type","application/x-www-form-urlencoded"),Jt.send()}function l(){_t.open("POST","http://"+Ft+":8080/api/split",!0),_t.setRequestHeader("Content-type","application/x-www-form-urlencoded"),_t.send()}function c(){clearInterval(zt),clearInterval(Tt),clearInterval(Mt),qt=" "}function u(e){var t=Date.parse(e)-Date.now(),o=Math.floor(t/1e3%60),n=Math.floor(t/1e3/60%60),a=Math.floor(t/36e5%24),i=Math.floor(t/864e5);return{total:t,days:i,hours:a,minutes:n,seconds:o}}function h(e){function t(){var t=u(e);Ht=t.days+" Days "+("0"+t.hours).slice(-2)+" Hours "+("0"+t.minutes).slice(-2)+" Minutes "+("0"+t.seconds).slice(-2)+" Seconds",t.total<=0&&(Wt="Subscription not active",Vt="#FF0000",clearInterval(o),c())}t();var o=setInterval(t,1e3)}function p(){var e=new XMLHttpRequest;e.open("GET","http://bot.aresbot.com:8080/api/checkServer",!0),e.setRequestHeader("Content-type","application/x-www-form-urlencoded"),e.onload=function(){var e=JSON.parse(this.responseText);return Ft=e.server,e.server},e.send()}function g(e){var t=new XMLHttpRequest,o="key="+e+"&nick="+Kt;return qt=" ",t.open("POST","http://"+Ft+":8080/api/checkLicense",!0),t.setRequestHeader("Content-type","application/x-www-form-urlencoded"),t.onload=function(){console.log(this.responseText);var e=JSON.parse(this.responseText);if(jt=e.message,"true"==jt){Wt="Subscription active",Vt="#00FF00";var t=e.left;h(t),Et=!0,clearInterval(zt),clearInterval(Tt),clearInterval(Mt),Mt=setInterval(function(){r()},3e3),Tt=setInterval(function(){n()},100)}else Wt="Subscription not active",Vt="#FF0000"},t.send(o),jt}function f(e,t,o){t?(87!=e.keyCode||vn||o||(M(!0),vn=!0),69!=e.keyCode||wn||o||(T(),wn=!0),80!=e.keyCode||Sn||o||(pe(!1),Sn=!0),65!=e.keyCode||xn||o||(E(),xn=!0),83!=e.keyCode||Fn||o||(I(!0),Fn=!0),68!=e.keyCode||Un||o||(P(),Un=!0),70!=e.keyCode||An||o||(C(),An=!0),90!=e.keyCode||In||o||(U(),In=!0),88!=e.keyCode||Cn||o||(B(),Cn=!0),16!=e.keyCode||Pn||o||co.disableshift||(R(),Pn=!0)):(87==e.keyCode&&(M(!1),vn=!1),69==e.keyCode&&(wn=!1),80==e.keyCode&&(Sn=!1),65==e.keyCode&&(xn=!1),83==e.keyCode&&(I(!1),Fn=!1),68==e.keyCode&&(Un=!1),70==e.keyCode&&(An=!1),90==e.keyCode&&(In=!1),88==e.keyCode&&(Cn=!1),16==e.keyCode&&(Pn=!1))}function m(){return S()?Zt[Yt].exit:void 0}function y(e){return"string"==typeof e?JSON.parse(e):JSON.stringify(e)}function k(){for(var t in lo)lo.hasOwnProperty(t)&&null!=e.localStorage.getItem(t)&&(lo[t]=e.localStorage.getItem(t));for(var t in co)co.hasOwnProperty(t)&&null!=e.localStorage.getItem(t)&&(co[t]=y(e.localStorage.getItem(t)))}function b(){for(var t in lo)lo.hasOwnProperty(t)&&e.localStorage.setItem(t,lo[t]);for(var t in co)co.hasOwnProperty(t)&&e.localStorage.setItem(t,y(co[t]))}function v(e){yo||(yo=!0,Ko=Date.now()),!bo&&e?(bo=!0,Yo=Date.now(),So=0,xo=0,jo=0,O(Eo,Lo),b(),U()):bo&&!e&&(bo=!1),e&&(ko=!1)}function w(e,t,o,n){return lo.nick=e,lo.clantag=t,lo.skin=o,lo.color=n,t.length>0?t+e:e}function S(){return ea.length>0}function x(){return ea.length>1}function F(){return ea.length}function U(){Ja=1}function A(e,t){S()&&e.isMyCell&&t.name&&jo++}function I(e){No=e}function C(){Go=!Go}function P(){Uo=!Uo}function T(){ko=!ko}function z(e){Ge(),We(e)}function M(e){return e?void(qo||(z(21),qo=setInterval(function(){z(21)},100))):void(qo&&(clearInterval(qo),qo=null))}function E(){z(21);var e=0,t=setInterval(function(){z(21),6==++e&&clearInterval(t)},100)}function L(){z(17);var e=0,t=setInterval(function(){z(17),1==++e&&clearInterval(t)},100)}function R(){z(17);var e=0,t=setInterval(function(){z(17),3==++e&&clearInterval(t)},100)}function B(){Jo--,0>Jo&&(Jo=Do.length-1)}function O(e,t){Do.push({x:e,y:t}),6==Do.length&&Do.splice(0,1),Jo=Do.length-1}function N(e,t){":party"===Bo&&null!=bn&&(0==e&&(bn[0].innerHTML="",bn[1].innerHTML=""),bn[0].innerHTML+=t+"<br />",bn[1].innerHTML+=t+"<br />")}function G(e,t,o,n){if(!po)return"";var a=2*po,i=String.fromCharCode(65+Math.floor((n+a/2)/(a/e))),r=(Math.floor((o+a/2)/(a/t))+1).toString();return i+r}function D(e){return(Date.now()-e)/1e3}function J(e){return Math.floor(D(e)/3600)+"h "+Math.floor(D(e)/60)%60+"m "+Math.floor(D(e)%60)+"s"}function j(e){return Math.max(30,Math.floor(.2*e))}function W(){for(var e=ea[1].ttr,t=ea[ea.length-1].ttr,o=ea[1].createTime,n=ea[ea.length-1].createTime,a=1;a<ea.length;a++)ea[a].ttr<e&&(e=ea[a].ttr,o=ea[a].createTime),ea[a].ttr>t&&(t=ea[a].ttr,n=ea[a].createTime);return{min:e,minFrom:o/1e3,max:t,maxFrom:n/1e3}}function H(){if(!x())return Uo||(Uo=!0),null;if(!co.timetoremerge||!S())return null;var e=Date.now()/1e3;return e-$o>=1&&(Qo=W(),$o=e),{min:Math.floor(Qo.min-(e-Qo.minFrom))+1,max:Math.floor(Qo.max-(e-Qo.maxFrom))+1}}function V(){if(!on)return void(on=Date.now());var e=Date.now(),t=e-on;t>=1e3&&(en=nn,tn=an,nn=0,an=0,on=e),nn++}function q(){for(var e=0,t=ea[0].size,o=1;o<ea.length;o++)Uo?t<ea[o].size&&(t=ea[o].size,e=o):t>ea[o].size&&(t=ea[o].size,e=o);return{index:e,size:t}}function K(e){return Math.floor(Math.pow(e,2)/100)}function X(e,t){return e/t}function Y(e){if(e&&e>0){var t=1e3>Io?.35:.38;return e>11?"#FF008C":e>=2.5?"#BE00FF":e>=1.25?"#FF0A00":1.25>e&&e>.75?"#FFDC00":e>t?"#00C8FF":"#64FF00"}}function Z(e){return e>183?"#C80000":co.darktheme?"#999999":"#666666"}function $(e){return e>.76?"#FFDC00":"#C80000"}function Q(e){return Math.floor((200-e)/14).toString()}function ee(e){return.5>vo&&vo>0&&e>30&&500>e&&20/vo>e?!0:!1}function te(e,t){var o=1e3>So?.35:.38;return o>=t&&e>50&&So>=280&&K(e)>Math.ceil(So/11)?!0:!1}function oe(e,t,o){if(S()){wo=o,So=Math.floor(wo/100),Io=K(Ao.size);for(var n=0;n<oa.length;n++)if(!oa[n].isFood){var a=oa[n],i=0;a.isMyCell&&(a.myCellIndex=ea.indexOf(a),":teams"!==Bo&&(a.color=lo.color)),(co.opponentscolors||co.opponentsrings||co.splitrange)&&!a.isMyCell&&(i=K(a.size),a.sizeRatio=X(i,Io)),!co.opponentscolors&&!co.opponentsrings||a.isMyCell||(a.isVirus?(a.color=Z(i),a.strokeColor=$(a.sizeRatio)):co.opponentsrings&&!co.performancemode?a.newColor=Y(a.sizeRatio):a.color=Y(a.sizeRatio)),(co.opponentsrings&&!a.isMyCell||co.splitrange&&!a.isVirus||co.virusrange&&a.isVirus||co.cursortracking&&a.isMyCell)&&a.drawOgarioLayer(e),a.isVirus?a.A(Q(K(a.size))):((co.autonames||co.automass||co.performancemode)&&(a.hideInfo=ee(a.size)),!co.opponentscolors&&!co.opponentsrings||a.isMyCell||(a.isShiftable=te(a.size,a.sizeRatio)))}}else for(var n=0;n<oa.length;n++)oa[n].isFood||(oa[n].isVirus?(co.opponentscolors||co.opponentsrings)&&(oa[n].color=Z(K(oa[n].size))):(co.autonames||co.automass||co.performancemode)&&(oa[n].hideInfo=ee(oa[n].size)))}function ne(e,t,o,n,a,i){(t||a)&&(e.strokeStyle="#FF7800",e.lineWidth=i,e.beginPath(),e.moveTo(t,o),e.lineTo(n,o),e.lineTo(n,a),e.lineTo(t,a),e.closePath(),e.stroke())}function ae(e,t,o,n,a,i,r,s,l){if(!(co.performancemode&&l||!n&&!r)){var c=Math.ceil((i-n)/t),d=Math.ceil((r-a)/o);e.save(),l?(e.strokeStyle=co.darktheme?"#292929":"#D9E1E5",e.fillStyle=co.darktheme?"#292929":"#D9E1E5"):(e.strokeStyle="#FFFFFF",e.fillStyle="#FFFFFF"),e.lineWidth=s,e.beginPath();for(var u=0;t+1>u;u++)e.moveTo(u==t?i:n+c*u,a),e.lineTo(u==t?i:n+c*u,r);for(var u=0;o+1>u;u++)e.moveTo(n,u==o?r:a+d*u),e.lineTo(i,u==o?r:a+d*u);e.stroke(),e.font=.6*d+"px Ubuntu";for(var u=0;o>u;u++)for(var h="",p=0;t>p;p++)h=String.fromCharCode(65+u)+(p+1),e.fillText(h,n+c/2+p*c-e.measureText(h).width/2,a+d/2+u*d+.2*d);e.restore()}}function ie(e,t,o,n){sn=document.createElement("canvas");var a=sn.getContext("2d");sn.width=o,sn.height=n,ae(a,e,t,.5,.5,o-.5,n-.5,1,!1)}function re(e,t,o,n,a){if(po){rn=null,rn=document.createElement("canvas"),rn.width=256,rn.height=256;var i=rn.getContext("2d"),r=2*po,s=a/r,l=r/2;i.globalAlpha=.4,i.fillStyle="#000000",i.fillRect(56,34,200,222),i.globalAlpha=1,i.font="16px Ubuntu",i.fillStyle="#FF7800",i.fillText(currentSector,66,55),i.fillStyle="#FFFFFF",i.globalAlpha=co.darktheme?.2:.4,sn&&sn.width?i.drawImage(sn,65,63):ie(e,t,a,a),i.save(),i.translate(65.5,63.5),i.globalAlpha=1,i.fillStyle="#FFFFFF";for(var c=0,d=ea.length;d>c;c++)1==d&&(i.beginPath(),i.arc((ea[c].x+l)*s,(ea[c].y+l)*s,Math.max(4.5,(ea[c].size+5)*s)+2,0,2*Math.PI,!1),i.closePath(),i.strokeStyle="#FFFFFF",i.stroke()),i.beginPath(),i.arc((ea[c].x+l)*s,(ea[c].y+l)*s,Math.max(4.5,(ea[c].size+5)*s),0,2*Math.PI,!1),i.closePath(),i.fill();if(S()||(i.beginPath(),i.arc((o+l)*s,(n+l)*s,6,0,2*Math.PI,!1),i.closePath(),i.fill()),Do.length>0){var u=Math.round((Do[Jo].x+l)*s),h=Math.round((Do[Jo].y+l)*s);i.lineWidth=1,i.strokeStyle=Do.length-1==Jo?"#FF7800":"#FFFFFF",i.beginPath(),i.moveTo(u-4.5,h),i.lineTo(u+4.5,h),i.moveTo(u,h-4.5),i.lineTo(u,h+4.5),i.stroke()}i.restore()}}function se(e,t,o,n,a,i){if(uo||go){var r=null,s=0;if(e.fillStyle="#000000",xo>0&&(ln||(ln=new t(20,"#FFFFFF")),ln[o](Zt[Yt].currentmass+So+" | "+Zt[Yt].bestmass+xo+" | "+Zt[Yt].roundvictims+jo+" | "+Zt[Yt].food+Ho+" | "+Zt[Yt].roundtime+Xo),r=ln[n](),s=r.width,e.globalAlpha=.4,e.fillRect(10,i-30-10,s+10,30),e.globalAlpha=1,e.drawImage(r,15,i-30-6)),No&&Fo>0&&(cn||(cn=new t(20,"#FF7800")),cn[o](Zt[Yt].topmass+Fo+" | "+Zt[Yt].totalvictims+Wo+" | "+Zt[Yt].totalfood+Vo+" | "+Zt[Yt].totaldeaths+_o+" | "+Zt[Yt].gametime+J(Ko)),r=cn[n](),s=r.width,e.globalAlpha=.3,e.fillRect(10,i-30-50,s+10,30),e.globalAlpha=1,e.drawImage(r,15,i-31-45)),co.showfps&&(dn||(dn=new t(20,"#FF7800")),dn[o]("FPS: "+en+" | rFPS: "+tn),r=dn[n](),s=r.width,e.globalAlpha=.4,e.fillRect(10,10,s+10,30),e.globalAlpha=1,e.drawImage(r,15,14)),co.showmassguides&&S()){var l=co.showfps?50:10,c=co.opponentsrings&&!co.performancemode?"○":"●";un||(un=new t(20,"#BE00FF")),un[o](c+c+" >"+Math.floor(2.5*Io)),r=un[n](),s=r.width,e.globalAlpha=.3,e.fillRect(10,l,s+10,30),e.globalAlpha=1,e.drawImage(r,15,l+4),hn||(hn=new t(20,"#FF0A00")),hn[o](c+" >"+Math.floor(1.25*Io)),r=hn[n](),s=r.width,e.globalAlpha=.3,e.fillRect(10,l+31,s+10,30),e.globalAlpha=1,e.drawImage(r,15,l+31+4),pn||(pn=new t(20,"#00C8FF")),pn[o](c+" <"+Math.floor(.75*Io)),r=pn[n](),s=r.width,e.globalAlpha=.3,e.fillRect(10,l+62,s+10,30),e.globalAlpha=1,e.drawImage(r,15,l+62+4),Io>=35&&(gn||(gn=new t(20,"#64FF00")),gn[o](c+c+" <"+Math.floor(Io*(1e3>Io?.35:.38))),r=gn[n](),s=r.width,e.globalAlpha=.3,e.fillRect(10,l+93,s+10,30),e.globalAlpha=1,e.drawImage(r,15,l+93+4),fn||(fn=new t(20,"#FFFFFF")),fn[o]("W x"+Math.floor((So-18*F())/17)),r=fn[n](),s=r.width,e.globalAlpha=.3,e.fillRect(10,l+124,s+10,30),e.globalAlpha=1,e.drawImage(r,15,l+124+4)),yn||(yn=new t(10,Vt)),yn[o](Wt),r=yn[n](),s=r.width,e.globalAlpha=1,e.drawImage(r,15,210),yn||(yn=new t(10,Vt)),yn[o](Ht),r=yn[n](),s=r.width,e.globalAlpha=1,e.drawImage(r,15,230),yn||(yn=new t(10,Vt)),yn[o](qt),r=yn[n](),s=r.width,e.globalAlpha=1,e.drawImage(r,15,250)}if(null!=Zo&&(mn||(mn=new t(26,"#FF7800","000000")),F()>2?mn[o](Zo.min+"s | "+Zo.max+"s"):mn[o](Zo.max+"s"),r=mn[n](),s=r.width,e.globalAlpha=1,e.drawImage(r,a/2-s/2,10)),x()){var l=co.timetoremerge?44:10;le(e,l),yn||(yn=new t(20,"#FFFFFF","#000000")),yn[o](F()+" / 16"),r=yn[n](),s=r.width,e.globalAlpha=1,e.drawImage(r,a/2-s/2,l+34)}ko&&(kn||(kn=new t(24,"#FF0000","#000000")),kn[o](Zt[Yt].pause),r=kn[n](),s=r.width,e.globalAlpha=.8,e.drawImage(r,a/2-s/2,110)),e.globalAlpha=1}}function le(e,t){e.save(),e.fillStyle=co.darktheme?"#FFFFFF":"#000000",e.globalAlpha=Uo?.6:.3,e.beginPath(),e.arc(Po/2-12,t+16,16,0,2*Math.PI,!1),e.closePath(),e.fill(),e.globalAlpha=Uo?.3:.6,e.beginPath(),e.arc(Po/2+16,t+16,12,0,2*Math.PI,!1),e.closePath(),e.fill(),e.restore()}function ce(e){var t=de(e);return t&&so.hasOwnProperty(t)?so[t]:"#FFFFFF"}function de(e){for(i=0;i<ao.length;i++)if(0==e.indexOf(ao[i]))return ao[i];return null}function ue(t,o){return-1!=ro.indexOf(o)?-1!=oo.indexOf(o)?Oo+no[oo.indexOf(o)]:-1!=eo.indexOf(o)?Oo+"wykop":-1!=to.indexOf(o)?Oo+"mirko":Oo+o:co.onlyogarioskins||-1==ui.indexOf(o)?t?Oo+io[ao.indexOf(t)]:null:e.ASSETS_ROOT+"skins/"+o+".png"}function he(e){if(!e||0==e.length)return null;var t=e.trim(),o=de(t);if(o&&(t=t.replace(o,"").trim()),t=t.replace(/[|¹²³⁴⁵]/i,""),t=t.toLowerCase(),$t.hasOwnProperty(t))return $t[t].width&&$t[t].complete?$t[t]:null;var n=ue(o,t);return n&&($t[t]=new Image,$t[t].crossOrigin="Anonymous",$t[t].src=n,$t[t].width&&$t[t].complete)?$t[t]:null}function pe(e){e||(co.performancemode=!co.performancemode),co.performancemode?(t("#mode-hud .state").text("ON"),t("#mode-hud .state").css("color","#64FF00"),t("#performancemode").prop("checked",!0)):(t("#mode-hud .state").text("OFF"),t("#mode-hud .state").css("color","#FF0A00"),t("#performancemode").prop("checked",!1))}function ge(){co.darktheme?t("body").css("background-color","#0A0A0A"):t("body").css("background-color","#F2FBFF")}function fe(e){k(),e("#helloContainer div[role=form] .form-group:first").after("<center><h5>"+Zt[Yt].modinfo+" | "+Xt+' | <a href="http://AresBot.com" target="_blank">'+Zt[Yt].home+"</a></h5></center>"),e("#nick").before('<input id="clantag" class="form-control" placeholder="Clan tag" />'),e("#nick").remove(),e("#clantag").after('<div class="input-group nick"><input id="nick" class="form-control" placeholder="Nick" maxlength="15" autofocus /><input type="hidden" id="color" value="'+lo.color+'" /><span class="input-group-addon"><i></i></span></div>'),e("#locationKnown, #locationUnknown").insertAfter(e(".nick")),e(".btn-settings, .btn-spectate, .btn-logout").appendTo("#agario-main-buttons"),e(".btn-settings").after('<button class="btn btn-info btn-next" onclick="nextServer(); return false;">&gt;&gt;</button>'),e("#agario-main-buttons").append('<br clear="both"/>'),e("#helloContainer div[role=form]").after('<div id="ogario-party"><input class="partyToken form-control" placeholder="Party token" /> <button class="btn btn-info btn-copy-token" onclick="copyToken();">Copy</button> <button class="btn btn-primary btn-create-party" onclick="$(\'#helloContainer\').attr(\'data-party-state\', \'3\'); createParty();" data-itr="create_party">Create</button> <button class="btn btn-success btn-join-party" onclick="joinParty($(\'.partyToken\').val());" data-itr="join_party">Join</button> <button class="btn btn-danger btn-cancel-party" onclick="cancelParty();">×</button> <button class="btn btn-run-bots" onclick="runBots();">Run Bot</button><font color="red"><b>Press to: 9 - Kill bots | 0 - Run bots</b></font> <br clear="both"/></div>'),e("#mainPanel hr, #instructions, small.text-muted").remove(),e(".btn-settings").attr("onclick","$('#ogario-settings').fadeToggle(300); return false;"),e(".side-container:eq(1)").prepend('<div id="ogario-settings" class="agario-panel checkbox"><h4>'+Zt[Yt].settings+"</h4></div>");for(var t in co)if(co.hasOwnProperty(t)){if("skins"===t||"names"===t){e("#ogario-settings").append('<label><input type="checkbox" onchange="setSettings(\''+t+"', !$(this).is(':checked'));\" id=\""+t+'">'+Zt[Yt][t]+"</label>");continue}e("#ogario-settings").append('<label><input type="checkbox" onchange="setSettings(\''+t+"', $(this).is(':checked'));\" id=\""+t+'">'+Zt[Yt][t]+"</label>")}e("#ogario-settings").append('<br clear="both"/><hr><h4>'+Zt[Yt].keys+'</h4><span class="key"><span class="bold">[W]</span> - '+Zt[Yt].wkey+'</span> <span class="key"><span class="bold">[E]</span> - '+Zt[Yt].ekey+'</span> <span class="key"><span class="bold">[A]</span> - '+Zt[Yt].akey+'</span> <span class="key"><span class="bold">[S]</span> - '+Zt[Yt].skey+'</span> <span class="key"><span class="bold">[D]</span> - '+Zt[Yt].dkey+'</span> <span class="key"><span class="bold">[X]</span> - '+Zt[Yt].xkey+'</span> <span class="key"><span class="bold">[Z]</span> - '+Zt[Yt].zkey+'</span> <span class="key"><span class="bold">['+Zt[Yt].space+"]</span> - "+Zt[Yt].spacekey+'</span> <span class="key"><span class="bold">[Shift]</span> - '+Zt[Yt].shiftkey+'</span> <span class="key"><span class="bold">[Q]</span> - '+Zt[Yt].qkey+'</span> <span class="key"><span class="bold">[F]</span> - '+Zt[Yt].fkey+'</span> <br clear="both"/>'),e("#tags-container").appendTo("#ogario-settings"),e("#settings, #stats hr").remove(),e(".agario-party-1, .agario-party-5").append('<div class="party-info">Token: <span class="party-info-token"></span><br />'+Zt[Yt].leaderboard+':<br /><span class="party-info-leaderboard"></span><br /></div>'),e("#statsContinue").after('<button type="submit" onclick="closeStats(); setNick(document.getElementById(\'nick\').value); return false;" id="stats-play" class="btn btn-success btn-needs-server" data-itr="play">Play</button> <button onclick="closeStats(); spectate(); return false;" id="stats-spectate" class="btn btn-warning btn-needs-server" data-itr="spectate">Spectate</button>'),e("body").append('<div id="mode-hud" class="hud"><span class="letter">[P]</span>erformance Mode <span class="state">OFF 1</span></div>'),e(".agario-party-1 div:first, .agario-party-1 .clearfix, .agario-party-3, .agario-party-4, .agario-party-5 div:first, .agario-party-5 .clearfix").remove(),e("#helloContainer").css({height:"auto"}),e("#helloContainer .agario-panel").css({"background-color":"#111111"}),e("#mainPanel h2, #mainPanel h5").css({color:"#FFFFFF"}),e(".side-container").css({color:"#DDDDDD"}),e("#clantag, .btn-copy-token, .btn-logout").css({width:"33%"}),e(".nick").css({width:"65%","float":"right"}),e("#nick").css({width:"100%","float":"none"}),e("#region, #ogario-party .partyToken").css({width:"65%",margin:"6px 0 0 0","float":"left"}),e("#gamemode").css({"margin-top":"6px"}),e(".btn-play-guest, .btn-login-play").css({width:"49%","margin-left":"0"}),e(".btn-play").css({width:"100%","margin-left":"0"}),e(".btn-settings, .btn-cancel-party").css({width:"13%","margin-top":"6px"}),e(".btn-run-bots").css({width:"100%","margin-top":"6px"}),e(".btn-next").css({width:"15%",height:"35px","font-weight":"bold",margin:"6px 0 0 2%","float":"left"}),e(".btn-spectate, .btn-logout").css({margin:"6px 0 0 2%"}),e("#clantag, .btn-copy-token, .btn-spectate").css({"float":"left"}),e("#nick, .btn-login-play, .btn-logout, .btn-copy-token, .btn-cancel-party").css({"float":"right"}),e(".btn-create-party, .btn-join-party").css({width:"41.5%",margin:"6px 2% 0 0","float":"left"}),e("#ogario-party").css({"padding-bottom":"15px"}),e("#ogario-party .partyToken").css({margin:"0"}),e("#ogario-settings").css({width:"inherit",display:"none",margin:"0",position:"absolute",top:"0","z-index":"400"}),e("#ogario-settings h4").css({color:"#FF7800","text-align":"center"}),e("#ogario-settings label, #ogario-settings .key").css({width:"50%",display:"block","font-size":"12px","float":"left"}),e("#ogario-settings hr").css({"border-color":"#555555",margin:"10px 0 0 0"}),e("#ogario-settings .key").css({padding:"3px 2%"}),e("#ogario-settings .bold").css({color:"#FF7800","font-weight":"bold"}),e("#stats").css({height:"640px"}),e("#socialStats").css({bottom:"360px"}),e("#stats-play").css({width:"42%",position:"absolute",left:"25px",bottom:"270px"}),e("#stats-spectate").css({width:"42%",position:"absolute",right:"25px",bottom:"270px"}),e(".skin").css({"margin-top":"6px","float":"left"}),e(".hud").css({"background-color":"rgba(0,0,0,0.4)","border-radius":"4px",color:"#FFFFFF","font-family":"Ubuntu","font-size":"20px",padding:"2px 10px",position:"fixed",display:"none","z-index":"100"}),e("#mode-hud").css({width:"200px",display:"block","font-size":"14px","text-align":"center",padding:"2px 0",top:"260px",right:"10px"}),e("#mode-hud .letter").css({color:"#FF7800"}),e("#mode-hud .state").css({color:"#FF0A00"}),e("head").append('<style>#helloContainer[data-logged-in="0"] .btn-spectate { width: 68%; } #helloContainer[data-logged-in="1"] .btn-spectate { width: 33%; } #mainPanel h5 a, .agario-party h4 { color: #FF7800; } .agario-profile-panel { padding-top: 8px; } .close { color: #FF7800; text-shadow: none; opacity: 1; } #mainPanel h5 a:hover, .close:focus, .close:hover { color: #FFFFFF; } #statsText { color: #BBBBBB; } #stats h2, #statsSubtext { color: #DDDDDD; } #statsGraph { bottom: 400px; opacity: 1; } #statsContinue { bottom: 310px; } #helloContainer[data-logged-in="0"] #agario-main-buttons, #agario-main-buttons { padding: 0 0; } #agario-main-buttons .row { margin: 0 0 } #helloContainer[data-party-state="1"] #agario-web-incentive, #helloContainer[data-party-state="5"] #agario-web-incentive { display: none }</style>'),e("#ogario-settings input:checkbox").each(function(){var t=e(this).attr("id");if(co.hasOwnProperty(t)){if("skins"===t||"names"===t)return void e(this).prop("checked",!co[t]);e(this).prop("checked",co[t])}}),bn=document.getElementsByClassName("party-info-leaderboard"),ge(),pe(!0),e("#nick").val(lo.nick),e("#clantag").val(lo.clantag)}function me(e,t){if(t){var o=new Date;o.setTime(o.getTime()+864e5*t),o="; expires="+o.toGMTString()}else o="";document.cookie="agario_redirect="+e+o+"; path=/"}function ye(){for(var e=document.cookie.split(";"),t=0;t<e.length;t++){for(var o=e[t];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf("agario_redirect="))return o.substring(16,o.length)}return null}function ke(){if(za=!0,jn.core.init(),Se(),setInterval(Se,18e4),Vn=Wn=document.getElementById("canvas"),null!=Vn){Hn=Vn.getContext("2d"),Vn.onmousedown=function(e){if(Xa){var t=e.clientX-(5+qn/5/2),o=e.clientY-(5+qn/5/2);if(Math.sqrt(t*t+o*o)<=qn/5/2)return void Je()}ia=1*e.clientX,ra=1*e.clientY,we(),Ge()},Vn.onmousemove=function(e){Qa=!1,ia=1*e.clientX,ra=1*e.clientY,we()},Vn.onmouseup=function(){},/firefox/i.test(navigator.userAgent)?document.addEventListener("DOMMouseScroll",be,!1):document.body.onmousewheel=be;var o=!1,n=!1,a=!1;e.onkeydown=function(e){f(e,!0,!1),32!=e.keyCode||o||("nick"!=e.target.id&&e.preventDefault(),Je(),o=!0),81!=e.keyCode||n||(L(),We(18),n=!0),27==e.keyCode&&(e.preventDefault(),Ue(300))},e.onkeyup=function(e){f(e,!1,!1),32==e.keyCode&&(o=!1),81==e.keyCode&&n&&(We(19),n=!1)},e.onblur=function(){We(19),a=n=o=!1},e.onresize=He,e.requestAnimationFrame(di),setInterval(Ge,40),ka&&t("#region").val(ka),Ie(),Fe(t("#region").val()),0==Wa&&ka&&Te(),Ue(0),He(),e.location.hash&&6<=e.location.hash.length&&pt(e.location.hash)}}function be(e){e.preventDefault(),Ja*=Math.pow(.9,e.wheelDelta/-120||e.detail||0),!co.unlimitedzoom&&1>Ja&&(Ja=1),Ja>4/ya&&(Ja=4/ya)}function ve(){if(.4>ya)Xn=null;else{for(var e=Number.POSITIVE_INFINITY,t=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,n=Number.NEGATIVE_INFINITY,a=0;a<oa.length;a++){var i=oa[a];!i.O()||i.T||20>=i.size*ya||(e=Math.min(i.x-i.size,e),t=Math.min(i.y-i.size,t),o=Math.max(i.x+i.size,o),n=Math.max(i.y+i.size,n))}for(Xn=yi.init({sa:e-10,ta:t-10,qa:o+10,ra:n+10,Da:2,Ea:4}),a=0;a<oa.length;a++)if(i=oa[a],i.O()&&!(20>=i.size*ya))for(e=0;e<i.a.length;++e)t=i.a[e].x,o=i.a[e].y,Zn-qn/2/ya>t||$n-Kn/2/ya>o||t>Zn+qn/2/ya||o>$n+Kn/2/ya||Xn.na(i.a[e])}}function we(){sa=(ia-qn/2)/ya+Zn,la=(ra-Kn/2)/ya+$n,zo=sa,Mo=la,Bt=Zn.toFixed(0),Ot=$n.toFixed(0),Ut=sa,At=la}function Se(){null==ei&&(ei={},t("#region").children().each(function(){var e=t(this),o=e.val();o&&(ei[o]=e.text())})),t.get(Jn+"info",function(e){var o,n={};for(o in e.regions){var a=o.split(":")[0];n[a]=n[a]||0,n[a]+=e.regions[o].numPlayers}for(o in n)t('#region option[value="'+o+'"]').text(ei[o]+" ("+n[o]+" players)")},"json")}function xe(){t("#adsBottom").hide(),t("#overlays").hide(),t("#stats").hide(),t("#mainPanel").hide(),Ti=ja=!1,Ie(),e.destroyAd(e.adSlots.aa),e.destroyAd(e.adSlots.ac)}function Fe(o){o&&(o==ka?t(".btn-needs-server").prop("disabled",!1):(t("#region").val()!=o&&t("#region").val(o),ka=e.localStorage.location=o,t(".region-message").hide(),t(".region-message."+o).show(),t(".btn-needs-server").prop("disabled",!1),za&&Te()))}function Ue(o){ja||Ti||(zi?t(".btn-spectate").prop("disabled",!0):t(".btn-spectate").prop("disabled",!1),ha=null,ti||(t("#adsBottom").show(),t("#g300x250").hide(),t("#a300x250").show(),t("#g728x90").hide(),t("#a728x90").show()),e.refreshAd(ti?e.adSlots.ac:e.adSlots.aa),ti=!1,1e3>o&&(_a=1),ja=!0,t("#mainPanel").show(),o>0?t("#overlays").fadeIn(o):t("#overlays").show()),300==o&&(ko=!0)}function Ae(e){t("#helloContainer").attr("data-gamemode",e),Pa=e,t("#gamemode").val(e),Bo=e}function Ie(){t("#region").val()?e.localStorage.location=t("#region").val():e.localStorage.location&&t("#region").val(e.localStorage.location),t("#region").val()?t("#locationKnown").append(t("#region")):t("#locationUnknown").append(t("#region"))}function Ce(t){return e.i18n[t]||e.i18n_dict.en[t]||t}function Pe(){var o=++Wa;console.log("Find "+ka+Pa),ze(),t.ajax(Jn+"findServer",{error:function(){setTimeout(Pe,3e4)},success:function(t){if(o==Wa){t.alert&&alert(t.alert);var n=t.ip;void 0!=Nn.la&&(n=e.location.hostname+":"+Nn.la),Me("ws"+(Dn?"s":"")+"://"+n,t.token)}},dataType:"json",method:"POST",cache:!1,crossDomain:!0,data:(ka+Pa||"?")+"\n2200049715"})}function Te(){za&&ka&&(t("#connecting").show(),Pe())}function ze(){if(Yn){Yn.onopen=null,Yn.onmessage=null,Yn.onclose=null;try{Yn.close()}catch(e){}Yn=null}}function Me(e,t){if(ze(),zn.ip&&(e="ws"+(Dn?"s":"")+"://"+zn.ip),null!=ai){var o=ai;ai=function(){o(t)}}if(Dn&&!Nn.env_development&&!Nn.env_local){var n=e.split(":");e="wss://ip-"+n[1].replace(/\./g,"-").replace(/\//g,"")+".tech.agar.io:"+ +n[2]}Qn=[],ea=[],ta={},oa=[],na=[],aa=[],li=Ta=null,xa=0,Ga=!1,console.log("Connecting to "+e),jn.cache.sentGameServerLogin=!1,Yn=new WebSocket(e),Yn.binaryType="arraybuffer",Yn.onopen=function(){var e;console.log("socket open"),e=Ee(5),e.setUint8(0,254),e.setUint32(1,5,!0),Le(e),e=Ee(5),e.setUint8(0,255),e.setUint32(1,2200049715,!0),Le(e),e=Ee(1+t.length),e.setUint8(0,80);for(var o=0;o<t.length;++o)e.setUint8(o+1,t.charCodeAt(o));Le(e),"login_info"in jn.cache&&jn.I.M(jn.cache.login_info[0],jn.cache.login_info[1])},Yn.onmessage=Be,Yn.onclose=Re,Yn.onerror=function(){console.log("socket error")}}function Ee(e){return new DataView(new ArrayBuffer(e))}function Le(e){Yn.send(e.buffer)}function Re(){Ga&&(ii=500),console.log("socket close"),setTimeout(Te,ii),ii*=2}function Be(e){Oe(new DataView(e.data))}function Oe(t){function o(){for(var e="";;){var o=t.getUint16(n,!0);if(n+=2,0==o)break;e+=String.fromCharCode(o)}return e}var n=0;switch(240==t.getUint8(n)&&(n+=5),t.getUint8(n++)){case 16:Ne(t,n);break;case 17:Aa=t.getFloat32(n,!0),n+=4,Ia=t.getFloat32(n,!0),n+=4,Ca=t.getFloat32(n,!0),n+=4;break;case 20:ea=[],Qn=[];break;case 21:Ea=t.getInt16(n,!0),n+=2,La=t.getInt16(n,!0),n+=2,Ma||(Ma=!0,Ra=Ea,Ba=La);break;case 32:Qn.push(t.getUint32(n,!0)),n+=4;break;case 49:if(null!=Ta)break;var a=t.getUint32(n,!0),n=n+4;aa=[];for(var i=0;a>i;++i){var r=t.getUint32(n,!0),n=n+4;aa.push({id:r,name:o()})}$e();break;case 50:for(Ta=[],a=t.getUint32(n,!0),n+=4,i=0;a>i;++i)Ta.push(t.getFloat32(n,!0)),n+=4;$e();break;case 64:pa=t.getFloat64(n,!0),n+=8,ga=t.getFloat64(n,!0),n+=8,fa=t.getFloat64(n,!0),n+=8,ma=t.getFloat64(n,!0),n+=8,Aa=(fa+pa)/2,Ia=(ma+ga)/2,Ca=1,0==ea.length&&(Zn=Aa,$n=Ia,ya=Ca),t.byteLength>n&&(a=t.getUint32(n,!0),n+=4,qa=!!(1&a),Va=o(),e.MC.updateServerVersion(Va),console.log("Server version "+Va)),uo=pa,ho=ga,po=fa,go=ma;break;case 102:a=t.buffer.slice(n),jn.core.proxy.forwardProtoMessage(a);break;case 104:e.logout()}}function Ne(o,n){function a(){for(var e="";;){var t=o.getUint16(n,!0);if(n+=2,0==t)break;e+=String.fromCharCode(t)}return e}function i(){for(var e="";;){var t=o.getUint8(n++);if(0==t)break;e+=String.fromCharCode(t)}return e}Da=da=Date.now(),Ga||(Ga=!0,t("#connecting").hide(),De(),ai&&(ai(),ai=null)),Sa=!1;var r=o.getUint16(n,!0);n+=2;for(var s=0;r>s;++s){var l=ta[o.getUint32(n,!0)],c=ta[o.getUint32(n+4,!0)];n+=8,l&&c&&(c.ba(),c.s=c.x,c.u=c.y,c.o=c.size,c.J=l.x,c.K=l.y,c.g=c.size,c.S=da,mt(l,c))}for(s=0;r=o.getUint32(n,!0),n+=4,0!=r;){++s;var d,l=o.getInt32(n,!0);n+=4,c=o.getInt32(n,!0),n+=4,d=o.getInt16(n,!0),n+=2;var u=o.getUint8(n++),h=o.getUint8(n++),p=o.getUint8(n++),h=nt(u<<16|h<<8|p),p=o.getUint8(n++),g=!!(1&p),f=!!(16&p),m=null;2&p&&(n+=4+o.getUint32(n,!0)),4&p&&(m=i());var y=a(),u=null;ta.hasOwnProperty(r)?(u=ta[r],u.R(),u.s=u.x,u.u=u.y,u.o=u.size,u.color=h):(u=new ot(r,l,c,d,h,y),oa.push(u),ta[r]=u,u.Y=l,u.Aa=c),!u.isFood||co.rainbowfood&&!co.performancemode||(u.color="#E16400"),u.c=u.isVirus=g,u.h=f,u.J=l,u.K=c,u.g=d,u.S=da,u.da=p,m&&(u.C=m),y&&u.A(y),u.isMyCell&&co.timetoremerge&&(u.ttr=j(u.size)),-1!=Qn.indexOf(r)&&-1==ea.indexOf(u)&&(u.isMyCell=!0,co.timetoremerge&&(u.ttr=j(u.size)),ea.push(u),1==ea.length&&(Zn=u.x,$n=u.y,ki(),document.getElementById("overlays").style.display="none",Ii=[],Ci=0,Pi=ea[0].color,zi=!0,Mi=Date.now(),Bi=Ri=Li=0))}for(l=o.getUint32(n,!0),n+=4,s=0;l>s;s++)r=o.getUint32(n,!0),n+=4,u=ta[r],null!=u&&u.ba();Sa&&0==ea.length&&"1"!=e.storageInfo.userInfo.loggedIn&&ft()}function Ge(){if(je()){var e=ia-qn/2,t=ra-Kn/2;64>e*e+t*t||.01>Math.abs(ri-sa)&&.01>Math.abs(si-la)||(ri=sa,si=la,e=Ee(13),e.setUint8(0,16),e.setInt32(1,ko?Eo:sa,!0),e.setInt32(5,ko?Lo:la,!0),e.setUint32(9,0,!0),Le(e))}}function De(){if(je()&&Ga&&null!=ha){var e=Ee(1+2*ha.length);e.setUint8(0,0);for(var t=0;t<ha.length;++t)e.setUint16(1+2*t,ha.charCodeAt(t),!0);Le(e),ha=null}}function Je(){Ge(),We(17)}function _e(){Ge(),We(21)}function je(){return null!=Yn&&Yn.readyState==Yn.OPEN}function We(e){if(je()){var t=Ee(1);t.setUint8(0,e),Le(t)}}function He(){qn=1*e.innerWidth,Kn=1*e.innerHeight,Po=qn,To=Kn,Wn.width=Vn.width=qn,Wn.height=Vn.height=Kn;var o=t("#helloContainer");o.css("transform","none");var n=o.height(),a=e.innerHeight;0!=n/2%2&&(n++,o.height(n)),n>a/1.1?o.css("transform","translate(-50%, -50%) scale("+a/n/1.1+")"):o.css("transform","translate(-50%, -50%)"),Ke()}function Ve(){var e;return e=1*Math.max(Kn/1080,qn/1920),e*=Ja}function qe(){if(!co.autozoom)return void(ya=(9*ya+Ve())/10);if(0!=ea.length){for(var e=0,t=0;t<ea.length;t++)e+=ea[t].size;ya=(9*ya+Math.pow(Math.min(64/e,1),.4)*Ve())/10}}function Ke(){var e,t=Date.now();if(++ca,fi&&(++gi,gi>180&&(gi=0)),da=t,0<ea.length){qe();for(var o=e=0,n=0;n<ea.length;n++)ea[n].R(),e+=ea[n].x/ea.length,o+=ea[n].y/ea.length;Aa=e,Ia=o,Ca=ya,Zn=(Zn+e)/2,$n=($n+o)/2,Eo=Aa,Lo=Ia,vo=ya,Ao=q(),Co=Ao.index}else Zn=(29*Zn+Aa)/30,$n=(29*$n+Ia)/30,ya=(9*ya+Ca*Ve())/10,Eo=Zn,Lo=$n,vo=ya;for(S()&&(Ho=Ci,Xo=J(Yo),Zo=H(),xo=Math.max(xo,So),Fo=Math.max(Fo,xo),Wo=Math.max(Wo,jo),Vo=Math.max(Vo,Ho),xa=Math.max(xa,wo)),ve(),we(),Hn.clearRect(0,0,qn,Kn),Xe(),oa.sort(function(e,t){return e.size==t.size?e.id-t.id:e.size-t.size}),Hn.save(),Hn.translate(qn/2,Kn/2),Hn.scale(ya,ya),Hn.translate(-Zn,-$n),co.drawbackgroundsectors&&ae(Hn,fo,mo,uo,ho,po,go,10,!0),co.showmapborders&&ne(Hn,uo,ho,po,go,20),oe(Hn,"c",Ze()),n=0;n<na.length;n++)na[n].w(Hn);for(n=0;n<oa.length;n++)oa[n].w(Hn);if(Ma){for(Ra=(3*Ra+Ea)/4,Ba=(3*Ba+La)/4,Hn.save(),Hn.strokeStyle="#FFAAAA",Hn.lineWidth=10,Hn.lineCap="round",Hn.lineJoin="round",Hn.globalAlpha=.5,Hn.beginPath(),n=0;n<ea.length;n++)Hn.moveTo(ea[n].x,ea[n].y),Hn.lineTo(Ra,Ba);Hn.stroke(),Hn.restore()}Hn.restore(),li&&li.width&&Hn.drawImage(li,qn-li.width-10,10),se(Hn,at,"B","L",Po,To),co.showminimap&&(currentSector=G(fo,mo,Eo,Lo),re(fo,mo,Eo,Lo,182,ea),rn&&rn.width&&Hn.drawImage(rn,Po-rn.width-10,To-rn.height-10)),co.showfps&&an++,Ye(),t=Date.now()-t,t>1e3/60?ci-=.01:1e3/65>t&&(ci+=.01),.4>ci&&(ci=.4),ci>1&&(ci=1),t=da-ua,!je()||ja||Ti?(_a+=t/2e3,_a>1&&(_a=1)):(_a-=t/300,
0>_a&&(_a=0)),_a>0?(Hn.fillStyle="#000000",Ha?(Hn.globalAlpha=_a,Hn.fillRect(0,0,qn,Kn),Ka.complete&&Ka.width&&(Ka.width/Ka.height<qn/Kn?(t=qn,e=Ka.height*qn/Ka.width):(t=Ka.width*Kn/Ka.height,e=Kn),Hn.drawImage(Ka,(qn-t)/2,(Kn-e)/2,t,e),Hn.globalAlpha=.5*_a,Hn.fillRect(0,0,qn,Kn))):(Hn.globalAlpha=.5*_a,Hn.fillRect(0,0,qn,Kn)),Hn.globalAlpha=1):Ha=!1,ua=da}function Xe(){if(co.drawgrid&&!co.drawbackgroundsectors&&!co.performancemode){Hn.save(),Hn.strokeStyle=co.darktheme?"#AAAAAA":"#000000",Hn.globalAlpha=.2*ya;for(var e=qn/ya,t=Kn/ya,o=(-Zn+e/2)%50;e>o;o+=50)Hn.beginPath(),Hn.moveTo(o*ya-.5,0),Hn.lineTo(o*ya-.5,t*ya),Hn.stroke();for(o=(-$n+t/2)%50;t>o;o+=50)Hn.beginPath(),Hn.moveTo(0,o*ya-.5),Hn.lineTo(e*ya,o*ya-.5),Hn.stroke();Hn.restore()}}function Ye(){if(Xa&&Ya.width){var e=qn/5;Hn.drawImage(Ya,5,5,e,e)}}function Ze(){for(var e=0,t=0;t<ea.length;t++)e+=ea[t].g*ea[t].g;return e}function $e(){if(li=null,(null!=Ta||0!=aa.length)&&(null!=Ta||co.names)){li=document.createElement("canvas");var e=li.getContext("2d"),t=40,t=null==Ta?t+18*aa.length:t+180;if(li.width=256,li.height=256,e.translate(56,0),e.globalAlpha=.4,e.fillStyle="#000000",e.fillRect(0,0,200,t+5),e.globalAlpha=1,e.fillStyle="#FFFFFF",d=null,e.fillStyle="#FF7800",d="AresBot",e.font="19px Ubuntu",e.fillText(d,100-e.measureText(d).width/2,25),null==Ta)for(e.font="14px Ubuntu",t=0;t<aa.length;++t)d=aa[t].name||Ce("unnamed_cell"),co.names||(d=Ce("unnamed_cell")),-1!=Qn.indexOf(aa[t].id)?(ea[0].name&&(d=ea[0].name),e.fillStyle="#FF7800"):e.fillStyle=ce(d),d=t+1+". "+d,e.fillText(d,100-e.measureText(d).width/2,50+18*t),N(t,d);else for(t=d=0;t<Ta.length;++t){var o=d+Ta[t]*Math.PI*2;e.fillStyle=Oa[t+1],e.beginPath(),e.moveTo(100,120),e.arc(100,120,80,d,o,!1),e.fill(),d=o}}}function Qe(t){if(null==t||0==t.length)return null;if("%"==t[0]){if(!e.MC||!e.MC.getSkinInfo)return null;if(t=e.MC.getSkinInfo("skin_"+t.slice(1)),null==t)return null;for(t=(+t.color).toString(16);6>t.length;)t="0"+t;return"#"+t}return null}function et(t){if(null==t||0==t.length)return null;if(!pi.hasOwnProperty(t)){var o=new Image;if(":"==t[0])o.src=t.slice(1);else if("%"==t[0]){if(!e.MC||!e.MC.getSkinInfo)return null;var n=e.MC.getSkinInfo("skin_"+t.slice(1));if(null==n)return null;o.src=e.ASSETS_ROOT+"skins/premium/"+n.url}pi[t]=o}return 0!=pi[t].width&&pi[t].complete?pi[t]:null}function tt(e,t,o,n,a){this.Z=e,this.x=t,this.y=o,this.f=n,this.b=a}function ot(e,t,o,n,a,i){this.id=e,this.s=this.x=t,this.u=this.y=o,this.o=this.size=n,this.color=a,this.a=[],this.$(),this.A(i),this.createTime=Date.now(),this.isFood=30>=n}function nt(e){for(e=e.toString(16);6>e.length;)e="0"+e;return"#"+e}function at(e,t,o,n){e&&(this.v=e),t&&(this.U=t),this.W=!!o,n&&(this.X=n)}function it(e){for(var t,o,n=e.length;n>0;)o=Math.floor(Math.random()*n),n--,t=e[n],e[n]=e[o],e[o]=t}function rt(){vi=bi}function st(e){vi.context="google"==e?"google":"facebook",lt()}function lt(){e.localStorage.storeObjectInfo=JSON.stringify(vi),vi=JSON.parse(e.localStorage.storeObjectInfo),e.storageInfo=vi,"google"==vi.context?(t("#gPlusShare").show(),t("#fbShare").hide()):(t("#gPlusShare").hide(),t("#fbShare").show())}function ct(o){t("#helloContainer").attr("data-has-account-data"),""!=o.displayName&&(o.name=o.displayName),(null==o.name||void 0==o.name)&&(o.name="");var n=o.name.lastIndexOf("_");-1!=n&&(o.name=o.name.substring(0,n)),t("#helloContainer").attr("data-has-account-data","1"),t("#helloContainer").attr("data-logged-in","1"),t(".agario-profile-panel .progress-bar-star").text(o.level),t(".agario-exp-bar .progress-bar-text").text(o.xp+"/"+o.xpNeeded+" XP"),t(".agario-exp-bar .progress-bar").css("width",(88*o.xp/o.xpNeeded).toFixed(2)+"%"),t(".agario-profile-name").text(o.name),""!=o.picture&&t(".agario-profile-picture").attr("src",o.picture),t("#instructions").show(),vi.userInfo.level=o.level,vi.userInfo.xp=o.xp,vi.userInfo.xpNeeded=o.xpNeeded,vi.userInfo.displayName=o.name,vi.userInfo.loggedIn="1",e.updateStorage()}function dt(o,n){if(vi.userInfo.loggedIn){var a=t("#helloContainer").is(":visible")&&"1"==t("#helloContainer").attr("data-has-account-data");if((null==o||void 0==o)&&(o=vi.userInfo),a){var i=+t(".agario-exp-bar .progress-bar-text").first().text().split("/")[0],a=+t(".agario-exp-bar .progress-bar-text").first().text().split("/")[1].split(" ")[0],r=t(".agario-profile-panel .progress-bar-star").first().text();if(r!=o.level)dt({xp:a,xpNeeded:a,level:r},function(){t(".agario-profile-panel .progress-bar-star").text(o.level),t(".agario-exp-bar .progress-bar").css("width","100%"),t(".progress-bar-star").addClass("animated tada").one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){t(".progress-bar-star").removeClass("animated tada")}),setTimeout(function(){t(".agario-exp-bar .progress-bar-text").text(o.xpNeeded+"/"+o.xpNeeded+" XP"),dt({xp:0,xpNeeded:o.xpNeeded,level:o.level},function(){dt(o,null)})},1e3)});else{var s=Date.now(),l=function(){var a;a=(Date.now()-s)/1e3,a=0>a?0:a>1?1:a,a=a*a*(3-2*a),t(".agario-exp-bar .progress-bar-text").text(~~(i+(o.xp-i)*a)+"/"+o.xpNeeded+" XP"),t(".agario-exp-bar .progress-bar").css("width",(88*(i+(o.xp-i)*a)/o.xpNeeded).toFixed(2)+"%"),n&&n(),1>a&&e.requestAnimationFrame(l)};e.requestAnimationFrame(l)}}}}function ut(){"none"==t("#settings").css("display")&&"none"==t("#socialLoginContainer").css("display")&&t("#instructions").show()}function ht(o){if("connected"==o.status){var n=o.authResponse.accessToken;null==n||"undefined"==n||""==n?(3>Si&&(Si++,e.facebookRelogin()),e.logout()):(e.MC.doLoginWithFB(n),jn.cache.login_info=[n,"facebook"],jn.I.M(n,"facebook"),e.FB.api("/me/picture?width=180&height=180",function(n){vi.userInfo.picture=n.data.url,e.updateStorage(),t(".agario-profile-picture").attr("src",n.data.url),vi.userInfo.socialId=o.authResponse.userID,wi()}),t("#helloContainer").attr("data-logged-in","1"),vi.context="facebook",vi.loginIntent="1",e.updateStorage())}}function pt(o){Ae(":party"),t("#helloContainer").attr("data-party-state","4"),o=decodeURIComponent(o).replace(/.*#/gim,""),gt("#"+e.encodeURIComponent(o)),t.ajax(Jn+"getToken",{error:function(){t("#helloContainer").attr("data-party-state","6")},success:function(n){n=n.split("\n"),t(".partyToken").val("agar.io/#"+e.encodeURIComponent(o)),t(".party-info-token").text("http://agar.io/#"+e.encodeURIComponent(o)),token=e.encodeURIComponent(o),g(e.encodeURIComponent(o)),t("#helloContainer").attr("data-party-state","5"),Ae(":party"),Me("ws://"+n[0],o)},dataType:"text",method:"POST",cache:!1,crossDomain:!0,data:o})}function gt(t){e.history&&e.history.replaceState&&e.history.replaceState({},e.document.title,t)}function ft(){null==e.storageInfo&&e.createDefaultStorage(),Ei=Date.now(),zi=!1,vt()}function mt(e,t){A(e,t);var o=-1!=Qn.indexOf(e.id),n=-1!=Qn.indexOf(t.id),a=30>t.size;o&&a&&++Ci,a||!o||n||32&t.da||++Ri}function yt(e){e=~~e;var t=(e%60).toString();return e=(~~(e/60)).toString(),2>t.length&&(t="0"+t),e+":"+t}function kt(){if(null==aa)return 0;for(var e=0;e<aa.length;++e)if(-1!=Qn.indexOf(aa[e].id))return e+1;return 0}function bt(){t(".stats-food-eaten").text(Ci),t(".stats-time-alive").text(yt((Ei-Mi)/1e3)),t(".stats-leaderboard-time").text(yt(Li)),t(".stats-highest-mass").text(~~(xa/100)),t(".stats-cells-eaten").text(Ri),t(".stats-top-position").text(0==Bi?":(":Bi);var e=document.getElementById("statsGraph");if(e){var o=e.getContext("2d"),n=e.width,e=e.height;if(o.clearRect(0,0,n,e),2<Ii.length){for(var a=200,i=0;i<Ii.length;i++)a=Math.max(Ii[i],a);for(o.lineWidth=3,o.lineCap="round",o.lineJoin="round",o.strokeStyle=Pi,o.fillStyle=Pi,o.beginPath(),o.moveTo(0,e-Ii[0]/a*(e-10)+10),i=1;i<Ii.length;i+=Math.max(~~(Ii.length/n),1)){for(var r=i/(Ii.length-1)*n,s=[],l=-20;20>=l;++l)0>i+l||i+l>=Ii.length||s.push(Ii[i+l]);s=s.reduce(function(e,t){return e+t})/s.length/a,o.lineTo(r,e-s*(e-10)+10)}o.stroke(),o.globalAlpha=.5,o.lineTo(n,e),o.lineTo(0,e),o.fill(),o.globalAlpha=1}}}function vt(){ja||Ti||(co.skipstats?Ue(500):(e.refreshAd(e.adSlots.ab),bt(),Ti=!0,setTimeout(function(){t("#overlays").fadeIn(500,function(){dt()}),t("#stats").show();var o=wt("g_plus_share_stats");e.fillSocialValues(o,"gPlusShare")},1500)),_o++,v(!1))}function wt(o){var n=t(".stats-time-alive").text();return e.parseString(o,"%@",[n.split(":")[0],n.split(":")[1],t(".stats-highest-mass").text()])}function St(){e.open("https://plus.google.com/share?url=www.agar.io&hl=en-US","Agar.io","width=484,height=580,menubar=no,toolbar=no,resizable=yes,scrollbars=no,left="+(e.screenX+e.innerWidth/2-242)+",top="+(e.innerHeight-580)/2)}var xt,Ft;p(),setTimeout(function(){xt=new WebSocket("ws://"+Ft+":8091")},2e3);var Ut,At,It,Ct,Pt,Tt,zt,Mt,xt,Et=!1;document.onkeypress=o;var Lt,Rt,Bt,Ot,Nt=0,Gt=0,Dt=!0,Jt=(new XMLHttpRequest,new XMLHttpRequest),_t=(new XMLHttpRequest,new XMLHttpRequest),jt=!1,Wt="Offline",Ht="",Vt="#FFFFFF",qt="",Kt="";document.onkeypress=o;var Bt,Ot;t(e).on("beforeunload",m);var Xt="v0.3.7",Yt="en",Zt={pl:{settings:"Ustawienia",unlimitedzoom:"Zoom",autozoom:"Auto zoom",names:"Wyłącz nazwy",autonames:"Autoukrywanie nazw",showmass:"Pokaż masę",automass:"Autoukrywanie masy",rainbowfood:"Kolorowy pokarm",autofood:"Autoukrywanie pokarmu",opponentscolors:"Kolory przeciwników",opponentsrings:"Ringi przeciwników",splitrange:"Zasięg podziału",virusrange:"Zasięg wirusów",transparentcells:"Przezroczyste kulki",transparentskins:"Przezroczyste skiny",skins:"Wyłącz skiny",onlyogarioskins:"Tylko skiny",customskins:"Tylko skiny graczy",drawgrid:"Pokaż siatkę",drawbackgroundsectors:"Sektory w tle",showmapborders:"Granice mapy",showminimap:"Pokaż minimapę",showfps:"Licznik FPS",showmassguides:"Wskaźniki masy",darktheme:"Ciemny motyw",nocolors:"Wyłącz kolory",simpledrawing:"Proste rysowanie",textshadows:"Cienie nazw",timetoremerge:"Czas do złączenia",cursortracking:"Śledzenie kursora",disableshift:"Wyłącz Shift",skipstats:"Pomiń statystyki",performancemode:"Performance mode",keys:"Klawisze",qkey:"Podwójny podział",wkey:"Karmienie",ekey:"Pauza kulki",pkey:"Performance mode",akey:"Strzał w wirusy",skey:"Statystyki",dkey:"Przełączanie kulki",fkey:"Pokaż/ukryj pokarm",zkey:"Reset zoomu",xkey:"Przełączanie miejsca śmierci",shiftkey:"Szybki podział",spacekey:"Podział",space:"Spacja",leaderboard:"Topka",currentmass:"Masa: ",bestmass:"Top: ",topmass:"Top gry: ",roundvictims:"Ofiary: ",totalvictims:"Top ofiar: ",food:"Pokarm: ",totalfood:"Top pokarmu: ",totaldeaths:"Smierci: ",roundtime:"Czas: ",gametime:"Czas gry: ",pause:"PAUZA!",modinfo:"AresBot",home:"Strona",exit:"AresBot: Czy na pewno chcesz opuścic grę?"},en:{settings:"AresBot settings",unlimitedzoom:"Zoom",autozoom:"Auto zoom",names:"No names",autonames:"Auto hide names",showmass:"Show mass",automass:"Auto hide mass",rainbowfood:"Rainbow food",autofood:"Auto hide food",opponentscolors:"Opponents colors",opponentsrings:"Opponents rings",splitrange:"Split range",virusrange:"Viruses range",transparentcells:"Transparent cells",transparentskins:"Transparent skins",skins:"No skins",onlyogarioskins:"Only skins",drawgrid:"Show grid",drawbackgroundsectors:"Background sectors",showmapborders:"Show map borders",showminimap:"Show minimap",showfps:"Show FPS",showmassguides:"Show mass guides",darktheme:"Dark theme",nocolors:"No colors",simpledrawing:"Simple drawing",textshadows:"Text shadows",timetoremerge:"Time to re-merge",cursortracking:"Cursor tracking",disableshift:"Disable Shift",skipstats:"Skip stats",performancemode:"Performance mode",keys:"Keys",qkey:"Double split",wkey:"Macro feed",ekey:"Cell pause",pkey:"Performance mode",akey:"Shoot viruses",skey:"Show stats",dkey:"Toggle cells",fkey:"Toggle food",zkey:"Reset zoom",xkey:"Switch death location",shiftkey:"Fast split",spacekey:"Split",space:"Space",leaderboard:"Leaderboard",currentmass:"Mass: ",bestmass:"Highest mass: ",topmass:"Game highest mass: ",roundvictims:"Kills: ",totalvictims:"Highest kills: ",food:"Food: ",totalfood:"Highest food: ",totaldeaths:"Total deaths: ",roundtime:"Time: ",gametime:"Game time: ",pause:"PAUSE!",modinfo:"AresBot",home:"Home",exit:"AresBot: Are you sure you want to quit the game?"}},$t={},Qt="michau;michau biauek;leszke;korwin;grzegorz braun;szczesc boze;jp2;linda;kosmonauta;chuj jebany;stulejarnosc;feels;smutna zaba;germandeathcamp;thanks doge;smutny piesek;pinionszek;ami;92gruszka;gruszka;anka-agar;blacksketch;bladi89;bolyss;ciepla_kupa;cimcirimci;davidmcpolska;d1ck;edward_kenway;empe666 wypok;filozofujaca;hansolony;hulajdusza;janusz-cebula;jayjay1337;kat_rzeznikow;kiku;michalek;oscyp33;polonium;psposki;ruszowaa;siabadabada;sialababamak;smashgoor;szymy;typowy_sebix;xaimeii;papaj;bean;kenny;benis;penis;mario;bender;bert;gaben;dolan;heisenberg;chuck;pikachu;slowpoke;pig;pedobear;rainbow;illuminati;coca cola;pepsi;cage;dupa;dupa wykop;quinn;rafalala;qas;agar online;albus dumbledor;albus;dumbledore;ginny weasley;harry potter;hermione;ron weasley;lord voldemort;draco malfoy;wykop peel;panda;polska;tymbark;kpr. wojtek;atari;amiga;marihuana;thug life;g2;vp;fnatic;tsm;cojawamzrobilem;neymar;koksy;policja;krzysiu jp;puchauke;pi;rain;deszcz;thunder;night;flower;trollface;troll;osama;sasha grey;wina tuska;wsk;sosnowiec;nevergonna;terminator;spyro;tiger bonzo;kobra bonzo;ordenminer;zoidberg;swidnik;chrome;firefox;cookie;lg;peppa pig;peppa;spongebob;vw;durex;france;russia;usa;brazil;portugal;israel;sweden;radagast;gandalf;cygan;wolsky;bpc;majsterroo;arstiard;arstard;kordian;vasili;forfiter;otozto;skurwysyny".split(";"),eo="wykop;#wykop;@wykop;wykop.pl;#wykop.pl;wypok;wypoczek".split(";"),to="mirko;#mirko;@mirko;mikro;tylko mirko;tylkomirko;#tylkomirko;@tylkomirko".split(";"),oo="#koksy;.( ͡° ͜ʖ ͡°);( ͡° ͜ʖ ͡°).;[pl]ziomek00725;wiktorkox100#ht;ϩảςℌǻ ɠɍ℮ɣ;฿ĭℊ ℬøƨƨ;ოﻪรէεгofﻪցﻪг皮;w=friend;w = friend;w=friends;w = friends;w=team;w = team;need a bro;ą          ę;świdnik;szczęść boże;ŋìċθļåĩ;乃ц尺ムズ;布拉克;kirmaz ㊗㊙;☂ƛȥȥɗɩɲ☂;ⱥめξทǥєʀ;ℜℯḱтɐℜ;ℬấℌọʐ ²¹;zyronik;ρʀøƒ 越;к∂©ℙєℜ;┆♕₭↑ℵǥ♕;ℚʊ@к℮432;ᎯᏝᎮℋᎯ;ј ฝ ☼ᎯᏝᎮℋᎯ;røŀєx ミ;๔єคtђรtг๏кє;ℛấʝọɳ (◣_◢);šєβǻ-ⓐⓖⓐⓡ;ⓐⓜⓘⓖⓐⓐⓖⓐⓡ;ѧᵭᵯѧӿɨᵴ;gαмєσνєя".split(";"),no="koksy;lennyface_left;lennyface_right;ziomek00725;wiktorkox100;sasha;sasha;masterofagar;wfriend;wfriend;wfriend;wfriend;wfriend;wfriend;wfriend;ae;swidnik;szczesc boze;nicolai;burak;atom;kirmaz;azzdin;avenger;rektar;bahoz;zyronik;prof;kacper;king;quake;alpha;alpha;rolex;deathstroke;rajon;sebaagar;amigaagar;admaxis;gameover".split(";"),ao="☢Ⓜ;㉹;㉿;〖ƝƁƘ〗;☠ⒻⓇ;ᓮᗯᗩᘐ;ƵŦ;ƵŦ★;ℛɨᎮ;ӍᏨ²;【☠】;ȺƧƤЄƇƬ✠;ฬℬ;『ℛนℵ』;《ℝ》;〘GѺ〙;ƬψƬ".split(";"),io="atomicmirko;et;kings;nbk;dfr;iwag;zt;zts;rip;mc2;scull;aspect;wumbo;run;reddit;go;tyt".split(";"),ro=Qt.concat(eo,to,oo),so={"☢Ⓜ":"#00C8FF"},lo={nick:"",clantag:"",skin:"",color:"#FF7800"},co={unlimitedzoom:!0,autozoom:!0,names:!0,autonames:!0,showmass:!0,automass:!0,rainbowfood:!1,autofood:!0,opponentscolors:!0,opponentsrings:!1,splitrange:!0,virusrange:!0,transparentcells:!0,transparentskins:!0,skins:!0,onlyogarioskins:!1,drawgrid:!1,drawbackgroundsectors:!0,showmapborders:!0,showminimap:!0,showfps:!0,showmassguides:!0,darktheme:!0,nocolors:!1,simpledrawing:!0,textshadows:!1,timetoremerge:!0,cursortracking:!0,disableshift:!1,skipstats:!1,performancemode:!1},uo=null,ho=null,po=null,go=null,fo=7,mo=7,yo=!1,ko=!1,bo=!1,vo=1,wo=0,So=0,xo=0,Fo=0,Uo=!0,Ao={},Io=0,Co=0,Po=0,To=0,zo=0,Mo=0,Eo=0,Lo=0,Ro=3,Bo="",Oo="http://aresbot.com/",No=!1,Go=!0,Do=[],Jo=0,_o=0,jo=0,Wo=0,Ho=0,Vo=0,qo=null,Ko=null,Xo=null,Yo=null,Zo=null,$o=null,Qo=null,en=0,tn=0,on=null,nn=0,an=0,rn=null,sn=null,ln=null,cn=null,dn=null,un=null,hn=null,pn=null,gn=null,fn=null,mn=null,yn=null,kn=null,bn=null,vn=!1,wn=!1,Sn=!1,xn=!1,Fn=!1,Un=!1,An=!1,In=!1,Cn=!1,Pn=!1;e.nextServer=function(){return":party"===Bo?void e.createParty():void Pe()},e.setSettings=function(e,t){co.hasOwnProperty(e)&&null!=t&&(co[e]=t,"performancemode"===e&&pe(!0),"darktheme"===e&&ge(),b())},e.copyToken=function(){var e=t(".partyToken:visible")[0];e.setSelectionRange(0,e.value.length),e.select();try{document.execCommand("copy")}catch(t){}},e.runBots=function(){g(token)},t(function(){fe(t)});var Tn=document.createElement("canvas");if("undefined"==typeof console||"undefined"==typeof DataView||"undefined"==typeof WebSocket||null==Tn||null==Tn.getContext||null==e.localStorage)alert("You browser does not support this game, we recommend you to use Firefox to play this");else{var zn={};!function(){var t=e.location.search;"?"==t.charAt(0)&&(t=t.slice(1));for(var t=t.split("&"),o=0;o<t.length;o++){var n=t[o].split("=");zn[n[0]]=n[1]}}(),e.queryString=zn;var Mn="fb"in zn,En="miniclip"in zn,Ln=function(){me("",-1)},Rn="http:"!=e.location.protocol,Bn="1"==ye(),On=!1;if(Mn||En?console.log("in fb and stuff"):Rn&&!Bn?(console.log("redirecting"),me("1",1),e.location.href="http:"+e.location.href.substring(e.location.protocol.length),On=!0):me("",-1),Rn||me("",-1),On||setTimeout(Ln,3e3),e.MC=function(){},void 0!=e.EnvConfig){var Nn=e.EnvConfig;e.EnvConfig=Nn}if(!e.agarioNoInit){var Gn=e.location.protocol,Dn="https:"==Gn;zn.master&&(Nn.master_url=zn.master);var Jn=Gn+"//"+Nn.master_url+"/",_n=e.navigator.userAgent;if(-1!=_n.indexOf("Android"))e.ga&&e.ga("send","event","MobileRedirect","PlayStore"),setTimeout(function(){e.location.href="https://play.google.com/store/apps/details?id=com.miniclip.agar.io"},1e3);else if(-1!=_n.indexOf("iPhone")||-1!=_n.indexOf("iPad")||-1!=_n.indexOf("iPod"))e.ga&&e.ga("send","event","MobileRedirect","AppStore"),setTimeout(function(){e.location.href="https://itunes.apple.com/app/agar.io/id995999703?mt=8&at=1l3vajp"},1e3);else{var jn={};e.agarApp=jn;var Wn,Hn,Vn,qn,Kn,Xn=null,Yn=null,Zn=0,$n=0,Qn=[],ea=[],ta={},oa=[],na=[],aa=[],ia=0,ra=0,sa=-1,la=-1,ca=0,da=0,ua=0,ha=null,pa=0,ga=0,fa=1e4,ma=1e4,ya=1,ka=null,ba=!0,va=!0,wa=!1,Sa=!1,xa=0,Fa=!1,Ua=!1,Aa=Zn=~~((pa+fa)/2),Ia=$n=~~((ga+ma)/2),Ca=1,Pa="",Ta=null,za=!1,Ma=!1,Ea=0,La=0,Ra=0,Ba=0,Oa=["#333333","#FF3333","#33FF33","#3333FF"],Na=!1,Ga=!1,Da=0,Ja=1,_a=1,ja=!1,Wa=0,Ha=!1,Va=null,qa=!1,Ka=new Image;Ka.src="/img/background.png";var Xa="ontouchstart"in e&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e.navigator.userAgent),Ya=new Image;Ya.src="/img/split.png";var Za,$a,Qa=!1;"gamepad"in zn&&setInterval(function(){Qa&&(ia=mi.fa(ia,Za),ra=mi.fa(ra,$a))},25),e.gamepadAxisUpdate=function(e,t){var o=.1>t*t;0==e&&(o?Za=qn/2:(Za=(t+1)/2*qn,Qa=!0)),1==e&&(o?$a=Kn/2:($a=(t+1)/2*Kn,Qa=!0))};var ei=null;e.setNick=function(o){ha=w(o,t("#clantag").val(),"",t("#color").val()),e.ga&&e.ga("send","event","Nick",ha.toLowerCase()),xe(),De(),xa=0,v(!0)},e.setRegion=Fe;var ti=!0;e.setSkins=function(e){ba=e},e.setNames=function(e){va=e},e.setDarkTheme=function(e){Fa=e},e.setColors=function(e){wa=e},e.setShowMass=function(e){Ua=e},e.spectate=function(){ha=null,We(1),xe(),ko=!1},e.setGameMode=function(e){e!=Pa&&(":party"==Pa&&t("#helloContainer").attr("data-party-state","0"),Ae(e),":party"!=e&&Te())},e.setAcid=function(e){Na=e},t.get(Gn+"//gc.agar.io",function(e){var t=e.split(" ");e=t[0],t=t[1]||"",ni.hasOwnProperty(e)&&("string"==typeof ni[e]?ka||Fe(ni[e]):ni[e].hasOwnProperty(t)&&(ka||Fe(ni[e][t])))},"text");var oi=function(o){var n={};return o.init=function(){jn.account.init(),jn.google.oa(),jn.ea.init()},o.bind=function(e,o){t(n).bind(e,o)},o.unbind=function(e,o){t(n).unbind(e,o)},o.trigger=function(e){t(n).trigger(e)},o.__defineGetter__("proxy",function(){return e.MC}),o}({});jn.core=oi,jn.cache={};var ni={AF:"JP-Tokyo",AX:"EU-London",AL:"EU-London",DZ:"EU-London",AS:"SG-Singapore",AD:"EU-London",AO:"EU-London",AI:"US-Atlanta",AG:"US-Atlanta",AR:"BR-Brazil",AM:"JP-Tokyo",AW:"US-Atlanta",AU:"SG-Singapore",AT:"EU-London",AZ:"JP-Tokyo",BS:"US-Atlanta",BH:"JP-Tokyo",BD:"JP-Tokyo",BB:"US-Atlanta",BY:"EU-London",BE:"EU-London",BZ:"US-Atlanta",BJ:"EU-London",BM:"US-Atlanta",BT:"JP-Tokyo",BO:"BR-Brazil",BQ:"US-Atlanta",BA:"EU-London",BW:"EU-London",BR:"BR-Brazil",IO:"JP-Tokyo",VG:"US-Atlanta",BN:"JP-Tokyo",BG:"EU-London",BF:"EU-London",BI:"EU-London",KH:"JP-Tokyo",CM:"EU-London",CA:"US-Atlanta",CV:"EU-London",KY:"US-Atlanta",CF:"EU-London",TD:"EU-London",CL:"BR-Brazil",CN:"CN-China",CX:"JP-Tokyo",CC:"JP-Tokyo",CO:"BR-Brazil",KM:"EU-London",CD:"EU-London",CG:"EU-London",CK:"SG-Singapore",CR:"US-Atlanta",CI:"EU-London",HR:"EU-London",CU:"US-Atlanta",CW:"US-Atlanta",CY:"JP-Tokyo",CZ:"EU-London",DK:"EU-London",DJ:"EU-London",DM:"US-Atlanta",DO:"US-Atlanta",EC:"BR-Brazil",EG:"EU-London",SV:"US-Atlanta",GQ:"EU-London",ER:"EU-London",EE:"EU-London",ET:"EU-London",FO:"EU-London",FK:"BR-Brazil",FJ:"SG-Singapore",FI:"EU-London",FR:"EU-London",GF:"BR-Brazil",PF:"SG-Singapore",GA:"EU-London",GM:"EU-London",GE:"JP-Tokyo",DE:"EU-London",GH:"EU-London",GI:"EU-London",GR:"EU-London",GL:"US-Atlanta",GD:"US-Atlanta",GP:"US-Atlanta",GU:"SG-Singapore",GT:"US-Atlanta",GG:"EU-London",GN:"EU-London",GW:"EU-London",GY:"BR-Brazil",HT:"US-Atlanta",VA:"EU-London",HN:"US-Atlanta",HK:"JP-Tokyo",HU:"EU-London",IS:"EU-London",IN:"JP-Tokyo",ID:"JP-Tokyo",IR:"JP-Tokyo",IQ:"JP-Tokyo",IE:"EU-London",IM:"EU-London",IL:"JP-Tokyo",IT:"EU-London",JM:"US-Atlanta",JP:"JP-Tokyo",JE:"EU-London",JO:"JP-Tokyo",KZ:"JP-Tokyo",KE:"EU-London",KI:"SG-Singapore",KP:"JP-Tokyo",KR:"JP-Tokyo",KW:"JP-Tokyo",KG:"JP-Tokyo",LA:"JP-Tokyo",LV:"EU-London",LB:"JP-Tokyo",LS:"EU-London",LR:"EU-London",LY:"EU-London",LI:"EU-London",LT:"EU-London",LU:"EU-London",MO:"JP-Tokyo",MK:"EU-London",MG:"EU-London",MW:"EU-London",MY:"JP-Tokyo",MV:"JP-Tokyo",ML:"EU-London",MT:"EU-London",MH:"SG-Singapore",MQ:"US-Atlanta",MR:"EU-London",MU:"EU-London",YT:"EU-London",MX:"US-Atlanta",FM:"SG-Singapore",MD:"EU-London",MC:"EU-London",MN:"JP-Tokyo",ME:"EU-London",MS:"US-Atlanta",MA:"EU-London",MZ:"EU-London",MM:"JP-Tokyo",NA:"EU-London",NR:"SG-Singapore",NP:"JP-Tokyo",NL:"EU-London",NC:"SG-Singapore",NZ:"SG-Singapore",NI:"US-Atlanta",NE:"EU-London",NG:"EU-London",NU:"SG-Singapore",NF:"SG-Singapore",MP:"SG-Singapore",NO:"EU-London",OM:"JP-Tokyo",PK:"JP-Tokyo",PW:"SG-Singapore",PS:"JP-Tokyo",PA:"US-Atlanta",PG:"SG-Singapore",PY:"BR-Brazil",PE:"BR-Brazil",PH:"JP-Tokyo",PN:"SG-Singapore",PL:"EU-London",PT:"EU-London",PR:"US-Atlanta",QA:"JP-Tokyo",RE:"EU-London",RO:"EU-London",RU:"RU-Russia",RW:"EU-London",BL:"US-Atlanta",SH:"EU-London",KN:"US-Atlanta",LC:"US-Atlanta",MF:"US-Atlanta",PM:"US-Atlanta",VC:"US-Atlanta",WS:"SG-Singapore",SM:"EU-London",ST:"EU-London",SA:"EU-London",SN:"EU-London",RS:"EU-London",SC:"EU-London",SL:"EU-London",SG:"JP-Tokyo",SX:"US-Atlanta",SK:"EU-London",SI:"EU-London",SB:"SG-Singapore",SO:"EU-London",ZA:"EU-London",SS:"EU-London",ES:"EU-London",LK:"JP-Tokyo",SD:"EU-London",SR:"BR-Brazil",SJ:"EU-London",SZ:"EU-London",SE:"EU-London",CH:"EU-London",SY:"EU-London",TW:"JP-Tokyo",TJ:"JP-Tokyo",TZ:"EU-London",TH:"JP-Tokyo",TL:"JP-Tokyo",TG:"EU-London",TK:"SG-Singapore",TO:"SG-Singapore",TT:"US-Atlanta",TN:"EU-London",TR:"TK-Turkey",TM:"JP-Tokyo",TC:"US-Atlanta",TV:"SG-Singapore",UG:"EU-London",UA:"EU-London",AE:"EU-London",GB:"EU-London",US:"US-Atlanta",UM:"SG-Singapore",VI:"US-Atlanta",UY:"BR-Brazil",UZ:"JP-Tokyo",VU:"SG-Singapore",VE:"BR-Brazil",VN:"JP-Tokyo",WF:"SG-Singapore",EH:"EU-London",YE:"JP-Tokyo",ZM:"EU-London",ZW:"EU-London"},ai=null;e.connect=Me;var ii=500,ri=-1,si=-1;e.sendMitosis=Je,e.sendEject=_e,e.refreshPlayerInfo=function(){We(253)},jn.I=function(e){var t={GG:"google",FB:"facebook"};return e.Ca=t,e.M=function(e,o){if(je()&&!0!==jn.cache.sentGameServerLogin){var n=null;switch(o){case t.GG:n=2;break;case t.FB:n=1}if(null!=n){var a=Ee(2+e.length);for(a.setUint8(0,82),a.setUint8(1,n),n=0;n<e.length;++n)a.setUint8(2+n,e.charCodeAt(n));Le(a),jn.cache.sentGameServerLogin=!0}}},e}({});var li=null,ci=1,di=function(){var t=Date.now(),o=1e3/60;return function(){e.requestAnimationFrame(di),co.showfps&&V();var n=Date.now(),a=n-t;a>o&&(t=n-a%o,!je()||240>Date.now()-Da?Ke():console.warn("Skipping draw"),Ai())}}(),ui="poland;usa;china;russia;canada;australia;spain;brazil;germany;ukraine;france;sweden;chaplin;north korea;south korea;japan;united kingdom;earth;greece;latvia;lithuania;estonia;finland;norway;cia;maldivas;austria;nigeria;reddit;yaranaika;confederate;9gag;indiana;4chan;italy;bulgaria;tumblr;2ch.hk;hong kong;portugal;jamaica;german empire;mexico;sanik;switzerland;croatia;chile;indonesia;bangladesh;thailand;iran;iraq;peru;moon;botswana;bosnia;netherlands;european union;taiwan;pakistan;hungary;satanist;qing dynasty;matriarchy;patriarchy;feminism;ireland;texas;facepunch;prodota;cambodia;steam;piccolo;ea;india;kc;denmark;quebec;ayy lmao;sealand;bait;tsarist russia;origin;vinesauce;stalin;belgium;luxembourg;stussy;prussia;8ch;argentina;scotland;sir;romania;belarus;wojak;doge;nasa;byzantium;imperial japan;french kingdom;somalia;turkey;mars;pokerface;8;irs;receita federal;facebook;putin;merkel;tsipras;obama;kim jong-un;dilma;hollande;berlusconi;cameron;clinton;hillary;venezuela;blatter;chavez;cuba;fidel;merkel;palin;queen;boris;bush;trump;hitler;nazi;ussr".split(";"),hi="8;nasa;putin;merkel;tsipras;obama;kim jong-un;dilma;hollande;berlusconi;cameron;clinton;hillary;blatter;chavez;fidel;merkel;palin;queen;boris;bush;trump".split(";"),pi={};tt.prototype={Z:null,x:0,y:0,f:0,b:0};var gi=-1,fi=!1;ot.prototype={id:0,a:null,name:null,i:null,P:null,x:0,y:0,size:0,s:0,u:0,o:0,J:0,K:0,g:0,da:0,S:0,ka:0,G:!1,c:!1,h:!1,T:!0,ca:0,C:null,ha:0,ba:function(){var e;for(e=0;e<oa.length;e++)if(oa[e]==this){oa.splice(e,1);break}delete ta[this.id],e=ea.indexOf(this),-1!=e&&(Sa=!0,ea.splice(e,1)),e=Qn.indexOf(this.id),-1!=e&&Qn.splice(e,1),this.G=!0,0<this.ca&&na.push(this)},m:function(){return Math.max(~~(.3*this.size),24)},A:function(e){(this.name=e)&&(null==this.i?this.i=new at(this.m(),"#FFFFFF",co.performancemode?!1:co.textshadows,"#000000"):this.i.N(this.m()),this.i.B(this.name))},$:function(){for(var e=this.H();this.a.length>e;){var t=~~(Math.random()*this.a.length);this.a.splice(t,1)}for(0==this.a.length&&e>0&&this.a.push(new tt(this,this.x,this.y,this.size,Math.random()-.5));this.a.length<e;)t=~~(Math.random()*this.a.length),t=this.a[t],this.a.push(new tt(this,t.x,t.y,t.f,t.b))},H:function(){var e=10;20>this.size&&(e=0),this.c&&(e=30);var t=this.size;return this.c||(t*=ya),t*=ci,~~Math.max(t,e)},ua:function(){this.$();for(var e=this.a,t=e.length,o=0;t>o;++o){var n=e[(o-1+t)%t].b,a=e[(o+1)%t].b;e[o].b+=(Math.random()-.5)*(this.h?3:1),e[o].b*=.7,10<e[o].b&&(e[o].b=10),-10>e[o].b&&(e[o].b=-10),e[o].b=(n+a+8*e[o].b)/10}for(var i=this,r=this.c?0:(this.id/1e3+da/1e4)%(2*Math.PI),s=0,o=0;t>o;++o){var l=e[o].f,n=e[(o-1+t)%t].f,a=e[(o+1)%t].f;if(15<this.size&&null!=Xn&&20<this.size*ya&&0<this.id){var c=!1,d=e[o].x,u=e[o].y;Xn.xa(d-5,u-5,10,10,function(e){e.Z!=i&&25>(d-e.x)*(d-e.x)+(u-e.y)*(u-e.y)&&(c=!0)}),!c&&(e[o].x<pa||e[o].y<ga||e[o].x>fa||e[o].y>ma)&&(c=!0),c&&(0<e[o].b&&(e[o].b=0),--e[o].b)}l+=e[o].b,0>l&&(l=0),l=this.h?(19*l+this.size)/20:(12*l+this.size)/13,e[o].f=(n+a+8*l)/10,n=2*Math.PI/t,a=this.a[o].f,this.c&&0==o%2&&(a+=5),e[o].x=this.x+Math.cos(n*o+r)*a,e[o].y=this.y+Math.sin(n*o+r)*a,s=Math.max(s,a)}this.ha=s},R:function(){if(0>=this.id)return 1;var e;e=(da-this.S)/120,e=0>e?0:e>1?1:e;var t=0>e?0:e>1?1:e;if(this.G&&t>=1){var o=na.indexOf(this);-1!=o&&na.splice(o,1)}return this.x=e*(this.J-this.s)+this.s,this.y=e*(this.K-this.u)+this.u,this.size=t*(this.g-this.o)+this.o,.01>Math.abs(this.size-this.g)&&(this.size=this.g),t},O:function(){return 0>=this.id?!0:this.x+this.size+40<Zn-qn/2/ya||this.y+this.size+40<$n-Kn/2/ya||this.x-this.size-40>Zn+qn/2/ya||this.y-this.size-40>$n+Kn/2/ya?!1:!0},w:function(e){if(this.O()){var t=null,o=0;++this.ca;var n=0<this.id&&!this.c&&!this.h&&(co.simpledrawing||co.performancemode||.4>ya);if(5>this.H()&&0<this.id&&(n=!0),this.T&&!n)for(var a=0;a<this.a.length;a++)this.a[a].f=this.size;if(this.T=n,this.isFood&&(!Go||(co.autofood||co.performancemode)&&(!S()||So>1e3)))return;e.save(),this.ka=da;var i=this.R();this.G&&(e.globalAlpha*=1-i),e.lineWidth=10,e.lineCap="round",e.lineJoin=this.c?"miter":"round";var a=this.name.toLowerCase(),r=null,s=null,i=!1,l=this.color;this.isVirus||this.isFood||this.h||!co.skins||":teams"==Bo||co.performancemode&&!this.isMyCell||(!co.onlyogarioskins&&(t=et(this.C)),null!=t?l=co.opponentscolors?l:Qe(this.C)||l:t=he(this.name),null!=t&&-1!=hi.indexOf(a)&&(i=!0)),co.nocolors?(e.fillStyle="#FFFFFF",e.strokeStyle="#AAAAAA"):(e.fillStyle=l,e.strokeStyle=l),this.isVirus&&this.strokeColor&&(e.strokeStyle=this.strokeColor);var c=S()&&co.opponentscolors&&!co.opponentsrings&&null!=t;if(n)c?o=-10:this.isFood&&(o=5),e.beginPath(),e.arc(this.x,this.y,this.size+o,0,2*Math.PI,!1);else for(this.ua(),e.beginPath(),l=this.H(),e.moveTo(this.a[0].x,this.a[0].y),a=1;l>=a;++a){var d=a%l;e.lineTo(this.a[d].x,this.a[d].y)}if(e.closePath(),co.transparentcells?(this.isFood||this.isVirus||(e.globalAlpha=.8),this.isVirus&&(e.globalAlpha=.5)):e.globalAlpha=1,c?(e.lineWidth=20,e.stroke()):n||e.stroke(),e.fill(),this.isFood)return void e.restore();if(this.isVirus&&e.stroke(),e.globalAlpha=1,null!=t&&(this.ia(e,t,n,o),null!=s&&this.ia(e,s,n,o,{alpha:Math.sin(.0174*gi)})),(co.nocolors||15<this.size)&&!n&&(e.strokeStyle="#000000",e.globalAlpha*=.1,e.stroke()),e.globalAlpha=1,n=~~this.y,!this.isVirus&&this.isShiftable&&(e.beginPath(),e.arc(this.x,this.y,this.size+o-5,0,2*Math.PI,!1),e.closePath(),e.strokeStyle="#FFFFFF",e.lineWidth=10,e.stroke()),co.performancemode&&this.isMyCell&&this.myCellIndex!=Co)return void e.restore();if(0!=this.id&&(co.names||this.isMyCell)&&this.name&&this.i&&!i&&!(this.hideInfo&&(co.autonames||co.performancemode))&&(s=this.i,s.B(this.name),s.N(this.m()*(this.isVirus?Ro:1)),i=0>=this.id?1:Math.ceil(10*ya)/10,s.ja(i),s=s.L(),a=Math.ceil(s.width/i),l=Math.ceil(s.height/i),e.drawImage(s,~~this.x-~~(a/2),n-~~(l/2),a,l),n+=s.height/(1.25*i)),this.size<40||this.isVirus||this.hideInfo&&(co.automass||co.performancemode))return void e.restore();0<this.id&&co.showmass&&(null==this.P&&(this.P=new at(this.m()/.9,"#FFFFFF",co.performancemode?!1:co.textshadows,"#000000")),r=this.P,r.N(this.m()/.9),r.B(~~(this.size*this.size/100)),i=Math.ceil(10*ya)/10,r.ja(i),s=r.L(),a=Math.ceil(s.width/i),l=Math.ceil(s.height/i),e.drawImage(s,~~this.x-~~(a/2),n-~~(l/2),a,l)),e.restore()}},ia:function(e,t,o,n,a){e.save(),e.clip();var i=o?this.size+n:Math.max(this.size,this.ha);null!=a&&null!=a.alpha&&(e.globalAlpha=a.alpha),co.transparentskins&&(e.globalAlpha=.75),o?e.drawImage(t,this.x-i,this.y-i,2*i,2*i):e.drawImage(t,this.x-i-5,this.y-i-5,2*i+10,2*i+10),e.restore()}},ot.prototype.createTime=null,ot.prototype.ttr=null,ot.prototype.sizeRatio=null,ot.prototype.newColor=null,ot.prototype.strokeColor=null,ot.prototype.myCellIndex=null,ot.prototype.isMyCell=!1,ot.prototype.isVirus=!1,ot.prototype.isFood=!1,ot.prototype.isShiftable=!1,ot.prototype.hideInfo=!1,ot.prototype.drawSplitRange=function(e){co.performancemode&&this.isMyCell&&this.myCellIndex!=Co||co.splitrange&&(this.isMyCell||this.sizeRatio&&this.sizeRatio>=2.5)&&this.size>59&&(e.beginPath(),e.arc(this.x,this.y,this.size+760,0,2*Math.PI,!1),e.closePath(),e.globalAlpha=.4,co.darktheme||this.isMyCell||(e.globalAlpha*=.4),e.lineWidth=4,this.isMyCell?(e.strokeStyle="#FF7800",this.myCellIndex==Co?(x()&&(e.lineWidth=6,e.strokeStyle=co.darktheme?"#FFFFFF":"#222222"),e.stroke(),co.performancemode||(e.beginPath(),e.arc(this.x,this.y,820,0,2*Math.PI,!1),e.closePath(),e.lineWidth=2,e.stroke())):e.stroke()):(co.opponentsrings&&":teams"!=Bo?e.strokeStyle=this.newColor:e.strokeStyle=this.color,e.stroke()))},ot.prototype.drawOgarioLayer=function(e){if((!co.performancemode||!this.isVirus)&&this.O()){if(e.save(),e.globalAlpha*=1-this.R(),e.lineWidth=10,e.lineCap="round",e.lineJoin="round",co.virusrange&&this.isVirus&&(e.beginPath(),e.arc(this.x,this.y,this.size+820,0,2*Math.PI,!1),e.closePath(),e.globalAlpha="#C80000"==this.color?.2:.1,co.darktheme||(e.globalAlpha*=.5),e.fillStyle=this.color,e.fill()),this.isVirus)return void e.restore();if(this.drawSplitRange(e),co.performancemode)return void e.restore();co.opponentsrings&&!this.isMyCell&&this.size>40&&(e.beginPath(),e.arc(this.x,this.y,this.size+16+2/vo,0,2*Math.PI,!1),e.closePath(),
e.globalAlpha=.75,e.lineWidth=10+1/vo,e.strokeStyle=this.newColor,e.stroke()),co.cursortracking&&this.isMyCell&&(e.beginPath(),e.moveTo(this.x,this.y),e.lineTo(zo,Mo),e.globalAlpha=co.darktheme?.7:.35,e.lineWidth=2,e.strokeStyle=co.darktheme?"#FFFFFF":"#000000",e.stroke()),e.restore()}};var mi=function(e){function t(e,t,o){return t>e?t:e>o?o:e}return e.fa=function(e,o){var n;return n=t(.5,0,1),e+n*(o-e)},e.Ba=t,e}({});e.Maths=mi,at.prototype={F:"",U:"#000000",W:!1,X:"#000000",v:16,j:null,V:null,l:!1,D:1,N:function(e){this.v!=e&&(this.v=e,this.l=!0)},ja:function(e){this.D!=e&&(this.D=e,this.l=!0)},B:function(e){e!=this.F&&(this.F=e,this.l=!0)},L:function(){if(null==this.j&&(this.j=document.createElement("canvas"),this.V=this.j.getContext("2d")),this.l){this.l=!1;var e=this.j,t=this.V,o=this.F,n=this.D,a=this.v,i=a+"px Ubuntu";t.font=i;var r=~~(.2*a);e.width=(t.measureText(o).width+6)*n,e.height=(a+r)*n,t.font=i,t.scale(n,n),t.globalAlpha=1,t.lineWidth=3,t.strokeStyle=this.X,t.fillStyle=this.U,this.W&&t.strokeText(o,3,a-r/2),t.fillText(o,3,a-r/2)}return this.j}},Date.now||(Date.now=function(){return(new Date).getTime()}),function(){for(var t=["ms","moz","webkit","o"],o=0;o<t.length&&!e.requestAnimationFrame;++o)e.requestAnimationFrame=e[t[o]+"RequestAnimationFrame"],e.cancelAnimationFrame=e[t[o]+"CancelAnimationFrame"]||e[t[o]+"CancelRequestAnimationFrame"];e.requestAnimationFrame||(e.requestAnimationFrame=function(e){return setTimeout(e,1e3/60)},e.cancelAnimationFrame=function(e){clearTimeout(e)})}();var yi={init:function(e){function t(e){return n>e&&(e=n),e>i&&(e=i),~~((e-n)/32)}function o(e){return a>e&&(e=a),e>r&&(e=r),~~((e-a)/32)}var n=e.sa,a=e.ta,i=e.qa,r=e.ra,s=~~((i-n)/32)+1,l=~~((r-a)/32)+1,c=Array(s*l);return{na:function(e){var n=t(e.x)+o(e.y)*s;null==c[n]?c[n]=e:Array.isArray(c[n])?c[n].push(e):c[n]=[c[n],e]},xa:function(e,n,a,i,r){var l=t(e),d=o(n);for(e=t(e+a),n=o(n+i);n>=d;++d)for(i=l;e>=i;++i)if(a=c[i+d*s],null!=a)if(Array.isArray(a))for(var u=0;u<a.length;u++)r(a[u]);else r(a)}}}},ki=function(){var e=new ot(0,0,0,32,"#ED1C24",""),t=document.createElement("canvas");t.width=32,t.height=32;var o=t.getContext("2d");return function(){0<ea.length&&(e.color=ea[0].color,e.A(ea[0].name)),o.clearRect(0,0,32,32),o.save(),o.translate(16,16),o.scale(.4,.4),e.w(o),o.restore();var n=document.getElementById("favicon"),a=n.cloneNode(!0);a.setAttribute("href",t.toDataURL("image/png")),n.parentNode.replaceChild(a,n)}}();t(function(){ki()});var bi={context:null,defaultProvider:"facebook",loginIntent:"0",userInfo:{socialToken:null,tokenExpires:"",level:"",xp:"",xpNeeded:"",name:"",picture:"",displayName:"",loggedIn:"0",socialId:""}},vi=e.defaultSt=bi;e.storageInfo=vi,e.createDefaultStorage=rt,e.updateStorage=lt,t(function(){null!=e.localStorage.storeObjectInfo&&(vi=JSON.parse(e.localStorage.storeObjectInfo)),"1"==vi.loginIntent&&st(vi.context),""==vi.userInfo.name&&""==vi.userInfo.displayName||ct(vi.userInfo)}),e.checkLoginStatus=function(){"1"==vi.loginIntent&&(wi(),st(vi.context))};var wi=function(){e.MC.setProfilePicture(vi.userInfo.picture),e.MC.setSocialId(vi.userInfo.socialId)};e.logout=function(){vi=bi,delete e.localStorage.storeObjectInfo,e.localStorage.storeObjectInfo=JSON.stringify(bi),lt(),Ui(),jn.cache.sentGameServerLogin=!1,delete jn.cache.login_info,t("#helloContainer").attr("data-logged-in","0"),t("#helloContainer").attr("data-has-account-data","0"),t(".timer").text(""),t("#gPlusShare").hide(),t("#fbShare").show(),t("#user-id-tag").text(""),Te(),e.MC.doLogout()},e.toggleSocialLogin=function(){t("#socialLoginContainer").toggle(),t("#settings").hide(),t("#instructions").hide(),ut()},e.toggleSettings=function(){t("#settings").toggle(),t("#socialLoginContainer").hide(),t("#instructions").hide(),ut()},jn.account=function(e){function o(){}function n(){console.log("got user login")}return e.init=function(){jn.core.bind("user_login",n),jn.core.bind("user_logout",o)},e.setUserData=function(e){ct(e)},e.setAccountData=function(e,o){var n=t("#helloContainer").attr("data-has-account-data","1");vi.userInfo.xp=e.xp,vi.userInfo.xpNeeded=e.xpNeeded,vi.userInfo.level=e.level,lt(),n&&o?dt(e):(t(".agario-profile-panel .progress-bar-star").text(e.level),t(".agario-exp-bar .progress-bar-text").text(e.xp+"/"+e.xpNeeded+" XP"),t(".agario-exp-bar .progress-bar").css("width",(88*e.xp/e.xpNeeded).toFixed(2)+"%"))},e.za=function(e){dt(e)},e}({});var Si=0;e.fbAsyncInit=function(){function t(){null==e.FB?alert("You seem to have something blocking Facebook on your browser, please check for any extensions"):(vi.loginIntent="1",e.updateStorage(),e.FB.login(function(e){ht(e)},{scope:"public_profile, email"}))}e.FB.init({appId:Nn.fb_app_id,cookie:!0,xfbml:!0,status:!0,version:"v2.2"}),("1"==e.storageInfo.loginIntent&&"facebook"==e.storageInfo.context||Mn)&&e.FB.getLoginStatus(function(o){"connected"===o.status?ht(o):"not_authorized"===o.status?(e.logout(),t()):e.logout()}),e.facebookRelogin=t,e.facebookLogin=t};var xi=!1;!function(o){function n(){var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src="//apis.google.com/js/client:platform.js?onload=gapiAsyncInit";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t),i=!0}var a={},i=!1;return e.gapiAsyncInit=function(){t(a).trigger("initialized")},o.google={oa:function(){n()},ma:function(t,o){e.gapi.client.load("plus","v1",function(){console.log("fetching me profile"),gapi.client.plus.people.get({userId:"me"}).execute(function(e){o(e)})})}},o.wa=function(e){i||n(),"undefined"!=typeof gapi?e():t(a).bind("initialized",e)},o}(jn);var Fi=function(o){function n(t){e.MC.doLoginWithGPlus(t),jn.cache.login_info=[t,"google"],jn.I.M(t,"google")}function a(e){vi.userInfo.picture=e,t(".agario-profile-picture").attr("src",e)}var i=null,r={client_id:Nn.gplus_client_id,cookie_policy:"single_host_origin",scope:"profile email"};return o.ea={Y:function(){return i},init:function(){var t=this,o=vi&&"1"==vi.loginIntent&&"google"==vi.context;jn.wa(function(){e.gapi.ytsubscribe.go("agarYoutube"),e.gapi.load("auth2",function(){i=e.gapi.auth2.init(r),i.attachClickHandler(document.getElementById("gplusLogin"),{},function(e){console.log("googleUser : "+e)},function(e){console.log("failed to login in google plus: ",JSON.stringify(e,void 0,2))}),i.currentUser.listen(_.bind(t.va,t)),o&&1==i.isSignedIn.get()&&i.signIn()})})},va:function(t){if(i&&t&&i.isSignedIn.get()&&!xi){xi=!0,vi.loginIntent="1";var o=t.getAuthResponse(),r=o.access_token;e.Y=o,console.log("loggedIn with G+!");var s=t.getBasicProfile();t=s.getImageUrl(),void 0==t?jn.google.ma(o,function(t){t.result.isPlusUser?(t&&a(t.image.url),n(r),t&&(vi.userInfo.picture=t.image.url),vi.userInfo.socialId=s.getId(),wi()):(alert("Please add Google+ to your Google account and try again.\nOr you can login with another account."),e.logout())}):(a(t),vi.userInfo.picture=t,vi.userInfo.socialId=s.getId(),wi(),n(r)),vi.context="google",e.updateStorage()}},pa:function(){i&&(i.signOut(),xi=!1)}},o}(jn);e.gplusModule=Fi;var Ui=function(){jn.ea.pa()};e.logoutGooglePlus=Ui;var Ai=function(){function e(e,t,o,n,a){var i=t.getContext("2d"),r=t.width;t=t.height,e.color=a,e.A(o),e.size=n,i.save(),i.translate(r/2,t/2),e.w(i),i.restore()}for(var o=new ot(-1,0,0,32,"#5bc0de",""),n=new ot(-1,0,0,32,"#5bc0de",""),a="#0791ff #5a07ff #ff07fe #ffa507 #ff0774 #077fff #3aff07 #ff07ed #07a8ff #ff076e #3fff07 #ff0734 #07ff20 #ff07a2 #ff8207 #07ff0e".split(" "),i=[],r=0;r<a.length;++r){var s=r/a.length*12,l=30*Math.sqrt(r/a.length);i.push(new ot(-1,Math.cos(s)*l,Math.sin(s)*l,10,a[r],""))}it(i);var c=document.createElement("canvas");return c.getContext("2d"),c.width=c.height=70,e(n,c,"",26,"#ebc0de"),function(){t(".cell-spinner").filter(":visible").each(function(){var n=t(this),a=Date.now(),i=this.width,r=this.height,s=this.getContext("2d");s.clearRect(0,0,i,r),s.save(),s.translate(i/2,r/2);for(var l=0;10>l;++l)s.drawImage(c,(.1*a+80*l)%(i+140)-i/2-70-35,r/2*Math.sin((.001*a+l)%Math.PI*2)-35,70,70);s.restore(),(n=n.attr("data-itr"))&&(n=Ce(n)),e(o,this,n||"",+t(this).attr("data-size"),"#5bc0de")}),t("#statsPellets").filter(":visible").each(function(){t(this);var o=this.width,n=this.height;for(this.getContext("2d").clearRect(0,0,o,n),o=0;o<i.length;o++)e(i[o],this,"",i[o].size,i[o].color)})}}();e.createParty=function(){Ae(":party"),ai=function(o){gt("/#"+e.encodeURIComponent(o)),t(".partyToken").val("agar.io/#"+e.encodeURIComponent(o)),t(".party-info-token").text("http://agar.io/#"+e.encodeURIComponent(o)),token=e.encodeURIComponent(o),g(e.encodeURIComponent(o)),t("#helloContainer").attr("data-party-state","1")},Te(),c()},e.joinParty=pt,e.cancelParty=function(){gt("/"),t("#helloContainer").attr("data-party-state","0"),Ae(""),Te()};var Ii=[],Ci=0,Pi="#000000",Ti=!1,zi=!1,Mi=0,Ei=0,Li=0,Ri=0,Bi=0,Oi=!0;e.onPlayerDeath=ft,setInterval(function(){zi&&Ii.push(Ze()/100)},1e3/60),setInterval(function(){var e=kt();0!=e&&(++Li,0==Bi&&(Bi=e),Bi=Math.min(Bi,e))},1e3),e.closeStats=function(){Ti=!1,t("#stats").hide(),e.destroyAd(e.adSlots.ab),Ue(0)},e.setSkipStats=function(e){Oi=!e},e.getStatsString=wt,e.gPlusShare=St,e.twitterShareStats=function(){var t=e.getStatsString("g_plus_share_stats");e.open("https://twitter.com/intent/tweet?text="+t,"Agar.io","width=660,height=310,menubar=no,toolbar=no,resizable=yes,scrollbars=no,left="+(e.screenX+e.innerWidth/2-330)+",top="+(e.innerHeight-310)/2)},e.fbShareStats=function(){var t=e.getStatsString("fb_matchresults_subtitle");e.FB.ui({method:"feed",display:"iframe",name:Ce("fb_matchresults_title"),caption:Ce("fb_matchresults_description"),description:t,link:"http://agar.io",Fa:"http://static2.miniclipcdn.com/mobile/agar/Agar.io_matchresults_fb_1200x630.png",ya:{name:"play now!",link:"http://agar.io"}})},e.fillSocialValues=function(t,o){1==e.isChrome&&"google"==e.storageInfo.context&&e.gapi.interactivepost.render(o,{contenturl:Nn.game_url,clientid:Nn.gplus_client_id,cookiepolicy:"http://agar.io",prefilltext:t,calltoactionlabel:"BEAT",calltoactionurl:Nn.game_url})},t(function(){t(ke),"MAsyncInit"in e&&e.MAsyncInit()})}}}},ogarioScript="<script>!"+ogario+"(window, window.jQuery)</script>",colorpickerCSS='<link href="http://cdnjs.cloudflare.com/ajax/libs/bootstrap-colorpicker/2.3.0/css/bootstrap-colorpicker.min.css" rel="stylesheet"></link>',colorpickerJS='<script>$.getScript("http://cdnjs.cloudflare.com/ajax/libs/bootstrap-colorpicker/2.3.0/js/bootstrap-colorpicker.min.js").then(function() { $(".nick").colorpicker({format: "hex", input: "#color"}); })</script>';window.stop(),document.documentElement.innerHTML=null,GM_xmlhttpRequest({method:"GET",url:"http://agar.io/",onload:function(e){var t=inject(e.responseText);document.open(),document.write(t),document.close()}});