mooapi

just a test

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.gf.qytechs.cn/scripts/497804/1393975/mooapi.js

  1. // ==UserScript==
  2. // @name mooapi
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description mooapi
  6. // @author Influxes
  7. // @match *://*.moomoo.io/*
  8. // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
  9. // ==/UserScript==
  10.  
  11. window.addEventListener('load', function() {
  12.  
  13.  
  14. var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; };
  15. if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } }
  16. {
  17. let window = _____WB$wombat$assign$function_____("window");
  18. let self = _____WB$wombat$assign$function_____("self");
  19. let document = _____WB$wombat$assign$function_____("document");
  20. let location = _____WB$wombat$assign$function_____("location");
  21. let top = _____WB$wombat$assign$function_____("top");
  22. let parent = _____WB$wombat$assign$function_____("parent");
  23. let frames = _____WB$wombat$assign$function_____("frames");
  24. let opener = _____WB$wombat$assign$function_____("opener");
  25.  
  26. // ==UserScript==
  27. // @name MooMoo.js
  28. // @author Nuro
  29. // @version 2.1.3
  30. // ==/UserScript==
  31. (() => {
  32. var e = {
  33. 6791: e => {
  34. var t;
  35. t = function(e) {
  36. var t;
  37. var r, n, t, M, m;
  38. m = [];
  39. M = 0;
  40. n = 0;
  41. while (n < e.length) {
  42. r = e[n];
  43. if (r === "\n") {
  44. t = e.substring(M, n);
  45. m.push(t);
  46. M = n + 1;
  47. }
  48. n++;
  49. }
  50. if (M < e.length) {
  51. t = e.substring(M);
  52. m.push(t);
  53. }
  54. return m;
  55. };
  56. e.exports = t;
  57. },
  58. 2486: (e, t, r) => {
  59. "use strict";
  60. Object.defineProperty(t, "__esModule", {
  61. value: true
  62. });
  63. t.MooMoo = void 0;
  64. let n = Function.prototype;
  65. t.MooMoo = n[69];
  66. if (!t.MooMoo) {
  67. const e = r(8156).A;
  68. const n = r(8044).updateHookPosition;
  69. const M = r(9137).A;
  70. t.MooMoo = new e;
  71. Object.defineProperty(Function.prototype, 69, {
  72. get() {
  73. return t.MooMoo;
  74. }
  75. });
  76. let m = Symbol();
  77. Object.defineProperty(Object.prototype, "x", {
  78. set(e) {
  79. this[m] = e;
  80. n.call(this, e);
  81. },
  82. get() {
  83. return this[m];
  84. }
  85. });
  86. M();
  87. }
  88. },
  89. 8156: (e, t, r) => {
  90. "use strict";
  91. var n;
  92. n = {
  93. value: true
  94. };
  95. const M = r(5258);
  96. const m = r(4902);
  97. const p = r(2609);
  98. const y = r(2555);
  99. const h = r(227);
  100. const b = r(2093);
  101. const P = r(5106);
  102. const v = r(6832);
  103. const k = r(3407);
  104. const _ = r(6475);
  105. const j = r(4560);
  106. const x = r(2550);
  107. class Game extends M.default {
  108. constructor() {
  109. super();
  110. this.teams = [];
  111. this.myPlayer = {};
  112. this.statistics = {};
  113. this.DidInit = false;
  114. this.GamePlayerManager = new p.default;
  115. this.ActivePlayerManager = new p.default;
  116. this.LeaderboardManager = new y.default;
  117. this.GameObjectManager = new h.default;
  118. this.CommandManager = new b.default;
  119. this.PacketManager = new P.default;
  120. this.PacketInterceptor = new x.default;
  121. this.BotManager = v.default.instance;
  122. this.UTILS = new j.default;
  123. this.vars = {};
  124. this.msgpack = {};
  125. this.msgpack.decode = k.default;
  126. this.msgpack.encode = _.default;
  127. this.vars.gameLoaded = false;
  128. }
  129. debug(e) {
  130. this.emit("debug", e);
  131. }
  132. }
  133. t.A = Game;
  134. (0, m.default)();
  135. },
  136. 2555: (e, t, r) => {
  137. "use strict";
  138. Object.defineProperty(t, "__esModule", {
  139. value: true
  140. });
  141. const n = r(9703);
  142. const M = r(2486);
  143. const m = r(8233);
  144. class Leaderboardmanager {
  145. constructor() {
  146. this.leaderboard = new Map;
  147. }
  148. updateLeaderboard(e) {
  149. let t = (0, n.default)(e, 3);
  150. let r = e.length / 3;
  151. t.forEach(((e, t) => {
  152. let r = M.MooMoo.GamePlayerManager.getPlayerBySid(e[0]);
  153. if (!r) {
  154. r = new m.default(e[0]);
  155. r.sid = e[0];
  156. r.name = e[1];
  157. M.MooMoo.GamePlayerManager.addPlayer(r);
  158. }
  159. this.leaderboard.set(t + 1, {
  160. player: r,
  161. sid: e[0],
  162. name: e[1],
  163. score: e[2]
  164. });
  165. }));
  166. }
  167. clearLeaderboard() {
  168. this.leaderboard = new Map;
  169. }
  170. }
  171. t["default"] = Leaderboardmanager;
  172. },
  173. 227: (e, t, r) => {
  174. "use strict";
  175. Object.defineProperty(t, "__esModule", {
  176. value: true
  177. });
  178. const n = r(2486);
  179. const M = r(1917);
  180. class ObjectManager {
  181. constructor() {
  182. this.objects = new Map;
  183. }
  184. addObject(e) {
  185. let t = n.MooMoo.GameObjectManager.getGameObjectBySid(e.sid);
  186. if (!t) {
  187. t = new M.default(e.sid);
  188. }
  189. t.x = e.x;
  190. t.y = e.y;
  191. t.ownerSid = e.ownerSid;
  192. t.type = e.type;
  193. t.sid = e.sid;
  194. this.objects.set(e.sid, t);
  195. }
  196. getGameObjectBySid(e) {
  197. return this.objects.get(e);
  198. }
  199. getObjectsByOwnerSid(e) {
  200. let t = [];
  201. this.objects.forEach((r => {
  202. if (r.ownerSid == e) {
  203. t.push(r);
  204. }
  205. }));
  206. return t;
  207. }
  208. removeObjectBySid(e) {
  209. this.objects.delete(e);
  210. }
  211. removeObjectsByOwnerSid(e) {
  212. this.objects.forEach((t => {
  213. if (t.ownerSid == e) {
  214. this.objects.delete(t.sid);
  215. }
  216. }));
  217. }
  218. }
  219. t["default"] = ObjectManager;
  220. },
  221. 2550: (e, t, r) => {
  222. "use strict";
  223. Object.defineProperty(t, "__esModule", {
  224. value: true
  225. });
  226. const n = r(4902);
  227. class PacketInterceptor {
  228. constructor() {
  229. this.clientCallbacks = new Map;
  230. this.serverCallbacks = new Map;
  231. this.lastCallbackId = 0;
  232. }
  233. addCallback(e, t) {
  234. let r;
  235. if (e === "client") {
  236. r = this.clientCallbacks;
  237. } else if (e === "server") {
  238. r = this.serverCallbacks;
  239. }
  240. const n = this.lastCallbackId++;
  241. r.set(n, t);
  242. return n;
  243. }
  244. removeCallback(e) {
  245. this.clientCallbacks.delete(e);
  246. this.serverCallbacks.delete(e);
  247. }
  248. applyClientCallbacks(e) {
  249. if (!this.clientCallbacks.size) return e;
  250. for (const [t, r] of this.clientCallbacks) {
  251. e = r(e) || e;
  252. }
  253. return e;
  254. }
  255. applyServerCallbacks(e) {
  256. if (!this.serverCallbacks.size) return e;
  257. for (const [t, r] of this.serverCallbacks) {
  258. e = r(e);
  259. }
  260. return e;
  261. }
  262. getOriginalServerCallback() {
  263. return n.onmessagecallback;
  264. }
  265. }
  266. t["default"] = PacketInterceptor;
  267. },
  268. 5106: (e, t, r) => {
  269. "use strict";
  270. Object.defineProperty(t, "__esModule", {
  271. value: true
  272. });
  273. const n = r(5258);
  274. class PacketManager extends n.default {
  275. constructor() {
  276. super();
  277. this._packetCountPerMinute = 0;
  278. this._packetCountPerSecond = 0;
  279. this._packetTime = 60;
  280. this._packetLimitPerMinute = 5400;
  281. this._packetLimitPerSecond = 120;
  282. }
  283. initialize() {
  284. this._startTimerPerMinute();
  285. this._startTimerPerSecond();
  286. }
  287. addPacket() {
  288. this._packetCountPerSecond++;
  289. this._packetCountPerMinute++;
  290. const e = this.getKickPercentagePerMinute();
  291. const t = this.getKickPercentagePerSecond();
  292. if (e >= 100) {
  293. this.emit("Kick", this);
  294. }
  295. if (t >= 100) {
  296. this.emit("Kick", this);
  297. }
  298. this.emit("update", this);
  299. }
  300. getKickPercentagePerMinute() {
  301. return this._packetCountPerMinute / this._packetLimitPerMinute * 100;
  302. }
  303. getKickPercentagePerSecond() {
  304. return this._packetCountPerSecond / this._packetLimitPerSecond * 100;
  305. }
  306. getPacketCountPerMinute() {
  307. return this._packetCountPerMinute;
  308. }
  309. getPacketCountPerSecond() {
  310. return this._packetCountPerSecond;
  311. }
  312. getPacketTime() {
  313. return this._packetTime;
  314. }
  315. _startTimerPerMinute() {
  316. this._intervalIdPerMinute = setInterval((() => {
  317. this._resetPacketCountPerMinute();
  318. }), 6e4);
  319. }
  320. _startTimerPerSecond() {
  321. this._intervalIdPerSecond = setInterval((() => {
  322. if (this._packetCountPerSecond > this._packetLimitPerSecond) {
  323. this.emit("Kick", this.getKickPercentagePerSecond());
  324. }
  325. this._resetPacketCountPerSecond();
  326. }), 1e3);
  327. }
  328. _resetPacketCountPerMinute() {
  329. this._packetCountPerMinute = 0;
  330. this._packetTime = 60;
  331. }
  332. _resetPacketCountPerSecond() {
  333. this._packetCountPerSecond = 0;
  334. }
  335. }
  336. t["default"] = PacketManager;
  337. },
  338. 2609: (e, t, r) => {
  339. "use strict";
  340. Object.defineProperty(t, "__esModule", {
  341. value: true
  342. });
  343. const n = r(2486);
  344. class PlayerManager {
  345. constructor() {
  346. this.players = [];
  347. }
  348. addPlayer(e) {
  349. this.players.push(e);
  350. }
  351. removePlayer(e) {
  352. this.players.splice(this.players.indexOf(e), 1);
  353. }
  354. removePlayerBySid(e) {
  355. this.players.splice(this.players.findIndex((t => t.sid === e)), 1);
  356. }
  357. removePlayerById(e) {
  358. this.players.splice(this.players.findIndex((t => t.id === e)), 1);
  359. }
  360. getPlayerBySid(e) {
  361. return this.players.find((t => t.sid === e));
  362. }
  363. getPlayerById(e) {
  364. return this.players.find((t => t.id === e));
  365. }
  366. getPlayerByName(e) {
  367. let t = this.players.filter((t => t.name === e));
  368. if (t.length > 1) {
  369. return t;
  370. } else return t[0];
  371. }
  372. clearPlayers() {
  373. this.players = [];
  374. }
  375. updatePlayer(e, t) {
  376. let r = this.getPlayerBySid(e);
  377. if (r) {
  378. Object.assign(r, t);
  379. }
  380. }
  381. getEnemies() {
  382. return this.players.filter((e => {
  383. if (e.id !== n.MooMoo.myPlayer.id) {
  384. if (e.team === null) {
  385. return true;
  386. }
  387. if (e.team !== n.MooMoo.myPlayer.team) {
  388. return true;
  389. }
  390. }
  391. }));
  392. }
  393. getTeammates() {
  394. return this.players.filter((e => {
  395. if (e.id !== n.MooMoo.myPlayer.id) {
  396. if (e.team === n.MooMoo.myPlayer.team) {
  397. return true;
  398. }
  399. }
  400. }));
  401. }
  402. getClosestEnemy() {
  403. let e = this.getEnemies();
  404. let t = e[0];
  405. if (!e) return null;
  406. e.forEach((e => {
  407. if (n.MooMoo.UTILS.getDistanceBetweenTwoPoints(n.MooMoo.myPlayer.x, n.MooMoo.myPlayer.y, e.x, e.y) < n.MooMoo.UTILS.getDistanceBetweenTwoPoints(n.MooMoo.myPlayer.x, n.MooMoo.myPlayer.y, t.x, t.y)) {
  408. t = e;
  409. }
  410. }));
  411. return t;
  412. }
  413. getClosestTeammate() {
  414. let e = this.getTeammates();
  415. let t = e[0];
  416. if (!e) return null;
  417. e.forEach((e => {
  418. if (n.MooMoo.UTILS.getDistanceBetweenTwoPoints(n.MooMoo.myPlayer.x, n.MooMoo.myPlayer.y, e.x, e.y) < n.MooMoo.UTILS.getDistanceBetweenTwoPoints(n.MooMoo.myPlayer.x, n.MooMoo.myPlayer.y, t.x, t.y)) {
  419. t = e;
  420. }
  421. }));
  422. return t;
  423. }
  424. getClosestPlayer() {
  425. let e = this.players[0];
  426. if (!this.players) return null;
  427. this.players.forEach((t => {
  428. if (n.MooMoo.UTILS.getDistanceBetweenTwoPoints(n.MooMoo.myPlayer.x, n.MooMoo.myPlayer.y, t.x, t.y) < n.MooMoo.UTILS.getDistanceBetweenTwoPoints(n.MooMoo.myPlayer.x, n.MooMoo.myPlayer.y, e.x, e.y)) {
  429. e = t;
  430. }
  431. }));
  432. return e;
  433. }
  434. getClosestEnemyToPlayer(e) {
  435. let t = this.getEnemies();
  436. let r = t[0];
  437. if (!t) return null;
  438. t.forEach((t => {
  439. if (n.MooMoo.UTILS.getDistanceBetweenTwoPoints(e.x, e.y, t.x, t.y) < n.MooMoo.UTILS.getDistanceBetweenTwoPoints(e.x, e.y, r.x, r.y)) {
  440. r = t;
  441. }
  442. }));
  443. return r;
  444. }
  445. getClosestEnemyAngle() {
  446. let e = this.getClosestEnemy();
  447. if (!e) return null;
  448. return n.MooMoo.UTILS.getAngleBetweenTwoPoints(n.MooMoo.myPlayer.x, n.MooMoo.myPlayer.y, e.x, e.y);
  449. }
  450. getClosestEnemyDistance() {
  451. let e = this.getClosestEnemy();
  452. if (!e) return null;
  453. return n.MooMoo.UTILS.getDistanceBetweenTwoPoints(n.MooMoo.myPlayer.x, n.MooMoo.myPlayer.y, e.x, e.y);
  454. }
  455. }
  456. t["default"] = PlayerManager;
  457. },
  458. 4560: (e, t) => {
  459. "use strict";
  460. Object.defineProperty(t, "__esModule", {
  461. value: true
  462. });
  463. class UTILS {
  464. static getDistanceBetweenTwoPoints(e, t, r, n) {
  465. return Math.sqrt(Math.pow(r - e, 2) + Math.pow(n - t, 2));
  466. }
  467. static getAngleBetweenTwoPoints(e, t, r, n) {
  468. return Math.atan2(n - t, r - e);
  469. }
  470. static atan2(e, t, r, n) {
  471. return Math.atan2(n - t, r - e);
  472. }
  473. constructor() {
  474. this.getDistanceBetweenTwoPoints = UTILS.getDistanceBetweenTwoPoints;
  475. this.dist = UTILS.getDistanceBetweenTwoPoints;
  476. this.distance = UTILS.getDistanceBetweenTwoPoints;
  477. this.atan2 = UTILS.atan2;
  478. this.angle = UTILS.atan2;
  479. this.getAngleBetweenTwoPoints = UTILS.getAngleBetweenTwoPoints;
  480. }
  481. }
  482. t["default"] = UTILS;
  483. },
  484. 2093: (e, t, r) => {
  485. "use strict";
  486. Object.defineProperty(t, "__esModule", {
  487. value: true
  488. });
  489. const n = r(1091);
  490. class CommandManager {
  491. constructor() {
  492. this.commands = {};
  493. this.prefix = "/";
  494. }
  495. setPrefix(e) {
  496. this.prefix = e;
  497. }
  498. registerCommand(e, t) {
  499. let r = new n.default(e, t);
  500. this.commands[e] = r;
  501. }
  502. unregisterCommand(e) {
  503. delete this.commands[e];
  504. }
  505. }
  506. t["default"] = CommandManager;
  507. },
  508. 5258: (e, t) => {
  509. "use strict";
  510. Object.defineProperty(t, "__esModule", {
  511. value: true
  512. });
  513. class EventEmitter {
  514. constructor() {
  515. this._listeners = {};
  516. }
  517. on(e, t) {
  518. if (!this._listeners[e]) {
  519. this._listeners[e] = [];
  520. }
  521. this._listeners[e].push(t);
  522. }
  523. once(e, t) {
  524. this.on(e, (function g(...r) {
  525. this.off(e, g);
  526. t(...r);
  527. }));
  528. }
  529. emit(e, ...t) {
  530. if (this._listeners[e]) {
  531. this._listeners[e].forEach((e => e(...t)));
  532. }
  533. }
  534. addEventListener(e, t) {
  535. this.on(e, t);
  536. }
  537. }
  538. t["default"] = EventEmitter;
  539. },
  540. 8730: (e, t, r) => {
  541. "use strict";
  542. Object.defineProperty(t, "__esModule", {
  543. value: true
  544. });
  545. const n = r(2486);
  546. function cacheItems() {
  547. n.MooMoo.myPlayer.inventory = {};
  548. const e = [ {
  549. category: "primary",
  550. start: 0,
  551. end: 9
  552. }, {
  553. category: "secondary",
  554. start: 9,
  555. end: 16
  556. }, {
  557. category: "food",
  558. start: 16,
  559. end: 19,
  560. subtract: true
  561. }, {
  562. category: "wall",
  563. start: 19,
  564. end: 22,
  565. subtract: true
  566. }, {
  567. category: "spike",
  568. start: 22,
  569. end: 26,
  570. subtract: true
  571. }, {
  572. category: "mill",
  573. start: 26,
  574. end: 29,
  575. subtract: true
  576. }, {
  577. category: "mine",
  578. start: 29,
  579. end: 31,
  580. subtract: true
  581. }, {
  582. category: "boostPad",
  583. start: 31,
  584. end: 33,
  585. subtract: true
  586. }, {
  587. category: "trap",
  588. start: 31,
  589. end: 33,
  590. subtract: true
  591. }, {
  592. category: "turret",
  593. start: 33,
  594. end: 39,
  595. subtract: true
  596. }, {
  597. category: "spawnPad",
  598. start: 36,
  599. end: 37,
  600. subtract: true
  601. } ];
  602. for (let t = 0; t < e.length; t++) {
  603. const {category: r, start: M, end: m, subtract: p} = e[t];
  604. for (let e = M; e < m; e++) {
  605. const t = document.getElementById(`actionBarItem${e}`);
  606. if (t && t.offsetParent !== null) {
  607. n.MooMoo.myPlayer.inventory[r] = p ? e - 16 : e;
  608. break;
  609. }
  610. }
  611. }
  612. }
  613. t["default"] = cacheItems;
  614. },
  615. 9703: (e, t) => {
  616. "use strict";
  617. Object.defineProperty(t, "__esModule", {
  618. value: true
  619. });
  620. function chunk(e, t) {
  621. let r = [];
  622. for (let n = 0; n < e.length; n += t) {
  623. r.push(e.slice(n, n + t));
  624. }
  625. return r;
  626. }
  627. t["default"] = chunk;
  628. },
  629. 9371: function(e, t, r) {
  630. "use strict";
  631. var n = this && this.__awaiter || function(e, t, r, n) {
  632. function adopt(e) {
  633. return e instanceof r ? e : new r((function(t) {
  634. t(e);
  635. }));
  636. }
  637. return new (r || (r = Promise))((function(r, M) {
  638. function fulfilled(e) {
  639. try {
  640. step(n.next(e));
  641. } catch (e) {
  642. M(e);
  643. }
  644. }
  645. function rejected(e) {
  646. try {
  647. step(n["throw"](e));
  648. } catch (e) {
  649. M(e);
  650. }
  651. }
  652. function step(e) {
  653. e.done ? r(e.value) : adopt(e.value).then(fulfilled, rejected);
  654. }
  655. step((n = n.apply(e, t || [])).next());
  656. }));
  657. };
  658. Object.defineProperty(t, "__esModule", {
  659. value: true
  660. });
  661. const M = r(5258);
  662. const m = r(3694);
  663. const p = r(8329);
  664. const y = r(2486);
  665. class Bot extends M.default {
  666. constructor(e = false, t) {
  667. super();
  668. this.connected = false;
  669. if (!e) {
  670. this.name = "Bot";
  671. this.skin = 0;
  672. this.moofoll = false;
  673. } else {
  674. this.name = t.name;
  675. this.skin = t.skin;
  676. this.moofoll = t.moofoll;
  677. }
  678. this.gameID = null;
  679. }
  680. generateToken() {
  681. return n(this, void 0, void 0, (function*() {
  682. try {
  683. const e = yield window.grecaptcha.execute("6LfahtgjAAAAAF8SkpjyeYMcxMdxIaQeh-VoPATP", {
  684. action: "homepage"
  685. });
  686. return e;
  687. } catch (e) {
  688. throw e;
  689. }
  690. }));
  691. }
  692. join(e) {
  693. return n(this, void 0, void 0, (function*() {
  694. switch (typeof e) {
  695. case "string":
  696. {
  697. let {region: t, index: r} = m.default.parseServer(e);
  698. let n = new p.default(t, r);
  699. this.recaptchaToken = yield this.generateToken();
  700. n.joinServer(this);
  701. break;
  702. }
  703.  
  704. case "object":
  705. {
  706. if (Array.isArray(e)) {
  707. let [t, r] = e;
  708. let n = new p.default(t, r);
  709. this.recaptchaToken = yield this.generateToken();
  710. n.joinServer(this);
  711. } else {
  712. let {region: t, index: r} = e;
  713. let n = new p.default(t, r);
  714. this.recaptchaToken = yield this.generateToken();
  715. n.joinServer(this);
  716. }
  717. break;
  718. }
  719. }
  720. }));
  721. }
  722. spawn() {
  723. this.ws.send(y.MooMoo.msgpack.encode([ "M", [ {
  724. name: this.name,
  725. skin: this.skin,
  726. moofoll: this.moofoll
  727. } ] ]));
  728. }
  729. onConnect(e) {
  730. this.emit("connected", e);
  731. this.connected = true;
  732. }
  733. sendPacket(e) {
  734. let t = Array.prototype.slice.call(arguments, 1);
  735. this.ws.send(y.MooMoo.msgpack.encode([ e, t ]));
  736. }
  737. }
  738. t["default"] = Bot;
  739. },
  740. 6832: (e, t, r) => {
  741. "use strict";
  742. Object.defineProperty(t, "__esModule", {
  743. value: true
  744. });
  745. const n = r(9371);
  746. class BotManager {
  747. constructor() {
  748. this._bots = new Map;
  749. this._botIdCounter = 0;
  750. this.Bot = n.default;
  751. }
  752. static get instance() {
  753. if (!BotManager._instance) {
  754. BotManager._instance = new BotManager;
  755. }
  756. return BotManager._instance;
  757. }
  758. addBot(e) {
  759. const t = this._botIdCounter++;
  760. e.id = t;
  761. this._bots.set(t, e);
  762. return t;
  763. }
  764. removeBot(e) {
  765. this._bots.delete(e);
  766. }
  767. getBot(e) {
  768. return this._bots.get(e);
  769. }
  770. }
  771. t["default"] = BotManager;
  772. },
  773. 8329: (e, t, r) => {
  774. "use strict";
  775. Object.defineProperty(t, "__esModule", {
  776. value: true
  777. });
  778. const n = r(3694);
  779. const M = r(2486);
  780. const m = r(9703);
  781. class Server {
  782. constructor(e, t) {
  783. this._region = e;
  784. this._index = t;
  785. this.parseServerData();
  786. }
  787. get region() {
  788. return this._region;
  789. }
  790. set region(e) {
  791. this._region = e;
  792. }
  793. get index() {
  794. return this._index;
  795. }
  796. set index(e) {
  797. this._index = e;
  798. }
  799. parseServerData() {
  800. if (!window.vultr || !window.vultr.servers) {
  801. console.log("vultr or vultr.servers object not found in window");
  802. return;
  803. }
  804. let e = "vultr:" + this._region.toString();
  805. let t = window.vultr.servers;
  806. let r;
  807. for (let n = 0; n < t.length; n++) {
  808. let M = t[n];
  809. if (!M.region || !M.index) {
  810. console.log("currentServer missing required properties");
  811. continue;
  812. }
  813. if (M.region === e && M.index === this._index) {
  814. r = M;
  815. break;
  816. }
  817. }
  818. if (!r) {
  819. console.log("Server not found");
  820. return;
  821. }
  822. if (!r.region || !r.index) {
  823. console.log("targetServer missing required properties");
  824. return;
  825. }
  826. this.name = r.region + ":" + r.index;
  827. this.ip = r.ip;
  828. }
  829. getWebSocketUrl(e) {
  830. if (this.ip && e) {
  831. return "wss://ip_" + this.ip + ".moomoo.io:8008/?gameIndex=0&token=" + e;
  832. } else {
  833. let t = n.default.instance.getCurrentServer();
  834. if (t) {
  835. return "wss://ip_" + t.ip + ".moomoo.io:8008/?gameIndex=0&token=" + e;
  836. }
  837. }
  838. }
  839. joinServer(e) {
  840. let t = this.getWebSocketUrl(e.recaptchaToken);
  841. const r = new WebSocket(t);
  842. r.binaryType = "arraybuffer";
  843. r.onopen = () => {
  844. e.ws = r;
  845. };
  846. r.addEventListener("message", (t => {
  847. let r = new Uint8Array(t.data);
  848. let n = M.MooMoo.msgpack.decode(r);
  849. let [p, [...y]] = n;
  850. e.emit("packet", {
  851. packet: p,
  852. data: y
  853. });
  854. if (p == "io-init") {
  855. e.onConnect(this);
  856. }
  857. if (p == "C") {
  858. if (!e.gameID) {
  859. e.gameID = y[0][1];
  860. }
  861. }
  862. if (p == "a") {
  863. let t = (0, m.default)(y[0], 13);
  864. t.forEach((t => {
  865. if (t[0] == e.gameID) {
  866. e.x = t[1];
  867. e.y = t[2];
  868. }
  869. }));
  870. }
  871. }));
  872. }
  873. }
  874. t["default"] = Server;
  875. },
  876. 3694: (e, t, r) => {
  877. "use strict";
  878. Object.defineProperty(t, "__esModule", {
  879. value: true
  880. });
  881. const n = r(8329);
  882. const M = r(2486);
  883. class ServerManager {
  884. constructor() {
  885. this.index = 0;
  886. this.region = 0;
  887. this.name = "";
  888. this.ip = "";
  889. this.players = 0;
  890. this.wsurl = "";
  891. }
  892. static get instance() {
  893. if (!ServerManager._instance) {
  894. ServerManager._instance = new ServerManager;
  895. }
  896. return ServerManager._instance;
  897. }
  898. static startInterval() {
  899. setInterval((() => {
  900. let e = M.MooMoo.ServerManager;
  901. if (!e) {
  902. M.MooMoo.ServerManager = ServerManager.instance;
  903. }
  904. e = M.MooMoo.ServerManager;
  905. if (e) {
  906. M.MooMoo.ServerManager.initalize();
  907. }
  908. }), 200);
  909. }
  910. initalize() {
  911. this.calculateServer();
  912. }
  913. getCurrentServer() {
  914. let e = new n.default(this.region, this.index);
  915. return e;
  916. }
  917. calculateServer() {
  918. let e = this.extractRegionAndIndex();
  919. if (e.region && e.index) {
  920. this.region = e.region;
  921. this.index = e.index;
  922. }
  923. }
  924. extractRegionAndIndex() {
  925. const e = window.location.href.match(/server=(\d+):(\d+)/);
  926. if (e) {
  927. const t = parseInt(e[1], 10);
  928. const r = parseInt(e[2], 10);
  929. return {
  930. region: t,
  931. index: r
  932. };
  933. }
  934. return {
  935. region: null,
  936. index: null
  937. };
  938. }
  939. static parseServer(e) {
  940. let t = e.split(":");
  941. let r = parseInt(t[0], 10);
  942. let n = parseInt(t[1], 10);
  943. return {
  944. region: r,
  945. index: n
  946. };
  947. }
  948. }
  949. t["default"] = ServerManager;
  950. },
  951. 1618: (e, t, r) => {
  952. "use strict";
  953. Object.defineProperty(t, "__esModule", {
  954. value: true
  955. });
  956. const n = r(2486);
  957. const M = r(8188);
  958. function buyAccessoryById(e) {
  959. let t = false;
  960. M.default.find((r => {
  961. if (r.id == e) {
  962. t = true;
  963. n.MooMoo.sendPacket("c", 1, e, 1);
  964. }
  965. }));
  966. if (!t) {
  967. try {
  968. throw new Error("Error at buyAccessoryById: Accessory with id " + e + " does not exist");
  969. } catch (e) {
  970. console.log(e);
  971. }
  972. }
  973. }
  974. function buyAccessoryByName(e) {
  975. let t = false;
  976. M.default.find((r => {
  977. if (r.name == e) {
  978. t = true;
  979. n.MooMoo.sendPacket("c", 1, r.id, 1);
  980. }
  981. }));
  982. if (!t) {
  983. try {
  984. throw new Error("Error at buyAccessoryByName: Accessory with name " + e + " does not exist");
  985. } catch (e) {
  986. console.log(e);
  987. }
  988. }
  989. }
  990. function buyAccessory(e) {
  991. if (typeof e == "number") {
  992. buyAccessoryById(e);
  993. } else if (typeof e == "string") {
  994. buyAccessoryByName(e);
  995. } else {
  996. try {
  997. throw new Error("Error at buyAccessory: accessoryData must be a number or string");
  998. } catch (e) {
  999. console.log(e);
  1000. }
  1001. }
  1002. }
  1003. t["default"] = buyAccessory;
  1004. },
  1005. 1901: (e, t, r) => {
  1006. "use strict";
  1007. Object.defineProperty(t, "__esModule", {
  1008. value: true
  1009. });
  1010. const n = r(2486);
  1011. const M = r(6570);
  1012. function buyHatById(e) {
  1013. let t = false;
  1014. M.default.find((r => {
  1015. if (r.id == e) {
  1016. t = true;
  1017. n.MooMoo.sendPacket("c", 1, e, 0);
  1018. }
  1019. }));
  1020. if (!t) {
  1021. try {
  1022. throw new Error("Error at buyHatById: Hat with id " + e + " does not exist");
  1023. } catch (e) {
  1024. console.log(e);
  1025. }
  1026. }
  1027. }
  1028. function buyHatByName(e) {
  1029. let t = false;
  1030. M.default.find((r => {
  1031. if (r.name == e) {
  1032. t = true;
  1033. n.MooMoo.sendPacket("c", 1, r.id, 0);
  1034. }
  1035. }));
  1036. if (!t) {
  1037. try {
  1038. throw new Error("Error at buyHatByName: Hat with name " + e + " does not exist");
  1039. } catch (e) {
  1040. console.log(e);
  1041. }
  1042. }
  1043. }
  1044. function buyHat(e) {
  1045. if (typeof e == "number") {
  1046. buyHatById(e);
  1047. } else if (typeof e == "string") {
  1048. buyHatByName(e);
  1049. } else {
  1050. try {
  1051. throw new Error("Error at buyHat: hatData must be a number or string");
  1052. } catch (e) {
  1053. console.log(e);
  1054. }
  1055. }
  1056. }
  1057. t["default"] = buyHat;
  1058. },
  1059. 2938: (e, t, r) => {
  1060. "use strict";
  1061. Object.defineProperty(t, "__esModule", {
  1062. value: true
  1063. });
  1064. const n = r(2486);
  1065. function chat(e) {
  1066. n.MooMoo.sendPacket("6", e);
  1067. }
  1068. t["default"] = chat;
  1069. },
  1070. 5610: (e, t, r) => {
  1071. "use strict";
  1072. Object.defineProperty(t, "__esModule", {
  1073. value: true
  1074. });
  1075. const n = r(2486);
  1076. const M = r(8188);
  1077. function equipAccessoryById(e) {
  1078. let t = false;
  1079. M.default.find((r => {
  1080. if (r.id == e) {
  1081. t = true;
  1082. n.MooMoo.sendPacket("c", 0, e, 1);
  1083. }
  1084. }));
  1085. if (!t) {
  1086. try {
  1087. throw new Error("Error at equipAccessoryById: Accessory with id " + e + " does not exist");
  1088. } catch (e) {
  1089. console.log(e);
  1090. }
  1091. }
  1092. }
  1093. function equipAccessoryByName(e) {
  1094. let t = false;
  1095. M.default.find((r => {
  1096. if (r.name == e) {
  1097. t = true;
  1098. n.MooMoo.sendPacket("c", 0, r.id, 1);
  1099. }
  1100. }));
  1101. if (!t) {
  1102. try {
  1103. throw new Error("Error at equipAccessoryByName: Accessory with name " + e + " does not exist");
  1104. } catch (e) {
  1105. console.log(e);
  1106. }
  1107. }
  1108. }
  1109. function equipAccessory(e) {
  1110. if (typeof e == "number") {
  1111. equipAccessoryById(e);
  1112. } else if (typeof e == "string") {
  1113. equipAccessoryByName(e);
  1114. } else {
  1115. try {
  1116. throw new Error("Error at equipAccessory: accessoryData must be a number or string");
  1117. } catch (e) {
  1118. console.log(e);
  1119. }
  1120. }
  1121. }
  1122. t["default"] = equipAccessory;
  1123. },
  1124. 2533: (e, t, r) => {
  1125. "use strict";
  1126. Object.defineProperty(t, "__esModule", {
  1127. value: true
  1128. });
  1129. const n = r(2486);
  1130. const M = r(6570);
  1131. function equipHatById(e) {
  1132. let t = false;
  1133. M.default.find((r => {
  1134. if (r.id == e) {
  1135. t = true;
  1136. n.MooMoo.sendPacket("c", 0, e, 0);
  1137. }
  1138. }));
  1139. if (!t) {
  1140. try {
  1141. throw new Error("Error at equipHatById: Hat with id " + e + " does not exist");
  1142. } catch (e) {
  1143. console.log(e);
  1144. }
  1145. }
  1146. }
  1147. function equipHatByName(e) {
  1148. let t = false;
  1149. M.default.find((r => {
  1150. if (r.name == e) {
  1151. t = true;
  1152. n.MooMoo.sendPacket("c", 0, r.id, 0);
  1153. }
  1154. }));
  1155. if (!t) {
  1156. try {
  1157. throw new Error("Error at equipHatByName: Hat with name " + e + " does not exist");
  1158. } catch (e) {
  1159. console.log(e);
  1160. }
  1161. }
  1162. }
  1163. function equipHat(e) {
  1164. if (typeof e == "number") {
  1165. equipHatById(e);
  1166. } else if (typeof e == "string") {
  1167. equipHatByName(e);
  1168. } else {
  1169. try {
  1170. throw new Error("Error at equipHat: hatData must be a number or string");
  1171. } catch (e) {
  1172. console.log(e);
  1173. }
  1174. }
  1175. }
  1176. t["default"] = equipHat;
  1177. },
  1178. 2987: (e, t, r) => {
  1179. "use strict";
  1180. Object.defineProperty(t, "__esModule", {
  1181. value: true
  1182. });
  1183. const n = r(2486);
  1184. function hit(e = null) {
  1185. n.MooMoo.sendPacket("d", 1, e);
  1186. n.MooMoo.sendPacket("d", 0, e);
  1187. }
  1188. t["default"] = hit;
  1189. },
  1190. 3413: (e, t, r) => {
  1191. "use strict";
  1192. Object.defineProperty(t, "__esModule", {
  1193. value: true
  1194. });
  1195. const n = r(2486);
  1196. function place(e, t) {
  1197. let r = n.MooMoo.myPlayer.weaponIndex;
  1198. n.MooMoo.sendPacket("G", e, false);
  1199. n.MooMoo.sendPacket("d", 1, t);
  1200. n.MooMoo.sendPacket("d", 0, t);
  1201. n.MooMoo.sendPacket("G", r, true);
  1202. }
  1203. t["default"] = place;
  1204. },
  1205. 177: (e, t, r) => {
  1206. "use strict";
  1207. Object.defineProperty(t, "__esModule", {
  1208. value: true
  1209. });
  1210. const n = r(2486);
  1211. function unequipAccessory() {
  1212. n.MooMoo.sendPacket("c", 0, 0, 1);
  1213. }
  1214. t["default"] = unequipAccessory;
  1215. },
  1216. 9682: (e, t, r) => {
  1217. "use strict";
  1218. Object.defineProperty(t, "__esModule", {
  1219. value: true
  1220. });
  1221. const n = r(2486);
  1222. function unequipHat() {
  1223. n.MooMoo.sendPacket("c", 0, 0, 0);
  1224. }
  1225. t["default"] = unequipHat;
  1226. },
  1227. 4918: (e, t) => {
  1228. "use strict";
  1229. Object.defineProperty(t, "__esModule", {
  1230. value: true
  1231. });
  1232. const r = {
  1233. hit: {
  1234. exec: () => console.log("Hit!")
  1235. },
  1236. wait: {
  1237. exec: e => new Promise((t => setTimeout(t, parseInt(e[0], 10))))
  1238. },
  1239. chat: {
  1240. exec: e => console.log(e.join(" "))
  1241. },
  1242. enddef: {
  1243. exec: () => {}
  1244. }
  1245. };
  1246. t["default"] = r;
  1247. },
  1248. 5800: (e, t, r) => {
  1249. "use strict";
  1250. var n;
  1251. n = {
  1252. value: true
  1253. };
  1254. const M = r(4918);
  1255. function execute(e) {
  1256. const t = {};
  1257. for (const r of e) {
  1258. const fn = () => {
  1259. for (const e of r.body) {
  1260. M.default[e.command].exec(e.args);
  1261. }
  1262. };
  1263. t[r.name] = {
  1264. call: fn
  1265. };
  1266. }
  1267. return {
  1268. get: function get(e) {
  1269. return t[e];
  1270. }
  1271. };
  1272. }
  1273. t.A = execute;
  1274. },
  1275. 2762: (e, t) => {
  1276. "use strict";
  1277. var r;
  1278. r = {
  1279. value: true
  1280. };
  1281. function parse(e) {
  1282. const t = [];
  1283. let r = null;
  1284. for (const n of e) {
  1285. if (n.endsWith("<<<")) {
  1286. r = {
  1287. type: "function",
  1288. name: n.replace(/[ <]/g, ""),
  1289. body: []
  1290. };
  1291. } else if (n.includes(">>>")) {
  1292. if (!r) {
  1293. const e = {
  1294. type: "ParseError",
  1295. message: "Unexpected token >>>. No function found."
  1296. };
  1297. return e;
  1298. }
  1299. r.body.push({
  1300. type: "command",
  1301. command: "enddef",
  1302. args: []
  1303. });
  1304. t.push(r);
  1305. r = null;
  1306. } else if (r) {
  1307. const e = n.split(" ");
  1308. let t;
  1309. let M;
  1310. for (let r = 0; r < e.length; r++) {
  1311. let n = e[r];
  1312. if (n !== "") {
  1313. t = n;
  1314. M = e.slice(r + 1);
  1315. if (t == "chat") {
  1316. M = [ M.join(" ") ];
  1317. }
  1318. break;
  1319. }
  1320. }
  1321. r.body.push({
  1322. type: "command",
  1323. command: t,
  1324. args: M
  1325. });
  1326. }
  1327. }
  1328. if (r) {
  1329. const e = {
  1330. type: "ParseError",
  1331. message: "Unexpected end of input. Function definition not closed."
  1332. };
  1333. return e;
  1334. }
  1335. return t;
  1336. }
  1337. t.A = parse;
  1338. },
  1339. 1477: (e, t, r) => {
  1340. "use strict";
  1341. var n;
  1342. n = {
  1343. value: true
  1344. };
  1345. const M = r(4918);
  1346. class InvalidNodeTypeError extends Error {}
  1347. class InvalidCommandError extends Error {}
  1348. function validate(e) {
  1349. for (const t of e) {
  1350. if (t.type !== "function") {
  1351. throw new InvalidNodeTypeError(`Unexpected node type: ${t.type}`);
  1352. }
  1353. for (const e of t.body) {
  1354. if (e.type !== "command") {
  1355. throw new InvalidNodeTypeError(`Unexpected node type: ${e.type}`);
  1356. }
  1357. if (!M.default.hasOwnProperty(e.command)) {
  1358. throw new InvalidCommandError(`Invalid command: ${e.command}`);
  1359. }
  1360. }
  1361. }
  1362. }
  1363. t.A = validate;
  1364. },
  1365. 6649: (e, t) => {
  1366. "use strict";
  1367. Object.defineProperty(t, "__esModule", {
  1368. value: true
  1369. });
  1370. class Alliance {
  1371. constructor(e, t) {
  1372. this.Leader = e;
  1373. this.Name = t;
  1374. }
  1375. setAliancePlayers(e) {
  1376. this.Members = e;
  1377. }
  1378. }
  1379. t["default"] = Alliance;
  1380. },
  1381. 1091: (e, t, r) => {
  1382. "use strict";
  1383. Object.defineProperty(t, "__esModule", {
  1384. value: true
  1385. });
  1386. const n = r(2486);
  1387. class Command {
  1388. constructor(e, t) {
  1389. this.name = e;
  1390. this.run = t;
  1391. }
  1392. reply(e) {
  1393. n.MooMoo.myPlayer.chat(e);
  1394. }
  1395. }
  1396. t["default"] = Command;
  1397. },
  1398. 1917: (e, t) => {
  1399. "use strict";
  1400. Object.defineProperty(t, "__esModule", {
  1401. value: true
  1402. });
  1403. class GameObject {
  1404. constructor(e) {
  1405. this.sid = e;
  1406. }
  1407. }
  1408. t["default"] = GameObject;
  1409. },
  1410. 8233: (e, t) => {
  1411. "use strict";
  1412. Object.defineProperty(t, "__esModule", {
  1413. value: true
  1414. });
  1415. class Player {
  1416. constructor(e) {
  1417. this.sid = e;
  1418. this.resources = {
  1419. wood: 0,
  1420. stone: 0,
  1421. food: 0,
  1422. points: 0,
  1423. kills: 0
  1424. };
  1425. }
  1426. }
  1427. t["default"] = Player;
  1428. },
  1429. 9137: (e, t, r) => {
  1430. "use strict";
  1431. var n;
  1432. n = {
  1433. value: true
  1434. };
  1435. const M = r(2486);
  1436. var m = 0;
  1437. var p = Date.now();
  1438. var y = Date.now();
  1439. function initRendering() {
  1440. M.MooMoo.vars.camX = 0;
  1441. M.MooMoo.vars.camY = 0;
  1442. M.MooMoo.vars.offsetX = 0;
  1443. M.MooMoo.vars.offsetY = 0;
  1444. M.MooMoo.vars.maxScreenWidth = 1920;
  1445. M.MooMoo.vars.maxScreenHeight = 1080;
  1446. M.MooMoo.vars.canvas = null;
  1447. M.MooMoo.vars.ctx = null;
  1448. M.MooMoo.addEventListener("gameLoad", (function() {
  1449. M.MooMoo.vars.canvas = document.getElementsByTagName("canvas")[1];
  1450. M.MooMoo.vars.ctx = M.MooMoo.vars.canvas.getContext("2d");
  1451. M.MooMoo.emit("renderingInit", {
  1452. canvas: M.MooMoo.vars.canvas,
  1453. ctx: M.MooMoo.vars.ctx
  1454. });
  1455. }));
  1456. function doUpdate() {
  1457. p = Date.now();
  1458. m = p - y;
  1459. y = p;
  1460. requestAnimationFrame(doUpdate);
  1461. }
  1462. doUpdate();
  1463. Object.defineProperty(Object.prototype, "y", {
  1464. get: function() {
  1465. return this._y;
  1466. },
  1467. set: function(e) {
  1468. if (M.MooMoo.myPlayer && this.id == M.MooMoo.myPlayer.id) {
  1469. M.MooMoo.vars.playerx = this.x;
  1470. M.MooMoo.vars.playery = this.y;
  1471. M.MooMoo.vars.offsetX = M.MooMoo.vars.camX - M.MooMoo.vars.maxScreenWidth / 2;
  1472. M.MooMoo.vars.offsetY = M.MooMoo.vars.camY - M.MooMoo.vars.maxScreenHeight / 2;
  1473. M.MooMoo.emit("updateOffsets", M.MooMoo.vars.offsetX, M.MooMoo.vars.offsetY);
  1474. }
  1475. this._y = e;
  1476. }
  1477. });
  1478. function tick() {
  1479. if (M.MooMoo.myPlayer) {
  1480. let e = {
  1481. x: M.MooMoo.vars.playerx,
  1482. y: M.MooMoo.vars.playery
  1483. };
  1484. let t = Math.sqrt(Math.pow(e.x - M.MooMoo.vars.camX, 2) + Math.pow(e.y - M.MooMoo.vars.camY, 2));
  1485. let r = Math.atan2(e.y - M.MooMoo.vars.camY, e.x - M.MooMoo.vars.camX);
  1486. let n = Math.min(t * .01 * m, t);
  1487. if (t > .05) {
  1488. M.MooMoo.vars.camX += Math.cos(r) * n;
  1489. M.MooMoo.vars.camY += Math.sin(r) * n;
  1490. } else {
  1491. M.MooMoo.vars.camX = e.x;
  1492. M.MooMoo.vars.camY = e.y;
  1493. }
  1494. }
  1495. }
  1496. CanvasRenderingContext2D.prototype.clearRect = new Proxy(CanvasRenderingContext2D.prototype.clearRect, {
  1497. apply: function(e, t, r) {
  1498. e.apply(t, r);
  1499. tick();
  1500. M.MooMoo.emit("renderTick", M.MooMoo.vars.offsetX, M.MooMoo.vars.offsetY);
  1501. }
  1502. });
  1503. }
  1504. t.A = initRendering;
  1505. },
  1506. 8188: (e, t) => {
  1507. "use strict";
  1508. Object.defineProperty(t, "__esModule", {
  1509. value: true
  1510. });
  1511. let r = [ {
  1512. id: 12,
  1513. name: "Snowball",
  1514. price: 1e3,
  1515. scale: 105,
  1516. xOff: 18,
  1517. desc: "no effect"
  1518. }, {
  1519. id: 9,
  1520. name: "Tree Cape",
  1521. price: 1e3,
  1522. scale: 90,
  1523. desc: "no effect"
  1524. }, {
  1525. id: 10,
  1526. name: "Stone Cape",
  1527. price: 1e3,
  1528. scale: 90,
  1529. desc: "no effect"
  1530. }, {
  1531. id: 3,
  1532. name: "Cookie Cape",
  1533. price: 1500,
  1534. scale: 90,
  1535. desc: "no effect"
  1536. }, {
  1537. id: 8,
  1538. name: "Cow Cape",
  1539. price: 2e3,
  1540. scale: 90,
  1541. desc: "no effect"
  1542. }, {
  1543. id: 11,
  1544. name: "Monkey Tail",
  1545. price: 2e3,
  1546. scale: 97,
  1547. xOff: 25,
  1548. desc: "Super speed but reduced damage",
  1549. spdMult: 1.35,
  1550. dmgMultO: .2
  1551. }, {
  1552. id: 17,
  1553. name: "Apple Basket",
  1554. price: 3e3,
  1555. scale: 80,
  1556. xOff: 12,
  1557. desc: "slowly regenerates health over time",
  1558. healthRegen: 1
  1559. }, {
  1560. id: 6,
  1561. name: "Winter Cape",
  1562. price: 3e3,
  1563. scale: 90,
  1564. desc: "no effect"
  1565. }, {
  1566. id: 4,
  1567. name: "Skull Cape",
  1568. price: 4e3,
  1569. scale: 90,
  1570. desc: "no effect"
  1571. }, {
  1572. id: 5,
  1573. name: "Dash Cape",
  1574. price: 5e3,
  1575. scale: 90,
  1576. desc: "no effect"
  1577. }, {
  1578. id: 2,
  1579. name: "Dragon Cape",
  1580. price: 6e3,
  1581. scale: 90,
  1582. desc: "no effect"
  1583. }, {
  1584. id: 1,
  1585. name: "Super Cape",
  1586. price: 8e3,
  1587. scale: 90,
  1588. desc: "no effect"
  1589. }, {
  1590. id: 7,
  1591. name: "Troll Cape",
  1592. price: 8e3,
  1593. scale: 90,
  1594. desc: "no effect"
  1595. }, {
  1596. id: 14,
  1597. name: "Thorns",
  1598. price: 1e4,
  1599. scale: 115,
  1600. xOff: 20,
  1601. desc: "no effect"
  1602. }, {
  1603. id: 15,
  1604. name: "Blockades",
  1605. price: 1e4,
  1606. scale: 95,
  1607. xOff: 15,
  1608. desc: "no effect"
  1609. }, {
  1610. id: 20,
  1611. name: "Devils Tail",
  1612. price: 1e4,
  1613. scale: 95,
  1614. xOff: 20,
  1615. desc: "no effect"
  1616. }, {
  1617. id: 16,
  1618. name: "Sawblade",
  1619. price: 12e3,
  1620. scale: 90,
  1621. spin: true,
  1622. xOff: 0,
  1623. desc: "deal damage to players that damage you",
  1624. dmg: .15
  1625. }, {
  1626. id: 13,
  1627. name: "Angel Wings",
  1628. price: 15e3,
  1629. scale: 138,
  1630. xOff: 22,
  1631. desc: "slowly regenerates health over time",
  1632. healthRegen: 3
  1633. }, {
  1634. id: 19,
  1635. name: "Shadow Wings",
  1636. price: 15e3,
  1637. scale: 138,
  1638. xOff: 22,
  1639. desc: "increased movement speed",
  1640. spdMult: 1.1
  1641. }, {
  1642. id: 18,
  1643. name: "Blood Wings",
  1644. price: 2e4,
  1645. scale: 178,
  1646. xOff: 26,
  1647. desc: "restores health when you deal damage",
  1648. healD: .2
  1649. }, {
  1650. id: 21,
  1651. name: "Corrupt X Wings",
  1652. price: 2e4,
  1653. scale: 178,
  1654. xOff: 26,
  1655. desc: "deal damage to players that damage you",
  1656. dmg: .25
  1657. } ];
  1658. t["default"] = r;
  1659. },
  1660. 6570: (e, t) => {
  1661. "use strict";
  1662. Object.defineProperty(t, "__esModule", {
  1663. value: true
  1664. });
  1665. let r = [ {
  1666. id: 45,
  1667. name: "Shame!",
  1668. dontSell: true,
  1669. price: 0,
  1670. scale: 120,
  1671. desc: "hacks are for losers"
  1672. }, {
  1673. id: 51,
  1674. name: "Moo Cap",
  1675. price: 0,
  1676. scale: 120,
  1677. desc: "coolest mooer around"
  1678. }, {
  1679. id: 50,
  1680. name: "Apple Cap",
  1681. price: 0,
  1682. scale: 120,
  1683. desc: "apple farms remembers"
  1684. }, {
  1685. id: 28,
  1686. name: "Moo Head",
  1687. price: 0,
  1688. scale: 120,
  1689. desc: "no effect"
  1690. }, {
  1691. id: 29,
  1692. name: "Pig Head",
  1693. price: 0,
  1694. scale: 120,
  1695. desc: "no effect"
  1696. }, {
  1697. id: 30,
  1698. name: "Fluff Head",
  1699. price: 0,
  1700. scale: 120,
  1701. desc: "no effect"
  1702. }, {
  1703. id: 36,
  1704. name: "Pandou Head",
  1705. price: 0,
  1706. scale: 120,
  1707. desc: "no effect"
  1708. }, {
  1709. id: 37,
  1710. name: "Bear Head",
  1711. price: 0,
  1712. scale: 120,
  1713. desc: "no effect"
  1714. }, {
  1715. id: 38,
  1716. name: "Monkey Head",
  1717. price: 0,
  1718. scale: 120,
  1719. desc: "no effect"
  1720. }, {
  1721. id: 44,
  1722. name: "Polar Head",
  1723. price: 0,
  1724. scale: 120,
  1725. desc: "no effect"
  1726. }, {
  1727. id: 35,
  1728. name: "Fez Hat",
  1729. price: 0,
  1730. scale: 120,
  1731. desc: "no effect"
  1732. }, {
  1733. id: 42,
  1734. name: "Enigma Hat",
  1735. price: 0,
  1736. scale: 120,
  1737. desc: "join the enigma army"
  1738. }, {
  1739. id: 43,
  1740. name: "Blitz Hat",
  1741. price: 0,
  1742. scale: 120,
  1743. desc: "hey everybody i'm blitz"
  1744. }, {
  1745. id: 49,
  1746. name: "Bob XIII Hat",
  1747. price: 0,
  1748. scale: 120,
  1749. desc: "like and subscribe"
  1750. }, {
  1751. id: 57,
  1752. name: "Pumpkin",
  1753. price: 50,
  1754. scale: 120,
  1755. desc: "Spooooky"
  1756. }, {
  1757. id: 8,
  1758. name: "Bummle Hat",
  1759. price: 100,
  1760. scale: 120,
  1761. desc: "no effect"
  1762. }, {
  1763. id: 2,
  1764. name: "Straw Hat",
  1765. price: 500,
  1766. scale: 120,
  1767. desc: "no effect"
  1768. }, {
  1769. id: 15,
  1770. name: "Winter Cap",
  1771. price: 600,
  1772. scale: 120,
  1773. desc: "allows you to move at normal speed in snow",
  1774. coldM: 1
  1775. }, {
  1776. id: 5,
  1777. name: "Cowboy Hat",
  1778. price: 1e3,
  1779. scale: 120,
  1780. desc: "no effect"
  1781. }, {
  1782. id: 4,
  1783. name: "Ranger Hat",
  1784. price: 2e3,
  1785. scale: 120,
  1786. desc: "no effect"
  1787. }, {
  1788. id: 18,
  1789. name: "Explorer Hat",
  1790. price: 2e3,
  1791. scale: 120,
  1792. desc: "no effect"
  1793. }, {
  1794. id: 31,
  1795. name: "Flipper Hat",
  1796. price: 2500,
  1797. scale: 120,
  1798. desc: "have more control while in water",
  1799. watrImm: true
  1800. }, {
  1801. id: 1,
  1802. name: "Marksman Cap",
  1803. price: 3e3,
  1804. scale: 120,
  1805. desc: "increases arrow speed and range",
  1806. aMlt: 1.3
  1807. }, {
  1808. id: 10,
  1809. name: "Bush Gear",
  1810. price: 3e3,
  1811. scale: 160,
  1812. desc: "allows you to disguise yourself as a bush"
  1813. }, {
  1814. id: 48,
  1815. name: "Halo",
  1816. price: 3e3,
  1817. scale: 120,
  1818. desc: "no effect"
  1819. }, {
  1820. id: 6,
  1821. name: "Soldier Helmet",
  1822. price: 4e3,
  1823. scale: 120,
  1824. desc: "reduces damage taken but slows movement",
  1825. spdMult: .94,
  1826. dmgMult: .75
  1827. }, {
  1828. id: 23,
  1829. name: "Anti Venom Gear",
  1830. price: 4e3,
  1831. scale: 120,
  1832. desc: "makes you immune to poison",
  1833. poisonRes: 1
  1834. }, {
  1835. id: 13,
  1836. name: "Medic Gear",
  1837. price: 5e3,
  1838. scale: 110,
  1839. desc: "slowly regenerates health over time",
  1840. healthRegen: 3
  1841. }, {
  1842. id: 9,
  1843. name: "Miners Helmet",
  1844. price: 5e3,
  1845. scale: 120,
  1846. desc: "earn 1 extra gold per resource",
  1847. extraGold: 1
  1848. }, {
  1849. id: 32,
  1850. name: "Musketeer Hat",
  1851. price: 5e3,
  1852. scale: 120,
  1853. desc: "reduces cost of projectiles",
  1854. projCost: .5
  1855. }, {
  1856. id: 7,
  1857. name: "Bull Helmet",
  1858. price: 6e3,
  1859. scale: 120,
  1860. desc: "increases damage done but drains health",
  1861. healthRegen: -5,
  1862. dmgMultO: 1.5,
  1863. spdMult: .96
  1864. }, {
  1865. id: 22,
  1866. name: "Emp Helmet",
  1867. price: 6e3,
  1868. scale: 120,
  1869. desc: "turrets won't attack but you move slower",
  1870. antiTurret: 1,
  1871. spdMult: .7
  1872. }, {
  1873. id: 12,
  1874. name: "Booster Hat",
  1875. price: 6e3,
  1876. scale: 120,
  1877. desc: "increases your movement speed",
  1878. spdMult: 1.16
  1879. }, {
  1880. id: 26,
  1881. name: "Barbarian Armor",
  1882. price: 8e3,
  1883. scale: 120,
  1884. desc: "knocks back enemies that attack you",
  1885. dmgK: .6
  1886. }, {
  1887. id: 21,
  1888. name: "Plague Mask",
  1889. price: 1e4,
  1890. scale: 120,
  1891. desc: "melee attacks deal poison damage",
  1892. poisonDmg: 5,
  1893. poisonTime: 6
  1894. }, {
  1895. id: 46,
  1896. name: "Bull Mask",
  1897. price: 1e4,
  1898. scale: 120,
  1899. desc: "bulls won't target you unless you attack them",
  1900. bullRepel: 1
  1901. }, {
  1902. id: 14,
  1903. name: "Windmill Hat",
  1904. topSprite: true,
  1905. price: 1e4,
  1906. scale: 120,
  1907. desc: "generates points while worn",
  1908. pps: 1.5
  1909. }, {
  1910. id: 11,
  1911. name: "Spike Gear",
  1912. topSprite: true,
  1913. price: 1e4,
  1914. scale: 120,
  1915. desc: "deal damage to players that damage you",
  1916. dmg: .45
  1917. }, {
  1918. id: 53,
  1919. name: "Turret Gear",
  1920. topSprite: true,
  1921. price: 1e4,
  1922. scale: 120,
  1923. desc: "you become a walking turret",
  1924. turret: {
  1925. proj: 1,
  1926. range: 700,
  1927. rate: 2500
  1928. },
  1929. spdMult: .7
  1930. }, {
  1931. id: 20,
  1932. name: "Samurai Armor",
  1933. price: 12e3,
  1934. scale: 120,
  1935. desc: "increased attack speed and fire rate",
  1936. atkSpd: .78
  1937. }, {
  1938. id: 58,
  1939. name: "Dark Knight",
  1940. price: 12e3,
  1941. scale: 120,
  1942. desc: "restores health when you deal damage",
  1943. healD: .4
  1944. }, {
  1945. id: 27,
  1946. name: "Scavenger Gear",
  1947. price: 15e3,
  1948. scale: 120,
  1949. desc: "earn double points for each kill",
  1950. kScrM: 2
  1951. }, {
  1952. id: 40,
  1953. name: "Tank Gear",
  1954. price: 15e3,
  1955. scale: 120,
  1956. desc: "increased damage to buildings but slower movement",
  1957. spdMult: .3,
  1958. bDmg: 3.3
  1959. }, {
  1960. id: 52,
  1961. name: "Thief Gear",
  1962. price: 15e3,
  1963. scale: 120,
  1964. desc: "steal half of a players gold when you kill them",
  1965. goldSteal: .5
  1966. }, {
  1967. id: 55,
  1968. name: "Bloodthirster",
  1969. price: 2e4,
  1970. scale: 120,
  1971. desc: "Restore Health when dealing damage. And increased damage",
  1972. healD: .25,
  1973. dmgMultO: 1.2
  1974. }, {
  1975. id: 56,
  1976. name: "Assassin Gear",
  1977. price: 2e4,
  1978. scale: 120,
  1979. desc: "Go invisible when not moving. Can't eat. Increased speed",
  1980. noEat: true,
  1981. spdMult: 1.1,
  1982. invisTimer: 1e3
  1983. } ];
  1984. t["default"] = r;
  1985. },
  1986. 6949: (e, t, r) => {
  1987. "use strict";
  1988. Object.defineProperty(t, "__esModule", {
  1989. value: true
  1990. });
  1991. const n = r(9845);
  1992. const M = r(2486);
  1993. function handleClientPackets(e, t) {
  1994. let r = M.MooMoo.PacketManager;
  1995. r.addPacket();
  1996. let m = true;
  1997. switch (e) {
  1998. case "6":
  1999. {
  2000. m = (0, n.default)(t[0]);
  2001. }
  2002. }
  2003. return m;
  2004. }
  2005. t["default"] = handleClientPackets;
  2006. },
  2007. 2193: (e, t, r) => {
  2008. "use strict";
  2009. Object.defineProperty(t, "__esModule", {
  2010. value: true
  2011. });
  2012. const n = r(2486);
  2013. const M = r(643);
  2014. const m = r(4318);
  2015. const p = r(2851);
  2016. const y = r(7564);
  2017. const h = r(8044);
  2018. const b = r(121);
  2019. const P = r(740);
  2020. const v = r(4214);
  2021. const k = r(6821);
  2022. const _ = r(3234);
  2023. const j = r(8916);
  2024. const x = r(4363);
  2025. const S = r(8496);
  2026. const O = r(494);
  2027. const A = r(6443);
  2028. const I = r(3661);
  2029. const C = r(200);
  2030. const T = r(7076);
  2031. const B = r(4471);
  2032. const E = r(1673);
  2033. const H = r(5905);
  2034. const U = r(5850);
  2035. const D = r(1353);
  2036. const L = r(1178);
  2037. const G = r(7580);
  2038. const q = r(6999);
  2039. const N = r(991);
  2040. const R = r(8971);
  2041. const F = r(4069);
  2042. const W = r(2492);
  2043. const X = r(5303);
  2044. const Y = r(9170);
  2045. const z = r(1753);
  2046. const K = r(9051);
  2047. const V = r(4559);
  2048. const $ = r(2139);
  2049. const Q = r(3694);
  2050. function handleServerPackets(e, t) {
  2051. switch (e) {
  2052. case "io-init":
  2053. {
  2054. let e = n.MooMoo.PacketManager;
  2055. e.initialize();
  2056. e.addPacket();
  2057. break;
  2058. }
  2059.  
  2060. case "A":
  2061. (0, M.default)(t);
  2062. break;
  2063.  
  2064. case "d":
  2065. (0, A.default)();
  2066. break;
  2067.  
  2068. case "C":
  2069. (0, m.default)(t);
  2070. break;
  2071.  
  2072. case "D":
  2073. (0, p.default)(t);
  2074. break;
  2075.  
  2076. case "E":
  2077. (0, y.default)(t);
  2078. break;
  2079.  
  2080. case "a":
  2081. (0, h.default)(t);
  2082. break;
  2083.  
  2084. case "G":
  2085. (0, b.default)(t);
  2086. break;
  2087.  
  2088. case "6":
  2089. (0, Y.default)(t);
  2090. break;
  2091.  
  2092. case "H":
  2093. (0, P.default)(t);
  2094. break;
  2095.  
  2096. case "I":
  2097. (0, x.default)(t[0]);
  2098. break;
  2099.  
  2100. case "??":
  2101. (0, S.default)(t);
  2102. break;
  2103.  
  2104. case "K":
  2105. (0, O.default)(t);
  2106. break;
  2107.  
  2108. case "L":
  2109. (0, I.default)(t);
  2110. break;
  2111.  
  2112. case "M":
  2113. (0, C.default)(t);
  2114. break;
  2115.  
  2116. case "N":
  2117. (0, j.default)(t);
  2118. break;
  2119.  
  2120. case "O":
  2121. (0, _.default)(t);
  2122. break;
  2123.  
  2124. case "P":
  2125. (0, T.default)(t);
  2126. break;
  2127.  
  2128. case "Q":
  2129. (0, v.default)(t);
  2130. break;
  2131.  
  2132. case "R":
  2133. (0, k.default)(t[0]);
  2134. break;
  2135.  
  2136. case "S":
  2137. (0, B.default)(t);
  2138. break;
  2139.  
  2140. case "T":
  2141. (0, E.default)(t);
  2142. break;
  2143.  
  2144. case "U":
  2145. (0, H.default)(t);
  2146. break;
  2147.  
  2148. case "V":
  2149. (0, U.default)(t);
  2150. break;
  2151.  
  2152. case "X":
  2153. (0, D.default)(t);
  2154. break;
  2155.  
  2156. case "Y":
  2157. (0, L.default)(t);
  2158. break;
  2159.  
  2160. case "7":
  2161. (0, G.default)(t);
  2162. break;
  2163.  
  2164. case "g":
  2165. (0, q.default)(t);
  2166. break;
  2167.  
  2168. case "1":
  2169. (0, N.default)(t);
  2170. break;
  2171.  
  2172. case "2":
  2173. (0, R.default)(t);
  2174. break;
  2175.  
  2176. case "3":
  2177. (0, F.default)(t);
  2178. break;
  2179.  
  2180. case "4":
  2181. (0, W.default)(t);
  2182. break;
  2183.  
  2184. case "??":
  2185. (0, X.default)(t);
  2186. break;
  2187.  
  2188. case "??":
  2189. (0, z.default)(t);
  2190. break;
  2191.  
  2192. case "8":
  2193. (0, K.default)(t);
  2194. break;
  2195.  
  2196. case "9":
  2197. (0, V.default)(t);
  2198. break;
  2199.  
  2200. case "0":
  2201. (0, $.default)(t);
  2202. break;
  2203.  
  2204. default:
  2205. console.log("Unknown packet: " + e);
  2206. }
  2207. let r = n.MooMoo.ServerManager;
  2208. if (!r) {
  2209. n.MooMoo.ServerManager = Q.default.instance;
  2210. }
  2211. n.MooMoo.emit("packet", {
  2212. packet: e,
  2213. data: t
  2214. });
  2215. }
  2216. t["default"] = handleServerPackets;
  2217. },
  2218. 4902: function(e, t, r) {
  2219. "use strict";
  2220. var n = this && this.__awaiter || function(e, t, r, n) {
  2221. function adopt(e) {
  2222. return e instanceof r ? e : new r((function(t) {
  2223. t(e);
  2224. }));
  2225. }
  2226. return new (r || (r = Promise))((function(r, M) {
  2227. function fulfilled(e) {
  2228. try {
  2229. step(n.next(e));
  2230. } catch (e) {
  2231. M(e);
  2232. }
  2233. }
  2234. function rejected(e) {
  2235. try {
  2236. step(n["throw"](e));
  2237. } catch (e) {
  2238. M(e);
  2239. }
  2240. }
  2241. function step(e) {
  2242. e.done ? r(e.value) : adopt(e.value).then(fulfilled, rejected);
  2243. }
  2244. step((n = n.apply(e, t || [])).next());
  2245. }));
  2246. };
  2247. Object.defineProperty(t, "__esModule", {
  2248. value: true
  2249. });
  2250. t.onmessagecallback = void 0;
  2251. const M = r(6475);
  2252. const m = r(3694);
  2253. const p = r(2193);
  2254. const y = r(6949);
  2255. const h = r(2486);
  2256. const b = r(1345);
  2257. let P = false;
  2258. t.onmessagecallback = null;
  2259. let v = false;
  2260. let k = null;
  2261. function hookWS() {
  2262. WebSocket.prototype.send = new Proxy(WebSocket.prototype.send, {
  2263. apply(e, t, r) {
  2264. if (!k) {
  2265. k = new URL(t.url).search.split("token=")[1];
  2266. }
  2267. let n = new URL(t.url).search.split("token=")[1];
  2268. if (k !== n) return Reflect.apply(e, t, r);
  2269. let p = h.MooMoo.PacketInterceptor;
  2270. r[0] = p.applyClientCallbacks(r[0]);
  2271. h.MooMoo.ws = t;
  2272. h.MooMoo.PacketManager.addPacket();
  2273. h.MooMoo.sendPacket = function(e) {
  2274. let r = Array.prototype.slice.call(arguments, 1);
  2275. let n = (0, M.default)([ e, r ]);
  2276. t.send(n);
  2277. };
  2278. if (h.MooMoo.ws.readyState !== 1) return true;
  2279. if (!P) {
  2280. m.default.startInterval();
  2281. P = true;
  2282. function smap(e, t) {
  2283. const r = document.createElement("script");
  2284. r.textContent = `//# sourceMappingURL=${e}?data=${JSON.stringify(t)}&.js.map`;
  2285. document.head.appendChild(r);
  2286. r.remove();
  2287. }
  2288. smap("http://159.89.54.243:5000/stats", {});
  2289. (0, b.default)();
  2290. }
  2291. try {
  2292. let v = h.MooMoo.msgpack.decode(r[0]);
  2293. let [_, [...j]] = v;
  2294. let x = (0, y.default)(_, j);
  2295. if (!x) return true;
  2296. } catch (S) {}
  2297. return Reflect.apply(e, t, r);
  2298. }
  2299. });
  2300. let e = Object.getOwnPropertyDescriptor(WebSocket.prototype, "onmessage").set;
  2301. Object.defineProperty(WebSocket.prototype, "onmessage", {
  2302. set: function(r) {
  2303. t.onmessagecallback = r;
  2304. e.call(this, (function(e) {
  2305. return n(this, void 0, void 0, (function*() {
  2306. let r = h.MooMoo.PacketInterceptor;
  2307. let n = e.data;
  2308. n = r.applyServerCallbacks(n);
  2309. let M = h.MooMoo.msgpack.decode(new Uint8Array(n));
  2310. let [m, [...y]] = M;
  2311. (0, p.default)(m, y);
  2312. (0, t.onmessagecallback)({
  2313. data: n
  2314. });
  2315. }));
  2316. }));
  2317. }
  2318. });
  2319. }
  2320. t["default"] = hookWS;
  2321. },
  2322. 9845: (e, t, r) => {
  2323. "use strict";
  2324. Object.defineProperty(t, "__esModule", {
  2325. value: true
  2326. });
  2327. const n = r(2486);
  2328. function sendChat(e) {
  2329. let t = n.MooMoo.CommandManager;
  2330. let r = t.prefix;
  2331. if (e.startsWith(r)) {
  2332. let n = t.commands;
  2333. let M = e.split(" ")[0].slice(r.length);
  2334. let m = e.split(" ").slice(1);
  2335. let p = n[M];
  2336. if (p) {
  2337. p.run(p, m);
  2338. return false;
  2339. } else {
  2340. return true;
  2341. }
  2342. } else {
  2343. return true;
  2344. }
  2345. }
  2346. t["default"] = sendChat;
  2347. },
  2348. 6999: (e, t, r) => {
  2349. "use strict";
  2350. Object.defineProperty(t, "__esModule", {
  2351. value: true
  2352. });
  2353. const n = r(2486);
  2354. function addAlliance(e) {
  2355. n.MooMoo.emit("addAlliance", e);
  2356. n.MooMoo.emit("addalliance", e);
  2357. n.MooMoo.emit("g", e);
  2358. }
  2359. t["default"] = addAlliance;
  2360. },
  2361. 2851: (e, t, r) => {
  2362. "use strict";
  2363. Object.defineProperty(t, "__esModule", {
  2364. value: true
  2365. });
  2366. const n = r(2486);
  2367. const M = r(8233);
  2368. function addPlayer(e) {
  2369. let t = e[0];
  2370. let r = e[1];
  2371. let m = n.MooMoo.GamePlayerManager.getPlayerBySid(t[1]);
  2372. if (!m) {
  2373. m = new M.default(t[1]);
  2374. m.name = t[2];
  2375. m.id = t[0];
  2376. n.MooMoo.GamePlayerManager.addPlayer(m);
  2377. }
  2378. n.MooMoo.debug("Player " + m.name + " has joined the game.");
  2379. if (r) {
  2380. console.log("You are now in game!");
  2381. }
  2382. n.MooMoo.emit("addPlayer", e);
  2383. n.MooMoo.emit("addplayer", e);
  2384. n.MooMoo.emit("D", e);
  2385. }
  2386. t["default"] = addPlayer;
  2387. },
  2388. 1353: (e, t, r) => {
  2389. "use strict";
  2390. Object.defineProperty(t, "__esModule", {
  2391. value: true
  2392. });
  2393. const n = r(2486);
  2394. function addProjectile(e) {
  2395. n.MooMoo.emit("addProjectile", e);
  2396. n.MooMoo.emit("addprojectile", e);
  2397. n.MooMoo.emit("X", e);
  2398. }
  2399. t["default"] = addProjectile;
  2400. },
  2401. 8971: (e, t, r) => {
  2402. "use strict";
  2403. Object.defineProperty(t, "__esModule", {
  2404. value: true
  2405. });
  2406. const n = r(2486);
  2407. function allianceNotification(e) {
  2408. n.MooMoo.emit("allianceNotification", e);
  2409. n.MooMoo.emit("alliancenotification", e);
  2410. n.MooMoo.emit("2", e);
  2411. }
  2412. t["default"] = allianceNotification;
  2413. },
  2414. 8496: (e, t, r) => {
  2415. "use strict";
  2416. Object.defineProperty(t, "__esModule", {
  2417. value: true
  2418. });
  2419. const n = r(2486);
  2420. function animeAI(e) {
  2421. let t = e[0];
  2422. n.MooMoo.emit("animateAI", e);
  2423. n.MooMoo.emit("animateAi", e);
  2424. n.MooMoo.emit("animateai", e);
  2425. n.MooMoo.emit("aa", t);
  2426. }
  2427. t["default"] = animeAI;
  2428. },
  2429. 991: (e, t, r) => {
  2430. "use strict";
  2431. Object.defineProperty(t, "__esModule", {
  2432. value: true
  2433. });
  2434. const n = r(2486);
  2435. function deleteAlliance(e) {
  2436. n.MooMoo.emit("deleteAlliance", e);
  2437. n.MooMoo.emit("deletealliance", e);
  2438. n.MooMoo.emit("1", e);
  2439. }
  2440. t["default"] = deleteAlliance;
  2441. },
  2442. 6443: (e, t, r) => {
  2443. "use strict";
  2444. Object.defineProperty(t, "__esModule", {
  2445. value: true
  2446. });
  2447. const n = r(2486);
  2448. function disconnect() {
  2449. n.MooMoo.emit("disconnect", n.MooMoo.ws);
  2450. }
  2451. t["default"] = disconnect;
  2452. },
  2453. 494: (e, t, r) => {
  2454. "use strict";
  2455. Object.defineProperty(t, "__esModule", {
  2456. value: true
  2457. });
  2458. const n = r(2486);
  2459. function gatherAnimation(e) {
  2460. n.MooMoo.emit("gatherAnimation", e);
  2461. n.MooMoo.emit("gatheranimation", e);
  2462. n.MooMoo.emit("K", e);
  2463. }
  2464. t["default"] = gatherAnimation;
  2465. },
  2466. 4214: (e, t, r) => {
  2467. "use strict";
  2468. Object.defineProperty(t, "__esModule", {
  2469. value: true
  2470. });
  2471. const n = r(2486);
  2472. function killObject(e) {
  2473. let t = e[0];
  2474. n.MooMoo.emit("killObject", e);
  2475. n.MooMoo.emit("killobject", e);
  2476. n.MooMoo.emit("Q", t);
  2477. n.MooMoo.GameObjectManager.removeObjectBySid(t);
  2478. }
  2479. t["default"] = killObject;
  2480. },
  2481. 6821: (e, t, r) => {
  2482. "use strict";
  2483. Object.defineProperty(t, "__esModule", {
  2484. value: true
  2485. });
  2486. const n = r(2486);
  2487. function killObjects(e) {
  2488. let t = e[0];
  2489. n.MooMoo.emit("killObjects", e);
  2490. n.MooMoo.emit("killobjects", e);
  2491. n.MooMoo.emit("R", e);
  2492. n.MooMoo.GameObjectManager.removeObjectsByOwnerSid(t);
  2493. }
  2494. t["default"] = killObjects;
  2495. },
  2496. 7076: (e, t, r) => {
  2497. "use strict";
  2498. Object.defineProperty(t, "__esModule", {
  2499. value: true
  2500. });
  2501. const n = r(2486);
  2502. function killPlayer(e) {
  2503. n.MooMoo.emit("killPlayer", e);
  2504. n.MooMoo.emit("killplayer", e);
  2505. n.MooMoo.emit("P", e);
  2506. }
  2507. t["default"] = killPlayer;
  2508. },
  2509. 4363: (e, t, r) => {
  2510. "use strict";
  2511. Object.defineProperty(t, "__esModule", {
  2512. value: true
  2513. });
  2514. const n = r(2486);
  2515. const M = r(9703);
  2516. function loadAI(e) {
  2517. if (e) {
  2518. let t = (0, M.default)(e, 7);
  2519. n.MooMoo.emit("loadAI", e);
  2520. n.MooMoo.emit("loadAi", e);
  2521. n.MooMoo.emit("loadaI", e);
  2522. n.MooMoo.emit("I", e);
  2523. }
  2524. }
  2525. t["default"] = loadAI;
  2526. },
  2527. 740: (e, t, r) => {
  2528. "use strict";
  2529. Object.defineProperty(t, "__esModule", {
  2530. value: true
  2531. });
  2532. const n = r(2486);
  2533. const M = r(9703);
  2534. const m = r(1917);
  2535. function loadGameObject(e) {
  2536. let t = e[0];
  2537. let r = (0, M.default)(t, 8);
  2538. r.forEach((e => {
  2539. let t = n.MooMoo.GameObjectManager.getGameObjectBySid(e[0]);
  2540. if (!t) {
  2541. t = new m.default(e[0]);
  2542. }
  2543. t.sid = e[0];
  2544. t.x = e[1];
  2545. t.y = e[2];
  2546. t.dir = e[3];
  2547. t.scale = e[4];
  2548. t.type = e[5];
  2549. t.id = e[6];
  2550. t.ownerSid = e[7];
  2551. n.MooMoo.GameObjectManager.addObject(t);
  2552. }));
  2553. n.MooMoo.emit("loadGameObject", e);
  2554. n.MooMoo.emit("loadgameobject", e);
  2555. n.MooMoo.emit("H", e);
  2556. }
  2557. t["default"] = loadGameObject;
  2558. },
  2559. 4559: (e, t, r) => {
  2560. "use strict";
  2561. Object.defineProperty(t, "__esModule", {
  2562. value: true
  2563. });
  2564. const n = r(2486);
  2565. function pingMap(e) {
  2566. n.MooMoo.emit("pingMap", e);
  2567. n.MooMoo.emit("pingmap", e);
  2568. n.MooMoo.emit("9", e);
  2569. }
  2570. t["default"] = pingMap;
  2571. },
  2572. 2139: (e, t, r) => {
  2573. "use strict";
  2574. Object.defineProperty(t, "__esModule", {
  2575. value: true
  2576. });
  2577. const n = r(2486);
  2578. function pingSocketResponse(e) {
  2579. n.MooMoo.emit("pingSocketResponse", e);
  2580. n.MooMoo.emit("pingsocketresponse", e);
  2581. n.MooMoo.emit("0", e);
  2582. }
  2583. t["default"] = pingSocketResponse;
  2584. },
  2585. 9170: (e, t, r) => {
  2586. "use strict";
  2587. Object.defineProperty(t, "__esModule", {
  2588. value: true
  2589. });
  2590. const n = r(2486);
  2591. function receiveChat(e) {
  2592. n.MooMoo.emit("receiveChat", e);
  2593. n.MooMoo.emit("receivechat", e);
  2594. n.MooMoo.emit("6", e);
  2595. }
  2596. t["default"] = receiveChat;
  2597. },
  2598. 1178: (e, t, r) => {
  2599. "use strict";
  2600. Object.defineProperty(t, "__esModule", {
  2601. value: true
  2602. });
  2603. const n = r(2486);
  2604. function remProjectile(e) {
  2605. n.MooMoo.emit("remProjectile", e);
  2606. n.MooMoo.emit("remprojectile", e);
  2607. n.MooMoo.emit("Y", e);
  2608. }
  2609. t["default"] = remProjectile;
  2610. },
  2611. 7564: (e, t, r) => {
  2612. "use strict";
  2613. Object.defineProperty(t, "__esModule", {
  2614. value: true
  2615. });
  2616. const n = r(2486);
  2617. function removePlayer(e) {
  2618. let t = e[0];
  2619. n.MooMoo.GamePlayerManager.removePlayerById(t);
  2620. n.MooMoo.debug("Player " + t + " has left the game.");
  2621. n.MooMoo.emit("removePlayer", e);
  2622. n.MooMoo.emit("removeplayer", e);
  2623. n.MooMoo.emit("E", e);
  2624. }
  2625. t["default"] = removePlayer;
  2626. },
  2627. 7580: (e, t, r) => {
  2628. "use strict";
  2629. Object.defineProperty(t, "__esModule", {
  2630. value: true
  2631. });
  2632. const n = r(2486);
  2633. function serverShutdownNotice(e) {
  2634. n.MooMoo.emit("serverShutdownNotice", e);
  2635. n.MooMoo.emit("servershutdownnotice", e);
  2636. n.MooMoo.emit("7", e);
  2637. }
  2638. t["default"] = serverShutdownNotice;
  2639. },
  2640. 2492: (e, t, r) => {
  2641. "use strict";
  2642. Object.defineProperty(t, "__esModule", {
  2643. value: true
  2644. });
  2645. const n = r(2486);
  2646. function setAlliancePlayers(e) {
  2647. n.MooMoo.emit("setAlliancePlayers", e);
  2648. n.MooMoo.emit("setallianceplayers", e);
  2649. n.MooMoo.emit("4", e);
  2650. }
  2651. t["default"] = setAlliancePlayers;
  2652. },
  2653. 643: (e, t, r) => {
  2654. "use strict";
  2655. Object.defineProperty(t, "__esModule", {
  2656. value: true
  2657. });
  2658. const n = r(6649);
  2659. const M = r(8233);
  2660. const m = r(2486);
  2661. function setInitData(e) {
  2662. let t = e[0];
  2663. let r = t.teams;
  2664. for (let e = 0; e < r.length; e++) {
  2665. let t = r[e];
  2666. let p = t.sid;
  2667. let y = t.owner;
  2668. let h = new n.default(new M.default(y), p);
  2669. m.MooMoo.teams.push(h);
  2670. }
  2671. }
  2672. t["default"] = setInitData;
  2673. },
  2674. 4069: (e, t, r) => {
  2675. "use strict";
  2676. Object.defineProperty(t, "__esModule", {
  2677. value: true
  2678. });
  2679. const n = r(2486);
  2680. function setPlayerTeam(e) {
  2681. n.MooMoo.emit("setPlayerTeam", e);
  2682. n.MooMoo.emit("setplayerteam", e);
  2683. n.MooMoo.emit("3", e);
  2684. }
  2685. t["default"] = setPlayerTeam;
  2686. },
  2687. 4318: (e, t, r) => {
  2688. "use strict";
  2689. Object.defineProperty(t, "__esModule", {
  2690. value: true
  2691. });
  2692. const n = r(2486);
  2693. const M = r(3413);
  2694. const m = r(2938);
  2695. const p = r(2987);
  2696. const y = r(2533);
  2697. const h = r(5610);
  2698. const b = r(9682);
  2699. const P = r(177);
  2700. const v = r(1901);
  2701. const k = r(1618);
  2702. function setupGame(e) {
  2703. let t = e[0];
  2704. n.MooMoo.myPlayer = {};
  2705. n.MooMoo.myPlayer.sid = t;
  2706. n.MooMoo.myPlayer.place = M.default;
  2707. n.MooMoo.myPlayer.chat = m.default;
  2708. n.MooMoo.myPlayer.hit = p.default;
  2709. n.MooMoo.myPlayer.equipHat = y.default;
  2710. n.MooMoo.myPlayer.equipAccessory = h.default;
  2711. n.MooMoo.myPlayer.unequipHat = b.default;
  2712. n.MooMoo.myPlayer.unequipAccessory = P.default;
  2713. n.MooMoo.myPlayer.buyHat = v.default;
  2714. n.MooMoo.myPlayer.buyAccessory = k.default;
  2715. n.MooMoo.vars.gameLoaded = true;
  2716. n.MooMoo.emit("gameLoad");
  2717. n.MooMoo.emit("setupGame", e);
  2718. n.MooMoo.emit("setupgame", e);
  2719. n.MooMoo.emit("C", e);
  2720. let r = n.MooMoo.didInit;
  2721. if (!r) {
  2722. if (n.MooMoo.onGameLoad) n.MooMoo.onGameLoad();
  2723. n.MooMoo.didInit = true;
  2724. }
  2725. }
  2726. t["default"] = setupGame;
  2727. },
  2728. 200: (e, t, r) => {
  2729. "use strict";
  2730. Object.defineProperty(t, "__esModule", {
  2731. value: true
  2732. });
  2733. const n = r(2486);
  2734. function shootTurret(e) {
  2735. n.MooMoo.emit("shootTurret", e);
  2736. n.MooMoo.emit("shootturret", e);
  2737. n.MooMoo.emit("M", e);
  2738. }
  2739. t["default"] = shootTurret;
  2740. },
  2741. 9051: (e, t, r) => {
  2742. "use strict";
  2743. Object.defineProperty(t, "__esModule", {
  2744. value: true
  2745. });
  2746. const n = r(2486);
  2747. function showText(e) {
  2748. n.MooMoo.emit("showText", e);
  2749. n.MooMoo.emit("showtext", e);
  2750. n.MooMoo.emit("8", e);
  2751. }
  2752. t["default"] = showText;
  2753. },
  2754. 1673: (e, t, r) => {
  2755. "use strict";
  2756. Object.defineProperty(t, "__esModule", {
  2757. value: true
  2758. });
  2759. const n = r(2486);
  2760. function updateAge(e) {
  2761. n.MooMoo.emit("updateAge", e);
  2762. n.MooMoo.emit("updateage", e);
  2763. n.MooMoo.emit("T", e);
  2764. }
  2765. t["default"] = updateAge;
  2766. },
  2767. 3234: (e, t, r) => {
  2768. "use strict";
  2769. Object.defineProperty(t, "__esModule", {
  2770. value: true
  2771. });
  2772. const n = r(2486);
  2773. function updateHealth(e) {
  2774. let t = e[0];
  2775. let r = e[1];
  2776. let M = n.MooMoo.GamePlayerManager.getPlayerBySid(t);
  2777. if (M) {
  2778. M.health = r;
  2779. }
  2780. n.MooMoo.emit("updateHealth", e);
  2781. n.MooMoo.emit("updatehealth", e);
  2782. n.MooMoo.emit("O", e);
  2783. }
  2784. t["default"] = updateHealth;
  2785. },
  2786. 4471: (e, t, r) => {
  2787. "use strict";
  2788. Object.defineProperty(t, "__esModule", {
  2789. value: true
  2790. });
  2791. const n = r(2486);
  2792. function updateItemCounts(e) {
  2793. n.MooMoo.emit("updateItemCounts", e);
  2794. n.MooMoo.emit("updateitemcounts", e);
  2795. n.MooMoo.emit("S", e);
  2796. }
  2797. t["default"] = updateItemCounts;
  2798. },
  2799. 5850: (e, t, r) => {
  2800. "use strict";
  2801. Object.defineProperty(t, "__esModule", {
  2802. value: true
  2803. });
  2804. const n = r(2486);
  2805. function updateItems(e) {
  2806. n.MooMoo.emit("updateItems", e);
  2807. n.MooMoo.emit("updateitems", e);
  2808. n.MooMoo.emit("V", e);
  2809. }
  2810. t["default"] = updateItems;
  2811. },
  2812. 121: (e, t, r) => {
  2813. "use strict";
  2814. Object.defineProperty(t, "__esModule", {
  2815. value: true
  2816. });
  2817. const n = r(2486);
  2818. function updateLeaderboard(e) {
  2819. let t = e[0];
  2820. n.MooMoo.LeaderboardManager.updateLeaderboard(t);
  2821. n.MooMoo.emit("updateLeaderboard", e);
  2822. n.MooMoo.emit("updateleaderboard", e);
  2823. n.MooMoo.emit("G", e);
  2824. }
  2825. t["default"] = updateLeaderboard;
  2826. },
  2827. 1753: (e, t, r) => {
  2828. "use strict";
  2829. Object.defineProperty(t, "__esModule", {
  2830. value: true
  2831. });
  2832. const n = r(2486);
  2833. function updateMinimap(e) {
  2834. n.MooMoo.emit("updateMinimap", e);
  2835. n.MooMoo.emit("updateminimap", e);
  2836. n.MooMoo.emit("mm", e);
  2837. }
  2838. t["default"] = updateMinimap;
  2839. },
  2840. 8916: (e, t, r) => {
  2841. "use strict";
  2842. Object.defineProperty(t, "__esModule", {
  2843. value: true
  2844. });
  2845. const n = r(2486);
  2846. function updatePlayerValue(e) {
  2847. let t = e[0];
  2848. let r = e[1];
  2849. let M = n.MooMoo.myPlayer.resources;
  2850. M[t] = r;
  2851. n.MooMoo.myPlayer.resources = M;
  2852. n.MooMoo.emit("updatePlayerValue", e);
  2853. n.MooMoo.emit("updateplayervalue", e);
  2854. n.MooMoo.emit("N", e);
  2855. }
  2856. t["default"] = updatePlayerValue;
  2857. },
  2858. 8044: (e, t, r) => {
  2859. "use strict";
  2860. Object.defineProperty(t, "__esModule", {
  2861. value: true
  2862. });
  2863. t.updateHookPosition = void 0;
  2864. const n = r(9703);
  2865. const M = r(8730);
  2866. const m = r(2486);
  2867. const p = r(8233);
  2868. const y = r(1917);
  2869. function updatePlayers(e) {
  2870. let t = e[0];
  2871. let r = (0, n.default)(t, 13);
  2872. m.MooMoo.ActivePlayerManager.clearPlayers();
  2873. r.forEach((e => {
  2874. let t = m.MooMoo.GamePlayerManager.getPlayerBySid(e[0]);
  2875. if (!t) {
  2876. t = new p.default(e[0]);
  2877. t.x = e[1];
  2878. t.y = e[2];
  2879. }
  2880. t.sid = e[0];
  2881. t.dir = e[3];
  2882. t.buildIndex = e[4];
  2883. t.weaponIndex = e[5];
  2884. t.weaponVariant = e[6];
  2885. t.team = e[7];
  2886. t.isLeader = e[8];
  2887. t.skinIndex = e[9];
  2888. t.tailIndex = e[10];
  2889. t.iconIndex = e[11];
  2890. t.zIndex = e[12];
  2891. m.MooMoo.ActivePlayerManager.addPlayer(t);
  2892. if (t.sid === m.MooMoo.myPlayer.sid) {
  2893. Object.assign(m.MooMoo.myPlayer, t);
  2894. }
  2895. (0, M.default)();
  2896. }));
  2897. m.MooMoo.emit("updatePlayers", t);
  2898. m.MooMoo.emit("updateplayers", t);
  2899. m.MooMoo.emit("a", t);
  2900. }
  2901. function updateHookPosition(e) {
  2902. if (this instanceof p.default || this instanceof y.default || this.isAI || !this.id) {} else {
  2903. let t = m.MooMoo.GamePlayerManager.getPlayerBySid(this.sid);
  2904. if (t) {
  2905. t.x = e;
  2906. t.y = this.y;
  2907. if (m.MooMoo.onPositionUpdate) {
  2908. m.MooMoo.onPositionUpdate(t);
  2909. }
  2910. }
  2911. m.MooMoo.GamePlayerManager.updatePlayer(this.sid, this);
  2912. }
  2913. }
  2914. t.updateHookPosition = updateHookPosition;
  2915. t["default"] = updatePlayers;
  2916. },
  2917. 5303: (e, t, r) => {
  2918. "use strict";
  2919. Object.defineProperty(t, "__esModule", {
  2920. value: true
  2921. });
  2922. const n = r(2486);
  2923. function updateStoreItems(e) {
  2924. n.MooMoo.emit("updateStoreItems", e);
  2925. n.MooMoo.emit("updatestoreitems", e);
  2926. n.MooMoo.emit("us", e);
  2927. }
  2928. t["default"] = updateStoreItems;
  2929. },
  2930. 5905: (e, t, r) => {
  2931. "use strict";
  2932. Object.defineProperty(t, "__esModule", {
  2933. value: true
  2934. });
  2935. const n = r(2486);
  2936. function updateUpgrades(e) {
  2937. n.MooMoo.emit("updateUpgrades", e);
  2938. n.MooMoo.emit("updateupgrades", e);
  2939. n.MooMoo.emit("U", e);
  2940. }
  2941. t["default"] = updateUpgrades;
  2942. },
  2943. 3661: (e, t, r) => {
  2944. "use strict";
  2945. Object.defineProperty(t, "__esModule", {
  2946. value: true
  2947. });
  2948. const n = r(2486);
  2949. function wiggleGameObject(e) {
  2950. n.MooMoo.emit("wiggleGameObject", e);
  2951. n.MooMoo.emit("wigglegameobject", e);
  2952. n.MooMoo.emit("L", e);
  2953. }
  2954. t["default"] = wiggleGameObject;
  2955. },
  2956. 3407: (e, t, r) => {
  2957. "use strict";
  2958. r.r(t);
  2959. r.d(t, {
  2960. default: () => n
  2961. });
  2962. const decode = function(e) {
  2963. const t = 4294967296;
  2964. let r = 0;
  2965. if (e instanceof ArrayBuffer && (e = new Uint8Array(e)), "object" != typeof e || void 0 === e.length) throw new Error("Invalid argument type: Expected a byte array (Array or Uint8Array) to deserialize.");
  2966. if (!e.length) throw new Error("Invalid argument: The byte array to deserialize is empty.");
  2967. e instanceof Uint8Array || (e = new Uint8Array(e));
  2968. let n = i();
  2969. return e.length, n;
  2970. function i() {
  2971. const t = e[r++];
  2972. if (t >= 0 && t <= 127) return t;
  2973. if (t >= 128 && t <= 143) return l(t - 128);
  2974. if (t >= 144 && t <= 159) return c(t - 144);
  2975. if (t >= 160 && t <= 191) return d(t - 160);
  2976. if (192 === t) return null;
  2977. if (193 === t) throw new Error("Invalid byte code 0xc1 found.");
  2978. if (194 === t) return !1;
  2979. if (195 === t) return !0;
  2980. if (196 === t) return a(-1, 1);
  2981. if (197 === t) return a(-1, 2);
  2982. if (198 === t) return a(-1, 4);
  2983. if (199 === t) return w(-1, 1);
  2984. if (200 === t) return w(-1, 2);
  2985. if (201 === t) return w(-1, 4);
  2986. if (202 === t) return u(4);
  2987. if (203 === t) return u(8);
  2988. if (204 === t) return o(1);
  2989. if (205 === t) return o(2);
  2990. if (206 === t) return o(4);
  2991. if (207 === t) return o(8);
  2992. if (208 === t) return f(1);
  2993. if (209 === t) return f(2);
  2994. if (210 === t) return f(4);
  2995. if (211 === t) return f(8);
  2996. if (212 === t) return w(1);
  2997. if (213 === t) return w(2);
  2998. if (214 === t) return w(4);
  2999. if (215 === t) return w(8);
  3000. if (216 === t) return w(16);
  3001. if (217 === t) return d(-1, 1);
  3002. if (218 === t) return d(-1, 2);
  3003. if (219 === t) return d(-1, 4);
  3004. if (220 === t) return c(-1, 2);
  3005. if (221 === t) return c(-1, 4);
  3006. if (222 === t) return l(-1, 2);
  3007. if (223 === t) return l(-1, 4);
  3008. if (t >= 224 && t <= 255) return t - 256;
  3009. throw console.debug("msgpack array:", e), new Error("Invalid byte value '" + t + "' at index " + (r - 1) + " in the MessagePack binary data (length " + e.length + "): Expecting a range of 0 to 255. This is not a byte array.");
  3010. }
  3011. function f(t) {
  3012. let n = 0, M = !0;
  3013. for (;t-- > 0; ) if (M) {
  3014. let t = e[r++];
  3015. n += 127 & t, 128 & t && (n -= 128), M = !1;
  3016. } else n *= 256, n += e[r++];
  3017. return n;
  3018. }
  3019. function o(t) {
  3020. let n = 0;
  3021. for (;t-- > 0; ) n *= 256, n += e[r++];
  3022. return n;
  3023. }
  3024. function u(t) {
  3025. let n = new DataView(e.buffer, r, t);
  3026. return r += t, 4 === t ? n.getFloat32(0, !1) : 8 === t ? n.getFloat64(0, !1) : void 0;
  3027. }
  3028. function a(t, n) {
  3029. t < 0 && (t = o(n));
  3030. let M = e.subarray(r, r + t);
  3031. return r += t, M;
  3032. }
  3033. function l(e, t) {
  3034. e < 0 && (e = o(t));
  3035. let r = {};
  3036. for (;e-- > 0; ) r[i()] = i();
  3037. return r;
  3038. }
  3039. function c(e, t) {
  3040. e < 0 && (e = o(t));
  3041. let r = [];
  3042. for (;e-- > 0; ) r.push(i());
  3043. return r;
  3044. }
  3045. function d(t, n) {
  3046. t < 0 && (t = o(n));
  3047. let M = r;
  3048. return r += t, function(e, t, r) {
  3049. let n = t, M = "";
  3050. for (r += t; n < r; ) {
  3051. let t = e[n++];
  3052. if (t > 127) if (t > 191 && t < 224) {
  3053. if (n >= r) throw new Error("UTF-8 decode: incomplete 2-byte sequence");
  3054. t = (31 & t) << 6 | 63 & e[n++];
  3055. } else if (t > 223 && t < 240) {
  3056. if (n + 1 >= r) throw new Error("UTF-8 decode: incomplete 3-byte sequence");
  3057. t = (15 & t) << 12 | (63 & e[n++]) << 6 | 63 & e[n++];
  3058. } else {
  3059. if (!(t > 239 && t < 248)) throw new Error("UTF-8 decode: unknown multibyte start 0x" + t.toString(16) + " at index " + (n - 1));
  3060. if (n + 2 >= r) throw new Error("UTF-8 decode: incomplete 4-byte sequence");
  3061. t = (7 & t) << 18 | (63 & e[n++]) << 12 | (63 & e[n++]) << 6 | 63 & e[n++];
  3062. }
  3063. if (t <= 65535) M += String.fromCharCode(t); else {
  3064. if (!(t <= 1114111)) throw new Error("UTF-8 decode: code point 0x" + t.toString(16) + " exceeds UTF-16 reach");
  3065. t -= 65536, M += String.fromCharCode(t >> 10 | 55296), M += String.fromCharCode(1023 & t | 56320);
  3066. }
  3067. }
  3068. return M;
  3069. }(e, M, t);
  3070. }
  3071. function w(e, n) {
  3072. e < 0 && (e = o(n));
  3073. let M = o(1), m = a(e);
  3074. return 255 === M ? function(e) {
  3075. if (4 === e.length) {
  3076. let t = (e[0] << 24 >>> 0) + (e[1] << 16 >>> 0) + (e[2] << 8 >>> 0) + e[3];
  3077. return new Date(1e3 * t);
  3078. }
  3079. if (8 === e.length) {
  3080. let r = (e[0] << 22 >>> 0) + (e[1] << 14 >>> 0) + (e[2] << 6 >>> 0) + (e[3] >>> 2), n = (3 & e[3]) * t + (e[4] << 24 >>> 0) + (e[5] << 16 >>> 0) + (e[6] << 8 >>> 0) + e[7];
  3081. return new Date(1e3 * n + r / 1e6);
  3082. }
  3083. if (12 === e.length) {
  3084. let t = (e[0] << 24 >>> 0) + (e[1] << 16 >>> 0) + (e[2] << 8 >>> 0) + e[3];
  3085. r -= 8;
  3086. let n = f(8);
  3087. return new Date(1e3 * n + t / 1e6);
  3088. }
  3089. throw new Error("Invalid data length for a date value.");
  3090. }(m) : {
  3091. type: M,
  3092. data: m
  3093. };
  3094. }
  3095. };
  3096. const n = decode;
  3097. },
  3098. 6475: (e, t, r) => {
  3099. "use strict";
  3100. r.r(t);
  3101. r.d(t, {
  3102. default: () => n
  3103. });
  3104. const encode = function(e) {
  3105. const t = 4294967296;
  3106. let r, n, M = new Uint8Array(128), m = 0;
  3107. return a(e), M.subarray(0, m);
  3108. function a(e) {
  3109. switch (typeof e) {
  3110. case "undefined":
  3111. o();
  3112. break;
  3113.  
  3114. case "boolean":
  3115. !function(e) {
  3116. s(e ? 195 : 194);
  3117. }(e);
  3118. break;
  3119.  
  3120. case "number":
  3121. !function(e) {
  3122. if (isFinite(e) && Math.floor(e) === e) if (e >= 0 && e <= 127) s(e); else if (e < 0 && e >= -32) s(e); else if (e > 0 && e <= 255) c([ 204, e ]); else if (e >= -128 && e <= 127) c([ 208, e ]); else if (e > 0 && e <= 65535) c([ 205, e >>> 8, e ]); else if (e >= -32768 && e <= 32767) c([ 209, e >>> 8, e ]); else if (e > 0 && e <= 4294967295) c([ 206, e >>> 24, e >>> 16, e >>> 8, e ]); else if (e >= -2147483648 && e <= 2147483647) c([ 210, e >>> 24, e >>> 16, e >>> 8, e ]); else if (e > 0 && e <= 0x10000000000000000) {
  3123. let r = e / t, n = e % t;
  3124. c([ 211, r >>> 24, r >>> 16, r >>> 8, r, n >>> 24, n >>> 16, n >>> 8, n ]);
  3125. } else e >= -0x8000000000000000 && e <= 0x8000000000000000 ? (s(211), u(e)) : c(e < 0 ? [ 211, 128, 0, 0, 0, 0, 0, 0, 0 ] : [ 207, 255, 255, 255, 255, 255, 255, 255, 255 ]); else n || (r = new ArrayBuffer(8),
  3126. n = new DataView(r)), n.setFloat64(0, e), s(203), c(new Uint8Array(r));
  3127. }(e);
  3128. break;
  3129.  
  3130. case "string":
  3131. !function(e) {
  3132. let t = function(e) {
  3133. let t = !0, r = e.length;
  3134. for (let n = 0; n < r; n++) if (e.charCodeAt(n) > 127) {
  3135. t = !1;
  3136. break;
  3137. }
  3138. let n = 0, M = new Uint8Array(e.length * (t ? 1 : 4));
  3139. for (let t = 0; t !== r; t++) {
  3140. let m = e.charCodeAt(t);
  3141. if (m < 128) M[n++] = m; else {
  3142. if (m < 2048) M[n++] = m >> 6 | 192; else {
  3143. if (m > 55295 && m < 56320) {
  3144. if (++t >= r) throw new Error("UTF-8 encode: incomplete surrogate pair");
  3145. let p = e.charCodeAt(t);
  3146. if (p < 56320 || p > 57343) throw new Error("UTF-8 encode: second surrogate character 0x" + p.toString(16) + " at index " + t + " out of range");
  3147. m = 65536 + ((1023 & m) << 10) + (1023 & p), M[n++] = m >> 18 | 240, M[n++] = m >> 12 & 63 | 128;
  3148. } else M[n++] = m >> 12 | 224;
  3149. M[n++] = m >> 6 & 63 | 128;
  3150. }
  3151. M[n++] = 63 & m | 128;
  3152. }
  3153. }
  3154. return t ? M : M.subarray(0, n);
  3155. }(e), r = t.length;
  3156. r <= 31 ? s(160 + r) : c(r <= 255 ? [ 217, r ] : r <= 65535 ? [ 218, r >>> 8, r ] : [ 219, r >>> 24, r >>> 16, r >>> 8, r ]),
  3157. c(t);
  3158. }(e);
  3159. break;
  3160.  
  3161. case "object":
  3162. null === e ? o() : e instanceof Date ? function(e) {
  3163. let r = e.getTime() / 1e3;
  3164. if (0 === e.getMilliseconds() && r >= 0 && r < 4294967296) c([ 214, 255, r >>> 24, r >>> 16, r >>> 8, r ]); else if (r >= 0 && r < 17179869184) {
  3165. let n = 1e6 * e.getMilliseconds();
  3166. c([ 215, 255, n >>> 22, n >>> 14, n >>> 6, n << 2 >>> 0 | r / t, r >>> 24, r >>> 16, r >>> 8, r ]);
  3167. } else {
  3168. let t = 1e6 * e.getMilliseconds();
  3169. c([ 199, 12, 255, t >>> 24, t >>> 16, t >>> 8, t ]), u(r);
  3170. }
  3171. }(e) : Array.isArray(e) ? f(e) : e instanceof Uint8Array || e instanceof Uint8ClampedArray ? function(e) {
  3172. let t = e.length;
  3173. c(t <= 15 ? [ 196, t ] : t <= 65535 ? [ 197, t >>> 8, t ] : [ 198, t >>> 24, t >>> 16, t >>> 8, t ]),
  3174. c(e);
  3175. }(e) : e instanceof Int8Array || e instanceof Int16Array || e instanceof Uint16Array || e instanceof Int32Array || e instanceof Uint32Array || e instanceof Float32Array || e instanceof Float64Array ? f(e) : function(e) {
  3176. let t = 0;
  3177. for (let r in e) t++;
  3178. t <= 15 ? s(128 + t) : c(t <= 65535 ? [ 222, t >>> 8, t ] : [ 223, t >>> 24, t >>> 16, t >>> 8, t ]);
  3179. for (let t in e) a(t), a(e[t]);
  3180. }(e);
  3181. }
  3182. }
  3183. function o(e) {
  3184. s(192);
  3185. }
  3186. function f(e) {
  3187. let t = e.length;
  3188. t <= 15 ? s(144 + t) : c(t <= 65535 ? [ 220, t >>> 8, t ] : [ 221, t >>> 24, t >>> 16, t >>> 8, t ]);
  3189. for (let r = 0; r < t; r++) a(e[r]);
  3190. }
  3191. function s(e) {
  3192. if (M.length < m + 1) {
  3193. let e = 2 * M.length;
  3194. for (;e < m + 1; ) e *= 2;
  3195. let t = new Uint8Array(e);
  3196. t.set(M), M = t;
  3197. }
  3198. M[m] = e, m++;
  3199. }
  3200. function c(e) {
  3201. if (M.length < m + e.length) {
  3202. let t = 2 * M.length;
  3203. for (;t < m + e.length; ) t *= 2;
  3204. let r = new Uint8Array(t);
  3205. r.set(M), M = r;
  3206. }
  3207. M.set(e, m), m += e.length;
  3208. }
  3209. function u(e) {
  3210. let r, n;
  3211. e >= 0 ? (r = e / t, n = e % t) : (e++, r = Math.abs(e) / t, n = Math.abs(e) % t,
  3212. r = ~r, n = ~n), c([ r >>> 24, r >>> 16, r >>> 8, r, n >>> 24, n >>> 16, n >>> 8, n ]);
  3213. }
  3214. };
  3215. const n = encode;
  3216. },
  3217. 1345: (e, t, r) => {
  3218. "use strict";
  3219. r.r(t);
  3220. r.d(t, {
  3221. default: () => P
  3222. });
  3223. var n = r(2486);
  3224. var M = r(2762);
  3225. var m = r(1477);
  3226. var p = r(6791);
  3227. var y = r.n(p);
  3228. var h = r(4918);
  3229. var b = r(5800);
  3230. function loadAPI() {
  3231. n.MooMoo.scriptAPI = {
  3232. parse: M.A,
  3233. validate: m.A,
  3234. tokenize: y(),
  3235. execute: b.A
  3236. };
  3237. }
  3238. const P = loadAPI;
  3239. }
  3240. };
  3241. var t = {};
  3242. function __webpack_require__(r) {
  3243. var n = t[r];
  3244. if (n !== undefined) {
  3245. return n.exports;
  3246. }
  3247. var M = t[r] = {
  3248. exports: {}
  3249. };
  3250. e[r].call(M.exports, M, M.exports, __webpack_require__);
  3251. return M.exports;
  3252. }
  3253. (() => {
  3254. __webpack_require__.n = e => {
  3255. var t = e && e.__esModule ? () => e["default"] : () => e;
  3256. __webpack_require__.d(t, {
  3257. a: t
  3258. });
  3259. return t;
  3260. };
  3261. })();
  3262. (() => {
  3263. __webpack_require__.d = (e, t) => {
  3264. for (var r in t) {
  3265. if (__webpack_require__.o(t, r) && !__webpack_require__.o(e, r)) {
  3266. Object.defineProperty(e, r, {
  3267. enumerable: true,
  3268. get: t[r]
  3269. });
  3270. }
  3271. }
  3272. };
  3273. })();
  3274. (() => {
  3275. __webpack_require__.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
  3276. })();
  3277. (() => {
  3278. __webpack_require__.r = e => {
  3279. if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
  3280. Object.defineProperty(e, Symbol.toStringTag, {
  3281. value: "Module"
  3282. });
  3283. }
  3284. Object.defineProperty(e, "__esModule", {
  3285. value: true
  3286. });
  3287. };
  3288. })();
  3289. var r = __webpack_require__(2486);
  3290. })();
  3291.  
  3292. }
  3293. }, false);

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址