diff --git a/.gitignore b/.gitignore index dca5fb89b..6434aeaeb 100644 --- a/.gitignore +++ b/.gitignore @@ -153,3 +153,4 @@ config/datastores.js test/output/* .env .nyc_output/* +coverage/* \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 323d78ffc..00f3ee851 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,4 +8,7 @@ before_install: install: - npm install script: - - npm test \ No newline at end of file + - npm test + - npm run coverage + +after_script: "cat coverage/lcov.info | node_modules/coveralls/bin/coveralls.js" \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..627034ee0 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,2 @@ +{ + } \ No newline at end of file diff --git a/README.md b/README.md index 0111e28fb..f54a5e5dc 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +[![Coverage Status](https://coveralls.io/repos/github/CatalysmsServerManager/7-days-to-die-server-manager/badge.svg?branch=master)](https://coveralls.io/github/CatalysmsServerManager/7-days-to-die-server-manager?branch=master) +[![Build Status](https://travis-ci.org/CatalysmsServerManager/7-Days-to-Die-API-wrapper.svg?branch=master)](https://travis-ci.org/CatalysmsServerManager/7-Days-to-Die-API-wrapper) + # 7DTD Server manager ## [Public instance of CSMM](https://csmm.catalysm.net/) diff --git a/api/controllers/role/check-permission.js b/api/controllers/role/check-permission.js index 2a8952686..18e8e1940 100644 --- a/api/controllers/role/check-permission.js +++ b/api/controllers/role/check-permission.js @@ -12,6 +12,7 @@ module.exports = { permissionField: { type: 'string', required: true, + isIn: ["manageServer", "manageEconomy", "managePlayers", "manageTickets", "viewAnalytics", "viewDashboard", "useTracking", "useChat", "useCommands", "manageGbl", "discordExec", "discordLookup"] }, serverId: { @@ -59,7 +60,7 @@ module.exports = { let permCheck = await sails.helpers.roles.checkPermission.with(options); - return exits.success(permCheck.hasPermission) + return exits.success(permCheck.hasPermission); } diff --git a/api/controllers/role/update-role.js b/api/controllers/role/update-role.js index 1da143c82..f04c991d8 100644 --- a/api/controllers/role/update-role.js +++ b/api/controllers/role/update-role.js @@ -14,7 +14,7 @@ module.exports = { type: 'number', custom: async (valueToCheck) => { let foundRole = await Role.findOne(valueToCheck); - return foundRole + return foundRole; }, }, @@ -27,6 +27,10 @@ module.exports = { min: 0 }, + isDefault: { + type: 'boolean', + }, + discordRole: { type: 'string' }, @@ -104,6 +108,20 @@ module.exports = { fn: async function (inputs, exits) { + const role = await Role.findOne(inputs.roleId).populate('server'); + const server = role.server; + + // If another role is currently set as default, we must set that one to false. + // There can only be one default role per server. + if (inputs.isDefault) { + await Role.update({ + server: server.id, + isDefault: true + }, { + isDefault: false, + }); + } + let updateObj = { name: inputs.name, level: inputs.level, @@ -122,7 +140,8 @@ module.exports = { manageTickets: inputs.manageTickets, manageGbl: inputs.manageGbl, discordExec: inputs.discordExec, - discordLookup: inputs.discordLookup + discordLookup: inputs.discordLookup, + isDefault: inputs.isDefault, }; let updatedRole = await Role.update({ @@ -131,7 +150,7 @@ module.exports = { sails.log.info(`Updated a role for server ${updatedRole[0].server}`, updatedRole[0]) - return exits.success(updatedRole); + return exits.success(updatedRole[0]); } diff --git a/api/helpers/discord/set-role-from-discord.js b/api/helpers/discord/set-role-from-discord.js index c9f75d7fe..19b80b932 100644 --- a/api/helpers/discord/set-role-from-discord.js +++ b/api/helpers/discord/set-role-from-discord.js @@ -8,20 +8,14 @@ module.exports = { }, }, - exits: { - error: { - friendlyName: 'error' - }, - }, + exits: {}, fn: async function (inputs, exits) { - let player = await Player.findOne(inputs.playerId); if (_.isUndefined(player)) { return exits.error(new Error("Unknown player ID")); } - let user = await User.findOne({ steamId: player.steamId }); @@ -29,10 +23,12 @@ module.exports = { let serverConfig = await SdtdConfig.findOne({ server: player.server }).populate('server'); - let discordClient = sails.hooks.discordbot.getClient(); - let discordGuild = await discordClient.guilds.get(serverConfig.discordGuildId); + if (!discordClient) { + return exits.success(player, undefined); + } + let discordGuild = await discordClient.guilds.get(serverConfig.discordGuildId); if (_.isUndefined(discordGuild) || !discordGuild) { return exits.success(player, undefined); } @@ -40,7 +36,6 @@ module.exports = { if (!user.discordId) { return exits.success(player, undefined); } - let member = await discordGuild.members.get(user.discordId); if (_.isUndefined(member)) { @@ -48,7 +43,6 @@ module.exports = { } let memberRoles = member.roles.array(); - let currentPlayerRole = player.role; let highestRole = await Role.find({ @@ -60,7 +54,6 @@ module.exports = { limit: 1 }); - if (!_.isUndefined(highestRole[0])) { if ((!_.isNull(currentPlayerRole) ? currentPlayerRole.level : 9999999) > highestRole[0].level) { await Player.update({ @@ -70,8 +63,10 @@ module.exports = { }) } sails.log.debug(`Modified a players role - player ${player.id}. ${player.name} to role ${highestRole[0] ? highestRole[0].name : null}`); + return exits.success(player, highestRole[0]); } - return exits.success(player, highestRole[0]); + return exits.error(new Error(`Unexpected to return here, should have returned earlier.`)); + }, }; diff --git a/api/helpers/roles/check-permission.js b/api/helpers/roles/check-permission.js index 1d4d97c78..9bf0a4cc4 100644 --- a/api/helpers/roles/check-permission.js +++ b/api/helpers/roles/check-permission.js @@ -44,13 +44,11 @@ module.exports = { fn: async function (inputs, exits) { - if ((_.isUndefined(inputs.userId) || _.isUndefined(inputs.serverId)) && (_.isUndefined(inputs.discordId) || _.isUndefined(inputs.serverId)) && _.isUndefined(inputs.playerId)) { - return exits.invalidInput('You must provide either userId AND serverID, discordId AND serverId or just a playerId' + JSON.stringify(inputs)); + return exits.invalidInput('You must provide either userId AND serverId, discordId AND serverId or just a playerId' + JSON.stringify(inputs)); } let role; - if (inputs.discordId) { let foundUser = await User.find({ discordId: inputs.discordId @@ -61,6 +59,14 @@ module.exports = { } + if (inputs.playerId) { + try { + await sails.helpers.discord.setRoleFromDiscord(inputs.playerId); + } catch (error) { + sails.log.debug(`Couldn't update players roles via discord - ${error}`) + } + } + if (inputs.userId && inputs.serverId) { role = await sails.helpers.roles.getUserRole(inputs.userId, inputs.serverId); } @@ -69,22 +75,16 @@ module.exports = { role = await sails.helpers.sdtd.getPlayerRole(inputs.playerId); } - // If we find no role for a player, we default to highest level role. if (_.isUndefined(role)) { - let foundRole = await Role.find({ - where: { - server: inputs.serverId - }, - sort: 'level DESC', - limit: 1 - }); - role = foundRole[0] + role = await getDefaultRole(inputs.serverId); } let hasPermission = false; if (!_.isUndefined(inputs.userId)) { let foundUser = await User.findOne(inputs.userId); + + // Override permission check when user is a system admin if (foundUser.steamId === sails.config.custom.adminSteamId) { foundRole = await Role.find({ where: { @@ -92,7 +92,7 @@ module.exports = { }, sort: 'level ASC', limit: 1 - }) + }); if (foundRole[0]) { role = foundRole[0]; } @@ -108,6 +108,7 @@ module.exports = { hasPermission = true } + // Check if the user owns the server on CSMM, in that case we will always return true. if (!_.isUndefined(inputs.userId) && !hasPermission) { let server = await SdtdServer.findOne(inputs.serverId); @@ -116,9 +117,7 @@ module.exports = { } } - - - //sails.log.debug(`Checked if ${inputs.playerId ? `player ${inputs.playerId}` : `user ${inputs.userId}`} has permission ${inputs.permission} - ${hasPermission}`) + sails.log.debug(`Checked if ${inputs.playerId ? `player ${inputs.playerId}` : `user ${inputs.userId}`} has permission ${inputs.permission} - ${hasPermission}`) // All done. return exits.success({ @@ -130,3 +129,46 @@ module.exports = { }; + +async function getDefaultRole(serverId) { + + if (_.isUndefined(serverId)) { + throw new Error(`parameter serverId is required.`); + } + + let roles = await Role.find({ + server: serverId + }); + // Check if server has a role set as default + let defaultRole = roles.filter(role => role.isDefault)[0]; + if (defaultRole) { + return defaultRole; + } + + // If we find no default role for a server, we default to highest level role. + let foundRole = await Role.find({ + where: { + server: serverId + }, + sort: 'level DESC', + limit: 1 + }); + + // If we still can't find a role, it's likely because the server has none configured. In this case we will create a default role. + if (!foundRole[0]) { + let amountOfRoles = await Role.count({server: serverId}); + + sails.log.warn(`Detected ${amountOfRoles} roles for server ${serverId}. Creating a default one`); + if (amountOfRoles === 0) { + let createdRole = await Role.create({ + server: serverId, + name: "Player", + level: "2000", + }).fetch(); + return createdRole; + } + } + + return foundRole[0]; + +} diff --git a/api/helpers/roles/get-user-role.js b/api/helpers/roles/get-user-role.js index ee5164da2..07ba3a1c8 100644 --- a/api/helpers/roles/get-user-role.js +++ b/api/helpers/roles/get-user-role.js @@ -12,18 +12,18 @@ module.exports = { userId: { required: true, type: 'number', - custom: async (valueToCheck) => { + custom: async function (valueToCheck) { let foundUser = await User.findOne(valueToCheck); - return foundUser + return foundUser; }, }, serverId: { required: true, type: 'number', - custom: async (valueToCheck) => { + custom: async function (valueToCheck) { let foundServer = await SdtdServer.findOne(valueToCheck); - return foundServer + return foundServer; }, }, @@ -41,57 +41,19 @@ module.exports = { fn: async function (inputs, exits) { let foundUser = await User.findOne(inputs.userId); - let foundServer = await SdtdServer.findOne(inputs.serverId); - let foundPlayer = await Player.findOne({ where: { steamId: foundUser.steamId, server: inputs.serverId } }); - - try { - if (!_.isUndefined(foundPlayer)) { - await sails.helpers.discord.setRoleFromDiscord(foundPlayer.id); - } - } catch (error) { - sails.log.debug(`Couldn't update players roles via discord - ${error}`) - } - let foundRole; - - let amountOfRoles = await Role.count({ - server: inputs.serverId - }); - - if (amountOfRoles === 0) { - await Role.create({ - name: "Default role", - level: 9999, - server: inputs.serverId, - amountOfteleports: 5 - }); - } - if (!_.isUndefined(foundPlayer)) { if (foundPlayer.role) { foundRole = await Role.findOne(foundPlayer.role); } } - - if (_.isUndefined(foundRole)) { - foundRole = await Role.find({ - where: { - server: inputs.serverId - }, - sort: 'level DESC', - limit: 1 - }); - foundRole = foundRole[0] - } - - //sails.log.verbose(`Found role ${foundRole.name} for user ${foundUser.username}`) return exits.success(foundRole); } diff --git a/api/helpers/sdtd/get-player-role.js b/api/helpers/sdtd/get-player-role.js index 046d6996d..6d4c4626a 100644 --- a/api/helpers/sdtd/get-player-role.js +++ b/api/helpers/sdtd/get-player-role.js @@ -1,74 +1,50 @@ module.exports = { - friendlyName: 'Get player role', + friendlyName: 'Get player role', - description: '', + description: '', - inputs: { - - playerId: { - required: true, - type: 'number', - custom: async (valueToCheck) => { - let foundPlayer = await Player.findOne(valueToCheck); - return foundPlayer - }, - }, + inputs: { + playerId: { + required: true, + type: 'number', + custom: async (valueToCheck) => { + let foundPlayer = await Player.findOne(valueToCheck); + return foundPlayer + }, }, + }, - exits: { - success: { - outputFriendlyName: 'Success', - outputType: 'json' - }, + exits: { + success: { + outputFriendlyName: 'Success', + outputType: 'json' }, - fn: async function (inputs, exits) { - - let player = await Player.findOne(inputs.playerId); - - try { - await sails.helpers.discord.setRoleFromDiscord(inputs.playerId); - } catch (error) { - sails.log.debug(`Couldn't update players roles via discord - ${error}`) - } - - let foundRole; - - let amountOfRoles = await Role.count({server: player.server}); - - if (amountOfRoles === 0) { - await Role.create({ - name: "Default role", - level: 9999, - server: player.server, - amountOfteleports: 5 - }); - } - - if (player.role) { - foundRole = await Role.findOne(player.role); - } else { - foundRole = await Role.find({ - where: { - server: player.server - }, - sort: 'level DESC', - limit: 1 - }); - foundRole = foundRole[0] - } - - //sails.log.verbose(`Found role ${foundRole.name} for player ${player.name}`) - return exits.success(foundRole); + }, + + fn: async function (inputs, exits) { + + let player = await Player.findOne(inputs.playerId); + let foundRole; + + if (player.role) { + foundRole = await Role.findOne(player.role); + } else { + foundRole = undefined; } + //sails.log.verbose(`Found role ${foundRole.name} for player ${player.name}`) + return exits.success(foundRole); + + } + }; diff --git a/api/models/Role.js b/api/models/Role.js index 13402b0ed..1f5059193 100644 --- a/api/models/Role.js +++ b/api/models/Role.js @@ -23,6 +23,12 @@ module.exports = { defaultsTo: 2000 }, + // if true, csmm will use this role for any permission check where role is not explicitly set. + isDefault: { + type: 'boolean', + defaultsTo: false + }, + amountOfTeleports: { type: 'number', defaultsTo: 5 diff --git a/docs/ChatBridgeChannel.html b/docs/ChatBridgeChannel.html deleted file mode 100644 index 09128182d..000000000 --- a/docs/ChatBridgeChannel.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - Class: ChatBridgeChannel | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -

ChatBridgeChannel()

- - -
- -
- -
- - - -
- -

- - new ChatBridgeChannel() - - - - -

- - - -
-
- - -
- Discord chat bridge -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - -
- - - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - - - - - - - - - \ No newline at end of file diff --git a/docs/CustomDiscordEmbed.html b/docs/CustomDiscordEmbed.html deleted file mode 100644 index fcc389bbb..000000000 --- a/docs/CustomDiscordEmbed.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - Class: CustomDiscordEmbed | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -

CustomDiscordEmbed()

- - -
- -
- -
- - - -
- -

- - new CustomDiscordEmbed() - - - - -

- - - -
-
- - -
- Creates a RichEmbed & loads basic data relevant to this project. -Discord.js MessageEmbed -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - -
- - - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - - - - - - - - - \ No newline at end of file diff --git a/docs/MotdSender.html b/docs/MotdSender.html deleted file mode 100644 index 991e7accd..000000000 --- a/docs/MotdSender.html +++ /dev/null @@ -1,780 +0,0 @@ - - - - - Class: MotdSender | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -

MotdSender(serverId, config)

- -
Class to send MOTD messages
- - -
- -
- -
- - - -
- -

- - new MotdSender(serverId, config) - - - - -

- - - -
-
- - -
- Create the class -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -number - - - -
config - - -json - - - -
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - -
- - - - - - - - - - - - - - - - - -

Methods

- -
- - -
- -

- - async, static onJoinListener(connectedMessage) - - - - -

- - - -
-
- - -
- Function to attach to event emitter (loggingObj) -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
connectedMessage - - -json - - - -
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - async sendMotd(message, serverId, playerSteamId) - - - - -

- - - -
-
- - -
- Send the message to the server or a player if steamId is given -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
message - - -string - - - -
serverId - - -number - - - -
playerSteamId - - -string - - - -
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - async start() - - - - -

- - - -
-
- - -
- Start it -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - async stop() - - - - -

- - - -
-
- - -
- Stop it -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- -
- - - - - -
- -
- - - - -
- - - - - - - - - - - \ No newline at end of file diff --git a/docs/Player.html b/docs/Player.html deleted file mode 100644 index e9043cf92..000000000 --- a/docs/Player.html +++ /dev/null @@ -1,2591 +0,0 @@ - - - - - Class: Player | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -

Player(steamId, entityId)

- - -
- -
- -
- - - -
- -

- - new Player(steamId, entityId) - - - - -

- - - -
-
- - -
- A model definition. Represents a ingame player -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
steamId - - -number - - - -
entityId - - -number - - - -
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - -
- - - - - - - - - - - - - - - -

Members

- -
- - -
-

- static avatarUrl :string - - - -

- - -
-
- -
- Url of the players' steam avatar -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static banned :boolean - - - -

- - -
-
- -
- Whether or not a player is banned -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Default Value:
-
    -
  • false
  • -
- - - - - - - -
- - - - - -
- - - - -
-

- static entityId :number - - - -

- - -
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static inventory :json - - - -

- - -
-
- -
- Last known inventory -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static ip :string - - - -

- - -
-
- -
- Last known IP address of the player -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static lastOnline :string - - - -

- - -
-
- -
- When the player was last seen online -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static name :string - - - -

- - -
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static playtime :number - - - -

- - -
-
- -
- Total time the player has been online -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static positionX :number - - - -

- - -
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static positionY :number - - - -

- - -
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static positionZ :number - - - -

- - -
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static server - - - -

- - -
-
- -
- What server the player belongs to -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static user - - - -

- - -
-
- -
- What user corresponds to a player -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- -
- - - -

Methods

- -
- - -
- -

- - static ban(steamId, serverId) - - - - -

- - - -
-
- - -
- ban a player -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
steamId - - -string - - - - Steam ID of the player
serverId - - -string - - - - ID of the server
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - async, static getBanStatus(steamId, serverId) - - - - -

- - - -
-
- - -
- Get ban status of a player -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
steamId - - -string - - - - Steam ID of the player
serverId - - -string - - - - ID of the server
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - async, static getInventory(steamId, serverId) - - - - -

- - - -
-
- - -
- Get the contents of a players inventory -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
steamId - - -string - - - - Steam ID of the player
serverId - - -string - - - - ID of the server
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - async, static getLocation(steamId, serverId) - - - - -

- - - -
-
- - -
- Get location of a player -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
steamId - - -string - - - - Steam ID of the player
serverId - - -string - - - - ID of the server
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static give-item(playerId) - - - - -

- - - -
-
- - -
- Give items to a player -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
playerId - - -string - - - - Id of the player
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static kick(steamId, serverId) - - - - -

- - - -
-
- - -
- Kick a player -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
steamId - - -string - - - - Steam ID of the player
serverId - - -string - - - - ID of the server
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static teleport(playerId, coordX, coordY, coordZ) - - - - -

- - - -
-
- - -
- ban a player -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
playerId - - -string - - - -
coordX - - -number - - - -
coordY - - -number - - - -
coordZ - - -number - - - -
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static unban(steamId, serverId) - - - - -

- - - -
-
- - -
- unban a player -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
steamId - - -string - - - - Steam ID of the player
serverId - - -string - - - - ID of the server
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- -
- - - - - -
- -
- - - - -
- - - - - - - - - - - \ No newline at end of file diff --git a/docs/SdtdServer.html b/docs/SdtdServer.html deleted file mode 100644 index 4f9da65f1..000000000 --- a/docs/SdtdServer.html +++ /dev/null @@ -1,5402 +0,0 @@ - - - - - Class: SdtdServer | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -

SdtdServer()

- - -
- -
- -
- - - -
- -

- - new SdtdServer() - - - - -

- - - -
-
- - -
- Represents a 7 Days to Die server -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - -
- - - - - - - - - - - - - - - -

Members

- -
- - -
-

- static admins - - - -

- - -
-
- -
- Users allowed to perform admin actions on the server -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static authName :string - - - -

- - -
-
- -
- adminuser to use during webrequests -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static authToken :string - - - -

- - -
-
- -
- admintoken to use during webrequests -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static chat - * @method - - - -

- - -
-
- -
- Serves the chatbridge view -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static chatChannelId :string - - - -

- - -
-
- -
- Id of the discord channel for chat bridge -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static chatChannelRichMessages :string - - - -

- - -
-
- -
- Whether to use rich messages for (dis)connect messages -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static discordGuildId :string - - - -

- - -
-
- -
- Id of the disccord guild this server is associated with -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static gamePort :number - - - -

- - -
-
- -
- Port used by players to join the game -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static ip :string - - - -

- - -
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static name :string - - - -

- - -
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static notificationChannelId :string - - - -

- - -
-
- -
- Id of the discord channel for notifications -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static owner - - - -

- - -
-
- -
- Owner of the server, corresponds to a User -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static players - - - -

- - -
-
- -
- Collection of Players that have logged on the server -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static restart-server - - - -

- - -
-
- -
- Restart a server -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static telnetPort :number - - - -

- - -
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static tickets - - - -

- - -
-
- -
- Collection of SdtdTickets -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static webPort :number - - - -

- - -
-
- -
- Port provided by Alloc's webserver -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- -
- - - -

Methods

- -
- - -
- -

- - static add-server(serverip, telnetport, telnetpassword, webport) - - - - -

- - - -
-
- - -
- Add a server to the system -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverip - - -string - - - - Ip of the server to add
telnetport - - -number - - - - Telnet port of the server
telnetpassword - - -string - - - - Telnet password of the server
webport - - -number - - - - Port for webserver added by Alloc's fixes
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static available-items(serverId) → {array} - - - - -

- - - -
-
- - -
- Returns a list of items on the server -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -number - - - - ID of the server
- -
- - - - - - - - - - - - - -
-
Returns:
- - - - - -array - - - - - - - - - -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static check-if-bot-is-in-guild(guildId) → {array} - - - - -

- - - -
-
- - - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
guildId - - -number - - - - discord guild id
- -
- - - - - - - - - - - - - -
-
Returns:
- - - - - -array - - - - - - - - - -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static commands-reload(serverId, newConfig) - - - - -

- - - -
-
- - -
- Reloads the config of the country ban hook for a server -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -string - - - -
newConfig - - -json - - - -
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static commands-toggle(serverId) - - - - -

- - - -
-
- - -
- Toggles the status of the commands hook for a server -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -string - - - -
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static console(serverID) - - - - -

- - - -
-
- - -
- Server the console view -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverID - - -number - - - - ID of the server
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static country-ban-reload(serverId) - - - - -

- - - -
-
- - -
- Reloads the config of the country ban hook for a server -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -string - - - -
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static country-ban-toggle(serverId) - - - - -

- - - -
-
- - -
- Toggles the status of the country ban hook for a server -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -string - - - -
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static dashboard() - - - - -

- - - -
-
- - -
- Serves the dashboard for a 7 Days to die server -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static delete(serverID) - - - - -

- - - -
-
- - -
- Deletes a server from the system -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverID - - -number - - - - ID of the server
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static executeCommand(serverId, command) - - - - -

- - - -
-
- - -
- Executes a command on a 7dtd server -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -number - - - - ID of the server
command - - -string - - - - Command to be executed
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static find-guilds-managed-by-user(userId) → {array} - - - - -

- - - -
-
- - - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
userId - - -number - - - -
- -
- - - - - - - - - - - - - -
-
Returns:
- - - - - -array - - - - - - - - - -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static find-writeable-channels-in-guild(guildId) → {array} - - - - -

- - - -
-
- - - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
guildId - - -string - - - -
- -
- - - - - - - - - - - - - -
-
Returns:
- - - - - -array - - - - - - - - - -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static get-players(serverId) - - - - -

- - - -
-
- - -
- Get information about all players that have logged into the server -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -number - - - - ID of the server
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static get-players-view(serverId) - - - - -

- - - -
-
- - -
- Serve the players views -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -number - - - - ID of the server
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static load-server-info(serverId) - - - - -

- - - -
-
- - -
- Load/update server info and save to DB -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -number - - - - ID of the server
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static logging-toggle(serverId) - - - - -

- - - -
-
- - -
- Toggles the status of the logging hook for a server -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -string - - - -
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static motd-reload(serverId) - - - - -

- - - -
-
- - -
- Reloads the config of the country ban hook for a server -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -string - - - -
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static motd-toggle(serverId, message, interval) - - - - -

- - - -
-
- - -
- Toggles the status of the motd hook for a server -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -string - - - -
message - - -string - - - -
interval - - -number - - - -
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static sendMessage(serverID, message, destinationPlayer) - - - - -

- - - -
-
- - -
- sends a message on a 7dtd server -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverID - - -number - - - - ID of the server
message - - -string - - - - Message to be executed
destinationPlayer - - -string - - - - SteamID of the player to send a message to
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static server-infoview(serverId) - - - - -

- - - -
-
- - -
- Serves the serverinfo view -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -number - - - - ID of the server
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static settings(serverId) - - - - -

- - - -
-
- - -
- Serves the settings view -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -number - - - - ID of the server
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static subscribe-to-socket() - - - - -

- - - -
-
- - -
- Subscribe to a socket to receive event notifications -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeDescription
- - -serverId - - - -
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static tickets-view(serverId) - - - - -

- - - -
-
- - -
- Loads relevant ticket data, and serves the view -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -string - - - -
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static update-connection-info(serverId, serverIp, webPort, authName, authToken) - - - - -

- - - -
-
- - -
- Updates basic connection info for a server in the DB -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -string - - - -
serverIp - - -string - - - -
webPort - - -number - - - -
authName - - -string - - - -
authToken - - -string - - - -
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static user-tickets-view(userId) - - - - -

- - - -
-
- - -
- Loads relevant ticket data, and serves the view -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
userId - - -string - - - -
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- -
- - - - - -
- -
- - - - -
- - - - - - - - - - - \ No newline at end of file diff --git a/docs/User.html b/docs/User.html deleted file mode 100644 index 7c4c01a12..000000000 --- a/docs/User.html +++ /dev/null @@ -1,931 +0,0 @@ - - - - - Class: User | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -

User()

- - -
- -
- -
- - - -
- -

- - new User() - - - - -

- - - -
-
- - -
- Represents a user of the system -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - -
- - - - - - - - - - - - - - - -

Members

- -
- - -
-

- static admin :boolean - - - -

- - -
-
- -
- If a user can perform admin actions on the system -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Default Value:
-
    -
  • false
  • -
- - - - - - - -
- - - - - -
- - - - -
-

- static banned :boolean - - - -

- - -
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Default Value:
-
    -
  • false
  • -
- - - - - - - -
- - - - - -
- - - - -
-

- static dashboard - - - -

- - -
-
- -
- Serves user dashboard view -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static get-user-info - - - -

- - -
-
- -
- gets servers this user is owner of -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static getOwnedServers - - - -

- - -
-
- -
- gets servers this user is owner of -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static players - - - -

- - -
-
- -
- Ingame Players corresponding to a user -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static profile - - - -

- - -
-
- -
- Serves user profile view -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static servers - - - -

- - -
-
- -
- Servers this User owns -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static steamId :string - - - -

- - -
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static username :string - - - -

- - -
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- -
- - - - - - - -
- -
- - - - -
- - - - - - - - - - - \ No newline at end of file diff --git a/docs/controllers_AuthController.js.html b/docs/controllers_AuthController.js.html deleted file mode 100644 index 48d2d0f95..000000000 --- a/docs/controllers_AuthController.js.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - Source: controllers/AuthController.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
var passport = require('passport');
-var jwt = require('jsonwebtoken');
-
-/**
- * AuthController
- *
- * @description Server-side actions for handling incoming requests regarding authentication.
- * @module AuthController
- */
-
-
-module.exports = {
-
-  /**
-   * @description Authenticate a user via steam
-   */
-  steamLogin: function (req, res, next) {
-    sails.log.debug(`Logging in a user via steam`);
-    passport.authenticate('steam', {
-      failureRedirect: `${process.env.CSMM_HOSTNAME}`
-    })(req, res);
-
-  },
-
-  /**
-   * @description Return link after steam login
-   */
-
-  steamReturn: function (req, res) {
-    passport.authenticate('steam', {
-        failureRedirect: '/login'
-      },
-      async function (err, user) {
-        if (err) {
-          sails.log.error(`Steam auth error - ${err}`);
-          return res.serverError(err);
-        };
-        sails.log.debug(`User with id ${user.id} successfully logged in`);
-        req.session.userId = user.id;
-        try {
-          let players = await Player.find({
-            steamId: user.steamId
-          });
-          let playerIds = players.map((player) => {
-            return player.id;
-          });
-          await User.addToCollection(user.id, 'players').members(playerIds);
-        } catch (error) {
-          sails.log.error(`AuthController - Error updating user profile ${error}`);
-        }
-
-        res.redirect(`/user/${user.id}/dashboard`);
-      })(req, res);
-  },
-
-  discordReturn: function (req, res) {
-    passport.authenticate('discord', {
-        failureRedirect: '/'
-      },
-      async function (err, discordProfile) {
-        if (err) {
-          sails.log.error(`Discord auth error - ${err}`);
-          return res.serverError(err);
-        };
-
-        try {
-          await User.update({
-            id: req.session.userId
-          }, {
-            discordId: discordProfile.id,
-          });
-          sails.log.debug(`User ${req.session.userId} updated discord info successfully`);
-          res.redirect('/');
-        } catch (error) {
-          sails.log.error(`AuthController:discordReturn - Error updating user profile ${error}`);
-        }
-
-      })(req, res);
-  },
-
-
-  /**
-   * @description login via discord
-   */
-
-  discordLogin: function (req, res, next) {
-    sails.log.debug(`Logging in a user via discord`);
-    passport.authenticate('discord', {
-      failureRedirect: `${process.env.CSMM_HOSTNAME}`
-    })(req, res);
-
-  },
-
-  /**
-   * @description Log out a user, clears the encrypted cookie
-   */
-
-  logout: function (req, res) {
-    delete req.session.userId;
-    return res.redirect('/');
-  },
-
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_PlayerController.js.html b/docs/controllers_PlayerController.js.html deleted file mode 100644 index e87bf501b..000000000 --- a/docs/controllers_PlayerController.js.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - Source: controllers/PlayerController.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
var sevenDays = require('machinepack-7daystodiewebapi');
-
-/**
- * @memberof Player
- * @description  Get the contents of a players inventory
- * @param {string} steamId  Steam ID of the player
- * @param {string} serverId  ID of the server
- */
-
-async function getInventory(req, res) {
-  const steamId = req.query.steamId;
-  const serverId = req.query.serverId;
-
-  sails.log.debug(`Showing inventory for player ${steamId} on server ${serverId}`);
-
-  if (_.isUndefined(steamId)) {
-    return res.badRequest('No steam ID given');
-  }
-  if (_.isUndefined(serverId)) {
-    return res.badRequest('No server ID given');
-  }
-  try {
-    let playerInfo = await sails.helpers.loadPlayerData.with({
-      serverId: serverId,
-      steamId: steamId
-    });
-
-    let player = playerInfo.players[0];
-    let toSend = new Object();
-    toSend.id = player.id;
-    toSend.steamId = player.steamId;
-    toSend.serverId = player.server;
-    toSend.inventory = player.inventory;
-    return res.json(toSend);
-  } catch (error) {
-    sails.log.error(error);
-    return res.badRequest();
-  }
-}
-
-/**
- * @memberof Player
- * @description Get ban status of a player
- * @param {string} steamId  Steam ID of the player
- * @param {string} serverId  ID of the server
- */
-
-async function getBanStatus(req, res) {
-  const steamId = req.query.steamId;
-  const serverId = req.query.serverId;
-
-  sails.log.debug(`Showing ban status for player ${steamId} on server ${serverId}`);
-
-  if (_.isUndefined(steamId)) {
-    return res.badRequest('No steam ID given');
-  }
-  if (_.isUndefined(serverId)) {
-    return res.badRequest('No server ID given');
-  }
-
-  try {
-    let playerInfo = await sails.helpers.loadPlayerData.with({
-      serverId: serverId,
-      steamId: steamId
-    });
-
-    let player = playerInfo.players[0];
-    let toSend = new Object();
-    toSend.id = player.id;
-    toSend.steamId = player.steamId;
-    toSend.serverId = player.server;
-    toSend.banned = player.banned;
-    return res.json(toSend);
-  } catch (error) {
-    sails.log.error(error);
-    return res.badRequest();
-  }
-}
-
-/**
- * @memberof Player
- * @description Get location of a player
- * @param {string} steamId  Steam ID of the player
- * @param {string} serverId  ID of the server
- */
-
-async function getLocation(req, res) {
-  const steamId = req.query.steamId;
-  const serverId = req.query.serverId;
-
-  sails.log.debug(`Showing location info for player ${steamId} on server ${serverId}`);
-
-  if (_.isUndefined(steamId)) {
-    return res.badRequest('No steam ID given');
-  }
-  if (_.isUndefined(serverId)) {
-    return res.badRequest('No server ID given');
-  }
-
-  try {
-    let playerInfo = await sails.helpers.loadPlayerData.with({
-      serverId: serverId,
-      steamId: steamId
-    });
-
-    let player = playerInfo.players[0];
-    let toSend = new Object();
-    toSend.id = player.id;
-    toSend.steamId = player.steamId;
-    toSend.serverId = player.server;
-    toSend.location = player.location;
-    return res.json(toSend);
-  } catch (error) {
-    sails.log.error(error);
-    return res.badRequest();
-  }
-}
-
-
-
-module.exports = {
-  getInventory: getInventory,
-  getBanStatus: getBanStatus,
-  getLocation: getLocation
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_Player_ban.js.html b/docs/controllers_Player_ban.js.html deleted file mode 100644 index 034861cf3..000000000 --- a/docs/controllers_Player_ban.js.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - Source: controllers/Player/ban.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
var sevenDays = require('machinepack-7daystodiewebapi');
-
-module.exports = {
-
-  friendlyName: 'Ban player',
-
-  description: 'Ban a player from the server',
-
-  inputs: {
-    playerId: {
-      description: 'The ID of the player',
-      type: 'number',
-      required: true
-    },
-    reason: {
-      description: 'Reason the player gets banned',
-      type: 'string'
-    },
-    duration: {
-      description: 'How long to ban the player for',
-      type: 'number'
-    },
-    durationUnit: {
-      description: 'Time unit to ban player', //["minutes", "hours", "days", "weeks", "months", "years"]
-      type: 'string'
-    }
-  },
-
-  exits: {
-    success: {},
-    notFound: {
-      description: 'No player with the specified ID was found in the database.',
-      responseType: 'notFound'
-    }
-  },
-
-  /**
-   * @memberof Player
-   * @method ban
-   * @description ban a player
-   * @param {string} steamId  Steam ID of the player
-   * @param {string} serverId  ID of the server
-   */
-
-  fn: async function (inputs, exits) {
-
-    try {
-
-      sails.log.debug(`API - Player:ban - banning player ${inputs.playerId}`);
-      let player = await Player.findOne(inputs.playerId).populate('server');
-      let server = await SdtdServer.findOne(player.server.id);
-      return sevenDays.banPlayer({
-        ip: server.ip,
-        port: server.webPort,
-        authName: server.authName,
-        authToken: server.authToken,
-        playerId: player.steamId,
-        reason: inputs.reason,
-        duration: inputs.duration,
-        durationUnit: inputs.durationUnit.toLowerCase()
-      }).exec({
-        error: function (error) {
-          return exits.error(error);
-        },
-        unknownPlayer: function () {
-          return exits.notFound('Cannot ban player, invalid ID given!');
-        },
-        success: function (response) {
-          return exits.success(response);
-        }
-      });
-
-    } catch (error) {
-      sails.log.error(`API - Player:ban - ${error}`);
-      return exits.error(error);
-    }
-
-
-
-
-  }
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_Player_give-item.js.html b/docs/controllers_Player_give-item.js.html deleted file mode 100644 index 52308c3a2..000000000 --- a/docs/controllers_Player_give-item.js.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - Source: controllers/Player/give-item.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
var sevenDays = require('machinepack-7daystodiewebapi');
-
-module.exports = {
-
-  friendlyName: 'Give item',
-
-  description: 'Give item(s) to a player from the server',
-
-  inputs: {
-    playerId: {
-      description: 'The ID of the player',
-      type: 'number',
-      required: true
-    },
-
-    itemName: {
-      type: 'string',
-      required: true
-    },
-
-    amount: {
-      type: 'number',
-      required: true
-    },
-
-    quality: {
-      type: 'string'
-    }
-  },
-
-  exits: {
-    success: {},
-    notFound: {
-      description: 'No player with the specified ID was found in the database.',
-      responseType: 'notFound'
-    }
-  },
-
-  /**
-   * @memberof Player
-   * @method give-item
-   * @description Give items to a player
-   * @param {string} playerId  Id of the player
-   */
-
-  fn: async function (inputs, exits) {
-
-    try {
-
-      sails.log.debug(`API - Player:give-item - giving ${inputs.amount} of ${inputs.itemName} to ${inputs.playerId} with quality: ${inputs.quality}`);
-      let player = await Player.findOne(inputs.playerId).populate('server');
-      let server = await SdtdServer.findOne(player.server.id);
-
-      return sevenDays.giveItem({
-        ip: server.ip,
-        port: server.webPort,
-        authName: server.authName,
-        authToken: server.authToken,
-        entityId: player.entityId,
-        itemName: inputs.itemName,
-        amount: inputs.amount,
-        quality: inputs.quality
-      }).exec({
-        error: function (error) {
-          return exits.error(error);
-        },
-        playerNotFound: function () {
-          return exits.notFound('Did not find online player with given ID');
-        },
-        itemNotFound: function () {
-          return exits.notFound('Did not find given item');
-        },
-        success: function (response) {
-          return exits.success(response);
-        }
-      });
-
-    } catch (error) {
-      sails.log.error(`API - Player:give-item - ${error}`);
-      return exits.error(error);
-    }
-
-
-
-
-  }
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_Player_kick.js.html b/docs/controllers_Player_kick.js.html deleted file mode 100644 index 9a205b9f1..000000000 --- a/docs/controllers_Player_kick.js.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - Source: controllers/Player/kick.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
var sevenDays = require('machinepack-7daystodiewebapi');
-
-module.exports = {
-
-  friendlyName: 'Kick player',
-
-  description: 'Kick a player from the server',
-
-  inputs: {
-    playerId: {
-      description: 'The ID of the player',
-      type: 'number',
-      required: true
-    },
-    reason: {
-      description: 'Reason the player gets kicked',
-      type: 'string'
-    }
-  },
-
-  exits: {
-    success: {},
-    notFound: {
-      description: 'No player with the specified ID was found in the database.',
-      responseType: 'notFound'
-    }
-  },
-
-  /**
-   * @memberof Player
-   * @description Kick a player
-   * @method kick
-   * @param {string} steamId  Steam ID of the player
-   * @param {string} serverId  ID of the server
-   */
-
-  fn: async function (inputs, exits) {
-
-    try {
-
-      sails.log.debug(`API - Player:kick - Kicking player ${inputs.playerId}`);
-      let player = await Player.findOne(inputs.playerId).populate('server');
-      let server = await SdtdServer.findOne(player.server.id);
-      return sevenDays.kickPlayer({
-        ip: server.ip,
-        port: server.webPort,
-        authName: server.authName,
-        authToken: server.authToken,
-        playerId: player.steamId,
-        reason: inputs.reason
-      }).exec({
-        error: function (error) {
-          return exits.error(error);
-        },
-        unknownPlayer: function () {
-          return exits.notFound('Cannot kick player, invalid ID given!');
-        },
-        success: function (response) {
-          return exits.success(response);
-        }
-      });
-
-    } catch (error) {
-      sails.log.error(`API - Player:kick - ${error}`);
-      return exits.error(error);
-    }
-
-
-
-
-  }
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_Player_profile.js.html b/docs/controllers_Player_profile.js.html deleted file mode 100644 index dff0e3b6d..000000000 --- a/docs/controllers_Player_profile.js.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - Source: controllers/Player/profile.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-  friendlyName: 'Player Profile',
-
-  description: 'Show profile of a SdtdPlayer',
-
-  inputs: {
-    playerId: {
-      description: 'The ID of the player',
-      type: 'number',
-      required: true
-    }
-  },
-
-  exits: {
-    success: {
-      responseType: 'view',
-      viewTemplatePath: 'player/profile'
-    },
-    notFound: {
-      description: 'No player with the specified ID was found in the database.',
-      responseType: 'notFound'
-    },
-    forbidden: {
-      description: 'Someone who is not authorized tried to view this page',
-      responseType: 'forbidden'
-    }
-  },
-
-  /**
-   * @memberof module:Player
-   * @method profile
-   * @description Serves the player profile view
-   * @param {number} playerId
-   */
-
-  fn: async function (inputs, exits) {
-
-    sails.log.debug(`VIEW - Player:profile - Showing profile for ${inputs.playerId}`);
-
-    try {
-      let player = await Player.findOne(inputs.playerId);
-      let server = await SdtdServer.findOne(player.server);
-      await sails.helpers.loadPlayerData(server.id, player.steamId);
-      player = await Player.findOne(inputs.playerId);
-
-      const hhmmss = require('@streammedev/hhmmss')
-      Object.defineProperty(player, 'playtimeHHMMSS', {
-        value: hhmmss(player.playtime)
-      })
-
-      return exits.success({
-        player: player,
-        server: server
-      });
-    } catch (error) {
-      sails.log.error(`VIEW - Player:profile - ${error}`);
-      throw 'notFound';
-    }
-
-
-  }
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_Player_teleport.js.html b/docs/controllers_Player_teleport.js.html deleted file mode 100644 index e3fa68eca..000000000 --- a/docs/controllers_Player_teleport.js.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - Source: controllers/Player/teleport.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
const sevenDays = require('machinepack-7daystodiewebapi');
-
-module.exports = {
-
-  friendlyName: 'Teleport player',
-
-  description: 'Teleport a player to given coordinates',
-
-  inputs: {
-    playerId: {
-      description: 'The ID of the player',
-      type: 'number',
-      required: true
-    },
-    coordX: {
-      description: 'X coordinate',
-      type: 'number',
-      required: true
-    },
-    coordY: {
-      description: 'Y coordinate',
-      type: 'number',
-      required: true
-    },
-    coordZ: {
-      description: 'Y coordinate',
-      type: 'number',
-      required: true
-    }
-  },
-
-  exits: {
-    success: {},
-    notFound: {
-      description: 'No player with the specified ID was found in the database.',
-      responseType: 'notFound'
-    }
-  },
-
-  /**
-   * @memberof Player
-   * @description ban a player
-   * @method teleport
-   * @param {string} playerId
-   * @param {number} coordX
-   * @param {number} coordY
-   * @param {number} coordZ
-   */
-
-  fn: async function (inputs, exits) {
-
-    try {
-
-      sails.log.debug(`API - Player:teleport - teleporting player ${inputs.playerId}`);
-
-      let player = await Player.findOne(inputs.playerId).populate('server');
-      let server = player.server;
-
-      sevenDays.teleportPlayer({
-        ip: server.ip,
-        port: server.webPort,
-        authName: server.authName,
-        authToken: server.authToken,
-        playerId: player.steamId,
-        coordinates: `${inputs.coordX} ${inputs.coordY} ${inputs.coordZ}`
-      }).exec({
-        success: (response) => {
-          sails.log.debug(`API - Player:teleport - Successfully teleported player ${inputs.playerId} to ${inputs.coordX} ${inputs.coordY} ${inputs.coordZ}`);
-          return exits.success();
-        },
-        error: (error) => {
-          sails.log.error(`API - Player:teleport - ${error}`);
-          return exits.error(error);
-        }
-      });
-
-
-    } catch (error) {
-      sails.log.error(`API - Player:teleport - ${error}`);
-      return exits.error(error);
-    }
-
-
-
-
-  }
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_Player_unban.js.html b/docs/controllers_Player_unban.js.html deleted file mode 100644 index 73b1aeaa4..000000000 --- a/docs/controllers_Player_unban.js.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - Source: controllers/Player/unban.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
var sevenDays = require('machinepack-7daystodiewebapi');
-
-module.exports = {
-
-  friendlyName: 'Unban player',
-
-  description: 'Unban a player from the server',
-
-  inputs: {
-    playerId: {
-      description: 'The ID of the player',
-      type: 'number',
-      required: true
-    }
-  },
-
-  exits: {
-    success: {},
-    notFound: {
-      description: 'No player with the specified ID was found in the database.',
-      responseType: 'notFound'
-    }
-  },
-
-  /**
-   * @memberof Player
-   * @method unban
-   * @description unban a player
-   * @param {string} steamId  Steam ID of the player
-   * @param {string} serverId  ID of the server
-   */
-
-  fn: async function (inputs, exits) {
-
-    try {
-
-      sails.log.debug(`API - Player:unban - unbanning player ${inputs.playerId}`);
-      let player = await Player.findOne(inputs.playerId).populate('server');
-      let server = await SdtdServer.findOne(player.server.id);
-      return sevenDays.unbanPlayer({
-        ip: server.ip,
-        port: server.webPort,
-        authName: server.authName,
-        authToken: server.authToken,
-        playerId: player.steamId,
-      }).exec({
-        error: function (error) {
-          return exits.error(error);
-        },
-        unknownPlayer: function () {
-          return exits.notFound('Cannot unban player, invalid ID given!');
-        },
-        success: function (response) {
-          return exits.success(response);
-        }
-      });
-
-    } catch (error) {
-      sails.log.error(`API - Player:unban - ${error}`);
-      return exits.error(error);
-    }
-
-
-
-
-  }
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdServer_add-server.js.html b/docs/controllers_SdtdServer_add-server.js.html deleted file mode 100644 index 6f6bff11d..000000000 --- a/docs/controllers_SdtdServer_add-server.js.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - Source: controllers/SdtdServer/add-server.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-  friendlyName: 'Add server',
-
-  description: '',
-
-  inputs: {
-
-    serverIp: {
-      description: 'Ip of the SdtdServer',
-      type: 'string',
-      required: true
-    },
-
-    telnetPort: {
-      type: 'number',
-      required: true
-    },
-
-    webPort: {
-      type: 'number',
-      required: true,
-    },
-
-    telnetPassword: {
-      type: 'string',
-      required: true,
-    },
-
-    serverName: {
-      type: 'string',
-      required: true
-    }
-
-  },
-
-  exits: {
-
-    success: {},
-    badTelnet: {
-      description: 'Could not connect to telnet!',
-      statusCode: 200
-    },
-    badWebPort: {
-      description: 'WebPort given was not valid',
-      statusCode: 200
-    }
-
-  },
-
-  /**
-   * @memberof SdtdServer
-   * @name add-server
-   * @method
-   * @description Add a server to the system
-   * @param {string} serverip Ip of the server to add
-   * @param {number} telnetport Telnet port of the server
-   * @param {string} telnetpassword Telnet password of the server
-   * @param {number} webport Port for webserver added by Alloc's fixes
-   */
-
-  fn: async function (inputs, exits) {
-
-    sails.log.info(`API - SdtdServer:addServer - Adding a new server ${inputs.serverIp} ${inputs.webPort}`);
-
-    try {
-      let userProfile = await User.findOne(this.req.session.userId);
-      let sdtdServer = await sails.helpers.add7DtdServer.with({
-        ip: inputs.serverIp,
-        serverName: inputs.serverName,
-        telnetPort: inputs.telnetPort,
-        telnetPassword: inputs.telnetPassword,
-        webPort: inputs.webPort,
-        owner: userProfile.id
-      })
-
-      return exits.success(sdtdServer);
-    } catch (error) {
-      switch (error.code) {
-        case 'badTelnet':
-          exits.badTelnet({error: 'badTelnet'})
-          break;
-        case 'badWebPort':
-          exits.badWebPort({error: 'badWebPort'})
-          break;
-        default:
-          break;
-      }
-      sails.log.error(`API - addServer - ${error}`);
-      return exits.error(error);
-    }
-
-
-
-  }
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdServer_available-items.js.html b/docs/controllers_SdtdServer_available-items.js.html deleted file mode 100644 index 54fc8f889..000000000 --- a/docs/controllers_SdtdServer_available-items.js.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - Source: controllers/SdtdServer/available-items.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
const sevenDays = require('machinepack-7daystodiewebapi');
-
-module.exports = {
-
-
-  friendlyName: 'Get available items',
-
-
-  description: 'Returns a list of items on the server',
-
-
-  inputs: {
-    serverId: {
-      required: true,
-      example: 4
-    },
-    item: {
-      type: 'string',
-      example: 'stew'
-    }
-
-  },
-
-  exits: {
-    badRequest: {
-      responseType: 'badRequest'
-    },
-    notFound: {
-      responseType: 'notFound',
-      description: 'Server was not found in DB'
-    }
-  },
-
-  /**
-     * @memberof SdtdServer
-     * @method
-     * @name available-items
-     * @description Returns a list of items on the server
-     * @param {number} serverId ID of the server
-     * @returns {array}
-     */
-
-  fn: async function (inputs, exits) {
-    sails.log.debug(`API - SdtdServer:available-items - Loading available items!`);
-    try {
-      let server = await SdtdServer.findOne({
-        id: inputs.serverId
-      });
-
-      if (_.isUndefined(server)) {
-        return exits.notFound();
-      }
-
-      sevenDays.listItems({
-        ip: server.ip,
-        port: server.webPort,
-        authName: server.authName,
-        authToken: server.authToken,
-        itemToSearch: inputs.item
-      }).exec({
-        success: (response) => {
-          return exits.success(response);
-        },
-        unknownCommand: (error) => {
-          return exits.commandError(error);
-        },
-        error: (error) => {
-          return exits.error(error);
-        }
-      });
-
-    } catch (error) {
-      sails.log.error(`API - SdtdServer:available-items - ${error}`);
-      return exits.error(error);
-    }
-
-  }
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdServer_chat.js.html b/docs/controllers_SdtdServer_chat.js.html deleted file mode 100644 index 5eb8fb7cb..000000000 --- a/docs/controllers_SdtdServer_chat.js.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - Source: controllers/SdtdServer/chat.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-  friendlyName: 'Chat',
-
-  description: 'Start the chat bridge of a 7 Days to Die server & serve view',
-
-  inputs: {
-    serverId: {
-      description: 'The ID of the server',
-      type: 'number',
-      required: true
-    }
-  },
-
-  exits: {
-    success: {
-      responseType: 'view',
-      viewTemplatePath: 'sdtdServer/chat'
-    },
-    notFound: {
-      description: 'No server with the specified ID was found in the database.',
-      responseType: 'notFound'
-    }
-  },
-
-  /**
-   * @memberof SdtdServer
-   * @name chat
-   *    * @method
-   * @description Serves the chatbridge view
-   * @param {number} serverID ID of the server
-   */
-
-  fn: async function (inputs, exits) {
-
-    sails.log.debug(`VIEW - SdtdServer:chat - Showing chat for ${inputs.serverId}`);
-
-    try {
-      let server = await SdtdServer.findOne(inputs.serverId);
-      return exits.success({
-        server: server
-      });
-    } catch (error) {
-      sails.log.error(`VIEW - SdtdServer:chat - ${error}`);
-      throw 'notFound';
-    }
-
-
-  }
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdServer_commands_commands-reload.js.html b/docs/controllers_SdtdServer_commands_commands-reload.js.html deleted file mode 100644 index e4602d38b..000000000 --- a/docs/controllers_SdtdServer_commands_commands-reload.js.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - Source: controllers/SdtdServer/commands/commands-reload.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-
-  friendlyName: 'Commands reload',
-
-
-  description: 'Reload server config sdtdCommandsHook',
-
-
-  inputs: {
-    serverId: {
-      required: true,
-      type: 'string'
-    },
-    newConfig: {
-      type: 'json',
-      required: true
-    }
-  },
-
-
-  exits: {
-
-    notFound: {
-      description: 'Server with given ID not found in the system',
-      responseType: 'notFound'
-    },
-    success: {
-      description: 'Returns true if set to enabled, false if set to disabled'
-    },
-    badRequest: {
-      responseType: 'badRequest'
-    }
-
-  },
-
-  /**
-   * @memberof SdtdServer
-   * @name commands-reload
-   * @method
-   * @description Reloads the config of the country ban hook for a server
-   * @param {string} serverId
-   * @param {json} newConfig
-   */
-
-
-  fn: async function (inputs, exits) {
-
-    try {
-      sails.log.debug(`API - SdtdServer:commands-reload - Reloading config for server ${inputs.serverId}`);
-
-      let server = await SdtdServer.findOne({
-        id: inputs.serverId
-      });
-      let config = await SdtdConfig.findOne({
-        server: server.id
-      });
-
-      if (_.isUndefined(server)) {
-        return exits.notFound();
-      }
-      if (_.isUndefined(config)) {
-        return exits.notFound();
-      }
-      if (_.isUndefined(inputs.newConfig.commandsEnabled) || _.isUndefined(inputs.newConfig.commandPrefix)) {
-        sails.log.error(`API - SdtdServer:commands-reload - Invalid value for commandsEnabled ${inputs.newConfig.commandsEnabled} or commandPrefix ${inputs.newConfig.commandPrefix}`);
-        return exits.badRequest(`Invalid value(s) for new config`);
-      }
-
-      sails.hooks.sdtdcommands.updateConfig(inputs.serverId, inputs.newConfig);
-
-      sails.log.debug(`API - SdtdServer:commands-reload - Reloaded config for server ${inputs.serverId}`);
-
-      return exits.success();
-    } catch (error) {
-      sails.log.error(`API - SdtdServer:commands-reload - ${error}`);
-      return exits.error(error);
-    }
-
-
-  }
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdServer_commands_commands-toggle.js.html b/docs/controllers_SdtdServer_commands_commands-toggle.js.html deleted file mode 100644 index 0d96d35b0..000000000 --- a/docs/controllers_SdtdServer_commands_commands-toggle.js.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - Source: controllers/SdtdServer/commands/commands-toggle.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-
-  friendlyName: 'Commands toggle',
-
-
-  description: 'Toggle the SdtdCommandsHook',
-
-
-  inputs: {
-    serverId: {
-      required: true,
-      type: 'string'
-    }
-  },
-
-
-  exits: {
-
-    notFound: {
-      description: 'Server with given ID not found in the system',
-      responseType: 'notFound'
-    },
-    success: {
-      description: 'Returns true if set to enabled, false if set to disabled'
-    }
-
-  },
-
-  /**
-   * @memberof SdtdServer
-   * @name commands-toggle
-   * @method
-   * @description Toggles the status of the commands hook for a server
-   * @param {string} serverId
-   */
-
-
-  fn: async function (inputs, exits) {
-
-    try {
-      sails.log.debug(`API - SdtdServer:commands-toggle - Toggling commands for server ${inputs.serverId}`);
-
-      let server = await SdtdServer.findOne({
-        id: inputs.serverId
-      });
-      let config = await SdtdConfig.find({
-        server: inputs.serverId
-      });
-
-      if (config.length > 1) {
-        return exits.badRequest(`Found more than one config for this server`);
-      }
-
-      config = config[0];
-
-      if (_.isUndefined(server)) {
-        return exits.notFound();
-      }
-
-      let commandStatus = sails.hooks.sdtdcommands.getStatus(inputs.serverId);
-
-      if (!commandStatus) {
-        config.commandsEnabled = true;
-      } else {
-        config.commandsEnabled = false;
-      }
-
-      await sails.hooks.sdtdcommands.updateConfig(inputs.serverId, config);
-      let status = sails.hooks.sdtdcommands.getStatus(inputs.serverId);
-
-      sails.log.debug(`API - SdtdServer:commands-toggle - New status for server ${inputs.serverId} is ${status}`);
-
-      return exits.success(status);
-    } catch (error) {
-      sails.log.error(`API - SdtdServer:commands-toggle - ${error}`);
-      return exits.error(error);
-    }
-
-
-  }
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdServer_console.js.html b/docs/controllers_SdtdServer_console.js.html deleted file mode 100644 index 678d0306d..000000000 --- a/docs/controllers_SdtdServer_console.js.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - Source: controllers/SdtdServer/console.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-  friendlyName: 'Console',
-
-  description: 'Start the console of a 7 Days to Die server',
-
-  inputs: {
-    serverId: {
-      description: 'The ID of the server',
-      type: 'number',
-      required: true
-    }
-  },
-
-  exits: {
-    success: {
-      responseType: 'view',
-      viewTemplatePath: 'sdtdServer/console'
-    },
-    notFound: {
-      description: 'No server with the specified ID was found in the database.',
-      responseType: 'notFound'
-    }
-  },
-
-  /**
-   * @memberof SdtdServer
-   * @name console
-   * @method
-   * @description Server the console view
-   * @param {number} serverID ID of the server
-   */
-
-  fn: async function (inputs, exits) {
-
-    sails.log.debug(`VIEW - SdtdServer:console - Showing console for ${inputs.serverId}`);
-
-    try {
-      let server = await SdtdServer.findOne(inputs.serverId);
-      return exits.success({
-        server: server
-      });
-    } catch (error) {
-      sails.log.error(`VIEW - SdtdServer:console - ${error}`);
-      throw 'notFound';
-    }
-
-
-  }
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdServer_countryBan_country-ban-reload.js.html b/docs/controllers_SdtdServer_countryBan_country-ban-reload.js.html deleted file mode 100644 index 93a5ca516..000000000 --- a/docs/controllers_SdtdServer_countryBan_country-ban-reload.js.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - Source: controllers/SdtdServer/countryBan/country-ban-reload.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-
-  friendlyName: 'CountryBan reload',
-
-
-  description: 'Reload server config 7dtdCountryBanHook',
-
-
-  inputs: {
-    serverId: {
-      required: true,
-      type: 'string'
-    },
-    newConfig: {
-      type: 'json'
-    }
-  },
-
-
-  exits: {
-
-    notFound: {
-      description: 'Server with given ID not found in the system',
-      responseType: 'notFound'
-    },
-    success: {
-      description: 'Returns true if set to enabled, false if set to disabled'
-    }
-
-  },
-
-  /**
-   * @memberof SdtdServer
-   * @name country-ban-reload
-   * @method
-   * @description Reloads the config of the country ban hook for a server
-   * @param {string} serverId
-   */
-
-
-  fn: async function (inputs, exits) {
-
-    try {
-      sails.log.debug(`API - SdtdServer:country-ban-reload - Reloading config for server ${inputs.serverId}`);
-      let server = await SdtdServer.findOne({
-        id: inputs.serverId
-      });
-
-      if (_.isUndefined(server)) {
-        return exits.notFound();
-      }
-
-      let config = await SdtdConfig.findOne({server: server.id});
-
-      if (_.isUndefined(inputs.newConfig)) {
-        sails.hooks.countryban.reload(inputs.serverId);
-      } else {
-        let configToSend = config.countryBanConfig;
-
-        if (typeof inputs.newConfig.bannedCountries === typeof new Array()) {
-          // Handle the input countries & adjust the config to send accordingly
-          for (const country of inputs.newConfig.bannedCountries) {
-            if (configToSend.bannedCountries.includes(country)) {
-              var index = configToSend.bannedCountries.indexOf(country);
-              if (index > -1) {
-                configToSend.bannedCountries.splice(index, 1);
-              }
-            } else {
-              configToSend.bannedCountries.push(country);
-            }
-          }
-        }
-
-        if (_.isArray(inputs.newConfig.whiteListedSteamIds)) {
-          configToSend.whiteListedSteamIds = inputs.newConfig.whiteListedSteamIds;
-          
-        }
-
-        configToSend.kickMessage = inputs.newConfig.kickMessage == '' ? configToSend.kickMessage : inputs.newConfig.kickMessage;
-
-        sails.hooks.countryban.reload(inputs.serverId, configToSend);
-      }
-
-      sails.log.debug(`API - SdtdServer:country-ban-reload - Reloaded config for server ${inputs.serverId}`);
-
-      return exits.success();
-    } catch (error) {
-      sails.log.error(`API - SdtdServer:country-ban-reload - ${error}`);
-      return exits.error(error);
-    }
-
-
-  }
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdServer_countryBan_country-ban-toggle.js.html b/docs/controllers_SdtdServer_countryBan_country-ban-toggle.js.html deleted file mode 100644 index adf44c347..000000000 --- a/docs/controllers_SdtdServer_countryBan_country-ban-toggle.js.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - Source: controllers/SdtdServer/countryBan/country-ban-toggle.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-
-  friendlyName: 'CountryBan toggle',
-
-
-  description: 'Toggle the 7dtdCountryBanHook',
-
-
-  inputs: {
-    serverId: {
-      required: true,
-      type: 'string'
-    }
-  },
-
-
-  exits: {
-
-    notFound: {
-      description: 'Server with given ID not found in the system',
-      responseType: 'notFound'
-    },
-    success: {
-      description: 'Returns true if set to enabled, false if set to disabled'
-    }
-
-  },
-
-  /**
-     * @memberof SdtdServer
-     * @name country-ban-toggle
-     * @method
-     * @description Toggles the status of the country ban hook for a server
-     * @param {string} serverId
-     */
-
-
-  fn: async function (inputs, exits) {
-
-    try {
-      sails.log.debug(`API - SdtdServer:country-ban-toggle - Toggling country ban for server ${inputs.serverId}`);
-      let server = await SdtdServer.findOne({
-        id: inputs.serverId
-      });
-      if (_.isUndefined(server)) {
-        return exits.notFound();
-      }
-
-      let countryBanStatus = sails.hooks.countryban.getStatus(inputs.serverId);
-
-      if (_.isUndefined(countryBanStatus)) {
-        await sails.hooks.countryban.start(inputs.serverId);
-      } else {
-        await sails.hooks.countryban.stop(inputs.serverId);
-      }
-      let status = await sails.hooks.countryban.getStatus(inputs.serverId);
-
-      sails.log.debug(`API - SdtdServer:country-ban-toggle - New status for server ${inputs.serverId} is ${status}`);
-
-      return exits.success(status);
-    } catch (error) {
-      sails.log.error(`API - SdtdServer:country-ban-toggle - ${error}`);
-      return exits.error(error);
-    }
-
-
-  }
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdServer_dashboard.js.html b/docs/controllers_SdtdServer_dashboard.js.html deleted file mode 100644 index 60d223c19..000000000 --- a/docs/controllers_SdtdServer_dashboard.js.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - Source: controllers/SdtdServer/dashboard.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-  friendlyName: 'Dashboard',
-
-  description: 'Show the dashboard of a 7 Days to Die server',
-
-  inputs: {
-    serverId: {
-      description: 'The ID of the server to look up.',
-      type: 'number',
-      required: true
-    }
-  },
-
-  exits: {
-    success: {
-      responseType: 'view',
-      viewTemplatePath: 'sdtdServer/dashboard'
-    },
-    notFound: {
-      description: 'No server with the specified ID was found in the database.',
-      responseType: 'notFound'
-    }
-  },
-
-  /**
-   * @memberof SdtdServer
-   * @name dashboard
-   * @method
-   * @description Serves the dashboard for a 7 Days to die server
-   */
-
-  fn: async function (inputs, exits) {
-    sails.log.debug(`VIEW - SdtdServer:dashboard - Showing dashboard for ${inputs.serverId}`);
-
-    try {
-      let sdtdServer = await SdtdServer.findOne(inputs.serverId);
-      sdtdServerInfo = await sails.helpers.loadSdtdserverInfo(inputs.serverId)
-        .tolerate('unauthorized', (error) => {
-          sails.log.warn(`VIEW - SdtdServer:dashboard - unauthorized for server cannot load serverInfo ${inputs.serverId}`)
-        });
-
-      if (!_.isUndefined(sdtdServerInfo)) {
-        sdtdServer = sdtdServerInfo;
-      }
-      let players = await sails.helpers.loadPlayerData(inputs.serverId)
-        .tolerate('unauthorized', (error) => {
-          sails.log.warn(`VIEW - SdtdServer:dashboard - unauthorized for server cannot load playerInfo ${inputs.serverId}`)
-   
-        });
-      return exits.success({
-        server: sdtdServer,
-        players: players
-      });
-    } catch (error) {
-      sails.log.error(`VIEW - SdtdServer:dashboard - ${error}`);
-      throw 'notFound';
-    }
-
-
-  }
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdServer_delete-server.js.html b/docs/controllers_SdtdServer_delete-server.js.html deleted file mode 100644 index dd6b50a62..000000000 --- a/docs/controllers_SdtdServer_delete-server.js.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - Source: controllers/SdtdServer/delete-server.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
const sevenDays = require('machinepack-7daystodiewebapi');
-
-module.exports = {
-
-  friendlyName: 'Delete server',
-
-  description: 'Delete a server from the system',
-
-  inputs: {
-    serverId: {
-      description: 'The ID of the server',
-      type: 'number',
-      required: true
-    }
-  },
-
-  exits: {
-    success: {
-      responseType: 'view',
-      viewTemplatePath: 'sdtdServer/delete'
-    },
-    notFound: {
-      description: 'No server with the specified ID was found in the database.',
-      responseType: 'notFound'
-    }
-  },
-
-  /**
-   * @memberof SdtdServer
-   * @name delete
-   * @method
-   * @description Deletes a server from the system
-   * @param {number} serverID ID of the server
-   */
-
-  fn: async function (inputs, exits) {
-
-    sails.log.debug(`VIEW - SdtdServer:delete - Deleting server ${inputs.serverId}`);
-
-    try {
-      let server = await SdtdServer.findOne(inputs.serverId);
-      if (_.isUndefined(server)) {
-        return exits.notFound();
-      }
-
-      await sails.hooks.sdtdlogs.stop(server.id);
-
-      sevenDays.executeCommand({
-        ip: server.ip,
-        port: server.webPort,
-        authName: server.authName,
-        authToken: server.authToken,
-        command: `webtokens remove ${server.authName}`
-      }).exec({
-        success: result => {
-        },
-        error: error => {
-          sails.log.warn(`VIEW - SdtdServer:delete- Error while trying to delete token - ${error}`);
-        }
-      })
-
-      await SdtdConfig.destroy({
-        server: server.id
-      });
-      await Player.destroy({
-        server: server.id
-      })
-      await SdtdServer.destroy({
-        id: server.id
-      });
-
-      exits.success();
-
-    } catch (error) {
-      sails.log.error(`VIEW - SdtdServer:delete - ${error}`);
-      exits.error(error);
-    }
-
-
-  }
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdServer_discordBot_check-if-bot-is-in-guild.js.html b/docs/controllers_SdtdServer_discordBot_check-if-bot-is-in-guild.js.html deleted file mode 100644 index 5564106f6..000000000 --- a/docs/controllers_SdtdServer_discordBot_check-if-bot-is-in-guild.js.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - Source: controllers/SdtdServer/discordBot/check-if-bot-is-in-guild.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-
-  friendlyName: 'Check if bot is in guild',
-
-
-  description: 'Checks if the discord bot is in a discord guild with given ID.',
-
-
-  inputs: {
-    guildId: {
-      required: true,
-      example: '336821518250147850'
-    }
-
-  },
-
-  exits: {
-    badRequest: {
-      responseType: 'badRequest'
-    }
-  },
-
-  /**
-     * @memberof SdtdServer
-     * @method
-     * @name check-if-bot-is-in-guild
-     * @param {number} guildId discord guild id
-     * @returns {array}
-     */
-
-  fn: async function (inputs, exits) {
-    sails.log.debug(`API - SdtdServer:check-if-bot-is-in-guild - Check if the bot is in server ${inputs.guildId}!`);
-    try {
-
-      let discordClient = sails.hooks.discordbot.getClient();
-
-      exits.success(discordClient.guilds.has(inputs.guildId));
-
-    } catch (error) {
-      sails.log.error(`API - SdtdServer:check-if-bot-is-in-guild - ${error}`);
-      return exits.error(error);
-    }
-
-  }
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdServer_discordBot_find-writeable-channels-in-guild.js.html b/docs/controllers_SdtdServer_discordBot_find-writeable-channels-in-guild.js.html deleted file mode 100644 index cc66c80ac..000000000 --- a/docs/controllers_SdtdServer_discordBot_find-writeable-channels-in-guild.js.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - Source: controllers/SdtdServer/discordBot/find-writeable-channels-in-guild.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-
-    friendlyName: 'Find channels the bot can write in for a guild ID',
-  
-  
-    description: '',
-  
-  
-    inputs: {
-      guildId: {
-        example: '1337'
-      }
-  
-    },
-  
-    exits: {
-      badRequest: {
-        responseType: 'badRequest'
-      }
-    },
-  
-    /**
-       * @memberof SdtdServer
-       * @method
-       * @name find-writeable-channels-in-guild
-       * @param {string} guildId
-       * @returns {array}
-       */
-  
-    fn: async function (inputs, exits) {
-
-      try {
-  
-        let discordClient = sails.hooks.discordbot.getClient();
-        let guild = discordClient.guilds.get(inputs.guildId);
-        if (_.isUndefined(guild)) {
-            return exits.badRequest();
-        }
-
-        let foundChannels = guild.channels.filter(channel => {
-            if (channel.type !== 'text') {
-                return false;
-            }
-            let userPerms = channel.permissionsFor(discordClient.user)
-            return userPerms.has('SEND_MESSAGES')
-        });
-
-        let foundChannelsArray = Array.from(foundChannels.values());
-
-        exits.success(foundChannelsArray);
-        sails.log.debug(`API - SdtdServer:find-writeable-channels-in-guild - Found ${foundChannelsArray.length} channels for guild ${inputs.guildId}!`);
-      } catch (error) {
-        sails.log.error(`API - SdtdServer:find-writeable-channels-in-guild - ${error}`);
-        return exits.error(error);
-      }
-  
-    }
-  
-  
-  };
-  
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdServer_execute-command.js.html b/docs/controllers_SdtdServer_execute-command.js.html deleted file mode 100644 index 7958204ac..000000000 --- a/docs/controllers_SdtdServer_execute-command.js.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - Source: controllers/SdtdServer/execute-command.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
const sevenDays = require('machinepack-7daystodiewebapi');
-
-module.exports = {
-
-  friendlyName: 'Execute command',
-
-  description: 'Execute a command on a 7 Days to Die server',
-
-  inputs: {
-    serverId: {
-      description: 'The ID of the server to look up.',
-      type: 'number',
-      required: true
-    },
-    command: {
-      description: 'Command to execute',
-      type: 'string',
-      required: true
-    }
-  },
-
-  exits: {
-    success: {},
-    notFound: {
-      description: 'No server with the specified ID was found in the database.',
-      responseType: 'notFound'
-    },
-    commandError: {
-      description: 'Error executing the command',
-      responseType: 'badRequest'
-    }
-  },
-
-  /**
-   * @memberof SdtdServer
-   * @name executeCommand
-   * @method
-   * @description Executes a command on a 7dtd server
-   * @param {number} serverId ID of the server
-   * @param {string} command Command to be executed
-   */
-
-  fn: async function (inputs, exits) {
-    sails.log.debug(`API - SdtdServer:executeCommand - Executing a command on server ${inputs.serverId}`);
-
-    try {
-      let sdtdServer = await SdtdServer.findOne(inputs.serverId);
-      if (_.isUndefined(sdtdServer)) {
-        return exits.notFound();
-      }
-      sevenDays.executeCommand({
-        ip: sdtdServer.ip,
-        port: sdtdServer.webPort,
-        authName: sdtdServer.authName,
-        authToken: sdtdServer.authToken,
-        command: inputs.command
-      }).exec({
-        success: (response) => {
-          let logLine = {
-            msg: response.result,
-            date: new Date(),
-            type: 'commandResponse'
-          };
-          return exits.success(logLine);
-        },
-        unknownCommand: (error) => {
-          return exits.commandError(error);
-        },
-        error: (error) => {
-          return exits.error(error);
-        }
-      });
-
-    } catch (error) {
-      sails.log.error(`API - SdtdServer:executeCommand - ${error}`);
-      return exits.error(error);
-    }
-
-  }
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdServer_get-players-view.js.html b/docs/controllers_SdtdServer_get-players-view.js.html deleted file mode 100644 index 36f4626d5..000000000 --- a/docs/controllers_SdtdServer_get-players-view.js.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - Source: controllers/SdtdServer/get-players-view.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-
-  friendlyName: 'Get players view',
-
-
-  description: 'Load the player overview view',
-
-
-  inputs: {
-    serverId: {
-      required: true,
-      example: 4
-    }
-  },
-
-
-  exits: {
-    success: {
-      responseType: 'view',
-      viewTemplatePath: 'sdtdServer/players'
-    }
-
-  },
-
-  /**
-   * @memberof SdtdServer
-   * @name get-players-view
-   * @method
-   * @description Serve the players views
-   * @param {number} serverId ID of the server
-   */
-
-
-  fn: async function (inputs, exits) {
-
-    try {
-      sails.log.debug('VIEW - SdtdServer:players - serving players view');
-      let server = await SdtdServer.findOne({
-        id: inputs.serverId
-      });
-      let players = await Player.find({
-        server: server.id
-      });
-      exits.success({
-        players: players,
-        server: server
-      });
-    } catch (error) {
-      sails.log.error(`VIEW - SdtdServer:players - ${error}`);
-    }
-
-  }
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdServer_get-players.js.html b/docs/controllers_SdtdServer_get-players.js.html deleted file mode 100644 index ff056772a..000000000 --- a/docs/controllers_SdtdServer_get-players.js.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - Source: controllers/SdtdServer/get-players.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-
-  friendlyName: 'Get players',
-
-
-  description: 'Loads data about all players associated with a server',
-
-
-  inputs: {
-    serverId: {
-      required: true,
-      example: 4
-    }
-
-  },
-
-  exits: {
-    notFound: {
-      description: 'Server with given ID was not found in the system'
-    },
-    badRequest: {
-      responseType: 'badRequest'
-    },
-    notFound: {
-      responseType: 'notFound',
-      description: 'Server was not found in DB'
-    }
-  },
-
-  /**
-   * @memberof SdtdServer
-   * @method
-   * @name get-players
-   * @description Get information about all players that have logged into the server
-   * @param {number} serverId ID of the server
-   */
-
-  fn: async function (inputs, exits) {
-    sails.log.debug(`API - SdtdServer:getPlayers - Loading player data!`);
-    try {
-      let server = await SdtdServer.findOne({
-        id: inputs.serverId
-      });
-      if (_.isUndefined(server)) {
-        return exits.notFound();
-      }
-      sails.helpers.loadPlayerData(server.id)
-        .switch({
-          success: function(data) {
-            return exits.success(data);
-          },
-          error: function(error) {
-            return exits.badRequest();
-          }
-        });
-    } catch (error) {
-      sails.log.error(`API - SdtdServer:getPlayers - ${error}`);
-      return exits.error(error);
-    }
-
-  }
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdServer_load-server-info.js.html b/docs/controllers_SdtdServer_load-server-info.js.html deleted file mode 100644 index 61b9432f6..000000000 --- a/docs/controllers_SdtdServer_load-server-info.js.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - Source: controllers/SdtdServer/load-server-info.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-
-  friendlyName: 'Load server info',
-
-
-  description: 'Load server info and save to database',
-
-
-  inputs: {
-    serverId: {
-      required: true,
-      description: 'ID of the server',
-      type: 'string'
-    }
-  },
-
-
-  exits: {
-    notFound: {
-      description: 'Given serverId did not correspond to a server in the system'
-    }
-  },
-
-  /**
-   * @memberof SdtdServer
-   * @method
-   * @name load-server-info
-   * @description Load/update server info and save to DB
-   * @param {number} serverId ID of the server
-   */
-
-
-  fn: async function (inputs, exits) {
-
-    sails.log.debug(`API - SdtdServer:loadServerInfo - loading info for server ${inputs.serverId}`);
-
-    try {
-      let serverInfo = await sails.helpers.loadSdtdserverInfo(inputs.serverId);
-      exits.success(serverInfo);
-    } catch (error) {
-      sails.log.error(`API - SdtdServer:loadServerInfo - ${error}`);
-    }
-  }
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdServer_logging-toggle.js.html b/docs/controllers_SdtdServer_logging-toggle.js.html deleted file mode 100644 index 5841ea712..000000000 --- a/docs/controllers_SdtdServer_logging-toggle.js.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - Source: controllers/SdtdServer/logging-toggle.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-
-  friendlyName: 'Logging toggle',
-
-
-  description: 'Toggle the 7dtdLoggingHook',
-
-
-  inputs: {
-    serverId: {
-      required: true,
-      type: 'string'
-    }
-  },
-
-
-  exits: {
-
-    notFound: {
-      description: 'Server with given ID not found in the system',
-      responseType: 'notFound'
-    },
-    success: {
-      description: 'Returns true if set to enabled, false if set to disabled'
-    }
-
-  },
-
-  /**
-   * @memberof SdtdServer
-   * @name logging-toggle
-   * @method
-   * @description Toggles the status of the logging hook for a server
-   * @param {string} serverId
-   */
-
-
-  fn: async function (inputs, exits) {
-
-    try {
-      sails.log.debug(`API - SdtdServer:logging-toggle - Toggling logging for server ${inputs.serverId}`);
-      let server = await SdtdServer.findOne({
-        id: inputs.serverId
-      });
-      if (_.isUndefined(server)) {
-        return exits.notFound();
-      }
-      if (!sails.hooks.sdtdlogs.getStatus(inputs.serverId)) {
-        await sails.hooks.sdtdlogs.start(inputs.serverId);
-      } else {
-        await sails.hooks.sdtdlogs.stop(inputs.serverId);
-      }
-      let status = sails.hooks.sdtdlogs.getStatus(inputs.serverId);
-      sails.log.debug(`API - SdtdServer:logging-toggle - New status for server ${inputs.serverId} is ${status}`);
-      return exits.success(status);
-    } catch (error) {
-      sails.log.error(`API - SdtdServer:logging-toggle - ${error}`);
-    }
-
-
-  }
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdServer_motd_motd-reload.js.html b/docs/controllers_SdtdServer_motd_motd-reload.js.html deleted file mode 100644 index 2880c3087..000000000 --- a/docs/controllers_SdtdServer_motd_motd-reload.js.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - Source: controllers/SdtdServer/motd/motd-reload.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-
-  friendlyName: 'MOTD reload',
-
-
-  description: 'Reload server config 7dtdMOTDHook',
-
-
-  inputs: {
-    serverId: {
-      required: true,
-      type: 'string'
-    },
-    newMessage: {
-      type: 'string'
-    },
-    newDelay: {
-      type: 'number'
-    },
-    newStatusOnJoin: {
-      type: 'boolean'
-    }
-  },
-
-
-  exits: {
-
-    notFound: {
-      description: 'Server with given ID not found in the system',
-      responseType: 'notFound'
-    },
-    success: {
-      description: 'Returns true if set to enabled, false if set to disabled'
-    },
-    invalidInput: {
-      description: 'invalid inputs',
-      responseType: 'badRequest'
-    }
-
-  },
-
-  /**
-   * @memberof SdtdServer
-   * @name motd-reload
-   * @method
-   * @description Reloads the config of the country ban hook for a server
-   * @param {string} serverId
-   */
-
-
-  fn: async function (inputs, exits) {
-
-    try {
-      sails.log.debug(`API - SdtdServer:motd-reload - Reloading config for server ${inputs.serverId}`);
-      let server = await SdtdServer.findOne({
-        id: inputs.serverId
-      });
-      let config = await SdtdConfig.findOne({
-        server: server.id
-      });
-
-      if (_.isUndefined(server)) {
-        return exits.notFound();
-      }
-
-      if (!_.isUndefined(inputs.newDelay) && inputs.newDelay != '0') {
-        if (isNaN(inputs.newDelay) || (10 > inputs.newDelay) || (2000 < inputs.newDelay) || !Number.isInteger(Number(inputs.newDelay))) {
-          return exits.invalidInput();
-        }
-      }
-
-      await sails.hooks.sdtdmotd.updateConfig(inputs.serverId,
-        _.isUndefined(inputs.newMessage) ? config.motdMessage : inputs.newMessage,
-        _.isUndefined(inputs.newDelay) ? config.motdInterval : inputs.newDelay,
-        config.motdEnabled,
-        _.isUndefined(inputs.newStatusOnJoin) ? config.motdOnJoinEnabled : inputs.newStatusOnJoin
-      );
-
-      sails.log.debug(`API - SdtdServer:motd-reload - Reloaded config for server ${inputs.serverId}`);
-
-      return exits.success();
-    } catch (error) {
-      sails.log.error(`API - SdtdServer:motd-reload - ${error}`);
-      return exits.error(error);
-    }
-
-
-  }
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdServer_motd_motd-toggle.js.html b/docs/controllers_SdtdServer_motd_motd-toggle.js.html deleted file mode 100644 index 05f1666ed..000000000 --- a/docs/controllers_SdtdServer_motd_motd-toggle.js.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - Source: controllers/SdtdServer/motd/motd-toggle.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-
-  friendlyName: 'MOTD toggle',
-
-
-  description: 'Toggle the 7dtdMOTDHook',
-
-
-  inputs: {
-    serverId: {
-      required: true,
-      type: 'string'
-    },
-    message: {
-      type: 'string',
-    },
-    interval: {
-      type: 'number'
-    }
-  },
-
-
-  exits: {
-
-    notFound: {
-      description: 'Server with given ID not found in the system',
-      responseType: 'notFound'
-    },
-    success: {
-      description: 'Returns true if set to enabled, false if set to disabled'
-    }
-
-  },
-
-  /**
-   * @memberof SdtdServer
-   * @name motd-toggle
-   * @method
-   * @description Toggles the status of the motd hook for a server
-   * @param {string} serverId
-   * @param {string} message
-   * @param {number} interval
-   */
-
-
-  fn: async function (inputs, exits) {
-
-    try {
-      sails.log.debug(`API - SdtdServer:motd-toggle - Toggling motd for server ${inputs.serverId}`);
-      let server = await SdtdServer.findOne({
-        id: inputs.serverId
-      });
-      let config = await SdtdConfig.findOne({
-        server: inputs.serverId
-      });
-
-      if (_.isUndefined(server) || _.isUndefined(config)) {
-        return exits.notFound();
-      }
-
-      if (config.motdEnabled) {
-        await sails.hooks.sdtdmotd.updateConfig(inputs.serverId, config.motdMessage, config.motdInterval, false, config.motdOnJoinEnabled);
-      } else {
-        await sails.hooks.sdtdmotd.updateConfig(inputs.serverId, config.motdMessage, config.motdInterval, true, config.motdOnJoinEnabled);
-      }
-
-      let status = sails.hooks.sdtdmotd.getStatus(inputs.serverId);
-      sails.log.debug(`API - SdtdServer:motd-toggle - New status for server ${inputs.serverId} is ${status}`);
-
-      return exits.success(status);
-    } catch (error) {
-      sails.log.error(`API - SdtdServer:motd-toggle - ${error}`);
-      return exits.error(error);
-    }
-
-
-  }
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdServer_restart-server.js.html b/docs/controllers_SdtdServer_restart-server.js.html deleted file mode 100644 index ff78fb26b..000000000 --- a/docs/controllers_SdtdServer_restart-server.js.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - Source: controllers/SdtdServer/restart-server.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
var sevenDays = require('machinepack-7daystodiewebapi');
-
-module.exports = {
-
-  friendlyName: 'Restart server',
-
-  description: 'Restart a server with configurable countdown',
-
-  inputs: {
-    serverId: {
-      description: 'The ID of the server',
-      type: 'number',
-      required: true
-    },
-    delay: {
-      description: 'Time to delay (in minutes)',
-      type: 'number'
-    }
-  },
-
-  exits: {
-    success: {},
-    notFound: {
-      description: 'No server with the specified ID was found in the database.',
-      responseType: 'notFound'
-    }
-  },
-
-  /**
-   * @memberof SdtdServer
-   * @name restart-server
-   * @description Restart a server
-   * @param {string} serverId  ID of the server
-   * @param {number} delay Time to delay the restart (in minutes)
-   */
-
-  fn: async function (inputs, exits) {
-
-    try {
-
-      sails.log.debug(`API - SdtdServer:restart-server - Restarting server ${inputs.serverId} in ${inputs.delay} minutes`);
-
-      if (_.isUndefined(inputs.delay)) {
-        inputs.delay = 5;
-      }
-
-      let server = await SdtdServer.findOne(inputs.serverId);
-
-      setTimeout(() => {
-        sevenDays.executeCommand({
-          ip: server.ip,
-          port: server.webPort,
-          authName: server.authName,
-          authToken: server.authToken,
-          command: `shutdown`
-        }).exec({
-          error: (error) => {
-            sails.log.error(`API - SdtdServer:restart-server - ${error}`);
-          },
-          success: (response) => {
-            sails.log.debug(`API - SdtdServer:restart-server - Successful restart for server ${inputs.serverId} in ${inputs.delay} minutes`);
-
-          }
-        });
-      }, inputs.delay * 60 * 1000);
-
-
-
-      for (let index = 0; index < inputs.delay+1; index++) {
-        setTimeout(async function () {
-          if (inputs.delay - index > 0) {
-            await sendXMinutesUntilRestartToServer(inputs.delay - index, server);
-          }
-        }, index * 60 * 1000);
-      }
-
-      return exits.success();
-
-
-    } catch (error) {
-      sails.log.error(`API - SdtdServer:restart-server - ${error}`);
-      return exits.error(error);
-    }
-
-
-
-
-  }
-};
-
-/**
- * @memberof SdtdServer#restart-server
- * @param {number} minutesLeft
- * @param {json} server server object with connection data
- * @returns {number} Amount of minutes left after message (eg input - 1)
- */
-
-function sendXMinutesUntilRestartToServer(minutesLeft, server) {
-  return new Promise((resolve, reject) => {
-    if (isNaN(minutesLeft)) {
-      reject(new Error(`Did not supply a number`));
-    }
-
-    sevenDays.sendMessage({
-      ip: server.ip,
-      port: server.webPort,
-      authName: server.authName,
-      authToken: server.authToken,
-      message: `Restarting the server in ${minutesLeft} minute(s)`
-    }).exec({
-      error: (error) => {
-        reject(error);
-      },
-      success: (response) => {
-        resolve(minutesLeft - 1);
-      }
-    });
-  });
-}
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdServer_send-message.js.html b/docs/controllers_SdtdServer_send-message.js.html deleted file mode 100644 index f2d5f325a..000000000 --- a/docs/controllers_SdtdServer_send-message.js.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - Source: controllers/SdtdServer/send-message.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
const sevenDays = require('machinepack-7daystodiewebapi');
-
-module.exports = {
-
-  friendlyName: 'Send message',
-
-  description: 'Execute a message on a 7 Days to Die server',
-
-  inputs: {
-    serverId: {
-      description: 'The ID of the server to look up.',
-      type: 'number',
-      required: true
-    },
-    message: {
-      description: 'message to send',
-      type: 'string',
-      required: true
-    },
-    destinationPlayer: {
-      description: 'Player to send a message to (steamID)',
-      type:'string'
-    }
-  },
-
-  exits: {
-    success: {
-    },
-    notFound: {
-      description: 'No server/player with the specified ID was found in the database.',
-      responseType: 'notFound'
-    }
-  },
-
-  /**
-   * @memberof SdtdServer
-   * @name sendMessage
-   * @method
-   * @description sends a message on a 7dtd server
-   * @param {number} serverID ID of the server
-   * @param {string} message Message to be executed
-   * @param {string} destinationPlayer SteamID of the player to send a message to
-   */
-
-  fn: async function (inputs, exits) {
-
-
-
-    sails.log.debug(`API - SdtdServer:send message - sending a message on server ${inputs.serverId} to player: ${inputs.destinationPlayer}`);
-
-    try {
-      let sdtdServer = await SdtdServer.findOne(inputs.serverId);
-      sevenDays.sendMessage({
-        ip: sdtdServer.ip,
-        port: sdtdServer.webPort,
-        authName: sdtdServer.authName,
-        authToken: sdtdServer.authToken,
-        message: inputs.message,
-        playerID: inputs.destinationPlayer ? inputs.destinationPlayer : undefined
-      }).exec({
-        success: (response) => {
-          return exits.success(response);
-        },
-        error: (error) => {
-          return exits.error(error);
-        }
-      });
-
-    } catch (error) {
-      sails.log.error(`API - SdtdServer:sendMessage - ${error}`);
-      return exits.error(error);
-    }
-
-  }
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdServer_server-info-view.js.html b/docs/controllers_SdtdServer_server-info-view.js.html deleted file mode 100644 index 0430551c8..000000000 --- a/docs/controllers_SdtdServer_server-info-view.js.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - Source: controllers/SdtdServer/server-info-view.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-  friendlyName: 'Server info view',
-
-  description: 'Serve view witj full serverinfo',
-
-  inputs: {
-    serverId: {
-      description: 'The ID of the server',
-      type: 'number',
-      required: true
-    }
-  },
-
-  exits: {
-    success: {
-      responseType: 'view',
-      viewTemplatePath: 'sdtdServer/info'
-    },
-    notFound: {
-      description: 'No server with the specified ID was found in the database.',
-      responseType: 'notFound'
-    }
-  },
-
-  /**
-     * @memberof SdtdServer
-     * @name server-infoview
-     * @method
-     * @description Serves the serverinfo view
-     * @param {number} serverId ID of the server
-     */
-
-  fn: async function (inputs, exits) {
-
-    sails.log.debug(`VIEW - SdtdServer:info - Showing info for ${inputs.serverId}`);
-
-    try {
-      let server = await sails.helpers.loadSdtdserverInfo(inputs.serverId);
-      return exits.success({
-        server: server
-      });
-    } catch (error) {
-      sails.log.error(`VIEW - SdtdServer:info - ${error}`);
-      throw 'notFound';
-    }
-
-
-  }
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdServer_settings.js.html b/docs/controllers_SdtdServer_settings.js.html deleted file mode 100644 index 6c41a2f66..000000000 --- a/docs/controllers_SdtdServer_settings.js.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - Source: controllers/SdtdServer/settings.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-  friendlyName: 'Settings',
-
-  description: 'Show the settings for a server view',
-
-  inputs: {
-    serverId: {
-      description: 'The ID of the server',
-      type: 'number',
-      required: true
-    }
-  },
-
-  exits: {
-    success: {
-      responseType: 'view',
-      viewTemplatePath: 'sdtdServer/settings'
-    },
-    notFound: {
-      description: 'No server with the specified ID was found in the database.',
-      responseType: 'notFound'
-    }
-  },
-
-  /**
-   * @memberof SdtdServer
-   * @name settings
-   * @method
-   * @description Serves the settings view
-   * @param {number} serverId ID of the server
-   */
-
-  fn: async function (inputs, exits) {
-
-    sails.log.debug(`VIEW - SdtdServer:settings - Showing settings for ${inputs.serverId}`);
-
-    try {
-      let server = await SdtdServer.findOne(inputs.serverId);
-      let serverConfig = await SdtdConfig.findOne({server: server.id});
-      let user = await User.findOne(this.req.session.userId)
-      return exits.success({
-        server: server,
-        config: serverConfig,
-        user: user
-      });
-    } catch (error) {
-      sails.log.error(`VIEW - SdtdServer:settings - ${error}`);
-      throw 'notFound';
-    }
-
-
-  }
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdServer_subscribe-to-socket.js.html b/docs/controllers_SdtdServer_subscribe-to-socket.js.html deleted file mode 100644 index 9b5aca009..000000000 --- a/docs/controllers_SdtdServer_subscribe-to-socket.js.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - Source: controllers/SdtdServer/subscribe-to-socket.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-
-  friendlyName: 'Subscribe to socket',
-
-
-  description: 'Subscribe a client to their server socket',
-
-
-  inputs: {
-    serverId: {
-      description: 'Id of the server',
-      required: true,
-      type: 'string'
-    }
-
-  },
-
-
-  exits: {
-
-    serverNotFound: {
-      description: 'Server with the specified ID was not found in the system'
-    },
-    notASocket: {
-      description: 'Client that made the request is not a socket'
-    }
-
-  },
-
-  /**
-   * @memberof SdtdServer
-   * @method
-   * @description Subscribe to a socket to receive event notifications
-   * @name subscribe-to-socket
-   * @param {serverId}
-   */
-
-  fn: async function (inputs, exits) {
-    sails.log.debug(`API - SdtdServer:subscribeToSocket - subscribing to server ${inputs.serverId}`);
-
-    if (!this.req.isSocket) {
-      throw 'notASocket';
-    }
-
-    try {
-      let server = await SdtdServer.findOne({id: inputs.serverId});
-      if (_.isUndefined(server)) {
-        throw serverNotFound;
-      }
-      sails.sockets.join(this.req, inputs.serverId);
-      sails.log.debug(`API - SdtdServer:subscribeToSocket - Successfully connected server ${inputs.serverId}`);
-    } catch (error) {
-      sails.log.error(`API - SdtdServer:subscribeToSocket - ${error}`);
-      return exits.error(error);
-    }
-
-    return exits.success();
-
-  }
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdServer_update-connection-info.js.html b/docs/controllers_SdtdServer_update-connection-info.js.html deleted file mode 100644 index 780133566..000000000 --- a/docs/controllers_SdtdServer_update-connection-info.js.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - Source: controllers/SdtdServer/update-connection-info.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
const sevenDays = require('machinepack-7daystodiewebapi');
-
-module.exports = {
-
-
-  friendlyName: 'Update connection info',
-
-
-  description: 'Update ip, port, authname and/or authtoken for a sdtdServer',
-
-
-  inputs: {
-    serverId: {
-      required: true,
-      type: 'string'
-    },
-    serverIp: {
-      type: 'string',
-    },
-
-    webPort: {
-      type: 'number',
-    },
-
-    authName: {
-      type: 'string',
-    },
-
-    authToken: {
-      type: 'string',
-    },
-    serverName: {
-      type: 'string'
-    }
-  },
-
-
-  exits: {
-
-    notFound: {
-      description: 'Server with given ID not found in the system',
-      responseType: 'notFound'
-    },
-    success: {}
-
-  },
-
-  /**
-   * @memberof SdtdServer
-   * @name update-connection-info
-   * @method
-   * @description Updates basic connection info for a server in the DB
-   * @param {string} serverId
-   * @param {string} serverIp
-   * @param {number} webPort
-   * @param {string} authName
-   * @param {string} authToken
-   */
-
-
-  fn: async function (inputs, exits) {
-
-    try {
-      sails.log.debug(`API - SdtdServer:update-connection-info - Updating connection info for server ${inputs.serverId}`);
-
-      let server = await SdtdServer.findOne(inputs.serverId);
-
-      let ip = ('' == inputs.serverIp) ? server.ip : inputs.serverIp;
-      let webPort = ('' == inputs.webPort) ? server.webPort : inputs.webPort;
-      let serverName = ('' == inputs.serverName) ? server.name : inputs.serverName;
-
-      await SdtdServer.update({
-        id: inputs.serverId
-      }, {
-        ip: ip,
-        webPort: webPort,
-        name: serverName
-      });
-
-      if (inputs.webPort || inputs.serverIp) {
-        sails.hooks.sdtdlogs.stop(inputs.serverId);
-        sails.hooks.sdtdlogs.start(inputs.serverId);
-      }
-      return exits.success();
-    } catch (error) {
-      sails.log.error(`API - SdtdServer:update-connection-info - ${error}`);
-      return exits.error(error);
-    }
-
-
-  }
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdTicket_edit-ticket.js.html b/docs/controllers_SdtdTicket_edit-ticket.js.html deleted file mode 100644 index 0fe3f2b9b..000000000 --- a/docs/controllers_SdtdTicket_edit-ticket.js.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - Source: controllers/SdtdTicket/edit-ticket.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-
-  friendlyName: 'Edit ticket details',
-
-
-  description: 'Update the details of a ticket',
-
-
-  inputs: {
-    ticketId: {
-      required: true,
-      type: 'string'
-    },
-    description: {
-      type: 'string'
-    }
-  },
-
-
-  exits: {
-
-    notFound: {
-      description: 'Ticket with given ID not found in the system',
-      responseType: 'notFound'
-    },
-    success: {
-    }
-
-  },
-
-  /**
-     * @memberof SdtdTicket
-     * @name edit-ticket
-     * @method
-     * @description Changes details of a ticket
-     * @param {string} ticketId
-     */
-
-
-  fn: async function (inputs, exits) {
-
-    try {
-      sails.log.debug(`API - SdtdTicket:edit-ticket - Editing info for ticket ${inputs.ticketId}`);
-
-      await SdtdTicket.update({id: inputs.ticketId}, {
-        description: inputs.description
-      });
-
-      return exits.success();
-    } catch (error) {
-      sails.log.error(`API - SdtdTicket:edit-ticket - ${error}`);
-      return exits.error(error);
-    }
-
-
-  }
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdTicket_open-tickets.js.html b/docs/controllers_SdtdTicket_open-tickets.js.html deleted file mode 100644 index 47a2a9576..000000000 --- a/docs/controllers_SdtdTicket_open-tickets.js.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - Source: controllers/SdtdTicket/open-tickets.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-
-  friendlyName: 'Get open tickets for a server',
-
-
-  description: 'Get open tickets for a server',
-
-
-  inputs: {
-    serverId: {
-      type: 'string'
-    }
-  },
-
-
-  exits: {
-    success: {}
-
-  },
-
-  /**
-   * @memberof SdtdTicket
-   * @name open-tickets
-   * @method
-   * @description Get open tickets for a server
-   * @param {string} serverId
-   */
-
-
-  fn: async function (inputs, exits) {
-
-    try {
-      let openTickets = await SdtdTicket.find({
-        server: inputs.serverId,
-        status: true
-      });
-      sails.log.debug(`API - SdtdTicket:open-ticket - found ${openTickets.length} open tickets for server ${inputs.serverId}`)
-      return exits.success(openTickets);
-    } catch (error) {
-      sails.log.error(`API - SdtdTicket:open-tickets - ${error}`);
-      return exits.error(error);
-    }
-
-
-  }
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdTicket_server-tickets-view.js.html b/docs/controllers_SdtdTicket_server-tickets-view.js.html deleted file mode 100644 index 65e7fd617..000000000 --- a/docs/controllers_SdtdTicket_server-tickets-view.js.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - Source: controllers/SdtdTicket/server-tickets-view.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-
-  friendlyName: 'Server tickets view',
-
-
-  description: 'Loads relevant ticket data, and serves the view',
-
-
-  inputs: {
-    serverId: {
-      type: 'string',
-      required: true
-    }
-  },
-
-
-  exits: {
-
-    notFound: {
-      description: 'Server with given ID not found in the system',
-      responseType: 'notFound'
-    },
-    success: {
-      description: '',
-      responseType: 'view',
-      viewTemplatePath: 'sdtdServer/tickets'
-    }
-
-  },
-
-  /**
-   * @memberof SdtdServer
-   * @name tickets-view
-   * @method
-   * @description Loads relevant ticket data, and serves the view
-   * @param {string} serverId
-   */
-
-
-  fn: async function (inputs, exits) {
-
-    try {
-      sails.log.debug(`API - SdtdServer:tickets-view - Loading tickets view for server ${inputs.serverId}`);
-
-      let server = await SdtdServer.findOne({
-        id: inputs.serverId
-      });
-      let tickets = await SdtdTicket.find({
-        server: inputs.serverId
-      }).populate('player')
-
-      if (_.isUndefined(server) || _.isUndefined(tickets)) {
-        return exits.notFound();
-      }
-
-      sails.log.debug(`API - SdtdServer:tickets-view - Success, loaded ${tickets.length} tickets`);
-      return exits.success({
-        server: server,
-        tickets: tickets
-      });
-
-    } catch (error) {
-      sails.log.error(`API - SdtdServer:tickets-view - ${error}`);
-      return exits.error(error);
-    }
-
-
-  }
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdTicket_update-ticket-status.js.html b/docs/controllers_SdtdTicket_update-ticket-status.js.html deleted file mode 100644 index 4decc9368..000000000 --- a/docs/controllers_SdtdTicket_update-ticket-status.js.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - Source: controllers/SdtdTicket/update-ticket-status.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-
-  friendlyName: 'Update ticket status',
-
-
-  description: 'Update the status of a SdtdTicket to closed/open',
-
-
-  inputs: {
-    ticketId: {
-      required: true,
-      type: 'string'
-    },
-    status: {
-      required: true,
-      type: 'boolean'
-    }
-  },
-
-
-  exits: {
-
-    notFound: {
-      description: 'Ticket with given ID not found in the system',
-      responseType: 'notFound'
-    },
-    success: {
-    }
-
-  },
-
-  /**
-     * @memberof SdtdTicket
-     * @name update-ticket-status
-     * @method
-     * @description Changes the status of a ticket
-     * @param {string} ticketId
-     */
-
-
-  fn: async function (inputs, exits) {
-
-    try {
-      sails.log.debug(`API - SdtdTicket:update-ticket-status - Updating status for ticket ${inputs.ticketId}`);
-
-      await SdtdTicket.update({id: inputs.ticketId}, {
-        status: inputs.status
-      });
-
-      return exits.success();
-    } catch (error) {
-      sails.log.error(`API - SdtdTicket:update-ticket-status - ${error}`);
-      return exits.error(error);
-    }
-
-
-  }
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdTicket_user-tickets-view.js.html b/docs/controllers_SdtdTicket_user-tickets-view.js.html deleted file mode 100644 index 2ee05dd1d..000000000 --- a/docs/controllers_SdtdTicket_user-tickets-view.js.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - Source: controllers/SdtdTicket/user-tickets-view.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-
-  friendlyName: 'User tickets view',
-
-
-  description: 'Loads relevant ticket data, and serves the view',
-
-
-  inputs: {
-    userId: {
-      type: 'string',
-      required: true
-    }
-  },
-
-
-  exits: {
-
-    notFound: {
-      description: 'Server with given ID not found in the system',
-      responseType: 'notFound'
-    },
-    success: {
-      description: '',
-      responseType: 'view',
-      viewTemplatePath: 'sdtdServer/tickets'
-    }
-
-  },
-
-  /**
-     * @memberof SdtdServer
-     * @name user-tickets-view
-     * @method
-     * @description Loads relevant ticket data, and serves the view
-     * @param {string} userId
-     */
-
-
-  fn: async function (inputs, exits) {
-
-    try {
-      sails.log.debug(`API - SdtdServer:user-tickets-view - Loading tickets view for user ${inputs.userId}`);
-
-      let user = await User.findOne({
-        id: inputs.userId
-      }).populate('players');
-
-      let playerIds = new Array();
-
-      user.players.forEach((player) => {
-        playerIds.push(player.id);
-      });
-
-      tickets = await SdtdTicket.find({
-        player: playerIds
-      });
-
-      sails.log.debug(`API - SdtdServer:user-tickets-view - Success, loaded ${tickets.length} tickets`);
-      return exits.success({
-        user: user,
-        tickets: tickets
-      });
-
-    } catch (error) {
-      sails.log.error(`API - SdtdServer:user-tickets-view - ${error}`);
-      return exits.error(error);
-    }
-
-
-  }
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_SdtdTicket_view-ticket.js.html b/docs/controllers_SdtdTicket_view-ticket.js.html deleted file mode 100644 index 3a36836e6..000000000 --- a/docs/controllers_SdtdTicket_view-ticket.js.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - Source: controllers/SdtdTicket/view-ticket.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-
-  friendlyName: 'View a ticket',
-
-
-  description: 'Loads relevant ticket data, and serves the view',
-
-
-  inputs: {
-    ticketId: {
-      type: 'string',
-      required: true
-    }
-  },
-
-
-  exits: {
-
-    notFound: {
-      description: 'Ticket with given ID not found in the system',
-      responseType: 'notFound'
-    },
-    success: {
-      description: '',
-      responseType: 'view',
-      viewTemplatePath: 'sdtdTicket/ticket'
-    }
-
-  },
-
-  /**
-     * @memberof SdtdTicket
-     * @name view-ticket
-     * @method
-     * @description Loads relevant ticket data, and serves the view
-     * @param {string}ticketId
-     */
-
-
-  fn: async function (inputs, exits) {
-
-    try {
-      sails.log.debug(`API - SdtdTicket:viewTicket - Loading ticket view for ticket ${inputs.ticketId}`);
-
-      let ticket = await SdtdTicket.findOne(inputs.ticketId);
-      let server = await SdtdServer.findOne(ticket.server);
-
-      return exits.success({
-        server: server,
-        ticket: ticket
-      });
-
-    } catch (error) {
-      sails.log.error(`API - SdtdTicket:viewTicket - ${error}`);
-      return exits.error(error);
-    }
-
-
-  }
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_User_dashboard.js.html b/docs/controllers_User_dashboard.js.html deleted file mode 100644 index 09e8abfbf..000000000 --- a/docs/controllers_User_dashboard.js.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - Source: controllers/User/dashboard.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-  friendlyName: 'Get user dashboard',
-
-  description: 'Serves user dashboard view',
-
-  inputs: {
-    userId: {
-      description: 'The ID of the user to look up.',
-      type: 'number',
-      required: true
-    }
-  },
-
-  exits: {
-    success: {
-      responseType: 'view',
-      viewTemplatePath: 'user/userDashboard'
-    },
-    notFound: {
-      description: 'No user with the specified ID was found in the database.',
-      responseType: 'notFound'
-    }
-  },
-
-  /**
-   * @memberof User
-   * @name dashboard
-   * @description Serves user dashboard view
-   * @param {number} userId
-   */
-
-  fn: async function (inputs, exits) {
-
-    try {
-      let user = await User.findOne(inputs.userId).populate('servers');
-      if (_.isUndefined(user)) {
-        return exits.notFound()
-      }
-      let ownedServers = user.servers;
-      let ownedServersWithInfo = new Array();
-
-      for (const server of ownedServers) {
-        let sdtdServerInfo = await sails.helpers.loadSdtdserverInfo(server.id);
-        if (!_.isUndefined(sdtdServerInfo)) {
-          ownedServersWithInfo.push(sdtdServerInfo)
-        }
-      }
-
-      return exits.success({
-        user: user,
-        ownedServers: ownedServersWithInfo
-      })
-    } catch (error) {
-      sails.log.warn(`VIEW - User:dashboard - ${error}`)
-      return exits.error()
-    }
-  }
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_User_find-guilds-managed-by-user.js.html b/docs/controllers_User_find-guilds-managed-by-user.js.html deleted file mode 100644 index b176ab251..000000000 --- a/docs/controllers_User_find-guilds-managed-by-user.js.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - Source: controllers/User/find-guilds-managed-by-user.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-
-    friendlyName: 'Find guilds managed by user',
-  
-  
-    description: '',
-  
-  
-    inputs: {
-      userId: {
-        required: true,
-        example: '1337'
-      }
-  
-    },
-  
-    exits: {
-      badRequest: {
-        responseType: 'badRequest'
-      }
-    },
-  
-    /**
-       * @memberof SdtdServer
-       * @method
-       * @name find-guilds-managed-by-user
-       * @param {number} userId
-       * @returns {array}
-       */
-  
-    fn: async function (inputs, exits) {
-
-      try {
-  
-        let discordClient = sails.hooks.discordbot.getClient();
-        let foundUser = await User.findOne(inputs.userId);
-        
-        if (_.isUndefined(foundUser) || "" == foundUser.discordId) {
-            return exits.badRequest();
-        }
-        
-        let discordUser = discordClient.users.get(foundUser.discordId);
-
-        let foundGuilds = discordClient.guilds.filter(guild => {
-            let member = guild.members.get(discordUser.id);
-            if (_.isUndefined(member)) {
-                return false;
-            }
-            return member.hasPermission("MANAGE_GUILD");
-        })
-
-        let foundGuildsArray = Array.from(foundGuilds.values());
-        
-        exits.success(foundGuildsArray);
-        sails.log.debug(`API - SdtdServer:find-guilds-managed-by-user - Found ${foundGuildsArray.length} guilds for user ${inputs.userId}!`);
-      } catch (error) {
-        sails.log.error(`API - SdtdServer:find-guilds-managed-by-user - ${error}`);
-        return exits.error(error);
-      }
-  
-    }
-  
-  
-  };
-  
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_User_get-owned-servers.js.html b/docs/controllers_User_get-owned-servers.js.html deleted file mode 100644 index aabb99f16..000000000 --- a/docs/controllers_User_get-owned-servers.js.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - Source: controllers/User/get-owned-servers.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-  friendlyName: 'Get owned servers',
-
-  description: 'Get basic server info about servers the given user owns',
-
-  inputs: {
-    userId: {
-      description: 'The ID of the user to look up.',
-      type: 'number',
-      required: true
-    }
-  },
-
-  exits: {
-    success: {},
-    notFound: {
-      description: 'No player with the specified ID was found in the database.',
-      responseType: 'notFound'
-    }
-  },
-
-  /**
-   * @memberof User
-   * @name getOwnedServers
-   * @description gets servers this user is owner of
-   * @param {number} userId
-   */
-
-  fn: async function (inputs, exits) {
-    sails.log.debug(`API - User:getOwnedServers - Getting servers for user ${inputs.userId}`);
-
-    try {
-      let servers = await SdtdServer.find({owner: inputs.userId});
-
-
-      return exits.success(servers);
-
-    } catch (error) {
-      sails.log.error(`API - SdtdServer:sendMessage - ${error}`);
-      return exits.error(error);
-    }
-
-  }
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_User_get-user-info.js.html b/docs/controllers_User_get-user-info.js.html deleted file mode 100644 index e54e7770a..000000000 --- a/docs/controllers_User_get-user-info.js.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - Source: controllers/User/get-user-info.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-  friendlyName: 'Get user info',
-
-  description: 'Get users profile info',
-
-  inputs: {
-    userId: {
-      description: 'The ID of the user to look up.',
-      type: 'number',
-      required: true
-    }
-  },
-
-  exits: {
-    success: {},
-    notFound: {
-      description: 'No user with the specified ID was found in the database.',
-      responseType: 'notFound'
-    }
-  },
-
-  /**
-   * @memberof User
-   * @name get-user-info
-   * @description gets servers this user is owner of
-   * @param {number} userId
-   */
-
-  fn: async function (inputs, exits) {
-    sails.log.debug(`API - User:get-user-info - Getting profile for user ${inputs.userId}`);
-
-    try {
-      let user = await User.findOne(inputs.userId)
-      return exits.success(user);
-
-    } catch (error) {
-      sails.log.error(`API - SdtdServer:get-user-info - ${error}`);
-      return exits.error(error);
-    }
-
-  }
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/controllers_User_profile.js.html b/docs/controllers_User_profile.js.html deleted file mode 100644 index 354afaec2..000000000 --- a/docs/controllers_User_profile.js.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - Source: controllers/User/profile.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
module.exports = {
-
-    friendlyName: 'Get user profile',
-
-    description: 'Serves user profile view',
-
-    inputs: {
-        userId: {
-            description: 'The ID of the user to look up.',
-            type: 'number',
-            required: true
-        }
-    },
-
-    exits: {
-        success: {
-            responseType: 'view',
-            viewTemplatePath: 'user/profile'
-        },
-        notFound: {
-            description: 'No user with the specified ID was found in the database.',
-            responseType: 'notFound'
-        }
-    },
-
-    /**
-     * @memberof User
-     * @name profile
-     * @description Serves user profile view
-     * @param {number} userId
-     */
-
-    fn: async function (inputs, exits) {
-        sails.log.debug(`API - User:profile - Getting profile for user ${inputs.userId}`);
-
-        try {
-            let user = await User.findOne(inputs.userId);
-            let servers = await SdtdServer.find({ owner: inputs.userId });
-            let players = await Player.find({ steamId: user.steamId });
-
-            return exits.success({
-                user: user,
-                servers: servers,
-                players: players
-            })
-
-        } catch (error) {
-            sails.log.error(`API - SdtdServer:profile - ${error}`);
-            return exits.error(error);
-        }
-
-    }
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/fonts/glyphicons-halflings-regular.eot b/docs/fonts/glyphicons-halflings-regular.eot deleted file mode 100644 index b93a4953f..000000000 Binary files a/docs/fonts/glyphicons-halflings-regular.eot and /dev/null differ diff --git a/docs/fonts/glyphicons-halflings-regular.svg b/docs/fonts/glyphicons-halflings-regular.svg deleted file mode 100644 index 94fb5490a..000000000 --- a/docs/fonts/glyphicons-halflings-regular.svg +++ /dev/null @@ -1,288 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/fonts/glyphicons-halflings-regular.ttf b/docs/fonts/glyphicons-halflings-regular.ttf deleted file mode 100644 index 1413fc609..000000000 Binary files a/docs/fonts/glyphicons-halflings-regular.ttf and /dev/null differ diff --git a/docs/fonts/glyphicons-halflings-regular.woff b/docs/fonts/glyphicons-halflings-regular.woff deleted file mode 100644 index 9e612858f..000000000 Binary files a/docs/fonts/glyphicons-halflings-regular.woff and /dev/null differ diff --git a/docs/fonts/glyphicons-halflings-regular.woff2 b/docs/fonts/glyphicons-halflings-regular.woff2 deleted file mode 100644 index 64539b54c..000000000 Binary files a/docs/fonts/glyphicons-halflings-regular.woff2 and /dev/null differ diff --git a/docs/global.html b/docs/global.html deleted file mode 100644 index 14def0065..000000000 --- a/docs/global.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - Global | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -

Global

- -
- -
- - - - - - - - - - - - - - - -

Members

- -
- - -
-

- discordId :string - - - -

- - -
-
- -
- memberof User -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- -
- - - - - - - -
- -
- - - - -
- - - - - - - - - - - \ No newline at end of file diff --git a/docs/helpers_add-7dtd-server.js.html b/docs/helpers_add-7dtd-server.js.html deleted file mode 100644 index d205880e2..000000000 --- a/docs/helpers_add-7dtd-server.js.html +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - - Source: helpers/add-7dtd-server.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
const sevenDays = require('machinepack-7daystodiewebapi');
-
-module.exports = {
-
-  friendlyName: 'Add 7 Days to Die server',
-
-
-  description: 'Add a 7 Days to Die server to the system (while verifying the input).',
-
-
-  inputs: {
-
-    serverName: {
-      type: 'string',
-      required: true
-    },
-    ip: {
-      type: 'string',
-      required: true
-    },
-    telnetPort: {
-      type: 'number',
-      required: true
-    },
-    telnetPassword: {
-      type: 'string',
-      required: true
-    },
-    webPort: {
-      type: 'number',
-      required: true
-    },
-    owner: {
-      type: 'string',
-      required: true
-    },
-    discordGuildId: {
-      type: 'string',
-      required: false
-    }
-
-  },
-
-  exits: {
-    badTelnet: {
-      description: 'Could not connect to telnet'
-    },
-    badWebPort: {
-      description: 'WebPort given was not valid'
-    }
-  },
-
-  /**
-   * @description Adds a 7 Days to die server to the system while verifying input
-   * @name Add7dtdServer
-   * @param {string} ip
-   * @param {number} telnetPort
-   * @param {string} telnetPassword
-   * @param {number} webPort
-   * @param {number} owner The ID of the owner
-   * @param {number} discordGuildId
-   * @memberof module:Helpers
-   * @method
-   */
-
-  fn: async function (inputs, exits) {
-
-    sails.log.debug(`HELPER - add7DtdServer - adding a server with ip: ${inputs.ip} webPort: ${inputs.webPort} owner: ${inputs.owner}`);
-
-    try {
-      let authInfo = await sails.helpers.createWebToken.with({
-        ip: inputs.ip,
-        port: inputs.telnetPort,
-        password: inputs.telnetPassword
-      }).tolerate('badTelnet',() => {
-        return undefined
-      })
-
-      if (_.isUndefined(authInfo)) {
-        return exits.badTelnet({error: 'badTelnet'});
-      }
-
-      await sevenDays.getStats({
-        ip: inputs.ip,
-        port: inputs.webPort,
-        authName: authInfo.authName,
-        authToken: authInfo.authToken
-      }).exec({
-        success: async response => {
-          if (!response.gametime) {
-            return exits.badWebPort({error: 'badWebPort'});
-          } else {
-            let server = await updateOrCreateServer(authInfo);
-            await SdtdConfig.create({
-              server: server.id
-            });
-            return exits.success(server);
-          }
-        },
-        error: err => {
-          return exits.error(err)
-        }
-      })
-
-
-
-    } catch (error) {
-      sails.log.error(`HELPER - add7DtdServer - ${error}`);
-      if (error.message == 'badWebport') {
-        return exits.badWebPort({error: 'badWebPort'});
-      }
-      return exits.error(error);
-    }
-
-
-    async function updateOrCreateServer(authInfo) {
-      return new Promise(async (resolve, reject) => {
-        let newServer = await SdtdServer.findOrCreate({
-          ip: inputs.ip,
-          webPort: inputs.webPort,
-          authName: authInfo.authName,
-          authToken: authInfo.authToken
-        }, {
-            name: inputs.serverName,
-            ip: inputs.ip,
-            webPort: inputs.webPort,
-            telnetPort: inputs.telnetPort,
-            authName: authInfo.authName,
-            authToken: authInfo.authToken,
-            owner: inputs.owner
-          });
-        sails.log.debug(`HELPER - add7DtdServer - success`);
-        sails.hooks.sdtdlogs.start(newServer.id);
-        resolve(newServer);
-      });
-
-
-    }
-  }
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/helpers_create-web-token.js.html b/docs/helpers_create-web-token.js.html deleted file mode 100644 index e80ac475e..000000000 --- a/docs/helpers_create-web-token.js.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - Source: helpers/create-web-token.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
const Telnet = require('telnet-client');
-const randToken = require('rand-token');
-
-/**
- * @module Helpers
- * @description Helper functions
- */
-
-module.exports = {
-
-
-  friendlyName: 'Create web token',
-
-
-  description: 'Connects to telnet, adds webtokens to the server and returns these',
-
-
-  inputs: {
-
-    ip: {
-      type: 'string',
-      description: 'IP address of server to connect to',
-      required: true
-    },
-
-    port: {
-      type: 'number',
-      description: 'Telnet port',
-      required: true
-    },
-
-    password: {
-      type: 'string',
-      description: 'Telnet password',
-      required: true
-    }
-
-  },
-
-
-  exits: {
-    success: {
-      outputFriendlyName: 'Connected and tokens added'
-    },
-    badTelnet: {
-      description: 'Could not connect to telnet'
-    }
-  },
-
-  /**
-     * @description Executes webtokens add command on a server
-     * @name createWebTokens
-     * @memberof module:Helpers
-     * @returns {json} Authname and token
-     * @method
-     * @param {string} ip
-     * @param {number} port Telnet port
-     * @param {string} password Telnet password
-     */
-
-  fn: async function(inputs, exits) {
-    sails.log.debug(`HELPER - createWebTokens - creating tokens for server with ip ${inputs.ip}`);
-    const authName = 'CSMM';
-    const authToken = randToken.generate(32);
-
-    let connection = new Telnet();
-    let params = {
-      host: inputs.ip,
-      port: inputs.port,
-      timeout: 3000,
-      password: inputs.password,
-      failedLoginMatch: 'Password incorrect',
-      passwordPrompt: /Please enter password:/i,
-      shellPrompt: /\r\n$/,
-    };
-    connection.connect(params);
-
-    connection.on('ready', function(prompt) {
-      connection.exec(`webtokens add ${authName} ${authToken} 0`, async function(err, response) {
-        if (err) { return exits.error(err); }
-        if (_.isUndefined(response) || response.length <= 0) {
-          await connection.end();
-          return exits.badTelnet(new Error('Did not receive a response from the server'));
-        } else {
-          sails.log.debug('HELPER - createWebTokens - successfully created tokens');
-          await connection.end();
-          return exits.success({ authName: authName, authToken: authToken });
-        }
-
-      });
-    });
-  }
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/helpers_load-player-data.js.html b/docs/helpers_load-player-data.js.html deleted file mode 100644 index cd7c0b7c4..000000000 --- a/docs/helpers_load-player-data.js.html +++ /dev/null @@ -1,339 +0,0 @@ - - - - - - - Source: helpers/load-player-data.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
var sevenDays = require('machinepack-7daystodiewebapi');
-
-module.exports = {
-  friendlyName: 'Load player data',
-  description: 'Load player information from a 7 Days to die server',
-  inputs: {
-    serverId: {
-      type: 'number',
-      required: true
-    },
-    steamId: {
-      type: 'string'
-    }
-  },
-  exits: {
-    error: {
-      friendlyName: 'error'
-    },
-    playerNotFound: {
-      friendlyName: 'Player not found',
-      description: 'ID was given, but no player found on the server'
-    }
-  },
-
-  /**
-   * @description Loads player information and saves it to database
-   * @name loadPlayerData
-   * @param {number} serverId
-   * @memberof module:Helpers
-   * @method
-   */
-
-  fn: async function (inputs, exits) {
-    sails.log.verbose(`HELPER - loadPlayerData - Loading player data for server ${inputs.serverId} -- steamId: ${inputs.steamId}`);
-
-    try {
-      let server = await SdtdServer.findOne(inputs.serverId);
-      let playerList = await getPlayerList(server);
-      if (playerList.players) {
-        let playerListWithInventories = await loadPlayersInventory(playerList.players, server);
-        let newPlayerList = await playerListWithInventories.map(await updatePlayerInfo);
-
-        if (inputs.steamId) {
-          await loadPlayerProfilePicture(inputs.steamId);
-        }
-        let jsonToSend = await createJSON(newPlayerList);
-        exits.success(jsonToSend);
-      } else {
-        let jsonToSend = await createJSON(playerList);
-        exits.success(jsonToSend);
-      }
-
-
-    } catch (error) {
-      sails.log.error(`HELPER - loadPlayerData - ${error}`);
-      exits.error(error);
-    }
-
-    async function loadPlayersInventory(playerList, server) {
-      return new Promise((resolve, reject) => {
-        let listWithInventories = playerList.map(function (player) {
-          return new Promise((resolve, reject) => {
-            sevenDays.getPlayerInventory({
-              ip: server.ip,
-              port: server.webPort,
-              authName: server.authName,
-              authToken: server.authToken,
-              steamId: player.steamid
-            }).exec({
-              error: function (err) {
-                sails.log.warn(err);
-                resolve(player);
-              },
-              success: function (data) {
-                player.inventory = new Object();
-                player.inventory.bag = data.bag;
-                player.inventory.belt = data.belt;
-                player.inventory.equipment = data.equipment;
-                resolve(player);
-              }
-            });
-          });
-        });
-        resolve(listWithInventories);
-      });
-    }
-
-    async function updatePlayerInfo(newPlayer) {
-      return new Promise(async function (resolve, reject) {
-        try {
-          newPlayer.then(async function (newPlayer) {
-            if (newPlayer.name === '') {
-              newPlayer.name = 'Unknown name';
-            }
-            foundOrCreatedPlayer = await Player.findOrCreate({
-              steamId: newPlayer.steamid,
-              server: inputs.serverId,
-              entityId: newPlayer.entityid
-            }, {
-              steamId: newPlayer.steamid,
-              server: inputs.serverId,
-              entityId: newPlayer.entityid,
-              name: newPlayer.name,
-              ip: newPlayer.ip,
-            });
-            if (newPlayer.online) {
-              playerToSend = await Player.update({
-                steamId: foundOrCreatedPlayer.steamId,
-                server: inputs.serverId,
-                entityId: foundOrCreatedPlayer.entityId
-              }).set({
-                ip: newPlayer.ip,
-                positionX: newPlayer.position.x,
-                positionY: newPlayer.position.y,
-                positionZ: newPlayer.position.z,
-                playtime: newPlayer.totalplaytime,
-                inventory: newPlayer.inventory,
-                banned: newPlayer.banned,
-              }).fetch();
-            } else {
-              playerToSend = await Player.update({
-                steamId: foundOrCreatedPlayer.steamId,
-                server: inputs.serverId,
-                entityId: foundOrCreatedPlayer.entityId
-              }).set({
-                ip: newPlayer.ip,
-                positionX: newPlayer.position.x,
-                positionY: newPlayer.position.y,
-                positionZ: newPlayer.position.z,
-                playtime: newPlayer.totalplaytime,
-                banned: newPlayer.banned,
-              }).fetch();
-            }
-
-            playerToSend = playerToSend[0];
-            playerToSend.online = newPlayer.online;
-            resolve(playerToSend);
-          });
-        } catch (error) {
-          sails.log.warn(error);
-          resolve(foundOrCreatedPlayer)
-        }
-
-      });
-    }
-
-    async function getPlayerList(server) {
-      return new Promise((resolve, reject) => {
-        sevenDays.getPlayerList({
-          ip: server.ip,
-          port: server.webPort,
-          authName: server.authName,
-          authToken: server.authToken
-        }).exec({
-          error: function (err) {
-            sails.log.warn(err);
-            resolve({
-              players: []
-            });
-          },
-          success: function (playerList) {
-            // If a steam ID is provided, we filter the list to only 1 player
-            if (inputs.steamId) {
-              let playerToFind;
-              playerList.players.forEach(player => {
-                if (player.steamid === inputs.steamId) {
-                  playerToFind = player;
-                }
-              });
-              if (_.isUndefined(playerToFind)) {
-                return exits.playerNotFound();
-              }
-              playerList.players = new Array(playerToFind);
-            }
-            resolve(playerList);
-          }
-        });
-      });
-    }
-
-
-    async function createJSON(playerList) {
-      return new Promise(function (resolve) {
-        try {
-          let toSend = {};
-          Promise.all(playerList).then(resolvedPlayers => {
-            toSend.totalPlayers = playerList.length;
-            toSend.players = new Array();
-            resolvedPlayers.forEach(function (player) {
-              let playerData = new Object();
-              playerData.id = player.id;
-              playerData.online = player.online;
-              playerData.steamId = player.steamId;
-              playerData.entityId = player.entityId;
-              playerData.location = new Object();
-              playerData.location.x = player.positionX;
-              playerData.location.y = player.positionY;
-              playerData.location.z = player.positionZ;
-              playerData.inventory = player.inventory;
-              playerData.totalPlaytime = player.playtime;
-              playerData.banned = player.banned;
-              playerData.server = player.server;
-              playerData.name = player.name;
-              toSend.players.push(playerData);
-            });
-            resolve(toSend);
-          });
-        } catch (error) {
-          throw error;
-        }
-      });
-    }
-
-    async function loadPlayerProfilePicture(steamId) {
-      let request = require('request-promise-native');
-      return new Promise((resolve, reject) => {
-        request({
-          uri: 'http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002',
-          qs: {
-            steamids: steamId,
-            key: process.env.API_KEY_STEAM,
-          },
-          json: true
-        }).then(async (response) => {
-          try {
-            if (!_.isUndefined(response.response) || !_.isUndefined(response.response.players)) {
-              let avatarUrl = response.response.players[0].avatarfull;
-              let updatedPlayer = await Player.update({
-                steamId: steamId
-              }, {
-                avatarUrl: avatarUrl
-              });
-              resolve(avatarUrl);
-            } else {
-              let avatarUrl = 'https://i.imgur.com/NMvWd07.png';
-              let updatedPlayer = await Player.update({
-                steamId: steamId
-              }, {
-                avatarUrl: avatarUrl
-              });
-              resolve(avatarUrl);
-            }
-          } catch (error) {
-            sails.log.error(`HELPER - loadPlayerData:loadPlayerProfilePicture - ${error}`);
-          }
-        }).catch(async (error) => {
-          let avatarUrl = 'https://i.imgur.com/NMvWd07.png';
-          let updatedPlayer = await Player.update({
-            steamId: steamId
-          }, {
-            avatarUrl: avatarUrl
-          });
-          resolve(avatarUrl);
-        });
-      });
-    }
-
-
-  },
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/helpers_load-sdtdServer-info.js.html b/docs/helpers_load-sdtdServer-info.js.html deleted file mode 100644 index 64968ddff..000000000 --- a/docs/helpers_load-sdtdServer-info.js.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - Source: helpers/load-sdtdServer-info.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
var sevenDays = require('machinepack-7daystodiewebapi');
-
-module.exports = {
-
-
-  friendlyName: 'Load sdtdServer info',
-
-
-  description: 'Performs several API requests to a sdtd server',
-
-
-  inputs: {
-    serverId: {
-      friendlyName: 'Server ID',
-      required: true,
-      example: 1
-    }
-  },
-
-
-  exits: {
-    success: {
-      outputFriendlyName: 'Success'
-    },
-    connectionError: {
-      description: 'Could not connect to the 7 days to die server'
-    },
-    databaseError: {
-      description: 'Error reading or writing data to DB'
-    }
-  },
-
-  /**
-   * @description Loads server information
-   * @name loadSdtdServerInfo
-   * @param {number} serverId
-   * @memberof module:Helpers
-   * @method
-   */
-
-
-  fn: async function (inputs, exits) {
-
-    try {
-      sails.log.debug(`HELPER - loadSdtdserverInfo - Loading server info for server ${inputs.serverId}`);
-      // Load serverinfo from DB first
-      let server = await SdtdServer.findOne(inputs.serverId);
-      server.stats = await loadStats(server);
-      server.serverInfo = await loadServerInfo(server);
-      exits.success(server);
-    } catch (error) {
-      sails.log.warn(`HELPER - load-sdtdServer-info - Failed to load info ${error}`)
-      return exits.error(error);
-    }
-
-
-    function loadStats(server) {
-      return new Promise((resolve, reject) => {
-        sevenDays.getStats({
-          ip: server.ip,
-          port: server.webPort,
-          authName: server.authName,
-          authToken: server.authToken
-        }).exec({
-          error: error => {
-            sails.log.warn(error);
-            resolve(undefined);
-          },
-          success: data => {
-            resolve(data);
-          }
-        });
-      });
-    }
-
-    function loadServerInfo(server) {
-      return new Promise((resolve, reject) => {
-        sevenDays.getServerInfo({
-          ip: server.ip,
-          port: server.webPort,
-          authName: server.authName,
-          authToken: server.authToken
-        }).exec({
-          error: error => {
-            sails.log.warn(error);
-            resolve(undefined);
-          },
-          success: data => {
-            for (const dataPoint in data) {
-              if (data.hasOwnProperty(dataPoint)) {
-                data[dataPoint] = data[dataPoint].value;
-              }
-            }
-            resolve(data);
-          }
-        });
-      });
-    }
-
-
-  }
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/helpers_sdtd_check-if-available.js.html b/docs/helpers_sdtd_check-if-available.js.html deleted file mode 100644 index 7fda409d4..000000000 --- a/docs/helpers_sdtd_check-if-available.js.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - Source: helpers/sdtd/check-if-available.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
var sevenDays = require('machinepack-7daystodiewebapi');
-
-module.exports = {
-
-
-  friendlyName: 'Check if available',
-
-
-  description: 'Checks if a server can be reached via the web API',
-
-
-  inputs: {
-
-    serverId: {
-      type: 'number',
-      description: 'Id of the server',
-      required: true
-    }
-
-  },
-
-
-  exits: {
-    success: {
-      outputFriendlyName: 'Success',
-      outputType: 'boolean'
-    },
-    notAvailable: {
-      outputFriendlyName: 'Not available',
-      description: 'The server could not be reached'
-    }
-  },
-
-  /**
-   * @description Checks if a server can be reached via the web API
-   * @name checkIfAvailable
-   * @memberof module:Helpers
-   * @returns {boolean}
-   * @method
-   * @param {number} serverId
-   */
-
-  fn: async function (inputs, exits) {
-    try {
-      let sdtdServer = await SdtdServer.findOne({
-        id: inputs.serverId
-      });
-      let statsResponse = await checkStats(sdtdServer);
-      let commandResponse = await checkCommand(sdtdServer);
-
-      if (statsResponse && commandResponse) {
-        return exits.success(true);
-      } else {
-        sails.log.debug(`HELPER - checkIfAvailable - Server ${inputs.serverId} is not available`);
-        return exits.notAvailable();
-      }
-
-    } catch (error) {
-      return exits.error(error);
-    }
-
-
-    async function checkStats(sdtdServer) {
-      return new Promise(resolve => {
-        let statsResponse = sevenDays.getStats({
-          ip: sdtdServer.ip,
-          port: sdtdServer.webPort,
-          authName: sdtdServer.authName,
-          authToken: sdtdServer.authToken
-        }).exec({
-          success: (response) => {
-            if (response.gametime && response.players) {
-              resolve(true);
-            } else {
-              resolve(false)
-            }
-          },
-          error: (error) => {
-            resolve(false);
-          }
-        });
-      });
-    }
-
-    async function checkCommand(sdtdServer) {
-      return new Promise(resolve => {
-        let statsResponse = sevenDays.executeCommand({
-          ip: sdtdServer.ip,
-          port: sdtdServer.webPort,
-          authName: sdtdServer.authName,
-          authToken: sdtdServer.authToken,
-          command: 'mem'
-        }).exec({
-          success: (response) => {
-            resolve(true);
-          },
-          error: (error) => {
-            resolve(false);
-          }
-        });
-      });
-    }
-
-
-  }
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/helpers_sdtd_create-ticket.js.html b/docs/helpers_sdtd_create-ticket.js.html deleted file mode 100644 index 7109bb198..000000000 --- a/docs/helpers_sdtd_create-ticket.js.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - Source: helpers/sdtd/create-ticket.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
var sevenDays = require('machinepack-7daystodiewebapi');
-
-module.exports = {
-
-
-  friendlyName: 'Create support ticket',
-
-
-  description: 'Creates a support ticket, with relevant data',
-
-
-  inputs: {
-
-    serverId: {
-      type: 'number',
-      description: 'Id of the server',
-      required: true
-    },
-
-    playerId: {
-      type: 'number',
-      description: 'Id of the player creating the ticket',
-      required: true
-    },
-
-    title: {
-      type: 'string',
-      description: 'Title of the ticket',
-      required: true
-    },
-
-    description: {
-      type: 'string',
-      description: 'Description of the ticket'
-    }
-
-  },
-
-
-  exits: {
-    success: {
-      outputFriendlyName: 'Success',
-      outputType: 'json'
-    },
-
-    notAvailable: {
-      outputFriendlyName: 'Not available',
-      description: 'The server could not be reached'
-    }
-  },
-
-  /**
-   * @description Creates a SdtdTicket
-   * @name createTicket
-   * @memberof module:Helpers
-   * @returns {json} SdtdTicket
-   * @method
-   * @param {number} serverId
-   * @param {number} playerId
-   * @param {string} title
-   * @param {string} description
-   */
-
-  fn: async function (inputs, exits) {
-    sails.log.debug(`HELPER - createTicket - Creating a ticket for server ${inputs.serverId} by player ${inputs.playerId}`);
-
-    try {
-      let sdtdServer = await SdtdServer.findOne({
-        id: inputs.serverId
-      });
-      let player = await Player.findOne(inputs.playerId);
-      let playerInfo = await sails.helpers.loadPlayerData(inputs.serverId, player.steamId);
-
-      if (_.isUndefined(sdtdServer) || _.isUndefined(player)) {
-        return exits.error(new Error(`HELPER - createTicket - Invalid server or player ID`));
-      }
-
-      let ticket = await SdtdTicket.create({
-        description: inputs.description,
-        title: inputs.title,
-        playerInfo: playerInfo.players[0],
-        server: inputs.serverId,
-        player: inputs.playerId
-      }).fetch();
-
-      let notificationMsg = `New Ticket by ${player.name}\n${ticket.title}\n${ticket.description}`;
-
-      sails.hooks.discordbot.sendNotification(inputs.serverId, notificationMsg);
-
-      return exits.success(ticket);
-
-    } catch (error) {
-      sails.log.error(`HELPER - createTicket - ${error}`);
-      return exits.error(error);
-    }
-
-
-
-
-
-  }
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/hooks_countryBan_index.js.html b/docs/hooks_countryBan_index.js.html deleted file mode 100644 index 1a4bfcc32..000000000 --- a/docs/hooks_countryBan_index.js.html +++ /dev/null @@ -1,556 +0,0 @@ - - - - - - - Source: hooks/countryBan/index.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
var sevenDays = require('machinepack-7daystodiewebapi');
-
-/**
- * @module 7dtdCountryBan
- * @description Restrict certain countries access to a server
- */
-module.exports = function sdtdCountryBan(sails) {
-
-  let countryBanInfoMap = new Map();
-
-  return {
-
-    config: {
-      enabled: true,
-      bannedCountries: [],
-      kickMessage: 'Your country has been blocked on this server.',
-      allowNull: true
-    },
-
-    countryList: [
-      ['A1', 'Anonymous Proxy'],
-      ['A2', 'Satellite Provider'],
-      ['O1', 'Other Country'],
-      ['AD', 'Andorra'],
-      ['AE', 'United Arab Emirates'],
-      ['AF', 'Afghanistan'],
-      ['AG', 'Antigua and Barbuda'],
-      ['AI', 'Anguilla'],
-      ['AL', 'Albania'],
-      ['AM', 'Armenia'],
-      ['AO', 'Angola'],
-      ['AP', 'Asia/Pacific Region'],
-      ['AQ', 'Antarctica'],
-      ['AR', 'Argentina'],
-      ['AS', 'American Samoa'],
-      ['AT', 'Austria'],
-      ['AU', 'Australia'],
-      ['AW', 'Aruba'],
-      ['AX', 'Aland Islands'],
-      ['AZ', 'Azerbaijan'],
-      ['BA', 'Bosnia and Herzegovina'],
-      ['BB', 'Barbados'],
-      ['BD', 'Bangladesh'],
-      ['BE', 'Belgium'],
-      ['BF', 'Burkina Faso'],
-      ['BG', 'Bulgaria'],
-      ['BH', 'Bahrain'],
-      ['BI', 'Burundi'],
-      ['BJ', 'Benin'],
-      ['BL', 'Saint Bartelemey'],
-      ['BM', 'Bermuda'],
-      ['BN', 'Brunei Darussalam'],
-      ['BO', 'Bolivia'],
-      ['BQ', 'Bonaire, Saint Eustatius and Saba'],
-      ['BR', 'Brazil'],
-      ['BS', 'Bahamas'],
-      ['BT', 'Bhutan'],
-      ['BV', 'Bouvet Island'],
-      ['BW', 'Botswana'],
-      ['BY', 'Belarus'],
-      ['BZ', 'Belize'],
-      ['CA', 'Canada'],
-      ['CC', 'Cocos (Keeling) Islands'],
-      ['CD', 'Congo, The Democratic Republic of the'],
-      ['CF', 'Central African Republic'],
-      ['CG', 'Congo'],
-      ['CH', 'Switzerland'],
-      ['CI', 'Cote d\'Ivoire'],
-      ['CK', 'Cook Islands'],
-      ['CL', 'Chile'],
-      ['CM', 'Cameroon'],
-      ['CN', 'China'],
-      ['CO', 'Colombia'],
-      ['CR', 'Costa Rica'],
-      ['CU', 'Cuba'],
-      ['CV', 'Cape Verde'],
-      ['CW', 'Curacao'],
-      ['CX', 'Christmas Island'],
-      ['CY', 'Cyprus'],
-      ['CZ', 'Czech Republic'],
-      ['DE', 'Germany'],
-      ['DJ', 'Djibouti'],
-      ['DK', 'Denmark'],
-      ['DM', 'Dominica'],
-      ['DO', 'Dominican Republic'],
-      ['DZ', 'Algeria'],
-      ['EC', 'Ecuador'],
-      ['EE', 'Estonia'],
-      ['EG', 'Egypt'],
-      ['EH', 'Western Sahara'],
-      ['ER', 'Eritrea'],
-      ['ES', 'Spain'],
-      ['ET', 'Ethiopia'],
-      ['EU', 'Europe'],
-      ['FI', 'Finland'],
-      ['FJ', 'Fiji'],
-      ['FK', 'Falkland Islands (Malvinas)'],
-      ['FM', 'Micronesia, Federated States of'],
-      ['FO', 'Faroe Islands'],
-      ['FR', 'France'],
-      ['GA', 'Gabon'],
-      ['GB', 'United Kingdom'],
-      ['GD', 'Grenada'],
-      ['GE', 'Georgia'],
-      ['GF', 'French Guiana'],
-      ['GG', 'Guernsey'],
-      ['GH', 'Ghana'],
-      ['GI', 'Gibraltar'],
-      ['GL', 'Greenland'],
-      ['GM', 'Gambia'],
-      ['GN', 'Guinea'],
-      ['GP', 'Guadeloupe'],
-      ['GQ', 'Equatorial Guinea'],
-      ['GR', 'Greece'],
-      ['GS', 'South Georgia and the South Sandwich Islands'],
-      ['GT', 'Guatemala'],
-      ['GU', 'Guam'],
-      ['GW', 'Guinea-Bissau'],
-      ['GY', 'Guyana'],
-      ['HK', 'Hong Kong'],
-      ['HM', 'Heard Island and McDonald Islands'],
-      ['HN', 'Honduras'],
-      ['HR', 'Croatia'],
-      ['HT', 'Haiti'],
-      ['HU', 'Hungary'],
-      ['ID', 'Indonesia'],
-      ['IE', 'Ireland'],
-      ['IL', 'Israel'],
-      ['IM', 'Isle of Man'],
-      ['IN', 'India'],
-      ['IO', 'British Indian Ocean Territory'],
-      ['IQ', 'Iraq'],
-      ['IR', 'Iran, Islamic Republic of'],
-      ['IS', 'Iceland'],
-      ['IT', 'Italy'],
-      ['JE', 'Jersey'],
-      ['JM', 'Jamaica'],
-      ['JO', 'Jordan'],
-      ['JP', 'Japan'],
-      ['KE', 'Kenya'],
-      ['KG', 'Kyrgyzstan'],
-      ['KH', 'Cambodia'],
-      ['KI', 'Kiribati'],
-      ['KM', 'Comoros'],
-      ['KN', 'Saint Kitts and Nevis'],
-      ['KP', 'Korea, Democratic People\'s Republic of'],
-      ['KR', 'Korea, Republic of'],
-      ['KW', 'Kuwait'],
-      ['KY', 'Cayman Islands'],
-      ['KZ', 'Kazakhstan'],
-      ['LA', 'Lao People\'s Democratic Republic'],
-      ['LB', 'Lebanon'],
-      ['LC', 'Saint Lucia'],
-      ['LI', 'Liechtenstein'],
-      ['LK', 'Sri Lanka'],
-      ['LR', 'Liberia'],
-      ['LS', 'Lesotho'],
-      ['LT', 'Lithuania'],
-      ['LU', 'Luxembourg'],
-      ['LV', 'Latvia'],
-      ['LY', 'Libyan Arab Jamahiriya'],
-      ['MA', 'Morocco'],
-      ['MC', 'Monaco'],
-      ['MD', 'Moldova, Republic of'],
-      ['ME', 'Montenegro'],
-      ['MF', 'Saint Martin'],
-      ['MG', 'Madagascar'],
-      ['MH', 'Marshall Islands'],
-      ['MK', 'Macedonia'],
-      ['ML', 'Mali'],
-      ['MM', 'Myanmar'],
-      ['MN', 'Mongolia'],
-      ['MO', 'Macao'],
-      ['MP', 'Northern Mariana Islands'],
-      ['MQ', 'Martinique'],
-      ['MR', 'Mauritania'],
-      ['MS', 'Montserrat'],
-      ['MT', 'Malta'],
-      ['MU', 'Mauritius'],
-      ['MV', 'Maldives'],
-      ['MW', 'Malawi'],
-      ['MX', 'Mexico'],
-      ['MY', 'Malaysia'],
-      ['MZ', 'Mozambique'],
-      ['NA', 'Namibia'],
-      ['NC', 'New Caledonia'],
-      ['NE', 'Niger'],
-      ['NF', 'Norfolk Island'],
-      ['NG', 'Nigeria'],
-      ['NI', 'Nicaragua'],
-      ['NL', 'Netherlands'],
-      ['NO', 'Norway'],
-      ['NP', 'Nepal'],
-      ['NR', 'Nauru'],
-      ['NU', 'Niue'],
-      ['NZ', 'New Zealand'],
-      ['OM', 'Oman'],
-      ['PA', 'Panama'],
-      ['PE', 'Peru'],
-      ['PF', 'French Polynesia'],
-      ['PG', 'Papua New Guinea'],
-      ['PH', 'Philippines'],
-      ['PK', 'Pakistan'],
-      ['PL', 'Poland'],
-      ['PM', 'Saint Pierre and Miquelon'],
-      ['PN', 'Pitcairn'],
-      ['PR', 'Puerto Rico'],
-      ['PS', 'Palestinian Territory'],
-      ['PT', 'Portugal'],
-      ['PW', 'Palau'],
-      ['PY', 'Paraguay'],
-      ['QA', 'Qatar'],
-      ['RE', 'Reunion'],
-      ['RO', 'Romania'],
-      ['RS', 'Serbia'],
-      ['RU', 'Russian Federation'],
-      ['RW', 'Rwanda'],
-      ['SA', 'Saudi Arabia'],
-      ['SB', 'Solomon Islands'],
-      ['SC', 'Seychelles'],
-      ['SD', 'Sudan'],
-      ['SE', 'Sweden'],
-      ['SG', 'Singapore'],
-      ['SH', 'Saint Helena'],
-      ['SI', 'Slovenia'],
-      ['SJ', 'Svalbard and Jan Mayen'],
-      ['SK', 'Slovakia'],
-      ['SL', 'Sierra Leone'],
-      ['SM', 'San Marino'],
-      ['SN', 'Senegal'],
-      ['SO', 'Somalia'],
-      ['SR', 'Suriname'],
-      ['SS', 'South Sudan'],
-      ['ST', 'Sao Tome and Principe'],
-      ['SV', 'El Salvador'],
-      ['SX', 'Sint Maarten'],
-      ['SY', 'Syrian Arab Republic'],
-      ['SZ', 'Swaziland'],
-      ['TC', 'Turks and Caicos Islands'],
-      ['TD', 'Chad'],
-      ['TF', 'French Southern Territories'],
-      ['TG', 'Togo'],
-      ['TH', 'Thailand'],
-      ['TJ', 'Tajikistan'],
-      ['TK', 'Tokelau'],
-      ['TL', 'Timor-Leste'],
-      ['TM', 'Turkmenistan'],
-      ['TN', 'Tunisia'],
-      ['TO', 'Tonga'],
-      ['TR', 'Turkey'],
-      ['TT', 'Trinidad and Tobago'],
-      ['TV', 'Tuvalu'],
-      ['TW', 'Taiwan'],
-      ['TZ', 'Tanzania, United Republic of'],
-      ['UA', 'Ukraine'],
-      ['UG', 'Uganda'],
-      ['UM', 'United States Minor Outlying Islands'],
-      ['US', 'United States'],
-      ['UY', 'Uruguay'],
-      ['UZ', 'Uzbekistan'],
-      ['VA', 'Holy See (Vatican City State)'],
-      ['VC', 'Saint Vincent and the Grenadines'],
-      ['VE', 'Venezuela'],
-      ['VG', 'Virgin Islands, British'],
-      ['VI', 'Virgin Islands, U.S.'],
-      ['VN', 'Vietnam'],
-      ['VU', 'Vanuatu'],
-      ['WF', 'Wallis and Futuna'],
-      ['WS', 'Samoa'],
-      ['YE', 'Yemen'],
-      ['YT', 'Mayotte'],
-      ['ZA', 'South Africa'],
-      ['ZM', 'Zambia'],
-      ['ZW', 'Zimbabwe']
-    ],
-
-    initialize: function (cb) {
-      sails.on('hook:orm:loaded', function () {
-        sails.on('hook:sdtdlogs:loaded', async function () {
-          try {
-            let configs = await SdtdConfig.find();
-
-            for (const config of configs) {
-              if (config.countryBanConfig.enabled) {
-                await startCountryBan(config.server);
-              }
-            }
-
-            sails.log.info(`HOOK: countryBan - Initialized ${countryBanInfoMap.size} country ban instances`);
-            return cb();
-          } catch (error) {
-            sails.log.error(`HOOK:countryBan ${error}`);
-          }
-
-
-        });
-      });
-    },
-
-    /**
-     * @name start
-     * @memberof module:7dtdCountryBan
-     * @description Starts countryBan for a server
-     * @param {number} serverId - Id of the server
-     * @method
-     */
-
-    start: async function start(serverId) {
-      sails.log.debug(`HOOK:countryBan Starting countryBan for server ${serverId}`);
-      startCountryBan(serverId);
-    },
-
-    /**
-     * @name stop
-     * @memberof module:7dtdCountryBan
-     * @description Stops countryBan for a server
-     * @param {number} serverId - Id of the server
-     * @method
-     */
-
-    stop: async function (serverId) {
-      sails.log.debug(`HOOK:countryBan Stopping countryBan for server ${serverId} `);
-
-      let loggingObj = sails.hooks.sdtdlogs.getLoggingObject(serverId);
-
-      let currentConfig = countryBanInfoMap.get(String(serverId));
-
-      if (_.isUndefined(currentConfig)) {
-        return;
-      }
-
-      currentConfig.enabled = false;
-      await SdtdConfig.update({
-        server: serverId
-      }, {
-        countryBanConfig: currentConfig
-      });
-
-      if (_.isUndefined(loggingObj)) {
-        throw new Error('Could not find logging object for server');
-      }
-      loggingObj.removeListener('playerConnected', handleCountryBan);
-
-      countryBanInfoMap.delete(String(serverId));
-    },
-
-    /**
-     * @name getStatus
-     * @memberof module:7dtdCountryBan
-     * @description Gets the country ban status/config for a server
-     * @param {number} serverId - Id of the server
-     * @method
-     */
-
-    getStatus: function (serverId) {
-      sails.log.debug(`HOOK:countryBan Getting countryBan status for server ${serverId} `);
-      return countryBanInfoMap.get(String(serverId));
-    },
-
-    getAmount: function() {
-      return countryBanInfoMap.size;
-    },
-
-    /**
-     * @name reload
-     * @memberof module:7dtdCountryBan
-     * @description Changes banned countries config for a server
-     * @param {number} serverId - Id of the server
-     * @method
-     */
-
-    reload: async function (serverId, newConfig) {
-
-      try {
-        sails.log.debug(`HOOK:countryBan Reloading country ban for server ${serverId} `);
-
-        let config = await SdtdConfig.findOne({
-          server: serverId
-        });
-
-        if (_.isUndefined(config)) {
-          throw new Error('Could not find server config with specified ID');
-        }
-
-        if (_.isUndefined(newConfig)) {
-          newConfig = config.countryBanConfig;
-        }
-
-
-        let updatedServer = await SdtdConfig.update({
-          server: serverId
-        }, {
-          countryBanConfig: newConfig
-        }).fetch();
-        countryBanInfoMap.set(String(serverId), newConfig);
-
-        await this.stop(serverId);
-        return await this.start(serverId);
-      } catch (error) {
-        sails.log.error(`HOOK:countryBan ${error}`);
-      }
-
-    }
-  };
-
-  async function handleCountryBan(connectedMessage) {
-    let country = connectedMessage.country;
-    let steamId = connectedMessage.steamID;
-    let serverIp = this.serverIp;
-    let serverWebPort = this.port;
-    try {
-      let server = await SdtdServer.find({
-        ip: serverIp,
-        webPort: serverWebPort
-      }).limit(1);
-      server = server[0]
-
-      let config = await SdtdConfig.find({
-        server: server.id
-      });
-      sails.log.debug(`HOOK:countryBan - Player from ${country} connected to server ${server.id}, checking if needs to be kicked`);
-
-      let countryBanConfig = config[0].countryBanConfig;
-      if (countryBanConfig.bannedCountries.includes(country) && !countryBanConfig.whiteListedSteamIds.includes(steamId)) {
-        sevenDays.kickPlayer({
-          ip: server.ip,
-          port: server.webPort,
-          authName: server.authName,
-          authToken: server.authToken,
-          reason: `${countryBanConfig.kickMessage}`,
-          playerId: connectedMessage.steamID
-        }).exec({
-          error: (error) => {
-            sails.log.warn(`HOOK:countryBan - Failed to kick player from server ${server.id} - ${error}`);
-          },
-          success: () => {
-            sails.log.debug(`HOOK:countryBan - Kicked player ${connectedMessage.playerName} from server ${server.id}`);
-          }
-        });
-      }
-
-    } catch (error) {
-      sails.log.error(`HOOK:countryBan failed to handle player connnect ${error}`);
-    }
-  }
-
-
-  async function startCountryBan(serverId) {
-    try {
-      let server = await SdtdServer.findOne(serverId);
-      let config = await SdtdConfig.findOne({
-        server: serverId
-      });
-
-      currentConfig = config.countryBanConfig;
-      currentConfig.enabled = true;
-
-      await SdtdConfig.update({
-        server: serverId
-      }, {
-        countryBanConfig: currentConfig
-      });
-
-      let loggingObj = sails.hooks.sdtdlogs.getLoggingObject(serverId);
-      if (_.isUndefined(loggingObj)) {
-        return sails.log.error('Could not find logging object for server');
-      }
-
-      loggingObj.on('playerConnected', handleCountryBan);
-
-      return countryBanInfoMap.set(String(serverId), currentConfig);
-    } catch (error) {
-      sails.log.error(`HOOK:countryBan ${error}`);
-      throw error;
-    }
-  }
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/hooks_discordBot_index.js.html b/docs/hooks_discordBot_index.js.html deleted file mode 100644 index e8901c35c..000000000 --- a/docs/hooks_discordBot_index.js.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - Source: hooks/discordBot/index.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
const Commando = require('discord.js-commando');
-const path = require('path');
-
-/**
- * @module DiscordBot
- * @description a Sails project hook. Integrates a discord bot to the system
- * @param {*} sails Global sails instance
- */
-
-/**
- * @module DiscordCommands
- * @description Command guide for users
- */
-
-module.exports = function discordBot(sails) {
-
-  return {
-
-    /**
-     * @memberof module:DiscordBot
-     * @method
-     * @name initialize
-     * @description Starts the discord bot & logs in
-     */
-    initialize: function (cb) {
-      sails.on('hook:orm:loaded', function () {
-        sails.on('hook:sdtdlogs:loaded', function () {
-          client = new Commando.Client({
-            owner: sails.config.custom.botOwners
-          });
-
-          sails.discordBotClient = client;
-
-          // Register custom embed messages
-
-          client.customEmbed = require('./util/createEmbed').CustomEmbed;
-          client.errorEmbed = require('./util/createEmbed').ErrorEmbed;
-
-          // Register some stuff in the registry... yeah..
-          client.registry
-            .registerGroups([
-              ['7dtd', '7 Days to die'],
-              ['meta', 'Commands about the system']
-            ])
-            .registerDefaults()
-            .registerCommandsIn(path.join(__dirname, 'commands'));
-            
-            // Listeners
-
-          client.on('commandError', (command, error) => {
-            sails.log.error(`Command error! ${command.memberName} trace: ${error.stack}`);
-          });
-
-          client.on('commandRun', (command, promise, message) => {
-            sails.log.info(`Command ${command.name} ran by ${message.author.username}`);
-          });
-
-          // Login
-
-          client.login(sails.config.custom.botToken).then(() => {
-              sails.log.info(`Discord bot logged in - ${client.guilds.size} guilds`);
-              return cb();
-            })
-            .catch((err) => {
-              sails.log.error(err);
-            });
-        });
-      });
-    },
-
-    /**
-     * @memberof module:DiscordBot
-     * @method
-     * @name getClient
-     * @description returns the discord client
-     */
-
-    getClient: function () {
-      return sails.discordBotClient;
-    },
-
-    /**
-     * @memberof module:DiscordBot
-     * @method
-     * @name sendNotification
-     * @description Sends a notification to servers notification channel
-     * @param {string} serverId
-     * @param {string} message
-     */
-
-    sendNotification: async function (serverId, message) {
-      try {
-        let server = await SdtdServer.find({id: serverId}).limit(1);
-        let config = await SdtdConfig.find({id: server.config}).limit(1);
-        server = server[0];
-        config = config[0];
-
-        if (config.notificationChannelId) {
-          let notificationChannel = sails.discordBotClient.channels.get(config.notificationChannelId);
-          let embed = new client.customEmbed()
-          embed.setDescription(message);
-          await notificationChannel.send(embed);
-        }
-
-      } catch (error) {
-        sails.log.error(`HOOK - discordBot:sendNotification - ${error}`);
-      }
-    }
-  };
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/hooks_discordBot_util_createEmbed.js.html b/docs/hooks_discordBot_util_createEmbed.js.html deleted file mode 100644 index ec54a1c53..000000000 --- a/docs/hooks_discordBot_util_createEmbed.js.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - Source: hooks/discordBot/util/createEmbed.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
const Discord = require('discord.js');
-
-/**
- * @class
- * @name CustomDiscordEmbed
- * @description Creates a RichEmbed & loads basic data relevant to this project.
- * [Discord.js MessageEmbed]{@link https://discord.js.org/#/docs/main/master/class/MessageEmbed}
- */
-
-class CustomEmbed extends Discord.MessageEmbed {
-  constructor(data) {
-    super();
-    this.setTimestamp();
-    this.setTitle(sails.config.custom.botEmbedTitle);
-    this.setURL(sails.config.custom.botEmbedLink);
-  }
-}
-
-class ErrorEmbed extends CustomEmbed {
-  constructor(errorMsg) {
-    super();
-    this.setDescription(`An error occured! See below for more info \n ${errorMsg}`);
-    this.setColor('RED');
-  }
-}
-
-module.exports.CustomEmbed = CustomEmbed;
-module.exports.ErrorEmbed = ErrorEmbed;
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/hooks_discordChatBridge_chatBridgeChannel.js.html b/docs/hooks_discordChatBridge_chatBridgeChannel.js.html deleted file mode 100644 index 9a3ab3b25..000000000 --- a/docs/hooks_discordChatBridge_chatBridgeChannel.js.html +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - - Source: hooks/discordChatBridge/chatBridgeChannel.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
const Discord = require('discord.js');
-const sevenDays = require('machinepack-7daystodiewebapi');
-const hhmmss = require('@streammedev/hhmmss')
-
-
-/**
- * @class
- * @name ChatBridgeChannel
- * @description Discord chat bridge
- */
-
-class ChatBridgeChannel {
-  constructor(textChannel, sdtdServer) {
-    this.channelId = textChannel.id;
-    this.channel = textChannel;
-    this.sdtdServer = sdtdServer;
-    this.config;
-    this.loggingObject = sails.hooks.sdtdlogs.getLoggingObject(this.sdtdServer.id);
-    this.start()
-  }
-
-  async start() {
-
-    try {
-      this.config = await SdtdConfig.find({
-        server: this.sdtdServer.id
-      }).limit(1);
-      this.config = this.config[0];
-      // Bind 'this' to sendMessage functions
-      this.sendChatMessageToDiscord = this.sendChatMessageToDiscord.bind(this);
-      this.sendConnectedMessageToDiscord = this.sendConnectedMessageToDiscord.bind(this);
-      this.sendRichConnectedMessageToDiscord = this.sendRichConnectedMessageToDiscord.bind(this);
-      this.sendDeathMessageToDiscord = this.sendDeathMessageToDiscord.bind(this);
-      this.sendDisconnectedMessageToDiscord = this.sendDisconnectedMessageToDiscord.bind(this);
-      this.sendRichDisconnectedMessageToDiscord = this.sendRichDisconnectedMessageToDiscord.bind(this);
-      this.sendMessageToGame = this.sendMessageToGame.bind(this)
-
-      if (!_.isUndefined(this.loggingObject) && this.config.chatChannelId) {
-
-        if (this.config.chatChannelRichMessages) {
-          this.loggingObject.on('playerConnected', this.sendRichConnectedMessageToDiscord);
-          this.loggingObject.on('playerDisconnected', this.sendRichDisconnectedMessageToDiscord);
-        } else {
-          this.loggingObject.on('playerConnected', this.sendConnectedMessageToDiscord);
-          this.loggingObject.on('playerDisconnected', this.sendDisconnectedMessageToDiscord);
-        }
-
-        this.loggingObject.on('chatMessage', this.sendChatMessageToDiscord);
-        this.loggingObject.on('playerDeath', this.sendDeathMessageToDiscord);
-
-        this.channel.client.on('message', this.sendMessageToGame);
-        let embed = new this.channel.client.customEmbed();
-        embed.setDescription(':white_check_mark: Initialized a chat bridge')
-          .addField(`Rich messages`, this.config.chatChannelRichMessages ? ':white_check_mark:' : ':x:')
-        this.channel.send(embed);
-      } else {
-        this.channel.send(new this.channel.client.errorEmbed(':x: Could not find a logging object for this server'));
-      }
-    } catch (error) {
-      sails.log.error(`HOOK discordChatBridge:chatBridgeChannel:start - ${error}`)
-    }
-
-  }
-
-  stop() {
-    let embed = new this.channel.client.customEmbed();
-    if (this.loggingObject) {
-      this.loggingObject.removeListener('chatMessage', this.sendChatMessageToDiscord);
-      this.loggingObject.removeListener('playerDeath', this.sendDeathMessageToDiscord);
-      this.loggingObject.removeListener('playerConnected', this.sendConnectedMessageToDiscord);
-      this.loggingObject.removeListener('playerDisconnected', this.sendDisconnectedMessageToDiscord);
-      this.loggingObject.removeListener('playerConnected', this.sendRichConnectedMessageToDiscord);
-      this.loggingObject.removeListener('playerDisconnected', this.sendRichDisconnectedMessageToDiscord);
-      this.channel.client.removeListener('message', this.sendMessageToGame);
-      embed.setDescription(':x: Disabled chat bridge');
-    } else {
-      embed.setDescription('Tried to stop chatbridge in this channel but something went wrong!')
-    }
-    this.channel.send(embed);
-  }
-
-  sendChatMessageToDiscord(chatMessage) {
-    if (chatMessage.playerName == 'Server') {
-      this.channel.send(`\`${chatMessage.messageText}\``);
-    } else {
-      this.channel.send(`${chatMessage.playerName}: ${chatMessage.messageText}`);
-    }
-  }
-
-  sendDeathMessageToDiscord(deathMessage) {
-    this.channel.send(`${deathMessage.playerName} died.`);
-  }
-
-  sendConnectedMessageToDiscord(connectedMsg) {
-    this.channel.send(`${connectedMsg.playerName} connected.`);
-  }
-
-  sendDisconnectedMessageToDiscord(disconnectedMsg) {
-    this.channel.send(`${disconnectedMsg.playerName} disconnected.`);
-  }
-
-
-  async sendRichConnectedMessageToDiscord(connectedMsg) {
-    let connectedPlayer = await Player.find({
-      steamId: connectedMsg.steamID,
-      server: this.sdtdServer.id
-    })
-    connectedPlayer = connectedPlayer[0]
-    let embed = new this.channel.client.customEmbed();
-
-    embed.setTitle(`${this.sdtdServer.name} --- ${connectedMsg.playerName} connected`)
-      .addField('Steam ID', `[${connectedMsg.steamID}](https://steamidfinder.com/lookup/${connectedMsg.steamID}/)`, true)
-      .addField('Country', connectedMsg.country, true)
-      .setColor('GREEN')
-
-    if (connectedPlayer) {
-      embed.addField('Playtime', connectedPlayer.playtime ? hhmmss(connectedPlayer.playtime) : "New player!", true)
-        .addField('CSMM profile', `${process.env.CSMM_HOSTNAME}/player/${connectedPlayer.id}/profile`)
-    }
-
-    if (connectedPlayer.avatarUrl) {
-      embed.setThumbnail(connectedPlayer.avatarUrl)
-    }
-    this.channel.send(embed);
-  }
-
-  async sendRichDisconnectedMessageToDiscord(disconnectedMsg) {
-    let disconnectedPlayer = await Player.find({
-      entityId: disconnectedMsg.entityID,
-      server: this.sdtdServer.id
-    })
-    disconnectedPlayer = disconnectedPlayer[0]
-    let embed = new this.channel.client.customEmbed();
-    embed.setTitle(`${this.sdtdServer.name} --- ${disconnectedMsg.playerName} disconnected`)
-      .addField('Steam ID', disconnectedPlayer.steamId ? `[${disconnectedPlayer.steamId}](https://steamidfinder.com/lookup/${disconnectedPlayer.steamId}/)` : `Unknown`, true)
-      .addField('Playtime', hhmmss(disconnectedPlayer.playtime), true)
-      .addField('CSMM profile', `${process.env.CSMM_HOSTNAME}/player/${disconnectedPlayer.id}/profile`)
-      .setColor('RED')
-    if (disconnectedPlayer.avatarUrl) {
-      embed.setThumbnail(disconnectedPlayer.avatarUrl);
-    }
-    this.channel.send(embed);
-  }
-
-  sendMessageToGame(message) {
-
-    if (message.channel.id === this.channel.id && message.author.id != message.client.user.id) {
-      sevenDays.sendMessage({
-        ip: this.sdtdServer.ip,
-        port: this.sdtdServer.webPort,
-        authName: this.sdtdServer.authName,
-        authToken: this.sdtdServer.authToken,
-        message: `[${message.author.username}]: ${message.cleanContent}`
-      }).exec({
-        error: (error) => {
-          sails.log.error(`HOOK discordBot:chatBridgeChannel ${error}`)
-          message.reply(new this.channel.client.errorEmbed(`:x: Could not send your message to the server! Something is wrong :eyes:`));
-        },
-        success: () => {
-          return true;
-        }
-      });
-    }
-  }
-}
-
-module.exports = ChatBridgeChannel;
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/hooks_discordChatBridge_index.js.html b/docs/hooks_discordChatBridge_index.js.html deleted file mode 100644 index e3c0bf2a5..000000000 --- a/docs/hooks_discordChatBridge_index.js.html +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - - Source: hooks/discordChatBridge/index.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
const ChatBridgeChannel = require('./chatBridgeChannel.js');
-
-/**
- * @module SdtdDiscordChatBridgeHook
- * @description a Sails project hook. Discord chat bridges
- * @param {*} sails Global sails instance
- */
-
-module.exports = function SdtdDiscordChatBridge(sails) {
-
-  /**
-   * @var {Map} chatBridgeInfoMap Keeps track of servers with chatbridges activated
-   * @private
-   */
-
-  let chatBridgeInfoMap = new Map();
-
-  return {
-
-    /**
-     * @memberof module:SdtdDiscordChatBridgeHook
-     * @method
-     * @name initialize
-     * @description Initializes the chatbridges(s)
-     */
-    initialize: async function (cb) {
-      sails.on('hook:orm:loaded', async function () {
-        sails.on('hook:discordbot:loaded', async function () {
-          try {
-            let enabledServers = await SdtdConfig.find({
-              or: [{
-                chatChannelId: {
-                  '!=': ''
-                }
-              }]
-            });
-
-            for (const serverConfig of enabledServers) {
-              try {
-                await start(serverConfig.server);
-              } catch (error) {
-                sails.log.error(`HOOK - DiscordChatBridge:initialize - Error for server ${serverConfig.server} - ${error}`)
-              }
-            }
-            sails.log.info(`HOOK SdtdDiscordChatBridge:initialize - Initialized ${chatBridgeInfoMap.size} chatbridge(s)`);
-
-
-          } catch (error) {
-            sails.log.error(`HOOK SdtdDiscordChatBridge:initialize - ${error}`);
-          }
-          cb();
-        });
-      });
-    },
-
-    /**
-     * @memberof module:SdtdDiscordChatBridgeHook
-     * @method
-     * @name start
-     * @description Starts the chat bridge(s)
-     */
-
-    start: start,
-
-    /**
-     * @memberof module:SdtdDiscordChatBridgeHook
-     * @method
-     * @name stop
-     * @description Stops the chat bridge(s)
-     */
-
-    stop: stop,
-
-    /**
-     * @memberof module:SdtdDiscordChatBridgeHook
-     * @method
-     * @name getStatus
-     * @description Get the chat bridge status for a server
-     * @returns {boolean}
-     */
-
-    getStatus: function (serverId) {
-      return chatBridgeInfoMap.has(serverId);
-    },
-
-    getAmount: function() {
-      return chatBridgeInfoMap.size
-    }
-
-  };
-
-  async function start(serverId) {
-
-    try {
-      sails.log.debug(`HOOK SdtdDiscordChatBridge:start - Starting chatbridge for server ${serverId}`);
-      let discordClient = sails.hooks.discordbot.getClient();
-      let config = await SdtdConfig.find({
-        server: serverId
-      }).limit(1);
-
-      config = config[0]
-
-      if (_.isUndefined(config) || !config.chatChannelId) {
-        throw new Error(`Tried to start chatbridge for server without config`);
-      }
-
-      let server = await SdtdServer.findOne(serverId);
-      let guild = discordClient.guilds.get(config.discordGuildId);
-      let textChannel = discordClient.channels.get(config.chatChannelId);
-
-      if (_.isUndefined(server)) {
-        throw new Error(`Unknown server`);
-      }
-
-      if (_.isUndefined(textChannel)) {
-        throw new Error(`Did not find textchannel corresponding to ID in config.`);
-      }
-
-      let chatBridge = new ChatBridgeChannel(textChannel, server);
-      chatBridgeInfoMap.set(serverId, chatBridge);
-    } catch (error) {
-      sails.log.error(`HOOK SdtdDiscordChatBridge:start - ${error}`);
-      throw error;
-    }
-  }
-
-  async function stop(serverId) {
-    try {
-      sails.log.debug(`HOOK SdtdDiscordChatBridge:stop - Stopping chatbridge for server ${serverId}`);
-      let chatBridge = chatBridgeInfoMap.get(serverId);
-      if (!_.isUndefined(chatBridge)) {
-        chatBridge.stop();
-        return chatBridgeInfoMap.delete(serverId);
-      }
-      return;
-    } catch (error) {
-      sails.log.error(`HOOK SdtdDiscordChatBridge:stop - ${error}`);
-      throw error;
-    }
-  }
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/hooks_sdtdCommands_command.js.html b/docs/hooks_sdtdCommands_command.js.html deleted file mode 100644 index 2b94ed14f..000000000 --- a/docs/hooks_sdtdCommands_command.js.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - Source: hooks/sdtdCommands/command.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
/**
-     * @memberof module:SdtdCommandsHook
-     * @name SdtdCommand
-     * @param {number} serverId
-     * @description Abstract class to represent ingame commands
-     */
-
-class SdtdCommand {
-  constructor(serverId) {
-    /**
-         * @param {number} serverId
-         * @name SdtdCommand#serverId
-         */
-    this.serverId;
-  }
-
-
-  async run(chatMessage, playerId) {
-    throw new Error(`${this.constructor.name} doesn't have a run() method.`);
-  }
-}
-
-module.exports = SdtdCommand;
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/hooks_sdtdCommands_commandHandler.js.html b/docs/hooks_sdtdCommands_commandHandler.js.html deleted file mode 100644 index 1b632ab87..000000000 --- a/docs/hooks_sdtdCommands_commandHandler.js.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - Source: hooks/sdtdCommands/commandHandler.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
/**
-     * @memberof module:SdtdCommandsHook
-     * @name commandHandler
-     * @param {number} serverId
-     * @param {loggingObject} loggingObject Obtained from the logging hook
-     * @param {json} config Server commands config
-     * @description Handles ingamecommands on a server
-     */
-
-
-class CommandHandler {
-  constructor(serverId, loggingObject, config) {
-    this.serverId = serverId;
-    this.loggingObject = loggingObject;
-    this.config = config;
-    this.commands = CommandHandler.loadCommands.bind(this)();
-    this.commandListener = CommandHandler.commandListener.bind(this);
-    this.start();
-  }
-  /**
-       * Start listening for commands
-       */
-  start() {
-    this.commands = CommandHandler.loadCommands.bind(this)();
-    let listenerFunction = this.commandListener;
-    this.loggingObject.on('chatMessage', listenerFunction);
-  }
-
-  /**
-       * Stop listening for commands
-       */
-
-  stop() {
-    let listenerFunction = this.commandListener;
-    this.loggingObject.removeListener('chatMessage', listenerFunction);
-  }
-
-  /**
-       * Load enabled commands
-       * @returns {Map}
-       */
-
-  static loadCommands() {
-
-    let commands = new Map();
-    let config = this.config;
-
-    const normalizedPath = require('path').join(__dirname, 'commands');
-
-    require('fs').readdirSync(normalizedPath).forEach(function (file) {
-      let command = require('./commands/' + file);
-      if (config.enabledCommands[command.name] === true) {
-        commands.set(command.name.toLowerCase(), new command(config.server));
-      }
-
-    });
-
-    return commands;
-
-  }
-
-  /**
-       * Attached to the logging event emitter
-       * @param {json} chatMessage
-       */
-
-  static async commandListener(chatMessage) {
-
-    try {
-      if (chatMessage.messageText.startsWith(this.config.commandPrefix)) {
-        let trimmedMsg = chatMessage.messageText.slice(this.config.commandPrefix.length, chatMessage.messageText.length);
-        let splitString = trimmedMsg.split(' ');
-
-        let commandName = splitString[0];
-        let args = splitString.splice(1, splitString.length);
-
-        if (this.commands.has(commandName)) {
-          let player = await Player.find({name: chatMessage.playerName, server: this.config.server});
-          player = player[0];
-
-          let commandToRun = this.commands.get(commandName);
-
-          return commandToRun.run(chatMessage, player.id, args);
-        }
-        sails.log.debug(`HOOK SdtdCommands:commandListener - Unknown command user by ${chatMessage.playerName} on server ${this.config.server}`);
-      }
-    } catch (error) {
-      sails.log.error(`HOOK SdtdCommands:commandListener - ${error}`);
-    }
-
-
-
-  }
-}
-
-module.exports = CommandHandler;
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/hooks_sdtdCommands_index.js.html b/docs/hooks_sdtdCommands_index.js.html deleted file mode 100644 index 9784a6845..000000000 --- a/docs/hooks_sdtdCommands_index.js.html +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - Source: hooks/sdtdCommands/index.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
const CommandHandler = require('./commandHandler.js');
-/**
- * @module SdtdCommandsHook
- * @description a Sails project hook. Ingame command handler for Sdtd
- * @param {*} sails Global sails instance
- */
-
-/**
- * @module SdtdCommands
- * @description Command guide for users
- */
-
-module.exports = function sdtdCommands(sails) {
-
-  /**
-   * @var {Map} commandInfoMap Keeps track of servers with commands activated
-   * @private
-   */
-
-  let commandInfoMap = new Map();
-
-  return {
-
-    /**
-     * @memberof module:SdtdCommandsHook
-     * @method
-     * @name initialize
-     * @description Initializes the ingame command listener(s)
-     */
-    initialize: async function (cb) {
-      sails.on('hook:orm:loaded', async function () {
-        sails.on('hook:sdtdlogs:loaded', async function () {
-          try {
-            let enabledServers = await SdtdConfig.find({
-              commandsEnabled: true
-            });
-
-            for (const config of enabledServers) {
-              await start(config.server);
-            }
-
-            sails.log.info(`HOOK SdtdCommands - initialized ${commandInfoMap.size} ingame command listeners`);
-          } catch (error) {
-            sails.log.error(`HOOK SdtdCommands:initialize - ${error}`);
-          }
-          cb();
-        });
-      });
-    },
-
-    /**
-     * @memberof module:SdtdCommandsHook
-     * @method
-     * @name start
-     * @description Starts the ingame command listener(s)
-     */
-
-    start: start,
-
-    /**
-     * @memberof module:SdtdCommandsHook
-     * @method
-     * @name stop
-     * @description Stops the ingame command listener(s)
-     */
-
-    stop: stop,
-
-    /**
-     * @memberof module:SdtdCommandsHook
-     * @method
-     * @name getStatus
-     * @description Get the commands status for a server
-     * @returns {boolean}
-     */
-
-    getStatus: function (serverId) {
-      return commandInfoMap.has(serverId);
-    },
-
-    getAmount: function() {
-      return commandInfoMap.size;
-    },
-
-    /**
-     * @memberof module:SdtdCommandsHook
-     * @method
-     * @name updateConfig
-     * @description Updates command config for a server and reload the hook
-     */
-
-    updateConfig: async function (serverId, newConfig) {
-      try {
-        sails.log.debug(`HOOK sdtdCommands:updateConfig - Updating commands config for server ${serverId}`);
-
-        if (_.isUndefined(newConfig.commandPrefix) || _.isUndefined(newConfig.commandsEnabled)) {
-          throw new Error('Missing value(s) for command config. Please check input');
-        }
-
-        await SdtdConfig.update({
-          server: serverId
-        }, {
-          commandsEnabled: newConfig.commandsEnabled,
-          commandPrefix: newConfig.commandPrefix
-        });
-
-        if (newConfig.commandsEnabled) {
-          this.stop(serverId);
-          this.start(serverId);
-        } else {
-          this.stop(serverId);
-        }
-
-      } catch (error) {
-        sails.log.error(`HOOK SdtdCommands:updateConfig - ${error}`);
-        throw error;
-      }
-    }
-
-  };
-
-  async function start(serverId) {
-
-    try {
-      sails.log.silly(`HOOK sdtdCommands:start - Starting commands for server ${serverId}`);
-      let serverConfig = await SdtdConfig.findOne({
-        server: serverId
-      });
-      if (serverConfig.commandsEnabled) {
-        let serverLoggingObj = sails.hooks.sdtdlogs.getLoggingObject(String(serverId));
-        let commandHandler = new CommandHandler(serverId, serverLoggingObj, serverConfig);
-        commandInfoMap.set(String(serverId), commandHandler);
-        return true;
-      }
-    } catch (error) {
-      sails.log.error(`HOOK SdtdCommands:start - ${error}`);
-      throw error;
-    }
-  }
-
-  async function stop(serverId) {
-    try {
-      sails.log.silly(`HOOK sdtdCommands:stop - Stopping commands for server ${serverId}`);
-      let commandHandler = commandInfoMap.get(String(serverId));
-      if (!_.isUndefined(commandHandler)) {
-        commandHandler.stop();
-        return commandInfoMap.delete(String(serverId));
-      }
-      return;
-    } catch (error) {
-      sails.log.error(`HOOK SdtdCommands:stop - ${error}`);
-      throw error;
-    }
-  }
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/hooks_sdtdLogs_index.js.html b/docs/hooks_sdtdLogs_index.js.html deleted file mode 100644 index d231041e0..000000000 --- a/docs/hooks_sdtdLogs_index.js.html +++ /dev/null @@ -1,271 +0,0 @@ - - - - - - - Source: hooks/sdtdLogs/index.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
var sevenDays = require('machinepack-7daystodiewebapi');
-
-/**
- * @module 7dtdLoggingHook
- * @description Detects events on a 7dtd server.
- */
-module.exports = function sdtdLogs(sails) {
-
-  /**
-   * @var {Map} loggingInfoMap Keeps track of servers with logging activated
-   * @private
-   */
-
-  let loggingInfoMap = new Map();
-
-  return {
-    /**
-     * @name initialize
-     * @memberof module:7dtdLoggingHook
-     * @description Called on app launch, loads all servers which have logging enabled and creates logging objects for these
-     * @method
-     * @private
-     */
-    initialize: function (cb) {
-      sails.on('hook:orm:loaded', async function () {
-
-        try {
-          let enabledServers = await SdtdConfig.find({
-            loggingEnabled: true
-          }).populate('server');
-          for (let config of enabledServers) {
-            let server = config.server;
-            let loggingObj = await createLogObject(server.id);
-            loggingInfoMap.set(String(server.id), loggingObj);
-          }
-          sails.log.info(`HOOK: Sdtdlogs - Initialized ${loggingInfoMap.size} logging instances`);
-          return cb();
-        } catch (error) {
-          sails.log.error(`HOOKS - sdtdLogs - ${error}`);
-        }
-      });
-    },
-
-    /**
-     * @name start
-     * @memberof module:7dtdLoggingHook
-     * @description Starts logging for a server
-     * @param {number} serverID - Id of the server
-     * @method
-     */
-
-    start: async function (serverID) {
-      serverID = String(serverID);
-      try {
-        if (!loggingInfoMap.has(serverID)) {
-          sails.log.debug(`HOOKS - sdtdLogs - starting logging for server ${serverID}`);
-          await SdtdConfig.update({
-            server: serverID
-          }, {
-            loggingEnabled: true
-          });
-          let loggingObj = await createLogObject(serverID);
-          return loggingInfoMap.set(serverID, loggingObj);
-        } else {
-          throw new Error(`Tried to start logging for a server that already had it enables`);
-        }
-
-      } catch (error) {
-        sails.log.error(`HOOKS - sdtdLogs - ${error}`);
-      }
-    },
-
-    /**
-     * @name stop
-     * @memberof module:7dtdLoggingHook
-     * @description Stops logging for a server
-     * @param {number} serverID - Id of the server
-     * @method
-     */
-
-    stop: async function (serverID) {
-      serverID = String(serverID);
-      try {
-        if (loggingInfoMap.has(serverID)) {
-          sails.log.debug(`HOOKS - sdtdLogs - stopping logging for server ${serverID}`);
-          await SdtdConfig.update({
-            server: serverID
-          }, {
-            loggingEnabled: false
-          });
-          let loggingObj = loggingInfoMap.get(serverID);
-          loggingInfoMap.delete(serverID);
-          return loggingObj.stop();
-        }
-      } catch (error) {
-        sails.log.error(`HOOKS - sdtdLogs - ${error}`);
-      }
-
-
-    },
-
-    /**
-     * @name getLoggingObject
-     * @memberof module:7dtdLoggingHook
-     * @description Gets the logging object for a server
-     * @param {number} serverId - Id of the server
-     * @method
-     */
-
-    getLoggingObject: function (serverId) {
-      let obj = loggingInfoMap.get(String(serverId));
-      return obj;
-    },
-
-    /**
-     * @name getStatus
-     * @memberof module:7dtdLoggingHook
-     * @description Gets the logging status for a server
-     * @param {number} serverId - Id of the server
-     * @method
-     */
-
-    getStatus: function (serverId) {
-      serverId = String(serverId);
-      let status = loggingInfoMap.has(serverId);
-      return status;
-    }
-  };
-
-  /**
-   * @name createLoggingObject
-   * @memberof module:7dtdLoggingHook
-   * @description Creates a logging object for a 7dtd server
-   * @param {number} serverID - Id of the server
-   * @method
-   * @private
-   */
-
-  function createLogObject(serverID) {
-    return new Promise((resolve, reject) => {
-      sails.models.sdtdserver.findOne({
-        id: serverID
-      }).exec(function (error, server) {
-        if (error) {
-          reject(error);
-        }
-
-        sevenDays.startLoggingEvents({
-          ip: server.ip,
-          port: server.webPort,
-          authName: server.authName,
-          authToken: server.authToken,
-        }).exec({
-          error: function (error) {
-            reject(error);
-          },
-          success: function (eventEmitter) {
-            eventEmitter.on('logLine', function (logLine) {
-              sails.sockets.broadcast(server.id, 'logLine', logLine);
-            });
-
-            eventEmitter.on('chatMessage', function (chatMessage) {
-              sails.sockets.broadcast(server.id, 'chatMessage', chatMessage);
-            });
-
-            eventEmitter.on('playerConnected', async function (connectedMsg) {
-              try {
-                await sails.helpers.loadPlayerData(server.id, connectedMsg.steamID);
-                sails.sockets.broadcast(server.id, 'playerConnected', connectedMsg);
-              } catch (error) {
-                sails.sockets.broadcast(server.id, 'playerConnected', connectedMsg);
-                sails.log.error(`HOOKS - sdtdLogs - ${error}`);
-              }
-
-            });
-
-            eventEmitter.on('playerDisconnected', function (disconectedMsg) {
-              sails.sockets.broadcast(server.id, 'playerDisconnected', disconectedMsg);
-            });
-
-            eventEmitter.on('playerDeath', function (deathMessage) {
-              sails.sockets.broadcast(server.id, 'playerDeath', deathMessage);
-            });
-            resolve(eventEmitter);
-          }
-        });
-      });
-    });
-
-
-  }
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/hooks_sdtdMotd_index.js.html b/docs/hooks_sdtdMotd_index.js.html deleted file mode 100644 index 84d2ade0d..000000000 --- a/docs/hooks_sdtdMotd_index.js.html +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - Source: hooks/sdtdMotd/index.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
var sevenDays = require('machinepack-7daystodiewebapi');
-const MotdSender = require('./motdSenderClass.js');
-
-/**
- * @module 7dtdMOTDHook
- * @description Detects events on a 7dtd server.
- */
-module.exports = function sdtdLogs(sails) {
-
-  /**
-   * @var {Map} motdInfoMap Keeps track of servers with MOTD activated
-   * @private
-   */
-
-  let motdInfoMap = new Map();
-
-  return {
-    /**
-     * @name initialize
-     * @memberof module:7dtdMOTDHook
-     * @description Called on app launch, loads all servers which have logging enabled and creates logging objects for these
-     * @method
-     * @private
-     */
-    initialize: function (cb) {
-      sails.on('hook:orm:loaded', async function () {
-        sails.on('hook:sdtdlogs:loaded', async function () {
-          try {
-            let enabledServers = await SdtdConfig.find({
-              motdEnabled: true
-            }).populate('server');
-
-            for (const config of enabledServers) {
-              let server = config.server;
-              let motdSender = new MotdSender(server.id, config);
-              motdInfoMap.set(server.id, motdSender);
-            }
-            sails.log.info(`HOOK: sdtdMotd - Initialized ${motdInfoMap.size} MOTD instances`);
-            return cb();
-          } catch (error) {
-            sails.log.error(`HOOKS - sdtdMotd:initialize - ${error}`);
-          }
-        });
-      });
-    },
-
-    /**
-     * @name start
-     * @memberof module:7dtdMOTDHook
-     * @description Starts Motd for a server
-     * @param {number} serverId
-     * @method
-     */
-
-    start: async function (serverId) {
-      serverId = String(serverId);
-      try {
-        if (!motdInfoMap.has(serverId)) {
-          sails.log.debug(`HOOKS - sdtdMotd:start - starting motd for server ${serverId}`);
-
-          let config = await SdtdConfig.findOne({
-            server: serverId
-          });
-
-          if (!config.motdEnabled) {
-            return;
-          }
-
-          let motdSender = new MotdSender(serverId, config);
-
-          return motdInfoMap.set(serverId, motdSender);
-        }
-
-      } catch (error) {
-        sails.log.error(`HOOKS - sdtdMotd:start - ${error}`);
-      }
-    },
-
-    /**
-     * @name stop
-     * @memberof module:7dtdMOTDHook
-     * @description Stops MOTD for a server
-     * @param {number} serverId - Id of the server
-     * @method
-     */
-
-    stop: async function (serverId) {
-
-      try {
-        if (motdInfoMap.has(String(serverId))) {
-          sails.log.debug(`HOOKS - sdtdMotd:stop - stopping MOTD for server ${serverId}`);
-
-          let motdSender = motdInfoMap.get(serverId);
-          motdSender.stop();
-          return motdInfoMap.delete(serverId);
-        }
-      } catch (error) {
-        sails.log.error(`HOOKS - sdtdMotd:stop - ${error}`);
-      }
-
-
-    },
-
-
-    /**
-     * @name getStatus
-     * @memberof module:7dtdMOTDHook
-     * @description Gets the motd status for a server
-     * @param {number} serverId - Id of the server
-     * @method
-     */
-
-    getStatus: function (serverId) {
-      serverId = String(serverId);
-      return motdInfoMap.has(serverId);
-    },
-
-    getAmount: function() {
-      return motdInfoMap.size;
-    },
-
-    /**
-     * @name updateConfig
-     * @memberof module:7dtdMOTDHook
-     * @description Set new values for motd config
-     * @param {number} serverId - Id of the server
-     * @param {string} newMessage
-     * @param {number} newDelay
-     * @param {boolean} newStatus motdEnabled
-     * @param {boolean} newStatusOnJoin motdOnJoinEnabled
-     * @method
-     */
-
-    updateConfig: async function (serverId, newMessage, newDelay, newStatus, newStatusOnJoin) {
-
-      try {
-
-        await SdtdConfig.update({
-          server: serverId
-        }, {
-          motdMessage: newMessage,
-          motdEnabled: newStatus,
-          motdOnJoinEnabled: newStatusOnJoin,
-          motdInterval: newDelay
-        });
-
-        this.stop(serverId);
-        this.start(serverId);
-
-      } catch (error) {
-        return sails.log.error(`HOOKS - sdtdMotd:updateConfig - ${error}`);
-      }
-
-    }
-  };
-
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/hooks_sdtdMotd_motdSenderClass.js.html b/docs/hooks_sdtdMotd_motdSenderClass.js.html deleted file mode 100644 index e79a8743a..000000000 --- a/docs/hooks_sdtdMotd_motdSenderClass.js.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - Source: hooks/sdtdMotd/motdSenderClass.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
const sevenDays = require('machinepack-7daystodiewebapi');
-
-/** Class to send MOTD messages */
-
-class MotdSender {
-  /**
-   * Create the class
-   * @param {number} serverId 
-   * @param {json} config 
-   */
-  constructor(serverId, config) {
-    this.serverId = serverId;
-    this.config = config;
-    this.start();
-  }
-
-  /**
-   * Start it
-   */
-  async start() {
-
-    try {
-      if (!this.config.motdEnabled) {
-        throw new Error(`Invalid usage: MOTD is disabled for this server.`);
-      }
-
-      if (this.config.motdInterval) {
-        this.motdInterval = setInterval(() => {
-          this.sendMotd(this.config.motdMessage, this.serverId);
-        }, this.config.motdInterval * 1000 * 60);
-      }
-
-      if (this.config.motdOnJoinEnabled) {
-        let loggingObj = sails.hooks.sdtdlogs.getLoggingObject(this.serverId);
-        this.onJoinListener = MotdSender.onJoinListener.bind(this);
-
-        loggingObj.on('playerConnected', this.onJoinListener);
-      }
-    } catch (error) {
-      sails.log.error(`HOOK 7dtdMOTD:motdSenderClass:start - ${error}`);
-      throw error;
-    }
-
-  }
-
-  /**
-   * Stop it
-   */
-  async stop() {
-    try {
-      if (this.onJoinListener) {
-        let loggingObj = sails.hooks.sdtdlogs.getLoggingObject(this.serverId);
-        loggingObj.removeListener('playerConnected', this.onJoinListener);
-      }
-
-      if (this.motdInterval) {
-        clearInterval(this.motdInterval);
-      }
-
-    } catch (error) {
-      sails.log.error(`HOOK 7dtdMOTD:motdSenderClass:stop - ${error}`);
-      throw error;
-    }
-
-  }
-
-  /**
-   * Function to attach to event emitter (loggingObj)
-   * @param {json} connectedMessage
-   */
-
-  static async onJoinListener(connectedMessage) {
-    try {
-      await this.sendMotd(this.config.motdMessage, this.serverId, connectedMessage.steamID);
-    } catch (error) {
-      sails.log.error(`HOOK 7dtdMOTD:motdSenderClass:onJoinListener - ${error}`);
-    }
-  }
-
-  /**
-   * Send the message to the server or a player if steamId is given
-   * @param {string} message 
-   * @param {number} serverId 
-   * @param {string} playerSteamId 
-   */
-  async sendMotd(message, serverId, playerSteamId) {
-    try {
-      let server = await SdtdServer.findOne(serverId);
-
-      if (_.isUndefined(server)) {
-        return sails.log.error(`HOOKS - sdtdMotd:MotdSender:sendMotd - Unknown server id ${serverId}`);
-      }
-
-      sevenDays.sendMessage({
-        ip: server.ip,
-        port: server.webPort,
-        authName: server.authName,
-        authToken: server.authToken,
-        message: message,
-        playerID: playerSteamId,
-      }).exec({
-        success: (response) => {
-          sails.log.debug(`HOOKS - sdtdMotd:MotdSender:sendMotd - Successfully sent MOTD message to server ${serverId}`);
-        },
-        unknownPlayer: (error) => {
-          sails.log.error(`HOOKS - sdtdMotd:MotdSender:sendMotd - Tried to send message to unknown player ${serverId}`);
-        },
-        error: (error) => {
-          sails.log.error(`HOOKS - sdtdMotd:MotdSender:sendMotd - Unknown server id ${serverId}`);
-        }
-      });
-
-    } catch (error) {
-      sails.log.error(`HOOKS - sdtdMotd:MotdSender:sendMotd - ${error}`);
-    }
-  }
-
-}
-
-module.exports = MotdSender;
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/img/toast-ui.png b/docs/img/toast-ui.png deleted file mode 100644 index e7efc57d7..000000000 Binary files a/docs/img/toast-ui.png and /dev/null differ diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index be6d9a148..000000000 --- a/docs/index.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - Home | CSMM - - - - - - - - - - - - - -
- -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - \ No newline at end of file diff --git a/docs/models_Player.js.html b/docs/models_Player.js.html deleted file mode 100644 index ea6244ef8..000000000 --- a/docs/models_Player.js.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - Source: models/Player.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
/**
- * Player.js
- *
- * @description A model definition.  Represents a ingame player
- * @class Player
- * @param {number} steamId
- * @param {number} entityId
- */
-
-module.exports = {
-
-  attributes: {
-
-    //  ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦  ╦╔═╗╔═╗
-    //  ╠═╝╠╦╝║║║║║ ║ ║╚╗╔╝║╣ ╚═╗
-    //  ╩  ╩╚═╩╩ ╩╩ ╩ ╩ ╚╝ ╚═╝╚═╝
-
-    steamId: {
-      type: 'string',
-      required: true
-    },
-
-    /**
-     * @var {number} entityId
-     * @memberof Player
-     */
-
-    entityId: {
-      type: 'number'
-    },
-
-    /**
-     * @var {string} ip
-     * @description Last known IP address of the player
-     * @memberof Player
-     */
-
-    ip: {
-      type: 'string'
-    },
-
-    /**
-     * @var {string} avatarUrl
-     * @description Url of the players' steam avatar
-     * @memberOf Player
-     */
-
-    avatarUrl: {
-      type: 'string'
-    },
-
-    /**
-     * @memberof Player
-     * @var {string} name
-     */
-
-    name: {
-      type: 'string',
-      required: true
-    },
-
-    /**
-     * @memberof Player
-     * @var {number} positionX
-     */
-
-    positionX: {
-      type: 'number'
-    },
-
-    /**
-     * @memberof Player
-     * @var {number} positionY
-     */
-
-    positionY: {
-      type: 'number'
-    },
-
-    /**
-     * @memberof Player
-     * @var {number} positionZ
-     */
-
-    positionZ: {
-      type: 'number'
-    },
-
-    /**
-     * @memberof Player
-     * @var {json} inventory
-     * @description Last known inventory
-     */
-
-    inventory: {
-      type: 'json',
-    },
-
-    /**
-     * @memberof Player
-     * @var {number} playtime
-     * @description Total time the player has been online
-     */
-
-    playtime: {
-      type: 'number'
-    },
-
-    /**
-     * @memberof Player
-     * @var {string} lastOnline
-     * @description When the player was last seen online
-     */
-
-    lastOnline: {
-      type: 'string'
-    },
-
-    /**
-     * @memberof Player
-     * @var {boolean} banned
-     * @description Whether or not a player is banned
-     * @default false
-     */
-
-    banned: {
-      type: 'boolean',
-      defaultsTo: false
-    },
-
-
-    //  ╔═╗╔╦╗╔╗ ╔═╗╔╦╗╔═╗
-    //  ║╣ ║║║╠╩╗║╣  ║║╚═╗
-    //  ╚═╝╩ ╩╚═╝╚═╝═╩╝╚═╝
-
-
-    //  ╔═╗╔═╗╔═╗╔═╗╔═╗╦╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
-    //  ╠═╣╚═╗╚═╗║ ║║  ║╠═╣ ║ ║║ ║║║║╚═╗
-    //  ╩ ╩╚═╝╚═╝╚═╝╚═╝╩╩ ╩ ╩ ╩╚═╝╝╚╝╚═╝
-
-    /**
-     * @memberof Player
-     * @var server
-     * @description What server the player belongs to
-     */
-    server: {
-      model: 'sdtdServer'
-    },
-
-    /**
-     * @memberof Player
-     * @var user
-     * @description What user corresponds to a player
-     */
-
-    user: {
-      model: 'user'
-    }
-
-  },
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/models_SdtdConfig.js.html b/docs/models_SdtdConfig.js.html deleted file mode 100644 index bdca161a1..000000000 --- a/docs/models_SdtdConfig.js.html +++ /dev/null @@ -1,301 +0,0 @@ - - - - - - - Source: models/SdtdConfig.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
/**
- * SdtdConfig.js
- *
- * @description Persistent configuration per server for system features
- * @module SdtdConfig
- */
-
-module.exports = {
-
-  attributes: {
-
-
-    //   _____                                          _
-    //  / ____|                                        | |
-    // | |     ___  _ __ ___  _ __ ___   __ _ _ __   __| |___
-    // | |    / _ \| '_ ` _ \| '_ ` _ \ / _` | '_ \ / _` / __|
-    // | |___| (_) | | | | | | | | | | | (_| | | | | (_| \__ \
-    //  \_____\___/|_| |_| |_|_| |_| |_|\__,_|_| |_|\__,_|___/
-
-    /**
-     * @memberof SdtdConfig
-     * @var {boolean} commandsEnabled
-     * @description Whether or not ingame commands are enabled
-     * @default false
-     */
-
-    commandsEnabled: {
-      type: 'boolean',
-      defaultsTo: false
-    },
-
-
-    /**
-     * @memberof SdtdConfig
-     * @var {string} commandPrefix
-     * @description Command prefix to use ingame
-     */
-
-    commandPrefix: {
-      type: 'string',
-      defaultsTo: '$'
-    },
-
-    /**
-     * @memberof SdtdConfig
-     * @var {json} enabledCommands
-     * @description json of enabled commands
-     */
-
-    enabledCommands: {
-      type: 'json',
-      defaultsTo: {
-        sayHi: true,
-        callAdmin: true
-      }
-    },
-
-    // _____  _                       _ 
-    // |  __ \(_)                     | |
-    // | |  | |_ ___  ___ ___  _ __ __| |
-    // | |  | | / __|/ __/ _ \| '__/ _` |
-    // | |__| | \__ \ (_| (_) | | | (_| |
-    // |_____/|_|___/\___\___/|_|  \__,_|
-
-
-    /**
-     * @memberof SdtdServer
-     * @var {string} discordGuildId
-     * @description Id of the disccord guild this server is associated with
-     */
-
-    discordGuildId: {
-      type: 'string'
-    },
-
-    /**
-     * @memberof SdtdServer
-     * @var {string} chatChannelId
-     * @description Id of the discord channel for chat bridge
-     */
-
-    chatChannelId: {
-      type: 'string'
-    },
-
-        /**
-     * @memberof SdtdServer
-     * @var {string} chatChannelRichMessages
-     * @description Whether to use rich messages for (dis)connect messages
-     */
-
-    chatChannelRichMessages: {
-      type: 'boolean',
-      defaultsTo: true
-    },
-
-    /**
-     * @memberof SdtdServer
-     * @var {string} notificationChannelId
-     * @description Id of the discord channel for notifications
-     */
-
-    notificationChannelId: {
-      type: 'string'
-    },
-
-    //   _                       _
-    //  | |                     (_)
-    //  | |     ___   __ _  __ _ _ _ __   __ _
-    //  | |    / _ \ / _` |/ _` | | '_ \ / _` |
-    //  | |___| (_) | (_| | (_| | | | | | (_| |
-    //  |______\___/ \__, |\__, |_|_| |_|\__, |
-    //                __/ | __/ |         __/ |
-    //               |___/ |___/         |___/
-
-    /**
-     * @memberof SdtdConfig
-     * @var {boolean} loggingEnabled
-     * @description Whether or not logging is enabled
-     * @default true
-     */
-
-    loggingEnabled: {
-      type: 'boolean',
-      defaultsTo: true
-    },
-
-    //   _____                  _                _
-    //  / ____|                | |              | |
-    // | |     ___  _   _ _ __ | |_ _ __ _   _  | |__   __ _ _ __
-    // | |    / _ \| | | | '_ \| __| '__| | | | | '_ \ / _` | '_ \
-    // | |___| (_) | |_| | | | | |_| |  | |_| | | |_) | (_| | | | |
-    //  \_____\___/ \__,_|_| |_|\__|_|   \__, | |_.__/ \__,_|_| |_|
-    //                                    __/ |
-    //                                   |___/
-
-    /**
-     * @memberof SdtdConfig
-     * @var {json} countryBanConfig
-     * @description Config for country ban
-     */
-
-    countryBanConfig: {
-      type: 'json',
-      defaultsTo: {
-        enabled: false,
-        bannedCountries: [],
-        kickMessage: 'Your country has been blocked on this server.',
-        allowNull: true,
-        whiteListedSteamIds: []
-      },
-    },
-
-    // __  __  ____ _______ _____
-    // |  \/  |/ __ \__   __|  __ \
-    // | \  / | |  | | | |  | |  | |
-    // | |\/| | |  | | | |  | |  | |
-    // | |  | | |__| | | |  | |__| |
-    // |_|  |_|\____/  |_|  |_____/
-
-    /**
-     * @memberof SdtdConfig
-     * @var {boolean} motdEnabled
-     */
-
-    motdEnabled: {
-      type: 'boolean',
-      defaultsTo: false
-    },
-
-    /**
-     * @memberof SdtdConfig
-     * @var {string} motdMessage
-     * @description Message to be sent
-     */
-
-    motdMessage: {
-      type: 'string',
-      defaultsTo: 'Enjoy playing on this server!'
-    },
-
-    /**
-     * @memberof SdtdConfig
-     * @var {boolean} motdOnJoinEnabled
-     * @description Wheter MOTD message should be sent to players on joining
-     */
-
-    motdOnJoinEnabled: {
-      type: 'boolean',
-      defaultsTo: false
-    },
-
-    /**
-     * @memberof SdtdConfig
-     * @var {number} motdInterval
-     * @description Interval the message is sent in minutes
-     */
-
-    motdInterval: {
-      type: 'number',
-      defaultsTo: 20
-    },
-
-
-    //  ╔═╗╔═╗╔═╗╔═╗╔═╗╦╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
-    //  ╠═╣╚═╗╚═╗║ ║║  ║╠═╣ ║ ║║ ║║║║╚═╗
-    //  ╩ ╩╚═╝╚═╝╚═╝╚═╝╩╩ ╩ ╩ ╩╚═╝╝╚╝╚═╝
-
-    /**
-     * @var server
-     * @description Server this config belongs to
-     * @memberof module:SdtdCommandsHook
-     */
-
-    server: {
-      model: 'sdtdserver',
-      required: true
-    },
-
-  },
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/models_SdtdServer.js.html b/docs/models_SdtdServer.js.html deleted file mode 100644 index 0257bc79e..000000000 --- a/docs/models_SdtdServer.js.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - - Source: models/SdtdServer.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
/**
- * SdtdServer.js
- *
- * @description  Represents a 7 Days to Die server
- * @class SdtdServer
- */
-
-module.exports = {
-
-  customToJSON: function () {
-    return _.omit(this, ['authToken', 'authName', 'telnetPort']);
-  },
-
-  attributes: {
-
-    //  ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦  ╦╔═╗╔═╗
-    //  ╠═╝╠╦╝║║║║║ ║ ║╚╗╔╝║╣ ╚═╗
-    //  ╩  ╩╚═╩╩ ╩╩ ╩ ╩ ╚╝ ╚═╝╚═╝
-
-    /**
-     * @memberof SdtdServer
-     * @var {string} name
-     */
-
-    name: {
-      type: 'string'
-    },
-
-    /**
-     * @var {string} ip
-     * @memberof SdtdServer
-     */
-
-    ip: {
-      type: 'string',
-      required: true
-    },
-
-    /**
-     * @memberof SdtdServer
-     * @var {number} gamePort
-     * @description Port used by players to join the game
-     */
-
-    gamePort: {
-      type: 'number'
-    },
-
-    /**
-     * @memberof SdtdServer
-     * @var {number} telnetPort
-     */
-
-    telnetPort: {
-      type: 'number',
-      required: true
-    },
-
-    /**
-     * @memberof SdtdServer
-     * @var {number} webPort
-     * @description Port provided by Alloc's webserver
-     */
-
-    webPort: {
-      type: 'number'
-    },
-
-    /**
-     * @memberof SdtdServer
-     * @var {string} authName
-     * @description adminuser to use during webrequests
-     */
-
-    authName: {
-      type: 'string'
-    },
-
-    /**
-     * @memberof SdtdServer
-     * @var {string} authToken
-     * @description admintoken to use during webrequests
-     */
-
-    authToken: {
-      type: 'string'
-    },
-
-
-
-    //  ╔═╗╔╦╗╔╗ ╔═╗╔╦╗╔═╗
-    //  ║╣ ║║║╠╩╗║╣  ║║╚═╗
-    //  ╚═╝╩ ╩╚═╝╚═╝═╩╝╚═╝
-
-
-    //  ╔═╗╔═╗╔═╗╔═╗╔═╗╦╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
-    //  ╠═╣╚═╗╚═╗║ ║║  ║╠═╣ ║ ║║ ║║║║╚═╗
-    //  ╩ ╩╚═╝╚═╝╚═╝╚═╝╩╩ ╩ ╩ ╩╚═╝╝╚╝╚═╝
-
-    /**
-     * @memberof SdtdServer
-     * @var owner
-     * @description Owner of the server, corresponds to a User
-     */
-
-    owner: {
-      model: 'user',
-      required: true
-    },
-
-    /**
-     * @memberof SdtdServer
-     * @var admins
-     * @description Users allowed to perform admin actions on the server
-     */
-
-    admins: {
-      collection: 'user',
-    },
-
-    /**
-     * @memberof SdtdServer
-     * @var players
-     * @description Collection of Players that have logged on the server
-     */
-
-    players: {
-      collection: 'player',
-      via: 'server'
-    },
-
-    /**
-     * @memberof SdtdServer
-     * @var tickets
-     * @description Collection of SdtdTickets
-     */
-
-    tickets: {
-      collection: 'sdtdticket',
-      via: 'server'
-    },
-  },
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/models_SdtdTicket.js.html b/docs/models_SdtdTicket.js.html deleted file mode 100644 index 94f1b2f53..000000000 --- a/docs/models_SdtdTicket.js.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - Source: models/SdtdTicket.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
/**
- * SdtdTicket.js
- *
- * @description Player-made tickets for admin support
- * @module SdtdTicket
- */
-
-module.exports = {
-
-  attributes: {
-
-    /**
-     * @var description
-     * @description Description for this ticket
-     * @memberof module:SdtdTicket
-     */
-
-    description: {
-      type: 'string'
-    },
-
-    /**
-     * @var title
-     * @description Title of the ticket
-     * @memberof module:SdtdTicket
-     */
-
-    title: {
-      type: 'string',
-      required: true
-    },
-
-    /**
-     * @var status
-     * @description Status of the ticket (open/closed)
-     * @memberof module:SdtdTicket
-     */
-
-    status: {
-      type: 'boolean',
-      defaultsTo: true
-    },
-
-    /**
-     * @var playerInfo
-     * @description playerInfo at the time the ticket was created
-     * @memberof module:SdtdTicket
-     */
-
-    playerInfo: {
-      type: 'json'
-    },
-
-    //  ╔═╗╔═╗╔═╗╔═╗╔═╗╦╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
-    //  ╠═╣╚═╗╚═╗║ ║║  ║╠═╣ ║ ║║ ║║║║╚═╗
-    //  ╩ ╩╚═╝╚═╝╚═╝╚═╝╩╩ ╩ ╩ ╩╚═╝╝╚╝╚═╝
-
-    /**
-     * @var server
-     * @description Server this ticket belongs to
-     * @memberof module:SdtdTicket
-     */
-
-    server: {
-      model: 'sdtdserver',
-      required: true,
-    },
-
-    /**
-     * @var player
-     * @description Player who made the ticket
-     * @memberof module:SdtdTicket
-     */
-
-    player: {
-      model: 'player',
-      required: true
-    }
-
-  },
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/models_User.js.html b/docs/models_User.js.html deleted file mode 100644 index cf9a359f1..000000000 --- a/docs/models_User.js.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - Source: models/User.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
/**
- * User.js
- *
- * @description Represents a user of the system
- * @class User
- */
-
-module.exports = {
-
-  toJSON: function () {
-    var obj = this.toObject();
-    delete obj.encryptedPassword;
-    return obj;
-  },
-
-  attributes: {
-
-    //  ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦  ╦╔═╗╔═╗
-    //  ╠═╝╠╦╝║║║║║ ║ ║╚╗╔╝║╣ ╚═╗
-    //  ╩  ╩╚═╩╩ ╩╩ ╩ ╩ ╚╝ ╚═╝╚═╝
-
-    /**
-     * @memberof User
-     * @var {string} steamId
-     */
-
-    steamId: {
-      type: 'string',
-      unique: true,
-      required: true
-    },
-
-    /**
-     * memberof User
-     * @var {string} discordId
-     */
-
-    discordId: {
-      type: 'string'
-    },
-
-    /**
-     * @memberof User
-     * @var {string} username
-     */
-
-    username: {
-      type: 'string',
-      required: true,
-      unique: true
-    },
-
-    /**
-     * @var {boolean} admin
-     * @memberof User
-     * @description If a user can perform admin actions on the system
-     * @default false
-     */
-
-    admin: {
-      type: 'boolean',
-      defaultsTo: false
-    },
-
-    /**
-     * @var {boolean} banned
-     * @memberof User
-     * @default false
-     */
-
-    banned: {
-      type: 'boolean',
-      defaultsTo: false
-    },
-
-    //  ╔═╗╔╦╗╔╗ ╔═╗╔╦╗╔═╗
-    //  ║╣ ║║║╠╩╗║╣  ║║╚═╗
-    //  ╚═╝╩ ╩╚═╝╚═╝═╩╝╚═╝
-
-
-    //  ╔═╗╔═╗╔═╗╔═╗╔═╗╦╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
-    //  ╠═╣╚═╗╚═╗║ ║║  ║╠═╣ ║ ║║ ║║║║╚═╗
-    //  ╩ ╩╚═╝╚═╝╚═╝╚═╝╩╩ ╩ ╩ ╩╚═╝╝╚╝╚═╝
-
-    /**
-     * @var players
-     * @description Ingame Players corresponding to a user
-     * @memberof User
-     */
-
-    players: {
-      collection: 'player',
-      via: 'user'
-    },
-
-    /**
-     * @var servers
-     * @description Servers this User owns
-     * @memberof User
-     */
-
-    servers: {
-      collection: 'sdtdServer',
-      via: 'owner'
-    },
-
-  },
-
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/module-7dtdCountryBan.html b/docs/module-7dtdCountryBan.html deleted file mode 100644 index a93ae9e6f..000000000 --- a/docs/module-7dtdCountryBan.html +++ /dev/null @@ -1,749 +0,0 @@ - - - - - Module: 7dtdCountryBan | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -

7dtdCountryBan

- - - - -
- -
- -
- - -
Restrict certain countries access to a server
- - - - - -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - -
- - - - - - - - - - - - - - - - - -

Methods

- -
- - -
- -

- - static getStatus(serverId) - - - - -

- - - -
-
- - -
- Gets the country ban status/config for a server -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -number - - - - Id of the server
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static reload(serverId) - - - - -

- - - -
-
- - -
- Changes banned countries config for a server -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -number - - - - Id of the server
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static start(serverId) - - - - -

- - - -
-
- - -
- Starts countryBan for a server -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -number - - - - Id of the server
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static stop(serverId) - - - - -

- - - -
-
- - -
- Stops countryBan for a server -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -number - - - - Id of the server
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- -
- - - - - -
- -
- - - - -
- - - - - - - - - - - \ No newline at end of file diff --git a/docs/module-7dtdLoggingHook.html b/docs/module-7dtdLoggingHook.html deleted file mode 100644 index 6dccd4ae2..000000000 --- a/docs/module-7dtdLoggingHook.html +++ /dev/null @@ -1,749 +0,0 @@ - - - - - Module: 7dtdLoggingHook | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -

7dtdLoggingHook

- - - - -
- -
- -
- - -
Detects events on a 7dtd server.
- - - - - -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - -
- - - - - - - - - - - - - - - - - -

Methods

- -
- - -
- -

- - static getLoggingObject(serverId) - - - - -

- - - -
-
- - -
- Gets the logging object for a server -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -number - - - - Id of the server
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static getStatus(serverId) - - - - -

- - - -
-
- - -
- Gets the logging status for a server -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -number - - - - Id of the server
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static start(serverID) - - - - -

- - - -
-
- - -
- Starts logging for a server -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverID - - -number - - - - Id of the server
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static stop(serverID) - - - - -

- - - -
-
- - -
- Stops logging for a server -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverID - - -number - - - - Id of the server
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- -
- - - - - -
- -
- - - - -
- - - - - - - - - - - \ No newline at end of file diff --git a/docs/module-7dtdMOTDHook.html b/docs/module-7dtdMOTDHook.html deleted file mode 100644 index 502c41abb..000000000 --- a/docs/module-7dtdMOTDHook.html +++ /dev/null @@ -1,841 +0,0 @@ - - - - - Module: 7dtdMOTDHook | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -

7dtdMOTDHook

- - - - -
- -
- -
- - -
Detects events on a 7dtd server.
- - - - - -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - -
- - - - - - - - - - - - - - - - - -

Methods

- -
- - -
- -

- - static getStatus(serverId) - - - - -

- - - -
-
- - -
- Gets the motd status for a server -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -number - - - - Id of the server
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static start(serverId) - - - - -

- - - -
-
- - -
- Starts Motd for a server -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -number - - - -
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static stop(serverId) - - - - -

- - - -
-
- - -
- Stops MOTD for a server -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -number - - - - Id of the server
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static updateConfig(serverId, newMessage, newDelay, newStatus, newStatusOnJoin) - - - - -

- - - -
-
- - -
- Set new values for motd config -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -number - - - - Id of the server
newMessage - - -string - - - -
newDelay - - -number - - - -
newStatus - - -boolean - - - - motdEnabled
newStatusOnJoin - - -boolean - - - - motdOnJoinEnabled
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- -
- - - - - -
- -
- - - - -
- - - - - - - - - - - \ No newline at end of file diff --git a/docs/module-AuthController.html b/docs/module-AuthController.html deleted file mode 100644 index e477e59e5..000000000 --- a/docs/module-AuthController.html +++ /dev/null @@ -1,549 +0,0 @@ - - - - - Module: AuthController | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -

AuthController

- - - - -
- -
- -
- - -
Server-side actions for handling incoming requests regarding authentication.
- - - - - -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - -
- - - - - - - - - - - - - - - - - -

Methods

- -
- - -
- -

- - static discordLogin() - - - - -

- - - -
-
- - -
- login via discord -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static logout() - - - - -

- - - -
-
- - -
- Log out a user, clears the encrypted cookie -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static steamLogin() - - - - -

- - - -
-
- - -
- Authenticate a user via steam -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static steamReturn() - - - - -

- - - -
-
- - -
- Return link after steam login -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- -
- - - - - -
- -
- - - - -
- - - - - - - - - - - \ No newline at end of file diff --git a/docs/module-DiscordBot.html b/docs/module-DiscordBot.html deleted file mode 100644 index b8b6bc63e..000000000 --- a/docs/module-DiscordBot.html +++ /dev/null @@ -1,583 +0,0 @@ - - - - - Module: DiscordBot | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -

DiscordBot

- - - - -
- -
- -
- - -
a Sails project hook. Integrates a discord bot to the system
- - - - - -
- -
-
- - - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
sails - - -* - - - - Global sails instance
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - -
- - - - - - - - - - - - - - - - - -

Methods

- -
- - -
- -

- - static getClient() - - - - -

- - - -
-
- - -
- returns the discord client -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static initialize() - - - - -

- - - -
-
- - -
- Starts the discord bot & logs in -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static sendNotification(serverId, message) - - - - -

- - - -
-
- - -
- Sends a notification to servers notification channel -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -string - - - -
message - - -string - - - -
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- -
- - - - - -
- -
- - - - -
- - - - - - - - - - - \ No newline at end of file diff --git a/docs/module-DiscordCommands.html b/docs/module-DiscordCommands.html deleted file mode 100644 index 4db33f990..000000000 --- a/docs/module-DiscordCommands.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - Module: DiscordCommands | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -

DiscordCommands

- - - - -
- -
- -
- - -
Command guide for users
- - - - - -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - -
- - - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - - - - - - - - - \ No newline at end of file diff --git a/docs/module-Helpers.html b/docs/module-Helpers.html deleted file mode 100644 index 3aa9c360c..000000000 --- a/docs/module-Helpers.html +++ /dev/null @@ -1,1318 +0,0 @@ - - - - - Module: Helpers | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -

Helpers

- - - - -
- -
- -
- - -
Helper functions
- - - - - -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - -
- - - - - - - - - - - - - - - - - -

Methods

- -
- - -
- -

- - static Add7dtdServer(ip, telnetPort, telnetPassword, webPort, owner, discordGuildId) - - - - -

- - - -
-
- - -
- Adds a 7 Days to die server to the system while verifying input -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
ip - - -string - - - -
telnetPort - - -number - - - -
telnetPassword - - -string - - - -
webPort - - -number - - - -
owner - - -number - - - - The ID of the owner
discordGuildId - - -number - - - -
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static checkIfAvailable(serverId) → {boolean} - - - - -

- - - -
-
- - -
- Checks if a server can be reached via the web API -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -number - - - -
- -
- - - - - - - - - - - - - -
-
Returns:
- - - - - -boolean - - - - - - - - - -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static createTicket(serverId, playerId, title, description) → {json} - - - - -

- - - -
-
- - -
- Creates a SdtdTicket -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -number - - - -
playerId - - -number - - - -
title - - -string - - - -
description - - -string - - - -
- -
- - - - - - - - - - - - - -
-
Returns:
- - - - - -json - - - - - -- SdtdTicket - - - - - -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static createWebTokens(ip, port, password) → {json} - - - - -

- - - -
-
- - -
- Executes webtokens add command on a server -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
ip - - -string - - - -
port - - -number - - - - Telnet port
password - - -string - - - - Telnet password
- -
- - - - - - - - - - - - - -
-
Returns:
- - - - - -json - - - - - -- Authname and token - - - - - -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static loadPlayerData(serverId) - - - - -

- - - -
-
- - -
- Loads player information and saves it to database -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -number - - - -
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static loadSdtdServerInfo(serverId) - - - - -

- - - -
-
- - -
- Loads server information -
- - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
serverId - - -number - - - -
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- -
- - - - - -
- -
- - - - -
- - - - - - - - - - - \ No newline at end of file diff --git a/docs/module-SdtdCommands.html b/docs/module-SdtdCommands.html deleted file mode 100644 index b379d2bb7..000000000 --- a/docs/module-SdtdCommands.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - Module: SdtdCommands | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -

SdtdCommands

- - - - -
- -
- -
- - -
Command guide for users
- - - - - -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - -
- - - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - - - - - - - - - \ No newline at end of file diff --git a/docs/module-SdtdCommandsHook.html b/docs/module-SdtdCommandsHook.html deleted file mode 100644 index cb4b15b84..000000000 --- a/docs/module-SdtdCommandsHook.html +++ /dev/null @@ -1,918 +0,0 @@ - - - - - Module: SdtdCommandsHook | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -

SdtdCommandsHook

- - - - -
- -
- -
- - -
a Sails project hook. Ingame command handler for Sdtd
- - - - - -
- -
-
- - - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
sails - - -* - - - - Global sails instance
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - -
- - - - - - - - - - - - - - - -

Members

- -
- - -
-

- static commandHandler - - - -

- - -
-
- -
- Handles ingamecommands on a server -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static SdtdCommand - - - -

- - -
-
- -
- Abstract class to represent ingame commands -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static server - - - -

- - -
-
- -
- Server this config belongs to -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- -
- - - -

Methods

- -
- - -
- -

- - static getStatus() → {boolean} - - - - -

- - - -
-
- - -
- Get the commands status for a server -
- - - - - - - - - - - - - - - - - - - - - -
-
Returns:
- - - - - -boolean - - - - - - - - - -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static initialize() - - - - -

- - - -
-
- - -
- Initializes the ingame command listener(s) -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static start() - - - - -

- - - -
-
- - -
- Starts the ingame command listener(s) -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static stop() - - - - -

- - - -
-
- - -
- Stops the ingame command listener(s) -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static updateConfig() - - - - -

- - - -
-
- - -
- Updates command config for a server and reload the hook -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- -
- - - - - -
- -
- - - - -
- - - - - - - - - - - \ No newline at end of file diff --git a/docs/module-SdtdConfig.html b/docs/module-SdtdConfig.html deleted file mode 100644 index 4498aaef4..000000000 --- a/docs/module-SdtdConfig.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - Module: SdtdConfig | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -

SdtdConfig

- - - - -
- -
- -
- - -
Persistent configuration per server for system features
- - - - - -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - -
- - - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - - - - - - - - - \ No newline at end of file diff --git a/docs/module-SdtdDiscordChatBridgeHook.html b/docs/module-SdtdDiscordChatBridgeHook.html deleted file mode 100644 index 063a5fb73..000000000 --- a/docs/module-SdtdDiscordChatBridgeHook.html +++ /dev/null @@ -1,618 +0,0 @@ - - - - - Module: SdtdDiscordChatBridgeHook | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -

SdtdDiscordChatBridgeHook

- - - - -
- -
- -
- - -
a Sails project hook. Discord chat bridges
- - - - - -
- -
-
- - - - - - - - - - -
-
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
sails - - -* - - - - Global sails instance
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - -
- - - - - - - - - - - - - - - - - -

Methods

- -
- - -
- -

- - static getStatus() → {boolean} - - - - -

- - - -
-
- - -
- Get the chat bridge status for a server -
- - - - - - - - - - - - - - - - - - - - - -
-
Returns:
- - - - - -boolean - - - - - - - - - -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static initialize() - - - - -

- - - -
-
- - -
- Initializes the chatbridges(s) -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static start() - - - - -

- - - -
-
- - -
- Starts the chat bridge(s) -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- -

- - static stop() - - - - -

- - - -
-
- - -
- Stops the chat bridge(s) -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- -
- - - - - -
- -
- - - - -
- - - - - - - - - - - \ No newline at end of file diff --git a/docs/module-SdtdTicket.html b/docs/module-SdtdTicket.html deleted file mode 100644 index 7b3946ae7..000000000 --- a/docs/module-SdtdTicket.html +++ /dev/null @@ -1,607 +0,0 @@ - - - - - Module: SdtdTicket | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -

SdtdTicket

- - - - -
- -
- -
- - -
Player-made tickets for admin support
- - - - - -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - -
- - - - - - - - - - - - - - - -

Members

- -
- - -
-

- static description - - - -

- - -
-
- -
- Description for this ticket -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static player - - - -

- - -
-
- -
- Player who made the ticket -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static playerInfo - - - -

- - -
-
- -
- playerInfo at the time the ticket was created -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static server - - - -

- - -
-
- -
- Server this ticket belongs to -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static status - - - -

- - -
-
- -
- Status of the ticket (open/closed) -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
-

- static title - - - -

- - -
-
- -
- Title of the ticket -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- -
- - - - - - - -
- -
- - - - -
- - - - - - - - - - - \ No newline at end of file diff --git a/docs/policies_isBetaTester.js.html b/docs/policies_isBetaTester.js.html deleted file mode 100644 index 9d4b96899..000000000 --- a/docs/policies_isBetaTester.js.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - Source: policies/isBetaTester.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
/**
- * isBetaTester
- *
- * Check if logged in user is registered as beta tester.
- *
- */
-
-module.exports = async function isBetaTester(req, res, next) {
-  sails.log.silly(`POLICY - isBetaTester - Check if a user is logged in`);
-  try {
-    let user = await User.findOne(req.session.userId);
-    if( sails.config.custom.betaTesters.includes(user.steamId) ) {
-      sails.log.silly(`POLICY - isBetaTester - ${user.username} User ${req.session.userId} is a beta tester!`);
-      return next();
-    } else {
-      sails.log.warn(`POLICY - isBetaTester - ${req.ip} tried to access a protected resource!`);
-      return res.forbidden(`You are not a beta tester!`);
-    }
-  } catch (error) {
-    sails.log.error(error);
-    return res.serverError(error)
-  }
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/policies_isLoggedIn.js.html b/docs/policies_isLoggedIn.js.html deleted file mode 100644 index bba3413af..000000000 --- a/docs/policies_isLoggedIn.js.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - Source: policies/isLoggedIn.js | CSMM - - - - - - - - - - - - - -
- -
- - - - - -
-
-
/**
- * isLoggedIn
- *
- * A simple policy that allows any request from an authenticated user.
- *
- * For more about how this policy works and how to use it, see:
- *   https://sailsjs.com/anatomy/api/policies/isLoggedIn.js
- */
-module.exports = function isLoggedIn(req, res, next) {
-  if(!_.isUndefined(req.session.userId)) {
-    return next();
-  } else {
-    sails.log.warn(`POLICY - isLoggedIn - ${req.ip} tried to access a protected resource!`);
-    return res.redirect('/auth/steam');
-  }
-};
-
-
-
- - - - -
- - - - - - - - - - - diff --git a/docs/scripts/jquery.min.js b/docs/scripts/jquery.min.js deleted file mode 100644 index 45477c0b6..000000000 --- a/docs/scripts/jquery.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jQuery v1.8.3 jquery.com | jquery.org/license */ -(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write(""),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t
a",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="
t
",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="
",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;ti.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="
",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="

",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t0)for(i=r;i=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*\s*$/g,Nt={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X
","
"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1>");try{for(;r1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]===""&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("
").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window); diff --git a/docs/scripts/linenumber.js b/docs/scripts/linenumber.js deleted file mode 100644 index d7ac9c07d..000000000 --- a/docs/scripts/linenumber.js +++ /dev/null @@ -1,30 +0,0 @@ -/*global document */ -(function() { - var source = document.getElementsByClassName('prettyprint source linenums'); - var i = 0; - var lineNumber = 0; - var lineId; - var lines; - var totalLines; - var anchorHash; - var lineNumberHTML = ''; - - if (source && source[0]) { - anchorHash = document.location.hash.substring(1); - lines = source[0].getElementsByTagName('li'); - totalLines = lines.length; - - for (; i < totalLines; i++) { - lineNumber++; - lineId = 'line' + lineNumber; - lines[i].id = lineId; - - lineNumberHTML = '' + (i + 1) + ' : '; - - lines[i].insertAdjacentHTML('afterBegin', lineNumberHTML); - if (lineId === anchorHash) { - lines[i].className += ' selected'; - } - } - } -})(); diff --git a/docs/scripts/prettify/Apache-License-2.0.txt b/docs/scripts/prettify/Apache-License-2.0.txt deleted file mode 100644 index d64569567..000000000 --- a/docs/scripts/prettify/Apache-License-2.0.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/docs/scripts/prettify/lang-css.js b/docs/scripts/prettify/lang-css.js deleted file mode 100644 index 041e1f590..000000000 --- a/docs/scripts/prettify/lang-css.js +++ /dev/null @@ -1,2 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", -/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); diff --git a/docs/scripts/prettify/prettify.js b/docs/scripts/prettify/prettify.js deleted file mode 100644 index eef5ad7e6..000000000 --- a/docs/scripts/prettify/prettify.js +++ /dev/null @@ -1,28 +0,0 @@ -var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; -(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= -[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), -l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, -q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, -q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, -"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), -a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} -for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], -"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], -H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], -J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ -I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), -["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", -/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), -["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", -hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= -!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p - 1; -} - -function makeListItemHtml(item, inputText) { - var itemText = item.text; - var itemHref = item.href; - var $parent = $(item).closest('div'); - var memberof = ''; - - if ($parent.length && $parent.attr('id')) { - memberof = $parent.attr('id').replace('_sub', ''); - } else { - memberof = $(item).closest('div').find('h3').text(); - } - - if (memberof) { - memberof = '' + memberof + ''; - } - - itemText = itemText.replace(new RegExp(inputText, 'ig'), function(matched) { - return '' + matched + ''; - }); - - return '
  • ' + itemText + '' + memberof + '
  • '; -} - -function removeWhiteSpace(value) { - return value.replace(/\s/g, ''); -} - -/*************** TOOGLE SUB NAV ***************/ -function toggleSubNav(e) { - $(e.currentTarget).next().toggleClass('hidden'); - $(e.currentTarget).find('.glyphicon').toggleClass('glyphicon-plus glyphicon-minus'); -} - -$lnb.find('.lnb-api').each(function() { - $(this).find('.toggle-subnav') - .filter(function() { - return $(this).next(':empty').length === 0; - }).each(function() { - $(this).removeClass('hidden').on('click', toggleSubNav); - }); -}); diff --git a/docs/styles/bootstrap.min.css b/docs/styles/bootstrap.min.css deleted file mode 100644 index ed3905e0e..000000000 --- a/docs/styles/bootstrap.min.css +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * Bootstrap v3.3.7 (http://getbootstrap.com) - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} -/*# sourceMappingURL=bootstrap.min.css.map */ \ No newline at end of file diff --git a/docs/styles/prettify-jsdoc.css b/docs/styles/prettify-jsdoc.css deleted file mode 100644 index 5a2526e37..000000000 --- a/docs/styles/prettify-jsdoc.css +++ /dev/null @@ -1,111 +0,0 @@ -/* JSDoc prettify.js theme */ - -/* plain text */ -.pln { - color: #000000; - font-weight: normal; - font-style: normal; -} - -/* string content */ -.str { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* a keyword */ -.kwd { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* a comment */ -.com { - font-weight: normal; - font-style: italic; -} - -/* a type name */ -.typ { - color: #000000; - font-weight: normal; - font-style: normal; -} - -/* a literal value */ -.lit { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* punctuation */ -.pun { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* lisp open bracket */ -.opn { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* lisp close bracket */ -.clo { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* a markup tag name */ -.tag { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* a markup attribute name */ -.atn { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* a markup attribute value */ -.atv { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* a declaration */ -.dec { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* a variable name */ -.var { - color: #000000; - font-weight: normal; - font-style: normal; -} - -/* a function name */ -.fun { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* Specify class=linenums on a pre to get line numbering */ -ol.linenums { - margin-top: 0; - margin-bottom: 0; -} diff --git a/docs/styles/prettify-tomorrow.css b/docs/styles/prettify-tomorrow.css deleted file mode 100644 index b6f92a78d..000000000 --- a/docs/styles/prettify-tomorrow.css +++ /dev/null @@ -1,132 +0,0 @@ -/* Tomorrow Theme */ -/* Original theme - https://github.com/chriskempson/tomorrow-theme */ -/* Pretty printing styles. Used with prettify.js. */ -/* SPAN elements with the classes below are added by prettyprint. */ -/* plain text */ -.pln { - color: #4d4d4c; } - -@media screen { - /* string content */ - .str { - color: #718c00; } - - /* a keyword */ - .kwd { - color: #8959a8; } - - /* a comment */ - .com { - color: #8e908c; } - - /* a type name */ - .typ { - color: #4271ae; } - - /* a literal value */ - .lit { - color: #f5871f; } - - /* punctuation */ - .pun { - color: #4d4d4c; } - - /* lisp open bracket */ - .opn { - color: #4d4d4c; } - - /* lisp close bracket */ - .clo { - color: #4d4d4c; } - - /* a markup tag name */ - .tag { - color: #c82829; } - - /* a markup attribute name */ - .atn { - color: #f5871f; } - - /* a markup attribute value */ - .atv { - color: #3e999f; } - - /* a declaration */ - .dec { - color: #f5871f; } - - /* a variable name */ - .var { - color: #c82829; } - - /* a function name */ - .fun { - color: #4271ae; } } -/* Use higher contrast and text-weight for printable form. */ -@media print, projection { - .str { - color: #060; } - - .kwd { - color: #006; - font-weight: bold; } - - .com { - color: #600; - font-style: italic; } - - .typ { - color: #404; - font-weight: bold; } - - .lit { - color: #044; } - - .pun, .opn, .clo { - color: #440; } - - .tag { - color: #006; - font-weight: bold; } - - .atn { - color: #404; } - - .atv { - color: #060; } } -/* Style */ -/* -pre.prettyprint { - background: white; - font-family: Consolas, Monaco, 'Andale Mono', monospace; - font-size: 12px; - line-height: 1.5; - border: 1px solid #ccc; - padding: 10px; } -*/ - -/* Specify class=linenums on a pre to get line numbering */ -ol.linenums { - margin-top: 0; - margin-bottom: 0; } - -/* IE indents via margin-left */ -li.L0, -li.L1, -li.L2, -li.L3, -li.L4, -li.L5, -li.L6, -li.L7, -li.L8, -li.L9 { - /* */ } - -/* Alternate shading for lines */ -li.L1, -li.L3, -li.L5, -li.L7, -li.L9 { - /* */ } diff --git a/docs/styles/tui-doc.css b/docs/styles/tui-doc.css deleted file mode 100644 index aec9ed947..000000000 --- a/docs/styles/tui-doc.css +++ /dev/null @@ -1,485 +0,0 @@ -body { - font-size: 12px; - font-family: Helvetica Neue, Helvetica, Arial, Malgun gothic, '돋움', AppleSDGothicNeo; -} -ul, ol, li {list-style:none; padding-left:0; margin-left:0;} - -/* Navigation - LNB */ -.lnb { - width: 290px; - position: absolute; - bottom: 30px; - top: 0; - overflow: auto; - left: 0; - background-color: #161b1d; - padding: 0 20px; -} -.lnb .logo { - height: 13px; - margin: 20px auto 0; -} -.lnb .title { - text-align: center; - padding: 0 0 15px; -} -.lnb .title .link { - color: #fff; - font-style: italic; -} -.lnb h3 { - font-size: 1.5em; - color: #fa3282; -} -.lnb h3 a { - color: #fa3282; -} -.lnb h3 a:hover { - color: #9a3282; -} -.lnb .lnb-api li, -.lnb .lnb-examples li { - padding-top: 5px; - padding-bottom: 5px; - border-bottom: 1px solid #1f292e; -} -.lnb .lnb-api h3 a { - color: #fa3282; -} -.lnb .lnb-api h3 a:hover { - color: #fa3282; - text-decoration: underline; -} -.lnb .lnb-api a, -.lnb .lnb-examples a { - color: #7cafc2; -} -.lnb .lnb-api a:hover, -.lnb .lnb-examples a:hover { - color: #a3cfdf; -} -.lnb .lnb-api .toggle-subnav { - padding: 0 3px; - margin-bottom: 0; -} -.lnb .lnb-api .toggle-subnav:focus { - outline: 0; -} -.lnb .lnb-api .toggle-subnav { - font-size: 10px; -} -.lnb .member-type { - margin-top: 5px; - margin-left: 5px; - color: #568c3b; - font-weight: normal; - font-size: 10px; - cursor: text; -} -.lnb .inner li { - margin-left: 15px; - border-bottom: 0; - padding-top: 0; - padding-bottom: 0; - color: #bbb; -} -.lnb .inner a { - color: #bbb; -} -.lnb .inner a:hover { - color: #eee; -} - -.lnb .version { - color: #aaa; - font-size: 1.2em; -} - -/* LNB-TAB */ -.lnb-tab { - text-align: center; - text-decoration: none; -} -.lnb-tab li { - display: inline-block; - padding-top: 15px; -} -.lnb-tab li a { - color: #aaa; - font-size: 0.9em; -} -.lnb-tab li.selected a { - color: #fff; - font-size: 1em; -} -.lnb-tab li+li a h4:before { - content: "\007C"; - display: inline-block; - color: #999; - padding: 0 10px; -} - -/* MAIN-CONTENT */ -.main { - padding: 20px; - left: 297px; - right: 0; - top: 0; - bottom: 0; - position: absolute; - overflow: auto; - margin-bottom: 35px; -} -.main article ol, -.main article ul { - margin-left: 15px; -} -.main section header { - padding-top: 0; - border-bottom: 1px solid #999; -} -.main section header h2 { - font-size:18px; - font-weight:bold; - padding-left : 5px; - border-left: 5px solid #dc9656; -} -.main section article { - padding: 10px; -} -.main section article .container-overview { - padding: 15px 15px 0 15px; - border: 1px solid #dedede; - border-radius: 7px; -} -.main section article h3.subsection-title { - font-size:16px; - color: #fa3282; - padding:35px 0 0 5px; - border-bottom: 1px solid #dedede; -} -.main section article dl h4 { - font-size: 12px; - font-weight: bold; -} -.main section article dl h4 .signature { - font-size: 9pt; -} -.main section article dl h4 .type-signature { - font-size: 9pt; - color: #31708f; - font-weight: normal; -} -.main section article dl dt .name { - padding: 3px 10px; - background-color: #f4f7f8; -} -.main section article dl dd { - padding: 0 30px; -} -.main section article dl dd h5{ - font-weight: bold; -} -.main section article .container-source { - margin: -15px -15px 3px 0; - font-weight: normal; - font-size: 8pt; - text-align: right; - padding-right: 10px; -} -.main section article .container-returns { - margin-bottom: 7px; -} -.main section article .container-returns span, -.main section article .container-params table { - border-left: 3px solid #eee; - margin-left: 7px; - padding-left: 3px; - margin-bottom: 5px; -} -.main section article .container-returns p { - display: inline; -} -.main section article .container-properties h5, -.main section article .container-returns h5, -.main section article .container-params h5, -.main section article table th, -.main section article table td.type, -.main section article table td.attributes { - font-family: Verdana, sans-serif; - font-size: 90%; -} -.main section article table, -.main section article table th, -.main section article table td { - font-family: Verdana, sans-serif; - vertical-align: top; - border: 0; - padding: 1px 3px; -} -.main section article table td.name, -.main section article table td.type, -.main section article table td.attributes, -.main section article table td.default { - max-width: 100px; - min-width: 80px; - word-break: break-all; -} -.main section article table td.type, -.main section article table td.attributes { - color: #aaa; -} -.main section article table td p { - padding: 0; - margin: 0; -} -.main section article table td h6 { - padding: 0 0 0 3px; - margin: 3px 0 0 3px; - font-size: 85%; -} -.main section article .container-properties table.props { - margin-top: -3px; -} -.main .main-content article { - padding:0; -} -.main .container-overview, -.main .main-datail { - overflow: hidden; -} -.main .main-detail .tag-source { - float:left; - display:none; -} -.main .main-detail .tag-author { - float:left; -} -.main .main-detail .tag-author a { - color:#181818; - font-size:11px; - text-decoration:none; -} -.linenums li.selected { - background: #faebd7; -} -.iinenums .number { - color: #777; - display: inline-block; - width: 40px; -} - -/* FOOTER */ -footer { - padding-top: 3px; - line-height: 35px; - height: 35px; - position: fixed; - width: 100%; - bottom: 0; - background-color: #00beaa; - color: #ebf8ff; - text-align: center; -} - -/* README*/ -.readme { - font-size: 14px; -} -.readme p, -.readme ul, -.readme ol { - padding: 3px 0 3px 5px; -} -.readme li { - list-style: initial; -} -.readme img { - max-width: 100%; -} -.readme h1 { - font-size:24px; - font-weight:normal; - padding: 10px 0 5px 0; - border-bottom: 1px solid #428bca; -} -.readme pre { - margin: 15px 3px; -} -.readme li p { - padding: 10px 0; - color: #333; -} -.readme p a { - color:#c7254e; -} -.readme h2 { - padding-bottom: 3px; - border-bottom: 1px solid #dedede; - font-size: 22px; -} -.readme h3 { - font-size: 20px; - padding-bottom: 3px; -} - -.readme h4 { - font-size: 18px; -} -.readme h5 { - font-size: 16px; -} -.readme h6 { - font-size: 15px; -} -.readme table { - margin: 5px 30px 20px; -} -.readme table th, -.readme table td { - padding: 2px 20px 2px 5px; - border-bottom: 1px solid #dedede; -} -.readme section header h2 { - font-size:20px; - padding-left:10px; - border-left:5px solid #fa3282; -} -.readme section .container-overview { - color:#333; - border-radius: 2px; - border:1px solid #dedede; - padding:15px 15px 10px; -} -.readme section .container-overview .description { - color:#666; -} -.readme section .container-overview dt {float:left; } -.readme section .container-overview dd {float:left; margin-left:10px; } -.readme blockquote { - padding: inherit; - margin: inherit; - font-size: inherit; - color: #777; -} - -/* Search box */ -.search-container { - position: relative; - padding-bottom: 10px; -} -.search-container input { - padding: 7px; - width: 100%; - color: #aaa; - border: 1px solid #585858; - background-color: #373737; - border-radius: 2px; -} -.search-container a { - color: #fff; -} -.search-container strong { - color: pink; - font-weight: normal; -} -.search-container ul { - font-size: 13px; - position: absolute; - width: 100%; - background-color: #456e82; - border: 1px solid #1f292e; - border-radius: 0 0 2px 2px; - opacity: 0.9; - filter: alpha(opacity=90); -} -.search-container ul li { - text-align: left; - width: 100%; - padding: 4px 0 4px 7px; - overflow: hidden; - border: 0; - cursor: pointer; -} -.search-container ul li:hover, -.search-container ul li.highlight{ - background-color: #fff; -} -.search-container ul li:hover a, -.search-container ul li.highlight a { - color: #1f292e; - text-decoration: underline; -} -.search-container ul li:hover strong, -.search-container ul li.highlight strong { - color: #ff4141; -} -.search-container ul li .group { - font-size: 11px; - color: #ccc; - margin-left: 10px; -} -.search-container ul li:hover .group, -.search-container ul li.highlight .group { - color: #777; -} - -/* ETC */ -.logo { - width: 90px; - vertical-align: initial; -} -.hidden { - display: none; -} -.footer-text { - padding-left: 3px; - display: inline-block; -} -#example-nav { - margin-top: 15px; -} -#resizer { - width: 7px; - position: fixed; - left: 290px; - height: 100%; - background-color: #00beaa; - cursor: col-resize; -} -span.param-type { - color: #aaa; -} -pre.prettyprint { - font-size: 0.9em; - border-radius: 0; -} -span.icon { - font-size: 8pt; - border-radius: 3px; - padding: 1px 2px; -} -span.icon.green { - color: #3c763d; - background-color: #dff0d8; - border-color: #d6e9c6; -} -span.icon.blue { - color: #31708f; - background-color: #d9edf7; - border-color: #bce8f1; -} -span.icon.yellow { - color: #8a6d3b; - background-color: #fcf8e3; - border-color: #faebcc; -} -span.icon.red { - color: #A94443; - background-color: #f2dede; - border-color: #ebccd1; -} -span.arrow { - font-size: 8pt; - padding-right: 5px; -} diff --git a/package-lock.json b/package-lock.json index 239fd01b9..3d27a2279 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,130 +12,6 @@ "snekfetch": "^4.0.2" } }, - "@babel/code-frame": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", - "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", - "dev": true, - "requires": { - "@babel/highlight": "^7.0.0" - } - }, - "@babel/generator": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.2.0.tgz", - "integrity": "sha512-BA75MVfRlFQG2EZgFYIwyT1r6xSkwfP2bdkY/kLZusEYWiJs4xCowab/alaEaT0wSvmVuXGqiefeBlP+7V1yKg==", - "dev": true, - "requires": { - "@babel/types": "^7.2.0", - "jsesc": "^2.5.1", - "lodash": "^4.17.10", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" - } - }, - "@babel/helper-function-name": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", - "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", - "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz", - "integrity": "sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/highlight": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", - "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", - "dev": true, - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" - } - }, - "@babel/parser": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.2.0.tgz", - "integrity": "sha512-M74+GvK4hn1eejD9lZ7967qAwvqTZayQa3g10ag4s9uewgR7TKjeaT0YMyoq+gVfKYABiWZ4MQD701/t5e1Jhg==", - "dev": true - }, - "@babel/template": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.1.2.tgz", - "integrity": "sha512-SY1MmplssORfFiLDcOETrW7fCLl+PavlwMh92rrGcikQaRq4iWPVH0MpwPpY3etVMx6RnDjXtr6VZYr/IbP/Ag==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.1.2", - "@babel/types": "^7.1.2" - } - }, - "@babel/traverse": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.1.6.tgz", - "integrity": "sha512-CXedit6GpISz3sC2k2FsGCUpOhUqKdyL0lqNrImQojagnUMXf8hex4AxYFRuMkNGcvJX5QAFGzB5WJQmSv8SiQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.1.6", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/parser": "^7.1.6", - "@babel/types": "^7.1.6", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.10" - }, - "dependencies": { - "debug": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz", - "integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "@babel/types": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.2.0.tgz", - "integrity": "sha512-b4v7dyfApuKDvmPb+O488UlGuR1WbwMXFsO/cyqMrnfvRAChZKJAYeeglWTjUO1b9UghKKgepAQM5tsvBJca6A==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.10", - "to-fast-properties": "^2.0.0" - } - }, "@sailshq/connect-redis": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/@sailshq/connect-redis/-/connect-redis-3.2.1.tgz", @@ -202,6 +78,13 @@ "uri-js": "^4.2.2" } }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true, + "optional": true + }, "anchor": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/anchor/-/anchor-1.3.0.tgz", @@ -880,6 +763,38 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "coveralls": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.2.tgz", + "integrity": "sha512-Tv0LKe/MkBOilH2v7WBiTBdudg2ChfGbdXafc/s330djpF3zKOmuehTeRwjXWc7pzfj9FrDUTA7tEx6Div8NFw==", + "dev": true, + "requires": { + "growl": "~> 1.10.0", + "js-yaml": "^3.11.0", + "lcov-parse": "^0.0.10", + "log-driver": "^1.2.7", + "minimist": "^1.2.0", + "request": "^2.85.0" + }, + "dependencies": { + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "js-yaml": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + } + } + }, "crc": { "version": "3.4.4", "resolved": "https://registry.npmjs.org/crc/-/crc-3.4.4.tgz", @@ -1007,6 +922,12 @@ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.2.11.tgz", "integrity": "sha1-eha6aXKRMjQFBhcElLyD9wdv4I8=" }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1223,11 +1144,30 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, + "escodegen": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", + "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", + "dev": true, + "requires": { + "esprima": "^2.7.1", + "estraverse": "^1.9.1", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.2.0" + } + }, "esprima": { "version": "2.7.3", "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=" }, + "estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", + "dev": true + }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", @@ -1434,6 +1374,12 @@ "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=" }, + "faker": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/faker/-/faker-4.1.0.tgz", + "integrity": "sha1-HkW7vsxndLPBlfrSg1EJxtdIzD8=", + "dev": true + }, "falafel": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/falafel/-/falafel-2.1.0.tgz", @@ -1455,6 +1401,12 @@ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, "fd-slicer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", @@ -1762,12 +1714,6 @@ "which": "^1.2.12" } }, - "globals": { - "version": "11.9.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.9.0.tgz", - "integrity": "sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg==", - "dev": true - }, "graceful-fs": { "version": "1.1.14", "resolved": "http://registry.npmjs.org/graceful-fs/-/graceful-fs-1.1.14.tgz", @@ -1945,6 +1891,26 @@ } } }, + "handlebars": { + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.12.tgz", + "integrity": "sha512-RhmTekP+FZL+XNhwS1Wf+bTTZpdLougwt5pcgA1tuz6Jcx0fpH/7z0qd71RKnZHBCxIRBHfBOnio4gViPemNzA==", + "dev": true, + "requires": { + "async": "^2.5.0", + "optimist": "^0.6.1", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -2282,25 +2248,74 @@ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, - "istanbul-lib-coverage": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", - "integrity": "sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==", - "dev": true - }, - "istanbul-lib-instrument": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.0.0.tgz", - "integrity": "sha512-eQY9vN9elYjdgN9Iv6NS/00bptm02EBBk70lRMaVjeA6QYocQgenVrSgC28TJurdnZa80AGO3ASdFN+w/njGiQ==", + "istanbul": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", + "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", "dev": true, "requires": { - "@babel/generator": "^7.0.0", - "@babel/parser": "^7.0.0", - "@babel/template": "^7.0.0", - "@babel/traverse": "^7.0.0", - "@babel/types": "^7.0.0", - "istanbul-lib-coverage": "^2.0.1", - "semver": "^5.5.0" + "abbrev": "1.0.x", + "async": "1.x", + "escodegen": "1.8.x", + "esprima": "2.7.x", + "glob": "^5.0.15", + "handlebars": "^4.0.1", + "js-yaml": "3.x", + "mkdirp": "0.5.x", + "nopt": "3.x", + "once": "1.x", + "resolve": "1.1.x", + "supports-color": "^3.1.0", + "which": "^1.1.1", + "wordwrap": "^1.0.0" + }, + "dependencies": { + "abbrev": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", + "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", + "dev": true + }, + "async": { + "version": "1.5.2", + "resolved": "http://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + } } }, "js-tokens": { @@ -2323,12 +2338,6 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -2479,6 +2488,22 @@ "invert-kv": "^1.0.0" } }, + "lcov-parse": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz", + "integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, "lie": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", @@ -2597,6 +2622,12 @@ "resolved": "https://registry.npmjs.org/lodash.isundefined/-/lodash.isundefined-3.0.1.tgz", "integrity": "sha1-I+89lTVWUgOmbO/VuDD4SJEa+0g=" }, + "log-driver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", + "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", + "dev": true + }, "long": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", @@ -3467,6 +3498,12 @@ } } }, + "mocha-lcov-reporter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/mocha-lcov-reporter/-/mocha-lcov-reporter-1.3.0.tgz", + "integrity": "sha1-Rpve9PivyaEWBW8HnfYYLQr7A4Q=", + "dev": true + }, "mochawesome": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/mochawesome/-/mochawesome-3.1.1.tgz", @@ -3542,1249 +3579,36 @@ "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "graceful-fs": { - "version": "4.1.15", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", - "dev": true - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "validator": { - "version": "9.4.1", - "resolved": "http://registry.npmjs.org/validator/-/validator-9.4.1.tgz", - "integrity": "sha512-YV5KjzvRmSyJ1ee/Dm5UED0G+1L4GZnLN3w6/T+zZm8scVua4sOhYKWTUrKa0H/tMiJyO9QLHMPN+9mB/aMunA==", - "dev": true - }, - "yargs": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-10.1.2.tgz", - "integrity": "sha512-ivSoxqBGYOqQVruxD35+EyCFDYNEFL/Uo6FcOnz+9xZdZzK0Zzw4r4KhbrME1Oo2gOggwJod2MnsdamSG7H9ig==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^8.1.0" - } - } - } - }, - "moment": { - "version": "2.22.2", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz", - "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=" - }, - "moment-timezone": { - "version": "0.5.23", - "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.23.tgz", - "integrity": "sha512-WHFH85DkCfiNMDX5D3X7hpNH3/PUhjTGcD0U1SgfBGZxJ3qUmJh5FdvaFjcClxOvB3rzdfj4oRffbI38jEnC1w==", - "requires": { - "moment": ">= 2.9.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "multiparty": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/multiparty/-/multiparty-4.1.3.tgz", - "integrity": "sha1-PEPH/LGJbhdGBDap3Qtu8WaOT5Q=", - "requires": { - "fd-slicer": "~1.0.1" - } - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" - }, - "mysql": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.15.0.tgz", - "integrity": "sha512-C7tjzWtbN5nzkLIV+E8Crnl9bFyc7d3XJcBAvHKEVkjrYjogz3llo22q6s/hw+UcsE4/844pDob9ac+3dVjQSA==", - "requires": { - "bignumber.js": "4.0.4", - "readable-stream": "2.3.3", - "safe-buffer": "5.1.1", - "sqlstring": "2.3.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - } - } - }, - "natives": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.6.tgz", - "integrity": "sha512-6+TDFewD4yxY14ptjKaS63GVdtKiES1pTPyxn9Jb0rBqPMZ7VcCiooEhPNsr+mqHtMGxa/5c/HhcC4uPEUw/nA==" - }, - "ncp": { - "version": "0.4.2", - "resolved": "http://registry.npmjs.org/ncp/-/ncp-0.4.2.tgz", - "integrity": "sha1-q8xsvT7C7Spyn/bnwfqPAXhKhXQ=" - }, - "nedb": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/nedb/-/nedb-1.8.0.tgz", - "integrity": "sha1-DjUCzYLABNU1WkPJ5VV3vXvZHYg=", - "requires": { - "async": "0.2.10", - "binary-search-tree": "0.2.5", - "localforage": "^1.3.0", - "mkdirp": "~0.5.1", - "underscore": "~1.4.4" - }, - "dependencies": { - "async": { - "version": "0.2.10", - "resolved": "http://registry.npmjs.org/async/-/async-0.2.10.tgz", - "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=" - } - } - }, - "negotiator": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", - "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" - }, - "node-schedule": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/node-schedule/-/node-schedule-1.3.1.tgz", - "integrity": "sha512-cdNNePwKoisAi4DT00BB11H6IJ/WtA603YZ7+tLJcb/zCmCSxYKcvc+/GTyxC46jN/0ft7741vmMQrvxP8Sd+A==", - "requires": { - "cron-parser": "^2.7.3", - "long-timeout": "0.1.1", - "sorted-array-functions": "^1.0.0" - } - }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", - "requires": { - "abbrev": "1" - } - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "notepack.io": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/notepack.io/-/notepack.io-2.1.3.tgz", - "integrity": "sha512-AgSt+cP5XMooho1Ppn8NB3FFaVWefV+qZoZncYTUSch2GAEwlYLcIIbT5YVkMlFeNHnfwOvc4HDlbvrB5BRxXA==" - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "nyc": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-13.1.0.tgz", - "integrity": "sha512-3GyY6TpQ58z9Frpv4GMExE1SV2tAgYqC7HSy2omEhNiCT3mhT9NyiOvIE8zkbuJVFzmvvNTnE4h/7/wQae7xLg==", - "dev": true, - "requires": { - "archy": "^1.0.0", - "arrify": "^1.0.1", - "caching-transform": "^2.0.0", - "convert-source-map": "^1.6.0", - "debug-log": "^1.0.1", - "find-cache-dir": "^2.0.0", - "find-up": "^3.0.0", - "foreground-child": "^1.5.6", - "glob": "^7.1.3", - "istanbul-lib-coverage": "^2.0.1", - "istanbul-lib-hook": "^2.0.1", - "istanbul-lib-instrument": "^3.0.0", - "istanbul-lib-report": "^2.0.2", - "istanbul-lib-source-maps": "^2.0.1", - "istanbul-reports": "^2.0.1", - "make-dir": "^1.3.0", - "merge-source-map": "^1.1.0", - "resolve-from": "^4.0.0", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.2", - "spawn-wrap": "^1.4.2", - "test-exclude": "^5.0.0", - "uuid": "^3.3.2", - "yargs": "11.1.0", - "yargs-parser": "^9.0.2" - }, - "dependencies": { - "align-text": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" - } - }, - "amdefine": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "append-transform": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "default-require-extensions": "^2.0.0" - } - }, - "archy": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "arrify": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "async": { - "version": "1.5.2", - "bundled": true, - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "builtin-modules": { - "version": "1.1.1", - "bundled": true, - "dev": true - }, - "caching-transform": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "make-dir": "^1.0.0", - "md5-hex": "^2.0.0", - "package-hash": "^2.0.0", - "write-file-atomic": "^2.0.0" - } - }, - "camelcase": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true - }, - "center-align": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - } - }, - "cliui": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "commondir": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "convert-source-map": { - "version": "1.6.0", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "cross-spawn": { - "version": "4.0.2", - "bundled": true, - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" - } - }, - "debug": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "debug-log": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "decamelize": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "default-require-extensions": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "strip-bom": "^3.0.0" - } - }, - "error-ex": { - "version": "1.3.2", - "bundled": true, - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es6-error": { - "version": "4.1.1", - "bundled": true, - "dev": true - }, - "execa": { - "version": "0.7.0", - "bundled": true, - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "bundled": true, - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - } - } - }, - "find-cache-dir": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^3.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "foreground-child": { - "version": "1.5.6", - "bundled": true, - "dev": true, - "requires": { - "cross-spawn": "^4", - "signal-exit": "^3.0.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "get-caller-file": { - "version": "1.0.3", - "bundled": true, - "dev": true - }, - "get-stream": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "glob": { - "version": "7.1.3", - "bundled": true, - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true, - "dev": true - }, - "handlebars": { - "version": "4.0.11", - "bundled": true, - "dev": true, - "requires": { - "async": "^1.4.0", - "optimist": "^0.6.1", - "source-map": "^0.4.4", - "uglify-js": "^2.6" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "bundled": true, - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "has-flag": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "hosted-git-info": { - "version": "2.7.1", - "bundled": true, - "dev": true - }, - "imurmurhash": { - "version": "0.1.4", - "bundled": true, - "dev": true - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "invert-kv": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "is-arrayish": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "is-buffer": { - "version": "1.1.6", - "bundled": true, - "dev": true - }, - "is-builtin-module": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "isexe": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "istanbul-lib-coverage": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, - "istanbul-lib-hook": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "append-transform": "^1.0.0" - } - }, - "istanbul-lib-report": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "istanbul-lib-coverage": "^2.0.1", - "make-dir": "^1.3.0", - "supports-color": "^5.4.0" - } - }, - "istanbul-lib-source-maps": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "debug": "^3.1.0", - "istanbul-lib-coverage": "^2.0.1", - "make-dir": "^1.3.0", - "rimraf": "^2.6.2", - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "bundled": true, - "dev": true - } - } - }, - "istanbul-reports": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "handlebars": "^4.0.11" - } - }, - "json-parse-better-errors": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "lazy-cache": { - "version": "1.0.4", - "bundled": true, - "dev": true, - "optional": true - }, - "lcid": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "load-json-file": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash.flattendeep": { - "version": "4.4.0", - "bundled": true, - "dev": true - }, - "longest": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "lru-cache": { - "version": "4.1.3", - "bundled": true, - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "make-dir": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "md5-hex": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "md5-o-matic": "^0.1.1" - } - }, - "md5-o-matic": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "mem": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "merge-source-map": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "bundled": true, - "dev": true - } - } - }, - "mimic-fn": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.10", - "bundled": true, - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - } - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "normalize-package-data": { - "version": "2.4.0", - "bundled": true, - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "npm-run-path": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "optimist": { - "version": "0.6.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "os-locale": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" - } - }, - "p-finally": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "p-limit": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "package-hash": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "lodash.flattendeep": "^4.4.0", - "md5-hex": "^2.0.0", - "release-zalgo": "^1.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-exists": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "path-key": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, - "path-type": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "pkg-dir": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "find-up": "^3.0.0" - } - }, - "pseudomap": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "read-pkg": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "read-pkg-up": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "find-up": "^3.0.0", - "read-pkg": "^3.0.0" - } - }, - "release-zalgo": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "es6-error": "^4.0.1" - } - }, - "repeat-string": { - "version": "1.6.1", - "bundled": true, - "dev": true - }, - "require-directory": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "resolve-from": { - "version": "4.0.0", - "bundled": true, - "dev": true - }, - "right-align": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.1" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "dev": true, - "requires": { - "glob": "^7.0.5" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true - }, - "semver": { - "version": "5.5.0", - "bundled": true, - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "shebang-command": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true - }, - "source-map": { - "version": "0.5.7", - "bundled": true, - "dev": true, - "optional": true - }, - "spawn-wrap": { - "version": "1.4.2", - "bundled": true, - "dev": true, - "requires": { - "foreground-child": "^1.5.6", - "mkdirp": "^0.5.0", - "os-homedir": "^1.0.1", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.2", - "which": "^1.3.0" - } - }, - "spdx-correct": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.1.0", - "bundled": true, - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "string-width": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "strip-eof": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "supports-color": { - "version": "5.4.0", - "bundled": true, - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "test-exclude": { - "version": "5.0.0", - "bundled": true, - "dev": true, - "requires": { - "arrify": "^1.0.1", - "minimatch": "^3.0.4", - "read-pkg-up": "^4.0.0", - "require-main-filename": "^1.0.1" - } - }, - "uglify-js": { - "version": "2.8.29", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" - }, - "dependencies": { - "yargs": { - "version": "3.10.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" - } - } - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "uuid": { - "version": "3.3.2", - "bundled": true, - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "which": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "window-size": { - "version": "0.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "wordwrap": { - "version": "0.0.3", - "bundled": true, - "dev": true - }, - "wrap-ansi": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" } }, - "wrappy": { - "version": "1.0.2", - "bundled": true, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", "dev": true }, - "write-file-atomic": { - "version": "2.3.0", - "bundled": true, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "dev": true, "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" + "graceful-fs": "^4.1.6" } }, - "y18n": { - "version": "3.2.1", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "2.1.2", - "bundled": true, + "validator": { + "version": "9.4.1", + "resolved": "http://registry.npmjs.org/validator/-/validator-9.4.1.tgz", + "integrity": "sha512-YV5KjzvRmSyJ1ee/Dm5UED0G+1L4GZnLN3w6/T+zZm8scVua4sOhYKWTUrKa0H/tMiJyO9QLHMPN+9mB/aMunA==", "dev": true }, "yargs": { - "version": "11.1.0", - "bundled": true, + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-10.1.2.tgz", + "integrity": "sha512-ivSoxqBGYOqQVruxD35+EyCFDYNEFL/Uo6FcOnz+9xZdZzK0Zzw4r4KhbrME1Oo2gOggwJod2MnsdamSG7H9ig==", "dev": true, "requires": { "cliui": "^4.0.0", @@ -4798,76 +3622,150 @@ "string-width": "^2.0.0", "which-module": "^2.0.0", "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" - }, - "dependencies": { - "cliui": { - "version": "4.1.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "bundled": true, - "dev": true - } - } - }, - "yargs-parser": { - "version": "9.0.2", - "bundled": true, - "dev": true, - "requires": { - "camelcase": "^4.1.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "bundled": true, - "dev": true - } + "yargs-parser": "^8.1.0" } } } }, + "moment": { + "version": "2.22.2", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz", + "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=" + }, + "moment-timezone": { + "version": "0.5.23", + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.23.tgz", + "integrity": "sha512-WHFH85DkCfiNMDX5D3X7hpNH3/PUhjTGcD0U1SgfBGZxJ3qUmJh5FdvaFjcClxOvB3rzdfj4oRffbI38jEnC1w==", + "requires": { + "moment": ">= 2.9.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "multiparty": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/multiparty/-/multiparty-4.1.3.tgz", + "integrity": "sha1-PEPH/LGJbhdGBDap3Qtu8WaOT5Q=", + "requires": { + "fd-slicer": "~1.0.1" + } + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" + }, + "mysql": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.15.0.tgz", + "integrity": "sha512-C7tjzWtbN5nzkLIV+E8Crnl9bFyc7d3XJcBAvHKEVkjrYjogz3llo22q6s/hw+UcsE4/844pDob9ac+3dVjQSA==", + "requires": { + "bignumber.js": "4.0.4", + "readable-stream": "2.3.3", + "safe-buffer": "5.1.1", + "sqlstring": "2.3.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + } + } + }, + "natives": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.6.tgz", + "integrity": "sha512-6+TDFewD4yxY14ptjKaS63GVdtKiES1pTPyxn9Jb0rBqPMZ7VcCiooEhPNsr+mqHtMGxa/5c/HhcC4uPEUw/nA==" + }, + "ncp": { + "version": "0.4.2", + "resolved": "http://registry.npmjs.org/ncp/-/ncp-0.4.2.tgz", + "integrity": "sha1-q8xsvT7C7Spyn/bnwfqPAXhKhXQ=" + }, + "nedb": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/nedb/-/nedb-1.8.0.tgz", + "integrity": "sha1-DjUCzYLABNU1WkPJ5VV3vXvZHYg=", + "requires": { + "async": "0.2.10", + "binary-search-tree": "0.2.5", + "localforage": "^1.3.0", + "mkdirp": "~0.5.1", + "underscore": "~1.4.4" + }, + "dependencies": { + "async": { + "version": "0.2.10", + "resolved": "http://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=" + } + } + }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" + }, + "node-schedule": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/node-schedule/-/node-schedule-1.3.1.tgz", + "integrity": "sha512-cdNNePwKoisAi4DT00BB11H6IJ/WtA603YZ7+tLJcb/zCmCSxYKcvc+/GTyxC46jN/0ft7741vmMQrvxP8Sd+A==", + "requires": { + "cron-parser": "^2.7.3", + "long-timeout": "0.1.1", + "sorted-array-functions": "^1.0.0" + } + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "requires": { + "abbrev": "1" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "notepack.io": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/notepack.io/-/notepack.io-2.1.3.tgz", + "integrity": "sha512-AgSt+cP5XMooho1Ppn8NB3FFaVWefV+qZoZncYTUSch2GAEwlYLcIIbT5YVkMlFeNHnfwOvc4HDlbvrB5BRxXA==" + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, "oauth": { "version": "0.9.15", "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz", @@ -4947,6 +3845,46 @@ "request": "^2.61.0" } }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + }, + "dependencies": { + "minimist": { + "version": "0.0.10", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", + "dev": true + } + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + }, + "dependencies": { + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + } + } + }, "os-homedir": { "version": "1.0.2", "resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", @@ -5207,6 +4145,12 @@ "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz", "integrity": "sha1-0aIUg/0iu0HlihL6NCGCMUCJfEU=" }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, "preserve": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", @@ -9922,10 +8866,14 @@ "integrity": "sha512-sWpjPhIZJtqO77GN+LD8dDsDKcWZ9GCOJNqKzi1tvtjGIzwfoyuRH8S0psunmc6Z5P+qfDqztSbwYR5X/e1UTg==" }, "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true + "version": "0.2.0", + "resolved": "http://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", + "dev": true, + "optional": true, + "requires": { + "amdefine": ">=0.0.4" + } }, "spdx-correct": { "version": "3.1.0", @@ -10235,12 +9183,6 @@ "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=" }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - }, "tough-cookie": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", @@ -10267,12 +9209,6 @@ "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=" }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true - }, "tsscmp": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.6.tgz", @@ -10291,6 +9227,15 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.0.tgz", "integrity": "sha1-cT2LgY2kIGh0C/aDhtBHnmb8ins=" }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, "type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -10306,6 +9251,33 @@ "mime-types": "~2.1.18" } }, + "uglify-js": { + "version": "3.4.9", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz", + "integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==", + "dev": true, + "optional": true, + "requires": { + "commander": "~2.17.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "commander": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", + "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", + "dev": true, + "optional": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true + } + } + }, "uid-safe": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", diff --git a/package.json b/package.json index 98e9cdc69..0ef64e438 100644 --- a/package.json +++ b/package.json @@ -40,15 +40,16 @@ }, "scripts": { "start": "npm run build-docs && node app.js --prod", - "test": "./node_modules/.bin/nyc --reporter=html --report-dir=./test/output/coverage mocha test/lifecycle.test.js ./test/**/*.test.js --reporter mochawesome --reporter-options reportDir=./test/output/mochawesome --exit", + "test": "node node_modules/mocha/bin/_mocha --reporter mochawesome --reporter-options reportDir=./test/output/mochawesome --exit", "build-docs": "./node_modules/.bin/jsdoc -c ./.jsdoc.json", "dev": "nodemon", - "debug": "node debug app.js" + "debug": "node debug app.js", + "coverage": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec --exit" }, "main": "app.js", "repository": { "type": "git", - "url": "git://github.com/niek/bill-sails.git" + "url": "git://github.com/CatalysmsServerManager/7-days-to-die-server-manager.git" }, "author": "Catalysm", "license": "", @@ -58,11 +59,14 @@ "devDependencies": { "chai": "^4.2.0", "chai-as-promised": "^7.1.1", + "coveralls": "^3.0.2", + "faker": "^4.1.0", "grunt-bower-task": "^0.5.0", + "istanbul": "^0.4.5", "mocha": "^5.2.0", "mocha-junit-reporter": "^1.18.0", + "mocha-lcov-reporter": "^1.3.0", "mochawesome": "^3.1.1", - "nyc": "^13.1.0", "supertest": "^3.3.0" } } diff --git a/test/integration/cron-job/cron.test.js b/test/integration/cron-job/cron.test.js index 3054669d0..56ebf6a02 100644 --- a/test/integration/cron-job/cron.test.js +++ b/test/integration/cron-job/cron.test.js @@ -1,8 +1,6 @@ var supertest = require('supertest'); var expect = require("chai").expect; - - describe('POST /api/sdtdserver/cron', function () { it('should return 200 with valid info', function (done) { diff --git a/test/integration/roles/update-role.test.js b/test/integration/roles/update-role.test.js new file mode 100644 index 000000000..d1d17b687 --- /dev/null +++ b/test/integration/roles/update-role.test.js @@ -0,0 +1,102 @@ +const supertest = require('supertest'); +const chai = require('chai'); +const expect = chai.expect; +const faker = require('faker'); + +const permissionFields = ["manageServer", "manageEconomy", "managePlayers", "manageTickets", "viewAnalytics", "viewDashboard", "useTracking", "useChat", "useCommands", "manageGbl", "discordExec", "discordLookup"]; +const testRoles = []; + +chai.config.truncateThreshold = 0; + +describe('PATCH /api/role', function () { + + beforeEach(async function () { + // Create some default roles + let createdRole = await Role.create({ + server: sails.testServer.id, + name: "Admin", + level: "1", + manageServer: true + }).fetch(); + testRoles.push(createdRole); + + createdRole = await Role.create({ + server: sails.testServer.id, + name: "Player", + level: "2000", + amountOfTeleports: 2 + }).fetch(); + testRoles.push(createdRole); + + await Promise.all(testRoles); + return; + + }); + + afterEach(async function () { + await Role.destroy({ + id: testRoles.map(r => r.id) + }); + testRoles.length = 0; + }); + + it('should return 200 with valid info', async function () { + + let promises = permissionFields.map(async function (field) { + + let data = { + roleId: testRoles[0].id + }; + data[field] = faker.random.boolean(); + + return supertest(sails.hooks.http.app) + .patch('/api/role') + .send(data) + .expect(200) + .then(async function (response) { + const newRole = await Role.findOne({ + id: response.body.id + }); + expect(newRole[field]).to.deep.eq(data[field]); + }); + }); + return Promise.all(promises); + + }); + + it('should return 400 when no roleId is given', function (done) { + supertest(sails.hooks.http.app) + .patch('/api/role') + .expect(400, done); + }); + + it('should change default role if one already exists', async function () { + + createdRole = await Role.create({ + server: sails.testServer.id, + name: "Default", + level: "5000", + isDefault: true + }).fetch(); + testRoles.push(createdRole); + + return supertest(sails.hooks.http.app) + .patch('/api/role') + .send({ + roleId: testRoles[0].id, + isDefault: true, + }) + .expect(200) + .then(async function (response) { + const oldDefault = await Role.findOne({ + id: createdRole.id + }); + expect(oldDefault.isDefault).to.be.deep.eq(false); + const newDefault = await Role.findOne({ + id: testRoles[0].id + }); + expect(newDefault.isDefault).to.deep.eq(true); + }); + }); + +}); diff --git a/test/lifecycle.test.js b/test/lifecycle.test.js index 68009d0f7..e95fb8aaa 100644 --- a/test/lifecycle.test.js +++ b/test/lifecycle.test.js @@ -1,5 +1,7 @@ var sails = require('sails'); +const faker = require('faker'); +process.env.IS_TEST = true; // Before running any tests... before(function (done) { @@ -33,22 +35,30 @@ before(function (done) { } let testUser = await User.create({ - steamId: 'fake_id', - username: 'test_user' + steamId: faker.random.number(0), + username: faker.internet.userName() }).fetch(); let testServer = await SdtdServer.create({ - name: 'test server', + name: faker.company.companyName(), ip: 'localhost', webPort: '8082', - authName: 'test_authName', - authToken: 'test_authToken', + authName: faker.random.alphaNumeric(20), + authToken: faker.random.alphaNumeric(20), owner: testUser.id }).fetch(); + let testPlayer = await Player.create({ + steamId: testUser.steamId, + server: testServer.id, + user: testUser.id, + name: faker.internet.userName(), + }).fetch(); + sails.testUser = testUser; sails.testServer = testServer; + sails.testPlayer = testPlayer; return done(); }); diff --git a/test/mocha.opts b/test/mocha.opts new file mode 100644 index 000000000..f98764d8a --- /dev/null +++ b/test/mocha.opts @@ -0,0 +1,2 @@ +test/lifecycle.test.js +test/**/*.test.js \ No newline at end of file diff --git a/test/unit/helpers/roles/check-permission.test.js b/test/unit/helpers/roles/check-permission.test.js new file mode 100644 index 000000000..469873cd7 --- /dev/null +++ b/test/unit/helpers/roles/check-permission.test.js @@ -0,0 +1,193 @@ +const chai = require('chai'); +const expect = chai.expect; +const faker = require('faker'); +const permissionFields = ["manageServer", "manageEconomy", "managePlayers", "manageTickets", "viewAnalytics", "viewDashboard", "useTracking", "useChat", "useCommands", "manageGbl", "discordExec", "discordLookup"]; + +const testRoles = []; +const testPlayers = []; + +chai.config.truncateThreshold = 0; + + +describe('HELPER roles/check-permission', () => { + beforeEach(async function () { + // Create some default roles + let createdRole = await Role.create({ + server: sails.testServer.id, + name: "Admin", + level: "1", + manageServer: true + }).fetch(); + testRoles.push(createdRole); + + createdRole = await Role.create({ + server: sails.testServer.id, + name: "Player", + level: "2000", + amountOfTeleports: 2 + }).fetch(); + testRoles.push(createdRole); + + createdRole = await Role.create({ + server: sails.testServer.id, + name: "Default", + level: "5000", + isDefault: true + }).fetch(); + testRoles.push(createdRole); + + await Promise.all(testRoles); + return; + + }); + + afterEach(async function () { + + await Player.destroy({ + id: testPlayers.map(p => p.id) + }); + await Role.destroy({ + id: testRoles.map(r => r.id) + }); + testPlayers.length = 0; + testRoles.length = 0; + }); + + it('Returns an object with attributes "hasPermission" and "role"', async function () { + let result = await sails.helpers.roles.checkPermission.with({ + userId: sails.testUser.id, + serverId: sails.testServer.id, + permission: 'manageServer' + }); + expect(result.hasPermission).to.be.an('boolean'); + expect(result.hasPermission).to.be.eq(true); + expect(result.role).to.be.an('object'); + return; + }); + + it(`Correctly checks if a user has the correct permission for the player role via user ID`, async function () { + let playerRole = testRoles.filter(r => r.name === "Player")[0]; + let player = await mockPlayer({ + roleId: playerRole.id + }); + let promises = permissionFields.map(async function (field) { + + let result = await sails.helpers.roles.checkPermission.with({ + userId: player.user, + serverId: sails.testServer.id, + permission: field + }); + + return expect(result.hasPermission).to.be.eq(false); + }); + return Promise.all(promises); + }); + + it(`Correctly checks if a user has the correct permission for the admin role via user ID`, async function () { + let playerRole = testRoles.filter(r => r.name === "Admin")[0]; + let player = await mockPlayer({ + roleId: playerRole.id + }); + let promises = permissionFields.map(async function (field) { + + let result = await sails.helpers.roles.checkPermission.with({ + userId: player.user, + serverId: sails.testServer.id, + permission: field + }); + return expect(result.hasPermission).to.be.eq(true); + }); + return Promise.all(promises); + }); + it(`Correctly checks if a user has the correct permission for the player role via player ID`, async function () { + let playerRole = testRoles.filter(r => r.name === "Player")[0]; + let player = await mockPlayer({ + roleId: playerRole.id + }); + let promises = permissionFields.map(async function (field) { + + let result = await sails.helpers.roles.checkPermission.with({ + serverId: sails.testServer.id, + playerId: player.id, + permission: field + }); + + return expect(result.hasPermission).to.be.eq(false); + }); + return Promise.all(promises); + }); + + it(`Correctly checks if a user has the correct permission for the admin role via user ID`, async function () { + let playerRole = testRoles.filter(r => r.name === "Admin")[0]; + let player = await mockPlayer({ + roleId: playerRole.id + }); + let promises = permissionFields.map(async function (field) { + + let result = await sails.helpers.roles.checkPermission.with({ + serverId: sails.testServer.id, + playerId: player.id, + permission: field + }); + + return expect(result.hasPermission).to.be.eq(true); + }); + return Promise.all(promises); + }); + + it(`Defaults to the highest level role if no default is set`, async function () { + const player = await mockPlayer({}); + const defaultRole = testRoles.filter(r => r.name === "Default")[0]; + await Role.destroy({id: defaultRole.id}); + const highestLevelRole = await Role.find({ + where: { + server: sails.testServer.id, + }, + sort: 'level DESC', + limit: 1 + }); + const result = await sails.helpers.roles.checkPermission.with({ + serverId: sails.testServer.id, + playerId: player.id, + permission: "manageServer" + }); + + expect(result.role).to.deep.eq(highestLevelRole[0]); + }); + + it('Defaults to the default role if one is set', async function () { + const player = await mockPlayer({}); + const defaultRole = testRoles.filter(r => r.name === "Default")[0]; + + const result = await sails.helpers.roles.checkPermission.with({ + serverId: sails.testServer.id, + playerId: player.id, + permission: "manageServer" + }); + + expect(result.role).to.deep.eq(defaultRole); + + }); +}); + +async function mockPlayer({ + roleId, + steamId, + userId, + serverId, +}) { + let createdUser = await User.create({ + steamId: faker.random.uuid(), + username: faker.internet.userName() + }).fetch(); + + let createdPlayer = await Player.create({ + steamId: steamId ? steamId : createdUser.steamId, + name: faker.internet.userName(), + server: serverId ? serverId : sails.testServer.id, + user: userId ? userId : createdUser.id, + role: roleId, + }).fetch(); + testPlayers.push(createdPlayer); + return createdPlayer; +} diff --git a/views/sdtdServer/partials/settings/roleSettings.ejs b/views/sdtdServer/partials/settings/roleSettings.ejs index 0851b3e31..24015eeac 100644 --- a/views/sdtdServer/partials/settings/roleSettings.ejs +++ b/views/sdtdServer/partials/settings/roleSettings.ejs @@ -92,7 +92,7 @@ - The name of the new role + The name of the role
    @@ -113,6 +113,13 @@ his discord profile to his csmm profile!
    +
    + +
    +
    { drawRolesTable(); @@ -394,7 +403,7 @@ $("#edit-role-manageGbl").prop('checked', currentRole.manageGbl); $("#edit-role-discordExec").prop('checked', currentRole.discordExec); $("#edit-role-discordLookup").prop('checked', currentRole.discordLookup); - + $("#edit-role-isDefault").prop('checked', currentRole.isDefault); }); }); diff --git a/views/sdtdServer/players.ejs b/views/sdtdServer/players.ejs index 8b664d229..e93ea4c31 100644 --- a/views/sdtdServer/players.ejs +++ b/views/sdtdServer/players.ejs @@ -97,7 +97,7 @@ data: 'role', render: function (data, type, row, meta) { if (_.isNull(data)) { - return 'None' + return 'None assigned' } else { return data.name }