Advertisement
Guest User

Fightcade2-WIN32-v2.0.10

a guest
Mar 19th, 2018
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 282.47 KB | None | 0 0
  1. webpackJsonp([0], [, , function(e, t, n) {
  2. "use strict";
  3. var a = n(1),
  4. s = n.n(a),
  5. i = {
  6. addr: "play.fightcade.com",
  7. port: 443,
  8. fcadePort: 7e3,
  9. uri: "wss://play.fightcade.com/ws/"
  10. },
  11. o = {
  12. default: {
  13. id: "default",
  14. name: "Default",
  15. class: "theme-default"
  16. },
  17. lembranza: {
  18. id: "lembranza",
  19. name: "Lembranza",
  20. class: "theme-lembranza"
  21. },
  22. meigallo: {
  23. id: "meigallo",
  24. name: "Meigallo",
  25. class: "theme-meigallo"
  26. },
  27. rabudo: {
  28. id: "rabudo",
  29. name: "Rabudo",
  30. class: "theme-rabudo"
  31. },
  32. solpor: {
  33. id: "solpor",
  34. name: "Solpor",
  35. class: "theme-solpor"
  36. },
  37. vagalume: {
  38. id: "vagalume",
  39. name: "Vagalume",
  40. class: "theme-vagalume"
  41. }
  42. },
  43. l = [{
  44. id: "welcome-channel"
  45. }, {
  46. id: "patreon-channel"
  47. }, {
  48. id: "add-channel"
  49. }];
  50. t.a = {
  51. userRole: {},
  52. themes: o,
  53. filtersOptions: {
  54. years: [],
  55. genres: [],
  56. systems: []
  57. },
  58. notificationTypeToVar: {
  59. message: "unseenMessages",
  60. mention: "unseenMentions",
  61. challenge: "unseenChallenges"
  62. },
  63. baseChannels: l,
  64. channelsList: {
  65. forNotifications: [],
  66. orderByGameIdLength: []
  67. },
  68. activeTheme: o.default,
  69. doubleClickTime: 300,
  70. serverInfo: i,
  71. localUser: {},
  72. currentMatchElo: {},
  73. channelByGameId: {},
  74. setChannels: function(e) {
  75. var t = this;
  76. this.channelsList.forNotifications = [], this.channelsList.orderByGameIdLength = [], s.a.forEach(e, function(e) {
  77. t.channelsList.forNotifications.push({
  78. textToCompare: (e.gameid + " " + e.name).toLowerCase(),
  79. gameId: e.gameid,
  80. channelName: e.name,
  81. thumbnail: e.thumbnail
  82. }), t.channelsList.orderByGameIdLength.push({
  83. name: e.name,
  84. gameId: e.gameid
  85. })
  86. }), this.channelsList.orderByGameIdLength = s.a.orderBy(this.channelsList.orderByGameIdLength, function(e) {
  87. return e.gameId.length
  88. }, ["desc"])
  89. },
  90. setFiltersOptions: function(e) {
  91. this.filtersOptions.years = e.years, this.filtersOptions.genres = e.genres, this.filtersOptions.systems = e.systems, this.filtersOptions.years = s.a.sortBy(this.filtersOptions.years), this.filtersOptions.genres = s.a.sortBy(this.filtersOptions.genres), this.filtersOptions.systems = s.a.sortBy(this.filtersOptions.systems), this.filtersOptions.years.unshift("All"), this.filtersOptions.genres.unshift("All"), this.filtersOptions.systems.unshift("All")
  92. },
  93. setTheme: function(e) {
  94. this.activeTheme = o[e]
  95. },
  96. isGameChannel: function(e) {
  97. return -1 === s.a.findIndex(l, {
  98. id: e
  99. })
  100. }
  101. }
  102. }, , , function(e, t, n) {
  103. "use strict";
  104. var a = n(15),
  105. s = n.n(a),
  106. i = n(1),
  107. o = n.n(i),
  108. l = n(2),
  109. c = function(e, t, n) {
  110. var a = {
  111. id: e.name,
  112. name: e.name,
  113. gravatar: e.gravatar,
  114. country: e.country || {},
  115. pingvariation: e.pingvariation || 0,
  116. away: e.away,
  117. channels: [],
  118. channelsAway: [],
  119. channelRank: {},
  120. playing: null,
  121. settings: {
  122. ranked: e.ranked
  123. }
  124. };
  125. return e.playing && e.game && (a.playing = {
  126. gameName: e.game.channelname,
  127. quarkId: e.game.quarkid,
  128. gameId: e.game.gameid
  129. }), n && (a.channelRank[n] = e.rank, e.channel_away && a.channelsAway.push(n)), t ? (a.isLocal = t, a.email = e.email, a.role = e.role || l.a.userRole.regular, a.activeChannels = e.active_channels || [], a.favoritesChannels = e.favorites_channels || [], a.ignores = e.ignores || [], a.settings.delay = "delay" in e ? e.delay : -1, a.settings.desktopNotifications = e.desktop_notifications, a.settings.soundNotifications = e.sound_notifications, a.settings.userEventsNotifications = e.user_events_notifications, a.settings.theme = e.theme in l.a.themes ? e.theme : l.a.themes.default.id, a.perks = e.perks || {}) : (a.vping = e.vping, a.ping = e.ping), a
  130. };
  131. t.a = {
  132. prepareSocket: function(e, t) {
  133. if (this.websocket) return void(t() && t());
  134. var n = new WebSocket(l.a.serverInfo.uri);
  135. n.binaryType = "arraybuffer";
  136. var a = this;
  137. n.onopen = function() {
  138. a.websocket = n, t && t()
  139. }, n.onclose = function() {
  140. a.connected = !1, a.genericCallbacks.onDisconnect(), a.websocket = null
  141. }, n.onerror = function(e) {}, n.onmessage = function(e) {
  142. if ("string" == typeof e.data) {
  143. var t = JSON.parse(e.data);
  144. if (t.result) switch (t.req) {
  145. case "autologin":
  146. a.handleReqAutoLogin(t);
  147. break;
  148. case "login":
  149. a.handleReqLogin(t);
  150. break;
  151. case "join":
  152. a.handleReqJoin(t);
  153. break;
  154. case "leave":
  155. a.handleReqLeave(t);
  156. break;
  157. case "chat":
  158. a.handleReqChat(t);
  159. break;
  160. case "channels":
  161. a.handleReqChannels(t);
  162. break;
  163. case "challenge":
  164. a.handleReqChallenge(t);
  165. break;
  166. case "accept":
  167. a.handleReqAccept(t);
  168. break;
  169. case "updateuser":
  170. a.handleReqUpdateUser(t);
  171. break;
  172. case "linkpreview":
  173. a.handleReqLinkPreview(t);
  174. break;
  175. case "filteroptions":
  176. a.handleReqFilterOptions(t);
  177. break;
  178. case "terminalcommand":
  179. a.handleReqTerminalCommand(t)
  180. } else switch (t.req) {
  181. case "chat":
  182. a.handleEvtChat(t);
  183. break;
  184. case "join":
  185. a.handleEvtJoin(t);
  186. break;
  187. case "leave":
  188. a.handleEvtLeave(t);
  189. break;
  190. case "challenge":
  191. a.handleEvtChallenge(t);
  192. break;
  193. case "cancel":
  194. a.handleEvtCancel(t);
  195. break;
  196. case "reject":
  197. a.handleEvtReject(t);
  198. break;
  199. case "accept":
  200. a.handleEvtAccept(t);
  201. break;
  202. case "start":
  203. a.handleEvtStart(t);
  204. break;
  205. case "staway":
  206. case "stnoaway":
  207. case "chaway":
  208. case "chnoaway":
  209. a.handleEvtAway(t);
  210. break;
  211. case "updaterank":
  212. a.handleEvtUpdateRank(t);
  213. break;
  214. case "stplaying":
  215. case "stnoplaying":
  216. a.handleEvtPlaying(t);
  217. break;
  218. case "quarkstats":
  219. a.handleEvtQuarkStats(t)
  220. }
  221. }
  222. }
  223. },
  224. init: function(e) {
  225. this.genericCallbacks = e || {}, this.connected = !1, this.requestIdx = 0, this.requestCallback = {}
  226. },
  227. autoConnect: function(e) {
  228. for (var t = document.cookie.split("; "), n = null, a = 0; a < t.length; ++a) {
  229. var s = t[a].split("=");
  230. if ("fcic" === s[0]) {
  231. n = s[1];
  232. break
  233. }
  234. }
  235. if (n) {
  236. var i = this;
  237. return this.prepareSocket(e, function() {
  238. i.sendCmd({
  239. req: "autologin",
  240. cookie: n
  241. })
  242. }), !0
  243. }
  244. return !1
  245. },
  246. connect: function(e, t, n) {
  247. var a = this;
  248. this.prepareSocket(n, function() {
  249. a.sendCmd({
  250. req: "login",
  251. username: e,
  252. userpass: t
  253. })
  254. })
  255. },
  256. logout: function() {
  257. document.cookie = "fcic=;expires=Thu, 01 Jan 1970 00:00:01 GMT;", this.close()
  258. },
  259. close: function() {
  260. this.websocket.close(), this.connected = !1
  261. },
  262. joinChannel: function(e, t, n) {
  263. this.sendCmd({
  264. req: "join",
  265. channelname: e,
  266. status: "available",
  267. away: !0 === t.isAway,
  268. idx: o.a.isUndefined(t.idx) ? -1 : t.idx
  269. }, n)
  270. },
  271. leaveChannel: function(e, t) {
  272. this.sendCmd({
  273. req: "leave",
  274. channelname: e
  275. }, t)
  276. },
  277. favChannel: function(e, t) {
  278. this.sendCmd({
  279. req: "favchannel",
  280. channelname: e,
  281. fav: t
  282. })
  283. },
  284. ignoreUser: function(e, t) {
  285. this.sendCmd({
  286. req: "ignore",
  287. username: e,
  288. ignore: t
  289. })
  290. },
  291. setAway: function(e, t) {
  292. t ? this.sendCmd({
  293. req: e ? "chaway" : "chnoaway",
  294. channelname: t
  295. }) : this.sendCmd({
  296. req: e ? "staway" : "stnoaway"
  297. })
  298. },
  299. sendChatMessage: function(e, t, n) {
  300. this.sendCmd({
  301. req: "chat",
  302. channelname: e,
  303. chat: t
  304. }, n)
  305. },
  306. sendTerminalCommand: function(e, t) {
  307. this.sendCmd({
  308. req: "terminalcommand",
  309. input: e
  310. }, t)
  311. },
  312. listAllChannels: function(e) {
  313. this.sendCmd({
  314. req: "channels",
  315. all: !0
  316. }, e)
  317. },
  318. listChannels: function(e, t, n, a, s, i, o) {
  319. this.sendCmd({
  320. req: "channels",
  321. filter: t,
  322. genre: n,
  323. year: a,
  324. system: s,
  325. ranked: i,
  326. paginated: !0,
  327. page: e
  328. }, o)
  329. },
  330. listFavoritesChannels: function(e) {
  331. this.sendCmd({
  332. req: "channels",
  333. favorites: !0,
  334. paginated: !0
  335. }, e)
  336. },
  337. listFiltersOptions: function(e) {
  338. this.sendCmd({
  339. req: "filteroptions"
  340. }, e)
  341. },
  342. challengeUser: function(e, t, n) {
  343. this.sendCmd({
  344. req: "challenge",
  345. username: e,
  346. channelname: t
  347. }, n)
  348. },
  349. cancelChallenge: function(e, t) {
  350. this.sendCmd({
  351. req: "cancel",
  352. username: e,
  353. channelname: t
  354. })
  355. },
  356. declineChallenge: function(e, t) {
  357. this.sendCmd({
  358. req: "reject",
  359. username: e,
  360. channelname: t
  361. })
  362. },
  363. acceptChallenge: function(e, t, n) {
  364. this.sendCmd({
  365. req: "accept",
  366. username: e,
  367. channelname: t
  368. }, n)
  369. },
  370. updateUser: function(e, t) {
  371. var n = o.a.clone(e);
  372. n.req = "updateuser", this.sendCmd(n, t)
  373. },
  374. getLinkPreview: function(e, t) {
  375. this.sendCmd({
  376. req: "linkpreview",
  377. url: e
  378. }, t)
  379. },
  380. getMatchUri: function(e, t, n, a, s) {
  381. return "fcade://served/" + e + "/" + n + "/" + t + "," + l.a.serverInfo.fcadePort + "," + s + "," + (a ? 1 : 0)
  382. },
  383. getSpectateUrl: function(e, t, n) {
  384. return "https://replay.fightcade.com/" + e + "/" + n + "/" + t
  385. },
  386. getSpectateUri: function(e, t, n) {
  387. return "fcade://stream/" + e + "/" + n + "/" + t + ".2," + l.a.serverInfo.fcadePort
  388. },
  389. getEndMatchUri: function() {
  390. return "fcade://killemu"
  391. },
  392. getPlayAloneUri: function(e, t) {
  393. return "fcade://play/" + e + "/" + t
  394. },
  395. sendCmd: function(e, t) {
  396. e.requestIdx = t ? this.requestIdx : -1, t && (this.requestCallback[this.requestIdx++] = t), this.websocket.send(s()(e))
  397. },
  398. handleReqAutoLogin: function(e) {
  399. 200 === e.result ? (this.connected = !0, this.genericCallbacks.onConnect(c(e.user, !0), e.app_info || {})) : this.genericCallbacks.onConnectError("auto-login-failed")
  400. },
  401. handleReqLogin: function(e) {
  402. if (200 === e.result) this.connected = !0, this.genericCallbacks.onConnect(c(e.user, !0), e.app_info || {}), e.cookie && (document.cookie = "fcic=" + e.cookie + "; expires=Fri, 31 Dec 9999 23:59:59 GMT; Path=/");
  403. else {
  404. var t = {
  405. "user wrong password": "wrong-password",
  406. "user not found": "user-not-found",
  407. "server locked": "server-locked",
  408. "no beta access yet": "no-beta-access"
  409. };
  410. this.genericCallbacks.onConnectError(t[e.error] || "unknown")
  411. }
  412. },
  413. handleReqJoin: function(e) {
  414. if (-1 !== e.requestIdx)
  415. if (200 === e.result) {
  416. for (var t = 0; t < e.users.length; ++t) e.users[t] = c(e.users[t], !1, e.channelname);
  417. this.requestCallback[e.requestIdx](e)
  418. } else this.requestCallback[e.requestIdx](null)
  419. },
  420. handleReqLeave: function(e) {
  421. 200 === e.result && -1 !== e.requestIdx && this.requestCallback[e.requestIdx] && this.requestCallback[e.requestIdx](e)
  422. },
  423. handleReqChat: function(e) {
  424. 200 === e.result && -1 !== e.requestIdx && this.requestCallback[e.requestIdx](e)
  425. },
  426. handleReqChannels: function(e) {
  427. 200 === e.result && -1 !== e.requestIdx && this.requestCallback[e.requestIdx](e)
  428. },
  429. handleReqChallenge: function(e) {
  430. 200 === e.result && -1 !== e.requestIdx && this.requestCallback[e.requestIdx](e)
  431. },
  432. handleReqAccept: function(e) {
  433. 200 === e.result && -1 !== e.requestIdx && this.requestCallback[e.requestIdx]({
  434. gameid: e.gameid,
  435. user: {
  436. name: e.username,
  437. id: e.username
  438. },
  439. quarkid: e.quarkid
  440. })
  441. },
  442. handleReqUpdateUser: function(e) {
  443. -1 !== e.requestIdx && this.requestCallback[e.requestIdx](200 === e.result, e.user)
  444. },
  445. handleReqTerminalCommand: function(e) {
  446. -1 !== e.requestIdx && this.requestCallback[e.requestIdx](e.response)
  447. },
  448. handleEvtChat: function(e) {
  449. this.genericCallbacks.onChatMessage && this.genericCallbacks.onChatMessage(e.channelname, e.username, e.chat)
  450. },
  451. handleEvtJoin: function(e) {
  452. if (this.genericCallbacks.onUserJoin) {
  453. var t = c(e.user, !1, e.channelname);
  454. this.genericCallbacks.onUserJoin(t, e.channelname)
  455. }
  456. },
  457. handleEvtLeave: function(e) {
  458. this.genericCallbacks.onUserLeave && this.genericCallbacks.onUserLeave({
  459. name: e.user.name,
  460. id: e.user.name
  461. }, e.channelname)
  462. },
  463. handleEvtChallenge: function(e) {
  464. this.genericCallbacks.onChallengeRequest && this.genericCallbacks.onChallengeRequest({
  465. name: e.user.name,
  466. id: e.user.name
  467. }, e.channelname)
  468. },
  469. handleEvtCancel: function(e) {
  470. this.genericCallbacks.onChallengeCancel && this.genericCallbacks.onChallengeCancel({
  471. user: e.user.name,
  472. id: e.user.name
  473. }, e.channelname)
  474. },
  475. handleEvtReject: function(e) {
  476. this.genericCallbacks.onChallengeDecline && this.genericCallbacks.onChallengeDecline({
  477. user: e.user.name,
  478. id: e.user.name
  479. }, e.channelname)
  480. },
  481. handleEvtAccept: function(e) {
  482. this.genericCallbacks.onChallengeAccept && this.genericCallbacks.onChallengeAccept({
  483. user: e.user.name,
  484. id: e.user.name
  485. }, e.channelname)
  486. },
  487. handleEvtStart: function(e) {
  488. this.genericCallbacks.onChallengeStart && this.genericCallbacks.onChallengeStart(e.channelname, e.quarkid, e.ranked, c(e.user, !1, e.channelname))
  489. },
  490. handleEvtAway: function(e) {
  491. if (this.genericCallbacks.onUserAwayStateChanges) {
  492. var t = "staway" === e.req || "chaway" === e.req;
  493. this.genericCallbacks.onUserAwayStateChanges(e.username, t, e.channelname)
  494. }
  495. },
  496. handleEvtUpdateRank: function(e) {
  497. this.genericCallbacks.onUserRankChanges(e.username, e.ranked)
  498. },
  499. handleEvtPlaying: function(e) {
  500. this.genericCallbacks.onUserPlayingStateChanges && this.genericCallbacks.onUserPlayingStateChanges(e.username, "stplaying" === e.req, e.game.channelname, e.game.quarkid, e.game.gameid, e.playerid, e.elo)
  501. },
  502. handleEvtQuarkStats: function(e) {
  503. this.genericCallbacks.onQuarkStats && this.genericCallbacks.onQuarkStats(e.channelname, e.quark.quarkid, e.quark.spectators)
  504. },
  505. handleReqLinkPreview: function(e) {
  506. -1 !== e.requestIdx && (200 === e.result ? this.requestCallback[e.requestIdx]({
  507. url: e.url,
  508. name: e.name,
  509. title: e.title,
  510. description: e.description,
  511. imageSrc: e.imageSrc
  512. }) : this.requestCallback[e.requestIdx](null))
  513. },
  514. handleReqFilterOptions: function(e) {
  515. -1 !== e.requestIdx && (200 === e.result ? this.requestCallback[e.requestIdx]({
  516. years: e.years,
  517. genres: e.genres,
  518. systems: e.systems
  519. }) : this.requestCallback[e.requestIdx](null))
  520. }
  521. }
  522. }, function(e, t, n) {
  523. "use strict";
  524. t.a = {
  525. formatTime: function(e) {
  526. var t = e.getHours(),
  527. n = e.getMinutes();
  528. return t < 10 && (t = "0" + t), n < 10 && (n = "0" + n), t + ":" + n
  529. },
  530. pointInBoundingBox: function(e, t, n) {
  531. return !(e < n.left) && (!(e > n.right) && (!(t < n.top) && !(t > n.bottom)))
  532. },
  533. elementIsVisible: function(e, t) {
  534. var n = e.getBoundingClientRect(),
  535. a = t.getBoundingClientRect();
  536. return this.pointInBoundingBox(n.left, n.top + n.height, a)
  537. },
  538. validateEmail: function(e) {
  539. return /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)
  540. },
  541. getGravatar: function(e, t) {
  542. return "//www.gravatar.com/avatar/" + e + "?s=" + t + "&d=retro&r=pg"
  543. },
  544. decodeHTML: function(e) {
  545. var t = document.createElement("textarea");
  546. return t.innerHTML = e, t.value
  547. },
  548. isImageUrl: function(e) {
  549. return null != e.match(/\.(jpeg|jpg|gif|png)$/)
  550. }
  551. }
  552. }, , , , , , , , function(e, t, n) {
  553. "use strict";
  554. var a = n(15),
  555. s = n.n(a),
  556. i = n(111),
  557. o = n.n(i);
  558. t.a = {
  559. init: function(e, t) {
  560. this.serverAddr = e, this.port = t
  561. },
  562. createUser: function(e, t, n, a, s) {
  563. var i = {
  564. req: "adduser",
  565. email: e,
  566. username: t,
  567. pwd: n,
  568. token: a
  569. },
  570. o = this;
  571. this.doRequest(i, function(e) {
  572. var t = {};
  573. e.err ? (t.result = "error", t.error = o.getErrorCode(e.err)) : t.result = "ok", s(t)
  574. })
  575. },
  576. updateUserSettings: function(e, t, n) {
  577. var a = {
  578. req: "updateuser",
  579. username: e
  580. },
  581. s = !1;
  582. "email" in t && (a.email = t.email, s = !0), "password" in t && (a.pwd = t.password, s = !0), s ? this.doRequest(a, function(e) {
  583. n("ok")
  584. }) : n("ok")
  585. },
  586. doRequest: function(e, t) {
  587. var n = {
  588. host: this.serverAddr,
  589. port: this.port,
  590. method: "GET",
  591. path: "/api/" + encodeURIComponent(s()(e))
  592. };
  593. o.a.request(n, function(e) {
  594. var n = "";
  595. e.on("data", function(e) {
  596. n += e
  597. }), e.on("end", function() {
  598. t(JSON.parse(n))
  599. })
  600. }).end()
  601. },
  602. getErrorCode: function(e) {
  603. return {
  604. "user already created": "user-already-exists"
  605. }[e] || "unknown"
  606. }
  607. }
  608. }, , , , , , , , , , , , , , function(e, t, n) {
  609. n(86);
  610. var a = n(0)(n(43), n(160), "data-v-5c635a86", null);
  611. e.exports = a.exports
  612. }, , , function(e, t, n) {
  613. n(89);
  614. var a = n(0)(n(36), n(163), null, null);
  615. e.exports = a.exports
  616. }, function(e, t, n) {
  617. n(92);
  618. var a = n(0)(n(66), n(166), null, null);
  619. e.exports = a.exports
  620. }, , function(e, t, n) {
  621. "use strict";
  622. var a = n(5);
  623. t.a = {
  624. list: [{
  625. name: "/away",
  626. description: "Set global status to away",
  627. execute: function(e, t) {
  628. return a.a.setAway(!0), "Global status set to away."
  629. }
  630. }, {
  631. name: "/back",
  632. description: "Set global status to online",
  633. execute: function(e, t) {
  634. return a.a.setAway(!1), "Global status set to online."
  635. }
  636. }, {
  637. name: "/channel_away",
  638. description: "Set channel status to away",
  639. execute: function(e, t) {
  640. return a.a.setAway(!0, e.channel.id), "Channel status set to away."
  641. }
  642. }, {
  643. name: "/channel_back",
  644. description: "Set channel status to online",
  645. execute: function(e, t) {
  646. return a.a.setAway(!1, e.channel.id), "Channel status set to online."
  647. }
  648. }, {
  649. name: "/test",
  650. description: "Test current channel's game",
  651. execute: function(e, t) {
  652. e.$emit("play-alone")
  653. }
  654. }, {
  655. name: "/ignore",
  656. description: "Ignore user",
  657. execute: function(e, t) {
  658. if (!t || 1 !== t.length) return "Error! Syntax: /ignore username";
  659. var n = t[0];
  660. return n in e.usersByName ? (a.a.ignoreUser(n, !0), "User [" + n + "] will be ignored from now on.") : "Error! user [" + n + "] not found."
  661. }
  662. }, {
  663. name: "/unignore",
  664. description: "Unignore user",
  665. execute: function(e, t) {
  666. if (!t || 1 !== t.length) return "Error! Syntax: /unignore username";
  667. var n = t[0];
  668. return n in e.usersByName ? (a.a.ignoreUser(n, !1), "User [" + n + "] is no longer ignored.") : "Error: user [" + n + "] not found."
  669. }
  670. }]
  671. }
  672. }, function(e, t, n) {
  673. "use strict";
  674. Object.defineProperty(t, "__esModule", {
  675. value: !0
  676. });
  677. var a = n(3),
  678. s = n(32),
  679. i = (n.n(s), n(31)),
  680. o = n.n(i),
  681. l = n(30),
  682. c = n.n(l);
  683. a.a.use(c.a, {
  684. observer: !0
  685. }), a.a.config.productionTip = !1, new a.a({
  686. el: "#app",
  687. template: '<App ref="app"/>',
  688. components: {
  689. App: o.a
  690. }
  691. }).$refs.app.init()
  692. }, function(e, t, n) {
  693. "use strict";
  694. Object.defineProperty(t, "__esModule", {
  695. value: !0
  696. });
  697. var a = n(3),
  698. s = n(1),
  699. i = n.n(s),
  700. o = n(2),
  701. l = n(103),
  702. c = n.n(l),
  703. r = n(14),
  704. h = n(138),
  705. u = n.n(h),
  706. d = n(119),
  707. v = n.n(d),
  708. f = n(117),
  709. g = n.n(f),
  710. m = n(125),
  711. p = n.n(m),
  712. C = n(123),
  713. _ = n.n(C),
  714. w = n(142),
  715. y = n.n(w),
  716. k = n(137),
  717. x = n.n(k),
  718. b = n(136),
  719. I = n.n(b),
  720. M = n(5),
  721. U = n(6);
  722. t.default = {
  723. name: "app",
  724. components: {
  725. MainToolbar: u.a,
  726. Channel: v.a,
  727. AddChannel: g.a,
  728. ContextMenu: I.a,
  729. Login: x.a,
  730. UserInfo: y.a,
  731. WelcomeChannel: p.a,
  732. PatreonChannel: _.a
  733. },
  734. data: function() {
  735. return {
  736. initializingApp: !1,
  737. autoLoginning: !0,
  738. numChannelsInitialized: 0,
  739. channelsInitialized: !1,
  740. welcomeChannelInitialized: !1,
  741. channels: i.a.clone(o.a.baseChannels),
  742. activeChannelId: null,
  743. status: "disconnected",
  744. emojisData: null,
  745. contextMenuData: null,
  746. userInfoData: null,
  747. globalUsers: {},
  748. global: o.a,
  749. numJoiningChannels: 0
  750. }
  751. },
  752. methods: {
  753. init: function() {
  754. r.a.init(o.a.serverInfo.addr, o.a.serverInfo.port), c.a.needsPermission && c.a.isSupported() && c.a.requestPermission();
  755. var e = this;
  756. this.connectionCallbacks = {
  757. onConnect: function(t, n) {
  758. e.autoLoginning = !1, e.initializingApp = !0, e.status = "connected", t.country = e.getCountry(t.country), e.globalUsers[t.id] = t, o.a.localUser = t, o.a.userRole = n.roles, a.a.nextTick(function() {
  759. e.checkPerksAvailability();
  760. var n = 0;
  761. t.activeChannels.length > 0 ? i.a.forEach(t.activeChannels, function(t) {
  762. e.joinChannel(t.channelname, !1, t.away, n++)
  763. }) : (e.channelsInitialized = !0, e.checkChannelsAreInitialized()), M.a.listAllChannels(function(e) {
  764. i.a.forEach(e.channels, function(e) {
  765. o.a.channelByGameId[e.gameid] = e.name
  766. }), o.a.setChannels(e.channels)
  767. }), M.a.listFiltersOptions(function(e) {
  768. o.a.setFiltersOptions(e)
  769. }), e.$refs.mainToolbar.setChannels(e.channels), e.selectChannel("welcome-channel")
  770. })
  771. },
  772. onConnectError: function(t) {
  773. "auto-login-failed" !== t && e.$refs.login.onConnectError(t), e.autoLoginning = !1, e.initializingApp = !1
  774. },
  775. onDisconnect: function() {
  776. e.globalUsers = {}, e.channels = i.a.clone(o.a.baseChannels), e.activeChannelId = null, e.contextMenuData = null, e.userInfoData = null, e.emojisData = null, e.status = "disconnected", e.initializingApp = !1, e.autoLoginning = !1, e.numChannelsInitialized = 0, e.channelsInitialized = !1, e.welcomeChannelInitialized = !1, e.numJoiningChannels = 0, o.a.channelByGameId = {}, o.a.localUser = null, o.a.activeTheme = o.a.themes.default
  777. },
  778. onChatMessage: function(t, n, a) {
  779. var s = e.globalUsers[n];
  780. s.isLocal || e.getChannelComponentById(t).onChatMessage(s, a)
  781. },
  782. onUserJoin: function(t, n) {
  783. if (t.id !== o.a.localUser.id) {
  784. var a = e.addUserToChannel(t, n),
  785. s = e.getChannelComponentById(n);
  786. s && s.addUser(a)
  787. }
  788. },
  789. onUserLeave: function(t, n) {
  790. if (t.id !== o.a.localUser.id) {
  791. var a = e.getChannelComponentById(n);
  792. a && a.removeUser(t), e.removeUserFromChannel(t, n)
  793. }
  794. },
  795. onChallengeRequest: function(t, n) {
  796. var a = e.getChannelComponentById(n);
  797. a && a.userChallenged(e.globalUsers[t.id])
  798. },
  799. onChallengeCancel: function(t, n) {
  800. e.removeChallengeNotifications(t, n, "cancelled");
  801. var a = e.getChannelComponentById(n);
  802. a && a.challengeCancelled(t)
  803. },
  804. onChallengeDecline: function(t, n) {
  805. var a = e.getChannelComponentById(n);
  806. a && a.challengeDeclined(t)
  807. },
  808. onChallengeAccept: function(t, n, a) {
  809. if (!o.a.localUser.playing) {
  810. var s = e.getChannelComponentById(n);
  811. s && s.challengeAccepted(t, a)
  812. }
  813. },
  814. onChallengeStart: function(t, n, a, s) {
  815. var l = e.getChannelComponentById(t);
  816. if (l) {
  817. var c = o.a.localUser.settings.delay; - 1 === c && s.ping && (c = 3 - s.ping), c = c < 0 ? 1 : c, window.location.assign(M.a.getMatchUri(l.data.emulator, n, l.data.gameid, a, c)), i.a.forEach(o.a.localUser.channels, function(t) {
  818. var n = e.getChannelComponentById(t);
  819. n && (n.cancelAllChallengesRequests(), n.declineAllChallengesRequested())
  820. })
  821. }
  822. },
  823. onUserAwayStateChanges: function(t, n, a) {
  824. e.onUserAwayStateChanges(t, n, a)
  825. },
  826. onUserPlayingStateChanges: function(t, n, a, s, i, o, l) {
  827. e.onUserPlayingStateChanges(t, n, a, s, i, o, l)
  828. },
  829. onUserRankChanges: function(t, n) {
  830. var s = e.globalUsers[t];
  831. s && !s.isLocal && a.a.set(s.settings, "ranked", n)
  832. },
  833. onQuarkStats: function(t, n, a) {
  834. var s = e.getChannelComponentById(t);
  835. s && s.onQuarkStats(n, a)
  836. }
  837. }, M.a.init(this.connectionCallbacks), M.a.autoConnect() || (this.autoLoginning = !1)
  838. },
  839. connect: function(e, t) {
  840. this.autoLoginning = !1, this.initializingApp = !0, M.a.connect(e, t, this.connectionCallbacks)
  841. },
  842. disconnect: function() {
  843. "connected" === this.status && M.a.close()
  844. },
  845. selectChannel: function(e) {
  846. var t = this.getChannelComponentById(e);
  847. this.activeChannelId = e, this.$refs.mainToolbar.setActiveChannel(e), t.onSelect()
  848. },
  849. joinChannel: function(e, t, n, s) {
  850. if (!(this.channels.length - o.a.baseChannels.length + this.numJoiningChannels >= o.a.localUser.perks.maxNumChannels)) {
  851. var l = this;
  852. ++this.numJoiningChannels, M.a.joinChannel(e, {
  853. isAway: n,
  854. idx: s
  855. }, function(e) {
  856. if (--l.numJoiningChannels, e) {
  857. var s = {
  858. id: e.channelname,
  859. name: e.channelname,
  860. gameid: e.gameid,
  861. ranked: e.ranked,
  862. emulator: e.emulator,
  863. outerNotifications: [],
  864. unseenMessages: [],
  865. unseenMentions: [],
  866. unseenChallenges: []
  867. };
  868. if (-1 !== e.idx) {
  869. var c = l.channels.length - 1,
  870. r = c + e.idx;
  871. r >= l.channels.length ? l.channels.splice(c, 0, s) : l.channels.splice(r, 0, s)
  872. } else l.channels.splice(l.channels.length - 1, 0, s);
  873. l.$refs.mainToolbar.setChannels(l.channels), a.a.nextTick(function() {
  874. var c = [],
  875. r = {};
  876. i.a.forEach(e.users, function(e) {
  877. c.push(l.addUserToChannel(e, s.id)), e.playing && (r[e.id] = e.playing)
  878. }), i.a.forEach(e.quarks, function(e) {
  879. i.a.forEach(e.players, function(t, n) {
  880. var a = r[t];
  881. a && l.onUserPlayingStateChanges(t, !0, a.gameName, e.quarkid, a.gameId, n)
  882. })
  883. }), n && (a.a.set(s, "localUserIsAway", !0), M.a.setAway(!0, s.id)), e.users = c, l.getChannelComponentById(s.id).onJoin(e), t && l.selectChannel(s.id), l.$refs["add-channel"].onUserChannelIO(), a.a.set(o.a.localUser, "maxNumChannelsReached", o.a.localUser.perks.maxNumChannels <= o.a.localUser.channels.length)
  884. })
  885. } else l.channelItemInitialized(!0)
  886. })
  887. }
  888. },
  889. leaveChannel: function(e) {
  890. var t = this;
  891. M.a.leaveChannel(e, function() {
  892. var n = i.a.findIndex(t.channels, {
  893. id: e
  894. }); - 1 !== n && (a.a.delete(t.channels, n), t.$refs.mainToolbar.setChannels(t.channels), t.activeChannelId === e && t.selectChannel(t.channels[Math.max(2 === n ? 0 : n - 1, 0)].id), n = o.a.localUser.channels.indexOf(e), -1 !== n && a.a.delete(o.a.localUser.channels, n), t.$refs["add-channel"].onUserChannelIO(), a.a.set(o.a.localUser, "maxNumChannelsReached", o.a.localUser.perks.maxNumChannels <= o.a.localUser.channels.length))
  895. })
  896. },
  897. onUserIgnored: function(e, t) {
  898. var n = this;
  899. i.a.forEach(e.channels, function(a) {
  900. if (o.a.isGameChannel(a)) {
  901. var s = n.getChannelComponentById(a);
  902. s && s.onUserIgnored(e, t)
  903. }
  904. })
  905. },
  906. getChannelComponentById: function(e) {
  907. return !o.a.isGameChannel(e) && this.$refs[e] || o.a.isGameChannel(e) && this.$refs[e] && this.$refs[e].length > 0 ? this.$refs[e][0] || this.$refs[e] : null
  908. },
  909. onUserAwayStateChanges: function(e, t, n) {
  910. var s = this.globalUsers[e];
  911. if (n) {
  912. var o = s.channelsAway.indexOf(n),
  913. l = i.a.findIndex(this.channels, {
  914. id: n
  915. }); - 1 !== l && s.isLocal && a.a.set(this.channels[l], "localUserIsAway", t), t ? -1 === o && s.channelsAway.push(n) : -1 !== o && a.a.delete(s.channelsAway, o)
  916. } else a.a.set(s, "away", t);
  917. if (n) {
  918. var c = this.getChannelComponentById(n);
  919. c && c.onUserAwayStateChanges(s, t, !1)
  920. } else {
  921. var r = this;
  922. i.a.forEach(s.channels, function(e) {
  923. var n = r.getChannelComponentById(e);
  924. n && n.onUserAwayStateChanges(s, t, !0)
  925. })
  926. }
  927. },
  928. onUserPlayingStateChanges: function(e, t, n, s, l, c, r) {
  929. var h = this.globalUsers[e];
  930. if (h) {
  931. var u = {
  932. channelId: n,
  933. gameName: n,
  934. quarkId: s,
  935. gameId: l
  936. };
  937. h.isLocal && (o.a.currentMatchElo[t ? "initial" : "final"] = r), a.a.set(h, "playing", t ? u : null);
  938. var d = this.getChannelComponentById(n);
  939. d && (t ? d.startMatch(s, h, c) : d.endMatch(s));
  940. var v = this;
  941. i.a.forEach(h.channels, function(e) {
  942. var a = v.getChannelComponentById(e);
  943. a && a.onUserPlayingStateChanges(h, t, n)
  944. }), !t && h.isLocal && (o.a.currentMatchElo = {})
  945. }
  946. },
  947. addUserToChannel: function(e, t) {
  948. var n = null;
  949. return i.a.has(this.globalUsers, e.id) ? (n = this.globalUsers[e.id], -1 === n.channels.indexOf(t) && n.channels.push(t), -1 !== e.channelsAway.indexOf(t) && -1 === n.channelsAway.indexOf(t) && n.channelsAway.push(t), n.channelRank[t] = e.channelRank[t] || 0) : (n = e, n.channels = [t], n.country = this.getCountry(e.country), a.a.set(n, "ignored", -1 !== o.a.localUser.ignores.indexOf(n.id)), this.globalUsers[n.id] = n), n
  950. },
  951. removeUserFromChannel: function(e, t) {
  952. var n = this.globalUsers[e.id];
  953. if (n) {
  954. var s = i.a.indexOf(n.channels, t); - 1 !== s && (a.a.delete(n.channels, s), 0 === n.channels.length && a.a.delete(this.globalUsers, e.id))
  955. }
  956. },
  957. showContextMenu: function(e) {
  958. var t = this;
  959. this.contextMenuData = e, a.a.nextTick(function() {
  960. t.$refs.contextMenu.show(e.position, e.limitRect)
  961. })
  962. },
  963. closeContextMenu: function() {
  964. this.contextMenuData = null
  965. },
  966. showEmojisView: function(e) {
  967. var t = this;
  968. this.emojisData = e, a.a.nextTick(function() {
  969. t.$refs.emojis.show(e.position, e.align)
  970. })
  971. },
  972. closeEmojisView: function() {
  973. this.emojisData = null
  974. },
  975. showUserInfo: function(e) {},
  976. closeUserInfoView: function() {
  977. this.userInfoData = null
  978. },
  979. onNewNotification: function(e) {
  980. var t = this.getChannelComponentById(e.channel.id),
  981. n = this;
  982. if (e.user = this.globalUsers[e.user.id], "message" !== e.type) {
  983. o.a.localUser.settings.soundNotifications && (this.notifySound || (this.notifySound = new Audio, this.notifySound.addEventListener("error", function(e) {
  984. 4 === e.currentTarget.error.code && (n.notifySound.src = "static/sounds/notify.mp3", n.notifySound.play())
  985. })), this.notifySound.src = e.gameid ? "static/sounds/" + e.gameid + "-challenge.mp3" : "static/sounds/notify.mp3", this.notifySound.play())
  986. }
  987. if ((!t.data.active || !document.hasFocus()) && "message" !== e.type && o.a.localUser.settings.desktopNotifications) {
  988. new c.a("Fightcade", {
  989. body: e.message.text,
  990. timeout: 5,
  991. icon: e.gameid ? "static/previews/" + e.gameid + ".png" : U.a.getGravatar(e.user.gravatar, 40),
  992. closeOnClick: !0,
  993. notifyClick: function() {
  994. n.gotoChatMessage(e.channel.id, e.message.id, e.message.lineId)
  995. }
  996. }).show()
  997. }
  998. if (!t.data.active) {
  999. var a = i.a.findIndex(this.channels, {
  1000. id: e.channel.id
  1001. });
  1002. if (-1 !== a) {
  1003. this.channels[a][o.a.notificationTypeToVar[e.type]].push({
  1004. messageId: e.message.id,
  1005. lineId: e.message.lineId,
  1006. user: e.user
  1007. })
  1008. }
  1009. if ("message" !== e.type) {
  1010. var s = i.a.findIndex(this.channels, {
  1011. active: !0
  1012. }); - 1 !== s && s !== a && o.a.isGameChannel(this.channels[s].id) && this.channels[s].outerNotifications.unshift({
  1013. type: e.type,
  1014. channel: e.channel,
  1015. message: e.message,
  1016. user: e.user,
  1017. timer: 0
  1018. })
  1019. }
  1020. }
  1021. this.$refs.mainToolbar.onNewNotification(e, !t.data.active)
  1022. },
  1023. gotoChannelByGameId: function(e) {
  1024. this.gotoChannel(o.a.channelByGameId[e])
  1025. },
  1026. gotoChannel: function(e) {
  1027. this.getChannelComponentById(e) ? this.selectChannel(e) : this.joinChannel(e, !0)
  1028. },
  1029. gotoChatMessage: function(e, t, n) {
  1030. var a = this.getChannelComponentById(e);
  1031. a && (a.active || this.selectChannel(e), a.displayChatMessage(t, n))
  1032. },
  1033. declineChallenge: function(e, t) {
  1034. this.removeChallengeNotifications(t, e, "declined");
  1035. var n = this.getChannelComponentById(e);
  1036. n && n.declineChallenge(t)
  1037. },
  1038. acceptChallenge: function(e, t) {
  1039. if (!o.a.localUser.playing) {
  1040. this.removeChallengeNotifications(t, e, "accepted");
  1041. var n = this.getChannelComponentById(e);
  1042. n && n.acceptChallenge(t)
  1043. }
  1044. },
  1045. getCountry: function(e) {
  1046. return e ? (e.iso_code = e.iso_code.toLowerCase(), e) : "unknown"
  1047. },
  1048. removeChallengeNotifications: function(e, t, n) {
  1049. var s = i.a.findIndex(this.channels, {
  1050. id: t
  1051. });
  1052. if (-1 !== s)
  1053. for (var l = this.channels[s][o.a.notificationTypeToVar.challenge], c = 0; c < l.length; ++c)
  1054. if (l[c].user.id === e.id) {
  1055. a.a.delete(l, c);
  1056. break
  1057. }
  1058. for (var r = 0; r < this.channels.length; ++r)
  1059. if (o.a.isGameChannel(this.channels[r].id))
  1060. for (var h = this.channels[r].outerNotifications, u = 0; u < h.length; ++u)
  1061. if ("challenge" === h[u].type && h[u].user.id === e.id && h[u].channel.id === t) {
  1062. a.a.delete(h, u);
  1063. break
  1064. }
  1065. this.$refs.mainToolbar.updateChallengeNotification(e, t, n), this.$refs.mainToolbar.removeChallengeNotifications()
  1066. },
  1067. channelItemInitialized: function(e) {
  1068. e || ++this.numChannelsInitialized, this.numChannelsInitialized === this.channels.length - o.a.baseChannels.length && (this.channelsInitialized = !0, this.checkChannelsAreInitialized())
  1069. },
  1070. onWelcomeChannelInitialized: function() {
  1071. this.welcomeChannelInitialized = !0, this.checkChannelsAreInitialized()
  1072. },
  1073. checkChannelsAreInitialized: function() {
  1074. if (this.welcomeChannelInitialized && this.channelsInitialized) {
  1075. var e = this;
  1076. i.a.delay(function() {
  1077. e.initializingApp = !1
  1078. }, 500)
  1079. }
  1080. },
  1081. checkPerksAvailability: function() {
  1082. var e = o.a.localUser,
  1083. t = !1;
  1084. t = e.perks.themesAvailable ? !(e.settings.theme in o.a.themes) : e.settings.theme !== o.a.themes.default.id, t && (e.settings.theme = o.a.themes.default.id, M.a.updateUser({
  1085. theme: e.settings.theme
  1086. })), o.a.setTheme(e.settings.theme)
  1087. }
  1088. }
  1089. }
  1090. }, function(e, t, n) {
  1091. "use strict";
  1092. Object.defineProperty(t, "__esModule", {
  1093. value: !0
  1094. });
  1095. var a = n(3),
  1096. s = n(2),
  1097. i = n(5),
  1098. o = n(124),
  1099. l = n.n(o),
  1100. c = n(122),
  1101. r = n.n(c),
  1102. h = n(121),
  1103. u = n.n(h);
  1104. t.default = {
  1105. name: "add-channel",
  1106. data: function() {
  1107. return {
  1108. openedSection: "search"
  1109. }
  1110. },
  1111. components: {
  1112. Search: l.a,
  1113. Favorites: r.a,
  1114. Discover: u.a
  1115. },
  1116. methods: {
  1117. joinChannel: function(e) {
  1118. this.$emit("join-channel", e, !1)
  1119. },
  1120. favChannel: function(e, t) {
  1121. var n = e.name;
  1122. if (i.a.favChannel(n, t), e.isFavorite = t, t) - 1 === s.a.localUser.favoritesChannels.indexOf(n) && s.a.localUser.favoritesChannels.push(n);
  1123. else {
  1124. var o = s.a.localUser.favoritesChannels.indexOf(n); - 1 !== o && a.a.delete(s.a.localUser.favoritesChannels, o)
  1125. }
  1126. },
  1127. onUserChannelIO: function() {
  1128. this.$refs[this.openedSection].onUserChannelIO()
  1129. },
  1130. onSelect: function() {
  1131. this.$refs.search.onSelect()
  1132. },
  1133. openSection: function(e) {
  1134. e !== this.openedSection && (this.openedSection = e, "search" === e ? this.$refs.search.onSelect() : "favorites" === e && this.$refs.favorites.onSelect())
  1135. },
  1136. openPatreonChannel: function() {
  1137. this.$emit("patreon-info", "patreon-channel")
  1138. }
  1139. },
  1140. computed: {},
  1141. watch: {}
  1142. }
  1143. }, function(e, t, n) {
  1144. "use strict";
  1145. Object.defineProperty(t, "__esModule", {
  1146. value: !0
  1147. }), t.default = {
  1148. name: "add-channel-item",
  1149. props: ["data"],
  1150. methods: {
  1151. select: function() {
  1152. this.data.active || this.$emit("select", this.data.id)
  1153. }
  1154. }
  1155. }
  1156. }, function(e, t, n) {
  1157. "use strict";
  1158. Object.defineProperty(t, "__esModule", {
  1159. value: !0
  1160. });
  1161. var a = n(3),
  1162. s = n(1),
  1163. i = n.n(s),
  1164. o = n(129),
  1165. l = n.n(o),
  1166. c = n(144),
  1167. r = n.n(c),
  1168. h = n(5),
  1169. u = n(2);
  1170. t.default = {
  1171. name: "channel",
  1172. props: ["data"],
  1173. components: {
  1174. Chat: l.a,
  1175. UsersList: r.a
  1176. },
  1177. data: function() {
  1178. return {
  1179. challengesRequests: [],
  1180. challengesRequested: [],
  1181. notificationsUsers: [{
  1182. name: "@channel"
  1183. }],
  1184. matches: {},
  1185. usersByName: {}
  1186. }
  1187. },
  1188. methods: {
  1189. onJoin: function(e) {
  1190. this.$refs.usersList.setUsers(e.users), this.$refs.chat.setChannelName(this.data.name), this.$refs.chat.addChannelMessage(e.motd), this.usersByName = {};
  1191. var t = this;
  1192. i.a.forEach(e.users, function(e) {
  1193. t.usersByName[e.name] = e, t.notificationsUsers.push({
  1194. name: "@" + e.name,
  1195. gravatar: e.gravatar
  1196. })
  1197. }), this.sortNotificationsUsers(), this.$refs.chat.setChannelNotificationUsers(this.notificationsUsers)
  1198. },
  1199. addUser: function(e) {
  1200. this.$refs.usersList.addUser(e), this.notificationsUsers.push({
  1201. name: "@" + e.name,
  1202. gravatar: e.gravatar
  1203. }), this.usersByName[e.name] = e, this.sortNotificationsUsers(), this.$refs.chat.setChannelNotificationUsers(this.notificationsUsers), e.id !== u.a.localUser.id && this.$refs.chat.addUserEventMessage(e.name + " entered the channel")
  1204. },
  1205. removeUser: function(e) {
  1206. this.$refs.usersList.removeUser(e);
  1207. var t = i.a.findIndex(this.notificationsUsers, {
  1208. name: "@" + e.name
  1209. }); - 1 !== t && (a.a.delete(this.notificationsUsers, t), this.$refs.chat.setChannelNotificationUsers(this.notificationsUsers)), e.name in this.usersByName && a.a.delete(this.usersByName, e.name), e.id !== u.a.localUser.id && this.$refs.chat.addUserEventMessage(e.name + " left the channel")
  1210. },
  1211. sortNotificationsUsers: function() {
  1212. this.notificationsUsers = i.a.orderBy(this.notificationsUsers, function(e) {
  1213. return e.name.length
  1214. }, ["desc"])
  1215. },
  1216. onChatMessage: function(e, t) {
  1217. var n = this.$refs.chat.addChatMessage(e, t),
  1218. a = t;
  1219. n.notify && (a = e.name + " mentioned you: " + a), this.$emit("new-notification", {
  1220. type: n.notify ? "mention" : "message",
  1221. user: e,
  1222. channel: {
  1223. id: this.data.id,
  1224. name: this.data.name
  1225. },
  1226. message: {
  1227. id: n.messageInfo.id,
  1228. lineId: n.messageInfo.lines.length - 1,
  1229. text: a
  1230. }
  1231. })
  1232. },
  1233. displayChatMessage: function(e, t) {
  1234. this.$refs.chat.gotoMessage(e, t)
  1235. },
  1236. onSelect: function() {
  1237. this.$refs.chat.focus(), this.$refs.chat.scrollToBottom(), this.$refs.chat.manageNotificationsHelpersVisibility()
  1238. },
  1239. showContextMenu: function(e) {
  1240. this.$emit("show-context-menu", e)
  1241. },
  1242. showUserInfo: function(e) {
  1243. this.$emit("show-user-info", e)
  1244. },
  1245. challengeUser: function(e) {
  1246. var t = -1 !== e.channelsAway.indexOf(this.data.id);
  1247. if (!(e.isLocal || e.away || e.playing || t)) {
  1248. var n = this;
  1249. h.a.challengeUser(e.id, this.data.id, function(t) {
  1250. if (!i.a.find(n.challengesRequests, function(t) {
  1251. return t.user.id === e.id
  1252. })) {
  1253. var a = n.$refs.chat.addRequestChallengeMessage(e);
  1254. n.challengesRequests.push({
  1255. user: e,
  1256. message: a.messageInfo
  1257. })
  1258. }
  1259. })
  1260. }
  1261. },
  1262. userChallenged: function(e) {
  1263. if (!i.a.find(this.challengesRequested, function(t) {
  1264. return t.user.id === e.id
  1265. })) {
  1266. var t = this.$refs.chat.addChallengeRequestedMessage(e);
  1267. this.challengesRequested.push({
  1268. user: e,
  1269. message: t.messageInfo
  1270. }), this.$emit("new-notification", {
  1271. type: "challenge",
  1272. user: e,
  1273. gameid: this.data.gameid,
  1274. channel: {
  1275. id: this.data.id,
  1276. name: this.data.name
  1277. },
  1278. message: {
  1279. id: t.messageInfo.id,
  1280. lineId: t.messageInfo.lines.length - 1,
  1281. text: "You have been challenged by " + e.name
  1282. }
  1283. })
  1284. }
  1285. },
  1286. showEmojisView: function(e) {
  1287. this.$emit("show-emojis-view", e)
  1288. },
  1289. gotoChannelByGameId: function(e) {
  1290. this.$emit("goto-channel-by-gameid", e)
  1291. },
  1292. onUserIgnoredEvent: function(e, t) {
  1293. this.$emit("on-user-ignored", e, t)
  1294. },
  1295. gotoChatMessage: function(e, t, n) {
  1296. this.$emit("goto-chat-message", e, t, n)
  1297. },
  1298. challengeCancelled: function(e) {
  1299. this.removeChallengeRequested(e.id, "cancelled")
  1300. },
  1301. challengeDeclined: function(e) {
  1302. this.removeChallengeRequest(e.id, "declined")
  1303. },
  1304. challengeAccepted: function(e, t) {
  1305. this.removeChallengeRequest(e.id, "accepted")
  1306. },
  1307. cancelChallenge: function(e) {
  1308. this.removeChallengeRequest(e.id, "cancelled"), h.a.cancelChallenge(e.id, this.data.id)
  1309. },
  1310. cancelAllChallengesRequests: function() {
  1311. var e = this,
  1312. t = i.a.clone(this.challengesRequests);
  1313. i.a.forEach(t, function(t) {
  1314. e.cancelChallenge(t.user)
  1315. })
  1316. },
  1317. declineChallenge: function(e) {
  1318. this.removeChallengeRequested(e.id, "declined"), h.a.declineChallenge(e.id, this.data.id)
  1319. },
  1320. declineAllChallengesRequested: function() {
  1321. var e = this,
  1322. t = i.a.clone(this.challengesRequested);
  1323. i.a.forEach(t, function(t) {
  1324. e.declineChallenge(t.user)
  1325. })
  1326. },
  1327. acceptChallenge: function(e) {
  1328. this.removeChallengeRequested(e.id, "accepted"), h.a.acceptChallenge(e.id, this.data.id)
  1329. },
  1330. declineChallengeEvent: function(e) {
  1331. this.$emit("decline-challenge", this.data.id, e)
  1332. },
  1333. acceptChallengeEvent: function(e) {
  1334. this.$emit("accept-challenge", this.data.id, e)
  1335. },
  1336. declineOuterChallenge: function(e, t) {
  1337. this.$emit("decline-challenge", e, t)
  1338. },
  1339. acceptOuterChallenge: function(e, t) {
  1340. this.$emit("accept-challenge", e, t)
  1341. },
  1342. removeChallengeRequest: function(e, t) {
  1343. var n = i.a.findIndex(this.challengesRequests, function(t) {
  1344. return t.user.id === e
  1345. });
  1346. if (-1 !== n) {
  1347. this.$refs.chat.$refs[this.challengesRequests[n].message.id][0].onChallengeChangesState(t), a.a.delete(this.challengesRequests, n)
  1348. }
  1349. },
  1350. removeChallengeRequested: function(e, t) {
  1351. var n = i.a.findIndex(this.challengesRequested, function(t) {
  1352. return t.user.id === e
  1353. });
  1354. if (-1 !== n) {
  1355. this.$refs.chat.$refs[this.challengesRequested[n].message.id][0].onChallengeChangesState(t), a.a.delete(this.challengesRequested, n)
  1356. }
  1357. },
  1358. startMatch: function(e, t, n) {
  1359. if (this.matches[e]) {
  1360. var s = this.matches[e];
  1361. a.a.set(s, 0 === s.playerId ? "player2" : "player1", t)
  1362. } else {
  1363. var i = {
  1364. player1: {
  1365. name: "<disconnected>",
  1366. country: {},
  1367. settings: {
  1368. ranked: !1
  1369. }
  1370. },
  1371. player2: {
  1372. name: "<disconnected>",
  1373. country: {},
  1374. settings: {
  1375. ranked: !1
  1376. }
  1377. },
  1378. quarkId: e,
  1379. numSpectators: 0,
  1380. playerId: n
  1381. };
  1382. i[0 === n ? "player1" : "player2"] = t, a.a.set(this.matches, e, i), this.$refs.usersList.addMatch(this.matches[e])
  1383. }
  1384. },
  1385. endMatch: function(e) {
  1386. if (this.matches[e]) {
  1387. var t = this.matches[e];
  1388. (t.player1.isLocal || t.player2.isLocal) && (window.location.assign(h.a.getEndMatchUri()), this.$refs.chat.addChannelMessage("Match replay: " + h.a.getSpectateUrl(this.data.emulator, e, this.data.gameid) + "|" + h.a.getSpectateUri(this.data.emulator, e, this.data.gameid))), this.$refs.usersList.removeMatch(this.matches[e]), this.matches[e] = null
  1389. }
  1390. var n = u.a.currentMatchElo;
  1391. n && n.initial >= 0 && n.final >= 0 && this.$refs.chat.addEloMessage(u.a.currentMatchElo.initial, u.a.currentMatchElo.final)
  1392. },
  1393. playAlone: function() {
  1394. window.location.assign(h.a.getPlayAloneUri(this.data.emulator, this.data.gameid))
  1395. },
  1396. leaveChannel: function() {
  1397. this.$emit("leave-channel", this.data.id)
  1398. },
  1399. onUserAwayStateChanges: function(e, t, n) {
  1400. if (e.name in this.usersByName && (this.$refs.usersList.rebuildUsersLists(), e.id !== u.a.localUser.id)) {
  1401. var a = t ? " is now away" : " is now available";
  1402. this.$refs.chat.addUserEventMessage(e.name + a)
  1403. }
  1404. },
  1405. onUserPlayingStateChanges: function(e, t, n) {
  1406. if (e.name in this.usersByName && (this.$refs.usersList.rebuildUsersLists(), e.id !== u.a.localUser.id && this.data.id === n)) {
  1407. var a = t ? " is playing" : " is not playing";
  1408. this.$refs.chat.addUserEventMessage(e.name + a)
  1409. }
  1410. },
  1411. onUserIgnored: function(e, t) {
  1412. this.$refs.usersList.rebuildUsersLists()
  1413. },
  1414. onQuarkStats: function(e, t) {
  1415. this.matches[e] && a.a.set(this.matches[e], "numSpectators", t)
  1416. }
  1417. }
  1418. }
  1419. }, function(e, t, n) {
  1420. "use strict";
  1421. Object.defineProperty(t, "__esModule", {
  1422. value: !0
  1423. });
  1424. var a = n(3),
  1425. s = n(1),
  1426. i = n.n(s),
  1427. o = n(5);
  1428. t.default = {
  1429. name: "channel-item",
  1430. props: ["data"],
  1431. data: function() {
  1432. return {
  1433. channelItemThumbnail: {
  1434. backgroundImage: "url(/static/previews/" + this.data.gameid + ".png)"
  1435. }
  1436. }
  1437. },
  1438. mounted: function() {
  1439. this.$emit("channel-item-initialized")
  1440. },
  1441. computed: {
  1442. truncatedGameId: function() {
  1443. return i.a.truncate(this.data.id, {
  1444. length: 32
  1445. })
  1446. },
  1447. muteChannelTitle: function() {
  1448. return this.data.localUserIsAway ? "Unmute channel" : "Mute channel"
  1449. }
  1450. },
  1451. methods: {
  1452. select: function() {
  1453. this.data.active || (this.$emit("select", this.data.id), this.$emit("show-tooltip", null, null))
  1454. },
  1455. showContextMenu: function(e) {},
  1456. showTooltip: function() {
  1457. this.data.active || this.$emit("show-tooltip", this.data.name, this.$refs.tooltip.getBoundingClientRect().bottom)
  1458. },
  1459. hideTooltip: function() {
  1460. this.$emit("show-tooltip", null, null)
  1461. },
  1462. leaveChannel: function() {
  1463. this.$emit("leave-channel", this.data.id)
  1464. },
  1465. onChannelAway: function() {
  1466. a.a.set(this.data, "localUserIsAway", !this.data.localUserIsAway), o.a.setAway(this.data.localUserIsAway, this.data.id)
  1467. }
  1468. }
  1469. }
  1470. }, function(e, t, n) {
  1471. "use strict";
  1472. Object.defineProperty(t, "__esModule", {
  1473. value: !0
  1474. }), t.default = {
  1475. name: "discover",
  1476. data: function() {
  1477. return {
  1478. favoriteChannels: [],
  1479. fetchingData: !1
  1480. }
  1481. },
  1482. methods: {},
  1483. computed: {},
  1484. watch: {}
  1485. }
  1486. }, function(e, t, n) {
  1487. "use strict";
  1488. Object.defineProperty(t, "__esModule", {
  1489. value: !0
  1490. });
  1491. var a = n(28),
  1492. s = n.n(a),
  1493. i = n(5),
  1494. o = n(2),
  1495. l = n(1),
  1496. c = n.n(l);
  1497. t.default = {
  1498. name: "favorites",
  1499. components: {
  1500. PaginatedList: s.a
  1501. },
  1502. data: function() {
  1503. return {
  1504. channels: [],
  1505. fetchingData: !1,
  1506. noItemsInfo: {
  1507. emoji: "( รยกร‚ยฐ รล“รŠโ€“ รยกร‚ยฐ)",
  1508. text: "No favorites yet?"
  1509. }
  1510. }
  1511. },
  1512. methods: {
  1513. onSelect: function() {
  1514. this.requestChannels()
  1515. },
  1516. requestChannels: function() {
  1517. var e = this;
  1518. this.$refs.paginatedList.startFetching(), this.channels = [], i.a.listFavoritesChannels(function(t) {
  1519. c.a.forEach(t.channels, function(e) {
  1520. e.isFavorite = !0, e.alreadyJoined = -1 !== o.a.localUser.channels.indexOf(e.name)
  1521. }), e.channels = t.channels, e.$refs.paginatedList.endFetching(!1, e.channels)
  1522. })
  1523. },
  1524. joinChannel: function(e) {
  1525. this.$emit("join-channel", e)
  1526. },
  1527. favChannel: function(e, t) {
  1528. e.isFavorite = !1, this.$emit("fav-channel", e, t)
  1529. },
  1530. onUserChannelIO: function() {
  1531. c.a.forEach(this.channels, function(e) {
  1532. e.alreadyJoined = -1 !== o.a.localUser.channels.indexOf(e.name)
  1533. })
  1534. },
  1535. openPatreonChannel: function() {
  1536. this.$emit("patreon-info", "patreon-channel")
  1537. }
  1538. }
  1539. }
  1540. }, function(e, t, n) {
  1541. "use strict";
  1542. Object.defineProperty(t, "__esModule", {
  1543. value: !0
  1544. });
  1545. var a = n(2);
  1546. t.default = {
  1547. name: "paginated-list",
  1548. props: ["noItemsInfo", "hideUnfavChannels", "hideFooter"],
  1549. data: function() {
  1550. return {
  1551. fetchingData: !1,
  1552. title: "",
  1553. channels: [],
  1554. totalChannels: 0,
  1555. prevButtonAvailable: !1,
  1556. nextButtonAvailable: !1,
  1557. numChannelsPerPage: 50,
  1558. firstChannelVisible: 0,
  1559. userRole: a.a.localUser.role
  1560. }
  1561. },
  1562. methods: {
  1563. startFetching: function() {
  1564. this.fetchingData = !0
  1565. },
  1566. endFetching: function(e, t, n, a) {
  1567. this.firstChannelVisible = n * this.numChannelsPerPage, this.title = e, this.totalChannels = a, this.prevButtonAvailable = n > 0, this.nextButtonAvailable = this.firstChannelVisible + this.numChannelsPerPage < a, this.channels = t, this.fetchingData = !1
  1568. },
  1569. getNumUsers: function(e) {
  1570. return e.clients || 0
  1571. },
  1572. joinChannel: function(e) {
  1573. this.channelIsDisabled(e) || this.$emit("join-channel", e.name)
  1574. },
  1575. favChannel: function(e) {
  1576. this.$emit("fav-channel", e, !e.isFavorite)
  1577. },
  1578. channelIsVisible: function(e) {
  1579. return !this.hideUnfavChannels || e.isFavorite
  1580. },
  1581. gotoPageOffset: function(e) {
  1582. (e > 0 && this.nextButtonAvailable || e < 0 && this.prevButtonAvailable) && this.$emit("goto-page-offset", e)
  1583. },
  1584. channelIsDisabled: function(e) {
  1585. return e.alreadyJoined || a.a.localUser.maxNumChannelsReached || a.a.localUser.role < e.available_for
  1586. },
  1587. channelIsAvaibleForUser: function(e) {
  1588. return !a.a.localUser.maxNumChannelsReached && a.a.localUser.role >= e.available_for
  1589. },
  1590. getReasonChannelNotAvailable: function(e) {
  1591. return a.a.localUser.role < e.available_for ? "Can't join this channel, beta feature available only to patrons." : a.a.localUser.maxNumChannelsReached ? "Can't join this channel, maximum amount of concurrent channels reached." : "Can't join this channel."
  1592. },
  1593. channelTitle: function(e, t) {
  1594. if (t && e.alreadyJoined) return "You're already on this channel";
  1595. var n;
  1596. return n = e.system ? " - " + e.system : "", e.name + n
  1597. },
  1598. footerIsVisible: function() {
  1599. return this.channels.length > 0 && !this.hideFooter
  1600. },
  1601. lazyThumbnailBg: function(e) {
  1602. return "/static/previews/" + e.gameid + ".png"
  1603. },
  1604. openPatreonChannel: function() {
  1605. this.$emit("patreon-info", "patreon-channel")
  1606. }
  1607. },
  1608. computed: {
  1609. pageRange: function() {
  1610. return this.firstChannelVisible + 1 + "-" + Math.min(this.firstChannelVisible + this.numChannelsPerPage, this.totalChannels)
  1611. }
  1612. }
  1613. }
  1614. }, function(e, t, n) {
  1615. "use strict";
  1616. Object.defineProperty(t, "__esModule", {
  1617. value: !0
  1618. }), t.default = {
  1619. name: "patreon-channel",
  1620. mounted: function() {
  1621. this.$emit("initialized")
  1622. },
  1623. methods: {
  1624. onSelect: function() {}
  1625. }
  1626. }
  1627. }, function(e, t, n) {
  1628. "use strict";
  1629. Object.defineProperty(t, "__esModule", {
  1630. value: !0
  1631. });
  1632. var a = n(3),
  1633. s = n(1),
  1634. i = n.n(s),
  1635. o = n(5),
  1636. l = n(2),
  1637. c = n(28),
  1638. r = n.n(c);
  1639. t.default = {
  1640. name: "search",
  1641. components: {
  1642. PaginatedList: r.a
  1643. },
  1644. data: function() {
  1645. return {
  1646. page: 0,
  1647. channels: [],
  1648. textFilter: "",
  1649. rankedFilter: 0,
  1650. yearFilter: 0,
  1651. genreFilter: 0,
  1652. systemFilter: 0,
  1653. openedFilters: !1,
  1654. genres: [],
  1655. years: [],
  1656. systems: [],
  1657. rankedOptions: ["All", "Ranked", "Unranked"],
  1658. noItemsInfo: {
  1659. emoji: "(รขโ€ขยฏร‚ยฐรขโ€“ยกร‚ยฐ)รขโ€ขยฏรฏยธยต รขโ€ยปรขโ€ยรขโ€ยป",
  1660. text: "No game channels found with those search terms, please try again."
  1661. }
  1662. }
  1663. },
  1664. methods: {
  1665. onSelect: function() {
  1666. var e = this;
  1667. this.genres = l.a.filtersOptions.genres, this.years = l.a.filtersOptions.years, this.systems = l.a.filtersOptions.systems, this.page = 0, this.requestChannels(0), a.a.nextTick(function() {
  1668. e.$refs.textFilter.focus()
  1669. })
  1670. },
  1671. requestChannels: i.a.throttle(function(e) {
  1672. var t = 0 !== this.genreFilter ? this.genres[this.genreFilter] : null,
  1673. n = 0 !== this.yearFilter ? this.years[this.yearFilter] : null,
  1674. a = 0 !== this.systemFilter ? this.systems[this.systemFilter] : null,
  1675. s = 0 !== this.rankedFilter ? 1 === this.rankedFilter : null,
  1676. c = this.textFilter ? this.textFilter : null,
  1677. r = this;
  1678. this.$refs.paginatedList.startFetching(), this.channels = [], this.page = e || 0, o.a.listChannels(this.page, c, t, n, a, s, function(e) {
  1679. var o = null === t && null === n && null === a && null === s && null === c ? "All Games" : "Search Results";
  1680. i.a.forEach(e.channels, function(e) {
  1681. e.isFavorite = -1 !== l.a.localUser.favoritesChannels.indexOf(e.name), e.alreadyJoined = -1 !== l.a.localUser.channels.indexOf(e.name)
  1682. }), r.channels = e.channels, r.$refs.paginatedList.endFetching(o, r.channels, e.page, e.totalChannels)
  1683. })
  1684. }, 300),
  1685. toggleChannelActions: function() {
  1686. this.channelActionsVisible = !this.channelActionsVisible
  1687. },
  1688. joinChannel: function(e) {
  1689. this.$emit("join-channel", e)
  1690. },
  1691. favChannel: function(e, t) {
  1692. this.$emit("fav-channel", e, t)
  1693. },
  1694. toggleFilters: function() {
  1695. this.openedFilters = !this.openedFilters
  1696. },
  1697. clearFilters: function() {
  1698. this.yearFilter = 0, this.genreFilter = 0, this.systemFilter = 0, this.rankedFilter = 0, this.requestChannels(0)
  1699. },
  1700. onUserChannelIO: function() {
  1701. i.a.forEach(this.channels, function(e) {
  1702. e.alreadyJoined = -1 !== l.a.localUser.channels.indexOf(e.name)
  1703. })
  1704. },
  1705. gotoPageOffset: function(e) {
  1706. this.requestChannels(this.page + e)
  1707. },
  1708. openPatreonChannel: function() {
  1709. this.$emit("patreon-info", "patreon-channel")
  1710. }
  1711. },
  1712. watch: {
  1713. textFilter: function(e) {
  1714. this.requestChannels(0)
  1715. }
  1716. }
  1717. }
  1718. }, function(e, t, n) {
  1719. "use strict";
  1720. Object.defineProperty(t, "__esModule", {
  1721. value: !0
  1722. }), t.default = {
  1723. name: "welcome-channel",
  1724. mounted: function() {
  1725. this.$emit("initialized")
  1726. },
  1727. methods: {
  1728. onSelect: function() {},
  1729. openPatreonChannel: function() {
  1730. this.$emit("channel-selected", "patreon-channel")
  1731. }
  1732. }
  1733. }
  1734. }, function(e, t, n) {
  1735. "use strict";
  1736. Object.defineProperty(t, "__esModule", {
  1737. value: !0
  1738. }), t.default = {
  1739. name: "bot-message",
  1740. props: ["data"]
  1741. }
  1742. }, function(e, t, n) {
  1743. "use strict";
  1744. Object.defineProperty(t, "__esModule", {
  1745. value: !0
  1746. });
  1747. var a = n(6);
  1748. t.default = {
  1749. name: "challenge-requested-message",
  1750. props: ["data", "channel"],
  1751. data: function() {
  1752. return {
  1753. state: "active"
  1754. }
  1755. },
  1756. methods: {
  1757. modifyChallenge: function(e) {
  1758. this.$emit(e + "-challenge", this.data.opponent)
  1759. },
  1760. isVisible: function(e) {
  1761. return a.a.elementIsVisible(this.$refs.line, e)
  1762. },
  1763. scrollTo: function() {
  1764. this.$refs.line.scrollIntoView(!0)
  1765. },
  1766. onChallengeChangesState: function(e) {
  1767. this.state = e
  1768. }
  1769. },
  1770. computed: {
  1771. avatarSrc: function() {
  1772. return a.a.getGravatar(this.data.opponent.gravatar, 40)
  1773. },
  1774. pingSrc: function() {
  1775. return "static/ping/connection_" + (this.data.opponent.vping || 0) + ".svg"
  1776. },
  1777. pingTitle: function() {
  1778. return "Estimated ping: " + (this.data.opponent.ping || "unknown") + " ms"
  1779. },
  1780. flagSrc: function() {
  1781. return "static/flags/" + (this.data.opponent.country.iso_code || "unknown") + ".svg"
  1782. },
  1783. rankSrc: function() {
  1784. return "static/ranks/rank" + (this.data.opponent.channelRank[this.channel.id] || 0) + ".svg"
  1785. },
  1786. message: function() {
  1787. switch (this.state) {
  1788. case "active":
  1789. return "You have been challenged!";
  1790. case "cancelled":
  1791. return "The challenge was cancelled by " + this.data.opponent.name;
  1792. case "declined":
  1793. return "You have rejected the challenge from " + this.data.opponent.name;
  1794. case "accepted":
  1795. return "Let's play with " + this.data.opponent.name + "!"
  1796. }
  1797. return ""
  1798. }
  1799. }
  1800. }
  1801. }, function(e, t, n) {
  1802. "use strict";
  1803. Object.defineProperty(t, "__esModule", {
  1804. value: !0
  1805. });
  1806. var a = n(6);
  1807. t.default = {
  1808. name: "channel-message",
  1809. props: ["data"],
  1810. methods: {
  1811. timeInfo: function(e) {
  1812. return a.a.formatTime(e)
  1813. },
  1814. onLineBlockClick: function(e) {
  1815. -1 !== e.class.indexOf("link") && window.open(e.href || e.text, "_blank")
  1816. }
  1817. }
  1818. }
  1819. }, function(e, t, n) {
  1820. "use strict";
  1821. Object.defineProperty(t, "__esModule", {
  1822. value: !0
  1823. });
  1824. var a = n(3),
  1825. s = n(1),
  1826. i = n.n(s),
  1827. o = n(2),
  1828. l = n(130),
  1829. c = n.n(l),
  1830. r = n(128),
  1831. h = n.n(r),
  1832. u = n(126),
  1833. d = n.n(u),
  1834. v = n(131),
  1835. f = n.n(v),
  1836. g = n(133),
  1837. m = n.n(g),
  1838. p = n(127),
  1839. C = n.n(p),
  1840. _ = n(132),
  1841. w = n.n(_),
  1842. y = n(134),
  1843. k = n.n(y),
  1844. x = n(6),
  1845. b = n(5),
  1846. I = n(34),
  1847. M = {
  1848. unseenMessages: {
  1849. type: "message",
  1850. title: "New messages"
  1851. },
  1852. unseenMentions: {
  1853. type: "mention",
  1854. title: "New mentions"
  1855. },
  1856. unseenChallenges: {
  1857. type: "challenge",
  1858. title: "New challenges"
  1859. }
  1860. };
  1861. t.default = {
  1862. name: "chat",
  1863. props: ["channel", "usersByName"],
  1864. data: function() {
  1865. return {
  1866. channelName: "",
  1867. messages: [],
  1868. messageIdx: 1,
  1869. inputText: "",
  1870. matchString: "",
  1871. matchActiveIdx: -1,
  1872. matchesList: [],
  1873. matchType: null,
  1874. notificationUsers: [],
  1875. notificationsHelpers: [],
  1876. autoscroll: !0,
  1877. ignoreNextScrollEvent: !1,
  1878. pauseOuterNotificationsTimer: !1,
  1879. prevMousePos: {
  1880. x: -1,
  1881. y: -1
  1882. }
  1883. }
  1884. },
  1885. components: {
  1886. ChatMessage: c.a,
  1887. ChannelMessage: h.a,
  1888. BotMessage: d.a,
  1889. EloMessage: f.a,
  1890. RequestChallengeMessage: m.a,
  1891. ChallengeRequestedMessage: C.a,
  1892. RawMessage: w.a,
  1893. TerminalMessage: k.a
  1894. },
  1895. computed: {
  1896. channelBg: function() {
  1897. return {
  1898. backgroundImage: "url(/static/ui/scanlines.png), url(/static/previews/" + this.channel.gameid + ".png)"
  1899. }
  1900. },
  1901. matchTitle: function() {
  1902. return ({
  1903. user: "Users",
  1904. channel: "Channels",
  1905. command: "Commands"
  1906. }[this.matchType] || "") + " matching"
  1907. },
  1908. outerNotifications: function() {
  1909. return this.channel.outerNotifications.slice(0, 5)
  1910. }
  1911. },
  1912. mounted: function() {
  1913. var e = this;
  1914. this.timer = setInterval(function() {
  1915. if (!e.pauseOuterNotificationsTimer && e.channel.outerNotifications.length > 0)
  1916. for (var t = e.channel.outerNotifications.length - 1; t >= 0; --t) {
  1917. var n = e.channel.outerNotifications[t];
  1918. n.timer += 1, n.timer >= 5 && a.a.delete(e.channel.outerNotifications, t)
  1919. }
  1920. }, 1e3)
  1921. },
  1922. beforeDestroy: function() {
  1923. clearInterval(this.timer)
  1924. },
  1925. methods: {
  1926. setChannelName: function(e) {
  1927. this.channelName = e
  1928. },
  1929. setChannelNotificationUsers: function(e) {
  1930. this.notificationUsers = e
  1931. },
  1932. focus: function() {
  1933. var e = this;
  1934. a.a.nextTick(function() {
  1935. e.$refs.input.focus()
  1936. })
  1937. },
  1938. manageNotificationsHelpersVisibility: function() {
  1939. var e = this;
  1940. i.a.defer(function() {
  1941. e.notificationsHelpers = [], i.a.forEach(M, function(t, n) {
  1942. if (e.channel[n].length > 0) {
  1943. var s = e.channel[n][0].messageId;
  1944. e.$refs[s] && a.a.nextTick(function() {
  1945. e.$refs[s][0].isVisible(e.$refs.chatWrapper, e.channel[n][0].lineId) ? e.channel[n] = [] : e.notificationsHelpers.push(t)
  1946. })
  1947. }
  1948. })
  1949. }, this.autoscroll ? 5 : 0)
  1950. },
  1951. gotoMessage: function(e, t) {
  1952. if (this.$refs[e]) {
  1953. var n = this;
  1954. a.a.nextTick(function() {
  1955. n.$refs[e][0].scrollTo(t)
  1956. })
  1957. }
  1958. },
  1959. onMessageSent: function(e, t) {
  1960. this.$refs[e] && this.$refs[e][0].onSent && this.$refs[e][0].onSent(t)
  1961. },
  1962. addChannelMessage: function(e) {
  1963. return this.internalAddMessage({
  1964. author: {
  1965. name: "channel"
  1966. },
  1967. message: e,
  1968. type: "channel"
  1969. })
  1970. },
  1971. addChatMessage: function(e, t, n) {
  1972. return this.internalAddMessage({
  1973. author: e,
  1974. message: t,
  1975. type: "chat"
  1976. }, n)
  1977. },
  1978. addBotMessage: function(e) {
  1979. return this.internalAddMessage({
  1980. author: {
  1981. name: "fcbot"
  1982. },
  1983. message: e,
  1984. type: "bot"
  1985. })
  1986. },
  1987. addEloMessage: function(e, t) {
  1988. var n = {
  1989. author: {
  1990. name: "channel"
  1991. },
  1992. elo: {
  1993. initial: e,
  1994. final: t
  1995. },
  1996. type: "elo"
  1997. };
  1998. this.messages.push(n), this.scrollToBottom()
  1999. },
  2000. addTerminalMessage: function(e) {
  2001. var t = {
  2002. author: {
  2003. name: "terminal"
  2004. },
  2005. type: "terminal",
  2006. lines: i.a.isArray(e) ? e : [e]
  2007. };
  2008. this.messages.push(t), this.scrollToBottom()
  2009. },
  2010. addUserEventMessage: function(e) {
  2011. o.a.localUser.settings.userEventsNotifications && this.addBotMessage(e)
  2012. },
  2013. addRequestChallengeMessage: function(e) {
  2014. return this.internalAddMessage({
  2015. author: {
  2016. name: "channel"
  2017. },
  2018. type: "requestChallenge",
  2019. message: "INTERNAL_MSG_USED",
  2020. opponent: e
  2021. })
  2022. },
  2023. addChallengeRequestedMessage: function(e) {
  2024. return this.internalAddMessage({
  2025. author: {
  2026. name: "channel"
  2027. },
  2028. type: "challengeRequested",
  2029. message: "INTERNAL_MSG_USED",
  2030. opponent: e
  2031. })
  2032. },
  2033. internalAddMessage: function(e, t) {
  2034. var n = this.parseMessage(e.author, e.message, t),
  2035. s = new Date,
  2036. o = this.messages.length > 0 ? this.messages[this.messages.length - 1] : {};
  2037. if (-1 !== ["channel", "chat"].indexOf(e.type) && e.author === o.author) o.lines.push({
  2038. time: s,
  2039. blocks: this.createTextBlocks(n.message)
  2040. });
  2041. else {
  2042. var l = i.a.clone(e);
  2043. l.id = this.messageIdx++, l.lines = [{
  2044. type: e.type,
  2045. time: s,
  2046. blocks: this.createTextBlocks(n.message)
  2047. }], a.a.delete(l, "message"), this.messages.push(l)
  2048. }
  2049. return this.scrollToBottom(), {
  2050. notify: n.notify,
  2051. messageInfo: this.messages[this.messages.length - 1]
  2052. }
  2053. },
  2054. parseMessage: function(e, t, n) {
  2055. var a = [],
  2056. s = -1,
  2057. l = t.toLowerCase();
  2058. n = " " + (n || ""), i.a.forEach(["http://", "https://"], function(e) {
  2059. for (s = t.indexOf(e); - 1 !== s;) {
  2060. var n = t.indexOf(" ", s + e.length) - s;
  2061. n < 0 && (n = t.length - s);
  2062. var i = t.substring(s, s + n),
  2063. o = i.indexOf("|"),
  2064. l = null; - 1 !== o && (l = i.substring(o + 1), n -= l.length + 1, t = t.substr(0, s + o) + t.substr(s + o + l.length + 1)), a.push({
  2065. idx: s,
  2066. len: n,
  2067. type: "link",
  2068. href: l
  2069. }), s = t.indexOf(e, s + 1)
  2070. }
  2071. }), l = t.toLowerCase();
  2072. var c = [];
  2073. i.a.forEach(this.notificationUsers, function(e) {
  2074. var t = e.name.toLowerCase();
  2075. for (s = l.indexOf(t); - 1 !== s;) - 1 === c.indexOf(s) && (a.push({
  2076. idx: s,
  2077. len: t.length,
  2078. type: "notification"
  2079. }), c.push(s)), s = l.indexOf(t, s + 1)
  2080. });
  2081. var r = [];
  2082. i.a.forEach(o.a.channelsList.orderByGameIdLength, function(e) {
  2083. var t = "#" + e.gameId.toLowerCase();
  2084. for (s = l.indexOf(t); - 1 !== s;) - 1 === r.indexOf(s) && (a.push({
  2085. idx: s,
  2086. len: t.length,
  2087. type: "channel"
  2088. }), r.push(s)), s = l.indexOf(t, s + 1)
  2089. }), a = i.a.sortBy(a, ["idx"]);
  2090. var h = [],
  2091. u = 0,
  2092. d = !1,
  2093. v = this,
  2094. f = ["@channel", "@" + o.a.localUser.name];
  2095. if (i.a.forEach(a, function(a) {
  2096. a.idx !== u && h.push({
  2097. class: "regular" + n,
  2098. text: t.substring(u, a.idx)
  2099. });
  2100. var s = {
  2101. class: "",
  2102. text: t.substring(a.idx, a.idx + a.len)
  2103. };
  2104. switch ("link" === a.type && (s.href = a.href), a.type) {
  2105. case "notification":
  2106. var i = null;
  2107. if ("@channel" !== s.text) {
  2108. var o = s.text.substring(1, s.text.length);
  2109. i = v.usersByName[o] || null
  2110. }
  2111. s.class = "user", s.author = i, (e.isLocal || -1 !== f.indexOf(s.text)) && (s.class = "highlight", d = !0);
  2112. break;
  2113. default:
  2114. s.class = a.type
  2115. }
  2116. s.class += n, h.push(s), u = a.idx + a.len
  2117. }), u < t.length) {
  2118. var g = t.substring(u, t.length);
  2119. h.push({
  2120. class: "regular" + n,
  2121. text: g
  2122. })
  2123. }
  2124. return {
  2125. notify: d,
  2126. message: h
  2127. }
  2128. },
  2129. scrollToBottom: function() {
  2130. if (this.autoscroll) {
  2131. var e = this;
  2132. i.a.defer(function() {
  2133. e.ignoreNextScrollEvent = !0, e.$refs.messagesContainer.scrollTop = e.$refs.messagesContainer.scrollHeight
  2134. })
  2135. }
  2136. },
  2137. onMessagesContainerScroll: function(e) {
  2138. if (this.ignoreNextScrollEvent) this.ignoreNextScrollEvent = !1;
  2139. else {
  2140. var t = this.$refs.messagesContainer.scrollHeight - (this.$refs.messagesContainer.scrollTop + this.$refs.messagesContainer.clientHeight);
  2141. this.manageNotificationsHelpersVisibility(), this.autoscroll = t < 25
  2142. }
  2143. },
  2144. processMessage: function() {
  2145. var e = this.inputText.trim(),
  2146. t = this;
  2147. if ("" !== e && 0 === this.matchesList.length)
  2148. if (">" === this.inputText[0] && "[Fightcade Dev]" === this.channel.id && o.a.localUser.role === o.a.userRole.dev) b.a.sendTerminalCommand(e.substring(1, e.length).trim(), function(e) {
  2149. t.addTerminalMessage(e)
  2150. });
  2151. else if ("/" === this.inputText[0]) this.processCommand(e);
  2152. else {
  2153. this.autoscroll = !0;
  2154. var n = this.addChatMessage(o.a.localUser, e, "sending"),
  2155. a = n.messageInfo.lines.length - 1;
  2156. b.a.sendChatMessage(this.channel.id, e, function(e) {
  2157. t.onMessageSent(n.messageInfo.id, a)
  2158. })
  2159. }
  2160. this.inputText = ""
  2161. },
  2162. processCommand: function(e) {
  2163. var t = e.split(" "),
  2164. n = t[0],
  2165. a = i.a.findIndex(I.a.list, {
  2166. name: n
  2167. }),
  2168. s = "";
  2169. if (-1 !== a) {
  2170. var o = t.length > 1 ? t.slice(1) : null;
  2171. s = I.a.list[a].execute(this, o)
  2172. } else s = n + " not found!";
  2173. s && this.addBotMessage(s)
  2174. },
  2175. onKeyDown: function(e) {
  2176. if (this.matchesList.length > 0) {
  2177. var t = 0;
  2178. switch (e.keyCode) {
  2179. case 9:
  2180. case 13:
  2181. return e.stopPropagation(), e.preventDefault(), void this.insertMatch();
  2182. case 38:
  2183. return e.stopPropagation(), e.preventDefault(), t = this.matchActiveIdx - 1, t < 0 && (t = this.computedmatchesList().length - 1), void this.setActiveMatch(t, !0);
  2184. case 40:
  2185. return e.stopPropagation(), e.preventDefault(), t = this.matchActiveIdx + 1, t >= this.computedmatchesList().length && (t = 0), void this.setActiveMatch(t, !0)
  2186. }
  2187. } else 13 === e.keyCode && this.processMessage();
  2188. var n = this;
  2189. i.a.defer(function() {
  2190. n.computeMatches()
  2191. })
  2192. },
  2193. onFocus: function() {
  2194. var e = this;
  2195. i.a.defer(function() {
  2196. e.computeMatches()
  2197. })
  2198. },
  2199. onBlur: function() {
  2200. this.resetMatchesView()
  2201. },
  2202. resetMatchesView: function() {
  2203. i.a.forEach(this.matchesList, function(e) {
  2204. a.a.set(e, "active", !1)
  2205. }), this.matchString = "", this.matchesList = [], this.matchType = null, this.matchActiveIdx = -1
  2206. },
  2207. insertMatch: function() {
  2208. var e = this.inputText.lastIndexOf(" ", this.$refs.input.selectionStart - 1) + 1,
  2209. t = this.inputText.substring(0, e);
  2210. switch (this.matchType) {
  2211. case "user":
  2212. t += this.matchesList[this.matchActiveIdx].text;
  2213. break;
  2214. case "channel":
  2215. t += "#" + this.matchesList[this.matchActiveIdx].gameId;
  2216. break;
  2217. case "command":
  2218. t += this.matchesList[this.matchActiveIdx].text
  2219. }
  2220. t += " " + this.inputText.substring(this.$refs.input.selectionStart, this.inputText.length), this.inputText = t, this.resetMatchesView();
  2221. var n = this;
  2222. i.a.delay(function() {
  2223. n.$refs.input.focus()
  2224. }, 0)
  2225. },
  2226. computeMatches: function() {
  2227. var e = this.inputText.lastIndexOf(" ", this.$refs.input.selectionStart - 1) + 1,
  2228. t = this.inputText.substring(e, this.$refs.input.selectionStart);
  2229. this.resetMatchesView(), t && -1 !== ["@", "#"].indexOf(t[0]) ? (this.matchString = t, this.creatematchesList()) : 0 === this.inputText.indexOf("/") && (this.matchString = t, this.creatematchesList())
  2230. },
  2231. cancelChallenge: function(e) {
  2232. this.$emit("cancel-challenge", e)
  2233. },
  2234. declineChallenge: function(e) {
  2235. this.$emit("decline-challenge", e)
  2236. },
  2237. acceptChallenge: function(e) {
  2238. this.$emit("accept-challenge", e)
  2239. },
  2240. onOuterChallengeNotificationClick: function(e, t) {
  2241. var n = this.channel.outerNotifications[t];
  2242. this.$emit(e + "-outer-challenge", n.channel.id, n.user), a.a.delete(this.channel.outerNotifications, t)
  2243. },
  2244. onOuterNotificationClick: function(e) {
  2245. var t = this.channel.outerNotifications[e];
  2246. this.$emit("goto-chat-message", t.channel.id, t.message.id, t.message.lineId), a.a.delete(this.channel.outerNotifications, e)
  2247. },
  2248. showUserInfo: function(e, t, n) {
  2249. this.$emit("show-user-info", {
  2250. user: e,
  2251. position: t,
  2252. limitRect: n
  2253. })
  2254. },
  2255. challengeUser: function(e) {
  2256. this.$emit("challenge-user", e)
  2257. },
  2258. gotoChannelByGameId: function(e) {
  2259. this.$emit("goto-channel-by-gameid", e)
  2260. },
  2261. createTextBlocks: function(e) {
  2262. return i.a.isArray(e) ? e : [{
  2263. class: "regular",
  2264. text: e
  2265. }]
  2266. },
  2267. calculateActiveMatch: function(e) {
  2268. var t = e.clientX,
  2269. n = e.clientY;
  2270. if (-1 === this.prevMousePos.x) this.prevMousePos.x = t, this.prevMousePos.y = n;
  2271. else if (this.prevMousePos.x !== t && this.prevMousePos.y !== n) {
  2272. this.prevMousePos.x = t, this.prevMousePos.y = n;
  2273. for (var a = 0; a < this.matchesList.length; ++a) {
  2274. var s = this.$refs["match_" + a][0].getBoundingClientRect();
  2275. if (x.a.pointInBoundingBox(t, n, s)) {
  2276. this.setActiveMatch(a);
  2277. break
  2278. }
  2279. }
  2280. }
  2281. },
  2282. setActiveMatch: function(e, t) {
  2283. if (this.matchActiveIdx !== e && (-1 !== this.matchActiveIdx && a.a.set(this.matchesList[this.matchActiveIdx], "active", !1), this.matchActiveIdx = e, -1 !== this.matchActiveIdx)) {
  2284. if (t) {
  2285. var n = this.$refs.matchesList.getBoundingClientRect(),
  2286. s = this.$refs["match_" + e][0].getBoundingClientRect();
  2287. Math.abs(n.top - s.top) > n.height ? this.$refs["match_" + e][0].scrollIntoView(!0) : s.top < n.top ? this.$refs.matchesList.scrollTop -= s.height : s.bottom > n.bottom && (this.$refs.matchesList.scrollTop += s.height)
  2288. }
  2289. a.a.set(this.matchesList[e], "active", !0)
  2290. }
  2291. },
  2292. creatematchesList: function() {
  2293. if (this.matchString) {
  2294. var e = this,
  2295. t = function() {
  2296. e.matchesList = i.a.sortBy(e.matchesList, ["text"]), e.matchesList.length > 0 && (e.$refs.matchesList.scrollTop = 0, e.setActiveMatch(0))
  2297. },
  2298. n = e.matchString.toLowerCase();
  2299. if ("@" === this.matchString[0]) this.matchType = "user", i.a.forEach(this.notificationUsers, function(t) {
  2300. 0 === t.name.toLowerCase().indexOf(n) && e.matchesList.push({
  2301. text: t.name,
  2302. gravatar: t.gravatar
  2303. })
  2304. }), t();
  2305. else if ("/" === this.matchString[0]) this.matchType = "command", i.a.forEach(I.a.list, function(t) {
  2306. 0 === t.name.indexOf(n) && e.matchesList.push({
  2307. text: t.name,
  2308. description: t.description
  2309. })
  2310. }), t();
  2311. else if ("#" === this.matchString[0]) {
  2312. this.matchType = "channel";
  2313. var a = n.substring(1, n.length);
  2314. i.a.forEach(o.a.channelsList.forNotifications, function(t) {
  2315. 0 !== a.length && -1 === t.textToCompare.indexOf(a) || e.matchesList.push(t)
  2316. }), t()
  2317. }
  2318. }
  2319. },
  2320. avatarSrc: function(e) {
  2321. switch (this.matchType) {
  2322. case "user":
  2323. return "@channel" !== e.text ? x.a.getGravatar(e.gravatar, 24) : "static/ui/logo_icon_light.svg";
  2324. case "channel":
  2325. return "static/previews/" + e.gameId + ".png"
  2326. }
  2327. return null
  2328. },
  2329. showEmojisView: function() {
  2330. var e = this.$refs.input.getBoundingClientRect();
  2331. this.$emit("show-emojis-view", {
  2332. position: {
  2333. x: e.right - 16,
  2334. y: e.top - 2
  2335. },
  2336. align: "bottom-right"
  2337. })
  2338. },
  2339. computedmatchesList: function() {
  2340. return this.matchesList.length <= 20 ? this.matchesList : this.matchesList.slice(0, 20)
  2341. },
  2342. discardUnseen: function(e) {
  2343. this.channel[o.a.notificationTypeToVar[e]] = [];
  2344. for (var t = 0; t < this.notificationsHelpers.length; ++t)
  2345. if (this.notificationsHelpers[t].type === e) {
  2346. a.a.delete(this.notificationsHelpers, t);
  2347. break
  2348. }
  2349. },
  2350. gotoUnseen: function(e) {
  2351. var t = this.channel[o.a.notificationTypeToVar[e]][0];
  2352. this.gotoMessage(t.messageId, t.lineId), this.discardUnseen(e)
  2353. },
  2354. pingSrc: function(e) {
  2355. return "static/ping/connection_" + (e.vping || 0) + ".svg"
  2356. },
  2357. rankSrc: function(e) {
  2358. return "static/ranks/rank" + (e.channelRank[this.channel.id] || 0) + ".svg"
  2359. },
  2360. getMessageClass: function(e) {
  2361. return e.type + (e.author.role === o.a.userRole.dev ? " dev" : "")
  2362. }
  2363. }
  2364. }
  2365. }, function(e, t, n) {
  2366. "use strict";
  2367. Object.defineProperty(t, "__esModule", {
  2368. value: !0
  2369. });
  2370. var a = n(1),
  2371. s = n.n(a),
  2372. i = n(6),
  2373. o = n(2);
  2374. t.default = {
  2375. name: "chat-message",
  2376. props: ["data"],
  2377. data: function() {
  2378. return {
  2379. click: 0,
  2380. linkPreview: {
  2381. line: -1
  2382. }
  2383. }
  2384. },
  2385. methods: {
  2386. onAvatarClick: function() {
  2387. this.onClick(this.$refs.avatar)
  2388. },
  2389. onAuthorClick: function() {
  2390. this.onClick(this.$refs.author)
  2391. },
  2392. onClick: function(e) {
  2393. if (1 === ++this.click) {
  2394. var t = this;
  2395. s.a.delay(function() {
  2396. 1 === t.click && (t.click = 0, t.showUserInfo(t.data.author, e))
  2397. }, o.a.doubleClickTime)
  2398. } else this.$emit("challenge-user", this.data.author), this.click = 0
  2399. },
  2400. showUserInfo: function(e, t) {
  2401. if (e && e.id) {
  2402. var n = this.$parent.$el.getBoundingClientRect(),
  2403. a = t[0].getBoundingClientRect(),
  2404. s = {
  2405. x: a.right + 10,
  2406. y: a.top
  2407. };
  2408. this.$emit("show-user-info", e, s, {
  2409. right: n.right - 30,
  2410. bottom: n.bottom - 30
  2411. })
  2412. }
  2413. },
  2414. onLineBlockClick: function(e, t, n) {
  2415. if (-1 !== e.class.indexOf("link")) window.open(e.href || e.text, "_blank");
  2416. else if (-1 !== e.class.indexOf("channel")) {
  2417. var a = e.text.substring(1, e.text.length);
  2418. this.canJoinChannel(a) && this.$emit("goto-channel-by-gameid", a)
  2419. } else {
  2420. var s = this.$refs["block_" + t + "_" + n];
  2421. s && this.showUserInfo(e.author, s)
  2422. }
  2423. },
  2424. onSent: function(e) {
  2425. s.a.forEach(this.data.lines[e].blocks, function(e) {
  2426. -1 !== e.class.indexOf("sending") && (e.class = e.class.replace("sending", ""))
  2427. })
  2428. },
  2429. timeInfo: function(e) {
  2430. return i.a.formatTime(e)
  2431. },
  2432. isVisible: function(e, t) {
  2433. return i.a.elementIsVisible(this.$refs["line_" + t][0], e)
  2434. },
  2435. scrollTo: function(e) {
  2436. this.$refs["line_" + e][0].scrollIntoView(!0)
  2437. },
  2438. canJoinChannel: function(e) {
  2439. return -1 !== o.a.localUser.channels.indexOf(o.a.channelByGameId[e]) || !o.a.localUser.maxNumChannelsReached
  2440. },
  2441. blockTitle: function(e) {
  2442. if (-1 !== e.class.indexOf("channel") && !this.canJoinChannel(e.text.substring(1, e.text.length))) {
  2443. var t = o.a.localUser.role,
  2444. n = "You can't join this channel since you reached the maximum amount of concurrent channels.";
  2445. return t < 20 && (n += " Raise this limit by becoming a patron."), t >= 20 && t < 50 && (n += " Raise this limit by joining a higher Patreon tier."), n
  2446. }
  2447. return null
  2448. },
  2449. blockClass: function(e) {
  2450. var t = e.class;
  2451. return -1 === e.class.indexOf("channel") || this.canJoinChannel(e.text.substring(1, e.text.length)) || (t += " disabled"), t
  2452. }
  2453. },
  2454. computed: {
  2455. avatarSrc: function() {
  2456. return i.a.getGravatar(this.data.author.gravatar, 40)
  2457. }
  2458. }
  2459. }
  2460. }, function(e, t, n) {
  2461. "use strict";
  2462. Object.defineProperty(t, "__esModule", {
  2463. value: !0
  2464. }), t.default = {
  2465. name: "elo-message",
  2466. props: ["data"],
  2467. computed: {
  2468. outcomeMsg: function() {
  2469. return this.data.elo.final === this.data.elo.initial ? null : this.data.elo.final > this.data.elo.initial ? "won" : "lost"
  2470. }
  2471. }
  2472. }
  2473. }, function(e, t, n) {
  2474. "use strict";
  2475. Object.defineProperty(t, "__esModule", {
  2476. value: !0
  2477. }), t.default = {
  2478. name: "raw-message",
  2479. props: ["data"]
  2480. }
  2481. }, function(e, t, n) {
  2482. "use strict";
  2483. Object.defineProperty(t, "__esModule", {
  2484. value: !0
  2485. }), t.default = {
  2486. name: "request-challenge-message",
  2487. props: ["data"],
  2488. data: function() {
  2489. return {
  2490. state: "active"
  2491. }
  2492. },
  2493. methods: {
  2494. cancelChallenge: function() {
  2495. this.$emit("cancel-challenge", this.data.opponent)
  2496. },
  2497. onChallengeChangesState: function(e) {
  2498. this.state = e
  2499. }
  2500. },
  2501. computed: {
  2502. message: function() {
  2503. switch (this.state) {
  2504. case "active":
  2505. return "You have challenged " + this.data.opponent.name;
  2506. case "cancelled":
  2507. return "Challenge to " + this.data.opponent.name + " cancelled";
  2508. case "accepted":
  2509. return this.data.opponent.name + " accepts the challenge";
  2510. case "declined":
  2511. return this.data.opponent.name + " rejects the challenge"
  2512. }
  2513. return ""
  2514. }
  2515. }
  2516. }
  2517. }, function(e, t, n) {
  2518. "use strict";
  2519. Object.defineProperty(t, "__esModule", {
  2520. value: !0
  2521. }), t.default = {
  2522. name: "terminal-message",
  2523. props: ["data"]
  2524. }
  2525. }, function(e, t, n) {
  2526. "use strict";
  2527. Object.defineProperty(t, "__esModule", {
  2528. value: !0
  2529. }), t.default = {
  2530. name: "context-menu",
  2531. props: ["data"],
  2532. computed: {
  2533. itemType: function() {
  2534. if ("challenge" !== this.data.id) return "contextMenuItem"
  2535. },
  2536. itemClass: function() {
  2537. return {
  2538. disabled: this.data.disabled,
  2539. warning: this.data.warning,
  2540. "button-generic": "challenge" === this.data.id
  2541. }
  2542. },
  2543. ignoreToggle: function() {
  2544. return "ignoreToggle_" + this.channel.gameid
  2545. }
  2546. },
  2547. methods: {
  2548. click: function(e) {
  2549. "checkbox" === this.data.type && "checkbox" !== e.target.type || this.data.disabled || this.$emit("click", this.data.id, "checkbox" !== this.data.type)
  2550. }
  2551. }
  2552. }
  2553. }, function(e, t, n) {
  2554. "use strict";
  2555. Object.defineProperty(t, "__esModule", {
  2556. value: !0
  2557. });
  2558. var a = n(135),
  2559. s = n.n(a),
  2560. i = n(3);
  2561. t.default = {
  2562. name: "context-menu",
  2563. props: ["data"],
  2564. data: function() {
  2565. return {
  2566. menuPos: {}
  2567. }
  2568. },
  2569. components: {
  2570. Item: s.a
  2571. },
  2572. computed: {
  2573. menuStyle: function() {
  2574. return {
  2575. top: this.menuPos.y + "px",
  2576. left: this.menuPos.x + "px"
  2577. }
  2578. }
  2579. },
  2580. methods: {
  2581. close: function() {
  2582. this.$emit("close")
  2583. },
  2584. show: function(e, t) {
  2585. if (t) {
  2586. var n = this.$refs.menu.clientWidth,
  2587. a = this.$refs.menu.clientHeight;
  2588. t.right && e.x + n > t.right && (e.x -= n), t.bottom && e.y + a > t.bottom && (e.y -= a)
  2589. }
  2590. e.x -= 10, e.y += 8, i.a.set(this.menuPos, "x", e.x), i.a.set(this.menuPos, "y", e.y)
  2591. },
  2592. onItemClick: function(e, t) {
  2593. this.data.callback(e), t && this.close()
  2594. }
  2595. }
  2596. }
  2597. }, function(e, t, n) {
  2598. "use strict";
  2599. Object.defineProperty(t, "__esModule", {
  2600. value: !0
  2601. });
  2602. var a = n(33),
  2603. s = n.n(a),
  2604. i = n(3),
  2605. o = n(1),
  2606. l = n.n(o),
  2607. c = n(14),
  2608. r = n(6);
  2609. t.default = {
  2610. name: "login",
  2611. components: {
  2612. gRecaptcha: s.a
  2613. },
  2614. data: function() {
  2615. return {
  2616. working: !1,
  2617. username: "",
  2618. email: "",
  2619. password: "",
  2620. activeViewIsSignIn: !0,
  2621. showAccountCreatedMessage: !1,
  2622. errorMessages: {
  2623. username: null,
  2624. email: null,
  2625. password: null,
  2626. beta: null
  2627. }
  2628. }
  2629. },
  2630. methods: {
  2631. validateInput: function(e, t, n) {
  2632. return e && (this.errorMessages.email = null, this.email ? r.a.validateEmail(this.email) || (this.errorMessages.email = "(The e-mail format is invalid)") : this.errorMessages.email = "(This field is required)"), t && (this.errorMessages.password = null, this.password || (this.errorMessages.password = "(This field is required)")), n && (this.errorMessages.username = null, this.username || (this.errorMessages.username = "(This field is required)"), this.username.length > 20 && (this.errorMessages.username = "(Username should not exceed 25 characters)")), !(e && this.errorMessages.email || t && this.errorMessages.password || n && this.errorMessages.username)
  2633. },
  2634. doWork: function(e) {
  2635. if (!this.working)
  2636. if (this.validateInput(!this.signIn(), !0, !0)) {
  2637. if (this.working = !0, this.signIn()) this.$emit("connect", this.username, this.password);
  2638. else if (e) {
  2639. var t = this;
  2640. c.a.createUser(this.email, this.username, this.password, e, function(e) {
  2641. t.working = !1, "error" === e.result ? t.manageErrors(e.error) : t.accountCreatedSuccess()
  2642. })
  2643. }
  2644. } else this.errorMessages.email ? this.$refs.email.focus() : this.errorMessages.username ? this.$refs.username.focus() : this.$refs.password.focus()
  2645. },
  2646. connectAs: function(e) {
  2647. this.$emit("connect", e, "")
  2648. },
  2649. onConnectError: function(e) {
  2650. this.working = !1, this.manageErrors(e)
  2651. },
  2652. formTitle: function() {
  2653. return this.signIn() ? "Log in" : "Create an account"
  2654. },
  2655. changeWorkActionText: function() {
  2656. return this.signIn() ? "New user?" : "Already have an account?"
  2657. },
  2658. changeWorkActionLink: function() {
  2659. return this.signIn() ? "Create an account" : "Log in"
  2660. },
  2661. workAction: function() {
  2662. return this.signIn() ? "Connect" : "Register"
  2663. },
  2664. changeWorkActionLinkClicked: function() {
  2665. if (!this.working) {
  2666. this.activeViewIsSignIn = !this.activeViewIsSignIn, this.password = "", this.username = "", this.email = "", this.errorMessages = {
  2667. username: null,
  2668. email: null,
  2669. password: null
  2670. };
  2671. var e = this;
  2672. i.a.nextTick(function() {
  2673. e.$refs.username.focus()
  2674. })
  2675. }
  2676. },
  2677. signIn: function() {
  2678. return this.activeViewIsSignIn
  2679. },
  2680. manageErrors: function(e) {
  2681. switch (e) {
  2682. case "user-already-exists":
  2683. this.errorMessages.username = "This username already exists.", this.$refs.username.focus();
  2684. break;
  2685. case "user-not-found":
  2686. this.errorMessages.username = "This username doesn't exist.", this.$refs.username.focus();
  2687. break;
  2688. case "server-locked":
  2689. this.errorMessages.username = "You are not allowed to log in at this moment. Server might be under maintenance.", this.$refs.username.focus();
  2690. break;
  2691. case "wrong-password":
  2692. this.errorMessages.password = "Invalid password.", this.$refs.password.focus();
  2693. break;
  2694. case "no-beta-access":
  2695. document.getElementsByTagName("h2")[0].style.display = "none", this.$refs.loginform.style.display = "none", this.errorMessages.beta = !0
  2696. }
  2697. },
  2698. accountCreatedSuccess: function() {
  2699. var e = this,
  2700. t = this.username;
  2701. this.showAccountCreatedMessage = !0, this.changeWorkActionLinkClicked(), l.a.delay(function() {
  2702. e.showAccountCreatedMessage = !1
  2703. }, 3e3), i.a.nextTick(function() {
  2704. e.username = t, e.$refs.password.focus()
  2705. })
  2706. },
  2707. gRecaptchaValidate: function() {
  2708. return !this.working && (!!this.validateInput(!this.signIn(), !0, !0) || (this.errorMessages.email ? this.$refs.email.focus() : this.errorMessages.username ? this.$refs.username.focus() : this.$refs.password.focus(), !1))
  2709. },
  2710. gRecaptchaCallback: function(e) {
  2711. this.doWork(e)
  2712. },
  2713. onFormKeyDown: function(e) {
  2714. 13 === e.keyCode && this.signIn() && this.doWork()
  2715. }
  2716. }
  2717. }
  2718. }, function(e, t, n) {
  2719. "use strict";
  2720. Object.defineProperty(t, "__esModule", {
  2721. value: !0
  2722. });
  2723. var a = n(3),
  2724. s = n(1),
  2725. i = n.n(s),
  2726. o = n(2),
  2727. l = n(6),
  2728. c = n(120),
  2729. r = n.n(c),
  2730. h = n(118),
  2731. u = n.n(h),
  2732. d = n(5),
  2733. v = n(140),
  2734. f = n.n(v),
  2735. g = n(139),
  2736. m = n.n(g);
  2737. t.default = {
  2738. name: "main-toolbar",
  2739. data: function() {
  2740. return {
  2741. channels: [],
  2742. localUser: o.a.localUser,
  2743. showSettings: !1,
  2744. showNotifications: !1,
  2745. showGlobalStateMenu: !1,
  2746. showNotificationsIndicator: !1,
  2747. global: o.a
  2748. }
  2749. },
  2750. components: {
  2751. ChannelItem: r.a,
  2752. AddChannelItem: u.a,
  2753. Settings: f.a,
  2754. Notifications: m.a
  2755. },
  2756. computed: {
  2757. avatarSrc: function() {
  2758. return l.a.getGravatar(o.a.localUser.gravatar, 100)
  2759. }
  2760. },
  2761. methods: {
  2762. onChannelSelect: function(e) {
  2763. this.showNotifications = !1, this.showSettings = !1, this.$emit("channel-selected", e)
  2764. },
  2765. onNewNotification: function(e, t) {
  2766. this.$refs.notifications.onNewNotification(e), "message" !== e.type && (this.showNotificationsIndicator = t && !this.showNotifications)
  2767. },
  2768. setChannels: function(e) {
  2769. this.channels = e
  2770. },
  2771. setActiveChannel: function(e) {
  2772. var t = i.a.findIndex(this.channels, {
  2773. active: !0
  2774. }); - 1 !== t && a.a.set(this.channels[t], "active", !1);
  2775. var n = i.a.findIndex(this.channels, {
  2776. id: e
  2777. }); - 1 !== e && a.a.set(this.channels[n], "active", !0)
  2778. },
  2779. showChannelContextMenu: function(e, t) {
  2780. var n = -1 !== o.a.localUser.channelsAway.indexOf(e.id);
  2781. this.contextMenuData = {
  2782. channel: e,
  2783. position: t,
  2784. callback: this.onContextMenuItemClick,
  2785. items: [{
  2786. id: "toggle_channel_away",
  2787. text: "Not available",
  2788. type: "checkbox",
  2789. active: n
  2790. }, {
  2791. id: "leave_channel",
  2792. text: "Leave channel",
  2793. warning: !0
  2794. }]
  2795. }, this.$emit("show-context-menu", this.contextMenuData)
  2796. },
  2797. onContextMenuItemClick: function(e) {
  2798. switch (e) {
  2799. case "toggle_channel_away":
  2800. var t = -1 !== o.a.localUser.channelsAway.indexOf(this.contextMenuData.channel.id);
  2801. d.a.setAway(!t, this.contextMenuData.channel.id);
  2802. break;
  2803. case "leave_channel":
  2804. this.$emit("leave-channel", this.contextMenuData.channel.id)
  2805. }
  2806. },
  2807. selectChannel: function() {
  2808. this.showNotifications = !1, this.showSettings = !1, this.$emit("channel-selected", "welcome-channel")
  2809. },
  2810. acceptChallenge: function(e, t) {
  2811. this.$emit("accept-challenge", e, t)
  2812. },
  2813. declineChallenge: function(e, t) {
  2814. this.$emit("decline-challenge", e, t)
  2815. },
  2816. updateChallengeNotification: function(e, t, n) {
  2817. this.$refs.notifications.updateChallengeNotification(e, t, n)
  2818. },
  2819. removeChallengeNotifications: function() {
  2820. this.$refs.notifications.removeChallengeNotifications()
  2821. },
  2822. gotoChatMessage: function(e, t, n) {
  2823. this.$emit("goto-chat-message", e, t, n)
  2824. },
  2825. setAwayState: function(e) {
  2826. this.localUser.away = e, d.a.setAway(e), this.showGlobalStateMenu = !1
  2827. },
  2828. logOut: function() {
  2829. d.a.logout()
  2830. },
  2831. leaveChannel: function(e) {
  2832. this.$emit("leave-channel", e)
  2833. },
  2834. channelItemInitialized: function() {
  2835. this.$emit("channel-item-initialized")
  2836. },
  2837. openPatreonChannel: function() {
  2838. this.showSettings = !1, this.$emit("patreon-info", "patreon-channel")
  2839. }
  2840. }
  2841. }
  2842. }, function(e, t, n) {
  2843. "use strict";
  2844. Object.defineProperty(t, "__esModule", {
  2845. value: !0
  2846. });
  2847. var a = n(3),
  2848. s = n(1),
  2849. i = n.n(s);
  2850. t.default = {
  2851. name: "notifications",
  2852. data: function() {
  2853. return {
  2854. notifications: [],
  2855. notificationIdx: 0
  2856. }
  2857. },
  2858. methods: {
  2859. closeNotifications: function() {
  2860. this.$emit("close")
  2861. },
  2862. onNewNotification: function(e) {
  2863. if ("message" !== e.type) {
  2864. var t = {
  2865. type: e.type,
  2866. channel: e.channel,
  2867. message: e.message,
  2868. user: e.user,
  2869. title: "New " + ("mention" === e.type ? "Mention" : "Challenge") + " on #" + e.channel.name
  2870. },
  2871. n = this;
  2872. "challenge" === t.type && (t.challengeType = "requested"), this.notifications.unshift(t), a.a.nextTick(function() {
  2873. i.a.forEach(n.$refs.notification_title, function(e) {
  2874. e.title = t.title
  2875. })
  2876. })
  2877. }
  2878. },
  2879. pingSrc: function(e) {
  2880. return "static/ping/connection_" + (e.vping || 0) + ".svg"
  2881. },
  2882. rankSrc: function(e, t) {
  2883. return "static/ranks/rank" + (t.channelRank[e.id] || 0) + ".svg"
  2884. },
  2885. onChallengeNotificationClick: function(e, t) {
  2886. var n = this.notifications[t];
  2887. this.$emit(e + "-challenge", n.channel.id, n.user), "accept" === e && this.closeNotifications()
  2888. },
  2889. onNotificationClick: function(e) {
  2890. var t = this.notifications[e];
  2891. this.$emit("goto-chat-message", t.channel.id, t.message.id, t.message.lineId), this.closeNotifications()
  2892. },
  2893. updateChallengeNotification: function(e, t, n) {
  2894. for (var a = 0; a < this.notifications.length; ++a) {
  2895. var s = this.notifications[a];
  2896. if ("challenge" === s.type && s.user.id === e.id && s.channel.id === t) {
  2897. this.notifications[a].challengeType = n;
  2898. break
  2899. }
  2900. }
  2901. },
  2902. removeChallengeNotifications: function() {
  2903. for (var e = 0; e < this.notifications.length; ++e) {
  2904. "challenge" === this.notifications[e].type && (this.notifications[e].challengeType = "declined")
  2905. }
  2906. }
  2907. }
  2908. }
  2909. }, function(e, t, n) {
  2910. "use strict";
  2911. Object.defineProperty(t, "__esModule", {
  2912. value: !0
  2913. });
  2914. var a = n(1),
  2915. s = n.n(a),
  2916. i = n(2),
  2917. o = n(6),
  2918. l = n(5);
  2919. t.default = {
  2920. name: "settings",
  2921. data: function() {
  2922. return {
  2923. localUser: i.a.localUser,
  2924. delayValues: ["Automatic", "0 (more jerky)", 1, 2, 3, 4, 5, "6 (laggy)"],
  2925. themesValues: [],
  2926. editingEmail: !1,
  2927. savingEmail: !1,
  2928. editingEmailMessage: null,
  2929. editingEmailMessageClass: "",
  2930. editingPassword: !1,
  2931. savingPassword: !1,
  2932. editingPasswordMessage: null,
  2933. editingPasswordMessageClass: "",
  2934. password: "",
  2935. email: ""
  2936. }
  2937. },
  2938. computed: {
  2939. avatarSrc: function() {
  2940. return o.a.getGravatar(i.a.localUser.gravatar, 100)
  2941. }
  2942. },
  2943. mounted: function() {
  2944. var e = this;
  2945. s.a.forEach(i.a.themes, function(t) {
  2946. e.themesValues.push(t)
  2947. })
  2948. },
  2949. methods: {
  2950. closeSettings: function() {
  2951. this.$emit("close")
  2952. },
  2953. saveSetting: function(e) {
  2954. var t = {},
  2955. n = {
  2956. desktopNotifications: "desktop_notifications",
  2957. soundNotifications: "sound_notifications",
  2958. userEventsNotifications: "user_events_notifications"
  2959. },
  2960. a = e;
  2961. e in n && (a = n[e]), t[a] = i.a.localUser.settings[e], l.a.updateUser(t), "theme" === e && i.a.setTheme(this.localUser.settings.theme)
  2962. },
  2963. startEditingValue: function(e) {
  2964. var t = "editing" + e;
  2965. this[t] || (this[t] = !0, "Email" === e && (this.email = this.localUser.email.substring(0, this.localUser.email.length - 1)))
  2966. },
  2967. saveValue: function(e) {
  2968. var t = "editing" + e,
  2969. n = t + "Message",
  2970. a = n + "Class",
  2971. i = "saving" + e,
  2972. c = "",
  2973. r = "";
  2974. if (this[t] = !1, "Email" === e ? (c = "email", r = this.localUser.email) : (c = "pwd", r = this.password), "" === r) return this[a] = "error", this[n] = "This field can't be empty.", void("Email" === e ? this.localUser.email = this.email : this.password = "");
  2975. if ("Email" === e && !o.a.validateEmail(this.localUser.email)) return this[a] = "error", this[n] = "Invalid e-mail format.", void(this.localUser.email = this.email);
  2976. this[i] = !0;
  2977. var h = this,
  2978. u = {};
  2979. u[c] = r, l.a.updateUser(u, function(t, o) {
  2980. h[i] = !1, h[a] = t ? "success" : "error", t ? (h[n] = "Your " + e + " has been updated succesfully.", s.a.delay(function() {
  2981. h[n] = null
  2982. }, 3e3)) : (h[n] = "Error updating " + e + ". Please try again later.", "Email" === e ? h.localUser.email = h.email : h.password = "")
  2983. })
  2984. },
  2985. openPatreonChannel: function() {
  2986. this.$emit("patreon-info", "patreon-channel")
  2987. }
  2988. }
  2989. }
  2990. }, function(e, t, n) {
  2991. "use strict";
  2992. Object.defineProperty(t, "__esModule", {
  2993. value: !0
  2994. });
  2995. var a = n(1),
  2996. s = n.n(a),
  2997. i = n(6),
  2998. o = n(2);
  2999. t.default = {
  3000. name: "match-item",
  3001. props: ["channel", "data"],
  3002. data: function() {
  3003. return {
  3004. click: 0
  3005. }
  3006. },
  3007. methods: {
  3008. showContextMenu: function(e) {
  3009. var t = this.$parent.$el.getBoundingClientRect();
  3010. this.$emit("show-context-menu-match", this.data, {
  3011. x: e.clientX,
  3012. y: e.clientY
  3013. }, {
  3014. right: t.right - 30,
  3015. bottom: t.bottom - 30
  3016. })
  3017. },
  3018. onClick: function(e) {
  3019. if (1 === ++this.click) {
  3020. var t = this;
  3021. s.a.delay(function() {
  3022. 1 === t.click && (t.showUserInfo(e), t.click = 0)
  3023. }, o.a.doubleClickTime)
  3024. } else this.$emit("spectate-match", this.data.player1), this.click = 0
  3025. },
  3026. showUserInfo: function(e) {
  3027. var t = this.$el.getBoundingClientRect(),
  3028. n = this.$parent.$el.getBoundingClientRect(),
  3029. a = (e.clientX - t.left) / t.width,
  3030. s = {
  3031. x: t.left + 20,
  3032. y: t.top
  3033. };
  3034. this.$emit("show-user-info", a <= .5 ? this.data.player1 : this.data.player2, s, {
  3035. bottom: n.bottom - 30
  3036. })
  3037. },
  3038. avatarSrc: function(e) {
  3039. return i.a.getGravatar(e.gravatar, 34)
  3040. },
  3041. rankSrc: function(e) {
  3042. return "static/ranks/rank" + (e.channelRank[this.channel.id] || 0) + ".svg"
  3043. },
  3044. flagSrc: function(e) {
  3045. return "static/flags/" + (e.country.iso_code || "unknown") + ".svg"
  3046. },
  3047. isRanked: function(e) {
  3048. return e.settings.ranked && this.channel.ranked
  3049. },
  3050. getRankTitle: function(e) {
  3051. var t = e.channelRank[this.channel.id] || 0,
  3052. n = ["E", "D", "C", "B", "A", "S"];
  3053. return t > 0 && t <= n.length ? "Rank " + n[t - 1] : "Unknown rank"
  3054. }
  3055. }
  3056. }
  3057. }, function(e, t, n) {
  3058. "use strict";
  3059. Object.defineProperty(t, "__esModule", {
  3060. value: !0
  3061. });
  3062. var a = n(3),
  3063. s = n(6);
  3064. t.default = {
  3065. name: "user-info",
  3066. data: function() {
  3067. return {
  3068. position: {},
  3069. user: {}
  3070. }
  3071. },
  3072. computed: {
  3073. infoStyle: function() {
  3074. return {
  3075. top: this.position.y + "px",
  3076. left: this.position.x + "px"
  3077. }
  3078. },
  3079. stateClass: function() {
  3080. var e = ["state"];
  3081. return this.user.away ? e.push("away") : this.user.playing && e.push("playing"), e
  3082. },
  3083. avatarSrc: function() {
  3084. return s.a.getGravatar(this.user.gravatar, 100)
  3085. },
  3086. flagSrc: function() {
  3087. return "static/flags/" + (this.user.country.iso_code || "unknown") + ".svg"
  3088. }
  3089. },
  3090. methods: {
  3091. close: function() {
  3092. this.$emit("close"), this.user = null
  3093. },
  3094. show: function(e, t, n, s) {
  3095. if (this.user = e, n) {
  3096. var i = this.$refs.content.clientWidth,
  3097. o = this.$refs.content.clientHeight;
  3098. ("right" === s || n.right && t.x + i > n.right) && (t.x -= i), n.bottom && t.y + o > n.bottom && (t.y -= t.y + o - n.bottom)
  3099. }
  3100. a.a.set(this.position, "x", t.x), a.a.set(this.position, "y", t.y)
  3101. }
  3102. }
  3103. }
  3104. }, function(e, t, n) {
  3105. "use strict";
  3106. Object.defineProperty(t, "__esModule", {
  3107. value: !0
  3108. });
  3109. var a = n(1),
  3110. s = n.n(a),
  3111. i = n(6),
  3112. o = n(2);
  3113. t.default = {
  3114. name: "user-item",
  3115. props: ["user", "channel"],
  3116. data: function() {
  3117. return {
  3118. click: 0
  3119. }
  3120. },
  3121. computed: {
  3122. avatarSrc: function() {
  3123. return i.a.getGravatar(this.user.gravatar, 40)
  3124. },
  3125. flagSrc: function() {
  3126. return "static/flags/" + (this.user.country.iso_code || "unknown") + ".svg"
  3127. },
  3128. isRanked: function() {
  3129. return this.user.settings.ranked && this.channel.ranked
  3130. },
  3131. rankSrc: function() {
  3132. return "static/ranks/rank" + (this.user.channelRank[this.channel.id] || 0) + ".svg"
  3133. },
  3134. pingSrc: function() {
  3135. return "static/ping/connection_" + (this.user.vping || 0) + ".svg"
  3136. },
  3137. rankTitle: function() {
  3138. var e = this.user.channelRank[this.channel.id] || 0,
  3139. t = ["E", "D", "C", "B", "A", "S"];
  3140. return e > 0 && e <= t.length ? "Rank " + t[e - 1] : "Unknown rank"
  3141. },
  3142. pingTitle: function() {
  3143. return "Estimated ping: " + (this.user.ping || "unknown") + " ms"
  3144. }
  3145. },
  3146. methods: {
  3147. showContextMenu: function(e) {
  3148. var t = this.$parent.$el.getBoundingClientRect();
  3149. this.$emit("show-context-menu", this.user, {
  3150. x: e.clientX,
  3151. y: e.clientY
  3152. }, {
  3153. right: t.right - 30,
  3154. bottom: t.bottom - 30
  3155. })
  3156. },
  3157. onClick: function() {
  3158. if (1 === ++this.click) {
  3159. var e = this;
  3160. s.a.delay(function() {
  3161. if (1 === e.click) {
  3162. var t = e.$parent.$el.getBoundingClientRect(),
  3163. n = e.$el.getBoundingClientRect(),
  3164. a = {
  3165. x: n.left + 20,
  3166. y: n.top
  3167. };
  3168. e.$emit("show-user-info", e.user, a, {
  3169. bottom: t.bottom - 30
  3170. }), e.click = 0
  3171. }
  3172. }, o.a.doubleClickTime)
  3173. } else this.$emit("challenge-user", this.user), this.click = 0
  3174. }
  3175. }
  3176. }
  3177. }, function(e, t, n) {
  3178. "use strict";
  3179. Object.defineProperty(t, "__esModule", {
  3180. value: !0
  3181. });
  3182. var a = n(3),
  3183. s = n(1),
  3184. i = n.n(s),
  3185. o = n(2),
  3186. l = n(143),
  3187. c = n.n(l),
  3188. r = n(141),
  3189. h = n.n(r),
  3190. u = n(5);
  3191. t.default = {
  3192. name: "users-list",
  3193. props: ["channel"],
  3194. data: function() {
  3195. return {
  3196. users: [],
  3197. matches: [],
  3198. usersOnline: [],
  3199. usersAway: [],
  3200. usersIgnored: [],
  3201. channelAway: !1
  3202. }
  3203. },
  3204. components: {
  3205. UserItem: c.a,
  3206. MatchItem: h.a
  3207. },
  3208. computed: {
  3209. matchesNumber: function() {
  3210. return 2 * this.matches.length
  3211. },
  3212. channelAwayToggle: function() {
  3213. return "channelAwayToggle_" + this.channel.gameid
  3214. }
  3215. },
  3216. methods: {
  3217. setUsers: function(e) {
  3218. this.users = e, this.rebuildUsersLists()
  3219. },
  3220. addUser: function(e) {
  3221. this.users.push(e), this.rebuildUsersLists()
  3222. },
  3223. removeUser: function(e) {
  3224. var t = i.a.findIndex(this.users, {
  3225. id: e.id
  3226. }); - 1 !== t && (a.a.delete(this.users, t), this.rebuildUsersLists())
  3227. },
  3228. addMatch: function(e) {
  3229. -1 === i.a.findIndex(this.matches, {
  3230. quarkId: e.quarkId
  3231. }) && this.matches.push(e)
  3232. },
  3233. removeMatch: function(e) {
  3234. var t = i.a.findIndex(this.matches, {
  3235. quarkId: e.quarkId
  3236. }); - 1 !== t && a.a.delete(this.matches, t)
  3237. },
  3238. showUserContextMenu: function(e, t, n) {
  3239. var a = this.getMenuOptions(e);
  3240. a && (this.contextMenuData = {
  3241. user: e,
  3242. position: t,
  3243. limitRect: n,
  3244. callback: this.onContextMenuItemClick,
  3245. items: a
  3246. }, this.$emit("show-context-menu", this.contextMenuData))
  3247. },
  3248. showMatchContextMenu: function(e, t, n) {
  3249. this.contextMenuData = {
  3250. user: e.player1,
  3251. position: t,
  3252. limitRect: n,
  3253. callback: this.onContextMenuItemClick,
  3254. items: [{
  3255. id: "spectate",
  3256. text: "Spectate"
  3257. }]
  3258. }, this.$emit("show-context-menu", this.contextMenuData)
  3259. },
  3260. showUserInfo: function(e, t, n) {
  3261. this.$emit("show-user-info", {
  3262. user: e,
  3263. position: t,
  3264. limitRect: n,
  3265. align: "right"
  3266. })
  3267. },
  3268. spectateMatch: function(e) {
  3269. window.location.assign(u.a.getSpectateUrl(this.channel.emulator, e.playing.quarkId, e.playing.gameId))
  3270. },
  3271. challengeUser: function(e) {
  3272. this.$emit("challenge-user", e)
  3273. },
  3274. getMenuOptions: function(e) {
  3275. if (e.isLocal) return null;
  3276. var t = -1 !== e.channelsAway.indexOf(this.channel.id),
  3277. n = [{
  3278. id: "challenge",
  3279. text: "Challenge",
  3280. disabled: e.away || e.playing || t || e.ignored
  3281. }, {
  3282. id: "spectate",
  3283. text: "Spectate",
  3284. disabled: !e.playing
  3285. }, {
  3286. id: "ignore",
  3287. text: "Ignore",
  3288. active: e.ignored,
  3289. type: "checkbox"
  3290. }];
  3291. if (e.playing && e.playing.channelId !== this.channel.id) {
  3292. var a = this.canJoinChannel(e.playing.channelId);
  3293. n.push({
  3294. id: "goto_playing_channel",
  3295. text: 'Go to "playing" channel',
  3296. disabled: !a,
  3297. title: a ? null : "You've reached the maximum number of channels available"
  3298. })
  3299. }
  3300. return n
  3301. },
  3302. canJoinChannel: function(e) {
  3303. return -1 !== o.a.localUser.channels.indexOf(e) || !o.a.localUser.maxNumChannelsReached
  3304. },
  3305. onContextMenuItemClick: function(e) {
  3306. switch (e) {
  3307. case "challenge":
  3308. this.challengeUser(this.contextMenuData.user);
  3309. break;
  3310. case "spectate":
  3311. this.spectateMatch(this.contextMenuData.user);
  3312. break;
  3313. case "goto_playing_channel":
  3314. this.$emit("goto-channel-by-gameid", this.contextMenuData.user.playing.gameId);
  3315. break;
  3316. case "ignore":
  3317. a.a.set(this.contextMenuData.user, "ignored", !this.contextMenuData.user.ignored);
  3318. var t = this.contextMenuData.user.ignored,
  3319. n = this;
  3320. if (u.a.ignoreUser(this.contextMenuData.user.id, t), t) o.a.localUser.ignores.push(this.contextMenuData.user.id);
  3321. else {
  3322. var s = i.a.findIndex(o.a.localUser.ignores, function(e) {
  3323. return e === n.contextMenuData.user.id
  3324. }); - 1 !== s && a.a.delete(o.a.localUser.ignores, s)
  3325. }
  3326. var l = -1 !== this.contextMenuData.user.channelsAway.indexOf(this.channel.id);
  3327. this.contextMenuData.items[0].disabled = this.contextMenuData.user.away || this.contextMenuData.user.playing || l || this.contextMenuData.user.ignored, this.$emit("on-user-ignored", this.contextMenuData.user, t)
  3328. }
  3329. },
  3330. rebuildUsersLists: function() {
  3331. this.usersOnline = [], this.usersAway = [], this.usersIgnored = [];
  3332. var e = this;
  3333. i.a.forEach(this.users, function(t) {
  3334. t.playing ? t.playing.channelId !== e.channel.id && (t.ignored ? e.usersIgnored.push(t) : e.usersAway.push(t)) : t.ignored ? e.usersIgnored.push(t) : t.away || -1 !== t.channelsAway.indexOf(e.channel.id) ? e.usersAway.push(t) : e.usersOnline.push(t)
  3335. }), this.usersOnline = i.a.sortBy(this.usersOnline, ["ping"]), this.usersAway = i.a.sortBy(this.usersAway, ["ping"]), this.usersIgnored = i.a.sortBy(this.usersIgnored, ["ping"]), this.channelAway = -1 !== o.a.localUser.channelsAway.indexOf(e.channel.id)
  3336. },
  3337. onChannelAway: function() {
  3338. this.channelAway = !this.channelAway, u.a.setAway(this.channelAway, this.channel.id)
  3339. }
  3340. }
  3341. }
  3342. }, function(e, t) {}, , , , , function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, function(e, t) {}, , , , , , , , , , , , , , , , function(e, t, n) {
  3343. n(83);
  3344. var a = n(0)(n(37), n(157), "data-v-4f69d248", null);
  3345. e.exports = a.exports
  3346. }, function(e, t, n) {
  3347. n(98);
  3348. var a = n(0)(n(38), n(172), "data-v-aabe684c", null);
  3349. e.exports = a.exports
  3350. }, function(e, t, n) {
  3351. n(76);
  3352. var a = n(0)(n(39), n(150), "data-v-194e0266", null);
  3353. e.exports = a.exports
  3354. }, function(e, t, n) {
  3355. n(101);
  3356. var a = n(0)(n(40), n(175), "data-v-e9e80308", null);
  3357. e.exports = a.exports
  3358. }, function(e, t, n) {
  3359. n(87);
  3360. var a = n(0)(n(41), n(161), "data-v-5e188b16", null);
  3361. e.exports = a.exports
  3362. }, function(e, t, n) {
  3363. n(97);
  3364. var a = n(0)(n(42), n(171), "data-v-982d820c", null);
  3365. e.exports = a.exports
  3366. }, function(e, t, n) {
  3367. n(88);
  3368. var a = n(0)(n(44), n(162), "data-v-5ed30250", null);
  3369. e.exports = a.exports
  3370. }, function(e, t, n) {
  3371. n(91);
  3372. var a = n(0)(n(45), n(165), "data-v-6a85c295", null);
  3373. e.exports = a.exports
  3374. }, function(e, t, n) {
  3375. n(94);
  3376. var a = n(0)(n(46), n(168), "data-v-90db03ee", null);
  3377. e.exports = a.exports
  3378. }, function(e, t, n) {
  3379. n(71);
  3380. var a = n(0)(n(47), n(145), "data-v-0137ab79", null);
  3381. e.exports = a.exports
  3382. }, function(e, t, n) {
  3383. n(80);
  3384. var a = n(0)(n(48), n(154), "data-v-38969fc4", null);
  3385. e.exports = a.exports
  3386. }, function(e, t, n) {
  3387. n(100);
  3388. var a = n(0)(n(49), n(174), "data-v-c00a1096", null);
  3389. e.exports = a.exports
  3390. }, function(e, t, n) {
  3391. n(95);
  3392. var a = n(0)(n(50), n(169), "data-v-9180d144", null);
  3393. e.exports = a.exports
  3394. }, function(e, t, n) {
  3395. n(85);
  3396. var a = n(0)(n(51), n(159), "data-v-55c37426", null);
  3397. e.exports = a.exports
  3398. }, function(e, t, n) {
  3399. n(93);
  3400. var a = n(0)(n(52), n(167), "data-v-7ebd264c", null);
  3401. e.exports = a.exports
  3402. }, function(e, t, n) {
  3403. n(73);
  3404. var a = n(0)(n(53), n(147), "data-v-10565c5a", null);
  3405. e.exports = a.exports
  3406. }, function(e, t, n) {
  3407. n(77);
  3408. var a = n(0)(n(54), n(151), "data-v-24b996e5", null);
  3409. e.exports = a.exports
  3410. }, function(e, t, n) {
  3411. n(79);
  3412. var a = n(0)(n(55), n(153), "data-v-3451764a", null);
  3413. e.exports = a.exports
  3414. }, function(e, t, n) {
  3415. n(72);
  3416. var a = n(0)(n(56), n(146), "data-v-0f6561e2", null);
  3417. e.exports = a.exports
  3418. }, function(e, t, n) {
  3419. n(99);
  3420. var a = n(0)(n(57), n(173), "data-v-b58e13a4", null);
  3421. e.exports = a.exports
  3422. }, function(e, t, n) {
  3423. n(78);
  3424. var a = n(0)(n(58), n(152), "data-v-287354d0", null);
  3425. e.exports = a.exports
  3426. }, function(e, t, n) {
  3427. n(90);
  3428. var a = n(0)(n(59), n(164), "data-v-632a8d04", null);
  3429. e.exports = a.exports
  3430. }, function(e, t, n) {
  3431. n(82);
  3432. var a = n(0)(n(60), n(156), "data-v-4d9ac72f", null);
  3433. e.exports = a.exports
  3434. }, function(e, t, n) {
  3435. n(84);
  3436. var a = n(0)(n(61), n(158), "data-v-53e2a02c", null);
  3437. e.exports = a.exports
  3438. }, function(e, t, n) {
  3439. n(74);
  3440. var a = n(0)(n(62), n(148), "data-v-11eb5fd5", null);
  3441. e.exports = a.exports
  3442. }, function(e, t, n) {
  3443. n(81);
  3444. var a = n(0)(n(63), n(155), "data-v-493f246c", null);
  3445. e.exports = a.exports
  3446. }, function(e, t, n) {
  3447. n(75);
  3448. var a = n(0)(n(64), n(149), "data-v-16f4c9af", null);
  3449. e.exports = a.exports
  3450. }, function(e, t, n) {
  3451. n(96);
  3452. var a = n(0)(n(65), n(170), "data-v-95898206", null);
  3453. e.exports = a.exports
  3454. }, function(e, t) {
  3455. e.exports = {
  3456. render: function() {
  3457. var e = this,
  3458. t = e.$createElement,
  3459. n = e._self._c || t;
  3460. return n("div", {
  3461. staticClass: "message",
  3462. class: e.data.type
  3463. }, [e._l(e.data.lines, function(t, a) {
  3464. return [n("div", {
  3465. ref: "line_" + a,
  3466. refInFor: !0,
  3467. staticClass: "line"
  3468. }, [n("div", {
  3469. staticClass: "blocksContainer"
  3470. }, e._l(t.blocks, function(t, s) {
  3471. return n("div", {
  3472. staticClass: "blocks"
  3473. }, [n("span", {
  3474. ref: "block_" + a + "_" + s,
  3475. refInFor: !0,
  3476. class: t.class
  3477. }, [e._v("\n " + e._s(t.text) + "\n ")])])
  3478. }))])]
  3479. })], 2)
  3480. },
  3481. staticRenderFns: []
  3482. }
  3483. }, function(e, t) {
  3484. e.exports = {
  3485. render: function() {
  3486. var e = this,
  3487. t = e.$createElement,
  3488. n = e._self._c || t;
  3489. return "separator" !== e.data.id ? n("div", {
  3490. class: [e.itemType, e.itemClass, e.data.id],
  3491. attrs: {
  3492. title: e.data.title
  3493. },
  3494. on: {
  3495. click: function(t) {
  3496. t.stopPropagation(), e.click(t)
  3497. }
  3498. }
  3499. }, ["challenge" === e.data.id ? [n("svg", {
  3500. staticClass: "icon challenge",
  3501. attrs: {
  3502. xmlns: "http://www.w3.org/2000/svg",
  3503. viewBox: "0 0 40 40"
  3504. }
  3505. }, [n("path", {
  3506. staticClass: "iconSvg challenge",
  3507. attrs: {
  3508. d: "M36.3 16.9c-.6-.6-1.2-.9-2-1 1.3-1.5 1.3-3.7-.2-5.2l-.1-.1c-.7-.7-1.6-1-2.6-1.1.3-1.3 0-2.7-1-3.7-.9-.9-2-1.2-3.2-1.1v-.4c0-1-.4-2-1.1-2.7-1.5-1.5-3.9-1.5-5.4 0l-3.1 3.1c-.9-.2-1.9-.2-3 0-1.7.5-3.6 1.6-5.2 3.1-3.1 3.1-5 8.2-.8 13.1l-7.2 7.2L13 39.7l7.2-7.2c1 .7 2.2.9 3.4.7 3.2-.6 6.2-4.1 7.4-6.6.7-.2 1.3-.5 1.9-1l3.3-3.3c.7-.7 1.1-1.7 1.1-2.7s-.3-2-1-2.7zm-3.5-4.8c.7.7.7 1.8 0 2.5L27.4 20c-.7.7-1.8.7-2.5 0h-.2c-.7-.7-.7-1.8 0-2.5l5.4-5.4c.7-.8 1.9-.8 2.7 0zm-3.7-4.8c.7.7.7 1.9 0 2.6l-3.1 3c-.2-.7-.5-1.4-1.1-2l-1-1 2.6-2.6c.7-.8 1.9-.8 2.6 0zM22.3 3c.7-.7 1.9-.7 2.6 0 .3.3.5.8.5 1.3s-.2 1-.5 1.3l-2.6 2.6L20 6c-.1-.1-.2-.2-.4-.3L22.3 3zm1.1 28.3c-.9.2-1.7-.1-2.4-.8l-.7-.7-7.1 7.1-8.8-8.8 7.1-7.1-.7-.7c-4-4-2.6-8.3.1-11 1.3-1.3 2.8-2.2 4.3-2.5 1-.2 2.4-.3 3.4.7l3.5 3.5 1.4 1.4c.7.7.7 1.3.6 1.8-.2.7-.7 1.2-1.4 1.4-.6.2-1.2 0-1.8-.6L18 12.1l-.8-.8-1.4 1.4.8.8c2.4 2.4 4.4 4.6 5.2 6.4.6 1.4.6 2.8-1.3 4.7l1.4 1.4c1.3-1.3 2-2.6 2.2-3.9.6.4 1.3.6 2 .6h.4c-.1 1.1.2 2.2 1.1 3.1.4.4.9.7 1.4.9-1.3 1.8-3.5 4.2-5.6 4.6zm11.5-10.4l-3.3 3.3c-.7.7-1.9.7-2.6 0-.7-.7-.7-1.9 0-2.6l3.3-3.3c.4-.4.8-.5 1.3-.5s.9.2 1.3.5c.3.3.5.8.5 1.3s-.2 1-.5 1.3z"
  3509. }
  3510. })])] : e._e(), e._v(" "), "checkbox" === e.data.type ? n("div", {
  3511. staticClass: "booleanButton"
  3512. }, [n("input", {
  3513. directives: [{
  3514. name: "model",
  3515. rawName: "v-model",
  3516. value: e.data.active,
  3517. expression: "data.active"
  3518. }],
  3519. attrs: {
  3520. type: "checkbox",
  3521. id: "booleanToggle"
  3522. },
  3523. domProps: {
  3524. checked: Array.isArray(e.data.active) ? e._i(e.data.active, null) > -1 : e.data.active
  3525. },
  3526. on: {
  3527. change: function(t) {
  3528. var n = e.data.active,
  3529. a = t.target,
  3530. s = !!a.checked;
  3531. if (Array.isArray(n)) {
  3532. var i = e._i(n, null);
  3533. a.checked ? i < 0 && (e.data.active = n.concat([null])) : i > -1 && (e.data.active = n.slice(0, i).concat(n.slice(i + 1)))
  3534. } else e.$set(e.data, "active", s)
  3535. }
  3536. }
  3537. }), e._v(" "), n("span", [e._v(e._s(e.data.text))]), e._v(" "), n("div", {
  3538. staticClass: "booleanCheckbox"
  3539. }), e._v(" "), n("label", {
  3540. attrs: {
  3541. for: "booleanToggle"
  3542. }
  3543. })]) : n("div", {
  3544. staticClass: "text"
  3545. }, [e._v(e._s(e.data.text))])], 2) : e._e()
  3546. },
  3547. staticRenderFns: []
  3548. }
  3549. }, function(e, t) {
  3550. e.exports = {
  3551. render: function() {
  3552. var e = this,
  3553. t = e.$createElement,
  3554. n = e._self._c || t;
  3555. return n("div", {
  3556. staticClass: "messageWrapper",
  3557. class: e.data.type
  3558. }, [e._l(e.data.lines, function(t, a) {
  3559. return [n("div", {
  3560. ref: "line_" + a,
  3561. refInFor: !0,
  3562. staticClass: "line"
  3563. }, [n("div", {
  3564. staticClass: "blocksContainer"
  3565. }, e._l(t.blocks, function(t, s) {
  3566. return n("div", {
  3567. staticClass: "blocks"
  3568. }, [n("span", {
  3569. ref: "block_" + a + "_" + s,
  3570. refInFor: !0,
  3571. class: t.class
  3572. }, [e._v("\n " + e._s(t.text) + "\n ")])])
  3573. }))])]
  3574. })], 2)
  3575. },
  3576. staticRenderFns: []
  3577. }
  3578. }, function(e, t) {
  3579. e.exports = {
  3580. render: function() {
  3581. var e = this,
  3582. t = e.$createElement,
  3583. n = e._self._c || t;
  3584. return n("div", {
  3585. staticClass: "matchItem",
  3586. on: {
  3587. click: function(t) {
  3588. t.preventDefault(), e.onClick(t)
  3589. },
  3590. contextmenu: function(t) {
  3591. t.preventDefault(), e.showContextMenu(t)
  3592. }
  3593. }
  3594. }, [n("div", {
  3595. staticClass: "matchInfo"
  3596. }, [n("div", {
  3597. staticClass: "playerInfo"
  3598. }, [e.isRanked(e.data.player1) ? n("div", {
  3599. staticClass: "playerRank",
  3600. attrs: {
  3601. title: e.getRankTitle(e.data.player1)
  3602. }
  3603. }, [n("img", {
  3604. staticClass: "image",
  3605. attrs: {
  3606. src: e.rankSrc(e.data.player1)
  3607. }
  3608. })]) : e._e(), e._v(" "), n("div", {
  3609. staticClass: "playerFlag",
  3610. style: {
  3611. backgroundImage: "url(" + e.flagSrc(e.data.player1) + ")"
  3612. },
  3613. attrs: {
  3614. title: e.data.player1.country.full_name
  3615. }
  3616. }), e._v(" "), n("div", {
  3617. staticClass: "playerName",
  3618. attrs: {
  3619. title: e.data.player1.name
  3620. }
  3621. }, [e._v("\n " + e._s(e.data.player1.name) + "\n ")])]), e._v(" "), n("div", {
  3622. staticClass: "matchVsText"
  3623. }, [e._v("\n VS\n ")]), e._v(" "), n("div", {
  3624. staticClass: "playerInfo"
  3625. }, [e.isRanked(e.data.player2) ? n("div", {
  3626. staticClass: "playerRank",
  3627. attrs: {
  3628. title: e.getRankTitle(e.data.player2)
  3629. }
  3630. }, [n("img", {
  3631. staticClass: "image",
  3632. attrs: {
  3633. src: e.rankSrc(e.data.player2)
  3634. }
  3635. })]) : e._e(), e._v(" "), n("div", {
  3636. staticClass: "playerFlag",
  3637. style: {
  3638. backgroundImage: "url(" + e.flagSrc(e.data.player2) + ")"
  3639. },
  3640. attrs: {
  3641. title: e.data.player2.country.full_name
  3642. }
  3643. }), e._v(" "), n("div", {
  3644. staticClass: "playerName",
  3645. attrs: {
  3646. title: e.data.player2.name
  3647. }
  3648. }, [e._v("\n " + e._s(e.data.player2.name) + "\n ")])])]), e._v(" "), n("div", {
  3649. staticClass: "matchSpectators"
  3650. }, [e._v("\n " + e._s(e.data.numSpectators) + "\n ")])])
  3651. },
  3652. staticRenderFns: []
  3653. }
  3654. }, function(e, t) {
  3655. e.exports = {
  3656. render: function() {
  3657. var e = this,
  3658. t = e.$createElement,
  3659. n = e._self._c || t;
  3660. return n("div", {
  3661. staticClass: "userItem",
  3662. class: {
  3663. ignored: e.user.ignored
  3664. },
  3665. on: {
  3666. contextmenu: function(t) {
  3667. t.preventDefault(), e.showContextMenu(t)
  3668. },
  3669. click: function(t) {
  3670. t.preventDefault(), e.onClick(t)
  3671. }
  3672. }
  3673. }, [n("div", {
  3674. staticClass: "flagWrapper",
  3675. style: {
  3676. backgroundImage: "url(" + e.flagSrc + ")"
  3677. },
  3678. attrs: {
  3679. title: e.user.country.full_name
  3680. }
  3681. }), e._v(" "), n("div", {
  3682. staticClass: "avatarWrapper"
  3683. }, [n("img", {
  3684. staticClass: "image",
  3685. attrs: {
  3686. src: e.avatarSrc
  3687. }
  3688. })]), e._v(" "), n("div", {
  3689. staticClass: "nameAndGame"
  3690. }, [n("div", {
  3691. staticClass: "name",
  3692. attrs: {
  3693. title: e.user.name
  3694. }
  3695. }, [e._v("\n " + e._s(this.user.name) + "\n ")]), e._v(" "), e.user.playing ? n("div", {
  3696. staticClass: "game",
  3697. attrs: {
  3698. title: e.user.playing.gameName
  3699. }
  3700. }, [e._v("\n Playing "), n("strong", [e._v(e._s(e.user.playing.gameName))])]) : e._e()]), e._v(" "), n("div", {
  3701. staticClass: "rankWrapper"
  3702. }, [e.isRanked ? n("img", {
  3703. staticClass: "rank",
  3704. attrs: {
  3705. src: e.rankSrc,
  3706. title: e.rankTitle
  3707. }
  3708. }) : e._e()]), e._v(" "), n("div", {
  3709. staticClass: "pingWrapper"
  3710. }, [e.user.isLocal ? e._e() : n("img", {
  3711. staticClass: "ping",
  3712. attrs: {
  3713. src: e.pingSrc,
  3714. title: e.pingTitle
  3715. }
  3716. })])])
  3717. },
  3718. staticRenderFns: []
  3719. }
  3720. }, function(e, t) {
  3721. e.exports = {
  3722. render: function() {
  3723. var e = this,
  3724. t = e.$createElement,
  3725. n = e._self._c || t;
  3726. return n("div", {
  3727. staticClass: "channelWrapper"
  3728. }, [n("div", {
  3729. staticClass: "channelToolbar"
  3730. }, [n("div", {
  3731. staticClass: "channelInfo"
  3732. }, [n("div", {
  3733. staticClass: "name",
  3734. attrs: {
  3735. title: e.data.name
  3736. }
  3737. }, [e._v("#"), n("span", [e._v(e._s(e.data.name))])]), e._v(" "), n("div", {
  3738. staticClass: "rankedWrapper",
  3739. attrs: {
  3740. title: "Ranked channel"
  3741. }
  3742. }, [e.data.ranked ? n("svg", {
  3743. staticClass: "ranked",
  3744. attrs: {
  3745. xmlns: "http://www.w3.org/2000/svg",
  3746. width: "36",
  3747. height: "36",
  3748. viewBox: "0 0 36 36"
  3749. }
  3750. }, [n("path", {
  3751. attrs: {
  3752. d: "M18 4.5c7.4 0 13.5 6.1 13.5 13.5S25.4 31.5 18 31.5 4.5 25.4 4.5 18 10.6 4.5 18 4.5M18 0C8.1 0 0 8.1 0 18s8.1 18 18 18 18-8.1 18-18S27.9 0 18 0z"
  3753. }
  3754. }), e._v(" "), n("path", {
  3755. attrs: {
  3756. d: "M21.2 25.7l-3-5.6h-1.9v5.6h-3.6V10.1h5.6c3.3 0 6 1.2 6 4.9 0 2.3-1.1 3.8-2.8 4.5l3.5 6.3h-3.8zm-5-8.4H18c1.8 0 2.9-.8 2.9-2.3s-1-2.1-2.9-2.1h-1.8v4.4z"
  3757. }
  3758. })]) : e._e()]), e._v(" "), n("div", {
  3759. staticClass: "id"
  3760. }, [e._v(e._s(e.data.gameid))])]), e._v(" "), n("div", {
  3761. staticClass: "channelActions"
  3762. }, [n("div", {
  3763. staticClass: "button-alt testGame",
  3764. on: {
  3765. click: e.playAlone
  3766. }
  3767. }, [n("svg", {
  3768. staticClass: "icon",
  3769. attrs: {
  3770. xmlns: "http://www.w3.org/2000/svg",
  3771. viewBox: "0 0 20 20"
  3772. }
  3773. }, [n("path", {
  3774. attrs: {
  3775. d: "M14 3l3 1.3V10l-3.2 2.4-.8.6v5H7v-5l-.8-.6L3 10V4.3L6 3v5.2l1.1.6 2 1 .9.4.9-.4 2-1 1.1-.6V3m-2-3v7l-2 1-2-1V0L1 3v8l4 3v6h10v-6l4-3V3l-7-3z"
  3776. }
  3777. })]), e._v("\n Test game\n ")])])]), e._v(" "), n("div", {
  3778. staticClass: "channelContent"
  3779. }, [n("chat", {
  3780. ref: "chat",
  3781. attrs: {
  3782. channel: e.data,
  3783. usersByName: e.usersByName
  3784. },
  3785. on: {
  3786. "cancel-challenge": e.cancelChallenge,
  3787. "decline-challenge": e.declineChallengeEvent,
  3788. "accept-challenge": e.acceptChallengeEvent,
  3789. "decline-outer-challenge": e.declineOuterChallenge,
  3790. "accept-outer-challenge": e.acceptOuterChallenge,
  3791. "show-user-info": e.showUserInfo,
  3792. "challenge-user": e.challengeUser,
  3793. "goto-channel-by-gameid": e.gotoChannelByGameId,
  3794. "goto-chat-message": e.gotoChatMessage,
  3795. "show-emojis-view": e.showEmojisView,
  3796. "play-alone": e.playAlone
  3797. }
  3798. }), e._v(" "), n("users-list", {
  3799. ref: "usersList",
  3800. attrs: {
  3801. channel: e.data
  3802. },
  3803. on: {
  3804. "show-context-menu": e.showContextMenu,
  3805. "show-user-info": e.showUserInfo,
  3806. "challenge-user": e.challengeUser,
  3807. "goto-channel-by-gameid": e.gotoChannelByGameId,
  3808. "on-user-ignored": e.onUserIgnoredEvent
  3809. }
  3810. })], 1)])
  3811. },
  3812. staticRenderFns: []
  3813. }
  3814. }, function(e, t) {
  3815. e.exports = {
  3816. render: function() {
  3817. var e = this,
  3818. t = e.$createElement,
  3819. n = e._self._c || t;
  3820. return n("div", {
  3821. staticClass: "message",
  3822. class: e.data.type
  3823. }, [n("div", {
  3824. staticClass: "challengeContainer"
  3825. }, [n("div", {
  3826. staticClass: "title"
  3827. }, [e._v("\n " + e._s(e.message) + "\n ")]), e._v(" "), "active" === e.state ? n("div", {
  3828. staticClass: "cancel-challenge",
  3829. on: {
  3830. click: e.cancelChallenge
  3831. }
  3832. }, [e._v("Cancel")]) : e._e()])])
  3833. },
  3834. staticRenderFns: []
  3835. }
  3836. }, function(e, t) {
  3837. e.exports = {
  3838. render: function() {
  3839. var e = this,
  3840. t = e.$createElement,
  3841. n = e._self._c || t;
  3842. return n("div", {
  3843. staticClass: "login"
  3844. }, [e._m(0), e._v(" "), n("div", {
  3845. staticClass: "formWrapper"
  3846. }, [n("div", {
  3847. staticClass: "notificationWrapper",
  3848. class: {
  3849. visible: e.showAccountCreatedMessage
  3850. }
  3851. }, [n("div", {
  3852. staticClass: "notificationTitle"
  3853. }, [e._v("\n New account succesfully created\n ")]), e._v(" "), n("div", {
  3854. staticClass: "notificationBody"
  3855. }, [e._v("\n Please log in.\n ")])]), e._v(" "), n("h2", [e._v(e._s(e.formTitle()))]), e._v(" "), n("form", {
  3856. ref: "loginform",
  3857. staticClass: "form",
  3858. on: {
  3859. keydown: e.onFormKeyDown
  3860. }
  3861. }, [n("div", {
  3862. staticClass: "input-area username"
  3863. }, [n("div", {
  3864. staticClass: "title",
  3865. class: {
  3866. error: e.errorMessages.username
  3867. }
  3868. }, [n("span", [e._v("Username")]), e._v(" "), n("span", [e._v(e._s(e.errorMessages.username))])]), e._v(" "), n("input", {
  3869. directives: [{
  3870. name: "model",
  3871. rawName: "v-model",
  3872. value: e.username,
  3873. expression: "username"
  3874. }],
  3875. ref: "username",
  3876. attrs: {
  3877. type: "text",
  3878. readonly: e.working,
  3879. maxlength: "20",
  3880. autofocus: "",
  3881. autocorrect: "off",
  3882. spellcheck: "false"
  3883. },
  3884. domProps: {
  3885. value: e.username
  3886. },
  3887. on: {
  3888. input: function(t) {
  3889. t.target.composing || (e.username = t.target.value)
  3890. }
  3891. }
  3892. })]), e._v(" "), n("div", {
  3893. directives: [{
  3894. name: "show",
  3895. rawName: "v-show",
  3896. value: !e.signIn(),
  3897. expression: "!signIn()"
  3898. }],
  3899. staticClass: "input-area email"
  3900. }, [n("div", {
  3901. staticClass: "title",
  3902. class: {
  3903. error: e.errorMessages.email
  3904. }
  3905. }, [n("span", [e._v("E-mail")]), e._v(" "), n("span", [e._v(e._s(e.errorMessages.email))])]), e._v(" "), n("input", {
  3906. directives: [{
  3907. name: "model",
  3908. rawName: "v-model",
  3909. value: e.email,
  3910. expression: "email"
  3911. }],
  3912. ref: "email",
  3913. attrs: {
  3914. type: "text",
  3915. readonly: e.working,
  3916. autofocus: "",
  3917. autocorrect: "off",
  3918. spellcheck: "false"
  3919. },
  3920. domProps: {
  3921. value: e.email
  3922. },
  3923. on: {
  3924. input: function(t) {
  3925. t.target.composing || (e.email = t.target.value)
  3926. }
  3927. }
  3928. })]), e._v(" "), n("div", {
  3929. staticClass: "input-area password"
  3930. }, [n("div", {
  3931. staticClass: "title",
  3932. class: {
  3933. error: e.errorMessages.password
  3934. }
  3935. }, [n("span", [e._v("Password")]), e._v(" "), n("span", [e._v(e._s(e.errorMessages.password))])]), e._v(" "), n("input", {
  3936. directives: [{
  3937. name: "model",
  3938. rawName: "v-model",
  3939. value: e.password,
  3940. expression: "password"
  3941. }],
  3942. ref: "password",
  3943. attrs: {
  3944. type: "password",
  3945. name: "password",
  3946. readonly: e.working,
  3947. autocorrect: "off",
  3948. spellcheck: "false"
  3949. },
  3950. domProps: {
  3951. value: e.password
  3952. },
  3953. on: {
  3954. input: function(t) {
  3955. t.target.composing || (e.password = t.target.value)
  3956. }
  3957. }
  3958. })]), e._v(" "), e.signIn() ? n("a", {
  3959. staticClass: "button-generic",
  3960. class: {
  3961. working: e.working, spinner: e.working
  3962. },
  3963. on: {
  3964. click: e.doWork
  3965. }
  3966. }, [e._v("\n " + e._s(e.workAction()) + "\n ")]) : n("g-recaptcha", {
  3967. class: {
  3968. gRecaptchaButton: e.working, working: e.working, spinner: e.working
  3969. },
  3970. attrs: {
  3971. "data-sitekey": "6LeSaSwUAAAAADT2v-9qOJRYPf8vtTn-yT0EP1hD",
  3972. "data-validate": e.gRecaptchaValidate,
  3973. "data-callback": e.gRecaptchaCallback,
  3974. "data-btn-class": "gRecaptchaButton"
  3975. }
  3976. }, [e._v("\n " + e._s(e.workAction()) + "\n ")])], 1), e._v(" "), e.signIn() ? e._e() : n("div", {
  3977. staticClass: "changeWorkAction"
  3978. }, [n("h3", [e._v(e._s(e.changeWorkActionText()))]), e._v(" "), n("a", {
  3979. staticClass: "button-generic",
  3980. on: {
  3981. click: e.changeWorkActionLinkClicked
  3982. }
  3983. }, [e._v(e._s(e.changeWorkActionLink()))])]), e._v(" "), n("div", {
  3984. staticClass: "betaError",
  3985. class: {
  3986. error: e.errorMessages.beta
  3987. }
  3988. }, [e._m(1), e._v(" "), e._m(2)])])])
  3989. },
  3990. staticRenderFns: [function() {
  3991. var e = this,
  3992. t = e.$createElement,
  3993. n = e._self._c || t;
  3994. return n("div", {
  3995. staticClass: "logoWrapper"
  3996. }, [n("img", {
  3997. staticClass: "logo",
  3998. attrs: {
  3999. src: "/static/ui/logo_full_light.svg"
  4000. }
  4001. })])
  4002. }, function() {
  4003. var e = this,
  4004. t = e.$createElement,
  4005. n = e._self._c || t;
  4006. return n("p", [n("strong", [e._v("No beta access for your account yet, please try again on the next few days!")])])
  4007. }, function() {
  4008. var e = this,
  4009. t = e.$createElement,
  4010. n = e._self._c || t;
  4011. return n("p", [e._v("In the meantime, you can "), n("a", {
  4012. attrs: {
  4013. href: "https://discord.gg/EyERRSg",
  4014. target: "_blank"
  4015. }
  4016. }, [e._v("join our Official Discord server")]), e._v(" and meet new challengers for your next fight :)")])
  4017. }]
  4018. }
  4019. }, function(e, t) {
  4020. e.exports = {
  4021. render: function() {
  4022. var e = this,
  4023. t = e.$createElement,
  4024. n = e._self._c || t;
  4025. return n("div", {
  4026. staticClass: "messageWrapper",
  4027. class: e.data.type
  4028. }, [e._l(e.data.lines, function(t, a) {
  4029. return [n("div", {
  4030. ref: "line_" + a,
  4031. refInFor: !0,
  4032. staticClass: "line"
  4033. }, [n("span", [e._v(e._s(t))])])]
  4034. })], 2)
  4035. },
  4036. staticRenderFns: []
  4037. }
  4038. }, function(e, t) {
  4039. e.exports = {
  4040. render: function() {
  4041. var e = this,
  4042. t = e.$createElement,
  4043. n = e._self._c || t;
  4044. return n("div", {
  4045. staticClass: "message",
  4046. class: e.data.type
  4047. }, [n("div", {
  4048. staticClass: "challengeWrapper"
  4049. }, [n("div", {
  4050. ref: "line"
  4051. }, [n("div", {
  4052. staticClass: "title"
  4053. }, [e._v("\n " + e._s(e.message) + "\n ")]), e._v(" "), "active" === e.state ? n("div", {
  4054. staticClass: "challengeContent"
  4055. }, [n("div", {
  4056. staticClass: "userInfo"
  4057. }, [n("div", {
  4058. staticClass: "flag",
  4059. style: {
  4060. backgroundImage: "url(" + e.flagSrc + ")"
  4061. },
  4062. attrs: {
  4063. title: e.data.opponent.country.full_name
  4064. }
  4065. }), e._v(" "), n("div", {
  4066. staticClass: "gravatar"
  4067. }, [n("img", {
  4068. staticClass: "image",
  4069. attrs: {
  4070. src: e.avatarSrc
  4071. }
  4072. })]), e._v(" "), n("div", {
  4073. staticClass: "name"
  4074. }, [e._v("\n " + e._s(e.data.opponent.name) + "\n ")]), e._v(" "), n("div", {
  4075. staticClass: "rank"
  4076. }, [n("img", {
  4077. attrs: {
  4078. src: e.rankSrc
  4079. }
  4080. })]), e._v(" "), n("div", {
  4081. staticClass: "ping",
  4082. attrs: {
  4083. title: e.pingTitle
  4084. }
  4085. }, [n("img", {
  4086. attrs: {
  4087. src: e.pingSrc
  4088. }
  4089. })])]), e._v(" "), n("div", {
  4090. staticClass: "buttons"
  4091. }, [n("div", {
  4092. staticClass: "button-generic accept-challenge",
  4093. on: {
  4094. click: function(t) {
  4095. e.modifyChallenge("accept")
  4096. }
  4097. }
  4098. }, [e._v("Accept")]), e._v(" "), n("div", {
  4099. staticClass: "decline-challenge",
  4100. on: {
  4101. click: function(t) {
  4102. e.modifyChallenge("decline")
  4103. }
  4104. }
  4105. }, [e._v("Decline")])])]) : e._e()])])])
  4106. },
  4107. staticRenderFns: []
  4108. }
  4109. }, function(e, t) {
  4110. e.exports = {
  4111. render: function() {
  4112. var e = this,
  4113. t = e.$createElement,
  4114. n = e._self._c || t;
  4115. return n("div", {
  4116. staticClass: "mask",
  4117. on: {
  4118. click: e.close
  4119. }
  4120. }, [n("div", {
  4121. ref: "content",
  4122. staticClass: "content",
  4123. style: e.infoStyle
  4124. }, [n("div", {
  4125. staticClass: "top"
  4126. }, [n("div", {
  4127. staticClass: "avatar"
  4128. }, [n("img", {
  4129. staticClass: "image",
  4130. attrs: {
  4131. src: e.avatarSrc
  4132. }
  4133. }), e._v(" "), n("div", {
  4134. class: e.stateClass
  4135. })]), e._v(" "), n("div", {
  4136. staticClass: "username"
  4137. }, [e._v(e._s(e.user.name))]), e._v(" "), n("img", {
  4138. staticClass: "flag",
  4139. attrs: {
  4140. src: e.flagSrc
  4141. }
  4142. })]), e._v(" "), n("div", {
  4143. staticClass: "bottom"
  4144. }, [e._v("\n [TODO: add user info]\n ")])])])
  4145. },
  4146. staticRenderFns: []
  4147. }
  4148. }, function(e, t) {
  4149. e.exports = {
  4150. render: function() {
  4151. var e = this,
  4152. t = e.$createElement,
  4153. n = e._self._c || t;
  4154. return n("div", {
  4155. staticClass: "notificationsWrapper"
  4156. }, [n("div", {
  4157. staticClass: "notificationsMaskBg"
  4158. }), e._v(" "), n("div", {
  4159. staticClass: "notificationsMask",
  4160. on: {
  4161. click: function(t) {
  4162. t.stopPropagation(), e.closeNotifications(t)
  4163. }
  4164. }
  4165. }), e._v(" "), n("div", {
  4166. staticClass: "notificationsSection",
  4167. on: {
  4168. click: function(e) {
  4169. e.stopPropagation()
  4170. }
  4171. }
  4172. }, [0 === e.notifications.length ? n("div", {
  4173. staticClass: "notifications-empty"
  4174. }, [n("div", {
  4175. staticClass: "emoji"
  4176. }, [e._v(" ร‚ยฏ\\_(รฃฦ’โ€ž)_/ร‚ยฏ")]), e._v(" "), e._m(0)]) : e._e(), e._v(" "), e._l(e.notifications, function(t, a) {
  4177. return ["mention" === t.type ? n("div", {
  4178. staticClass: "notification-mention",
  4179. on: {
  4180. click: function(t) {
  4181. e.onNotificationClick(a)
  4182. }
  4183. }
  4184. }, [n("div", {
  4185. ref: "notification_title",
  4186. refInFor: !0,
  4187. staticClass: "header"
  4188. }, [e._v("\n " + e._s(t.title) + "\n ")])]) : n("div", {
  4189. staticClass: "notification-challenge",
  4190. on: {
  4191. click: function(t) {
  4192. e.onNotificationClick(a)
  4193. }
  4194. }
  4195. }, [n("div", {
  4196. ref: "notification_title",
  4197. refInFor: !0,
  4198. staticClass: "header"
  4199. }, [e._v("\n " + e._s(t.title) + "\n ")]), e._v(" "), n("div", {
  4200. staticClass: "content"
  4201. }, [n("div", {
  4202. staticClass: "challenger"
  4203. }, [n("img", {
  4204. attrs: {
  4205. src: e.pingSrc(t.user)
  4206. }
  4207. }), e._v(" "), n("img", {
  4208. attrs: {
  4209. src: e.rankSrc(t.channel, t.user)
  4210. }
  4211. }), e._v(" "), n("div", {
  4212. staticClass: "name"
  4213. }, [e._v(e._s(t.user.name))])]), e._v(" "), n("div", {
  4214. directives: [{
  4215. name: "show",
  4216. rawName: "v-show",
  4217. value: "requested" === t.challengeType,
  4218. expression: "notification.challengeType === 'requested'"
  4219. }],
  4220. staticClass: "buttons"
  4221. }, [n("div", {
  4222. staticClass: " button-generic accept",
  4223. on: {
  4224. click: function(t) {
  4225. t.stopPropagation(), e.onChallengeNotificationClick("accept", a)
  4226. }
  4227. }
  4228. }, [n("svg", {
  4229. staticClass: "icon challenge",
  4230. attrs: {
  4231. xmlns: "http://www.w3.org/2000/svg",
  4232. viewBox: "0 0 40 40"
  4233. }
  4234. }, [n("path", {
  4235. staticClass: "iconSvg challenge",
  4236. attrs: {
  4237. d: "M36.3 16.9c-.6-.6-1.2-.9-2-1 1.3-1.5 1.3-3.7-.2-5.2l-.1-.1c-.7-.7-1.6-1-2.6-1.1.3-1.3 0-2.7-1-3.7-.9-.9-2-1.2-3.2-1.1v-.4c0-1-.4-2-1.1-2.7-1.5-1.5-3.9-1.5-5.4 0l-3.1 3.1c-.9-.2-1.9-.2-3 0-1.7.5-3.6 1.6-5.2 3.1-3.1 3.1-5 8.2-.8 13.1l-7.2 7.2L13 39.7l7.2-7.2c1 .7 2.2.9 3.4.7 3.2-.6 6.2-4.1 7.4-6.6.7-.2 1.3-.5 1.9-1l3.3-3.3c.7-.7 1.1-1.7 1.1-2.7s-.3-2-1-2.7zm-3.5-4.8c.7.7.7 1.8 0 2.5L27.4 20c-.7.7-1.8.7-2.5 0h-.2c-.7-.7-.7-1.8 0-2.5l5.4-5.4c.7-.8 1.9-.8 2.7 0zm-3.7-4.8c.7.7.7 1.9 0 2.6l-3.1 3c-.2-.7-.5-1.4-1.1-2l-1-1 2.6-2.6c.7-.8 1.9-.8 2.6 0zM22.3 3c.7-.7 1.9-.7 2.6 0 .3.3.5.8.5 1.3s-.2 1-.5 1.3l-2.6 2.6L20 6c-.1-.1-.2-.2-.4-.3L22.3 3zm1.1 28.3c-.9.2-1.7-.1-2.4-.8l-.7-.7-7.1 7.1-8.8-8.8 7.1-7.1-.7-.7c-4-4-2.6-8.3.1-11 1.3-1.3 2.8-2.2 4.3-2.5 1-.2 2.4-.3 3.4.7l3.5 3.5 1.4 1.4c.7.7.7 1.3.6 1.8-.2.7-.7 1.2-1.4 1.4-.6.2-1.2 0-1.8-.6L18 12.1l-.8-.8-1.4 1.4.8.8c2.4 2.4 4.4 4.6 5.2 6.4.6 1.4.6 2.8-1.3 4.7l1.4 1.4c1.3-1.3 2-2.6 2.2-3.9.6.4 1.3.6 2 .6h.4c-.1 1.1.2 2.2 1.1 3.1.4.4.9.7 1.4.9-1.3 1.8-3.5 4.2-5.6 4.6zm11.5-10.4l-3.3 3.3c-.7.7-1.9.7-2.6 0-.7-.7-.7-1.9 0-2.6l3.3-3.3c.4-.4.8-.5 1.3-.5s.9.2 1.3.5c.3.3.5.8.5 1.3s-.2 1-.5 1.3z"
  4238. }
  4239. })]), e._v("\n Accept\n ")]), e._v(" "), n("div", {
  4240. staticClass: "decline",
  4241. on: {
  4242. click: function(t) {
  4243. t.stopPropagation(), e.onChallengeNotificationClick("decline", a)
  4244. }
  4245. }
  4246. }, [e._v("Decline")])])])])]
  4247. })], 2)])
  4248. },
  4249. staticRenderFns: [function() {
  4250. var e = this,
  4251. t = e.$createElement,
  4252. n = e._self._c || t;
  4253. return n("div", [n("strong", [e._v("No notifications yet.")])])
  4254. }]
  4255. }
  4256. }, function(e, t) {
  4257. e.exports = {
  4258. render: function() {
  4259. var e = this,
  4260. t = e.$createElement,
  4261. n = e._self._c || t;
  4262. return n("div", {
  4263. staticClass: "addChannelView"
  4264. }, [n("div", {
  4265. staticClass: "addChannelViewSidebar"
  4266. }, [n("div", {
  4267. staticClass: "search",
  4268. class: {
  4269. active: "search" === e.openedSection
  4270. },
  4271. on: {
  4272. click: function(t) {
  4273. e.openSection("search")
  4274. }
  4275. }
  4276. }, [n("svg", {
  4277. staticClass: "searchIcon",
  4278. attrs: {
  4279. xmlns: "http://www.w3.org/2000/svg",
  4280. width: "40",
  4281. height: "40",
  4282. viewBox: "0 0 40 40"
  4283. }
  4284. }, [n("path", {
  4285. attrs: {
  4286. d: "M25 0c-8.3 0-15 6.7-15 15 0 2.3.5 4.5 1.5 6.5L0 33l7 7 11.5-11.5c2 1 4.2 1.5 6.5 1.5 8.3 0 15-6.7 15-15S33.3 0 25 0zM7 37.2L2.8 33l9.2-9.2.5-.5c1.1 1.7 2.5 3.1 4.2 4.2L7 37.2zM25 28c-7.2 0-13-5.8-13-13S17.8 2 25 2s13 5.8 13 13-5.8 13-13 13z"
  4287. }
  4288. }), e._v(" "), n("path", {
  4289. attrs: {
  4290. d: "M25 5.4c-5.3 0-9.6 4.3-9.6 9.6s4.3 9.6 9.6 9.6 9.6-4.3 9.6-9.6-4.3-9.6-9.6-9.6zm0 17.2c-4.2 0-7.6-3.4-7.6-7.6 0-4.2 3.4-7.6 7.6-7.6s7.6 3.4 7.6 7.6c0 4.2-3.4 7.6-7.6 7.6z"
  4291. }
  4292. })])]), e._v(" "), n("div", {
  4293. staticClass: "favorites",
  4294. class: {
  4295. active: "favorites" === e.openedSection
  4296. },
  4297. on: {
  4298. click: function(t) {
  4299. e.openSection("favorites")
  4300. }
  4301. }
  4302. }, [n("svg", {
  4303. staticClass: "favoritesIcon",
  4304. attrs: {
  4305. xmlns: "http://www.w3.org/2000/svg",
  4306. width: "40",
  4307. height: "40",
  4308. viewBox: "0 0 40 40"
  4309. }
  4310. }, [n("path", {
  4311. attrs: {
  4312. d: "M20 6.9l3.1 8.7.5 1.3H34l-7.6 5.8-1.1.8.4 1.3 2.6 8.7-7.1-5.4-1.2-.7-1.2.9-7.1 5.4 2.6-8.7.4-1.3-1.1-.8L6 17h10.4l.5-1.3L20 6.9M20 1l-5 14H0l12.4 9.4L8 39l12-9.1L32 39l-4.4-14.6L40 15H25L20 1z"
  4313. }
  4314. })])])]), e._v(" "), n("search", {
  4315. directives: [{
  4316. name: "show",
  4317. rawName: "v-show",
  4318. value: "search" === e.openedSection,
  4319. expression: "openedSection === 'search'"
  4320. }],
  4321. ref: "search",
  4322. on: {
  4323. "join-channel": e.joinChannel,
  4324. "fav-channel": e.favChannel,
  4325. "patreon-info": e.openPatreonChannel
  4326. }
  4327. }), e._v(" "), n("favorites", {
  4328. directives: [{
  4329. name: "show",
  4330. rawName: "v-show",
  4331. value: "favorites" === e.openedSection,
  4332. expression: "openedSection === 'favorites'"
  4333. }],
  4334. ref: "favorites",
  4335. on: {
  4336. "join-channel": e.joinChannel,
  4337. "fav-channel": e.favChannel,
  4338. "patreon-info": e.openPatreonChannel
  4339. }
  4340. }), e._v(" "), n("discover", {
  4341. directives: [{
  4342. name: "show",
  4343. rawName: "v-show",
  4344. value: "discover" === e.openedSection,
  4345. expression: "openedSection === 'discover'"
  4346. }],
  4347. ref: "discover",
  4348. on: {
  4349. "join-channel": e.joinChannel,
  4350. "fav-channel": e.favChannel,
  4351. "patreon-info": e.openPatreonChannel
  4352. }
  4353. })], 1)
  4354. },
  4355. staticRenderFns: []
  4356. }
  4357. }, function(e, t) {
  4358. e.exports = {
  4359. render: function() {
  4360. var e = this,
  4361. t = e.$createElement,
  4362. n = e._self._c || t;
  4363. return n("div", {
  4364. staticClass: "settingsWrapper"
  4365. }, [n("div", {
  4366. staticClass: "settingsMaskBg"
  4367. }), e._v(" "), n("div", {
  4368. staticClass: "settingsMask",
  4369. on: {
  4370. click: function(t) {
  4371. t.stopPropagation(), e.closeSettings(t)
  4372. }
  4373. }
  4374. }), e._v(" "), n("div", {
  4375. staticClass: "settingsSection",
  4376. on: {
  4377. click: function(e) {
  4378. e.stopPropagation()
  4379. }
  4380. }
  4381. }, [n("div", {
  4382. staticClass: "userAvatarWrapper",
  4383. attrs: {
  4384. title: "Change your avatar on gravatar.com"
  4385. }
  4386. }, [n("a", {
  4387. attrs: {
  4388. href: "https://www.gravatar.com",
  4389. target: "_blank"
  4390. }
  4391. }, [n("img", {
  4392. staticClass: "userAvatar",
  4393. attrs: {
  4394. src: e.avatarSrc
  4395. }
  4396. }), e._v(" "), n("div", {
  4397. staticClass: "changeAvatar"
  4398. }, [e._v("\n Click to change on gravatar\n ")])])]), e._v(" "), n("div", {
  4399. staticClass: "userIdWrapper"
  4400. }, [n("div", {
  4401. staticClass: "label"
  4402. }, [e._v("Fightcade ID")]), e._v(" "), n("div", {
  4403. staticClass: "userName"
  4404. }, [e._v(e._s(e.localUser.name))])]), e._v(" "), n("div", {
  4405. staticClass: "userEmailWrapper"
  4406. }, [n("div", {
  4407. staticClass: "label"
  4408. }, [e._v("E-mail")]), e._v(" "), n("input", {
  4409. directives: [{
  4410. name: "model",
  4411. rawName: "v-model",
  4412. value: e.localUser.email,
  4413. expression: "localUser.email"
  4414. }],
  4415. staticClass: "userEmail",
  4416. attrs: {
  4417. type: "email",
  4418. autocomplete: "on",
  4419. autocorrect: "off",
  4420. spellcheck: "false"
  4421. },
  4422. domProps: {
  4423. value: e.localUser.email
  4424. },
  4425. on: {
  4426. input: [function(t) {
  4427. t.target.composing || e.$set(e.localUser, "email", t.target.value)
  4428. }, function(t) {
  4429. e.startEditingValue("Email")
  4430. }]
  4431. }
  4432. }), e._v(" "), n("div", {
  4433. directives: [{
  4434. name: "show",
  4435. rawName: "v-show",
  4436. value: e.editingEmail,
  4437. expression: "editingEmail"
  4438. }],
  4439. staticClass: "button-generic save",
  4440. class: {
  4441. spinner: e.savingEmail
  4442. },
  4443. on: {
  4444. click: function(t) {
  4445. e.saveValue("Email")
  4446. }
  4447. }
  4448. }, [e._v("Update")]), e._v(" "), n("div", {
  4449. directives: [{
  4450. name: "show",
  4451. rawName: "v-show",
  4452. value: null !== e.editingEmailMessage,
  4453. expression: "editingEmailMessage !== null"
  4454. }],
  4455. staticClass: "saveFeedback",
  4456. class: e.editingEmailMessageClass
  4457. }, [e._v(e._s(e.editingEmailMessage))])]), e._v(" "), n("div", {
  4458. staticClass: "userPasswordWrapper"
  4459. }, [n("div", {
  4460. staticClass: "label"
  4461. }, [e._v("Password")]), e._v(" "), n("input", {
  4462. directives: [{
  4463. name: "model",
  4464. rawName: "v-model",
  4465. value: e.password,
  4466. expression: "password"
  4467. }],
  4468. staticClass: "userPassword",
  4469. attrs: {
  4470. type: "password",
  4471. autocorrect: "off",
  4472. spellcheck: "false",
  4473. placeholder: "รขโ€”ยรขโ€”ยรขโ€”ยรขโ€”ยรขโ€”ยรขโ€”ยรขโ€”ยรขโ€”ย"
  4474. },
  4475. domProps: {
  4476. value: e.password
  4477. },
  4478. on: {
  4479. input: [function(t) {
  4480. t.target.composing || (e.password = t.target.value)
  4481. }, function(t) {
  4482. e.editingPassword = !0
  4483. }]
  4484. }
  4485. }), e._v(" "), n("div", {
  4486. directives: [{
  4487. name: "show",
  4488. rawName: "v-show",
  4489. value: e.editingPassword,
  4490. expression: "editingPassword"
  4491. }],
  4492. staticClass: "button-generic save",
  4493. class: {
  4494. spinner: e.savingPassword
  4495. },
  4496. on: {
  4497. click: function(t) {
  4498. e.saveValue("Password")
  4499. }
  4500. }
  4501. }, [e._v("Update")]), e._v(" "), n("div", {
  4502. directives: [{
  4503. name: "show",
  4504. rawName: "v-show",
  4505. value: null !== e.editingPasswordMessage,
  4506. expression: "editingPasswordMessage !== null"
  4507. }],
  4508. staticClass: "saveFeedback",
  4509. class: e.editingPasswordMessageClass
  4510. }, [e._v(e._s(e.editingPasswordMessage))])]), e._v(" "), n("div", {
  4511. staticClass: "gamesOptions"
  4512. }, [n("div", {
  4513. staticClass: "label"
  4514. }, [e._v("Games")]), e._v(" "), n("div", {
  4515. staticClass: "option"
  4516. }, [n("div", {
  4517. staticClass: "title"
  4518. }, [e._v("Smoothing / Input lag")]), e._v(" "), n("select", {
  4519. directives: [{
  4520. name: "model",
  4521. rawName: "v-model",
  4522. value: e.localUser.settings.delay,
  4523. expression: "localUser.settings.delay"
  4524. }],
  4525. staticClass: "selectValue",
  4526. on: {
  4527. change: [function(t) {
  4528. var n = Array.prototype.filter.call(t.target.options, function(e) {
  4529. return e.selected
  4530. }).map(function(e) {
  4531. return "_value" in e ? e._value : e.value
  4532. });
  4533. e.$set(e.localUser.settings, "delay", t.target.multiple ? n : n[0])
  4534. }, function(t) {
  4535. e.saveSetting("delay")
  4536. }]
  4537. }
  4538. }, e._l(e.delayValues, function(t, a) {
  4539. return n("option", {
  4540. domProps: {
  4541. value: a - 1
  4542. }
  4543. }, [e._v("\n " + e._s(t) + "\n ")])
  4544. }))]), e._v(" "), n("div", {
  4545. staticClass: "option"
  4546. }, [n("div", {
  4547. staticClass: "title"
  4548. }, [e._v("Ranked player")]), e._v(" "), n("div", {
  4549. staticClass: "optionCheckboxWrapper"
  4550. }, [n("input", {
  4551. directives: [{
  4552. name: "model",
  4553. rawName: "v-model",
  4554. value: e.localUser.settings.ranked,
  4555. expression: "localUser.settings.ranked"
  4556. }],
  4557. attrs: {
  4558. type: "checkbox",
  4559. id: "rankedPlayer"
  4560. },
  4561. domProps: {
  4562. checked: Array.isArray(e.localUser.settings.ranked) ? e._i(e.localUser.settings.ranked, null) > -1 : e.localUser.settings.ranked
  4563. },
  4564. on: {
  4565. change: [function(t) {
  4566. var n = e.localUser.settings.ranked,
  4567. a = t.target,
  4568. s = !!a.checked;
  4569. if (Array.isArray(n)) {
  4570. var i = e._i(n, null);
  4571. a.checked ? i < 0 && (e.localUser.settings.ranked = n.concat([null])) : i > -1 && (e.localUser.settings.ranked = n.slice(0, i).concat(n.slice(i + 1)))
  4572. } else e.$set(e.localUser.settings, "ranked", s)
  4573. }, function(t) {
  4574. e.saveSetting("ranked")
  4575. }]
  4576. }
  4577. }), e._v(" "), n("div", {
  4578. staticClass: "optionCheckbox"
  4579. }), e._v(" "), n("label", {
  4580. attrs: {
  4581. for: "rankedPlayer"
  4582. }
  4583. })])])]), e._v(" "), n("div", {
  4584. staticClass: "frontendOptions"
  4585. }, [n("div", {
  4586. staticClass: "label"
  4587. }, [e._v("Frontend")]), e._v(" "), n("div", {
  4588. staticClass: "option"
  4589. }, [n("div", {
  4590. staticClass: "title"
  4591. }, [e._v("Color theme")]), e._v(" "), n("select", {
  4592. directives: [{
  4593. name: "model",
  4594. rawName: "v-model",
  4595. value: e.localUser.settings.theme,
  4596. expression: "localUser.settings.theme"
  4597. }],
  4598. staticClass: "selectValue",
  4599. attrs: {
  4600. disabled: !e.localUser.perks.themesAvailable
  4601. },
  4602. on: {
  4603. change: [function(t) {
  4604. var n = Array.prototype.filter.call(t.target.options, function(e) {
  4605. return e.selected
  4606. }).map(function(e) {
  4607. return "_value" in e ? e._value : e.value
  4608. });
  4609. e.$set(e.localUser.settings, "theme", t.target.multiple ? n : n[0])
  4610. }, function(t) {
  4611. e.saveSetting("theme")
  4612. }]
  4613. }
  4614. }, e._l(e.themesValues, function(t) {
  4615. return n("option", {
  4616. domProps: {
  4617. value: t.id
  4618. }
  4619. }, [e._v("\n " + e._s(t.name) + "\n ")])
  4620. }))]), e._v(" "), e.localUser.perks.themesAvailable ? e._e() : n("div", {
  4621. staticClass: "patronExclusive"
  4622. }, [n("div", {
  4623. staticClass: "text"
  4624. }, [e._v("\n This feature is only available for patrons.\n ")]), e._v(" "), n("div", {
  4625. staticClass: "button-generic",
  4626. on: {
  4627. click: e.openPatreonChannel
  4628. }
  4629. }, [e._v("\n Learn more\n ")])])]), e._v(" "), n("div", {
  4630. staticClass: "notificationsOptions"
  4631. }, [n("div", {
  4632. staticClass: "label"
  4633. }, [e._v("Notifications")]), e._v(" "), n("div", {
  4634. staticClass: "option"
  4635. }, [n("div", {
  4636. staticClass: "title"
  4637. }, [e._v("Desktop notifications")]), e._v(" "), n("div", {
  4638. staticClass: "optionCheckboxWrapper"
  4639. }, [n("input", {
  4640. directives: [{
  4641. name: "model",
  4642. rawName: "v-model",
  4643. value: e.localUser.settings.desktopNotifications,
  4644. expression: "localUser.settings.desktopNotifications"
  4645. }],
  4646. attrs: {
  4647. type: "checkbox",
  4648. id: "desktopNotifications"
  4649. },
  4650. domProps: {
  4651. checked: Array.isArray(e.localUser.settings.desktopNotifications) ? e._i(e.localUser.settings.desktopNotifications, null) > -1 : e.localUser.settings.desktopNotifications
  4652. },
  4653. on: {
  4654. change: [function(t) {
  4655. var n = e.localUser.settings.desktopNotifications,
  4656. a = t.target,
  4657. s = !!a.checked;
  4658. if (Array.isArray(n)) {
  4659. var i = e._i(n, null);
  4660. a.checked ? i < 0 && (e.localUser.settings.desktopNotifications = n.concat([null])) : i > -1 && (e.localUser.settings.desktopNotifications = n.slice(0, i).concat(n.slice(i + 1)))
  4661. } else e.$set(e.localUser.settings, "desktopNotifications", s)
  4662. }, function(t) {
  4663. e.saveSetting("desktopNotifications")
  4664. }]
  4665. }
  4666. }), e._v(" "), n("div", {
  4667. staticClass: "optionCheckbox"
  4668. }), e._v(" "), n("label", {
  4669. attrs: {
  4670. for: "desktopNotifications"
  4671. }
  4672. })])]), e._v(" "), n("div", {
  4673. staticClass: "option"
  4674. }, [n("div", {
  4675. staticClass: "title"
  4676. }, [e._v("Sound notifications")]), e._v(" "), n("div", {
  4677. staticClass: "optionCheckboxWrapper"
  4678. }, [n("input", {
  4679. directives: [{
  4680. name: "model",
  4681. rawName: "v-model",
  4682. value: e.localUser.settings.soundNotifications,
  4683. expression: "localUser.settings.soundNotifications"
  4684. }],
  4685. attrs: {
  4686. type: "checkbox",
  4687. id: "soundNotifications"
  4688. },
  4689. domProps: {
  4690. checked: Array.isArray(e.localUser.settings.soundNotifications) ? e._i(e.localUser.settings.soundNotifications, null) > -1 : e.localUser.settings.soundNotifications
  4691. },
  4692. on: {
  4693. change: [function(t) {
  4694. var n = e.localUser.settings.soundNotifications,
  4695. a = t.target,
  4696. s = !!a.checked;
  4697. if (Array.isArray(n)) {
  4698. var i = e._i(n, null);
  4699. a.checked ? i < 0 && (e.localUser.settings.soundNotifications = n.concat([null])) : i > -1 && (e.localUser.settings.soundNotifications = n.slice(0, i).concat(n.slice(i + 1)))
  4700. } else e.$set(e.localUser.settings, "soundNotifications", s)
  4701. }, function(t) {
  4702. e.saveSetting("soundNotifications")
  4703. }]
  4704. }
  4705. }), e._v(" "), n("div", {
  4706. staticClass: "optionCheckbox"
  4707. }), e._v(" "), n("label", {
  4708. attrs: {
  4709. for: "soundNotifications"
  4710. }
  4711. })])]), e._v(" "), n("div", {
  4712. staticClass: "option"
  4713. }, [n("div", {
  4714. staticClass: "title"
  4715. }, [e._v("User events notifications")]), e._v(" "), n("div", {
  4716. staticClass: "optionCheckboxWrapper"
  4717. }, [n("input", {
  4718. directives: [{
  4719. name: "model",
  4720. rawName: "v-model",
  4721. value: e.localUser.settings.userEventsNotifications,
  4722. expression: "localUser.settings.userEventsNotifications"
  4723. }],
  4724. attrs: {
  4725. type: "checkbox",
  4726. id: "userEventsNotifications"
  4727. },
  4728. domProps: {
  4729. checked: Array.isArray(e.localUser.settings.userEventsNotifications) ? e._i(e.localUser.settings.userEventsNotifications, null) > -1 : e.localUser.settings.userEventsNotifications
  4730. },
  4731. on: {
  4732. change: [function(t) {
  4733. var n = e.localUser.settings.userEventsNotifications,
  4734. a = t.target,
  4735. s = !!a.checked;
  4736. if (Array.isArray(n)) {
  4737. var i = e._i(n, null);
  4738. a.checked ? i < 0 && (e.localUser.settings.userEventsNotifications = n.concat([null])) : i > -1 && (e.localUser.settings.userEventsNotifications = n.slice(0, i).concat(n.slice(i + 1)))
  4739. } else e.$set(e.localUser.settings, "userEventsNotifications", s)
  4740. }, function(t) {
  4741. e.saveSetting("userEventsNotifications")
  4742. }]
  4743. }
  4744. }), e._v(" "), n("div", {
  4745. staticClass: "optionCheckbox"
  4746. }), e._v(" "), n("label", {
  4747. attrs: {
  4748. for: "userEventsNotifications"
  4749. }
  4750. })])])])])])
  4751. },
  4752. staticRenderFns: []
  4753. }
  4754. }, function(e, t) {
  4755. e.exports = {
  4756. render: function() {
  4757. var e = this,
  4758. t = e.$createElement,
  4759. n = e._self._c || t;
  4760. return n("div", {
  4761. staticClass: "message",
  4762. class: e.data.type
  4763. }, [e._l(e.data.lines, function(t, a) {
  4764. return [0 === a ? n("header", [n("div", {
  4765. staticClass: "avatarWrapper"
  4766. }, [n("img", {
  4767. ref: "avatar",
  4768. refInFor: !0,
  4769. staticClass: "avatar",
  4770. attrs: {
  4771. src: e.avatarSrc
  4772. },
  4773. on: {
  4774. click: function(t) {
  4775. e.onAvatarClick()
  4776. }
  4777. }
  4778. })]), e._v(" "), n("div", {
  4779. staticClass: "authorAndTime"
  4780. }, [n("span", {
  4781. ref: "author",
  4782. refInFor: !0,
  4783. staticClass: "author",
  4784. on: {
  4785. click: function(t) {
  4786. e.onAuthorClick()
  4787. }
  4788. }
  4789. }, [e._v("\n " + e._s(e.data.author.name) + "\n ")]), e._v(" "), n("span", {
  4790. staticClass: "time"
  4791. }, [e._v("at " + e._s(e.timeInfo(e.data.lines[0].time)))])])]) : e._e(), e._v(" "), n("div", {
  4792. ref: "line_" + a,
  4793. refInFor: !0,
  4794. staticClass: "line"
  4795. }, [0 !== a ? n("div", {
  4796. staticClass: "time"
  4797. }, [e._v(e._s(e.timeInfo(t.time)))]) : n("div", {
  4798. staticClass: "time"
  4799. }), e._v(" "), n("div", {
  4800. staticClass: "blocksContainer"
  4801. }, e._l(t.blocks, function(t, s) {
  4802. return n("div", {
  4803. staticClass: "blocks"
  4804. }, [n("span", {
  4805. ref: "block_" + a + "_" + s,
  4806. refInFor: !0,
  4807. class: e.blockClass(t),
  4808. attrs: {
  4809. title: e.blockTitle(t)
  4810. },
  4811. on: {
  4812. click: function(n) {
  4813. e.onLineBlockClick(t, a, s)
  4814. }
  4815. }
  4816. }, [e._v("\n " + e._s(t.text) + "\n ")])])
  4817. }))])]
  4818. })], 2)
  4819. },
  4820. staticRenderFns: []
  4821. }
  4822. }, function(e, t) {
  4823. e.exports = {
  4824. render: function() {
  4825. var e = this,
  4826. t = e.$createElement,
  4827. n = e._self._c || t;
  4828. return n("div", {
  4829. staticClass: "searchResultsWrapper"
  4830. }, [e.title ? n("h3", [e._v(e._s(e.title))]) : e._e(), e._v(" "), n("div", {
  4831. directives: [{
  4832. name: "show",
  4833. rawName: "v-show",
  4834. value: e.fetchingData,
  4835. expression: "fetchingData"
  4836. }],
  4837. staticClass: "spinnerWrapper"
  4838. }, [n("div", {
  4839. staticClass: "spinner"
  4840. }), e._v(" "), n("div", {
  4841. staticClass: "message"
  4842. }, [e._v("Loading...")])]), e._v(" "), e.channels.length > 0 ? n("div", {
  4843. staticClass: "searchResultsGrid"
  4844. }, [e.fetchingData ? e._e() : e._l(e.channels, function(t) {
  4845. return e.channelIsVisible(t) ? n("div", {
  4846. key: t.gameid,
  4847. ref: t.name,
  4848. refInFor: !0,
  4849. staticClass: "channelWrapper",
  4850. attrs: {
  4851. title: e.channelTitle(t)
  4852. }
  4853. }, [n("div", {
  4854. directives: [{
  4855. name: "lazy",
  4856. rawName: "v-lazy:background-image",
  4857. value: e.lazyThumbnailBg(t),
  4858. expression: "lazyThumbnailBg(channel)",
  4859. arg: "background-image"
  4860. }],
  4861. staticClass: "thumbnail"
  4862. }, [n("div", {
  4863. staticClass: "channelExtraInfoWrapper"
  4864. }, [n("div", {
  4865. staticClass: "channelExtraInfo"
  4866. }, [t.isFavorite ? n("div", {
  4867. staticClass: "favStatus"
  4868. }, [e._v("\n รขหœโ€ฆ\n ")]) : e._e(), e._v(" "), n("div", {
  4869. staticClass: "num-users"
  4870. }, [n("svg", {
  4871. staticClass: "usersIconSvg",
  4872. attrs: {
  4873. xmlns: "http://www.w3.org/2000/svg",
  4874. width: "14",
  4875. height: "14",
  4876. viewBox: "0 0 14 14"
  4877. }
  4878. }, [n("path", {
  4879. attrs: {
  4880. d: "M7 8c2.2 0 4-1.8 4-4S9.2 0 7 0 3 1.8 3 4s1.8 4 4 4zm0-7c1.7 0 3 1.3 3 3S8.7 7 7 7 4 5.7 4 4s1.3-3 3-3zm0 8c-3.9 0-7 2.5-7 5h14c0-2.5-3.1-5-7-5zm-5.8 4c.7-1.5 3-3 5.8-3s5 1.5 5.8 3H1.2z"
  4881. }
  4882. })]), e._v("\n " + e._s(e.getNumUsers(t)) + "\n ")])])])]), e._v(" "), n("div", {
  4883. staticClass: "name"
  4884. }, [e._v(e._s(t.name))]), e._v(" "), n("div", {
  4885. staticClass: "system"
  4886. }, [e._v(e._s(t.system))]), e._v(" "), n("div", {
  4887. staticClass: "channelActions",
  4888. class: {
  4889. patreon: !e.channelIsAvaibleForUser(t)
  4890. }
  4891. }, [e.channelIsAvaibleForUser(t) ? e._e() : [n("div", {
  4892. staticClass: "patronExclusive"
  4893. }, [e._v("\n " + e._s(e.getReasonChannelNotAvailable(t)) + "\n ")]), e._v(" "), e.userRole < 50 ? n("div", {
  4894. staticClass: "button-generic",
  4895. attrs: {
  4896. title: ""
  4897. },
  4898. on: {
  4899. click: e.openPatreonChannel
  4900. }
  4901. }, [e._v("\n Learn more\n ")]) : e._e()], e._v(" "), e.channelIsAvaibleForUser(t) ? n("a", {
  4902. staticClass: "button-generic joinButton",
  4903. class: {
  4904. disabled: e.channelIsDisabled(t)
  4905. },
  4906. attrs: {
  4907. title: e.channelTitle(t, !0)
  4908. },
  4909. on: {
  4910. click: function(n) {
  4911. e.joinChannel(t)
  4912. }
  4913. }
  4914. }, [e._v("\n + Join\n ")]) : e._e(), e._v(" "), n("a", {
  4915. staticClass: "button-generic favButton",
  4916. on: {
  4917. click: function(n) {
  4918. e.favChannel(t)
  4919. }
  4920. }
  4921. }, [t.isFavorite ? [e._v("\n รขหœโ€  Unfav\n ")] : [e._v("\n รขหœโ€ฆ Fav\n ")]], 2)], 2)]) : e._e()
  4922. })], 2) : e._e(), e._v(" "), e.footerIsVisible() ? n("div", {
  4923. staticClass: "paginationWrapper"
  4924. }, [n("div", {
  4925. staticClass: "buttons"
  4926. }, [n("div", {
  4927. staticClass: "prevButtonWrapper"
  4928. }, [n("div", {
  4929. staticClass: "button-alt",
  4930. class: {
  4931. disabled: !e.prevButtonAvailable
  4932. },
  4933. on: {
  4934. click: function(t) {
  4935. e.gotoPageOffset(-1)
  4936. }
  4937. }
  4938. }, [e._v("\n รขโ‚ฌยน Previous page\n ")])]), e._v(" "), n("div", {
  4939. staticClass: "nextButtonWrapper"
  4940. }, [n("div", {
  4941. staticClass: "button-alt",
  4942. class: {
  4943. disabled: !e.nextButtonAvailable
  4944. },
  4945. on: {
  4946. click: function(t) {
  4947. e.gotoPageOffset(1)
  4948. }
  4949. }
  4950. }, [e._v("\n Next page รขโ‚ฌยบ\n ")])])]), e._v(" "), n("div", {
  4951. staticClass: "range"
  4952. }, [e._v("\n Showing results "), n("span", [e._v(e._s(e.pageRange))]), e._v(" of "), n("span", [e._v(e._s(e.totalChannels))])])]) : e._e(), e._v(" "), 0 === e.channels.length ? n("div", {
  4953. directives: [{
  4954. name: "show",
  4955. rawName: "v-show",
  4956. value: !e.fetchingData,
  4957. expression: "!fetchingData"
  4958. }],
  4959. staticClass: "no-results"
  4960. }, [n("div", {
  4961. staticClass: "emoji"
  4962. }, [e._v(e._s(e.noItemsInfo.emoji))]), e._v("\n " + e._s(e.noItemsInfo.text) + "\n ")]) : e._e()])
  4963. },
  4964. staticRenderFns: []
  4965. }
  4966. }, function(e, t) {
  4967. e.exports = {
  4968. render: function() {
  4969. var e = this,
  4970. t = e.$createElement,
  4971. n = e._self._c || t;
  4972. return n("div", {
  4973. staticClass: "discoverWrapper"
  4974. }, [n("div", {
  4975. staticClass: "searchResultsWrapper"
  4976. }, [n("h2", [e._v("Discover")]), e._v(" "), n("div", {
  4977. directives: [{
  4978. name: "show",
  4979. rawName: "v-show",
  4980. value: e.fetchingData,
  4981. expression: "fetchingData"
  4982. }],
  4983. staticClass: "spinner"
  4984. }), e._v(" "), e.favoriteChannels.length > 0 ? n("div", {
  4985. staticClass: "searchResultsGrid"
  4986. }, [e._l(e.favoriteChannels, function(t) {
  4987. return n("div", {
  4988. key: t.gameid,
  4989. ref: t.name,
  4990. refInFor: !0,
  4991. staticClass: "channelWrapper",
  4992. attrs: {
  4993. title: t.name
  4994. }
  4995. }, [n("div", {
  4996. directives: [{
  4997. name: "lazy",
  4998. rawName: "v-lazy:background-image",
  4999. value: e.lazyThumbnailBg(t),
  5000. expression: "lazyThumbnailBg(channel)",
  5001. arg: "background-image"
  5002. }],
  5003. staticClass: "thumbnail"
  5004. }, [n("div", {
  5005. staticClass: "channelExtraInfoWrapper"
  5006. }, [n("div", {
  5007. staticClass: "channelExtraInfo"
  5008. }, [n("div", {
  5009. staticClass: "num-users"
  5010. }, [n("svg", {
  5011. staticClass: "usersIconSvg",
  5012. attrs: {
  5013. xmlns: "http://www.w3.org/2000/svg",
  5014. width: "14",
  5015. height: "14",
  5016. viewBox: "0 0 14 14"
  5017. }
  5018. }, [n("path", {
  5019. attrs: {
  5020. d: "M7 8c2.2 0 4-1.8 4-4S9.2 0 7 0 3 1.8 3 4s1.8 4 4 4zm0-7c1.7 0 3 1.3 3 3S8.7 7 7 7 4 5.7 4 4s1.3-3 3-3zm0 8c-3.9 0-7 2.5-7 5h14c0-2.5-3.1-5-7-5zm-5.8 4c.7-1.5 3-3 5.8-3s5 1.5 5.8 3H1.2z"
  5021. }
  5022. })]), e._v("\n " + e._s(e.getNumUsers(t)) + "\n ")])])])]), e._v(" "), n("div", {
  5023. staticClass: "name"
  5024. }, [e._v(e._s(t.name))]), e._v(" "), n("div", {
  5025. staticClass: "channelActions"
  5026. }, [n("a", {
  5027. staticClass: "button-generic joinButton",
  5028. on: {
  5029. click: function(n) {
  5030. e.joinChannel(t)
  5031. }
  5032. }
  5033. }, [e._v("\n + Join\n ")])])])
  5034. })], 2) : n("div", {
  5035. directives: [{
  5036. name: "show",
  5037. rawName: "v-show",
  5038. value: !e.fetchingData,
  5039. expression: "!fetchingData"
  5040. }],
  5041. staticClass: "no-results"
  5042. }, [n("div", {
  5043. staticClass: "emoji"
  5044. }, [e._v("รขหœล“(ร‹ลกรขโ€“ยฝร‹ลก)รขหœลพ")]), e._v("\n S O O N\n ")])])])
  5045. },
  5046. staticRenderFns: []
  5047. }
  5048. }, function(e, t) {
  5049. e.exports = {
  5050. render: function() {
  5051. var e = this,
  5052. t = e.$createElement,
  5053. n = e._self._c || t;
  5054. return n("div", {
  5055. staticClass: "patreonWrapper"
  5056. }, [n("div", {
  5057. staticClass: "patreonHeader"
  5058. }, [n("div", {
  5059. staticClass: "image"
  5060. }, [n("svg", {
  5061. attrs: {
  5062. xmlns: "http://www.w3.org/2000/svg",
  5063. width: "800",
  5064. height: "122",
  5065. viewBox: "0 0 800 122"
  5066. }
  5067. }, [n("path", {
  5068. attrs: {
  5069. fill: "#fff",
  5070. d: "M785.8 114.8V7.2h7.9v107.7h-7.9v-.1zm-44-71.7h7.9v34.1h-8.2l-12.3-21.9v21.9h-7.9V43.1h8.2l12.3 22.2V43.1zm-51.7-.9c11.3 0 18 8.6 18 17.9 0 9.4-6.7 17.9-18 17.9-11.4 0-18.1-8.6-18.1-17.9 0-9.3 6.7-17.9 18.1-17.9zm10 17.9c0-5.6-3.8-10.8-10-10.8s-10 5.2-10 10.8c0 5.6 3.8 10.8 10 10.8 6.2.1 10-5.2 10-10.8zM562.5 49.9v-6.8h23.4v6.8h-7.8v27.3h-7.9V49.9h-7.7zm83.7 7.2h12.9v6.2h-12.9v7.5h12.9v6.3h-20.8v-34h20.8v6.3h-12.9v7.7zm-33.7-14c7.6 0 12.4 5.7 12.4 12.3 0 4.8-2.5 9-6.8 11l6.8 10.8h-9.2l-6-9.5H606v9.5h-7.9V43.1h14.4zm4.4 12.3c0-3.2-2.1-5.9-5.5-5.9H606v11.8h5.4c3.4 0 5.5-2.7 5.5-5.9zM547.1 73H535l-1.3 4.1h-8.4L537.5 43h7.3L557 77.2h-8.6l-1.3-4.2zM541 52.8l-4.2 14h8.3l-4.1-14zm-35.3-9.7c7.6 0 12.4 5.7 12.4 12.3s-4.9 12.3-12.4 12.3h-6.4v9.5h-7.9V43.1h14.3zm4.5 12.3c0-3.2-2.1-5.9-5.5-5.9h-5.4v11.8h5.4c3.3 0 5.5-2.7 5.5-5.9z"
  5071. }
  5072. }), e._v(" "), n("path", {
  5073. attrs: {
  5074. fill: "#fff",
  5075. d: "M421.1 38.1L400 59.3l-21.2-21.2-1.7 1.7L398.2 61l-21.1 21.2 1.7 1.7L400 62.7l21.1 21.2 1.8-1.7L401.7 61l21.2-21.2z"
  5076. }
  5077. }), e._v(" "), n("path", {
  5078. staticClass: "logoLetters",
  5079. attrs: {
  5080. d: "M244.1 81.9H231l-6.5-13.7-6.7 13.7h-13.2l19.8-41.8 19.7 41.8zM305.5 61l-5.2-9h9.5l-1.5-11.9h-29.5L290.9 61l-12.1 20.9h29.5l1.5-11.9h-9.5zM36.9 52l-1.4-11.9H6.2l6.7 11.5 2 3.5H6.2v26.8h12V67h17.9l-8.7-15zM40.6 40.1h12v41.8h-12zM121.7 40.1V55h-9V40.1h-12v41.8h12V67h9v14.9h12V40.1zM96.4 57.1H78.2l-1 8.3h7.5c-1.5 2.7-4.4 4.6-7.8 4.6-4.9 0-9-4-9-9s4-9.2 9-9.2c2.7 0 5.1 1.5 6.8 3.4l5.8-10c-2.4-2.9-6.9-4.9-11.4-5.1-11.5-.4-22 9.3-22 20.9S65.5 81.9 77 81.9 97 72.5 97 61c-.1-1.4-.3-2.7-.6-3.9zM169.4 40.1h-31V52h8.3v29.9h12V52h9.3zM197.5 66.3c-1.6 2.2-4.3 3.7-7.2 3.7-4.9 0-9-4-9-9s4-9 9-9c3 0 5.6 1.5 7.2 3.7l6.2-10.8c-3.6-3-8.3-4.9-13.4-4.9-11.6 0-20.9 9.4-20.9 20.9s9.4 20.9 20.9 20.9c5.1 0 9.8-1.8 13.4-4.9l-6.2-10.6z"
  5081. }
  5082. }), e._v(" "), n("path", {
  5083. staticClass: "logoLetters",
  5084. attrs: {
  5085. d: "M261 40.1h-14v41.8h14c11.6 0 20.9-9.4 20.9-20.9.1-11.6-9.3-20.9-20.9-20.9zm0 29.9h-2V52h2c4.9 0 9 4 9 9s-4 9-9 9z"
  5086. }
  5087. })])]), e._v(" "), n("h2", [e._v("\n Help us make a better Fightcade\n ")])]), e._v(" "), e._m(0)])
  5088. },
  5089. staticRenderFns: [function() {
  5090. var e = this,
  5091. t = e.$createElement,
  5092. n = e._self._c || t;
  5093. return n("div", {
  5094. staticClass: "patreonContentWrapper"
  5095. }, [n("div", {
  5096. staticClass: "patreonContent"
  5097. }, [n("div", {
  5098. staticClass: "patreonTexts"
  5099. }, [n("div", {
  5100. staticClass: "whyPatreon"
  5101. }, [n("h3", [e._v("\n Why Patreon?\n ")]), e._v(" "), n("p", [n("strong", [e._v("Developing Fightcade is not our daily work.")]), e._v(" We're doing it in our spare time out of our passion for retro games. It never gave us any money, it actually costs quite a bit to keep the servers up and running.\n ")]), e._v(" "), n("p", [e._v("\n Opening a Patreon means we could -hopefully- cover those expenses. If we reach a certain point in funding, we can also continue allocating time to develop some new features (we got quite a few in mind we'd love to do and are sure you'll love as well). \n ")]), e._v(" "), n("p", [n("strong", [e._v("Fightcade will continue being free to use for everyone, forever.")]), e._v(" We're just introducing extra frontend features for our patrons.\n ")])]), e._v(" "), n("div", {
  5102. staticClass: "patreonPerks"
  5103. }, [n("h3", [e._v("\n What do I get as a patron?\n ")]), e._v(" "), n("ul", [n("li", [e._v("\n Customize your UI: Switch to one of our sweet new color themes.\n ")]), e._v(" "), n("li", [e._v("\n Chat and send/receive challenges on up to 10 concurrent channels.\n ")]), e._v(" "), n("li", [e._v("\n Test new features (SNES support anyone?) before public release.\n ")]), e._v(" "), n("li", [e._v("\n See your ELO score in ranked game channels after every match.\n ")]), e._v(" "), n("li", [e._v("\n Get a exclusive role in our official Discord server to show off your support.\n ")]), e._v(" "), n("li", [e._v("\n Your username mentioned as a premium supporter on the Fightcade website.\n ")]), e._v(" "), n("li", [e._v("\n ...and more to come!\n ")])]), e._v(" "), n("p", [e._v("\n The features available to you depend on the tier you opted in. "), n("a", {
  5104. attrs: {
  5105. href: "https://www.patreon.com/Fightcade",
  5106. target: "_blank"
  5107. }
  5108. }, [e._v("More info on our Patreon page")]), e._v(".\n ")])])]), e._v(" "), n("div", {
  5109. staticClass: "becomePatron"
  5110. }, [n("h3", [e._v("\n Sounds good?\n ")]), e._v(" "), n("a", {
  5111. attrs: {
  5112. href: "https://www.patreon.com/Fightcade",
  5113. target: "_blank"
  5114. }
  5115. }, [n("div", {
  5116. staticClass: "button-generic"
  5117. }, [e._v("\n Become a patron\n ")])])])])])
  5118. }]
  5119. }
  5120. }, function(e, t) {
  5121. e.exports = {
  5122. render: function() {
  5123. var e = this,
  5124. t = e.$createElement,
  5125. n = e._self._c || t;
  5126. return n("div", {
  5127. class: e.global.activeTheme.class,
  5128. attrs: {
  5129. id: "app"
  5130. }
  5131. }, [n("div", {
  5132. staticClass: "autoLoginning",
  5133. class: {
  5134. visible: e.autoLoginning
  5135. }
  5136. }, [e._m(0), e._v(" "), n("div", {
  5137. staticClass: "loadingMessage"
  5138. }, [e._v("\n Initializing...\n ")])]), e._v(" "), "disconnected" === e.status ? n("login", {
  5139. ref: "login",
  5140. on: {
  5141. connect: e.connect
  5142. }
  5143. }) : [n("div", {
  5144. staticClass: "initializingApp",
  5145. class: {
  5146. visible: e.initializingApp
  5147. }
  5148. }, [n("div", {
  5149. staticClass: "spinnerWrapper"
  5150. }, [n("div", {
  5151. staticClass: "spinner"
  5152. })]), e._v(" "), n("div", {
  5153. staticClass: "loadingMessage"
  5154. }, [e._v("\n Loading your settings...\n ")])]), e._v(" "), n("main-toolbar", {
  5155. ref: "mainToolbar",
  5156. on: {
  5157. "channel-selected": e.selectChannel,
  5158. "show-context-menu": e.showContextMenu,
  5159. "leave-channel": e.leaveChannel,
  5160. "decline-challenge": e.declineChallenge,
  5161. "accept-challenge": e.acceptChallenge,
  5162. "goto-chat-message": e.gotoChatMessage,
  5163. "channel-item-initialized": e.channelItemInitialized,
  5164. "patreon-info": e.selectChannel
  5165. }
  5166. }), e._v(" "), n("welcome-channel", {
  5167. directives: [{
  5168. name: "show",
  5169. rawName: "v-show",
  5170. value: "welcome-channel" === e.activeChannelId,
  5171. expression: "activeChannelId === 'welcome-channel'"
  5172. }],
  5173. ref: "welcome-channel",
  5174. on: {
  5175. "channel-selected": e.selectChannel,
  5176. initialized: e.onWelcomeChannelInitialized
  5177. }
  5178. }), e._v(" "), e._l(e.channels, function(t) {
  5179. return [e.global.isGameChannel(t.id) ? n("channel", {
  5180. directives: [{
  5181. name: "show",
  5182. rawName: "v-show",
  5183. value: t.id === e.activeChannelId,
  5184. expression: "channel.id === activeChannelId"
  5185. }],
  5186. key: t.id,
  5187. ref: t.id,
  5188. refInFor: !0,
  5189. attrs: {
  5190. data: t
  5191. },
  5192. on: {
  5193. "show-context-menu": e.showContextMenu,
  5194. "show-user-info": e.showUserInfo,
  5195. "new-notification": e.onNewNotification,
  5196. "goto-channel-by-gameid": e.gotoChannelByGameId,
  5197. "goto-chat-message": e.gotoChatMessage,
  5198. "decline-challenge": e.declineChallenge,
  5199. "accept-challenge": e.acceptChallenge,
  5200. "show-emojis-view": e.showEmojisView,
  5201. "leave-channel": e.leaveChannel,
  5202. "on-user-ignored": e.onUserIgnored
  5203. }
  5204. }) : e._e()]
  5205. }), e._v(" "), n("add-channel", {
  5206. directives: [{
  5207. name: "show",
  5208. rawName: "v-show",
  5209. value: "add-channel" === e.activeChannelId,
  5210. expression: "activeChannelId === 'add-channel'"
  5211. }],
  5212. ref: "add-channel",
  5213. on: {
  5214. "join-channel": e.joinChannel,
  5215. "patreon-info": e.selectChannel
  5216. }
  5217. }), e._v(" "), n("patreon-channel", {
  5218. directives: [{
  5219. name: "show",
  5220. rawName: "v-show",
  5221. value: "patreon-channel" === e.activeChannelId,
  5222. expression: "activeChannelId === 'patreon-channel'"
  5223. }],
  5224. ref: "patreon-channel"
  5225. }), e._v(" "), null !== e.contextMenuData ? n("context-menu", {
  5226. ref: "contextMenu",
  5227. attrs: {
  5228. data: e.contextMenuData
  5229. },
  5230. on: {
  5231. close: e.closeContextMenu
  5232. }
  5233. }) : e._e(), e._v(" "), null !== e.userInfoData ? n("user-info", {
  5234. ref: "userInfo",
  5235. attrs: {
  5236. user: e.userInfoData
  5237. },
  5238. on: {
  5239. close: e.closeUserInfoView
  5240. }
  5241. }) : e._e()]], 2)
  5242. },
  5243. staticRenderFns: [function() {
  5244. var e = this,
  5245. t = e.$createElement,
  5246. n = e._self._c || t;
  5247. return n("div", {
  5248. staticClass: "spinnerWrapper"
  5249. }, [n("div", {
  5250. staticClass: "spinner"
  5251. })])
  5252. }]
  5253. }
  5254. }, function(e, t) {
  5255. e.exports = {
  5256. render: function() {
  5257. var e = this,
  5258. t = e.$createElement,
  5259. n = e._self._c || t;
  5260. return n("div", {
  5261. staticClass: "mainToolbarWrapper"
  5262. }, [n("div", {
  5263. staticClass: "mainToolbar"
  5264. }, [n("div", {
  5265. directives: [{
  5266. name: "show",
  5267. rawName: "v-show",
  5268. value: e.showGlobalStateMenu,
  5269. expression: "showGlobalStateMenu"
  5270. }],
  5271. staticClass: "notificationsMaskBg",
  5272. on: {
  5273. click: function(t) {
  5274. t.stopPropagation(), e.showGlobalStateMenu = !1
  5275. }
  5276. }
  5277. }), e._v(" "), n("div", {
  5278. staticClass: "logo"
  5279. }, [n("svg", {
  5280. attrs: {
  5281. xmlns: "http://www.w3.org/2000/svg",
  5282. width: "320",
  5283. height: "320",
  5284. viewBox: "0 0 320 320"
  5285. },
  5286. on: {
  5287. click: e.selectChannel
  5288. }
  5289. }, [n("g", {
  5290. attrs: {
  5291. opacity: ".5",
  5292. fill: "#FFF"
  5293. }
  5294. }, [n("path", {
  5295. attrs: {
  5296. d: "M114.3 107.5L90.4 83.6l-6.8 6.8 23.9 23.9c2.1-2.4 4.4-4.6 6.8-6.8zM90.4 160c0-1.6.1-3.2.2-4.8H56.8v9.6h33.8c-.1-1.6-.2-3.2-.2-4.8zM160 90.4c1.6 0 3.2.1 4.8.2V56.8h-9.6v33.8c1.6-.1 3.2-.2 4.8-.2zM212.5 114.3l23.9-23.9-6.8-6.8-23.9 23.9c2.4 2.1 4.7 4.4 6.8 6.8zM205.7 212.5l23.9 23.9 6.8-6.8-23.9-23.9c-2.1 2.4-4.4 4.7-6.8 6.8zM229.4 155.2c.1 1.6.2 3.2.2 4.8s-.1 3.2-.2 4.8h33.8v-9.6h-33.8zM160 229.6c-1.6 0-3.2-.1-4.8-.2v33.8h9.6v-33.8c-1.6.1-3.2.2-4.8.2zM107.5 205.7l-23.9 23.9 6.8 6.8 23.9-23.9c-2.4-2.2-4.7-4.4-6.8-6.8z"
  5297. }
  5298. })]), e._v(" "), n("path", {
  5299. staticClass: "logoCircle",
  5300. attrs: {
  5301. d: "M160 90.4c-38.4 0-69.6 31.1-69.6 69.6s31.1 69.6 69.6 69.6 69.6-31.1 69.6-69.6-31.2-69.6-69.6-69.6zm0 105.2c-19.6 0-35.6-15.9-35.6-35.6s15.9-35.6 35.6-35.6 35.6 15.9 35.6 35.6-16 35.6-35.6 35.6z"
  5302. }
  5303. }), e._v(" "), n("g", {
  5304. attrs: {
  5305. fill: "#FFF"
  5306. }
  5307. }, [n("path", {
  5308. attrs: {
  5309. d: "M80.8 56.5v24.3H56.5V56.5h24.3m9.6-9.6H46.9v43.6h43.6V46.9h-.1zM80.8 239.2v24.3H56.5v-24.3h24.3m9.6-9.6H46.9v43.6h43.6v-43.6h-.1zM263.5 56.5v24.3h-24.3V56.5h24.3m9.6-9.6h-43.6v43.6h43.6V46.9zM263.5 239.2v24.3h-24.3v-24.3h24.3m9.6-9.6h-43.6v43.6h43.6v-43.6zM160 13.6l17.2 17.2L160 48l-17.2-17.2L160 13.6M160 0l-30.8 30.8L160 61.6l30.8-30.8L160 0zM30.8 142.8L48 160l-17.2 17.2L13.6 160l17.2-17.2m0-13.6L0 160l30.8 30.8L61.6 160l-30.8-30.8zM289.2 142.8l17.2 17.2-17.2 17.2L272 160l17.2-17.2m0-13.6L258.4 160l30.8 30.8L320 160l-30.8-30.8zM160 272l17.2 17.2-17.2 17.2-17.2-17.2L160 272m0-13.6l-30.8 30.8L160 320l30.8-30.8-30.8-30.8z"
  5310. }
  5311. })])])]), e._v(" "), n("div", {
  5312. staticClass: "channelsList"
  5313. }, [e._l(e.channels, function(t) {
  5314. return [e.global.isGameChannel(t.id) ? n("channel-item", {
  5315. key: t.id,
  5316. attrs: {
  5317. data: t
  5318. },
  5319. on: {
  5320. select: e.onChannelSelect,
  5321. "leave-channel": e.leaveChannel,
  5322. "show-context-menu": e.showChannelContextMenu,
  5323. "channel-item-initialized": e.channelItemInitialized
  5324. }
  5325. }) : "add-channel" === t.id ? n("add-channel-item", {
  5326. attrs: {
  5327. data: t
  5328. },
  5329. on: {
  5330. select: e.onChannelSelect,
  5331. "channel-item-initialized": e.channelItemInitialized
  5332. }
  5333. }) : e._e()]
  5334. })], 2), e._v(" "), n("div", {
  5335. staticClass: "buttonBar"
  5336. }, [n("a", {
  5337. staticClass: "notificationsButton",
  5338. class: {
  5339. active: e.showNotifications
  5340. },
  5341. on: {
  5342. click: function(t) {
  5343. t.stopPropagation(), e.showNotifications = !e.showNotifications, e.showSettings = !1, e.showNotificationsIndicator = !1
  5344. }
  5345. }
  5346. }, [n("svg", {
  5347. staticClass: "notificationsIconSvg",
  5348. attrs: {
  5349. xmlns: "http://www.w3.org/2000/svg",
  5350. width: "30",
  5351. height: "30",
  5352. viewBox: "0 0 30 30"
  5353. }
  5354. }, [n("path", {
  5355. attrs: {
  5356. d: "M30 23h-3v-6c0-5.3-3.5-9.9-8.3-11.4.2-.5.3-1 .3-1.6 0-2.2-1.8-4-4-4s-4 1.8-4 4c0 .6.1 1.1.3 1.6C6.5 7.1 3 11.7 3 17v6H0v2h9.1c.5 2.8 2.9 5 5.9 5s5.4-2.2 5.9-5H30v-2zM15 2c1.1 0 2 .9 2 2 0 .4-.1.8-.3 1.1-.6 0-1.1-.1-1.7-.1-.6 0-1.1.1-1.7.1-.2-.3-.3-.7-.3-1.1 0-1.1.9-2 2-2zM5 17C5 11.5 9.5 7 15 7s10 4.5 10 10v6H5v-6zm10 11c-1.9 0-3.4-1.3-3.9-3h7.7c-.4 1.7-1.9 3-3.8 3z"
  5357. }
  5358. })]), e._v(" "), n("div", {
  5359. directives: [{
  5360. name: "show",
  5361. rawName: "v-show",
  5362. value: e.showNotificationsIndicator,
  5363. expression: "showNotificationsIndicator"
  5364. }],
  5365. staticClass: "notificationsIndicator"
  5366. })]), e._v(" "), n("a", {
  5367. staticClass: "settingsButton",
  5368. class: {
  5369. active: e.showSettings
  5370. },
  5371. on: {
  5372. click: function(t) {
  5373. t.stopPropagation(), e.showSettings = !e.showSettings, e.showNotifications = !1
  5374. }
  5375. }
  5376. }, [n("svg", {
  5377. staticClass: "settingsIconSvg",
  5378. attrs: {
  5379. xmlns: "http://www.w3.org/2000/svg",
  5380. width: "30",
  5381. height: "30",
  5382. viewBox: "0 0 30 30"
  5383. }
  5384. }, [n("path", {
  5385. attrs: {
  5386. d: "M16.2 2l.6 2.6.2 1 1 .4c.4.1.7.3 1.1.4l1 .5.9-.6L23.3 5 25 6.7l-1.4 2.2-.6.9.5 1c.2.3.3.7.4 1.1l.4 1 1.1.2 2.6.6v2.4l-2.6.6-1 .3-.4 1c-.1.4-.3.7-.4 1.1l-.5 1 .6.9 1.4 2.2-1.8 1.8-2.2-1.4-.9-.6-1 .5c-.3.2-.7.3-1.1.4l-1 .4-.2 1.1-.7 2.6h-2.4l-.6-2.6-.2-1-1-.4c-.4-.1-.7-.3-1.1-.4l-1-.5-.9.6L6.7 25 5 23.3l1.4-2.2.6-.9-.5-1c-.2-.3-.3-.7-.4-1.1l-.4-1-1.1-.2-2.6-.7v-2.4l2.6-.6 1-.2.4-1c.1-.4.3-.7.4-1.1l.5-1-.5-1L5 6.7 6.7 5l2.2 1.4.9.6 1-.5c.3-.2.7-.3 1.1-.4l1-.4.2-1.1.7-2.6h2.4m1.6-2h-5.6l-.9 4.1c-.5.2-.9.3-1.3.5L6.4 2.4l-4 4L4.6 10c-.2.4-.4.9-.5 1.3l-4.1.9v5.6l4.1.9c.2.5.3.9.5 1.3l-2.2 3.6 3.9 3.9 3.6-2.2c.4.2.9.4 1.3.5l.9 4.1h5.6l.9-4.1c.5-.2.9-.3 1.3-.5l3.6 2.2 3.9-3.9-2.2-3.6c.2-.4.4-.9.5-1.3l4.1-.9v-5.6l-4.1-.9c-.2-.5-.3-.9-.5-1.3l2.2-3.6-3.9-3.9-3.6 2.2c-.4-.2-.9-.4-1.3-.5L17.8 0z"
  5387. }
  5388. }), e._v(" "), n("path", {
  5389. attrs: {
  5390. d: "M15 11c2.2 0 4 1.8 4 4s-1.8 4-4 4-4-1.8-4-4 1.8-4 4-4m0-2c-3.3 0-6 2.7-6 6s2.7 6 6 6 6-2.7 6-6-2.7-6-6-6z"
  5391. }
  5392. })])]), e._v(" "), n("a", {
  5393. ref: "user",
  5394. staticClass: "userButton"
  5395. }, [n("div", {
  5396. staticClass: "userAvatarWrapper",
  5397. on: {
  5398. click: function(t) {
  5399. t.stopPropagation(), e.showGlobalStateMenu = !e.showGlobalStateMenu
  5400. }
  5401. }
  5402. }, [n("img", {
  5403. staticClass: "userAvatar",
  5404. attrs: {
  5405. src: e.avatarSrc
  5406. }
  5407. }), e._v(" "), n("div", {
  5408. staticClass: "userState",
  5409. class: {
  5410. away: e.localUser.away, playing: e.localUser.playing
  5411. }
  5412. })]), e._v(" "), n("div", {
  5413. staticClass: "userStateMenu",
  5414. class: {
  5415. active: e.showGlobalStateMenu
  5416. },
  5417. on: {
  5418. click: function(e) {
  5419. e.stopPropagation()
  5420. }
  5421. }
  5422. }, [n("div", {
  5423. staticClass: "optionWrapper",
  5424. class: {
  5425. active: !e.localUser.away
  5426. },
  5427. on: {
  5428. click: function(t) {
  5429. e.setAwayState(!1)
  5430. }
  5431. }
  5432. }, [n("div", {
  5433. staticClass: "stateShape online"
  5434. }), e._v(" "), n("div", {
  5435. staticClass: "stateName"
  5436. }, [e._v("Online")])]), e._v(" "), n("div", {
  5437. staticClass: "optionWrapper",
  5438. class: {
  5439. active: e.localUser.away
  5440. },
  5441. on: {
  5442. click: function(t) {
  5443. e.setAwayState(!0)
  5444. }
  5445. }
  5446. }, [n("div", {
  5447. staticClass: "stateShape away"
  5448. }), e._v(" "), n("div", {
  5449. staticClass: "stateName"
  5450. }, [e._v("Away")])]), e._v(" "), n("div", {
  5451. staticClass: "logOutWrapper"
  5452. }, [n("div", {
  5453. staticClass: "logOut",
  5454. on: {
  5455. click: function(t) {
  5456. e.logOut()
  5457. }
  5458. }
  5459. }, [e._v("\n Log out\n ")])])])])])]), e._v(" "), n("settings", {
  5460. class: {
  5461. active: e.showSettings
  5462. },
  5463. on: {
  5464. close: function(t) {
  5465. e.showSettings = !1
  5466. },
  5467. "patreon-info": e.openPatreonChannel
  5468. }
  5469. }), e._v(" "), n("notifications", {
  5470. ref: "notifications",
  5471. class: {
  5472. active: e.showNotifications
  5473. },
  5474. on: {
  5475. close: function(t) {
  5476. e.showNotifications = !1
  5477. },
  5478. "decline-challenge": e.declineChallenge,
  5479. "accept-challenge": e.acceptChallenge,
  5480. "goto-chat-message": e.gotoChatMessage
  5481. }
  5482. })], 1)
  5483. },
  5484. staticRenderFns: []
  5485. }
  5486. }, function(e, t) {
  5487. e.exports = {
  5488. render: function() {
  5489. var e = this,
  5490. t = e.$createElement,
  5491. n = e._self._c || t;
  5492. return n("div", {
  5493. staticClass: "searchChannel"
  5494. }, [n("header", [n("h2", [e._v("Search game channel")]), e._v(" "), n("div", {
  5495. staticClass: "inputWrapper"
  5496. }, [n("input", {
  5497. directives: [{
  5498. name: "model",
  5499. rawName: "v-model",
  5500. value: e.textFilter,
  5501. expression: "textFilter"
  5502. }],
  5503. ref: "textFilter",
  5504. staticClass: "text-filter",
  5505. attrs: {
  5506. type: "text",
  5507. placeholder: "Search +7000 games by name",
  5508. autocorrect: "off",
  5509. spellcheck: "false"
  5510. },
  5511. domProps: {
  5512. value: e.textFilter
  5513. },
  5514. on: {
  5515. input: function(t) {
  5516. t.target.composing || (e.textFilter = t.target.value)
  5517. }
  5518. }
  5519. }), e._v(" "), n("div", {
  5520. staticClass: "filtersButton",
  5521. class: {
  5522. active: e.openedFilters
  5523. },
  5524. on: {
  5525. click: e.toggleFilters
  5526. }
  5527. }, [n("svg", {
  5528. staticClass: "filtersButtonIcon",
  5529. attrs: {
  5530. xmlns: "http://www.w3.org/2000/svg",
  5531. width: "40",
  5532. height: "40",
  5533. viewBox: "0 0 40 40"
  5534. }
  5535. }, [n("path", {
  5536. attrs: {
  5537. d: "M9 0h2v10H9zM9 21h2v19H9zM19 0h2v21h-2zM19 32h2v8h-2zM29 0h2v14h-2zM29 25h2v15h-2z"
  5538. }
  5539. }), e._v(" "), n("path", {
  5540. attrs: {
  5541. d: "M11 11v9H9v-9h2m2-2H7v13h6V9zM21 22v9h-2v-9h2m2-2h-6v13h6V20zM31 15v9h-2v-9h2m2-2h-6v13h6V13z"
  5542. }
  5543. })])])]), e._v(" "), n("div", {
  5544. staticClass: "filtersWrapper",
  5545. class: {
  5546. active: e.openedFilters
  5547. }
  5548. }, [n("div", {
  5549. staticClass: "filtersList"
  5550. }, [n("div", {
  5551. staticClass: "filterItem genre"
  5552. }, [n("div", {
  5553. staticClass: "title"
  5554. }, [e._v("Genre")]), e._v(" "), n("select", {
  5555. directives: [{
  5556. name: "model",
  5557. rawName: "v-model",
  5558. value: e.genreFilter,
  5559. expression: "genreFilter"
  5560. }],
  5561. staticClass: "selectValue",
  5562. on: {
  5563. change: [function(t) {
  5564. var n = Array.prototype.filter.call(t.target.options, function(e) {
  5565. return e.selected
  5566. }).map(function(e) {
  5567. return "_value" in e ? e._value : e.value
  5568. });
  5569. e.genreFilter = t.target.multiple ? n : n[0]
  5570. }, function(t) {
  5571. e.requestChannels(0)
  5572. }]
  5573. }
  5574. }, e._l(e.genres, function(t, a) {
  5575. return n("option", {
  5576. domProps: {
  5577. value: a
  5578. }
  5579. }, [e._v("\n " + e._s(t) + "\n ")])
  5580. }))]), e._v(" "), n("div", {
  5581. staticClass: "filterItem year"
  5582. }, [n("div", {
  5583. staticClass: "title"
  5584. }, [e._v("Release year")]), e._v(" "), n("select", {
  5585. directives: [{
  5586. name: "model",
  5587. rawName: "v-model",
  5588. value: e.yearFilter,
  5589. expression: "yearFilter"
  5590. }],
  5591. staticClass: "selectValue",
  5592. on: {
  5593. change: [function(t) {
  5594. var n = Array.prototype.filter.call(t.target.options, function(e) {
  5595. return e.selected
  5596. }).map(function(e) {
  5597. return "_value" in e ? e._value : e.value
  5598. });
  5599. e.yearFilter = t.target.multiple ? n : n[0]
  5600. }, function(t) {
  5601. e.requestChannels(0)
  5602. }]
  5603. }
  5604. }, e._l(e.years, function(t, a) {
  5605. return n("option", {
  5606. domProps: {
  5607. value: a
  5608. }
  5609. }, [e._v("\n " + e._s(t) + "\n ")])
  5610. }))]), e._v(" "), n("div", {
  5611. staticClass: "filterItem system"
  5612. }, [n("div", {
  5613. staticClass: "title"
  5614. }, [e._v("System")]), e._v(" "), n("select", {
  5615. directives: [{
  5616. name: "model",
  5617. rawName: "v-model",
  5618. value: e.systemFilter,
  5619. expression: "systemFilter"
  5620. }],
  5621. staticClass: "selectValue",
  5622. on: {
  5623. change: [function(t) {
  5624. var n = Array.prototype.filter.call(t.target.options, function(e) {
  5625. return e.selected
  5626. }).map(function(e) {
  5627. return "_value" in e ? e._value : e.value
  5628. });
  5629. e.systemFilter = t.target.multiple ? n : n[0]
  5630. }, function(t) {
  5631. e.requestChannels(0)
  5632. }]
  5633. }
  5634. }, e._l(e.systems, function(t, a) {
  5635. return n("option", {
  5636. domProps: {
  5637. value: a
  5638. }
  5639. }, [e._v("\n " + e._s(t) + "\n ")])
  5640. }))]), e._v(" "), n("div", {
  5641. staticClass: "filterItem ranked"
  5642. }, [n("div", {
  5643. staticClass: "title"
  5644. }, [e._v("Ranked")]), e._v(" "), n("select", {
  5645. directives: [{
  5646. name: "model",
  5647. rawName: "v-model",
  5648. value: e.rankedFilter,
  5649. expression: "rankedFilter"
  5650. }],
  5651. staticClass: "selectValue",
  5652. on: {
  5653. change: [function(t) {
  5654. var n = Array.prototype.filter.call(t.target.options, function(e) {
  5655. return e.selected
  5656. }).map(function(e) {
  5657. return "_value" in e ? e._value : e.value
  5658. });
  5659. e.rankedFilter = t.target.multiple ? n : n[0]
  5660. }, function(t) {
  5661. e.requestChannels(0)
  5662. }]
  5663. }
  5664. }, e._l(e.rankedOptions, function(t, a) {
  5665. return n("option", {
  5666. domProps: {
  5667. value: a
  5668. }
  5669. }, [e._v("\n " + e._s(t) + "\n ")])
  5670. }))])]), e._v(" "), n("div", {
  5671. staticClass: "button-alt",
  5672. on: {
  5673. click: e.clearFilters
  5674. }
  5675. }, [e._v("\n Clear filters\n ")])])]), e._v(" "), n("paginated-list", {
  5676. ref: "paginatedList",
  5677. attrs: {
  5678. noItemsInfo: e.noItemsInfo
  5679. },
  5680. on: {
  5681. "join-channel": e.joinChannel,
  5682. "fav-channel": e.favChannel,
  5683. "goto-page-offset": e.gotoPageOffset,
  5684. "patreon-info": e.openPatreonChannel
  5685. }
  5686. })], 1)
  5687. },
  5688. staticRenderFns: []
  5689. }
  5690. }, function(e, t) {
  5691. e.exports = {
  5692. render: function() {
  5693. var e = this,
  5694. t = e.$createElement;
  5695. return (e._self._c || t)("div")
  5696. },
  5697. staticRenderFns: []
  5698. }
  5699. }, function(e, t) {
  5700. e.exports = {
  5701. render: function() {
  5702. var e = this,
  5703. t = e.$createElement,
  5704. n = e._self._c || t;
  5705. return n("div", {
  5706. staticClass: "eloMessageWrapper"
  5707. }, [n("h3", [e._v("\n You just finished a ranked match\n ")]), e._v(" "), n("div", {
  5708. staticClass: "currentScoreWrapper"
  5709. }, [e._v("\n Your new elo score is "), n("span", {
  5710. staticClass: "current-score"
  5711. }, [e._v(e._s(e.data.elo.final))]), e._v(".\n ")]), e._v(" "), n("div", {
  5712. staticClass: "prevScoreWrapper"
  5713. }, [e._v("\n Previous score: "), n("span", {
  5714. staticClass: "previous-score"
  5715. }, [e._v(e._s(e.data.elo.initial))]), e._v(".\n ")]), e._v(" "), e.outcomeMsg ? n("div", {
  5716. staticClass: "wrapUpWrapper",
  5717. class: e.outcomeMsg
  5718. }, [e._v("\n You " + e._s(e.outcomeMsg) + " " + e._s(Math.abs(e.data.elo.final - e.data.elo.initial)) + " points.\n ")]) : n("div", {
  5719. staticClass: "wrapUpWrapper same"
  5720. }, [e._v("\n You didn't win or lose any points.\n ")])])
  5721. },
  5722. staticRenderFns: []
  5723. }
  5724. }, function(e, t) {
  5725. e.exports = {
  5726. render: function() {
  5727. var e = this,
  5728. t = e.$createElement,
  5729. n = e._self._c || t;
  5730. return n("div", {
  5731. staticClass: "welcomeWrapper"
  5732. }, [n("div", {
  5733. staticClass: "welcomeHeader"
  5734. }, [n("div", {
  5735. staticClass: "welcomeImage"
  5736. }, [n("div", {
  5737. staticClass: "welcomeTitle"
  5738. }, [e._v("\n Welcome to\n ")]), e._v(" "), n("div", {
  5739. staticClass: "fightcadeLogo"
  5740. }, [n("svg", {
  5741. attrs: {
  5742. xmlns: "http://www.w3.org/2000/svg",
  5743. width: "850",
  5744. height: "118",
  5745. viewBox: "0 0 850 118"
  5746. }
  5747. }, [n("path", {
  5748. staticClass: "logoLetters",
  5749. attrs: {
  5750. d: "M201.6 47.6l-2.9 23.3h20.9c-4.3 7.7-12.4 12.9-21.8 12.9-13.8 0-25.1-11.3-25.1-25.1s11.3-25.9 25.1-25.9c7.6 0 14.3 4.3 19 9.6l16.2-28C226.2 6.3 213.7.6 201 .2c-32.3-1.1-61.7 26.2-61.7 58.5s26.2 58.6 58.6 58.6c32.4 0 56-26.2 56-58.6 0-3.8-.4-7.5-1.1-11.1h-51.2zm121.8-5.7h-25.3V0h-33.5v117.2h33.5V75.3h25.3v41.9h33.5V0h-33.5v41.9zM81.9 0H0l18.7 32.4 5.5 9.6H0v75.2h33.5V75.5h50.1l-24.2-42H86L81.9 0zm14.4 117.2h33.5V0H96.3v117.2zm459.4 0h36.8l18.8-38.4 18.1 38.4h36.8L611.3 0l-55.6 117.2zM370.1 0v33.5h23.4v83.7H427V33.5h26L457 0h-86.9zm343.4 0h-39.1v117.2h39.1c32.4 0 58.6-26.2 58.6-58.6 0-32.3-26.2-58.6-58.6-58.6zm0 83.8h-5.7V33.5h5.7c13.9 0 25.1 11.3 25.1 25.1s-11.2 25.2-25.1 25.2zM838 58.6l-14.5-25.1H850L845.9 0h-82.7L797 58.6l-33.8 58.6h82.7l4.1-33.5h-26.5L838 58.6zM515.4 33.5c8.3 0 15.6 4.1 20.2 10.3L553 13.7C542.8 5.2 529.7 0 515.4 0c-32.4 0-58.6 26.2-58.6 58.6s26.2 58.6 58.6 58.6c14.3 0 27.4-5.2 37.6-13.7l-17.4-30.1c-4.6 6.2-11.9 10.3-20.2 10.3-13.9 0-25.1-11.3-25.1-25.1s11.3-25.1 25.1-25.1z"
  5751. }
  5752. })])])]), e._v(" "), e._m(0), e._v(" "), e._m(1), e._v(" "), n("div", {
  5753. staticClass: "welcomeHeaderBgOverlay"
  5754. })]), e._v(" "), n("div", {
  5755. staticClass: "welcomeContentWrapper"
  5756. }, [n("div", {
  5757. staticClass: "welcomeContent"
  5758. }, [n("div", {
  5759. staticClass: "patreonInfo"
  5760. }, [n("div", {
  5761. staticClass: "image"
  5762. }, [n("svg", {
  5763. attrs: {
  5764. xmlns: "http://www.w3.org/2000/svg",
  5765. width: "800",
  5766. height: "122",
  5767. viewBox: "0 0 800 122"
  5768. }
  5769. }, [n("path", {
  5770. attrs: {
  5771. fill: "#fff",
  5772. d: "M785.8 114.8V7.2h7.9v107.7h-7.9v-.1zm-44-71.7h7.9v34.1h-8.2l-12.3-21.9v21.9h-7.9V43.1h8.2l12.3 22.2V43.1zm-51.7-.9c11.3 0 18 8.6 18 17.9 0 9.4-6.7 17.9-18 17.9-11.4 0-18.1-8.6-18.1-17.9 0-9.3 6.7-17.9 18.1-17.9zm10 17.9c0-5.6-3.8-10.8-10-10.8s-10 5.2-10 10.8c0 5.6 3.8 10.8 10 10.8 6.2.1 10-5.2 10-10.8zM562.5 49.9v-6.8h23.4v6.8h-7.8v27.3h-7.9V49.9h-7.7zm83.7 7.2h12.9v6.2h-12.9v7.5h12.9v6.3h-20.8v-34h20.8v6.3h-12.9v7.7zm-33.7-14c7.6 0 12.4 5.7 12.4 12.3 0 4.8-2.5 9-6.8 11l6.8 10.8h-9.2l-6-9.5H606v9.5h-7.9V43.1h14.4zm4.4 12.3c0-3.2-2.1-5.9-5.5-5.9H606v11.8h5.4c3.4 0 5.5-2.7 5.5-5.9zM547.1 73H535l-1.3 4.1h-8.4L537.5 43h7.3L557 77.2h-8.6l-1.3-4.2zM541 52.8l-4.2 14h8.3l-4.1-14zm-35.3-9.7c7.6 0 12.4 5.7 12.4 12.3s-4.9 12.3-12.4 12.3h-6.4v9.5h-7.9V43.1h14.3zm4.5 12.3c0-3.2-2.1-5.9-5.5-5.9h-5.4v11.8h5.4c3.3 0 5.5-2.7 5.5-5.9z"
  5773. }
  5774. }), e._v(" "), n("path", {
  5775. attrs: {
  5776. fill: "#fff",
  5777. d: "M421.1 38.1L400 59.3l-21.2-21.2-1.7 1.7L398.2 61l-21.1 21.2 1.7 1.7L400 62.7l21.1 21.2 1.8-1.7L401.7 61l21.2-21.2z"
  5778. }
  5779. }), e._v(" "), n("path", {
  5780. staticClass: "logoLetters",
  5781. attrs: {
  5782. d: "M244.1 81.9H231l-6.5-13.7-6.7 13.7h-13.2l19.8-41.8 19.7 41.8zM305.5 61l-5.2-9h9.5l-1.5-11.9h-29.5L290.9 61l-12.1 20.9h29.5l1.5-11.9h-9.5zM36.9 52l-1.4-11.9H6.2l6.7 11.5 2 3.5H6.2v26.8h12V67h17.9l-8.7-15zM40.6 40.1h12v41.8h-12zM121.7 40.1V55h-9V40.1h-12v41.8h12V67h9v14.9h12V40.1zM96.4 57.1H78.2l-1 8.3h7.5c-1.5 2.7-4.4 4.6-7.8 4.6-4.9 0-9-4-9-9s4-9.2 9-9.2c2.7 0 5.1 1.5 6.8 3.4l5.8-10c-2.4-2.9-6.9-4.9-11.4-5.1-11.5-.4-22 9.3-22 20.9S65.5 81.9 77 81.9 97 72.5 97 61c-.1-1.4-.3-2.7-.6-3.9zM169.4 40.1h-31V52h8.3v29.9h12V52h9.3zM197.5 66.3c-1.6 2.2-4.3 3.7-7.2 3.7-4.9 0-9-4-9-9s4-9 9-9c3 0 5.6 1.5 7.2 3.7l6.2-10.8c-3.6-3-8.3-4.9-13.4-4.9-11.6 0-20.9 9.4-20.9 20.9s9.4 20.9 20.9 20.9c5.1 0 9.8-1.8 13.4-4.9l-6.2-10.6z"
  5783. }
  5784. }), e._v(" "), n("path", {
  5785. staticClass: "logoLetters",
  5786. attrs: {
  5787. d: "M261 40.1h-14v41.8h14c11.6 0 20.9-9.4 20.9-20.9.1-11.6-9.3-20.9-20.9-20.9zm0 29.9h-2V52h2c4.9 0 9 4 9 9s-4 9-9 9z"
  5788. }
  5789. })])]), e._v(" "), n("h3", [e._v("\n Help us make a better Fightcade\n ")]), e._v(" "), n("div", {
  5790. staticClass: "buttons"
  5791. }, [n("div", {
  5792. staticClass: "button-generic learn-more",
  5793. on: {
  5794. click: e.openPatreonChannel
  5795. }
  5796. }, [e._v("\n Learn more\n ")]), e._v(" "), e._m(2)])]), e._v(" "), n("div", {
  5797. staticClass: "welcomeFooterWrapper"
  5798. }, [n("div", {
  5799. staticClass: "footerColumn social"
  5800. }, [n("div", {
  5801. staticClass: "community"
  5802. }, [n("h2", [e._v("Join our community")]), e._v(" "), n("a", {
  5803. attrs: {
  5804. target: "_blank",
  5805. href: "https://discord.gg/EyERRSg"
  5806. }
  5807. }, [n("svg", {
  5808. staticClass: "discordIcon",
  5809. attrs: {
  5810. xmlns: "http://www.w3.org/2000/svg",
  5811. viewBox: "0 0 800 272.1"
  5812. }
  5813. }, [n("path", {
  5814. attrs: {
  5815. d: "M142.8 120.1c-5.7 0-10.2 4.9-10.2 11s4.6 11 10.2 11c5.7 0 10.2-4.9 10.2-11s-4.6-11-10.2-11zm-36.5 0c-5.7 0-10.2 4.9-10.2 11s4.6 11 10.2 11c5.7 0 10.2-4.9 10.2-11 .1-6.1-4.5-11-10.2-11z"
  5816. }
  5817. }), e._v(" "), n("path", {
  5818. attrs: {
  5819. d: "M191.4 36.9h-134c-11.3 0-20.5 9.2-20.5 20.5v134c0 11.3 9.2 20.5 20.5 20.5h113.4l-5.3-18.3 12.8 11.8 12.1 11.1 21.6 18.7V57.4c-.1-11.3-9.3-20.5-20.6-20.5zm-38.6 129.5s-3.6-4.3-6.6-8c13.1-3.7 18.1-11.8 18.1-11.8-4.1 2.7-8 4.6-11.5 5.9-5 2.1-9.8 3.4-14.5 4.3-9.6 1.8-18.4 1.3-25.9-.1-5.7-1.1-10.6-2.6-14.7-4.3-2.3-.9-4.8-2-7.3-3.4-.3-.2-.6-.3-.9-.5-.2-.1-.3-.2-.4-.2-1.8-1-2.8-1.7-2.8-1.7s4.8 7.9 17.5 11.7c-3 3.8-6.7 8.2-6.7 8.2-22.1-.7-30.5-15.1-30.5-15.1 0-31.9 14.4-57.8 14.4-57.8 14.4-10.7 28-10.4 28-10.4l1 1.2c-18 5.1-26.2 13-26.2 13s2.2-1.2 5.9-2.8c10.7-4.7 19.2-5.9 22.7-6.3.6-.1 1.1-.2 1.7-.2 6.1-.8 13-1 20.2-.2 9.5 1.1 19.7 3.9 30.1 9.5 0 0-7.9-7.5-24.9-12.6l1.4-1.6s13.7-.3 28 10.4c0 0 14.4 25.9 14.4 57.8 0-.1-8.4 14.3-30.5 15zm151-86.7h-33.2V117l22.1 19.9v-36.2h11.8c7.5 0 11.2 3.6 11.2 9.4v27.7c0 5.8-3.5 9.7-11.2 9.7h-34v21.1h33.2c17.8.1 34.5-8.8 34.5-29.2v-29.8c.1-20.8-16.6-29.9-34.4-29.9zm174 59.7v-30.6c0-11 19.8-13.5 25.8-2.5l18.3-7.4c-7.2-15.8-20.3-20.4-31.2-20.4-17.8 0-35.4 10.3-35.4 30.3v30.6c0 20.2 17.6 30.3 35 30.3 11.2 0 24.6-5.5 32-19.9l-19.6-9c-4.8 12.3-24.9 9.3-24.9-1.4zM417.3 113c-6.9-1.5-11.5-4-11.8-8.3.4-10.3 16.3-10.7 25.6-.8l14.7-11.3c-9.2-11.2-19.6-14.2-30.3-14.2-16.3 0-32.1 9.2-32.1 26.6 0 16.9 13 26 27.3 28.2 7.3 1 15.4 3.9 15.2 8.9-.6 9.5-20.2 9-29.1-1.8l-14.2 13.3c8.3 10.7 19.6 16.1 30.2 16.1 16.3 0 34.4-9.4 35.1-26.6 1-21.7-14.8-27.2-30.6-30.1zm-67 55.5h22.4V79.7h-22.4v88.8zM728 79.7h-33.2V117l22.1 19.9v-36.2h11.8c7.5 0 11.2 3.6 11.2 9.4v27.7c0 5.8-3.5 9.7-11.2 9.7h-34v21.1H728c17.8.1 34.5-8.8 34.5-29.2v-29.8c0-20.8-16.7-29.9-34.5-29.9zm-162.9-1.2c-18.4 0-36.7 10-36.7 30.5v30.3c0 20.3 18.4 30.5 36.9 30.5 18.4 0 36.7-10.2 36.7-30.5V109c0-20.4-18.5-30.5-36.9-30.5zm14.4 60.8c0 6.4-7.2 9.7-14.3 9.7-7.2 0-14.4-3.1-14.4-9.7V109c0-6.5 7-10 14-10 7.3 0 14.7 3.1 14.7 10v30.3zM682.4 109c-.5-20.8-14.7-29.2-33-29.2h-35.5v88.8h22.7v-28.2h4l20.6 28.2h28L665 138.1c10.7-3.4 17.4-12.7 17.4-29.1zm-32.6 12h-13.2v-20.3h13.2c14.1 0 14.1 20.3 0 20.3z"
  5820. }
  5821. })])])]), e._v(" "), n("div", {
  5822. staticClass: "socialNetworks"
  5823. }, [n("h2", [e._v("Follow us")]), e._v(" "), n("div", {
  5824. staticClass: "links"
  5825. }, [n("a", {
  5826. attrs: {
  5827. target: "_blank",
  5828. href: "https://twitter.com/fightcade"
  5829. }
  5830. }, [n("svg", {
  5831. staticClass: "twitterIcon",
  5832. attrs: {
  5833. xmlns: "http://www.w3.org/2000/svg",
  5834. width: "48",
  5835. height: "48",
  5836. viewBox: "0 0 100 100"
  5837. }
  5838. }, [n("path", {
  5839. staticClass: "twitterIcon_bg",
  5840. attrs: {
  5841. d: "M50 0C22.4 0 0 22.4 0 50s22.4 50 50 50 50-22.4 50-50S77.6 0 50 0zm25.1 40.5v1.6C75.1 58 63 76.4 40.9 76.4c-6.8 0-13.1-2-18.5-5.4.9.1 1.9.2 2.9.2 5.6 0 10.8-1.9 15-5.2-5.3-.1-9.7-3.6-11.3-8.4.7.1 1.5.2 2.3.2 1.1 0 2.2-.1 3.2-.4-5.5-1.1-9.7-6-9.7-11.8v-.2c1.6.9 3.5 1.4 5.5 1.5-3.2-2.2-5.4-5.9-5.4-10 0-2.2.6-4.3 1.6-6.1 5.9 7.3 14.8 12.1 24.8 12.6-.2-.9-.3-1.8-.3-2.7 0-6.7 5.4-12.1 12.1-12.1 3.5 0 6.6 1.5 8.8 3.8 2.7-.5 5.3-1.5 7.7-2.9-.9 2.8-2.8 5.2-5.3 6.7 2.4-.3 4.8-.9 6.9-1.9-1.7 2.4-3.7 4.5-6.1 6.2z"
  5842. }
  5843. })])]), e._v(" "), n("a", {
  5844. attrs: {
  5845. target: "_blank",
  5846. href: "https://www.facebook.com/FightCade-1480028465619692/"
  5847. }
  5848. }, [n("svg", {
  5849. staticClass: "facebookIcon",
  5850. attrs: {
  5851. xmlns: "http://www.w3.org/2000/svg",
  5852. width: "48",
  5853. height: "48",
  5854. viewBox: "0 0 100 100"
  5855. }
  5856. }, [n("path", {
  5857. staticClass: "facebookIcon_bg",
  5858. attrs: {
  5859. d: "M50 0C22.4 0 0 22.4 0 50s22.4 50 50 50 50-22.4 50-50S77.6 0 50 0zm15 30.7h-5.4c-4.3 0-5.1 2-5.1 5v6.6h10.1l-1.3 10.3h-8.8V79H43.9V52.5H35V42.2h8.9v-7.6c0-8.8 5.4-13.6 13.2-13.6 3.7 0 7 .3 7.9.4v9.3z"
  5860. }
  5861. })])])])])]), e._v(" "), e._m(3), e._v(" "), e._m(4)])])])])
  5862. },
  5863. staticRenderFns: [function() {
  5864. var e = this,
  5865. t = e.$createElement,
  5866. n = e._self._c || t;
  5867. return n("div", {
  5868. staticClass: "welcomeLinks"
  5869. }, [n("div", {
  5870. staticClass: "welcomeLinksItem"
  5871. }, [n("div", {
  5872. staticClass: "title"
  5873. }, [e._v("\n Need help?\n ")]), e._v(" "), n("a", {
  5874. attrs: {
  5875. href: "https://discord.gg/EyERRSg",
  5876. target: "_blank"
  5877. }
  5878. }, [e._v("Come to our discord server")])]), e._v(" "), n("div", {
  5879. staticClass: "welcomeLinksItem"
  5880. }, [n("div", {
  5881. staticClass: "title"
  5882. }, [e._v("\n First time here?\n ")]), e._v(" "), n("a", {
  5883. attrs: {
  5884. href: "https://play.fightcade.com/manual.html",
  5885. target: "_blank"
  5886. }
  5887. }, [n("div", {
  5888. staticClass: "button-generic"
  5889. }, [e._v("\n Read the manual\n ")])])]), e._v(" "), n("div", {
  5890. staticClass: "welcomeLinksItem"
  5891. }, [n("div", {
  5892. staticClass: "title"
  5893. }, [e._v("\n Useful links\n ")]), e._v(" "), n("ul", [n("li", [n("a", {
  5894. attrs: {
  5895. href: "https://play.fightcade.com/faq.html",
  5896. target: "_blank"
  5897. }
  5898. }, [e._v("F.A.Q.")])]), e._v(" "), n("li", [n("a", {
  5899. attrs: {
  5900. href: "https://play.fightcade.com/changelog.html",
  5901. target: "_blank"
  5902. }
  5903. }, [e._v("Changelog")])])])])])
  5904. }, function() {
  5905. var e = this,
  5906. t = e.$createElement,
  5907. n = e._self._c || t;
  5908. return n("div", {
  5909. staticClass: "welcomeHeaderBgWrapper"
  5910. }, [n("div", {
  5911. staticClass: "welcomeHeaderBg"
  5912. })])
  5913. }, function() {
  5914. var e = this,
  5915. t = e.$createElement,
  5916. n = e._self._c || t;
  5917. return n("a", {
  5918. attrs: {
  5919. href: "https://www.patreon.com/Fightcade",
  5920. target: "_blank"
  5921. }
  5922. }, [n("div", {
  5923. staticClass: "button-generic"
  5924. }, [e._v("\n Become a patron\n ")])])
  5925. }, function() {
  5926. var e = this,
  5927. t = e.$createElement,
  5928. n = e._self._c || t;
  5929. return n("div", {
  5930. staticClass: "footerColumn about"
  5931. }, [n("h2", [e._v("About Fightcade")]), e._v(" "), n("p", [e._v("\n FightCade uses "), n("a", {
  5932. attrs: {
  5933. target: "_blank",
  5934. href: "http://www.fbalpha.com"
  5935. }
  5936. }, [e._v(" FB Alpha")]), e._v(", "), n("a", {
  5937. attrs: {
  5938. target: "_blank",
  5939. href: "http://www.snes9x.com/"
  5940. }
  5941. }, [e._v(" SNES9X")]), e._v(" and "), n("a", {
  5942. attrs: {
  5943. target: "_blank",
  5944. href: "https://en.wikipedia.org/wiki/GGPO"
  5945. }
  5946. }, [e._v("GGPO")]), e._v(" by Tony Cannon\n ")]), e._v(" "), n("p", [e._v("\n Client built on on "), n("a", {
  5947. attrs: {
  5948. target: "_blank",
  5949. href: "https://vuejs.org/"
  5950. }
  5951. }, [e._v("VueJS")]), e._v(" + "), n("a", {
  5952. attrs: {
  5953. target: "_blank",
  5954. href: "https://webpack.js.org/"
  5955. }
  5956. }, [e._v("Webpack")]), e._v(" using "), n("a", {
  5957. attrs: {
  5958. target: "_blank",
  5959. href: "https://electron.atom.io/"
  5960. }
  5961. }, [e._v("Electron")])]), e._v(" "), n("p", [e._v("\n Backend built on "), n("a", {
  5962. attrs: {
  5963. target: "_blank",
  5964. href: "https://nodejs.org"
  5965. }
  5966. }, [e._v("NodeJS")])])])
  5967. }, function() {
  5968. var e = this,
  5969. t = e.$createElement,
  5970. n = e._self._c || t;
  5971. return n("div", {
  5972. staticClass: "footerColumn credits"
  5973. }, [n("h2", [e._v("Made by")]), e._v(" "), n("div", {
  5974. staticClass: "name"
  5975. }, [n("a", {
  5976. attrs: {
  5977. target: "_blank",
  5978. href: "https://twitter.com/pof"
  5979. }
  5980. }, [e._v("\n Pau Oliva\n ")])]), e._v(" "), n("div", {
  5981. staticClass: "area"
  5982. }, [e._v("\n Backend Code\n ")]), e._v(" "), n("div", {
  5983. staticClass: "name"
  5984. }, [n("a", {
  5985. attrs: {
  5986. target: "_blank",
  5987. href: "https://twitter.com/jordi_ros"
  5988. }
  5989. }, [e._v("\n Jordi Ros\n ")])]), e._v(" "), n("div", {
  5990. staticClass: "area"
  5991. }, [e._v("\n Custom emulator build + backend code\n ")]), e._v(" "), n("div", {
  5992. staticClass: "name"
  5993. }, [n("a", {
  5994. attrs: {
  5995. target: "_blank",
  5996. href: "http://www.cesarbotana.com/"
  5997. }
  5998. }, [e._v("\n Cรƒยฉsar Botana\n ")])]), e._v(" "), n("div", {
  5999. staticClass: "area"
  6000. }, [e._v("\n Frontend code\n ")]), e._v(" "), n("div", {
  6001. staticClass: "name"
  6002. }, [n("a", {
  6003. attrs: {
  6004. target: "_blank",
  6005. href: "https://www.jorgefuentes.net/?utm_source=fightcade&utm_medium=welcome_screen&utm_campaign=fightcade"
  6006. }
  6007. }, [e._v("\n Jorge Fuentes\n ")])]), e._v(" "), n("div", {
  6008. staticClass: "area"
  6009. }, [e._v("\n Frontend layout, UI/UX, brand design, docs, community\n ")])])
  6010. }]
  6011. }
  6012. }, function(e, t) {
  6013. e.exports = {
  6014. render: function() {
  6015. var e = this,
  6016. t = e.$createElement,
  6017. n = e._self._c || t;
  6018. return n("div", {
  6019. ref: "chatWrapper",
  6020. staticClass: "chatWrapper"
  6021. }, [n("div", {
  6022. staticClass: "chatWrapperBg",
  6023. style: e.channelBg
  6024. }), e._v(" "), n("div", {
  6025. staticClass: "floatingNotificationsWrapper",
  6026. on: {
  6027. mouseover: function(t) {
  6028. e.pauseOuterNotificationsTimer = !0
  6029. },
  6030. mouseleave: function(t) {
  6031. e.pauseOuterNotificationsTimer = !1
  6032. }
  6033. }
  6034. }, [e._l(e.outerNotifications, function(t, a) {
  6035. return ["mention" === t.type ? n("div", {
  6036. staticClass: "floatingNotificationsItem mention",
  6037. on: {
  6038. click: function(t) {
  6039. e.onOuterNotificationClick(a)
  6040. }
  6041. }
  6042. }, [e._v("\n New mention on #" + e._s(t.channel.name) + "\n ")]) : n("div", {
  6043. staticClass: "floatingNotificationsItem challenge"
  6044. }, [n("div", {
  6045. staticClass: "title",
  6046. attrs: {
  6047. title: t.channel.name
  6048. },
  6049. on: {
  6050. click: function(t) {
  6051. e.onOuterNotificationClick(a)
  6052. }
  6053. }
  6054. }, [e._v("\n New challenge on #" + e._s(t.channel.name) + "\n ")]), e._v(" "), n("div", {
  6055. staticClass: "details"
  6056. }, [n("div", {
  6057. staticClass: "challenger"
  6058. }, [n("div", {
  6059. staticClass: "ping"
  6060. }, [n("img", {
  6061. attrs: {
  6062. src: e.pingSrc(t.user)
  6063. }
  6064. })]), e._v(" "), n("div", {
  6065. staticClass: "rank"
  6066. }, [n("img", {
  6067. attrs: {
  6068. src: e.rankSrc(t.user)
  6069. }
  6070. })]), e._v(" "), n("div", {
  6071. staticClass: "name"
  6072. }, [e._v("\n " + e._s(t.user.name) + "\n ")])]), e._v(" "), n("div", {
  6073. staticClass: "actions"
  6074. }, [n("div", {
  6075. staticClass: "button-generic accept",
  6076. on: {
  6077. click: function(t) {
  6078. e.onOuterChallengeNotificationClick("accept", a)
  6079. }
  6080. }
  6081. }, [n("svg", {
  6082. staticClass: "icon challenge",
  6083. attrs: {
  6084. xmlns: "http://www.w3.org/2000/svg",
  6085. viewBox: "0 0 40 40"
  6086. }
  6087. }, [n("path", {
  6088. staticClass: "iconSvg challenge",
  6089. attrs: {
  6090. d: "M36.3 16.9c-.6-.6-1.2-.9-2-1 1.3-1.5 1.3-3.7-.2-5.2l-.1-.1c-.7-.7-1.6-1-2.6-1.1.3-1.3 0-2.7-1-3.7-.9-.9-2-1.2-3.2-1.1v-.4c0-1-.4-2-1.1-2.7-1.5-1.5-3.9-1.5-5.4 0l-3.1 3.1c-.9-.2-1.9-.2-3 0-1.7.5-3.6 1.6-5.2 3.1-3.1 3.1-5 8.2-.8 13.1l-7.2 7.2L13 39.7l7.2-7.2c1 .7 2.2.9 3.4.7 3.2-.6 6.2-4.1 7.4-6.6.7-.2 1.3-.5 1.9-1l3.3-3.3c.7-.7 1.1-1.7 1.1-2.7s-.3-2-1-2.7zm-3.5-4.8c.7.7.7 1.8 0 2.5L27.4 20c-.7.7-1.8.7-2.5 0h-.2c-.7-.7-.7-1.8 0-2.5l5.4-5.4c.7-.8 1.9-.8 2.7 0zm-3.7-4.8c.7.7.7 1.9 0 2.6l-3.1 3c-.2-.7-.5-1.4-1.1-2l-1-1 2.6-2.6c.7-.8 1.9-.8 2.6 0zM22.3 3c.7-.7 1.9-.7 2.6 0 .3.3.5.8.5 1.3s-.2 1-.5 1.3l-2.6 2.6L20 6c-.1-.1-.2-.2-.4-.3L22.3 3zm1.1 28.3c-.9.2-1.7-.1-2.4-.8l-.7-.7-7.1 7.1-8.8-8.8 7.1-7.1-.7-.7c-4-4-2.6-8.3.1-11 1.3-1.3 2.8-2.2 4.3-2.5 1-.2 2.4-.3 3.4.7l3.5 3.5 1.4 1.4c.7.7.7 1.3.6 1.8-.2.7-.7 1.2-1.4 1.4-.6.2-1.2 0-1.8-.6L18 12.1l-.8-.8-1.4 1.4.8.8c2.4 2.4 4.4 4.6 5.2 6.4.6 1.4.6 2.8-1.3 4.7l1.4 1.4c1.3-1.3 2-2.6 2.2-3.9.6.4 1.3.6 2 .6h.4c-.1 1.1.2 2.2 1.1 3.1.4.4.9.7 1.4.9-1.3 1.8-3.5 4.2-5.6 4.6zm11.5-10.4l-3.3 3.3c-.7.7-1.9.7-2.6 0-.7-.7-.7-1.9 0-2.6l3.3-3.3c.4-.4.8-.5 1.3-.5s.9.2 1.3.5c.3.3.5.8.5 1.3s-.2 1-.5 1.3z"
  6091. }
  6092. })]), e._v("\n Accept\n ")]), e._v(" "), n("div", {
  6093. staticClass: "reject",
  6094. on: {
  6095. click: function(t) {
  6096. e.onOuterChallengeNotificationClick("decline", a)
  6097. }
  6098. }
  6099. }, [e._v("\n Decline\n ")])])])])]
  6100. })], 2), e._v(" "), n("div", {
  6101. ref: "messagesContainer",
  6102. staticClass: "chatContent",
  6103. on: {
  6104. scroll: e.onMessagesContainerScroll
  6105. }
  6106. }, [e._m(0), e._v(" "), e._l(e.messages, function(t) {
  6107. return [n("div", {
  6108. staticClass: "messageWrapper",
  6109. class: e.getMessageClass(t)
  6110. }, ["channel" === t.type ? n("channel-message", {
  6111. key: t.id,
  6112. ref: t.id,
  6113. refInFor: !0,
  6114. attrs: {
  6115. data: t
  6116. }
  6117. }) : "bot" === t.type ? n("bot-message", {
  6118. key: t.id,
  6119. ref: t.id,
  6120. refInFor: !0,
  6121. attrs: {
  6122. data: t
  6123. }
  6124. }) : "elo" === t.type ? n("elo-message", {
  6125. key: t.id,
  6126. ref: t.id,
  6127. refInFor: !0,
  6128. attrs: {
  6129. data: t
  6130. }
  6131. }) : "requestChallenge" === t.type ? n("request-challenge-message", {
  6132. key: t.id,
  6133. ref: t.id,
  6134. refInFor: !0,
  6135. attrs: {
  6136. data: t
  6137. },
  6138. on: {
  6139. "cancel-challenge": e.cancelChallenge
  6140. }
  6141. }) : "challengeRequested" === t.type ? n("challenge-requested-message", {
  6142. key: t.id,
  6143. ref: t.id,
  6144. refInFor: !0,
  6145. attrs: {
  6146. data: t,
  6147. channel: e.channel
  6148. },
  6149. on: {
  6150. "decline-challenge": e.declineChallenge,
  6151. "accept-challenge": e.acceptChallenge
  6152. }
  6153. }) : "chat" === t.type ? n("chat-message", {
  6154. key: t.id,
  6155. ref: t.id,
  6156. refInFor: !0,
  6157. attrs: {
  6158. data: t
  6159. },
  6160. on: {
  6161. "show-user-info": e.showUserInfo,
  6162. "challenge-user": e.challengeUser,
  6163. "goto-channel-by-gameid": e.gotoChannelByGameId,
  6164. "scroll-to-bottom": e.scrollToBottom
  6165. }
  6166. }) : "terminal" === t.type ? n("terminal-message", {
  6167. key: t.id,
  6168. ref: t.id,
  6169. refInFor: !0,
  6170. attrs: {
  6171. data: t
  6172. }
  6173. }) : n("raw-message", {
  6174. key: t.id,
  6175. ref: t.id,
  6176. refInFor: !0,
  6177. attrs: {
  6178. data: t
  6179. }
  6180. })], 1)]
  6181. })], 2), e._v(" "), n("div", {
  6182. staticClass: "chatInput"
  6183. }, [n("div", {
  6184. staticClass: "notificationsHelpersWrapper"
  6185. }, e._l(e.notificationsHelpers, function(t) {
  6186. return n("div", {
  6187. staticClass: "notificationsHelpersItem",
  6188. class: t.type
  6189. }, [n("div", {
  6190. staticClass: "title"
  6191. }, [e._v(e._s(t.title))]), e._v(" "), n("div", {
  6192. staticClass: "options"
  6193. }, [n("span", {
  6194. staticClass: "discard",
  6195. on: {
  6196. click: function(n) {
  6197. n.stopPropagation(), e.discardUnseen(t.type)
  6198. }
  6199. }
  6200. }, [e._v("\n Discard\n ")]), e._v(" "), n("span", {
  6201. staticClass: "goToFirst",
  6202. on: {
  6203. click: function(n) {
  6204. n.stopPropagation(), e.gotoUnseen(t.type)
  6205. }
  6206. }
  6207. }, [e._v("\n Go to first รขโ€ โ€˜\n ")])])])
  6208. })), e._v(" "), n("div", {
  6209. directives: [{
  6210. name: "show",
  6211. rawName: "v-show",
  6212. value: e.matchesList.length > 0,
  6213. expression: "matchesList.length > 0"
  6214. }],
  6215. staticClass: "matchesWrapper"
  6216. }, [n("header", [e._v(e._s(e.matchTitle) + "\n "), n("span", [e._v(e._s(e.matchString))])]), e._v(" "), n("div", {
  6217. ref: "matchesList",
  6218. staticClass: "matchesList",
  6219. on: {
  6220. mousemove: e.calculateActiveMatch
  6221. }
  6222. }, [e._l(e.computedmatchesList(), function(t, a) {
  6223. return [n("div", {
  6224. ref: "match_" + a,
  6225. refInFor: !0,
  6226. staticClass: "match",
  6227. class: {
  6228. active: t.active
  6229. },
  6230. on: {
  6231. mousedown: e.insertMatch
  6232. }
  6233. }, ["command" !== e.matchType ? [n("img", {
  6234. staticClass: "avatar",
  6235. attrs: {
  6236. src: e.avatarSrc(t)
  6237. }
  6238. }), e._v(" "), "user" === e.matchType ? [n("span", {
  6239. staticClass: "text"
  6240. }, [e._v(e._s(t.text))])] : [n("span", {
  6241. staticClass: "channel-fullName"
  6242. }, [e._v(e._s(t.channelName))]), e._v(" "), n("span", {
  6243. staticClass: "channel-romName"
  6244. }, [e._v(e._s(t.gameId))])]] : [n("span", {
  6245. staticClass: "command"
  6246. }, [e._v(e._s(t.text))]), e._v(" "), n("span", {
  6247. staticClass: "description"
  6248. }, [e._v(e._s(t.description))])]], 2)]
  6249. })], 2)]), e._v(" "), n("input", {
  6250. directives: [{
  6251. name: "model",
  6252. rawName: "v-model",
  6253. value: e.inputText,
  6254. expression: "inputText"
  6255. }],
  6256. ref: "input",
  6257. staticClass: "input",
  6258. attrs: {
  6259. type: "text",
  6260. placeholder: "Send message to #" + e.channelName,
  6261. autocorrect: "off",
  6262. spellcheck: "false"
  6263. },
  6264. domProps: {
  6265. value: e.inputText
  6266. },
  6267. on: {
  6268. keydown: e.onKeyDown,
  6269. focus: e.onFocus,
  6270. blur: e.onBlur,
  6271. input: function(t) {
  6272. t.target.composing || (e.inputText = t.target.value)
  6273. }
  6274. }
  6275. })])])
  6276. },
  6277. staticRenderFns: [function() {
  6278. var e = this,
  6279. t = e.$createElement,
  6280. n = e._self._c || t;
  6281. return n("div", {
  6282. staticClass: "betaNotice"
  6283. }, [n("strong", [e._v("Thanks for participating in the Fightcade beta.")]), e._v(" "), n("span", [e._v("If you experience any bug or have feedback, please share it with us on "), n("a", {
  6284. attrs: {
  6285. href: "https://discord.gg/EyERRSg",
  6286. target: "_blank"
  6287. }
  6288. }, [e._v("our official Discord server")]), e._v(". Have fun!")])])
  6289. }]
  6290. }
  6291. }, function(e, t) {
  6292. e.exports = {
  6293. render: function() {
  6294. var e = this,
  6295. t = e.$createElement,
  6296. n = e._self._c || t;
  6297. return n("div", {
  6298. staticClass: "usersListToolbar"
  6299. }, [n("div", {
  6300. staticClass: "usersListWrapper"
  6301. }, [e.usersOnline.length > 0 ? n("div", [n("div", {
  6302. staticClass: "usersOnlineTitle"
  6303. }, [e._v("Looking to play"), n("span", [e._v(e._s(e.usersOnline.length))])]), e._v(" "), n("div", {
  6304. staticClass: "usersOnlineList"
  6305. }, [e._l(e.usersOnline, function(t) {
  6306. return [n("user-item", {
  6307. key: t.id,
  6308. attrs: {
  6309. user: t,
  6310. channel: e.channel
  6311. },
  6312. on: {
  6313. "show-context-menu": e.showUserContextMenu,
  6314. "show-user-info": e.showUserInfo,
  6315. "challenge-user": e.challengeUser
  6316. }
  6317. })]
  6318. })], 2)]) : e._e(), e._v(" "), e.matches.length > 0 ? n("div", [n("div", {
  6319. staticClass: "matchesTitleWrapper"
  6320. }, [n("div", {
  6321. staticClass: "matchesTitle"
  6322. }, [e._v("Playing ")]), e._v(" "), n("div", {
  6323. staticClass: "matchesNumber"
  6324. }, [e._v(e._s(e.matchesNumber))]), e._v(" "), n("div", {
  6325. staticClass: "spectatorsIconWrapper"
  6326. }, [n("svg", {
  6327. staticClass: "spectatorsIconSvg",
  6328. attrs: {
  6329. xmlns: "http://www.w3.org/2000/svg",
  6330. width: "24",
  6331. height: "24",
  6332. viewBox: "0 0 24 24"
  6333. }
  6334. }, [n("path", {
  6335. attrs: {
  6336. d: "M12 10c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0-2c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4z"
  6337. }
  6338. }), e._v(" "), n("path", {
  6339. attrs: {
  6340. d: "M12 8c3.6 0 6.9 1.4 9.4 4-2.5 2.6-5.8 4-9.4 4s-6.9-1.4-9.4-4C5.1 9.5 8.4 8 12 8m0-2C7.1 6 2.8 8.4 0 12c2.8 3.6 7.1 6 12 6s9.2-2.3 12-6c-2.8-3.6-7.1-6-12-6z"
  6341. }
  6342. })])])]), e._v(" "), n("div", {
  6343. staticClass: "matchesList"
  6344. }, [e._l(e.matches, function(t) {
  6345. return [n("match-item", {
  6346. key: t.id,
  6347. attrs: {
  6348. data: t,
  6349. channel: e.channel
  6350. },
  6351. on: {
  6352. "show-user-info": e.showUserInfo,
  6353. "spectate-match": e.spectateMatch,
  6354. "show-context-menu-match": e.showMatchContextMenu
  6355. }
  6356. })]
  6357. })], 2)]) : e._e(), e._v(" "), e.usersAway.length > 0 ? n("div", [n("div", {
  6358. staticClass: "usersAwayTitle"
  6359. }, [e._v("Not available"), n("span", [e._v(e._s(e.usersAway.length))])]), e._v(" "), n("div", {
  6360. staticClass: "usersAwayList"
  6361. }, [e._l(e.usersAway, function(t) {
  6362. return [n("user-item", {
  6363. key: t.id,
  6364. attrs: {
  6365. user: t,
  6366. channel: e.channel
  6367. },
  6368. on: {
  6369. "show-context-menu": e.showUserContextMenu,
  6370. "show-user-info": e.showUserInfo
  6371. }
  6372. })]
  6373. })], 2)]) : e._e(), e._v(" "), e.usersIgnored.length > 0 ? n("div", [n("div", {
  6374. staticClass: "usersIgnoredTitle"
  6375. }, [e._v("Ignored"), n("span", [e._v(e._s(e.usersIgnored.length))])]), e._v(" "), n("div", {
  6376. staticClass: "usersIgnoredList"
  6377. }, [e._l(e.usersIgnored, function(t) {
  6378. return [n("user-item", {
  6379. key: t.id,
  6380. attrs: {
  6381. user: t,
  6382. channel: e.channel
  6383. },
  6384. on: {
  6385. "show-context-menu": e.showUserContextMenu,
  6386. "show-user-info": e.showUserInfo
  6387. }
  6388. })]
  6389. })], 2)]) : e._e()])])
  6390. },
  6391. staticRenderFns: []
  6392. }
  6393. }, function(e, t) {
  6394. e.exports = {
  6395. render: function() {
  6396. var e = this,
  6397. t = e.$createElement,
  6398. n = e._self._c || t;
  6399. return n("div", {
  6400. staticClass: "favoritesWrapper"
  6401. }, [e._m(0), e._v(" "), n("paginated-list", {
  6402. ref: "paginatedList",
  6403. attrs: {
  6404. noItemsInfo: e.noItemsInfo,
  6405. hideUnfavChannels: !0,
  6406. hideFooter: !0
  6407. },
  6408. on: {
  6409. "join-channel": e.joinChannel,
  6410. "fav-channel": e.favChannel,
  6411. "patreon-info": e.openPatreonChannel
  6412. }
  6413. })], 1)
  6414. },
  6415. staticRenderFns: [function() {
  6416. var e = this,
  6417. t = e.$createElement,
  6418. n = e._self._c || t;
  6419. return n("header", [n("h2", [e._v("Your favorites")])])
  6420. }]
  6421. }
  6422. }, function(e, t) {
  6423. e.exports = {
  6424. render: function() {
  6425. var e = this,
  6426. t = e.$createElement;
  6427. return (e._self._c || t)("a", {
  6428. staticClass: "addChannelButton",
  6429. class: {
  6430. active: e.data.active
  6431. },
  6432. on: {
  6433. click: e.select
  6434. }
  6435. })
  6436. },
  6437. staticRenderFns: []
  6438. }
  6439. }, function(e, t) {
  6440. e.exports = {
  6441. render: function() {
  6442. var e = this,
  6443. t = e.$createElement,
  6444. n = e._self._c || t;
  6445. return n("div", {
  6446. staticClass: "mask",
  6447. on: {
  6448. click: e.close
  6449. }
  6450. }, [n("div", {
  6451. ref: "menu",
  6452. staticClass: "menu",
  6453. style: e.menuStyle
  6454. }, [e._l(e.data.items, function(t) {
  6455. return ["challenge" === t.id ? n("div", {
  6456. staticClass: "challengeButtonWrapper"
  6457. }, [n("item", {
  6458. attrs: {
  6459. data: t
  6460. },
  6461. on: {
  6462. click: e.onItemClick
  6463. }
  6464. })], 1) : e._e()]
  6465. }), e._v(" "), n("div", {
  6466. staticClass: "contextMenuItemsWrapper"
  6467. }, [e._l(e.data.items, function(t) {
  6468. return ["challenge" !== t.id && "separator" !== t.id ? n("item", {
  6469. attrs: {
  6470. data: t
  6471. },
  6472. on: {
  6473. click: e.onItemClick
  6474. }
  6475. }) : e._e()]
  6476. })], 2)], 2)])
  6477. },
  6478. staticRenderFns: []
  6479. }
  6480. }, function(e, t) {
  6481. e.exports = {
  6482. render: function() {
  6483. var e = this,
  6484. t = e.$createElement,
  6485. n = e._self._c || t;
  6486. return n("div", {
  6487. staticClass: "message",
  6488. class: e.data.type
  6489. }, [e._l(e.data.lines, function(t, a) {
  6490. return [0 === a ? n("header", [n("div", {
  6491. staticClass: "authorAndTime"
  6492. }, [n("span", {
  6493. ref: "author",
  6494. refInFor: !0,
  6495. staticClass: "author"
  6496. }, [e._v("\n " + e._s(e.data.author.name) + "\n ")]), e._v(" "), n("span", {
  6497. staticClass: "time"
  6498. }, [e._v("at " + e._s(e.timeInfo(e.data.lines[0].time)))])])]) : e._e(), e._v(" "), n("div", {
  6499. ref: "line_" + a,
  6500. refInFor: !0,
  6501. staticClass: "line"
  6502. }, [n("div", {
  6503. staticClass: "blocksContainer"
  6504. }, e._l(t.blocks, function(t, s) {
  6505. return n("div", {
  6506. staticClass: "blocks"
  6507. }, [n("span", {
  6508. ref: "block_" + a + "_" + s,
  6509. refInFor: !0,
  6510. class: t.class,
  6511. on: {
  6512. click: function(n) {
  6513. e.onLineBlockClick(t)
  6514. }
  6515. }
  6516. }, [e._v("\n " + e._s(t.text) + "\n ")])])
  6517. }))])]
  6518. })], 2)
  6519. },
  6520. staticRenderFns: []
  6521. }
  6522. }, function(e, t) {
  6523. e.exports = {
  6524. render: function() {
  6525. var e = this,
  6526. t = e.$createElement,
  6527. n = e._self._c || t;
  6528. return n("div", {
  6529. staticClass: "channelItemWrapper"
  6530. }, [n("div", {
  6531. staticClass: "muteChannelItem",
  6532. class: {
  6533. active: e.data.localUserIsAway
  6534. },
  6535. attrs: {
  6536. title: e.muteChannelTitle
  6537. },
  6538. on: {
  6539. click: e.onChannelAway
  6540. }
  6541. }, [n("svg", {
  6542. staticClass: "icon",
  6543. attrs: {
  6544. xmlns: "http://www.w3.org/2000/svg",
  6545. width: "14",
  6546. height: "14",
  6547. viewBox: "0 0 14 14"
  6548. }
  6549. }, [n("g", [n("path", {
  6550. attrs: {
  6551. d: "M2.9 9H1V5h2v3.9l1-1V4.5l3-2.4v2.8l1-1V0L3 4H0v6h1.9zM7 9.1v2.8l-1.6-1.2-.7.7L8 14V8.1zM10.5 5.7c.3.3.5.8.5 1.3 0 1.1-.9 2-2 2v1c1.7 0 3-1.3 3-3 0-.8-.3-1.5-.8-2.1l-.7.8z"
  6552. }
  6553. }), e._v(" "), n("path", {
  6554. attrs: {
  6555. d: "M9.8 2.1C9.5 2 9.3 2 9 2v.9l.8-.8zM11.9 4.2C12.6 5 13 5.9 13 7c0 2.2-1.8 4-4 4v1c2.8 0 5-2.2 5-5 0-1.3-.5-2.6-1.4-3.5l-.7.7z"
  6556. }
  6557. })]), e._v(" "), n("path", {
  6558. staticClass: "icon-strike",
  6559. attrs: {
  6560. d: "M12.657.636l.707.707-12.02 12.02-.708-.706z"
  6561. }
  6562. })])]), e._v(" "), n("div", {
  6563. staticClass: "leaveChannelItem",
  6564. attrs: {
  6565. title: "Leave channel"
  6566. },
  6567. on: {
  6568. click: e.leaveChannel
  6569. }
  6570. }, [n("svg", {
  6571. staticClass: "icon",
  6572. attrs: {
  6573. xmlns: "http://www.w3.org/2000/svg",
  6574. width: "14",
  6575. height: "14",
  6576. viewBox: "0 0 14 14"
  6577. }
  6578. }, [n("path", {
  6579. attrs: {
  6580. d: "M9 13H0V2h9v3H8V3H1v9h7v-2h1z"
  6581. }
  6582. }), e._v(" "), n("path", {
  6583. attrs: {
  6584. d: "M11.2 4.8l-.7.7L12 7H5v1h7.2l-1.7 1.6.7.8L14 7.6z"
  6585. }
  6586. })])]), e._v(" "), n("div", {
  6587. staticClass: "channelItem",
  6588. class: {
  6589. active: e.data.active
  6590. },
  6591. attrs: {
  6592. title: e.data.id
  6593. },
  6594. on: {
  6595. mouseover: e.showTooltip,
  6596. mouseleave: e.hideTooltip,
  6597. click: e.select,
  6598. contextmenu: function(t) {
  6599. t.preventDefault(), e.showContextMenu(t)
  6600. }
  6601. }
  6602. }, [n("div", {
  6603. staticClass: "channelItemName"
  6604. }, [e._v("\n " + e._s(e.truncatedGameId) + "\n ")]), e._v(" "), n("div", {
  6605. staticClass: "notificationsIndicatorsWrapper"
  6606. }, [n("div", {
  6607. staticClass: "notificationsIndicators"
  6608. }, [n("div", {
  6609. directives: [{
  6610. name: "show",
  6611. rawName: "v-show",
  6612. value: e.data.unseenMessages.length > 0,
  6613. expression: "data.unseenMessages.length > 0"
  6614. }],
  6615. staticClass: "newMessages"
  6616. }), e._v(" "), n("div", {
  6617. directives: [{
  6618. name: "show",
  6619. rawName: "v-show",
  6620. value: e.data.unseenMentions.length > 0,
  6621. expression: "data.unseenMentions.length > 0"
  6622. }],
  6623. staticClass: "newMentions"
  6624. }), e._v(" "), n("div", {
  6625. directives: [{
  6626. name: "show",
  6627. rawName: "v-show",
  6628. value: e.data.unseenChallenges.length > 0,
  6629. expression: "data.unseenChallenges.length > 0"
  6630. }],
  6631. staticClass: "newChallenges"
  6632. })])]), e._v(" "), n("div", {
  6633. directives: [{
  6634. name: "show",
  6635. rawName: "v-show",
  6636. value: !0,
  6637. expression: "true"
  6638. }],
  6639. ref: "tooltip",
  6640. staticClass: "tooltip"
  6641. })])])
  6642. },
  6643. staticRenderFns: []
  6644. }
  6645. }, , , function(e, t) {}, function(e, t) {}], [35]);
  6646. //# sourceMappingURL=app.46d254051e025f9058ef.js.map
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement