Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- webpackJsonp([0], [, , function(e, t, n) {
- "use strict";
- var a = n(1),
- s = n.n(a),
- i = {
- addr: "play.fightcade.com",
- port: 443,
- fcadePort: 7e3,
- uri: "wss://play.fightcade.com/ws/"
- },
- o = {
- default: {
- id: "default",
- name: "Default",
- class: "theme-default"
- },
- lembranza: {
- id: "lembranza",
- name: "Lembranza",
- class: "theme-lembranza"
- },
- meigallo: {
- id: "meigallo",
- name: "Meigallo",
- class: "theme-meigallo"
- },
- rabudo: {
- id: "rabudo",
- name: "Rabudo",
- class: "theme-rabudo"
- },
- solpor: {
- id: "solpor",
- name: "Solpor",
- class: "theme-solpor"
- },
- vagalume: {
- id: "vagalume",
- name: "Vagalume",
- class: "theme-vagalume"
- }
- },
- l = [{
- id: "welcome-channel"
- }, {
- id: "patreon-channel"
- }, {
- id: "add-channel"
- }];
- t.a = {
- userRole: {},
- themes: o,
- filtersOptions: {
- years: [],
- genres: [],
- systems: []
- },
- notificationTypeToVar: {
- message: "unseenMessages",
- mention: "unseenMentions",
- challenge: "unseenChallenges"
- },
- baseChannels: l,
- channelsList: {
- forNotifications: [],
- orderByGameIdLength: []
- },
- activeTheme: o.default,
- doubleClickTime: 300,
- serverInfo: i,
- localUser: {},
- currentMatchElo: {},
- channelByGameId: {},
- setChannels: function(e) {
- var t = this;
- this.channelsList.forNotifications = [], this.channelsList.orderByGameIdLength = [], s.a.forEach(e, function(e) {
- t.channelsList.forNotifications.push({
- textToCompare: (e.gameid + " " + e.name).toLowerCase(),
- gameId: e.gameid,
- channelName: e.name,
- thumbnail: e.thumbnail
- }), t.channelsList.orderByGameIdLength.push({
- name: e.name,
- gameId: e.gameid
- })
- }), this.channelsList.orderByGameIdLength = s.a.orderBy(this.channelsList.orderByGameIdLength, function(e) {
- return e.gameId.length
- }, ["desc"])
- },
- setFiltersOptions: function(e) {
- 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")
- },
- setTheme: function(e) {
- this.activeTheme = o[e]
- },
- isGameChannel: function(e) {
- return -1 === s.a.findIndex(l, {
- id: e
- })
- }
- }
- }, , , function(e, t, n) {
- "use strict";
- var a = n(15),
- s = n.n(a),
- i = n(1),
- o = n.n(i),
- l = n(2),
- c = function(e, t, n) {
- var a = {
- id: e.name,
- name: e.name,
- gravatar: e.gravatar,
- country: e.country || {},
- pingvariation: e.pingvariation || 0,
- away: e.away,
- channels: [],
- channelsAway: [],
- channelRank: {},
- playing: null,
- settings: {
- ranked: e.ranked
- }
- };
- return e.playing && e.game && (a.playing = {
- gameName: e.game.channelname,
- quarkId: e.game.quarkid,
- gameId: e.game.gameid
- }), 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
- };
- t.a = {
- prepareSocket: function(e, t) {
- if (this.websocket) return void(t() && t());
- var n = new WebSocket(l.a.serverInfo.uri);
- n.binaryType = "arraybuffer";
- var a = this;
- n.onopen = function() {
- a.websocket = n, t && t()
- }, n.onclose = function() {
- a.connected = !1, a.genericCallbacks.onDisconnect(), a.websocket = null
- }, n.onerror = function(e) {}, n.onmessage = function(e) {
- if ("string" == typeof e.data) {
- var t = JSON.parse(e.data);
- if (t.result) switch (t.req) {
- case "autologin":
- a.handleReqAutoLogin(t);
- break;
- case "login":
- a.handleReqLogin(t);
- break;
- case "join":
- a.handleReqJoin(t);
- break;
- case "leave":
- a.handleReqLeave(t);
- break;
- case "chat":
- a.handleReqChat(t);
- break;
- case "channels":
- a.handleReqChannels(t);
- break;
- case "challenge":
- a.handleReqChallenge(t);
- break;
- case "accept":
- a.handleReqAccept(t);
- break;
- case "updateuser":
- a.handleReqUpdateUser(t);
- break;
- case "linkpreview":
- a.handleReqLinkPreview(t);
- break;
- case "filteroptions":
- a.handleReqFilterOptions(t);
- break;
- case "terminalcommand":
- a.handleReqTerminalCommand(t)
- } else switch (t.req) {
- case "chat":
- a.handleEvtChat(t);
- break;
- case "join":
- a.handleEvtJoin(t);
- break;
- case "leave":
- a.handleEvtLeave(t);
- break;
- case "challenge":
- a.handleEvtChallenge(t);
- break;
- case "cancel":
- a.handleEvtCancel(t);
- break;
- case "reject":
- a.handleEvtReject(t);
- break;
- case "accept":
- a.handleEvtAccept(t);
- break;
- case "start":
- a.handleEvtStart(t);
- break;
- case "staway":
- case "stnoaway":
- case "chaway":
- case "chnoaway":
- a.handleEvtAway(t);
- break;
- case "updaterank":
- a.handleEvtUpdateRank(t);
- break;
- case "stplaying":
- case "stnoplaying":
- a.handleEvtPlaying(t);
- break;
- case "quarkstats":
- a.handleEvtQuarkStats(t)
- }
- }
- }
- },
- init: function(e) {
- this.genericCallbacks = e || {}, this.connected = !1, this.requestIdx = 0, this.requestCallback = {}
- },
- autoConnect: function(e) {
- for (var t = document.cookie.split("; "), n = null, a = 0; a < t.length; ++a) {
- var s = t[a].split("=");
- if ("fcic" === s[0]) {
- n = s[1];
- break
- }
- }
- if (n) {
- var i = this;
- return this.prepareSocket(e, function() {
- i.sendCmd({
- req: "autologin",
- cookie: n
- })
- }), !0
- }
- return !1
- },
- connect: function(e, t, n) {
- var a = this;
- this.prepareSocket(n, function() {
- a.sendCmd({
- req: "login",
- username: e,
- userpass: t
- })
- })
- },
- logout: function() {
- document.cookie = "fcic=;expires=Thu, 01 Jan 1970 00:00:01 GMT;", this.close()
- },
- close: function() {
- this.websocket.close(), this.connected = !1
- },
- joinChannel: function(e, t, n) {
- this.sendCmd({
- req: "join",
- channelname: e,
- status: "available",
- away: !0 === t.isAway,
- idx: o.a.isUndefined(t.idx) ? -1 : t.idx
- }, n)
- },
- leaveChannel: function(e, t) {
- this.sendCmd({
- req: "leave",
- channelname: e
- }, t)
- },
- favChannel: function(e, t) {
- this.sendCmd({
- req: "favchannel",
- channelname: e,
- fav: t
- })
- },
- ignoreUser: function(e, t) {
- this.sendCmd({
- req: "ignore",
- username: e,
- ignore: t
- })
- },
- setAway: function(e, t) {
- t ? this.sendCmd({
- req: e ? "chaway" : "chnoaway",
- channelname: t
- }) : this.sendCmd({
- req: e ? "staway" : "stnoaway"
- })
- },
- sendChatMessage: function(e, t, n) {
- this.sendCmd({
- req: "chat",
- channelname: e,
- chat: t
- }, n)
- },
- sendTerminalCommand: function(e, t) {
- this.sendCmd({
- req: "terminalcommand",
- input: e
- }, t)
- },
- listAllChannels: function(e) {
- this.sendCmd({
- req: "channels",
- all: !0
- }, e)
- },
- listChannels: function(e, t, n, a, s, i, o) {
- this.sendCmd({
- req: "channels",
- filter: t,
- genre: n,
- year: a,
- system: s,
- ranked: i,
- paginated: !0,
- page: e
- }, o)
- },
- listFavoritesChannels: function(e) {
- this.sendCmd({
- req: "channels",
- favorites: !0,
- paginated: !0
- }, e)
- },
- listFiltersOptions: function(e) {
- this.sendCmd({
- req: "filteroptions"
- }, e)
- },
- challengeUser: function(e, t, n) {
- this.sendCmd({
- req: "challenge",
- username: e,
- channelname: t
- }, n)
- },
- cancelChallenge: function(e, t) {
- this.sendCmd({
- req: "cancel",
- username: e,
- channelname: t
- })
- },
- declineChallenge: function(e, t) {
- this.sendCmd({
- req: "reject",
- username: e,
- channelname: t
- })
- },
- acceptChallenge: function(e, t, n) {
- this.sendCmd({
- req: "accept",
- username: e,
- channelname: t
- }, n)
- },
- updateUser: function(e, t) {
- var n = o.a.clone(e);
- n.req = "updateuser", this.sendCmd(n, t)
- },
- getLinkPreview: function(e, t) {
- this.sendCmd({
- req: "linkpreview",
- url: e
- }, t)
- },
- getMatchUri: function(e, t, n, a, s) {
- return "fcade://served/" + e + "/" + n + "/" + t + "," + l.a.serverInfo.fcadePort + "," + s + "," + (a ? 1 : 0)
- },
- getSpectateUrl: function(e, t, n) {
- return "https://replay.fightcade.com/" + e + "/" + n + "/" + t
- },
- getSpectateUri: function(e, t, n) {
- return "fcade://stream/" + e + "/" + n + "/" + t + ".2," + l.a.serverInfo.fcadePort
- },
- getEndMatchUri: function() {
- return "fcade://killemu"
- },
- getPlayAloneUri: function(e, t) {
- return "fcade://play/" + e + "/" + t
- },
- sendCmd: function(e, t) {
- e.requestIdx = t ? this.requestIdx : -1, t && (this.requestCallback[this.requestIdx++] = t), this.websocket.send(s()(e))
- },
- handleReqAutoLogin: function(e) {
- 200 === e.result ? (this.connected = !0, this.genericCallbacks.onConnect(c(e.user, !0), e.app_info || {})) : this.genericCallbacks.onConnectError("auto-login-failed")
- },
- handleReqLogin: function(e) {
- 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=/");
- else {
- var t = {
- "user wrong password": "wrong-password",
- "user not found": "user-not-found",
- "server locked": "server-locked",
- "no beta access yet": "no-beta-access"
- };
- this.genericCallbacks.onConnectError(t[e.error] || "unknown")
- }
- },
- handleReqJoin: function(e) {
- if (-1 !== e.requestIdx)
- if (200 === e.result) {
- for (var t = 0; t < e.users.length; ++t) e.users[t] = c(e.users[t], !1, e.channelname);
- this.requestCallback[e.requestIdx](e)
- } else this.requestCallback[e.requestIdx](null)
- },
- handleReqLeave: function(e) {
- 200 === e.result && -1 !== e.requestIdx && this.requestCallback[e.requestIdx] && this.requestCallback[e.requestIdx](e)
- },
- handleReqChat: function(e) {
- 200 === e.result && -1 !== e.requestIdx && this.requestCallback[e.requestIdx](e)
- },
- handleReqChannels: function(e) {
- 200 === e.result && -1 !== e.requestIdx && this.requestCallback[e.requestIdx](e)
- },
- handleReqChallenge: function(e) {
- 200 === e.result && -1 !== e.requestIdx && this.requestCallback[e.requestIdx](e)
- },
- handleReqAccept: function(e) {
- 200 === e.result && -1 !== e.requestIdx && this.requestCallback[e.requestIdx]({
- gameid: e.gameid,
- user: {
- name: e.username,
- id: e.username
- },
- quarkid: e.quarkid
- })
- },
- handleReqUpdateUser: function(e) {
- -1 !== e.requestIdx && this.requestCallback[e.requestIdx](200 === e.result, e.user)
- },
- handleReqTerminalCommand: function(e) {
- -1 !== e.requestIdx && this.requestCallback[e.requestIdx](e.response)
- },
- handleEvtChat: function(e) {
- this.genericCallbacks.onChatMessage && this.genericCallbacks.onChatMessage(e.channelname, e.username, e.chat)
- },
- handleEvtJoin: function(e) {
- if (this.genericCallbacks.onUserJoin) {
- var t = c(e.user, !1, e.channelname);
- this.genericCallbacks.onUserJoin(t, e.channelname)
- }
- },
- handleEvtLeave: function(e) {
- this.genericCallbacks.onUserLeave && this.genericCallbacks.onUserLeave({
- name: e.user.name,
- id: e.user.name
- }, e.channelname)
- },
- handleEvtChallenge: function(e) {
- this.genericCallbacks.onChallengeRequest && this.genericCallbacks.onChallengeRequest({
- name: e.user.name,
- id: e.user.name
- }, e.channelname)
- },
- handleEvtCancel: function(e) {
- this.genericCallbacks.onChallengeCancel && this.genericCallbacks.onChallengeCancel({
- user: e.user.name,
- id: e.user.name
- }, e.channelname)
- },
- handleEvtReject: function(e) {
- this.genericCallbacks.onChallengeDecline && this.genericCallbacks.onChallengeDecline({
- user: e.user.name,
- id: e.user.name
- }, e.channelname)
- },
- handleEvtAccept: function(e) {
- this.genericCallbacks.onChallengeAccept && this.genericCallbacks.onChallengeAccept({
- user: e.user.name,
- id: e.user.name
- }, e.channelname)
- },
- handleEvtStart: function(e) {
- this.genericCallbacks.onChallengeStart && this.genericCallbacks.onChallengeStart(e.channelname, e.quarkid, e.ranked, c(e.user, !1, e.channelname))
- },
- handleEvtAway: function(e) {
- if (this.genericCallbacks.onUserAwayStateChanges) {
- var t = "staway" === e.req || "chaway" === e.req;
- this.genericCallbacks.onUserAwayStateChanges(e.username, t, e.channelname)
- }
- },
- handleEvtUpdateRank: function(e) {
- this.genericCallbacks.onUserRankChanges(e.username, e.ranked)
- },
- handleEvtPlaying: function(e) {
- this.genericCallbacks.onUserPlayingStateChanges && this.genericCallbacks.onUserPlayingStateChanges(e.username, "stplaying" === e.req, e.game.channelname, e.game.quarkid, e.game.gameid, e.playerid, e.elo)
- },
- handleEvtQuarkStats: function(e) {
- this.genericCallbacks.onQuarkStats && this.genericCallbacks.onQuarkStats(e.channelname, e.quark.quarkid, e.quark.spectators)
- },
- handleReqLinkPreview: function(e) {
- -1 !== e.requestIdx && (200 === e.result ? this.requestCallback[e.requestIdx]({
- url: e.url,
- name: e.name,
- title: e.title,
- description: e.description,
- imageSrc: e.imageSrc
- }) : this.requestCallback[e.requestIdx](null))
- },
- handleReqFilterOptions: function(e) {
- -1 !== e.requestIdx && (200 === e.result ? this.requestCallback[e.requestIdx]({
- years: e.years,
- genres: e.genres,
- systems: e.systems
- }) : this.requestCallback[e.requestIdx](null))
- }
- }
- }, function(e, t, n) {
- "use strict";
- t.a = {
- formatTime: function(e) {
- var t = e.getHours(),
- n = e.getMinutes();
- return t < 10 && (t = "0" + t), n < 10 && (n = "0" + n), t + ":" + n
- },
- pointInBoundingBox: function(e, t, n) {
- return !(e < n.left) && (!(e > n.right) && (!(t < n.top) && !(t > n.bottom)))
- },
- elementIsVisible: function(e, t) {
- var n = e.getBoundingClientRect(),
- a = t.getBoundingClientRect();
- return this.pointInBoundingBox(n.left, n.top + n.height, a)
- },
- validateEmail: function(e) {
- 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)
- },
- getGravatar: function(e, t) {
- return "//www.gravatar.com/avatar/" + e + "?s=" + t + "&d=retro&r=pg"
- },
- decodeHTML: function(e) {
- var t = document.createElement("textarea");
- return t.innerHTML = e, t.value
- },
- isImageUrl: function(e) {
- return null != e.match(/\.(jpeg|jpg|gif|png)$/)
- }
- }
- }, , , , , , , , function(e, t, n) {
- "use strict";
- var a = n(15),
- s = n.n(a),
- i = n(111),
- o = n.n(i);
- t.a = {
- init: function(e, t) {
- this.serverAddr = e, this.port = t
- },
- createUser: function(e, t, n, a, s) {
- var i = {
- req: "adduser",
- email: e,
- username: t,
- pwd: n,
- token: a
- },
- o = this;
- this.doRequest(i, function(e) {
- var t = {};
- e.err ? (t.result = "error", t.error = o.getErrorCode(e.err)) : t.result = "ok", s(t)
- })
- },
- updateUserSettings: function(e, t, n) {
- var a = {
- req: "updateuser",
- username: e
- },
- s = !1;
- "email" in t && (a.email = t.email, s = !0), "password" in t && (a.pwd = t.password, s = !0), s ? this.doRequest(a, function(e) {
- n("ok")
- }) : n("ok")
- },
- doRequest: function(e, t) {
- var n = {
- host: this.serverAddr,
- port: this.port,
- method: "GET",
- path: "/api/" + encodeURIComponent(s()(e))
- };
- o.a.request(n, function(e) {
- var n = "";
- e.on("data", function(e) {
- n += e
- }), e.on("end", function() {
- t(JSON.parse(n))
- })
- }).end()
- },
- getErrorCode: function(e) {
- return {
- "user already created": "user-already-exists"
- }[e] || "unknown"
- }
- }
- }, , , , , , , , , , , , , , function(e, t, n) {
- n(86);
- var a = n(0)(n(43), n(160), "data-v-5c635a86", null);
- e.exports = a.exports
- }, , , function(e, t, n) {
- n(89);
- var a = n(0)(n(36), n(163), null, null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(92);
- var a = n(0)(n(66), n(166), null, null);
- e.exports = a.exports
- }, , function(e, t, n) {
- "use strict";
- var a = n(5);
- t.a = {
- list: [{
- name: "/away",
- description: "Set global status to away",
- execute: function(e, t) {
- return a.a.setAway(!0), "Global status set to away."
- }
- }, {
- name: "/back",
- description: "Set global status to online",
- execute: function(e, t) {
- return a.a.setAway(!1), "Global status set to online."
- }
- }, {
- name: "/channel_away",
- description: "Set channel status to away",
- execute: function(e, t) {
- return a.a.setAway(!0, e.channel.id), "Channel status set to away."
- }
- }, {
- name: "/channel_back",
- description: "Set channel status to online",
- execute: function(e, t) {
- return a.a.setAway(!1, e.channel.id), "Channel status set to online."
- }
- }, {
- name: "/test",
- description: "Test current channel's game",
- execute: function(e, t) {
- e.$emit("play-alone")
- }
- }, {
- name: "/ignore",
- description: "Ignore user",
- execute: function(e, t) {
- if (!t || 1 !== t.length) return "Error! Syntax: /ignore username";
- var n = t[0];
- return n in e.usersByName ? (a.a.ignoreUser(n, !0), "User [" + n + "] will be ignored from now on.") : "Error! user [" + n + "] not found."
- }
- }, {
- name: "/unignore",
- description: "Unignore user",
- execute: function(e, t) {
- if (!t || 1 !== t.length) return "Error! Syntax: /unignore username";
- var n = t[0];
- return n in e.usersByName ? (a.a.ignoreUser(n, !1), "User [" + n + "] is no longer ignored.") : "Error: user [" + n + "] not found."
- }
- }]
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var a = n(3),
- s = n(32),
- i = (n.n(s), n(31)),
- o = n.n(i),
- l = n(30),
- c = n.n(l);
- a.a.use(c.a, {
- observer: !0
- }), a.a.config.productionTip = !1, new a.a({
- el: "#app",
- template: '<App ref="app"/>',
- components: {
- App: o.a
- }
- }).$refs.app.init()
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var a = n(3),
- s = n(1),
- i = n.n(s),
- o = n(2),
- l = n(103),
- c = n.n(l),
- r = n(14),
- h = n(138),
- u = n.n(h),
- d = n(119),
- v = n.n(d),
- f = n(117),
- g = n.n(f),
- m = n(125),
- p = n.n(m),
- C = n(123),
- _ = n.n(C),
- w = n(142),
- y = n.n(w),
- k = n(137),
- x = n.n(k),
- b = n(136),
- I = n.n(b),
- M = n(5),
- U = n(6);
- t.default = {
- name: "app",
- components: {
- MainToolbar: u.a,
- Channel: v.a,
- AddChannel: g.a,
- ContextMenu: I.a,
- Login: x.a,
- UserInfo: y.a,
- WelcomeChannel: p.a,
- PatreonChannel: _.a
- },
- data: function() {
- return {
- initializingApp: !1,
- autoLoginning: !0,
- numChannelsInitialized: 0,
- channelsInitialized: !1,
- welcomeChannelInitialized: !1,
- channels: i.a.clone(o.a.baseChannels),
- activeChannelId: null,
- status: "disconnected",
- emojisData: null,
- contextMenuData: null,
- userInfoData: null,
- globalUsers: {},
- global: o.a,
- numJoiningChannels: 0
- }
- },
- methods: {
- init: function() {
- r.a.init(o.a.serverInfo.addr, o.a.serverInfo.port), c.a.needsPermission && c.a.isSupported() && c.a.requestPermission();
- var e = this;
- this.connectionCallbacks = {
- onConnect: function(t, n) {
- 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() {
- e.checkPerksAvailability();
- var n = 0;
- t.activeChannels.length > 0 ? i.a.forEach(t.activeChannels, function(t) {
- e.joinChannel(t.channelname, !1, t.away, n++)
- }) : (e.channelsInitialized = !0, e.checkChannelsAreInitialized()), M.a.listAllChannels(function(e) {
- i.a.forEach(e.channels, function(e) {
- o.a.channelByGameId[e.gameid] = e.name
- }), o.a.setChannels(e.channels)
- }), M.a.listFiltersOptions(function(e) {
- o.a.setFiltersOptions(e)
- }), e.$refs.mainToolbar.setChannels(e.channels), e.selectChannel("welcome-channel")
- })
- },
- onConnectError: function(t) {
- "auto-login-failed" !== t && e.$refs.login.onConnectError(t), e.autoLoginning = !1, e.initializingApp = !1
- },
- onDisconnect: function() {
- 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
- },
- onChatMessage: function(t, n, a) {
- var s = e.globalUsers[n];
- s.isLocal || e.getChannelComponentById(t).onChatMessage(s, a)
- },
- onUserJoin: function(t, n) {
- if (t.id !== o.a.localUser.id) {
- var a = e.addUserToChannel(t, n),
- s = e.getChannelComponentById(n);
- s && s.addUser(a)
- }
- },
- onUserLeave: function(t, n) {
- if (t.id !== o.a.localUser.id) {
- var a = e.getChannelComponentById(n);
- a && a.removeUser(t), e.removeUserFromChannel(t, n)
- }
- },
- onChallengeRequest: function(t, n) {
- var a = e.getChannelComponentById(n);
- a && a.userChallenged(e.globalUsers[t.id])
- },
- onChallengeCancel: function(t, n) {
- e.removeChallengeNotifications(t, n, "cancelled");
- var a = e.getChannelComponentById(n);
- a && a.challengeCancelled(t)
- },
- onChallengeDecline: function(t, n) {
- var a = e.getChannelComponentById(n);
- a && a.challengeDeclined(t)
- },
- onChallengeAccept: function(t, n, a) {
- if (!o.a.localUser.playing) {
- var s = e.getChannelComponentById(n);
- s && s.challengeAccepted(t, a)
- }
- },
- onChallengeStart: function(t, n, a, s) {
- var l = e.getChannelComponentById(t);
- if (l) {
- 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) {
- var n = e.getChannelComponentById(t);
- n && (n.cancelAllChallengesRequests(), n.declineAllChallengesRequested())
- })
- }
- },
- onUserAwayStateChanges: function(t, n, a) {
- e.onUserAwayStateChanges(t, n, a)
- },
- onUserPlayingStateChanges: function(t, n, a, s, i, o, l) {
- e.onUserPlayingStateChanges(t, n, a, s, i, o, l)
- },
- onUserRankChanges: function(t, n) {
- var s = e.globalUsers[t];
- s && !s.isLocal && a.a.set(s.settings, "ranked", n)
- },
- onQuarkStats: function(t, n, a) {
- var s = e.getChannelComponentById(t);
- s && s.onQuarkStats(n, a)
- }
- }, M.a.init(this.connectionCallbacks), M.a.autoConnect() || (this.autoLoginning = !1)
- },
- connect: function(e, t) {
- this.autoLoginning = !1, this.initializingApp = !0, M.a.connect(e, t, this.connectionCallbacks)
- },
- disconnect: function() {
- "connected" === this.status && M.a.close()
- },
- selectChannel: function(e) {
- var t = this.getChannelComponentById(e);
- this.activeChannelId = e, this.$refs.mainToolbar.setActiveChannel(e), t.onSelect()
- },
- joinChannel: function(e, t, n, s) {
- if (!(this.channels.length - o.a.baseChannels.length + this.numJoiningChannels >= o.a.localUser.perks.maxNumChannels)) {
- var l = this;
- ++this.numJoiningChannels, M.a.joinChannel(e, {
- isAway: n,
- idx: s
- }, function(e) {
- if (--l.numJoiningChannels, e) {
- var s = {
- id: e.channelname,
- name: e.channelname,
- gameid: e.gameid,
- ranked: e.ranked,
- emulator: e.emulator,
- outerNotifications: [],
- unseenMessages: [],
- unseenMentions: [],
- unseenChallenges: []
- };
- if (-1 !== e.idx) {
- var c = l.channels.length - 1,
- r = c + e.idx;
- r >= l.channels.length ? l.channels.splice(c, 0, s) : l.channels.splice(r, 0, s)
- } else l.channels.splice(l.channels.length - 1, 0, s);
- l.$refs.mainToolbar.setChannels(l.channels), a.a.nextTick(function() {
- var c = [],
- r = {};
- i.a.forEach(e.users, function(e) {
- c.push(l.addUserToChannel(e, s.id)), e.playing && (r[e.id] = e.playing)
- }), i.a.forEach(e.quarks, function(e) {
- i.a.forEach(e.players, function(t, n) {
- var a = r[t];
- a && l.onUserPlayingStateChanges(t, !0, a.gameName, e.quarkid, a.gameId, n)
- })
- }), 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)
- })
- } else l.channelItemInitialized(!0)
- })
- }
- },
- leaveChannel: function(e) {
- var t = this;
- M.a.leaveChannel(e, function() {
- var n = i.a.findIndex(t.channels, {
- id: e
- }); - 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))
- })
- },
- onUserIgnored: function(e, t) {
- var n = this;
- i.a.forEach(e.channels, function(a) {
- if (o.a.isGameChannel(a)) {
- var s = n.getChannelComponentById(a);
- s && s.onUserIgnored(e, t)
- }
- })
- },
- getChannelComponentById: function(e) {
- 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
- },
- onUserAwayStateChanges: function(e, t, n) {
- var s = this.globalUsers[e];
- if (n) {
- var o = s.channelsAway.indexOf(n),
- l = i.a.findIndex(this.channels, {
- id: n
- }); - 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)
- } else a.a.set(s, "away", t);
- if (n) {
- var c = this.getChannelComponentById(n);
- c && c.onUserAwayStateChanges(s, t, !1)
- } else {
- var r = this;
- i.a.forEach(s.channels, function(e) {
- var n = r.getChannelComponentById(e);
- n && n.onUserAwayStateChanges(s, t, !0)
- })
- }
- },
- onUserPlayingStateChanges: function(e, t, n, s, l, c, r) {
- var h = this.globalUsers[e];
- if (h) {
- var u = {
- channelId: n,
- gameName: n,
- quarkId: s,
- gameId: l
- };
- h.isLocal && (o.a.currentMatchElo[t ? "initial" : "final"] = r), a.a.set(h, "playing", t ? u : null);
- var d = this.getChannelComponentById(n);
- d && (t ? d.startMatch(s, h, c) : d.endMatch(s));
- var v = this;
- i.a.forEach(h.channels, function(e) {
- var a = v.getChannelComponentById(e);
- a && a.onUserPlayingStateChanges(h, t, n)
- }), !t && h.isLocal && (o.a.currentMatchElo = {})
- }
- },
- addUserToChannel: function(e, t) {
- var n = null;
- 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
- },
- removeUserFromChannel: function(e, t) {
- var n = this.globalUsers[e.id];
- if (n) {
- 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))
- }
- },
- showContextMenu: function(e) {
- var t = this;
- this.contextMenuData = e, a.a.nextTick(function() {
- t.$refs.contextMenu.show(e.position, e.limitRect)
- })
- },
- closeContextMenu: function() {
- this.contextMenuData = null
- },
- showEmojisView: function(e) {
- var t = this;
- this.emojisData = e, a.a.nextTick(function() {
- t.$refs.emojis.show(e.position, e.align)
- })
- },
- closeEmojisView: function() {
- this.emojisData = null
- },
- showUserInfo: function(e) {},
- closeUserInfoView: function() {
- this.userInfoData = null
- },
- onNewNotification: function(e) {
- var t = this.getChannelComponentById(e.channel.id),
- n = this;
- if (e.user = this.globalUsers[e.user.id], "message" !== e.type) {
- o.a.localUser.settings.soundNotifications && (this.notifySound || (this.notifySound = new Audio, this.notifySound.addEventListener("error", function(e) {
- 4 === e.currentTarget.error.code && (n.notifySound.src = "static/sounds/notify.mp3", n.notifySound.play())
- })), this.notifySound.src = e.gameid ? "static/sounds/" + e.gameid + "-challenge.mp3" : "static/sounds/notify.mp3", this.notifySound.play())
- }
- if ((!t.data.active || !document.hasFocus()) && "message" !== e.type && o.a.localUser.settings.desktopNotifications) {
- new c.a("Fightcade", {
- body: e.message.text,
- timeout: 5,
- icon: e.gameid ? "static/previews/" + e.gameid + ".png" : U.a.getGravatar(e.user.gravatar, 40),
- closeOnClick: !0,
- notifyClick: function() {
- n.gotoChatMessage(e.channel.id, e.message.id, e.message.lineId)
- }
- }).show()
- }
- if (!t.data.active) {
- var a = i.a.findIndex(this.channels, {
- id: e.channel.id
- });
- if (-1 !== a) {
- this.channels[a][o.a.notificationTypeToVar[e.type]].push({
- messageId: e.message.id,
- lineId: e.message.lineId,
- user: e.user
- })
- }
- if ("message" !== e.type) {
- var s = i.a.findIndex(this.channels, {
- active: !0
- }); - 1 !== s && s !== a && o.a.isGameChannel(this.channels[s].id) && this.channels[s].outerNotifications.unshift({
- type: e.type,
- channel: e.channel,
- message: e.message,
- user: e.user,
- timer: 0
- })
- }
- }
- this.$refs.mainToolbar.onNewNotification(e, !t.data.active)
- },
- gotoChannelByGameId: function(e) {
- this.gotoChannel(o.a.channelByGameId[e])
- },
- gotoChannel: function(e) {
- this.getChannelComponentById(e) ? this.selectChannel(e) : this.joinChannel(e, !0)
- },
- gotoChatMessage: function(e, t, n) {
- var a = this.getChannelComponentById(e);
- a && (a.active || this.selectChannel(e), a.displayChatMessage(t, n))
- },
- declineChallenge: function(e, t) {
- this.removeChallengeNotifications(t, e, "declined");
- var n = this.getChannelComponentById(e);
- n && n.declineChallenge(t)
- },
- acceptChallenge: function(e, t) {
- if (!o.a.localUser.playing) {
- this.removeChallengeNotifications(t, e, "accepted");
- var n = this.getChannelComponentById(e);
- n && n.acceptChallenge(t)
- }
- },
- getCountry: function(e) {
- return e ? (e.iso_code = e.iso_code.toLowerCase(), e) : "unknown"
- },
- removeChallengeNotifications: function(e, t, n) {
- var s = i.a.findIndex(this.channels, {
- id: t
- });
- if (-1 !== s)
- for (var l = this.channels[s][o.a.notificationTypeToVar.challenge], c = 0; c < l.length; ++c)
- if (l[c].user.id === e.id) {
- a.a.delete(l, c);
- break
- }
- for (var r = 0; r < this.channels.length; ++r)
- if (o.a.isGameChannel(this.channels[r].id))
- for (var h = this.channels[r].outerNotifications, u = 0; u < h.length; ++u)
- if ("challenge" === h[u].type && h[u].user.id === e.id && h[u].channel.id === t) {
- a.a.delete(h, u);
- break
- }
- this.$refs.mainToolbar.updateChallengeNotification(e, t, n), this.$refs.mainToolbar.removeChallengeNotifications()
- },
- channelItemInitialized: function(e) {
- e || ++this.numChannelsInitialized, this.numChannelsInitialized === this.channels.length - o.a.baseChannels.length && (this.channelsInitialized = !0, this.checkChannelsAreInitialized())
- },
- onWelcomeChannelInitialized: function() {
- this.welcomeChannelInitialized = !0, this.checkChannelsAreInitialized()
- },
- checkChannelsAreInitialized: function() {
- if (this.welcomeChannelInitialized && this.channelsInitialized) {
- var e = this;
- i.a.delay(function() {
- e.initializingApp = !1
- }, 500)
- }
- },
- checkPerksAvailability: function() {
- var e = o.a.localUser,
- t = !1;
- 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({
- theme: e.settings.theme
- })), o.a.setTheme(e.settings.theme)
- }
- }
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var a = n(3),
- s = n(2),
- i = n(5),
- o = n(124),
- l = n.n(o),
- c = n(122),
- r = n.n(c),
- h = n(121),
- u = n.n(h);
- t.default = {
- name: "add-channel",
- data: function() {
- return {
- openedSection: "search"
- }
- },
- components: {
- Search: l.a,
- Favorites: r.a,
- Discover: u.a
- },
- methods: {
- joinChannel: function(e) {
- this.$emit("join-channel", e, !1)
- },
- favChannel: function(e, t) {
- var n = e.name;
- if (i.a.favChannel(n, t), e.isFavorite = t, t) - 1 === s.a.localUser.favoritesChannels.indexOf(n) && s.a.localUser.favoritesChannels.push(n);
- else {
- var o = s.a.localUser.favoritesChannels.indexOf(n); - 1 !== o && a.a.delete(s.a.localUser.favoritesChannels, o)
- }
- },
- onUserChannelIO: function() {
- this.$refs[this.openedSection].onUserChannelIO()
- },
- onSelect: function() {
- this.$refs.search.onSelect()
- },
- openSection: function(e) {
- e !== this.openedSection && (this.openedSection = e, "search" === e ? this.$refs.search.onSelect() : "favorites" === e && this.$refs.favorites.onSelect())
- },
- openPatreonChannel: function() {
- this.$emit("patreon-info", "patreon-channel")
- }
- },
- computed: {},
- watch: {}
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- }), t.default = {
- name: "add-channel-item",
- props: ["data"],
- methods: {
- select: function() {
- this.data.active || this.$emit("select", this.data.id)
- }
- }
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var a = n(3),
- s = n(1),
- i = n.n(s),
- o = n(129),
- l = n.n(o),
- c = n(144),
- r = n.n(c),
- h = n(5),
- u = n(2);
- t.default = {
- name: "channel",
- props: ["data"],
- components: {
- Chat: l.a,
- UsersList: r.a
- },
- data: function() {
- return {
- challengesRequests: [],
- challengesRequested: [],
- notificationsUsers: [{
- name: "@channel"
- }],
- matches: {},
- usersByName: {}
- }
- },
- methods: {
- onJoin: function(e) {
- this.$refs.usersList.setUsers(e.users), this.$refs.chat.setChannelName(this.data.name), this.$refs.chat.addChannelMessage(e.motd), this.usersByName = {};
- var t = this;
- i.a.forEach(e.users, function(e) {
- t.usersByName[e.name] = e, t.notificationsUsers.push({
- name: "@" + e.name,
- gravatar: e.gravatar
- })
- }), this.sortNotificationsUsers(), this.$refs.chat.setChannelNotificationUsers(this.notificationsUsers)
- },
- addUser: function(e) {
- this.$refs.usersList.addUser(e), this.notificationsUsers.push({
- name: "@" + e.name,
- gravatar: e.gravatar
- }), 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")
- },
- removeUser: function(e) {
- this.$refs.usersList.removeUser(e);
- var t = i.a.findIndex(this.notificationsUsers, {
- name: "@" + e.name
- }); - 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")
- },
- sortNotificationsUsers: function() {
- this.notificationsUsers = i.a.orderBy(this.notificationsUsers, function(e) {
- return e.name.length
- }, ["desc"])
- },
- onChatMessage: function(e, t) {
- var n = this.$refs.chat.addChatMessage(e, t),
- a = t;
- n.notify && (a = e.name + " mentioned you: " + a), this.$emit("new-notification", {
- type: n.notify ? "mention" : "message",
- user: e,
- channel: {
- id: this.data.id,
- name: this.data.name
- },
- message: {
- id: n.messageInfo.id,
- lineId: n.messageInfo.lines.length - 1,
- text: a
- }
- })
- },
- displayChatMessage: function(e, t) {
- this.$refs.chat.gotoMessage(e, t)
- },
- onSelect: function() {
- this.$refs.chat.focus(), this.$refs.chat.scrollToBottom(), this.$refs.chat.manageNotificationsHelpersVisibility()
- },
- showContextMenu: function(e) {
- this.$emit("show-context-menu", e)
- },
- showUserInfo: function(e) {
- this.$emit("show-user-info", e)
- },
- challengeUser: function(e) {
- var t = -1 !== e.channelsAway.indexOf(this.data.id);
- if (!(e.isLocal || e.away || e.playing || t)) {
- var n = this;
- h.a.challengeUser(e.id, this.data.id, function(t) {
- if (!i.a.find(n.challengesRequests, function(t) {
- return t.user.id === e.id
- })) {
- var a = n.$refs.chat.addRequestChallengeMessage(e);
- n.challengesRequests.push({
- user: e,
- message: a.messageInfo
- })
- }
- })
- }
- },
- userChallenged: function(e) {
- if (!i.a.find(this.challengesRequested, function(t) {
- return t.user.id === e.id
- })) {
- var t = this.$refs.chat.addChallengeRequestedMessage(e);
- this.challengesRequested.push({
- user: e,
- message: t.messageInfo
- }), this.$emit("new-notification", {
- type: "challenge",
- user: e,
- gameid: this.data.gameid,
- channel: {
- id: this.data.id,
- name: this.data.name
- },
- message: {
- id: t.messageInfo.id,
- lineId: t.messageInfo.lines.length - 1,
- text: "You have been challenged by " + e.name
- }
- })
- }
- },
- showEmojisView: function(e) {
- this.$emit("show-emojis-view", e)
- },
- gotoChannelByGameId: function(e) {
- this.$emit("goto-channel-by-gameid", e)
- },
- onUserIgnoredEvent: function(e, t) {
- this.$emit("on-user-ignored", e, t)
- },
- gotoChatMessage: function(e, t, n) {
- this.$emit("goto-chat-message", e, t, n)
- },
- challengeCancelled: function(e) {
- this.removeChallengeRequested(e.id, "cancelled")
- },
- challengeDeclined: function(e) {
- this.removeChallengeRequest(e.id, "declined")
- },
- challengeAccepted: function(e, t) {
- this.removeChallengeRequest(e.id, "accepted")
- },
- cancelChallenge: function(e) {
- this.removeChallengeRequest(e.id, "cancelled"), h.a.cancelChallenge(e.id, this.data.id)
- },
- cancelAllChallengesRequests: function() {
- var e = this,
- t = i.a.clone(this.challengesRequests);
- i.a.forEach(t, function(t) {
- e.cancelChallenge(t.user)
- })
- },
- declineChallenge: function(e) {
- this.removeChallengeRequested(e.id, "declined"), h.a.declineChallenge(e.id, this.data.id)
- },
- declineAllChallengesRequested: function() {
- var e = this,
- t = i.a.clone(this.challengesRequested);
- i.a.forEach(t, function(t) {
- e.declineChallenge(t.user)
- })
- },
- acceptChallenge: function(e) {
- this.removeChallengeRequested(e.id, "accepted"), h.a.acceptChallenge(e.id, this.data.id)
- },
- declineChallengeEvent: function(e) {
- this.$emit("decline-challenge", this.data.id, e)
- },
- acceptChallengeEvent: function(e) {
- this.$emit("accept-challenge", this.data.id, e)
- },
- declineOuterChallenge: function(e, t) {
- this.$emit("decline-challenge", e, t)
- },
- acceptOuterChallenge: function(e, t) {
- this.$emit("accept-challenge", e, t)
- },
- removeChallengeRequest: function(e, t) {
- var n = i.a.findIndex(this.challengesRequests, function(t) {
- return t.user.id === e
- });
- if (-1 !== n) {
- this.$refs.chat.$refs[this.challengesRequests[n].message.id][0].onChallengeChangesState(t), a.a.delete(this.challengesRequests, n)
- }
- },
- removeChallengeRequested: function(e, t) {
- var n = i.a.findIndex(this.challengesRequested, function(t) {
- return t.user.id === e
- });
- if (-1 !== n) {
- this.$refs.chat.$refs[this.challengesRequested[n].message.id][0].onChallengeChangesState(t), a.a.delete(this.challengesRequested, n)
- }
- },
- startMatch: function(e, t, n) {
- if (this.matches[e]) {
- var s = this.matches[e];
- a.a.set(s, 0 === s.playerId ? "player2" : "player1", t)
- } else {
- var i = {
- player1: {
- name: "<disconnected>",
- country: {},
- settings: {
- ranked: !1
- }
- },
- player2: {
- name: "<disconnected>",
- country: {},
- settings: {
- ranked: !1
- }
- },
- quarkId: e,
- numSpectators: 0,
- playerId: n
- };
- i[0 === n ? "player1" : "player2"] = t, a.a.set(this.matches, e, i), this.$refs.usersList.addMatch(this.matches[e])
- }
- },
- endMatch: function(e) {
- if (this.matches[e]) {
- var t = this.matches[e];
- (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
- }
- var n = u.a.currentMatchElo;
- n && n.initial >= 0 && n.final >= 0 && this.$refs.chat.addEloMessage(u.a.currentMatchElo.initial, u.a.currentMatchElo.final)
- },
- playAlone: function() {
- window.location.assign(h.a.getPlayAloneUri(this.data.emulator, this.data.gameid))
- },
- leaveChannel: function() {
- this.$emit("leave-channel", this.data.id)
- },
- onUserAwayStateChanges: function(e, t, n) {
- if (e.name in this.usersByName && (this.$refs.usersList.rebuildUsersLists(), e.id !== u.a.localUser.id)) {
- var a = t ? " is now away" : " is now available";
- this.$refs.chat.addUserEventMessage(e.name + a)
- }
- },
- onUserPlayingStateChanges: function(e, t, n) {
- if (e.name in this.usersByName && (this.$refs.usersList.rebuildUsersLists(), e.id !== u.a.localUser.id && this.data.id === n)) {
- var a = t ? " is playing" : " is not playing";
- this.$refs.chat.addUserEventMessage(e.name + a)
- }
- },
- onUserIgnored: function(e, t) {
- this.$refs.usersList.rebuildUsersLists()
- },
- onQuarkStats: function(e, t) {
- this.matches[e] && a.a.set(this.matches[e], "numSpectators", t)
- }
- }
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var a = n(3),
- s = n(1),
- i = n.n(s),
- o = n(5);
- t.default = {
- name: "channel-item",
- props: ["data"],
- data: function() {
- return {
- channelItemThumbnail: {
- backgroundImage: "url(/static/previews/" + this.data.gameid + ".png)"
- }
- }
- },
- mounted: function() {
- this.$emit("channel-item-initialized")
- },
- computed: {
- truncatedGameId: function() {
- return i.a.truncate(this.data.id, {
- length: 32
- })
- },
- muteChannelTitle: function() {
- return this.data.localUserIsAway ? "Unmute channel" : "Mute channel"
- }
- },
- methods: {
- select: function() {
- this.data.active || (this.$emit("select", this.data.id), this.$emit("show-tooltip", null, null))
- },
- showContextMenu: function(e) {},
- showTooltip: function() {
- this.data.active || this.$emit("show-tooltip", this.data.name, this.$refs.tooltip.getBoundingClientRect().bottom)
- },
- hideTooltip: function() {
- this.$emit("show-tooltip", null, null)
- },
- leaveChannel: function() {
- this.$emit("leave-channel", this.data.id)
- },
- onChannelAway: function() {
- a.a.set(this.data, "localUserIsAway", !this.data.localUserIsAway), o.a.setAway(this.data.localUserIsAway, this.data.id)
- }
- }
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- }), t.default = {
- name: "discover",
- data: function() {
- return {
- favoriteChannels: [],
- fetchingData: !1
- }
- },
- methods: {},
- computed: {},
- watch: {}
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var a = n(28),
- s = n.n(a),
- i = n(5),
- o = n(2),
- l = n(1),
- c = n.n(l);
- t.default = {
- name: "favorites",
- components: {
- PaginatedList: s.a
- },
- data: function() {
- return {
- channels: [],
- fetchingData: !1,
- noItemsInfo: {
- emoji: "( รยกรยฐ รลรโ รยกรยฐ)",
- text: "No favorites yet?"
- }
- }
- },
- methods: {
- onSelect: function() {
- this.requestChannels()
- },
- requestChannels: function() {
- var e = this;
- this.$refs.paginatedList.startFetching(), this.channels = [], i.a.listFavoritesChannels(function(t) {
- c.a.forEach(t.channels, function(e) {
- e.isFavorite = !0, e.alreadyJoined = -1 !== o.a.localUser.channels.indexOf(e.name)
- }), e.channels = t.channels, e.$refs.paginatedList.endFetching(!1, e.channels)
- })
- },
- joinChannel: function(e) {
- this.$emit("join-channel", e)
- },
- favChannel: function(e, t) {
- e.isFavorite = !1, this.$emit("fav-channel", e, t)
- },
- onUserChannelIO: function() {
- c.a.forEach(this.channels, function(e) {
- e.alreadyJoined = -1 !== o.a.localUser.channels.indexOf(e.name)
- })
- },
- openPatreonChannel: function() {
- this.$emit("patreon-info", "patreon-channel")
- }
- }
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var a = n(2);
- t.default = {
- name: "paginated-list",
- props: ["noItemsInfo", "hideUnfavChannels", "hideFooter"],
- data: function() {
- return {
- fetchingData: !1,
- title: "",
- channels: [],
- totalChannels: 0,
- prevButtonAvailable: !1,
- nextButtonAvailable: !1,
- numChannelsPerPage: 50,
- firstChannelVisible: 0,
- userRole: a.a.localUser.role
- }
- },
- methods: {
- startFetching: function() {
- this.fetchingData = !0
- },
- endFetching: function(e, t, n, a) {
- 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
- },
- getNumUsers: function(e) {
- return e.clients || 0
- },
- joinChannel: function(e) {
- this.channelIsDisabled(e) || this.$emit("join-channel", e.name)
- },
- favChannel: function(e) {
- this.$emit("fav-channel", e, !e.isFavorite)
- },
- channelIsVisible: function(e) {
- return !this.hideUnfavChannels || e.isFavorite
- },
- gotoPageOffset: function(e) {
- (e > 0 && this.nextButtonAvailable || e < 0 && this.prevButtonAvailable) && this.$emit("goto-page-offset", e)
- },
- channelIsDisabled: function(e) {
- return e.alreadyJoined || a.a.localUser.maxNumChannelsReached || a.a.localUser.role < e.available_for
- },
- channelIsAvaibleForUser: function(e) {
- return !a.a.localUser.maxNumChannelsReached && a.a.localUser.role >= e.available_for
- },
- getReasonChannelNotAvailable: function(e) {
- 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."
- },
- channelTitle: function(e, t) {
- if (t && e.alreadyJoined) return "You're already on this channel";
- var n;
- return n = e.system ? " - " + e.system : "", e.name + n
- },
- footerIsVisible: function() {
- return this.channels.length > 0 && !this.hideFooter
- },
- lazyThumbnailBg: function(e) {
- return "/static/previews/" + e.gameid + ".png"
- },
- openPatreonChannel: function() {
- this.$emit("patreon-info", "patreon-channel")
- }
- },
- computed: {
- pageRange: function() {
- return this.firstChannelVisible + 1 + "-" + Math.min(this.firstChannelVisible + this.numChannelsPerPage, this.totalChannels)
- }
- }
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- }), t.default = {
- name: "patreon-channel",
- mounted: function() {
- this.$emit("initialized")
- },
- methods: {
- onSelect: function() {}
- }
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var a = n(3),
- s = n(1),
- i = n.n(s),
- o = n(5),
- l = n(2),
- c = n(28),
- r = n.n(c);
- t.default = {
- name: "search",
- components: {
- PaginatedList: r.a
- },
- data: function() {
- return {
- page: 0,
- channels: [],
- textFilter: "",
- rankedFilter: 0,
- yearFilter: 0,
- genreFilter: 0,
- systemFilter: 0,
- openedFilters: !1,
- genres: [],
- years: [],
- systems: [],
- rankedOptions: ["All", "Ranked", "Unranked"],
- noItemsInfo: {
- emoji: "(รขโขยฏรยฐรขโยกรยฐ)รขโขยฏรฏยธยต รขโยปรขโยรขโยป",
- text: "No game channels found with those search terms, please try again."
- }
- }
- },
- methods: {
- onSelect: function() {
- var e = this;
- 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() {
- e.$refs.textFilter.focus()
- })
- },
- requestChannels: i.a.throttle(function(e) {
- var t = 0 !== this.genreFilter ? this.genres[this.genreFilter] : null,
- n = 0 !== this.yearFilter ? this.years[this.yearFilter] : null,
- a = 0 !== this.systemFilter ? this.systems[this.systemFilter] : null,
- s = 0 !== this.rankedFilter ? 1 === this.rankedFilter : null,
- c = this.textFilter ? this.textFilter : null,
- r = this;
- this.$refs.paginatedList.startFetching(), this.channels = [], this.page = e || 0, o.a.listChannels(this.page, c, t, n, a, s, function(e) {
- var o = null === t && null === n && null === a && null === s && null === c ? "All Games" : "Search Results";
- i.a.forEach(e.channels, function(e) {
- e.isFavorite = -1 !== l.a.localUser.favoritesChannels.indexOf(e.name), e.alreadyJoined = -1 !== l.a.localUser.channels.indexOf(e.name)
- }), r.channels = e.channels, r.$refs.paginatedList.endFetching(o, r.channels, e.page, e.totalChannels)
- })
- }, 300),
- toggleChannelActions: function() {
- this.channelActionsVisible = !this.channelActionsVisible
- },
- joinChannel: function(e) {
- this.$emit("join-channel", e)
- },
- favChannel: function(e, t) {
- this.$emit("fav-channel", e, t)
- },
- toggleFilters: function() {
- this.openedFilters = !this.openedFilters
- },
- clearFilters: function() {
- this.yearFilter = 0, this.genreFilter = 0, this.systemFilter = 0, this.rankedFilter = 0, this.requestChannels(0)
- },
- onUserChannelIO: function() {
- i.a.forEach(this.channels, function(e) {
- e.alreadyJoined = -1 !== l.a.localUser.channels.indexOf(e.name)
- })
- },
- gotoPageOffset: function(e) {
- this.requestChannels(this.page + e)
- },
- openPatreonChannel: function() {
- this.$emit("patreon-info", "patreon-channel")
- }
- },
- watch: {
- textFilter: function(e) {
- this.requestChannels(0)
- }
- }
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- }), t.default = {
- name: "welcome-channel",
- mounted: function() {
- this.$emit("initialized")
- },
- methods: {
- onSelect: function() {},
- openPatreonChannel: function() {
- this.$emit("channel-selected", "patreon-channel")
- }
- }
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- }), t.default = {
- name: "bot-message",
- props: ["data"]
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var a = n(6);
- t.default = {
- name: "challenge-requested-message",
- props: ["data", "channel"],
- data: function() {
- return {
- state: "active"
- }
- },
- methods: {
- modifyChallenge: function(e) {
- this.$emit(e + "-challenge", this.data.opponent)
- },
- isVisible: function(e) {
- return a.a.elementIsVisible(this.$refs.line, e)
- },
- scrollTo: function() {
- this.$refs.line.scrollIntoView(!0)
- },
- onChallengeChangesState: function(e) {
- this.state = e
- }
- },
- computed: {
- avatarSrc: function() {
- return a.a.getGravatar(this.data.opponent.gravatar, 40)
- },
- pingSrc: function() {
- return "static/ping/connection_" + (this.data.opponent.vping || 0) + ".svg"
- },
- pingTitle: function() {
- return "Estimated ping: " + (this.data.opponent.ping || "unknown") + " ms"
- },
- flagSrc: function() {
- return "static/flags/" + (this.data.opponent.country.iso_code || "unknown") + ".svg"
- },
- rankSrc: function() {
- return "static/ranks/rank" + (this.data.opponent.channelRank[this.channel.id] || 0) + ".svg"
- },
- message: function() {
- switch (this.state) {
- case "active":
- return "You have been challenged!";
- case "cancelled":
- return "The challenge was cancelled by " + this.data.opponent.name;
- case "declined":
- return "You have rejected the challenge from " + this.data.opponent.name;
- case "accepted":
- return "Let's play with " + this.data.opponent.name + "!"
- }
- return ""
- }
- }
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var a = n(6);
- t.default = {
- name: "channel-message",
- props: ["data"],
- methods: {
- timeInfo: function(e) {
- return a.a.formatTime(e)
- },
- onLineBlockClick: function(e) {
- -1 !== e.class.indexOf("link") && window.open(e.href || e.text, "_blank")
- }
- }
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var a = n(3),
- s = n(1),
- i = n.n(s),
- o = n(2),
- l = n(130),
- c = n.n(l),
- r = n(128),
- h = n.n(r),
- u = n(126),
- d = n.n(u),
- v = n(131),
- f = n.n(v),
- g = n(133),
- m = n.n(g),
- p = n(127),
- C = n.n(p),
- _ = n(132),
- w = n.n(_),
- y = n(134),
- k = n.n(y),
- x = n(6),
- b = n(5),
- I = n(34),
- M = {
- unseenMessages: {
- type: "message",
- title: "New messages"
- },
- unseenMentions: {
- type: "mention",
- title: "New mentions"
- },
- unseenChallenges: {
- type: "challenge",
- title: "New challenges"
- }
- };
- t.default = {
- name: "chat",
- props: ["channel", "usersByName"],
- data: function() {
- return {
- channelName: "",
- messages: [],
- messageIdx: 1,
- inputText: "",
- matchString: "",
- matchActiveIdx: -1,
- matchesList: [],
- matchType: null,
- notificationUsers: [],
- notificationsHelpers: [],
- autoscroll: !0,
- ignoreNextScrollEvent: !1,
- pauseOuterNotificationsTimer: !1,
- prevMousePos: {
- x: -1,
- y: -1
- }
- }
- },
- components: {
- ChatMessage: c.a,
- ChannelMessage: h.a,
- BotMessage: d.a,
- EloMessage: f.a,
- RequestChallengeMessage: m.a,
- ChallengeRequestedMessage: C.a,
- RawMessage: w.a,
- TerminalMessage: k.a
- },
- computed: {
- channelBg: function() {
- return {
- backgroundImage: "url(/static/ui/scanlines.png), url(/static/previews/" + this.channel.gameid + ".png)"
- }
- },
- matchTitle: function() {
- return ({
- user: "Users",
- channel: "Channels",
- command: "Commands"
- }[this.matchType] || "") + " matching"
- },
- outerNotifications: function() {
- return this.channel.outerNotifications.slice(0, 5)
- }
- },
- mounted: function() {
- var e = this;
- this.timer = setInterval(function() {
- if (!e.pauseOuterNotificationsTimer && e.channel.outerNotifications.length > 0)
- for (var t = e.channel.outerNotifications.length - 1; t >= 0; --t) {
- var n = e.channel.outerNotifications[t];
- n.timer += 1, n.timer >= 5 && a.a.delete(e.channel.outerNotifications, t)
- }
- }, 1e3)
- },
- beforeDestroy: function() {
- clearInterval(this.timer)
- },
- methods: {
- setChannelName: function(e) {
- this.channelName = e
- },
- setChannelNotificationUsers: function(e) {
- this.notificationUsers = e
- },
- focus: function() {
- var e = this;
- a.a.nextTick(function() {
- e.$refs.input.focus()
- })
- },
- manageNotificationsHelpersVisibility: function() {
- var e = this;
- i.a.defer(function() {
- e.notificationsHelpers = [], i.a.forEach(M, function(t, n) {
- if (e.channel[n].length > 0) {
- var s = e.channel[n][0].messageId;
- e.$refs[s] && a.a.nextTick(function() {
- e.$refs[s][0].isVisible(e.$refs.chatWrapper, e.channel[n][0].lineId) ? e.channel[n] = [] : e.notificationsHelpers.push(t)
- })
- }
- })
- }, this.autoscroll ? 5 : 0)
- },
- gotoMessage: function(e, t) {
- if (this.$refs[e]) {
- var n = this;
- a.a.nextTick(function() {
- n.$refs[e][0].scrollTo(t)
- })
- }
- },
- onMessageSent: function(e, t) {
- this.$refs[e] && this.$refs[e][0].onSent && this.$refs[e][0].onSent(t)
- },
- addChannelMessage: function(e) {
- return this.internalAddMessage({
- author: {
- name: "channel"
- },
- message: e,
- type: "channel"
- })
- },
- addChatMessage: function(e, t, n) {
- return this.internalAddMessage({
- author: e,
- message: t,
- type: "chat"
- }, n)
- },
- addBotMessage: function(e) {
- return this.internalAddMessage({
- author: {
- name: "fcbot"
- },
- message: e,
- type: "bot"
- })
- },
- addEloMessage: function(e, t) {
- var n = {
- author: {
- name: "channel"
- },
- elo: {
- initial: e,
- final: t
- },
- type: "elo"
- };
- this.messages.push(n), this.scrollToBottom()
- },
- addTerminalMessage: function(e) {
- var t = {
- author: {
- name: "terminal"
- },
- type: "terminal",
- lines: i.a.isArray(e) ? e : [e]
- };
- this.messages.push(t), this.scrollToBottom()
- },
- addUserEventMessage: function(e) {
- o.a.localUser.settings.userEventsNotifications && this.addBotMessage(e)
- },
- addRequestChallengeMessage: function(e) {
- return this.internalAddMessage({
- author: {
- name: "channel"
- },
- type: "requestChallenge",
- message: "INTERNAL_MSG_USED",
- opponent: e
- })
- },
- addChallengeRequestedMessage: function(e) {
- return this.internalAddMessage({
- author: {
- name: "channel"
- },
- type: "challengeRequested",
- message: "INTERNAL_MSG_USED",
- opponent: e
- })
- },
- internalAddMessage: function(e, t) {
- var n = this.parseMessage(e.author, e.message, t),
- s = new Date,
- o = this.messages.length > 0 ? this.messages[this.messages.length - 1] : {};
- if (-1 !== ["channel", "chat"].indexOf(e.type) && e.author === o.author) o.lines.push({
- time: s,
- blocks: this.createTextBlocks(n.message)
- });
- else {
- var l = i.a.clone(e);
- l.id = this.messageIdx++, l.lines = [{
- type: e.type,
- time: s,
- blocks: this.createTextBlocks(n.message)
- }], a.a.delete(l, "message"), this.messages.push(l)
- }
- return this.scrollToBottom(), {
- notify: n.notify,
- messageInfo: this.messages[this.messages.length - 1]
- }
- },
- parseMessage: function(e, t, n) {
- var a = [],
- s = -1,
- l = t.toLowerCase();
- n = " " + (n || ""), i.a.forEach(["http://", "https://"], function(e) {
- for (s = t.indexOf(e); - 1 !== s;) {
- var n = t.indexOf(" ", s + e.length) - s;
- n < 0 && (n = t.length - s);
- var i = t.substring(s, s + n),
- o = i.indexOf("|"),
- 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({
- idx: s,
- len: n,
- type: "link",
- href: l
- }), s = t.indexOf(e, s + 1)
- }
- }), l = t.toLowerCase();
- var c = [];
- i.a.forEach(this.notificationUsers, function(e) {
- var t = e.name.toLowerCase();
- for (s = l.indexOf(t); - 1 !== s;) - 1 === c.indexOf(s) && (a.push({
- idx: s,
- len: t.length,
- type: "notification"
- }), c.push(s)), s = l.indexOf(t, s + 1)
- });
- var r = [];
- i.a.forEach(o.a.channelsList.orderByGameIdLength, function(e) {
- var t = "#" + e.gameId.toLowerCase();
- for (s = l.indexOf(t); - 1 !== s;) - 1 === r.indexOf(s) && (a.push({
- idx: s,
- len: t.length,
- type: "channel"
- }), r.push(s)), s = l.indexOf(t, s + 1)
- }), a = i.a.sortBy(a, ["idx"]);
- var h = [],
- u = 0,
- d = !1,
- v = this,
- f = ["@channel", "@" + o.a.localUser.name];
- if (i.a.forEach(a, function(a) {
- a.idx !== u && h.push({
- class: "regular" + n,
- text: t.substring(u, a.idx)
- });
- var s = {
- class: "",
- text: t.substring(a.idx, a.idx + a.len)
- };
- switch ("link" === a.type && (s.href = a.href), a.type) {
- case "notification":
- var i = null;
- if ("@channel" !== s.text) {
- var o = s.text.substring(1, s.text.length);
- i = v.usersByName[o] || null
- }
- s.class = "user", s.author = i, (e.isLocal || -1 !== f.indexOf(s.text)) && (s.class = "highlight", d = !0);
- break;
- default:
- s.class = a.type
- }
- s.class += n, h.push(s), u = a.idx + a.len
- }), u < t.length) {
- var g = t.substring(u, t.length);
- h.push({
- class: "regular" + n,
- text: g
- })
- }
- return {
- notify: d,
- message: h
- }
- },
- scrollToBottom: function() {
- if (this.autoscroll) {
- var e = this;
- i.a.defer(function() {
- e.ignoreNextScrollEvent = !0, e.$refs.messagesContainer.scrollTop = e.$refs.messagesContainer.scrollHeight
- })
- }
- },
- onMessagesContainerScroll: function(e) {
- if (this.ignoreNextScrollEvent) this.ignoreNextScrollEvent = !1;
- else {
- var t = this.$refs.messagesContainer.scrollHeight - (this.$refs.messagesContainer.scrollTop + this.$refs.messagesContainer.clientHeight);
- this.manageNotificationsHelpersVisibility(), this.autoscroll = t < 25
- }
- },
- processMessage: function() {
- var e = this.inputText.trim(),
- t = this;
- if ("" !== e && 0 === this.matchesList.length)
- 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) {
- t.addTerminalMessage(e)
- });
- else if ("/" === this.inputText[0]) this.processCommand(e);
- else {
- this.autoscroll = !0;
- var n = this.addChatMessage(o.a.localUser, e, "sending"),
- a = n.messageInfo.lines.length - 1;
- b.a.sendChatMessage(this.channel.id, e, function(e) {
- t.onMessageSent(n.messageInfo.id, a)
- })
- }
- this.inputText = ""
- },
- processCommand: function(e) {
- var t = e.split(" "),
- n = t[0],
- a = i.a.findIndex(I.a.list, {
- name: n
- }),
- s = "";
- if (-1 !== a) {
- var o = t.length > 1 ? t.slice(1) : null;
- s = I.a.list[a].execute(this, o)
- } else s = n + " not found!";
- s && this.addBotMessage(s)
- },
- onKeyDown: function(e) {
- if (this.matchesList.length > 0) {
- var t = 0;
- switch (e.keyCode) {
- case 9:
- case 13:
- return e.stopPropagation(), e.preventDefault(), void this.insertMatch();
- case 38:
- return e.stopPropagation(), e.preventDefault(), t = this.matchActiveIdx - 1, t < 0 && (t = this.computedmatchesList().length - 1), void this.setActiveMatch(t, !0);
- case 40:
- return e.stopPropagation(), e.preventDefault(), t = this.matchActiveIdx + 1, t >= this.computedmatchesList().length && (t = 0), void this.setActiveMatch(t, !0)
- }
- } else 13 === e.keyCode && this.processMessage();
- var n = this;
- i.a.defer(function() {
- n.computeMatches()
- })
- },
- onFocus: function() {
- var e = this;
- i.a.defer(function() {
- e.computeMatches()
- })
- },
- onBlur: function() {
- this.resetMatchesView()
- },
- resetMatchesView: function() {
- i.a.forEach(this.matchesList, function(e) {
- a.a.set(e, "active", !1)
- }), this.matchString = "", this.matchesList = [], this.matchType = null, this.matchActiveIdx = -1
- },
- insertMatch: function() {
- var e = this.inputText.lastIndexOf(" ", this.$refs.input.selectionStart - 1) + 1,
- t = this.inputText.substring(0, e);
- switch (this.matchType) {
- case "user":
- t += this.matchesList[this.matchActiveIdx].text;
- break;
- case "channel":
- t += "#" + this.matchesList[this.matchActiveIdx].gameId;
- break;
- case "command":
- t += this.matchesList[this.matchActiveIdx].text
- }
- t += " " + this.inputText.substring(this.$refs.input.selectionStart, this.inputText.length), this.inputText = t, this.resetMatchesView();
- var n = this;
- i.a.delay(function() {
- n.$refs.input.focus()
- }, 0)
- },
- computeMatches: function() {
- var e = this.inputText.lastIndexOf(" ", this.$refs.input.selectionStart - 1) + 1,
- t = this.inputText.substring(e, this.$refs.input.selectionStart);
- this.resetMatchesView(), t && -1 !== ["@", "#"].indexOf(t[0]) ? (this.matchString = t, this.creatematchesList()) : 0 === this.inputText.indexOf("/") && (this.matchString = t, this.creatematchesList())
- },
- cancelChallenge: function(e) {
- this.$emit("cancel-challenge", e)
- },
- declineChallenge: function(e) {
- this.$emit("decline-challenge", e)
- },
- acceptChallenge: function(e) {
- this.$emit("accept-challenge", e)
- },
- onOuterChallengeNotificationClick: function(e, t) {
- var n = this.channel.outerNotifications[t];
- this.$emit(e + "-outer-challenge", n.channel.id, n.user), a.a.delete(this.channel.outerNotifications, t)
- },
- onOuterNotificationClick: function(e) {
- var t = this.channel.outerNotifications[e];
- this.$emit("goto-chat-message", t.channel.id, t.message.id, t.message.lineId), a.a.delete(this.channel.outerNotifications, e)
- },
- showUserInfo: function(e, t, n) {
- this.$emit("show-user-info", {
- user: e,
- position: t,
- limitRect: n
- })
- },
- challengeUser: function(e) {
- this.$emit("challenge-user", e)
- },
- gotoChannelByGameId: function(e) {
- this.$emit("goto-channel-by-gameid", e)
- },
- createTextBlocks: function(e) {
- return i.a.isArray(e) ? e : [{
- class: "regular",
- text: e
- }]
- },
- calculateActiveMatch: function(e) {
- var t = e.clientX,
- n = e.clientY;
- if (-1 === this.prevMousePos.x) this.prevMousePos.x = t, this.prevMousePos.y = n;
- else if (this.prevMousePos.x !== t && this.prevMousePos.y !== n) {
- this.prevMousePos.x = t, this.prevMousePos.y = n;
- for (var a = 0; a < this.matchesList.length; ++a) {
- var s = this.$refs["match_" + a][0].getBoundingClientRect();
- if (x.a.pointInBoundingBox(t, n, s)) {
- this.setActiveMatch(a);
- break
- }
- }
- }
- },
- setActiveMatch: function(e, t) {
- if (this.matchActiveIdx !== e && (-1 !== this.matchActiveIdx && a.a.set(this.matchesList[this.matchActiveIdx], "active", !1), this.matchActiveIdx = e, -1 !== this.matchActiveIdx)) {
- if (t) {
- var n = this.$refs.matchesList.getBoundingClientRect(),
- s = this.$refs["match_" + e][0].getBoundingClientRect();
- 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)
- }
- a.a.set(this.matchesList[e], "active", !0)
- }
- },
- creatematchesList: function() {
- if (this.matchString) {
- var e = this,
- t = function() {
- e.matchesList = i.a.sortBy(e.matchesList, ["text"]), e.matchesList.length > 0 && (e.$refs.matchesList.scrollTop = 0, e.setActiveMatch(0))
- },
- n = e.matchString.toLowerCase();
- if ("@" === this.matchString[0]) this.matchType = "user", i.a.forEach(this.notificationUsers, function(t) {
- 0 === t.name.toLowerCase().indexOf(n) && e.matchesList.push({
- text: t.name,
- gravatar: t.gravatar
- })
- }), t();
- else if ("/" === this.matchString[0]) this.matchType = "command", i.a.forEach(I.a.list, function(t) {
- 0 === t.name.indexOf(n) && e.matchesList.push({
- text: t.name,
- description: t.description
- })
- }), t();
- else if ("#" === this.matchString[0]) {
- this.matchType = "channel";
- var a = n.substring(1, n.length);
- i.a.forEach(o.a.channelsList.forNotifications, function(t) {
- 0 !== a.length && -1 === t.textToCompare.indexOf(a) || e.matchesList.push(t)
- }), t()
- }
- }
- },
- avatarSrc: function(e) {
- switch (this.matchType) {
- case "user":
- return "@channel" !== e.text ? x.a.getGravatar(e.gravatar, 24) : "static/ui/logo_icon_light.svg";
- case "channel":
- return "static/previews/" + e.gameId + ".png"
- }
- return null
- },
- showEmojisView: function() {
- var e = this.$refs.input.getBoundingClientRect();
- this.$emit("show-emojis-view", {
- position: {
- x: e.right - 16,
- y: e.top - 2
- },
- align: "bottom-right"
- })
- },
- computedmatchesList: function() {
- return this.matchesList.length <= 20 ? this.matchesList : this.matchesList.slice(0, 20)
- },
- discardUnseen: function(e) {
- this.channel[o.a.notificationTypeToVar[e]] = [];
- for (var t = 0; t < this.notificationsHelpers.length; ++t)
- if (this.notificationsHelpers[t].type === e) {
- a.a.delete(this.notificationsHelpers, t);
- break
- }
- },
- gotoUnseen: function(e) {
- var t = this.channel[o.a.notificationTypeToVar[e]][0];
- this.gotoMessage(t.messageId, t.lineId), this.discardUnseen(e)
- },
- pingSrc: function(e) {
- return "static/ping/connection_" + (e.vping || 0) + ".svg"
- },
- rankSrc: function(e) {
- return "static/ranks/rank" + (e.channelRank[this.channel.id] || 0) + ".svg"
- },
- getMessageClass: function(e) {
- return e.type + (e.author.role === o.a.userRole.dev ? " dev" : "")
- }
- }
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var a = n(1),
- s = n.n(a),
- i = n(6),
- o = n(2);
- t.default = {
- name: "chat-message",
- props: ["data"],
- data: function() {
- return {
- click: 0,
- linkPreview: {
- line: -1
- }
- }
- },
- methods: {
- onAvatarClick: function() {
- this.onClick(this.$refs.avatar)
- },
- onAuthorClick: function() {
- this.onClick(this.$refs.author)
- },
- onClick: function(e) {
- if (1 === ++this.click) {
- var t = this;
- s.a.delay(function() {
- 1 === t.click && (t.click = 0, t.showUserInfo(t.data.author, e))
- }, o.a.doubleClickTime)
- } else this.$emit("challenge-user", this.data.author), this.click = 0
- },
- showUserInfo: function(e, t) {
- if (e && e.id) {
- var n = this.$parent.$el.getBoundingClientRect(),
- a = t[0].getBoundingClientRect(),
- s = {
- x: a.right + 10,
- y: a.top
- };
- this.$emit("show-user-info", e, s, {
- right: n.right - 30,
- bottom: n.bottom - 30
- })
- }
- },
- onLineBlockClick: function(e, t, n) {
- if (-1 !== e.class.indexOf("link")) window.open(e.href || e.text, "_blank");
- else if (-1 !== e.class.indexOf("channel")) {
- var a = e.text.substring(1, e.text.length);
- this.canJoinChannel(a) && this.$emit("goto-channel-by-gameid", a)
- } else {
- var s = this.$refs["block_" + t + "_" + n];
- s && this.showUserInfo(e.author, s)
- }
- },
- onSent: function(e) {
- s.a.forEach(this.data.lines[e].blocks, function(e) {
- -1 !== e.class.indexOf("sending") && (e.class = e.class.replace("sending", ""))
- })
- },
- timeInfo: function(e) {
- return i.a.formatTime(e)
- },
- isVisible: function(e, t) {
- return i.a.elementIsVisible(this.$refs["line_" + t][0], e)
- },
- scrollTo: function(e) {
- this.$refs["line_" + e][0].scrollIntoView(!0)
- },
- canJoinChannel: function(e) {
- return -1 !== o.a.localUser.channels.indexOf(o.a.channelByGameId[e]) || !o.a.localUser.maxNumChannelsReached
- },
- blockTitle: function(e) {
- if (-1 !== e.class.indexOf("channel") && !this.canJoinChannel(e.text.substring(1, e.text.length))) {
- var t = o.a.localUser.role,
- n = "You can't join this channel since you reached the maximum amount of concurrent channels.";
- 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
- }
- return null
- },
- blockClass: function(e) {
- var t = e.class;
- return -1 === e.class.indexOf("channel") || this.canJoinChannel(e.text.substring(1, e.text.length)) || (t += " disabled"), t
- }
- },
- computed: {
- avatarSrc: function() {
- return i.a.getGravatar(this.data.author.gravatar, 40)
- }
- }
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- }), t.default = {
- name: "elo-message",
- props: ["data"],
- computed: {
- outcomeMsg: function() {
- return this.data.elo.final === this.data.elo.initial ? null : this.data.elo.final > this.data.elo.initial ? "won" : "lost"
- }
- }
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- }), t.default = {
- name: "raw-message",
- props: ["data"]
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- }), t.default = {
- name: "request-challenge-message",
- props: ["data"],
- data: function() {
- return {
- state: "active"
- }
- },
- methods: {
- cancelChallenge: function() {
- this.$emit("cancel-challenge", this.data.opponent)
- },
- onChallengeChangesState: function(e) {
- this.state = e
- }
- },
- computed: {
- message: function() {
- switch (this.state) {
- case "active":
- return "You have challenged " + this.data.opponent.name;
- case "cancelled":
- return "Challenge to " + this.data.opponent.name + " cancelled";
- case "accepted":
- return this.data.opponent.name + " accepts the challenge";
- case "declined":
- return this.data.opponent.name + " rejects the challenge"
- }
- return ""
- }
- }
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- }), t.default = {
- name: "terminal-message",
- props: ["data"]
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- }), t.default = {
- name: "context-menu",
- props: ["data"],
- computed: {
- itemType: function() {
- if ("challenge" !== this.data.id) return "contextMenuItem"
- },
- itemClass: function() {
- return {
- disabled: this.data.disabled,
- warning: this.data.warning,
- "button-generic": "challenge" === this.data.id
- }
- },
- ignoreToggle: function() {
- return "ignoreToggle_" + this.channel.gameid
- }
- },
- methods: {
- click: function(e) {
- "checkbox" === this.data.type && "checkbox" !== e.target.type || this.data.disabled || this.$emit("click", this.data.id, "checkbox" !== this.data.type)
- }
- }
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var a = n(135),
- s = n.n(a),
- i = n(3);
- t.default = {
- name: "context-menu",
- props: ["data"],
- data: function() {
- return {
- menuPos: {}
- }
- },
- components: {
- Item: s.a
- },
- computed: {
- menuStyle: function() {
- return {
- top: this.menuPos.y + "px",
- left: this.menuPos.x + "px"
- }
- }
- },
- methods: {
- close: function() {
- this.$emit("close")
- },
- show: function(e, t) {
- if (t) {
- var n = this.$refs.menu.clientWidth,
- a = this.$refs.menu.clientHeight;
- t.right && e.x + n > t.right && (e.x -= n), t.bottom && e.y + a > t.bottom && (e.y -= a)
- }
- e.x -= 10, e.y += 8, i.a.set(this.menuPos, "x", e.x), i.a.set(this.menuPos, "y", e.y)
- },
- onItemClick: function(e, t) {
- this.data.callback(e), t && this.close()
- }
- }
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var a = n(33),
- s = n.n(a),
- i = n(3),
- o = n(1),
- l = n.n(o),
- c = n(14),
- r = n(6);
- t.default = {
- name: "login",
- components: {
- gRecaptcha: s.a
- },
- data: function() {
- return {
- working: !1,
- username: "",
- email: "",
- password: "",
- activeViewIsSignIn: !0,
- showAccountCreatedMessage: !1,
- errorMessages: {
- username: null,
- email: null,
- password: null,
- beta: null
- }
- }
- },
- methods: {
- validateInput: function(e, t, n) {
- 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)
- },
- doWork: function(e) {
- if (!this.working)
- if (this.validateInput(!this.signIn(), !0, !0)) {
- if (this.working = !0, this.signIn()) this.$emit("connect", this.username, this.password);
- else if (e) {
- var t = this;
- c.a.createUser(this.email, this.username, this.password, e, function(e) {
- t.working = !1, "error" === e.result ? t.manageErrors(e.error) : t.accountCreatedSuccess()
- })
- }
- } else this.errorMessages.email ? this.$refs.email.focus() : this.errorMessages.username ? this.$refs.username.focus() : this.$refs.password.focus()
- },
- connectAs: function(e) {
- this.$emit("connect", e, "")
- },
- onConnectError: function(e) {
- this.working = !1, this.manageErrors(e)
- },
- formTitle: function() {
- return this.signIn() ? "Log in" : "Create an account"
- },
- changeWorkActionText: function() {
- return this.signIn() ? "New user?" : "Already have an account?"
- },
- changeWorkActionLink: function() {
- return this.signIn() ? "Create an account" : "Log in"
- },
- workAction: function() {
- return this.signIn() ? "Connect" : "Register"
- },
- changeWorkActionLinkClicked: function() {
- if (!this.working) {
- this.activeViewIsSignIn = !this.activeViewIsSignIn, this.password = "", this.username = "", this.email = "", this.errorMessages = {
- username: null,
- email: null,
- password: null
- };
- var e = this;
- i.a.nextTick(function() {
- e.$refs.username.focus()
- })
- }
- },
- signIn: function() {
- return this.activeViewIsSignIn
- },
- manageErrors: function(e) {
- switch (e) {
- case "user-already-exists":
- this.errorMessages.username = "This username already exists.", this.$refs.username.focus();
- break;
- case "user-not-found":
- this.errorMessages.username = "This username doesn't exist.", this.$refs.username.focus();
- break;
- case "server-locked":
- this.errorMessages.username = "You are not allowed to log in at this moment. Server might be under maintenance.", this.$refs.username.focus();
- break;
- case "wrong-password":
- this.errorMessages.password = "Invalid password.", this.$refs.password.focus();
- break;
- case "no-beta-access":
- document.getElementsByTagName("h2")[0].style.display = "none", this.$refs.loginform.style.display = "none", this.errorMessages.beta = !0
- }
- },
- accountCreatedSuccess: function() {
- var e = this,
- t = this.username;
- this.showAccountCreatedMessage = !0, this.changeWorkActionLinkClicked(), l.a.delay(function() {
- e.showAccountCreatedMessage = !1
- }, 3e3), i.a.nextTick(function() {
- e.username = t, e.$refs.password.focus()
- })
- },
- gRecaptchaValidate: function() {
- 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))
- },
- gRecaptchaCallback: function(e) {
- this.doWork(e)
- },
- onFormKeyDown: function(e) {
- 13 === e.keyCode && this.signIn() && this.doWork()
- }
- }
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var a = n(3),
- s = n(1),
- i = n.n(s),
- o = n(2),
- l = n(6),
- c = n(120),
- r = n.n(c),
- h = n(118),
- u = n.n(h),
- d = n(5),
- v = n(140),
- f = n.n(v),
- g = n(139),
- m = n.n(g);
- t.default = {
- name: "main-toolbar",
- data: function() {
- return {
- channels: [],
- localUser: o.a.localUser,
- showSettings: !1,
- showNotifications: !1,
- showGlobalStateMenu: !1,
- showNotificationsIndicator: !1,
- global: o.a
- }
- },
- components: {
- ChannelItem: r.a,
- AddChannelItem: u.a,
- Settings: f.a,
- Notifications: m.a
- },
- computed: {
- avatarSrc: function() {
- return l.a.getGravatar(o.a.localUser.gravatar, 100)
- }
- },
- methods: {
- onChannelSelect: function(e) {
- this.showNotifications = !1, this.showSettings = !1, this.$emit("channel-selected", e)
- },
- onNewNotification: function(e, t) {
- this.$refs.notifications.onNewNotification(e), "message" !== e.type && (this.showNotificationsIndicator = t && !this.showNotifications)
- },
- setChannels: function(e) {
- this.channels = e
- },
- setActiveChannel: function(e) {
- var t = i.a.findIndex(this.channels, {
- active: !0
- }); - 1 !== t && a.a.set(this.channels[t], "active", !1);
- var n = i.a.findIndex(this.channels, {
- id: e
- }); - 1 !== e && a.a.set(this.channels[n], "active", !0)
- },
- showChannelContextMenu: function(e, t) {
- var n = -1 !== o.a.localUser.channelsAway.indexOf(e.id);
- this.contextMenuData = {
- channel: e,
- position: t,
- callback: this.onContextMenuItemClick,
- items: [{
- id: "toggle_channel_away",
- text: "Not available",
- type: "checkbox",
- active: n
- }, {
- id: "leave_channel",
- text: "Leave channel",
- warning: !0
- }]
- }, this.$emit("show-context-menu", this.contextMenuData)
- },
- onContextMenuItemClick: function(e) {
- switch (e) {
- case "toggle_channel_away":
- var t = -1 !== o.a.localUser.channelsAway.indexOf(this.contextMenuData.channel.id);
- d.a.setAway(!t, this.contextMenuData.channel.id);
- break;
- case "leave_channel":
- this.$emit("leave-channel", this.contextMenuData.channel.id)
- }
- },
- selectChannel: function() {
- this.showNotifications = !1, this.showSettings = !1, this.$emit("channel-selected", "welcome-channel")
- },
- acceptChallenge: function(e, t) {
- this.$emit("accept-challenge", e, t)
- },
- declineChallenge: function(e, t) {
- this.$emit("decline-challenge", e, t)
- },
- updateChallengeNotification: function(e, t, n) {
- this.$refs.notifications.updateChallengeNotification(e, t, n)
- },
- removeChallengeNotifications: function() {
- this.$refs.notifications.removeChallengeNotifications()
- },
- gotoChatMessage: function(e, t, n) {
- this.$emit("goto-chat-message", e, t, n)
- },
- setAwayState: function(e) {
- this.localUser.away = e, d.a.setAway(e), this.showGlobalStateMenu = !1
- },
- logOut: function() {
- d.a.logout()
- },
- leaveChannel: function(e) {
- this.$emit("leave-channel", e)
- },
- channelItemInitialized: function() {
- this.$emit("channel-item-initialized")
- },
- openPatreonChannel: function() {
- this.showSettings = !1, this.$emit("patreon-info", "patreon-channel")
- }
- }
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var a = n(3),
- s = n(1),
- i = n.n(s);
- t.default = {
- name: "notifications",
- data: function() {
- return {
- notifications: [],
- notificationIdx: 0
- }
- },
- methods: {
- closeNotifications: function() {
- this.$emit("close")
- },
- onNewNotification: function(e) {
- if ("message" !== e.type) {
- var t = {
- type: e.type,
- channel: e.channel,
- message: e.message,
- user: e.user,
- title: "New " + ("mention" === e.type ? "Mention" : "Challenge") + " on #" + e.channel.name
- },
- n = this;
- "challenge" === t.type && (t.challengeType = "requested"), this.notifications.unshift(t), a.a.nextTick(function() {
- i.a.forEach(n.$refs.notification_title, function(e) {
- e.title = t.title
- })
- })
- }
- },
- pingSrc: function(e) {
- return "static/ping/connection_" + (e.vping || 0) + ".svg"
- },
- rankSrc: function(e, t) {
- return "static/ranks/rank" + (t.channelRank[e.id] || 0) + ".svg"
- },
- onChallengeNotificationClick: function(e, t) {
- var n = this.notifications[t];
- this.$emit(e + "-challenge", n.channel.id, n.user), "accept" === e && this.closeNotifications()
- },
- onNotificationClick: function(e) {
- var t = this.notifications[e];
- this.$emit("goto-chat-message", t.channel.id, t.message.id, t.message.lineId), this.closeNotifications()
- },
- updateChallengeNotification: function(e, t, n) {
- for (var a = 0; a < this.notifications.length; ++a) {
- var s = this.notifications[a];
- if ("challenge" === s.type && s.user.id === e.id && s.channel.id === t) {
- this.notifications[a].challengeType = n;
- break
- }
- }
- },
- removeChallengeNotifications: function() {
- for (var e = 0; e < this.notifications.length; ++e) {
- "challenge" === this.notifications[e].type && (this.notifications[e].challengeType = "declined")
- }
- }
- }
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var a = n(1),
- s = n.n(a),
- i = n(2),
- o = n(6),
- l = n(5);
- t.default = {
- name: "settings",
- data: function() {
- return {
- localUser: i.a.localUser,
- delayValues: ["Automatic", "0 (more jerky)", 1, 2, 3, 4, 5, "6 (laggy)"],
- themesValues: [],
- editingEmail: !1,
- savingEmail: !1,
- editingEmailMessage: null,
- editingEmailMessageClass: "",
- editingPassword: !1,
- savingPassword: !1,
- editingPasswordMessage: null,
- editingPasswordMessageClass: "",
- password: "",
- email: ""
- }
- },
- computed: {
- avatarSrc: function() {
- return o.a.getGravatar(i.a.localUser.gravatar, 100)
- }
- },
- mounted: function() {
- var e = this;
- s.a.forEach(i.a.themes, function(t) {
- e.themesValues.push(t)
- })
- },
- methods: {
- closeSettings: function() {
- this.$emit("close")
- },
- saveSetting: function(e) {
- var t = {},
- n = {
- desktopNotifications: "desktop_notifications",
- soundNotifications: "sound_notifications",
- userEventsNotifications: "user_events_notifications"
- },
- a = e;
- 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)
- },
- startEditingValue: function(e) {
- var t = "editing" + e;
- this[t] || (this[t] = !0, "Email" === e && (this.email = this.localUser.email.substring(0, this.localUser.email.length - 1)))
- },
- saveValue: function(e) {
- var t = "editing" + e,
- n = t + "Message",
- a = n + "Class",
- i = "saving" + e,
- c = "",
- r = "";
- 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 = "");
- 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);
- this[i] = !0;
- var h = this,
- u = {};
- u[c] = r, l.a.updateUser(u, function(t, o) {
- h[i] = !1, h[a] = t ? "success" : "error", t ? (h[n] = "Your " + e + " has been updated succesfully.", s.a.delay(function() {
- h[n] = null
- }, 3e3)) : (h[n] = "Error updating " + e + ". Please try again later.", "Email" === e ? h.localUser.email = h.email : h.password = "")
- })
- },
- openPatreonChannel: function() {
- this.$emit("patreon-info", "patreon-channel")
- }
- }
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var a = n(1),
- s = n.n(a),
- i = n(6),
- o = n(2);
- t.default = {
- name: "match-item",
- props: ["channel", "data"],
- data: function() {
- return {
- click: 0
- }
- },
- methods: {
- showContextMenu: function(e) {
- var t = this.$parent.$el.getBoundingClientRect();
- this.$emit("show-context-menu-match", this.data, {
- x: e.clientX,
- y: e.clientY
- }, {
- right: t.right - 30,
- bottom: t.bottom - 30
- })
- },
- onClick: function(e) {
- if (1 === ++this.click) {
- var t = this;
- s.a.delay(function() {
- 1 === t.click && (t.showUserInfo(e), t.click = 0)
- }, o.a.doubleClickTime)
- } else this.$emit("spectate-match", this.data.player1), this.click = 0
- },
- showUserInfo: function(e) {
- var t = this.$el.getBoundingClientRect(),
- n = this.$parent.$el.getBoundingClientRect(),
- a = (e.clientX - t.left) / t.width,
- s = {
- x: t.left + 20,
- y: t.top
- };
- this.$emit("show-user-info", a <= .5 ? this.data.player1 : this.data.player2, s, {
- bottom: n.bottom - 30
- })
- },
- avatarSrc: function(e) {
- return i.a.getGravatar(e.gravatar, 34)
- },
- rankSrc: function(e) {
- return "static/ranks/rank" + (e.channelRank[this.channel.id] || 0) + ".svg"
- },
- flagSrc: function(e) {
- return "static/flags/" + (e.country.iso_code || "unknown") + ".svg"
- },
- isRanked: function(e) {
- return e.settings.ranked && this.channel.ranked
- },
- getRankTitle: function(e) {
- var t = e.channelRank[this.channel.id] || 0,
- n = ["E", "D", "C", "B", "A", "S"];
- return t > 0 && t <= n.length ? "Rank " + n[t - 1] : "Unknown rank"
- }
- }
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var a = n(3),
- s = n(6);
- t.default = {
- name: "user-info",
- data: function() {
- return {
- position: {},
- user: {}
- }
- },
- computed: {
- infoStyle: function() {
- return {
- top: this.position.y + "px",
- left: this.position.x + "px"
- }
- },
- stateClass: function() {
- var e = ["state"];
- return this.user.away ? e.push("away") : this.user.playing && e.push("playing"), e
- },
- avatarSrc: function() {
- return s.a.getGravatar(this.user.gravatar, 100)
- },
- flagSrc: function() {
- return "static/flags/" + (this.user.country.iso_code || "unknown") + ".svg"
- }
- },
- methods: {
- close: function() {
- this.$emit("close"), this.user = null
- },
- show: function(e, t, n, s) {
- if (this.user = e, n) {
- var i = this.$refs.content.clientWidth,
- o = this.$refs.content.clientHeight;
- ("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)
- }
- a.a.set(this.position, "x", t.x), a.a.set(this.position, "y", t.y)
- }
- }
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var a = n(1),
- s = n.n(a),
- i = n(6),
- o = n(2);
- t.default = {
- name: "user-item",
- props: ["user", "channel"],
- data: function() {
- return {
- click: 0
- }
- },
- computed: {
- avatarSrc: function() {
- return i.a.getGravatar(this.user.gravatar, 40)
- },
- flagSrc: function() {
- return "static/flags/" + (this.user.country.iso_code || "unknown") + ".svg"
- },
- isRanked: function() {
- return this.user.settings.ranked && this.channel.ranked
- },
- rankSrc: function() {
- return "static/ranks/rank" + (this.user.channelRank[this.channel.id] || 0) + ".svg"
- },
- pingSrc: function() {
- return "static/ping/connection_" + (this.user.vping || 0) + ".svg"
- },
- rankTitle: function() {
- var e = this.user.channelRank[this.channel.id] || 0,
- t = ["E", "D", "C", "B", "A", "S"];
- return e > 0 && e <= t.length ? "Rank " + t[e - 1] : "Unknown rank"
- },
- pingTitle: function() {
- return "Estimated ping: " + (this.user.ping || "unknown") + " ms"
- }
- },
- methods: {
- showContextMenu: function(e) {
- var t = this.$parent.$el.getBoundingClientRect();
- this.$emit("show-context-menu", this.user, {
- x: e.clientX,
- y: e.clientY
- }, {
- right: t.right - 30,
- bottom: t.bottom - 30
- })
- },
- onClick: function() {
- if (1 === ++this.click) {
- var e = this;
- s.a.delay(function() {
- if (1 === e.click) {
- var t = e.$parent.$el.getBoundingClientRect(),
- n = e.$el.getBoundingClientRect(),
- a = {
- x: n.left + 20,
- y: n.top
- };
- e.$emit("show-user-info", e.user, a, {
- bottom: t.bottom - 30
- }), e.click = 0
- }
- }, o.a.doubleClickTime)
- } else this.$emit("challenge-user", this.user), this.click = 0
- }
- }
- }
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var a = n(3),
- s = n(1),
- i = n.n(s),
- o = n(2),
- l = n(143),
- c = n.n(l),
- r = n(141),
- h = n.n(r),
- u = n(5);
- t.default = {
- name: "users-list",
- props: ["channel"],
- data: function() {
- return {
- users: [],
- matches: [],
- usersOnline: [],
- usersAway: [],
- usersIgnored: [],
- channelAway: !1
- }
- },
- components: {
- UserItem: c.a,
- MatchItem: h.a
- },
- computed: {
- matchesNumber: function() {
- return 2 * this.matches.length
- },
- channelAwayToggle: function() {
- return "channelAwayToggle_" + this.channel.gameid
- }
- },
- methods: {
- setUsers: function(e) {
- this.users = e, this.rebuildUsersLists()
- },
- addUser: function(e) {
- this.users.push(e), this.rebuildUsersLists()
- },
- removeUser: function(e) {
- var t = i.a.findIndex(this.users, {
- id: e.id
- }); - 1 !== t && (a.a.delete(this.users, t), this.rebuildUsersLists())
- },
- addMatch: function(e) {
- -1 === i.a.findIndex(this.matches, {
- quarkId: e.quarkId
- }) && this.matches.push(e)
- },
- removeMatch: function(e) {
- var t = i.a.findIndex(this.matches, {
- quarkId: e.quarkId
- }); - 1 !== t && a.a.delete(this.matches, t)
- },
- showUserContextMenu: function(e, t, n) {
- var a = this.getMenuOptions(e);
- a && (this.contextMenuData = {
- user: e,
- position: t,
- limitRect: n,
- callback: this.onContextMenuItemClick,
- items: a
- }, this.$emit("show-context-menu", this.contextMenuData))
- },
- showMatchContextMenu: function(e, t, n) {
- this.contextMenuData = {
- user: e.player1,
- position: t,
- limitRect: n,
- callback: this.onContextMenuItemClick,
- items: [{
- id: "spectate",
- text: "Spectate"
- }]
- }, this.$emit("show-context-menu", this.contextMenuData)
- },
- showUserInfo: function(e, t, n) {
- this.$emit("show-user-info", {
- user: e,
- position: t,
- limitRect: n,
- align: "right"
- })
- },
- spectateMatch: function(e) {
- window.location.assign(u.a.getSpectateUrl(this.channel.emulator, e.playing.quarkId, e.playing.gameId))
- },
- challengeUser: function(e) {
- this.$emit("challenge-user", e)
- },
- getMenuOptions: function(e) {
- if (e.isLocal) return null;
- var t = -1 !== e.channelsAway.indexOf(this.channel.id),
- n = [{
- id: "challenge",
- text: "Challenge",
- disabled: e.away || e.playing || t || e.ignored
- }, {
- id: "spectate",
- text: "Spectate",
- disabled: !e.playing
- }, {
- id: "ignore",
- text: "Ignore",
- active: e.ignored,
- type: "checkbox"
- }];
- if (e.playing && e.playing.channelId !== this.channel.id) {
- var a = this.canJoinChannel(e.playing.channelId);
- n.push({
- id: "goto_playing_channel",
- text: 'Go to "playing" channel',
- disabled: !a,
- title: a ? null : "You've reached the maximum number of channels available"
- })
- }
- return n
- },
- canJoinChannel: function(e) {
- return -1 !== o.a.localUser.channels.indexOf(e) || !o.a.localUser.maxNumChannelsReached
- },
- onContextMenuItemClick: function(e) {
- switch (e) {
- case "challenge":
- this.challengeUser(this.contextMenuData.user);
- break;
- case "spectate":
- this.spectateMatch(this.contextMenuData.user);
- break;
- case "goto_playing_channel":
- this.$emit("goto-channel-by-gameid", this.contextMenuData.user.playing.gameId);
- break;
- case "ignore":
- a.a.set(this.contextMenuData.user, "ignored", !this.contextMenuData.user.ignored);
- var t = this.contextMenuData.user.ignored,
- n = this;
- if (u.a.ignoreUser(this.contextMenuData.user.id, t), t) o.a.localUser.ignores.push(this.contextMenuData.user.id);
- else {
- var s = i.a.findIndex(o.a.localUser.ignores, function(e) {
- return e === n.contextMenuData.user.id
- }); - 1 !== s && a.a.delete(o.a.localUser.ignores, s)
- }
- var l = -1 !== this.contextMenuData.user.channelsAway.indexOf(this.channel.id);
- 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)
- }
- },
- rebuildUsersLists: function() {
- this.usersOnline = [], this.usersAway = [], this.usersIgnored = [];
- var e = this;
- i.a.forEach(this.users, function(t) {
- 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)
- }), 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)
- },
- onChannelAway: function() {
- this.channelAway = !this.channelAway, u.a.setAway(this.channelAway, this.channel.id)
- }
- }
- }
- }, 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) {
- n(83);
- var a = n(0)(n(37), n(157), "data-v-4f69d248", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(98);
- var a = n(0)(n(38), n(172), "data-v-aabe684c", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(76);
- var a = n(0)(n(39), n(150), "data-v-194e0266", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(101);
- var a = n(0)(n(40), n(175), "data-v-e9e80308", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(87);
- var a = n(0)(n(41), n(161), "data-v-5e188b16", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(97);
- var a = n(0)(n(42), n(171), "data-v-982d820c", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(88);
- var a = n(0)(n(44), n(162), "data-v-5ed30250", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(91);
- var a = n(0)(n(45), n(165), "data-v-6a85c295", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(94);
- var a = n(0)(n(46), n(168), "data-v-90db03ee", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(71);
- var a = n(0)(n(47), n(145), "data-v-0137ab79", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(80);
- var a = n(0)(n(48), n(154), "data-v-38969fc4", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(100);
- var a = n(0)(n(49), n(174), "data-v-c00a1096", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(95);
- var a = n(0)(n(50), n(169), "data-v-9180d144", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(85);
- var a = n(0)(n(51), n(159), "data-v-55c37426", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(93);
- var a = n(0)(n(52), n(167), "data-v-7ebd264c", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(73);
- var a = n(0)(n(53), n(147), "data-v-10565c5a", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(77);
- var a = n(0)(n(54), n(151), "data-v-24b996e5", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(79);
- var a = n(0)(n(55), n(153), "data-v-3451764a", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(72);
- var a = n(0)(n(56), n(146), "data-v-0f6561e2", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(99);
- var a = n(0)(n(57), n(173), "data-v-b58e13a4", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(78);
- var a = n(0)(n(58), n(152), "data-v-287354d0", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(90);
- var a = n(0)(n(59), n(164), "data-v-632a8d04", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(82);
- var a = n(0)(n(60), n(156), "data-v-4d9ac72f", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(84);
- var a = n(0)(n(61), n(158), "data-v-53e2a02c", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(74);
- var a = n(0)(n(62), n(148), "data-v-11eb5fd5", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(81);
- var a = n(0)(n(63), n(155), "data-v-493f246c", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(75);
- var a = n(0)(n(64), n(149), "data-v-16f4c9af", null);
- e.exports = a.exports
- }, function(e, t, n) {
- n(96);
- var a = n(0)(n(65), n(170), "data-v-95898206", null);
- e.exports = a.exports
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "message",
- class: e.data.type
- }, [e._l(e.data.lines, function(t, a) {
- return [n("div", {
- ref: "line_" + a,
- refInFor: !0,
- staticClass: "line"
- }, [n("div", {
- staticClass: "blocksContainer"
- }, e._l(t.blocks, function(t, s) {
- return n("div", {
- staticClass: "blocks"
- }, [n("span", {
- ref: "block_" + a + "_" + s,
- refInFor: !0,
- class: t.class
- }, [e._v("\n " + e._s(t.text) + "\n ")])])
- }))])]
- })], 2)
- },
- staticRenderFns: []
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return "separator" !== e.data.id ? n("div", {
- class: [e.itemType, e.itemClass, e.data.id],
- attrs: {
- title: e.data.title
- },
- on: {
- click: function(t) {
- t.stopPropagation(), e.click(t)
- }
- }
- }, ["challenge" === e.data.id ? [n("svg", {
- staticClass: "icon challenge",
- attrs: {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 40 40"
- }
- }, [n("path", {
- staticClass: "iconSvg challenge",
- attrs: {
- 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"
- }
- })])] : e._e(), e._v(" "), "checkbox" === e.data.type ? n("div", {
- staticClass: "booleanButton"
- }, [n("input", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: e.data.active,
- expression: "data.active"
- }],
- attrs: {
- type: "checkbox",
- id: "booleanToggle"
- },
- domProps: {
- checked: Array.isArray(e.data.active) ? e._i(e.data.active, null) > -1 : e.data.active
- },
- on: {
- change: function(t) {
- var n = e.data.active,
- a = t.target,
- s = !!a.checked;
- if (Array.isArray(n)) {
- var i = e._i(n, null);
- a.checked ? i < 0 && (e.data.active = n.concat([null])) : i > -1 && (e.data.active = n.slice(0, i).concat(n.slice(i + 1)))
- } else e.$set(e.data, "active", s)
- }
- }
- }), e._v(" "), n("span", [e._v(e._s(e.data.text))]), e._v(" "), n("div", {
- staticClass: "booleanCheckbox"
- }), e._v(" "), n("label", {
- attrs: {
- for: "booleanToggle"
- }
- })]) : n("div", {
- staticClass: "text"
- }, [e._v(e._s(e.data.text))])], 2) : e._e()
- },
- staticRenderFns: []
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "messageWrapper",
- class: e.data.type
- }, [e._l(e.data.lines, function(t, a) {
- return [n("div", {
- ref: "line_" + a,
- refInFor: !0,
- staticClass: "line"
- }, [n("div", {
- staticClass: "blocksContainer"
- }, e._l(t.blocks, function(t, s) {
- return n("div", {
- staticClass: "blocks"
- }, [n("span", {
- ref: "block_" + a + "_" + s,
- refInFor: !0,
- class: t.class
- }, [e._v("\n " + e._s(t.text) + "\n ")])])
- }))])]
- })], 2)
- },
- staticRenderFns: []
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "matchItem",
- on: {
- click: function(t) {
- t.preventDefault(), e.onClick(t)
- },
- contextmenu: function(t) {
- t.preventDefault(), e.showContextMenu(t)
- }
- }
- }, [n("div", {
- staticClass: "matchInfo"
- }, [n("div", {
- staticClass: "playerInfo"
- }, [e.isRanked(e.data.player1) ? n("div", {
- staticClass: "playerRank",
- attrs: {
- title: e.getRankTitle(e.data.player1)
- }
- }, [n("img", {
- staticClass: "image",
- attrs: {
- src: e.rankSrc(e.data.player1)
- }
- })]) : e._e(), e._v(" "), n("div", {
- staticClass: "playerFlag",
- style: {
- backgroundImage: "url(" + e.flagSrc(e.data.player1) + ")"
- },
- attrs: {
- title: e.data.player1.country.full_name
- }
- }), e._v(" "), n("div", {
- staticClass: "playerName",
- attrs: {
- title: e.data.player1.name
- }
- }, [e._v("\n " + e._s(e.data.player1.name) + "\n ")])]), e._v(" "), n("div", {
- staticClass: "matchVsText"
- }, [e._v("\n VS\n ")]), e._v(" "), n("div", {
- staticClass: "playerInfo"
- }, [e.isRanked(e.data.player2) ? n("div", {
- staticClass: "playerRank",
- attrs: {
- title: e.getRankTitle(e.data.player2)
- }
- }, [n("img", {
- staticClass: "image",
- attrs: {
- src: e.rankSrc(e.data.player2)
- }
- })]) : e._e(), e._v(" "), n("div", {
- staticClass: "playerFlag",
- style: {
- backgroundImage: "url(" + e.flagSrc(e.data.player2) + ")"
- },
- attrs: {
- title: e.data.player2.country.full_name
- }
- }), e._v(" "), n("div", {
- staticClass: "playerName",
- attrs: {
- title: e.data.player2.name
- }
- }, [e._v("\n " + e._s(e.data.player2.name) + "\n ")])])]), e._v(" "), n("div", {
- staticClass: "matchSpectators"
- }, [e._v("\n " + e._s(e.data.numSpectators) + "\n ")])])
- },
- staticRenderFns: []
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "userItem",
- class: {
- ignored: e.user.ignored
- },
- on: {
- contextmenu: function(t) {
- t.preventDefault(), e.showContextMenu(t)
- },
- click: function(t) {
- t.preventDefault(), e.onClick(t)
- }
- }
- }, [n("div", {
- staticClass: "flagWrapper",
- style: {
- backgroundImage: "url(" + e.flagSrc + ")"
- },
- attrs: {
- title: e.user.country.full_name
- }
- }), e._v(" "), n("div", {
- staticClass: "avatarWrapper"
- }, [n("img", {
- staticClass: "image",
- attrs: {
- src: e.avatarSrc
- }
- })]), e._v(" "), n("div", {
- staticClass: "nameAndGame"
- }, [n("div", {
- staticClass: "name",
- attrs: {
- title: e.user.name
- }
- }, [e._v("\n " + e._s(this.user.name) + "\n ")]), e._v(" "), e.user.playing ? n("div", {
- staticClass: "game",
- attrs: {
- title: e.user.playing.gameName
- }
- }, [e._v("\n Playing "), n("strong", [e._v(e._s(e.user.playing.gameName))])]) : e._e()]), e._v(" "), n("div", {
- staticClass: "rankWrapper"
- }, [e.isRanked ? n("img", {
- staticClass: "rank",
- attrs: {
- src: e.rankSrc,
- title: e.rankTitle
- }
- }) : e._e()]), e._v(" "), n("div", {
- staticClass: "pingWrapper"
- }, [e.user.isLocal ? e._e() : n("img", {
- staticClass: "ping",
- attrs: {
- src: e.pingSrc,
- title: e.pingTitle
- }
- })])])
- },
- staticRenderFns: []
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "channelWrapper"
- }, [n("div", {
- staticClass: "channelToolbar"
- }, [n("div", {
- staticClass: "channelInfo"
- }, [n("div", {
- staticClass: "name",
- attrs: {
- title: e.data.name
- }
- }, [e._v("#"), n("span", [e._v(e._s(e.data.name))])]), e._v(" "), n("div", {
- staticClass: "rankedWrapper",
- attrs: {
- title: "Ranked channel"
- }
- }, [e.data.ranked ? n("svg", {
- staticClass: "ranked",
- attrs: {
- xmlns: "http://www.w3.org/2000/svg",
- width: "36",
- height: "36",
- viewBox: "0 0 36 36"
- }
- }, [n("path", {
- attrs: {
- 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"
- }
- }), e._v(" "), n("path", {
- attrs: {
- 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"
- }
- })]) : e._e()]), e._v(" "), n("div", {
- staticClass: "id"
- }, [e._v(e._s(e.data.gameid))])]), e._v(" "), n("div", {
- staticClass: "channelActions"
- }, [n("div", {
- staticClass: "button-alt testGame",
- on: {
- click: e.playAlone
- }
- }, [n("svg", {
- staticClass: "icon",
- attrs: {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 20 20"
- }
- }, [n("path", {
- attrs: {
- 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"
- }
- })]), e._v("\n Test game\n ")])])]), e._v(" "), n("div", {
- staticClass: "channelContent"
- }, [n("chat", {
- ref: "chat",
- attrs: {
- channel: e.data,
- usersByName: e.usersByName
- },
- on: {
- "cancel-challenge": e.cancelChallenge,
- "decline-challenge": e.declineChallengeEvent,
- "accept-challenge": e.acceptChallengeEvent,
- "decline-outer-challenge": e.declineOuterChallenge,
- "accept-outer-challenge": e.acceptOuterChallenge,
- "show-user-info": e.showUserInfo,
- "challenge-user": e.challengeUser,
- "goto-channel-by-gameid": e.gotoChannelByGameId,
- "goto-chat-message": e.gotoChatMessage,
- "show-emojis-view": e.showEmojisView,
- "play-alone": e.playAlone
- }
- }), e._v(" "), n("users-list", {
- ref: "usersList",
- attrs: {
- channel: e.data
- },
- on: {
- "show-context-menu": e.showContextMenu,
- "show-user-info": e.showUserInfo,
- "challenge-user": e.challengeUser,
- "goto-channel-by-gameid": e.gotoChannelByGameId,
- "on-user-ignored": e.onUserIgnoredEvent
- }
- })], 1)])
- },
- staticRenderFns: []
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "message",
- class: e.data.type
- }, [n("div", {
- staticClass: "challengeContainer"
- }, [n("div", {
- staticClass: "title"
- }, [e._v("\n " + e._s(e.message) + "\n ")]), e._v(" "), "active" === e.state ? n("div", {
- staticClass: "cancel-challenge",
- on: {
- click: e.cancelChallenge
- }
- }, [e._v("Cancel")]) : e._e()])])
- },
- staticRenderFns: []
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "login"
- }, [e._m(0), e._v(" "), n("div", {
- staticClass: "formWrapper"
- }, [n("div", {
- staticClass: "notificationWrapper",
- class: {
- visible: e.showAccountCreatedMessage
- }
- }, [n("div", {
- staticClass: "notificationTitle"
- }, [e._v("\n New account succesfully created\n ")]), e._v(" "), n("div", {
- staticClass: "notificationBody"
- }, [e._v("\n Please log in.\n ")])]), e._v(" "), n("h2", [e._v(e._s(e.formTitle()))]), e._v(" "), n("form", {
- ref: "loginform",
- staticClass: "form",
- on: {
- keydown: e.onFormKeyDown
- }
- }, [n("div", {
- staticClass: "input-area username"
- }, [n("div", {
- staticClass: "title",
- class: {
- error: e.errorMessages.username
- }
- }, [n("span", [e._v("Username")]), e._v(" "), n("span", [e._v(e._s(e.errorMessages.username))])]), e._v(" "), n("input", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: e.username,
- expression: "username"
- }],
- ref: "username",
- attrs: {
- type: "text",
- readonly: e.working,
- maxlength: "20",
- autofocus: "",
- autocorrect: "off",
- spellcheck: "false"
- },
- domProps: {
- value: e.username
- },
- on: {
- input: function(t) {
- t.target.composing || (e.username = t.target.value)
- }
- }
- })]), e._v(" "), n("div", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: !e.signIn(),
- expression: "!signIn()"
- }],
- staticClass: "input-area email"
- }, [n("div", {
- staticClass: "title",
- class: {
- error: e.errorMessages.email
- }
- }, [n("span", [e._v("E-mail")]), e._v(" "), n("span", [e._v(e._s(e.errorMessages.email))])]), e._v(" "), n("input", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: e.email,
- expression: "email"
- }],
- ref: "email",
- attrs: {
- type: "text",
- readonly: e.working,
- autofocus: "",
- autocorrect: "off",
- spellcheck: "false"
- },
- domProps: {
- value: e.email
- },
- on: {
- input: function(t) {
- t.target.composing || (e.email = t.target.value)
- }
- }
- })]), e._v(" "), n("div", {
- staticClass: "input-area password"
- }, [n("div", {
- staticClass: "title",
- class: {
- error: e.errorMessages.password
- }
- }, [n("span", [e._v("Password")]), e._v(" "), n("span", [e._v(e._s(e.errorMessages.password))])]), e._v(" "), n("input", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: e.password,
- expression: "password"
- }],
- ref: "password",
- attrs: {
- type: "password",
- name: "password",
- readonly: e.working,
- autocorrect: "off",
- spellcheck: "false"
- },
- domProps: {
- value: e.password
- },
- on: {
- input: function(t) {
- t.target.composing || (e.password = t.target.value)
- }
- }
- })]), e._v(" "), e.signIn() ? n("a", {
- staticClass: "button-generic",
- class: {
- working: e.working, spinner: e.working
- },
- on: {
- click: e.doWork
- }
- }, [e._v("\n " + e._s(e.workAction()) + "\n ")]) : n("g-recaptcha", {
- class: {
- gRecaptchaButton: e.working, working: e.working, spinner: e.working
- },
- attrs: {
- "data-sitekey": "6LeSaSwUAAAAADT2v-9qOJRYPf8vtTn-yT0EP1hD",
- "data-validate": e.gRecaptchaValidate,
- "data-callback": e.gRecaptchaCallback,
- "data-btn-class": "gRecaptchaButton"
- }
- }, [e._v("\n " + e._s(e.workAction()) + "\n ")])], 1), e._v(" "), e.signIn() ? e._e() : n("div", {
- staticClass: "changeWorkAction"
- }, [n("h3", [e._v(e._s(e.changeWorkActionText()))]), e._v(" "), n("a", {
- staticClass: "button-generic",
- on: {
- click: e.changeWorkActionLinkClicked
- }
- }, [e._v(e._s(e.changeWorkActionLink()))])]), e._v(" "), n("div", {
- staticClass: "betaError",
- class: {
- error: e.errorMessages.beta
- }
- }, [e._m(1), e._v(" "), e._m(2)])])])
- },
- staticRenderFns: [function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "logoWrapper"
- }, [n("img", {
- staticClass: "logo",
- attrs: {
- src: "/static/ui/logo_full_light.svg"
- }
- })])
- }, function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("p", [n("strong", [e._v("No beta access for your account yet, please try again on the next few days!")])])
- }, function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("p", [e._v("In the meantime, you can "), n("a", {
- attrs: {
- href: "https://discord.gg/EyERRSg",
- target: "_blank"
- }
- }, [e._v("join our Official Discord server")]), e._v(" and meet new challengers for your next fight :)")])
- }]
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "messageWrapper",
- class: e.data.type
- }, [e._l(e.data.lines, function(t, a) {
- return [n("div", {
- ref: "line_" + a,
- refInFor: !0,
- staticClass: "line"
- }, [n("span", [e._v(e._s(t))])])]
- })], 2)
- },
- staticRenderFns: []
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "message",
- class: e.data.type
- }, [n("div", {
- staticClass: "challengeWrapper"
- }, [n("div", {
- ref: "line"
- }, [n("div", {
- staticClass: "title"
- }, [e._v("\n " + e._s(e.message) + "\n ")]), e._v(" "), "active" === e.state ? n("div", {
- staticClass: "challengeContent"
- }, [n("div", {
- staticClass: "userInfo"
- }, [n("div", {
- staticClass: "flag",
- style: {
- backgroundImage: "url(" + e.flagSrc + ")"
- },
- attrs: {
- title: e.data.opponent.country.full_name
- }
- }), e._v(" "), n("div", {
- staticClass: "gravatar"
- }, [n("img", {
- staticClass: "image",
- attrs: {
- src: e.avatarSrc
- }
- })]), e._v(" "), n("div", {
- staticClass: "name"
- }, [e._v("\n " + e._s(e.data.opponent.name) + "\n ")]), e._v(" "), n("div", {
- staticClass: "rank"
- }, [n("img", {
- attrs: {
- src: e.rankSrc
- }
- })]), e._v(" "), n("div", {
- staticClass: "ping",
- attrs: {
- title: e.pingTitle
- }
- }, [n("img", {
- attrs: {
- src: e.pingSrc
- }
- })])]), e._v(" "), n("div", {
- staticClass: "buttons"
- }, [n("div", {
- staticClass: "button-generic accept-challenge",
- on: {
- click: function(t) {
- e.modifyChallenge("accept")
- }
- }
- }, [e._v("Accept")]), e._v(" "), n("div", {
- staticClass: "decline-challenge",
- on: {
- click: function(t) {
- e.modifyChallenge("decline")
- }
- }
- }, [e._v("Decline")])])]) : e._e()])])])
- },
- staticRenderFns: []
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "mask",
- on: {
- click: e.close
- }
- }, [n("div", {
- ref: "content",
- staticClass: "content",
- style: e.infoStyle
- }, [n("div", {
- staticClass: "top"
- }, [n("div", {
- staticClass: "avatar"
- }, [n("img", {
- staticClass: "image",
- attrs: {
- src: e.avatarSrc
- }
- }), e._v(" "), n("div", {
- class: e.stateClass
- })]), e._v(" "), n("div", {
- staticClass: "username"
- }, [e._v(e._s(e.user.name))]), e._v(" "), n("img", {
- staticClass: "flag",
- attrs: {
- src: e.flagSrc
- }
- })]), e._v(" "), n("div", {
- staticClass: "bottom"
- }, [e._v("\n [TODO: add user info]\n ")])])])
- },
- staticRenderFns: []
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "notificationsWrapper"
- }, [n("div", {
- staticClass: "notificationsMaskBg"
- }), e._v(" "), n("div", {
- staticClass: "notificationsMask",
- on: {
- click: function(t) {
- t.stopPropagation(), e.closeNotifications(t)
- }
- }
- }), e._v(" "), n("div", {
- staticClass: "notificationsSection",
- on: {
- click: function(e) {
- e.stopPropagation()
- }
- }
- }, [0 === e.notifications.length ? n("div", {
- staticClass: "notifications-empty"
- }, [n("div", {
- staticClass: "emoji"
- }, [e._v(" รยฏ\\_(รฃฦโ)_/รยฏ")]), e._v(" "), e._m(0)]) : e._e(), e._v(" "), e._l(e.notifications, function(t, a) {
- return ["mention" === t.type ? n("div", {
- staticClass: "notification-mention",
- on: {
- click: function(t) {
- e.onNotificationClick(a)
- }
- }
- }, [n("div", {
- ref: "notification_title",
- refInFor: !0,
- staticClass: "header"
- }, [e._v("\n " + e._s(t.title) + "\n ")])]) : n("div", {
- staticClass: "notification-challenge",
- on: {
- click: function(t) {
- e.onNotificationClick(a)
- }
- }
- }, [n("div", {
- ref: "notification_title",
- refInFor: !0,
- staticClass: "header"
- }, [e._v("\n " + e._s(t.title) + "\n ")]), e._v(" "), n("div", {
- staticClass: "content"
- }, [n("div", {
- staticClass: "challenger"
- }, [n("img", {
- attrs: {
- src: e.pingSrc(t.user)
- }
- }), e._v(" "), n("img", {
- attrs: {
- src: e.rankSrc(t.channel, t.user)
- }
- }), e._v(" "), n("div", {
- staticClass: "name"
- }, [e._v(e._s(t.user.name))])]), e._v(" "), n("div", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: "requested" === t.challengeType,
- expression: "notification.challengeType === 'requested'"
- }],
- staticClass: "buttons"
- }, [n("div", {
- staticClass: " button-generic accept",
- on: {
- click: function(t) {
- t.stopPropagation(), e.onChallengeNotificationClick("accept", a)
- }
- }
- }, [n("svg", {
- staticClass: "icon challenge",
- attrs: {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 40 40"
- }
- }, [n("path", {
- staticClass: "iconSvg challenge",
- attrs: {
- 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"
- }
- })]), e._v("\n Accept\n ")]), e._v(" "), n("div", {
- staticClass: "decline",
- on: {
- click: function(t) {
- t.stopPropagation(), e.onChallengeNotificationClick("decline", a)
- }
- }
- }, [e._v("Decline")])])])])]
- })], 2)])
- },
- staticRenderFns: [function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", [n("strong", [e._v("No notifications yet.")])])
- }]
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "addChannelView"
- }, [n("div", {
- staticClass: "addChannelViewSidebar"
- }, [n("div", {
- staticClass: "search",
- class: {
- active: "search" === e.openedSection
- },
- on: {
- click: function(t) {
- e.openSection("search")
- }
- }
- }, [n("svg", {
- staticClass: "searchIcon",
- attrs: {
- xmlns: "http://www.w3.org/2000/svg",
- width: "40",
- height: "40",
- viewBox: "0 0 40 40"
- }
- }, [n("path", {
- attrs: {
- 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"
- }
- }), e._v(" "), n("path", {
- attrs: {
- 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"
- }
- })])]), e._v(" "), n("div", {
- staticClass: "favorites",
- class: {
- active: "favorites" === e.openedSection
- },
- on: {
- click: function(t) {
- e.openSection("favorites")
- }
- }
- }, [n("svg", {
- staticClass: "favoritesIcon",
- attrs: {
- xmlns: "http://www.w3.org/2000/svg",
- width: "40",
- height: "40",
- viewBox: "0 0 40 40"
- }
- }, [n("path", {
- attrs: {
- 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"
- }
- })])])]), e._v(" "), n("search", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: "search" === e.openedSection,
- expression: "openedSection === 'search'"
- }],
- ref: "search",
- on: {
- "join-channel": e.joinChannel,
- "fav-channel": e.favChannel,
- "patreon-info": e.openPatreonChannel
- }
- }), e._v(" "), n("favorites", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: "favorites" === e.openedSection,
- expression: "openedSection === 'favorites'"
- }],
- ref: "favorites",
- on: {
- "join-channel": e.joinChannel,
- "fav-channel": e.favChannel,
- "patreon-info": e.openPatreonChannel
- }
- }), e._v(" "), n("discover", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: "discover" === e.openedSection,
- expression: "openedSection === 'discover'"
- }],
- ref: "discover",
- on: {
- "join-channel": e.joinChannel,
- "fav-channel": e.favChannel,
- "patreon-info": e.openPatreonChannel
- }
- })], 1)
- },
- staticRenderFns: []
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "settingsWrapper"
- }, [n("div", {
- staticClass: "settingsMaskBg"
- }), e._v(" "), n("div", {
- staticClass: "settingsMask",
- on: {
- click: function(t) {
- t.stopPropagation(), e.closeSettings(t)
- }
- }
- }), e._v(" "), n("div", {
- staticClass: "settingsSection",
- on: {
- click: function(e) {
- e.stopPropagation()
- }
- }
- }, [n("div", {
- staticClass: "userAvatarWrapper",
- attrs: {
- title: "Change your avatar on gravatar.com"
- }
- }, [n("a", {
- attrs: {
- href: "https://www.gravatar.com",
- target: "_blank"
- }
- }, [n("img", {
- staticClass: "userAvatar",
- attrs: {
- src: e.avatarSrc
- }
- }), e._v(" "), n("div", {
- staticClass: "changeAvatar"
- }, [e._v("\n Click to change on gravatar\n ")])])]), e._v(" "), n("div", {
- staticClass: "userIdWrapper"
- }, [n("div", {
- staticClass: "label"
- }, [e._v("Fightcade ID")]), e._v(" "), n("div", {
- staticClass: "userName"
- }, [e._v(e._s(e.localUser.name))])]), e._v(" "), n("div", {
- staticClass: "userEmailWrapper"
- }, [n("div", {
- staticClass: "label"
- }, [e._v("E-mail")]), e._v(" "), n("input", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: e.localUser.email,
- expression: "localUser.email"
- }],
- staticClass: "userEmail",
- attrs: {
- type: "email",
- autocomplete: "on",
- autocorrect: "off",
- spellcheck: "false"
- },
- domProps: {
- value: e.localUser.email
- },
- on: {
- input: [function(t) {
- t.target.composing || e.$set(e.localUser, "email", t.target.value)
- }, function(t) {
- e.startEditingValue("Email")
- }]
- }
- }), e._v(" "), n("div", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: e.editingEmail,
- expression: "editingEmail"
- }],
- staticClass: "button-generic save",
- class: {
- spinner: e.savingEmail
- },
- on: {
- click: function(t) {
- e.saveValue("Email")
- }
- }
- }, [e._v("Update")]), e._v(" "), n("div", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: null !== e.editingEmailMessage,
- expression: "editingEmailMessage !== null"
- }],
- staticClass: "saveFeedback",
- class: e.editingEmailMessageClass
- }, [e._v(e._s(e.editingEmailMessage))])]), e._v(" "), n("div", {
- staticClass: "userPasswordWrapper"
- }, [n("div", {
- staticClass: "label"
- }, [e._v("Password")]), e._v(" "), n("input", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: e.password,
- expression: "password"
- }],
- staticClass: "userPassword",
- attrs: {
- type: "password",
- autocorrect: "off",
- spellcheck: "false",
- placeholder: "รขโยรขโยรขโยรขโยรขโยรขโยรขโยรขโย"
- },
- domProps: {
- value: e.password
- },
- on: {
- input: [function(t) {
- t.target.composing || (e.password = t.target.value)
- }, function(t) {
- e.editingPassword = !0
- }]
- }
- }), e._v(" "), n("div", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: e.editingPassword,
- expression: "editingPassword"
- }],
- staticClass: "button-generic save",
- class: {
- spinner: e.savingPassword
- },
- on: {
- click: function(t) {
- e.saveValue("Password")
- }
- }
- }, [e._v("Update")]), e._v(" "), n("div", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: null !== e.editingPasswordMessage,
- expression: "editingPasswordMessage !== null"
- }],
- staticClass: "saveFeedback",
- class: e.editingPasswordMessageClass
- }, [e._v(e._s(e.editingPasswordMessage))])]), e._v(" "), n("div", {
- staticClass: "gamesOptions"
- }, [n("div", {
- staticClass: "label"
- }, [e._v("Games")]), e._v(" "), n("div", {
- staticClass: "option"
- }, [n("div", {
- staticClass: "title"
- }, [e._v("Smoothing / Input lag")]), e._v(" "), n("select", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: e.localUser.settings.delay,
- expression: "localUser.settings.delay"
- }],
- staticClass: "selectValue",
- on: {
- change: [function(t) {
- var n = Array.prototype.filter.call(t.target.options, function(e) {
- return e.selected
- }).map(function(e) {
- return "_value" in e ? e._value : e.value
- });
- e.$set(e.localUser.settings, "delay", t.target.multiple ? n : n[0])
- }, function(t) {
- e.saveSetting("delay")
- }]
- }
- }, e._l(e.delayValues, function(t, a) {
- return n("option", {
- domProps: {
- value: a - 1
- }
- }, [e._v("\n " + e._s(t) + "\n ")])
- }))]), e._v(" "), n("div", {
- staticClass: "option"
- }, [n("div", {
- staticClass: "title"
- }, [e._v("Ranked player")]), e._v(" "), n("div", {
- staticClass: "optionCheckboxWrapper"
- }, [n("input", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: e.localUser.settings.ranked,
- expression: "localUser.settings.ranked"
- }],
- attrs: {
- type: "checkbox",
- id: "rankedPlayer"
- },
- domProps: {
- checked: Array.isArray(e.localUser.settings.ranked) ? e._i(e.localUser.settings.ranked, null) > -1 : e.localUser.settings.ranked
- },
- on: {
- change: [function(t) {
- var n = e.localUser.settings.ranked,
- a = t.target,
- s = !!a.checked;
- if (Array.isArray(n)) {
- var i = e._i(n, null);
- 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)))
- } else e.$set(e.localUser.settings, "ranked", s)
- }, function(t) {
- e.saveSetting("ranked")
- }]
- }
- }), e._v(" "), n("div", {
- staticClass: "optionCheckbox"
- }), e._v(" "), n("label", {
- attrs: {
- for: "rankedPlayer"
- }
- })])])]), e._v(" "), n("div", {
- staticClass: "frontendOptions"
- }, [n("div", {
- staticClass: "label"
- }, [e._v("Frontend")]), e._v(" "), n("div", {
- staticClass: "option"
- }, [n("div", {
- staticClass: "title"
- }, [e._v("Color theme")]), e._v(" "), n("select", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: e.localUser.settings.theme,
- expression: "localUser.settings.theme"
- }],
- staticClass: "selectValue",
- attrs: {
- disabled: !e.localUser.perks.themesAvailable
- },
- on: {
- change: [function(t) {
- var n = Array.prototype.filter.call(t.target.options, function(e) {
- return e.selected
- }).map(function(e) {
- return "_value" in e ? e._value : e.value
- });
- e.$set(e.localUser.settings, "theme", t.target.multiple ? n : n[0])
- }, function(t) {
- e.saveSetting("theme")
- }]
- }
- }, e._l(e.themesValues, function(t) {
- return n("option", {
- domProps: {
- value: t.id
- }
- }, [e._v("\n " + e._s(t.name) + "\n ")])
- }))]), e._v(" "), e.localUser.perks.themesAvailable ? e._e() : n("div", {
- staticClass: "patronExclusive"
- }, [n("div", {
- staticClass: "text"
- }, [e._v("\n This feature is only available for patrons.\n ")]), e._v(" "), n("div", {
- staticClass: "button-generic",
- on: {
- click: e.openPatreonChannel
- }
- }, [e._v("\n Learn more\n ")])])]), e._v(" "), n("div", {
- staticClass: "notificationsOptions"
- }, [n("div", {
- staticClass: "label"
- }, [e._v("Notifications")]), e._v(" "), n("div", {
- staticClass: "option"
- }, [n("div", {
- staticClass: "title"
- }, [e._v("Desktop notifications")]), e._v(" "), n("div", {
- staticClass: "optionCheckboxWrapper"
- }, [n("input", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: e.localUser.settings.desktopNotifications,
- expression: "localUser.settings.desktopNotifications"
- }],
- attrs: {
- type: "checkbox",
- id: "desktopNotifications"
- },
- domProps: {
- checked: Array.isArray(e.localUser.settings.desktopNotifications) ? e._i(e.localUser.settings.desktopNotifications, null) > -1 : e.localUser.settings.desktopNotifications
- },
- on: {
- change: [function(t) {
- var n = e.localUser.settings.desktopNotifications,
- a = t.target,
- s = !!a.checked;
- if (Array.isArray(n)) {
- var i = e._i(n, null);
- 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)))
- } else e.$set(e.localUser.settings, "desktopNotifications", s)
- }, function(t) {
- e.saveSetting("desktopNotifications")
- }]
- }
- }), e._v(" "), n("div", {
- staticClass: "optionCheckbox"
- }), e._v(" "), n("label", {
- attrs: {
- for: "desktopNotifications"
- }
- })])]), e._v(" "), n("div", {
- staticClass: "option"
- }, [n("div", {
- staticClass: "title"
- }, [e._v("Sound notifications")]), e._v(" "), n("div", {
- staticClass: "optionCheckboxWrapper"
- }, [n("input", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: e.localUser.settings.soundNotifications,
- expression: "localUser.settings.soundNotifications"
- }],
- attrs: {
- type: "checkbox",
- id: "soundNotifications"
- },
- domProps: {
- checked: Array.isArray(e.localUser.settings.soundNotifications) ? e._i(e.localUser.settings.soundNotifications, null) > -1 : e.localUser.settings.soundNotifications
- },
- on: {
- change: [function(t) {
- var n = e.localUser.settings.soundNotifications,
- a = t.target,
- s = !!a.checked;
- if (Array.isArray(n)) {
- var i = e._i(n, null);
- 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)))
- } else e.$set(e.localUser.settings, "soundNotifications", s)
- }, function(t) {
- e.saveSetting("soundNotifications")
- }]
- }
- }), e._v(" "), n("div", {
- staticClass: "optionCheckbox"
- }), e._v(" "), n("label", {
- attrs: {
- for: "soundNotifications"
- }
- })])]), e._v(" "), n("div", {
- staticClass: "option"
- }, [n("div", {
- staticClass: "title"
- }, [e._v("User events notifications")]), e._v(" "), n("div", {
- staticClass: "optionCheckboxWrapper"
- }, [n("input", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: e.localUser.settings.userEventsNotifications,
- expression: "localUser.settings.userEventsNotifications"
- }],
- attrs: {
- type: "checkbox",
- id: "userEventsNotifications"
- },
- domProps: {
- checked: Array.isArray(e.localUser.settings.userEventsNotifications) ? e._i(e.localUser.settings.userEventsNotifications, null) > -1 : e.localUser.settings.userEventsNotifications
- },
- on: {
- change: [function(t) {
- var n = e.localUser.settings.userEventsNotifications,
- a = t.target,
- s = !!a.checked;
- if (Array.isArray(n)) {
- var i = e._i(n, null);
- 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)))
- } else e.$set(e.localUser.settings, "userEventsNotifications", s)
- }, function(t) {
- e.saveSetting("userEventsNotifications")
- }]
- }
- }), e._v(" "), n("div", {
- staticClass: "optionCheckbox"
- }), e._v(" "), n("label", {
- attrs: {
- for: "userEventsNotifications"
- }
- })])])])])])
- },
- staticRenderFns: []
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "message",
- class: e.data.type
- }, [e._l(e.data.lines, function(t, a) {
- return [0 === a ? n("header", [n("div", {
- staticClass: "avatarWrapper"
- }, [n("img", {
- ref: "avatar",
- refInFor: !0,
- staticClass: "avatar",
- attrs: {
- src: e.avatarSrc
- },
- on: {
- click: function(t) {
- e.onAvatarClick()
- }
- }
- })]), e._v(" "), n("div", {
- staticClass: "authorAndTime"
- }, [n("span", {
- ref: "author",
- refInFor: !0,
- staticClass: "author",
- on: {
- click: function(t) {
- e.onAuthorClick()
- }
- }
- }, [e._v("\n " + e._s(e.data.author.name) + "\n ")]), e._v(" "), n("span", {
- staticClass: "time"
- }, [e._v("at " + e._s(e.timeInfo(e.data.lines[0].time)))])])]) : e._e(), e._v(" "), n("div", {
- ref: "line_" + a,
- refInFor: !0,
- staticClass: "line"
- }, [0 !== a ? n("div", {
- staticClass: "time"
- }, [e._v(e._s(e.timeInfo(t.time)))]) : n("div", {
- staticClass: "time"
- }), e._v(" "), n("div", {
- staticClass: "blocksContainer"
- }, e._l(t.blocks, function(t, s) {
- return n("div", {
- staticClass: "blocks"
- }, [n("span", {
- ref: "block_" + a + "_" + s,
- refInFor: !0,
- class: e.blockClass(t),
- attrs: {
- title: e.blockTitle(t)
- },
- on: {
- click: function(n) {
- e.onLineBlockClick(t, a, s)
- }
- }
- }, [e._v("\n " + e._s(t.text) + "\n ")])])
- }))])]
- })], 2)
- },
- staticRenderFns: []
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "searchResultsWrapper"
- }, [e.title ? n("h3", [e._v(e._s(e.title))]) : e._e(), e._v(" "), n("div", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: e.fetchingData,
- expression: "fetchingData"
- }],
- staticClass: "spinnerWrapper"
- }, [n("div", {
- staticClass: "spinner"
- }), e._v(" "), n("div", {
- staticClass: "message"
- }, [e._v("Loading...")])]), e._v(" "), e.channels.length > 0 ? n("div", {
- staticClass: "searchResultsGrid"
- }, [e.fetchingData ? e._e() : e._l(e.channels, function(t) {
- return e.channelIsVisible(t) ? n("div", {
- key: t.gameid,
- ref: t.name,
- refInFor: !0,
- staticClass: "channelWrapper",
- attrs: {
- title: e.channelTitle(t)
- }
- }, [n("div", {
- directives: [{
- name: "lazy",
- rawName: "v-lazy:background-image",
- value: e.lazyThumbnailBg(t),
- expression: "lazyThumbnailBg(channel)",
- arg: "background-image"
- }],
- staticClass: "thumbnail"
- }, [n("div", {
- staticClass: "channelExtraInfoWrapper"
- }, [n("div", {
- staticClass: "channelExtraInfo"
- }, [t.isFavorite ? n("div", {
- staticClass: "favStatus"
- }, [e._v("\n รขหโฆ\n ")]) : e._e(), e._v(" "), n("div", {
- staticClass: "num-users"
- }, [n("svg", {
- staticClass: "usersIconSvg",
- attrs: {
- xmlns: "http://www.w3.org/2000/svg",
- width: "14",
- height: "14",
- viewBox: "0 0 14 14"
- }
- }, [n("path", {
- attrs: {
- 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"
- }
- })]), e._v("\n " + e._s(e.getNumUsers(t)) + "\n ")])])])]), e._v(" "), n("div", {
- staticClass: "name"
- }, [e._v(e._s(t.name))]), e._v(" "), n("div", {
- staticClass: "system"
- }, [e._v(e._s(t.system))]), e._v(" "), n("div", {
- staticClass: "channelActions",
- class: {
- patreon: !e.channelIsAvaibleForUser(t)
- }
- }, [e.channelIsAvaibleForUser(t) ? e._e() : [n("div", {
- staticClass: "patronExclusive"
- }, [e._v("\n " + e._s(e.getReasonChannelNotAvailable(t)) + "\n ")]), e._v(" "), e.userRole < 50 ? n("div", {
- staticClass: "button-generic",
- attrs: {
- title: ""
- },
- on: {
- click: e.openPatreonChannel
- }
- }, [e._v("\n Learn more\n ")]) : e._e()], e._v(" "), e.channelIsAvaibleForUser(t) ? n("a", {
- staticClass: "button-generic joinButton",
- class: {
- disabled: e.channelIsDisabled(t)
- },
- attrs: {
- title: e.channelTitle(t, !0)
- },
- on: {
- click: function(n) {
- e.joinChannel(t)
- }
- }
- }, [e._v("\n + Join\n ")]) : e._e(), e._v(" "), n("a", {
- staticClass: "button-generic favButton",
- on: {
- click: function(n) {
- e.favChannel(t)
- }
- }
- }, [t.isFavorite ? [e._v("\n รขหโ Unfav\n ")] : [e._v("\n รขหโฆ Fav\n ")]], 2)], 2)]) : e._e()
- })], 2) : e._e(), e._v(" "), e.footerIsVisible() ? n("div", {
- staticClass: "paginationWrapper"
- }, [n("div", {
- staticClass: "buttons"
- }, [n("div", {
- staticClass: "prevButtonWrapper"
- }, [n("div", {
- staticClass: "button-alt",
- class: {
- disabled: !e.prevButtonAvailable
- },
- on: {
- click: function(t) {
- e.gotoPageOffset(-1)
- }
- }
- }, [e._v("\n รขโฌยน Previous page\n ")])]), e._v(" "), n("div", {
- staticClass: "nextButtonWrapper"
- }, [n("div", {
- staticClass: "button-alt",
- class: {
- disabled: !e.nextButtonAvailable
- },
- on: {
- click: function(t) {
- e.gotoPageOffset(1)
- }
- }
- }, [e._v("\n Next page รขโฌยบ\n ")])])]), e._v(" "), n("div", {
- staticClass: "range"
- }, [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", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: !e.fetchingData,
- expression: "!fetchingData"
- }],
- staticClass: "no-results"
- }, [n("div", {
- staticClass: "emoji"
- }, [e._v(e._s(e.noItemsInfo.emoji))]), e._v("\n " + e._s(e.noItemsInfo.text) + "\n ")]) : e._e()])
- },
- staticRenderFns: []
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "discoverWrapper"
- }, [n("div", {
- staticClass: "searchResultsWrapper"
- }, [n("h2", [e._v("Discover")]), e._v(" "), n("div", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: e.fetchingData,
- expression: "fetchingData"
- }],
- staticClass: "spinner"
- }), e._v(" "), e.favoriteChannels.length > 0 ? n("div", {
- staticClass: "searchResultsGrid"
- }, [e._l(e.favoriteChannels, function(t) {
- return n("div", {
- key: t.gameid,
- ref: t.name,
- refInFor: !0,
- staticClass: "channelWrapper",
- attrs: {
- title: t.name
- }
- }, [n("div", {
- directives: [{
- name: "lazy",
- rawName: "v-lazy:background-image",
- value: e.lazyThumbnailBg(t),
- expression: "lazyThumbnailBg(channel)",
- arg: "background-image"
- }],
- staticClass: "thumbnail"
- }, [n("div", {
- staticClass: "channelExtraInfoWrapper"
- }, [n("div", {
- staticClass: "channelExtraInfo"
- }, [n("div", {
- staticClass: "num-users"
- }, [n("svg", {
- staticClass: "usersIconSvg",
- attrs: {
- xmlns: "http://www.w3.org/2000/svg",
- width: "14",
- height: "14",
- viewBox: "0 0 14 14"
- }
- }, [n("path", {
- attrs: {
- 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"
- }
- })]), e._v("\n " + e._s(e.getNumUsers(t)) + "\n ")])])])]), e._v(" "), n("div", {
- staticClass: "name"
- }, [e._v(e._s(t.name))]), e._v(" "), n("div", {
- staticClass: "channelActions"
- }, [n("a", {
- staticClass: "button-generic joinButton",
- on: {
- click: function(n) {
- e.joinChannel(t)
- }
- }
- }, [e._v("\n + Join\n ")])])])
- })], 2) : n("div", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: !e.fetchingData,
- expression: "!fetchingData"
- }],
- staticClass: "no-results"
- }, [n("div", {
- staticClass: "emoji"
- }, [e._v("รขหล(รลกรขโยฝรลก)รขหลพ")]), e._v("\n S O O N\n ")])])])
- },
- staticRenderFns: []
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "patreonWrapper"
- }, [n("div", {
- staticClass: "patreonHeader"
- }, [n("div", {
- staticClass: "image"
- }, [n("svg", {
- attrs: {
- xmlns: "http://www.w3.org/2000/svg",
- width: "800",
- height: "122",
- viewBox: "0 0 800 122"
- }
- }, [n("path", {
- attrs: {
- fill: "#fff",
- 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"
- }
- }), e._v(" "), n("path", {
- attrs: {
- fill: "#fff",
- 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"
- }
- }), e._v(" "), n("path", {
- staticClass: "logoLetters",
- attrs: {
- 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"
- }
- }), e._v(" "), n("path", {
- staticClass: "logoLetters",
- attrs: {
- 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"
- }
- })])]), e._v(" "), n("h2", [e._v("\n Help us make a better Fightcade\n ")])]), e._v(" "), e._m(0)])
- },
- staticRenderFns: [function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "patreonContentWrapper"
- }, [n("div", {
- staticClass: "patreonContent"
- }, [n("div", {
- staticClass: "patreonTexts"
- }, [n("div", {
- staticClass: "whyPatreon"
- }, [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", {
- staticClass: "patreonPerks"
- }, [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", {
- attrs: {
- href: "https://www.patreon.com/Fightcade",
- target: "_blank"
- }
- }, [e._v("More info on our Patreon page")]), e._v(".\n ")])])]), e._v(" "), n("div", {
- staticClass: "becomePatron"
- }, [n("h3", [e._v("\n Sounds good?\n ")]), e._v(" "), n("a", {
- attrs: {
- href: "https://www.patreon.com/Fightcade",
- target: "_blank"
- }
- }, [n("div", {
- staticClass: "button-generic"
- }, [e._v("\n Become a patron\n ")])])])])])
- }]
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- class: e.global.activeTheme.class,
- attrs: {
- id: "app"
- }
- }, [n("div", {
- staticClass: "autoLoginning",
- class: {
- visible: e.autoLoginning
- }
- }, [e._m(0), e._v(" "), n("div", {
- staticClass: "loadingMessage"
- }, [e._v("\n Initializing...\n ")])]), e._v(" "), "disconnected" === e.status ? n("login", {
- ref: "login",
- on: {
- connect: e.connect
- }
- }) : [n("div", {
- staticClass: "initializingApp",
- class: {
- visible: e.initializingApp
- }
- }, [n("div", {
- staticClass: "spinnerWrapper"
- }, [n("div", {
- staticClass: "spinner"
- })]), e._v(" "), n("div", {
- staticClass: "loadingMessage"
- }, [e._v("\n Loading your settings...\n ")])]), e._v(" "), n("main-toolbar", {
- ref: "mainToolbar",
- on: {
- "channel-selected": e.selectChannel,
- "show-context-menu": e.showContextMenu,
- "leave-channel": e.leaveChannel,
- "decline-challenge": e.declineChallenge,
- "accept-challenge": e.acceptChallenge,
- "goto-chat-message": e.gotoChatMessage,
- "channel-item-initialized": e.channelItemInitialized,
- "patreon-info": e.selectChannel
- }
- }), e._v(" "), n("welcome-channel", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: "welcome-channel" === e.activeChannelId,
- expression: "activeChannelId === 'welcome-channel'"
- }],
- ref: "welcome-channel",
- on: {
- "channel-selected": e.selectChannel,
- initialized: e.onWelcomeChannelInitialized
- }
- }), e._v(" "), e._l(e.channels, function(t) {
- return [e.global.isGameChannel(t.id) ? n("channel", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: t.id === e.activeChannelId,
- expression: "channel.id === activeChannelId"
- }],
- key: t.id,
- ref: t.id,
- refInFor: !0,
- attrs: {
- data: t
- },
- on: {
- "show-context-menu": e.showContextMenu,
- "show-user-info": e.showUserInfo,
- "new-notification": e.onNewNotification,
- "goto-channel-by-gameid": e.gotoChannelByGameId,
- "goto-chat-message": e.gotoChatMessage,
- "decline-challenge": e.declineChallenge,
- "accept-challenge": e.acceptChallenge,
- "show-emojis-view": e.showEmojisView,
- "leave-channel": e.leaveChannel,
- "on-user-ignored": e.onUserIgnored
- }
- }) : e._e()]
- }), e._v(" "), n("add-channel", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: "add-channel" === e.activeChannelId,
- expression: "activeChannelId === 'add-channel'"
- }],
- ref: "add-channel",
- on: {
- "join-channel": e.joinChannel,
- "patreon-info": e.selectChannel
- }
- }), e._v(" "), n("patreon-channel", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: "patreon-channel" === e.activeChannelId,
- expression: "activeChannelId === 'patreon-channel'"
- }],
- ref: "patreon-channel"
- }), e._v(" "), null !== e.contextMenuData ? n("context-menu", {
- ref: "contextMenu",
- attrs: {
- data: e.contextMenuData
- },
- on: {
- close: e.closeContextMenu
- }
- }) : e._e(), e._v(" "), null !== e.userInfoData ? n("user-info", {
- ref: "userInfo",
- attrs: {
- user: e.userInfoData
- },
- on: {
- close: e.closeUserInfoView
- }
- }) : e._e()]], 2)
- },
- staticRenderFns: [function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "spinnerWrapper"
- }, [n("div", {
- staticClass: "spinner"
- })])
- }]
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "mainToolbarWrapper"
- }, [n("div", {
- staticClass: "mainToolbar"
- }, [n("div", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: e.showGlobalStateMenu,
- expression: "showGlobalStateMenu"
- }],
- staticClass: "notificationsMaskBg",
- on: {
- click: function(t) {
- t.stopPropagation(), e.showGlobalStateMenu = !1
- }
- }
- }), e._v(" "), n("div", {
- staticClass: "logo"
- }, [n("svg", {
- attrs: {
- xmlns: "http://www.w3.org/2000/svg",
- width: "320",
- height: "320",
- viewBox: "0 0 320 320"
- },
- on: {
- click: e.selectChannel
- }
- }, [n("g", {
- attrs: {
- opacity: ".5",
- fill: "#FFF"
- }
- }, [n("path", {
- attrs: {
- 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"
- }
- })]), e._v(" "), n("path", {
- staticClass: "logoCircle",
- attrs: {
- 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"
- }
- }), e._v(" "), n("g", {
- attrs: {
- fill: "#FFF"
- }
- }, [n("path", {
- attrs: {
- 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"
- }
- })])])]), e._v(" "), n("div", {
- staticClass: "channelsList"
- }, [e._l(e.channels, function(t) {
- return [e.global.isGameChannel(t.id) ? n("channel-item", {
- key: t.id,
- attrs: {
- data: t
- },
- on: {
- select: e.onChannelSelect,
- "leave-channel": e.leaveChannel,
- "show-context-menu": e.showChannelContextMenu,
- "channel-item-initialized": e.channelItemInitialized
- }
- }) : "add-channel" === t.id ? n("add-channel-item", {
- attrs: {
- data: t
- },
- on: {
- select: e.onChannelSelect,
- "channel-item-initialized": e.channelItemInitialized
- }
- }) : e._e()]
- })], 2), e._v(" "), n("div", {
- staticClass: "buttonBar"
- }, [n("a", {
- staticClass: "notificationsButton",
- class: {
- active: e.showNotifications
- },
- on: {
- click: function(t) {
- t.stopPropagation(), e.showNotifications = !e.showNotifications, e.showSettings = !1, e.showNotificationsIndicator = !1
- }
- }
- }, [n("svg", {
- staticClass: "notificationsIconSvg",
- attrs: {
- xmlns: "http://www.w3.org/2000/svg",
- width: "30",
- height: "30",
- viewBox: "0 0 30 30"
- }
- }, [n("path", {
- attrs: {
- 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"
- }
- })]), e._v(" "), n("div", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: e.showNotificationsIndicator,
- expression: "showNotificationsIndicator"
- }],
- staticClass: "notificationsIndicator"
- })]), e._v(" "), n("a", {
- staticClass: "settingsButton",
- class: {
- active: e.showSettings
- },
- on: {
- click: function(t) {
- t.stopPropagation(), e.showSettings = !e.showSettings, e.showNotifications = !1
- }
- }
- }, [n("svg", {
- staticClass: "settingsIconSvg",
- attrs: {
- xmlns: "http://www.w3.org/2000/svg",
- width: "30",
- height: "30",
- viewBox: "0 0 30 30"
- }
- }, [n("path", {
- attrs: {
- 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"
- }
- }), e._v(" "), n("path", {
- attrs: {
- 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"
- }
- })])]), e._v(" "), n("a", {
- ref: "user",
- staticClass: "userButton"
- }, [n("div", {
- staticClass: "userAvatarWrapper",
- on: {
- click: function(t) {
- t.stopPropagation(), e.showGlobalStateMenu = !e.showGlobalStateMenu
- }
- }
- }, [n("img", {
- staticClass: "userAvatar",
- attrs: {
- src: e.avatarSrc
- }
- }), e._v(" "), n("div", {
- staticClass: "userState",
- class: {
- away: e.localUser.away, playing: e.localUser.playing
- }
- })]), e._v(" "), n("div", {
- staticClass: "userStateMenu",
- class: {
- active: e.showGlobalStateMenu
- },
- on: {
- click: function(e) {
- e.stopPropagation()
- }
- }
- }, [n("div", {
- staticClass: "optionWrapper",
- class: {
- active: !e.localUser.away
- },
- on: {
- click: function(t) {
- e.setAwayState(!1)
- }
- }
- }, [n("div", {
- staticClass: "stateShape online"
- }), e._v(" "), n("div", {
- staticClass: "stateName"
- }, [e._v("Online")])]), e._v(" "), n("div", {
- staticClass: "optionWrapper",
- class: {
- active: e.localUser.away
- },
- on: {
- click: function(t) {
- e.setAwayState(!0)
- }
- }
- }, [n("div", {
- staticClass: "stateShape away"
- }), e._v(" "), n("div", {
- staticClass: "stateName"
- }, [e._v("Away")])]), e._v(" "), n("div", {
- staticClass: "logOutWrapper"
- }, [n("div", {
- staticClass: "logOut",
- on: {
- click: function(t) {
- e.logOut()
- }
- }
- }, [e._v("\n Log out\n ")])])])])])]), e._v(" "), n("settings", {
- class: {
- active: e.showSettings
- },
- on: {
- close: function(t) {
- e.showSettings = !1
- },
- "patreon-info": e.openPatreonChannel
- }
- }), e._v(" "), n("notifications", {
- ref: "notifications",
- class: {
- active: e.showNotifications
- },
- on: {
- close: function(t) {
- e.showNotifications = !1
- },
- "decline-challenge": e.declineChallenge,
- "accept-challenge": e.acceptChallenge,
- "goto-chat-message": e.gotoChatMessage
- }
- })], 1)
- },
- staticRenderFns: []
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "searchChannel"
- }, [n("header", [n("h2", [e._v("Search game channel")]), e._v(" "), n("div", {
- staticClass: "inputWrapper"
- }, [n("input", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: e.textFilter,
- expression: "textFilter"
- }],
- ref: "textFilter",
- staticClass: "text-filter",
- attrs: {
- type: "text",
- placeholder: "Search +7000 games by name",
- autocorrect: "off",
- spellcheck: "false"
- },
- domProps: {
- value: e.textFilter
- },
- on: {
- input: function(t) {
- t.target.composing || (e.textFilter = t.target.value)
- }
- }
- }), e._v(" "), n("div", {
- staticClass: "filtersButton",
- class: {
- active: e.openedFilters
- },
- on: {
- click: e.toggleFilters
- }
- }, [n("svg", {
- staticClass: "filtersButtonIcon",
- attrs: {
- xmlns: "http://www.w3.org/2000/svg",
- width: "40",
- height: "40",
- viewBox: "0 0 40 40"
- }
- }, [n("path", {
- attrs: {
- d: "M9 0h2v10H9zM9 21h2v19H9zM19 0h2v21h-2zM19 32h2v8h-2zM29 0h2v14h-2zM29 25h2v15h-2z"
- }
- }), e._v(" "), n("path", {
- attrs: {
- d: "M11 11v9H9v-9h2m2-2H7v13h6V9zM21 22v9h-2v-9h2m2-2h-6v13h6V20zM31 15v9h-2v-9h2m2-2h-6v13h6V13z"
- }
- })])])]), e._v(" "), n("div", {
- staticClass: "filtersWrapper",
- class: {
- active: e.openedFilters
- }
- }, [n("div", {
- staticClass: "filtersList"
- }, [n("div", {
- staticClass: "filterItem genre"
- }, [n("div", {
- staticClass: "title"
- }, [e._v("Genre")]), e._v(" "), n("select", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: e.genreFilter,
- expression: "genreFilter"
- }],
- staticClass: "selectValue",
- on: {
- change: [function(t) {
- var n = Array.prototype.filter.call(t.target.options, function(e) {
- return e.selected
- }).map(function(e) {
- return "_value" in e ? e._value : e.value
- });
- e.genreFilter = t.target.multiple ? n : n[0]
- }, function(t) {
- e.requestChannels(0)
- }]
- }
- }, e._l(e.genres, function(t, a) {
- return n("option", {
- domProps: {
- value: a
- }
- }, [e._v("\n " + e._s(t) + "\n ")])
- }))]), e._v(" "), n("div", {
- staticClass: "filterItem year"
- }, [n("div", {
- staticClass: "title"
- }, [e._v("Release year")]), e._v(" "), n("select", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: e.yearFilter,
- expression: "yearFilter"
- }],
- staticClass: "selectValue",
- on: {
- change: [function(t) {
- var n = Array.prototype.filter.call(t.target.options, function(e) {
- return e.selected
- }).map(function(e) {
- return "_value" in e ? e._value : e.value
- });
- e.yearFilter = t.target.multiple ? n : n[0]
- }, function(t) {
- e.requestChannels(0)
- }]
- }
- }, e._l(e.years, function(t, a) {
- return n("option", {
- domProps: {
- value: a
- }
- }, [e._v("\n " + e._s(t) + "\n ")])
- }))]), e._v(" "), n("div", {
- staticClass: "filterItem system"
- }, [n("div", {
- staticClass: "title"
- }, [e._v("System")]), e._v(" "), n("select", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: e.systemFilter,
- expression: "systemFilter"
- }],
- staticClass: "selectValue",
- on: {
- change: [function(t) {
- var n = Array.prototype.filter.call(t.target.options, function(e) {
- return e.selected
- }).map(function(e) {
- return "_value" in e ? e._value : e.value
- });
- e.systemFilter = t.target.multiple ? n : n[0]
- }, function(t) {
- e.requestChannels(0)
- }]
- }
- }, e._l(e.systems, function(t, a) {
- return n("option", {
- domProps: {
- value: a
- }
- }, [e._v("\n " + e._s(t) + "\n ")])
- }))]), e._v(" "), n("div", {
- staticClass: "filterItem ranked"
- }, [n("div", {
- staticClass: "title"
- }, [e._v("Ranked")]), e._v(" "), n("select", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: e.rankedFilter,
- expression: "rankedFilter"
- }],
- staticClass: "selectValue",
- on: {
- change: [function(t) {
- var n = Array.prototype.filter.call(t.target.options, function(e) {
- return e.selected
- }).map(function(e) {
- return "_value" in e ? e._value : e.value
- });
- e.rankedFilter = t.target.multiple ? n : n[0]
- }, function(t) {
- e.requestChannels(0)
- }]
- }
- }, e._l(e.rankedOptions, function(t, a) {
- return n("option", {
- domProps: {
- value: a
- }
- }, [e._v("\n " + e._s(t) + "\n ")])
- }))])]), e._v(" "), n("div", {
- staticClass: "button-alt",
- on: {
- click: e.clearFilters
- }
- }, [e._v("\n Clear filters\n ")])])]), e._v(" "), n("paginated-list", {
- ref: "paginatedList",
- attrs: {
- noItemsInfo: e.noItemsInfo
- },
- on: {
- "join-channel": e.joinChannel,
- "fav-channel": e.favChannel,
- "goto-page-offset": e.gotoPageOffset,
- "patreon-info": e.openPatreonChannel
- }
- })], 1)
- },
- staticRenderFns: []
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement;
- return (e._self._c || t)("div")
- },
- staticRenderFns: []
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "eloMessageWrapper"
- }, [n("h3", [e._v("\n You just finished a ranked match\n ")]), e._v(" "), n("div", {
- staticClass: "currentScoreWrapper"
- }, [e._v("\n Your new elo score is "), n("span", {
- staticClass: "current-score"
- }, [e._v(e._s(e.data.elo.final))]), e._v(".\n ")]), e._v(" "), n("div", {
- staticClass: "prevScoreWrapper"
- }, [e._v("\n Previous score: "), n("span", {
- staticClass: "previous-score"
- }, [e._v(e._s(e.data.elo.initial))]), e._v(".\n ")]), e._v(" "), e.outcomeMsg ? n("div", {
- staticClass: "wrapUpWrapper",
- class: e.outcomeMsg
- }, [e._v("\n You " + e._s(e.outcomeMsg) + " " + e._s(Math.abs(e.data.elo.final - e.data.elo.initial)) + " points.\n ")]) : n("div", {
- staticClass: "wrapUpWrapper same"
- }, [e._v("\n You didn't win or lose any points.\n ")])])
- },
- staticRenderFns: []
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "welcomeWrapper"
- }, [n("div", {
- staticClass: "welcomeHeader"
- }, [n("div", {
- staticClass: "welcomeImage"
- }, [n("div", {
- staticClass: "welcomeTitle"
- }, [e._v("\n Welcome to\n ")]), e._v(" "), n("div", {
- staticClass: "fightcadeLogo"
- }, [n("svg", {
- attrs: {
- xmlns: "http://www.w3.org/2000/svg",
- width: "850",
- height: "118",
- viewBox: "0 0 850 118"
- }
- }, [n("path", {
- staticClass: "logoLetters",
- attrs: {
- 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"
- }
- })])])]), e._v(" "), e._m(0), e._v(" "), e._m(1), e._v(" "), n("div", {
- staticClass: "welcomeHeaderBgOverlay"
- })]), e._v(" "), n("div", {
- staticClass: "welcomeContentWrapper"
- }, [n("div", {
- staticClass: "welcomeContent"
- }, [n("div", {
- staticClass: "patreonInfo"
- }, [n("div", {
- staticClass: "image"
- }, [n("svg", {
- attrs: {
- xmlns: "http://www.w3.org/2000/svg",
- width: "800",
- height: "122",
- viewBox: "0 0 800 122"
- }
- }, [n("path", {
- attrs: {
- fill: "#fff",
- 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"
- }
- }), e._v(" "), n("path", {
- attrs: {
- fill: "#fff",
- 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"
- }
- }), e._v(" "), n("path", {
- staticClass: "logoLetters",
- attrs: {
- 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"
- }
- }), e._v(" "), n("path", {
- staticClass: "logoLetters",
- attrs: {
- 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"
- }
- })])]), e._v(" "), n("h3", [e._v("\n Help us make a better Fightcade\n ")]), e._v(" "), n("div", {
- staticClass: "buttons"
- }, [n("div", {
- staticClass: "button-generic learn-more",
- on: {
- click: e.openPatreonChannel
- }
- }, [e._v("\n Learn more\n ")]), e._v(" "), e._m(2)])]), e._v(" "), n("div", {
- staticClass: "welcomeFooterWrapper"
- }, [n("div", {
- staticClass: "footerColumn social"
- }, [n("div", {
- staticClass: "community"
- }, [n("h2", [e._v("Join our community")]), e._v(" "), n("a", {
- attrs: {
- target: "_blank",
- href: "https://discord.gg/EyERRSg"
- }
- }, [n("svg", {
- staticClass: "discordIcon",
- attrs: {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 800 272.1"
- }
- }, [n("path", {
- attrs: {
- 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"
- }
- }), e._v(" "), n("path", {
- attrs: {
- 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"
- }
- })])])]), e._v(" "), n("div", {
- staticClass: "socialNetworks"
- }, [n("h2", [e._v("Follow us")]), e._v(" "), n("div", {
- staticClass: "links"
- }, [n("a", {
- attrs: {
- target: "_blank",
- href: "https://twitter.com/fightcade"
- }
- }, [n("svg", {
- staticClass: "twitterIcon",
- attrs: {
- xmlns: "http://www.w3.org/2000/svg",
- width: "48",
- height: "48",
- viewBox: "0 0 100 100"
- }
- }, [n("path", {
- staticClass: "twitterIcon_bg",
- attrs: {
- 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"
- }
- })])]), e._v(" "), n("a", {
- attrs: {
- target: "_blank",
- href: "https://www.facebook.com/FightCade-1480028465619692/"
- }
- }, [n("svg", {
- staticClass: "facebookIcon",
- attrs: {
- xmlns: "http://www.w3.org/2000/svg",
- width: "48",
- height: "48",
- viewBox: "0 0 100 100"
- }
- }, [n("path", {
- staticClass: "facebookIcon_bg",
- attrs: {
- 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"
- }
- })])])])])]), e._v(" "), e._m(3), e._v(" "), e._m(4)])])])])
- },
- staticRenderFns: [function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "welcomeLinks"
- }, [n("div", {
- staticClass: "welcomeLinksItem"
- }, [n("div", {
- staticClass: "title"
- }, [e._v("\n Need help?\n ")]), e._v(" "), n("a", {
- attrs: {
- href: "https://discord.gg/EyERRSg",
- target: "_blank"
- }
- }, [e._v("Come to our discord server")])]), e._v(" "), n("div", {
- staticClass: "welcomeLinksItem"
- }, [n("div", {
- staticClass: "title"
- }, [e._v("\n First time here?\n ")]), e._v(" "), n("a", {
- attrs: {
- href: "https://play.fightcade.com/manual.html",
- target: "_blank"
- }
- }, [n("div", {
- staticClass: "button-generic"
- }, [e._v("\n Read the manual\n ")])])]), e._v(" "), n("div", {
- staticClass: "welcomeLinksItem"
- }, [n("div", {
- staticClass: "title"
- }, [e._v("\n Useful links\n ")]), e._v(" "), n("ul", [n("li", [n("a", {
- attrs: {
- href: "https://play.fightcade.com/faq.html",
- target: "_blank"
- }
- }, [e._v("F.A.Q.")])]), e._v(" "), n("li", [n("a", {
- attrs: {
- href: "https://play.fightcade.com/changelog.html",
- target: "_blank"
- }
- }, [e._v("Changelog")])])])])])
- }, function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "welcomeHeaderBgWrapper"
- }, [n("div", {
- staticClass: "welcomeHeaderBg"
- })])
- }, function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("a", {
- attrs: {
- href: "https://www.patreon.com/Fightcade",
- target: "_blank"
- }
- }, [n("div", {
- staticClass: "button-generic"
- }, [e._v("\n Become a patron\n ")])])
- }, function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "footerColumn about"
- }, [n("h2", [e._v("About Fightcade")]), e._v(" "), n("p", [e._v("\n FightCade uses "), n("a", {
- attrs: {
- target: "_blank",
- href: "http://www.fbalpha.com"
- }
- }, [e._v(" FB Alpha")]), e._v(", "), n("a", {
- attrs: {
- target: "_blank",
- href: "http://www.snes9x.com/"
- }
- }, [e._v(" SNES9X")]), e._v(" and "), n("a", {
- attrs: {
- target: "_blank",
- href: "https://en.wikipedia.org/wiki/GGPO"
- }
- }, [e._v("GGPO")]), e._v(" by Tony Cannon\n ")]), e._v(" "), n("p", [e._v("\n Client built on on "), n("a", {
- attrs: {
- target: "_blank",
- href: "https://vuejs.org/"
- }
- }, [e._v("VueJS")]), e._v(" + "), n("a", {
- attrs: {
- target: "_blank",
- href: "https://webpack.js.org/"
- }
- }, [e._v("Webpack")]), e._v(" using "), n("a", {
- attrs: {
- target: "_blank",
- href: "https://electron.atom.io/"
- }
- }, [e._v("Electron")])]), e._v(" "), n("p", [e._v("\n Backend built on "), n("a", {
- attrs: {
- target: "_blank",
- href: "https://nodejs.org"
- }
- }, [e._v("NodeJS")])])])
- }, function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "footerColumn credits"
- }, [n("h2", [e._v("Made by")]), e._v(" "), n("div", {
- staticClass: "name"
- }, [n("a", {
- attrs: {
- target: "_blank",
- href: "https://twitter.com/pof"
- }
- }, [e._v("\n Pau Oliva\n ")])]), e._v(" "), n("div", {
- staticClass: "area"
- }, [e._v("\n Backend Code\n ")]), e._v(" "), n("div", {
- staticClass: "name"
- }, [n("a", {
- attrs: {
- target: "_blank",
- href: "https://twitter.com/jordi_ros"
- }
- }, [e._v("\n Jordi Ros\n ")])]), e._v(" "), n("div", {
- staticClass: "area"
- }, [e._v("\n Custom emulator build + backend code\n ")]), e._v(" "), n("div", {
- staticClass: "name"
- }, [n("a", {
- attrs: {
- target: "_blank",
- href: "http://www.cesarbotana.com/"
- }
- }, [e._v("\n Cรยฉsar Botana\n ")])]), e._v(" "), n("div", {
- staticClass: "area"
- }, [e._v("\n Frontend code\n ")]), e._v(" "), n("div", {
- staticClass: "name"
- }, [n("a", {
- attrs: {
- target: "_blank",
- href: "https://www.jorgefuentes.net/?utm_source=fightcade&utm_medium=welcome_screen&utm_campaign=fightcade"
- }
- }, [e._v("\n Jorge Fuentes\n ")])]), e._v(" "), n("div", {
- staticClass: "area"
- }, [e._v("\n Frontend layout, UI/UX, brand design, docs, community\n ")])])
- }]
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- ref: "chatWrapper",
- staticClass: "chatWrapper"
- }, [n("div", {
- staticClass: "chatWrapperBg",
- style: e.channelBg
- }), e._v(" "), n("div", {
- staticClass: "floatingNotificationsWrapper",
- on: {
- mouseover: function(t) {
- e.pauseOuterNotificationsTimer = !0
- },
- mouseleave: function(t) {
- e.pauseOuterNotificationsTimer = !1
- }
- }
- }, [e._l(e.outerNotifications, function(t, a) {
- return ["mention" === t.type ? n("div", {
- staticClass: "floatingNotificationsItem mention",
- on: {
- click: function(t) {
- e.onOuterNotificationClick(a)
- }
- }
- }, [e._v("\n New mention on #" + e._s(t.channel.name) + "\n ")]) : n("div", {
- staticClass: "floatingNotificationsItem challenge"
- }, [n("div", {
- staticClass: "title",
- attrs: {
- title: t.channel.name
- },
- on: {
- click: function(t) {
- e.onOuterNotificationClick(a)
- }
- }
- }, [e._v("\n New challenge on #" + e._s(t.channel.name) + "\n ")]), e._v(" "), n("div", {
- staticClass: "details"
- }, [n("div", {
- staticClass: "challenger"
- }, [n("div", {
- staticClass: "ping"
- }, [n("img", {
- attrs: {
- src: e.pingSrc(t.user)
- }
- })]), e._v(" "), n("div", {
- staticClass: "rank"
- }, [n("img", {
- attrs: {
- src: e.rankSrc(t.user)
- }
- })]), e._v(" "), n("div", {
- staticClass: "name"
- }, [e._v("\n " + e._s(t.user.name) + "\n ")])]), e._v(" "), n("div", {
- staticClass: "actions"
- }, [n("div", {
- staticClass: "button-generic accept",
- on: {
- click: function(t) {
- e.onOuterChallengeNotificationClick("accept", a)
- }
- }
- }, [n("svg", {
- staticClass: "icon challenge",
- attrs: {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 40 40"
- }
- }, [n("path", {
- staticClass: "iconSvg challenge",
- attrs: {
- 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"
- }
- })]), e._v("\n Accept\n ")]), e._v(" "), n("div", {
- staticClass: "reject",
- on: {
- click: function(t) {
- e.onOuterChallengeNotificationClick("decline", a)
- }
- }
- }, [e._v("\n Decline\n ")])])])])]
- })], 2), e._v(" "), n("div", {
- ref: "messagesContainer",
- staticClass: "chatContent",
- on: {
- scroll: e.onMessagesContainerScroll
- }
- }, [e._m(0), e._v(" "), e._l(e.messages, function(t) {
- return [n("div", {
- staticClass: "messageWrapper",
- class: e.getMessageClass(t)
- }, ["channel" === t.type ? n("channel-message", {
- key: t.id,
- ref: t.id,
- refInFor: !0,
- attrs: {
- data: t
- }
- }) : "bot" === t.type ? n("bot-message", {
- key: t.id,
- ref: t.id,
- refInFor: !0,
- attrs: {
- data: t
- }
- }) : "elo" === t.type ? n("elo-message", {
- key: t.id,
- ref: t.id,
- refInFor: !0,
- attrs: {
- data: t
- }
- }) : "requestChallenge" === t.type ? n("request-challenge-message", {
- key: t.id,
- ref: t.id,
- refInFor: !0,
- attrs: {
- data: t
- },
- on: {
- "cancel-challenge": e.cancelChallenge
- }
- }) : "challengeRequested" === t.type ? n("challenge-requested-message", {
- key: t.id,
- ref: t.id,
- refInFor: !0,
- attrs: {
- data: t,
- channel: e.channel
- },
- on: {
- "decline-challenge": e.declineChallenge,
- "accept-challenge": e.acceptChallenge
- }
- }) : "chat" === t.type ? n("chat-message", {
- key: t.id,
- ref: t.id,
- refInFor: !0,
- attrs: {
- data: t
- },
- on: {
- "show-user-info": e.showUserInfo,
- "challenge-user": e.challengeUser,
- "goto-channel-by-gameid": e.gotoChannelByGameId,
- "scroll-to-bottom": e.scrollToBottom
- }
- }) : "terminal" === t.type ? n("terminal-message", {
- key: t.id,
- ref: t.id,
- refInFor: !0,
- attrs: {
- data: t
- }
- }) : n("raw-message", {
- key: t.id,
- ref: t.id,
- refInFor: !0,
- attrs: {
- data: t
- }
- })], 1)]
- })], 2), e._v(" "), n("div", {
- staticClass: "chatInput"
- }, [n("div", {
- staticClass: "notificationsHelpersWrapper"
- }, e._l(e.notificationsHelpers, function(t) {
- return n("div", {
- staticClass: "notificationsHelpersItem",
- class: t.type
- }, [n("div", {
- staticClass: "title"
- }, [e._v(e._s(t.title))]), e._v(" "), n("div", {
- staticClass: "options"
- }, [n("span", {
- staticClass: "discard",
- on: {
- click: function(n) {
- n.stopPropagation(), e.discardUnseen(t.type)
- }
- }
- }, [e._v("\n Discard\n ")]), e._v(" "), n("span", {
- staticClass: "goToFirst",
- on: {
- click: function(n) {
- n.stopPropagation(), e.gotoUnseen(t.type)
- }
- }
- }, [e._v("\n Go to first รขโ โ\n ")])])])
- })), e._v(" "), n("div", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: e.matchesList.length > 0,
- expression: "matchesList.length > 0"
- }],
- staticClass: "matchesWrapper"
- }, [n("header", [e._v(e._s(e.matchTitle) + "\n "), n("span", [e._v(e._s(e.matchString))])]), e._v(" "), n("div", {
- ref: "matchesList",
- staticClass: "matchesList",
- on: {
- mousemove: e.calculateActiveMatch
- }
- }, [e._l(e.computedmatchesList(), function(t, a) {
- return [n("div", {
- ref: "match_" + a,
- refInFor: !0,
- staticClass: "match",
- class: {
- active: t.active
- },
- on: {
- mousedown: e.insertMatch
- }
- }, ["command" !== e.matchType ? [n("img", {
- staticClass: "avatar",
- attrs: {
- src: e.avatarSrc(t)
- }
- }), e._v(" "), "user" === e.matchType ? [n("span", {
- staticClass: "text"
- }, [e._v(e._s(t.text))])] : [n("span", {
- staticClass: "channel-fullName"
- }, [e._v(e._s(t.channelName))]), e._v(" "), n("span", {
- staticClass: "channel-romName"
- }, [e._v(e._s(t.gameId))])]] : [n("span", {
- staticClass: "command"
- }, [e._v(e._s(t.text))]), e._v(" "), n("span", {
- staticClass: "description"
- }, [e._v(e._s(t.description))])]], 2)]
- })], 2)]), e._v(" "), n("input", {
- directives: [{
- name: "model",
- rawName: "v-model",
- value: e.inputText,
- expression: "inputText"
- }],
- ref: "input",
- staticClass: "input",
- attrs: {
- type: "text",
- placeholder: "Send message to #" + e.channelName,
- autocorrect: "off",
- spellcheck: "false"
- },
- domProps: {
- value: e.inputText
- },
- on: {
- keydown: e.onKeyDown,
- focus: e.onFocus,
- blur: e.onBlur,
- input: function(t) {
- t.target.composing || (e.inputText = t.target.value)
- }
- }
- })])])
- },
- staticRenderFns: [function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "betaNotice"
- }, [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", {
- attrs: {
- href: "https://discord.gg/EyERRSg",
- target: "_blank"
- }
- }, [e._v("our official Discord server")]), e._v(". Have fun!")])])
- }]
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "usersListToolbar"
- }, [n("div", {
- staticClass: "usersListWrapper"
- }, [e.usersOnline.length > 0 ? n("div", [n("div", {
- staticClass: "usersOnlineTitle"
- }, [e._v("Looking to play"), n("span", [e._v(e._s(e.usersOnline.length))])]), e._v(" "), n("div", {
- staticClass: "usersOnlineList"
- }, [e._l(e.usersOnline, function(t) {
- return [n("user-item", {
- key: t.id,
- attrs: {
- user: t,
- channel: e.channel
- },
- on: {
- "show-context-menu": e.showUserContextMenu,
- "show-user-info": e.showUserInfo,
- "challenge-user": e.challengeUser
- }
- })]
- })], 2)]) : e._e(), e._v(" "), e.matches.length > 0 ? n("div", [n("div", {
- staticClass: "matchesTitleWrapper"
- }, [n("div", {
- staticClass: "matchesTitle"
- }, [e._v("Playing ")]), e._v(" "), n("div", {
- staticClass: "matchesNumber"
- }, [e._v(e._s(e.matchesNumber))]), e._v(" "), n("div", {
- staticClass: "spectatorsIconWrapper"
- }, [n("svg", {
- staticClass: "spectatorsIconSvg",
- attrs: {
- xmlns: "http://www.w3.org/2000/svg",
- width: "24",
- height: "24",
- viewBox: "0 0 24 24"
- }
- }, [n("path", {
- attrs: {
- 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"
- }
- }), e._v(" "), n("path", {
- attrs: {
- 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"
- }
- })])])]), e._v(" "), n("div", {
- staticClass: "matchesList"
- }, [e._l(e.matches, function(t) {
- return [n("match-item", {
- key: t.id,
- attrs: {
- data: t,
- channel: e.channel
- },
- on: {
- "show-user-info": e.showUserInfo,
- "spectate-match": e.spectateMatch,
- "show-context-menu-match": e.showMatchContextMenu
- }
- })]
- })], 2)]) : e._e(), e._v(" "), e.usersAway.length > 0 ? n("div", [n("div", {
- staticClass: "usersAwayTitle"
- }, [e._v("Not available"), n("span", [e._v(e._s(e.usersAway.length))])]), e._v(" "), n("div", {
- staticClass: "usersAwayList"
- }, [e._l(e.usersAway, function(t) {
- return [n("user-item", {
- key: t.id,
- attrs: {
- user: t,
- channel: e.channel
- },
- on: {
- "show-context-menu": e.showUserContextMenu,
- "show-user-info": e.showUserInfo
- }
- })]
- })], 2)]) : e._e(), e._v(" "), e.usersIgnored.length > 0 ? n("div", [n("div", {
- staticClass: "usersIgnoredTitle"
- }, [e._v("Ignored"), n("span", [e._v(e._s(e.usersIgnored.length))])]), e._v(" "), n("div", {
- staticClass: "usersIgnoredList"
- }, [e._l(e.usersIgnored, function(t) {
- return [n("user-item", {
- key: t.id,
- attrs: {
- user: t,
- channel: e.channel
- },
- on: {
- "show-context-menu": e.showUserContextMenu,
- "show-user-info": e.showUserInfo
- }
- })]
- })], 2)]) : e._e()])])
- },
- staticRenderFns: []
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "favoritesWrapper"
- }, [e._m(0), e._v(" "), n("paginated-list", {
- ref: "paginatedList",
- attrs: {
- noItemsInfo: e.noItemsInfo,
- hideUnfavChannels: !0,
- hideFooter: !0
- },
- on: {
- "join-channel": e.joinChannel,
- "fav-channel": e.favChannel,
- "patreon-info": e.openPatreonChannel
- }
- })], 1)
- },
- staticRenderFns: [function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("header", [n("h2", [e._v("Your favorites")])])
- }]
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement;
- return (e._self._c || t)("a", {
- staticClass: "addChannelButton",
- class: {
- active: e.data.active
- },
- on: {
- click: e.select
- }
- })
- },
- staticRenderFns: []
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "mask",
- on: {
- click: e.close
- }
- }, [n("div", {
- ref: "menu",
- staticClass: "menu",
- style: e.menuStyle
- }, [e._l(e.data.items, function(t) {
- return ["challenge" === t.id ? n("div", {
- staticClass: "challengeButtonWrapper"
- }, [n("item", {
- attrs: {
- data: t
- },
- on: {
- click: e.onItemClick
- }
- })], 1) : e._e()]
- }), e._v(" "), n("div", {
- staticClass: "contextMenuItemsWrapper"
- }, [e._l(e.data.items, function(t) {
- return ["challenge" !== t.id && "separator" !== t.id ? n("item", {
- attrs: {
- data: t
- },
- on: {
- click: e.onItemClick
- }
- }) : e._e()]
- })], 2)], 2)])
- },
- staticRenderFns: []
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "message",
- class: e.data.type
- }, [e._l(e.data.lines, function(t, a) {
- return [0 === a ? n("header", [n("div", {
- staticClass: "authorAndTime"
- }, [n("span", {
- ref: "author",
- refInFor: !0,
- staticClass: "author"
- }, [e._v("\n " + e._s(e.data.author.name) + "\n ")]), e._v(" "), n("span", {
- staticClass: "time"
- }, [e._v("at " + e._s(e.timeInfo(e.data.lines[0].time)))])])]) : e._e(), e._v(" "), n("div", {
- ref: "line_" + a,
- refInFor: !0,
- staticClass: "line"
- }, [n("div", {
- staticClass: "blocksContainer"
- }, e._l(t.blocks, function(t, s) {
- return n("div", {
- staticClass: "blocks"
- }, [n("span", {
- ref: "block_" + a + "_" + s,
- refInFor: !0,
- class: t.class,
- on: {
- click: function(n) {
- e.onLineBlockClick(t)
- }
- }
- }, [e._v("\n " + e._s(t.text) + "\n ")])])
- }))])]
- })], 2)
- },
- staticRenderFns: []
- }
- }, function(e, t) {
- e.exports = {
- render: function() {
- var e = this,
- t = e.$createElement,
- n = e._self._c || t;
- return n("div", {
- staticClass: "channelItemWrapper"
- }, [n("div", {
- staticClass: "muteChannelItem",
- class: {
- active: e.data.localUserIsAway
- },
- attrs: {
- title: e.muteChannelTitle
- },
- on: {
- click: e.onChannelAway
- }
- }, [n("svg", {
- staticClass: "icon",
- attrs: {
- xmlns: "http://www.w3.org/2000/svg",
- width: "14",
- height: "14",
- viewBox: "0 0 14 14"
- }
- }, [n("g", [n("path", {
- attrs: {
- 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"
- }
- }), e._v(" "), n("path", {
- attrs: {
- 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"
- }
- })]), e._v(" "), n("path", {
- staticClass: "icon-strike",
- attrs: {
- d: "M12.657.636l.707.707-12.02 12.02-.708-.706z"
- }
- })])]), e._v(" "), n("div", {
- staticClass: "leaveChannelItem",
- attrs: {
- title: "Leave channel"
- },
- on: {
- click: e.leaveChannel
- }
- }, [n("svg", {
- staticClass: "icon",
- attrs: {
- xmlns: "http://www.w3.org/2000/svg",
- width: "14",
- height: "14",
- viewBox: "0 0 14 14"
- }
- }, [n("path", {
- attrs: {
- d: "M9 13H0V2h9v3H8V3H1v9h7v-2h1z"
- }
- }), e._v(" "), n("path", {
- attrs: {
- d: "M11.2 4.8l-.7.7L12 7H5v1h7.2l-1.7 1.6.7.8L14 7.6z"
- }
- })])]), e._v(" "), n("div", {
- staticClass: "channelItem",
- class: {
- active: e.data.active
- },
- attrs: {
- title: e.data.id
- },
- on: {
- mouseover: e.showTooltip,
- mouseleave: e.hideTooltip,
- click: e.select,
- contextmenu: function(t) {
- t.preventDefault(), e.showContextMenu(t)
- }
- }
- }, [n("div", {
- staticClass: "channelItemName"
- }, [e._v("\n " + e._s(e.truncatedGameId) + "\n ")]), e._v(" "), n("div", {
- staticClass: "notificationsIndicatorsWrapper"
- }, [n("div", {
- staticClass: "notificationsIndicators"
- }, [n("div", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: e.data.unseenMessages.length > 0,
- expression: "data.unseenMessages.length > 0"
- }],
- staticClass: "newMessages"
- }), e._v(" "), n("div", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: e.data.unseenMentions.length > 0,
- expression: "data.unseenMentions.length > 0"
- }],
- staticClass: "newMentions"
- }), e._v(" "), n("div", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: e.data.unseenChallenges.length > 0,
- expression: "data.unseenChallenges.length > 0"
- }],
- staticClass: "newChallenges"
- })])]), e._v(" "), n("div", {
- directives: [{
- name: "show",
- rawName: "v-show",
- value: !0,
- expression: "true"
- }],
- ref: "tooltip",
- staticClass: "tooltip"
- })])])
- },
- staticRenderFns: []
- }
- }, , , function(e, t) {}, function(e, t) {}], [35]);
- //# sourceMappingURL=app.46d254051e025f9058ef.js.map
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement