UNPKG

entity-serves

Version:

Backend for entity.works, a Dead by Daylight wiki.

6 lines 37.6 kB
#!/usr/bin/env node /*! *** EntityServes 3.10.0 *** Copyright © 2020, Jaid <jaid.jsx@gmail.com> (https://github.com/Jaid) *** @license MIT !*/!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=81)}([function(t,e){t.exports=require("sequelize")},function(t,e,r){"use strict";r.r(e),r.d(e,"schema",(function(){return a}));var n=r(0),o=r.n(n),i=r(8);class u extends o.a.Model{static associate(){}async createLogin(){return await i.default.create({UserId:this.id})}}const a={title:{type:o.a.STRING(64),allowNull:!1},name:{type:o.a.STRING(64),allowNull:!1,unique:!0},password:{type:o.a.CHAR(60),allowNull:!1}};e.default=u},function(t,e,r){"use strict";r.r(e),r.d(e,"schema",(function(){return l})),r.d(e,"modelOptions",(function(){return p}));var n=r(30),o=r.n(n),i=r(44),u=r(0),a=r.n(u),c=r(16),s=r(42);class f extends a.a.Model{static associate(t){f.belongsTo(t.User,{foreignKey:{allowNull:!1}})}static async addBuild(t,e,r){const n=c.a[t](r);return await f.create({type:t,UserId:e,data:n,seoLinkId:Object(i.paramCase)(r.title||Object(i.paramCase)(t))})}async applyEdit(t){const e=c.a[this.type](t);return!o()(this.data,e)&&(await s.default.create({BuildId:this.id,data:this.data}),await this.update({data:e}),!0)}}const l={type:{type:a.a.STRING(32),allowNull:!1},data:{type:a.a.JSONB,allowNull:!1},seoLinkId:a.a.STRING},p={paranoid:!0};e.default=f},function(t,e,r){var n=r(47),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();t.exports=i},function(t,e){var r=Array.isArray;t.exports=r},function(t,e){t.exports=require("has-content")},function(t,e,r){"use strict";r.d(e,"b",(function(){return c}));var n=r(9),o=r.n(n),i=r(75),u=r.n(i);const a=new o.a({name:"EntityServes",version:"3.10.0",insecurePort:13251,database:"entityServes",useGot:!0,databaseExtensions:"hstore",koaSession:{key:"abc"},configSetup:{defaults:u()}}),c=a.logger;a.got,a.config,a.appFolder,a.koa,e.a=a},function(t,e,r){var n=r(96),o=r(101);t.exports=function(t,e){var r=o(t,e);return n(r)?r:void 0}},function(t,e,r){"use strict";r.r(e),r.d(e,"schema",(function(){return u}));var n=r(0),o=r.n(n);class i extends o.a.Model{static associate(t){i.belongsTo(t.User,{foreignKey:{allowNull:!1}})}}const u={apiKey:{type:o.a.UUID,defaultValue:o.a.UUIDV4,allowNull:!1,unique:!0}};e.default=i},function(t,e){t.exports=require("jaid-core")},function(t,e,r){var n=r(58),o=r(150),i=r(176),u=r(181),a=i((function(t,e){if(null==t)return[];var r=e.length;return r>1&&u(t,e[0],e[1])?e=[]:r>2&&u(e[0],e[1],e[2])&&(e=[e[0]]),o(t,n(e,1),[])}));t.exports=a},function(t,e,r){var n=r(12),o=r(97),i=r(98),u=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":u&&u in Object(t)?o(t):i(t)}},function(t,e,r){var n=r(3).Symbol;t.exports=n},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,r){var n=r(27);t.exports=function(t){if("string"==typeof t||n(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},function(t,e,r){"use strict";var n=r(17),o=r.n(n),i=r(10),u=r.n(i),a=r(18),c=r.n(a),s=r(5),f=r.n(s);function l(t,e){f()(t.title)&&(e.title=t.title.trim()),f()(t.description)&&(e.description=t.description.trim())}e.a={survivorLoadout(t){const e={},r=[t.perk1,t.perk2,t.perk3,t.perk4],n=u()(o()(c()(r)));for(let t=0;4!==t;t++)n.length>t&&(e[`perk${t+1}`]=n[t].trim());if(f()(t.offering)&&(e.offering=t.offering.trim()),f()(t.survivor)&&(e.survivor=t.survivor.trim()),f()(t.item)){e.item=t.item.trim();const r=[t.addOn1,t.addOn2],n=u()(o()(c()(r)));for(let t=0;2!==t;t++)n.length>t&&(e[`addOn${t+1}`]=n[t].trim())}return l(t,e),e},killerLoadout(t){const e={},r=[t.perk1,t.perk2,t.perk3,t.perk4],n=u()(o()(c()(r)));for(let t=0;4!==t;t++)n.length>t&&(e[`perk${t+1}`]=n[t].trim());if(f()(t.offering)&&(e.offering=t.offering.trim()),f()(t.killer)){e.killer=t.killer.trim();const r=[t.addOn1,t.addOn2],n=u()(o()(c()(r)));for(let t=0;2!==t;t++)n.length>t&&(e[`addOn${t+1}`]=n[t].trim())}return l(t,e),e},killerTierList(t){const e={tiers:{}};l(t,e);const r=u()(Object.keys(t.tiers));for(const n of r){const r=n.trim(),o=t.tiers[n].tier;o&&"unrated"!==o&&(e.tiers[r]={tier:o},f()(t.tiers[n].comment)&&(e.tiers[r].comment=t.tiers[n].comment.trim()))}return e}}},function(t,e,r){var n=r(140);t.exports=function(t){return t&&t.length?n(t):[]}},function(t,e){t.exports=require("filter-nil")},function(t,e,r){var n=r(86),o=r(87),i=r(88),u=r(89),a=r(90);function c(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=u,c.prototype.set=a,t.exports=c},function(t,e,r){var n=r(21);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,r){var n=r(7)(Object,"create");t.exports=n},function(t,e,r){var n=r(110);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},function(t,e){var r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&r.test(t))&&t>-1&&t%1==0&&e>t}},function(t,e,r){var n=r(46),o=r(39);t.exports=function(t){return null!=t&&o(t.length)&&!n(t)}},function(t,e,r){var n=r(4),o=r(41),i=r(157),u=r(160);t.exports=function(t,e){return n(t)?t:o(t,e)?[t]:i(u(t))}},function(t,e,r){var n=r(11),o=r(14);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==n(t)}},function(t,e){t.exports=function(t){return t}},function(t,e,r){"use strict";r.r(e),r(191);var n=r(0),o=r(2),i=r(1);function u(t){const e={};return t.type&&(e.type=t.type),"perk"===t.filterType&&(e[n.Op.or]=[1,2,3,4].map(e=>({data:{[`perk${e}`]:t.value}}))),"killer"===t.filterType&&(e.data={killer:t.value}),"survivor"===t.filterType&&(e.data={survivor:t.value}),"addOn"===t.filterType&&(e[n.Op.or]=[1,2].map(e=>({data:{[`addOn${e}`]:t.value}}))),"userId"===t.filterType&&(e.UserId=t.value),e}function a(t){return"latest"===t?[["id","DESC"]]:"updated"===t?[["updatedAt","DESC"]]:[["id","DESC"]]}function c(t){return t||["id","UserId","data","type","createdAt","updatedAt"]}function s(t){return t?{model:i.default,attributes:t.userAttributes}:{model:i.default,attributes:["name","title"]}}function f(t){return t||10}e.default=async(t,e)=>{const r=await o.default.findAndCountAll({where:u(e),limit:f(e.limit),attributes:c(e.attributes),raw:!0,order:a(e.order),include:[s(e.userAttributes)]});for(const e of r.rows)e.UserId===t.client.userId&&(e.editable=!0);return r}},function(t,e,r){var n=r(33);t.exports=function(t,e){return n(t,e)}},function(t,e,r){var n=r(184),o=r(189)((function(t,e){return null==t?{}:n(t,e)}));t.exports=o},function(t,e){t.exports=require("bcrypt")},function(t,e,r){var n=r(85),o=r(14);t.exports=function t(e,r,i,u,a){return e===r||(null==e||null==r||!o(e)&&!o(r)?e!=e&&r!=r:n(e,r,i,u,t,a))}},function(t,e,r){var n=r(7)(r(3),"Map");t.exports=n},function(t,e,r){var n=r(102),o=r(109),i=r(111),u=r(112),a=r(113);function c(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=u,c.prototype.set=a,t.exports=c},function(t,e){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}},function(t,e,r){var n=r(126),o=r(132),i=r(25);t.exports=function(t){return i(t)?n(t):o(t)}},function(t,e,r){var n=r(128),o=r(14),i=Object.prototype,u=i.hasOwnProperty,a=i.propertyIsEnumerable,c=n(function(){return arguments}())?n:function(t){return o(t)&&u.call(t,"callee")&&!a.call(t,"callee")};t.exports=c},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&9007199254740991>=t}},function(t,e,r){var n=r(26),o=r(15);t.exports=function(t,e){for(var r=0,i=(e=n(e,t)).length;null!=t&&i>r;)t=t[o(e[r++])];return r&&r==i?t:void 0}},function(t,e,r){var n=r(4),o=r(27),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/;t.exports=function(t,e){if(n(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!o(t))||u.test(t)||!i.test(t)||null!=e&&t in Object(e)}},function(t,e,r){"use strict";r.r(e),r.d(e,"schema",(function(){return u})),r.d(e,"modelOptions",(function(){return a}));var n=r(0),o=r.n(n);class i extends o.a.Model{static associate(t){i.belongsTo(t.Build,{foreignKey:{allowNull:!1}})}}const u={data:{type:o.a.JSONB,allowNull:!1}},a={updatedAt:!1};e.default=i},function(t,e,r){"use strict";r.r(e),r.d(e,"schema",(function(){return a}));var n=r(0),o=r.n(n),i=r(8);class u extends o.a.Model{static associate(t){u.belongsTo(t.User)}async createLogin(){return await i.default.create({UserId:this.id})}}const a={type:{type:o.a.STRING(64),allowNull:!1},payload:o.a.JSONB,time:{type:o.a.INTEGER,allowNull:!1},result:o.a.JSONB};e.default=u},function(t,e){t.exports=require("param-case")},function(t,e,r){var n=r(19),o=r(91),i=r(92),u=r(93),a=r(94),c=r(95);function s(t){var e=this.__data__=new n(t);this.size=e.size}s.prototype.clear=o,s.prototype.delete=i,s.prototype.get=u,s.prototype.has=a,s.prototype.set=c,t.exports=s},function(t,e,r){var n=r(11),o=r(13);t.exports=function(t){if(!o(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e){var r="object"==typeof global&&global&&global.Object===Object&&global;t.exports=r},function(t,e){var r=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return r.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,r){var n=r(50),o=r(116),i=r(51);t.exports=function(t,e,r,u,a,c){var s=1&r,f=t.length,l=e.length;if(!(f==l||s&&l>f))return!1;var p=c.get(t);if(p&&c.get(e))return p==e;var d=-1,v=!0,h=2&r?new n:void 0;for(c.set(t,e),c.set(e,t);++d<f;){var y=t[d],b=e[d];if(u)var x=s?u(b,y,d,e,t,c):u(y,b,d,t,e,c);if(void 0!==x){if(x)continue;v=!1;break}if(h){if(!o(e,(function(t,e){if(!i(h,e)&&(y===t||a(y,t,r,u,c)))return h.push(e)}))){v=!1;break}}else if(y!==b&&!a(y,b,r,u,c)){v=!1;break}}return c.delete(t),c.delete(e),v}},function(t,e,r){var n=r(35),o=r(114),i=r(115);function u(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new n;++e<r;)this.add(t[e])}u.prototype.add=u.prototype.push=o,u.prototype.has=i,t.exports=u},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e){t.exports=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}},function(t,e,r){(function(t){var n=r(3),o=r(129),i=e&&!e.nodeType&&e,u=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=u&&u.exports===i?n.Buffer:void 0,c=(a?a.isBuffer:void 0)||o;t.exports=c}).call(this,r(54)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){var n=r(130),o=r(56),i=r(131),u=i&&i.isTypedArray,a=u?o(u):n;t.exports=a},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,r){var n=r(7)(r(3),"Set");t.exports=n},function(t,e,r){var n=r(52),o=r(149);t.exports=function t(e,r,i,u,a){var c=-1,s=e.length;for(i||(i=o),a||(a=[]);++c<s;){var f=e[c];r>0&&i(f)?r>1?t(f,r-1,i,u,a):n(a,f):u||(a[a.length]=f)}return a}},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}},function(t,e,r){var n=r(13);t.exports=function(t){return t==t&&!n(t)}},function(t,e){t.exports=function(t,e){return function(r){return null!=r&&r[t]===e&&(void 0!==e||t in Object(r))}}},function(t,e,r){var n=r(162),o=r(163);t.exports=function(t,e){return null!=t&&o(t,e,n)}},function(t,e,r){var n=r(177),o=Math.max;t.exports=function(t,e,r){return e=o(void 0===e?t.length-1:e,0),function(){for(var i=arguments,u=-1,a=o(i.length-e,0),c=Array(a);++u<a;)c[u]=i[e+u];u=-1;for(var s=Array(e+1);++u<e;)s[u]=i[u];return s[e]=r(c),n(t,this,s)}}},function(t,e,r){var n=r(178),o=r(180)(n);t.exports=o},function(t,e,r){var n=r(7),o=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,e,r){"use strict";r.r(e);var n=r(31),o=r.n(n),i=r(2),u=r(1);e.default=async(t,e)=>{if(!t.userId)return t.client.emit("toast","Not logged in!"),{error:"Not logged in!"};const r=await u.default.findByPk(t.userId),n=await i.default.addBuild(e.formType,r.id,e.formData);return t.client.emit("toast","Your build has been published"),o()(n,["id","seoLinkId"])}},function(t,e,r){"use strict";r.r(e);var n=r(31),o=r.n(n),i=r(2);e.default=async(t,e)=>{if(!e.id)return t.client.emit("toast","ID not given"),{error:"ID not given"};const r=await i.default.findByPk(e.id);return r.UserId!==t.userId?(t.client.emit("toast","You are not allowed to edit this build"),{error:"You are not allowed to edit this build"}):await r.applyEdit(e.formData)?(t.client.emit("toast","Your changes have been published"),o()(r,["id","seoLinkId"])):(t.client.emit("toast","Unchanged"),{error:"Unchanged",unchanged:!0})}},function(t,e,r){"use strict";r.r(e),e.default=()=>({version:"3.10.0"})},function(t,e,r){"use strict";r.r(e);var n=r(2),o=r(1);e.default=async(t,e)=>{const r=await n.default.findByPk(+e,{attributes:["id","UserId","data","type","createdAt","updatedAt"],include:[{model:o.default,attributes:["name","title"]}],raw:!0});return r?(r.UserId===t.client.userId&&(r.editable=!0),r):null}},function(t,e,r){"use strict";r.r(e);var n=r(0),o=r.n(n),i=r(2);e.default=async()=>{const t=await i.default.findAll({attributes:["type",[o.a.fn("COUNT","id"),"count"]],group:["type"],raw:!0});return Object.values(t)}},function(t,e,r){"use strict";r.r(e),r(2);var n=r(1),o=r(29);e.default=async(t,e)=>{const r=e.toLowerCase(),i=await n.default.findOne({where:{name:r},attributes:["id","title","name","createdAt"],raw:!0});return i?{user:i,latestBuilds:await Object(o.default)(t,{filterType:"userId",value:i.id})}:null}},function(t,e,r){"use strict";r.r(e);var n=r(32),o=r.n(n),i=r(1);e.default=async(t,e)=>{const r=e.user.toLowerCase(),n=await i.default.findOne({where:{name:r}});if(!n)return t.client.emit("toast","User not found!"),{error:"User not found!"};if(!await o.a.compare(e.password,n.password))return t.client.emit("toast","Incorrect password!"),{error:"Incorrect password!"};const u=await n.createLogin();return t.client.apiKey=u.apiKey,t.client.userId=n.id,t.client.emit("toast",`Hello, ${n.title}!`),{title:n.title,name:n.name,key:u.apiKey}}},function(t,e,r){"use strict";r.r(e);var n=r(32),o=r.n(n),i=r(1);e.default=async(t,e)=>{const r=e.user.toLowerCase(),n=await i.default.findOne({where:{name:r}});if(n)return t.client.emit("toast",`${n.title} already exists`),{error:"Already exists!"};const u=await o.a.hash(e.password,5),a=await i.default.create({title:e.user,name:r,password:u}),c=await a.createLogin();return t.client.apiKey=c.apiKey,t.client.userId=a.id,t.client.emit("toast",`Welcome, ${a.title}!`),{title:a.title,name:a.name,key:c.apiKey}}},function(t,e){t.exports=require("yargs")},function(t,e){t.exports={twitchClientCallbackUrl:"https://server.preis.farm/auth/twitch/callback",loginRedirectUrl:"https://preis.farm",frontendHost:"entity.works"}},function(t,e){t.exports=require("jaid-core-dashboard")},function(t,e){t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},function(t,e){t.exports=require("cookie")},function(t,e){t.exports=require("socket.io")},function(t,e){t.exports=require("socket-enhance")},function(t,e,r){"use strict";r.r(e);var n=r(74),o=r.n(n),i=r(6);function u(t){var e;(null===i.a||void 0===i.a||null===(e=i.a.logger)||void 0===e?void 0:e.error)?i.a.logger.error(t):console.error(t)}process.on("unhandledRejection",t=>{u(t?`Unhandled promise rejection: ${(null==t?void 0:t.message)||t}`:"Unhandled promise rejection"),(null==t?void 0:t.stack)&&u(t.stack)}),o.a.scriptName("entity-serves").version("3.10.0").command("$0","Backend for entity.works, a Dead by Daylight wiki.",{},(function(){(async function(){const t={},e=r(82);for(const r of e.keys()){const{pluginName:n}=r.match(/[/\\](?<pluginName>.+?)[/\\]index\.js$/).groups;t[n]=e(r).default}await i.a.init(t)})().catch(t=>{u("Core process crashed"),u(t),process.exit(1)})})).argv},function(t,e,r){var n={"./dashboard/index.js":83,"./main/index.js":84,"./socketServer/index.js":192};function o(t){var e=i(t);return r(e)}function i(t){if(!r.o(n,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return n[t]}o.keys=function(){return Object.keys(n)},o.resolve=i,t.exports=o,o.id=82},function(t,e,r){"use strict";r.r(e);var n=r(76),o=r.n(n);e.default=new o.a},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return c}));var n=r(30),o=r.n(n),i=r(9),u=r(16),a=r(2);class c extends i.JaidCorePlugin{async normalizeBuilds(){const t=await a.default.findAll({attributes:["id","data","type"]});for(const e of t){const t=u.a[e.type](e.data);o()(e.data,t)||(await e.update({data:t},{silent:!0}),this.log(`Build #${e.id} has been normalized`))}}async ready(){await this.normalizeBuilds()}collectModels(){const t={},e=r(182);for(const r of e.keys())t[r.match(/\.\/(?<key>[\da-z]+)\./i).groups.key]=e(r);return t}}},function(t,e,r){var n=r(45),o=r(49),i=r(117),u=r(120),a=r(136),c=r(4),s=r(53),f=r(55),l="[object Object]",p=Object.prototype.hasOwnProperty;t.exports=function(t,e,r,d,v,h){var y=c(t),b=c(e),x=y?"[object Array]":a(t),g=b?"[object Array]":a(e),_=(x="[object Arguments]"==x?l:x)==l,j=(g="[object Arguments]"==g?l:g)==l,m=x==g;if(m&&s(t)){if(!s(e))return!1;y=!0,_=!1}if(m&&!_)return h||(h=new n),y||f(t)?o(t,e,r,d,v,h):i(t,e,x,r,d,v,h);if(!(1&r)){var w=_&&p.call(t,"__wrapped__"),O=j&&p.call(e,"__wrapped__");if(w||O){var k=w?t.value():t,I=O?e.value():e;return h||(h=new n),v(k,I,r,d,h)}}return!!m&&(h||(h=new n),u(t,e,r,d,v,h))}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,r){var n=r(20),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return r>=0&&(r==e.length-1?e.pop():o.call(e,r,1),--this.size,!0)}},function(t,e,r){var n=r(20);t.exports=function(t){var e=this.__data__,r=n(e,t);return 0>r?void 0:e[r][1]}},function(t,e,r){var n=r(20);t.exports=function(t){return n(this.__data__,t)>-1}},function(t,e,r){var n=r(20);t.exports=function(t,e){var r=this.__data__,o=n(r,t);return 0>o?(++this.size,r.push([t,e])):r[o][1]=e,this}},function(t,e,r){var n=r(19);t.exports=function(){this.__data__=new n,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,r){var n=r(19),o=r(34),i=r(35);t.exports=function(t,e){var r=this.__data__;if(r instanceof n){var u=r.__data__;if(!o||199>u.length)return u.push([t,e]),this.size=++r.size,this;r=this.__data__=new i(u)}return r.set(t,e),this.size=r.size,this}},function(t,e,r){var n=r(46),o=r(99),i=r(13),u=r(48),a=Function.prototype,c=Object.prototype,s=a.toString,f=c.hasOwnProperty,l=RegExp("^"+s.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(n(t)?l:/^\[object .+?Constructor\]$/).test(u(t))}},function(t,e,r){var n=r(12),o=Object.prototype,i=o.hasOwnProperty,u=o.toString,a=n?n.toStringTag:void 0;t.exports=function(t){var e=i.call(t,a),r=t[a];try{t[a]=void 0;var n=!0}catch(t){}var o=u.call(t);return n&&(e?t[a]=r:delete t[a]),o}},function(t,e){var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},function(t,e,r){var n,o=r(100),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!i&&i in t}},function(t,e,r){var n=r(3)["__core-js_shared__"];t.exports=n},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,r){var n=r(103),o=r(19),i=r(34);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},function(t,e,r){var n=r(104),o=r(105),i=r(106),u=r(107),a=r(108);function c(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=u,c.prototype.set=a,t.exports=c},function(t,e,r){var n=r(22);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,r){var n=r(22),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(e,t)?e[t]:void 0}},function(t,e,r){var n=r(22),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:o.call(e,t)}},function(t,e,r){var n=r(22);t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,r){var n=r(23);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,r){var n=r(23);t.exports=function(t){return n(this,t).get(t)}},function(t,e,r){var n=r(23);t.exports=function(t){return n(this,t).has(t)}},function(t,e,r){var n=r(23);t.exports=function(t,e){var r=n(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}},function(t,e){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}},function(t,e,r){var n=r(12),o=r(118),i=r(21),u=r(49),a=r(119),c=r(36),s=n?n.prototype:void 0,f=s?s.valueOf:void 0;t.exports=function(t,e,r,n,s,l,p){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!l(new o(t),new o(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var d=a;case"[object Set]":var v=1&n;if(d||(d=c),t.size!=e.size&&!v)return!1;var h=p.get(t);if(h)return h==e;n|=2,p.set(t,e);var y=u(d(t),d(e),n,s,l,p);return p.delete(t),y;case"[object Symbol]":if(f)return f.call(t)==f.call(e)}return!1}},function(t,e,r){var n=r(3).Uint8Array;t.exports=n},function(t,e){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}},function(t,e,r){var n=r(121),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,r,i,u,a){var c=1&r,s=n(t),f=s.length;if(f!=n(e).length&&!c)return!1;for(var l=f;l--;){var p=s[l];if(!(c?p in e:o.call(e,p)))return!1}var d=a.get(t);if(d&&a.get(e))return d==e;var v=!0;a.set(t,e),a.set(e,t);for(var h=c;++l<f;){var y=t[p=s[l]],b=e[p];if(i)var x=c?i(b,y,p,e,t,a):i(y,b,p,t,e,a);if(!(void 0===x?y===b||u(y,b,r,i,a):x)){v=!1;break}h||(h="constructor"==p)}if(v&&!h){var g=t.constructor,_=e.constructor;g!=_&&"constructor"in t&&"constructor"in e&&!("function"==typeof g&&g instanceof g&&"function"==typeof _&&_ instanceof _)&&(v=!1)}return a.delete(t),a.delete(e),v}},function(t,e,r){var n=r(122),o=r(123),i=r(37);t.exports=function(t){return n(t,i,o)}},function(t,e,r){var n=r(52),o=r(4);t.exports=function(t,e,r){var i=e(t);return o(t)?i:n(i,r(t))}},function(t,e,r){var n=r(124),o=r(125),i=Object.prototype.propertyIsEnumerable,u=Object.getOwnPropertySymbols,a=u?function(t){return null==t?[]:(t=Object(t),n(u(t),(function(e){return i.call(t,e)})))}:o;t.exports=a},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var u=t[r];e(u,r,t)&&(i[o++]=u)}return i}},function(t,e){t.exports=function(){return[]}},function(t,e,r){var n=r(127),o=r(38),i=r(4),u=r(53),a=r(24),c=r(55),s=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=i(t),f=!r&&o(t),l=!r&&!f&&u(t),p=!r&&!f&&!l&&c(t),d=r||f||l||p,v=d?n(t.length,String):[],h=v.length;for(var y in t)!e&&!s.call(t,y)||d&&("length"==y||l&&("offset"==y||"parent"==y)||p&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||a(y,h))||v.push(y);return v}},function(t,e){t.exports=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},function(t,e,r){var n=r(11),o=r(14);t.exports=function(t){return o(t)&&"[object Arguments]"==n(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,r){var n=r(11),o=r(39),i=r(14),u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u["[object Arguments]"]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u["[object Function]"]=u["[object Map]"]=u["[object Number]"]=u["[object Object]"]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!u[n(t)]}},function(t,e,r){(function(t){var n=r(47),o=e&&!e.nodeType&&e,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,u=i&&i.exports===o&&n.process,a=function(){try{return i&&i.require&&i.require("util").types||u&&u.binding&&u.binding("util")}catch(t){}}();t.exports=a}).call(this,r(54)(t))},function(t,e,r){var n=r(133),o=r(134),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return o(t);var e=[];for(var r in Object(t))i.call(t,r)&&"constructor"!=r&&e.push(r);return e}},function(t,e){var r=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},function(t,e,r){var n=r(135)(Object.keys,Object);t.exports=n},function(t,e){t.exports=function(t,e){return function(r){return t(e(r))}}},function(t,e,r){var n=r(137),o=r(34),i=r(138),u=r(57),a=r(139),c=r(11),s=r(48),f=s(n),l=s(o),p=s(i),d=s(u),v=s(a),h=c;(n&&"[object DataView]"!=h(new n(new ArrayBuffer(1)))||o&&"[object Map]"!=h(new o)||i&&"[object Promise]"!=h(i.resolve())||u&&"[object Set]"!=h(new u)||a&&"[object WeakMap]"!=h(new a))&&(h=function(t){var e=c(t),r="[object Object]"==e?t.constructor:void 0,n=r?s(r):"";if(n)switch(n){case f:return"[object DataView]";case l:return"[object Map]";case p:return"[object Promise]";case d:return"[object Set]";case v:return"[object WeakMap]"}return e}),t.exports=h},function(t,e,r){var n=r(7)(r(3),"DataView");t.exports=n},function(t,e,r){var n=r(7)(r(3),"Promise");t.exports=n},function(t,e,r){var n=r(7)(r(3),"WeakMap");t.exports=n},function(t,e,r){var n=r(50),o=r(141),i=r(146),u=r(51),a=r(147),c=r(36);t.exports=function(t,e,r){var s=-1,f=o,l=t.length,p=!0,d=[],v=d;if(r)p=!1,f=i;else if(200>l)v=e?[]:d;else{var h=e?null:a(t);if(h)return c(h);p=!1,f=u,v=new n}t:for(;++s<l;){var y=t[s],b=e?e(y):y;if(y=r||0!==y?y:0,p&&b==b){for(var x=v.length;x--;)if(v[x]===b)continue t;e&&v.push(b),d.push(y)}else f(v,b,r)||(v!==d&&v.push(b),d.push(y))}return d}},function(t,e,r){var n=r(142);t.exports=function(t,e){return!(null==t||!t.length)&&n(t,e,0)>-1}},function(t,e,r){var n=r(143),o=r(144),i=r(145);t.exports=function(t,e,r){return e==e?i(t,e,r):n(t,o,r)}},function(t,e){t.exports=function(t,e,r,n){for(var o=t.length,i=r+(n?1:-1);n?i--:++i<o;)if(e(t[i],i,t))return i;return-1}},function(t,e){t.exports=function(t){return t!=t}},function(t,e){t.exports=function(t,e,r){for(var n=r-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}},function(t,e){t.exports=function(t,e,r){for(var n=-1,o=null==t?0:t.length;++n<o;)if(r(e,t[n]))return!0;return!1}},function(t,e,r){var n=r(57),o=r(148),i=r(36),u=n&&1/i(new n([,-0]))[1]==1/0?function(t){return new n(t)}:o;t.exports=u},function(t,e){t.exports=function(){}},function(t,e,r){var n=r(12),o=r(38),i=r(4),u=n?n.isConcatSpreadable:void 0;t.exports=function(t){return i(t)||o(t)||!!(u&&t&&t[u])}},function(t,e,r){var n=r(59),o=r(151),i=r(167),u=r(173),a=r(56),c=r(174),s=r(28);t.exports=function(t,e,r){var f=-1;e=n(e.length?e:[s],a(o));var l=i(t,(function(t,r,o){return{criteria:n(e,(function(e){return e(t)})),index:++f,value:t}}));return u(l,(function(t,e){return c(t,e,r)}))}},function(t,e,r){var n=r(152),o=r(155),i=r(28),u=r(4),a=r(164);t.exports=function(t){return"function"==typeof t?t:null==t?i:"object"==typeof t?u(t)?o(t[0],t[1]):n(t):a(t)}},function(t,e,r){var n=r(153),o=r(154),i=r(61);t.exports=function(t){var e=o(t);return 1==e.length&&e[0][2]?i(e[0][0],e[0][1]):function(r){return r===t||n(r,t,e)}}},function(t,e,r){var n=r(45),o=r(33);t.exports=function(t,e,r,i){var u=r.length,a=u,c=!i;if(null==t)return!a;for(t=Object(t);u--;){var s=r[u];if(c&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++u<a;){var f=(s=r[u])[0],l=t[f],p=s[1];if(c&&s[2]){if(void 0===l&&!(f in t))return!1}else{var d=new n;if(i)var v=i(l,p,f,t,e,d);if(!(void 0===v?o(p,l,3,i,d):v))return!1}}return!0}},function(t,e,r){var n=r(60),o=r(37);t.exports=function(t){for(var e=o(t),r=e.length;r--;){var i=e[r],u=t[i];e[r]=[i,u,n(u)]}return e}},function(t,e,r){var n=r(33),o=r(156),i=r(62),u=r(41),a=r(60),c=r(61),s=r(15);t.exports=function(t,e){return u(t)&&a(e)?c(s(t),e):function(r){var u=o(r,t);return void 0===u&&u===e?i(r,t):n(e,u,3)}}},function(t,e,r){var n=r(40);t.exports=function(t,e,r){var o=null==t?void 0:n(t,e);return void 0===o?r:o}},function(t,e,r){var n=r(158)((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,(function(t,r,n,o){e.push(n?o.replace(/\\(\\)?/g,"$1"):r||t)})),e}));t.exports=n},function(t,e,r){var n=r(159);t.exports=function(t){var e=n(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}},function(t,e,r){var n=r(35);function o(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var u=t.apply(this,n);return r.cache=i.set(o,u)||i,u};return r.cache=new(o.Cache||n),r}o.Cache=n,t.exports=o},function(t,e,r){var n=r(161);t.exports=function(t){return null==t?"":n(t)}},function(t,e,r){var n=r(12),o=r(59),i=r(4),u=r(27),a=n?n.prototype:void 0,c=a?a.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return o(e,t)+"";if(u(e))return c?c.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r}},function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},function(t,e,r){var n=r(26),o=r(38),i=r(4),u=r(24),a=r(39),c=r(15);t.exports=function(t,e,r){for(var s=-1,f=(e=n(e,t)).length,l=!1;++s<f;){var p=c(e[s]);if(!(l=null!=t&&r(t,p)))break;t=t[p]}return l||++s!=f?l:!!(f=null==t?0:t.length)&&a(f)&&u(p,f)&&(i(t)||o(t))}},function(t,e,r){var n=r(165),o=r(166),i=r(41),u=r(15);t.exports=function(t){return i(t)?n(u(t)):o(t)}},function(t,e){t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},function(t,e,r){var n=r(40);t.exports=function(t){return function(e){return n(e,t)}}},function(t,e,r){var n=r(168),o=r(25);t.exports=function(t,e){var r=-1,i=o(t)?Array(t.length):[];return n(t,(function(t,n,o){i[++r]=e(t,n,o)})),i}},function(t,e,r){var n=r(169),o=r(172)(n);t.exports=o},function(t,e,r){var n=r(170),o=r(37);t.exports=function(t,e){return t&&n(t,e,o)}},function(t,e,r){var n=r(171)();t.exports=n},function(t,e){t.exports=function(t){return function(e,r,n){for(var o=-1,i=Object(e),u=n(e),a=u.length;a--;){var c=u[t?a:++o];if(!1===r(i[c],c,i))break}return e}}},function(t,e,r){var n=r(25);t.exports=function(t,e){return function(r,o){if(null==r)return r;if(!n(r))return t(r,o);for(var i=r.length,u=e?i:-1,a=Object(r);(e?u--:++u<i)&&!1!==o(a[u],u,a););return r}}},function(t,e){t.exports=function(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}},function(t,e,r){var n=r(175);t.exports=function(t,e,r){for(var o=-1,i=t.criteria,u=e.criteria,a=i.length,c=r.length;++o<a;){var s=n(i[o],u[o]);if(s)return c>o?s*("desc"==r[o]?-1:1):s}return t.index-e.index}},function(t,e,r){var n=r(27);t.exports=function(t,e){if(t!==e){var r=void 0!==t,o=null===t,i=t==t,u=n(t),a=void 0!==e,c=null===e,s=e==e,f=n(e);if(!c&&!f&&!u&&t>e||u&&a&&s&&!c&&!f||o&&a&&s||!r&&s||!i)return 1;if(!o&&!u&&!f&&e>t||f&&r&&i&&!o&&!u||c&&r&&i||!a&&i||!s)return-1}return 0}},function(t,e,r){var n=r(28),o=r(63),i=r(64);t.exports=function(t,e){return i(o(t,e,n),t+"")}},function(t,e){t.exports=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}},function(t,e,r){var n=r(179),o=r(65),i=r(28),u=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:i;t.exports=u},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e){var r=Date.now;t.exports=function(t){var e=0,n=0;return function(){var o=r(),i=16-(o-n);if(n=o,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,r){var n=r(21),o=r(25),i=r(24),u=r(13);t.exports=function(t,e,r){if(!u(r))return!1;var a=typeof e;return!!("number"==a?o(r)&&i(e,r.length):"string"==a&&e in r)&&n(r[e],t)}},function(t,e,r){var n={"./ApiCall.js":43,"./Build.js":2,"./BuildRevision.js":42,"./Login.js":8,"./User.js":1};function o(t){var e=i(t);return r(e)}function i(t){if(!r.o(n,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return n[t]}o.keys=function(){return Object.keys(n)},o.resolve=i,t.exports=o,o.id=182},function(t,e,r){var n={"./addBuild":66,"./addBuild.js":66,"./editBuild":67,"./editBuild.js":67,"./getBackendInfo":68,"./getBackendInfo.js":68,"./getBuild":69,"./getBuild.js":69,"./getBuildTypes":70,"./getBuildTypes.js":70,"./getBuilds":29,"./getBuilds.js":29,"./getProfile":71,"./getProfile.js":71,"./login":72,"./login.js":72,"./register":73,"./register.js":73};function o(t){var e=i(t);return r(e)}function i(t){if(!r.o(n,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return n[t]}o.keys=function(){return Object.keys(n)},o.resolve=i,t.exports=o,o.id=183},function(t,e,r){var n=r(185),o=r(62);t.exports=function(t,e){return n(t,e,(function(e,r){return o(t,r)}))}},function(t,e,r){var n=r(40),o=r(186),i=r(26);t.exports=function(t,e,r){for(var u=-1,a=e.length,c={};++u<a;){var s=e[u],f=n(t,s);r(f,s)&&o(c,i(s,t),f)}return c}},function(t,e,r){var n=r(187),o=r(26),i=r(24),u=r(13),a=r(15);t.exports=function(t,e,r,c){if(!u(t))return t;for(var s=-1,f=(e=o(e,t)).length,l=f-1,p=t;null!=p&&++s<f;){var d=a(e[s]),v=r;if(s!=l){var h=p[d];void 0===(v=c?c(h,d,p):void 0)&&(v=u(h)?h:i(e[s+1])?[]:{})}n(p,d,v),p=p[d]}return t}},function(t,e,r){var n=r(188),o=r(21),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){var u=t[e];i.call(t,e)&&o(u,r)&&(void 0!==r||e in t)||n(t,e,r)}},function(t,e,r){var n=r(65);t.exports=function(t,e,r){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},function(t,e,r){var n=r(190),o=r(63),i=r(64);t.exports=function(t){return i(o(t,void 0,n),t+"")}},function(t,e,r){var n=r(58);t.exports=function(t){return null!=t&&t.length?n(t,1):[]}},function(t,e){t.exports=require("dead-by-daylight")},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return b}));var n=r(77),o=r.n(n),i=r(78),u=r.n(i),a=r(9),c=r(79),s=r.n(c),f=r(80),l=r.n(f),p=r(6),d=new l.a({logger:p.b}),v=r(43),h=r(8);const y=r(183);class b extends a.JaidCorePlugin{init(){this.socketServer=s()(this.core.insecureServer),this.socketServer.on("connection",async t=>{if(t.handshake.headers.cookie){const e=u.a.parse(t.handshake.headers.cookie).login;if(e){const r=JSON.parse(e);if(r.key){t.apiKey=r.key;const e=await h.default.findOne({where:{apiKey:t.apiKey},attributes:["UserId"],raw:!0});e?t.userId=e.UserId:t.emit("invalidateLogin")}}}for(const[e,r]of Object.entries(this.commands))t.on(e,async(...n)=>{const i={client:t,userId:t.userId,logger:this.logger},u=Date.now(),a=n.length>1?n.slice(0,-1):null,c=await r.default(i,...n),s=Date.now()-u;v.default.create({result:c,time:s,type:e,payload:a,UserId:t.userId}),void 0!==c&&o()(n)(c)})}),d.enhanceServer(this.socketServer),this.commands=y.keys().reduce((t,e)=>(t[e.match(/\.\/(?<key>[\da-z]+)/i).groups.key]=y(e),t),{})}}}]);