(function(e){function t(t){for(var n,a,i=t[0],c=t[1],u=t[2],f=0,p=[];f<i.length;f++)a=i[f],Object.prototype.hasOwnProperty.call(r,a)&&r[a]&&p.push(r[a][0]),r[a]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);l&&l(t);while(p.length)p.shift()();return o.push.apply(o,u||[]),s()}function s(){for(var e,t=0;t<o.length;t++){for(var s=o[t],n=!0,i=1;i<s.length;i++){var c=s[i];0!==r[c]&&(n=!1)}n&&(o.splice(t--,1),e=a(a.s=s[0]))}return e}var n={},r={app:0},o=[];function a(t){if(n[t])return n[t].exports;var s=n[t]={i:t,l:!1,exports:{}};return e[t].call(s.exports,s,s.exports,a),s.l=!0,s.exports}a.m=e,a.c=n,a.d=function(e,t,s){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(a.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(s,n,function(t){return e[t]}.bind(null,n));return s},a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="/";var i=window["webpackJsonp"]=window["webpackJsonp"]||[],c=i.push.bind(i);i.push=t,i=i.slice();for(var u=0;u<i.length;u++)t(i[u]);var l=c;o.push([0,"chunk-vendors"]),s()})({0:function(e,t,s){e.exports=s("56d7")},"034f":function(e,t,s){"use strict";var n=s("64a9"),r=s.n(n);r.a},"56d7":function(e,t,s){"use strict";s.r(t);s("cadf"),s("551c"),s("f751"),s("097d");var n=s("2b0e"),r=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{attrs:{id:"app"}},[s("div",{staticClass:"container"},[s("header",[s("h1",{staticClass:"header-title"},[e._v(e._s(e.info.title))]),s("p",{staticClass:"origin-ip-container"},[s("span",{staticClass:"origin-text"},[e._v("IP: ")]),s("span",{staticClass:"origin-ip"},[e._v(e._s(e.info.ip))])])]),s("main",[s("br"),s("el-button",{attrs:{icon:e.refreshIcon,circle:""},on:{click:e.refreshNode}}),e._l(e.info.groups,(function(t,n){return s("div",{key:n,staticClass:"group-container"},[s("div",{staticClass:"group-header"},[s("span",{staticClass:"header-title"},[e._v(e._s(t.name))]),s("span",{staticClass:"header-des"},[e._v(e._s(t.description))])]),s("div",{staticClass:"group-select-container"},e._l(t.sets,(function(t,r){return s("div",{key:"sub"+r,staticClass:"sub-switch"},[s("el-switch",{attrs:{"active-text":t.name+" ("+t.description+")"},on:{change:function(t){return e.handleChange(n,r)}},model:{value:t.here,callback:function(s){e.$set(t,"here",s)},expression:"subItem.here"}})],1)})),0)])}))],2)])])},o=[],a=!1,i="";i=a?"https://railgun.momobako.com":window.location.protocol+"//"+window.location.host,console.log(i);var c={name:"app",created:function(){this.refreshNode()},data:function(){return{info:{title:"Loading...",ip:"0.0.0.0"},nowSelect:"",refreshIcon:"el-icon-refresh-right"}},methods:{refreshNode:function(){this.refreshIcon="el-icon-loading";var e=this;this.axios.get(i+"/api/get").then((function(t){console.log(t),e.info=t.data,e.refreshIcon="el-icon-refresh-right",e.$message({message:"刷新成功",type:"success"})})).catch((function(t){e.$message({message:"出现意想不到的错误",type:"error"})}))},handleChange:function(e,t){for(var s=this,n=0;n<this.info.groups[e].sets.length;n++)n!==t&&(this.info.groups[e].sets[n].here=!1);this.info.groups[e].sets[t].here?this.axios.post(i+"/api/add",{setname:this.info.groups[e].sets[t].setname}).then((function(e){!1===e.data.success?(s.$message({message:e.data.message,type:"error"}),s.refreshNode()):s.$message({message:"更改成功",type:"success"})})).catch((function(e){s.$message({message:e.message,type:"error"}),s.refreshNode()})):this.axios.post(i+"/api/del",{setname:this.info.groups[e].sets[t].setname}).then((function(e){!1===e.data.success?(s.$message({message:e.data.message,type:"error"}),s.refreshNode()):s.$message({message:"更改成功",type:"success"})})).catch((function(e){s.$message({message:e.message,type:"error"}),s.refreshNode()}))}}},u=c,l=(s("034f"),s("2877")),f=Object(l["a"])(u,r,o,!1,null,null,null),p=f.exports,h=s("5c96"),d=s.n(h);s("0fae");n["default"].use(d.a);var g=s("a7fe"),m=s.n(g),v=s("bc3a"),b=s.n(v);n["default"].config.productionTip=!1,n["default"].use(m.a,b.a),new n["default"]({render:function(e){return e(p)}}).$mount("#app")},"64a9":function(e,t,s){}});
//# sourceMappingURL=app.ccd23152.js.map