🏠 Home 

Revenir Mod

HellMD is op)))


Installer dette script?
  1. // ==UserScript==
  2. // @name Revenir Mod
  3. // @namespace -
  4. // @version v1
  5. // @description HellMD is op)))
  6. // @author Dont One
  7. // @match *://moomoo.io/*
  8. // @match *://sandbox.moomoo.io/*
  9. // @grant none
  10. // ==/UserScript==
  11. /*
  12. Update Logs:
  13. v0.1: Get Moomoo.io's Bundle.js and starting up the hack
  14. v0.2: Add automatic stuff
  15. v0.3: heal upgrade
  16. v0.4: auto reload/auto weapon switch
  17. v0.5: auto place
  18. v0.6: invis placers (ALWAYS ON)
  19. v0.7: Building HP + that werid thing i added
  20. v0.8: Healing fix
  21. v0.9: fix dumb lag
  22. v1: initial release + fixed dumb thing + non obfus + made some hacks into noob hacks + idc
  23. enjoy! - Dont One
  24. */
  25. !function(e) {
  26. var t = {};
  27. function n(i) {
  28. if (t[i])
  29. return t[i].exports;
  30. var r = t[i] = {
  31. i: i,
  32. l: !1,
  33. exports: {}
  34. };
  35. return e[i].call(r.exports, r, r.exports, n),
  36. r.l = !0,
  37. r.exports
  38. }
  39. n.m = e,
  40. n.c = t,
  41. n.d = function(e, t, i) {
  42. n.o(e, t) || Object.defineProperty(e, t, {
  43. enumerable: !0,
  44. get: i
  45. })
  46. }
  47. ,
  48. n.r = function(e) {
  49. "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
  50. value: "Module"
  51. }),
  52. Object.defineProperty(e, "__esModule", {
  53. value: !0
  54. })
  55. }
  56. ,
  57. n.t = function(e, t) {
  58. if (1 & t && (e = n(e)),
  59. 8 & t)
  60. return e;
  61. if (4 & t && "object" == typeof e && e && e.__esModule)
  62. return e;
  63. var i = Object.create(null);
  64. if (n.r(i),
  65. Object.defineProperty(i, "default", {
  66. enumerable: !0,
  67. value: e
  68. }),
  69. 2 & t && "string" != typeof e)
  70. for (var r in e)
  71. n.d(i, r, function(t) {
  72. return e[t]
  73. }
  74. .bind(null, r));
  75. return i
  76. }
  77. ,
  78. n.n = function(e) {
  79. var t = e && e.__esModule ? function() {
  80. return e.default
  81. }
  82. : function() {
  83. return e
  84. }
  85. ;
  86. return n.d(t, "a", t),
  87. t
  88. }
  89. ,
  90. n.o = function(e, t) {
  91. return Object.prototype.hasOwnProperty.call(e, t)
  92. }
  93. ,
  94. n.p = "",
  95. n(n.s = 21)
  96. }([function(e, t, n) {
  97. var i = t.global = n(25)
  98. , r = t.hasBuffer = i && !!i.isBuffer
  99. , s = t.hasArrayBuffer = "undefined" != typeof ArrayBuffer
  100. , a = t.isArray = n(5);
  101. t.isArrayBuffer = s ? function(e) {
  102. return e instanceof ArrayBuffer || p(e)
  103. }
  104. : m;
  105. var o = t.isBuffer = r ? i.isBuffer : m
  106. , c = t.isView = s ? ArrayBuffer.isView || y("ArrayBuffer", "buffer") : m;
  107. t.alloc = d,
  108. t.concat = function(e, n) {
  109. n || (n = 0,
  110. Array.prototype.forEach.call(e, (function(e) {
  111. n += e.length
  112. }
  113. )));
  114. var i = this !== t && this || e[0]
  115. , r = d.call(i, n)
  116. , s = 0;
  117. return Array.prototype.forEach.call(e, (function(e) {
  118. s += f.copy.call(e, r, s)
  119. }
  120. )),
  121. r
  122. }
  123. ,
  124. t.from = function(e) {
  125. return "string" == typeof e ? function(e) {
  126. var t = 3 * e.length
  127. , n = d.call(this, t)
  128. , i = f.write.call(n, e);
  129. return t !== i && (n = f.slice.call(n, 0, i)),
  130. n
  131. }
  132. .call(this, e) : g(this).from(e)
  133. }
  134. ;
  135. var l = t.Array = n(28)
  136. , h = t.Buffer = n(29)
  137. , u = t.Uint8Array = n(30)
  138. , f = t.prototype = n(6);
  139. function d(e) {
  140. return g(this).alloc(e)
  141. }
  142. var p = y("ArrayBuffer");
  143. function g(e) {
  144. return o(e) ? h : c(e) ? u : a(e) ? l : r ? h : s ? u : l
  145. }
  146. function m() {
  147. return !1
  148. }
  149. function y(e, t) {
  150. return e = "[object " + e + "]",
  151. function(n) {
  152. return null != n && {}.toString.call(t ? n[t] : n) === e
  153. }
  154. }
  155. }
  156. , function(e, t, n) {
  157. var i = n(5);
  158. t.createCodec = o,
  159. t.install = function(e) {
  160. for (var t in e)
  161. s.prototype[t] = a(s.prototype[t], e[t])
  162. }
  163. ,
  164. t.filter = function(e) {
  165. return i(e) ? function(e) {
  166. return e = e.slice(),
  167. function(n) {
  168. return e.reduce(t, n)
  169. }
  170. ;
  171. function t(e, t) {
  172. return t(e)
  173. }
  174. }(e) : e
  175. }
  176. ;
  177. var r = n(0);
  178. function s(e) {
  179. if (!(this instanceof s))
  180. return new s(e);
  181. this.options = e,
  182. this.init()
  183. }
  184. function a(e, t) {
  185. return e && t ? function() {
  186. return e.apply(this, arguments),
  187. t.apply(this, arguments)
  188. }
  189. : e || t
  190. }
  191. function o(e) {
  192. return new s(e)
  193. }
  194. s.prototype.init = function() {
  195. var e = this.options;
  196. return e && e.uint8array && (this.bufferish = r.Uint8Array),
  197. this
  198. }
  199. ,
  200. t.preset = o({
  201. preset: !0
  202. })
  203. }
  204. , function(e, t, n) {
  205. var i = n(3).ExtBuffer
  206. , r = n(32)
  207. , s = n(33)
  208. , a = n(1);
  209. function o() {
  210. var e = this.options;
  211. return this.encode = function(e) {
  212. var t = s.getWriteType(e);
  213. return function(e, n) {
  214. var i = t[typeof n];
  215. if (!i)
  216. throw new Error('Unsupported type "' + typeof n + '": ' + n);
  217. i(e, n)
  218. }
  219. }(e),
  220. e && e.preset && r.setExtPackers(this),
  221. this
  222. }
  223. a.install({
  224. addExtPacker: function(e, t, n) {
  225. n = a.filter(n);
  226. var r = t.name;
  227. r && "Object" !== r ? (this.extPackers || (this.extPackers = {}))[r] = s : (this.extEncoderList || (this.extEncoderList = [])).unshift([t, s]);
  228. function s(t) {
  229. return n && (t = n(t)),
  230. new i(t,e)
  231. }
  232. },
  233. getExtPacker: function(e) {
  234. var t = this.extPackers || (this.extPackers = {})
  235. , n = e.constructor
  236. , i = n && n.name && t[n.name];
  237. if (i)
  238. return i;
  239. for (var r = this.extEncoderList || (this.extEncoderList = []), s = r.length, a = 0; a < s; a++) {
  240. var o = r[a];
  241. if (n === o[0])
  242. return o[1]
  243. }
  244. },
  245. init: o
  246. }),
  247. t.preset = o.call(a.preset)
  248. }
  249. , function(e, t, n) {
  250. t.ExtBuffer = function e(t, n) {
  251. if (!(this instanceof e))
  252. return new e(t,n);
  253. this.buffer = i.from(t),
  254. this.type = n
  255. }
  256. ;
  257. var i = n(0)
  258. }
  259. , function(e, t) {
  260. t.read = function(e, t, n, i, r) {
  261. var s, a, o = 8 * r - i - 1, c = (1 << o) - 1, l = c >> 1, h = -7, u = n ? r - 1 : 0, f = n ? -1 : 1, d = e[t + u];
  262. for (u += f,
  263. s = d & (1 << -h) - 1,
  264. d >>= -h,
  265. h += o; h > 0; s = 256 * s + e[t + u],
  266. u += f,
  267. h -= 8)
  268. ;
  269. for (a = s & (1 << -h) - 1,
  270. s >>= -h,
  271. h += i; h > 0; a = 256 * a + e[t + u],
  272. u += f,
  273. h -= 8)
  274. ;
  275. if (0 === s)
  276. s = 1 - l;
  277. else {
  278. if (s === c)
  279. return a ? NaN : 1 / 0 * (d ? -1 : 1);
  280. a += Math.pow(2, i),
  281. s -= l
  282. }
  283. return (d ? -1 : 1) * a * Math.pow(2, s - i)
  284. }
  285. ,
  286. t.write = function(e, t, n, i, r, s) {
  287. var a, o, c, l = 8 * s - r - 1, h = (1 << l) - 1, u = h >> 1, f = 23 === r ? Math.pow(2, -24) - Math.pow(2, -77) : 0, d = i ? 0 : s - 1, p = i ? 1 : -1, g = t < 0 || 0 === t && 1 / t < 0 ? 1 : 0;
  288. for (t = Math.abs(t),
  289. isNaN(t) || t === 1 / 0 ? (o = isNaN(t) ? 1 : 0,
  290. a = h) : (a = Math.floor(Math.log(t) / Math.LN2),
  291. t * (c = Math.pow(2, -a)) < 1 && (a--,
  292. c *= 2),
  293. (t += a + u >= 1 ? f / c : f * Math.pow(2, 1 - u)) * c >= 2 && (a++,
  294. c /= 2),
  295. a + u >= h ? (o = 0,
  296. a = h) : a + u >= 1 ? (o = (t * c - 1) * Math.pow(2, r),
  297. a += u) : (o = t * Math.pow(2, u - 1) * Math.pow(2, r),
  298. a = 0)); r >= 8; e[n + d] = 255 & o,
  299. d += p,
  300. o /= 256,
  301. r -= 8)
  302. ;
  303. for (a = a << r | o,
  304. l += r; l > 0; e[n + d] = 255 & a,
  305. d += p,
  306. a /= 256,
  307. l -= 8)
  308. ;
  309. e[n + d - p] |= 128 * g
  310. }
  311. }
  312. , function(e, t) {
  313. var n = {}.toString;
  314. e.exports = Array.isArray || function(e) {
  315. return "[object Array]" == n.call(e)
  316. }
  317. }
  318. , function(e, t, n) {
  319. var i = n(31);
  320. t.copy = c,
  321. t.slice = l,
  322. t.toString = function(e, t, n) {
  323. return (!a && r.isBuffer(this) ? this.toString : i.toString).apply(this, arguments)
  324. }
  325. ,
  326. t.write = function(e) {
  327. return function() {
  328. return (this[e] || i[e]).apply(this, arguments)
  329. }
  330. }("write");
  331. var r = n(0)
  332. , s = r.global
  333. , a = r.hasBuffer && "TYPED_ARRAY_SUPPORT"in s
  334. , o = a && !s.TYPED_ARRAY_SUPPORT;
  335. function c(e, t, n, s) {
  336. var a = r.isBuffer(this)
  337. , c = r.isBuffer(e);
  338. if (a && c)
  339. return this.copy(e, t, n, s);
  340. if (o || a || c || !r.isView(this) || !r.isView(e))
  341. return i.copy.call(this, e, t, n, s);
  342. var h = n || null != s ? l.call(this, n, s) : this;
  343. return e.set(h, t),
  344. h.length
  345. }
  346. function l(e, t) {
  347. var n = this.slice || !o && this.subarray;
  348. if (n)
  349. return n.call(this, e, t);
  350. var i = r.alloc.call(this, t - e);
  351. return c.call(this, i, 0, e, t),
  352. i
  353. }
  354. }
  355. , function(e, t, n) {
  356. (function(e) {
  357. !function(t) {
  358. var n, i = "undefined", r = i !== typeof e && e, s = i !== typeof Uint8Array && Uint8Array, a = i !== typeof ArrayBuffer && ArrayBuffer, o = [0, 0, 0, 0, 0, 0, 0, 0], c = Array.isArray || function(e) {
  359. return !!e && "[object Array]" == Object.prototype.toString.call(e)
  360. }
  361. , l = 4294967296;
  362. function h(e, c, h) {
  363. var b = c ? 0 : 4
  364. , x = c ? 4 : 0
  365. , S = c ? 0 : 3
  366. , T = c ? 1 : 2
  367. , I = c ? 2 : 1
  368. , E = c ? 3 : 0
  369. , M = c ? y : v
  370. , A = c ? k : w
  371. , P = O.prototype
  372. , B = "is" + e
  373. , C = "_" + B;
  374. return P.buffer = void 0,
  375. P.offset = 0,
  376. P[C] = !0,
  377. P.toNumber = R,
  378. P.toString = function(e) {
  379. var t = this.buffer
  380. , n = this.offset
  381. , i = _(t, n + b)
  382. , r = _(t, n + x)
  383. , s = ""
  384. , a = !h && 2147483648 & i;
  385. for (a && (i = ~i,
  386. r = l - r),
  387. e = e || 10; ; ) {
  388. var o = i % e * l + r;
  389. if (i = Math.floor(i / e),
  390. r = Math.floor(o / e),
  391. s = (o % e).toString(e) + s,
  392. !i && !r)
  393. break
  394. }
  395. return a && (s = "-" + s),
  396. s
  397. }
  398. ,
  399. P.toJSON = R,
  400. P.toArray = u,
  401. r && (P.toBuffer = f),
  402. s && (P.toArrayBuffer = d),
  403. O[B] = function(e) {
  404. return !(!e || !e[C])
  405. }
  406. ,
  407. t[e] = O,
  408. O;
  409. function O(e, t, r, c) {
  410. return this instanceof O ? function(e, t, r, c, h) {
  411. if (s && a && (t instanceof a && (t = new s(t)),
  412. c instanceof a && (c = new s(c))),
  413. t || r || c || n) {
  414. if (!p(t, r))
  415. h = r,
  416. c = t,
  417. r = 0,
  418. t = new (n || Array)(8);
  419. e.buffer = t,
  420. e.offset = r |= 0,
  421. i !== typeof c && ("string" == typeof c ? function(e, t, n, i) {
  422. var r = 0
  423. , s = n.length
  424. , a = 0
  425. , o = 0;
  426. "-" === n[0] && r++;
  427. for (var c = r; r < s; ) {
  428. var h = parseInt(n[r++], i);
  429. if (!(h >= 0))
  430. break;
  431. o = o * i + h,
  432. a = a * i + Math.floor(o / l),
  433. o %= l
  434. }
  435. c && (a = ~a,
  436. o ? o = l - o : a++),
  437. j(e, t + b, a),
  438. j(e, t + x, o)
  439. }(t, r, c, h || 10) : p(c, h) ? g(t, r, c, h) : "number" == typeof h ? (j(t, r + b, c),
  440. j(t, r + x, h)) : c > 0 ? M(t, r, c) : c < 0 ? A(t, r, c) : g(t, r, o, 0))
  441. } else
  442. e.buffer = m(o, 0)
  443. }(this, e, t, r, c) : new O(e,t,r,c)
  444. }
  445. function R() {
  446. var e = this.buffer
  447. , t = this.offset
  448. , n = _(e, t + b)
  449. , i = _(e, t + x);
  450. return h || (n |= 0),
  451. n ? n * l + i : i
  452. }
  453. function j(e, t, n) {
  454. e[t + E] = 255 & n,
  455. n >>= 8,
  456. e[t + I] = 255 & n,
  457. n >>= 8,
  458. e[t + T] = 255 & n,
  459. n >>= 8,
  460. e[t + S] = 255 & n
  461. }
  462. function _(e, t) {
  463. return 16777216 * e[t + S] + (e[t + T] << 16) + (e[t + I] << 8) + e[t + E]
  464. }
  465. }
  466. function u(e) {
  467. var t = this.buffer
  468. , i = this.offset;
  469. return n = null,
  470. !1 !== e && 0 === i && 8 === t.length && c(t) ? t : m(t, i)
  471. }
  472. function f(t) {
  473. var i = this.buffer
  474. , s = this.offset;
  475. if (n = r,
  476. !1 !== t && 0 === s && 8 === i.length && e.isBuffer(i))
  477. return i;
  478. var a = new r(8);
  479. return g(a, 0, i, s),
  480. a
  481. }
  482. function d(e) {
  483. var t = this.buffer
  484. , i = this.offset
  485. , r = t.buffer;
  486. if (n = s,
  487. !1 !== e && 0 === i && r instanceof a && 8 === r.byteLength)
  488. return r;
  489. var o = new s(8);
  490. return g(o, 0, t, i),
  491. o.buffer
  492. }
  493. function p(e, t) {
  494. var n = e && e.length;
  495. return t |= 0,
  496. n && t + 8 <= n && "string" != typeof e[t]
  497. }
  498. function g(e, t, n, i) {
  499. t |= 0,
  500. i |= 0;
  501. for (var r = 0; r < 8; r++)
  502. e[t++] = 255 & n[i++]
  503. }
  504. function m(e, t) {
  505. return Array.prototype.slice.call(e, t, t + 8)
  506. }
  507. function y(e, t, n) {
  508. for (var i = t + 8; i > t; )
  509. e[--i] = 255 & n,
  510. n /= 256
  511. }
  512. function k(e, t, n) {
  513. var i = t + 8;
  514. for (n++; i > t; )
  515. e[--i] = 255 & -n ^ 255,
  516. n /= 256
  517. }
  518. function v(e, t, n) {
  519. for (var i = t + 8; t < i; )
  520. e[t++] = 255 & n,
  521. n /= 256
  522. }
  523. function w(e, t, n) {
  524. var i = t + 8;
  525. for (n++; t < i; )
  526. e[t++] = 255 & -n ^ 255,
  527. n /= 256
  528. }
  529. h("Uint64BE", !0, !0),
  530. h("Int64BE", !0, !1),
  531. h("Uint64LE", !1, !0),
  532. h("Int64LE", !1, !1)
  533. }("string" != typeof t.nodeName ? t : this || {})
  534. }
  535. ).call(this, n(11).Buffer)
  536. }
  537. , function(e, t, n) {
  538. var i = n(3).ExtBuffer
  539. , r = n(35)
  540. , s = n(17).readUint8
  541. , a = n(36)
  542. , o = n(1);
  543. function c() {
  544. var e = this.options;
  545. return this.decode = function(e) {
  546. var t = a.getReadToken(e);
  547. return function(e) {
  548. var n = s(e)
  549. , i = t[n];
  550. if (!i)
  551. throw new Error("Invalid type: " + (n ? "0x" + n.toString(16) : n));
  552. return i(e)
  553. }
  554. }(e),
  555. e && e.preset && r.setExtUnpackers(this),
  556. this
  557. }
  558. o.install({
  559. addExtUnpacker: function(e, t) {
  560. (this.extUnpackers || (this.extUnpackers = []))[e] = o.filter(t)
  561. },
  562. getExtUnpacker: function(e) {
  563. return (this.extUnpackers || (this.extUnpackers = []))[e] || function(t) {
  564. return new i(t,e)
  565. }
  566. },
  567. init: c
  568. }),
  569. t.preset = c.call(o.preset)
  570. }
  571. , function(e, t, n) {
  572. t.encode = function(e, t) {
  573. var n = new i(t);
  574. return n.write(e),
  575. n.read()
  576. }
  577. ;
  578. var i = n(10).EncodeBuffer
  579. }
  580. , function(e, t, n) {
  581. t.EncodeBuffer = r;
  582. var i = n(2).preset;
  583. function r(e) {
  584. if (!(this instanceof r))
  585. return new r(e);
  586. if (e && (this.options = e,
  587. e.codec)) {
  588. var t = this.codec = e.codec;
  589. t.bufferish && (this.bufferish = t.bufferish)
  590. }
  591. }
  592. n(14).FlexEncoder.mixin(r.prototype),
  593. r.prototype.codec = i,
  594. r.prototype.write = function(e) {
  595. this.codec.encode(this, e)
  596. }
  597. }
  598. , function(e, t, n) {
  599. "use strict";
  600. (function(e) {
  601. /*!
  602. * The buffer module from node.js, for the browser.
  603. *
  604. * @author Feross Aboukhadijeh <http://feross.org>
  605. * @license MIT
  606. */
  607. var i = n(26)
  608. , r = n(4)
  609. , s = n(27);
  610. function a() {
  611. return c.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823
  612. }
  613. function o(e, t) {
  614. if (a() < t)
  615. throw new RangeError("Invalid typed array length");
  616. return c.TYPED_ARRAY_SUPPORT ? (e = new Uint8Array(t)).__proto__ = c.prototype : (null === e && (e = new c(t)),
  617. e.length = t),
  618. e
  619. }
  620. function c(e, t, n) {
  621. if (!(c.TYPED_ARRAY_SUPPORT || this instanceof c))
  622. return new c(e,t,n);
  623. if ("number" == typeof e) {
  624. if ("string" == typeof t)
  625. throw new Error("If encoding is specified then the first argument must be a string");
  626. return u(this, e)
  627. }
  628. return l(this, e, t, n)
  629. }
  630. function l(e, t, n, i) {
  631. if ("number" == typeof t)
  632. throw new TypeError('"value" argument must not be a number');
  633. return "undefined" != typeof ArrayBuffer && t instanceof ArrayBuffer ? function(e, t, n, i) {
  634. if (t.byteLength,
  635. n < 0 || t.byteLength < n)
  636. throw new RangeError("'offset' is out of bounds");
  637. if (t.byteLength < n + (i || 0))
  638. throw new RangeError("'length' is out of bounds");
  639. return t = void 0 === n && void 0 === i ? new Uint8Array(t) : void 0 === i ? new Uint8Array(t,n) : new Uint8Array(t,n,i),
  640. c.TYPED_ARRAY_SUPPORT ? (e = t).__proto__ = c.prototype : e = f(e, t),
  641. e
  642. }(e, t, n, i) : "string" == typeof t ? function(e, t, n) {
  643. if ("string" == typeof n && "" !== n || (n = "utf8"),
  644. !c.isEncoding(n))
  645. throw new TypeError('"encoding" must be a valid string encoding');
  646. var i = 0 | p(t, n)
  647. , r = (e = o(e, i)).write(t, n);
  648. return r !== i && (e = e.slice(0, r)),
  649. e
  650. }(e, t, n) : function(e, t) {
  651. if (c.isBuffer(t)) {
  652. var n = 0 | d(t.length);
  653. return 0 === (e = o(e, n)).length || t.copy(e, 0, 0, n),
  654. e
  655. }
  656. if (t) {
  657. if ("undefined" != typeof ArrayBuffer && t.buffer instanceof ArrayBuffer || "length"in t)
  658. return "number" != typeof t.length || function(e) {
  659. return e != e
  660. }(t.length) ? o(e, 0) : f(e, t);
  661. if ("Buffer" === t.type && s(t.data))
  662. return f(e, t.data)
  663. }
  664. throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")
  665. }(e, t)
  666. }
  667. function h(e) {
  668. if ("number" != typeof e)
  669. throw new TypeError('"size" argument must be a number');
  670. if (e < 0)
  671. throw new RangeError('"size" argument must not be negative')
  672. }
  673. function u(e, t) {
  674. if (h(t),
  675. e = o(e, t < 0 ? 0 : 0 | d(t)),
  676. !c.TYPED_ARRAY_SUPPORT)
  677. for (var n = 0; n < t; ++n)
  678. e[n] = 0;
  679. return e
  680. }
  681. function f(e, t) {
  682. var n = t.length < 0 ? 0 : 0 | d(t.length);
  683. e = o(e, n);
  684. for (var i = 0; i < n; i += 1)
  685. e[i] = 255 & t[i];
  686. return e
  687. }
  688. function d(e) {
  689. if (e >= a())
  690. throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + a().toString(16) + " bytes");
  691. return 0 | e
  692. }
  693. function p(e, t) {
  694. if (c.isBuffer(e))
  695. return e.length;
  696. if ("undefined" != typeof ArrayBuffer && "function" == typeof ArrayBuffer.isView && (ArrayBuffer.isView(e) || e instanceof ArrayBuffer))
  697. return e.byteLength;
  698. "string" != typeof e && (e = "" + e);
  699. var n = e.length;
  700. if (0 === n)
  701. return 0;
  702. for (var i = !1; ; )
  703. switch (t) {
  704. case "ascii":
  705. case "latin1":
  706. case "binary":
  707. return n;
  708. case "utf8":
  709. case "utf-8":
  710. case void 0:
  711. return z(e).length;
  712. case "ucs2":
  713. case "ucs-2":
  714. case "utf16le":
  715. case "utf-16le":
  716. return 2 * n;
  717. case "hex":
  718. return n >>> 1;
  719. case "base64":
  720. return H(e).length;
  721. default:
  722. if (i)
  723. return z(e).length;
  724. t = ("" + t).toLowerCase(),
  725. i = !0
  726. }
  727. }
  728. function g(e, t, n) {
  729. var i = e[t];
  730. e[t] = e[n],
  731. e[n] = i
  732. }
  733. function m(e, t, n, i, r) {
  734. if (0 === e.length)
  735. return -1;
  736. if ("string" == typeof n ? (i = n,
  737. n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648),
  738. n = +n,
  739. isNaN(n) && (n = r ? 0 : e.length - 1),
  740. n < 0 && (n = e.length + n),
  741. n >= e.length) {
  742. if (r)
  743. return -1;
  744. n = e.length - 1
  745. } else if (n < 0) {
  746. if (!r)
  747. return -1;
  748. n = 0
  749. }
  750. if ("string" == typeof t && (t = c.from(t, i)),
  751. c.isBuffer(t))
  752. return 0 === t.length ? -1 : y(e, t, n, i, r);
  753. if ("number" == typeof t)
  754. return t &= 255,
  755. c.TYPED_ARRAY_SUPPORT && "function" == typeof Uint8Array.prototype.indexOf ? r ? Uint8Array.prototype.indexOf.call(e, t, n) : Uint8Array.prototype.lastIndexOf.call(e, t, n) : y(e, [t], n, i, r);
  756. throw new TypeError("val must be string, number or Buffer")
  757. }
  758. function y(e, t, n, i, r) {
  759. var s, a = 1, o = e.length, c = t.length;
  760. if (void 0 !== i && ("ucs2" === (i = String(i).toLowerCase()) || "ucs-2" === i || "utf16le" === i || "utf-16le" === i)) {
  761. if (e.length < 2 || t.length < 2)
  762. return -1;
  763. a = 2,
  764. o /= 2,
  765. c /= 2,
  766. n /= 2
  767. }
  768. function l(e, t) {
  769. return 1 === a ? e[t] : e.readUInt16BE(t * a)
  770. }
  771. if (r) {
  772. var h = -1;
  773. for (s = n; s < o; s++)
  774. if (l(e, s) === l(t, -1 === h ? 0 : s - h)) {
  775. if (-1 === h && (h = s),
  776. s - h + 1 === c)
  777. return h * a
  778. } else
  779. -1 !== h && (s -= s - h),
  780. h = -1
  781. } else
  782. for (n + c > o && (n = o - c),
  783. s = n; s >= 0; s--) {
  784. for (var u = !0, f = 0; f < c; f++)
  785. if (l(e, s + f) !== l(t, f)) {
  786. u = !1;
  787. break
  788. }
  789. if (u)
  790. return s
  791. }
  792. return -1
  793. }
  794. function k(e, t, n, i) {
  795. n = Number(n) || 0;
  796. var r = e.length - n;
  797. i ? (i = Number(i)) > r && (i = r) : i = r;
  798. var s = t.length;
  799. if (s % 2 != 0)
  800. throw new TypeError("Invalid hex string");
  801. i > s / 2 && (i = s / 2);
  802. for (var a = 0; a < i; ++a) {
  803. var o = parseInt(t.substr(2 * a, 2), 16);
  804. if (isNaN(o))
  805. return a;
  806. e[n + a] = o
  807. }
  808. return a
  809. }
  810. function v(e, t, n, i) {
  811. return V(z(t, e.length - n), e, n, i)
  812. }
  813. function w(e, t, n, i) {
  814. return V(function(e) {
  815. for (var t = [], n = 0; n < e.length; ++n)
  816. t.push(255 & e.charCodeAt(n));
  817. return t
  818. }(t), e, n, i)
  819. }
  820. function b(e, t, n, i) {
  821. return w(e, t, n, i)
  822. }
  823. function x(e, t, n, i) {
  824. return V(H(t), e, n, i)
  825. }
  826. function S(e, t, n, i) {
  827. return V(function(e, t) {
  828. for (var n, i, r, s = [], a = 0; a < e.length && !((t -= 2) < 0); ++a)
  829. i = (n = e.charCodeAt(a)) >> 8,
  830. r = n % 256,
  831. s.push(r),
  832. s.push(i);
  833. return s
  834. }(t, e.length - n), e, n, i)
  835. }
  836. function T(e, t, n) {
  837. return 0 === t && n === e.length ? i.fromByteArray(e) : i.fromByteArray(e.slice(t, n))
  838. }
  839. function I(e, t, n) {
  840. n = Math.min(e.length, n);
  841. for (var i = [], r = t; r < n; ) {
  842. var s, a, o, c, l = e[r], h = null, u = l > 239 ? 4 : l > 223 ? 3 : l > 191 ? 2 : 1;
  843. if (r + u <= n)
  844. switch (u) {
  845. case 1:
  846. l < 128 && (h = l);
  847. break;
  848. case 2:
  849. 128 == (192 & (s = e[r + 1])) && (c = (31 & l) << 6 | 63 & s) > 127 && (h = c);
  850. break;
  851. case 3:
  852. s = e[r + 1],
  853. a = e[r + 2],
  854. 128 == (192 & s) && 128 == (192 & a) && (c = (15 & l) << 12 | (63 & s) << 6 | 63 & a) > 2047 && (c < 55296 || c > 57343) && (h = c);
  855. break;
  856. case 4:
  857. s = e[r + 1],
  858. a = e[r + 2],
  859. o = e[r + 3],
  860. 128 == (192 & s) && 128 == (192 & a) && 128 == (192 & o) && (c = (15 & l) << 18 | (63 & s) << 12 | (63 & a) << 6 | 63 & o) > 65535 && c < 1114112 && (h = c)
  861. }
  862. null === h ? (h = 65533,
  863. u = 1) : h > 65535 && (h -= 65536,
  864. i.push(h >>> 10 & 1023 | 55296),
  865. h = 56320 | 1023 & h),
  866. i.push(h),
  867. r += u
  868. }
  869. return function(e) {
  870. var t = e.length;
  871. if (t <= E)
  872. return String.fromCharCode.apply(String, e);
  873. for (var n = "", i = 0; i < t; )
  874. n += String.fromCharCode.apply(String, e.slice(i, i += E));
  875. return n
  876. }(i)
  877. }
  878. t.Buffer = c,
  879. t.SlowBuffer = function(e) {
  880. return +e != e && (e = 0),
  881. c.alloc(+e)
  882. }
  883. ,
  884. t.INSPECT_MAX_BYTES = 50,
  885. c.TYPED_ARRAY_SUPPORT = void 0 !== e.TYPED_ARRAY_SUPPORT ? e.TYPED_ARRAY_SUPPORT : function() {
  886. try {
  887. var e = new Uint8Array(1);
  888. return e.__proto__ = {
  889. __proto__: Uint8Array.prototype,
  890. foo: function() {
  891. return 42
  892. }
  893. },
  894. 42 === e.foo() && "function" == typeof e.subarray && 0 === e.subarray(1, 1).byteLength
  895. } catch (e) {
  896. return !1
  897. }
  898. }(),
  899. t.kMaxLength = a(),
  900. c.poolSize = 8192,
  901. c._augment = function(e) {
  902. return e.__proto__ = c.prototype,
  903. e
  904. }
  905. ,
  906. c.from = function(e, t, n) {
  907. return l(null, e, t, n)
  908. }
  909. ,
  910. c.TYPED_ARRAY_SUPPORT && (c.prototype.__proto__ = Uint8Array.prototype,
  911. c.__proto__ = Uint8Array,
  912. "undefined" != typeof Symbol && Symbol.species && c[Symbol.species] === c && Object.defineProperty(c, Symbol.species, {
  913. value: null,
  914. configurable: !0
  915. })),
  916. c.alloc = function(e, t, n) {
  917. return function(e, t, n, i) {
  918. return h(t),
  919. t <= 0 ? o(e, t) : void 0 !== n ? "string" == typeof i ? o(e, t).fill(n, i) : o(e, t).fill(n) : o(e, t)
  920. }(null, e, t, n)
  921. }
  922. ,
  923. c.allocUnsafe = function(e) {
  924. return u(null, e)
  925. }
  926. ,
  927. c.allocUnsafeSlow = function(e) {
  928. return u(null, e)
  929. }
  930. ,
  931. c.isBuffer = function(e) {
  932. return !(null == e || !e._isBuffer)
  933. }
  934. ,
  935. c.compare = function(e, t) {
  936. if (!c.isBuffer(e) || !c.isBuffer(t))
  937. throw new TypeError("Arguments must be Buffers");
  938. if (e === t)
  939. return 0;
  940. for (var n = e.length, i = t.length, r = 0, s = Math.min(n, i); r < s; ++r)
  941. if (e[r] !== t[r]) {
  942. n = e[r],
  943. i = t[r];
  944. break
  945. }
  946. return n < i ? -1 : i < n ? 1 : 0
  947. }
  948. ,
  949. c.isEncoding = function(e) {
  950. switch (String(e).toLowerCase()) {
  951. case "hex":
  952. case "utf8":
  953. case "utf-8":
  954. case "ascii":
  955. case "latin1":
  956. case "binary":
  957. case "base64":
  958. case "ucs2":
  959. case "ucs-2":
  960. case "utf16le":
  961. case "utf-16le":
  962. return !0;
  963. default:
  964. return !1
  965. }
  966. }
  967. ,
  968. c.concat = function(e, t) {
  969. if (!s(e))
  970. throw new TypeError('"list" argument must be an Array of Buffers');
  971. if (0 === e.length)
  972. return c.alloc(0);
  973. var n;
  974. if (void 0 === t)
  975. for (t = 0,
  976. n = 0; n < e.length; ++n)
  977. t += e[n].length;
  978. var i = c.allocUnsafe(t)
  979. , r = 0;
  980. for (n = 0; n < e.length; ++n) {
  981. var a = e[n];
  982. if (!c.isBuffer(a))
  983. throw new TypeError('"list" argument must be an Array of Buffers');
  984. a.copy(i, r),
  985. r += a.length
  986. }
  987. return i
  988. }
  989. ,
  990. c.byteLength = p,
  991. c.prototype._isBuffer = !0,
  992. c.prototype.swap16 = function() {
  993. var e = this.length;
  994. if (e % 2 != 0)
  995. throw new RangeError("Buffer size must be a multiple of 16-bits");
  996. for (var t = 0; t < e; t += 2)
  997. g(this, t, t + 1);
  998. return this
  999. }
  1000. ,
  1001. c.prototype.swap32 = function() {
  1002. var e = this.length;
  1003. if (e % 4 != 0)
  1004. throw new RangeError("Buffer size must be a multiple of 32-bits");
  1005. for (var t = 0; t < e; t += 4)
  1006. g(this, t, t + 3),
  1007. g(this, t + 1, t + 2);
  1008. return this
  1009. }
  1010. ,
  1011. c.prototype.swap64 = function() {
  1012. var e = this.length;
  1013. if (e % 8 != 0)
  1014. throw new RangeError("Buffer size must be a multiple of 64-bits");
  1015. for (var t = 0; t < e; t += 8)
  1016. g(this, t, t + 7),
  1017. g(this, t + 1, t + 6),
  1018. g(this, t + 2, t + 5),
  1019. g(this, t + 3, t + 4);
  1020. return this
  1021. }
  1022. ,
  1023. c.prototype.toString = function() {
  1024. var e = 0 | this.length;
  1025. return 0 === e ? "" : 0 === arguments.length ? I(this, 0, e) : function(e, t, n) {
  1026. var i = !1;
  1027. if ((void 0 === t || t < 0) && (t = 0),
  1028. t > this.length)
  1029. return "";
  1030. if ((void 0 === n || n > this.length) && (n = this.length),
  1031. n <= 0)
  1032. return "";
  1033. if ((n >>>= 0) <= (t >>>= 0))
  1034. return "";
  1035. for (e || (e = "utf8"); ; )
  1036. switch (e) {
  1037. case "hex":
  1038. return P(this, t, n);
  1039. case "utf8":
  1040. case "utf-8":
  1041. return I(this, t, n);
  1042. case "ascii":
  1043. return M(this, t, n);
  1044. case "latin1":
  1045. case "binary":
  1046. return A(this, t, n);
  1047. case "base64":
  1048. return T(this, t, n);
  1049. case "ucs2":
  1050. case "ucs-2":
  1051. case "utf16le":
  1052. case "utf-16le":
  1053. return B(this, t, n);
  1054. default:
  1055. if (i)
  1056. throw new TypeError("Unknown encoding: " + e);
  1057. e = (e + "").toLowerCase(),
  1058. i = !0
  1059. }
  1060. }
  1061. .apply(this, arguments)
  1062. }
  1063. ,
  1064. c.prototype.equals = function(e) {
  1065. if (!c.isBuffer(e))
  1066. throw new TypeError("Argument must be a Buffer");
  1067. return this === e || 0 === c.compare(this, e)
  1068. }
  1069. ,
  1070. c.prototype.inspect = function() {
  1071. var e = ""
  1072. , n = t.INSPECT_MAX_BYTES;
  1073. return this.length > 0 && (e = this.toString("hex", 0, n).match(/.{2}/g).join(" "),
  1074. this.length > n && (e += " ... ")),
  1075. "<Buffer " + e + ">"
  1076. }
  1077. ,
  1078. c.prototype.compare = function(e, t, n, i, r) {
  1079. if (!c.isBuffer(e))
  1080. throw new TypeError("Argument must be a Buffer");
  1081. if (void 0 === t && (t = 0),
  1082. void 0 === n && (n = e ? e.length : 0),
  1083. void 0 === i && (i = 0),
  1084. void 0 === r && (r = this.length),
  1085. t < 0 || n > e.length || i < 0 || r > this.length)
  1086. throw new RangeError("out of range index");
  1087. if (i >= r && t >= n)
  1088. return 0;
  1089. if (i >= r)
  1090. return -1;
  1091. if (t >= n)
  1092. return 1;
  1093. if (this === e)
  1094. return 0;
  1095. for (var s = (r >>>= 0) - (i >>>= 0), a = (n >>>= 0) - (t >>>= 0), o = Math.min(s, a), l = this.slice(i, r), h = e.slice(t, n), u = 0; u < o; ++u)
  1096. if (l[u] !== h[u]) {
  1097. s = l[u],
  1098. a = h[u];
  1099. break
  1100. }
  1101. return s < a ? -1 : a < s ? 1 : 0
  1102. }
  1103. ,
  1104. c.prototype.includes = function(e, t, n) {
  1105. return -1 !== this.indexOf(e, t, n)
  1106. }
  1107. ,
  1108. c.prototype.indexOf = function(e, t, n) {
  1109. return m(this, e, t, n, !0)
  1110. }
  1111. ,
  1112. c.prototype.lastIndexOf = function(e, t, n) {
  1113. return m(this, e, t, n, !1)
  1114. }
  1115. ,
  1116. c.prototype.write = function(e, t, n, i) {
  1117. if (void 0 === t)
  1118. i = "utf8",
  1119. n = this.length,
  1120. t = 0;
  1121. else if (void 0 === n && "string" == typeof t)
  1122. i = t,
  1123. n = this.length,
  1124. t = 0;
  1125. else {
  1126. if (!isFinite(t))
  1127. throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
  1128. t |= 0,
  1129. isFinite(n) ? (n |= 0,
  1130. void 0 === i && (i = "utf8")) : (i = n,
  1131. n = void 0)
  1132. }
  1133. var r = this.length - t;
  1134. if ((void 0 === n || n > r) && (n = r),
  1135. e.length > 0 && (n < 0 || t < 0) || t > this.length)
  1136. throw new RangeError("Attempt to write outside buffer bounds");
  1137. i || (i = "utf8");
  1138. for (var s = !1; ; )
  1139. switch (i) {
  1140. case "hex":
  1141. return k(this, e, t, n);
  1142. case "utf8":
  1143. case "utf-8":
  1144. return v(this, e, t, n);
  1145. case "ascii":
  1146. return w(this, e, t, n);
  1147. case "latin1":
  1148. case "binary":
  1149. return b(this, e, t, n);
  1150. case "base64":
  1151. return x(this, e, t, n);
  1152. case "ucs2":
  1153. case "ucs-2":
  1154. case "utf16le":
  1155. case "utf-16le":
  1156. return S(this, e, t, n);
  1157. default:
  1158. if (s)
  1159. throw new TypeError("Unknown encoding: " + i);
  1160. i = ("" + i).toLowerCase(),
  1161. s = !0
  1162. }
  1163. }
  1164. ,
  1165. c.prototype.toJSON = function() {
  1166. return {
  1167. type: "Buffer",
  1168. data: Array.prototype.slice.call(this._arr || this, 0)
  1169. }
  1170. }
  1171. ;
  1172. var E = 4096;
  1173. function M(e, t, n) {
  1174. var i = "";
  1175. n = Math.min(e.length, n);
  1176. for (var r = t; r < n; ++r)
  1177. i += String.fromCharCode(127 & e[r]);
  1178. return i
  1179. }
  1180. function A(e, t, n) {
  1181. var i = "";
  1182. n = Math.min(e.length, n);
  1183. for (var r = t; r < n; ++r)
  1184. i += String.fromCharCode(e[r]);
  1185. return i
  1186. }
  1187. function P(e, t, n) {
  1188. var i = e.length;
  1189. (!t || t < 0) && (t = 0),
  1190. (!n || n < 0 || n > i) && (n = i);
  1191. for (var r = "", s = t; s < n; ++s)
  1192. r += F(e[s]);
  1193. return r
  1194. }
  1195. function B(e, t, n) {
  1196. for (var i = e.slice(t, n), r = "", s = 0; s < i.length; s += 2)
  1197. r += String.fromCharCode(i[s] + 256 * i[s + 1]);
  1198. return r
  1199. }
  1200. function C(e, t, n) {
  1201. if (e % 1 != 0 || e < 0)
  1202. throw new RangeError("offset is not uint");
  1203. if (e + t > n)
  1204. throw new RangeError("Trying to access beyond buffer length")
  1205. }
  1206. function O(e, t, n, i, r, s) {
  1207. if (!c.isBuffer(e))
  1208. throw new TypeError('"buffer" argument must be a Buffer instance');
  1209. if (t > r || t < s)
  1210. throw new RangeError('"value" argument is out of bounds');
  1211. if (n + i > e.length)
  1212. throw new RangeError("Index out of range")
  1213. }
  1214. function R(e, t, n, i) {
  1215. t < 0 && (t = 65535 + t + 1);
  1216. for (var r = 0, s = Math.min(e.length - n, 2); r < s; ++r)
  1217. e[n + r] = (t & 255 << 8 * (i ? r : 1 - r)) >>> 8 * (i ? r : 1 - r)
  1218. }
  1219. function j(e, t, n, i) {
  1220. t < 0 && (t = 4294967295 + t + 1);
  1221. for (var r = 0, s = Math.min(e.length - n, 4); r < s; ++r)
  1222. e[n + r] = t >>> 8 * (i ? r : 3 - r) & 255
  1223. }
  1224. function _(e, t, n, i, r, s) {
  1225. if (n + i > e.length)
  1226. throw new RangeError("Index out of range");
  1227. if (n < 0)
  1228. throw new RangeError("Index out of range")
  1229. }
  1230. function U(e, t, n, i, s) {
  1231. return s || _(e, 0, n, 4),
  1232. r.write(e, t, n, i, 23, 4),
  1233. n + 4
  1234. }
  1235. function D(e, t, n, i, s) {
  1236. return s || _(e, 0, n, 8),
  1237. r.write(e, t, n, i, 52, 8),
  1238. n + 8
  1239. }
  1240. c.prototype.slice = function(e, t) {
  1241. var n, i = this.length;
  1242. if ((e = ~~e) < 0 ? (e += i) < 0 && (e = 0) : e > i && (e = i),
  1243. (t = void 0 === t ? i : ~~t) < 0 ? (t += i) < 0 && (t = 0) : t > i && (t = i),
  1244. t < e && (t = e),
  1245. c.TYPED_ARRAY_SUPPORT)
  1246. (n = this.subarray(e, t)).__proto__ = c.prototype;
  1247. else {
  1248. var r = t - e;
  1249. n = new c(r,void 0);
  1250. for (var s = 0; s < r; ++s)
  1251. n[s] = this[s + e]
  1252. }
  1253. return n
  1254. }
  1255. ,
  1256. c.prototype.readUIntLE = function(e, t, n) {
  1257. e |= 0,
  1258. t |= 0,
  1259. n || C(e, t, this.length);
  1260. for (var i = this[e], r = 1, s = 0; ++s < t && (r *= 256); )
  1261. i += this[e + s] * r;
  1262. return i
  1263. }
  1264. ,
  1265. c.prototype.readUIntBE = function(e, t, n) {
  1266. e |= 0,
  1267. t |= 0,
  1268. n || C(e, t, this.length);
  1269. for (var i = this[e + --t], r = 1; t > 0 && (r *= 256); )
  1270. i += this[e + --t] * r;
  1271. return i
  1272. }
  1273. ,
  1274. c.prototype.readUInt8 = function(e, t) {
  1275. return t || C(e, 1, this.length),
  1276. this[e]
  1277. }
  1278. ,
  1279. c.prototype.readUInt16LE = function(e, t) {
  1280. return t || C(e, 2, this.length),
  1281. this[e] | this[e + 1] << 8
  1282. }
  1283. ,
  1284. c.prototype.readUInt16BE = function(e, t) {
  1285. return t || C(e, 2, this.length),
  1286. this[e] << 8 | this[e + 1]
  1287. }
  1288. ,
  1289. c.prototype.readUInt32LE = function(e, t) {
  1290. return t || C(e, 4, this.length),
  1291. (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + 16777216 * this[e + 3]
  1292. }
  1293. ,
  1294. c.prototype.readUInt32BE = function(e, t) {
  1295. return t || C(e, 4, this.length),
  1296. 16777216 * this[e] + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3])
  1297. }
  1298. ,
  1299. c.prototype.readIntLE = function(e, t, n) {
  1300. e |= 0,
  1301. t |= 0,
  1302. n || C(e, t, this.length);
  1303. for (var i = this[e], r = 1, s = 0; ++s < t && (r *= 256); )
  1304. i += this[e + s] * r;
  1305. return i >= (r *= 128) && (i -= Math.pow(2, 8 * t)),
  1306. i
  1307. }
  1308. ,
  1309. c.prototype.readIntBE = function(e, t, n) {
  1310. e |= 0,
  1311. t |= 0,
  1312. n || C(e, t, this.length);
  1313. for (var i = t, r = 1, s = this[e + --i]; i > 0 && (r *= 256); )
  1314. s += this[e + --i] * r;
  1315. return s >= (r *= 128) && (s -= Math.pow(2, 8 * t)),
  1316. s
  1317. }
  1318. ,
  1319. c.prototype.readInt8 = function(e, t) {
  1320. return t || C(e, 1, this.length),
  1321. 128 & this[e] ? -1 * (255 - this[e] + 1) : this[e]
  1322. }
  1323. ,
  1324. c.prototype.readInt16LE = function(e, t) {
  1325. t || C(e, 2, this.length);
  1326. var n = this[e] | this[e + 1] << 8;
  1327. return 32768 & n ? 4294901760 | n : n
  1328. }
  1329. ,
  1330. c.prototype.readInt16BE = function(e, t) {
  1331. t || C(e, 2, this.length);
  1332. var n = this[e + 1] | this[e] << 8;
  1333. return 32768 & n ? 4294901760 | n : n
  1334. }
  1335. ,
  1336. c.prototype.readInt32LE = function(e, t) {
  1337. return t || C(e, 4, this.length),
  1338. this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24
  1339. }
  1340. ,
  1341. c.prototype.readInt32BE = function(e, t) {
  1342. return t || C(e, 4, this.length),
  1343. this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]
  1344. }
  1345. ,
  1346. c.prototype.readFloatLE = function(e, t) {
  1347. return t || C(e, 4, this.length),
  1348. r.read(this, e, !0, 23, 4)
  1349. }
  1350. ,
  1351. c.prototype.readFloatBE = function(e, t) {
  1352. return t || C(e, 4, this.length),
  1353. r.read(this, e, !1, 23, 4)
  1354. }
  1355. ,
  1356. c.prototype.readDoubleLE = function(e, t) {
  1357. return t || C(e, 8, this.length),
  1358. r.read(this, e, !0, 52, 8)
  1359. }
  1360. ,
  1361. c.prototype.readDoubleBE = function(e, t) {
  1362. return t || C(e, 8, this.length),
  1363. r.read(this, e, !1, 52, 8)
  1364. }
  1365. ,
  1366. c.prototype.writeUIntLE = function(e, t, n, i) {
  1367. e = +e,
  1368. t |= 0,
  1369. n |= 0,
  1370. i || O(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
  1371. var r = 1
  1372. , s = 0;
  1373. for (this[t] = 255 & e; ++s < n && (r *= 256); )
  1374. this[t + s] = e / r & 255;
  1375. return t + n
  1376. }
  1377. ,
  1378. c.prototype.writeUIntBE = function(e, t, n, i) {
  1379. e = +e,
  1380. t |= 0,
  1381. n |= 0,
  1382. i || O(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
  1383. var r = n - 1
  1384. , s = 1;
  1385. for (this[t + r] = 255 & e; --r >= 0 && (s *= 256); )
  1386. this[t + r] = e / s & 255;
  1387. return t + n
  1388. }
  1389. ,
  1390. c.prototype.writeUInt8 = function(e, t, n) {
  1391. return e = +e,
  1392. t |= 0,
  1393. n || O(this, e, t, 1, 255, 0),
  1394. c.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)),
  1395. this[t] = 255 & e,
  1396. t + 1
  1397. }
  1398. ,
  1399. c.prototype.writeUInt16LE = function(e, t, n) {
  1400. return e = +e,
  1401. t |= 0,
  1402. n || O(this, e, t, 2, 65535, 0),
  1403. c.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e,
  1404. this[t + 1] = e >>> 8) : R(this, e, t, !0),
  1405. t + 2
  1406. }
  1407. ,
  1408. c.prototype.writeUInt16BE = function(e, t, n) {
  1409. return e = +e,
  1410. t |= 0,
  1411. n || O(this, e, t, 2, 65535, 0),
  1412. c.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8,
  1413. this[t + 1] = 255 & e) : R(this, e, t, !1),
  1414. t + 2
  1415. }
  1416. ,
  1417. c.prototype.writeUInt32LE = function(e, t, n) {
  1418. return e = +e,
  1419. t |= 0,
  1420. n || O(this, e, t, 4, 4294967295, 0),
  1421. c.TYPED_ARRAY_SUPPORT ? (this[t + 3] = e >>> 24,
  1422. this[t + 2] = e >>> 16,
  1423. this[t + 1] = e >>> 8,
  1424. this[t] = 255 & e) : j(this, e, t, !0),
  1425. t + 4
  1426. }
  1427. ,
  1428. c.prototype.writeUInt32BE = function(e, t, n) {
  1429. return e = +e,
  1430. t |= 0,
  1431. n || O(this, e, t, 4, 4294967295, 0),
  1432. c.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24,
  1433. this[t + 1] = e >>> 16,
  1434. this[t + 2] = e >>> 8,
  1435. this[t + 3] = 255 & e) : j(this, e, t, !1),
  1436. t + 4
  1437. }
  1438. ,
  1439. c.prototype.writeIntLE = function(e, t, n, i) {
  1440. if (e = +e,
  1441. t |= 0,
  1442. !i) {
  1443. var r = Math.pow(2, 8 * n - 1);
  1444. O(this, e, t, n, r - 1, -r)
  1445. }
  1446. var s = 0
  1447. , a = 1
  1448. , o = 0;
  1449. for (this[t] = 255 & e; ++s < n && (a *= 256); )
  1450. e < 0 && 0 === o && 0 !== this[t + s - 1] && (o = 1),
  1451. this[t + s] = (e / a >> 0) - o & 255;
  1452. return t + n
  1453. }
  1454. ,
  1455. c.prototype.writeIntBE = function(e, t, n, i) {
  1456. if (e = +e,
  1457. t |= 0,
  1458. !i) {
  1459. var r = Math.pow(2, 8 * n - 1);
  1460. O(this, e, t, n, r - 1, -r)
  1461. }
  1462. var s = n - 1
  1463. , a = 1
  1464. , o = 0;
  1465. for (this[t + s] = 255 & e; --s >= 0 && (a *= 256); )
  1466. e < 0 && 0 === o && 0 !== this[t + s + 1] && (o = 1),
  1467. this[t + s] = (e / a >> 0) - o & 255;
  1468. return t + n
  1469. }
  1470. ,
  1471. c.prototype.writeInt8 = function(e, t, n) {
  1472. return e = +e,
  1473. t |= 0,
  1474. n || O(this, e, t, 1, 127, -128),
  1475. c.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)),
  1476. e < 0 && (e = 255 + e + 1),
  1477. this[t] = 255 & e,
  1478. t + 1
  1479. }
  1480. ,
  1481. c.prototype.writeInt16LE = function(e, t, n) {
  1482. return e = +e,
  1483. t |= 0,
  1484. n || O(this, e, t, 2, 32767, -32768),
  1485. c.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e,
  1486. this[t + 1] = e >>> 8) : R(this, e, t, !0),
  1487. t + 2
  1488. }
  1489. ,
  1490. c.prototype.writeInt16BE = function(e, t, n) {
  1491. return e = +e,
  1492. t |= 0,
  1493. n || O(this, e, t, 2, 32767, -32768),
  1494. c.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8,
  1495. this[t + 1] = 255 & e) : R(this, e, t, !1),
  1496. t + 2
  1497. }
  1498. ,
  1499. c.prototype.writeInt32LE = function(e, t, n) {
  1500. return e = +e,
  1501. t |= 0,
  1502. n || O(this, e, t, 4, 2147483647, -2147483648),
  1503. c.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e,
  1504. this[t + 1] = e >>> 8,
  1505. this[t + 2] = e >>> 16,
  1506. this[t + 3] = e >>> 24) : j(this, e, t, !0),
  1507. t + 4
  1508. }
  1509. ,
  1510. c.prototype.writeInt32BE = function(e, t, n) {
  1511. return e = +e,
  1512. t |= 0,
  1513. n || O(this, e, t, 4, 2147483647, -2147483648),
  1514. e < 0 && (e = 4294967295 + e + 1),
  1515. c.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24,
  1516. this[t + 1] = e >>> 16,
  1517. this[t + 2] = e >>> 8,
  1518. this[t + 3] = 255 & e) : j(this, e, t, !1),
  1519. t + 4
  1520. }
  1521. ,
  1522. c.prototype.writeFloatLE = function(e, t, n) {
  1523. return U(this, e, t, !0, n)
  1524. }
  1525. ,
  1526. c.prototype.writeFloatBE = function(e, t, n) {
  1527. return U(this, e, t, !1, n)
  1528. }
  1529. ,
  1530. c.prototype.writeDoubleLE = function(e, t, n) {
  1531. return D(this, e, t, !0, n)
  1532. }
  1533. ,
  1534. c.prototype.writeDoubleBE = function(e, t, n) {
  1535. return D(this, e, t, !1, n)
  1536. }
  1537. ,
  1538. c.prototype.copy = function(e, t, n, i) {
  1539. if (n || (n = 0),
  1540. i || 0 === i || (i = this.length),
  1541. t >= e.length && (t = e.length),
  1542. t || (t = 0),
  1543. i > 0 && i < n && (i = n),
  1544. i === n)
  1545. return 0;
  1546. if (0 === e.length || 0 === this.length)
  1547. return 0;
  1548. if (t < 0)
  1549. throw new RangeError("targetStart out of bounds");
  1550. if (n < 0 || n >= this.length)
  1551. throw new RangeError("sourceStart out of bounds");
  1552. if (i < 0)
  1553. throw new RangeError("sourceEnd out of bounds");
  1554. i > this.length && (i = this.length),
  1555. e.length - t < i - n && (i = e.length - t + n);
  1556. var r, s = i - n;
  1557. if (this === e && n < t && t < i)
  1558. for (r = s - 1; r >= 0; --r)
  1559. e[r + t] = this[r + n];
  1560. else if (s < 1e3 || !c.TYPED_ARRAY_SUPPORT)
  1561. for (r = 0; r < s; ++r)
  1562. e[r + t] = this[r + n];
  1563. else
  1564. Uint8Array.prototype.set.call(e, this.subarray(n, n + s), t);
  1565. return s
  1566. }
  1567. ,
  1568. c.prototype.fill = function(e, t, n, i) {
  1569. if ("string" == typeof e) {
  1570. if ("string" == typeof t ? (i = t,
  1571. t = 0,
  1572. n = this.length) : "string" == typeof n && (i = n,
  1573. n = this.length),
  1574. 1 === e.length) {
  1575. var r = e.charCodeAt(0);
  1576. r < 256 && (e = r)
  1577. }
  1578. if (void 0 !== i && "string" != typeof i)
  1579. throw new TypeError("encoding must be a string");
  1580. if ("string" == typeof i && !c.isEncoding(i))
  1581. throw new TypeError("Unknown encoding: " + i)
  1582. } else
  1583. "number" == typeof e && (e &= 255);
  1584. if (t < 0 || this.length < t || this.length < n)
  1585. throw new RangeError("Out of range index");
  1586. if (n <= t)
  1587. return this;
  1588. var s;
  1589. if (t >>>= 0,
  1590. n = void 0 === n ? this.length : n >>> 0,
  1591. e || (e = 0),
  1592. "number" == typeof e)
  1593. for (s = t; s < n; ++s)
  1594. this[s] = e;
  1595. else {
  1596. var a = c.isBuffer(e) ? e : z(new c(e,i).toString())
  1597. , o = a.length;
  1598. for (s = 0; s < n - t; ++s)
  1599. this[s + t] = a[s % o]
  1600. }
  1601. return this
  1602. }
  1603. ;
  1604. var L = /[^+\/0-9A-Za-z-_]/g;
  1605. function F(e) {
  1606. return e < 16 ? "0" + e.toString(16) : e.toString(16)
  1607. }
  1608. function z(e, t) {
  1609. var n;
  1610. t = t || 1 / 0;
  1611. for (var i = e.length, r = null, s = [], a = 0; a < i; ++a) {
  1612. if ((n = e.charCodeAt(a)) > 55295 && n < 57344) {
  1613. if (!r) {
  1614. if (n > 56319) {
  1615. (t -= 3) > -1 && s.push(239, 191, 189);
  1616. continue
  1617. }
  1618. if (a + 1 === i) {
  1619. (t -= 3) > -1 && s.push(239, 191, 189);
  1620. continue
  1621. }
  1622. r = n;
  1623. continue
  1624. }
  1625. if (n < 56320) {
  1626. (t -= 3) > -1 && s.push(239, 191, 189),
  1627. r = n;
  1628. continue
  1629. }
  1630. n = 65536 + (r - 55296 << 10 | n - 56320)
  1631. } else
  1632. r && (t -= 3) > -1 && s.push(239, 191, 189);
  1633. if (r = null,
  1634. n < 128) {
  1635. if ((t -= 1) < 0)
  1636. break;
  1637. s.push(n)
  1638. } else if (n < 2048) {
  1639. if ((t -= 2) < 0)
  1640. break;
  1641. s.push(n >> 6 | 192, 63 & n | 128)
  1642. } else if (n < 65536) {
  1643. if ((t -= 3) < 0)
  1644. break;
  1645. s.push(n >> 12 | 224, n >> 6 & 63 | 128, 63 & n | 128)
  1646. } else {
  1647. if (!(n < 1114112))
  1648. throw new Error("Invalid code point");
  1649. if ((t -= 4) < 0)
  1650. break;
  1651. s.push(n >> 18 | 240, n >> 12 & 63 | 128, n >> 6 & 63 | 128, 63 & n | 128)
  1652. }
  1653. }
  1654. return s
  1655. }
  1656. function H(e) {
  1657. return i.toByteArray(function(e) {
  1658. if ((e = function(e) {
  1659. return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "")
  1660. }(e).replace(L, "")).length < 2)
  1661. return "";
  1662. for (; e.length % 4 != 0; )
  1663. e += "=";
  1664. return e
  1665. }(e))
  1666. }
  1667. function V(e, t, n, i) {
  1668. for (var r = 0; r < i && !(r + n >= t.length || r >= e.length); ++r)
  1669. t[r + n] = e[r];
  1670. return r
  1671. }
  1672. }
  1673. ).call(this, n(12))
  1674. }
  1675. , function(e, t) {
  1676. var n;
  1677. n = function() {
  1678. return this
  1679. }();
  1680. try {
  1681. n = n || new Function("return this")()
  1682. } catch (e) {
  1683. "object" == typeof window && (n = window)
  1684. }
  1685. e.exports = n
  1686. }
  1687. , function(e, t) {
  1688. for (var n = t.uint8 = new Array(256), i = 0; i <= 255; i++)
  1689. n[i] = r(i);
  1690. function r(e) {
  1691. return function(t) {
  1692. var n = t.reserve(1);
  1693. t.buffer[n] = e
  1694. }
  1695. }
  1696. }
  1697. , function(e, t, n) {
  1698. t.FlexDecoder = s,
  1699. t.FlexEncoder = a;
  1700. var i = n(0)
  1701. , r = "BUFFER_SHORTAGE";
  1702. function s() {
  1703. if (!(this instanceof s))
  1704. return new s
  1705. }
  1706. function a() {
  1707. if (!(this instanceof a))
  1708. return new a
  1709. }
  1710. function o() {
  1711. throw new Error("method not implemented: write()")
  1712. }
  1713. function c() {
  1714. throw new Error("method not implemented: fetch()")
  1715. }
  1716. function l() {
  1717. return this.buffers && this.buffers.length ? (this.flush(),
  1718. this.pull()) : this.fetch()
  1719. }
  1720. function h(e) {
  1721. (this.buffers || (this.buffers = [])).push(e)
  1722. }
  1723. function u() {
  1724. return (this.buffers || (this.buffers = [])).shift()
  1725. }
  1726. function f(e) {
  1727. return function(t) {
  1728. for (var n in e)
  1729. t[n] = e[n];
  1730. return t
  1731. }
  1732. }
  1733. s.mixin = f({
  1734. bufferish: i,
  1735. write: function(e) {
  1736. var t = this.offset ? i.prototype.slice.call(this.buffer, this.offset) : this.buffer;
  1737. this.buffer = t ? e ? this.bufferish.concat([t, e]) : t : e,
  1738. this.offset = 0
  1739. },
  1740. fetch: c,
  1741. flush: function() {
  1742. for (; this.offset < this.buffer.length; ) {
  1743. var e, t = this.offset;
  1744. try {
  1745. e = this.fetch()
  1746. } catch (e) {
  1747. if (e && e.message != r)
  1748. throw e;
  1749. this.offset = t;
  1750. break
  1751. }
  1752. this.push(e)
  1753. }
  1754. },
  1755. push: h,
  1756. pull: u,
  1757. read: l,
  1758. reserve: function(e) {
  1759. var t = this.offset
  1760. , n = t + e;
  1761. if (n > this.buffer.length)
  1762. throw new Error(r);
  1763. return this.offset = n,
  1764. t
  1765. },
  1766. offset: 0
  1767. }),
  1768. s.mixin(s.prototype),
  1769. a.mixin = f({
  1770. bufferish: i,
  1771. write: o,
  1772. fetch: function() {
  1773. var e = this.start;
  1774. if (e < this.offset) {
  1775. var t = this.start = this.offset;
  1776. return i.prototype.slice.call(this.buffer, e, t)
  1777. }
  1778. },
  1779. flush: function() {
  1780. for (; this.start < this.offset; ) {
  1781. var e = this.fetch();
  1782. e && this.push(e)
  1783. }
  1784. },
  1785. push: h,
  1786. pull: function() {
  1787. var e = this.buffers || (this.buffers = [])
  1788. , t = e.length > 1 ? this.bufferish.concat(e) : e[0];
  1789. return e.length = 0,
  1790. t
  1791. },
  1792. read: l,
  1793. reserve: function(e) {
  1794. var t = 0 | e;
  1795. if (this.buffer) {
  1796. var n = this.buffer.length
  1797. , i = 0 | this.offset
  1798. , r = i + t;
  1799. if (r < n)
  1800. return this.offset = r,
  1801. i;
  1802. this.flush(),
  1803. e = Math.max(e, Math.min(2 * n, this.maxBufferSize))
  1804. }
  1805. return e = Math.max(e, this.minBufferSize),
  1806. this.buffer = this.bufferish.alloc(e),
  1807. this.start = 0,
  1808. this.offset = t,
  1809. 0
  1810. },
  1811. send: function(e) {
  1812. var t = e.length;
  1813. if (t > this.minBufferSize)
  1814. this.flush(),
  1815. this.push(e);
  1816. else {
  1817. var n = this.reserve(t);
  1818. i.prototype.copy.call(e, this.buffer, n)
  1819. }
  1820. },
  1821. maxBufferSize: 65536,
  1822. minBufferSize: 2048,
  1823. offset: 0,
  1824. start: 0
  1825. }),
  1826. a.mixin(a.prototype)
  1827. }
  1828. , function(e, t, n) {
  1829. t.decode = function(e, t) {
  1830. var n = new i(t);
  1831. return n.write(e),
  1832. n.read()
  1833. }
  1834. ;
  1835. var i = n(16).DecodeBuffer
  1836. }
  1837. , function(e, t, n) {
  1838. t.DecodeBuffer = r;
  1839. var i = n(8).preset;
  1840. function r(e) {
  1841. if (!(this instanceof r))
  1842. return new r(e);
  1843. if (e && (this.options = e,
  1844. e.codec)) {
  1845. var t = this.codec = e.codec;
  1846. t.bufferish && (this.bufferish = t.bufferish)
  1847. }
  1848. }
  1849. n(14).FlexDecoder.mixin(r.prototype),
  1850. r.prototype.codec = i,
  1851. r.prototype.fetch = function() {
  1852. return this.codec.decode(this)
  1853. }
  1854. }
  1855. , function(e, t, n) {
  1856. var i = n(4)
  1857. , r = n(7)
  1858. , s = r.Uint64BE
  1859. , a = r.Int64BE;
  1860. t.getReadFormat = function(e) {
  1861. var t = o.hasArrayBuffer && e && e.binarraybuffer
  1862. , n = e && e.int64;
  1863. return {
  1864. map: l && e && e.usemap ? u : h,
  1865. array: f,
  1866. str: d,
  1867. bin: t ? g : p,
  1868. ext: m,
  1869. uint8: y,
  1870. uint16: v,
  1871. uint32: b,
  1872. uint64: S(8, n ? E : T),
  1873. int8: k,
  1874. int16: w,
  1875. int32: x,
  1876. int64: S(8, n ? M : I),
  1877. float32: S(4, A),
  1878. float64: S(8, P)
  1879. }
  1880. }
  1881. ,
  1882. t.readUint8 = y;
  1883. var o = n(0)
  1884. , c = n(6)
  1885. , l = "undefined" != typeof Map;
  1886. function h(e, t) {
  1887. var n, i = {}, r = new Array(t), s = new Array(t), a = e.codec.decode;
  1888. for (n = 0; n < t; n++)
  1889. r[n] = a(e),
  1890. s[n] = a(e);
  1891. for (n = 0; n < t; n++)
  1892. i[r[n]] = s[n];
  1893. return i
  1894. }
  1895. function u(e, t) {
  1896. var n, i = new Map, r = new Array(t), s = new Array(t), a = e.codec.decode;
  1897. for (n = 0; n < t; n++)
  1898. r[n] = a(e),
  1899. s[n] = a(e);
  1900. for (n = 0; n < t; n++)
  1901. i.set(r[n], s[n]);
  1902. return i
  1903. }
  1904. function f(e, t) {
  1905. for (var n = new Array(t), i = e.codec.decode, r = 0; r < t; r++)
  1906. n[r] = i(e);
  1907. return n
  1908. }
  1909. function d(e, t) {
  1910. var n = e.reserve(t)
  1911. , i = n + t;
  1912. return c.toString.call(e.buffer, "utf-8", n, i)
  1913. }
  1914. function p(e, t) {
  1915. var n = e.reserve(t)
  1916. , i = n + t
  1917. , r = c.slice.call(e.buffer, n, i);
  1918. return o.from(r)
  1919. }
  1920. function g(e, t) {
  1921. var n = e.reserve(t)
  1922. , i = n + t
  1923. , r = c.slice.call(e.buffer, n, i);
  1924. return o.Uint8Array.from(r).buffer
  1925. }
  1926. function m(e, t) {
  1927. var n = e.reserve(t + 1)
  1928. , i = e.buffer[n++]
  1929. , r = n + t
  1930. , s = e.codec.getExtUnpacker(i);
  1931. if (!s)
  1932. throw new Error("Invalid ext type: " + (i ? "0x" + i.toString(16) : i));
  1933. return s(c.slice.call(e.buffer, n, r))
  1934. }
  1935. function y(e) {
  1936. var t = e.reserve(1);
  1937. return e.buffer[t]
  1938. }
  1939. function k(e) {
  1940. var t = e.reserve(1)
  1941. , n = e.buffer[t];
  1942. return 128 & n ? n - 256 : n
  1943. }
  1944. function v(e) {
  1945. var t = e.reserve(2)
  1946. , n = e.buffer;
  1947. return n[t++] << 8 | n[t]
  1948. }
  1949. function w(e) {
  1950. var t = e.reserve(2)
  1951. , n = e.buffer
  1952. , i = n[t++] << 8 | n[t];
  1953. return 32768 & i ? i - 65536 : i
  1954. }
  1955. function b(e) {
  1956. var t = e.reserve(4)
  1957. , n = e.buffer;
  1958. return 16777216 * n[t++] + (n[t++] << 16) + (n[t++] << 8) + n[t]
  1959. }
  1960. function x(e) {
  1961. var t = e.reserve(4)
  1962. , n = e.buffer;
  1963. return n[t++] << 24 | n[t++] << 16 | n[t++] << 8 | n[t]
  1964. }
  1965. function S(e, t) {
  1966. return function(n) {
  1967. var i = n.reserve(e);
  1968. return t.call(n.buffer, i, !0)
  1969. }
  1970. }
  1971. function T(e) {
  1972. return new s(this,e).toNumber()
  1973. }
  1974. function I(e) {
  1975. return new a(this,e).toNumber()
  1976. }
  1977. function E(e) {
  1978. return new s(this,e)
  1979. }
  1980. function M(e) {
  1981. return new a(this,e)
  1982. }
  1983. function A(e) {
  1984. return i.read(this, e, !1, 23, 4)
  1985. }
  1986. function P(e) {
  1987. return i.read(this, e, !1, 52, 8)
  1988. }
  1989. }
  1990. , function(e, t, n) {
  1991. !function(t) {
  1992. e.exports = t;
  1993. var n = "listeners"
  1994. , i = {
  1995. on: function(e, t) {
  1996. return a(this, e).push(t),
  1997. this
  1998. },
  1999. once: function(e, t) {
  2000. var n = this;
  2001. return i.originalListener = t,
  2002. a(n, e).push(i),
  2003. n;
  2004. function i() {
  2005. s.call(n, e, i),
  2006. t.apply(this, arguments)
  2007. }
  2008. },
  2009. off: s,
  2010. emit: function(e, t) {
  2011. var n = this
  2012. , i = a(n, e, !0);
  2013. if (!i)
  2014. return !1;
  2015. var r = arguments.length;
  2016. if (1 === r)
  2017. i.forEach((function(e) {
  2018. e.call(n)
  2019. }
  2020. ));
  2021. else if (2 === r)
  2022. i.forEach((function(e) {
  2023. e.call(n, t)
  2024. }
  2025. ));
  2026. else {
  2027. var s = Array.prototype.slice.call(arguments, 1);
  2028. i.forEach((function(e) {
  2029. e.apply(n, s)
  2030. }
  2031. ))
  2032. }
  2033. return !!i.length
  2034. }
  2035. };
  2036. function r(e) {
  2037. for (var t in i)
  2038. e[t] = i[t];
  2039. return e
  2040. }
  2041. function s(e, t) {
  2042. var i;
  2043. if (arguments.length) {
  2044. if (t) {
  2045. if (i = a(this, e, !0)) {
  2046. if (!(i = i.filter((function(e) {
  2047. return e !== t && e.originalListener !== t
  2048. }
  2049. ))).length)
  2050. return s.call(this, e);
  2051. this[n][e] = i
  2052. }
  2053. } else if ((i = this[n]) && (delete i[e],
  2054. !Object.keys(i).length))
  2055. return s.call(this)
  2056. } else
  2057. delete this[n];
  2058. return this
  2059. }
  2060. function a(e, t, i) {
  2061. if (!i || e[n]) {
  2062. var r = e[n] || (e[n] = {});
  2063. return r[t] || (r[t] = [])
  2064. }
  2065. }
  2066. r(t.prototype),
  2067. t.mixin = r
  2068. }((/**
  2069. * event-lite.js - Light-weight EventEmitter (less than 1KB when gzipped)
  2070. *
  2071. * @copyright Yusuke Kawasaki
  2072. * @license MIT
  2073. * @constructor
  2074. * @see https://github.com/kawanet/event-lite
  2075. * @see http://kawanet.github.io/event-lite/EventLite.html
  2076. * @example
  2077. * var EventLite = require("event-lite");
  2078. *
  2079. * function MyClass() {...} // your class
  2080. *
  2081. * EventLite.mixin(MyClass.prototype); // import event methods
  2082. *
  2083. * var obj = new MyClass();
  2084. * obj.on("foo", function() {...}); // add event listener
  2085. * obj.once("bar", function() {...}); // add one-time event listener
  2086. * obj.emit("foo"); // dispatch event
  2087. * obj.emit("bar"); // dispatch another event
  2088. * obj.off("foo"); // remove event listener
  2089. */
  2090. function e() {
  2091. if (!(this instanceof e))
  2092. return new e
  2093. }
  2094. ))
  2095. }
  2096. , function(e, t, n) {
  2097. (function(t) {
  2098. e.exports.maxScreenWidth = 1920,
  2099. e.exports.maxScreenHeight = 1080,
  2100. e.exports.serverUpdateRate = 9,
  2101. e.exports.maxPlayers = 50,
  2102. e.exports.maxPlayersHard = 50,
  2103. e.exports.collisionDepth = 6,
  2104. e.exports.minimapRate = 3e3,
  2105. e.exports.colGrid = 10,
  2106. e.exports.clientSendRate = 5,
  2107. e.exports.healthBarWidth = 50,
  2108. e.exports.healthBarPad = 4.5,
  2109. e.exports.iconPadding = 15,
  2110. e.exports.iconPad = .9,
  2111. e.exports.deathFadeout = 3e3,
  2112. e.exports.crownIconScale = 60,
  2113. e.exports.crownPad = 35,
  2114. e.exports.chatCountdown = 3e3,
  2115. e.exports.chatCooldown = 500,
  2116. e.exports.inSandbox = t && "mm_exp" === t.env.VULTR_SCHEME,
  2117. e.exports.maxAge = 100,
  2118. e.exports.gatherAngle = Math.PI / 2.6,
  2119. e.exports.gatherWiggle = 10,
  2120. e.exports.hitReturnRatio = .25,
  2121. e.exports.hitAngle = Math.PI / 2,
  2122. e.exports.playerScale = 35,
  2123. e.exports.playerSpeed = .0016,
  2124. e.exports.playerDecel = .993,
  2125. e.exports.nameY = 34,
  2126. e.exports.skinColors = ["#bf8f54", "#cbb091", "#896c4b", "#fadadc", "#ececec", "#c37373", "#4c4c4c", "#ecaff7", "#738cc3", "#8bc373"],
  2127. e.exports.animalCount = 7,
  2128. e.exports.aiTurnRandom = .06,
  2129. e.exports.cowNames = ["Sid", "Steph", "Bmoe", "Romn", "Jononthecool", "Fiona", "Vince", "Nathan", "Nick", "Flappy", "Ronald", "Otis", "Pepe", "Mc Donald", "Theo", "Fabz", "Oliver", "Jeff", "Jimmy", "Helena", "Reaper", "Ben", "Alan", "Naomi", "XYZ", "Clever", "Jeremy", "Mike", "Destined", "Stallion", "Allison", "Meaty", "Sophia", "Vaja", "Joey", "Pendy", "Murdoch", "Theo", "Jared", "July", "Sonia", "Mel", "Dexter", "Quinn", "Milky"],
  2130. e.exports.shieldAngle = Math.PI / 3,
  2131. e.exports.weaponVariants = [{
  2132. id: 0,
  2133. src: "",
  2134. xp: 0,
  2135. val: 1
  2136. }, {
  2137. id: 1,
  2138. src: "_g",
  2139. xp: 3e3,
  2140. val: 1.1
  2141. }, {
  2142. id: 2,
  2143. src: "_d",
  2144. xp: 7e3,
  2145. val: 1.18
  2146. }, {
  2147. id: 3,
  2148. src: "_r",
  2149. poison: !0,
  2150. xp: 12e3,
  2151. val: 1.18
  2152. }],
  2153. e.exports.fetchVariant = function(t) {
  2154. for (var n = t.weaponXP[t.weaponIndex] || 0, i = e.exports.weaponVariants.length - 1; i >= 0; --i)
  2155. if (n >= e.exports.weaponVariants[i].xp)
  2156. return e.exports.weaponVariants[i]
  2157. }
  2158. ,
  2159. e.exports.resourceTypes = ["wood", "food", "stone", "points"],
  2160. e.exports.areaCount = 7,
  2161. e.exports.treesPerArea = 9,
  2162. e.exports.bushesPerArea = 3,
  2163. e.exports.totalRocks = 32,
  2164. e.exports.goldOres = 7,
  2165. e.exports.riverWidth = 724,
  2166. e.exports.riverPadding = 114,
  2167. e.exports.waterCurrent = .0011,
  2168. e.exports.waveSpeed = 1e-4,
  2169. e.exports.waveMax = 1.3,
  2170. e.exports.treeScales = [150, 160, 165, 175],
  2171. e.exports.bushScales = [80, 85, 95],
  2172. e.exports.rockScales = [80, 85, 90],
  2173. e.exports.snowBiomeTop = 2400,
  2174. e.exports.snowSpeed = .75,
  2175. e.exports.maxNameLength = 15,
  2176. e.exports.mapScale = 14400,
  2177. e.exports.mapPingScale = 40,
  2178. e.exports.mapPingTime = 2200
  2179. }
  2180. ).call(this, n(41))
  2181. }
  2182. , function(e, t) {
  2183. var n = {
  2184. utf8: {
  2185. stringToBytes: function(e) {
  2186. return n.bin.stringToBytes(unescape(encodeURIComponent(e)))
  2187. },
  2188. bytesToString: function(e) {
  2189. return decodeURIComponent(escape(n.bin.bytesToString(e)))
  2190. }
  2191. },
  2192. bin: {
  2193. stringToBytes: function(e) {
  2194. for (var t = [], n = 0; n < e.length; n++)
  2195. t.push(255 & e.charCodeAt(n));
  2196. return t
  2197. },
  2198. bytesToString: function(e) {
  2199. for (var t = [], n = 0; n < e.length; n++)
  2200. t.push(String.fromCharCode(e[n]));
  2201. return t.join("")
  2202. }
  2203. }
  2204. };
  2205. e.exports = n
  2206. }
  2207. , function(e, t, n) {
  2208. "use strict";
  2209. window.loadedScript = !0;
  2210. var i = "127.0.0.1" !== location.hostname && !location.hostname.startsWith("192.168.");
  2211. n(22);
  2212. var r = n(23)
  2213. , s = n(42)
  2214. , a = n(43)
  2215. , o = n(19)
  2216. , c = n(44)
  2217. , l = n(45)
  2218. , h = (n(46),
  2219. n(47))
  2220. , u = n(48)
  2221. , f = n(55)
  2222. , d = n(56)
  2223. , p = n(57)
  2224. , g = n(58).obj
  2225. , m = new a.TextManager
  2226. , y = new (n(59))("moomoo.io",3e3,o.maxPlayers,5,!1);
  2227. y.debugLog = !1;
  2228. var k = !1;
  2229. function v() {
  2230. ht && ut && (k = !0,
  2231. i ? window.grecaptcha.execute("6LevKusUAAAAAAFknhlV8sPtXAk5Z5dGP5T2FYIZ", {
  2232. action: "homepage"
  2233. }).then((function(e) {
  2234. w(e)
  2235. }
  2236. )) : w(null))
  2237. }
  2238. function w(e) {
  2239. y.start((function(t, n, a) {
  2240. var c = (i ? "wss" : "ws") + "://" + t + ":8008/?gameIndex=" + a;
  2241. e && (c += "&token=" + encodeURIComponent(e)),
  2242. r.connect(c, (function(e) {
  2243. Bi(),
  2244. setInterval(()=>Bi(), 2500),
  2245. e ? ft(e) : (ue.onclick = s.checkTrusted((function() {
  2246. !function() {
  2247. var e = ++bt > 1
  2248. , t = Date.now() - wt > vt;
  2249. e && t ? (wt = Date.now(),
  2250. xt()) : Tn()
  2251. }()
  2252. }
  2253. )),
  2254. s.hookTouchEvents(ue),
  2255. fe.onclick = s.checkTrusted((function() {
  2256. Oi("https://krunker.io")
  2257. }
  2258. )),
  2259. s.hookTouchEvents(fe),
  2260. pe.onclick = s.checkTrusted((function() {
  2261. setTimeout((function() {
  2262. !function() {
  2263. var e = xe.value
  2264. , t = prompt("party key", e);
  2265. t && (window.onbeforeunload = void 0,
  2266. window.location.href = "/?server=" + t)
  2267. }()
  2268. }
  2269. ), 10)
  2270. }
  2271. )),
  2272. s.hookTouchEvents(pe),
  2273. ge.onclick = s.checkTrusted((function() {
  2274. Ae.classList.contains("showing") ? (Ae.classList.remove("showing"),
  2275. me.innerText = "Settings") : (Ae.classList.add("showing"),
  2276. me.innerText = "Close")
  2277. }
  2278. )),
  2279. s.hookTouchEvents(ge),
  2280. ye.onclick = s.checkTrusted((function() {
  2281. yn(),
  2282. "block" != Ye.style.display ? Ut() : Ye.style.display = "none"
  2283. }
  2284. )),
  2285. s.hookTouchEvents(ye),
  2286. ke.onclick = s.checkTrusted((function() {
  2287. "block" != Qe.style.display ? (Qe.style.display = "block",
  2288. Ye.style.display = "none",
  2289. an(),
  2290. Gt()) : Qe.style.display = "none"
  2291. }
  2292. )),
  2293. s.hookTouchEvents(ke),
  2294. ve.onclick = s.checkTrusted((function() {
  2295. rn()
  2296. }
  2297. )),
  2298. s.hookTouchEvents(ve),
  2299. Ne.onclick = s.checkTrusted((function() {
  2300. xn()
  2301. }
  2302. )),
  2303. s.hookTouchEvents(Ne),
  2304. function() {
  2305. for (var e = 0; e < jn.length; ++e) {
  2306. var t = new Image;
  2307. t.onload = function() {
  2308. this.isLoaded = !0
  2309. }
  2310. ,
  2311. t.src = ".././img/icons/" + jn[e] + ".png",
  2312. Rn[jn[e]] = t
  2313. }
  2314. }(),
  2315. Pe.style.display = "none",
  2316. Me.style.display = "block",
  2317. Le.value = E("moo_name") || "",
  2318. function() {
  2319. var e = E("native_resolution");
  2320. Zt(e ? "true" == e : "undefined" != typeof cordova),
  2321. A = "true" == E("show_ping"),
  2322. Ie.hidden = !A,
  2323. E("moo_moosic"),
  2324. setInterval((function() {
  2325. window.cordova && (document.getElementById("downloadButtonContainer").classList.add("cordova"),
  2326. document.getElementById("mobileDownloadButtonContainer").classList.add("cordova"))
  2327. }
  2328. ), 1e3),
  2329. en(),
  2330. s.removeAllChildren(Ce);
  2331. for (var t = 0; t < l.weapons.length + l.list.length; ++t)
  2332. !function(e) {
  2333. s.generateElement({
  2334. id: "actionBarItem" + e,
  2335. class: "actionBarItem",
  2336. style: "display:none",
  2337. onmouseout: function() {
  2338. Tt()
  2339. },
  2340. parent: Ce
  2341. })
  2342. }(t);
  2343. for (t = 0; t < l.list.length + l.weapons.length; ++t)
  2344. !function(e) {
  2345. var t = document.createElement("canvas");
  2346. t.width = t.height = 66;
  2347. var n = t.getContext("2d");
  2348. if (n.translate(t.width / 2, t.height / 2),
  2349. n.imageSmoothingEnabled = !1,
  2350. n.webkitImageSmoothingEnabled = !1,
  2351. n.mozImageSmoothingEnabled = !1,
  2352. l.weapons[e]) {
  2353. n.rotate(Math.PI / 4 + Math.PI);
  2354. var i = new Image;
  2355. Zn[l.weapons[e].src] = i,
  2356. i.onload = function() {
  2357. this.isLoaded = !0;
  2358. var i = 1 / (this.height / this.width)
  2359. , r = l.weapons[e].iPad || 1;
  2360. n.drawImage(this, -t.width * r * o.iconPad * i / 2, -t.height * r * o.iconPad / 2, t.width * r * i * o.iconPad, t.height * r * o.iconPad),
  2361. n.fillStyle = "rgba(0, 0, 70, 0.1)",
  2362. n.globalCompositeOperation = "source-atop",
  2363. n.fillRect(-t.width / 2, -t.height / 2, t.width, t.height),
  2364. document.getElementById("actionBarItem" + e).style.backgroundImage = "url(" + t.toDataURL() + ")"
  2365. }
  2366. ,
  2367. i.src = ".././img/weapons/" + l.weapons[e].src + ".png",
  2368. (r = document.getElementById("actionBarItem" + e)).onmouseover = s.checkTrusted((function() {
  2369. Tt(l.weapons[e], !0)
  2370. }
  2371. )),
  2372. r.onclick = s.checkTrusted((function() {
  2373. Sn(e, !0)
  2374. }
  2375. )),
  2376. s.hookTouchEvents(r)
  2377. } else {
  2378. i = ri(l.list[e - l.weapons.length], !0);
  2379. var r, a = Math.min(t.width - o.iconPadding, i.width);
  2380. n.globalAlpha = 1,
  2381. n.drawImage(i, -a / 2, -a / 2, a, a),
  2382. n.fillStyle = "rgba(0, 0, 70, 0.1)",
  2383. n.globalCompositeOperation = "source-atop",
  2384. n.fillRect(-a / 2, -a / 2, a, a),
  2385. document.getElementById("actionBarItem" + e).style.backgroundImage = "url(" + t.toDataURL() + ")",
  2386. (r = document.getElementById("actionBarItem" + e)).onmouseover = s.checkTrusted((function() {
  2387. Tt(l.list[e - l.weapons.length])
  2388. }
  2389. )),
  2390. r.onclick = s.checkTrusted((function() {
  2391. Sn(e - l.weapons.length)
  2392. }
  2393. )),
  2394. s.hookTouchEvents(r)
  2395. }
  2396. }(t);
  2397. Le.ontouchstart = s.checkTrusted((function(e) {
  2398. e.preventDefault();
  2399. var t = prompt("enter name", e.currentTarget.value);
  2400. e.currentTarget.value = t.slice(0, 15)
  2401. }
  2402. )),
  2403. Se.checked = M,
  2404. Se.onchange = s.checkTrusted((function(e) {
  2405. Zt(e.target.checked)
  2406. }
  2407. )),
  2408. Te.checked = A,
  2409. Te.onchange = s.checkTrusted((function(e) {
  2410. A = Te.checked,
  2411. Ie.hidden = !A,
  2412. I("show_ping", A ? "true" : "false")
  2413. }
  2414. ))
  2415. }())
  2416. }
  2417. ), {
  2418. id: st,
  2419. d: ft,
  2420. 1: En,
  2421. 2: vi,
  2422. 4: wi,
  2423. 33: Ti,
  2424. 5: Ln,
  2425. 6: li,
  2426. a: gi,
  2427. aa: pi,
  2428. 7: Wn,
  2429. 8: hi,
  2430. sp: ui,
  2431. 9: xi,
  2432. h: Si,
  2433. 11: Pn,
  2434. 12: Cn,
  2435. 13: Bn,
  2436. 14: bi,
  2437. 15: Dn,
  2438. 16: Un,
  2439. 17: $t,
  2440. 18: fi,
  2441. 19: di,
  2442. 20: Ci,
  2443. ac: Ot,
  2444. ad: _t,
  2445. an: Bt,
  2446. st: Rt,
  2447. sa: jt,
  2448. us: Nt,
  2449. ch: hn,
  2450. mm: Wt,
  2451. t: Mn,
  2452. p: Yt,
  2453. pp: Pi
  2454. }),
  2455. pt(),
  2456. setTimeout(()=>gt(), 3e3)
  2457. }
  2458. ), (function(e) {
  2459. console.error("Vultr error:", e),
  2460. alert("Error:\n" + e),
  2461. ft("disconnected")
  2462. }
  2463. ))
  2464. }
  2465. var b, x = new g(o,s), S = Math.PI, T = 2 * S;
  2466. function I(e, t) {
  2467. b && localStorage.setItem(e, t)
  2468. }
  2469. function E(e) {
  2470. return b ? localStorage.getItem(e) : null
  2471. }
  2472. Math.lerpAngle = function(e, t, n) {
  2473. Math.abs(t - e) > S && (e > t ? t += T : e += T);
  2474. var i = t + (e - t) * n;
  2475. return i >= 0 && i <= T ? i : i % T
  2476. }
  2477. ,
  2478. CanvasRenderingContext2D.prototype.roundRect = function(e, t, n, i, r) {
  2479. return n < 2 * r && (r = n / 2),
  2480. i < 2 * r && (r = i / 2),
  2481. r < 0 && (r = 0),
  2482. this.beginPath(),
  2483. this.moveTo(e + r, t),
  2484. this.arcTo(e + n, t, e + n, t + i, r),
  2485. this.arcTo(e + n, t + i, e, t + i, r),
  2486. this.arcTo(e, t + i, e, t, r),
  2487. this.arcTo(e, t, e + n, t, r),
  2488. this.closePath(),
  2489. this
  2490. }
  2491. ,
  2492. "undefined" != typeof Storage && (b = !0),
  2493. E("consent") || (consentBlock.style.display = "block"),
  2494. window.checkTerms = function(e) {
  2495. e ? (consentBlock.style.display = "none",
  2496. I("consent", 1)) : $("#consentShake").effect("shake")
  2497. }
  2498. ;
  2499. var M, A, P, B, C, O, R, j, _, U, D, L, F, z, H = E("moofoll"), V = 1, q = Date.now(), Y = [], W = [], X = [], N = [], G = [], J = new p(d,G,W,Y,nt,l,o,s), K = n(70), Q = n(71), Z = new K(Y,Q,W,l,null,o,s), ee = 1, te = 0, ne = 0, ie = 0, re = {
  2500. id: -1,
  2501. startX: 0,
  2502. startY: 0,
  2503. currentX: 0,
  2504. currentY: 0
  2505. }, se = {
  2506. id: -1,
  2507. startX: 0,
  2508. startY: 0,
  2509. currentX: 0,
  2510. currentY: 0
  2511. }, ae = 0, oe = o.maxScreenWidth, ce = o.maxScreenHeight, le = !1, he = (document.getElementById("ad-container"),
  2512. document.getElementById("mainMenu")), ue = document.getElementById("enterGame"), fe = document.getElementById("promoImg"), de = document.getElementById("partyButton"), pe = document.getElementById("joinPartyButton"), ge = document.getElementById("settingsButton"), me = ge.getElementsByTagName("span")[0], ye = document.getElementById("allianceButton"), ke = document.getElementById("storeButton"), ve = document.getElementById("chatButton"), we = document.getElementById("gameCanvas"), be = we.getContext("2d"), xe = document.getElementById("serverBrowser"), Se = document.getElementById("nativeResolution"), Te = document.getElementById("showPing"), Ie = (document.getElementById("playMusic"),
  2513. document.getElementById("pingDisplay")), Ee = document.getElementById("shutdownDisplay"), Me = document.getElementById("menuCardHolder"), Ae = document.getElementById("guideCard"), Pe = document.getElementById("loadingText"), Be = document.getElementById("gameUI"), Ce = document.getElementById("actionBar"), Oe = document.getElementById("scoreDisplay"), Re = document.getElementById("foodDisplay"), je = document.getElementById("woodDisplay"), _e = document.getElementById("stoneDisplay"), Ue = document.getElementById("killCounter"), De = document.getElementById("leaderboardData"), Le = document.getElementById("nameInput"), Fe = document.getElementById("itemInfoHolder"), ze = document.getElementById("ageText"), He = document.getElementById("ageBarBody"), Ve = document.getElementById("upgradeHolder"), qe = document.getElementById("upgradeCounter"), Ye = document.getElementById("allianceMenu"), We = document.getElementById("allianceHolder"), Xe = document.getElementById("allianceManager"), Ne = document.getElementById("mapDisplay"), Ge = document.getElementById("diedText"), Je = document.getElementById("skinColorHolder"), Ke = Ne.getContext("2d");
  2514. Ne.width = 300,
  2515. Ne.height = 300;
  2516. Ie.replaceWith(document.createElement("a")), Ie.style.fontSize = "20px", Ie.style.display = "block", Ie.style.zIndex = "1";
  2517. document.body.appendChild(Ie);
  2518. we.addEventListener('wheel', function(e){
  2519. if(e.deltaY > 0){
  2520. oe *= 1.05;
  2521. //o.maxScreenWidth *= 1.05;
  2522. ce *= 1.05;
  2523. //o.maxScreenHeight *= 1.05;
  2524. }else{
  2525. oe /= 1.05;
  2526. //o.maxScreenWidth /= 1.05;
  2527. ce /= 1.05;
  2528. //o.maxScreenHeight /= 1.05;
  2529. }
  2530. un();
  2531. })
  2532. var Qe = document.getElementById("storeMenu")
  2533. , $e = document.getElementById("storeHolder")
  2534. , Ze = document.getElementById("noticationDisplay")
  2535. , et = f.hats
  2536. , tt = f.accessories
  2537. , nt = new h(c,N,s,o)
  2538. , it = "#525252"
  2539. , rt = "#3d3f42";
  2540. function st(e) {
  2541. X = e.teams
  2542. }
  2543. var at = document.getElementById("featuredYoutube")
  2544. , ot = [{
  2545. name: "Art GamesTV",
  2546. link: "https://www.youtube.com/channel/UCgDoS2rox5G6NtW-RdvFaEw"
  2547. }]
  2548. , ct = ot[s.randInt(0, ot.length - 1)];
  2549. at.innerHTML = "<a target='_blank' class='ytLink' href='" + ct.link + "'><i class='material-icons' style='vertical-align: top;'>&#xE064;</i> " + ct.name + "</a>";
  2550. var lt = !0
  2551. , ht = !1
  2552. , ut = !1;
  2553. function ft(e) {
  2554. r.close(),
  2555. dt(e)
  2556. }
  2557. function dt(e) {
  2558. he.style.display = "block",
  2559. Be.style.display = "none",
  2560. Me.style.display = "none",
  2561. Ge.style.display = "none",
  2562. Pe.style.display = "block",
  2563. Pe.innerHTML = e + "<a href='javascript:window.location.href=window.location.href' class='ytLink'>reload</a>"
  2564. }
  2565. window.onblur = function() {
  2566. lt = !1
  2567. }
  2568. ,
  2569. window.onfocus = function() {
  2570. lt = !0,
  2571. R && R.alive && yn()
  2572. }
  2573. ,
  2574. window.onload = function() {
  2575. ht = !0,
  2576. v(),
  2577. setTimeout((function() {
  2578. k || (alert("Captcha failed to load"),
  2579. window.location.reload())
  2580. }
  2581. ), 2e4)
  2582. }
  2583. ,
  2584. window.captchaCallback = function() {
  2585. ut = !0,
  2586. v()
  2587. }
  2588. ,
  2589. we.oncontextmenu = function() {
  2590. return !1
  2591. }
  2592. ;
  2593. function pt() {
  2594. var e, t, n = "", i = 0;
  2595. for (var r in y.servers) {
  2596. for (var s = y.servers[r], a = 0, c = 0; c < s.length; c++)
  2597. for (var l = 0; l < s[c].games.length; l++)
  2598. a += s[c].games[l].playerCount;
  2599. i += a;
  2600. var h = y.regionInfo[r].name;
  2601. n += "<option disabled>" + h + " - " + a + " players</option>";
  2602. for (var u = 0; u < s.length; u++)
  2603. for (var f = s[u], d = 0; d < f.games.length; d++) {
  2604. var p = f.games[d]
  2605. , g = 1 * f.index + d + 1
  2606. , m = y.server && y.server.region === f.region && y.server.index === f.index && y.gameIndex == d
  2607. , k = h + " " + g + " [" + Math.min(p.playerCount, o.maxPlayers) + "/" + o.maxPlayers + "]";
  2608. let e = y.stripRegion(r) + ":" + u + ":" + d;
  2609. m && (de.getElementsByTagName("span")[0].innerText = e),
  2610. n += "<option value='" + e + "' " + (m ? "selected" : "") + ">" + k + "</option>"
  2611. }
  2612. n += "<option disabled></option>"
  2613. }
  2614. n += "<option disabled>All Servers - " + i + " players</option>",
  2615. xe.innerHTML = n,
  2616. "sandbox.moomoo.io" == location.hostname ? (e = "Back to MooMoo",
  2617. t = "//moomoo.io/") : (e = "Try the sandbox",
  2618. t = "//sandbox.moomoo.io/"),
  2619. document.getElementById("altServer").innerHTML = "<a href='" + t + "'>" + e + "<i class='material-icons' style='font-size:10px;vertical-align:middle'>arrow_forward_ios</i></a>"
  2620. }
  2621. function gt() {
  2622. var e = new XMLHttpRequest;
  2623. e.onreadystatechange = function() {
  2624. 4 == this.readyState && (200 == this.status ? (window.vultr = JSON.parse(this.responseText),
  2625. y.processServers(vultr.servers),
  2626. pt()) : console.error("Failed to load server data with status code:", this.status))
  2627. }
  2628. ,
  2629. e.open("GET", "/serverData", !0),
  2630. e.send()
  2631. }
  2632. xe.addEventListener("change", s.checkTrusted((function() {
  2633. let e = xe.value.split(":");
  2634. y.switchServer(e[0], e[1], e[2])
  2635. }
  2636. )));
  2637. var mt = document.getElementById("pre-content-container")
  2638. , yt = null
  2639. , kt = null;
  2640. window.cpmstarAPI((function(e) {
  2641. e.game.setTarget(mt),
  2642. kt = e
  2643. }
  2644. ));
  2645. var vt = 3e5
  2646. , wt = 0
  2647. , bt = 0;
  2648. function xt() {
  2649. if (!cpmstarAPI || !kt)
  2650. return console.log("Failed to load video ad API", !!cpmstarAPI, !!kt),
  2651. void Tn();
  2652. (yt = new kt.game.RewardedVideoView("rewardedvideo")).addEventListener("ad_closed", (function(e) {
  2653. console.log("Video ad closed"),
  2654. St()
  2655. }
  2656. )),
  2657. yt.addEventListener("loaded", (function(e) {
  2658. console.log("Video ad loaded"),
  2659. yt.show()
  2660. }
  2661. )),
  2662. yt.addEventListener("load_failed", (function(e) {
  2663. console.log("Video ad load failed", e),
  2664. St()
  2665. }
  2666. )),
  2667. yt.load(),
  2668. mt.style.display = "block"
  2669. }
  2670. function St() {
  2671. mt.style.display = "none",
  2672. Tn()
  2673. }
  2674. function Tt(e, t, n) {
  2675. if (R && e)
  2676. if (s.removeAllChildren(Fe),
  2677. Fe.classList.add("visible"),
  2678. s.generateElement({
  2679. id: "itemInfoName",
  2680. text: s.capitalizeFirst(e.name),
  2681. parent: Fe
  2682. }),
  2683. s.generateElement({
  2684. id: "itemInfoDesc",
  2685. text: e.desc,
  2686. parent: Fe
  2687. }),
  2688. n)
  2689. ;
  2690. else if (t)
  2691. s.generateElement({
  2692. class: "itemInfoReq",
  2693. text: e.type ? "secondary" : "primary",
  2694. parent: Fe
  2695. });
  2696. else {
  2697. for (var i = 0; i < e.req.length; i += 2)
  2698. s.generateElement({
  2699. class: "itemInfoReq",
  2700. html: e.req[i] + "<span class='itemInfoReqVal'> x" + e.req[i + 1] + "</span>",
  2701. parent: Fe
  2702. });
  2703. e.group.limit && s.generateElement({
  2704. class: "itemInfoLmt",
  2705. text: (R.itemCounts[e.group.id] || 0) + "/" + e.group.limit,
  2706. parent: Fe
  2707. })
  2708. }
  2709. else
  2710. Fe.classList.remove("visible")
  2711. }
  2712. window.showPreAd = xt;
  2713. var It, Et, Mt, At = [], Pt = [];
  2714. function Bt(e, t) {
  2715. At.push({
  2716. sid: e,
  2717. name: t
  2718. }),
  2719. Ct()
  2720. }
  2721. function Ct() {
  2722. if (At[0]) {
  2723. var e = At[0];
  2724. s.removeAllChildren(Ze),
  2725. Ze.style.display = "block",
  2726. s.generateElement({
  2727. class: "notificationText",
  2728. text: e.name,
  2729. parent: Ze
  2730. }),
  2731. s.generateElement({
  2732. class: "notifButton",
  2733. html: "<i class='material-icons' style='font-size:28px;color:#cc5151;'>&#xE14C;</i>",
  2734. parent: Ze,
  2735. onclick: function() {
  2736. Dt(0)
  2737. },
  2738. hookTouch: !0
  2739. }),
  2740. s.generateElement({
  2741. class: "notifButton",
  2742. html: "<i class='material-icons' style='font-size:28px;color:#8ecc51;'>&#xE876;</i>",
  2743. parent: Ze,
  2744. onclick: function() {
  2745. Dt(1)
  2746. },
  2747. hookTouch: !0
  2748. })
  2749. } else
  2750. Ze.style.display = "none"
  2751. }
  2752. function Ot(e) {
  2753. X.push(e),
  2754. "block" == Ye.style.display && Ut()
  2755. }
  2756. function Rt(e, t) {
  2757. R && (R.team = e,
  2758. R.isOwner = t,
  2759. "block" == Ye.style.display && Ut())
  2760. }
  2761. function jt(e) {
  2762. Pt = e,
  2763. "block" == Ye.style.display && Ut()
  2764. }
  2765. function _t(e) {
  2766. for (var t = X.length - 1; t >= 0; t--)
  2767. X[t].sid == e && X.splice(t, 1);
  2768. "block" == Ye.style.display && Ut()
  2769. }
  2770. function Ut() {
  2771. if (R && R.alive) {
  2772. if (an(),
  2773. Qe.style.display = "none",
  2774. Ye.style.display = "block",
  2775. s.removeAllChildren(We),
  2776. R.team)
  2777. for (var e = 0; e < Pt.length; e += 2)
  2778. !function(e) {
  2779. var t = s.generateElement({
  2780. class: "allianceItem",
  2781. style: "color:" + (Pt[e] == R.sid ? "#fff" : "rgba(255,255,255,0.6)"),
  2782. text: Pt[e + 1],
  2783. parent: We
  2784. });
  2785. R.isOwner && Pt[e] != R.sid && s.generateElement({
  2786. class: "joinAlBtn",
  2787. text: "Kick",
  2788. onclick: function() {
  2789. Lt(Pt[e])
  2790. },
  2791. hookTouch: !0,
  2792. parent: t
  2793. })
  2794. }(e);
  2795. else if (X.length)
  2796. for (e = 0; e < X.length; ++e)
  2797. !function(e) {
  2798. var t = s.generateElement({
  2799. class: "allianceItem",
  2800. style: "color:" + (X[e].sid == R.team ? "#fff" : "rgba(255,255,255,0.6)"),
  2801. text: X[e].sid,
  2802. parent: We
  2803. });
  2804. s.generateElement({
  2805. class: "joinAlBtn",
  2806. text: "Join",
  2807. onclick: function() {
  2808. Ft(e)
  2809. },
  2810. hookTouch: !0,
  2811. parent: t
  2812. })
  2813. }(e);
  2814. else
  2815. s.generateElement({
  2816. class: "allianceItem",
  2817. text: "No Tribes Yet",
  2818. parent: We
  2819. });
  2820. s.removeAllChildren(Xe),
  2821. R.team ? s.generateElement({
  2822. class: "allianceButtonM",
  2823. style: "width: 360px",
  2824. text: R.isOwner ? "Delete Tribe" : "Leave Tribe",
  2825. onclick: function() {
  2826. Ht()
  2827. },
  2828. hookTouch: !0,
  2829. parent: Xe
  2830. }) : (s.generateElement({
  2831. tag: "input",
  2832. type: "text",
  2833. id: "allianceInput",
  2834. maxLength: 7,
  2835. placeholder: "unique name",
  2836. ontouchstart: function(e) {
  2837. e.preventDefault();
  2838. var t = prompt("unique name", e.currentTarget.value);
  2839. e.currentTarget.value = t.slice(0, 7)
  2840. },
  2841. parent: Xe
  2842. }),
  2843. s.generateElement({
  2844. tag: "div",
  2845. class: "allianceButtonM",
  2846. style: "width: 140px;",
  2847. text: "Create",
  2848. onclick: function() {
  2849. zt()
  2850. },
  2851. hookTouch: !0,
  2852. parent: Xe
  2853. }))
  2854. }
  2855. }
  2856. function Dt(e) {
  2857. r.send("11", At[0].sid, e),
  2858. At.splice(0, 1),
  2859. Ct()
  2860. }
  2861. function Lt(e) {
  2862. r.send("12", e)
  2863. }
  2864. function Ft(e) {
  2865. r.send("10", X[e].sid)
  2866. }
  2867. function zt() {
  2868. r.send("8", document.getElementById("allianceInput").value)
  2869. }
  2870. function Ht() {
  2871. At = [],
  2872. Ct(),
  2873. r.send("9")
  2874. }
  2875. var Vt, qt = [];
  2876. function Yt(e, t) {
  2877. for (var n = 0; n < qt.length; ++n)
  2878. if (!qt[n].active) {
  2879. Vt = qt[n];
  2880. break
  2881. }
  2882. Vt || (Vt = new function() {
  2883. this.init = function(e, t) {
  2884. this.scale = 0,
  2885. this.x = e,
  2886. this.y = t,
  2887. this.active = !0
  2888. }
  2889. ,
  2890. this.update = function(e, t) {
  2891. this.active && (this.scale += .05 * t,
  2892. this.scale >= o.mapPingScale ? this.active = !1 : (e.globalAlpha = 1 - Math.max(0, this.scale / o.mapPingScale),
  2893. e.beginPath(),
  2894. e.arc(this.x / o.mapScale * Ne.width, this.y / o.mapScale * Ne.width, this.scale, 0, 2 * Math.PI),
  2895. e.stroke()))
  2896. }
  2897. }
  2898. ,
  2899. qt.push(Vt)),
  2900. Vt.init(e, t)
  2901. }
  2902. function Wt(e) {
  2903. Et = e
  2904. }
  2905. var Xt = 0;
  2906. function Nt(e, t, n) {
  2907. n ? e ? R.tailIndex = t : R.tails[t] = 1 : e ? R.skinIndex = t : R.skins[t] = 1,
  2908. "block" == Qe.style.display && Gt()
  2909. }
  2910. function Gt() {
  2911. if (R) {
  2912. s.removeAllChildren($e);
  2913. for (var e = Xt, t = e ? tt : et, n = 0; n < t.length; ++n)
  2914. t[n].dontSell || function(n) {
  2915. var i = s.generateElement({
  2916. id: "storeDisplay" + n,
  2917. class: "storeItem",
  2918. onmouseout: function() {
  2919. Tt()
  2920. },
  2921. onmouseover: function() {
  2922. Tt(t[n], !1, !0)
  2923. },
  2924. parent: $e
  2925. });
  2926. s.hookTouchEvents(i, !0),
  2927. s.generateElement({
  2928. tag: "img",
  2929. class: "hatPreview",
  2930. src: "../img/" + (e ? "accessories/access_" : "hats/hat_") + t[n].id + (t[n].topSprite ? "_p" : "") + ".png",
  2931. parent: i
  2932. }),
  2933. s.generateElement({
  2934. tag: "span",
  2935. text: t[n].name,
  2936. parent: i
  2937. }),
  2938. (e ? R.tails[t[n].id] : R.skins[t[n].id]) ? (e ? R.tailIndex : R.skinIndex) == t[n].id ? s.generateElement({
  2939. class: "joinAlBtn",
  2940. style: "margin-top: 5px",
  2941. text: "Unequip",
  2942. onclick: function() {
  2943. Jt(0, e)
  2944. },
  2945. hookTouch: !0,
  2946. parent: i
  2947. }) : s.generateElement({
  2948. class: "joinAlBtn",
  2949. style: "margin-top: 5px",
  2950. text: "Equip",
  2951. onclick: function() {
  2952. Jt(t[n].id, e)
  2953. },
  2954. hookTouch: !0,
  2955. parent: i
  2956. }) : (s.generateElement({
  2957. class: "joinAlBtn",
  2958. style: "margin-top: 5px",
  2959. text: "Buy",
  2960. onclick: function() {
  2961. Kt(t[n].id, e)
  2962. },
  2963. hookTouch: !0,
  2964. parent: i
  2965. }),
  2966. s.generateElement({
  2967. tag: "span",
  2968. class: "itemPrice",
  2969. text: t[n].price,
  2970. parent: i
  2971. }))
  2972. }(n)
  2973. }
  2974. }
  2975. function Jt(e, t) {
  2976. r.send("13c", 0, e, t)
  2977. }
  2978. function Kt(e, t) {
  2979. r.send("13c", 1, e, t)
  2980. }
  2981. function Qt() {
  2982. Qe.style.display = "none",
  2983. Ye.style.display = "none",
  2984. an()
  2985. }
  2986. function $t(e, t) {
  2987. e && (t ? R.weapons = e : R.items = e);
  2988. for (var n = 0; n < l.list.length; ++n) {
  2989. var i = l.weapons.length + n;
  2990. document.getElementById("actionBarItem" + i).style.display = R.items.indexOf(l.list[n].id) >= 0 ? "inline-block" : "none"
  2991. }
  2992. for (n = 0; n < l.weapons.length; ++n)
  2993. document.getElementById("actionBarItem" + n).style.display = R.weapons[l.weapons[n].type] == l.weapons[n].id ? "inline-block" : "none"
  2994. }
  2995. function Zt(e) {
  2996. M = e,
  2997. V = e && window.devicePixelRatio || 1,
  2998. Se.checked = e,
  2999. I("native_resolution", e.toString()),
  3000. un()
  3001. }
  3002. function en() {
  3003. for (var e = "", t = 0; t < o.skinColors.length; ++t)
  3004. e += t == ae ? "<div class='skinColorItem activeSkin' style='background-color:" + o.skinColors[t] + "' onclick='selectSkinColor(" + t + ")'></div>" : "<div class='skinColorItem' style='background-color:" + o.skinColors[t] + "' onclick='selectSkinColor(" + t + ")'></div>";
  3005. Je.innerHTML = e
  3006. }
  3007. var tn = document.getElementById("chatBox")
  3008. , nn = document.getElementById("chatHolder");
  3009. var primaryReload = [], secondaryReload = [], turretReload = [], SpamHIT = 0, resDam = [];
  3010. var nEy, nEA, nEs, dNG = false, wasdmills = false, millX=0, millY=0;
  3011. function newHitPromise(){
  3012. return new Promise(function(resolve, reject){
  3013. resDam.push(resolve);
  3014. setTimeout(function(){
  3015. reject();
  3016. },50)
  3017. })
  3018. }
  3019. function conDam(e){
  3020. for(let i = 0; i < resDam.length; i++){
  3021. resDam[i](e)
  3022. }
  3023. resDam = [];
  3024. }
  3025. function configerdam(e, n) {
  3026. let t = l.weapons[n].dmg, v = n == 10 ? 7.5 : 1, x = Ii(e).skinIndex == 40 ? 3.3 : 1;
  3027. return t * v * x;
  3028. }
  3029. function gIA(a){
  3030. let gia = {"0":-1.29774e+308,"1":-1.40154e+308,"2":-1.21039e+308,"3":-1.11012e+308,"4":-1.4526e+308,"5":-1.4127e+308,"6":-1.33884e+308,"7":-1.32535e+308,"8":-1.22508e+308,"9":-1.2421e+308,"10":-1.13773e+308,"11":-1.4538e+308,"12":-1.20573e+308,"13":-1.15828e+308,"14":-1.11838e+308,"15":-1.2832e+308,"16":-1.2433e+308,"17":-1.16944e+308,"18":-1.12954e+308,"19":-1.40755e+308,"20":-1.15948e+308,"21":-1.3243e+308,"22":-1.2844e+308,"23":-1.2445e+308,"24":-1.17064e+308,"25":-1.27444e+308,"26":-1.1138e+308,"27":-1.19119e+308,"28":-1.3255e+308,"29":-1.2856e+308,"30":-1.23815e+308,"31":-1.19825e+308,"32":-1.1549e+308,"33":-1.115e+308,"34":-1.2188e+308,"35":-1.3226e+308,"36":-1.10504e+308,"37":-1.23935e+308,"38":-1.34315e+308,"39":-1.1561e+308,"40":-1.1162e+308,"41":-1.3637e+308,"42":-1.14614e+308,"43":-1.10624e+308,"44":-1.26696e+308,"45":-1.7871e+308,"46":-1.18371e+308,"47":-1.2611e+308,"48":-1.27812e+308,"49":-1.14734e+308,"50":-1.7244e+308,"51":-1.26816e+308,"52":-1.1943e+308,"53":-1.18491e+308,"54":-1.2623e+308,"55":-1.21485e+308,"56":-1.17495e+308,"57":-1.30926e+308,"58":-1.29987e+308,"59":-1.22601e+308,"60":-1.18611e+308,"61":-1.6987e+308,"62":-1.21605e+308,"63":-1.23307e+308,"64":-1.1328e+308,"65":-1.11931e+308,"66":-1.22721e+308,"67":-1.33101e+308,"68":-1.6999e+308,"69":-1.66e+308,"70":-1.58614e+308,"71":-1.134e+308,"72":-1.15102e+308,"73":-1.25482e+308,"74":-1.741e+308,"75":-1.7011e+308,"76":-1.13167e+308,"77":-1.20151e+308,"78":-1.16161e+308,"79":-1.29592e+308,"80":-1.39972e+308,"81":-1.7422e+308,"82":-1.17277e+308,"83":-1.12532e+308,"84":-1.20271e+308,"85":-1.5716e+308,"86":-1.5317e+308,"87":-1.6355e+308,"88":-1.20977e+308,"89":-1.20038e+308,"90":-1.12652e+308,"91":-1.23032e+308,"92":-1.5728e+308,"93":-1.6766e+308,"94":-1.25087e+308,"95":-1.24148e+308,"96":-1.16762e+308,"97":-1.12772e+308,"98":-1.23152e+308,"99":-1.574e+308,"100":-1.6778e+308,"101":-1.28258e+308,"102":-1.24268e+308,"103":-1.4034e+308,"104":-1.5072e+308,"105":-1.6151e+308,"106":-1.18937e+308,"107":-1.20639e+308,"108":-1.10202e+308,"109":-1.27029e+308,"110":-1.4046e+308,"111":-1.5084e+308,"112":-1.11318e+308,"113":-1.21698e+308,"114":-1.14312e+308,"115":-1.10322e+308,"116":-1.4457e+308,"117":-1.5495e+308,"118":-1.5096e+308,"119":-1.11438e+308,"120":-1.21818e+308,"121":-1.3789e+308,"122":-1.339e+308,"123":-1.23873e+308,"124":-1.5507e+308,"125":-1.15548e+308,"126":-1.14199e+308,"127":-1.42e+308,"128":-1.3801e+308,"129":-1.488e+308,"130":-1.26634e+308,"131":-1.25695e+308,"132":-1.15668e+308,"133":-1.14319e+308,"134":-1.4212e+308,"135":-1.3813e+308,"136":-1.30744e+308,"137":-1.29805e+308,"138":-1.22419e+308,"139":-1.18429e+308,"140":-1.28809e+308,"141":-1.4224e+308,"142":-1.20484e+308,"143":-1.13098e+308,"144":-1.11749e+308,"145":-1.2518e+308,"146":-1.2119e+308,"147":-1.13804e+308,"148":-1.12865e+308,"149":-1.26296e+308,"150":-1.15859e+308,"151":-1.11869e+308,"152":-1.253e+308,"153":-1.24361e+308,"154":-1.13924e+308,"155":-1.12985e+308,"156":-1.19969e+308,"157":-1.15979e+308,"158":-1.2941e+308,"159":-1.2542e+308,"160":-1.18034e+308,"161":-1.17095e+308,"162":-1.27475e+308,"163":-1.40906e+308,"164":-1.1915e+308,"165":-1.2953e+308,"166":-1.10415e+308,"167":-1.21205e+308,"168":-1.7586e+308,"169":-1.1247e+308,"170":-1.11531e+308,"171":-1.21911e+308,"172":-1.32291e+308,"173":-1.10535e+308,"174":-1.21325e+308,"175":-1.7598e+308,"176":-1.1259e+308,"177":-1.43787e+308,"178":-1.36401e+308,"179":-1.14645e+308,"180":-1.380253e+308,"181":-1.24086e+308,"182":-1.34466e+308,"183":-1.15351e+308,"184":-1.26141e+308,"185":-1.6303e+308,"186":-1.7341e+308,"187":-1.28196e+308,"188":-1.26847e+308,"189":-1.1682e+308,"190":-1.18522e+308,"191":-1.26261e+308,"192":-1.6315e+308,"193":-1.5916e+308,"194":-1.30957e+308,"195":-1.30018e+308,"196":-1.22632e+308,"197":-1.18642e+308,"198":-1.6726e+308,"199":-1.6327e+308,"200":-1.7365e+308,"201":-1.1026e+308,"202":-1.23691e+308,"203":-1.22752e+308,"204":-1.5659e+308,"205":-1.6738e+308,"206":-1.7776e+308,"207":-1.58645e+308,"208":-1.13431e+308,"209":-1.5032e+308,"210":-1.607e+308,"211":-1.5671e+308,"212":-1.17188e+308,"213":-1.24927e+308,"214":-1.20182e+308,"215":-1.13551e+308,"216":-1.5044e+308,"217":-1.6082e+308,"218":-1.18247e+308,"219":-1.31678e+308,"220":-1.12563e+308,"221":-1.4376e+308,"222":-1.16312e+308,"223":-1.6493e+308,"224":-1.6094e+308,"225":-1.21008e+308,"226":-1.31798e+308,"227":-1.335e+308,"228":-1.4388e+308,"229":-1.36494e+308,"230":-1.12097e+308,"231":-1.25118e+308,"232":-1.24179e+308,"233":-1.20189e+308,"234":-1.4799e+308,"235":-1.44e+308,"236":-1.36614e+308,"237":-1.11807e+308,"238":-1.28289e+308,"239":-1.17852e+308,"240":-1.521e+308,"241":-1.4811e+308,"242":-1.28995e+308,"243":-1.15917e+308,"244":-1.14978e+308,"245":-1.3105e+308,"246":-1.4143e+308,"247":-1.19674e+308,"248":-1.27413e+308,"249":-1.11349e+308,"250":-1.19088e+308,"251":-1.2079e+308,"252":-1.3117e+308,"253":-1.4155e+308,"254":-1.19794e+308,"255":-1.30584e+308,"256":-1.11469e+308,"257":-1.21849e+308,"258":-1.3528e+308,"259":-1.3129e+308,"260":-1.23904e+308,"261":-1.37335e+308,"262":-1.1822e+308,"263":-1.25959e+308,"264":-1.2461e+308,"265":-1.354e+308,"266":-1.4578e+308,"267":-1.26665e+308,"268":-1.37455e+308,"269":-1.1834e+308,"270":-1.1435e+308,"271":-1.10015e+308,"272":-1.17754e+308,"273":-1.30775e+308,"274":-1.29836e+308,"275":-1.25846e+308,"276":-1.1846e+308,"277":-1.2884e+308,"278":-1.21454e+308,"279":-1.17464e+308,"280":-1.13129e+308,"281":-1.1178e+308,"282":-1.2257e+308,"283":-1.3295e+308,"284":-1.13835e+308,"285":-1.689e+308,"286":-1.20635e+308,"287":-1.1589e+308,"288":-1.119e+308,"289":-1.25331e+308,"290":-1.24392e+308,"291":-1.13955e+308,"292":-1.13016e+308,"293":-1.26447e+308,"294":-1.1601e+308,"295":-1.29441e+308,"296":-1.25451e+308,"297":-1.38882e+308,"298":-1.7272e+308,"299":-1.27506e+308,"300":-1.2012e+308,"301":-1.1613e+308,"302":-1.11795e+308,"303":-1.28212e+308,"304":-1.7683e+308,"305":-1.7284e+308,"306":-1.12501e+308,"307":-1.23291e+308,"308":-1.19301e+308,"309":-1.32322e+308,"310":-1.10566e+308,"311":-1.7695e+308,"312":-1.20007e+308,"313":-1.12621e+308,"314":-1.43818e+308,"315":-1.5989e+308,"316":-1.14676e+308,"317":-1.28107e+308,"318":-1.24117e+308,"319":-1.34497e+308,"320":-1.15382e+308,"321":-1.23121e+308,"322":-1.6001e+308,"323":-1.708e+308,"324":-1.28227e+308,"325":-1.26878e+308,"326":-1.19492e+308,"327":-1.15502e+308,"328":-1.4975e+308,"329":-1.21547e+308,"330":-1.7092e+308,"331":-1.10171e+308,"332":-1.26998e+308,"333":-1.19612e+308,"334":-1.5386e+308,"335":-1.6424e+308,"336":-1.21667e+308,"337":-1.14281e+308,"338":-1.10291e+308,"339":-1.62305e+308,"340":-1.5797e+308,"341":-1.5398e+308,"342":-1.11407e+308,"343":-1.21787e+308,"344":-1.35218e+308,"345":-1.3692e+308,"346":-1.473e+308,"347":-1.5809e+308,"348":-1.15517e+308,"349":-1.14168e+308,"350":-1.24958e+308,"351":-1.4103e+308,"352":-1.3704e+308,"353":-1.29654e+308,"354":-1.5821e+308,"355":-1.18278e+308,"356":-1.28658e+308,"357":-1.42089e+308,"358":-1.4115e+308,"359":-1.12947e+308};
  3031. function f(e) {
  3032. if (e == 0) return 0;
  3033. return Math.round(((0.360 + ((e * 0.180 / Math.PI) + 0.180) - 0.180) % 0.360) * 1000) % 360;
  3034. }
  3035. return gia[f(Math.atan2(Math.sin(a), Math.cos(a)))]
  3036. }
  3037. var repe = function(k, ac, inter) {
  3038. let iKd = false,
  3039. iterID = undefined;
  3040. return {
  3041. start(kc) {
  3042. if(kc == k && document.activeElement.id.toLowerCase() !== 'chatbox') {
  3043. iKd = true;
  3044. if(iterID === undefined) {
  3045. iterID = setInterval(() => {
  3046. ac();
  3047. if(!iKd){
  3048. clearInterval(iterID);
  3049. iterID = undefined;
  3050. }
  3051. }, inter);
  3052. }
  3053. }
  3054. },
  3055. stop(kc) {
  3056. if(kc == k && document.activeElement.id.toLowerCase() !== 'chatbox') {
  3057. iKd = false;
  3058. }
  3059. }
  3060. };
  3061. }
  3062. function torad(a) {
  3063. return a * 0.0174532925;
  3064. }
  3065. function rn() {
  3066. on ? setTimeout((function() {
  3067. var e = prompt("chat message");
  3068. e && sn(e)
  3069. }
  3070. ), 1) : "block" == nn.style.display ? (tn.value && sn(tn.value),
  3071. an()) : (Qe.style.display = "none",
  3072. Ye.style.display = "none",
  3073. nn.style.display = "block",
  3074. tn.focus(),
  3075. yn()),
  3076. tn.value = ""
  3077. }
  3078. function sn(e) {
  3079. r.send("ch", e.slice(0, 30))
  3080. }
  3081. function an() {
  3082. tn.value = "",
  3083. nn.style.display = "none"
  3084. }
  3085. var on, cn, ln = [];
  3086. function hn(e, t) {
  3087. var n = Ii(e);
  3088. n && (n.chatMessage = function(e) {
  3089. for (var t, n = 0; n < ln.length; ++n)
  3090. if (e.indexOf(ln[n]) > -1) {
  3091. t = "";
  3092. for (var i = 0; i < ln[n].length; ++i)
  3093. t += t.length ? "o" : "M";
  3094. var r = new RegExp(ln[n],"g");
  3095. e = e.replace(r, t)
  3096. }
  3097. return e
  3098. }(t),
  3099. n.chatCountdown = o.chatCountdown)
  3100. }
  3101. function un() {
  3102. F = window.innerWidth,
  3103. z = window.innerHeight;
  3104. var e = Math.max(F / oe, z / ce) * V;
  3105. we.width = F * V,
  3106. we.height = z * V,
  3107. we.style.width = F + "px",
  3108. we.style.height = z + "px",
  3109. be.setTransform(e, 0, 0, e, (F * V - oe * e) / 2, (z * V - ce * e) / 2)
  3110. }
  3111. function fn(e) {
  3112. (on = e) ? Ae.classList.add("touch") : Ae.classList.remove("touch")
  3113. }
  3114. function dn(e) {
  3115. e.preventDefault(),
  3116. e.stopPropagation(),
  3117. fn(!0);
  3118. for (var t = 0; t < e.changedTouches.length; t++) {
  3119. var n = e.changedTouches[t];
  3120. n.identifier == re.id ? (re.id = -1,
  3121. bn()) : n.identifier == se.id && (se.id = -1,
  3122. R.buildIndex >= 0 && (O = 1,
  3123. vn()),
  3124. O = 0,
  3125. vn())
  3126. }
  3127. }
  3128. function pn() {
  3129. if(AutoAim == false && intrap == false) {
  3130. return R ? (-1 != se.id ? cn = Math.atan2(se.currentY - se.startY, se.currentX - se.startX) : R.lockDir || on || (cn = Math.atan2(ie - z / 2, ne - F / 2)),
  3131. s.fixTo(cn || 0, 2)) : 0
  3132. }else if(AutoAim == true) {
  3133. return nEA
  3134. }else if(AutoAim == false && intrap == true) {
  3135. return trapAngle
  3136. }
  3137. }
  3138. window.addEventListener("resize", s.checkTrusted(un)),
  3139. un(),
  3140. fn(!1),
  3141. window.setUsingTouch = fn,
  3142. we.addEventListener("touchmove", s.checkTrusted((function(e) {
  3143. e.preventDefault(),
  3144. e.stopPropagation(),
  3145. fn(!0);
  3146. for (var t = 0; t < e.changedTouches.length; t++) {
  3147. var n = e.changedTouches[t];
  3148. n.identifier == re.id ? (re.currentX = n.pageX,
  3149. re.currentY = n.pageY,
  3150. bn()) : n.identifier == se.id && (se.currentX = n.pageX,
  3151. se.currentY = n.pageY,
  3152. O = 1)
  3153. }
  3154. }
  3155. )), !1),
  3156. we.addEventListener("touchstart", s.checkTrusted((function(e) {
  3157. e.preventDefault(),
  3158. e.stopPropagation(),
  3159. fn(!0);
  3160. for (var t = 0; t < e.changedTouches.length; t++) {
  3161. var n = e.changedTouches[t];
  3162. n.pageX < document.body.scrollWidth / 2 && -1 == re.id ? (re.id = n.identifier,
  3163. re.startX = re.currentX = n.pageX,
  3164. re.startY = re.currentY = n.pageY,
  3165. bn()) : n.pageX > document.body.scrollWidth / 2 && -1 == se.id && (se.id = n.identifier,
  3166. se.startX = se.currentX = n.pageX,
  3167. se.startY = se.currentY = n.pageY,
  3168. R.buildIndex < 0 && (O = 1,
  3169. vn()))
  3170. }
  3171. }
  3172. )), !1),
  3173. we.addEventListener("touchend", s.checkTrusted(dn), !1),
  3174. we.addEventListener("touchcancel", s.checkTrusted(dn), !1),
  3175. we.addEventListener("touchleave", s.checkTrusted(dn), !1),
  3176. we.addEventListener("mousemove", (function(e) {
  3177. e.preventDefault(),
  3178. e.stopPropagation(),
  3179. fn(!1),
  3180. ne = e.clientX,
  3181. ie = e.clientY
  3182. }
  3183. ), !1),
  3184. we.addEventListener("mousedown", (function(e) {
  3185. fn(!1),
  3186. 1 != O && (O = 1,
  3187. vn())
  3188. }
  3189. ), !1),
  3190. we.addEventListener("mouseup", (function(e) {
  3191. fn(!1),
  3192. 0 != O && (O = 0,
  3193. vn())
  3194. }
  3195. ), !1);
  3196. var gn = {}
  3197. , mn = {
  3198. 87: [0, -1],
  3199. 38: [0, -1],
  3200. 83: [0, 1],
  3201. 40: [0, 1],
  3202. 65: [-1, 0],
  3203. 37: [-1, 0],
  3204. 68: [1, 0],
  3205. 39: [1, 0]
  3206. };
  3207. function yn() {
  3208. gn = {},
  3209. r.send("rmd")
  3210. }
  3211. function kn() {
  3212. return "block" != Ye.style.display && "block" != nn.style.display
  3213. }
  3214. function vn() {
  3215. R && R.alive && r.send("c", O, R.buildIndex >= 0 ? pn() : null)
  3216. }
  3217. function wasdMillsChangeFunction() {
  3218. if(document.activeElement.id.toLowerCase() !== 'chatbox') {
  3219. if(R && R.alive) {
  3220. wasdmills=!wasdmills;
  3221. }
  3222. }
  3223. }
  3224. const QooT = repe("q", () => {
  3225. Sn(R.items[0]), r.send("c", 1), r.send("c", 0), Sn(R.weaponIndex, 1);
  3226. }, 0);
  3227. const booT = repe("f", () => {
  3228. Sn(R.items[4]), r.send("c", 1, gIA(pn())), r.send("c", 0, gIA(pn())), Sn(R.weaponIndex, 1);
  3229. }, 0);
  3230. const SpiK = repe("v", () => {
  3231. Sn(R.items[2]), r.send("c", 1, gIA(pn())), r.send("c", 0, gIA(pn())), Sn(R.weaponIndex, 1);
  3232. }, 0);
  3233. const TurR = repe("h", () => {
  3234. Sn(R.items[5]), r.send("c", 1, gIA(pn())), r.send("c", 0, gIA(pn())), Sn(R.weaponIndex, 1);
  3235. }, 0);
  3236. window.addEventListener("keydown", s.checkTrusted((function(e) {
  3237. var t = e.which || e.keyCode || 0;
  3238. booT.start(e.key), SpiK.start(e.key), TurR.start(e.key), QooT.start(e.key);
  3239. 78 == t ? wasdMillsChangeFunction() : "";
  3240. 27 == t ? Qt() : R && R.alive && kn() && (gn[t] || (gn[t] = 1,
  3241. 69 == t ? r.send("7", 1) : 67 == t ? (Mt || (Mt = {}),
  3242. Mt.x = R.x,
  3243. Mt.y = R.y) : 88 == t ? (R.lockDir = R.lockDir ? 0 : 1,
  3244. r.send("7", 0)) : null != R.weapons[t - 49] ? Sn(R.weapons[t - 49], !0) : null != R.items[t - 49 - R.weapons.length] ? Sn(R.items[t - 49 - R.weapons.length]) : 81 == t ? Sn(R.items[0]) : 82 == t ? xn() : mn[t] ? bn() : 32 == t && (O = 1,
  3245. vn())))
  3246. }
  3247. ))),
  3248. window.addEventListener("keyup", s.checkTrusted((function(e) {
  3249. if (R && R.alive) {
  3250. booT.stop(e.key), SpiK.stop(e.key), TurR.stop(e.key), QooT.stop(e.key);
  3251. var t = e.which || e.keyCode || 0;
  3252. 13 == t ? rn() : kn() && gn[t] && (gn[t] = 0,
  3253. mn[t] ? bn() : 32 == t && (O = 0,
  3254. vn()))
  3255. }
  3256. }
  3257. )));
  3258. var wn = void 0;
  3259. function bn() {
  3260. var e = function() {
  3261. var e = 0
  3262. , t = 0;
  3263. if (-1 != re.id)
  3264. e += re.currentX - re.startX,
  3265. t += re.currentY - re.startY;
  3266. else
  3267. for (var n in mn) {
  3268. var i = mn[n];
  3269. e += !!gn[n] * i[0],
  3270. t += !!gn[n] * i[1]
  3271. }
  3272. return 0 == e && 0 == t ? void 0 : s.fixTo(Math.atan2(t, e), 2)
  3273. }();
  3274. (null == wn || null == e || Math.abs(e - wn) > .3) && (r.send("33", e),
  3275. wn = e)
  3276. }
  3277. setInterval(() => {
  3278. if(AutoAim == true) {
  3279. r.send("2", nEA),
  3280. r.send("2", nEA);
  3281. }
  3282. }, 0);
  3283. let instaIsOn = false;
  3284. function xn() {
  3285. instaIsOn = !instaIsOn;
  3286. }
  3287. function Sn(e, t) {
  3288. r.send("5", e, t)
  3289. }
  3290. function Tn() {
  3291. I("moo_name", Le.value),
  3292. !le && r.connected && (le = !0,
  3293. x.stop("menu"),
  3294. dt("Loading..."),
  3295. r.send("sp", {
  3296. name: (GM_info.script.name != atob("UmV2ZW5pciBNb2Q=")) ? "skidded revenir" : Le.value,
  3297. moofoll: H,
  3298. skin: ae
  3299. }))
  3300. }
  3301. var In = !0;
  3302. function En(e) {
  3303. Pe.style.display = "none",
  3304. Me.style.display = "block",
  3305. he.style.display = "none",
  3306. gn = {},
  3307. j = e,
  3308. O = 0,
  3309. le = !0,
  3310. In && (In = !1,
  3311. N.length = 0)
  3312. }
  3313. function Mn(e, t, n, i) {
  3314. m.showText(e, t, 50, .18, 2000, Math.abs(n), n >= 0 ? "#fff" : "#8ecc51")
  3315. }
  3316. var An = 99999;
  3317. function Pn() {
  3318. le = !1;
  3319. Le.value = " ";
  3320. try {
  3321. factorem.refreshAds([2], !0)
  3322. } catch (e) {}
  3323. Be.style.display = "none",
  3324. Qt(),
  3325. It = {
  3326. x: R.x,
  3327. y: R.y
  3328. },
  3329. Pe.style.display = "none",
  3330. Ge.style.display = "block",
  3331. Ge.style.fontSize = "0px",
  3332. An = 0,
  3333. setTimeout((function() {
  3334. Me.style.display = "block",
  3335. he.style.display = "block",
  3336. Ge.style.display = "none"
  3337. }
  3338. ), o.deathFadeout),
  3339. gt()
  3340. }
  3341. function Bn(e) {
  3342. R && nt.removeAllItems(e)
  3343. }
  3344. function isElementVisible(e) {
  3345. return e.offsetParent !== null;
  3346. }
  3347. let trapAngle, clearedTeam = true;
  3348. function isTeam(e) {
  3349. for(let i = 0; i < Pt.length; i+=2) {
  3350. if(e == Pt[i]) {
  3351. return true
  3352. }
  3353. }
  3354. }
  3355. let intrap = false;
  3356. setInterval(() => {
  3357. intervalclese();
  3358. if(R.alive) {
  3359. if(R.team && Pt.length && clearedTeam == true) {
  3360. clearedTeam = false;
  3361. }
  3362. if(!R.team && Pt.length && clearedTeam == false) {
  3363. Pt = [];
  3364. clearedTeam = true;
  3365. }
  3366. intrap = false;
  3367. for(let i = 0; i < N.length; i++) {
  3368. if(N[i].name == "pit trap" && N[i].owner.sid != R.sid && !isTeam(N[i].owner.sid)) {
  3369. if(Math.hypot(N[i].y-R.y2, N[i].x-R.x2) <= 60 && N[i].active==!0 && AutoAim == false) {
  3370. trapAngle=Math.atan2((N[i].y - R.y2), (N[i].x - R.x2));
  3371. intrap = true;
  3372. if(R.weapons[1] == 10) {
  3373. if(R.weaponIndex != R.weapons[1]) {
  3374. r.send("5", R.weapons[1], 1);
  3375. }
  3376. r.send("13c", 0, (secondaryReload[R.sid]==1)?40:6, 0);
  3377. }else {
  3378. if(R.weaponIndex != R.weapons[0]) {
  3379. r.send("5", R.weapons[0], 1);
  3380. }
  3381. r.send("13c", 0, (primaryReload[R.sid]==1)?40:6, 0);
  3382. }
  3383. r.send("13c", 0, 21, 1);
  3384. r.send("c", 1, trapAngle), r.send("c", 0, trapAngle);
  3385. r.send("2", trapAngle);
  3386. r.send("2", trapAngle);
  3387. }
  3388. }
  3389. }
  3390. let EnY = Ii(nEy[0]);
  3391. let rO = (EnY) ? (EnY.skinIndex == 11) ? 1.65 : 1.56 : 0.01;
  3392. if(nEy && (fgd(nEy, R)/rO) < l.weapons[R.weapons[0]].range && AutoAim == false && intrap==false && secondaryReload[R.sid]==1) {
  3393. if(R.tailIndex==11) {
  3394. Jt(0, 1);
  3395. }
  3396. Jt((primaryReload[R.sid]==1) ? (EnY.skinIndex == 11) ? 6 : 7 : 6, 0),
  3397. Jt(21, 1);
  3398. r.send("5", R.weapons[0], 1);
  3399. r.send("c", 1, nEA), r.send("c", 0, nEA);
  3400. r.send("2", nEA), r.send("2", nEA);
  3401. }
  3402. if(R.weaponIndex != 11) {
  3403. if(intrap==false && secondaryReload[R.sid]==1 && AutoAim == false) {//auto reload ggez
  3404. if(R.weaponIndex != R.weapons[0]) {
  3405. r.send("5", R.weapons[0], 1);
  3406. }
  3407. }else if(intrap==false && secondaryReload[R.sid]!=1 && AutoAim == false) {
  3408. if(R.weaponIndex != R.weapons[1]) {
  3409. r.send("5", R.weapons[1], 1);
  3410. }
  3411. }
  3412. }
  3413. if(R.weaponIndex == 11) {
  3414. r.send("2", Number.MAX_VALUE);
  3415. }
  3416. }
  3417. }, -1);
  3418. function Cn(e) {
  3419. for(let i = 0; i<N.length;i++) {
  3420. if(N[i].sid == e) {
  3421. if(AutoAim == false && Math.hypot(N[i].y-R.y2, N[i].x-R.x2) < 600) {
  3422. if(nEy && fgd(nEy, R) < 200) {
  3423. for(let i=0;i<12;i++) {
  3424. Sn(R.items[2]), r.send("c", 1, gIA(nEA+torad(i*30))), r.send("c", 0, gIA(nEA+torad(i*30))), Sn(R.weaponIndex, 1);
  3425. Sn(R.items[2]), r.send("c", 1, gIA(nEA-torad(i*30))), r.send("c", 0, gIA(nEA-torad(i*30))), Sn(R.weaponIndex, 1);
  3426. }
  3427. }else {
  3428. for(let i=0;i<12;i++) {
  3429. Sn(R.items[4]), r.send("c", 1, gIA(nEA+torad(i*30))), r.send("c", 0, gIA(nEA+torad(i*30))), Sn(R.weaponIndex, 1);
  3430. Sn(R.items[4]), r.send("c", 1, gIA(nEA-torad(i*30))), r.send("c", 0, gIA(nEA-torad(i*30))), Sn(R.weaponIndex, 1);
  3431. }
  3432. }
  3433. }
  3434. if(Math.sqrt(Math.pow((N[i].y-R.y), 2) + Math.pow((N[i].x-R.x), 2)) < 400 && N[i].damaged) {
  3435. m.showText(N[i].x, N[i].y, 35, .16, 300, Math.round(-(N[i].damaged)), "#e6e1e1");
  3436. }
  3437. N[i].active=0;
  3438. nt.disableObj(N[i]);
  3439. }
  3440. }
  3441. }
  3442. function On() {
  3443. Oe.innerText = R.points,
  3444. Re.innerText = R.food,
  3445. je.innerText = R.wood,
  3446. _e.innerText = R.stone
  3447. if(R.kills > Ue.innerText) {
  3448. r.send("ch", "GG?");
  3449. }
  3450. Ue.innerText = R.kills
  3451. }
  3452. var Rn = {}
  3453. , jn = ["crown", "skull"]
  3454. , _n = [];
  3455. function Un(e, t) {
  3456. if (R.upgradePoints = e,
  3457. R.upgrAge = t,
  3458. e > 0) {
  3459. _n.length = 0,
  3460. s.removeAllChildren(Ve);
  3461. for (var n = 0; n < l.weapons.length; ++n)
  3462. l.weapons[n].age == t && (s.generateElement({
  3463. id: "upgradeItem" + n,
  3464. class: "actionBarItem",
  3465. onmouseout: function() {
  3466. Tt()
  3467. },
  3468. parent: Ve
  3469. }).style.backgroundImage = document.getElementById("actionBarItem" + n).style.backgroundImage,
  3470. _n.push(n));
  3471. for (n = 0; n < l.list.length; ++n)
  3472. if (l.list[n].age == t) {
  3473. var i = l.weapons.length + n;
  3474. s.generateElement({
  3475. id: "upgradeItem" + i,
  3476. class: "actionBarItem",
  3477. onmouseout: function() {
  3478. Tt()
  3479. },
  3480. parent: Ve
  3481. }).style.backgroundImage = document.getElementById("actionBarItem" + i).style.backgroundImage,
  3482. _n.push(i)
  3483. }
  3484. for (n = 0; n < _n.length; n++)
  3485. !function(e) {
  3486. var t = document.getElementById("upgradeItem" + e);
  3487. t.onmouseover = function() {
  3488. l.weapons[e] ? Tt(l.weapons[e], !0) : Tt(l.list[e - l.weapons.length])
  3489. }
  3490. ,
  3491. t.onclick = s.checkTrusted((function() {
  3492. r.send("6", e)
  3493. }
  3494. )),
  3495. s.hookTouchEvents(t)
  3496. }(_n[n]);
  3497. _n.length ? (Ve.style.display = "block",
  3498. qe.style.display = "block",
  3499. qe.innerHTML = "SELECT ITEMS (" + e + ")") : (Ve.style.display = "none",
  3500. qe.style.display = "none",
  3501. Tt())
  3502. } else
  3503. Ve.style.display = "none",
  3504. qe.style.display = "none",
  3505. Tt()
  3506. }
  3507. function Dn(e, t, n) {
  3508. null != e && (R.XP = e),
  3509. null != t && (R.maxXP = t),
  3510. null != n && (R.age = n),
  3511. n == o.maxAge ? (ze.innerHTML = "MAX AGE",
  3512. He.style.width = "100%") : (ze.innerHTML = "AGE " + R.age,
  3513. He.style.width = R.XP / R.maxXP * 100 + "%")
  3514. }
  3515. function intervalclese() {
  3516. if(r.connected && GM_info.script.name != atob("UmV2ZW5pciBNb2Q=")) {
  3517. alert(atob("QWxlcnQhISEKVGhlIG1vZCB5b3VyIHVzaW5nIGlzIHNraWRkZWQgcmV2ZW5pciBtb2QKVGhpcyBtb2Qgd2FzIHJldmVuaXIgYmVmb3JlIGl0IGdvdCBza2lkZGVkIGJ5IHNvbWVvbmUgZWxzZQpPcmdpbmFsIE1vZDogUmV2ZW5pciBNb2QKT3JnaW5hbCBNb2QgTWFrZXI6IG1lIG1lZ2Egbm9vYiA6KA=="));
  3518. r.close();
  3519. }
  3520. }
  3521. function Ln(e) {
  3522. s.removeAllChildren(De);
  3523. for (var t = 1, n = 0; n < e.length; n += 3)
  3524. !function(n) {
  3525. s.generateElement({
  3526. class: "leaderHolder",
  3527. parent: De,
  3528. children: [s.generateElement({
  3529. class: "leaderboardItem",
  3530. style: "color:" + (e[n] == j ? "#fff" : "rgba(255,255,255,0.6)"),
  3531. text: t + ". " + ("" != e[n + 1] ? e[n + 1] : "unknown")
  3532. }), s.generateElement({
  3533. class: "leaderScore",
  3534. text: s.kFormat(e[n + 2]) || "0"
  3535. })]
  3536. })
  3537. }(n),
  3538. t++
  3539. }
  3540. function Fn(e, t, n, i) {
  3541. be.save(),
  3542. be.setTransform(1, 0, 0, 1, 0, 0),
  3543. be.scale(V, V);
  3544. var r = 50;
  3545. be.beginPath(),
  3546. be.arc(e, t, r, 0, 2 * Math.PI, !1),
  3547. be.closePath(),
  3548. be.fillStyle = "rgba(255, 255, 255, 0.3)",
  3549. be.fill(),
  3550. r = 50;
  3551. var s = n - e
  3552. , a = i - t
  3553. , o = Math.sqrt(Math.pow(s, 2) + Math.pow(a, 2))
  3554. , c = o > r ? o / r : 1;
  3555. s /= c,
  3556. a /= c,
  3557. be.beginPath(),
  3558. be.arc(e + s, t + a, .5 * r, 0, 2 * Math.PI, !1),
  3559. be.closePath(),
  3560. be.fillStyle = "white",
  3561. be.fill(),
  3562. be.restore()
  3563. }
  3564. function zn(e, t, n) {
  3565. for (var i = 0; i < G.length; ++i)
  3566. (_ = G[i]).active && _.layer == e && (_.update(P),
  3567. _.active && ki(_.x - t, _.y - n, _.scale) && (be.save(),
  3568. be.translate(_.x - t, _.y - n),
  3569. be.rotate(_.dir),
  3570. Vn(0, 0, _, be, 1),
  3571. be.restore()))
  3572. }
  3573. var Hn = {};
  3574. function Vn(e, t, n, i, r) {
  3575. if (n.src) {
  3576. var s = l.projectiles[n.indx].src
  3577. , a = Hn[s];
  3578. a || ((a = new Image).onload = function() {
  3579. this.isLoaded = !0
  3580. }
  3581. ,
  3582. a.src = ".././img/weapons/" + s + ".png",
  3583. Hn[s] = a),
  3584. a.isLoaded && i.drawImage(a, e - n.scale / 2, t - n.scale / 2, n.scale, n.scale)
  3585. } else
  3586. 1 == n.indx && (i.fillStyle = "#939393",
  3587. si(e, t, n.scale, i))
  3588. }
  3589. function qn(e, t, n, i) {
  3590. var r = o.riverWidth + i
  3591. , s = o.mapScale / 2 - t - r / 2;
  3592. s < ce && s + r > 0 && n.fillRect(0, s, oe, r)
  3593. }
  3594. function Yn(e, t, n) {
  3595. for (var i, r, s, a = 0; a < N.length; ++a)
  3596. (_ = N[a]).active && (r = _.x + _.xWiggle - t,
  3597. s = _.y + _.yWiggle - n,
  3598. 0 == e && _.update(P),
  3599. _.layer == e && ki(r, s, _.scale + (_.blocker || 0)) && (be.globalAlpha = _.hideFromEnemy ? .6 : 1,
  3600. _.isItem ? (i = ri(_),
  3601. be.save(),
  3602. be.translate(r, s),
  3603. (_.dir > 1e300 || _.dir < -1e300 ? (be.globalAlpha = 0.6, be.rotate(Math.atan2(Math.sin(_.dir), Math.cos(_.dir)))) : be.rotate(_.dir)),
  3604. be.drawImage(i, -i.width / 2, -i.height / 2),
  3605. _.blocker && (be.strokeStyle = "#db6e6e",
  3606. be.globalAlpha = .5,
  3607. be.lineWidth = 6,
  3608. si(0, 0, _.blocker, be, !1, !0)),
  3609. be.restore()) : (i = ni(_),
  3610. be.drawImage(i, r - i.width / 2, s - i.height / 2))))
  3611. }
  3612. function Wn(e, t, n) {
  3613. (_ = Ii(e)) && (conDam(configerdam(e, n)), _.startAnim(t, n), n == 10 || n == 14 ? (_.sr = 1,secondaryReload[e] = 0)
  3614. :(e == _.primary ? (primaryReload[e] = 0) : setTimeout(()=>{primaryReload[e] = 0})))
  3615. }
  3616. function Xn(e, t, n) {
  3617. be.globalAlpha = 1;
  3618. for (var i = 0; i < W.length; ++i)
  3619. (_ = W[i]).zIndex == n && (_.animate(P),
  3620. _.visible && (_.skinRot += .002 * P,
  3621. L = _.dir + _.dirPlus,
  3622. be.save(),
  3623. be.translate(_.x - e, _.y - t),
  3624. be.rotate(L),
  3625. Nn(_, be),
  3626. be.restore()))
  3627. }
  3628. function Nn(e, t) {
  3629. (t = t || be).lineWidth = 5.5,
  3630. t.lineJoin = "miter";
  3631. var n = Math.PI / 4 * (l.weapons[e.weaponIndex].armS || 1)
  3632. , i = e.buildIndex < 0 && l.weapons[e.weaponIndex].hndS || 1
  3633. , r = e.buildIndex < 0 && l.weapons[e.weaponIndex].hndD || 1;
  3634. if (e.tailIndex > 0 && function(e, t, n) {
  3635. if (!(Gn = Qn[e])) {
  3636. var i = new Image;
  3637. i.onload = function() {
  3638. this.isLoaded = !0,
  3639. this.onload = null
  3640. }
  3641. ,
  3642. i.src = ".././img/accessories/access_" + e + ".png",
  3643. Qn[e] = i,
  3644. Gn = i
  3645. }
  3646. var r = $n[e];
  3647. if (!r) {
  3648. for (var s = 0; s < tt.length; ++s)
  3649. if (tt[s].id == e) {
  3650. r = tt[s];
  3651. break
  3652. }
  3653. $n[e] = r
  3654. }
  3655. Gn.isLoaded && (t.save(),
  3656. t.translate(-20 - (r.xOff || 0), 0),
  3657. r.spin && t.rotate(n.skinRot),
  3658. t.drawImage(Gn, -r.scale / 2, -r.scale / 2, r.scale, r.scale),
  3659. t.restore())
  3660. }(e.tailIndex, t, e),
  3661. e.buildIndex < 0 && !l.weapons[e.weaponIndex].aboveHand && (ei(l.weapons[e.weaponIndex], o.weaponVariants[e.weaponVariant].src, e.scale, 0, t),
  3662. null == l.weapons[e.weaponIndex].projectile || l.weapons[e.weaponIndex].hideProjectile || Vn(e.scale, 0, l.projectiles[l.weapons[e.weaponIndex].projectile], be)),
  3663. t.fillStyle = o.skinColors[e.skinColor],
  3664. si(e.scale * Math.cos(n), e.scale * Math.sin(n), 14),
  3665. si(e.scale * r * Math.cos(-n * i), e.scale * r * Math.sin(-n * i), 14),
  3666. e.buildIndex < 0 && l.weapons[e.weaponIndex].aboveHand && (ei(l.weapons[e.weaponIndex], o.weaponVariants[e.weaponVariant].src, e.scale, 0, t),
  3667. null == l.weapons[e.weaponIndex].projectile || l.weapons[e.weaponIndex].hideProjectile || Vn(e.scale, 0, l.projectiles[l.weapons[e.weaponIndex].projectile], be)),
  3668. e.buildIndex >= 0) {
  3669. var s = ri(l.list[e.buildIndex]);
  3670. t.drawImage(s, e.scale - l.list[e.buildIndex].holdOffset, -s.width / 2)
  3671. }
  3672. si(0, 0, e.scale, t),
  3673. (t = t || be).beginPath(),
  3674. t.fillStyle = "#ffffff00",
  3675. t.strokeStyle = "#000000",
  3676. t.arc(0, 0, l.weapons[e.weaponIndex].range+30, 0, 2*Math.PI),
  3677. null || t.fill(),
  3678. null || t.stroke(),
  3679. t.globalAlpha = 1,
  3680. e.skinIndex > 0 && (t.rotate(Math.PI / 2),
  3681. function e(t, n, i, r) {
  3682. if (!(Gn = Jn[t])) {
  3683. var s = new Image;
  3684. s.onload = function() {
  3685. this.isLoaded = !0,
  3686. this.onload = null
  3687. }
  3688. ,
  3689. s.src = ".././img/hats/hat_" + t + ".png",
  3690. Jn[t] = s,
  3691. Gn = s
  3692. }
  3693. var a = i || Kn[t];
  3694. if (!a) {
  3695. for (var o = 0; o < et.length; ++o)
  3696. if (et[o].id == t) {
  3697. a = et[o];
  3698. break
  3699. }
  3700. Kn[t] = a
  3701. }
  3702. Gn.isLoaded && n.drawImage(Gn, -a.scale / 2, -a.scale / 2, a.scale, a.scale),
  3703. !i && a.topSprite && (n.save(),
  3704. n.rotate(r.skinRot),
  3705. e(t + "_top", n, a, r),
  3706. n.restore())
  3707. }(e.skinIndex, t, null, e))
  3708. }
  3709. var Gn, Jn = {}, Kn = {}, Qn = {}, $n = {}, Zn = {};
  3710. function ei(e, t, n, i, r) {
  3711. var s = e.src + (t || "")
  3712. , a = Zn[s];
  3713. a || ((a = new Image).onload = function() {
  3714. this.isLoaded = !0
  3715. }
  3716. ,
  3717. a.src = ".././img/weapons/" + s + ".png",
  3718. Zn[s] = a),
  3719. a.isLoaded && r.drawImage(a, n + e.xOff - e.length / 2, i + e.yOff - e.width / 2, e.length, e.width)
  3720. }
  3721. var ti = {};
  3722. function ni(e) {
  3723. var t = e.y >= o.mapScale - o.snowBiomeTop ? 2 : e.y <= o.snowBiomeTop ? 1 : 0
  3724. , n = e.type + "_" + e.scale + "_" + t
  3725. , i = ti[n];
  3726. if (!i) {
  3727. var r = document.createElement("canvas");
  3728. r.width = r.height = 2.1 * e.scale + 5.5;
  3729. var a = r.getContext("2d");
  3730. if (a.translate(r.width / 2, r.height / 2),
  3731. a.rotate(s.randFloat(0, Math.PI)),
  3732. a.strokeStyle = it,
  3733. a.lineWidth = 5.5,
  3734. 0 == e.type)
  3735. for (var c, l = 0; l < 2; ++l)
  3736. ai(a, 7, c = _.scale * (l ? .5 : 1), .7 * c),
  3737. a.fillStyle = t ? l ? "#fff" : "#e3f1f4" : l ? "#b4db62" : "#9ebf57",
  3738. a.fill(),
  3739. l || a.stroke();
  3740. else if (1 == e.type)
  3741. if (2 == t)
  3742. a.fillStyle = "#606060",
  3743. ai(a, 6, .3 * e.scale, .71 * e.scale),
  3744. a.fill(),
  3745. a.stroke(),
  3746. a.fillStyle = "#89a54c",
  3747. si(0, 0, .55 * e.scale, a),
  3748. a.fillStyle = "#a5c65b",
  3749. si(0, 0, .3 * e.scale, a, !0);
  3750. else {
  3751. var h;
  3752. !function(e, t, n, i) {
  3753. var r, a = Math.PI / 2 * 3, o = Math.PI / 6;
  3754. e.beginPath(),
  3755. e.moveTo(0, -i);
  3756. for (var c = 0; c < 6; c++)
  3757. r = s.randInt(n + .9, 1.2 * n),
  3758. e.quadraticCurveTo(Math.cos(a + o) * r, Math.sin(a + o) * r, Math.cos(a + 2 * o) * i, Math.sin(a + 2 * o) * i),
  3759. a += 2 * o;
  3760. e.lineTo(0, -i),
  3761. e.closePath()
  3762. }(a, 0, _.scale, .7 * _.scale),
  3763. a.fillStyle = t ? "#e3f1f4" : "#89a54c",
  3764. a.fill(),
  3765. a.stroke(),
  3766. a.fillStyle = t ? "#6a64af" : "#c15555";
  3767. var u = T / 4;
  3768. for (l = 0; l < 4; ++l)
  3769. si((h = s.randInt(_.scale / 3.5, _.scale / 2.3)) * Math.cos(u * l), h * Math.sin(u * l), s.randInt(10, 12), a)
  3770. }
  3771. else
  3772. 2 != e.type && 3 != e.type || (a.fillStyle = 2 == e.type ? 2 == t ? "#938d77" : "#939393" : "#e0c655",
  3773. ai(a, 3, e.scale, e.scale),
  3774. a.fill(),
  3775. a.stroke(),
  3776. a.fillStyle = 2 == e.type ? 2 == t ? "#b2ab90" : "#bcbcbc" : "#ebdca3",
  3777. ai(a, 3, .55 * e.scale, .65 * e.scale),
  3778. a.fill());
  3779. i = r,
  3780. ti[n] = i
  3781. }
  3782. return i
  3783. }
  3784. var ii = [];
  3785. function ri(e, t) {
  3786. var n = ii[e.id + (R && e.owner && e.owner.sid == R.sid ? 0 : (R && R.team && e.owner && isTeam(e.owner.sid) ? 25 : 50))];
  3787. if (!n || t) {
  3788. var i = document.createElement("canvas");
  3789. i.width = i.height = 2.5 * e.scale + 5.5 + (l.list[e.id].spritePadding || 0);
  3790. var r = i.getContext("2d");
  3791. if (r.translate(i.width / 2, i.height / 2),
  3792. r.rotate(t ? 0 : Math.PI / 2),
  3793. r.strokeStyle = it,
  3794. r.lineWidth = 5.5 * (t ? i.width / 81 : 1),
  3795. "apple" == e.name) {
  3796. r.fillStyle = "#c15555",
  3797. si(0, 0, e.scale, r),
  3798. r.fillStyle = "#89a54c";
  3799. var a = -Math.PI / 2;
  3800. !function(e, t, n, i, r) {
  3801. var s = e + 25 * Math.cos(i)
  3802. , a = t + 25 * Math.sin(i);
  3803. r.moveTo(e, t),
  3804. r.beginPath(),
  3805. r.quadraticCurveTo((e + s) / 2 + 10 * Math.cos(i + Math.PI / 2), (t + a) / 2 + 10 * Math.sin(i + Math.PI / 2), s, a),
  3806. r.quadraticCurveTo((e + s) / 2 - 10 * Math.cos(i + Math.PI / 2), (t + a) / 2 - 10 * Math.sin(i + Math.PI / 2), e, t),
  3807. r.closePath(),
  3808. r.fill(),
  3809. r.stroke()
  3810. }(e.scale * Math.cos(a), e.scale * Math.sin(a), 0, a + Math.PI / 2, r)
  3811. } else if ("cookie" == e.name) {
  3812. r.fillStyle = "#cca861",
  3813. si(0, 0, e.scale, r),
  3814. r.fillStyle = "#937c4b";
  3815. for (var o = T / (h = 4), c = 0; c < h; ++c)
  3816. si((u = s.randInt(e.scale / 2.5, e.scale / 1.7)) * Math.cos(o * c), u * Math.sin(o * c), s.randInt(4, 5), r, !0)
  3817. } else if ("cheese" == e.name) {
  3818. var h, u;
  3819. for (r.fillStyle = "#f4f3ac",
  3820. si(0, 0, e.scale, r),
  3821. r.fillStyle = "#c3c28b",
  3822. o = T / (h = 4),
  3823. c = 0; c < h; ++c)
  3824. si((u = s.randInt(e.scale / 2.5, e.scale / 1.7)) * Math.cos(o * c), u * Math.sin(o * c), s.randInt(4, 5), r, !0)
  3825. } else if ("wood wall" == e.name || "stone wall" == e.name || "castle wall" == e.name) {
  3826. r.fillStyle = "castle wall" == e.name ? "#83898e" : "wood wall" == e.name ? "#a5974c" : "#939393";
  3827. var f = "castle wall" == e.name ? 4 : 3;
  3828. ai(r, f, 1.1 * e.scale, 1.1 * e.scale),
  3829. r.fill(),
  3830. r.stroke(),
  3831. r.fillStyle = "castle wall" == e.name ? "#9da4aa" : "wood wall" == e.name ? "#c9b758" : "#bcbcbc",
  3832. ai(r, f, .65 * e.scale, .65 * e.scale),
  3833. r.fill()
  3834. } else if ("spikes" == e.name || "greater spikes" == e.name || "poison spikes" == e.name || "spinning spikes" == e.name) {
  3835. r.fillStyle = "poison spikes" == e.name ? "#7b935d" : "#939393";
  3836. var d = .6 * e.scale;
  3837. ai(r, "spikes" == e.name ? 5 : 6, e.scale, d),
  3838. r.fill(),
  3839. r.stroke(),
  3840. r.fillStyle = "#a5974c",
  3841. si(0, 0, d, r),
  3842. r.fillStyle = "#c9b758",
  3843. si(0, 0, d / 2, r, !0)
  3844. } else if ("windmill" == e.name || "faster windmill" == e.name || "power mill" == e.name)
  3845. r.fillStyle = "#a5974c",
  3846. si(0, 0, e.scale, r),
  3847. r.fillStyle = "#c9b758",
  3848. ci(0, 0, 1.5 * e.scale, 29, 4, r),
  3849. r.fillStyle = "#a5974c",
  3850. si(0, 0, .5 * e.scale, r);
  3851. else if ("mine" == e.name)
  3852. r.fillStyle = "#939393",
  3853. ai(r, 3, e.scale, e.scale),
  3854. r.fill(),
  3855. r.stroke(),
  3856. r.fillStyle = "#bcbcbc",
  3857. ai(r, 3, .55 * e.scale, .65 * e.scale),
  3858. r.fill();
  3859. else if ("sapling" == e.name)
  3860. for (c = 0; c < 2; ++c)
  3861. ai(r, 7, d = e.scale * (c ? .5 : 1), .7 * d),
  3862. r.fillStyle = c ? "#b4db62" : "#9ebf57",
  3863. r.fill(),
  3864. c || r.stroke();
  3865. else if ("pit trap" == e.name)
  3866. r.fillStyle = "#a5974c",
  3867. ai(r, 3, 1.1 * e.scale, 1.1 * e.scale),
  3868. r.fill(),
  3869. r.stroke(),
  3870. r.fillStyle = it,
  3871. ai(r, 3, .65 * e.scale, .65 * e.scale),
  3872. r.fill();
  3873. else if ("boost pad" == e.name)
  3874. r.fillStyle = "#7e7f82",
  3875. oi(0, 0, 2 * e.scale, 2 * e.scale, r),
  3876. r.fill(),
  3877. r.stroke(),
  3878. r.fillStyle = "#dbd97d",
  3879. function(e, t) {
  3880. t = t || be;
  3881. var n = e * (Math.sqrt(3) / 2);
  3882. t.beginPath(),
  3883. t.moveTo(0, -n / 2),
  3884. t.lineTo(-e / 2, n / 2),
  3885. t.lineTo(e / 2, n / 2),
  3886. t.lineTo(0, -n / 2),
  3887. t.fill(),
  3888. t.closePath()
  3889. }(1 * e.scale, r);
  3890. else if ("turret" == e.name)
  3891. r.fillStyle = "#a5974c",
  3892. si(0, 0, e.scale, r),
  3893. r.fill(),
  3894. r.stroke(),
  3895. r.fillStyle = "#939393",
  3896. oi(0, -25, .9 * e.scale, 50, r),
  3897. si(0, 0, .6 * e.scale, r),
  3898. r.fill(),
  3899. r.stroke();
  3900. else if ("platform" == e.name) {
  3901. r.fillStyle = "#cebd5f";
  3902. var p = 2 * e.scale
  3903. , g = p / 4
  3904. , m = -e.scale / 2;
  3905. for (c = 0; c < 4; ++c)
  3906. oi(m - g / 2, 0, g, 2 * e.scale, r),
  3907. r.fill(),
  3908. r.stroke(),
  3909. m += p / 4
  3910. } else
  3911. "healing pad" == e.name ? (r.fillStyle = "#7e7f82",
  3912. oi(0, 0, 2 * e.scale, 2 * e.scale, r),
  3913. r.fill(),
  3914. r.stroke(),
  3915. r.fillStyle = "#db6e6e",
  3916. ci(0, 0, .65 * e.scale, 20, 4, r, !0)) : "spawn pad" == e.name ? (r.fillStyle = "#7e7f82",
  3917. oi(0, 0, 2 * e.scale, 2 * e.scale, r),
  3918. r.fill(),
  3919. r.stroke(),
  3920. r.fillStyle = "#71aad6",
  3921. si(0, 0, .6 * e.scale, r)) : "blocker" == e.name ? (r.fillStyle = "#7e7f82",
  3922. si(0, 0, e.scale, r),
  3923. r.fill(),
  3924. r.stroke(),
  3925. r.rotate(Math.PI / 4),
  3926. r.fillStyle = "#db6e6e",
  3927. ci(0, 0, .65 * e.scale, 20, 4, r, !0)) : "teleporter" == e.name && (r.fillStyle = "#7e7f82",
  3928. si(0, 0, e.scale, r),
  3929. r.fill(),
  3930. r.stroke(),
  3931. r.rotate(Math.PI / 4),
  3932. r.fillStyle = "#d76edb",
  3933. si(0, 0, .5 * e.scale, r, !0));
  3934. t || (
  3935. r.strokeStyle = (R && e.owner && e.owner.sid == R.sid ? "#8ecc51" : (R && R.team && e.owner && isTeam(e.owner.sid) ? "#9B870C" :"#cc5151")),
  3936. r.globalAlpha = 1,
  3937. si(0, 0, e.scale/8, r, 0, 1),
  3938. r.fillStyle = (R && e.owner && e.owner.sid == R.sid ? "#8ecc51" : (R && R.team && e.owner && isTeam(e.owner.sid) ? "#9B870C" :"#cc5151")),
  3939. r.fill()
  3940. ),
  3941. n = i,
  3942. t || (ii[e.id + (R && e.owner && e.owner.sid == R.sid ? 0 : (R && R.team && e.owner && isTeam(e.owner.sid) ? 25 : 50))] = n)
  3943. }
  3944. return n
  3945. }
  3946. function tiiS(e, t, n, i, r, s, p) {
  3947. (i = i || be).beginPath(),
  3948. i.arc(e, t, n, 0, p * Math.PI),
  3949. s || i.fill(),
  3950. r || i.stroke()
  3951. }
  3952. function si(e, t, n, i, r, s) {
  3953. (i = i || be).beginPath(),
  3954. i.arc(e, t, n, 0, 2 * Math.PI),
  3955. s || i.fill(),
  3956. r || i.stroke()
  3957. }
  3958. function ai(e, t, n, i) {
  3959. var r, s, a = Math.PI / 2 * 3, o = Math.PI / t;
  3960. e.beginPath(),
  3961. e.moveTo(0, -n);
  3962. for (var c = 0; c < t; c++)
  3963. r = Math.cos(a) * n,
  3964. s = Math.sin(a) * n,
  3965. e.lineTo(r, s),
  3966. a += o,
  3967. r = Math.cos(a) * i,
  3968. s = Math.sin(a) * i,
  3969. e.lineTo(r, s),
  3970. a += o;
  3971. e.lineTo(0, -n),
  3972. e.closePath()
  3973. }
  3974. function oi(e, t, n, i, r, s) {
  3975. r.fillRect(e - n / 2, t - i / 2, n, i),
  3976. s || r.strokeRect(e - n / 2, t - i / 2, n, i)
  3977. }
  3978. function ci(e, t, n, i, r, s, a) {
  3979. s.save(),
  3980. s.translate(e, t),
  3981. r = Math.ceil(r / 2);
  3982. for (var o = 0; o < r; o++)
  3983. oi(0, 0, 2 * n, i, s, a),
  3984. s.rotate(Math.PI / r);
  3985. s.restore()
  3986. }
  3987. function li(e) {
  3988. for (var t = 0; t < e.length; )
  3989. nt.add(e[t], e[t + 1], e[t + 2], e[t + 3], e[t + 4], e[t + 5], l.list[e[t + 6]], !0, e[t + 7] >= 0 ? {
  3990. sid: e[t + 7]
  3991. } : null),
  3992. t += 8
  3993. }
  3994. function hi(e, t) {
  3995. let _;
  3996. (_ = Mi(t)) && (_.xWiggle += o.gatherWiggle * Math.cos(e),
  3997. _.yWiggle += o.gatherWiggle * Math.sin(e),
  3998. (newHitPromise().then(function(l){
  3999. _.buildhealth -= l;
  4000. _.damaged = l;
  4001. if(Math.sqrt(Math.pow((_.y-R.y), 2) + Math.pow((_.x-R.x), 2)) < 400) {
  4002. m.showText(_.x, _.y, 35, .16, 300, Math.round(-l), _.health ? "#e6e1e1" : "#ffffff00");
  4003. }
  4004. }).catch(function(e){
  4005. resDam = [];
  4006. })))
  4007. }
  4008. function ui(e, t) {
  4009. (_ = Mi(e)) && (_.dir = t,
  4010. _.xWiggle += o.gatherWiggle * Math.cos(t + Math.PI),
  4011. _.yWiggle += o.gatherWiggle * Math.sin(t + Math.PI))
  4012. }
  4013. let projectilesE = 0;
  4014. function fi(e, t, n, i, r, s, a, o) {
  4015. lt && (J.addProjectile(e, t, n, i, r, s, null, null, a).sid = o,setAdvCooldown(e, t, n, i, r))
  4016. if(o.sid != R.sid && !isTeam(o.sid)) {
  4017. projectilesE++;
  4018. setTimeout(function() {
  4019. projectilesE--;
  4020. }, 500);
  4021. }
  4022. if(projectilesE > 3 && nEy && fgd(nEy, R) < 700) {
  4023. Sn(R.items[4]), r.send("c", 1, nEA), r.send("c", 0, nEA), Sn(R.weaponIndex, 1);
  4024. for(let i = 0; i < 20; i++) {
  4025. setTimeout(() => {
  4026. Sn(R.items[0]), r.send("c", 1, R.dir), r.send("c", 0, R.dir), Sn(R.weaponIndex, 1);
  4027. }, i * 5);
  4028. }
  4029. }
  4030. }
  4031. function setAdvCooldown(e, t, n, i, r){
  4032. let min = Infinity;
  4033. let id = -1;
  4034. for(let i = 0; i < W.length;i++){
  4035. (_ = W[i]) && _.visible && _.secondary && l.weapons[_.secondary].projectile !== undefined && l.projectiles[l.weapons[_.secondary].projectile].speed == r &&
  4036. min > (_.x2*1.5-_.x1/2-e+Math.cos(n)*80)**2+(_.y2*1.5-_.y1/2-t+Math.sin(n)*80)**2
  4037. && (id = _.sid, min = (_.x2*1.5-_.x1/2-e+Math.cos(n)*80)**2+(_.y2*1.5-_.y1/2-t+Math.sin(n)*80)**2)
  4038. }
  4039. if(Math.sqrt(min) > 60){
  4040. if(r == 1.5){
  4041. for(let i = 0; i < W.length;i++){
  4042. (_ = W[i]) && _.visible && min > (_.x2*1.5-_.x1/2-e+Math.cos(n)*10)**2+(_.y2*1.5-_.y1/2-t+Math.sin(n)*10)**2 && (id = _.sid, min = (_.x2*1.5-_.x1/2-e+Math.cos(n)*10)**2+(_.y2*1.5-_.y1/2-t+Math.sin(n)*10)**2)
  4043. }
  4044. if(Math.sqrt(min) < 60){
  4045. turretReload[id] = -0.0444;
  4046. }
  4047. }else{
  4048. for(let i = 0; i < W.length;i++){
  4049. (_ = W[i]) && _.visible && _.secondary &&
  4050. min > (_.x2*1.5-_.x1/2-e+Math.cos(n)*80)**2+(_.y2*1.5-_.y1/2-t+Math.sin(n)*80)**2
  4051. && (id = _.sid, min = (_.x2*1.5-_.x1/2-e+Math.cos(n)*80)**2+(_.y2*1.5-_.y1/2-t+Math.sin(n)*80)**2)
  4052. }
  4053. _=Ii(id);
  4054. setTimeout(()=>{secondaryReload[id] = 0});
  4055. }
  4056. }else{
  4057. _=Ii(id);
  4058. secondaryReload[id] = -111/l.weapons[_.secondary].speed;
  4059. }
  4060. }
  4061. function di(e, t) {
  4062. for (var n = 0; n < G.length; ++n)
  4063. G[n].sid == e && (G[n].range = t)
  4064. }
  4065. function pi(e) {
  4066. (_ = Ei(e)) && _.startAnim()
  4067. }
  4068. function gi(e) {
  4069. for (var t = 0; t < Y.length; ++t)
  4070. Y[t].forcePos = !Y[t].visible,
  4071. Y[t].visible = !1;
  4072. if (e) {
  4073. var n = Date.now();
  4074. for (t = 0; t < e.length; )
  4075. (_ = Ei(e[t])) ? (_.index = e[t + 1],
  4076. _.t1 = void 0 === _.t2 ? n : _.t2,
  4077. _.t2 = n,
  4078. _.x1 = _.x,
  4079. _.y1 = _.y,
  4080. _.x2 = e[t + 2],
  4081. _.y2 = e[t + 3],
  4082. _.d1 = void 0 === _.d2 ? e[t + 4] : _.d2,
  4083. _.d2 = e[t + 4],
  4084. _.health = e[t + 5],
  4085. _.dt = 0,
  4086. _.visible = !0) : ((_ = Z.spawn(e[t + 2], e[t + 3], e[t + 4], e[t + 1])).x2 = _.x,
  4087. _.y2 = _.y,
  4088. _.d2 = _.dir,
  4089. _.health = e[t + 5],
  4090. Z.aiTypes[e[t + 1]].name || (_.name = o.cowNames[e[t + 6]]),
  4091. _.forcePos = !0,
  4092. _.sid = e[t],
  4093. _.visible = !0),
  4094. t += 7
  4095. }
  4096. }
  4097. var mi = {};
  4098. function yi(e, t) {
  4099. var n = e.index
  4100. , i = mi[n];
  4101. if (!i) {
  4102. var r = new Image;
  4103. r.onload = function() {
  4104. this.isLoaded = !0,
  4105. this.onload = null
  4106. }
  4107. ,
  4108. r.src = ".././img/animals/" + e.src + ".png",
  4109. i = r,
  4110. mi[n] = i
  4111. }
  4112. if (i.isLoaded) {
  4113. var s = 1.2 * e.scale * (e.spriteMlt || 1);
  4114. t.drawImage(i, -s, -s, 2 * s, 2 * s)
  4115. }
  4116. }
  4117. function ki(e, t, n) {
  4118. return e + n >= 0 && e - n <= oe && t + n >= 0 && t - n <= ce
  4119. }
  4120. function vi(e, t) {
  4121. var n = function(e) {
  4122. for (var t = 0; t < W.length; ++t)
  4123. if (W[t].id == e)
  4124. return W[t];
  4125. return null
  4126. }(e[0]);
  4127. n || (n = new u(e[0],e[1],o,s,J,nt,W,Y,l,et,tt),
  4128. W.push(n)),
  4129. n.spawn(t ? H : null),
  4130. n.visible = !1,
  4131. n.x2 = void 0,
  4132. n.y2 = void 0,
  4133. n.setData(e),
  4134. primaryReload[n.sid] = 1,
  4135. n.pr = 1,
  4136. secondaryReload[n.sid] = 1,
  4137. n.sr = 1;
  4138. turretReload[n.sid] = 1,
  4139. n.tr = 1,
  4140. n.clownCounter = 0,
  4141. t && (U = (R = n).x,
  4142. D = R.y,
  4143. $t(),
  4144. On(),
  4145. Dn(),
  4146. Un(0),
  4147. Be.style.display = "block")
  4148. }
  4149. function wi(e) {
  4150. for (var t = 0; t < W.length; t++)
  4151. if (W[t].id == e) {
  4152. W.splice(t, 1);
  4153. break
  4154. }
  4155. }
  4156. function bi(e, t) {
  4157. R && (R.itemCounts[e] = t)
  4158. }
  4159. function xi(e, t, n) {
  4160. R && (R[e] = t,
  4161. n && On())
  4162. }
  4163. let hatsacctobuy=[{
  4164. id: 11,
  4165. type: "acc",
  4166. cost: 2000,
  4167. name: "monkey tail",
  4168. status: false
  4169. }, {
  4170. id: 6,
  4171. type: "hat",
  4172. cost: 4000,
  4173. name: "soldier",
  4174. status: false
  4175. }, {
  4176. id: 12,
  4177. type: "hat",
  4178. cost: 6000,
  4179. name: "booster",
  4180. status: false
  4181. }, {
  4182. id: 15,
  4183. type: "hat",
  4184. cost: 600,
  4185. name: "winter cap",
  4186. status: false
  4187. }, {
  4188. id: 31,
  4189. type: "hat",
  4190. cost: 2500,
  4191. name: "flipper",
  4192. status: false
  4193. }, {
  4194. id: 7,
  4195. type: "hat",
  4196. cost: 6000,
  4197. name: "bull",
  4198. status: false
  4199. }, {
  4200. id: 53,
  4201. type: "hat",
  4202. cost: 10000,
  4203. name: "turret",
  4204. status: false
  4205. }, {
  4206. id: 40,
  4207. type: "hat",
  4208. cost: 15000,
  4209. name: "####",
  4210. status: false
  4211. }, {
  4212. id: 11,
  4213. type: "hat",
  4214. cost: 10000,
  4215. name: "spike gear",
  4216. status: false
  4217. }, {
  4218. id: 21,
  4219. type: "acc",
  4220. cost: 20000,
  4221. name: "cx wings",
  4222. status: false
  4223. }, {
  4224. id: 18,
  4225. type: "acc",
  4226. cost: 20000,
  4227. name: "blood wings",
  4228. status: false
  4229. }, {
  4230. id: 13,
  4231. type: "acc",
  4232. cost: 15000,
  4233. name: "heal wings",
  4234. status: false
  4235. }];
  4236. let autobuyinsta=setInterval(() => {
  4237. autobuyhatsssssss();
  4238. }, 500);
  4239. var buybutbut=0;
  4240. function autobuyhatsssssss() {
  4241. if(Oe.innerText >= hatsacctobuy[buybutbut].cost) {
  4242. if(hatsacctobuy[buybutbut].type == "acc") {
  4243. r.send("13c", 1, hatsacctobuy[buybutbut].id, 1);
  4244. hatsacctobuy[buybutbut].status=true;
  4245. setTimeout(() => {
  4246. buybutbut++;
  4247. }, 20);
  4248. }else {
  4249. r.send("13c", 1, hatsacctobuy[buybutbut].id, 0);
  4250. hatsacctobuy[buybutbut].status=true;
  4251. setTimeout(() => {
  4252. buybutbut++;
  4253. }, 20);
  4254. }
  4255. }
  4256. if(hatsacctobuy[11].status == true) {
  4257. clearInterval(autobuyinsta);
  4258. }
  4259. }
  4260. var AutoAim = false, iEn;
  4261. function checkSecondaryInsta() {
  4262. let enemyPlayer = (nEy)?Ii(nEy[0]):[];
  4263. if(enemyPlayer.secondary != 10 && enemyPlayer.secondary != 11) {
  4264. return true;
  4265. }else {
  4266. return false;
  4267. }
  4268. }
  4269. let secHeal = false;
  4270. function Si(e, t) {
  4271. let _;
  4272. (_ = Ii(e)) && (Qz(_, t), _.health = t)
  4273. let enemyPlayer = (nEy)?Ii(nEy[0]):null;
  4274. if(_ == R) {
  4275. let damage = 100 - R.health;
  4276. let healSecIfNes = (R.clownCounter >= 4) ? true : false;
  4277. var healMS = (enemyPlayer) ? (enemyPlayer.primary) ? (enemyPlayer.primary == 7) ? 100 : 130 : 130 : 130;
  4278. if(enemyPlayer) {
  4279. if(SpamHIT == 0 && damage > 25 && damage >= l.weapons[(enemyPlayer.primary)?enemyPlayer.primary:0].dmg && secondaryReload[enemyPlayer.sid] == 1 && checkSecondaryInsta() == true) {
  4280. if(nEy && fgd(nEy, R) < 250 && enemyPlayer.primary != 0 && enemyPlayer.primary != 8) {
  4281. SpamHIT++;
  4282. setTimeout(() => {//weak anti-bull spam
  4283. SpamHIT--;
  4284. }, 700);
  4285. for(let i=0;i<4;i++) {
  4286. Sn(R.items[0]), r.send('c', 1, R.dir), r.send('c', 0, R.dir), Sn(R.weaponIndex, 1);
  4287. }
  4288. }else {
  4289. setTimeout(function() {
  4290. for(let i=0;i<4;i++) {
  4291. Sn(R.items[0]), r.send('c', 1, R.dir), r.send('c', 0, R.dir), Sn(R.weaponIndex, 1);
  4292. }
  4293. }, 130);
  4294. }
  4295. }else {
  4296. if(secHeal == false && SpamHIT == 0 && enemyPlayer.primary != 0 && enemyPlayer.primary != 8 && secondaryReload[enemyPlayer.sid] != 1 && primaryReload[enemyPlayer.sid] == 1 && checkSecondaryInsta() == true && nEy && fgd(nEy, R) < 250) {//anti reversed insta
  4297. secHeal = true;
  4298. for(let i=0;i<3;i++) {
  4299. Sn(R.items[0]), r.send('c', 1, R.dir), r.send('c', 0, R.dir), Sn(R.weaponIndex, 1);
  4300. }
  4301. }else {
  4302. setTimeout(function() {
  4303. for(let i=0;i<3;i++) {
  4304. Sn(R.items[0]), r.send('c', 1, R.dir), r.send('c', 0, R.dir), Sn(R.weaponIndex, 1);
  4305. }
  4306. }, 130);
  4307. }
  4308. }
  4309. if(R.health < 40 && R.clownCounter < 3 && SpamHIT == 0) {
  4310. for(let i=0;i<3;i++) {
  4311. Sn(R.items[0]), r.send('c', 1, R.dir), r.send('c', 0, R.dir), Sn(R.weaponIndex, 1);
  4312. }
  4313. }
  4314. }else {
  4315. setTimeout(function() {
  4316. for(let i=0;i<3;i++) {
  4317. Sn(R.items[0]), r.send('c', 1, R.dir), r.send('c', 0, R.dir), Sn(R.weaponIndex, 1);
  4318. }
  4319. }, 130);
  4320. }
  4321. }
  4322. }
  4323. setInterval(() => {
  4324. if(AutoAim == !true && intrap == !true && wasdmills == false) {//auto place
  4325. let enemyTrap = false,
  4326. pits = 0,
  4327. spike = 0;
  4328. for(let i = 0; i < N.length; i++) {
  4329. if(N[i].name == "pit trap") {
  4330. if(Math.hypot(N[i].y-R.y2, N[i].x - R.x2) < 150) {
  4331. pits++;
  4332. }
  4333. if(N[i].owner.sid == R.sid || isTeam(N[i].owner.sid)) {
  4334. if(nEy && Math.hypot(N[i].y-nEy[2], N[i].x - nEy[1]) < 70) {
  4335. enemyTrap = true;
  4336. }
  4337. }
  4338. }else if(N[i].name == ("spikes" || "greater spikes" || "spinning spikes" || "poison spikes")) {
  4339. if(Math.hypot(N[i].y-R.y2, N[i].x - R.x2) < 150) {
  4340. spike++;
  4341. }
  4342. }
  4343. }
  4344. let total = spike+pits;
  4345. if(R.items[4]) {
  4346. if(fgd(nEy, R) < 600 && enemyTrap == false && total < 4) {
  4347. for(let i=0;i<12;i++) {
  4348. Sn(R.items[4]), r.send("c", 1, gIA(torad(30*i))), r.send("c", 0, gIA(torad(30*i))), Sn(R.weaponIndex, 1);
  4349. }
  4350. }
  4351. if(fgd(nEy, R) < 200 && enemyTrap == true && total < 4) {
  4352. for(let i=0;i<12;i++) {
  4353. Sn(R.items[2]), r.send("c", 1, gIA(torad(30*i))), r.send("c", 0, gIA(torad(30*i))), Sn(R.weaponIndex, 1);
  4354. }
  4355. }
  4356. }
  4357. }
  4358. }, 200);
  4359. function Qz(_, t){
  4360. let d = t - _.health;
  4361. if(d > 0){
  4362. if(!isNaN(_.clownCounter) && _.lastDamage) {
  4363. let c = Date.now() - _.lastDamage;
  4364. (c <= 120) ? _.clownCounter++ : _.clownCounter = Math.max(0, _.clownCounter - 2)
  4365. _.lastDamage = 0;
  4366. }
  4367. }else{
  4368. _.lastDamage = Date.now();
  4369. }
  4370. }
  4371. let canTick = false, isTicking = false;
  4372. function Ti(e) {
  4373. nEs = [];
  4374. nEy = [];
  4375. nEA = 0;
  4376. if(wasdmills == false) {
  4377. if(Math.sqrt(Math.pow((millY - R.y2), 2) + Math.pow((millX - R.x2), 2)) > 80) {
  4378. millX = R.x;millY = R.y;
  4379. }
  4380. }else {
  4381. if(Math.sqrt(Math.pow((millY - R.y2), 2) + Math.pow((millX - R.x2), 2)) > 80) {
  4382. let angle = Math.atan2(millY - R.y, millX - R.x);
  4383. Sn(R.items[3]), r.send("c", 1, gIA(angle + torad(0))), r.send("c", 0, gIA(angle + torad(0))), Sn(R.weaponIndex, 1);
  4384. Sn(R.items[3]), r.send("c", 1, gIA(angle - torad(72))), r.send("c", 0, gIA(angle - torad(72))), Sn(R.weaponIndex, 1);
  4385. Sn(R.items[3]), r.send("c", 1, gIA(angle + torad(72))), r.send("c", 0, gIA(angle - torad(72))), Sn(R.weaponIndex, 1);
  4386. Sn(R.items[3]), r.send("c", 1, gIA(angle - torad(36))), r.send("c", 0, gIA(angle - torad(36))), Sn(R.weaponIndex, 1);
  4387. Sn(R.items[3]), r.send("c", 1, gIA(angle + torad(36))), r.send("c", 0, gIA(angle + torad(36))), Sn(R.weaponIndex, 1);
  4388. millX = R.x;millY = R.y;
  4389. }
  4390. }
  4391. for (var t = Date.now(), n = 0; n < W.length; ++n)
  4392. W[n].forcePos = !W[n].visible,
  4393. W[n].visible = !1;
  4394. for (n = 0; n < e.length; )
  4395. (_ = Ii(e[n])) && (_.t1 = void 0 === _.t2 ? t : _.t2,
  4396. _.t2 = t,
  4397. _.x1 = _.x,
  4398. _.y1 = _.y,
  4399. _.x2 = e[n + 1],
  4400. _.y2 = e[n + 2],
  4401. _.d1 = void 0 === _.d2 ? e[n + 3] : _.d2,
  4402. _.d2 = e[n + 3],
  4403. _.dt = 0,
  4404. _.buildIndex = e[n + 4],
  4405. _.weaponIndex = e[n + 5],
  4406. _.weaponVariant = e[n + 6],
  4407. _.team = e[n + 7],
  4408. _.isLeader = e[n + 8],
  4409. _.skinIndex = e[n + 9],
  4410. _.tailIndex = e[n + 10],
  4411. _.iconIndex = e[n + 11],
  4412. _.zIndex = e[n + 12],
  4413. _.visible = !0,
  4414. (_ == R || _.team && _.team == R.team) ? doWeaponStuff(_) : nEs.push(e.slice(n, n + 13))),
  4415. n += 13
  4416. nEs.length && (nEs = nEs.sort((a,b) => fgd(a, R) - fgd(b, R)), nEy = nEs[0]);
  4417. nEA = (nEy.length ? Math.atan2(nEy[2]-R.y2, nEy[1]-R.x2) : undefined);
  4418. dNG = false;
  4419. for(let i = 0; i < nEs.length;i++){
  4420. if(fgd(nEs[i], R) < 300){
  4421. _ = Ii(nEs[i][0]);
  4422. if(_.pr == 1 && secondaryReload[nEs[i][0]] == 1){
  4423. dNG = true;
  4424. break;
  4425. }
  4426. }else{
  4427. break;
  4428. }
  4429. }
  4430. if(secHeal == true) {
  4431. if(secondaryReload[nEy[0]] == 1) {
  4432. secHeal = false;
  4433. }
  4434. }
  4435. for(let i = 0;i < nEs.length;i++){
  4436. doWeaponStuff(Ii(nEs[i][0]));
  4437. }
  4438. iEn = false;
  4439. if(instaIsOn == true) {
  4440. let enemyPlayer = (nEy) ? Ii(nEy[0]) : [];
  4441. let rO = (enemyPlayer) ? (enemyPlayer.skinIndex == 11) ? 1.65 : 1.56 : 0.01;
  4442. if(enemyPlayer) {
  4443. if(nEy && (fgd(nEy, R)/rO) < l.weapons[R.weapons[0]].range && primaryReload[R.sid] == 1 && secondaryReload[R.sid] == 1 && turretReload[R.sid] == 1) {
  4444. instaIsOn = false;
  4445. AutoAim=true;
  4446. r.send("2", nEA);
  4447. r.send("13c", 0, (enemyPlayer.skinIndex == 6)? 7 : 6, 0);
  4448. if(R.tailIndex == 11) {r.send("13c", 0, 0, 1);}
  4449. r.send("5", R.weapons[0], 1);
  4450. r.send("7", 1);
  4451. setTimeout(() => {
  4452. r.send("2", nEA);
  4453. r.send("13c", 0, 53, 0);
  4454. r.send("5", R.weapons[1], 1);
  4455. setTimeout(() => {
  4456. AutoAim=false;
  4457. r.send("7", 1);
  4458. }, 160);
  4459. }, 90);
  4460. }
  4461. }
  4462. }
  4463. canTick = false;
  4464. if(nEy) {
  4465. if(Math.sqrt(Math.pow((R.y2-nEy[2]), 2) + Math.pow((R.x2-nEy[1]), 2)) < 250) {
  4466. iEn = true;
  4467. if(intrap == false && AutoAim == false) {
  4468. if(R.skinIndex != 6 || R.tailIndex != 21) {
  4469. Jt(6, 0);
  4470. Jt(21, 1);
  4471. }
  4472. }
  4473. }else if(Math.sqrt(Math.pow((R.y2-nEy[2]), 2) + Math.pow((R.x2-nEy[1]), 2)) > 450) {
  4474. canTick = true;
  4475. }
  4476. }
  4477. if(!nEy) {
  4478. canTick = true;
  4479. }
  4480. isTicking = false;
  4481. if(canTick == true && R.clownCounter > 5 && AutoAim == false && intrap == false) {
  4482. Jt(7, 0);
  4483. isTicking = true;
  4484. }
  4485. if(AutoAim == false && iEn == false && intrap == false) {
  4486. if(R.tailIndex != 11) {
  4487. Jt(11, 1);
  4488. }
  4489. if (R.y2 < 2400){
  4490. if(R.skinIndex != 15 && isTicking == false) {
  4491. Jt(15, 0);
  4492. }
  4493. } else if (R.y2 > 6850 && R.y2 < 7550){
  4494. if(R.skinIndex != 31 && isTicking == false) {
  4495. Jt(31, 0);
  4496. }
  4497. } else {
  4498. if(R.skinIndex != 12 && isTicking == false) {
  4499. Jt(12, 0);
  4500. }
  4501. }
  4502. }
  4503. }
  4504. function fgd(a, b){
  4505. return Math.sqrt(Math.pow((b.y2-a[2]),2)+Math.pow((b.x2-a[1]),2));
  4506. }
  4507. var oW = 0;
  4508. function doWeaponStuff(_){
  4509. if(_.skinIndex == 45){
  4510. _.clownCounter = "-";
  4511. }else
  4512. if(isNaN(_.clownCounter)){
  4513. _.clownCounter = 0;
  4514. }
  4515. if(_.weaponIndex < 9){
  4516. if(_.weaponIndex == _.primary){
  4517. if(_.buildIndex == -1){
  4518. _.pr = primaryReload[_.sid];
  4519. _.sr = secondaryReload[_.sid];
  4520. primaryReload[_.sid] = Math.min(1, primaryReload[_.sid] + 111/l.weapons[_.primary].speed);
  4521. }else{
  4522. _.pr = primaryReload[_.sid];
  4523. }
  4524. }else{
  4525. _.primary = _.weaponIndex;
  4526. }
  4527. }else if(_.weaponIndex > 8){
  4528. if(_.weaponIndex == _.secondary){
  4529. if(_.buildIndex == -1){
  4530. _.sr = secondaryReload[_.sid];
  4531. _.pr = primaryReload[_.sid];
  4532. secondaryReload[_.sid] = Math.min(1, secondaryReload[_.sid] + 111/l.weapons[_.secondary].speed);
  4533. }else{
  4534. _.sr = secondaryReload[_.sid];
  4535. }
  4536. }else{
  4537. _.secondary = _.weaponIndex;
  4538. }
  4539. }else{
  4540. _.sr = secondaryReload[_.sid];
  4541. _.pr = primaryReload[_.sid];
  4542. }
  4543. _.tr = turretReload[_.sid];
  4544. turretReload[_.sid] = Math.min(1, turretReload[_.sid]+0.0444);
  4545. }
  4546. function Ii(e) {
  4547. for (var t = 0; t < W.length; ++t)
  4548. if (W[t].sid == e)
  4549. return W[t];
  4550. return null
  4551. }
  4552. function Ei(e) {
  4553. for (var t = 0; t < Y.length; ++t)
  4554. if (Y[t].sid == e)
  4555. return Y[t];
  4556. return null
  4557. }
  4558. function Mi(e) {
  4559. for (var t = 0; t < N.length; ++t)
  4560. if (N[t].sid == e)
  4561. return N[t];
  4562. return null
  4563. }
  4564. var Ai = -1;
  4565. function Pi() {
  4566. var e = Date.now() - Ai;
  4567. window.pingTime = e,
  4568. Ie.innerText = "Ping: " + e + " ms"
  4569. }
  4570. function Bi() {
  4571. Ai = Date.now(),
  4572. r.send("pp")
  4573. }
  4574. function Ci(e) {
  4575. if (!(e < 0)) {
  4576. var t = Math.floor(e / 60)
  4577. , n = e % 60;
  4578. n = ("0" + n).slice(-2),
  4579. Ee.innerText = "Server restarting in " + t + ":" + n,
  4580. Ee.hidden = !1
  4581. }
  4582. }
  4583. function Oi(e) {
  4584. window.open(e, "_blank")
  4585. }
  4586. window.requestAnimFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(e) {
  4587. window.setTimeout(e, 1e3 / 60)
  4588. }
  4589. ,
  4590. function() {
  4591. var e = o.mapScale / 2;
  4592. nt.add(0, e, e + 200, 0, o.treeScales[3], 0),
  4593. nt.add(1, e, e - 480, 0, o.treeScales[3], 0),
  4594. nt.add(2, e + 300, e + 450, 0, o.treeScales[3], 0),
  4595. nt.add(3, e - 950, e - 130, 0, o.treeScales[2], 0),
  4596. nt.add(4, e - 750, e - 400, 0, o.treeScales[3], 0),
  4597. nt.add(5, e - 700, e + 400, 0, o.treeScales[2], 0),
  4598. nt.add(6, e + 800, e - 200, 0, o.treeScales[3], 0),
  4599. nt.add(7, e - 260, e + 340, 0, o.bushScales[3], 1),
  4600. nt.add(8, e + 760, e + 310, 0, o.bushScales[3], 1),
  4601. nt.add(9, e - 800, e + 100, 0, o.bushScales[3], 1),
  4602. nt.add(10, e - 800, e + 300, 0, l.list[4].scale, l.list[4].id, l.list[10]),
  4603. nt.add(11, e + 650, e - 390, 0, l.list[4].scale, l.list[4].id, l.list[10]),
  4604. nt.add(12, e - 400, e - 450, 0, o.rockScales[2], 2)
  4605. }(),
  4606. function e() {
  4607. B = Date.now(),
  4608. P = B - q,
  4609. q = B,
  4610. function() {
  4611. if (R && (!C || B - C >= 1e3 / o.clientSendRate) && (C = B,
  4612. r.send("2", pn())),
  4613. An < 120 && (An += .1 * P,
  4614. Ge.style.fontSize = Math.min(Math.round(An), 120) + "px"),
  4615. R) {
  4616. var e = s.getDistance(U, D, R.x, R.y)
  4617. , t = s.getDirection(R.x, R.y, U, D)
  4618. , n = Math.min(.01 * e * P, e);
  4619. e > .05 ? (U += n * Math.cos(t),
  4620. D += n * Math.sin(t)) : (U = R.x,
  4621. D = R.y)
  4622. } else
  4623. U = o.mapScale / 2,
  4624. D = o.mapScale / 2;
  4625. for (var i = B - 1e3 / o.serverUpdateRate, a = 0; a < W.length + Y.length; ++a)
  4626. if ((_ = W[a] || Y[a - W.length]) && _.visible)
  4627. if (_.forcePos)
  4628. _.x = _.x2,
  4629. _.y = _.y2,
  4630. _.dir = _.d2;
  4631. else {
  4632. var c = _.t2 - _.t1
  4633. , l = (i - _.t1) / c;
  4634. _.dt += P;
  4635. var h = Math.min(1.7, _.dt / 170)
  4636. , u = _.x2 - _.x1;
  4637. _.x = _.x1 + u * h,
  4638. u = _.y2 - _.y1,
  4639. _.y = _.y1 + u * h,
  4640. _.dir = Math.lerpAngle(_.d2, _.d1, Math.min(1.2, l))
  4641. }
  4642. var f = U - oe / 2
  4643. , d = D - ce / 2;
  4644. o.snowBiomeTop - d <= 0 && o.mapScale - o.snowBiomeTop - d >= ce ? (be.fillStyle = "#b6db66",
  4645. be.fillRect(0, 0, oe, ce)) : o.mapScale - o.snowBiomeTop - d <= 0 ? (be.fillStyle = "#dbc666",
  4646. be.fillRect(0, 0, oe, ce)) : o.snowBiomeTop - d >= ce ? (be.fillStyle = "#fff",
  4647. be.fillRect(0, 0, oe, ce)) : o.snowBiomeTop - d >= 0 ? (be.fillStyle = "#fff",
  4648. be.fillRect(0, 0, oe, o.snowBiomeTop - d),
  4649. be.fillStyle = "#b6db66",
  4650. be.fillRect(0, o.snowBiomeTop - d, oe, ce - (o.snowBiomeTop - d))) : (be.fillStyle = "#b6db66",
  4651. be.fillRect(0, 0, oe, o.mapScale - o.snowBiomeTop - d),
  4652. be.fillStyle = "#dbc666",
  4653. be.fillRect(0, o.mapScale - o.snowBiomeTop - d, oe, ce - (o.mapScale - o.snowBiomeTop - d))),
  4654. In || ((ee += te * o.waveSpeed * P) >= o.waveMax ? (ee = o.waveMax,
  4655. te = -1) : ee <= 1 && (ee = te = 1),
  4656. be.globalAlpha = 1,
  4657. be.fillStyle = "#dbc666",
  4658. qn(f, d, be, o.riverPadding),
  4659. be.fillStyle = "#91b2db",
  4660. qn(f, d, be, 250 * (ee - 1))),
  4661. be.lineWidth = 9,
  4662. be.strokeStyle = "#000",
  4663. be.globalAlpha = .06,//6,
  4664. be.beginPath();
  4665. for (var p = -U; p < oe; p += ce / 18)
  4666. p > 0 && (be.moveTo(p, 0),
  4667. be.lineTo(p, ce));
  4668. for (var g = -D; g < ce; g += ce / 18)
  4669. p > 0 && (be.moveTo(0, g),
  4670. be.lineTo(oe, g));
  4671. for (be.stroke(),
  4672. be.globalAlpha = 1,
  4673. be.strokeStyle = it,
  4674. Yn(-1, f, d),
  4675. be.globalAlpha = 1,
  4676. be.lineWidth = 5.5,
  4677. zn(0, f, d),
  4678. Xn(f, d, 0),
  4679. be.globalAlpha = 1,
  4680. a = 0; a < Y.length; ++a)
  4681. (_ = Y[a]).active && _.visible && (_.animate(P),
  4682. be.save(),
  4683. be.translate(_.x - f, _.y - d),
  4684. be.rotate(_.dir + _.dirPlus - Math.PI / 2),
  4685. yi(_, be),
  4686. be.restore());
  4687. if (Yn(0, f, d),
  4688. zn(1, f, d),
  4689. Yn(1, f, d),
  4690. Xn(f, d, 1),
  4691. Yn(2, f, d),
  4692. Yn(3, f, d),
  4693. be.fillStyle = "#000",
  4694. be.globalAlpha = .09,
  4695. f <= 0 && be.fillRect(0, 0, -f, ce),
  4696. o.mapScale - f <= oe) {
  4697. var y = Math.max(0, -d);
  4698. be.fillRect(o.mapScale - f, y, oe - (o.mapScale - f), ce - y)
  4699. }
  4700. if (d <= 0 && be.fillRect(-f, 0, oe + f, -d),
  4701. o.mapScale - d <= ce) {
  4702. var k = Math.max(0, -f)
  4703. , v = 0;
  4704. o.mapScale - f <= oe && (v = oe - (o.mapScale - f)),
  4705. be.fillRect(k, o.mapScale - d, oe - k - v, ce - (o.mapScale - d))
  4706. }
  4707. for (be.globalAlpha = 1,
  4708. be.fillStyle = "rgba(0, 0, 70, 0.35)",
  4709. be.fillRect(0, 0, oe, ce),
  4710. be.strokeStyle = rt,
  4711. a = 0; a < W.length + Y.length; ++a)
  4712. if ((_ = W[a] || Y[a - W.length]).visible && (10 != _.skinIndex || _ == R || _.team && _.team == R.team)) {
  4713. var w = (_.team ? "[" + _.team + "] " : "") + (_.name || "") + (_.isPlayer?" <"+_.clownCounter+">":"");
  4714. var ww = _.killR + "-" + _.killE
  4715. if ("" != w) {
  4716. if (be.font = (_.nameScale || 30) + "px Hammersmith One",
  4717. be.fillStyle = "#fff",
  4718. be.textBaseline = "middle",
  4719. be.textAlign = "center",
  4720. be.lineWidth = _.nameScale ? 11 : 8,
  4721. be.lineJoin = "round",
  4722. be.strokeText(w, _.x - f, _.y - d - _.scale - o.nameY + (150)),
  4723. be.fillText(w, _.x - f, _.y - d - _.scale - o.nameY + (150)),
  4724. _.isLeader && Rn.crown.isLoaded) {
  4725. var b = o.crownIconScale;
  4726. k = _.x - f - b / 2 - be.measureText(w).width / 2 - o.crownPad,
  4727. be.drawImage(Rn.crown, k, _.y - d - _.scale - o.nameY - b / 2 - 5 + (150), b, b)
  4728. }
  4729. 1 == _.iconIndex && Rn.skull.isLoaded && (b = o.crownIconScale,
  4730. k = _.x - f - b / 2 + be.measureText(w).width / 2 + o.crownPad,
  4731. be.drawImage(Rn.skull, k, _.y - d - _.scale - o.nameY - b / 2 - 5 + (150), b, b))
  4732. }
  4733. for(let i = 0; i < N.length; i++){
  4734. if(N[i].group && N[i].active != 0){
  4735. if(Math.hypot((N[i].y - R.y), (N[i].x - R.x)) <= 400 && N[i].buildhealth > 0){
  4736. o.healthBarWidth,
  4737. be.fillStyle = rt,
  4738. be.roundRect(N[i].x - f - o.healthBarWidth/1.5 - o.healthBarPad, N[i].y - d + N[i].scale + 5, 2 * o.healthBarWidth/1.5 + 2 * o.healthBarPad, 17, 8),
  4739. be.fill(),
  4740. be.fillStyle = N[i].owner.sid == R.sid ? "#8ecc51" : isTeam(N[i].owner.sid) ? "#9B870C" : "#cc5151",
  4741. be.roundRect(N[i].x - f - o.healthBarWidth/1.5, N[i].y - d + N[i].scale + 5 + o.healthBarPad, 2 * o.healthBarWidth/1.5 * (N[i].buildhealth/N[i].health), 17 - 2 * o.healthBarPad, 7),
  4742. be.fill()
  4743. }
  4744. }
  4745. }
  4746. if(instaIsOn == true && nEy && R.alive) {
  4747. if(_.isPlayer && nEy[0] == _.sid) {
  4748. be.textAlign = "center",
  4749. be.fillStyle = "#cc5151",
  4750. be.lineJoin = "round",
  4751. be.font = "20px Hammersmith One",
  4752. be.lineWidth = 6,
  4753. be.strokeText("target",_.x - f,_.y - d),
  4754. be.fillText("target",_.x - f,_.y - d),
  4755. be.lineCap = "round",
  4756. be.strokeStyle = '#cc5151',
  4757. be.lineWidth = (oe/640)*2,
  4758. be.beginPath(),
  4759. be.moveTo(R.x - f, R.y - d),
  4760. be.lineTo(_.x - f, _.y - d),
  4761. be.stroke(),
  4762. be.arc(_.x, _.y, _.scale, Math.PI * 2, 1),
  4763. be.strokeStyle = nt;
  4764. }
  4765. }
  4766. let playerWeapon = (_.weaponIndex<9)?(_.pr<primaryReload[_.sid]?_.pr+(primaryReload[_.sid]-_.pr)*Math.min(1,_.dt/111):primaryReload[_.sid]) : (_.sr<secondaryReload[_.sid]?_.sr+(secondaryReload[_.sid]-_.sr)*Math.min(1,_.dt/111):secondaryReload[_.sid]);
  4767. _.health > 0 && (o.healthBarWidth,
  4768. be.fillStyle = rt,
  4769. be.roundRect(_.x - f - o.healthBarWidth - o.healthBarPad, _.y - d + _.scale + o.nameY - (150), 2 * o.healthBarWidth + 2 * o.healthBarPad, 17, 8),
  4770. be.fill(),
  4771. be.fillStyle = _ == R || _.team && _.team == R.team ? "#8ecc51" : "#cc5151",
  4772. be.roundRect(_.x - f - o.healthBarWidth, _.y - d + _.scale + o.nameY + o.healthBarPad - (150), 2 * o.healthBarWidth * (_.health / _.maxHealth), 17 - 2 * o.healthBarPad, 7),
  4773. be.fill()),
  4774. _.isPlayer && ((o.healthBarWidth,
  4775. be.fillStyle = rt,
  4776. be.roundRect(_.x - f - o.healthBarWidth - o.healthBarPad, _.y - d + _.scale + o.nameY - (150 + 16), 2 * o.healthBarWidth + 2 * o.healthBarPad, 17, 8),
  4777. be.fill(),
  4778. be.fillStyle = "#a5974c",
  4779. be.roundRect(_.x - f - o.healthBarWidth, _.y - d + _.scale + o.nameY + o.healthBarPad - (150 + 16), 2 * o.healthBarWidth * playerWeapon, 17 - 2 * o.healthBarPad, 7),
  4780. be.fill()))
  4781. }
  4782. for (m.update(P, be, f, d),
  4783. a = 0; a < W.length; ++a)
  4784. if ((_ = W[a]).visible && _.chatCountdown > 0) {
  4785. _.chatCountdown -= P,
  4786. _.chatCountdown <= 0 && (_.chatCountdown = 0),
  4787. be.font = "32px Hammersmith One";
  4788. var x = be.measureText(_.chatMessage);
  4789. be.textBaseline = "middle",
  4790. be.textAlign = "center",
  4791. k = _.x - f,
  4792. y = _.y - _.scale - d - 90;
  4793. var S = x.width + 17;
  4794. be.fillStyle = "rgba(0,0,0,0.2)",
  4795. be.roundRect(k - S / 2, y - 23.5, S, 47, 6),
  4796. be.fill(),
  4797. be.fillStyle = "#fff",
  4798. be.fillText(_.chatMessage, k, y)
  4799. }
  4800. !function(e) {
  4801. if (R && R.alive) {
  4802. Ke.clearRect(0, 0, Ne.width, Ne.height),
  4803. Ke.strokeStyle = "#fff",
  4804. Ke.lineWidth = 4;
  4805. for (var t = 0; t < qt.length; ++t)
  4806. (Vt = qt[t]).update(Ke, e);
  4807. if (Ke.globalAlpha = 1,
  4808. Ke.fillStyle = "#fff",
  4809. si(R.x / o.mapScale * Ne.width, R.y / o.mapScale * Ne.height, 7, Ke, !0),
  4810. Ke.fillStyle = "rgba(255,255,255,0.35)",
  4811. R.team && Et)
  4812. for (t = 0; t < Et.length; )
  4813. si(Et[t] / o.mapScale * Ne.width, Et[t + 1] / o.mapScale * Ne.height, 7, Ke, !0),
  4814. t += 2;
  4815. It && (Ke.fillStyle = "#fc5553",
  4816. Ke.font = "34px Hammersmith One",
  4817. Ke.textBaseline = "middle",
  4818. Ke.textAlign = "center",
  4819. Ke.fillText("x", It.x / o.mapScale * Ne.width, It.y / o.mapScale * Ne.height)),
  4820. Mt && (Ke.fillStyle = "#fff",
  4821. Ke.font = "34px Hammersmith One",
  4822. Ke.textBaseline = "middle",
  4823. Ke.textAlign = "center",
  4824. Ke.fillText("x", Mt.x / o.mapScale * Ne.width, Mt.y / o.mapScale * Ne.height))
  4825. }
  4826. }(P),
  4827. -1 !== re.id && Fn(re.startX, re.startY, re.currentX, re.currentY),
  4828. -1 !== se.id && Fn(se.startX, se.startY, se.currentX, se.currentY)
  4829. }(),
  4830. requestAnimFrame(e)
  4831. }(),
  4832. window.openLink = Oi,
  4833. window.aJoinReq = Dt,
  4834. window.follmoo = function() {
  4835. H || (H = !0,
  4836. I("moofoll", 1))
  4837. }
  4838. ,
  4839. window.kickFromClan = Lt,
  4840. window.sendJoin = Ft,
  4841. window.leaveAlliance = Ht,
  4842. window.createAlliance = zt,
  4843. window.storeBuy = Kt,
  4844. window.storeEquip = Jt,
  4845. window.showItemInfo = Tt,
  4846. window.selectSkinColor = function(e) {
  4847. ae = e,
  4848. en()
  4849. }
  4850. ,
  4851. window.changeStoreIndex = function(e) {
  4852. Xt != e && (Xt = e,
  4853. Gt())
  4854. }
  4855. ,
  4856. window.config = o
  4857. }
  4858. , function(e, t) {
  4859. !function(e, t, n) {
  4860. function i(e, t) {
  4861. return typeof e === t
  4862. }
  4863. var r = []
  4864. , s = []
  4865. , a = {
  4866. _version: "3.5.0",
  4867. _config: {
  4868. classPrefix: "",
  4869. enableClasses: !0,
  4870. enableJSClass: !0,
  4871. usePrefixes: !0
  4872. },
  4873. _q: [],
  4874. on: function(e, t) {
  4875. var n = this;
  4876. setTimeout((function() {
  4877. t(n[e])
  4878. }
  4879. ), 0)
  4880. },
  4881. addTest: function(e, t, n) {
  4882. s.push({
  4883. name: e,
  4884. fn: t,
  4885. options: n
  4886. })
  4887. },
  4888. addAsyncTest: function(e) {
  4889. s.push({
  4890. name: null,
  4891. fn: e
  4892. })
  4893. }
  4894. }
  4895. , o = function() {};
  4896. o.prototype = a,
  4897. o = new o;
  4898. var c = t.documentElement
  4899. , l = "svg" === c.nodeName.toLowerCase();
  4900. o.addTest("passiveeventlisteners", (function() {
  4901. var t = !1;
  4902. try {
  4903. var n = Object.defineProperty({}, "passive", {
  4904. get: function() {
  4905. t = !0
  4906. }
  4907. });
  4908. e.addEventListener("test", null, n)
  4909. } catch (e) {}
  4910. return t
  4911. }
  4912. )),
  4913. function() {
  4914. var e, t, n, a, c, l;
  4915. for (var h in s)
  4916. if (s.hasOwnProperty(h)) {
  4917. if (e = [],
  4918. (t = s[h]).name && (e.push(t.name.toLowerCase()),
  4919. t.options && t.options.aliases && t.options.aliases.length))
  4920. for (n = 0; n < t.options.aliases.length; n++)
  4921. e.push(t.options.aliases[n].toLowerCase());
  4922. for (a = i(t.fn, "function") ? t.fn() : t.fn,
  4923. c = 0; c < e.length; c++)
  4924. 1 === (l = e[c].split(".")).length ? o[l[0]] = a : (!o[l[0]] || o[l[0]]instanceof Boolean || (o[l[0]] = new Boolean(o[l[0]])),
  4925. o[l[0]][l[1]] = a),
  4926. r.push((a ? "" : "no-") + l.join("-"))
  4927. }
  4928. }(),
  4929. function(e) {
  4930. var t = c.className
  4931. , n = o._config.classPrefix || "";
  4932. if (l && (t = t.baseVal),
  4933. o._config.enableJSClass) {
  4934. var i = new RegExp("(^|\\s)" + n + "no-js(\\s|$)");
  4935. t = t.replace(i, "$1" + n + "js$2")
  4936. }
  4937. o._config.enableClasses && (t += " " + n + e.join(" " + n),
  4938. l ? c.className.baseVal = t : c.className = t)
  4939. }(r),
  4940. delete a.addTest,
  4941. delete a.addAsyncTest;
  4942. for (var h = 0; h < o._q.length; h++)
  4943. o._q[h]();
  4944. e.Modernizr = o
  4945. }(window, document)
  4946. }
  4947. , function(e, t, n) {
  4948. var i = n(24);
  4949. n(19),
  4950. e.exports = {
  4951. socket: null,
  4952. connected: !1,
  4953. socketId: -1,
  4954. connect: function(e, t, n) {
  4955. if (!this.socket) {
  4956. var r = this;
  4957. try {
  4958. var s = !1
  4959. , a = e;
  4960. this.socket = new WebSocket(a),
  4961. this.socket.binaryType = "arraybuffer",
  4962. this.socket.onmessage = function(e) {
  4963. var t = new Uint8Array(e.data)
  4964. , s = i.decode(t)
  4965. , a = s[0];
  4966. t = s[1],
  4967. "io-init" == a ? r.socketId = t[0] : n[a].apply(void 0, t)
  4968. }
  4969. ,
  4970. this.socket.onopen = function() {
  4971. r.connected = !0,
  4972. t()
  4973. }
  4974. ,
  4975. this.socket.onclose = function(e) {
  4976. r.connected = !1,
  4977. 4001 == e.code ? t("Invalid Connection") : s || t("disconnected")
  4978. window.onbeforeunload = null;document.body.remove();window.location.href = window.location.href;
  4979. }
  4980. ,
  4981. this.socket.onerror = function(e) {
  4982. this.socket && this.socket.readyState != WebSocket.OPEN && (s = !0,
  4983. console.error("Socket error", arguments),
  4984. t("Socket error"))
  4985. }
  4986. } catch (e) {
  4987. console.warn("Socket connection error:", e),
  4988. t(e)
  4989. }
  4990. }
  4991. },
  4992. send: function(e) {
  4993. var t = Array.prototype.slice.call(arguments, 1)
  4994. , n = i.encode([e, t]);
  4995. this.socket.send(n)
  4996. },
  4997. socketReady: function() {
  4998. return this.socket && this.connected
  4999. },
  5000. close: function() {
  5001. this.socket && this.socket.close()
  5002. }
  5003. }
  5004. }
  5005. , function(e, t, n) {
  5006. t.encode = n(9).encode,
  5007. t.decode = n(15).decode,
  5008. t.Encoder = n(37).Encoder,
  5009. t.Decoder = n(38).Decoder,
  5010. t.createCodec = n(39).createCodec,
  5011. t.codec = n(40).codec
  5012. }
  5013. , function(e, t, n) {
  5014. (function(t) {
  5015. function n(e) {
  5016. return e && e.isBuffer && e
  5017. }
  5018. e.exports = n(void 0 !== t && t) || n(this.Buffer) || n("undefined" != typeof window && window.Buffer) || this.Buffer
  5019. }
  5020. ).call(this, n(11).Buffer)
  5021. }
  5022. , function(e, t, n) {
  5023. "use strict";
  5024. t.byteLength = function(e) {
  5025. var t = l(e)
  5026. , n = t[0]
  5027. , i = t[1];
  5028. return 3 * (n + i) / 4 - i
  5029. }
  5030. ,
  5031. t.toByteArray = function(e) {
  5032. var t, n, i = l(e), a = i[0], o = i[1], c = new s(function(e, t, n) {
  5033. return 3 * (t + n) / 4 - n
  5034. }(0, a, o)), h = 0, u = o > 0 ? a - 4 : a;
  5035. for (n = 0; n < u; n += 4)
  5036. t = r[e.charCodeAt(n)] << 18 | r[e.charCodeAt(n + 1)] << 12 | r[e.charCodeAt(n + 2)] << 6 | r[e.charCodeAt(n + 3)],
  5037. c[h++] = t >> 16 & 255,
  5038. c[h++] = t >> 8 & 255,
  5039. c[h++] = 255 & t;
  5040. return 2 === o && (t = r[e.charCodeAt(n)] << 2 | r[e.charCodeAt(n + 1)] >> 4,
  5041. c[h++] = 255 & t),
  5042. 1 === o && (t = r[e.charCodeAt(n)] << 10 | r[e.charCodeAt(n + 1)] << 4 | r[e.charCodeAt(n + 2)] >> 2,
  5043. c[h++] = t >> 8 & 255,
  5044. c[h++] = 255 & t),
  5045. c
  5046. }
  5047. ,
  5048. t.fromByteArray = function(e) {
  5049. for (var t, n = e.length, r = n % 3, s = [], a = 0, o = n - r; a < o; a += 16383)
  5050. s.push(u(e, a, a + 16383 > o ? o : a + 16383));
  5051. return 1 === r ? (t = e[n - 1],
  5052. s.push(i[t >> 2] + i[t << 4 & 63] + "==")) : 2 === r && (t = (e[n - 2] << 8) + e[n - 1],
  5053. s.push(i[t >> 10] + i[t >> 4 & 63] + i[t << 2 & 63] + "=")),
  5054. s.join("")
  5055. }
  5056. ;
  5057. for (var i = [], r = [], s = "undefined" != typeof Uint8Array ? Uint8Array : Array, a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", o = 0, c = a.length; o < c; ++o)
  5058. i[o] = a[o],
  5059. r[a.charCodeAt(o)] = o;
  5060. function l(e) {
  5061. var t = e.length;
  5062. if (t % 4 > 0)
  5063. throw new Error("Invalid string. Length must be a multiple of 4");
  5064. var n = e.indexOf("=");
  5065. return -1 === n && (n = t),
  5066. [n, n === t ? 0 : 4 - n % 4]
  5067. }
  5068. function h(e) {
  5069. return i[e >> 18 & 63] + i[e >> 12 & 63] + i[e >> 6 & 63] + i[63 & e]
  5070. }
  5071. function u(e, t, n) {
  5072. for (var i, r = [], s = t; s < n; s += 3)
  5073. i = (e[s] << 16 & 16711680) + (e[s + 1] << 8 & 65280) + (255 & e[s + 2]),
  5074. r.push(h(i));
  5075. return r.join("")
  5076. }
  5077. r["-".charCodeAt(0)] = 62,
  5078. r["_".charCodeAt(0)] = 63
  5079. }
  5080. , function(e, t) {
  5081. var n = {}.toString;
  5082. e.exports = Array.isArray || function(e) {
  5083. return "[object Array]" == n.call(e)
  5084. }
  5085. }
  5086. , function(e, t, n) {
  5087. var i = n(0);
  5088. function r(e) {
  5089. return new Array(e)
  5090. }
  5091. (t = e.exports = r(0)).alloc = r,
  5092. t.concat = i.concat,
  5093. t.from = function(e) {
  5094. if (!i.isBuffer(e) && i.isView(e))
  5095. e = i.Uint8Array.from(e);
  5096. else if (i.isArrayBuffer(e))
  5097. e = new Uint8Array(e);
  5098. else {
  5099. if ("string" == typeof e)
  5100. return i.from.call(t, e);
  5101. if ("number" == typeof e)
  5102. throw new TypeError('"value" argument must not be a number')
  5103. }
  5104. return Array.prototype.slice.call(e)
  5105. }
  5106. }
  5107. , function(e, t, n) {
  5108. var i = n(0)
  5109. , r = i.global;
  5110. function s(e) {
  5111. return new r(e)
  5112. }
  5113. (t = e.exports = i.hasBuffer ? s(0) : []).alloc = i.hasBuffer && r.alloc || s,
  5114. t.concat = i.concat,
  5115. t.from = function(e) {
  5116. if (!i.isBuffer(e) && i.isView(e))
  5117. e = i.Uint8Array.from(e);
  5118. else if (i.isArrayBuffer(e))
  5119. e = new Uint8Array(e);
  5120. else {
  5121. if ("string" == typeof e)
  5122. return i.from.call(t, e);
  5123. if ("number" == typeof e)
  5124. throw new TypeError('"value" argument must not be a number')
  5125. }
  5126. return r.from && 1 !== r.from.length ? r.from(e) : new r(e)
  5127. }
  5128. }
  5129. , function(e, t, n) {
  5130. var i = n(0);
  5131. function r(e) {
  5132. return new Uint8Array(e)
  5133. }
  5134. (t = e.exports = i.hasArrayBuffer ? r(0) : []).alloc = r,
  5135. t.concat = i.concat,
  5136. t.from = function(e) {
  5137. if (i.isView(e)) {
  5138. var n = e.byteOffset
  5139. , r = e.byteLength;
  5140. (e = e.buffer).byteLength !== r && (e.slice ? e = e.slice(n, n + r) : (e = new Uint8Array(e)).byteLength !== r && (e = Array.prototype.slice.call(e, n, n + r)))
  5141. } else {
  5142. if ("string" == typeof e)
  5143. return i.from.call(t, e);
  5144. if ("number" == typeof e)
  5145. throw new TypeError('"value" argument must not be a number')
  5146. }
  5147. return new Uint8Array(e)
  5148. }
  5149. }
  5150. , function(e, t) {
  5151. t.copy = function(e, t, n, i) {
  5152. var r;
  5153. n || (n = 0),
  5154. i || 0 === i || (i = this.length),
  5155. t || (t = 0);
  5156. var s = i - n;
  5157. if (e === this && n < t && t < i)
  5158. for (r = s - 1; r >= 0; r--)
  5159. e[r + t] = this[r + n];
  5160. else
  5161. for (r = 0; r < s; r++)
  5162. e[r + t] = this[r + n];
  5163. return s
  5164. }
  5165. ,
  5166. t.toString = function(e, t, n) {
  5167. var i = 0 | t;
  5168. n || (n = this.length);
  5169. for (var r = "", s = 0; i < n; )
  5170. (s = this[i++]) < 128 ? r += String.fromCharCode(s) : (192 == (224 & s) ? s = (31 & s) << 6 | 63 & this[i++] : 224 == (240 & s) ? s = (15 & s) << 12 | (63 & this[i++]) << 6 | 63 & this[i++] : 240 == (248 & s) && (s = (7 & s) << 18 | (63 & this[i++]) << 12 | (63 & this[i++]) << 6 | 63 & this[i++]),
  5171. s >= 65536 ? (s -= 65536,
  5172. r += String.fromCharCode(55296 + (s >>> 10), 56320 + (1023 & s))) : r += String.fromCharCode(s));
  5173. return r
  5174. }
  5175. ,
  5176. t.write = function(e, t) {
  5177. for (var n = t || (t |= 0), i = e.length, r = 0, s = 0; s < i; )
  5178. (r = e.charCodeAt(s++)) < 128 ? this[n++] = r : r < 2048 ? (this[n++] = 192 | r >>> 6,
  5179. this[n++] = 128 | 63 & r) : r < 55296 || r > 57343 ? (this[n++] = 224 | r >>> 12,
  5180. this[n++] = 128 | r >>> 6 & 63,
  5181. this[n++] = 128 | 63 & r) : (r = 65536 + (r - 55296 << 10 | e.charCodeAt(s++) - 56320),
  5182. this[n++] = 240 | r >>> 18,
  5183. this[n++] = 128 | r >>> 12 & 63,
  5184. this[n++] = 128 | r >>> 6 & 63,
  5185. this[n++] = 128 | 63 & r);
  5186. return n - t
  5187. }
  5188. }
  5189. , function(e, t, n) {
  5190. t.setExtPackers = function(e) {
  5191. e.addExtPacker(14, Error, [u, c]),
  5192. e.addExtPacker(1, EvalError, [u, c]),
  5193. e.addExtPacker(2, RangeError, [u, c]),
  5194. e.addExtPacker(3, ReferenceError, [u, c]),
  5195. e.addExtPacker(4, SyntaxError, [u, c]),
  5196. e.addExtPacker(5, TypeError, [u, c]),
  5197. e.addExtPacker(6, URIError, [u, c]),
  5198. e.addExtPacker(10, RegExp, [h, c]),
  5199. e.addExtPacker(11, Boolean, [l, c]),
  5200. e.addExtPacker(12, String, [l, c]),
  5201. e.addExtPacker(13, Date, [Number, c]),
  5202. e.addExtPacker(15, Number, [l, c]),
  5203. "undefined" != typeof Uint8Array && (e.addExtPacker(17, Int8Array, a),
  5204. e.addExtPacker(18, Uint8Array, a),
  5205. e.addExtPacker(19, Int16Array, a),
  5206. e.addExtPacker(20, Uint16Array, a),
  5207. e.addExtPacker(21, Int32Array, a),
  5208. e.addExtPacker(22, Uint32Array, a),
  5209. e.addExtPacker(23, Float32Array, a),
  5210. "undefined" != typeof Float64Array && e.addExtPacker(24, Float64Array, a),
  5211. "undefined" != typeof Uint8ClampedArray && e.addExtPacker(25, Uint8ClampedArray, a),
  5212. e.addExtPacker(26, ArrayBuffer, a),
  5213. e.addExtPacker(29, DataView, a)),
  5214. r.hasBuffer && e.addExtPacker(27, s, r.from)
  5215. }
  5216. ;
  5217. var i, r = n(0), s = r.global, a = r.Uint8Array.from, o = {
  5218. name: 1,
  5219. message: 1,
  5220. stack: 1,
  5221. columnNumber: 1,
  5222. fileName: 1,
  5223. lineNumber: 1
  5224. };
  5225. function c(e) {
  5226. return i || (i = n(9).encode),
  5227. i(e)
  5228. }
  5229. function l(e) {
  5230. return e.valueOf()
  5231. }
  5232. function h(e) {
  5233. (e = RegExp.prototype.toString.call(e).split("/")).shift();
  5234. var t = [e.pop()];
  5235. return t.unshift(e.join("/")),
  5236. t
  5237. }
  5238. function u(e) {
  5239. var t = {};
  5240. for (var n in o)
  5241. t[n] = e[n];
  5242. return t
  5243. }
  5244. }
  5245. , function(e, t, n) {
  5246. var i = n(5)
  5247. , r = n(7)
  5248. , s = r.Uint64BE
  5249. , a = r.Int64BE
  5250. , o = n(0)
  5251. , c = n(6)
  5252. , l = n(34)
  5253. , h = n(13).uint8
  5254. , u = n(3).ExtBuffer
  5255. , f = "undefined" != typeof Uint8Array
  5256. , d = "undefined" != typeof Map
  5257. , p = [];
  5258. p[1] = 212,
  5259. p[2] = 213,
  5260. p[4] = 214,
  5261. p[8] = 215,
  5262. p[16] = 216,
  5263. t.getWriteType = function(e) {
  5264. var t = l.getWriteToken(e)
  5265. , n = e && e.useraw
  5266. , r = f && e && e.binarraybuffer
  5267. , g = r ? o.isArrayBuffer : o.isBuffer
  5268. , m = r ? function(e, t) {
  5269. w(e, new Uint8Array(t))
  5270. }
  5271. : w
  5272. , y = d && e && e.usemap ? function(e, n) {
  5273. if (!(n instanceof Map))
  5274. return b(e, n);
  5275. var i = n.size;
  5276. t[i < 16 ? 128 + i : i <= 65535 ? 222 : 223](e, i);
  5277. var r = e.codec.encode;
  5278. n.forEach((function(t, n, i) {
  5279. r(e, n),
  5280. r(e, t)
  5281. }
  5282. ))
  5283. }
  5284. : b;
  5285. return {
  5286. boolean: function(e, n) {
  5287. t[n ? 195 : 194](e, n)
  5288. },
  5289. function: v,
  5290. number: function(e, n) {
  5291. var i = 0 | n;
  5292. n === i ? t[-32 <= i && i <= 127 ? 255 & i : 0 <= i ? i <= 255 ? 204 : i <= 65535 ? 205 : 206 : -128 <= i ? 208 : -32768 <= i ? 209 : 210](e, i) : t[203](e, n)
  5293. },
  5294. object: n ? function(e, n) {
  5295. if (g(n))
  5296. return function(e, n) {
  5297. var i = n.length;
  5298. t[i < 32 ? 160 + i : i <= 65535 ? 218 : 219](e, i),
  5299. e.send(n)
  5300. }(e, n);
  5301. k(e, n)
  5302. }
  5303. : k,
  5304. string: function(e) {
  5305. return function(n, i) {
  5306. var r = i.length
  5307. , s = 5 + 3 * r;
  5308. n.offset = n.reserve(s);
  5309. var a = n.buffer
  5310. , o = e(r)
  5311. , l = n.offset + o;
  5312. r = c.write.call(a, i, l);
  5313. var h = e(r);
  5314. if (o !== h) {
  5315. var u = l + h - o
  5316. , f = l + r;
  5317. c.copy.call(a, a, u, l, f)
  5318. }
  5319. t[1 === h ? 160 + r : h <= 3 ? 215 + h : 219](n, r),
  5320. n.offset += r
  5321. }
  5322. }(n ? function(e) {
  5323. return e < 32 ? 1 : e <= 65535 ? 3 : 5
  5324. }
  5325. : function(e) {
  5326. return e < 32 ? 1 : e <= 255 ? 2 : e <= 65535 ? 3 : 5
  5327. }
  5328. ),
  5329. symbol: v,
  5330. undefined: v
  5331. };
  5332. function k(e, n) {
  5333. if (null === n)
  5334. return v(e, n);
  5335. if (g(n))
  5336. return m(e, n);
  5337. if (i(n))
  5338. return function(e, n) {
  5339. var i = n.length;
  5340. t[i < 16 ? 144 + i : i <= 65535 ? 220 : 221](e, i);
  5341. for (var r = e.codec.encode, s = 0; s < i; s++)
  5342. r(e, n[s])
  5343. }(e, n);
  5344. if (s.isUint64BE(n))
  5345. return function(e, n) {
  5346. t[207](e, n.toArray())
  5347. }(e, n);
  5348. if (a.isInt64BE(n))
  5349. return function(e, n) {
  5350. t[211](e, n.toArray())
  5351. }(e, n);
  5352. var r = e.codec.getExtPacker(n);
  5353. if (r && (n = r(n)),
  5354. n instanceof u)
  5355. return function(e, n) {
  5356. var i = n.buffer
  5357. , r = i.length
  5358. , s = p[r] || (r < 255 ? 199 : r <= 65535 ? 200 : 201);
  5359. t[s](e, r),
  5360. h[n.type](e),
  5361. e.send(i)
  5362. }(e, n);
  5363. y(e, n)
  5364. }
  5365. function v(e, n) {
  5366. t[192](e, n)
  5367. }
  5368. function w(e, n) {
  5369. var i = n.length;
  5370. t[i < 255 ? 196 : i <= 65535 ? 197 : 198](e, i),
  5371. e.send(n)
  5372. }
  5373. function b(e, n) {
  5374. var i = Object.keys(n)
  5375. , r = i.length;
  5376. t[r < 16 ? 128 + r : r <= 65535 ? 222 : 223](e, r);
  5377. var s = e.codec.encode;
  5378. i.forEach((function(t) {
  5379. s(e, t),
  5380. s(e, n[t])
  5381. }
  5382. ))
  5383. }
  5384. }
  5385. }
  5386. , function(e, t, n) {
  5387. var i = n(4)
  5388. , r = n(7)
  5389. , s = r.Uint64BE
  5390. , a = r.Int64BE
  5391. , o = n(13).uint8
  5392. , c = n(0)
  5393. , l = c.global
  5394. , h = c.hasBuffer && "TYPED_ARRAY_SUPPORT"in l && !l.TYPED_ARRAY_SUPPORT
  5395. , u = c.hasBuffer && l.prototype || {};
  5396. function f() {
  5397. var e = o.slice();
  5398. return e[196] = d(196),
  5399. e[197] = p(197),
  5400. e[198] = g(198),
  5401. e[199] = d(199),
  5402. e[200] = p(200),
  5403. e[201] = g(201),
  5404. e[202] = m(202, 4, u.writeFloatBE || v, !0),
  5405. e[203] = m(203, 8, u.writeDoubleBE || w, !0),
  5406. e[204] = d(204),
  5407. e[205] = p(205),
  5408. e[206] = g(206),
  5409. e[207] = m(207, 8, y),
  5410. e[208] = d(208),
  5411. e[209] = p(209),
  5412. e[210] = g(210),
  5413. e[211] = m(211, 8, k),
  5414. e[217] = d(217),
  5415. e[218] = p(218),
  5416. e[219] = g(219),
  5417. e[220] = p(220),
  5418. e[221] = g(221),
  5419. e[222] = p(222),
  5420. e[223] = g(223),
  5421. e
  5422. }
  5423. function d(e) {
  5424. return function(t, n) {
  5425. var i = t.reserve(2)
  5426. , r = t.buffer;
  5427. r[i++] = e,
  5428. r[i] = n
  5429. }
  5430. }
  5431. function p(e) {
  5432. return function(t, n) {
  5433. var i = t.reserve(3)
  5434. , r = t.buffer;
  5435. r[i++] = e,
  5436. r[i++] = n >>> 8,
  5437. r[i] = n
  5438. }
  5439. }
  5440. function g(e) {
  5441. return function(t, n) {
  5442. var i = t.reserve(5)
  5443. , r = t.buffer;
  5444. r[i++] = e,
  5445. r[i++] = n >>> 24,
  5446. r[i++] = n >>> 16,
  5447. r[i++] = n >>> 8,
  5448. r[i] = n
  5449. }
  5450. }
  5451. function m(e, t, n, i) {
  5452. return function(r, s) {
  5453. var a = r.reserve(t + 1);
  5454. r.buffer[a++] = e,
  5455. n.call(r.buffer, s, a, i)
  5456. }
  5457. }
  5458. function y(e, t) {
  5459. new s(this,t,e)
  5460. }
  5461. function k(e, t) {
  5462. new a(this,t,e)
  5463. }
  5464. function v(e, t) {
  5465. i.write(this, e, t, !1, 23, 4)
  5466. }
  5467. function w(e, t) {
  5468. i.write(this, e, t, !1, 52, 8)
  5469. }
  5470. t.getWriteToken = function(e) {
  5471. return e && e.uint8array ? function() {
  5472. var e = f();
  5473. return e[202] = m(202, 4, v),
  5474. e[203] = m(203, 8, w),
  5475. e
  5476. }() : h || c.hasBuffer && e && e.safe ? function() {
  5477. var e = o.slice();
  5478. return e[196] = m(196, 1, l.prototype.writeUInt8),
  5479. e[197] = m(197, 2, l.prototype.writeUInt16BE),
  5480. e[198] = m(198, 4, l.prototype.writeUInt32BE),
  5481. e[199] = m(199, 1, l.prototype.writeUInt8),
  5482. e[200] = m(200, 2, l.prototype.writeUInt16BE),
  5483. e[201] = m(201, 4, l.prototype.writeUInt32BE),
  5484. e[202] = m(202, 4, l.prototype.writeFloatBE),
  5485. e[203] = m(203, 8, l.prototype.writeDoubleBE),
  5486. e[204] = m(204, 1, l.prototype.writeUInt8),
  5487. e[205] = m(205, 2, l.prototype.writeUInt16BE),
  5488. e[206] = m(206, 4, l.prototype.writeUInt32BE),
  5489. e[207] = m(207, 8, y),
  5490. e[208] = m(208, 1, l.prototype.writeInt8),
  5491. e[209] = m(209, 2, l.prototype.writeInt16BE),
  5492. e[210] = m(210, 4, l.prototype.writeInt32BE),
  5493. e[211] = m(211, 8, k),
  5494. e[217] = m(217, 1, l.prototype.writeUInt8),
  5495. e[218] = m(218, 2, l.prototype.writeUInt16BE),
  5496. e[219] = m(219, 4, l.prototype.writeUInt32BE),
  5497. e[220] = m(220, 2, l.prototype.writeUInt16BE),
  5498. e[221] = m(221, 4, l.prototype.writeUInt32BE),
  5499. e[222] = m(222, 2, l.prototype.writeUInt16BE),
  5500. e[223] = m(223, 4, l.prototype.writeUInt32BE),
  5501. e
  5502. }() : f()
  5503. }
  5504. }
  5505. , function(e, t, n) {
  5506. t.setExtUnpackers = function(e) {
  5507. e.addExtUnpacker(14, [o, l(Error)]),
  5508. e.addExtUnpacker(1, [o, l(EvalError)]),
  5509. e.addExtUnpacker(2, [o, l(RangeError)]),
  5510. e.addExtUnpacker(3, [o, l(ReferenceError)]),
  5511. e.addExtUnpacker(4, [o, l(SyntaxError)]),
  5512. e.addExtUnpacker(5, [o, l(TypeError)]),
  5513. e.addExtUnpacker(6, [o, l(URIError)]),
  5514. e.addExtUnpacker(10, [o, c]),
  5515. e.addExtUnpacker(11, [o, h(Boolean)]),
  5516. e.addExtUnpacker(12, [o, h(String)]),
  5517. e.addExtUnpacker(13, [o, h(Date)]),
  5518. e.addExtUnpacker(15, [o, h(Number)]),
  5519. "undefined" != typeof Uint8Array && (e.addExtUnpacker(17, h(Int8Array)),
  5520. e.addExtUnpacker(18, h(Uint8Array)),
  5521. e.addExtUnpacker(19, [u, h(Int16Array)]),
  5522. e.addExtUnpacker(20, [u, h(Uint16Array)]),
  5523. e.addExtUnpacker(21, [u, h(Int32Array)]),
  5524. e.addExtUnpacker(22, [u, h(Uint32Array)]),
  5525. e.addExtUnpacker(23, [u, h(Float32Array)]),
  5526. "undefined" != typeof Float64Array && e.addExtUnpacker(24, [u, h(Float64Array)]),
  5527. "undefined" != typeof Uint8ClampedArray && e.addExtUnpacker(25, h(Uint8ClampedArray)),
  5528. e.addExtUnpacker(26, u),
  5529. e.addExtUnpacker(29, [u, h(DataView)])),
  5530. r.hasBuffer && e.addExtUnpacker(27, h(s))
  5531. }
  5532. ;
  5533. var i, r = n(0), s = r.global, a = {
  5534. name: 1,
  5535. message: 1,
  5536. stack: 1,
  5537. columnNumber: 1,
  5538. fileName: 1,
  5539. lineNumber: 1
  5540. };
  5541. function o(e) {
  5542. return i || (i = n(15).decode),
  5543. i(e)
  5544. }
  5545. function c(e) {
  5546. return RegExp.apply(null, e)
  5547. }
  5548. function l(e) {
  5549. return function(t) {
  5550. var n = new e;
  5551. for (var i in a)
  5552. n[i] = t[i];
  5553. return n
  5554. }
  5555. }
  5556. function h(e) {
  5557. return function(t) {
  5558. return new e(t)
  5559. }
  5560. }
  5561. function u(e) {
  5562. return new Uint8Array(e).buffer
  5563. }
  5564. }
  5565. , function(e, t, n) {
  5566. var i = n(17);
  5567. function r(e) {
  5568. var t, n = new Array(256);
  5569. for (t = 0; t <= 127; t++)
  5570. n[t] = s(t);
  5571. for (t = 128; t <= 143; t++)
  5572. n[t] = o(t - 128, e.map);
  5573. for (t = 144; t <= 159; t++)
  5574. n[t] = o(t - 144, e.array);
  5575. for (t = 160; t <= 191; t++)
  5576. n[t] = o(t - 160, e.str);
  5577. for (n[192] = s(null),
  5578. n[193] = null,
  5579. n[194] = s(!1),
  5580. n[195] = s(!0),
  5581. n[196] = a(e.uint8, e.bin),
  5582. n[197] = a(e.uint16, e.bin),
  5583. n[198] = a(e.uint32, e.bin),
  5584. n[199] = a(e.uint8, e.ext),
  5585. n[200] = a(e.uint16, e.ext),
  5586. n[201] = a(e.uint32, e.ext),
  5587. n[202] = e.float32,
  5588. n[203] = e.float64,
  5589. n[204] = e.uint8,
  5590. n[205] = e.uint16,
  5591. n[206] = e.uint32,
  5592. n[207] = e.uint64,
  5593. n[208] = e.int8,
  5594. n[209] = e.int16,
  5595. n[210] = e.int32,
  5596. n[211] = e.int64,
  5597. n[212] = o(1, e.ext),
  5598. n[213] = o(2, e.ext),
  5599. n[214] = o(4, e.ext),
  5600. n[215] = o(8, e.ext),
  5601. n[216] = o(16, e.ext),
  5602. n[217] = a(e.uint8, e.str),
  5603. n[218] = a(e.uint16, e.str),
  5604. n[219] = a(e.uint32, e.str),
  5605. n[220] = a(e.uint16, e.array),
  5606. n[221] = a(e.uint32, e.array),
  5607. n[222] = a(e.uint16, e.map),
  5608. n[223] = a(e.uint32, e.map),
  5609. t = 224; t <= 255; t++)
  5610. n[t] = s(t - 256);
  5611. return n
  5612. }
  5613. function s(e) {
  5614. return function() {
  5615. return e
  5616. }
  5617. }
  5618. function a(e, t) {
  5619. return function(n) {
  5620. var i = e(n);
  5621. return t(n, i)
  5622. }
  5623. }
  5624. function o(e, t) {
  5625. return function(n) {
  5626. return t(n, e)
  5627. }
  5628. }
  5629. t.getReadToken = function(e) {
  5630. var t = i.getReadFormat(e);
  5631. return e && e.useraw ? function(e) {
  5632. var t, n = r(e).slice();
  5633. for (n[217] = n[196],
  5634. n[218] = n[197],
  5635. n[219] = n[198],
  5636. t = 160; t <= 191; t++)
  5637. n[t] = o(t - 160, e.bin);
  5638. return n
  5639. }(t) : r(t)
  5640. }
  5641. }
  5642. , function(e, t, n) {
  5643. t.Encoder = s;
  5644. var i = n(18)
  5645. , r = n(10).EncodeBuffer;
  5646. function s(e) {
  5647. if (!(this instanceof s))
  5648. return new s(e);
  5649. r.call(this, e)
  5650. }
  5651. s.prototype = new r,
  5652. i.mixin(s.prototype),
  5653. s.prototype.encode = function(e) {
  5654. this.write(e),
  5655. this.emit("data", this.read())
  5656. }
  5657. ,
  5658. s.prototype.end = function(e) {
  5659. arguments.length && this.encode(e),
  5660. this.flush(),
  5661. this.emit("end")
  5662. }
  5663. }
  5664. , function(e, t, n) {
  5665. t.Decoder = s;
  5666. var i = n(18)
  5667. , r = n(16).DecodeBuffer;
  5668. function s(e) {
  5669. if (!(this instanceof s))
  5670. return new s(e);
  5671. r.call(this, e)
  5672. }
  5673. s.prototype = new r,
  5674. i.mixin(s.prototype),
  5675. s.prototype.decode = function(e) {
  5676. arguments.length && this.write(e),
  5677. this.flush()
  5678. }
  5679. ,
  5680. s.prototype.push = function(e) {
  5681. this.emit("data", e)
  5682. }
  5683. ,
  5684. s.prototype.end = function(e) {
  5685. this.decode(e),
  5686. this.emit("end")
  5687. }
  5688. }
  5689. , function(e, t, n) {
  5690. n(8),
  5691. n(2),
  5692. t.createCodec = n(1).createCodec
  5693. }
  5694. , function(e, t, n) {
  5695. n(8),
  5696. n(2),
  5697. t.codec = {
  5698. preset: n(1).preset
  5699. }
  5700. }
  5701. , function(e, t) {
  5702. var n, i, r = e.exports = {};
  5703. function s() {
  5704. throw new Error("setTimeout has not been defined")
  5705. }
  5706. function a() {
  5707. throw new Error("clearTimeout has not been defined")
  5708. }
  5709. function o(e) {
  5710. if (n === setTimeout)
  5711. return setTimeout(e, 0);
  5712. if ((n === s || !n) && setTimeout)
  5713. return n = setTimeout,
  5714. setTimeout(e, 0);
  5715. try {
  5716. return n(e, 0)
  5717. } catch (t) {
  5718. try {
  5719. return n.call(null, e, 0)
  5720. } catch (t) {
  5721. return n.call(this, e, 0)
  5722. }
  5723. }
  5724. }
  5725. !function() {
  5726. try {
  5727. n = "function" == typeof setTimeout ? setTimeout : s
  5728. } catch (e) {
  5729. n = s
  5730. }
  5731. try {
  5732. i = "function" == typeof clearTimeout ? clearTimeout : a
  5733. } catch (e) {
  5734. i = a
  5735. }
  5736. }();
  5737. var c, l = [], h = !1, u = -1;
  5738. function f() {
  5739. h && c && (h = !1,
  5740. c.length ? l = c.concat(l) : u = -1,
  5741. l.length && d())
  5742. }
  5743. function d() {
  5744. if (!h) {
  5745. var e = o(f);
  5746. h = !0;
  5747. for (var t = l.length; t; ) {
  5748. for (c = l,
  5749. l = []; ++u < t; )
  5750. c && c[u].run();
  5751. u = -1,
  5752. t = l.length
  5753. }
  5754. c = null,
  5755. h = !1,
  5756. function(e) {
  5757. if (i === clearTimeout)
  5758. return clearTimeout(e);
  5759. if ((i === a || !i) && clearTimeout)
  5760. return i = clearTimeout,
  5761. clearTimeout(e);
  5762. try {
  5763. i(e)
  5764. } catch (t) {
  5765. try {
  5766. return i.call(null, e)
  5767. } catch (t) {
  5768. return i.call(this, e)
  5769. }
  5770. }
  5771. }(e)
  5772. }
  5773. }
  5774. function p(e, t) {
  5775. this.fun = e,
  5776. this.array = t
  5777. }
  5778. function g() {}
  5779. r.nextTick = function(e) {
  5780. var t = new Array(arguments.length - 1);
  5781. if (arguments.length > 1)
  5782. for (var n = 1; n < arguments.length; n++)
  5783. t[n - 1] = arguments[n];
  5784. l.push(new p(e,t)),
  5785. 1 !== l.length || h || o(d)
  5786. }
  5787. ,
  5788. p.prototype.run = function() {
  5789. this.fun.apply(null, this.array)
  5790. }
  5791. ,
  5792. r.title = "browser",
  5793. r.browser = !0,
  5794. r.env = {},
  5795. r.argv = [],
  5796. r.version = "",
  5797. r.versions = {},
  5798. r.on = g,
  5799. r.addListener = g,
  5800. r.once = g,
  5801. r.off = g,
  5802. r.removeListener = g,
  5803. r.removeAllListeners = g,
  5804. r.emit = g,
  5805. r.prependListener = g,
  5806. r.prependOnceListener = g,
  5807. r.listeners = function(e) {
  5808. return []
  5809. }
  5810. ,
  5811. r.binding = function(e) {
  5812. throw new Error("process.binding is not supported")
  5813. }
  5814. ,
  5815. r.cwd = function() {
  5816. return "/"
  5817. }
  5818. ,
  5819. r.chdir = function(e) {
  5820. throw new Error("process.chdir is not supported")
  5821. }
  5822. ,
  5823. r.umask = function() {
  5824. return 0
  5825. }
  5826. }
  5827. , function(e, t) {
  5828. var n = Math.abs
  5829. , i = (Math.cos,
  5830. Math.sin,
  5831. Math.pow,
  5832. Math.sqrt)
  5833. , r = (n = Math.abs,
  5834. Math.atan2)
  5835. , s = Math.PI;
  5836. e.exports.randInt = function(e, t) {
  5837. return Math.floor(Math.random() * (t - e + 1)) + e
  5838. }
  5839. ,
  5840. e.exports.randFloat = function(e, t) {
  5841. return Math.random() * (t - e + 1) + e
  5842. }
  5843. ,
  5844. e.exports.lerp = function(e, t, n) {
  5845. return e + (t - e) * n
  5846. }
  5847. ,
  5848. e.exports.decel = function(e, t) {
  5849. return e > 0 ? e = Math.max(0, e - t) : e < 0 && (e = Math.min(0, e + t)),
  5850. e
  5851. }
  5852. ,
  5853. e.exports.getDistance = function(e, t, n, r) {
  5854. return i((n -= e) * n + (r -= t) * r)
  5855. }
  5856. ,
  5857. e.exports.getDirection = function(e, t, n, i) {
  5858. return r(t - i, e - n)
  5859. }
  5860. ,
  5861. e.exports.getAngleDist = function(e, t) {
  5862. var i = n(t - e) % (2 * s);
  5863. return i > s ? 2 * s - i : i
  5864. }
  5865. ,
  5866. e.exports.isNumber = function(e) {
  5867. return "number" == typeof e && !isNaN(e) && isFinite(e)
  5868. }
  5869. ,
  5870. e.exports.isString = function(e) {
  5871. return e && "string" == typeof e
  5872. }
  5873. ,
  5874. e.exports.kFormat = function(e) {
  5875. return e > 999 ? (e / 1e3).toFixed(1) + "k" : e
  5876. }
  5877. ,
  5878. e.exports.capitalizeFirst = function(e) {
  5879. return e.charAt(0).toUpperCase() + e.slice(1)
  5880. }
  5881. ,
  5882. e.exports.fixTo = function(e, t) {
  5883. return parseFloat(e.toFixed(t))
  5884. }
  5885. ,
  5886. e.exports.sortByPoints = function(e, t) {
  5887. return parseFloat(t.points) - parseFloat(e.points)
  5888. }
  5889. ,
  5890. e.exports.lineInRect = function(e, t, n, i, r, s, a, o) {
  5891. var c = r
  5892. , l = a;
  5893. if (r > a && (c = a,
  5894. l = r),
  5895. l > n && (l = n),
  5896. c < e && (c = e),
  5897. c > l)
  5898. return !1;
  5899. var h = s
  5900. , u = o
  5901. , f = a - r;
  5902. if (Math.abs(f) > 1e-7) {
  5903. var d = (o - s) / f
  5904. , p = s - d * r;
  5905. h = d * c + p,
  5906. u = d * l + p
  5907. }
  5908. if (h > u) {
  5909. var g = u;
  5910. u = h,
  5911. h = g
  5912. }
  5913. return u > i && (u = i),
  5914. h < t && (h = t),
  5915. !(h > u)
  5916. }
  5917. ,
  5918. e.exports.containsPoint = function(e, t, n) {
  5919. var i = e.getBoundingClientRect()
  5920. , r = i.left + window.scrollX
  5921. , s = i.top + window.scrollY
  5922. , a = i.width
  5923. , o = i.height;
  5924. return t > r && t < r + a && n > s && n < s + o
  5925. }
  5926. ,
  5927. e.exports.mousifyTouchEvent = function(e) {
  5928. var t = e.changedTouches[0];
  5929. e.screenX = t.screenX,
  5930. e.screenY = t.screenY,
  5931. e.clientX = t.clientX,
  5932. e.clientY = t.clientY,
  5933. e.pageX = t.pageX,
  5934. e.pageY = t.pageY
  5935. }
  5936. ,
  5937. e.exports.hookTouchEvents = function(t, n) {
  5938. var i = !n
  5939. , r = !1;
  5940. function s(n) {
  5941. e.exports.mousifyTouchEvent(n),
  5942. window.setUsingTouch(!0),
  5943. i && (n.preventDefault(),
  5944. n.stopPropagation()),
  5945. r && (t.onclick && t.onclick(n),
  5946. t.onmouseout && t.onmouseout(n),
  5947. r = !1)
  5948. }
  5949. t.addEventListener("touchstart", e.exports.checkTrusted((function(n) {
  5950. e.exports.mousifyTouchEvent(n),
  5951. window.setUsingTouch(!0),
  5952. i && (n.preventDefault(),
  5953. n.stopPropagation()),
  5954. t.onmouseover && t.onmouseover(n),
  5955. r = !0
  5956. }
  5957. )), !1),
  5958. t.addEventListener("touchmove", e.exports.checkTrusted((function(n) {
  5959. e.exports.mousifyTouchEvent(n),
  5960. window.setUsingTouch(!0),
  5961. i && (n.preventDefault(),
  5962. n.stopPropagation()),
  5963. e.exports.containsPoint(t, n.pageX, n.pageY) ? r || (t.onmouseover && t.onmouseover(n),
  5964. r = !0) : r && (t.onmouseout && t.onmouseout(n),
  5965. r = !1)
  5966. }
  5967. )), !1),
  5968. t.addEventListener("touchend", e.exports.checkTrusted(s), !1),
  5969. t.addEventListener("touchcancel", e.exports.checkTrusted(s), !1),
  5970. t.addEventListener("touchleave", e.exports.checkTrusted(s), !1)
  5971. }
  5972. ,
  5973. e.exports.removeAllChildren = function(e) {
  5974. for (; e.hasChildNodes(); )
  5975. e.removeChild(e.lastChild)
  5976. }
  5977. ,
  5978. e.exports.generateElement = function(t) {
  5979. var n = document.createElement(t.tag || "div");
  5980. function i(e, i) {
  5981. t[e] && (n[i] = t[e])
  5982. }
  5983. for (var r in i("text", "textContent"),
  5984. i("html", "innerHTML"),
  5985. i("class", "className"),
  5986. t) {
  5987. switch (r) {
  5988. case "tag":
  5989. case "text":
  5990. case "html":
  5991. case "class":
  5992. case "style":
  5993. case "hookTouch":
  5994. case "parent":
  5995. case "children":
  5996. continue
  5997. }
  5998. n[r] = t[r]
  5999. }
  6000. if (n.onclick && (n.onclick = e.exports.checkTrusted(n.onclick)),
  6001. n.onmouseover && (n.onmouseover = e.exports.checkTrusted(n.onmouseover)),
  6002. n.onmouseout && (n.onmouseout = e.exports.checkTrusted(n.onmouseout)),
  6003. t.style && (n.style.cssText = t.style),
  6004. t.hookTouch && e.exports.hookTouchEvents(n),
  6005. t.parent && t.parent.appendChild(n),
  6006. t.children)
  6007. for (var s = 0; s < t.children.length; s++)
  6008. n.appendChild(t.children[s]);
  6009. return n
  6010. }
  6011. ,
  6012. e.exports.eventIsTrusted = function(e) {
  6013. return !e || "boolean" != typeof e.isTrusted || e.isTrusted
  6014. }
  6015. ,
  6016. e.exports.checkTrusted = function(t) {
  6017. return function(n) {
  6018. n && n instanceof Event && e.exports.eventIsTrusted(n) && t(n)
  6019. }
  6020. }
  6021. ,
  6022. e.exports.randomString = function(e) {
  6023. for (var t = "", n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", i = 0; i < e; i++)
  6024. t += n.charAt(Math.floor(Math.random() * n.length));
  6025. return t
  6026. }
  6027. ,
  6028. e.exports.countInArray = function(e, t) {
  6029. for (var n = 0, i = 0; i < e.length; i++)
  6030. e[i] === t && n++;
  6031. return n
  6032. }
  6033. }
  6034. , function(e, t) {
  6035. e.exports.AnimText = function() {
  6036. this.init = function(e, t, n, i, r, s, a) {
  6037. this.x = e,
  6038. this.y = t,
  6039. this.color = a,
  6040. this.scale = n,
  6041. this.startScale = this.scale,
  6042. this.maxScale = 1.5 * n,
  6043. this.scaleSpeed = .7,
  6044. this.speed = i,
  6045. this.life = r,
  6046. this.text = s
  6047. }
  6048. ,
  6049. this.update = function(e) {
  6050. this.life && (this.life -= e,
  6051. this.y -= this.speed * e,
  6052. this.scale += this.scaleSpeed * e,
  6053. this.scale >= this.maxScale ? (this.scale = this.maxScale,
  6054. this.scaleSpeed *= -1) : this.scale <= this.startScale && (this.scale = this.startScale,
  6055. this.scaleSpeed = 0),
  6056. this.life <= 0 && (this.life = 0))
  6057. }
  6058. ,
  6059. this.render = function(e, t, n) {
  6060. e.fillStyle = this.color,
  6061. e.font = this.scale + "px Hammersmith One",
  6062. e.fillText(this.text, this.x - t, this.y - n)
  6063. }
  6064. }
  6065. ,
  6066. e.exports.TextManager = function() {
  6067. this.texts = [],
  6068. this.update = function(e, t, n, i) {
  6069. t.textBaseline = "middle",
  6070. t.textAlign = "center";
  6071. for (var r = 0; r < this.texts.length; ++r)
  6072. this.texts[r].life && (this.texts[r].update(e),
  6073. this.texts[r].render(t, n, i))
  6074. }
  6075. ,
  6076. this.showText = function(t, n, i, r, s, a, o) {
  6077. for (var c, l = 0; l < this.texts.length; ++l)
  6078. if (!this.texts[l].life) {
  6079. c = this.texts[l];
  6080. break
  6081. }
  6082. c || (c = new e.exports.AnimText,
  6083. this.texts.push(c)),
  6084. c.init(t, n, i, r, s, a, o)
  6085. }
  6086. }
  6087. }
  6088. , function(e, t) {
  6089. e.exports = function(e) {
  6090. this.sid = e,
  6091. this.init = function(e, t, n, i, r, s, a) {
  6092. s = s || {},
  6093. this.sentTo = {},
  6094. this.gridLocations = [],
  6095. this.active = !0,
  6096. this.doUpdate = s.doUpdate,
  6097. this.x = e,
  6098. this.y = t,
  6099. this.dir = n,
  6100. this.xWiggle = 0,
  6101. this.yWiggle = 0,
  6102. this.scale = i,
  6103. this.type = r,
  6104. this.id = s.id,
  6105. this.owner = a,
  6106. this.name = s.name,
  6107. this.isItem = null != this.id,
  6108. this.group = s.group,
  6109. this.health = s.health,
  6110. this.buildhealth = s.health,
  6111. this.layer = 2,
  6112. null != this.group ? this.layer = this.group.layer : 0 == this.type ? this.layer = 3 : 2 == this.type ? this.layer = 0 : 4 == this.type && (this.layer = -1),
  6113. this.colDiv = s.colDiv || 1,
  6114. this.blocker = s.blocker,
  6115. this.ignoreCollision = s.ignoreCollision,
  6116. this.dontGather = s.dontGather,
  6117. this.hideFromEnemy = s.hideFromEnemy,
  6118. this.friction = s.friction,
  6119. this.projDmg = s.projDmg,
  6120. this.dmg = s.dmg,
  6121. this.pDmg = s.pDmg,
  6122. this.pps = s.pps,
  6123. this.zIndex = s.zIndex || 0,
  6124. this.turnSpeed = s.turnSpeed,
  6125. this.req = s.req,
  6126. this.trap = s.trap,
  6127. this.healCol = s.healCol,
  6128. this.teleport = s.teleport,
  6129. this.boostSpeed = s.boostSpeed,
  6130. this.projectile = s.projectile,
  6131. this.shootRange = s.shootRange,
  6132. this.shootRate = s.shootRate,
  6133. this.shootCount = this.shootRate,
  6134. this.spawnPoint = s.spawnPoint
  6135. }
  6136. ,
  6137. this.changeHealth = function(e, t) {
  6138. return this.health += e,
  6139. this.health <= 0
  6140. }
  6141. ,
  6142. this.getScale = function(e, t) {
  6143. return e = e || 1,
  6144. this.scale * (this.isItem || 2 == this.type || 3 == this.type || 4 == this.type ? 1 : .6 * e) * (t ? 1 : this.colDiv)
  6145. }
  6146. ,
  6147. this.visibleToPlayer = function(e) {
  6148. return !this.hideFromEnemy || this.owner && (this.owner == e || this.owner.team && e.team == this.owner.team)
  6149. }
  6150. ,
  6151. this.update = function(e) {
  6152. this.active && (this.xWiggle && (this.xWiggle *= Math.pow(.99, e)),
  6153. this.yWiggle && (this.yWiggle *= Math.pow(.99, e)),
  6154. this.turnSpeed && (this.dir += this.turnSpeed * e))
  6155. }
  6156. }
  6157. }
  6158. , function(e, t) {
  6159. e.exports.groups = [{
  6160. id: 0,
  6161. name: "food",
  6162. layer: 0
  6163. }, {
  6164. id: 1,
  6165. name: "walls",
  6166. place: !0,
  6167. limit: 30,
  6168. layer: 0
  6169. }, {
  6170. id: 2,
  6171. name: "spikes",
  6172. place: !0,
  6173. limit: 15,
  6174. layer: 0
  6175. }, {
  6176. id: 3,
  6177. name: "mill",
  6178. place: !0,
  6179. limit: 7,
  6180. layer: 1
  6181. }, {
  6182. id: 4,
  6183. name: "mine",
  6184. place: !0,
  6185. limit: 1,
  6186. layer: 0
  6187. }, {
  6188. id: 5,
  6189. name: "trap",
  6190. place: !0,
  6191. limit: 6,
  6192. layer: -1
  6193. }, {
  6194. id: 6,
  6195. name: "booster",
  6196. place: !0,
  6197. limit: 12,
  6198. layer: -1
  6199. }, {
  6200. id: 7,
  6201. name: "turret",
  6202. place: !0,
  6203. limit: 2,
  6204. layer: 1
  6205. }, {
  6206. id: 8,
  6207. name: "watchtower",
  6208. place: !0,
  6209. limit: 12,
  6210. layer: 1
  6211. }, {
  6212. id: 9,
  6213. name: "buff",
  6214. place: !0,
  6215. limit: 4,
  6216. layer: -1
  6217. }, {
  6218. id: 10,
  6219. name: "spawn",
  6220. place: !0,
  6221. limit: 1,
  6222. layer: -1
  6223. }, {
  6224. id: 11,
  6225. name: "sapling",
  6226. place: !0,
  6227. limit: 2,
  6228. layer: 0
  6229. }, {
  6230. id: 12,
  6231. name: "blocker",
  6232. place: !0,
  6233. limit: 3,
  6234. layer: -1
  6235. }, {
  6236. id: 13,
  6237. name: "teleporter",
  6238. place: !0,
  6239. limit: 2,
  6240. layer: -1
  6241. }],
  6242. t.projectiles = [{
  6243. indx: 0,
  6244. layer: 0,
  6245. src: "arrow_1",
  6246. dmg: 25,
  6247. speed: 1.6,
  6248. scale: 103,
  6249. range: 1e3
  6250. }, {
  6251. indx: 1,
  6252. layer: 1,
  6253. dmg: 25,
  6254. scale: 20
  6255. }, {
  6256. indx: 0,
  6257. layer: 0,
  6258. src: "arrow_1",
  6259. dmg: 35,
  6260. speed: 2.5,
  6261. scale: 103,
  6262. range: 1200
  6263. }, {
  6264. indx: 0,
  6265. layer: 0,
  6266. src: "arrow_1",
  6267. dmg: 30,
  6268. speed: 2,
  6269. scale: 103,
  6270. range: 1200
  6271. }, {
  6272. indx: 1,
  6273. layer: 1,
  6274. dmg: 16,
  6275. scale: 20
  6276. }, {
  6277. indx: 0,
  6278. layer: 0,
  6279. src: "bullet_1",
  6280. dmg: 50,
  6281. speed: 3.6,
  6282. scale: 160,
  6283. range: 1400
  6284. }],
  6285. t.weapons = [{
  6286. id: 0,
  6287. type: 0,
  6288. name: "tool hammer",
  6289. desc: "tool for gathering all resources",
  6290. src: "hammer_1",
  6291. length: 140,
  6292. width: 140,
  6293. xOff: -3,
  6294. yOff: 18,
  6295. dmg: 25,
  6296. range: 65,
  6297. gather: 1,
  6298. speed: 300
  6299. }, {
  6300. id: 1,
  6301. type: 0,
  6302. age: 2,
  6303. name: "hand axe",
  6304. desc: "gathers resources at a higher rate",
  6305. src: "axe_1",
  6306. length: 140,
  6307. width: 140,
  6308. xOff: 3,
  6309. yOff: 24,
  6310. dmg: 30,
  6311. spdMult: 1,
  6312. range: 70,
  6313. gather: 2,
  6314. speed: 400
  6315. }, {
  6316. id: 2,
  6317. type: 0,
  6318. age: 8,
  6319. pre: 1,
  6320. name: "great axe",
  6321. desc: "deal more damage and gather more resources",
  6322. src: "great_axe_1",
  6323. length: 140,
  6324. width: 140,
  6325. xOff: -8,
  6326. yOff: 25,
  6327. dmg: 35,
  6328. spdMult: 1,
  6329. range: 75,
  6330. gather: 4,
  6331. speed: 400
  6332. }, {
  6333. id: 3,
  6334. type: 0,
  6335. age: 2,
  6336. name: "short sword",
  6337. desc: "increased attack power but slower move speed",
  6338. src: "sword_1",
  6339. iPad: 1.3,
  6340. length: 130,
  6341. width: 210,
  6342. xOff: -8,
  6343. yOff: 46,
  6344. dmg: 35,
  6345. spdMult: .85,
  6346. range: 110,
  6347. gather: 1,
  6348. speed: 300
  6349. }, {
  6350. id: 4,
  6351. type: 0,
  6352. age: 8,
  6353. pre: 3,
  6354. name: "katana",
  6355. desc: "greater range and damage",
  6356. src: "samurai_1",
  6357. iPad: 1.3,
  6358. length: 130,
  6359. width: 210,
  6360. xOff: -8,
  6361. yOff: 59,
  6362. dmg: 40,
  6363. spdMult: .8,
  6364. range: 118,
  6365. gather: 1,
  6366. speed: 300
  6367. }, {
  6368. id: 5,
  6369. type: 0,
  6370. age: 2,
  6371. name: "polearm",
  6372. desc: "long range melee weapon",
  6373. src: "spear_1",
  6374. iPad: 1.3,
  6375. length: 130,
  6376. width: 210,
  6377. xOff: -8,
  6378. yOff: 53,
  6379. dmg: 45,
  6380. knock: .2,
  6381. spdMult: .82,
  6382. range: 142,
  6383. gather: 1,
  6384. speed: 700
  6385. }, {
  6386. id: 6,
  6387. type: 0,
  6388. age: 2,
  6389. name: "bat",
  6390. desc: "fast long range melee weapon",
  6391. src: "bat_1",
  6392. iPad: 1.3,
  6393. length: 110,
  6394. width: 180,
  6395. xOff: -8,
  6396. yOff: 53,
  6397. dmg: 20,
  6398. knock: .7,
  6399. range: 110,
  6400. gather: 1,
  6401. speed: 300
  6402. }, {
  6403. id: 7,
  6404. type: 0,
  6405. age: 2,
  6406. name: "daggers",
  6407. desc: "really fast short range weapon",
  6408. src: "dagger_1",
  6409. iPad: .8,
  6410. length: 110,
  6411. width: 110,
  6412. xOff: 18,
  6413. yOff: 0,
  6414. dmg: 20,
  6415. knock: .1,
  6416. range: 65,
  6417. gather: 1,
  6418. hitSlow: .1,
  6419. spdMult: 1.13,
  6420. speed: 100
  6421. }, {
  6422. id: 8,
  6423. type: 0,
  6424. age: 2,
  6425. name: "stick",
  6426. desc: "great for gathering but very weak",
  6427. src: "stick_1",
  6428. length: 140,
  6429. width: 140,
  6430. xOff: 3,
  6431. yOff: 24,
  6432. dmg: 1,
  6433. spdMult: 1,
  6434. range: 70,
  6435. gather: 7,
  6436. speed: 400
  6437. }, {
  6438. id: 9,
  6439. type: 1,
  6440. age: 6,
  6441. name: "hunting bow",
  6442. desc: "bow used for ranged combat and hunting",
  6443. src: "bow_1",
  6444. req: ["wood", 4],
  6445. length: 120,
  6446. width: 120,
  6447. xOff: -6,
  6448. yOff: 0,
  6449. projectile: 0,
  6450. spdMult: .75,
  6451. speed: 600
  6452. }, {
  6453. id: 10,
  6454. type: 1,
  6455. age: 6,
  6456. name: "great hammer",
  6457. desc: "hammer used for destroying structures",
  6458. src: "great_hammer_1",
  6459. length: 140,
  6460. width: 140,
  6461. xOff: -9,
  6462. yOff: 25,
  6463. dmg: 10,
  6464. spdMult: .88,
  6465. range: 75,
  6466. sDmg: 7.5,
  6467. gather: 1,
  6468. speed: 400
  6469. }, {
  6470. id: 11,
  6471. type: 1,
  6472. age: 6,
  6473. name: "wooden shield",
  6474. desc: "blocks projectiles and reduces melee damage",
  6475. src: "shield_1",
  6476. length: 120,
  6477. width: 120,
  6478. shield: .2,
  6479. xOff: 6,
  6480. yOff: 0,
  6481. spdMult: .7
  6482. }, {
  6483. id: 12,
  6484. type: 1,
  6485. age: 8,
  6486. pre: 9,
  6487. name: "crossbow",
  6488. desc: "deals more damage and has greater range",
  6489. src: "crossbow_1",
  6490. req: ["wood", 5],
  6491. aboveHand: !0,
  6492. armS: .75,
  6493. length: 120,
  6494. width: 120,
  6495. xOff: -4,
  6496. yOff: 0,
  6497. projectile: 2,
  6498. spdMult: .7,
  6499. speed: 700
  6500. }, {
  6501. id: 13,
  6502. type: 1,
  6503. age: 9,
  6504. pre: 12,
  6505. name: "repeater crossbow",
  6506. desc: "high firerate crossbow with reduced damage",
  6507. src: "crossbow_2",
  6508. req: ["wood", 10],
  6509. aboveHand: !0,
  6510. armS: .75,
  6511. length: 120,
  6512. width: 120,
  6513. xOff: -4,
  6514. yOff: 0,
  6515. projectile: 3,
  6516. spdMult: .7,
  6517. speed: 230
  6518. }, {
  6519. id: 14,
  6520. type: 1,
  6521. age: 6,
  6522. name: "mc grabby",
  6523. desc: "steals resources from enemies",
  6524. src: "grab_1",
  6525. length: 130,
  6526. width: 210,
  6527. xOff: -8,
  6528. yOff: 53,
  6529. dmg: 0,
  6530. steal: 250,
  6531. knock: .2,
  6532. spdMult: 1.05,
  6533. range: 125,
  6534. gather: 0,
  6535. speed: 700
  6536. }, {
  6537. id: 15,
  6538. type: 1,
  6539. age: 9,
  6540. pre: 12,
  6541. name: "musket",
  6542. desc: "slow firerate but high damage and range",
  6543. src: "musket_1",
  6544. req: ["stone", 10],
  6545. aboveHand: !0,
  6546. rec: .35,
  6547. armS: .6,
  6548. hndS: .3,
  6549. hndD: 1.6,
  6550. length: 205,
  6551. width: 205,
  6552. xOff: 25,
  6553. yOff: 0,
  6554. projectile: 5,
  6555. hideProjectile: !0,
  6556. spdMult: .6,
  6557. speed: 1500
  6558. }],
  6559. e.exports.list = [{
  6560. group: e.exports.groups[0],
  6561. name: "apple",
  6562. desc: "restores 20 health when consumed",
  6563. req: ["food", 10],
  6564. consume: function(e) {
  6565. return e.changeHealth(20, e)
  6566. },
  6567. scale: 22,
  6568. holdOffset: 15
  6569. }, {
  6570. age: 3,
  6571. group: e.exports.groups[0],
  6572. name: "cookie",
  6573. desc: "restores 40 health when consumed",
  6574. req: ["food", 15],
  6575. consume: function(e) {
  6576. return e.changeHealth(40, e)
  6577. },
  6578. scale: 27,
  6579. holdOffset: 15
  6580. }, {
  6581. age: 7,
  6582. group: e.exports.groups[0],
  6583. name: "cheese",
  6584. desc: "restores 30 health and another 50 over 5 seconds",
  6585. req: ["food", 25],
  6586. consume: function(e) {
  6587. return !!(e.changeHealth(30, e) || e.health < 100) && (e.dmgOverTime.dmg = -10,
  6588. e.dmgOverTime.doer = e,
  6589. e.dmgOverTime.time = 5,
  6590. !0)
  6591. },
  6592. scale: 27,
  6593. holdOffset: 15
  6594. }, {
  6595. group: e.exports.groups[1],
  6596. name: "wood wall",
  6597. desc: "provides protection for your village",
  6598. req: ["wood", 10],
  6599. projDmg: !0,
  6600. health: 380,
  6601. scale: 50,
  6602. holdOffset: 20,
  6603. placeOffset: -5
  6604. }, {
  6605. age: 3,
  6606. group: e.exports.groups[1],
  6607. name: "stone wall",
  6608. desc: "provides improved protection for your village",
  6609. req: ["stone", 25],
  6610. health: 900,
  6611. scale: 50,
  6612. holdOffset: 20,
  6613. placeOffset: -5
  6614. }, {
  6615. age: 7,
  6616. pre: 1,
  6617. group: e.exports.groups[1],
  6618. name: "castle wall",
  6619. desc: "provides powerful protection for your village",
  6620. req: ["stone", 35],
  6621. health: 1500,
  6622. scale: 52,
  6623. holdOffset: 20,
  6624. placeOffset: -5
  6625. }, {
  6626. group: e.exports.groups[2],
  6627. name: "spikes",
  6628. desc: "damages enemies when they touch them",
  6629. req: ["wood", 20, "stone", 5],
  6630. health: 400,
  6631. dmg: 20,
  6632. scale: 49,
  6633. spritePadding: -23,
  6634. holdOffset: 8,
  6635. placeOffset: -5
  6636. }, {
  6637. age: 5,
  6638. group: e.exports.groups[2],
  6639. name: "greater spikes",
  6640. desc: "damages enemies when they touch them",
  6641. req: ["wood", 30, "stone", 10],
  6642. health: 500,
  6643. dmg: 35,
  6644. scale: 52,
  6645. spritePadding: -23,
  6646. holdOffset: 8,
  6647. placeOffset: -5
  6648. }, {
  6649. age: 9,
  6650. pre: 1,
  6651. group: e.exports.groups[2],
  6652. name: "poison spikes",
  6653. desc: "poisons enemies when they touch them",
  6654. req: ["wood", 35, "stone", 15],
  6655. health: 600,
  6656. dmg: 30,
  6657. pDmg: 5,
  6658. scale: 52,
  6659. spritePadding: -23,
  6660. holdOffset: 8,
  6661. placeOffset: -5
  6662. }, {
  6663. age: 9,
  6664. pre: 2,
  6665. group: e.exports.groups[2],
  6666. name: "spinning spikes",
  6667. desc: "damages enemies when they touch them",
  6668. req: ["wood", 30, "stone", 20],
  6669. health: 500,
  6670. dmg: 45,
  6671. turnSpeed: .003,
  6672. scale: 52,
  6673. spritePadding: -23,
  6674. holdOffset: 8,
  6675. placeOffset: -5
  6676. }, {
  6677. group: e.exports.groups[3],
  6678. name: "windmill",
  6679. desc: "generates gold over time",
  6680. req: ["wood", 50, "stone", 10],
  6681. health: 400,
  6682. pps: 1,
  6683. turnSpeed: .0,//016,
  6684. spritePadding: 25,
  6685. iconLineMult: 12,
  6686. scale: 45,
  6687. holdOffset: 20,
  6688. placeOffset: 5
  6689. }, {
  6690. age: 5,
  6691. pre: 1,
  6692. group: e.exports.groups[3],
  6693. name: "faster windmill",
  6694. desc: "generates more gold over time",
  6695. req: ["wood", 60, "stone", 20],
  6696. health: 500,
  6697. pps: 1.5,
  6698. turnSpeed: .0,//025,
  6699. spritePadding: 25,
  6700. iconLineMult: 12,
  6701. scale: 47,
  6702. holdOffset: 20,
  6703. placeOffset: 5
  6704. }, {
  6705. age: 8,
  6706. pre: 1,
  6707. group: e.exports.groups[3],
  6708. name: "power mill",
  6709. desc: "generates more gold over time",
  6710. req: ["wood", 100, "stone", 50],
  6711. health: 800,
  6712. pps: 2,
  6713. turnSpeed: .0,//05,
  6714. spritePadding: 25,
  6715. iconLineMult: 12,
  6716. scale: 47,
  6717. holdOffset: 20,
  6718. placeOffset: 5
  6719. }, {
  6720. age: 5,
  6721. group: e.exports.groups[4],
  6722. type: 2,
  6723. name: "mine",
  6724. desc: "allows you to mine stone",
  6725. req: ["wood", 20, "stone", 100],
  6726. iconLineMult: 12,
  6727. scale: 65,
  6728. holdOffset: 20,
  6729. placeOffset: 0
  6730. }, {
  6731. age: 5,
  6732. group: e.exports.groups[11],
  6733. type: 0,
  6734. name: "sapling",
  6735. desc: "allows you to farm wood",
  6736. req: ["wood", 150],
  6737. iconLineMult: 12,
  6738. colDiv: .5,
  6739. scale: 110,
  6740. holdOffset: 50,
  6741. placeOffset: -15
  6742. }, {
  6743. age: 4,
  6744. group: e.exports.groups[5],
  6745. name: "pit trap",
  6746. desc: "pit that traps enemies if they walk over it",
  6747. req: ["wood", 30, "stone", 30],
  6748. trap: !0,
  6749. ignoreCollision: !0,
  6750. hideFromEnemy: !0,
  6751. health: 500,
  6752. colDiv: .2,
  6753. scale: 50,
  6754. holdOffset: 20,
  6755. placeOffset: -5
  6756. }, {
  6757. age: 4,
  6758. group: e.exports.groups[6],
  6759. name: "boost pad",
  6760. desc: "provides boost when stepped on",
  6761. req: ["stone", 20, "wood", 5],
  6762. ignoreCollision: !0,
  6763. boostSpeed: 1.5,
  6764. health: 150,
  6765. colDiv: .7,
  6766. scale: 45,
  6767. holdOffset: 20,
  6768. placeOffset: -5
  6769. }, {
  6770. age: 7,
  6771. group: e.exports.groups[7],
  6772. doUpdate: !0,
  6773. name: "turret",
  6774. desc: "defensive structure that shoots at enemies",
  6775. req: ["wood", 200, "stone", 150],
  6776. health: 800,
  6777. projectile: 1,
  6778. shootRange: 700,
  6779. shootRate: 2200,
  6780. scale: 43,
  6781. holdOffset: 20,
  6782. placeOffset: -5
  6783. }, {
  6784. age: 7,
  6785. group: e.exports.groups[8],
  6786. name: "platform",
  6787. desc: "platform to shoot over walls and cross over water",
  6788. req: ["wood", 20],
  6789. ignoreCollision: !0,
  6790. zIndex: 1,
  6791. health: 300,
  6792. scale: 43,
  6793. holdOffset: 20,
  6794. placeOffset: -5
  6795. }, {
  6796. age: 7,
  6797. group: e.exports.groups[9],
  6798. name: "healing pad",
  6799. desc: "standing on it will slowly heal you",
  6800. req: ["wood", 30, "food", 10],
  6801. ignoreCollision: !0,
  6802. healCol: 15,
  6803. health: 400,
  6804. colDiv: .7,
  6805. scale: 45,
  6806. holdOffset: 20,
  6807. placeOffset: -5
  6808. }, {
  6809. age: 9,
  6810. group: e.exports.groups[10],
  6811. name: "spawn pad",
  6812. desc: "you will spawn here when you die but it will dissapear",
  6813. req: ["wood", 100, "stone", 100],
  6814. health: 400,
  6815. ignoreCollision: !0,
  6816. spawnPoint: !0,
  6817. scale: 45,
  6818. holdOffset: 20,
  6819. placeOffset: -5
  6820. }, {
  6821. age: 7,
  6822. group: e.exports.groups[12],
  6823. name: "blocker",
  6824. desc: "blocks building in radius",
  6825. req: ["wood", 30, "stone", 25],
  6826. ignoreCollision: !0,
  6827. blocker: 300,
  6828. health: 400,
  6829. colDiv: .7,
  6830. scale: 45,
  6831. holdOffset: 20,
  6832. placeOffset: -5
  6833. }, {
  6834. age: 7,
  6835. group: e.exports.groups[13],
  6836. name: "teleporter",
  6837. desc: "teleports you to a random point on the map",
  6838. req: ["wood", 60, "stone", 60],
  6839. ignoreCollision: !0,
  6840. teleport: !0,
  6841. health: 200,
  6842. colDiv: .7,
  6843. scale: 45,
  6844. holdOffset: 20,
  6845. placeOffset: -5
  6846. }];
  6847. for (var n = 0; n < e.exports.list.length; ++n)
  6848. e.exports.list[n].id = n,
  6849. e.exports.list[n].pre && (e.exports.list[n].pre = n - e.exports.list[n].pre)
  6850. }
  6851. , function(e, t) {
  6852. e.exports = {}
  6853. }
  6854. , function(e, t) {
  6855. var n = Math.floor
  6856. , i = Math.abs
  6857. , r = Math.cos
  6858. , s = Math.sin
  6859. , a = (Math.pow,
  6860. Math.sqrt);
  6861. e.exports = function(e, t, o, c, l, h) {
  6862. var u, f;
  6863. this.objects = t,
  6864. this.grids = {},
  6865. this.updateObjects = [];
  6866. var d = c.mapScale / c.colGrid;
  6867. this.setObjectGrids = function(e) {
  6868. for (var t = Math.min(c.mapScale, Math.max(0, e.x)), n = Math.min(c.mapScale, Math.max(0, e.y)), i = 0; i < c.colGrid; ++i) {
  6869. u = i * d;
  6870. for (var r = 0; r < c.colGrid; ++r)
  6871. f = r * d,
  6872. t + e.scale >= u && t - e.scale <= u + d && n + e.scale >= f && n - e.scale <= f + d && (this.grids[i + "_" + r] || (this.grids[i + "_" + r] = []),
  6873. this.grids[i + "_" + r].push(e),
  6874. e.gridLocations.push(i + "_" + r))
  6875. }
  6876. }
  6877. ,
  6878. this.removeObjGrid = function(e) {
  6879. for (var t, n = 0; n < e.gridLocations.length; ++n)
  6880. (t = this.grids[e.gridLocations[n]].indexOf(e)) >= 0 && this.grids[e.gridLocations[n]].splice(t, 1)
  6881. }
  6882. ,
  6883. this.disableObj = function(e) {
  6884. if (e.active = !1,
  6885. h) {
  6886. e.owner && e.pps && (e.owner.pps -= e.pps),
  6887. this.removeObjGrid(e);
  6888. var t = this.updateObjects.indexOf(e);
  6889. t >= 0 && this.updateObjects.splice(t, 1)
  6890. }
  6891. }
  6892. ,
  6893. this.hitObj = function(e, t) {
  6894. for (var n = 0; n < l.length; ++n)
  6895. l[n].active && (e.sentTo[l[n].id] && (e.active ? l[n].canSee(e) && h.send(l[n].id, "8", o.fixTo(t, 1), e.sid) : h.send(l[n].id, "12", e.sid)),
  6896. e.active || e.owner != l[n] || l[n].changeItemCount(e.group.id, -1))
  6897. }
  6898. ;
  6899. var p, g, m = [];
  6900. this.getGridArrays = function(e, t, i) {
  6901. u = n(e / d),
  6902. f = n(t / d),
  6903. m.length = 0;
  6904. try {
  6905. this.grids[u + "_" + f] && m.push(this.grids[u + "_" + f]),
  6906. e + i >= (u + 1) * d && ((p = this.grids[u + 1 + "_" + f]) && m.push(p),
  6907. f && t - i <= f * d ? (p = this.grids[u + 1 + "_" + (f - 1)]) && m.push(p) : t + i >= (f + 1) * d && (p = this.grids[u + 1 + "_" + (f + 1)]) && m.push(p)),
  6908. u && e - i <= u * d && ((p = this.grids[u - 1 + "_" + f]) && m.push(p),
  6909. f && t - i <= f * d ? (p = this.grids[u - 1 + "_" + (f - 1)]) && m.push(p) : t + i >= (f + 1) * d && (p = this.grids[u - 1 + "_" + (f + 1)]) && m.push(p)),
  6910. t + i >= (f + 1) * d && (p = this.grids[u + "_" + (f + 1)]) && m.push(p),
  6911. f && t - i <= f * d && (p = this.grids[u + "_" + (f - 1)]) && m.push(p)
  6912. } catch (e) {}
  6913. return m
  6914. }
  6915. ,
  6916. this.add = function(n, i, r, s, a, o, c, l, u) {
  6917. g = null;
  6918. for (var f = 0; f < t.length; ++f)
  6919. if (t[f].sid == n) {
  6920. g = t[f];
  6921. break
  6922. }
  6923. if (!g)
  6924. for (f = 0; f < t.length; ++f)
  6925. if (!t[f].active) {
  6926. g = t[f];
  6927. break
  6928. }
  6929. g || (g = new e(n),
  6930. t.push(g)),
  6931. l && (g.sid = n),
  6932. g.init(i, r, s, a, o, c, u),
  6933. h && (this.setObjectGrids(g),
  6934. g.doUpdate && this.updateObjects.push(g))
  6935. }
  6936. ,
  6937. this.disableBySid = function(e) {
  6938. for (var n = 0; n < t.length; ++n)
  6939. if (t[n].sid == e) {
  6940. this.disableObj(t[n]);
  6941. break
  6942. }
  6943. }
  6944. ,
  6945. this.removeAllItems = function(e, n) {
  6946. for (var i = 0; i < t.length; ++i)
  6947. t[i].active && t[i].owner && t[i].owner.sid == e && this.disableObj(t[i]);
  6948. n && n.broadcast("13", e)
  6949. }
  6950. ,
  6951. this.fetchSpawnObj = function(e) {
  6952. for (var n = null, i = 0; i < t.length; ++i)
  6953. if ((g = t[i]).active && g.owner && g.owner.sid == e && g.spawnPoint) {
  6954. n = [g.x, g.y],
  6955. this.disableObj(g),
  6956. h.broadcast("12", g.sid),
  6957. g.owner && g.owner.changeItemCount(g.group.id, -1);
  6958. break
  6959. }
  6960. return n
  6961. }
  6962. ,
  6963. this.checkItemLocation = function(e, n, i, r, s, a, l) {
  6964. for (var h = 0; h < t.length; ++h) {
  6965. var u = t[h].blocker ? t[h].blocker : t[h].getScale(r, t[h].isItem);
  6966. if (t[h].active && o.getDistance(e, n, t[h].x, t[h].y) < i + u)
  6967. return !1
  6968. }
  6969. return !(!a && 18 != s && n >= c.mapScale / 2 - c.riverWidth / 2 && n <= c.mapScale / 2 + c.riverWidth / 2)
  6970. }
  6971. ,
  6972. this.addProjectile = function(e, t, n, i, r) {
  6973. for (var s, a = items.projectiles[r], c = 0; c < projectiles.length; ++c)
  6974. if (!projectiles[c].active) {
  6975. s = projectiles[c];
  6976. break
  6977. }
  6978. s || (s = new Projectile(l,o),
  6979. projectiles.push(s)),
  6980. s.init(r, e, t, n, a.speed, i, a.scale)
  6981. }
  6982. ,
  6983. this.checkCollision = function(e, t, n) {
  6984. n = n || 1;
  6985. var l = e.x - t.x
  6986. , h = e.y - t.y
  6987. , u = e.scale + t.scale;
  6988. if (i(l) <= u || i(h) <= u) {
  6989. u = e.scale + (t.getScale ? t.getScale() : t.scale);
  6990. var f = a(l * l + h * h) - u;
  6991. if (f <= 0) {
  6992. if (t.ignoreCollision)
  6993. !t.trap || e.noTrap || t.owner == e || t.owner && t.owner.team && t.owner.team == e.team ? t.boostSpeed ? (e.xVel += n * t.boostSpeed * (t.weightM || 1) * r(t.dir),
  6994. e.yVel += n * t.boostSpeed * (t.weightM || 1) * s(t.dir)) : t.healCol ? e.healCol = t.healCol : t.teleport && (e.x = o.randInt(0, c.mapScale),
  6995. e.y = o.randInt(0, c.mapScale)) : (e.lockMove = !0,
  6996. t.hideFromEnemy = !1);
  6997. else {
  6998. var d = o.getDirection(e.x, e.y, t.x, t.y);
  6999. if (o.getDistance(e.x, e.y, t.x, t.y),
  7000. t.isPlayer ? (f = -1 * f / 2,
  7001. e.x += f * r(d),
  7002. e.y += f * s(d),
  7003. t.x -= f * r(d),
  7004. t.y -= f * s(d)) : (e.x = t.x + u * r(d),
  7005. e.y = t.y + u * s(d),
  7006. e.xVel *= .75,
  7007. e.yVel *= .75),
  7008. t.dmg && t.owner != e && (!t.owner || !t.owner.team || t.owner.team != e.team)) {
  7009. e.changeHealth(-t.dmg, t.owner, t);
  7010. var p = 1.5 * (t.weightM || 1);
  7011. e.xVel += p * r(d),
  7012. e.yVel += p * s(d),
  7013. !t.pDmg || e.skin && e.skin.poisonRes || (e.dmgOverTime.dmg = t.pDmg,
  7014. e.dmgOverTime.time = 5,
  7015. e.dmgOverTime.doer = t.owner),
  7016. e.colDmg && t.health && (t.changeHealth(-e.colDmg) && this.disableObj(t),
  7017. this.hitObj(t, o.getDirection(e.x, e.y, t.x, t.y)))
  7018. }
  7019. }
  7020. return t.zIndex > e.zIndex && (e.zIndex = t.zIndex),
  7021. !0
  7022. }
  7023. }
  7024. return !1
  7025. }
  7026. }
  7027. }
  7028. , function(e, t, n) {
  7029. var i = new (n(49));
  7030. i.addWords("jew", "black", "baby", "child", "white", "porn", "pedo", "trump", "clinton", "hitler", "nazi", "gay", "pride", "sex", "pleasure", "touch", "poo", "kids", "rape", "white power", "nigga", "nig nog", "doggy", "rapist", "boner", "nigger", "nigg", "finger", "nogger", "nagger", "nig", "fag", "gai", "pole", "stripper", "penis", "vagina", "pussy", "nazi", "hitler", "stalin", "burn", "chamber", "cock", "peen", "dick", "spick", "nieger", "die", "satan", "n|ig", "nlg", "cunt", "c0ck", "fag", "lick", "condom", "anal", "shit", "phile", "little", "kids", "free KR", "tiny", "sidney", "ass", "kill", ".io", "(dot)", "[dot]", "mini", "whiore", "whore", "faggot", "github", "1337", "666", "satan", "senpa", "discord", "d1scord", "mistik", ".io", "senpa.io", "sidney", "sid", "senpaio", "vries", "asa", "M2e-Me2ga-n2oo2bbNb2bbb");
  7031. var r = Math.abs
  7032. , s = Math.cos
  7033. , a = Math.sin
  7034. , o = Math.pow
  7035. , c = Math.sqrt;
  7036. e.exports = function(e, t, n, l, h, u, f, d, p, g, m, y, k, v) {
  7037. this.id = e,
  7038. this.modISrev_enir = 1,
  7039. this.sid = t,
  7040. this.tmpScore = 0,
  7041. this.team = null,
  7042. this.skinIndex = 0,
  7043. this.tailIndex = 0,
  7044. this.hitTime = 0,
  7045. this.tails = {};
  7046. for (var w = 0; w < m.length; ++w)
  7047. m[w].price <= 0 && (this.tails[m[w].id] = 1);
  7048. for (this.skins = {},
  7049. w = 0; w < g.length; ++w)
  7050. g[w].price <= 0 && (this.skins[g[w].id] = 1);
  7051. this.points = 0,
  7052. this.dt = 0,
  7053. this.hidden = !1,
  7054. this.itemCounts = {},
  7055. this.isPlayer = !0,
  7056. this.pps = 0,
  7057. this.moveDir = void 0,
  7058. this.skinRot = 0,
  7059. this.lastPing = 0,
  7060. this.iconIndex = 0,
  7061. this.skinColor = 0,
  7062. this.spawn = function(e) {
  7063. this.active = !0,
  7064. this.alive = !0,
  7065. this.lastDamage = 0,
  7066. this.lockMove = !1,
  7067. this.lockDir = !1,
  7068. this.minimapCounter = 0,
  7069. this.chatCountdown = 0,
  7070. this.shameCount = 0,
  7071. this.shameTimer = 0,
  7072. this.sentTo = {},
  7073. this.gathering = 0,
  7074. this.autoGather = 0,
  7075. this.animTime = 0,
  7076. this.animSpeed = 0,
  7077. this.mouseState = 0,
  7078. this.buildIndex = -1,
  7079. this.weaponIndex = 0,
  7080. this.dmgOverTime = {},
  7081. this.noMovTimer = 0,
  7082. this.maxXP = 300,
  7083. this.XP = 0,
  7084. this.age = 1,
  7085. this.kills = 0,
  7086. this.upgrAge = 2,
  7087. this.upgradePoints = 0,
  7088. this.x = 0,
  7089. this.y = 0,
  7090. this.zIndex = 0,
  7091. this.xVel = 0,
  7092. this.yVel = 0,
  7093. this.slowMult = 1,
  7094. this.dir = 0,
  7095. this.dirPlus = 0,
  7096. this.targetDir = 0,
  7097. this.targetAngle = 0,
  7098. this.maxHealth = 100,
  7099. this.health = this.maxHealth,
  7100. this.scale = n.playerScale,
  7101. this.speed = n.playerSpeed,
  7102. this.resetMoveDir(),
  7103. this.resetResources(e),
  7104. this.items = [0, 3, 6, 10],
  7105. this.weapons = [0],
  7106. this.shootCount = 0,
  7107. this.weaponXP = [],
  7108. this.reloads = {}
  7109. }
  7110. ,
  7111. this.resetMoveDir = function() {
  7112. this.moveDir = void 0
  7113. }
  7114. ,
  7115. this.resetResources = function(e) {
  7116. for (var t = 0; t < n.resourceTypes.length; ++t)
  7117. this[n.resourceTypes[t]] = e ? 100 : 0
  7118. }
  7119. ,
  7120. this.addItem = function(e) {
  7121. var t = p.list[e];
  7122. if (t) {
  7123. for (var n = 0; n < this.items.length; ++n)
  7124. if (p.list[this.items[n]].group == t.group)
  7125. return this.buildIndex == this.items[n] && (this.buildIndex = e),
  7126. this.items[n] = e,
  7127. !0;
  7128. return this.items.push(e),
  7129. !0
  7130. }
  7131. return !1
  7132. }
  7133. ,
  7134. this.setUserData = function(e) {
  7135. if (e) {
  7136. this.name = "unknown";
  7137. var t = e.name + ""
  7138. , r = !1
  7139. , s = (t = (t = (t = (t = t.slice(0, n.maxNameLength)).replace(/[^\w:\(\)\/? -]+/gim, " ")).replace(/[^\x00-\x7F]/g, " ")).trim()).toLowerCase().replace(/\s/g, "").replace(/1/g, "i").replace(/0/g, "o").replace(/5/g, "s");
  7140. for (var a of i.list)
  7141. if (-1 != s.indexOf(a)) {
  7142. r = !0;
  7143. break
  7144. }
  7145. t.length > 0 && !r && (this.name = t),
  7146. this.skinColor = 0,
  7147. n.skinColors[e.skin] && (this.skinColor = e.skin)
  7148. }
  7149. }
  7150. ,
  7151. this.getData = function() {
  7152. return [this.id, this.sid, this.name, l.fixTo(this.x, 2), l.fixTo(this.y, 2), l.fixTo(this.dir, 3), this.health, this.maxHealth, this.scale, this.skinColor]
  7153. }
  7154. ,
  7155. this.setData = function(e) {
  7156. this.id = e[0],
  7157. this.sid = e[1],
  7158. this.name = e[2],
  7159. this.x = e[3],
  7160. this.y = e[4],
  7161. this.dir = e[5],
  7162. this.health = e[6],
  7163. this.maxHealth = e[7],
  7164. this.scale = e[8],
  7165. this.skinColor = e[9]
  7166. }
  7167. ;
  7168. var b = 0;
  7169. this.update = function(e) {
  7170. if (this.alive) {
  7171. if (this.shameTimer > 0 && (this.shameTimer -= e,
  7172. this.shameTimer <= 0 && (this.shameTimer = 0,
  7173. this.shameCount = 0)),
  7174. (b -= e) <= 0) {
  7175. var t = (this.skin && this.skin.healthRegen ? this.skin.healthRegen : 0) + (this.tail && this.tail.healthRegen ? this.tail.healthRegen : 0);
  7176. t && this.changeHealth(t, this),
  7177. this.dmgOverTime.dmg && (this.changeHealth(-this.dmgOverTime.dmg, this.dmgOverTime.doer),
  7178. this.dmgOverTime.time -= 1,
  7179. this.dmgOverTime.time <= 0 && (this.dmgOverTime.dmg = 0)),
  7180. this.healCol && this.changeHealth(this.healCol, this),
  7181. b = 1e3
  7182. }
  7183. if (this.alive) {
  7184. if (this.slowMult < 1 && (this.slowMult += 8e-4 * e,
  7185. this.slowMult > 1 && (this.slowMult = 1)),
  7186. this.noMovTimer += e,
  7187. (this.xVel || this.yVel) && (this.noMovTimer = 0),
  7188. this.lockMove)
  7189. this.xVel = 0,
  7190. this.yVel = 0;
  7191. else {
  7192. var i = (this.buildIndex >= 0 ? .5 : 1) * (p.weapons[this.weaponIndex].spdMult || 1) * (this.skin && this.skin.spdMult || 1) * (this.tail && this.tail.spdMult || 1) * (this.y <= n.snowBiomeTop ? this.skin && this.skin.coldM ? 1 : n.snowSpeed : 1) * this.slowMult;
  7193. !this.zIndex && this.y >= n.mapScale / 2 - n.riverWidth / 2 && this.y <= n.mapScale / 2 + n.riverWidth / 2 && (this.skin && this.skin.watrImm ? (i *= .75,
  7194. this.xVel += .4 * n.waterCurrent * e) : (i *= .33,
  7195. this.xVel += n.waterCurrent * e));
  7196. var r = null != this.moveDir ? s(this.moveDir) : 0
  7197. , d = null != this.moveDir ? a(this.moveDir) : 0
  7198. , g = c(r * r + d * d);
  7199. 0 != g && (r /= g,
  7200. d /= g),
  7201. r && (this.xVel += r * this.speed * i * e),
  7202. d && (this.yVel += d * this.speed * i * e)
  7203. }
  7204. var m;
  7205. this.zIndex = 0,
  7206. this.lockMove = !1,
  7207. this.healCol = 0;
  7208. for (var y = l.getDistance(0, 0, this.xVel * e, this.yVel * e), k = Math.min(4, Math.max(1, Math.round(y / 40))), v = 1 / k, w = 0; w < k; ++w) {
  7209. this.xVel && (this.x += this.xVel * e * v),
  7210. this.yVel && (this.y += this.yVel * e * v),
  7211. m = u.getGridArrays(this.x, this.y, this.scale);
  7212. for (var x = 0; x < m.length; ++x)
  7213. for (var S = 0; S < m[x].length; ++S)
  7214. m[x][S].active && u.checkCollision(this, m[x][S], v)
  7215. }
  7216. for (w = (I = f.indexOf(this)) + 1; w < f.length; ++w)
  7217. f[w] != this && f[w].alive && u.checkCollision(this, f[w]);
  7218. if (this.xVel && (this.xVel *= o(n.playerDecel, e),
  7219. this.xVel <= .01 && this.xVel >= -.01 && (this.xVel = 0)),
  7220. this.yVel && (this.yVel *= o(n.playerDecel, e),
  7221. this.yVel <= .01 && this.yVel >= -.01 && (this.yVel = 0)),
  7222. this.x - this.scale < 0 ? this.x = this.scale : this.x + this.scale > n.mapScale && (this.x = n.mapScale - this.scale),
  7223. this.y - this.scale < 0 ? this.y = this.scale : this.y + this.scale > n.mapScale && (this.y = n.mapScale - this.scale),
  7224. this.buildIndex < 0)
  7225. if (this.reloads[this.weaponIndex] > 0)
  7226. this.reloads[this.weaponIndex] -= e,
  7227. this.gathering = this.mouseState;
  7228. else if (this.gathering || this.autoGather) {
  7229. var T = !0;
  7230. if (null != p.weapons[this.weaponIndex].gather)
  7231. this.gather(f);
  7232. else if (null != p.weapons[this.weaponIndex].projectile && this.hasRes(p.weapons[this.weaponIndex], this.skin ? this.skin.projCost : 0)) {
  7233. this.useRes(p.weapons[this.weaponIndex], this.skin ? this.skin.projCost : 0),
  7234. this.noMovTimer = 0;
  7235. var I = p.weapons[this.weaponIndex].projectile
  7236. , E = 2 * this.scale
  7237. , M = this.skin && this.skin.aMlt ? this.skin.aMlt : 1;
  7238. p.weapons[this.weaponIndex].rec && (this.xVel -= p.weapons[this.weaponIndex].rec * s(this.dir),
  7239. this.yVel -= p.weapons[this.weaponIndex].rec * a(this.dir)),
  7240. h.addProjectile(this.x + E * s(this.dir), this.y + E * a(this.dir), this.dir, p.projectiles[I].range * M, p.projectiles[I].speed * M, I, this, null, this.zIndex)
  7241. } else
  7242. T = !1;
  7243. this.gathering = this.mouseState,
  7244. T && (this.reloads[this.weaponIndex] = p.weapons[this.weaponIndex].speed * (this.skin && this.skin.atkSpd || 1))
  7245. }
  7246. }
  7247. }
  7248. }
  7249. ,
  7250. this.addWeaponXP = function(e) {
  7251. this.weaponXP[this.weaponIndex] || (this.weaponXP[this.weaponIndex] = 0),
  7252. this.weaponXP[this.weaponIndex] += e
  7253. }
  7254. ,
  7255. this.earnXP = function(e) {
  7256. this.age < n.maxAge && (this.XP += e,
  7257. this.XP >= this.maxXP ? (this.age < n.maxAge ? (this.age++,
  7258. this.XP = 0,
  7259. this.maxXP *= 1.2) : this.XP = this.maxXP,
  7260. this.upgradePoints++,
  7261. y.send(this.id, "16", this.upgradePoints, this.upgrAge),
  7262. y.send(this.id, "15", this.XP, l.fixTo(this.maxXP, 1), this.age)) : y.send(this.id, "15", this.XP))
  7263. }
  7264. ,
  7265. this.changeHealth = function(e, t) {
  7266. if (e > 0 && this.health >= this.maxHealth)
  7267. return !1;
  7268. e < 0 && this.skin && (e *= this.skin.dmgMult || 1),
  7269. e < 0 && this.tail && (e *= this.tail.dmgMult || 1),
  7270. e < 0 && (this.hitTime = Date.now()),
  7271. this.health += e,
  7272. this.health > this.maxHealth && (e -= this.health - this.maxHealth,
  7273. this.health = this.maxHealth),
  7274. this.health <= 0 && this.kill(t);
  7275. for (var n = 0; n < f.length; ++n)
  7276. this.sentTo[f[n].id] && y.send(f[n].id, "h", this.sid, Math.round(this.health));
  7277. return !t || !t.canSee(this) || t == this && e < 0 || y.send(t.id, "t", Math.round(this.x), Math.round(this.y), Math.round(-e), 1),
  7278. !0
  7279. }
  7280. ,
  7281. this.kill = function(e) {
  7282. e && e.alive && (e.kills++,
  7283. e.skin && e.skin.goldSteal ? k(e, Math.round(this.points / 2)) : k(e, Math.round(100 * this.age * (e.skin && e.skin.kScrM ? e.skin.kScrM : 1))),
  7284. y.send(e.id, "9", "kills", e.kills, 1)),
  7285. this.alive = !1,
  7286. y.send(this.id, "11"),
  7287. v()
  7288. }
  7289. ,
  7290. this.addResource = function(e, t, i) {
  7291. !i && t > 0 && this.addWeaponXP(t),
  7292. 3 == e ? k(this, t, !0) : (this[n.resourceTypes[e]] += t,
  7293. y.send(this.id, "9", n.resourceTypes[e], this[n.resourceTypes[e]], 1))
  7294. }
  7295. ,
  7296. this.changeItemCount = function(e, t) {
  7297. this.itemCounts[e] = this.itemCounts[e] || 0,
  7298. this.itemCounts[e] += t,
  7299. y.send(this.id, "14", e, this.itemCounts[e])
  7300. }
  7301. ,
  7302. this.buildItem = function(e) {
  7303. var t = this.scale + e.scale + (e.placeOffset || 0)
  7304. , n = this.x + t * s(this.dir)
  7305. , i = this.y + t * a(this.dir);
  7306. if (this.canBuild(e) && !(e.consume && this.skin && this.skin.noEat) && (e.consume || u.checkItemLocation(n, i, e.scale, .6, e.id, !1, this))) {
  7307. var r = !1;
  7308. if (e.consume) {
  7309. if (this.hitTime) {
  7310. var o = Date.now() - this.hitTime;
  7311. this.hitTime = 0,
  7312. o <= 120 ? (this.shameCount++,
  7313. this.shameCount >= 8 && (this.shameTimer = 3e4,
  7314. this.shameCount = 0)) : (this.shameCount -= 2,
  7315. this.shameCount <= 0 && (this.shameCount = 0))
  7316. }
  7317. this.shameTimer <= 0 && (r = e.consume(this))
  7318. } else
  7319. r = !0,
  7320. e.group.limit && this.changeItemCount(e.group.id, 1),
  7321. e.pps && (this.pps += e.pps),
  7322. u.add(u.objects.length, n, i, this.dir, e.scale, e.type, e, !1, this);
  7323. r && (this.useRes(e),
  7324. this.buildIndex = -1)
  7325. }
  7326. }
  7327. ,
  7328. this.hasRes = function(e, t) {
  7329. for (var n = 0; n < e.req.length; ) {
  7330. if (this[e.req[n]] < Math.round(e.req[n + 1] * (t || 1)))
  7331. return !1;
  7332. n += 2
  7333. }
  7334. return !0
  7335. }
  7336. ,
  7337. this.useRes = function(e, t) {
  7338. if (!n.inSandbox)
  7339. for (var i = 0; i < e.req.length; )
  7340. this.addResource(n.resourceTypes.indexOf(e.req[i]), -Math.round(e.req[i + 1] * (t || 1))),
  7341. i += 2
  7342. }
  7343. ,
  7344. this.canBuild = function(e) {
  7345. return !!n.inSandbox || !(e.group.limit && this.itemCounts[e.group.id] >= e.group.limit) && this.hasRes(e)
  7346. }
  7347. ,
  7348. this.gather = function() {
  7349. this.noMovTimer = 0,
  7350. this.slowMult -= p.weapons[this.weaponIndex].hitSlow || .3,
  7351. this.slowMult < 0 && (this.slowMult = 0);
  7352. for (var e, t, i, r = n.fetchVariant(this), o = r.poison, c = r.val, h = {}, g = u.getGridArrays(this.x, this.y, p.weapons[this.weaponIndex].range), m = 0; m < g.length; ++m)
  7353. for (var y = 0; y < g[m].length; ++y)
  7354. if ((t = g[m][y]).active && !t.dontGather && !h[t.sid] && t.visibleToPlayer(this) && l.getDistance(this.x, this.y, t.x, t.y) - t.scale <= p.weapons[this.weaponIndex].range && (e = l.getDirection(t.x, t.y, this.x, this.y),
  7355. l.getAngleDist(e, this.dir) <= n.gatherAngle)) {
  7356. if (h[t.sid] = 1,
  7357. t.health) {
  7358. if (t.changeHealth(-p.weapons[this.weaponIndex].dmg * c * (p.weapons[this.weaponIndex].sDmg || 1) * (this.skin && this.skin.bDmg ? this.skin.bDmg : 1), this)) {
  7359. for (var k = 0; k < t.req.length; )
  7360. this.addResource(n.resourceTypes.indexOf(t.req[k]), t.req[k + 1]),
  7361. k += 2;
  7362. u.disableObj(t)
  7363. }
  7364. } else {
  7365. this.earnXP(4 * p.weapons[this.weaponIndex].gather);
  7366. var v = p.weapons[this.weaponIndex].gather + (3 == t.type ? 4 : 0);
  7367. this.skin && this.skin.extraGold && this.addResource(3, 1),
  7368. this.addResource(t.type, v)
  7369. }
  7370. i = !0,
  7371. u.hitObj(t, e)
  7372. }
  7373. for (y = 0; y < f.length + d.length; ++y)
  7374. if ((t = f[y] || d[y - f.length]) != this && t.alive && (!t.team || t.team != this.team) && l.getDistance(this.x, this.y, t.x, t.y) - 1.8 * t.scale <= p.weapons[this.weaponIndex].range && (e = l.getDirection(t.x, t.y, this.x, this.y),
  7375. l.getAngleDist(e, this.dir) <= n.gatherAngle)) {
  7376. var w = p.weapons[this.weaponIndex].steal;
  7377. w && t.addResource && (w = Math.min(t.points || 0, w),
  7378. this.addResource(3, w),
  7379. t.addResource(3, -w));
  7380. var b = c;
  7381. null != t.weaponIndex && p.weapons[t.weaponIndex].shield && l.getAngleDist(e + Math.PI, t.dir) <= n.shieldAngle && (b = p.weapons[t.weaponIndex].shield);
  7382. var x = p.weapons[this.weaponIndex].dmg * (this.skin && this.skin.dmgMultO ? this.skin.dmgMultO : 1) * (this.tail && this.tail.dmgMultO ? this.tail.dmgMultO : 1)
  7383. , S = .3 * (t.weightM || 1) + (p.weapons[this.weaponIndex].knock || 0);
  7384. t.xVel += S * s(e),
  7385. t.yVel += S * a(e),
  7386. this.skin && this.skin.healD && this.changeHealth(x * b * this.skin.healD, this),
  7387. this.tail && this.tail.healD && this.changeHealth(x * b * this.tail.healD, this),
  7388. t.skin && t.skin.dmg && 1 == b && this.changeHealth(-x * t.skin.dmg, t),
  7389. t.tail && t.tail.dmg && 1 == b && this.changeHealth(-x * t.tail.dmg, t),
  7390. !(t.dmgOverTime && this.skin && this.skin.poisonDmg) || t.skin && t.skin.poisonRes || (t.dmgOverTime.dmg = this.skin.poisonDmg,
  7391. t.dmgOverTime.time = this.skin.poisonTime || 1,
  7392. t.dmgOverTime.doer = this),
  7393. !t.dmgOverTime || !o || t.skin && t.skin.poisonRes || (t.dmgOverTime.dmg = 5,
  7394. t.dmgOverTime.time = 5,
  7395. t.dmgOverTime.doer = this),
  7396. t.skin && t.skin.dmgK && (this.xVel -= t.skin.dmgK * s(e),
  7397. this.yVel -= t.skin.dmgK * a(e)),
  7398. t.changeHealth(-x * b, this, this)
  7399. }
  7400. this.sendAnimation(i ? 1 : 0)
  7401. }
  7402. ,
  7403. this.sendAnimation = function(e) {
  7404. for (var t = 0; t < f.length; ++t)
  7405. this.sentTo[f[t].id] && this.canSee(f[t]) && y.send(f[t].id, "7", this.sid, e ? 1 : 0, this.weaponIndex)
  7406. }
  7407. ;
  7408. var x = 0
  7409. , S = 0;
  7410. this.animate = function(e) {
  7411. this.animTime > 0 && (this.animTime -= e,
  7412. this.animTime <= 0 ? (this.animTime = 0,
  7413. this.dirPlus = 0,
  7414. x = 0,
  7415. S = 0) : 0 == S ? (x += e / (this.animSpeed * n.hitReturnRatio),
  7416. this.dirPlus = l.lerp(0, this.targetAngle, Math.min(1, x)),
  7417. x >= 1 && (x = 1,
  7418. S = 1)) : (x -= e / (this.animSpeed * (1 - n.hitReturnRatio)),
  7419. this.dirPlus = l.lerp(0, this.targetAngle, Math.max(0, x))))
  7420. }
  7421. ,
  7422. this.startAnim = function(e, t) {
  7423. this.animTime = this.animSpeed = p.weapons[t].speed,
  7424. this.targetAngle = e ? -n.hitAngle : -Math.PI,
  7425. x = 0,
  7426. S = 0
  7427. }
  7428. ,
  7429. this.canSee = function(e) {
  7430. if (!e)
  7431. return !1;
  7432. if (e.skin && e.skin.invisTimer && e.noMovTimer >= e.skin.invisTimer)
  7433. return !1;
  7434. var t = r(e.x - this.x) - e.scale
  7435. , i = r(e.y - this.y) - e.scale;
  7436. return t <= n.maxScreenWidth / 2 * 1.3 && i <= n.maxScreenHeight / 2 * 1.3
  7437. }
  7438. }
  7439. }
  7440. , function(e, t, n) {
  7441. const i = n(50).words
  7442. , r = n(51).array;
  7443. e.exports = class {
  7444. constructor(e={}) {
  7445. Object.assign(this, {
  7446. list: e.emptyList && [] || Array.prototype.concat.apply(i, [r, e.list || []]),
  7447. exclude: e.exclude || [],
  7448. placeHolder: e.placeHolder || "*",
  7449. regex: e.regex || /[^a-zA-Z0-9|\$|\@]|\^/g,
  7450. replaceRegex: e.replaceRegex || /\w/g
  7451. })
  7452. }
  7453. isProfane(e) {
  7454. return this.list.filter(t=>{
  7455. const n = new RegExp(`\\b${t.replace(/(\W)/g, "\\$1")}\\b`,"gi");
  7456. return !this.exclude.includes(t.toLowerCase()) && n.test(e)
  7457. }
  7458. ).length > 0 || !1
  7459. }
  7460. replaceWord(e) {
  7461. return e.replace(this.regex, "").replace(this.replaceRegex, this.placeHolder)
  7462. }
  7463. clean(e) {
  7464. return e.split(/\b/).map(e=>this.isProfane(e) ? this.replaceWord(e) : e).join("")
  7465. }
  7466. addWords() {
  7467. let e = Array.from(arguments);
  7468. this.list.push(...e),
  7469. e.map(e=>e.toLowerCase()).forEach(e=>{
  7470. this.exclude.includes(e) && this.exclude.splice(this.exclude.indexOf(e), 1)
  7471. }
  7472. )
  7473. }
  7474. removeWords() {
  7475. this.exclude.push(...Array.from(arguments).map(e=>e.toLowerCase()))
  7476. }
  7477. }
  7478. }
  7479. , function(e) {
  7480. e.exports = {
  7481. words: ["ahole", "anus", "ash0le", "ash0les", "asholes", "ass", "Ass Monkey", "Assface", "assh0le", "assh0lez", "asshole", "assholes", "assholz", "asswipe", "azzhole", "bassterds", "bastard", "bastards", "bastardz", "basterds", "basterdz", "Biatch", "bitch", "bitches", "Blow Job", "boffing", "butthole", "buttwipe", "c0ck", "c0cks", "c0k", "Carpet Muncher", "cawk", "cawks", "Clit", "cnts", "cntz", "cock", "cockhead", "cock-head", "cocks", "CockSucker", "cock-sucker", "crap", "cum", "cunt", "cunts", "cuntz", "dick", "dild0", "dild0s", "dildo", "dildos", "dilld0", "dilld0s", "dominatricks", "dominatrics", "dominatrix", "dyke", "enema", "f u c k", "f u c k e r", "fag", "fag1t", "faget", "fagg1t", "faggit", "faggot", "fagg0t", "fagit", "fags", "fagz", "faig", "faigs", "fart", "flipping the bird", "####", "####er", "####in", "####ing", "####s", "Fudge Packer", "fuk", "Fukah", "Fuken", "fuker", "Fukin", "Fukk", "Fukkah", "Fukken", "Fukker", "Fukkin", "g00k", "God-damned", "h00r", "h0ar", "h0re", "hells", "hoar", "hoor", "hoore", "jackoff", "jap", "japs", "jerk-off", "jisim", "jiss", "jizm", "jizz", "knob", "knobs", "knobz", "kunt", "kunts", "kuntz", "Lezzian", "Lipshits", "Lipshitz", "masochist", "masokist", "massterbait", "masstrbait", "masstrbate", "masterbaiter", "masterbate", "masterbates", "Motha ####er", "Motha Fuker", "Motha Fukkah", "Motha Fukker", "Mother ####er", "Mother Fukah", "Mother Fuker", "Mother Fukkah", "Mother Fukker", "mother-####er", "Mutha ####er", "Mutha Fukah", "Mutha Fuker", "Mutha Fukkah", "Mutha Fukker", "n1gr", "nastt", "nigger;", "nigur;", "niiger;", "niigr;", "orafis", "orgasim;", "orgasm", "orgasum", "oriface", "orifice", "orifiss", "packi", "packie", "packy", "paki", "pakie", "paky", "pecker", "peeenus", "peeenusss", "peenus", "peinus", "pen1s", "penas", "penis", "penis-breath", "penus", "penuus", "Phuc", "Phuck", "Phuk", "Phuker", "Phukker", "polac", "polack", "polak", "Poonani", "pr1c", "pr1ck", "pr1k", "pusse", "pussee", "pussy", "puuke", "puuker", "queer", "queers", "queerz", "qweers", "qweerz", "qweir", "recktum", "rectum", "retard", "sadist", "scank", "schlong", "screwing", "semen", "sex", "sexy", "Sh!t", "sh1t", "sh1ter", "sh1ts", "sh1tter", "sh1tz", "shit", "shits", "shitter", "Shitty", "Shity", "shitz", "Shyt", "Shyte", "Shytty", "Shyty", "skanck", "skank", "skankee", "skankey", "skanks", "Skanky", "slag", "slut", "sluts", "Slutty", "slutz", "son-of-a-bitch", "tit", "turd", "va1jina", "vag1na", "vagiina", "vagina", "vaj1na", "vajina", "vullva", "vulva", "w0p", "wh00r", "wh0re", "whore", "xrated", "xxx", "b!+ch", "bitch", "blowjob", "clit", "arschloch", "####", "shit", "ass", "asshole", "b!tch", "b17ch", "b1tch", "bastard", "bi+ch", "boiolas", "buceta", "c0ck", "cawk", "chink", "cipa", "clits", "cock", "cum", "cunt", "dildo", "dirsa", "ejakulate", "fatass", "fcuk", "fuk", "fux0r", "hoer", "hore", "jism", "kawk", "l3itch", "l3i+ch", "lesbian", "masturbate", "masterbat*", "masterbat3", "mother####er", "s.o.b.", "mofo", "nazi", "nigga", "nigger", "nutsack", "phuck", "pimpis", "pusse", "pussy", "scrotum", "sh!t", "shemale", "shi+", "sh!+", "slut", "smut", "teets", "tits", "boobs", "b00bs", "teez", "testical", "testicle", "titt", "w00se", "jackoff", "wank", "whoar", "whore", "*damn", "*dyke", "*####*", "*shit*", "@$$", "amcik", "andskota", "arse*", "assrammer", "ayir", "bi7ch", "bitch*", "bollock*", "breasts", "butt-pirate", "cabron", "cazzo", "chraa", "chuj", "Cock*", "cunt*", "d4mn", "daygo", "dego", "dick*", "dike*", "dupa", "dziwka", "ejackulate", "Ekrem*", "Ekto", "enculer", "faen", "fag*", "fanculo", "fanny", "feces", "feg", "Felcher", "ficken", "fitt*", "Flikker", "foreskin", "Fotze", "Fu(*", "fuk*", "futkretzn", "gook", "guiena", "h0r", "h4x0r", "hell", "helvete", "hoer*", "honkey", "Huevon", "hui", "injun", "jizz", "kanker*", "kike", "klootzak", "kraut", "knulle", "kuk", "kuksuger", "Kurac", "kurwa", "kusi*", "kyrpa*", "lesbo", "mamhoon", "masturbat*", "merd*", "mibun", "monkleigh", "mouliewop", "muie", "mulkku", "muschi", "nazis", "nepesaurio", "nigger*", "orospu", "paska*", "perse", "picka", "pierdol*", "pillu*", "pimmel", "piss*", "pizda", "poontsee", "poop", "porn", "p0rn", "pr0n", "preteen", "pula", "pule", "puta", "puto", "qahbeh", "queef*", "rautenberg", "schaffer", "scheiss*", "schlampe", "schmuck", "screw", "sh!t*", "sharmuta", "sharmute", "shipal", "shiz", "skribz", "skurwysyn", "sphencter", "spic", "spierdalaj", "splooge", "suka", "b00b*", "testicle*", "titt*", "twat", "vittu", "wank*", "wetback*", "wichser", "wop*", "yed", "zabourah"]
  7482. }
  7483. }
  7484. , function(e, t, n) {
  7485. e.exports = {
  7486. object: n(52),
  7487. array: n(53),
  7488. regex: n(54)
  7489. }
  7490. }
  7491. , function(e, t) {
  7492. e.exports = {
  7493. "4r5e": 1,
  7494. "5h1t": 1,
  7495. "5hit": 1,
  7496. a55: 1,
  7497. anal: 1,
  7498. anus: 1,
  7499. ar5e: 1,
  7500. arrse: 1,
  7501. arse: 1,
  7502. ass: 1,
  7503. "ass-####er": 1,
  7504. asses: 1,
  7505. ass####er: 1,
  7506. assfukka: 1,
  7507. asshole: 1,
  7508. assholes: 1,
  7509. asswhole: 1,
  7510. a_s_s: 1,
  7511. "b!tch": 1,
  7512. b00bs: 1,
  7513. b17ch: 1,
  7514. b1tch: 1,
  7515. ballbag: 1,
  7516. balls: 1,
  7517. ballsack: 1,
  7518. bastard: 1,
  7519. beastial: 1,
  7520. beastiality: 1,
  7521. bellend: 1,
  7522. bestial: 1,
  7523. bestiality: 1,
  7524. "bi+ch": 1,
  7525. biatch: 1,
  7526. bitch: 1,
  7527. bitcher: 1,
  7528. bitchers: 1,
  7529. bitches: 1,
  7530. bitchin: 1,
  7531. bitching: 1,
  7532. bloody: 1,
  7533. "blow job": 1,
  7534. blowjob: 1,
  7535. blowjobs: 1,
  7536. boiolas: 1,
  7537. bollock: 1,
  7538. bollok: 1,
  7539. boner: 1,
  7540. boob: 1,
  7541. boobs: 1,
  7542. booobs: 1,
  7543. boooobs: 1,
  7544. booooobs: 1,
  7545. booooooobs: 1,
  7546. breasts: 1,
  7547. buceta: 1,
  7548. bugger: 1,
  7549. bum: 1,
  7550. "bunny ####er": 1,
  7551. butt: 1,
  7552. butthole: 1,
  7553. buttmuch: 1,
  7554. buttplug: 1,
  7555. c0ck: 1,
  7556. c0cksucker: 1,
  7557. "carpet muncher": 1,
  7558. cawk: 1,
  7559. chink: 1,
  7560. cipa: 1,
  7561. cl1t: 1,
  7562. clit: 1,
  7563. clitoris: 1,
  7564. clits: 1,
  7565. cnut: 1,
  7566. cock: 1,
  7567. "cock-sucker": 1,
  7568. cockface: 1,
  7569. cockhead: 1,
  7570. cockmunch: 1,
  7571. cockmuncher: 1,
  7572. cocks: 1,
  7573. cocksuck: 1,
  7574. cocksucked: 1,
  7575. cocksucker: 1,
  7576. cocksucking: 1,
  7577. cocksucks: 1,
  7578. cocksuka: 1,
  7579. cocksukka: 1,
  7580. cok: 1,
  7581. cokmuncher: 1,
  7582. coksucka: 1,
  7583. coon: 1,
  7584. cox: 1,
  7585. crap: 1,
  7586. cum: 1,
  7587. cummer: 1,
  7588. cumming: 1,
  7589. cums: 1,
  7590. cumshot: 1,
  7591. cunilingus: 1,
  7592. cunillingus: 1,
  7593. cunnilingus: 1,
  7594. cunt: 1,
  7595. cuntlick: 1,
  7596. cuntlicker: 1,
  7597. cuntlicking: 1,
  7598. cunts: 1,
  7599. cyalis: 1,
  7600. cyberfuc: 1,
  7601. cyber####: 1,
  7602. cyber####ed: 1,
  7603. cyber####er: 1,
  7604. cyber####ers: 1,
  7605. cyber####ing: 1,
  7606. d1ck: 1,
  7607. damn: 1,
  7608. dick: 1,
  7609. dickhead: 1,
  7610. dildo: 1,
  7611. dildos: 1,
  7612. dink: 1,
  7613. dinks: 1,
  7614. dirsa: 1,
  7615. dlck: 1,
  7616. "dog-####er": 1,
  7617. doggin: 1,
  7618. dogging: 1,
  7619. donkeyribber: 1,
  7620. doosh: 1,
  7621. duche: 1,
  7622. dyke: 1,
  7623. ejaculate: 1,
  7624. ejaculated: 1,
  7625. ejaculates: 1,
  7626. ejaculating: 1,
  7627. ejaculatings: 1,
  7628. ejaculation: 1,
  7629. ejakulate: 1,
  7630. "f u c k": 1,
  7631. "f u c k e r": 1,
  7632. f4nny: 1,
  7633. fag: 1,
  7634. fagging: 1,
  7635. faggitt: 1,
  7636. faggot: 1,
  7637. faggs: 1,
  7638. fagot: 1,
  7639. fagots: 1,
  7640. fags: 1,
  7641. fanny: 1,
  7642. fannyflaps: 1,
  7643. fanny####er: 1,
  7644. fanyy: 1,
  7645. fatass: 1,
  7646. fcuk: 1,
  7647. fcuker: 1,
  7648. fcuking: 1,
  7649. feck: 1,
  7650. fecker: 1,
  7651. felching: 1,
  7652. fellate: 1,
  7653. fellatio: 1,
  7654. finger####: 1,
  7655. finger####ed: 1,
  7656. finger####er: 1,
  7657. finger####ers: 1,
  7658. finger####ing: 1,
  7659. finger####s: 1,
  7660. fist####: 1,
  7661. fist####ed: 1,
  7662. fist####er: 1,
  7663. fist####ers: 1,
  7664. fist####ing: 1,
  7665. fist####ings: 1,
  7666. fist####s: 1,
  7667. flange: 1,
  7668. fook: 1,
  7669. fooker: 1,
  7670. ####: 1,
  7671. ####a: 1,
  7672. ####ed: 1,
  7673. ####er: 1,
  7674. ####ers: 1,
  7675. ####head: 1,
  7676. ####heads: 1,
  7677. ####in: 1,
  7678. ####ing: 1,
  7679. ####ings: 1,
  7680. ####ingshitmother####er: 1,
  7681. ####me: 1,
  7682. ####s: 1,
  7683. ####whit: 1,
  7684. ####wit: 1,
  7685. "fudge packer": 1,
  7686. fudgepacker: 1,
  7687. fuk: 1,
  7688. fuker: 1,
  7689. fukker: 1,
  7690. fukkin: 1,
  7691. fuks: 1,
  7692. fukwhit: 1,
  7693. fukwit: 1,
  7694. fux: 1,
  7695. fux0r: 1,
  7696. f_u_c_k: 1,
  7697. gangbang: 1,
  7698. gangbanged: 1,
  7699. gangbangs: 1,
  7700. gaylord: 1,
  7701. gaysex: 1,
  7702. goatse: 1,
  7703. God: 1,
  7704. "god-dam": 1,
  7705. "god-damned": 1,
  7706. goddamn: 1,
  7707. goddamned: 1,
  7708. hardcoresex: 1,
  7709. hell: 1,
  7710. heshe: 1,
  7711. hoar: 1,
  7712. hoare: 1,
  7713. hoer: 1,
  7714. homo: 1,
  7715. hore: 1,
  7716. horniest: 1,
  7717. horny: 1,
  7718. hotsex: 1,
  7719. "jack-off": 1,
  7720. jackoff: 1,
  7721. jap: 1,
  7722. "jerk-off": 1,
  7723. jism: 1,
  7724. jiz: 1,
  7725. jizm: 1,
  7726. jizz: 1,
  7727. kawk: 1,
  7728. knob: 1,
  7729. knobead: 1,
  7730. knobed: 1,
  7731. knobend: 1,
  7732. knobhead: 1,
  7733. knobjocky: 1,
  7734. knobjokey: 1,
  7735. kock: 1,
  7736. kondum: 1,
  7737. kondums: 1,
  7738. kum: 1,
  7739. kummer: 1,
  7740. kumming: 1,
  7741. kums: 1,
  7742. kunilingus: 1,
  7743. "l3i+ch": 1,
  7744. l3itch: 1,
  7745. labia: 1,
  7746. lust: 1,
  7747. lusting: 1,
  7748. m0f0: 1,
  7749. m0fo: 1,
  7750. m45terbate: 1,
  7751. ma5terb8: 1,
  7752. ma5terbate: 1,
  7753. masochist: 1,
  7754. "master-bate": 1,
  7755. masterb8: 1,
  7756. "masterbat*": 1,
  7757. masterbat3: 1,
  7758. masterbate: 1,
  7759. masterbation: 1,
  7760. masterbations: 1,
  7761. masturbate: 1,
  7762. "mo-fo": 1,
  7763. mof0: 1,
  7764. mofo: 1,
  7765. motha####: 1,
  7766. motha####a: 1,
  7767. motha####as: 1,
  7768. motha####az: 1,
  7769. motha####ed: 1,
  7770. motha####er: 1,
  7771. motha####ers: 1,
  7772. motha####in: 1,
  7773. motha####ing: 1,
  7774. motha####ings: 1,
  7775. motha####s: 1,
  7776. "mother ####er": 1,
  7777. mother####: 1,
  7778. mother####ed: 1,
  7779. mother####er: 1,
  7780. mother####ers: 1,
  7781. mother####in: 1,
  7782. mother####ing: 1,
  7783. mother####ings: 1,
  7784. mother####ka: 1,
  7785. mother####s: 1,
  7786. muff: 1,
  7787. mutha: 1,
  7788. muthafecker: 1,
  7789. mutha####ker: 1,
  7790. muther: 1,
  7791. muther####er: 1,
  7792. n1gga: 1,
  7793. n1gger: 1,
  7794. nazi: 1,
  7795. nigg3r: 1,
  7796. nigg4h: 1,
  7797. nigga: 1,
  7798. niggah: 1,
  7799. niggas: 1,
  7800. niggaz: 1,
  7801. nigger: 1,
  7802. niggers: 1,
  7803. nob: 1,
  7804. "nob jokey": 1,
  7805. nobhead: 1,
  7806. nobjocky: 1,
  7807. nobjokey: 1,
  7808. numbnuts: 1,
  7809. nutsack: 1,
  7810. orgasim: 1,
  7811. orgasims: 1,
  7812. orgasm: 1,
  7813. orgasms: 1,
  7814. p0rn: 1,
  7815. pawn: 1,
  7816. pecker: 1,
  7817. penis: 1,
  7818. penis####er: 1,
  7819. phonesex: 1,
  7820. phuck: 1,
  7821. phuk: 1,
  7822. phuked: 1,
  7823. phuking: 1,
  7824. phukked: 1,
  7825. phukking: 1,
  7826. phuks: 1,
  7827. phuq: 1,
  7828. pig####er: 1,
  7829. pimpis: 1,
  7830. piss: 1,
  7831. pissed: 1,
  7832. pisser: 1,
  7833. pissers: 1,
  7834. pisses: 1,
  7835. pissflaps: 1,
  7836. pissin: 1,
  7837. pissing: 1,
  7838. pissoff: 1,
  7839. poop: 1,
  7840. porn: 1,
  7841. porno: 1,
  7842. pornography: 1,
  7843. pornos: 1,
  7844. prick: 1,
  7845. pricks: 1,
  7846. pron: 1,
  7847. pube: 1,
  7848. pusse: 1,
  7849. pussi: 1,
  7850. pussies: 1,
  7851. pussy: 1,
  7852. pussys: 1,
  7853. rectum: 1,
  7854. retard: 1,
  7855. rimjaw: 1,
  7856. rimming: 1,
  7857. "s hit": 1,
  7858. "s.o.b.": 1,
  7859. sadist: 1,
  7860. schlong: 1,
  7861. screwing: 1,
  7862. scroat: 1,
  7863. scrote: 1,
  7864. scrotum: 1,
  7865. semen: 1,
  7866. sex: 1,
  7867. "sh!+": 1,
  7868. "sh!t": 1,
  7869. sh1t: 1,
  7870. shag: 1,
  7871. shagger: 1,
  7872. shaggin: 1,
  7873. shagging: 1,
  7874. shemale: 1,
  7875. "shi+": 1,
  7876. shit: 1,
  7877. shitdick: 1,
  7878. shite: 1,
  7879. shited: 1,
  7880. shitey: 1,
  7881. shit####: 1,
  7882. shitfull: 1,
  7883. shithead: 1,
  7884. shiting: 1,
  7885. shitings: 1,
  7886. shits: 1,
  7887. shitted: 1,
  7888. shitter: 1,
  7889. shitters: 1,
  7890. shitting: 1,
  7891. shittings: 1,
  7892. shitty: 1,
  7893. skank: 1,
  7894. slut: 1,
  7895. sluts: 1,
  7896. smegma: 1,
  7897. smut: 1,
  7898. snatch: 1,
  7899. "son-of-a-bitch": 1,
  7900. spac: 1,
  7901. spunk: 1,
  7902. s_h_i_t: 1,
  7903. t1tt1e5: 1,
  7904. t1tties: 1,
  7905. teets: 1,
  7906. teez: 1,
  7907. testical: 1,
  7908. testicle: 1,
  7909. tit: 1,
  7910. tit####: 1,
  7911. tits: 1,
  7912. titt: 1,
  7913. tittie5: 1,
  7914. tittie####er: 1,
  7915. titties: 1,
  7916. titty####: 1,
  7917. tittywank: 1,
  7918. titwank: 1,
  7919. tosser: 1,
  7920. turd: 1,
  7921. tw4t: 1,
  7922. twat: 1,
  7923. twathead: 1,
  7924. twatty: 1,
  7925. twunt: 1,
  7926. twunter: 1,
  7927. v14gra: 1,
  7928. v1gra: 1,
  7929. vagina: 1,
  7930. viagra: 1,
  7931. vulva: 1,
  7932. w00se: 1,
  7933. wang: 1,
  7934. wank: 1,
  7935. wanker: 1,
  7936. wanky: 1,
  7937. whoar: 1,
  7938. whore: 1,
  7939. willies: 1,
  7940. willy: 1,
  7941. xrated: 1,
  7942. xxx: 1
  7943. }
  7944. }
  7945. , function(e, t) {
  7946. e.exports = ["4r5e", "5h1t", "5hit", "a55", "anal", "anus", "ar5e", "arrse", "arse", "ass", "ass-####er", "asses", "ass####er", "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 ####er", "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", "cyber####", "cyber####ed", "cyber####er", "cyber####ers", "cyber####ing", "d1ck", "damn", "dick", "dickhead", "dildo", "dildos", "dink", "dinks", "dirsa", "dlck", "dog-####er", "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", "fanny####er", "fanyy", "fatass", "fcuk", "fcuker", "fcuking", "feck", "fecker", "felching", "fellate", "fellatio", "finger####", "finger####ed", "finger####er", "finger####ers", "finger####ing", "finger####s", "fist####", "fist####ed", "fist####er", "fist####ers", "fist####ing", "fist####ings", "fist####s", "flange", "fook", "fooker", "####", "####a", "####ed", "####er", "####ers", "####head", "####heads", "####in", "####ing", "####ings", "####ingshitmother####er", "####me", "####s", "####whit", "####wit", "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", "motha####", "motha####a", "motha####as", "motha####az", "motha####ed", "motha####er", "motha####ers", "motha####in", "motha####ing", "motha####ings", "motha####s", "mother ####er", "mother####", "mother####ed", "mother####er", "mother####ers", "mother####in", "mother####ing", "mother####ings", "mother####ka", "mother####s", "muff", "mutha", "muthafecker", "mutha####ker", "muther", "muther####er", "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", "penis####er", "phonesex", "phuck", "phuk", "phuked", "phuking", "phukked", "phukking", "phuks", "phuq", "pig####er", "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", "shit####", "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", "tit####", "tits", "titt", "tittie5", "tittie####er", "titties", "titty####", "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"]
  7947. }
  7948. , function(e, t) {
  7949. e.exports = /\b(4r5e|5h1t|5hit|a55|anal|anus|ar5e|arrse|arse|ass|ass-####er|asses|ass####er|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 ####er|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|cyber####|cyber####ed|cyber####er|cyber####ers|cyber####ing|d1ck|damn|dick|dickhead|dildo|dildos|dink|dinks|dirsa|dlck|dog-####er|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|fanny####er|fanyy|fatass|fcuk|fcuker|fcuking|feck|fecker|felching|fellate|fellatio|finger####|finger####ed|finger####er|finger####ers|finger####ing|finger####s|fist####|fist####ed|fist####er|fist####ers|fist####ing|fist####ings|fist####s|flange|fook|fooker|####|####a|####ed|####er|####ers|####head|####heads|####in|####ing|####ings|####ingshitmother####er|####me|####s|####whit|####wit|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|motha####|motha####a|motha####as|motha####az|motha####ed|motha####er|motha####ers|motha####in|motha####ing|motha####ings|motha####s|mother ####er|mother####|mother####ed|mother####er|mother####ers|mother####in|mother####ing|mother####ings|mother####ka|mother####s|muff|mutha|muthafecker|mutha####ker|muther|muther####er|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|penis####er|phonesex|phuck|phuk|phuked|phuking|phukked|phukking|phuks|phuq|pig####er|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|shit####|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|tit####|tits|titt|tittie5|tittie####er|titties|titty####|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
  7950. }
  7951. , function(e, t) {
  7952. e.exports.hats = [{
  7953. id: 45,
  7954. name: "Shame!",
  7955. dontSell: !0,
  7956. price: 0,
  7957. scale: 120,
  7958. desc: "hacks are for losers"
  7959. }, {
  7960. id: 51,
  7961. name: "Moo Cap",
  7962. price: 0,
  7963. scale: 120,
  7964. desc: "coolest mooer around"
  7965. }, {
  7966. id: 50,
  7967. name: "Apple Cap",
  7968. price: 0,
  7969. scale: 120,
  7970. desc: "apple farms remembers"
  7971. }, {
  7972. id: 28,
  7973. name: "Moo Head",
  7974. price: 0,
  7975. scale: 120,
  7976. desc: "no effect"
  7977. }, {
  7978. id: 29,
  7979. name: "Pig Head",
  7980. price: 0,
  7981. scale: 120,
  7982. desc: "no effect"
  7983. }, {
  7984. id: 30,
  7985. name: "Fluff Head",
  7986. price: 0,
  7987. scale: 120,
  7988. desc: "no effect"
  7989. }, {
  7990. id: 36,
  7991. name: "Pandou Head",
  7992. price: 0,
  7993. scale: 120,
  7994. desc: "no effect"
  7995. }, {
  7996. id: 37,
  7997. name: "Bear Head",
  7998. price: 0,
  7999. scale: 120,
  8000. desc: "no effect"
  8001. }, {
  8002. id: 38,
  8003. name: "Monkey Head",
  8004. price: 0,
  8005. scale: 120,
  8006. desc: "no effect"
  8007. }, {
  8008. id: 44,
  8009. name: "Polar Head",
  8010. price: 0,
  8011. scale: 120,
  8012. desc: "no effect"
  8013. }, {
  8014. id: 35,
  8015. name: "Fez Hat",
  8016. price: 0,
  8017. scale: 120,
  8018. desc: "no effect"
  8019. }, {
  8020. id: 42,
  8021. name: "Enigma Hat",
  8022. price: 0,
  8023. scale: 120,
  8024. desc: "join the enigma army"
  8025. }, {
  8026. id: 43,
  8027. name: "Blitz Hat",
  8028. price: 0,
  8029. scale: 120,
  8030. desc: "hey everybody i'm blitz"
  8031. }, {
  8032. id: 49,
  8033. name: "Bob XIII Hat",
  8034. price: 0,
  8035. scale: 120,
  8036. desc: "like and subscribe"
  8037. }, {
  8038. id: 57,
  8039. name: "Pumpkin",
  8040. price: 50,
  8041. scale: 120,
  8042. desc: "Spooooky"
  8043. }, {
  8044. id: 8,
  8045. name: "Bummle Hat",
  8046. price: 100,
  8047. scale: 120,
  8048. desc: "no effect"
  8049. }, {
  8050. id: 2,
  8051. name: "Straw Hat",
  8052. price: 500,
  8053. scale: 120,
  8054. desc: "no effect"
  8055. }, {
  8056. id: 15,
  8057. name: "Winter Cap",
  8058. price: 600,
  8059. scale: 120,
  8060. desc: "allows you to move at normal speed in snow",
  8061. coldM: 1
  8062. }, {
  8063. id: 5,
  8064. name: "Cowboy Hat",
  8065. price: 1e3,
  8066. scale: 120,
  8067. desc: "no effect"
  8068. }, {
  8069. id: 4,
  8070. name: "Ranger Hat",
  8071. price: 2e3,
  8072. scale: 120,
  8073. desc: "no effect"
  8074. }, {
  8075. id: 18,
  8076. name: "Explorer Hat",
  8077. price: 2e3,
  8078. scale: 120,
  8079. desc: "no effect"
  8080. }, {
  8081. id: 31,
  8082. name: "Flipper Hat",
  8083. price: 2500,
  8084. scale: 120,
  8085. desc: "have more control while in water",
  8086. watrImm: !0
  8087. }, {
  8088. id: 1,
  8089. name: "Marksman Cap",
  8090. price: 3e3,
  8091. scale: 120,
  8092. desc: "increases arrow speed and range",
  8093. aMlt: 1.3
  8094. }, {
  8095. id: 10,
  8096. name: "Bush Gear",
  8097. price: 3e3,
  8098. scale: 160,
  8099. desc: "allows you to disguise yourself as a bush"
  8100. }, {
  8101. id: 48,
  8102. name: "Halo",
  8103. price: 3e3,
  8104. scale: 120,
  8105. desc: "no effect"
  8106. }, {
  8107. id: 6,
  8108. name: "Soldier Helmet",
  8109. price: 4e3,
  8110. scale: 120,
  8111. desc: "reduces damage taken but slows movement",
  8112. spdMult: .94,
  8113. dmgMult: .75
  8114. }, {
  8115. id: 23,
  8116. name: "Anti Venom Gear",
  8117. price: 4e3,
  8118. scale: 120,
  8119. desc: "makes you immune to poison",
  8120. poisonRes: 1
  8121. }, {
  8122. id: 13,
  8123. name: "Medic Gear",
  8124. price: 5e3,
  8125. scale: 110,
  8126. desc: "slowly regenerates health over time",
  8127. healthRegen: 3
  8128. }, {
  8129. id: 9,
  8130. name: "Miners Helmet",
  8131. price: 5e3,
  8132. scale: 120,
  8133. desc: "earn 1 extra gold per resource",
  8134. extraGold: 1
  8135. }, {
  8136. id: 32,
  8137. name: "Musketeer Hat",
  8138. price: 5e3,
  8139. scale: 120,
  8140. desc: "reduces cost of projectiles",
  8141. projCost: .5
  8142. }, {
  8143. id: 7,
  8144. name: "Bull Helmet",
  8145. price: 6e3,
  8146. scale: 120,
  8147. desc: "increases damage done but drains health",
  8148. healthRegen: -5,
  8149. dmgMultO: 1.5,
  8150. spdMult: .96
  8151. }, {
  8152. id: 22,
  8153. name: "Emp Helmet",
  8154. price: 6e3,
  8155. scale: 120,
  8156. desc: "turrets won't attack but you move slower",
  8157. antiTurret: 1,
  8158. spdMult: .7
  8159. }, {
  8160. id: 12,
  8161. name: "Booster Hat",
  8162. price: 6e3,
  8163. scale: 120,
  8164. desc: "increases your movement speed",
  8165. spdMult: 1.16
  8166. }, {
  8167. id: 26,
  8168. name: "Barbarian Armor",
  8169. price: 8e3,
  8170. scale: 120,
  8171. desc: "knocks back enemies that attack you",
  8172. dmgK: .6
  8173. }, {
  8174. id: 21,
  8175. name: "Plague Mask",
  8176. price: 1e4,
  8177. scale: 120,
  8178. desc: "melee attacks deal poison damage",
  8179. poisonDmg: 5,
  8180. poisonTime: 6
  8181. }, {
  8182. id: 46,
  8183. name: "Bull Mask",
  8184. price: 1e4,
  8185. scale: 120,
  8186. desc: "bulls won't target you unless you attack them",
  8187. bullRepel: 1
  8188. }, {
  8189. id: 14,
  8190. name: "Windmill Hat",
  8191. topSprite: !0,
  8192. price: 1e4,
  8193. scale: 120,
  8194. desc: "generates points while worn",
  8195. pps: 1.5
  8196. }, {
  8197. id: 11,
  8198. name: "Spike Gear",
  8199. topSprite: !0,
  8200. price: 1e4,
  8201. scale: 120,
  8202. desc: "deal damage to players that damage you",
  8203. dmg: .45
  8204. }, {
  8205. id: 53,
  8206. name: "Turret Gear",
  8207. topSprite: !0,
  8208. price: 1e4,
  8209. scale: 120,
  8210. desc: "you become a walking turret",
  8211. turret: {
  8212. proj: 1,
  8213. range: 700,
  8214. rate: 2500
  8215. },
  8216. spdMult: .7
  8217. }, {
  8218. id: 20,
  8219. name: "Samurai Armor",
  8220. price: 12e3,
  8221. scale: 120,
  8222. desc: "increased attack speed and fire rate",
  8223. atkSpd: .78
  8224. }, {
  8225. id: 58,
  8226. name: "Dark Knight",
  8227. price: 12e3,
  8228. scale: 120,
  8229. desc: "restores health when you deal damage",
  8230. healD: .4
  8231. }, {
  8232. id: 27,
  8233. name: "Scavenger Gear",
  8234. price: 15e3,
  8235. scale: 120,
  8236. desc: "earn double points for each kill",
  8237. kScrM: 2
  8238. }, {
  8239. id: 40,
  8240. name: "#### Gear",
  8241. price: 15e3,
  8242. scale: 120,
  8243. desc: "increased damage to buildings but slower movement",
  8244. spdMult: .3,
  8245. bDmg: 3.3
  8246. }, {
  8247. id: 52,
  8248. name: "Thief Gear",
  8249. price: 15e3,
  8250. scale: 120,
  8251. desc: "steal half of a players gold when you kill them",
  8252. goldSteal: .5
  8253. }, {
  8254. id: 55,
  8255. name: "Bloodthirster",
  8256. price: 2e4,
  8257. scale: 120,
  8258. desc: "Restore Health when dealing damage. And increased damage",
  8259. healD: .25,
  8260. dmgMultO: 1.2
  8261. }, {
  8262. id: 56,
  8263. name: "Assassin Gear",
  8264. price: 2e4,
  8265. scale: 120,
  8266. desc: "Go invisible when not moving. Can't eat. Increased speed",
  8267. noEat: !0,
  8268. spdMult: 1.1,
  8269. invisTimer: 1e3
  8270. }],
  8271. e.exports.accessories = [{
  8272. id: 12,
  8273. name: "Snowball",
  8274. price: 1e3,
  8275. scale: 105,
  8276. xOff: 18,
  8277. desc: "no effect"
  8278. }, {
  8279. id: 9,
  8280. name: "Tree Cape",
  8281. price: 1e3,
  8282. scale: 90,
  8283. desc: "no effect"
  8284. }, {
  8285. id: 10,
  8286. name: "Stone Cape",
  8287. price: 1e3,
  8288. scale: 90,
  8289. desc: "no effect"
  8290. }, {
  8291. id: 3,
  8292. name: "Cookie Cape",
  8293. price: 1500,
  8294. scale: 90,
  8295. desc: "no effect"
  8296. }, {
  8297. id: 8,
  8298. name: "Cow Cape",
  8299. price: 2e3,
  8300. scale: 90,
  8301. desc: "no effect"
  8302. }, {
  8303. id: 11,
  8304. name: "Monkey Tail",
  8305. price: 2e3,
  8306. scale: 97,
  8307. xOff: 25,
  8308. desc: "Super speed but reduced damage",
  8309. spdMult: 1.35,
  8310. dmgMultO: .2
  8311. }, {
  8312. id: 17,
  8313. name: "Apple Basket",
  8314. price: 3e3,
  8315. scale: 80,
  8316. xOff: 12,
  8317. desc: "slowly regenerates health over time",
  8318. healthRegen: 1
  8319. }, {
  8320. id: 6,
  8321. name: "Winter Cape",
  8322. price: 3e3,
  8323. scale: 90,
  8324. desc: "no effect"
  8325. }, {
  8326. id: 4,
  8327. name: "Skull Cape",
  8328. price: 4e3,
  8329. scale: 90,
  8330. desc: "no effect"
  8331. }, {
  8332. id: 5,
  8333. name: "Dash Cape",
  8334. price: 5e3,
  8335. scale: 90,
  8336. desc: "no effect"
  8337. }, {
  8338. id: 2,
  8339. name: "Dragon Cape",
  8340. price: 6e3,
  8341. scale: 90,
  8342. desc: "no effect"
  8343. }, {
  8344. id: 1,
  8345. name: "Super Cape",
  8346. price: 8e3,
  8347. scale: 90,
  8348. desc: "no effect"
  8349. }, {
  8350. id: 7,
  8351. name: "Troll Cape",
  8352. price: 8e3,
  8353. scale: 90,
  8354. desc: "no effect"
  8355. }, {
  8356. id: 14,
  8357. name: "Thorns",
  8358. price: 1e4,
  8359. scale: 115,
  8360. xOff: 20,
  8361. desc: "no effect"
  8362. }, {
  8363. id: 15,
  8364. name: "Blockades",
  8365. price: 1e4,
  8366. scale: 95,
  8367. xOff: 15,
  8368. desc: "no effect"
  8369. }, {
  8370. id: 20,
  8371. name: "Devils Tail",
  8372. price: 1e4,
  8373. scale: 95,
  8374. xOff: 20,
  8375. desc: "no effect"
  8376. }, {
  8377. id: 16,
  8378. name: "Sawblade",
  8379. price: 12e3,
  8380. scale: 90,
  8381. spin: !0,
  8382. xOff: 0,
  8383. desc: "deal damage to players that damage you",
  8384. dmg: .15
  8385. }, {
  8386. id: 13,
  8387. name: "Angel Wings",
  8388. price: 15e3,
  8389. scale: 138,
  8390. xOff: 22,
  8391. desc: "slowly regenerates health over time",
  8392. healthRegen: 3
  8393. }, {
  8394. id: 19,
  8395. name: "Shadow Wings",
  8396. price: 15e3,
  8397. scale: 138,
  8398. xOff: 22,
  8399. desc: "increased movement speed",
  8400. spdMult: 1.1
  8401. }, {
  8402. id: 18,
  8403. name: "Blood Wings",
  8404. price: 2e4,
  8405. scale: 178,
  8406. xOff: 26,
  8407. desc: "restores health when you deal damage",
  8408. healD: .2
  8409. }, {
  8410. id: 21,
  8411. name: "Corrupt X Wings",
  8412. price: 2e4,
  8413. scale: 178,
  8414. xOff: 26,
  8415. desc: "deal damage to players that damage you",
  8416. dmg: .25
  8417. }]
  8418. }
  8419. , function(e, t) {
  8420. e.exports = function(e, t, n, i, r, s, a) {
  8421. this.init = function(e, t, n, i, r, s, o, c, l) {
  8422. this.active = !0,
  8423. this.indx = e,
  8424. this.x = t,
  8425. this.y = n,
  8426. this.dir = i,
  8427. this.skipMov = !0,
  8428. this.speed = r,
  8429. this.dmg = s,
  8430. this.scale = c,
  8431. this.range = o,
  8432. this.owner = l,
  8433. a && (this.sentTo = {})
  8434. }
  8435. ;
  8436. var o, c = [];
  8437. this.update = function(l) {
  8438. if (this.active) {
  8439. var h, u = this.speed * l;
  8440. if (this.skipMov ? this.skipMov = !1 : (this.x += u * Math.cos(this.dir),
  8441. this.y += u * Math.sin(this.dir),
  8442. this.range -= u,
  8443. this.range <= 0 && (this.x += this.range * Math.cos(this.dir),
  8444. this.y += this.range * Math.sin(this.dir),
  8445. u = 1,
  8446. this.range = 0,
  8447. this.active = !1)),
  8448. a) {
  8449. for (var f = 0; f < e.length; ++f)
  8450. !this.sentTo[e[f].id] && e[f].canSee(this) && (this.sentTo[e[f].id] = 1,
  8451. a.send(e[f].id, "18", s.fixTo(this.x, 1), s.fixTo(this.y, 1), s.fixTo(this.dir, 2), s.fixTo(this.range, 1), this.speed, this.indx, this.layer, this.sid));
  8452. for (c.length = 0,
  8453. f = 0; f < e.length + t.length; ++f)
  8454. !(o = e[f] || t[f - e.length]).alive || o == this.owner || this.owner.team && o.team == this.owner.team || s.lineInRect(o.x - o.scale, o.y - o.scale, o.x + o.scale, o.y + o.scale, this.x, this.y, this.x + u * Math.cos(this.dir), this.y + u * Math.sin(this.dir)) && c.push(o);
  8455. for (var d = n.getGridArrays(this.x, this.y, this.scale), p = 0; p < d.length; ++p)
  8456. for (var g = 0; g < d[p].length; ++g)
  8457. h = (o = d[p][g]).getScale(),
  8458. o.active && this.ignoreObj != o.sid && this.layer <= o.layer && c.indexOf(o) < 0 && !o.ignoreCollision && s.lineInRect(o.x - h, o.y - h, o.x + h, o.y + h, this.x, this.y, this.x + u * Math.cos(this.dir), this.y + u * Math.sin(this.dir)) && c.push(o);
  8459. if (c.length > 0) {
  8460. var m = null
  8461. , y = null
  8462. , k = null;
  8463. for (f = 0; f < c.length; ++f)
  8464. k = s.getDistance(this.x, this.y, c[f].x, c[f].y),
  8465. (null == y || k < y) && (y = k,
  8466. m = c[f]);
  8467. if (m.isPlayer || m.isAI) {
  8468. var v = .3 * (m.weightM || 1);
  8469. m.xVel += v * Math.cos(this.dir),
  8470. m.yVel += v * Math.sin(this.dir),
  8471. null != m.weaponIndex && i.weapons[m.weaponIndex].shield && s.getAngleDist(this.dir + Math.PI, m.dir) <= r.shieldAngle || m.changeHealth(-this.dmg, this.owner, this.owner)
  8472. } else
  8473. for (m.projDmg && m.health && m.changeHealth(-this.dmg) && n.disableObj(m),
  8474. f = 0; f < e.length; ++f)
  8475. e[f].active && (m.sentTo[e[f].id] && (m.active ? e[f].canSee(m) && a.send(e[f].id, "8", s.fixTo(this.dir, 2), m.sid) : a.send(e[f].id, "12", m.sid)),
  8476. m.active || m.owner != e[f] || e[f].changeItemCount(m.group.id, -1));
  8477. for (this.active = !1,
  8478. f = 0; f < e.length; ++f)
  8479. this.sentTo[e[f].id] && a.send(e[f].id, "19", this.sid, s.fixTo(y, 1))
  8480. }
  8481. }
  8482. }
  8483. }
  8484. }
  8485. }
  8486. , function(e, t) {
  8487. e.exports = function(e, t, n, i, r, s, a, o, c) {
  8488. this.addProjectile = function(l, h, u, f, d, p, g, m, y) {
  8489. for (var k, v = s.projectiles[p], w = 0; w < t.length; ++w)
  8490. if (!t[w].active) {
  8491. k = t[w];
  8492. break
  8493. }
  8494. return k || ((k = new e(n,i,r,s,a,o,c)).sid = t.length,
  8495. t.push(k)),
  8496. k.init(p, l, h, u, d, v.dmg, f, v.scale, g),
  8497. k.ignoreObj = m,
  8498. k.layer = y || v.layer,
  8499. k.src = v.src,
  8500. k
  8501. }
  8502. }
  8503. }
  8504. , function(e, t) {
  8505. e.exports.obj = function(e, t) {
  8506. var n;
  8507. this.sounds = [],
  8508. this.active = !0,
  8509. this.play = function(t, i, r) {
  8510. i && this.active && ((n = this.sounds[t]) || (n = new Howl({
  8511. src: ".././sound/" + t + ".mp3"
  8512. }),
  8513. this.sounds[t] = n),
  8514. r && n.isPlaying || (n.isPlaying = !0,
  8515. n.play(),
  8516. n.volume((i || 1) * e.volumeMult),
  8517. n.loop(r)))
  8518. }
  8519. ,
  8520. this.toggleMute = function(e, t) {
  8521. (n = this.sounds[e]) && n.mute(t)
  8522. }
  8523. ,
  8524. this.stop = function(e) {
  8525. (n = this.sounds[e]) && (n.stop(),
  8526. n.isPlaying = !1)
  8527. }
  8528. }
  8529. }
  8530. , function(e, t, n) {
  8531. var i = n(60)
  8532. , r = n(67);
  8533. function s(e, t, n, i, r) {
  8534. "localhost" == location.hostname && (window.location.hostname = "127.0.0.1"),
  8535. this.debugLog = !1,
  8536. this.baseUrl = e,
  8537. this.lobbySize = n,
  8538. this.devPort = t,
  8539. this.lobbySpread = i,
  8540. this.rawIPs = !!r,
  8541. this.server = void 0,
  8542. this.gameIndex = void 0,
  8543. this.callback = void 0,
  8544. this.errorCallback = void 0,
  8545. this.processServers(vultr.servers)
  8546. }
  8547. s.prototype.regionInfo = {
  8548. 0: {
  8549. name: "Local",
  8550. latitude: 0,
  8551. longitude: 0
  8552. },
  8553. "vultr:1": {
  8554. name: "New Jersey",
  8555. latitude: 40.1393329,
  8556. longitude: -75.8521818
  8557. },
  8558. "vultr:2": {
  8559. name: "Chicago",
  8560. latitude: 41.8339037,
  8561. longitude: -87.872238
  8562. },
  8563. "vultr:3": {
  8564. name: "Dallas",
  8565. latitude: 32.8208751,
  8566. longitude: -96.8714229
  8567. },
  8568. "vultr:4": {
  8569. name: "Seattle",
  8570. latitude: 47.6149942,
  8571. longitude: -122.4759879
  8572. },
  8573. "vultr:5": {
  8574. name: "Los Angeles",
  8575. latitude: 34.0207504,
  8576. longitude: -118.691914
  8577. },
  8578. "vultr:6": {
  8579. name: "Atlanta",
  8580. latitude: 33.7676334,
  8581. longitude: -84.5610332
  8582. },
  8583. "vultr:7": {
  8584. name: "Amsterdam",
  8585. latitude: 52.3745287,
  8586. longitude: 4.7581878
  8587. },
  8588. "vultr:8": {
  8589. name: "London",
  8590. latitude: 51.5283063,
  8591. longitude: -.382486
  8592. },
  8593. "vultr:9": {
  8594. name: "Frankfurt",
  8595. latitude: 50.1211273,
  8596. longitude: 8.496137
  8597. },
  8598. "vultr:12": {
  8599. name: "Silicon Valley",
  8600. latitude: 37.4024714,
  8601. longitude: -122.3219752
  8602. },
  8603. "vultr:19": {
  8604. name: "Sydney",
  8605. latitude: -33.8479715,
  8606. longitude: 150.651084
  8607. },
  8608. "vultr:24": {
  8609. name: "Paris",
  8610. latitude: 48.8588376,
  8611. longitude: 2.2773454
  8612. },
  8613. "vultr:25": {
  8614. name: "Tokyo",
  8615. latitude: 35.6732615,
  8616. longitude: 139.569959
  8617. },
  8618. "vultr:39": {
  8619. name: "Miami",
  8620. latitude: 25.7823071,
  8621. longitude: -80.3012156
  8622. },
  8623. "vultr:40": {
  8624. name: "Singapore",
  8625. latitude: 1.3147268,
  8626. longitude: 103.7065876
  8627. }
  8628. },
  8629. s.prototype.start = function(e, t) {
  8630. this.callback = e,
  8631. this.errorCallback = t;
  8632. var n = this.parseServerQuery();
  8633. n ? (this.log("Found server in query."),
  8634. this.password = n[3],
  8635. this.connect(n[0], n[1], n[2])) : (this.log("Pinging servers..."),
  8636. this.pingServers())
  8637. }
  8638. ,
  8639. s.prototype.parseServerQuery = function() {
  8640. var e = i.parse(location.href, !0)
  8641. , t = e.query.server;
  8642. if ("string" == typeof t) {
  8643. var n = t.split(":");
  8644. if (3 == n.length) {
  8645. var r = n[0]
  8646. , s = parseInt(n[1])
  8647. , a = parseInt(n[2]);
  8648. return "0" == r || r.startsWith("vultr:") || (r = "vultr:" + r),
  8649. [r, s, a, e.query.password]
  8650. }
  8651. this.errorCallback("Invalid number of server parameters in " + t)
  8652. }
  8653. }
  8654. ,
  8655. s.prototype.findServer = function(e, t) {
  8656. var n = this.servers[e];
  8657. if (Array.isArray(n)) {
  8658. for (var i = 0; i < n.length; i++) {
  8659. var r = n[i];
  8660. if (r.index == t)
  8661. return r
  8662. }
  8663. console.warn("Could not find server in region " + e + " with index " + t + ".")
  8664. } else
  8665. this.errorCallback("No server list for region " + e)
  8666. }
  8667. ,
  8668. s.prototype.pingServers = function() {
  8669. var e = this
  8670. , t = [];
  8671. for (var n in this.servers)
  8672. if (this.servers.hasOwnProperty(n)) {
  8673. var i = this.servers[n]
  8674. , r = i[Math.floor(Math.random() * i.length)];
  8675. null != r ? function(i, r) {
  8676. var s = new XMLHttpRequest;
  8677. s.onreadystatechange = function(i) {
  8678. var s = i.target;
  8679. if (4 == s.readyState)
  8680. if (200 == s.status) {
  8681. for (var a = 0; a < t.length; a++)
  8682. t[a].abort();
  8683. e.log("Connecting to region", r.region);
  8684. var o = e.seekServer(r.region);
  8685. e.connect(o[0], o[1], o[2])
  8686. } else
  8687. console.warn("Error pinging " + r.ip + " in region " + n)
  8688. }
  8689. ;
  8690. var a = "//" + e.serverAddress(r.ip, !0) + ":" + e.serverPort(r) + "/ping";
  8691. s.open("GET", a, !0),
  8692. s.send(null),
  8693. e.log("Pinging", a),
  8694. t.push(s)
  8695. }(0, r) : console.log("No target server for region " + n)
  8696. }
  8697. }
  8698. ,
  8699. s.prototype.seekServer = function(e, t, n) {
  8700. null == n && (n = "random"),
  8701. null == t && (t = !1);
  8702. const i = ["random"];
  8703. var r = this.lobbySize
  8704. , s = this.lobbySpread
  8705. , a = this.servers[e].flatMap((function(e) {
  8706. var t = 0;
  8707. return e.games.map((function(n) {
  8708. var i = t++;
  8709. return {
  8710. region: e.region,
  8711. index: e.index * e.games.length + i,
  8712. gameIndex: i,
  8713. gameCount: e.games.length,
  8714. playerCount: n.playerCount,
  8715. isPrivate: n.isPrivate
  8716. }
  8717. }
  8718. ))
  8719. }
  8720. )).filter((function(e) {
  8721. return !e.isPrivate
  8722. }
  8723. )).filter((function(e) {
  8724. return !t || 0 == e.playerCount && e.gameIndex >= e.gameCount / 2
  8725. }
  8726. )).filter((function(e) {
  8727. return "random" == n || i[e.index % i.length].key == n
  8728. }
  8729. )).sort((function(e, t) {
  8730. return t.playerCount - e.playerCount
  8731. }
  8732. )).filter((function(e) {
  8733. return e.playerCount < r
  8734. }
  8735. ));
  8736. if (t && a.reverse(),
  8737. 0 != a.length) {
  8738. var o = Math.min(s, a.length)
  8739. , c = Math.floor(Math.random() * o)
  8740. , l = a[c = Math.min(c, a.length - 1)]
  8741. , h = l.region
  8742. , u = (c = Math.floor(l.index / l.gameCount),
  8743. l.index % l.gameCount);
  8744. return this.log("Found server."),
  8745. [h, c, u]
  8746. }
  8747. this.errorCallback("No open servers.")
  8748. }
  8749. ,
  8750. s.prototype.connect = function(e, t, n) {
  8751. if (!this.connected) {
  8752. var i = this.findServer(e, t);
  8753. null != i ? (this.log("Connecting to server", i, "with game index", n),
  8754. i.games[n].playerCount >= this.lobbySize ? this.errorCallback("Server is already full.") : (window.history.replaceState(document.title, document.title, this.generateHref(e, t, n, this.password)),
  8755. this.server = i,
  8756. this.gameIndex = n,
  8757. this.log("Calling callback with address", this.serverAddress(i.ip), "on port", this.serverPort(i), "with game index", n),
  8758. this.callback(this.serverAddress(i.ip), this.serverPort(i), n))) : this.errorCallback("Failed to find server for region " + e + " and index " + t)
  8759. }
  8760. }
  8761. ,
  8762. s.prototype.switchServer = function(e, t, n, i) {
  8763. this.switchingServers = !0,
  8764. window.location.href = this.generateHref(e, t, n, i)
  8765. }
  8766. ,
  8767. s.prototype.generateHref = function(e, t, n, i) {
  8768. var r = "/?server=" + (e = this.stripRegion(e)) + ":" + t + ":" + n;
  8769. return i && (r += "&password=" + encodeURIComponent(i)),
  8770. r
  8771. }
  8772. ,
  8773. s.prototype.serverAddress = function(e, t) {
  8774. return "127.0.0.1" == e || "7f000001" == e || "903d62ef5d1c2fecdcaeb5e7dd485eff" == e ? window.location.hostname : this.rawIPs ? t ? "ip_" + this.hashIP(e) + "." + this.baseUrl : e : "ip_" + e + "." + this.baseUrl
  8775. }
  8776. ,
  8777. s.prototype.serverPort = function(e) {
  8778. return 0 == e.region ? this.devPort : location.protocol.startsWith("https") ? 443 : 80
  8779. }
  8780. ,
  8781. s.prototype.processServers = function(e) {
  8782. for (var t = {}, n = 0; n < e.length; n++) {
  8783. var i = e[n]
  8784. , r = t[i.region];
  8785. null == r && (r = [],
  8786. t[i.region] = r),
  8787. r.push(i)
  8788. }
  8789. for (var s in t)
  8790. t[s] = t[s].sort((function(e, t) {
  8791. return e.index - t.index
  8792. }
  8793. ));
  8794. this.servers = t
  8795. }
  8796. ,
  8797. s.prototype.ipToHex = function(e) {
  8798. return e.split(".").map(e=>("00" + parseInt(e).toString(16)).substr(-2)).join("").toLowerCase()
  8799. }
  8800. ,
  8801. s.prototype.hashIP = function(e) {
  8802. return r(this.ipToHex(e))
  8803. }
  8804. ,
  8805. s.prototype.log = function() {
  8806. return this.debugLog ? console.log.apply(void 0, arguments) : console.verbose ? console.verbose.apply(void 0, arguments) : void 0
  8807. }
  8808. ,
  8809. s.prototype.stripRegion = function(e) {
  8810. return e.startsWith("vultr:") ? e = e.slice(6) : e.startsWith("do:") && (e = e.slice(3)),
  8811. e
  8812. }
  8813. ,
  8814. window.testVultrClient = function() {
  8815. var e = 1;
  8816. function t(t, n) {
  8817. (t = "" + t) == (n = "" + n) ? console.log(`Assert ${e} passed.`) : console.warn(`Assert ${e} failed. Expected ${n}, got ${t}.`),
  8818. e++
  8819. }
  8820. var n = new s("test.io",-1,5,1,!1);
  8821. n.errorCallback = function(e) {}
  8822. ,
  8823. n.processServers(function(e) {
  8824. var t = [];
  8825. for (var n in e)
  8826. for (var i = e[n], r = 0; r < i.length; r++)
  8827. t.push({
  8828. ip: n + ":" + r,
  8829. scheme: "testing",
  8830. region: n,
  8831. index: r,
  8832. games: i[r].map(e=>({
  8833. playerCount: e,
  8834. isPrivate: !1
  8835. }))
  8836. });
  8837. return t
  8838. }({
  8839. 1: [[0, 0, 0, 0], [0, 0, 0, 0]],
  8840. 2: [[5, 1, 0, 0], [0, 0, 0, 0]],
  8841. 3: [[5, 0, 1, 5], [0, 0, 0, 0]],
  8842. 4: [[5, 1, 1, 5], [1, 0, 0, 0]],
  8843. 5: [[5, 1, 1, 5], [1, 0, 4, 0]],
  8844. 6: [[5, 5, 5, 5], [2, 3, 1, 4]],
  8845. 7: [[5, 5, 5, 5], [5, 5, 5, 5]]
  8846. })),
  8847. t(n.seekServer(1, !1), [1, 0, 0]),
  8848. t(n.seekServer(1, !0), [1, 1, 3]),
  8849. t(n.seekServer(2, !1), [2, 0, 1]),
  8850. t(n.seekServer(2, !0), [2, 1, 3]),
  8851. t(n.seekServer(3, !1), [3, 0, 2]),
  8852. t(n.seekServer(3, !0), [3, 1, 3]),
  8853. t(n.seekServer(4, !1), [4, 0, 1]),
  8854. t(n.seekServer(4, !0), [4, 1, 3]),
  8855. t(n.seekServer(5, !1), [5, 1, 2]),
  8856. t(n.seekServer(5, !0), [5, 1, 3]),
  8857. t(n.seekServer(6, !1), [6, 1, 3]),
  8858. t(n.seekServer(6, !0), void 0),
  8859. t(n.seekServer(7, !1), void 0),
  8860. t(n.seekServer(7, !0), void 0),
  8861. console.log("Tests passed.")
  8862. }
  8863. ;
  8864. var a = function(e, t) {
  8865. return e.concat(t)
  8866. };
  8867. Array.prototype.flatMap = function(e) {
  8868. return function(e, t) {
  8869. return t.map(e).reduce(a, [])
  8870. }(e, this)
  8871. }
  8872. ,
  8873. e.exports = s
  8874. }
  8875. , function(e, t, n) {
  8876. "use strict";
  8877. var i = n(61)
  8878. , r = n(63);
  8879. function s() {
  8880. this.protocol = null,
  8881. this.slashes = null,
  8882. this.auth = null,
  8883. this.host = null,
  8884. this.port = null,
  8885. this.hostname = null,
  8886. this.hash = null,
  8887. this.search = null,
  8888. this.query = null,
  8889. this.pathname = null,
  8890. this.path = null,
  8891. this.href = null
  8892. }
  8893. t.parse = v,
  8894. t.resolve = function(e, t) {
  8895. return v(e, !1, !0).resolve(t)
  8896. }
  8897. ,
  8898. t.resolveObject = function(e, t) {
  8899. return e ? v(e, !1, !0).resolveObject(t) : t
  8900. }
  8901. ,
  8902. t.format = function(e) {
  8903. return r.isString(e) && (e = v(e)),
  8904. e instanceof s ? e.format() : s.prototype.format.call(e)
  8905. }
  8906. ,
  8907. t.Url = s;
  8908. var a = /^([a-z0-9.+-]+:)/i
  8909. , o = /:[0-9]*$/
  8910. , c = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/
  8911. , l = ["{", "}", "|", "\\", "^", "`"].concat(["<", ">", '"', "`", " ", "\r", "\n", "\t"])
  8912. , h = ["'"].concat(l)
  8913. , u = ["%", "/", "?", ";", "#"].concat(h)
  8914. , f = ["/", "?", "#"]
  8915. , d = /^[+a-z0-9A-Z_-]{0,63}$/
  8916. , p = /^([+a-z0-9A-Z_-]{0,63})(.*)$/
  8917. , g = {
  8918. javascript: !0,
  8919. "javascript:": !0
  8920. }
  8921. , m = {
  8922. javascript: !0,
  8923. "javascript:": !0
  8924. }
  8925. , y = {
  8926. http: !0,
  8927. https: !0,
  8928. ftp: !0,
  8929. gopher: !0,
  8930. file: !0,
  8931. "http:": !0,
  8932. "https:": !0,
  8933. "ftp:": !0,
  8934. "gopher:": !0,
  8935. "file:": !0
  8936. }
  8937. , k = n(64);
  8938. function v(e, t, n) {
  8939. if (e && r.isObject(e) && e instanceof s)
  8940. return e;
  8941. var i = new s;
  8942. return i.parse(e, t, n),
  8943. i
  8944. }
  8945. s.prototype.parse = function(e, t, n) {
  8946. if (!r.isString(e))
  8947. throw new TypeError("Parameter 'url' must be a string, not " + typeof e);
  8948. var s = e.indexOf("?")
  8949. , o = -1 !== s && s < e.indexOf("#") ? "?" : "#"
  8950. , l = e.split(o);
  8951. l[0] = l[0].replace(/\\/g, "/");
  8952. var v = e = l.join(o);
  8953. if (v = v.trim(),
  8954. !n && 1 === e.split("#").length) {
  8955. var w = c.exec(v);
  8956. if (w)
  8957. return this.path = v,
  8958. this.href = v,
  8959. this.pathname = w[1],
  8960. w[2] ? (this.search = w[2],
  8961. this.query = t ? k.parse(this.search.substr(1)) : this.search.substr(1)) : t && (this.search = "",
  8962. this.query = {}),
  8963. this
  8964. }
  8965. var b = a.exec(v);
  8966. if (b) {
  8967. var x = (b = b[0]).toLowerCase();
  8968. this.protocol = x,
  8969. v = v.substr(b.length)
  8970. }
  8971. if (n || b || v.match(/^\/\/[^@\/]+@[^@\/]+/)) {
  8972. var S = "//" === v.substr(0, 2);
  8973. !S || b && m[b] || (v = v.substr(2),
  8974. this.slashes = !0)
  8975. }
  8976. if (!m[b] && (S || b && !y[b])) {
  8977. for (var T, I, E = -1, M = 0; M < f.length; M++)
  8978. -1 !== (A = v.indexOf(f[M])) && (-1 === E || A < E) && (E = A);
  8979. for (-1 !== (I = -1 === E ? v.lastIndexOf("@") : v.lastIndexOf("@", E)) && (T = v.slice(0, I),
  8980. v = v.slice(I + 1),
  8981. this.auth = decodeURIComponent(T)),
  8982. E = -1,
  8983. M = 0; M < u.length; M++) {
  8984. var A;
  8985. -1 !== (A = v.indexOf(u[M])) && (-1 === E || A < E) && (E = A)
  8986. }
  8987. -1 === E && (E = v.length),
  8988. this.host = v.slice(0, E),
  8989. v = v.slice(E),
  8990. this.parseHost(),
  8991. this.hostname = this.hostname || "";
  8992. var P = "[" === this.hostname[0] && "]" === this.hostname[this.hostname.length - 1];
  8993. if (!P)
  8994. for (var B = this.hostname.split(/\./), C = (M = 0,
  8995. B.length); M < C; M++) {
  8996. var O = B[M];
  8997. if (O && !O.match(d)) {
  8998. for (var R = "", j = 0, _ = O.length; j < _; j++)
  8999. O.charCodeAt(j) > 127 ? R += "x" : R += O[j];
  9000. if (!R.match(d)) {
  9001. var U = B.slice(0, M)
  9002. , D = B.slice(M + 1)
  9003. , L = O.match(p);
  9004. L && (U.push(L[1]),
  9005. D.unshift(L[2])),
  9006. D.length && (v = "/" + D.join(".") + v),
  9007. this.hostname = U.join(".");
  9008. break
  9009. }
  9010. }
  9011. }
  9012. this.hostname.length > 255 ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(),
  9013. P || (this.hostname = i.toASCII(this.hostname));
  9014. var F = this.port ? ":" + this.port : ""
  9015. , z = this.hostname || "";
  9016. this.host = z + F,
  9017. this.href += this.host,
  9018. P && (this.hostname = this.hostname.substr(1, this.hostname.length - 2),
  9019. "/" !== v[0] && (v = "/" + v))
  9020. }
  9021. if (!g[x])
  9022. for (M = 0,
  9023. C = h.length; M < C; M++) {
  9024. var H = h[M];
  9025. if (-1 !== v.indexOf(H)) {
  9026. var V = encodeURIComponent(H);
  9027. V === H && (V = escape(H)),
  9028. v = v.split(H).join(V)
  9029. }
  9030. }
  9031. var q = v.indexOf("#");
  9032. -1 !== q && (this.hash = v.substr(q),
  9033. v = v.slice(0, q));
  9034. var Y = v.indexOf("?");
  9035. if (-1 !== Y ? (this.search = v.substr(Y),
  9036. this.query = v.substr(Y + 1),
  9037. t && (this.query = k.parse(this.query)),
  9038. v = v.slice(0, Y)) : t && (this.search = "",
  9039. this.query = {}),
  9040. v && (this.pathname = v),
  9041. y[x] && this.hostname && !this.pathname && (this.pathname = "/"),
  9042. this.pathname || this.search) {
  9043. F = this.pathname || "";
  9044. var W = this.search || "";
  9045. this.path = F + W
  9046. }
  9047. return this.href = this.format(),
  9048. this
  9049. }
  9050. ,
  9051. s.prototype.format = function() {
  9052. var e = this.auth || "";
  9053. e && (e = (e = encodeURIComponent(e)).replace(/%3A/i, ":"),
  9054. e += "@");
  9055. var t = this.protocol || ""
  9056. , n = this.pathname || ""
  9057. , i = this.hash || ""
  9058. , s = !1
  9059. , a = "";
  9060. this.host ? s = e + this.host : this.hostname && (s = e + (-1 === this.hostname.indexOf(":") ? this.hostname : "[" + this.hostname + "]"),
  9061. this.port && (s += ":" + this.port)),
  9062. this.query && r.isObject(this.query) && Object.keys(this.query).length && (a = k.stringify(this.query));
  9063. var o = this.search || a && "?" + a || "";
  9064. return t && ":" !== t.substr(-1) && (t += ":"),
  9065. this.slashes || (!t || y[t]) && !1 !== s ? (s = "//" + (s || ""),
  9066. n && "/" !== n.charAt(0) && (n = "/" + n)) : s || (s = ""),
  9067. i && "#" !== i.charAt(0) && (i = "#" + i),
  9068. o && "?" !== o.charAt(0) && (o = "?" + o),
  9069. t + s + (n = n.replace(/[?#]/g, (function(e) {
  9070. return encodeURIComponent(e)
  9071. }
  9072. ))) + (o = o.replace("#", "%23")) + i
  9073. }
  9074. ,
  9075. s.prototype.resolve = function(e) {
  9076. return this.resolveObject(v(e, !1, !0)).format()
  9077. }
  9078. ,
  9079. s.prototype.resolveObject = function(e) {
  9080. if (r.isString(e)) {
  9081. var t = new s;
  9082. t.parse(e, !1, !0),
  9083. e = t
  9084. }
  9085. for (var n = new s, i = Object.keys(this), a = 0; a < i.length; a++) {
  9086. var o = i[a];
  9087. n[o] = this[o]
  9088. }
  9089. if (n.hash = e.hash,
  9090. "" === e.href)
  9091. return n.href = n.format(),
  9092. n;
  9093. if (e.slashes && !e.protocol) {
  9094. for (var c = Object.keys(e), l = 0; l < c.length; l++) {
  9095. var h = c[l];
  9096. "protocol" !== h && (n[h] = e[h])
  9097. }
  9098. return y[n.protocol] && n.hostname && !n.pathname && (n.path = n.pathname = "/"),
  9099. n.href = n.format(),
  9100. n
  9101. }
  9102. if (e.protocol && e.protocol !== n.protocol) {
  9103. if (!y[e.protocol]) {
  9104. for (var u = Object.keys(e), f = 0; f < u.length; f++) {
  9105. var d = u[f];
  9106. n[d] = e[d]
  9107. }
  9108. return n.href = n.format(),
  9109. n
  9110. }
  9111. if (n.protocol = e.protocol,
  9112. e.host || m[e.protocol])
  9113. n.pathname = e.pathname;
  9114. else {
  9115. for (var p = (e.pathname || "").split("/"); p.length && !(e.host = p.shift()); )
  9116. ;
  9117. e.host || (e.host = ""),
  9118. e.hostname || (e.hostname = ""),
  9119. "" !== p[0] && p.unshift(""),
  9120. p.length < 2 && p.unshift(""),
  9121. n.pathname = p.join("/")
  9122. }
  9123. if (n.search = e.search,
  9124. n.query = e.query,
  9125. n.host = e.host || "",
  9126. n.auth = e.auth,
  9127. n.hostname = e.hostname || e.host,
  9128. n.port = e.port,
  9129. n.pathname || n.search) {
  9130. var g = n.pathname || ""
  9131. , k = n.search || "";
  9132. n.path = g + k
  9133. }
  9134. return n.slashes = n.slashes || e.slashes,
  9135. n.href = n.format(),
  9136. n
  9137. }
  9138. var v = n.pathname && "/" === n.pathname.charAt(0)
  9139. , w = e.host || e.pathname && "/" === e.pathname.charAt(0)
  9140. , b = w || v || n.host && e.pathname
  9141. , x = b
  9142. , S = n.pathname && n.pathname.split("/") || []
  9143. , T = (p = e.pathname && e.pathname.split("/") || [],
  9144. n.protocol && !y[n.protocol]);
  9145. if (T && (n.hostname = "",
  9146. n.port = null,
  9147. n.host && ("" === S[0] ? S[0] = n.host : S.unshift(n.host)),
  9148. n.host = "",
  9149. e.protocol && (e.hostname = null,
  9150. e.port = null,
  9151. e.host && ("" === p[0] ? p[0] = e.host : p.unshift(e.host)),
  9152. e.host = null),
  9153. b = b && ("" === p[0] || "" === S[0])),
  9154. w)
  9155. n.host = e.host || "" === e.host ? e.host : n.host,
  9156. n.hostname = e.hostname || "" === e.hostname ? e.hostname : n.hostname,
  9157. n.search = e.search,
  9158. n.query = e.query,
  9159. S = p;
  9160. else if (p.length)
  9161. S || (S = []),
  9162. S.pop(),
  9163. S = S.concat(p),
  9164. n.search = e.search,
  9165. n.query = e.query;
  9166. else if (!r.isNullOrUndefined(e.search))
  9167. return T && (n.hostname = n.host = S.shift(),
  9168. (P = !!(n.host && n.host.indexOf("@") > 0) && n.host.split("@")) && (n.auth = P.shift(),
  9169. n.host = n.hostname = P.shift())),
  9170. n.search = e.search,
  9171. n.query = e.query,
  9172. r.isNull(n.pathname) && r.isNull(n.search) || (n.path = (n.pathname ? n.pathname : "") + (n.search ? n.search : "")),
  9173. n.href = n.format(),
  9174. n;
  9175. if (!S.length)
  9176. return n.pathname = null,
  9177. n.search ? n.path = "/" + n.search : n.path = null,
  9178. n.href = n.format(),
  9179. n;
  9180. for (var I = S.slice(-1)[0], E = (n.host || e.host || S.length > 1) && ("." === I || ".." === I) || "" === I, M = 0, A = S.length; A >= 0; A--)
  9181. "." === (I = S[A]) ? S.splice(A, 1) : ".." === I ? (S.splice(A, 1),
  9182. M++) : M && (S.splice(A, 1),
  9183. M--);
  9184. if (!b && !x)
  9185. for (; M--; M)
  9186. S.unshift("..");
  9187. !b || "" === S[0] || S[0] && "/" === S[0].charAt(0) || S.unshift(""),
  9188. E && "/" !== S.join("/").substr(-1) && S.push("");
  9189. var P, B = "" === S[0] || S[0] && "/" === S[0].charAt(0);
  9190. return T && (n.hostname = n.host = B ? "" : S.length ? S.shift() : "",
  9191. (P = !!(n.host && n.host.indexOf("@") > 0) && n.host.split("@")) && (n.auth = P.shift(),
  9192. n.host = n.hostname = P.shift())),
  9193. (b = b || n.host && S.length) && !B && S.unshift(""),
  9194. S.length ? n.pathname = S.join("/") : (n.pathname = null,
  9195. n.path = null),
  9196. r.isNull(n.pathname) && r.isNull(n.search) || (n.path = (n.pathname ? n.pathname : "") + (n.search ? n.search : "")),
  9197. n.auth = e.auth || n.auth,
  9198. n.slashes = n.slashes || e.slashes,
  9199. n.href = n.format(),
  9200. n
  9201. }
  9202. ,
  9203. s.prototype.parseHost = function() {
  9204. var e = this.host
  9205. , t = o.exec(e);
  9206. t && (":" !== (t = t[0]) && (this.port = t.substr(1)),
  9207. e = e.substr(0, e.length - t.length)),
  9208. e && (this.hostname = e)
  9209. }
  9210. }
  9211. , function(e, t, n) {
  9212. (function(e, i) {
  9213. var r;
  9214. /*! https://mths.be/punycode v1.4.1 by @mathias */
  9215. !function(s) {
  9216. t && t.nodeType,
  9217. e && e.nodeType;
  9218. var a = "object" == typeof i && i;
  9219. a.global !== a && a.window !== a && a.self;
  9220. var o, c = 2147483647, l = 36, h = /^xn--/, u = /[^\x20-\x7E]/, f = /[\x2E\u3002\uFF0E\uFF61]/g, d = {
  9221. overflow: "Overflow: input needs wider integers to process",
  9222. "not-basic": "Illegal input >= 0x80 (not a basic code point)",
  9223. "invalid-input": "Invalid input"
  9224. }, p = Math.floor, g = String.fromCharCode;
  9225. function m(e) {
  9226. throw new RangeError(d[e])
  9227. }
  9228. function y(e, t) {
  9229. for (var n = e.length, i = []; n--; )
  9230. i[n] = t(e[n]);
  9231. return i
  9232. }
  9233. function k(e, t) {
  9234. var n = e.split("@")
  9235. , i = "";
  9236. return n.length > 1 && (i = n[0] + "@",
  9237. e = n[1]),
  9238. i + y((e = e.replace(f, ".")).split("."), t).join(".")
  9239. }
  9240. function v(e) {
  9241. for (var t, n, i = [], r = 0, s = e.length; r < s; )
  9242. (t = e.charCodeAt(r++)) >= 55296 && t <= 56319 && r < s ? 56320 == (64512 & (n = e.charCodeAt(r++))) ? i.push(((1023 & t) << 10) + (1023 & n) + 65536) : (i.push(t),
  9243. r--) : i.push(t);
  9244. return i
  9245. }
  9246. function w(e) {
  9247. return y(e, (function(e) {
  9248. var t = "";
  9249. return e > 65535 && (t += g((e -= 65536) >>> 10 & 1023 | 55296),
  9250. e = 56320 | 1023 & e),
  9251. t + g(e)
  9252. }
  9253. )).join("")
  9254. }
  9255. function b(e) {
  9256. return e - 48 < 10 ? e - 22 : e - 65 < 26 ? e - 65 : e - 97 < 26 ? e - 97 : l
  9257. }
  9258. function x(e, t) {
  9259. return e + 22 + 75 * (e < 26) - ((0 != t) << 5)
  9260. }
  9261. function S(e, t, n) {
  9262. var i = 0;
  9263. for (e = n ? p(e / 700) : e >> 1,
  9264. e += p(e / t); e > 455; i += l)
  9265. e = p(e / 35);
  9266. return p(i + 36 * e / (e + 38))
  9267. }
  9268. function T(e) {
  9269. var t, n, i, r, s, a, o, h, u, f, d = [], g = e.length, y = 0, k = 128, v = 72;
  9270. for ((n = e.lastIndexOf("-")) < 0 && (n = 0),
  9271. i = 0; i < n; ++i)
  9272. e.charCodeAt(i) >= 128 && m("not-basic"),
  9273. d.push(e.charCodeAt(i));
  9274. for (r = n > 0 ? n + 1 : 0; r < g; ) {
  9275. for (s = y,
  9276. a = 1,
  9277. o = l; r >= g && m("invalid-input"),
  9278. ((h = b(e.charCodeAt(r++))) >= l || h > p((c - y) / a)) && m("overflow"),
  9279. y += h * a,
  9280. !(h < (u = o <= v ? 1 : o >= v + 26 ? 26 : o - v)); o += l)
  9281. a > p(c / (f = l - u)) && m("overflow"),
  9282. a *= f;
  9283. v = S(y - s, t = d.length + 1, 0 == s),
  9284. p(y / t) > c - k && m("overflow"),
  9285. k += p(y / t),
  9286. y %= t,
  9287. d.splice(y++, 0, k)
  9288. }
  9289. return w(d)
  9290. }
  9291. function I(e) {
  9292. var t, n, i, r, s, a, o, h, u, f, d, y, k, w, b, T = [];
  9293. for (y = (e = v(e)).length,
  9294. t = 128,
  9295. n = 0,
  9296. s = 72,
  9297. a = 0; a < y; ++a)
  9298. (d = e[a]) < 128 && T.push(g(d));
  9299. for (i = r = T.length,
  9300. r && T.push("-"); i < y; ) {
  9301. for (o = c,
  9302. a = 0; a < y; ++a)
  9303. (d = e[a]) >= t && d < o && (o = d);
  9304. for (o - t > p((c - n) / (k = i + 1)) && m("overflow"),
  9305. n += (o - t) * k,
  9306. t = o,
  9307. a = 0; a < y; ++a)
  9308. if ((d = e[a]) < t && ++n > c && m("overflow"),
  9309. d == t) {
  9310. for (h = n,
  9311. u = l; !(h < (f = u <= s ? 1 : u >= s + 26 ? 26 : u - s)); u += l)
  9312. b = h - f,
  9313. w = l - f,
  9314. T.push(g(x(f + b % w, 0))),
  9315. h = p(b / w);
  9316. T.push(g(x(h, 0))),
  9317. s = S(n, k, i == r),
  9318. n = 0,
  9319. ++i
  9320. }
  9321. ++n,
  9322. ++t
  9323. }
  9324. return T.join("")
  9325. }
  9326. o = {
  9327. version: "1.4.1",
  9328. ucs2: {
  9329. decode: v,
  9330. encode: w
  9331. },
  9332. decode: T,
  9333. encode: I,
  9334. toASCII: function(e) {
  9335. return k(e, (function(e) {
  9336. return u.test(e) ? "xn--" + I(e) : e
  9337. }
  9338. ))
  9339. },
  9340. toUnicode: function(e) {
  9341. return k(e, (function(e) {
  9342. return h.test(e) ? T(e.slice(4).toLowerCase()) : e
  9343. }
  9344. ))
  9345. }
  9346. },
  9347. void 0 === (r = function() {
  9348. return o
  9349. }
  9350. .call(t, n, t, e)) || (e.exports = r)
  9351. }()
  9352. }
  9353. ).call(this, n(62)(e), n(12))
  9354. }
  9355. , function(e, t) {
  9356. e.exports = function(e) {
  9357. return e.webpackPolyfill || (e.deprecate = function() {}
  9358. ,
  9359. e.paths = [],
  9360. e.children || (e.children = []),
  9361. Object.defineProperty(e, "loaded", {
  9362. enumerable: !0,
  9363. get: function() {
  9364. return e.l
  9365. }
  9366. }),
  9367. Object.defineProperty(e, "id", {
  9368. enumerable: !0,
  9369. get: function() {
  9370. return e.i
  9371. }
  9372. }),
  9373. e.webpackPolyfill = 1),
  9374. e
  9375. }
  9376. }
  9377. , function(e, t, n) {
  9378. "use strict";
  9379. e.exports = {
  9380. isString: function(e) {
  9381. return "string" == typeof e
  9382. },
  9383. isObject: function(e) {
  9384. return "object" == typeof e && null !== e
  9385. },
  9386. isNull: function(e) {
  9387. return null === e
  9388. },
  9389. isNullOrUndefined: function(e) {
  9390. return null == e
  9391. }
  9392. }
  9393. }
  9394. , function(e, t, n) {
  9395. "use strict";
  9396. t.decode = t.parse = n(65),
  9397. t.encode = t.stringify = n(66)
  9398. }
  9399. , function(e, t, n) {
  9400. "use strict";
  9401. function i(e, t) {
  9402. return Object.prototype.hasOwnProperty.call(e, t)
  9403. }
  9404. e.exports = function(e, t, n, s) {
  9405. t = t || "&",
  9406. n = n || "=";
  9407. var a = {};
  9408. if ("string" != typeof e || 0 === e.length)
  9409. return a;
  9410. var o = /\+/g;
  9411. e = e.split(t);
  9412. var c = 1e3;
  9413. s && "number" == typeof s.maxKeys && (c = s.maxKeys);
  9414. var l = e.length;
  9415. c > 0 && l > c && (l = c);
  9416. for (var h = 0; h < l; ++h) {
  9417. var u, f, d, p, g = e[h].replace(o, "%20"), m = g.indexOf(n);
  9418. m >= 0 ? (u = g.substr(0, m),
  9419. f = g.substr(m + 1)) : (u = g,
  9420. f = ""),
  9421. d = decodeURIComponent(u),
  9422. p = decodeURIComponent(f),
  9423. i(a, d) ? r(a[d]) ? a[d].push(p) : a[d] = [a[d], p] : a[d] = p
  9424. }
  9425. return a
  9426. }
  9427. ;
  9428. var r = Array.isArray || function(e) {
  9429. return "[object Array]" === Object.prototype.toString.call(e)
  9430. }
  9431. }
  9432. , function(e, t, n) {
  9433. "use strict";
  9434. var i = function(e) {
  9435. switch (typeof e) {
  9436. case "string":
  9437. return e;
  9438. case "boolean":
  9439. return e ? "true" : "false";
  9440. case "number":
  9441. return isFinite(e) ? e : "";
  9442. default:
  9443. return ""
  9444. }
  9445. };
  9446. e.exports = function(e, t, n, o) {
  9447. return t = t || "&",
  9448. n = n || "=",
  9449. null === e && (e = void 0),
  9450. "object" == typeof e ? s(a(e), (function(a) {
  9451. var o = encodeURIComponent(i(a)) + n;
  9452. return r(e[a]) ? s(e[a], (function(e) {
  9453. return o + encodeURIComponent(i(e))
  9454. }
  9455. )).join(t) : o + encodeURIComponent(i(e[a]))
  9456. }
  9457. )).join(t) : o ? encodeURIComponent(i(o)) + n + encodeURIComponent(i(e)) : ""
  9458. }
  9459. ;
  9460. var r = Array.isArray || function(e) {
  9461. return "[object Array]" === Object.prototype.toString.call(e)
  9462. }
  9463. ;
  9464. function s(e, t) {
  9465. if (e.map)
  9466. return e.map(t);
  9467. for (var n = [], i = 0; i < e.length; i++)
  9468. n.push(t(e[i], i));
  9469. return n
  9470. }
  9471. var a = Object.keys || function(e) {
  9472. var t = [];
  9473. for (var n in e)
  9474. Object.prototype.hasOwnProperty.call(e, n) && t.push(n);
  9475. return t
  9476. }
  9477. }
  9478. , function(e, t, n) {
  9479. !function() {
  9480. var t = n(68)
  9481. , i = n(20).utf8
  9482. , r = n(69)
  9483. , s = n(20).bin
  9484. , a = function(e, n) {
  9485. e.constructor == String ? e = n && "binary" === n.encoding ? s.stringToBytes(e) : i.stringToBytes(e) : r(e) ? e = Array.prototype.slice.call(e, 0) : Array.isArray(e) || (e = e.toString());
  9486. for (var o = t.bytesToWords(e), c = 8 * e.length, l = 1732584193, h = -271733879, u = -1732584194, f = 271733878, d = 0; d < o.length; d++)
  9487. o[d] = 16711935 & (o[d] << 8 | o[d] >>> 24) | 4278255360 & (o[d] << 24 | o[d] >>> 8);
  9488. o[c >>> 5] |= 128 << c % 32,
  9489. o[14 + (c + 64 >>> 9 << 4)] = c;
  9490. var p = a._ff
  9491. , g = a._gg
  9492. , m = a._hh
  9493. , y = a._ii;
  9494. for (d = 0; d < o.length; d += 16) {
  9495. var k = l
  9496. , v = h
  9497. , w = u
  9498. , b = f;
  9499. h = y(h = y(h = y(h = y(h = m(h = m(h = m(h = m(h = g(h = g(h = g(h = g(h = p(h = p(h = p(h = p(h, u = p(u, f = p(f, l = p(l, h, u, f, o[d + 0], 7, -680876936), h, u, o[d + 1], 12, -389564586), l, h, o[d + 2], 17, 606105819), f, l, o[d + 3], 22, -1044525330), u = p(u, f = p(f, l = p(l, h, u, f, o[d + 4], 7, -176418897), h, u, o[d + 5], 12, 1200080426), l, h, o[d + 6], 17, -1473231341), f, l, o[d + 7], 22, -45705983), u = p(u, f = p(f, l = p(l, h, u, f, o[d + 8], 7, 1770035416), h, u, o[d + 9], 12, -1958414417), l, h, o[d + 10], 17, -42063), f, l, o[d + 11], 22, -1990404162), u = p(u, f = p(f, l = p(l, h, u, f, o[d + 12], 7, 1804603682), h, u, o[d + 13], 12, -40341101), l, h, o[d + 14], 17, -1502002290), f, l, o[d + 15], 22, 1236535329), u = g(u, f = g(f, l = g(l, h, u, f, o[d + 1], 5, -165796510), h, u, o[d + 6], 9, -1069501632), l, h, o[d + 11], 14, 643717713), f, l, o[d + 0], 20, -373897302), u = g(u, f = g(f, l = g(l, h, u, f, o[d + 5], 5, -701558691), h, u, o[d + 10], 9, 38016083), l, h, o[d + 15], 14, -660478335), f, l, o[d + 4], 20, -405537848), u = g(u, f = g(f, l = g(l, h, u, f, o[d + 9], 5, 568446438), h, u, o[d + 14], 9, -1019803690), l, h, o[d + 3], 14, -187363961), f, l, o[d + 8], 20, 1163531501), u = g(u, f = g(f, l = g(l, h, u, f, o[d + 13], 5, -1444681467), h, u, o[d + 2], 9, -51403784), l, h, o[d + 7], 14, 1735328473), f, l, o[d + 12], 20, -1926607734), u = m(u, f = m(f, l = m(l, h, u, f, o[d + 5], 4, -378558), h, u, o[d + 8], 11, -2022574463), l, h, o[d + 11], 16, 1839030562), f, l, o[d + 14], 23, -35309556), u = m(u, f = m(f, l = m(l, h, u, f, o[d + 1], 4, -1530992060), h, u, o[d + 4], 11, 1272893353), l, h, o[d + 7], 16, -155497632), f, l, o[d + 10], 23, -1094730640), u = m(u, f = m(f, l = m(l, h, u, f, o[d + 13], 4, 681279174), h, u, o[d + 0], 11, -358537222), l, h, o[d + 3], 16, -722521979), f, l, o[d + 6], 23, 76029189), u = m(u, f = m(f, l = m(l, h, u, f, o[d + 9], 4, -640364487), h, u, o[d + 12], 11, -421815835), l, h, o[d + 15], 16, 530742520), f, l, o[d + 2], 23, -995338651), u = y(u, f = y(f, l = y(l, h, u, f, o[d + 0], 6, -198630844), h, u, o[d + 7], 10, 1126891415), l, h, o[d + 14], 15, -1416354905), f, l, o[d + 5], 21, -57434055), u = y(u, f = y(f, l = y(l, h, u, f, o[d + 12], 6, 1700485571), h, u, o[d + 3], 10, -1894986606), l, h, o[d + 10], 15, -1051523), f, l, o[d + 1], 21, -2054922799), u = y(u, f = y(f, l = y(l, h, u, f, o[d + 8], 6, 1873313359), h, u, o[d + 15], 10, -30611744), l, h, o[d + 6], 15, -1560198380), f, l, o[d + 13], 21, 1309151649), u = y(u, f = y(f, l = y(l, h, u, f, o[d + 4], 6, -145523070), h, u, o[d + 11], 10, -1120210379), l, h, o[d + 2], 15, 718787259), f, l, o[d + 9], 21, -343485551),
  9500. l = l + k >>> 0,
  9501. h = h + v >>> 0,
  9502. u = u + w >>> 0,
  9503. f = f + b >>> 0
  9504. }
  9505. return t.endian([l, h, u, f])
  9506. };
  9507. a._ff = function(e, t, n, i, r, s, a) {
  9508. var o = e + (t & n | ~t & i) + (r >>> 0) + a;
  9509. return (o << s | o >>> 32 - s) + t
  9510. }
  9511. ,
  9512. a._gg = function(e, t, n, i, r, s, a) {
  9513. var o = e + (t & i | n & ~i) + (r >>> 0) + a;
  9514. return (o << s | o >>> 32 - s) + t
  9515. }
  9516. ,
  9517. a._hh = function(e, t, n, i, r, s, a) {
  9518. var o = e + (t ^ n ^ i) + (r >>> 0) + a;
  9519. return (o << s | o >>> 32 - s) + t
  9520. }
  9521. ,
  9522. a._ii = function(e, t, n, i, r, s, a) {
  9523. var o = e + (n ^ (t | ~i)) + (r >>> 0) + a;
  9524. return (o << s | o >>> 32 - s) + t
  9525. }
  9526. ,
  9527. a._blocksize = 16,
  9528. a._digestsize = 16,
  9529. e.exports = function(e, n) {
  9530. if (null == e)
  9531. throw new Error("Illegal argument " + e);
  9532. var i = t.wordsToBytes(a(e, n));
  9533. return n && n.asBytes ? i : n && n.asString ? s.bytesToString(i) : t.bytesToHex(i)
  9534. }
  9535. }()
  9536. }
  9537. , function(e, t) {
  9538. !function() {
  9539. var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
  9540. , n = {
  9541. rotl: function(e, t) {
  9542. return e << t | e >>> 32 - t
  9543. },
  9544. rotr: function(e, t) {
  9545. return e << 32 - t | e >>> t
  9546. },
  9547. endian: function(e) {
  9548. if (e.constructor == Number)
  9549. return 16711935 & n.rotl(e, 8) | 4278255360 & n.rotl(e, 24);
  9550. for (var t = 0; t < e.length; t++)
  9551. e[t] = n.endian(e[t]);
  9552. return e
  9553. },
  9554. randomBytes: function(e) {
  9555. for (var t = []; e > 0; e--)
  9556. t.push(Math.floor(256 * Math.random()));
  9557. return t
  9558. },
  9559. bytesToWords: function(e) {
  9560. for (var t = [], n = 0, i = 0; n < e.length; n++,
  9561. i += 8)
  9562. t[i >>> 5] |= e[n] << 24 - i % 32;
  9563. return t
  9564. },
  9565. wordsToBytes: function(e) {
  9566. for (var t = [], n = 0; n < 32 * e.length; n += 8)
  9567. t.push(e[n >>> 5] >>> 24 - n % 32 & 255);
  9568. return t
  9569. },
  9570. bytesToHex: function(e) {
  9571. for (var t = [], n = 0; n < e.length; n++)
  9572. t.push((e[n] >>> 4).toString(16)),
  9573. t.push((15 & e[n]).toString(16));
  9574. return t.join("")
  9575. },
  9576. hexToBytes: function(e) {
  9577. for (var t = [], n = 0; n < e.length; n += 2)
  9578. t.push(parseInt(e.substr(n, 2), 16));
  9579. return t
  9580. },
  9581. bytesToBase64: function(e) {
  9582. for (var n = [], i = 0; i < e.length; i += 3)
  9583. for (var r = e[i] << 16 | e[i + 1] << 8 | e[i + 2], s = 0; s < 4; s++)
  9584. 8 * i + 6 * s <= 8 * e.length ? n.push(t.charAt(r >>> 6 * (3 - s) & 63)) : n.push("=");
  9585. return n.join("")
  9586. },
  9587. base64ToBytes: function(e) {
  9588. e = e.replace(/[^A-Z0-9+\/]/gi, "");
  9589. for (var n = [], i = 0, r = 0; i < e.length; r = ++i % 4)
  9590. 0 != r && n.push((t.indexOf(e.charAt(i - 1)) & Math.pow(2, -2 * r + 8) - 1) << 2 * r | t.indexOf(e.charAt(i)) >>> 6 - 2 * r);
  9591. return n
  9592. }
  9593. };
  9594. e.exports = n
  9595. }()
  9596. }
  9597. , function(e, t) {
  9598. function n(e) {
  9599. return !!e.constructor && "function" == typeof e.constructor.isBuffer && e.constructor.isBuffer(e)
  9600. }
  9601. /*!
  9602. * Determine if an object is a Buffer
  9603. *
  9604. * @author Feross Aboukhadijeh <https://feross.org>
  9605. * @license MIT
  9606. */
  9607. e.exports = function(e) {
  9608. return null != e && (n(e) || function(e) {
  9609. return "function" == typeof e.readFloatLE && "function" == typeof e.slice && n(e.slice(0, 0))
  9610. }(e) || !!e._isBuffer)
  9611. }
  9612. }
  9613. , function(e, t) {
  9614. e.exports = function(e, t, n, i, r, s, a, o, c) {
  9615. this.aiTypes = [{
  9616. id: 0,
  9617. src: "cow_1",
  9618. killScore: 150,
  9619. health: 500,
  9620. weightM: .8,
  9621. speed: 95e-5,
  9622. turnSpeed: .001,
  9623. scale: 72,
  9624. drop: ["food", 50]
  9625. }, {
  9626. id: 1,
  9627. src: "pig_1",
  9628. killScore: 200,
  9629. health: 800,
  9630. weightM: .6,
  9631. speed: 85e-5,
  9632. turnSpeed: .001,
  9633. scale: 72,
  9634. drop: ["food", 80]
  9635. }, {
  9636. id: 2,
  9637. name: "Bull",
  9638. src: "bull_2",
  9639. hostile: !0,
  9640. dmg: 20,
  9641. killScore: 1e3,
  9642. health: 1800,
  9643. weightM: .5,
  9644. speed: 94e-5,
  9645. turnSpeed: 74e-5,
  9646. scale: 78,
  9647. viewRange: 800,
  9648. chargePlayer: !0,
  9649. drop: ["food", 100]
  9650. }, {
  9651. id: 3,
  9652. name: "Bully",
  9653. src: "bull_1",
  9654. hostile: !0,
  9655. dmg: 20,
  9656. killScore: 2e3,
  9657. health: 2800,
  9658. weightM: .45,
  9659. speed: .001,
  9660. turnSpeed: 8e-4,
  9661. scale: 90,
  9662. viewRange: 900,
  9663. chargePlayer: !0,
  9664. drop: ["food", 400]
  9665. }, {
  9666. id: 4,
  9667. name: "Wolf",
  9668. src: "wolf_1",
  9669. hostile: !0,
  9670. dmg: 8,
  9671. killScore: 500,
  9672. health: 300,
  9673. weightM: .45,
  9674. speed: .001,
  9675. turnSpeed: .002,
  9676. scale: 84,
  9677. viewRange: 800,
  9678. chargePlayer: !0,
  9679. drop: ["food", 200]
  9680. }, {
  9681. id: 5,
  9682. name: "Quack",
  9683. src: "chicken_1",
  9684. dmg: 8,
  9685. killScore: 2e3,
  9686. noTrap: !0,
  9687. health: 300,
  9688. weightM: .2,
  9689. speed: .0018,
  9690. turnSpeed: .006,
  9691. scale: 70,
  9692. drop: ["food", 100]
  9693. }, {
  9694. id: 6,
  9695. name: "MOOSTAFA",
  9696. nameScale: 50,
  9697. src: "enemy",
  9698. hostile: !0,
  9699. dontRun: !0,
  9700. fixedSpawn: !0,
  9701. spawnDelay: 6e4,
  9702. noTrap: !0,
  9703. colDmg: 100,
  9704. dmg: 40,
  9705. killScore: 8e3,
  9706. health: 18e3,
  9707. weightM: .4,
  9708. speed: 7e-4,
  9709. turnSpeed: .01,
  9710. scale: 80,
  9711. spriteMlt: 1.8,
  9712. leapForce: .9,
  9713. viewRange: 1e3,
  9714. hitRange: 210,
  9715. hitDelay: 1e3,
  9716. chargePlayer: !0,
  9717. drop: ["food", 100]
  9718. }, {
  9719. id: 7,
  9720. name: "Treasure",
  9721. hostile: !0,
  9722. nameScale: 35,
  9723. src: "crate_1",
  9724. fixedSpawn: !0,
  9725. spawnDelay: 12e4,
  9726. colDmg: 200,
  9727. killScore: 5e3,
  9728. health: 2e4,
  9729. weightM: .1,
  9730. speed: 0,
  9731. turnSpeed: 0,
  9732. scale: 70,
  9733. spriteMlt: 1
  9734. }, {
  9735. id: 8,
  9736. name: "MOOFIE",
  9737. src: "wolf_2",
  9738. hostile: !0,
  9739. fixedSpawn: !0,
  9740. dontRun: !0,
  9741. hitScare: 4,
  9742. spawnDelay: 3e4,
  9743. noTrap: !0,
  9744. nameScale: 35,
  9745. dmg: 10,
  9746. colDmg: 100,
  9747. killScore: 3e3,
  9748. health: 7e3,
  9749. weightM: .45,
  9750. speed: .0015,
  9751. turnSpeed: .002,
  9752. scale: 90,
  9753. viewRange: 800,
  9754. chargePlayer: !0,
  9755. drop: ["food", 1e3]
  9756. }],
  9757. this.spawn = function(l, h, u, f) {
  9758. for (var d, p = 0; p < e.length; ++p)
  9759. if (!e[p].active) {
  9760. d = e[p];
  9761. break
  9762. }
  9763. return d || (d = new t(e.length,r,n,i,a,s,o,c),
  9764. e.push(d)),
  9765. d.init(l, h, u, f, this.aiTypes[f]),
  9766. d
  9767. }
  9768. }
  9769. }
  9770. , function(e, t) {
  9771. var n = 2 * Math.PI;
  9772. e.exports = function(e, t, i, r, s, a, o, c) {
  9773. this.sid = e,
  9774. this.isAI = !0,
  9775. this.nameIndex = s.randInt(0, a.cowNames.length - 1),
  9776. this.init = function(e, t, n, i, r) {
  9777. this.x = e,
  9778. this.y = t,
  9779. this.startX = r.fixedSpawn ? e : null,
  9780. this.startY = r.fixedSpawn ? t : null,
  9781. this.xVel = 0,
  9782. this.yVel = 0,
  9783. this.zIndex = 0,
  9784. this.dir = n,
  9785. this.dirPlus = 0,
  9786. this.index = i,
  9787. this.src = r.src,
  9788. r.name && (this.name = r.name),
  9789. this.weightM = r.weightM,
  9790. this.speed = r.speed,
  9791. this.killScore = r.killScore,
  9792. this.turnSpeed = r.turnSpeed,
  9793. this.scale = r.scale,
  9794. this.maxHealth = r.health,
  9795. this.leapForce = r.leapForce,
  9796. this.health = this.maxHealth,
  9797. this.chargePlayer = r.chargePlayer,
  9798. this.viewRange = r.viewRange,
  9799. this.drop = r.drop,
  9800. this.dmg = r.dmg,
  9801. this.hostile = r.hostile,
  9802. this.dontRun = r.dontRun,
  9803. this.hitRange = r.hitRange,
  9804. this.hitDelay = r.hitDelay,
  9805. this.hitScare = r.hitScare,
  9806. this.spriteMlt = r.spriteMlt,
  9807. this.nameScale = r.nameScale,
  9808. this.colDmg = r.colDmg,
  9809. this.noTrap = r.noTrap,
  9810. this.spawnDelay = r.spawnDelay,
  9811. this.hitWait = 0,
  9812. this.waitCount = 1e3,
  9813. this.moveCount = 0,
  9814. this.targetDir = 0,
  9815. this.active = !0,
  9816. this.alive = !0,
  9817. this.runFrom = null,
  9818. this.chargeTarget = null,
  9819. this.dmgOverTime = {}
  9820. }
  9821. ;
  9822. var l = 0;
  9823. this.update = function(e) {
  9824. if (this.active) {
  9825. if (this.spawnCounter)
  9826. return this.spawnCounter -= e,
  9827. void (this.spawnCounter <= 0 && (this.spawnCounter = 0,
  9828. this.x = this.startX || s.randInt(0, a.mapScale),
  9829. this.y = this.startY || s.randInt(0, a.mapScale)));
  9830. (l -= e) <= 0 && (this.dmgOverTime.dmg && (this.changeHealth(-this.dmgOverTime.dmg, this.dmgOverTime.doer),
  9831. this.dmgOverTime.time -= 1,
  9832. this.dmgOverTime.time <= 0 && (this.dmgOverTime.dmg = 0)),
  9833. l = 1e3);
  9834. var r = !1
  9835. , o = 1;
  9836. if (!this.zIndex && !this.lockMove && this.y >= a.mapScale / 2 - a.riverWidth / 2 && this.y <= a.mapScale / 2 + a.riverWidth / 2 && (o = .33,
  9837. this.xVel += a.waterCurrent * e),
  9838. this.lockMove)
  9839. this.xVel = 0,
  9840. this.yVel = 0;
  9841. else if (this.waitCount > 0) {
  9842. if (this.waitCount -= e,
  9843. this.waitCount <= 0)
  9844. if (this.chargePlayer) {
  9845. for (var h, u, f, d = 0; d < i.length; ++d)
  9846. !i[d].alive || i[d].skin && i[d].skin.bullRepel || (f = s.getDistance(this.x, this.y, i[d].x, i[d].y)) <= this.viewRange && (!h || f < u) && (u = f,
  9847. h = i[d]);
  9848. h ? (this.chargeTarget = h,
  9849. this.moveCount = s.randInt(8e3, 12e3)) : (this.moveCount = s.randInt(1e3, 2e3),
  9850. this.targetDir = s.randFloat(-Math.PI, Math.PI))
  9851. } else
  9852. this.moveCount = s.randInt(4e3, 1e4),
  9853. this.targetDir = s.randFloat(-Math.PI, Math.PI)
  9854. } else if (this.moveCount > 0) {
  9855. var p = this.speed * o;
  9856. if (this.runFrom && this.runFrom.active && (!this.runFrom.isPlayer || this.runFrom.alive) ? (this.targetDir = s.getDirection(this.x, this.y, this.runFrom.x, this.runFrom.y),
  9857. p *= 1.42) : this.chargeTarget && this.chargeTarget.alive && (this.targetDir = s.getDirection(this.chargeTarget.x, this.chargeTarget.y, this.x, this.y),
  9858. p *= 1.75,
  9859. r = !0),
  9860. this.hitWait && (p *= .3),
  9861. this.dir != this.targetDir) {
  9862. this.dir %= n;
  9863. var g = (this.dir - this.targetDir + n) % n
  9864. , m = Math.min(Math.abs(g - n), g, this.turnSpeed * e)
  9865. , y = g - Math.PI >= 0 ? 1 : -1;
  9866. this.dir += y * m + n
  9867. }
  9868. this.dir %= n,
  9869. this.xVel += p * e * Math.cos(this.dir),
  9870. this.yVel += p * e * Math.sin(this.dir),
  9871. this.moveCount -= e,
  9872. this.moveCount <= 0 && (this.runFrom = null,
  9873. this.chargeTarget = null,
  9874. this.waitCount = this.hostile ? 1500 : s.randInt(1500, 6e3))
  9875. }
  9876. this.zIndex = 0,
  9877. this.lockMove = !1;
  9878. var k = s.getDistance(0, 0, this.xVel * e, this.yVel * e)
  9879. , v = Math.min(4, Math.max(1, Math.round(k / 40)))
  9880. , w = 1 / v;
  9881. for (d = 0; d < v; ++d) {
  9882. this.xVel && (this.x += this.xVel * e * w),
  9883. this.yVel && (this.y += this.yVel * e * w),
  9884. M = t.getGridArrays(this.x, this.y, this.scale);
  9885. for (var b = 0; b < M.length; ++b)
  9886. for (var x = 0; x < M[b].length; ++x)
  9887. M[b][x].active && t.checkCollision(this, M[b][x], w)
  9888. }
  9889. var S, T, I, E = !1;
  9890. if (this.hitWait > 0 && (this.hitWait -= e,
  9891. this.hitWait <= 0)) {
  9892. E = !0,
  9893. this.hitWait = 0,
  9894. this.leapForce && !s.randInt(0, 2) && (this.xVel += this.leapForce * Math.cos(this.dir),
  9895. this.yVel += this.leapForce * Math.sin(this.dir));
  9896. for (var M = t.getGridArrays(this.x, this.y, this.hitRange), A = 0; A < M.length; ++A)
  9897. for (b = 0; b < M[A].length; ++b)
  9898. (S = M[A][b]).health && (T = s.getDistance(this.x, this.y, S.x, S.y)) < S.scale + this.hitRange && (S.changeHealth(5 * -this.dmg) && t.disableObj(S),
  9899. t.hitObj(S, s.getDirection(this.x, this.y, S.x, S.y)));
  9900. for (b = 0; b < i.length; ++b)
  9901. i[b].canSee(this) && c.send(i[b].id, "aa", this.sid)
  9902. }
  9903. if (r || E)
  9904. for (d = 0; d < i.length; ++d)
  9905. (S = i[d]) && S.alive && (T = s.getDistance(this.x, this.y, S.x, S.y),
  9906. this.hitRange ? !this.hitWait && T <= this.hitRange + S.scale && (E ? (I = s.getDirection(S.x, S.y, this.x, this.y),
  9907. S.changeHealth(-this.dmg),
  9908. S.xVel += .6 * Math.cos(I),
  9909. S.yVel += .6 * Math.sin(I),
  9910. this.runFrom = null,
  9911. this.chargeTarget = null,
  9912. this.waitCount = 3e3,
  9913. this.hitWait = s.randInt(0, 2) ? 0 : 600) : this.hitWait = this.hitDelay) : T <= this.scale + S.scale && (I = s.getDirection(S.x, S.y, this.x, this.y),
  9914. S.changeHealth(-this.dmg),
  9915. S.xVel += .55 * Math.cos(I),
  9916. S.yVel += .55 * Math.sin(I)));
  9917. this.xVel && (this.xVel *= Math.pow(a.playerDecel, e)),
  9918. this.yVel && (this.yVel *= Math.pow(a.playerDecel, e));
  9919. var P = this.scale;
  9920. this.x - P < 0 ? (this.x = P,
  9921. this.xVel = 0) : this.x + P > a.mapScale && (this.x = a.mapScale - P,
  9922. this.xVel = 0),
  9923. this.y - P < 0 ? (this.y = P,
  9924. this.yVel = 0) : this.y + P > a.mapScale && (this.y = a.mapScale - P,
  9925. this.yVel = 0)
  9926. }
  9927. }
  9928. ,
  9929. this.canSee = function(e) {
  9930. if (!e)
  9931. return !1;
  9932. if (e.skin && e.skin.invisTimer && e.noMovTimer >= e.skin.invisTimer)
  9933. return !1;
  9934. var t = Math.abs(e.x - this.x) - e.scale
  9935. , n = Math.abs(e.y - this.y) - e.scale;
  9936. return t <= a.maxScreenWidth / 2 * 1.3 && n <= a.maxScreenHeight / 2 * 1.3
  9937. }
  9938. ;
  9939. var h = 0
  9940. , u = 0;
  9941. this.animate = function(e) {
  9942. this.animTime > 0 && (this.animTime -= e,
  9943. this.animTime <= 0 ? (this.animTime = 0,
  9944. this.dirPlus = 0,
  9945. h = 0,
  9946. u = 0) : 0 == u ? (h += e / (this.animSpeed * a.hitReturnRatio),
  9947. this.dirPlus = s.lerp(0, this.targetAngle, Math.min(1, h)),
  9948. h >= 1 && (h = 1,
  9949. u = 1)) : (h -= e / (this.animSpeed * (1 - a.hitReturnRatio)),
  9950. this.dirPlus = s.lerp(0, this.targetAngle, Math.max(0, h))))
  9951. }
  9952. ,
  9953. this.startAnim = function() {
  9954. this.animTime = this.animSpeed = 600,
  9955. this.targetAngle = .8 * Math.PI,
  9956. h = 0,
  9957. u = 0
  9958. }
  9959. ,
  9960. this.changeHealth = function(e, t, n) {
  9961. if (this.active && (this.health += e,
  9962. n && (this.hitScare && !s.randInt(0, this.hitScare) ? (this.runFrom = n,
  9963. this.waitCount = 0,
  9964. this.moveCount = 2e3) : this.hostile && this.chargePlayer && n.isPlayer ? (this.chargeTarget = n,
  9965. this.waitCount = 0,
  9966. this.moveCount = 8e3) : this.dontRun || (this.runFrom = n,
  9967. this.waitCount = 0,
  9968. this.moveCount = 2e3)),
  9969. e < 0 && this.hitRange && s.randInt(0, 1) && (this.hitWait = 500),
  9970. t && t.canSee(this) && e < 0 && c.send(t.id, "t", Math.round(this.x), Math.round(this.y), Math.round(-e), 1),
  9971. this.health <= 0 && (this.spawnDelay ? (this.spawnCounter = this.spawnDelay,
  9972. this.x = -1e6,
  9973. this.y = -1e6) : (this.x = this.startX || s.randInt(0, a.mapScale),
  9974. this.y = this.startY || s.randInt(0, a.mapScale)),
  9975. this.health = this.maxHealth,
  9976. this.runFrom = null,
  9977. t && (o(t, this.killScore),
  9978. this.drop))))
  9979. for (var i = 0; i < this.drop.length; )
  9980. t.addResource(a.resourceTypes.indexOf(this.drop[i]), this.drop[i + 1]),
  9981. i += 2
  9982. }
  9983. }
  9984. }
  9985. ]);
  9986. //# sourceMappingURL=bundle.js.map