· 5 years ago · Oct 23, 2020, 11:02 AM
1/// ==UserScript==
2// @name Nothing
3// @namespace Best Hack 2020
4// @version v0 no more updates
5// @description
6// @author SeNoNo and SeNoNo fr
7// @match *://moomoo.io/*
8// @match *://dev.moomoo.io/*
9// @match *://sandbox.moomoo.io/*
10// @grant none
11// @require https://greasyfork.org/scripts/368273-msgpack/code/msgpack.js?version=598723d
12// @require http://code.jquery.com/jquery-3.3.1.min.js
13// @require https://code.jquery.com/ui/1.12.0/jquery-ui.min.js
14// @require https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.0/jquery-confirm.min.js
15// @icon
16// @downloadURL none
17// ==/UserScript==
18
19$("#consentBlock").css({display: "none"});
20//$("#youtuberOf").css({display: "none"});
21$("#mapDisplay").css({background: `url('https://i.imgur.com/fgFsQJp.png')`});
22
23document.getElementById("moomooio_728x90_home").style.display = "none";
24$("#moomooio_728x90_home").parent().css({display: "none"});
25
26window.onbeforeunload = null;
27let mouseX;
28let mouseY;
29
30let width;
31let height;
32
33setInterval(() => {
34 if(clanToggle == 1) {
35 doNewSend(["9", [null]]);
36 doNewSend(["8", [animate(false, 5)]])
37 }
38 doNewSend(["testing", [6]]);
39}, 0);
40
41setInterval(() => {
42 if(messageToggle == 1) {
43 doNewSend(["ch", [animate(true, 5)]])
44 }
45}, 0);
46
47setInterval(() => {
48 if(autoaim == true) {
49 doNewSend(["2", [nearestEnemyAngle]]);
50 }
51}, 0);
52
53setInterval(() => {
54 if(hatToggle == 1) {
55 if(oldHat != normalHat) {
56 hat(normalHat);
57 console.log("Tried. - Hat")
58 }
59 if(oldAcc != normalAcc) {
60 acc(normalAcc);
61 console.log("Tried. - Acc")
62 }
63 oldHat = normalHat;
64 oldAcc = normalAcc
65 }
66}, 25);
67
68function normal() {
69 hat(normalHat);
70 acc(normalAcc);
71}
72
73function aim(x, y){
74 var cvs = document.getElementById("gameCanvas");
75 cvs.dispatchEvent(new MouseEvent("mousemove", {
76 clientX: x,
77 clientY: y
78
79 }));
80}
81
82let coreURL = new URL(window.location.href);
83window.sessionStorage.force = coreURL.searchParams.get("fc");
84
85
86if (window.sessionStorage.force != "false" && window.sessionStorage.force && window.sessionStorage.force.toString() != "null"){
87 document.getElementsByClassName("menuHeader")[0].innerHTML = `Servers <span style="color: red;">Force (${window.sessionStorage.force})</span>`;
88}
89
90
91class ForceSocket extends WebSocket {
92 constructor(...args){
93 if (window.sessionStorage.force != "false" && window.sessionStorage.force && window.sessionStorage.force.toString() != "null"){
94 let server = window.sessionStorage.force;
95 let sip = "";
96 for (let gameServer of window.vultr.servers){
97 if (`${gameServer.region}:${gameServer.index}:0` == server){
98 sip = gameServer.ip;
99 }
100 }
101 args[0] = `wss://ip_${sip}.moomoo.io:8008/?gameIndex=0`;
102 delete window.sessionStorage.force;
103 }
104
105 super(...args);
106
107 }
108
109
110}
111
112WebSocket = ForceSocket;
113
114
115var nearestEnemy;
116var nearestEnemyAngle;
117var isEnemyNear;
118var instaSpeed = 200;
119var primary;
120var secondary;
121var foodType;
122var wallType;
123var spikeType;
124var millType;
125var mineType;
126var trapType;
127var boostType;
128var turretType;
129var spawnpadType;75
130var autoaim = false;
131var tick = 0;
132var oldHat;
133var oldAcc;
134var enemiesNear;
135var normalHat;
136var normalAcc;
137var ws;
138var msgpack5 = msgpack;
139var boostDir;
140let myPlayer = {
141 id: null,
142 x: null,
143 y: null,
144 dir: null,
145 object: null,
146 weapon: null,
147 clan: null,
148 isLeader: null,
149 hat: null,
150 accessory: null,
151 isSkull: null
152};
153
154let healSpeed = 90;
155let healSpeed2 = 0;
156var messagecrash = 0;
157var clanToggle = 0;
158var clanCrash = 0;
159var clanfake = 0;
160var messagefake = 0;
161let healToggle = 0;
162let healToggle2 = 0;
163let hatToggle = 0;
164
165document.msgpack = msgpack;
166function n(){
167 this.buffer = new Uint8Array([0]);
168 this.buffer.__proto__ = new Uint8Array;
169 this.type = 0;
170}
171
172WebSocket.prototype.oldSend = WebSocket.prototype.send;
173WebSocket.prototype.send = function(m){
174 if (!ws){
175 document.ws = this;
176
177 ws = this;
178 socketFound(this);
179 }
180 this.oldSend(m);
181};
182
183
184function socketFound(socket){
185 socket.addEventListener('message', function(message){
186 handleMessage(message);
187 });
188}
189
190function handleMessage(m){
191 let temp = msgpack5.decode(new Uint8Array(m.data));
192 let data;
193 if(temp.length > 1) {
194 data = [temp[0], ...temp[1]];
195 if (data[1] instanceof Array){
196 data = data;
197 }
198 } else {
199 data = temp;
200 }
201 let item = data[0];
202 if(!data) {return};
203
204 if(item === "io-init") {
205 let cvs = document.getElementById("gameCanvas");
206 width = cvs.clientWidth;
207 height = cvs.clientHeight;
208 $(window).resize(function() {
209 width = cvs.clientWidth;
210 height = cvs.clientHeight;
211 });
212 cvs.addEventListener("mousemove", e => {
213 mouseX = e.clientX;
214 mouseY = e.clientY;
215 });
216 }
217
218 if (item == "1" && myPlayer.id == null){
219 myPlayer.id = data[1];
220 }
221
222 if (item == "33") {
223 enemiesNear = [];
224 for(let i = 0; i < data[1].length / 13; i++) {
225 let playerInfo = data[1].slice(13*i, 13*i+13);
226 if(playerInfo[0] == myPlayer.id) {
227 myPlayer.x = playerInfo[1];
228 myPlayer.y = playerInfo[2];
229 myPlayer.dir = playerInfo[3];
230 myPlayer.object = playerInfo[4];
231 myPlayer.weapon = playerInfo[5];
232 myPlayer.clan = playerInfo[7];
233 myPlayer.isLeader = playerInfo[8];
234 myPlayer.hat = playerInfo[9];
235 myPlayer.accessory = playerInfo[10];
236 myPlayer.isSkull = playerInfo[11];
237 } else if(playerInfo[7] != myPlayer.clan || playerInfo[7] === null) {
238 enemiesNear.push(playerInfo);
239 }
240 }
241 }
242
243 isEnemyNear = false;
244 if(enemiesNear) {
245 nearestEnemy = enemiesNear.sort((a,b) => dist(a, myPlayer) - dist(b, myPlayer))[0];
246 }
247 if(nearestEnemy) {
248 nearestEnemyAngle = Math.atan2(nearestEnemy[2]-myPlayer.y, nearestEnemy[1]-myPlayer.x);
249 if(Math.sqrt(Math.pow((myPlayer.y-nearestEnemy[2]), 2) + Math.pow((myPlayer.x-nearestEnemy[1]), 2)) < 300) {
250 isEnemyNear = true;
251 if(autoaim == false && myPlayer.hat != 7 && myPlayer.hat != 53) {
252 normalHat = 6;
253 if(primary != 8) {
254 normalAcc = 21
255 }
256 };
257 }
258 }
259 if(isEnemyNear == false && autoaim == false) {
260 normalAcc = 1546541;
261 if (myPlayer.y < 2400){
262 normalHat = 16545;
263 } else if (myPlayer.y > 6850 && myPlayer.y < 7550){
264 normalHat = 64561;
265 } else {
266 normalHat = 12654;
267 }
268 }
269 if (!nearestEnemy) {
270 nearestEnemyAngle = myPlayer.dir;
271 }
272 if(item == "h" && data[1] == myPlayer.id) {
273 if(data[2] < 100 && data[2] > 0 && healToggle == 1) {
274 setTimeout( () => {
275 place(foodType, null);
276 place(foodType, null);
277 }, healSpeed);
278
279 }
280 }
281
282 if(item == "h" && data[1] == myPlayer.id) {
283 if(data[2] < 100 && data[2] > 0 && healToggle2 == 1) {
284 setTimeout( () => {
285 place(foodType, null);
286 place(foodType, null);
287 place(foodType, null);
288 place(foodType, null);
289 }, healSpeed2);
290
291 }
292 }
293 update();
294}
295
296
297function doNewSend(sender){
298 ws.send(new Uint8Array(Array.from(msgpack5.encode(sender))));
299}
300
301function acc(id) {
302 doNewSend(["13c", [0, 0, 1]]);
303 doNewSend(["13c", [0, id, 1]]);
304}
305
306function hat(id) {
307 doNewSend(["13c", [0, id, 0]]);
308}
309
310
311function place(id, angle = Math.atan2(mouseY - height / 2, mouseX - width / 2)) {
312 doNewSend(["5", [id, null]]);
313 doNewSend(["c", [1, angle]]);
314 doNewSend(["c", [0, angle]]);
315 doNewSend(["5", [myPlayer.weapon, true]]);
316}
317
318function boostSpike() {
319 if(boostDir == null) {
320 boostDir = nearestEnemyAngle;
321 }
322 place(millType, boostDir + toRad(90));
323 place(millType, boostDir - toRad(90));
324 place(millType, boostDir);
325 doNewSend(["33", [boostDir]]);
326}
327function boostWall() {
328 if(boostDir == null) {
329 boostDir = nearestEnemyAngle;
330 }
331 place(wallType, boostDir + toRad(90));
332 place(wallType, boostDir - toRad(90));
333 place(boostType, boostDir);
334 doNewSend(["33", [boostDir]]);
335}
336function fourSpike() {
337 place(spikeType, myPlayer.dir + toRad(0));
338 place(spikeType, myPlayer.dir - toRad(90));
339 place(spikeType, myPlayer.dir + toRad(90));
340 place(spikeType, myPlayer.dir - toRad(180));
341 place(spikeType, myPlayer.dir + toRad(45));
342 place(spikeType, myPlayer.dir - toRad(45));
343 place(spikeType, myPlayer.dir + toRad(135));
344 place(spikeType, myPlayer.dir - toRad(135));
345 place(spikeType, myPlayer.dir + toRad(60));
346 place(spikeType, myPlayer.dir - toRad(60));
347 place(spikeType, myPlayer.dir + toRad(150));
348 place(spikeType, myPlayer.dir - toRad(150));
349 place(spikeType, myPlayer.dir + toRad(30));
350 place(spikeType, myPlayer.dir - toRad(30));
351 place(spikeType, myPlayer.dir + toRad(120));
352 place(spikeType, myPlayer.dir - toRad(120));
353}
354function fourSpawnpad() {
355 place(spawnpadType, myPlayer.dir + toRad(135));
356 place(spawnpadType, myPlayer.dir + toRad(150));
357 place(spawnpadType, myPlayer.dir + toRad(165));
358 place(spawnpadType, myPlayer.dir + toRad(180));
359 place(spawnpadType, myPlayer.dir + toRad(195));
360 place(spawnpadType, myPlayer.dir + toRad(210));
361 place(spawnpadType, myPlayer.dir + toRad(225));
362 place(spawnpadType, myPlayer.dir + toRad(240));
363 place(spawnpadType, myPlayer.dir + toRad(255));
364 place(spawnpadType, myPlayer.dir + toRad(270));
365 place(spawnpadType, myPlayer.dir + toRad(285));
366 place(spawnpadType, myPlayer.dir + toRad(300));
367 place(spawnpadType, myPlayer.dir + toRad(315));
368 place(spawnpadType, myPlayer.dir + toRad(330));
369 place(spawnpadType, myPlayer.dir + toRad(345));
370 place(spawnpadType, myPlayer.dir + toRad(360));
371}
372
373function fourTrap() {
374 place(trapType, myPlayer.dir + toRad(135));
375 place(trapType, myPlayer.dir + toRad(150));
376 place(trapType, myPlayer.dir + toRad(165));
377 place(trapType, myPlayer.dir + toRad(180));
378 place(trapType, myPlayer.dir + toRad(195));
379 place(trapType, myPlayer.dir + toRad(210));
380 place(trapType, myPlayer.dir + toRad(225));
381 place(trapType, myPlayer.dir + toRad(240));
382 place(trapType, myPlayer.dir + toRad(255));
383 place(trapType, myPlayer.dir + toRad(270));
384 place(trapType, myPlayer.dir + toRad(285));
385 place(trapType, myPlayer.dir + toRad(300));
386 place(trapType, myPlayer.dir + toRad(315));
387 place(trapType, myPlayer.dir + toRad(330));
388 place(trapType, myPlayer.dir + toRad(345));
389 place(trapType, myPlayer.dir + toRad(360));
390}
391var repeater = function(key, action, interval, bu) {
392 let _isKeyDown = false;
393 let _intervalId = undefined;
394
395 return {
396 start(keycode) {
397 if(keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
398 _isKeyDown = true;
399 if(_intervalId === undefined) {
400 _intervalId = setInterval(() => {
401 action();
402 if(!_isKeyDown){
403 clearInterval(_intervalId);
404 _intervalId = undefined;
405 console.log("claered");
406 }
407 }, interval);
408 }
409 }
410 },
411
412 stop(keycode) {
413 if(keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
414 _isKeyDown = false;
415 }
416 }
417 };
418
419
420}
421
422const healer = repeater(81, () => {place(foodType)}, 0);
423const boostPlacer = repeater(70, () => {place(boostType)}, 0);
424const spikePlacer = repeater(86, () => {place(spikeType)}, 0);
425const millPlacer = repeater(78, () => {place(millType)}, 0);
426const turretPlacer = repeater(72, () => {place(turretType)}, 0);
427const wallPlacer = repeater(52, () => {place(wallType)}, 0);
428const boostSpiker = repeater(0, boostSpike, 0);
429const boostWaller = repeater(0, boostWall, 0);
430const fourSpiker = repeater(0, fourSpike, 0);
431const fourTraper = repeater(79, fourTrap, 0);
432const fourSpawnpader = repeater(75, fourSpawnpad, 0);
433
434
435
436
437
438document.addEventListener('keydown', (e)=>{
439 spikePlacer.start(e.keyCode);
440 healer.start(e.keyCode);
441 boostPlacer.start(e.keyCode);
442 boostWaller.start(e.keyCode);
443 fourTraper.start(e.keyCode);
444 fourSpawnpader.start(e.keyCode);
445 fourSpiker.start(e.keyCode);
446 boostSpiker.start(e.keyCode);
447 millPlacer.start(e.keyCode);
448 wallPlacer.start(e.keyCode);
449 turretPlacer.start(e.keyCode);
450
451
452 if(e.keyCode == 187 && document.activeElement.id.toLowerCase() !== 'chatbox') {
453 autoaim = true;
454 doNewSend(["ch", [me(true, 5)]])
455 doNewSend(["13c", [0, 11, 0]]);
456 doNewSend(["13c", [0, 21, 1]]);
457
458 setTimeout( () => {
459 doNewSend(["5", [primary, true]]);
460 doNewSend(["13c", [0, 7, 0]]);
461 doNewSend(["13c", [0, 0, 1]]);
462 doNewSend(["13c", [0, 18, 1]]);
463 doNewSend(["c", [1]]);
464 }, 100);
465
466 setTimeout( () => {
467 doNewSend(["13c", [0, 53, 0]]);
468 doNewSend(["5", [secondary, true]]);
469 }, 200);
470
471 setTimeout( () => {
472 doNewSend(["c", [0]]);
473 doNewSend(["5", [primary, true]]);
474 doNewSend(["13c", [0, 0, 0]]);
475 doNewSend(["13c", [0, 21, 1]]);
476 autoaim = false;
477 }, 300);
478 }
479
480
481 if(e.keyCode == 85 && document.activeElement.id.toLowerCase() !== 'chatbox') {
482 autoaim = true;
483 doNewSend(["5", [primary, true]]);
484 doNewSend(["13c", [0, 7, 0]]);
485 doNewSend(["13c", [0, 0, 1]]);
486 doNewSend(["13c", [0, 18, 1]]);
487 doNewSend(["ch", [mes(true, 5)]])
488 doNewSend(["c", [1]]);
489
490 setTimeout( () => {
491 doNewSend(["6", [5]]);
492 }, 100);
493
494 setTimeout( () => {
495 doNewSend(["13c", [0, 53, 0]]);
496 place(spikeType, myPlayer.dir + toRad(0));
497 }, 200);
498
499 setTimeout( () => {
500 doNewSend(["5", [primary, true]]);
501 doNewSend(["c", [0, null]]);
502 doNewSend(["13c", [0, 0, 0]]);
503 doNewSend(["13c", [0, 0, 0]]);
504 doNewSend(["13c", [0, 19, 0]]);
505 autoaim = false;
506 }, 300);
507 }
508 if(e.keyCode == 32 && document.activeElement.id.toLowerCase() !== 'chatbox') {
509 autoaim = true;
510 doNewSend(["5", [primary, true]]);
511 doNewSend(["13c", [0, 7, 0]]);
512 doNewSend(["13c", [0, 0, 1]]);
513 doNewSend(["13c", [0, 18, 1]]);
514 place(spikeType);
515 doNewSend(["c", [1]]);
516
517 setTimeout( () => {
518 doNewSend(["13c", [0, 53, 0]]);
519 doNewSend(["ch", [Boom(true, 5)]])
520 }, 100);
521
522 setTimeout( () => {
523 doNewSend(["c", [0, null]]);
524 doNewSend(["13c", [0, 0, 0]]);
525 doNewSend(["13c", [0, 0, 0]]);
526 doNewSend(["13c", [0, 19, 1]]);
527 autoaim = false;
528 }, 200);
529 }
530
531if(e.keyCode == 12000 && document.activeElement.id.toLowerCase() !== 'chatbox') {
532 autoaim = false;
533 doNewSend(["5", [primary, true]]);
534 doNewSend(["13c", [0, 7, 0]]);
535 doNewSend(["13c", [0, 0, 1]]);
536 doNewSend(["13c", [0, 18, 1]]);
537 doNewSend(["ch", [hahaha(true, 5)]])
538 doNewSend(["c", [1]]);
539
540 setTimeout( () => {
541 doNewSend(["13c", [0, 53, 0]]);
542 doNewSend(["13c", [0, 21, 1]]);
543 }, instaSpeed - 130);
544
545 setTimeout( () => {
546 doNewSend(["5", [primary, true]]);
547 doNewSend(["c", [0, null]]);
548 doNewSend(["13c", [0, 0, 0]]);
549 doNewSend(["13c", [0, 0, 0]]);
550 doNewSend(["13c", [0, 0, 1]]);
551 autoaim = false;
552 }, instaSpeed);
553 }
554
555 if(e.keyCode == 82 && document.activeElement.id.toLowerCase() !== 'chatbox') {
556 autoaim = true;
557 doNewSend(["5", [primary, true]]);
558 doNewSend(["13c", [0, 7, 0]]);
559 doNewSend(["13c", [0, 0, 1]]);
560 doNewSend(["13c", [0, 18, 1]]);
561 doNewSend(["ch", [mess(true, 5)]])
562 doNewSend(["c", [1]]);
563
564 setTimeout( () => {
565 doNewSend(["13c", [0, 0, 0]]);
566 doNewSend(["13c", [0, 0, 0]]);
567 doNewSend(["13c", [0, 0, 0]]);
568 doNewSend(["13c", [0, 53, 0]]);
569 doNewSend(["13c", [0, 21, 1]]);
570 doNewSend(["5", [secondary, true]]);
571 }, instaSpeed - 130);
572
573 setTimeout( () => {
574 doNewSend(["5", [primary, true]]);
575 doNewSend(["c", [0, null]]);
576 doNewSend(["13c", [0, 0, 0]]);
577 doNewSend(["13c", [0, 0, 0]]);
578 doNewSend(["13c", [0, 52, 0]]);
579 doNewSend(["13c", [0, 21, 1]]);
580 doNewSend(["13c", [0, 13, 1]]);
581 doNewSend(["13c", [0, 0, 0]]);
582 doNewSend(["13c", [0, 21, 1]]);
583 doNewSend(["13c", [0, 19, 1]]);
584 doNewSend(["13c", [0, 0, 0]]);
585 doNewSend(["13c", [0, 0, 1]]);
586 doNewSend(["13c", [0, 0, 1]]);
587 autoaim = null;
588 }, instaSpeed);
589 }
590
591 if(e.keyCode == 76 && document.activeElement.id.toLowerCase() !== 'chatbox') {
592 autoaim = false;
593 doNewSend(["13c", [0, 40, 0]]);
594 doNewSend(["c", [1]]);
595
596 setTimeout( () => {
597 doNewSend(["13c", [0, 6, 0]]);
598 }, instaSpeed - 160);
599
600 setTimeout( () => {
601 doNewSend(["5", [primary, true]]);
602 doNewSend(["c", [0, null]]);
603 doNewSend(["13c", [0, 0, 0]]);
604 autoaim = false;
605 }, instaSpeed);
606 }
607 if(e.keyCode == 20 && document.activeElement.id.toLowerCase() !== 'chatbox') {
608 autoaim = true;
609 doNewSend(["13c", [0, 7, 0]]);
610 doNewSend(["13c", [0, 0, 1]]);
611 doNewSend(["13c", [0, 18, 1]]);
612 doNewSend(["c", [1]]);
613
614 setTimeout( () => {
615 doNewSend(["13c", [0, 6, 0]]);
616 doNewSend(["13c", [0, 21, 1]]);
617 }, instaSpeed - 160);
618
619 setTimeout( () => {
620 doNewSend(["5", [primary, true]]);
621 doNewSend(["c", [0, null]]);
622 doNewSend(["13c", [0, 0, 0]]);
623 doNewSend(["13c", [0, 19, 1]]);
624 autoaim = false;
625 }, instaSpeed);
626 }
627 if(e.keyCode == 77 && document.activeElement.id.toLowerCase() !== 'chatbox') {
628 autoaim = true;
629 doNewSend(["5", [primary, true]]);
630 doNewSend(["13c", [0, 26, 0]]);
631 doNewSend(["13c", [0, 7, 0]]);
632 doNewSend(["13c", [0, 0, 1]]);
633 doNewSend(["ch", [m(true, 5)]])
634 doNewSend(["13c", [0, 18, 1]]);
635 doNewSend(["c", [1]]);
636 setTimeout( () => {
637 doNewSend(["13c", [0, 53, 0]]);
638 doNewSend(["5", [secondary, true]]);
639 }, instaSpeed - 130);
640
641 setTimeout( () => {
642 doNewSend(["5", [primary, true]]);
643 place(spikeType, myPlayer.dir + toRad(0));
644 doNewSend(["c", [0, null]]);
645 doNewSend(["13c", [0, 0, 0]]);
646 doNewSend(["5", [7]]);
647 doNewSend(["c", [1]]);
648 doNewSend(["c", [0]]);
649 autoaim = false;
650 }, instaSpeed);
651 }
652 if(e.keyCode == 120 && document.activeElement.id.toLowerCase() !== 'chatbox') {
653 autoaim = true;
654 doNewSend(["13c", [0, 0, 1]]);
655 doNewSend(["13c", [0, 7, 0]]);
656 doNewSend(["ch", [lol(true, 5)]])
657 doNewSend(["c", [1]]);
658 setTimeout( () => {
659 doNewSend(["6", [4]]);
660 }, instaSpeed - 130);
661
662 setTimeout( () => {
663 doNewSend(["c", [1]]);
664 doNewSend(["13c", [0, 53, 0]]);
665 doNewSend(["c", [0, null]]);
666 autoaim = false;
667 }, instaSpeed);
668}
669
670
671
672
673
674 if(e.keyCode == 113 && document.activeElement.id.toLowerCase() !== 'chatbox') {
675 healToggle = (healToggle + 1) % 2;
676 if(healToggle == 0) {
677 if(hatToggle == 0) {
678 document.title = "Heal: OFF | Hat: OFF"
679 } else {
680 document.title = "Heal: OFF | Hat: ON"
681 }
682 } else {
683 if(hatToggle == 0) {
684 document.title = "Heal: ON | Hat: OFF"
685 } else {
686 document.title = "Heal: ON | Hat: ON"
687 }
688 }
689 }
690 if(e.keyCode == 118 && document.activeElement.id.toLowerCase() !== 'chatbox') {
691 if (autoaim == false) {
692 autoaim = true;
693 document.title = "Zelta Aim: ON";
694 } else {
695 document.title = "Zelta Aim: OFF";
696 autoaim = false;
697 }
698 }
699
700 if(e.keyCode == 115 && document.activeElement.id.toLowerCase() !== 'chatbox') {
701 healToggle2 = (healToggle2 + 1) % 2;
702 if(healToggle2 == 0) {
703 if(hatToggle == 0) {
704 document.title = "Heal2: OFF | Hat: OFF"
705 } else {
706 document.title = "Heal2: OFF | Hat: ON"
707 }
708 } else {
709 if(hatToggle == 0) {
710 document.title = "Heal2: ON | Hat: OFF"
711 } else {
712 document.title = "Heal2: ON | Hat: ON"
713 }
714 }
715 }
716
717 if(e.keyCode == 190 && document.activeElement.id.toLowerCase() !== 'chatbox') {
718 autoaim = true;
719 doNewSend(["5", [secondary, true]]);
720 doNewSend(["ch", [spam(true, 5)]])
721 doNewSend(["13c", [0, 32, 0]]);
722 doNewSend(["13c", [0, 21, 1]]);
723 doNewSend(["13c", [0, 53, 0]]);
724 doNewSend(["c", [1]]);
725
726 setTimeout( () => {
727 doNewSend(["13c", [0, 32, 19]]);
728 doNewSend(["13c", [0, 21, 1]]);
729 doNewSend(["13c", [0, 32, 0]]);
730 doNewSend(["6", [12]]);
731
732 }, 100);
733
734 setTimeout( () => {
735 doNewSend(["6", [15]]);
736
737 }, 200);
738
739 setTimeout( () => {
740 doNewSend(["c", [0]]);
741 doNewSend(["5", [primary, true]]);
742 autoaim = false;
743 }, 300);
744 }
745
746 if(e.keyCode == 97 && document.activeElement.id.toLowerCase() !== 'chatbox') { ///num1 katana [age 8]
747 doNewSend(["6", [4]]);
748 }
749 if(e.keyCode == 98 && document.activeElement.id.toLowerCase() !== 'chatbox') { ///num2 musket [age 9]
750 doNewSend(["6", [15]]);
751 }
752 if(e.keyCode == 98 && document.activeElement.id.toLowerCase() !== 'chatbox') { ///num2 crossbow [age 8]
753 doNewSend(["6", [12]]);
754 }
755 if(e.keyCode == 105 && document.activeElement.id.toLowerCase() !== 'chatbox') { ///num9 max mill [age 8]
756 doNewSend(["6", [28]]);
757 }
758 if(e.keyCode == 104 && document.activeElement.id.toLowerCase() !== 'chatbox') { ///num8 max wall [age 7]
759 doNewSend(["6", [21]]);
760 }
761 if(e.keyCode == 101 && document.activeElement.id.toLowerCase() !== 'chatbox') { ///num5 spin spike [age 9]
762 doNewSend(["6", [25]]);
763 }
764 if(e.keyCode == 102 && document.activeElement.id.toLowerCase() !== 'chatbox') { ///num6 fast crossbow [age 9]
765 doNewSend(["6", [13]]);
766 }
767 if(e.keyCode == 99 && document.activeElement.id.toLowerCase() !== 'chatbox') { ///num3 great axe [age 8]
768 doNewSend(["6", [2]]);
769 }
770 if(e.keyCode == 11231 && document.activeElement.id.toLowerCase() !== 'chatbox') {
771 hatToggle = (hatToggle + 1) % 2;
772 if(healToggle == 0) {
773 if(hatToggle == 0) {
774 document.title = "Heal: OFF | Hat: OFF"
775 } else {
776 document.title = "Heal: OFF | Hat: ON"
777 }
778 } else {
779 if(hatToggle == 0) {
780 document.title = "Heal: ON | Hat: OFF"
781 } else {
782 document.title = "Heal: ON | Hat: ON"
783 }
784 }
785 }
786})
787
788document.addEventListener('keyup', (e)=>{
789 spikePlacer.stop(e.keyCode);
790 boostPlacer.stop(e.keyCode);
791 boostWaller.stop(e.keyCode);
792 fourTraper.stop(e.keyCode);
793 fourSpawnpader.stop(e.keyCode);
794 fourSpiker.stop(e.keyCode);
795 boostSpiker.stop(e.keyCode);
796 millPlacer.stop(e.keyCode);
797 turretPlacer.stop(e.keyCode);
798 wallPlacer.stop(e.keyCode);
799 healer.stop(e.keyCode);
800 if(e.keyCode == 0 && document.activeElement.id.toLowerCase() !== 'chatbox') {
801 setTimeout( () => {
802 doNewSend(["33", [null]]);
803 boostDir = null;
804 }, 10);
805 }
806 if(e.keyCode == 0 && document.activeElement.id.toLowerCase() !== 'chatbox') {
807 setTimeout( () => {
808 doNewSend(["33"]);
809 }, 1);
810 }
811 if(e.keyCode == 0 && document.activeElement.id.toLowerCase() !== 'chatbox') {
812 setTimeout( () => {
813 doNewSend(["33"]);
814 }, 1);
815 }
816 if(e.keyCode == 0 && document.activeElement.id.toLowerCase() !== 'chatbox') {
817 setTimeout( () => {
818 doNewSend(["33"]);
819 }, 1);
820 }
821 if(e.keyCode == 0 && document.activeElement.id.toLowerCase() !== 'chatbox') {
822 setTimeout( () => {
823 doNewSend(["33", [null]]);
824 boostDir = null;
825 }, 10);
826 }
827})
828function isElementVisible(e) {
829 return (e.offsetParent !== null);
830}
831
832
833function toRad(angle) {
834 return angle * 0.01745329251;
835}
836
837function dist(a, b){
838 return Math.sqrt( Math.pow((b.y-a[2]), 2) + Math.pow((b.x-a[1]), 2) );
839}
840
841function animate(space, chance) {
842 let result = '';
843 let characters;
844 if(space) {
845 characters = '.';
846 } else {
847 characters = '.R';
848 }
849 if(space) {
850 characters = characters.padStart((70 - characters.length) / 6 + characters.length)
851 characters = characters.padEnd(30);
852 }
853 let count = 0;
854 for (let i = 0; i < characters.length; i++ ) {
855 if(Math.floor(Math.random() * chance) == 1 && characters.charAt(i) != "-" && count < 6 && characters.charAt(i) != " ") {
856 result += ".";
857 count++
858 } else {
859 result += characters.charAt(i);
860 }
861 }
862 return result;
863}
864
865function crash(space, chance) {
866 let result = '';
867 let characters;
868 if(space) {
869 characters = '.';
870 } else {
871 characters = '.';
872 }
873 if(space) {
874 characters = characters.padStart((70 - characters.length) / 6 + characters.length)
875 characters = characters.padEnd(30);
876 }
877 let count = 0;
878 for (let i = 0; i < characters.length; i++ ) {
879 if(Math.floor(Math.random() * chance) == 1 && characters.charAt(i) != "-" && count < 6 && characters.charAt(i) != " ") {
880 result += ".";
881 count++
882 } else {
883 result += characters.charAt(i);
884 }
885 }
886 return result;
887}
888
889function fake(space, chance) {
890 let result = '';
891 let characters;
892 if(space) {
893 characters = '.';
894 } else {
895 characters = '.';
896 }
897 if(space) {
898 characters = characters.padStart((70 - characters.length) / 6 + characters.length)
899 characters = characters.padEnd(30);
900 }
901 let count = 0;
902 for (let i = 0; i < characters.length; i++ ) {
903 if(Math.floor(Math.random() * chance) == 1 && characters.charAt(i) != "-" && count < 6 && characters.charAt(i) != " ") {
904 result += "";
905 count++
906 } else {
907 result += characters.charAt(i);
908 }
909 }
910 return result;
911}
912function ReTryPro(space, chance) {
913 let result = '';
914 let characters;
915 if(space) {
916 characters = '.';
917 } else {
918 characters = 'A.R';
919 }
920 if(space) {
921 characters = characters.padStart((30 - characters.length) / 2 + characters.length)
922 characters = characters.padEnd(30);
923 }
924 let count = 0;
925 for (let i = 0; i < characters.length; i++ ) {
926 if(Math.floor(Math.random() * chance) == 1 && characters.charAt(i) != "-" && count < 2 && characters.charAt(i) != " ") {
927 result += ".";
928 count++
929 } else {
930 result += characters.charAt(i);
931 }
932 }
933 return result;
934}
935
936function spam(space, chance) {
937 let result = '';
938 let characters;
939 if(space) {
940 characters = '';
941 }
942 if(space) {
943 characters = characters.padStart((30 - characters.length) / 2 + characters.length)
944 characters = characters.padEnd(30);
945 }
946 let count = 0;
947 for (let i = 0; i < characters.length; i++ ) {
948 if(Math.floor(Math.random() * chance) == 0 && characters.charAt(i) != "-" && count < 0 && characters.charAt(i) != " ") {
949 result += "";
950 count++
951 } else {
952 result += characters.charAt(i);
953 }
954 }
955 return result;
956}
957function lol(space, chance) {
958 let result = '';
959 let characters;
960 if(space) {
961 characters = '';
962 }
963 if(space) {
964 characters = characters.padStart((30 - characters.length) / 2 + characters.length)
965 characters = characters.padEnd(30);
966 }
967 let count = 0;
968 for (let i = 0; i < characters.length; i++ ) {
969 if(Math.floor(Math.random() * chance) == 0 && characters.charAt(i) != "-" && count < 0 && characters.charAt(i) != " ") {
970 result += "";
971 count++
972 } else {
973 result += characters.charAt(i);
974 }
975 }
976 return result;
977}
978 function radar(space, chance) {
979 let result = '';
980 let characters;
981 if(space) {
982 characters = '';
983 }
984 if(space) {
985 characters = characters.padStart((30 - characters.length) / 2 + characters.length)
986 characters = characters.padEnd(30);
987 }
988 let count = 0;
989 for (let i = 0; i < characters.length; i++ ) {
990 if(Math.floor(Math.random() * chance) == 0 && characters.charAt(i) != "-" && count < 0 && characters.charAt(i) != " ") {
991 result += "";
992 count++
993 } else {
994 result += characters.charAt(i);
995 }
996 }
997 return result;
998}
999 function hahaha(space, chance) {
1000 let result = '';
1001 let characters;
1002 if(space) {
1003 characters = '';
1004 }
1005 if(space) {
1006 characters = characters.padStart((30 - characters.length) / 2 + characters.length)
1007 characters = characters.padEnd(30);
1008 }
1009 let count = 0;
1010 for (let i = 0; i < characters.length; i++ ) {
1011 if(Math.floor(Math.random() * chance) == 0 && characters.charAt(i) != "-" && count < 0 && characters.charAt(i) != " ") {
1012 result += "";
1013 count++
1014 } else {
1015 result += characters.charAt(i);
1016 }
1017 }
1018 return result;
1019}
1020
1021function mess(space, chance) {
1022 let result = '';
1023 let characters;
1024 if(space) {
1025 characters = '';
1026 }
1027 if(space) {
1028 characters = characters.padStart((30 - characters.length) / 2 + characters.length)
1029 characters = characters.padEnd(30);
1030 }
1031 let count = 0;
1032 for (let i = 0; i < characters.length; i++ ) {
1033 if(Math.floor(Math.random() * chance) == 0 && characters.charAt(i) != "-" && count < 0 && characters.charAt(i) != " ") {
1034 result += "";
1035 count++
1036 } else {
1037 result += characters.charAt(i);
1038 }
1039 }
1040 return result;
1041}
1042function m(space, chance) {
1043 let result = '';
1044 let characters;
1045 if(space) {
1046 characters = '';
1047 }
1048 if(space) {
1049 characters = characters.padStart((30 - characters.length) / 2 + characters.length)
1050 characters = characters.padEnd(30);
1051 }
1052 let count = 0;
1053 for (let i = 0; i < characters.length; i++ ) {
1054 if(Math.floor(Math.random() * chance) == 0 && characters.charAt(i) != "-" && count < 0 && characters.charAt(i) != " ") {
1055 result += "";
1056 count++
1057 } else {
1058 result += characters.charAt(i);
1059 }
1060 }
1061 return result;
1062}
1063function Boom(space, chance) {
1064 let result = '';
1065 let characters;
1066 if(space) {
1067 characters = '';
1068 }
1069 if(space) {
1070 characters = characters.padStart((30 - characters.length) / 2 + characters.length)
1071 characters = characters.padEnd(30);
1072 }
1073 let count = 0;
1074 for (let i = 0; i < characters.length; i++ ) {
1075 if(Math.floor(Math.random() * chance) == 0 && characters.charAt(i) != "-" && count < 0 && characters.charAt(i) != " ") {
1076 result += "";
1077 count++
1078 } else {
1079 result += characters.charAt(i);
1080 }
1081 }
1082 return result;
1083}
1084
1085function me(space, chance) {
1086 let result = '';
1087 let characters;
1088 if(space) {
1089 characters = '';
1090 }
1091 if(space) {
1092 characters = characters.padStart((30 - characters.length) / 2 + characters.length)
1093 characters = characters.padEnd(30);
1094 }
1095 let count = 0;
1096 for (let i = 0; i < characters.length; i++ ) {
1097 if(Math.floor(Math.random() * chance) == 0 && characters.charAt(i) != "-" && count < 0 && characters.charAt(i) != " ") {
1098 result += "";
1099 count++
1100 } else {
1101 result += characters.charAt(i);
1102 }
1103 }
1104 return result;
1105}
1106
1107function mes(space, chance) {
1108 let result = '';
1109 let characters;
1110 if(space) {
1111 characters = '';
1112 }
1113 if(space) {
1114 characters = characters.padStart((30 - characters.length) / 2 + characters.length)
1115 characters = characters.padEnd(30);
1116 }
1117 let count = 0;
1118 for (let i = 0; i < characters.length; i++ ) {
1119 if(Math.floor(Math.random() * chance) == 0 && characters.charAt(i) != "-" && count < 0 && characters.charAt(i) != " ") {
1120 result += "";
1121 count++
1122 } else {
1123 result += characters.charAt(i);
1124 }
1125 }
1126 return result;
1127}
1128
1129autoreloadloop = setInterval(function () {
1130 if (autoreloadenough < 200) {
1131 document.title = "autoReloader working";
1132 if (document.getElementById("loadingText").innerHTML == `disconnected<a href="javascript:window.location.href=window.location.href" class="ytLink">reload</a>`) {
1133 document.title = "autoReloader done";
1134 clearInterval(autoreloadloop);
1135 setTimeout(function () {document.title = "Moo Moo";}, 1000)
1136 location.reload();
1137 }
1138 autoreloadenough++;
1139 }
1140 else if (autoreloadenough >= 300) {
1141 clearInterval(autoreloadloop);
1142 document.title = "autoReloader done";
1143 setTimeout(function () {document.title = "Moo Moo";}, 1000)
1144 }
1145}, 50);
1146
1147function update() {
1148 for (let i=0;i<9;i++){
1149 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
1150 primary = i;
1151 }
1152 }
1153
1154 for (let i=9;i<16;i++){
1155 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
1156 secondary = i;
1157 }
1158 }
1159
1160 for (let i=16;i<19;i++){
1161 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
1162 foodType = i - 16;
1163 }
1164 }
1165
1166 for (let i=19;i<22;i++){
1167 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
1168 wallType = i - 16;
1169 }
1170 }
1171
1172 for (let i=22;i<26;i++){
1173 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
1174 spikeType = i - 16;
1175 }
1176 }
1177
1178 for (let i=26;i<29;i++){
1179 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
1180 millType = i - 16;
1181 }
1182 }
1183
1184 for (let i=29;i<31;i++){
1185 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
1186 mineType = i - 16;
1187 }
1188 }
1189
1190 for (let i=31;i<33;i++){
1191 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
1192 boostType = i - 16;
1193 }
1194 }
1195
1196 for (let i=33;i<36;i++){
1197 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
1198 turretType = i - 16;
1199 }
1200 }
1201
1202 for (let i=36;i<37;i++){
1203 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
1204 spawnpadType = i - 16;
1205 }
1206 }
1207
1208 for (let i=37;i<39;i++){
1209 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
1210 turretType = i - 16;
1211 }
1212 }
1213}
1214
1215
1216var ID_WinterCap = 15;
1217var ID_AssassinGear = 56;
1218var ID_Bloodthirster = 55;
1219var ID_FlipperHat = 31;
1220var ID_MarksmanCap = 1;
1221var ID_BushGear = 10;
1222var ID_SoldierHelmet = 6;
1223var ID_AntiVenomGear = 23;
1224var ID_MusketeerHat = 32;
1225var ID_MedicGear = 13;
1226var ID_BullHelmet = 7;
1227var ID_EmpHelmet = 22;
1228var ID_BoosterHat = 12;
1229var ID_BarbarianArmor = 26;
1230var ID_BullMask = 46;
1231var ID_WindmillHat = 14;
1232var ID_SpikeGear = 11;
1233var ID_BushidoArmor = 16;
1234var ID_SamuraiArmor = 20;
1235var ID_ScavengerGear = 27;
1236var ID_TankGear = 40;
1237//Turret Gear. "Use if you want to"
1238var ID_TurretGear = 53;
1239
1240// Keys
1241
1242var TankGearKey = 90;
1243var AssassinGearKey = 107;
1244var BullHelmetKey = 75;
1245var SoldierHelmetKey = 89;
1246var TurretKey = 67;
1247var BoosterHatKey = 66;
1248var uneqiup = 189;
1249var SpikeGearKey = 220;
1250var BushGearKey = 186;
1251var EmpHelmetKey = 221;
1252var SamuraiArmorKey = 74;
1253var ScavengerGearKey = 106;
1254var ID_BarbarianArmor = 89;
1255
1256// Remove all of the ads on the page.
1257
1258try {
1259 document.getElementById("moomooio_728x90_home").style.display = "none";
1260 $("moomooio728x90_home").parent().css({display: "none"});
1261} catch (e) {
1262 console.log("There was an error removing the ads.");
1263}
1264
1265
1266var menuChange = document.createElement("div");
1267menuChange.className = "menuCard";
1268menuChange.id = "mainSettings";
1269menuChange.innerHTML = `
1270<div id="simpleModal" class="modal">
1271 <div class="modal-content">
1272 <div class="modal-header">
1273 <span class="closeBtn">×</span>
1274 <h2 style="font-size: 17px;">Hat Settings</h2>
1275 </div>
1276 <div class="modal-body" style="font-size: 17px;">
1277 <div class="flexControl">
1278 <h3 style="color: red; font-size: 17px;"></h3>
1279 <h3 class="menuPrompt">Tank: </h3> <input value="${String.fromCharCode(TankGearKey)}" id="tankGear" class="keyPressLow" onkeyup="this.value = this.value.toUpperCase();" maxlength="1" type="text"/>
1280 <h3 class="menuPrompt">Bull: </h3> <input value="${String.fromCharCode(BullHelmetKey)}" id="bullHelm" class="keyPressLow" onkeyup="this.value = this.value.toUpperCase();" maxlength="1" type="text"/>
1281 <h3 class="menuPrompt">Soldier: </h3> <input value="${String.fromCharCode(SoldierHelmetKey)}" id="soldier" class="keyPressLow"onkeyup="this.value = this.value.toUpperCase();" maxlength="1" type="text"/>
1282 <h3 class="menuPrompt">Turret: </h3> <input value="${String.fromCharCode(TurretKey)}" id="turret" class="keyPressLow" maxlength="1" onkeyup="this.value = this.value.toUpperCase();" type="text"/>
1283 <h3 class="menuPrompt">Booster: </h3> <input value="${String.fromCharCode(BoosterHatKey)}" id="booster" class="keyPressLow" maxlength="1" onkeyup="this.value = this.value.toUpperCase();" type="text"/>
1284 <h3 class="menuPrompt">Spike: </h3> <input value="${String.fromCharCode(SpikeGearKey)}" id="spikeg" class="keyPressLow" maxlength="1" onkeyup="this.value = this.value.toUpperCase();" type="text"/>
1285 <h3 class="menuPrompt">Samurai: </h3> <input value="${String.fromCharCode(SamuraiArmorKey)}" id="samuraiArmor" class="keyPressLow" onkeyup="this.value = this.value.toUpperCase();" type="text"/>
1286 <h3 class="menuPrompt">Emp: </h3> <input value="${String.fromCharCode(EmpHelmetKey)}" id="empHelmet" class="keyPressLow" onkeyup="this.value = this.value.toUpperCase();" type="text"/>
1287 <h3 class="menuPrompt">Bush: </h3> <input value="${String.fromCharCode(BushGearKey)}" id="bushGear" class="keyPressLow" onkeyup="this.value = this.value.toUpperCase();" type="text"/>
1288 <h3 class="menuPrompt">Assassin: </h3> <input value="${String.fromCharCode(AssassinGearKey)}" id="assassinGear" class="keyPressLow" onkeyup="this.value = this.value.toUpperCase();" type="text"/>
1289 <h3 class="menuPrompt">Scavenger: </h3> <input value="${String.fromCharCode(ScavengerGearKey)}" id="scavengerGear" class="keyPressLow" onkeyup="this.value = this.value.toUpperCase();" type="text"/>
1290 <hr>
1291 <h3 style="font-size: 17px;"> Map Settings </h3>
1292
1293 <label class="container"> Biomes
1294 <input type="checkbox" id="myCheck">
1295 <span class="checkmark"></span>
1296 </label>
1297 </div>
1298 </div>
1299 <div class="modal-footer">
1300 <h3 style="font-size: 17px;">Share this hack with other users!</h3>
1301 <p>Greasy Fork</p>
1302 </div>
1303 </div>
1304</div>
1305`
1306document.body.appendChild(menuChange)
1307
1308
1309$("#tankGear").on("input", () => {
1310 var cval = $("#tankGear").val();
1311 if (cval){
1312 TankGearKey = cval.toUpperCase();
1313 TankGearKey = TankGearKey.charCodeAt(0);
1314 console.log(TankGearKey);
1315 }
1316});
1317
1318$("#scavengerGear").on("input", () => {
1319 var cval = $("#scavengerGear").val();
1320 if (cval){
1321 ScavengerGearKey = cval.toUpperCase();
1322 ScavengerGearKey = ScavengerGearKey.charCodeAt(0);
1323 console.log(ScavengerGearKey);
1324 }
1325});
1326
1327$("#assassinGear").on("input", () => {
1328 var cval = $("#assassinGear").val();
1329 if (cval){
1330 AssassinGearKey = cval.toUpperCase();
1331 AssassinGearKey = AssassinGearKey.charCodeAt(0);
1332 console.log(AssassinGearKey);
1333 }
1334});
1335
1336$("#empHelmet").on("input", () => {
1337 var cval = $("#empHelmet").val();
1338 if (cval){
1339 EmpHelmetKey = cval.toUpperCase();
1340 EmpHelmetKey = EmpHelmetKey.charCodeAt(0);
1341 console.log(EmpHelmetKey);
1342 }
1343});
1344
1345$("#bullHelm").on("input", () => {
1346 var cval = $("#bullHelm").val();
1347 if (cval){
1348 BullHelmetKey = cval.toUpperCase();
1349 BullHelmetKey = BullHelmetKey.charCodeAt(0);
1350 console.log(BullHelmetKey);
1351 }
1352});
1353
1354$("#bushGear").on("input", () => {
1355 var cval = $("#bushGear").val();
1356 if (cval){
1357 BushGearKey = cval.toUpperCase();
1358 BushGearKey = BushGearKey.charCodeAt(0);
1359 console.log(BushGearKey);
1360 }
1361});
1362
1363
1364$("#samuraiArmor").on("input", () => {
1365 var cval = $("#samuraiArmor").val();
1366 if (cval){
1367 SamuraiArmorKey = cval.toUpperCase();
1368 SamuraiArmorKey = SamuraiArmorKey.charCodeAt(0);
1369 console.log(SamuraiArmorKey);
1370 }
1371});
1372
1373$("#soldier").on("input", () => {
1374 var cval = $("#soldier").val();
1375 if (cval){
1376 SoldierHelmetKey = cval.toUpperCase();
1377 SoldierHelmetKey = SoldierHelmetKey.charCodeAt(0);
1378 console.log(SoldierHelmetKey);
1379 }
1380});
1381
1382$("#turret").on("input", () => {
1383 var cval = $("#turret").val();
1384 if (cval){
1385 TurretKey = cval.toUpperCase();
1386 TurretKey = TurretKey.charCodeAt(0);
1387 console.log(TurretKey);
1388 }
1389});
1390
1391$("#booster").on("input", () => {
1392 var cval = $("#booster").val();
1393 if (cval){
1394 BoosterHatKey = cval.toUpperCase();
1395 BoosterHatKey = BoosterHatKey.charCodeAt(0);
1396 console.log(BoosterHatKey);
1397 }
1398});
1399
1400var styleItem = document.createElement("style");
1401styleItem.type = "text/css";
1402styleItem.appendChild(document.createTextNode(`
1403.keyPressLow {
1404 margin-left: 8px;
1405 font-size: 16px;
1406 margin-right: 8px;
1407 height: 25px;
1408 width: 50px;
1409 background-color: #fcfcfc;
1410 border-radius: 3.5px;
1411 border: none;
1412 text-align: center;
1413 color: #4a4a4a;
1414 border: 0.5px solid #f2f2f2;
1415}
1416
1417.menuPrompt {
1418 font-size: 17px;
1419 font-family: 'Hammersmith One';
1420 color: #4A4A4A;
1421 flex: 0.2;
1422 text-align: center;
1423 margin-top: 10px;
1424 display: inline-block;
1425}
1426
1427.modal {
1428 display: none;
1429 position: fixed;
1430 z-index: 1;
1431 left: 0;
1432 top: 0;
1433 overflow: auto;
1434 height: 100%;
1435 width: 100%;
1436}
1437
1438.modal-content {
1439 margin: 10% auto;
1440 width: 40%;
1441 box-shadow: 0 5px 8px 0 rgba(0, 0, 0, 0.2), 0 7px 20px 0 rgba(0, 0, 0, 0.17);
1442 font-size: 14px;
1443 line-height: 1.6;
1444}
1445
1446.modal-header h2,
1447.modal-footer h3 {
1448 margin: 0;
1449}
1450
1451.modal-header {
1452 background: #00FF00;
1453 padding: 15px;
1454 color: #fff;
1455 border-top-left-radius: 5px;
1456 border-top-right-radius: 5px;
1457}
1458
1459.modal-body {
1460 padding: 10px 20px;
1461 background: #fff;
1462}
1463
1464.modal-footer {
1465 background: #00FF00;
1466 padding: 10px;
1467 color: #fff;
1468 text-align: center;
1469 border-bottom-left-radius: 5px;
1470 border-bottom-right-radius: 5px;
1471}
1472
1473.closeBtn {
1474 color: #ccc;
1475 float: right;
1476 font-size: 30px;
1477 color: #fff;
1478}
1479
1480.closeBtn:hover,
1481.closeBtn:focus {
1482 color: #000;
1483 text-decoration: none;
1484 cursor: pointer;
1485}
1486
1487/* Customize the label (the container) */
1488.container {
1489 display: block;
1490 position: relative;
1491 padding-left: 35px;
1492 margin-bottom: 12px;
1493 cursor: pointer;
1494 font-size: 16px;
1495 -webkit-user-select: none;
1496 -moz-user-select: none;
1497 -ms-user-select: none;
1498 user-select: none;
1499}
1500
1501/* Hide the browser's default checkbox */
1502.container input {
1503 position: absolute;
1504 opacity: 0;
1505 cursor: pointer;
1506 height: 0;
1507 width: 0;
1508}
1509
1510/* Create a custom checkbox */
1511.checkmark {
1512 position: absolute;
1513 top: 0;
1514 left: 0;
1515 height: 25px;
1516 width: 25px;
1517 background-color: #eee;
1518}
1519
1520/* On mouse-over, add a grey background color */
1521.container:hover input ~ .checkmark {
1522 background-color: #ccc;
1523}
1524
1525/* When the checkbox is checked, add a blue background */
1526.container input:checked ~ .checkmark {
1527 background-color: #2196F3;
1528}
1529
1530/* Create the checkmark/indicator (hidden when not checked) */
1531.checkmark:after {
1532 content: "";
1533 position: absolute;
1534 display: none;
1535}
1536
1537/* Show the checkmark when checked */
1538.container input:checked ~ .checkmark:after {
1539 display: block;
1540}
1541
1542/* Style the checkmark/indicator */
1543.container .checkmark:after {
1544 left: 9px;
1545 top: 5px;
1546 width: 5px;
1547 height: 10px;
1548 border: solid white;
1549 border-width: 0 3px 3px 0;
1550 -webkit-transform: rotate(45deg);
1551 -ms-transform: rotate(45deg);
1552 transform: rotate(45deg);
1553}
1554
1555`))
1556document.head.appendChild(styleItem);
1557
1558
1559$("#adCard").css({display: "none"});
1560
1561
1562document.addEventListener('keydown', function(e) {
1563 if (e.keyCode == uneqiup && document.activeElement.id.toLowerCase() !== 'chatbox'){
1564 console.log("done")
1565 storeEquip(0);
1566 } else if (e.keyCode == 27){
1567 if (modal.style.display = "none") {
1568 modal.style.display = "block";
1569 } else {
1570 modal.style.display = "none";
1571 }
1572 } else if (e.keyCode == ScavengerGearKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
1573 storeEquip(ID_ScavengerGearGear);
1574 } else if (e.keyCode == AssassinGearKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
1575 storeEquip(ID_AssassinGear);
1576 } else if (e.keyCode == BushGearKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
1577 storeEquip(ID_BushGear);
1578 } else if (e.keyCode == EmpHelmetKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
1579 storeEquip(ID_EmpHelmet);
1580 } else if (e.keyCode == TankGearKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
1581 storeEquip(ID_TankGear);
1582 } else if (e.keyCode == SamuraiArmorKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
1583 storeEquip(ID_SamuraiArmor);
1584 } else if (e.keyCode == SoldierHelmetKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
1585 storeEquip(ID_SoldierHelmet);
1586 } else if (e.keyCode == BullHelmetKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
1587 storeEquip(ID_BullHelmet);
1588 } else if (e.keyCode == BoosterHatKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
1589 storeEquip(ID_BoosterHat);
1590 } else if (e.keyCode == SpikeGearKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
1591 storeEquip(ID_SpikeGear);
1592 } else if (e.keyCode == TurretKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
1593 storeEquip(ID_TurretGear);
1594 }
1595})
1596
1597// Get modal element
1598var modal = document.getElementById("simpleModal");
1599// Get close button
1600var closeBtn = document.getElementsByClassName('closeBtn')[0];
1601
1602// Events
1603closeBtn.addEventListener('click', closeModal);
1604window.addEventListener('click', outsideClick);
1605
1606// Close
1607function closeModal() {
1608 modal.style.display = 'none';
1609}
1610
1611// Close If Outside Click
1612function outsideClick(e) {
1613 if (e.target == modal) {
1614 modal.style.display = 'none';
1615 }
1616}
1617
1618var checkbox = document.querySelector("#myCheck")
1619
1620checkbox.addEventListener('change', function() {
1621 if (this.checked) {
1622 $("#mapDisplay").css({background: `url('https://i.imgur.com/fgFsQJp.png')`});
1623 console.log('checked')
1624 } else {
1625 $("#mapDisplay").css({background: `rgba(0, 0, 0, 0.25)`})
1626 console.log('unchecked')
1627 }
1628})
1629function Parse() {
1630 document.addEventListener('keydown', function (CustomKey1) {
1631 if (CustomKey1.keyCode == 96789876) {
1632 storeBuy(879689)
1633 console.info('Attempted to buy soldier')
1634 }
1635 });
1636 };
1637
1638 document.addEventListener('keydown', function (CustomKey1) {
1639 if (CustomKey1.keyCode == 107) {
1640 storeBuy(7)
1641 console.info('Attempted to buy bull')
1642 }
1643 }
1644 );
1645 ;
1646
1647 document.addEventListener('keydown', function (CustomKey1) {
1648 if (CustomKey1.keyCode == 18) {
1649 storeBuy(40)
1650 console.info('Attempted to buy tank')
1651 }
1652 }
1653 );
1654 ;
1655 document.addEventListener('keydown', function (CustomKey1) {
1656 if (CustomKey1.keyCode == 16) {
1657 storeBuy(12)
1658 console.info('Attempted to buy booster')
1659 }
1660 }
1661 );
1662 ;
1663 document.addEventListener('keydown', function (CustomKey1) {
1664 if (CustomKey1.keyCode == 90) {
1665 storeBuy(53)
1666 console.info('Attempted to buy turret')
1667 }
1668 }
1669 );
1670 ;
1671 document.addEventListener('keydown', function (CustomKey1) {
1672 if (CustomKey1.keyCode == 75) {
1673 storeBuy(20)
1674 console.info('Attempted to buy samurai')
1675 }
1676 }
1677 );
1678 ;
1679 document.addEventListener('keydown', function (CustomKey1) {
1680 if (CustomKey1.keyCode == 221) {
1681 storeBuy(2420)
1682 console.info('Attempted to buy emp')
1683 }
1684 }
1685 );
1686 ;
1687 document.addEventListener('keydown', function (CustomKey1) {
1688 if (CustomKey1.keyCode == 187) {
1689 storeBuy(23431)
1690 console.info('Attempted to buy flipper')
1691 }
1692 }
1693 );
1694 ;
1695 document.addEventListener('keydown', function (CustomKey1) {
1696 if (CustomKey1.keyCode == 45345) {
1697 storeBuy(34534)
1698 console.info('Attempted to buy assassin')
1699 }
1700 }
1701 );
1702 ;
1703 document.addEventListener('keydown', function (CustomKey1) {
1704 if (CustomKey1.keyCode == 345345) {
1705 storeBuy(34534534)
1706 console.info('Attempted to buy bush')
1707 }
1708 }
1709 );
1710 ;
1711 document.addEventListener('keydown', function (CustomKey1) {
1712 if (CustomKey1.keyCode == 106) {
1713 storeBuy(22347)
1714 console.info('Attempted to buy scavenger')
1715 }
1716 }
1717 );
1718 ;
1719Parse();
1720
1721! function(e) {
1722 var t = {};
1723
1724 function n(i) {
1725 if (t[i]) return t[i].exports;
1726 var r = t[i] = {
1727 i: i,
1728 l: !1,
1729 exports: {}
1730 };
1731 return e[i].call(r.exports, r, r.exports, n), r.l = !0, r.exports
1732 }
1733 n.m = e, n.c = t, n.d = function(e, t, i) {
1734 n.o(e, t) || Object.defineProperty(e, t, {
1735 enumerable: !0,
1736 get: i
1737 })
1738 }, n.r = function(e) {
1739 "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(
1740 e, Symbol.toStringTag, {
1741 value: "Module"
1742 }), Object.defineProperty(e, "__esModule", {
1743 value: !0
1744 })
1745 }, n.t = function(e, t) {
1746 if (1 & t && (e = n(e)), 8 & t) return e;
1747 if (4 & t && "object" == typeof e && e && e.__esModule) return e;
1748 var i = Object.create(null);
1749 if (n.r(i), Object.defineProperty(i, "default", {
1750 enumerable: !0,
1751 value: e
1752 }), 2 & t && "string" != typeof e)
1753 for (var r in e) n.d(i, r, function(t) {
1754 return e[t]
1755 }.bind(null, r));
1756 return i
1757 }, n.n = function(e) {
1758 var t = e && e.__esModule ? function() {
1759 return e.default
1760 } : function() {
1761 return e
1762 };
1763 return n.d(t, "a", t), t
1764 }, n.o = function(e, t) {
1765 return Object.prototype.hasOwnProperty.call(e, t)
1766 }, n.p = "", n(n.s = 21)
1767}([function(e, t, n) {
1768 var i = t.global = n(25),
1769 r = t.hasBuffer = i && !!i.isBuffer,
1770 s = t.hasArrayBuffer = "undefined" != typeof ArrayBuffer,
1771 a = t.isArray = n(5);
1772 t.isArrayBuffer = s ? function(e) {
1773 return e instanceof ArrayBuffer || p(e)
1774 } : m;
1775 var o = t.isBuffer = r ? i.isBuffer : m,
1776 c = t.isView = s ? ArrayBuffer.isView || y("ArrayBuffer", "buffer") : m;
1777 t.alloc = d, t.concat = function(e, n) {
1778 n || (n = 0, Array.prototype.forEach.call(e, (function(e) {
1779 n += e.length
1780 })));
1781 var i = this !== t && this || e[0],
1782 r = d.call(i, n),
1783 s = 0;
1784 return Array.prototype.forEach.call(e, (function(e) {
1785 s += f.copy.call(e, r, s)
1786 })), r
1787 }, t.from = function(e) {
1788 return "string" == typeof e ? function(e) {
1789 var t = 3 * e.length,
1790 n = d.call(this, t),
1791 i = f.write.call(n, e);
1792 return t !== i && (n = f.slice.call(n, 0, i)), n
1793 }.call(this, e) : g(this).from(e)
1794 };
1795 var l = t.Array = n(28),
1796 h = t.Buffer = n(29),
1797 u = t.Uint8Array = n(30),
1798 f = t.prototype = n(6);
1799
1800 function d(e) {
1801 return g(this).alloc(e)
1802 }
1803 var p = y("ArrayBuffer");
1804
1805 function g(e) {
1806 return o(e) ? h : c(e) ? u : a(e) ? l : r ? h : s ? u : l
1807 }
1808
1809 function m() {
1810 return !1
1811 }
1812
1813 function y(e, t) {
1814 return e = "[object " + e + "]",
1815 function(n) {
1816 return null != n && {}.toString.call(t ? n[t] : n) === e
1817 }
1818 }
1819}, function(e, t, n) {
1820 var i = n(5);
1821 t.createCodec = o, t.install = function(e) {
1822 for (var t in e) s.prototype[t] = a(s.prototype[t], e[t])
1823 }, t.filter = function(e) {
1824 return i(e) ? function(e) {
1825 return e = e.slice(),
1826 function(n) {
1827 return e.reduce(t, n)
1828 };
1829
1830 function t(e, t) {
1831 return t(e)
1832 }
1833 }(e) : e
1834 };
1835 var r = n(0);
1836
1837 function s(e) {
1838 if (!(this instanceof s)) return new s(e);
1839 this.options = e, this.init()
1840 }
1841
1842 function a(e, t) {
1843 return e && t ? function() {
1844 return e.apply(this, arguments), t.apply(this, arguments)
1845 } : e || t
1846 }
1847
1848 function o(e) {
1849 return new s(e)
1850 }
1851 s.prototype.init = function() {
1852 var e = this.options;
1853 return e && e.uint8array && (this.bufferish = r.Uint8Array), this
1854 }, t.preset = o({
1855 preset: !0
1856 })
1857}, function(e, t, n) {
1858 var i = n(3).ExtBuffer,
1859 r = n(32),
1860 s = n(33),
1861 a = n(1);
1862
1863 function o() {
1864 var e = this.options;
1865 return this.encode = function(e) {
1866 var t = s.getWriteType(e);
1867 return function(e, n) {
1868 var i = t[typeof n];
1869 if (!i) throw new Error('Unsupported type "' + typeof n + '": ' + n);
1870 i(e, n)
1871 }
1872 }(e), e && e.preset && r.setExtPackers(this), this
1873 }
1874 a.install({
1875 addExtPacker: function(e, t, n) {
1876 n = a.filter(n);
1877 var r = t.name;
1878 r && "Object" !== r ? (this.extPackers || (this.extPackers = {}))[r] =
1879 s : (this.extEncoderList || (this.extEncoderList = [])).unshift([t, s]);
1880
1881 function s(t) {
1882 return n && (t = n(t)), new i(t, e)
1883 }
1884 },
1885 getExtPacker: function(e) {
1886 var t = this.extPackers || (this.extPackers = {}),
1887 n = e.constructor,
1888 i = n && n.name && t[n.name];
1889 if (i) return i;
1890 for (var r = this.extEncoderList || (this.extEncoderList = []), s = r.length,
1891 a = 0; a < s; a++) {
1892 var o = r[a];
1893 if (n === o[0]) return o[1]
1894 }
1895 },
1896 init: o
1897 }), t.preset = o.call(a.preset)
1898}, function(e, t, n) {
1899 t.ExtBuffer = function e(t, n) {
1900 if (!(this instanceof e)) return new e(t, n);
1901 this.buffer = i.from(t), this.type = n
1902 };
1903 var i = n(0)
1904}, function(e, t) {
1905 t.read = function(e, t, n, i, r) {
1906 var s, a, o = 8 * r - i - 1,
1907 c = (1 << o) - 1,
1908 l = c >> 1,
1909 h = -7,
1910 u = n ? r - 1 : 0,
1911 f = n ? -1 : 1,
1912 d = e[t + u];
1913 for (u += f, s = d & (1 << -h) - 1, d >>= -h, h += o; h > 0; s = 256 * s +
1914 e[t + u], u += f, h -= 8);
1915 for (a = s & (1 << -h) - 1, s >>= -h, h += i; h > 0; a = 256 * a + e[t + u],
1916 u += f, h -= 8);
1917 if (0 === s) s = 1 - l;
1918 else {
1919 if (s === c) return a ? NaN : 1 / 0 * (d ? -1 : 1);
1920 a += Math.pow(2, i), s -= l
1921 }
1922 return (d ? -1 : 1) * a * Math.pow(2, s - i)
1923 }, t.write = function(e, t, n, i, r, s) {
1924 var a, o, c, l = 8 * s - r - 1,
1925 h = (1 << l) - 1,
1926 u = h >> 1,
1927 f = 23 === r ? Math.pow(2, -24) - Math.pow(2, -77) : 0,
1928 d = i ? 0 : s - 1,
1929 p = i ? 1 : -1,
1930 g = t < 0 || 0 === t && 1 / t < 0 ? 1 : 0;
1931 for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (o = isNaN(t) ? 1 : 0, a =
1932 h) : (a = Math.floor(Math.log(t) / Math.LN2), t * (c = Math.pow(2, -a)) <
1933 1 && (a--, c *= 2), (t += a + u >= 1 ? f / c : f * Math.pow(2, 1 - u)) *
1934 c >= 2 && (a++, c /= 2), a + u >= h ? (o = 0, a = h) : a + u >= 1 ? (o =
1935 (t * c - 1) * Math.pow(2, r), a += u) : (o = t * Math.pow(2, u - 1) *
1936 Math.pow(2, r), a = 0)); r >= 8; e[n + d] = 255 & o, d += p, o /= 256,
1937 r -= 8);
1938 for (a = a << r | o, l += r; l > 0; e[n + d] = 255 & a, d += p, a /= 256,
1939 l -= 8);
1940 e[n + d - p] |= 128 * g
1941 }
1942}, function(e, t) {
1943 var n = {}.toString;
1944 e.exports = Array.isArray || function(e) {
1945 return "[object Array]" == n.call(e)
1946 }
1947}, function(e, t, n) {
1948 var i = n(31);
1949 t.copy = c, t.slice = l, t.toString = function(e, t, n) {
1950 return (!a && r.isBuffer(this) ? this.toString : i.toString).apply(this,
1951 arguments)
1952 }, t.write = function(e) {
1953 return function() {
1954 return (this[e] || i[e]).apply(this, arguments)
1955 }
1956 }("write");
1957 var r = n(0),
1958 s = r.global,
1959 a = r.hasBuffer && "TYPED_ARRAY_SUPPORT" in s,
1960 o = a && !s.TYPED_ARRAY_SUPPORT;
1961
1962 function c(e, t, n, s) {
1963 var a = r.isBuffer(this),
1964 c = r.isBuffer(e);
1965 if (a && c) return this.copy(e, t, n, s);
1966 if (o || a || c || !r.isView(this) || !r.isView(e)) return i.copy.call(this,
1967 e, t, n, s);
1968 var h = n || null != s ? l.call(this, n, s) : this;
1969 return e.set(h, t), h.length
1970 }
1971
1972 function l(e, t) {
1973 var n = this.slice || !o && this.subarray;
1974 if (n) return n.call(this, e, t);
1975 var i = r.alloc.call(this, t - e);
1976 return c.call(this, i, 0, e, t), i
1977 }
1978}, function(e, t, n) {
1979 (function(e) {
1980 ! function(t) {
1981 var n, i = "undefined",
1982 r = i !== typeof e && e,
1983 s = i !== typeof Uint8Array && Uint8Array,
1984 a = i !== typeof ArrayBuffer && ArrayBuffer,
1985 o = [0, 0, 0, 0, 0, 0, 0, 0],
1986 c = Array.isArray || function(e) {
1987 return !!e && "[object Array]" == Object.prototype.toString.call(e)
1988 },
1989 l = 4294967296;
1990
1991 function h(e, c, h) {
1992 var b = c ? 0 : 4,
1993 x = c ? 4 : 0,
1994 S = c ? 0 : 3,
1995 T = c ? 1 : 2,
1996 I = c ? 2 : 1,
1997 E = c ? 3 : 0,
1998 M = c ? y : v,
1999 A = c ? k : w,
2000 P = O.prototype,
2001 B = "is" + e,
2002 C = "_" + B;
2003 return P.buffer = void 0, P.offset = 0, P[C] = !0, P.toNumber = R, P.toString =
2004 function(e) {
2005 var t = this.buffer,
2006 n = this.offset,
2007 i = _(t, n + b),
2008 r = _(t, n + x),
2009 s = "",
2010 a = !h && 2147483648 & i;
2011 for (a && (i = ~i, r = l - r), e = e || 10;;) {
2012 var o = i % e * l + r;
2013 if (i = Math.floor(i / e), r = Math.floor(o / e), s = (o % e).toString(
2014 e) + s, !i && !r) break
2015 }
2016 return a && (s = "-" + s), s
2017 }, P.toJSON = R, P.toArray = u, r && (P.toBuffer = f), s && (P.toArrayBuffer =
2018 d), O[B] = function(e) {
2019 return !(!e || !e[C])
2020 }, t[e] = O, O;
2021
2022 function O(e, t, r, c) {
2023 return this instanceof O ? function(e, t, r, c, h) {
2024 if (s && a && (t instanceof a && (t = new s(t)), c instanceof a && (c =
2025 new s(c))), t || r || c || n) {
2026 if (!p(t, r)) h = r, c = t, r = 0, t = new(n || Array)(8);
2027 e.buffer = t, e.offset = r |= 0, i !== typeof c && ("string" ==
2028 typeof c ? function(e, t, n, i) {
2029 var r = 0,
2030 s = n.length,
2031 a = 0,
2032 o = 0;
2033 "-" === n[0] && r++;
2034 for (var c = r; r < s;) {
2035 var h = parseInt(n[r++], i);
2036 if (!(h >= 0)) break;
2037 o = o * i + h, a = a * i + Math.floor(o / l), o %= l
2038 }
2039 c && (a = ~a, o ? o = l - o : a++), j(e, t + b, a), j(e, t + x, o)
2040 }(t, r, c, h || 10) : p(c, h) ? g(t, r, c, h) : "number" == typeof h ?
2041 (j(t, r + b, c), j(t, r + x, h)) : c > 0 ? M(t, r, c) : c < 0 ? A(
2042 t, r, c) : g(t, r, o, 0))
2043 } else e.buffer = m(o, 0)
2044 }(this, e, t, r, c) : new O(e, t, r, c)
2045 }
2046
2047 function R() {
2048 var e = this.buffer,
2049 t = this.offset,
2050 n = _(e, t + b),
2051 i = _(e, t + x);
2052 return h || (n |= 0), n ? n * l + i : i
2053 }
2054
2055 function j(e, t, n) {
2056 e[t + E] = 255 & n, n >>= 8, e[t + I] = 255 & n, n >>= 8, e[t + T] =
2057 255 & n, n >>= 8, e[t + S] = 255 & n
2058 }
2059
2060 function _(e, t) {
2061 return 16777216 * e[t + S] + (e[t + T] << 16) + (e[t + I] << 8) + e[t +
2062 E]
2063 }
2064 }
2065
2066 function u(e) {
2067 var t = this.buffer,
2068 i = this.offset;
2069 return n = null, !1 !== e && 0 === i && 8 === t.length && c(t) ? t : m(t,
2070 i)
2071 }
2072
2073 function f(t) {
2074 var i = this.buffer,
2075 s = this.offset;
2076 if (n = r, !1 !== t && 0 === s && 8 === i.length && e.isBuffer(i)) return i;
2077 var a = new r(8);
2078 return g(a, 0, i, s), a
2079 }
2080
2081 function d(e) {
2082 var t = this.buffer,
2083 i = this.offset,
2084 r = t.buffer;
2085 if (n = s, !1 !== e && 0 === i && r instanceof a && 8 === r.byteLength)
2086 return r;
2087 var o = new s(8);
2088 return g(o, 0, t, i), o.buffer
2089 }
2090
2091 function p(e, t) {
2092 var n = e && e.length;
2093 return t |= 0, n && t + 8 <= n && "string" != typeof e[t]
2094 }
2095
2096 function g(e, t, n, i) {
2097 t |= 0, i |= 0;
2098 for (var r = 0; r < 8; r++) e[t++] = 255 & n[i++]
2099 }
2100
2101 function m(e, t) {
2102 return Array.prototype.slice.call(e, t, t + 8)
2103 }
2104
2105 function y(e, t, n) {
2106 for (var i = t + 8; i > t;) e[--i] = 255 & n, n /= 256
2107 }
2108
2109 function k(e, t, n) {
2110 var i = t + 8;
2111 for (n++; i > t;) e[--i] = 255 & -n ^ 255, n /= 256
2112 }
2113
2114 function v(e, t, n) {
2115 for (var i = t + 8; t < i;) e[t++] = 255 & n, n /= 256
2116 }
2117
2118 function w(e, t, n) {
2119 var i = t + 8;
2120 for (n++; t < i;) e[t++] = 255 & -n ^ 255, n /= 256
2121 }
2122 h("Uint64BE", !0, !0), h("Int64BE", !0, !1), h("Uint64LE", !1, !0), h(
2123 "Int64LE", !1, !1)
2124 }("string" != typeof t.nodeName ? t : this || {})
2125 }).call(this, n(11).Buffer)
2126}, function(e, t, n) {
2127 var i = n(3).ExtBuffer,
2128 r = n(35),
2129 s = n(17).readUint8,
2130 a = n(36),
2131 o = n(1);
2132
2133 function c() {
2134 var e = this.options;
2135 return this.decode = function(e) {
2136 var t = a.getReadToken(e);
2137 return function(e) {
2138 var n = s(e),
2139 i = t[n];
2140 if (!i) throw new Error("Invalid type: " + (n ? "0x" + n.toString(16) :
2141 n));
2142 return i(e)
2143 }
2144 }(e), e && e.preset && r.setExtUnpackers(this), this
2145 }
2146 o.install({
2147 addExtUnpacker: function(e, t) {
2148 (this.extUnpackers || (this.extUnpackers = []))[e] = o.filter(t)
2149 },
2150 getExtUnpacker: function(e) {
2151 return (this.extUnpackers || (this.extUnpackers = []))[e] || function(t) {
2152 return new i(t, e)
2153 }
2154 },
2155 init: c
2156 }), t.preset = c.call(o.preset)
2157}, function(e, t, n) {
2158 t.encode = function(e, t) {
2159 var n = new i(t);
2160 return n.write(e), n.read()
2161 };
2162 var i = n(10).EncodeBuffer
2163}, function(e, t, n) {
2164 t.EncodeBuffer = r;
2165 var i = n(2).preset;
2166
2167 function r(e) {
2168 if (!(this instanceof r)) return new r(e);
2169 if (e && (this.options = e, e.codec)) {
2170 var t = this.codec = e.codec;
2171 t.bufferish && (this.bufferish = t.bufferish)
2172 }
2173 }
2174 n(14).FlexEncoder.mixin(r.prototype), r.prototype.codec = i, r.prototype.write =
2175 function(e) {
2176 this.codec.encode(this, e)
2177 }
2178}, function(e, t, n) {
2179 "use strict";
2180 (function(e) {
2181 /*!
2182 * The buffer module from node.js, for the browser.
2183 *
2184 * @author Feross Aboukhadijeh <http://feross.org>
2185 * @license MIT
2186 */
2187 var i = n(26),
2188 r = n(4),
2189 s = n(27);
2190
2191 function a() {
2192 return c.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823
2193 }
2194
2195 function o(e, t) {
2196 if (a() < t) throw new RangeError("Invalid typed array length");
2197 return c.TYPED_ARRAY_SUPPORT ? (e = new Uint8Array(t)).__proto__ = c.prototype :
2198 (null === e && (e = new c(t)), e.length = t), e
2199 }
2200
2201 function c(e, t, n) {
2202 if (!(c.TYPED_ARRAY_SUPPORT || this instanceof c)) return new c(e, t, n);
2203 if ("number" == typeof e) {
2204 if ("string" == typeof t) throw new Error(
2205 "If encoding is specified then the first argument must be a string");
2206 return u(this, e)
2207 }
2208 return l(this, e, t, n)
2209 }
2210
2211 function l(e, t, n, i) {
2212 if ("number" == typeof t) throw new TypeError(
2213 '"value" argument must not be a number');
2214 return "undefined" != typeof ArrayBuffer && t instanceof ArrayBuffer ?
2215 function(e, t, n, i) {
2216 if (t.byteLength, n < 0 || t.byteLength < n) throw new RangeError(
2217 "'offset' is out of bounds");
2218 if (t.byteLength < n + (i || 0)) throw new RangeError(
2219 "'length' is out of bounds");
2220 return t = void 0 === n && void 0 === i ? new Uint8Array(t) : void 0 ===
2221 i ? new Uint8Array(t, n) : new Uint8Array(t, n, i), c.TYPED_ARRAY_SUPPORT ?
2222 (e = t).__proto__ = c.prototype : e = f(e, t), e
2223 }(e, t, n, i) : "string" == typeof t ? function(e, t, n) {
2224 if ("string" == typeof n && "" !== n || (n = "utf8"), !c.isEncoding(n))
2225 throw new TypeError('"encoding" must be a valid string encoding');
2226 var i = 0 | p(t, n),
2227 r = (e = o(e, i)).write(t, n);
2228 return r !== i && (e = e.slice(0, r)), e
2229 }(e, t, n) : function(e, t) {
2230 if (c.isBuffer(t)) {
2231 var n = 0 | d(t.length);
2232 return 0 === (e = o(e, n)).length || t.copy(e, 0, 0, n), e
2233 }
2234 if (t) {
2235 if ("undefined" != typeof ArrayBuffer && t.buffer instanceof ArrayBuffer ||
2236 "length" in t) return "number" != typeof t.length || function(e) {
2237 return e != e
2238 }(t.length) ? o(e, 0) : f(e, t);
2239 if ("Buffer" === t.type && s(t.data)) return f(e, t.data)
2240 }
2241 throw new TypeError(
2242 "First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object."
2243 )
2244 }(e, t)
2245 }
2246
2247 function h(e) {
2248 if ("number" != typeof e) throw new TypeError(
2249 '"size" argument must be a number');
2250 if (e < 0) throw new RangeError('"size" argument must not be negative')
2251 }
2252
2253 function u(e, t) {
2254 if (h(t), e = o(e, t < 0 ? 0 : 0 | d(t)), !c.TYPED_ARRAY_SUPPORT)
2255 for (var n = 0; n < t; ++n) e[n] = 0;
2256 return e
2257 }
2258
2259 function f(e, t) {
2260 var n = t.length < 0 ? 0 : 0 | d(t.length);
2261 e = o(e, n);
2262 for (var i = 0; i < n; i += 1) e[i] = 255 & t[i];
2263 return e
2264 }
2265
2266 function d(e) {
2267 if (e >= a()) throw new RangeError(
2268 "Attempt to allocate Buffer larger than maximum size: 0x" + a().toString(
2269 16) + " bytes");
2270 return 0 | e
2271 }
2272
2273 function p(e, t) {
2274 if (c.isBuffer(e)) return e.length;
2275 if ("undefined" != typeof ArrayBuffer && "function" == typeof ArrayBuffer
2276 .isView && (ArrayBuffer.isView(e) || e instanceof ArrayBuffer)) return e
2277 .byteLength;
2278 "string" != typeof e && (e = "" + e);
2279 var n = e.length;
2280 if (0 === n) return 0;
2281 for (var i = !1;;) switch (t) {
2282 case "ascii":
2283 case "latin1":
2284 case "binary":
2285 return n;
2286 case "utf8":
2287 case "utf-8":
2288 case void 0:
2289 return z(e).length;
2290 case "ucs2":
2291 case "ucs-2":
2292 case "utf16le":
2293 case "utf-16le":
2294 return 2 * n;
2295 case "hex":
2296 return n >>> 1;
2297 case "base64":
2298 return H(e).length;
2299 default:
2300 if (i) return z(e).length;
2301 t = ("" + t).toLowerCase(), i = !0
2302 }
2303 }
2304
2305 function g(e, t, n) {
2306 var i = e[t];
2307 e[t] = e[n], e[n] = i
2308 }
2309
2310 function m(e, t, n, i, r) {
2311 if (0 === e.length) return -1;
2312 if ("string" == typeof n ? (i = n, n = 0) : n > 2147483647 ? n =
2313 2147483647 : n < -2147483648 && (n = -2147483648), n = +n, isNaN(n) && (
2314 n = r ? 0 : e.length - 1), n < 0 && (n = e.length + n), n >= e.length) {
2315 if (r) return -1;
2316 n = e.length - 1
2317 } else if (n < 0) {
2318 if (!r) return -1;
2319 n = 0
2320 }
2321 if ("string" == typeof t && (t = c.from(t, i)), c.isBuffer(t)) return 0 ===
2322 t.length ? -1 : y(e, t, n, i, r);
2323 if ("number" == typeof t) return t &= 255, c.TYPED_ARRAY_SUPPORT &&
2324 "function" == typeof Uint8Array.prototype.indexOf ? r ? Uint8Array.prototype
2325 .indexOf.call(e, t, n) : Uint8Array.prototype.lastIndexOf.call(e, t, n) :
2326 y(e, [t], n, i, r);
2327 throw new TypeError("val must be string, number or Buffer")
2328 }
2329
2330 function y(e, t, n, i, r) {
2331 var s, a = 1,
2332 o = e.length,
2333 c = t.length;
2334 if (void 0 !== i && ("ucs2" === (i = String(i).toLowerCase()) || "ucs-2" ===
2335 i || "utf16le" === i || "utf-16le" === i)) {
2336 if (e.length < 2 || t.length < 2) return -1;
2337 a = 2, o /= 2, c /= 2, n /= 2
2338 }
2339
2340 function l(e, t) {
2341 return 1 === a ? e[t] : e.readUInt16BE(t * a)
2342 }
2343 if (r) {
2344 var h = -1;
2345 for (s = n; s < o; s++)
2346 if (l(e, s) === l(t, -1 === h ? 0 : s - h)) {
2347 if (-1 === h && (h = s), s - h + 1 === c) return h * a
2348 } else -1 !== h && (s -= s - h), h = -1
2349 } else
2350 for (n + c > o && (n = o - c), s = n; s >= 0; s--) {
2351 for (var u = !0, f = 0; f < c; f++)
2352 if (l(e, s + f) !== l(t, f)) {
2353 u = !1;
2354 break
2355 }
2356 if (u) return s
2357 }
2358 return -1
2359 }
2360
2361 function k(e, t, n, i) {
2362 n = Number(n) || 0;
2363 var r = e.length - n;
2364 i ? (i = Number(i)) > r && (i = r) : i = r;
2365 var s = t.length;
2366 if (s % 2 != 0) throw new TypeError("Invalid hex string");
2367 i > s / 2 && (i = s / 2);
2368 for (var a = 0; a < i; ++a) {
2369 var o = parseInt(t.substr(2 * a, 2), 16);
2370 if (isNaN(o)) return a;
2371 e[n + a] = o
2372 }
2373 return a
2374 }
2375
2376 function v(e, t, n, i) {
2377 return V(z(t, e.length - n), e, n, i)
2378 }
2379
2380 function w(e, t, n, i) {
2381 return V(function(e) {
2382 for (var t = [], n = 0; n < e.length; ++n) t.push(255 & e.charCodeAt(n));
2383 return t
2384 }(t), e, n, i)
2385 }
2386
2387 function b(e, t, n, i) {
2388 return w(e, t, n, i)
2389 }
2390
2391 function x(e, t, n, i) {
2392 return V(H(t), e, n, i)
2393 }
2394
2395 function S(e, t, n, i) {
2396 return V(function(e, t) {
2397 for (var n, i, r, s = [], a = 0; a < e.length && !((t -= 2) < 0); ++a)
2398 i = (n = e.charCodeAt(a)) >> 8, r = n % 256, s.push(r), s.push(i);
2399 return s
2400 }(t, e.length - n), e, n, i)
2401 }
2402
2403 function T(e, t, n) {
2404 return 0 === t && n === e.length ? i.fromByteArray(e) : i.fromByteArray(e
2405 .slice(t, n))
2406 }
2407
2408 function I(e, t, n) {
2409 n = Math.min(e.length, n);
2410 for (var i = [], r = t; r < n;) {
2411 var s, a, o, c, l = e[r],
2412 h = null,
2413 u = l > 239 ? 4 : l > 223 ? 3 : l > 191 ? 2 : 1;
2414 if (r + u <= n) switch (u) {
2415 case 1:
2416 l < 128 && (h = l);
2417 break;
2418 case 2:
2419 128 == (192 & (s = e[r + 1])) && (c = (31 & l) << 6 | 63 & s) > 127 &&
2420 (h = c);
2421 break;
2422 case 3:
2423 s = e[r + 1], a = e[r + 2], 128 == (192 & s) && 128 == (192 & a) && (
2424 c = (15 & l) << 12 | (63 & s) << 6 | 63 & a) > 2047 && (c < 55296 ||
2425 c > 57343) && (h = c);
2426 break;
2427 case 4:
2428 s = e[r + 1], a = e[r + 2], o = e[r + 3], 128 == (192 & s) && 128 ==
2429 (192 & a) && 128 == (192 & o) && (c = (15 & l) << 18 | (63 & s) <<
2430 12 | (63 & a) << 6 | 63 & o) > 65535 && c < 1114112 && (h = c)
2431 }
2432 null === h ? (h = 65533, u = 1) : h > 65535 && (h -= 65536, i.push(h >>>
2433 10 & 1023 | 55296), h = 56320 | 1023 & h), i.push(h), r += u
2434 }
2435 return function(e) {
2436 var t = e.length;
2437 if (t <= E) return String.fromCharCode.apply(String, e);
2438 for (var n = "", i = 0; i < t;) n += String.fromCharCode.apply(String,
2439 e.slice(i, i += E));
2440 return n
2441 }(i)
2442 }
2443 t.Buffer = c, t.SlowBuffer = function(e) {
2444 return +e != e && (e = 0), c.alloc(+e)
2445 }, t.INSPECT_MAX_BYTES = 50, c.TYPED_ARRAY_SUPPORT = void 0 !== e.TYPED_ARRAY_SUPPORT ?
2446 e.TYPED_ARRAY_SUPPORT : function() {
2447 try {
2448 var e = new Uint8Array(1);
2449 return e.__proto__ = {
2450 __proto__: Uint8Array.prototype,
2451 foo: function() {
2452 return 42
2453 }
2454 }, 42 === e.foo() && "function" == typeof e.subarray && 0 === e.subarray(
2455 1, 1).byteLength
2456 } catch (e) {
2457 return !1
2458 }
2459 }(), t.kMaxLength = a(), c.poolSize = 8192, c._augment = function(e) {
2460 return e.__proto__ = c.prototype, e
2461 }, c.from = function(e, t, n) {
2462 return l(null, e, t, n)
2463 }, c.TYPED_ARRAY_SUPPORT && (c.prototype.__proto__ = Uint8Array.prototype,
2464 c.__proto__ = Uint8Array, "undefined" != typeof Symbol && Symbol.species &&
2465 c[Symbol.species] === c && Object.defineProperty(c, Symbol.species, {
2466 value: null,
2467 configurable: !0
2468 })), c.alloc = function(e, t, n) {
2469 return function(e, t, n, i) {
2470 return h(t), t <= 0 ? o(e, t) : void 0 !== n ? "string" == typeof i ?
2471 o(e, t).fill(n, i) : o(e, t).fill(n) : o(e, t)
2472 }(null, e, t, n)
2473 }, c.allocUnsafe = function(e) {
2474 return u(null, e)
2475 }, c.allocUnsafeSlow = function(e) {
2476 return u(null, e)
2477 }, c.isBuffer = function(e) {
2478 return !(null == e || !e._isBuffer)
2479 }, c.compare = function(e, t) {
2480 if (!c.isBuffer(e) || !c.isBuffer(t)) throw new TypeError(
2481 "Arguments must be Buffers");
2482 if (e === t) return 0;
2483 for (var n = e.length, i = t.length, r = 0, s = Math.min(n, i); r < s; ++
2484 r)
2485 if (e[r] !== t[r]) {
2486 n = e[r], i = t[r];
2487 break
2488 }
2489 return n < i ? -1 : i < n ? 1 : 0
2490 }, c.isEncoding = function(e) {
2491 switch (String(e).toLowerCase()) {
2492 case "hex":
2493 case "utf8":
2494 case "utf-8":
2495 case "ascii":
2496 case "latin1":
2497 case "binary":
2498 case "base64":
2499 case "ucs2":
2500 case "ucs-2":
2501 case "utf16le":
2502 case "utf-16le":
2503 return !0;
2504 default:
2505 return !1
2506 }
2507 }, c.concat = function(e, t) {
2508 if (!s(e)) throw new TypeError(
2509 '"list" argument must be an Array of Buffers');
2510 if (0 === e.length) return c.alloc(0);
2511 var n;
2512 if (void 0 === t)
2513 for (t = 0, n = 0; n < e.length; ++n) t += e[n].length;
2514 var i = c.allocUnsafe(t),
2515 r = 0;
2516 for (n = 0; n < e.length; ++n) {
2517 var a = e[n];
2518 if (!c.isBuffer(a)) throw new TypeError(
2519 '"list" argument must be an Array of Buffers');
2520 a.copy(i, r), r += a.length
2521 }
2522 return i
2523 }, c.byteLength = p, c.prototype._isBuffer = !0, c.prototype.swap16 =
2524 function() {
2525 var e = this.length;
2526 if (e % 2 != 0) throw new RangeError(
2527 "Buffer size must be a multiple of 16-bits");
2528 for (var t = 0; t < e; t += 2) g(this, t, t + 1);
2529 return this
2530 }, c.prototype.swap32 = function() {
2531 var e = this.length;
2532 if (e % 4 != 0) throw new RangeError(
2533 "Buffer size must be a multiple of 32-bits");
2534 for (var t = 0; t < e; t += 4) g(this, t, t + 3), g(this, t + 1, t + 2);
2535 return this
2536 }, c.prototype.swap64 = function() {
2537 var e = this.length;
2538 if (e % 8 != 0) throw new RangeError(
2539 "Buffer size must be a multiple of 64-bits");
2540 for (var t = 0; t < e; t += 8) g(this, t, t + 7), g(this, t + 1, t + 6),
2541 g(this, t + 2, t + 5), g(this, t + 3, t + 4);
2542 return this
2543 }, c.prototype.toString = function() {
2544 var e = 0 | this.length;
2545 return 0 === e ? "" : 0 === arguments.length ? I(this, 0, e) : function(
2546 e, t, n) {
2547 var i = !1;
2548 if ((void 0 === t || t < 0) && (t = 0), t > this.length) return "";
2549 if ((void 0 === n || n > this.length) && (n = this.length), n <= 0)
2550 return "";
2551 if ((n >>>= 0) <= (t >>>= 0)) return "";
2552 for (e || (e = "utf8");;) switch (e) {
2553 case "hex":
2554 return P(this, t, n);
2555 case "utf8":
2556 case "utf-8":
2557 return I(this, t, n);
2558 case "ascii":
2559 return M(this, t, n);
2560 case "latin1":
2561 case "binary":
2562 return A(this, t, n);
2563 case "base64":
2564 return T(this, t, n);
2565 case "ucs2":
2566 case "ucs-2":
2567 case "utf16le":
2568 case "utf-16le":
2569 return B(this, t, n);
2570 default:
2571 if (i) throw new TypeError("Unknown encoding: " + e);
2572 e = (e + "").toLowerCase(), i = !0
2573 }
2574 }.apply(this, arguments)
2575 }, c.prototype.equals = function(e) {
2576 if (!c.isBuffer(e)) throw new TypeError("Argument must be a Buffer");
2577 return this === e || 0 === c.compare(this, e)
2578 }, c.prototype.inspect = function() {
2579 var e = "",
2580 n = t.INSPECT_MAX_BYTES;
2581 return this.length > 0 && (e = this.toString("hex", 0, n).match(/.{2}/g)
2582 .join(" "), this.length > n && (e += " ... ")), "<Buffer " + e + ">"
2583 }, c.prototype.compare = function(e, t, n, i, r) {
2584 if (!c.isBuffer(e)) throw new TypeError("Argument must be a Buffer");
2585 if (void 0 === t && (t = 0), void 0 === n && (n = e ? e.length : 0),
2586 void 0 === i && (i = 0), void 0 === r && (r = this.length), t < 0 || n >
2587 e.length || i < 0 || r > this.length) throw new RangeError(
2588 "out of range index");
2589 if (i >= r && t >= n) return 0;
2590 if (i >= r) return -1;
2591 if (t >= n) return 1;
2592 if (this === e) return 0;
2593 for (var s = (r >>>= 0) - (i >>>= 0), a = (n >>>= 0) - (t >>>= 0), o =
2594 Math.min(s, a), l = this.slice(i, r), h = e.slice(t, n), u = 0; u < o; ++
2595 u)
2596 if (l[u] !== h[u]) {
2597 s = l[u], a = h[u];
2598 break
2599 }
2600 return s < a ? -1 : a < s ? 1 : 0
2601 }, c.prototype.includes = function(e, t, n) {
2602 return -1 !== this.indexOf(e, t, n)
2603 }, c.prototype.indexOf = function(e, t, n) {
2604 return m(this, e, t, n, !0)
2605 }, c.prototype.lastIndexOf = function(e, t, n) {
2606 return m(this, e, t, n, !1)
2607 }, c.prototype.write = function(e, t, n, i) {
2608 if (void 0 === t) i = "utf8", n = this.length, t = 0;
2609 else if (void 0 === n && "string" == typeof t) i = t, n = this.length, t =
2610 0;
2611 else {
2612 if (!isFinite(t)) throw new Error(
2613 "Buffer.write(string, encoding, offset[, length]) is no longer supported"
2614 );
2615 t |= 0, isFinite(n) ? (n |= 0, void 0 === i && (i = "utf8")) : (i = n,
2616 n = void 0)
2617 }
2618 var r = this.length - t;
2619 if ((void 0 === n || n > r) && (n = r), e.length > 0 && (n < 0 || t < 0) ||
2620 t > this.length) throw new RangeError(
2621 "Attempt to write outside buffer bounds");
2622 i || (i = "utf8");
2623 for (var s = !1;;) switch (i) {
2624 case "hex":
2625 return k(this, e, t, n);
2626 case "utf8":
2627 case "utf-8":
2628 return v(this, e, t, n);
2629 case "ascii":
2630 return w(this, e, t, n);
2631 case "latin1":
2632 case "binary":
2633 return b(this, e, t, n);
2634 case "base64":
2635 return x(this, e, t, n);
2636 case "ucs2":
2637 case "ucs-2":
2638 case "utf16le":
2639 case "utf-16le":
2640 return S(this, e, t, n);
2641 default:
2642 if (s) throw new TypeError("Unknown encoding: " + i);
2643 i = ("" + i).toLowerCase(), s = !0
2644 }
2645 }, c.prototype.toJSON = function() {
2646 return {
2647 type: "Buffer",
2648 data: Array.prototype.slice.call(this._arr || this, 0)
2649 }
2650 };
2651 var E = 4096;
2652
2653 function M(e, t, n) {
2654 var i = "";
2655 n = Math.min(e.length, n);
2656 for (var r = t; r < n; ++r) i += String.fromCharCode(127 & e[r]);
2657 return i
2658 }
2659
2660 function A(e, t, n) {
2661 var i = "";
2662 n = Math.min(e.length, n);
2663 for (var r = t; r < n; ++r) i += String.fromCharCode(e[r]);
2664 return i
2665 }
2666
2667 function P(e, t, n) {
2668 var i = e.length;
2669 (!t || t < 0) && (t = 0), (!n || n < 0 || n > i) && (n = i);
2670 for (var r = "", s = t; s < n; ++s) r += F(e[s]);
2671 return r
2672 }
2673
2674 function B(e, t, n) {
2675 for (var i = e.slice(t, n), r = "", s = 0; s < i.length; s += 2) r +=
2676 String.fromCharCode(i[s] + 256 * i[s + 1]);
2677 return r
2678 }
2679
2680 function C(e, t, n) {
2681 if (e % 1 != 0 || e < 0) throw new RangeError("offset is not uint");
2682 if (e + t > n) throw new RangeError(
2683 "Trying to access beyond buffer length")
2684 }
2685
2686 function O(e, t, n, i, r, s) {
2687 if (!c.isBuffer(e)) throw new TypeError(
2688 '"buffer" argument must be a Buffer instance');
2689 if (t > r || t < s) throw new RangeError(
2690 '"value" argument is out of bounds');
2691 if (n + i > e.length) throw new RangeError("Index out of range")
2692 }
2693
2694 function R(e, t, n, i) {
2695 t < 0 && (t = 65535 + t + 1);
2696 for (var r = 0, s = Math.min(e.length - n, 2); r < s; ++r) e[n + r] = (t &
2697 255 << 8 * (i ? r : 1 - r)) >>> 8 * (i ? r : 1 - r)
2698 }
2699
2700 function j(e, t, n, i) {
2701 t < 0 && (t = 4294967295 + t + 1);
2702 for (var r = 0, s = Math.min(e.length - n, 4); r < s; ++r) e[n + r] = t >>>
2703 8 * (i ? r : 3 - r) & 255
2704 }
2705
2706 function _(e, t, n, i, r, s) {
2707 if (n + i > e.length) throw new RangeError("Index out of range");
2708 if (n < 0) throw new RangeError("Index out of range")
2709 }
2710
2711 function U(e, t, n, i, s) {
2712 return s || _(e, 0, n, 4), r.write(e, t, n, i, 23, 4), n + 4
2713 }
2714
2715 function D(e, t, n, i, s) {
2716 return s || _(e, 0, n, 8), r.write(e, t, n, i, 52, 8), n + 8
2717 }
2718 c.prototype.slice = function(e, t) {
2719 var n, i = this.length;
2720 if ((e = ~~e) < 0 ? (e += i) < 0 && (e = 0) : e > i && (e = i), (t =
2721 void 0 === t ? i : ~~t) < 0 ? (t += i) < 0 && (t = 0) : t > i && (t =
2722 i), t < e && (t = e), c.TYPED_ARRAY_SUPPORT)(n = this.subarray(e, t)).__proto__ =
2723 c.prototype;
2724 else {
2725 var r = t - e;
2726 n = new c(r, void 0);
2727 for (var s = 0; s < r; ++s) n[s] = this[s + e]
2728 }
2729 return n
2730 }, c.prototype.readUIntLE = function(e, t, n) {
2731 e |= 0, t |= 0, n || C(e, t, this.length);
2732 for (var i = this[e], r = 1, s = 0; ++s < t && (r *= 256);) i += this[e +
2733 s] * r;
2734 return i
2735 }, c.prototype.readUIntBE = function(e, t, n) {
2736 e |= 0, t |= 0, n || C(e, t, this.length);
2737 for (var i = this[e + --t], r = 1; t > 0 && (r *= 256);) i += this[e +
2738 --t] * r;
2739 return i
2740 }, c.prototype.readUInt8 = function(e, t) {
2741 return t || C(e, 1, this.length), this[e]
2742 }, c.prototype.readUInt16LE = function(e, t) {
2743 return t || C(e, 2, this.length), this[e] | this[e + 1] << 8
2744 }, c.prototype.readUInt16BE = function(e, t) {
2745 return t || C(e, 2, this.length), this[e] << 8 | this[e + 1]
2746 }, c.prototype.readUInt32LE = function(e, t) {
2747 return t || C(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e +
2748 2] << 16) + 16777216 * this[e + 3]
2749 }, c.prototype.readUInt32BE = function(e, t) {
2750 return t || C(e, 4, this.length), 16777216 * this[e] + (this[e + 1] <<
2751 16 | this[e + 2] << 8 | this[e + 3])
2752 }, c.prototype.readIntLE = function(e, t, n) {
2753 e |= 0, t |= 0, n || C(e, t, this.length);
2754 for (var i = this[e], r = 1, s = 0; ++s < t && (r *= 256);) i += this[e +
2755 s] * r;
2756 return i >= (r *= 128) && (i -= Math.pow(2, 8 * t)), i
2757 }, c.prototype.readIntBE = function(e, t, n) {
2758 e |= 0, t |= 0, n || C(e, t, this.length);
2759 for (var i = t, r = 1, s = this[e + --i]; i > 0 && (r *= 256);) s +=
2760 this[e + --i] * r;
2761 return s >= (r *= 128) && (s -= Math.pow(2, 8 * t)), s
2762 }, c.prototype.readInt8 = function(e, t) {
2763 return t || C(e, 1, this.length), 128 & this[e] ? -1 * (255 - this[e] +
2764 1) : this[e]
2765 }, c.prototype.readInt16LE = function(e, t) {
2766 t || C(e, 2, this.length);
2767 var n = this[e] | this[e + 1] << 8;
2768 return 32768 & n ? 4294901760 | n : n
2769 }, c.prototype.readInt16BE = function(e, t) {
2770 t || C(e, 2, this.length);
2771 var n = this[e + 1] | this[e] << 8;
2772 return 32768 & n ? 4294901760 | n : n
2773 }, c.prototype.readInt32LE = function(e, t) {
2774 return t || C(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e +
2775 2] << 16 | this[e + 3] << 24
2776 }, c.prototype.readInt32BE = function(e, t) {
2777 return t || C(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 |
2778 this[e + 2] << 8 | this[e + 3]
2779 }, c.prototype.readFloatLE = function(e, t) {
2780 return t || C(e, 4, this.length), r.read(this, e, !0, 23, 4)
2781 }, c.prototype.readFloatBE = function(e, t) {
2782 return t || C(e, 4, this.length), r.read(this, e, !1, 23, 4)
2783 }, c.prototype.readDoubleLE = function(e, t) {
2784 return t || C(e, 8, this.length), r.read(this, e, !0, 52, 8)
2785 }, c.prototype.readDoubleBE = function(e, t) {
2786 return t || C(e, 8, this.length), r.read(this, e, !1, 52, 8)
2787 }, c.prototype.writeUIntLE = function(e, t, n, i) {
2788 e = +e, t |= 0, n |= 0, i || O(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
2789 var r = 1,
2790 s = 0;
2791 for (this[t] = 255 & e; ++s < n && (r *= 256);) this[t + s] = e / r &
2792 255;
2793 return t + n
2794 }, c.prototype.writeUIntBE = function(e, t, n, i) {
2795 e = +e, t |= 0, n |= 0, i || O(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
2796 var r = n - 1,
2797 s = 1;
2798 for (this[t + r] = 255 & e; --r >= 0 && (s *= 256);) this[t + r] = e / s &
2799 255;
2800 return t + n
2801 }, c.prototype.writeUInt8 = function(e, t, n) {
2802 return e = +e, t |= 0, n || O(this, e, t, 1, 255, 0), c.TYPED_ARRAY_SUPPORT ||
2803 (e = Math.floor(e)), this[t] = 255 & e, t + 1
2804 }, c.prototype.writeUInt16LE = function(e, t, n) {
2805 return e = +e, t |= 0, n || O(this, e, t, 2, 65535, 0), c.TYPED_ARRAY_SUPPORT ?
2806 (this[t] = 255 & e, this[t + 1] = e >>> 8) : R(this, e, t, !0), t + 2
2807 }, c.prototype.writeUInt16BE = function(e, t, n) {
2808 return e = +e, t |= 0, n || O(this, e, t, 2, 65535, 0), c.TYPED_ARRAY_SUPPORT ?
2809 (this[t] = e >>> 8, this[t + 1] = 255 & e) : R(this, e, t, !1), t + 2
2810 }, c.prototype.writeUInt32LE = function(e, t, n) {
2811 return e = +e, t |= 0, n || O(this, e, t, 4, 4294967295, 0), c.TYPED_ARRAY_SUPPORT ?
2812 (this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8,
2813 this[t] = 255 & e) : j(this, e, t, !0), t + 4
2814 }, c.prototype.writeUInt32BE = function(e, t, n) {
2815 return e = +e, t |= 0, n || O(this, e, t, 4, 4294967295, 0), c.TYPED_ARRAY_SUPPORT ?
2816 (this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8,
2817 this[t + 3] = 255 & e) : j(this, e, t, !1), t + 4
2818 }, c.prototype.writeIntLE = function(e, t, n, i) {
2819 if (e = +e, t |= 0, !i) {
2820 var r = Math.pow(2, 8 * n - 1);
2821 O(this, e, t, n, r - 1, -r)
2822 }
2823 var s = 0,
2824 a = 1,
2825 o = 0;
2826 for (this[t] = 255 & e; ++s < n && (a *= 256);) e < 0 && 0 === o && 0 !==
2827 this[t + s - 1] && (o = 1), this[t + s] = (e / a >> 0) - o & 255;
2828 return t + n
2829 }, c.prototype.writeIntBE = function(e, t, n, i) {
2830 if (e = +e, t |= 0, !i) {
2831 var r = Math.pow(2, 8 * n - 1);
2832 O(this, e, t, n, r - 1, -r)
2833 }
2834 var s = n - 1,
2835 a = 1,
2836 o = 0;
2837 for (this[t + s] = 255 & e; --s >= 0 && (a *= 256);) e < 0 && 0 === o &&
2838 0 !== this[t + s + 1] && (o = 1), this[t + s] = (e / a >> 0) - o & 255;
2839 return t + n
2840 }, c.prototype.writeInt8 = function(e, t, n) {
2841 return e = +e, t |= 0, n || O(this, e, t, 1, 127, -128), c.TYPED_ARRAY_SUPPORT ||
2842 (e = Math.floor(e)), e < 0 && (e = 255 + e + 1), this[t] = 255 & e, t +
2843 1
2844 }, c.prototype.writeInt16LE = function(e, t, n) {
2845 return e = +e, t |= 0, n || O(this, e, t, 2, 32767, -32768), c.TYPED_ARRAY_SUPPORT ?
2846 (this[t] = 255 & e, this[t + 1] = e >>> 8) : R(this, e, t, !0), t + 2
2847 }, c.prototype.writeInt16BE = function(e, t, n) {
2848 return e = +e, t |= 0, n || O(this, e, t, 2, 32767, -32768), c.TYPED_ARRAY_SUPPORT ?
2849 (this[t] = e >>> 8, this[t + 1] = 255 & e) : R(this, e, t, !1), t + 2
2850 }, c.prototype.writeInt32LE = function(e, t, n) {
2851 return e = +e, t |= 0, n || O(this, e, t, 4, 2147483647, -2147483648), c
2852 .TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, this[t + 1] = e >>> 8, this[
2853 t + 2] = e >>> 16, this[t + 3] = e >>> 24) : j(this, e, t, !0), t + 4
2854 }, c.prototype.writeInt32BE = function(e, t, n) {
2855 return e = +e, t |= 0, n || O(this, e, t, 4, 2147483647, -2147483648), e <
2856 0 && (e = 4294967295 + e + 1), c.TYPED_ARRAY_SUPPORT ? (this[t] = e >>>
2857 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 &
2858 e) : j(this, e, t, !1), t + 4
2859 }, c.prototype.writeFloatLE = function(e, t, n) {
2860 return U(this, e, t, !0, n)
2861 }, c.prototype.writeFloatBE = function(e, t, n) {
2862 return U(this, e, t, !1, n)
2863 }, c.prototype.writeDoubleLE = function(e, t, n) {
2864 return D(this, e, t, !0, n)
2865 }, c.prototype.writeDoubleBE = function(e, t, n) {
2866 return D(this, e, t, !1, n)
2867 }, c.prototype.copy = function(e, t, n, i) {
2868 if (n || (n = 0), i || 0 === i || (i = this.length), t >= e.length && (t =
2869 e.length), t || (t = 0), i > 0 && i < n && (i = n), i === n) return 0;
2870 if (0 === e.length || 0 === this.length) return 0;
2871 if (t < 0) throw new RangeError("targetStart out of bounds");
2872 if (n < 0 || n >= this.length) throw new RangeError(
2873 "sourceStart out of bounds");
2874 if (i < 0) throw new RangeError("sourceEnd out of bounds");
2875 i > this.length && (i = this.length), e.length - t < i - n && (i = e.length -
2876 t + n);
2877 var r, s = i - n;
2878 if (this === e && n < t && t < i)
2879 for (r = s - 1; r >= 0; --r) e[r + t] = this[r + n];
2880 else if (s < 1e3 || !c.TYPED_ARRAY_SUPPORT)
2881 for (r = 0; r < s; ++r) e[r + t] = this[r + n];
2882 else Uint8Array.prototype.set.call(e, this.subarray(n, n + s), t);
2883 return s
2884 }, c.prototype.fill = function(e, t, n, i) {
2885 if ("string" == typeof e) {
2886 if ("string" == typeof t ? (i = t, t = 0, n = this.length) : "string" ==
2887 typeof n && (i = n, n = this.length), 1 === e.length) {
2888 var r = e.charCodeAt(0);
2889 r < 256 && (e = r)
2890 }
2891 if (void 0 !== i && "string" != typeof i) throw new TypeError(
2892 "encoding must be a string");
2893 if ("string" == typeof i && !c.isEncoding(i)) throw new TypeError(
2894 "Unknown encoding: " + i)
2895 } else "number" == typeof e && (e &= 255);
2896 if (t < 0 || this.length < t || this.length < n) throw new RangeError(
2897 "Out of range index");
2898 if (n <= t) return this;
2899 var s;
2900 if (t >>>= 0, n = void 0 === n ? this.length : n >>> 0, e || (e = 0),
2901 "number" == typeof e)
2902 for (s = t; s < n; ++s) this[s] = e;
2903 else {
2904 var a = c.isBuffer(e) ? e : z(new c(e, i).toString()),
2905 o = a.length;
2906 for (s = 0; s < n - t; ++s) this[s + t] = a[s % o]
2907 }
2908 return this
2909 };
2910 var L = /[^+\/0-9A-Za-z-_]/g;
2911
2912 function F(e) {
2913 return e < 16 ? "0" + e.toString(16) : e.toString(16)
2914 }
2915
2916 function z(e, t) {
2917 var n;
2918 t = t || 1 / 0;
2919 for (var i = e.length, r = null, s = [], a = 0; a < i; ++a) {
2920 if ((n = e.charCodeAt(a)) > 55295 && n < 57344) {
2921 if (!r) {
2922 if (n > 56319) {
2923 (t -= 3) > -1 && s.push(239, 191, 189);
2924 continue
2925 }
2926 if (a + 1 === i) {
2927 (t -= 3) > -1 && s.push(239, 191, 189);
2928 continue
2929 }
2930 r = n;
2931 continue
2932 }
2933 if (n < 56320) {
2934 (t -= 3) > -1 && s.push(239, 191, 189), r = n;
2935 continue
2936 }
2937 n = 65536 + (r - 55296 << 10 | n - 56320)
2938 } else r && (t -= 3) > -1 && s.push(239, 191, 189);
2939 if (r = null, n < 128) {
2940 if ((t -= 1) < 0) break;
2941 s.push(n)
2942 } else if (n < 2048) {
2943 if ((t -= 2) < 0) break;
2944 s.push(n >> 6 | 192, 63 & n | 128)
2945 } else if (n < 65536) {
2946 if ((t -= 3) < 0) break;
2947 s.push(n >> 12 | 224, n >> 6 & 63 | 128, 63 & n | 128)
2948 } else {
2949 if (!(n < 1114112)) throw new Error("Invalid code point");
2950 if ((t -= 4) < 0) break;
2951 s.push(n >> 18 | 240, n >> 12 & 63 | 128, n >> 6 & 63 | 128, 63 & n |
2952 128)
2953 }
2954 }
2955 return s
2956 }
2957
2958 function H(e) {
2959 return i.toByteArray(function(e) {
2960 if ((e = function(e) {
2961 return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "")
2962 }(e).replace(L, "")).length < 2) return "";
2963 for (; e.length % 4 != 0;) e += "=";
2964 return e
2965 }(e))
2966 }
2967
2968 function V(e, t, n, i) {
2969 for (var r = 0; r < i && !(r + n >= t.length || r >= e.length); ++r) t[r +
2970 n] = e[r];
2971 return r
2972 }
2973 }).call(this, n(12))
2974}, function(e, t) {
2975 var n;
2976 n = function() {
2977 return this
2978 }();
2979 try {
2980 n = n || new Function("return this")()
2981 } catch (e) {
2982 "object" == typeof window && (n = window)
2983 }
2984 e.exports = n
2985}, function(e, t) {
2986 for (var n = t.uint8 = new Array(256), i = 0; i <= 255; i++) n[i] = r(i);
2987
2988 function r(e) {
2989 return function(t) {
2990 var n = t.reserve(1);
2991 t.buffer[n] = e
2992 }
2993 }
2994}, function(e, t, n) {
2995 t.FlexDecoder = s, t.FlexEncoder = a;
2996 var i = n(0),
2997 r = "BUFFER_SHORTAGE";
2998
2999 function s() {
3000 if (!(this instanceof s)) return new s
3001 }
3002
3003 function a() {
3004 if (!(this instanceof a)) return new a
3005 }
3006
3007 function o() {
3008 throw new Error("method not implemented: write()")
3009 }
3010
3011 function c() {
3012 throw new Error("method not implemented: fetch()")
3013 }
3014
3015 function l() {
3016 return this.buffers && this.buffers.length ? (this.flush(), this.pull()) :
3017 this.fetch()
3018 }
3019
3020 function h(e) {
3021 (this.buffers || (this.buffers = [])).push(e)
3022 }
3023
3024 function u() {
3025 return (this.buffers || (this.buffers = [])).shift()
3026 }
3027
3028 function f(e) {
3029 return function(t) {
3030 for (var n in e) t[n] = e[n];
3031 return t
3032 }
3033 }
3034 s.mixin = f({
3035 bufferish: i,
3036 write: function(e) {
3037 var t = this.offset ? i.prototype.slice.call(this.buffer, this.offset) :
3038 this.buffer;
3039 this.buffer = t ? e ? this.bufferish.concat([t, e]) : t : e, this.offset =
3040 0
3041 },
3042 fetch: c,
3043 flush: function() {
3044 for (; this.offset < this.buffer.length;) {
3045 var e, t = this.offset;
3046 try {
3047 e = this.fetch()
3048 } catch (e) {
3049 if (e && e.message != r) throw e;
3050 this.offset = t;
3051 break
3052 }
3053 this.push(e)
3054 }
3055 },
3056 push: h,
3057 pull: u,
3058 read: l,
3059 reserve: function(e) {
3060 var t = this.offset,
3061 n = t + e;
3062 if (n > this.buffer.length) throw new Error(r);
3063 return this.offset = n, t
3064 },
3065 offset: 0
3066 }), s.mixin(s.prototype), a.mixin = f({
3067 bufferish: i,
3068 write: o,
3069 fetch: function() {
3070 var e = this.start;
3071 if (e < this.offset) {
3072 var t = this.start = this.offset;
3073 return i.prototype.slice.call(this.buffer, e, t)
3074 }
3075 },
3076 flush: function() {
3077 for (; this.start < this.offset;) {
3078 var e = this.fetch();
3079 e && this.push(e)
3080 }
3081 },
3082 push: h,
3083 pull: function() {
3084 var e = this.buffers || (this.buffers = []),
3085 t = e.length > 1 ? this.bufferish.concat(e) : e[0];
3086 return e.length = 0, t
3087 },
3088 read: l,
3089 reserve: function(e) {
3090 var t = 0 | e;
3091 if (this.buffer) {
3092 var n = this.buffer.length,
3093 i = 0 | this.offset,
3094 r = i + t;
3095 if (r < n) return this.offset = r, i;
3096 this.flush(), e = Math.max(e, Math.min(2 * n, this.maxBufferSize))
3097 }
3098 return e = Math.max(e, this.minBufferSize), this.buffer = this.bufferish
3099 .alloc(e), this.start = 0, this.offset = t, 0
3100 },
3101 send: function(e) {
3102 var t = e.length;
3103 if (t > this.minBufferSize) this.flush(), this.push(e);
3104 else {
3105 var n = this.reserve(t);
3106 i.prototype.copy.call(e, this.buffer, n)
3107 }
3108 },
3109 maxBufferSize: 65536,
3110 minBufferSize: 2048,
3111 offset: 0,
3112 start: 0
3113 }), a.mixin(a.prototype)
3114}, function(e, t, n) {
3115 t.decode = function(e, t) {
3116 var n = new i(t);
3117 return n.write(e), n.read()
3118 };
3119 var i = n(16).DecodeBuffer
3120}, function(e, t, n) {
3121 t.DecodeBuffer = r;
3122 var i = n(8).preset;
3123
3124 function r(e) {
3125 if (!(this instanceof r)) return new r(e);
3126 if (e && (this.options = e, e.codec)) {
3127 var t = this.codec = e.codec;
3128 t.bufferish && (this.bufferish = t.bufferish)
3129 }
3130 }
3131 n(14).FlexDecoder.mixin(r.prototype), r.prototype.codec = i, r.prototype.fetch =
3132 function() {
3133 return this.codec.decode(this)
3134 }
3135}, function(e, t, n) {
3136 var i = n(4),
3137 r = n(7),
3138 s = r.Uint64BE,
3139 a = r.Int64BE;
3140 t.getReadFormat = function(e) {
3141 var t = o.hasArrayBuffer && e && e.binarraybuffer,
3142 n = e && e.int64;
3143 return {
3144 map: l && e && e.usemap ? u : h,
3145 array: f,
3146 str: d,
3147 bin: t ? g : p,
3148 ext: m,
3149 uint8: y,
3150 uint16: v,
3151 uint32: b,
3152 uint64: S(8, n ? E : T),
3153 int8: k,
3154 int16: w,
3155 int32: x,
3156 int64: S(8, n ? M : I),
3157 float32: S(4, A),
3158 float64: S(8, P)
3159 }
3160 }, t.readUint8 = y;
3161 var o = n(0),
3162 c = n(6),
3163 l = "undefined" != typeof Map;
3164
3165 function h(e, t) {
3166 var n, i = {},
3167 r = new Array(t),
3168 s = new Array(t),
3169 a = e.codec.decode;
3170 for (n = 0; n < t; n++) r[n] = a(e), s[n] = a(e);
3171 for (n = 0; n < t; n++) i[r[n]] = s[n];
3172 return i
3173 }
3174
3175 function u(e, t) {
3176 var n, i = new Map,
3177 r = new Array(t),
3178 s = new Array(t),
3179 a = e.codec.decode;
3180 for (n = 0; n < t; n++) r[n] = a(e), s[n] = a(e);
3181 for (n = 0; n < t; n++) i.set(r[n], s[n]);
3182 return i
3183 }
3184
3185 function f(e, t) {
3186 for (var n = new Array(t), i = e.codec.decode, r = 0; r < t; r++) n[r] = i(
3187 e);
3188 return n
3189 }
3190
3191 function d(e, t) {
3192 var n = e.reserve(t),
3193 i = n + t;
3194 return c.toString.call(e.buffer, "utf-8", n, i)
3195 }
3196
3197 function p(e, t) {
3198 var n = e.reserve(t),
3199 i = n + t,
3200 r = c.slice.call(e.buffer, n, i);
3201 return o.from(r)
3202 }
3203
3204 function g(e, t) {
3205 var n = e.reserve(t),
3206 i = n + t,
3207 r = c.slice.call(e.buffer, n, i);
3208 return o.Uint8Array.from(r).buffer
3209 }
3210
3211 function m(e, t) {
3212 var n = e.reserve(t + 1),
3213 i = e.buffer[n++],
3214 r = n + t,
3215 s = e.codec.getExtUnpacker(i);
3216 if (!s) throw new Error("Invalid ext type: " + (i ? "0x" + i.toString(16) :
3217 i));
3218 return s(c.slice.call(e.buffer, n, r))
3219 }
3220
3221 function y(e) {
3222 var t = e.reserve(1);
3223 return e.buffer[t]
3224 }
3225
3226 function k(e) {
3227 var t = e.reserve(1),
3228 n = e.buffer[t];
3229 return 128 & n ? n - 256 : n
3230 }
3231
3232 function v(e) {
3233 var t = e.reserve(2),
3234 n = e.buffer;
3235 return n[t++] << 8 | n[t]
3236 }
3237
3238 function w(e) {
3239 var t = e.reserve(2),
3240 n = e.buffer,
3241 i = n[t++] << 8 | n[t];
3242 return 32768 & i ? i - 65536 : i
3243 }
3244
3245 function b(e) {
3246 var t = e.reserve(4),
3247 n = e.buffer;
3248 return 16777216 * n[t++] + (n[t++] << 16) + (n[t++] << 8) + n[t]
3249 }
3250
3251 function x(e) {
3252 var t = e.reserve(4),
3253 n = e.buffer;
3254 return n[t++] << 24 | n[t++] << 16 | n[t++] << 8 | n[t]
3255 }
3256
3257 function S(e, t) {
3258 return function(n) {
3259 var i = n.reserve(e);
3260 return t.call(n.buffer, i, !0)
3261 }
3262 }
3263
3264 function T(e) {
3265 return new s(this, e).toNumber()
3266 }
3267
3268 function I(e) {
3269 return new a(this, e).toNumber()
3270 }
3271
3272 function E(e) {
3273 return new s(this, e)
3274 }
3275
3276 function M(e) {
3277 return new a(this, e)
3278 }
3279
3280 function A(e) {
3281 return i.read(this, e, !1, 23, 4)
3282 }
3283
3284 function P(e) {
3285 return i.read(this, e, !1, 52, 8)
3286 }
3287}, function(e, t, n) {
3288 ! function(t) {
3289 e.exports = t;
3290 var n = "listeners",
3291 i = {
3292 on: function(e, t) {
3293 return a(this, e).push(t), this
3294 },
3295 once: function(e, t) {
3296 var n = this;
3297 return i.originalListener = t, a(n, e).push(i), n;
3298
3299 function i() {
3300 s.call(n, e, i), t.apply(this, arguments)
3301 }
3302 },
3303 off: s,
3304 emit: function(e, t) {
3305 var n = this,
3306 i = a(n, e, !0);
3307 if (!i) return !1;
3308 var r = arguments.length;
3309 if (1 === r) i.forEach((function(e) {
3310 e.call(n)
3311 }));
3312 else if (2 === r) i.forEach((function(e) {
3313 e.call(n, t)
3314 }));
3315 else {
3316 var s = Array.prototype.slice.call(arguments, 1);
3317 i.forEach((function(e) {
3318 e.apply(n, s)
3319 }))
3320 }
3321 return !!i.length
3322 }
3323 };
3324
3325 function r(e) {
3326 for (var t in i) e[t] = i[t];
3327 return e
3328 }
3329
3330 function s(e, t) {
3331 var i;
3332 if (arguments.length) {
3333 if (t) {
3334 if (i = a(this, e, !0)) {
3335 if (!(i = i.filter((function(e) {
3336 return e !== t && e.originalListener !== t
3337 }))).length) return s.call(this, e);
3338 this[n][e] = i
3339 }
3340 } else if ((i = this[n]) && (delete i[e], !Object.keys(i).length)) return s
3341 .call(this)
3342 } else delete this[n];
3343 return this
3344 }
3345
3346 function a(e, t, i) {
3347 if (!i || e[n]) {
3348 var r = e[n] || (e[n] = {});
3349 return r[t] || (r[t] = [])
3350 }
3351 }
3352 r(t.prototype), t.mixin = r
3353 }((
3354 /**
3355 * event-lite.js - Light-weight EventEmitter (less than 1KB when gzipped)
3356 *
3357 * @copyright Yusuke Kawasaki
3358 * @license MIT
3359 * @constructor
3360 * @see https://github.com/kawanet/event-lite
3361 * @see http://kawanet.github.io/event-lite/EventLite.html
3362 * @example
3363 * var EventLite = require("event-lite");
3364 *
3365 * function MyClass() {...} // your class
3366 *
3367 * EventLite.mixin(MyClass.prototype); // import event methods
3368 *
3369 * var obj = new MyClass();
3370 * obj.on("foo", function() {...}); // add event listener
3371 * obj.once("bar", function() {...}); // add one-time event listener
3372 * obj.emit("foo"); // dispatch event
3373 * obj.emit("bar"); // dispatch another event
3374 * obj.off("foo"); // remove event listener
3375 */
3376 function e() {
3377 if (!(this instanceof e)) return new e
3378 }))
3379}, function(e, t, n) {
3380 (function(t) {
3381 e.exports.maxScreenWidth = 1920, e.exports.maxScreenHeight = 1080, e.exports
3382 .serverUpdateRate = 9, e.exports.maxPlayers = 50, e.exports.maxPlayersHard = 50, e.exports.collisionDepth = 6, e.exports.minimapRate = 3e3, e.exports.colGrid =
3383 10, e.exports.clientSendRate = 5, e.exports.healthBarWidth = 50, e.exports
3384 .healthBarPad = 4.5, e.exports.iconPadding = 15, e.exports.iconPad = .9,
3385 e.exports.deathFadeout = 1, e.exports.crownIconScale = 60, e.exports.crownPad =
3386 35, e.exports.chatCountdown = 3000, e.exports.chatCooldown = 0, e.exports
3387 .inSandbox = t && "mm_exp" === t.env.VULTR_SCHEME, e.exports.maxAge = 100,
3388 e.exports.gatherAngle = Math.PI / 2.6, e.exports.gatherWiggle = 10, e.exports
3389 .hitReturnRatio = .25, e.exports.hitAngle = Math.PI / 2, e.exports.playerScale =
3390 35, e.exports.playerSpeed = .0016, e.exports.playerDecel = .993, e.exports
3391 .nameY = 34, e.exports.skinColors = ["#bf8f54", "#cbb091", "#896c4b", "#fadadc", "#ececec", "#c37373", "#4c4c4c", "#ecaff7", "#738cc3", "#9100ff"
3392 ], e.exports.animalCount = 7, e.exports.aiTurnRandom = .06, e.exports.cowNames = [
3393 "Lovable", "RinZ", "Maple", "dOC Bitch", "MOHela", "Zod", "Wxone",
3394 "WaspHype", "Zelta is Big proe", "Sub To Zelta", "Sub Me pls?", "dOC Zelta's Bitch", "Arsen", "ArenaSlayer",
3395 "Zelta", "DeAtHWans", "GodSpeed", "Sn1ph3r", "Kikioo", "Kiko", "Yamato", "d0C Z3lt4's B!tch",
3396 "Project ", "MrSpikes", "PandaClaus", "KingKiller", "Accident", "FiShY", "BiRdY",
3397 "Tolerate", "dOC Suck", "Zelta Proe", "DeStiny", "aQuiVeR", "Slayer69", "PlankTonV",
3398 "SoulBreaker", "Pet", "dOC Bitch", "dOC Suck", "UnCrushh", "ShellShock", "COLOR", "GodMode",
3399 "AndManyMore"
3400 ], e.exports.shieldAngle = Math.PI / 3, e.exports.weaponVariants = [{
3401 id: 0,
3402 src: "",
3403 xp: 0,
3404 val: 1
3405 }, {
3406 id: 1,
3407 src: "_g",
3408 xp: 3e3,
3409 val: 1.1
3410 }, {
3411 id: 2,
3412 src: "_d",
3413 xp: 7e3,
3414 val: 1.18
3415 }, {
3416 id: 3,
3417 src: "_r",
3418 poison: !0,
3419 xp: 12e3,
3420 val: 1.18
3421 }], e.exports.fetchVariant = function(t) {
3422 for (var n = t.weaponXP[t.weaponIndex] || 0, i = e.exports.weaponVariants
3423 .length - 1; i >= 0; --i)
3424 if (n >= e.exports.weaponVariants[i].xp) return e.exports.weaponVariants[
3425 i]
3426 }, e.exports.resourceTypes = ["wood", "food", "stone", "points"], e.exports
3427 .areaCount = 7, e.exports.treesPerArea = 9, e.exports.bushesPerArea = 3,
3428 e.exports.totalRocks = 32, e.exports.goldOres = 7, e.exports.riverWidth =
3429 724, e.exports.riverPadding = 114, e.exports.waterCurrent = .0011, e.exports
3430 .waveSpeed = 1e-4, e.exports.waveMax = 1.3, e.exports.treeScales = [150,
3431 160, 165, 175
3432 ], e.exports.bushScales = [80, 85, 95], e.exports.rockScales = [80, 85,
3433 90
3434 ], e.exports.snowBiomeTop = 2400, e.exports.snowSpeed = .75, e.exports.maxNameLength =
3435 15, e.exports.mapScale = 14400, e.exports.mapPingScale = 40, e.exports.mapPingTime =
3436 2200
3437 }).call(this, n(41))
3438}, function(e, t) {
3439 var n = {
3440 utf8: {
3441 stringToBytes: function(e) {
3442 return n.bin.stringToBytes(unescape(encodeURIComponent(e)))
3443 },
3444 bytesToString: function(e) {
3445 return decodeURIComponent(escape(n.bin.bytesToString(e)))
3446 }
3447 },
3448 bin: {
3449 stringToBytes: function(e) {
3450 for (var t = [], n = 0; n < e.length; n++) t.push(255 & e.charCodeAt(n));
3451 return t
3452 },
3453 bytesToString: function(e) {
3454 for (var t = [], n = 0; n < e.length; n++) t.push(String.fromCharCode(e[
3455 n]));
3456 return t.join("")
3457 }
3458 }
3459 };
3460 e.exports = n
3461}, function(e, t, n) {
3462 "use strict";
3463 window.loadedScript = !0;
3464 var i = "127.0.0.1" !== location.hostname && !location.hostname.startsWith(
3465 "192.168.");
3466 n(22);
3467 var r = n(23),
3468 s = n(42),
3469 a = n(43),
3470 o = n(19),
3471 c = n(44),
3472 l = n(45),
3473 h = (n(46), n(47)),
3474 u = n(48),
3475 f = n(55),
3476 d = n(56),
3477 p = n(57),
3478 g = n(58).obj,
3479 m = new a.TextManager,
3480 y = new(n(59))("moomoo.io", 3e3, o.maxPlayers, 5, !1);
3481 y.debugLog = !1;
3482 var k = !1;
3483
3484 function v() {
3485 ht && ut && (k = !0, i ? window.grecaptcha.execute(
3486 "6LevKusUAAAAAAFknhlV8sPtXAk5Z5dGP5T2FYIZ", {
3487 action: "homepage"
3488 }).then((function(e) {
3489 w(e)
3490 })) : w(null))
3491 }
3492
3493 function w(e) {
3494 y.start((function(t, n, a) {
3495 var c = (i ? "wss" : "ws") + "://" + t + ":8008/?gameIndex=" + a;
3496 e && (c += "&token=" + encodeURIComponent(e)), r.connect(c, (function(e) {
3497 Bi(), setInterval(() => Bi(), 2500), e ? ft(e) : (ue.onclick = s.checkTrusted(
3498 (function() {
3499 ! function() {
3500 var e = ++bt > 1,
3501 t = Date.now() - wt > vt;
3502 e && t ? (wt = Date.now(), xt()) : Tn()
3503 }()
3504 })), s.hookTouchEvents(ue), fe.onclick = s.checkTrusted((
3505 function() {
3506 Oi("https://krunker.io")
3507 })), s.hookTouchEvents(fe), pe.onclick = s.checkTrusted((
3508 function() {
3509 setTimeout((function() {
3510 ! function() {
3511 var e = xe.value,
3512 t = prompt("party key", e);
3513 t && (window.onbeforeunload = void 0, window.location.href =
3514 "/?server=" + t)
3515 }()
3516 }), 10)
3517 })), s.hookTouchEvents(pe), ge.onclick = s.checkTrusted((
3518 function() {
3519 Ae.classList.contains("showing") ? (Ae.classList.remove(
3520 "showing"), me.innerText = "Settings") : (Ae.classList.add(
3521 "showing"), me.innerText = "Close")
3522 })), s.hookTouchEvents(ge), ye.onclick = s.checkTrusted((
3523 function() {
3524 yn(), "block" != Ye.style.display ? Ut() : Ye.style.display =
3525 "none"
3526 })), s.hookTouchEvents(ye), ke.onclick = s.checkTrusted((
3527 function() {
3528 "block" != Qe.style.display ? (Qe.style.display = "block", Ye.style
3529 .display = "none", an(), Gt()) : Qe.style.display = "none"
3530 })), s.hookTouchEvents(ke), ve.onclick = s.checkTrusted((
3531 function() {
3532 rn()
3533 })), s.hookTouchEvents(ve), Ne.onclick = s.checkTrusted((
3534 function() {
3535 xn()
3536 })), s.hookTouchEvents(Ne), function() {
3537 for (var e = 0; e < jn.length; ++e) {
3538 var t = new Image;
3539 t.onload = function() {
3540 this.isLoaded = !0
3541 }, t.src = ".././img/icons/" + jn[e] + ".png", Rn[jn[e]] = t
3542 }
3543 }(), Pe.style.display = "none", Me.style.display = "block", Le.value =
3544 E("moo_name") || "",
3545 function() {
3546 var e = E("native_resolution");
3547 Zt(e ? "true" == e : "undefined" != typeof cordova), A = "true" ==
3548 E("show_ping"), Ie.hidden = !A, E("moo_moosic"), setInterval((
3549 function() {
3550 window.cordova && (document.getElementById(
3551 "downloadButtonContainer").classList.add("cordova"),
3552 document.getElementById("mobileDownloadButtonContainer").classList
3553 .add("cordova"))
3554 }), 1e3), en(), s.removeAllChildren(Ce);
3555 for (var t = 0; t < l.weapons.length + l.list.length; ++t) !
3556 function(e) {
3557 s.generateElement({
3558 id: "actionBarItem" + e,
3559 class: "actionBarItem",
3560 style: "display:none",
3561 onmouseout: function() {
3562 Tt()
3563 },
3564 parent: Ce
3565 })
3566 }(t);
3567 for (t = 0; t < l.list.length + l.weapons.length; ++t) ! function(
3568 e) {
3569 var t = document.createElement("canvas");
3570 t.width = t.height = 66;
3571 var n = t.getContext("2d");
3572 if (n.translate(t.width / 2, t.height / 2), n.imageSmoothingEnabled = !
3573 1, n.webkitImageSmoothingEnabled = !1, n.mozImageSmoothingEnabled = !
3574 1, l.weapons[e]) {
3575 n.rotate(Math.PI / 4 + Math.PI);
3576 var i = new Image;
3577 Zn[l.weapons[e].src] = i, i.onload = function() {
3578 this.isLoaded = !0;
3579 var i = 1 / (this.height / this.width),
3580 r = l.weapons[e].iPad || 1;
3581 n.drawImage(this, -t.width * r * o.iconPad * i / 2, -t.height *
3582 r * o.iconPad / 2, t.width * r * i * o.iconPad, t.height *
3583 r * o.iconPad), n.fillStyle = "rgba(0, 0, 70, 0.1)", n.globalCompositeOperation =
3584 "source-atop", n.fillRect(-t.width / 2, -t.height / 2, t.width,
3585 t.height), document.getElementById("actionBarItem" + e).style
3586 .backgroundImage = "url(" + t.toDataURL() + ")"
3587 }, i.src = ".././img/weapons/" + l.weapons[e].src + ".png",
3588 (r = document.getElementById("actionBarItem" + e)).onmouseover =
3589 s.checkTrusted((function() {
3590 Tt(l.weapons[e], !0)
3591 })), r.onclick = s.checkTrusted((function() {
3592 Sn(e, !0)
3593 })), s.hookTouchEvents(r)
3594 } else {
3595 i = ri(l.list[e - l.weapons.length], !0);
3596 var r, a = Math.min(t.width - o.iconPadding, i.width);
3597 n.globalAlpha = 1, n.drawImage(i, -a / 2, -a / 2, a, a), n.fillStyle =
3598 "rgba(0, 0, 70, 0.1)", n.globalCompositeOperation =
3599 "source-atop", n.fillRect(-a / 2, -a / 2, a, a), document.getElementById(
3600 "actionBarItem" + e).style.backgroundImage = "url(" + t.toDataURL() +
3601 ")", (r = document.getElementById("actionBarItem" + e)).onmouseover =
3602 s.checkTrusted((function() {
3603 Tt(l.list[e - l.weapons.length])
3604 })), r.onclick = s.checkTrusted((function() {
3605 Sn(e - l.weapons.length)
3606 })), s.hookTouchEvents(r)
3607 }
3608 }(t);
3609 Le.ontouchstart = s.checkTrusted((function(e) {
3610 e.preventDefault();
3611 var t = prompt("enter name", e.currentTarget.value);
3612 e.currentTarget.value = t.slice(0, 15)
3613 })), Se.checked = M, Se.onchange = s.checkTrusted((function(e) {
3614 Zt(e.target.checked)
3615 })), Te.checked = A, Te.onchange = s.checkTrusted((function(e) {
3616 A = Te.checked, Ie.hidden = !A, I("show_ping", A ? "true" :
3617 "false")
3618 }))
3619 }())
3620 }), {
3621 id: st,
3622 d: ft,
3623 1: En,
3624 2: vi,
3625 4: wi,
3626 33: Ti,
3627 5: Ln,
3628 6: li,
3629 a: gi,
3630 aa: pi,
3631 7: Wn,
3632 8: hi,
3633 sp: ui,
3634 9: xi,
3635 h: Si,
3636 11: Pn,
3637 12: Cn,
3638 13: Bn,
3639 14: bi,
3640 15: Dn,
3641 16: Un,
3642 17: $t,
3643 18: fi,
3644 19: di,
3645 20: Ci,
3646 ac: Ot,
3647 ad: _t,
3648 an: Bt,
3649 st: Rt,
3650 sa: jt,
3651 us: Nt,
3652 ch: hn,
3653 mm: Wt,
3654 t: Mn,
3655 p: Yt,
3656 pp: Pi
3657 }), pt(), setTimeout(() => gt(), 3e3)
3658 }), (function(e) {
3659 console.error("Vultr error:", e), alert("Error:\n" + e), ft(
3660 "disconnected")
3661 }))
3662 }
3663 var b, x = new g(o, s),
3664 S = Math.PI,
3665 T = 2 * S;
3666
3667 function I(e, t) {
3668 b && localStorage.setItem(e, t)
3669 }
3670
3671 function E(e) {
3672 return b ? localStorage.getItem(e) : null
3673 }
3674 Math.lerpAngle = function(e, t, n) {
3675 Math.abs(t - e) > S && (e > t ? t += T : e += T);
3676 var i = t + (e - t) * n;
3677 return i >= 0 && i <= T ? i : i % T
3678 }, CanvasRenderingContext2D.prototype.roundRect = function(e, t, n, i, r) {
3679 return n < 2 * r && (r = n / 2), i < 2 * r && (r = i / 2), r < 0 && (r = 0),
3680 this.beginPath(), this.moveTo(e + r, t), this.arcTo(e + n, t, e + n, t +
3681 i, r), this.arcTo(e + n, t + i, e, t + i, r), this.arcTo(e, t + i, e, t,
3682 r), this.arcTo(e, t, e + n, t, r), this.closePath(), this
3683 }, "undefined" != typeof Storage && (b = !0), E("consent") || (consentBlock
3684 .style.display = "block"), window.checkTerms = function(e) {
3685 e ? (consentBlock.style.display = "none", I("consent", 1)) : $(
3686 "#consentShake").effect("shake")
3687 };
3688 var M, A, P, B, C, O, R, j, _, U, D, L, F, z, H = E("moofoll"),
3689 V = 1,
3690 q = Date.now(),
3691 Y = [],
3692 W = [],
3693 X = [],
3694 N = [],
3695 G = [],
3696 J = new p(d, G, W, Y, nt, l, o, s),
3697 K = n(70),
3698 Q = n(71),
3699 Z = new K(Y, Q, W, l, null, o, s),
3700 ee = 1,
3701 te = 0,
3702 ne = 0,
3703 ie = 0,
3704 re = {
3705 id: -1,
3706 startX: 0,
3707 startY: 0,
3708 currentX: 0,
3709 currentY: 0
3710 },
3711 se = {
3712 id: -1,
3713 startX: 0,
3714 startY: 0,
3715 currentX: 0,
3716 currentY: 0
3717 },
3718 ae = 0,
3719 oe = o.maxScreenWidth,
3720 ce = o.maxScreenHeight,
3721 le = !1,
3722 he = (document.getElementById("ad-container"), document.getElementById(
3723 "mainMenu")),
3724 ue = document.getElementById("enterGame"),
3725 fe = document.getElementById("promoImg"),
3726 de = document.getElementById("partyButton"),
3727 pe = document.getElementById("joinPartyButton"),
3728 ge = document.getElementById("settingsButton"),
3729 me = ge.getElementsByTagName("span")[0],
3730 ye = document.getElementById("allianceButton"),
3731 ke = document.getElementById("storeButton"),
3732 ve = document.getElementById("chatButton"),
3733 we = document.getElementById("gameCanvas"),
3734 be = we.getContext("2d"),
3735 xe = document.getElementById("serverBrowser"),
3736 Se = document.getElementById("nativeResolution"),
3737 Te = document.getElementById("showPing"),
3738 Ie = (document.getElementById("playMusic"), document.getElementById(
3739 "pingDisplay")),
3740 Ee = document.getElementById("shutdownDisplay"),
3741 Me = document.getElementById("menuCardHolder"),
3742 Ae = document.getElementById("guideCard"),
3743 Pe = document.getElementById("loadingText"),
3744 Be = document.getElementById("gameUI"),
3745 Ce = document.getElementById("actionBar"),
3746 Oe = document.getElementById("scoreDisplay"),
3747 Re = document.getElementById("foodDisplay"),
3748 je = document.getElementById("woodDisplay"),
3749 _e = document.getElementById("stoneDisplay"),
3750 Ue = document.getElementById("killCounter"),
3751 De = document.getElementById("leaderboardData"),
3752 Le = document.getElementById("nameInput"),
3753 Fe = document.getElementById("itemInfoHolder"),
3754 ze = document.getElementById("ageText"),
3755 He = document.getElementById("ageBarBody"),
3756 Ve = document.getElementById("upgradeHolder"),
3757 qe = document.getElementById("upgradeCounter"),
3758 Ye = document.getElementById("allianceMenu"),
3759 We = document.getElementById("allianceHolder"),
3760 Xe = document.getElementById("allianceManager"),
3761 Ne = document.getElementById("mapDisplay"),
3762 Ge = document.getElementById("diedText"),
3763 Je = document.getElementById("skinColorHolder"),
3764 Ke = Ne.getContext("2d");
3765 Ne.width = 300, Ne.height = 300;
3766 var Qe = document.getElementById("storeMenu"),
3767 $e = document.getElementById("storeHolder"),
3768 Ze = document.getElementById("noticationDisplay"),
3769 et = f.hats,
3770 tt = f.accessories,
3771 nt = new h(c, N, s, o),
3772 it = "#525252",
3773 rt = "#3d3f42";
3774
3775 function st(e) {
3776 X = e.teams
3777 }
3778 var at = document.getElementById("featuredYoutube"),
3779 ot = [{
3780 name: "SweetCakes",
3781 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3782 }, {
3783 name: "SweetCakes",
3784 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3785 }, {
3786 name: "SweetCakes",
3787 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3788 }, {
3789 name: "SweetCakes",
3790 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3791 }, {
3792 name: "SweetCakes",
3793 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3794 }, {
3795 name: "SweetCakes",
3796 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3797 }, {
3798 name: "SweetCakes",
3799 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3800 }, {
3801 name: "SweetCakes",
3802 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3803 }, {
3804 name: "SweetCakes",
3805 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3806 }, {
3807 name: "SweetCakes",
3808 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3809 }, {
3810 name: "SweetCakes",
3811 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3812 }, {
3813 name: "SweetCakes",
3814 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3815 }, {
3816 name: "SweetCakes",
3817 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3818 }, {
3819 name: "SweetCakes",
3820 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3821 }, {
3822 name: "SweetCakes",
3823 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3824 }, {
3825 name: "SweetCakes",
3826 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3827 }, {
3828 name: "SweetCakes",
3829 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3830 }],
3831 ct = ot[s.randInt(0, ot.length - 1)];
3832 at.innerHTML = "<a target='_blank' class='ytLink' href='" + ct.link +
3833 "'><i class='material-icons' style='vertical-align: top;'></i> " +
3834 ct.name + "</a>";
3835 var lt = !0,
3836 ht = !1,
3837 ut = !1;
3838
3839 function ft(e) {
3840 r.close(), dt(e)
3841 }
3842
3843 function dt(e) {
3844 he.style.display = "block", Be.style.display = "none", Me.style.display =
3845 "none", Ge.style.display = "none", Pe.style.display = "block", Pe.innerHTML =
3846 e +
3847 "<a href='javascript:window.location.href=window.location.href' class='ytLink'>reload</a>"
3848 }
3849 window.onblur = function() {
3850 lt = !1
3851 }, window.onfocus = function() {
3852 lt = !0, R && R.alive && yn()
3853 }, window.onload = function() {
3854 ht = !0, v(), setTimeout((function() {
3855 k || (alert("Captcha failed to load"), window.location.reload())
3856 }), 2e4)
3857 }, window.captchaCallback = function() {
3858 ut = !0, v()
3859 }, we.oncontextmenu = function() {
3860 return !1
3861 };
3862
3863 function pt() {
3864 var e, t, n = "",
3865 i = 0;
3866 for (var r in y.servers) {
3867 for (var s = y.servers[r], a = 0, c = 0; c < s.length; c++)
3868 for (var l = 0; l < s[c].games.length; l++) a += s[c].games[l].playerCount;
3869 i += a;
3870 var h = y.regionInfo[r].name;
3871 n += "<option disabled>" + h + " - " + a + " players</option>";
3872 for (var u = 0; u < s.length; u++)
3873 for (var f = s[u], d = 0; d < f.games.length; d++) {
3874 var p = f.games[d],
3875 g = 1 * f.index + d + 1,
3876 m = y.server && y.server.region === f.region && y.server.index === f.index &&
3877 y.gameIndex == d,
3878 k = h + " " + g + " [" + Math.min(p.playerCount, o.maxPlayers) + "/" +
3879 o.maxPlayers + "]";
3880 let e = y.stripRegion(r) + ":" + u + ":" + d;
3881 m && (de.getElementsByTagName("span")[0].innerText = e), n +=
3882 "<option value='" + e + "' " + (m ? "selected" : "") + ">" + k +
3883 "</option>"
3884 }
3885 n += "<option disabled></option>"
3886 }
3887 n += "<option disabled>All Servers - " + i + " players</option>", xe.innerHTML =
3888 n, "sandbox.moomoo.io" == location.hostname ? (e = "Back to MooMoo", t =
3889 "//moomoo.io/") : (e = "Try the sandbox", t = "//sandbox.moomoo.io/"),
3890 document.getElementById("altServer").innerHTML = "<a href='" + t + "'>" +
3891 e +
3892 "<i class='material-icons' style='font-size:10px;vertical-align:middle'>arrow_forward_ios</i></a>"
3893 }
3894
3895 function gt() {
3896 var e = new XMLHttpRequest;
3897 e.onreadystatechange = function() {
3898 4 == this.readyState && (200 == this.status ? (window.vultr = JSON.parse(
3899 this.responseText), y.processServers(vultr.servers), pt()) : console.error(
3900 "Failed to load server data with status code:", this.status))
3901 }, e.open("GET", "/serverData", !0), e.send()
3902 }
3903 xe.addEventListener("change", s.checkTrusted((function() {
3904 let e = xe.value.split(":");
3905 y.switchServer(e[0], e[1], e[2])
3906 })));
3907 var mt = document.getElementById("pre-content-container"),
3908 yt = null,
3909 kt = null;
3910 window.cpmstarAPI((function(e) {
3911 e.game.setTarget(mt), kt = e
3912 }));
3913 var vt = 3e5,
3914 wt = 0,
3915 bt = 0;
3916
3917 function xt() {
3918 if (!cpmstarAPI || !kt) return console.log("Failed to load video ad API", !
3919 !cpmstarAPI, !!kt), void Tn();
3920 (yt = new kt.game.RewardedVideoView("rewardedvideo")).addEventListener(
3921 "ad_closed", (function(e) {
3922 console.log("Video ad closed"), St()
3923 })), yt.addEventListener("loaded", (function(e) {
3924 console.log("Video ad loaded"), yt.show()
3925 })), yt.addEventListener("load_failed", (function(e) {
3926 console.log("Video ad load failed", e), St()
3927 })), yt.load(), mt.style.display = "block"
3928 }
3929
3930 function St() {
3931 mt.style.display = "none", Tn()
3932 }
3933
3934 function Tt(e, t, n) {
3935 if (R && e)
3936 if (s.removeAllChildren(Fe), Fe.classList.add("visible"), s.generateElement({
3937 id: "itemInfoName",
3938 text: s.capitalizeFirst(e.name),
3939 parent: Fe
3940 }), s.generateElement({
3941 id: "itemInfoDesc",
3942 text: e.desc,
3943 parent: Fe
3944 }), n);
3945 else if (t) s.generateElement({
3946 class: "itemInfoReq",
3947 text: e.type ? "secondary" : "primary",
3948 parent: Fe
3949 });
3950 else {
3951 for (var i = 0; i < e.req.length; i += 2) s.generateElement({
3952 class: "itemInfoReq",
3953 html: e.req[i] + "<span class='itemInfoReqVal'> x" + e.req[i + 1] +
3954 "</span>",
3955 parent: Fe
3956 });
3957 e.group.limit && s.generateElement({
3958 class: "itemInfoLmt",
3959 text: (R.itemCounts[e.group.id] || 0) + "/" + e.group.limit,
3960 parent: Fe
3961 })
3962 } else Fe.classList.remove("visible")
3963 }
3964 window.showPreAd = xt;
3965 var It, Et, Mt, At = [],
3966 Pt = [];
3967
3968 function Bt(e, t) {
3969 At.push({
3970 sid: e,
3971 name: t
3972 }), Ct()
3973 }
3974
3975 function Ct() {
3976 if (At[0]) {
3977 var e = At[0];
3978 s.removeAllChildren(Ze), Ze.style.display = "block", s.generateElement({
3979 class: "notificationText",
3980 text: e.name,
3981 parent: Ze
3982 }), s.generateElement({
3983 class: "notifButton",
3984 html: "<i class='material-icons' style='font-size:28px;color:#cc5151;'></i>",
3985 parent: Ze,
3986 onclick: function() {
3987 Dt(0)
3988 },
3989 hookTouch: !0
3990 }), s.generateElement({
3991 class: "notifButton",
3992 html: "<i class='material-icons' style='font-size:28px;color:#8ecc51;'></i>",
3993 parent: Ze,
3994 onclick: function() {
3995 Dt(1)
3996 },
3997 hookTouch: !0
3998 })
3999 } else Ze.style.display = "none"
4000 }
4001
4002 function Ot(e) {
4003 X.push(e), "block" == Ye.style.display && Ut()
4004 }
4005
4006 function Rt(e, t) {
4007 R && (R.team = e, R.isOwner = t, "block" == Ye.style.display && Ut())
4008 }
4009
4010 function jt(e) {
4011 Pt = e, "block" == Ye.style.display && Ut()
4012 }
4013
4014 function _t(e) {
4015 for (var t = X.length - 1; t >= 0; t--) X[t].sid == e && X.splice(t, 1);
4016 "block" == Ye.style.display && Ut()
4017 }
4018
4019 function Ut() {
4020 if (R && R.alive) {
4021 if (an(), Qe.style.display = "none", Ye.style.display = "block", s.removeAllChildren(
4022 We), R.team)
4023 for (var e = 0; e < Pt.length; e += 2) ! function(e) {
4024 var t = s.generateElement({
4025 class: "allianceItem",
4026 style: "color:" + (Pt[e] == R.sid ? "#fff" : "rgba(255,255,255,0.6)"),
4027 text: Pt[e + 1],
4028 parent: We
4029 });
4030 R.isOwner && Pt[e] != R.sid && s.generateElement({
4031 class: "joinAlBtn",
4032 text: "Kick",
4033 onclick: function() {
4034 Lt(Pt[e])
4035 },
4036 hookTouch: !0,
4037 parent: t
4038 })
4039 }(e);
4040 else if (X.length)
4041 for (e = 0; e < X.length; ++e) ! function(e) {
4042 var t = s.generateElement({
4043 class: "allianceItem",
4044 style: "color:" + (X[e].sid == R.team ? "#fff" :
4045 "rgba(255,255,255,0.6)"),
4046 text: X[e].sid,
4047 parent: We
4048 });
4049 s.generateElement({
4050 class: "joinAlBtn",
4051 text: "Join",
4052 onclick: function() {
4053 Ft(e)
4054 },
4055 hookTouch: !0,
4056 parent: t
4057 })
4058 }(e);
4059 else s.generateElement({
4060 class: "allianceItem",
4061 text: "No Tribes Yet",
4062 parent: We
4063 });
4064 s.removeAllChildren(Xe), R.team ? s.generateElement({
4065 class: "allianceButtonM",
4066 style: "width: 360px",
4067 text: R.isOwner ? "Delete Tribe" : "Leave Tribe",
4068 onclick: function() {
4069 Ht()
4070 },
4071 hookTouch: !0,
4072 parent: Xe
4073 }) : (s.generateElement({
4074 tag: "input",
4075 type: "text",
4076 id: "allianceInput",
4077 maxLength: 7,
4078 placeholder: "unique name",
4079 ontouchstart: function(e) {
4080 e.preventDefault();
4081 var t = prompt("unique name", e.currentTarget.value);
4082 e.currentTarget.value = t.slice(0, 7)
4083 },
4084 parent: Xe
4085 }), s.generateElement({
4086 tag: "div",
4087 class: "allianceButtonM",
4088 style: "width: 140px;",
4089 text: "Create",
4090 onclick: function() {
4091 zt()
4092 },
4093 hookTouch: !0,
4094 parent: Xe
4095 }))
4096 }
4097 }
4098
4099 function Dt(e) {
4100 r.send("11", At[0].sid, e), At.splice(0, 1), Ct();
4101 }
4102
4103 document.onkeydown = function(e) {
4104 if (e.keyCode == 220) {
4105 alert('The key for enabling auto acceptance into the clan is pressed (enabled by default)');
4106 Toggle12134 = (Toggle12134 + 1) % 2;
4107 }
4108 }
4109 let Toggle12134 = 1;
4110
4111 setInterval(() => {
4112 if(Toggle12134 == 1) {
4113 Dt(1)
4114 }
4115 },100);
4116
4117 document.onkeydown = function(e) {// ÑÂÿðü õôþù. ÃÂÕãÑÕà ÃÂÙâÕ ×ÃÂÃâ€Ã•à ÖÚã!! ÃÂу õÑÂûø òþþñщõ úтþ тþ ÑÂтþ òøôøт тþ ÑÂтþ ÿþ тþüу чтþ õÑÂûø òы уñõрõтõ õõ тþ ò úþýцõ þт ÑÂðüþóþ úûøõтð ñуôõт ýðöðтð q тþñøшь õôð ))
4118 if (e.keyCode == 101) {
4119 Sn(R.items[0])
4120 r.send("c", 1)
4121 r.send("c", 0)
4122 Sn(R.items[0])
4123 r.send("c", 1)
4124 r.send("c", 0)
4125 Sn(R.items[0])
4126 r.send("c", 1)
4127 r.send("c", 0)
4128 Sn(R.items[0])
4129 r.send("c", 1)
4130 r.send("c", 0)
4131 setTimeout( () => {
4132 r.send("5")
4133 },1)
4134
4135 }
4136 }
4137 //r.send("5") = ÿрþшûþõ "óûðòýþõ" þруöøõ
4138 //Sn(R.items[0]) = õôð
4139 //Sn(R.items[1]) = ÑÂтõýð
4140 //Sn(R.items[2]) = ÑÂÿðùú øûø öõ шøÿ
4141 //Sn(R.items[3]) = üõûьýøцð
4142 //Sn(R.items[4]) = трðÿúð øûø öõ Ã񥟥ÂÑ‚(õÑÂûø ÑÂтþóþ ÿрõôüõтð ýõту тþ ты ñõрõш ÿрøüðрø øûø ÑÂõúþýôðрø þруöøõ
4143 //Sn(R.items[5]) = тут üþø ÿþûýþüþчøѠуöõ òÑÂõ, þúþýчõýы
4144 var repeater = function(key, action, interval) {
4145 let _isKeyDown = false;
4146 let _intervalId = undefined;
4147
4148 return {
4149 start(keycode) {
4150 if(keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
4151 _isKeyDown = true;
4152 if(_intervalId === undefined) {
4153 _intervalId = setInterval(() => {
4154 action();
4155 if(!_isKeyDown){
4156 clearInterval(_intervalId);
4157 _intervalId = undefined;
4158 console.log("claered");
4159 }
4160 }, interval);
4161 }
4162 }
4163 },
4164
4165 stop(keycode) {
4166 if(keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
4167 _isKeyDown = false;
4168 }
4169 }
4170 };
4171
4172
4173 }
4174
4175 function Lt(e) {
4176 r.send("12", e)
4177 }
4178
4179 function Ft(e) {
4180 r.send("10", X[e].sid)
4181 }
4182 function zt() {
4183 r.send("8", document.getElementById("allianceInput").value)
4184 }
4185
4186 function Ht() {
4187 At = [], Ct(), r.send("9")
4188 }
4189 var Vt, qt = [];
4190
4191 function Yt(e, t) {
4192 for (var n = 0; n < qt.length; ++n)
4193 if (!qt[n].active) {
4194 Vt = qt[n];
4195 break
4196 }
4197 Vt || (Vt = new function() {
4198 this.init = function(e, t) {
4199 this.scale = 0, this.x = e, this.y = t, this.active = !0
4200 }, this.update = function(e, t) {
4201 this.active && (this.scale += .05 * t, this.scale >= o.mapPingScale ?
4202 this.active = !1 : (e.globalAlpha = 1 - Math.max(0, this.scale / o.mapPingScale),
4203 e.beginPath(), e.arc(this.x / o.mapScale * Ne.width, this.y / o.mapScale *
4204 Ne.width, this.scale, 0, 2 * Math.PI), e.stroke()))
4205 }
4206 }, qt.push(Vt)), Vt.init(e, t)
4207 }
4208
4209 function Wt(e) {
4210 Et = e
4211 }
4212 var Xt = 0;
4213
4214 function Nt(e, t, n) {
4215 n ? e ? R.tailIndex = t : R.tails[t] = 1 : e ? R.skinIndex = t : R.skins[t] =
4216 1, "block" == Qe.style.display && Gt()
4217 }
4218
4219 function Gt() {
4220 if (R) {
4221 s.removeAllChildren($e);
4222 for (var e = Xt, t = e ? tt : et, n = 0; n < t.length; ++n) t[n].dontSell ||
4223 function(n) {
4224 var i = s.generateElement({
4225 id: "storeDisplay" + n,
4226 class: "storeItem",
4227 onmouseout: function() {
4228 Tt()
4229 },
4230 onmouseover: function() {
4231 Tt(t[n], !1, !0)
4232 },
4233 parent: $e
4234 });
4235 s.hookTouchEvents(i, !0), s.generateElement({
4236 tag: "img",
4237 class: "hatPreview",
4238 src: "../img/" + (e ? "accessories/access_" : "hats/hat_") + t[n].id +
4239 (t[n].topSprite ? "_p" : "") + ".png",
4240 parent: i
4241 }), s.generateElement({
4242 tag: "span",
4243 text: t[n].name,
4244 parent: i
4245 }), (e ? R.tails[t[n].id] : R.skins[t[n].id]) ? (e ? R.tailIndex : R.skinIndex) ==
4246 t[n].id ? s.generateElement({
4247 class: "joinAlBtn",
4248 style: "margin-top: 5px",
4249 text: "Unequip",
4250 onclick: function() {
4251 Jt(0, e)
4252 },
4253 hookTouch: !0,
4254 parent: i
4255 }) : s.generateElement({
4256 class: "joinAlBtn",
4257 style: "margin-top: 5px",
4258 text: "Equip",
4259 onclick: function() {
4260 Jt(t[n].id, e)
4261 },
4262 hookTouch: !0,
4263 parent: i
4264 }) : (s.generateElement({
4265 class: "joinAlBtn",
4266 style: "margin-top: 5px",
4267 text: "Buy",
4268 onclick: function() {
4269 Kt(t[n].id, e)
4270 },
4271 hookTouch: !0,
4272 parent: i
4273 }), s.generateElement({
4274 tag: "span",
4275 class: "itemPrice",
4276 text: t[n].price,
4277 parent: i
4278 }))
4279 }(n)
4280 }
4281 }
4282
4283 function Jt(e, t) {
4284 r.send("13c", 0, e, t)
4285 }
4286
4287 function Kt(e, t) {
4288 r.send("13c", 1, e, t)
4289 }
4290
4291 function Qt() {
4292 Qe.style.display = "none", Ye.style.display = "none", an()
4293 }
4294
4295 function $t(e, t) {
4296 e && (t ? R.weapons = e : R.items = e);
4297 for (var n = 0; n < l.list.length; ++n) {
4298 var i = l.weapons.length + n;
4299 document.getElementById("actionBarItem" + i).style.display = R.items.indexOf(
4300 l.list[n].id) >= 0 ? "inline-block" : "none"
4301 }
4302 for (n = 0; n < l.weapons.length; ++n) document.getElementById(
4303 "actionBarItem" + n).style.display = R.weapons[l.weapons[n].type] == l.weapons[
4304 n].id ? "inline-block" : "none"
4305 }
4306
4307 function Zt(e) {
4308 M = e, V = e && window.devicePixelRatio || 1, Se.checked = e, I(
4309 "native_resolution", e.toString()), un()
4310 }
4311
4312 function en() {
4313 for (var e = "", t = 0; t < o.skinColors.length; ++t) e += t == ae ?
4314 "<div class='skinColorItem activeSkin' style='background-color:" + o.skinColors[
4315 t] + "' onclick='selectSkinColor(" + t + ")'></div>" :
4316 "<div class='skinColorItem' style='background-color:" + o.skinColors[t] +
4317 "' onclick='selectSkinColor(" + t + ")'></div>";
4318 Je.innerHTML = e
4319 }
4320 var tn = document.getElementById("chatBox"),
4321 nn = document.getElementById("chatHolder");
4322
4323 function rn() {
4324 on ? setTimeout((function() {
4325 var e = prompt("chat message");
4326 e && sn(e)
4327 }), 1) : "block" == nn.style.display ? (tn.value && sn(tn.value), an()) :
4328 (Qe.style.display = "none", Ye.style.display = "none", nn.style.display =
4329 "block", tn.focus(), yn()), tn.value = ""
4330 }
4331
4332 function sn(e) {
4333 r.send("ch", e.slice(0, 30))
4334 }
4335
4336 function an() {
4337 tn.value = "", nn.style.display = "none"
4338 }
4339 var on, cn, ln = ["motherfucking"
4340 ];
4341
4342 function hn(e, t) {
4343 var n = Ii(e);
4344 n && (n.chatMessage = function(e) {
4345 for (var t, n = 0; n < ln.length; ++n)
4346 if (e.indexOf(ln[n]) > -1) {
4347 t = "";
4348 for (var i = 0; i < ln[n].length; ++i) t += t.length ? "o" : "M";
4349 var r = new RegExp(ln[n], "g");
4350 e = e.replace(r, t)
4351 }
4352 return e
4353 }(t), n.chatCountdown = o.chatCountdown)
4354 }
4355
4356 function un() {
4357 F = window.innerWidth, z = window.innerHeight;
4358 var e = Math.max(F / oe, z / ce) * V;
4359 we.width = F * V, we.height = z * V, we.style.width = F + "px", we.style.height =
4360 z + "px", be.setTransform(e, 0, 0, e, (F * V - oe * e) / 2, (z * V - ce *
4361 e) / 2)
4362 }
4363
4364 function fn(e) {
4365 (on = e) ? Ae.classList.add("touch"): Ae.classList.remove("touch")
4366 }
4367
4368 function dn(e) {
4369 e.preventDefault(), e.stopPropagation(), fn(!0);
4370 for (var t = 0; t < e.changedTouches.length; t++) {
4371 var n = e.changedTouches[t];
4372 n.identifier == re.id ? (re.id = -1, bn()) : n.identifier == se.id && (se.id = -
4373 1, R.buildIndex >= 0 && (O = 1, vn()), O = 0, vn())
4374 }
4375 }
4376
4377 function pn() {
4378 return R ? (-1 != se.id ? cn = Math.atan2(se.currentY - se.startY, se.currentX -
4379 se.startX) : R.lockDir || on || (cn = Math.atan2(ie - z / 2, ne - F / 2)),
4380 s.fixTo(cn || 0, 2)) : 0
4381 }
4382 window.addEventListener("resize", s.checkTrusted(un)), un(), fn(!1), window.setUsingTouch =
4383 fn, we.addEventListener("touchmove", s.checkTrusted((function(e) {
4384 e.preventDefault(), e.stopPropagation(), fn(!0);
4385 for (var t = 0; t < e.changedTouches.length; t++) {
4386 var n = e.changedTouches[t];
4387 n.identifier == re.id ? (re.currentX = n.pageX, re.currentY = n.pageY,
4388 bn()) : n.identifier == se.id && (se.currentX = n.pageX, se.currentY =
4389 n.pageY, O = 1)
4390 }
4391 })), !1), we.addEventListener("touchstart", s.checkTrusted((function(e) {
4392 e.preventDefault(), e.stopPropagation(), fn(!0);
4393 for (var t = 0; t < e.changedTouches.length; t++) {
4394 var n = e.changedTouches[t];
4395 n.pageX < document.body.scrollWidth / 2 && -1 == re.id ? (re.id = n.identifier,
4396 re.startX = re.currentX = n.pageX, re.startY = re.currentY = n.pageY,
4397 bn()) : n.pageX > document.body.scrollWidth / 2 && -1 == se.id && (
4398 se.id = n.identifier, se.startX = se.currentX = n.pageX, se.startY =
4399 se.currentY = n.pageY, R.buildIndex < 0 && (O = 1, vn()))
4400 }
4401 })), !1), we.addEventListener("touchend", s.checkTrusted(dn), !1), we.addEventListener(
4402 "touchcancel", s.checkTrusted(dn), !1), we.addEventListener("touchleave",
4403 s.checkTrusted(dn), !1), we.addEventListener("mousemove", (function(e) {
4404 e.preventDefault(), e.stopPropagation(), fn(!1), ne = e.clientX, ie = e.clientY
4405 }), !1), we.addEventListener("mousedown", (function(e) {
4406 fn(!1), 1 != O && (O = 1, vn())
4407 }), !1), we.addEventListener("mouseup", (function(e) {
4408 fn(!1), 0 != O && (O = 0, vn())
4409 }), !1);
4410 var gn = {},
4411 mn = {
4412 87: [0, -1],
4413 38: [0, -1],
4414 83: [0, 1],
4415 40: [0, 1],
4416 65: [-1, 0],
4417 37: [-1, 0],
4418 68: [1, 0],
4419 39: [1, 0]
4420 };
4421
4422 function yn() {
4423 gn = {}, r.send("rmd")
4424 }
4425
4426 function kn() {
4427 return "block" != Ye.style.display && "block" != nn.style.display
4428 }
4429
4430 function vn() {
4431 R && R.alive && r.send("c", O, R.buildIndex >= 0 ? pn() : null)
4432 }
4433 window.addEventListener("keydown", s.checkTrusted((function(e) {
4434 var t = e.which || e.keyCode || 0;
4435 27 == t ? Qt() : R && R.alive && kn() && (gn[t] || (gn[t] = 1, 69 == t ?
4436 r.send("7", 1) : 67 == t ? (Mt || (Mt = {}), Mt.x = R.x, Mt.y = R.y) :
4437 88 == t ? (R.lockDir = R.lockDir ? 0 : 1, r.send("7", 0)) : null !=
4438 R.weapons[t - 49] ? Sn(R.weapons[t - 49], !0) : null != R.items[t -
4439 49 - R.weapons.length] ? Sn(R.items[t - 49 - R.weapons.length]) :
4440 81 == t ? Sn(R.items[0]) : 82 == t ? xn() : mn[t] ? bn() : 32 == t &&
4441 (O = 1, vn())))
4442 }))), window.addEventListener("keyup", s.checkTrusted((function(e) {
4443 if (R && R.alive) {
4444 var t = e.which || e.keyCode || 0;
4445 13 == t ? rn() : kn() && gn[t] && (gn[t] = 0, mn[t] ? bn() : 32 == t &&
4446 (O = 0, vn()))
4447 }
4448 })));
4449 var wn = void 0;
4450
4451 function bn() {
4452 var e = function() {
4453 var e = 0,
4454 t = 0;
4455 if (-1 != re.id) e += re.currentX - re.startX, t += re.currentY - re.startY;
4456 else
4457 for (var n in mn) {
4458 var i = mn[n];
4459 e += !!gn[n] * i[0], t += !!gn[n] * i[1]
4460 }
4461 return 0 == e && 0 == t ? void 0 : s.fixTo(Math.atan2(t, e), 2)
4462 }();
4463 (null == wn || null == e || Math.abs(e - wn) > .3) && (r.send("33", e), wn =
4464 e)
4465 }
4466
4467 function xn() {
4468 r.send("14", 1)
4469 }
4470
4471 function Sn(e, t) {
4472 r.send("5", e, t)
4473 }
4474
4475 function Tn() {
4476 I("moo_name", Le.value), !le && r.connected && (le = !0, x.stop("menu"), dt(
4477 "Loading..."), r.send("sp", {
4478 name: Le.value,
4479 moofoll: H,
4480 skin: ae
4481 }))
4482 }
4483 var In = !0;
4484
4485 function En(e) {
4486 Pe.style.display = "none", Me.style.display = "block", he.style.display =
4487 "none", gn = {}, j = e, O = 0, le = !0, In && (In = !1, N.length = 0)
4488 }
4489
4490 function Mn(e, t, n, i) {
4491 m.showText(e, t, 50, .18, 500, Math.abs(n), n >= 0 ? "#fff" : "#8ecc51")
4492 }
4493 var An = 99999;
4494
4495 function Pn() {
4496 le = !1;
4497 try {
4498 factorem.refreshAds([2], !0)
4499 } catch (e) {}
4500 Be.style.display = "none", Qt(), It = {
4501 x: R.x,
4502 y: R.y
4503 }, Pe.style.display = "none", Ge.style.display = "block", Ge.style.fontSize =
4504 "0px", An = 0, setTimeout((function() {
4505 Me.style.display = "block", he.style.display = "block", Ge.style.display =
4506 "none"
4507 }), o.deathFadeout), gt()
4508 }
4509
4510 function Bn(e) {
4511 R && nt.removeAllItems(e)
4512 }
4513
4514 function Cn(e) {
4515 nt.disableBySid(e)
4516 }
4517
4518 function On() {
4519 Oe.innerText = R.points, Re.innerText = R.food, je.innerText = R.wood, _e.innerText =
4520 R.stone, Ue.innerText = R.kills
4521 }
4522 var Rn = {},
4523 jn = ["crown", "skull"],
4524 _n = [];
4525
4526 function Un(e, t) {
4527 if (R.upgradePoints = e, R.upgrAge = t, e > 0) {
4528 _n.length = 0, s.removeAllChildren(Ve);
4529 for (var n = 0; n < l.weapons.length; ++n) l.weapons[n].age == t && (null ==
4530 l.weapons[n].pre || R.weapons.indexOf(l.weapons[n].pre) >= 0) && (s.generateElement({
4531 id: "upgradeItem" + n,
4532 class: "actionBarItem",
4533 onmouseout: function() {
4534 Tt()
4535 },
4536 parent: Ve
4537 }).style.backgroundImage = document.getElementById("actionBarItem" + n).style
4538 .backgroundImage, _n.push(n));
4539 for (n = 0; n < l.list.length; ++n)
4540 if (l.list[n].age == t && (null == l.list[n].pre || R.items.indexOf(l.list[
4541 n].pre) >= 0)) {
4542 var i = l.weapons.length + n;
4543 s.generateElement({
4544 id: "upgradeItem" + i,
4545 class: "actionBarItem",
4546 onmouseout: function() {
4547 Tt()
4548 },
4549 parent: Ve
4550 }).style.backgroundImage = document.getElementById("actionBarItem" + i)
4551 .style.backgroundImage, _n.push(i)
4552 }
4553 for (n = 0; n < _n.length; n++) ! function(e) {
4554 var t = document.getElementById("upgradeItem" + e);
4555 t.onmouseover = function() {
4556 l.weapons[e] ? Tt(l.weapons[e], !0) : Tt(l.list[e - l.weapons.length])
4557 }, t.onclick = s.checkTrusted((function() {
4558 r.send("6", e)
4559 })), s.hookTouchEvents(t)
4560 }(_n[n]);
4561 _n.length ? (Ve.style.display = "block", qe.style.display = "block", qe.innerHTML =
4562 "SELECT ITEMS (" + e + ")") : (Ve.style.display = "none", qe.style.display =
4563 "none", Tt())
4564 } else Ve.style.display = "none", qe.style.display = "none", Tt()
4565 }
4566
4567 function Dn(e, t, n) {
4568 null != e && (R.XP = e), null != t && (R.maxXP = t), null != n && (R.age =
4569 n), n == o.maxAge ? (ze.innerHTML = "MAX AGE", He.style.width = "100%") :
4570 (ze.innerHTML = "AGE " + R.age, He.style.width = R.XP / R.maxXP * 100 +
4571 "%")
4572 }
4573
4574 function Ln(e) {
4575 s.removeAllChildren(De);
4576 for (var t = 1, n = 0; n < e.length; n += 3) ! function(n) {
4577 s.generateElement({
4578 class: "leaderHolder",
4579 parent: De,
4580 children: [s.generateElement({
4581 class: "leaderboardItem",
4582 style: "color:" + (e[n] == j ? "#fff" : "rgba(255,255,255,0.6)"),
4583 text: t + ". " + ("" != e[n + 1] ? e[n + 1] : "unknown")
4584 }), s.generateElement({
4585 class: "leaderScore",
4586 text: s.kFormat(e[n + 2]) || "0"
4587 })]
4588 })
4589 }(n), t++
4590 }
4591
4592 function Fn(e, t, n, i) {
4593 be.save(), be.setTransform(1, 0, 0, 1, 0, 0), be.scale(V, V);
4594 var r = 50;
4595 be.beginPath(), be.arc(e, t, r, 0, 2 * Math.PI, !1), be.closePath(), be.fillStyle =
4596 "rgba(255, 255, 255, 0.3)", be.fill(), r = 50;
4597 var s = n - e,
4598 a = i - t,
4599 o = Math.sqrt(Math.pow(s, 2) + Math.pow(a, 2)),
4600 c = o > r ? o / r : 1;
4601 s /= c, a /= c, be.beginPath(), be.arc(e + s, t + a, .5 * r, 0, 2 * Math.PI, !
4602 1), be.closePath(), be.fillStyle = "white", be.fill(), be.restore()
4603 }
4604
4605 function zn(e, t, n) {
4606 for (var i = 0; i < G.length; ++i)(_ = G[i]).active && _.layer == e && (_.update(
4607 P), _.active && ki(_.x - t, _.y - n, _.scale) && (be.save(), be.translate(
4608 _.x - t, _.y - n), be.rotate(_.dir), Vn(0, 0, _, be, 1), be.restore()))
4609 }
4610 var Hn = {};
4611
4612 function Vn(e, t, n, i, r) {
4613 if (n.src) {
4614 var s = l.projectiles[n.indx].src,
4615 a = Hn[s];
4616 a || ((a = new Image).onload = function() {
4617 this.isLoaded = !0
4618 }, a.src = ".././img/weapons/" + s + ".png", Hn[s] = a), a.isLoaded && i.drawImage(
4619 a, e - n.scale / 2, t - n.scale / 2, n.scale, n.scale)
4620 } else 1 == n.indx && (i.fillStyle = "#939393", si(e, t, n.scale, i))
4621 }
4622
4623 function qn(e, t, n, i) {
4624 var r = o.riverWidth + i,
4625 s = o.mapScale / 2 - t - r / 2;
4626 s < ce && s + r > 0 && n.fillRect(0, s, oe, r)
4627 }
4628
4629 function Yn(e, t, n) {
4630 for (var i, r, s, a = 0; a < N.length; ++a)(_ = N[a]).active && (r = _.x +
4631 _.xWiggle - t, s = _.y + _.yWiggle - n, 0 == e && _.update(P), _.layer ==
4632 e && ki(r, s, _.scale + (_.blocker || 0)) && (be.globalAlpha = _.hideFromEnemy ?
4633 .6 : 1, _.isItem ? (i = ri(_), be.save(), be.translate(r, s), be.rotate(
4634 _.dir), be.drawImage(i, -i.width / 2, -i.height / 2), _.blocker && (be
4635 .strokeStyle = "#db6e6e", be.globalAlpha = .3, be.lineWidth = 6, si(0,
4636 0, _.blocker, be, !1, !0)), be.restore()) : (i = ni(_), be.drawImage(i,
4637 r - i.width / 2, s - i.height / 2))))
4638 }
4639
4640 function Wn(e, t, n) {
4641 (_ = Ii(e)) && _.startAnim(t, n)
4642 }
4643
4644 function Xn(e, t, n) {
4645 be.globalAlpha = 1;
4646 for (var i = 0; i < W.length; ++i)(_ = W[i]).zIndex == n && (_.animate(P),
4647 _.visible && (_.skinRot += .002 * P, L = (_ == R ? pn() : _.dir) + _.dirPlus,
4648 be.save(), be.translate(_.x - e, _.y - t), be.rotate(L), Nn(_, be), be.restore()
4649 ))
4650 }
4651
4652 function Nn(e, t) {
4653 (t = t || be).lineWidth = 5.5, t.lineJoin = "miter";
4654 var n = Math.PI / 4 * (l.weapons[e.weaponIndex].armS || 1),
4655 i = e.buildIndex < 0 && l.weapons[e.weaponIndex].hndS || 1,
4656 r = e.buildIndex < 0 && l.weapons[e.weaponIndex].hndD || 1;
4657 if (e.tailIndex > 0 && function(e, t, n) {
4658 if (!(Gn = Qn[e])) {
4659 var i = new Image;
4660 i.onload = function() {
4661 this.isLoaded = !0, this.onload = null
4662 }, i.src = ".././img/accessories/access_" + e + ".png", Qn[e] = i, Gn =
4663 i
4664 }
4665 var r = $n[e];
4666 if (!r) {
4667 for (var s = 0; s < tt.length; ++s)
4668 if (tt[s].id == e) {
4669 r = tt[s];
4670 break
4671 }
4672 $n[e] = r
4673 }
4674 Gn.isLoaded && (t.save(), t.translate(-20 - (r.xOff || 0), 0), r.spin &&
4675 t.rotate(n.skinRot), t.drawImage(Gn, -r.scale / 2, -r.scale / 2, r.scale,
4676 r.scale), t.restore())
4677 }(e.tailIndex, t, e), e.buildIndex < 0 && !l.weapons[e.weaponIndex].aboveHand &&
4678 (ei(l.weapons[e.weaponIndex], o.weaponVariants[e.weaponVariant].src, e.scale,
4679 0, t), null == l.weapons[e.weaponIndex].projectile || l.weapons[e.weaponIndex]
4680 .hideProjectile || Vn(e.scale, 0, l.projectiles[l.weapons[e.weaponIndex].projectile],
4681 be)), t.fillStyle = o.skinColors[e.skinColor], si(e.scale * Math.cos(n),
4682 e.scale * Math.sin(n), 14), si(e.scale * r * Math.cos(-n * i), e.scale *
4683 r * Math.sin(-n * i), 14), e.buildIndex < 0 && l.weapons[e.weaponIndex].aboveHand &&
4684 (ei(l.weapons[e.weaponIndex], o.weaponVariants[e.weaponVariant].src, e.scale,
4685 0, t), null == l.weapons[e.weaponIndex].projectile || l.weapons[e.weaponIndex]
4686 .hideProjectile || Vn(e.scale, 0, l.projectiles[l.weapons[e.weaponIndex].projectile],
4687 be)), e.buildIndex >= 0) {
4688 var s = ri(l.list[e.buildIndex]);
4689 t.drawImage(s, e.scale - l.list[e.buildIndex].holdOffset, -s.width / 2)
4690 }
4691 si(0, 0, e.scale, t), e.skinIndex > 0 && (t.rotate(Math.PI / 2), function e(
4692 t, n, i, r) {
4693 if (!(Gn = Jn[t])) {
4694 var s = new Image;
4695 s.onload = function() {
4696 this.isLoaded = !0, this.onload = null
4697 }, s.src = ".././img/hats/hat_" + t + ".png", Jn[t] = s, Gn = s
4698 }
4699 var a = i || Kn[t];
4700 if (!a) {
4701 for (var o = 0; o < et.length; ++o)
4702 if (et[o].id == t) {
4703 a = et[o];
4704 break
4705 }
4706 Kn[t] = a
4707 }
4708 Gn.isLoaded && n.drawImage(Gn, -a.scale / 2, -a.scale / 2, a.scale, a.scale), !
4709 i && a.topSprite && (n.save(), n.rotate(r.skinRot), e(t + "_top", n, a,
4710 r), n.restore())
4711 }(e.skinIndex, t, null, e))
4712 }
4713 var Gn, Jn = {},
4714 Kn = {},
4715 Qn = {},
4716 $n = {},
4717 Zn = {};
4718
4719 function ei(e, t, n, i, r) {
4720 var s = e.src + (t || ""),
4721 a = Zn[s];
4722 a || ((a = new Image).onload = function() {
4723 this.isLoaded = !0
4724 }, a.src = ".././img/weapons/" + s + ".png", Zn[s] = a), a.isLoaded && r.drawImage(
4725 a, n + e.xOff - e.length / 2, i + e.yOff - e.width / 2, e.length, e.width
4726 )
4727 }
4728 var ti = {};
4729
4730 function ni(e) {
4731 var t = e.y >= o.mapScale - o.snowBiomeTop ? 2 : e.y <= o.snowBiomeTop ? 1 :
4732 0,
4733 n = e.type + "_" + e.scale + "_" + t,
4734 i = ti[n];
4735 if (!i) {
4736 var r = document.createElement("canvas");
4737 r.width = r.height = 2.1 * e.scale + 5.5;
4738 var a = r.getContext("2d");
4739 if (a.translate(r.width / 2, r.height / 2), a.rotate(s.randFloat(0, Math.PI)),
4740 a.strokeStyle = it, a.lineWidth = 5.5, 0 == e.type)
4741 for (var c, l = 0; l < 2; ++l) ai(a, 7, c = _.scale * (l ? .5 : 1), .7 *
4742 c), a.fillStyle = t ? l ? "#fff" : "#e3f1f4" : l ? "#b4db62" :
4743 "#9ebf57", a.fill(), l || a.stroke();
4744 else if (1 == e.type)
4745 if (2 == t) a.fillStyle = "#606060", ai(a, 6, .3 * e.scale, .71 * e.scale),
4746 a.fill(), a.stroke(), a.fillStyle = "#89a54c", si(0, 0, .55 * e.scale, a),
4747 a.fillStyle = "#a5c65b", si(0, 0, .3 * e.scale, a, !0);
4748 else {
4749 var h;
4750 ! function(e, t, n, i) {
4751 var r, a = Math.PI / 2 * 3,
4752 o = Math.PI / 6;
4753 e.beginPath(), e.moveTo(0, -i);
4754 for (var c = 0; c < 6; c++) r = s.randInt(n + .9, 1.2 * n), e.quadraticCurveTo(
4755 Math.cos(a + o) * r, Math.sin(a + o) * r, Math.cos(a + 2 * o) * i,
4756 Math.sin(a + 2 * o) * i), a += 2 * o;
4757 e.lineTo(0, -i), e.closePath()
4758 }(a, 0, _.scale, .7 * _.scale), a.fillStyle = t ? "#e3f1f4" : "#89a54c",
4759 a.fill(), a.stroke(), a.fillStyle = t ? "#6a64af" : "#c15555";
4760 var u = T / 4;
4761 for (l = 0; l < 4; ++l) si((h = s.randInt(_.scale / 3.5, _.scale / 2.3)) *
4762 Math.cos(u * l), h * Math.sin(u * l), s.randInt(10, 12), a)
4763 }
4764 else 2 != e.type && 3 != e.type || (a.fillStyle = 2 == e.type ? 2 == t ?
4765 "#938d77" : "#939393" : "#e0c655", ai(a, 3, e.scale, e.scale), a.fill(),
4766 a.stroke(), a.fillStyle = 2 == e.type ? 2 == t ? "#b2ab90" : "#bcbcbc" :
4767 "#ebdca3", ai(a, 3, .55 * e.scale, .65 * e.scale), a.fill());
4768 i = r, ti[n] = i
4769 }
4770 return i
4771 }
4772 var ii = [];
4773
4774 function ri(e, t) {
4775 var n = ii[e.id];
4776 if (!n || t) {
4777 var i = document.createElement("canvas");
4778 i.width = i.height = 2.5 * e.scale + 5.5 + (l.list[e.id].spritePadding ||
4779 0);
4780 var r = i.getContext("2d");
4781 if (r.translate(i.width / 2, i.height / 2), r.rotate(t ? 0 : Math.PI / 2),
4782 r.strokeStyle = it, r.lineWidth = 5.5 * (t ? i.width / 81 : 1), "apple" ==
4783 e.name) {
4784 r.fillStyle = "#c15555", si(0, 0, e.scale, r), r.fillStyle = "#89a54c";
4785 var a = -Math.PI / 2;
4786 ! function(e, t, n, i, r) {
4787 var s = e + 25 * Math.cos(i),
4788 a = t + 25 * Math.sin(i);
4789 r.moveTo(e, t), r.beginPath(), r.quadraticCurveTo((e + s) / 2 + 10 *
4790 Math.cos(i + Math.PI / 2), (t + a) / 2 + 10 * Math.sin(i + Math.PI / 2),
4791 s, a), r.quadraticCurveTo((e + s) / 2 - 10 * Math.cos(i + Math.PI / 2),
4792 (t + a) / 2 - 10 * Math.sin(i + Math.PI / 2), e, t), r.closePath(), r.fill(),
4793 r.stroke()
4794 }(e.scale * Math.cos(a), e.scale * Math.sin(a), 0, a + Math.PI / 2, r)
4795 } else if ("cookie" == e.name) {
4796 r.fillStyle = "#cca861", si(0, 0, e.scale, r), r.fillStyle = "#937c4b";
4797 for (var o = T / (h = 4), c = 0; c < h; ++c) si((u = s.randInt(e.scale /
4798 2.5, e.scale / 1.7)) * Math.cos(o * c), u * Math.sin(o * c), s.randInt(
4799 4, 5), r, !0)
4800 } else if ("cheese" == e.name) {
4801 var h, u;
4802 for (r.fillStyle = "#f4f3ac", si(0, 0, e.scale, r), r.fillStyle =
4803 "#c3c28b", o = T / (h = 4), c = 0; c < h; ++c) si((u = s.randInt(e.scale /
4804 2.5, e.scale / 1.7)) * Math.cos(o * c), u * Math.sin(o * c), s.randInt(
4805 4, 5), r, !0)
4806 } else if ("wood wall" == e.name || "stone wall" == e.name ||
4807 "castle wall" == e.name) {
4808 r.fillStyle = "castle wall" == e.name ? "#83898e" : "wood wall" == e.name ?
4809 "#a5974c" : "#939393";
4810 var f = "castle wall" == e.name ? 4 : 3;
4811 ai(r, f, 1.1 * e.scale, 1.1 * e.scale), r.fill(), r.stroke(), r.fillStyle =
4812 "castle wall" == e.name ? "#9da4aa" : "wood wall" == e.name ? "#c9b758" :
4813 "#bcbcbc", ai(r, f, .65 * e.scale, .65 * e.scale), r.fill()
4814 } else if ("spikes" == e.name || "greater spikes" == e.name ||
4815 "poison spikes" == e.name || "spinning spikes" == e.name) {
4816 r.fillStyle = "poison spikes" == e.name ? "#7b935d" : "#939393";
4817 var d = .6 * e.scale;
4818 ai(r, "spikes" == e.name ? 5 : 6, e.scale, d), r.fill(), r.stroke(), r.fillStyle =
4819 "#a5974c", si(0, 0, d, r), r.fillStyle = "#c9b758", si(0, 0, d / 2, r, !
4820 0)
4821 } else if ("windmill" == e.name || "faster windmill" == e.name ||
4822 "power mill" == e.name) r.fillStyle = "#a5974c", si(0, 0, e.scale, r), r.fillStyle =
4823 "#c9b758", ci(0, 0, 1.5 * e.scale, 29, 4, r), r.fillStyle = "#a5974c", si(
4824 0, 0, .5 * e.scale, r);
4825 else if ("mine" == e.name) r.fillStyle = "#939393", ai(r, 3, e.scale, e.scale),
4826 r.fill(), r.stroke(), r.fillStyle = "#bcbcbc", ai(r, 3, .55 * e.scale,
4827 .65 * e.scale), r.fill();
4828 else if ("sapling" == e.name)
4829 for (c = 0; c < 2; ++c) ai(r, 7, d = e.scale * (c ? .5 : 1), .7 * d), r.fillStyle =
4830 c ? "#b4db62" : "#9ebf57", r.fill(), c || r.stroke();
4831 else if ("pit trap" == e.name) r.fillStyle = "#a5974c", ai(r, 3, 1.1 * e.scale,
4832 1.1 * e.scale), r.fill(), r.stroke(), r.fillStyle = it, ai(r, 3, .65 * e
4833 .scale, .65 * e.scale), r.fill();
4834 else if ("boost pad" == e.name) r.fillStyle = "#7e7f82", oi(0, 0, 2 * e.scale,
4835 2 * e.scale, r), r.fill(), r.stroke(), r.fillStyle = "#dbd97d",
4836 function(e, t) {
4837 t = t || be;
4838 var n = e * (Math.sqrt(3) / 2);
4839 t.beginPath(), t.moveTo(0, -n / 2), t.lineTo(-e / 2, n / 2), t.lineTo(e /
4840 2, n / 2), t.lineTo(0, -n / 2), t.fill(), t.closePath()
4841 }(1 * e.scale, r);
4842 else if ("turret" == e.name) r.fillStyle = "#a5974c", si(0, 0, e.scale, r),
4843 r.fill(), r.stroke(), r.fillStyle = "#939393", oi(0, -25, .9 * e.scale,
4844 50, r), si(0, 0, .6 * e.scale, r), r.fill(), r.stroke();
4845 else if ("platform" == e.name) {
4846 r.fillStyle = "#cebd5f";
4847 var p = 2 * e.scale,
4848 g = p / 4,
4849 m = -e.scale / 2;
4850 for (c = 0; c < 4; ++c) oi(m - g / 2, 0, g, 2 * e.scale, r), r.fill(), r.stroke(),
4851 m += p / 4
4852 } else "healing pad" == e.name ? (r.fillStyle = "#7e7f82", oi(0, 0, 2 * e.scale,
4853 2 * e.scale, r), r.fill(), r.stroke(), r.fillStyle = "#db6e6e", ci(0, 0,
4854 .65 * e.scale, 20, 4, r, !0)) : "spawn pad" == e.name ? (r.fillStyle =
4855 "#7e7f82", oi(0, 0, 2 * e.scale, 2 * e.scale, r), r.fill(), r.stroke(),
4856 r.fillStyle = "#71aad6", si(0, 0, .6 * e.scale, r)) : "blocker" == e.name ?
4857 (r.fillStyle = "#7e7f82", si(0, 0, e.scale, r), r.fill(), r.stroke(), r.rotate(
4858 Math.PI / 4), r.fillStyle = "#db6e6e", ci(0, 0, .65 * e.scale, 20, 4, r, !
4859 0)) : "teleporter" == e.name && (r.fillStyle = "#7e7f82", si(0, 0, e.scale,
4860 r), r.fill(), r.stroke(), r.rotate(Math.PI / 4), r.fillStyle =
4861 "#d76edb", si(0, 0, .5 * e.scale, r, !0));
4862 n = i, t || (ii[e.id] = n)
4863 }
4864 return n
4865 }
4866
4867 function si(e, t, n, i, r, s) {
4868 (i = i || be).beginPath(), i.arc(e, t, n, 0, 2 * Math.PI), s || i.fill(), r ||
4869 i.stroke()
4870 }
4871
4872 function ai(e, t, n, i) {
4873 var r, s, a = Math.PI / 2 * 3,
4874 o = Math.PI / t;
4875 e.beginPath(), e.moveTo(0, -n);
4876 for (var c = 0; c < t; c++) r = Math.cos(a) * n, s = Math.sin(a) * n, e.lineTo(
4877 r, s), a += o, r = Math.cos(a) * i, s = Math.sin(a) * i, e.lineTo(r, s),
4878 a += o;
4879 e.lineTo(0, -n), e.closePath()
4880 }
4881
4882 function oi(e, t, n, i, r, s) {
4883 r.fillRect(e - n / 2, t - i / 2, n, i), s || r.strokeRect(e - n / 2, t - i /
4884 2, n, i)
4885 }
4886
4887 function ci(e, t, n, i, r, s, a) {
4888 s.save(), s.translate(e, t), r = Math.ceil(r / 2);
4889 for (var o = 0; o < r; o++) oi(0, 0, 2 * n, i, s, a), s.rotate(Math.PI / r);
4890 s.restore()
4891 }
4892
4893 function li(e) {
4894 for (var t = 0; t < e.length;) nt.add(e[t], e[t + 1], e[t + 2], e[t + 3], e[
4895 t + 4], e[t + 5], l.list[e[t + 6]], !0, e[t + 7] >= 0 ? {
4896 sid: e[t + 7]
4897 } : null), t += 8
4898 }
4899
4900 function hi(e, t) {
4901 (_ = Mi(t)) && (_.xWiggle += o.gatherWiggle * Math.cos(e), _.yWiggle += o.gatherWiggle *
4902 Math.sin(e))
4903 }
4904
4905 function ui(e, t) {
4906 (_ = Mi(e)) && (_.dir = t, _.xWiggle += o.gatherWiggle * Math.cos(t + Math.PI),
4907 _.yWiggle += o.gatherWiggle * Math.sin(t + Math.PI))
4908 }
4909
4910 function fi(e, t, n, i, r, s, a, o) {
4911 lt && (J.addProjectile(e, t, n, i, r, s, null, null, a).sid = o)
4912 }
4913
4914 function di(e, t) {
4915 for (var n = 0; n < G.length; ++n) G[n].sid == e && (G[n].range = t)
4916 }
4917
4918 function pi(e) {
4919 (_ = Ei(e)) && _.startAnim()
4920 }
4921
4922 function gi(e) {
4923 for (var t = 0; t < Y.length; ++t) Y[t].forcePos = !Y[t].visible, Y[t].visible = !
4924 1;
4925 if (e) {
4926 var n = Date.now();
4927 for (t = 0; t < e.length;)(_ = Ei(e[t])) ? (_.index = e[t + 1], _.t1 =
4928 void 0 === _.t2 ? n : _.t2, _.t2 = n, _.x1 = _.x, _.y1 = _.y, _.x2 = e[t +
4929 2], _.y2 = e[t + 3], _.d1 = void 0 === _.d2 ? e[t + 4] : _.d2, _.d2 = e[
4930 t + 4], _.health = e[t + 5], _.dt = 0, _.visible = !0) : ((_ = Z.spawn(
4931 e[t + 2], e[t + 3], e[t + 4], e[t + 1])).x2 = _.x, _.y2 = _.y, _.d2 = _
4932 .dir, _.health = e[t + 5], Z.aiTypes[e[t + 1]].name || (_.name = o.cowNames[
4933 e[t + 6]]), _.forcePos = !0, _.sid = e[t], _.visible = !0), t += 7
4934 }
4935 }
4936 var mi = {};
4937
4938 function yi(e, t) {
4939 var n = e.index,
4940 i = mi[n];
4941 if (!i) {
4942 var r = new Image;
4943 r.onload = function() {
4944 this.isLoaded = !0, this.onload = null
4945 }, r.src = ".././img/animals/" + e.src + ".png", i = r, mi[n] = i
4946 }
4947 if (i.isLoaded) {
4948 var s = 1.2 * e.scale * (e.spriteMlt || 1);
4949 t.drawImage(i, -s, -s, 2 * s, 2 * s)
4950 }
4951 }
4952
4953 function ki(e, t, n) {
4954 return e + n >= 0 && e - n <= oe && t + n >= 0 && t - n <= ce
4955 }
4956
4957 function vi(e, t) {
4958 var n = function(e) {
4959 for (var t = 0; t < W.length; ++t)
4960 if (W[t].id == e) return W[t];
4961 return null
4962 }(e[0]);
4963 n || (n = new u(e[0], e[1], o, s, J, nt, W, Y, l, et, tt), W.push(n)), n.spawn(
4964 t ? H : null), n.visible = !1, n.x2 = void 0, n.y2 = void 0, n.setData(e),
4965 t && (U = (R = n).x, D = R.y, $t(), On(), Dn(), Un(0), Be.style.display =
4966 "block")
4967 }
4968
4969 function wi(e) {
4970 for (var t = 0; t < W.length; t++)
4971 if (W[t].id == e) {
4972 W.splice(t, 1);
4973 break
4974 }
4975 }
4976
4977 function bi(e, t) {
4978 R && (R.itemCounts[e] = t)
4979 }
4980
4981 function xi(e, t, n) {
4982 R && (R[e] = t, n && On())
4983 }
4984
4985 function Si(e, t) {
4986 (_ = Ii(e)) && (_.health = t)
4987 }
4988
4989 function Ti(e) {
4990 for (var t = Date.now(), n = 0; n < W.length; ++n) W[n].forcePos = !W[n].visible,
4991 W[n].visible = !1;
4992 for (n = 0; n < e.length;)(_ = Ii(e[n])) && (_.t1 = void 0 === _.t2 ? t : _
4993 .t2, _.t2 = t, _.x1 = _.x, _.y1 = _.y, _.x2 = e[n + 1], _.y2 = e[n + 2],
4994 _.d1 = void 0 === _.d2 ? e[n + 3] : _.d2, _.d2 = e[n + 3], _.dt = 0, _.buildIndex =
4995 e[n + 4], _.weaponIndex = e[n + 5], _.weaponVariant = e[n + 6], _.team =
4996 e[n + 7], _.isLeader = e[n + 8], _.skinIndex = e[n + 9], _.tailIndex = e[
4997 n + 10], _.iconIndex = e[n + 11], _.zIndex = e[n + 12], _.visible = !0),
4998 n += 13
4999 }
5000
5001 function Ii(e) {
5002 for (var t = 0; t < W.length; ++t)
5003 if (W[t].sid == e) return W[t];
5004 return null
5005 }
5006
5007 function Ei(e) {
5008 for (var t = 0; t < Y.length; ++t)
5009 if (Y[t].sid == e) return Y[t];
5010 return null
5011 }
5012
5013 function Mi(e) {
5014 for (var t = 0; t < N.length; ++t)
5015 if (N[t].sid == e) return N[t];
5016 return null
5017 }
5018 var Ai = -1;
5019
5020 function Pi() {
5021 var e = Date.now() - Ai;
5022 window.pingTime = e, Ie.innerText = "Ping: " + e + " ms"
5023 }
5024
5025 function Bi() {
5026 Ai = Date.now(), r.send("pp")
5027 }
5028
5029 function Ci(e) {
5030 if (!(e < 0)) {
5031 var t = Math.floor(e / 60),
5032 n = e % 60;
5033 n = ("0" + n).slice(-2), Ee.innerText = "Server restarting in " + t + ":" +
5034 n, Ee.hidden = !1
5035 }
5036 }
5037
5038 function Oi(e) {
5039 window.open(e, "_blank")
5040 }
5041 window.requestAnimFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame ||
5042 window.mozRequestAnimationFrame || function(e) {
5043 window.setTimeout(e, 1e3 / 60)
5044 },
5045 function() {
5046 var e = o.mapScale / 2;
5047 nt.add(0, e, e + 200, 0, o.treeScales[3], 0), nt.add(1, e, e - 480, 0, o.treeScales[
5048 3], 0), nt.add(2, e + 300, e + 450, 0, o.treeScales[3], 0), nt.add(3, e -
5049 950, e - 130, 0, o.treeScales[2], 0), nt.add(4, e - 750, e - 400, 0, o.treeScales[
5050 3], 0), nt.add(5, e - 700, e + 400, 0, o.treeScales[2], 0), nt.add(6, e +
5051 800, e - 200, 0, o.treeScales[3], 0), nt.add(7, e - 260, e + 340, 0, o.bushScales[
5052 3], 1), nt.add(8, e + 760, e + 310, 0, o.bushScales[3], 1), nt.add(9, e -
5053 800, e + 100, 0, o.bushScales[3], 1), nt.add(10, e - 800, e + 300, 0, l.list[
5054 4].scale, l.list[4].id, l.list[10]), nt.add(11, e + 650, e - 390, 0, l.list[
5055 4].scale, l.list[4].id, l.list[10]), nt.add(12, e - 400, e - 450, 0, o.rockScales[
5056 2], 2)
5057 }(),
5058 function e() {
5059 B = Date.now(), P = B - q, q = B,
5060 function() {
5061 if (R && (!C || B - C >= 1e3 / o.clientSendRate) && (C = B, r.send("2",
5062 pn())), An < 120 && (An += .1 * P, Ge.style.fontSize = Math.min(Math.round(
5063 An), 120) + "px"), R) {
5064 var e = s.getDistance(U, D, R.x, R.y),
5065 t = s.getDirection(R.x, R.y, U, D),
5066 n = Math.min(.01 * e * P, e);
5067 e > .05 ? (U += n * Math.cos(t), D += n * Math.sin(t)) : (U = R.x, D =
5068 R.y)
5069 } else U = o.mapScale / 2, D = o.mapScale / 2;
5070 for (var i = B - 1e3 / o.serverUpdateRate, a = 0; a < W.length + Y.length; ++
5071 a)
5072 if ((_ = W[a] || Y[a - W.length]) && _.visible)
5073 if (_.forcePos) _.x = _.x2, _.y = _.y2, _.dir = _.d2;
5074 else {
5075 var c = _.t2 - _.t1,
5076 l = (i - _.t1) / c;
5077 _.dt += P;
5078 var h = Math.min(1.7, _.dt / 170),
5079 u = _.x2 - _.x1;
5080 _.x = _.x1 + u * h, u = _.y2 - _.y1, _.y = _.y1 + u * h, _.dir = Math
5081 .lerpAngle(_.d2, _.d1, Math.min(1.2, l))
5082 }
5083 var f = U - oe / 2,
5084 d = D - ce / 2;
5085 o.snowBiomeTop - d <= 0 && o.mapScale - o.snowBiomeTop - d >= ce ? (be.fillStyle =
5086 "#b6db66", be.fillRect(0, 0, oe, ce)) : o.mapScale - o.snowBiomeTop -
5087 d <= 0 ? (be.fillStyle = "#dbc666", be.fillRect(0, 0, oe, ce)) : o.snowBiomeTop -
5088 d >= ce ? (be.fillStyle = "#fff", be.fillRect(0, 0, oe, ce)) : o.snowBiomeTop -
5089 d >= 0 ? (be.fillStyle = "#fff", be.fillRect(0, 0, oe, o.snowBiomeTop -
5090 d), be.fillStyle = "#b6db66", be.fillRect(0, o.snowBiomeTop - d, oe,
5091 ce - (o.snowBiomeTop - d))) : (be.fillStyle = "#b6db66", be.fillRect(0,
5092 0, oe, o.mapScale - o.snowBiomeTop - d), be.fillStyle = "#dbc666", be
5093 .fillRect(0, o.mapScale - o.snowBiomeTop - d, oe, ce - (o.mapScale - o
5094 .snowBiomeTop - d))), In || ((ee += te * o.waveSpeed * P) >= o.waveMax ?
5095 (ee = o.waveMax, te = -1) : ee <= 1 && (ee = te = 1), be.globalAlpha =
5096 1, be.fillStyle = "#dbc666", qn(f, d, be, o.riverPadding), be.fillStyle =
5097 "#91b2db", qn(f, d, be, 250 * (ee - 1))), be.lineWidth = 4, be.strokeStyle =
5098 "#000", be.globalAlpha = .06, be.beginPath();
5099 for (var p = -U; p < oe; p += ce / 18) p > 0 && (be.moveTo(p, 0), be.lineTo(
5100 p, ce));
5101 for (var g = -D; g < ce; g += ce / 18) p > 0 && (be.moveTo(0, g), be.lineTo(
5102 oe, g));
5103 for (be.stroke(), be.globalAlpha = 1, be.strokeStyle = it, Yn(-1, f, d),
5104 be.globalAlpha = 1, be.lineWidth = 5.5, zn(0, f, d), Xn(f, d, 0), be.globalAlpha =
5105 1, a = 0; a < Y.length; ++a)(_ = Y[a]).active && _.visible && (_.animate(
5106 P), be.save(), be.translate(_.x - f, _.y - d), be.rotate(_.dir + _.dirPlus -
5107 Math.PI / 2), yi(_, be), be.restore());
5108 if (Yn(0, f, d), zn(1, f, d), Yn(1, f, d), Xn(f, d, 1), Yn(2, f, d), Yn(
5109 3, f, d), be.fillStyle = "#000", be.globalAlpha = .09, f <= 0 && be.fillRect(
5110 0, 0, -f, ce), o.mapScale - f <= oe) {
5111 var y = Math.max(0, -d);
5112 be.fillRect(o.mapScale - f, y, oe - (o.mapScale - f), ce - y)
5113 }
5114 if (d <= 0 && be.fillRect(-f, 0, oe + f, -d), o.mapScale - d <= ce) {
5115 var k = Math.max(0, -f),
5116 v = 0;
5117 o.mapScale - f <= oe && (v = oe - (o.mapScale - f)), be.fillRect(k, o.mapScale -
5118 d, oe - k - v, ce - (o.mapScale - d))
5119 }
5120 for (be.globalAlpha = 1, be.fillStyle = "rgba(0, 0, 70, 0.35)", be.fillRect(
5121 0, 0, oe, ce), be.strokeStyle = rt, a = 0; a < W.length + Y.length; ++
5122 a)
5123 if ((_ = W[a] || Y[a - W.length]).visible && (10 != _.skinIndex || _ ==
5124 R || _.team && _.team == R.team)) {
5125 var w = (_.team?"["+_.team+"] ":"")+(_.name||"")
5126 if ("" != w) {
5127 if (be.font = (_.nameScale || 30) + "px Hammersmith One", be.fillStyle =
5128 "#fff", be.textBaseline = "middle", be.textAlign = "center", be.lineWidth =
5129 _.nameScale ? 11 : 8, be.lineJoin = "round", be.strokeText(w, _.x -
5130 f, _.y - d - _.scale - o.nameY), be.fillText(w, _.x - f, _.y - d -
5131 _.scale - o.nameY), _.isLeader && Rn.crown.isLoaded) {
5132 var b = o.crownIconScale;
5133 k = _.x - f - b / 2 - be.measureText(w).width / 2 - o.crownPad, be.drawImage(
5134 Rn.crown, k, _.y - d - _.scale - o.nameY - b / 2 - 5, b, b)
5135 }
5136 1 == _.iconIndex && Rn.skull.isLoaded && (b = o.crownIconScale, k = _
5137 .x - f - b / 2 + be.measureText(w).width / 2 + o.crownPad, be.drawImage(
5138 Rn.skull, k, _.y - d - _.scale - o.nameY - b / 2 - 5, b, b))
5139 }
5140 window.items = R.items;
5141 window.w = R.weapons;
5142 (be.textAlign = "center",//hp number
5143 be.fillStyle = "#fff",
5144 be.lineJoin = "round",
5145 be.font = "20px Hammersmith One",
5146 be.lineWidth = 6,
5147 be.strokeText(`\nHP:${_.health}/${_.maxHealth}`,_.x - f,_.y - d + _.scale + o.nameY+(34)),
5148 be.fillText(`\nHP:${_.health}/${_.maxHealth}`,_.x - f,_.y - d + _.scale + o.nameY+(34))
5149 )
5150 if(_.isPlayer&&_!=R&&_.team&&_.team==R.team){//tribe tracers
5151 be.lineCap = "round";
5152 be.strokeStyle = "#228b22";
5153 be.lineWidth = 3;
5154 be.beginPath();
5155 be.moveTo(R.x-f, R.y-d);
5156 be.lineTo(_.x-f, _.y-d);
5157 be.stroke();
5158 be.strokeStyle = nt;
5159 }
5160 if(_.isPlayer&&_!=R&&(_.team!=R.team||!_.team)){//enemy tracers
5161 be.lineCap = "round";
5162 be.strokeStyle = "#000000";
5163 be.lineWidth = 3;
5164 be.beginPath();
5165 be.moveTo(R.x-f, R.y-d);
5166 be.lineTo(_.x-f, _.y-d);
5167 be.stroke();
5168 be.strokeStyle = nt;
5169 }
5170 if(!_.isPlayer){//animal tracers
5171 be.lineCap = "round";
5172 be.strokeStyle = "#0000ff";
5173 be.lineWidth = 3;
5174 be.beginPath();
5175 be.moveTo(R.x-f, R.y-d);
5176 be.lineTo(_.x-f, _.y-d);
5177 be.stroke();
5178 be.strokeStyle = nt;
5179
5180 }
5181 _.health > 0 && (o.healthBarWidth, be.fillStyle = rt, be.roundRect(_.x -
5182 f - o.healthBarWidth - o.healthBarPad, _.y - d + _.scale + o.nameY,
5183 2 * o.healthBarWidth + 2 * o.healthBarPad, 17, 8), be.fill(), be.fillStyle =
5184 _ == R || _.team && _.team == R.team ? "#8ecc51" : "#cc5151", be.roundRect(
5185 _.x - f - o.healthBarWidth, _.y - d + _.scale + o.nameY + o.healthBarPad,
5186 2 * o.healthBarWidth * (_.health / _.maxHealth), 17 - 2 * o.healthBarPad,
5187 7), be.fill())
5188 }
5189 for (m.update(P, be, f, d), a = 0; a < W.length; ++a)
5190 if ((_ = W[a]).visible && _.chatCountdown > 0) {
5191 _.chatCountdown -= P, _.chatCountdown <= 0 && (_.chatCountdown = 0),
5192 be.font = "32px Hammersmith One";
5193 var x = be.measureText(_.chatMessage);
5194 be.textBaseline = "middle", be.textAlign = "center", k = _.x - f, y =
5195 _.y - _.scale - d - 90;
5196 var S = x.width + 17;
5197 be.fillStyle = "rgba(0,0,0,0.2)", be.roundRect(k - S / 2, y - 23.5, S,
5198 47, 6), be.fill(), be.fillStyle = "#fff", be.fillText(_.chatMessage,
5199 k, y)
5200 }! function(e) {
5201 if (R && R.alive) {
5202 Ke.clearRect(0, 0, Ne.width, Ne.height), Ke.strokeStyle = "#fff", Ke.lineWidth =
5203 4;
5204 for (var t = 0; t < qt.length; ++t)(Vt = qt[t]).update(Ke, e);
5205 if (Ke.globalAlpha = 1, Ke.fillStyle = "#fff", si(R.x / o.mapScale *
5206 Ne.width, R.y / o.mapScale * Ne.height, 7, Ke, !0), Ke.fillStyle =
5207 "rgba(255,255,255,0.35)", R.team && Et)
5208 for (t = 0; t < Et.length;) si(Et[t] / o.mapScale * Ne.width, Et[t +
5209 1] / o.mapScale * Ne.height, 7, Ke, !0), t += 2;
5210 It && (Ke.fillStyle = "#0a0a0a", Ke.font = "34px Hammersmith One", Ke.textBaseline =
5211 "middle", Ke.textAlign = "center", Ke.fillText("x", It.x / o.mapScale *
5212 Ne.width, It.y / o.mapScale * Ne.height)), Mt && (Ke.fillStyle =
5213 "#fff", Ke.font = "34px Hammersmith One", Ke.textBaseline = "middle",
5214 Ke.textAlign = "center", Ke.fillText("x", Mt.x / o.mapScale * Ne.width,
5215 Mt.y / o.mapScale * Ne.height))
5216 }
5217 }(P), -1 !== re.id && Fn(re.startX, re.startY, re.currentX, re.currentY), -
5218 1 !== se.id && Fn(se.startX, se.startY, se.currentX, se.currentY)
5219 }(), requestAnimFrame(e)
5220 }(), window.openLink = Oi, window.aJoinReq = Dt, window.follmoo = function() {
5221 H || (H = !0, I("moofoll", 1))
5222 }, window.kickFromClan = Lt, window.sendJoin = Ft, window.leaveAlliance =
5223 Ht, window.createAlliance = zt, window.storeBuy = Kt, window.storeEquip =
5224 Jt, window.showItemInfo = Tt, window.selectSkinColor = function(e) {
5225 ae = e, en()
5226 }, window.changeStoreIndex = function(e) {
5227 Xt != e && (Xt = e, Gt())
5228 }, window.config = o
5229}, function(e, t) {
5230 ! function(e, t, n) {
5231 function i(e, t) {
5232 return typeof e === t
5233 }
5234 var r = [],
5235 s = [],
5236 a = {
5237 _version: "3.5.0",
5238 _config: {
5239 classPrefix: "",
5240 enableClasses: !0,
5241 enableJSClass: !0,
5242 usePrefixes: !0
5243 },
5244 _q: [],
5245 on: function(e, t) {
5246 var n = this;
5247 setTimeout((function() {
5248 t(n[e])
5249 }), 0)
5250 },
5251 addTest: function(e, t, n) {
5252 s.push({
5253 name: e,
5254 fn: t,
5255 options: n
5256 })
5257 },
5258 addAsyncTest: function(e) {
5259 s.push({
5260 name: null,
5261 fn: e
5262 })
5263 }
5264 },
5265 o = function() {};
5266 o.prototype = a, o = new o;
5267 var c = t.documentElement,
5268 l = "svg" === c.nodeName.toLowerCase();
5269 o.addTest("passiveeventlisteners", (function() {
5270 var t = !1;
5271 try {
5272 var n = Object.defineProperty({}, "passive", {
5273 get: function() {
5274 t = !0
5275 }
5276 });
5277 e.addEventListener("test", null, n)
5278 } catch (e) {}
5279 return t
5280 })),
5281 function() {
5282 var e, t, n, a, c, l;
5283 for (var h in s)
5284 if (s.hasOwnProperty(h)) {
5285 if (e = [], (t = s[h]).name && (e.push(t.name.toLowerCase()), t.options &&
5286 t.options.aliases && t.options.aliases.length))
5287 for (n = 0; n < t.options.aliases.length; n++) e.push(t.options.aliases[
5288 n].toLowerCase());
5289 for (a = i(t.fn, "function") ? t.fn() : t.fn, c = 0; c < e.length; c++)
5290 1 === (l = e[c].split(".")).length ? o[l[0]] = a : (!o[l[0]] || o[l[0]] instanceof Boolean ||
5291 (o[l[0]] = new Boolean(o[l[0]])), o[l[0]][l[1]] = a), r.push((a ? "" :
5292 "no-") + l.join("-"))
5293 }
5294 }(),
5295 function(e) {
5296 var t = c.className,
5297 n = o._config.classPrefix || "";
5298 if (l && (t = t.baseVal), o._config.enableJSClass) {
5299 var i = new RegExp("(^|\\s)" + n + "no-js(\\s|$)");
5300 t = t.replace(i, "$1" + n + "js$2")
5301 }
5302 o._config.enableClasses && (t += " " + n + e.join(" " + n), l ? c.className
5303 .baseVal = t : c.className = t)
5304 }(r), delete a.addTest, delete a.addAsyncTest;
5305 for (var h = 0; h < o._q.length; h++) o._q[h]();
5306 e.Modernizr = o
5307 }(window, document)
5308}, function(e, t, n) {
5309 var i = n(24);
5310 n(19), e.exports = {
5311 socket: null,
5312 connected: !1,
5313 socketId: -1,
5314 connect: function(e, t, n) {
5315 if (!this.socket) {
5316 var r = this;
5317 try {
5318 var s = !1,
5319 a = e;
5320 this.socket = new WebSocket(a), this.socket.binaryType = "arraybuffer",
5321 this.socket.onmessage = function(e) {
5322 var t = new Uint8Array(e.data),
5323 s = i.decode(t),
5324 a = s[0];
5325 t = s[1], "io-init" == a ? r.socketId = t[0] : n[a].apply(void 0, t)
5326 }, this.socket.onopen = function() {
5327 r.connected = !0, t()
5328 }, this.socket.onclose = function(e) {
5329 r.connected = !1, 4001 == e.code ? t("Invalid Connection") : s || t(
5330 "disconnected")
5331 }, this.socket.onerror = function(e) {
5332 this.socket && this.socket.readyState != WebSocket.OPEN && (s = !0,
5333 console.error("Socket error", arguments), t("Socket error"))
5334 }
5335 } catch (e) {
5336 console.warn("Socket connection error:", e), t(e)
5337 }
5338 }
5339 },
5340 send: function(e) {
5341 var t = Array.prototype.slice.call(arguments, 1),
5342 n = i.encode([e, t]);
5343 this.socket.send(n)
5344 },
5345 socketReady: function() {
5346 return this.socket && this.connected
5347 },
5348 close: function() {
5349 this.socket && this.socket.close()
5350 }
5351 }
5352}, function(e, t, n) {
5353 t.encode = n(9).encode, t.decode = n(15).decode, t.Encoder = n(37).Encoder,
5354 t.Decoder = n(38).Decoder, t.createCodec = n(39).createCodec, t.codec = n(
5355 40).codec
5356}, function(e, t, n) {
5357 (function(t) {
5358 function n(e) {
5359 return e && e.isBuffer && e
5360 }
5361 e.exports = n(void 0 !== t && t) || n(this.Buffer) || n("undefined" !=
5362 typeof window && window.Buffer) || this.Buffer
5363 }).call(this, n(11).Buffer)
5364}, function(e, t, n) {
5365 "use strict";
5366 t.byteLength = function(e) {
5367 var t = l(e),
5368 n = t[0],
5369 i = t[1];
5370 return 3 * (n + i) / 4 - i
5371 }, t.toByteArray = function(e) {
5372 var t, n, i = l(e),
5373 a = i[0],
5374 o = i[1],
5375 c = new s(function(e, t, n) {
5376 return 3 * (t + n) / 4 - n
5377 }(0, a, o)),
5378 h = 0,
5379 u = o > 0 ? a - 4 : a;
5380 for (n = 0; n < u; n += 4) t = r[e.charCodeAt(n)] << 18 | r[e.charCodeAt(n +
5381 1)] << 12 | r[e.charCodeAt(n + 2)] << 6 | r[e.charCodeAt(n + 3)], c[h++] =
5382 t >> 16 & 255, c[h++] = t >> 8 & 255, c[h++] = 255 & t;
5383 return 2 === o && (t = r[e.charCodeAt(n)] << 2 | r[e.charCodeAt(n + 1)] >>
5384 4, c[h++] = 255 & t), 1 === o && (t = r[e.charCodeAt(n)] << 10 | r[e.charCodeAt(
5385 n + 1)] << 4 | r[e.charCodeAt(n + 2)] >> 2, c[h++] = t >> 8 & 255, c[h++] =
5386 255 & t), c
5387 }, t.fromByteArray = function(e) {
5388 for (var t, n = e.length, r = n % 3, s = [], a = 0, o = n - r; a < o; a +=
5389 16383) s.push(u(e, a, a + 16383 > o ? o : a + 16383));
5390 return 1 === r ? (t = e[n - 1], s.push(i[t >> 2] + i[t << 4 & 63] + "==")) :
5391 2 === r && (t = (e[n - 2] << 8) + e[n - 1], s.push(i[t >> 10] + i[t >> 4 &
5392 63] + i[t << 2 & 63] + "=")), s.join("")
5393 };
5394 for (var i = [], r = [], s = "undefined" != typeof Uint8Array ? Uint8Array :
5395 Array, a =
5396 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", o = 0,
5397 c = a.length; o < c; ++o) i[o] = a[o], r[a.charCodeAt(o)] = o;
5398
5399 function l(e) {
5400 var t = e.length;
5401 if (t % 4 > 0) throw new Error(
5402 "Invalid string. Length must be a multiple of 4");
5403 var n = e.indexOf("=");
5404 return -1 === n && (n = t), [n, n === t ? 0 : 4 - n % 4]
5405 }
5406
5407 function h(e) {
5408 return i[e >> 18 & 63] + i[e >> 12 & 63] + i[e >> 6 & 63] + i[63 & e]
5409 }
5410
5411 function u(e, t, n) {
5412 for (var i, r = [], s = t; s < n; s += 3) i = (e[s] << 16 & 16711680) + (e[
5413 s + 1] << 8 & 65280) + (255 & e[s + 2]), r.push(h(i));
5414 return r.join("")
5415 }
5416 r["-".charCodeAt(0)] = 62, r["_".charCodeAt(0)] = 63
5417}, function(e, t) {
5418 var n = {}.toString;
5419 e.exports = Array.isArray || function(e) {
5420 return "[object Array]" == n.call(e)
5421 }
5422}, function(e, t, n) {
5423 var i = n(0);
5424
5425 function r(e) {
5426 return new Array(e)
5427 }(t = e.exports = r(0)).alloc = r, t.concat = i.concat, t.from = function(e) {
5428 if (!i.isBuffer(e) && i.isView(e)) e = i.Uint8Array.from(e);
5429 else if (i.isArrayBuffer(e)) e = new Uint8Array(e);
5430 else {
5431 if ("string" == typeof e) return i.from.call(t, e);
5432 if ("number" == typeof e) throw new TypeError(
5433 '"value" argument must not be a number')
5434 }
5435 return Array.prototype.slice.call(e)
5436 }
5437}, function(e, t, n) {
5438 var i = n(0),
5439 r = i.global;
5440
5441 function s(e) {
5442 return new r(e)
5443 }(t = e.exports = i.hasBuffer ? s(0) : []).alloc = i.hasBuffer && r.alloc ||
5444 s, t.concat = i.concat, t.from = function(e) {
5445 if (!i.isBuffer(e) && i.isView(e)) e = i.Uint8Array.from(e);
5446 else if (i.isArrayBuffer(e)) e = new Uint8Array(e);
5447 else {
5448 if ("string" == typeof e) return i.from.call(t, e);
5449 if ("number" == typeof e) throw new TypeError(
5450 '"value" argument must not be a number')
5451 }
5452 return r.from && 1 !== r.from.length ? r.from(e) : new r(e)
5453 }
5454}, function(e, t, n) {
5455 var i = n(0);
5456
5457 function r(e) {
5458 return new Uint8Array(e)
5459 }(t = e.exports = i.hasArrayBuffer ? r(0) : []).alloc = r, t.concat = i.concat,
5460 t.from = function(e) {
5461 if (i.isView(e)) {
5462 var n = e.byteOffset,
5463 r = e.byteLength;
5464 (e = e.buffer).byteLength !== r && (e.slice ? e = e.slice(n, n + r) : (e =
5465 new Uint8Array(e)).byteLength !== r && (e = Array.prototype.slice.call(
5466 e, n, n + r)))
5467 } else {
5468 if ("string" == typeof e) return i.from.call(t, e);
5469 if ("number" == typeof e) throw new TypeError(
5470 '"value" argument must not be a number')
5471 }
5472 return new Uint8Array(e)
5473 }
5474}, function(e, t) {
5475 t.copy = function(e, t, n, i) {
5476 var r;
5477 n || (n = 0), i || 0 === i || (i = this.length), t || (t = 0);
5478 var s = i - n;
5479 if (e === this && n < t && t < i)
5480 for (r = s - 1; r >= 0; r--) e[r + t] = this[r + n];
5481 else
5482 for (r = 0; r < s; r++) e[r + t] = this[r + n];
5483 return s
5484 }, t.toString = function(e, t, n) {
5485 var i = 0 | t;
5486 n || (n = this.length);
5487 for (var r = "", s = 0; i < n;)(s = this[i++]) < 128 ? r += String.fromCharCode(
5488 s) : (192 == (224 & s) ? s = (31 & s) << 6 | 63 & this[i++] : 224 == (
5489 240 & s) ? s = (15 & s) << 12 | (63 & this[i++]) << 6 | 63 & this[i++] :
5490 240 == (248 & s) && (s = (7 & s) << 18 | (63 & this[i++]) << 12 | (63 &
5491 this[i++]) << 6 | 63 & this[i++]), s >= 65536 ? (s -= 65536, r +=
5492 String.fromCharCode(55296 + (s >>> 10), 56320 + (1023 & s))) : r +=
5493 String.fromCharCode(s));
5494 return r
5495 }, t.write = function(e, t) {
5496 for (var n = t || (t |= 0), i = e.length, r = 0, s = 0; s < i;)(r = e.charCodeAt(
5497 s++)) < 128 ? this[n++] = r : r < 2048 ? (this[n++] = 192 | r >>> 6,
5498 this[n++] = 128 | 63 & r) : r < 55296 || r > 57343 ? (this[n++] = 224 |
5499 r >>> 12, this[n++] = 128 | r >>> 6 & 63, this[n++] = 128 | 63 & r) : (r =
5500 65536 + (r - 55296 << 10 | e.charCodeAt(s++) - 56320), this[n++] = 240 |
5501 r >>> 18, this[n++] = 128 | r >>> 12 & 63, this[n++] = 128 | r >>> 6 &
5502 63, this[n++] = 128 | 63 & r);
5503 return n - t
5504 }
5505}, function(e, t, n) {
5506 t.setExtPackers = function(e) {
5507 e.addExtPacker(14, Error, [u, c]), e.addExtPacker(1, EvalError, [u, c]), e
5508 .addExtPacker(2, RangeError, [u, c]), e.addExtPacker(3, ReferenceError, [
5509 u, c
5510 ]), e.addExtPacker(4, SyntaxError, [u, c]), e.addExtPacker(5, TypeError, [
5511 u, c
5512 ]), e.addExtPacker(6, URIError, [u, c]), e.addExtPacker(10, RegExp, [h, c]),
5513 e.addExtPacker(11, Boolean, [l, c]), e.addExtPacker(12, String, [l, c]),
5514 e.addExtPacker(13, Date, [Number, c]), e.addExtPacker(15, Number, [l, c]),
5515 "undefined" != typeof Uint8Array && (e.addExtPacker(17, Int8Array, a), e.addExtPacker(
5516 18, Uint8Array, a), e.addExtPacker(19, Int16Array, a), e.addExtPacker(
5517 20, Uint16Array, a), e.addExtPacker(21, Int32Array, a), e.addExtPacker(
5518 22, Uint32Array, a), e.addExtPacker(23, Float32Array, a), "undefined" !=
5519 typeof Float64Array && e.addExtPacker(24, Float64Array, a), "undefined" !=
5520 typeof Uint8ClampedArray && e.addExtPacker(25, Uint8ClampedArray, a), e.addExtPacker(
5521 26, ArrayBuffer, a), e.addExtPacker(29, DataView, a)), r.hasBuffer && e
5522 .addExtPacker(27, s, r.from)
5523 };
5524 var i, r = n(0),
5525 s = r.global,
5526 a = r.Uint8Array.from,
5527 o = {
5528 name: 1,
5529 message: 1,
5530 stack: 1,
5531 columnNumber: 1,
5532 fileName: 1,
5533 lineNumber: 1
5534 };
5535
5536 function c(e) {
5537 return i || (i = n(9).encode), i(e)
5538 }
5539
5540 function l(e) {
5541 return e.valueOf()
5542 }
5543
5544 function h(e) {
5545 (e = RegExp.prototype.toString.call(e).split("/")).shift();
5546 var t = [e.pop()];
5547 return t.unshift(e.join("/")), t
5548 }
5549
5550 function u(e) {
5551 var t = {};
5552 for (var n in o) t[n] = e[n];
5553 return t
5554 }
5555}, function(e, t, n) {
5556 var i = n(5),
5557 r = n(7),
5558 s = r.Uint64BE,
5559 a = r.Int64BE,
5560 o = n(0),
5561 c = n(6),
5562 l = n(34),
5563 h = n(13).uint8,
5564 u = n(3).ExtBuffer,
5565 f = "undefined" != typeof Uint8Array,
5566 d = "undefined" != typeof Map,
5567 p = [];
5568 p[1] = 212, p[2] = 213, p[4] = 214, p[8] = 215, p[16] = 216, t.getWriteType =
5569 function(e) {
5570 var t = l.getWriteToken(e),
5571 n = e && e.useraw,
5572 r = f && e && e.binarraybuffer,
5573 g = r ? o.isArrayBuffer : o.isBuffer,
5574 m = r ? function(e, t) {
5575 w(e, new Uint8Array(t))
5576 } : w,
5577 y = d && e && e.usemap ? function(e, n) {
5578 if (!(n instanceof Map)) return b(e, n);
5579 var i = n.size;
5580 t[i < 16 ? 128 + i : i <= 65535 ? 222 : 223](e, i);
5581 var r = e.codec.encode;
5582 n.forEach((function(t, n, i) {
5583 r(e, n), r(e, t)
5584 }))
5585 } : b;
5586 return {
5587 boolean: function(e, n) {
5588 t[n ? 195 : 194](e, n)
5589 },
5590 function: v,
5591 number: function(e, n) {
5592 var i = 0 | n;
5593 n === i ? t[-32 <= i && i <= 127 ? 255 & i : 0 <= i ? i <= 255 ? 204 :
5594 i <= 65535 ? 205 : 206 : -128 <= i ? 208 : -32768 <= i ? 209 : 210](e,
5595 i) : t[203](e, n)
5596 },
5597 object: n ? function(e, n) {
5598 if (g(n)) return function(e, n) {
5599 var i = n.length;
5600 t[i < 32 ? 160 + i : i <= 65535 ? 218 : 219](e, i), e.send(n)
5601 }(e, n);
5602 k(e, n)
5603 } : k,
5604 string: function(e) {
5605 return function(n, i) {
5606 var r = i.length,
5607 s = 5 + 3 * r;
5608 n.offset = n.reserve(s);
5609 var a = n.buffer,
5610 o = e(r),
5611 l = n.offset + o;
5612 r = c.write.call(a, i, l);
5613 var h = e(r);
5614 if (o !== h) {
5615 var u = l + h - o,
5616 f = l + r;
5617 c.copy.call(a, a, u, l, f)
5618 }
5619 t[1 === h ? 160 + r : h <= 3 ? 215 + h : 219](n, r), n.offset += r
5620 }
5621 }(n ? function(e) {
5622 return e < 32 ? 1 : e <= 65535 ? 3 : 5
5623 } : function(e) {
5624 return e < 32 ? 1 : e <= 255 ? 2 : e <= 65535 ? 3 : 5
5625 }),
5626 symbol: v,
5627 undefined: v
5628 };
5629
5630 function k(e, n) {
5631 if (null === n) return v(e, n);
5632 if (g(n)) return m(e, n);
5633 if (i(n)) return function(e, n) {
5634 var i = n.length;
5635 t[i < 16 ? 144 + i : i <= 65535 ? 220 : 221](e, i);
5636 for (var r = e.codec.encode, s = 0; s < i; s++) r(e, n[s])
5637 }(e, n);
5638 if (s.isUint64BE(n)) return function(e, n) {
5639 t[207](e, n.toArray())
5640 }(e, n);
5641 if (a.isInt64BE(n)) return function(e, n) {
5642 t[211](e, n.toArray())
5643 }(e, n);
5644 var r = e.codec.getExtPacker(n);
5645 if (r && (n = r(n)), n instanceof u) return function(e, n) {
5646 var i = n.buffer,
5647 r = i.length,
5648 s = p[r] || (r < 255 ? 199 : r <= 65535 ? 200 : 201);
5649 t[s](e, r), h[n.type](e), e.send(i)
5650 }(e, n);
5651 y(e, n)
5652 }
5653
5654 function v(e, n) {
5655 t[192](e, n)
5656 }
5657
5658 function w(e, n) {
5659 var i = n.length;
5660 t[i < 255 ? 196 : i <= 65535 ? 197 : 198](e, i), e.send(n)
5661 }
5662
5663 function b(e, n) {
5664 var i = Object.keys(n),
5665 r = i.length;
5666 t[r < 16 ? 128 + r : r <= 65535 ? 222 : 223](e, r);
5667 var s = e.codec.encode;
5668 i.forEach((function(t) {
5669 s(e, t), s(e, n[t])
5670 }))
5671 }
5672 }
5673}, function(e, t, n) {
5674 var i = n(4),
5675 r = n(7),
5676 s = r.Uint64BE,
5677 a = r.Int64BE,
5678 o = n(13).uint8,
5679 c = n(0),
5680 l = c.global,
5681 h = c.hasBuffer && "TYPED_ARRAY_SUPPORT" in l && !l.TYPED_ARRAY_SUPPORT,
5682 u = c.hasBuffer && l.prototype || {};
5683
5684 function f() {
5685 var e = o.slice();
5686 return e[196] = d(196), e[197] = p(197), e[198] = g(198), e[199] = d(199),
5687 e[200] = p(200), e[201] = g(201), e[202] = m(202, 4, u.writeFloatBE || v, !
5688 0), e[203] = m(203, 8, u.writeDoubleBE || w, !0), e[204] = d(204), e[205] =
5689 p(205), e[206] = g(206), e[207] = m(207, 8, y), e[208] = d(208), e[209] =
5690 p(209), e[210] = g(210), e[211] = m(211, 8, k), e[217] = d(217), e[218] =
5691 p(218), e[219] = g(219), e[220] = p(220), e[221] = g(221), e[222] = p(222),
5692 e[223] = g(223), e
5693 }
5694
5695 function d(e) {
5696 return function(t, n) {
5697 var i = t.reserve(2),
5698 r = t.buffer;
5699 r[i++] = e, r[i] = n
5700 }
5701 }
5702
5703 function p(e) {
5704 return function(t, n) {
5705 var i = t.reserve(3),
5706 r = t.buffer;
5707 r[i++] = e, r[i++] = n >>> 8, r[i] = n
5708 }
5709 }
5710
5711 function g(e) {
5712 return function(t, n) {
5713 var i = t.reserve(5),
5714 r = t.buffer;
5715 r[i++] = e, r[i++] = n >>> 24, r[i++] = n >>> 16, r[i++] = n >>> 8, r[i] =
5716 n
5717 }
5718 }
5719
5720 function m(e, t, n, i) {
5721 return function(r, s) {
5722 var a = r.reserve(t + 1);
5723 r.buffer[a++] = e, n.call(r.buffer, s, a, i)
5724 }
5725 }
5726
5727 function y(e, t) {
5728 new s(this, t, e)
5729 }
5730
5731 function k(e, t) {
5732 new a(this, t, e)
5733 }
5734
5735 function v(e, t) {
5736 i.write(this, e, t, !1, 23, 4)
5737 }
5738
5739 function w(e, t) {
5740 i.write(this, e, t, !1, 52, 8)
5741 }
5742 t.getWriteToken = function(e) {
5743 return e && e.uint8array ? function() {
5744 var e = f();
5745 return e[202] = m(202, 4, v), e[203] = m(203, 8, w), e
5746 }() : h || c.hasBuffer && e && e.safe ? function() {
5747 var e = o.slice();
5748 return e[196] = m(196, 1, l.prototype.writeUInt8), e[197] = m(197, 2, l.prototype
5749 .writeUInt16BE), e[198] = m(198, 4, l.prototype.writeUInt32BE), e[199] =
5750 m(199, 1, l.prototype.writeUInt8), e[200] = m(200, 2, l.prototype.writeUInt16BE),
5751 e[201] = m(201, 4, l.prototype.writeUInt32BE), e[202] = m(202, 4, l.prototype
5752 .writeFloatBE), e[203] = m(203, 8, l.prototype.writeDoubleBE), e[204] =
5753 m(204, 1, l.prototype.writeUInt8), e[205] = m(205, 2, l.prototype.writeUInt16BE),
5754 e[206] = m(206, 4, l.prototype.writeUInt32BE), e[207] = m(207, 8, y), e[
5755 208] = m(208, 1, l.prototype.writeInt8), e[209] = m(209, 2, l.prototype
5756 .writeInt16BE), e[210] = m(210, 4, l.prototype.writeInt32BE), e[211] =
5757 m(211, 8, k), e[217] = m(217, 1, l.prototype.writeUInt8), e[218] = m(
5758 218, 2, l.prototype.writeUInt16BE), e[219] = m(219, 4, l.prototype.writeUInt32BE),
5759 e[220] = m(220, 2, l.prototype.writeUInt16BE), e[221] = m(221, 4, l.prototype
5760 .writeUInt32BE), e[222] = m(222, 2, l.prototype.writeUInt16BE), e[223] =
5761 m(223, 4, l.prototype.writeUInt32BE), e
5762 }() : f()
5763 }
5764}, function(e, t, n) {
5765 t.setExtUnpackers = function(e) {
5766 e.addExtUnpacker(14, [o, l(Error)]), e.addExtUnpacker(1, [o, l(EvalError)]),
5767 e.addExtUnpacker(2, [o, l(RangeError)]), e.addExtUnpacker(3, [o, l(
5768 ReferenceError)]), e.addExtUnpacker(4, [o, l(SyntaxError)]), e.addExtUnpacker(
5769 5, [o, l(TypeError)]), e.addExtUnpacker(6, [o, l(URIError)]), e.addExtUnpacker(
5770 10, [o, c]), e.addExtUnpacker(11, [o, h(Boolean)]), e.addExtUnpacker(12, [
5771 o, h(String)
5772 ]), e.addExtUnpacker(13, [o, h(Date)]), e.addExtUnpacker(15, [o, h(Number)]),
5773 "undefined" != typeof Uint8Array && (e.addExtUnpacker(17, h(Int8Array)),
5774 e.addExtUnpacker(18, h(Uint8Array)), e.addExtUnpacker(19, [u, h(
5775 Int16Array)]), e.addExtUnpacker(20, [u, h(Uint16Array)]), e.addExtUnpacker(
5776 21, [u, h(Int32Array)]), e.addExtUnpacker(22, [u, h(Uint32Array)]), e.addExtUnpacker(
5777 23, [u, h(Float32Array)]), "undefined" != typeof Float64Array && e.addExtUnpacker(
5778 24, [u, h(Float64Array)]), "undefined" != typeof Uint8ClampedArray && e
5779 .addExtUnpacker(25, h(Uint8ClampedArray)), e.addExtUnpacker(26, u), e.addExtUnpacker(
5780 29, [u, h(DataView)])), r.hasBuffer && e.addExtUnpacker(27, h(s))
5781 };
5782 var i, r = n(0),
5783 s = r.global,
5784 a = {
5785 name: 1,
5786 message: 1,
5787 stack: 1,
5788 columnNumber: 1,
5789 fileName: 1,
5790 lineNumber: 1
5791 };
5792
5793 function o(e) {
5794 return i || (i = n(15).decode), i(e)
5795 }
5796
5797 function c(e) {
5798 return RegExp.apply(null, e)
5799 }
5800
5801 function l(e) {
5802 return function(t) {
5803 var n = new e;
5804 for (var i in a) n[i] = t[i];
5805 return n
5806 }
5807 }
5808
5809 function h(e) {
5810 return function(t) {
5811 return new e(t)
5812 }
5813 }
5814
5815 function u(e) {
5816 return new Uint8Array(e).buffer
5817 }
5818}, function(e, t, n) {
5819 var i = n(17);
5820
5821 function r(e) {
5822 var t, n = new Array(256);
5823 for (t = 0; t <= 127; t++) n[t] = s(t);
5824 for (t = 128; t <= 143; t++) n[t] = o(t - 128, e.map);
5825 for (t = 144; t <= 159; t++) n[t] = o(t - 144, e.array);
5826 for (t = 160; t <= 191; t++) n[t] = o(t - 160, e.str);
5827 for (n[192] = s(null), n[193] = null, n[194] = s(!1), n[195] = s(!0), n[196] =
5828 a(e.uint8, e.bin), n[197] = a(e.uint16, e.bin), n[198] = a(e.uint32, e.bin),
5829 n[199] = a(e.uint8, e.ext), n[200] = a(e.uint16, e.ext), n[201] = a(e.uint32,
5830 e.ext), n[202] = e.float32, n[203] = e.float64, n[204] = e.uint8, n[205] =
5831 e.uint16, n[206] = e.uint32, n[207] = e.uint64, n[208] = e.int8, n[209] =
5832 e.int16, n[210] = e.int32, n[211] = e.int64, n[212] = o(1, e.ext), n[213] =
5833 o(2, e.ext), n[214] = o(4, e.ext), n[215] = o(8, e.ext), n[216] = o(16, e.ext),
5834 n[217] = a(e.uint8, e.str), n[218] = a(e.uint16, e.str), n[219] = a(e.uint32,
5835 e.str), n[220] = a(e.uint16, e.array), n[221] = a(e.uint32, e.array), n[
5836 222] = a(e.uint16, e.map), n[223] = a(e.uint32, e.map), t = 224; t <= 255; t++
5837 ) n[t] = s(t - 256);
5838 return n
5839 }
5840
5841 function s(e) {
5842 return function() {
5843 return e
5844 }
5845 }
5846
5847 function a(e, t) {
5848 return function(n) {
5849 var i = e(n);
5850 return t(n, i)
5851 }
5852 }
5853
5854 function o(e, t) {
5855 return function(n) {
5856 return t(n, e)
5857 }
5858 }
5859 t.getReadToken = function(e) {
5860 var t = i.getReadFormat(e);
5861 return e && e.useraw ? function(e) {
5862 var t, n = r(e).slice();
5863 for (n[217] = n[196], n[218] = n[197], n[219] = n[198], t = 160; t <=
5864 191; t++) n[t] = o(t - 160, e.bin);
5865 return n
5866 }(t) : r(t)
5867 }
5868}, function(e, t, n) {
5869 t.Encoder = s;
5870 var i = n(18),
5871 r = n(10).EncodeBuffer;
5872
5873 function s(e) {
5874 if (!(this instanceof s)) return new s(e);
5875 r.call(this, e)
5876 }
5877 s.prototype = new r, i.mixin(s.prototype), s.prototype.encode = function(e) {
5878 this.write(e), this.emit("data", this.read())
5879 }, s.prototype.end = function(e) {
5880 arguments.length && this.encode(e), this.flush(), this.emit("end")
5881 }
5882}, function(e, t, n) {
5883 t.Decoder = s;
5884 var i = n(18),
5885 r = n(16).DecodeBuffer;
5886
5887 function s(e) {
5888 if (!(this instanceof s)) return new s(e);
5889 r.call(this, e)
5890 }
5891 s.prototype = new r, i.mixin(s.prototype), s.prototype.decode = function(e) {
5892 arguments.length && this.write(e), this.flush()
5893 }, s.prototype.push = function(e) {
5894 this.emit("data", e)
5895 }, s.prototype.end = function(e) {
5896 this.decode(e), this.emit("end")
5897 }
5898}, function(e, t, n) {
5899 n(8), n(2), t.createCodec = n(1).createCodec
5900}, function(e, t, n) {
5901 n(8), n(2), t.codec = {
5902 preset: n(1).preset
5903 }
5904}, function(e, t) {
5905 var n, i, r = e.exports = {};
5906
5907 function s() {
5908 throw new Error("setTimeout has not been defined")
5909 }
5910
5911 function a() {
5912 throw new Error("clearTimeout has not been defined")
5913 }
5914
5915 function o(e) {
5916 if (n === setTimeout) return setTimeout(e, 0);
5917 if ((n === s || !n) && setTimeout) return n = setTimeout, setTimeout(e, 0);
5918 try {
5919 return n(e, 0)
5920 } catch (t) {
5921 try {
5922 return n.call(null, e, 0)
5923 } catch (t) {
5924 return n.call(this, e, 0)
5925 }
5926 }
5927 }! function() {
5928 try {
5929 n = "function" == typeof setTimeout ? setTimeout : s
5930 } catch (e) {
5931 n = s
5932 }
5933 try {
5934 i = "function" == typeof clearTimeout ? clearTimeout : a
5935 } catch (e) {
5936 i = a
5937 }
5938 }();
5939 var c, l = [],
5940 h = !1,
5941 u = -1;
5942
5943 function f() {
5944 h && c && (h = !1, c.length ? l = c.concat(l) : u = -1, l.length && d())
5945 }
5946
5947 function d() {
5948 if (!h) {
5949 var e = o(f);
5950 h = !0;
5951 for (var t = l.length; t;) {
5952 for (c = l, l = []; ++u < t;) c && c[u].run();
5953 u = -1, t = l.length
5954 }
5955 c = null, h = !1,
5956 function(e) {
5957 if (i === clearTimeout) return clearTimeout(e);
5958 if ((i === a || !i) && clearTimeout) return i = clearTimeout,
5959 clearTimeout(e);
5960 try {
5961 i(e)
5962 } catch (t) {
5963 try {
5964 return i.call(null, e)
5965 } catch (t) {
5966 return i.call(this, e)
5967 }
5968 }
5969 }(e)
5970 }
5971 }
5972
5973 function p(e, t) {
5974 this.fun = e, this.array = t
5975 }
5976
5977 function g() {}
5978 r.nextTick = function(e) {
5979 var t = new Array(arguments.length - 1);
5980 if (arguments.length > 1)
5981 for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
5982 l.push(new p(e, t)), 1 !== l.length || h || o(d)
5983 }, p.prototype.run = function() {
5984 this.fun.apply(null, this.array)
5985 }, r.title = "browser", r.browser = !0, r.env = {}, r.argv = [], r.version =
5986 "", r.versions = {}, r.on = g, r.addListener = g, r.once = g, r.off = g, r.removeListener =
5987 g, r.removeAllListeners = g, r.emit = g, r.prependListener = g, r.prependOnceListener =
5988 g, r.listeners = function(e) {
5989 return []
5990 }, r.binding = function(e) {
5991 throw new Error("process.binding is not supported")
5992 }, r.cwd = function() {
5993 return "/"
5994 }, r.chdir = function(e) {
5995 throw new Error("process.chdir is not supported")
5996 }, r.umask = function() {
5997 return 0
5998 }
5999}, function(e, t) {
6000 var n = Math.abs,
6001 i = (Math.cos, Math.sin, Math.pow, Math.sqrt),
6002 r = (n = Math.abs, Math.atan2),
6003 s = Math.PI;
6004 e.exports.randInt = function(e, t) {
6005 return Math.floor(Math.random() * (t - e + 1)) + e
6006 }, e.exports.randFloat = function(e, t) {
6007 return Math.random() * (t - e + 1) + e
6008 }, e.exports.lerp = function(e, t, n) {
6009 return e + (t - e) * n
6010 }, e.exports.decel = function(e, t) {
6011 return e > 0 ? e = Math.max(0, e - t) : e < 0 && (e = Math.min(0, e + t)),
6012 e
6013 }, e.exports.getDistance = function(e, t, n, r) {
6014 return i((n -= e) * n + (r -= t) * r)
6015 }, e.exports.getDirection = function(e, t, n, i) {
6016 return r(t - i, e - n)
6017 }, e.exports.getAngleDist = function(e, t) {
6018 var i = n(t - e) % (2 * s);
6019 return i > s ? 2 * s - i : i
6020 }, e.exports.isNumber = function(e) {
6021 return "number" == typeof e && !isNaN(e) && isFinite(e)
6022 }, e.exports.isString = function(e) {
6023 return e && "string" == typeof e
6024 }, e.exports.kFormat = function(e) {
6025 return e > 999 ? (e / 1e3).toFixed(1) + "k" : e
6026 }, e.exports.capitalizeFirst = function(e) {
6027 return e.charAt(0).toUpperCase() + e.slice(1)
6028 }, e.exports.fixTo = function(e, t) {
6029 return parseFloat(e.toFixed(t))
6030 }, e.exports.sortByPoints = function(e, t) {
6031 return parseFloat(t.points) - parseFloat(e.points)
6032 }, e.exports.lineInRect = function(e, t, n, i, r, s, a, o) {
6033 var c = r,
6034 l = a;
6035 if (r > a && (c = a, l = r), l > n && (l = n), c < e && (c = e), c > l)
6036 return !1;
6037 var h = s,
6038 u = o,
6039 f = a - r;
6040 if (Math.abs(f) > 1e-7) {
6041 var d = (o - s) / f,
6042 p = s - d * r;
6043 h = d * c + p, u = d * l + p
6044 }
6045 if (h > u) {
6046 var g = u;
6047 u = h, h = g
6048 }
6049 return u > i && (u = i), h < t && (h = t), !(h > u)
6050 }, e.exports.containsPoint = function(e, t, n) {
6051 var i = e.getBoundingClientRect(),
6052 r = i.left + window.scrollX,
6053 s = i.top + window.scrollY,
6054 a = i.width,
6055 o = i.height;
6056 return t > r && t < r + a && n > s && n < s + o
6057 }, e.exports.mousifyTouchEvent = function(e) {
6058 var t = e.changedTouches[0];
6059 e.screenX = t.screenX, e.screenY = t.screenY, e.clientX = t.clientX, e.clientY =
6060 t.clientY, e.pageX = t.pageX, e.pageY = t.pageY
6061 }, e.exports.hookTouchEvents = function(t, n) {
6062 var i = !n,
6063 r = !1;
6064
6065 function s(n) {
6066 e.exports.mousifyTouchEvent(n), window.setUsingTouch(!0), i && (n.preventDefault(),
6067 n.stopPropagation()), r && (t.onclick && t.onclick(n), t.onmouseout &&
6068 t.onmouseout(n), r = !1)
6069 }
6070 t.addEventListener("touchstart", e.exports.checkTrusted((function(n) {
6071 e.exports.mousifyTouchEvent(n), window.setUsingTouch(!0), i && (n.preventDefault(),
6072 n.stopPropagation()), t.onmouseover && t.onmouseover(n), r = !0
6073 })), !1), t.addEventListener("touchmove", e.exports.checkTrusted((
6074 function(n) {
6075 e.exports.mousifyTouchEvent(n), window.setUsingTouch(!0), i && (n.preventDefault(),
6076 n.stopPropagation()), e.exports.containsPoint(t, n.pageX, n.pageY) ?
6077 r || (t.onmouseover && t.onmouseover(n), r = !0) : r && (t.onmouseout &&
6078 t.onmouseout(n), r = !1)
6079 })), !1), t.addEventListener("touchend", e.exports.checkTrusted(s), !1),
6080 t.addEventListener("touchcancel", e.exports.checkTrusted(s), !1), t.addEventListener(
6081 "touchleave", e.exports.checkTrusted(s), !1)
6082 }, e.exports.removeAllChildren = function(e) {
6083 for (; e.hasChildNodes();) e.removeChild(e.lastChild)
6084 }, e.exports.generateElement = function(t) {
6085 var n = document.createElement(t.tag || "div");
6086
6087 function i(e, i) {
6088 t[e] && (n[i] = t[e])
6089 }
6090 for (var r in i("text", "textContent"), i("html", "innerHTML"), i("class",
6091 "className"), t) {
6092 switch (r) {
6093 case "tag":
6094 case "text":
6095 case "html":
6096 case "class":
6097 case "style":
6098 case "hookTouch":
6099 case "parent":
6100 case "children":
6101 continue
6102 }
6103 n[r] = t[r]
6104 }
6105 if (n.onclick && (n.onclick = e.exports.checkTrusted(n.onclick)), n.onmouseover &&
6106 (n.onmouseover = e.exports.checkTrusted(n.onmouseover)), n.onmouseout &&
6107 (n.onmouseout = e.exports.checkTrusted(n.onmouseout)), t.style && (n.style
6108 .cssText = t.style), t.hookTouch && e.exports.hookTouchEvents(n), t.parent &&
6109 t.parent.appendChild(n), t.children)
6110 for (var s = 0; s < t.children.length; s++) n.appendChild(t.children[s]);
6111 return n
6112 }, e.exports.eventIsTrusted = function(e) {
6113 return !e || "boolean" != typeof e.isTrusted || e.isTrusted
6114 }, e.exports.checkTrusted = function(t) {
6115 return function(n) {
6116 n && n instanceof Event && e.exports.eventIsTrusted(n) && t(n)
6117 }
6118 }, e.exports.randomString = function(e) {
6119 for (var t = "", n =
6120 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", i = 0; i <
6121 e; i++) t += n.charAt(Math.floor(Math.random() * n.length));
6122 return t
6123 }, e.exports.countInArray = function(e, t) {
6124 for (var n = 0, i = 0; i < e.length; i++) e[i] === t && n++;
6125 return n
6126 }
6127}, function(e, t) {
6128 e.exports.AnimText = function() {
6129 this.init = function(e, t, n, i, r, s, a) {
6130 this.x = e, this.y = t, this.color = a, this.scale = n, this.startScale =
6131 this.scale, this.maxScale = 1.5 * n, this.scaleSpeed = .7, this.speed =
6132 i, this.life = r, this.text = s
6133 }, this.update = function(e) {
6134 this.life && (this.life -= e, this.y -= this.speed * e, this.scale +=
6135 this.scaleSpeed * e, this.scale >= this.maxScale ? (this.scale = this.maxScale,
6136 this.scaleSpeed *= -1) : this.scale <= this.startScale && (this.scale =
6137 this.startScale, this.scaleSpeed = 0), this.life <= 0 && (this.life =
6138 0))
6139 }, this.render = function(e, t, n) {
6140 e.fillStyle = this.color, e.font = this.scale + "px Hammersmith One", e.fillText(
6141 this.text, this.x - t, this.y - n)
6142 }
6143 }, e.exports.TextManager = function() {
6144 this.texts = [], this.update = function(e, t, n, i) {
6145 t.textBaseline = "middle", t.textAlign = "center";
6146 for (var r = 0; r < this.texts.length; ++r) this.texts[r].life && (this.texts[
6147 r].update(e), this.texts[r].render(t, n, i))
6148 }, this.showText = function(t, n, i, r, s, a, o) {
6149 for (var c, l = 0; l < this.texts.length; ++l)
6150 if (!this.texts[l].life) {
6151 c = this.texts[l];
6152 break
6153 }
6154 c || (c = new e.exports.AnimText, this.texts.push(c)), c.init(t, n, i, r,
6155 s, a, o)
6156 }
6157 }
6158}, function(e, t) {
6159 e.exports = function(e) {
6160 this.sid = e, this.init = function(e, t, n, i, r, s, a) {
6161 s = s || {}, this.sentTo = {}, this.gridLocations = [], this.active = !0,
6162 this.doUpdate = s.doUpdate, this.x = e, this.y = t, this.dir = n, this.xWiggle =
6163 0, this.yWiggle = 0, this.scale = i, this.type = r, this.id = s.id,
6164 this.owner = a, this.name = s.name, this.isItem = null != this.id, this
6165 .group = s.group, this.health = s.health, this.layer = 2, null != this.group ?
6166 this.layer = this.group.layer : 0 == this.type ? this.layer = 3 : 2 ==
6167 this.type ? this.layer = 0 : 4 == this.type && (this.layer = -1), this.colDiv =
6168 s.colDiv || 1, this.blocker = s.blocker, this.ignoreCollision = s.ignoreCollision,
6169 this.dontGather = s.dontGather, this.hideFromEnemy = s.hideFromEnemy,
6170 this.friction = s.friction, this.projDmg = s.projDmg, this.dmg = s.dmg,
6171 this.pDmg = s.pDmg, this.pps = s.pps, this.zIndex = s.zIndex || 0, this
6172 .turnSpeed = s.turnSpeed, this.req = s.req, this.trap = s.trap, this.healCol =
6173 s.healCol, this.teleport = s.teleport, this.boostSpeed = s.boostSpeed,
6174 this.projectile = s.projectile, this.shootRange = s.shootRange, this.shootRate =
6175 s.shootRate, this.shootCount = this.shootRate, this.spawnPoint = s.spawnPoint
6176 }, this.changeHealth = function(e, t) {
6177 return this.health += e, this.health <= 0
6178 }, this.getScale = function(e, t) {
6179 return e = e || 1, this.scale * (this.isItem || 2 == this.type || 3 ==
6180 this.type || 4 == this.type ? 1 : .6 * e) * (t ? 1 : this.colDiv)
6181 }, this.visibleToPlayer = function(e) {
6182 return !this.hideFromEnemy || this.owner && (this.owner == e || this.owner
6183 .team && e.team == this.owner.team)
6184 }, this.update = function(e) {
6185 this.active && (this.xWiggle && (this.xWiggle *= Math.pow(.99, e)), this
6186 .yWiggle && (this.yWiggle *= Math.pow(.99, e)), this.turnSpeed && (
6187 this.dir += this.turnSpeed * e))
6188 }
6189 }
6190}, function(e, t) {
6191 e.exports.groups = [{
6192 id: 0,
6193 name: "food",
6194 layer: 0
6195 }, {
6196 id: 1,
6197 name: "walls",
6198 place: !0,
6199 limit: 30,
6200 layer: 0
6201 }, {
6202 id: 2,
6203 name: "spikes",
6204 place: !0,
6205 limit: 15,
6206 layer: 0
6207 }, {
6208 id: 3,
6209 name: "mill",
6210 place: !0,
6211 limit: 7,
6212 layer: 1
6213 }, {
6214 id: 4,
6215 name: "mine",
6216 place: !0,
6217 limit: 1,
6218 layer: 0
6219 }, {
6220 id: 5,
6221 name: "trap",
6222 place: !0,
6223 limit: 6,
6224 layer: -1
6225 }, {
6226 id: 6,
6227 name: "booster",
6228 place: !0,
6229 limit: 12,
6230 layer: -1
6231 }, {
6232 id: 7,
6233 name: "turret",
6234 place: !0,
6235 limit: 2,
6236 layer: 1
6237 }, {
6238 id: 8,
6239 name: "watchtower",
6240 place: !0,
6241 limit: 12,
6242 layer: 1
6243 }, {
6244 id: 9,
6245 name: "buff",
6246 place: !0,
6247 limit: 4,
6248 layer: -1
6249 }, {
6250 id: 10,
6251 name: "spawn",
6252 place: !0,
6253 limit: 1,
6254 layer: -1
6255 }, {
6256 id: 11,
6257 name: "sapling",
6258 place: !0,
6259 limit: 2,
6260 layer: 0
6261 }, {
6262 id: 12,
6263 name: "blocker",
6264 place: !0,
6265 limit: 3,
6266 layer: -1
6267 }, {
6268 id: 13,
6269 name: "teleporter",
6270 place: !0,
6271 limit: 2,
6272 layer: -1
6273 }], t.projectiles = [{
6274 indx: 0,
6275 layer: 0,
6276 src: "arrow_1",
6277 dmg: 25,
6278 speed: 1.6,
6279 scale: 103,
6280 range: 1e3
6281 }, {
6282 indx: 1,
6283 layer: 1,
6284 dmg: 25,
6285 scale: 20
6286 }, {
6287 indx: 0,
6288 layer: 0,
6289 src: "arrow_1",
6290 dmg: 35,
6291 speed: 2.5,
6292 scale: 103,
6293 range: 1200
6294 }, {
6295 indx: 0,
6296 layer: 0,
6297 src: "arrow_1",
6298 dmg: 30,
6299 speed: 2,
6300 scale: 103,
6301 range: 1200
6302 }, {
6303 indx: 1,
6304 layer: 1,
6305 dmg: 16,
6306 scale: 20
6307 }, {
6308 indx: 0,
6309 layer: 0,
6310 src: "bullet_1",
6311 dmg: 50,
6312 speed: 3.6,
6313 scale: 160,
6314 range: 1400
6315 }], t.weapons = [{
6316 id: 0,
6317 type: 0,
6318 name: "tool hammer",
6319 desc: "nub tool D:",
6320 src: "hammer_1",
6321 length: 140,
6322 width: 140,
6323 xOff: -3,
6324 yOff: 18,
6325 dmg: 25,
6326 range: 65,
6327 gather: 1,
6328 speed: 300
6329 }, {
6330 id: 1,
6331 type: 0,
6332 age: 2,
6333 name: "hand axe",
6334 desc: "gathers resources at a higher rate",
6335 src: "axe_1",
6336 length: 140,
6337 width: 140,
6338 xOff: 3,
6339 yOff: 24,
6340 dmg: 30,
6341 spdMult: 1,
6342 range: 70,
6343 gather: 2,
6344 speed: 400
6345 }, {
6346 id: 2,
6347 type: 0,
6348 age: 8,
6349 name: "great axe",
6350 desc: "deal more damage and gather more resources",
6351 src: "great_axe_1",
6352 length: 140,
6353 width: 140,
6354 xOff: -8,
6355 yOff: 25,
6356 dmg: 35,
6357 spdMult: 1,
6358 range: 75,
6359 gather: 4,
6360 speed: 400
6361 }, {
6362 id: 3,
6363 type: 0,
6364 age: 2,
6365 name: "short sword",
6366 desc: "increased attack power but slower move speed",
6367 src: "sword_1",
6368 iPad: 1.3,
6369 length: 130,
6370 width: 210,
6371 xOff: -8,
6372 yOff: 46,
6373 dmg: 35,
6374 spdMult: .85,
6375 range: 110,
6376 gather: 1,
6377 speed: 300
6378 }, {
6379 id: 4,
6380 type: 0,
6381 age: 8,
6382 name: "katana",
6383 desc: "greater range and damage",
6384 src: "samurai_1",
6385 iPad: 1.3,
6386 length: 130,
6387 width: 210,
6388 xOff: -8,
6389 yOff: 59,
6390 dmg: 40,
6391 spdMult: .8,
6392 range: 118,
6393 gather: 1,
6394 speed: 300
6395 }, {
6396 id: 5,
6397 type: 0,
6398 age: 2,
6399 name: "polearm",
6400 desc: "long range melee weapon",
6401 src: "spear_1",
6402 iPad: 1.3,
6403 length: 130,
6404 width: 210,
6405 xOff: -8,
6406 yOff: 53,
6407 dmg: 45,
6408 knock: .2,
6409 spdMult: .82,
6410 range: 142,
6411 gather: 1,
6412 speed: 700
6413 }, {
6414 id: 6,
6415 type: 0,
6416 age: 2,
6417 name: "bat",
6418 desc: "fast long range melee weapon",
6419 src: "bat_1",
6420 iPad: 1.3,
6421 length: 110,
6422 width: 180,
6423 xOff: -8,
6424 yOff: 53,
6425 dmg: 20,
6426 knock: .7,
6427 range: 110,
6428 gather: 1,
6429 speed: 300
6430 }, {
6431 id: 7,
6432 type: 0,
6433 age: 2,
6434 name: "daggers",
6435 desc: "really fast short range weapon",
6436 src: "dagger_1",
6437 iPad: .8,
6438 length: 110,
6439 width: 110,
6440 xOff: 18,
6441 yOff: 0,
6442 dmg: 20,
6443 knock: .1,
6444 range: 65,
6445 gather: 1,
6446 hitSlow: .1,
6447 spdMult: 1.13,
6448 speed: 100
6449 }, {
6450 id: 8,
6451 type: 0,
6452 age: 2,
6453 name: "stick",
6454 desc: "great for gathering but very weak",
6455 src: "stick_1",
6456 length: 140,
6457 width: 140,
6458 xOff: 3,
6459 yOff: 24,
6460 dmg: 1,
6461 spdMult: 1,
6462 range: 70,
6463 gather: 7,
6464 speed: 400
6465 }, {
6466 id: 9,
6467 type: 1,
6468 age: 6,
6469 name: "hunting bow",
6470 desc: "bow used for ranged combat and hunting",
6471 src: "bow_1",
6472 req: ["wood", 4],
6473 length: 120,
6474 width: 120,
6475 xOff: -6,
6476 yOff: 0,
6477 projectile: 0,
6478 spdMult: .75,
6479 speed: 600
6480 }, {
6481 id: 10,
6482 type: 1,
6483 age: 6,
6484 name: "great hammer",
6485 desc: "hammer used for destroying structures",
6486 src: "great_hammer_1",
6487 length: 140,
6488 width: 140,
6489 xOff: -9,
6490 yOff: 25,
6491 dmg: 10,
6492 spdMult: .88,
6493 range: 75,
6494 sDmg: 7.5,
6495 gather: 1,
6496 speed: 400
6497 }, {
6498 id: 11,
6499 type: 1,
6500 age: 6,
6501 name: "wooden shield",
6502 desc: "blocks projectiles and reduces melee damage",
6503 src: "shield_1",
6504 length: 120,
6505 width: 120,
6506 shield: .2,
6507 xOff: 6,
6508 yOff: 0,
6509 spdMult: .7
6510 }, {
6511 id: 12,
6512 type: 1,
6513 age: 8,
6514 name: "crossbow",
6515 desc: "deals more damage and has greater range",
6516 src: "crossbow_1",
6517 req: ["wood", 5],
6518 aboveHand: !0,
6519 armS: .75,
6520 length: 120,
6521 width: 120,
6522 xOff: -4,
6523 yOff: 0,
6524 projectile: 2,
6525 spdMult: .7,
6526 speed: 700
6527 }, {
6528 id: 13,
6529 type: 1,
6530 age: 9,
6531 name: "repeater crossbow",
6532 desc: "high firerate crossbow with reduced damage",
6533 src: "crossbow_2",
6534 req: ["wood", 10],
6535 aboveHand: !0,
6536 armS: .75,
6537 length: 120,
6538 width: 120,
6539 xOff: -4,
6540 yOff: 0,
6541 projectile: 3,
6542 spdMult: .7,
6543 speed: 230
6544 }, {
6545 id: 14,
6546 type: 1,
6547 age: 6,
6548 name: "mc grabby",
6549 desc: "steals resources from enemies",
6550 src: "grab_1",
6551 length: 130,
6552 width: 210,
6553 xOff: -8,
6554 yOff: 53,
6555 dmg: 0,
6556 steal: 250,
6557 knock: .2,
6558 spdMult: 1.05,
6559 range: 125,
6560 gather: 0,
6561 speed: 700
6562 }, {
6563 id: 15,
6564 type: 1,
6565 age: 9,
6566 name: "musket",
6567 desc: "slow firerate but high damage and range",
6568 src: "musket_1",
6569 req: ["stone", 10],
6570 aboveHand: !0,
6571 rec: .35,
6572 armS: .6,
6573 hndS: .3,
6574 hndD: 1.6,
6575 length: 205,
6576 width: 205,
6577 xOff: 25,
6578 yOff: 0,
6579 projectile: 5,
6580 hideProjectile: !0,
6581 spdMult: .6,
6582 speed: 1500
6583 }], e.exports.list = [{
6584 group: e.exports.groups[0],
6585 name: "apple",
6586 desc: "restores 20 health when consumed",
6587 req: ["food", 10],
6588 consume: function(e) {
6589 return e.changeHealth(20, e)
6590 },
6591 scale: 22,
6592 holdOffset: 15
6593 }, {
6594 age: 3,
6595 group: e.exports.groups[0],
6596 name: "cookie",
6597 desc: "restores 40 health when consumed",
6598 req: ["food", 15],
6599 consume: function(e) {
6600 return e.changeHealth(40, e)
6601 },
6602 scale: 27,
6603 holdOffset: 15
6604 }, {
6605 age: 7,
6606 group: e.exports.groups[0],
6607 name: "cheese",
6608 desc: "restores 30 health and another 50 over 5 seconds",
6609 req: ["food", 25],
6610 consume: function(e) {
6611 return !!(e.changeHealth(30, e) || e.health < 100) && (e.dmgOverTime.dmg = -10, e.dmgOverTime.doer = e, e.dmgOverTime.time = 5, !0)
6612 },
6613 scale: 27,
6614 holdOffset: 15
6615 }, {
6616 group: e.exports.groups[1],
6617 name: "wood wall",
6618 desc: "provides protection for your village",
6619 req: ["wood", 10],
6620 projDmg: !0,
6621 health: 380,
6622 scale: 50,
6623 holdOffset: 20,
6624 placeOffset: -5
6625 }, {
6626 age: 3,
6627 group: e.exports.groups[1],
6628 name: "stone wall",
6629 desc: "provides improved protection for your village",
6630 req: ["stone", 25],
6631 health: 900,
6632 scale: 50,
6633 holdOffset: 20,
6634 placeOffset: -5
6635 }, {
6636 age: 7,
6637 group: e.exports.groups[1],
6638 name: "castle wall",
6639 desc: "provides powerful protection for your village",
6640 req: ["stone", 35],
6641 health: 1500,
6642 scale: 52,
6643 holdOffset: 20,
6644 placeOffset: -5
6645 }, {
6646 group: e.exports.groups[2],
6647 name: "spikes",
6648 desc: "damages enemies when they touch them",
6649 req: ["wood", 20, "stone", 5],
6650 health: 400,
6651 dmg: 20,
6652 scale: 49,
6653 spritePadding: -23,
6654 holdOffset: 8,
6655 placeOffset: -5
6656 }, {
6657 age: 5,
6658 group: e.exports.groups[2],
6659 name: "greater spikes",
6660 desc: "damages enemies when they touch them",
6661 req: ["wood", 30, "stone", 10],
6662 health: 500,
6663 dmg: 35,
6664 scale: 52,
6665 spritePadding: -23,
6666 holdOffset: 8,
6667 placeOffset: -5
6668 }, {
6669 age: 9,
6670 group: e.exports.groups[2],
6671 name: "poison spikes",
6672 desc: "poisons enemies when they touch them",
6673 req: ["wood", 35, "stone", 15],
6674 health: 600,
6675 dmg: 30,
6676 pDmg: 5,
6677 scale: 52,
6678 spritePadding: -23,
6679 holdOffset: 8,
6680 placeOffset: -5
6681 }, {
6682 age: 9,
6683 group: e.exports.groups[2],
6684 name: "spinning spikes",
6685 desc: "damages enemies when they touch them",
6686 req: ["wood", 30, "stone", 20],
6687 health: 500,
6688 dmg: 45,
6689 turnSpeed: .003,
6690 scale: 52,
6691 spritePadding: -23,
6692 holdOffset: 8,
6693 placeOffset: -5
6694 }, {
6695 group: e.exports.groups[3],
6696 name: "windmill",
6697 desc: "generates gold over time",
6698 req: ["wood", 50, "stone", 10],
6699 health: 400,
6700 pps: 1,
6701 turnSpeed: .0016,
6702 spritePadding: 25,
6703 iconLineMult: 12,
6704 scale: 45,
6705 holdOffset: 20,
6706 placeOffset: 5
6707 }, {
6708 age: 5,
6709 group: e.exports.groups[3],
6710 name: "faster windmill",
6711 desc: "generates more gold over time",
6712 req: ["wood", 60, "stone", 20],
6713 health: 500,
6714 pps: 1.5,
6715 turnSpeed: .0025,
6716 spritePadding: 25,
6717 iconLineMult: 12,
6718 scale: 47,
6719 holdOffset: 20,
6720 placeOffset: 5
6721 }, {
6722 age: 8,
6723 group: e.exports.groups[3],
6724 name: "power mill",
6725 desc: "generates more gold over time",
6726 req: ["wood", 100, "stone", 50],
6727 health: 800,
6728 pps: 2,
6729 turnSpeed: .005,
6730 spritePadding: 25,
6731 iconLineMult: 12,
6732 scale: 47,
6733 holdOffset: 20,
6734 placeOffset: 5
6735 }, {
6736 age: 5,
6737 group: e.exports.groups[4],
6738 type: 2,
6739 name: "mine",
6740 desc: "allows you to mine stone",
6741 req: ["wood", 20, "stone", 100],
6742 iconLineMult: 12,
6743 scale: 65,
6744 holdOffset: 20,
6745 placeOffset: 0
6746 }, {
6747 age: 5,
6748 group: e.exports.groups[11],
6749 type: 0,
6750 name: "sapling",
6751 desc: "allows you to farm wood",
6752 req: ["wood", 150],
6753 iconLineMult: 12,
6754 colDiv: .5,
6755 scale: 110,
6756 holdOffset: 50,
6757 placeOffset: -15
6758 }, {
6759 age: 4,
6760 group: e.exports.groups[5],
6761 name: "pit trap",
6762 desc: "pit that traps enemies if they walk over it",
6763 req: ["wood", 10, "stone", 10],
6764 trap: !0,
6765 ignoreCollision: !0,
6766 hideFromEnemy: !0,
6767 health: 500,
6768 colDiv: .2,
6769 scale: 50,
6770 holdOffset: 20,
6771 placeOffset: -5
6772 }, {
6773 age: 4,
6774 group: e.exports.groups[6],
6775 name: "boost pad",
6776 desc: "provides boost when stepped on",
6777 req: ["stone", 20, "wood", 5],
6778 ignoreCollision: !0,
6779 boostSpeed: 1.5,
6780 health: 150,
6781 colDiv: .7,
6782 scale: 45,
6783 holdOffset: 20,
6784 placeOffset: -5
6785 }, {
6786 age: 7,
6787 group: e.exports.groups[7],
6788 doUpdate: !0,
6789 name: "turret",
6790 desc: "defensive structure that shoots at enemies",
6791 req: ["wood", 200, "stone", 150],
6792 health: 800,
6793 projectile: 1,
6794 shootRange: 700,
6795 shootRate: 2200,
6796 scale: 43,
6797 holdOffset: 20,
6798 placeOffset: -5
6799 }, {
6800 age: 7,
6801 group: e.exports.groups[8],
6802 name: "platform",
6803 desc: "platform to shoot over walls and cross over water",
6804 req: ["wood", 20],
6805 ignoreCollision: !0,
6806 zIndex: 1,
6807 health: 300,
6808 scale: 43,
6809 holdOffset: 20,
6810 placeOffset: -5
6811 }, {
6812 age: 7,
6813 group: e.exports.groups[9],
6814 name: "healing pad",
6815 desc: "standing on it will slowly heal you",
6816 req: ["wood", 30, "food", 10],
6817 ignoreCollision: !0,
6818 healCol: 15,
6819 health: 400,
6820 colDiv: .7,
6821 scale: 45,
6822 holdOffset: 20,
6823 placeOffset: -5
6824 }, {
6825 age: 9,
6826 group: e.exports.groups[10],
6827 name: "spawn pad",
6828 desc: "you will spawn here when you die but it will dissapear",
6829 req: ["wood", 100, "stone", 100],
6830 health: 400,
6831 ignoreCollision: !0,
6832 spawnPoint: !0,
6833 scale: 45,
6834 holdOffset: 20,
6835 placeOffset: -5
6836 }, {
6837 age: 7,
6838 group: e.exports.groups[12],
6839 name: "blocker",
6840 desc: "blocks building in radius",
6841 req: ["wood", 30, "stone", 25],
6842 ignoreCollision: !0,
6843 blocker: 300,
6844 health: 400,
6845 colDiv: .7,
6846 scale: 45,
6847 holdOffset: 20,
6848 placeOffset: -5
6849 }, {
6850 age: 7,
6851 group: e.exports.groups[13],
6852 name: "teleporter",
6853 desc: "teleports you to a random point on the map",
6854 req: ["wood", 60, "stone", 60],
6855 ignoreCollision: !0,
6856 teleport: !0,
6857 health: 200,
6858 colDiv: .7,
6859 scale: 45,
6860 holdOffset: 20,
6861 placeOffset: -5
6862 }];
6863 for (var n = 0; n < e.exports.list.length; ++n) e.exports.list[n].id = n, e.exports
6864 .list[n].pre && (e.exports.list[n].pre = n - e.exports.list[n].pre)
6865}, function(e, t) {
6866 e.exports = {}
6867}, function(e, t) {
6868 var n = Math.floor,
6869 i = Math.abs,
6870 r = Math.cos,
6871 s = Math.sin,
6872 a = (Math.pow, Math.sqrt);
6873 e.exports = function(e, t, o, c, l, h) {
6874 var u, f;
6875 this.objects = t, this.grids = {}, this.updateObjects = [];
6876 var d = c.mapScale / c.colGrid;
6877 this.setObjectGrids = function(e) {
6878 for (var t = Math.min(c.mapScale, Math.max(0, e.x)), n = Math.min(c.mapScale,
6879 Math.max(0, e.y)), i = 0; i < c.colGrid; ++i) {
6880 u = i * d;
6881 for (var r = 0; r < c.colGrid; ++r) f = r * d, t + e.scale >= u && t -
6882 e.scale <= u + d && n + e.scale >= f && n - e.scale <= f + d && (this.grids[
6883 i + "_" + r] || (this.grids[i + "_" + r] = []), this.grids[i + "_" +
6884 r].push(e), e.gridLocations.push(i + "_" + r))
6885 }
6886 }, this.removeObjGrid = function(e) {
6887 for (var t, n = 0; n < e.gridLocations.length; ++n)(t = this.grids[e.gridLocations[
6888 n]].indexOf(e)) >= 0 && this.grids[e.gridLocations[n]].splice(t, 1)
6889 }, this.disableObj = function(e) {
6890 if (e.active = !1, h) {
6891 e.owner && e.pps && (e.owner.pps -= e.pps), this.removeObjGrid(e);
6892 var t = this.updateObjects.indexOf(e);
6893 t >= 0 && this.updateObjects.splice(t, 1)
6894 }
6895 }, this.hitObj = function(e, t) {
6896 for (var n = 0; n < l.length; ++n) l[n].active && (e.sentTo[l[n].id] &&
6897 (e.active ? l[n].canSee(e) && h.send(l[n].id, "8", o.fixTo(t, 1), e.sid) :
6898 h.send(l[n].id, "12", e.sid)), e.active || e.owner != l[n] || l[n].changeItemCount(
6899 e.group.id, -1))
6900 };
6901 var p, g, m = [];
6902 this.getGridArrays = function(e, t, i) {
6903 u = n(e / d), f = n(t / d), m.length = 0;
6904 try {
6905 this.grids[u + "_" + f] && m.push(this.grids[u + "_" + f]), e + i >= (u +
6906 1) * d && ((p = this.grids[u + 1 + "_" + f]) && m.push(p), f && t - i <=
6907 f * d ? (p = this.grids[u + 1 + "_" + (f - 1)]) && m.push(p) : t + i >=
6908 (f + 1) * d && (p = this.grids[u + 1 + "_" + (f + 1)]) && m.push(p)),
6909 u && e - i <= u * d && ((p = this.grids[u - 1 + "_" + f]) && m.push(p),
6910 f && t - i <= f * d ? (p = this.grids[u - 1 + "_" + (f - 1)]) && m.push(
6911 p) : t + i >= (f + 1) * d && (p = this.grids[u - 1 + "_" + (f + 1)]) &&
6912 m.push(p)), t + i >= (f + 1) * d && (p = this.grids[u + "_" + (f + 1)]) &&
6913 m.push(p), f && t - i <= f * d && (p = this.grids[u + "_" + (f - 1)]) &&
6914 m.push(p)
6915 } catch (e) {}
6916 return m
6917 }, this.add = function(n, i, r, s, a, o, c, l, u) {
6918 g = null;
6919 for (var f = 0; f < t.length; ++f)
6920 if (t[f].sid == n) {
6921 g = t[f];
6922 break
6923 }
6924 if (!g)
6925 for (f = 0; f < t.length; ++f)
6926 if (!t[f].active) {
6927 g = t[f];
6928 break
6929 }
6930 g || (g = new e(n), t.push(g)), l && (g.sid = n), g.init(i, r, s, a, o,
6931 c, u), h && (this.setObjectGrids(g), g.doUpdate && this.updateObjects.push(
6932 g))
6933 }, this.disableBySid = function(e) {
6934 for (var n = 0; n < t.length; ++n)
6935 if (t[n].sid == e) {
6936 this.disableObj(t[n]);
6937 break
6938 }
6939 }, this.removeAllItems = function(e, n) {
6940 for (var i = 0; i < t.length; ++i) t[i].active && t[i].owner && t[i].owner
6941 .sid == e && this.disableObj(t[i]);
6942 n && n.broadcast("13", e)
6943 }, this.fetchSpawnObj = function(e) {
6944 for (var n = null, i = 0; i < t.length; ++i)
6945 if ((g = t[i]).active && g.owner && g.owner.sid == e && g.spawnPoint) {
6946 n = [g.x, g.y], this.disableObj(g), h.broadcast("12", g.sid), g.owner &&
6947 g.owner.changeItemCount(g.group.id, -1);
6948 break
6949 }
6950 return n
6951 }, this.checkItemLocation = function(e, n, i, r, s, a, l) {
6952 for (var h = 0; h < t.length; ++h) {
6953 var u = t[h].blocker ? t[h].blocker : t[h].getScale(r, t[h].isItem);
6954 if (t[h].active && o.getDistance(e, n, t[h].x, t[h].y) < i + u) return !
6955 1
6956 }
6957 return !(!a && 18 != s && n >= c.mapScale / 2 - c.riverWidth / 2 && n <=
6958 c.mapScale / 2 + c.riverWidth / 2)
6959 }, this.addProjectile = function(e, t, n, i, r) {
6960 for (var s, a = items.projectiles[r], c = 0; c < projectiles.length; ++c)
6961 if (!projectiles[c].active) {
6962 s = projectiles[c];
6963 break
6964 }
6965 s || (s = new Projectile(l, o), projectiles.push(s)), s.init(r, e, t, n,
6966 a.speed, i, a.scale)
6967 }, this.checkCollision = function(e, t, n) {
6968 n = n || 1;
6969 var l = e.x - t.x,
6970 h = e.y - t.y,
6971 u = e.scale + t.scale;
6972 if (i(l) <= u || i(h) <= u) {
6973 u = e.scale + (t.getScale ? t.getScale() : t.scale);
6974 var f = a(l * l + h * h) - u;
6975 if (f <= 0) {
6976 if (t.ignoreCollision) !t.trap || e.noTrap || t.owner == e || t.owner &&
6977 t.owner.team && t.owner.team == e.team ? t.boostSpeed ? (e.xVel += n *
6978 t.boostSpeed * (t.weightM || 1) * r(t.dir), e.yVel += n * t.boostSpeed *
6979 (t.weightM || 1) * s(t.dir)) : t.healCol ? e.healCol = t.healCol : t
6980 .teleport && (e.x = o.randInt(0, c.mapScale), e.y = o.randInt(0, c.mapScale)) :
6981 (e.lockMove = !0, t.hideFromEnemy = !1);
6982 else {
6983 var d = o.getDirection(e.x, e.y, t.x, t.y);
6984 if (o.getDistance(e.x, e.y, t.x, t.y), t.isPlayer ? (f = -1 * f / 2,
6985 e.x += f * r(d), e.y += f * s(d), t.x -= f * r(d), t.y -= f * s(d)) :
6986 (e.x = t.x + u * r(d), e.y = t.y + u * s(d), e.xVel *= .75, e.yVel *=
6987 .75), t.dmg && t.owner != e && (!t.owner || !t.owner.team || t.owner
6988 .team != e.team)) {
6989 e.changeHealth(-t.dmg, t.owner, t);
6990 var p = 1.5 * (t.weightM || 1);
6991 e.xVel += p * r(d), e.yVel += p * s(d), !t.pDmg || e.skin && e.skin.poisonRes ||
6992 (e.dmgOverTime.dmg = t.pDmg, e.dmgOverTime.time = 5, e.dmgOverTime.doer =
6993 t.owner), e.colDmg && t.health && (t.changeHealth(-e.colDmg) &&
6994 this.disableObj(t), this.hitObj(t, o.getDirection(e.x, e.y, t.x, t
6995 .y)))
6996 }
6997 }
6998 return t.zIndex > e.zIndex && (e.zIndex = t.zIndex), !0
6999 }
7000 }
7001 return !1
7002 }
7003 }
7004}, function(e, t, n) {
7005 var i = new(n(49));
7006 i.addWords("jew", "black", "baby", "child", "white", "porn", "pedo", "trump",
7007 "clinton", "hitler", "nazi", "gay", "pride", "sex", "pleasure", "touch",
7008 "poo", "kids", "rape", "white power", "nigga", "nig nog", "doggy",
7009 "rapist", "boner", "nigger", "nigg", "finger", "nogger", "nagger", "nig",
7010 "fag", "gai", "pole", "stripper", "penis", "vagina", "pussy", "nazi",
7011 "hitler", "stalin", "burn", "chamber", "cock", "peen", "dick", "spick",
7012 "nieger", "die", "satan", "n|ig", "nlg", "cunt", "c0ck", "fag", "lick",
7013 "condom", "anal", "shit", "phile", "little", "kids", "free KR", "tiny",
7014 "sidney", "ass", "kill", ".io", "(dot)", "[dot]", "mini", "whiore",
7015 "whore", "faggot", "github", "1337", "666", "satan", "senpa", "discord",
7016 "d1scord", "mistik", ".io", "senpa.io", "sidney", "sid", "senpaio",
7017 "vries", "asa");
7018 var r = Math.abs,
7019 s = Math.cos,
7020 a = Math.sin,
7021 o = Math.pow,
7022 c = Math.sqrt;
7023 e.exports = function(e, t, n, l, h, u, f, d, p, g, m, y, k, v) {
7024 this.id = e, this.sid = t, this.tmpScore = 0, this.team = null, this.skinIndex =
7025 0, this.tailIndex = 0, this.hitTime = 0, this.tails = {};
7026 for (var w = 0; w < m.length; ++w) m[w].price <= 0 && (this.tails[m[w].id] =
7027 1);
7028 for (this.skins = {}, w = 0; w < g.length; ++w) g[w].price <= 0 && (this.skins[
7029 g[w].id] = 1);
7030 this.points = 0, this.dt = 0, this.hidden = !1, this.itemCounts = {}, this
7031 .isPlayer = !0, this.pps = 0, this.moveDir = void 0, this.skinRot = 0,
7032 this.lastPing = 0, this.iconIndex = 0, this.skinColor = 0, this.spawn =
7033 function(e) {
7034 this.active = !0, this.alive = !0, this.lockMove = !1, this.lockDir = !1,
7035 this.minimapCounter = 0, this.chatCountdown = 0, this.shameCount = 0,
7036 this.shameTimer = 0, this.sentTo = {}, this.gathering = 0, this.autoGather =
7037 0, this.animTime = 0, this.animSpeed = 0, this.mouseState = 0, this.buildIndex = -
7038 1, this.weaponIndex = 0, this.dmgOverTime = {}, this.noMovTimer = 0,
7039 this.maxXP = 300, this.XP = 0, this.age = 1, this.kills = 0, this.upgrAge =
7040 2, this.upgradePoints = 0, this.x = 0, this.y = 0, this.zIndex = 0,
7041 this.xVel = 0, this.yVel = 0, this.slowMult = 1, this.dir = 0, this.dirPlus =
7042 0, this.targetDir = 0, this.targetAngle = 0, this.maxHealth = 100, this
7043 .health = this.maxHealth, this.scale = n.playerScale, this.speed = n.playerSpeed,
7044 this.resetMoveDir(), this.resetResources(e), this.items = [0, 3, 6, 10],
7045 this.weapons = [0], this.shootCount = 0, this.weaponXP = [], this.reloads = {}
7046 }, this.resetMoveDir = function() {
7047 this.moveDir = void 0
7048 }, this.resetResources = function(e) {
7049 for (var t = 0; t < n.resourceTypes.length; ++t) this[n.resourceTypes[t]] =
7050 e ? 100 : 0
7051 }, this.addItem = function(e) {
7052 var t = p.list[e];
7053 if (t) {
7054 for (var n = 0; n < this.items.length; ++n)
7055 if (p.list[this.items[n]].group == t.group) return this.buildIndex ==
7056 this.items[n] && (this.buildIndex = e), this.items[n] = e, !0;
7057 return this.items.push(e), !0
7058 }
7059 return !1
7060 }, this.setUserData = function(e) {
7061 if (e) {
7062 this.name = "unknown";
7063 var t = e.name + "",
7064 r = !1,
7065 s = (t = (t = (t = (t = t.slice(0, n.maxNameLength)).replace(
7066 /[^\w:\(\)\/? -]+/gim, " ")).replace(/[^\x00-\x7F]/g, " ")).trim()).toLowerCase()
7067 .replace(/\s/g, "").replace(/1/g, "i").replace(/0/g, "o").replace(/5/g,
7068 "s");
7069 for (var a of i.list)
7070 if (-1 != s.indexOf(a)) {
7071 r = !0;
7072 break
7073 }
7074 t.length > 0 && !r && (this.name = t), this.skinColor = 0, n.skinColors[
7075 e.skin] && (this.skinColor = e.skin)
7076 }
7077 }, this.getData = function() {
7078 return [this.id, this.sid, this.name, l.fixTo(this.x, 2), l.fixTo(this.y,
7079 2), l.fixTo(this.dir, 3), this.health, this.maxHealth, this.scale,
7080 this.skinColor
7081 ]
7082 }, this.setData = function(e) {
7083 this.id = e[0], this.sid = e[1], this.name = e[2], this.x = e[3], this.y =
7084 e[4], this.dir = e[5], this.health = e[6], this.maxHealth = e[7], this.scale =
7085 e[8], this.skinColor = e[9]
7086 };
7087 var b = 0;
7088 this.update = function(e) {
7089 if (this.alive) {
7090 if (this.shameTimer > 0 && (this.shameTimer -= e, this.shameTimer <= 0 &&
7091 (this.shameTimer = 0, this.shameCount = 0)), (b -= e) <= 0) {
7092 var t = (this.skin && this.skin.healthRegen ? this.skin.healthRegen :
7093 0) + (this.tail && this.tail.healthRegen ? this.tail.healthRegen : 0);
7094 t && this.changeHealth(t, this), this.dmgOverTime.dmg && (this.changeHealth(-
7095 this.dmgOverTime.dmg, this.dmgOverTime.doer), this.dmgOverTime.time -=
7096 1, this.dmgOverTime.time <= 0 && (this.dmgOverTime.dmg = 0)), this.healCol &&
7097 this.changeHealth(this.healCol, this), b = 1e3
7098 }
7099 if (this.alive) {
7100 if (this.slowMult < 1 && (this.slowMult += 8e-4 * e, this.slowMult > 1 &&
7101 (this.slowMult = 1)), this.noMovTimer += e, (this.xVel || this.yVel) &&
7102 (this.noMovTimer = 0), this.lockMove) this.xVel = 0, this.yVel = 0;
7103 else {
7104 var i = (this.buildIndex >= 0 ? .5 : 1) * (p.weapons[this.weaponIndex]
7105 .spdMult || 1) * (this.skin && this.skin.spdMult || 1) * (this.tail &&
7106 this.tail.spdMult || 1) * (this.y <= n.snowBiomeTop ? this.skin &&
7107 this.skin.coldM ? 1 : n.snowSpeed : 1) * this.slowMult;
7108 !this.zIndex && this.y >= n.mapScale / 2 - n.riverWidth / 2 && this.y <=
7109 n.mapScale / 2 + n.riverWidth / 2 && (this.skin && this.skin.watrImm ?
7110 (i *= .75, this.xVel += .4 * n.waterCurrent * e) : (i *= .33, this.xVel +=
7111 n.waterCurrent * e));
7112 var r = null != this.moveDir ? s(this.moveDir) : 0,
7113 d = null != this.moveDir ? a(this.moveDir) : 0,
7114 g = c(r * r + d * d);
7115 0 != g && (r /= g, d /= g), r && (this.xVel += r * this.speed * i * e),
7116 d && (this.yVel += d * this.speed * i * e)
7117 }
7118 var m;
7119 this.zIndex = 0, this.lockMove = !1, this.healCol = 0;
7120 for (var y = l.getDistance(0, 0, this.xVel * e, this.yVel * e), k =
7121 Math.min(4, Math.max(1, Math.round(y / 40))), v = 1 / k, w = 0; w <
7122 k; ++w) {
7123 this.xVel && (this.x += this.xVel * e * v), this.yVel && (this.y +=
7124 this.yVel * e * v), m = u.getGridArrays(this.x, this.y, this.scale);
7125 for (var x = 0; x < m.length; ++x)
7126 for (var S = 0; S < m[x].length; ++S) m[x][S].active && u.checkCollision(
7127 this, m[x][S], v)
7128 }
7129 for (w = (I = f.indexOf(this)) + 1; w < f.length; ++w) f[w] != this &&
7130 f[w].alive && u.checkCollision(this, f[w]);
7131 if (this.xVel && (this.xVel *= o(n.playerDecel, e), this.xVel <= .01 &&
7132 this.xVel >= -.01 && (this.xVel = 0)), this.yVel && (this.yVel *= o(
7133 n.playerDecel, e), this.yVel <= .01 && this.yVel >= -.01 && (this.yVel =
7134 0)), this.x - this.scale < 0 ? this.x = this.scale : this.x + this.scale >
7135 n.mapScale && (this.x = n.mapScale - this.scale), this.y - this.scale <
7136 0 ? this.y = this.scale : this.y + this.scale > n.mapScale && (this.y =
7137 n.mapScale - this.scale), this.buildIndex < 0)
7138 if (this.reloads[this.weaponIndex] > 0) this.reloads[this.weaponIndex] -=
7139 e, this.gathering = this.mouseState;
7140 else if (this.gathering || this.autoGather) {
7141 var T = !0;
7142 if (null != p.weapons[this.weaponIndex].gather) this.gather(f);
7143 else if (null != p.weapons[this.weaponIndex].projectile && this.hasRes(
7144 p.weapons[this.weaponIndex], this.skin ? this.skin.projCost : 0)) {
7145 this.useRes(p.weapons[this.weaponIndex], this.skin ? this.skin.projCost :
7146 0), this.noMovTimer = 0;
7147 var I = p.weapons[this.weaponIndex].projectile,
7148 E = 2 * this.scale,
7149 M = this.skin && this.skin.aMlt ? this.skin.aMlt : 1;
7150 p.weapons[this.weaponIndex].rec && (this.xVel -= p.weapons[this.weaponIndex]
7151 .rec * s(this.dir), this.yVel -= p.weapons[this.weaponIndex].rec *
7152 a(this.dir)), h.addProjectile(this.x + E * s(this.dir), this.y + E *
7153 a(this.dir), this.dir, p.projectiles[I].range * M, p.projectiles[I]
7154 .speed * M, I, this, null, this.zIndex)
7155 } else T = !1;
7156 this.gathering = this.mouseState, T && (this.reloads[this.weaponIndex] =
7157 p.weapons[this.weaponIndex].speed * (this.skin && this.skin.atkSpd ||
7158 1))
7159 }
7160 }
7161 }
7162 }, this.addWeaponXP = function(e) {
7163 this.weaponXP[this.weaponIndex] || (this.weaponXP[this.weaponIndex] = 0),
7164 this.weaponXP[this.weaponIndex] += e
7165 }, this.earnXP = function(e) {
7166 this.age < n.maxAge && (this.XP += e, this.XP >= this.maxXP ? (this.age <
7167 n.maxAge ? (this.age++, this.XP = 0, this.maxXP *= 1.2) : this.XP =
7168 this.maxXP, this.upgradePoints++, y.send(this.id, "16", this.upgradePoints,
7169 this.upgrAge), y.send(this.id, "15", this.XP, l.fixTo(this.maxXP, 1),
7170 this.age)) : y.send(this.id, "15", this.XP))
7171 }, this.changeHealth = function(e, t) {
7172 if (e > 0 && this.health >= this.maxHealth) return !1;
7173 e < 0 && this.skin && (e *= this.skin.dmgMult || 1), e < 0 && this.tail &&
7174 (e *= this.tail.dmgMult || 1), e < 0 && (this.hitTime = Date.now()),
7175 this.health += e, this.health > this.maxHealth && (e -= this.health -
7176 this.maxHealth, this.health = this.maxHealth), this.health <= 0 &&
7177 this.kill(t);
7178 for (var n = 0; n < f.length; ++n) this.sentTo[f[n].id] && y.send(f[n].id,
7179 "h", this.sid, Math.round(this.health));
7180 return !t || !t.canSee(this) || t == this && e < 0 || y.send(t.id, "t",
7181 Math.round(this.x), Math.round(this.y), Math.round(-e), 1), !0
7182 }, this.kill = function(e) {
7183 e && e.alive && (e.kills++, e.skin && e.skin.goldSteal ? k(e, Math.round(
7184 this.points / 2)) : k(e, Math.round(100 * this.age * (e.skin && e.skin
7185 .kScrM ? e.skin.kScrM : 1))), y.send(e.id, "9", "kills", e.kills, 1)),
7186 this.alive = !1, y.send(this.id, "11"), v()
7187 }, this.addResource = function(e, t, i) {
7188 !i && t > 0 && this.addWeaponXP(t), 3 == e ? k(this, t, !0) : (this[n.resourceTypes[
7189 e]] += t, y.send(this.id, "9", n.resourceTypes[e], this[n.resourceTypes[
7190 e]], 1))
7191 }, this.changeItemCount = function(e, t) {
7192 this.itemCounts[e] = this.itemCounts[e] || 0, this.itemCounts[e] += t, y
7193 .send(this.id, "14", e, this.itemCounts[e])
7194 }, this.buildItem = function(e) {
7195 var t = this.scale + e.scale + (e.placeOffset || 0),
7196 n = this.x + t * s(this.dir),
7197 i = this.y + t * a(this.dir);
7198 if (this.canBuild(e) && !(e.consume && this.skin && this.skin.noEat) &&
7199 (e.consume || u.checkItemLocation(n, i, e.scale, .6, e.id, !1, this))) {
7200 var r = !1;
7201 if (e.consume) {
7202 if (this.hitTime) {
7203 var o = Date.now() - this.hitTime;
7204 this.hitTime = 0, o <= 120 ? (this.shameCount++, this.shameCount >= 8 &&
7205 (this.shameTimer = 3e4, this.shameCount = 0)) : (this.shameCount -=
7206 2, this.shameCount <= 0 && (this.shameCount = 0))
7207 }
7208 this.shameTimer <= 0 && (r = e.consume(this))
7209 } else r = !0, e.group.limit && this.changeItemCount(e.group.id, 1), e.pps &&
7210 (this.pps += e.pps), u.add(u.objects.length, n, i, this.dir, e.scale,
7211 e.type, e, !1, this);
7212 r && (this.useRes(e), this.buildIndex = -1)
7213 }
7214 }, this.hasRes = function(e, t) {
7215 for (var n = 0; n < e.req.length;) {
7216 if (this[e.req[n]] < Math.round(e.req[n + 1] * (t || 1))) return !1;
7217 n += 2
7218 }
7219 return !0
7220 }, this.useRes = function(e, t) {
7221 if (!n.inSandbox)
7222 for (var i = 0; i < e.req.length;) this.addResource(n.resourceTypes.indexOf(
7223 e.req[i]), -Math.round(e.req[i + 1] * (t || 1))), i += 2
7224 }, this.canBuild = function(e) {
7225 return !!n.inSandbox || !(e.group.limit && this.itemCounts[e.group.id] >=
7226 e.group.limit) && this.hasRes(e)
7227 }, this.gather = function() {
7228 this.noMovTimer = 0, this.slowMult -= p.weapons[this.weaponIndex].hitSlow ||
7229 .3, this.slowMult < 0 && (this.slowMult = 0);
7230 for (var e, t, i, r = n.fetchVariant(this), o = r.poison, c = r.val, h = {},
7231 g = u.getGridArrays(this.x, this.y, p.weapons[this.weaponIndex].range),
7232 m = 0; m < g.length; ++m)
7233 for (var y = 0; y < g[m].length; ++y)
7234 if ((t = g[m][y]).active && !t.dontGather && !h[t.sid] && t.visibleToPlayer(
7235 this) && l.getDistance(this.x, this.y, t.x, t.y) - t.scale <= p.weapons[
7236 this.weaponIndex].range && (e = l.getDirection(t.x, t.y, this.x,
7237 this.y), l.getAngleDist(e, this.dir) <= n.gatherAngle)) {
7238 if (h[t.sid] = 1, t.health) {
7239 if (t.changeHealth(-p.weapons[this.weaponIndex].dmg * c * (p.weapons[
7240 this.weaponIndex].sDmg || 1) * (this.skin && this.skin.bDmg ?
7241 this.skin.bDmg : 1), this)) {
7242 for (var k = 0; k < t.req.length;) this.addResource(n.resourceTypes
7243 .indexOf(t.req[k]), t.req[k + 1]), k += 2;
7244 u.disableObj(t)
7245 }
7246 } else {
7247 this.earnXP(4 * p.weapons[this.weaponIndex].gather);
7248 var v = p.weapons[this.weaponIndex].gather + (3 == t.type ? 4 : 0);
7249 this.skin && this.skin.extraGold && this.addResource(3, 1), this.addResource(
7250 t.type, v)
7251 }
7252 i = !0, u.hitObj(t, e)
7253 }
7254 for (y = 0; y < f.length + d.length; ++y)
7255 if ((t = f[y] || d[y - f.length]) != this && t.alive && (!t.team || t.team !=
7256 this.team) && l.getDistance(this.x, this.y, t.x, t.y) - 1.8 * t.scale <=
7257 p.weapons[this.weaponIndex].range && (e = l.getDirection(t.x, t.y,
7258 this.x, this.y), l.getAngleDist(e, this.dir) <= n.gatherAngle)) {
7259 var w = p.weapons[this.weaponIndex].steal;
7260 w && t.addResource && (w = Math.min(t.points || 0, w), this.addResource(
7261 3, w), t.addResource(3, -w));
7262 var b = c;
7263 null != t.weaponIndex && p.weapons[t.weaponIndex].shield && l.getAngleDist(
7264 e + Math.PI, t.dir) <= n.shieldAngle && (b = p.weapons[t.weaponIndex]
7265 .shield);
7266 var x = p.weapons[this.weaponIndex].dmg * (this.skin && this.skin.dmgMultO ?
7267 this.skin.dmgMultO : 1) * (this.tail && this.tail.dmgMultO ? this.tail
7268 .dmgMultO : 1),
7269 S = .3 * (t.weightM || 1) + (p.weapons[this.weaponIndex].knock || 0);
7270 t.xVel += S * s(e), t.yVel += S * a(e), this.skin && this.skin.healD &&
7271 this.changeHealth(x * b * this.skin.healD, this), this.tail && this.tail
7272 .healD && this.changeHealth(x * b * this.tail.healD, this), t.skin &&
7273 t.skin.dmg && 1 == b && this.changeHealth(-x * t.skin.dmg, t), t.tail &&
7274 t.tail.dmg && 1 == b && this.changeHealth(-x * t.tail.dmg, t), !(t.dmgOverTime &&
7275 this.skin && this.skin.poisonDmg) || t.skin && t.skin.poisonRes || (
7276 t.dmgOverTime.dmg = this.skin.poisonDmg, t.dmgOverTime.time = this.skin
7277 .poisonTime || 1, t.dmgOverTime.doer = this), !t.dmgOverTime || !o ||
7278 t.skin && t.skin.poisonRes || (t.dmgOverTime.dmg = 5, t.dmgOverTime.time =
7279 5, t.dmgOverTime.doer = this), t.skin && t.skin.dmgK && (this.xVel -=
7280 t.skin.dmgK * s(e), this.yVel -= t.skin.dmgK * a(e)), t.changeHealth(-
7281 x * b, this, this)
7282 }
7283 this.sendAnimation(i ? 1 : 0)
7284 }, this.sendAnimation = function(e) {
7285 for (var t = 0; t < f.length; ++t) this.sentTo[f[t].id] && this.canSee(f[
7286 t]) && y.send(f[t].id, "7", this.sid, e ? 1 : 0, this.weaponIndex)
7287 };
7288 var x = 0,
7289 S = 0;
7290 this.animate = function(e) {
7291 this.animTime > 0 && (this.animTime -= e, this.animTime <= 0 ? (this.animTime =
7292 0, this.dirPlus = 0, x = 0, S = 0) : 0 == S ? (x += e / (this.animSpeed *
7293 n.hitReturnRatio), this.dirPlus = l.lerp(0, this.targetAngle, Math.min(
7294 1, x)), x >= 1 && (x = 1, S = 1)) : (x -= e / (this.animSpeed * (1 -
7295 n.hitReturnRatio)), this.dirPlus = l.lerp(0, this.targetAngle, Math.max(
7296 0, x))))
7297 }, this.startAnim = function(e, t) {
7298 this.animTime = this.animSpeed = p.weapons[t].speed, this.targetAngle =
7299 e ? -n.hitAngle : -Math.PI, x = 0, S = 0
7300 }, this.canSee = function(e) {
7301 if (!e) return !1;
7302 if (e.skin && e.skin.invisTimer && e.noMovTimer >= e.skin.invisTimer)
7303 return !1;
7304 var t = r(e.x - this.x) - e.scale,
7305 i = r(e.y - this.y) - e.scale;
7306 return t <= n.maxScreenWidth / 2 * 1.3 && i <= n.maxScreenHeight / 2 *
7307 1.3
7308 }
7309 }
7310}, function(e, t, n) {
7311 const i = n(50).words,
7312 r = n(51).array;
7313 e.exports = class {
7314 constructor(e = {}) {
7315 Object.assign(this, {
7316 list: e.emptyList && [] || Array.prototype.concat.apply(i, [r, e.list || []]),
7317 exclude: e.exclude || [],
7318 placeHolder: e.placeHolder || "*",
7319 regex: e.regex || /[^a-zA-Z0-9|\$|\@]|\^/g,
7320 replaceRegex: e.replaceRegex || /\w/g
7321 })
7322 }
7323 isProfane(e) {
7324 return this.list.filter(t => {
7325 const n = new RegExp(`\\b${t.replace(/(\W)/g,"\\$1")}\\b`, "gi");
7326 return !this.exclude.includes(t.toLowerCase()) && n.test(e)
7327 }).length > 0 || !1
7328 }
7329 replaceWord(e) {
7330 return e.replace(this.regex, "").replace(this.replaceRegex, this.placeHolder)
7331 }
7332 clean(e) {
7333 return e.split(/\b/).map(e => this.isProfane(e) ? this.replaceWord(e) :
7334 e).join("")
7335 }
7336 addWords() {
7337 let e = Array.from(arguments);
7338 this.list.push(...e), e.map(e => e.toLowerCase()).forEach(e => {
7339 this.exclude.includes(e) && this.exclude.splice(this.exclude.indexOf(
7340 e), 1)
7341 })
7342 }
7343 removeWords() {
7344 this.exclude.push(...Array.from(arguments).map(e => e.toLowerCase()))
7345 }
7346 }
7347}, function(e) {
7348 e.exports = {
7349 words: ["ahole", "anus", "ash0le", "ash0les", "asholes", "ass",
7350 "Ass Monkey", "Assface", "assh0le", "assh0lez", "asshole", "assholes",
7351 "assholz", "asswipe", "azzhole", "bassterds", "bastard", "bastards",
7352 "bastardz", "basterds", "basterdz", "Biatch", "bitch", "bitches",
7353 "Blow Job", "boffing", "butthole", "buttwipe", "c0ck", "c0cks", "c0k",
7354 "Carpet Muncher", "cawk", "cawks", "Clit", "cnts", "cntz", "cock",
7355 "cockhead", "cock-head", "cocks", "CockSucker", "cock-sucker", "crap",
7356 "cum", "cunt", "cunts", "cuntz", "dick", "dild0", "dild0s", "dildo",
7357 "dildos", "dilld0", "dilld0s", "dominatricks", "dominatrics",
7358 "dominatrix", "dyke", "enema", "f u c k", "f u c k e r", "fag", "fag1t",
7359 "faget", "fagg1t", "faggit", "faggot", "fagg0t", "fagit", "fags", "fagz",
7360 "faig", "faigs", "fart", "flipping the bird", "fuck", "fucker", "fuckin",
7361 "fucking", "fucks", "Fudge Packer", "fuk", "Fukah", "Fuken", "fuker",
7362 "Fukin", "Fukk", "Fukkah", "Fukken", "Fukker", "Fukkin", "g00k",
7363 "God-damned", "h00r", "h0ar", "h0re", "hells", "hoar", "hoor", "hoore",
7364 "jackoff", "jap", "japs", "jerk-off", "jisim", "jiss", "jizm", "jizz",
7365 "knob", "knobs", "knobz", "kunt", "kunts", "kuntz", "Lezzian",
7366 "Lipshits", "Lipshitz", "masochist", "masokist", "massterbait",
7367 "masstrbait", "masstrbate", "masterbaiter", "masterbate", "masterbates",
7368 "Motha Fucker", "Motha Fuker", "Motha Fukkah", "Motha Fukker",
7369 "Mother Fucker", "Mother Fukah", "Mother Fuker", "Mother Fukkah",
7370 "Mother Fukker", "mother-fucker", "Mutha Fucker", "Mutha Fukah",
7371 "Mutha Fuker", "Mutha Fukkah", "Mutha Fukker", "n1gr", "nastt",
7372 "nigger;", "nigur;", "niiger;", "niigr;", "orafis", "orgasim;", "orgasm",
7373 "orgasum", "oriface", "orifice", "orifiss", "packi", "packie", "packy",
7374 "paki", "pakie", "paky", "pecker", "peeenus", "peeenusss", "peenus",
7375 "peinus", "pen1s", "penas", "penis", "penis-breath", "penus", "penuus",
7376 "Phuc", "Phuck", "Phuk", "Phuker", "Phukker", "polac", "polack", "polak",
7377 "Poonani", "pr1c", "pr1ck", "pr1k", "pusse", "pussee", "pussy", "puuke",
7378 "puuker", "queer", "queers", "queerz", "qweers", "qweerz", "qweir",
7379 "recktum", "rectum", "retard", "sadist", "scank", "schlong", "screwing",
7380 "semen", "sex", "sexy", "Sh!t", "sh1t", "sh1ter", "sh1ts", "sh1tter",
7381 "sh1tz", "shit", "shits", "shitter", "Shitty", "Shity", "shitz", "Shyt",
7382 "Shyte", "Shytty", "Shyty", "skanck", "skank", "skankee", "skankey",
7383 "skanks", "Skanky", "slag", "slut", "sluts", "Slutty", "slutz",
7384 "son-of-a-bitch", "tit", "turd", "va1jina", "vag1na", "vagiina",
7385 "vagina", "vaj1na", "vajina", "vullva", "vulva", "w0p", "wh00r", "wh0re",
7386 "whore", "xrated", "xxx", "b!+ch", "bitch", "blowjob", "clit",
7387 "arschloch", "fuck", "shit", "ass", "asshole", "b!tch", "b17ch", "b1tch",
7388 "bastard", "bi+ch", "boiolas", "buceta", "c0ck", "cawk", "chink", "cipa",
7389 "clits", "cock", "cum", "cunt", "dildo", "dirsa", "ejakulate", "fatass",
7390 "fcuk", "fuk", "fux0r", "hoer", "hore", "jism", "kawk", "l3itch",
7391 "l3i+ch", "lesbian", "masturbate", "masterbat*", "masterbat3",
7392 "motherfucker", "s.o.b.", "mofo", "nazi", "nigga", "nigger", "nutsack",
7393 "phuck", "pimpis", "pusse", "pussy", "scrotum", "sh!t", "shemale",
7394 "shi+", "sh!+", "slut", "smut", "teets", "tits", "boobs", "b00bs",
7395 "teez", "testical", "testicle", "titt", "w00se", "jackoff", "wank",
7396 "whoar", "whore", "*damn", "*dyke", "*fuck*", "*shit*", "@$$", "amcik",
7397 "andskota", "arse*", "assrammer", "ayir", "bi7ch", "bitch*", "bollock*",
7398 "breasts", "butt-pirate", "cabron", "cazzo", "chraa", "chuj", "Cock*",
7399 "cunt*", "d4mn", "daygo", "dego", "dick*", "dike*", "dupa", "dziwka",
7400 "ejackulate", "Ekrem*", "Ekto", "enculer", "faen", "fag*", "fanculo",
7401 "fanny", "feces", "feg", "Felcher", "ficken", "fitt*", "Flikker",
7402 "foreskin", "Fotze", "Fu(*", "fuk*", "futkretzn", "gook", "guiena",
7403 "h0r", "h4x0r", "hell", "helvete", "hoer*", "honkey", "Huevon", "hui",
7404 "injun", "jizz", "kanker*", "kike", "klootzak", "kraut", "knulle", "kuk",
7405 "kuksuger", "Kurac", "kurwa", "kusi*", "kyrpa*", "lesbo", "mamhoon",
7406 "masturbat*", "merd*", "mibun", "monkleigh", "mouliewop", "muie",
7407 "mulkku", "muschi", "nazis", "nepesaurio", "nigger*", "orospu", "paska*",
7408 "perse", "picka", "pierdol*", "pillu*", "pimmel", "piss*", "pizda",
7409 "poontsee", "poop", "porn", "p0rn", "pr0n", "preteen", "pula", "pule",
7410 "puta", "puto", "qahbeh", "queef*", "rautenberg", "schaffer", "scheiss*",
7411 "schlampe", "schmuck", "screw", "sh!t*", "sharmuta", "sharmute",
7412 "shipal", "shiz", "skribz", "skurwysyn", "sphencter", "spic",
7413 "spierdalaj", "splooge", "suka", "b00b*", "testicle*", "titt*", "twat",
7414 "vittu", "wank*", "wetback*", "wichser", "wop*", "yed", "zabourah"
7415 ]
7416 }
7417}, function(e, t, n) {
7418 e.exports = {
7419 object: n(52),
7420 array: n(53),
7421 regex: n(54)
7422 }
7423}, function(e, t) {
7424 e.exports = {
7425 "4r5e": 1,
7426 "5h1t": 1,
7427 "5hit": 1,
7428 a55: 1,
7429 anal: 1,
7430 anus: 1,
7431 ar5e: 1,
7432 arrse: 1,
7433 arse: 1,
7434 ass: 1,
7435 "ass-fucker": 1,
7436 asses: 1,
7437 assfucker: 1,
7438 assfukka: 1,
7439 asshole: 1,
7440 assholes: 1,
7441 asswhole: 1,
7442 a_s_s: 1,
7443 "b!tch": 1,
7444 b00bs: 1,
7445 b17ch: 1,
7446 b1tch: 1,
7447 ballbag: 1,
7448 balls: 1,
7449 ballsack: 1,
7450 bastard: 1,
7451 beastial: 1,
7452 beastiality: 1,
7453 bellend: 1,
7454 bestial: 1,
7455 bestiality: 1,
7456 "bi+ch": 1,
7457 biatch: 1,
7458 bitch: 1,
7459 bitcher: 1,
7460 bitchers: 1,
7461 bitches: 1,
7462 bitchin: 1,
7463 bitching: 1,
7464 bloody: 1,
7465 "blow job": 1,
7466 blowjob: 1,
7467 blowjobs: 1,
7468 boiolas: 1,
7469 bollock: 1,
7470 bollok: 1,
7471 boner: 1,
7472 boob: 1,
7473 boobs: 1,
7474 booobs: 1,
7475 boooobs: 1,
7476 booooobs: 1,
7477 booooooobs: 1,
7478 breasts: 1,
7479 buceta: 1,
7480 bugger: 1,
7481 bum: 1,
7482 "bunny fucker": 1,
7483 butt: 1,
7484 butthole: 1,
7485 buttmuch: 1,
7486 buttplug: 1,
7487 c0ck: 1,
7488 c0cksucker: 1,
7489 "carpet muncher": 1,
7490 cawk: 1,
7491 chink: 1,
7492 cipa: 1,
7493 cl1t: 1,
7494 clit: 1,
7495 clitoris: 1,
7496 clits: 1,
7497 cnut: 1,
7498 cock: 1,
7499 "cock-sucker": 1,
7500 cockface: 1,
7501 cockhead: 1,
7502 cockmunch: 1,
7503 cockmuncher: 1,
7504 cocks: 1,
7505 cocksuck: 1,
7506 cocksucked: 1,
7507 cocksucker: 1,
7508 cocksucking: 1,
7509 cocksucks: 1,
7510 cocksuka: 1,
7511 cocksukka: 1,
7512 cok: 1,
7513 cokmuncher: 1,
7514 coksucka: 1,
7515 coon: 1,
7516 cox: 1,
7517 crap: 1,
7518 cum: 1,
7519 cummer: 1,
7520 cumming: 1,
7521 cums: 1,
7522 cumshot: 1,
7523 cunilingus: 1,
7524 cunillingus: 1,
7525 cunnilingus: 1,
7526 cunt: 1,
7527 cuntlick: 1,
7528 cuntlicker: 1,
7529 cuntlicking: 1,
7530 cunts: 1,
7531 cyalis: 1,
7532 cyberfuc: 1,
7533 cyberfuck: 1,
7534 cyberfucked: 1,
7535 cyberfucker: 1,
7536 cyberfuckers: 1,
7537 cyberfucking: 1,
7538 d1ck: 1,
7539 damn: 1,
7540 dick: 1,
7541 dickhead: 1,
7542 dildo: 1,
7543 dildos: 1,
7544 dink: 1,
7545 dinks: 1,
7546 dirsa: 1,
7547 dlck: 1,
7548 "dog-fucker": 1,
7549 doggin: 1,
7550 dogging: 1,
7551 donkeyribber: 1,
7552 doosh: 1,
7553 duche: 1,
7554 dyke: 1,
7555 ejaculate: 1,
7556 ejaculated: 1,
7557 ejaculates: 1,
7558 ejaculating: 1,
7559 ejaculatings: 1,
7560 ejaculation: 1,
7561 ejakulate: 1,
7562 "f u c k": 1,
7563 "f u c k e r": 1,
7564 f4nny: 1,
7565 fag: 1,
7566 fagging: 1,
7567 faggitt: 1,
7568 faggot: 1,
7569 faggs: 1,
7570 fagot: 1,
7571 fagots: 1,
7572 fags: 1,
7573 fanny: 1,
7574 fannyflaps: 1,
7575 fannyfucker: 1,
7576 fanyy: 1,
7577 fatass: 1,
7578 fcuk: 1,
7579 fcuker: 1,
7580 fcuking: 1,
7581 feck: 1,
7582 fecker: 1,
7583 felching: 1,
7584 fellate: 1,
7585 fellatio: 1,
7586 fingerfuck: 1,
7587 fingerfucked: 1,
7588 fingerfucker: 1,
7589 fingerfuckers: 1,
7590 fingerfucking: 1,
7591 fingerfucks: 1,
7592 fistfuck: 1,
7593 fistfucked: 1,
7594 fistfucker: 1,
7595 fistfuckers: 1,
7596 fistfucking: 1,
7597 fistfuckings: 1,
7598 fistfucks: 1,
7599 flange: 1,
7600 fook: 1,
7601 fooker: 1,
7602 fuck: 1,
7603 fucka: 1,
7604 fucked: 1,
7605 fucker: 1,
7606 fuckers: 1,
7607 fuckhead: 1,
7608 fuckheads: 1,
7609 fuckin: 1,
7610 fucking: 1,
7611 fuckings: 1,
7612 fuckingshitmotherfucker: 1,
7613 fuckme: 1,
7614 fucks: 1,
7615 fuckwhit: 1,
7616 fuckwit: 1,
7617 "fudge packer": 1,
7618 fudgepacker: 1,
7619 fuk: 1,
7620 fuker: 1,
7621 fukker: 1,
7622 fukkin: 1,
7623 fuks: 1,
7624 fukwhit: 1,
7625 fukwit: 1,
7626 fux: 1,
7627 fux0r: 1,
7628 f_u_c_k: 1,
7629 gangbang: 1,
7630 gangbanged: 1,
7631 gangbangs: 1,
7632 gaylord: 1,
7633 gaysex: 1,
7634 goatse: 1,
7635 God: 1,
7636 "god-dam": 1,
7637 "god-damned": 1,
7638 goddamn: 1,
7639 goddamned: 1,
7640 hardcoresex: 1,
7641 hell: 1,
7642 heshe: 1,
7643 hoar: 1,
7644 hoare: 1,
7645 hoer: 1,
7646 homo: 1,
7647 hore: 1,
7648 horniest: 1,
7649 horny: 1,
7650 hotsex: 1,
7651 "jack-off": 1,
7652 jackoff: 1,
7653 jap: 1,
7654 "jerk-off": 1,
7655 jism: 1,
7656 jiz: 1,
7657 jizm: 1,
7658 jizz: 1,
7659 kawk: 1,
7660 knob: 1,
7661 knobead: 1,
7662 knobed: 1,
7663 knobend: 1,
7664 knobhead: 1,
7665 knobjocky: 1,
7666 knobjokey: 1,
7667 kock: 1,
7668 kondum: 1,
7669 kondums: 1,
7670 kum: 1,
7671 kummer: 1,
7672 kumming: 1,
7673 kums: 1,
7674 kunilingus: 1,
7675 "l3i+ch": 1,
7676 l3itch: 1,
7677 labia: 1,
7678 lust: 1,
7679 lusting: 1,
7680 m0f0: 1,
7681 m0fo: 1,
7682 m45terbate: 1,
7683 ma5terb8: 1,
7684 ma5terbate: 1,
7685 masochist: 1,
7686 "master-bate": 1,
7687 masterb8: 1,
7688 "masterbat*": 1,
7689 masterbat3: 1,
7690 masterbate: 1,
7691 masterbation: 1,
7692 masterbations: 1,
7693 masturbate: 1,
7694 "mo-fo": 1,
7695 mof0: 1,
7696 mofo: 1,
7697 mothafuck: 1,
7698 mothafucka: 1,
7699 mothafuckas: 1,
7700 mothafuckaz: 1,
7701 mothafucked: 1,
7702 mothafucker: 1,
7703 mothafuckers: 1,
7704 mothafuckin: 1,
7705 mothafucking: 1,
7706 mothafuckings: 1,
7707 mothafucks: 1,
7708 "mother fucker": 1,
7709 motherfuck: 1,
7710 motherfucked: 1,
7711 motherfucker: 1,
7712 motherfuckers: 1,
7713 motherfuckin: 1,
7714 motherfucking: 1,
7715 motherfuckings: 1,
7716 motherfuckka: 1,
7717 motherfucks: 1,
7718 muff: 1,
7719 mutha: 1,
7720 muthafecker: 1,
7721 muthafuckker: 1,
7722 muther: 1,
7723 mutherfucker: 1,
7724 n1gga: 1,
7725 n1gger: 1,
7726 nazi: 1,
7727 nigg3r: 1,
7728 nigg4h: 1,
7729 nigga: 1,
7730 niggah: 1,
7731 niggas: 1,
7732 niggaz: 1,
7733 nigger: 1,
7734 niggers: 1,
7735 nob: 1,
7736 "nob jokey": 1,
7737 nobhead: 1,
7738 nobjocky: 1,
7739 nobjokey: 1,
7740 numbnuts: 1,
7741 nutsack: 1,
7742 orgasim: 1,
7743 orgasims: 1,
7744 orgasm: 1,
7745 orgasms: 1,
7746 p0rn: 1,
7747 pawn: 1,
7748 pecker: 1,
7749 penis: 1,
7750 penisfucker: 1,
7751 phonesex: 1,
7752 phuck: 1,
7753 phuk: 1,
7754 phuked: 1,
7755 phuking: 1,
7756 phukked: 1,
7757 phukking: 1,
7758 phuks: 1,
7759 phuq: 1,
7760 pigfucker: 1,
7761 pimpis: 1,
7762 piss: 1,
7763 pissed: 1,
7764 pisser: 1,
7765 pissers: 1,
7766 pisses: 1,
7767 pissflaps: 1,
7768 pissin: 1,
7769 pissing: 1,
7770 pissoff: 1,
7771 poop: 1,
7772 porn: 1,
7773 porno: 1,
7774 pornography: 1,
7775 pornos: 1,
7776 prick: 1,
7777 pricks: 1,
7778 pron: 1,
7779 pube: 1,
7780 pusse: 1,
7781 pussi: 1,
7782 pussies: 1,
7783 pussy: 1,
7784 pussys: 1,
7785 rectum: 1,
7786 retard: 1,
7787 rimjaw: 1,
7788 rimming: 1,
7789 "s hit": 1,
7790 "s.o.b.": 1,
7791 sadist: 1,
7792 schlong: 1,
7793 screwing: 1,
7794 scroat: 1,
7795 scrote: 1,
7796 scrotum: 1,
7797 semen: 1,
7798 sex: 1,
7799 "sh!+": 1,
7800 "sh!t": 1,
7801 sh1t: 1,
7802 shag: 1,
7803 shagger: 1,
7804 shaggin: 1,
7805 shagging: 1,
7806 shemale: 1,
7807 "shi+": 1,
7808 shit: 1,
7809 shitdick: 1,
7810 shite: 1,
7811 shited: 1,
7812 shitey: 1,
7813 shitfuck: 1,
7814 shitfull: 1,
7815 shithead: 1,
7816 shiting: 1,
7817 shitings: 1,
7818 shits: 1,
7819 shitted: 1,
7820 shitter: 1,
7821 shitters: 1,
7822 shitting: 1,
7823 shittings: 1,
7824 shitty: 1,
7825 skank: 1,
7826 slut: 1,
7827 sluts: 1,
7828 smegma: 1,
7829 smut: 1,
7830 snatch: 1,
7831 "son-of-a-bitch": 1,
7832 spac: 1,
7833 spunk: 1,
7834 s_h_i_t: 1,
7835 t1tt1e5: 1,
7836 t1tties: 1,
7837 teets: 1,
7838 teez: 1,
7839 testical: 1,
7840 testicle: 1,
7841 tit: 1,
7842 titfuck: 1,
7843 tits: 1,
7844 titt: 1,
7845 tittie5: 1,
7846 tittiefucker: 1,
7847 titties: 1,
7848 tittyfuck: 1,
7849 tittywank: 1,
7850 titwank: 1,
7851 tosser: 1,
7852 turd: 1,
7853 tw4t: 1,
7854 twat: 1,
7855 twathead: 1,
7856 twatty: 1,
7857 twunt: 1,
7858 twunter: 1,
7859 v14gra: 1,
7860 v1gra: 1,
7861 vagina: 1,
7862 viagra: 1,
7863 vulva: 1,
7864 w00se: 1,
7865 wang: 1,
7866 wank: 1,
7867 wanker: 1,
7868 wanky: 1,
7869 whoar: 1,
7870 whore: 1,
7871 willies: 1,
7872 willy: 1,
7873 xrated: 1,
7874 xxx: 1
7875 }
7876}, function(e, t) {
7877 e.exports = ["4r5e", "5h1t", "5hit", "a55", "anal", "anus", "ar5e", "arrse",
7878 "arse", "ass", "ass-fucker", "asses", "assfucker", "assfukka", "asshole",
7879 "assholes", "asswhole", "a_s_s", "b!tch", "b00bs", "b17ch", "b1tch",
7880 "ballbag", "balls", "ballsack", "bastard", "beastial", "beastiality",
7881 "bellend", "bestial", "bestiality", "bi+ch", "biatch", "bitch", "bitcher",
7882 "bitchers", "bitches", "bitchin", "bitching", "bloody", "blow job",
7883 "blowjob", "blowjobs", "boiolas", "bollock", "bollok", "boner", "boob",
7884 "boobs", "booobs", "boooobs", "booooobs", "booooooobs", "breasts",
7885 "buceta", "bugger", "bum", "bunny fucker", "butt", "butthole", "buttmuch",
7886 "buttplug", "c0ck", "c0cksucker", "carpet muncher", "cawk", "chink",
7887 "cipa", "cl1t", "clit", "clitoris", "clits", "cnut", "cock", "cock-sucker",
7888 "cockface", "cockhead", "cockmunch", "cockmuncher", "cocks", "cocksuck",
7889 "cocksucked", "cocksucker", "cocksucking", "cocksucks", "cocksuka",
7890 "cocksukka", "cok", "cokmuncher", "coksucka", "coon", "cox", "crap", "cum",
7891 "cummer", "cumming", "cums", "cumshot", "cunilingus", "cunillingus",
7892 "cunnilingus", "cunt", "cuntlick", "cuntlicker", "cuntlicking", "cunts",
7893 "cyalis", "cyberfuc", "cyberfuck", "cyberfucked", "cyberfucker",
7894 "cyberfuckers", "cyberfucking", "d1ck", "damn", "dick", "dickhead",
7895 "dildo", "dildos", "dink", "dinks", "dirsa", "dlck", "dog-fucker",
7896 "doggin", "dogging", "donkeyribber", "doosh", "duche", "dyke", "ejaculate",
7897 "ejaculated", "ejaculates", "ejaculating", "ejaculatings", "ejaculation",
7898 "ejakulate", "f u c k", "f u c k e r", "f4nny", "fag", "fagging",
7899 "faggitt", "faggot", "faggs", "fagot", "fagots", "fags", "fanny",
7900 "fannyflaps", "fannyfucker", "fanyy", "fatass", "fcuk", "fcuker",
7901 "fcuking", "feck", "fecker", "felching", "fellate", "fellatio",
7902 "fingerfuck", "fingerfucked", "fingerfucker", "fingerfuckers",
7903 "fingerfucking", "fingerfucks", "fistfuck", "fistfucked", "fistfucker",
7904 "fistfuckers", "fistfucking", "fistfuckings", "fistfucks", "flange",
7905 "fook", "fooker", "fuck", "fucka", "fucked", "fucker", "fuckers",
7906 "fuckhead", "fuckheads", "fuckin", "fucking", "fuckings",
7907 "fuckingshitmotherfucker", "fuckme", "fucks", "fuckwhit", "fuckwit",
7908 "fudge packer", "fudgepacker", "fuk", "fuker", "fukker", "fukkin", "fuks",
7909 "fukwhit", "fukwit", "fux", "fux0r", "f_u_c_k", "gangbang", "gangbanged",
7910 "gangbangs", "gaylord", "gaysex", "goatse", "God", "god-dam", "god-damned",
7911 "goddamn", "goddamned", "hardcoresex", "hell", "heshe", "hoar", "hoare",
7912 "hoer", "homo", "hore", "horniest", "horny", "hotsex", "jack-off",
7913 "jackoff", "jap", "jerk-off", "jism", "jiz", "jizm", "jizz", "kawk",
7914 "knob", "knobead", "knobed", "knobend", "knobhead", "knobjocky",
7915 "knobjokey", "kock", "kondum", "kondums", "kum", "kummer", "kumming",
7916 "kums", "kunilingus", "l3i+ch", "l3itch", "labia", "lust", "lusting",
7917 "m0f0", "m0fo", "m45terbate", "ma5terb8", "ma5terbate", "masochist",
7918 "master-bate", "masterb8", "masterbat*", "masterbat3", "masterbate",
7919 "masterbation", "masterbations", "masturbate", "mo-fo", "mof0", "mofo",
7920 "mothafuck", "mothafucka", "mothafuckas", "mothafuckaz", "mothafucked",
7921 "mothafucker", "mothafuckers", "mothafuckin", "mothafucking",
7922 "mothafuckings", "mothafucks", "mother fucker", "motherfuck",
7923 "motherfucked", "motherfucker", "motherfuckers", "motherfuckin",
7924 "motherfucking", "motherfuckings", "motherfuckka", "motherfucks", "muff",
7925 "mutha", "muthafecker", "muthafuckker", "muther", "mutherfucker", "n1gga",
7926 "n1gger", "nazi", "nigg3r", "nigg4h", "nigga", "niggah", "niggas",
7927 "niggaz", "nigger", "niggers", "nob", "nob jokey", "nobhead", "nobjocky",
7928 "nobjokey", "numbnuts", "nutsack", "orgasim", "orgasims", "orgasm",
7929 "orgasms", "p0rn", "pawn", "pecker", "penis", "penisfucker", "phonesex",
7930 "phuck", "phuk", "phuked", "phuking", "phukked", "phukking", "phuks",
7931 "phuq", "pigfucker", "pimpis", "piss", "pissed", "pisser", "pissers",
7932 "pisses", "pissflaps", "pissin", "pissing", "pissoff", "poop", "porn",
7933 "porno", "pornography", "pornos", "prick", "pricks", "pron", "pube",
7934 "pusse", "pussi", "pussies", "pussy", "pussys", "rectum", "retard",
7935 "rimjaw", "rimming", "s hit", "s.o.b.", "sadist", "schlong", "screwing",
7936 "scroat", "scrote", "scrotum", "semen", "sex", "sh!+", "sh!t", "sh1t",
7937 "shag", "shagger", "shaggin", "shagging", "shemale", "shi+", "shit",
7938 "shitdick", "shite", "shited", "shitey", "shitfuck", "shitfull",
7939 "shithead", "shiting", "shitings", "shits", "shitted", "shitter",
7940 "shitters", "shitting", "shittings", "shitty", "skank", "slut", "sluts",
7941 "smegma", "smut", "snatch", "son-of-a-bitch", "spac", "spunk", "s_h_i_t",
7942 "t1tt1e5", "t1tties", "teets", "teez", "testical", "testicle", "tit",
7943 "titfuck", "tits", "titt", "tittie5", "tittiefucker", "titties",
7944 "tittyfuck", "tittywank", "titwank", "tosser", "turd", "tw4t", "twat",
7945 "twathead", "twatty", "twunt", "twunter", "v14gra", "v1gra", "vagina",
7946 "viagra", "vulva", "w00se", "wang", "wank", "wanker", "wanky", "whoar",
7947 "whore", "willies", "willy", "xrated", "xxx"
7948 ]
7949}, function(e, t) {
7950 e.exports =
7951 /\b(4r5e|5h1t|5hit|a55|anal|anus|ar5e|arrse|arse|ass|ass-fucker|asses|assfucker|assfukka|asshole|assholes|asswhole|a_s_s|b!tch|b00bs|b17ch|b1tch|ballbag|balls|ballsack|bastard|beastial|beastiality|bellend|bestial|bestiality|bi\+ch|biatch|bitch|bitcher|bitchers|bitches|bitchin|bitching|bloody|blow job|blowjob|blowjobs|boiolas|bollock|bollok|boner|boob|boobs|booobs|boooobs|booooobs|booooooobs|breasts|buceta|bugger|bum|bunny fucker|butt|butthole|buttmuch|buttplug|c0ck|c0cksucker|carpet muncher|cawk|chink|cipa|cl1t|clit|clitoris|clits|cnut|cock|cock-sucker|cockface|cockhead|cockmunch|cockmuncher|cocks|cocksuck|cocksucked|cocksucker|cocksucking|cocksucks|cocksuka|cocksukka|cok|cokmuncher|coksucka|coon|cox|crap|cum|cummer|cumming|cums|cumshot|cunilingus|cunillingus|cunnilingus|cunt|cuntlick|cuntlicker|cuntlicking|cunts|cyalis|cyberfuc|cyberfuck|cyberfucked|cyberfucker|cyberfuckers|cyberfucking|d1ck|damn|dick|dickhead|dildo|dildos|dink|dinks|dirsa|dlck|dog-fucker|doggin|dogging|donkeyribber|doosh|duche|dyke|ejaculate|ejaculated|ejaculates|ejaculating|ejaculatings|ejaculation|ejakulate|f u c k|f u c k e r|f4nny|fag|fagging|faggitt|faggot|faggs|fagot|fagots|fags|fanny|fannyflaps|fannyfucker|fanyy|fatass|fcuk|fcuker|fcuking|feck|fecker|felching|fellate|fellatio|fingerfuck|fingerfucked|fingerfucker|fingerfuckers|fingerfucking|fingerfucks|fistfuck|fistfucked|fistfucker|fistfuckers|fistfucking|fistfuckings|fistfucks|flange|fook|fooker|fuck|fucka|fucked|fucker|fuckers|fuckhead|fuckheads|fuckin|fucking|fuckings|fuckingshitmotherfucker|fuckme|fucks|fuckwhit|fuckwit|fudge packer|fudgepacker|fuk|fuker|fukker|fukkin|fuks|fukwhit|fukwit|fux|fux0r|f_u_c_k|gangbang|gangbanged|gangbangs|gaylord|gaysex|goatse|God|god-dam|god-damned|goddamn|goddamned|hardcoresex|hell|heshe|hoar|hoare|hoer|homo|hore|horniest|horny|hotsex|jack-off|jackoff|jap|jerk-off|jism|jiz|jizm|jizz|kawk|knob|knobead|knobed|knobend|knobhead|knobjocky|knobjokey|kock|kondum|kondums|kum|kummer|kumming|kums|kunilingus|l3i\+ch|l3itch|labia|lust|lusting|m0f0|m0fo|m45terbate|ma5terb8|ma5terbate|masochist|master-bate|masterb8|masterbat*|masterbat3|masterbate|masterbation|masterbations|masturbate|mo-fo|mof0|mofo|mothafuck|mothafucka|mothafuckas|mothafuckaz|mothafucked|mothafucker|mothafuckers|mothafuckin|mothafucking|mothafuckings|mothafucks|mother fucker|motherfuck|motherfucked|motherfucker|motherfuckers|motherfuckin|motherfucking|motherfuckings|motherfuckka|motherfucks|muff|mutha|muthafecker|muthafuckker|muther|mutherfucker|n1gga|n1gger|nazi|nigg3r|nigg4h|nigga|niggah|niggas|niggaz|nigger|niggers|nob|nob jokey|nobhead|nobjocky|nobjokey|numbnuts|nutsack|orgasim|orgasims|orgasm|orgasms|p0rn|pawn|pecker|penis|penisfucker|phonesex|phuck|phuk|phuked|phuking|phukked|phukking|phuks|phuq|pigfucker|pimpis|piss|pissed|pisser|pissers|pisses|pissflaps|pissin|pissing|pissoff|poop|porn|porno|pornography|pornos|prick|pricks|pron|pube|pusse|pussi|pussies|pussy|pussys|rectum|retard|rimjaw|rimming|s hit|s.o.b.|sadist|schlong|screwing|scroat|scrote|scrotum|semen|sex|sh!\+|sh!t|sh1t|shag|shagger|shaggin|shagging|shemale|shi\+|shit|shitdick|shite|shited|shitey|shitfuck|shitfull|shithead|shiting|shitings|shits|shitted|shitter|shitters|shitting|shittings|shitty|skank|slut|sluts|smegma|smut|snatch|son-of-a-bitch|spac|spunk|s_h_i_t|t1tt1e5|t1tties|teets|teez|testical|testicle|tit|titfuck|tits|titt|tittie5|tittiefucker|titties|tittyfuck|tittywank|titwank|tosser|turd|tw4t|twat|twathead|twatty|twunt|twunter|v14gra|v1gra|vagina|viagra|vulva|w00se|wang|wank|wanker|wanky|whoar|whore|willies|willy|xrated|xxx)\b/gi
7952}, function(e, t) {
7953 e.exports.hats = [{
7954 id: 45,
7955 name: "Shame!",
7956 dontSell: !0,
7957 price: 0,
7958 scale: 120,
7959 desc: "hacks are for losers"
7960 }, {
7961 id: 51,
7962 name: "Moo Cap",
7963 price: 0,
7964 scale: 120,
7965 desc: "coolest mooer around"
7966 }, {
7967 id: 50,
7968 name: "Apple Cap",
7969 price: 0,
7970 scale: 120,
7971 desc: "apple farms remembers"
7972 }, {
7973 id: 28,
7974 name: "Moo Head",
7975 price: 0,
7976 scale: 120,
7977 desc: "no effect"
7978 }, {
7979 id: 29,
7980 name: "Pig Head",
7981 price: 0,
7982 scale: 120,
7983 desc: "no effect"
7984 }, {
7985 id: 30,
7986 name: "Fluff Head",
7987 price: 0,
7988 scale: 120,
7989 desc: "no effect"
7990 }, {
7991 id: 36,
7992 name: "Pandou Head",
7993 price: 0,
7994 scale: 120,
7995 desc: "no effect"
7996 }, {
7997 id: 37,
7998 name: "Bear Head",
7999 price: 0,
8000 scale: 120,
8001 desc: "no effect"
8002 }, {
8003 id: 38,
8004 name: "Monkey Head",
8005 price: 0,
8006 scale: 120,
8007 desc: "no effect"
8008 }, {
8009 id: 44,
8010 name: "Polar Head",
8011 price: 0,
8012 scale: 120,
8013 desc: "no effect"
8014 }, {
8015 id: 35,
8016 name: "Fez Hat",
8017 price: 0,
8018 scale: 120,
8019 desc: "no effect"
8020 }, {
8021 id: 42,
8022 name: "Enigma Hat",
8023 price: 0,
8024 scale: 120,
8025 desc: "join the enigma army"
8026 }, {
8027 id: 43,
8028 name: "Blitz Hat",
8029 price: 0,
8030 scale: 120,
8031 desc: "hey everybody i'm blitz"
8032 }, {
8033 id: 49,
8034 name: "Bob XIII Hat",
8035 price: 0,
8036 scale: 120,
8037 desc: "like and subscribe"
8038 }, {
8039 id: 57,
8040 name: "Pumpkin",
8041 price: 50,
8042 scale: 120,
8043 desc: "Spooooky"
8044 }, {
8045 id: 8,
8046 name: "Bummle Hat",
8047 price: 100,
8048 scale: 120,
8049 desc: "no effect"
8050 }, {
8051 id: 2,
8052 name: "Straw Hat",
8053 price: 500,
8054 scale: 120,
8055 desc: "no effect"
8056 }, {
8057 id: 15,
8058 name: "Winter Cap",
8059 price: 600,
8060 scale: 120,
8061 desc: "allows you to move at normal speed in snow",
8062 coldM: 1
8063 }, {
8064 id: 5,
8065 name: "Cowboy Hat",
8066 price: 1e3,
8067 scale: 120,
8068 desc: "no effect"
8069 }, {
8070 id: 4,
8071 name: "Ranger Hat",
8072 price: 2e3,
8073 scale: 120,
8074 desc: "no effect"
8075 }, {
8076 id: 18,
8077 name: "Explorer Hat",
8078 price: 2e3,
8079 scale: 120,
8080 desc: "no effect"
8081 }, {
8082 id: 31,
8083 name: "Flipper Hat",
8084 price: 2500,
8085 scale: 120,
8086 desc: "have more control while in water",
8087 watrImm: !0
8088 }, {
8089 id: 1,
8090 name: "Marksman Cap",
8091 price: 3e3,
8092 scale: 120,
8093 desc: "increases arrow speed and range",
8094 aMlt: 1.3
8095 }, {
8096 id: 10,
8097 name: "Bush Gear",
8098 price: 3e3,
8099 scale: 160,
8100 desc: "allows you to disguise yourself as a bush"
8101 }, {
8102 id: 48,
8103 name: "Halo",
8104 price: 3e3,
8105 scale: 120,
8106 desc: "no effect"
8107 }, {
8108 id: 6,
8109 name: "Soldier Helmet",
8110 price: 4e3,
8111 scale: 120,
8112 desc: "reduces damage taken but slows movement",
8113 spdMult: .94,
8114 dmgMult: .75
8115 }, {
8116 id: 23,
8117 name: "Anti Venom Gear",
8118 price: 4e3,
8119 scale: 120,
8120 desc: "makes you immune to poison",
8121 poisonRes: 1
8122 }, {
8123 id: 13,
8124 name: "Medic Gear",
8125 price: 5e3,
8126 scale: 110,
8127 desc: "slowly regenerates health over time",
8128 healthRegen: 3
8129 }, {
8130 id: 9,
8131 name: "Miners Helmet",
8132 price: 5e3,
8133 scale: 120,
8134 desc: "earn 1 extra gold per resource",
8135 extraGold: 1
8136 }, {
8137 id: 32,
8138 name: "Musketeer Hat",
8139 price: 5e3,
8140 scale: 120,
8141 desc: "reduces cost of projectiles",
8142 projCost: .5
8143 }, {
8144 id: 7,
8145 name: "Bull Helmet",
8146 price: 6e3,
8147 scale: 120,
8148 desc: "increases damage done but drains health",
8149 healthRegen: -5,
8150 dmgMultO: 1.5,
8151 spdMult: .96
8152 }, {
8153 id: 22,
8154 name: "Emp Helmet",
8155 price: 6e3,
8156 scale: 120,
8157 desc: "turrets won't attack but you move slower",
8158 antiTurret: 1,
8159 spdMult: .7
8160 }, {
8161 id: 12,
8162 name: "Booster Hat",
8163 price: 6e3,
8164 scale: 120,
8165 desc: "increases your movement speed",
8166 spdMult: 1.16
8167 }, {
8168 id: 26,
8169 name: "Barbarian Armor",
8170 price: 8e3,
8171 scale: 120,
8172 desc: "knocks back enemies that attack you",
8173 dmgK: .6
8174 }, {
8175 id: 21,
8176 name: "Plague Mask",
8177 price: 1e4,
8178 scale: 120,
8179 desc: "melee attacks deal poison damage",
8180 poisonDmg: 5,
8181 poisonTime: 6
8182 }, {
8183 id: 46,
8184 name: "Bull Mask",
8185 price: 1e4,
8186 scale: 120,
8187 desc: "bulls won't target you unless you attack them",
8188 bullRepel: 1
8189 }, {
8190 id: 14,
8191 name: "Windmill Hat",
8192 topSprite: !0,
8193 price: 1e4,
8194 scale: 120,
8195 desc: "generates points while worn",
8196 pps: 1.5
8197 }, {
8198 id: 11,
8199 name: "Spike Gear",
8200 topSprite: !0,
8201 price: 1e4,
8202 scale: 120,
8203 desc: "deal damage to players that damage you",
8204 dmg: .45
8205 }, {
8206 id: 53,
8207 name: "Turret Gear",
8208 topSprite: !0,
8209 price: 1e4,
8210 scale: 120,
8211 desc: "you become a walking turret",
8212 turret: {
8213 proj: 1,
8214 range: 700,
8215 rate: 2500
8216 },
8217 spdMult: .7
8218 }, {
8219 id: 20,
8220 name: "Samurai Armor",
8221 price: 12e3,
8222 scale: 120,
8223 desc: "increased attack speed and fire rate",
8224 atkSpd: .78
8225 }, {
8226 id: 58,
8227 name: "Dark Knight",
8228 price: 12e3,
8229 scale: 120,
8230 desc: "restores health when you deal damage",
8231 healD: .4
8232 }, {
8233 id: 27,
8234 name: "Scavenger Gear",
8235 price: 15e3,
8236 scale: 120,
8237 desc: "earn double points for each kill",
8238 kScrM: 2
8239 }, {
8240 id: 40,
8241 name: "Tank Gear",
8242 price: 15e3,
8243 scale: 120,
8244 desc: "increased damage to buildings but slower movement",
8245 spdMult: .3,
8246 bDmg: 3.3
8247 }, {
8248 id: 52,
8249 name: "Thief Gear",
8250 price: 15e3,
8251 scale: 120,
8252 desc: "steal half of a players gold when you kill them",
8253 goldSteal: .5
8254 }, {
8255 id: 55,
8256 name: "Bloodthirster",
8257 price: 2e4,
8258 scale: 120,
8259 desc: "Restore Health when dealing damage. And increased damage",
8260 healD: .25,
8261 dmgMultO: 1.2
8262 }, {
8263 id: 56,
8264 name: "Assassin Gear",
8265 price: 2e4,
8266 scale: 120,
8267 desc: "Go invisible when not moving. Can't eat. Increased speed",
8268 noEat: !0,
8269 spdMult: 1.1,
8270 invisTimer: 1e3
8271 }], e.exports.accessories = [{
8272 id: 12,
8273 name: "Snowball",
8274 price: 1e3,
8275 scale: 105,
8276 xOff: 18,
8277 desc: "no effect"
8278 }, {
8279 id: 9,
8280 name: "Tree Cape",
8281 price: 1e3,
8282 scale: 90,
8283 desc: "no effect"
8284 }, {
8285 id: 10,
8286 name: "Stone Cape",
8287 price: 1e3,
8288 scale: 90,
8289 desc: "no effect"
8290 }, {
8291 id: 3,
8292 name: "Cookie Cape",
8293 price: 1500,
8294 scale: 90,
8295 desc: "no effect"
8296 }, {
8297 id: 8,
8298 name: "Cow Cape",
8299 price: 2e3,
8300 scale: 90,
8301 desc: "no effect"
8302 }, {
8303 id: 11,
8304 name: "Monkey Tail",
8305 price: 2e3,
8306 scale: 97,
8307 xOff: 25,
8308 desc: "Super speed but reduced damage",
8309 spdMult: 1.35,
8310 dmgMultO: .2
8311 }, {
8312 id: 17,
8313 name: "Apple Basket",
8314 price: 3e3,
8315 scale: 80,
8316 xOff: 12,
8317 desc: "slowly regenerates health over time",
8318 healthRegen: 1
8319 }, {
8320 id: 6,
8321 name: "Winter Cape",
8322 price: 3e3,
8323 scale: 90,
8324 desc: "no effect"
8325 }, {
8326 id: 4,
8327 name: "Skull Cape",
8328 price: 4e3,
8329 scale: 90,
8330 desc: "no effect"
8331 }, {
8332 id: 5,
8333 name: "Dash Cape",
8334 price: 5e3,
8335 scale: 90,
8336 desc: "no effect"
8337 }, {
8338 id: 2,
8339 name: "Dragon Cape",
8340 price: 6e3,
8341 scale: 90,
8342 desc: "no effect"
8343 }, {
8344 id: 1,
8345 name: "Super Cape",
8346 price: 8e3,
8347 scale: 90,
8348 desc: "no effect"
8349 }, {
8350 id: 7,
8351 name: "Troll Cape",
8352 price: 8e3,
8353 scale: 90,
8354 desc: "no effect"
8355 }, {
8356 id: 14,
8357 name: "Thorns",
8358 price: 1e4,
8359 scale: 115,
8360 xOff: 20,
8361 desc: "no effect"
8362 }, {
8363 id: 15,
8364 name: "Blockades",
8365 price: 1e4,
8366 scale: 95,
8367 xOff: 15,
8368 desc: "no effect"
8369 }, {
8370 id: 20,
8371 name: "Devils Tail",
8372 price: 1e4,
8373 scale: 95,
8374 xOff: 20,
8375 desc: "no effect"
8376 }, {
8377 id: 16,
8378 name: "Sawblade",
8379 price: 12e3,
8380 scale: 90,
8381 spin: !0,
8382 xOff: 0,
8383 desc: "deal damage to players that damage you",
8384 dmg: .15
8385 }, {
8386 id: 13,
8387 name: "Angel Wings",
8388 price: 15e3,
8389 scale: 138,
8390 xOff: 22,
8391 desc: "slowly regenerates health over time",
8392 healthRegen: 3
8393 }, {
8394 id: 19,
8395 name: "Shadow Wings",
8396 price: 15e3,
8397 scale: 138,
8398 xOff: 22,
8399 desc: "increased movement speed",
8400 spdMult: 1.1
8401 }, {
8402 id: 18,
8403 name: "Blood Wings",
8404 price: 2e4,
8405 scale: 178,
8406 xOff: 26,
8407 desc: "restores health when you deal damage",
8408 healD: .2
8409 }, {
8410 id: 21,
8411 name: "Corrupt X Wings",
8412 price: 2e4,
8413 scale: 178,
8414 xOff: 26,
8415 desc: "deal damage to players that damage you",
8416 dmg: .25
8417 }]
8418}, function(e, t) {
8419 e.exports = function(e, t, n, i, r, s, a) {
8420 this.init = function(e, t, n, i, r, s, o, c, l) {
8421 this.active = !0, this.indx = e, this.x = t, this.y = n, this.dir = i,
8422 this.skipMov = !0, this.speed = r, this.dmg = s, this.scale = c, this.range =
8423 o, this.owner = l, a && (this.sentTo = {})
8424 };
8425 var o, c = [];
8426 this.update = function(l) {
8427 if (this.active) {
8428 var h, u = this.speed * l;
8429 if (this.skipMov ? this.skipMov = !1 : (this.x += u * Math.cos(this.dir),
8430 this.y += u * Math.sin(this.dir), this.range -= u, this.range <= 0 &&
8431 (this.x += this.range * Math.cos(this.dir), this.y += this.range *
8432 Math.sin(this.dir), u = 1, this.range = 0, this.active = !1)), a) {
8433 for (var f = 0; f < e.length; ++f) !this.sentTo[e[f].id] && e[f].canSee(
8434 this) && (this.sentTo[e[f].id] = 1, a.send(e[f].id, "18", s.fixTo(
8435 this.x, 1), s.fixTo(this.y, 1), s.fixTo(this.dir, 2), s.fixTo(this
8436 .range, 1), this.speed, this.indx, this.layer, this.sid));
8437 for (c.length = 0, f = 0; f < e.length + t.length; ++f) !(o = e[f] ||
8438 t[f - e.length]).alive || o == this.owner || this.owner.team && o.team ==
8439 this.owner.team || s.lineInRect(o.x - o.scale, o.y - o.scale, o.x + o
8440 .scale, o.y + o.scale, this.x, this.y, this.x + u * Math.cos(this.dir),
8441 this.y + u * Math.sin(this.dir)) && c.push(o);
8442 for (var d = n.getGridArrays(this.x, this.y, this.scale), p = 0; p < d
8443 .length; ++p)
8444 for (var g = 0; g < d[p].length; ++g) h = (o = d[p][g]).getScale(), o
8445 .active && this.ignoreObj != o.sid && this.layer <= o.layer && c.indexOf(
8446 o) < 0 && !o.ignoreCollision && s.lineInRect(o.x - h, o.y - h, o.x +
8447 h, o.y + h, this.x, this.y, this.x + u * Math.cos(this.dir), this.y +
8448 u * Math.sin(this.dir)) && c.push(o);
8449 if (c.length > 0) {
8450 var m = null,
8451 y = null,
8452 k = null;
8453 for (f = 0; f < c.length; ++f) k = s.getDistance(this.x, this.y, c[f]
8454 .x, c[f].y), (null == y || k < y) && (y = k, m = c[f]);
8455 if (m.isPlayer || m.isAI) {
8456 var v = .3 * (m.weightM || 1);
8457 m.xVel += v * Math.cos(this.dir), m.yVel += v * Math.sin(this.dir),
8458 null != m.weaponIndex && i.weapons[m.weaponIndex].shield && s.getAngleDist(
8459 this.dir + Math.PI, m.dir) <= r.shieldAngle || m.changeHealth(-
8460 this.dmg, this.owner, this.owner)
8461 } else
8462 for (m.projDmg && m.health && m.changeHealth(-this.dmg) && n.disableObj(
8463 m), f = 0; f < e.length; ++f) e[f].active && (m.sentTo[e[f].id] &&
8464 (m.active ? e[f].canSee(m) && a.send(e[f].id, "8", s.fixTo(this.dir,
8465 2), m.sid) : a.send(e[f].id, "12", m.sid)), m.active || m.owner !=
8466 e[f] || e[f].changeItemCount(m.group.id, -1));
8467 for (this.active = !1, f = 0; f < e.length; ++f) this.sentTo[e[f].id] &&
8468 a.send(e[f].id, "19", this.sid, s.fixTo(y, 1))
8469 }
8470 }
8471 }
8472 }
8473 }
8474}, function(e, t) {
8475 e.exports = function(e, t, n, i, r, s, a, o, c) {
8476 this.addProjectile = function(l, h, u, f, d, p, g, m, y) {
8477 for (var k, v = s.projectiles[p], w = 0; w < t.length; ++w)
8478 if (!t[w].active) {
8479 k = t[w];
8480 break
8481 }
8482 return k || ((k = new e(n, i, r, s, a, o, c)).sid = t.length, t.push(k)),
8483 k.init(p, l, h, u, d, v.dmg, f, v.scale, g), k.ignoreObj = m, k.layer =
8484 y || v.layer, k.src = v.src, k
8485 }
8486 }
8487}, function(e, t) {
8488 e.exports.obj = function(e, t) {
8489 var n;
8490 this.sounds = [], this.active = !0, this.play = function(t, i, r) {
8491 i && this.active && ((n = this.sounds[t]) || (n = new Howl({
8492 src: ".././sound/" + t + ".mp3"
8493 }), this.sounds[t] = n), r && n.isPlaying || (n.isPlaying = !0, n.play(),
8494 n.volume((i || 1) * e.volumeMult), n.loop(r)))
8495 }, this.toggleMute = function(e, t) {
8496 (n = this.sounds[e]) && n.mute(t)
8497 }, this.stop = function(e) {
8498 (n = this.sounds[e]) && (n.stop(), n.isPlaying = !1)
8499 }
8500 }
8501}, function(e, t, n) {
8502 var i = n(60),
8503 r = n(67);
8504
8505 function s(e, t, n, i, r) {
8506 "localhost" == location.hostname && (window.location.hostname = "127.0.0.1"),
8507 this.debugLog = !1, this.baseUrl = e, this.lobbySize = n, this.devPort = t,
8508 this.lobbySpread = i, this.rawIPs = !!r, this.server = void 0, this.gameIndex =
8509 void 0, this.callback = void 0, this.errorCallback = void 0, this.processServers(
8510 vultr.servers)
8511 }
8512 s.prototype.regionInfo = {
8513 0: {
8514 name: "Local",
8515 latitude: 0,
8516 longitude: 0
8517 },
8518 "vultr:1": {
8519 name: "New Jersey",
8520 latitude: 40.1393329,
8521 longitude: -75.8521818
8522 },
8523 "vultr:2": {
8524 name: "Chicago",
8525 latitude: 41.8339037,
8526 longitude: -87.872238
8527 },
8528 "vultr:3": {
8529 name: "Dallas",
8530 latitude: 32.8208751,
8531 longitude: -96.8714229
8532 },
8533 "vultr:4": {
8534 name: "Seattle",
8535 latitude: 47.6149942,
8536 longitude: -122.4759879
8537 },
8538 "vultr:5": {
8539 name: "Los Angeles",
8540 latitude: 34.0207504,
8541 longitude: -118.691914
8542 },
8543 "vultr:6": {
8544 name: "Atlanta",
8545 latitude: 33.7676334,
8546 longitude: -84.5610332
8547 },
8548 "vultr:7": {
8549 name: "Amsterdam",
8550 latitude: 52.3745287,
8551 longitude: 4.7581878
8552 },
8553 "vultr:8": {
8554 name: "London",
8555 latitude: 51.5283063,
8556 longitude: -.382486
8557 },
8558 "vultr:9": {
8559 name: "Frankfurt",
8560 latitude: 50.1211273,
8561 longitude: 8.496137
8562 },
8563 "vultr:12": {
8564 name: "Silicon Valley",
8565 latitude: 37.4024714,
8566 longitude: -122.3219752
8567 },
8568 "vultr:19": {
8569 name: "Sydney",
8570 latitude: -33.8479715,
8571 longitude: 150.651084
8572 },
8573 "vultr:24": {
8574 name: "Paris",
8575 latitude: 48.8588376,
8576 longitude: 2.2773454
8577 },
8578 "vultr:25": {
8579 name: "Tokyo",
8580 latitude: 35.6732615,
8581 longitude: 139.569959
8582 },
8583 "vultr:39": {
8584 name: "Miami",
8585 latitude: 25.7823071,
8586 longitude: -80.3012156
8587 },
8588 "vultr:40": {
8589 name: "Singapore",
8590 latitude: 1.3147268,
8591 longitude: 103.7065876
8592 }
8593 }, s.prototype.start = function(e, t) {
8594 this.callback = e, this.errorCallback = t;
8595 var n = this.parseServerQuery();
8596 n ? (this.log("Found server in query."), this.password = n[3], this.connect(
8597 n[0], n[1], n[2])) : (this.log("Pinging servers..."), this.pingServers())
8598 }, s.prototype.parseServerQuery = function() {
8599 var e = i.parse(location.href, !0),
8600 t = e.query.server;
8601 if ("string" == typeof t) {
8602 var n = t.split(":");
8603 if (3 == n.length) {
8604 var r = n[0],
8605 s = parseInt(n[1]),
8606 a = parseInt(n[2]);
8607 return "0" == r || r.startsWith("vultr:") || (r = "vultr:" + r), [r, s,
8608 a, e.query.password
8609 ]
8610 }
8611 this.errorCallback("Invalid number of server parameters in " + t)
8612 }
8613 }, s.prototype.findServer = function(e, t) {
8614 var n = this.servers[e];
8615 if (Array.isArray(n)) {
8616 for (var i = 0; i < n.length; i++) {
8617 var r = n[i];
8618 if (r.index == t) return r
8619 }
8620 console.warn("Could not find server in region " + e + " with index " + t +
8621 ".")
8622 } else this.errorCallback("No server list for region " + e)
8623 }, s.prototype.pingServers = function() {
8624 var e = this,
8625 t = [];
8626 for (var n in this.servers)
8627 if (this.servers.hasOwnProperty(n)) {
8628 var i = this.servers[n],
8629 r = i[Math.floor(Math.random() * i.length)];
8630 null != r ? function(i, r) {
8631 var s = new XMLHttpRequest;
8632 s.onreadystatechange = function(i) {
8633 var s = i.target;
8634 if (4 == s.readyState)
8635 if (200 == s.status) {
8636 for (var a = 0; a < t.length; a++) t[a].abort();
8637 e.log("Connecting to region", r.region);
8638 var o = e.seekServer(r.region);
8639 e.connect(o[0], o[1], o[2])
8640 } else console.warn("Error pinging " + r.ip + " in region " + n)
8641 };
8642 var a = "//" + e.serverAddress(r.ip, !0) + ":" + e.serverPort(r) +
8643 "/ping";
8644 s.open("GET", a, !0), s.send(null), e.log("Pinging", a), t.push(s)
8645 }(0, r) : console.log("No target server for region " + n)
8646 }
8647 }, s.prototype.seekServer = function(e, t, n) {
8648 null == n && (n = "random"), null == t && (t = !1);
8649 const i = ["random"];
8650 var r = this.lobbySize,
8651 s = this.lobbySpread,
8652 a = this.servers[e].flatMap((function(e) {
8653 var t = 0;
8654 return e.games.map((function(n) {
8655 var i = t++;
8656 return {
8657 region: e.region,
8658 index: e.index * e.games.length + i,
8659 gameIndex: i,
8660 gameCount: e.games.length,
8661 playerCount: n.playerCount,
8662 isPrivate: n.isPrivate
8663 }
8664 }))
8665 })).filter((function(e) {
8666 return !e.isPrivate
8667 })).filter((function(e) {
8668 return !t || 0 == e.playerCount && e.gameIndex >= e.gameCount / 2
8669 })).filter((function(e) {
8670 return "random" == n || i[e.index % i.length].key == n
8671 })).sort((function(e, t) {
8672 return t.playerCount - e.playerCount
8673 })).filter((function(e) {
8674 return e.playerCount < r
8675 }));
8676 if (t && a.reverse(), 0 != a.length) {
8677 var o = Math.min(s, a.length),
8678 c = Math.floor(Math.random() * o),
8679 l = a[c = Math.min(c, a.length - 1)],
8680 h = l.region,
8681 u = (c = Math.floor(l.index / l.gameCount), l.index % l.gameCount);
8682 return this.log("Found server."), [h, c, u]
8683 }
8684 this.errorCallback("No open servers.")
8685 }, s.prototype.connect = function(e, t, n) {
8686 if (!this.connected) {
8687 var i = this.findServer(e, t);
8688 null != i ? (this.log("Connecting to server", i, "with game index", n), i
8689 .games[n].playerCount >= this.lobbySize ? this.errorCallback(
8690 "Server is already full.") : (window.history.replaceState(document.title,
8691 document.title, this.generateHref(e, t, n, this.password)), this.server =
8692 i, this.gameIndex = n, this.log("Calling callback with address", this.serverAddress(
8693 i.ip), "on port", this.serverPort(i), "with game index", n), this.callback(
8694 this.serverAddress(i.ip), this.serverPort(i), n))) : this.errorCallback(
8695 "Failed to find server for region " + e + " and index " + t)
8696 }
8697 }, s.prototype.switchServer = function(e, t, n, i) {
8698 this.switchingServers = !0, window.location.href = this.generateHref(e, t,
8699 n, i)
8700 }, s.prototype.generateHref = function(e, t, n, i) {
8701 var r = "/?server=" + (e = this.stripRegion(e)) + ":" + t + ":" + n;
8702 return i && (r += "&password=" + encodeURIComponent(i)), r
8703 }, s.prototype.serverAddress = function(e, t) {
8704 return "127.0.0.1" == e || "7f000001" == e ||
8705 "903d62ef5d1c2fecdcaeb5e7dd485eff" == e ? window.location.hostname : this
8706 .rawIPs ? t ? "ip_" + this.hashIP(e) + "." + this.baseUrl : e : "ip_" + e +
8707 "." + this.baseUrl
8708 }, s.prototype.serverPort = function(e) {
8709 return 0 == e.region ? this.devPort : location.protocol.startsWith("https") ?
8710 443 : 80
8711 }, s.prototype.processServers = function(e) {
8712 for (var t = {}, n = 0; n < e.length; n++) {
8713 var i = e[n],
8714 r = t[i.region];
8715 null == r && (r = [], t[i.region] = r), r.push(i)
8716 }
8717 for (var s in t) t[s] = t[s].sort((function(e, t) {
8718 return e.index - t.index
8719 }));
8720 this.servers = t
8721 }, s.prototype.ipToHex = function(e) {
8722 return e.split(".").map(e => ("00" + parseInt(e).toString(16)).substr(-2))
8723 .join("").toLowerCase()
8724 }, s.prototype.hashIP = function(e) {
8725 return r(this.ipToHex(e))
8726 }, s.prototype.log = function() {
8727 return this.debugLog ? console.log.apply(void 0, arguments) : console.verbose ?
8728 console.verbose.apply(void 0, arguments) : void 0
8729 }, s.prototype.stripRegion = function(e) {
8730 return e.startsWith("vultr:") ? e = e.slice(6) : e.startsWith("do:") && (e =
8731 e.slice(3)), e
8732 }, window.testVultrClient = function() {
8733 var e = 1;
8734
8735 function t(t, n) {
8736 (t = "" + t) == (n = "" + n) ? console.log(`Assert ${e} passed.`):
8737 console.warn(`Assert ${e} failed. Expected ${n}, got ${t}.`), e++
8738 }
8739 var n = new s("test.io", -1, 5, 1, !1);
8740 n.errorCallback = function(e) {}, n.processServers(function(e) {
8741 var t = [];
8742 for (var n in e)
8743 for (var i = e[n], r = 0; r < i.length; r++) t.push({
8744 ip: n + ":" + r,
8745 scheme: "testing",
8746 region: n,
8747 index: r,
8748 games: i[r].map(e => ({
8749 playerCount: e,
8750 isPrivate: !1
8751 }))
8752 });
8753 return t
8754 }({
8755 1: [
8756 [0, 0, 0, 0],
8757 [0, 0, 0, 0]
8758 ],
8759 2: [
8760 [5, 1, 0, 0],
8761 [0, 0, 0, 0]
8762 ],
8763 3: [
8764 [5, 0, 1, 5],
8765 [0, 0, 0, 0]
8766 ],
8767 4: [
8768 [5, 1, 1, 5],
8769 [1, 0, 0, 0]
8770 ],
8771 5: [
8772 [5, 1, 1, 5],
8773 [1, 0, 4, 0]
8774 ],
8775 6: [
8776 [5, 5, 5, 5],
8777 [2, 3, 1, 4]
8778 ],
8779 7: [
8780 [5, 5, 5, 5],
8781 [5, 5, 5, 5]
8782 ]
8783 })), t(n.seekServer(1, !1), [1, 0, 0]), t(n.seekServer(1, !0), [1, 1, 3]),
8784 t(n.seekServer(2, !1), [2, 0, 1]), t(n.seekServer(2, !0), [2, 1, 3]), t(n
8785 .seekServer(3, !1), [3, 0, 2]), t(n.seekServer(3, !0), [3, 1, 3]), t(n.seekServer(
8786 4, !1), [4, 0, 1]), t(n.seekServer(4, !0), [4, 1, 3]), t(n.seekServer(5, !
8787 1), [5, 1, 2]), t(n.seekServer(5, !0), [5, 1, 3]), t(n.seekServer(6, !1), [
8788 6, 1, 3
8789 ]), t(n.seekServer(6, !0), void 0), t(n.seekServer(7, !1), void 0), t(n.seekServer(
8790 7, !0), void 0), console.log("Tests passed.")
8791 };
8792 var a = function(e, t) {
8793 return e.concat(t)
8794 };
8795 Array.prototype.flatMap = function(e) {
8796 return function(e, t) {
8797 return t.map(e).reduce(a, [])
8798 }(e, this)
8799 }, e.exports = s
8800}, function(e, t, n) {
8801 "use strict";
8802 var i = n(61),
8803 r = n(63);
8804
8805 function s() {
8806 this.protocol = null, this.slashes = null, this.auth = null, this.host =
8807 null, this.port = null, this.hostname = null, this.hash = null, this.search =
8808 null, this.query = null, this.pathname = null, this.path = null, this.href =
8809 null
8810 }
8811 t.parse = v, t.resolve = function(e, t) {
8812 return v(e, !1, !0).resolve(t)
8813 }, t.resolveObject = function(e, t) {
8814 return e ? v(e, !1, !0).resolveObject(t) : t
8815 }, t.format = function(e) {
8816 return r.isString(e) && (e = v(e)), e instanceof s ? e.format() : s.prototype
8817 .format.call(e)
8818 }, t.Url = s;
8819 var a = /^([a-z0-9.+-]+:)/i,
8820 o = /:[0-9]*$/,
8821 c = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
8822 l = ["{", "}", "|", "\\", "^", "`"].concat(["<", ">", '"', "`", " ", "\r",
8823 "\n", "\t"
8824 ]),
8825 h = ["'"].concat(l),
8826 u = ["%", "/", "?", ";", "#"].concat(h),
8827 f = ["/", "?", "#"],
8828 d = /^[+a-z0-9A-Z_-]{0,63}$/,
8829 p = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
8830 g = {
8831 javascript: !0,
8832 "javascript:": !0
8833 },
8834 m = {
8835 javascript: !0,
8836 "javascript:": !0
8837 },
8838 y = {
8839 http: !0,
8840 https: !0,
8841 ftp: !0,
8842 gopher: !0,
8843 file: !0,
8844 "http:": !0,
8845 "https:": !0,
8846 "ftp:": !0,
8847 "gopher:": !0,
8848 "file:": !0
8849 },
8850 k = n(64);
8851
8852 function v(e, t, n) {
8853 if (e && r.isObject(e) && e instanceof s) return e;
8854 var i = new s;
8855 return i.parse(e, t, n), i
8856 }
8857 s.prototype.parse = function(e, t, n) {
8858 if (!r.isString(e)) throw new TypeError(
8859 "Parameter 'url' must be a string, not " + typeof e);
8860 var s = e.indexOf("?"),
8861 o = -1 !== s && s < e.indexOf("#") ? "?" : "#",
8862 l = e.split(o);
8863 l[0] = l[0].replace(/\\/g, "/");
8864 var v = e = l.join(o);
8865 if (v = v.trim(), !n && 1 === e.split("#").length) {
8866 var w = c.exec(v);
8867 if (w) return this.path = v, this.href = v, this.pathname = w[1], w[2] ?
8868 (this.search = w[2], this.query = t ? k.parse(this.search.substr(1)) :
8869 this.search.substr(1)) : t && (this.search = "", this.query = {}),
8870 this
8871 }
8872 var b = a.exec(v);
8873 if (b) {
8874 var x = (b = b[0]).toLowerCase();
8875 this.protocol = x, v = v.substr(b.length)
8876 }
8877 if (n || b || v.match(/^\/\/[^@\/]+@[^@\/]+/)) {
8878 var S = "//" === v.substr(0, 2);
8879 !S || b && m[b] || (v = v.substr(2), this.slashes = !0)
8880 }
8881 if (!m[b] && (S || b && !y[b])) {
8882 for (var T, I, E = -1, M = 0; M < f.length; M++) - 1 !== (A = v.indexOf(f[
8883 M])) && (-1 === E || A < E) && (E = A);
8884 for (-1 !== (I = -1 === E ? v.lastIndexOf("@") : v.lastIndexOf("@", E)) &&
8885 (T = v.slice(0, I), v = v.slice(I + 1), this.auth = decodeURIComponent(T)),
8886 E = -1, M = 0; M < u.length; M++) {
8887 var A; - 1 !== (A = v.indexOf(u[M])) && (-1 === E || A < E) && (E = A)
8888 } - 1 === E && (E = v.length), this.host = v.slice(0, E), v = v.slice(E),
8889 this.parseHost(), this.hostname = this.hostname || "";
8890 var P = "[" === this.hostname[0] && "]" === this.hostname[this.hostname.length -
8891 1];
8892 if (!P)
8893 for (var B = this.hostname.split(/\./), C = (M = 0, B.length); M < C; M++) {
8894 var O = B[M];
8895 if (O && !O.match(d)) {
8896 for (var R = "", j = 0, _ = O.length; j < _; j++) O.charCodeAt(j) >
8897 127 ? R += "x" : R += O[j];
8898 if (!R.match(d)) {
8899 var U = B.slice(0, M),
8900 D = B.slice(M + 1),
8901 L = O.match(p);
8902 L && (U.push(L[1]), D.unshift(L[2])), D.length && (v = "/" + D.join(
8903 ".") + v), this.hostname = U.join(".");
8904 break
8905 }
8906 }
8907 }
8908 this.hostname.length > 255 ? this.hostname = "" : this.hostname = this.hostname
8909 .toLowerCase(), P || (this.hostname = i.toASCII(this.hostname));
8910 var F = this.port ? ":" + this.port : "",
8911 z = this.hostname || "";
8912 this.host = z + F, this.href += this.host, P && (this.hostname = this.hostname
8913 .substr(1, this.hostname.length - 2), "/" !== v[0] && (v = "/" + v))
8914 }
8915 if (!g[x])
8916 for (M = 0, C = h.length; M < C; M++) {
8917 var H = h[M];
8918 if (-1 !== v.indexOf(H)) {
8919 var V = encodeURIComponent(H);
8920 V === H && (V = escape(H)), v = v.split(H).join(V)
8921 }
8922 }
8923 var q = v.indexOf("#"); - 1 !== q && (this.hash = v.substr(q), v = v.slice(
8924 0, q));
8925 var Y = v.indexOf("?");
8926 if (-1 !== Y ? (this.search = v.substr(Y), this.query = v.substr(Y + 1), t &&
8927 (this.query = k.parse(this.query)), v = v.slice(0, Y)) : t && (this.search =
8928 "", this.query = {}), v && (this.pathname = v), y[x] && this.hostname &&
8929 !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
8930 F = this.pathname || "";
8931 var W = this.search || "";
8932 this.path = F + W
8933 }
8934 return this.href = this.format(), this
8935 }, s.prototype.format = function() {
8936 var e = this.auth || "";
8937 e && (e = (e = encodeURIComponent(e)).replace(/%3A/i, ":"), e += "@");
8938 var t = this.protocol || "",
8939 n = this.pathname || "",
8940 i = this.hash || "",
8941 s = !1,
8942 a = "";
8943 this.host ? s = e + this.host : this.hostname && (s = e + (-1 === this.hostname
8944 .indexOf(":") ? this.hostname : "[" + this.hostname + "]"), this.port &&
8945 (s += ":" + this.port)), this.query && r.isObject(this.query) && Object.keys(
8946 this.query).length && (a = k.stringify(this.query));
8947 var o = this.search || a && "?" + a || "";
8948 return t && ":" !== t.substr(-1) && (t += ":"), this.slashes || (!t || y[t]) &&
8949 !1 !== s ? (s = "//" + (s || ""), n && "/" !== n.charAt(0) && (n = "/" +
8950 n)) : s || (s = ""), i && "#" !== i.charAt(0) && (i = "#" + i), o && "?" !==
8951 o.charAt(0) && (o = "?" + o), t + s + (n = n.replace(/[?#]/g, (function(e) {
8952 return encodeURIComponent(e)
8953 }))) + (o = o.replace("#", "%23")) + i
8954 }, s.prototype.resolve = function(e) {
8955 return this.resolveObject(v(e, !1, !0)).format()
8956 }, s.prototype.resolveObject = function(e) {
8957 if (r.isString(e)) {
8958 var t = new s;
8959 t.parse(e, !1, !0), e = t
8960 }
8961 for (var n = new s, i = Object.keys(this), a = 0; a < i.length; a++) {
8962 var o = i[a];
8963 n[o] = this[o]
8964 }
8965 if (n.hash = e.hash, "" === e.href) return n.href = n.format(), n;
8966 if (e.slashes && !e.protocol) {
8967 for (var c = Object.keys(e), l = 0; l < c.length; l++) {
8968 var h = c[l];
8969 "protocol" !== h && (n[h] = e[h])
8970 }
8971 return y[n.protocol] && n.hostname && !n.pathname && (n.path = n.pathname =
8972 "/"), n.href = n.format(), n
8973 }
8974 if (e.protocol && e.protocol !== n.protocol) {
8975 if (!y[e.protocol]) {
8976 for (var u = Object.keys(e), f = 0; f < u.length; f++) {
8977 var d = u[f];
8978 n[d] = e[d]
8979 }
8980 return n.href = n.format(), n
8981 }
8982 if (n.protocol = e.protocol, e.host || m[e.protocol]) n.pathname = e.pathname;
8983 else {
8984 for (var p = (e.pathname || "").split("/"); p.length && !(e.host = p.shift());)
8985 ;
8986 e.host || (e.host = ""), e.hostname || (e.hostname = ""), "" !== p[0] &&
8987 p.unshift(""), p.length < 2 && p.unshift(""), n.pathname = p.join("/")
8988 }
8989 if (n.search = e.search, n.query = e.query, n.host = e.host || "", n.auth =
8990 e.auth, n.hostname = e.hostname || e.host, n.port = e.port, n.pathname ||
8991 n.search) {
8992 var g = n.pathname || "",
8993 k = n.search || "";
8994 n.path = g + k
8995 }
8996 return n.slashes = n.slashes || e.slashes, n.href = n.format(), n
8997 }
8998 var v = n.pathname && "/" === n.pathname.charAt(0),
8999 w = e.host || e.pathname && "/" === e.pathname.charAt(0),
9000 b = w || v || n.host && e.pathname,
9001 x = b,
9002 S = n.pathname && n.pathname.split("/") || [],
9003 T = (p = e.pathname && e.pathname.split("/") || [], n.protocol && !y[n.protocol]);
9004 if (T && (n.hostname = "", n.port = null, n.host && ("" === S[0] ? S[0] =
9005 n.host : S.unshift(n.host)), n.host = "", e.protocol && (e.hostname =
9006 null, e.port = null, e.host && ("" === p[0] ? p[0] = e.host : p.unshift(
9007 e.host)), e.host = null), b = b && ("" === p[0] || "" === S[0])), w) n.host =
9008 e.host || "" === e.host ? e.host : n.host, n.hostname = e.hostname || "" ===
9009 e.hostname ? e.hostname : n.hostname, n.search = e.search, n.query = e.query,
9010 S = p;
9011 else if (p.length) S || (S = []), S.pop(), S = S.concat(p), n.search = e.search,
9012 n.query = e.query;
9013 else if (!r.isNullOrUndefined(e.search)) return T && (n.hostname = n.host =
9014 S.shift(), (P = !!(n.host && n.host.indexOf("@") > 0) && n.host.split(
9015 "@")) && (n.auth = P.shift(), n.host = n.hostname = P.shift())), n.search =
9016 e.search, n.query = e.query, r.isNull(n.pathname) && r.isNull(n.search) ||
9017 (n.path = (n.pathname ? n.pathname : "") + (n.search ? n.search : "")),
9018 n.href = n.format(), n;
9019 if (!S.length) return n.pathname = null, n.search ? n.path = "/" + n.search :
9020 n.path = null, n.href = n.format(), n;
9021 for (var I = S.slice(-1)[0], E = (n.host || e.host || S.length > 1) && (
9022 "." === I || ".." === I) || "" === I, M = 0, A = S.length; A >= 0; A--)
9023 "." === (I = S[A]) ? S.splice(A, 1) : ".." === I ? (S.splice(A, 1), M++) :
9024 M && (S.splice(A, 1), M--);
9025 if (!b && !x)
9026 for (; M--; M) S.unshift("..");
9027 !b || "" === S[0] || S[0] && "/" === S[0].charAt(0) || S.unshift(""), E &&
9028 "/" !== S.join("/").substr(-1) && S.push("");
9029 var P, B = "" === S[0] || S[0] && "/" === S[0].charAt(0);
9030 return T && (n.hostname = n.host = B ? "" : S.length ? S.shift() : "", (P = !
9031 !(n.host && n.host.indexOf("@") > 0) && n.host.split("@")) && (n.auth =
9032 P.shift(), n.host = n.hostname = P.shift())), (b = b || n.host && S.length) &&
9033 !B && S.unshift(""), S.length ? n.pathname = S.join("/") : (n.pathname =
9034 null, n.path = null), r.isNull(n.pathname) && r.isNull(n.search) || (n.path =
9035 (n.pathname ? n.pathname : "") + (n.search ? n.search : "")), n.auth = e
9036 .auth || n.auth, n.slashes = n.slashes || e.slashes, n.href = n.format(),
9037 n
9038 }, s.prototype.parseHost = function() {
9039 var e = this.host,
9040 t = o.exec(e);
9041 t && (":" !== (t = t[0]) && (this.port = t.substr(1)), e = e.substr(0, e.length -
9042 t.length)), e && (this.hostname = e)
9043 }
9044}, function(e, t, n) {
9045 (function(e, i) {
9046 var r; /*! https://mths.be/punycode v1.4.1 by @mathias */
9047 ! function(s) {
9048 t && t.nodeType, e && e.nodeType;
9049 var a = "object" == typeof i && i;
9050 a.global !== a && a.window !== a && a.self;
9051 var o, c = 2147483647,
9052 l = 36,
9053 h = /^xn--/,
9054 u = /[^\x20-\x7E]/,
9055 f = /[\x2E\u3002\uFF0E\uFF61]/g,
9056 d = {
9057 overflow: "Overflow: input needs wider integers to process",
9058 "not-basic": "Illegal input >= 0x80 (not a basic code point)",
9059 "invalid-input": "Invalid input"
9060 },
9061 p = Math.floor,
9062 g = String.fromCharCode;
9063
9064 function m(e) {
9065 throw new RangeError(d[e])
9066 }
9067
9068 function y(e, t) {
9069 for (var n = e.length, i = []; n--;) i[n] = t(e[n]);
9070 return i
9071 }
9072
9073 function k(e, t) {
9074 var n = e.split("@"),
9075 i = "";
9076 return n.length > 1 && (i = n[0] + "@", e = n[1]), i + y((e = e.replace(
9077 f, ".")).split("."), t).join(".")
9078 }
9079
9080 function v(e) {
9081 for (var t, n, i = [], r = 0, s = e.length; r < s;)(t = e.charCodeAt(r++)) >=
9082 55296 && t <= 56319 && r < s ? 56320 == (64512 & (n = e.charCodeAt(r++))) ?
9083 i.push(((1023 & t) << 10) + (1023 & n) + 65536) : (i.push(t), r--) : i.push(
9084 t);
9085 return i
9086 }
9087
9088 function w(e) {
9089 return y(e, (function(e) {
9090 var t = "";
9091 return e > 65535 && (t += g((e -= 65536) >>> 10 & 1023 | 55296), e =
9092 56320 | 1023 & e), t + g(e)
9093 })).join("")
9094 }
9095
9096 function b(e) {
9097 return e - 48 < 10 ? e - 22 : e - 65 < 26 ? e - 65 : e - 97 < 26 ? e -
9098 97 : l
9099 }
9100
9101 function x(e, t) {
9102 return e + 22 + 75 * (e < 26) - ((0 != t) << 5)
9103 }
9104
9105 function S(e, t, n) {
9106 var i = 0;
9107 for (e = n ? p(e / 700) : e >> 1, e += p(e / t); e > 455; i += l) e = p(
9108 e / 35);
9109 return p(i + 36 * e / (e + 38))
9110 }
9111
9112 function T(e) {
9113 var t, n, i, r, s, a, o, h, u, f, d = [],
9114 g = e.length,
9115 y = 0,
9116 k = 128,
9117 v = 72;
9118 for ((n = e.lastIndexOf("-")) < 0 && (n = 0), i = 0; i < n; ++i) e.charCodeAt(
9119 i) >= 128 && m("not-basic"), d.push(e.charCodeAt(i));
9120 for (r = n > 0 ? n + 1 : 0; r < g;) {
9121 for (s = y, a = 1, o = l; r >= g && m("invalid-input"), ((h = b(e.charCodeAt(
9122 r++))) >= l || h > p((c - y) / a)) && m("overflow"), y += h * a, !(h <
9123 (u = o <= v ? 1 : o >= v + 26 ? 26 : o - v)); o += l) a > p(c / (f =
9124 l - u)) && m("overflow"), a *= f;
9125 v = S(y - s, t = d.length + 1, 0 == s), p(y / t) > c - k && m(
9126 "overflow"), k += p(y / t), y %= t, d.splice(y++, 0, k)
9127 }
9128 return w(d)
9129 }
9130
9131 function I(e) {
9132 var t, n, i, r, s, a, o, h, u, f, d, y, k, w, b, T = [];
9133 for (y = (e = v(e)).length, t = 128, n = 0, s = 72, a = 0; a < y; ++a)(d =
9134 e[a]) < 128 && T.push(g(d));
9135 for (i = r = T.length, r && T.push("-"); i < y;) {
9136 for (o = c, a = 0; a < y; ++a)(d = e[a]) >= t && d < o && (o = d);
9137 for (o - t > p((c - n) / (k = i + 1)) && m("overflow"), n += (o - t) *
9138 k, t = o, a = 0; a < y; ++a)
9139 if ((d = e[a]) < t && ++n > c && m("overflow"), d == t) {
9140 for (h = n, u = l; !(h < (f = u <= s ? 1 : u >= s + 26 ? 26 : u - s)); u +=
9141 l) b = h - f, w = l - f, T.push(g(x(f + b % w, 0))), h = p(b / w);
9142 T.push(g(x(h, 0))), s = S(n, k, i == r), n = 0, ++i
9143 }++n, ++t
9144 }
9145 return T.join("")
9146 }
9147 o = {
9148 version: "1.4.1",
9149 ucs2: {
9150 decode: v,
9151 encode: w
9152 },
9153 decode: T,
9154 encode: I,
9155 toASCII: function(e) {
9156 return k(e, (function(e) {
9157 return u.test(e) ? "xn--" + I(e) : e
9158 }))
9159 },
9160 toUnicode: function(e) {
9161 return k(e, (function(e) {
9162 return h.test(e) ? T(e.slice(4).toLowerCase()) : e
9163 }))
9164 }
9165 }, void 0 === (r = function() {
9166 return o
9167 }.call(t, n, t, e)) || (e.exports = r)
9168 }()
9169 }).call(this, n(62)(e), n(12))
9170}, function(e, t) {
9171 e.exports = function(e) {
9172 return e.webpackPolyfill || (e.deprecate = function() {}, e.paths = [], e.children ||
9173 (e.children = []), Object.defineProperty(e, "loaded", {
9174 enumerable: !0,
9175 get: function() {
9176 return e.l
9177 }
9178 }), Object.defineProperty(e, "id", {
9179 enumerable: !0,
9180 get: function() {
9181 return e.i
9182 }
9183 }), e.webpackPolyfill = 1), e
9184 }
9185}, function(e, t, n) {
9186 "use strict";
9187 e.exports = {
9188 isString: function(e) {
9189 return "string" == typeof e
9190 },
9191 isObject: function(e) {
9192 return "object" == typeof e && null !== e
9193 },
9194 isNull: function(e) {
9195 return null === e
9196 },
9197 isNullOrUndefined: function(e) {
9198 return null == e
9199 }
9200 }
9201}, function(e, t, n) {
9202 "use strict";
9203 t.decode = t.parse = n(65), t.encode = t.stringify = n(66)
9204}, function(e, t, n) {
9205 "use strict";
9206
9207 function i(e, t) {
9208 return Object.prototype.hasOwnProperty.call(e, t)
9209 }
9210 e.exports = function(e, t, n, s) {
9211 t = t || "&", n = n || "=";
9212 var a = {};
9213 if ("string" != typeof e || 0 === e.length) return a;
9214 var o = /\+/g;
9215 e = e.split(t);
9216 var c = 1e3;
9217 s && "number" == typeof s.maxKeys && (c = s.maxKeys);
9218 var l = e.length;
9219 c > 0 && l > c && (l = c);
9220 for (var h = 0; h < l; ++h) {
9221 var u, f, d, p, g = e[h].replace(o, "%20"),
9222 m = g.indexOf(n);
9223 m >= 0 ? (u = g.substr(0, m), f = g.substr(m + 1)) : (u = g, f = ""), d =
9224 decodeURIComponent(u), p = decodeURIComponent(f), i(a, d) ? r(a[d]) ? a[
9225 d].push(p) : a[d] = [a[d], p] : a[d] = p
9226 }
9227 return a
9228 };
9229 var r = Array.isArray || function(e) {
9230 return "[object Array]" === Object.prototype.toString.call(e)
9231 }
9232}, function(e, t, n) {
9233 "use strict";
9234 var i = function(e) {
9235 switch (typeof e) {
9236 case "string":
9237 return e;
9238 case "boolean":
9239 return e ? "true" : "false";
9240 case "number":
9241 return isFinite(e) ? e : "";
9242 default:
9243 return ""
9244 }
9245 };
9246 e.exports = function(e, t, n, o) {
9247 return t = t || "&", n = n || "=", null === e && (e = void 0), "object" ==
9248 typeof e ? s(a(e), (function(a) {
9249 var o = encodeURIComponent(i(a)) + n;
9250 return r(e[a]) ? s(e[a], (function(e) {
9251 return o + encodeURIComponent(i(e))
9252 })).join(t) : o + encodeURIComponent(i(e[a]))
9253 })).join(t) : o ? encodeURIComponent(i(o)) + n + encodeURIComponent(i(e)) :
9254 ""
9255 };
9256 var r = Array.isArray || function(e) {
9257 return "[object Array]" === Object.prototype.toString.call(e)
9258 };
9259
9260 function s(e, t) {
9261 if (e.map) return e.map(t);
9262 for (var n = [], i = 0; i < e.length; i++) n.push(t(e[i], i));
9263 return n
9264 }
9265 var a = Object.keys || function(e) {
9266 var t = [];
9267 for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.push(n);
9268 return t
9269 }
9270}, function(e, t, n) {
9271 ! function() {
9272 var t = n(68),
9273 i = n(20).utf8,
9274 r = n(69),
9275 s = n(20).bin,
9276 a = function(e, n) {
9277 e.constructor == String ? e = n && "binary" === n.encoding ? s.stringToBytes(
9278 e) : i.stringToBytes(e) : r(e) ? e = Array.prototype.slice.call(e, 0) :
9279 Array.isArray(e) || (e = e.toString());
9280 for (var o = t.bytesToWords(e), c = 8 * e.length, l = 1732584193, h = -
9281 271733879, u = -1732584194, f = 271733878, d = 0; d < o.length; d++) o[
9282 d] = 16711935 & (o[d] << 8 | o[d] >>> 24) | 4278255360 & (o[d] << 24 |
9283 o[d] >>> 8);
9284 o[c >>> 5] |= 128 << c % 32, o[14 + (c + 64 >>> 9 << 4)] = c;
9285 var p = a._ff,
9286 g = a._gg,
9287 m = a._hh,
9288 y = a._ii;
9289 for (d = 0; d < o.length; d += 16) {
9290 var k = l,
9291 v = h,
9292 w = u,
9293 b = f;
9294 h = y(h = y(h = y(h = y(h = m(h = m(h = m(h = m(h = g(h = g(h = g(h = g(
9295 h = p(h = p(h = p(h = p(h, u = p(u, f = p(f, l = p(l, h, u,
9296 f, o[d + 0], 7, -680876936), h, u, o[d + 1], 12, -
9297 389564586), l, h, o[d + 2], 17, 606105819), f, l, o[d +
9298 3], 22, -1044525330), u = p(u, f = p(f, l = p(l, h, u,
9299 f, o[d + 4], 7, -176418897), h, u, o[d + 5], 12,
9300 1200080426), l, h, o[d + 6], 17, -1473231341), f, l, o[
9301 d + 7], 22, -45705983), u = p(u, f = p(f, l = p(l, h, u,
9302 f, o[d + 8], 7, 1770035416), h, u, o[d + 9], 12, -
9303 1958414417), l, h, o[d + 10], 17, -42063), f, l, o[d +
9304 11], 22, -1990404162), u = p(u, f = p(f, l = p(l, h, u, f,
9305 o[d + 12], 7, 1804603682), h, u, o[d + 13], 12, -
9306 40341101), l, h, o[d + 14], 17, -1502002290), f, l, o[d +
9307 15], 22, 1236535329), u = g(u, f = g(f, l = g(l, h, u, f,
9308 o[d + 1], 5, -165796510), h, u, o[d + 6], 9, -1069501632),
9309 l, h, o[d + 11], 14, 643717713), f, l, o[d + 0], 20, -
9310 373897302), u = g(u, f = g(f, l = g(l, h, u, f, o[d + 5], 5, -
9311 701558691), h, u, o[d + 10], 9, 38016083), l, h, o[d + 15],
9312 14, -660478335), f, l, o[d + 4], 20, -405537848), u = g(u, f =
9313 g(f, l = g(l, h, u, f, o[d + 9], 5, 568446438), h, u, o[d +
9314 14], 9, -1019803690), l, h, o[d + 3], 14, -187363961), f, l,
9315 o[d + 8], 20, 1163531501), u = g(u, f = g(f, l = g(l, h, u, f,
9316 o[d + 13], 5, -1444681467), h, u, o[d + 2], 9, -51403784), l,
9317 h, o[d + 7], 14, 1735328473), f, l, o[d + 12], 20, -
9318 1926607734), u = m(u, f = m(f, l = m(l, h, u, f, o[d + 5], 4, -
9319 378558), h, u, o[d + 8], 11, -2022574463), l, h, o[d + 11],
9320 16, 1839030562), f, l, o[d + 14], 23, -35309556), u = m(u, f =
9321 m(f, l = m(l, h, u, f, o[d + 1], 4, -1530992060), h, u, o[d + 4],
9322 11, 1272893353), l, h, o[d + 7], 16, -155497632), f, l, o[d +
9323 10], 23, -1094730640), u = m(u, f = m(f, l = m(l, h, u, f, o[d +
9324 13], 4, 681279174), h, u, o[d + 0], 11, -358537222), l, h, o[d +
9325 3], 16, -722521979), f, l, o[d + 6], 23, 76029189), u = m(u, f =
9326 m(f, l = m(l, h, u, f, o[d + 9], 4, -640364487), h, u, o[d + 12],
9327 11, -421815835), l, h, o[d + 15], 16, 530742520), f, l, o[d + 2],
9328 23, -995338651), u = y(u, f = y(f, l = y(l, h, u, f, o[d + 0], 6, -
9329 198630844), h, u, o[d + 7], 10, 1126891415), l, h, o[d + 14], 15, -
9330 1416354905), f, l, o[d + 5], 21, -57434055), u = y(u, f = y(f, l =
9331 y(l, h, u, f, o[d + 12], 6, 1700485571), h, u, o[d + 3], 10, -
9332 1894986606), l, h, o[d + 10], 15, -1051523), f, l, o[d + 1], 21, -
9333 2054922799), u = y(u, f = y(f, l = y(l, h, u, f, o[d + 8], 6,
9334 1873313359), h, u, o[d + 15], 10, -30611744), l, h, o[d + 6], 15, -
9335 1560198380), f, l, o[d + 13], 21, 1309151649), u = y(u, f = y(f, l =
9336 y(l, h, u, f, o[d + 4], 6, -145523070), h, u, o[d + 11], 10, -
9337 1120210379), l, h, o[d + 2], 15, 718787259), f, l, o[d + 9], 21, -
9338 343485551), l = l + k >>> 0, h = h + v >>> 0, u = u + w >>> 0, f = f +
9339 b >>> 0
9340 }
9341 return t.endian([l, h, u, f])
9342 };
9343 a._ff = function(e, t, n, i, r, s, a) {
9344 var o = e + (t & n | ~t & i) + (r >>> 0) + a;
9345 return (o << s | o >>> 32 - s) + t
9346 }, a._gg = function(e, t, n, i, r, s, a) {
9347 var o = e + (t & i | n & ~i) + (r >>> 0) + a;
9348 return (o << s | o >>> 32 - s) + t
9349 }, a._hh = function(e, t, n, i, r, s, a) {
9350 var o = e + (t ^ n ^ i) + (r >>> 0) + a;
9351 return (o << s | o >>> 32 - s) + t
9352 }, a._ii = function(e, t, n, i, r, s, a) {
9353 var o = e + (n ^ (t | ~i)) + (r >>> 0) + a;
9354 return (o << s | o >>> 32 - s) + t
9355 }, a._blocksize = 16, a._digestsize = 16, e.exports = function(e, n) {
9356 if (null == e) throw new Error("Illegal argument " + e);
9357 var i = t.wordsToBytes(a(e, n));
9358 return n && n.asBytes ? i : n && n.asString ? s.bytesToString(i) : t.bytesToHex(
9359 i)
9360 }
9361 }()
9362}, function(e, t) {
9363 ! function() {
9364 var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
9365 n = {
9366 rotl: function(e, t) {
9367 return e << t | e >>> 32 - t
9368 },
9369 rotr: function(e, t) {
9370 return e << 32 - t | e >>> t
9371 },
9372 endian: function(e) {
9373 if (e.constructor == Number) return 16711935 & n.rotl(e, 8) |
9374 4278255360 & n.rotl(e, 24);
9375 for (var t = 0; t < e.length; t++) e[t] = n.endian(e[t]);
9376 return e
9377 },
9378 randomBytes: function(e) {
9379 for (var t = []; e > 0; e--) t.push(Math.floor(256 * Math.random()));
9380 return t
9381 },
9382 bytesToWords: function(e) {
9383 for (var t = [], n = 0, i = 0; n < e.length; n++, i += 8) t[i >>> 5] |=
9384 e[n] << 24 - i % 32;
9385 return t
9386 },
9387 wordsToBytes: function(e) {
9388 for (var t = [], n = 0; n < 32 * e.length; n += 8) t.push(e[n >>> 5] >>>
9389 24 - n % 32 & 255);
9390 return t
9391 },
9392 bytesToHex: function(e) {
9393 for (var t = [], n = 0; n < e.length; n++) t.push((e[n] >>> 4).toString(
9394 16)), t.push((15 & e[n]).toString(16));
9395 return t.join("")
9396 },
9397 hexToBytes: function(e) {
9398 for (var t = [], n = 0; n < e.length; n += 2) t.push(parseInt(e.substr(
9399 n, 2), 16));
9400 return t
9401 },
9402 bytesToBase64: function(e) {
9403 for (var n = [], i = 0; i < e.length; i += 3)
9404 for (var r = e[i] << 16 | e[i + 1] << 8 | e[i + 2], s = 0; s < 4; s++)
9405 8 * i + 6 * s <= 8 * e.length ? n.push(t.charAt(r >>> 6 * (3 - s) &
9406 63)) : n.push("=");
9407 return n.join("")
9408 },
9409 base64ToBytes: function(e) {
9410 e = e.replace(/[^A-Z0-9+\/]/gi, "");
9411 for (var n = [], i = 0, r = 0; i < e.length; r = ++i % 4) 0 != r && n.push(
9412 (t.indexOf(e.charAt(i - 1)) & Math.pow(2, -2 * r + 8) - 1) << 2 * r |
9413 t.indexOf(e.charAt(i)) >>> 6 - 2 * r);
9414 return n
9415 }
9416 };
9417 e.exports = n
9418 }()
9419}, function(e, t) {
9420 function n(e) {
9421 return !!e.constructor && "function" == typeof e.constructor.isBuffer && e.constructor
9422 .isBuffer(e)
9423 }
9424
9425 e.exports = function(e) {
9426 return null != e && (n(e) || function(e) {
9427 return "function" == typeof e.readFloatLE && "function" == typeof e.slice &&
9428 n(e.slice(0, 0))
9429 }(e) || !!e._isBuffer)
9430 }
9431}, function(e, t) {
9432 e.exports = function(e, t, n, i, r, s, a, o, c) {
9433 this.aiTypes = [{
9434 id: 0,
9435 src: "cow_1",
9436 killScore: 150,
9437 health: 500,
9438 weightM: .8,
9439 speed: 95e-5,
9440 turnSpeed: .001,
9441 scale: 72,
9442 drop: ["food", 50]
9443 }, {
9444 id: 1,
9445 src: "pig_1",
9446 killScore: 200,
9447 health: 800,
9448 weightM: .6,
9449 speed: 85e-5,
9450 turnSpeed: .001,
9451 scale: 72,
9452 drop: ["food", 80]
9453 }, {
9454 id: 2,
9455 name: "Bull",
9456 src: "bull_2",
9457 hostile: !0,
9458 dmg: 20,
9459 killScore: 1e3,
9460 health: 1800,
9461 weightM: .5,
9462 speed: 94e-5,
9463 turnSpeed: 74e-5,
9464 scale: 78,
9465 viewRange: 800,
9466 chargePlayer: !0,
9467 drop: ["food", 100]
9468 }, {
9469 id: 3,
9470 name: "Bully",
9471 src: "bull_1",
9472 hostile: !0,
9473 dmg: 20,
9474 killScore: 2e3,
9475 health: 2800,
9476 weightM: .45,
9477 speed: .001,
9478 turnSpeed: 8e-4,
9479 scale: 90,
9480 viewRange: 900,
9481 chargePlayer: !0,
9482 drop: ["food", 400]
9483 }, {
9484 id: 4,
9485 name: "Wolf",
9486 src: "wolf_1",
9487 hostile: !0,
9488 dmg: 8,
9489 killScore: 500,
9490 health: 300,
9491 weightM: .45,
9492 speed: .001,
9493 turnSpeed: .002,
9494 scale: 84,
9495 viewRange: 800,
9496 chargePlayer: !0,
9497 drop: ["food", 200]
9498 }, {
9499 id: 5,
9500 name: "Quack",
9501 src: "chicken_1",
9502 dmg: 8,
9503 killScore: 2e3,
9504 noTrap: !0,
9505 health: 300,
9506 weightM: .2,
9507 speed: .0018,
9508 turnSpeed: .006,
9509 scale: 70,
9510 drop: ["food", 100]
9511 }, {
9512 id: 6,
9513 name: "MOOSTAFA",
9514 nameScale: 50,
9515 src: "enemy",
9516 hostile: !0,
9517 dontRun: !0,
9518 fixedSpawn: !0,
9519 spawnDelay: 6e4,
9520 noTrap: !0,
9521 colDmg: 100,
9522 dmg: 40,
9523 killScore: 8e3,
9524 health: 18e3,
9525 weightM: .4,
9526 speed: 7e-4,
9527 turnSpeed: .01,
9528 scale: 80,
9529 spriteMlt: 1.8,
9530 leapForce: .9,
9531 viewRange: 1e3,
9532 hitRange: 210,
9533 hitDelay: 1e3,
9534 chargePlayer: !0,
9535 drop: ["food", 100]
9536 }, {
9537 id: 7,
9538 name: "Treasure",
9539 hostile: !0,
9540 nameScale: 35,
9541 src: "crate_1",
9542 fixedSpawn: !0,
9543 spawnDelay: 12e4,
9544 colDmg: 200,
9545 killScore: 5e3,
9546 health: 2e4,
9547 weightM: .1,
9548 speed: 0,
9549 turnSpeed: 0,
9550 scale: 70,
9551 spriteMlt: 1
9552 }, {
9553 id: 8,
9554 name: "MOOFIE",
9555 src: "wolf_2",
9556 hostile: !0,
9557 fixedSpawn: !0,
9558 dontRun: !0,
9559 hitScare: 4,
9560 spawnDelay: 3e4,
9561 noTrap: !0,
9562 nameScale: 35,
9563 dmg: 10,
9564 colDmg: 100,
9565 killScore: 3e3,
9566 health: 7e3,
9567 weightM: .45,
9568 speed: .0015,
9569 turnSpeed: .002,
9570 scale: 90,
9571 viewRange: 800,
9572 chargePlayer: !0,
9573 drop: ["food", 1e3]
9574 }], this.spawn = function(l, h, u, f) {
9575 for (var d, p = 0; p < e.length; ++p)
9576 if (!e[p].active) {
9577 d = e[p];
9578 break
9579 }
9580 return d || (d = new t(e.length, r, n, i, a, s, o, c), e.push(d)), d.init(
9581 l, h, u, f, this.aiTypes[f]), d
9582 }
9583 }
9584}, function(e, t) {
9585 var n = 2 * Math.PI;
9586 e.exports = function(e, t, i, r, s, a, o, c) {
9587 this.sid = e, this.isAI = !0, this.nameIndex = s.randInt(0, a.cowNames.length -
9588 1), this.init = function(e, t, n, i, r) {
9589 this.x = e, this.y = t, this.startX = r.fixedSpawn ? e : null, this.startY =
9590 r.fixedSpawn ? t : null, this.xVel = 0, this.yVel = 0, this.zIndex = 0,
9591 this.dir = n, this.dirPlus = 0, this.index = i, this.src = r.src, r.name &&
9592 (this.name = r.name), this.weightM = r.weightM, this.speed = r.speed,
9593 this.killScore = r.killScore, this.turnSpeed = r.turnSpeed, this.scale =
9594 r.scale, this.maxHealth = r.health, this.leapForce = r.leapForce, this.health =
9595 this.maxHealth, this.chargePlayer = r.chargePlayer, this.viewRange = r.viewRange,
9596 this.drop = r.drop, this.dmg = r.dmg, this.hostile = r.hostile, this.dontRun =
9597 r.dontRun, this.hitRange = r.hitRange, this.hitDelay = r.hitDelay, this
9598 .hitScare = r.hitScare, this.spriteMlt = r.spriteMlt, this.nameScale =
9599 r.nameScale, this.colDmg = r.colDmg, this.noTrap = r.noTrap, this.spawnDelay =
9600 r.spawnDelay, this.hitWait = 0, this.waitCount = 1e3, this.moveCount =
9601 0, this.targetDir = 0, this.active = !0, this.alive = !0, this.runFrom =
9602 null, this.chargeTarget = null, this.dmgOverTime = {}
9603 };
9604 var l = 0;
9605 this.update = function(e) {
9606 if (this.active) {
9607 if (this.spawnCounter) return this.spawnCounter -= e, void(this.spawnCounter <=
9608 0 && (this.spawnCounter = 0, this.x = this.startX || s.randInt(0, a.mapScale),
9609 this.y = this.startY || s.randInt(0, a.mapScale)));
9610 (l -= e) <= 0 && (this.dmgOverTime.dmg && (this.changeHealth(-this.dmgOverTime
9611 .dmg, this.dmgOverTime.doer), this.dmgOverTime.time -= 1, this.dmgOverTime
9612 .time <= 0 && (this.dmgOverTime.dmg = 0)), l = 1e3);
9613 var r = !1,
9614 o = 1;
9615 if (!this.zIndex && !this.lockMove && this.y >= a.mapScale / 2 - a.riverWidth /
9616 2 && this.y <= a.mapScale / 2 + a.riverWidth / 2 && (o = .33, this.xVel +=
9617 a.waterCurrent * e), this.lockMove) this.xVel = 0, this.yVel = 0;
9618 else if (this.waitCount > 0) {
9619 if (this.waitCount -= e, this.waitCount <= 0)
9620 if (this.chargePlayer) {
9621 for (var h, u, f, d = 0; d < i.length; ++d) !i[d].alive || i[d].skin &&
9622 i[d].skin.bullRepel || (f = s.getDistance(this.x, this.y, i[d].x, i[
9623 d].y)) <= this.viewRange && (!h || f < u) && (u = f, h = i[d]);
9624 h ? (this.chargeTarget = h, this.moveCount = s.randInt(8e3, 12e3)) :
9625 (this.moveCount = s.randInt(1e3, 2e3), this.targetDir = s.randFloat(-
9626 Math.PI, Math.PI))
9627 } else this.moveCount = s.randInt(4e3, 1e4), this.targetDir = s.randFloat(-
9628 Math.PI, Math.PI)
9629 } else if (this.moveCount > 0) {
9630 var p = this.speed * o;
9631 if (this.runFrom && this.runFrom.active && (!this.runFrom.isPlayer ||
9632 this.runFrom.alive) ? (this.targetDir = s.getDirection(this.x, this.y,
9633 this.runFrom.x, this.runFrom.y), p *= 1.42) : this.chargeTarget &&
9634 this.chargeTarget.alive && (this.targetDir = s.getDirection(this.chargeTarget
9635 .x, this.chargeTarget.y, this.x, this.y), p *= 1.75, r = !0), this.hitWait &&
9636 (p *= .3), this.dir != this.targetDir) {
9637 this.dir %= n;
9638 var g = (this.dir - this.targetDir + n) % n,
9639 m = Math.min(Math.abs(g - n), g, this.turnSpeed * e),
9640 y = g - Math.PI >= 0 ? 1 : -1;
9641 this.dir += y * m + n
9642 }
9643 this.dir %= n, this.xVel += p * e * Math.cos(this.dir), this.yVel += p *
9644 e * Math.sin(this.dir), this.moveCount -= e, this.moveCount <= 0 && (
9645 this.runFrom = null, this.chargeTarget = null, this.waitCount = this
9646 .hostile ? 1500 : s.randInt(1500, 6e3))
9647 }
9648 this.zIndex = 0, this.lockMove = !1;
9649 var k = s.getDistance(0, 0, this.xVel * e, this.yVel * e),
9650 v = Math.min(4, Math.max(1, Math.round(k / 40))),
9651 w = 1 / v;
9652 for (d = 0; d < v; ++d) {
9653 this.xVel && (this.x += this.xVel * e * w), this.yVel && (this.y +=
9654 this.yVel * e * w), M = t.getGridArrays(this.x, this.y, this.scale);
9655 for (var b = 0; b < M.length; ++b)
9656 for (var x = 0; x < M[b].length; ++x) M[b][x].active && t.checkCollision(
9657 this, M[b][x], w)
9658 }
9659 var S, T, I, E = !1;
9660 if (this.hitWait > 0 && (this.hitWait -= e, this.hitWait <= 0)) {
9661 E = !0, this.hitWait = 0, this.leapForce && !s.randInt(0, 2) && (this.xVel +=
9662 this.leapForce * Math.cos(this.dir), this.yVel += this.leapForce *
9663 Math.sin(this.dir));
9664 for (var M = t.getGridArrays(this.x, this.y, this.hitRange), A = 0; A <
9665 M.length; ++A)
9666 for (b = 0; b < M[A].length; ++b)(S = M[A][b]).health && (T = s.getDistance(
9667 this.x, this.y, S.x, S.y)) < S.scale + this.hitRange && (S.changeHealth(
9668 5 * -this.dmg) && t.disableObj(S), t.hitObj(S, s.getDirection(this
9669 .x, this.y, S.x, S.y)));
9670 for (b = 0; b < i.length; ++b) i[b].canSee(this) && c.send(i[b].id,
9671 "aa", this.sid)
9672 }
9673 if (r || E)
9674 for (d = 0; d < i.length; ++d)(S = i[d]) && S.alive && (T = s.getDistance(
9675 this.x, this.y, S.x, S.y), this.hitRange ? !this.hitWait && T <=
9676 this.hitRange + S.scale && (E ? (I = s.getDirection(S.x, S.y, this.x,
9677 this.y), S.changeHealth(-this.dmg), S.xVel += .6 * Math.cos(I), S
9678 .yVel += .6 * Math.sin(I), this.runFrom = null, this.chargeTarget =
9679 null, this.waitCount = 3e3, this.hitWait = s.randInt(0, 2) ? 0 :
9680 600) : this.hitWait = this.hitDelay) : T <= this.scale + S.scale &&
9681 (I = s.getDirection(S.x, S.y, this.x, this.y), S.changeHealth(-this.dmg),
9682 S.xVel += .55 * Math.cos(I), S.yVel += .55 * Math.sin(I)));
9683 this.xVel && (this.xVel *= Math.pow(a.playerDecel, e)), this.yVel && (
9684 this.yVel *= Math.pow(a.playerDecel, e));
9685 var P = this.scale;
9686 this.x - P < 0 ? (this.x = P, this.xVel = 0) : this.x + P > a.mapScale &&
9687 (this.x = a.mapScale - P, this.xVel = 0), this.y - P < 0 ? (this.y = P,
9688 this.yVel = 0) : this.y + P > a.mapScale && (this.y = a.mapScale - P,
9689 this.yVel = 0)
9690 }
9691 }, this.canSee = function(e) {
9692 if (!e) return !1;
9693 if (e.skin && e.skin.invisTimer && e.noMovTimer >= e.skin.invisTimer)
9694 return !1;
9695 var t = Math.abs(e.x - this.x) - e.scale,
9696 n = Math.abs(e.y - this.y) - e.scale;
9697 return t <= a.maxScreenWidth / 2 * 1.3 && n <= a.maxScreenHeight / 2 *
9698 1.3
9699 };
9700 var h = 0,
9701 u = 0;
9702 this.animate = function(e) {
9703 this.animTime > 0 && (this.animTime -= e, this.animTime <= 0 ? (this.animTime =
9704 0, this.dirPlus = 0, h = 0, u = 0) : 0 == u ? (h += e / (this.animSpeed *
9705 a.hitReturnRatio), this.dirPlus = s.lerp(0, this.targetAngle, Math.min(
9706 1, h)), h >= 1 && (h = 1, u = 1)) : (h -= e / (this.animSpeed * (1 -
9707 a.hitReturnRatio)), this.dirPlus = s.lerp(0, this.targetAngle, Math.max(
9708 0, h))))
9709 }, this.startAnim = function() {
9710 this.animTime = this.animSpeed = 600, this.targetAngle = .8 * Math.PI, h =
9711 0, u = 0
9712 }, this.changeHealth = function(e, t, n) {
9713 if (this.active && (this.health += e, n && (this.hitScare && !s.randInt(
9714 0, this.hitScare) ? (this.runFrom = n, this.waitCount = 0, this.moveCount =
9715 2e3) : this.hostile && this.chargePlayer && n.isPlayer ? (this.chargeTarget =
9716 n, this.waitCount = 0, this.moveCount = 8e3) : this.dontRun || (this
9717 .runFrom = n, this.waitCount = 0, this.moveCount = 2e3)), e < 0 &&
9718 this.hitRange && s.randInt(0, 1) && (this.hitWait = 500), t && t.canSee(
9719 this) && e < 0 && c.send(t.id, "t", Math.round(this.x), Math.round(
9720 this.y), Math.round(-e), 1), this.health <= 0 && (this.spawnDelay ? (
9721 this.spawnCounter = this.spawnDelay, this.x = -1e6, this.y = -1e6) :
9722 (this.x = this.startX || s.randInt(0, a.mapScale), this.y = this.startY ||
9723 s.randInt(0, a.mapScale)), this.health = this.maxHealth, this.runFrom =
9724 null, t && (o(t, this.killScore), this.drop))))
9725 for (var i = 0; i < this.drop.length;) t.addResource(a.resourceTypes.indexOf(
9726 this.drop[i]), this.drop[i + 1]), i += 2
9727 }
9728 }
9729}]);
9730//# sourceMappingURL=bundle.js.map