1 |
- (function(t){function e(e){for(var s,r,o=e[0],c=e[1],u=e[2],d=0,p=[];d<o.length;d++)r=o[d],n[r]&&p.push(n[r][0]),n[r]=0;for(s in c)Object.prototype.hasOwnProperty.call(c,s)&&(t[s]=c[s]);l&&l(e);while(p.length)p.shift()();return a.push.apply(a,u||[]),i()}function i(){for(var t,e=0;e<a.length;e++){for(var i=a[e],s=!0,o=1;o<i.length;o++){var c=i[o];0!==n[c]&&(s=!1)}s&&(a.splice(e--,1),t=r(r.s=i[0]))}return t}var s={},n={index:0},a=[];function r(e){if(s[e])return s[e].exports;var i=s[e]={i:e,l:!1,exports:{}};return t[e].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=t,r.c=s,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},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 i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)r.d(i,s,function(e){return t[e]}.bind(null,s));return i},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="/dist/";var o=window["webpackJsonp"]=window["webpackJsonp"]||[],c=o.push.bind(o);o.push=e,o=o.slice();for(var u=0;u<o.length;u++)e(o[u]);var l=c;a.push([0,"chunk-vendors","chunk-common"]),i()})({0:function(t,e,i){t.exports=i("921e")},"072e":function(t,e,i){},"0c5a":function(t,e,i){},1605:function(t,e,i){},"192d":function(t,e,i){},3059:function(t,e,i){"use strict";var s=i("1605"),n=i.n(s);n.a},4057:function(t,e,i){"use strict";var s=i("0c5a"),n=i.n(s);n.a},"43d3":function(t,e,i){"use strict";var s=i("bbfe"),n=i.n(s);n.a},"48d1":function(t,e,i){},"49c2":function(t,e,i){},"4ead":function(t,e,i){},7313:function(t,e,i){"use strict";var s=i("072e"),n=i.n(s);n.a},"78b7":function(t,e,i){"use strict";var s=i("ef14"),n=i.n(s);n.a},"921e":function(t,e,i){"use strict";i.r(e);i("9e1f"),i("450d");var s=i("6ed5"),n=i.n(s),a=(i("cadf"),i("551c"),i("097d"),i("2b0e")),r=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"app"}},[i("div",{staticClass:"c-main"},[t.toApp?i("div",{staticClass:"c-wrap"},[i("panel"),t.curSession?i("chat-room",{attrs:{sessionId:t.curSession}}):i("div",{staticClass:"no-chat"},[i("i",{staticClass:"mee-icon"})])],1):i("div",{staticClass:"c-login"},[i("login-box")],1)]),t._m(0)])},o=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"c-copyright"},[i("span",[t._v("copyright © 2019 MeeChat.")])])}],c=(i("96cf"),i("1da1")),u=i("be94"),l=i("8476"),d=i("33f8"),p=i("2f62"),m=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"c-loginBox"},[t.isLogin?i("el-button",{staticClass:"login-btn",attrs:{type:"primary",loading:!0}},[t._v("\n 自动登录中\n ")]):i("el-button",{staticClass:"login-btn",attrs:{type:"primary"},on:{click:t.handleLogin}},[t._v("\n 登录\n ")]),i("p",[t._v("请使用scatter进行登录")])],1)},h=[],f=(i("7f7f"),i("1951"),i("eedf")),v=i.n(f);a["default"].component(v.a.name,v.a);var g={name:"loginBox",created:function(){},computed:Object(u["a"])({},Object(p["d"])(["account"]),{isLogin:function(){return this.$store.state.chat.isLogin}}),methods:{handleLogin:function(){var t=Object(c["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.$store.dispatch("doScatterLogin");case 3:return t.next=5,this.$store.dispatch("doGameLogin");case 5:this.$store.commit("chatAppLogin",!0),this.$store.commit("toApp",!0),t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),this.$store.commit("chatAppLogin",!1);case 12:case"end":return t.stop()}},t,this,[[0,9]])}));return function(){return t.apply(this,arguments)}}()}},b=g,_=(i("78b7"),i("2877")),C=Object(_["a"])(b,m,h,!1,null,"09b7c592",null);C.options.__file="loginBox.vue";var w=C.exports,k=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"c-view"},[i("div",{staticClass:"box"},[i("div",{staticClass:"box-hd"},[i("div",{staticClass:"title-wrap"},[t._v("\n "+t._s(t.isPrivate?t.group.privateName:t.group.groupName)+"\n "),t.isPrivate?t._e():i("i",{staticClass:"el-icon-more",on:{click:function(e){t.groupSet=!t.groupSet}}})])]),i("chat-pin",t._b({on:{pinMsgClose:t.pinMsgClose,scrollToView:t.scrollToView}},"chat-pin",t.pinMsg,!1)),i("div",{staticClass:"box-bd",style:{height:t.scrollHeight-(t.pinMsg.visible?30:0)+"px"}},[i("div",{ref:"scrollWrap",staticClass:"bar",on:{scroll:t.handleScroll}},[i("div",{ref:"msgWrap",staticClass:"scroll-wrapper"},[i("div",{staticClass:"msg-wrap"},[t.lockEnd?i("div",{staticClass:"msg-top-more"},[i("em",[t._v("没有更多了")])]):t._e(),t.lockMore&&!t.lockEnd?i("div",{staticClass:"msg-top-load"},[i("i",{staticClass:"msg-loading-icon"})]):t._e(),t.group.chatList.length?t._l(t.group.pinList,function(e,s){return i("msg-item",t._b({key:"pin"+s,on:{quoteMsg:t.quoteMsg,deleteMsg:t.deleteMsg}},"msg-item",e,!1))}):t._e(),t._l(t.group.chatList,function(e,s){return i("msg-item",t._b({key:s,attrs:{isPrivate:t.isPrivate,msgItem:e},on:{quoteMsg:t.quoteMsg,deleteMsg:t.deleteMsg}},"msg-item",e,!1))})],2)])]),t.isPrivate?t._e():i("at-me",{attrs:{atList:t.atList},on:{scrollToMsg:t.scrollToMsg}}),t.group.unreadNums>0&&t.enableScroll?i("div",{staticClass:"msg-unread",on:{click:t.doSetRead}},[i("em",[i("i",{staticClass:"el-icon-d-arrow-right"}),t._v(t._s(t.group.unreadNums)+"条未读消息")])]):t._e()],1),i("input-area",{ref:"inputArea",on:{toBottom:t.resizeToBottom}})],1),t.group.members&&!t.isPrivate?i("chat-set",{class:{"move-left":t.groupSet}}):t._e()],1)},x=[],y=(i("20d6"),i("c5f6"),i("2f35")),N=i("34d0"),$=i("9360"),I=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"r-view pub-scroll-box"},[i("div",{staticClass:"setting-top"},[i("div",{staticClass:"search-input"},[i("input",{attrs:{type:"text",placeholder:"搜索群成员"},on:{input:function(e){t.searchUser(e,t.membersArray)}}}),i("i",{staticClass:"el-icon-search"})]),t.isSearch?i("ul",{staticClass:"user-list"},[t._l(t.searchList,function(e,s){return[i("li",{key:s,staticClass:"list-item",on:{click:function(i){t.$showOtherInfo(e.user_id)}}},[e.cover_photo?i("img",{staticClass:"avatar",attrs:{src:e.cover_photo,alt:""}}):i("div",{staticClass:"user-avatar avatar",class:"avatar_bg"+e.user_id%9,attrs:{title:e.nick_name,"data-name":e.nick_name.slice(0,2).toUpperCase()}}),i("span",{staticClass:"name"},[t._v(t._s(e.nick_name))])])]})],2):i("ul",{staticClass:"user-list",class:{"height-limit":t.limitHeight}},[t.isAdmin?i("li",{staticClass:"list-item",on:{click:t.$showInvite}},[t._m(0),i("span",{staticClass:"name"},[t._v("添加")])]):t._e(),t.isAdmin?i("li",{staticClass:"list-item"},[t._m(1),i("span",{staticClass:"name"},[t._v("删除")])]):t._e(),t._l(t.membersArray,function(e,s){return[i("li",{key:s,staticClass:"list-item",on:{click:function(i){t.$showOtherInfo(e.user_id)}}},[e.cover_photo?i("img",{staticClass:"avatar",attrs:{src:e.cover_photo,alt:""}}):i("div",{staticClass:"user-avatar avatar",class:"avatar_bg"+e.user_id%9,attrs:{title:e.nick_name,"data-name":e.nick_name.slice(0,2).toUpperCase()}}),i("span",{staticClass:"name"},[t._v(t._s(e.nick_name))])])]})],2),t.group.userCounts>6?i("div",{staticClass:"show-all-btn",on:{click:function(e){t.limitHeight=!t.limitHeight}}},[t._v("\n "+t._s(t.limitHeight?"展开全部":"收起")+" "),i("i",{class:"el-icon-arrow-"+(t.limitHeight?"down":"up")})]):t._e()]),t.isAdmin?i("div",{staticClass:"setting-item"},[i("div",{staticClass:"title"},[t._v("群名")]),t.isEdit?i("input",{directives:[{name:"model",rawName:"v-model",value:t.newGroupName,expression:"newGroupName"},{name:"focus",rawName:"v-focus"}],staticClass:"edit-full-input",attrs:{type:"text"},domProps:{value:t.newGroupName},on:{blur:t.handleTitleBlur,input:function(e){e.target.composing||(t.newGroupName=e.target.value)}}}):i("p",{staticClass:"text",on:{click:t.handleTitleFocus}},[t._v(t._s(t.group.groupName)),i("i",{staticClass:"el-icon-edit"})])]):t._e(),t.isAdmin?i("div",{staticClass:"setting-item"},[i("div",{staticClass:"title"},[t._v("设置群头像")]),i("p",{staticClass:"text cursor",on:{click:function(e){t.$editGroupAvatar(t.group.coverPhoto)}}},[t.group.coverPhoto?i("img",{staticClass:"team-avatar",attrs:{src:t.group.coverPhoto,alt:""}}):i("span",{staticClass:"no-avatar"},[i("i",{staticClass:"el-icon-plus"})]),i("i",{staticClass:"el-icon-arrow-right team-arrow-icon"})])]):t._e(),i("div",{staticClass:"setting-item"},[i("div",{staticClass:"title"},[t._v("群公告")]),t.isAdmin?i("p",{staticClass:"text cursor",on:{click:t.handleOpenNotice}},[t._v(t._s(t.group.groupNotice)),i("i",{staticClass:"el-icon-edit"})]):[t.group.groupNotice?i("p",{staticClass:"text notice"},[t._v("\n "+t._s(t.group.groupNotice)+"\n ")]):i("p",{staticClass:"text notice"},[t._v("\n 暂无公告\n ")])]],2),i("div",{staticClass:"setting-item"},[i("div",{staticClass:"title"},[t._v("群邀请链接")]),i("p",{staticClass:"text"},[t.isEditLink?[i("em",{staticClass:"edit-name-path"},[t._v(t._s(t.sharePath))]),i("input",{directives:[{name:"model",rawName:"v-model",value:t.editShareName,expression:"editShareName"},{name:"focus",rawName:"v-focus"}],staticClass:"edit-name-input",attrs:{type:"text",autofocus:""},domProps:{value:t.editShareName},on:{blur:t.handleLinkBlur,input:function(e){e.target.composing||(t.editShareName=e.target.value)}}})]:[i("a",{staticClass:"invite-link",attrs:{href:"javascript:"},on:{click:function(e){t.copyLink(t.group.inviteUrl)}}},[t._v(t._s(t.sharePath+t.shareName))]),t.isAdmin?i("span",{staticClass:"invite-editBtn",on:{click:t.handleLinkFocus}},[i("i",{staticClass:"el-icon-edit"})]):t._e()]],2)]),i("div",{staticClass:"setting-item"},[i("div",{staticClass:"title"},[t._v("消息免打扰")]),i("p",{staticClass:"text"},[i("el-switch",{attrs:{"active-value":"1","inactive-value":"0","active-color":"#2298f0","inactive-color":"#cbcbcb"},on:{change:t.changeMute},model:{value:t.sessionInfo.is_mute,callback:function(e){t.$set(t.sessionInfo,"is_mute",e)},expression:"sessionInfo.is_mute"}})],1)]),i("div",{staticClass:"setting-item"},[i("div",{staticClass:"title"},[t._v("置顶聊天")]),i("p",{staticClass:"text"},[i("el-switch",{attrs:{"active-value":"1","inactive-value":"0","active-color":"#2298f0","inactive-color":"#cbcbcb"},on:{change:t.changePin},model:{value:t.sessionInfo.is_pin,callback:function(e){t.$set(t.sessionInfo,"is_pin",e)},expression:"sessionInfo.is_pin"}})],1)]),i("div",{staticClass:"setting-bottom"},[i("button",{staticClass:"delete-btn",on:{click:t.leaveGroup}},[t._v("退出群组")])]),i("transition",{attrs:{name:"msgbox-fade"}},[t.editNotice?i("div",{staticClass:"pub-wrapper"},[i("div",{staticClass:"pub-mask"}),i("div",{staticClass:"pub-modal notice-modal"},[i("div",{staticClass:"modal-hd"},[i("div",{staticClass:"title"},[t._v("群公告")]),i("i",{staticClass:"el-icon-close",on:{click:function(e){t.editNotice=!1}}})]),i("div",{staticClass:"modal-bd"},[i("textarea",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:t.newNotice,expression:"newNotice"}],attrs:{placeholder:"请输入你的群公告"},domProps:{value:t.newNotice},on:{input:function(e){e.target.composing||(t.newNotice=e.target.value)}}})]),i("div",{staticClass:"modal-fd"},[i("el-button",{attrs:{type:"primary"},on:{click:t.handleNotice}},[t._v("确认")])],1)])]):t._e()])],1)},S=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"avatar btn"},[i("i",{staticClass:"el-icon-plus"})])},function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"avatar btn"},[i("i",{staticClass:"el-icon-minus"})])}],j=(i("4917"),i("e960"),i("b35b")),L=i.n(j),M=i("5975"),O=i("8869");a["default"].component(v.a.name,v.a),a["default"].component(L.a.name,L.a);var E={name:"chatSet",mixins:[O["b"]],computed:Object(u["a"])({},Object(p["d"])({myId:function(t){return t.userId},group:function(t){return t.group},curGroupId:function(t){return t.curSession},members:function(t){return t.group.members},sessionInfo:function(t){return t.group.sessionInfo},shareName:function(t){return t.group.shareName},adminList:function(t){return t.group.adminList}}),{isAdmin:function(){var t=this;return this.adminList&&this.adminList.some(function(e){return e==t.myId})},membersArray:function(){var t=[],e=0;for(var i in this.members)t[e]=this.members[i],e++;return t}}),components:{},data:function(){return{msgPush:!1,msgTop:!1,limitHeight:!0,isEdit:!1,newGroupName:"",newLink:"",newNotice:"",isEditLink:!1,editNotice:!1,editShareName:"",sharePath:"".concat(location.origin,"/s/")}},methods:Object(u["a"])({},Object(p["b"])(["updateSessionItem"]),{handleTitleBlur:function(){var t=this;this.isEdit=!1,this.newGroupName.length&&M["a"].group.changeTitle({group_id:this.curGroupId,title:this.newGroupName}).then(function(e){e.data;t.updateSessionItem({sessionId:t.curGroupId,data:{name:t.newGroupName}}),t.$store.commit("updateGroup",{key:"groupName",data:t.newGroupName})})},handleTitleFocus:function(){this.isEdit=!0,this.newGroupName=this.group.groupName},handleLinkBlur:function(){var t=Object(c["a"])(regeneratorRuntime.mark(function t(){var e=this;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(this.isEditLink=!1,!this.editShareName.match(/^\d{1,}$/)){t.next=4;break}return this.$showTips("分享链接不能是纯数字"),t.abrupt("return");case 4:if(this.editShareName.match(/^(\w|.){1,}$/)){t.next=7;break}return this.$showTips("分享链接只能是英文字母,数字和 . 的组合"),t.abrupt("return");case 7:return t.next=9,Object(d["f"])("分享链接只能被修改一次,确认修改为:".concat(this.sharePath+this.editShareName),"提示").catch(function(t){});case 9:M["a"].group.changeName({group_id:this.curGroupId,name:this.editShareName}).then(function(){e.$store.commit("updateGroup",{key:"shareName",data:e.editShareName})});case 10:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),handleLinkFocus:function(){this.isEditLink=!0,this.editShareName=this.shareName},handleNotice:function(){var t=this;M["a"].group.changeNotice({group_id:this.curGroupId,notice:this.newNotice}).then(function(){t.$showTips("修改成功"),t.editNotice=!1,t.$store.commit("updateGroup",{key:"groupNotice",data:t.newNotice})})},handleOpenNotice:function(){this.editNotice=!0,this.newNotice=this.group.groupNotice},copyLink:function(t){var e=this;this.$copyText(t).then(function(t){e.$showTips("复制成功")})},changePin:function(t){var e=this;"1"===t?M["a"].session.setPin({session_id:this.curGroupId}).then(function(){e.$store.commit("updatePin",t),e.$store.commit("updateSessionListByPin",e.curGroupId)}):M["a"].session.cancelPin({session_id:this.curGroupId}).then(function(){e.$store.commit("updatePin",t),e.$store.commit("cancelSessionListByPin",e.curGroupId)})},changeMute:function(t){var e=this;"1"===t?M["a"].session.setMute({session_id:this.curGroupId}).then(function(){e.$store.commit("updateMute",t)}):M["a"].session.cancelMute({session_id:this.curGroupId}).then(function(){e.$store.commit("updateMute",t)})},leaveGroup:function(){var t=this;Object(d["f"])("确认退出该群聊?").then(function(){M["a"].group.leaveGroup({group_id:t.curGroupId}).then(function(){t.$showTips("已退出该群聊")})})}})},P=E,T=(i("a446"),Object(_["a"])(P,I,S,!1,null,"24e8b988",null));T.options.__file="index.vue";var A=T.exports,G=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"box-ft"},[i("transition",{attrs:{name:"msgbox-fade"}},[i("Emoji",{directives:[{name:"show",rawName:"v-show",value:t.emojiShow,expression:"emojiShow"}],on:{addEmoji:t.addEmoji}})],1),t.atShow?i("chat-at",{ref:"chatAt",attrs:{curInd:t.atInd,filterList:t.filterMembers},on:{atperson:t.atPerson}}):t._e(),i("div",{staticClass:"toolbar"},[i("i",{staticClass:"look-icon",on:{click:function(e){e.stopPropagation(),t.emojiShow=!t.emojiShow}}}),i("div",{staticClass:"file-icon"},[i("input",{ref:"inputFile",attrs:{type:"file",name:"res"},on:{change:t.handleFile}})])]),i("div",{staticClass:"send-content"},[i("form",{staticClass:"input-wrap",on:{submit:t.handleSend}},[i("textarea",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:t.inputMsg,expression:"inputMsg"}],ref:"chatInput",attrs:{cols:"1",rows:"1",placeholder:""},domProps:{value:t.inputMsg},on:{keydown:[function(e){return"button"in e||!t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?(e.preventDefault(),t.handleUp(e)):null},function(e){return"button"in e||!t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?(e.preventDefault(),t.handleDown(e)):null},function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.handleKeyDown(e):null}],blur:t.handleBlur,input:function(e){e.target.composing||(t.inputMsg=e.target.value)}}})])]),i("div",{staticClass:"send-action"},[t._v("Enter发送,Ctrl + Enter 换行\n "),i("el-button",{on:{click:t.handleSend}},[t._v("发送")])],1)],1)},U=[],B=(i("ac6a"),i("5df3"),i("1c4c"),i("0fb7"),i("f529")),R=i.n(B),D=(i("a481"),i("4e81")),F=i("a1aa"),H=i("b16d"),q={name:"inputArea",mixins:[O["a"]],components:{Emoji:D["a"],chatAt:F["a"]},computed:Object(u["a"])({},Object(p["d"])(["group","userId"]),Object(p["d"])({chatInputFocus:function(t){return t.group.chatInputFocus},blockList:function(t){return t.group.blockList}}),{filterMembers:function(){var t=this.inputMsg.replace("@",""),e=this.group.members,i=[];for(var s in e)s!=this.userId&&-1===t.indexOf(e[s].user_name)&&i.push(e[s]);return i},atShow:function(){return this.inputMsg.match(/@$/)&&this.filterMembers.length}}),data:function(){return{emojiShow:!1,inputMsg:"",atInd:0}},mounted:function(){var t=this;document.addEventListener("paste",this.initPaste),document.addEventListener("drop",this.initDrop),document.addEventListener("dragover",this.initDragOver),document.body.addEventListener("click",function(){t.emojiShow=!1})},beforeDestroy:function(){document.removeEventListener("paste",this.initPaste),document.removeEventListener("drop",this.initDrop),document.removeEventListener("dragover",this.initDragOver)},methods:Object(u["a"])({},Object(p["c"])(["updateChatInputFocus","addChatItem"]),Object(p["b"])(["doSendMsg","doSendFile"]),{addEmoji:function(t){this.inputMsg+=t,this.emojiShow=!1,this.$refs.chatInput.focus()},handleKeyDown:function(t){if(!this.atShow)return t.altKey||t.ctrlKey||t.metaKey?this.inputMsg=this.inputMsg+"\n":(t.returnValue=!1,this.handleSend(t)),!1;t.preventDefault();var e=this.filterMembers[this.atInd];this.atPerson(e.user_name)},handleSend:function(t){var e=this;if(this.blockList.some(function(t){return t==e.userId}))R()({message:"您已被禁言",type:"error"});else{var i=this.inputMsg.trim();if(0!==i.length){var s={type:0,msg:i};if(this.group.members[this.userId]){var n=Date.now();this.addChatItem({from:this.userId,content:i,hash:"".concat(n),timestamp:n,createTime:n,msg_type:"0",loading:!0}),s.createTime=n}return this.doSendMsg(s),this.$nextTick(function(){this.inputMsg="",this.$emit("toBottom")}),t.preventDefault(),!1}R()({message:"聊天内容不能为空",type:"warning"})}},preHandleFile:function(){var t=Object(c["a"])(regeneratorRuntime.mark(function t(e){var i,s,n;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(i=e.type,s=e.size,!i.match("video")){t.next=6;break}return t.abrupt("return",s>3145728?Promise.reject(new Error(e)):Promise.resolve({type:2,res:e}));case 6:if(!i.match("audio")){t.next=10;break}return t.abrupt("return",s>2097152?Promise.reject(new Error(e)):Promise.resolve({type:3,res:e}));case 10:if(!i.match("image")){t.next=15;break}return t.next=13,new H["a"]({file:e,maxSize:1048576});case 13:return n=t.sent,t.abrupt("return",{type:1,preview:n.base64,res:n.res});case 15:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),handleFile:function(){var t=Object(c["a"])(regeneratorRuntime.mark(function t(e){var i,s,n,a,r=this;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return i=e.constructor===File?e:e.target.files[0],t.prev=1,t.next=4,this.preHandleFile(i);case 4:s=t.sent,n={res:s.res},this.group.members[this.userId]&&(a=Date.now(),this.addChatItem({content:s.preview||"",from:this.userId,hash:"".concat(a),msg_type:s.type,timestamp:a,res:s.res,loading:!0,createTime:a}),n.createTime=a),this.doSendFile(n),setTimeout(function(){r.$refs.inputFile.value=null,r.$emit("toBottom")},100),t.next=14;break;case 11:t.prev=11,t.t0=t["catch"](1),R()({message:"上传文件大小限制:音频2M以内,视频3M以内",type:"warning"});case 14:case"end":return t.stop()}},t,this,[[1,11]])}));return function(e){return t.apply(this,arguments)}}(),handleBlur:function(){this.updateChatInputFocus(!1)},initDrop:function(t){var e=this;t.preventDefault();var i=Array.from(t.dataTransfer.files);i.forEach(function(t){return e.handleFile(t)})},initDragOver:function(t){t.preventDefault()},initPaste:function(t){var e=this,i=(t.clipboardData||window.clipboardData).items;i&&i.length&&Array.from(i).forEach(function(t){var i=t.getAsFile();i&&e.handleFile(i)})}})},W=q,z=(i("c79b"),Object(_["a"])(W,G,U,!1,null,"0b601b05",null));z.options.__file="inputArea.vue";var V=z.exports;a["default"].component(v.a.name,v.a);var K={name:"chatRoom",components:{msgItem:y["a"],inputArea:V,chatSet:A,chatPin:N["a"],atMe:$["a"]},props:{sessionId:[String,Number]},watch:{sessionId:function(t){this.groupSet=!1,this.lockMore=!1,this.lockEnd=!1,this.enableScroll=!1,this.initRoom()},unreadNums:function(t,e){t>0&&this.isBottom&&this.resizeToBottom()}},data:function(){return{groupSet:!1,lockMore:!1,lockEnd:!1,enableScroll:!1,isBottom:!0,scrollHeight:100,isScrollToView:!1}},computed:Object(u["a"])({},Object(p["d"])(["group","userId","userInfo"]),Object(p["d"])({pinMsg:function(t){return t.group.pinMsg},pinList:function(t){return t.group.pinList},atList:function(t){return t.group.atList}}),{isPrivate:function(){return/-/g.test(this.sessionId)}}),mounted:function(){var t=this;this.scrollHeight=Object(d["l"])(),window.onresize=function(){t.scrollHeight=Object(d["l"])()},this.initRoom(),document.addEventListener("contextmenu",function(t){return t.preventDefault()})},methods:Object(u["a"])({},Object(p["c"])(["initGroup","resetUnreadNums","addChatItem","deleteChatItem","initState","clearAtList"]),Object(p["b"])(["getGroupInfo","getNewMsg","getHistoryMsg","doSendMsg","getPrivateNewMsg","getPrivateHistoryMsg","doSendPrivateMsg"]),{initRoom:function(){this.initState(this.userInfo),this.isPrivate?this.initPersonChat():this.initGroupChat()},initPersonChat:function(){var t=Object(c["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.getPrivateNewMsg();case 2:this.$nextTick(this.resizeToBottom);case 3:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),initGroupChat:function(){var t=Object(c["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return this.initGroup({userId:this.userId,groupId:this.sessionId,useCache:!1}),t.next=3,this.getGroupInfo();case 3:return t.next=5,this.getNewMsg();case 5:this.$nextTick(this.resizeToBottom);case 6:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),initScrollEvent:function(){},handleScroll:function(){var t=Object(c["a"])(regeneratorRuntime.mark(function t(e){var i,s,n,a,r=this;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(this.group.chatList.length){t.next=2;break}return t.abrupt("return");case 2:if(!this.isScrollToView){t.next=4;break}return t.abrupt("return");case 4:if(this.enableScroll=!0,i=this.$refs.msgWrap.offsetHeight,s=e.target.scrollTop,0!==s||this.lockMore){t.next=20;break}if(null===this.group.endHash){t.next=20;break}if(this.lockMore=!0,!this.isPrivate){t.next=16;break}return t.next=13,this.getPrivateHistoryMsg();case 13:n=t.sent,t.next=19;break;case 16:return t.next=18,this.getHistoryMsg();case 18:n=t.sent;case 19:"end"===n?this.lockEnd=!0:(a=i-s,this.$nextTick(function(){e.target.scrollTop=r.$refs.msgWrap.offsetHeight-a,setTimeout(function(){r.lockMore=!1},800)}));case 20:s+e.target.offsetHeight>i?(this.isBottom=!0,this.group.unreadNums&&this.resetUnreadNums()):this.isBottom=!1;case 21:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),resizeToBottom:function(){this.$refs.scrollWrap.scrollTop=this.$refs.msgWrap.offsetHeight,this.resetUnreadNums(),this.isBottom=!0},doSetRead:function(){this.resizeToBottom()},quoteMsg:function(t){this.$refs.inputArea.inputMsg=t},deleteMsg:function(t){this.deleteChatItem(t)},pinMsgClose:function(){this.pinMsg.visible=!1},scrollToView:function(){var t=this;if(this.pinList.length){var e=this.$refs.msgWrap.querySelector(".msg-item");Object(d["p"])(this.$refs.scrollWrap,e.offsetTop-(this.pinMsg?40:10),e)}else{var i=this.pinMsg.hash,s=this.group.chatList.findIndex(function(t){return t.hash===i});if(s>=0){var n=this.$refs.msgWrap.querySelectorAll(".msg-item").item(s);Object(d["p"])(this.$refs.scrollWrap,n.offsetTop-(this.pinMsg?40:10),n)}}this.isScrollToView=!0,setTimeout(function(){t.isScrollToView=!1},2e3)},scrollToMsg:function(t){var e=this.atList[t].hash,i=this.group.chatList.findIndex(function(t){return t.hash===e});if(i>=0){var s=this.group.pinList.length,n=this.$refs.msgWrap.querySelectorAll(".msg-item").item(i+s);Object(d["p"])(this.$refs.scrollWrap,n.offsetTop-(this.pinMsg?40:10),n)}this.clearAtList()}})},J=K,Q=(i("43d3"),Object(_["a"])(J,k,x,!1,null,"1ecd2248",null));Q.options.__file="chatRoom.vue";var X=Q.exports,Y=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"c-panel"},[i("div",{staticClass:"c-panel-header"},[t.userInfo?i("div",{staticClass:"avatar-wrap",on:{click:t.$showUserInfo}},[t.userInfo.cover_photo?i("img",{attrs:{src:t.userInfo.cover_photo,alt:""}}):i("div",{staticClass:"user-avatar",class:"avatar_bg"+t.userInfo.user_id%9,attrs:{"data-name":t.userInfo.nick_name.slice(0,2).toUpperCase()}})]):t._e(),t._m(0)]),i("div",{staticClass:"c-panel-nav"},[i("div",{staticClass:"panel-searbar"},[i("div",{staticClass:"input-con"},[i("i",{staticClass:"el-icon-search"}),i("input",{attrs:{type:"text",placeholder:"搜索"},on:{input:function(e){t.searchUser(e,t.sessionList)}}})]),i("i",{staticClass:"el-icon-plus",on:{click:t.$showInvite}})]),i("div",{staticClass:"chat-list pub-scroll-box"},[t.isSearch?t._l(t.searchList,function(t,e){return i("session-item",{key:e,attrs:{item:t}})}):t._l(t.sessionList,function(t,e){return i("session-item",{key:e,attrs:{item:t}})})],2)])])},Z=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("ul",{staticClass:"panel-ctrls"},[i("li",{staticClass:"current"},[i("i",{staticClass:"mee-icon-chat"})])])}],tt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"chat-item",class:t.item.session_id==t.curSession?"current":"",on:{click:function(e){t.changeSessionId(t.item.session_id)}}},[t.item.cover_photo?i("img",{staticClass:"user-avatar",attrs:{src:t.item.cover_photo,alt:""}}):i("div",{staticClass:"user-avatar",class:"avatar_bg"+t.bgColorNum(t.item.session_id),attrs:{"data-name":t.item.name.slice(0,2).toUpperCase()}}),i("div",{staticClass:"info"},[i("h3",[t._v(t._s(t.item.name))])])])},et=[],it=(i("28a5"),{name:"msgItem",props:{item:{type:Object}},computed:Object(u["a"])({},Object(p["d"])(["curSession","userId"]),{userInfo:function(){return this.$store.state.userInfo}}),methods:{changeSessionId:function(t){this.$store.commit("changeSessionId",t)},bgColorNum:function(t){var e=this;if(t.match("-")){var i=0;return t.split("-").forEach(function(t){t!==e.userId&&(i=t%9)}),i}return t%9}}}),st=it,nt=(i("dffe"),Object(_["a"])(st,tt,et,!1,null,"71f77800",null));nt.options.__file="sessionItem.vue";var at=nt.exports,rt={name:"panel",mixins:[O["b"]],data:function(){return{}},computed:Object(u["a"])({},Object(p["d"])({sessionList:function(t){return t.chat.sessionList},userInfo:function(t){return t.userInfo}})),components:{sessionItem:at},created:function(){this.$store.dispatch("getSessionList"),this.$store.dispatch("getUserInfo")}},ot=rt,ct=(i("4057"),Object(_["a"])(ot,Y,Z,!1,null,"30a0ccc9",null));ct.options.__file="panel.vue";var ut=ct.exports,lt={name:"App",components:{loginBox:w,chatRoom:X,panel:ut},computed:Object(u["a"])({},Object(p["d"])({isLogin:function(t){return t.chat.isLogin},toApp:function(t){return t.chat.toApp},curSession:function(t){return t.curSession}})),methods:Object(u["a"])({},Object(p["b"])(["setScatter","setAccount","doScatterLogin","doGameLogin","initSocket"])),created:function(){var t=Object(c["a"])(regeneratorRuntime.mark(function t(){var e=this;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:console.log("test"),l["a"].scatter.connect("MEE_CHAT").then(function(){var t=Object(c["a"])(regeneratorRuntime.mark(function t(i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(!i){t.next=19;break}return e.setScatter(l["a"].scatter),window.ScatterJS=null,t.prev=3,t.next=6,e.doScatterLogin();case 6:return t.next=8,e.doGameLogin();case 8:return t.next=10,e.initSocket();case 10:e.$store.commit("chatAppLogin",!0),e.$store.commit("toApp",!0),t.next=17;break;case 14:t.prev=14,t.t0=t["catch"](3),e.$store.commit("chatAppLogin",!1);case 17:t.next=21;break;case 19:Object(d["q"])(e.$t("installScatter"),"Scatter"),e.setAccount("");case 21:case"end":return t.stop()}},t,this,[[3,14]])}));return function(e){return t.apply(this,arguments)}}());case 2:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},dt=lt,pt=(i("f682"),i("7313"),Object(_["a"])(dt,r,o,!1,null,"14090f62",null));pt.options.__file="App.vue";var mt=pt.exports,ht=i("1c04"),ft=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"msgbox-fade"}},[t.visible?i("div",{staticClass:"pub-wrapper"},[i("div",{staticClass:"pub-mask"}),i("div",{staticClass:"pub-modal invite-modal"},[i("div",{staticClass:"modal-hd"},[i("i",{staticClass:"el-icon-close",on:{click:function(e){t.visible=!1}}})]),i("div",{staticClass:"modal-bd clearfix"},[i("div",{staticClass:"left"},[i("div",{staticClass:"search-input"},[i("input",{attrs:{type:"text",placeholder:"搜索"}}),i("i",{staticClass:"el-icon-search"})]),i("div",{staticClass:"user-list select-list"},t._l(t.checkList,function(e,s){return i("div",{key:s,staticClass:"user-item",class:{checked:e.isChecked},on:{click:function(e){t.changeState(s)}}},[e.cover_photo?i("img",{staticClass:"user-avatar",attrs:{src:e.cover_photo,alt:""}}):i("div",{staticClass:"user-avatar",class:"avatar_bg"+e.user_id%9,attrs:{"data-name":e.nick_name.slice(0,2).toUpperCase()}}),i("span",{staticClass:"name"},[t._v(t._s(e.nick_name))]),e.isChecked?i("i",{staticClass:"el-icon-circle-check"}):i("i",{staticClass:"el-icon-circle-uncheck"})])}))]),i("div",{staticClass:"right"},[i("p",{staticClass:"tips"},[t._v("请勾选需要添加的联系人")]),i("div",{staticClass:"group-name"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.groupName,expression:"groupName"}],attrs:{type:"text",placeholder:"请输入群名称"},domProps:{value:t.groupName},on:{input:function(e){e.target.composing||(t.groupName=e.target.value)}}})]),i("div",{staticClass:"user-list"},[t._l(t.checkList,function(e,s){return[e.isChecked?i("div",{key:s,staticClass:"user-item"},[e.cover_photo?i("img",{staticClass:"user-avatar",attrs:{src:e.cover_photo,alt:""}}):i("div",{staticClass:"user-avatar",class:"avatar_bg"+e.user_id%9,attrs:{"data-name":e.nick_name.slice(0,2).toUpperCase()}}),i("span",{staticClass:"name"},[t._v(t._s(e.nick_name))]),i("i",{staticClass:"el-icon-circle-close",on:{click:function(e){t.changeState(s,!1)}}})]):t._e()]})],2),i("div",{staticClass:"send-btn"},[i("el-button",{attrs:{type:"primary"},on:{click:t.createGroup}},[t._v("确认")])],1)])])])]):t._e()])},vt=[];a["default"].component(v.a.name,v.a);var gt={name:"invitePopup",data:function(){return{checkList:[],groupName:""}},computed:Object(u["a"])({},Object(p["d"])({friendList:function(t){return t.chat.friendList}}),{inviteList:function(){return this.checkList.filter(function(t){return t.isChecked}).map(function(t){return t.user_id}).join(",")}}),methods:{changeState:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.checkList[t];i["isChecked"]=e||!i["isChecked"],this.$set(this.checkList,t,i)},initList:function(){var t=Object(c["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.$store.dispatch("getFriendList");case 2:this.checkList=this.friendList,this.checkList.map(function(t){t.isChecked=!1});case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),createGroup:function(){var t=this;this.groupName?M["a"].group.createGroup({group_title:this.groupName,user_id_list:this.inviteList}).then(function(e){var i=e.data;t.$showTips("创建成功"),t.$store.commit("addSessionItem",i.data),t.visible=!1}):R()({message:"请输入群名",type:"warning"})}},created:function(){this.initList()}},bt=gt,_t=(i("ebdf"),Object(_["a"])(bt,ft,vt,!1,null,"532f9624",null));_t.options.__file="index.vue";var Ct=_t.exports,wt=i("6103");Ct.install=function(t,e){var i,s=t.extend(Ct);t.prototype.$showInvite=function(){i&&(document.body.removeChild(i.$el),i=null),i=new s({el:document.createElement("div"),computed:{$store:function(){return e}},data:function(){return{visible:!0}},i18n:wt["a"]}),document.body.appendChild(i.$el)}};var kt=Ct,xt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"msgbox-fade"}},[t.visible?i("div",{staticClass:"pub-wrapper"},[i("div",{staticClass:"pub-mask"}),i("div",{staticClass:"pub-modal avater-modal"},[i("div",{staticClass:"modal-hd"},[i("div",{staticClass:"title"},[t._v("\n "+t._s(t.isMe?"编辑头像":"编辑群头像")+"\n ")]),i("i",{staticClass:"el-icon-close",on:{click:function(e){t.visible=!1}}})]),i("div",{staticClass:"modal-bd"},[i("el-upload",{staticClass:"avatar-uploader",attrs:{action:t.uploadUrl,"show-file-list":!1,data:t.uploadData,"on-success":t.handleAvatarSuccess,name:"cover_photo","before-upload":t.beforeAvatarUpload}},[t.imageUrl?i("img",{staticClass:"avatar",attrs:{src:t.imageUrl}}):i("i",{staticClass:"el-icon-plus avatar-uploader-icon"})])],1),i("div",{staticClass:"modal-fd"},[i("el-button",{on:{click:function(e){t.visible=!1}}},[t._v("取消")])],1)])]):t._e()])},yt=[],Nt=(i("f751"),i("f225"),i("89a9")),$t=i.n(Nt);a["default"].component(v.a.name,v.a),a["default"].component($t.a.name,$t.a),a["default"].component(R.a.name,R.a);var It={name:"avatarPopup",data:function(){return{}},computed:{uploadUrl:function(){var t="";return"8080"===window.location.port&&(t="//test.mee.chat/"),this.isMe?"".concat(t,"user/changePhoto"):"".concat(t,"group/changeCover")},uploadData:function(){var t={user_id:this.$store.state.userId,token:this.$store.state.token};return this.isMe?t:Object.assign(t,{group_id:this.$store.state.curSession})}},methods:{handleAvatarSuccess:function(t,e){this.imageUrl=URL.createObjectURL(e.raw),this.$showTips("上传成功"),this.isMe?(this.$store.commit("updateUserPhoto",this.imageUrl),this.$store.commit("updateMemberAvatar",{userId:this.$store.state.userId,imageUrl:this.imageUrl})):(this.$store.dispatch("updateSessionItem",{sessionId:this.$store.state.curSession,data:{cover_photo:this.imageUrl}}),this.$store.commit("updateGroup",{key:"coverPhoto",data:this.imageUrl}))},beforeAvatarUpload:function(t){var e="image/jpeg"===t.type,i=t.size/1024/1024<1;return e&&i||this.$showTips("请上传1M以内的JPG格式图片"),e&&i}},created:function(){}},St=It,jt=(i("b83c"),Object(_["a"])(St,xt,yt,!1,null,null,null));jt.options.__file="index.vue";var Lt=jt.exports;Lt.install=function(t,e){var i,s=t.extend(Lt);t.prototype.$editUserAvatar=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";i&&(document.body.removeChild(i.$el),i=null),i=new s({el:document.createElement("div"),computed:{$store:function(){return e}},data:function(){return{visible:!0,imageUrl:t,isMe:!0}},i18n:wt["a"]}),document.body.appendChild(i.$el)},t.prototype.$editGroupAvatar=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";i&&(document.body.removeChild(i.$el),i=null),i=new s({el:document.createElement("div"),computed:{$store:function(){return e}},data:function(){return{visible:!0,imageUrl:t,isMe:!1}},i18n:wt["a"]}),document.body.appendChild(i.$el)}};var Mt=Lt,Ot=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"msgbox-fade"}},[t.visible?i("div",{staticClass:"pub-wrapper"},[i("div",{staticClass:"pub-mask"}),i("div",{staticClass:"pub-modal avater-modal"},[i("div",{staticClass:"modal-hd"},[i("i",{staticClass:"el-icon-close",on:{click:function(e){t.visible=!1}}})]),t.userInfo?i("div",{staticClass:"modal-bd"},[i("div",{staticClass:"user-top"},[i("div",{staticClass:"user-avatar",on:{click:function(e){t.$editUserAvatar(t.userInfo.cover_photo)}}},[t.userInfo.cover_photo?i("img",{attrs:{src:t.userInfo.cover_photo,alt:""}}):i("div",{staticClass:"user-avatar",class:"avatar_bg"+t.userInfo.user_id%9,attrs:{"data-name":t.userInfo.nick_name.slice(0,2).toUpperCase()}}),i("p",[t._v("更改头像")])]),i("div",{staticClass:"r-info"},[t.isEditName?i("input",{directives:[{name:"model",rawName:"v-model",value:t.newNickName,expression:"newNickName"},{name:"focus",rawName:"v-focus"}],staticClass:"edit-name-input",attrs:{type:"text"},domProps:{value:t.newNickName},on:{blur:t.handleEditName,input:function(e){e.target.composing||(t.newNickName=e.target.value)}}}):i("span",{staticClass:"name",on:{click:function(e){t.isEditName=!0}}},[t._v(t._s(t.userInfo.nick_name)+" "),i("i",{staticClass:"el-icon-edit"})]),i("div",{staticClass:"introduce"},[t._v("@"+t._s(t.userInfo.user_id))])])]),i("div",{staticClass:"account-wrap"},[i("div",{staticClass:"title"},[t._v("已绑定账户")]),t._l(t.userInfo.binds,function(e,s){return i("div",{key:s,staticClass:"account-item"},[i("div",{staticClass:"type"},[i("strong",[t._v(t._s(e.type.toUpperCase()))]),e.account?i("div",{staticClass:"fr"},[0===e.is_visible?i("span",[t._v("已隐藏")]):t._e(),i("el-switch",{attrs:{"active-value":0,"inactive-value":1,"active-color":"#2298f0","inactive-color":"#cbcbcb"},on:{change:function(i){t.hanldeChange(e,i)}},model:{value:e.is_visible,callback:function(i){t.$set(e,"is_visible",i)},expression:"item.is_visible"}})],1):t._e()]),e.account?i("p",{staticClass:"key"},[t._v(t._s(e.account))]):i("el-button",{on:{click:function(i){t.bindAccount(e.type)}}},[t._v("绑定")])],1)})],2)]):t._e()])]):t._e()])},Et=[];a["default"].component(v.a.name,v.a),a["default"].component(R.a.name,R.a),a["default"].component(L.a.name,L.a);var Pt={name:"infoPopup",data:function(){return{isMe:!0,newNickName:"",isEditName:!1}},computed:Object(u["a"])({},Object(p["d"])({userInfo:function(t){return t.userInfo}})),methods:{hanldeChange:function(t,e){var i=t.type;M["a"].user.setVisible({type:i,is_visible:e}).then(function(t){t.data})},bindAccount:function(t){},handleEditName:function(){var t=this;this.isEditName=!1,this.newNickName.length&&M["a"].user.changeNickName({nick_name:this.newNickName}).then(function(e){e.data;t.$store.commit("setUserNickName",t.newNickName),t.$store.commit("updateMemberNickName",{userId:t.$store.state.userId,nickName:t.newNickName}),t.$showTips("修改成功")})}}},Tt=Pt,At=(i("cf63"),Object(_["a"])(Tt,Ot,Et,!1,null,null,null));At.options.__file="index.vue";var Gt=At.exports;Gt.install=function(t,e){var i,s=t.extend(Gt);t.prototype.$showUserInfo=function(){i&&(document.body.removeChild(i.$el),i=null),i=new s({el:document.createElement("div"),computed:{$store:function(){return e}},data:function(){return{visible:!0}},i18n:wt["a"]}),document.body.appendChild(i.$el)}};var Ut=Gt,Bt=i("5a09"),Rt=i("21f7"),Dt=i("8f20"),Ft=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"fade"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.show,expression:"show"}],staticClass:"toast"},[t._v(t._s(t.text))])])},Ht=[],qt=(i("3059"),{}),Wt=Object(_["a"])(qt,Ft,Ht,!1,null,"d0bb0ff6",null);Wt.options.__file="index.vue";var zt,Vt=Wt.exports,Kt=a["default"].extend(Vt);function Jt(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2500;zt?(zt.show=!0,zt.text=t):(zt=new Kt({el:document.createElement("div"),data:function(){return{text:t,show:!0}}}),document.body.appendChild(zt.$el)),e&&setTimeout(function(){zt.show=!1},i)}function Qt(){zt&&(zt.show=!1)}function Xt(){a["default"].prototype.$showTips=Jt,a["default"].prototype.$hideTips=Qt}var Yt=Xt,Zt=i("4eb5"),te=i.n(Zt),ee=a["default"].directive("focus",{inserted:function(t){t.focus()}}),ie={focus:ee},se=i("682a"),ne=i.n(se),ae=i("9483");function re(t){requestAnimationFrame(re),ne.a.update(t)}a["default"].use(kt,ht["a"]),a["default"].use(Mt,ht["a"]),a["default"].use(Ut,ht["a"]),a["default"].use(Bt["a"],ht["a"]),a["default"].use(Dt["a"],ht["a"]),a["default"].use(Yt),a["default"].use(te.a),a["default"].use(ie),a["default"].use(Rt["a"]),a["default"].config.productionTip=!1,new a["default"]({render:function(t){return t(mt)},store:ht["a"]}).$mount("#app"),requestAnimationFrame(re);var oe=!1;Object(ae["a"])("/sw.js",{ready:function(){console.log("App is being served from cache by a service worker.\nFor more details, visit https://goo.gl/AFskqB")},registered:function(){console.log("Service worker has been registered.")},cached:function(){console.log("Content has been cached for offline use.")},updatefound:function(){oe=!0,console.log("New content is downloading.")},updated:function(){oe&&n.a.confirm("新的内容已更新完毕,立即刷新页面?","提示",{confirmButtonText:"确定",cancelButtonText:"取消"}).then(function(){location.reload()&&window.location.reload()}).catch(function(){})},offline:function(){console.log("No internet connection found. App is running in offline mode.")},error:function(t){console.error("Error during service worker registration:",t)}})},a446:function(t,e,i){"use strict";var s=i("de20"),n=i.n(s);n.a},b83c:function(t,e,i){"use strict";var s=i("192d"),n=i.n(s);n.a},bbfe:function(t,e,i){},c79b:function(t,e,i){"use strict";var s=i("da64"),n=i.n(s);n.a},cf63:function(t,e,i){"use strict";var s=i("f1e5"),n=i.n(s);n.a},da64:function(t,e,i){},de20:function(t,e,i){},dffe:function(t,e,i){"use strict";var s=i("49c2"),n=i.n(s);n.a},ebdf:function(t,e,i){"use strict";var s=i("4ead"),n=i.n(s);n.a},ef14:function(t,e,i){},f1e5:function(t,e,i){},f682:function(t,e,i){"use strict";var s=i("48d1"),n=i.n(s);n.a}});
|