· 5 years ago · Oct 16, 2020, 01:14 PM
1/// ==UserScript==
2// @name Fast insta Unback solder
3// @namespace Best Hack 2020
4// @version 9.65.7,Beta
5// @description
6// @author SeNoNo and Helper
7// @match *://moomoo.io/*
8// @match *://dev.moomoo.io/*
9// @match *://sandbox.moomoo.io/*
10//@match *://feudalwars.glitch.me/*
11// @grant none
12// @require https://greasyfork.org/scripts/368273-msgpack/code/msgpack.js?version=598723d
13// @require http://code.jquery.com/jquery-3.3.1.min.js
14// @require https://code.jquery.com/ui/1.12.0/jquery-ui.min.js
15// @require https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.0/jquery-confirm.min.js
16// @icon
17// @downloadURL none
18// ==/UserScript==
19
20$("#consentBlock").css({display: "none"});
21//$("#youtuberOf").css({display: "none"});
22$("#mapDisplay").css({background: `url('https://i.imgur.com/fgFsQJp.png')`});
23
24document.getElementById("moomooio_728x90_home").style.display = "none";
25$("#moomooio_728x90_home").parent().css({display: "none"});
26
27window.onbeforeunload = null;
28let mouseX;
29let mouseY;
30
31let width;
32let height;
33
34setInterval(() => {
35 if(clanToggle == 1) {
36 doNewSend(["9", [null]]);
37 doNewSend(["8", [animate(false, 5)]])
38 }
39 doNewSend(["testing", [6]]);
40}, 0);
41
42setInterval(() => {
43 if(messageToggle == 1) {
44 doNewSend(["ch", [animate(true, 5)]])
45 }
46}, 0);
47
48setInterval(() => {
49 if(autoaim == true) {
50 doNewSend(["2", [nearestEnemyAngle]]);
51 }
52}, 0);
53
54setInterval(() => {
55 if(hatToggle == 1) {
56 if(oldHat != normalHat) {
57 hat(normalHat);
58 console.log("Tried. - Hat")
59 }
60 if(oldAcc != normalAcc) {
61 acc(normalAcc);
62 console.log("Tried. - Acc")
63 }
64 oldHat = normalHat;
65 oldAcc = normalAcc
66 }
67}, 25);
68
69function normal() {
70 hat(normalHat);
71 acc(normalAcc);
72}
73
74function aim(x, y){
75 var cvs = document.getElementById("gameCanvas");
76 cvs.dispatchEvent(new MouseEvent("mousemove", {
77 clientX: x,
78 clientY: y
79
80 }));
81}
82
83let coreURL = new URL(window.location.href);
84window.sessionStorage.force = coreURL.searchParams.get("fc");
85
86
87if (window.sessionStorage.force != "false" && window.sessionStorage.force && window.sessionStorage.force.toString() != "null"){
88 document.getElementsByClassName("menuHeader")[0].innerHTML = `Servers <span style="color: red;">Force (${window.sessionStorage.force})</span>`;
89}
90
91
92class ForceSocket extends WebSocket {
93 constructor(...args){
94 if (window.sessionStorage.force != "false" && window.sessionStorage.force && window.sessionStorage.force.toString() != "null"){
95 let server = window.sessionStorage.force;
96 let sip = "";
97 for (let gameServer of window.vultr.servers){
98 if (`${gameServer.region}:${gameServer.index}:0` == server){
99 sip = gameServer.ip;
100 }
101 }
102 args[0] = `wss://ip_${sip}.moomoo.io:8008/?gameIndex=0`;
103 delete window.sessionStorage.force;
104 }
105
106 super(...args);
107
108 }
109
110
111}
112
113WebSocket = ForceSocket;
114
115
116var nearestEnemy;
117var nearestEnemyAngle;
118var isEnemyNear;
119var instaSpeed = 200;
120var primary;
121var secondary;
122var foodType;
123var wallType;
124var spikeType;
125var millType;
126var mineType;
127var trapType;
128var boostType;
129var turretType;
130var spawnpadType;
131var autoaim = false;
132var tick = 0;
133var oldHat;
134var oldAcc;
135var enemiesNear;
136var normalHat;
137var normalAcc;
138var ws;
139var msgpack5 = msgpack;
140var boostDir;
141let myPlayer = {
142 id: null,
143 x: null,
144 y: null,
145 dir: null,
146 object: null,
147 weapon: null,
148 clan: null,
149 isLeader: null,
150 hat: null,
151 accessory: null,
152 isSkull: null
153};
154
155let healSpeed = 90;
156let healSpeed2 = 0;
157var messagecrash = 0;
158var clanToggle = 0;
159var clanCrash = 0;
160var clanfake = 0;
161var messagefake = 0;
162let healToggle = 0;
163let healToggle2 = 0;
164let hatToggle = 0;
165
166document.msgpack = msgpack;
167function n(){
168 this.buffer = new Uint8Array([0]);
169 this.buffer.__proto__ = new Uint8Array;
170 this.type = 0;
171}
172
173WebSocket.prototype.oldSend = WebSocket.prototype.send;
174WebSocket.prototype.send = function(m){
175 if (!ws){
176 document.ws = this;
177
178 ws = this;
179 socketFound(this);
180 }
181 this.oldSend(m);
182};
183
184
185function socketFound(socket){
186 socket.addEventListener('message', function(message){
187 handleMessage(message);
188 });
189}
190
191function handleMessage(m){
192 let temp = msgpack5.decode(new Uint8Array(m.data));
193 let data;
194 if(temp.length > 1) {
195 data = [temp[0], ...temp[1]];
196 if (data[1] instanceof Array){
197 data = data;
198 }
199 } else {
200 data = temp;
201 }
202 let item = data[0];
203 if(!data) {return};
204
205 if(item === "io-init") {
206 let cvs = document.getElementById("gameCanvas");
207 width = cvs.clientWidth;
208 height = cvs.clientHeight;
209 $(window).resize(function() {
210 width = cvs.clientWidth;
211 height = cvs.clientHeight;
212 });
213 cvs.addEventListener("mousemove", e => {
214 mouseX = e.clientX;
215 mouseY = e.clientY;
216 });
217 }
218
219 if (item == "1" && myPlayer.id == null){
220 myPlayer.id = data[1];
221 }
222
223 if (item == "33") {
224 enemiesNear = [];
225 for(let i = 0; i < data[1].length / 13; i++) {
226 let playerInfo = data[1].slice(13*i, 13*i+13);
227 if(playerInfo[0] == myPlayer.id) {
228 myPlayer.x = playerInfo[1];
229 myPlayer.y = playerInfo[2];
230 myPlayer.dir = playerInfo[3];
231 myPlayer.object = playerInfo[4];
232 myPlayer.weapon = playerInfo[5];
233 myPlayer.clan = playerInfo[7];
234 myPlayer.isLeader = playerInfo[8];
235 myPlayer.hat = playerInfo[9];
236 myPlayer.accessory = playerInfo[10];
237 myPlayer.isSkull = playerInfo[11];
238 } else if(playerInfo[7] != myPlayer.clan || playerInfo[7] === null) {
239 enemiesNear.push(playerInfo);
240 }
241 }
242 }
243
244 isEnemyNear = false;
245 if(enemiesNear) {
246 nearestEnemy = enemiesNear.sort((a,b) => dist(a, myPlayer) - dist(b, myPlayer))[0];
247 }
248 if(nearestEnemy) {
249 nearestEnemyAngle = Math.atan2(nearestEnemy[2]-myPlayer.y, nearestEnemy[1]-myPlayer.x);
250 if(Math.sqrt(Math.pow((myPlayer.y-nearestEnemy[2]), 2) + Math.pow((myPlayer.x-nearestEnemy[1]), 2)) < 300) {
251 isEnemyNear = true;
252 if(autoaim == false && myPlayer.hat != 7 && myPlayer.hat != 53) {
253 normalHat = 6;
254 if(primary != 8) {
255 normalAcc = 21
256 }
257 };
258 }
259 }
260 if(isEnemyNear == false && autoaim == false) {
261 normalAcc = 1546541;
262 if (myPlayer.y < 2400){
263 normalHat = 16545;
264 } else if (myPlayer.y > 6850 && myPlayer.y < 7550){
265 normalHat = 64561;
266 } else {
267 normalHat = 12654;
268 }
269 }
270 if (!nearestEnemy) {
271 nearestEnemyAngle = myPlayer.dir;
272 }
273 if(item == "h" && data[1] == myPlayer.id) {
274 if(data[2] < 100 && data[2] > 0 && healToggle == 1) {
275 setTimeout( () => {
276 place(foodType, null);
277 place(foodType, null);
278 }, healSpeed);
279
280 }
281 }
282
283 if(item == "h" && data[1] == myPlayer.id) {
284 if(data[2] < 100 && data[2] > 0 && healToggle2 == 1) {
285 setTimeout( () => {
286 place(foodType, null);
287 place(foodType, null);
288 place(foodType, null);
289 place(foodType, null);
290 }, healSpeed2);
291
292 }
293 }
294 update();
295}
296
297
298function doNewSend(sender){
299 ws.send(new Uint8Array(Array.from(msgpack5.encode(sender))));
300}
301
302function acc(id) {
303 doNewSend(["13c", [0, 0, 1]]);
304 doNewSend(["13c", [0, id, 1]]);
305}
306
307function hat(id) {
308 doNewSend(["13c", [0, id, 0]]);
309}
310
311
312function place(id, angle = Math.atan2(mouseY - height / 2, mouseX - width / 2)) {
313 doNewSend(["5", [id, null]]);
314 doNewSend(["c", [1, angle]]);
315 doNewSend(["c", [0, angle]]);
316 doNewSend(["5", [myPlayer.weapon, true]]);
317}
318
319function boostSpike() {
320 if(boostDir == null) {
321 boostDir = nearestEnemyAngle;
322 }
323 place(spikeType, boostDir + toRad(90));
324 place(spikeType, boostDir - toRad(90));
325 place(boostType, boostDir);
326 doNewSend(["33", [boostDir]]);
327}
328function boostWall() {
329 if(boostDir == null) {
330 boostDir = nearestEnemyAngle;
331 }
332 place(wallType, boostDir + toRad(90));
333 place(wallType, boostDir - toRad(90));
334 place(boostType, boostDir);
335 doNewSend(["33", [boostDir]]);
336}
337function fourSpike() {
338 place(spikeType, myPlayer.dir + toRad(0));
339 place(spikeType, myPlayer.dir - toRad(90));
340 place(spikeType, myPlayer.dir + toRad(90));
341 place(spikeType, myPlayer.dir - toRad(180));
342 place(spikeType, myPlayer.dir + toRad(45));
343 place(spikeType, myPlayer.dir - toRad(45));
344 place(spikeType, myPlayer.dir + toRad(135));
345 place(spikeType, myPlayer.dir - toRad(135));
346 place(spikeType, myPlayer.dir + toRad(60));
347 place(spikeType, myPlayer.dir - toRad(60));
348 place(spikeType, myPlayer.dir + toRad(150));
349 place(spikeType, myPlayer.dir - toRad(150));
350 place(spikeType, myPlayer.dir + toRad(30));
351 place(spikeType, myPlayer.dir - toRad(30));
352 place(spikeType, myPlayer.dir + toRad(120));
353 place(spikeType, myPlayer.dir - toRad(120));
354}
355function fourSpawnpad() {
356 place(spawnpadType, myPlayer.dir + toRad(135));
357 place(spawnpadType, myPlayer.dir + toRad(150));
358 place(spawnpadType, myPlayer.dir + toRad(165));
359 place(spawnpadType, myPlayer.dir + toRad(180));
360 place(spawnpadType, myPlayer.dir + toRad(195));
361 place(spawnpadType, myPlayer.dir + toRad(210));
362 place(spawnpadType, myPlayer.dir + toRad(225));
363 place(spawnpadType, myPlayer.dir + toRad(240));
364 place(spawnpadType, myPlayer.dir + toRad(255));
365 place(spawnpadType, myPlayer.dir + toRad(270));
366 place(spawnpadType, myPlayer.dir + toRad(285));
367 place(spawnpadType, myPlayer.dir + toRad(300));
368 place(spawnpadType, myPlayer.dir + toRad(315));
369 place(spawnpadType, myPlayer.dir + toRad(330));
370 place(spawnpadType, myPlayer.dir + toRad(345));
371 place(spawnpadType, myPlayer.dir + toRad(360));
372}
373
374function fourTrap() {
375 place(trapType, myPlayer.dir + toRad(135));
376 place(trapType, myPlayer.dir + toRad(150));
377 place(trapType, myPlayer.dir + toRad(165));
378 place(trapType, myPlayer.dir + toRad(180));
379 place(trapType, myPlayer.dir + toRad(195));
380 place(trapType, myPlayer.dir + toRad(210));
381 place(trapType, myPlayer.dir + toRad(225));
382 place(trapType, myPlayer.dir + toRad(240));
383 place(trapType, myPlayer.dir + toRad(255));
384 place(trapType, myPlayer.dir + toRad(270));
385 place(trapType, myPlayer.dir + toRad(285));
386 place(trapType, myPlayer.dir + toRad(300));
387 place(trapType, myPlayer.dir + toRad(315));
388 place(trapType, myPlayer.dir + toRad(330));
389 place(trapType, myPlayer.dir + toRad(345));
390 place(trapType, myPlayer.dir + toRad(360));
391}
392var repeater = function(key, action, interval, bu) {
393 let _isKeyDown = false;
394 let _intervalId = undefined;
395
396 return {
397 start(keycode) {
398 if(keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
399 _isKeyDown = true;
400 if(_intervalId === undefined) {
401 _intervalId = setInterval(() => {
402 action();
403 if(!_isKeyDown){
404 clearInterval(_intervalId);
405 _intervalId = undefined;
406 console.log("claered");
407 }
408 }, interval);
409 }
410 }
411 },
412
413 stop(keycode) {
414 if(keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
415 _isKeyDown = false;
416 }
417 }
418 };
419
420
421}
422
423const healer = repeater(81, () => {place(foodType)}, 0);
424const boostPlacer = repeater(70, () => {place(boostType)}, 0);
425const spikePlacer = repeater(86, () => {place(spikeType)}, 0);
426const millPlacer = repeater(78, () => {place(millType)}, 0);
427const turretPlacer = repeater(72, () => {place(turretType)}, 0);
428const wallPlacer = repeater(52, () => {place(wallType)}, 0);
429const boostSpiker = repeater(0, boostSpike, 0);
430const boostWaller = repeater(0, boostWall, 0);
431const fourSpiker = repeater(0, fourSpike, 0);
432const fourTraper = repeater(0, fourTrap, 0);
433const fourSpawnpader = repeater(0, fourSpawnpad, 0);
434
435
436
437
438
439document.addEventListener('keydown', (e)=>{
440 spikePlacer.start(e.keyCode);
441 healer.start(e.keyCode);
442 boostPlacer.start(e.keyCode);
443 boostWaller.start(e.keyCode);
444 fourTraper.start(e.keyCode);
445 fourSpawnpader.start(e.keyCode);
446 fourSpiker.start(e.keyCode);
447 boostSpiker.start(e.keyCode);
448 millPlacer.start(e.keyCode);
449 wallPlacer.start(e.keyCode);
450 turretPlacer.start(e.keyCode);
451
452
453 if(e.keyCode == 187 && document.activeElement.id.toLowerCase() !== 'chatbox') {
454 autoaim = true;
455 doNewSend(["ch", [me(true, 5)]])
456 doNewSend(["13c", [0, 11, 0]]);
457 doNewSend(["13c", [0, 21, 1]]);
458
459 setTimeout( () => {
460 doNewSend(["5", [primary, true]]);
461 doNewSend(["13c", [0, 7, 0]]);
462 doNewSend(["13c", [0, 0, 1]]);
463 doNewSend(["13c", [0, 18, 1]]);
464 doNewSend(["c", [1]]);
465 }, 100);
466
467 setTimeout( () => {
468 doNewSend(["13c", [0, 53, 0]]);
469 doNewSend(["5", [secondary, true]]);
470 }, 200);
471
472 setTimeout( () => {
473 doNewSend(["c", [0]]);
474 doNewSend(["5", [primary, true]]);
475 doNewSend(["13c", [0, 0, 0]]);
476 doNewSend(["13c", [0, 21, 1]]);
477 autoaim = false;
478 }, 300);
479 }
480
481
482 if(e.keyCode == 85 && document.activeElement.id.toLowerCase() !== 'chatbox') {
483 autoaim = true;
484 doNewSend(["5", [primary, true]]);
485 doNewSend(["13c", [0, 7, 0]]);
486 doNewSend(["13c", [0, 0, 1]]);
487 doNewSend(["13c", [0, 18, 1]]);
488 doNewSend(["ch", [mes(true, 5)]])
489 doNewSend(["c", [1]]);
490
491 setTimeout( () => {
492 doNewSend(["6", [5]]);
493 }, 100);
494
495 setTimeout( () => {
496 doNewSend(["13c", [0, 53, 0]]);
497 place(spikeType, myPlayer.dir + toRad(0));
498 }, 200);
499
500 setTimeout( () => {
501 doNewSend(["5", [primary, true]]);
502 doNewSend(["c", [0, null]]);
503 doNewSend(["13c", [0, 0, 0]]);
504 doNewSend(["13c", [0, 0, 0]]);
505 doNewSend(["13c", [0, 19, 0]]);
506 autoaim = false;
507 }, 300);
508 }
509 if(e.keyCode == 32 && document.activeElement.id.toLowerCase() !== 'chatbox') {
510 autoaim = true;
511 doNewSend(["5", [primary, true]]);
512 doNewSend(["13c", [0, 7, 0]]);
513 doNewSend(["13c", [0, 0, 1]]);
514 doNewSend(["13c", [0, 18, 1]]);
515 place(spikeType);
516 doNewSend(["c", [1]]);
517
518 setTimeout( () => {
519 doNewSend(["13c", [0, 53, 0]]);
520 doNewSend(["ch", [Boom(true, 5)]])
521 }, 100);
522
523 setTimeout( () => {
524 doNewSend(["c", [0, null]]);
525 doNewSend(["13c", [0, 0, 0]]);
526 doNewSend(["13c", [0, 0, 0]]);
527 doNewSend(["13c", [0, 19, 1]]);
528 autoaim = false;
529 }, 200);
530 }
531
532if(e.keyCode == 12000 && document.activeElement.id.toLowerCase() !== 'chatbox') {
533 autoaim = false;
534 doNewSend(["5", [primary, true]]);
535 doNewSend(["13c", [0, 7, 0]]);
536 doNewSend(["13c", [0, 0, 1]]);
537 doNewSend(["13c", [0, 18, 1]]);
538 doNewSend(["ch", [hahaha(true, 5)]])
539 doNewSend(["c", [1]]);
540
541 setTimeout( () => {
542 doNewSend(["13c", [0, 53, 0]]);
543 doNewSend(["13c", [0, 21, 1]]);
544 }, instaSpeed - 130);
545
546 setTimeout( () => {
547 doNewSend(["5", [primary, true]]);
548 doNewSend(["c", [0, null]]);
549 doNewSend(["13c", [0, 0, 0]]);
550 doNewSend(["13c", [0, 0, 0]]);
551 doNewSend(["13c", [0, 0, 1]]);
552 autoaim = false;
553 }, instaSpeed);
554 }
555
556 if(e.keyCode == 82 && document.activeElement.id.toLowerCase() !== 'chatbox') {
557 autoaim = true;
558 doNewSend(["5", [primary, true]]);
559 doNewSend(["13c", [0, 7, 0]]);
560 doNewSend(["13c", [0, 0, 1]]);
561 doNewSend(["13c", [0, 18, 1]]);
562 doNewSend(["ch", [mess(true, 5)]])
563 doNewSend(["c", [1]]);
564
565 setTimeout( () => {
566 doNewSend(["13c", [0, 0, 0]]);
567 doNewSend(["13c", [0, 0, 0]]);
568 doNewSend(["13c", [0, 0, 0]]);
569 doNewSend(["13c", [0, 53, 0]]);
570 doNewSend(["13c", [0, 21, 1]]);
571 doNewSend(["5", [secondary, true]]);
572 }, instaSpeed - 130);
573
574 setTimeout( () => {
575 doNewSend(["5", [primary, true]]);
576 doNewSend(["c", [0, null]]);
577 doNewSend(["13c", [0, 0, 0]]);
578 doNewSend(["13c", [0, 0, 0]]);
579 doNewSend(["13c", [0, 52, 0]]);
580 doNewSend(["13c", [0, 21, 1]]);
581 doNewSend(["13c", [0, 13, 1]]);
582 doNewSend(["13c", [0, 0, 0]]);
583 doNewSend(["13c", [0, 21, 1]]);
584 doNewSend(["13c", [0, 19, 1]]);
585 doNewSend(["13c", [0, 0, 0]]);
586 doNewSend(["13c", [0, 0, 1]]);
587 doNewSend(["13c", [0, 0, 1]]);
588 autoaim = null;
589 }, instaSpeed);
590 }
591
592 if(e.keyCode == 76 && document.activeElement.id.toLowerCase() !== 'chatbox') {
593 autoaim = false;
594 doNewSend(["13c", [0, 40, 0]]);
595 doNewSend(["c", [1]]);
596
597 setTimeout( () => {
598 doNewSend(["13c", [0, 6, 0]]);
599 }, instaSpeed - 160);
600
601 setTimeout( () => {
602 doNewSend(["5", [primary, true]]);
603 doNewSend(["c", [0, null]]);
604 doNewSend(["13c", [0, 0, 0]]);
605 autoaim = false;
606 }, instaSpeed);
607 }
608 if(e.keyCode == 20 && document.activeElement.id.toLowerCase() !== 'chatbox') {
609 autoaim = true;
610 doNewSend(["13c", [0, 7, 0]]);
611 doNewSend(["13c", [0, 0, 1]]);
612 doNewSend(["13c", [0, 18, 1]]);
613 doNewSend(["c", [1]]);
614
615 setTimeout( () => {
616 doNewSend(["13c", [0, 6, 0]]);
617 doNewSend(["13c", [0, 21, 1]]);
618 }, instaSpeed - 160);
619
620 setTimeout( () => {
621 doNewSend(["5", [primary, true]]);
622 doNewSend(["c", [0, null]]);
623 doNewSend(["13c", [0, 0, 0]]);
624 doNewSend(["13c", [0, 19, 1]]);
625 autoaim = false;
626 }, instaSpeed);
627 }
628 if(e.keyCode == 77 && document.activeElement.id.toLowerCase() !== 'chatbox') {
629 autoaim = true;
630 doNewSend(["5", [primary, true]]);
631 doNewSend(["13c", [0, 26, 0]]);
632 doNewSend(["13c", [0, 7, 0]]);
633 doNewSend(["13c", [0, 0, 1]]);
634 doNewSend(["ch", [m(true, 5)]])
635 doNewSend(["13c", [0, 18, 1]]);
636 doNewSend(["c", [1]]);
637 setTimeout( () => {
638 doNewSend(["13c", [0, 53, 0]]);
639 doNewSend(["5", [secondary, true]]);
640 }, instaSpeed - 130);
641
642 setTimeout( () => {
643 doNewSend(["5", [primary, true]]);
644 place(spikeType, myPlayer.dir + toRad(0));
645 doNewSend(["c", [0, null]]);
646 doNewSend(["13c", [0, 0, 0]]);
647 doNewSend(["5", [7]]);
648 doNewSend(["c", [1]]);
649 doNewSend(["c", [0]]);
650 autoaim = false;
651 }, instaSpeed);
652 }
653 if(e.keyCode == 120 && document.activeElement.id.toLowerCase() !== 'chatbox') {
654 autoaim = true;
655 doNewSend(["13c", [0, 0, 1]]);
656 doNewSend(["13c", [0, 7, 0]]);
657 doNewSend(["ch", [lol(true, 5)]])
658 doNewSend(["c", [1]]);
659 setTimeout( () => {
660 doNewSend(["6", [4]]);
661 }, instaSpeed - 130);
662
663 setTimeout( () => {
664 doNewSend(["c", [1]]);
665 doNewSend(["13c", [0, 53, 0]]);
666 doNewSend(["c", [0, null]]);
667 autoaim = false;
668 }, instaSpeed);
669}
670
671
672
673
674
675 if(e.keyCode == 113 && document.activeElement.id.toLowerCase() !== 'chatbox') {
676 healToggle = (healToggle + 1) % 2;
677 if(healToggle == 0) {
678 if(hatToggle == 0) {
679 document.title = "Heal: OFF | Hat: OFF"
680 } else {
681 document.title = "Heal: OFF | Hat: ON"
682 }
683 } else {
684 if(hatToggle == 0) {
685 document.title = "Heal: ON | Hat: OFF"
686 } else {
687 document.title = "Heal: ON | Hat: ON"
688 }
689 }
690 }
691 if(e.keyCode == 118 && document.activeElement.id.toLowerCase() !== 'chatbox') {
692 if (autoaim == false) {
693 autoaim = true;
694 document.title = "Zelta Aim: ON";
695 } else {
696 document.title = "Zelta Aim: OFF";
697 autoaim = false;
698 }
699 }
700
701 if(e.keyCode == 115 && document.activeElement.id.toLowerCase() !== 'chatbox') {
702 healToggle2 = (healToggle2 + 1) % 2;
703 if(healToggle2 == 0) {
704 if(hatToggle == 0) {
705 document.title = "Heal2: OFF | Hat: OFF"
706 } else {
707 document.title = "Heal2: OFF | Hat: ON"
708 }
709 } else {
710 if(hatToggle == 0) {
711 document.title = "Heal2: ON | Hat: OFF"
712 } else {
713 document.title = "Heal2: ON | Hat: ON"
714 }
715 }
716 }
717
718 if(e.keyCode == 190 && document.activeElement.id.toLowerCase() !== 'chatbox') {
719 autoaim = true;
720 doNewSend(["5", [secondary, true]]);
721 doNewSend(["ch", [spam(true, 5)]])
722 doNewSend(["13c", [0, 32, 0]]);
723 doNewSend(["13c", [0, 21, 1]]);
724 doNewSend(["13c", [0, 53, 0]]);
725 doNewSend(["c", [1]]);
726
727 setTimeout( () => {
728 doNewSend(["13c", [0, 32, 19]]);
729 doNewSend(["13c", [0, 21, 1]]);
730 doNewSend(["13c", [0, 32, 0]]);
731 doNewSend(["6", [12]]);
732
733 }, 100);
734
735 setTimeout( () => {
736 doNewSend(["6", [15]]);
737
738 }, 200);
739
740 setTimeout( () => {
741 doNewSend(["c", [0]]);
742 doNewSend(["5", [primary, true]]);
743 autoaim = false;
744 }, 300);
745 }
746
747 if(e.keyCode == 97 && document.activeElement.id.toLowerCase() !== 'chatbox') { ///num1 katana [age 8]
748 doNewSend(["6", [4]]);
749 }
750 if(e.keyCode == 98 && document.activeElement.id.toLowerCase() !== 'chatbox') { ///num2 musket [age 9]
751 doNewSend(["6", [15]]);
752 }
753 if(e.keyCode == 98 && document.activeElement.id.toLowerCase() !== 'chatbox') { ///num2 crossbow [age 8]
754 doNewSend(["6", [12]]);
755 }
756 if(e.keyCode == 105 && document.activeElement.id.toLowerCase() !== 'chatbox') { ///num9 max mill [age 8]
757 doNewSend(["6", [28]]);
758 }
759 if(e.keyCode == 104 && document.activeElement.id.toLowerCase() !== 'chatbox') { ///num8 max wall [age 7]
760 doNewSend(["6", [21]]);
761 }
762 if(e.keyCode == 101 && document.activeElement.id.toLowerCase() !== 'chatbox') { ///num5 spin spike [age 9]
763 doNewSend(["6", [25]]);
764 }
765 if(e.keyCode == 102 && document.activeElement.id.toLowerCase() !== 'chatbox') { ///num6 fast crossbow [age 9]
766 doNewSend(["6", [13]]);
767 }
768 if(e.keyCode == 99 && document.activeElement.id.toLowerCase() !== 'chatbox') { ///num3 great axe [age 8]
769 doNewSend(["6", [2]]);
770 }
771 if(e.keyCode == 11231 && document.activeElement.id.toLowerCase() !== 'chatbox') {
772 hatToggle = (hatToggle + 1) % 2;
773 if(healToggle == 0) {
774 if(hatToggle == 0) {
775 document.title = "Heal: OFF | Hat: OFF"
776 } else {
777 document.title = "Heal: OFF | Hat: ON"
778 }
779 } else {
780 if(hatToggle == 0) {
781 document.title = "Heal: ON | Hat: OFF"
782 } else {
783 document.title = "Heal: ON | Hat: ON"
784 }
785 }
786 }
787})
788
789document.addEventListener('keyup', (e)=>{
790 spikePlacer.stop(e.keyCode);
791 boostPlacer.stop(e.keyCode);
792 boostWaller.stop(e.keyCode);
793 fourTraper.stop(e.keyCode);
794 fourSpawnpader.stop(e.keyCode);
795 fourSpiker.stop(e.keyCode);
796 boostSpiker.stop(e.keyCode);
797 millPlacer.stop(e.keyCode);
798 turretPlacer.stop(e.keyCode);
799 wallPlacer.stop(e.keyCode);
800 healer.stop(e.keyCode);
801 if(e.keyCode == 0 && document.activeElement.id.toLowerCase() !== 'chatbox') {
802 setTimeout( () => {
803 doNewSend(["33", [null]]);
804 boostDir = null;
805 }, 10);
806 }
807 if(e.keyCode == 0 && document.activeElement.id.toLowerCase() !== 'chatbox') {
808 setTimeout( () => {
809 doNewSend(["33"]);
810 }, 1);
811 }
812 if(e.keyCode == 0 && document.activeElement.id.toLowerCase() !== 'chatbox') {
813 setTimeout( () => {
814 doNewSend(["33"]);
815 }, 1);
816 }
817 if(e.keyCode == 0 && document.activeElement.id.toLowerCase() !== 'chatbox') {
818 setTimeout( () => {
819 doNewSend(["33"]);
820 }, 1);
821 }
822 if(e.keyCode == 0 && document.activeElement.id.toLowerCase() !== 'chatbox') {
823 setTimeout( () => {
824 doNewSend(["33", [null]]);
825 boostDir = null;
826 }, 10);
827 }
828})
829function isElementVisible(e) {
830 return (e.offsetParent !== null);
831}
832
833
834function toRad(angle) {
835 return angle * 0.01745329251;
836}
837
838function dist(a, b){
839 return Math.sqrt( Math.pow((b.y-a[2]), 2) + Math.pow((b.x-a[1]), 2) );
840}
841
842function animate(space, chance) {
843 let result = '';
844 let characters;
845 if(space) {
846 characters = '.';
847 } else {
848 characters = '.R';
849 }
850 if(space) {
851 characters = characters.padStart((70 - characters.length) / 6 + characters.length)
852 characters = characters.padEnd(30);
853 }
854 let count = 0;
855 for (let i = 0; i < characters.length; i++ ) {
856 if(Math.floor(Math.random() * chance) == 1 && characters.charAt(i) != "-" && count < 6 && characters.charAt(i) != " ") {
857 result += ".";
858 count++
859 } else {
860 result += characters.charAt(i);
861 }
862 }
863 return result;
864}
865
866function crash(space, chance) {
867 let result = '';
868 let characters;
869 if(space) {
870 characters = '.';
871 } else {
872 characters = '.';
873 }
874 if(space) {
875 characters = characters.padStart((70 - characters.length) / 6 + characters.length)
876 characters = characters.padEnd(30);
877 }
878 let count = 0;
879 for (let i = 0; i < characters.length; i++ ) {
880 if(Math.floor(Math.random() * chance) == 1 && characters.charAt(i) != "-" && count < 6 && characters.charAt(i) != " ") {
881 result += ".";
882 count++
883 } else {
884 result += characters.charAt(i);
885 }
886 }
887 return result;
888}
889
890function fake(space, chance) {
891 let result = '';
892 let characters;
893 if(space) {
894 characters = '.';
895 } else {
896 characters = '.';
897 }
898 if(space) {
899 characters = characters.padStart((70 - characters.length) / 6 + characters.length)
900 characters = characters.padEnd(30);
901 }
902 let count = 0;
903 for (let i = 0; i < characters.length; i++ ) {
904 if(Math.floor(Math.random() * chance) == 1 && characters.charAt(i) != "-" && count < 6 && characters.charAt(i) != " ") {
905 result += "";
906 count++
907 } else {
908 result += characters.charAt(i);
909 }
910 }
911 return result;
912}
913function ReTryPro(space, chance) {
914 let result = '';
915 let characters;
916 if(space) {
917 characters = '.';
918 } else {
919 characters = 'A.R';
920 }
921 if(space) {
922 characters = characters.padStart((30 - characters.length) / 2 + characters.length)
923 characters = characters.padEnd(30);
924 }
925 let count = 0;
926 for (let i = 0; i < characters.length; i++ ) {
927 if(Math.floor(Math.random() * chance) == 1 && characters.charAt(i) != "-" && count < 2 && characters.charAt(i) != " ") {
928 result += ".";
929 count++
930 } else {
931 result += characters.charAt(i);
932 }
933 }
934 return result;
935}
936
937function spam(space, chance) {
938 let result = '';
939 let characters;
940 if(space) {
941 characters = '';
942 }
943 if(space) {
944 characters = characters.padStart((30 - characters.length) / 2 + characters.length)
945 characters = characters.padEnd(30);
946 }
947 let count = 0;
948 for (let i = 0; i < characters.length; i++ ) {
949 if(Math.floor(Math.random() * chance) == 0 && characters.charAt(i) != "-" && count < 0 && characters.charAt(i) != " ") {
950 result += "";
951 count++
952 } else {
953 result += characters.charAt(i);
954 }
955 }
956 return result;
957}
958function lol(space, chance) {
959 let result = '';
960 let characters;
961 if(space) {
962 characters = '';
963 }
964 if(space) {
965 characters = characters.padStart((30 - characters.length) / 2 + characters.length)
966 characters = characters.padEnd(30);
967 }
968 let count = 0;
969 for (let i = 0; i < characters.length; i++ ) {
970 if(Math.floor(Math.random() * chance) == 0 && characters.charAt(i) != "-" && count < 0 && characters.charAt(i) != " ") {
971 result += "";
972 count++
973 } else {
974 result += characters.charAt(i);
975 }
976 }
977 return result;
978}
979 function radar(space, chance) {
980 let result = '';
981 let characters;
982 if(space) {
983 characters = '';
984 }
985 if(space) {
986 characters = characters.padStart((30 - characters.length) / 2 + characters.length)
987 characters = characters.padEnd(30);
988 }
989 let count = 0;
990 for (let i = 0; i < characters.length; i++ ) {
991 if(Math.floor(Math.random() * chance) == 0 && characters.charAt(i) != "-" && count < 0 && characters.charAt(i) != " ") {
992 result += "";
993 count++
994 } else {
995 result += characters.charAt(i);
996 }
997 }
998 return result;
999}
1000 function hahaha(space, chance) {
1001 let result = '';
1002 let characters;
1003 if(space) {
1004 characters = '';
1005 }
1006 if(space) {
1007 characters = characters.padStart((30 - characters.length) / 2 + characters.length)
1008 characters = characters.padEnd(30);
1009 }
1010 let count = 0;
1011 for (let i = 0; i < characters.length; i++ ) {
1012 if(Math.floor(Math.random() * chance) == 0 && characters.charAt(i) != "-" && count < 0 && characters.charAt(i) != " ") {
1013 result += "";
1014 count++
1015 } else {
1016 result += characters.charAt(i);
1017 }
1018 }
1019 return result;
1020}
1021
1022function mess(space, chance) {
1023 let result = '';
1024 let characters;
1025 if(space) {
1026 characters = '';
1027 }
1028 if(space) {
1029 characters = characters.padStart((30 - characters.length) / 2 + characters.length)
1030 characters = characters.padEnd(30);
1031 }
1032 let count = 0;
1033 for (let i = 0; i < characters.length; i++ ) {
1034 if(Math.floor(Math.random() * chance) == 0 && characters.charAt(i) != "-" && count < 0 && characters.charAt(i) != " ") {
1035 result += "";
1036 count++
1037 } else {
1038 result += characters.charAt(i);
1039 }
1040 }
1041 return result;
1042}
1043function m(space, chance) {
1044 let result = '';
1045 let characters;
1046 if(space) {
1047 characters = '';
1048 }
1049 if(space) {
1050 characters = characters.padStart((30 - characters.length) / 2 + characters.length)
1051 characters = characters.padEnd(30);
1052 }
1053 let count = 0;
1054 for (let i = 0; i < characters.length; i++ ) {
1055 if(Math.floor(Math.random() * chance) == 0 && characters.charAt(i) != "-" && count < 0 && characters.charAt(i) != " ") {
1056 result += "";
1057 count++
1058 } else {
1059 result += characters.charAt(i);
1060 }
1061 }
1062 return result;
1063}
1064function Boom(space, chance) {
1065 let result = '';
1066 let characters;
1067 if(space) {
1068 characters = '';
1069 }
1070 if(space) {
1071 characters = characters.padStart((30 - characters.length) / 2 + characters.length)
1072 characters = characters.padEnd(30);
1073 }
1074 let count = 0;
1075 for (let i = 0; i < characters.length; i++ ) {
1076 if(Math.floor(Math.random() * chance) == 0 && characters.charAt(i) != "-" && count < 0 && characters.charAt(i) != " ") {
1077 result += "";
1078 count++
1079 } else {
1080 result += characters.charAt(i);
1081 }
1082 }
1083 return result;
1084}
1085
1086function me(space, chance) {
1087 let result = '';
1088 let characters;
1089 if(space) {
1090 characters = '';
1091 }
1092 if(space) {
1093 characters = characters.padStart((30 - characters.length) / 2 + characters.length)
1094 characters = characters.padEnd(30);
1095 }
1096 let count = 0;
1097 for (let i = 0; i < characters.length; i++ ) {
1098 if(Math.floor(Math.random() * chance) == 0 && characters.charAt(i) != "-" && count < 0 && characters.charAt(i) != " ") {
1099 result += "";
1100 count++
1101 } else {
1102 result += characters.charAt(i);
1103 }
1104 }
1105 return result;
1106}
1107
1108function mes(space, chance) {
1109 let result = '';
1110 let characters;
1111 if(space) {
1112 characters = '';
1113 }
1114 if(space) {
1115 characters = characters.padStart((30 - characters.length) / 2 + characters.length)
1116 characters = characters.padEnd(30);
1117 }
1118 let count = 0;
1119 for (let i = 0; i < characters.length; i++ ) {
1120 if(Math.floor(Math.random() * chance) == 0 && characters.charAt(i) != "-" && count < 0 && characters.charAt(i) != " ") {
1121 result += "";
1122 count++
1123 } else {
1124 result += characters.charAt(i);
1125 }
1126 }
1127 return result;
1128}
1129
1130autoreloadloop = setInterval(function () {
1131 if (autoreloadenough < 200) {
1132 document.title = "autoReloader working";
1133 if (document.getElementById("loadingText").innerHTML == `disconnected<a href="javascript:window.location.href=window.location.href" class="ytLink">reload</a>`) {
1134 document.title = "autoReloader done";
1135 clearInterval(autoreloadloop);
1136 setTimeout(function () {document.title = "Moo Moo";}, 1000)
1137 location.reload();
1138 }
1139 autoreloadenough++;
1140 }
1141 else if (autoreloadenough >= 300) {
1142 clearInterval(autoreloadloop);
1143 document.title = "autoReloader done";
1144 setTimeout(function () {document.title = "Moo Moo";}, 1000)
1145 }
1146}, 50);
1147
1148function update() {
1149 for (let i=0;i<9;i++){
1150 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
1151 primary = i;
1152 }
1153 }
1154
1155 for (let i=9;i<16;i++){
1156 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
1157 secondary = i;
1158 }
1159 }
1160
1161 for (let i=16;i<19;i++){
1162 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
1163 foodType = i - 16;
1164 }
1165 }
1166
1167 for (let i=19;i<22;i++){
1168 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
1169 wallType = i - 16;
1170 }
1171 }
1172
1173 for (let i=22;i<26;i++){
1174 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
1175 spikeType = i - 16;
1176 }
1177 }
1178
1179 for (let i=26;i<29;i++){
1180 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
1181 millType = i - 16;
1182 }
1183 }
1184
1185 for (let i=29;i<31;i++){
1186 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
1187 mineType = i - 16;
1188 }
1189 }
1190
1191 for (let i=31;i<33;i++){
1192 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
1193 boostType = i - 16;
1194 }
1195 }
1196
1197 for (let i=33;i<36;i++){
1198 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
1199 turretType = i - 16;
1200 }
1201 }
1202
1203 for (let i=36;i<37;i++){
1204 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
1205 spawnpadType = i - 16;
1206 }
1207 }
1208
1209 for (let i=37;i<39;i++){
1210 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
1211 turretType = i - 16;
1212 }
1213 }
1214}
1215
1216
1217
1218// Users:Zelta.
1219
1220
1221// ==UserScript==
1222// @name Hat Mod
1223// @namespace https://vk.com/id238966060
1224// @version 2.517
1225// @description Hack hat
1226// @author {AHR_Tw}'^'ouo
1227// @match *.moomoo.io/*
1228// @match *://sandbox.moomoo.io/*
1229// @require http://code.jquery.com/jquery-3.3.1.min.js
1230// @icon https://i.imgur.com/QXNteg3.png
1231// ==/UserScript==
1232
1233
1234
1235
1236// http://keycode.info/
1237// https://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes
1238
1239var ID_WinterCap = 15;
1240var ID_AssassinGear = 56;
1241var ID_Bloodthirster = 55;
1242var ID_FlipperHat = 31;
1243var ID_MarksmanCap = 1;
1244var ID_BushGear = 10;
1245var ID_SoldierHelmet = 6;
1246var ID_AntiVenomGear = 23;
1247var ID_MusketeerHat = 32;
1248var ID_MedicGear = 13;
1249var ID_BullHelmet = 7;
1250var ID_EmpHelmet = 22;
1251var ID_BoosterHat = 12;
1252var ID_BarbarianArmor = 26;
1253var ID_BullMask = 46;
1254var ID_WindmillHat = 14;
1255var ID_SpikeGear = 11;
1256var ID_BushidoArmor = 16;
1257var ID_SamuraiArmor = 20;
1258var ID_ScavengerGear = 27;
1259var ID_TankGear = 40;
1260//Turret Gear. "Use if you want to"
1261var ID_TurretGear = 53;
1262
1263// Keys
1264
1265var TankGearKey = 90;
1266var AssassinGearKey = 107;
1267var BullHelmetKey = 75;
1268var SoldierHelmetKey = 89;
1269var TurretKey = 67;
1270var BoosterHatKey = 66;
1271var uneqiup = 189;
1272var SpikeGearKey = 220;
1273var BushGearKey = 186;
1274var EmpHelmetKey = 221;
1275var SamuraiArmorKey = 74;
1276var ScavengerGearKey = 106;
1277var ID_BarbarianArmor = 89;
1278
1279// Remove all of the ads on the page.
1280
1281try {
1282 document.getElementById("moomooio_728x90_home").style.display = "none";
1283 $("moomooio728x90_home").parent().css({display: "none"});
1284} catch (e) {
1285 console.log("There was an error removing the ads.");
1286}
1287
1288
1289var menuChange = document.createElement("div");
1290menuChange.className = "menuCard";
1291menuChange.id = "mainSettings";
1292menuChange.innerHTML = `
1293<div id="simpleModal" class="modal">
1294 <div class="modal-content">
1295 <div class="modal-header">
1296 <span class="closeBtn">×</span>
1297 <h2 style="font-size: 17px;">Hat Settings</h2>
1298 </div>
1299 <div class="modal-body" style="font-size: 17px;">
1300 <div class="flexControl">
1301 <h3 style="color: red; font-size: 17px;"></h3>
1302 <h3 class="menuPrompt">Tank: </h3> <input value="${String.fromCharCode(TankGearKey)}" id="tankGear" class="keyPressLow" onkeyup="this.value = this.value.toUpperCase();" maxlength="1" type="text"/>
1303 <h3 class="menuPrompt">Bull: </h3> <input value="${String.fromCharCode(BullHelmetKey)}" id="bullHelm" class="keyPressLow" onkeyup="this.value = this.value.toUpperCase();" maxlength="1" type="text"/>
1304 <h3 class="menuPrompt">Soldier: </h3> <input value="${String.fromCharCode(SoldierHelmetKey)}" id="soldier" class="keyPressLow"onkeyup="this.value = this.value.toUpperCase();" maxlength="1" type="text"/>
1305 <h3 class="menuPrompt">Turret: </h3> <input value="${String.fromCharCode(TurretKey)}" id="turret" class="keyPressLow" maxlength="1" onkeyup="this.value = this.value.toUpperCase();" type="text"/>
1306 <h3 class="menuPrompt">Booster: </h3> <input value="${String.fromCharCode(BoosterHatKey)}" id="booster" class="keyPressLow" maxlength="1" onkeyup="this.value = this.value.toUpperCase();" type="text"/>
1307 <h3 class="menuPrompt">Spike: </h3> <input value="${String.fromCharCode(SpikeGearKey)}" id="spikeg" class="keyPressLow" maxlength="1" onkeyup="this.value = this.value.toUpperCase();" type="text"/>
1308 <h3 class="menuPrompt">Samurai: </h3> <input value="${String.fromCharCode(SamuraiArmorKey)}" id="samuraiArmor" class="keyPressLow" onkeyup="this.value = this.value.toUpperCase();" type="text"/>
1309 <h3 class="menuPrompt">Emp: </h3> <input value="${String.fromCharCode(EmpHelmetKey)}" id="empHelmet" class="keyPressLow" onkeyup="this.value = this.value.toUpperCase();" type="text"/>
1310 <h3 class="menuPrompt">Bush: </h3> <input value="${String.fromCharCode(BushGearKey)}" id="bushGear" class="keyPressLow" onkeyup="this.value = this.value.toUpperCase();" type="text"/>
1311 <h3 class="menuPrompt">Assassin: </h3> <input value="${String.fromCharCode(AssassinGearKey)}" id="assassinGear" class="keyPressLow" onkeyup="this.value = this.value.toUpperCase();" type="text"/>
1312 <h3 class="menuPrompt">Scavenger: </h3> <input value="${String.fromCharCode(ScavengerGearKey)}" id="scavengerGear" class="keyPressLow" onkeyup="this.value = this.value.toUpperCase();" type="text"/>
1313 <hr>
1314 <h3 style="font-size: 17px;"> Map Settings </h3>
1315
1316 <label class="container"> Biomes
1317 <input type="checkbox" id="myCheck">
1318 <span class="checkmark"></span>
1319 </label>
1320 </div>
1321 </div>
1322 <div class="modal-footer">
1323 <h3 style="font-size: 17px;">Share this hack with other users!</h3>
1324 <p>Greasy Fork</p>
1325 </div>
1326 </div>
1327</div>
1328`
1329document.body.appendChild(menuChange)
1330
1331
1332$("#tankGear").on("input", () => {
1333 var cval = $("#tankGear").val();
1334 if (cval){
1335 TankGearKey = cval.toUpperCase();
1336 TankGearKey = TankGearKey.charCodeAt(0);
1337 console.log(TankGearKey);
1338 }
1339});
1340
1341$("#scavengerGear").on("input", () => {
1342 var cval = $("#scavengerGear").val();
1343 if (cval){
1344 ScavengerGearKey = cval.toUpperCase();
1345 ScavengerGearKey = ScavengerGearKey.charCodeAt(0);
1346 console.log(ScavengerGearKey);
1347 }
1348});
1349
1350$("#assassinGear").on("input", () => {
1351 var cval = $("#assassinGear").val();
1352 if (cval){
1353 AssassinGearKey = cval.toUpperCase();
1354 AssassinGearKey = AssassinGearKey.charCodeAt(0);
1355 console.log(AssassinGearKey);
1356 }
1357});
1358
1359$("#empHelmet").on("input", () => {
1360 var cval = $("#empHelmet").val();
1361 if (cval){
1362 EmpHelmetKey = cval.toUpperCase();
1363 EmpHelmetKey = EmpHelmetKey.charCodeAt(0);
1364 console.log(EmpHelmetKey);
1365 }
1366});
1367
1368$("#bullHelm").on("input", () => {
1369 var cval = $("#bullHelm").val();
1370 if (cval){
1371 BullHelmetKey = cval.toUpperCase();
1372 BullHelmetKey = BullHelmetKey.charCodeAt(0);
1373 console.log(BullHelmetKey);
1374 }
1375});
1376
1377$("#bushGear").on("input", () => {
1378 var cval = $("#bushGear").val();
1379 if (cval){
1380 BushGearKey = cval.toUpperCase();
1381 BushGearKey = BushGearKey.charCodeAt(0);
1382 console.log(BushGearKey);
1383 }
1384});
1385
1386
1387$("#samuraiArmor").on("input", () => {
1388 var cval = $("#samuraiArmor").val();
1389 if (cval){
1390 SamuraiArmorKey = cval.toUpperCase();
1391 SamuraiArmorKey = SamuraiArmorKey.charCodeAt(0);
1392 console.log(SamuraiArmorKey);
1393 }
1394});
1395
1396$("#soldier").on("input", () => {
1397 var cval = $("#soldier").val();
1398 if (cval){
1399 SoldierHelmetKey = cval.toUpperCase();
1400 SoldierHelmetKey = SoldierHelmetKey.charCodeAt(0);
1401 console.log(SoldierHelmetKey);
1402 }
1403});
1404
1405$("#turret").on("input", () => {
1406 var cval = $("#turret").val();
1407 if (cval){
1408 TurretKey = cval.toUpperCase();
1409 TurretKey = TurretKey.charCodeAt(0);
1410 console.log(TurretKey);
1411 }
1412});
1413
1414$("#booster").on("input", () => {
1415 var cval = $("#booster").val();
1416 if (cval){
1417 BoosterHatKey = cval.toUpperCase();
1418 BoosterHatKey = BoosterHatKey.charCodeAt(0);
1419 console.log(BoosterHatKey);
1420 }
1421});
1422
1423var styleItem = document.createElement("style");
1424styleItem.type = "text/css";
1425styleItem.appendChild(document.createTextNode(`
1426.keyPressLow {
1427 margin-left: 8px;
1428 font-size: 16px;
1429 margin-right: 8px;
1430 height: 25px;
1431 width: 50px;
1432 background-color: #fcfcfc;
1433 border-radius: 3.5px;
1434 border: none;
1435 text-align: center;
1436 color: #4a4a4a;
1437 border: 0.5px solid #f2f2f2;
1438}
1439
1440.menuPrompt {
1441 font-size: 17px;
1442 font-family: 'Hammersmith One';
1443 color: #4A4A4A;
1444 flex: 0.2;
1445 text-align: center;
1446 margin-top: 10px;
1447 display: inline-block;
1448}
1449
1450.modal {
1451 display: none;
1452 position: fixed;
1453 z-index: 1;
1454 left: 0;
1455 top: 0;
1456 overflow: auto;
1457 height: 100%;
1458 width: 100%;
1459}
1460
1461.modal-content {
1462 margin: 10% auto;
1463 width: 40%;
1464 box-shadow: 0 5px 8px 0 rgba(0, 0, 0, 0.2), 0 7px 20px 0 rgba(0, 0, 0, 0.17);
1465 font-size: 14px;
1466 line-height: 1.6;
1467}
1468
1469.modal-header h2,
1470.modal-footer h3 {
1471 margin: 0;
1472}
1473
1474.modal-header {
1475 background: #00FF00;
1476 padding: 15px;
1477 color: #fff;
1478 border-top-left-radius: 5px;
1479 border-top-right-radius: 5px;
1480}
1481
1482.modal-body {
1483 padding: 10px 20px;
1484 background: #fff;
1485}
1486
1487.modal-footer {
1488 background: #00FF00;
1489 padding: 10px;
1490 color: #fff;
1491 text-align: center;
1492 border-bottom-left-radius: 5px;
1493 border-bottom-right-radius: 5px;
1494}
1495
1496.closeBtn {
1497 color: #ccc;
1498 float: right;
1499 font-size: 30px;
1500 color: #fff;
1501}
1502
1503.closeBtn:hover,
1504.closeBtn:focus {
1505 color: #000;
1506 text-decoration: none;
1507 cursor: pointer;
1508}
1509
1510/* Customize the label (the container) */
1511.container {
1512 display: block;
1513 position: relative;
1514 padding-left: 35px;
1515 margin-bottom: 12px;
1516 cursor: pointer;
1517 font-size: 16px;
1518 -webkit-user-select: none;
1519 -moz-user-select: none;
1520 -ms-user-select: none;
1521 user-select: none;
1522}
1523
1524/* Hide the browser's default checkbox */
1525.container input {
1526 position: absolute;
1527 opacity: 0;
1528 cursor: pointer;
1529 height: 0;
1530 width: 0;
1531}
1532
1533/* Create a custom checkbox */
1534.checkmark {
1535 position: absolute;
1536 top: 0;
1537 left: 0;
1538 height: 25px;
1539 width: 25px;
1540 background-color: #eee;
1541}
1542
1543/* On mouse-over, add a grey background color */
1544.container:hover input ~ .checkmark {
1545 background-color: #ccc;
1546}
1547
1548/* When the checkbox is checked, add a blue background */
1549.container input:checked ~ .checkmark {
1550 background-color: #2196F3;
1551}
1552
1553/* Create the checkmark/indicator (hidden when not checked) */
1554.checkmark:after {
1555 content: "";
1556 position: absolute;
1557 display: none;
1558}
1559
1560/* Show the checkmark when checked */
1561.container input:checked ~ .checkmark:after {
1562 display: block;
1563}
1564
1565/* Style the checkmark/indicator */
1566.container .checkmark:after {
1567 left: 9px;
1568 top: 5px;
1569 width: 5px;
1570 height: 10px;
1571 border: solid white;
1572 border-width: 0 3px 3px 0;
1573 -webkit-transform: rotate(45deg);
1574 -ms-transform: rotate(45deg);
1575 transform: rotate(45deg);
1576}
1577
1578`))
1579document.head.appendChild(styleItem);
1580
1581
1582$("#adCard").css({display: "none"});
1583
1584
1585document.addEventListener('keydown', function(e) {
1586 if (e.keyCode == uneqiup && document.activeElement.id.toLowerCase() !== 'chatbox'){
1587 console.log("done")
1588 storeEquip(0);
1589 } else if (e.keyCode == 27){
1590 if (modal.style.display = "none") {
1591 modal.style.display = "block";
1592 } else {
1593 modal.style.display = "none";
1594 }
1595 } else if (e.keyCode == ScavengerGearKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
1596 storeEquip(ID_ScavengerGearGear);
1597 } else if (e.keyCode == AssassinGearKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
1598 storeEquip(ID_AssassinGear);
1599 } else if (e.keyCode == BushGearKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
1600 storeEquip(ID_BushGear);
1601 } else if (e.keyCode == EmpHelmetKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
1602 storeEquip(ID_EmpHelmet);
1603 } else if (e.keyCode == TankGearKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
1604 storeEquip(ID_TankGear);
1605 } else if (e.keyCode == SamuraiArmorKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
1606 storeEquip(ID_SamuraiArmor);
1607 } else if (e.keyCode == SoldierHelmetKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
1608 storeEquip(ID_SoldierHelmet);
1609 } else if (e.keyCode == BullHelmetKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
1610 storeEquip(ID_BullHelmet);
1611 } else if (e.keyCode == BoosterHatKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
1612 storeEquip(ID_BoosterHat);
1613 } else if (e.keyCode == SpikeGearKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
1614 storeEquip(ID_SpikeGear);
1615 } else if (e.keyCode == TurretKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
1616 storeEquip(ID_TurretGear);
1617 }
1618})
1619
1620// Get modal element
1621var modal = document.getElementById("simpleModal");
1622// Get close button
1623var closeBtn = document.getElementsByClassName('closeBtn')[0];
1624
1625// Events
1626closeBtn.addEventListener('click', closeModal);
1627window.addEventListener('click', outsideClick);
1628
1629// Close
1630function closeModal() {
1631 modal.style.display = 'none';
1632}
1633
1634// Close If Outside Click
1635function outsideClick(e) {
1636 if (e.target == modal) {
1637 modal.style.display = 'none';
1638 }
1639}
1640
1641var checkbox = document.querySelector("#myCheck")
1642
1643checkbox.addEventListener('change', function() {
1644 if (this.checked) {
1645 $("#mapDisplay").css({background: `url('https://i.imgur.com/fgFsQJp.png')`});
1646 console.log('checked')
1647 } else {
1648 $("#mapDisplay").css({background: `rgba(0, 0, 0, 0.25)`})
1649 console.log('unchecked')
1650 }
1651})
1652function Parse() {
1653 document.addEventListener('keydown', function (CustomKey1) {
1654 if (CustomKey1.keyCode == 96789876) {
1655 storeBuy(879689)
1656 console.info('Attempted to buy soldier')
1657 }
1658 });
1659 };
1660
1661 document.addEventListener('keydown', function (CustomKey1) {
1662 if (CustomKey1.keyCode == 107) {
1663 storeBuy(7)
1664 console.info('Attempted to buy bull')
1665 }
1666 }
1667 );
1668 ;
1669
1670 document.addEventListener('keydown', function (CustomKey1) {
1671 if (CustomKey1.keyCode == 18) {
1672 storeBuy(40)
1673 console.info('Attempted to buy tank')
1674 }
1675 }
1676 );
1677 ;
1678 document.addEventListener('keydown', function (CustomKey1) {
1679 if (CustomKey1.keyCode == 16) {
1680 storeBuy(12)
1681 console.info('Attempted to buy booster')
1682 }
1683 }
1684 );
1685 ;
1686 document.addEventListener('keydown', function (CustomKey1) {
1687 if (CustomKey1.keyCode == 90) {
1688 storeBuy(53)
1689 console.info('Attempted to buy turret')
1690 }
1691 }
1692 );
1693 ;
1694 document.addEventListener('keydown', function (CustomKey1) {
1695 if (CustomKey1.keyCode == 75) {
1696 storeBuy(20)
1697 console.info('Attempted to buy samurai')
1698 }
1699 }
1700 );
1701 ;
1702 document.addEventListener('keydown', function (CustomKey1) {
1703 if (CustomKey1.keyCode == 221) {
1704 storeBuy(2420)
1705 console.info('Attempted to buy emp')
1706 }
1707 }
1708 );
1709 ;
1710 document.addEventListener('keydown', function (CustomKey1) {
1711 if (CustomKey1.keyCode == 187) {
1712 storeBuy(23431)
1713 console.info('Attempted to buy flipper')
1714 }
1715 }
1716 );
1717 ;
1718 document.addEventListener('keydown', function (CustomKey1) {
1719 if (CustomKey1.keyCode == 45345) {
1720 storeBuy(34534)
1721 console.info('Attempted to buy assassin')
1722 }
1723 }
1724 );
1725 ;
1726 document.addEventListener('keydown', function (CustomKey1) {
1727 if (CustomKey1.keyCode == 345345) {
1728 storeBuy(34534534)
1729 console.info('Attempted to buy bush')
1730 }
1731 }
1732 );
1733 ;
1734 document.addEventListener('keydown', function (CustomKey1) {
1735 if (CustomKey1.keyCode == 106) {
1736 storeBuy(22347)
1737 console.info('Attempted to buy scavenger')
1738 }
1739 }
1740 );
1741 ;
1742Parse();
1743// ==UserScript==
1744// @name Radar
1745// @namespace
1746// @version 2.32.0
1747// @description
1748// @author Zeltaaa
1749// @match *://moomoo.io/*
1750// @match *://dev.moomoo.io/*
1751// @match *://sandbox.moomoo.io/*
1752// @match *://https://moomoo.io/bundle.js/*
1753// @match *://https://sandbox.moomoo.io/bundle.js/*
1754// @grant none
1755// @require https://greasyfork.org/scripts/368273-msgpack/code/msgpack.js?version=598723
1756// @require http://code.jquery.com/jquery-3.3.1.min.js
1757// @require https://code.jquery.com/ui/1.12.0/jquery-ui.min.js
1758// @require https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.0/jquery-confirm.min.js
1759
1760// @downloadURL none
1761// ==/UserScript==
1762! function(e) {
1763 var t = {};
1764
1765 function n(i) {
1766 if (t[i]) return t[i].exports;
1767 var r = t[i] = {
1768 i: i,
1769 l: !1,
1770 exports: {}
1771 };
1772 return e[i].call(r.exports, r, r.exports, n), r.l = !0, r.exports
1773 }
1774 n.m = e, n.c = t, n.d = function(e, t, i) {
1775 n.o(e, t) || Object.defineProperty(e, t, {
1776 enumerable: !0,
1777 get: i
1778 })
1779 }, n.r = function(e) {
1780 "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(
1781 e, Symbol.toStringTag, {
1782 value: "Module"
1783 }), Object.defineProperty(e, "__esModule", {
1784 value: !0
1785 })
1786 }, n.t = function(e, t) {
1787 if (1 & t && (e = n(e)), 8 & t) return e;
1788 if (4 & t && "object" == typeof e && e && e.__esModule) return e;
1789 var i = Object.create(null);
1790 if (n.r(i), Object.defineProperty(i, "default", {
1791 enumerable: !0,
1792 value: e
1793 }), 2 & t && "string" != typeof e)
1794 for (var r in e) n.d(i, r, function(t) {
1795 return e[t]
1796 }.bind(null, r));
1797 return i
1798 }, n.n = function(e) {
1799 var t = e && e.__esModule ? function() {
1800 return e.default
1801 } : function() {
1802 return e
1803 };
1804 return n.d(t, "a", t), t
1805 }, n.o = function(e, t) {
1806 return Object.prototype.hasOwnProperty.call(e, t)
1807 }, n.p = "", n(n.s = 21)
1808}([function(e, t, n) {
1809 var i = t.global = n(25),
1810 r = t.hasBuffer = i && !!i.isBuffer,
1811 s = t.hasArrayBuffer = "undefined" != typeof ArrayBuffer,
1812 a = t.isArray = n(5);
1813 t.isArrayBuffer = s ? function(e) {
1814 return e instanceof ArrayBuffer || p(e)
1815 } : m;
1816 var o = t.isBuffer = r ? i.isBuffer : m,
1817 c = t.isView = s ? ArrayBuffer.isView || y("ArrayBuffer", "buffer") : m;
1818 t.alloc = d, t.concat = function(e, n) {
1819 n || (n = 0, Array.prototype.forEach.call(e, (function(e) {
1820 n += e.length
1821 })));
1822 var i = this !== t && this || e[0],
1823 r = d.call(i, n),
1824 s = 0;
1825 return Array.prototype.forEach.call(e, (function(e) {
1826 s += f.copy.call(e, r, s)
1827 })), r
1828 }, t.from = function(e) {
1829 return "string" == typeof e ? function(e) {
1830 var t = 3 * e.length,
1831 n = d.call(this, t),
1832 i = f.write.call(n, e);
1833 return t !== i && (n = f.slice.call(n, 0, i)), n
1834 }.call(this, e) : g(this).from(e)
1835 };
1836 var l = t.Array = n(28),
1837 h = t.Buffer = n(29),
1838 u = t.Uint8Array = n(30),
1839 f = t.prototype = n(6);
1840
1841 function d(e) {
1842 return g(this).alloc(e)
1843 }
1844 var p = y("ArrayBuffer");
1845
1846 function g(e) {
1847 return o(e) ? h : c(e) ? u : a(e) ? l : r ? h : s ? u : l
1848 }
1849
1850 function m() {
1851 return !1
1852 }
1853
1854 function y(e, t) {
1855 return e = "[object " + e + "]",
1856 function(n) {
1857 return null != n && {}.toString.call(t ? n[t] : n) === e
1858 }
1859 }
1860}, function(e, t, n) {
1861 var i = n(5);
1862 t.createCodec = o, t.install = function(e) {
1863 for (var t in e) s.prototype[t] = a(s.prototype[t], e[t])
1864 }, t.filter = function(e) {
1865 return i(e) ? function(e) {
1866 return e = e.slice(),
1867 function(n) {
1868 return e.reduce(t, n)
1869 };
1870
1871 function t(e, t) {
1872 return t(e)
1873 }
1874 }(e) : e
1875 };
1876 var r = n(0);
1877
1878 function s(e) {
1879 if (!(this instanceof s)) return new s(e);
1880 this.options = e, this.init()
1881 }
1882
1883 function a(e, t) {
1884 return e && t ? function() {
1885 return e.apply(this, arguments), t.apply(this, arguments)
1886 } : e || t
1887 }
1888
1889 function o(e) {
1890 return new s(e)
1891 }
1892 s.prototype.init = function() {
1893 var e = this.options;
1894 return e && e.uint8array && (this.bufferish = r.Uint8Array), this
1895 }, t.preset = o({
1896 preset: !0
1897 })
1898}, function(e, t, n) {
1899 var i = n(3).ExtBuffer,
1900 r = n(32),
1901 s = n(33),
1902 a = n(1);
1903
1904 function o() {
1905 var e = this.options;
1906 return this.encode = function(e) {
1907 var t = s.getWriteType(e);
1908 return function(e, n) {
1909 var i = t[typeof n];
1910 if (!i) throw new Error('Unsupported type "' + typeof n + '": ' + n);
1911 i(e, n)
1912 }
1913 }(e), e && e.preset && r.setExtPackers(this), this
1914 }
1915 a.install({
1916 addExtPacker: function(e, t, n) {
1917 n = a.filter(n);
1918 var r = t.name;
1919 r && "Object" !== r ? (this.extPackers || (this.extPackers = {}))[r] =
1920 s : (this.extEncoderList || (this.extEncoderList = [])).unshift([t, s]);
1921
1922 function s(t) {
1923 return n && (t = n(t)), new i(t, e)
1924 }
1925 },
1926 getExtPacker: function(e) {
1927 var t = this.extPackers || (this.extPackers = {}),
1928 n = e.constructor,
1929 i = n && n.name && t[n.name];
1930 if (i) return i;
1931 for (var r = this.extEncoderList || (this.extEncoderList = []), s = r.length,
1932 a = 0; a < s; a++) {
1933 var o = r[a];
1934 if (n === o[0]) return o[1]
1935 }
1936 },
1937 init: o
1938 }), t.preset = o.call(a.preset)
1939}, function(e, t, n) {
1940 t.ExtBuffer = function e(t, n) {
1941 if (!(this instanceof e)) return new e(t, n);
1942 this.buffer = i.from(t), this.type = n
1943 };
1944 var i = n(0)
1945}, function(e, t) {
1946 t.read = function(e, t, n, i, r) {
1947 var s, a, o = 8 * r - i - 1,
1948 c = (1 << o) - 1,
1949 l = c >> 1,
1950 h = -7,
1951 u = n ? r - 1 : 0,
1952 f = n ? -1 : 1,
1953 d = e[t + u];
1954 for (u += f, s = d & (1 << -h) - 1, d >>= -h, h += o; h > 0; s = 256 * s +
1955 e[t + u], u += f, h -= 8);
1956 for (a = s & (1 << -h) - 1, s >>= -h, h += i; h > 0; a = 256 * a + e[t + u],
1957 u += f, h -= 8);
1958 if (0 === s) s = 1 - l;
1959 else {
1960 if (s === c) return a ? NaN : 1 / 0 * (d ? -1 : 1);
1961 a += Math.pow(2, i), s -= l
1962 }
1963 return (d ? -1 : 1) * a * Math.pow(2, s - i)
1964 }, t.write = function(e, t, n, i, r, s) {
1965 var a, o, c, l = 8 * s - r - 1,
1966 h = (1 << l) - 1,
1967 u = h >> 1,
1968 f = 23 === r ? Math.pow(2, -24) - Math.pow(2, -77) : 0,
1969 d = i ? 0 : s - 1,
1970 p = i ? 1 : -1,
1971 g = t < 0 || 0 === t && 1 / t < 0 ? 1 : 0;
1972 for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (o = isNaN(t) ? 1 : 0, a =
1973 h) : (a = Math.floor(Math.log(t) / Math.LN2), t * (c = Math.pow(2, -a)) <
1974 1 && (a--, c *= 2), (t += a + u >= 1 ? f / c : f * Math.pow(2, 1 - u)) *
1975 c >= 2 && (a++, c /= 2), a + u >= h ? (o = 0, a = h) : a + u >= 1 ? (o =
1976 (t * c - 1) * Math.pow(2, r), a += u) : (o = t * Math.pow(2, u - 1) *
1977 Math.pow(2, r), a = 0)); r >= 8; e[n + d] = 255 & o, d += p, o /= 256,
1978 r -= 8);
1979 for (a = a << r | o, l += r; l > 0; e[n + d] = 255 & a, d += p, a /= 256,
1980 l -= 8);
1981 e[n + d - p] |= 128 * g
1982 }
1983}, function(e, t) {
1984 var n = {}.toString;
1985 e.exports = Array.isArray || function(e) {
1986 return "[object Array]" == n.call(e)
1987 }
1988}, function(e, t, n) {
1989 var i = n(31);
1990 t.copy = c, t.slice = l, t.toString = function(e, t, n) {
1991 return (!a && r.isBuffer(this) ? this.toString : i.toString).apply(this,
1992 arguments)
1993 }, t.write = function(e) {
1994 return function() {
1995 return (this[e] || i[e]).apply(this, arguments)
1996 }
1997 }("write");
1998 var r = n(0),
1999 s = r.global,
2000 a = r.hasBuffer && "TYPED_ARRAY_SUPPORT" in s,
2001 o = a && !s.TYPED_ARRAY_SUPPORT;
2002
2003 function c(e, t, n, s) {
2004 var a = r.isBuffer(this),
2005 c = r.isBuffer(e);
2006 if (a && c) return this.copy(e, t, n, s);
2007 if (o || a || c || !r.isView(this) || !r.isView(e)) return i.copy.call(this,
2008 e, t, n, s);
2009 var h = n || null != s ? l.call(this, n, s) : this;
2010 return e.set(h, t), h.length
2011 }
2012
2013 function l(e, t) {
2014 var n = this.slice || !o && this.subarray;
2015 if (n) return n.call(this, e, t);
2016 var i = r.alloc.call(this, t - e);
2017 return c.call(this, i, 0, e, t), i
2018 }
2019}, function(e, t, n) {
2020 (function(e) {
2021 ! function(t) {
2022 var n, i = "undefined",
2023 r = i !== typeof e && e,
2024 s = i !== typeof Uint8Array && Uint8Array,
2025 a = i !== typeof ArrayBuffer && ArrayBuffer,
2026 o = [0, 0, 0, 0, 0, 0, 0, 0],
2027 c = Array.isArray || function(e) {
2028 return !!e && "[object Array]" == Object.prototype.toString.call(e)
2029 },
2030 l = 4294967296;
2031
2032 function h(e, c, h) {
2033 var b = c ? 0 : 4,
2034 x = c ? 4 : 0,
2035 S = c ? 0 : 3,
2036 T = c ? 1 : 2,
2037 I = c ? 2 : 1,
2038 E = c ? 3 : 0,
2039 M = c ? y : v,
2040 A = c ? k : w,
2041 P = O.prototype,
2042 B = "is" + e,
2043 C = "_" + B;
2044 return P.buffer = void 0, P.offset = 0, P[C] = !0, P.toNumber = R, P.toString =
2045 function(e) {
2046 var t = this.buffer,
2047 n = this.offset,
2048 i = _(t, n + b),
2049 r = _(t, n + x),
2050 s = "",
2051 a = !h && 2147483648 & i;
2052 for (a && (i = ~i, r = l - r), e = e || 10;;) {
2053 var o = i % e * l + r;
2054 if (i = Math.floor(i / e), r = Math.floor(o / e), s = (o % e).toString(
2055 e) + s, !i && !r) break
2056 }
2057 return a && (s = "-" + s), s
2058 }, P.toJSON = R, P.toArray = u, r && (P.toBuffer = f), s && (P.toArrayBuffer =
2059 d), O[B] = function(e) {
2060 return !(!e || !e[C])
2061 }, t[e] = O, O;
2062
2063 function O(e, t, r, c) {
2064 return this instanceof O ? function(e, t, r, c, h) {
2065 if (s && a && (t instanceof a && (t = new s(t)), c instanceof a && (c =
2066 new s(c))), t || r || c || n) {
2067 if (!p(t, r)) h = r, c = t, r = 0, t = new(n || Array)(8);
2068 e.buffer = t, e.offset = r |= 0, i !== typeof c && ("string" ==
2069 typeof c ? function(e, t, n, i) {
2070 var r = 0,
2071 s = n.length,
2072 a = 0,
2073 o = 0;
2074 "-" === n[0] && r++;
2075 for (var c = r; r < s;) {
2076 var h = parseInt(n[r++], i);
2077 if (!(h >= 0)) break;
2078 o = o * i + h, a = a * i + Math.floor(o / l), o %= l
2079 }
2080 c && (a = ~a, o ? o = l - o : a++), j(e, t + b, a), j(e, t + x, o)
2081 }(t, r, c, h || 10) : p(c, h) ? g(t, r, c, h) : "number" == typeof h ?
2082 (j(t, r + b, c), j(t, r + x, h)) : c > 0 ? M(t, r, c) : c < 0 ? A(
2083 t, r, c) : g(t, r, o, 0))
2084 } else e.buffer = m(o, 0)
2085 }(this, e, t, r, c) : new O(e, t, r, c)
2086 }
2087
2088 function R() {
2089 var e = this.buffer,
2090 t = this.offset,
2091 n = _(e, t + b),
2092 i = _(e, t + x);
2093 return h || (n |= 0), n ? n * l + i : i
2094 }
2095
2096 function j(e, t, n) {
2097 e[t + E] = 255 & n, n >>= 8, e[t + I] = 255 & n, n >>= 8, e[t + T] =
2098 255 & n, n >>= 8, e[t + S] = 255 & n
2099 }
2100
2101 function _(e, t) {
2102 return 16777216 * e[t + S] + (e[t + T] << 16) + (e[t + I] << 8) + e[t +
2103 E]
2104 }
2105 }
2106
2107 function u(e) {
2108 var t = this.buffer,
2109 i = this.offset;
2110 return n = null, !1 !== e && 0 === i && 8 === t.length && c(t) ? t : m(t,
2111 i)
2112 }
2113
2114 function f(t) {
2115 var i = this.buffer,
2116 s = this.offset;
2117 if (n = r, !1 !== t && 0 === s && 8 === i.length && e.isBuffer(i)) return i;
2118 var a = new r(8);
2119 return g(a, 0, i, s), a
2120 }
2121
2122 function d(e) {
2123 var t = this.buffer,
2124 i = this.offset,
2125 r = t.buffer;
2126 if (n = s, !1 !== e && 0 === i && r instanceof a && 8 === r.byteLength)
2127 return r;
2128 var o = new s(8);
2129 return g(o, 0, t, i), o.buffer
2130 }
2131
2132 function p(e, t) {
2133 var n = e && e.length;
2134 return t |= 0, n && t + 8 <= n && "string" != typeof e[t]
2135 }
2136
2137 function g(e, t, n, i) {
2138 t |= 0, i |= 0;
2139 for (var r = 0; r < 8; r++) e[t++] = 255 & n[i++]
2140 }
2141
2142 function m(e, t) {
2143 return Array.prototype.slice.call(e, t, t + 8)
2144 }
2145
2146 function y(e, t, n) {
2147 for (var i = t + 8; i > t;) e[--i] = 255 & n, n /= 256
2148 }
2149
2150 function k(e, t, n) {
2151 var i = t + 8;
2152 for (n++; i > t;) e[--i] = 255 & -n ^ 255, n /= 256
2153 }
2154
2155 function v(e, t, n) {
2156 for (var i = t + 8; t < i;) e[t++] = 255 & n, n /= 256
2157 }
2158
2159 function w(e, t, n) {
2160 var i = t + 8;
2161 for (n++; t < i;) e[t++] = 255 & -n ^ 255, n /= 256
2162 }
2163 h("Uint64BE", !0, !0), h("Int64BE", !0, !1), h("Uint64LE", !1, !0), h(
2164 "Int64LE", !1, !1)
2165 }("string" != typeof t.nodeName ? t : this || {})
2166 }).call(this, n(11).Buffer)
2167}, function(e, t, n) {
2168 var i = n(3).ExtBuffer,
2169 r = n(35),
2170 s = n(17).readUint8,
2171 a = n(36),
2172 o = n(1);
2173
2174 function c() {
2175 var e = this.options;
2176 return this.decode = function(e) {
2177 var t = a.getReadToken(e);
2178 return function(e) {
2179 var n = s(e),
2180 i = t[n];
2181 if (!i) throw new Error("Invalid type: " + (n ? "0x" + n.toString(16) :
2182 n));
2183 return i(e)
2184 }
2185 }(e), e && e.preset && r.setExtUnpackers(this), this
2186 }
2187 o.install({
2188 addExtUnpacker: function(e, t) {
2189 (this.extUnpackers || (this.extUnpackers = []))[e] = o.filter(t)
2190 },
2191 getExtUnpacker: function(e) {
2192 return (this.extUnpackers || (this.extUnpackers = []))[e] || function(t) {
2193 return new i(t, e)
2194 }
2195 },
2196 init: c
2197 }), t.preset = c.call(o.preset)
2198}, function(e, t, n) {
2199 t.encode = function(e, t) {
2200 var n = new i(t);
2201 return n.write(e), n.read()
2202 };
2203 var i = n(10).EncodeBuffer
2204}, function(e, t, n) {
2205 t.EncodeBuffer = r;
2206 var i = n(2).preset;
2207
2208 function r(e) {
2209 if (!(this instanceof r)) return new r(e);
2210 if (e && (this.options = e, e.codec)) {
2211 var t = this.codec = e.codec;
2212 t.bufferish && (this.bufferish = t.bufferish)
2213 }
2214 }
2215 n(14).FlexEncoder.mixin(r.prototype), r.prototype.codec = i, r.prototype.write =
2216 function(e) {
2217 this.codec.encode(this, e)
2218 }
2219}, function(e, t, n) {
2220 "use strict";
2221 (function(e) {
2222 /*!
2223 * The buffer module from node.js, for the browser.
2224 *
2225 * @author Feross Aboukhadijeh <http://feross.org>
2226 * @license MIT
2227 */
2228 var i = n(26),
2229 r = n(4),
2230 s = n(27);
2231
2232 function a() {
2233 return c.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823
2234 }
2235
2236 function o(e, t) {
2237 if (a() < t) throw new RangeError("Invalid typed array length");
2238 return c.TYPED_ARRAY_SUPPORT ? (e = new Uint8Array(t)).__proto__ = c.prototype :
2239 (null === e && (e = new c(t)), e.length = t), e
2240 }
2241
2242 function c(e, t, n) {
2243 if (!(c.TYPED_ARRAY_SUPPORT || this instanceof c)) return new c(e, t, n);
2244 if ("number" == typeof e) {
2245 if ("string" == typeof t) throw new Error(
2246 "If encoding is specified then the first argument must be a string");
2247 return u(this, e)
2248 }
2249 return l(this, e, t, n)
2250 }
2251
2252 function l(e, t, n, i) {
2253 if ("number" == typeof t) throw new TypeError(
2254 '"value" argument must not be a number');
2255 return "undefined" != typeof ArrayBuffer && t instanceof ArrayBuffer ?
2256 function(e, t, n, i) {
2257 if (t.byteLength, n < 0 || t.byteLength < n) throw new RangeError(
2258 "'offset' is out of bounds");
2259 if (t.byteLength < n + (i || 0)) throw new RangeError(
2260 "'length' is out of bounds");
2261 return t = void 0 === n && void 0 === i ? new Uint8Array(t) : void 0 ===
2262 i ? new Uint8Array(t, n) : new Uint8Array(t, n, i), c.TYPED_ARRAY_SUPPORT ?
2263 (e = t).__proto__ = c.prototype : e = f(e, t), e
2264 }(e, t, n, i) : "string" == typeof t ? function(e, t, n) {
2265 if ("string" == typeof n && "" !== n || (n = "utf8"), !c.isEncoding(n))
2266 throw new TypeError('"encoding" must be a valid string encoding');
2267 var i = 0 | p(t, n),
2268 r = (e = o(e, i)).write(t, n);
2269 return r !== i && (e = e.slice(0, r)), e
2270 }(e, t, n) : function(e, t) {
2271 if (c.isBuffer(t)) {
2272 var n = 0 | d(t.length);
2273 return 0 === (e = o(e, n)).length || t.copy(e, 0, 0, n), e
2274 }
2275 if (t) {
2276 if ("undefined" != typeof ArrayBuffer && t.buffer instanceof ArrayBuffer ||
2277 "length" in t) return "number" != typeof t.length || function(e) {
2278 return e != e
2279 }(t.length) ? o(e, 0) : f(e, t);
2280 if ("Buffer" === t.type && s(t.data)) return f(e, t.data)
2281 }
2282 throw new TypeError(
2283 "First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object."
2284 )
2285 }(e, t)
2286 }
2287
2288 function h(e) {
2289 if ("number" != typeof e) throw new TypeError(
2290 '"size" argument must be a number');
2291 if (e < 0) throw new RangeError('"size" argument must not be negative')
2292 }
2293
2294 function u(e, t) {
2295 if (h(t), e = o(e, t < 0 ? 0 : 0 | d(t)), !c.TYPED_ARRAY_SUPPORT)
2296 for (var n = 0; n < t; ++n) e[n] = 0;
2297 return e
2298 }
2299
2300 function f(e, t) {
2301 var n = t.length < 0 ? 0 : 0 | d(t.length);
2302 e = o(e, n);
2303 for (var i = 0; i < n; i += 1) e[i] = 255 & t[i];
2304 return e
2305 }
2306
2307 function d(e) {
2308 if (e >= a()) throw new RangeError(
2309 "Attempt to allocate Buffer larger than maximum size: 0x" + a().toString(
2310 16) + " bytes");
2311 return 0 | e
2312 }
2313
2314 function p(e, t) {
2315 if (c.isBuffer(e)) return e.length;
2316 if ("undefined" != typeof ArrayBuffer && "function" == typeof ArrayBuffer
2317 .isView && (ArrayBuffer.isView(e) || e instanceof ArrayBuffer)) return e
2318 .byteLength;
2319 "string" != typeof e && (e = "" + e);
2320 var n = e.length;
2321 if (0 === n) return 0;
2322 for (var i = !1;;) switch (t) {
2323 case "ascii":
2324 case "latin1":
2325 case "binary":
2326 return n;
2327 case "utf8":
2328 case "utf-8":
2329 case void 0:
2330 return z(e).length;
2331 case "ucs2":
2332 case "ucs-2":
2333 case "utf16le":
2334 case "utf-16le":
2335 return 2 * n;
2336 case "hex":
2337 return n >>> 1;
2338 case "base64":
2339 return H(e).length;
2340 default:
2341 if (i) return z(e).length;
2342 t = ("" + t).toLowerCase(), i = !0
2343 }
2344 }
2345
2346 function g(e, t, n) {
2347 var i = e[t];
2348 e[t] = e[n], e[n] = i
2349 }
2350
2351 function m(e, t, n, i, r) {
2352 if (0 === e.length) return -1;
2353 if ("string" == typeof n ? (i = n, n = 0) : n > 2147483647 ? n =
2354 2147483647 : n < -2147483648 && (n = -2147483648), n = +n, isNaN(n) && (
2355 n = r ? 0 : e.length - 1), n < 0 && (n = e.length + n), n >= e.length) {
2356 if (r) return -1;
2357 n = e.length - 1
2358 } else if (n < 0) {
2359 if (!r) return -1;
2360 n = 0
2361 }
2362 if ("string" == typeof t && (t = c.from(t, i)), c.isBuffer(t)) return 0 ===
2363 t.length ? -1 : y(e, t, n, i, r);
2364 if ("number" == typeof t) return t &= 255, c.TYPED_ARRAY_SUPPORT &&
2365 "function" == typeof Uint8Array.prototype.indexOf ? r ? Uint8Array.prototype
2366 .indexOf.call(e, t, n) : Uint8Array.prototype.lastIndexOf.call(e, t, n) :
2367 y(e, [t], n, i, r);
2368 throw new TypeError("val must be string, number or Buffer")
2369 }
2370
2371 function y(e, t, n, i, r) {
2372 var s, a = 1,
2373 o = e.length,
2374 c = t.length;
2375 if (void 0 !== i && ("ucs2" === (i = String(i).toLowerCase()) || "ucs-2" ===
2376 i || "utf16le" === i || "utf-16le" === i)) {
2377 if (e.length < 2 || t.length < 2) return -1;
2378 a = 2, o /= 2, c /= 2, n /= 2
2379 }
2380
2381 function l(e, t) {
2382 return 1 === a ? e[t] : e.readUInt16BE(t * a)
2383 }
2384 if (r) {
2385 var h = -1;
2386 for (s = n; s < o; s++)
2387 if (l(e, s) === l(t, -1 === h ? 0 : s - h)) {
2388 if (-1 === h && (h = s), s - h + 1 === c) return h * a
2389 } else -1 !== h && (s -= s - h), h = -1
2390 } else
2391 for (n + c > o && (n = o - c), s = n; s >= 0; s--) {
2392 for (var u = !0, f = 0; f < c; f++)
2393 if (l(e, s + f) !== l(t, f)) {
2394 u = !1;
2395 break
2396 }
2397 if (u) return s
2398 }
2399 return -1
2400 }
2401
2402 function k(e, t, n, i) {
2403 n = Number(n) || 0;
2404 var r = e.length - n;
2405 i ? (i = Number(i)) > r && (i = r) : i = r;
2406 var s = t.length;
2407 if (s % 2 != 0) throw new TypeError("Invalid hex string");
2408 i > s / 2 && (i = s / 2);
2409 for (var a = 0; a < i; ++a) {
2410 var o = parseInt(t.substr(2 * a, 2), 16);
2411 if (isNaN(o)) return a;
2412 e[n + a] = o
2413 }
2414 return a
2415 }
2416
2417 function v(e, t, n, i) {
2418 return V(z(t, e.length - n), e, n, i)
2419 }
2420
2421 function w(e, t, n, i) {
2422 return V(function(e) {
2423 for (var t = [], n = 0; n < e.length; ++n) t.push(255 & e.charCodeAt(n));
2424 return t
2425 }(t), e, n, i)
2426 }
2427
2428 function b(e, t, n, i) {
2429 return w(e, t, n, i)
2430 }
2431
2432 function x(e, t, n, i) {
2433 return V(H(t), e, n, i)
2434 }
2435
2436 function S(e, t, n, i) {
2437 return V(function(e, t) {
2438 for (var n, i, r, s = [], a = 0; a < e.length && !((t -= 2) < 0); ++a)
2439 i = (n = e.charCodeAt(a)) >> 8, r = n % 256, s.push(r), s.push(i);
2440 return s
2441 }(t, e.length - n), e, n, i)
2442 }
2443
2444 function T(e, t, n) {
2445 return 0 === t && n === e.length ? i.fromByteArray(e) : i.fromByteArray(e
2446 .slice(t, n))
2447 }
2448
2449 function I(e, t, n) {
2450 n = Math.min(e.length, n);
2451 for (var i = [], r = t; r < n;) {
2452 var s, a, o, c, l = e[r],
2453 h = null,
2454 u = l > 239 ? 4 : l > 223 ? 3 : l > 191 ? 2 : 1;
2455 if (r + u <= n) switch (u) {
2456 case 1:
2457 l < 128 && (h = l);
2458 break;
2459 case 2:
2460 128 == (192 & (s = e[r + 1])) && (c = (31 & l) << 6 | 63 & s) > 127 &&
2461 (h = c);
2462 break;
2463 case 3:
2464 s = e[r + 1], a = e[r + 2], 128 == (192 & s) && 128 == (192 & a) && (
2465 c = (15 & l) << 12 | (63 & s) << 6 | 63 & a) > 2047 && (c < 55296 ||
2466 c > 57343) && (h = c);
2467 break;
2468 case 4:
2469 s = e[r + 1], a = e[r + 2], o = e[r + 3], 128 == (192 & s) && 128 ==
2470 (192 & a) && 128 == (192 & o) && (c = (15 & l) << 18 | (63 & s) <<
2471 12 | (63 & a) << 6 | 63 & o) > 65535 && c < 1114112 && (h = c)
2472 }
2473 null === h ? (h = 65533, u = 1) : h > 65535 && (h -= 65536, i.push(h >>>
2474 10 & 1023 | 55296), h = 56320 | 1023 & h), i.push(h), r += u
2475 }
2476 return function(e) {
2477 var t = e.length;
2478 if (t <= E) return String.fromCharCode.apply(String, e);
2479 for (var n = "", i = 0; i < t;) n += String.fromCharCode.apply(String,
2480 e.slice(i, i += E));
2481 return n
2482 }(i)
2483 }
2484 t.Buffer = c, t.SlowBuffer = function(e) {
2485 return +e != e && (e = 0), c.alloc(+e)
2486 }, t.INSPECT_MAX_BYTES = 50, c.TYPED_ARRAY_SUPPORT = void 0 !== e.TYPED_ARRAY_SUPPORT ?
2487 e.TYPED_ARRAY_SUPPORT : function() {
2488 try {
2489 var e = new Uint8Array(1);
2490 return e.__proto__ = {
2491 __proto__: Uint8Array.prototype,
2492 foo: function() {
2493 return 42
2494 }
2495 }, 42 === e.foo() && "function" == typeof e.subarray && 0 === e.subarray(
2496 1, 1).byteLength
2497 } catch (e) {
2498 return !1
2499 }
2500 }(), t.kMaxLength = a(), c.poolSize = 8192, c._augment = function(e) {
2501 return e.__proto__ = c.prototype, e
2502 }, c.from = function(e, t, n) {
2503 return l(null, e, t, n)
2504 }, c.TYPED_ARRAY_SUPPORT && (c.prototype.__proto__ = Uint8Array.prototype,
2505 c.__proto__ = Uint8Array, "undefined" != typeof Symbol && Symbol.species &&
2506 c[Symbol.species] === c && Object.defineProperty(c, Symbol.species, {
2507 value: null,
2508 configurable: !0
2509 })), c.alloc = function(e, t, n) {
2510 return function(e, t, n, i) {
2511 return h(t), t <= 0 ? o(e, t) : void 0 !== n ? "string" == typeof i ?
2512 o(e, t).fill(n, i) : o(e, t).fill(n) : o(e, t)
2513 }(null, e, t, n)
2514 }, c.allocUnsafe = function(e) {
2515 return u(null, e)
2516 }, c.allocUnsafeSlow = function(e) {
2517 return u(null, e)
2518 }, c.isBuffer = function(e) {
2519 return !(null == e || !e._isBuffer)
2520 }, c.compare = function(e, t) {
2521 if (!c.isBuffer(e) || !c.isBuffer(t)) throw new TypeError(
2522 "Arguments must be Buffers");
2523 if (e === t) return 0;
2524 for (var n = e.length, i = t.length, r = 0, s = Math.min(n, i); r < s; ++
2525 r)
2526 if (e[r] !== t[r]) {
2527 n = e[r], i = t[r];
2528 break
2529 }
2530 return n < i ? -1 : i < n ? 1 : 0
2531 }, c.isEncoding = function(e) {
2532 switch (String(e).toLowerCase()) {
2533 case "hex":
2534 case "utf8":
2535 case "utf-8":
2536 case "ascii":
2537 case "latin1":
2538 case "binary":
2539 case "base64":
2540 case "ucs2":
2541 case "ucs-2":
2542 case "utf16le":
2543 case "utf-16le":
2544 return !0;
2545 default:
2546 return !1
2547 }
2548 }, c.concat = function(e, t) {
2549 if (!s(e)) throw new TypeError(
2550 '"list" argument must be an Array of Buffers');
2551 if (0 === e.length) return c.alloc(0);
2552 var n;
2553 if (void 0 === t)
2554 for (t = 0, n = 0; n < e.length; ++n) t += e[n].length;
2555 var i = c.allocUnsafe(t),
2556 r = 0;
2557 for (n = 0; n < e.length; ++n) {
2558 var a = e[n];
2559 if (!c.isBuffer(a)) throw new TypeError(
2560 '"list" argument must be an Array of Buffers');
2561 a.copy(i, r), r += a.length
2562 }
2563 return i
2564 }, c.byteLength = p, c.prototype._isBuffer = !0, c.prototype.swap16 =
2565 function() {
2566 var e = this.length;
2567 if (e % 2 != 0) throw new RangeError(
2568 "Buffer size must be a multiple of 16-bits");
2569 for (var t = 0; t < e; t += 2) g(this, t, t + 1);
2570 return this
2571 }, c.prototype.swap32 = function() {
2572 var e = this.length;
2573 if (e % 4 != 0) throw new RangeError(
2574 "Buffer size must be a multiple of 32-bits");
2575 for (var t = 0; t < e; t += 4) g(this, t, t + 3), g(this, t + 1, t + 2);
2576 return this
2577 }, c.prototype.swap64 = function() {
2578 var e = this.length;
2579 if (e % 8 != 0) throw new RangeError(
2580 "Buffer size must be a multiple of 64-bits");
2581 for (var t = 0; t < e; t += 8) g(this, t, t + 7), g(this, t + 1, t + 6),
2582 g(this, t + 2, t + 5), g(this, t + 3, t + 4);
2583 return this
2584 }, c.prototype.toString = function() {
2585 var e = 0 | this.length;
2586 return 0 === e ? "" : 0 === arguments.length ? I(this, 0, e) : function(
2587 e, t, n) {
2588 var i = !1;
2589 if ((void 0 === t || t < 0) && (t = 0), t > this.length) return "";
2590 if ((void 0 === n || n > this.length) && (n = this.length), n <= 0)
2591 return "";
2592 if ((n >>>= 0) <= (t >>>= 0)) return "";
2593 for (e || (e = "utf8");;) switch (e) {
2594 case "hex":
2595 return P(this, t, n);
2596 case "utf8":
2597 case "utf-8":
2598 return I(this, t, n);
2599 case "ascii":
2600 return M(this, t, n);
2601 case "latin1":
2602 case "binary":
2603 return A(this, t, n);
2604 case "base64":
2605 return T(this, t, n);
2606 case "ucs2":
2607 case "ucs-2":
2608 case "utf16le":
2609 case "utf-16le":
2610 return B(this, t, n);
2611 default:
2612 if (i) throw new TypeError("Unknown encoding: " + e);
2613 e = (e + "").toLowerCase(), i = !0
2614 }
2615 }.apply(this, arguments)
2616 }, c.prototype.equals = function(e) {
2617 if (!c.isBuffer(e)) throw new TypeError("Argument must be a Buffer");
2618 return this === e || 0 === c.compare(this, e)
2619 }, c.prototype.inspect = function() {
2620 var e = "",
2621 n = t.INSPECT_MAX_BYTES;
2622 return this.length > 0 && (e = this.toString("hex", 0, n).match(/.{2}/g)
2623 .join(" "), this.length > n && (e += " ... ")), "<Buffer " + e + ">"
2624 }, c.prototype.compare = function(e, t, n, i, r) {
2625 if (!c.isBuffer(e)) throw new TypeError("Argument must be a Buffer");
2626 if (void 0 === t && (t = 0), void 0 === n && (n = e ? e.length : 0),
2627 void 0 === i && (i = 0), void 0 === r && (r = this.length), t < 0 || n >
2628 e.length || i < 0 || r > this.length) throw new RangeError(
2629 "out of range index");
2630 if (i >= r && t >= n) return 0;
2631 if (i >= r) return -1;
2632 if (t >= n) return 1;
2633 if (this === e) return 0;
2634 for (var s = (r >>>= 0) - (i >>>= 0), a = (n >>>= 0) - (t >>>= 0), o =
2635 Math.min(s, a), l = this.slice(i, r), h = e.slice(t, n), u = 0; u < o; ++
2636 u)
2637 if (l[u] !== h[u]) {
2638 s = l[u], a = h[u];
2639 break
2640 }
2641 return s < a ? -1 : a < s ? 1 : 0
2642 }, c.prototype.includes = function(e, t, n) {
2643 return -1 !== this.indexOf(e, t, n)
2644 }, c.prototype.indexOf = function(e, t, n) {
2645 return m(this, e, t, n, !0)
2646 }, c.prototype.lastIndexOf = function(e, t, n) {
2647 return m(this, e, t, n, !1)
2648 }, c.prototype.write = function(e, t, n, i) {
2649 if (void 0 === t) i = "utf8", n = this.length, t = 0;
2650 else if (void 0 === n && "string" == typeof t) i = t, n = this.length, t =
2651 0;
2652 else {
2653 if (!isFinite(t)) throw new Error(
2654 "Buffer.write(string, encoding, offset[, length]) is no longer supported"
2655 );
2656 t |= 0, isFinite(n) ? (n |= 0, void 0 === i && (i = "utf8")) : (i = n,
2657 n = void 0)
2658 }
2659 var r = this.length - t;
2660 if ((void 0 === n || n > r) && (n = r), e.length > 0 && (n < 0 || t < 0) ||
2661 t > this.length) throw new RangeError(
2662 "Attempt to write outside buffer bounds");
2663 i || (i = "utf8");
2664 for (var s = !1;;) switch (i) {
2665 case "hex":
2666 return k(this, e, t, n);
2667 case "utf8":
2668 case "utf-8":
2669 return v(this, e, t, n);
2670 case "ascii":
2671 return w(this, e, t, n);
2672 case "latin1":
2673 case "binary":
2674 return b(this, e, t, n);
2675 case "base64":
2676 return x(this, e, t, n);
2677 case "ucs2":
2678 case "ucs-2":
2679 case "utf16le":
2680 case "utf-16le":
2681 return S(this, e, t, n);
2682 default:
2683 if (s) throw new TypeError("Unknown encoding: " + i);
2684 i = ("" + i).toLowerCase(), s = !0
2685 }
2686 }, c.prototype.toJSON = function() {
2687 return {
2688 type: "Buffer",
2689 data: Array.prototype.slice.call(this._arr || this, 0)
2690 }
2691 };
2692 var E = 4096;
2693
2694 function M(e, t, n) {
2695 var i = "";
2696 n = Math.min(e.length, n);
2697 for (var r = t; r < n; ++r) i += String.fromCharCode(127 & e[r]);
2698 return i
2699 }
2700
2701 function A(e, t, n) {
2702 var i = "";
2703 n = Math.min(e.length, n);
2704 for (var r = t; r < n; ++r) i += String.fromCharCode(e[r]);
2705 return i
2706 }
2707
2708 function P(e, t, n) {
2709 var i = e.length;
2710 (!t || t < 0) && (t = 0), (!n || n < 0 || n > i) && (n = i);
2711 for (var r = "", s = t; s < n; ++s) r += F(e[s]);
2712 return r
2713 }
2714
2715 function B(e, t, n) {
2716 for (var i = e.slice(t, n), r = "", s = 0; s < i.length; s += 2) r +=
2717 String.fromCharCode(i[s] + 256 * i[s + 1]);
2718 return r
2719 }
2720
2721 function C(e, t, n) {
2722 if (e % 1 != 0 || e < 0) throw new RangeError("offset is not uint");
2723 if (e + t > n) throw new RangeError(
2724 "Trying to access beyond buffer length")
2725 }
2726
2727 function O(e, t, n, i, r, s) {
2728 if (!c.isBuffer(e)) throw new TypeError(
2729 '"buffer" argument must be a Buffer instance');
2730 if (t > r || t < s) throw new RangeError(
2731 '"value" argument is out of bounds');
2732 if (n + i > e.length) throw new RangeError("Index out of range")
2733 }
2734
2735 function R(e, t, n, i) {
2736 t < 0 && (t = 65535 + t + 1);
2737 for (var r = 0, s = Math.min(e.length - n, 2); r < s; ++r) e[n + r] = (t &
2738 255 << 8 * (i ? r : 1 - r)) >>> 8 * (i ? r : 1 - r)
2739 }
2740
2741 function j(e, t, n, i) {
2742 t < 0 && (t = 4294967295 + t + 1);
2743 for (var r = 0, s = Math.min(e.length - n, 4); r < s; ++r) e[n + r] = t >>>
2744 8 * (i ? r : 3 - r) & 255
2745 }
2746
2747 function _(e, t, n, i, r, s) {
2748 if (n + i > e.length) throw new RangeError("Index out of range");
2749 if (n < 0) throw new RangeError("Index out of range")
2750 }
2751
2752 function U(e, t, n, i, s) {
2753 return s || _(e, 0, n, 4), r.write(e, t, n, i, 23, 4), n + 4
2754 }
2755
2756 function D(e, t, n, i, s) {
2757 return s || _(e, 0, n, 8), r.write(e, t, n, i, 52, 8), n + 8
2758 }
2759 c.prototype.slice = function(e, t) {
2760 var n, i = this.length;
2761 if ((e = ~~e) < 0 ? (e += i) < 0 && (e = 0) : e > i && (e = i), (t =
2762 void 0 === t ? i : ~~t) < 0 ? (t += i) < 0 && (t = 0) : t > i && (t =
2763 i), t < e && (t = e), c.TYPED_ARRAY_SUPPORT)(n = this.subarray(e, t)).__proto__ =
2764 c.prototype;
2765 else {
2766 var r = t - e;
2767 n = new c(r, void 0);
2768 for (var s = 0; s < r; ++s) n[s] = this[s + e]
2769 }
2770 return n
2771 }, c.prototype.readUIntLE = function(e, t, n) {
2772 e |= 0, t |= 0, n || C(e, t, this.length);
2773 for (var i = this[e], r = 1, s = 0; ++s < t && (r *= 256);) i += this[e +
2774 s] * r;
2775 return i
2776 }, c.prototype.readUIntBE = function(e, t, n) {
2777 e |= 0, t |= 0, n || C(e, t, this.length);
2778 for (var i = this[e + --t], r = 1; t > 0 && (r *= 256);) i += this[e +
2779 --t] * r;
2780 return i
2781 }, c.prototype.readUInt8 = function(e, t) {
2782 return t || C(e, 1, this.length), this[e]
2783 }, c.prototype.readUInt16LE = function(e, t) {
2784 return t || C(e, 2, this.length), this[e] | this[e + 1] << 8
2785 }, c.prototype.readUInt16BE = function(e, t) {
2786 return t || C(e, 2, this.length), this[e] << 8 | this[e + 1]
2787 }, c.prototype.readUInt32LE = function(e, t) {
2788 return t || C(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e +
2789 2] << 16) + 16777216 * this[e + 3]
2790 }, c.prototype.readUInt32BE = function(e, t) {
2791 return t || C(e, 4, this.length), 16777216 * this[e] + (this[e + 1] <<
2792 16 | this[e + 2] << 8 | this[e + 3])
2793 }, c.prototype.readIntLE = function(e, t, n) {
2794 e |= 0, t |= 0, n || C(e, t, this.length);
2795 for (var i = this[e], r = 1, s = 0; ++s < t && (r *= 256);) i += this[e +
2796 s] * r;
2797 return i >= (r *= 128) && (i -= Math.pow(2, 8 * t)), i
2798 }, c.prototype.readIntBE = function(e, t, n) {
2799 e |= 0, t |= 0, n || C(e, t, this.length);
2800 for (var i = t, r = 1, s = this[e + --i]; i > 0 && (r *= 256);) s +=
2801 this[e + --i] * r;
2802 return s >= (r *= 128) && (s -= Math.pow(2, 8 * t)), s
2803 }, c.prototype.readInt8 = function(e, t) {
2804 return t || C(e, 1, this.length), 128 & this[e] ? -1 * (255 - this[e] +
2805 1) : this[e]
2806 }, c.prototype.readInt16LE = function(e, t) {
2807 t || C(e, 2, this.length);
2808 var n = this[e] | this[e + 1] << 8;
2809 return 32768 & n ? 4294901760 | n : n
2810 }, c.prototype.readInt16BE = function(e, t) {
2811 t || C(e, 2, this.length);
2812 var n = this[e + 1] | this[e] << 8;
2813 return 32768 & n ? 4294901760 | n : n
2814 }, c.prototype.readInt32LE = function(e, t) {
2815 return t || C(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e +
2816 2] << 16 | this[e + 3] << 24
2817 }, c.prototype.readInt32BE = function(e, t) {
2818 return t || C(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 |
2819 this[e + 2] << 8 | this[e + 3]
2820 }, c.prototype.readFloatLE = function(e, t) {
2821 return t || C(e, 4, this.length), r.read(this, e, !0, 23, 4)
2822 }, c.prototype.readFloatBE = function(e, t) {
2823 return t || C(e, 4, this.length), r.read(this, e, !1, 23, 4)
2824 }, c.prototype.readDoubleLE = function(e, t) {
2825 return t || C(e, 8, this.length), r.read(this, e, !0, 52, 8)
2826 }, c.prototype.readDoubleBE = function(e, t) {
2827 return t || C(e, 8, this.length), r.read(this, e, !1, 52, 8)
2828 }, c.prototype.writeUIntLE = function(e, t, n, i) {
2829 e = +e, t |= 0, n |= 0, i || O(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
2830 var r = 1,
2831 s = 0;
2832 for (this[t] = 255 & e; ++s < n && (r *= 256);) this[t + s] = e / r &
2833 255;
2834 return t + n
2835 }, c.prototype.writeUIntBE = function(e, t, n, i) {
2836 e = +e, t |= 0, n |= 0, i || O(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
2837 var r = n - 1,
2838 s = 1;
2839 for (this[t + r] = 255 & e; --r >= 0 && (s *= 256);) this[t + r] = e / s &
2840 255;
2841 return t + n
2842 }, c.prototype.writeUInt8 = function(e, t, n) {
2843 return e = +e, t |= 0, n || O(this, e, t, 1, 255, 0), c.TYPED_ARRAY_SUPPORT ||
2844 (e = Math.floor(e)), this[t] = 255 & e, t + 1
2845 }, c.prototype.writeUInt16LE = function(e, t, n) {
2846 return e = +e, t |= 0, n || O(this, e, t, 2, 65535, 0), c.TYPED_ARRAY_SUPPORT ?
2847 (this[t] = 255 & e, this[t + 1] = e >>> 8) : R(this, e, t, !0), t + 2
2848 }, c.prototype.writeUInt16BE = function(e, t, n) {
2849 return e = +e, t |= 0, n || O(this, e, t, 2, 65535, 0), c.TYPED_ARRAY_SUPPORT ?
2850 (this[t] = e >>> 8, this[t + 1] = 255 & e) : R(this, e, t, !1), t + 2
2851 }, c.prototype.writeUInt32LE = function(e, t, n) {
2852 return e = +e, t |= 0, n || O(this, e, t, 4, 4294967295, 0), c.TYPED_ARRAY_SUPPORT ?
2853 (this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8,
2854 this[t] = 255 & e) : j(this, e, t, !0), t + 4
2855 }, c.prototype.writeUInt32BE = function(e, t, n) {
2856 return e = +e, t |= 0, n || O(this, e, t, 4, 4294967295, 0), c.TYPED_ARRAY_SUPPORT ?
2857 (this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8,
2858 this[t + 3] = 255 & e) : j(this, e, t, !1), t + 4
2859 }, c.prototype.writeIntLE = function(e, t, n, i) {
2860 if (e = +e, t |= 0, !i) {
2861 var r = Math.pow(2, 8 * n - 1);
2862 O(this, e, t, n, r - 1, -r)
2863 }
2864 var s = 0,
2865 a = 1,
2866 o = 0;
2867 for (this[t] = 255 & e; ++s < n && (a *= 256);) e < 0 && 0 === o && 0 !==
2868 this[t + s - 1] && (o = 1), this[t + s] = (e / a >> 0) - o & 255;
2869 return t + n
2870 }, c.prototype.writeIntBE = function(e, t, n, i) {
2871 if (e = +e, t |= 0, !i) {
2872 var r = Math.pow(2, 8 * n - 1);
2873 O(this, e, t, n, r - 1, -r)
2874 }
2875 var s = n - 1,
2876 a = 1,
2877 o = 0;
2878 for (this[t + s] = 255 & e; --s >= 0 && (a *= 256);) e < 0 && 0 === o &&
2879 0 !== this[t + s + 1] && (o = 1), this[t + s] = (e / a >> 0) - o & 255;
2880 return t + n
2881 }, c.prototype.writeInt8 = function(e, t, n) {
2882 return e = +e, t |= 0, n || O(this, e, t, 1, 127, -128), c.TYPED_ARRAY_SUPPORT ||
2883 (e = Math.floor(e)), e < 0 && (e = 255 + e + 1), this[t] = 255 & e, t +
2884 1
2885 }, c.prototype.writeInt16LE = function(e, t, n) {
2886 return e = +e, t |= 0, n || O(this, e, t, 2, 32767, -32768), c.TYPED_ARRAY_SUPPORT ?
2887 (this[t] = 255 & e, this[t + 1] = e >>> 8) : R(this, e, t, !0), t + 2
2888 }, c.prototype.writeInt16BE = function(e, t, n) {
2889 return e = +e, t |= 0, n || O(this, e, t, 2, 32767, -32768), c.TYPED_ARRAY_SUPPORT ?
2890 (this[t] = e >>> 8, this[t + 1] = 255 & e) : R(this, e, t, !1), t + 2
2891 }, c.prototype.writeInt32LE = function(e, t, n) {
2892 return e = +e, t |= 0, n || O(this, e, t, 4, 2147483647, -2147483648), c
2893 .TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, this[t + 1] = e >>> 8, this[
2894 t + 2] = e >>> 16, this[t + 3] = e >>> 24) : j(this, e, t, !0), t + 4
2895 }, c.prototype.writeInt32BE = function(e, t, n) {
2896 return e = +e, t |= 0, n || O(this, e, t, 4, 2147483647, -2147483648), e <
2897 0 && (e = 4294967295 + e + 1), c.TYPED_ARRAY_SUPPORT ? (this[t] = e >>>
2898 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 &
2899 e) : j(this, e, t, !1), t + 4
2900 }, c.prototype.writeFloatLE = function(e, t, n) {
2901 return U(this, e, t, !0, n)
2902 }, c.prototype.writeFloatBE = function(e, t, n) {
2903 return U(this, e, t, !1, n)
2904 }, c.prototype.writeDoubleLE = function(e, t, n) {
2905 return D(this, e, t, !0, n)
2906 }, c.prototype.writeDoubleBE = function(e, t, n) {
2907 return D(this, e, t, !1, n)
2908 }, c.prototype.copy = function(e, t, n, i) {
2909 if (n || (n = 0), i || 0 === i || (i = this.length), t >= e.length && (t =
2910 e.length), t || (t = 0), i > 0 && i < n && (i = n), i === n) return 0;
2911 if (0 === e.length || 0 === this.length) return 0;
2912 if (t < 0) throw new RangeError("targetStart out of bounds");
2913 if (n < 0 || n >= this.length) throw new RangeError(
2914 "sourceStart out of bounds");
2915 if (i < 0) throw new RangeError("sourceEnd out of bounds");
2916 i > this.length && (i = this.length), e.length - t < i - n && (i = e.length -
2917 t + n);
2918 var r, s = i - n;
2919 if (this === e && n < t && t < i)
2920 for (r = s - 1; r >= 0; --r) e[r + t] = this[r + n];
2921 else if (s < 1e3 || !c.TYPED_ARRAY_SUPPORT)
2922 for (r = 0; r < s; ++r) e[r + t] = this[r + n];
2923 else Uint8Array.prototype.set.call(e, this.subarray(n, n + s), t);
2924 return s
2925 }, c.prototype.fill = function(e, t, n, i) {
2926 if ("string" == typeof e) {
2927 if ("string" == typeof t ? (i = t, t = 0, n = this.length) : "string" ==
2928 typeof n && (i = n, n = this.length), 1 === e.length) {
2929 var r = e.charCodeAt(0);
2930 r < 256 && (e = r)
2931 }
2932 if (void 0 !== i && "string" != typeof i) throw new TypeError(
2933 "encoding must be a string");
2934 if ("string" == typeof i && !c.isEncoding(i)) throw new TypeError(
2935 "Unknown encoding: " + i)
2936 } else "number" == typeof e && (e &= 255);
2937 if (t < 0 || this.length < t || this.length < n) throw new RangeError(
2938 "Out of range index");
2939 if (n <= t) return this;
2940 var s;
2941 if (t >>>= 0, n = void 0 === n ? this.length : n >>> 0, e || (e = 0),
2942 "number" == typeof e)
2943 for (s = t; s < n; ++s) this[s] = e;
2944 else {
2945 var a = c.isBuffer(e) ? e : z(new c(e, i).toString()),
2946 o = a.length;
2947 for (s = 0; s < n - t; ++s) this[s + t] = a[s % o]
2948 }
2949 return this
2950 };
2951 var L = /[^+\/0-9A-Za-z-_]/g;
2952
2953 function F(e) {
2954 return e < 16 ? "0" + e.toString(16) : e.toString(16)
2955 }
2956
2957 function z(e, t) {
2958 var n;
2959 t = t || 1 / 0;
2960 for (var i = e.length, r = null, s = [], a = 0; a < i; ++a) {
2961 if ((n = e.charCodeAt(a)) > 55295 && n < 57344) {
2962 if (!r) {
2963 if (n > 56319) {
2964 (t -= 3) > -1 && s.push(239, 191, 189);
2965 continue
2966 }
2967 if (a + 1 === i) {
2968 (t -= 3) > -1 && s.push(239, 191, 189);
2969 continue
2970 }
2971 r = n;
2972 continue
2973 }
2974 if (n < 56320) {
2975 (t -= 3) > -1 && s.push(239, 191, 189), r = n;
2976 continue
2977 }
2978 n = 65536 + (r - 55296 << 10 | n - 56320)
2979 } else r && (t -= 3) > -1 && s.push(239, 191, 189);
2980 if (r = null, n < 128) {
2981 if ((t -= 1) < 0) break;
2982 s.push(n)
2983 } else if (n < 2048) {
2984 if ((t -= 2) < 0) break;
2985 s.push(n >> 6 | 192, 63 & n | 128)
2986 } else if (n < 65536) {
2987 if ((t -= 3) < 0) break;
2988 s.push(n >> 12 | 224, n >> 6 & 63 | 128, 63 & n | 128)
2989 } else {
2990 if (!(n < 1114112)) throw new Error("Invalid code point");
2991 if ((t -= 4) < 0) break;
2992 s.push(n >> 18 | 240, n >> 12 & 63 | 128, n >> 6 & 63 | 128, 63 & n |
2993 128)
2994 }
2995 }
2996 return s
2997 }
2998
2999 function H(e) {
3000 return i.toByteArray(function(e) {
3001 if ((e = function(e) {
3002 return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "")
3003 }(e).replace(L, "")).length < 2) return "";
3004 for (; e.length % 4 != 0;) e += "=";
3005 return e
3006 }(e))
3007 }
3008
3009 function V(e, t, n, i) {
3010 for (var r = 0; r < i && !(r + n >= t.length || r >= e.length); ++r) t[r +
3011 n] = e[r];
3012 return r
3013 }
3014 }).call(this, n(12))
3015}, function(e, t) {
3016 var n;
3017 n = function() {
3018 return this
3019 }();
3020 try {
3021 n = n || new Function("return this")()
3022 } catch (e) {
3023 "object" == typeof window && (n = window)
3024 }
3025 e.exports = n
3026}, function(e, t) {
3027 for (var n = t.uint8 = new Array(256), i = 0; i <= 255; i++) n[i] = r(i);
3028
3029 function r(e) {
3030 return function(t) {
3031 var n = t.reserve(1);
3032 t.buffer[n] = e
3033 }
3034 }
3035}, function(e, t, n) {
3036 t.FlexDecoder = s, t.FlexEncoder = a;
3037 var i = n(0),
3038 r = "BUFFER_SHORTAGE";
3039
3040 function s() {
3041 if (!(this instanceof s)) return new s
3042 }
3043
3044 function a() {
3045 if (!(this instanceof a)) return new a
3046 }
3047
3048 function o() {
3049 throw new Error("method not implemented: write()")
3050 }
3051
3052 function c() {
3053 throw new Error("method not implemented: fetch()")
3054 }
3055
3056 function l() {
3057 return this.buffers && this.buffers.length ? (this.flush(), this.pull()) :
3058 this.fetch()
3059 }
3060
3061 function h(e) {
3062 (this.buffers || (this.buffers = [])).push(e)
3063 }
3064
3065 function u() {
3066 return (this.buffers || (this.buffers = [])).shift()
3067 }
3068
3069 function f(e) {
3070 return function(t) {
3071 for (var n in e) t[n] = e[n];
3072 return t
3073 }
3074 }
3075 s.mixin = f({
3076 bufferish: i,
3077 write: function(e) {
3078 var t = this.offset ? i.prototype.slice.call(this.buffer, this.offset) :
3079 this.buffer;
3080 this.buffer = t ? e ? this.bufferish.concat([t, e]) : t : e, this.offset =
3081 0
3082 },
3083 fetch: c,
3084 flush: function() {
3085 for (; this.offset < this.buffer.length;) {
3086 var e, t = this.offset;
3087 try {
3088 e = this.fetch()
3089 } catch (e) {
3090 if (e && e.message != r) throw e;
3091 this.offset = t;
3092 break
3093 }
3094 this.push(e)
3095 }
3096 },
3097 push: h,
3098 pull: u,
3099 read: l,
3100 reserve: function(e) {
3101 var t = this.offset,
3102 n = t + e;
3103 if (n > this.buffer.length) throw new Error(r);
3104 return this.offset = n, t
3105 },
3106 offset: 0
3107 }), s.mixin(s.prototype), a.mixin = f({
3108 bufferish: i,
3109 write: o,
3110 fetch: function() {
3111 var e = this.start;
3112 if (e < this.offset) {
3113 var t = this.start = this.offset;
3114 return i.prototype.slice.call(this.buffer, e, t)
3115 }
3116 },
3117 flush: function() {
3118 for (; this.start < this.offset;) {
3119 var e = this.fetch();
3120 e && this.push(e)
3121 }
3122 },
3123 push: h,
3124 pull: function() {
3125 var e = this.buffers || (this.buffers = []),
3126 t = e.length > 1 ? this.bufferish.concat(e) : e[0];
3127 return e.length = 0, t
3128 },
3129 read: l,
3130 reserve: function(e) {
3131 var t = 0 | e;
3132 if (this.buffer) {
3133 var n = this.buffer.length,
3134 i = 0 | this.offset,
3135 r = i + t;
3136 if (r < n) return this.offset = r, i;
3137 this.flush(), e = Math.max(e, Math.min(2 * n, this.maxBufferSize))
3138 }
3139 return e = Math.max(e, this.minBufferSize), this.buffer = this.bufferish
3140 .alloc(e), this.start = 0, this.offset = t, 0
3141 },
3142 send: function(e) {
3143 var t = e.length;
3144 if (t > this.minBufferSize) this.flush(), this.push(e);
3145 else {
3146 var n = this.reserve(t);
3147 i.prototype.copy.call(e, this.buffer, n)
3148 }
3149 },
3150 maxBufferSize: 65536,
3151 minBufferSize: 2048,
3152 offset: 0,
3153 start: 0
3154 }), a.mixin(a.prototype)
3155}, function(e, t, n) {
3156 t.decode = function(e, t) {
3157 var n = new i(t);
3158 return n.write(e), n.read()
3159 };
3160 var i = n(16).DecodeBuffer
3161}, function(e, t, n) {
3162 t.DecodeBuffer = r;
3163 var i = n(8).preset;
3164
3165 function r(e) {
3166 if (!(this instanceof r)) return new r(e);
3167 if (e && (this.options = e, e.codec)) {
3168 var t = this.codec = e.codec;
3169 t.bufferish && (this.bufferish = t.bufferish)
3170 }
3171 }
3172 n(14).FlexDecoder.mixin(r.prototype), r.prototype.codec = i, r.prototype.fetch =
3173 function() {
3174 return this.codec.decode(this)
3175 }
3176}, function(e, t, n) {
3177 var i = n(4),
3178 r = n(7),
3179 s = r.Uint64BE,
3180 a = r.Int64BE;
3181 t.getReadFormat = function(e) {
3182 var t = o.hasArrayBuffer && e && e.binarraybuffer,
3183 n = e && e.int64;
3184 return {
3185 map: l && e && e.usemap ? u : h,
3186 array: f,
3187 str: d,
3188 bin: t ? g : p,
3189 ext: m,
3190 uint8: y,
3191 uint16: v,
3192 uint32: b,
3193 uint64: S(8, n ? E : T),
3194 int8: k,
3195 int16: w,
3196 int32: x,
3197 int64: S(8, n ? M : I),
3198 float32: S(4, A),
3199 float64: S(8, P)
3200 }
3201 }, t.readUint8 = y;
3202 var o = n(0),
3203 c = n(6),
3204 l = "undefined" != typeof Map;
3205
3206 function h(e, t) {
3207 var n, i = {},
3208 r = new Array(t),
3209 s = new Array(t),
3210 a = e.codec.decode;
3211 for (n = 0; n < t; n++) r[n] = a(e), s[n] = a(e);
3212 for (n = 0; n < t; n++) i[r[n]] = s[n];
3213 return i
3214 }
3215
3216 function u(e, t) {
3217 var n, i = new Map,
3218 r = new Array(t),
3219 s = new Array(t),
3220 a = e.codec.decode;
3221 for (n = 0; n < t; n++) r[n] = a(e), s[n] = a(e);
3222 for (n = 0; n < t; n++) i.set(r[n], s[n]);
3223 return i
3224 }
3225
3226 function f(e, t) {
3227 for (var n = new Array(t), i = e.codec.decode, r = 0; r < t; r++) n[r] = i(
3228 e);
3229 return n
3230 }
3231
3232 function d(e, t) {
3233 var n = e.reserve(t),
3234 i = n + t;
3235 return c.toString.call(e.buffer, "utf-8", n, i)
3236 }
3237
3238 function p(e, t) {
3239 var n = e.reserve(t),
3240 i = n + t,
3241 r = c.slice.call(e.buffer, n, i);
3242 return o.from(r)
3243 }
3244
3245 function g(e, t) {
3246 var n = e.reserve(t),
3247 i = n + t,
3248 r = c.slice.call(e.buffer, n, i);
3249 return o.Uint8Array.from(r).buffer
3250 }
3251
3252 function m(e, t) {
3253 var n = e.reserve(t + 1),
3254 i = e.buffer[n++],
3255 r = n + t,
3256 s = e.codec.getExtUnpacker(i);
3257 if (!s) throw new Error("Invalid ext type: " + (i ? "0x" + i.toString(16) :
3258 i));
3259 return s(c.slice.call(e.buffer, n, r))
3260 }
3261
3262 function y(e) {
3263 var t = e.reserve(1);
3264 return e.buffer[t]
3265 }
3266
3267 function k(e) {
3268 var t = e.reserve(1),
3269 n = e.buffer[t];
3270 return 128 & n ? n - 256 : n
3271 }
3272
3273 function v(e) {
3274 var t = e.reserve(2),
3275 n = e.buffer;
3276 return n[t++] << 8 | n[t]
3277 }
3278
3279 function w(e) {
3280 var t = e.reserve(2),
3281 n = e.buffer,
3282 i = n[t++] << 8 | n[t];
3283 return 32768 & i ? i - 65536 : i
3284 }
3285
3286 function b(e) {
3287 var t = e.reserve(4),
3288 n = e.buffer;
3289 return 16777216 * n[t++] + (n[t++] << 16) + (n[t++] << 8) + n[t]
3290 }
3291
3292 function x(e) {
3293 var t = e.reserve(4),
3294 n = e.buffer;
3295 return n[t++] << 24 | n[t++] << 16 | n[t++] << 8 | n[t]
3296 }
3297
3298 function S(e, t) {
3299 return function(n) {
3300 var i = n.reserve(e);
3301 return t.call(n.buffer, i, !0)
3302 }
3303 }
3304
3305 function T(e) {
3306 return new s(this, e).toNumber()
3307 }
3308
3309 function I(e) {
3310 return new a(this, e).toNumber()
3311 }
3312
3313 function E(e) {
3314 return new s(this, e)
3315 }
3316
3317 function M(e) {
3318 return new a(this, e)
3319 }
3320
3321 function A(e) {
3322 return i.read(this, e, !1, 23, 4)
3323 }
3324
3325 function P(e) {
3326 return i.read(this, e, !1, 52, 8)
3327 }
3328}, function(e, t, n) {
3329 ! function(t) {
3330 e.exports = t;
3331 var n = "listeners",
3332 i = {
3333 on: function(e, t) {
3334 return a(this, e).push(t), this
3335 },
3336 once: function(e, t) {
3337 var n = this;
3338 return i.originalListener = t, a(n, e).push(i), n;
3339
3340 function i() {
3341 s.call(n, e, i), t.apply(this, arguments)
3342 }
3343 },
3344 off: s,
3345 emit: function(e, t) {
3346 var n = this,
3347 i = a(n, e, !0);
3348 if (!i) return !1;
3349 var r = arguments.length;
3350 if (1 === r) i.forEach((function(e) {
3351 e.call(n)
3352 }));
3353 else if (2 === r) i.forEach((function(e) {
3354 e.call(n, t)
3355 }));
3356 else {
3357 var s = Array.prototype.slice.call(arguments, 1);
3358 i.forEach((function(e) {
3359 e.apply(n, s)
3360 }))
3361 }
3362 return !!i.length
3363 }
3364 };
3365
3366 function r(e) {
3367 for (var t in i) e[t] = i[t];
3368 return e
3369 }
3370
3371 function s(e, t) {
3372 var i;
3373 if (arguments.length) {
3374 if (t) {
3375 if (i = a(this, e, !0)) {
3376 if (!(i = i.filter((function(e) {
3377 return e !== t && e.originalListener !== t
3378 }))).length) return s.call(this, e);
3379 this[n][e] = i
3380 }
3381 } else if ((i = this[n]) && (delete i[e], !Object.keys(i).length)) return s
3382 .call(this)
3383 } else delete this[n];
3384 return this
3385 }
3386
3387 function a(e, t, i) {
3388 if (!i || e[n]) {
3389 var r = e[n] || (e[n] = {});
3390 return r[t] || (r[t] = [])
3391 }
3392 }
3393 r(t.prototype), t.mixin = r
3394 }((
3395 /**
3396 * event-lite.js - Light-weight EventEmitter (less than 1KB when gzipped)
3397 *
3398 * @copyright Yusuke Kawasaki
3399 * @license MIT
3400 * @constructor
3401 * @see https://github.com/kawanet/event-lite
3402 * @see http://kawanet.github.io/event-lite/EventLite.html
3403 * @example
3404 * var EventLite = require("event-lite");
3405 *
3406 * function MyClass() {...} // your class
3407 *
3408 * EventLite.mixin(MyClass.prototype); // import event methods
3409 *
3410 * var obj = new MyClass();
3411 * obj.on("foo", function() {...}); // add event listener
3412 * obj.once("bar", function() {...}); // add one-time event listener
3413 * obj.emit("foo"); // dispatch event
3414 * obj.emit("bar"); // dispatch another event
3415 * obj.off("foo"); // remove event listener
3416 */
3417 function e() {
3418 if (!(this instanceof e)) return new e
3419 }))
3420}, function(e, t, n) {
3421 (function(t) {
3422 e.exports.maxScreenWidth = 1920, e.exports.maxScreenHeight = 1080, e.exports
3423 .serverUpdateRate = 9, e.exports.maxPlayers = 50, e.exports.maxPlayersHard = 50, e.exports.collisionDepth = 6, e.exports.minimapRate = 3e3, e.exports.colGrid =
3424 10, e.exports.clientSendRate = 5, e.exports.healthBarWidth = 50, e.exports
3425 .healthBarPad = 4.5, e.exports.iconPadding = 15, e.exports.iconPad = .9,
3426 e.exports.deathFadeout = 1, e.exports.crownIconScale = 60, e.exports.crownPad =
3427 35, e.exports.chatCountdown = 3000, e.exports.chatCooldown = 0, e.exports
3428 .inSandbox = t && "mm_exp" === t.env.VULTR_SCHEME, e.exports.maxAge = 100,
3429 e.exports.gatherAngle = Math.PI / 2.6, e.exports.gatherWiggle = 10, e.exports
3430 .hitReturnRatio = .25, e.exports.hitAngle = Math.PI / 2, e.exports.playerScale =
3431 35, e.exports.playerSpeed = .0016, e.exports.playerDecel = .993, e.exports
3432 .nameY = 34, e.exports.skinColors = ["#bf8f54", "#cbb091", "#896c4b", "#fadadc", "#ececec", "#c37373", "#4c4c4c", "#ecaff7", "#738cc3", "#9100ff"
3433 ], e.exports.animalCount = 7, e.exports.aiTurnRandom = .06, e.exports.cowNames = [
3434 "Lovable", "RinZ", "Maple", "dOC Bitch", "MOHela", "Zod", "Wxone",
3435 "WaspHype", "Zelta is Big proe", "Sub To Zelta", "Sub Me pls?", "dOC Zelta's Bitch", "Arsen", "ArenaSlayer",
3436 "Zelta", "DeAtHWans", "GodSpeed", "Sn1ph3r", "Kikioo", "Kiko", "Yamato", "d0C Z3lt4's B!tch",
3437 "Project ", "MrSpikes", "PandaClaus", "KingKiller", "Accident", "FiShY", "BiRdY",
3438 "Tolerate", "dOC Suck", "Zelta Proe", "DeStiny", "aQuiVeR", "Slayer69", "PlankTonV",
3439 "SoulBreaker", "Pet", "dOC Bitch", "dOC Suck", "UnCrushh", "ShellShock", "COLOR", "GodMode",
3440 "AndManyMore"
3441 ], e.exports.shieldAngle = Math.PI / 3, e.exports.weaponVariants = [{
3442 id: 0,
3443 src: "",
3444 xp: 0,
3445 val: 1
3446 }, {
3447 id: 1,
3448 src: "_g",
3449 xp: 3e3,
3450 val: 1.1
3451 }, {
3452 id: 2,
3453 src: "_d",
3454 xp: 7e3,
3455 val: 1.18
3456 }, {
3457 id: 3,
3458 src: "_r",
3459 poison: !0,
3460 xp: 12e3,
3461 val: 1.18
3462 }], e.exports.fetchVariant = function(t) {
3463 for (var n = t.weaponXP[t.weaponIndex] || 0, i = e.exports.weaponVariants
3464 .length - 1; i >= 0; --i)
3465 if (n >= e.exports.weaponVariants[i].xp) return e.exports.weaponVariants[
3466 i]
3467 }, e.exports.resourceTypes = ["wood", "food", "stone", "points"], e.exports
3468 .areaCount = 7, e.exports.treesPerArea = 9, e.exports.bushesPerArea = 3,
3469 e.exports.totalRocks = 32, e.exports.goldOres = 7, e.exports.riverWidth =
3470 724, e.exports.riverPadding = 114, e.exports.waterCurrent = .0011, e.exports
3471 .waveSpeed = 1e-4, e.exports.waveMax = 1.3, e.exports.treeScales = [150,
3472 160, 165, 175
3473 ], e.exports.bushScales = [80, 85, 95], e.exports.rockScales = [80, 85,
3474 90
3475 ], e.exports.snowBiomeTop = 2400, e.exports.snowSpeed = .75, e.exports.maxNameLength =
3476 15, e.exports.mapScale = 14400, e.exports.mapPingScale = 40, e.exports.mapPingTime =
3477 2200
3478 }).call(this, n(41))
3479}, function(e, t) {
3480 var n = {
3481 utf8: {
3482 stringToBytes: function(e) {
3483 return n.bin.stringToBytes(unescape(encodeURIComponent(e)))
3484 },
3485 bytesToString: function(e) {
3486 return decodeURIComponent(escape(n.bin.bytesToString(e)))
3487 }
3488 },
3489 bin: {
3490 stringToBytes: function(e) {
3491 for (var t = [], n = 0; n < e.length; n++) t.push(255 & e.charCodeAt(n));
3492 return t
3493 },
3494 bytesToString: function(e) {
3495 for (var t = [], n = 0; n < e.length; n++) t.push(String.fromCharCode(e[
3496 n]));
3497 return t.join("")
3498 }
3499 }
3500 };
3501 e.exports = n
3502}, function(e, t, n) {
3503 "use strict";
3504 window.loadedScript = !0;
3505 var i = "127.0.0.1" !== location.hostname && !location.hostname.startsWith(
3506 "192.168.");
3507 n(22);
3508 var r = n(23),
3509 s = n(42),
3510 a = n(43),
3511 o = n(19),
3512 c = n(44),
3513 l = n(45),
3514 h = (n(46), n(47)),
3515 u = n(48),
3516 f = n(55),
3517 d = n(56),
3518 p = n(57),
3519 g = n(58).obj,
3520 m = new a.TextManager,
3521 y = new(n(59))("moomoo.io", 3e3, o.maxPlayers, 5, !1);
3522 y.debugLog = !1;
3523 var k = !1;
3524
3525 function v() {
3526 ht && ut && (k = !0, i ? window.grecaptcha.execute(
3527 "6LevKusUAAAAAAFknhlV8sPtXAk5Z5dGP5T2FYIZ", {
3528 action: "homepage"
3529 }).then((function(e) {
3530 w(e)
3531 })) : w(null))
3532 }
3533
3534 function w(e) {
3535 y.start((function(t, n, a) {
3536 var c = (i ? "wss" : "ws") + "://" + t + ":8008/?gameIndex=" + a;
3537 e && (c += "&token=" + encodeURIComponent(e)), r.connect(c, (function(e) {
3538 Bi(), setInterval(() => Bi(), 2500), e ? ft(e) : (ue.onclick = s.checkTrusted(
3539 (function() {
3540 ! function() {
3541 var e = ++bt > 1,
3542 t = Date.now() - wt > vt;
3543 e && t ? (wt = Date.now(), xt()) : Tn()
3544 }()
3545 })), s.hookTouchEvents(ue), fe.onclick = s.checkTrusted((
3546 function() {
3547 Oi("https://krunker.io")
3548 })), s.hookTouchEvents(fe), pe.onclick = s.checkTrusted((
3549 function() {
3550 setTimeout((function() {
3551 ! function() {
3552 var e = xe.value,
3553 t = prompt("party key", e);
3554 t && (window.onbeforeunload = void 0, window.location.href =
3555 "/?server=" + t)
3556 }()
3557 }), 10)
3558 })), s.hookTouchEvents(pe), ge.onclick = s.checkTrusted((
3559 function() {
3560 Ae.classList.contains("showing") ? (Ae.classList.remove(
3561 "showing"), me.innerText = "Settings") : (Ae.classList.add(
3562 "showing"), me.innerText = "Close")
3563 })), s.hookTouchEvents(ge), ye.onclick = s.checkTrusted((
3564 function() {
3565 yn(), "block" != Ye.style.display ? Ut() : Ye.style.display =
3566 "none"
3567 })), s.hookTouchEvents(ye), ke.onclick = s.checkTrusted((
3568 function() {
3569 "block" != Qe.style.display ? (Qe.style.display = "block", Ye.style
3570 .display = "none", an(), Gt()) : Qe.style.display = "none"
3571 })), s.hookTouchEvents(ke), ve.onclick = s.checkTrusted((
3572 function() {
3573 rn()
3574 })), s.hookTouchEvents(ve), Ne.onclick = s.checkTrusted((
3575 function() {
3576 xn()
3577 })), s.hookTouchEvents(Ne), function() {
3578 for (var e = 0; e < jn.length; ++e) {
3579 var t = new Image;
3580 t.onload = function() {
3581 this.isLoaded = !0
3582 }, t.src = ".././img/icons/" + jn[e] + ".png", Rn[jn[e]] = t
3583 }
3584 }(), Pe.style.display = "none", Me.style.display = "block", Le.value =
3585 E("moo_name") || "",
3586 function() {
3587 var e = E("native_resolution");
3588 Zt(e ? "true" == e : "undefined" != typeof cordova), A = "true" ==
3589 E("show_ping"), Ie.hidden = !A, E("moo_moosic"), setInterval((
3590 function() {
3591 window.cordova && (document.getElementById(
3592 "downloadButtonContainer").classList.add("cordova"),
3593 document.getElementById("mobileDownloadButtonContainer").classList
3594 .add("cordova"))
3595 }), 1e3), en(), s.removeAllChildren(Ce);
3596 for (var t = 0; t < l.weapons.length + l.list.length; ++t) !
3597 function(e) {
3598 s.generateElement({
3599 id: "actionBarItem" + e,
3600 class: "actionBarItem",
3601 style: "display:none",
3602 onmouseout: function() {
3603 Tt()
3604 },
3605 parent: Ce
3606 })
3607 }(t);
3608 for (t = 0; t < l.list.length + l.weapons.length; ++t) ! function(
3609 e) {
3610 var t = document.createElement("canvas");
3611 t.width = t.height = 66;
3612 var n = t.getContext("2d");
3613 if (n.translate(t.width / 2, t.height / 2), n.imageSmoothingEnabled = !
3614 1, n.webkitImageSmoothingEnabled = !1, n.mozImageSmoothingEnabled = !
3615 1, l.weapons[e]) {
3616 n.rotate(Math.PI / 4 + Math.PI);
3617 var i = new Image;
3618 Zn[l.weapons[e].src] = i, i.onload = function() {
3619 this.isLoaded = !0;
3620 var i = 1 / (this.height / this.width),
3621 r = l.weapons[e].iPad || 1;
3622 n.drawImage(this, -t.width * r * o.iconPad * i / 2, -t.height *
3623 r * o.iconPad / 2, t.width * r * i * o.iconPad, t.height *
3624 r * o.iconPad), n.fillStyle = "rgba(0, 0, 70, 0.1)", n.globalCompositeOperation =
3625 "source-atop", n.fillRect(-t.width / 2, -t.height / 2, t.width,
3626 t.height), document.getElementById("actionBarItem" + e).style
3627 .backgroundImage = "url(" + t.toDataURL() + ")"
3628 }, i.src = ".././img/weapons/" + l.weapons[e].src + ".png",
3629 (r = document.getElementById("actionBarItem" + e)).onmouseover =
3630 s.checkTrusted((function() {
3631 Tt(l.weapons[e], !0)
3632 })), r.onclick = s.checkTrusted((function() {
3633 Sn(e, !0)
3634 })), s.hookTouchEvents(r)
3635 } else {
3636 i = ri(l.list[e - l.weapons.length], !0);
3637 var r, a = Math.min(t.width - o.iconPadding, i.width);
3638 n.globalAlpha = 1, n.drawImage(i, -a / 2, -a / 2, a, a), n.fillStyle =
3639 "rgba(0, 0, 70, 0.1)", n.globalCompositeOperation =
3640 "source-atop", n.fillRect(-a / 2, -a / 2, a, a), document.getElementById(
3641 "actionBarItem" + e).style.backgroundImage = "url(" + t.toDataURL() +
3642 ")", (r = document.getElementById("actionBarItem" + e)).onmouseover =
3643 s.checkTrusted((function() {
3644 Tt(l.list[e - l.weapons.length])
3645 })), r.onclick = s.checkTrusted((function() {
3646 Sn(e - l.weapons.length)
3647 })), s.hookTouchEvents(r)
3648 }
3649 }(t);
3650 Le.ontouchstart = s.checkTrusted((function(e) {
3651 e.preventDefault();
3652 var t = prompt("enter name", e.currentTarget.value);
3653 e.currentTarget.value = t.slice(0, 15)
3654 })), Se.checked = M, Se.onchange = s.checkTrusted((function(e) {
3655 Zt(e.target.checked)
3656 })), Te.checked = A, Te.onchange = s.checkTrusted((function(e) {
3657 A = Te.checked, Ie.hidden = !A, I("show_ping", A ? "true" :
3658 "false")
3659 }))
3660 }())
3661 }), {
3662 id: st,
3663 d: ft,
3664 1: En,
3665 2: vi,
3666 4: wi,
3667 33: Ti,
3668 5: Ln,
3669 6: li,
3670 a: gi,
3671 aa: pi,
3672 7: Wn,
3673 8: hi,
3674 sp: ui,
3675 9: xi,
3676 h: Si,
3677 11: Pn,
3678 12: Cn,
3679 13: Bn,
3680 14: bi,
3681 15: Dn,
3682 16: Un,
3683 17: $t,
3684 18: fi,
3685 19: di,
3686 20: Ci,
3687 ac: Ot,
3688 ad: _t,
3689 an: Bt,
3690 st: Rt,
3691 sa: jt,
3692 us: Nt,
3693 ch: hn,
3694 mm: Wt,
3695 t: Mn,
3696 p: Yt,
3697 pp: Pi
3698 }), pt(), setTimeout(() => gt(), 3e3)
3699 }), (function(e) {
3700 console.error("Vultr error:", e), alert("Error:\n" + e), ft(
3701 "disconnected")
3702 }))
3703 }
3704 var b, x = new g(o, s),
3705 S = Math.PI,
3706 T = 2 * S;
3707
3708 function I(e, t) {
3709 b && localStorage.setItem(e, t)
3710 }
3711
3712 function E(e) {
3713 return b ? localStorage.getItem(e) : null
3714 }
3715 Math.lerpAngle = function(e, t, n) {
3716 Math.abs(t - e) > S && (e > t ? t += T : e += T);
3717 var i = t + (e - t) * n;
3718 return i >= 0 && i <= T ? i : i % T
3719 }, CanvasRenderingContext2D.prototype.roundRect = function(e, t, n, i, r) {
3720 return n < 2 * r && (r = n / 2), i < 2 * r && (r = i / 2), r < 0 && (r = 0),
3721 this.beginPath(), this.moveTo(e + r, t), this.arcTo(e + n, t, e + n, t +
3722 i, r), this.arcTo(e + n, t + i, e, t + i, r), this.arcTo(e, t + i, e, t,
3723 r), this.arcTo(e, t, e + n, t, r), this.closePath(), this
3724 }, "undefined" != typeof Storage && (b = !0), E("consent") || (consentBlock
3725 .style.display = "block"), window.checkTerms = function(e) {
3726 e ? (consentBlock.style.display = "none", I("consent", 1)) : $(
3727 "#consentShake").effect("shake")
3728 };
3729 var M, A, P, B, C, O, R, j, _, U, D, L, F, z, H = E("moofoll"),
3730 V = 1,
3731 q = Date.now(),
3732 Y = [],
3733 W = [],
3734 X = [],
3735 N = [],
3736 G = [],
3737 J = new p(d, G, W, Y, nt, l, o, s),
3738 K = n(70),
3739 Q = n(71),
3740 Z = new K(Y, Q, W, l, null, o, s),
3741 ee = 1,
3742 te = 0,
3743 ne = 0,
3744 ie = 0,
3745 re = {
3746 id: -1,
3747 startX: 0,
3748 startY: 0,
3749 currentX: 0,
3750 currentY: 0
3751 },
3752 se = {
3753 id: -1,
3754 startX: 0,
3755 startY: 0,
3756 currentX: 0,
3757 currentY: 0
3758 },
3759 ae = 0,
3760 oe = o.maxScreenWidth,
3761 ce = o.maxScreenHeight,
3762 le = !1,
3763 he = (document.getElementById("ad-container"), document.getElementById(
3764 "mainMenu")),
3765 ue = document.getElementById("enterGame"),
3766 fe = document.getElementById("promoImg"),
3767 de = document.getElementById("partyButton"),
3768 pe = document.getElementById("joinPartyButton"),
3769 ge = document.getElementById("settingsButton"),
3770 me = ge.getElementsByTagName("span")[0],
3771 ye = document.getElementById("allianceButton"),
3772 ke = document.getElementById("storeButton"),
3773 ve = document.getElementById("chatButton"),
3774 we = document.getElementById("gameCanvas"),
3775 be = we.getContext("2d"),
3776 xe = document.getElementById("serverBrowser"),
3777 Se = document.getElementById("nativeResolution"),
3778 Te = document.getElementById("showPing"),
3779 Ie = (document.getElementById("playMusic"), document.getElementById(
3780 "pingDisplay")),
3781 Ee = document.getElementById("shutdownDisplay"),
3782 Me = document.getElementById("menuCardHolder"),
3783 Ae = document.getElementById("guideCard"),
3784 Pe = document.getElementById("loadingText"),
3785 Be = document.getElementById("gameUI"),
3786 Ce = document.getElementById("actionBar"),
3787 Oe = document.getElementById("scoreDisplay"),
3788 Re = document.getElementById("foodDisplay"),
3789 je = document.getElementById("woodDisplay"),
3790 _e = document.getElementById("stoneDisplay"),
3791 Ue = document.getElementById("killCounter"),
3792 De = document.getElementById("leaderboardData"),
3793 Le = document.getElementById("nameInput"),
3794 Fe = document.getElementById("itemInfoHolder"),
3795 ze = document.getElementById("ageText"),
3796 He = document.getElementById("ageBarBody"),
3797 Ve = document.getElementById("upgradeHolder"),
3798 qe = document.getElementById("upgradeCounter"),
3799 Ye = document.getElementById("allianceMenu"),
3800 We = document.getElementById("allianceHolder"),
3801 Xe = document.getElementById("allianceManager"),
3802 Ne = document.getElementById("mapDisplay"),
3803 Ge = document.getElementById("diedText"),
3804 Je = document.getElementById("skinColorHolder"),
3805 Ke = Ne.getContext("2d");
3806 Ne.width = 300, Ne.height = 300;
3807 var Qe = document.getElementById("storeMenu"),
3808 $e = document.getElementById("storeHolder"),
3809 Ze = document.getElementById("noticationDisplay"),
3810 et = f.hats,
3811 tt = f.accessories,
3812 nt = new h(c, N, s, o),
3813 it = "#525252",
3814 rt = "#3d3f42";
3815
3816 function st(e) {
3817 X = e.teams
3818 }
3819 var at = document.getElementById("featuredYoutube"),
3820 ot = [{
3821 name: "SweetCakes",
3822 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3823 }, {
3824 name: "SweetCakes",
3825 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3826 }, {
3827 name: "SweetCakes",
3828 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3829 }, {
3830 name: "SweetCakes",
3831 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3832 }, {
3833 name: "SweetCakes",
3834 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3835 }, {
3836 name: "SweetCakes",
3837 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3838 }, {
3839 name: "SweetCakes",
3840 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3841 }, {
3842 name: "SweetCakes",
3843 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3844 }, {
3845 name: "SweetCakes",
3846 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3847 }, {
3848 name: "SweetCakes",
3849 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3850 }, {
3851 name: "SweetCakes",
3852 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3853 }, {
3854 name: "SweetCakes",
3855 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3856 }, {
3857 name: "SweetCakes",
3858 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3859 }, {
3860 name: "SweetCakes",
3861 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3862 }, {
3863 name: "SweetCakes",
3864 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3865 }, {
3866 name: "SweetCakes",
3867 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3868 }, {
3869 name: "SweetCakes",
3870 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
3871 }],
3872 ct = ot[s.randInt(0, ot.length - 1)];
3873 at.innerHTML = "<a target='_blank' class='ytLink' href='" + ct.link +
3874 "'><i class='material-icons' style='vertical-align: top;'></i> " +
3875 ct.name + "</a>";
3876 var lt = !0,
3877 ht = !1,
3878 ut = !1;
3879
3880 function ft(e) {
3881 r.close(), dt(e)
3882 }
3883
3884 function dt(e) {
3885 he.style.display = "block", Be.style.display = "none", Me.style.display =
3886 "none", Ge.style.display = "none", Pe.style.display = "block", Pe.innerHTML =
3887 e +
3888 "<a href='javascript:window.location.href=window.location.href' class='ytLink'>reload</a>"
3889 }
3890 window.onblur = function() {
3891 lt = !1
3892 }, window.onfocus = function() {
3893 lt = !0, R && R.alive && yn()
3894 }, window.onload = function() {
3895 ht = !0, v(), setTimeout((function() {
3896 k || (alert("Captcha failed to load"), window.location.reload())
3897 }), 2e4)
3898 }, window.captchaCallback = function() {
3899 ut = !0, v()
3900 }, we.oncontextmenu = function() {
3901 return !1
3902 };
3903
3904 function pt() {
3905 var e, t, n = "",
3906 i = 0;
3907 for (var r in y.servers) {
3908 for (var s = y.servers[r], a = 0, c = 0; c < s.length; c++)
3909 for (var l = 0; l < s[c].games.length; l++) a += s[c].games[l].playerCount;
3910 i += a;
3911 var h = y.regionInfo[r].name;
3912 n += "<option disabled>" + h + " - " + a + " players</option>";
3913 for (var u = 0; u < s.length; u++)
3914 for (var f = s[u], d = 0; d < f.games.length; d++) {
3915 var p = f.games[d],
3916 g = 1 * f.index + d + 1,
3917 m = y.server && y.server.region === f.region && y.server.index === f.index &&
3918 y.gameIndex == d,
3919 k = h + " " + g + " [" + Math.min(p.playerCount, o.maxPlayers) + "/" +
3920 o.maxPlayers + "]";
3921 let e = y.stripRegion(r) + ":" + u + ":" + d;
3922 m && (de.getElementsByTagName("span")[0].innerText = e), n +=
3923 "<option value='" + e + "' " + (m ? "selected" : "") + ">" + k +
3924 "</option>"
3925 }
3926 n += "<option disabled></option>"
3927 }
3928 n += "<option disabled>All Servers - " + i + " players</option>", xe.innerHTML =
3929 n, "sandbox.moomoo.io" == location.hostname ? (e = "Back to MooMoo", t =
3930 "//moomoo.io/") : (e = "Try the sandbox", t = "//sandbox.moomoo.io/"),
3931 document.getElementById("altServer").innerHTML = "<a href='" + t + "'>" +
3932 e +
3933 "<i class='material-icons' style='font-size:10px;vertical-align:middle'>arrow_forward_ios</i></a>"
3934 }
3935
3936 function gt() {
3937 var e = new XMLHttpRequest;
3938 e.onreadystatechange = function() {
3939 4 == this.readyState && (200 == this.status ? (window.vultr = JSON.parse(
3940 this.responseText), y.processServers(vultr.servers), pt()) : console.error(
3941 "Failed to load server data with status code:", this.status))
3942 }, e.open("GET", "/serverData", !0), e.send()
3943 }
3944 xe.addEventListener("change", s.checkTrusted((function() {
3945 let e = xe.value.split(":");
3946 y.switchServer(e[0], e[1], e[2])
3947 })));
3948 var mt = document.getElementById("pre-content-container"),
3949 yt = null,
3950 kt = null;
3951 window.cpmstarAPI((function(e) {
3952 e.game.setTarget(mt), kt = e
3953 }));
3954 var vt = 3e5,
3955 wt = 0,
3956 bt = 0;
3957
3958 function xt() {
3959 if (!cpmstarAPI || !kt) return console.log("Failed to load video ad API", !
3960 !cpmstarAPI, !!kt), void Tn();
3961 (yt = new kt.game.RewardedVideoView("rewardedvideo")).addEventListener(
3962 "ad_closed", (function(e) {
3963 console.log("Video ad closed"), St()
3964 })), yt.addEventListener("loaded", (function(e) {
3965 console.log("Video ad loaded"), yt.show()
3966 })), yt.addEventListener("load_failed", (function(e) {
3967 console.log("Video ad load failed", e), St()
3968 })), yt.load(), mt.style.display = "block"
3969 }
3970
3971 function St() {
3972 mt.style.display = "none", Tn()
3973 }
3974
3975 function Tt(e, t, n) {
3976 if (R && e)
3977 if (s.removeAllChildren(Fe), Fe.classList.add("visible"), s.generateElement({
3978 id: "itemInfoName",
3979 text: s.capitalizeFirst(e.name),
3980 parent: Fe
3981 }), s.generateElement({
3982 id: "itemInfoDesc",
3983 text: e.desc,
3984 parent: Fe
3985 }), n);
3986 else if (t) s.generateElement({
3987 class: "itemInfoReq",
3988 text: e.type ? "secondary" : "primary",
3989 parent: Fe
3990 });
3991 else {
3992 for (var i = 0; i < e.req.length; i += 2) s.generateElement({
3993 class: "itemInfoReq",
3994 html: e.req[i] + "<span class='itemInfoReqVal'> x" + e.req[i + 1] +
3995 "</span>",
3996 parent: Fe
3997 });
3998 e.group.limit && s.generateElement({
3999 class: "itemInfoLmt",
4000 text: (R.itemCounts[e.group.id] || 0) + "/" + e.group.limit,
4001 parent: Fe
4002 })
4003 } else Fe.classList.remove("visible")
4004 }
4005 window.showPreAd = xt;
4006 var It, Et, Mt, At = [],
4007 Pt = [];
4008
4009 function Bt(e, t) {
4010 At.push({
4011 sid: e,
4012 name: t
4013 }), Ct()
4014 }
4015
4016 function Ct() {
4017 if (At[0]) {
4018 var e = At[0];
4019 s.removeAllChildren(Ze), Ze.style.display = "block", s.generateElement({
4020 class: "notificationText",
4021 text: e.name,
4022 parent: Ze
4023 }), s.generateElement({
4024 class: "notifButton",
4025 html: "<i class='material-icons' style='font-size:28px;color:#cc5151;'></i>",
4026 parent: Ze,
4027 onclick: function() {
4028 Dt(0)
4029 },
4030 hookTouch: !0
4031 }), s.generateElement({
4032 class: "notifButton",
4033 html: "<i class='material-icons' style='font-size:28px;color:#8ecc51;'></i>",
4034 parent: Ze,
4035 onclick: function() {
4036 Dt(1)
4037 },
4038 hookTouch: !0
4039 })
4040 } else Ze.style.display = "none"
4041 }
4042
4043 function Ot(e) {
4044 X.push(e), "block" == Ye.style.display && Ut()
4045 }
4046
4047 function Rt(e, t) {
4048 R && (R.team = e, R.isOwner = t, "block" == Ye.style.display && Ut())
4049 }
4050
4051 function jt(e) {
4052 Pt = e, "block" == Ye.style.display && Ut()
4053 }
4054
4055 function _t(e) {
4056 for (var t = X.length - 1; t >= 0; t--) X[t].sid == e && X.splice(t, 1);
4057 "block" == Ye.style.display && Ut()
4058 }
4059
4060 function Ut() {
4061 if (R && R.alive) {
4062 if (an(), Qe.style.display = "none", Ye.style.display = "block", s.removeAllChildren(
4063 We), R.team)
4064 for (var e = 0; e < Pt.length; e += 2) ! function(e) {
4065 var t = s.generateElement({
4066 class: "allianceItem",
4067 style: "color:" + (Pt[e] == R.sid ? "#fff" : "rgba(255,255,255,0.6)"),
4068 text: Pt[e + 1],
4069 parent: We
4070 });
4071 R.isOwner && Pt[e] != R.sid && s.generateElement({
4072 class: "joinAlBtn",
4073 text: "Kick",
4074 onclick: function() {
4075 Lt(Pt[e])
4076 },
4077 hookTouch: !0,
4078 parent: t
4079 })
4080 }(e);
4081 else if (X.length)
4082 for (e = 0; e < X.length; ++e) ! function(e) {
4083 var t = s.generateElement({
4084 class: "allianceItem",
4085 style: "color:" + (X[e].sid == R.team ? "#fff" :
4086 "rgba(255,255,255,0.6)"),
4087 text: X[e].sid,
4088 parent: We
4089 });
4090 s.generateElement({
4091 class: "joinAlBtn",
4092 text: "Join",
4093 onclick: function() {
4094 Ft(e)
4095 },
4096 hookTouch: !0,
4097 parent: t
4098 })
4099 }(e);
4100 else s.generateElement({
4101 class: "allianceItem",
4102 text: "No Tribes Yet",
4103 parent: We
4104 });
4105 s.removeAllChildren(Xe), R.team ? s.generateElement({
4106 class: "allianceButtonM",
4107 style: "width: 360px",
4108 text: R.isOwner ? "Delete Tribe" : "Leave Tribe",
4109 onclick: function() {
4110 Ht()
4111 },
4112 hookTouch: !0,
4113 parent: Xe
4114 }) : (s.generateElement({
4115 tag: "input",
4116 type: "text",
4117 id: "allianceInput",
4118 maxLength: 7,
4119 placeholder: "unique name",
4120 ontouchstart: function(e) {
4121 e.preventDefault();
4122 var t = prompt("unique name", e.currentTarget.value);
4123 e.currentTarget.value = t.slice(0, 7)
4124 },
4125 parent: Xe
4126 }), s.generateElement({
4127 tag: "div",
4128 class: "allianceButtonM",
4129 style: "width: 140px;",
4130 text: "Create",
4131 onclick: function() {
4132 zt()
4133 },
4134 hookTouch: !0,
4135 parent: Xe
4136 }))
4137 }
4138 }
4139
4140 function Dt(e) {
4141 r.send("11", At[0].sid, e), At.splice(0, 1), Ct();
4142 }
4143
4144 document.onkeydown = function(e) {
4145 if (e.keyCode == 220) {
4146 alert('The key for enabling auto acceptance into the clan is pressed (enabled by default)');
4147 Toggle12134 = (Toggle12134 + 1) % 2;
4148 }
4149 }
4150 let Toggle12134 = 1;
4151
4152 setInterval(() => {
4153 if(Toggle12134 == 1) {
4154 Dt(1)
4155 }
4156 },100);
4157
4158 document.onkeydown = function(e) {// ÑÂÿðü õôþù. ÃÂÕãÑÕà ÃÂÙâÕ ×ÃÂÃâ€Ã•à ÖÚã!! ÃÂу õÑÂûø òþþñщõ úтþ тþ ÑÂтþ òøôøт тþ ÑÂтþ ÿþ тþüу чтþ õÑÂûø òы уñõрõтõ õõ тþ ò úþýцõ þт ÑÂðüþóþ úûøõтð ñуôõт ýðöðтð q тþñøшь õôð ))
4159 if (e.keyCode == 101) {
4160 Sn(R.items[0])
4161 r.send("c", 1)
4162 r.send("c", 0)
4163 Sn(R.items[0])
4164 r.send("c", 1)
4165 r.send("c", 0)
4166 Sn(R.items[0])
4167 r.send("c", 1)
4168 r.send("c", 0)
4169 Sn(R.items[0])
4170 r.send("c", 1)
4171 r.send("c", 0)
4172 setTimeout( () => {
4173 r.send("5")
4174 },1)
4175
4176 }
4177 }
4178 //r.send("5") = ÿрþшûþõ "óûðòýþõ" þруöøõ
4179 //Sn(R.items[0]) = õôð
4180 //Sn(R.items[1]) = ÑÂтõýð
4181 //Sn(R.items[2]) = ÑÂÿðùú øûø öõ шøÿ
4182 //Sn(R.items[3]) = üõûьýøцð
4183 //Sn(R.items[4]) = трðÿúð øûø öõ Ã񥟥ÂÑ‚(õÑÂûø ÑÂтþóþ ÿрõôüõтð ýõту тþ ты ñõрõш ÿрøüðрø øûø ÑÂõúþýôðрø þруöøõ
4184 //Sn(R.items[5]) = тут üþø ÿþûýþüþчøѠуöõ òÑÂõ, þúþýчõýы
4185 var repeater = function(key, action, interval) {
4186 let _isKeyDown = false;
4187 let _intervalId = undefined;
4188
4189 return {
4190 start(keycode) {
4191 if(keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
4192 _isKeyDown = true;
4193 if(_intervalId === undefined) {
4194 _intervalId = setInterval(() => {
4195 action();
4196 if(!_isKeyDown){
4197 clearInterval(_intervalId);
4198 _intervalId = undefined;
4199 console.log("claered");
4200 }
4201 }, interval);
4202 }
4203 }
4204 },
4205
4206 stop(keycode) {
4207 if(keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
4208 _isKeyDown = false;
4209 }
4210 }
4211 };
4212
4213
4214 }
4215
4216 function Lt(e) {
4217 r.send("12", e)
4218 }
4219
4220 function Ft(e) {
4221 r.send("10", X[e].sid)
4222 }
4223 function zt() {
4224 r.send("8", document.getElementById("allianceInput").value)
4225 }
4226
4227 function Ht() {
4228 At = [], Ct(), r.send("9")
4229 }
4230 var Vt, qt = [];
4231
4232 function Yt(e, t) {
4233 for (var n = 0; n < qt.length; ++n)
4234 if (!qt[n].active) {
4235 Vt = qt[n];
4236 break
4237 }
4238 Vt || (Vt = new function() {
4239 this.init = function(e, t) {
4240 this.scale = 0, this.x = e, this.y = t, this.active = !0
4241 }, this.update = function(e, t) {
4242 this.active && (this.scale += .05 * t, this.scale >= o.mapPingScale ?
4243 this.active = !1 : (e.globalAlpha = 1 - Math.max(0, this.scale / o.mapPingScale),
4244 e.beginPath(), e.arc(this.x / o.mapScale * Ne.width, this.y / o.mapScale *
4245 Ne.width, this.scale, 0, 2 * Math.PI), e.stroke()))
4246 }
4247 }, qt.push(Vt)), Vt.init(e, t)
4248 }
4249
4250 function Wt(e) {
4251 Et = e
4252 }
4253 var Xt = 0;
4254
4255 function Nt(e, t, n) {
4256 n ? e ? R.tailIndex = t : R.tails[t] = 1 : e ? R.skinIndex = t : R.skins[t] =
4257 1, "block" == Qe.style.display && Gt()
4258 }
4259
4260 function Gt() {
4261 if (R) {
4262 s.removeAllChildren($e);
4263 for (var e = Xt, t = e ? tt : et, n = 0; n < t.length; ++n) t[n].dontSell ||
4264 function(n) {
4265 var i = s.generateElement({
4266 id: "storeDisplay" + n,
4267 class: "storeItem",
4268 onmouseout: function() {
4269 Tt()
4270 },
4271 onmouseover: function() {
4272 Tt(t[n], !1, !0)
4273 },
4274 parent: $e
4275 });
4276 s.hookTouchEvents(i, !0), s.generateElement({
4277 tag: "img",
4278 class: "hatPreview",
4279 src: "../img/" + (e ? "accessories/access_" : "hats/hat_") + t[n].id +
4280 (t[n].topSprite ? "_p" : "") + ".png",
4281 parent: i
4282 }), s.generateElement({
4283 tag: "span",
4284 text: t[n].name,
4285 parent: i
4286 }), (e ? R.tails[t[n].id] : R.skins[t[n].id]) ? (e ? R.tailIndex : R.skinIndex) ==
4287 t[n].id ? s.generateElement({
4288 class: "joinAlBtn",
4289 style: "margin-top: 5px",
4290 text: "Unequip",
4291 onclick: function() {
4292 Jt(0, e)
4293 },
4294 hookTouch: !0,
4295 parent: i
4296 }) : s.generateElement({
4297 class: "joinAlBtn",
4298 style: "margin-top: 5px",
4299 text: "Equip",
4300 onclick: function() {
4301 Jt(t[n].id, e)
4302 },
4303 hookTouch: !0,
4304 parent: i
4305 }) : (s.generateElement({
4306 class: "joinAlBtn",
4307 style: "margin-top: 5px",
4308 text: "Buy",
4309 onclick: function() {
4310 Kt(t[n].id, e)
4311 },
4312 hookTouch: !0,
4313 parent: i
4314 }), s.generateElement({
4315 tag: "span",
4316 class: "itemPrice",
4317 text: t[n].price,
4318 parent: i
4319 }))
4320 }(n)
4321 }
4322 }
4323
4324 function Jt(e, t) {
4325 r.send("13c", 0, e, t)
4326 }
4327
4328 function Kt(e, t) {
4329 r.send("13c", 1, e, t)
4330 }
4331
4332 function Qt() {
4333 Qe.style.display = "none", Ye.style.display = "none", an()
4334 }
4335
4336 function $t(e, t) {
4337 e && (t ? R.weapons = e : R.items = e);
4338 for (var n = 0; n < l.list.length; ++n) {
4339 var i = l.weapons.length + n;
4340 document.getElementById("actionBarItem" + i).style.display = R.items.indexOf(
4341 l.list[n].id) >= 0 ? "inline-block" : "none"
4342 }
4343 for (n = 0; n < l.weapons.length; ++n) document.getElementById(
4344 "actionBarItem" + n).style.display = R.weapons[l.weapons[n].type] == l.weapons[
4345 n].id ? "inline-block" : "none"
4346 }
4347
4348 function Zt(e) {
4349 M = e, V = e && window.devicePixelRatio || 1, Se.checked = e, I(
4350 "native_resolution", e.toString()), un()
4351 }
4352
4353 function en() {
4354 for (var e = "", t = 0; t < o.skinColors.length; ++t) e += t == ae ?
4355 "<div class='skinColorItem activeSkin' style='background-color:" + o.skinColors[
4356 t] + "' onclick='selectSkinColor(" + t + ")'></div>" :
4357 "<div class='skinColorItem' style='background-color:" + o.skinColors[t] +
4358 "' onclick='selectSkinColor(" + t + ")'></div>";
4359 Je.innerHTML = e
4360 }
4361 var tn = document.getElementById("chatBox"),
4362 nn = document.getElementById("chatHolder");
4363
4364 function rn() {
4365 on ? setTimeout((function() {
4366 var e = prompt("chat message");
4367 e && sn(e)
4368 }), 1) : "block" == nn.style.display ? (tn.value && sn(tn.value), an()) :
4369 (Qe.style.display = "none", Ye.style.display = "none", nn.style.display =
4370 "block", tn.focus(), yn()), tn.value = ""
4371 }
4372
4373 function sn(e) {
4374 r.send("ch", e.slice(0, 30))
4375 }
4376
4377 function an() {
4378 tn.value = "", nn.style.display = "none"
4379 }
4380 var on, cn, ln = ["motherfucking"
4381 ];
4382
4383 function hn(e, t) {
4384 var n = Ii(e);
4385 n && (n.chatMessage = function(e) {
4386 for (var t, n = 0; n < ln.length; ++n)
4387 if (e.indexOf(ln[n]) > -1) {
4388 t = "";
4389 for (var i = 0; i < ln[n].length; ++i) t += t.length ? "o" : "M";
4390 var r = new RegExp(ln[n], "g");
4391 e = e.replace(r, t)
4392 }
4393 return e
4394 }(t), n.chatCountdown = o.chatCountdown)
4395 }
4396
4397 function un() {
4398 F = window.innerWidth, z = window.innerHeight;
4399 var e = Math.max(F / oe, z / ce) * V;
4400 we.width = F * V, we.height = z * V, we.style.width = F + "px", we.style.height =
4401 z + "px", be.setTransform(e, 0, 0, e, (F * V - oe * e) / 2, (z * V - ce *
4402 e) / 2)
4403 }
4404
4405 function fn(e) {
4406 (on = e) ? Ae.classList.add("touch"): Ae.classList.remove("touch")
4407 }
4408
4409 function dn(e) {
4410 e.preventDefault(), e.stopPropagation(), fn(!0);
4411 for (var t = 0; t < e.changedTouches.length; t++) {
4412 var n = e.changedTouches[t];
4413 n.identifier == re.id ? (re.id = -1, bn()) : n.identifier == se.id && (se.id = -
4414 1, R.buildIndex >= 0 && (O = 1, vn()), O = 0, vn())
4415 }
4416 }
4417
4418 function pn() {
4419 return R ? (-1 != se.id ? cn = Math.atan2(se.currentY - se.startY, se.currentX -
4420 se.startX) : R.lockDir || on || (cn = Math.atan2(ie - z / 2, ne - F / 2)),
4421 s.fixTo(cn || 0, 2)) : 0
4422 }
4423 window.addEventListener("resize", s.checkTrusted(un)), un(), fn(!1), window.setUsingTouch =
4424 fn, we.addEventListener("touchmove", s.checkTrusted((function(e) {
4425 e.preventDefault(), e.stopPropagation(), fn(!0);
4426 for (var t = 0; t < e.changedTouches.length; t++) {
4427 var n = e.changedTouches[t];
4428 n.identifier == re.id ? (re.currentX = n.pageX, re.currentY = n.pageY,
4429 bn()) : n.identifier == se.id && (se.currentX = n.pageX, se.currentY =
4430 n.pageY, O = 1)
4431 }
4432 })), !1), we.addEventListener("touchstart", s.checkTrusted((function(e) {
4433 e.preventDefault(), e.stopPropagation(), fn(!0);
4434 for (var t = 0; t < e.changedTouches.length; t++) {
4435 var n = e.changedTouches[t];
4436 n.pageX < document.body.scrollWidth / 2 && -1 == re.id ? (re.id = n.identifier,
4437 re.startX = re.currentX = n.pageX, re.startY = re.currentY = n.pageY,
4438 bn()) : n.pageX > document.body.scrollWidth / 2 && -1 == se.id && (
4439 se.id = n.identifier, se.startX = se.currentX = n.pageX, se.startY =
4440 se.currentY = n.pageY, R.buildIndex < 0 && (O = 1, vn()))
4441 }
4442 })), !1), we.addEventListener("touchend", s.checkTrusted(dn), !1), we.addEventListener(
4443 "touchcancel", s.checkTrusted(dn), !1), we.addEventListener("touchleave",
4444 s.checkTrusted(dn), !1), we.addEventListener("mousemove", (function(e) {
4445 e.preventDefault(), e.stopPropagation(), fn(!1), ne = e.clientX, ie = e.clientY
4446 }), !1), we.addEventListener("mousedown", (function(e) {
4447 fn(!1), 1 != O && (O = 1, vn())
4448 }), !1), we.addEventListener("mouseup", (function(e) {
4449 fn(!1), 0 != O && (O = 0, vn())
4450 }), !1);
4451 var gn = {},
4452 mn = {
4453 87: [0, -1],
4454 38: [0, -1],
4455 83: [0, 1],
4456 40: [0, 1],
4457 65: [-1, 0],
4458 37: [-1, 0],
4459 68: [1, 0],
4460 39: [1, 0]
4461 };
4462
4463 function yn() {
4464 gn = {}, r.send("rmd")
4465 }
4466
4467 function kn() {
4468 return "block" != Ye.style.display && "block" != nn.style.display
4469 }
4470
4471 function vn() {
4472 R && R.alive && r.send("c", O, R.buildIndex >= 0 ? pn() : null)
4473 }
4474 window.addEventListener("keydown", s.checkTrusted((function(e) {
4475 var t = e.which || e.keyCode || 0;
4476 27 == t ? Qt() : R && R.alive && kn() && (gn[t] || (gn[t] = 1, 69 == t ?
4477 r.send("7", 1) : 67 == t ? (Mt || (Mt = {}), Mt.x = R.x, Mt.y = R.y) :
4478 88 == t ? (R.lockDir = R.lockDir ? 0 : 1, r.send("7", 0)) : null !=
4479 R.weapons[t - 49] ? Sn(R.weapons[t - 49], !0) : null != R.items[t -
4480 49 - R.weapons.length] ? Sn(R.items[t - 49 - R.weapons.length]) :
4481 81 == t ? Sn(R.items[0]) : 82 == t ? xn() : mn[t] ? bn() : 32 == t &&
4482 (O = 1, vn())))
4483 }))), window.addEventListener("keyup", s.checkTrusted((function(e) {
4484 if (R && R.alive) {
4485 var t = e.which || e.keyCode || 0;
4486 13 == t ? rn() : kn() && gn[t] && (gn[t] = 0, mn[t] ? bn() : 32 == t &&
4487 (O = 0, vn()))
4488 }
4489 })));
4490 var wn = void 0;
4491
4492 function bn() {
4493 var e = function() {
4494 var e = 0,
4495 t = 0;
4496 if (-1 != re.id) e += re.currentX - re.startX, t += re.currentY - re.startY;
4497 else
4498 for (var n in mn) {
4499 var i = mn[n];
4500 e += !!gn[n] * i[0], t += !!gn[n] * i[1]
4501 }
4502 return 0 == e && 0 == t ? void 0 : s.fixTo(Math.atan2(t, e), 2)
4503 }();
4504 (null == wn || null == e || Math.abs(e - wn) > .3) && (r.send("33", e), wn =
4505 e)
4506 }
4507
4508 function xn() {
4509 r.send("14", 1)
4510 }
4511
4512 function Sn(e, t) {
4513 r.send("5", e, t)
4514 }
4515
4516 function Tn() {
4517 I("moo_name", Le.value), !le && r.connected && (le = !0, x.stop("menu"), dt(
4518 "Loading..."), r.send("sp", {
4519 name: Le.value,
4520 moofoll: H,
4521 skin: ae
4522 }))
4523 }
4524 var In = !0;
4525
4526 function En(e) {
4527 Pe.style.display = "none", Me.style.display = "block", he.style.display =
4528 "none", gn = {}, j = e, O = 0, le = !0, In && (In = !1, N.length = 0)
4529 }
4530
4531 function Mn(e, t, n, i) {
4532 m.showText(e, t, 50, .18, 500, Math.abs(n), n >= 0 ? "#fff" : "#8ecc51")
4533 }
4534 var An = 99999;
4535
4536 function Pn() {
4537 le = !1;
4538 try {
4539 factorem.refreshAds([2], !0)
4540 } catch (e) {}
4541 Be.style.display = "none", Qt(), It = {
4542 x: R.x,
4543 y: R.y
4544 }, Pe.style.display = "none", Ge.style.display = "block", Ge.style.fontSize =
4545 "0px", An = 0, setTimeout((function() {
4546 Me.style.display = "block", he.style.display = "block", Ge.style.display =
4547 "none"
4548 }), o.deathFadeout), gt()
4549 }
4550
4551 function Bn(e) {
4552 R && nt.removeAllItems(e)
4553 }
4554
4555 function Cn(e) {
4556 nt.disableBySid(e)
4557 }
4558
4559 function On() {
4560 Oe.innerText = R.points, Re.innerText = R.food, je.innerText = R.wood, _e.innerText =
4561 R.stone, Ue.innerText = R.kills
4562 }
4563 var Rn = {},
4564 jn = ["crown", "skull"],
4565 _n = [];
4566
4567 function Un(e, t) {
4568 if (R.upgradePoints = e, R.upgrAge = t, e > 0) {
4569 _n.length = 0, s.removeAllChildren(Ve);
4570 for (var n = 0; n < l.weapons.length; ++n) l.weapons[n].age == t && (null ==
4571 l.weapons[n].pre || R.weapons.indexOf(l.weapons[n].pre) >= 0) && (s.generateElement({
4572 id: "upgradeItem" + n,
4573 class: "actionBarItem",
4574 onmouseout: function() {
4575 Tt()
4576 },
4577 parent: Ve
4578 }).style.backgroundImage = document.getElementById("actionBarItem" + n).style
4579 .backgroundImage, _n.push(n));
4580 for (n = 0; n < l.list.length; ++n)
4581 if (l.list[n].age == t && (null == l.list[n].pre || R.items.indexOf(l.list[
4582 n].pre) >= 0)) {
4583 var i = l.weapons.length + n;
4584 s.generateElement({
4585 id: "upgradeItem" + i,
4586 class: "actionBarItem",
4587 onmouseout: function() {
4588 Tt()
4589 },
4590 parent: Ve
4591 }).style.backgroundImage = document.getElementById("actionBarItem" + i)
4592 .style.backgroundImage, _n.push(i)
4593 }
4594 for (n = 0; n < _n.length; n++) ! function(e) {
4595 var t = document.getElementById("upgradeItem" + e);
4596 t.onmouseover = function() {
4597 l.weapons[e] ? Tt(l.weapons[e], !0) : Tt(l.list[e - l.weapons.length])
4598 }, t.onclick = s.checkTrusted((function() {
4599 r.send("6", e)
4600 })), s.hookTouchEvents(t)
4601 }(_n[n]);
4602 _n.length ? (Ve.style.display = "block", qe.style.display = "block", qe.innerHTML =
4603 "SELECT ITEMS (" + e + ")") : (Ve.style.display = "none", qe.style.display =
4604 "none", Tt())
4605 } else Ve.style.display = "none", qe.style.display = "none", Tt()
4606 }
4607
4608 function Dn(e, t, n) {
4609 null != e && (R.XP = e), null != t && (R.maxXP = t), null != n && (R.age =
4610 n), n == o.maxAge ? (ze.innerHTML = "MAX AGE", He.style.width = "100%") :
4611 (ze.innerHTML = "AGE " + R.age, He.style.width = R.XP / R.maxXP * 100 +
4612 "%")
4613 }
4614
4615 function Ln(e) {
4616 s.removeAllChildren(De);
4617 for (var t = 1, n = 0; n < e.length; n += 3) ! function(n) {
4618 s.generateElement({
4619 class: "leaderHolder",
4620 parent: De,
4621 children: [s.generateElement({
4622 class: "leaderboardItem",
4623 style: "color:" + (e[n] == j ? "#fff" : "rgba(255,255,255,0.6)"),
4624 text: t + ". " + ("" != e[n + 1] ? e[n + 1] : "unknown")
4625 }), s.generateElement({
4626 class: "leaderScore",
4627 text: s.kFormat(e[n + 2]) || "0"
4628 })]
4629 })
4630 }(n), t++
4631 }
4632
4633 function Fn(e, t, n, i) {
4634 be.save(), be.setTransform(1, 0, 0, 1, 0, 0), be.scale(V, V);
4635 var r = 50;
4636 be.beginPath(), be.arc(e, t, r, 0, 2 * Math.PI, !1), be.closePath(), be.fillStyle =
4637 "rgba(255, 255, 255, 0.3)", be.fill(), r = 50;
4638 var s = n - e,
4639 a = i - t,
4640 o = Math.sqrt(Math.pow(s, 2) + Math.pow(a, 2)),
4641 c = o > r ? o / r : 1;
4642 s /= c, a /= c, be.beginPath(), be.arc(e + s, t + a, .5 * r, 0, 2 * Math.PI, !
4643 1), be.closePath(), be.fillStyle = "white", be.fill(), be.restore()
4644 }
4645
4646 function zn(e, t, n) {
4647 for (var i = 0; i < G.length; ++i)(_ = G[i]).active && _.layer == e && (_.update(
4648 P), _.active && ki(_.x - t, _.y - n, _.scale) && (be.save(), be.translate(
4649 _.x - t, _.y - n), be.rotate(_.dir), Vn(0, 0, _, be, 1), be.restore()))
4650 }
4651 var Hn = {};
4652
4653 function Vn(e, t, n, i, r) {
4654 if (n.src) {
4655 var s = l.projectiles[n.indx].src,
4656 a = Hn[s];
4657 a || ((a = new Image).onload = function() {
4658 this.isLoaded = !0
4659 }, a.src = ".././img/weapons/" + s + ".png", Hn[s] = a), a.isLoaded && i.drawImage(
4660 a, e - n.scale / 2, t - n.scale / 2, n.scale, n.scale)
4661 } else 1 == n.indx && (i.fillStyle = "#939393", si(e, t, n.scale, i))
4662 }
4663
4664 function qn(e, t, n, i) {
4665 var r = o.riverWidth + i,
4666 s = o.mapScale / 2 - t - r / 2;
4667 s < ce && s + r > 0 && n.fillRect(0, s, oe, r)
4668 }
4669
4670 function Yn(e, t, n) {
4671 for (var i, r, s, a = 0; a < N.length; ++a)(_ = N[a]).active && (r = _.x +
4672 _.xWiggle - t, s = _.y + _.yWiggle - n, 0 == e && _.update(P), _.layer ==
4673 e && ki(r, s, _.scale + (_.blocker || 0)) && (be.globalAlpha = _.hideFromEnemy ?
4674 .6 : 1, _.isItem ? (i = ri(_), be.save(), be.translate(r, s), be.rotate(
4675 _.dir), be.drawImage(i, -i.width / 2, -i.height / 2), _.blocker && (be
4676 .strokeStyle = "#db6e6e", be.globalAlpha = .3, be.lineWidth = 6, si(0,
4677 0, _.blocker, be, !1, !0)), be.restore()) : (i = ni(_), be.drawImage(i,
4678 r - i.width / 2, s - i.height / 2))))
4679 }
4680
4681 function Wn(e, t, n) {
4682 (_ = Ii(e)) && _.startAnim(t, n)
4683 }
4684
4685 function Xn(e, t, n) {
4686 be.globalAlpha = 1;
4687 for (var i = 0; i < W.length; ++i)(_ = W[i]).zIndex == n && (_.animate(P),
4688 _.visible && (_.skinRot += .002 * P, L = (_ == R ? pn() : _.dir) + _.dirPlus,
4689 be.save(), be.translate(_.x - e, _.y - t), be.rotate(L), Nn(_, be), be.restore()
4690 ))
4691 }
4692
4693 function Nn(e, t) {
4694 (t = t || be).lineWidth = 5.5, t.lineJoin = "miter";
4695 var n = Math.PI / 4 * (l.weapons[e.weaponIndex].armS || 1),
4696 i = e.buildIndex < 0 && l.weapons[e.weaponIndex].hndS || 1,
4697 r = e.buildIndex < 0 && l.weapons[e.weaponIndex].hndD || 1;
4698 if (e.tailIndex > 0 && function(e, t, n) {
4699 if (!(Gn = Qn[e])) {
4700 var i = new Image;
4701 i.onload = function() {
4702 this.isLoaded = !0, this.onload = null
4703 }, i.src = ".././img/accessories/access_" + e + ".png", Qn[e] = i, Gn =
4704 i
4705 }
4706 var r = $n[e];
4707 if (!r) {
4708 for (var s = 0; s < tt.length; ++s)
4709 if (tt[s].id == e) {
4710 r = tt[s];
4711 break
4712 }
4713 $n[e] = r
4714 }
4715 Gn.isLoaded && (t.save(), t.translate(-20 - (r.xOff || 0), 0), r.spin &&
4716 t.rotate(n.skinRot), t.drawImage(Gn, -r.scale / 2, -r.scale / 2, r.scale,
4717 r.scale), t.restore())
4718 }(e.tailIndex, t, e), e.buildIndex < 0 && !l.weapons[e.weaponIndex].aboveHand &&
4719 (ei(l.weapons[e.weaponIndex], o.weaponVariants[e.weaponVariant].src, e.scale,
4720 0, t), null == l.weapons[e.weaponIndex].projectile || l.weapons[e.weaponIndex]
4721 .hideProjectile || Vn(e.scale, 0, l.projectiles[l.weapons[e.weaponIndex].projectile],
4722 be)), t.fillStyle = o.skinColors[e.skinColor], si(e.scale * Math.cos(n),
4723 e.scale * Math.sin(n), 14), si(e.scale * r * Math.cos(-n * i), e.scale *
4724 r * Math.sin(-n * i), 14), e.buildIndex < 0 && l.weapons[e.weaponIndex].aboveHand &&
4725 (ei(l.weapons[e.weaponIndex], o.weaponVariants[e.weaponVariant].src, e.scale,
4726 0, t), null == l.weapons[e.weaponIndex].projectile || l.weapons[e.weaponIndex]
4727 .hideProjectile || Vn(e.scale, 0, l.projectiles[l.weapons[e.weaponIndex].projectile],
4728 be)), e.buildIndex >= 0) {
4729 var s = ri(l.list[e.buildIndex]);
4730 t.drawImage(s, e.scale - l.list[e.buildIndex].holdOffset, -s.width / 2)
4731 }
4732 si(0, 0, e.scale, t), e.skinIndex > 0 && (t.rotate(Math.PI / 2), function e(
4733 t, n, i, r) {
4734 if (!(Gn = Jn[t])) {
4735 var s = new Image;
4736 s.onload = function() {
4737 this.isLoaded = !0, this.onload = null
4738 }, s.src = ".././img/hats/hat_" + t + ".png", Jn[t] = s, Gn = s
4739 }
4740 var a = i || Kn[t];
4741 if (!a) {
4742 for (var o = 0; o < et.length; ++o)
4743 if (et[o].id == t) {
4744 a = et[o];
4745 break
4746 }
4747 Kn[t] = a
4748 }
4749 Gn.isLoaded && n.drawImage(Gn, -a.scale / 2, -a.scale / 2, a.scale, a.scale), !
4750 i && a.topSprite && (n.save(), n.rotate(r.skinRot), e(t + "_top", n, a,
4751 r), n.restore())
4752 }(e.skinIndex, t, null, e))
4753 }
4754 var Gn, Jn = {},
4755 Kn = {},
4756 Qn = {},
4757 $n = {},
4758 Zn = {};
4759
4760 function ei(e, t, n, i, r) {
4761 var s = e.src + (t || ""),
4762 a = Zn[s];
4763 a || ((a = new Image).onload = function() {
4764 this.isLoaded = !0
4765 }, a.src = ".././img/weapons/" + s + ".png", Zn[s] = a), a.isLoaded && r.drawImage(
4766 a, n + e.xOff - e.length / 2, i + e.yOff - e.width / 2, e.length, e.width
4767 )
4768 }
4769 var ti = {};
4770
4771 function ni(e) {
4772 var t = e.y >= o.mapScale - o.snowBiomeTop ? 2 : e.y <= o.snowBiomeTop ? 1 :
4773 0,
4774 n = e.type + "_" + e.scale + "_" + t,
4775 i = ti[n];
4776 if (!i) {
4777 var r = document.createElement("canvas");
4778 r.width = r.height = 2.1 * e.scale + 5.5;
4779 var a = r.getContext("2d");
4780 if (a.translate(r.width / 2, r.height / 2), a.rotate(s.randFloat(0, Math.PI)),
4781 a.strokeStyle = it, a.lineWidth = 5.5, 0 == e.type)
4782 for (var c, l = 0; l < 2; ++l) ai(a, 7, c = _.scale * (l ? .5 : 1), .7 *
4783 c), a.fillStyle = t ? l ? "#fff" : "#e3f1f4" : l ? "#b4db62" :
4784 "#9ebf57", a.fill(), l || a.stroke();
4785 else if (1 == e.type)
4786 if (2 == t) a.fillStyle = "#606060", ai(a, 6, .3 * e.scale, .71 * e.scale),
4787 a.fill(), a.stroke(), a.fillStyle = "#89a54c", si(0, 0, .55 * e.scale, a),
4788 a.fillStyle = "#a5c65b", si(0, 0, .3 * e.scale, a, !0);
4789 else {
4790 var h;
4791 ! function(e, t, n, i) {
4792 var r, a = Math.PI / 2 * 3,
4793 o = Math.PI / 6;
4794 e.beginPath(), e.moveTo(0, -i);
4795 for (var c = 0; c < 6; c++) r = s.randInt(n + .9, 1.2 * n), e.quadraticCurveTo(
4796 Math.cos(a + o) * r, Math.sin(a + o) * r, Math.cos(a + 2 * o) * i,
4797 Math.sin(a + 2 * o) * i), a += 2 * o;
4798 e.lineTo(0, -i), e.closePath()
4799 }(a, 0, _.scale, .7 * _.scale), a.fillStyle = t ? "#e3f1f4" : "#89a54c",
4800 a.fill(), a.stroke(), a.fillStyle = t ? "#6a64af" : "#c15555";
4801 var u = T / 4;
4802 for (l = 0; l < 4; ++l) si((h = s.randInt(_.scale / 3.5, _.scale / 2.3)) *
4803 Math.cos(u * l), h * Math.sin(u * l), s.randInt(10, 12), a)
4804 }
4805 else 2 != e.type && 3 != e.type || (a.fillStyle = 2 == e.type ? 2 == t ?
4806 "#938d77" : "#939393" : "#e0c655", ai(a, 3, e.scale, e.scale), a.fill(),
4807 a.stroke(), a.fillStyle = 2 == e.type ? 2 == t ? "#b2ab90" : "#bcbcbc" :
4808 "#ebdca3", ai(a, 3, .55 * e.scale, .65 * e.scale), a.fill());
4809 i = r, ti[n] = i
4810 }
4811 return i
4812 }
4813 var ii = [];
4814
4815 function ri(e, t) {
4816 var n = ii[e.id];
4817 if (!n || t) {
4818 var i = document.createElement("canvas");
4819 i.width = i.height = 2.5 * e.scale + 5.5 + (l.list[e.id].spritePadding ||
4820 0);
4821 var r = i.getContext("2d");
4822 if (r.translate(i.width / 2, i.height / 2), r.rotate(t ? 0 : Math.PI / 2),
4823 r.strokeStyle = it, r.lineWidth = 5.5 * (t ? i.width / 81 : 1), "apple" ==
4824 e.name) {
4825 r.fillStyle = "#c15555", si(0, 0, e.scale, r), r.fillStyle = "#89a54c";
4826 var a = -Math.PI / 2;
4827 ! function(e, t, n, i, r) {
4828 var s = e + 25 * Math.cos(i),
4829 a = t + 25 * Math.sin(i);
4830 r.moveTo(e, t), r.beginPath(), r.quadraticCurveTo((e + s) / 2 + 10 *
4831 Math.cos(i + Math.PI / 2), (t + a) / 2 + 10 * Math.sin(i + Math.PI / 2),
4832 s, a), r.quadraticCurveTo((e + s) / 2 - 10 * Math.cos(i + Math.PI / 2),
4833 (t + a) / 2 - 10 * Math.sin(i + Math.PI / 2), e, t), r.closePath(), r.fill(),
4834 r.stroke()
4835 }(e.scale * Math.cos(a), e.scale * Math.sin(a), 0, a + Math.PI / 2, r)
4836 } else if ("cookie" == e.name) {
4837 r.fillStyle = "#cca861", si(0, 0, e.scale, r), r.fillStyle = "#937c4b";
4838 for (var o = T / (h = 4), c = 0; c < h; ++c) si((u = s.randInt(e.scale /
4839 2.5, e.scale / 1.7)) * Math.cos(o * c), u * Math.sin(o * c), s.randInt(
4840 4, 5), r, !0)
4841 } else if ("cheese" == e.name) {
4842 var h, u;
4843 for (r.fillStyle = "#f4f3ac", si(0, 0, e.scale, r), r.fillStyle =
4844 "#c3c28b", o = T / (h = 4), c = 0; c < h; ++c) si((u = s.randInt(e.scale /
4845 2.5, e.scale / 1.7)) * Math.cos(o * c), u * Math.sin(o * c), s.randInt(
4846 4, 5), r, !0)
4847 } else if ("wood wall" == e.name || "stone wall" == e.name ||
4848 "castle wall" == e.name) {
4849 r.fillStyle = "castle wall" == e.name ? "#83898e" : "wood wall" == e.name ?
4850 "#a5974c" : "#939393";
4851 var f = "castle wall" == e.name ? 4 : 3;
4852 ai(r, f, 1.1 * e.scale, 1.1 * e.scale), r.fill(), r.stroke(), r.fillStyle =
4853 "castle wall" == e.name ? "#9da4aa" : "wood wall" == e.name ? "#c9b758" :
4854 "#bcbcbc", ai(r, f, .65 * e.scale, .65 * e.scale), r.fill()
4855 } else if ("spikes" == e.name || "greater spikes" == e.name ||
4856 "poison spikes" == e.name || "spinning spikes" == e.name) {
4857 r.fillStyle = "poison spikes" == e.name ? "#7b935d" : "#939393";
4858 var d = .6 * e.scale;
4859 ai(r, "spikes" == e.name ? 5 : 6, e.scale, d), r.fill(), r.stroke(), r.fillStyle =
4860 "#a5974c", si(0, 0, d, r), r.fillStyle = "#c9b758", si(0, 0, d / 2, r, !
4861 0)
4862 } else if ("windmill" == e.name || "faster windmill" == e.name ||
4863 "power mill" == e.name) r.fillStyle = "#a5974c", si(0, 0, e.scale, r), r.fillStyle =
4864 "#c9b758", ci(0, 0, 1.5 * e.scale, 29, 4, r), r.fillStyle = "#a5974c", si(
4865 0, 0, .5 * e.scale, r);
4866 else if ("mine" == e.name) r.fillStyle = "#939393", ai(r, 3, e.scale, e.scale),
4867 r.fill(), r.stroke(), r.fillStyle = "#bcbcbc", ai(r, 3, .55 * e.scale,
4868 .65 * e.scale), r.fill();
4869 else if ("sapling" == e.name)
4870 for (c = 0; c < 2; ++c) ai(r, 7, d = e.scale * (c ? .5 : 1), .7 * d), r.fillStyle =
4871 c ? "#b4db62" : "#9ebf57", r.fill(), c || r.stroke();
4872 else if ("pit trap" == e.name) r.fillStyle = "#a5974c", ai(r, 3, 1.1 * e.scale,
4873 1.1 * e.scale), r.fill(), r.stroke(), r.fillStyle = it, ai(r, 3, .65 * e
4874 .scale, .65 * e.scale), r.fill();
4875 else if ("boost pad" == e.name) r.fillStyle = "#7e7f82", oi(0, 0, 2 * e.scale,
4876 2 * e.scale, r), r.fill(), r.stroke(), r.fillStyle = "#dbd97d",
4877 function(e, t) {
4878 t = t || be;
4879 var n = e * (Math.sqrt(3) / 2);
4880 t.beginPath(), t.moveTo(0, -n / 2), t.lineTo(-e / 2, n / 2), t.lineTo(e /
4881 2, n / 2), t.lineTo(0, -n / 2), t.fill(), t.closePath()
4882 }(1 * e.scale, r);
4883 else if ("turret" == e.name) r.fillStyle = "#a5974c", si(0, 0, e.scale, r),
4884 r.fill(), r.stroke(), r.fillStyle = "#939393", oi(0, -25, .9 * e.scale,
4885 50, r), si(0, 0, .6 * e.scale, r), r.fill(), r.stroke();
4886 else if ("platform" == e.name) {
4887 r.fillStyle = "#cebd5f";
4888 var p = 2 * e.scale,
4889 g = p / 4,
4890 m = -e.scale / 2;
4891 for (c = 0; c < 4; ++c) oi(m - g / 2, 0, g, 2 * e.scale, r), r.fill(), r.stroke(),
4892 m += p / 4
4893 } else "healing pad" == e.name ? (r.fillStyle = "#7e7f82", oi(0, 0, 2 * e.scale,
4894 2 * e.scale, r), r.fill(), r.stroke(), r.fillStyle = "#db6e6e", ci(0, 0,
4895 .65 * e.scale, 20, 4, r, !0)) : "spawn pad" == e.name ? (r.fillStyle =
4896 "#7e7f82", oi(0, 0, 2 * e.scale, 2 * e.scale, r), r.fill(), r.stroke(),
4897 r.fillStyle = "#71aad6", si(0, 0, .6 * e.scale, r)) : "blocker" == e.name ?
4898 (r.fillStyle = "#7e7f82", si(0, 0, e.scale, r), r.fill(), r.stroke(), r.rotate(
4899 Math.PI / 4), r.fillStyle = "#db6e6e", ci(0, 0, .65 * e.scale, 20, 4, r, !
4900 0)) : "teleporter" == e.name && (r.fillStyle = "#7e7f82", si(0, 0, e.scale,
4901 r), r.fill(), r.stroke(), r.rotate(Math.PI / 4), r.fillStyle =
4902 "#d76edb", si(0, 0, .5 * e.scale, r, !0));
4903 n = i, t || (ii[e.id] = n)
4904 }
4905 return n
4906 }
4907
4908 function si(e, t, n, i, r, s) {
4909 (i = i || be).beginPath(), i.arc(e, t, n, 0, 2 * Math.PI), s || i.fill(), r ||
4910 i.stroke()
4911 }
4912
4913 function ai(e, t, n, i) {
4914 var r, s, a = Math.PI / 2 * 3,
4915 o = Math.PI / t;
4916 e.beginPath(), e.moveTo(0, -n);
4917 for (var c = 0; c < t; c++) r = Math.cos(a) * n, s = Math.sin(a) * n, e.lineTo(
4918 r, s), a += o, r = Math.cos(a) * i, s = Math.sin(a) * i, e.lineTo(r, s),
4919 a += o;
4920 e.lineTo(0, -n), e.closePath()
4921 }
4922
4923 function oi(e, t, n, i, r, s) {
4924 r.fillRect(e - n / 2, t - i / 2, n, i), s || r.strokeRect(e - n / 2, t - i /
4925 2, n, i)
4926 }
4927
4928 function ci(e, t, n, i, r, s, a) {
4929 s.save(), s.translate(e, t), r = Math.ceil(r / 2);
4930 for (var o = 0; o < r; o++) oi(0, 0, 2 * n, i, s, a), s.rotate(Math.PI / r);
4931 s.restore()
4932 }
4933
4934 function li(e) {
4935 for (var t = 0; t < e.length;) nt.add(e[t], e[t + 1], e[t + 2], e[t + 3], e[
4936 t + 4], e[t + 5], l.list[e[t + 6]], !0, e[t + 7] >= 0 ? {
4937 sid: e[t + 7]
4938 } : null), t += 8
4939 }
4940
4941 function hi(e, t) {
4942 (_ = Mi(t)) && (_.xWiggle += o.gatherWiggle * Math.cos(e), _.yWiggle += o.gatherWiggle *
4943 Math.sin(e))
4944 }
4945
4946 function ui(e, t) {
4947 (_ = Mi(e)) && (_.dir = t, _.xWiggle += o.gatherWiggle * Math.cos(t + Math.PI),
4948 _.yWiggle += o.gatherWiggle * Math.sin(t + Math.PI))
4949 }
4950
4951 function fi(e, t, n, i, r, s, a, o) {
4952 lt && (J.addProjectile(e, t, n, i, r, s, null, null, a).sid = o)
4953 }
4954
4955 function di(e, t) {
4956 for (var n = 0; n < G.length; ++n) G[n].sid == e && (G[n].range = t)
4957 }
4958
4959 function pi(e) {
4960 (_ = Ei(e)) && _.startAnim()
4961 }
4962
4963 function gi(e) {
4964 for (var t = 0; t < Y.length; ++t) Y[t].forcePos = !Y[t].visible, Y[t].visible = !
4965 1;
4966 if (e) {
4967 var n = Date.now();
4968 for (t = 0; t < e.length;)(_ = Ei(e[t])) ? (_.index = e[t + 1], _.t1 =
4969 void 0 === _.t2 ? n : _.t2, _.t2 = n, _.x1 = _.x, _.y1 = _.y, _.x2 = e[t +
4970 2], _.y2 = e[t + 3], _.d1 = void 0 === _.d2 ? e[t + 4] : _.d2, _.d2 = e[
4971 t + 4], _.health = e[t + 5], _.dt = 0, _.visible = !0) : ((_ = Z.spawn(
4972 e[t + 2], e[t + 3], e[t + 4], e[t + 1])).x2 = _.x, _.y2 = _.y, _.d2 = _
4973 .dir, _.health = e[t + 5], Z.aiTypes[e[t + 1]].name || (_.name = o.cowNames[
4974 e[t + 6]]), _.forcePos = !0, _.sid = e[t], _.visible = !0), t += 7
4975 }
4976 }
4977 var mi = {};
4978
4979 function yi(e, t) {
4980 var n = e.index,
4981 i = mi[n];
4982 if (!i) {
4983 var r = new Image;
4984 r.onload = function() {
4985 this.isLoaded = !0, this.onload = null
4986 }, r.src = ".././img/animals/" + e.src + ".png", i = r, mi[n] = i
4987 }
4988 if (i.isLoaded) {
4989 var s = 1.2 * e.scale * (e.spriteMlt || 1);
4990 t.drawImage(i, -s, -s, 2 * s, 2 * s)
4991 }
4992 }
4993
4994 function ki(e, t, n) {
4995 return e + n >= 0 && e - n <= oe && t + n >= 0 && t - n <= ce
4996 }
4997
4998 function vi(e, t) {
4999 var n = function(e) {
5000 for (var t = 0; t < W.length; ++t)
5001 if (W[t].id == e) return W[t];
5002 return null
5003 }(e[0]);
5004 n || (n = new u(e[0], e[1], o, s, J, nt, W, Y, l, et, tt), W.push(n)), n.spawn(
5005 t ? H : null), n.visible = !1, n.x2 = void 0, n.y2 = void 0, n.setData(e),
5006 t && (U = (R = n).x, D = R.y, $t(), On(), Dn(), Un(0), Be.style.display =
5007 "block")
5008 }
5009
5010 function wi(e) {
5011 for (var t = 0; t < W.length; t++)
5012 if (W[t].id == e) {
5013 W.splice(t, 1);
5014 break
5015 }
5016 }
5017
5018 function bi(e, t) {
5019 R && (R.itemCounts[e] = t)
5020 }
5021
5022 function xi(e, t, n) {
5023 R && (R[e] = t, n && On())
5024 }
5025
5026 function Si(e, t) {
5027 (_ = Ii(e)) && (_.health = t)
5028 }
5029
5030 function Ti(e) {
5031 for (var t = Date.now(), n = 0; n < W.length; ++n) W[n].forcePos = !W[n].visible,
5032 W[n].visible = !1;
5033 for (n = 0; n < e.length;)(_ = Ii(e[n])) && (_.t1 = void 0 === _.t2 ? t : _
5034 .t2, _.t2 = t, _.x1 = _.x, _.y1 = _.y, _.x2 = e[n + 1], _.y2 = e[n + 2],
5035 _.d1 = void 0 === _.d2 ? e[n + 3] : _.d2, _.d2 = e[n + 3], _.dt = 0, _.buildIndex =
5036 e[n + 4], _.weaponIndex = e[n + 5], _.weaponVariant = e[n + 6], _.team =
5037 e[n + 7], _.isLeader = e[n + 8], _.skinIndex = e[n + 9], _.tailIndex = e[
5038 n + 10], _.iconIndex = e[n + 11], _.zIndex = e[n + 12], _.visible = !0),
5039 n += 13
5040 }
5041
5042 function Ii(e) {
5043 for (var t = 0; t < W.length; ++t)
5044 if (W[t].sid == e) return W[t];
5045 return null
5046 }
5047
5048 function Ei(e) {
5049 for (var t = 0; t < Y.length; ++t)
5050 if (Y[t].sid == e) return Y[t];
5051 return null
5052 }
5053
5054 function Mi(e) {
5055 for (var t = 0; t < N.length; ++t)
5056 if (N[t].sid == e) return N[t];
5057 return null
5058 }
5059 var Ai = -1;
5060
5061 function Pi() {
5062 var e = Date.now() - Ai;
5063 window.pingTime = e, Ie.innerText = "Ping: " + e + " ms"
5064 }
5065
5066 function Bi() {
5067 Ai = Date.now(), r.send("pp")
5068 }
5069
5070 function Ci(e) {
5071 if (!(e < 0)) {
5072 var t = Math.floor(e / 60),
5073 n = e % 60;
5074 n = ("0" + n).slice(-2), Ee.innerText = "Server restarting in " + t + ":" +
5075 n, Ee.hidden = !1
5076 }
5077 }
5078
5079 function Oi(e) {
5080 window.open(e, "_blank")
5081 }
5082 window.requestAnimFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame ||
5083 window.mozRequestAnimationFrame || function(e) {
5084 window.setTimeout(e, 1e3 / 60)
5085 },
5086 function() {
5087 var e = o.mapScale / 2;
5088 nt.add(0, e, e + 200, 0, o.treeScales[3], 0), nt.add(1, e, e - 480, 0, o.treeScales[
5089 3], 0), nt.add(2, e + 300, e + 450, 0, o.treeScales[3], 0), nt.add(3, e -
5090 950, e - 130, 0, o.treeScales[2], 0), nt.add(4, e - 750, e - 400, 0, o.treeScales[
5091 3], 0), nt.add(5, e - 700, e + 400, 0, o.treeScales[2], 0), nt.add(6, e +
5092 800, e - 200, 0, o.treeScales[3], 0), nt.add(7, e - 260, e + 340, 0, o.bushScales[
5093 3], 1), nt.add(8, e + 760, e + 310, 0, o.bushScales[3], 1), nt.add(9, e -
5094 800, e + 100, 0, o.bushScales[3], 1), nt.add(10, e - 800, e + 300, 0, l.list[
5095 4].scale, l.list[4].id, l.list[10]), nt.add(11, e + 650, e - 390, 0, l.list[
5096 4].scale, l.list[4].id, l.list[10]), nt.add(12, e - 400, e - 450, 0, o.rockScales[
5097 2], 2)
5098 }(),
5099 function e() {
5100 B = Date.now(), P = B - q, q = B,
5101 function() {
5102 if (R && (!C || B - C >= 1e3 / o.clientSendRate) && (C = B, r.send("2",
5103 pn())), An < 120 && (An += .1 * P, Ge.style.fontSize = Math.min(Math.round(
5104 An), 120) + "px"), R) {
5105 var e = s.getDistance(U, D, R.x, R.y),
5106 t = s.getDirection(R.x, R.y, U, D),
5107 n = Math.min(.01 * e * P, e);
5108 e > .05 ? (U += n * Math.cos(t), D += n * Math.sin(t)) : (U = R.x, D =
5109 R.y)
5110 } else U = o.mapScale / 2, D = o.mapScale / 2;
5111 for (var i = B - 1e3 / o.serverUpdateRate, a = 0; a < W.length + Y.length; ++
5112 a)
5113 if ((_ = W[a] || Y[a - W.length]) && _.visible)
5114 if (_.forcePos) _.x = _.x2, _.y = _.y2, _.dir = _.d2;
5115 else {
5116 var c = _.t2 - _.t1,
5117 l = (i - _.t1) / c;
5118 _.dt += P;
5119 var h = Math.min(1.7, _.dt / 170),
5120 u = _.x2 - _.x1;
5121 _.x = _.x1 + u * h, u = _.y2 - _.y1, _.y = _.y1 + u * h, _.dir = Math
5122 .lerpAngle(_.d2, _.d1, Math.min(1.2, l))
5123 }
5124 var f = U - oe / 2,
5125 d = D - ce / 2;
5126 o.snowBiomeTop - d <= 0 && o.mapScale - o.snowBiomeTop - d >= ce ? (be.fillStyle =
5127 "#b6db66", be.fillRect(0, 0, oe, ce)) : o.mapScale - o.snowBiomeTop -
5128 d <= 0 ? (be.fillStyle = "#dbc666", be.fillRect(0, 0, oe, ce)) : o.snowBiomeTop -
5129 d >= ce ? (be.fillStyle = "#fff", be.fillRect(0, 0, oe, ce)) : o.snowBiomeTop -
5130 d >= 0 ? (be.fillStyle = "#fff", be.fillRect(0, 0, oe, o.snowBiomeTop -
5131 d), be.fillStyle = "#b6db66", be.fillRect(0, o.snowBiomeTop - d, oe,
5132 ce - (o.snowBiomeTop - d))) : (be.fillStyle = "#b6db66", be.fillRect(0,
5133 0, oe, o.mapScale - o.snowBiomeTop - d), be.fillStyle = "#dbc666", be
5134 .fillRect(0, o.mapScale - o.snowBiomeTop - d, oe, ce - (o.mapScale - o
5135 .snowBiomeTop - d))), In || ((ee += te * o.waveSpeed * P) >= o.waveMax ?
5136 (ee = o.waveMax, te = -1) : ee <= 1 && (ee = te = 1), be.globalAlpha =
5137 1, be.fillStyle = "#dbc666", qn(f, d, be, o.riverPadding), be.fillStyle =
5138 "#91b2db", qn(f, d, be, 250 * (ee - 1))), be.lineWidth = 4, be.strokeStyle =
5139 "#000", be.globalAlpha = .06, be.beginPath();
5140 for (var p = -U; p < oe; p += ce / 18) p > 0 && (be.moveTo(p, 0), be.lineTo(
5141 p, ce));
5142 for (var g = -D; g < ce; g += ce / 18) p > 0 && (be.moveTo(0, g), be.lineTo(
5143 oe, g));
5144 for (be.stroke(), be.globalAlpha = 1, be.strokeStyle = it, Yn(-1, f, d),
5145 be.globalAlpha = 1, be.lineWidth = 5.5, zn(0, f, d), Xn(f, d, 0), be.globalAlpha =
5146 1, a = 0; a < Y.length; ++a)(_ = Y[a]).active && _.visible && (_.animate(
5147 P), be.save(), be.translate(_.x - f, _.y - d), be.rotate(_.dir + _.dirPlus -
5148 Math.PI / 2), yi(_, be), be.restore());
5149 if (Yn(0, f, d), zn(1, f, d), Yn(1, f, d), Xn(f, d, 1), Yn(2, f, d), Yn(
5150 3, f, d), be.fillStyle = "#000", be.globalAlpha = .09, f <= 0 && be.fillRect(
5151 0, 0, -f, ce), o.mapScale - f <= oe) {
5152 var y = Math.max(0, -d);
5153 be.fillRect(o.mapScale - f, y, oe - (o.mapScale - f), ce - y)
5154 }
5155 if (d <= 0 && be.fillRect(-f, 0, oe + f, -d), o.mapScale - d <= ce) {
5156 var k = Math.max(0, -f),
5157 v = 0;
5158 o.mapScale - f <= oe && (v = oe - (o.mapScale - f)), be.fillRect(k, o.mapScale -
5159 d, oe - k - v, ce - (o.mapScale - d))
5160 }
5161 for (be.globalAlpha = 1, be.fillStyle = "rgba(0, 0, 70, 0.35)", be.fillRect(
5162 0, 0, oe, ce), be.strokeStyle = rt, a = 0; a < W.length + Y.length; ++
5163 a)
5164 if ((_ = W[a] || Y[a - W.length]).visible && (10 != _.skinIndex || _ ==
5165 R || _.team && _.team == R.team)) {
5166 var w = (_.team?"["+_.team+"] ":"")+(_.name||"")
5167 if ("" != w) {
5168 if (be.font = (_.nameScale || 30) + "px Hammersmith One", be.fillStyle =
5169 "#fff", be.textBaseline = "middle", be.textAlign = "center", be.lineWidth =
5170 _.nameScale ? 11 : 8, be.lineJoin = "round", be.strokeText(w, _.x -
5171 f, _.y - d - _.scale - o.nameY), be.fillText(w, _.x - f, _.y - d -
5172 _.scale - o.nameY), _.isLeader && Rn.crown.isLoaded) {
5173 var b = o.crownIconScale;
5174 k = _.x - f - b / 2 - be.measureText(w).width / 2 - o.crownPad, be.drawImage(
5175 Rn.crown, k, _.y - d - _.scale - o.nameY - b / 2 - 5, b, b)
5176 }
5177 1 == _.iconIndex && Rn.skull.isLoaded && (b = o.crownIconScale, k = _
5178 .x - f - b / 2 + be.measureText(w).width / 2 + o.crownPad, be.drawImage(
5179 Rn.skull, k, _.y - d - _.scale - o.nameY - b / 2 - 5, b, b))
5180 }
5181 window.items = R.items;
5182 window.w = R.weapons;
5183 (be.textAlign = "center",//hp number
5184 be.fillStyle = "#fff",
5185 be.lineJoin = "round",
5186 be.font = "20px Hammersmith One",
5187 be.lineWidth = 6,
5188 be.strokeText(`\nHP:${_.health}/${_.maxHealth}`,_.x - f,_.y - d + _.scale + o.nameY+(34)),
5189 be.fillText(`\nHP:${_.health}/${_.maxHealth}`,_.x - f,_.y - d + _.scale + o.nameY+(34))
5190 )
5191 if(_.isPlayer&&_!=R&&_.team&&_.team==R.team){//tribe tracers
5192 be.lineCap = "round";
5193 be.strokeStyle = "#228b22";
5194 be.lineWidth = 3;
5195 be.beginPath();
5196 be.moveTo(R.x-f, R.y-d);
5197 be.lineTo(_.x-f, _.y-d);
5198 be.stroke();
5199 be.strokeStyle = nt;
5200 }
5201 if(_.isPlayer&&_!=R&&(_.team!=R.team||!_.team)){//enemy tracers
5202 be.lineCap = "round";
5203 be.strokeStyle = "#000000";
5204 be.lineWidth = 3;
5205 be.beginPath();
5206 be.moveTo(R.x-f, R.y-d);
5207 be.lineTo(_.x-f, _.y-d);
5208 be.stroke();
5209 be.strokeStyle = nt;
5210 }
5211 if(!_.isPlayer){//animal tracers
5212 be.lineCap = "round";
5213 be.strokeStyle = "#0000ff";
5214 be.lineWidth = 3;
5215 be.beginPath();
5216 be.moveTo(R.x-f, R.y-d);
5217 be.lineTo(_.x-f, _.y-d);
5218 be.stroke();
5219 be.strokeStyle = nt;
5220
5221 }
5222 _.health > 0 && (o.healthBarWidth, be.fillStyle = rt, be.roundRect(_.x -
5223 f - o.healthBarWidth - o.healthBarPad, _.y - d + _.scale + o.nameY,
5224 2 * o.healthBarWidth + 2 * o.healthBarPad, 17, 8), be.fill(), be.fillStyle =
5225 _ == R || _.team && _.team == R.team ? "#8ecc51" : "#cc5151", be.roundRect(
5226 _.x - f - o.healthBarWidth, _.y - d + _.scale + o.nameY + o.healthBarPad,
5227 2 * o.healthBarWidth * (_.health / _.maxHealth), 17 - 2 * o.healthBarPad,
5228 7), be.fill())
5229 }
5230 for (m.update(P, be, f, d), a = 0; a < W.length; ++a)
5231 if ((_ = W[a]).visible && _.chatCountdown > 0) {
5232 _.chatCountdown -= P, _.chatCountdown <= 0 && (_.chatCountdown = 0),
5233 be.font = "32px Hammersmith One";
5234 var x = be.measureText(_.chatMessage);
5235 be.textBaseline = "middle", be.textAlign = "center", k = _.x - f, y =
5236 _.y - _.scale - d - 90;
5237 var S = x.width + 17;
5238 be.fillStyle = "rgba(0,0,0,0.2)", be.roundRect(k - S / 2, y - 23.5, S,
5239 47, 6), be.fill(), be.fillStyle = "#fff", be.fillText(_.chatMessage,
5240 k, y)
5241 }! function(e) {
5242 if (R && R.alive) {
5243 Ke.clearRect(0, 0, Ne.width, Ne.height), Ke.strokeStyle = "#fff", Ke.lineWidth =
5244 4;
5245 for (var t = 0; t < qt.length; ++t)(Vt = qt[t]).update(Ke, e);
5246 if (Ke.globalAlpha = 1, Ke.fillStyle = "#fff", si(R.x / o.mapScale *
5247 Ne.width, R.y / o.mapScale * Ne.height, 7, Ke, !0), Ke.fillStyle =
5248 "rgba(255,255,255,0.35)", R.team && Et)
5249 for (t = 0; t < Et.length;) si(Et[t] / o.mapScale * Ne.width, Et[t +
5250 1] / o.mapScale * Ne.height, 7, Ke, !0), t += 2;
5251 It && (Ke.fillStyle = "#0a0a0a", Ke.font = "34px Hammersmith One", Ke.textBaseline =
5252 "middle", Ke.textAlign = "center", Ke.fillText("x", It.x / o.mapScale *
5253 Ne.width, It.y / o.mapScale * Ne.height)), Mt && (Ke.fillStyle =
5254 "#fff", Ke.font = "34px Hammersmith One", Ke.textBaseline = "middle",
5255 Ke.textAlign = "center", Ke.fillText("x", Mt.x / o.mapScale * Ne.width,
5256 Mt.y / o.mapScale * Ne.height))
5257 }
5258 }(P), -1 !== re.id && Fn(re.startX, re.startY, re.currentX, re.currentY), -
5259 1 !== se.id && Fn(se.startX, se.startY, se.currentX, se.currentY)
5260 }(), requestAnimFrame(e)
5261 }(), window.openLink = Oi, window.aJoinReq = Dt, window.follmoo = function() {
5262 H || (H = !0, I("moofoll", 1))
5263 }, window.kickFromClan = Lt, window.sendJoin = Ft, window.leaveAlliance =
5264 Ht, window.createAlliance = zt, window.storeBuy = Kt, window.storeEquip =
5265 Jt, window.showItemInfo = Tt, window.selectSkinColor = function(e) {
5266 ae = e, en()
5267 }, window.changeStoreIndex = function(e) {
5268 Xt != e && (Xt = e, Gt())
5269 }, window.config = o
5270}, function(e, t) {
5271 ! function(e, t, n) {
5272 function i(e, t) {
5273 return typeof e === t
5274 }
5275 var r = [],
5276 s = [],
5277 a = {
5278 _version: "3.5.0",
5279 _config: {
5280 classPrefix: "",
5281 enableClasses: !0,
5282 enableJSClass: !0,
5283 usePrefixes: !0
5284 },
5285 _q: [],
5286 on: function(e, t) {
5287 var n = this;
5288 setTimeout((function() {
5289 t(n[e])
5290 }), 0)
5291 },
5292 addTest: function(e, t, n) {
5293 s.push({
5294 name: e,
5295 fn: t,
5296 options: n
5297 })
5298 },
5299 addAsyncTest: function(e) {
5300 s.push({
5301 name: null,
5302 fn: e
5303 })
5304 }
5305 },
5306 o = function() {};
5307 o.prototype = a, o = new o;
5308 var c = t.documentElement,
5309 l = "svg" === c.nodeName.toLowerCase();
5310 o.addTest("passiveeventlisteners", (function() {
5311 var t = !1;
5312 try {
5313 var n = Object.defineProperty({}, "passive", {
5314 get: function() {
5315 t = !0
5316 }
5317 });
5318 e.addEventListener("test", null, n)
5319 } catch (e) {}
5320 return t
5321 })),
5322 function() {
5323 var e, t, n, a, c, l;
5324 for (var h in s)
5325 if (s.hasOwnProperty(h)) {
5326 if (e = [], (t = s[h]).name && (e.push(t.name.toLowerCase()), t.options &&
5327 t.options.aliases && t.options.aliases.length))
5328 for (n = 0; n < t.options.aliases.length; n++) e.push(t.options.aliases[
5329 n].toLowerCase());
5330 for (a = i(t.fn, "function") ? t.fn() : t.fn, c = 0; c < e.length; c++)
5331 1 === (l = e[c].split(".")).length ? o[l[0]] = a : (!o[l[0]] || o[l[0]] instanceof Boolean ||
5332 (o[l[0]] = new Boolean(o[l[0]])), o[l[0]][l[1]] = a), r.push((a ? "" :
5333 "no-") + l.join("-"))
5334 }
5335 }(),
5336 function(e) {
5337 var t = c.className,
5338 n = o._config.classPrefix || "";
5339 if (l && (t = t.baseVal), o._config.enableJSClass) {
5340 var i = new RegExp("(^|\\s)" + n + "no-js(\\s|$)");
5341 t = t.replace(i, "$1" + n + "js$2")
5342 }
5343 o._config.enableClasses && (t += " " + n + e.join(" " + n), l ? c.className
5344 .baseVal = t : c.className = t)
5345 }(r), delete a.addTest, delete a.addAsyncTest;
5346 for (var h = 0; h < o._q.length; h++) o._q[h]();
5347 e.Modernizr = o
5348 }(window, document)
5349}, function(e, t, n) {
5350 var i = n(24);
5351 n(19), e.exports = {
5352 socket: null,
5353 connected: !1,
5354 socketId: -1,
5355 connect: function(e, t, n) {
5356 if (!this.socket) {
5357 var r = this;
5358 try {
5359 var s = !1,
5360 a = e;
5361 this.socket = new WebSocket(a), this.socket.binaryType = "arraybuffer",
5362 this.socket.onmessage = function(e) {
5363 var t = new Uint8Array(e.data),
5364 s = i.decode(t),
5365 a = s[0];
5366 t = s[1], "io-init" == a ? r.socketId = t[0] : n[a].apply(void 0, t)
5367 }, this.socket.onopen = function() {
5368 r.connected = !0, t()
5369 }, this.socket.onclose = function(e) {
5370 r.connected = !1, 4001 == e.code ? t("Invalid Connection") : s || t(
5371 "disconnected")
5372 }, this.socket.onerror = function(e) {
5373 this.socket && this.socket.readyState != WebSocket.OPEN && (s = !0,
5374 console.error("Socket error", arguments), t("Socket error"))
5375 }
5376 } catch (e) {
5377 console.warn("Socket connection error:", e), t(e)
5378 }
5379 }
5380 },
5381 send: function(e) {
5382 var t = Array.prototype.slice.call(arguments, 1),
5383 n = i.encode([e, t]);
5384 this.socket.send(n)
5385 },
5386 socketReady: function() {
5387 return this.socket && this.connected
5388 },
5389 close: function() {
5390 this.socket && this.socket.close()
5391 }
5392 }
5393}, function(e, t, n) {
5394 t.encode = n(9).encode, t.decode = n(15).decode, t.Encoder = n(37).Encoder,
5395 t.Decoder = n(38).Decoder, t.createCodec = n(39).createCodec, t.codec = n(
5396 40).codec
5397}, function(e, t, n) {
5398 (function(t) {
5399 function n(e) {
5400 return e && e.isBuffer && e
5401 }
5402 e.exports = n(void 0 !== t && t) || n(this.Buffer) || n("undefined" !=
5403 typeof window && window.Buffer) || this.Buffer
5404 }).call(this, n(11).Buffer)
5405}, function(e, t, n) {
5406 "use strict";
5407 t.byteLength = function(e) {
5408 var t = l(e),
5409 n = t[0],
5410 i = t[1];
5411 return 3 * (n + i) / 4 - i
5412 }, t.toByteArray = function(e) {
5413 var t, n, i = l(e),
5414 a = i[0],
5415 o = i[1],
5416 c = new s(function(e, t, n) {
5417 return 3 * (t + n) / 4 - n
5418 }(0, a, o)),
5419 h = 0,
5420 u = o > 0 ? a - 4 : a;
5421 for (n = 0; n < u; n += 4) t = r[e.charCodeAt(n)] << 18 | r[e.charCodeAt(n +
5422 1)] << 12 | r[e.charCodeAt(n + 2)] << 6 | r[e.charCodeAt(n + 3)], c[h++] =
5423 t >> 16 & 255, c[h++] = t >> 8 & 255, c[h++] = 255 & t;
5424 return 2 === o && (t = r[e.charCodeAt(n)] << 2 | r[e.charCodeAt(n + 1)] >>
5425 4, c[h++] = 255 & t), 1 === o && (t = r[e.charCodeAt(n)] << 10 | r[e.charCodeAt(
5426 n + 1)] << 4 | r[e.charCodeAt(n + 2)] >> 2, c[h++] = t >> 8 & 255, c[h++] =
5427 255 & t), c
5428 }, t.fromByteArray = function(e) {
5429 for (var t, n = e.length, r = n % 3, s = [], a = 0, o = n - r; a < o; a +=
5430 16383) s.push(u(e, a, a + 16383 > o ? o : a + 16383));
5431 return 1 === r ? (t = e[n - 1], s.push(i[t >> 2] + i[t << 4 & 63] + "==")) :
5432 2 === r && (t = (e[n - 2] << 8) + e[n - 1], s.push(i[t >> 10] + i[t >> 4 &
5433 63] + i[t << 2 & 63] + "=")), s.join("")
5434 };
5435 for (var i = [], r = [], s = "undefined" != typeof Uint8Array ? Uint8Array :
5436 Array, a =
5437 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", o = 0,
5438 c = a.length; o < c; ++o) i[o] = a[o], r[a.charCodeAt(o)] = o;
5439
5440 function l(e) {
5441 var t = e.length;
5442 if (t % 4 > 0) throw new Error(
5443 "Invalid string. Length must be a multiple of 4");
5444 var n = e.indexOf("=");
5445 return -1 === n && (n = t), [n, n === t ? 0 : 4 - n % 4]
5446 }
5447
5448 function h(e) {
5449 return i[e >> 18 & 63] + i[e >> 12 & 63] + i[e >> 6 & 63] + i[63 & e]
5450 }
5451
5452 function u(e, t, n) {
5453 for (var i, r = [], s = t; s < n; s += 3) i = (e[s] << 16 & 16711680) + (e[
5454 s + 1] << 8 & 65280) + (255 & e[s + 2]), r.push(h(i));
5455 return r.join("")
5456 }
5457 r["-".charCodeAt(0)] = 62, r["_".charCodeAt(0)] = 63
5458}, function(e, t) {
5459 var n = {}.toString;
5460 e.exports = Array.isArray || function(e) {
5461 return "[object Array]" == n.call(e)
5462 }
5463}, function(e, t, n) {
5464 var i = n(0);
5465
5466 function r(e) {
5467 return new Array(e)
5468 }(t = e.exports = r(0)).alloc = r, t.concat = i.concat, t.from = function(e) {
5469 if (!i.isBuffer(e) && i.isView(e)) e = i.Uint8Array.from(e);
5470 else if (i.isArrayBuffer(e)) e = new Uint8Array(e);
5471 else {
5472 if ("string" == typeof e) return i.from.call(t, e);
5473 if ("number" == typeof e) throw new TypeError(
5474 '"value" argument must not be a number')
5475 }
5476 return Array.prototype.slice.call(e)
5477 }
5478}, function(e, t, n) {
5479 var i = n(0),
5480 r = i.global;
5481
5482 function s(e) {
5483 return new r(e)
5484 }(t = e.exports = i.hasBuffer ? s(0) : []).alloc = i.hasBuffer && r.alloc ||
5485 s, t.concat = i.concat, t.from = function(e) {
5486 if (!i.isBuffer(e) && i.isView(e)) e = i.Uint8Array.from(e);
5487 else if (i.isArrayBuffer(e)) e = new Uint8Array(e);
5488 else {
5489 if ("string" == typeof e) return i.from.call(t, e);
5490 if ("number" == typeof e) throw new TypeError(
5491 '"value" argument must not be a number')
5492 }
5493 return r.from && 1 !== r.from.length ? r.from(e) : new r(e)
5494 }
5495}, function(e, t, n) {
5496 var i = n(0);
5497
5498 function r(e) {
5499 return new Uint8Array(e)
5500 }(t = e.exports = i.hasArrayBuffer ? r(0) : []).alloc = r, t.concat = i.concat,
5501 t.from = function(e) {
5502 if (i.isView(e)) {
5503 var n = e.byteOffset,
5504 r = e.byteLength;
5505 (e = e.buffer).byteLength !== r && (e.slice ? e = e.slice(n, n + r) : (e =
5506 new Uint8Array(e)).byteLength !== r && (e = Array.prototype.slice.call(
5507 e, n, n + r)))
5508 } else {
5509 if ("string" == typeof e) return i.from.call(t, e);
5510 if ("number" == typeof e) throw new TypeError(
5511 '"value" argument must not be a number')
5512 }
5513 return new Uint8Array(e)
5514 }
5515}, function(e, t) {
5516 t.copy = function(e, t, n, i) {
5517 var r;
5518 n || (n = 0), i || 0 === i || (i = this.length), t || (t = 0);
5519 var s = i - n;
5520 if (e === this && n < t && t < i)
5521 for (r = s - 1; r >= 0; r--) e[r + t] = this[r + n];
5522 else
5523 for (r = 0; r < s; r++) e[r + t] = this[r + n];
5524 return s
5525 }, t.toString = function(e, t, n) {
5526 var i = 0 | t;
5527 n || (n = this.length);
5528 for (var r = "", s = 0; i < n;)(s = this[i++]) < 128 ? r += String.fromCharCode(
5529 s) : (192 == (224 & s) ? s = (31 & s) << 6 | 63 & this[i++] : 224 == (
5530 240 & s) ? s = (15 & s) << 12 | (63 & this[i++]) << 6 | 63 & this[i++] :
5531 240 == (248 & s) && (s = (7 & s) << 18 | (63 & this[i++]) << 12 | (63 &
5532 this[i++]) << 6 | 63 & this[i++]), s >= 65536 ? (s -= 65536, r +=
5533 String.fromCharCode(55296 + (s >>> 10), 56320 + (1023 & s))) : r +=
5534 String.fromCharCode(s));
5535 return r
5536 }, t.write = function(e, t) {
5537 for (var n = t || (t |= 0), i = e.length, r = 0, s = 0; s < i;)(r = e.charCodeAt(
5538 s++)) < 128 ? this[n++] = r : r < 2048 ? (this[n++] = 192 | r >>> 6,
5539 this[n++] = 128 | 63 & r) : r < 55296 || r > 57343 ? (this[n++] = 224 |
5540 r >>> 12, this[n++] = 128 | r >>> 6 & 63, this[n++] = 128 | 63 & r) : (r =
5541 65536 + (r - 55296 << 10 | e.charCodeAt(s++) - 56320), this[n++] = 240 |
5542 r >>> 18, this[n++] = 128 | r >>> 12 & 63, this[n++] = 128 | r >>> 6 &
5543 63, this[n++] = 128 | 63 & r);
5544 return n - t
5545 }
5546}, function(e, t, n) {
5547 t.setExtPackers = function(e) {
5548 e.addExtPacker(14, Error, [u, c]), e.addExtPacker(1, EvalError, [u, c]), e
5549 .addExtPacker(2, RangeError, [u, c]), e.addExtPacker(3, ReferenceError, [
5550 u, c
5551 ]), e.addExtPacker(4, SyntaxError, [u, c]), e.addExtPacker(5, TypeError, [
5552 u, c
5553 ]), e.addExtPacker(6, URIError, [u, c]), e.addExtPacker(10, RegExp, [h, c]),
5554 e.addExtPacker(11, Boolean, [l, c]), e.addExtPacker(12, String, [l, c]),
5555 e.addExtPacker(13, Date, [Number, c]), e.addExtPacker(15, Number, [l, c]),
5556 "undefined" != typeof Uint8Array && (e.addExtPacker(17, Int8Array, a), e.addExtPacker(
5557 18, Uint8Array, a), e.addExtPacker(19, Int16Array, a), e.addExtPacker(
5558 20, Uint16Array, a), e.addExtPacker(21, Int32Array, a), e.addExtPacker(
5559 22, Uint32Array, a), e.addExtPacker(23, Float32Array, a), "undefined" !=
5560 typeof Float64Array && e.addExtPacker(24, Float64Array, a), "undefined" !=
5561 typeof Uint8ClampedArray && e.addExtPacker(25, Uint8ClampedArray, a), e.addExtPacker(
5562 26, ArrayBuffer, a), e.addExtPacker(29, DataView, a)), r.hasBuffer && e
5563 .addExtPacker(27, s, r.from)
5564 };
5565 var i, r = n(0),
5566 s = r.global,
5567 a = r.Uint8Array.from,
5568 o = {
5569 name: 1,
5570 message: 1,
5571 stack: 1,
5572 columnNumber: 1,
5573 fileName: 1,
5574 lineNumber: 1
5575 };
5576
5577 function c(e) {
5578 return i || (i = n(9).encode), i(e)
5579 }
5580
5581 function l(e) {
5582 return e.valueOf()
5583 }
5584
5585 function h(e) {
5586 (e = RegExp.prototype.toString.call(e).split("/")).shift();
5587 var t = [e.pop()];
5588 return t.unshift(e.join("/")), t
5589 }
5590
5591 function u(e) {
5592 var t = {};
5593 for (var n in o) t[n] = e[n];
5594 return t
5595 }
5596}, function(e, t, n) {
5597 var i = n(5),
5598 r = n(7),
5599 s = r.Uint64BE,
5600 a = r.Int64BE,
5601 o = n(0),
5602 c = n(6),
5603 l = n(34),
5604 h = n(13).uint8,
5605 u = n(3).ExtBuffer,
5606 f = "undefined" != typeof Uint8Array,
5607 d = "undefined" != typeof Map,
5608 p = [];
5609 p[1] = 212, p[2] = 213, p[4] = 214, p[8] = 215, p[16] = 216, t.getWriteType =
5610 function(e) {
5611 var t = l.getWriteToken(e),
5612 n = e && e.useraw,
5613 r = f && e && e.binarraybuffer,
5614 g = r ? o.isArrayBuffer : o.isBuffer,
5615 m = r ? function(e, t) {
5616 w(e, new Uint8Array(t))
5617 } : w,
5618 y = d && e && e.usemap ? function(e, n) {
5619 if (!(n instanceof Map)) return b(e, n);
5620 var i = n.size;
5621 t[i < 16 ? 128 + i : i <= 65535 ? 222 : 223](e, i);
5622 var r = e.codec.encode;
5623 n.forEach((function(t, n, i) {
5624 r(e, n), r(e, t)
5625 }))
5626 } : b;
5627 return {
5628 boolean: function(e, n) {
5629 t[n ? 195 : 194](e, n)
5630 },
5631 function: v,
5632 number: function(e, n) {
5633 var i = 0 | n;
5634 n === i ? t[-32 <= i && i <= 127 ? 255 & i : 0 <= i ? i <= 255 ? 204 :
5635 i <= 65535 ? 205 : 206 : -128 <= i ? 208 : -32768 <= i ? 209 : 210](e,
5636 i) : t[203](e, n)
5637 },
5638 object: n ? function(e, n) {
5639 if (g(n)) return function(e, n) {
5640 var i = n.length;
5641 t[i < 32 ? 160 + i : i <= 65535 ? 218 : 219](e, i), e.send(n)
5642 }(e, n);
5643 k(e, n)
5644 } : k,
5645 string: function(e) {
5646 return function(n, i) {
5647 var r = i.length,
5648 s = 5 + 3 * r;
5649 n.offset = n.reserve(s);
5650 var a = n.buffer,
5651 o = e(r),
5652 l = n.offset + o;
5653 r = c.write.call(a, i, l);
5654 var h = e(r);
5655 if (o !== h) {
5656 var u = l + h - o,
5657 f = l + r;
5658 c.copy.call(a, a, u, l, f)
5659 }
5660 t[1 === h ? 160 + r : h <= 3 ? 215 + h : 219](n, r), n.offset += r
5661 }
5662 }(n ? function(e) {
5663 return e < 32 ? 1 : e <= 65535 ? 3 : 5
5664 } : function(e) {
5665 return e < 32 ? 1 : e <= 255 ? 2 : e <= 65535 ? 3 : 5
5666 }),
5667 symbol: v,
5668 undefined: v
5669 };
5670
5671 function k(e, n) {
5672 if (null === n) return v(e, n);
5673 if (g(n)) return m(e, n);
5674 if (i(n)) return function(e, n) {
5675 var i = n.length;
5676 t[i < 16 ? 144 + i : i <= 65535 ? 220 : 221](e, i);
5677 for (var r = e.codec.encode, s = 0; s < i; s++) r(e, n[s])
5678 }(e, n);
5679 if (s.isUint64BE(n)) return function(e, n) {
5680 t[207](e, n.toArray())
5681 }(e, n);
5682 if (a.isInt64BE(n)) return function(e, n) {
5683 t[211](e, n.toArray())
5684 }(e, n);
5685 var r = e.codec.getExtPacker(n);
5686 if (r && (n = r(n)), n instanceof u) return function(e, n) {
5687 var i = n.buffer,
5688 r = i.length,
5689 s = p[r] || (r < 255 ? 199 : r <= 65535 ? 200 : 201);
5690 t[s](e, r), h[n.type](e), e.send(i)
5691 }(e, n);
5692 y(e, n)
5693 }
5694
5695 function v(e, n) {
5696 t[192](e, n)
5697 }
5698
5699 function w(e, n) {
5700 var i = n.length;
5701 t[i < 255 ? 196 : i <= 65535 ? 197 : 198](e, i), e.send(n)
5702 }
5703
5704 function b(e, n) {
5705 var i = Object.keys(n),
5706 r = i.length;
5707 t[r < 16 ? 128 + r : r <= 65535 ? 222 : 223](e, r);
5708 var s = e.codec.encode;
5709 i.forEach((function(t) {
5710 s(e, t), s(e, n[t])
5711 }))
5712 }
5713 }
5714}, function(e, t, n) {
5715 var i = n(4),
5716 r = n(7),
5717 s = r.Uint64BE,
5718 a = r.Int64BE,
5719 o = n(13).uint8,
5720 c = n(0),
5721 l = c.global,
5722 h = c.hasBuffer && "TYPED_ARRAY_SUPPORT" in l && !l.TYPED_ARRAY_SUPPORT,
5723 u = c.hasBuffer && l.prototype || {};
5724
5725 function f() {
5726 var e = o.slice();
5727 return e[196] = d(196), e[197] = p(197), e[198] = g(198), e[199] = d(199),
5728 e[200] = p(200), e[201] = g(201), e[202] = m(202, 4, u.writeFloatBE || v, !
5729 0), e[203] = m(203, 8, u.writeDoubleBE || w, !0), e[204] = d(204), e[205] =
5730 p(205), e[206] = g(206), e[207] = m(207, 8, y), e[208] = d(208), e[209] =
5731 p(209), e[210] = g(210), e[211] = m(211, 8, k), e[217] = d(217), e[218] =
5732 p(218), e[219] = g(219), e[220] = p(220), e[221] = g(221), e[222] = p(222),
5733 e[223] = g(223), e
5734 }
5735
5736 function d(e) {
5737 return function(t, n) {
5738 var i = t.reserve(2),
5739 r = t.buffer;
5740 r[i++] = e, r[i] = n
5741 }
5742 }
5743
5744 function p(e) {
5745 return function(t, n) {
5746 var i = t.reserve(3),
5747 r = t.buffer;
5748 r[i++] = e, r[i++] = n >>> 8, r[i] = n
5749 }
5750 }
5751
5752 function g(e) {
5753 return function(t, n) {
5754 var i = t.reserve(5),
5755 r = t.buffer;
5756 r[i++] = e, r[i++] = n >>> 24, r[i++] = n >>> 16, r[i++] = n >>> 8, r[i] =
5757 n
5758 }
5759 }
5760
5761 function m(e, t, n, i) {
5762 return function(r, s) {
5763 var a = r.reserve(t + 1);
5764 r.buffer[a++] = e, n.call(r.buffer, s, a, i)
5765 }
5766 }
5767
5768 function y(e, t) {
5769 new s(this, t, e)
5770 }
5771
5772 function k(e, t) {
5773 new a(this, t, e)
5774 }
5775
5776 function v(e, t) {
5777 i.write(this, e, t, !1, 23, 4)
5778 }
5779
5780 function w(e, t) {
5781 i.write(this, e, t, !1, 52, 8)
5782 }
5783 t.getWriteToken = function(e) {
5784 return e && e.uint8array ? function() {
5785 var e = f();
5786 return e[202] = m(202, 4, v), e[203] = m(203, 8, w), e
5787 }() : h || c.hasBuffer && e && e.safe ? function() {
5788 var e = o.slice();
5789 return e[196] = m(196, 1, l.prototype.writeUInt8), e[197] = m(197, 2, l.prototype
5790 .writeUInt16BE), e[198] = m(198, 4, l.prototype.writeUInt32BE), e[199] =
5791 m(199, 1, l.prototype.writeUInt8), e[200] = m(200, 2, l.prototype.writeUInt16BE),
5792 e[201] = m(201, 4, l.prototype.writeUInt32BE), e[202] = m(202, 4, l.prototype
5793 .writeFloatBE), e[203] = m(203, 8, l.prototype.writeDoubleBE), e[204] =
5794 m(204, 1, l.prototype.writeUInt8), e[205] = m(205, 2, l.prototype.writeUInt16BE),
5795 e[206] = m(206, 4, l.prototype.writeUInt32BE), e[207] = m(207, 8, y), e[
5796 208] = m(208, 1, l.prototype.writeInt8), e[209] = m(209, 2, l.prototype
5797 .writeInt16BE), e[210] = m(210, 4, l.prototype.writeInt32BE), e[211] =
5798 m(211, 8, k), e[217] = m(217, 1, l.prototype.writeUInt8), e[218] = m(
5799 218, 2, l.prototype.writeUInt16BE), e[219] = m(219, 4, l.prototype.writeUInt32BE),
5800 e[220] = m(220, 2, l.prototype.writeUInt16BE), e[221] = m(221, 4, l.prototype
5801 .writeUInt32BE), e[222] = m(222, 2, l.prototype.writeUInt16BE), e[223] =
5802 m(223, 4, l.prototype.writeUInt32BE), e
5803 }() : f()
5804 }
5805}, function(e, t, n) {
5806 t.setExtUnpackers = function(e) {
5807 e.addExtUnpacker(14, [o, l(Error)]), e.addExtUnpacker(1, [o, l(EvalError)]),
5808 e.addExtUnpacker(2, [o, l(RangeError)]), e.addExtUnpacker(3, [o, l(
5809 ReferenceError)]), e.addExtUnpacker(4, [o, l(SyntaxError)]), e.addExtUnpacker(
5810 5, [o, l(TypeError)]), e.addExtUnpacker(6, [o, l(URIError)]), e.addExtUnpacker(
5811 10, [o, c]), e.addExtUnpacker(11, [o, h(Boolean)]), e.addExtUnpacker(12, [
5812 o, h(String)
5813 ]), e.addExtUnpacker(13, [o, h(Date)]), e.addExtUnpacker(15, [o, h(Number)]),
5814 "undefined" != typeof Uint8Array && (e.addExtUnpacker(17, h(Int8Array)),
5815 e.addExtUnpacker(18, h(Uint8Array)), e.addExtUnpacker(19, [u, h(
5816 Int16Array)]), e.addExtUnpacker(20, [u, h(Uint16Array)]), e.addExtUnpacker(
5817 21, [u, h(Int32Array)]), e.addExtUnpacker(22, [u, h(Uint32Array)]), e.addExtUnpacker(
5818 23, [u, h(Float32Array)]), "undefined" != typeof Float64Array && e.addExtUnpacker(
5819 24, [u, h(Float64Array)]), "undefined" != typeof Uint8ClampedArray && e
5820 .addExtUnpacker(25, h(Uint8ClampedArray)), e.addExtUnpacker(26, u), e.addExtUnpacker(
5821 29, [u, h(DataView)])), r.hasBuffer && e.addExtUnpacker(27, h(s))
5822 };
5823 var i, r = n(0),
5824 s = r.global,
5825 a = {
5826 name: 1,
5827 message: 1,
5828 stack: 1,
5829 columnNumber: 1,
5830 fileName: 1,
5831 lineNumber: 1
5832 };
5833
5834 function o(e) {
5835 return i || (i = n(15).decode), i(e)
5836 }
5837
5838 function c(e) {
5839 return RegExp.apply(null, e)
5840 }
5841
5842 function l(e) {
5843 return function(t) {
5844 var n = new e;
5845 for (var i in a) n[i] = t[i];
5846 return n
5847 }
5848 }
5849
5850 function h(e) {
5851 return function(t) {
5852 return new e(t)
5853 }
5854 }
5855
5856 function u(e) {
5857 return new Uint8Array(e).buffer
5858 }
5859}, function(e, t, n) {
5860 var i = n(17);
5861
5862 function r(e) {
5863 var t, n = new Array(256);
5864 for (t = 0; t <= 127; t++) n[t] = s(t);
5865 for (t = 128; t <= 143; t++) n[t] = o(t - 128, e.map);
5866 for (t = 144; t <= 159; t++) n[t] = o(t - 144, e.array);
5867 for (t = 160; t <= 191; t++) n[t] = o(t - 160, e.str);
5868 for (n[192] = s(null), n[193] = null, n[194] = s(!1), n[195] = s(!0), n[196] =
5869 a(e.uint8, e.bin), n[197] = a(e.uint16, e.bin), n[198] = a(e.uint32, e.bin),
5870 n[199] = a(e.uint8, e.ext), n[200] = a(e.uint16, e.ext), n[201] = a(e.uint32,
5871 e.ext), n[202] = e.float32, n[203] = e.float64, n[204] = e.uint8, n[205] =
5872 e.uint16, n[206] = e.uint32, n[207] = e.uint64, n[208] = e.int8, n[209] =
5873 e.int16, n[210] = e.int32, n[211] = e.int64, n[212] = o(1, e.ext), n[213] =
5874 o(2, e.ext), n[214] = o(4, e.ext), n[215] = o(8, e.ext), n[216] = o(16, e.ext),
5875 n[217] = a(e.uint8, e.str), n[218] = a(e.uint16, e.str), n[219] = a(e.uint32,
5876 e.str), n[220] = a(e.uint16, e.array), n[221] = a(e.uint32, e.array), n[
5877 222] = a(e.uint16, e.map), n[223] = a(e.uint32, e.map), t = 224; t <= 255; t++
5878 ) n[t] = s(t - 256);
5879 return n
5880 }
5881
5882 function s(e) {
5883 return function() {
5884 return e
5885 }
5886 }
5887
5888 function a(e, t) {
5889 return function(n) {
5890 var i = e(n);
5891 return t(n, i)
5892 }
5893 }
5894
5895 function o(e, t) {
5896 return function(n) {
5897 return t(n, e)
5898 }
5899 }
5900 t.getReadToken = function(e) {
5901 var t = i.getReadFormat(e);
5902 return e && e.useraw ? function(e) {
5903 var t, n = r(e).slice();
5904 for (n[217] = n[196], n[218] = n[197], n[219] = n[198], t = 160; t <=
5905 191; t++) n[t] = o(t - 160, e.bin);
5906 return n
5907 }(t) : r(t)
5908 }
5909}, function(e, t, n) {
5910 t.Encoder = s;
5911 var i = n(18),
5912 r = n(10).EncodeBuffer;
5913
5914 function s(e) {
5915 if (!(this instanceof s)) return new s(e);
5916 r.call(this, e)
5917 }
5918 s.prototype = new r, i.mixin(s.prototype), s.prototype.encode = function(e) {
5919 this.write(e), this.emit("data", this.read())
5920 }, s.prototype.end = function(e) {
5921 arguments.length && this.encode(e), this.flush(), this.emit("end")
5922 }
5923}, function(e, t, n) {
5924 t.Decoder = s;
5925 var i = n(18),
5926 r = n(16).DecodeBuffer;
5927
5928 function s(e) {
5929 if (!(this instanceof s)) return new s(e);
5930 r.call(this, e)
5931 }
5932 s.prototype = new r, i.mixin(s.prototype), s.prototype.decode = function(e) {
5933 arguments.length && this.write(e), this.flush()
5934 }, s.prototype.push = function(e) {
5935 this.emit("data", e)
5936 }, s.prototype.end = function(e) {
5937 this.decode(e), this.emit("end")
5938 }
5939}, function(e, t, n) {
5940 n(8), n(2), t.createCodec = n(1).createCodec
5941}, function(e, t, n) {
5942 n(8), n(2), t.codec = {
5943 preset: n(1).preset
5944 }
5945}, function(e, t) {
5946 var n, i, r = e.exports = {};
5947
5948 function s() {
5949 throw new Error("setTimeout has not been defined")
5950 }
5951
5952 function a() {
5953 throw new Error("clearTimeout has not been defined")
5954 }
5955
5956 function o(e) {
5957 if (n === setTimeout) return setTimeout(e, 0);
5958 if ((n === s || !n) && setTimeout) return n = setTimeout, setTimeout(e, 0);
5959 try {
5960 return n(e, 0)
5961 } catch (t) {
5962 try {
5963 return n.call(null, e, 0)
5964 } catch (t) {
5965 return n.call(this, e, 0)
5966 }
5967 }
5968 }! function() {
5969 try {
5970 n = "function" == typeof setTimeout ? setTimeout : s
5971 } catch (e) {
5972 n = s
5973 }
5974 try {
5975 i = "function" == typeof clearTimeout ? clearTimeout : a
5976 } catch (e) {
5977 i = a
5978 }
5979 }();
5980 var c, l = [],
5981 h = !1,
5982 u = -1;
5983
5984 function f() {
5985 h && c && (h = !1, c.length ? l = c.concat(l) : u = -1, l.length && d())
5986 }
5987
5988 function d() {
5989 if (!h) {
5990 var e = o(f);
5991 h = !0;
5992 for (var t = l.length; t;) {
5993 for (c = l, l = []; ++u < t;) c && c[u].run();
5994 u = -1, t = l.length
5995 }
5996 c = null, h = !1,
5997 function(e) {
5998 if (i === clearTimeout) return clearTimeout(e);
5999 if ((i === a || !i) && clearTimeout) return i = clearTimeout,
6000 clearTimeout(e);
6001 try {
6002 i(e)
6003 } catch (t) {
6004 try {
6005 return i.call(null, e)
6006 } catch (t) {
6007 return i.call(this, e)
6008 }
6009 }
6010 }(e)
6011 }
6012 }
6013
6014 function p(e, t) {
6015 this.fun = e, this.array = t
6016 }
6017
6018 function g() {}
6019 r.nextTick = function(e) {
6020 var t = new Array(arguments.length - 1);
6021 if (arguments.length > 1)
6022 for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
6023 l.push(new p(e, t)), 1 !== l.length || h || o(d)
6024 }, p.prototype.run = function() {
6025 this.fun.apply(null, this.array)
6026 }, r.title = "browser", r.browser = !0, r.env = {}, r.argv = [], r.version =
6027 "", r.versions = {}, r.on = g, r.addListener = g, r.once = g, r.off = g, r.removeListener =
6028 g, r.removeAllListeners = g, r.emit = g, r.prependListener = g, r.prependOnceListener =
6029 g, r.listeners = function(e) {
6030 return []
6031 }, r.binding = function(e) {
6032 throw new Error("process.binding is not supported")
6033 }, r.cwd = function() {
6034 return "/"
6035 }, r.chdir = function(e) {
6036 throw new Error("process.chdir is not supported")
6037 }, r.umask = function() {
6038 return 0
6039 }
6040}, function(e, t) {
6041 var n = Math.abs,
6042 i = (Math.cos, Math.sin, Math.pow, Math.sqrt),
6043 r = (n = Math.abs, Math.atan2),
6044 s = Math.PI;
6045 e.exports.randInt = function(e, t) {
6046 return Math.floor(Math.random() * (t - e + 1)) + e
6047 }, e.exports.randFloat = function(e, t) {
6048 return Math.random() * (t - e + 1) + e
6049 }, e.exports.lerp = function(e, t, n) {
6050 return e + (t - e) * n
6051 }, e.exports.decel = function(e, t) {
6052 return e > 0 ? e = Math.max(0, e - t) : e < 0 && (e = Math.min(0, e + t)),
6053 e
6054 }, e.exports.getDistance = function(e, t, n, r) {
6055 return i((n -= e) * n + (r -= t) * r)
6056 }, e.exports.getDirection = function(e, t, n, i) {
6057 return r(t - i, e - n)
6058 }, e.exports.getAngleDist = function(e, t) {
6059 var i = n(t - e) % (2 * s);
6060 return i > s ? 2 * s - i : i
6061 }, e.exports.isNumber = function(e) {
6062 return "number" == typeof e && !isNaN(e) && isFinite(e)
6063 }, e.exports.isString = function(e) {
6064 return e && "string" == typeof e
6065 }, e.exports.kFormat = function(e) {
6066 return e > 999 ? (e / 1e3).toFixed(1) + "k" : e
6067 }, e.exports.capitalizeFirst = function(e) {
6068 return e.charAt(0).toUpperCase() + e.slice(1)
6069 }, e.exports.fixTo = function(e, t) {
6070 return parseFloat(e.toFixed(t))
6071 }, e.exports.sortByPoints = function(e, t) {
6072 return parseFloat(t.points) - parseFloat(e.points)
6073 }, e.exports.lineInRect = function(e, t, n, i, r, s, a, o) {
6074 var c = r,
6075 l = a;
6076 if (r > a && (c = a, l = r), l > n && (l = n), c < e && (c = e), c > l)
6077 return !1;
6078 var h = s,
6079 u = o,
6080 f = a - r;
6081 if (Math.abs(f) > 1e-7) {
6082 var d = (o - s) / f,
6083 p = s - d * r;
6084 h = d * c + p, u = d * l + p
6085 }
6086 if (h > u) {
6087 var g = u;
6088 u = h, h = g
6089 }
6090 return u > i && (u = i), h < t && (h = t), !(h > u)
6091 }, e.exports.containsPoint = function(e, t, n) {
6092 var i = e.getBoundingClientRect(),
6093 r = i.left + window.scrollX,
6094 s = i.top + window.scrollY,
6095 a = i.width,
6096 o = i.height;
6097 return t > r && t < r + a && n > s && n < s + o
6098 }, e.exports.mousifyTouchEvent = function(e) {
6099 var t = e.changedTouches[0];
6100 e.screenX = t.screenX, e.screenY = t.screenY, e.clientX = t.clientX, e.clientY =
6101 t.clientY, e.pageX = t.pageX, e.pageY = t.pageY
6102 }, e.exports.hookTouchEvents = function(t, n) {
6103 var i = !n,
6104 r = !1;
6105
6106 function s(n) {
6107 e.exports.mousifyTouchEvent(n), window.setUsingTouch(!0), i && (n.preventDefault(),
6108 n.stopPropagation()), r && (t.onclick && t.onclick(n), t.onmouseout &&
6109 t.onmouseout(n), r = !1)
6110 }
6111 t.addEventListener("touchstart", e.exports.checkTrusted((function(n) {
6112 e.exports.mousifyTouchEvent(n), window.setUsingTouch(!0), i && (n.preventDefault(),
6113 n.stopPropagation()), t.onmouseover && t.onmouseover(n), r = !0
6114 })), !1), t.addEventListener("touchmove", e.exports.checkTrusted((
6115 function(n) {
6116 e.exports.mousifyTouchEvent(n), window.setUsingTouch(!0), i && (n.preventDefault(),
6117 n.stopPropagation()), e.exports.containsPoint(t, n.pageX, n.pageY) ?
6118 r || (t.onmouseover && t.onmouseover(n), r = !0) : r && (t.onmouseout &&
6119 t.onmouseout(n), r = !1)
6120 })), !1), t.addEventListener("touchend", e.exports.checkTrusted(s), !1),
6121 t.addEventListener("touchcancel", e.exports.checkTrusted(s), !1), t.addEventListener(
6122 "touchleave", e.exports.checkTrusted(s), !1)
6123 }, e.exports.removeAllChildren = function(e) {
6124 for (; e.hasChildNodes();) e.removeChild(e.lastChild)
6125 }, e.exports.generateElement = function(t) {
6126 var n = document.createElement(t.tag || "div");
6127
6128 function i(e, i) {
6129 t[e] && (n[i] = t[e])
6130 }
6131 for (var r in i("text", "textContent"), i("html", "innerHTML"), i("class",
6132 "className"), t) {
6133 switch (r) {
6134 case "tag":
6135 case "text":
6136 case "html":
6137 case "class":
6138 case "style":
6139 case "hookTouch":
6140 case "parent":
6141 case "children":
6142 continue
6143 }
6144 n[r] = t[r]
6145 }
6146 if (n.onclick && (n.onclick = e.exports.checkTrusted(n.onclick)), n.onmouseover &&
6147 (n.onmouseover = e.exports.checkTrusted(n.onmouseover)), n.onmouseout &&
6148 (n.onmouseout = e.exports.checkTrusted(n.onmouseout)), t.style && (n.style
6149 .cssText = t.style), t.hookTouch && e.exports.hookTouchEvents(n), t.parent &&
6150 t.parent.appendChild(n), t.children)
6151 for (var s = 0; s < t.children.length; s++) n.appendChild(t.children[s]);
6152 return n
6153 }, e.exports.eventIsTrusted = function(e) {
6154 return !e || "boolean" != typeof e.isTrusted || e.isTrusted
6155 }, e.exports.checkTrusted = function(t) {
6156 return function(n) {
6157 n && n instanceof Event && e.exports.eventIsTrusted(n) && t(n)
6158 }
6159 }, e.exports.randomString = function(e) {
6160 for (var t = "", n =
6161 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", i = 0; i <
6162 e; i++) t += n.charAt(Math.floor(Math.random() * n.length));
6163 return t
6164 }, e.exports.countInArray = function(e, t) {
6165 for (var n = 0, i = 0; i < e.length; i++) e[i] === t && n++;
6166 return n
6167 }
6168}, function(e, t) {
6169 e.exports.AnimText = function() {
6170 this.init = function(e, t, n, i, r, s, a) {
6171 this.x = e, this.y = t, this.color = a, this.scale = n, this.startScale =
6172 this.scale, this.maxScale = 1.5 * n, this.scaleSpeed = .7, this.speed =
6173 i, this.life = r, this.text = s
6174 }, this.update = function(e) {
6175 this.life && (this.life -= e, this.y -= this.speed * e, this.scale +=
6176 this.scaleSpeed * e, this.scale >= this.maxScale ? (this.scale = this.maxScale,
6177 this.scaleSpeed *= -1) : this.scale <= this.startScale && (this.scale =
6178 this.startScale, this.scaleSpeed = 0), this.life <= 0 && (this.life =
6179 0))
6180 }, this.render = function(e, t, n) {
6181 e.fillStyle = this.color, e.font = this.scale + "px Hammersmith One", e.fillText(
6182 this.text, this.x - t, this.y - n)
6183 }
6184 }, e.exports.TextManager = function() {
6185 this.texts = [], this.update = function(e, t, n, i) {
6186 t.textBaseline = "middle", t.textAlign = "center";
6187 for (var r = 0; r < this.texts.length; ++r) this.texts[r].life && (this.texts[
6188 r].update(e), this.texts[r].render(t, n, i))
6189 }, this.showText = function(t, n, i, r, s, a, o) {
6190 for (var c, l = 0; l < this.texts.length; ++l)
6191 if (!this.texts[l].life) {
6192 c = this.texts[l];
6193 break
6194 }
6195 c || (c = new e.exports.AnimText, this.texts.push(c)), c.init(t, n, i, r,
6196 s, a, o)
6197 }
6198 }
6199}, function(e, t) {
6200 e.exports = function(e) {
6201 this.sid = e, this.init = function(e, t, n, i, r, s, a) {
6202 s = s || {}, this.sentTo = {}, this.gridLocations = [], this.active = !0,
6203 this.doUpdate = s.doUpdate, this.x = e, this.y = t, this.dir = n, this.xWiggle =
6204 0, this.yWiggle = 0, this.scale = i, this.type = r, this.id = s.id,
6205 this.owner = a, this.name = s.name, this.isItem = null != this.id, this
6206 .group = s.group, this.health = s.health, this.layer = 2, null != this.group ?
6207 this.layer = this.group.layer : 0 == this.type ? this.layer = 3 : 2 ==
6208 this.type ? this.layer = 0 : 4 == this.type && (this.layer = -1), this.colDiv =
6209 s.colDiv || 1, this.blocker = s.blocker, this.ignoreCollision = s.ignoreCollision,
6210 this.dontGather = s.dontGather, this.hideFromEnemy = s.hideFromEnemy,
6211 this.friction = s.friction, this.projDmg = s.projDmg, this.dmg = s.dmg,
6212 this.pDmg = s.pDmg, this.pps = s.pps, this.zIndex = s.zIndex || 0, this
6213 .turnSpeed = s.turnSpeed, this.req = s.req, this.trap = s.trap, this.healCol =
6214 s.healCol, this.teleport = s.teleport, this.boostSpeed = s.boostSpeed,
6215 this.projectile = s.projectile, this.shootRange = s.shootRange, this.shootRate =
6216 s.shootRate, this.shootCount = this.shootRate, this.spawnPoint = s.spawnPoint
6217 }, this.changeHealth = function(e, t) {
6218 return this.health += e, this.health <= 0
6219 }, this.getScale = function(e, t) {
6220 return e = e || 1, this.scale * (this.isItem || 2 == this.type || 3 ==
6221 this.type || 4 == this.type ? 1 : .6 * e) * (t ? 1 : this.colDiv)
6222 }, this.visibleToPlayer = function(e) {
6223 return !this.hideFromEnemy || this.owner && (this.owner == e || this.owner
6224 .team && e.team == this.owner.team)
6225 }, this.update = function(e) {
6226 this.active && (this.xWiggle && (this.xWiggle *= Math.pow(.99, e)), this
6227 .yWiggle && (this.yWiggle *= Math.pow(.99, e)), this.turnSpeed && (
6228 this.dir += this.turnSpeed * e))
6229 }
6230 }
6231}, function(e, t) {
6232 e.exports.groups = [{
6233 id: 0,
6234 name: "food",
6235 layer: 0
6236 }, {
6237 id: 1,
6238 name: "walls",
6239 place: !0,
6240 limit: 30,
6241 layer: 0
6242 }, {
6243 id: 2,
6244 name: "spikes",
6245 place: !0,
6246 limit: 15,
6247 layer: 0
6248 }, {
6249 id: 3,
6250 name: "mill",
6251 place: !0,
6252 limit: 7,
6253 layer: 1
6254 }, {
6255 id: 4,
6256 name: "mine",
6257 place: !0,
6258 limit: 1,
6259 layer: 0
6260 }, {
6261 id: 5,
6262 name: "trap",
6263 place: !0,
6264 limit: 6,
6265 layer: -1
6266 }, {
6267 id: 6,
6268 name: "booster",
6269 place: !0,
6270 limit: 12,
6271 layer: -1
6272 }, {
6273 id: 7,
6274 name: "turret",
6275 place: !0,
6276 limit: 2,
6277 layer: 1
6278 }, {
6279 id: 8,
6280 name: "watchtower",
6281 place: !0,
6282 limit: 12,
6283 layer: 1
6284 }, {
6285 id: 9,
6286 name: "buff",
6287 place: !0,
6288 limit: 4,
6289 layer: -1
6290 }, {
6291 id: 10,
6292 name: "spawn",
6293 place: !0,
6294 limit: 1,
6295 layer: -1
6296 }, {
6297 id: 11,
6298 name: "sapling",
6299 place: !0,
6300 limit: 2,
6301 layer: 0
6302 }, {
6303 id: 12,
6304 name: "blocker",
6305 place: !0,
6306 limit: 3,
6307 layer: -1
6308 }, {
6309 id: 13,
6310 name: "teleporter",
6311 place: !0,
6312 limit: 2,
6313 layer: -1
6314 }], t.projectiles = [{
6315 indx: 0,
6316 layer: 0,
6317 src: "arrow_1",
6318 dmg: 25,
6319 speed: 1.6,
6320 scale: 103,
6321 range: 1e3
6322 }, {
6323 indx: 1,
6324 layer: 1,
6325 dmg: 25,
6326 scale: 20
6327 }, {
6328 indx: 0,
6329 layer: 0,
6330 src: "arrow_1",
6331 dmg: 35,
6332 speed: 2.5,
6333 scale: 103,
6334 range: 1200
6335 }, {
6336 indx: 0,
6337 layer: 0,
6338 src: "arrow_1",
6339 dmg: 30,
6340 speed: 2,
6341 scale: 103,
6342 range: 1200
6343 }, {
6344 indx: 1,
6345 layer: 1,
6346 dmg: 16,
6347 scale: 20
6348 }, {
6349 indx: 0,
6350 layer: 0,
6351 src: "bullet_1",
6352 dmg: 50,
6353 speed: 3.6,
6354 scale: 160,
6355 range: 1400
6356 }], t.weapons = [{
6357 id: 0,
6358 type: 0,
6359 name: "tool hammer",
6360 desc: "tool for gathering all resources",
6361 src: "hammer_1",
6362 length: 140,
6363 width: 140,
6364 xOff: -3,
6365 yOff: 18,
6366 dmg: 25,
6367 range: 65,
6368 gather: 1,
6369 speed: 300
6370 }, {
6371 id: 1,
6372 type: 0,
6373 age: 2,
6374 name: "hand axe",
6375 desc: "gathers resources at a higher rate",
6376 src: "axe_1",
6377 length: 140,
6378 width: 140,
6379 xOff: 3,
6380 yOff: 24,
6381 dmg: 30,
6382 spdMult: 1,
6383 range: 70,
6384 gather: 2,
6385 speed: 400
6386 }, {
6387 id: 2,
6388 type: 0,
6389 age: 8,
6390 name: "great axe",
6391 desc: "deal more damage and gather more resources",
6392 src: "great_axe_1",
6393 length: 140,
6394 width: 140,
6395 xOff: -8,
6396 yOff: 25,
6397 dmg: 35,
6398 spdMult: 1,
6399 range: 75,
6400 gather: 4,
6401 speed: 400
6402 }, {
6403 id: 3,
6404 type: 0,
6405 age: 2,
6406 name: "short sword",
6407 desc: "increased attack power but slower move speed",
6408 src: "sword_1",
6409 iPad: 1.3,
6410 length: 130,
6411 width: 210,
6412 xOff: -8,
6413 yOff: 46,
6414 dmg: 35,
6415 spdMult: .85,
6416 range: 110,
6417 gather: 1,
6418 speed: 300
6419 }, {
6420 id: 4,
6421 type: 0,
6422 age: 8,
6423 name: "katana",
6424 desc: "greater range and damage",
6425 src: "samurai_1",
6426 iPad: 1.3,
6427 length: 130,
6428 width: 210,
6429 xOff: -8,
6430 yOff: 59,
6431 dmg: 40,
6432 spdMult: .8,
6433 range: 118,
6434 gather: 1,
6435 speed: 300
6436 }, {
6437 id: 5,
6438 type: 0,
6439 age: 2,
6440 name: "polearm",
6441 desc: "long range melee weapon",
6442 src: "spear_1",
6443 iPad: 1.3,
6444 length: 130,
6445 width: 210,
6446 xOff: -8,
6447 yOff: 53,
6448 dmg: 45,
6449 knock: .2,
6450 spdMult: .82,
6451 range: 142,
6452 gather: 1,
6453 speed: 700
6454 }, {
6455 id: 6,
6456 type: 0,
6457 age: 2,
6458 name: "bat",
6459 desc: "fast long range melee weapon",
6460 src: "bat_1",
6461 iPad: 1.3,
6462 length: 110,
6463 width: 180,
6464 xOff: -8,
6465 yOff: 53,
6466 dmg: 20,
6467 knock: .7,
6468 range: 110,
6469 gather: 1,
6470 speed: 300
6471 }, {
6472 id: 7,
6473 type: 0,
6474 age: 2,
6475 name: "daggers",
6476 desc: "really fast short range weapon",
6477 src: "dagger_1",
6478 iPad: .8,
6479 length: 110,
6480 width: 110,
6481 xOff: 18,
6482 yOff: 0,
6483 dmg: 20,
6484 knock: .1,
6485 range: 65,
6486 gather: 1,
6487 hitSlow: .1,
6488 spdMult: 1.13,
6489 speed: 100
6490 }, {
6491 id: 8,
6492 type: 0,
6493 age: 2,
6494 name: "stick",
6495 desc: "great for gathering but very weak",
6496 src: "stick_1",
6497 length: 140,
6498 width: 140,
6499 xOff: 3,
6500 yOff: 24,
6501 dmg: 1,
6502 spdMult: 1,
6503 range: 70,
6504 gather: 7,
6505 speed: 400
6506 }, {
6507 id: 9,
6508 type: 1,
6509 age: 6,
6510 name: "hunting bow",
6511 desc: "bow used for ranged combat and hunting",
6512 src: "bow_1",
6513 req: ["wood", 4],
6514 length: 120,
6515 width: 120,
6516 xOff: -6,
6517 yOff: 0,
6518 projectile: 0,
6519 spdMult: .75,
6520 speed: 600
6521 }, {
6522 id: 10,
6523 type: 1,
6524 age: 6,
6525 name: "great hammer",
6526 desc: "hammer used for destroying structures",
6527 src: "great_hammer_1",
6528 length: 140,
6529 width: 140,
6530 xOff: -9,
6531 yOff: 25,
6532 dmg: 10,
6533 spdMult: .88,
6534 range: 75,
6535 sDmg: 7.5,
6536 gather: 1,
6537 speed: 400
6538 }, {
6539 id: 11,
6540 type: 1,
6541 age: 6,
6542 name: "wooden shield",
6543 desc: "blocks projectiles and reduces melee damage",
6544 src: "shield_1",
6545 length: 120,
6546 width: 120,
6547 shield: .2,
6548 xOff: 6,
6549 yOff: 0,
6550 spdMult: .7
6551 }, {
6552 id: 12,
6553 type: 1,
6554 age: 8,
6555 name: "crossbow",
6556 desc: "deals more damage and has greater range",
6557 src: "crossbow_1",
6558 req: ["wood", 5],
6559 aboveHand: !0,
6560 armS: .75,
6561 length: 120,
6562 width: 120,
6563 xOff: -4,
6564 yOff: 0,
6565 projectile: 2,
6566 spdMult: .7,
6567 speed: 700
6568 }, {
6569 id: 13,
6570 type: 1,
6571 age: 9,
6572 name: "repeater crossbow",
6573 desc: "high firerate crossbow with reduced damage",
6574 src: "crossbow_2",
6575 req: ["wood", 10],
6576 aboveHand: !0,
6577 armS: .75,
6578 length: 120,
6579 width: 120,
6580 xOff: -4,
6581 yOff: 0,
6582 projectile: 3,
6583 spdMult: .7,
6584 speed: 230
6585 }, {
6586 id: 14,
6587 type: 1,
6588 age: 6,
6589 name: "mc grabby",
6590 desc: "steals resources from enemies",
6591 src: "grab_1",
6592 length: 130,
6593 width: 210,
6594 xOff: -8,
6595 yOff: 53,
6596 dmg: 0,
6597 steal: 250,
6598 knock: .2,
6599 spdMult: 1.05,
6600 range: 125,
6601 gather: 0,
6602 speed: 700
6603 }, {
6604 id: 15,
6605 type: 1,
6606 age: 9,
6607 name: "musket",
6608 desc: "slow firerate but high damage and range",
6609 src: "musket_1",
6610 req: ["stone", 10],
6611 aboveHand: !0,
6612 rec: .35,
6613 armS: .6,
6614 hndS: .3,
6615 hndD: 1.6,
6616 length: 205,
6617 width: 205,
6618 xOff: 25,
6619 yOff: 0,
6620 projectile: 5,
6621 hideProjectile: !0,
6622 spdMult: .6,
6623 speed: 1500
6624 }], e.exports.list = [{
6625 group: e.exports.groups[0],
6626 name: "apple",
6627 desc: "restores 20 health when consumed",
6628 req: ["food", 10],
6629 consume: function(e) {
6630 return e.changeHealth(20, e)
6631 },
6632 scale: 22,
6633 holdOffset: 15
6634 }, {
6635 age: 3,
6636 group: e.exports.groups[0],
6637 name: "cookie",
6638 desc: "restores 40 health when consumed",
6639 req: ["food", 15],
6640 consume: function(e) {
6641 return e.changeHealth(40, e)
6642 },
6643 scale: 27,
6644 holdOffset: 15
6645 }, {
6646 age: 7,
6647 group: e.exports.groups[0],
6648 name: "cheese",
6649 desc: "restores 30 health and another 50 over 5 seconds",
6650 req: ["food", 25],
6651 consume: function(e) {
6652 return !!(e.changeHealth(30, e) || e.health < 100) && (e.dmgOverTime.dmg = -10, e.dmgOverTime.doer = e, e.dmgOverTime.time = 5, !0)
6653 },
6654 scale: 27,
6655 holdOffset: 15
6656 }, {
6657 group: e.exports.groups[1],
6658 name: "wood wall",
6659 desc: "provides protection for your village",
6660 req: ["wood", 10],
6661 projDmg: !0,
6662 health: 380,
6663 scale: 50,
6664 holdOffset: 20,
6665 placeOffset: -5
6666 }, {
6667 age: 3,
6668 group: e.exports.groups[1],
6669 name: "stone wall",
6670 desc: "provides improved protection for your village",
6671 req: ["stone", 25],
6672 health: 900,
6673 scale: 50,
6674 holdOffset: 20,
6675 placeOffset: -5
6676 }, {
6677 age: 7,
6678 group: e.exports.groups[1],
6679 name: "castle wall",
6680 desc: "provides powerful protection for your village",
6681 req: ["stone", 35],
6682 health: 1500,
6683 scale: 52,
6684 holdOffset: 20,
6685 placeOffset: -5
6686 }, {
6687 group: e.exports.groups[2],
6688 name: "spikes",
6689 desc: "damages enemies when they touch them",
6690 req: ["wood", 20, "stone", 5],
6691 health: 400,
6692 dmg: 20,
6693 scale: 49,
6694 spritePadding: -23,
6695 holdOffset: 8,
6696 placeOffset: -5
6697 }, {
6698 age: 5,
6699 group: e.exports.groups[2],
6700 name: "greater spikes",
6701 desc: "damages enemies when they touch them",
6702 req: ["wood", 30, "stone", 10],
6703 health: 500,
6704 dmg: 35,
6705 scale: 52,
6706 spritePadding: -23,
6707 holdOffset: 8,
6708 placeOffset: -5
6709 }, {
6710 age: 9,
6711 group: e.exports.groups[2],
6712 name: "poison spikes",
6713 desc: "poisons enemies when they touch them",
6714 req: ["wood", 35, "stone", 15],
6715 health: 600,
6716 dmg: 30,
6717 pDmg: 5,
6718 scale: 52,
6719 spritePadding: -23,
6720 holdOffset: 8,
6721 placeOffset: -5
6722 }, {
6723 age: 9,
6724 group: e.exports.groups[2],
6725 name: "spinning spikes",
6726 desc: "damages enemies when they touch them",
6727 req: ["wood", 30, "stone", 20],
6728 health: 500,
6729 dmg: 45,
6730 turnSpeed: .003,
6731 scale: 52,
6732 spritePadding: -23,
6733 holdOffset: 8,
6734 placeOffset: -5
6735 }, {
6736 group: e.exports.groups[3],
6737 name: "windmill",
6738 desc: "generates gold over time",
6739 req: ["wood", 50, "stone", 10],
6740 health: 400,
6741 pps: 1,
6742 turnSpeed: .0016,
6743 spritePadding: 25,
6744 iconLineMult: 12,
6745 scale: 45,
6746 holdOffset: 20,
6747 placeOffset: 5
6748 }, {
6749 age: 5,
6750 group: e.exports.groups[3],
6751 name: "faster windmill",
6752 desc: "generates more gold over time",
6753 req: ["wood", 60, "stone", 20],
6754 health: 500,
6755 pps: 1.5,
6756 turnSpeed: .0025,
6757 spritePadding: 25,
6758 iconLineMult: 12,
6759 scale: 47,
6760 holdOffset: 20,
6761 placeOffset: 5
6762 }, {
6763 age: 8,
6764 group: e.exports.groups[3],
6765 name: "power mill",
6766 desc: "generates more gold over time",
6767 req: ["wood", 100, "stone", 50],
6768 health: 800,
6769 pps: 2,
6770 turnSpeed: .005,
6771 spritePadding: 25,
6772 iconLineMult: 12,
6773 scale: 47,
6774 holdOffset: 20,
6775 placeOffset: 5
6776 }, {
6777 age: 5,
6778 group: e.exports.groups[4],
6779 type: 2,
6780 name: "mine",
6781 desc: "allows you to mine stone",
6782 req: ["wood", 20, "stone", 100],
6783 iconLineMult: 12,
6784 scale: 65,
6785 holdOffset: 20,
6786 placeOffset: 0
6787 }, {
6788 age: 5,
6789 group: e.exports.groups[11],
6790 type: 0,
6791 name: "sapling",
6792 desc: "allows you to farm wood",
6793 req: ["wood", 150],
6794 iconLineMult: 12,
6795 colDiv: .5,
6796 scale: 110,
6797 holdOffset: 50,
6798 placeOffset: -15
6799 }, {
6800 age: 4,
6801 group: e.exports.groups[5],
6802 name: "pit trap",
6803 desc: "pit that traps enemies if they walk over it",
6804 req: ["wood", 10, "stone", 10],
6805 trap: !0,
6806 ignoreCollision: !0,
6807 hideFromEnemy: !0,
6808 health: 500,
6809 colDiv: .2,
6810 scale: 50,
6811 holdOffset: 20,
6812 placeOffset: -5
6813 }, {
6814 age: 4,
6815 group: e.exports.groups[6],
6816 name: "boost pad",
6817 desc: "provides boost when stepped on",
6818 req: ["stone", 20, "wood", 5],
6819 ignoreCollision: !0,
6820 boostSpeed: 1.5,
6821 health: 150,
6822 colDiv: .7,
6823 scale: 45,
6824 holdOffset: 20,
6825 placeOffset: -5
6826 }, {
6827 age: 7,
6828 group: e.exports.groups[7],
6829 doUpdate: !0,
6830 name: "turret",
6831 desc: "defensive structure that shoots at enemies",
6832 req: ["wood", 200, "stone", 150],
6833 health: 800,
6834 projectile: 1,
6835 shootRange: 700,
6836 shootRate: 2200,
6837 scale: 43,
6838 holdOffset: 20,
6839 placeOffset: -5
6840 }, {
6841 age: 7,
6842 group: e.exports.groups[8],
6843 name: "platform",
6844 desc: "platform to shoot over walls and cross over water",
6845 req: ["wood", 20],
6846 ignoreCollision: !0,
6847 zIndex: 1,
6848 health: 300,
6849 scale: 43,
6850 holdOffset: 20,
6851 placeOffset: -5
6852 }, {
6853 age: 7,
6854 group: e.exports.groups[9],
6855 name: "healing pad",
6856 desc: "standing on it will slowly heal you",
6857 req: ["wood", 30, "food", 10],
6858 ignoreCollision: !0,
6859 healCol: 15,
6860 health: 400,
6861 colDiv: .7,
6862 scale: 45,
6863 holdOffset: 20,
6864 placeOffset: -5
6865 }, {
6866 age: 9,
6867 group: e.exports.groups[10],
6868 name: "spawn pad",
6869 desc: "you will spawn here when you die but it will dissapear",
6870 req: ["wood", 100, "stone", 100],
6871 health: 400,
6872 ignoreCollision: !0,
6873 spawnPoint: !0,
6874 scale: 45,
6875 holdOffset: 20,
6876 placeOffset: -5
6877 }, {
6878 age: 7,
6879 group: e.exports.groups[12],
6880 name: "blocker",
6881 desc: "blocks building in radius",
6882 req: ["wood", 30, "stone", 25],
6883 ignoreCollision: !0,
6884 blocker: 300,
6885 health: 400,
6886 colDiv: .7,
6887 scale: 45,
6888 holdOffset: 20,
6889 placeOffset: -5
6890 }, {
6891 age: 7,
6892 group: e.exports.groups[13],
6893 name: "teleporter",
6894 desc: "teleports you to a random point on the map",
6895 req: ["wood", 60, "stone", 60],
6896 ignoreCollision: !0,
6897 teleport: !0,
6898 health: 200,
6899 colDiv: .7,
6900 scale: 45,
6901 holdOffset: 20,
6902 placeOffset: -5
6903 }];
6904 for (var n = 0; n < e.exports.list.length; ++n) e.exports.list[n].id = n, e.exports
6905 .list[n].pre && (e.exports.list[n].pre = n - e.exports.list[n].pre)
6906}, function(e, t) {
6907 e.exports = {}
6908}, function(e, t) {
6909 var n = Math.floor,
6910 i = Math.abs,
6911 r = Math.cos,
6912 s = Math.sin,
6913 a = (Math.pow, Math.sqrt);
6914 e.exports = function(e, t, o, c, l, h) {
6915 var u, f;
6916 this.objects = t, this.grids = {}, this.updateObjects = [];
6917 var d = c.mapScale / c.colGrid;
6918 this.setObjectGrids = function(e) {
6919 for (var t = Math.min(c.mapScale, Math.max(0, e.x)), n = Math.min(c.mapScale,
6920 Math.max(0, e.y)), i = 0; i < c.colGrid; ++i) {
6921 u = i * d;
6922 for (var r = 0; r < c.colGrid; ++r) f = r * d, t + e.scale >= u && t -
6923 e.scale <= u + d && n + e.scale >= f && n - e.scale <= f + d && (this.grids[
6924 i + "_" + r] || (this.grids[i + "_" + r] = []), this.grids[i + "_" +
6925 r].push(e), e.gridLocations.push(i + "_" + r))
6926 }
6927 }, this.removeObjGrid = function(e) {
6928 for (var t, n = 0; n < e.gridLocations.length; ++n)(t = this.grids[e.gridLocations[
6929 n]].indexOf(e)) >= 0 && this.grids[e.gridLocations[n]].splice(t, 1)
6930 }, this.disableObj = function(e) {
6931 if (e.active = !1, h) {
6932 e.owner && e.pps && (e.owner.pps -= e.pps), this.removeObjGrid(e);
6933 var t = this.updateObjects.indexOf(e);
6934 t >= 0 && this.updateObjects.splice(t, 1)
6935 }
6936 }, this.hitObj = function(e, t) {
6937 for (var n = 0; n < l.length; ++n) l[n].active && (e.sentTo[l[n].id] &&
6938 (e.active ? l[n].canSee(e) && h.send(l[n].id, "8", o.fixTo(t, 1), e.sid) :
6939 h.send(l[n].id, "12", e.sid)), e.active || e.owner != l[n] || l[n].changeItemCount(
6940 e.group.id, -1))
6941 };
6942 var p, g, m = [];
6943 this.getGridArrays = function(e, t, i) {
6944 u = n(e / d), f = n(t / d), m.length = 0;
6945 try {
6946 this.grids[u + "_" + f] && m.push(this.grids[u + "_" + f]), e + i >= (u +
6947 1) * d && ((p = this.grids[u + 1 + "_" + f]) && m.push(p), f && t - i <=
6948 f * d ? (p = this.grids[u + 1 + "_" + (f - 1)]) && m.push(p) : t + i >=
6949 (f + 1) * d && (p = this.grids[u + 1 + "_" + (f + 1)]) && m.push(p)),
6950 u && e - i <= u * d && ((p = this.grids[u - 1 + "_" + f]) && m.push(p),
6951 f && t - i <= f * d ? (p = this.grids[u - 1 + "_" + (f - 1)]) && m.push(
6952 p) : t + i >= (f + 1) * d && (p = this.grids[u - 1 + "_" + (f + 1)]) &&
6953 m.push(p)), t + i >= (f + 1) * d && (p = this.grids[u + "_" + (f + 1)]) &&
6954 m.push(p), f && t - i <= f * d && (p = this.grids[u + "_" + (f - 1)]) &&
6955 m.push(p)
6956 } catch (e) {}
6957 return m
6958 }, this.add = function(n, i, r, s, a, o, c, l, u) {
6959 g = null;
6960 for (var f = 0; f < t.length; ++f)
6961 if (t[f].sid == n) {
6962 g = t[f];
6963 break
6964 }
6965 if (!g)
6966 for (f = 0; f < t.length; ++f)
6967 if (!t[f].active) {
6968 g = t[f];
6969 break
6970 }
6971 g || (g = new e(n), t.push(g)), l && (g.sid = n), g.init(i, r, s, a, o,
6972 c, u), h && (this.setObjectGrids(g), g.doUpdate && this.updateObjects.push(
6973 g))
6974 }, this.disableBySid = function(e) {
6975 for (var n = 0; n < t.length; ++n)
6976 if (t[n].sid == e) {
6977 this.disableObj(t[n]);
6978 break
6979 }
6980 }, this.removeAllItems = function(e, n) {
6981 for (var i = 0; i < t.length; ++i) t[i].active && t[i].owner && t[i].owner
6982 .sid == e && this.disableObj(t[i]);
6983 n && n.broadcast("13", e)
6984 }, this.fetchSpawnObj = function(e) {
6985 for (var n = null, i = 0; i < t.length; ++i)
6986 if ((g = t[i]).active && g.owner && g.owner.sid == e && g.spawnPoint) {
6987 n = [g.x, g.y], this.disableObj(g), h.broadcast("12", g.sid), g.owner &&
6988 g.owner.changeItemCount(g.group.id, -1);
6989 break
6990 }
6991 return n
6992 }, this.checkItemLocation = function(e, n, i, r, s, a, l) {
6993 for (var h = 0; h < t.length; ++h) {
6994 var u = t[h].blocker ? t[h].blocker : t[h].getScale(r, t[h].isItem);
6995 if (t[h].active && o.getDistance(e, n, t[h].x, t[h].y) < i + u) return !
6996 1
6997 }
6998 return !(!a && 18 != s && n >= c.mapScale / 2 - c.riverWidth / 2 && n <=
6999 c.mapScale / 2 + c.riverWidth / 2)
7000 }, this.addProjectile = function(e, t, n, i, r) {
7001 for (var s, a = items.projectiles[r], c = 0; c < projectiles.length; ++c)
7002 if (!projectiles[c].active) {
7003 s = projectiles[c];
7004 break
7005 }
7006 s || (s = new Projectile(l, o), projectiles.push(s)), s.init(r, e, t, n,
7007 a.speed, i, a.scale)
7008 }, this.checkCollision = function(e, t, n) {
7009 n = n || 1;
7010 var l = e.x - t.x,
7011 h = e.y - t.y,
7012 u = e.scale + t.scale;
7013 if (i(l) <= u || i(h) <= u) {
7014 u = e.scale + (t.getScale ? t.getScale() : t.scale);
7015 var f = a(l * l + h * h) - u;
7016 if (f <= 0) {
7017 if (t.ignoreCollision) !t.trap || e.noTrap || t.owner == e || t.owner &&
7018 t.owner.team && t.owner.team == e.team ? t.boostSpeed ? (e.xVel += n *
7019 t.boostSpeed * (t.weightM || 1) * r(t.dir), e.yVel += n * t.boostSpeed *
7020 (t.weightM || 1) * s(t.dir)) : t.healCol ? e.healCol = t.healCol : t
7021 .teleport && (e.x = o.randInt(0, c.mapScale), e.y = o.randInt(0, c.mapScale)) :
7022 (e.lockMove = !0, t.hideFromEnemy = !1);
7023 else {
7024 var d = o.getDirection(e.x, e.y, t.x, t.y);
7025 if (o.getDistance(e.x, e.y, t.x, t.y), t.isPlayer ? (f = -1 * f / 2,
7026 e.x += f * r(d), e.y += f * s(d), t.x -= f * r(d), t.y -= f * s(d)) :
7027 (e.x = t.x + u * r(d), e.y = t.y + u * s(d), e.xVel *= .75, e.yVel *=
7028 .75), t.dmg && t.owner != e && (!t.owner || !t.owner.team || t.owner
7029 .team != e.team)) {
7030 e.changeHealth(-t.dmg, t.owner, t);
7031 var p = 1.5 * (t.weightM || 1);
7032 e.xVel += p * r(d), e.yVel += p * s(d), !t.pDmg || e.skin && e.skin.poisonRes ||
7033 (e.dmgOverTime.dmg = t.pDmg, e.dmgOverTime.time = 5, e.dmgOverTime.doer =
7034 t.owner), e.colDmg && t.health && (t.changeHealth(-e.colDmg) &&
7035 this.disableObj(t), this.hitObj(t, o.getDirection(e.x, e.y, t.x, t
7036 .y)))
7037 }
7038 }
7039 return t.zIndex > e.zIndex && (e.zIndex = t.zIndex), !0
7040 }
7041 }
7042 return !1
7043 }
7044 }
7045}, function(e, t, n) {
7046 var i = new(n(49));
7047 i.addWords("jew", "black", "baby", "child", "white", "porn", "pedo", "trump",
7048 "clinton", "hitler", "nazi", "gay", "pride", "sex", "pleasure", "touch",
7049 "poo", "kids", "rape", "white power", "nigga", "nig nog", "doggy",
7050 "rapist", "boner", "nigger", "nigg", "finger", "nogger", "nagger", "nig",
7051 "fag", "gai", "pole", "stripper", "penis", "vagina", "pussy", "nazi",
7052 "hitler", "stalin", "burn", "chamber", "cock", "peen", "dick", "spick",
7053 "nieger", "die", "satan", "n|ig", "nlg", "cunt", "c0ck", "fag", "lick",
7054 "condom", "anal", "shit", "phile", "little", "kids", "free KR", "tiny",
7055 "sidney", "ass", "kill", ".io", "(dot)", "[dot]", "mini", "whiore",
7056 "whore", "faggot", "github", "1337", "666", "satan", "senpa", "discord",
7057 "d1scord", "mistik", ".io", "senpa.io", "sidney", "sid", "senpaio",
7058 "vries", "asa");
7059 var r = Math.abs,
7060 s = Math.cos,
7061 a = Math.sin,
7062 o = Math.pow,
7063 c = Math.sqrt;
7064 e.exports = function(e, t, n, l, h, u, f, d, p, g, m, y, k, v) {
7065 this.id = e, this.sid = t, this.tmpScore = 0, this.team = null, this.skinIndex =
7066 0, this.tailIndex = 0, this.hitTime = 0, this.tails = {};
7067 for (var w = 0; w < m.length; ++w) m[w].price <= 0 && (this.tails[m[w].id] =
7068 1);
7069 for (this.skins = {}, w = 0; w < g.length; ++w) g[w].price <= 0 && (this.skins[
7070 g[w].id] = 1);
7071 this.points = 0, this.dt = 0, this.hidden = !1, this.itemCounts = {}, this
7072 .isPlayer = !0, this.pps = 0, this.moveDir = void 0, this.skinRot = 0,
7073 this.lastPing = 0, this.iconIndex = 0, this.skinColor = 0, this.spawn =
7074 function(e) {
7075 this.active = !0, this.alive = !0, this.lockMove = !1, this.lockDir = !1,
7076 this.minimapCounter = 0, this.chatCountdown = 0, this.shameCount = 0,
7077 this.shameTimer = 0, this.sentTo = {}, this.gathering = 0, this.autoGather =
7078 0, this.animTime = 0, this.animSpeed = 0, this.mouseState = 0, this.buildIndex = -
7079 1, this.weaponIndex = 0, this.dmgOverTime = {}, this.noMovTimer = 0,
7080 this.maxXP = 300, this.XP = 0, this.age = 1, this.kills = 0, this.upgrAge =
7081 2, this.upgradePoints = 0, this.x = 0, this.y = 0, this.zIndex = 0,
7082 this.xVel = 0, this.yVel = 0, this.slowMult = 1, this.dir = 0, this.dirPlus =
7083 0, this.targetDir = 0, this.targetAngle = 0, this.maxHealth = 100, this
7084 .health = this.maxHealth, this.scale = n.playerScale, this.speed = n.playerSpeed,
7085 this.resetMoveDir(), this.resetResources(e), this.items = [0, 3, 6, 10],
7086 this.weapons = [0], this.shootCount = 0, this.weaponXP = [], this.reloads = {}
7087 }, this.resetMoveDir = function() {
7088 this.moveDir = void 0
7089 }, this.resetResources = function(e) {
7090 for (var t = 0; t < n.resourceTypes.length; ++t) this[n.resourceTypes[t]] =
7091 e ? 100 : 0
7092 }, this.addItem = function(e) {
7093 var t = p.list[e];
7094 if (t) {
7095 for (var n = 0; n < this.items.length; ++n)
7096 if (p.list[this.items[n]].group == t.group) return this.buildIndex ==
7097 this.items[n] && (this.buildIndex = e), this.items[n] = e, !0;
7098 return this.items.push(e), !0
7099 }
7100 return !1
7101 }, this.setUserData = function(e) {
7102 if (e) {
7103 this.name = "unknown";
7104 var t = e.name + "",
7105 r = !1,
7106 s = (t = (t = (t = (t = t.slice(0, n.maxNameLength)).replace(
7107 /[^\w:\(\)\/? -]+/gim, " ")).replace(/[^\x00-\x7F]/g, " ")).trim()).toLowerCase()
7108 .replace(/\s/g, "").replace(/1/g, "i").replace(/0/g, "o").replace(/5/g,
7109 "s");
7110 for (var a of i.list)
7111 if (-1 != s.indexOf(a)) {
7112 r = !0;
7113 break
7114 }
7115 t.length > 0 && !r && (this.name = t), this.skinColor = 0, n.skinColors[
7116 e.skin] && (this.skinColor = e.skin)
7117 }
7118 }, this.getData = function() {
7119 return [this.id, this.sid, this.name, l.fixTo(this.x, 2), l.fixTo(this.y,
7120 2), l.fixTo(this.dir, 3), this.health, this.maxHealth, this.scale,
7121 this.skinColor
7122 ]
7123 }, this.setData = function(e) {
7124 this.id = e[0], this.sid = e[1], this.name = e[2], this.x = e[3], this.y =
7125 e[4], this.dir = e[5], this.health = e[6], this.maxHealth = e[7], this.scale =
7126 e[8], this.skinColor = e[9]
7127 };
7128 var b = 0;
7129 this.update = function(e) {
7130 if (this.alive) {
7131 if (this.shameTimer > 0 && (this.shameTimer -= e, this.shameTimer <= 0 &&
7132 (this.shameTimer = 0, this.shameCount = 0)), (b -= e) <= 0) {
7133 var t = (this.skin && this.skin.healthRegen ? this.skin.healthRegen :
7134 0) + (this.tail && this.tail.healthRegen ? this.tail.healthRegen : 0);
7135 t && this.changeHealth(t, this), this.dmgOverTime.dmg && (this.changeHealth(-
7136 this.dmgOverTime.dmg, this.dmgOverTime.doer), this.dmgOverTime.time -=
7137 1, this.dmgOverTime.time <= 0 && (this.dmgOverTime.dmg = 0)), this.healCol &&
7138 this.changeHealth(this.healCol, this), b = 1e3
7139 }
7140 if (this.alive) {
7141 if (this.slowMult < 1 && (this.slowMult += 8e-4 * e, this.slowMult > 1 &&
7142 (this.slowMult = 1)), this.noMovTimer += e, (this.xVel || this.yVel) &&
7143 (this.noMovTimer = 0), this.lockMove) this.xVel = 0, this.yVel = 0;
7144 else {
7145 var i = (this.buildIndex >= 0 ? .5 : 1) * (p.weapons[this.weaponIndex]
7146 .spdMult || 1) * (this.skin && this.skin.spdMult || 1) * (this.tail &&
7147 this.tail.spdMult || 1) * (this.y <= n.snowBiomeTop ? this.skin &&
7148 this.skin.coldM ? 1 : n.snowSpeed : 1) * this.slowMult;
7149 !this.zIndex && this.y >= n.mapScale / 2 - n.riverWidth / 2 && this.y <=
7150 n.mapScale / 2 + n.riverWidth / 2 && (this.skin && this.skin.watrImm ?
7151 (i *= .75, this.xVel += .4 * n.waterCurrent * e) : (i *= .33, this.xVel +=
7152 n.waterCurrent * e));
7153 var r = null != this.moveDir ? s(this.moveDir) : 0,
7154 d = null != this.moveDir ? a(this.moveDir) : 0,
7155 g = c(r * r + d * d);
7156 0 != g && (r /= g, d /= g), r && (this.xVel += r * this.speed * i * e),
7157 d && (this.yVel += d * this.speed * i * e)
7158 }
7159 var m;
7160 this.zIndex = 0, this.lockMove = !1, this.healCol = 0;
7161 for (var y = l.getDistance(0, 0, this.xVel * e, this.yVel * e), k =
7162 Math.min(4, Math.max(1, Math.round(y / 40))), v = 1 / k, w = 0; w <
7163 k; ++w) {
7164 this.xVel && (this.x += this.xVel * e * v), this.yVel && (this.y +=
7165 this.yVel * e * v), m = u.getGridArrays(this.x, this.y, this.scale);
7166 for (var x = 0; x < m.length; ++x)
7167 for (var S = 0; S < m[x].length; ++S) m[x][S].active && u.checkCollision(
7168 this, m[x][S], v)
7169 }
7170 for (w = (I = f.indexOf(this)) + 1; w < f.length; ++w) f[w] != this &&
7171 f[w].alive && u.checkCollision(this, f[w]);
7172 if (this.xVel && (this.xVel *= o(n.playerDecel, e), this.xVel <= .01 &&
7173 this.xVel >= -.01 && (this.xVel = 0)), this.yVel && (this.yVel *= o(
7174 n.playerDecel, e), this.yVel <= .01 && this.yVel >= -.01 && (this.yVel =
7175 0)), this.x - this.scale < 0 ? this.x = this.scale : this.x + this.scale >
7176 n.mapScale && (this.x = n.mapScale - this.scale), this.y - this.scale <
7177 0 ? this.y = this.scale : this.y + this.scale > n.mapScale && (this.y =
7178 n.mapScale - this.scale), this.buildIndex < 0)
7179 if (this.reloads[this.weaponIndex] > 0) this.reloads[this.weaponIndex] -=
7180 e, this.gathering = this.mouseState;
7181 else if (this.gathering || this.autoGather) {
7182 var T = !0;
7183 if (null != p.weapons[this.weaponIndex].gather) this.gather(f);
7184 else if (null != p.weapons[this.weaponIndex].projectile && this.hasRes(
7185 p.weapons[this.weaponIndex], this.skin ? this.skin.projCost : 0)) {
7186 this.useRes(p.weapons[this.weaponIndex], this.skin ? this.skin.projCost :
7187 0), this.noMovTimer = 0;
7188 var I = p.weapons[this.weaponIndex].projectile,
7189 E = 2 * this.scale,
7190 M = this.skin && this.skin.aMlt ? this.skin.aMlt : 1;
7191 p.weapons[this.weaponIndex].rec && (this.xVel -= p.weapons[this.weaponIndex]
7192 .rec * s(this.dir), this.yVel -= p.weapons[this.weaponIndex].rec *
7193 a(this.dir)), h.addProjectile(this.x + E * s(this.dir), this.y + E *
7194 a(this.dir), this.dir, p.projectiles[I].range * M, p.projectiles[I]
7195 .speed * M, I, this, null, this.zIndex)
7196 } else T = !1;
7197 this.gathering = this.mouseState, T && (this.reloads[this.weaponIndex] =
7198 p.weapons[this.weaponIndex].speed * (this.skin && this.skin.atkSpd ||
7199 1))
7200 }
7201 }
7202 }
7203 }, this.addWeaponXP = function(e) {
7204 this.weaponXP[this.weaponIndex] || (this.weaponXP[this.weaponIndex] = 0),
7205 this.weaponXP[this.weaponIndex] += e
7206 }, this.earnXP = function(e) {
7207 this.age < n.maxAge && (this.XP += e, this.XP >= this.maxXP ? (this.age <
7208 n.maxAge ? (this.age++, this.XP = 0, this.maxXP *= 1.2) : this.XP =
7209 this.maxXP, this.upgradePoints++, y.send(this.id, "16", this.upgradePoints,
7210 this.upgrAge), y.send(this.id, "15", this.XP, l.fixTo(this.maxXP, 1),
7211 this.age)) : y.send(this.id, "15", this.XP))
7212 }, this.changeHealth = function(e, t) {
7213 if (e > 0 && this.health >= this.maxHealth) return !1;
7214 e < 0 && this.skin && (e *= this.skin.dmgMult || 1), e < 0 && this.tail &&
7215 (e *= this.tail.dmgMult || 1), e < 0 && (this.hitTime = Date.now()),
7216 this.health += e, this.health > this.maxHealth && (e -= this.health -
7217 this.maxHealth, this.health = this.maxHealth), this.health <= 0 &&
7218 this.kill(t);
7219 for (var n = 0; n < f.length; ++n) this.sentTo[f[n].id] && y.send(f[n].id,
7220 "h", this.sid, Math.round(this.health));
7221 return !t || !t.canSee(this) || t == this && e < 0 || y.send(t.id, "t",
7222 Math.round(this.x), Math.round(this.y), Math.round(-e), 1), !0
7223 }, this.kill = function(e) {
7224 e && e.alive && (e.kills++, e.skin && e.skin.goldSteal ? k(e, Math.round(
7225 this.points / 2)) : k(e, Math.round(100 * this.age * (e.skin && e.skin
7226 .kScrM ? e.skin.kScrM : 1))), y.send(e.id, "9", "kills", e.kills, 1)),
7227 this.alive = !1, y.send(this.id, "11"), v()
7228 }, this.addResource = function(e, t, i) {
7229 !i && t > 0 && this.addWeaponXP(t), 3 == e ? k(this, t, !0) : (this[n.resourceTypes[
7230 e]] += t, y.send(this.id, "9", n.resourceTypes[e], this[n.resourceTypes[
7231 e]], 1))
7232 }, this.changeItemCount = function(e, t) {
7233 this.itemCounts[e] = this.itemCounts[e] || 0, this.itemCounts[e] += t, y
7234 .send(this.id, "14", e, this.itemCounts[e])
7235 }, this.buildItem = function(e) {
7236 var t = this.scale + e.scale + (e.placeOffset || 0),
7237 n = this.x + t * s(this.dir),
7238 i = this.y + t * a(this.dir);
7239 if (this.canBuild(e) && !(e.consume && this.skin && this.skin.noEat) &&
7240 (e.consume || u.checkItemLocation(n, i, e.scale, .6, e.id, !1, this))) {
7241 var r = !1;
7242 if (e.consume) {
7243 if (this.hitTime) {
7244 var o = Date.now() - this.hitTime;
7245 this.hitTime = 0, o <= 120 ? (this.shameCount++, this.shameCount >= 8 &&
7246 (this.shameTimer = 3e4, this.shameCount = 0)) : (this.shameCount -=
7247 2, this.shameCount <= 0 && (this.shameCount = 0))
7248 }
7249 this.shameTimer <= 0 && (r = e.consume(this))
7250 } else r = !0, e.group.limit && this.changeItemCount(e.group.id, 1), e.pps &&
7251 (this.pps += e.pps), u.add(u.objects.length, n, i, this.dir, e.scale,
7252 e.type, e, !1, this);
7253 r && (this.useRes(e), this.buildIndex = -1)
7254 }
7255 }, this.hasRes = function(e, t) {
7256 for (var n = 0; n < e.req.length;) {
7257 if (this[e.req[n]] < Math.round(e.req[n + 1] * (t || 1))) return !1;
7258 n += 2
7259 }
7260 return !0
7261 }, this.useRes = function(e, t) {
7262 if (!n.inSandbox)
7263 for (var i = 0; i < e.req.length;) this.addResource(n.resourceTypes.indexOf(
7264 e.req[i]), -Math.round(e.req[i + 1] * (t || 1))), i += 2
7265 }, this.canBuild = function(e) {
7266 return !!n.inSandbox || !(e.group.limit && this.itemCounts[e.group.id] >=
7267 e.group.limit) && this.hasRes(e)
7268 }, this.gather = function() {
7269 this.noMovTimer = 0, this.slowMult -= p.weapons[this.weaponIndex].hitSlow ||
7270 .3, this.slowMult < 0 && (this.slowMult = 0);
7271 for (var e, t, i, r = n.fetchVariant(this), o = r.poison, c = r.val, h = {},
7272 g = u.getGridArrays(this.x, this.y, p.weapons[this.weaponIndex].range),
7273 m = 0; m < g.length; ++m)
7274 for (var y = 0; y < g[m].length; ++y)
7275 if ((t = g[m][y]).active && !t.dontGather && !h[t.sid] && t.visibleToPlayer(
7276 this) && l.getDistance(this.x, this.y, t.x, t.y) - t.scale <= p.weapons[
7277 this.weaponIndex].range && (e = l.getDirection(t.x, t.y, this.x,
7278 this.y), l.getAngleDist(e, this.dir) <= n.gatherAngle)) {
7279 if (h[t.sid] = 1, t.health) {
7280 if (t.changeHealth(-p.weapons[this.weaponIndex].dmg * c * (p.weapons[
7281 this.weaponIndex].sDmg || 1) * (this.skin && this.skin.bDmg ?
7282 this.skin.bDmg : 1), this)) {
7283 for (var k = 0; k < t.req.length;) this.addResource(n.resourceTypes
7284 .indexOf(t.req[k]), t.req[k + 1]), k += 2;
7285 u.disableObj(t)
7286 }
7287 } else {
7288 this.earnXP(4 * p.weapons[this.weaponIndex].gather);
7289 var v = p.weapons[this.weaponIndex].gather + (3 == t.type ? 4 : 0);
7290 this.skin && this.skin.extraGold && this.addResource(3, 1), this.addResource(
7291 t.type, v)
7292 }
7293 i = !0, u.hitObj(t, e)
7294 }
7295 for (y = 0; y < f.length + d.length; ++y)
7296 if ((t = f[y] || d[y - f.length]) != this && t.alive && (!t.team || t.team !=
7297 this.team) && l.getDistance(this.x, this.y, t.x, t.y) - 1.8 * t.scale <=
7298 p.weapons[this.weaponIndex].range && (e = l.getDirection(t.x, t.y,
7299 this.x, this.y), l.getAngleDist(e, this.dir) <= n.gatherAngle)) {
7300 var w = p.weapons[this.weaponIndex].steal;
7301 w && t.addResource && (w = Math.min(t.points || 0, w), this.addResource(
7302 3, w), t.addResource(3, -w));
7303 var b = c;
7304 null != t.weaponIndex && p.weapons[t.weaponIndex].shield && l.getAngleDist(
7305 e + Math.PI, t.dir) <= n.shieldAngle && (b = p.weapons[t.weaponIndex]
7306 .shield);
7307 var x = p.weapons[this.weaponIndex].dmg * (this.skin && this.skin.dmgMultO ?
7308 this.skin.dmgMultO : 1) * (this.tail && this.tail.dmgMultO ? this.tail
7309 .dmgMultO : 1),
7310 S = .3 * (t.weightM || 1) + (p.weapons[this.weaponIndex].knock || 0);
7311 t.xVel += S * s(e), t.yVel += S * a(e), this.skin && this.skin.healD &&
7312 this.changeHealth(x * b * this.skin.healD, this), this.tail && this.tail
7313 .healD && this.changeHealth(x * b * this.tail.healD, this), t.skin &&
7314 t.skin.dmg && 1 == b && this.changeHealth(-x * t.skin.dmg, t), t.tail &&
7315 t.tail.dmg && 1 == b && this.changeHealth(-x * t.tail.dmg, t), !(t.dmgOverTime &&
7316 this.skin && this.skin.poisonDmg) || t.skin && t.skin.poisonRes || (
7317 t.dmgOverTime.dmg = this.skin.poisonDmg, t.dmgOverTime.time = this.skin
7318 .poisonTime || 1, t.dmgOverTime.doer = this), !t.dmgOverTime || !o ||
7319 t.skin && t.skin.poisonRes || (t.dmgOverTime.dmg = 5, t.dmgOverTime.time =
7320 5, t.dmgOverTime.doer = this), t.skin && t.skin.dmgK && (this.xVel -=
7321 t.skin.dmgK * s(e), this.yVel -= t.skin.dmgK * a(e)), t.changeHealth(-
7322 x * b, this, this)
7323 }
7324 this.sendAnimation(i ? 1 : 0)
7325 }, this.sendAnimation = function(e) {
7326 for (var t = 0; t < f.length; ++t) this.sentTo[f[t].id] && this.canSee(f[
7327 t]) && y.send(f[t].id, "7", this.sid, e ? 1 : 0, this.weaponIndex)
7328 };
7329 var x = 0,
7330 S = 0;
7331 this.animate = function(e) {
7332 this.animTime > 0 && (this.animTime -= e, this.animTime <= 0 ? (this.animTime =
7333 0, this.dirPlus = 0, x = 0, S = 0) : 0 == S ? (x += e / (this.animSpeed *
7334 n.hitReturnRatio), this.dirPlus = l.lerp(0, this.targetAngle, Math.min(
7335 1, x)), x >= 1 && (x = 1, S = 1)) : (x -= e / (this.animSpeed * (1 -
7336 n.hitReturnRatio)), this.dirPlus = l.lerp(0, this.targetAngle, Math.max(
7337 0, x))))
7338 }, this.startAnim = function(e, t) {
7339 this.animTime = this.animSpeed = p.weapons[t].speed, this.targetAngle =
7340 e ? -n.hitAngle : -Math.PI, x = 0, S = 0
7341 }, this.canSee = function(e) {
7342 if (!e) return !1;
7343 if (e.skin && e.skin.invisTimer && e.noMovTimer >= e.skin.invisTimer)
7344 return !1;
7345 var t = r(e.x - this.x) - e.scale,
7346 i = r(e.y - this.y) - e.scale;
7347 return t <= n.maxScreenWidth / 2 * 1.3 && i <= n.maxScreenHeight / 2 *
7348 1.3
7349 }
7350 }
7351}, function(e, t, n) {
7352 const i = n(50).words,
7353 r = n(51).array;
7354 e.exports = class {
7355 constructor(e = {}) {
7356 Object.assign(this, {
7357 list: e.emptyList && [] || Array.prototype.concat.apply(i, [r, e.list || []]),
7358 exclude: e.exclude || [],
7359 placeHolder: e.placeHolder || "*",
7360 regex: e.regex || /[^a-zA-Z0-9|\$|\@]|\^/g,
7361 replaceRegex: e.replaceRegex || /\w/g
7362 })
7363 }
7364 isProfane(e) {
7365 return this.list.filter(t => {
7366 const n = new RegExp(`\\b${t.replace(/(\W)/g,"\\$1")}\\b`, "gi");
7367 return !this.exclude.includes(t.toLowerCase()) && n.test(e)
7368 }).length > 0 || !1
7369 }
7370 replaceWord(e) {
7371 return e.replace(this.regex, "").replace(this.replaceRegex, this.placeHolder)
7372 }
7373 clean(e) {
7374 return e.split(/\b/).map(e => this.isProfane(e) ? this.replaceWord(e) :
7375 e).join("")
7376 }
7377 addWords() {
7378 let e = Array.from(arguments);
7379 this.list.push(...e), e.map(e => e.toLowerCase()).forEach(e => {
7380 this.exclude.includes(e) && this.exclude.splice(this.exclude.indexOf(
7381 e), 1)
7382 })
7383 }
7384 removeWords() {
7385 this.exclude.push(...Array.from(arguments).map(e => e.toLowerCase()))
7386 }
7387 }
7388}, function(e) {
7389 e.exports = {
7390 words: ["ahole", "anus", "ash0le", "ash0les", "asholes", "ass",
7391 "Ass Monkey", "Assface", "assh0le", "assh0lez", "asshole", "assholes",
7392 "assholz", "asswipe", "azzhole", "bassterds", "bastard", "bastards",
7393 "bastardz", "basterds", "basterdz", "Biatch", "bitch", "bitches",
7394 "Blow Job", "boffing", "butthole", "buttwipe", "c0ck", "c0cks", "c0k",
7395 "Carpet Muncher", "cawk", "cawks", "Clit", "cnts", "cntz", "cock",
7396 "cockhead", "cock-head", "cocks", "CockSucker", "cock-sucker", "crap",
7397 "cum", "cunt", "cunts", "cuntz", "dick", "dild0", "dild0s", "dildo",
7398 "dildos", "dilld0", "dilld0s", "dominatricks", "dominatrics",
7399 "dominatrix", "dyke", "enema", "f u c k", "f u c k e r", "fag", "fag1t",
7400 "faget", "fagg1t", "faggit", "faggot", "fagg0t", "fagit", "fags", "fagz",
7401 "faig", "faigs", "fart", "flipping the bird", "fuck", "fucker", "fuckin",
7402 "fucking", "fucks", "Fudge Packer", "fuk", "Fukah", "Fuken", "fuker",
7403 "Fukin", "Fukk", "Fukkah", "Fukken", "Fukker", "Fukkin", "g00k",
7404 "God-damned", "h00r", "h0ar", "h0re", "hells", "hoar", "hoor", "hoore",
7405 "jackoff", "jap", "japs", "jerk-off", "jisim", "jiss", "jizm", "jizz",
7406 "knob", "knobs", "knobz", "kunt", "kunts", "kuntz", "Lezzian",
7407 "Lipshits", "Lipshitz", "masochist", "masokist", "massterbait",
7408 "masstrbait", "masstrbate", "masterbaiter", "masterbate", "masterbates",
7409 "Motha Fucker", "Motha Fuker", "Motha Fukkah", "Motha Fukker",
7410 "Mother Fucker", "Mother Fukah", "Mother Fuker", "Mother Fukkah",
7411 "Mother Fukker", "mother-fucker", "Mutha Fucker", "Mutha Fukah",
7412 "Mutha Fuker", "Mutha Fukkah", "Mutha Fukker", "n1gr", "nastt",
7413 "nigger;", "nigur;", "niiger;", "niigr;", "orafis", "orgasim;", "orgasm",
7414 "orgasum", "oriface", "orifice", "orifiss", "packi", "packie", "packy",
7415 "paki", "pakie", "paky", "pecker", "peeenus", "peeenusss", "peenus",
7416 "peinus", "pen1s", "penas", "penis", "penis-breath", "penus", "penuus",
7417 "Phuc", "Phuck", "Phuk", "Phuker", "Phukker", "polac", "polack", "polak",
7418 "Poonani", "pr1c", "pr1ck", "pr1k", "pusse", "pussee", "pussy", "puuke",
7419 "puuker", "queer", "queers", "queerz", "qweers", "qweerz", "qweir",
7420 "recktum", "rectum", "retard", "sadist", "scank", "schlong", "screwing",
7421 "semen", "sex", "sexy", "Sh!t", "sh1t", "sh1ter", "sh1ts", "sh1tter",
7422 "sh1tz", "shit", "shits", "shitter", "Shitty", "Shity", "shitz", "Shyt",
7423 "Shyte", "Shytty", "Shyty", "skanck", "skank", "skankee", "skankey",
7424 "skanks", "Skanky", "slag", "slut", "sluts", "Slutty", "slutz",
7425 "son-of-a-bitch", "tit", "turd", "va1jina", "vag1na", "vagiina",
7426 "vagina", "vaj1na", "vajina", "vullva", "vulva", "w0p", "wh00r", "wh0re",
7427 "whore", "xrated", "xxx", "b!+ch", "bitch", "blowjob", "clit",
7428 "arschloch", "fuck", "shit", "ass", "asshole", "b!tch", "b17ch", "b1tch",
7429 "bastard", "bi+ch", "boiolas", "buceta", "c0ck", "cawk", "chink", "cipa",
7430 "clits", "cock", "cum", "cunt", "dildo", "dirsa", "ejakulate", "fatass",
7431 "fcuk", "fuk", "fux0r", "hoer", "hore", "jism", "kawk", "l3itch",
7432 "l3i+ch", "lesbian", "masturbate", "masterbat*", "masterbat3",
7433 "motherfucker", "s.o.b.", "mofo", "nazi", "nigga", "nigger", "nutsack",
7434 "phuck", "pimpis", "pusse", "pussy", "scrotum", "sh!t", "shemale",
7435 "shi+", "sh!+", "slut", "smut", "teets", "tits", "boobs", "b00bs",
7436 "teez", "testical", "testicle", "titt", "w00se", "jackoff", "wank",
7437 "whoar", "whore", "*damn", "*dyke", "*fuck*", "*shit*", "@$$", "amcik",
7438 "andskota", "arse*", "assrammer", "ayir", "bi7ch", "bitch*", "bollock*",
7439 "breasts", "butt-pirate", "cabron", "cazzo", "chraa", "chuj", "Cock*",
7440 "cunt*", "d4mn", "daygo", "dego", "dick*", "dike*", "dupa", "dziwka",
7441 "ejackulate", "Ekrem*", "Ekto", "enculer", "faen", "fag*", "fanculo",
7442 "fanny", "feces", "feg", "Felcher", "ficken", "fitt*", "Flikker",
7443 "foreskin", "Fotze", "Fu(*", "fuk*", "futkretzn", "gook", "guiena",
7444 "h0r", "h4x0r", "hell", "helvete", "hoer*", "honkey", "Huevon", "hui",
7445 "injun", "jizz", "kanker*", "kike", "klootzak", "kraut", "knulle", "kuk",
7446 "kuksuger", "Kurac", "kurwa", "kusi*", "kyrpa*", "lesbo", "mamhoon",
7447 "masturbat*", "merd*", "mibun", "monkleigh", "mouliewop", "muie",
7448 "mulkku", "muschi", "nazis", "nepesaurio", "nigger*", "orospu", "paska*",
7449 "perse", "picka", "pierdol*", "pillu*", "pimmel", "piss*", "pizda",
7450 "poontsee", "poop", "porn", "p0rn", "pr0n", "preteen", "pula", "pule",
7451 "puta", "puto", "qahbeh", "queef*", "rautenberg", "schaffer", "scheiss*",
7452 "schlampe", "schmuck", "screw", "sh!t*", "sharmuta", "sharmute",
7453 "shipal", "shiz", "skribz", "skurwysyn", "sphencter", "spic",
7454 "spierdalaj", "splooge", "suka", "b00b*", "testicle*", "titt*", "twat",
7455 "vittu", "wank*", "wetback*", "wichser", "wop*", "yed", "zabourah"
7456 ]
7457 }
7458}, function(e, t, n) {
7459 e.exports = {
7460 object: n(52),
7461 array: n(53),
7462 regex: n(54)
7463 }
7464}, function(e, t) {
7465 e.exports = {
7466 "4r5e": 1,
7467 "5h1t": 1,
7468 "5hit": 1,
7469 a55: 1,
7470 anal: 1,
7471 anus: 1,
7472 ar5e: 1,
7473 arrse: 1,
7474 arse: 1,
7475 ass: 1,
7476 "ass-fucker": 1,
7477 asses: 1,
7478 assfucker: 1,
7479 assfukka: 1,
7480 asshole: 1,
7481 assholes: 1,
7482 asswhole: 1,
7483 a_s_s: 1,
7484 "b!tch": 1,
7485 b00bs: 1,
7486 b17ch: 1,
7487 b1tch: 1,
7488 ballbag: 1,
7489 balls: 1,
7490 ballsack: 1,
7491 bastard: 1,
7492 beastial: 1,
7493 beastiality: 1,
7494 bellend: 1,
7495 bestial: 1,
7496 bestiality: 1,
7497 "bi+ch": 1,
7498 biatch: 1,
7499 bitch: 1,
7500 bitcher: 1,
7501 bitchers: 1,
7502 bitches: 1,
7503 bitchin: 1,
7504 bitching: 1,
7505 bloody: 1,
7506 "blow job": 1,
7507 blowjob: 1,
7508 blowjobs: 1,
7509 boiolas: 1,
7510 bollock: 1,
7511 bollok: 1,
7512 boner: 1,
7513 boob: 1,
7514 boobs: 1,
7515 booobs: 1,
7516 boooobs: 1,
7517 booooobs: 1,
7518 booooooobs: 1,
7519 breasts: 1,
7520 buceta: 1,
7521 bugger: 1,
7522 bum: 1,
7523 "bunny fucker": 1,
7524 butt: 1,
7525 butthole: 1,
7526 buttmuch: 1,
7527 buttplug: 1,
7528 c0ck: 1,
7529 c0cksucker: 1,
7530 "carpet muncher": 1,
7531 cawk: 1,
7532 chink: 1,
7533 cipa: 1,
7534 cl1t: 1,
7535 clit: 1,
7536 clitoris: 1,
7537 clits: 1,
7538 cnut: 1,
7539 cock: 1,
7540 "cock-sucker": 1,
7541 cockface: 1,
7542 cockhead: 1,
7543 cockmunch: 1,
7544 cockmuncher: 1,
7545 cocks: 1,
7546 cocksuck: 1,
7547 cocksucked: 1,
7548 cocksucker: 1,
7549 cocksucking: 1,
7550 cocksucks: 1,
7551 cocksuka: 1,
7552 cocksukka: 1,
7553 cok: 1,
7554 cokmuncher: 1,
7555 coksucka: 1,
7556 coon: 1,
7557 cox: 1,
7558 crap: 1,
7559 cum: 1,
7560 cummer: 1,
7561 cumming: 1,
7562 cums: 1,
7563 cumshot: 1,
7564 cunilingus: 1,
7565 cunillingus: 1,
7566 cunnilingus: 1,
7567 cunt: 1,
7568 cuntlick: 1,
7569 cuntlicker: 1,
7570 cuntlicking: 1,
7571 cunts: 1,
7572 cyalis: 1,
7573 cyberfuc: 1,
7574 cyberfuck: 1,
7575 cyberfucked: 1,
7576 cyberfucker: 1,
7577 cyberfuckers: 1,
7578 cyberfucking: 1,
7579 d1ck: 1,
7580 damn: 1,
7581 dick: 1,
7582 dickhead: 1,
7583 dildo: 1,
7584 dildos: 1,
7585 dink: 1,
7586 dinks: 1,
7587 dirsa: 1,
7588 dlck: 1,
7589 "dog-fucker": 1,
7590 doggin: 1,
7591 dogging: 1,
7592 donkeyribber: 1,
7593 doosh: 1,
7594 duche: 1,
7595 dyke: 1,
7596 ejaculate: 1,
7597 ejaculated: 1,
7598 ejaculates: 1,
7599 ejaculating: 1,
7600 ejaculatings: 1,
7601 ejaculation: 1,
7602 ejakulate: 1,
7603 "f u c k": 1,
7604 "f u c k e r": 1,
7605 f4nny: 1,
7606 fag: 1,
7607 fagging: 1,
7608 faggitt: 1,
7609 faggot: 1,
7610 faggs: 1,
7611 fagot: 1,
7612 fagots: 1,
7613 fags: 1,
7614 fanny: 1,
7615 fannyflaps: 1,
7616 fannyfucker: 1,
7617 fanyy: 1,
7618 fatass: 1,
7619 fcuk: 1,
7620 fcuker: 1,
7621 fcuking: 1,
7622 feck: 1,
7623 fecker: 1,
7624 felching: 1,
7625 fellate: 1,
7626 fellatio: 1,
7627 fingerfuck: 1,
7628 fingerfucked: 1,
7629 fingerfucker: 1,
7630 fingerfuckers: 1,
7631 fingerfucking: 1,
7632 fingerfucks: 1,
7633 fistfuck: 1,
7634 fistfucked: 1,
7635 fistfucker: 1,
7636 fistfuckers: 1,
7637 fistfucking: 1,
7638 fistfuckings: 1,
7639 fistfucks: 1,
7640 flange: 1,
7641 fook: 1,
7642 fooker: 1,
7643 fuck: 1,
7644 fucka: 1,
7645 fucked: 1,
7646 fucker: 1,
7647 fuckers: 1,
7648 fuckhead: 1,
7649 fuckheads: 1,
7650 fuckin: 1,
7651 fucking: 1,
7652 fuckings: 1,
7653 fuckingshitmotherfucker: 1,
7654 fuckme: 1,
7655 fucks: 1,
7656 fuckwhit: 1,
7657 fuckwit: 1,
7658 "fudge packer": 1,
7659 fudgepacker: 1,
7660 fuk: 1,
7661 fuker: 1,
7662 fukker: 1,
7663 fukkin: 1,
7664 fuks: 1,
7665 fukwhit: 1,
7666 fukwit: 1,
7667 fux: 1,
7668 fux0r: 1,
7669 f_u_c_k: 1,
7670 gangbang: 1,
7671 gangbanged: 1,
7672 gangbangs: 1,
7673 gaylord: 1,
7674 gaysex: 1,
7675 goatse: 1,
7676 God: 1,
7677 "god-dam": 1,
7678 "god-damned": 1,
7679 goddamn: 1,
7680 goddamned: 1,
7681 hardcoresex: 1,
7682 hell: 1,
7683 heshe: 1,
7684 hoar: 1,
7685 hoare: 1,
7686 hoer: 1,
7687 homo: 1,
7688 hore: 1,
7689 horniest: 1,
7690 horny: 1,
7691 hotsex: 1,
7692 "jack-off": 1,
7693 jackoff: 1,
7694 jap: 1,
7695 "jerk-off": 1,
7696 jism: 1,
7697 jiz: 1,
7698 jizm: 1,
7699 jizz: 1,
7700 kawk: 1,
7701 knob: 1,
7702 knobead: 1,
7703 knobed: 1,
7704 knobend: 1,
7705 knobhead: 1,
7706 knobjocky: 1,
7707 knobjokey: 1,
7708 kock: 1,
7709 kondum: 1,
7710 kondums: 1,
7711 kum: 1,
7712 kummer: 1,
7713 kumming: 1,
7714 kums: 1,
7715 kunilingus: 1,
7716 "l3i+ch": 1,
7717 l3itch: 1,
7718 labia: 1,
7719 lust: 1,
7720 lusting: 1,
7721 m0f0: 1,
7722 m0fo: 1,
7723 m45terbate: 1,
7724 ma5terb8: 1,
7725 ma5terbate: 1,
7726 masochist: 1,
7727 "master-bate": 1,
7728 masterb8: 1,
7729 "masterbat*": 1,
7730 masterbat3: 1,
7731 masterbate: 1,
7732 masterbation: 1,
7733 masterbations: 1,
7734 masturbate: 1,
7735 "mo-fo": 1,
7736 mof0: 1,
7737 mofo: 1,
7738 mothafuck: 1,
7739 mothafucka: 1,
7740 mothafuckas: 1,
7741 mothafuckaz: 1,
7742 mothafucked: 1,
7743 mothafucker: 1,
7744 mothafuckers: 1,
7745 mothafuckin: 1,
7746 mothafucking: 1,
7747 mothafuckings: 1,
7748 mothafucks: 1,
7749 "mother fucker": 1,
7750 motherfuck: 1,
7751 motherfucked: 1,
7752 motherfucker: 1,
7753 motherfuckers: 1,
7754 motherfuckin: 1,
7755 motherfucking: 1,
7756 motherfuckings: 1,
7757 motherfuckka: 1,
7758 motherfucks: 1,
7759 muff: 1,
7760 mutha: 1,
7761 muthafecker: 1,
7762 muthafuckker: 1,
7763 muther: 1,
7764 mutherfucker: 1,
7765 n1gga: 1,
7766 n1gger: 1,
7767 nazi: 1,
7768 nigg3r: 1,
7769 nigg4h: 1,
7770 nigga: 1,
7771 niggah: 1,
7772 niggas: 1,
7773 niggaz: 1,
7774 nigger: 1,
7775 niggers: 1,
7776 nob: 1,
7777 "nob jokey": 1,
7778 nobhead: 1,
7779 nobjocky: 1,
7780 nobjokey: 1,
7781 numbnuts: 1,
7782 nutsack: 1,
7783 orgasim: 1,
7784 orgasims: 1,
7785 orgasm: 1,
7786 orgasms: 1,
7787 p0rn: 1,
7788 pawn: 1,
7789 pecker: 1,
7790 penis: 1,
7791 penisfucker: 1,
7792 phonesex: 1,
7793 phuck: 1,
7794 phuk: 1,
7795 phuked: 1,
7796 phuking: 1,
7797 phukked: 1,
7798 phukking: 1,
7799 phuks: 1,
7800 phuq: 1,
7801 pigfucker: 1,
7802 pimpis: 1,
7803 piss: 1,
7804 pissed: 1,
7805 pisser: 1,
7806 pissers: 1,
7807 pisses: 1,
7808 pissflaps: 1,
7809 pissin: 1,
7810 pissing: 1,
7811 pissoff: 1,
7812 poop: 1,
7813 porn: 1,
7814 porno: 1,
7815 pornography: 1,
7816 pornos: 1,
7817 prick: 1,
7818 pricks: 1,
7819 pron: 1,
7820 pube: 1,
7821 pusse: 1,
7822 pussi: 1,
7823 pussies: 1,
7824 pussy: 1,
7825 pussys: 1,
7826 rectum: 1,
7827 retard: 1,
7828 rimjaw: 1,
7829 rimming: 1,
7830 "s hit": 1,
7831 "s.o.b.": 1,
7832 sadist: 1,
7833 schlong: 1,
7834 screwing: 1,
7835 scroat: 1,
7836 scrote: 1,
7837 scrotum: 1,
7838 semen: 1,
7839 sex: 1,
7840 "sh!+": 1,
7841 "sh!t": 1,
7842 sh1t: 1,
7843 shag: 1,
7844 shagger: 1,
7845 shaggin: 1,
7846 shagging: 1,
7847 shemale: 1,
7848 "shi+": 1,
7849 shit: 1,
7850 shitdick: 1,
7851 shite: 1,
7852 shited: 1,
7853 shitey: 1,
7854 shitfuck: 1,
7855 shitfull: 1,
7856 shithead: 1,
7857 shiting: 1,
7858 shitings: 1,
7859 shits: 1,
7860 shitted: 1,
7861 shitter: 1,
7862 shitters: 1,
7863 shitting: 1,
7864 shittings: 1,
7865 shitty: 1,
7866 skank: 1,
7867 slut: 1,
7868 sluts: 1,
7869 smegma: 1,
7870 smut: 1,
7871 snatch: 1,
7872 "son-of-a-bitch": 1,
7873 spac: 1,
7874 spunk: 1,
7875 s_h_i_t: 1,
7876 t1tt1e5: 1,
7877 t1tties: 1,
7878 teets: 1,
7879 teez: 1,
7880 testical: 1,
7881 testicle: 1,
7882 tit: 1,
7883 titfuck: 1,
7884 tits: 1,
7885 titt: 1,
7886 tittie5: 1,
7887 tittiefucker: 1,
7888 titties: 1,
7889 tittyfuck: 1,
7890 tittywank: 1,
7891 titwank: 1,
7892 tosser: 1,
7893 turd: 1,
7894 tw4t: 1,
7895 twat: 1,
7896 twathead: 1,
7897 twatty: 1,
7898 twunt: 1,
7899 twunter: 1,
7900 v14gra: 1,
7901 v1gra: 1,
7902 vagina: 1,
7903 viagra: 1,
7904 vulva: 1,
7905 w00se: 1,
7906 wang: 1,
7907 wank: 1,
7908 wanker: 1,
7909 wanky: 1,
7910 whoar: 1,
7911 whore: 1,
7912 willies: 1,
7913 willy: 1,
7914 xrated: 1,
7915 xxx: 1
7916 }
7917}, function(e, t) {
7918 e.exports = ["4r5e", "5h1t", "5hit", "a55", "anal", "anus", "ar5e", "arrse",
7919 "arse", "ass", "ass-fucker", "asses", "assfucker", "assfukka", "asshole",
7920 "assholes", "asswhole", "a_s_s", "b!tch", "b00bs", "b17ch", "b1tch",
7921 "ballbag", "balls", "ballsack", "bastard", "beastial", "beastiality",
7922 "bellend", "bestial", "bestiality", "bi+ch", "biatch", "bitch", "bitcher",
7923 "bitchers", "bitches", "bitchin", "bitching", "bloody", "blow job",
7924 "blowjob", "blowjobs", "boiolas", "bollock", "bollok", "boner", "boob",
7925 "boobs", "booobs", "boooobs", "booooobs", "booooooobs", "breasts",
7926 "buceta", "bugger", "bum", "bunny fucker", "butt", "butthole", "buttmuch",
7927 "buttplug", "c0ck", "c0cksucker", "carpet muncher", "cawk", "chink",
7928 "cipa", "cl1t", "clit", "clitoris", "clits", "cnut", "cock", "cock-sucker",
7929 "cockface", "cockhead", "cockmunch", "cockmuncher", "cocks", "cocksuck",
7930 "cocksucked", "cocksucker", "cocksucking", "cocksucks", "cocksuka",
7931 "cocksukka", "cok", "cokmuncher", "coksucka", "coon", "cox", "crap", "cum",
7932 "cummer", "cumming", "cums", "cumshot", "cunilingus", "cunillingus",
7933 "cunnilingus", "cunt", "cuntlick", "cuntlicker", "cuntlicking", "cunts",
7934 "cyalis", "cyberfuc", "cyberfuck", "cyberfucked", "cyberfucker",
7935 "cyberfuckers", "cyberfucking", "d1ck", "damn", "dick", "dickhead",
7936 "dildo", "dildos", "dink", "dinks", "dirsa", "dlck", "dog-fucker",
7937 "doggin", "dogging", "donkeyribber", "doosh", "duche", "dyke", "ejaculate",
7938 "ejaculated", "ejaculates", "ejaculating", "ejaculatings", "ejaculation",
7939 "ejakulate", "f u c k", "f u c k e r", "f4nny", "fag", "fagging",
7940 "faggitt", "faggot", "faggs", "fagot", "fagots", "fags", "fanny",
7941 "fannyflaps", "fannyfucker", "fanyy", "fatass", "fcuk", "fcuker",
7942 "fcuking", "feck", "fecker", "felching", "fellate", "fellatio",
7943 "fingerfuck", "fingerfucked", "fingerfucker", "fingerfuckers",
7944 "fingerfucking", "fingerfucks", "fistfuck", "fistfucked", "fistfucker",
7945 "fistfuckers", "fistfucking", "fistfuckings", "fistfucks", "flange",
7946 "fook", "fooker", "fuck", "fucka", "fucked", "fucker", "fuckers",
7947 "fuckhead", "fuckheads", "fuckin", "fucking", "fuckings",
7948 "fuckingshitmotherfucker", "fuckme", "fucks", "fuckwhit", "fuckwit",
7949 "fudge packer", "fudgepacker", "fuk", "fuker", "fukker", "fukkin", "fuks",
7950 "fukwhit", "fukwit", "fux", "fux0r", "f_u_c_k", "gangbang", "gangbanged",
7951 "gangbangs", "gaylord", "gaysex", "goatse", "God", "god-dam", "god-damned",
7952 "goddamn", "goddamned", "hardcoresex", "hell", "heshe", "hoar", "hoare",
7953 "hoer", "homo", "hore", "horniest", "horny", "hotsex", "jack-off",
7954 "jackoff", "jap", "jerk-off", "jism", "jiz", "jizm", "jizz", "kawk",
7955 "knob", "knobead", "knobed", "knobend", "knobhead", "knobjocky",
7956 "knobjokey", "kock", "kondum", "kondums", "kum", "kummer", "kumming",
7957 "kums", "kunilingus", "l3i+ch", "l3itch", "labia", "lust", "lusting",
7958 "m0f0", "m0fo", "m45terbate", "ma5terb8", "ma5terbate", "masochist",
7959 "master-bate", "masterb8", "masterbat*", "masterbat3", "masterbate",
7960 "masterbation", "masterbations", "masturbate", "mo-fo", "mof0", "mofo",
7961 "mothafuck", "mothafucka", "mothafuckas", "mothafuckaz", "mothafucked",
7962 "mothafucker", "mothafuckers", "mothafuckin", "mothafucking",
7963 "mothafuckings", "mothafucks", "mother fucker", "motherfuck",
7964 "motherfucked", "motherfucker", "motherfuckers", "motherfuckin",
7965 "motherfucking", "motherfuckings", "motherfuckka", "motherfucks", "muff",
7966 "mutha", "muthafecker", "muthafuckker", "muther", "mutherfucker", "n1gga",
7967 "n1gger", "nazi", "nigg3r", "nigg4h", "nigga", "niggah", "niggas",
7968 "niggaz", "nigger", "niggers", "nob", "nob jokey", "nobhead", "nobjocky",
7969 "nobjokey", "numbnuts", "nutsack", "orgasim", "orgasims", "orgasm",
7970 "orgasms", "p0rn", "pawn", "pecker", "penis", "penisfucker", "phonesex",
7971 "phuck", "phuk", "phuked", "phuking", "phukked", "phukking", "phuks",
7972 "phuq", "pigfucker", "pimpis", "piss", "pissed", "pisser", "pissers",
7973 "pisses", "pissflaps", "pissin", "pissing", "pissoff", "poop", "porn",
7974 "porno", "pornography", "pornos", "prick", "pricks", "pron", "pube",
7975 "pusse", "pussi", "pussies", "pussy", "pussys", "rectum", "retard",
7976 "rimjaw", "rimming", "s hit", "s.o.b.", "sadist", "schlong", "screwing",
7977 "scroat", "scrote", "scrotum", "semen", "sex", "sh!+", "sh!t", "sh1t",
7978 "shag", "shagger", "shaggin", "shagging", "shemale", "shi+", "shit",
7979 "shitdick", "shite", "shited", "shitey", "shitfuck", "shitfull",
7980 "shithead", "shiting", "shitings", "shits", "shitted", "shitter",
7981 "shitters", "shitting", "shittings", "shitty", "skank", "slut", "sluts",
7982 "smegma", "smut", "snatch", "son-of-a-bitch", "spac", "spunk", "s_h_i_t",
7983 "t1tt1e5", "t1tties", "teets", "teez", "testical", "testicle", "tit",
7984 "titfuck", "tits", "titt", "tittie5", "tittiefucker", "titties",
7985 "tittyfuck", "tittywank", "titwank", "tosser", "turd", "tw4t", "twat",
7986 "twathead", "twatty", "twunt", "twunter", "v14gra", "v1gra", "vagina",
7987 "viagra", "vulva", "w00se", "wang", "wank", "wanker", "wanky", "whoar",
7988 "whore", "willies", "willy", "xrated", "xxx"
7989 ]
7990}, function(e, t) {
7991 e.exports =
7992 /\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
7993}, function(e, t) {
7994 e.exports.hats = [{
7995 id: 45,
7996 name: "Shame!",
7997 dontSell: !0,
7998 price: 0,
7999 scale: 120,
8000 desc: "hacks are for losers"
8001 }, {
8002 id: 51,
8003 name: "Moo Cap",
8004 price: 0,
8005 scale: 120,
8006 desc: "coolest mooer around"
8007 }, {
8008 id: 50,
8009 name: "Apple Cap",
8010 price: 0,
8011 scale: 120,
8012 desc: "apple farms remembers"
8013 }, {
8014 id: 28,
8015 name: "Moo Head",
8016 price: 0,
8017 scale: 120,
8018 desc: "no effect"
8019 }, {
8020 id: 29,
8021 name: "Pig Head",
8022 price: 0,
8023 scale: 120,
8024 desc: "no effect"
8025 }, {
8026 id: 30,
8027 name: "Fluff Head",
8028 price: 0,
8029 scale: 120,
8030 desc: "no effect"
8031 }, {
8032 id: 36,
8033 name: "Pandou Head",
8034 price: 0,
8035 scale: 120,
8036 desc: "no effect"
8037 }, {
8038 id: 37,
8039 name: "Bear Head",
8040 price: 0,
8041 scale: 120,
8042 desc: "no effect"
8043 }, {
8044 id: 38,
8045 name: "Monkey Head",
8046 price: 0,
8047 scale: 120,
8048 desc: "no effect"
8049 }, {
8050 id: 44,
8051 name: "Polar Head",
8052 price: 0,
8053 scale: 120,
8054 desc: "no effect"
8055 }, {
8056 id: 35,
8057 name: "Fez Hat",
8058 price: 0,
8059 scale: 120,
8060 desc: "no effect"
8061 }, {
8062 id: 42,
8063 name: "Enigma Hat",
8064 price: 0,
8065 scale: 120,
8066 desc: "join the enigma army"
8067 }, {
8068 id: 43,
8069 name: "Blitz Hat",
8070 price: 0,
8071 scale: 120,
8072 desc: "hey everybody i'm blitz"
8073 }, {
8074 id: 49,
8075 name: "Bob XIII Hat",
8076 price: 0,
8077 scale: 120,
8078 desc: "like and subscribe"
8079 }, {
8080 id: 57,
8081 name: "Pumpkin",
8082 price: 50,
8083 scale: 120,
8084 desc: "Spooooky"
8085 }, {
8086 id: 8,
8087 name: "Bummle Hat",
8088 price: 100,
8089 scale: 120,
8090 desc: "no effect"
8091 }, {
8092 id: 2,
8093 name: "Straw Hat",
8094 price: 500,
8095 scale: 120,
8096 desc: "no effect"
8097 }, {
8098 id: 15,
8099 name: "Winter Cap",
8100 price: 600,
8101 scale: 120,
8102 desc: "allows you to move at normal speed in snow",
8103 coldM: 1
8104 }, {
8105 id: 5,
8106 name: "Cowboy Hat",
8107 price: 1e3,
8108 scale: 120,
8109 desc: "no effect"
8110 }, {
8111 id: 4,
8112 name: "Ranger Hat",
8113 price: 2e3,
8114 scale: 120,
8115 desc: "no effect"
8116 }, {
8117 id: 18,
8118 name: "Explorer Hat",
8119 price: 2e3,
8120 scale: 120,
8121 desc: "no effect"
8122 }, {
8123 id: 31,
8124 name: "Flipper Hat",
8125 price: 2500,
8126 scale: 120,
8127 desc: "have more control while in water",
8128 watrImm: !0
8129 }, {
8130 id: 1,
8131 name: "Marksman Cap",
8132 price: 3e3,
8133 scale: 120,
8134 desc: "increases arrow speed and range",
8135 aMlt: 1.3
8136 }, {
8137 id: 10,
8138 name: "Bush Gear",
8139 price: 3e3,
8140 scale: 160,
8141 desc: "allows you to disguise yourself as a bush"
8142 }, {
8143 id: 48,
8144 name: "Halo",
8145 price: 3e3,
8146 scale: 120,
8147 desc: "no effect"
8148 }, {
8149 id: 6,
8150 name: "Soldier Helmet",
8151 price: 4e3,
8152 scale: 120,
8153 desc: "reduces damage taken but slows movement",
8154 spdMult: .94,
8155 dmgMult: .75
8156 }, {
8157 id: 23,
8158 name: "Anti Venom Gear",
8159 price: 4e3,
8160 scale: 120,
8161 desc: "makes you immune to poison",
8162 poisonRes: 1
8163 }, {
8164 id: 13,
8165 name: "Medic Gear",
8166 price: 5e3,
8167 scale: 110,
8168 desc: "slowly regenerates health over time",
8169 healthRegen: 3
8170 }, {
8171 id: 9,
8172 name: "Miners Helmet",
8173 price: 5e3,
8174 scale: 120,
8175 desc: "earn 1 extra gold per resource",
8176 extraGold: 1
8177 }, {
8178 id: 32,
8179 name: "Musketeer Hat",
8180 price: 5e3,
8181 scale: 120,
8182 desc: "reduces cost of projectiles",
8183 projCost: .5
8184 }, {
8185 id: 7,
8186 name: "Bull Helmet",
8187 price: 6e3,
8188 scale: 120,
8189 desc: "increases damage done but drains health",
8190 healthRegen: -5,
8191 dmgMultO: 1.5,
8192 spdMult: .96
8193 }, {
8194 id: 22,
8195 name: "Emp Helmet",
8196 price: 6e3,
8197 scale: 120,
8198 desc: "turrets won't attack but you move slower",
8199 antiTurret: 1,
8200 spdMult: .7
8201 }, {
8202 id: 12,
8203 name: "Booster Hat",
8204 price: 6e3,
8205 scale: 120,
8206 desc: "increases your movement speed",
8207 spdMult: 1.16
8208 }, {
8209 id: 26,
8210 name: "Barbarian Armor",
8211 price: 8e3,
8212 scale: 120,
8213 desc: "knocks back enemies that attack you",
8214 dmgK: .6
8215 }, {
8216 id: 21,
8217 name: "Plague Mask",
8218 price: 1e4,
8219 scale: 120,
8220 desc: "melee attacks deal poison damage",
8221 poisonDmg: 5,
8222 poisonTime: 6
8223 }, {
8224 id: 46,
8225 name: "Bull Mask",
8226 price: 1e4,
8227 scale: 120,
8228 desc: "bulls won't target you unless you attack them",
8229 bullRepel: 1
8230 }, {
8231 id: 14,
8232 name: "Windmill Hat",
8233 topSprite: !0,
8234 price: 1e4,
8235 scale: 120,
8236 desc: "generates points while worn",
8237 pps: 1.5
8238 }, {
8239 id: 11,
8240 name: "Spike Gear",
8241 topSprite: !0,
8242 price: 1e4,
8243 scale: 120,
8244 desc: "deal damage to players that damage you",
8245 dmg: .45
8246 }, {
8247 id: 53,
8248 name: "Turret Gear",
8249 topSprite: !0,
8250 price: 1e4,
8251 scale: 120,
8252 desc: "you become a walking turret",
8253 turret: {
8254 proj: 1,
8255 range: 700,
8256 rate: 2500
8257 },
8258 spdMult: .7
8259 }, {
8260 id: 20,
8261 name: "Samurai Armor",
8262 price: 12e3,
8263 scale: 120,
8264 desc: "increased attack speed and fire rate",
8265 atkSpd: .78
8266 }, {
8267 id: 58,
8268 name: "Dark Knight",
8269 price: 12e3,
8270 scale: 120,
8271 desc: "restores health when you deal damage",
8272 healD: .4
8273 }, {
8274 id: 27,
8275 name: "Scavenger Gear",
8276 price: 15e3,
8277 scale: 120,
8278 desc: "earn double points for each kill",
8279 kScrM: 2
8280 }, {
8281 id: 40,
8282 name: "Tank Gear",
8283 price: 15e3,
8284 scale: 120,
8285 desc: "increased damage to buildings but slower movement",
8286 spdMult: .3,
8287 bDmg: 3.3
8288 }, {
8289 id: 52,
8290 name: "Thief Gear",
8291 price: 15e3,
8292 scale: 120,
8293 desc: "steal half of a players gold when you kill them",
8294 goldSteal: .5
8295 }, {
8296 id: 55,
8297 name: "Bloodthirster",
8298 price: 2e4,
8299 scale: 120,
8300 desc: "Restore Health when dealing damage. And increased damage",
8301 healD: .25,
8302 dmgMultO: 1.2
8303 }, {
8304 id: 56,
8305 name: "Assassin Gear",
8306 price: 2e4,
8307 scale: 120,
8308 desc: "Go invisible when not moving. Can't eat. Increased speed",
8309 noEat: !0,
8310 spdMult: 1.1,
8311 invisTimer: 1e3
8312 }], e.exports.accessories = [{
8313 id: 12,
8314 name: "Snowball",
8315 price: 1e3,
8316 scale: 105,
8317 xOff: 18,
8318 desc: "no effect"
8319 }, {
8320 id: 9,
8321 name: "Tree Cape",
8322 price: 1e3,
8323 scale: 90,
8324 desc: "no effect"
8325 }, {
8326 id: 10,
8327 name: "Stone Cape",
8328 price: 1e3,
8329 scale: 90,
8330 desc: "no effect"
8331 }, {
8332 id: 3,
8333 name: "Cookie Cape",
8334 price: 1500,
8335 scale: 90,
8336 desc: "no effect"
8337 }, {
8338 id: 8,
8339 name: "Cow Cape",
8340 price: 2e3,
8341 scale: 90,
8342 desc: "no effect"
8343 }, {
8344 id: 11,
8345 name: "Monkey Tail",
8346 price: 2e3,
8347 scale: 97,
8348 xOff: 25,
8349 desc: "Super speed but reduced damage",
8350 spdMult: 1.35,
8351 dmgMultO: .2
8352 }, {
8353 id: 17,
8354 name: "Apple Basket",
8355 price: 3e3,
8356 scale: 80,
8357 xOff: 12,
8358 desc: "slowly regenerates health over time",
8359 healthRegen: 1
8360 }, {
8361 id: 6,
8362 name: "Winter Cape",
8363 price: 3e3,
8364 scale: 90,
8365 desc: "no effect"
8366 }, {
8367 id: 4,
8368 name: "Skull Cape",
8369 price: 4e3,
8370 scale: 90,
8371 desc: "no effect"
8372 }, {
8373 id: 5,
8374 name: "Dash Cape",
8375 price: 5e3,
8376 scale: 90,
8377 desc: "no effect"
8378 }, {
8379 id: 2,
8380 name: "Dragon Cape",
8381 price: 6e3,
8382 scale: 90,
8383 desc: "no effect"
8384 }, {
8385 id: 1,
8386 name: "Super Cape",
8387 price: 8e3,
8388 scale: 90,
8389 desc: "no effect"
8390 }, {
8391 id: 7,
8392 name: "Troll Cape",
8393 price: 8e3,
8394 scale: 90,
8395 desc: "no effect"
8396 }, {
8397 id: 14,
8398 name: "Thorns",
8399 price: 1e4,
8400 scale: 115,
8401 xOff: 20,
8402 desc: "no effect"
8403 }, {
8404 id: 15,
8405 name: "Blockades",
8406 price: 1e4,
8407 scale: 95,
8408 xOff: 15,
8409 desc: "no effect"
8410 }, {
8411 id: 20,
8412 name: "Devils Tail",
8413 price: 1e4,
8414 scale: 95,
8415 xOff: 20,
8416 desc: "no effect"
8417 }, {
8418 id: 16,
8419 name: "Sawblade",
8420 price: 12e3,
8421 scale: 90,
8422 spin: !0,
8423 xOff: 0,
8424 desc: "deal damage to players that damage you",
8425 dmg: .15
8426 }, {
8427 id: 13,
8428 name: "Angel Wings",
8429 price: 15e3,
8430 scale: 138,
8431 xOff: 22,
8432 desc: "slowly regenerates health over time",
8433 healthRegen: 3
8434 }, {
8435 id: 19,
8436 name: "Shadow Wings",
8437 price: 15e3,
8438 scale: 138,
8439 xOff: 22,
8440 desc: "increased movement speed",
8441 spdMult: 1.1
8442 }, {
8443 id: 18,
8444 name: "Blood Wings",
8445 price: 2e4,
8446 scale: 178,
8447 xOff: 26,
8448 desc: "restores health when you deal damage",
8449 healD: .2
8450 }, {
8451 id: 21,
8452 name: "Corrupt X Wings",
8453 price: 2e4,
8454 scale: 178,
8455 xOff: 26,
8456 desc: "deal damage to players that damage you",
8457 dmg: .25
8458 }]
8459}, function(e, t) {
8460 e.exports = function(e, t, n, i, r, s, a) {
8461 this.init = function(e, t, n, i, r, s, o, c, l) {
8462 this.active = !0, this.indx = e, this.x = t, this.y = n, this.dir = i,
8463 this.skipMov = !0, this.speed = r, this.dmg = s, this.scale = c, this.range =
8464 o, this.owner = l, a && (this.sentTo = {})
8465 };
8466 var o, c = [];
8467 this.update = function(l) {
8468 if (this.active) {
8469 var h, u = this.speed * l;
8470 if (this.skipMov ? this.skipMov = !1 : (this.x += u * Math.cos(this.dir),
8471 this.y += u * Math.sin(this.dir), this.range -= u, this.range <= 0 &&
8472 (this.x += this.range * Math.cos(this.dir), this.y += this.range *
8473 Math.sin(this.dir), u = 1, this.range = 0, this.active = !1)), a) {
8474 for (var f = 0; f < e.length; ++f) !this.sentTo[e[f].id] && e[f].canSee(
8475 this) && (this.sentTo[e[f].id] = 1, a.send(e[f].id, "18", s.fixTo(
8476 this.x, 1), s.fixTo(this.y, 1), s.fixTo(this.dir, 2), s.fixTo(this
8477 .range, 1), this.speed, this.indx, this.layer, this.sid));
8478 for (c.length = 0, f = 0; f < e.length + t.length; ++f) !(o = e[f] ||
8479 t[f - e.length]).alive || o == this.owner || this.owner.team && o.team ==
8480 this.owner.team || s.lineInRect(o.x - o.scale, o.y - o.scale, o.x + o
8481 .scale, o.y + o.scale, this.x, this.y, this.x + u * Math.cos(this.dir),
8482 this.y + u * Math.sin(this.dir)) && c.push(o);
8483 for (var d = n.getGridArrays(this.x, this.y, this.scale), p = 0; p < d
8484 .length; ++p)
8485 for (var g = 0; g < d[p].length; ++g) h = (o = d[p][g]).getScale(), o
8486 .active && this.ignoreObj != o.sid && this.layer <= o.layer && c.indexOf(
8487 o) < 0 && !o.ignoreCollision && s.lineInRect(o.x - h, o.y - h, o.x +
8488 h, o.y + h, this.x, this.y, this.x + u * Math.cos(this.dir), this.y +
8489 u * Math.sin(this.dir)) && c.push(o);
8490 if (c.length > 0) {
8491 var m = null,
8492 y = null,
8493 k = null;
8494 for (f = 0; f < c.length; ++f) k = s.getDistance(this.x, this.y, c[f]
8495 .x, c[f].y), (null == y || k < y) && (y = k, m = c[f]);
8496 if (m.isPlayer || m.isAI) {
8497 var v = .3 * (m.weightM || 1);
8498 m.xVel += v * Math.cos(this.dir), m.yVel += v * Math.sin(this.dir),
8499 null != m.weaponIndex && i.weapons[m.weaponIndex].shield && s.getAngleDist(
8500 this.dir + Math.PI, m.dir) <= r.shieldAngle || m.changeHealth(-
8501 this.dmg, this.owner, this.owner)
8502 } else
8503 for (m.projDmg && m.health && m.changeHealth(-this.dmg) && n.disableObj(
8504 m), f = 0; f < e.length; ++f) e[f].active && (m.sentTo[e[f].id] &&
8505 (m.active ? e[f].canSee(m) && a.send(e[f].id, "8", s.fixTo(this.dir,
8506 2), m.sid) : a.send(e[f].id, "12", m.sid)), m.active || m.owner !=
8507 e[f] || e[f].changeItemCount(m.group.id, -1));
8508 for (this.active = !1, f = 0; f < e.length; ++f) this.sentTo[e[f].id] &&
8509 a.send(e[f].id, "19", this.sid, s.fixTo(y, 1))
8510 }
8511 }
8512 }
8513 }
8514 }
8515}, function(e, t) {
8516 e.exports = function(e, t, n, i, r, s, a, o, c) {
8517 this.addProjectile = function(l, h, u, f, d, p, g, m, y) {
8518 for (var k, v = s.projectiles[p], w = 0; w < t.length; ++w)
8519 if (!t[w].active) {
8520 k = t[w];
8521 break
8522 }
8523 return k || ((k = new e(n, i, r, s, a, o, c)).sid = t.length, t.push(k)),
8524 k.init(p, l, h, u, d, v.dmg, f, v.scale, g), k.ignoreObj = m, k.layer =
8525 y || v.layer, k.src = v.src, k
8526 }
8527 }
8528}, function(e, t) {
8529 e.exports.obj = function(e, t) {
8530 var n;
8531 this.sounds = [], this.active = !0, this.play = function(t, i, r) {
8532 i && this.active && ((n = this.sounds[t]) || (n = new Howl({
8533 src: ".././sound/" + t + ".mp3"
8534 }), this.sounds[t] = n), r && n.isPlaying || (n.isPlaying = !0, n.play(),
8535 n.volume((i || 1) * e.volumeMult), n.loop(r)))
8536 }, this.toggleMute = function(e, t) {
8537 (n = this.sounds[e]) && n.mute(t)
8538 }, this.stop = function(e) {
8539 (n = this.sounds[e]) && (n.stop(), n.isPlaying = !1)
8540 }
8541 }
8542}, function(e, t, n) {
8543 var i = n(60),
8544 r = n(67);
8545
8546 function s(e, t, n, i, r) {
8547 "localhost" == location.hostname && (window.location.hostname = "127.0.0.1"),
8548 this.debugLog = !1, this.baseUrl = e, this.lobbySize = n, this.devPort = t,
8549 this.lobbySpread = i, this.rawIPs = !!r, this.server = void 0, this.gameIndex =
8550 void 0, this.callback = void 0, this.errorCallback = void 0, this.processServers(
8551 vultr.servers)
8552 }
8553 s.prototype.regionInfo = {
8554 0: {
8555 name: "Local",
8556 latitude: 0,
8557 longitude: 0
8558 },
8559 "vultr:1": {
8560 name: "New Jersey",
8561 latitude: 40.1393329,
8562 longitude: -75.8521818
8563 },
8564 "vultr:2": {
8565 name: "Chicago",
8566 latitude: 41.8339037,
8567 longitude: -87.872238
8568 },
8569 "vultr:3": {
8570 name: "Dallas",
8571 latitude: 32.8208751,
8572 longitude: -96.8714229
8573 },
8574 "vultr:4": {
8575 name: "Seattle",
8576 latitude: 47.6149942,
8577 longitude: -122.4759879
8578 },
8579 "vultr:5": {
8580 name: "Los Angeles",
8581 latitude: 34.0207504,
8582 longitude: -118.691914
8583 },
8584 "vultr:6": {
8585 name: "Atlanta",
8586 latitude: 33.7676334,
8587 longitude: -84.5610332
8588 },
8589 "vultr:7": {
8590 name: "Amsterdam",
8591 latitude: 52.3745287,
8592 longitude: 4.7581878
8593 },
8594 "vultr:8": {
8595 name: "London",
8596 latitude: 51.5283063,
8597 longitude: -.382486
8598 },
8599 "vultr:9": {
8600 name: "Frankfurt",
8601 latitude: 50.1211273,
8602 longitude: 8.496137
8603 },
8604 "vultr:12": {
8605 name: "Silicon Valley",
8606 latitude: 37.4024714,
8607 longitude: -122.3219752
8608 },
8609 "vultr:19": {
8610 name: "Sydney",
8611 latitude: -33.8479715,
8612 longitude: 150.651084
8613 },
8614 "vultr:24": {
8615 name: "Paris",
8616 latitude: 48.8588376,
8617 longitude: 2.2773454
8618 },
8619 "vultr:25": {
8620 name: "Tokyo",
8621 latitude: 35.6732615,
8622 longitude: 139.569959
8623 },
8624 "vultr:39": {
8625 name: "Miami",
8626 latitude: 25.7823071,
8627 longitude: -80.3012156
8628 },
8629 "vultr:40": {
8630 name: "Singapore",
8631 latitude: 1.3147268,
8632 longitude: 103.7065876
8633 }
8634 }, s.prototype.start = function(e, t) {
8635 this.callback = e, this.errorCallback = t;
8636 var n = this.parseServerQuery();
8637 n ? (this.log("Found server in query."), this.password = n[3], this.connect(
8638 n[0], n[1], n[2])) : (this.log("Pinging servers..."), this.pingServers())
8639 }, s.prototype.parseServerQuery = function() {
8640 var e = i.parse(location.href, !0),
8641 t = e.query.server;
8642 if ("string" == typeof t) {
8643 var n = t.split(":");
8644 if (3 == n.length) {
8645 var r = n[0],
8646 s = parseInt(n[1]),
8647 a = parseInt(n[2]);
8648 return "0" == r || r.startsWith("vultr:") || (r = "vultr:" + r), [r, s,
8649 a, e.query.password
8650 ]
8651 }
8652 this.errorCallback("Invalid number of server parameters in " + t)
8653 }
8654 }, s.prototype.findServer = function(e, t) {
8655 var n = this.servers[e];
8656 if (Array.isArray(n)) {
8657 for (var i = 0; i < n.length; i++) {
8658 var r = n[i];
8659 if (r.index == t) return r
8660 }
8661 console.warn("Could not find server in region " + e + " with index " + t +
8662 ".")
8663 } else this.errorCallback("No server list for region " + e)
8664 }, s.prototype.pingServers = function() {
8665 var e = this,
8666 t = [];
8667 for (var n in this.servers)
8668 if (this.servers.hasOwnProperty(n)) {
8669 var i = this.servers[n],
8670 r = i[Math.floor(Math.random() * i.length)];
8671 null != r ? function(i, r) {
8672 var s = new XMLHttpRequest;
8673 s.onreadystatechange = function(i) {
8674 var s = i.target;
8675 if (4 == s.readyState)
8676 if (200 == s.status) {
8677 for (var a = 0; a < t.length; a++) t[a].abort();
8678 e.log("Connecting to region", r.region);
8679 var o = e.seekServer(r.region);
8680 e.connect(o[0], o[1], o[2])
8681 } else console.warn("Error pinging " + r.ip + " in region " + n)
8682 };
8683 var a = "//" + e.serverAddress(r.ip, !0) + ":" + e.serverPort(r) +
8684 "/ping";
8685 s.open("GET", a, !0), s.send(null), e.log("Pinging", a), t.push(s)
8686 }(0, r) : console.log("No target server for region " + n)
8687 }
8688 }, s.prototype.seekServer = function(e, t, n) {
8689 null == n && (n = "random"), null == t && (t = !1);
8690 const i = ["random"];
8691 var r = this.lobbySize,
8692 s = this.lobbySpread,
8693 a = this.servers[e].flatMap((function(e) {
8694 var t = 0;
8695 return e.games.map((function(n) {
8696 var i = t++;
8697 return {
8698 region: e.region,
8699 index: e.index * e.games.length + i,
8700 gameIndex: i,
8701 gameCount: e.games.length,
8702 playerCount: n.playerCount,
8703 isPrivate: n.isPrivate
8704 }
8705 }))
8706 })).filter((function(e) {
8707 return !e.isPrivate
8708 })).filter((function(e) {
8709 return !t || 0 == e.playerCount && e.gameIndex >= e.gameCount / 2
8710 })).filter((function(e) {
8711 return "random" == n || i[e.index % i.length].key == n
8712 })).sort((function(e, t) {
8713 return t.playerCount - e.playerCount
8714 })).filter((function(e) {
8715 return e.playerCount < r
8716 }));
8717 if (t && a.reverse(), 0 != a.length) {
8718 var o = Math.min(s, a.length),
8719 c = Math.floor(Math.random() * o),
8720 l = a[c = Math.min(c, a.length - 1)],
8721 h = l.region,
8722 u = (c = Math.floor(l.index / l.gameCount), l.index % l.gameCount);
8723 return this.log("Found server."), [h, c, u]
8724 }
8725 this.errorCallback("No open servers.")
8726 }, s.prototype.connect = function(e, t, n) {
8727 if (!this.connected) {
8728 var i = this.findServer(e, t);
8729 null != i ? (this.log("Connecting to server", i, "with game index", n), i
8730 .games[n].playerCount >= this.lobbySize ? this.errorCallback(
8731 "Server is already full.") : (window.history.replaceState(document.title,
8732 document.title, this.generateHref(e, t, n, this.password)), this.server =
8733 i, this.gameIndex = n, this.log("Calling callback with address", this.serverAddress(
8734 i.ip), "on port", this.serverPort(i), "with game index", n), this.callback(
8735 this.serverAddress(i.ip), this.serverPort(i), n))) : this.errorCallback(
8736 "Failed to find server for region " + e + " and index " + t)
8737 }
8738 }, s.prototype.switchServer = function(e, t, n, i) {
8739 this.switchingServers = !0, window.location.href = this.generateHref(e, t,
8740 n, i)
8741 }, s.prototype.generateHref = function(e, t, n, i) {
8742 var r = "/?server=" + (e = this.stripRegion(e)) + ":" + t + ":" + n;
8743 return i && (r += "&password=" + encodeURIComponent(i)), r
8744 }, s.prototype.serverAddress = function(e, t) {
8745 return "127.0.0.1" == e || "7f000001" == e ||
8746 "903d62ef5d1c2fecdcaeb5e7dd485eff" == e ? window.location.hostname : this
8747 .rawIPs ? t ? "ip_" + this.hashIP(e) + "." + this.baseUrl : e : "ip_" + e +
8748 "." + this.baseUrl
8749 }, s.prototype.serverPort = function(e) {
8750 return 0 == e.region ? this.devPort : location.protocol.startsWith("https") ?
8751 443 : 80
8752 }, s.prototype.processServers = function(e) {
8753 for (var t = {}, n = 0; n < e.length; n++) {
8754 var i = e[n],
8755 r = t[i.region];
8756 null == r && (r = [], t[i.region] = r), r.push(i)
8757 }
8758 for (var s in t) t[s] = t[s].sort((function(e, t) {
8759 return e.index - t.index
8760 }));
8761 this.servers = t
8762 }, s.prototype.ipToHex = function(e) {
8763 return e.split(".").map(e => ("00" + parseInt(e).toString(16)).substr(-2))
8764 .join("").toLowerCase()
8765 }, s.prototype.hashIP = function(e) {
8766 return r(this.ipToHex(e))
8767 }, s.prototype.log = function() {
8768 return this.debugLog ? console.log.apply(void 0, arguments) : console.verbose ?
8769 console.verbose.apply(void 0, arguments) : void 0
8770 }, s.prototype.stripRegion = function(e) {
8771 return e.startsWith("vultr:") ? e = e.slice(6) : e.startsWith("do:") && (e =
8772 e.slice(3)), e
8773 }, window.testVultrClient = function() {
8774 var e = 1;
8775
8776 function t(t, n) {
8777 (t = "" + t) == (n = "" + n) ? console.log(`Assert ${e} passed.`):
8778 console.warn(`Assert ${e} failed. Expected ${n}, got ${t}.`), e++
8779 }
8780 var n = new s("test.io", -1, 5, 1, !1);
8781 n.errorCallback = function(e) {}, n.processServers(function(e) {
8782 var t = [];
8783 for (var n in e)
8784 for (var i = e[n], r = 0; r < i.length; r++) t.push({
8785 ip: n + ":" + r,
8786 scheme: "testing",
8787 region: n,
8788 index: r,
8789 games: i[r].map(e => ({
8790 playerCount: e,
8791 isPrivate: !1
8792 }))
8793 });
8794 return t
8795 }({
8796 1: [
8797 [0, 0, 0, 0],
8798 [0, 0, 0, 0]
8799 ],
8800 2: [
8801 [5, 1, 0, 0],
8802 [0, 0, 0, 0]
8803 ],
8804 3: [
8805 [5, 0, 1, 5],
8806 [0, 0, 0, 0]
8807 ],
8808 4: [
8809 [5, 1, 1, 5],
8810 [1, 0, 0, 0]
8811 ],
8812 5: [
8813 [5, 1, 1, 5],
8814 [1, 0, 4, 0]
8815 ],
8816 6: [
8817 [5, 5, 5, 5],
8818 [2, 3, 1, 4]
8819 ],
8820 7: [
8821 [5, 5, 5, 5],
8822 [5, 5, 5, 5]
8823 ]
8824 })), t(n.seekServer(1, !1), [1, 0, 0]), t(n.seekServer(1, !0), [1, 1, 3]),
8825 t(n.seekServer(2, !1), [2, 0, 1]), t(n.seekServer(2, !0), [2, 1, 3]), t(n
8826 .seekServer(3, !1), [3, 0, 2]), t(n.seekServer(3, !0), [3, 1, 3]), t(n.seekServer(
8827 4, !1), [4, 0, 1]), t(n.seekServer(4, !0), [4, 1, 3]), t(n.seekServer(5, !
8828 1), [5, 1, 2]), t(n.seekServer(5, !0), [5, 1, 3]), t(n.seekServer(6, !1), [
8829 6, 1, 3
8830 ]), t(n.seekServer(6, !0), void 0), t(n.seekServer(7, !1), void 0), t(n.seekServer(
8831 7, !0), void 0), console.log("Tests passed.")
8832 };
8833 var a = function(e, t) {
8834 return e.concat(t)
8835 };
8836 Array.prototype.flatMap = function(e) {
8837 return function(e, t) {
8838 return t.map(e).reduce(a, [])
8839 }(e, this)
8840 }, e.exports = s
8841}, function(e, t, n) {
8842 "use strict";
8843 var i = n(61),
8844 r = n(63);
8845
8846 function s() {
8847 this.protocol = null, this.slashes = null, this.auth = null, this.host =
8848 null, this.port = null, this.hostname = null, this.hash = null, this.search =
8849 null, this.query = null, this.pathname = null, this.path = null, this.href =
8850 null
8851 }
8852 t.parse = v, t.resolve = function(e, t) {
8853 return v(e, !1, !0).resolve(t)
8854 }, t.resolveObject = function(e, t) {
8855 return e ? v(e, !1, !0).resolveObject(t) : t
8856 }, t.format = function(e) {
8857 return r.isString(e) && (e = v(e)), e instanceof s ? e.format() : s.prototype
8858 .format.call(e)
8859 }, t.Url = s;
8860 var a = /^([a-z0-9.+-]+:)/i,
8861 o = /:[0-9]*$/,
8862 c = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
8863 l = ["{", "}", "|", "\\", "^", "`"].concat(["<", ">", '"', "`", " ", "\r",
8864 "\n", "\t"
8865 ]),
8866 h = ["'"].concat(l),
8867 u = ["%", "/", "?", ";", "#"].concat(h),
8868 f = ["/", "?", "#"],
8869 d = /^[+a-z0-9A-Z_-]{0,63}$/,
8870 p = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
8871 g = {
8872 javascript: !0,
8873 "javascript:": !0
8874 },
8875 m = {
8876 javascript: !0,
8877 "javascript:": !0
8878 },
8879 y = {
8880 http: !0,
8881 https: !0,
8882 ftp: !0,
8883 gopher: !0,
8884 file: !0,
8885 "http:": !0,
8886 "https:": !0,
8887 "ftp:": !0,
8888 "gopher:": !0,
8889 "file:": !0
8890 },
8891 k = n(64);
8892
8893 function v(e, t, n) {
8894 if (e && r.isObject(e) && e instanceof s) return e;
8895 var i = new s;
8896 return i.parse(e, t, n), i
8897 }
8898 s.prototype.parse = function(e, t, n) {
8899 if (!r.isString(e)) throw new TypeError(
8900 "Parameter 'url' must be a string, not " + typeof e);
8901 var s = e.indexOf("?"),
8902 o = -1 !== s && s < e.indexOf("#") ? "?" : "#",
8903 l = e.split(o);
8904 l[0] = l[0].replace(/\\/g, "/");
8905 var v = e = l.join(o);
8906 if (v = v.trim(), !n && 1 === e.split("#").length) {
8907 var w = c.exec(v);
8908 if (w) return this.path = v, this.href = v, this.pathname = w[1], w[2] ?
8909 (this.search = w[2], this.query = t ? k.parse(this.search.substr(1)) :
8910 this.search.substr(1)) : t && (this.search = "", this.query = {}),
8911 this
8912 }
8913 var b = a.exec(v);
8914 if (b) {
8915 var x = (b = b[0]).toLowerCase();
8916 this.protocol = x, v = v.substr(b.length)
8917 }
8918 if (n || b || v.match(/^\/\/[^@\/]+@[^@\/]+/)) {
8919 var S = "//" === v.substr(0, 2);
8920 !S || b && m[b] || (v = v.substr(2), this.slashes = !0)
8921 }
8922 if (!m[b] && (S || b && !y[b])) {
8923 for (var T, I, E = -1, M = 0; M < f.length; M++) - 1 !== (A = v.indexOf(f[
8924 M])) && (-1 === E || A < E) && (E = A);
8925 for (-1 !== (I = -1 === E ? v.lastIndexOf("@") : v.lastIndexOf("@", E)) &&
8926 (T = v.slice(0, I), v = v.slice(I + 1), this.auth = decodeURIComponent(T)),
8927 E = -1, M = 0; M < u.length; M++) {
8928 var A; - 1 !== (A = v.indexOf(u[M])) && (-1 === E || A < E) && (E = A)
8929 } - 1 === E && (E = v.length), this.host = v.slice(0, E), v = v.slice(E),
8930 this.parseHost(), this.hostname = this.hostname || "";
8931 var P = "[" === this.hostname[0] && "]" === this.hostname[this.hostname.length -
8932 1];
8933 if (!P)
8934 for (var B = this.hostname.split(/\./), C = (M = 0, B.length); M < C; M++) {
8935 var O = B[M];
8936 if (O && !O.match(d)) {
8937 for (var R = "", j = 0, _ = O.length; j < _; j++) O.charCodeAt(j) >
8938 127 ? R += "x" : R += O[j];
8939 if (!R.match(d)) {
8940 var U = B.slice(0, M),
8941 D = B.slice(M + 1),
8942 L = O.match(p);
8943 L && (U.push(L[1]), D.unshift(L[2])), D.length && (v = "/" + D.join(
8944 ".") + v), this.hostname = U.join(".");
8945 break
8946 }
8947 }
8948 }
8949 this.hostname.length > 255 ? this.hostname = "" : this.hostname = this.hostname
8950 .toLowerCase(), P || (this.hostname = i.toASCII(this.hostname));
8951 var F = this.port ? ":" + this.port : "",
8952 z = this.hostname || "";
8953 this.host = z + F, this.href += this.host, P && (this.hostname = this.hostname
8954 .substr(1, this.hostname.length - 2), "/" !== v[0] && (v = "/" + v))
8955 }
8956 if (!g[x])
8957 for (M = 0, C = h.length; M < C; M++) {
8958 var H = h[M];
8959 if (-1 !== v.indexOf(H)) {
8960 var V = encodeURIComponent(H);
8961 V === H && (V = escape(H)), v = v.split(H).join(V)
8962 }
8963 }
8964 var q = v.indexOf("#"); - 1 !== q && (this.hash = v.substr(q), v = v.slice(
8965 0, q));
8966 var Y = v.indexOf("?");
8967 if (-1 !== Y ? (this.search = v.substr(Y), this.query = v.substr(Y + 1), t &&
8968 (this.query = k.parse(this.query)), v = v.slice(0, Y)) : t && (this.search =
8969 "", this.query = {}), v && (this.pathname = v), y[x] && this.hostname &&
8970 !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
8971 F = this.pathname || "";
8972 var W = this.search || "";
8973 this.path = F + W
8974 }
8975 return this.href = this.format(), this
8976 }, s.prototype.format = function() {
8977 var e = this.auth || "";
8978 e && (e = (e = encodeURIComponent(e)).replace(/%3A/i, ":"), e += "@");
8979 var t = this.protocol || "",
8980 n = this.pathname || "",
8981 i = this.hash || "",
8982 s = !1,
8983 a = "";
8984 this.host ? s = e + this.host : this.hostname && (s = e + (-1 === this.hostname
8985 .indexOf(":") ? this.hostname : "[" + this.hostname + "]"), this.port &&
8986 (s += ":" + this.port)), this.query && r.isObject(this.query) && Object.keys(
8987 this.query).length && (a = k.stringify(this.query));
8988 var o = this.search || a && "?" + a || "";
8989 return t && ":" !== t.substr(-1) && (t += ":"), this.slashes || (!t || y[t]) &&
8990 !1 !== s ? (s = "//" + (s || ""), n && "/" !== n.charAt(0) && (n = "/" +
8991 n)) : s || (s = ""), i && "#" !== i.charAt(0) && (i = "#" + i), o && "?" !==
8992 o.charAt(0) && (o = "?" + o), t + s + (n = n.replace(/[?#]/g, (function(e) {
8993 return encodeURIComponent(e)
8994 }))) + (o = o.replace("#", "%23")) + i
8995 }, s.prototype.resolve = function(e) {
8996 return this.resolveObject(v(e, !1, !0)).format()
8997 }, s.prototype.resolveObject = function(e) {
8998 if (r.isString(e)) {
8999 var t = new s;
9000 t.parse(e, !1, !0), e = t
9001 }
9002 for (var n = new s, i = Object.keys(this), a = 0; a < i.length; a++) {
9003 var o = i[a];
9004 n[o] = this[o]
9005 }
9006 if (n.hash = e.hash, "" === e.href) return n.href = n.format(), n;
9007 if (e.slashes && !e.protocol) {
9008 for (var c = Object.keys(e), l = 0; l < c.length; l++) {
9009 var h = c[l];
9010 "protocol" !== h && (n[h] = e[h])
9011 }
9012 return y[n.protocol] && n.hostname && !n.pathname && (n.path = n.pathname =
9013 "/"), n.href = n.format(), n
9014 }
9015 if (e.protocol && e.protocol !== n.protocol) {
9016 if (!y[e.protocol]) {
9017 for (var u = Object.keys(e), f = 0; f < u.length; f++) {
9018 var d = u[f];
9019 n[d] = e[d]
9020 }
9021 return n.href = n.format(), n
9022 }
9023 if (n.protocol = e.protocol, e.host || m[e.protocol]) n.pathname = e.pathname;
9024 else {
9025 for (var p = (e.pathname || "").split("/"); p.length && !(e.host = p.shift());)
9026 ;
9027 e.host || (e.host = ""), e.hostname || (e.hostname = ""), "" !== p[0] &&
9028 p.unshift(""), p.length < 2 && p.unshift(""), n.pathname = p.join("/")
9029 }
9030 if (n.search = e.search, n.query = e.query, n.host = e.host || "", n.auth =
9031 e.auth, n.hostname = e.hostname || e.host, n.port = e.port, n.pathname ||
9032 n.search) {
9033 var g = n.pathname || "",
9034 k = n.search || "";
9035 n.path = g + k
9036 }
9037 return n.slashes = n.slashes || e.slashes, n.href = n.format(), n
9038 }
9039 var v = n.pathname && "/" === n.pathname.charAt(0),
9040 w = e.host || e.pathname && "/" === e.pathname.charAt(0),
9041 b = w || v || n.host && e.pathname,
9042 x = b,
9043 S = n.pathname && n.pathname.split("/") || [],
9044 T = (p = e.pathname && e.pathname.split("/") || [], n.protocol && !y[n.protocol]);
9045 if (T && (n.hostname = "", n.port = null, n.host && ("" === S[0] ? S[0] =
9046 n.host : S.unshift(n.host)), n.host = "", e.protocol && (e.hostname =
9047 null, e.port = null, e.host && ("" === p[0] ? p[0] = e.host : p.unshift(
9048 e.host)), e.host = null), b = b && ("" === p[0] || "" === S[0])), w) n.host =
9049 e.host || "" === e.host ? e.host : n.host, n.hostname = e.hostname || "" ===
9050 e.hostname ? e.hostname : n.hostname, n.search = e.search, n.query = e.query,
9051 S = p;
9052 else if (p.length) S || (S = []), S.pop(), S = S.concat(p), n.search = e.search,
9053 n.query = e.query;
9054 else if (!r.isNullOrUndefined(e.search)) return T && (n.hostname = n.host =
9055 S.shift(), (P = !!(n.host && n.host.indexOf("@") > 0) && n.host.split(
9056 "@")) && (n.auth = P.shift(), n.host = n.hostname = P.shift())), n.search =
9057 e.search, n.query = e.query, r.isNull(n.pathname) && r.isNull(n.search) ||
9058 (n.path = (n.pathname ? n.pathname : "") + (n.search ? n.search : "")),
9059 n.href = n.format(), n;
9060 if (!S.length) return n.pathname = null, n.search ? n.path = "/" + n.search :
9061 n.path = null, n.href = n.format(), n;
9062 for (var I = S.slice(-1)[0], E = (n.host || e.host || S.length > 1) && (
9063 "." === I || ".." === I) || "" === I, M = 0, A = S.length; A >= 0; A--)
9064 "." === (I = S[A]) ? S.splice(A, 1) : ".." === I ? (S.splice(A, 1), M++) :
9065 M && (S.splice(A, 1), M--);
9066 if (!b && !x)
9067 for (; M--; M) S.unshift("..");
9068 !b || "" === S[0] || S[0] && "/" === S[0].charAt(0) || S.unshift(""), E &&
9069 "/" !== S.join("/").substr(-1) && S.push("");
9070 var P, B = "" === S[0] || S[0] && "/" === S[0].charAt(0);
9071 return T && (n.hostname = n.host = B ? "" : S.length ? S.shift() : "", (P = !
9072 !(n.host && n.host.indexOf("@") > 0) && n.host.split("@")) && (n.auth =
9073 P.shift(), n.host = n.hostname = P.shift())), (b = b || n.host && S.length) &&
9074 !B && S.unshift(""), S.length ? n.pathname = S.join("/") : (n.pathname =
9075 null, n.path = null), r.isNull(n.pathname) && r.isNull(n.search) || (n.path =
9076 (n.pathname ? n.pathname : "") + (n.search ? n.search : "")), n.auth = e
9077 .auth || n.auth, n.slashes = n.slashes || e.slashes, n.href = n.format(),
9078 n
9079 }, s.prototype.parseHost = function() {
9080 var e = this.host,
9081 t = o.exec(e);
9082 t && (":" !== (t = t[0]) && (this.port = t.substr(1)), e = e.substr(0, e.length -
9083 t.length)), e && (this.hostname = e)
9084 }
9085}, function(e, t, n) {
9086 (function(e, i) {
9087 var r; /*! https://mths.be/punycode v1.4.1 by @mathias */
9088 ! function(s) {
9089 t && t.nodeType, e && e.nodeType;
9090 var a = "object" == typeof i && i;
9091 a.global !== a && a.window !== a && a.self;
9092 var o, c = 2147483647,
9093 l = 36,
9094 h = /^xn--/,
9095 u = /[^\x20-\x7E]/,
9096 f = /[\x2E\u3002\uFF0E\uFF61]/g,
9097 d = {
9098 overflow: "Overflow: input needs wider integers to process",
9099 "not-basic": "Illegal input >= 0x80 (not a basic code point)",
9100 "invalid-input": "Invalid input"
9101 },
9102 p = Math.floor,
9103 g = String.fromCharCode;
9104
9105 function m(e) {
9106 throw new RangeError(d[e])
9107 }
9108
9109 function y(e, t) {
9110 for (var n = e.length, i = []; n--;) i[n] = t(e[n]);
9111 return i
9112 }
9113
9114 function k(e, t) {
9115 var n = e.split("@"),
9116 i = "";
9117 return n.length > 1 && (i = n[0] + "@", e = n[1]), i + y((e = e.replace(
9118 f, ".")).split("."), t).join(".")
9119 }
9120
9121 function v(e) {
9122 for (var t, n, i = [], r = 0, s = e.length; r < s;)(t = e.charCodeAt(r++)) >=
9123 55296 && t <= 56319 && r < s ? 56320 == (64512 & (n = e.charCodeAt(r++))) ?
9124 i.push(((1023 & t) << 10) + (1023 & n) + 65536) : (i.push(t), r--) : i.push(
9125 t);
9126 return i
9127 }
9128
9129 function w(e) {
9130 return y(e, (function(e) {
9131 var t = "";
9132 return e > 65535 && (t += g((e -= 65536) >>> 10 & 1023 | 55296), e =
9133 56320 | 1023 & e), t + g(e)
9134 })).join("")
9135 }
9136
9137 function b(e) {
9138 return e - 48 < 10 ? e - 22 : e - 65 < 26 ? e - 65 : e - 97 < 26 ? e -
9139 97 : l
9140 }
9141
9142 function x(e, t) {
9143 return e + 22 + 75 * (e < 26) - ((0 != t) << 5)
9144 }
9145
9146 function S(e, t, n) {
9147 var i = 0;
9148 for (e = n ? p(e / 700) : e >> 1, e += p(e / t); e > 455; i += l) e = p(
9149 e / 35);
9150 return p(i + 36 * e / (e + 38))
9151 }
9152
9153 function T(e) {
9154 var t, n, i, r, s, a, o, h, u, f, d = [],
9155 g = e.length,
9156 y = 0,
9157 k = 128,
9158 v = 72;
9159 for ((n = e.lastIndexOf("-")) < 0 && (n = 0), i = 0; i < n; ++i) e.charCodeAt(
9160 i) >= 128 && m("not-basic"), d.push(e.charCodeAt(i));
9161 for (r = n > 0 ? n + 1 : 0; r < g;) {
9162 for (s = y, a = 1, o = l; r >= g && m("invalid-input"), ((h = b(e.charCodeAt(
9163 r++))) >= l || h > p((c - y) / a)) && m("overflow"), y += h * a, !(h <
9164 (u = o <= v ? 1 : o >= v + 26 ? 26 : o - v)); o += l) a > p(c / (f =
9165 l - u)) && m("overflow"), a *= f;
9166 v = S(y - s, t = d.length + 1, 0 == s), p(y / t) > c - k && m(
9167 "overflow"), k += p(y / t), y %= t, d.splice(y++, 0, k)
9168 }
9169 return w(d)
9170 }
9171
9172 function I(e) {
9173 var t, n, i, r, s, a, o, h, u, f, d, y, k, w, b, T = [];
9174 for (y = (e = v(e)).length, t = 128, n = 0, s = 72, a = 0; a < y; ++a)(d =
9175 e[a]) < 128 && T.push(g(d));
9176 for (i = r = T.length, r && T.push("-"); i < y;) {
9177 for (o = c, a = 0; a < y; ++a)(d = e[a]) >= t && d < o && (o = d);
9178 for (o - t > p((c - n) / (k = i + 1)) && m("overflow"), n += (o - t) *
9179 k, t = o, a = 0; a < y; ++a)
9180 if ((d = e[a]) < t && ++n > c && m("overflow"), d == t) {
9181 for (h = n, u = l; !(h < (f = u <= s ? 1 : u >= s + 26 ? 26 : u - s)); u +=
9182 l) b = h - f, w = l - f, T.push(g(x(f + b % w, 0))), h = p(b / w);
9183 T.push(g(x(h, 0))), s = S(n, k, i == r), n = 0, ++i
9184 }++n, ++t
9185 }
9186 return T.join("")
9187 }
9188 o = {
9189 version: "1.4.1",
9190 ucs2: {
9191 decode: v,
9192 encode: w
9193 },
9194 decode: T,
9195 encode: I,
9196 toASCII: function(e) {
9197 return k(e, (function(e) {
9198 return u.test(e) ? "xn--" + I(e) : e
9199 }))
9200 },
9201 toUnicode: function(e) {
9202 return k(e, (function(e) {
9203 return h.test(e) ? T(e.slice(4).toLowerCase()) : e
9204 }))
9205 }
9206 }, void 0 === (r = function() {
9207 return o
9208 }.call(t, n, t, e)) || (e.exports = r)
9209 }()
9210 }).call(this, n(62)(e), n(12))
9211}, function(e, t) {
9212 e.exports = function(e) {
9213 return e.webpackPolyfill || (e.deprecate = function() {}, e.paths = [], e.children ||
9214 (e.children = []), Object.defineProperty(e, "loaded", {
9215 enumerable: !0,
9216 get: function() {
9217 return e.l
9218 }
9219 }), Object.defineProperty(e, "id", {
9220 enumerable: !0,
9221 get: function() {
9222 return e.i
9223 }
9224 }), e.webpackPolyfill = 1), e
9225 }
9226}, function(e, t, n) {
9227 "use strict";
9228 e.exports = {
9229 isString: function(e) {
9230 return "string" == typeof e
9231 },
9232 isObject: function(e) {
9233 return "object" == typeof e && null !== e
9234 },
9235 isNull: function(e) {
9236 return null === e
9237 },
9238 isNullOrUndefined: function(e) {
9239 return null == e
9240 }
9241 }
9242}, function(e, t, n) {
9243 "use strict";
9244 t.decode = t.parse = n(65), t.encode = t.stringify = n(66)
9245}, function(e, t, n) {
9246 "use strict";
9247
9248 function i(e, t) {
9249 return Object.prototype.hasOwnProperty.call(e, t)
9250 }
9251 e.exports = function(e, t, n, s) {
9252 t = t || "&", n = n || "=";
9253 var a = {};
9254 if ("string" != typeof e || 0 === e.length) return a;
9255 var o = /\+/g;
9256 e = e.split(t);
9257 var c = 1e3;
9258 s && "number" == typeof s.maxKeys && (c = s.maxKeys);
9259 var l = e.length;
9260 c > 0 && l > c && (l = c);
9261 for (var h = 0; h < l; ++h) {
9262 var u, f, d, p, g = e[h].replace(o, "%20"),
9263 m = g.indexOf(n);
9264 m >= 0 ? (u = g.substr(0, m), f = g.substr(m + 1)) : (u = g, f = ""), d =
9265 decodeURIComponent(u), p = decodeURIComponent(f), i(a, d) ? r(a[d]) ? a[
9266 d].push(p) : a[d] = [a[d], p] : a[d] = p
9267 }
9268 return a
9269 };
9270 var r = Array.isArray || function(e) {
9271 return "[object Array]" === Object.prototype.toString.call(e)
9272 }
9273}, function(e, t, n) {
9274 "use strict";
9275 var i = function(e) {
9276 switch (typeof e) {
9277 case "string":
9278 return e;
9279 case "boolean":
9280 return e ? "true" : "false";
9281 case "number":
9282 return isFinite(e) ? e : "";
9283 default:
9284 return ""
9285 }
9286 };
9287 e.exports = function(e, t, n, o) {
9288 return t = t || "&", n = n || "=", null === e && (e = void 0), "object" ==
9289 typeof e ? s(a(e), (function(a) {
9290 var o = encodeURIComponent(i(a)) + n;
9291 return r(e[a]) ? s(e[a], (function(e) {
9292 return o + encodeURIComponent(i(e))
9293 })).join(t) : o + encodeURIComponent(i(e[a]))
9294 })).join(t) : o ? encodeURIComponent(i(o)) + n + encodeURIComponent(i(e)) :
9295 ""
9296 };
9297 var r = Array.isArray || function(e) {
9298 return "[object Array]" === Object.prototype.toString.call(e)
9299 };
9300
9301 function s(e, t) {
9302 if (e.map) return e.map(t);
9303 for (var n = [], i = 0; i < e.length; i++) n.push(t(e[i], i));
9304 return n
9305 }
9306 var a = Object.keys || function(e) {
9307 var t = [];
9308 for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.push(n);
9309 return t
9310 }
9311}, function(e, t, n) {
9312 ! function() {
9313 var t = n(68),
9314 i = n(20).utf8,
9315 r = n(69),
9316 s = n(20).bin,
9317 a = function(e, n) {
9318 e.constructor == String ? e = n && "binary" === n.encoding ? s.stringToBytes(
9319 e) : i.stringToBytes(e) : r(e) ? e = Array.prototype.slice.call(e, 0) :
9320 Array.isArray(e) || (e = e.toString());
9321 for (var o = t.bytesToWords(e), c = 8 * e.length, l = 1732584193, h = -
9322 271733879, u = -1732584194, f = 271733878, d = 0; d < o.length; d++) o[
9323 d] = 16711935 & (o[d] << 8 | o[d] >>> 24) | 4278255360 & (o[d] << 24 |
9324 o[d] >>> 8);
9325 o[c >>> 5] |= 128 << c % 32, o[14 + (c + 64 >>> 9 << 4)] = c;
9326 var p = a._ff,
9327 g = a._gg,
9328 m = a._hh,
9329 y = a._ii;
9330 for (d = 0; d < o.length; d += 16) {
9331 var k = l,
9332 v = h,
9333 w = u,
9334 b = f;
9335 h = y(h = y(h = y(h = y(h = m(h = m(h = m(h = m(h = g(h = g(h = g(h = g(
9336 h = p(h = p(h = p(h = p(h, u = p(u, f = p(f, l = p(l, h, u,
9337 f, o[d + 0], 7, -680876936), h, u, o[d + 1], 12, -
9338 389564586), l, h, o[d + 2], 17, 606105819), f, l, o[d +
9339 3], 22, -1044525330), u = p(u, f = p(f, l = p(l, h, u,
9340 f, o[d + 4], 7, -176418897), h, u, o[d + 5], 12,
9341 1200080426), l, h, o[d + 6], 17, -1473231341), f, l, o[
9342 d + 7], 22, -45705983), u = p(u, f = p(f, l = p(l, h, u,
9343 f, o[d + 8], 7, 1770035416), h, u, o[d + 9], 12, -
9344 1958414417), l, h, o[d + 10], 17, -42063), f, l, o[d +
9345 11], 22, -1990404162), u = p(u, f = p(f, l = p(l, h, u, f,
9346 o[d + 12], 7, 1804603682), h, u, o[d + 13], 12, -
9347 40341101), l, h, o[d + 14], 17, -1502002290), f, l, o[d +
9348 15], 22, 1236535329), u = g(u, f = g(f, l = g(l, h, u, f,
9349 o[d + 1], 5, -165796510), h, u, o[d + 6], 9, -1069501632),
9350 l, h, o[d + 11], 14, 643717713), f, l, o[d + 0], 20, -
9351 373897302), u = g(u, f = g(f, l = g(l, h, u, f, o[d + 5], 5, -
9352 701558691), h, u, o[d + 10], 9, 38016083), l, h, o[d + 15],
9353 14, -660478335), f, l, o[d + 4], 20, -405537848), u = g(u, f =
9354 g(f, l = g(l, h, u, f, o[d + 9], 5, 568446438), h, u, o[d +
9355 14], 9, -1019803690), l, h, o[d + 3], 14, -187363961), f, l,
9356 o[d + 8], 20, 1163531501), u = g(u, f = g(f, l = g(l, h, u, f,
9357 o[d + 13], 5, -1444681467), h, u, o[d + 2], 9, -51403784), l,
9358 h, o[d + 7], 14, 1735328473), f, l, o[d + 12], 20, -
9359 1926607734), u = m(u, f = m(f, l = m(l, h, u, f, o[d + 5], 4, -
9360 378558), h, u, o[d + 8], 11, -2022574463), l, h, o[d + 11],
9361 16, 1839030562), f, l, o[d + 14], 23, -35309556), u = m(u, f =
9362 m(f, l = m(l, h, u, f, o[d + 1], 4, -1530992060), h, u, o[d + 4],
9363 11, 1272893353), l, h, o[d + 7], 16, -155497632), f, l, o[d +
9364 10], 23, -1094730640), u = m(u, f = m(f, l = m(l, h, u, f, o[d +
9365 13], 4, 681279174), h, u, o[d + 0], 11, -358537222), l, h, o[d +
9366 3], 16, -722521979), f, l, o[d + 6], 23, 76029189), u = m(u, f =
9367 m(f, l = m(l, h, u, f, o[d + 9], 4, -640364487), h, u, o[d + 12],
9368 11, -421815835), l, h, o[d + 15], 16, 530742520), f, l, o[d + 2],
9369 23, -995338651), u = y(u, f = y(f, l = y(l, h, u, f, o[d + 0], 6, -
9370 198630844), h, u, o[d + 7], 10, 1126891415), l, h, o[d + 14], 15, -
9371 1416354905), f, l, o[d + 5], 21, -57434055), u = y(u, f = y(f, l =
9372 y(l, h, u, f, o[d + 12], 6, 1700485571), h, u, o[d + 3], 10, -
9373 1894986606), l, h, o[d + 10], 15, -1051523), f, l, o[d + 1], 21, -
9374 2054922799), u = y(u, f = y(f, l = y(l, h, u, f, o[d + 8], 6,
9375 1873313359), h, u, o[d + 15], 10, -30611744), l, h, o[d + 6], 15, -
9376 1560198380), f, l, o[d + 13], 21, 1309151649), u = y(u, f = y(f, l =
9377 y(l, h, u, f, o[d + 4], 6, -145523070), h, u, o[d + 11], 10, -
9378 1120210379), l, h, o[d + 2], 15, 718787259), f, l, o[d + 9], 21, -
9379 343485551), l = l + k >>> 0, h = h + v >>> 0, u = u + w >>> 0, f = f +
9380 b >>> 0
9381 }
9382 return t.endian([l, h, u, f])
9383 };
9384 a._ff = function(e, t, n, i, r, s, a) {
9385 var o = e + (t & n | ~t & i) + (r >>> 0) + a;
9386 return (o << s | o >>> 32 - s) + t
9387 }, a._gg = function(e, t, n, i, r, s, a) {
9388 var o = e + (t & i | n & ~i) + (r >>> 0) + a;
9389 return (o << s | o >>> 32 - s) + t
9390 }, a._hh = function(e, t, n, i, r, s, a) {
9391 var o = e + (t ^ n ^ i) + (r >>> 0) + a;
9392 return (o << s | o >>> 32 - s) + t
9393 }, a._ii = function(e, t, n, i, r, s, a) {
9394 var o = e + (n ^ (t | ~i)) + (r >>> 0) + a;
9395 return (o << s | o >>> 32 - s) + t
9396 }, a._blocksize = 16, a._digestsize = 16, e.exports = function(e, n) {
9397 if (null == e) throw new Error("Illegal argument " + e);
9398 var i = t.wordsToBytes(a(e, n));
9399 return n && n.asBytes ? i : n && n.asString ? s.bytesToString(i) : t.bytesToHex(
9400 i)
9401 }
9402 }()
9403}, function(e, t) {
9404 ! function() {
9405 var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
9406 n = {
9407 rotl: function(e, t) {
9408 return e << t | e >>> 32 - t
9409 },
9410 rotr: function(e, t) {
9411 return e << 32 - t | e >>> t
9412 },
9413 endian: function(e) {
9414 if (e.constructor == Number) return 16711935 & n.rotl(e, 8) |
9415 4278255360 & n.rotl(e, 24);
9416 for (var t = 0; t < e.length; t++) e[t] = n.endian(e[t]);
9417 return e
9418 },
9419 randomBytes: function(e) {
9420 for (var t = []; e > 0; e--) t.push(Math.floor(256 * Math.random()));
9421 return t
9422 },
9423 bytesToWords: function(e) {
9424 for (var t = [], n = 0, i = 0; n < e.length; n++, i += 8) t[i >>> 5] |=
9425 e[n] << 24 - i % 32;
9426 return t
9427 },
9428 wordsToBytes: function(e) {
9429 for (var t = [], n = 0; n < 32 * e.length; n += 8) t.push(e[n >>> 5] >>>
9430 24 - n % 32 & 255);
9431 return t
9432 },
9433 bytesToHex: function(e) {
9434 for (var t = [], n = 0; n < e.length; n++) t.push((e[n] >>> 4).toString(
9435 16)), t.push((15 & e[n]).toString(16));
9436 return t.join("")
9437 },
9438 hexToBytes: function(e) {
9439 for (var t = [], n = 0; n < e.length; n += 2) t.push(parseInt(e.substr(
9440 n, 2), 16));
9441 return t
9442 },
9443 bytesToBase64: function(e) {
9444 for (var n = [], i = 0; i < e.length; i += 3)
9445 for (var r = e[i] << 16 | e[i + 1] << 8 | e[i + 2], s = 0; s < 4; s++)
9446 8 * i + 6 * s <= 8 * e.length ? n.push(t.charAt(r >>> 6 * (3 - s) &
9447 63)) : n.push("=");
9448 return n.join("")
9449 },
9450 base64ToBytes: function(e) {
9451 e = e.replace(/[^A-Z0-9+\/]/gi, "");
9452 for (var n = [], i = 0, r = 0; i < e.length; r = ++i % 4) 0 != r && n.push(
9453 (t.indexOf(e.charAt(i - 1)) & Math.pow(2, -2 * r + 8) - 1) << 2 * r |
9454 t.indexOf(e.charAt(i)) >>> 6 - 2 * r);
9455 return n
9456 }
9457 };
9458 e.exports = n
9459 }()
9460}, function(e, t) {
9461 function n(e) {
9462 return !!e.constructor && "function" == typeof e.constructor.isBuffer && e.constructor
9463 .isBuffer(e)
9464 }
9465 /*!
9466 * Determine if an object is a Buffer
9467 *
9468 * @author Feross Aboukhadijeh <https://feross.org>
9469 * @license MIT
9470 */
9471 e.exports = function(e) {
9472 return null != e && (n(e) || function(e) {
9473 return "function" == typeof e.readFloatLE && "function" == typeof e.slice &&
9474 n(e.slice(0, 0))
9475 }(e) || !!e._isBuffer)
9476 }
9477}, function(e, t) {
9478 e.exports = function(e, t, n, i, r, s, a, o, c) {
9479 this.aiTypes = [{
9480 id: 0,
9481 src: "cow_1",
9482 killScore: 150,
9483 health: 500,
9484 weightM: .8,
9485 speed: 95e-5,
9486 turnSpeed: .001,
9487 scale: 72,
9488 drop: ["food", 50]
9489 }, {
9490 id: 1,
9491 src: "pig_1",
9492 killScore: 200,
9493 health: 800,
9494 weightM: .6,
9495 speed: 85e-5,
9496 turnSpeed: .001,
9497 scale: 72,
9498 drop: ["food", 80]
9499 }, {
9500 id: 2,
9501 name: "Bull",
9502 src: "bull_2",
9503 hostile: !0,
9504 dmg: 20,
9505 killScore: 1e3,
9506 health: 1800,
9507 weightM: .5,
9508 speed: 94e-5,
9509 turnSpeed: 74e-5,
9510 scale: 78,
9511 viewRange: 800,
9512 chargePlayer: !0,
9513 drop: ["food", 100]
9514 }, {
9515 id: 3,
9516 name: "Bully",
9517 src: "bull_1",
9518 hostile: !0,
9519 dmg: 20,
9520 killScore: 2e3,
9521 health: 2800,
9522 weightM: .45,
9523 speed: .001,
9524 turnSpeed: 8e-4,
9525 scale: 90,
9526 viewRange: 900,
9527 chargePlayer: !0,
9528 drop: ["food", 400]
9529 }, {
9530 id: 4,
9531 name: "Wolf",
9532 src: "wolf_1",
9533 hostile: !0,
9534 dmg: 8,
9535 killScore: 500,
9536 health: 300,
9537 weightM: .45,
9538 speed: .001,
9539 turnSpeed: .002,
9540 scale: 84,
9541 viewRange: 800,
9542 chargePlayer: !0,
9543 drop: ["food", 200]
9544 }, {
9545 id: 5,
9546 name: "Quack",
9547 src: "chicken_1",
9548 dmg: 8,
9549 killScore: 2e3,
9550 noTrap: !0,
9551 health: 300,
9552 weightM: .2,
9553 speed: .0018,
9554 turnSpeed: .006,
9555 scale: 70,
9556 drop: ["food", 100]
9557 }, {
9558 id: 6,
9559 name: "MOOSTAFA",
9560 nameScale: 50,
9561 src: "enemy",
9562 hostile: !0,
9563 dontRun: !0,
9564 fixedSpawn: !0,
9565 spawnDelay: 6e4,
9566 noTrap: !0,
9567 colDmg: 100,
9568 dmg: 40,
9569 killScore: 8e3,
9570 health: 18e3,
9571 weightM: .4,
9572 speed: 7e-4,
9573 turnSpeed: .01,
9574 scale: 80,
9575 spriteMlt: 1.8,
9576 leapForce: .9,
9577 viewRange: 1e3,
9578 hitRange: 210,
9579 hitDelay: 1e3,
9580 chargePlayer: !0,
9581 drop: ["food", 100]
9582 }, {
9583 id: 7,
9584 name: "Treasure",
9585 hostile: !0,
9586 nameScale: 35,
9587 src: "crate_1",
9588 fixedSpawn: !0,
9589 spawnDelay: 12e4,
9590 colDmg: 200,
9591 killScore: 5e3,
9592 health: 2e4,
9593 weightM: .1,
9594 speed: 0,
9595 turnSpeed: 0,
9596 scale: 70,
9597 spriteMlt: 1
9598 }, {
9599 id: 8,
9600 name: "MOOFIE",
9601 src: "wolf_2",
9602 hostile: !0,
9603 fixedSpawn: !0,
9604 dontRun: !0,
9605 hitScare: 4,
9606 spawnDelay: 3e4,
9607 noTrap: !0,
9608 nameScale: 35,
9609 dmg: 10,
9610 colDmg: 100,
9611 killScore: 3e3,
9612 health: 7e3,
9613 weightM: .45,
9614 speed: .0015,
9615 turnSpeed: .002,
9616 scale: 90,
9617 viewRange: 800,
9618 chargePlayer: !0,
9619 drop: ["food", 1e3]
9620 }], this.spawn = function(l, h, u, f) {
9621 for (var d, p = 0; p < e.length; ++p)
9622 if (!e[p].active) {
9623 d = e[p];
9624 break
9625 }
9626 return d || (d = new t(e.length, r, n, i, a, s, o, c), e.push(d)), d.init(
9627 l, h, u, f, this.aiTypes[f]), d
9628 }
9629 }
9630}, function(e, t) {
9631 var n = 2 * Math.PI;
9632 e.exports = function(e, t, i, r, s, a, o, c) {
9633 this.sid = e, this.isAI = !0, this.nameIndex = s.randInt(0, a.cowNames.length -
9634 1), this.init = function(e, t, n, i, r) {
9635 this.x = e, this.y = t, this.startX = r.fixedSpawn ? e : null, this.startY =
9636 r.fixedSpawn ? t : null, this.xVel = 0, this.yVel = 0, this.zIndex = 0,
9637 this.dir = n, this.dirPlus = 0, this.index = i, this.src = r.src, r.name &&
9638 (this.name = r.name), this.weightM = r.weightM, this.speed = r.speed,
9639 this.killScore = r.killScore, this.turnSpeed = r.turnSpeed, this.scale =
9640 r.scale, this.maxHealth = r.health, this.leapForce = r.leapForce, this.health =
9641 this.maxHealth, this.chargePlayer = r.chargePlayer, this.viewRange = r.viewRange,
9642 this.drop = r.drop, this.dmg = r.dmg, this.hostile = r.hostile, this.dontRun =
9643 r.dontRun, this.hitRange = r.hitRange, this.hitDelay = r.hitDelay, this
9644 .hitScare = r.hitScare, this.spriteMlt = r.spriteMlt, this.nameScale =
9645 r.nameScale, this.colDmg = r.colDmg, this.noTrap = r.noTrap, this.spawnDelay =
9646 r.spawnDelay, this.hitWait = 0, this.waitCount = 1e3, this.moveCount =
9647 0, this.targetDir = 0, this.active = !0, this.alive = !0, this.runFrom =
9648 null, this.chargeTarget = null, this.dmgOverTime = {}
9649 };
9650 var l = 0;
9651 this.update = function(e) {
9652 if (this.active) {
9653 if (this.spawnCounter) return this.spawnCounter -= e, void(this.spawnCounter <=
9654 0 && (this.spawnCounter = 0, this.x = this.startX || s.randInt(0, a.mapScale),
9655 this.y = this.startY || s.randInt(0, a.mapScale)));
9656 (l -= e) <= 0 && (this.dmgOverTime.dmg && (this.changeHealth(-this.dmgOverTime
9657 .dmg, this.dmgOverTime.doer), this.dmgOverTime.time -= 1, this.dmgOverTime
9658 .time <= 0 && (this.dmgOverTime.dmg = 0)), l = 1e3);
9659 var r = !1,
9660 o = 1;
9661 if (!this.zIndex && !this.lockMove && this.y >= a.mapScale / 2 - a.riverWidth /
9662 2 && this.y <= a.mapScale / 2 + a.riverWidth / 2 && (o = .33, this.xVel +=
9663 a.waterCurrent * e), this.lockMove) this.xVel = 0, this.yVel = 0;
9664 else if (this.waitCount > 0) {
9665 if (this.waitCount -= e, this.waitCount <= 0)
9666 if (this.chargePlayer) {
9667 for (var h, u, f, d = 0; d < i.length; ++d) !i[d].alive || i[d].skin &&
9668 i[d].skin.bullRepel || (f = s.getDistance(this.x, this.y, i[d].x, i[
9669 d].y)) <= this.viewRange && (!h || f < u) && (u = f, h = i[d]);
9670 h ? (this.chargeTarget = h, this.moveCount = s.randInt(8e3, 12e3)) :
9671 (this.moveCount = s.randInt(1e3, 2e3), this.targetDir = s.randFloat(-
9672 Math.PI, Math.PI))
9673 } else this.moveCount = s.randInt(4e3, 1e4), this.targetDir = s.randFloat(-
9674 Math.PI, Math.PI)
9675 } else if (this.moveCount > 0) {
9676 var p = this.speed * o;
9677 if (this.runFrom && this.runFrom.active && (!this.runFrom.isPlayer ||
9678 this.runFrom.alive) ? (this.targetDir = s.getDirection(this.x, this.y,
9679 this.runFrom.x, this.runFrom.y), p *= 1.42) : this.chargeTarget &&
9680 this.chargeTarget.alive && (this.targetDir = s.getDirection(this.chargeTarget
9681 .x, this.chargeTarget.y, this.x, this.y), p *= 1.75, r = !0), this.hitWait &&
9682 (p *= .3), this.dir != this.targetDir) {
9683 this.dir %= n;
9684 var g = (this.dir - this.targetDir + n) % n,
9685 m = Math.min(Math.abs(g - n), g, this.turnSpeed * e),
9686 y = g - Math.PI >= 0 ? 1 : -1;
9687 this.dir += y * m + n
9688 }
9689 this.dir %= n, this.xVel += p * e * Math.cos(this.dir), this.yVel += p *
9690 e * Math.sin(this.dir), this.moveCount -= e, this.moveCount <= 0 && (
9691 this.runFrom = null, this.chargeTarget = null, this.waitCount = this
9692 .hostile ? 1500 : s.randInt(1500, 6e3))
9693 }
9694 this.zIndex = 0, this.lockMove = !1;
9695 var k = s.getDistance(0, 0, this.xVel * e, this.yVel * e),
9696 v = Math.min(4, Math.max(1, Math.round(k / 40))),
9697 w = 1 / v;
9698 for (d = 0; d < v; ++d) {
9699 this.xVel && (this.x += this.xVel * e * w), this.yVel && (this.y +=
9700 this.yVel * e * w), M = t.getGridArrays(this.x, this.y, this.scale);
9701 for (var b = 0; b < M.length; ++b)
9702 for (var x = 0; x < M[b].length; ++x) M[b][x].active && t.checkCollision(
9703 this, M[b][x], w)
9704 }
9705 var S, T, I, E = !1;
9706 if (this.hitWait > 0 && (this.hitWait -= e, this.hitWait <= 0)) {
9707 E = !0, this.hitWait = 0, this.leapForce && !s.randInt(0, 2) && (this.xVel +=
9708 this.leapForce * Math.cos(this.dir), this.yVel += this.leapForce *
9709 Math.sin(this.dir));
9710 for (var M = t.getGridArrays(this.x, this.y, this.hitRange), A = 0; A <
9711 M.length; ++A)
9712 for (b = 0; b < M[A].length; ++b)(S = M[A][b]).health && (T = s.getDistance(
9713 this.x, this.y, S.x, S.y)) < S.scale + this.hitRange && (S.changeHealth(
9714 5 * -this.dmg) && t.disableObj(S), t.hitObj(S, s.getDirection(this
9715 .x, this.y, S.x, S.y)));
9716 for (b = 0; b < i.length; ++b) i[b].canSee(this) && c.send(i[b].id,
9717 "aa", this.sid)
9718 }
9719 if (r || E)
9720 for (d = 0; d < i.length; ++d)(S = i[d]) && S.alive && (T = s.getDistance(
9721 this.x, this.y, S.x, S.y), this.hitRange ? !this.hitWait && T <=
9722 this.hitRange + S.scale && (E ? (I = s.getDirection(S.x, S.y, this.x,
9723 this.y), S.changeHealth(-this.dmg), S.xVel += .6 * Math.cos(I), S
9724 .yVel += .6 * Math.sin(I), this.runFrom = null, this.chargeTarget =
9725 null, this.waitCount = 3e3, this.hitWait = s.randInt(0, 2) ? 0 :
9726 600) : this.hitWait = this.hitDelay) : T <= this.scale + S.scale &&
9727 (I = s.getDirection(S.x, S.y, this.x, this.y), S.changeHealth(-this.dmg),
9728 S.xVel += .55 * Math.cos(I), S.yVel += .55 * Math.sin(I)));
9729 this.xVel && (this.xVel *= Math.pow(a.playerDecel, e)), this.yVel && (
9730 this.yVel *= Math.pow(a.playerDecel, e));
9731 var P = this.scale;
9732 this.x - P < 0 ? (this.x = P, this.xVel = 0) : this.x + P > a.mapScale &&
9733 (this.x = a.mapScale - P, this.xVel = 0), this.y - P < 0 ? (this.y = P,
9734 this.yVel = 0) : this.y + P > a.mapScale && (this.y = a.mapScale - P,
9735 this.yVel = 0)
9736 }
9737 }, this.canSee = function(e) {
9738 if (!e) return !1;
9739 if (e.skin && e.skin.invisTimer && e.noMovTimer >= e.skin.invisTimer)
9740 return !1;
9741 var t = Math.abs(e.x - this.x) - e.scale,
9742 n = Math.abs(e.y - this.y) - e.scale;
9743 return t <= a.maxScreenWidth / 2 * 1.3 && n <= a.maxScreenHeight / 2 *
9744 1.3
9745 };
9746 var h = 0,
9747 u = 0;
9748 this.animate = function(e) {
9749 this.animTime > 0 && (this.animTime -= e, this.animTime <= 0 ? (this.animTime =
9750 0, this.dirPlus = 0, h = 0, u = 0) : 0 == u ? (h += e / (this.animSpeed *
9751 a.hitReturnRatio), this.dirPlus = s.lerp(0, this.targetAngle, Math.min(
9752 1, h)), h >= 1 && (h = 1, u = 1)) : (h -= e / (this.animSpeed * (1 -
9753 a.hitReturnRatio)), this.dirPlus = s.lerp(0, this.targetAngle, Math.max(
9754 0, h))))
9755 }, this.startAnim = function() {
9756 this.animTime = this.animSpeed = 600, this.targetAngle = .8 * Math.PI, h =
9757 0, u = 0
9758 }, this.changeHealth = function(e, t, n) {
9759 if (this.active && (this.health += e, n && (this.hitScare && !s.randInt(
9760 0, this.hitScare) ? (this.runFrom = n, this.waitCount = 0, this.moveCount =
9761 2e3) : this.hostile && this.chargePlayer && n.isPlayer ? (this.chargeTarget =
9762 n, this.waitCount = 0, this.moveCount = 8e3) : this.dontRun || (this
9763 .runFrom = n, this.waitCount = 0, this.moveCount = 2e3)), e < 0 &&
9764 this.hitRange && s.randInt(0, 1) && (this.hitWait = 500), t && t.canSee(
9765 this) && e < 0 && c.send(t.id, "t", Math.round(this.x), Math.round(
9766 this.y), Math.round(-e), 1), this.health <= 0 && (this.spawnDelay ? (
9767 this.spawnCounter = this.spawnDelay, this.x = -1e6, this.y = -1e6) :
9768 (this.x = this.startX || s.randInt(0, a.mapScale), this.y = this.startY ||
9769 s.randInt(0, a.mapScale)), this.health = this.maxHealth, this.runFrom =
9770 null, t && (o(t, this.killScore), this.drop))))
9771 for (var i = 0; i < this.drop.length;) t.addResource(a.resourceTypes.indexOf(
9772 this.drop[i]), this.drop[i + 1]), i += 2
9773 }
9774 }
9775}]);
9776//# sourceMappingURL=bundle.js.map