Sleazy Fork is available in English.

Pre-Client Remake Minify

Beta, Have issue.

  1. // ==UserScript==
  2. // @name Pre-Client Remake Minify
  3. // @author ueheua
  4. // @description Beta, Have issue.
  5. // @version v0.7
  6. // @icon https://c.tenor.com/1y8zDc-ll-EAAAAd/3d-saul-saul-goodman.gif
  7. // @match *://*.moomoo.io/*
  8. // @grant none
  9. // @namespace https://greasyfork.org/users/1008668
  10. // ==/UserScript==
  11.  
  12. // Control: check code
  13.  
  14. var አህሳ = "ክር",
  15. ትከፍታለህ = [0];
  16. for (let e = 0; e < 3; e++) {
  17. let e = "አመሳስል";
  18. ትከፍታለህ.push[e]
  19. }
  20. window.devicePixelRatio2 = 1, window.FRVR = 0;
  21. const antiBug = !1;
  22. setTimeout((() => {
  23. antiBug = !0
  24. }), 0);
  25. let webskt, bot = 3,
  26. isConnected = !1,
  27. myConfig = {
  28. x: 0,
  29. y: 0,
  30. clan: void 0,
  31. dir: 0,
  32. safeDir: 0,
  33. nearDist: void 0,
  34. nearAim: 0
  35. },
  36. botConfig = {
  37. waitHeal: !1,
  38. botJoin: !1,
  39. stop: !1,
  40. atck: !1,
  41. nearDst: 4444
  42. };
  43. WebSocket.prototype.oldSend = WebSocket.prototype.send, WebSocket.prototype.send = function (e) {
  44. webskt || (webskt = this), this.oldSend(e)
  45. };
  46. let randomcowname = ["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"];
  47.  
  48. function objectPlace(e, t) {
  49. return Math.atan2(e.y - t.y, e.x - t.x)
  50. }
  51.  
  52. function objectDist(e, t) {
  53. return Math.hypot(e.y - t.y, e.x - t.x)
  54. }
  55. window.urName = "ohio";
  56. const ohio = new Audio("https://cdn.discordapp.com/attachments/1053956635032289280/1053956723704074270/ohio.mp3"),
  57. goofy = new Audio("https://cdn.discordapp.com/attachments/1053956635032289280/1053978907717685288/ahh.mp3"),
  58. ohiosong = new Audio("https://cdn.discordapp.com/attachments/1053956635032289280/1053986654416818216/ohiosong.mp3"),
  59. madeinohio = new Audio("https://cdn.discordapp.com/attachments/1053956635032289280/1053987827353927740/madeinohio.mp3"),
  60. song1 = new Audio("https://cdn.discordapp.com/attachments/1053956635032289280/1055142773948428348/Zack_Merci_X_CRVN_-_Nobody_NCS_Release.mp3"),
  61. song2 = new Audio("https://cdn.discordapp.com/attachments/1053956635032289280/1055516288249757797/ae86.mp3"),
  62. song3 = new Audio("https://cdn.discordapp.com/attachments/1053956635032289280/1069192210932826182/dontstandsoclose.mp3");
  63. ! function (e) {
  64. var t = {};
  65.  
  66. function n(i) {
  67. if (t[i]) return t[i].exports;
  68. var s = t[i] = {
  69. i: i,
  70. l: !1,
  71. exports: {}
  72. };
  73. return e[i].call(s.exports, s, s.exports, n), s.l = !0, s.exports
  74. }
  75. n.m = e, n.c = t, n.d = function (e, t, i) {
  76. n.o(e, t) || Object.defineProperty(e, t, {
  77. enumerable: !0,
  78. get: i
  79. })
  80. }, n.r = function (e) {
  81. "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
  82. value: "Module"
  83. }), Object.defineProperty(e, "__esModule", {
  84. value: !0
  85. })
  86. }, n.t = function (e, t) {
  87. if (1 & t && (e = n(e)), 8 & t) return e;
  88. if (4 & t && "object" == typeof e && e && e.__esModule) return e;
  89. var i = Object.create(null);
  90. if (n.r(i), Object.defineProperty(i, "default", {
  91. enumerable: !0,
  92. value: e
  93. }), 2 & t && "string" != typeof e)
  94. for (var s in e) n.d(i, s, function (t) {
  95. return e[t]
  96. }.bind(null, s));
  97. return i
  98. }, n.n = function (e) {
  99. var t = e && e.__esModule ? function () {
  100. return e.default
  101. } : function () {
  102. return e
  103. };
  104. return n.d(t, "a", t), t
  105. }, n.o = function (e, t) {
  106. return Object.prototype.hasOwnProperty.call(e, t)
  107. }, n.p = "", n(n.s = "./src/js/app.js")
  108. }({
  109. "./node_modules/bad-words/lib/badwords.js":
  110. /*!************************************************!*\
  111. !*** ./node_modules/bad-words/lib/badwords.js ***!
  112. \************************************************/
  113. /*! no static exports found */
  114. function (e, t, n) {
  115. const i = n( /*! ./lang.json */ "./node_modules/bad-words/lib/lang.json").words,
  116. s = n( /*! badwords-list */ "./node_modules/badwords-list/lib/index.js").array;
  117. e.exports = class {
  118. constructor(e = {}) {
  119. Object.assign(this, {
  120. list: e.emptyList && [] || Array.prototype.concat.apply(i, [s, e.list || []]),
  121. exclude: e.exclude || [],
  122. placeHolder: e.placeHolder || "*",
  123. regex: e.regex || /[^a-zA-Z0-9|\$|\@]|\^/g,
  124. replaceRegex: e.replaceRegex || /\w/g
  125. })
  126. }
  127. isProfane(e) {
  128. return this.list.filter((t => {
  129. const n = new RegExp(`\\b${t.replace(/(\W)/g,"\\$1")}\\b`, "gi");
  130. return !this.exclude.includes(t.toLowerCase()) && n.test(e)
  131. })).length > 0 || !1
  132. }
  133. replaceWord(e) {
  134. return e.replace(this.regex, "").replace(this.replaceRegex, this.placeHolder)
  135. }
  136. clean(e) {
  137. return e.split(/\b/).map((e => this.isProfane(e) ? this.replaceWord(e) : e)).join("")
  138. }
  139. addWords() {
  140. let e = Array.from(arguments);
  141. this.list.push(...e), e.map((e => e.toLowerCase())).forEach((e => {
  142. this.exclude.includes(e) && this.exclude.splice(this.exclude.indexOf(e), 1)
  143. }))
  144. }
  145. removeWords() {
  146. this.exclude.push(...Array.from(arguments).map((e => e.toLowerCase())))
  147. }
  148. }
  149. },
  150. "./node_modules/bad-words/lib/lang.json":
  151. /*!**********************************************!*\
  152. !*** ./node_modules/bad-words/lib/lang.json ***!
  153. \**********************************************/
  154. /*! exports provided: words, default */
  155. function (e) {
  156. e.exports = {
  157. 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", "fuck", "fucker", "fuckin", "fucking", "fucks", "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 Fucker", "Motha Fuker", "Motha Fukkah", "Motha Fukker", "Mother Fucker", "Mother Fukah", "Mother Fuker", "Mother Fukkah", "Mother Fukker", "mother-fucker", "Mutha Fucker", "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", "fuck", "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", "motherfucker", "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", "*fuck*", "*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"]
  158. }
  159. },
  160. "./node_modules/badwords-list/lib/array.js":
  161. /*!*************************************************!*\
  162. !*** ./node_modules/badwords-list/lib/array.js ***!
  163. \*************************************************/
  164. /*! no static exports found */
  165. function (e, t) {
  166. e.exports = ["4r5e", "5h1t", "5hit", "a55", "anal", "anus", "ar5e", "arrse", "arse", "ass", "ass-fucker", "asses", "assfucker", "assfukka", "asshole", "assholes", "asswhole", "a_s_s", "b!tch", "b00bs", "b17ch", "b1tch", "ballbag", "balls", "ballsack", "bastard", "beastial", "beastiality", "bellend", "bestial", "bestiality", "bi+ch", "biatch", "bitch", "bitcher", "bitchers", "bitches", "bitchin", "bitching", "bloody", "blow job", "blowjob", "blowjobs", "boiolas", "bollock", "bollok", "boner", "boob", "boobs", "booobs", "boooobs", "booooobs", "booooooobs", "breasts", "buceta", "bugger", "bum", "bunny fucker", "butt", "butthole", "buttmuch", "buttplug", "c0ck", "c0cksucker", "carpet muncher", "cawk", "chink", "cipa", "cl1t", "clit", "clitoris", "clits", "cnut", "cock", "cock-sucker", "cockface", "cockhead", "cockmunch", "cockmuncher", "cocks", "cocksuck", "cocksucked", "cocksucker", "cocksucking", "cocksucks", "cocksuka", "cocksukka", "cok", "cokmuncher", "coksucka", "coon", "cox", "crap", "cum", "cummer", "cumming", "cums", "cumshot", "cunilingus", "cunillingus", "cunnilingus", "cunt", "cuntlick", "cuntlicker", "cuntlicking", "cunts", "cyalis", "cyberfuc", "cyberfuck", "cyberfucked", "cyberfucker", "cyberfuckers", "cyberfucking", "d1ck", "damn", "dick", "dickhead", "dildo", "dildos", "dink", "dinks", "dirsa", "dlck", "dog-fucker", "doggin", "dogging", "donkeyribber", "doosh", "duche", "dyke", "ejaculate", "ejaculated", "ejaculates", "ejaculating", "ejaculatings", "ejaculation", "ejakulate", "f u c k", "f u c k e r", "f4nny", "fag", "fagging", "faggitt", "faggot", "faggs", "fagot", "fagots", "fags", "fanny", "fannyflaps", "fannyfucker", "fanyy", "fatass", "fcuk", "fcuker", "fcuking", "feck", "fecker", "felching", "fellate", "fellatio", "fingerfuck", "fingerfucked", "fingerfucker", "fingerfuckers", "fingerfucking", "fingerfucks", "fistfuck", "fistfucked", "fistfucker", "fistfuckers", "fistfucking", "fistfuckings", "fistfucks", "flange", "fook", "fooker", "fuck", "fucka", "fucked", "fucker", "fuckers", "fuckhead", "fuckheads", "fuckin", "fucking", "fuckings", "fuckingshitmotherfucker", "fuckme", "fucks", "fuckwhit", "fuckwit", "fudge packer", "fudgepacker", "fuk", "fuker", "fukker", "fukkin", "fuks", "fukwhit", "fukwit", "fux", "fux0r", "f_u_c_k", "gangbang", "gangbanged", "gangbangs", "gaylord", "gaysex", "goatse", "God", "god-dam", "god-damned", "goddamn", "goddamned", "hardcoresex", "hell", "heshe", "hoar", "hoare", "hoer", "homo", "hore", "horniest", "horny", "hotsex", "jack-off", "jackoff", "jap", "jerk-off", "jism", "jiz", "jizm", "jizz", "kawk", "knob", "knobead", "knobed", "knobend", "knobhead", "knobjocky", "knobjokey", "kock", "kondum", "kondums", "kum", "kummer", "kumming", "kums", "kunilingus", "l3i+ch", "l3itch", "labia", "lust", "lusting", "m0f0", "m0fo", "m45terbate", "ma5terb8", "ma5terbate", "masochist", "master-bate", "masterb8", "masterbat*", "masterbat3", "masterbate", "masterbation", "masterbations", "masturbate", "mo-fo", "mof0", "mofo", "mothafuck", "mothafucka", "mothafuckas", "mothafuckaz", "mothafucked", "mothafucker", "mothafuckers", "mothafuckin", "mothafucking", "mothafuckings", "mothafucks", "mother fucker", "motherfuck", "motherfucked", "motherfucker", "motherfuckers", "motherfuckin", "motherfucking", "motherfuckings", "motherfuckka", "motherfucks", "muff", "mutha", "muthafecker", "muthafuckker", "muther", "mutherfucker", "n1gga", "n1gger", "nazi", "nigg3r", "nigg4h", "nigga", "niggah", "niggas", "niggaz", "nigger", "niggers", "nob", "nob jokey", "nobhead", "nobjocky", "nobjokey", "numbnuts", "nutsack", "orgasim", "orgasims", "orgasm", "orgasms", "p0rn", "pawn", "pecker", "penis", "penisfucker", "phonesex", "phuck", "phuk", "phuked", "phuking", "phukked", "phukking", "phuks", "phuq", "pigfucker", "pimpis", "piss", "pissed", "pisser", "pissers", "pisses", "pissflaps", "pissin", "pissing", "pissoff", "poop", "porn", "porno", "pornography", "pornos", "prick", "pricks", "pron", "pube", "pusse", "pussi", "pussies", "pussy", "pussys", "rectum", "retard", "rimjaw", "rimming", "s hit", "s.o.b.", "sadist", "schlong", "screwing", "scroat", "scrote", "scrotum", "semen", "sex", "sh!+", "sh!t", "sh1t", "shag", "shagger", "shaggin", "shagging", "shemale", "shi+", "shit", "shitdick", "shite", "shited", "shitey", "shitfuck", "shitfull", "shithead", "shiting", "shitings", "shits", "shitted", "shitter", "shitters", "shitting", "shittings", "shitty", "skank", "slut", "sluts", "smegma", "smut", "snatch", "son-of-a-bitch", "spac", "spunk", "s_h_i_t", "t1tt1e5", "t1tties", "teets", "teez", "testical", "testicle", "tit", "titfuck", "tits", "titt", "tittie5", "tittiefucker", "titties", "tittyfuck", "tittywank", "titwank", "tosser", "turd", "tw4t", "twat", "twathead", "twatty", "twunt", "twunter", "v14gra", "v1gra", "vagina", "viagra", "vulva", "w00se", "wang", "wank", "wanker", "wanky", "whoar", "whore", "willies", "willy", "xrated", "xxx"]
  167. },
  168. "./node_modules/badwords-list/lib/index.js":
  169. /*!*************************************************!*\
  170. !*** ./node_modules/badwords-list/lib/index.js ***!
  171. \*************************************************/
  172. /*! no static exports found */
  173. function (e, t, n) {
  174. e.exports = {
  175. object: n( /*! ./object */ "./node_modules/badwords-list/lib/object.js"),
  176. array: n( /*! ./array */ "./node_modules/badwords-list/lib/array.js"),
  177. regex: n( /*! ./regexp */ "./node_modules/badwords-list/lib/regexp.js")
  178. }
  179. },
  180. "./node_modules/badwords-list/lib/object.js":
  181. /*!**************************************************!*\
  182. !*** ./node_modules/badwords-list/lib/object.js ***!
  183. \**************************************************/
  184. /*! no static exports found */
  185. function (e, t) {
  186. e.exports = {
  187. "4r5e": 1,
  188. "5h1t": 1,
  189. "5hit": 1,
  190. a55: 1,
  191. anal: 1,
  192. anus: 1,
  193. ar5e: 1,
  194. arrse: 1,
  195. arse: 1,
  196. ass: 1,
  197. "ass-fucker": 1,
  198. asses: 1,
  199. assfucker: 1,
  200. assfukka: 1,
  201. asshole: 1,
  202. assholes: 1,
  203. asswhole: 1,
  204. a_s_s: 1,
  205. "b!tch": 1,
  206. b00bs: 1,
  207. b17ch: 1,
  208. b1tch: 1,
  209. ballbag: 1,
  210. balls: 1,
  211. ballsack: 1,
  212. bastard: 1,
  213. beastial: 1,
  214. beastiality: 1,
  215. bellend: 1,
  216. bestial: 1,
  217. bestiality: 1,
  218. "bi+ch": 1,
  219. biatch: 1,
  220. bitch: 1,
  221. bitcher: 1,
  222. bitchers: 1,
  223. bitches: 1,
  224. bitchin: 1,
  225. bitching: 1,
  226. bloody: 1,
  227. "blow job": 1,
  228. blowjob: 1,
  229. blowjobs: 1,
  230. boiolas: 1,
  231. bollock: 1,
  232. bollok: 1,
  233. boner: 1,
  234. boob: 1,
  235. boobs: 1,
  236. booobs: 1,
  237. boooobs: 1,
  238. booooobs: 1,
  239. booooooobs: 1,
  240. breasts: 1,
  241. buceta: 1,
  242. bugger: 1,
  243. bum: 1,
  244. "bunny fucker": 1,
  245. butt: 1,
  246. butthole: 1,
  247. buttmuch: 1,
  248. buttplug: 1,
  249. c0ck: 1,
  250. c0cksucker: 1,
  251. "carpet muncher": 1,
  252. cawk: 1,
  253. chink: 1,
  254. cipa: 1,
  255. cl1t: 1,
  256. clit: 1,
  257. clitoris: 1,
  258. clits: 1,
  259. cnut: 1,
  260. cock: 1,
  261. "cock-sucker": 1,
  262. cockface: 1,
  263. cockhead: 1,
  264. cockmunch: 1,
  265. cockmuncher: 1,
  266. cocks: 1,
  267. cocksuck: 1,
  268. cocksucked: 1,
  269. cocksucker: 1,
  270. cocksucking: 1,
  271. cocksucks: 1,
  272. cocksuka: 1,
  273. cocksukka: 1,
  274. cok: 1,
  275. cokmuncher: 1,
  276. coksucka: 1,
  277. coon: 1,
  278. cox: 1,
  279. crap: 1,
  280. cum: 1,
  281. cummer: 1,
  282. cumming: 1,
  283. cums: 1,
  284. cumshot: 1,
  285. cunilingus: 1,
  286. cunillingus: 1,
  287. cunnilingus: 1,
  288. cunt: 1,
  289. cuntlick: 1,
  290. cuntlicker: 1,
  291. cuntlicking: 1,
  292. cunts: 1,
  293. cyalis: 1,
  294. cyberfuc: 1,
  295. cyberfuck: 1,
  296. cyberfucked: 1,
  297. cyberfucker: 1,
  298. cyberfuckers: 1,
  299. cyberfucking: 1,
  300. d1ck: 1,
  301. damn: 1,
  302. dick: 1,
  303. dickhead: 1,
  304. dildo: 1,
  305. dildos: 1,
  306. dink: 1,
  307. dinks: 1,
  308. dirsa: 1,
  309. dlck: 1,
  310. "dog-fucker": 1,
  311. doggin: 1,
  312. dogging: 1,
  313. donkeyribber: 1,
  314. doosh: 1,
  315. duche: 1,
  316. dyke: 1,
  317. ejaculate: 1,
  318. ejaculated: 1,
  319. ejaculates: 1,
  320. ejaculating: 1,
  321. ejaculatings: 1,
  322. ejaculation: 1,
  323. ejakulate: 1,
  324. "f u c k": 1,
  325. "f u c k e r": 1,
  326. f4nny: 1,
  327. fag: 1,
  328. fagging: 1,
  329. faggitt: 1,
  330. faggot: 1,
  331. faggs: 1,
  332. fagot: 1,
  333. fagots: 1,
  334. fags: 1,
  335. fanny: 1,
  336. fannyflaps: 1,
  337. fannyfucker: 1,
  338. fanyy: 1,
  339. fatass: 1,
  340. fcuk: 1,
  341. fcuker: 1,
  342. fcuking: 1,
  343. feck: 1,
  344. fecker: 1,
  345. felching: 1,
  346. fellate: 1,
  347. fellatio: 1,
  348. fingerfuck: 1,
  349. fingerfucked: 1,
  350. fingerfucker: 1,
  351. fingerfuckers: 1,
  352. fingerfucking: 1,
  353. fingerfucks: 1,
  354. fistfuck: 1,
  355. fistfucked: 1,
  356. fistfucker: 1,
  357. fistfuckers: 1,
  358. fistfucking: 1,
  359. fistfuckings: 1,
  360. fistfucks: 1,
  361. flange: 1,
  362. fook: 1,
  363. fooker: 1,
  364. fuck: 1,
  365. fucka: 1,
  366. fucked: 1,
  367. fucker: 1,
  368. fuckers: 1,
  369. fuckhead: 1,
  370. fuckheads: 1,
  371. fuckin: 1,
  372. fucking: 1,
  373. fuckings: 1,
  374. fuckingshitmotherfucker: 1,
  375. fuckme: 1,
  376. fucks: 1,
  377. fuckwhit: 1,
  378. fuckwit: 1,
  379. "fudge packer": 1,
  380. fudgepacker: 1,
  381. fuk: 1,
  382. fuker: 1,
  383. fukker: 1,
  384. fukkin: 1,
  385. fuks: 1,
  386. fukwhit: 1,
  387. fukwit: 1,
  388. fux: 1,
  389. fux0r: 1,
  390. f_u_c_k: 1,
  391. gangbang: 1,
  392. gangbanged: 1,
  393. gangbangs: 1,
  394. gaylord: 1,
  395. gaysex: 1,
  396. goatse: 1,
  397. God: 1,
  398. "god-dam": 1,
  399. "god-damned": 1,
  400. goddamn: 1,
  401. goddamned: 1,
  402. hardcoresex: 1,
  403. hell: 1,
  404. heshe: 1,
  405. hoar: 1,
  406. hoare: 1,
  407. hoer: 1,
  408. homo: 1,
  409. hore: 1,
  410. horniest: 1,
  411. horny: 1,
  412. hotsex: 1,
  413. "jack-off": 1,
  414. jackoff: 1,
  415. jap: 1,
  416. "jerk-off": 1,
  417. jism: 1,
  418. jiz: 1,
  419. jizm: 1,
  420. jizz: 1,
  421. kawk: 1,
  422. knob: 1,
  423. knobead: 1,
  424. knobed: 1,
  425. knobend: 1,
  426. knobhead: 1,
  427. knobjocky: 1,
  428. knobjokey: 1,
  429. kock: 1,
  430. kondum: 1,
  431. kondums: 1,
  432. kum: 1,
  433. kummer: 1,
  434. kumming: 1,
  435. kums: 1,
  436. kunilingus: 1,
  437. "l3i+ch": 1,
  438. l3itch: 1,
  439. labia: 1,
  440. lust: 1,
  441. lusting: 1,
  442. m0f0: 1,
  443. m0fo: 1,
  444. m45terbate: 1,
  445. ma5terb8: 1,
  446. ma5terbate: 1,
  447. masochist: 1,
  448. "master-bate": 1,
  449. masterb8: 1,
  450. "masterbat*": 1,
  451. masterbat3: 1,
  452. masterbate: 1,
  453. masterbation: 1,
  454. masterbations: 1,
  455. masturbate: 1,
  456. "mo-fo": 1,
  457. mof0: 1,
  458. mofo: 1,
  459. mothafuck: 1,
  460. mothafucka: 1,
  461. mothafuckas: 1,
  462. mothafuckaz: 1,
  463. mothafucked: 1,
  464. mothafucker: 1,
  465. mothafuckers: 1,
  466. mothafuckin: 1,
  467. mothafucking: 1,
  468. mothafuckings: 1,
  469. mothafucks: 1,
  470. "mother fucker": 1,
  471. motherfuck: 1,
  472. motherfucked: 1,
  473. motherfucker: 1,
  474. motherfuckers: 1,
  475. motherfuckin: 1,
  476. motherfucking: 1,
  477. motherfuckings: 1,
  478. motherfuckka: 1,
  479. motherfucks: 1,
  480. muff: 1,
  481. mutha: 1,
  482. muthafecker: 1,
  483. muthafuckker: 1,
  484. muther: 1,
  485. mutherfucker: 1,
  486. n1gga: 1,
  487. n1gger: 1,
  488. nazi: 1,
  489. nigg3r: 1,
  490. nigg4h: 1,
  491. nigga: 1,
  492. niggah: 1,
  493. niggas: 1,
  494. niggaz: 1,
  495. nigger: 1,
  496. niggers: 1,
  497. nob: 1,
  498. "nob jokey": 1,
  499. nobhead: 1,
  500. nobjocky: 1,
  501. nobjokey: 1,
  502. numbnuts: 1,
  503. nutsack: 1,
  504. orgasim: 1,
  505. orgasims: 1,
  506. orgasm: 1,
  507. orgasms: 1,
  508. p0rn: 1,
  509. pawn: 1,
  510. pecker: 1,
  511. penis: 1,
  512. penisfucker: 1,
  513. phonesex: 1,
  514. phuck: 1,
  515. phuk: 1,
  516. phuked: 1,
  517. phuking: 1,
  518. phukked: 1,
  519. phukking: 1,
  520. phuks: 1,
  521. phuq: 1,
  522. pigfucker: 1,
  523. pimpis: 1,
  524. piss: 1,
  525. pissed: 1,
  526. pisser: 1,
  527. pissers: 1,
  528. pisses: 1,
  529. pissflaps: 1,
  530. pissin: 1,
  531. pissing: 1,
  532. pissoff: 1,
  533. poop: 1,
  534. porn: 1,
  535. porno: 1,
  536. pornography: 1,
  537. pornos: 1,
  538. prick: 1,
  539. pricks: 1,
  540. pron: 1,
  541. pube: 1,
  542. pusse: 1,
  543. pussi: 1,
  544. pussies: 1,
  545. pussy: 1,
  546. pussys: 1,
  547. rectum: 1,
  548. retard: 1,
  549. rimjaw: 1,
  550. rimming: 1,
  551. "s hit": 1,
  552. "s.o.b.": 1,
  553. sadist: 1,
  554. schlong: 1,
  555. screwing: 1,
  556. scroat: 1,
  557. scrote: 1,
  558. scrotum: 1,
  559. semen: 1,
  560. sex: 1,
  561. "sh!+": 1,
  562. "sh!t": 1,
  563. sh1t: 1,
  564. shag: 1,
  565. shagger: 1,
  566. shaggin: 1,
  567. shagging: 1,
  568. shemale: 1,
  569. "shi+": 1,
  570. shit: 1,
  571. shitdick: 1,
  572. shite: 1,
  573. shited: 1,
  574. shitey: 1,
  575. shitfuck: 1,
  576. shitfull: 1,
  577. shithead: 1,
  578. shiting: 1,
  579. shitings: 1,
  580. shits: 1,
  581. shitted: 1,
  582. shitter: 1,
  583. shitters: 1,
  584. shitting: 1,
  585. shittings: 1,
  586. shitty: 1,
  587. skank: 1,
  588. slut: 1,
  589. sluts: 1,
  590. smegma: 1,
  591. smut: 1,
  592. snatch: 1,
  593. "son-of-a-bitch": 1,
  594. spac: 1,
  595. spunk: 1,
  596. s_h_i_t: 1,
  597. t1tt1e5: 1,
  598. t1tties: 1,
  599. teets: 1,
  600. teez: 1,
  601. testical: 1,
  602. testicle: 1,
  603. tit: 1,
  604. titfuck: 1,
  605. tits: 1,
  606. titt: 1,
  607. tittie5: 1,
  608. tittiefucker: 1,
  609. titties: 1,
  610. tittyfuck: 1,
  611. tittywank: 1,
  612. titwank: 1,
  613. tosser: 1,
  614. turd: 1,
  615. tw4t: 1,
  616. twat: 1,
  617. twathead: 1,
  618. twatty: 1,
  619. twunt: 1,
  620. twunter: 1,
  621. v14gra: 1,
  622. v1gra: 1,
  623. vagina: 1,
  624. viagra: 1,
  625. vulva: 1,
  626. w00se: 1,
  627. wang: 1,
  628. wank: 1,
  629. wanker: 1,
  630. wanky: 1,
  631. whoar: 1,
  632. whore: 1,
  633. willies: 1,
  634. willy: 1,
  635. xrated: 1,
  636. xxx: 1
  637. }
  638. },
  639. "./node_modules/badwords-list/lib/regexp.js":
  640. /*!**************************************************!*\
  641. !*** ./node_modules/badwords-list/lib/regexp.js ***!
  642. \**************************************************/
  643. /*! no static exports found */
  644. function (e, t) {
  645. e.exports = /\b(4r5e|5h1t|5hit|a55|anal|anus|ar5e|arrse|arse|ass|ass-fucker|asses|assfucker|assfukka|asshole|assholes|asswhole|a_s_s|b!tch|b00bs|b17ch|b1tch|ballbag|balls|ballsack|bastard|beastial|beastiality|bellend|bestial|bestiality|bi\+ch|biatch|bitch|bitcher|bitchers|bitches|bitchin|bitching|bloody|blow job|blowjob|blowjobs|boiolas|bollock|bollok|boner|boob|boobs|booobs|boooobs|booooobs|booooooobs|breasts|buceta|bugger|bum|bunny fucker|butt|butthole|buttmuch|buttplug|c0ck|c0cksucker|carpet muncher|cawk|chink|cipa|cl1t|clit|clitoris|clits|cnut|cock|cock-sucker|cockface|cockhead|cockmunch|cockmuncher|cocks|cocksuck|cocksucked|cocksucker|cocksucking|cocksucks|cocksuka|cocksukka|cok|cokmuncher|coksucka|coon|cox|crap|cum|cummer|cumming|cums|cumshot|cunilingus|cunillingus|cunnilingus|cunt|cuntlick|cuntlicker|cuntlicking|cunts|cyalis|cyberfuc|cyberfuck|cyberfucked|cyberfucker|cyberfuckers|cyberfucking|d1ck|damn|dick|dickhead|dildo|dildos|dink|dinks|dirsa|dlck|dog-fucker|doggin|dogging|donkeyribber|doosh|duche|dyke|ejaculate|ejaculated|ejaculates|ejaculating|ejaculatings|ejaculation|ejakulate|f u c k|f u c k e r|f4nny|fag|fagging|faggitt|faggot|faggs|fagot|fagots|fags|fanny|fannyflaps|fannyfucker|fanyy|fatass|fcuk|fcuker|fcuking|feck|fecker|felching|fellate|fellatio|fingerfuck|fingerfucked|fingerfucker|fingerfuckers|fingerfucking|fingerfucks|fistfuck|fistfucked|fistfucker|fistfuckers|fistfucking|fistfuckings|fistfucks|flange|fook|fooker|fuck|fucka|fucked|fucker|fuckers|fuckhead|fuckheads|fuckin|fucking|fuckings|fuckingshitmotherfucker|fuckme|fucks|fuckwhit|fuckwit|fudge packer|fudgepacker|fuk|fuker|fukker|fukkin|fuks|fukwhit|fukwit|fux|fux0r|f_u_c_k|gangbang|gangbanged|gangbangs|gaylord|gaysex|goatse|God|god-dam|god-damned|goddamn|goddamned|hardcoresex|hell|heshe|hoar|hoare|hoer|homo|hore|horniest|horny|hotsex|jack-off|jackoff|jap|jerk-off|jism|jiz|jizm|jizz|kawk|knob|knobead|knobed|knobend|knobhead|knobjocky|knobjokey|kock|kondum|kondums|kum|kummer|kumming|kums|kunilingus|l3i\+ch|l3itch|labia|lust|lusting|m0f0|m0fo|m45terbate|ma5terb8|ma5terbate|masochist|master-bate|masterb8|masterbat*|masterbat3|masterbate|masterbation|masterbations|masturbate|mo-fo|mof0|mofo|mothafuck|mothafucka|mothafuckas|mothafuckaz|mothafucked|mothafucker|mothafuckers|mothafuckin|mothafucking|mothafuckings|mothafucks|mother fucker|motherfuck|motherfucked|motherfucker|motherfuckers|motherfuckin|motherfucking|motherfuckings|motherfuckka|motherfucks|muff|mutha|muthafecker|muthafuckker|muther|mutherfucker|n1gga|n1gger|nazi|nigg3r|nigg4h|nigga|niggah|niggas|niggaz|nigger|niggers|nob|nob jokey|nobhead|nobjocky|nobjokey|numbnuts|nutsack|orgasim|orgasims|orgasm|orgasms|p0rn|pawn|pecker|penis|penisfucker|phonesex|phuck|phuk|phuked|phuking|phukked|phukking|phuks|phuq|pigfucker|pimpis|piss|pissed|pisser|pissers|pisses|pissflaps|pissin|pissing|pissoff|poop|porn|porno|pornography|pornos|prick|pricks|pron|pube|pusse|pussi|pussies|pussy|pussys|rectum|retard|rimjaw|rimming|s hit|s.o.b.|sadist|schlong|screwing|scroat|scrote|scrotum|semen|sex|sh!\+|sh!t|sh1t|shag|shagger|shaggin|shagging|shemale|shi\+|shit|shitdick|shite|shited|shitey|shitfuck|shitfull|shithead|shiting|shitings|shits|shitted|shitter|shitters|shitting|shittings|shitty|skank|slut|sluts|smegma|smut|snatch|son-of-a-bitch|spac|spunk|s_h_i_t|t1tt1e5|t1tties|teets|teez|testical|testicle|tit|titfuck|tits|titt|tittie5|tittiefucker|titties|tittyfuck|tittywank|titwank|tosser|turd|tw4t|twat|twathead|twatty|twunt|twunter|v14gra|v1gra|vagina|viagra|vulva|w00se|wang|wank|wanker|wanky|whoar|whore|willies|willy|xrated|xxx)\b/gi
  646. },
  647. "./node_modules/base64-js/index.js":
  648. /*!*****************************************!*\
  649. !*** ./node_modules/base64-js/index.js ***!
  650. \*****************************************/
  651. /*! no static exports found */
  652. function (e, t, n) {
  653. "use strict";
  654. t.byteLength = function (e) {
  655. var t = c(e),
  656. n = t[0],
  657. i = t[1];
  658. return 3 * (n + i) / 4 - i
  659. }, t.toByteArray = function (e) {
  660. var t, n, i = c(e),
  661. a = i[0],
  662. o = i[1],
  663. l = new r(function (e, t, n) {
  664. return 3 * (t + n) / 4 - n
  665. }(0, a, o)),
  666. h = 0,
  667. u = o > 0 ? a - 4 : a;
  668. for (n = 0; n < u; n += 4) t = s[e.charCodeAt(n)] << 18 | s[e.charCodeAt(n + 1)] << 12 | s[e.charCodeAt(n + 2)] << 6 | s[e.charCodeAt(n + 3)], l[h++] = t >> 16 & 255, l[h++] = t >> 8 & 255, l[h++] = 255 & t;
  669. 2 === o && (t = s[e.charCodeAt(n)] << 2 | s[e.charCodeAt(n + 1)] >> 4, l[h++] = 255 & t);
  670. 1 === o && (t = s[e.charCodeAt(n)] << 10 | s[e.charCodeAt(n + 1)] << 4 | s[e.charCodeAt(n + 2)] >> 2, l[h++] = t >> 8 & 255, l[h++] = 255 & t);
  671. return l
  672. }, t.fromByteArray = function (e) {
  673. for (var t, n = e.length, s = n % 3, r = [], a = 16383, o = 0, l = n - s; o < l; o += a) r.push(h(e, o, o + a > l ? l : o + a));
  674. 1 === s ? (t = e[n - 1], r.push(i[t >> 2] + i[t << 4 & 63] + "==")) : 2 === s && (t = (e[n - 2] << 8) + e[n - 1], r.push(i[t >> 10] + i[t >> 4 & 63] + i[t << 2 & 63] + "="));
  675. return r.join("")
  676. };
  677. for (var i = [], s = [], r = "undefined" != typeof Uint8Array ? Uint8Array : Array, a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", o = 0, l = a.length; o < l; ++o) i[o] = a[o], s[a.charCodeAt(o)] = o;
  678.  
  679. function c(e) {
  680. var t = e.length;
  681. if (t % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4");
  682. var n = e.indexOf("=");
  683. return -1 === n && (n = t), [n, n === t ? 0 : 4 - n % 4]
  684. }
  685.  
  686. function h(e, t, n) {
  687. for (var s, r, a = [], o = t; o < n; o += 3) s = (e[o] << 16 & 16711680) + (e[o + 1] << 8 & 65280) + (255 & e[o + 2]), a.push(i[(r = s) >> 18 & 63] + i[r >> 12 & 63] + i[r >> 6 & 63] + i[63 & r]);
  688. return a.join("")
  689. }
  690. s["-".charCodeAt(0)] = 62, s["_".charCodeAt(0)] = 63
  691. },
  692. "./node_modules/buffer/index.js":
  693. /*!**************************************!*\
  694. !*** ./node_modules/buffer/index.js ***!
  695. \**************************************/
  696. /*! no static exports found */
  697. function (e, t, n) {
  698. "use strict";
  699. (function (e) {
  700. /*!
  701. * The buffer module from node.js, for the browser.
  702. *
  703. * @author Feross Aboukhadijeh <http://feross.org>
  704. * @license MIT
  705. */
  706. var i = n( /*! base64-js */ "./node_modules/base64-js/index.js"),
  707. s = n( /*! ieee754 */ "./node_modules/ieee754/index.js"),
  708. r = n( /*! isarray */ "./node_modules/buffer/node_modules/isarray/index.js");
  709.  
  710. function a() {
  711. return l.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823
  712. }
  713.  
  714. function o(e, t) {
  715. if (a() < t) throw new RangeError("Invalid typed array length");
  716. return l.TYPED_ARRAY_SUPPORT ? (e = new Uint8Array(t)).__proto__ = l.prototype : (null === e && (e = new l(t)), e.length = t), e
  717. }
  718.  
  719. function l(e, t, n) {
  720. if (!(l.TYPED_ARRAY_SUPPORT || this instanceof l)) return new l(e, t, n);
  721. if ("number" == typeof e) {
  722. if ("string" == typeof t) throw new Error("If encoding is specified then the first argument must be a string");
  723. return u(this, e)
  724. }
  725. return c(this, e, t, n)
  726. }
  727.  
  728. function c(e, t, n, i) {
  729. if ("number" == typeof t) throw new TypeError('"value" argument must not be a number');
  730. return "undefined" != typeof ArrayBuffer && t instanceof ArrayBuffer ? function (e, t, n, i) {
  731. if (t.byteLength, n < 0 || t.byteLength < n) throw new RangeError("'offset' is out of bounds");
  732. if (t.byteLength < n + (i || 0)) throw new RangeError("'length' is out of bounds");
  733. t = void 0 === n && void 0 === i ? new Uint8Array(t) : void 0 === i ? new Uint8Array(t, n) : new Uint8Array(t, n, i);
  734. l.TYPED_ARRAY_SUPPORT ? (e = t).__proto__ = l.prototype : e = d(e, t);
  735. return e
  736. }(e, t, n, i) : "string" == typeof t ? function (e, t, n) {
  737. "string" == typeof n && "" !== n || (n = "utf8");
  738. if (!l.isEncoding(n)) throw new TypeError('"encoding" must be a valid string encoding');
  739. var i = 0 | p(t, n);
  740. e = o(e, i);
  741. var s = e.write(t, n);
  742. s !== i && (e = e.slice(0, s));
  743. return e
  744. }(e, t, n) : function (e, t) {
  745. if (l.isBuffer(t)) {
  746. var n = 0 | f(t.length);
  747. return 0 === (e = o(e, n)).length || t.copy(e, 0, 0, n), e
  748. }
  749. if (t) {
  750. if ("undefined" != typeof ArrayBuffer && t.buffer instanceof ArrayBuffer || "length" in t) return "number" != typeof t.length || (i = t.length) != i ? o(e, 0) : d(e, t);
  751. if ("Buffer" === t.type && r(t.data)) return d(e, t.data)
  752. }
  753. var i;
  754. throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")
  755. }(e, t)
  756. }
  757.  
  758. function h(e) {
  759. if ("number" != typeof e) throw new TypeError('"size" argument must be a number');
  760. if (e < 0) throw new RangeError('"size" argument must not be negative')
  761. }
  762.  
  763. function u(e, t) {
  764. if (h(t), e = o(e, t < 0 ? 0 : 0 | f(t)), !l.TYPED_ARRAY_SUPPORT)
  765. for (var n = 0; n < t; ++n) e[n] = 0;
  766. return e
  767. }
  768.  
  769. function d(e, t) {
  770. var n = t.length < 0 ? 0 : 0 | f(t.length);
  771. e = o(e, n);
  772. for (var i = 0; i < n; i += 1) e[i] = 255 & t[i];
  773. return e
  774. }
  775.  
  776. function f(e) {
  777. if (e >= a()) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + a().toString(16) + " bytes");
  778. return 0 | e
  779. }
  780.  
  781. function p(e, t) {
  782. if (l.isBuffer(e)) return e.length;
  783. if ("undefined" != typeof ArrayBuffer && "function" == typeof ArrayBuffer.isView && (ArrayBuffer.isView(e) || e instanceof ArrayBuffer)) return e.byteLength;
  784. "string" != typeof e && (e = "" + e);
  785. var n = e.length;
  786. if (0 === n) return 0;
  787. for (var i = !1;;) switch (t) {
  788. case "ascii":
  789. case "latin1":
  790. case "binary":
  791. return n;
  792. case "utf8":
  793. case "utf-8":
  794. case void 0:
  795. return z(e).length;
  796. case "ucs2":
  797. case "ucs-2":
  798. case "utf16le":
  799. case "utf-16le":
  800. return 2 * n;
  801. case "hex":
  802. return n >>> 1;
  803. case "base64":
  804. return H(e).length;
  805. default:
  806. if (i) return z(e).length;
  807. t = ("" + t).toLowerCase(), i = !0
  808. }
  809. }
  810.  
  811. function m(e, t, n) {
  812. var i = !1;
  813. if ((void 0 === t || t < 0) && (t = 0), t > this.length) return "";
  814. if ((void 0 === n || n > this.length) && (n = this.length), n <= 0) return "";
  815. if ((n >>>= 0) <= (t >>>= 0)) return "";
  816. for (e || (e = "utf8");;) switch (e) {
  817. case "hex":
  818. return C(this, t, n);
  819. case "utf8":
  820. case "utf-8":
  821. return M(this, t, n);
  822. case "ascii":
  823. return E(this, t, n);
  824. case "latin1":
  825. case "binary":
  826. return P(this, t, n);
  827. case "base64":
  828. return T(this, t, n);
  829. case "ucs2":
  830. case "ucs-2":
  831. case "utf16le":
  832. case "utf-16le":
  833. return A(this, t, n);
  834. default:
  835. if (i) throw new TypeError("Unknown encoding: " + e);
  836. e = (e + "").toLowerCase(), i = !0
  837. }
  838. }
  839.  
  840. function g(e, t, n) {
  841. var i = e[t];
  842. e[t] = e[n], e[n] = i
  843. }
  844.  
  845. function y(e, t, n, i, s) {
  846. if (0 === e.length) return -1;
  847. if ("string" == typeof n ? (i = n, n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), n = +n, isNaN(n) && (n = s ? 0 : e.length - 1), n < 0 && (n = e.length + n), n >= e.length) {
  848. if (s) return -1;
  849. n = e.length - 1
  850. } else if (n < 0) {
  851. if (!s) return -1;
  852. n = 0
  853. }
  854. if ("string" == typeof t && (t = l.from(t, i)), l.isBuffer(t)) return 0 === t.length ? -1 : k(e, t, n, i, s);
  855. if ("number" == typeof t) return t &= 255, l.TYPED_ARRAY_SUPPORT && "function" == typeof Uint8Array.prototype.indexOf ? s ? Uint8Array.prototype.indexOf.call(e, t, n) : Uint8Array.prototype.lastIndexOf.call(e, t, n) : k(e, [t], n, i, s);
  856. throw new TypeError("val must be string, number or Buffer")
  857. }
  858.  
  859. function k(e, t, n, i, s) {
  860. var r, a = 1,
  861. o = e.length,
  862. l = t.length;
  863. if (void 0 !== i && ("ucs2" === (i = String(i).toLowerCase()) || "ucs-2" === i || "utf16le" === i || "utf-16le" === i)) {
  864. if (e.length < 2 || t.length < 2) return -1;
  865. a = 2, o /= 2, l /= 2, n /= 2
  866. }
  867.  
  868. function c(e, t) {
  869. return 1 === a ? e[t] : e.readUInt16BE(t * a)
  870. }
  871. if (s) {
  872. var h = -1;
  873. for (r = n; r < o; r++)
  874. if (c(e, r) === c(t, -1 === h ? 0 : r - h)) {
  875. if (-1 === h && (h = r), r - h + 1 === l) return h * a
  876. } else - 1 !== h && (r -= r - h), h = -1
  877. } else
  878. for (n + l > o && (n = o - l), r = n; r >= 0; r--) {
  879. for (var u = !0, d = 0; d < l; d++)
  880. if (c(e, r + d) !== c(t, d)) {
  881. u = !1;
  882. break
  883. } if (u) return r
  884. }
  885. return -1
  886. }
  887.  
  888. function w(e, t, n, i) {
  889. n = Number(n) || 0;
  890. var s = e.length - n;
  891. i ? (i = Number(i)) > s && (i = s) : i = s;
  892. var r = t.length;
  893. if (r % 2 != 0) throw new TypeError("Invalid hex string");
  894. i > r / 2 && (i = r / 2);
  895. for (var a = 0; a < i; ++a) {
  896. var o = parseInt(t.substr(2 * a, 2), 16);
  897. if (isNaN(o)) return a;
  898. e[n + a] = o
  899. }
  900. return a
  901. }
  902.  
  903. function b(e, t, n, i) {
  904. return W(z(t, e.length - n), e, n, i)
  905. }
  906.  
  907. function v(e, t, n, i) {
  908. return W(function (e) {
  909. for (var t = [], n = 0; n < e.length; ++n) t.push(255 & e.charCodeAt(n));
  910. return t
  911. }(t), e, n, i)
  912. }
  913.  
  914. function x(e, t, n, i) {
  915. return v(e, t, n, i)
  916. }
  917.  
  918. function S(e, t, n, i) {
  919. return W(H(t), e, n, i)
  920. }
  921.  
  922. function I(e, t, n, i) {
  923. return W(function (e, t) {
  924. for (var n, i, s, r = [], a = 0; a < e.length && !((t -= 2) < 0); ++a) i = (n = e.charCodeAt(a)) >> 8, s = n % 256, r.push(s), r.push(i);
  925. return r
  926. }(t, e.length - n), e, n, i)
  927. }
  928.  
  929. function T(e, t, n) {
  930. return 0 === t && n === e.length ? i.fromByteArray(e) : i.fromByteArray(e.slice(t, n))
  931. }
  932.  
  933. function M(e, t, n) {
  934. n = Math.min(e.length, n);
  935. for (var i = [], s = t; s < n;) {
  936. var r, a, o, l, c = e[s],
  937. h = null,
  938. u = c > 239 ? 4 : c > 223 ? 3 : c > 191 ? 2 : 1;
  939. if (s + u <= n) switch (u) {
  940. case 1:
  941. c < 128 && (h = c);
  942. break;
  943. case 2:
  944. 128 == (192 & (r = e[s + 1])) && (l = (31 & c) << 6 | 63 & r) > 127 && (h = l);
  945. break;
  946. case 3:
  947. r = e[s + 1], a = e[s + 2], 128 == (192 & r) && 128 == (192 & a) && (l = (15 & c) << 12 | (63 & r) << 6 | 63 & a) > 2047 && (l < 55296 || l > 57343) && (h = l);
  948. break;
  949. case 4:
  950. r = e[s + 1], a = e[s + 2], o = e[s + 3], 128 == (192 & r) && 128 == (192 & a) && 128 == (192 & o) && (l = (15 & c) << 18 | (63 & r) << 12 | (63 & a) << 6 | 63 & o) > 65535 && l < 1114112 && (h = l)
  951. }
  952. null === h ? (h = 65533, u = 1) : h > 65535 && (h -= 65536, i.push(h >>> 10 & 1023 | 55296), h = 56320 | 1023 & h), i.push(h), s += u
  953. }
  954. return function (e) {
  955. var t = e.length;
  956. if (t <= j) return String.fromCharCode.apply(String, e);
  957. var n = "",
  958. i = 0;
  959. for (; i < t;) n += String.fromCharCode.apply(String, e.slice(i, i += j));
  960. return n
  961. }(i)
  962. }
  963. t.Buffer = l, t.SlowBuffer = function (e) {
  964. +e != e && (e = 0);
  965. return l.alloc(+e)
  966. }, t.INSPECT_MAX_BYTES = 50, l.TYPED_ARRAY_SUPPORT = void 0 !== e.TYPED_ARRAY_SUPPORT ? e.TYPED_ARRAY_SUPPORT : function () {
  967. try {
  968. var e = new Uint8Array(1);
  969. return e.__proto__ = {
  970. __proto__: Uint8Array.prototype,
  971. foo: function () {
  972. return 42
  973. }
  974. }, 42 === e.foo() && "function" == typeof e.subarray && 0 === e.subarray(1, 1).byteLength
  975. } catch (e) {
  976. return !1
  977. }
  978. }(), t.kMaxLength = a(), l.poolSize = 8192, l._augment = function (e) {
  979. return e.__proto__ = l.prototype, e
  980. }, l.from = function (e, t, n) {
  981. return c(null, e, t, n)
  982. }, l.TYPED_ARRAY_SUPPORT && (l.prototype.__proto__ = Uint8Array.prototype, l.__proto__ = Uint8Array, "undefined" != typeof Symbol && Symbol.species && l[Symbol.species] === l && Object.defineProperty(l, Symbol.species, {
  983. value: null,
  984. configurable: !0
  985. })), l.alloc = function (e, t, n) {
  986. return function (e, t, n, i) {
  987. return h(t), 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)
  988. }(null, e, t, n)
  989. }, l.allocUnsafe = function (e) {
  990. return u(null, e)
  991. }, l.allocUnsafeSlow = function (e) {
  992. return u(null, e)
  993. }, l.isBuffer = function (e) {
  994. return !(null == e || !e._isBuffer)
  995. }, l.compare = function (e, t) {
  996. if (!l.isBuffer(e) || !l.isBuffer(t)) throw new TypeError("Arguments must be Buffers");
  997. if (e === t) return 0;
  998. for (var n = e.length, i = t.length, s = 0, r = Math.min(n, i); s < r; ++s)
  999. if (e[s] !== t[s]) {
  1000. n = e[s], i = t[s];
  1001. break
  1002. } return n < i ? -1 : i < n ? 1 : 0
  1003. }, l.isEncoding = function (e) {
  1004. switch (String(e).toLowerCase()) {
  1005. case "hex":
  1006. case "utf8":
  1007. case "utf-8":
  1008. case "ascii":
  1009. case "latin1":
  1010. case "binary":
  1011. case "base64":
  1012. case "ucs2":
  1013. case "ucs-2":
  1014. case "utf16le":
  1015. case "utf-16le":
  1016. return !0;
  1017. default:
  1018. return !1
  1019. }
  1020. }, l.concat = function (e, t) {
  1021. if (!r(e)) throw new TypeError('"list" argument must be an Array of Buffers');
  1022. if (0 === e.length) return l.alloc(0);
  1023. var n;
  1024. if (void 0 === t)
  1025. for (t = 0, n = 0; n < e.length; ++n) t += e[n].length;
  1026. var i = l.allocUnsafe(t),
  1027. s = 0;
  1028. for (n = 0; n < e.length; ++n) {
  1029. var a = e[n];
  1030. if (!l.isBuffer(a)) throw new TypeError('"list" argument must be an Array of Buffers');
  1031. a.copy(i, s), s += a.length
  1032. }
  1033. return i
  1034. }, l.byteLength = p, l.prototype._isBuffer = !0, l.prototype.swap16 = function () {
  1035. var e = this.length;
  1036. if (e % 2 != 0) throw new RangeError("Buffer size must be a multiple of 16-bits");
  1037. for (var t = 0; t < e; t += 2) g(this, t, t + 1);
  1038. return this
  1039. }, l.prototype.swap32 = function () {
  1040. var e = this.length;
  1041. if (e % 4 != 0) throw new RangeError("Buffer size must be a multiple of 32-bits");
  1042. for (var t = 0; t < e; t += 4) g(this, t, t + 3), g(this, t + 1, t + 2);
  1043. return this
  1044. }, l.prototype.swap64 = function () {
  1045. var e = this.length;
  1046. if (e % 8 != 0) throw new RangeError("Buffer size must be a multiple of 64-bits");
  1047. for (var t = 0; t < e; t += 8) g(this, t, t + 7), g(this, t + 1, t + 6), g(this, t + 2, t + 5), g(this, t + 3, t + 4);
  1048. return this
  1049. }, l.prototype.toString = function () {
  1050. var e = 0 | this.length;
  1051. return 0 === e ? "" : 0 === arguments.length ? M(this, 0, e) : m.apply(this, arguments)
  1052. }, l.prototype.equals = function (e) {
  1053. if (!l.isBuffer(e)) throw new TypeError("Argument must be a Buffer");
  1054. return this === e || 0 === l.compare(this, e)
  1055. }, l.prototype.inspect = function () {
  1056. var e = "",
  1057. n = t.INSPECT_MAX_BYTES;
  1058. return this.length > 0 && (e = this.toString("hex", 0, n).match(/.{2}/g).join(" "), this.length > n && (e += " ... ")), "<Buffer " + e + ">"
  1059. }, l.prototype.compare = function (e, t, n, i, s) {
  1060. if (!l.isBuffer(e)) throw new TypeError("Argument must be a Buffer");
  1061. if (void 0 === t && (t = 0), void 0 === n && (n = e ? e.length : 0), void 0 === i && (i = 0), void 0 === s && (s = this.length), t < 0 || n > e.length || i < 0 || s > this.length) throw new RangeError("out of range index");
  1062. if (i >= s && t >= n) return 0;
  1063. if (i >= s) return -1;
  1064. if (t >= n) return 1;
  1065. if (this === e) return 0;
  1066. for (var r = (s >>>= 0) - (i >>>= 0), a = (n >>>= 0) - (t >>>= 0), o = Math.min(r, a), c = this.slice(i, s), h = e.slice(t, n), u = 0; u < o; ++u)
  1067. if (c[u] !== h[u]) {
  1068. r = c[u], a = h[u];
  1069. break
  1070. } return r < a ? -1 : a < r ? 1 : 0
  1071. }, l.prototype.includes = function (e, t, n) {
  1072. return -1 !== this.indexOf(e, t, n)
  1073. }, l.prototype.indexOf = function (e, t, n) {
  1074. return y(this, e, t, n, !0)
  1075. }, l.prototype.lastIndexOf = function (e, t, n) {
  1076. return y(this, e, t, n, !1)
  1077. }, l.prototype.write = function (e, t, n, i) {
  1078. if (void 0 === t) i = "utf8", n = this.length, t = 0;
  1079. else if (void 0 === n && "string" == typeof t) i = t, n = this.length, t = 0;
  1080. else {
  1081. if (!isFinite(t)) throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
  1082. t |= 0, isFinite(n) ? (n |= 0, void 0 === i && (i = "utf8")) : (i = n, n = void 0)
  1083. }
  1084. var s = this.length - t;
  1085. if ((void 0 === n || n > s) && (n = s), e.length > 0 && (n < 0 || t < 0) || t > this.length) throw new RangeError("Attempt to write outside buffer bounds");
  1086. i || (i = "utf8");
  1087. for (var r = !1;;) switch (i) {
  1088. case "hex":
  1089. return w(this, e, t, n);
  1090. case "utf8":
  1091. case "utf-8":
  1092. return b(this, e, t, n);
  1093. case "ascii":
  1094. return v(this, e, t, n);
  1095. case "latin1":
  1096. case "binary":
  1097. return x(this, e, t, n);
  1098. case "base64":
  1099. return S(this, e, t, n);
  1100. case "ucs2":
  1101. case "ucs-2":
  1102. case "utf16le":
  1103. case "utf-16le":
  1104. return I(this, e, t, n);
  1105. default:
  1106. if (r) throw new TypeError("Unknown encoding: " + i);
  1107. i = ("" + i).toLowerCase(), r = !0
  1108. }
  1109. }, l.prototype.toJSON = function () {
  1110. return {
  1111. type: "Buffer",
  1112. data: Array.prototype.slice.call(this._arr || this, 0)
  1113. }
  1114. };
  1115. var j = 4096;
  1116.  
  1117. function E(e, t, n) {
  1118. var i = "";
  1119. n = Math.min(e.length, n);
  1120. for (var s = t; s < n; ++s) i += String.fromCharCode(127 & e[s]);
  1121. return i
  1122. }
  1123.  
  1124. function P(e, t, n) {
  1125. var i = "";
  1126. n = Math.min(e.length, n);
  1127. for (var s = t; s < n; ++s) i += String.fromCharCode(e[s]);
  1128. return i
  1129. }
  1130.  
  1131. function C(e, t, n) {
  1132. var i = e.length;
  1133. (!t || t < 0) && (t = 0), (!n || n < 0 || n > i) && (n = i);
  1134. for (var s = "", r = t; r < n; ++r) s += Y(e[r]);
  1135. return s
  1136. }
  1137.  
  1138. function A(e, t, n) {
  1139. for (var i = e.slice(t, n), s = "", r = 0; r < i.length; r += 2) s += String.fromCharCode(i[r] + 256 * i[r + 1]);
  1140. return s
  1141. }
  1142.  
  1143. function B(e, t, n) {
  1144. if (e % 1 != 0 || e < 0) throw new RangeError("offset is not uint");
  1145. if (e + t > n) throw new RangeError("Trying to access beyond buffer length")
  1146. }
  1147.  
  1148. function _(e, t, n, i, s, r) {
  1149. if (!l.isBuffer(e)) throw new TypeError('"buffer" argument must be a Buffer instance');
  1150. if (t > s || t < r) throw new RangeError('"value" argument is out of bounds');
  1151. if (n + i > e.length) throw new RangeError("Index out of range")
  1152. }
  1153.  
  1154. function R(e, t, n, i) {
  1155. t < 0 && (t = 65535 + t + 1);
  1156. for (var s = 0, r = Math.min(e.length - n, 2); s < r; ++s) e[n + s] = (t & 255 << 8 * (i ? s : 1 - s)) >>> 8 * (i ? s : 1 - s)
  1157. }
  1158.  
  1159. function O(e, t, n, i) {
  1160. t < 0 && (t = 4294967295 + t + 1);
  1161. for (var s = 0, r = Math.min(e.length - n, 4); s < r; ++s) e[n + s] = t >>> 8 * (i ? s : 3 - s) & 255
  1162. }
  1163.  
  1164. function D(e, t, n, i, s, r) {
  1165. if (n + i > e.length) throw new RangeError("Index out of range");
  1166. if (n < 0) throw new RangeError("Index out of range")
  1167. }
  1168.  
  1169. function U(e, t, n, i, r) {
  1170. return r || D(e, 0, n, 4), s.write(e, t, n, i, 23, 4), n + 4
  1171. }
  1172.  
  1173. function L(e, t, n, i, r) {
  1174. return r || D(e, 0, n, 8), s.write(e, t, n, i, 52, 8), n + 8
  1175. }
  1176. l.prototype.slice = function (e, t) {
  1177. var n, i = this.length;
  1178. if ((e = ~~e) < 0 ? (e += i) < 0 && (e = 0) : e > i && (e = i), (t = void 0 === t ? i : ~~t) < 0 ? (t += i) < 0 && (t = 0) : t > i && (t = i), t < e && (t = e), l.TYPED_ARRAY_SUPPORT)(n = this.subarray(e, t)).__proto__ = l.prototype;
  1179. else {
  1180. var s = t - e;
  1181. n = new l(s, void 0);
  1182. for (var r = 0; r < s; ++r) n[r] = this[r + e]
  1183. }
  1184. return n
  1185. }, l.prototype.readUIntLE = function (e, t, n) {
  1186. e |= 0, t |= 0, n || B(e, t, this.length);
  1187. for (var i = this[e], s = 1, r = 0; ++r < t && (s *= 256);) i += this[e + r] * s;
  1188. return i
  1189. }, l.prototype.readUIntBE = function (e, t, n) {
  1190. e |= 0, t |= 0, n || B(e, t, this.length);
  1191. for (var i = this[e + --t], s = 1; t > 0 && (s *= 256);) i += this[e + --t] * s;
  1192. return i
  1193. }, l.prototype.readUInt8 = function (e, t) {
  1194. return t || B(e, 1, this.length), this[e]
  1195. }, l.prototype.readUInt16LE = function (e, t) {
  1196. return t || B(e, 2, this.length), this[e] | this[e + 1] << 8
  1197. }, l.prototype.readUInt16BE = function (e, t) {
  1198. return t || B(e, 2, this.length), this[e] << 8 | this[e + 1]
  1199. }, l.prototype.readUInt32LE = function (e, t) {
  1200. return t || B(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + 16777216 * this[e + 3]
  1201. }, l.prototype.readUInt32BE = function (e, t) {
  1202. return t || B(e, 4, this.length), 16777216 * this[e] + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3])
  1203. }, l.prototype.readIntLE = function (e, t, n) {
  1204. e |= 0, t |= 0, n || B(e, t, this.length);
  1205. for (var i = this[e], s = 1, r = 0; ++r < t && (s *= 256);) i += this[e + r] * s;
  1206. return i >= (s *= 128) && (i -= Math.pow(2, 8 * t)), i
  1207. }, l.prototype.readIntBE = function (e, t, n) {
  1208. e |= 0, t |= 0, n || B(e, t, this.length);
  1209. for (var i = t, s = 1, r = this[e + --i]; i > 0 && (s *= 256);) r += this[e + --i] * s;
  1210. return r >= (s *= 128) && (r -= Math.pow(2, 8 * t)), r
  1211. }, l.prototype.readInt8 = function (e, t) {
  1212. return t || B(e, 1, this.length), 128 & this[e] ? -1 * (255 - this[e] + 1) : this[e]
  1213. }, l.prototype.readInt16LE = function (e, t) {
  1214. t || B(e, 2, this.length);
  1215. var n = this[e] | this[e + 1] << 8;
  1216. return 32768 & n ? 4294901760 | n : n
  1217. }, l.prototype.readInt16BE = function (e, t) {
  1218. t || B(e, 2, this.length);
  1219. var n = this[e + 1] | this[e] << 8;
  1220. return 32768 & n ? 4294901760 | n : n
  1221. }, l.prototype.readInt32LE = function (e, t) {
  1222. return t || B(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24
  1223. }, l.prototype.readInt32BE = function (e, t) {
  1224. return t || B(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]
  1225. }, l.prototype.readFloatLE = function (e, t) {
  1226. return t || B(e, 4, this.length), s.read(this, e, !0, 23, 4)
  1227. }, l.prototype.readFloatBE = function (e, t) {
  1228. return t || B(e, 4, this.length), s.read(this, e, !1, 23, 4)
  1229. }, l.prototype.readDoubleLE = function (e, t) {
  1230. return t || B(e, 8, this.length), s.read(this, e, !0, 52, 8)
  1231. }, l.prototype.readDoubleBE = function (e, t) {
  1232. return t || B(e, 8, this.length), s.read(this, e, !1, 52, 8)
  1233. }, l.prototype.writeUIntLE = function (e, t, n, i) {
  1234. (e = +e, t |= 0, n |= 0, i) || _(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
  1235. var s = 1,
  1236. r = 0;
  1237. for (this[t] = 255 & e; ++r < n && (s *= 256);) this[t + r] = e / s & 255;
  1238. return t + n
  1239. }, l.prototype.writeUIntBE = function (e, t, n, i) {
  1240. (e = +e, t |= 0, n |= 0, i) || _(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
  1241. var s = n - 1,
  1242. r = 1;
  1243. for (this[t + s] = 255 & e; --s >= 0 && (r *= 256);) this[t + s] = e / r & 255;
  1244. return t + n
  1245. }, l.prototype.writeUInt8 = function (e, t, n) {
  1246. return e = +e, t |= 0, n || _(this, e, t, 1, 255, 0), l.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), this[t] = 255 & e, t + 1
  1247. }, l.prototype.writeUInt16LE = function (e, t, n) {
  1248. return e = +e, t |= 0, n || _(this, e, t, 2, 65535, 0), l.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, this[t + 1] = e >>> 8) : R(this, e, t, !0), t + 2
  1249. }, l.prototype.writeUInt16BE = function (e, t, n) {
  1250. return e = +e, t |= 0, n || _(this, e, t, 2, 65535, 0), l.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8, this[t + 1] = 255 & e) : R(this, e, t, !1), t + 2
  1251. }, l.prototype.writeUInt32LE = function (e, t, n) {
  1252. return e = +e, t |= 0, n || _(this, e, t, 4, 4294967295, 0), l.TYPED_ARRAY_SUPPORT ? (this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8, this[t] = 255 & e) : O(this, e, t, !0), t + 4
  1253. }, l.prototype.writeUInt32BE = function (e, t, n) {
  1254. return e = +e, t |= 0, n || _(this, e, t, 4, 4294967295, 0), l.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e) : O(this, e, t, !1), t + 4
  1255. }, l.prototype.writeIntLE = function (e, t, n, i) {
  1256. if (e = +e, t |= 0, !i) {
  1257. var s = Math.pow(2, 8 * n - 1);
  1258. _(this, e, t, n, s - 1, -s)
  1259. }
  1260. var r = 0,
  1261. a = 1,
  1262. o = 0;
  1263. for (this[t] = 255 & e; ++r < n && (a *= 256);) e < 0 && 0 === o && 0 !== this[t + r - 1] && (o = 1), this[t + r] = (e / a >> 0) - o & 255;
  1264. return t + n
  1265. }, l.prototype.writeIntBE = function (e, t, n, i) {
  1266. if (e = +e, t |= 0, !i) {
  1267. var s = Math.pow(2, 8 * n - 1);
  1268. _(this, e, t, n, s - 1, -s)
  1269. }
  1270. var r = n - 1,
  1271. a = 1,
  1272. o = 0;
  1273. for (this[t + r] = 255 & e; --r >= 0 && (a *= 256);) e < 0 && 0 === o && 0 !== this[t + r + 1] && (o = 1), this[t + r] = (e / a >> 0) - o & 255;
  1274. return t + n
  1275. }, l.prototype.writeInt8 = function (e, t, n) {
  1276. return e = +e, t |= 0, n || _(this, e, t, 1, 127, -128), l.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), e < 0 && (e = 255 + e + 1), this[t] = 255 & e, t + 1
  1277. }, l.prototype.writeInt16LE = function (e, t, n) {
  1278. return e = +e, t |= 0, n || _(this, e, t, 2, 32767, -32768), l.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, this[t + 1] = e >>> 8) : R(this, e, t, !0), t + 2
  1279. }, l.prototype.writeInt16BE = function (e, t, n) {
  1280. return e = +e, t |= 0, n || _(this, e, t, 2, 32767, -32768), l.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8, this[t + 1] = 255 & e) : R(this, e, t, !1), t + 2
  1281. }, l.prototype.writeInt32LE = function (e, t, n) {
  1282. return e = +e, t |= 0, n || _(this, e, t, 4, 2147483647, -2147483648), l.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, this[t + 1] = e >>> 8, this[t + 2] = e >>> 16, this[t + 3] = e >>> 24) : O(this, e, t, !0), t + 4
  1283. }, l.prototype.writeInt32BE = function (e, t, n) {
  1284. return e = +e, t |= 0, n || _(this, e, t, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), l.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e) : O(this, e, t, !1), t + 4
  1285. }, l.prototype.writeFloatLE = function (e, t, n) {
  1286. return U(this, e, t, !0, n)
  1287. }, l.prototype.writeFloatBE = function (e, t, n) {
  1288. return U(this, e, t, !1, n)
  1289. }, l.prototype.writeDoubleLE = function (e, t, n) {
  1290. return L(this, e, t, !0, n)
  1291. }, l.prototype.writeDoubleBE = function (e, t, n) {
  1292. return L(this, e, t, !1, n)
  1293. }, l.prototype.copy = function (e, t, n, i) {
  1294. if (n || (n = 0), i || 0 === i || (i = this.length), t >= e.length && (t = e.length), t || (t = 0), i > 0 && i < n && (i = n), i === n) return 0;
  1295. if (0 === e.length || 0 === this.length) return 0;
  1296. if (t < 0) throw new RangeError("targetStart out of bounds");
  1297. if (n < 0 || n >= this.length) throw new RangeError("sourceStart out of bounds");
  1298. if (i < 0) throw new RangeError("sourceEnd out of bounds");
  1299. i > this.length && (i = this.length), e.length - t < i - n && (i = e.length - t + n);
  1300. var s, r = i - n;
  1301. if (this === e && n < t && t < i)
  1302. for (s = r - 1; s >= 0; --s) e[s + t] = this[s + n];
  1303. else if (r < 1e3 || !l.TYPED_ARRAY_SUPPORT)
  1304. for (s = 0; s < r; ++s) e[s + t] = this[s + n];
  1305. else Uint8Array.prototype.set.call(e, this.subarray(n, n + r), t);
  1306. return r
  1307. }, l.prototype.fill = function (e, t, n, i) {
  1308. if ("string" == typeof e) {
  1309. if ("string" == typeof t ? (i = t, t = 0, n = this.length) : "string" == typeof n && (i = n, n = this.length), 1 === e.length) {
  1310. var s = e.charCodeAt(0);
  1311. s < 256 && (e = s)
  1312. }
  1313. if (void 0 !== i && "string" != typeof i) throw new TypeError("encoding must be a string");
  1314. if ("string" == typeof i && !l.isEncoding(i)) throw new TypeError("Unknown encoding: " + i)
  1315. } else "number" == typeof e && (e &= 255);
  1316. if (t < 0 || this.length < t || this.length < n) throw new RangeError("Out of range index");
  1317. if (n <= t) return this;
  1318. var r;
  1319. if (t >>>= 0, n = void 0 === n ? this.length : n >>> 0, e || (e = 0), "number" == typeof e)
  1320. for (r = t; r < n; ++r) this[r] = e;
  1321. else {
  1322. var a = l.isBuffer(e) ? e : z(new l(e, i).toString()),
  1323. o = a.length;
  1324. for (r = 0; r < n - t; ++r) this[r + t] = a[r % o]
  1325. }
  1326. return this
  1327. };
  1328. var F = /[^+\/0-9A-Za-z-_]/g;
  1329.  
  1330. function Y(e) {
  1331. return e < 16 ? "0" + e.toString(16) : e.toString(16)
  1332. }
  1333.  
  1334. function z(e, t) {
  1335. var n;
  1336. t = t || 1 / 0;
  1337. for (var i = e.length, s = null, r = [], a = 0; a < i; ++a) {
  1338. if ((n = e.charCodeAt(a)) > 55295 && n < 57344) {
  1339. if (!s) {
  1340. if (n > 56319) {
  1341. (t -= 3) > -1 && r.push(239, 191, 189);
  1342. continue
  1343. }
  1344. if (a + 1 === i) {
  1345. (t -= 3) > -1 && r.push(239, 191, 189);
  1346. continue
  1347. }
  1348. s = n;
  1349. continue
  1350. }
  1351. if (n < 56320) {
  1352. (t -= 3) > -1 && r.push(239, 191, 189), s = n;
  1353. continue
  1354. }
  1355. n = 65536 + (s - 55296 << 10 | n - 56320)
  1356. } else s && (t -= 3) > -1 && r.push(239, 191, 189);
  1357. if (s = null, n < 128) {
  1358. if ((t -= 1) < 0) break;
  1359. r.push(n)
  1360. } else if (n < 2048) {
  1361. if ((t -= 2) < 0) break;
  1362. r.push(n >> 6 | 192, 63 & n | 128)
  1363. } else if (n < 65536) {
  1364. if ((t -= 3) < 0) break;
  1365. r.push(n >> 12 | 224, n >> 6 & 63 | 128, 63 & n | 128)
  1366. } else {
  1367. if (!(n < 1114112)) throw new Error("Invalid code point");
  1368. if ((t -= 4) < 0) break;
  1369. r.push(n >> 18 | 240, n >> 12 & 63 | 128, n >> 6 & 63 | 128, 63 & n | 128)
  1370. }
  1371. }
  1372. return r
  1373. }
  1374.  
  1375. function H(e) {
  1376. return i.toByteArray(function (e) {
  1377. if ((e = function (e) {
  1378. return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "")
  1379. }(e).replace(F, "")).length < 2) return "";
  1380. for (; e.length % 4 != 0;) e += "=";
  1381. return e
  1382. }(e))
  1383. }
  1384.  
  1385. function W(e, t, n, i) {
  1386. for (var s = 0; s < i && !(s + n >= t.length || s >= e.length); ++s) t[s + n] = e[s];
  1387. return s
  1388. }
  1389. }).call(this, n( /*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))
  1390. },
  1391. "./node_modules/buffer/node_modules/isarray/index.js":
  1392. /*!***********************************************************!*\
  1393. !*** ./node_modules/buffer/node_modules/isarray/index.js ***!
  1394. \***********************************************************/
  1395. /*! no static exports found */
  1396. function (e, t) {
  1397. var n = {}.toString;
  1398. e.exports = Array.isArray || function (e) {
  1399. return "[object Array]" == n.call(e)
  1400. }
  1401. },
  1402. "./node_modules/charenc/charenc.js":
  1403. /*!*****************************************!*\
  1404. !*** ./node_modules/charenc/charenc.js ***!
  1405. \*****************************************/
  1406. /*! no static exports found */
  1407. function (e, t) {
  1408. var n = {
  1409. utf8: {
  1410. stringToBytes: function (e) {
  1411. return n.bin.stringToBytes(unescape(encodeURIComponent(e)))
  1412. },
  1413. bytesToString: function (e) {
  1414. return decodeURIComponent(escape(n.bin.bytesToString(e)))
  1415. }
  1416. },
  1417. bin: {
  1418. stringToBytes: function (e) {
  1419. for (var t = [], n = 0; n < e.length; n++) t.push(255 & e.charCodeAt(n));
  1420. return t
  1421. },
  1422. bytesToString: function (e) {
  1423. for (var t = [], n = 0; n < e.length; n++) t.push(String.fromCharCode(e[n]));
  1424. return t.join("")
  1425. }
  1426. }
  1427. };
  1428. e.exports = n
  1429. },
  1430. "./node_modules/crypt/crypt.js":
  1431. /*!*************************************!*\
  1432. !*** ./node_modules/crypt/crypt.js ***!
  1433. \*************************************/
  1434. /*! no static exports found */
  1435. function (e, t) {
  1436. var n, i;
  1437. n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", i = {
  1438. rotl: function (e, t) {
  1439. return e << t | e >>> 32 - t
  1440. },
  1441. rotr: function (e, t) {
  1442. return e << 32 - t | e >>> t
  1443. },
  1444. endian: function (e) {
  1445. if (e.constructor == Number) return 16711935 & i.rotl(e, 8) | 4278255360 & i.rotl(e, 24);
  1446. for (var t = 0; t < e.length; t++) e[t] = i.endian(e[t]);
  1447. return e
  1448. },
  1449. randomBytes: function (e) {
  1450. for (var t = []; e > 0; e--) t.push(Math.floor(256 * Math.random()));
  1451. return t
  1452. },
  1453. bytesToWords: function (e) {
  1454. for (var t = [], n = 0, i = 0; n < e.length; n++, i += 8) t[i >>> 5] |= e[n] << 24 - i % 32;
  1455. return t
  1456. },
  1457. wordsToBytes: function (e) {
  1458. for (var t = [], n = 0; n < 32 * e.length; n += 8) t.push(e[n >>> 5] >>> 24 - n % 32 & 255);
  1459. return t
  1460. },
  1461. bytesToHex: function (e) {
  1462. for (var t = [], n = 0; n < e.length; n++) t.push((e[n] >>> 4).toString(16)), t.push((15 & e[n]).toString(16));
  1463. return t.join("")
  1464. },
  1465. hexToBytes: function (e) {
  1466. for (var t = [], n = 0; n < e.length; n += 2) t.push(parseInt(e.substr(n, 2), 16));
  1467. return t
  1468. },
  1469. bytesToBase64: function (e) {
  1470. for (var t = [], i = 0; i < e.length; i += 3)
  1471. for (var s = e[i] << 16 | e[i + 1] << 8 | e[i + 2], r = 0; r < 4; r++) 8 * i + 6 * r <= 8 * e.length ? t.push(n.charAt(s >>> 6 * (3 - r) & 63)) : t.push("=");
  1472. return t.join("")
  1473. },
  1474. base64ToBytes: function (e) {
  1475. e = e.replace(/[^A-Z0-9+\/]/gi, "");
  1476. for (var t = [], i = 0, s = 0; i < e.length; s = ++i % 4) 0 != s && t.push((n.indexOf(e.charAt(i - 1)) & Math.pow(2, -2 * s + 8) - 1) << 2 * s | n.indexOf(e.charAt(i)) >>> 6 - 2 * s);
  1477. return t
  1478. }
  1479. }, e.exports = i
  1480. },
  1481. "./node_modules/event-lite/event-lite.js":
  1482. /*!***********************************************!*\
  1483. !*** ./node_modules/event-lite/event-lite.js ***!
  1484. \***********************************************/
  1485. /*! no static exports found */
  1486. function (e, t, n) {
  1487. ! function (t) {
  1488. e.exports = t;
  1489. var n = "listeners",
  1490. i = {
  1491. on: function (e, t) {
  1492. return a(this, e).push(t), this
  1493. },
  1494. once: function (e, t) {
  1495. var n = this;
  1496. return i.originalListener = t, a(n, e).push(i), n;
  1497.  
  1498. function i() {
  1499. r.call(n, e, i), t.apply(this, arguments)
  1500. }
  1501. },
  1502. off: r,
  1503. emit: function (e, t) {
  1504. var n = this,
  1505. i = a(n, e, !0);
  1506. if (!i) return !1;
  1507. var s = arguments.length;
  1508. if (1 === s) i.forEach(o);
  1509. else if (2 === s) i.forEach(l);
  1510. else {
  1511. var r = Array.prototype.slice.call(arguments, 1);
  1512. i.forEach(c)
  1513. }
  1514. return !!i.length;
  1515.  
  1516. function o(e) {
  1517. e.call(n)
  1518. }
  1519.  
  1520. function l(e) {
  1521. e.call(n, t)
  1522. }
  1523.  
  1524. function c(e) {
  1525. e.apply(n, r)
  1526. }
  1527. }
  1528. };
  1529.  
  1530. function s(e) {
  1531. for (var t in i) e[t] = i[t];
  1532. return e
  1533. }
  1534.  
  1535. function r(e, t) {
  1536. var i, s = this;
  1537. if (arguments.length) {
  1538. if (t) {
  1539. if (i = a(s, e, !0)) {
  1540. if (!(i = i.filter(o)).length) return r.call(s, e);
  1541. s[n][e] = i
  1542. }
  1543. } else if ((i = s[n]) && (delete i[e], !Object.keys(i).length)) return r.call(s)
  1544. } else delete s[n];
  1545. return s;
  1546.  
  1547. function o(e) {
  1548. return e !== t && e.originalListener !== t
  1549. }
  1550. }
  1551.  
  1552. function a(e, t, i) {
  1553. if (!i || e[n]) {
  1554. var s = e[n] || (e[n] = {});
  1555. return s[t] || (s[t] = [])
  1556. }
  1557. }
  1558. s(t.prototype), t.mixin = s
  1559. }((
  1560. /**
  1561. * event-lite.js - Light-weight EventEmitter (less than 1KB when gzipped)
  1562. *
  1563. * @copyright Yusuke Kawasaki
  1564. * @license MIT
  1565. * @constructor
  1566. * @see https://github.com/kawanet/event-lite
  1567. * @see http://kawanet.github.io/event-lite/EventLite.html
  1568. * @example
  1569. * var EventLite = require("event-lite");
  1570. *
  1571. * function MyClass() {...} // your class
  1572. *
  1573. * EventLite.mixin(MyClass.prototype); // import event methods
  1574. *
  1575. * var obj = new MyClass();
  1576. * obj.on("foo", function() {...}); // add event listener
  1577. * obj.once("bar", function() {...}); // add one-time event listener
  1578. * obj.emit("foo"); // dispatch event
  1579. * obj.emit("bar"); // dispatch another event
  1580. * obj.off("foo"); // remove event listener
  1581. */
  1582. function e() {
  1583. if (!(this instanceof e)) return new e
  1584. }))
  1585. },
  1586. "./node_modules/ieee754/index.js":
  1587. /*!***************************************!*\
  1588. !*** ./node_modules/ieee754/index.js ***!
  1589. \***************************************/
  1590. /*! no static exports found */
  1591. function (e, t) {
  1592. t.read = function (e, t, n, i, s) {
  1593. var r, a, o = 8 * s - i - 1,
  1594. l = (1 << o) - 1,
  1595. c = l >> 1,
  1596. h = -7,
  1597. u = n ? s - 1 : 0,
  1598. d = n ? -1 : 1,
  1599. f = e[t + u];
  1600. for (u += d, r = f & (1 << -h) - 1, f >>= -h, h += o; h > 0; r = 256 * r + e[t + u], u += d, h -= 8);
  1601. for (a = r & (1 << -h) - 1, r >>= -h, h += i; h > 0; a = 256 * a + e[t + u], u += d, h -= 8);
  1602. if (0 === r) r = 1 - c;
  1603. else {
  1604. if (r === l) return a ? NaN : 1 / 0 * (f ? -1 : 1);
  1605. a += Math.pow(2, i), r -= c
  1606. }
  1607. return (f ? -1 : 1) * a * Math.pow(2, r - i)
  1608. }, t.write = function (e, t, n, i, s, r) {
  1609. var a, o, l, c = 8 * r - s - 1,
  1610. h = (1 << c) - 1,
  1611. u = h >> 1,
  1612. d = 23 === s ? Math.pow(2, -24) - Math.pow(2, -77) : 0,
  1613. f = i ? 0 : r - 1,
  1614. p = i ? 1 : -1,
  1615. m = t < 0 || 0 === t && 1 / t < 0 ? 1 : 0;
  1616. for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (o = isNaN(t) ? 1 : 0, a = h) : (a = Math.floor(Math.log(t) / Math.LN2), t * (l = Math.pow(2, -a)) < 1 && (a--, l *= 2), (t += a + u >= 1 ? d / l : d * Math.pow(2, 1 - u)) * l >= 2 && (a++, l /= 2), a + u >= h ? (o = 0, a = h) : a + u >= 1 ? (o = (t * l - 1) * Math.pow(2, s), a += u) : (o = t * Math.pow(2, u - 1) * Math.pow(2, s), a = 0)); s >= 8; e[n + f] = 255 & o, f += p, o /= 256, s -= 8);
  1617. for (a = a << s | o, c += s; c > 0; e[n + f] = 255 & a, f += p, a /= 256, c -= 8);
  1618. e[n + f - p] |= 128 * m
  1619. }
  1620. },
  1621. "./node_modules/int64-buffer/int64-buffer.js":
  1622. /*!***************************************************!*\
  1623. !*** ./node_modules/int64-buffer/int64-buffer.js ***!
  1624. \***************************************************/
  1625. /*! no static exports found */
  1626. function (e, t, n) {
  1627. (function (e) {
  1628. ! function (t) {
  1629. var n, i = "undefined",
  1630. s = i !== typeof e && e,
  1631. r = i !== typeof Uint8Array && Uint8Array,
  1632. a = i !== typeof ArrayBuffer && ArrayBuffer,
  1633. o = [0, 0, 0, 0, 0, 0, 0, 0],
  1634. l = Array.isArray || function (e) {
  1635. return !!e && "[object Array]" == Object.prototype.toString.call(e)
  1636. },
  1637. c = 4294967296;
  1638.  
  1639. function h(e, l, h) {
  1640. var v = l ? 0 : 4,
  1641. x = l ? 4 : 0,
  1642. S = l ? 0 : 3,
  1643. I = l ? 1 : 2,
  1644. T = l ? 2 : 1,
  1645. M = l ? 3 : 0,
  1646. j = l ? y : w,
  1647. E = l ? k : b,
  1648. P = B.prototype,
  1649. C = "is" + e,
  1650. A = "_" + C;
  1651. return P.buffer = void 0, P.offset = 0, P[A] = !0, P.toNumber = _, P.toString = function (e) {
  1652. var t = this.buffer,
  1653. n = this.offset,
  1654. i = O(t, n + v),
  1655. s = O(t, n + x),
  1656. r = "",
  1657. a = !h && 2147483648 & i;
  1658. a && (i = ~i, s = c - s);
  1659. e = e || 10;
  1660. for (;;) {
  1661. var o = i % e * c + s;
  1662. if (i = Math.floor(i / e), s = Math.floor(o / e), r = (o % e).toString(e) + r, !i && !s) break
  1663. }
  1664. a && (r = "-" + r);
  1665. return r
  1666. }, P.toJSON = _, P.toArray = u, s && (P.toBuffer = d), r && (P.toArrayBuffer = f), B[C] = function (e) {
  1667. return !(!e || !e[A])
  1668. }, t[e] = B, B;
  1669.  
  1670. function B(e, t, s, l) {
  1671. return this instanceof B ? function (e, t, s, l, h) {
  1672. r && a && (t instanceof a && (t = new r(t)), l instanceof a && (l = new r(l)));
  1673. if (!(t || s || l || n)) return void(e.buffer = g(o, 0));
  1674. if (!p(t, s)) {
  1675. h = s, l = t, s = 0, t = new(n || Array)(8)
  1676. }
  1677. if (e.buffer = t, e.offset = s |= 0, i === typeof l) return;
  1678. "string" == typeof l ? function (e, t, n, i) {
  1679. var s = 0,
  1680. r = n.length,
  1681. a = 0,
  1682. o = 0;
  1683. "-" === n[0] && s++;
  1684. var l = s;
  1685. for (; s < r;) {
  1686. var h = parseInt(n[s++], i);
  1687. if (!(h >= 0)) break;
  1688. o = o * i + h, a = a * i + Math.floor(o / c), o %= c
  1689. }
  1690. l && (a = ~a, o ? o = c - o : a++);
  1691. R(e, t + v, a), R(e, t + x, o)
  1692. }(t, s, l, h || 10) : p(l, h) ? m(t, s, l, h) : "number" == typeof h ? (R(t, s + v, l), R(t, s + x, h)) : l > 0 ? j(t, s, l) : l < 0 ? E(t, s, l) : m(t, s, o, 0)
  1693. }(this, e, t, s, l) : new B(e, t, s, l)
  1694. }
  1695.  
  1696. function _() {
  1697. var e = this.buffer,
  1698. t = this.offset,
  1699. n = O(e, t + v),
  1700. i = O(e, t + x);
  1701. return h || (n |= 0), n ? n * c + i : i
  1702. }
  1703.  
  1704. function R(e, t, n) {
  1705. e[t + M] = 255 & n, n >>= 8, e[t + T] = 255 & n, n >>= 8, e[t + I] = 255 & n, n >>= 8, e[t + S] = 255 & n
  1706. }
  1707.  
  1708. function O(e, t) {
  1709. return 16777216 * e[t + S] + (e[t + I] << 16) + (e[t + T] << 8) + e[t + M]
  1710. }
  1711. }
  1712.  
  1713. function u(e) {
  1714. var t = this.buffer,
  1715. i = this.offset;
  1716. return n = null, !1 !== e && 0 === i && 8 === t.length && l(t) ? t : g(t, i)
  1717. }
  1718.  
  1719. function d(t) {
  1720. var i = this.buffer,
  1721. r = this.offset;
  1722. if (n = s, !1 !== t && 0 === r && 8 === i.length && e.isBuffer(i)) return i;
  1723. var a = new s(8);
  1724. return m(a, 0, i, r), a
  1725. }
  1726.  
  1727. function f(e) {
  1728. var t = this.buffer,
  1729. i = this.offset,
  1730. s = t.buffer;
  1731. if (n = r, !1 !== e && 0 === i && s instanceof a && 8 === s.byteLength) return s;
  1732. var o = new r(8);
  1733. return m(o, 0, t, i), o.buffer
  1734. }
  1735.  
  1736. function p(e, t) {
  1737. var n = e && e.length;
  1738. return t |= 0, n && t + 8 <= n && "string" != typeof e[t]
  1739. }
  1740.  
  1741. function m(e, t, n, i) {
  1742. t |= 0, i |= 0;
  1743. for (var s = 0; s < 8; s++) e[t++] = 255 & n[i++]
  1744. }
  1745.  
  1746. function g(e, t) {
  1747. return Array.prototype.slice.call(e, t, t + 8)
  1748. }
  1749.  
  1750. function y(e, t, n) {
  1751. for (var i = t + 8; i > t;) e[--i] = 255 & n, n /= 256
  1752. }
  1753.  
  1754. function k(e, t, n) {
  1755. var i = t + 8;
  1756. for (n++; i > t;) e[--i] = 255 & -n ^ 255, n /= 256
  1757. }
  1758.  
  1759. function w(e, t, n) {
  1760. for (var i = t + 8; t < i;) e[t++] = 255 & n, n /= 256
  1761. }
  1762.  
  1763. function b(e, t, n) {
  1764. var i = t + 8;
  1765. for (n++; t < i;) e[t++] = 255 & -n ^ 255, n /= 256
  1766. }
  1767. h("Uint64BE", !0, !0), h("Int64BE", !0, !1), h("Uint64LE", !1, !0), h("Int64LE", !1, !1)
  1768. }("string" != typeof t.nodeName ? t : this || {})
  1769. }).call(this, n( /*! ./../buffer/index.js */ "./node_modules/buffer/index.js").Buffer)
  1770. },
  1771. "./node_modules/is-buffer/index.js":
  1772. /*!*****************************************!*\
  1773. !*** ./node_modules/is-buffer/index.js ***!
  1774. \*****************************************/
  1775. /*! no static exports found */
  1776. function (e, t) {
  1777. function n(e) {
  1778. return !!e.constructor && "function" == typeof e.constructor.isBuffer && e.constructor.isBuffer(e)
  1779. }
  1780. /*!
  1781. * Determine if an object is a Buffer
  1782. *
  1783. * @author Feross Aboukhadijeh <https://feross.org>
  1784. * @license MIT
  1785. */
  1786. e.exports = function (e) {
  1787. return null != e && (n(e) || function (e) {
  1788. return "function" == typeof e.readFloatLE && "function" == typeof e.slice && n(e.slice(0, 0))
  1789. }(e) || !!e._isBuffer)
  1790. }
  1791. },
  1792. "./node_modules/md5/md5.js":
  1793. /*!*********************************!*\
  1794. !*** ./node_modules/md5/md5.js ***!
  1795. \*********************************/
  1796. /*! no static exports found */
  1797. function (e, t, n) {
  1798. var i, s, r, a, o;
  1799. i = n( /*! crypt */ "./node_modules/crypt/crypt.js"), s = n( /*! charenc */ "./node_modules/charenc/charenc.js").utf8, r = n( /*! is-buffer */ "./node_modules/is-buffer/index.js"), a = n( /*! charenc */ "./node_modules/charenc/charenc.js").bin, (o = function (e, t) {
  1800. e.constructor == String ? e = t && "binary" === t.encoding ? a.stringToBytes(e) : s.stringToBytes(e) : r(e) ? e = Array.prototype.slice.call(e, 0) : Array.isArray(e) || (e = e.toString());
  1801. for (var n = i.bytesToWords(e), l = 8 * e.length, c = 1732584193, h = -271733879, u = -1732584194, d = 271733878, f = 0; f < n.length; f++) n[f] = 16711935 & (n[f] << 8 | n[f] >>> 24) | 4278255360 & (n[f] << 24 | n[f] >>> 8);
  1802. n[l >>> 5] |= 128 << l % 32, n[14 + (l + 64 >>> 9 << 4)] = l;
  1803. var p = o._ff,
  1804. m = o._gg,
  1805. g = o._hh,
  1806. y = o._ii;
  1807. for (f = 0; f < n.length; f += 16) {
  1808. var k = c,
  1809. w = h,
  1810. b = u,
  1811. v = d;
  1812. c = p(c, h, u, d, n[f + 0], 7, -680876936), d = p(d, c, h, u, n[f + 1], 12, -389564586), u = p(u, d, c, h, n[f + 2], 17, 606105819), h = p(h, u, d, c, n[f + 3], 22, -1044525330), c = p(c, h, u, d, n[f + 4], 7, -176418897), d = p(d, c, h, u, n[f + 5], 12, 1200080426), u = p(u, d, c, h, n[f + 6], 17, -1473231341), h = p(h, u, d, c, n[f + 7], 22, -45705983), c = p(c, h, u, d, n[f + 8], 7, 1770035416), d = p(d, c, h, u, n[f + 9], 12, -1958414417), u = p(u, d, c, h, n[f + 10], 17, -42063), h = p(h, u, d, c, n[f + 11], 22, -1990404162), c = p(c, h, u, d, n[f + 12], 7, 1804603682), d = p(d, c, h, u, n[f + 13], 12, -40341101), u = p(u, d, c, h, n[f + 14], 17, -1502002290), c = m(c, h = p(h, u, d, c, n[f + 15], 22, 1236535329), u, d, n[f + 1], 5, -165796510), d = m(d, c, h, u, n[f + 6], 9, -1069501632), u = m(u, d, c, h, n[f + 11], 14, 643717713), h = m(h, u, d, c, n[f + 0], 20, -373897302), c = m(c, h, u, d, n[f + 5], 5, -701558691), d = m(d, c, h, u, n[f + 10], 9, 38016083), u = m(u, d, c, h, n[f + 15], 14, -660478335), h = m(h, u, d, c, n[f + 4], 20, -405537848), c = m(c, h, u, d, n[f + 9], 5, 568446438), d = m(d, c, h, u, n[f + 14], 9, -1019803690), u = m(u, d, c, h, n[f + 3], 14, -187363961), h = m(h, u, d, c, n[f + 8], 20, 1163531501), c = m(c, h, u, d, n[f + 13], 5, -1444681467), d = m(d, c, h, u, n[f + 2], 9, -51403784), u = m(u, d, c, h, n[f + 7], 14, 1735328473), c = g(c, h = m(h, u, d, c, n[f + 12], 20, -1926607734), u, d, n[f + 5], 4, -378558), d = g(d, c, h, u, n[f + 8], 11, -2022574463), u = g(u, d, c, h, n[f + 11], 16, 1839030562), h = g(h, u, d, c, n[f + 14], 23, -35309556), c = g(c, h, u, d, n[f + 1], 4, -1530992060), d = g(d, c, h, u, n[f + 4], 11, 1272893353), u = g(u, d, c, h, n[f + 7], 16, -155497632), h = g(h, u, d, c, n[f + 10], 23, -1094730640), c = g(c, h, u, d, n[f + 13], 4, 681279174), d = g(d, c, h, u, n[f + 0], 11, -358537222), u = g(u, d, c, h, n[f + 3], 16, -722521979), h = g(h, u, d, c, n[f + 6], 23, 76029189), c = g(c, h, u, d, n[f + 9], 4, -640364487), d = g(d, c, h, u, n[f + 12], 11, -421815835), u = g(u, d, c, h, n[f + 15], 16, 530742520), c = y(c, h = g(h, u, d, c, n[f + 2], 23, -995338651), u, d, n[f + 0], 6, -198630844), d = y(d, c, h, u, n[f + 7], 10, 1126891415), u = y(u, d, c, h, n[f + 14], 15, -1416354905), h = y(h, u, d, c, n[f + 5], 21, -57434055), c = y(c, h, u, d, n[f + 12], 6, 1700485571), d = y(d, c, h, u, n[f + 3], 10, -1894986606), u = y(u, d, c, h, n[f + 10], 15, -1051523), h = y(h, u, d, c, n[f + 1], 21, -2054922799), c = y(c, h, u, d, n[f + 8], 6, 1873313359), d = y(d, c, h, u, n[f + 15], 10, -30611744), u = y(u, d, c, h, n[f + 6], 15, -1560198380), h = y(h, u, d, c, n[f + 13], 21, 1309151649), c = y(c, h, u, d, n[f + 4], 6, -145523070), d = y(d, c, h, u, n[f + 11], 10, -1120210379), u = y(u, d, c, h, n[f + 2], 15, 718787259), h = y(h, u, d, c, n[f + 9], 21, -343485551), c = c + k >>> 0, h = h + w >>> 0, u = u + b >>> 0, d = d + v >>> 0
  1813. }
  1814. return i.endian([c, h, u, d])
  1815. })._ff = function (e, t, n, i, s, r, a) {
  1816. var o = e + (t & n | ~t & i) + (s >>> 0) + a;
  1817. return (o << r | o >>> 32 - r) + t
  1818. }, o._gg = function (e, t, n, i, s, r, a) {
  1819. var o = e + (t & i | n & ~i) + (s >>> 0) + a;
  1820. return (o << r | o >>> 32 - r) + t
  1821. }, o._hh = function (e, t, n, i, s, r, a) {
  1822. var o = e + (t ^ n ^ i) + (s >>> 0) + a;
  1823. return (o << r | o >>> 32 - r) + t
  1824. }, o._ii = function (e, t, n, i, s, r, a) {
  1825. var o = e + (n ^ (t | ~i)) + (s >>> 0) + a;
  1826. return (o << r | o >>> 32 - r) + t
  1827. }, o._blocksize = 16, o._digestsize = 16, e.exports = function (e, t) {
  1828. if (null == e) throw new Error("Illegal argument " + e);
  1829. var n = i.wordsToBytes(o(e, t));
  1830. return t && t.asBytes ? n : t && t.asString ? a.bytesToString(n) : i.bytesToHex(n)
  1831. }
  1832. },
  1833. "./node_modules/msgpack-lite/lib/browser.js":
  1834. /*!**************************************************!*\
  1835. !*** ./node_modules/msgpack-lite/lib/browser.js ***!
  1836. \**************************************************/
  1837. /*! no static exports found */
  1838. function (e, t, n) {
  1839. t.encode = n( /*! ./encode */ "./node_modules/msgpack-lite/lib/encode.js").encode, t.decode = n( /*! ./decode */ "./node_modules/msgpack-lite/lib/decode.js").decode, t.Encoder = n( /*! ./encoder */ "./node_modules/msgpack-lite/lib/encoder.js").Encoder, t.Decoder = n( /*! ./decoder */ "./node_modules/msgpack-lite/lib/decoder.js").Decoder, t.createCodec = n( /*! ./ext */ "./node_modules/msgpack-lite/lib/ext.js").createCodec, t.codec = n( /*! ./codec */ "./node_modules/msgpack-lite/lib/codec.js").codec
  1840. },
  1841. "./node_modules/msgpack-lite/lib/buffer-global.js":
  1842. /*!********************************************************!*\
  1843. !*** ./node_modules/msgpack-lite/lib/buffer-global.js ***!
  1844. \********************************************************/
  1845. /*! no static exports found */
  1846. function (e, t, n) {
  1847. (function (t) {
  1848. function n(e) {
  1849. return e && e.isBuffer && e
  1850. }
  1851. e.exports = n(void 0 !== t && t) || n(this.Buffer) || n("undefined" != typeof window && window.Buffer) || this.Buffer
  1852. }).call(this, n( /*! ./../../buffer/index.js */ "./node_modules/buffer/index.js").Buffer)
  1853. },
  1854. "./node_modules/msgpack-lite/lib/buffer-lite.js":
  1855. /*!******************************************************!*\
  1856. !*** ./node_modules/msgpack-lite/lib/buffer-lite.js ***!
  1857. \******************************************************/
  1858. /*! no static exports found */
  1859. function (e, t) {
  1860. t.copy = function (e, t, n, i) {
  1861. var s;
  1862. n || (n = 0);
  1863. i || 0 === i || (i = this.length);
  1864. t || (t = 0);
  1865. var r = i - n;
  1866. if (e === this && n < t && t < i)
  1867. for (s = r - 1; s >= 0; s--) e[s + t] = this[s + n];
  1868. else
  1869. for (s = 0; s < r; s++) e[s + t] = this[s + n];
  1870. return r
  1871. }, t.toString = function (e, t, n) {
  1872. var i = this,
  1873. s = 0 | t;
  1874. n || (n = i.length);
  1875. var r = "",
  1876. a = 0;
  1877. for (; s < n;)(a = i[s++]) < 128 ? r += String.fromCharCode(a) : (192 == (224 & a) ? a = (31 & a) << 6 | 63 & i[s++] : 224 == (240 & a) ? a = (15 & a) << 12 | (63 & i[s++]) << 6 | 63 & i[s++] : 240 == (248 & a) && (a = (7 & a) << 18 | (63 & i[s++]) << 12 | (63 & i[s++]) << 6 | 63 & i[s++]), a >= 65536 ? (a -= 65536, r += String.fromCharCode(55296 + (a >>> 10), 56320 + (1023 & a))) : r += String.fromCharCode(a));
  1878. return r
  1879. }, t.write = function (e, t) {
  1880. var n = this,
  1881. i = t || (t |= 0),
  1882. s = e.length,
  1883. r = 0,
  1884. a = 0;
  1885. for (; a < s;)(r = e.charCodeAt(a++)) < 128 ? n[i++] = r : r < 2048 ? (n[i++] = 192 | r >>> 6, n[i++] = 128 | 63 & r) : r < 55296 || r > 57343 ? (n[i++] = 224 | r >>> 12, n[i++] = 128 | r >>> 6 & 63, n[i++] = 128 | 63 & r) : (r = 65536 + (r - 55296 << 10 | e.charCodeAt(a++) - 56320), n[i++] = 240 | r >>> 18, n[i++] = 128 | r >>> 12 & 63, n[i++] = 128 | r >>> 6 & 63, n[i++] = 128 | 63 & r);
  1886. return i - t
  1887. }
  1888. },
  1889. "./node_modules/msgpack-lite/lib/bufferish-array.js":
  1890. /*!**********************************************************!*\
  1891. !*** ./node_modules/msgpack-lite/lib/bufferish-array.js ***!
  1892. \**********************************************************/
  1893. /*! no static exports found */
  1894. function (e, t, n) {
  1895. var i = n( /*! ./bufferish */ "./node_modules/msgpack-lite/lib/bufferish.js");
  1896.  
  1897. function s(e) {
  1898. return new Array(e)
  1899. }(t = e.exports = s(0)).alloc = s, t.concat = i.concat, t.from = function (e) {
  1900. if (!i.isBuffer(e) && i.isView(e)) e = i.Uint8Array.from(e);
  1901. else if (i.isArrayBuffer(e)) e = new Uint8Array(e);
  1902. else {
  1903. if ("string" == typeof e) return i.from.call(t, e);
  1904. if ("number" == typeof e) throw new TypeError('"value" argument must not be a number')
  1905. }
  1906. return Array.prototype.slice.call(e)
  1907. }
  1908. },
  1909. "./node_modules/msgpack-lite/lib/bufferish-buffer.js":
  1910. /*!***********************************************************!*\
  1911. !*** ./node_modules/msgpack-lite/lib/bufferish-buffer.js ***!
  1912. \***********************************************************/
  1913. /*! no static exports found */
  1914. function (e, t, n) {
  1915. var i = n( /*! ./bufferish */ "./node_modules/msgpack-lite/lib/bufferish.js"),
  1916. s = i.global;
  1917.  
  1918. function r(e) {
  1919. return new s(e)
  1920. }(t = e.exports = i.hasBuffer ? r(0) : []).alloc = i.hasBuffer && s.alloc || r, t.concat = i.concat, t.from = function (e) {
  1921. if (!i.isBuffer(e) && i.isView(e)) e = i.Uint8Array.from(e);
  1922. else if (i.isArrayBuffer(e)) e = new Uint8Array(e);
  1923. else {
  1924. if ("string" == typeof e) return i.from.call(t, e);
  1925. if ("number" == typeof e) throw new TypeError('"value" argument must not be a number')
  1926. }
  1927. return s.from && 1 !== s.from.length ? s.from(e) : new s(e)
  1928. }
  1929. },
  1930. "./node_modules/msgpack-lite/lib/bufferish-proto.js":
  1931. /*!**********************************************************!*\
  1932. !*** ./node_modules/msgpack-lite/lib/bufferish-proto.js ***!
  1933. \**********************************************************/
  1934. /*! no static exports found */
  1935. function (e, t, n) {
  1936. var i, s = n( /*! ./buffer-lite */ "./node_modules/msgpack-lite/lib/buffer-lite.js");
  1937. t.copy = c, t.slice = h, t.toString = function (e, t, n) {
  1938. var i = !o && r.isBuffer(this) ? this.toString : s.toString;
  1939. return i.apply(this, arguments)
  1940. }, t.write = (i = "write", function () {
  1941. return (this[i] || s[i]).apply(this, arguments)
  1942. });
  1943. var r = n( /*! ./bufferish */ "./node_modules/msgpack-lite/lib/bufferish.js"),
  1944. a = r.global,
  1945. o = r.hasBuffer && "TYPED_ARRAY_SUPPORT" in a,
  1946. l = o && !a.TYPED_ARRAY_SUPPORT;
  1947.  
  1948. function c(e, t, n, i) {
  1949. var a = r.isBuffer(this),
  1950. o = r.isBuffer(e);
  1951. if (a && o) return this.copy(e, t, n, i);
  1952. if (l || a || o || !r.isView(this) || !r.isView(e)) return s.copy.call(this, e, t, n, i);
  1953. var c = n || null != i ? h.call(this, n, i) : this;
  1954. return e.set(c, t), c.length
  1955. }
  1956.  
  1957. function h(e, t) {
  1958. var n = this.slice || !l && this.subarray;
  1959. if (n) return n.call(this, e, t);
  1960. var i = r.alloc.call(this, t - e);
  1961. return c.call(this, i, 0, e, t), i
  1962. }
  1963. },
  1964. "./node_modules/msgpack-lite/lib/bufferish-uint8array.js":
  1965. /*!***************************************************************!*\
  1966. !*** ./node_modules/msgpack-lite/lib/bufferish-uint8array.js ***!
  1967. \***************************************************************/
  1968. /*! no static exports found */
  1969. function (e, t, n) {
  1970. var i = n( /*! ./bufferish */ "./node_modules/msgpack-lite/lib/bufferish.js");
  1971.  
  1972. function s(e) {
  1973. return new Uint8Array(e)
  1974. }(t = e.exports = i.hasArrayBuffer ? s(0) : []).alloc = s, t.concat = i.concat, t.from = function (e) {
  1975. if (i.isView(e)) {
  1976. var n = e.byteOffset,
  1977. s = e.byteLength;
  1978. (e = e.buffer).byteLength !== s && (e.slice ? e = e.slice(n, n + s) : (e = new Uint8Array(e)).byteLength !== s && (e = Array.prototype.slice.call(e, n, n + s)))
  1979. } else {
  1980. if ("string" == typeof e) return i.from.call(t, e);
  1981. if ("number" == typeof e) throw new TypeError('"value" argument must not be a number')
  1982. }
  1983. return new Uint8Array(e)
  1984. }
  1985. },
  1986. "./node_modules/msgpack-lite/lib/bufferish.js":
  1987. /*!****************************************************!*\
  1988. !*** ./node_modules/msgpack-lite/lib/bufferish.js ***!
  1989. \****************************************************/
  1990. /*! no static exports found */
  1991. function (e, t, n) {
  1992. var i = t.global = n( /*! ./buffer-global */ "./node_modules/msgpack-lite/lib/buffer-global.js"),
  1993. s = t.hasBuffer = i && !!i.isBuffer,
  1994. r = t.hasArrayBuffer = "undefined" != typeof ArrayBuffer,
  1995. a = t.isArray = n( /*! isarray */ "./node_modules/msgpack-lite/node_modules/isarray/index.js");
  1996. t.isArrayBuffer = r ? function (e) {
  1997. return e instanceof ArrayBuffer || p(e)
  1998. } : y;
  1999. var o = t.isBuffer = s ? i.isBuffer : y,
  2000. l = t.isView = r ? ArrayBuffer.isView || k("ArrayBuffer", "buffer") : y;
  2001. t.alloc = f, t.concat = function (e, n) {
  2002. n || (n = 0, Array.prototype.forEach.call(e, (function (e) {
  2003. n += e.length
  2004. })));
  2005. var i = this !== t && this || e[0],
  2006. s = f.call(i, n),
  2007. r = 0;
  2008. return Array.prototype.forEach.call(e, (function (e) {
  2009. r += d.copy.call(e, s, r)
  2010. })), s
  2011. }, t.from = function (e) {
  2012. return "string" == typeof e ? m.call(this, e) : g(this).from(e)
  2013. };
  2014. var c = t.Array = n( /*! ./bufferish-array */ "./node_modules/msgpack-lite/lib/bufferish-array.js"),
  2015. h = t.Buffer = n( /*! ./bufferish-buffer */ "./node_modules/msgpack-lite/lib/bufferish-buffer.js"),
  2016. u = t.Uint8Array = n( /*! ./bufferish-uint8array */ "./node_modules/msgpack-lite/lib/bufferish-uint8array.js"),
  2017. d = t.prototype = n( /*! ./bufferish-proto */ "./node_modules/msgpack-lite/lib/bufferish-proto.js");
  2018.  
  2019. function f(e) {
  2020. return g(this).alloc(e)
  2021. }
  2022. var p = k("ArrayBuffer");
  2023.  
  2024. function m(e) {
  2025. var t = 3 * e.length,
  2026. n = f.call(this, t),
  2027. i = d.write.call(n, e);
  2028. return t !== i && (n = d.slice.call(n, 0, i)), n
  2029. }
  2030.  
  2031. function g(e) {
  2032. return o(e) ? h : l(e) ? u : a(e) ? c : s ? h : r ? u : c
  2033. }
  2034.  
  2035. function y() {
  2036. return !1
  2037. }
  2038.  
  2039. function k(e, t) {
  2040. return e = "[object " + e + "]",
  2041. function (n) {
  2042. return null != n && {}.toString.call(t ? n[t] : n) === e
  2043. }
  2044. }
  2045. },
  2046. "./node_modules/msgpack-lite/lib/codec-base.js":
  2047. /*!*****************************************************!*\
  2048. !*** ./node_modules/msgpack-lite/lib/codec-base.js ***!
  2049. \*****************************************************/
  2050. /*! no static exports found */
  2051. function (e, t, n) {
  2052. var i = n( /*! isarray */ "./node_modules/msgpack-lite/node_modules/isarray/index.js");
  2053. t.createCodec = o, t.install = function (e) {
  2054. for (var t in e) r.prototype[t] = a(r.prototype[t], e[t])
  2055. }, t.filter = function (e) {
  2056. return i(e) ? function (e) {
  2057. return e = e.slice(),
  2058. function (n) {
  2059. return e.reduce(t, n)
  2060. };
  2061.  
  2062. function t(e, t) {
  2063. return t(e)
  2064. }
  2065. }(e) : e
  2066. };
  2067. var s = n( /*! ./bufferish */ "./node_modules/msgpack-lite/lib/bufferish.js");
  2068.  
  2069. function r(e) {
  2070. if (!(this instanceof r)) return new r(e);
  2071. this.options = e, this.init()
  2072. }
  2073.  
  2074. function a(e, t) {
  2075. return e && t ? function () {
  2076. return e.apply(this, arguments), t.apply(this, arguments)
  2077. } : e || t
  2078. }
  2079.  
  2080. function o(e) {
  2081. return new r(e)
  2082. }
  2083. r.prototype.init = function () {
  2084. var e = this.options;
  2085. return e && e.uint8array && (this.bufferish = s.Uint8Array), this
  2086. }, t.preset = o({
  2087. preset: !0
  2088. })
  2089. },
  2090. "./node_modules/msgpack-lite/lib/codec.js":
  2091. /*!************************************************!*\
  2092. !*** ./node_modules/msgpack-lite/lib/codec.js ***!
  2093. \************************************************/
  2094. /*! no static exports found */
  2095. function (e, t, n) {
  2096. n( /*! ./read-core */ "./node_modules/msgpack-lite/lib/read-core.js"), n( /*! ./write-core */ "./node_modules/msgpack-lite/lib/write-core.js"), t.codec = {
  2097. preset: n( /*! ./codec-base */ "./node_modules/msgpack-lite/lib/codec-base.js").preset
  2098. }
  2099. },
  2100. "./node_modules/msgpack-lite/lib/decode-buffer.js":
  2101. /*!********************************************************!*\
  2102. !*** ./node_modules/msgpack-lite/lib/decode-buffer.js ***!
  2103. \********************************************************/
  2104. /*! no static exports found */
  2105. function (e, t, n) {
  2106. t.DecodeBuffer = s;
  2107. var i = n( /*! ./read-core */ "./node_modules/msgpack-lite/lib/read-core.js").preset;
  2108.  
  2109. function s(e) {
  2110. if (!(this instanceof s)) return new s(e);
  2111. if (e && (this.options = e, e.codec)) {
  2112. var t = this.codec = e.codec;
  2113. t.bufferish && (this.bufferish = t.bufferish)
  2114. }
  2115. }
  2116. n( /*! ./flex-buffer */ "./node_modules/msgpack-lite/lib/flex-buffer.js").FlexDecoder.mixin(s.prototype), s.prototype.codec = i, s.prototype.fetch = function () {
  2117. return this.codec.decode(this)
  2118. }
  2119. },
  2120. "./node_modules/msgpack-lite/lib/decode.js":
  2121. /*!*************************************************!*\
  2122. !*** ./node_modules/msgpack-lite/lib/decode.js ***!
  2123. \*************************************************/
  2124. /*! no static exports found */
  2125. function (e, t, n) {
  2126. t.decode = function (e, t) {
  2127. var n = new i(t);
  2128. return n.write(e), n.read()
  2129. };
  2130. var i = n( /*! ./decode-buffer */ "./node_modules/msgpack-lite/lib/decode-buffer.js").DecodeBuffer
  2131. },
  2132. "./node_modules/msgpack-lite/lib/decoder.js":
  2133. /*!**************************************************!*\
  2134. !*** ./node_modules/msgpack-lite/lib/decoder.js ***!
  2135. \**************************************************/
  2136. /*! no static exports found */
  2137. function (e, t, n) {
  2138. t.Decoder = r;
  2139. var i = n( /*! event-lite */ "./node_modules/event-lite/event-lite.js"),
  2140. s = n( /*! ./decode-buffer */ "./node_modules/msgpack-lite/lib/decode-buffer.js").DecodeBuffer;
  2141.  
  2142. function r(e) {
  2143. if (!(this instanceof r)) return new r(e);
  2144. s.call(this, e)
  2145. }
  2146. r.prototype = new s, i.mixin(r.prototype), r.prototype.decode = function (e) {
  2147. arguments.length && this.write(e), this.flush()
  2148. }, r.prototype.push = function (e) {
  2149. this.emit("data", e)
  2150. }, r.prototype.end = function (e) {
  2151. this.decode(e), this.emit("end")
  2152. }
  2153. },
  2154. "./node_modules/msgpack-lite/lib/encode-buffer.js":
  2155. /*!********************************************************!*\
  2156. !*** ./node_modules/msgpack-lite/lib/encode-buffer.js ***!
  2157. \********************************************************/
  2158. /*! no static exports found */
  2159. function (e, t, n) {
  2160. t.EncodeBuffer = s;
  2161. var i = n( /*! ./write-core */ "./node_modules/msgpack-lite/lib/write-core.js").preset;
  2162.  
  2163. function s(e) {
  2164. if (!(this instanceof s)) return new s(e);
  2165. if (e && (this.options = e, e.codec)) {
  2166. var t = this.codec = e.codec;
  2167. t.bufferish && (this.bufferish = t.bufferish)
  2168. }
  2169. }
  2170. n( /*! ./flex-buffer */ "./node_modules/msgpack-lite/lib/flex-buffer.js").FlexEncoder.mixin(s.prototype), s.prototype.codec = i, s.prototype.write = function (e) {
  2171. this.codec.encode(this, e)
  2172. }
  2173. },
  2174. "./node_modules/msgpack-lite/lib/encode.js":
  2175. /*!*************************************************!*\
  2176. !*** ./node_modules/msgpack-lite/lib/encode.js ***!
  2177. \*************************************************/
  2178. /*! no static exports found */
  2179. function (e, t, n) {
  2180. t.encode = function (e, t) {
  2181. var n = new i(t);
  2182. return n.write(e), n.read()
  2183. };
  2184. var i = n( /*! ./encode-buffer */ "./node_modules/msgpack-lite/lib/encode-buffer.js").EncodeBuffer
  2185. },
  2186. "./node_modules/msgpack-lite/lib/encoder.js":
  2187. /*!**************************************************!*\
  2188. !*** ./node_modules/msgpack-lite/lib/encoder.js ***!
  2189. \**************************************************/
  2190. /*! no static exports found */
  2191. function (e, t, n) {
  2192. t.Encoder = r;
  2193. var i = n( /*! event-lite */ "./node_modules/event-lite/event-lite.js"),
  2194. s = n( /*! ./encode-buffer */ "./node_modules/msgpack-lite/lib/encode-buffer.js").EncodeBuffer;
  2195.  
  2196. function r(e) {
  2197. if (!(this instanceof r)) return new r(e);
  2198. s.call(this, e)
  2199. }
  2200. r.prototype = new s, i.mixin(r.prototype), r.prototype.encode = function (e) {
  2201. this.write(e), this.emit("data", this.read())
  2202. }, r.prototype.end = function (e) {
  2203. arguments.length && this.encode(e), this.flush(), this.emit("end")
  2204. }
  2205. },
  2206. "./node_modules/msgpack-lite/lib/ext-buffer.js":
  2207. /*!*****************************************************!*\
  2208. !*** ./node_modules/msgpack-lite/lib/ext-buffer.js ***!
  2209. \*****************************************************/
  2210. /*! no static exports found */
  2211. function (e, t, n) {
  2212. t.ExtBuffer = function e(t, n) {
  2213. if (!(this instanceof e)) return new e(t, n);
  2214. this.buffer = i.from(t), this.type = n
  2215. };
  2216. var i = n( /*! ./bufferish */ "./node_modules/msgpack-lite/lib/bufferish.js")
  2217. },
  2218. "./node_modules/msgpack-lite/lib/ext-packer.js":
  2219. /*!*****************************************************!*\
  2220. !*** ./node_modules/msgpack-lite/lib/ext-packer.js ***!
  2221. \*****************************************************/
  2222. /*! no static exports found */
  2223. function (e, t, n) {
  2224. t.setExtPackers = function (e) {
  2225. e.addExtPacker(14, Error, [u, l]), e.addExtPacker(1, EvalError, [u, l]), e.addExtPacker(2, RangeError, [u, l]), e.addExtPacker(3, ReferenceError, [u, l]), e.addExtPacker(4, SyntaxError, [u, l]), e.addExtPacker(5, TypeError, [u, l]), e.addExtPacker(6, URIError, [u, l]), e.addExtPacker(10, RegExp, [h, l]), e.addExtPacker(11, Boolean, [c, l]), e.addExtPacker(12, String, [c, l]), e.addExtPacker(13, Date, [Number, l]), e.addExtPacker(15, Number, [c, l]), "undefined" != typeof Uint8Array && (e.addExtPacker(17, Int8Array, a), e.addExtPacker(18, Uint8Array, a), e.addExtPacker(19, Int16Array, a), e.addExtPacker(20, Uint16Array, a), e.addExtPacker(21, Int32Array, a), e.addExtPacker(22, Uint32Array, a), e.addExtPacker(23, Float32Array, a), "undefined" != typeof Float64Array && e.addExtPacker(24, Float64Array, a), "undefined" != typeof Uint8ClampedArray && e.addExtPacker(25, Uint8ClampedArray, a), e.addExtPacker(26, ArrayBuffer, a), e.addExtPacker(29, DataView, a));
  2226. s.hasBuffer && e.addExtPacker(27, r, s.from)
  2227. };
  2228. var i, s = n( /*! ./bufferish */ "./node_modules/msgpack-lite/lib/bufferish.js"),
  2229. r = s.global,
  2230. a = s.Uint8Array.from,
  2231. o = {
  2232. name: 1,
  2233. message: 1,
  2234. stack: 1,
  2235. columnNumber: 1,
  2236. fileName: 1,
  2237. lineNumber: 1
  2238. };
  2239.  
  2240. function l(e) {
  2241. return i || (i = n( /*! ./encode */ "./node_modules/msgpack-lite/lib/encode.js").encode), i(e)
  2242. }
  2243.  
  2244. function c(e) {
  2245. return e.valueOf()
  2246. }
  2247.  
  2248. function h(e) {
  2249. (e = RegExp.prototype.toString.call(e).split("/")).shift();
  2250. var t = [e.pop()];
  2251. return t.unshift(e.join("/")), t
  2252. }
  2253.  
  2254. function u(e) {
  2255. var t = {};
  2256. for (var n in o) t[n] = e[n];
  2257. return t
  2258. }
  2259. },
  2260. "./node_modules/msgpack-lite/lib/ext-unpacker.js":
  2261. /*!*******************************************************!*\
  2262. !*** ./node_modules/msgpack-lite/lib/ext-unpacker.js ***!
  2263. \*******************************************************/
  2264. /*! no static exports found */
  2265. function (e, t, n) {
  2266. t.setExtUnpackers = function (e) {
  2267. e.addExtUnpacker(14, [o, c(Error)]), e.addExtUnpacker(1, [o, c(EvalError)]), e.addExtUnpacker(2, [o, c(RangeError)]), e.addExtUnpacker(3, [o, c(ReferenceError)]), e.addExtUnpacker(4, [o, c(SyntaxError)]), e.addExtUnpacker(5, [o, c(TypeError)]), e.addExtUnpacker(6, [o, c(URIError)]), e.addExtUnpacker(10, [o, l]), e.addExtUnpacker(11, [o, h(Boolean)]), e.addExtUnpacker(12, [o, h(String)]), e.addExtUnpacker(13, [o, h(Date)]), e.addExtUnpacker(15, [o, h(Number)]), "undefined" != typeof Uint8Array && (e.addExtUnpacker(17, h(Int8Array)), e.addExtUnpacker(18, h(Uint8Array)), e.addExtUnpacker(19, [u, h(Int16Array)]), e.addExtUnpacker(20, [u, h(Uint16Array)]), e.addExtUnpacker(21, [u, h(Int32Array)]), e.addExtUnpacker(22, [u, h(Uint32Array)]), e.addExtUnpacker(23, [u, h(Float32Array)]), "undefined" != typeof Float64Array && e.addExtUnpacker(24, [u, h(Float64Array)]), "undefined" != typeof Uint8ClampedArray && e.addExtUnpacker(25, h(Uint8ClampedArray)), e.addExtUnpacker(26, u), e.addExtUnpacker(29, [u, h(DataView)]));
  2268. s.hasBuffer && e.addExtUnpacker(27, h(r))
  2269. };
  2270. var i, s = n( /*! ./bufferish */ "./node_modules/msgpack-lite/lib/bufferish.js"),
  2271. r = s.global,
  2272. a = {
  2273. name: 1,
  2274. message: 1,
  2275. stack: 1,
  2276. columnNumber: 1,
  2277. fileName: 1,
  2278. lineNumber: 1
  2279. };
  2280.  
  2281. function o(e) {
  2282. return i || (i = n( /*! ./decode */ "./node_modules/msgpack-lite/lib/decode.js").decode), i(e)
  2283. }
  2284.  
  2285. function l(e) {
  2286. return RegExp.apply(null, e)
  2287. }
  2288.  
  2289. function c(e) {
  2290. return function (t) {
  2291. var n = new e;
  2292. for (var i in a) n[i] = t[i];
  2293. return n
  2294. }
  2295. }
  2296.  
  2297. function h(e) {
  2298. return function (t) {
  2299. return new e(t)
  2300. }
  2301. }
  2302.  
  2303. function u(e) {
  2304. return new Uint8Array(e).buffer
  2305. }
  2306. },
  2307. "./node_modules/msgpack-lite/lib/ext.js":
  2308. /*!**********************************************!*\
  2309. !*** ./node_modules/msgpack-lite/lib/ext.js ***!
  2310. \**********************************************/
  2311. /*! no static exports found */
  2312. function (e, t, n) {
  2313. n( /*! ./read-core */ "./node_modules/msgpack-lite/lib/read-core.js"), n( /*! ./write-core */ "./node_modules/msgpack-lite/lib/write-core.js"), t.createCodec = n( /*! ./codec-base */ "./node_modules/msgpack-lite/lib/codec-base.js").createCodec
  2314. },
  2315. "./node_modules/msgpack-lite/lib/flex-buffer.js":
  2316. /*!******************************************************!*\
  2317. !*** ./node_modules/msgpack-lite/lib/flex-buffer.js ***!
  2318. \******************************************************/
  2319. /*! no static exports found */
  2320. function (e, t, n) {
  2321. t.FlexDecoder = r, t.FlexEncoder = a;
  2322. var i = n( /*! ./bufferish */ "./node_modules/msgpack-lite/lib/bufferish.js"),
  2323. s = "BUFFER_SHORTAGE";
  2324.  
  2325. function r() {
  2326. if (!(this instanceof r)) return new r
  2327. }
  2328.  
  2329. function a() {
  2330. if (!(this instanceof a)) return new a
  2331. }
  2332.  
  2333. function o() {
  2334. throw new Error("method not implemented: write()")
  2335. }
  2336.  
  2337. function l() {
  2338. throw new Error("method not implemented: fetch()")
  2339. }
  2340.  
  2341. function c() {
  2342. return this.buffers && this.buffers.length ? (this.flush(), this.pull()) : this.fetch()
  2343. }
  2344.  
  2345. function h(e) {
  2346. (this.buffers || (this.buffers = [])).push(e)
  2347. }
  2348.  
  2349. function u() {
  2350. return (this.buffers || (this.buffers = [])).shift()
  2351. }
  2352.  
  2353. function d(e) {
  2354. return function (t) {
  2355. for (var n in e) t[n] = e[n];
  2356. return t
  2357. }
  2358. }
  2359. r.mixin = d({
  2360. bufferish: i,
  2361. write: function (e) {
  2362. var t = this.offset ? i.prototype.slice.call(this.buffer, this.offset) : this.buffer;
  2363. this.buffer = t ? e ? this.bufferish.concat([t, e]) : t : e, this.offset = 0
  2364. },
  2365. fetch: l,
  2366. flush: function () {
  2367. for (; this.offset < this.buffer.length;) {
  2368. var e, t = this.offset;
  2369. try {
  2370. e = this.fetch()
  2371. } catch (e) {
  2372. if (e && e.message != s) throw e;
  2373. this.offset = t;
  2374. break
  2375. }
  2376. this.push(e)
  2377. }
  2378. },
  2379. push: h,
  2380. pull: u,
  2381. read: c,
  2382. reserve: function (e) {
  2383. var t = this.offset,
  2384. n = t + e;
  2385. if (n > this.buffer.length) throw new Error(s);
  2386. return this.offset = n, t
  2387. },
  2388. offset: 0
  2389. }), r.mixin(r.prototype), a.mixin = d({
  2390. bufferish: i,
  2391. write: o,
  2392. fetch: function () {
  2393. var e = this.start;
  2394. if (e < this.offset) {
  2395. var t = this.start = this.offset;
  2396. return i.prototype.slice.call(this.buffer, e, t)
  2397. }
  2398. },
  2399. flush: function () {
  2400. for (; this.start < this.offset;) {
  2401. var e = this.fetch();
  2402. e && this.push(e)
  2403. }
  2404. },
  2405. push: h,
  2406. pull: function () {
  2407. var e = this.buffers || (this.buffers = []),
  2408. t = e.length > 1 ? this.bufferish.concat(e) : e[0];
  2409. return e.length = 0, t
  2410. },
  2411. read: c,
  2412. reserve: function (e) {
  2413. var t = 0 | e;
  2414. if (this.buffer) {
  2415. var n = this.buffer.length,
  2416. i = 0 | this.offset,
  2417. s = i + t;
  2418. if (s < n) return this.offset = s, i;
  2419. this.flush(), e = Math.max(e, Math.min(2 * n, this.maxBufferSize))
  2420. }
  2421. return e = Math.max(e, this.minBufferSize), this.buffer = this.bufferish.alloc(e), this.start = 0, this.offset = t, 0
  2422. },
  2423. send: function (e) {
  2424. var t = e.length;
  2425. if (t > this.minBufferSize) this.flush(), this.push(e);
  2426. else {
  2427. var n = this.reserve(t);
  2428. i.prototype.copy.call(e, this.buffer, n)
  2429. }
  2430. },
  2431. maxBufferSize: 65536,
  2432. minBufferSize: 2048,
  2433. offset: 0,
  2434. start: 0
  2435. }), a.mixin(a.prototype)
  2436. },
  2437. "./node_modules/msgpack-lite/lib/read-core.js":
  2438. /*!****************************************************!*\
  2439. !*** ./node_modules/msgpack-lite/lib/read-core.js ***!
  2440. \****************************************************/
  2441. /*! no static exports found */
  2442. function (e, t, n) {
  2443. var i = n( /*! ./ext-buffer */ "./node_modules/msgpack-lite/lib/ext-buffer.js").ExtBuffer,
  2444. s = n( /*! ./ext-unpacker */ "./node_modules/msgpack-lite/lib/ext-unpacker.js"),
  2445. r = n( /*! ./read-format */ "./node_modules/msgpack-lite/lib/read-format.js").readUint8,
  2446. a = n( /*! ./read-token */ "./node_modules/msgpack-lite/lib/read-token.js"),
  2447. o = n( /*! ./codec-base */ "./node_modules/msgpack-lite/lib/codec-base.js");
  2448.  
  2449. function l() {
  2450. var e = this.options;
  2451. return this.decode = function (e) {
  2452. var t = a.getReadToken(e);
  2453. return function (e) {
  2454. var n = r(e),
  2455. i = t[n];
  2456. if (!i) throw new Error("Invalid type: " + (n ? "0x" + n.toString(16) : n));
  2457. return i(e)
  2458. }
  2459. }(e), e && e.preset && s.setExtUnpackers(this), this
  2460. }
  2461. o.install({
  2462. addExtUnpacker: function (e, t) {
  2463. (this.extUnpackers || (this.extUnpackers = []))[e] = o.filter(t)
  2464. },
  2465. getExtUnpacker: function (e) {
  2466. return (this.extUnpackers || (this.extUnpackers = []))[e] || function (t) {
  2467. return new i(t, e)
  2468. }
  2469. },
  2470. init: l
  2471. }), t.preset = l.call(o.preset)
  2472. },
  2473. "./node_modules/msgpack-lite/lib/read-format.js":
  2474. /*!******************************************************!*\
  2475. !*** ./node_modules/msgpack-lite/lib/read-format.js ***!
  2476. \******************************************************/
  2477. /*! no static exports found */
  2478. function (e, t, n) {
  2479. var i = n( /*! ieee754 */ "./node_modules/ieee754/index.js"),
  2480. s = n( /*! int64-buffer */ "./node_modules/int64-buffer/int64-buffer.js"),
  2481. r = s.Uint64BE,
  2482. a = s.Int64BE;
  2483. t.getReadFormat = function (e) {
  2484. var t = o.hasArrayBuffer && e && e.binarraybuffer,
  2485. n = e && e.int64;
  2486. return {
  2487. map: c && e && e.usemap ? u : h,
  2488. array: d,
  2489. str: f,
  2490. bin: t ? m : p,
  2491. ext: g,
  2492. uint8: y,
  2493. uint16: w,
  2494. uint32: v,
  2495. uint64: S(8, n ? M : I),
  2496. int8: k,
  2497. int16: b,
  2498. int32: x,
  2499. int64: S(8, n ? j : T),
  2500. float32: S(4, E),
  2501. float64: S(8, P)
  2502. }
  2503. }, t.readUint8 = y;
  2504. var o = n( /*! ./bufferish */ "./node_modules/msgpack-lite/lib/bufferish.js"),
  2505. l = n( /*! ./bufferish-proto */ "./node_modules/msgpack-lite/lib/bufferish-proto.js"),
  2506. c = "undefined" != typeof Map;
  2507.  
  2508. function h(e, t) {
  2509. var n, i = {},
  2510. s = new Array(t),
  2511. r = new Array(t),
  2512. a = e.codec.decode;
  2513. for (n = 0; n < t; n++) s[n] = a(e), r[n] = a(e);
  2514. for (n = 0; n < t; n++) i[s[n]] = r[n];
  2515. return i
  2516. }
  2517.  
  2518. function u(e, t) {
  2519. var n, i = new Map,
  2520. s = new Array(t),
  2521. r = new Array(t),
  2522. a = e.codec.decode;
  2523. for (n = 0; n < t; n++) s[n] = a(e), r[n] = a(e);
  2524. for (n = 0; n < t; n++) i.set(s[n], r[n]);
  2525. return i
  2526. }
  2527.  
  2528. function d(e, t) {
  2529. for (var n = new Array(t), i = e.codec.decode, s = 0; s < t; s++) n[s] = i(e);
  2530. return n
  2531. }
  2532.  
  2533. function f(e, t) {
  2534. var n = e.reserve(t),
  2535. i = n + t;
  2536. return l.toString.call(e.buffer, "utf-8", n, i)
  2537. }
  2538.  
  2539. function p(e, t) {
  2540. var n = e.reserve(t),
  2541. i = n + t,
  2542. s = l.slice.call(e.buffer, n, i);
  2543. return o.from(s)
  2544. }
  2545.  
  2546. function m(e, t) {
  2547. var n = e.reserve(t),
  2548. i = n + t,
  2549. s = l.slice.call(e.buffer, n, i);
  2550. return o.Uint8Array.from(s).buffer
  2551. }
  2552.  
  2553. function g(e, t) {
  2554. var n = e.reserve(t + 1),
  2555. i = e.buffer[n++],
  2556. s = n + t,
  2557. r = e.codec.getExtUnpacker(i);
  2558. if (!r) throw new Error("Invalid ext type: " + (i ? "0x" + i.toString(16) : i));
  2559. return r(l.slice.call(e.buffer, n, s))
  2560. }
  2561.  
  2562. function y(e) {
  2563. var t = e.reserve(1);
  2564. return e.buffer[t]
  2565. }
  2566.  
  2567. function k(e) {
  2568. var t = e.reserve(1),
  2569. n = e.buffer[t];
  2570. return 128 & n ? n - 256 : n
  2571. }
  2572.  
  2573. function w(e) {
  2574. var t = e.reserve(2),
  2575. n = e.buffer;
  2576. return n[t++] << 8 | n[t]
  2577. }
  2578.  
  2579. function b(e) {
  2580. var t = e.reserve(2),
  2581. n = e.buffer,
  2582. i = n[t++] << 8 | n[t];
  2583. return 32768 & i ? i - 65536 : i
  2584. }
  2585.  
  2586. function v(e) {
  2587. var t = e.reserve(4),
  2588. n = e.buffer;
  2589. return 16777216 * n[t++] + (n[t++] << 16) + (n[t++] << 8) + n[t]
  2590. }
  2591.  
  2592. function x(e) {
  2593. var t = e.reserve(4),
  2594. n = e.buffer;
  2595. return n[t++] << 24 | n[t++] << 16 | n[t++] << 8 | n[t]
  2596. }
  2597.  
  2598. function S(e, t) {
  2599. return function (n) {
  2600. var i = n.reserve(e);
  2601. return t.call(n.buffer, i, true)
  2602. }
  2603. }
  2604.  
  2605. function I(e) {
  2606. return new r(this, e).toNumber()
  2607. }
  2608.  
  2609. function T(e) {
  2610. return new a(this, e).toNumber()
  2611. }
  2612.  
  2613. function M(e) {
  2614. return new r(this, e)
  2615. }
  2616.  
  2617. function j(e) {
  2618. return new a(this, e)
  2619. }
  2620.  
  2621. function E(e) {
  2622. return i.read(this, e, !1, 23, 4)
  2623. }
  2624.  
  2625. function P(e) {
  2626. return i.read(this, e, !1, 52, 8)
  2627. }
  2628. },
  2629. "./node_modules/msgpack-lite/lib/read-token.js":
  2630. /*!*****************************************************!*\
  2631. !*** ./node_modules/msgpack-lite/lib/read-token.js ***!
  2632. \*****************************************************/
  2633. /*! no static exports found */
  2634. function (e, t, n) {
  2635. var i = n( /*! ./read-format */ "./node_modules/msgpack-lite/lib/read-format.js");
  2636.  
  2637. function s(e) {
  2638. var t, n = new Array(256);
  2639. for (t = 0; t <= 127; t++) n[t] = r(t);
  2640. for (t = 128; t <= 143; t++) n[t] = o(t - 128, e.map);
  2641. for (t = 144; t <= 159; t++) n[t] = o(t - 144, e.array);
  2642. for (t = 160; t <= 191; t++) n[t] = o(t - 160, e.str);
  2643. for (n[192] = r(null), n[193] = null, n[194] = r(!1), n[195] = r(!0), n[196] = a(e.uint8, e.bin), n[197] = a(e.uint16, e.bin), n[198] = a(e.uint32, e.bin), n[199] = a(e.uint8, e.ext), n[200] = a(e.uint16, e.ext), n[201] = a(e.uint32, e.ext), n[202] = e.float32, n[203] = e.float64, n[204] = e.uint8, n[205] = e.uint16, n[206] = e.uint32, n[207] = e.uint64, n[208] = e.int8, n[209] = e.int16, n[210] = e.int32, n[211] = e.int64, n[212] = o(1, e.ext), n[213] = o(2, e.ext), n[214] = o(4, e.ext), n[215] = o(8, e.ext), n[216] = o(16, e.ext), n[217] = a(e.uint8, e.str), n[218] = a(e.uint16, e.str), n[219] = a(e.uint32, e.str), n[220] = a(e.uint16, e.array), n[221] = a(e.uint32, e.array), n[222] = a(e.uint16, e.map), n[223] = a(e.uint32, e.map), t = 224; t <= 255; t++) n[t] = r(t - 256);
  2644. return n
  2645. }
  2646.  
  2647. function r(e) {
  2648. return function () {
  2649. return e
  2650. }
  2651. }
  2652.  
  2653. function a(e, t) {
  2654. return function (n) {
  2655. var i = e(n);
  2656. return t(n, i)
  2657. }
  2658. }
  2659.  
  2660. function o(e, t) {
  2661. return function (n) {
  2662. return t(n, e)
  2663. }
  2664. }
  2665. t.getReadToken = function (e) {
  2666. var t = i.getReadFormat(e);
  2667. return e && e.useraw ? function (e) {
  2668. var t, n = s(e).slice();
  2669. for (n[217] = n[196], n[218] = n[197], n[219] = n[198], t = 160; t <= 191; t++) n[t] = o(t - 160, e.bin);
  2670. return n
  2671. }(t) : s(t)
  2672. }
  2673. },
  2674. "./node_modules/msgpack-lite/lib/write-core.js":
  2675. /*!*****************************************************!*\
  2676. !*** ./node_modules/msgpack-lite/lib/write-core.js ***!
  2677. \*****************************************************/
  2678. /*! no static exports found */
  2679. function (e, t, n) {
  2680. var i = n( /*! ./ext-buffer */ "./node_modules/msgpack-lite/lib/ext-buffer.js").ExtBuffer,
  2681. s = n( /*! ./ext-packer */ "./node_modules/msgpack-lite/lib/ext-packer.js"),
  2682. r = n( /*! ./write-type */ "./node_modules/msgpack-lite/lib/write-type.js"),
  2683. a = n( /*! ./codec-base */ "./node_modules/msgpack-lite/lib/codec-base.js");
  2684.  
  2685. function o() {
  2686. var e = this.options;
  2687. return this.encode = function (e) {
  2688. var t = r.getWriteType(e);
  2689. return function (e, n) {
  2690. var i = t[typeof n];
  2691. if (!i) throw new Error('Unsupported type "' + typeof n + '": ' + n);
  2692. i(e, n)
  2693. }
  2694. }(e), e && e.preset && s.setExtPackers(this), this
  2695. }
  2696. a.install({
  2697. addExtPacker: function (e, t, n) {
  2698. n = a.filter(n);
  2699. var s = t.name;
  2700. if (s && "Object" !== s) {
  2701. (this.extPackers || (this.extPackers = {}))[s] = r
  2702. } else {
  2703. (this.extEncoderList || (this.extEncoderList = [])).unshift([t, r])
  2704. }
  2705.  
  2706. function r(t) {
  2707. return n && (t = n(t)), new i(t, e)
  2708. }
  2709. },
  2710. getExtPacker: function (e) {
  2711. var t = this.extPackers || (this.extPackers = {}),
  2712. n = e.constructor,
  2713. i = n && n.name && t[n.name];
  2714. if (i) return i;
  2715. for (var s = this.extEncoderList || (this.extEncoderList = []), r = s.length, a = 0; a < r; a++) {
  2716. var o = s[a];
  2717. if (n === o[0]) return o[1]
  2718. }
  2719. },
  2720. init: o
  2721. }), t.preset = o.call(a.preset)
  2722. },
  2723. "./node_modules/msgpack-lite/lib/write-token.js":
  2724. /*!******************************************************!*\
  2725. !*** ./node_modules/msgpack-lite/lib/write-token.js ***!
  2726. \******************************************************/
  2727. /*! no static exports found */
  2728. function (e, t, n) {
  2729. var i = n( /*! ieee754 */ "./node_modules/ieee754/index.js"),
  2730. s = n( /*! int64-buffer */ "./node_modules/int64-buffer/int64-buffer.js"),
  2731. r = s.Uint64BE,
  2732. a = s.Int64BE,
  2733. o = n( /*! ./write-uint8 */ "./node_modules/msgpack-lite/lib/write-uint8.js").uint8,
  2734. l = n( /*! ./bufferish */ "./node_modules/msgpack-lite/lib/bufferish.js"),
  2735. c = l.global,
  2736. h = l.hasBuffer && "TYPED_ARRAY_SUPPORT" in c && !c.TYPED_ARRAY_SUPPORT,
  2737. u = l.hasBuffer && c.prototype || {};
  2738.  
  2739. function d() {
  2740. var e = o.slice();
  2741. return e[196] = f(196), e[197] = p(197), e[198] = m(198), e[199] = f(199), e[200] = p(200), e[201] = m(201), e[202] = g(202, 4, u.writeFloatBE || w, !0), e[203] = g(203, 8, u.writeDoubleBE || b, !0), e[204] = f(204), e[205] = p(205), e[206] = m(206), e[207] = g(207, 8, y), e[208] = f(208), e[209] = p(209), e[210] = m(210), e[211] = g(211, 8, k), e[217] = f(217), e[218] = p(218), e[219] = m(219), e[220] = p(220), e[221] = m(221), e[222] = p(222), e[223] = m(223), e
  2742. }
  2743.  
  2744. function f(e) {
  2745. return function (t, n) {
  2746. var i = t.reserve(2),
  2747. s = t.buffer;
  2748. s[i++] = e, s[i] = n
  2749. }
  2750. }
  2751.  
  2752. function p(e) {
  2753. return function (t, n) {
  2754. var i = t.reserve(3),
  2755. s = t.buffer;
  2756. s[i++] = e, s[i++] = n >>> 8, s[i] = n
  2757. }
  2758. }
  2759.  
  2760. function m(e) {
  2761. return function (t, n) {
  2762. var i = t.reserve(5),
  2763. s = t.buffer;
  2764. s[i++] = e, s[i++] = n >>> 24, s[i++] = n >>> 16, s[i++] = n >>> 8, s[i] = n
  2765. }
  2766. }
  2767.  
  2768. function g(e, t, n, i) {
  2769. return function (s, r) {
  2770. var a = s.reserve(t + 1);
  2771. s.buffer[a++] = e, n.call(s.buffer, r, a, i)
  2772. }
  2773. }
  2774.  
  2775. function y(e, t) {
  2776. new r(this, t, e)
  2777. }
  2778.  
  2779. function k(e, t) {
  2780. new a(this, t, e)
  2781. }
  2782.  
  2783. function w(e, t) {
  2784. i.write(this, e, t, !1, 23, 4)
  2785. }
  2786.  
  2787. function b(e, t) {
  2788. i.write(this, e, t, !1, 52, 8)
  2789. }
  2790. t.getWriteToken = function (e) {
  2791. return e && e.uint8array ? ((t = d())[202] = g(202, 4, w), t[203] = g(203, 8, b), t) : h || l.hasBuffer && e && e.safe ? function () {
  2792. var e = o.slice();
  2793. return e[196] = g(196, 1, c.prototype.writeUInt8), e[197] = g(197, 2, c.prototype.writeUInt16BE), e[198] = g(198, 4, c.prototype.writeUInt32BE), e[199] = g(199, 1, c.prototype.writeUInt8), e[200] = g(200, 2, c.prototype.writeUInt16BE), e[201] = g(201, 4, c.prototype.writeUInt32BE), e[202] = g(202, 4, c.prototype.writeFloatBE), e[203] = g(203, 8, c.prototype.writeDoubleBE), e[204] = g(204, 1, c.prototype.writeUInt8), e[205] = g(205, 2, c.prototype.writeUInt16BE), e[206] = g(206, 4, c.prototype.writeUInt32BE), e[207] = g(207, 8, y), e[208] = g(208, 1, c.prototype.writeInt8), e[209] = g(209, 2, c.prototype.writeInt16BE), e[210] = g(210, 4, c.prototype.writeInt32BE), e[211] = g(211, 8, k), e[217] = g(217, 1, c.prototype.writeUInt8), e[218] = g(218, 2, c.prototype.writeUInt16BE), e[219] = g(219, 4, c.prototype.writeUInt32BE), e[220] = g(220, 2, c.prototype.writeUInt16BE), e[221] = g(221, 4, c.prototype.writeUInt32BE), e[222] = g(222, 2, c.prototype.writeUInt16BE), e[223] = g(223, 4, c.prototype.writeUInt32BE), e
  2794. }() : d();
  2795. var t
  2796. }
  2797. },
  2798. "./node_modules/msgpack-lite/lib/write-type.js":
  2799. /*!*****************************************************!*\
  2800. !*** ./node_modules/msgpack-lite/lib/write-type.js ***!
  2801. \*****************************************************/
  2802. /*! no static exports found */
  2803. function (e, t, n) {
  2804. var i = n( /*! isarray */ "./node_modules/msgpack-lite/node_modules/isarray/index.js"),
  2805. s = n( /*! int64-buffer */ "./node_modules/int64-buffer/int64-buffer.js"),
  2806. r = s.Uint64BE,
  2807. a = s.Int64BE,
  2808. o = n( /*! ./bufferish */ "./node_modules/msgpack-lite/lib/bufferish.js"),
  2809. l = n( /*! ./bufferish-proto */ "./node_modules/msgpack-lite/lib/bufferish-proto.js"),
  2810. c = n( /*! ./write-token */ "./node_modules/msgpack-lite/lib/write-token.js"),
  2811. h = n( /*! ./write-uint8 */ "./node_modules/msgpack-lite/lib/write-uint8.js").uint8,
  2812. u = n( /*! ./ext-buffer */ "./node_modules/msgpack-lite/lib/ext-buffer.js").ExtBuffer,
  2813. d = "undefined" != typeof Uint8Array,
  2814. f = "undefined" != typeof Map,
  2815. p = [];
  2816. p[1] = 212, p[2] = 213, p[4] = 214, p[8] = 215, p[16] = 216, t.getWriteType = function (e) {
  2817. var t = c.getWriteToken(e),
  2818. n = e && e.useraw,
  2819. s = d && e && e.binarraybuffer,
  2820. m = s ? o.isArrayBuffer : o.isBuffer,
  2821. g = s ? function (e, t) {
  2822. b(e, new Uint8Array(t))
  2823. } : b,
  2824. y = f && e && e.usemap ? function (e, n) {
  2825. if (!(n instanceof Map)) return v(e, n);
  2826. var i = n.size;
  2827. t[i < 16 ? 128 + i : i <= 65535 ? 222 : 223](e, i);
  2828. var s = e.codec.encode;
  2829. n.forEach((function (t, n, i) {
  2830. s(e, n), s(e, t)
  2831. }))
  2832. } : v;
  2833. return {
  2834. boolean: function (e, n) {
  2835. t[n ? 195 : 194](e, n)
  2836. },
  2837. function: w,
  2838. number: function (e, n) {
  2839. var i, s = 0 | n;
  2840. if (n !== s) return void t[i = 203](e, n);
  2841. i = -32 <= s && s <= 127 ? 255 & s : 0 <= s ? s <= 255 ? 204 : s <= 65535 ? 205 : 206 : -128 <= s ? 208 : -32768 <= s ? 209 : 210;
  2842. t[i](e, s)
  2843. },
  2844. object: n ? function (e, n) {
  2845. if (m(n)) return function (e, n) {
  2846. var i = n.length;
  2847. t[i < 32 ? 160 + i : i <= 65535 ? 218 : 219](e, i), e.send(n)
  2848. }(e, n);
  2849. k(e, n)
  2850. } : k,
  2851. string: function (e) {
  2852. return n;
  2853.  
  2854. function n(n, i) {
  2855. var s = i.length,
  2856. r = 5 + 3 * s;
  2857. n.offset = n.reserve(r);
  2858. var a = n.buffer,
  2859. o = e(s),
  2860. c = n.offset + o;
  2861. s = l.write.call(a, i, c);
  2862. var h = e(s);
  2863. if (o !== h) {
  2864. var u = c + h - o,
  2865. d = c + s;
  2866. l.copy.call(a, a, u, c, d)
  2867. }
  2868. t[1 === h ? 160 + s : h <= 3 ? 215 + h : 219](n, s), n.offset += s
  2869. }
  2870. }(n ? function (e) {
  2871. return e < 32 ? 1 : e <= 65535 ? 3 : 5
  2872. } : function (e) {
  2873. return e < 32 ? 1 : e <= 255 ? 2 : e <= 65535 ? 3 : 5
  2874. }),
  2875. symbol: w,
  2876. undefined: w
  2877. };
  2878.  
  2879. function k(e, n) {
  2880. if (null === n) return w(e, n);
  2881. if (m(n)) return g(e, n);
  2882. if (i(n)) return function (e, n) {
  2883. var i = n.length;
  2884. t[i < 16 ? 144 + i : i <= 65535 ? 220 : 221](e, i);
  2885. for (var s = e.codec.encode, r = 0; r < i; r++) s(e, n[r])
  2886. }(e, n);
  2887. if (r.isUint64BE(n)) return function (e, n) {
  2888. t[207](e, n.toArray())
  2889. }(e, n);
  2890. if (a.isInt64BE(n)) return function (e, n) {
  2891. t[211](e, n.toArray())
  2892. }(e, n);
  2893. var s = e.codec.getExtPacker(n);
  2894. if (s && (n = s(n)), n instanceof u) return function (e, n) {
  2895. var i = n.buffer,
  2896. s = i.length,
  2897. r = p[s] || (s < 255 ? 199 : s <= 65535 ? 200 : 201);
  2898. t[r](e, s), h[n.type](e), e.send(i)
  2899. }(e, n);
  2900. y(e, n)
  2901. }
  2902.  
  2903. function w(e, n) {
  2904. t[192](e, n)
  2905. }
  2906.  
  2907. function b(e, n) {
  2908. var i = n.length;
  2909. t[i < 255 ? 196 : i <= 65535 ? 197 : 198](e, i), e.send(n)
  2910. }
  2911.  
  2912. function v(e, n) {
  2913. var i = Object.keys(n),
  2914. s = i.length;
  2915. t[s < 16 ? 128 + s : s <= 65535 ? 222 : 223](e, s);
  2916. var r = e.codec.encode;
  2917. i.forEach((function (t) {
  2918. r(e, t), r(e, n[t])
  2919. }))
  2920. }
  2921. }
  2922. },
  2923. "./node_modules/msgpack-lite/lib/write-uint8.js":
  2924. /*!******************************************************!*\
  2925. !*** ./node_modules/msgpack-lite/lib/write-uint8.js ***!
  2926. \******************************************************/
  2927. /*! no static exports found */
  2928. function (e, t) {
  2929. for (var n = t.uint8 = new Array(256), i = 0; i <= 255; i++) n[i] = s(i);
  2930.  
  2931. function s(e) {
  2932. return function (t) {
  2933. var n = t.reserve(1);
  2934. t.buffer[n] = e
  2935. }
  2936. }
  2937. },
  2938. "./node_modules/msgpack-lite/node_modules/isarray/index.js":
  2939. /*!*****************************************************************!*\
  2940. !*** ./node_modules/msgpack-lite/node_modules/isarray/index.js ***!
  2941. \*****************************************************************/
  2942. /*! no static exports found */
  2943. function (e, t) {
  2944. var n = {}.toString;
  2945. e.exports = Array.isArray || function (e) {
  2946. return "[object Array]" == n.call(e)
  2947. }
  2948. },
  2949. "./node_modules/process/browser.js":
  2950. /*!*****************************************!*\
  2951. !*** ./node_modules/process/browser.js ***!
  2952. \*****************************************/
  2953. /*! no static exports found */
  2954. function (e, t) {
  2955. var n, i, s = e.exports = {};
  2956.  
  2957. function r() {
  2958. throw new Error("setTimeout has not been defined")
  2959. }
  2960.  
  2961. function a() {
  2962. throw new Error("clearTimeout has not been defined")
  2963. }
  2964.  
  2965. function o(e) {
  2966. if (n === setTimeout) return setTimeout(e, 0);
  2967. if ((n === r || !n) && setTimeout) return n = setTimeout, setTimeout(e, 0);
  2968. try {
  2969. return n(e, 0)
  2970. } catch (t) {
  2971. try {
  2972. return n.call(null, e, 0)
  2973. } catch (t) {
  2974. return n.call(this, e, 0)
  2975. }
  2976. }
  2977. }! function () {
  2978. try {
  2979. n = "function" == typeof setTimeout ? setTimeout : r
  2980. } catch (e) {
  2981. n = r
  2982. }
  2983. try {
  2984. i = "function" == typeof clearTimeout ? clearTimeout : a
  2985. } catch (e) {
  2986. i = a
  2987. }
  2988. }();
  2989. var l, c = [],
  2990. h = !1,
  2991. u = -1;
  2992.  
  2993. function d() {
  2994. h && l && (h = !1, l.length ? c = l.concat(c) : u = -1, c.length && f())
  2995. }
  2996.  
  2997. function f() {
  2998. if (!h) {
  2999. var e = o(d);
  3000. h = !0;
  3001. for (var t = c.length; t;) {
  3002. for (l = c, c = []; ++u < t;) l && l[u].run();
  3003. u = -1, t = c.length
  3004. }
  3005. l = null, h = !1,
  3006. function (e) {
  3007. if (i === clearTimeout) return clearTimeout(e);
  3008. if ((i === a || !i) && clearTimeout) return i = clearTimeout, clearTimeout(e);
  3009. try {
  3010. i(e)
  3011. } catch (t) {
  3012. try {
  3013. return i.call(null, e)
  3014. } catch (t) {
  3015. return i.call(this, e)
  3016. }
  3017. }
  3018. }(e)
  3019. }
  3020. }
  3021.  
  3022. function p(e, t) {
  3023. this.fun = e, this.array = t
  3024. }
  3025.  
  3026. function m() {}
  3027. s.nextTick = function (e) {
  3028. var t = new Array(arguments.length - 1);
  3029. if (arguments.length > 1)
  3030. for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
  3031. c.push(new p(e, t)), 1 !== c.length || h || o(f)
  3032. }, p.prototype.run = function () {
  3033. this.fun.apply(null, this.array)
  3034. }, s.title = "browser", s.browser = !0, s.env = {}, s.argv = [], s.version = "", s.versions = {}, s.on = m, s.addListener = m, s.once = m, s.off = m, s.removeListener = m, s.removeAllListeners = m, s.emit = m, s.prependListener = m, s.prependOnceListener = m, s.listeners = function (e) {
  3035. return []
  3036. }, s.binding = function (e) {
  3037. throw new Error("process.binding is not supported")
  3038. }, s.cwd = function () {
  3039. return "/"
  3040. }, s.chdir = function (e) {
  3041. throw new Error("process.chdir is not supported")
  3042. }, s.umask = function () {
  3043. return 0
  3044. }
  3045. },
  3046. "./node_modules/punycode/punycode.js":
  3047. /*!*******************************************!*\
  3048. !*** ./node_modules/punycode/punycode.js ***!
  3049. \*******************************************/
  3050. /*! no static exports found */
  3051. function (e, t, n) {
  3052. (function (e, i) {
  3053. var s; /*! https://mths.be/punycode v1.4.1 by @mathias */
  3054. ! function (r) {
  3055. t && t.nodeType, e && e.nodeType;
  3056. var a = "object" == typeof i && i;
  3057. a.global !== a && a.window !== a && a.self;
  3058. var o, l = 2147483647,
  3059. c = 36,
  3060. h = /^xn--/,
  3061. u = /[^\x20-\x7E]/,
  3062. d = /[\x2E\u3002\uFF0E\uFF61]/g,
  3063. f = {
  3064. overflow: "Overflow: input needs wider integers to process",
  3065. "not-basic": "Illegal input >= 0x80 (not a basic code point)",
  3066. "invalid-input": "Invalid input"
  3067. },
  3068. p = Math.floor,
  3069. m = String.fromCharCode;
  3070.  
  3071. function g(e) {
  3072. throw new RangeError(f[e])
  3073. }
  3074.  
  3075. function y(e, t) {
  3076. for (var n = e.length, i = []; n--;) i[n] = t(e[n]);
  3077. return i
  3078. }
  3079.  
  3080. function k(e, t) {
  3081. var n = e.split("@"),
  3082. i = "";
  3083. return n.length > 1 && (i = n[0] + "@", e = n[1]), i + y((e = e.replace(d, ".")).split("."), t).join(".")
  3084. }
  3085.  
  3086. function w(e) {
  3087. for (var t, n, i = [], s = 0, r = e.length; s < r;)(t = e.charCodeAt(s++)) >= 55296 && t <= 56319 && s < r ? 56320 == (64512 & (n = e.charCodeAt(s++))) ? i.push(((1023 & t) << 10) + (1023 & n) + 65536) : (i.push(t), s--) : i.push(t);
  3088. return i
  3089. }
  3090.  
  3091. function b(e) {
  3092. return y(e, (function (e) {
  3093. var t = "";
  3094. return e > 65535 && (t += m((e -= 65536) >>> 10 & 1023 | 55296), e = 56320 | 1023 & e), t += m(e)
  3095. })).join("")
  3096. }
  3097.  
  3098. function v(e, t) {
  3099. return e + 22 + 75 * (e < 26) - ((0 != t) << 5)
  3100. }
  3101.  
  3102. function x(e, t, n) {
  3103. var i = 0;
  3104. for (e = n ? p(e / 700) : e >> 1, e += p(e / t); e > 455; i += c) e = p(e / 35);
  3105. return p(i + 36 * e / (e + 38))
  3106. }
  3107.  
  3108. function S(e) {
  3109. var t, n, i, s, r, a, o, h, u, d, f, m = [],
  3110. y = e.length,
  3111. k = 0,
  3112. w = 128,
  3113. v = 72;
  3114. for ((n = e.lastIndexOf("-")) < 0 && (n = 0), i = 0; i < n; ++i) e.charCodeAt(i) >= 128 && g("not-basic"), m.push(e.charCodeAt(i));
  3115. for (s = n > 0 ? n + 1 : 0; s < y;) {
  3116. for (r = k, a = 1, o = c; s >= y && g("invalid-input"), ((h = (f = e.charCodeAt(s++)) - 48 < 10 ? f - 22 : f - 65 < 26 ? f - 65 : f - 97 < 26 ? f - 97 : c) >= c || h > p((l - k) / a)) && g("overflow"), k += h * a, !(h < (u = o <= v ? 1 : o >= v + 26 ? 26 : o - v)); o += c) a > p(l / (d = c - u)) && g("overflow"), a *= d;
  3117. v = x(k - r, t = m.length + 1, 0 == r), p(k / t) > l - w && g("overflow"), w += p(k / t), k %= t, m.splice(k++, 0, w)
  3118. }
  3119. return b(m)
  3120. }
  3121.  
  3122. function I(e) {
  3123. var t, n, i, s, r, a, o, h, u, d, f, y, k, b, S, I = [];
  3124. for (y = (e = w(e)).length, t = 128, n = 0, r = 72, a = 0; a < y; ++a)(f = e[a]) < 128 && I.push(m(f));
  3125. for (i = s = I.length, s && I.push("-"); i < y;) {
  3126. for (o = l, a = 0; a < y; ++a)(f = e[a]) >= t && f < o && (o = f);
  3127. for (o - t > p((l - n) / (k = i + 1)) && g("overflow"), n += (o - t) * k, t = o, a = 0; a < y; ++a)
  3128. if ((f = e[a]) < t && ++n > l && g("overflow"), f == t) {
  3129. for (h = n, u = c; !(h < (d = u <= r ? 1 : u >= r + 26 ? 26 : u - r)); u += c) S = h - d, b = c - d, I.push(m(v(d + S % b, 0))), h = p(S / b);
  3130. I.push(m(v(h, 0))), r = x(n, k, i == s), n = 0, ++i
  3131. }++ n, ++t
  3132. }
  3133. return I.join("")
  3134. }
  3135. o = {
  3136. version: "1.4.1",
  3137. ucs2: {
  3138. decode: w,
  3139. encode: b
  3140. },
  3141. decode: S,
  3142. encode: I,
  3143. toASCII: function (e) {
  3144. return k(e, (function (e) {
  3145. return u.test(e) ? "xn--" + I(e) : e
  3146. }))
  3147. },
  3148. toUnicode: function (e) {
  3149. return k(e, (function (e) {
  3150. return h.test(e) ? S(e.slice(4).toLowerCase()) : e
  3151. }))
  3152. }
  3153. }, void 0 === (s = function () {
  3154. return o
  3155. }.call(t, n, t, e)) || (e.exports = s)
  3156. }()
  3157. }).call(this, n( /*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(e), n( /*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))
  3158. },
  3159. "./node_modules/querystring-es3/decode.js":
  3160. /*!************************************************!*\
  3161. !*** ./node_modules/querystring-es3/decode.js ***!
  3162. \************************************************/
  3163. /*! no static exports found */
  3164. function (e, t, n) {
  3165. "use strict";
  3166.  
  3167. function i(e, t) {
  3168. return Object.prototype.hasOwnProperty.call(e, t)
  3169. }
  3170. e.exports = function (e, t, n, r) {
  3171. t = t || "&", n = n || "=";
  3172. var a = {};
  3173. if ("string" != typeof e || 0 === e.length) return a;
  3174. var o = /\+/g;
  3175. e = e.split(t);
  3176. var l = 1e3;
  3177. r && "number" == typeof r.maxKeys && (l = r.maxKeys);
  3178. var c = e.length;
  3179. l > 0 && c > l && (c = l);
  3180. for (var h = 0; h < c; ++h) {
  3181. var u, d, f, p, m = e[h].replace(o, "%20"),
  3182. g = m.indexOf(n);
  3183. g >= 0 ? (u = m.substr(0, g), d = m.substr(g + 1)) : (u = m, d = ""), f = decodeURIComponent(u), p = decodeURIComponent(d), i(a, f) ? s(a[f]) ? a[f].push(p) : a[f] = [a[f], p] : a[f] = p
  3184. }
  3185. return a
  3186. };
  3187. var s = Array.isArray || function (e) {
  3188. return "[object Array]" === Object.prototype.toString.call(e)
  3189. }
  3190. },
  3191. "./node_modules/querystring-es3/encode.js":
  3192. /*!************************************************!*\
  3193. !*** ./node_modules/querystring-es3/encode.js ***!
  3194. \************************************************/
  3195. /*! no static exports found */
  3196. function (e, t, n) {
  3197. "use strict";
  3198. var i = function (e) {
  3199. switch (typeof e) {
  3200. case "string":
  3201. return e;
  3202. case "boolean":
  3203. return e ? "true" : "false";
  3204. case "number":
  3205. return isFinite(e) ? e : "";
  3206. default:
  3207. return ""
  3208. }
  3209. };
  3210. e.exports = function (e, t, n, o) {
  3211. return t = t || "&", n = n || "=", null === e && (e = void 0), "object" == typeof e ? r(a(e), (function (a) {
  3212. var o = encodeURIComponent(i(a)) + n;
  3213. return s(e[a]) ? r(e[a], (function (e) {
  3214. return o + encodeURIComponent(i(e))
  3215. })).join(t) : o + encodeURIComponent(i(e[a]))
  3216. })).join(t) : o ? encodeURIComponent(i(o)) + n + encodeURIComponent(i(e)) : ""
  3217. };
  3218. var s = Array.isArray || function (e) {
  3219. return "[object Array]" === Object.prototype.toString.call(e)
  3220. };
  3221.  
  3222. function r(e, t) {
  3223. if (e.map) return e.map(t);
  3224. for (var n = [], i = 0; i < e.length; i++) n.push(t(e[i], i));
  3225. return n
  3226. }
  3227. var a = Object.keys || function (e) {
  3228. var t = [];
  3229. for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.push(n);
  3230. return t
  3231. }
  3232. },
  3233. "./node_modules/querystring-es3/index.js":
  3234. /*!***********************************************!*\
  3235. !*** ./node_modules/querystring-es3/index.js ***!
  3236. \***********************************************/
  3237. /*! no static exports found */
  3238. function (e, t, n) {
  3239. "use strict";
  3240. t.decode = t.parse = n( /*! ./decode */ "./node_modules/querystring-es3/decode.js"), t.encode = t.stringify = n( /*! ./encode */ "./node_modules/querystring-es3/encode.js")
  3241. },
  3242. "./node_modules/url/url.js":
  3243. /*!*********************************!*\
  3244. !*** ./node_modules/url/url.js ***!
  3245. \*********************************/
  3246. /*! no static exports found */
  3247. function (e, t, n) {
  3248. "use strict";
  3249. var i = n( /*! punycode */ "./node_modules/punycode/punycode.js"),
  3250. s = n( /*! ./util */ "./node_modules/url/util.js");
  3251.  
  3252. function r() {
  3253. this.protocol = null, this.slashes = null, this.auth = null, this.host = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.query = null, this.pathname = null, this.path = null, this.href = null
  3254. }
  3255. t.parse = w, t.resolve = function (e, t) {
  3256. return w(e, !1, !0).resolve(t)
  3257. }, t.resolveObject = function (e, t) {
  3258. return e ? w(e, !1, !0).resolveObject(t) : t
  3259. }, t.format = function (e) {
  3260. s.isString(e) && (e = w(e));
  3261. return e instanceof r ? e.format() : r.prototype.format.call(e)
  3262. }, t.Url = r;
  3263. var a = /^([a-z0-9.+-]+:)/i,
  3264. o = /:[0-9]*$/,
  3265. l = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
  3266. c = ["{", "}", "|", "\\", "^", "`"].concat(["<", ">", '"', "`", " ", "\r", "\n", "\t"]),
  3267. h = ["'"].concat(c),
  3268. u = ["%", "/", "?", ";", "#"].concat(h),
  3269. d = ["/", "?", "#"],
  3270. f = /^[+a-z0-9A-Z_-]{0,63}$/,
  3271. p = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
  3272. m = {
  3273. javascript: !0,
  3274. "javascript:": !0
  3275. },
  3276. g = {
  3277. javascript: !0,
  3278. "javascript:": !0
  3279. },
  3280. y = {
  3281. http: !0,
  3282. https: !0,
  3283. ftp: !0,
  3284. gopher: !0,
  3285. file: !0,
  3286. "http:": !0,
  3287. "https:": !0,
  3288. "ftp:": !0,
  3289. "gopher:": !0,
  3290. "file:": !0
  3291. },
  3292. k = n( /*! querystring */ "./node_modules/querystring-es3/index.js");
  3293.  
  3294. function w(e, t, n) {
  3295. if (e && s.isObject(e) && e instanceof r) return e;
  3296. var i = new r;
  3297. return i.parse(e, t, n), i
  3298. }
  3299. r.prototype.parse = function (e, t, n) {
  3300. if (!s.isString(e)) throw new TypeError("Parameter 'url' must be a string, not " + typeof e);
  3301. var r = e.indexOf("?"),
  3302. o = -1 !== r && r < e.indexOf("#") ? "?" : "#",
  3303. c = e.split(o);
  3304. c[0] = c[0].replace(/\\/g, "/");
  3305. var w = e = c.join(o);
  3306. if (w = w.trim(), !n && 1 === e.split("#").length) {
  3307. var b = l.exec(w);
  3308. if (b) return this.path = w, this.href = w, this.pathname = b[1], b[2] ? (this.search = b[2], this.query = t ? k.parse(this.search.substr(1)) : this.search.substr(1)) : t && (this.search = "", this.query = {}), this
  3309. }
  3310. var v = a.exec(w);
  3311. if (v) {
  3312. var x = (v = v[0]).toLowerCase();
  3313. this.protocol = x, w = w.substr(v.length)
  3314. }
  3315. if (n || v || w.match(/^\/\/[^@\/]+@[^@\/]+/)) {
  3316. var S = "//" === w.substr(0, 2);
  3317. !S || v && g[v] || (w = w.substr(2), this.slashes = !0)
  3318. }
  3319. if (!g[v] && (S || v && !y[v])) {
  3320. for (var I, T, M = -1, j = 0; j < d.length; j++) {
  3321. -1 !== (E = w.indexOf(d[j])) && (-1 === M || E < M) && (M = E)
  3322. } - 1 !== (T = -1 === M ? w.lastIndexOf("@") : w.lastIndexOf("@", M)) && (I = w.slice(0, T), w = w.slice(T + 1), this.auth = decodeURIComponent(I)), M = -1;
  3323. for (j = 0; j < u.length; j++) {
  3324. var E; - 1 !== (E = w.indexOf(u[j])) && (-1 === M || E < M) && (M = E)
  3325. } - 1 === M && (M = w.length), this.host = w.slice(0, M), w = w.slice(M), this.parseHost(), this.hostname = this.hostname || "";
  3326. var P = "[" === this.hostname[0] && "]" === this.hostname[this.hostname.length - 1];
  3327. if (!P)
  3328. for (var C = this.hostname.split(/\./), A = (j = 0, C.length); j < A; j++) {
  3329. var B = C[j];
  3330. if (B && !B.match(f)) {
  3331. for (var _ = "", R = 0, O = B.length; R < O; R++) B.charCodeAt(R) > 127 ? _ += "x" : _ += B[R];
  3332. if (!_.match(f)) {
  3333. var D = C.slice(0, j),
  3334. U = C.slice(j + 1),
  3335. L = B.match(p);
  3336. L && (D.push(L[1]), U.unshift(L[2])), U.length && (w = "/" + U.join(".") + w), this.hostname = D.join(".");
  3337. break
  3338. }
  3339. }
  3340. }
  3341. this.hostname.length > 255 ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), P || (this.hostname = i.toASCII(this.hostname));
  3342. var F = this.port ? ":" + this.port : "",
  3343. Y = this.hostname || "";
  3344. this.host = Y + F, this.href += this.host, P && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), "/" !== w[0] && (w = "/" + w))
  3345. }
  3346. if (!m[x])
  3347. for (j = 0, A = h.length; j < A; j++) {
  3348. var z = h[j];
  3349. if (-1 !== w.indexOf(z)) {
  3350. var H = encodeURIComponent(z);
  3351. H === z && (H = escape(z)), w = w.split(z).join(H)
  3352. }
  3353. }
  3354. var W = w.indexOf("#"); - 1 !== W && (this.hash = w.substr(W), w = w.slice(0, W));
  3355. var q = w.indexOf("?");
  3356. if (-1 !== q ? (this.search = w.substr(q), this.query = w.substr(q + 1), t && (this.query = k.parse(this.query)), w = w.slice(0, q)) : t && (this.search = "", this.query = {}), w && (this.pathname = w), y[x] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
  3357. F = this.pathname || "";
  3358. var V = this.search || "";
  3359. this.path = F + V
  3360. }
  3361. return this.href = this.format(), this
  3362. }, r.prototype.format = function () {
  3363. var e = this.auth || "";
  3364. e && (e = (e = encodeURIComponent(e)).replace(/%3A/i, ":"), e += "@");
  3365. var t = this.protocol || "",
  3366. n = this.pathname || "",
  3367. i = this.hash || "",
  3368. r = !1,
  3369. a = "";
  3370. this.host ? r = e + this.host : this.hostname && (r = e + (-1 === this.hostname.indexOf(":") ? this.hostname : "[" + this.hostname + "]"), this.port && (r += ":" + this.port)), this.query && s.isObject(this.query) && Object.keys(this.query).length && (a = k.stringify(this.query));
  3371. var o = this.search || a && "?" + a || "";
  3372. return t && ":" !== t.substr(-1) && (t += ":"), this.slashes || (!t || y[t]) && !1 !== r ? (r = "//" + (r || ""), n && "/" !== n.charAt(0) && (n = "/" + n)) : r || (r = ""), i && "#" !== i.charAt(0) && (i = "#" + i), o && "?" !== o.charAt(0) && (o = "?" + o), t + r + (n = n.replace(/[?#]/g, (function (e) {
  3373. return encodeURIComponent(e)
  3374. }))) + (o = o.replace("#", "%23")) + i
  3375. }, r.prototype.resolve = function (e) {
  3376. return this.resolveObject(w(e, !1, !0)).format()
  3377. }, r.prototype.resolveObject = function (e) {
  3378. if (s.isString(e)) {
  3379. var t = new r;
  3380. t.parse(e, !1, !0), e = t
  3381. }
  3382. for (var n = new r, i = Object.keys(this), a = 0; a < i.length; a++) {
  3383. var o = i[a];
  3384. n[o] = this[o]
  3385. }
  3386. if (n.hash = e.hash, "" === e.href) return n.href = n.format(), n;
  3387. if (e.slashes && !e.protocol) {
  3388. for (var l = Object.keys(e), c = 0; c < l.length; c++) {
  3389. var h = l[c];
  3390. "protocol" !== h && (n[h] = e[h])
  3391. }
  3392. return y[n.protocol] && n.hostname && !n.pathname && (n.path = n.pathname = "/"), n.href = n.format(), n
  3393. }
  3394. if (e.protocol && e.protocol !== n.protocol) {
  3395. if (!y[e.protocol]) {
  3396. for (var u = Object.keys(e), d = 0; d < u.length; d++) {
  3397. var f = u[d];
  3398. n[f] = e[f]
  3399. }
  3400. return n.href = n.format(), n
  3401. }
  3402. if (n.protocol = e.protocol, e.host || g[e.protocol]) n.pathname = e.pathname;
  3403. else {
  3404. for (var p = (e.pathname || "").split("/"); p.length && !(e.host = p.shift()););
  3405. e.host || (e.host = ""), e.hostname || (e.hostname = ""), "" !== p[0] && p.unshift(""), p.length < 2 && p.unshift(""), n.pathname = p.join("/")
  3406. }
  3407. if (n.search = e.search, n.query = e.query, n.host = e.host || "", n.auth = e.auth, n.hostname = e.hostname || e.host, n.port = e.port, n.pathname || n.search) {
  3408. var m = n.pathname || "",
  3409. k = n.search || "";
  3410. n.path = m + k
  3411. }
  3412. return n.slashes = n.slashes || e.slashes, n.href = n.format(), n
  3413. }
  3414. var w = n.pathname && "/" === n.pathname.charAt(0),
  3415. b = e.host || e.pathname && "/" === e.pathname.charAt(0),
  3416. v = b || w || n.host && e.pathname,
  3417. x = v,
  3418. S = n.pathname && n.pathname.split("/") || [],
  3419. I = (p = e.pathname && e.pathname.split("/") || [], n.protocol && !y[n.protocol]);
  3420. if (I && (n.hostname = "", n.port = null, n.host && ("" === S[0] ? S[0] = n.host : S.unshift(n.host)), n.host = "", e.protocol && (e.hostname = null, e.port = null, e.host && ("" === p[0] ? p[0] = e.host : p.unshift(e.host)), e.host = null), v = v && ("" === p[0] || "" === S[0])), b) n.host = e.host || "" === e.host ? e.host : n.host, n.hostname = e.hostname || "" === e.hostname ? e.hostname : n.hostname, n.search = e.search, n.query = e.query, S = p;
  3421. else if (p.length) S || (S = []), S.pop(), S = S.concat(p), n.search = e.search, n.query = e.query;
  3422. else if (!s.isNullOrUndefined(e.search)) {
  3423. if (I) n.hostname = n.host = S.shift(), (P = !!(n.host && n.host.indexOf("@") > 0) && n.host.split("@")) && (n.auth = P.shift(), n.host = n.hostname = P.shift());
  3424. return n.search = e.search, n.query = e.query, s.isNull(n.pathname) && s.isNull(n.search) || (n.path = (n.pathname ? n.pathname : "") + (n.search ? n.search : "")), n.href = n.format(), n
  3425. }
  3426. if (!S.length) return n.pathname = null, n.search ? n.path = "/" + n.search : n.path = null, n.href = n.format(), n;
  3427. for (var T = S.slice(-1)[0], M = (n.host || e.host || S.length > 1) && ("." === T || ".." === T) || "" === T, j = 0, E = S.length; E >= 0; E--) "." === (T = S[E]) ? S.splice(E, 1) : ".." === T ? (S.splice(E, 1), j++) : j && (S.splice(E, 1), j--);
  3428. if (!v && !x)
  3429. for (; j--; j) S.unshift("..");
  3430. !v || "" === S[0] || S[0] && "/" === S[0].charAt(0) || S.unshift(""), M && "/" !== S.join("/").substr(-1) && S.push("");
  3431. var P, C = "" === S[0] || S[0] && "/" === S[0].charAt(0);
  3432. I && (n.hostname = n.host = C ? "" : S.length ? S.shift() : "", (P = !!(n.host && n.host.indexOf("@") > 0) && n.host.split("@")) && (n.auth = P.shift(), n.host = n.hostname = P.shift()));
  3433. return (v = v || n.host && S.length) && !C && S.unshift(""), S.length ? n.pathname = S.join("/") : (n.pathname = null, n.path = null), s.isNull(n.pathname) && s.isNull(n.search) || (n.path = (n.pathname ? n.pathname : "") + (n.search ? n.search : "")), n.auth = e.auth || n.auth, n.slashes = n.slashes || e.slashes, n.href = n.format(), n
  3434. }, r.prototype.parseHost = function () {
  3435. var e = this.host,
  3436. t = o.exec(e);
  3437. t && (":" !== (t = t[0]) && (this.port = t.substr(1)), e = e.substr(0, e.length - t.length)), e && (this.hostname = e)
  3438. }
  3439. },
  3440. "./node_modules/url/util.js":
  3441. /*!**********************************!*\
  3442. !*** ./node_modules/url/util.js ***!
  3443. \**********************************/
  3444. /*! no static exports found */
  3445. function (e, t, n) {
  3446. "use strict";
  3447. e.exports = {
  3448. isString: function (e) {
  3449. return "string" == typeof e
  3450. },
  3451. isObject: function (e) {
  3452. return "object" == typeof e && null !== e
  3453. },
  3454. isNull: function (e) {
  3455. return null === e
  3456. },
  3457. isNullOrUndefined: function (e) {
  3458. return null == e
  3459. }
  3460. }
  3461. },
  3462. "./node_modules/webpack/buildin/global.js":
  3463. /*!***********************************!*\
  3464. !*** (webpack)/buildin/global.js ***!
  3465. \***********************************/
  3466. /*! no static exports found */
  3467. function (e, t) {
  3468. var n;
  3469. n = function () {
  3470. return this
  3471. }();
  3472. try {
  3473. n = n || new Function("return this")()
  3474. } catch (e) {
  3475. "object" == typeof window && (n = window)
  3476. }
  3477. e.exports = n
  3478. },
  3479. "./node_modules/webpack/buildin/module.js":
  3480. /*!***********************************!*\
  3481. !*** (webpack)/buildin/module.js ***!
  3482. \***********************************/
  3483. /*! no static exports found */
  3484. function (e, t) {
  3485. e.exports = function (e) {
  3486. return e.webpackPolyfill || (e.deprecate = function () {}, e.paths = [], e.children || (e.children = []), Object.defineProperty(e, "loaded", {
  3487. enumerable: !0,
  3488. get: function () {
  3489. return e.l
  3490. }
  3491. }), Object.defineProperty(e, "id", {
  3492. enumerable: !0,
  3493. get: function () {
  3494. return e.i
  3495. }
  3496. }), e.webpackPolyfill = 1), e
  3497. }
  3498. },
  3499. "./src/js/app.js":
  3500. /*!***********************!*\
  3501. !*** ./src/js/app.js ***!
  3502. \***********************/
  3503. /*! no static exports found */
  3504. function (e, t, n) {
  3505. "use strict";
  3506. window.loadedScript = !0;
  3507. var i = "127.0.0.1" !== location.hostname && !location.hostname.startsWith("192.168.");
  3508. n( /*! ./libs/modernizr.js */ "./src/js/libs/modernizr.js");
  3509. var s = n( /*! ./libs/io-client.js */ "./src/js/libs/io-client.js"),
  3510. r = n( /*! ./libs/utils.js */ "./src/js/libs/utils.js"),
  3511. a = n( /*! ./libs/animText.js */ "./src/js/libs/animText.js"),
  3512. o = n( /*! ./config.js */ "./src/js/config.js"),
  3513. l = n( /*! ./data/gameObject.js */ "./src/js/data/gameObject.js"),
  3514. c = n( /*! ./data/items.js */ "./src/js/data/items.js"),
  3515. h = (n( /*! ./data/mapManager.js */ "./src/js/data/mapManager.js"), n( /*! ./data/objectManager.js */ "./src/js/data/objectManager.js")),
  3516. u = n( /*! ./data/player.js */ "./src/js/data/player.js"),
  3517. d = n( /*! ./data/store.js */ "./src/js/data/store.js"),
  3518. f = n( /*! ./data/projectile.js */ "./src/js/data/projectile.js"),
  3519. p = n( /*! ./data/projectileManager.js */ "./src/js/data/projectileManager.js"),
  3520. m = n( /*! ./libs/soundManager.js */ "./src/js/libs/soundManager.js").obj,
  3521. g = new a.TextManager,
  3522. y = new(n( /*! ../../vultr/VultrClient.js */ "./vultr/VultrClient.js"))("moomoo.io", 3e3, o.maxPlayers, 5, !1);
  3523. y.debugLog = !1;
  3524. var k = !1;
  3525.  
  3526. function w() {
  3527. ut && dt && (k = !0, i ? window.grecaptcha.execute("6LevKusUAAAAAAFknhlV8sPtXAk5Z5dGP5T2FYIZ", {
  3528. action: "homepage"
  3529. }).then((function (e) {
  3530. b(e)
  3531. })) : b(null))
  3532. }
  3533.  
  3534. function b(e) {
  3535. y.start((function (t, n, a) {
  3536. var l = (i ? "wss" : "ws") + "://" + t + ":8008/?gameIndex=" + a;
  3537. e && (l += "&token=" + encodeURIComponent(e)), s.connect(l, (function (e) {
  3538. ir(), setInterval((() => ir()), 2500), e ? ft(e) : (!0, function () {
  3539. if (function () {
  3540. ue.onclick = r.checkTrusted((function () {
  3541. var e, t;
  3542. e = ++wt > 1, t = Date.now() - kt > yt, e && t ? (kt = Date.now(), bt()) : Hn()
  3543. })), r.hookTouchEvents(ue), de.onclick = r.checkTrusted((function () {
  3544. or("https://krunker.io/?play=SquidGame_KB")
  3545. })), r.hookTouchEvents(de), pe.onclick = r.checkTrusted((function () {
  3546. setTimeout((function () {
  3547. var e, t;
  3548. e = xe.value, (t = prompt("party key", e)) && (window.onbeforeunload = void 0, window.location.href = "/?server=" + t)
  3549. }), 10)
  3550. })), r.hookTouchEvents(pe), me.onclick = r.checkTrusted((function () {
  3551. Ee.classList.contains("showing") ? (Ee.classList.remove("showing"), ge.innerText = "Settings") : (Ee.classList.add("showing"), ge.innerText = "Close")
  3552. })), r.hookTouchEvents(me), ye.onclick = r.checkTrusted((function () {
  3553. Cn(), "block" != qe.style.display ? _t() : qe.style.display = "none"
  3554. })), r.hookTouchEvents(ye), ke.onclick = r.checkTrusted((function () {
  3555. "block" != Ke.style.display ? (Ke.style.display = "block", qe.style.display = "none", cn(), Gt()) : Ke.style.display = "none"
  3556. })), r.hookTouchEvents(ke), we.onclick = r.checkTrusted((function () {
  3557. an()
  3558. })), r.hookTouchEvents(we), Xe.onclick = r.checkTrusted((function () {
  3559. Fn()
  3560. })), r.hookTouchEvents(Xe)
  3561. }(), function () {
  3562. for (var e = 0; e < ei.length; ++e) {
  3563. var t = new Image;
  3564. t.onload = function () {
  3565. this.isLoaded = !0
  3566. }, t.src = "cross" == ei[e] ? "https://cdn.discordapp.com/attachments/1001384433078779927/1041105230374391878/crorrrrrrrrrshairlololol.png" : ".././img/icons/" + ei[e] + ".png", Zn[ei[e]] = t
  3567. }
  3568. }(), Pe.style.display = "none", je.style.display = "block", As) M("moo_name");
  3569. else {
  3570. let e = ["w", "a", "s", "d"];
  3571. for (let t = 0; t < 8; t++) rr.push(e[Math.floor(Math.random() * e.length)]);
  3572. Le.value = rr.join("")
  3573. }! function () {
  3574. var e = M("native_resolution");
  3575. en(e ? "true" == e : "undefined" != typeof cordova);
  3576. E = "true" == M("show_ping"), Te.hidden = !E, M("moo_moosic") || 0, setInterval((function () {
  3577. window.cordova && (document.getElementById("downloadButtonContainer").classList.add("cordova"), document.getElementById("mobileDownloadButtonContainer").classList.add("cordova"))
  3578. }), 1e3), tn(), r.removeAllChildren(Ae);
  3579. for (var t = 0; t < c.weapons.length + c.list.length; ++t) ! function (e) {
  3580. r.generateElement({
  3581. id: "actionBarItem" + e,
  3582. class: "actionBarItem",
  3583. style: "display:none",
  3584. onmouseout: function () {
  3585. vt()
  3586. },
  3587. parent: Ae
  3588. })
  3589. }(t);
  3590. for (t = 0; t < c.list.length + c.weapons.length; ++t) ! function (e) {
  3591. var t = document.createElement("canvas");
  3592. t.width = t.height = 66;
  3593. var n = t.getContext("2d");
  3594. if (n.translate(t.width / 2, t.height / 2), n.imageSmoothingEnabled = !1, n.webkitImageSmoothingEnabled = !1, n.mozImageSmoothingEnabled = !1, c.weapons[e]) {
  3595. n.rotate(Math.PI / 4 + Math.PI);
  3596. var i = new Image;
  3597. vi[c.weapons[e].src] = i, i.onload = function () {
  3598. this.isLoaded = !0;
  3599. var i = 1 / (this.height / this.width),
  3600. s = c.weapons[e].iPad || 1;
  3601. n.drawImage(this, -t.width * s * o.iconPad * i / 2, -t.height * s * o.iconPad / 2, t.width * s * i * o.iconPad, t.height * s * o.iconPad), n.fillStyle = "rgba(0, 0, 70, 0.1)", n.globalCompositeOperation = "source-atop", n.fillRect(-t.width / 2, -t.height / 2, t.width, t.height), document.getElementById("actionBarItem" + e).style.backgroundImage = "url(" + t.toDataURL() + ")"
  3602. }, i.src = ".././img/weapons/" + c.weapons[e].src + ".png", (s = document.getElementById("actionBarItem" + e)).onmouseover = r.checkTrusted((function () {
  3603. vt(c.weapons[e], !0)
  3604. })), s.onclick = r.checkTrusted((function () {
  3605. zn(e, !0)
  3606. })), r.hookTouchEvents(s)
  3607. } else {
  3608. i = Mi(c.list[e - c.weapons.length], !0);
  3609. var s, a = Math.min(t.width - o.iconPadding, i.width);
  3610. n.globalAlpha = 1, n.drawImage(i, -a / 2, -a / 2, a, a), n.fillStyle = "rgba(0, 0, 70, 0.1)", n.globalCompositeOperation = "source-atop", n.fillRect(-a / 2, -a / 2, a, a), document.getElementById("actionBarItem" + e).style.backgroundImage = "url(" + t.toDataURL() + ")", (s = document.getElementById("actionBarItem" + e)).onmouseover = r.checkTrusted((function () {
  3611. vt(c.list[e - c.weapons.length])
  3612. })), s.onclick = r.checkTrusted((function () {
  3613. zn(e - c.weapons.length)
  3614. })), r.hookTouchEvents(s)
  3615. }
  3616. }(t);
  3617. Le.ontouchstart = r.checkTrusted((function (e) {
  3618. e.preventDefault();
  3619. var t = prompt("enter name", e.currentTarget.value);
  3620. e.currentTarget.value = t.slice(0, 15)
  3621. })), Se.checked = j, Se.onchange = r.checkTrusted((function (e) {
  3622. en(e.target.checked)
  3623. })), Ie.checked = E, Ie.onchange = r.checkTrusted((function (e) {
  3624. E = Ie.checked, Te.hidden = !E, T("show_ping", E ? "true" : "false")
  3625. })), ohio.play()
  3626. }()
  3627. }())
  3628. }), {
  3629. id: at,
  3630. d: ft,
  3631. 1: qn,
  3632. 2: _s,
  3633. 4: Us,
  3634. 33: Ns,
  3635. 5: si,
  3636. 6: Di,
  3637. a: Vi,
  3638. aa: qi,
  3639. 7: di,
  3640. 8: Ui,
  3641. sp: Li,
  3642. 9: Fs,
  3643. h: Hs,
  3644. 11: Xn,
  3645. 12: Kn,
  3646. 13: Gn,
  3647. 14: Ls,
  3648. 15: ii,
  3649. 16: ni,
  3650. 17: Zt,
  3651. 18: Fi,
  3652. 19: Wi,
  3653. 20: sr,
  3654. ac: Pt,
  3655. ad: Bt,
  3656. an: jt,
  3657. st: Ct,
  3658. sa: At,
  3659. us: Xt,
  3660. ch: yn,
  3661. mm: Vt,
  3662. t: Vn,
  3663. p: qt,
  3664. pp: nr
  3665. }), mt(), setTimeout((() => gt()), 3e3)
  3666. }), (function (e) {
  3667. console.error("Vultr error:", e), alert("Error:\n" + e), ft("disconnected")
  3668. }))
  3669. }
  3670. var v = new m(o, r);
  3671. var x, S = Math.PI,
  3672. I = 2 * S;
  3673.  
  3674. function T(e, t) {
  3675. x && localStorage.setItem(e, t)
  3676. }
  3677.  
  3678. function M(e) {
  3679. return x ? localStorage.getItem(e) : null
  3680. }
  3681. Math.lerpAngle = function (e, t, n) {
  3682. Math.abs(t - e) > S && (e > t ? t += I : e += I);
  3683. var i = t + (e - t) * n;
  3684. return i >= 0 && i <= I ? i : i % I
  3685. }, CanvasRenderingContext2D.prototype.roundRect = function (e, t, n, i, s) {
  3686. return n < 2 * s && (s = n / 2), i < 2 * s && (s = i / 2), s < 0 && (s = 0), this.beginPath(), this.moveTo(e + s, t), this.arcTo(e + n, t, e + n, t + i, s), this.arcTo(e + n, t + i, e, t + i, s), this.arcTo(e, t + i, e, t, s), this.arcTo(e, t, e + n, t, s), this.closePath(), this
  3687. }, "undefined" != typeof Storage && (x = !0);
  3688. var j, E, P = !0;
  3689. var C, A, B, _, R, O, D, U, L, F, Y, z, H = 1,
  3690. W = Date.now(),
  3691. q = [],
  3692. V = [],
  3693. N = [],
  3694. X = [],
  3695. G = [],
  3696. J = new p(f, G, V, q, nt, c, o, r),
  3697. K = n( /*! ./data/aiManager.js */ "./src/js/data/aiManager.js"),
  3698. Q = n( /*! ./data/ai.js */ "./src/js/data/ai.js"),
  3699. Z = new K(q, Q, V, c, null, o, r),
  3700. ee = 1,
  3701. te = 0,
  3702. ne = 0,
  3703. ie = 0,
  3704. se = {
  3705. id: -1,
  3706. startX: 0,
  3707. startY: 0,
  3708. currentX: 0,
  3709. currentY: 0
  3710. },
  3711. re = {
  3712. id: -1,
  3713. startX: 0,
  3714. startY: 0,
  3715. currentX: 0,
  3716. currentY: 0
  3717. },
  3718. ae = 0,
  3719. oe = o.maxScreenWidth,
  3720. le = o.maxScreenHeight,
  3721. ce = !1,
  3722. he = (document.getElementById("ad-container"), document.getElementById("mainMenu")),
  3723. ue = document.getElementById("enterGame"),
  3724. de = document.getElementById("promoImg"),
  3725. fe = document.getElementById("partyButton"),
  3726. pe = document.getElementById("joinPartyButton"),
  3727. me = document.getElementById("settingsButton"),
  3728. ge = me.getElementsByTagName("span")[0],
  3729. ye = document.getElementById("allianceButton"),
  3730. ke = document.getElementById("storeButton"),
  3731. we = document.getElementById("chatButton"),
  3732. be = document.getElementById("gameCanvas"),
  3733. ve = be.getContext("2d"),
  3734. xe = document.getElementById("serverBrowser"),
  3735. Se = document.getElementById("nativeResolution"),
  3736. Ie = document.getElementById("showPing"),
  3737. Te = (document.getElementById("playMusic"), document.getElementById("pingDisplay")),
  3738. Me = document.getElementById("shutdownDisplay"),
  3739. je = document.getElementById("menuCardHolder"),
  3740. Ee = document.getElementById("guideCard"),
  3741. Pe = document.getElementById("loadingText"),
  3742. Ce = document.getElementById("gameUI"),
  3743. Ae = document.getElementById("actionBar"),
  3744. Be = document.getElementById("scoreDisplay"),
  3745. _e = document.getElementById("foodDisplay"),
  3746. Re = document.getElementById("woodDisplay"),
  3747. Oe = document.getElementById("stoneDisplay"),
  3748. De = document.getElementById("killCounter"),
  3749. Ue = document.getElementById("leaderboardData"),
  3750. Le = document.getElementById("nameInput"),
  3751. Fe = document.getElementById("itemInfoHolder"),
  3752. Ye = document.getElementById("ageText"),
  3753. ze = document.getElementById("ageBarBody"),
  3754. He = document.getElementById("upgradeHolder"),
  3755. We = document.getElementById("upgradeCounter"),
  3756. qe = document.getElementById("allianceMenu"),
  3757. Ve = document.getElementById("allianceHolder"),
  3758. Ne = document.getElementById("allianceManager"),
  3759. Xe = document.getElementById("mapDisplay"),
  3760. Ge = document.getElementById("diedText"),
  3761. Je = document.getElementById("skinColorHolder"),
  3762. $e = Xe.getContext("2d");
  3763. Xe.width = 300, Xe.height = 300;
  3764. var Ke = document.getElementById("storeMenu"),
  3765. Qe = document.getElementById("storeHolder"),
  3766. Ze = document.getElementById("noticationDisplay"),
  3767. et = d.hats,
  3768. tt = d.accessories,
  3769. nt = new h(l, X, r, o),
  3770. it = "#525252",
  3771. st = "#3d3f42",
  3772. rt = 5.5;
  3773.  
  3774. function at(e) {
  3775. N = e.teams
  3776. }
  3777. var ot = document.getElementById("featuredYoutube"),
  3778. lt = [{
  3779. name: "Corrupt X",
  3780. link: "https://www.youtube.com/channel/UC0UH2LfQvBSeH24bmtbmITw"
  3781. }, {
  3782. name: "Tweak Big",
  3783. link: "https://www.youtube.com/channel/UCbwvzJ38AndDTkoX8sD9YOw"
  3784. }, {
  3785. name: "Arena Closer",
  3786. link: "https://www.youtube.com/channel/UCazucVSJqW-kiHMIhQhD-QQ"
  3787. }, {
  3788. name: "Godenot",
  3789. link: "https://www.youtube.com/user/SirGodenot"
  3790. }, {
  3791. name: "RajNoobTV",
  3792. link: "https://www.youtube.com/channel/UCVLo9brXBWrCttMaGzvm0-Q"
  3793. }, {
  3794. name: "TomNotTom",
  3795. link: "https://www.youtube.com/channel/UC7z97RgHFJRcv2niXgArBDw"
  3796. }, {
  3797. name: "Nation",
  3798. link: "https://www.youtube.com/channel/UCSl-MBn3qzjrIvLNESQRk-g"
  3799. }, {
  3800. name: "Pidyohago",
  3801. link: "https://www.youtube.com/channel/UC04p8Mg8nDaDx04A9is2B8Q"
  3802. }, {
  3803. name: "Enigma",
  3804. link: "https://www.youtube.com/channel/UC5HhLbs3sReHo8Bb9NDdFrg"
  3805. }, {
  3806. name: "Bauer",
  3807. link: "https://www.youtube.com/channel/UCwU2TbJx3xTSlPqg-Ix3R1g"
  3808. }, {
  3809. name: "iStealth",
  3810. link: "https://www.youtube.com/channel/UCGrvlEOsQFViZbyFDE6t69A"
  3811. }, {
  3812. name: "SICKmania",
  3813. link: "https://www.youtube.com/channel/UCvVI98ezn4TpX5wDMZjMa3g"
  3814. }, {
  3815. name: "LightThief",
  3816. link: "https://www.youtube.com/channel/UCj6C_tiDeATiKd3GX127XoQ"
  3817. }, {
  3818. name: "Fortish",
  3819. link: "https://www.youtube.com/channel/UCou6CLU-szZA3Tb340TB9_Q"
  3820. }, {
  3821. name: "巧克力",
  3822. link: "https://www.youtube.com/channel/UCgL6J6oL8F69vm-GcPScmwg"
  3823. }, {
  3824. name: "i Febag",
  3825. link: "https://www.youtube.com/channel/UCiU6WZwiKbsnt5xmwr0OFbg"
  3826. }, {
  3827. name: "GoneGaming",
  3828. link: "https://www.youtube.com/channel/UCOcQthRanYcwYY0XVyVeK0g"
  3829. }],
  3830. ct = lt[r.randInt(0, lt.length - 1)];
  3831. ot.innerHTML = "<a target='_blank' class='ytLink' href='" + ct.link + "'><i class='material-icons' style='vertical-align: top;'>&#xE064;</i> " + ct.name + "</a>";
  3832. var ht = !0,
  3833. ut = !1,
  3834. dt = !1;
  3835.  
  3836. function ft(e) {
  3837. !1, s.close(), pt(e)
  3838. }
  3839.  
  3840. function pt(e) {
  3841. he.style.display = "block", Ce.style.display = "none", je.style.display = "none", Ge.style.display = "none", Pe.style.display = "block", Pe.innerHTML = e + "<a href='javascript:window.location.href=window.location.href' class='ytLink'>reload</a>"
  3842. }
  3843. window.onblur = function () {
  3844. ht = !1
  3845. }, window.onfocus = function () {
  3846. ht = !0, R && R.alive && Cn()
  3847. }, window.onload = function () {
  3848. ut = !0, w(), setTimeout((function () {
  3849. k || window.location.reload()
  3850. }), 2e4)
  3851. }, window.captchaCallback = function () {
  3852. dt = !0, w()
  3853. }, be.oncontextmenu = function () {
  3854. return !1
  3855. };
  3856.  
  3857. function mt() {
  3858. var e, t, n = "",
  3859. i = 0;
  3860. for (var s in y.servers) {
  3861. for (var r = y.servers[s], a = 0, l = 0; l < r.length; l++)
  3862. for (var c = 0; c < r[l].games.length; c++) a += r[l].games[c].playerCount;
  3863. i += a;
  3864. var h = y.regionInfo[s].name;
  3865. n += "<option disabled>" + h + " - " + a + " players</option>";
  3866. for (var u = 0; u < r.length; u++)
  3867. for (var d = r[u], f = 0; f < d.games.length; f++) {
  3868. var p = d.games[f],
  3869. m = 1 * d.index + f + 1,
  3870. g = y.server && y.server.region === d.region && y.server.index === d.index && y.gameIndex == f,
  3871. k = h + " " + m + " [" + Math.min(p.playerCount, o.maxPlayers) + "/" + o.maxPlayers + "]";
  3872. let e = y.stripRegion(s) + ":" + u + ":" + f;
  3873. g && (fe.getElementsByTagName("span")[0].innerText = e), n += "<option value='" + e + "' " + (g ? "selected" : "") + ">" + k + "</option>"
  3874. }
  3875. n += "<option disabled></option>"
  3876. }
  3877. n += "<option disabled>All Servers - " + i + " players</option>", xe.innerHTML = n, "sandbox.moomoo.io" == location.hostname ? (e = "this old game >:(", t = "//moomoo.io/") : (e = "Try the sandbox", t = "//sandbox.moomoo.io/"), document.getElementById("altServer").innerHTML = "<a href='" + t + "'>" + e + "<i class='material-icons' style='font-size:10px;vertical-align:middle'>arrow_forward_ios</i></a>"
  3878. }
  3879.  
  3880. function gt() {
  3881. var e = new XMLHttpRequest;
  3882. e.onreadystatechange = function () {
  3883. 4 == this.readyState && (200 == this.status ? (window.vultr = JSON.parse(this.responseText), y.processServers(vultr.servers), mt()) : console.error("Failed to load server data with status code:", this.status))
  3884. }, e.open("GET", "/serverData", !0), e.send()
  3885. }
  3886. xe.addEventListener("change", r.checkTrusted((function () {
  3887. let e = xe.value.split(":");
  3888. y.switchServer(e[0], e[1], e[2])
  3889. })));
  3890. document.getElementById("pre-content-container");
  3891. var yt = 3e5,
  3892. kt = 0,
  3893. wt = 0;
  3894.  
  3895. function bt() {
  3896. if (!window.adsbygoogle) return console.log("Failed to load video ad API");
  3897. window.adsbygoogle.push({
  3898. type: "next",
  3899. adBreakDone: () => {
  3900. Hn()
  3901. }
  3902. })
  3903. }
  3904.  
  3905. function vt(e, t, n) {
  3906. if (R && e)
  3907. if (r.removeAllChildren(Fe), Fe.classList.add("visible"), r.generateElement({
  3908. id: "itemInfoName",
  3909. text: r.capitalizeFirst(e.name),
  3910. parent: Fe
  3911. }), r.generateElement({
  3912. id: "itemInfoDesc",
  3913. text: e.desc,
  3914. parent: Fe
  3915. }), n);
  3916. else if (t) r.generateElement({
  3917. class: "itemInfoReq",
  3918. text: e.type ? "secondary" : "primary",
  3919. parent: Fe
  3920. });
  3921. else {
  3922. for (var i = 0; i < e.req.length; i += 2) r.generateElement({
  3923. class: "itemInfoReq",
  3924. html: e.req[i] + "<span class='itemInfoReqVal'> x" + e.req[i + 1] + "</span>",
  3925. parent: Fe
  3926. });
  3927. e.group.limit && r.generateElement({
  3928. class: "itemInfoLmt",
  3929. text: (R.itemCounts[e.group.id] || 0) + "/" + e.group.limit,
  3930. parent: Fe
  3931. })
  3932. } else Fe.classList.remove("visible")
  3933. }
  3934. window.adsbygoogle && adsbygoogle.push({
  3935. preloadAdBreaks: "on"
  3936. }), window.showPreAd = bt;
  3937. var xt, St, It, Tt = [],
  3938. Mt = [];
  3939.  
  3940. function jt(e, t) {
  3941. Tt.push({
  3942. sid: e,
  3943. name: t
  3944. }), Et()
  3945. }
  3946.  
  3947. function Et() {
  3948. if (Tt[0]) {
  3949. var e = Tt[0];
  3950. r.removeAllChildren(Ze), Ze.style.display = "block", r.generateElement({
  3951. class: "notificationText",
  3952. text: e.name,
  3953. parent: Ze
  3954. }), r.generateElement({
  3955. class: "notifButton",
  3956. html: "<i class='material-icons' style='font-size:28px;color:#cc5151;'>&#xE14C;</i>",
  3957. parent: Ze,
  3958. onclick: function () {
  3959. Rt(0)
  3960. },
  3961. hookTouch: !0
  3962. }), r.generateElement({
  3963. class: "notifButton",
  3964. html: "<i class='material-icons' style='font-size:28px;color:#8ecc51;'>&#xE876;</i>",
  3965. parent: Ze,
  3966. onclick: function () {
  3967. Rt(1)
  3968. },
  3969. hookTouch: !0
  3970. })
  3971. } else Ze.style.display = "none"
  3972. }
  3973.  
  3974. function Pt(e) {
  3975. N.push(e), "block" == qe.style.display && _t()
  3976. }
  3977.  
  3978. function Ct(e, t) {
  3979. R && (R.team = e, R.isOwner = t, "block" == qe.style.display && _t())
  3980. }
  3981.  
  3982. function At(e) {
  3983. Mt = e, "block" == qe.style.display && _t()
  3984. }
  3985.  
  3986. function Bt(e) {
  3987. for (var t = N.length - 1; t >= 0; t--) N[t].sid == e && N.splice(t, 1);
  3988. "block" == qe.style.display && _t()
  3989. }
  3990.  
  3991. function _t() {
  3992. if (R && R.alive) {
  3993. if (cn(), Ke.style.display = "none", qe.style.display = "block", r.removeAllChildren(Ve), R.team)
  3994. for (var e = 0; e < Mt.length; e += 2) ! function (e) {
  3995. var t = r.generateElement({
  3996. class: "allianceItem",
  3997. style: "color:" + (Mt[e] == R.sid ? "#fff" : "rgba(255,255,255,0.6)"),
  3998. text: Mt[e + 1],
  3999. parent: Ve
  4000. });
  4001. R.isOwner && Mt[e] != R.sid && r.generateElement({
  4002. class: "joinAlBtn",
  4003. text: "Kick",
  4004. onclick: function () {
  4005. Ot(Mt[e])
  4006. },
  4007. hookTouch: !0,
  4008. parent: t
  4009. })
  4010. }(e);
  4011. else if (N.length)
  4012. for (e = 0; e < N.length; ++e) ! function (e) {
  4013. var t = r.generateElement({
  4014. class: "allianceItem",
  4015. style: "color:" + (N[e].sid == R.team ? "#fff" : "rgba(255,255,255,0.6)"),
  4016. text: N[e].sid,
  4017. parent: Ve
  4018. });
  4019. r.generateElement({
  4020. class: "joinAlBtn",
  4021. text: "Join",
  4022. onclick: function () {
  4023. Dt(e)
  4024. },
  4025. hookTouch: !0,
  4026. parent: t
  4027. })
  4028. }(e);
  4029. else r.generateElement({
  4030. class: "allianceItem",
  4031. text: "No Tribes Yet",
  4032. parent: Ve
  4033. });
  4034. r.removeAllChildren(Ne), R.team ? r.generateElement({
  4035. class: "allianceButtonM",
  4036. style: "width: 360px",
  4037. text: R.isOwner ? "This Old" : "😈Imma Kill Yall😈",
  4038. onclick: function () {
  4039. Lt()
  4040. },
  4041. hookTouch: !0,
  4042. parent: Ne
  4043. }) : (r.generateElement({
  4044. tag: "input",
  4045. type: "text",
  4046. id: "allianceInput",
  4047. maxLength: 7,
  4048. placeholder: "unique name",
  4049. ontouchstart: function (e) {
  4050. e.preventDefault();
  4051. var t = prompt("unique name", e.currentTarget.value);
  4052. e.currentTarget.value = t.slice(0, 7)
  4053. },
  4054. parent: Ne
  4055. }), r.generateElement({
  4056. tag: "div",
  4057. class: "allianceButtonM",
  4058. style: "width: 140px;",
  4059. text: "Create",
  4060. onclick: function () {
  4061. Ut()
  4062. },
  4063. hookTouch: !0,
  4064. parent: Ne
  4065. }))
  4066. }
  4067. }
  4068.  
  4069. function Rt(e) {
  4070. s.send("11", Tt[0].sid, e), Tt.splice(0, 1), Et()
  4071. }
  4072.  
  4073. function Ot(e) {
  4074. s.send("12", e)
  4075. }
  4076.  
  4077. function Dt(e) {
  4078. s.send("10", N[e].sid), myConfig.clan = N[e].sid, botConfig.botJoin = !0
  4079. }
  4080.  
  4081. function Ut() {
  4082. s.send("8", document.getElementById("allianceInput").value), myConfig.clan = document.getElementById("allianceInput").value, botConfig.botJoin = !0
  4083. }
  4084.  
  4085. function Lt() {
  4086. Tt = [], Et(), s.send("9")
  4087. }
  4088. var Ft, Yt, zt = [],
  4089. Ht = [];
  4090.  
  4091. function Wt() {
  4092. this.init = function (e, t) {
  4093. this.scale = 0, this.x = e, this.y = t, this.active = !0
  4094. }, this.update = function (e, t) {
  4095. this.active && (this.scale += .05 * t, this.scale >= o.mapPingScale ? this.active = !1 : (e.globalAlpha = 1 - Math.max(0, this.scale / o.mapPingScale), e.beginPath(), e.arc(this.x / o.mapScale * Xe.width, this.y / o.mapScale * Xe.width, this.scale, 0, 2 * Math.PI), e.stroke()))
  4096. }
  4097. }
  4098.  
  4099. function qt(e, t) {
  4100. for (var n = 0; n < zt.length; ++n)
  4101. if (!zt[n].active) {
  4102. Ft = zt[n];
  4103. break
  4104. } Ft || (Ft = new Wt, zt.push(Ft)), Ft.init(e, t)
  4105. }
  4106.  
  4107. function Vt(e) {
  4108. St = e
  4109. }
  4110. var Nt = 0;
  4111.  
  4112. function Xt(e, t, n) {
  4113. n ? e ? R.tailIndex = t : R.tails[t] = 1 : e ? R.skinIndex = t : R.skins[t] = 1, "block" == Ke.style.display && Gt()
  4114. }
  4115.  
  4116. function Gt() {
  4117. if (R) {
  4118. r.removeAllChildren(Qe);
  4119. for (var e = Nt, t = e ? tt : et, n = 0; n < t.length; ++n) t[n].dontSell || function (n) {
  4120. var i = r.generateElement({
  4121. id: "storeDisplay" + n,
  4122. class: "storeItem",
  4123. onmouseout: function () {
  4124. vt()
  4125. },
  4126. onmouseover: function () {
  4127. vt(t[n], !1, !0)
  4128. },
  4129. parent: Qe
  4130. });
  4131. r.hookTouchEvents(i, !0), r.generateElement({
  4132. tag: "img",
  4133. class: "hatPreview",
  4134. src: "../img/" + (e ? "accessories/access_" : "hats/hat_") + t[n].id + (t[n].topSprite ? "_p" : "") + ".png",
  4135. parent: i
  4136. }), r.generateElement({
  4137. tag: "span",
  4138. text: t[n].name,
  4139. parent: i
  4140. }), (e ? R.tails[t[n].id] : R.skins[t[n].id]) ? (e ? R.tailIndex : R.skinIndex) == t[n].id ? r.generateElement({
  4141. class: "joinAlBtn",
  4142. style: "margin-top: 5px",
  4143. text: "Unequip",
  4144. onclick: function () {
  4145. Jt(0, e)
  4146. },
  4147. hookTouch: !0,
  4148. parent: i
  4149. }) : r.generateElement({
  4150. class: "joinAlBtn",
  4151. style: "margin-top: 5px",
  4152. text: "Equip",
  4153. onclick: function () {
  4154. Jt(t[n].id, e)
  4155. },
  4156. hookTouch: !0,
  4157. parent: i
  4158. }) : (r.generateElement({
  4159. class: "joinAlBtn",
  4160. style: "margin-top: 5px",
  4161. text: "Buy",
  4162. onclick: function () {
  4163. $t(t[n].id, e)
  4164. },
  4165. hookTouch: !0,
  4166. parent: i
  4167. }), r.generateElement({
  4168. tag: "span",
  4169. class: "itemPrice",
  4170. text: t[n].price,
  4171. parent: i
  4172. }))
  4173. }(n)
  4174. }
  4175. }
  4176.  
  4177. function Jt(e, t) {
  4178. R.alive && (0 == t ? s.send("13c", 0, e, 0) : 1 == t && s.send("13c", 0, e, 1))
  4179. }
  4180.  
  4181. function $t(e, t) {
  4182. s.send("13c", 1, e, t)
  4183. }
  4184.  
  4185. function Kt(e, t, n) {
  4186. R.alive && (0 == t ? R.skins[e] ? n ? R.skinIndex != e && s.send("13c", 0, e, 0) : s.send("13c", 0, e, 0) : (n ? 0 != R.skinIndex && s.send("13c", 0, 0, 0) : s.send("13c", 0, 0, 0), s.send("13c", 1, e, 0)) : 1 == t && (R.tails[e] ? n ? R.tailIndex != e && s.send("13c", 0, e, 1) : s.send("13c", 0, e, 1) : (n ? 0 != R.tailIndex && s.send("13c", 0, 0, 1) : s.send("13c", 0, 0, 1), s.send("13c", 1, e, 1))))
  4187. }
  4188.  
  4189. function Qt() {
  4190. Ke.style.display = "none", qe.style.display = "none", cn()
  4191. }
  4192.  
  4193. function Zt(e, t) {
  4194. e && (t ? R.weapons = e : R.items = e);
  4195. for (var n = 0; n < c.list.length; ++n) {
  4196. var i = c.weapons.length + n;
  4197. document.getElementById("actionBarItem" + i).style.display = (As ? R.items : [0, 3, 6, 10]).indexOf(c.list[n].id) >= 0 ? "inline-block" : "none"
  4198. }
  4199. for (n = 0; n < c.weapons.length; ++n) document.getElementById("actionBarItem" + n).style.display = R.weapons[c.weapons[n].type] == c.weapons[n].id ? "inline-block" : "none"
  4200. }
  4201.  
  4202. function en(e) {
  4203. j = e, H = e ? window.devicePixelRatio || 1 : window.devicePixelRatio2, Se.checked = e, T("native_resolution", e.toString()), kn()
  4204. }
  4205.  
  4206. function tn() {
  4207. for (var e = "", t = 0; t < o.skinColors.length; ++t) 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>";
  4208. Je.innerHTML = e
  4209. }
  4210. var nn = document.getElementById("chatBox"),
  4211. sn = document.getElementById("chatHolder"),
  4212. rn = 0;
  4213.  
  4214. function an() {
  4215. pn ? setTimeout((function () {
  4216. var e = prompt("chat message");
  4217. e && ln(e)
  4218. }), 1) : rn ? (nn.value && ln(nn.value), cn()) : (rn = 1, Ke.style.display = "none", qe.style.display = "none", sn.style.display = "block", As ? (sn.style.opacity = "1", nn.autocomplete = "on") : (sn.style.opacity = "0", nn.autocomplete = "off"), nn.focus(), Cn()), nn.value = ""
  4219. }
  4220. let on = !0;
  4221.  
  4222. function ln(e) {
  4223. let t = function (t) {
  4224. return e == "!!" + t
  4225. };
  4226. if (t("grind")) Jn = !Jn;
  4227. else if (t("replace")) $n = !$n;
  4228. else if (t("autospin")) Tn = !Tn;
  4229. else if (t("visual")) {
  4230. As = !As, ze.style.width = (As ? R.XP / R.maxXP * 100 : 0) + "%";
  4231. for (var n = 0; n < c.list.length; ++n) {
  4232. var i = c.weapons.length + n;
  4233. document.getElementById("actionBarItem" + i).style.display = (As ? R.items : [0, 3, 6, 10]).indexOf(c.list[n].id) >= 0 ? "inline-block" : "none"
  4234. }
  4235. $("#pingDisplay").toggle()
  4236. } else if (t("pfm")) on = !on;
  4237. else if (t("ch1")) fn("1");
  4238. else if (t("ch2")) fn("2");
  4239. else if (t("ch3")) fn("3");
  4240. else if (t("showch")) dn = !dn;
  4241. else if (t("profany")) mn = !mn;
  4242. else if (t("move")) botConfig.stop = !botConfig.stop;
  4243. else if (t("atck")) botConfig.atck = !botConfig.atck;
  4244. else if (t("getsid"))
  4245. for (let e = 0; e < V.length; ++e) hn(V[e], V[e].name + ", " + V[e].sid, o.chatCountdown);
  4246. else {
  4247. let t = e;
  4248. s.send("ch", t.slice(0, 30))
  4249. }
  4250. }
  4251.  
  4252. function cn() {
  4253. rn = 0, nn.value = "", sn.style.display = "none"
  4254. }
  4255.  
  4256. function hn(e, t, n) {
  4257. e.iChatMessage = t, e.iChatCountdown = n
  4258. }
  4259. let un = !1,
  4260. dn = !1;
  4261.  
  4262. function fn(e) {
  4263. un = !un;
  4264. let t = [{
  4265. say: "Children used to run and play",
  4266. time: 15725
  4267. }, {
  4268. say: "Look at all this mess we made",
  4269. time: 18600
  4270. }, {
  4271. say: "Guess i never know",
  4272. time: 21500
  4273. }, {
  4274. say: "It went wrong",
  4275. time: 23e3
  4276. }, {
  4277. say: "Sometimes i feel like all",
  4278. time: 27500
  4279. }, {
  4280. say: "That's said",
  4281. time: 28500
  4282. }, {
  4283. say: "Goes viral then people forget",
  4284. time: 30500
  4285. }, {
  4286. say: "In this crazy world",
  4287. time: 33500
  4288. }, {
  4289. say: "I don't belong",
  4290. time: 34800
  4291. }, {
  4292. say: "I see fire burning",
  4293. time: 39e3
  4294. }, {
  4295. say: "But i close my eyes",
  4296. time: 41e3
  4297. }, {
  4298. say: "(I'd rather deny that)",
  4299. time: 43300
  4300. }, {
  4301. say: "Everything is falling",
  4302. time: 45e3
  4303. }, {
  4304. say: "Out of place",
  4305. time: 46700
  4306. }, {
  4307. say: "I see trees ripped",
  4308. time: 5e4
  4309. }, {
  4310. say: "From the ground but",
  4311. time: 52200
  4312. }, {
  4313. say: "Nobody makes a sound",
  4314. time: 54050
  4315. }, {
  4316. say: "I see fire burning",
  4317. time: 57e3
  4318. }, {
  4319. say: "But i'm fine",
  4320. time: 59e3
  4321. }, {
  4322. say: "Now i am nobody",
  4323. time: 61e3
  4324. }, {
  4325. say: "Now i am nobody",
  4326. time: 73e3
  4327. }, {
  4328. say: "The future feels so unsure",
  4329. time: 99500
  4330. }, {
  4331. say: "Didin't we deserve more",
  4332. time: 102600
  4333. }, {
  4334. say: "The burden that you left",
  4335. time: 105500
  4336. }, {
  4337. say: "Is too heavy for me",
  4338. time: 106900
  4339. }, {
  4340. say: "Do you ever feel like",
  4341. time: 111300
  4342. }, {
  4343. say: "The world will die out",
  4344. time: 113e3
  4345. }, {
  4346. say: "My anxiety's off",
  4347. time: 114400
  4348. }, {
  4349. say: "The roof i cry out",
  4350. time: 115800
  4351. }, {
  4352. say: "We have gone too far",
  4353. time: 117400
  4354. }, {
  4355. say: "Take me back right now",
  4356. time: 118800
  4357. }, {
  4358. say: "I see fire burning",
  4359. time: 123e3
  4360. }, {
  4361. say: "But i close my eyes",
  4362. time: 125e3
  4363. }, {
  4364. say: "(I'd rather deny that)",
  4365. time: 127300
  4366. }, {
  4367. say: "Everything is falling",
  4368. time: 129e3
  4369. }, {
  4370. say: "Out of place",
  4371. time: 131e3
  4372. }, {
  4373. say: "I see trees ripped",
  4374. time: 134e3
  4375. }, {
  4376. say: "From the ground but",
  4377. time: 135500
  4378. }, {
  4379. say: "Nobody makes a sound",
  4380. time: 138e3
  4381. }, {
  4382. say: "I see fire burning",
  4383. time: 141e3
  4384. }, {
  4385. say: "But i'm fine",
  4386. time: 143e3
  4387. }, {
  4388. say: "Now i am nobody",
  4389. time: 145e3
  4390. }, {
  4391. say: "Now i am nobody",
  4392. time: 169e3
  4393. }],
  4394. n = "1" == e ? t : "2" == e ? [{
  4395. say: "I'm burning",
  4396. time: 39800
  4397. }, {
  4398. say: "Wanna fell your power",
  4399. time: 41300
  4400. }, {
  4401. say: "Right into my veins",
  4402. time: 43e3
  4403. }, {
  4404. say: "Come, racer",
  4405. time: 46300
  4406. }, {
  4407. say: "Cross the fire",
  4408. time: 47800
  4409. }, {
  4410. say: "Pushing on the gas",
  4411. time: 49e3
  4412. }, {
  4413. say: "So come on",
  4414. time: 52600
  4415. }, {
  4416. say: "So come on,",
  4417. time: 53900
  4418. }, {
  4419. say: "The drift is on my mind!",
  4420. time: 55700
  4421. }, {
  4422. say: "AE eighity Speedy 86",
  4423. time: 58600
  4424. }, {
  4425. say: "Every road is on fire!",
  4426. time: 62e3
  4427. }, {
  4428. say: "'Cause i can't stop driving",
  4429. time: 64e3
  4430. }, {
  4431. say: "With my 86",
  4432. time: 66700
  4433. }, {
  4434. say: "Anybody will be around me",
  4435. time: 68200
  4436. }, {
  4437. say: "AE eighity Speedy 86",
  4438. time: 71200
  4439. }, {
  4440. say: "See my speed is getting higher",
  4441. time: 74900
  4442. }, {
  4443. say: "'Cause i can't stop driving",
  4444. time: 77e3
  4445. }, {
  4446. say: "Go go 86",
  4447. time: 79400
  4448. }, {
  4449. say: "Anybody will be around me",
  4450. time: 81e3
  4451. }, {
  4452. say: "Your body",
  4453. time: 97300
  4454. }, {
  4455. say: "Burning like a flame",
  4456. time: 98800
  4457. }, {
  4458. say: "Engine will be fly",
  4459. time: 100300
  4460. }, {
  4461. say: "My racer",
  4462. time: 103750
  4463. }, {
  4464. say: "Can you hear me?",
  4465. time: 105300
  4466. }, {
  4467. say: "Listen to me now!",
  4468. time: 106750
  4469. }, {
  4470. say: "So come on",
  4471. time: 11e4
  4472. }, {
  4473. say: "So come on,",
  4474. time: 111700
  4475. }, {
  4476. say: "The drift is on my mind!",
  4477. time: 113e3
  4478. }, {
  4479. say: "AE eighity Speedy 86",
  4480. time: 116e3
  4481. }, {
  4482. say: "Every road is fire!",
  4483. time: 119750
  4484. }, {
  4485. say: "'Cause i can't stop driving",
  4486. time: 121750
  4487. }, {
  4488. say: "With my 86",
  4489. time: 124150
  4490. }, {
  4491. say: "Anybody will be around me",
  4492. time: 126e3
  4493. }, {
  4494. say: "AE eighity Speedy 86",
  4495. time: 129e3
  4496. }, {
  4497. say: "See my speed is getting higher",
  4498. time: 132250
  4499. }, {
  4500. say: "'Cause i can't stop driving",
  4501. time: 134750
  4502. }, {
  4503. say: "Go go 86",
  4504. time: 137e3
  4505. }, {
  4506. say: "Anybody will be around me",
  4507. time: 138750
  4508. }, {
  4509. say: "So come on",
  4510. time: 219e3
  4511. }, {
  4512. say: "So come on,",
  4513. time: 220500
  4514. }, {
  4515. say: "The drift is on my mind!",
  4516. time: 222e3
  4517. }, {
  4518. say: "AE eighity go go 86",
  4519. time: 225e3
  4520. }, {
  4521. say: "Every road is fire!",
  4522. time: 228500
  4523. }, {
  4524. say: "'Cause i can't stop driving",
  4525. time: 230750
  4526. }, {
  4527. say: "With my 86",
  4528. time: 233e3
  4529. }, {
  4530. say: "Anybody will be around me",
  4531. time: 234750
  4532. }, {
  4533. say: "AE eighity Speedy 86",
  4534. time: 237750
  4535. }, {
  4536. say: "See my speed is getting higher",
  4537. time: 241200
  4538. }, {
  4539. say: "'Cause i can't stop driving",
  4540. time: 243500
  4541. }, {
  4542. say: "Go go 86",
  4543. time: 245900
  4544. }, {
  4545. say: "Anybody will be around me",
  4546. time: 247500
  4547. }] : "3" == e ? [{
  4548. say: "Oh oh ooooh",
  4549. time: 2500
  4550. }, {
  4551. say: "Oh we begin",
  4552. time: 4750
  4553. }, {
  4554. say: "We'll be together",
  4555. time: 15500
  4556. }, {
  4557. say: "till the morning light",
  4558. time: 16750
  4559. }, {
  4560. say: "Don't stand so",
  4561. time: 18750
  4562. }, {
  4563. say: "don't stand so",
  4564. time: 20500
  4565. }, {
  4566. say: "Don't stand so close to me",
  4567. time: 22e3
  4568. }, {
  4569. say: "Baby you belong to me",
  4570. time: 37e3
  4571. }, {
  4572. say: "Yes you do, yes you do",
  4573. time: 4e4
  4574. }, {
  4575. say: "You're my affection",
  4576. time: 41750
  4577. }, {
  4578. say: "I can make a woman cry",
  4579. time: 43e3
  4580. }, {
  4581. say: "Yes I do, yes I do",
  4582. time: 46250
  4583. }, {
  4584. say: "I well be good",
  4585. time: 47750
  4586. }, {
  4587. say: "You're like a cruel device",
  4588. time: 49750
  4589. }, {
  4590. say: "Your blood is cold like ice",
  4591. time: 51e3
  4592. }, {
  4593. say: "Poison for my veins,",
  4594. time: 52500
  4595. }, {
  4596. say: "I'm breaking my chains",
  4597. time: 54e3
  4598. }, {
  4599. say: "One look and you can kill",
  4600. time: 55750
  4601. }, {
  4602. say: "my pain now is your thrill",
  4603. time: 57250
  4604. }, {
  4605. say: "Your love is for me",
  4606. time: 58750
  4607. }, {
  4608. say: "I say",
  4609. time: 61e3
  4610. }, {
  4611. say: "Try me",
  4612. time: 61750
  4613. }, {
  4614. say: "take a chance on emotions",
  4615. time: 62750
  4616. }, {
  4617. say: "For now and ever",
  4618. time: 64750
  4619. }, {
  4620. say: "close to your heart",
  4621. time: 66e3
  4622. }, {
  4623. say: "I say",
  4624. time: 67e3
  4625. }, {
  4626. say: "Try me",
  4627. time: 67750
  4628. }, {
  4629. say: "take a chance on my passion",
  4630. time: 68750
  4631. }, {
  4632. say: "We'll be together all the time",
  4633. time: 71e3
  4634. }, {
  4635. say: "I say",
  4636. time: 73250
  4637. }, {
  4638. say: "Try me",
  4639. time: 74e3
  4640. }, {
  4641. say: "take a chance on emotions",
  4642. time: 75e3
  4643. }, {
  4644. say: "For now and ever",
  4645. time: 77e3
  4646. }, {
  4647. say: "into my heart",
  4648. time: 78500
  4649. }, {
  4650. say: "I say",
  4651. time: 79250
  4652. }, {
  4653. say: "Try me",
  4654. time: 8e4
  4655. }, {
  4656. say: "take a chance on my passion",
  4657. time: 81e3
  4658. }, {
  4659. say: "We'll be together",
  4660. time: 83250
  4661. }, {
  4662. say: "till the morning light",
  4663. time: 84500
  4664. }, {
  4665. say: "Don't stand so",
  4666. time: 86750
  4667. }, {
  4668. say: "don't stand so",
  4669. time: 88e3
  4670. }, {
  4671. say: "Don't stand so close to me",
  4672. time: 89500
  4673. }, {
  4674. say: "Baby let me take control",
  4675. time: 104750
  4676. }, {
  4677. say: "Yes I do, yes I do",
  4678. time: 107750
  4679. }, {
  4680. say: "You are my target",
  4681. time: 109250
  4682. }, {
  4683. say: "No one ever made me cry",
  4684. time: 111e3
  4685. }, {
  4686. say: "What you do, what you do",
  4687. time: 114e3
  4688. }, {
  4689. say: "Baby's so bad",
  4690. time: 115500
  4691. }, {
  4692. say: "You're like a cruel device",
  4693. time: 117250
  4694. }, {
  4695. say: "Your blood is cold like ice",
  4696. time: 118500
  4697. }, {
  4698. say: "Poison for my veins,",
  4699. time: 120250
  4700. }, {
  4701. say: "I'm breaking my chains",
  4702. time: 121750
  4703. }, {
  4704. say: "One look and you can kill",
  4705. time: 123e3
  4706. }, {
  4707. say: "my pain now is your thrill",
  4708. time: 124750
  4709. }, {
  4710. say: "Your love is for me",
  4711. time: 126500
  4712. }, {
  4713. say: "I say",
  4714. time: 128500
  4715. }, {
  4716. say: "Try me",
  4717. time: 129250
  4718. }, {
  4719. say: "take a chance on emotions",
  4720. time: 130250
  4721. }, {
  4722. say: "For now and ever",
  4723. time: 132750
  4724. }, {
  4725. say: "close to your heart",
  4726. time: 133750
  4727. }, {
  4728. say: "I say",
  4729. time: 134750
  4730. }, {
  4731. say: "Try me",
  4732. time: 135500
  4733. }, {
  4734. say: "take a chance on my passion",
  4735. time: 136500
  4736. }, {
  4737. say: "We'll be together all the time",
  4738. time: 138750
  4739. }, {
  4740. say: "I say",
  4741. time: 141e3
  4742. }, {
  4743. say: "Try me",
  4744. time: 141750
  4745. }, {
  4746. say: "take a chance on emotions",
  4747. time: 142750
  4748. }, {
  4749. say: "For now and ever",
  4750. time: 145e3
  4751. }, {
  4752. say: "into my heart",
  4753. time: 146e3
  4754. }, {
  4755. say: "I say",
  4756. time: 147e3
  4757. }, {
  4758. say: "Try me",
  4759. time: 147750
  4760. }, {
  4761. say: "take a chance on my passion",
  4762. time: 148750
  4763. }, {
  4764. say: "We'll be together",
  4765. time: 151e3
  4766. }, {
  4767. say: "till the morning light",
  4768. time: 152250
  4769. }, {
  4770. say: "Don't stand so",
  4771. time: 154250
  4772. }, {
  4773. say: "don't stand so",
  4774. time: 155750
  4775. }, {
  4776. say: "Don't stand so close to me",
  4777. time: 157e3
  4778. }, {
  4779. say: "I say",
  4780. time: 184e3
  4781. }, {
  4782. say: "Try me",
  4783. time: 184750
  4784. }, {
  4785. say: "take a chance on emotions",
  4786. time: 185500
  4787. }, {
  4788. say: "For now and ever",
  4789. time: 188e3
  4790. }, {
  4791. say: "close to your heart",
  4792. time: 189e3
  4793. }, {
  4794. say: "I say",
  4795. time: 19e4
  4796. }, {
  4797. say: "Try me",
  4798. time: 190750
  4799. }, {
  4800. say: "take a chance on my passion",
  4801. time: 192750
  4802. }, {
  4803. say: "We'll be together all the time",
  4804. time: 194e3
  4805. }, {
  4806. say: "I say",
  4807. time: 196250
  4808. }, {
  4809. say: "Try me",
  4810. time: 197e3
  4811. }, {
  4812. say: "take a chance on emotions",
  4813. time: 198e3
  4814. }, {
  4815. say: "For now and ever",
  4816. time: 200250
  4817. }, {
  4818. say: "into my heart",
  4819. time: 201250
  4820. }, {
  4821. say: "I say",
  4822. time: 202500
  4823. }, {
  4824. say: "Try me",
  4825. time: 203250
  4826. }, {
  4827. say: "take a chance on my passion",
  4828. time: 204e3
  4829. }, {
  4830. say: "We'll be together",
  4831. time: 206500
  4832. }, {
  4833. say: "till the morning light",
  4834. time: 207500
  4835. }, {
  4836. say: "Don't stand so",
  4837. time: 209750
  4838. }, {
  4839. say: "don't stand so",
  4840. time: 211250
  4841. }, {
  4842. say: "Don't stand so close to me",
  4843. time: 212750
  4844. }] : t;
  4845. n.length;
  4846. n.forEach((e => {
  4847. setTimeout((() => {
  4848. dn ? (ln(e.say)) : (R.iChatMessage = e.say, R.iChatCountdown = o.chatCountdown), consoleSinger && console.log(e.say)
  4849. }), e.time)
  4850. }))
  4851. }
  4852. window.consoleSinger = !1;
  4853. var pn, mn = !1,
  4854. gn = ["cunt", "whore", "fuck", "shit", "faggot", "nigger", "nigga", "dick", "vagina", "minge", "cock", "rape", "cum", "sex", "tits", "penis", "clit", "pussy", "meatcurtain", "jizz", "prune", "douche", "wanker", "damn", "bitch", "dick", "fag", "bastard"];
  4855.  
  4856. function yn(e, t) {
  4857. var n = Ks(e);
  4858. n && (n.chatMessage = function (e) {
  4859. if ("what mod" == e && s.send("ch", "Imagie Begging For a Cow Game Mod"), !mn)
  4860. for (var t, n = 0; n < gn.length; ++n)
  4861. if (e.indexOf(gn[n]) > -1) {
  4862. t = "";
  4863. for (var i = 0; i < gn[n].length; ++i) t += t.length ? "o" : "M";
  4864. var r = new RegExp(gn[n], "g");
  4865. e = e.replace(r, t)
  4866. } return e
  4867. }(t), n.chatCountdown = o.chatCountdown)
  4868. }
  4869.  
  4870. function kn() {
  4871. Y = window.innerWidth, z = window.innerHeight;
  4872. var e = Math.max(Y / oe, z / le) * H;
  4873. be.width = Y * H, be.height = z * H, be.style.width = Y + "px", be.style.height = z + "px", ve.setTransform(e, 0, 0, e, (Y * H - oe * e) / 2, (z * H - le * e) / 2)
  4874. }
  4875.  
  4876. function wn(e) {
  4877. (pn = e) ? Ee.classList.add("touch"): Ee.classList.remove("touch")
  4878. }
  4879.  
  4880. function bn(e) {
  4881. e.preventDefault(), e.stopPropagation(), wn(!0);
  4882. for (var t = 0; t < e.changedTouches.length; t++) {
  4883. var n = e.changedTouches[t];
  4884. n.identifier == se.id ? (se.id = -1, Ln()) : n.identifier == re.id && (re.id = -1, R.buildIndex >= 0 && (_ = 1, Dn()), _ = 0, Dn())
  4885. }
  4886. }
  4887. window.addEventListener("resize", r.checkTrusted(kn)), kn(), wn(!1), window.setUsingTouch = wn, be.addEventListener("touchmove", r.checkTrusted((function (e) {
  4888. e.preventDefault(), e.stopPropagation(), wn(!0);
  4889. for (var t = 0; t < e.changedTouches.length; t++) {
  4890. var n = e.changedTouches[t];
  4891. n.identifier == se.id ? (se.currentX = n.pageX, se.currentY = n.pageY, Ln()) : n.identifier == re.id && (re.currentX = n.pageX, re.currentY = n.pageY, _ = 1)
  4892. }
  4893. })), !1), be.addEventListener("touchstart", r.checkTrusted((function (e) {
  4894. e.preventDefault(), e.stopPropagation(), wn(!0);
  4895. for (var t = 0; t < e.changedTouches.length; t++) {
  4896. var n = e.changedTouches[t];
  4897. n.pageX < document.body.scrollWidth / 2 && -1 == se.id ? (se.id = n.identifier, se.startX = se.currentX = n.pageX, se.startY = se.currentY = n.pageY, Ln()) : n.pageX > document.body.scrollWidth / 2 && -1 == re.id && (re.id = n.identifier, re.startX = re.currentX = n.pageX, re.startY = re.currentY = n.pageY, R.buildIndex < 0 && (_ = 1, Dn()))
  4898. }
  4899. })), !1), be.addEventListener("touchend", r.checkTrusted(bn), !1), be.addEventListener("touchcancel", r.checkTrusted(bn), !1), be.addEventListener("touchleave", r.checkTrusted(bn), !1), be.addEventListener("mousemove", (function (e) {
  4900. e.preventDefault(), e.stopPropagation(), wn(!1), ne = e.clientX, ie = e.clientY
  4901. }), !1), be.addEventListener("mousedown", (function (e) {
  4902. wn(!1), 1 != _ && (_ = 1, os = !0, 0 == e.button ? (ls = !0, vn = !0) : 1 == e.button ? (hs = !0, us = !0) : 2 == e.button && (cs = !0))
  4903. }), !1);
  4904. let vn = !1,
  4905. xn = !1;
  4906. var Sn;
  4907. be.addEventListener("mouseup", (function (e) {
  4908. wn(!1), 0 != _ && (_ = 0, 0 == e.button ? (ls = !1, xn = !0) : 1 == e.button ? hs = !1 : 2 == e.button && (cs = !1), ls || hs || cs || (os = !1))
  4909. }), !1), be.addEventListener("wheel", (function (e) {
  4910. e.deltaY < 0
  4911. }), !1);
  4912. var In = null,
  4913. Tn = !1;
  4914.  
  4915. function Mn() {
  4916. return R ? rs && !Qi ? as : Qi ? ks : !Tn || 15 != R.weaponIndex || vs.canInsta || Ki || rs ? (-1 != re.id ? Sn = Math.atan2(re.currentY - re.startY, re.currentX - re.startX) : R.lockDir || pn || (Sn = Math.atan2(ie - z / 2, ne - Y / 2)), r.fixTo(Sn || 0, 2)) : Math.random() * (2 * Math.PI) : 0
  4917. }
  4918.  
  4919. function jn() {
  4920. return R ? (-1 != re.id ? Sn = Math.atan2(re.currentY - re.startY, re.currentX - re.startX) : R.lockDir || pn || (Sn = Math.atan2(ie - z / 2, ne - Y / 2)), r.fixTo(Sn || 0, 2)) : 0
  4921. }
  4922. var En = {},
  4923. Pn = {
  4924. 87: [0, -1],
  4925. 38: [0, -1],
  4926. 83: [0, 1],
  4927. 40: [0, 1],
  4928. 65: [-1, 0],
  4929. 37: [-1, 0],
  4930. 68: [1, 0],
  4931. 39: [1, 0]
  4932. };
  4933.  
  4934. function Cn() {
  4935. En = {}, s.send("rmd")
  4936. }
  4937.  
  4938. function An() {
  4939. return "block" != qe.style.display && !rn
  4940. }
  4941. var Bn = !1,
  4942. _n = !1,
  4943. Rn = !1,
  4944. On = !1;
  4945.  
  4946. function Dn() {
  4947. R && R.alive && s.send("c", _, R.buildIndex >= 0 ? Mn() : null)
  4948. }
  4949. window.addEventListener("keydown", r.checkTrusted((function (e) {
  4950. var t = e.which || e.keyCode || 0;
  4951. 27 == t ? Qt() : R && R.alive && An() && (En[t] || (En[t] = 1, 69 == t ? Yn() : 67 == t ? (It || (It = {}), It.x = R.x, It.y = R.y) : 77 == t ? is = !is : 88 == t ? (R.lockDir = R.lockDir ? 0 : 1, s.send("7", 0)) : null != R.weapons[t - 49] ? (Ji = R.weapons[t - 49], zn(R.weapons[t - 49], !0)) : null != R.items[t - 49 - R.weapons.length] ? zn(R.items[t - 49 - R.weapons.length]) : 82 == t ? Fn() : 84 == t ? (Ms = !Ms, Jt(0, 1)) : Pn[t] ? Ln() : 32 == t ? (_ = 1, Dn()) : 75 == t ? Kt(7, 0) : 90 == t ? Kt(40, 0) : 76 == t ? (ss = !ss, Ys(), rs ? Jt(0, 1) : Kt(11, 1)) : "q" == e.key ? Bn = !0 : "f" == e.key ? _n = !0 : "v" == e.key ? Rn = !0 : "h" == e.key ? On = !0 : "B" == e.key ? Cs = !Cs : "Shift" == e.key ? (Ys(), rs ? Jt(0, 1) : Kt(11, 1)) : "g" == e.key && (Es = !Es, Jt(0, 1))))
  4952. }))), window.addEventListener("keyup", r.checkTrusted((function (e) {
  4953. if (R && R.alive) {
  4954. var t = e.which || e.keyCode || 0;
  4955. 13 == t ? an() : An() && En[t] && (En[t] = 0, Pn[t] ? Ln() : 32 == t ? (_ = 0, Dn()) : "q" == e.key ? Bn = !1 : "f" == e.key ? _n = !1 : "v" == e.key ? Rn = !1 : "h" == e.key && (On = !1))
  4956. }
  4957. })));
  4958. var Un = void 0;
  4959.  
  4960. function Ln() {
  4961. var e = js ? Bs : function () {
  4962. var e = 0,
  4963. t = 0;
  4964. if (-1 != se.id) e += se.currentX - se.startX, t += se.currentY - se.startY;
  4965. else
  4966. for (var n in Pn) {
  4967. var i = Pn[n];
  4968. e += !!En[n] * i[0], t += !!En[n] * i[1]
  4969. }
  4970. return 0 == e && 0 == t ? void 0 : r.fixTo(Math.atan2(t, e), 2)
  4971. }();
  4972. (null == Un || null == e || Math.abs(e - Un) > .3) && (js || s.send("33", e), Un = e, e)
  4973. }
  4974.  
  4975. function Fn() {
  4976. s.send("14", 1), $i = !$i
  4977. }
  4978.  
  4979. function Yn() {
  4980. s.send("7", 1)
  4981. }
  4982.  
  4983. function zn(e, t) {
  4984. s.send("5", e, t)
  4985. }
  4986.  
  4987. function Hn() {
  4988. if (T("moo_name", Le.value), !ce && s.connected) {
  4989. Ji = 0, ce = !0, v.stop("menu"), ohio.pause(), ohio.currentTime = 0, pt("Loading..."), s.send("sp", {
  4990. name: As ? Le.value : urName,
  4991. moofoll: P,
  4992. skin: ae
  4993. });
  4994. let e = document.getElementById("ot-sdk-btn-floating");
  4995. e && (e.style.display = "none")
  4996. }
  4997. }
  4998. var Wn = !0;
  4999.  
  5000. function qn(e) {
  5001. Pe.style.display = "none", je.style.display = "block", he.style.display = "none", En = {}, O = e, _ = 0, ce = !0, Wn && (Wn = !1, X.length = 0)
  5002. }
  5003.  
  5004. function Vn(e, t, n, i) {
  5005. g.showText(e, t, 50, .18, As ? 1e3 : 500, Math.abs(n), n >= 0 ? "#fff" : "#8ecc51")
  5006. }
  5007. var Nn = 99999;
  5008.  
  5009. function Xn() {
  5010. ce = !1;
  5011. try {
  5012. factorem.refreshAds([2], !0)
  5013. } catch (e) {}
  5014. Ce.style.display = "none", Qt(), xt = {
  5015. x: R.x,
  5016. y: R.y
  5017. }, Pe.style.display = "none", Ge.style.display = "block", Ge.style.fontSize = "0px", Nn = 0, setTimeout((function () {
  5018. je.style.display = "block", he.style.display = "block", ohio.play(), Ge.style.display = "none"
  5019. }), o.deathFadeout), gt()
  5020. }
  5021.  
  5022. function Gn(e) {
  5023. R && nt.removeAllItems(e)
  5024. }
  5025. var Jn = !1,
  5026. $n = !0;
  5027.  
  5028. function Kn(e) {
  5029. ns.sid == e && (ns = {
  5030. sid: void 0,
  5031. hitCount: 0
  5032. }, Kt(cs ? 0 : 11, 1));
  5033. let t = Zs(e);
  5034. if (Jn) Rs(t, R) <= 111 && (qs(5, jn() - Ws(45)), qs(5, jn() + Ws(45)), s.send("2", jn()));
  5035. else if (Rs(t, R) < 500 && $n && ms.length)
  5036. if (Os(ms, R) <= 300)
  5037. for (let e = -90; e < 180; e += 90) R.items[2] && qs(2, ks + Ws(e));
  5038. else if (Os(ms, R) > 300 && Os(ms, R) < 500)
  5039. for (let e = 0; e < 2 * Math.PI; e += Math.PI / 2) R.items[4] && 15 == R.items[4] && qs(4, ks + e);
  5040. Rs(t, R) > 1200 && As && function (e, t) {
  5041. for (var n = 0; n < Ht.length; ++n)
  5042. if (!Ht[n].active) {
  5043. Yt = Ht[n];
  5044. break
  5045. } Yt || (Yt = new Wt, Ht.push(Yt)), Yt.init(e, t)
  5046. }(t.x, t.y), nt.disableBySid(e)
  5047. }
  5048.  
  5049. function Qn() {
  5050. Be.innerText = R.points, _e.innerText = R.food, Re.innerText = R.wood, Oe.innerText = R.stone, R.kills > De.innerText && goofy.play(), De.innerText = R.kills
  5051. }
  5052. var Zn = {},
  5053. ei = ["crown", "skull", "cross"];
  5054. var ti = [];
  5055.  
  5056. function ni(e, t) {
  5057. if (R.upgradePoints = e, R.upgrAge = t, e > 0) {
  5058. ti.length = 0, r.removeAllChildren(He);
  5059. for (var n = 0; n < c.weapons.length; ++n) {
  5060. if (c.weapons[n].age == t && (null == c.weapons[n].pre || R.weapons.indexOf(c.weapons[n].pre) >= 0)) r.generateElement({
  5061. id: "upgradeItem" + n,
  5062. class: "actionBarItem",
  5063. onmouseout: function () {
  5064. vt()
  5065. },
  5066. parent: He
  5067. }).style.backgroundImage = document.getElementById("actionBarItem" + n).style.backgroundImage, ti.push(n)
  5068. }
  5069. for (n = 0; n < c.list.length; ++n)
  5070. if (c.list[n].age == t && (null == c.list[n].pre || R.items.indexOf(c.list[n].pre) >= 0)) {
  5071. var i = c.weapons.length + n;
  5072. r.generateElement({
  5073. id: "upgradeItem" + i,
  5074. class: "actionBarItem",
  5075. onmouseout: function () {
  5076. vt()
  5077. },
  5078. parent: He
  5079. }).style.backgroundImage = document.getElementById("actionBarItem" + i).style.backgroundImage, ti.push(i)
  5080. } for (n = 0; n < ti.length; n++) ! function (e) {
  5081. var t = document.getElementById("upgradeItem" + e);
  5082. t.onmouseover = function () {
  5083. c.weapons[e] ? vt(c.weapons[e], !0) : vt(c.list[e - c.weapons.length])
  5084. }, t.onclick = r.checkTrusted((function () {
  5085. e >= 0 && e <= 15 && (Ji = e), s.send("6", e)
  5086. })), r.hookTouchEvents(t)
  5087. }(ti[n]);
  5088. ti.length ? (He.style.display = "block", We.style.display = "block", We.innerHTML = "SELECT ITEMS (" + e + ")") : (He.style.display = "none", We.style.display = "none", vt())
  5089. } else He.style.display = "none", We.style.display = "none", vt()
  5090. }
  5091.  
  5092. function ii(e, t, n) {
  5093. null != e && (R.XP = e), null != t && (R.maxXP = t), null != n && (R.age = n), n == o.maxAge ? (Ye.innerHTML = "MAX AGE", ze.style.width = "100%") : (Ye.innerHTML = "AGE " + R.age, ze.style.width = (As ? R.XP / R.maxXP * 100 : 0) + "%")
  5094. }
  5095.  
  5096. function si(e) {
  5097. r.removeAllChildren(Ue);
  5098. for (var t = 1, n = 0; n < e.length; n += 3) ! function (n) {
  5099. r.generateElement({
  5100. class: "leaderHolder",
  5101. parent: Ue,
  5102. children: [r.generateElement({
  5103. class: "leaderboardItem",
  5104. style: "color:" + (e[n] == O ? "#fff" : "rgba(255,255,255,0.6)"),
  5105. text: t + ". " + ("" != e[n + 1] ? e[n + 1] : "unknown")
  5106. }), r.generateElement({
  5107. class: "leaderScore",
  5108. text: r.kFormat(e[n + 2]) || "0"
  5109. })]
  5110. })
  5111. }(n), t++
  5112. }
  5113.  
  5114. function ri() {
  5115. if (R && (!B || A - B >= 1e3 / o.clientSendRate)) {
  5116. B = A;
  5117. let e = Mn();
  5118. In !== e && (In = e, s.send("2", e))
  5119. }
  5120. if (Nn < 120 && (Nn += .1 * C, Ge.style.fontSize = Math.min(Math.round(Nn), 120) + "px"), R) {
  5121. var e = r.getDistance(U, L, R.x, R.y),
  5122. t = r.getDirection(R.x, R.y, U, L),
  5123. n = Math.min(.01 * e * C, e);
  5124. e > .05 ? (U += n * Math.cos(t), L += n * Math.sin(t)) : (U = R.x, L = R.y)
  5125. } else U = o.mapScale / 2, L = o.mapScale / 2;
  5126. for (var i = A - 1e3 / o.serverUpdateRate, a = 0; a < V.length + q.length; ++a)
  5127. if ((D = V[a] || q[a - V.length]) && D.visible)
  5128. if (D.forcePos) D.x = D.x2, D.y = D.y2, D.dir = D.d2;
  5129. else {
  5130. var l = D.t2 - D.t1,
  5131. c = (i - D.t1) / l;
  5132. D.dt += C;
  5133. var h = Math.min(1.7, D.dt / 170),
  5134. u = D.x2 - D.x1;
  5135. D.x = D.x1 + u * h, u = D.y2 - D.y1, D.y = D.y1 + u * h, D.dir = Math.lerpAngle(D.d2, D.d1, Math.min(1.2, c))
  5136. } var d = U - oe / 2,
  5137. f = L - le / 2;
  5138. if (o.snowBiomeTop - f <= 0 && o.mapScale - o.snowBiomeTop - f >= le ? (ve.fillStyle = "#b6db66", ve.fillRect(0, 0, oe, le)) : o.mapScale - o.snowBiomeTop - f <= 0 ? (ve.fillStyle = "#dbc666", ve.fillRect(0, 0, oe, le)) : o.snowBiomeTop - f >= le ? (ve.fillStyle = "#fff", ve.fillRect(0, 0, oe, le)) : o.snowBiomeTop - f >= 0 ? (ve.fillStyle = "#fff", ve.fillRect(0, 0, oe, o.snowBiomeTop - f), ve.fillStyle = "#b6db66", ve.fillRect(0, o.snowBiomeTop - f, oe, le - (o.snowBiomeTop - f))) : (ve.fillStyle = "#b6db66", ve.fillRect(0, 0, oe, o.mapScale - o.snowBiomeTop - f), ve.fillStyle = "#dbc666", ve.fillRect(0, o.mapScale - o.snowBiomeTop - f, oe, le - (o.mapScale - o.snowBiomeTop - f))), Wn || ((ee += te * o.waveSpeed * C) >= o.waveMax ? (ee = o.waveMax, te = -1) : ee <= 1 && (ee = te = 1), ve.globalAlpha = 1, ve.fillStyle = "#dbc666", hi(d, f, ve, o.riverPadding), ve.fillStyle = "#91b2db", hi(d, f, ve, 250 * (ee - 1))), ve.lineWidth = 4, ve.strokeStyle = "#000", ve.globalAlpha = on ? 0 : .06, ve.beginPath(), !on) {
  5139. for (var p = -U; p < oe; p += le / 18) p > 0 && (ve.moveTo(p, 0), ve.lineTo(p, le));
  5140. for (var m = -L; m < le; m += le / 18) m > 0 && (ve.moveTo(0, m), ve.lineTo(oe, m))
  5141. }
  5142. ve.stroke(), ve.globalAlpha = 1, ve.strokeStyle = it, ui(-1, d, f), ve.globalAlpha = 1, ve.lineWidth = rt, oi(0, d, f), fi(d, f, 0), ve.globalAlpha = 1;
  5143. for (a = 0; a < q.length; ++a)(D = q[a]).active && D.visible && (D.animate(C), ve.save(), ve.translate(D.x - d, D.y - f), ve.rotate(D.dir + D.dirPlus - Math.PI / 2), Xi(D, ve), ve.restore());
  5144. if (ui(0, d, f), oi(1, d, f), ui(1, d, f), fi(d, f, 1), ui(2, d, f), ui(3, d, f), ve.fillStyle = "#000", ve.globalAlpha = .09, d <= 0 && ve.fillRect(0, 0, -d, le), o.mapScale - d <= oe) {
  5145. var y = Math.max(0, -f);
  5146. ve.fillRect(o.mapScale - d, y, oe - (o.mapScale - d), le - y)
  5147. }
  5148. if (f <= 0 && ve.fillRect(-d, 0, oe + d, -f), o.mapScale - f <= le) {
  5149. var k = Math.max(0, -d),
  5150. w = 0;
  5151. o.mapScale - d <= oe && (w = oe - (o.mapScale - d)), ve.fillRect(k, o.mapScale - f, oe - k - w, le - (o.mapScale - f))
  5152. }
  5153. ve.globalAlpha = 1, ve.fillStyle = "rgba(0, 0, 70, 0.35)", ve.fillRect(0, 0, oe, le), ve.strokeStyle = st;
  5154. for (a = 0; a < V.length + q.length; ++a)
  5155. if ((D = V[a] || q[a - V.length]).visible && (10 != D.skinIndex || D == R || D.team && D.team == R.team)) {
  5156. var b = (D.team ? "[" + D.team + "] " : "") + (D.name || "");
  5157. if ("" != b) {
  5158. if (ve.font = (D.nameScale || 30) + "px Hammersmith One", ve.fillStyle = "#fff", ve.textBaseline = "middle", ve.textAlign = "center", ve.lineWidth = D.nameScale ? 11 : 8, ve.lineJoin = "round", ve.strokeText(b, D.x - d, D.y - f - D.scale - o.nameY), ve.fillText(b, D.x - d, D.y - f - D.scale - o.nameY), D.isLeader && Zn.crown.isLoaded) {
  5159. var v = o.crownIconScale;
  5160. k = D.x - d - v / 2 - ve.measureText(b).width / 2 - o.crownPad;
  5161. ve.drawImage(Zn.crown, k, D.y - f - D.scale - o.nameY - v / 2 - 5, v, v)
  5162. }
  5163. if (1 == D.iconIndex && Zn.skull.isLoaded) {
  5164. v = o.crownIconScale, k = D.x - d - v / 2 + ve.measureText(b).width / 2 + o.crownPad;
  5165. ve.drawImage(Zn.skull, k, D.y - f - D.scale - o.nameY - v / 2 - 5, v, v)
  5166. }
  5167. if (D.sid === ms[0] && $i && Zn.cross.isLoaded && ms.length && As) {
  5168. v = 2 * o.playerScale;
  5169. ve.drawImage(Zn.cross, D.x - d - v + o.playerScale, D.y - f - o.playerScale, v, v)
  5170. }
  5171. }
  5172. if ((!D.isPlayer || D == R || D.team && D.team == R.team || As ? D.health : D.isHitted) > 0) {
  5173. o.healthBarWidth;
  5174. ve.fillStyle = st, ve.roundRect(D.x - d - o.healthBarWidth - o.healthBarPad, D.y - f + D.scale + o.nameY, 2 * o.healthBarWidth + 2 * o.healthBarPad, 17, 8), ve.fill(), ve.fillStyle = D == R || D.team && D.team == R.team ? "#8ecc51" : "#cc5151", ve.roundRect(D.x - d - o.healthBarWidth, D.y - f + D.scale + o.nameY + o.healthBarPad, 2 * o.healthBarWidth * (D.health / D.maxHealth), 17 - 2 * o.healthBarPad, 7), ve.fill()
  5175. }
  5176. if (D.isPlayer && As) {
  5177. ve.font = (D.nameScale || 30) + "px Hammersmith One", ve.fillStyle = D.shameCount2 < D.dangerCount ? "#e6e6fa" : "#cc5151", ve.textBaseline = "middle", ve.textAlign = "center", ve.lineWidth = D.nameScale ? 11 : 8, ve.lineJoin = "round";
  5178. v = o.crownIconScale, k = D.x - d - v / 2 + ve.measureText(b).width / 2 + o.crownPad + (1 == D.iconIndex ? 2.5 * (D.nameScale || 30) : D.nameScale || 30);
  5179. ve.strokeText(D.shameCount2, k, D.y - f - D.scale - o.nameY), ve.fillText(D.shameCount2, k, D.y - f - D.scale - o.nameY);
  5180. o.healthBarWidth;
  5181. ve.fillStyle = st, ve.roundRect(D.x - d - o.healthBarWidth - o.healthBarPad + 50, D.y - f + D.scale + o.nameY - 13, o.healthBarWidth + 2 * o.healthBarPad, 17, 8), ve.fill(), ve.fillStyle = 1 == D.sR && (D == R || D.team && D.team == R.team) ? "#8ecc51" : "#cc5151", ve.roundRect(D.x - d - o.healthBarWidth + 50, D.y - f + D.scale + o.nameY - 13 + o.healthBarPad, o.healthBarWidth * D.sR, 17 - 2 * o.healthBarPad, 7), ve.fill();
  5182. o.healthBarWidth;
  5183. if (ve.fillStyle = st, ve.roundRect(D.x - d - o.healthBarWidth - o.healthBarPad, D.y - f + D.scale + o.nameY - 13, o.healthBarWidth + 2 * o.healthBarPad, 17, 8), ve.fill(), ve.fillStyle = 1 == D.pR && (D == R || D.team && D.team == R.team) ? "#8ecc51" : "#cc5151", ve.roundRect(D.x - d - o.healthBarWidth, D.y - f + D.scale + o.nameY - 13 + o.healthBarPad, o.healthBarWidth * D.pR, 17 - 2 * o.healthBarPad, 7), ve.fill(), D == R) {
  5184. if (ve.font = "20px Hammersmith One", ve.fillStyle = "#fff", ve.textBaseline = "middle", ve.textAlign = "center", ve.lineWidth = D.nameScale ? 11 : 8, ve.lineJoin = "round", ve.strokeText("[" + $i + "]", D.x - d, D.y - f + D.scale + o.nameY + 40.5), ve.fillText("[" + $i + "]", D.x - d, D.y - f + D.scale + o.nameY + 40.5), D.tR < 1) {
  5185. o.healthBarWidth;
  5186. ve.fillStyle = st, ve.roundRect(D.x - d - o.healthBarWidth - o.healthBarPad, D.y - f + D.scale + o.nameY + 13, 2 * o.healthBarWidth + 2 * o.healthBarPad, 17, 8), ve.fill(), ve.fillStyle = "#a5974c", ve.roundRect(D.x - d - o.healthBarWidth, D.y - f + D.scale + o.nameY + 13 + o.healthBarPad, 2 * o.healthBarWidth * D.tR, 17 - 2 * o.healthBarPad, 7), ve.fill()
  5187. }
  5188. } else if (ve.font = "20px Hammersmith One", ve.fillStyle = "#fff", ve.textBaseline = "middle", ve.textAlign = "center", ve.lineWidth = D.nameScale ? 11 : 8, ve.lineJoin = "round", ve.strokeText("[" + xs[D.sid] + "/" + Is[D.sid] + "]", D.x - d, D.y - f + D.scale + o.nameY + 27), ve.fillText("[" + xs[D.sid] + "/" + Is[D.sid] + "]", D.x - d, D.y - f + D.scale + o.nameY + 27), !(D == R || D.team && D.team == R.team)) {
  5189. let e = function (e, t) {
  5190. return Math.hypot(e.y1 - t.y1, e.x1 - t.x1)
  5191. },
  5192. t = function (e, t) {
  5193. return Math.atan2(e.y1 - t.y1, e.x1 - t.x1)
  5194. },
  5195. n = Math.floor(e(D, R)),
  5196. i = function (e) {
  5197. return n / e
  5198. };
  5199. ve.save(), ve.translate(R.x1 + i(2) * Math.cos(t(D, R)) - d, R.y1 + i(2) * Math.sin(t(D, R)) - f), ve.rotate(t(D, R) + Math.PI / 2), ve.fillStyle = "hsl(" + i(14) + ", 100%, 50%)", ve.globalAlpha = i(1440) > 1 ? 1 : i(1440), Ri(o.playerScale, ve), ve.restore()
  5200. }
  5201. }
  5202. } g.update(C, ve, d, f);
  5203. for (a = 0; a < V.length; ++a) {
  5204. if ((D = V[a]).visible && D.chatCountdown > 0) {
  5205. D.chatCountdown -= C, D.chatCountdown <= 0 && (D.chatCountdown = 0), ve.font = "32px Hammersmith One";
  5206. var x = ve.measureText(D.chatMessage);
  5207. ve.textBaseline = "middle", ve.textAlign = "center";
  5208. k = D.x - d, y = D.y - D.scale - f - 90;
  5209. var S = 47,
  5210. I = x.width + 17;
  5211. ve.fillStyle = "rgba(0,0,0,0.2)", ve.roundRect(k - I / 2, y - S / 2, I, S, 6), ve.fill(), ve.fillStyle = "#fff", ve.fillText(D.chatMessage, k, y)
  5212. }
  5213. if (D.visible && D.iChatCountdown > 0) {
  5214. D.iChatCountdown -= C, D.iChatCountdown <= 0 && (D.iChatCountdown = 0), ve.font = "32px Hammersmith One";
  5215. x = ve.measureText(D.iChatMessage);
  5216. ve.textBaseline = "middle", ve.textAlign = "center";
  5217. k = D.x - d, y = D.y - D.scale - f + 180, S = 47, I = x.width + 17;
  5218. ve.fillStyle = "rgba(0,0,0,0.2)", ve.roundRect(k - I / 2, y - S / 2, I, S, 6), ve.fill(), ve.fillStyle = "rgba(255,255,255,0.6)", ve.fillText(D.iChatMessage, k, y)
  5219. }
  5220. }! function (e) {
  5221. if (R && R.alive) {
  5222. $e.clearRect(0, 0, Xe.width, Xe.height), $e.strokeStyle = "#fff", $e.lineWidth = 4;
  5223. for (var t = 0; t < zt.length; ++t)(Ft = zt[t]).update($e, e);
  5224. for ($e.strokeStyle = "#cc5151", $e.lineWidth = 4, t = 0; t < Ht.length; ++t)(Yt = Ht[t]).update($e, e);
  5225. if ($e.globalAlpha = 1, $e.fillStyle = "#fff", Ci(R.x / o.mapScale * Xe.width, R.y / o.mapScale * Xe.height, 7, $e, !0), $e.fillStyle = "rgba(255,255,255,0.35)", R.team && St)
  5226. for (t = 0; t < St.length;) Ci(St[t] / o.mapScale * Xe.width, St[t + 1] / o.mapScale * Xe.height, 7, $e, !0), t += 2;
  5227. xt && ($e.fillStyle = "#fc5553", $e.font = "34px Hammersmith One", $e.textBaseline = "middle", $e.textAlign = "center", $e.fillText("x", xt.x / o.mapScale * Xe.width, xt.y / o.mapScale * Xe.height)), It && ($e.fillStyle = "#fff", $e.font = "34px Hammersmith One", $e.textBaseline = "middle", $e.textAlign = "center", $e.fillText("x", It.x / o.mapScale * Xe.width, It.y / o.mapScale * Xe.height))
  5228. }
  5229. }(C), -1 !== se.id && ai(se.startX, se.startY, se.currentX, se.currentY), -1 !== re.id && ai(re.startX, re.startY, re.currentX, re.currentY)
  5230. }
  5231.  
  5232. function ai(e, t, n, i) {
  5233. ve.save(), ve.setTransform(1, 0, 0, 1, 0, 0), ve.scale(H, H);
  5234. var s = 50;
  5235. ve.beginPath(), ve.arc(e, t, s, 0, 2 * Math.PI, !1), ve.closePath(), ve.fillStyle = "rgba(255, 255, 255, 0.3)", ve.fill();
  5236. s = 50;
  5237. var r = n - e,
  5238. a = i - t,
  5239. o = Math.sqrt(Math.pow(r, 2) + Math.pow(a, 2)),
  5240. l = o > s ? o / s : 1;
  5241. r /= l, a /= l, ve.beginPath(), ve.arc(e + r, t + a, .5 * s, 0, 2 * Math.PI, !1), ve.closePath(), ve.fillStyle = "white", ve.fill(), ve.restore()
  5242. }
  5243.  
  5244. function oi(e, t, n) {
  5245. for (var i = 0; i < G.length; ++i)(D = G[i]).active && D.layer == e && (D.update(C), D.active && Gi(D.x - t, D.y - n, D.scale) && (ve.save(), ve.translate(D.x - t, D.y - n), ve.rotate(D.dir), ci(0, 0, D, ve, 1), ve.restore()))
  5246. }
  5247. var li = {};
  5248.  
  5249. function ci(e, t, n, i, s) {
  5250. if (n.src) {
  5251. var r = c.projectiles[n.indx].src,
  5252. a = li[r];
  5253. a || ((a = new Image).onload = function () {
  5254. this.isLoaded = !0
  5255. }, a.src = ".././img/weapons/" + r + ".png", li[r] = a), a.isLoaded && i.drawImage(a, e - n.scale / 2, t - n.scale / 2, n.scale, n.scale)
  5256. } else 1 == n.indx && (i.fillStyle = "#939393", Ci(e, t, n.scale, i))
  5257. }
  5258.  
  5259. function hi(e, t, n, i) {
  5260. var s = o.riverWidth + i,
  5261. r = o.mapScale / 2 - t - s / 2;
  5262. r < le && r + s > 0 && n.fillRect(0, r, oe, s)
  5263. }
  5264.  
  5265. function ui(e, t, n) {
  5266. for (var i, s, r, a = 0; a < X.length; ++a)(D = X[a]).active && (s = D.x + D.xWiggle - t, r = D.y + D.yWiggle - n, 0 == e && D.update(C), D.layer == e && Gi(s, r, D.scale + (D.blocker || 0)) && (ve.globalAlpha = D.hideFromEnemy ? .6 : 1, D.isItem ? (i = Ei(D, !1), ve.save(), ve.translate(s, r), ve.rotate(As ? D.dir : 0), ve.drawImage(i, -i.width / 2, -i.height / 2), D.blocker && (ve.strokeStyle = "#db6e6e", ve.globalAlpha = .3, ve.lineWidth = 6, Ci(0, 0, D.blocker, ve, !1, !0)), ve.restore()) : (i = Ii(D), ve.drawImage(i, s - i.width / 2, r - i.height / 2))))
  5267. }
  5268.  
  5269. function di(e, t, n) {
  5270. (D = Ks(e)) && (D.startAnim(t, n), n < 9 ? (D.pR = -1e3 / o.serverUpdateRate / c.weapons[n].speed, D.pCd = c.weapons[n].count) : n > 8 && (D.sR = -1e3 / o.serverUpdateRate / c.weapons[n].speed, D.sCd = c.weapons[n].count), D == R && rs && 10 == R.weapons[1] && R.skins[40] && ns.hitCount++)
  5271. }
  5272.  
  5273. function fi(e, t, n) {
  5274. ve.globalAlpha = 1;
  5275. for (var i = 0; i < V.length; ++i)(D = V[i]).zIndex == n && (D.animate(C), D.visible && (D.skinRot += .002 * C, F = (D == R && As ? jn() : D.dir) + D.dirPlus, ve.save(), ve.translate(D.x - e, D.y - t), ve.rotate(F), pi(D, ve), ve.restore()))
  5276. }
  5277.  
  5278. function pi(e, t) {
  5279. (t = t || ve).lineWidth = rt, t.lineJoin = "miter";
  5280. var n = Math.PI / 4 * (c.weapons[e.weaponIndex].armS || 1),
  5281. i = e.buildIndex < 0 && c.weapons[e.weaponIndex].hndS || 1,
  5282. s = e.buildIndex < 0 && c.weapons[e.weaponIndex].hndD || 1;
  5283. if (e.tailIndex > 0 && function (e, t, n) {
  5284. if (!(mi = wi[e])) {
  5285. var i = new Image;
  5286. i.onload = function () {
  5287. this.isLoaded = !0, this.onload = null
  5288. }, i.src = ".././img/accessories/access_" + e + ".png", wi[e] = i, mi = i
  5289. }
  5290. var s = bi[e];
  5291. if (!s) {
  5292. for (var r = 0; r < tt.length; ++r)
  5293. if (tt[r].id == e) {
  5294. s = tt[r];
  5295. break
  5296. } bi[e] = s
  5297. }
  5298. mi.isLoaded && (t.save(), t.translate(-20 - (s.xOff || 0), 0), s.spin && t.rotate(n.skinRot), t.drawImage(mi, -s.scale / 2, -s.scale / 2, s.scale, s.scale), t.restore())
  5299. }(e.tailIndex, t, e), e.buildIndex < 0 && !c.weapons[e.weaponIndex].aboveHand && (xi(c.weapons[e.weaponIndex], o.weaponVariants[e.weaponVariant].src, e.scale, 0, t), null == c.weapons[e.weaponIndex].projectile || c.weapons[e.weaponIndex].hideProjectile || ci(e.scale, 0, c.projectiles[c.weapons[e.weaponIndex].projectile], ve)), t.fillStyle = o.skinColors[e.skinColor], Ci(e.scale * Math.cos(n), e.scale * Math.sin(n), 14), Ci(e.scale * s * Math.cos(-n * i), e.scale * s * Math.sin(-n * i), 14), e.buildIndex < 0 && c.weapons[e.weaponIndex].aboveHand && (xi(c.weapons[e.weaponIndex], o.weaponVariants[e.weaponVariant].src, e.scale, 0, t), null == c.weapons[e.weaponIndex].projectile || c.weapons[e.weaponIndex].hideProjectile || ci(e.scale, 0, c.projectiles[c.weapons[e.weaponIndex].projectile], ve)), e.buildIndex >= 0) {
  5300. var r = Ei(c.list[e.buildIndex], !0);
  5301. t.drawImage(r, e.scale - c.list[e.buildIndex].holdOffset, -r.width / 2)
  5302. }
  5303. Ci(0, 0, e.scale, t), e.skinIndex > 0 && (t.rotate(Math.PI / 2), ki(e.skinIndex, t, null, e))
  5304. }
  5305. var mi, gi = {},
  5306. yi = {};
  5307.  
  5308. function ki(e, t, n, i) {
  5309. if (!(mi = gi[e])) {
  5310. var s = new Image;
  5311. s.onload = function () {
  5312. this.isLoaded = !0, this.onload = null
  5313. }, s.src = ".././img/hats/hat_" + e + ".png", gi[e] = s, mi = s
  5314. }
  5315. var r = n || yi[e];
  5316. if (!r) {
  5317. for (var a = 0; a < et.length; ++a)
  5318. if (et[a].id == e) {
  5319. r = et[a];
  5320. break
  5321. } yi[e] = r
  5322. }
  5323. mi.isLoaded && t.drawImage(mi, -r.scale / 2, -r.scale / 2, r.scale, r.scale), !n && r.topSprite && (t.save(), t.rotate(i.skinRot), ki(e + "_top", t, r, i), t.restore())
  5324. }
  5325. var wi = {},
  5326. bi = {};
  5327. var vi = {};
  5328.  
  5329. function xi(e, t, n, i, s) {
  5330. var r = e.src + (t || ""),
  5331. a = vi[r];
  5332. a || ((a = new Image).onload = function () {
  5333. this.isLoaded = !0
  5334. }, a.src = ".././img/weapons/" + r + ".png", vi[r] = a), a.isLoaded && s.drawImage(a, n + e.xOff - e.length / 2, i + e.yOff - e.width / 2, e.length, e.width)
  5335. }
  5336. var Si = {};
  5337.  
  5338. function Ii(e) {
  5339. var t = e.y >= o.mapScale - o.snowBiomeTop ? 2 : e.y <= o.snowBiomeTop ? 1 : 0,
  5340. n = e.type + "_" + e.scale + "_" + t,
  5341. i = Si[n];
  5342. if (!i) {
  5343. var s = document.createElement("canvas");
  5344. s.width = s.height = 2.1 * e.scale + rt;
  5345. var a = s.getContext("2d");
  5346. if (a.translate(s.width / 2, s.height / 2), a.rotate(r.randFloat(0, Math.PI)), a.strokeStyle = it, a.lineWidth = rt, 0 == e.type)
  5347. for (var l, c = 0; c < 2; ++c) Ai(a, 7, l = D.scale * (c ? .5 : 1), .7 * l), a.fillStyle = t ? c ? "#fff" : "#e3f1f4" : c ? "#b4db62" : "#9ebf57", a.fill(), c || a.stroke();
  5348. else if (1 == e.type)
  5349. if (2 == t) a.fillStyle = "#606060", Ai(a, 6, .3 * e.scale, .71 * e.scale), a.fill(), a.stroke(), a.fillStyle = "#89a54c", Ci(0, 0, .55 * e.scale, a), a.fillStyle = "#a5c65b", Ci(0, 0, .3 * e.scale, a, !0);
  5350. else {
  5351. var h;
  5352. ! function (e, t, n, i) {
  5353. var s, a = Math.PI / 2 * 3,
  5354. o = Math.PI / t;
  5355. e.beginPath(), e.moveTo(0, -i);
  5356. for (var l = 0; l < t; l++) s = r.randInt(n + .9, 1.2 * n), e.quadraticCurveTo(Math.cos(a + o) * s, Math.sin(a + o) * s, Math.cos(a + 2 * o) * i, Math.sin(a + 2 * o) * i), a += 2 * o;
  5357. e.lineTo(0, -i), e.closePath()
  5358. }(a, 6, D.scale, .7 * D.scale), a.fillStyle = t ? "#e3f1f4" : "#89a54c", a.fill(), a.stroke(), a.fillStyle = t ? "#6a64af" : "#c15555";
  5359. var u = I / 4;
  5360. for (c = 0; c < 4; ++c) Ci((h = r.randInt(D.scale / 3.5, D.scale / 2.3)) * Math.cos(u * c), h * Math.sin(u * c), r.randInt(10, 12), a)
  5361. }
  5362. else 2 != e.type && 3 != e.type || (a.fillStyle = 2 == e.type ? 2 == t ? "#938d77" : "#939393" : "#e0c655", Ai(a, 3, e.scale, e.scale), a.fill(), a.stroke(), a.fillStyle = 2 == e.type ? 2 == t ? "#b2ab90" : "#bcbcbc" : "#ebdca3", Ai(a, 3, .55 * e.scale, .65 * e.scale), a.fill());
  5363. i = s, Si[n] = i
  5364. }
  5365. return i
  5366. }
  5367. var Ti = [];
  5368.  
  5369. function Mi(e, t) {
  5370. var n = Ti[e.id];
  5371. if (!n || t) {
  5372. var i = document.createElement("canvas");
  5373. i.width = i.height = 2.5 * e.scale + rt + (c.list[e.id].spritePadding || 0);
  5374. var s = i.getContext("2d");
  5375. if (s.translate(i.width / 2, i.height / 2), s.rotate(t ? 0 : Math.PI / 2), s.strokeStyle = it, s.lineWidth = rt * (t ? i.width / 81 : 1), "apple" == e.name) {
  5376. s.fillStyle = "#c15555", Ci(0, 0, e.scale, s), s.fillStyle = "#89a54c";
  5377. var a = -Math.PI / 2;
  5378. Pi(e.scale * Math.cos(a), e.scale * Math.sin(a), 25, a + Math.PI / 2, s)
  5379. } else if ("cookie" == e.name) {
  5380. s.fillStyle = "#cca861", Ci(0, 0, e.scale, s), s.fillStyle = "#937c4b";
  5381. for (var o = I / (h = 4), l = 0; l < h; ++l) Ci((u = r.randInt(e.scale / 2.5, e.scale / 1.7)) * Math.cos(o * l), u * Math.sin(o * l), r.randInt(4, 5), s, !0)
  5382. } else if ("cheese" == e.name) {
  5383. s.fillStyle = "#f4f3ac", Ci(0, 0, e.scale, s), s.fillStyle = "#c3c28b";
  5384. var h, u;
  5385. for (o = I / (h = 4), l = 0; l < h; ++l) Ci((u = r.randInt(e.scale / 2.5, e.scale / 1.7)) * Math.cos(o * l), u * Math.sin(o * l), r.randInt(4, 5), s, !0)
  5386. } else if ("wood wall" == e.name || "stone wall" == e.name || "castle wall" == e.name) {
  5387. s.fillStyle = "castle wall" == e.name ? "#83898e" : "wood wall" == e.name ? "#a5974c" : "#939393";
  5388. var d = "castle wall" == e.name ? 4 : 3;
  5389. Ai(s, d, 1.1 * e.scale, 1.1 * e.scale), s.fill(), s.stroke(), s.fillStyle = "castle wall" == e.name ? "#9da4aa" : "wood wall" == e.name ? "#c9b758" : "#bcbcbc", Ai(s, d, .65 * e.scale, .65 * e.scale), s.fill()
  5390. } else if ("spikes" == e.name || "greater spikes" == e.name || "poison spikes" == e.name || "spinning spikes" == e.name) {
  5391. s.fillStyle = "poison spikes" == e.name ? "#7b935d" : "#939393";
  5392. var f = .6 * e.scale;
  5393. Ai(s, "spikes" == e.name ? 5 : 6, e.scale, f), s.fill(), s.stroke(), s.fillStyle = "#a5974c", Ci(0, 0, f, s), s.fillStyle = "#c9b758", Ci(0, 0, f / 2, s, !0)
  5394. } else if ("windmill" == e.name || "faster windmill" == e.name || "power mill" == e.name) s.fillStyle = "#a5974c", Ci(0, 0, e.scale, s), s.fillStyle = "#c9b758", _i(0, 0, 1.5 * e.scale, 29, 4, s), s.fillStyle = "#a5974c", Ci(0, 0, .5 * e.scale, s);
  5395. else if ("mine" == e.name) s.fillStyle = "#939393", Ai(s, 3, e.scale, e.scale), s.fill(), s.stroke(), s.fillStyle = "#bcbcbc", Ai(s, 3, .55 * e.scale, .65 * e.scale), s.fill();
  5396. else if ("sapling" == e.name)
  5397. for (l = 0; l < 2; ++l) {
  5398. Ai(s, 7, f = e.scale * (l ? .5 : 1), .7 * f), s.fillStyle = l ? "#b4db62" : "#9ebf57", s.fill(), l || s.stroke()
  5399. } else if ("pit trap" == e.name) s.fillStyle = "#a5974c", Ai(s, 3, 1.1 * e.scale, 1.1 * e.scale), s.fill(), s.stroke(), s.fillStyle = it, Ai(s, 3, .65 * e.scale, .65 * e.scale), s.fill();
  5400. else if ("boost pad" == e.name) s.fillStyle = "#7e7f82", Bi(0, 0, 2 * e.scale, 2 * e.scale, s), s.fill(), s.stroke(), s.fillStyle = "#dbd97d", Ri(1 * e.scale, s);
  5401. else if ("turret" == e.name) {
  5402. s.fillStyle = "#a5974c", Ci(0, 0, e.scale, s), s.fill(), s.stroke(), s.fillStyle = "#939393";
  5403. Bi(0, -25, .9 * e.scale, 50, s), Ci(0, 0, .6 * e.scale, s), s.fill(), s.stroke()
  5404. } else if ("platform" == e.name) {
  5405. s.fillStyle = "#cebd5f";
  5406. var p = 2 * e.scale,
  5407. m = p / 4,
  5408. g = -e.scale / 2;
  5409. for (l = 0; l < 4; ++l) Bi(g - m / 2, 0, m, 2 * e.scale, s), s.fill(), s.stroke(), g += p / 4
  5410. } else "healing pad" == e.name ? (s.fillStyle = "#7e7f82", Bi(0, 0, 2 * e.scale, 2 * e.scale, s), s.fill(), s.stroke(), s.fillStyle = "#db6e6e", _i(0, 0, .65 * e.scale, 20, 4, s, !0)) : "spawn pad" == e.name ? (s.fillStyle = "#7e7f82", Bi(0, 0, 2 * e.scale, 2 * e.scale, s), s.fill(), s.stroke(), s.fillStyle = "#71aad6", Ci(0, 0, .6 * e.scale, s)) : "blocker" == e.name ? (s.fillStyle = "#7e7f82", Ci(0, 0, e.scale, s), s.fill(), s.stroke(), s.rotate(Math.PI / 4), s.fillStyle = "#db6e6e", _i(0, 0, .65 * e.scale, 20, 4, s, !0)) : "teleporter" == e.name && (s.fillStyle = "#7e7f82", Ci(0, 0, e.scale, s), s.fill(), s.stroke(), s.rotate(Math.PI / 4), s.fillStyle = "#d76edb", Ci(0, 0, .5 * e.scale, s, !0));
  5411. n = i, t || (Ti[e.id] = n)
  5412. }
  5413. return n
  5414. }
  5415. var ji = [];
  5416.  
  5417. function Ei(e, t) {
  5418. var n = ji[e.id + (!t && R && R.sid != e.owner.sid && !er(e.owner.sid) && As ? 23 : 0)];
  5419. if (!n) {
  5420. var i = document.createElement("canvas");
  5421. i.width = i.height = 2.5 * e.scale + rt + (c.list[e.id].spritePadding || 0);
  5422. var s = i.getContext("2d");
  5423. if (s.translate(i.width / 2, i.height / 2), s.rotate(Math.PI / 2), s.strokeStyle = it, s.lineWidth = rt, "apple" == e.name) {
  5424. s.fillStyle = "#c15555", Ci(0, 0, e.scale, s), s.fillStyle = "#89a54c";
  5425. var a = -Math.PI / 2;
  5426. Pi(e.scale * Math.cos(a), e.scale * Math.sin(a), 25, a + Math.PI / 2, s)
  5427. } else if ("cookie" == e.name) {
  5428. s.fillStyle = "#cca861", Ci(0, 0, e.scale, s), s.fillStyle = "#937c4b";
  5429. for (var o = I / (h = 4), l = 0; l < h; ++l) Ci((u = r.randInt(e.scale / 2.5, e.scale / 1.7)) * Math.cos(o * l), u * Math.sin(o * l), r.randInt(4, 5), s, !0)
  5430. } else if ("cheese" == e.name) {
  5431. s.fillStyle = "#f4f3ac", Ci(0, 0, e.scale, s), s.fillStyle = "#c3c28b";
  5432. var h, u;
  5433. for (o = I / (h = 4), l = 0; l < h; ++l) Ci((u = r.randInt(e.scale / 2.5, e.scale / 1.7)) * Math.cos(o * l), u * Math.sin(o * l), r.randInt(4, 5), s, !0)
  5434. } else if ("wood wall" == e.name || "stone wall" == e.name || "castle wall" == e.name) {
  5435. s.fillStyle = "castle wall" == e.name ? "#83898e" : "wood wall" == e.name ? "#a5974c" : "#939393";
  5436. var d = "castle wall" == e.name ? 4 : 3;
  5437. Ai(s, d, 1.1 * e.scale, 1.1 * e.scale), s.fill(), s.stroke(), s.fillStyle = "castle wall" == e.name ? "#9da4aa" : "wood wall" == e.name ? "#c9b758" : "#bcbcbc", Ai(s, d, .65 * e.scale, .65 * e.scale), s.fill()
  5438. } else if ("spikes" == e.name || "greater spikes" == e.name || "poison spikes" == e.name || "spinning spikes" == e.name) {
  5439. s.fillStyle = "poison spikes" == e.name ? "#7b935d" : "#939393";
  5440. var f = .6 * e.scale;
  5441. Ai(s, "spikes" == e.name ? 5 : 6, e.scale, f), s.fill(), s.stroke(), s.fillStyle = "#a5974c", Ci(0, 0, f, s), !t && R && R.sid != e.owner.sid && !er(e.owner.sid) && As ? s.fillStyle = "#cc5151" : s.fillStyle = "#c9b758", Ci(0, 0, f / 2, s, !0)
  5442. } else if ("windmill" == e.name || "faster windmill" == e.name || "power mill" == e.name) s.fillStyle = "#a5974c", Ci(0, 0, e.scale, s), s.fillStyle = "#c9b758", _i(0, 0, 1.5 * e.scale, 29, 4, s), s.fillStyle = "#a5974c", Ci(0, 0, .5 * e.scale, s);
  5443. else if ("mine" == e.name) s.fillStyle = "#939393", Ai(s, 3, e.scale, e.scale), s.fill(), s.stroke(), s.fillStyle = "#bcbcbc", Ai(s, 3, .55 * e.scale, .65 * e.scale), s.fill();
  5444. else if ("sapling" == e.name)
  5445. for (l = 0; l < 2; ++l) {
  5446. Ai(s, 7, f = e.scale * (l ? .5 : 1), .7 * f), s.fillStyle = l ? "#b4db62" : "#9ebf57", s.fill(), l || s.stroke()
  5447. } else if ("pit trap" == e.name) s.fillStyle = "#a5974c", Ai(s, 3, 1.1 * e.scale, 1.1 * e.scale), s.fill(), s.stroke(), !t && R && R.sid != e.owner.sid && !er(e.owner.sid) && As ? s.fillStyle = "#cc5151" : s.fillStyle = it, Ai(s, 3, .65 * e.scale, .65 * e.scale), s.fill();
  5448. else if ("boost pad" == e.name) s.fillStyle = "#7e7f82", Bi(0, 0, 2 * e.scale, 2 * e.scale, s), s.fill(), s.stroke(), s.fillStyle = "#dbd97d", Ri(1 * e.scale, s);
  5449. else if ("turret" == e.name) {
  5450. s.fillStyle = "#a5974c", Ci(0, 0, e.scale, s), s.fill(), s.stroke(), s.fillStyle = "#939393";
  5451. Bi(0, -25, .9 * e.scale, 50, s), Ci(0, 0, .6 * e.scale, s), s.fill(), s.stroke()
  5452. } else if ("platform" == e.name) {
  5453. s.fillStyle = "#cebd5f";
  5454. var p = 2 * e.scale,
  5455. m = p / 4,
  5456. g = -e.scale / 2;
  5457. for (l = 0; l < 4; ++l) Bi(g - m / 2, 0, m, 2 * e.scale, s), s.fill(), s.stroke(), g += p / 4
  5458. } else "healing pad" == e.name ? (s.fillStyle = "#7e7f82", Bi(0, 0, 2 * e.scale, 2 * e.scale, s), s.fill(), s.stroke(), s.fillStyle = "#db6e6e", _i(0, 0, .65 * e.scale, 20, 4, s, !0)) : "spawn pad" == e.name ? (s.fillStyle = "#7e7f82", Bi(0, 0, 2 * e.scale, 2 * e.scale, s), s.fill(), s.stroke(), s.fillStyle = "#71aad6", Ci(0, 0, .6 * e.scale, s)) : "blocker" == e.name ? (s.fillStyle = "#7e7f82", Ci(0, 0, e.scale, s), s.fill(), s.stroke(), s.rotate(Math.PI / 4), s.fillStyle = "#db6e6e", _i(0, 0, .65 * e.scale, 20, 4, s, !0)) : "teleporter" == e.name && (s.fillStyle = "#7e7f82", Ci(0, 0, e.scale, s), s.fill(), s.stroke(), s.rotate(Math.PI / 4), s.fillStyle = "#d76edb", Ci(0, 0, .5 * e.scale, s, !0));
  5459. n = i, ji[e.id + (!t && R && R.sid != e.owner.sid && !er(e.owner.sid) && As ? 23 : 0)] = n
  5460. }
  5461. return n
  5462. }
  5463.  
  5464. function Pi(e, t, n, i, s) {
  5465. var r = e + n * Math.cos(i),
  5466. a = t + n * Math.sin(i),
  5467. o = .4 * n;
  5468. s.moveTo(e, t), s.beginPath(), s.quadraticCurveTo((e + r) / 2 + o * Math.cos(i + Math.PI / 2), (t + a) / 2 + o * Math.sin(i + Math.PI / 2), r, a), s.quadraticCurveTo((e + r) / 2 - o * Math.cos(i + Math.PI / 2), (t + a) / 2 - o * Math.sin(i + Math.PI / 2), e, t), s.closePath(), s.fill(), s.stroke()
  5469. }
  5470.  
  5471. function Ci(e, t, n, i, s, r) {
  5472. (i = i || ve).beginPath(), i.arc(e, t, n, 0, 2 * Math.PI), r || i.fill(), s || i.stroke()
  5473. }
  5474.  
  5475. function Ai(e, t, n, i) {
  5476. var s, r, a = Math.PI / 2 * 3,
  5477. o = Math.PI / t;
  5478. e.beginPath(), e.moveTo(0, -n);
  5479. for (var l = 0; l < t; l++) s = Math.cos(a) * n, r = Math.sin(a) * n, e.lineTo(s, r), a += o, s = Math.cos(a) * i, r = Math.sin(a) * i, e.lineTo(s, r), a += o;
  5480. e.lineTo(0, -n), e.closePath()
  5481. }
  5482.  
  5483. function Bi(e, t, n, i, s, r) {
  5484. s.fillRect(e - n / 2, t - i / 2, n, i), r || s.strokeRect(e - n / 2, t - i / 2, n, i)
  5485. }
  5486.  
  5487. function _i(e, t, n, i, s, r, a) {
  5488. r.save(), r.translate(e, t), s = Math.ceil(s / 2);
  5489. for (var o = 0; o < s; o++) Bi(0, 0, 2 * n, i, r, a), r.rotate(Math.PI / s);
  5490. r.restore()
  5491. }
  5492.  
  5493. function Ri(e, t) {
  5494. t = t || ve;
  5495. var n = e * (Math.sqrt(3) / 2);
  5496. t.beginPath(), t.moveTo(0, -n / 2), t.lineTo(-e / 2, n / 2), t.lineTo(e / 2, n / 2), t.lineTo(0, -n / 2), t.fill(), t.closePath()
  5497. }
  5498.  
  5499. function Oi(e, t) {
  5500. let n = Math.atan2(R.y2 - e, R.x2 - t);
  5501. ms.length && Os(ms, R) <= 250 ? qs(2, n + Math.PI) : R.items[4] && qs(4, n + Math.PI)
  5502. }
  5503.  
  5504. function Di(e) {
  5505. for (var t = 0; t < e.length;) nt.add(e[t], e[t + 1], e[t + 2], e[t + 3], e[t + 4], e[t + 5], c.list[e[t + 6]], !0, e[t + 7] >= 0 ? {
  5506. sid: e[t + 7]
  5507. } : null), 15 == e[t + 6] && Math.hypot(R.y2 - e[t + 2], R.x2 - e[t + 1]) <= 85 && e[t + 7] != R.sid && !er(e[t + 7]) && (Oi(e[t + 2], e[t + 1]), n = e[t], ns = {
  5508. sid: n,
  5509. hitCount: 0
  5510. }, rs = !0, Kt(6, 0), Jt(0, 1)), t += 8;
  5511. var n
  5512. }
  5513.  
  5514. function Ui(e, t) {
  5515. (D = Zs(t)) && (D.xWiggle += o.gatherWiggle * Math.cos(e), D.yWiggle += o.gatherWiggle * Math.sin(e))
  5516. }
  5517.  
  5518. function Li(e, t) {
  5519. (D = Zs(e)) && (D.dir = t, D.xWiggle += o.gatherWiggle * Math.cos(t + Math.PI), D.yWiggle += o.gatherWiggle * Math.sin(t + Math.PI))
  5520. }
  5521.  
  5522. function Fi(e, t, n, i, s, r, a, l) {
  5523. ht && (J.addProjectile(e, t, n, i, s, r, null, null, a).sid = l, function (e, t, n, i, s) {
  5524. let r = 1 / 0,
  5525. a = D;
  5526. for (let i = 0; i < V.length; i++)(D = V[i]).visible && Is[D.sid] && void 0 !== c.weapons[Is[D.sid]].projectile && c.projectiles[c.weapons[Is[D.sid]].projectile].speed == s && r > (1.5 * D.x2 - D.x1 / 2 - e + 80 * Math.cos(n)) ** 2 + (1.5 * D.y2 - D.y1 / 2 - t + 80 * Math.sin(n)) ** 2 && (a = D, r = (1.5 * D.x2 - D.x1 / 2 - e + 80 * Math.cos(n)) ** 2 + (1.5 * D.y2 - D.y1 / 2 - t + 80 * Math.sin(n)) ** 2);
  5527. if (Math.sqrt(r) > 60)
  5528. if (1.5 == s) {
  5529. for (let i = 0; i < V.length; i++)(D = V[i]).visible && r > (1.5 * D.x2 - D.x1 / 2 - e + 10 * Math.cos(n)) ** 2 + (1.5 * D.y2 - D.y1 / 2 - t + 10 * Math.sin(n)) ** 2 && (a = D, r = (1.5 * D.x2 - D.x1 / 2 - e + 10 * Math.cos(n)) ** 2 + (1.5 * D.y2 - D.y1 / 2 - t + 10 * Math.sin(n)) ** 2);
  5530. Math.sqrt(r) < 60 && (Hi(a, "bullet"), a.tR = -1e3 / o.serverUpdateRate / 2500)
  5531. } else {
  5532. for (let i = 0; i < V.length; i++)(D = V[i]).visible && Is[D.sid] && r > (1.5 * D.x2 - D.x1 / 2 - e + 80 * Math.cos(n)) ** 2 + (1.5 * D.y2 - D.y1 / 2 - t + 80 * Math.sin(n)) ** 2 && (a = D, r = (1.5 * D.x2 - D.x1 / 2 - e + 80 * Math.cos(n)) ** 2 + (1.5 * D.y2 - D.y1 / 2 - t + 80 * Math.sin(n)) ** 2);
  5533. Hi(a, "bullet"), a.sR = -1e3 / o.serverUpdateRate / c.weapons[Is[a.sid]].speed, a.sCd = c.weapons[Is[a.sid]].count
  5534. }
  5535. else Hi(a, "bullet"), a.sR = -1e3 / o.serverUpdateRate / c.weapons[Is[a.sid]].speed, a.sCd = c.weapons[Is[a.sid]].count
  5536. }(e, t, n, 0, s))
  5537. }
  5538. var Yi = {
  5539. bullet: 0,
  5540. arrow: 0
  5541. },
  5542. zi = !1;
  5543.  
  5544. function Hi(e, t) {
  5545. e.sid == R.sid || er(e.sid) || (Yi.bullet++, setTimeout((() => {
  5546. Yi.bullet--
  5547. }), 3e3 / 9), ms.length && Yi.bullet >= 4 && !zi && (zi = !0, setTimeout((() => {
  5548. zi = !1
  5549. }), 3e3), V.length >= 3 ? Os(ms, R) <= 300 ? s.send("ch", "sync threat") : s.send("ch", "ranged sync homo") : s.send("ch", "ranged insta homo")))
  5550. }
  5551.  
  5552. function Wi(e, t) {
  5553. for (var n = 0; n < G.length; ++n) G[n].sid == e && (G[n].range = t);
  5554. 0
  5555. }
  5556.  
  5557. function qi(e) {
  5558. (D = Qs(e)) && D.startAnim()
  5559. }
  5560.  
  5561. function Vi(e) {
  5562. for (var t = 0; t < q.length; ++t) q[t].forcePos = !q[t].visible, q[t].visible = !1;
  5563. if (e) {
  5564. var n = Date.now();
  5565. for (t = 0; t < e.length;)(D = Qs(e[t])) ? (D.index = e[t + 1], D.t1 = void 0 === D.t2 ? n : D.t2, D.t2 = n, D.x1 = D.x, D.y1 = D.y, D.x2 = e[t + 2], D.y2 = e[t + 3], D.d1 = void 0 === D.d2 ? e[t + 4] : D.d2, D.d2 = e[t + 4], D.health = e[t + 5], D.dt = 0, D.visible = !0) : ((D = Z.spawn(e[t + 2], e[t + 3], e[t + 4], e[t + 1])).x2 = D.x, D.y2 = D.y, D.d2 = D.dir, D.health = e[t + 5], Z.aiTypes[e[t + 1]].name || (D.name = o.cowNames[e[t + 6]]), D.forcePos = !0, D.sid = e[t], D.visible = !0), t += 7
  5566. }
  5567. }
  5568. var Ni = {};
  5569.  
  5570. function Xi(e, t) {
  5571. var n = e.index,
  5572. i = Ni[n];
  5573. if (!i) {
  5574. var s = new Image;
  5575. s.onload = function () {
  5576. this.isLoaded = !0, this.onload = null
  5577. }, s.src = ".././img/animals/" + e.src + ".png", i = s, Ni[n] = i
  5578. }
  5579. if (i.isLoaded) {
  5580. var r = 1.2 * e.scale * (e.spriteMlt || 1);
  5581. t.drawImage(i, -r, -r, 2 * r, 2 * r)
  5582. }
  5583. }
  5584.  
  5585. function Gi(e, t, n) {
  5586. return e + n >= 0 && e - n <= oe && t + n >= 0 && t - n <= le
  5587. }
  5588. var Ji = 0,
  5589. $i = !1,
  5590. Ki = !1,
  5591. Qi = !1,
  5592. Zi = 50,
  5593. es = {
  5594. x: 0,
  5595. y: 0
  5596. },
  5597. ts = {
  5598. x: 0,
  5599. y: 0
  5600. },
  5601. ns = {
  5602. sid: void 0,
  5603. hitCount: 0
  5604. },
  5605. is = !1,
  5606. ss = !1,
  5607. rs = !1,
  5608. as = 0,
  5609. os = !1,
  5610. ls = !1,
  5611. cs = !1,
  5612. hs = !1,
  5613. us = !1,
  5614. ds = !1,
  5615. fs = !1,
  5616. ps = [],
  5617. ms = [],
  5618. gs = [],
  5619. ys = [],
  5620. ks = 0,
  5621. ws = 0;
  5622. const bs = [];
  5623. var vs = {
  5624. totaldmg: 0,
  5625. canInsta: !1
  5626. },
  5627. xs = [],
  5628. Ss = [],
  5629. Is = [],
  5630. Ts = [],
  5631. Ms = !1,
  5632. js = !1,
  5633. Es = !1,
  5634. Ps = !0,
  5635. Cs = !1,
  5636. As = !0,
  5637. Bs = void 0;
  5638.  
  5639. function _s(e, t) {
  5640. var n = function (e) {
  5641. for (var t = 0; t < V.length; ++t)
  5642. if (V[t].id == e) return V[t];
  5643. return null
  5644. }(e[0]);
  5645. n || (n = new u(e[0], e[1], o, r, J, nt, V, q, c, et, tt), V.push(n)), n.spawn(t ? P : null), n.visible = !1, n.x2 = void 0, n.y2 = void 0, n.hitTime2 = 0, n.isHitted = 0, n.shameCount2 = 0, n.dangerCount = 5, n.pR = 1, n.sR = 1, n.tR = 1, n.pCd = 0, n.sCd = 0, n.setData(e), t && (U = (R = n).x, L = R.y, Zt(), Qn(), ii(), ni(0), Ce.style.display = "block")
  5646. }
  5647.  
  5648. function Rs(e, t) {
  5649. return Math.hypot(e.y - t.y, e.x - t.x)
  5650. }
  5651.  
  5652. function Os(e, t) {
  5653. return Math.hypot(e[2] - t.y2, e[1] - t.x2)
  5654. }
  5655.  
  5656. function Ds(e, t) {
  5657. return Math.atan2(e.y - t.y, e.x - t.x)
  5658. }
  5659.  
  5660. function Us(e) {
  5661. for (var t = 0; t < V.length; t++)
  5662. if (V[t].id == e) {
  5663. V.splice(t, 1);
  5664. break
  5665. }
  5666. }
  5667.  
  5668. function Ls(e, t) {
  5669. R && (R.itemCounts[e] = t)
  5670. }
  5671.  
  5672. function Fs(e, t, n) {
  5673. R && (R[e] = t, n && Qn())
  5674. }
  5675.  
  5676. function Ys() {
  5677. X.filter((e => "turret" == e.name && R.sid != e.owner.sid && !er(e.owner.sid) && Rs(e, R) <= 700 && e.active)).length ? Kt(22, 0) : ss ? function (e) {
  5678. R.y2 <= o.snowBiomeTop ? e(15, 0) : R.y2 >= o.mapScale / 2 - o.riverWidth / 2 && R.y2 <= o.mapScale / 2 + o.riverWidth / 2 ? e(31, 0) : e(12, 0)
  5679. }(Kt) : Kt(6, 0)
  5680. }
  5681.  
  5682. function zs(e) {
  5683. let t = e;
  5684. return 45 != R.skinIndex && 56 != R.skinIndex ? 0 == R.items[0] ? t < -80 ? 5 : t < -60 ? 4 : t < -40 ? 3 : t < -20 ? 2 : 1 : 1 == R.items[0] ? t < -80 ? 3 : t < -40 ? 2 : 1 : 2 == R.items[0] ? t < -90 ? 4 : t < -60 ? 3 : t < -30 ? 2 : 1 : 4 : 0
  5685. }
  5686.  
  5687. function Hs(e, t) {
  5688. (D = Ks(e)) && (! function (e, t) {
  5689. let n = t - e.health;
  5690. n > 0 ? e.hitTime2 && (ws - e.hitTime2 < 2 ? e.shameCount2 >= 10 ? e.shameCount2 = 7 : e.shameCount2++ : e.shameCount2 = Math.max(0, e.shameCount2 - 2), e.hitTime2 = 0) : (e.isHitted++, e.hitTime2 = ws, e == R && (7 == R.skinIndex && (-5 == n || 13 == R.tailIndex && -2 == n) && (ws, !1), function (e) {
  5691. let t = Ks(ms[0]);
  5692. if (e < -25 && ms.length && Os(ms, R) <= 350 && 1 == t.pR) {
  5693. if (R.shameCount2 < R.dangerCount)
  5694. for (let t = 0; t < zs(e); t++) qs(0);
  5695. else Xs((() => {
  5696. for (let t = 0; t < zs(e); t++) qs(0)
  5697. }), 2);
  5698. ds || vs.canInsta || Ki || os || rs || 1 != t.sR || (ds = !0)
  5699. } else Xs((() => {
  5700. for (let t = 0; t < zs(e); t++) qs(0)
  5701. }), 2)
  5702. }(n)))
  5703. }(D, t), D.health = t)
  5704. }
  5705.  
  5706. function Ws(e) {
  5707. return e * (Math.PI / 180)
  5708. }
  5709.  
  5710. function qs(e, t) {
  5711. zn(R.items[e]), s.send("c", 1, t), s.send("c", 0, t), zn(Ji, !0)
  5712. }
  5713.  
  5714. function Vs() {
  5715. let e = ms.length ? 22 != ms[9] && R.skins[53] && 1 == R.tR : !(!R.skins[53] || 1 != R.tR),
  5716. t = !!R.skins[7],
  5717. n = !(!ms.length || 6 != ms[9]),
  5718. i = 0 == Ss[R.sid] ? 1 : 1 == Ss[R.sid] ? 1.1 : Ss[R.sid] >= 2 ? 1.18 : 1,
  5719. s = 0 == Ts[R.sid] ? 1 : 1 == Ts[R.sid] ? 1.1 : Ts[R.sid] >= 2 ? 1.18 : 1;
  5720. Ks(ms[0]);
  5721. 1 == R.pR && 1 == R.sR && null != R.weapons[0] && null != R.weapons[1] ? vs.totaldmg = e ? t ? Math.round((n ? .75 : 1) * (c.weapons[R.weapons[0]].dmg * i * 1.5 + (10 == R.weapons[1] || 14 == R.weapons[1] ? c.weapons[R.weapons[1]].dmg * s : c.weapons[R.weapons[1]].Pdmg) + 25)) : Math.round((n ? .75 : 1) * (c.weapons[R.weapons[0]].dmg * i + (10 == R.weapons[1] || 14 == R.weapons[1] ? c.weapons[R.weapons[1]].dmg * s : c.weapons[R.weapons[1]].Pdmg) + 25)) : t ? Math.round((n ? .75 : 1) * (c.weapons[R.weapons[0]].dmg * i * 1.5 + (10 == R.weapons[1] || 14 == R.weapons[1] ? c.weapons[R.weapons[1]].dmg * s : c.weapons[R.weapons[1]].Pdmg))) : Math.round((n ? .75 : 1) * (c.weapons[R.weapons[0]].dmg * i + (10 == R.weapons[1] || 14 == R.weapons[1] ? c.weapons[R.weapons[1]].dmg * s : c.weapons[R.weapons[1]].Pdmg))) : 1 == R.pR && null != R.weapons[0] ? vs.totaldmg = e ? t ? Math.round((n ? .75 : 1) * (c.weapons[R.weapons[0]].dmg * i * 1.5 + 25)) : Math.round((n ? .75 : 1) * (c.weapons[R.weapons[0]].dmg * i + 25)) : t ? Math.round((n ? .75 : 1) * (c.weapons[R.weapons[0]].dmg * i * 1.5)) : Math.round((n ? .75 : 1) * (c.weapons[R.weapons[0]].dmg * i)) : 1 == R.sR && null != R.weapons[1] ? vs.totaldmg = e ? Math.round((n ? .75 : 1) * ((10 == R.weapons[1] || 14 == R.weapons[1] ? c.weapons[R.weapons[1]].dmg * s : c.weapons[R.weapons[1]].Pdmg) + 25)) : Math.round((n ? .75 : 1) * (10 == R.weapons[1] || 14 == R.weapons[1] ? c.weapons[R.weapons[1]].dmg * s : c.weapons[R.weapons[1]].Pdmg)) : vs.totaldmg = e ? Math.round(25 * (n ? .75 : 1)) : 0, vs.totaldmg >= 100 && ms.length && $i && !fs && !Ki && !os && Os(ms, R) < c.weapons[10 == R.weapons[1] ? R.weapons[1] : R.weapons[0]].range + 2 * o.playerScale && 1 == R.pR && 1 == R.sR && 1 == R.tR ? vs.canInsta = !0 : vs.canInsta = !1
  5722. }
  5723. window.testTick = !1;
  5724.  
  5725. function Ns(e) {
  5726. ps = [], ms = [], gs = [], ys = [], ks = 0, ws++;
  5727. for (var t, n, i = Date.now(), r = 0; r < V.length; ++r) V[r].forcePos = !V[r].visible, V[r].visible = !1;
  5728. for (r = 0; r < e.length;)(D = Ks(e[r])) && (D.t1 = void 0 === D.t2 ? i : D.t2, D.t2 = i, D.x1 = D.x, D.y1 = D.y, D.x2 = e[r + 1], D.y2 = e[r + 2], D.d1 = void 0 === D.d2 ? e[r + 3] : D.d2, D.d2 = e[r + 3], D.dt = 0, D.buildIndex = e[r + 4], D.weaponIndex = e[r + 5], D.weaponVariant = e[r + 6], D.team = e[r + 7], D.isLeader = e[r + 8], D.skinIndex = e[r + 9], D.tailIndex = e[r + 10], D.iconIndex = e[r + 11], D.zIndex = e[r + 12], D.visible = !0, !(D == R || D.team && D.team == R.team) && ps.push(e.slice(r, r + 13)), $s(D)), r += 13;
  5729. Bn ? qs(0, Mn()) : _n ? qs(4, Mn()) : Rn ? qs(2, Mn()) : On && qs(5, Mn()), ps.length && (ps = ps.sort(((e, t) => Os(e, R) - Os(t, R))), ms = ps[0]), ks = ms.length ? (t = ms, n = R, Math.atan2(t[2] - n.y2, t[1] - n.x2)) : jn(), X.length && (gs = X.sort(((e, t) => Rs(e, R) - Rs(t, R))), ys = gs[0]), myConfig.dir = Mn(), myConfig.safeDir = jn(), myConfig.x = R.x2, myConfig.y = R.y2, myConfig.nearDist = ms.length, ms.length && (botConfig.nearDst = function (e) {
  5730. return Math.hypot(ms[2] - e.y, ms[1] - e.x)
  5731. }, myConfig.nearAim = function (e) {
  5732. return Math.atan2(ms[2] - e.y, ms[1] - e.x)
  5733. }), Vs(), us && (us = !1, Qi = !0, As || s.send("ch", "ml, " + R.x2 + ", " + R.y2), s.send("7", 1), Ji = R.weapons[1], zn(R.weapons[1], !0), s.send("2", ks), Kt(53, 0), Xs((() => {
  5734. Qi = !1, Ys(), s.send("7", 1)
  5735. }), 1)), Cs && (Cs = !1, console.log([R.buildIndex, R.weaponIndex, R.weaponVariant].join(", ")), ms.length && (R.iChatMessage = Ks(ms[0]) + "/" + ms[0], R.iChatCountdown = 3e3, console.log(ms)), kn()), vn && (vn = !1, Jt(0, 1)), xn && (xn = !1, rs || Ki || vs.canInsta ? Jt(0, 1) : Kt(11, 1)), !os || hs || rs || (ls ? (Ki || fs || 1 != R.pR || (fs = !0, s.send("7", 1), Kt(7, 0), Xs((() => {
  5736. fs = !1, s.send("7", 1), Ys()
  5737. }), 1)), Ji = R.weapons[0], zn(R.weapons[0], !0)) : cs && (Ki || fs || 1 != (10 == R.weapons[1] ? R.sR : R.pR) || (fs = !0, s.send("7", 1), Kt(40, 0), Xs((() => {
  5738. fs = !1, s.send("7", 1), Ys()
  5739. }), 1)), Ji = 10 == R.weapons[1] ? R.weapons[1] : R.weapons[0], zn(10 == R.weapons[1] ? R.weapons[1] : R.weapons[0], !0)));
  5740. let a = X.filter((e => "turret" == e.name && R.sid != e.owner.sid && !er(e.owner.sid) && Rs(e, R) <= 700 && e.active));
  5741. if ("pit trap" == ys.name && R.sid != ys.owner.sid && !er(ys.owner.sid) && Rs(ys, R) <= 50 && ys.active) {
  5742. rs = !0, as = Ds(ys, R);
  5743. let e = 10 == R.weapons[1] && 8 != R.weapons[0] && 2 != ns.hitCount ? R.weapons[1] : R.weapons[0];
  5744. vs.canInsta || Ki || (Ji = e, zn(e, !0)), !rs || vs.canInsta || Ki || fs || (10 == R.weapons[1] && 8 != R.weapons[0] && 2 != ns.hitCount ? 1 != R.sR : 1 != R.pR) || (fs = !0, s.send("7", 1), s.send("2", as), 2 == ns.hitCount ? a.length ? Kt(22, 0) : Kt(6, 0) : Kt(40, 0), Xs((() => {
  5745. 10 == R.weapons[1] && 8 != R.weapons[0] && 2 == ns.hitCount ? (fs = !0, rs ? a.length ? Kt(22, 0) : Kt(6, 0) : Ys(), Xs((() => {
  5746. s.send("7", 1), fs = !1, Ji = 10 == R.weapons[1] ? R.weapons[1] : R.weapons[0], zn(10 == R.weapons[1] ? R.weapons[1] : R.weapons[0], !0)
  5747. }), 1)) : (fs = !1, s.send("7", 1), rs ? a.length ? Kt(22, 0) : Kt(6, 0) : Ys())
  5748. }), 1))
  5749. } else rs = !1;
  5750. if ($i && (R.skins[53] ? R.skins[7] || $t(7, 0) : $t(53, 0)), vs.canInsta && ($i = !1, function () {
  5751. let e = X.filter((e => "turret" == e.name && R.sid != e.owner.sid && !er(e.owner.sid) && Rs(e, R) <= 700 && e.active));
  5752. Ki = !0, Qi = !0, !0, Ji = R.weapons[10 == R.weapons[1] ? 1 : 0], zn(R.weapons[10 == R.weapons[1] ? 1 : 0], !0), s.send("2", ks), Kt(10 == R.weapons[1] ? 53 : 7, 0), Jt(0, 1), Yn(), (window.testTick ? Gs : setTimeout)((() => {
  5753. Ji = R.weapons[10 == R.weapons[1] ? 0 : 1], zn(R.weapons[10 == R.weapons[1] ? 0 : 1], !0), s.send("2", ks), Kt(10 == R.weapons[1] ? 7 : 53, 0), (window.testTick ? Gs : setTimeout)((() => {
  5754. Ki = !1, Qi = !1, !1, rs ? (e.length ? Kt(22, 0) : Kt(6, 0), Jt(0, 1)) : (Ys(), Kt(11, 1)), Yn()
  5755. }), window.testTick ? 1 : 1e3 / o.serverUpdateRate)
  5756. }), window.testTick ? 1 : 1e3 / o.serverUpdateRate)
  5757. }()), Ms && !rs && 5 == R.weapons[0]) {
  5758. let e = Os(ms, R),
  5759. t = ks,
  5760. n = ks + Math.PI;
  5761. ms.length ? (js = !0, e < 185 ? (Ys(), Bs != n && (Bs = n, s.send("33", n)), -1 != R.buildIndex && (Ji = R.weapons[0], zn(R.weapons[0]))) : e >= 185 && e < 220 ? (Kt(e < 210 ? 22 : 40, 0), Bs != n && (Bs = n, s.send("33", n)), R.buildIndex != R.items[1] && zn(R.items[1])) : e > 230 && e <= 265 ? (Kt(e > 240 ? 22 : 40, 0), Bs != t && (Bs = t, s.send("33", t)), R.buildIndex != R.items[1] && zn(R.items[1])) : e > 265 ? (Ys(), Bs != t && (Bs = t, s.send("33", t)), -1 != R.buildIndex && (Ji = R.weapons[0], zn(R.weapons[0]))) : e >= 220 && e <= 230 && (6 != ms[9] && 22 != ms[9] && 1 == R.pR && 1 == R.tR && Ps ? function () {
  5762. let e = X.filter((e => "turret" == e.name && R.sid != e.owner.sid && !er(e.owner.sid) && Rs(e, R) <= 700 && e.active));
  5763. Ms = !1, !0, !0, Qi = !0, Ji = R.weapons[0], zn(R.weapons[0], !0), s.send("2", ks), s.send("33", ks), Kt(53, 0), Jt(11, 1), (window.testTick ? Gs : setTimeout)((() => {
  5764. Yn(), Ji = R.weapons[0], zn(R.weapons[0], !0), s.send("2", ks), s.send("33", ks), Kt(7, 0), Jt(0, 1), (window.testTick ? Gs : setTimeout)((() => {
  5765. !1, !1, Qi = !1, s.send("33", void 0), rs ? (Ji = 10 == R.weapons[1] && 8 != R.weapons[0] && 2 != ns.hitCount ? R.weapons[1] : R.weapons[0], zn(10 == R.weapons[1] && 8 != R.weapons[0] && 2 != ns.hitCount ? R.weapons[1] : R.weapons[0], !0), e.length ? Kt(22, 0) : Kt(6, 0), Jt(0, 1)) : (Ys(), Kt(11, 1)), Yn()
  5766. }), window.testTick ? 1 : 1e3 / o.serverUpdateRate)
  5767. }), window.testTick ? 1 : 1e3 / o.serverUpdateRate)
  5768. }() : (Jt(0, 0), null != Bs && (Bs = void 0, s.send("33", void 0)), -1 != R.buildIndex && (Ji = R.weapons[0], zn(R.weapons[0]))))) : js = !1
  5769. } else js = !1;
  5770. if (Es && !rs && 5 == R.weapons[0]) {
  5771. let e = Os(ms, R),
  5772. t = ks,
  5773. n = ks + Math.PI;
  5774. ms.length ? (!0, e < 360 ? (Ys(), s.send("33", n), -1 != R.buildIndex && (Ji = R.weapons[0], zn(R.weapons[0]))) : e >= 360 && e < 395 ? (Kt(e < 385 ? 22 : 40, 0), s.send("33", n), R.buildIndex != R.items[1] && zn(R.items[1])) : e > 405 && e < 440 ? (Kt(e > 415 ? 22 : 40, 0), s.send("33", t), R.buildIndex != R.items[1] && zn(R.items[1])) : e >= 440 ? (Ys(), s.send("33", t), -1 != R.buildIndex && (Ji = R.weapons[0], zn(R.weapons[0]))) : e >= 395 && e <= 405 && (1 == R.pR && 1 == R.sR && 1 == R.tR ? (qs(4, ks), function () {
  5775. let e = X.filter((e => "turret" == e.name && R.sid != e.owner.sid && !er(e.owner.sid) && Rs(e, R) <= 700 && e.active));
  5776. Es = !1, !0, !0, Qi = !0, Yn(), Ji = R.weapons[1], zn(R.weapons[1], !0), s.send("2", ks), s.send("33", ks), Kt(53, 0), Kt(11, 1), (window.testTick ? Gs : setTimeout)((() => {
  5777. s.send("33", ks), Kt(12, 0), Kt(11, 1), (window.testTick ? Gs : setTimeout)((() => {
  5778. Ji = R.weapons[0], zn(R.weapons[0], !0), s.send("2", ks), s.send("33", ks), Kt(7, 0), Jt(0, 1), (window.testTick ? Gs : setTimeout)((() => {
  5779. !1, !1, Qi = !1, s.send("33", void 0), rs ? (Ji = 10 == R.weapons[1] && 8 != R.weapons[0] && 2 != ns.hitCount ? R.weapons[1] : R.weapons[0], zn(10 == R.weapons[1] && 8 != R.weapons[0] && 2 != ns.hitCount ? R.weapons[1] : R.weapons[0], !0), e.length ? Kt(22, 0) : Kt(6, 0), Jt(0, 1)) : (Ys(), Kt(11, 1)), Yn()
  5780. }), window.testTick ? 1 : 1e3 / o.serverUpdateRate)
  5781. }), window.testTick ? 1 : 1e3 / o.serverUpdateRate)
  5782. }), window.testTick ? 1 : 1e3 / o.serverUpdateRate)
  5783. }()) : (Jt(0, 0), s.send("33", void 0)))) : js = !1
  5784. } else js = !1;
  5785. if (ds && (ds = !1, Kt(22, 0), Xs((() => {
  5786. Ys()
  5787. }), 1)), Zi = 10 == R.items[3] ? 90 : 94, 6 == R.items[2] ? 49 : 52, es.y != R.y || es.x != R.x) {
  5788. if (is && Rs(ts, R) > Zi) {
  5789. let e = Ds(es, R);
  5790. qs(3, e + Ws(Zi / 1.25)), qs(3, e - Ws(Zi / 1.25)), qs(3, e + Ws(0)), ts.x = R.x, ts.y = R.y
  5791. }
  5792. es.x = R.x, es.y = R.y
  5793. }
  5794. bs[ws] && bs[ws].forEach((e => e())), 45 == D.skinIndex && (D.shameCount2 = 0), As && (Os(ms, R) >= 965 || !ms.length) ? 2496 != oe && 1404 != le && (oe = 2496, le = 1404, kn()) : 1920 == oe && 1080 == le || (oe = 1920, le = 1080, kn())
  5795. }
  5796.  
  5797. function Xs(e, t) {
  5798. "function" == typeof e && ("object" != typeof bs[ws + t] ? bs[ws + t] = [e] : bs[ws + t].push(e))
  5799. }
  5800.  
  5801. function Gs(e, t) {
  5802. let n = ws + t,
  5803. i = setInterval((() => {
  5804. console.log(n, ws), ws >= n && (clearInterval(i), e())
  5805. }), 0)
  5806. }
  5807. var Js = !1;
  5808.  
  5809. function $s(e) {
  5810. e.weaponSettings = c.weapons[e.weaponIndex], e.weaponIndex < 9 ? (xs[e.sid] = e.weaponIndex, Ss[e.sid] = e.weaponVariant, e.weaponIndex == xs[e.sid] && e.buildIndex < 0 && (e.pR = Math.min(1, e.pR + 1e3 / o.serverUpdateRate / c.weapons[xs[e.sid]].speed), e.pCd = Math.max(0, e.pCd - 1))) : e.weaponIndex > 8 && (Is[e.sid] = e.weaponIndex, Ts[e.sid] = e.weaponVariant, e.weaponIndex == Is[e.sid] && e.buildIndex < 0 && (e.sR = Math.min(1, e.sR + 1e3 / o.serverUpdateRate / c.weapons[Is[e.sid]].speed), e.sCd = Math.max(0, e.sCd - 1))), e.tR = Math.min(1, e.tR + 1e3 / o.serverUpdateRate / 2500), e == R && (1 == e.tR ? Js && (Js = !1, Xs((() => {
  5811. Ps = !0
  5812. }), 2)) : (Js = !0, Ps = !1))
  5813. }
  5814.  
  5815. function Ks(e) {
  5816. for (var t = 0; t < V.length; ++t)
  5817. if (V[t].sid == e) return V[t];
  5818. return null
  5819. }
  5820.  
  5821. function Qs(e) {
  5822. for (var t = 0; t < q.length; ++t)
  5823. if (q[t].sid == e) return q[t];
  5824. return null
  5825. }
  5826.  
  5827. function Zs(e) {
  5828. for (var t = 0; t < X.length; ++t)
  5829. if (X[t].sid == e) return X[t];
  5830. return null
  5831. }
  5832.  
  5833. function er(e) {
  5834. for (let t = 0; t < Mt.length; t += 2)
  5835. if (Mt[t] == e) return Mt[t];
  5836. return null
  5837. }
  5838. var tr = -1;
  5839.  
  5840. function nr() {
  5841. var e = Date.now() - tr;
  5842. window.pingTime = e, Te.innerText = "Ping: " + e + " ms"
  5843. }
  5844.  
  5845. function ir() {
  5846. tr = Date.now(), s.send("pp")
  5847. }
  5848.  
  5849. function sr(e) {
  5850. if (!(e < 0)) {
  5851. var t = Math.floor(e / 60),
  5852. n = e % 60;
  5853. n = ("0" + n).slice(-2), Me.innerText = "Server restarting in " + t + ":" + n, Me.hidden = !1
  5854. }
  5855. }
  5856. Te.style.left = "50px", Te.style.display = "block", document.body.appendChild(Te), window.requestAnimFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (e) {
  5857. window.setTimeout(e, 1e3 / 60)
  5858. };
  5859. let rr = [];
  5860. var ar;
  5861.  
  5862. function or(e) {
  5863. window.open(e, "_blank")
  5864. }
  5865. ar = o.mapScale / 2, nt.add(0, ar, ar + 200, 0, o.treeScales[3], 0), nt.add(1, ar, ar - 480, 0, o.treeScales[3], 0), nt.add(2, ar + 300, ar + 450, 0, o.treeScales[3], 0), nt.add(3, ar - 950, ar - 130, 0, o.treeScales[2], 0), nt.add(4, ar - 750, ar - 400, 0, o.treeScales[3], 0), nt.add(5, ar - 700, ar + 400, 0, o.treeScales[2], 0), nt.add(6, ar + 800, ar - 200, 0, o.treeScales[3], 0), nt.add(7, ar - 260, ar + 340, 0, o.bushScales[3], 1), nt.add(8, ar + 760, ar + 310, 0, o.bushScales[3], 1), nt.add(9, ar - 800, ar + 100, 0, o.bushScales[3], 1), nt.add(10, ar - 800, ar + 300, 0, c.list[4].scale, c.list[4].id, c.list[10]), nt.add(11, ar + 650, ar - 390, 0, c.list[4].scale, c.list[4].id, c.list[10]), nt.add(12, ar - 400, ar - 450, 0, o.rockScales[2], 2),
  5866. function e() {
  5867. A = Date.now(), C = A - W, W = A, ri(), requestAnimFrame(e)
  5868. }(), window.openLink = or, window.aJoinReq = Rt, window.follmoo = function () {
  5869. P || (P = !0, T("moofoll", 1))
  5870. }, window.kickFromClan = Ot, window.sendJoin = Dt, window.leaveAlliance = Lt, window.createAlliance = Ut, window.storeBuy = $t, window.storeEquip = Jt, window.showItemInfo = vt, window.selectSkinColor = function (e) {
  5871. ae = e, tn()
  5872. }, window.changeStoreIndex = function (e) {
  5873. Nt != e && (Nt = e, Gt())
  5874. }, window.config = o
  5875. },
  5876. "./src/js/config.js":
  5877. /*!**************************!*\
  5878. !*** ./src/js/config.js ***!
  5879. \**************************/
  5880. /*! no static exports found */
  5881. function (e, t, n) {
  5882. (function (t) {
  5883. e.exports.maxScreenWidth = 1920, e.exports.maxScreenHeight = 1080, e.exports.serverUpdateRate = 9, e.exports.maxPlayers = t && -1 != t.argv.indexOf("--largeserver") ? 80 : 50, e.exports.maxPlayersHard = e.exports.maxPlayers + 10, e.exports.collisionDepth = 6, e.exports.minimapRate = 3e3, e.exports.colGrid = 10, e.exports.clientSendRate = 5, e.exports.healthBarWidth = 50, e.exports.healthBarPad = 4.5, e.exports.iconPadding = 15, e.exports.iconPad = .9, e.exports.deathFadeout = 0, e.exports.crownIconScale = 60, e.exports.crownPad = 35, e.exports.chatCountdown = 3e3, e.exports.chatCooldown = 500, e.exports.inSandbox = t && "mm_exp" === t.env.VULTR_SCHEME, e.exports.maxAge = 100, e.exports.gatherAngle = Math.PI / 2.6, e.exports.gatherWiggle = 10, e.exports.hitReturnRatio = .25, e.exports.hitAngle = Math.PI / 2, e.exports.playerScale = 35, e.exports.playerSpeed = .0016, e.exports.playerDecel = .993, e.exports.nameY = 34, e.exports.skinColors = ["#bf8f54", "#cbb091", "#896c4b", "#fadadc", "#ececec", "#c37373", "#4c4c4c", "#ecaff7", "#738cc3", "#8bc373"], e.exports.animalCount = 7, e.exports.aiTurnRandom = .06, 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"], e.exports.shieldAngle = Math.PI / 3, e.exports.weaponVariants = [{
  5884. id: 0,
  5885. src: "",
  5886. xp: 0,
  5887. val: 1
  5888. }, {
  5889. id: 1,
  5890. src: "_g",
  5891. xp: 3e3,
  5892. val: 1.1
  5893. }, {
  5894. id: 2,
  5895. src: "_d",
  5896. xp: 7e3,
  5897. val: 1.18
  5898. }, {
  5899. id: 3,
  5900. src: "_r",
  5901. poison: !0,
  5902. xp: 12e3,
  5903. val: 1.18
  5904. }], e.exports.fetchVariant = function (t) {
  5905. for (var n = t.weaponXP[t.weaponIndex] || 0, i = e.exports.weaponVariants.length - 1; i >= 0; --i)
  5906. if (n >= e.exports.weaponVariants[i].xp) return e.exports.weaponVariants[i]
  5907. }, e.exports.resourceTypes = ["wood", "food", "stone", "points"], e.exports.areaCount = 7, e.exports.treesPerArea = 9, e.exports.bushesPerArea = 3, e.exports.totalRocks = 32, e.exports.goldOres = 7, e.exports.riverWidth = 724, e.exports.riverPadding = 114, e.exports.waterCurrent = .0011, e.exports.waveSpeed = 1e-4, e.exports.waveMax = 1.3, e.exports.treeScales = [150, 160, 165, 175], e.exports.bushScales = [80, 85, 95], e.exports.rockScales = [80, 85, 90], e.exports.snowBiomeTop = 2400, e.exports.snowSpeed = .75, e.exports.maxNameLength = 15, e.exports.mapScale = 14400, e.exports.mapPingScale = 40, e.exports.mapPingTime = 2200
  5908. }).call(this, n( /*! ./../../node_modules/process/browser.js */ "./node_modules/process/browser.js"))
  5909. },
  5910. "./src/js/data/ai.js":
  5911. /*!***************************!*\
  5912. !*** ./src/js/data/ai.js ***!
  5913. \***************************/
  5914. /*! no static exports found */
  5915. function (e, t) {
  5916. var n = 2 * Math.PI;
  5917. e.exports = function (e, t, i, s, r, a, o, l) {
  5918. this.sid = e, this.isAI = !0, this.nameIndex = r.randInt(0, a.cowNames.length - 1), this.init = function (e, t, n, i, s) {
  5919. this.x = e, this.y = t, this.startX = s.fixedSpawn ? e : null, this.startY = s.fixedSpawn ? t : null, this.xVel = 0, this.yVel = 0, this.zIndex = 0, this.dir = n, this.dirPlus = 0, this.index = i, this.src = s.src, s.name && (this.name = s.name), this.weightM = s.weightM, this.speed = s.speed, this.killScore = s.killScore, this.turnSpeed = s.turnSpeed, this.scale = s.scale, this.maxHealth = s.health, this.leapForce = s.leapForce, this.health = this.maxHealth, this.chargePlayer = s.chargePlayer, this.viewRange = s.viewRange, this.drop = s.drop, this.dmg = s.dmg, this.hostile = s.hostile, this.dontRun = s.dontRun, this.hitRange = s.hitRange, this.hitDelay = s.hitDelay, this.hitScare = s.hitScare, this.spriteMlt = s.spriteMlt, this.nameScale = s.nameScale, this.colDmg = s.colDmg, this.noTrap = s.noTrap, this.spawnDelay = s.spawnDelay, this.hitWait = 0, this.waitCount = 1e3, this.moveCount = 0, this.targetDir = 0, this.active = !0, this.alive = !0, this.runFrom = null, this.chargeTarget = null, this.dmgOverTime = {}
  5920. };
  5921. var c = 0;
  5922. this.update = function (e) {
  5923. if (this.active) {
  5924. if (this.spawnCounter) return this.spawnCounter -= e, void(this.spawnCounter <= 0 && (this.spawnCounter = 0, this.x = this.startX || r.randInt(0, a.mapScale), this.y = this.startY || r.randInt(0, a.mapScale)));
  5925. (c -= e) <= 0 && (this.dmgOverTime.dmg && (this.changeHealth(-this.dmgOverTime.dmg, this.dmgOverTime.doer), this.dmgOverTime.time -= 1, this.dmgOverTime.time <= 0 && (this.dmgOverTime.dmg = 0)), c = 1e3);
  5926. var s = !1,
  5927. o = 1;
  5928. if (!this.zIndex && !this.lockMove && this.y >= a.mapScale / 2 - a.riverWidth / 2 && this.y <= a.mapScale / 2 + a.riverWidth / 2 && (o = .33, this.xVel += a.waterCurrent * e), this.lockMove) this.xVel = 0, this.yVel = 0;
  5929. else if (this.waitCount > 0) {
  5930. if (this.waitCount -= e, this.waitCount <= 0)
  5931. if (this.chargePlayer) {
  5932. for (var h, u, d, f = 0; f < i.length; ++f) !i[f].alive || i[f].skin && i[f].skin.bullRepel || (d = r.getDistance(this.x, this.y, i[f].x, i[f].y)) <= this.viewRange && (!h || d < u) && (u = d, h = i[f]);
  5933. h ? (this.chargeTarget = h, this.moveCount = r.randInt(8e3, 12e3)) : (this.moveCount = r.randInt(1e3, 2e3), this.targetDir = r.randFloat(-Math.PI, Math.PI))
  5934. } else this.moveCount = r.randInt(4e3, 1e4), this.targetDir = r.randFloat(-Math.PI, Math.PI)
  5935. } else if (this.moveCount > 0) {
  5936. var p = this.speed * o;
  5937. if (this.runFrom && this.runFrom.active && (!this.runFrom.isPlayer || this.runFrom.alive) ? (this.targetDir = r.getDirection(this.x, this.y, this.runFrom.x, this.runFrom.y), p *= 1.42) : this.chargeTarget && this.chargeTarget.alive && (this.targetDir = r.getDirection(this.chargeTarget.x, this.chargeTarget.y, this.x, this.y), p *= 1.75, s = !0), this.hitWait && (p *= .3), this.dir != this.targetDir) {
  5938. this.dir %= n;
  5939. var m = (this.dir - this.targetDir + n) % n,
  5940. g = Math.min(Math.abs(m - n), m, this.turnSpeed * e),
  5941. y = m - Math.PI >= 0 ? 1 : -1;
  5942. this.dir += y * g + n
  5943. }
  5944. this.dir %= n, this.xVel += p * e * Math.cos(this.dir), this.yVel += p * e * Math.sin(this.dir), this.moveCount -= e, this.moveCount <= 0 && (this.runFrom = null, this.chargeTarget = null, this.waitCount = this.hostile ? 1500 : r.randInt(1500, 6e3))
  5945. }
  5946. this.zIndex = 0, this.lockMove = !1;
  5947. var k = r.getDistance(0, 0, this.xVel * e, this.yVel * e),
  5948. w = Math.min(4, Math.max(1, Math.round(k / 40))),
  5949. b = 1 / w;
  5950. for (f = 0; f < w; ++f) {
  5951. this.xVel && (this.x += this.xVel * e * b), this.yVel && (this.y += this.yVel * e * b), I = t.getGridArrays(this.x, this.y, this.scale);
  5952. for (var v = 0; v < I.length; ++v)
  5953. for (var x = 0; x < I[v].length; ++x) I[v][x].active && t.checkCollision(this, I[v][x], b)
  5954. }
  5955. var S = !1;
  5956. if (this.hitWait > 0 && (this.hitWait -= e, this.hitWait <= 0)) {
  5957. S = !0, this.hitWait = 0, this.leapForce && !r.randInt(0, 2) && (this.xVel += this.leapForce * Math.cos(this.dir), this.yVel += this.leapForce * Math.sin(this.dir));
  5958. for (var I = t.getGridArrays(this.x, this.y, this.hitRange), T = 0; T < I.length; ++T)
  5959. for (v = 0; v < I[T].length; ++v)(M = I[T][v]).health && (j = r.getDistance(this.x, this.y, M.x, M.y)) < M.scale + this.hitRange && (M.changeHealth(5 * -this.dmg) && t.disableObj(M), t.hitObj(M, r.getDirection(this.x, this.y, M.x, M.y)));
  5960. for (v = 0; v < i.length; ++v) i[v].canSee(this) && l.send(i[v].id, "aa", this.sid)
  5961. }
  5962. if (s || S) {
  5963. var M, j, E;
  5964. for (f = 0; f < i.length; ++f)(M = i[f]) && M.alive && (j = r.getDistance(this.x, this.y, M.x, M.y), this.hitRange ? !this.hitWait && j <= this.hitRange + M.scale && (S ? (E = r.getDirection(M.x, M.y, this.x, this.y), M.changeHealth(-this.dmg), M.xVel += .6 * Math.cos(E), M.yVel += .6 * Math.sin(E), this.runFrom = null, this.chargeTarget = null, this.waitCount = 3e3, this.hitWait = r.randInt(0, 2) ? 0 : 600) : this.hitWait = this.hitDelay) : j <= this.scale + M.scale && (E = r.getDirection(M.x, M.y, this.x, this.y), M.changeHealth(-this.dmg), M.xVel += .55 * Math.cos(E), M.yVel += .55 * Math.sin(E)))
  5965. }
  5966. this.xVel && (this.xVel *= Math.pow(a.playerDecel, e)), this.yVel && (this.yVel *= Math.pow(a.playerDecel, e));
  5967. var P = this.scale;
  5968. this.x - P < 0 ? (this.x = P, this.xVel = 0) : this.x + P > a.mapScale && (this.x = a.mapScale - P, this.xVel = 0), this.y - P < 0 ? (this.y = P, this.yVel = 0) : this.y + P > a.mapScale && (this.y = a.mapScale - P, this.yVel = 0)
  5969. }
  5970. }, this.canSee = function (e) {
  5971. if (!e) return !1;
  5972. if (e.skin && e.skin.invisTimer && e.noMovTimer >= e.skin.invisTimer) return !1;
  5973. var t = Math.abs(e.x - this.x) - e.scale,
  5974. n = Math.abs(e.y - this.y) - e.scale;
  5975. return t <= a.maxScreenWidth / 2 * 1.3 && n <= a.maxScreenHeight / 2 * 1.3
  5976. };
  5977. var h = 0,
  5978. u = 0;
  5979. this.animate = function (e) {
  5980. this.animTime > 0 && (this.animTime -= e, this.animTime <= 0 ? (this.animTime = 0, this.dirPlus = 0, h = 0, u = 0) : 0 == u ? (h += e / (this.animSpeed * a.hitReturnRatio), this.dirPlus = r.lerp(0, this.targetAngle, Math.min(1, h)), h >= 1 && (h = 1, u = 1)) : (h -= e / (this.animSpeed * (1 - a.hitReturnRatio)), this.dirPlus = r.lerp(0, this.targetAngle, Math.max(0, h))))
  5981. }, this.startAnim = function () {
  5982. this.animTime = this.animSpeed = 600, this.targetAngle = .8 * Math.PI, h = 0, u = 0
  5983. }, this.changeHealth = function (e, t, n) {
  5984. if (this.active && (this.health += e, n && (this.hitScare && !r.randInt(0, this.hitScare) ? (this.runFrom = n, this.waitCount = 0, this.moveCount = 2e3) : this.hostile && this.chargePlayer && n.isPlayer ? (this.chargeTarget = n, this.waitCount = 0, this.moveCount = 8e3) : this.dontRun || (this.runFrom = n, this.waitCount = 0, this.moveCount = 2e3)), e < 0 && this.hitRange && r.randInt(0, 1) && (this.hitWait = 500), t && t.canSee(this) && e < 0 && l.send(t.id, "t", Math.round(this.x), Math.round(this.y), Math.round(-e), 1), this.health <= 0 && (this.spawnDelay ? (this.spawnCounter = this.spawnDelay, this.x = -1e6, this.y = -1e6) : (this.x = this.startX || r.randInt(0, a.mapScale), this.y = this.startY || r.randInt(0, a.mapScale)), this.health = this.maxHealth, this.runFrom = null, t && (o(t, this.killScore), this.drop))))
  5985. for (var i = 0; i < this.drop.length;) t.addResource(a.resourceTypes.indexOf(this.drop[i]), this.drop[i + 1]), i += 2
  5986. }
  5987. }
  5988. },
  5989. "./src/js/data/aiManager.js":
  5990. /*!**********************************!*\
  5991. !*** ./src/js/data/aiManager.js ***!
  5992. \**********************************/
  5993. /*! no static exports found */
  5994. function (e, t) {
  5995. e.exports = function (e, t, n, i, s, r, a, o, l) {
  5996. this.aiTypes = [{
  5997. id: 0,
  5998. src: "cow_1",
  5999. killScore: 150,
  6000. health: 500,
  6001. weightM: .8,
  6002. speed: 95e-5,
  6003. turnSpeed: .001,
  6004. scale: 72,
  6005. drop: ["food", 50]
  6006. }, {
  6007. id: 1,
  6008. src: "pig_1",
  6009. killScore: 200,
  6010. health: 800,
  6011. weightM: .6,
  6012. speed: 85e-5,
  6013. turnSpeed: .001,
  6014. scale: 72,
  6015. drop: ["food", 80]
  6016. }, {
  6017. id: 2,
  6018. name: "Bull",
  6019. src: "bull_2",
  6020. hostile: !0,
  6021. dmg: 20,
  6022. killScore: 1e3,
  6023. health: 1800,
  6024. weightM: .5,
  6025. speed: 94e-5,
  6026. turnSpeed: 74e-5,
  6027. scale: 78,
  6028. viewRange: 800,
  6029. chargePlayer: !0,
  6030. drop: ["food", 100]
  6031. }, {
  6032. id: 3,
  6033. name: "Bully",
  6034. src: "bull_1",
  6035. hostile: !0,
  6036. dmg: 20,
  6037. killScore: 2e3,
  6038. health: 2800,
  6039. weightM: .45,
  6040. speed: .001,
  6041. turnSpeed: 8e-4,
  6042. scale: 90,
  6043. viewRange: 900,
  6044. chargePlayer: !0,
  6045. drop: ["food", 400]
  6046. }, {
  6047. id: 4,
  6048. name: "Wolf",
  6049. src: "wolf_1",
  6050. hostile: !0,
  6051. dmg: 8,
  6052. killScore: 500,
  6053. health: 300,
  6054. weightM: .45,
  6055. speed: .001,
  6056. turnSpeed: .002,
  6057. scale: 84,
  6058. viewRange: 800,
  6059. chargePlayer: !0,
  6060. drop: ["food", 200]
  6061. }, {
  6062. id: 5,
  6063. name: "Quack",
  6064. src: "chicken_1",
  6065. dmg: 8,
  6066. killScore: 2e3,
  6067. noTrap: !0,
  6068. health: 300,
  6069. weightM: .2,
  6070. speed: .0018,
  6071. turnSpeed: .006,
  6072. scale: 70,
  6073. drop: ["food", 100]
  6074. }, {
  6075. id: 6,
  6076. name: "MOOSTAFA",
  6077. nameScale: 50,
  6078. src: "enemy",
  6079. hostile: !0,
  6080. dontRun: !0,
  6081. fixedSpawn: !0,
  6082. spawnDelay: 6e4,
  6083. noTrap: !0,
  6084. colDmg: 100,
  6085. dmg: 40,
  6086. killScore: 8e3,
  6087. health: 18e3,
  6088. weightM: .4,
  6089. speed: 7e-4,
  6090. turnSpeed: .01,
  6091. scale: 80,
  6092. spriteMlt: 1.8,
  6093. leapForce: .9,
  6094. viewRange: 1e3,
  6095. hitRange: 210,
  6096. hitDelay: 1e3,
  6097. chargePlayer: !0,
  6098. drop: ["food", 100]
  6099. }, {
  6100. id: 7,
  6101. name: "Treasure",
  6102. hostile: !0,
  6103. nameScale: 35,
  6104. src: "crate_1",
  6105. fixedSpawn: !0,
  6106. spawnDelay: 12e4,
  6107. colDmg: 200,
  6108. killScore: 5e3,
  6109. health: 2e4,
  6110. weightM: .1,
  6111. speed: 0,
  6112. turnSpeed: 0,
  6113. scale: 70,
  6114. spriteMlt: 1
  6115. }, {
  6116. id: 8,
  6117. name: "MOOFIE",
  6118. src: "wolf_2",
  6119. hostile: !0,
  6120. fixedSpawn: !0,
  6121. dontRun: !0,
  6122. hitScare: 4,
  6123. spawnDelay: 3e4,
  6124. noTrap: !0,
  6125. nameScale: 35,
  6126. dmg: 10,
  6127. colDmg: 100,
  6128. killScore: 3e3,
  6129. health: 7e3,
  6130. weightM: .45,
  6131. speed: .0015,
  6132. turnSpeed: .002,
  6133. scale: 90,
  6134. viewRange: 800,
  6135. chargePlayer: !0,
  6136. drop: ["food", 1e3]
  6137. }], this.spawn = function (c, h, u, d) {
  6138. for (var f, p = 0; p < e.length; ++p)
  6139. if (!e[p].active) {
  6140. f = e[p];
  6141. break
  6142. } return f || (f = new t(e.length, s, n, i, a, r, o, l), e.push(f)), f.init(c, h, u, d, this.aiTypes[d]), f
  6143. }
  6144. }
  6145. },
  6146. "./src/js/data/gameObject.js":
  6147. /*!***********************************!*\
  6148. !*** ./src/js/data/gameObject.js ***!
  6149. \***********************************/
  6150. /*! no static exports found */
  6151. function (e, t) {
  6152. e.exports = function (e) {
  6153. this.sid = e, this.init = function (e, t, n, i, s, r, a) {
  6154. r = r || {}, this.sentTo = {}, this.gridLocations = [], this.active = !0, this.doUpdate = r.doUpdate, this.x = e, this.y = t, this.dir = n, this.xWiggle = 0, this.yWiggle = 0, this.scale = i, this.type = s, this.id = r.id, this.owner = a, this.name = r.name, this.isItem = null != this.id, this.group = r.group, this.health = r.health, this.layer = 2, 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), this.colDiv = r.colDiv || 1, this.blocker = r.blocker, this.ignoreCollision = r.ignoreCollision, this.dontGather = r.dontGather, this.hideFromEnemy = r.hideFromEnemy, this.friction = r.friction, this.projDmg = r.projDmg, this.dmg = r.dmg, this.pDmg = r.pDmg, this.pps = r.pps, this.zIndex = r.zIndex || 0, this.turnSpeed = r.turnSpeed, this.req = r.req, this.trap = r.trap, this.healCol = r.healCol, this.teleport = r.teleport, this.boostSpeed = r.boostSpeed, this.projectile = r.projectile, this.shootRange = r.shootRange, this.shootRate = r.shootRate, this.shootCount = this.shootRate, this.spawnPoint = r.spawnPoint
  6155. }, this.changeHealth = function (e, t) {
  6156. return this.health += e, this.health <= 0
  6157. }, this.getScale = function (e, t) {
  6158. return e = e || 1, this.scale * (this.isItem || 2 == this.type || 3 == this.type || 4 == this.type ? 1 : .6 * e) * (t ? 1 : this.colDiv)
  6159. }, this.visibleToPlayer = function (e) {
  6160. return !this.hideFromEnemy || this.owner && (this.owner == e || this.owner.team && e.team == this.owner.team)
  6161. }, this.update = function (e) {
  6162. this.active && (this.xWiggle && (this.xWiggle *= Math.pow(.99, e)), this.yWiggle && (this.yWiggle *= Math.pow(.99, e)), this.turnSpeed && (this.dir += this.turnSpeed * e))
  6163. }
  6164. }
  6165. },
  6166. "./src/js/data/items.js":
  6167. /*!******************************!*\
  6168. !*** ./src/js/data/items.js ***!
  6169. \******************************/
  6170. /*! no static exports found */
  6171. function (e, t) {
  6172. e.exports.groups = [{
  6173. id: 0,
  6174. name: "food",
  6175. layer: 0
  6176. }, {
  6177. id: 1,
  6178. name: "walls",
  6179. place: !0,
  6180. limit: 30,
  6181. layer: 0
  6182. }, {
  6183. id: 2,
  6184. name: "spikes",
  6185. place: !0,
  6186. limit: 15,
  6187. layer: 0
  6188. }, {
  6189. id: 3,
  6190. name: "mill",
  6191. place: !0,
  6192. limit: 7,
  6193. layer: 1
  6194. }, {
  6195. id: 4,
  6196. name: "mine",
  6197. place: !0,
  6198. limit: 1,
  6199. layer: 0
  6200. }, {
  6201. id: 5,
  6202. name: "trap",
  6203. place: !0,
  6204. limit: 6,
  6205. layer: -1
  6206. }, {
  6207. id: 6,
  6208. name: "booster",
  6209. place: !0,
  6210. limit: 12,
  6211. layer: -1
  6212. }, {
  6213. id: 7,
  6214. name: "turret",
  6215. place: !0,
  6216. limit: 2,
  6217. layer: 1
  6218. }, {
  6219. id: 8,
  6220. name: "watchtower",
  6221. place: !0,
  6222. limit: 12,
  6223. layer: 1
  6224. }, {
  6225. id: 9,
  6226. name: "buff",
  6227. place: !0,
  6228. limit: 4,
  6229. layer: -1
  6230. }, {
  6231. id: 10,
  6232. name: "spawn",
  6233. place: !0,
  6234. limit: 1,
  6235. layer: -1
  6236. }, {
  6237. id: 11,
  6238. name: "sapling",
  6239. place: !0,
  6240. limit: 2,
  6241. layer: 0
  6242. }, {
  6243. id: 12,
  6244. name: "blocker",
  6245. place: !0,
  6246. limit: 3,
  6247. layer: -1
  6248. }, {
  6249. id: 13,
  6250. name: "teleporter",
  6251. place: !0,
  6252. limit: 2,
  6253. layer: -1
  6254. }], t.projectiles = [{
  6255. indx: 0,
  6256. layer: 0,
  6257. src: "arrow_1",
  6258. dmg: 25,
  6259. speed: 1.6,
  6260. scale: 103,
  6261. range: 1e3
  6262. }, {
  6263. indx: 1,
  6264. layer: 1,
  6265. dmg: 25,
  6266. scale: 20
  6267. }, {
  6268. indx: 0,
  6269. layer: 0,
  6270. src: "arrow_1",
  6271. dmg: 35,
  6272. speed: 2.5,
  6273. scale: 103,
  6274. range: 1200
  6275. }, {
  6276. indx: 0,
  6277. layer: 0,
  6278. src: "arrow_1",
  6279. dmg: 30,
  6280. speed: 2,
  6281. scale: 103,
  6282. range: 1200
  6283. }, {
  6284. indx: 1,
  6285. layer: 1,
  6286. dmg: 16,
  6287. scale: 20
  6288. }, {
  6289. indx: 0,
  6290. layer: 0,
  6291. src: "bullet_1",
  6292. dmg: 50,
  6293. speed: 3.6,
  6294. scale: 160,
  6295. range: 1400
  6296. }], t.weapons = [{
  6297. id: 0,
  6298. type: 0,
  6299. name: "tool hammer",
  6300. desc: "tool for gathering all resources",
  6301. src: "hammer_1",
  6302. length: 140,
  6303. width: 140,
  6304. xOff: -3,
  6305. yOff: 18,
  6306. dmg: 25,
  6307. range: 65,
  6308. gather: 1,
  6309. speed: 300,
  6310. count: 3
  6311. }, {
  6312. id: 1,
  6313. type: 0,
  6314. age: 2,
  6315. name: "hand axe",
  6316. desc: "gathers resources at a higher rate",
  6317. src: "axe_1",
  6318. length: 140,
  6319. width: 140,
  6320. xOff: 3,
  6321. yOff: 24,
  6322. dmg: 30,
  6323. spdMult: 1,
  6324. range: 70,
  6325. gather: 2,
  6326. speed: 400,
  6327. count: 4
  6328. }, {
  6329. id: 2,
  6330. type: 0,
  6331. age: 8,
  6332. pre: 1,
  6333. name: "great axe",
  6334. desc: "deal more damage and gather more resources",
  6335. src: "great_axe_1",
  6336. length: 140,
  6337. width: 140,
  6338. xOff: -8,
  6339. yOff: 25,
  6340. dmg: 35,
  6341. spdMult: 1,
  6342. range: 75,
  6343. gather: 4,
  6344. speed: 400,
  6345. count: 4
  6346. }, {
  6347. id: 3,
  6348. type: 0,
  6349. age: 2,
  6350. name: "short sword",
  6351. desc: "increased attack power but slower move speed",
  6352. src: "sword_1",
  6353. iPad: 1.3,
  6354. length: 130,
  6355. width: 210,
  6356. xOff: -8,
  6357. yOff: 46,
  6358. dmg: 35,
  6359. spdMult: .85,
  6360. range: 110,
  6361. gather: 1,
  6362. speed: 300,
  6363. count: 3
  6364. }, {
  6365. id: 4,
  6366. type: 0,
  6367. age: 8,
  6368. pre: 3,
  6369. name: "katana",
  6370. desc: "greater range and damage",
  6371. src: "samurai_1",
  6372. iPad: 1.3,
  6373. length: 130,
  6374. width: 210,
  6375. xOff: -8,
  6376. yOff: 59,
  6377. dmg: 40,
  6378. spdMult: .8,
  6379. range: 118,
  6380. gather: 1,
  6381. speed: 300,
  6382. count: 3
  6383. }, {
  6384. id: 5,
  6385. type: 0,
  6386. age: 2,
  6387. name: "polearm",
  6388. desc: "long range melee weapon",
  6389. src: "spear_1",
  6390. iPad: 1.3,
  6391. length: 130,
  6392. width: 210,
  6393. xOff: -8,
  6394. yOff: 53,
  6395. dmg: 45,
  6396. knock: .2,
  6397. spdMult: .82,
  6398. range: 142,
  6399. gather: 1,
  6400. speed: 700,
  6401. count: 7
  6402. }, {
  6403. id: 6,
  6404. type: 0,
  6405. age: 2,
  6406. name: "bat",
  6407. desc: "fast long range melee weapon",
  6408. src: "bat_1",
  6409. iPad: 1.3,
  6410. length: 110,
  6411. width: 180,
  6412. xOff: -8,
  6413. yOff: 53,
  6414. dmg: 20,
  6415. knock: .7,
  6416. range: 110,
  6417. gather: 1,
  6418. speed: 300,
  6419. count: 3
  6420. }, {
  6421. id: 7,
  6422. type: 0,
  6423. age: 2,
  6424. name: "daggers",
  6425. desc: "really fast short range weapon",
  6426. src: "dagger_1",
  6427. iPad: .8,
  6428. length: 110,
  6429. width: 110,
  6430. xOff: 18,
  6431. yOff: 0,
  6432. dmg: 20,
  6433. knock: .1,
  6434. range: 65,
  6435. gather: 1,
  6436. hitSlow: .1,
  6437. spdMult: 1.13,
  6438. speed: 100,
  6439. count: 1
  6440. }, {
  6441. id: 8,
  6442. type: 0,
  6443. age: 2,
  6444. name: "stick",
  6445. desc: "great for gathering but very weak",
  6446. src: "stick_1",
  6447. length: 140,
  6448. width: 140,
  6449. xOff: 3,
  6450. yOff: 24,
  6451. dmg: 1,
  6452. spdMult: 1,
  6453. range: 70,
  6454. gather: 7,
  6455. speed: 400,
  6456. count: 4
  6457. }, {
  6458. id: 9,
  6459. type: 1,
  6460. age: 6,
  6461. name: "hunting bow",
  6462. desc: "bow used for ranged combat and hunting",
  6463. src: "bow_1",
  6464. req: ["wood", 4],
  6465. length: 120,
  6466. width: 120,
  6467. xOff: -6,
  6468. yOff: 0,
  6469. Pdmg: 25,
  6470. projectile: 0,
  6471. spdMult: .75,
  6472. speed: 600,
  6473. count: 6
  6474. }, {
  6475. id: 10,
  6476. type: 1,
  6477. age: 6,
  6478. name: "great hammer",
  6479. desc: "hammer used for destroying structures",
  6480. src: "great_hammer_1",
  6481. length: 140,
  6482. width: 140,
  6483. xOff: -9,
  6484. yOff: 25,
  6485. dmg: 10,
  6486. spdMult: .88,
  6487. range: 75,
  6488. sDmg: 7.5,
  6489. gather: 1,
  6490. speed: 400,
  6491. count: 4
  6492. }, {
  6493. id: 11,
  6494. type: 1,
  6495. age: 6,
  6496. name: "wooden shield",
  6497. desc: "blocks projectiles and reduces melee damage",
  6498. src: "shield_1",
  6499. length: 120,
  6500. width: 120,
  6501. shield: .2,
  6502. xOff: 6,
  6503. yOff: 0,
  6504. Pdmg: 0,
  6505. spdMult: .7
  6506. }, {
  6507. id: 12,
  6508. type: 1,
  6509. age: 8,
  6510. pre: 9,
  6511. name: "crossbow",
  6512. desc: "deals more damage and has greater range",
  6513. src: "crossbow_1",
  6514. req: ["wood", 5],
  6515. aboveHand: !0,
  6516. armS: .75,
  6517. length: 120,
  6518. width: 120,
  6519. xOff: -4,
  6520. yOff: 0,
  6521. Pdmg: 35,
  6522. projectile: 2,
  6523. spdMult: .7,
  6524. speed: 700,
  6525. count: 7
  6526. }, {
  6527. id: 13,
  6528. type: 1,
  6529. age: 9,
  6530. pre: 12,
  6531. name: "repeater crossbow",
  6532. desc: "high firerate crossbow with reduced damage",
  6533. src: "crossbow_2",
  6534. req: ["wood", 10],
  6535. aboveHand: !0,
  6536. armS: .75,
  6537. length: 120,
  6538. width: 120,
  6539. xOff: -4,
  6540. yOff: 0,
  6541. Pdmg: 30,
  6542. projectile: 3,
  6543. spdMult: .7,
  6544. speed: 230,
  6545. count: 3
  6546. }, {
  6547. id: 14,
  6548. type: 1,
  6549. age: 6,
  6550. name: "mc grabby",
  6551. desc: "steals resources from enemies",
  6552. src: "grab_1",
  6553. length: 130,
  6554. width: 210,
  6555. xOff: -8,
  6556. yOff: 53,
  6557. dmg: 0,
  6558. steal: 250,
  6559. knock: .2,
  6560. spdMult: 1.05,
  6561. range: 125,
  6562. gather: 0,
  6563. speed: 700,
  6564. count: 7
  6565. }, {
  6566. id: 15,
  6567. type: 1,
  6568. age: 9,
  6569. pre: 12,
  6570. name: "musket",
  6571. desc: "slow firerate but high damage and range",
  6572. src: "musket_1",
  6573. req: ["stone", 10],
  6574. aboveHand: !0,
  6575. rec: .35,
  6576. armS: .6,
  6577. hndS: .3,
  6578. hndD: 1.6,
  6579. length: 205,
  6580. width: 205,
  6581. xOff: 25,
  6582. yOff: 0,
  6583. Pdmg: 50,
  6584. projectile: 5,
  6585. hideProjectile: !0,
  6586. spdMult: .6,
  6587. speed: 1500,
  6588. count: 15
  6589. }], e.exports.list = [{
  6590. group: e.exports.groups[0],
  6591. name: "apple",
  6592. desc: "restores 20 health when consumed",
  6593. req: ["food", 10],
  6594. consume: function (e) {
  6595. return e.changeHealth(20, e)
  6596. },
  6597. scale: 22,
  6598. holdOffset: 15
  6599. }, {
  6600. age: 3,
  6601. group: e.exports.groups[0],
  6602. name: "cookie",
  6603. desc: "restores 40 health when consumed",
  6604. req: ["food", 15],
  6605. consume: function (e) {
  6606. return e.changeHealth(40, e)
  6607. },
  6608. scale: 27,
  6609. holdOffset: 15
  6610. }, {
  6611. age: 7,
  6612. group: e.exports.groups[0],
  6613. name: "cheese",
  6614. desc: "restores 30 health and another 50 over 5 seconds",
  6615. req: ["food", 25],
  6616. consume: function (e) {
  6617. return !!(e.changeHealth(30, e) || e.health < 100) && (e.dmgOverTime.dmg = -10, e.dmgOverTime.doer = e, e.dmgOverTime.time = 5, !0)
  6618. },
  6619. scale: 27,
  6620. holdOffset: 15
  6621. }, {
  6622. group: e.exports.groups[1],
  6623. name: "wood wall",
  6624. desc: "provides protection for your village",
  6625. req: ["wood", 10],
  6626. projDmg: !0,
  6627. health: 380,
  6628. scale: 50,
  6629. holdOffset: 20,
  6630. placeOffset: -5
  6631. }, {
  6632. age: 3,
  6633. group: e.exports.groups[1],
  6634. name: "stone wall",
  6635. desc: "provides improved protection for your village",
  6636. req: ["stone", 25],
  6637. health: 900,
  6638. scale: 50,
  6639. holdOffset: 20,
  6640. placeOffset: -5
  6641. }, {
  6642. age: 7,
  6643. group: e.exports.groups[1],
  6644. name: "castle wall",
  6645. desc: "provides powerful protection for your village",
  6646. req: ["stone", 35],
  6647. health: 1500,
  6648. scale: 52,
  6649. holdOffset: 20,
  6650. placeOffset: -5
  6651. }, {
  6652. group: e.exports.groups[2],
  6653. name: "spikes",
  6654. desc: "damages enemies when they touch them",
  6655. req: ["wood", 20, "stone", 5],
  6656. health: 400,
  6657. dmg: 20,
  6658. scale: 49,
  6659. spritePadding: -23,
  6660. holdOffset: 8,
  6661. placeOffset: -5
  6662. }, {
  6663. age: 5,
  6664. group: e.exports.groups[2],
  6665. name: "greater spikes",
  6666. desc: "damages enemies when they touch them",
  6667. req: ["wood", 30, "stone", 10],
  6668. health: 500,
  6669. dmg: 35,
  6670. scale: 52,
  6671. spritePadding: -23,
  6672. holdOffset: 8,
  6673. placeOffset: -5
  6674. }, {
  6675. age: 9,
  6676. group: e.exports.groups[2],
  6677. name: "poison spikes",
  6678. desc: "poisons enemies when they touch them",
  6679. req: ["wood", 35, "stone", 15],
  6680. health: 600,
  6681. dmg: 30,
  6682. pDmg: 5,
  6683. scale: 52,
  6684. spritePadding: -23,
  6685. holdOffset: 8,
  6686. placeOffset: -5
  6687. }, {
  6688. age: 9,
  6689. group: e.exports.groups[2],
  6690. name: "spinning spikes",
  6691. desc: "damages enemies when they touch them",
  6692. req: ["wood", 30, "stone", 20],
  6693. health: 500,
  6694. dmg: 45,
  6695. turnSpeed: .003,
  6696. scale: 52,
  6697. spritePadding: -23,
  6698. holdOffset: 8,
  6699. placeOffset: -5
  6700. }, {
  6701. group: e.exports.groups[3],
  6702. name: "windmill",
  6703. desc: "generates gold over time",
  6704. req: ["wood", 50, "stone", 10],
  6705. health: 400,
  6706. pps: 1,
  6707. spritePadding: 25,
  6708. iconLineMult: 12,
  6709. scale: 45,
  6710. holdOffset: 20,
  6711. placeOffset: 5
  6712. }, {
  6713. age: 5,
  6714. group: e.exports.groups[3],
  6715. name: "faster windmill",
  6716. desc: "generates more gold over time",
  6717. req: ["wood", 60, "stone", 20],
  6718. health: 500,
  6719. pps: 1.5,
  6720. spritePadding: 25,
  6721. iconLineMult: 12,
  6722. scale: 47,
  6723. holdOffset: 20,
  6724. placeOffset: 5
  6725. }, {
  6726. age: 8,
  6727. group: e.exports.groups[3],
  6728. name: "power mill",
  6729. desc: "generates more gold over time",
  6730. req: ["wood", 100, "stone", 50],
  6731. health: 800,
  6732. pps: 2,
  6733. spritePadding: 25,
  6734. iconLineMult: 12,
  6735. scale: 47,
  6736. holdOffset: 20,
  6737. placeOffset: 5
  6738. }, {
  6739. age: 5,
  6740. group: e.exports.groups[4],
  6741. type: 2,
  6742. name: "mine",
  6743. desc: "allows you to mine stone",
  6744. req: ["wood", 20, "stone", 100],
  6745. iconLineMult: 12,
  6746. scale: 65,
  6747. holdOffset: 20,
  6748. placeOffset: 0
  6749. }, {
  6750. age: 5,
  6751. group: e.exports.groups[11],
  6752. type: 0,
  6753. name: "sapling",
  6754. desc: "allows you to farm wood",
  6755. req: ["wood", 150],
  6756. iconLineMult: 12,
  6757. colDiv: .5,
  6758. scale: 110,
  6759. holdOffset: 50,
  6760. placeOffset: -15
  6761. }, {
  6762. age: 4,
  6763. group: e.exports.groups[5],
  6764. name: "pit trap",
  6765. desc: "pit that traps enemies if they walk over it",
  6766. req: ["wood", 30, "stone", 30],
  6767. trap: !0,
  6768. ignoreCollision: !0,
  6769. hideFromEnemy: !0,
  6770. health: 500,
  6771. colDiv: .2,
  6772. scale: 50,
  6773. holdOffset: 20,
  6774. placeOffset: -5
  6775. }, {
  6776. age: 4,
  6777. group: e.exports.groups[6],
  6778. name: "boost pad",
  6779. desc: "provides boost when stepped on",
  6780. req: ["stone", 20, "wood", 5],
  6781. ignoreCollision: !0,
  6782. boostSpeed: 1.5,
  6783. health: 150,
  6784. colDiv: .7,
  6785. scale: 45,
  6786. holdOffset: 20,
  6787. placeOffset: -5
  6788. }, {
  6789. age: 7,
  6790. group: e.exports.groups[7],
  6791. doUpdate: !0,
  6792. name: "turret",
  6793. desc: "defensive structure that shoots at enemies",
  6794. req: ["wood", 200, "stone", 150],
  6795. health: 800,
  6796. projectile: 1,
  6797. shootRange: 700,
  6798. shootRate: 2200,
  6799. scale: 43,
  6800. holdOffset: 20,
  6801. placeOffset: -5
  6802. }, {
  6803. age: 7,
  6804. group: e.exports.groups[8],
  6805. name: "platform",
  6806. desc: "platform to shoot over walls and cross over water",
  6807. req: ["wood", 20],
  6808. ignoreCollision: !0,
  6809. zIndex: 1,
  6810. health: 300,
  6811. scale: 43,
  6812. holdOffset: 20,
  6813. placeOffset: -5
  6814. }, {
  6815. age: 7,
  6816. group: e.exports.groups[9],
  6817. name: "healing pad",
  6818. desc: "standing on it will slowly heal you",
  6819. req: ["wood", 30, "food", 10],
  6820. ignoreCollision: !0,
  6821. healCol: 15,
  6822. health: 400,
  6823. colDiv: .7,
  6824. scale: 45,
  6825. holdOffset: 20,
  6826. placeOffset: -5
  6827. }, {
  6828. age: 9,
  6829. group: e.exports.groups[10],
  6830. name: "spawn pad",
  6831. desc: "you will spawn here when you die but it will dissapear",
  6832. req: ["wood", 100, "stone", 100],
  6833. health: 400,
  6834. ignoreCollision: !0,
  6835. spawnPoint: !0,
  6836. scale: 45,
  6837. holdOffset: 20,
  6838. placeOffset: -5
  6839. }, {
  6840. age: 7,
  6841. group: e.exports.groups[12],
  6842. name: "blocker",
  6843. desc: "blocks building in radius",
  6844. req: ["wood", 30, "stone", 25],
  6845. ignoreCollision: !0,
  6846. blocker: 300,
  6847. health: 400,
  6848. colDiv: .7,
  6849. scale: 45,
  6850. holdOffset: 20,
  6851. placeOffset: -5
  6852. }, {
  6853. age: 7,
  6854. group: e.exports.groups[13],
  6855. name: "teleporter",
  6856. desc: "teleports you to a random point on the map",
  6857. req: ["wood", 60, "stone", 60],
  6858. ignoreCollision: !0,
  6859. teleport: !0,
  6860. health: 200,
  6861. colDiv: .7,
  6862. scale: 45,
  6863. holdOffset: 20,
  6864. placeOffset: -5
  6865. }];
  6866. for (var n = 0; n < e.exports.list.length; ++n) e.exports.list[n].id = n, e.exports.list[n].pre && (e.exports.list[n].pre = n - e.exports.list[n].pre);
  6867. if ("undefined" != typeof window);
  6868. },
  6869. "./src/js/data/mapManager.js":
  6870. /*!***********************************!*\
  6871. !*** ./src/js/data/mapManager.js ***!
  6872. \***********************************/
  6873. /*! no static exports found */
  6874. function (e, t) {
  6875. e.exports = {}
  6876. },
  6877. "./src/js/data/objectManager.js":
  6878. /*!**************************************!*\
  6879. !*** ./src/js/data/objectManager.js ***!
  6880. \**************************************/
  6881. /*! no static exports found */
  6882. function (e, t) {
  6883. var n = Math.floor,
  6884. i = Math.abs,
  6885. s = Math.cos,
  6886. r = Math.sin,
  6887. a = (Math.pow, Math.sqrt);
  6888. e.exports = function (e, t, o, l, c, h) {
  6889. var u, d;
  6890. this.objects = t, this.grids = {}, this.updateObjects = [];
  6891. var f = l.mapScale / l.colGrid;
  6892. this.setObjectGrids = function (e) {
  6893. for (var t = Math.min(l.mapScale, Math.max(0, e.x)), n = Math.min(l.mapScale, Math.max(0, e.y)), i = 0; i < l.colGrid; ++i) {
  6894. u = i * f;
  6895. for (var s = 0; s < l.colGrid; ++s) d = s * f, t + e.scale >= u && t - e.scale <= u + f && n + e.scale >= d && n - e.scale <= d + f && (this.grids[i + "_" + s] || (this.grids[i + "_" + s] = []), this.grids[i + "_" + s].push(e), e.gridLocations.push(i + "_" + s))
  6896. }
  6897. }, this.removeObjGrid = function (e) {
  6898. for (var t, n = 0; n < e.gridLocations.length; ++n)(t = this.grids[e.gridLocations[n]].indexOf(e)) >= 0 && this.grids[e.gridLocations[n]].splice(t, 1)
  6899. }, this.disableObj = function (e) {
  6900. if (e.active = !1, h) {
  6901. e.owner && e.pps && (e.owner.pps -= e.pps), this.removeObjGrid(e);
  6902. var t = this.updateObjects.indexOf(e);
  6903. t >= 0 && this.updateObjects.splice(t, 1)
  6904. }
  6905. }, this.hitObj = function (e, t) {
  6906. for (var n = 0; n < c.length; ++n) c[n].active && (e.sentTo[c[n].id] && (e.active ? c[n].canSee(e) && h.send(c[n].id, "8", o.fixTo(t, 1), e.sid) : h.send(c[n].id, "12", e.sid)), e.active || e.owner != c[n] || c[n].changeItemCount(e.group.id, -1))
  6907. };
  6908. var p, m, g = [];
  6909. this.getGridArrays = function (e, t, i) {
  6910. u = n(e / f), d = n(t / f), g.length = 0;
  6911. try {
  6912. this.grids[u + "_" + d] && g.push(this.grids[u + "_" + d]), e + i >= (u + 1) * f && ((p = this.grids[u + 1 + "_" + d]) && g.push(p), d && t - i <= d * f ? (p = this.grids[u + 1 + "_" + (d - 1)]) && g.push(p) : t + i >= (d + 1) * f && (p = this.grids[u + 1 + "_" + (d + 1)]) && g.push(p)), u && e - i <= u * f && ((p = this.grids[u - 1 + "_" + d]) && g.push(p), d && t - i <= d * f ? (p = this.grids[u - 1 + "_" + (d - 1)]) && g.push(p) : t + i >= (d + 1) * f && (p = this.grids[u - 1 + "_" + (d + 1)]) && g.push(p)), t + i >= (d + 1) * f && (p = this.grids[u + "_" + (d + 1)]) && g.push(p), d && t - i <= d * f && (p = this.grids[u + "_" + (d - 1)]) && g.push(p)
  6913. } catch (e) {}
  6914. return g
  6915. }, this.add = function (n, i, s, r, a, o, l, c, u) {
  6916. m = null;
  6917. for (var d = 0; d < t.length; ++d)
  6918. if (t[d].sid == n) {
  6919. m = t[d];
  6920. break
  6921. } if (!m)
  6922. for (d = 0; d < t.length; ++d)
  6923. if (!t[d].active) {
  6924. m = t[d];
  6925. break
  6926. } m || (m = new e(n), t.push(m)), c && (m.sid = n), m.init(i, s, r, a, o, l, u), h && (this.setObjectGrids(m), m.doUpdate && this.updateObjects.push(m))
  6927. }, this.disableBySid = function (e) {
  6928. for (var n = 0; n < t.length; ++n)
  6929. if (t[n].sid == e) {
  6930. this.disableObj(t[n]);
  6931. break
  6932. }
  6933. }, this.removeAllItems = function (e, n) {
  6934. for (var i = 0; i < t.length; ++i) t[i].active && t[i].owner && t[i].owner.sid == e && this.disableObj(t[i]);
  6935. n && n.broadcast("13", e)
  6936. }, this.fetchSpawnObj = function (e) {
  6937. for (var n = null, i = 0; i < t.length; ++i)
  6938. if ((m = t[i]).active && m.owner && m.owner.sid == e && m.spawnPoint) {
  6939. n = [m.x, m.y], this.disableObj(m), h.broadcast("12", m.sid), m.owner && m.owner.changeItemCount(m.group.id, -1);
  6940. break
  6941. } return n
  6942. }, this.checkItemLocation = function (e, n, i, s, r, a, c) {
  6943. for (var h = 0; h < t.length; ++h) {
  6944. var u = t[h].blocker ? t[h].blocker : t[h].getScale(s, t[h].isItem);
  6945. if (t[h].active && o.getDistance(e, n, t[h].x, t[h].y) < i + u) return !1
  6946. }
  6947. return !(!a && 18 != r && n >= l.mapScale / 2 - l.riverWidth / 2 && n <= l.mapScale / 2 + l.riverWidth / 2)
  6948. }, this.addProjectile = function (e, t, n, i, s) {
  6949. for (var r, a = items.projectiles[s], l = 0; l < projectiles.length; ++l)
  6950. if (!projectiles[l].active) {
  6951. r = projectiles[l];
  6952. break
  6953. } r || (r = new Projectile(c, o), projectiles.push(r)), r.init(s, e, t, n, a.speed, i, a.scale)
  6954. }, this.checkCollision = function (e, t, n) {
  6955. n = n || 1;
  6956. var c = e.x - t.x,
  6957. h = e.y - t.y,
  6958. u = e.scale + t.scale;
  6959. if (i(c) <= u || i(h) <= u) {
  6960. u = e.scale + (t.getScale ? t.getScale() : t.scale);
  6961. var d = a(c * c + h * h) - u;
  6962. if (d <= 0) {
  6963. if (t.ignoreCollision) !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) * s(t.dir), e.yVel += n * t.boostSpeed * (t.weightM || 1) * r(t.dir)) : t.healCol ? e.healCol = t.healCol : t.teleport && (e.x = o.randInt(0, l.mapScale), e.y = o.randInt(0, l.mapScale)) : (e.lockMove = !0, t.hideFromEnemy = !1);
  6964. else {
  6965. var f = o.getDirection(e.x, e.y, t.x, t.y);
  6966. o.getDistance(e.x, e.y, t.x, t.y);
  6967. if (t.isPlayer ? (d = -1 * d / 2, e.x += d * s(f), e.y += d * r(f), t.x -= d * s(f), t.y -= d * r(f)) : (e.x = t.x + u * s(f), e.y = t.y + u * r(f), e.xVel *= .75, e.yVel *= .75), t.dmg && t.owner != e && (!t.owner || !t.owner.team || t.owner.team != e.team)) {
  6968. e.changeHealth(-t.dmg, t.owner, t);
  6969. var p = 1.5 * (t.weightM || 1);
  6970. e.xVel += p * s(f), e.yVel += p * r(f), !t.pDmg || e.skin && e.skin.poisonRes || (e.dmgOverTime.dmg = t.pDmg, e.dmgOverTime.time = 5, e.dmgOverTime.doer = t.owner), e.colDmg && t.health && (t.changeHealth(-e.colDmg) && this.disableObj(t), this.hitObj(t, o.getDirection(e.x, e.y, t.x, t.y)))
  6971. }
  6972. }
  6973. return t.zIndex > e.zIndex && (e.zIndex = t.zIndex), !0
  6974. }
  6975. }
  6976. return !1
  6977. }
  6978. }
  6979. },
  6980. "./src/js/data/player.js":
  6981. /*!*******************************!*\
  6982. !*** ./src/js/data/player.js ***!
  6983. \*******************************/
  6984. /*! no static exports found */
  6985. function (e, t, n) {
  6986. var i = new(n( /*! bad-words */ "./node_modules/bad-words/lib/badwords.js"));
  6987. 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");
  6988. var s = Math.abs,
  6989. r = Math.cos,
  6990. a = Math.sin,
  6991. o = Math.pow,
  6992. l = Math.sqrt;
  6993. e.exports = function (e, t, n, c, h, u, d, f, p, m, g, y, k, w) {
  6994. this.id = e, this.sid = t, this.tmpScore = 0, this.team = null, this.skinIndex = 0, this.tailIndex = 0, this.hitTime = 0, this.tails = {};
  6995. for (var b = 0; b < g.length; ++b) g[b].price <= 0 && (this.tails[g[b].id] = 1);
  6996. this.skins = {};
  6997. for (b = 0; b < m.length; ++b) m[b].price <= 0 && (this.skins[m[b].id] = 1);
  6998. this.points = 0, this.dt = 0, this.hidden = !1, this.itemCounts = {}, this.isPlayer = !0, this.pps = 0, this.moveDir = void 0, this.skinRot = 0, this.lastPing = 0, this.iconIndex = 0, this.skinColor = 0, this.spawn = function (e) {
  6999. this.active = !0, this.alive = !0, this.lockMove = !1, this.lockDir = !1, this.minimapCounter = 0, this.chatCountdown = 0, this.shameCount = 0, this.shameTimer = 0, this.sentTo = {}, this.gathering = 0, this.autoGather = 0, this.animTime = 0, this.animSpeed = 0, this.mouseState = 0, this.buildIndex = -1, this.weaponIndex = 0, this.dmgOverTime = {}, this.noMovTimer = 0, this.maxXP = 300, this.XP = 0, this.age = 1, this.kills = 0, this.upgrAge = 2, this.upgradePoints = 0, this.x = 0, this.y = 0, this.zIndex = 0, this.xVel = 0, this.yVel = 0, this.slowMult = 1, this.dir = 0, this.dirPlus = 0, this.targetDir = 0, this.targetAngle = 0, this.maxHealth = 100, this.health = this.maxHealth, this.scale = n.playerScale, this.speed = n.playerSpeed, this.resetMoveDir(), this.resetResources(e), this.items = [0, 3, 6, 10], this.weapons = [0], this.shootCount = 0, this.weaponXP = [], this.reloads = {}
  7000. }, this.resetMoveDir = function () {
  7001. this.moveDir = void 0
  7002. }, this.resetResources = function (e) {
  7003. for (var t = 0; t < n.resourceTypes.length; ++t) this[n.resourceTypes[t]] = e ? 100 : 0
  7004. }, this.addItem = function (e) {
  7005. var t = p.list[e];
  7006. if (t) {
  7007. for (var n = 0; n < this.items.length; ++n)
  7008. if (p.list[this.items[n]].group == t.group) return this.buildIndex == this.items[n] && (this.buildIndex = e), this.items[n] = e, !0;
  7009. return this.items.push(e), !0
  7010. }
  7011. return !1
  7012. }, this.setUserData = function (e) {
  7013. if (e) {
  7014. this.name = "unknown";
  7015. var t = e.name + "",
  7016. s = !1,
  7017. r = (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");
  7018. for (var a of i.list)
  7019. if (-1 != r.indexOf(a)) {
  7020. s = !0;
  7021. break
  7022. } t.length > 0 && !s && (this.name = t), this.skinColor = 0, n.skinColors[e.skin] && (this.skinColor = e.skin)
  7023. }
  7024. }, this.getData = function () {
  7025. return [this.id, this.sid, this.name, c.fixTo(this.x, 2), c.fixTo(this.y, 2), c.fixTo(this.dir, 3), this.health, this.maxHealth, this.scale, this.skinColor]
  7026. }, this.setData = function (e) {
  7027. this.id = e[0], this.sid = e[1], this.name = e[2], this.x = e[3], this.y = e[4], this.dir = e[5], this.health = e[6], this.maxHealth = e[7], this.scale = e[8], this.skinColor = e[9]
  7028. };
  7029. var v = 0;
  7030. this.update = function (e) {
  7031. if (this.alive) {
  7032. if (this.shameTimer > 0 && (this.shameTimer -= e, this.shameTimer <= 0 && (this.shameTimer = 0, this.shameCount = 0)), (v -= e) <= 0) {
  7033. var t = (this.skin && this.skin.healthRegen ? this.skin.healthRegen : 0) + (this.tail && this.tail.healthRegen ? this.tail.healthRegen : 0);
  7034. t && this.changeHealth(t, this), this.dmgOverTime.dmg && (this.changeHealth(-this.dmgOverTime.dmg, this.dmgOverTime.doer), this.dmgOverTime.time -= 1, this.dmgOverTime.time <= 0 && (this.dmgOverTime.dmg = 0)), this.healCol && this.changeHealth(this.healCol, this), v = 1e3
  7035. }
  7036. if (this.alive) {
  7037. if (this.slowMult < 1 && (this.slowMult += 8e-4 * e, this.slowMult > 1 && (this.slowMult = 1)), this.noMovTimer += e, (this.xVel || this.yVel) && (this.noMovTimer = 0), this.lockMove) this.xVel = 0, this.yVel = 0;
  7038. else {
  7039. 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;
  7040. !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, this.xVel += .4 * n.waterCurrent * e) : (i *= .33, this.xVel += n.waterCurrent * e));
  7041. var s = null != this.moveDir ? r(this.moveDir) : 0,
  7042. f = null != this.moveDir ? a(this.moveDir) : 0,
  7043. m = l(s * s + f * f);
  7044. 0 != m && (s /= m, f /= m), s && (this.xVel += s * this.speed * i * e), f && (this.yVel += f * this.speed * i * e)
  7045. }
  7046. var g;
  7047. this.zIndex = 0, this.lockMove = !1, this.healCol = 0;
  7048. for (var y = c.getDistance(0, 0, this.xVel * e, this.yVel * e), k = Math.min(4, Math.max(1, Math.round(y / 40))), w = 1 / k, b = 0; b < k; ++b) {
  7049. this.xVel && (this.x += this.xVel * e * w), this.yVel && (this.y += this.yVel * e * w), g = u.getGridArrays(this.x, this.y, this.scale);
  7050. for (var x = 0; x < g.length; ++x)
  7051. for (var S = 0; S < g[x].length; ++S) g[x][S].active && u.checkCollision(this, g[x][S], w)
  7052. }
  7053. for (b = (T = d.indexOf(this)) + 1; b < d.length; ++b) d[b] != this && d[b].alive && u.checkCollision(this, d[b]);
  7054. if (this.xVel && (this.xVel *= o(n.playerDecel, e), this.xVel <= .01 && this.xVel >= -.01 && (this.xVel = 0)), this.yVel && (this.yVel *= o(n.playerDecel, e), this.yVel <= .01 && this.yVel >= -.01 && (this.yVel = 0)), this.x - this.scale < 0 ? this.x = this.scale : this.x + this.scale > n.mapScale && (this.x = n.mapScale - this.scale), this.y - this.scale < 0 ? this.y = this.scale : this.y + this.scale > n.mapScale && (this.y = n.mapScale - this.scale), this.buildIndex < 0)
  7055. if (this.reloads[this.weaponIndex] > 0) this.reloads[this.weaponIndex] -= e, this.gathering = this.mouseState;
  7056. else if (this.gathering || this.autoGather) {
  7057. var I = !0;
  7058. if (null != p.weapons[this.weaponIndex].gather) this.gather(d);
  7059. else if (null != p.weapons[this.weaponIndex].projectile && this.hasRes(p.weapons[this.weaponIndex], this.skin ? this.skin.projCost : 0)) {
  7060. this.useRes(p.weapons[this.weaponIndex], this.skin ? this.skin.projCost : 0), this.noMovTimer = 0;
  7061. var T = p.weapons[this.weaponIndex].projectile,
  7062. M = 2 * this.scale,
  7063. j = this.skin && this.skin.aMlt ? this.skin.aMlt : 1;
  7064. p.weapons[this.weaponIndex].rec && (this.xVel -= p.weapons[this.weaponIndex].rec * r(this.dir), this.yVel -= p.weapons[this.weaponIndex].rec * a(this.dir)), h.addProjectile(this.x + M * r(this.dir), this.y + M * a(this.dir), this.dir, p.projectiles[T].range * j, p.projectiles[T].speed * j, T, this, null, this.zIndex)
  7065. } else I = !1;
  7066. this.gathering = this.mouseState, I && (this.reloads[this.weaponIndex] = p.weapons[this.weaponIndex].speed * (this.skin && this.skin.atkSpd || 1))
  7067. }
  7068. }
  7069. }
  7070. }, this.addWeaponXP = function (e) {
  7071. this.weaponXP[this.weaponIndex] || (this.weaponXP[this.weaponIndex] = 0), this.weaponXP[this.weaponIndex] += e
  7072. }, this.earnXP = function (e) {
  7073. this.age < n.maxAge && (this.XP += e, this.XP >= this.maxXP ? (this.age < n.maxAge ? (this.age++, this.XP = 0, this.maxXP *= 1.2) : this.XP = this.maxXP, this.upgradePoints++, y.send(this.id, "16", this.upgradePoints, this.upgrAge), y.send(this.id, "15", this.XP, c.fixTo(this.maxXP, 1), this.age)) : y.send(this.id, "15", this.XP))
  7074. }, this.changeHealth = function (e, t) {
  7075. if (e > 0 && this.health >= this.maxHealth) return !1;
  7076. e < 0 && this.skin && (e *= this.skin.dmgMult || 1), e < 0 && this.tail && (e *= this.tail.dmgMult || 1), e < 0 && (this.hitTime = Date.now()), this.health += e, this.health > this.maxHealth && (e -= this.health - this.maxHealth, this.health = this.maxHealth), this.health <= 0 && this.kill(t);
  7077. for (var n = 0; n < d.length; ++n) this.sentTo[d[n].id] && y.send(d[n].id, "h", this.sid, this.health);
  7078. 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), !0
  7079. }, this.kill = function (e) {
  7080. e && e.alive && (e.kills++, 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))), y.send(e.id, "9", "kills", e.kills, 1)), this.alive = !1, y.send(this.id, "11"), w()
  7081. }, this.addResource = function (e, t, i) {
  7082. !i && t > 0 && this.addWeaponXP(t), 3 == e ? k(this, t, !0) : (this[n.resourceTypes[e]] += t, y.send(this.id, "9", n.resourceTypes[e], this[n.resourceTypes[e]], 1))
  7083. }, this.changeItemCount = function (e, t) {
  7084. this.itemCounts[e] = this.itemCounts[e] || 0, this.itemCounts[e] += t, y.send(this.id, "14", e, this.itemCounts[e])
  7085. }, this.buildItem = function (e) {
  7086. var t = this.scale + e.scale + (e.placeOffset || 0),
  7087. n = this.x + t * r(this.dir),
  7088. i = this.y + t * a(this.dir);
  7089. if (this.canBuild(e) && !(e.consume && this.skin && this.skin.noEat) && (e.consume || u.checkItemLocation(n, i, e.scale, .6, e.id, !1, this))) {
  7090. var s = !1;
  7091. if (e.consume) {
  7092. if (this.hitTime) {
  7093. var o = Date.now() - this.hitTime;
  7094. this.hitTime = 0, o <= 120 ? (this.shameCount++, this.shameCount >= 8 && (this.shameTimer = 3e4, this.shameCount = 0)) : (this.shameCount -= 2, this.shameCount <= 0 && (this.shameCount = 0))
  7095. }
  7096. this.shameTimer <= 0 && (s = e.consume(this))
  7097. } else s = !0, e.group.limit && this.changeItemCount(e.group.id, 1), e.pps && (this.pps += e.pps), u.add(u.objects.length, n, i, this.dir, e.scale, e.type, e, !1, this);
  7098. s && (this.useRes(e), this.buildIndex = -1)
  7099. }
  7100. }, this.hasRes = function (e, t) {
  7101. for (var n = 0; n < e.req.length;) {
  7102. if (this[e.req[n]] < Math.round(e.req[n + 1] * (t || 1))) return !1;
  7103. n += 2
  7104. }
  7105. return !0
  7106. }, this.useRes = function (e, t) {
  7107. if (!n.inSandbox)
  7108. for (var i = 0; i < e.req.length;) this.addResource(n.resourceTypes.indexOf(e.req[i]), -Math.round(e.req[i + 1] * (t || 1))), i += 2
  7109. }, this.canBuild = function (e) {
  7110. return !!n.inSandbox || !(e.group.limit && this.itemCounts[e.group.id] >= e.group.limit) && this.hasRes(e)
  7111. }, this.gather = function () {
  7112. this.noMovTimer = 0, this.slowMult -= p.weapons[this.weaponIndex].hitSlow || .3, this.slowMult < 0 && (this.slowMult = 0);
  7113. for (var e, t, i, s = n.fetchVariant(this), o = s.poison, l = s.val, h = {}, m = u.getGridArrays(this.x, this.y, p.weapons[this.weaponIndex].range), g = 0; g < m.length; ++g)
  7114. for (var y = 0; y < m[g].length; ++y)
  7115. if ((t = m[g][y]).active && !t.dontGather && !h[t.sid] && t.visibleToPlayer(this) && c.getDistance(this.x, this.y, t.x, t.y) - t.scale <= p.weapons[this.weaponIndex].range && (e = c.getDirection(t.x, t.y, this.x, this.y), c.getAngleDist(e, this.dir) <= n.gatherAngle)) {
  7116. if (h[t.sid] = 1, t.health) {
  7117. if (t.changeHealth(-p.weapons[this.weaponIndex].dmg * l * (p.weapons[this.weaponIndex].sDmg || 1) * (this.skin && this.skin.bDmg ? this.skin.bDmg : 1), this)) {
  7118. for (var k = 0; k < t.req.length;) this.addResource(n.resourceTypes.indexOf(t.req[k]), t.req[k + 1]), k += 2;
  7119. u.disableObj(t)
  7120. }
  7121. } else {
  7122. this.earnXP(4 * p.weapons[this.weaponIndex].gather);
  7123. var w = p.weapons[this.weaponIndex].gather + (3 == t.type ? 4 : 0);
  7124. this.skin && this.skin.extraGold && this.addResource(3, 1), this.addResource(t.type, w)
  7125. }
  7126. i = !0, u.hitObj(t, e)
  7127. } for (y = 0; y < d.length + f.length; ++y)
  7128. if ((t = d[y] || f[y - d.length]) != this && t.alive && (!t.team || t.team != this.team) && c.getDistance(this.x, this.y, t.x, t.y) - 1.8 * t.scale <= p.weapons[this.weaponIndex].range && (e = c.getDirection(t.x, t.y, this.x, this.y), c.getAngleDist(e, this.dir) <= n.gatherAngle)) {
  7129. var b = p.weapons[this.weaponIndex].steal;
  7130. b && t.addResource && (b = Math.min(t.points || 0, b), this.addResource(3, b), t.addResource(3, -b));
  7131. var v = l;
  7132. null != t.weaponIndex && p.weapons[t.weaponIndex].shield && c.getAngleDist(e + Math.PI, t.dir) <= n.shieldAngle && (v = p.weapons[t.weaponIndex].shield);
  7133. 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),
  7134. S = .3 * (t.weightM || 1) + (p.weapons[this.weaponIndex].knock || 0);
  7135. t.xVel += S * r(e), t.yVel += S * a(e), this.skin && this.skin.healD && this.changeHealth(x * v * this.skin.healD, this), this.tail && this.tail.healD && this.changeHealth(x * v * this.tail.healD, this), t.skin && t.skin.dmg && 1 == v && this.changeHealth(-x * t.skin.dmg, t), t.tail && t.tail.dmg && 1 == v && this.changeHealth(-x * t.tail.dmg, t), !(t.dmgOverTime && this.skin && this.skin.poisonDmg) || t.skin && t.skin.poisonRes || (t.dmgOverTime.dmg = this.skin.poisonDmg, t.dmgOverTime.time = this.skin.poisonTime || 1, t.dmgOverTime.doer = this), !t.dmgOverTime || !o || t.skin && t.skin.poisonRes || (t.dmgOverTime.dmg = 5, t.dmgOverTime.time = 5, t.dmgOverTime.doer = this), t.skin && t.skin.dmgK && (this.xVel -= t.skin.dmgK * r(e), this.yVel -= t.skin.dmgK * a(e)), t.changeHealth(-x * v, this, this)
  7136. } this.sendAnimation(i ? 1 : 0)
  7137. }, this.sendAnimation = function (e) {
  7138. for (var t = 0; t < d.length; ++t) this.sentTo[d[t].id] && this.canSee(d[t]) && y.send(d[t].id, "7", this.sid, e ? 1 : 0, this.weaponIndex)
  7139. };
  7140. var x = 0,
  7141. S = 0;
  7142. this.animate = function (e) {
  7143. this.animTime > 0 && (this.animTime -= e, this.animTime <= 0 ? (this.animTime = 0, this.dirPlus = 0, x = 0, S = 0) : 0 == S ? (x += e / (this.animSpeed * n.hitReturnRatio), this.dirPlus = c.lerp(0, this.targetAngle, Math.min(1, x)), x >= 1 && (x = 1, S = 1)) : (x -= e / (this.animSpeed * (1 - n.hitReturnRatio)), this.dirPlus = c.lerp(0, this.targetAngle, Math.max(0, x))))
  7144. }, this.startAnim = function (e, t) {
  7145. this.animTime = this.animSpeed = p.weapons[t].speed, this.targetAngle = e ? -n.hitAngle : -Math.PI, x = 0, S = 0
  7146. }, this.canSee = function (e) {
  7147. if (!e) return !1;
  7148. if (e.skin && e.skin.invisTimer && e.noMovTimer >= e.skin.invisTimer) return !1;
  7149. var t = s(e.x - this.x) - e.scale,
  7150. i = s(e.y - this.y) - e.scale;
  7151. return t <= n.maxScreenWidth / 2 * 1.3 && i <= n.maxScreenHeight / 2 * 1.3
  7152. }
  7153. }
  7154. },
  7155. "./src/js/data/projectile.js":
  7156. /*!***********************************!*\
  7157. !*** ./src/js/data/projectile.js ***!
  7158. \***********************************/
  7159. /*! no static exports found */
  7160. function (e, t) {
  7161. e.exports = function (e, t, n, i, s, r, a) {
  7162. this.init = function (e, t, n, i, s, r, o, l, c) {
  7163. this.active = !0, this.indx = e, this.x = t, this.y = n, this.dir = i, this.skipMov = !0, this.speed = s, this.dmg = r, this.scale = l, this.range = o, this.owner = c, a && (this.sentTo = {})
  7164. };
  7165. var o, l = [];
  7166. this.update = function (c) {
  7167. if (this.active) {
  7168. var h, u = this.speed * c;
  7169. if (this.skipMov ? this.skipMov = !1 : (this.x += u * Math.cos(this.dir), this.y += u * Math.sin(this.dir), this.range -= u, this.range <= 0 && (this.x += this.range * Math.cos(this.dir), this.y += this.range * Math.sin(this.dir), u = 1, this.range = 0, this.active = !1)), a) {
  7170. for (var d = 0; d < e.length; ++d) !this.sentTo[e[d].id] && e[d].canSee(this) && (this.sentTo[e[d].id] = 1, a.send(e[d].id, "18", r.fixTo(this.x, 1), r.fixTo(this.y, 1), r.fixTo(this.dir, 2), r.fixTo(this.range, 1), this.speed, this.indx, this.layer, this.sid));
  7171. l.length = 0;
  7172. for (d = 0; d < e.length + t.length; ++d) !(o = e[d] || t[d - e.length]).alive || o == this.owner || this.owner.team && o.team == this.owner.team || r.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)) && l.push(o);
  7173. for (var f = n.getGridArrays(this.x, this.y, this.scale), p = 0; p < f.length; ++p)
  7174. for (var m = 0; m < f[p].length; ++m) h = (o = f[p][m]).getScale(), o.active && this.ignoreObj != o.sid && this.layer <= o.layer && l.indexOf(o) < 0 && !o.ignoreCollision && r.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)) && l.push(o);
  7175. if (l.length > 0) {
  7176. var g = null,
  7177. y = null,
  7178. k = null;
  7179. for (d = 0; d < l.length; ++d) k = r.getDistance(this.x, this.y, l[d].x, l[d].y), (null == y || k < y) && (y = k, g = l[d]);
  7180. if (g.isPlayer || g.isAI) {
  7181. var w = .3 * (g.weightM || 1);
  7182. g.xVel += w * Math.cos(this.dir), g.yVel += w * Math.sin(this.dir), null != g.weaponIndex && i.weapons[g.weaponIndex].shield && r.getAngleDist(this.dir + Math.PI, g.dir) <= s.shieldAngle || g.changeHealth(-this.dmg, this.owner, this.owner)
  7183. } else {
  7184. g.projDmg && g.health && g.changeHealth(-this.dmg) && n.disableObj(g);
  7185. for (d = 0; d < e.length; ++d) e[d].active && (g.sentTo[e[d].id] && (g.active ? e[d].canSee(g) && a.send(e[d].id, "8", r.fixTo(this.dir, 2), g.sid) : a.send(e[d].id, "12", g.sid)), g.active || g.owner != e[d] || e[d].changeItemCount(g.group.id, -1))
  7186. }
  7187. this.active = !1;
  7188. for (d = 0; d < e.length; ++d) this.sentTo[e[d].id] && a.send(e[d].id, "19", this.sid, r.fixTo(y, 1))
  7189. }
  7190. }
  7191. }
  7192. }
  7193. }
  7194. },
  7195. "./src/js/data/projectileManager.js":
  7196. /*!******************************************!*\
  7197. !*** ./src/js/data/projectileManager.js ***!
  7198. \******************************************/
  7199. /*! no static exports found */
  7200. function (e, t) {
  7201. e.exports = function (e, t, n, i, s, r, a, o, l) {
  7202. this.addProjectile = function (c, h, u, d, f, p, m, g, y) {
  7203. for (var k, w = r.projectiles[p], b = 0; b < t.length; ++b)
  7204. if (!t[b].active) {
  7205. k = t[b];
  7206. break
  7207. } return k || ((k = new e(n, i, s, r, a, o, l)).sid = t.length, t.push(k)), k.init(p, c, h, u, f, w.dmg, d, w.scale, m), k.ignoreObj = g, k.layer = y || w.layer, k.src = w.src, k
  7208. }
  7209. }
  7210. },
  7211. "./src/js/data/store.js":
  7212. /*!******************************!*\
  7213. !*** ./src/js/data/store.js ***!
  7214. \******************************/
  7215. /*! no static exports found */
  7216. function (e, t) {
  7217. e.exports.hats = [{
  7218. id: 45,
  7219. name: "Shame!",
  7220. dontSell: !0,
  7221. price: 0,
  7222. scale: 120,
  7223. desc: "hacks are for losers"
  7224. }, {
  7225. id: 51,
  7226. name: "Moo Cap",
  7227. price: 0,
  7228. scale: 120,
  7229. desc: "coolest mooer around"
  7230. }, {
  7231. id: 50,
  7232. name: "Apple Cap",
  7233. price: 0,
  7234. scale: 120,
  7235. desc: "apple farms remembers"
  7236. }, {
  7237. id: 28,
  7238. name: "Moo Head",
  7239. price: 0,
  7240. scale: 120,
  7241. desc: "no effect"
  7242. }, {
  7243. id: 29,
  7244. name: "Pig Head",
  7245. price: 0,
  7246. scale: 120,
  7247. desc: "no effect"
  7248. }, {
  7249. id: 30,
  7250. name: "Fluff Head",
  7251. price: 0,
  7252. scale: 120,
  7253. desc: "no effect"
  7254. }, {
  7255. id: 36,
  7256. name: "Pandou Head",
  7257. price: 0,
  7258. scale: 120,
  7259. desc: "no effect"
  7260. }, {
  7261. id: 37,
  7262. name: "Bear Head",
  7263. price: 0,
  7264. scale: 120,
  7265. desc: "no effect"
  7266. }, {
  7267. id: 38,
  7268. name: "Monkey Head",
  7269. price: 0,
  7270. scale: 120,
  7271. desc: "no effect"
  7272. }, {
  7273. id: 44,
  7274. name: "Polar Head",
  7275. price: 0,
  7276. scale: 120,
  7277. desc: "no effect"
  7278. }, {
  7279. id: 35,
  7280. name: "Fez Hat",
  7281. price: 0,
  7282. scale: 120,
  7283. desc: "no effect"
  7284. }, {
  7285. id: 42,
  7286. name: "Enigma Hat",
  7287. price: 0,
  7288. scale: 120,
  7289. desc: "join the enigma army"
  7290. }, {
  7291. id: 43,
  7292. name: "Blitz Hat",
  7293. price: 0,
  7294. scale: 120,
  7295. desc: "hey everybody i'm blitz"
  7296. }, {
  7297. id: 49,
  7298. name: "Bob XIII Hat",
  7299. price: 0,
  7300. scale: 120,
  7301. desc: "like and subscribe"
  7302. }, {
  7303. id: 57,
  7304. name: "Pumpkin",
  7305. price: 50,
  7306. scale: 120,
  7307. desc: "Spooooky"
  7308. }, {
  7309. id: 8,
  7310. name: "Bummle Hat",
  7311. price: 100,
  7312. scale: 120,
  7313. desc: "no effect"
  7314. }, {
  7315. id: 2,
  7316. name: "Straw Hat",
  7317. price: 500,
  7318. scale: 120,
  7319. desc: "no effect"
  7320. }, {
  7321. id: 15,
  7322. name: "Winter Cap",
  7323. price: 600,
  7324. scale: 120,
  7325. desc: "allows you to move at normal speed in snow",
  7326. coldM: 1
  7327. }, {
  7328. id: 5,
  7329. name: "Cowboy Hat",
  7330. price: 1e3,
  7331. scale: 120,
  7332. desc: "no effect"
  7333. }, {
  7334. id: 4,
  7335. name: "Ranger Hat",
  7336. price: 2e3,
  7337. scale: 120,
  7338. desc: "no effect"
  7339. }, {
  7340. id: 18,
  7341. name: "Explorer Hat",
  7342. price: 2e3,
  7343. scale: 120,
  7344. desc: "no effect"
  7345. }, {
  7346. id: 31,
  7347. name: "Flipper Hat",
  7348. price: 2500,
  7349. scale: 120,
  7350. desc: "have more control while in water",
  7351. watrImm: !0
  7352. }, {
  7353. id: 1,
  7354. name: "Marksman Cap",
  7355. price: 3e3,
  7356. scale: 120,
  7357. desc: "increases arrow speed and range",
  7358. aMlt: 1.3
  7359. }, {
  7360. id: 10,
  7361. name: "Bush Gear",
  7362. price: 3e3,
  7363. scale: 160,
  7364. desc: "allows you to disguise yourself as a bush"
  7365. }, {
  7366. id: 48,
  7367. name: "Halo",
  7368. price: 3e3,
  7369. scale: 120,
  7370. desc: "no effect"
  7371. }, {
  7372. id: 6,
  7373. name: "Soldier Helmet",
  7374. price: 4e3,
  7375. scale: 120,
  7376. desc: "reduces damage taken but slows movement",
  7377. spdMult: .94,
  7378. dmgMult: .75
  7379. }, {
  7380. id: 23,
  7381. name: "Anti Venom Gear",
  7382. price: 4e3,
  7383. scale: 120,
  7384. desc: "makes you immune to poison",
  7385. poisonRes: 1
  7386. }, {
  7387. id: 13,
  7388. name: "Medic Gear",
  7389. price: 5e3,
  7390. scale: 110,
  7391. desc: "slowly regenerates health over time",
  7392. healthRegen: 3
  7393. }, {
  7394. id: 9,
  7395. name: "Miners Helmet",
  7396. price: 5e3,
  7397. scale: 120,
  7398. desc: "earn 1 extra gold per resource",
  7399. extraGold: 1
  7400. }, {
  7401. id: 32,
  7402. name: "Musketeer Hat",
  7403. price: 5e3,
  7404. scale: 120,
  7405. desc: "reduces cost of projectiles",
  7406. projCost: .5
  7407. }, {
  7408. id: 7,
  7409. name: "Bull Helmet",
  7410. price: 6e3,
  7411. scale: 120,
  7412. desc: "increases damage done but drains health",
  7413. healthRegen: -5,
  7414. dmgMultO: 1.5,
  7415. spdMult: .96
  7416. }, {
  7417. id: 22,
  7418. name: "Emp Helmet",
  7419. price: 6e3,
  7420. scale: 120,
  7421. desc: "turrets won't attack but you move slower",
  7422. antiTurret: 1,
  7423. spdMult: .7
  7424. }, {
  7425. id: 12,
  7426. name: "Booster Hat",
  7427. price: 6e3,
  7428. scale: 120,
  7429. desc: "increases your movement speed",
  7430. spdMult: 1.16
  7431. }, {
  7432. id: 26,
  7433. name: "Barbarian Armor",
  7434. price: 8e3,
  7435. scale: 120,
  7436. desc: "knocks back enemies that attack you",
  7437. dmgK: .6
  7438. }, {
  7439. id: 21,
  7440. name: "Plague Mask",
  7441. price: 1e4,
  7442. scale: 120,
  7443. desc: "melee attacks deal poison damage",
  7444. poisonDmg: 5,
  7445. poisonTime: 6
  7446. }, {
  7447. id: 46,
  7448. name: "Bull Mask",
  7449. price: 1e4,
  7450. scale: 120,
  7451. desc: "bulls won't target you unless you attack them",
  7452. bullRepel: 1
  7453. }, {
  7454. id: 14,
  7455. name: "Windmill Hat",
  7456. topSprite: !0,
  7457. price: 1e4,
  7458. scale: 120,
  7459. desc: "generates points while worn",
  7460. pps: 1.5
  7461. }, {
  7462. id: 11,
  7463. name: "Spike Gear",
  7464. topSprite: !0,
  7465. price: 1e4,
  7466. scale: 120,
  7467. desc: "deal damage to players that damage you",
  7468. dmg: .45
  7469. }, {
  7470. id: 53,
  7471. name: "Turret Gear",
  7472. topSprite: !0,
  7473. price: 1e4,
  7474. scale: 120,
  7475. desc: "you become a walking turret",
  7476. turret: {
  7477. proj: 1,
  7478. range: 700,
  7479. rate: 2500
  7480. },
  7481. spdMult: .7
  7482. }, {
  7483. id: 20,
  7484. name: "Samurai Armor",
  7485. price: 12e3,
  7486. scale: 120,
  7487. desc: "increased attack speed and fire rate",
  7488. atkSpd: .78
  7489. }, {
  7490. id: 58,
  7491. name: "Dark Knight",
  7492. price: 12e3,
  7493. scale: 120,
  7494. desc: "restores health when you deal damage",
  7495. healD: .4
  7496. }, {
  7497. id: 27,
  7498. name: "Scavenger Gear",
  7499. price: 15e3,
  7500. scale: 120,
  7501. desc: "earn double points for each kill",
  7502. kScrM: 2
  7503. }, {
  7504. id: 40,
  7505. name: "Tank Gear",
  7506. price: 15e3,
  7507. scale: 120,
  7508. desc: "increased damage to buildings but slower movement",
  7509. spdMult: .3,
  7510. bDmg: 3.3
  7511. }, {
  7512. id: 52,
  7513. name: "Thief Gear",
  7514. price: 15e3,
  7515. scale: 120,
  7516. desc: "steal half of a players gold when you kill them",
  7517. goldSteal: .5
  7518. }, {
  7519. id: 55,
  7520. name: "Bloodthirster",
  7521. price: 2e4,
  7522. scale: 120,
  7523. desc: "Restore Health when dealing damage. And increased damage",
  7524. healD: .25,
  7525. dmgMultO: 1.2
  7526. }, {
  7527. id: 56,
  7528. name: "Assassin Gear",
  7529. price: 2e4,
  7530. scale: 120,
  7531. desc: "Go invisible when not moving. Can't eat. Increased speed",
  7532. noEat: !0,
  7533. spdMult: 1.1,
  7534. invisTimer: 1e3
  7535. }], e.exports.accessories = [{
  7536. id: 12,
  7537. name: "Snowball",
  7538. price: 1e3,
  7539. scale: 105,
  7540. xOff: 18,
  7541. desc: "no effect"
  7542. }, {
  7543. id: 9,
  7544. name: "Tree Cape",
  7545. price: 1e3,
  7546. scale: 90,
  7547. desc: "no effect"
  7548. }, {
  7549. id: 10,
  7550. name: "Stone Cape",
  7551. price: 1e3,
  7552. scale: 90,
  7553. desc: "no effect"
  7554. }, {
  7555. id: 3,
  7556. name: "Cookie Cape",
  7557. price: 1500,
  7558. scale: 90,
  7559. desc: "no effect"
  7560. }, {
  7561. id: 8,
  7562. name: "Cow Cape",
  7563. price: 2e3,
  7564. scale: 90,
  7565. desc: "no effect"
  7566. }, {
  7567. id: 11,
  7568. name: "Monkey Tail",
  7569. price: 2e3,
  7570. scale: 97,
  7571. xOff: 25,
  7572. desc: "Super speed but reduced damage",
  7573. spdMult: 1.35,
  7574. dmgMultO: .2
  7575. }, {
  7576. id: 17,
  7577. name: "Apple Basket",
  7578. price: 3e3,
  7579. scale: 80,
  7580. xOff: 12,
  7581. desc: "slowly regenerates health over time",
  7582. healthRegen: 1
  7583. }, {
  7584. id: 6,
  7585. name: "Winter Cape",
  7586. price: 3e3,
  7587. scale: 90,
  7588. desc: "no effect"
  7589. }, {
  7590. id: 4,
  7591. name: "Skull Cape",
  7592. price: 4e3,
  7593. scale: 90,
  7594. desc: "no effect"
  7595. }, {
  7596. id: 5,
  7597. name: "Dash Cape",
  7598. price: 5e3,
  7599. scale: 90,
  7600. desc: "no effect"
  7601. }, {
  7602. id: 2,
  7603. name: "Dragon Cape",
  7604. price: 6e3,
  7605. scale: 90,
  7606. desc: "no effect"
  7607. }, {
  7608. id: 1,
  7609. name: "Super Cape",
  7610. price: 8e3,
  7611. scale: 90,
  7612. desc: "no effect"
  7613. }, {
  7614. id: 7,
  7615. name: "Troll Cape",
  7616. price: 8e3,
  7617. scale: 90,
  7618. desc: "no effect"
  7619. }, {
  7620. id: 14,
  7621. name: "Thorns",
  7622. price: 1e4,
  7623. scale: 115,
  7624. xOff: 20,
  7625. desc: "no effect"
  7626. }, {
  7627. id: 15,
  7628. name: "Blockades",
  7629. price: 1e4,
  7630. scale: 95,
  7631. xOff: 15,
  7632. desc: "no effect"
  7633. }, {
  7634. id: 20,
  7635. name: "Devils Tail",
  7636. price: 1e4,
  7637. scale: 95,
  7638. xOff: 20,
  7639. desc: "no effect"
  7640. }, {
  7641. id: 16,
  7642. name: "Sawblade",
  7643. price: 12e3,
  7644. scale: 90,
  7645. spin: !0,
  7646. xOff: 0,
  7647. desc: "deal damage to players that damage you",
  7648. dmg: .15
  7649. }, {
  7650. id: 13,
  7651. name: "Angel Wings",
  7652. price: 15e3,
  7653. scale: 138,
  7654. xOff: 22,
  7655. desc: "slowly regenerates health over time",
  7656. healthRegen: 3
  7657. }, {
  7658. id: 19,
  7659. name: "Shadow Wings",
  7660. price: 15e3,
  7661. scale: 138,
  7662. xOff: 22,
  7663. desc: "increased movement speed",
  7664. spdMult: 1.1
  7665. }, {
  7666. id: 18,
  7667. name: "Blood Wings",
  7668. price: 2e4,
  7669. scale: 178,
  7670. xOff: 26,
  7671. desc: "restores health when you deal damage",
  7672. healD: .2
  7673. }, {
  7674. id: 21,
  7675. name: "Corrupt X Wings",
  7676. price: 2e4,
  7677. scale: 178,
  7678. xOff: 26,
  7679. desc: "deal damage to players that damage you",
  7680. dmg: .25
  7681. }]
  7682. },
  7683. "./src/js/libs/animText.js":
  7684. /*!*********************************!*\
  7685. !*** ./src/js/libs/animText.js ***!
  7686. \*********************************/
  7687. /*! no static exports found */
  7688. function (e, t) {
  7689. e.exports.AnimText = function () {
  7690. this.init = function (e, t, n, i, s, r, a) {
  7691. this.x = e, this.y = t, this.color = a, this.scale = n, this.startScale = this.scale, this.maxScale = 1.5 * n, this.scaleSpeed = .7, this.speed = i, this.life = s, this.text = r
  7692. }, this.update = function (e) {
  7693. this.life && (this.life -= e, this.y -= this.speed * e, this.scale += this.scaleSpeed * e, this.scale >= this.maxScale ? (this.scale = this.maxScale, this.scaleSpeed *= -1) : this.scale <= this.startScale && (this.scale = this.startScale, this.scaleSpeed = 0), this.life <= 0 && (this.life = 0))
  7694. }, this.render = function (e, t, n) {
  7695. e.fillStyle = this.color, e.font = this.scale + "px Hammersmith One", e.fillText(this.text, this.x - t, this.y - n)
  7696. }
  7697. }, e.exports.TextManager = function () {
  7698. this.texts = [], this.update = function (e, t, n, i) {
  7699. t.textBaseline = "middle", t.textAlign = "center";
  7700. for (var s = 0; s < this.texts.length; ++s) this.texts[s].life && (this.texts[s].update(e), this.texts[s].render(t, n, i))
  7701. }, this.showText = function (t, n, i, s, r, a, o) {
  7702. for (var l, c = 0; c < this.texts.length; ++c)
  7703. if (!this.texts[c].life) {
  7704. l = this.texts[c];
  7705. break
  7706. } l || (l = new e.exports.AnimText, this.texts.push(l)), l.init(t, n, i, s, r, a, o)
  7707. }
  7708. }
  7709. },
  7710. "./src/js/libs/io-client.js":
  7711. /*!**********************************!*\
  7712. !*** ./src/js/libs/io-client.js ***!
  7713. \**********************************/
  7714. /*! no static exports found */
  7715. function (e, t, n) {
  7716. var i = n( /*! msgpack-lite */ "./node_modules/msgpack-lite/lib/browser.js");
  7717. n( /*! ../config */ "./src/js/config.js");
  7718. e.exports = {
  7719. socket: null,
  7720. connected: !1,
  7721. socketId: -1,
  7722. connect: function (e, t, n) {
  7723. if (!this.socket) {
  7724. var s = this;
  7725. try {
  7726. var r = !1,
  7727. a = e;
  7728. this.socket = new WebSocket(a), this.socket.binaryType = "arraybuffer", this.socket.onmessage = function (e) {
  7729. var t = new Uint8Array(e.data),
  7730. r = i.decode(t),
  7731. a = r[0];
  7732. t = r[1];
  7733. "io-init" == a ? s.socketId = t[0] : n[a].apply(void 0, t)
  7734. }, this.socket.onopen = function () {
  7735. s.connected = !0, t()
  7736. }, this.socket.onclose = function (e) {
  7737. s.connected = !1, 4001 == e.code ? t("Invalid Connection") : r || t("disconnected"), madeinohio.play()
  7738. }, this.socket.onerror = function (e) {
  7739. this.socket && this.socket.readyState != WebSocket.OPEN && (r = !0, console.error("Socket error", arguments), t("Socket error"))
  7740. }
  7741. } catch (e) {
  7742. console.warn("Socket connection error:", e), t(e)
  7743. }
  7744. }
  7745. },
  7746. send: function (e) {
  7747. var t = Array.prototype.slice.call(arguments, 1),
  7748. n = i.encode([e, t]);
  7749. this.socket.send(n)
  7750. },
  7751. doNewSend: function (e) {
  7752. var t = Array.prototype.slice.call(arguments, 1),
  7753. n = i.encode([e, t]);
  7754. this.socket.send(n)
  7755. },
  7756. socketReady: function () {
  7757. return this.socket && this.connected
  7758. },
  7759. close: function () {
  7760. this.socket && this.socket.close()
  7761. }
  7762. }
  7763. },
  7764. "./src/js/libs/modernizr.js":
  7765. /*!**********************************!*\
  7766. !*** ./src/js/libs/modernizr.js ***!
  7767. \**********************************/
  7768. /*! no static exports found */
  7769. function (e, t) {
  7770. ! function (e, t, n) {
  7771. function i(e, t) {
  7772. return typeof e === t
  7773. }
  7774. var s = [],
  7775. r = [],
  7776. a = {
  7777. _version: "3.5.0",
  7778. _config: {
  7779. classPrefix: "",
  7780. enableClasses: !0,
  7781. enableJSClass: !0,
  7782. usePrefixes: !0
  7783. },
  7784. _q: [],
  7785. on: function (e, t) {
  7786. var n = this;
  7787. setTimeout((function () {
  7788. t(n[e])
  7789. }), 0)
  7790. },
  7791. addTest: function (e, t, n) {
  7792. r.push({
  7793. name: e,
  7794. fn: t,
  7795. options: n
  7796. })
  7797. },
  7798. addAsyncTest: function (e) {
  7799. r.push({
  7800. name: null,
  7801. fn: e
  7802. })
  7803. }
  7804. },
  7805. o = function () {};
  7806. o.prototype = a, o = new o;
  7807. var l = t.documentElement,
  7808. c = "svg" === l.nodeName.toLowerCase();
  7809. o.addTest("passiveeventlisteners", (function () {
  7810. var t = !1;
  7811. try {
  7812. var n = Object.defineProperty({}, "passive", {
  7813. get: function () {
  7814. t = !0
  7815. }
  7816. });
  7817. e.addEventListener("test", null, n)
  7818. } catch (e) {}
  7819. return t
  7820. })),
  7821. function () {
  7822. var e, t, n, a, l, c;
  7823. for (var h in r)
  7824. if (r.hasOwnProperty(h)) {
  7825. if (e = [], (t = r[h]).name && (e.push(t.name.toLowerCase()), t.options && t.options.aliases && t.options.aliases.length))
  7826. for (n = 0; n < t.options.aliases.length; n++) e.push(t.options.aliases[n].toLowerCase());
  7827. for (a = i(t.fn, "function") ? t.fn() : t.fn, l = 0; l < e.length; l++) 1 === (c = e[l].split(".")).length ? o[c[0]] = a : (!o[c[0]] || o[c[0]] instanceof Boolean || (o[c[0]] = new Boolean(o[c[0]])), o[c[0]][c[1]] = a), s.push((a ? "" : "no-") + c.join("-"))
  7828. }
  7829. }(),
  7830. function (e) {
  7831. var t = l.className,
  7832. n = o._config.classPrefix || "";
  7833. if (c && (t = t.baseVal), o._config.enableJSClass) {
  7834. var i = new RegExp("(^|\\s)" + n + "no-js(\\s|$)");
  7835. t = t.replace(i, "$1" + n + "js$2")
  7836. }
  7837. o._config.enableClasses && (t += " " + n + e.join(" " + n), c ? l.className.baseVal = t : l.className = t)
  7838. }(s), delete a.addTest, delete a.addAsyncTest;
  7839. for (var h = 0; h < o._q.length; h++) o._q[h]();
  7840. e.Modernizr = o
  7841. }(window, document)
  7842. },
  7843. "./src/js/libs/soundManager.js":
  7844. /*!*************************************!*\
  7845. !*** ./src/js/libs/soundManager.js ***!
  7846. \*************************************/
  7847. /*! no static exports found */
  7848. function (e, t) {
  7849. e.exports.obj = function (e, t) {
  7850. var n;
  7851. this.sounds = [], this.active = !0, this.play = function (t, i, s) {
  7852. i && this.active && ((n = this.sounds[t]) || (n = new Howl({
  7853. src: ".././sound/" + t + ".mp3"
  7854. }), this.sounds[t] = n), s && n.isPlaying || (n.isPlaying = !0, n.play(), n.volume((i || 1) * e.volumeMult), n.loop(s)))
  7855. }, this.toggleMute = function (e, t) {
  7856. (n = this.sounds[e]) && n.mute(t)
  7857. }, this.stop = function (e) {
  7858. (n = this.sounds[e]) && (n.stop(), n.isPlaying = !1)
  7859. }
  7860. }
  7861. },
  7862. "./src/js/libs/utils.js":
  7863. /*!******************************!*\
  7864. !*** ./src/js/libs/utils.js ***!
  7865. \******************************/
  7866. /*! no static exports found */
  7867. function (e, t) {
  7868. var n = Math.abs,
  7869. i = (Math.cos, Math.sin, Math.pow, Math.sqrt),
  7870. s = Math.atan2,
  7871. r = Math.PI;
  7872. e.exports.randInt = function (e, t) {
  7873. return Math.floor(Math.random() * (t - e + 1)) + e
  7874. }, e.exports.randFloat = function (e, t) {
  7875. return Math.random() * (t - e + 1) + e
  7876. }, e.exports.lerp = function (e, t, n) {
  7877. return e + (t - e) * n
  7878. }, e.exports.decel = function (e, t) {
  7879. return e > 0 ? e = Math.max(0, e - t) : e < 0 && (e = Math.min(0, e + t)), e
  7880. }, e.exports.getDistance = function (e, t, n, s) {
  7881. return i((n -= e) * n + (s -= t) * s)
  7882. }, e.exports.getDirection = function (e, t, n, i) {
  7883. return s(t - i, e - n)
  7884. }, e.exports.getAngleDist = function (e, t) {
  7885. var i = n(t - e) % (2 * r);
  7886. return i > r ? 2 * r - i : i
  7887. }, e.exports.isNumber = function (e) {
  7888. return "number" == typeof e && !isNaN(e) && isFinite(e)
  7889. }, e.exports.isString = function (e) {
  7890. return e && "string" == typeof e
  7891. }, e.exports.kFormat = function (e) {
  7892. return e > 999 ? (e / 1e3).toFixed(1) + "k" : e
  7893. }, e.exports.capitalizeFirst = function (e) {
  7894. return e.charAt(0).toUpperCase() + e.slice(1)
  7895. }, e.exports.fixTo = function (e, t) {
  7896. return parseFloat(e.toFixed(t))
  7897. }, e.exports.sortByPoints = function (e, t) {
  7898. return parseFloat(t.points) - parseFloat(e.points)
  7899. }, e.exports.lineInRect = function (e, t, n, i, s, r, a, o) {
  7900. var l = s,
  7901. c = a;
  7902. if (s > a && (l = a, c = s), c > n && (c = n), l < e && (l = e), l > c) return !1;
  7903. var h = r,
  7904. u = o,
  7905. d = a - s;
  7906. if (Math.abs(d) > 1e-7) {
  7907. var f = (o - r) / d,
  7908. p = r - f * s;
  7909. h = f * l + p, u = f * c + p
  7910. }
  7911. if (h > u) {
  7912. var m = u;
  7913. u = h, h = m
  7914. }
  7915. return u > i && (u = i), h < t && (h = t), !(h > u)
  7916. }, e.exports.containsPoint = function (e, t, n) {
  7917. var i = e.getBoundingClientRect(),
  7918. s = i.left + window.scrollX,
  7919. r = i.top + window.scrollY,
  7920. a = i.width,
  7921. o = i.height;
  7922. return t > s && t < s + a && (n > r && n < r + o)
  7923. }, e.exports.mousifyTouchEvent = function (e) {
  7924. var t = e.changedTouches[0];
  7925. e.screenX = t.screenX, e.screenY = t.screenY, e.clientX = t.clientX, e.clientY = t.clientY, e.pageX = t.pageX, e.pageY = t.pageY
  7926. }, e.exports.hookTouchEvents = function (t, n) {
  7927. var i = !n,
  7928. s = !1,
  7929. r = !1;
  7930.  
  7931. function a(n) {
  7932. e.exports.mousifyTouchEvent(n), window.setUsingTouch(!0), i && (n.preventDefault(), n.stopPropagation()), s && (t.onclick && t.onclick(n), t.onmouseout && t.onmouseout(n), s = !1)
  7933. }
  7934. t.addEventListener("touchstart", e.exports.checkTrusted((function (n) {
  7935. e.exports.mousifyTouchEvent(n), window.setUsingTouch(!0), i && (n.preventDefault(), n.stopPropagation());
  7936. t.onmouseover && t.onmouseover(n);
  7937. s = !0
  7938. })), r), t.addEventListener("touchmove", e.exports.checkTrusted((function (n) {
  7939. e.exports.mousifyTouchEvent(n), window.setUsingTouch(!0), i && (n.preventDefault(), n.stopPropagation());
  7940. e.exports.containsPoint(t, n.pageX, n.pageY) ? s || (t.onmouseover && t.onmouseover(n), s = !0) : s && (t.onmouseout && t.onmouseout(n), s = !1)
  7941. })), r), t.addEventListener("touchend", e.exports.checkTrusted(a), r), t.addEventListener("touchcancel", e.exports.checkTrusted(a), r), t.addEventListener("touchleave", e.exports.checkTrusted(a), r)
  7942. }, e.exports.removeAllChildren = function (e) {
  7943. for (; e.hasChildNodes();) e.removeChild(e.lastChild)
  7944. }, e.exports.generateElement = function (t) {
  7945. var n = document.createElement(t.tag || "div");
  7946.  
  7947. function i(e, i) {
  7948. t[e] && (n[i] = t[e])
  7949. }
  7950. for (var s in i("text", "textContent"), i("html", "innerHTML"), i("class", "className"), t) {
  7951. switch (s) {
  7952. case "tag":
  7953. case "text":
  7954. case "html":
  7955. case "class":
  7956. case "style":
  7957. case "hookTouch":
  7958. case "parent":
  7959. case "children":
  7960. continue
  7961. }
  7962. n[s] = t[s]
  7963. }
  7964. if (n.onclick && (n.onclick = e.exports.checkTrusted(n.onclick)), n.onmouseover && (n.onmouseover = e.exports.checkTrusted(n.onmouseover)), n.onmouseout && (n.onmouseout = e.exports.checkTrusted(n.onmouseout)), t.style && (n.style.cssText = t.style), t.hookTouch && e.exports.hookTouchEvents(n), t.parent && t.parent.appendChild(n), t.children)
  7965. for (var r = 0; r < t.children.length; r++) n.appendChild(t.children[r]);
  7966. return n
  7967. }, e.exports.eventIsTrusted = function (e) {
  7968. return !e || "boolean" != typeof e.isTrusted || e.isTrusted
  7969. }, e.exports.checkTrusted = function (t) {
  7970. return function (n) {
  7971. n && n instanceof Event && e.exports.eventIsTrusted(n) && t(n)
  7972. }
  7973. }, e.exports.randomString = function (e) {
  7974. for (var t = "", n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", i = 0; i < e; i++) t += n.charAt(Math.floor(Math.random() * n.length));
  7975. return t
  7976. }, e.exports.countInArray = function (e, t) {
  7977. for (var n = 0, i = 0; i < e.length; i++) e[i] === t && n++;
  7978. return n
  7979. }
  7980. },
  7981. "./vultr/VultrClient.js":
  7982. /*!******************************!*\
  7983. !*** ./vultr/VultrClient.js ***!
  7984. \******************************/
  7985. /*! no static exports found */
  7986. function (e, t, n) {
  7987. var i = n( /*! url */ "./node_modules/url/url.js"),
  7988. s = n( /*! md5 */ "./node_modules/md5/md5.js");
  7989.  
  7990. function r(e, t, n, i, s) {
  7991. "localhost" == location.hostname && (window.location.hostname = "127.0.0.1"), this.debugLog = !1, this.baseUrl = e, this.lobbySize = n, this.devPort = t, this.lobbySpread = i, this.rawIPs = !!s, this.server = void 0, this.gameIndex = void 0, this.callback = void 0, this.errorCallback = void 0, this.processServers(vultr.servers)
  7992. }
  7993. r.prototype.regionInfo = {
  7994. 0: {
  7995. name: "Local",
  7996. latitude: 0,
  7997. longitude: 0
  7998. },
  7999. "vultr:1": {
  8000. name: "New Jersey",
  8001. latitude: 40.1393329,
  8002. longitude: -75.8521818
  8003. },
  8004. "vultr:2": {
  8005. name: "Chicago",
  8006. latitude: 41.8339037,
  8007. longitude: -87.872238
  8008. },
  8009. "vultr:3": {
  8010. name: "Dallas",
  8011. latitude: 32.8208751,
  8012. longitude: -96.8714229
  8013. },
  8014. "vultr:4": {
  8015. name: "Seattle",
  8016. latitude: 47.6149942,
  8017. longitude: -122.4759879
  8018. },
  8019. "vultr:5": {
  8020. name: "Los Angeles",
  8021. latitude: 34.0207504,
  8022. longitude: -118.691914
  8023. },
  8024. "vultr:6": {
  8025. name: "Atlanta",
  8026. latitude: 33.7676334,
  8027. longitude: -84.5610332
  8028. },
  8029. "vultr:7": {
  8030. name: "Amsterdam",
  8031. latitude: 52.3745287,
  8032. longitude: 4.7581878
  8033. },
  8034. "vultr:8": {
  8035. name: "London",
  8036. latitude: 51.5283063,
  8037. longitude: -.382486
  8038. },
  8039. "vultr:9": {
  8040. name: "Frankfurt",
  8041. latitude: 50.1211273,
  8042. longitude: 8.496137
  8043. },
  8044. "vultr:12": {
  8045. name: "Silicon Valley",
  8046. latitude: 37.4024714,
  8047. longitude: -122.3219752
  8048. },
  8049. "vultr:19": {
  8050. name: "Sydney",
  8051. latitude: -33.8479715,
  8052. longitude: 150.651084
  8053. },
  8054. "vultr:24": {
  8055. name: "Paris",
  8056. latitude: 48.8588376,
  8057. longitude: 2.2773454
  8058. },
  8059. "vultr:25": {
  8060. name: "Tokyo",
  8061. latitude: 35.6732615,
  8062. longitude: 139.569959
  8063. },
  8064. "vultr:39": {
  8065. name: "Miami",
  8066. latitude: 25.7823071,
  8067. longitude: -80.3012156
  8068. },
  8069. "vultr:40": {
  8070. name: "Singapore",
  8071. latitude: 1.3147268,
  8072. longitude: 103.7065876
  8073. }
  8074. }, r.prototype.start = function (e, t) {
  8075. this.callback = e, this.errorCallback = t;
  8076. var n = this.parseServerQuery();
  8077. n ? (this.log("Found server in query."), this.password = n[3], this.connect(n[0], n[1], n[2])) : (this.log("Pinging servers..."), this.pingServers())
  8078. }, r.prototype.parseServerQuery = function () {
  8079. var e = i.parse(location.href, !0),
  8080. t = e.query.server;
  8081. if ("string" == typeof t) {
  8082. var n = t.split(":");
  8083. if (3 == n.length) {
  8084. var s = n[0],
  8085. r = parseInt(n[1]),
  8086. a = parseInt(n[2]);
  8087. return "0" == s || s.startsWith("vultr:") || (s = "vultr:" + s), [s, r, a, e.query.password]
  8088. }
  8089. this.errorCallback("Invalid number of server parameters in " + t)
  8090. }
  8091. }, r.prototype.findServer = function (e, t) {
  8092. var n = this.servers[e];
  8093. if (Array.isArray(n)) {
  8094. for (var i = 0; i < n.length; i++) {
  8095. var s = n[i];
  8096. if (s.index == t) return s
  8097. }
  8098. console.warn("Could not find server in region " + e + " with index " + t + ".")
  8099. } else this.errorCallback("No server list for region " + e)
  8100. }, r.prototype.pingServers = function () {
  8101. var e = this,
  8102. t = [];
  8103. for (var n in this.servers)
  8104. if (this.servers.hasOwnProperty(n)) {
  8105. var i = this.servers[n],
  8106. s = i[Math.floor(Math.random() * i.length)];
  8107. null != s ? function (i, s) {
  8108. var r = new XMLHttpRequest;
  8109. r.onreadystatechange = function (i) {
  8110. var r = i.target;
  8111. if (4 == r.readyState)
  8112. if (200 == r.status) {
  8113. for (var a = 0; a < t.length; a++) t[a].abort();
  8114. e.log("Connecting to region", s.region);
  8115. var o = e.seekServer(s.region);
  8116. e.connect(o[0], o[1], o[2])
  8117. } else console.warn("Error pinging " + s.ip + " in region " + n)
  8118. };
  8119. var a = "//" + e.serverAddress(s.ip, !0) + ":" + e.serverPort(s) + "/ping";
  8120. r.open("GET", a, !0), r.send(null), e.log("Pinging", a), t.push(r)
  8121. }(0, s) : console.log("No target server for region " + n)
  8122. }
  8123. }, r.prototype.seekServer = function (e, t, n) {
  8124. null == n && (n = "random"), null == t && (t = !1);
  8125. const i = ["random"];
  8126. var s = this.lobbySize,
  8127. r = this.lobbySpread,
  8128. a = this.servers[e].flatMap((function (e) {
  8129. var t = 0;
  8130. return e.games.map((function (n) {
  8131. var i = t++;
  8132. return {
  8133. region: e.region,
  8134. index: e.index * e.games.length + i,
  8135. gameIndex: i,
  8136. gameCount: e.games.length,
  8137. playerCount: n.playerCount,
  8138. isPrivate: n.isPrivate
  8139. }
  8140. }))
  8141. })).filter((function (e) {
  8142. return !e.isPrivate
  8143. })).filter((function (e) {
  8144. return !t || 0 == e.playerCount && e.gameIndex >= e.gameCount / 2
  8145. })).filter((function (e) {
  8146. return "random" == n || i[e.index % i.length].key == n
  8147. })).sort((function (e, t) {
  8148. return t.playerCount - e.playerCount
  8149. })).filter((function (e) {
  8150. return e.playerCount < s
  8151. }));
  8152. if (t && a.reverse(), 0 != a.length) {
  8153. var o = Math.min(r, a.length),
  8154. l = Math.floor(Math.random() * o),
  8155. c = a[l = Math.min(l, a.length - 1)],
  8156. h = c.region,
  8157. u = (l = Math.floor(c.index / c.gameCount), c.index % c.gameCount);
  8158. return this.log("Found server."), [h, l, u]
  8159. }
  8160. this.errorCallback("No open servers.")
  8161. }, r.prototype.connect = function (e, t, n) {
  8162. if (!this.connected) {
  8163. var i = this.findServer(e, t);
  8164. null != i ? (this.log("Connecting to server", i, "with game index", n), 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)), this.server = i, this.gameIndex = n, this.log("Calling callback with address", this.serverAddress(i.ip), "on port", this.serverPort(i), "with game index", n), this.callback(this.serverAddress(i.ip), this.serverPort(i), n))) : this.errorCallback("Failed to find server for region " + e + " and index " + t)
  8165. }
  8166. }, r.prototype.switchServer = function (e, t, n, i) {
  8167. this.switchingServers = !0, window.location.href = this.generateHref(e, t, n, i)
  8168. }, r.prototype.generateHref = function (e, t, n, i) {
  8169. var s = "/?server=" + (e = this.stripRegion(e)) + ":" + t + ":" + n;
  8170. return i && (s += "&password=" + encodeURIComponent(i)), s
  8171. }, r.prototype.serverAddress = function (e, t) {
  8172. 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
  8173. }, r.prototype.serverPort = function (e) {
  8174. return 0 == e.region ? this.devPort : location.protocol.startsWith("https") ? 443 : 80
  8175. }, r.prototype.processServers = function (e) {
  8176. for (var t = {}, n = 0; n < e.length; n++) {
  8177. var i = e[n],
  8178. s = t[i.region];
  8179. null == s && (s = [], t[i.region] = s), s.push(i)
  8180. }
  8181. for (var r in t) t[r] = t[r].sort((function (e, t) {
  8182. return e.index - t.index
  8183. }));
  8184. this.servers = t
  8185. }, r.prototype.ipToHex = function (e) {
  8186. return e.split(".").map((e => ("00" + parseInt(e).toString(16)).substr(-2))).join("").toLowerCase()
  8187. }, r.prototype.hashIP = function (e) {
  8188. return s(this.ipToHex(e))
  8189. }, r.prototype.log = function () {
  8190. return this.debugLog ? console.log.apply(void 0, arguments) : console.verbose ? console.verbose.apply(void 0, arguments) : void 0
  8191. }, r.prototype.stripRegion = function (e) {
  8192. return e.startsWith("vultr:") ? e = e.slice(6) : e.startsWith("do:") && (e = e.slice(3)), e
  8193. }, window.testVultrClient = function () {
  8194. var e = 1;
  8195.  
  8196. function t(t, n) {
  8197. (t = `${t}`) == (n = `${n}`) ? console.log(`Assert ${e} passed.`): console.warn(`Assert ${e} failed. Expected ${n}, got ${t}.`), e++
  8198. }
  8199. var n = new r("test.io", -1, 5, 1, !1);
  8200. n.errorCallback = function (e) {
  8201. e
  8202. }, n.processServers(function (e) {
  8203. var t = [];
  8204. for (var n in e)
  8205. for (var i = e[n], s = 0; s < i.length; s++) t.push({
  8206. ip: n + ":" + s,
  8207. scheme: "testing",
  8208. region: n,
  8209. index: s,
  8210. games: i[s].map((e => ({
  8211. playerCount: e,
  8212. isPrivate: !1
  8213. })))
  8214. });
  8215. return t
  8216. }({
  8217. 1: [
  8218. [0, 0, 0, 0],
  8219. [0, 0, 0, 0]
  8220. ],
  8221. 2: [
  8222. [5, 1, 0, 0],
  8223. [0, 0, 0, 0]
  8224. ],
  8225. 3: [
  8226. [5, 0, 1, 5],
  8227. [0, 0, 0, 0]
  8228. ],
  8229. 4: [
  8230. [5, 1, 1, 5],
  8231. [1, 0, 0, 0]
  8232. ],
  8233. 5: [
  8234. [5, 1, 1, 5],
  8235. [1, 0, 4, 0]
  8236. ],
  8237. 6: [
  8238. [5, 5, 5, 5],
  8239. [2, 3, 1, 4]
  8240. ],
  8241. 7: [
  8242. [5, 5, 5, 5],
  8243. [5, 5, 5, 5]
  8244. ]
  8245. })), t(n.seekServer(1, !1), [1, 0, 0]), t(n.seekServer(1, !0), [1, 1, 3]), t(n.seekServer(2, !1), [2, 0, 1]), t(n.seekServer(2, !0), [2, 1, 3]), t(n.seekServer(3, !1), [3, 0, 2]), t(n.seekServer(3, !0), [3, 1, 3]), t(n.seekServer(4, !1), [4, 0, 1]), t(n.seekServer(4, !0), [4, 1, 3]), t(n.seekServer(5, !1), [5, 1, 2]), t(n.seekServer(5, !0), [5, 1, 3]), t(n.seekServer(6, !1), [6, 1, 3]), t(n.seekServer(6, !0), void 0), t(n.seekServer(7, !1), void 0), t(n.seekServer(7, !0), void 0), console.log("Tests passed.")
  8246. };
  8247. var a = function (e, t) {
  8248. return e.concat(t)
  8249. };
  8250. Array.prototype.flatMap = function (e) {
  8251. return function (e, t) {
  8252. return t.map(e).reduce(a, [])
  8253. }(e, this)
  8254. }, e.exports = r
  8255. }
  8256. });