plutonium/launcher/assets/js/app.454f4f9e.js
2023-12-10 07:55:13 -05:00

2 lines
26 KiB
JavaScript

(function(e){function A(A){for(var n,a,i=A[0],s=A[1],u=A[2],c=0,g=[];c<i.length;c++)a=i[c],Object.prototype.hasOwnProperty.call(r,a)&&r[a]&&g.push(r[a][0]),r[a]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);l&&l(A);while(g.length)g.shift()();return o.push.apply(o,u||[]),t()}function t(){for(var e,A=0;A<o.length;A++){for(var t=o[A],n=!0,a=1;a<t.length;a++){var i=t[a];0!==r[i]&&(n=!1)}n&&(o.splice(A--,1),e=s(s.s=t[0]))}return e}var n={},a={app:0},r={app:0},o=[];function i(e){return s.p+"js/"+({auth:"auth",games:"games"}[e]||e)+"."+{auth:"688202d0","chunk-4f6208b2":"22635986","chunk-520ec366":"59e39e11","chunk-59eb3327":"5536132d","chunk-d15685cc":"589056ed",games:"2559cd9a"}[e]+".js"}function s(A){if(n[A])return n[A].exports;var t=n[A]={i:A,l:!1,exports:{}};return e[A].call(t.exports,t,t.exports,s),t.l=!0,t.exports}s.e=function(e){var A=[],t={auth:1,"chunk-4f6208b2":1,"chunk-520ec366":1,"chunk-59eb3327":1,"chunk-d15685cc":1,games:1};a[e]?A.push(a[e]):0!==a[e]&&t[e]&&A.push(a[e]=new Promise((function(A,t){for(var n="css/"+({auth:"auth",games:"games"}[e]||e)+"."+{auth:"4a6b27be","chunk-4f6208b2":"def6a674","chunk-520ec366":"3f565a45","chunk-59eb3327":"48ed8008","chunk-d15685cc":"29ddedaf",games:"b0791aa4"}[e]+".css",r=s.p+n,o=document.getElementsByTagName("link"),i=0;i<o.length;i++){var u=o[i],c=u.getAttribute("data-href")||u.getAttribute("href");if("stylesheet"===u.rel&&(c===n||c===r))return A()}var g=document.getElementsByTagName("style");for(i=0;i<g.length;i++){u=g[i],c=u.getAttribute("data-href");if(c===n||c===r)return A()}var l=document.createElement("link");l.rel="stylesheet",l.type="text/css",l.onload=A,l.onerror=function(A){var n=A&&A.target&&A.target.src||r,o=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");o.code="CSS_CHUNK_LOAD_FAILED",o.request=n,delete a[e],l.parentNode.removeChild(l),t(o)},l.href=r;var p=document.getElementsByTagName("head")[0];p.appendChild(l)})).then((function(){a[e]=0})));var n=r[e];if(0!==n)if(n)A.push(n[2]);else{var o=new Promise((function(A,t){n=r[e]=[A,t]}));A.push(n[2]=o);var u,c=document.createElement("script");c.charset="utf-8",c.timeout=120,s.nc&&c.setAttribute("nonce",s.nc),c.src=i(e);var g=new Error;u=function(A){c.onerror=c.onload=null,clearTimeout(l);var t=r[e];if(0!==t){if(t){var n=A&&("load"===A.type?"missing":A.type),a=A&&A.target&&A.target.src;g.message="Loading chunk "+e+" failed.\n("+n+": "+a+")",g.name="ChunkLoadError",g.type=n,g.request=a,t[1](g)}r[e]=void 0}};var l=setTimeout((function(){u({type:"timeout",target:c})}),12e4);c.onerror=c.onload=u,document.head.appendChild(c)}return Promise.all(A)},s.m=e,s.c=n,s.d=function(e,A,t){s.o(e,A)||Object.defineProperty(e,A,{enumerable:!0,get:t})},s.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,A){if(1&A&&(e=s(e)),8&A)return e;if(4&A&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(s.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&A&&"string"!=typeof e)for(var n in e)s.d(t,n,function(A){return e[A]}.bind(null,n));return t},s.n=function(e){var A=e&&e.__esModule?function(){return e["default"]}:function(){return e};return s.d(A,"a",A),A},s.o=function(e,A){return Object.prototype.hasOwnProperty.call(e,A)},s.p="",s.oe=function(e){throw console.error(e),e};var u=window["webpackJsonp"]=window["webpackJsonp"]||[],c=u.push.bind(u);u.push=A,u=u.slice();for(var g=0;g<u.length;g++)A(u[g]);var l=c;o.push([0,"chunk-vendors"]),t()})({0:function(e,A,t){e.exports=t("56d7")},"0492":function(e,A,t){e.exports=t.p+"img/t5sp_logo.923e4106.png"},1154:function(e,A,t){},"1c3a":function(e,A,t){e.exports=t.p+"img/t5sp_icon.f951b0ce.png"},2253:function(e,A,t){"use strict";t("b7dc")},"24a9":function(e,A){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArwAAAK8CAYAAAANumxDAAAPqUlEQVR4nO3YW3IURxRFUcnhLwbMIBgwv3I4MJaAltSPemTuXGsIVdHn7q4nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB42LNHyKNevn158RApev76fZiN9DtjZSP9FpnT394bwGVvI9PBBZjXX94dwOf+jV9fWQHmJHgBbiB8AeYjeAHuIHoB5iF4AQBIE7wAd/KVF2AOghcAgDTBC/AAX3kBxid4AQBIE7wAAKQJXgAA0gQvAABpghcAgDTBCwBAmuAFACBN8AIAkCZ4AQBIE7wAAKQJXgAA0gQvAABpghcAgDTBCwBAmuAFACBN8AIAkCZ4AQBIE7wAAKQJXgAA0gQvAABpghcAgDTBCwBAmuAFACBN8AIAkCZ4AQBIE7wAAKQJXgAA0gQvAABpghcAgDTBCwBAmuAFACBN8AIAkCZ4AQBIE7wAAKQJXgAA0gQvAABpghcAgDTBCwBAmuAFACBN8AIAkCZ4AQBIE7wAAKQJXgAA0gQvAABpghcAgDTBCwBAmuAFACBN8AIAkCZ4AQBIE7wAAKQJXgAA0gQvAABpghcAgDTBCwBAmuAFACBN8AIAkCZ4AQBIE7wAAKQJXgAA0gQvAABpghcAgDTBCwBAmuAFACBN8AIAkCZ4AQBIE7wAAKQJXgAA0g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cABiR2YTuCFwCANMELAECa4AUAIE3wAgCQJngBAEgTvAAApAleAADSBC8AAGmCFwCANMELAECa4AUAIE3wAgCQJngBAEgTvAAApAleAADSBC8AAGmCFwCANMELAECa4AUAIE3wAgCQJngBAEgTvAAApAleAADSBC8AAGmCFwCANMELAECa4AUAIE3wAgCQJngBAEgTvAAApAleAADSBC8AAGmCFwCANMELAECa4AUAIE3wAgCQJngBAEgTvAAApAleAADSBC8AAGmCFwCANMELAECa4AUAIE3wAgCQJngBAEgTvAAApAleAADSBC8AAGmCFwCANMELAECa4AUAIE3wAgCQJngBAEgTvAAApAleAADSBC8AAGmCFwCANMELAECa4AUAIE3wAgCQJngBAEgTvAAApAleAADSBC8AAGmCFwCANMELAECa4AUAIE3wAgCQJngBAEgTvAAApAleAADSBC8AAGmCFwCANMELAECa4AUAIE3wAgCQJngBAEgTvAAApAleAADSBC8AAGmCFwCANMELAECa4AUAIE3wAgCQJngBAEgTvAAApAleAADSBC8AAGmCFwCANMELAECa4AUAIE3wAgCQJngBAEgTvAAApAleAADSBC8AAGmCFwCANMELAECa4AUAIE3wAgCQJngBAEgTvAAApAleAADSBC8AAGmCFwCANMELAECa4AUAIE3wAgCQJngBAEgTvAAApAleAADSBC8AAGmCFwCANMELAECa4AUAIE3wAgCQJngBAEgTvAAApAleAADSBC8AAGmCFwCANMELAECa4AUAIE3wAgCQJngBAEgTvAAApAleAADSBC8AAGmCFwCANMELAECa4AUAIE3wAgCQJngBAEgTvAAApAleAADSBC8AAGmCFwCANMELAECa4AUAIE3wAgCQJngBAEgTvAAApAleAADSBC8AAGmCFwCANMELAECa4AUAIE3wAgCQJngBAEgTvAAApAleAADSBC8AAGmCFwCANMELAECa4AUAIE3wAgCQJngBAEgTvAAApAleAADSBC8AAGmCFwCANMELAECa4AUAIE3wAgCQJngBAEgTvAAApAleAADSBC8AAGmCFwCANMELAECa4AUAIE3wAgCQJngBAEgTvAAApAleAADSBC8AAGmCFwCANMELAECa4AUAIE3wAgCQJngBA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABY1NPT0z95gCa8teDKLwAAAABJRU5ErkJggg=="},"278b":function(e,A,t){e.exports=t.p+"img/iw5_icon.804ee006.png"},"27b7":function(e,A,t){e.exports=t.p+"img/t5mp_logo.ab399f8f.png"},"3a65":function(e,A,t){e.exports=t.p+"img/t4mp_logo.59e4aebd.png"},"56d7":function(e,A,t){"use strict";t.r(A);t("e260"),t("e6cf"),t("cca6"),t("a79d");var n=t("2b0e"),a=t("ee98"),r=t.n(a),o=function(){var e=this,A=e.$createElement,t=e._self._c||A;return t("div",[t("loading-modal"),t("debug"),t(e.layout,{key:e.layout,tag:"component",staticStyle:{overflow:"hidden"}}),t("notifications",{attrs:{position:"bottom center"}}),"blank"!==e.layout?t("peek"):e._e()],1)},i=[],s=(t("d3b7"),t("3ca3"),t("ddb0"),function(){var e=this,A=e.$createElement,t=e._self._c||A;return t("div",[e.showDebugInfo?t("div",{staticClass:"debugWindow"},[t("pre",[e._v("Debug Info:")]),t("pre",{domProps:{innerHTML:e._s(e.debugJson)}})]):e._e(),e.showDebugInfo?t("div",{staticClass:"consoleWindow",attrs:{id:"consoleWindow"}},[t("pre",[e._v("Console")]),e._l(e.$store.getters["ui/debugConsole"],(function(A,n){return t("pre",{key:"consoleMessage"+n,class:"consoleMessage "+A.type,domProps:{innerHTML:e._s("["+A.timestamp+"] "+A.message)}})}))],2):e._e()])}),u=[],c=t("5530"),g=t("2f62"),l=t("0e44"),p=t("0937"),d=t("1da1"),m=(t("96cf"),t("8c4f"));n["default"].use(m["a"]);var C=function(e,A,t){var n=_.getters["authentication/authenticated"];n?t({name:"dashboard"}):t()},h=function(e,A,t){_.getters["authentication/authenticated"]?t():t({name:"login"})},w=[{path:"/login",name:"login",component:function(){return t.e("auth").then(t.bind(null,"9ed6"))},meta:{layout:"blank"},beforeEnter:C},{path:"/logout",name:"logout",meta:{layout:"blank"},beforeEnter:function(){_.dispatch("authentication/logout")}},{path:"/game/:gameTag",name:"games",meta:{layout:"basic"},component:function(){return t.e("games").then(t.bind(null,"88e6"))},props:!0,beforeEnter:h},{name:"catch-all",path:"*",redirect:"/game/iw5mp",meta:{layout:"blank"}}],f=new m["a"]({mode:"hash",base:"",routes:w}),B=f,v=function(e){n["default"].notify(Object(c["a"])(Object(c["a"])({duration:5e3},e),{},{position:"top right"}))},E={create:v},b={authenticated:!1,user:{username:"unknown user",profilePic:null,friends:[]},remember:!1},k={authentication:function(e){return e},authenticated:function(e){return e.authenticated},remember:function(e){return e.remember},user:function(e){return e.user},userFriends:function(e){return e.user.friends}};function I(){return y.apply(this,arguments)}function y(){return y=Object(d["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:b.user.username=getUsername(),b.user.profilePic=getAvatar(),B.push({path:"/"});case 3:case"end":return e.stop()}}),e)}))),y.apply(this,arguments)}var Q={authenticate:function(e,A){return Object(d["a"])(regeneratorRuntime.mark((function t(){var n,a,r,o,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e.commit,a=A.username,r=A.password,o=A.remember,_.dispatch("ui/setLoadingState",{show:!0,message:"Authenticating..."}),t.prev=3,t.next=6,login(a,r);case 6:if(i=t.sent,!i){t.next=13;break}return launcherSetToken(),n("saveAuth",{authenticated:i,remember:o}),t.next=12,I();case 12:_.dispatch("ui/setLoadingState",{show:!1});case 13:t.next=20;break;case 15:t.prev=15,t.t0=t["catch"](3),console.error("NIX: ".concat(t.t0)),E.create({title:"An issue occured when logging in.",text:t.t0,type:"error"}),_.dispatch("ui/setLoadingState",{show:!1});case 20:case"end":return t.stop()}}),t,null,[[3,15]])})))()},logout:function(e){return Object(d["a"])(regeneratorRuntime.mark((function A(){var t;return regeneratorRuntime.wrap((function(A){while(1)switch(A.prev=A.next){case 0:t=e.commit;try{launcherSetToken(""),t("saveAuth",{authenticated:!1}),B.push({path:"/login",query:{logout:!0}})}catch(n){console.error("NIX: ".concat(n)),E.create({title:"An issue occured when logging out.",text:n,type:"error"}),_.dispatch("ui/setLoadingState",{show:!1})}case 2:case"end":return A.stop()}}),A)})))()},preAuthed:function(e){return Object(d["a"])(regeneratorRuntime.mark((function A(){var t,n;return regeneratorRuntime.wrap((function(A){while(1)switch(A.prev=A.next){case 0:return t=e.commit,A.prev=1,A.next=4,validateToken();case 4:if(n=A.sent,!n){A.next=12;break}return t("saveAuth",{authenticated:!0}),A.next=9,I();case 9:_.dispatch("ui/setLoadingState",{show:!1}),A.next=15;break;case 12:launcherSetToken(""),B.push({path:"/login"}),_.dispatch("ui/setLoadingState",{show:!1});case 15:A.next=22;break;case 17:A.prev=17,A.t0=A["catch"](1),console.error("NIX: ".concat(A.t0)),E.create({title:"An issue occured when logging in using saved credentials.",text:A.t0,type:"error"}),_.dispatch("ui/setLoadingState",{show:!1});case 22:case"end":return A.stop()}}),A,null,[[1,17]])})))()},loadFriends:function(e){return Object(d["a"])(regeneratorRuntime.mark((function A(){var t,n;return regeneratorRuntime.wrap((function(A){while(1)switch(A.prev=A.next){case 0:return t=e.commit,t("saveFriends",[]),_.dispatch("ui/setLoadingState",{show:!0,message:"Loading Friends..."}),A.prev=3,A.next=6,getFriends();case 6:n=A.sent,t("saveFriends",n),_.dispatch("ui/setLoadingState",{show:!1}),A.next=16;break;case 11:A.prev=11,A.t0=A["catch"](3),console.error("NIX: ".concat(A.t0)),E.create({title:"An issue occured when getting friends.",text:A.t0,type:"error"}),_.dispatch("ui/setLoadingState",{show:!1});case 16:case"end":return A.stop()}}),A,null,[[3,11]])})))()}},M={saveAuth:function(e,A){var t=A.authenticated,n=A.remember;e.authenticated=!!t,e.remember=!!n},saveFriends:function(e,A){e.user.friends=A}},D={state:b,getters:k,actions:Q,mutations:M,namespaced:!0},L=(t("caad"),t("2532"),t("ac1f"),t("1276"),{showPeek:!1,peekInfo:null,debug:{enabled:!0,show:!1,log:[]},loading:{show:!1,message:null}}),T={showPeek:function(e){return e.showPeek},peekInfo:function(e){return e.peekInfo},showDebugInfo:function(e){return e.debug.show},debugConsole:function(e){return e.debug.log},showLoadingModal:function(e){return e.loading.show},loadingModalMessage:function(e){return e.loading.message}},x={setPeek:function(e,A){var t=e.commit;if(void 0!==A)if("string"===typeof A&&A.includes("/")){var n=A.split("/");t("setPeekInfo",n[1]),t("setPeek",n[0])}else t("setPeekInfo",null),t("setPeek",A);else t("setPeek",!L.showPeek)},toggleDebugInfo:function(e){var A=e.commit;A("toggleDebugInfo")},debugLog:function(e,A){var t=e.commit,n=A.message,a=A.type;t("debugLog",{message:n,type:a})},enableDebug:function(e){var A=e.commit;A("enableDebug")},setLoadingState:function(e,A){var t=e.commit,n=A.show,a=A.message;t("setLoadingModal",{show:n,message:a})},refreshPeek:function(e){var A=e.commit,t=e.state,n=t.showPeek;A("setPeek",!1),A("setPeek",n)}},N={setPeek:function(e,A){e.showPeek=A},setPeekInfo:function(e,A){e.peekInfo=A},toggleDebugInfo:function(e){e.debug.show?e.debug.show=!1:e.debug.enabled&&(e.debug.show=!0),E.create({title:"Debug mode is: ".concat(e.debug.show?"ON":"OFF")})},debugLog:function(e,A){var t=A.message,n=A.type,a=new Date;e.debug.log.push({timestamp:a.toTimeString().substr(0,8),message:t,type:n||"log"});var r=document.getElementById("consoleWindow");r&&(r.scrollTop=r.scrollHeight)},enableDebug:function(e){e.debug.enabled=!0,E.create({title:"I'm a little butterfly!"})},setLoadingModal:function(e,A){var t=A.show,n=A.message;e.loading.show=t,e.loading.message=n||null}},F={state:L,getters:T,actions:x,mutations:N,namespaced:!0},J=t("9193"),S=(t("7db0"),t("d9e2"),{games:function(){return J["a"].all()}}),O={play:function(e,A){return Object(d["a"])(regeneratorRuntime.mark((function t(){var n,a,r,o,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.commit,n=A.gameTag,a=A.params,r=J["a"].find(n),o=_.getters["authentication/user"],a&&a.includes("lan")&&!a.includes("+name")&&(console.log("no name set! changing param..."),a+=' +name "'.concat(o.username||"Unknown Solider",'"')),_.dispatch("ui/setLoadingState",{show:!0,message:"Launching ".concat(r.title||n)+(a?"\nUsing Params: ".concat(a):"")}),t.prev=6,t.next=9,createSession(r.tag||n);case 9:if(i=t.sent,launcherLaunchGame(n,i,a)){t.next=12;break}throw new Error("An error occured launching the game.");case 12:t.next=17;break;case 14:t.prev=14,t.t0=t["catch"](6),E.create({title:"Failed to launch game",text:t.t0,type:"error"});case 17:case"end":return t.stop()}}),t,null,[[6,14]])})))()},selectDir:function(e,A){return Object(d["a"])(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.commit,n=launcherSelectGameFolder(A),t.abrupt("return",n);case 3:case"end":return t.stop()}}),t)})))()}},P={getters:S,actions:O};n["default"].use(g["a"]);var j=new p["b"].Database;j.register(J["a"],P);var G=new g["a"].Store({modules:{authentication:D,ui:F,games:P},plugins:[p["b"].install(j),Object(l["a"])({paths:["authentication"]})]}),_=G,U=function(e){var A=e.keyCode;113===A&&_.dispatch("ui/toggleDebugInfo")},Z=function(e){var A=e.keyCode;if(e.getModifierState("Control")&&86===A){var t=launcherGetClipboard(),n=document.activeElement,a=n.selectionStart,r=String(n.value),o=t;r&&(o=0===a?t+r:a===r.length?r+t:r.substr(0,a)+t+r.substr(a)),"INPUT"===n.tagName&&(n.value=o),n.dispatchEvent(new Event("paste"))}};document.addEventListener("keyup",U),document.addEventListener("keydown",Z);var X={computed:Object(c["a"])(Object(c["a"])({},Object(g["b"])({showDebugInfo:"ui/showDebugInfo"})),{},{debugJson:function(){return{Authenticated:this.$store.getters["authentication/authenticated"],RememberUser:this.$store.getters["authentication/remember"],AuthedUser:this.$store.getters["authentication/user"],peek:{show:this.$store.getters["ui/showPeek"],info:this.$store.getters["ui/peekInfo"]}}}}),beforeDestroy:function(){document.removeEventListener("keyup",U)}},R=X,K=(t("dd77"),t("2877")),z=Object(K["a"])(R,s,u,!1,null,"0fed03cc",null),H=z.exports,Y=function(){var e=this,A=e.$createElement,t=e._self._c||A;return e.showPeek?t("div",{staticClass:"peekContainer",on:{mousedown:function(A){return A.stopPropagation(),e.checkClose.apply(null,arguments)}}},[t("div",{staticClass:"overlay"}),e.layout?t("div",{staticClass:"peek"},[e.layout?t(e.layout,{key:e.layout,tag:"component"}):e._e()],1):e._e()]):e._e()},$=[],W={components:{profile:function(){return t.e("chunk-520ec366").then(t.bind(null,"8b5a"))},gameSettings:function(){return t.e("chunk-59eb3327").then(t.bind(null,"67f8"))}},computed:{showPeek:function(){return this.$store.getters["ui/showPeek"]},peekInfo:function(){return this.$store.getters["ui/peekInfo"]},layout:function(){var e=null;switch(this.showPeek){case"profile":e="profile";break;case"game":e="gameSettings";break}return e}},methods:{checkClose:function(e){e.target===this.$el&&this.closePeek()},closePeek:function(){this.$store.dispatch("ui/setPeek",!1)}}},V=W,q=(t("7add"),Object(K["a"])(V,Y,$,!1,null,null,null)),ee=q.exports,Ae=function(){var e=this,A=e.$createElement,t=e._self._c||A;return e.showLoadingModal?t("div",{staticClass:"container"},[t("div",{staticClass:"modal"},[e._m(0),t("span",{staticStyle:{"white-space":"pre"}},[e._v(" "+e._s(e.loadingModalMessage||"Loading...")+" ")])])]):e._e()},te=[function(){var e=this,A=e.$createElement,t=e._self._c||A;return t("div",{staticClass:"fa-3x"},[t("i",{staticClass:"fas fa-spinner fa-spin"})])}],ne={name:"LoadingModal",computed:Object(c["a"])({},Object(g["b"])({showLoadingModal:"ui/showLoadingModal",loadingModalMessage:"ui/loadingModalMessage"}))},ae=ne,re=(t("2253"),Object(K["a"])(ae,Ae,te,!1,null,"e7a6bad4",null)),oe=re.exports,ie={components:{basic:function(){return t.e("chunk-d15685cc").then(t.bind(null,"1092"))},blank:function(){return t.e("chunk-4f6208b2").then(t.bind(null,"8578"))},peek:ee,debug:H,loadingModal:oe},computed:{layout:function(){var e=this.$route.meta.layout;return e||"basic"}}},se=ie,ue=Object(K["a"])(se,o,i,!1,null,null,null),ce=ue.exports,ge=function(){var e=this,A=e.$createElement,t=e._self._c||A;return"checkbox"!==e.$attrs.type||e.disable?"radio"!==e.$attrs.type||e.disable?e.disable?"password"!==e.$attrs.type?t("div",{staticClass:"input"},[e._v(" "+e._s(e.value)+" ")]):t("div",{staticClass:"input"},[e._v(" "+e._s(e._f("passwordFilter")(e.value))+" ")]):t("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.input,expression:"input"}],ref:"input-"+e.name,staticClass:"input",attrs:{name:e.name,type:e.$attrs.type},domProps:{value:e.input},on:{keyup:function(A){return!A.type.indexOf("key")&&e._k(A.keyCode,"enter",13,A.key,"Enter")?null:e.$emit("enter")},paste:e.emitRawValue,input:function(A){A.target.composing||(e.input=A.target.value)}}},"input",e.$attrs,!1)):t("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.input,expression:"input"}],ref:"input-"+e.name,staticClass:"input",attrs:{name:e.name,type:"radio"},domProps:{checked:e._q(e.input,null)},on:{keyup:function(A){return!A.type.indexOf("key")&&e._k(A.keyCode,"enter",13,A.key,"Enter")?null:e.$emit("enter")},paste:e.emitRawValue,change:function(A){e.input=null}}},"input",e.$attrs,!1)):t("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.input,expression:"input"}],ref:"input-"+e.name,staticClass:"input",attrs:{name:e.name,type:"checkbox"},domProps:{checked:Array.isArray(e.input)?e._i(e.input,null)>-1:e.input},on:{keyup:function(A){return!A.type.indexOf("key")&&e._k(A.keyCode,"enter",13,A.key,"Enter")?null:e.$emit("enter")},paste:e.emitRawValue,change:function(A){var t=e.input,n=A.target,a=!!n.checked;if(Array.isArray(t)){var r=null,o=e._i(t,r);n.checked?o<0&&(e.input=t.concat([r])):o>-1&&(e.input=t.slice(0,o).concat(t.slice(o+1)))}else e.input=a}}},"input",e.$attrs,!1))},le=[],pe=(t("38cf"),t("a9e3"),t("b0c0"),{name:"WInput",filters:{passwordFilter:function(e){var A="•";return A.repeat(e.length)}},props:{value:{type:[String,Number]},disable:{type:Boolean},name:{type:String,required:!0}},computed:{input:{get:function(){return this.value},set:function(e){this.$emit("input",e),this.$emit("change",e)}}},methods:{emitRawValue:function(){var e=this.$refs["input-".concat(this.name)];this.$emit("input",e.value),this.$emit("change",e.value)}}}),de=pe,me=(t("f0a4"),Object(K["a"])(de,ge,le,!1,null,"052adf2a",null)),Ce=me.exports,he=function(){var e=this,A=e.$createElement,t=e._self._c||A;return t("div",e._b({staticClass:"button clickable",class:{disable:e.disable},on:{click:e.clickEvent}},"div",e.$attrs,!1),[e.label?t("div",[e._v(" "+e._s(e.label)+" ")]):e._e()])},we=[],fe={name:"WBtn",props:{label:{type:String},disable:{type:Boolean}},methods:{clickEvent:function(e){this.disable||this.$emit("click",e)}}},Be=fe,ve=(t("94d2"),Object(K["a"])(Be,he,we,!1,null,"64e9ca0a",null)),Ee=ve.exports,be=[{title:"IW5 Multiplayer",icon:t("278b"),logo:t("cf0e"),tag:"iw5mp",type:"game"},{title:"T6 Multiplayer",icon:t("24a9"),logo:t("6584"),tag:"t6mp",type:"game",installed:!0},{title:"T6 Zombies",icon:t("8e06"),logo:t("ec0a"),tag:"t6zm",type:"game"},{title:"T5 Multiplayer",icon:t("636a"),logo:t("27b7"),tag:"t5mp",type:"game"},{title:"T5 Zombies",icon:t("1c3a"),logo:t("0492"),tag:"t5sp",type:"game"},{title:"T4 Multiplayer",icon:t("a6ed"),logo:t("3a65"),tag:"t4mp",type:"game"},{title:"T4 Co-Op/Zombies",icon:t("7a67"),logo:t("a499"),tag:"t4sp",type:"game"}],ke=function(){be&&J["a"].insert({data:be})};n["default"].component("w-input",Ce),n["default"].component("w-btn",Ee),n["default"].use(r.a),ke();var Ie=console.log,ye=console.error,Qe=function(e,A,t){_.dispatch("ui/debugLog",{message:e,type:A}),t&&t(e)};console.log=function(e){return Qe(e,"log",Ie)},console.error=function(e){return Qe(e,"error",ye)},n["default"].config.productionTip=!1,new n["default"]({router:B,store:_,render:function(e){return e(ce)}}).$mount("#app")},"636a":function(e,A,t){e.exports=t.p+"img/t5mp_icon.215e7d94.png"},6584:function(e,A,t){e.exports=t.p+"img/t6mp_logo.e4fc734b.png"},"75b9":function(e,A,t){},"7a67":function(e,A,t){e.exports=t.p+"img/t4sp_icon.1e1987d8.png"},"7add":function(e,A,t){"use strict";t("bcbc")},"8e06":function(e,A,t){e.exports=t.p+"img/t6zm_icon.992fa331.png"},9193:function(e,A,t){"use strict";t.d(A,"a",(function(){return u}));var n=t("d4ec"),a=t("bee2"),r=t("262e"),o=t("2caf"),i=t("ade3"),s=t("0937"),u=function(e){Object(r["a"])(t,e);var A=Object(o["a"])(t);function t(){return Object(n["a"])(this,t),A.apply(this,arguments)}return Object(a["a"])(t,null,[{key:"fields",value:function(){return{title:this.string(),icon:this.string(),logo:this.string(),tag:this.string(),installed:this.boolean(!1),latestVersion:this.string(null)}}}]),t}(s["a"]);Object(i["a"])(u,"entity","games"),Object(i["a"])(u,"primaryKey","tag")},"94d2":function(e,A,t){"use strict";t("1154")},a499:function(e,A,t){e.exports=t.p+"img/t4sp_logo.3b95821f.png"},a6ed:function(e,A,t){e.exports=t.p+"img/t4mp_icon.84a265b7.png"},b7dc:function(e,A,t){},bcbc:function(e,A,t){},cf0e:function(e,A,t){e.exports=t.p+"img/iw5_logo.9bd3a45d.png"},da13:function(e,A,t){},dd77:function(e,A,t){"use strict";t("75b9")},ec0a:function(e,A,t){e.exports=t.p+"img/t6zm_logo.6935c7f4.png"},f0a4:function(e,A,t){"use strict";t("da13")}});
//# sourceMappingURL=app.454f4f9e.js.map