(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-common"],{"00f6":function(e,t,n){},"0627":function(e,t,n){},1:function(e,t){},"16c9":function(e,t,n){"use strict";var a=n("8ee8"),r=n.n(a);r.a},"192d":function(e,t,n){},"19d0":function(e,t,n){"use strict";var a=n("2abb"),r=n.n(a);r.a},"1c04":function(e,t,n){"use strict";n("a481"),n("cadf"),n("551c"),n("097d");var a=n("2b0e"),r=n("2f62"),s={setScatter:function(e,t){e.scatter=t},setEos:function(e,t){e.eos=t},setAccount:function(e,t){e.account=t},setToAccount:function(e,t){e.toAccount=t},setBalance:function(e,t){e.balance=t},setMoney:function(e,t){e.money=t},setGt:function(e,t){e.gt=t},setMainnet:function(e,t){e.mainnet=t},setGTError:function(e,t){e.gtErrorCount=t},setEOSError:function(e,t){e.eosErrorCount=t},setPublicKey:function(e,t){e.publicKey=t},setUserId:function(e,t){e.userId=t},setToken:function(e,t){e.token=t},changeSessionId:function(e,t){e.curSession=t},setUserInfo:function(e,t){e.userInfo=t},setUserUserName:function(e,t){e.userInfo.user_name=t},setUserNickName:function(e,t){e.userInfo.nick_name=t},updateUserPhoto:function(e,t){e.userInfo.cover_photo=t}},i=(n("ac6a"),n("c5f6"),n("3835")),o=(n("7f7f"),n("7514"),n("96cf"),n("1da1")),c=n("5fe9"),u=n.n(c),d=n("5975"),p=n("33f8"),l=n("e332"),h=n("d3b7"),m=n.n(h),f={setScatter:function(e,t){var n=e.commit;return n("setScatter",t)},setEos:function(e,t){var n=e.commit;return n("setEos",t)},setAccount:function(e,t){var n=e.commit;return n("setAccount",t)},doScatterLogin:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t,n){var a,r,s,i,o,c;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(a=t.dispatch,r=t.commit,s=t.state,s.scatter){e.next=5;break}Object(p["q"])("Please install the scatter","Scatter"),e.next=22;break;case 5:return i=Object(l["b"])(),e.prev=6,e.next=9,s.scatter.getIdentity({accounts:[i]});case 9:o=e.sent,e.next=16;break;case 12:return e.prev=12,e.t0=e["catch"](6),"identity_rejected"!==e.t0.type&&Object(p["q"])(e.t0.message),e.abrupt("return",Promise.reject(e.t0));case 16:return c=o.accounts.find(function(e){return"eos"===e.blockchain}),r("setAccount",c),window.EOS=s.scatter.eos(i,m.a,{}),e.next=21,a("getAccount");case 21:return e.abrupt("return",Promise.resolve(!0));case 22:case"end":return e.stop()}},e,this,[[6,12]])}));return function(t,n){return e.apply(this,arguments)}}(),doScatterLogout:function(e,t){var n=e.commit,a=e.state;p["a"].delCookie("user_id"),p["a"].delCookie("token"),localStorage.removeItem("user_id"),localStorage.removeItem("token"),a.scatter&&a.scatter.forgetIdentity(),n("setAccount","")},getUserEOS:function(e,t){var n=e.dispatch,a=e.commit,r=e.state;return new Promise(function(e,t){window.EOS.getCurrencyBalance("eosio.token",r.account.name,"EOS").then(function(t){var n=Object(i["a"])(t,1),r=n[0],s=Number(r.replace(/\sEOS/,"")).toFixed(4);s=u.a.times(s,1e4),a("setBalance",s),a("setEOSError",0),e()}).catch(function(e){a("setEOSError",r.eosErrorCount+1),r.eosErrorCount<=5&&setTimeout(function(){n("getUserEOS")},1e3*r.eosErrorCount),t(e)})})},getAccount:function(e,t){var n=e.commit,a=e.state;return new Promise(function(e,t){window.EOS.getAccount(a.account.name).then(function(t){var a=JSON.parse(JSON.stringify(t.permissions));a.forEach(function(e){if("active"===e.perm_name){var t=e.required_auth.keys[0].key;n("setPublicKey",t)}}),e(t)}).catch(function(e){t(e)})})},doGameLogin:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t,n){var a,r,s,i,o,c,u;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(t.dispatch,a=t.commit,r=t.state,s=localStorage.getItem("user_id"),i=localStorage.getItem("token"),!s||!i){e.next=9;break}return a("setUserId",s),a("setToken",i),e.abrupt("return",Promise.resolve({user_id:s,token:i}));case 9:return e.next=11,d["a"].user.getRandom({account:r.account.name});case 11:return o=e.sent,c=o.data.data,u=r.publicKey,e.abrupt("return",new Promise(function(e,t){r.scatter.getArbitrarySignature(u,c,"Need Login").then(function(n){var s={account:r.account.name,sign:n,pubkey:u,data:c};d["a"].user.eosLogin(s).then(function(n){var r=n.data;if(1===r.result){var s=r.data.user_id,i=r.data.token;localStorage.setItem("user_id",s),localStorage.setItem("token",i),a("setUserId",s),a("setToken",i),e(r)}else t(new Error(r.msg))})}).catch(function(e){t(e)})}));case 15:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),resetGameLogin:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t,n){var a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return a=t.dispatch,t.commit,t.state,localStorage.removeItem("user_id"),localStorage.removeItem("token"),e.next=5,a("doContractLogin");case 5:self!==top?location.replace(location.href.replace("show=false","show=true")):location.reload();case 6:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),doContractLogin:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t,n){var a,r,s,i,o,c,u,p,l,h,m,f,g,v,b;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(a=t.commit,r=t.state,s=localStorage.getItem("user_id"),i=localStorage.getItem("token"),!s||!i){e.next=9;break}return a("setUserId",s),a("setToken",i),e.abrupt("return",Promise.resolve({user_id:s,token:i}));case 9:return e.prev=9,e.next=12,d["a"].user.getRandom2({account:r.account.name});case 12:if(o=e.sent,c=o.data,u=c.data.random,p=c.data.accessToken,l={authorization:["".concat(r.account.name,"@").concat(r.account.authority)]},h=null,self===top){e.next=24;break}return e.next=21,window.postMessager.send({action:"meechat:eosAction",data:{contract:"meechatadmin",action:"login",param:[r.account.name,u,l]}});case 21:h=e.sent,e.next=30;break;case 24:return e.next=26,window.EOS.contract("meechatadmin");case 26:return m=e.sent,e.next=29,m.login(r.account.name,u,l);case 29:h=e.sent;case 30:return f={account:r.account.name,access_token:p,trx_id:h.transaction_id,group_id:r.group.groupId||null},e.next=33,d["a"].user.eosLogin2(f);case 33:if(g=e.sent,1!==g.data.result){e.next=42;break}return v=g.data.data.user_id,b=g.data.data.token,localStorage.setItem("user_id",v),localStorage.setItem("token",b),a("setUserId",v),a("setToken",b),e.abrupt("return",Promise.resolve(g.data));case 42:e.next=47;break;case 44:return e.prev=44,e.t0=e["catch"](9),e.abrupt("return",Promise.reject(e.t0));case 47:case"end":return e.stop()}},e,this,[[9,44]])}));return function(t,n){return e.apply(this,arguments)}}()},g=(n("f751"),n("2ef0")),v=n.n(g),b=n("d4ec"),_=n("bee2"),k=n("99de"),w=n("7e84"),y=n("262e"),I=n("411a"),x=function(e){function t(){return Object(b["a"])(this,t),Object(k["a"])(this,Object(w["a"])(t).call(this,"session"))}return Object(y["a"])(t,e),Object(_["a"])(t,[{key:"getSortList",value:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(){var t,n,a,r;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getObjTable();case 2:return t=e.sent,e.next=5,t.index("pin_time_int").openCursor(null,"prev");case 5:n=e.sent,a=[];case 7:if(!n||!n.value){e.next=15;break}return r=n.value,a.push(r),e.next=12,n.continue();case 12:n=e.sent,e.next=7;break;case 15:return e.abrupt("return",a);case 16:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"setUnread",value:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t,n){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:this.updateObject({unread:n},{session_id:t});case 1:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()},{key:"setPin",value:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t,n){var a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:a=n?(new Date).getTime():0,this.updateObject({is_pin:n,pin_time_int:a},{session_id:t});case 2:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()},{key:"setMute",value:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t,n){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:this.updateObject({is_mute:n},{session_id:t});case 1:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()}]),t}(I["a"]),C=x,L={popInviteType:1,sessionList:[],isLogin:!0,toApp:!1,friendList:[]},S=new C,O={setSessionList:function(e,t){e.sessionList=t},addSession:function(e,t){e.sessionList.push(t)},chatAppLogin:function(e,t){e.isLogin=t},toApp:function(e,t){e.toApp=t},addSessionItem:function(e,t){e.sessionList.unshift(t)},setSessionItemUnread:function(e,t){console.log("进来寻找session",t.unread,t,t.cont),e.sessionList.forEach(function(e,n){e.session_id=="".concat(t.session_id)&&(t.unread&&t.curSession!=t.session_id?e.unread+=t.unread:e.unread=0,a["default"].set(e,"cont",t.cont?t.cont:e.cont),S.setUnread(e.session_id,e.unread))})},setFriendList:function(e,t){e.friendList=t},setSessionItem:function(e,t){e.sessionList.forEach(function(e){e.session_id==t.session_id&&(e=t)})},updateSessionListByPin:function(e,t){S.setPin(t,1),e.sessionList.forEach(function(n,a){n.session_id==t&&(n.is_pin=1,e.sessionList.unshift(e.sessionList.splice(a,1)[0]))})},cancelSessionListByPin:function(e,t){S.setPin(t,0);var n=null;e.sessionList.forEach(function(a,r){a.session_id==t?(a.is_pin=0,n=e.sessionList.splice(r,1)[0]):n&&a.is_pin<1&&(e.sessionList.splice(r,0,n),n=null)})},updateSessionListByMute:function(e,t){S.setMute(t,1),e.sessionList.forEach(function(e,n){e.session_id==t&&(e.is_mute=1)})},cancelSessionListByMute:function(e,t){S.setMute(t,0),e.sessionList.forEach(function(e,n){e.session_id==t&&(e.is_mute=0)})},removeSessionListById:function(e,t){e.sessionList=v.a.filter(e.sessionList,function(e,n){return e.session_id!=t})},setPopInviteType:function(e,t){/\d/.test(t)&&(e.popInviteType=t)}},N={getSessionList:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t,n){var a,r;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return a=t.commit,t.state,e.next=3,S.getSortList();case 3:r=e.sent,r&&a("setSessionList",r),d["a"].session.sessionList(function(e){var t=e.data;a("setSessionList",t.data),S.replaceObjects(t.data)});case 6:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),getUserInfo:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,a,r,s;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.commit,t.state,a=t.rootState,e.prev=1,e.next=4,d["a"].user.getInfo({target_id:a.userId});case 4:r=e.sent,s=r.data,n("setUserInfo",s.data),n("setGroupUserInfo",s.data),e.next=12;break;case 10:e.prev=10,e.t0=e["catch"](1);case 12:case"end":return e.stop()}},e,this,[[1,10]])}));return function(t){return e.apply(this,arguments)}}(),updateSessionItem:function(e,t){var n=e.commit,a=e.state,r=a.sessionList.find(function(e){return e.session_id==t.sessionId});r=Object.assign(r,t.data),n("setSessionItem",r)},doRepealPersonMsg:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,a,r=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return t.dispatch,t.commit,t.state,n=t.rootState,a=r.length>1&&void 0!==r[1]?r[1]:{},e.prev=2,e.next=5,d["a"].person.repealPersonMsg({session_id:n.curSession,hash:a.hash});case 5:e.next=9;break;case 7:e.prev=7,e.t0=e["catch"](2);case 9:case"end":return e.stop()}},e,this,[[2,7]])}));return function(t){return e.apply(this,arguments)}}(),getFriendList:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,a,r;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.commit,t.state,e.prev=1,e.next=4,d["a"].group.getFriends();case 4:a=e.sent,r=a.data,n("setFriendList",r.data),e.next=11;break;case 9:e.prev=9,e.t0=e["catch"](1);case 11:case"end":return e.stop()}},e,this,[[1,9]])}));return function(t){return e.apply(this,arguments)}}()},j={muteList:function(e){return e.sessionList.filter(function(e){if("1"==e.is_mute)return e.session_id})}},M={state:L,mutations:O,actions:N,getters:j},T=(n("4917"),n("76a4")),A=n("bc3a"),E=n.n(A),P=n("8d4d"),R=null,$={getGroupInfo:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t,n){var a,r;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:t.dispatch,a=t.commit,r=t.state,d["a"].group.getGroupInfo2({group_id:r.groupId},function(e){if(0===e.data.code){var t=e.data.data.adminList,n=e.data.data.blockList,r=e.data.data.pinMsg,s=e.data.data.group,i=e.data.data.members,o=e.data.data.group.member_num,c=e.data.data.userInfo,u=e.data.data.sessionInfo,d=!!e.data.data.sessionInfo,p=e.data.data.eosInfo;r&&(r.visible=!0);var l={};i.forEach(function(e){l[e.user_id]=e}),a("setGroupInfo",{userCounts:i.length,groupName:s.group_title,shareName:s.group_name,members:l,membersArray:i,membersNum:o,userInfo:c,groupNotice:s.group_notice,inviteUrl:s.invite_url,sessionInfo:u,isJoin:d,coverPhoto:s.cover_photo,adminList:t,blockList:n,pinMsg:r,creator:s.creator,eosInfo:p})}});case 2:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),getNewMsg:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,a,r,s,i,o=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:{},a=t.state,r=new P["a"],e.next=5,r.getMsg(a.groupId);case 5:return s=e.sent,s.list.length>0&&$._renderGroupMsg(t,s,n),e.next=9,d["a"].group.getNewMsg({group_id:a.groupId,client_hash:a.endHash}).catch(function(){});case 9:return i=e.sent,0===i.data.code&&i.data.data.list.length>0&&$._renderGroupMsg(t,i.data.data,n),e.abrupt("return","done");case 12:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),_renderGroupMsg:function(e,t,n){e.dispatch;var a=e.commit,r=e.state,s=[];t.list.forEach(function(e){var n=t.userMap[e.from];n&&s.push({name:n?n.nick_name:"unknown",content:e.msg,userId:e.from,timestamp:e.create_time_int,avatar:n?n.cover_photo:"",hash:e.hash,type:e.from==r.userId?"me":"you",msg_type:e.msg_type,ext:e.ext?e.ext:null})}),a("updateMembers",t.userMap),r.chatList.length?a("setHash",{endHash:s[s.length-1].hash}):a("setHash",{endHash:s[s.length-1].hash,startHash:s[0].hash});var i=n.newMsg?{list:s,newMsg:n.newMsg}:s;a("addChatItem",i)},getPrivateNewMsg:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,a,r,s,i,o,c=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=c.length>1&&void 0!==c[1]?c[1]:{},a=t.state,r=t.rootState,s=new P["a"],e.next=5,s.getMsg(r.curSession);case 5:return i=e.sent,i.list.length>0&&$._renderPrivateMsg(t,i,n),e.next=9,d["a"].person.getNewMsg({session_id:r.curSession,client_hash:a.endHash}).catch(function(){});case 9:return o=e.sent,0===o.data.code&&o.data.data.list.length>0&&$._renderPrivateMsg(t,o.data.data,n),e.abrupt("return","done");case 12:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),_renderPrivateMsg:function(e,t,n){e.dispatch;var a=e.commit,r=e.state,s=e.rootState,i=[],o=t.userMap;for(var c in a("updateGroup",{key:"members",data:o}),o)c!==s.userId&&a("updateGroup",{key:"privateName",data:o[c]["nick_name"]});t.list.forEach(function(e){var n=t.userMap[e.from];i.push({name:n?n.nick_name:"unknown",content:e.msg,userId:e.from,timestamp:e.create_time_int,avatar:n.cover_photo||"",hash:e.hash,type:e.from==s.userId?"me":"you",msg_type:e.msg_type,ext:e.ext?e.ext:null})}),r.chatList.length?a("setHash",{endHash:i[i.length-1].hash}):a("setHash",{endHash:i[i.length-1].hash,startHash:i[0].hash});var u=n.newMsg?{list:i,newMsg:n.newMsg}:i;a("addChatItem",u)},getHistoryMsg:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,a,r,s,i,o,c,u=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(t.dispatch,n=t.commit,a=t.state,r=u.length>1&&void 0!==u[1]?u[1]:{},s=localStorage.getItem(r.hash),i=[],o="",!s||!a.useCache){e.next=9;break}i=JSON.parse(s),e.next=13;break;case 9:return e.next=11,d["a"].group.getHistoryMsg({group_id:a.groupId,client_hash:a.startHash}).catch(function(){});case 11:c=e.sent,c&&0===c.data.code&&c.data.data.list.length>0&&(c.data.data.list.forEach(function(e){4==e.msg_type?e.msg=JSON.parse(Object(p["i"])(e.msg)):e.msg=Object(p["i"])(e.msg);var t=c.data.data.userMap[e.from];n("updateMembers",c.data.data.userMap),t&&i.push({name:t?t.nick_name:"unknown",content:e.msg,userId:e.from,timestamp:e.create_time_int,avatar:t?t.cover_photo:"",hash:e.hash,type:e.from==a.userId?"me":"you",msg_type:e.msg_type,ext:e.ext?e.ext:null})}),a.useCache&&localStorage.setItem(r.hash,JSON.stringify(i)));case 13:return i.length>0?(n("setHash",{startHash:i[0].hash}),n("addHistoryList",i),o="done"):(n("setHash",{startHash:null}),o="end"),e.abrupt("return",o);case 15:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),getPrivateHistoryMsg:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,a,r,s,i,o,c,u,l=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(t.dispatch,n=t.commit,a=t.state,r=t.rootState,s=l.length>1&&void 0!==l[1]?l[1]:{},i=localStorage.getItem(s.hash),o=[],c="",!i||!a.useCache){e.next=9;break}o=JSON.parse(i),e.next=13;break;case 9:return e.next=11,d["a"].person.getHistoryMsg({session_id:r.curSession,client_hash:a.startHash}).catch(function(){});case 11:u=e.sent,0===u.data.code&&u.data.data.list.length>0&&(u.data.data.list.forEach(function(e){e.msg=Object(p["i"])(e.msg);var t=u.data.data.userMap[e.from];o.push({name:t?t.nick_name:"unknow",content:e.msg,userId:e.from,timestamp:e.create_time_int,avatar:t.cover_photo||"",hash:e.hash,type:e.from==r.userId?"me":"you",msg_type:e.msg_type,ext:e.ext?e.ext:null})}),a.useCache&&localStorage.setItem(s.hash,JSON.stringify(o)));case 13:return o.length>0?(n("setHash",{startHash:o[0].hash}),n("addHistoryList",o),c="done"):(n("setHash",{startHash:null}),c="end"),e.abrupt("return",c);case 15:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),doSendMsg:function(e){e.dispatch;var t=e.commit,n=e.state,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(e,r){d["a"].group.sendMsg({group_id:n.groupId,msg_type:a.type,msg:a.msg}).then(function(r){var s=r.data;if(0===s.code){if(a.createTime){var i=a.createTime;s.data.content=Object(p["i"])(s.data.content);for(var o=n.chatList,c=o.length-1;c>=0;c--){var u=o[c];u.createTime===i&&(u.hash=s.data.hash,u.loading=!1)}}else t("updateMembers",s.data.userMap),s.data.content=Object(p["i"])(s.data.content),t("addChatItem",s.data);t("setHash",{endHash:s.data.hash}),e(s.data)}else a.createTime&&Object(p["h"])(n,a.createTime)}).catch(function(e){a.createTime&&Object(p["h"])(n,a.createTime),r(e)})})},doSendFile:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,a,r,s,i=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return t.dispatch,n=t.commit,a=t.state,r=t.rootState,s=i.length>1&&void 0!==i[1]?i[1]:{},e.abrupt("return",new Promise(function(e,t){var i=r.userId,o=r.token,c=new FormData;c.append("group_id",a.groupId),c.append("res",s.res),c.append("user_id",i),c.append("token",o),E()({url:d["a"].host+"group/sendFile",method:"post",data:c,headers:{"Content-Type":"multipart/form-data"}}).then(function(t){var r=t.data;if(0===r.code){if(s.createTime){var i=s.createTime;r.data.content=Object(p["i"])(r.data.content);var o=a.chatList;o.forEach(function(e){e.createTime===i&&(e.res=void 0,e.content=r.data.content,e.hash=r.data.hash,e.loading=!1,e.fail=!1)})}else n("updateMembers",r.data.userMap),r.data.content=Object(p["i"])(r.data.content),n("addChatItem",r.data);n("setHash",{endHash:r.data.hash}),e(r.data)}else s.createTime&&Object(p["h"])(a,s.createTime)}).catch(function(e){s.createTime&&Object(p["h"])(a,s.createTime),t(e)})}));case 3:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),doSendPrivateMsg:function(e){e.dispatch;var t=e.commit,n=e.state,a=e.rootState,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(e,s){d["a"].person.sendMsg({session_id:a.curSession,msg_type:r.type,msg:r.msg}).then(function(a){var s=a.data;if(0===s.code){if(r.createTime){var i=r.createTime;s.data.content=Object(p["i"])(s.data.content);for(var o=n.chatList,c=o.length-1;c>=0;c--){var u=o[c];u.createTime===i&&(u.hash=s.data.hash,u.loading=!1)}}else t("updateMembers",s.data.userMap),s.data.content=Object(p["i"])(s.data.content),t("addChatItem",s.data);t("setHash",{endHash:s.data.hash}),e(s.data)}else r.createTime&&Object(p["h"])(n,r.createTime)}).catch(function(e){r.createTime&&Object(p["h"])(n,r.createTime),s(e)})})},initSocket:function(e){var t=e.commit,n=(e.state,e.rootState),a=e.rootGetters,r=e.dispatch;arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(window.WebSocket){var s="".concat(Object(l["c"])(),"/?user_id=").concat(n.userId,"&token=").concat(n.token);R&&(R.destroy(),R=null),R=new T["a"](s,{autoConnect:!0,reconnection:!0,reconnectionDelay:5e3,keepAliveContent:JSON.stringify({act:"alive",player:name})}),R.on("open",function(e){}),R.on("message",function(e){var s=JSON.parse(e),i=s.channel,o=s.data,c=a.muteList;if(i.match("chat:group")){var u=c.some(function(e){return e.session_id==o.group_id});"msg"===o.type&&o.from!==n.userId&&(n.curSession===o.group_id?(r("getNewMsg",{newMsg:!0}),t("addUnreadNums"),p["n"].changeTitle()):u||(p["n"].showNotification(o),p["n"].changeTitle())),o.type,o.type,o.type,o.type,"repeal"===o.type&&t("repealChatItem",o),"block"===o.type&&t("updateGroupBlockList",{type:"add",id:o.to}),"unblock"===o.type&&t("updateGroupBlockList",{type:"delete",id:o.to}),"join"===o.type&&t("updateMembers",o.user_info),"pin_msg"===o.type&&t("updateGroupPinMsg",o.pinMsg),"unpin_msg"===o.type&&t("updateGroupPinMsg",null),"new_redpack"===o.type&&n.curSession==o.group_id&&t("addPacketItem",o),"grab_redpack"===o.type&&n.curSession==o.group_id&&(o.from!=n.userId&&o.to!=n.userId||t("addPacketTip",o))}if(i.match("chat:person")){if(!n.curSession)return;var l=+o.to>+o.from?"".concat(o.from,"-").concat(o.to):"".concat(o.to,"-").concat(o.from),h=c.some(function(e){return e.session_id==l});"msg"===o.type&&(a.otherUserId==o.from?(r("getPrivateNewMsg"),t("addUnreadNums"),p["n"].changeTitle()):h||(p["n"].showNotification(o),p["n"].changeTitle())),"repeal"===o.type&&t("repealChatItem",o.data),"new_redpack"===o.type&&a.otherUserId==o.from&&t("addPacketItem",o),"grab_redpack"===o.type&&a.otherUserId==o.from&&(o.from!=n.userId&&o.to!=n.userId||t("addPacketTip",o))}if("msg"===o.type||"new_redpack"===o.type){var m,f=n.chat.sessionList,g=o.content;m=o.group_id?o.group_id:+o.to>+o.from?"".concat(o.from,"-").concat(o.to):"".concat(o.to,"-").concat(o.from);var v=f.some(function(e){return e.session_id==m});v||(o.group_id?d["a"].group.getGroupInfo({group_id:o.group_id}).then(function(e){var n=e.data,a=n.data.group,r={cover_photo:a.cover_photo,is_group:"1",name:a.group_name,session_id:m,unread:1,content:g};t("addSessionItem",r)}):d["a"].user.getOtherInfo({target_id:o.from}).then(function(e){var n=e.data,a={cover_photo:n.data.cover_photo,is_group:"0",name:n.data.nick_name,session_id:m,unread:1,content:g};t("addSessionItem",a)})),t("setSessionItemUnread",{unread:1,cont:Object(p["i"])(g),session_id:m,curSession:n.curSession})}})}else console.error("Error: WebSocket is not supported .")},doRepealGroupMsg:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,a,r=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return t.dispatch,t.commit,n=t.state,a=r.length>1&&void 0!==r[1]?r[1]:{},e.prev=2,e.next=5,d["a"].group.repealGroupMsg({group_id:n.groupId,hash:a.hash});case 5:e.next=9;break;case 7:e.prev=7,e.t0=e["catch"](2);case 9:case"end":return e.stop()}},e,this,[[2,7]])}));return function(t){return e.apply(this,arguments)}}(),doBlockUser:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,a,r=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.state,a=r.length>1&&void 0!==r[1]?r[1]:{},e.prev=2,e.next=5,d["a"].group.blockUser({group_id:n.groupId,block_id:a.id});case 5:e.next=9;break;case 7:e.prev=7,e.t0=e["catch"](2);case 9:case"end":return e.stop()}},e,this,[[2,7]])}));return function(t){return e.apply(this,arguments)}}(),doUnBlockUser:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,a,r=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.state,a=r.length>1&&void 0!==r[1]?r[1]:{},e.prev=2,e.next=5,d["a"].group.unblockUser({group_id:n.groupId,block_id:a.id});case 5:e.next=9;break;case 7:e.prev=7,e.t0=e["catch"](2);case 9:case"end":return e.stop()}},e,this,[[2,7]])}));return function(t){return e.apply(this,arguments)}}(),doPinMsg:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,a,r=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.state,a=r.length>1&&void 0!==r[1]?r[1]:{},e.prev=2,e.next=5,d["a"].group.pinMsg({group_id:n.groupId,hash:a.hash});case 5:e.next=9;break;case 7:e.prev=7,e.t0=e["catch"](2);case 9:case"end":return e.stop()}},e,this,[[2,7]])}));return function(t){return e.apply(this,arguments)}}(),doUnpinMsg:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,a,r=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.state,a=r.length>1&&void 0!==r[1]?r[1]:{},e.prev=2,e.next=5,d["a"].group.unpinMsg({group_id:n.groupId,hash:a.hash});case 5:e.next=9;break;case 7:e.prev=7,e.t0=e["catch"](2);case 9:case"end":return e.stop()}},e,this,[[2,7]])}));return function(t){return e.apply(this,arguments)}}(),joinGroup:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,a,r=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.state,a=t.commit,r.length>1&&void 0!==r[1]?r[1]:{},e.prev=2,e.next=5,d["a"].group.joinGroup({group_id:n.groupId});case 5:a("updateJoin",!0),e.next=10;break;case 8:e.prev=8,e.t0=e["catch"](2);case 10:case"end":return e.stop()}},e,this,[[2,8]])}));return function(t){return e.apply(this,arguments)}}()},U=$,G=(n("20d6"),{initGroup:function(e,t){e.userId=t.userId,e.groupId=t.groupId,e.useCache=t.useCache},initState:function(e,t){e.endHash="",e.startHash="",e.adminList=[],e.creator="",e.blockList=[],e.userCounts="",e.groupName="",e.shareName="",e.groupNotice="",e.coverPhoto="",e.inviteUrl="",e.sessionInfo={},e.eosInfo=null,e.pinMsg={},e.groupId="",e.nickName="",e.chatList=[],e.pinList=[],e.atList=[],e.searchList=[],e.isNewAt=!0,e.isNewAtFound=!1,e.isJoin=!0,e.unreadNums=0,e.userId=t.user_id,e.userInfo=t},setGroupInfo:function(e,t){e.groupName=t.groupName,e.userCounts=t.userCounts,e.members=t.members,e.groupNotice=t.groupNotice,e.inviteUrl=t.inviteUrl,e.sessionInfo=t.sessionInfo||{},e.isJoin=t.isJoin,e.coverPhoto=t.coverPhoto,e.adminList=t.adminList,e.blockList=t.blockList,e.shareName=t.shareName,e.creator=t.creator,e.eosInfo=t.eosInfo,e.membersArray=t.membersArray,e.membersNum=t.membersNum,t.pinMsg&&(Object(p["j"])(t.pinMsg,e.userId),e.pinList.push(t.pinMsg),Object(p["o"])(e.pinList,e.chatList,function(e){return e.hash})),e.pinMsg=t.pinMsg||{}},setGroupUserInfo:function(e,t){e.userInfo=t,e.userId=t.user_id},addHistoryList:function(e,t){if(t.length){Object(p["c"])(t),Object(p["o"])(e.pinList,t,function(e){return e.hash});var n=v.a.differenceBy(t,e.chatList,"hash")||[];e.chatList=n.concat(e.chatList)}},addChatItem:function(e,t){var n=!1;if(t.constructor===Object&&t.newMsg&&(t=t.list,n=!0),t&&t.length>0){Object(p["c"])(t),Object(p["o"])(e.pinList,t,function(e){return e.hash}),n&&t.forEach(function(t){Object(p["e"])(t.content,e.userInfo.user_name)&&e.atList.push(t)});var a=v.a.differenceBy(t,e.chatList,"hash")||[];e.chatList=e.chatList.concat(a)}else{var r={name:e.members[t.from]?e.members[t.from].nick_name:"unknown",content:t.content,userId:t.from,timestamp:t.timestamp,avatar:e.members[t.from]?e.members[t.from].cover_photo:"",hash:t.hash,type:t.from==e.userId?"me":"you",msg_type:t.msg_type,loading:Boolean(t.loading),res:t.res,fail:!1};t.createTime&&(r.createTime=t.createTime),Object(p["d"])(r,e.chatList),Object(p["b"])(r),e.chatList.some(function(e){return e.hash===r.hash})||e.chatList.push(r)}},addPacketItem:function(e,t){var n={name:e.members[t.from]?e.members[t.from].nick_name:"unknown",timestamp:t.timestamp,avatar:e.members[t.from]?e.members[t.from].cover_photo:"",userId:t.from,msg_type:"new_redpack"===t.type?4:5,content:JSON.parse(Object(p["i"])(t.content)),type:t.from==e.userId?"me":"you",ext:{grabbed:0,redpack_status:0},hash:t.hash};Object(p["d"])(n,e.chatList),e.chatList.push(n),e.endHash=t.hash},addPacketTip:function(e,t){var n={content:{trxId:t.content.redpack_trx_id,title:t.content.title},ext:{grabbed:1,redpack_status:0},avatar:e.members[t.from]?e.members[t.from].cover_photo:"",name:e.members[t.from]?e.members[t.from].nick_name:"unknown",from:t.from,to:t.to,redPackTip:!0};e.chatList.push(n)},unpdatePacketItem:function(e,t){var n=t.type,r=t.trxId,s=t.data,i=e.chatList,o=i.findIndex(function(e){return 4==e.msg_type&&e.content.trxId==r}),c=i[o];c.ext[n]=s,a["default"].set(e.chatList,o,c);var u=new P["a"];u.updatePackInfo(c.hash,n,s)},reSendChatItem:function(e,t){var n=e.chatList;n.forEach(function(e){e.createTime==t.createTime&&(e.loading=!0,e.fail=!1)})},removeAtListLast:function(e){e.atList.pop()},clearAtList:function(e){e.atList=[]},repealChatItem:function(e,t){for(var n=e.pinList,r=e.chatList,s=r.length-1;s>=0;s--){var i=r[s];i.hash===t.hash&&(a["default"].set(i,"repealMsg",!0),a["default"].set(i,"from",t.from))}n.length&&Object(p["o"])(n,[t],function(e){return e.hash})},deleteChatItem:function(e,t){var n=e.chatList.findIndex(function(e){return e.hash===t});e.chatList.splice(n,n)},addUnreadNums:function(e){e.unreadNums++},resetUnreadNums:function(e){e.unreadNums=0},setHash:function(e,t){t.startHash&&(e.startHash=t.startHash),t.endHash&&(e.endHash=t.endHash)},updatePin:function(e,t){e.sessionInfo.is_pin=t},updateMute:function(e,t){e.sessionInfo.is_mute=t},updateJoin:function(e,t){e.isJoin=t},updateGroup:function(e,t){var n=t.key,a=t.data;e[n]=a},updateMembers:function(e,t){e.members=Object.assign({},e.members,t)},updateMemberAvatar:function(e,t){for(var n=t.userId,r=t.imageUrl,s=e.members,i=e.chatList,o=0;o-1?e.curSession.replace("-","").replace(e.userId,""):""}};t["a"]=new r["a"].Store({state:J,mutations:s,actions:f,getters:D,modules:{chat:M,group:B}})},2:function(e,t){},"21f7":function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"msgbox-fade"}},[e.visible?n("div",{staticClass:"preview-mask pub-scroll-box",on:{click:function(t){e.visible=!1}}},[n("i",{staticClass:"el-icon-close",on:{click:function(t){t.stopPropagation(),e.visible=!1}}}),n("img",{staticClass:"img",attrs:{src:e.imgUrl,alt:""},on:{click:function(t){t.stopPropagation(),e.visible=!1}}})]):e._e()])},r=[],s=(n("cadf"),n("551c"),n("097d"),{name:"imgPreview"}),i=s,o=(n("2281"),n("2877")),c=Object(o["a"])(i,a,r,!1,null,"26b6aa10",null);c.options.__file="index.vue";var u=c.exports;u.install=function(e){var t,n=e.extend(u);e.prototype.$showImgPreview=function(e){t&&(document.body.removeChild(t.$el),t=null),t=new n({el:document.createElement("div"),data:function(){return{visible:!0,imgUrl:e}}}),document.body.appendChild(t.$el)}};t["a"]=u},2281:function(e,t,n){"use strict";var a=n("23a0"),r=n.n(a);r.a},"23a0":function(e,t,n){},2593:function(e,t,n){"use strict";n("ac6a"),n("96cf");var a=n("1da1"),r=n("d4ec"),s=n("bee2"),i=n("99de"),o=n("7e84"),c=n("262e"),u=(n("cadf"),n("551c"),n("097d"),n("411a")),d=function(e){function t(){return Object(r["a"])(this,t),Object(i["a"])(this,Object(o["a"])(t).call(this,"user"))}return Object(c["a"])(t,e),Object(s["a"])(t,[{key:"getUserMap",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark(function e(t){var n,a,r,s;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getObjTable();case 2:n=e.sent,a={},e.t0=regeneratorRuntime.keys(t);case 5:if((e.t1=e.t0()).done){e.next=13;break}return r=e.t1.value,s=t[r],e.next=10,n.get(s);case 10:a[s]=e.sent,e.next=5;break;case 13:return e.abrupt("return",a);case 14:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()}]),t}(u["a"]);t["a"]=d},"2abb":function(e,t,n){},3:function(e,t){},"33f8":function(e,t,n){"use strict";n.d(t,"q",function(){return u}),n.d(t,"f",function(){return d}),n.d(t,"l",function(){return p}),n.d(t,"a",function(){return l}),n.d(t,"k",function(){return h}),n.d(t,"g",function(){return f}),n.d(t,"i",function(){return g}),n.d(t,"c",function(){return v}),n.d(t,"d",function(){return b}),n.d(t,"m",function(){return _}),n.d(t,"b",function(){return k}),n.d(t,"o",function(){return w}),n.d(t,"j",function(){return y}),n.d(t,"h",function(){return I}),n.d(t,"e",function(){return x}),n.d(t,"p",function(){return L}),n.d(t,"n",function(){return S});n("7f7f"),n("28a5"),n("a481"),n("ac6a"),n("4917"),n("3b2b"),n("9e1f"),n("450d");var a=n("6ed5"),r=n.n(a),s=(n("cadf"),n("551c"),n("097d"),n("682a")),i=n.n(s),o=18e4,c="dqWt6twz6JyEy3EZ";function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Error";r.a.confirm(e,t,{center:!0,showCancelButton:!1,showConfirmButton:!1,callback:function(){}})}function d(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise(function(t,n){r.a.confirm(e,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t()}).catch(function(){})})}function p(e){var t=new RegExp("[?&]"+e+"=([^&#?]*)(&|#|$)"),n=window.location.href.match(t);return n?n[1]:null}var l={setCookie:function(e,t){var n=7,a=new Date;a.setTime(a.getTime()+24*n*60*60*1e3),a.setTime(a.getTime()+6e4),"8080"===window.location.port||/^test-|\.webdev2\./.test(window.location.host)?document.cookie=e+"="+escape(t)+";expires="+a.toGMTString():document.cookie=e+"="+escape(t)+";domain=.mee.chat;path=/;expires="+a.toGMTString()},getCookie:function(e){var t=new RegExp("(^| )"+e+"=([^;]*)(;|$)"),n=document.cookie.match(t);return n?unescape(n[2]):null},delCookie:function(e){var t=e+"=;domain=.mee.chat;path=/";t+=";expires="+new Date(0).toGMTString(),document.cookie=t;var n=e+"=;path=/";n+=";expires="+new Date(0).toGMTString(),document.cookie=n}};function h(){var e,t=document.documentElement.clientHeight,n=document.documentElement.clientWidth,a=61,r=181;return t<600&&(e=600-a-r),e=t<800||n<1e3?t-a-r:.8*t-a-r,e}function m(e,t){for(var n,a=[],r=0,s="",i=0;i<256;i++)a[i]=i;for(i=0;i<256;i++)r=(r+a[i]+t.charCodeAt(i%t.length))%256,n=a[i],a[i]=a[r],a[r]=n;i=0,r=0;for(var o=0;oo,t=parseInt(e.timestamp),e.content&&"string"==typeof e.content&&!e.content.match(a)&&e.content.match(n)&&0==e.msg_type&&(e.msg_type=10,e.content=e.content.replace(n,function(e){return'').concat(e,"")}))})}function b(e,t){if(0===t.length)e.timeMsg=!0;else{var n=parseInt(t[t.length-1].timestamp);e.timeMsg=parseInt(e.timestamp)-n>o}}function _(){return/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)}function k(e){var t=new RegExp("(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]"),n=/(['"])(?:(?!\1).)*?\1/;e.content.match(t)&&0==e.msg_type&&!e.content.match(n)&&(e.msg_type=10,e.content=e.content.replace(t,function(e){return'').concat(e,"")}))}function w(e,t,n){e.forEach(function(a,r){t.some(function(e){return n(e)==n(a)})&&e.splice(r,1)})}function y(e,t){e.name=e.nick_name,e.content=g(e.msg),e.type=e.from==t?"me":"you",e.avatar=e.cover_photo||"",e.userId=t}function I(e,t){e.chatList.forEach(function(e){e.createTime==t&&(e.fail=!0,e.loading=!1)})}function x(e,t){if(!t)return!1;var n=new RegExp("@".concat(t));return n.test(e)}function C(e,t){var n=Math.abs(t-e.scrollTop),a=n>500?1e3:2*n,r=new i.a.Tween(e).to({scrollTop:t},a).easing(i.a.Easing.Quadratic.Out);return r.start()}function L(e,t,n){C(e,t).onComplete(function(){n.classList.toggle("active")}),setTimeout(function(){n.classList.toggle("active")},3e3)}var S={askPermission:function(){return new Promise(function(e,t){"Notification"in window?"granted"===Notification.permission?e():"default "===Notification.permission&&Notification.requestPermission(function(n){"granted"===n?e():t(new Error)}):t(new Error("This browser does not support desktop notification"))})},showNotification:function(e){this.askPermission().then(function(){var t,n=new Notification(e.name,{body:"你收到了一条消息",icon:"".concat("/dist/","icon_192.png")});if(e.group_id)t="/group/".concat(e.group_id);else{var a=+e.to>+e.from?"".concat(e.from,"-").concat(e.to):"".concat(e.to,"-").concat(e.from);t="/pm/".concat(a)}n.onclick=function(){window.$router.push({path:t}),n.close(),window.focus()},setTimeout(function(){n.close()},3500)})},changeTitle:function(){document.hidden&&(document.title="MeeChat (你有新消息)")}}},3488:function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"msgbox-fade"}},[e.visible?n("div",{staticClass:"pub-modal-mask pub-scroll-box"},[n("div",{staticClass:"send-wrap"},[n("i",{staticClass:"el-icon-close",on:{click:function(t){e.visible=!1}}}),n("i",{staticClass:"el-icon-question",on:{click:function(t){e.helpShow=!0}}}),n("h3",{staticClass:"title"},[e._v("发红包")]),n("p",{staticClass:"redpacket-tips",class:{hidden:!e.tips}},[e._v(e._s(e.tips))]),n("div",{staticClass:"main-box"},[n("div",{staticClass:"input-item"},[n("span",{staticClass:"text"},[n("em",[e._v("拼")]),e._v("总金额\n ")]),n("div",{staticClass:"packet-box"},[n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.money,expression:"money",modifiers:{number:!0}}],attrs:{type:"number",placeholder:"0.00"},domProps:{value:e.money},on:{input:function(t){t.target.composing||(e.money=e._n(t.target.value))},blur:function(t){e.$forceUpdate()}}}),n("span",{staticClass:"unit"},[e._v("\n "+e._s(e.symbol)+"\n "),e.group.eosInfo?n("i",{staticClass:"down-arrow"}):e._e(),e.group.eosInfo?n("div",{staticClass:"code-menu"},[n("div",{staticClass:"code-item",on:{click:function(t){e.isGameToken=!e.isGameToken}}},[e._v("\n "+e._s(e.isGameToken?"EOS":e.group.eosInfo.token)+"\n ")])]):e._e()])])]),n("p",{staticClass:"input-tips"},[e._v("\n 当前为拼手气红包\n ")]),n("div",{staticClass:"input-item pack-num-input"},[n("span",{staticClass:"text"},[e._v("红包个数")]),n("div",{staticClass:"packet-box"},[n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.packetNum,expression:"packetNum",modifiers:{number:!0}}],attrs:{type:"number",placeholder:"请填写个数"},domProps:{value:e.packetNum},on:{input:function(t){t.target.composing||(e.packetNum=e._n(t.target.value))},blur:function(t){e.$forceUpdate()}}}),n("span",{staticClass:"unit"},[e._v("个")])])]),n("p",{staticClass:"group-user-num"},[e._v("\n 本群共"+e._s(e.group.userCounts)+"人\n ")]),n("textarea",{directives:[{name:"model",rawName:"v-model",value:e.word,expression:"word"}],staticClass:"words",attrs:{placeholder:"恭喜发财,大吉大利"},domProps:{value:e.word},on:{input:function(t){t.target.composing||(e.word=t.target.value)}}}),n("div",{staticClass:"sum"},[e._v("\n "+e._s(e.amountSum)+" "),n("span",[e._v(e._s(e.isGameToken?e.group.eosInfo.token:"EOS"))])]),n("button",{staticClass:"send-btn",class:{"is-disable":!e.amountSum||!e.packetNum,loading:e.isLoading},on:{click:e.sendPacket}},[e.isLoading?n("i",{staticClass:"el-icon-loading"}):e._e(),e._v(" 塞钱进红包\n ")])]),n("p",{staticClass:"bot"},[e._v("未领取的红包,将于24小时后发起退款")])]),n("div",{directives:[{name:"show",rawName:"v-show",value:e.helpShow,expression:"helpShow"}],staticClass:"help-wrap"},[n("i",{staticClass:"el-icon-close",on:{click:function(t){e.helpShow=!1}}}),n("h3",{staticClass:"title"},[e._v("帮助")]),n("div",{staticClass:"content"},[n("div",{staticClass:"item"},[e._v("\n 1. 发出的红包均为拼手气红包,抢得的\n 红包金额随机;一次最多发100个红包;\n ")]),n("div",{staticClass:"item"},[e._v("\n 2. 发红包时可选择币种;抢到的红包金额\n 直接转账到对应币种的绑定账户;若未绑\n 定账户,则所得币种余额在绑定账户后即\n 刻转账;\n ")]),n("div",{staticClass:"item"},[e._v("\n 3. MeeChat会从每次发出红包的金额中收\n 取2%的手续费,用于支付上链成本\n ")])])])]):e._e()])},r=[],s=(n("0fb7"),n("450d"),n("f529")),i=n.n(s),o=(n("c5f6"),n("3b2b"),n("a481"),n("7f7f"),n("3835")),c=(n("96cf"),n("1da1")),u=n("be94"),d=(n("cadf"),n("551c"),n("097d"),n("2f62")),p=n("5fe9"),l=n.n(p),h={transfer:function(e,t,n,a,r){var s="transfer",i={authorization:["".concat(e,"@").concat(r)]};return self!==top?m(s,[e,t,n,a,i]):window.EOS[s](e,t,n,a,i)},getCurrencyBalance:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"EOS",a="getCurrencyBalance";return self!==top?m(a,[e,t,n]):window.EOS.getCurrencyBalance(e,t,n)},doSymbolTransfer:function(){var e=Object(c["a"])(regeneratorRuntime.mark(function e(t,n,a,r,s,i){var o,c,u,d;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(o="transfer",c={authorization:["".concat(t,"@").concat(s)]},self===top){e.next=6;break}return e.abrupt("return",m(o,[t,n,a,r,c],i));case 6:return e.prev=6,e.next=9,window.EOS.contract(i);case 9:return u=e.sent,e.next=12,u[o](t,n,a,r,c);case 12:return d=e.sent,e.abrupt("return",Promise.resolve(d));case 16:return e.prev=16,e.t0=e["catch"](6),e.abrupt("return",Promise.reject(e.t0));case 19:case"end":return e.stop()}},e,this,[[6,16]])}));return function(t,n,a,r,s,i){return e.apply(this,arguments)}}()};function m(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return window.postMessager.send({action:"meechat:eosAction",data:{action:e,param:t,contract:n}})}var f=h,g={name:"packetSend",data:function(){return{helpShow:!1,money:1,packetNum:1,word:"恭喜发财,大吉大利",tips:"",isLoading:!1,isGameToken:!1}},computed:Object(u["a"])({},Object(d["d"])(["account","group","curSession"]),{isPrivate:function(){return this.$store.getters.isPrivate},amountSum:function(){return this.money},symbol:function(){return this.isGameToken?this.group.eosInfo.token:"EOS"},minSum:function(){return this.isGameToken?l.a.divide(this.group.eosInfo.min_amount,1e4):.1},maxSum:function(){return this.isGameToken?l.a.divide(this.group.eosInfo.max_amount,1e4):200}}),watch:{money:function(e){e>this.maxSum&&(this.money=this.maxSum,this.showTip("总金额 不能多于 ".concat(this.maxSum," ").concat(this.symbol))),e&&e/this.packetNum<.01&&(this.money=l.a.times(this.packetNum,.01),this.showTip("单个红包最小为 0.01 ".concat(this.symbol)))},packetNum:function(e,t){this.money&&l.a.divide(this.money,e)<.01&&(this.packetNum=t,this.showTip("单个红包最小为 0.01 ".concat(this.symbol))),e>100&&(this.packetNum=100,this.showTip("红包个数最大为 100 个"))}},methods:{showTip:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e3;this.tips=e,setTimeout(function(){t.tips=""},n)},sendPacket:function(){var e=Object(c["a"])(regeneratorRuntime.mark(function e(){var t,n,a,r,s,c,u,d,p,l,h=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(!(this.moneyNumber(p))){e.next=20;break}return i()({message:"账户余额不足",type:"error"}),this.isLoading=!1,e.abrupt("return");case 20:this.isGameToken?(l=this.group.eosInfo.token_code,f.doSymbolTransfer(this.account.name,"meechatadmin",t,JSON.stringify(a),this.account.authority,l).then(function(e){h.visible=!1}).catch(function(e){if(!e.type){var t=JSON.parse(e),n=t.error.details;i()({message:n[0].message,type:"error"})}}).finally(function(){h.isLoading=!1})):f.transfer(this.account.name,n,t,JSON.stringify(a),this.account.authority).then(function(e){h.visible=!1}).catch(function(e){if(!e.type){var t=JSON.parse(e),n=t.error.details;i()({message:n[0].message,type:"error"})}}).finally(function(){h.isLoading=!1}),e.next=25;break;case 23:i()({message:"网络太差~ 请重试",type:"error"}),this.isLoading=!1;case 25:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},mounted:function(){}},v=g,b=(n("6632"),n("2877")),_=Object(b["a"])(v,a,r,!1,null,"775553e2",null);_.options.__file="index.vue";var k=_.exports;k.install=function(e,t){var n,a=e.extend(k);e.prototype.$packetSend=function(){n&&(document.body.removeChild(n.$el),n=null),n=new a({el:document.createElement("div"),computed:{$store:function(){return t}},data:function(){return{visible:!0}}}),document.body.appendChild(n.$el)}};t["a"]=k},3537:function(e,t,n){"use strict";var a=n("2b0e"),r=a["default"].directive("focus",{inserted:function(e){e.focus()}});t["a"]={focus:r}},"38dd":function(e,t,n){},4:function(e,t){},"411a":function(e,t,n){"use strict";n("ac6a"),n("f751"),n("96cf");var a=n("1da1"),r=n("d4ec"),s=n("bee2"),i=n("9dbb"),o=null,c=function(){function e(){Object(r["a"])(this,e)}return Object(s["a"])(e,null,[{key:"initDb",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(o){e.next=5;break}return e.next=3,u();case 3:o=e.sent,console.log("finish",o);case 5:return e.abrupt("return",o);case 6:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"init",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark(function t(n){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.initDb();case 2:return t.abrupt("return",o.transaction(n,"readwrite").objectStore(n));case 3:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}]),e}();function u(){return d.apply(this,arguments)}function d(){return d=Object(a["a"])(regeneratorRuntime.mark(function e(){var t,n,a,r;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return t=localStorage.getItem("user_id"),n="database_".concat(t),a=3,e.next=5,Object(i["openDb"])(n,a,function(e){switch(console.log("oldVersion:".concat(e.oldVersion,", version:").concat(a)),e.oldVersion){case 0:var t=e.createObjectStore("message",{keyPath:"hash"});t.createIndex("group_id","group_id",{unique:!1}),t.createIndex("msg_num","msg_num",{unique:!1}),t.createIndex("create_time_int","create_time_int",{unique:!1});var n=e.createObjectStore("user",{keyPath:"user_id"});n.createIndex("user_name","user_name",{unique:!0}),n.createIndex("nick_name","nick_name",{unique:!1}),n.createIndex("is_admin","is_admin",{unique:!1}),n.createIndex("is_block","is_block",{unique:!1});case 1:var r=e.createObjectStore("session",{keyPath:"session_id"});r.createIndex("pin_time_int",["pin_time_int","update_time_int"],{unique:!1}),r.createIndex("is_pin","is_pin",{unique:!1}),r.createIndex("update_time_int","update_time_int",{unique:!1});case 2:t=e.transaction.objectStore("message"),t.deleteIndex("group_id"),t.createIndex("session_id",["session_id","create_time_int"],{unique:!1})}});case 5:return r=e.sent,e.abrupt("return",r);case 7:case"end":return e.stop()}},e,this)})),d.apply(this,arguments)}var p=c,l=function(){function e(t){Object(r["a"])(this,e),this.tableName=t}return Object(s["a"])(e,[{key:"getObjTable",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",p.init(this.tableName));case 1:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"replaceObject",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark(function e(t){var n;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getObjTable();case 2:n=e.sent,n.put(t);case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"replaceObjects",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark(function e(t){var n,a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getObjTable();case 2:for(a in n=e.sent,t)n.put(t[a]);case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"updateObject",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark(function e(t,n){var a,r,s;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getObjTable();case 2:a=e.sent,e.t0=regeneratorRuntime.keys(n);case 4:if((e.t1=e.t0()).done){e.next=20;break}if(r=e.t1.value,s=null,r!=a.keyPath){e.next=13;break}return e.next=10,a.get(n[r]);case 10:s=e.sent,e.next=16;break;case 13:return e.next=15,a.index(r).get(n[r]);case 15:s=e.sent;case 16:return s&&(s=Object.assign(s,t),a.put(s)),e.abrupt("break",20);case 20:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()}]),e}();t["a"]=l},"43e0":function(e,t,n){"use strict";n("cadf"),n("551c"),n("097d");var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"msgbox-fade"}},[e.visible?n("div",{staticClass:"pub-wrapper"},[n("div",{staticClass:"pub-mask"}),n("div",{staticClass:"pub-modal avater-modal"},[n("div",{staticClass:"modal-hd"},[n("i",{staticClass:"el-icon-close",on:{click:function(t){e.visible=!1}}})]),e.userInfo?n("div",{staticClass:"modal-bd"},[n("div",{staticClass:"user-top"},[n("div",{staticClass:"user-avatar",on:{click:function(t){e.$editUserAvatar(e.userInfo.cover_photo)}}},[e.userInfo.cover_photo?n("img",{attrs:{src:e.userInfo.cover_photo,alt:""}}):n("div",{staticClass:"user-avatar",class:"avatar_bg"+e.userInfo.user_id%9,attrs:{"data-name":e.userInfo.nick_name.slice(0,2).toUpperCase()}}),n("p",[e._v("更改头像")])]),n("div",{staticClass:"r-info"},[e.isEditName?n("input",{directives:[{name:"model",rawName:"v-model",value:e.newNickName,expression:"newNickName"},{name:"focus",rawName:"v-focus"}],staticClass:"edit-name-input",attrs:{type:"text"},domProps:{value:e.newNickName},on:{blur:e.handleEditName,input:function(t){t.target.composing||(e.newNickName=t.target.value)}}}):n("span",{staticClass:"name",on:{click:function(t){e.isEditName=!0,e.newNickName=e.userInfo.nick_name}}},[e._v(e._s(e.userInfo.nick_name)+" "),n("i",{staticClass:"el-icon-edit"})]),e.isEditIntroduce?n("input",{directives:[{name:"model",rawName:"v-model",value:e.newUserName,expression:"newUserName"},{name:"focus",rawName:"v-focus"}],staticClass:"edit-introduce-input",attrs:{type:"text"},domProps:{value:e.newUserName},on:{blur:e.handleEditIntroduce,input:function(t){t.target.composing||(e.newUserName=t.target.value)}}}):n("div",{staticClass:"introduce",on:{click:function(t){e.isEditIntroduce=!0,e.newUserName=e.userInfo.user_name}}},[e._v("@"+e._s(e.userInfo.user_name)+" "),n("i",{staticClass:"el-icon-edit"})])])]),n("div",{staticClass:"account-wrap"},[n("div",{staticClass:"title"},[e._v("已绑定账户")]),e._l(e.userInfo.binds,function(t,a){return n("div",{key:a,staticClass:"account-item"},[n("div",{staticClass:"type"},[n("strong",[e._v(e._s(t.type.toUpperCase()))]),t.account?n("div",{staticClass:"fr"},[0===t.is_visible?n("span",[e._v("已隐藏")]):e._e(),n("el-switch",{attrs:{"active-value":0,"inactive-value":1,"active-color":"#2298f0","inactive-color":"#cbcbcb"},on:{change:function(n){e.hanldeChange(t,n)}},model:{value:t.is_visible,callback:function(n){e.$set(t,"is_visible",n)},expression:"item.is_visible"}})],1):e._e()]),t.account?n("p",{staticClass:"key"},[e._v(e._s(t.account))]):n("el-button",{on:{click:function(n){e.bindAccount(t.type)}}},[e._v("绑定")])],1)})],2)]):e._e()])]):e._e()])},r=[],s=n("be94"),i=(n("e960"),n("450d"),n("b35b")),o=n.n(i),c=(n("0fb7"),n("f529")),u=n.n(c),d=(n("7f7f"),n("1951"),n("eedf")),p=n.n(d),l=n("2b0e"),h=n("2f62"),m=n("5975");l["default"].component(p.a.name,p.a),l["default"].component(u.a.name,u.a),l["default"].component(o.a.name,o.a);var f={name:"infoPopup",data:function(){return{isMe:!0,newNickName:"",isEditName:!1,newUserName:"",isEditIntroduce:!1}},computed:Object(s["a"])({},Object(h["d"])({userInfo:function(e){return e.userInfo}})),methods:{hanldeChange:function(e,t){var n=e.type;m["a"].user.setVisible({type:n,is_visible:t}).then(function(e){e.data})},bindAccount:function(e){},handleEditName:function(){var e=this;this.newNickName!==this.userInfo.nick_name?this.newNickName.length>36?this.$showTips("用户呢称过长"):(this.isEditName=!1,this.newNickName.length&&m["a"].user.changeNickName({nick_name:this.newNickName}).then(function(t){t.data;e.$store.commit("setUserNickName",e.newNickName),e.$store.commit("updateMemberNickName",{userId:e.$store.state.userId,nickName:e.newNickName}),e.$showTips("修改成功")})):this.isEditName=!1},handleEditIntroduce:function(){var e=this;this.newUserName!==this.userInfo.user_name?/^[a-zA-Z_0-9]{5,36}$/i.test(this.newUserName)?(this.isEditIntroduce=!1,this.newUserName.length&&m["a"].user.changeUserName({user_name:this.newUserName}).then(function(t){t.data;e.$store.commit("setUserUserName",e.newUserName),e.$store.commit("updateMemberNickName",{userId:e.$store.state.userId,userName:e.newUserName}),e.$showTips("修改成功")})):this.$showTips("只能是5-36位数字字母下划线"):this.isEditIntroduce=!1}}},g=f,v=(n("cf63"),n("2877")),b=Object(v["a"])(g,a,r,!1,null,null,null);b.options.__file="index.vue";var _=b.exports;_.install=function(e,t){var n,a=e.extend(_);e.prototype.$showUserInfo=function(){n&&(document.body.removeChild(n.$el),n=null),n=new a({el:document.createElement("div"),computed:{$store:function(){return t}},data:function(){return{visible:!0}}}),document.body.appendChild(n.$el)}};t["a"]=_},"4bc7":function(e,t,n){"use strict";n("cadf"),n("551c"),n("097d");var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"msgbox-fade"}},[e.visible?n("div",{staticClass:"pub-wrapper"},[n("div",{staticClass:"pub-mask"}),n("div",{staticClass:"pub-modal invite-modal"},[n("div",{staticClass:"modal-hd"},[n("i",{staticClass:"el-icon-close",on:{click:function(t){e.visible=!1}}})]),n("div",{staticClass:"modal-bd clearfix"},[n("div",{staticClass:"left"},[n("div",{staticClass:"search-input"},[n("input",{attrs:{type:"text",placeholder:"搜索联系人"},on:{input:function(t){e.searchUser(t,e.checkList)}}}),n("i",{staticClass:"el-icon-search"})]),n("div",{staticClass:"user-list select-list pub-scroll-box"},[e.isSearchGroup?[e.searchGroupList.length>0?e._l(e.searchGroupList,function(t,a){return n("div",{key:a,staticClass:"user-item",class:{checked:t.isChecked},on:{click:function(n){e.changeState(t.user_id)}}},[t.cover_photo?n("img",{staticClass:"user-avatar",attrs:{src:t.cover_photo,alt:""}}):n("div",{staticClass:"user-avatar",class:"avatar_bg"+t.user_id%9,attrs:{"data-name":t.nick_name.slice(0,2).toUpperCase()}}),n("span",{staticClass:"name"},[e._v(e._s(t.nick_name))]),t.isChoosed?n("i",{staticClass:"el-icon-circle-check"}):e._e(),2!=t.is_admin?n("div",[t.isChecked?n("i",{staticClass:"el-icon-circle-check"}):n("i",{staticClass:"el-icon-circle-uncheck"})]):e._e()])}):n("div",{staticClass:"no-data"},[e._v("暂无联系人")])]:[e.checkList.length>0?e._l(e.checkList,function(t,a){return n("div",{key:a,staticClass:"user-item",class:{checked:t.isChecked},on:{click:function(n){e.changeState(t.user_id)}}},[t.cover_photo?n("img",{staticClass:"user-avatar",attrs:{src:t.cover_photo,alt:""}}):n("div",{staticClass:"user-avatar",class:"avatar_bg"+t.user_id%9,attrs:{"data-name":t.nick_name.slice(0,2).toUpperCase()}}),n("span",{staticClass:"name"},[e._v(e._s(t.nick_name))]),t.isChoosed?n("i",{staticClass:"el-icon-circle-check is-choosed"}):2!=t.is_admin?n("div",[t.isChecked?n("i",{staticClass:"el-icon-circle-check"}):n("i",{staticClass:"el-icon-circle-uncheck"})]):e._e()])}):n("div",{staticClass:"no-data"},[e._v("暂无联系人")])]],2)]),n("div",{staticClass:"right"},[5==this.popInviteType?n("p",{staticClass:"tips"},[e._v("转让群主")]):this.checkedNum?n("p",{staticClass:"tips"},[e._v("已选择了"+e._s(e.checkedNum)+"位群成员")]):3==this.popInviteType?n("p",{staticClass:"tips"},[e._v("请勾选需要删除的群成员")]):n("p",{staticClass:"tips"},[e._v("请勾选需要添加的"+e._s(4==this.popInviteType?"管理员":"联系人"))]),1==this.popInviteType?n("div",{staticClass:"group-name"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.groupName,expression:"groupName"}],attrs:{type:"text",placeholder:"请输入群名称"},domProps:{value:e.groupName},on:{input:function(t){t.target.composing||(e.groupName=t.target.value)}}})]):e._e(),n("div",{staticClass:"user-list pub-scroll-box"},[e._l(e.resultList,function(t,a){return[t.isChecked?n("div",{key:a,staticClass:"user-item"},[t.cover_photo?n("img",{staticClass:"user-avatar",attrs:{src:t.cover_photo,alt:""}}):n("div",{staticClass:"user-avatar",class:"avatar_bg"+t.user_id%9,attrs:{"data-name":t.nick_name.slice(0,2).toUpperCase()}}),n("span",{staticClass:"name"},[e._v(e._s(t.nick_name))]),n("i",{staticClass:"el-icon-circle-close",on:{click:function(n){e.changeState(t.user_id,!1)}}})]):e._e()]})],2),n("div",{staticClass:"send-btn"},[n("el-button",{attrs:{type:"primary",disabled:e.checkedNum<=0},on:{click:e.optSubmit}},[e._v("确认")]),n("el-button",{on:{click:function(t){e.visible=!1}}},[e._v("取消")])],1)])])])]):e._e()])},r=[],s=(n("9e1f"),n("450d"),n("6ed5")),i=n.n(s),o=(n("0fb7"),n("f529")),c=n.n(o),u=(n("96cf"),n("1da1")),d=(n("ac6a"),n("2909")),p=n("be94"),l=(n("7f7f"),n("1951"),n("eedf")),h=n.n(l),m=n("2b0e"),f=n("2f62"),g=n("5975"),v=n("2ef0"),b=n.n(v),_=n("8869");m["default"].component(h.a.name,h.a);var k={name:"invitePopup",mixins:[_["c"]],data:function(){return{curItemIndex:0,checkList:[],groupName:""}},computed:Object(p["a"])({checkedNum:function(){return this.resultList.length}},Object(f["d"])({userId:function(e){return e.userId},popInviteType:function(e){return e.chat.popInviteType},friendList:function(e){return e.chat.friendList},groupId:function(e){return e.group.groupId},members:function(e){return e.group.members},membersNum:function(e){return e.group.membersNum},adminList:function(e){return e.group.adminList}}),{inviteList:function(){return this.checkList.filter(function(e){return e.isChecked}).map(function(e){return e.user_id}).join(",")},resultList:function(){for(var e=this.checkList.filter(function(e){return e.isChecked}),t=this.searchGroupList.filter(function(e){return e.isChecked}),n=Object(d["a"])(e).concat(Object(d["a"])(t)),a=[],r=0;r1&&void 0!==arguments[1])||arguments[1],n=this.getItemByUid(e);n.isChoosed||(4==this.popInviteType&&t&&this.adminList.length+this.checkedNum>5?this.$showTips("管理员最多只能设置5个人哦"):(5==this.popInviteType&&this.checkList.forEach(function(e){e.isChecked=!1}),n["isChecked"]=t,this.isSearchGroup?this.$set(this.searchGroupList,this.curItemIndex,n):this.$set(this.checkList,this.curItemIndex,n)))},initList:function(){var e=Object(u["a"])(regeneratorRuntime.mark(function e(){var t=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:e.t0=this.popInviteType,e.next=1===e.t0?3:2===e.t0?7:3===e.t0?11:4===e.t0?11:5===e.t0?11:13;break;case 3:return e.next=5,this.$store.dispatch("getFriendList");case 5:return this.checkList=this.friendList,e.abrupt("break",13);case 7:return e.next=9,this.$store.dispatch("getFriendList");case 9:return this.checkList=b.a.filter(this.friendList,function(e){return!t.members[e.user_id]}),e.abrupt("break",13);case 11:return this.checkList=this.members,e.abrupt("break",13);case 13:this.checkList=b.a.filter(this.checkList,function(e){return e.isChecked=!1,e.isChoosed=!1,4==t.popInviteType&&1==e.is_admin&&(e.isChoosed=!0),e.user_id!=t.userId});case 14:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),optSubmit:function(){switch(this.popInviteType){case 1:this.createGroup();break;case 2:this.invitesMember();break;case 3:this.removesMember();break;case 4:this.addAdmin();break;case 5:this.changeCreator();break}},createGroup:function(){var e=this;this.groupName?g["a"].group.createGroup({group_title:this.groupName,user_id_list:this.inviteList}).then(function(t){var n=t.data;e.$showTips("创建成功"),e.$store.commit("addSessionItem",n.data),e.visible=!1}):c()({message:"请输入群名",type:"warning"})},invitesMember:function(){var e=this;g["a"].group.invites({user_ids:this.inviteList,group_id:this.groupId}).then(function(t){t.data;e.visible=!1,e.$store.dispatch("getGroupInfo")})},removesMember:function(){var e=this;g["a"].group.removes({user_ids:this.inviteList,group_id:this.groupId}).then(function(t){t.data;e.visible=!1,e.$store.dispatch("getGroupInfo")})},addAdmin:function(){var e=this;g["a"].group.addAdmin({user_ids:this.inviteList,group_id:this.groupId}).then(function(t){t.data;e.visible=!1,e.$store.dispatch("getGroupInfo")})},changeCreator:function(){var e=this;if(!(this.checkedNum<=0)){var t=this.isSearchGroup?this.searchGroupList[this.curItemIndex]:this.checkList[this.curItemIndex],n=t.nick_name||t.user_name;console.log("this.inviteList",this.inviteList),i.a.confirm("确定要把群主转让给".concat(n)).then(function(){g["a"].group.changeCreator({new_creator:e.inviteList,group_id:e.groupId}).then(function(t){t.data;e.visible=!1,c()({message:"已转让群主给".concat(n),type:"warning"})})}).catch(function(e){console.log(e)})}}},created:function(){this.initList()},directives:{focus:{inserted:function(e){setTimeout(function(){e.focus()},200)}}}},w=k,y=(n("19d0"),n("2877")),I=Object(y["a"])(w,a,r,!1,null,"035fcd59",null);I.options.__file="index.vue";var x=I.exports;x.install=function(e,t){var n,a=e.extend(x);e.prototype.$showInvite=function(e){n&&(document.body.removeChild(n.$el),n=null),t.commit("setPopInviteType",e),n=new a({el:document.createElement("div"),computed:{$store:function(){return t}},data:function(){return{visible:!0}}}),document.body.appendChild(n.$el)}};t["a"]=x},5975:function(e,t,n){"use strict";n("cadf"),n("551c"),n("097d"),n("f751"),n("9e1f"),n("450d");var a=n("6ed5"),r=n.n(a),s=(n("96cf"),n("1da1")),i=n("bc3a"),o=n.n(i),c=n("4328"),u=n.n(c),d=n("1c04"),p="";"8080"===window.location.port&&(p="//test.mee.chat/");var l=o.a.create({baseURL:p,headers:{"Content-Type":"application/x-www-form-urlencoded"},transformRequest:[function(e){return e=u.a.stringify(e),e}],transformResponse:[],withCredentials:!0});function h(e){return m.apply(this,arguments)}function m(){return m=Object(s["a"])(regeneratorRuntime.mark(function e(t){var n;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,n={user_id:localStorage.getItem("user_id")||"",token:localStorage.getItem("token")||""},"post"===t.method?t.data?t.data=Object.assign(n,t.data):t.data=n:"get"===t.method&&(t.params?t.params=Object.assign(n,t.params):t.params=n),e.abrupt("return",t);case 6:return e.prev=6,e.t0=e["catch"](0),e.abrupt("return",t);case 9:case"end":return e.stop()}},e,this,[[0,6]])})),m.apply(this,arguments)}l.host=p,l.interceptors.request.use(function(){var e=Object(s["a"])(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(!t.needLogin){e.next=15;break}if(localStorage.getItem("user_id")&&localStorage.getItem("token")){e.next=12;break}return e.prev=2,e.next=5,d["a"].dispatch("doGameLogin");case 5:return e.abrupt("return",h(t));case 8:e.prev=8,e.t0=e["catch"](2);case 10:e.next=13;break;case 12:return e.abrupt("return",h(t));case 13:e.next=16;break;case 15:return e.abrupt("return",h(t));case 16:case"end":return e.stop()}},e,this,[[2,8]])}));return function(t){return e.apply(this,arguments)}}(),function(e){return Promise.reject(e)}),l.interceptors.response.use(function(e){return 1===e.data.result||-1001===e.data.code?Promise.resolve(e):-5!==e.data.code?(r.a.confirm(e.data.msg,"Error",{center:!0,showCancelButton:!1,showConfirmButton:!1,callback:function(){}}),Promise.reject(new Error(e.data.msg))):void d["a"].dispatch("resetGameLogin")},function(e){return Promise.reject(e)}),l.request2=function(){var e=Object(s["a"])(regeneratorRuntime.mark(function e(t){var n;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(n=null,!t.cache){e.next=5;break}return e.abrupt("return",new Promise(function(){var e=Object(s["a"])(regeneratorRuntime.mark(function e(a,r){var s,i,o,c;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return s=null,e.next=3,h(t);case 3:return t=e.sent,"post"===t.method?s=t.data:"get"===t.method&&(s=t.params),i=t.method+":"+t.url+"?"+JSON.stringify(s),o=localStorage.getItem(i),o&&(n=JSON.parse(o),t.callback(n)),e.next=10,l.request(t);case 10:n=e.sent,delete n["config"],delete n["request"],c=JSON.stringify(n),o!=c&&(n.data.result&&localStorage.setItem(i,c),t.callback(n));case 15:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()));case 5:return e.next=7,l.request(t);case 7:n=e.sent,t.callback(n);case 9:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}();var f=l,g={getRandom:function(e){return f.get("user/random",{params:e})},getRandom2:function(e){return f.get("user/random2",{params:e})},eosLogin:function(e){return f.post("user/eosLogin",e)},eosLogin2:function(e){return f.post("user/eosLogin2",e)},eosBind:function(e){return f.request({url:"user/eosBind",method:"post",needLogin:!0,data:e})},ethLogin:function(e){return f.post("user/ethLogin",e)},ethBind:function(e){return f.request({url:"user/ethBind",method:"post",needLogin:!0,data:e})},unBind:function(e){return f.request({url:"user/unbind",method:"post",needLogin:!0,data:e})},changeUserName:function(e){return f.request({url:"user/changeUserName",method:"post",needLogin:!0,data:e})},changeNickName:function(e){return f.request({url:"user/changeNickName",method:"post",needLogin:!0,data:e})},changePhoto:function(e){return f.request({url:"user/changePhoto",method:"post",needLogin:!0,data:e})},setVisible:function(e){return f.request({url:"user/setVisible",method:"post",needLogin:!0,data:e})},getInfo:function(e){return f.request({url:"user/info",method:"get",needLogin:!0,params:e})},getOtherInfo:function(e){return f.request({url:"user/info",method:"get",needLogin:!1,params:e})}},v=(n("ac6a"),n("33f8")),b=n("8d4d"),_=n("2593"),k={getNewMsg:function(e){var t=this;return f.request({url:"group/newMsg",method:"get",needLogin:!1,params:e}).then(function(n){return t.__saveMsg(e["group_id"],n.data.data),n.data.data.list.forEach(function(e){4==e.msg_type?e.msg=JSON.parse(Object(v["i"])(e.msg)):e.msg=Object(v["i"])(e.msg)}),Promise.resolve(n)})},__saveMsg:function(e,t){var n=new b["a"],a=function(a){var r=t.list[a];r["session_id"]=e,n.getObjTable().then(function(e){e.put(r)})};for(var r in t.list)a(r);var s=new _["a"];s.replaceObjects(t.userMap)},getHistoryMsg:function(e){return f.request({url:"group/historyMsg",method:"get",needLogin:!1,params:e})},getGroupInfo:function(e){return f.request({url:"group/info",method:"get",needLogin:!1,params:e})},getGroupInfo2:function(e,t){return f.request2({url:"group/info",method:"get",needLogin:!1,cache:!0,params:e,callback:t})},sendMsg:function(e){return e.msg=Object(v["g"])(e.msg),f.request({url:"group/sendMsg",method:"post",needLogin:!0,data:e})},createGroup:function(e){return f.request({url:"group/create",method:"post",needLogin:!0,data:e})},joinGroup:function(e){return f.request({url:"group/join",method:"get",needLogin:!0,params:e})},leaveGroup:function(e){return f.request({url:"group/leave",method:"get",needLogin:!0,params:e})},blockUser:function(e){return f.request({url:"group/blockUser",method:"get",needLogin:!0,params:e})},unblockUser:function(e){return f.request({url:"group/unblockUser",method:"get",needLogin:!0,params:e})},changeName:function(e){return f.request({url:"group/changeName",method:"post",needLogin:!0,data:e})},changeNotice:function(e){return f.request({url:"group/changeNotice",method:"post",needLogin:!0,data:e})},changeCover:function(e){return f.request({url:"group/changeCover",method:"post",needLogin:!0,data:e})},changeTitle:function(e){return f.request({url:"group/changeTitle",method:"post",needLogin:!0,data:e})},invites:function(e){return f.request({url:"group/invites",method:"post",needLogin:!0,data:e})},removes:function(e){return f.request({url:"group/removes",method:"post",needLogin:!0,data:e})},repealGroupMsg:function(e){return f.request({url:"group/repealMsg",method:"post",needLogin:!0,data:e})},sendImageMsg:function(e){return f.request({url:"group/sendImageMsg",method:"post",needLogin:!0,headers:{"Content-Type":"multipart/form-data"},data:e})},getFriends:function(e){return f.request({url:"group/getFriends",method:"get",needLogin:!0,params:e})},pinMsg:function(e){return f.request({url:"group/pinMsg",method:"post",needLogin:!0,data:e})},unpinMsg:function(e){return f.request({url:"group/unpinMsg",method:"post",needLogin:!0,data:e})},addAdmin:function(e){return f.request({url:"group/addAdmin",method:"post",needLogin:!0,data:e})},removeAdmin:function(e){return f.request({url:"group/removeAdmin",method:"post",needLogin:!0,data:e})},groupAuth:function(e){return f.request({url:"group/auth",method:"post",needLogin:!0,data:e})},searchMember:function(e){return f.request({url:"group/memberSearch",method:"post",needLogin:!0,data:e})},changeCreator:function(e){return f.request({url:"group/changeCreator",method:"post",needLogin:!0,data:e})}},w={getNewMsg:function(e){var t=this;return f.request({url:"person/newMsg",method:"get",needLogin:!0,params:e}).then(function(n){return t.__saveMsg(e["session_id"],n.data.data),n.data.data.list.forEach(function(e){4==e.msg_type?e.msg=JSON.parse(Object(v["i"])(e.msg)):e.msg=Object(v["i"])(e.msg)}),Promise.resolve(n)})},__saveMsg:function(e,t){var n=new b["a"],a=function(a){var r=t.list[a];r["session_id"]=e,n.getObjTable().then(function(e){e.put(r)})};for(var r in t.list)a(r);var s=new _["a"];s.replaceObjects(t.userMap)},getHistoryMsg:function(e){return f.request({url:"person/historyMsg",method:"get",needLogin:!0,params:e})},sendMsg:function(e){return e.msg=Object(v["g"])(e.msg),f.request({url:"person/sendMsg",method:"post",needLogin:!0,data:e})},repealPersonMsg:function(e){return f.request({url:"person/repealMsg",method:"post",needLogin:!0,data:e})}},y={sessionList:function(e){return f.request2({url:"session/list",method:"get",needLogin:!0,callback:e})},setRead:function(e){return f.request({url:"session/setRead",method:"post",needLogin:!0,data:e})},setMute:function(e){return f.request({url:"session/mute",method:"post",needLogin:!0,data:e})},cancelMute:function(e){return f.request({url:"session/unMute",method:"post",needLogin:!0,data:e})},setPin:function(e){return f.request({url:"session/pin",method:"post",needLogin:!0,data:e})},cancelPin:function(e){return f.request({url:"session/unPin",method:"post",needLogin:!0,data:e})},deleteSession:function(e){return f.request({url:"session/delete",method:"post",needLogin:!0,data:e})},fileUpload:function(e){return f.request({url:"session/uploadFile",method:"post",headers:{"Content-Type":"multipart/form-data"},needLogin:!0,data:e})}},I={grabPacket:function(e){return f.request({url:"redpack/grab",method:"get",needLogin:!0,params:e})},grabDetail:function(e){return f.request({url:"redpack/detail",method:"get",needLogin:!0,params:e})},sendList:function(e){return f.request({url:"redpack/sendList",method:"get",needLogin:!0,params:e})},receiveList:function(e){return f.request({url:"redpack/receiveList",method:"get",needLogin:!0,params:e})}};t["a"]={host:f.host,user:g,group:k,person:w,session:y,redpack:I}},"5a09":function(e,t,n){"use strict";n("cadf"),n("551c"),n("097d");var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"msgbox-fade"}},[e.visible?n("div",{staticClass:"pub-wrapper"},[n("div",{staticClass:"pub-mask"}),n("div",{staticClass:"pub-modal avater-modal"},[n("div",{staticClass:"modal-hd"},[n("i",{staticClass:"el-icon-close",on:{click:function(t){e.visible=!1}}})]),e.userInfo?n("div",{staticClass:"modal-bd"},[n("div",{staticClass:"user-top"},[n("div",{staticClass:"user-avatar"},[e.userInfo.cover_photo?n("img",{attrs:{src:e.userInfo.cover_photo,alt:""}}):n("div",{staticClass:"user-avatar",class:"avatar_bg"+e.userInfo.user_id%9,attrs:{"data-name":e.userInfo.nick_name.slice(0,2).toUpperCase()}})]),n("div",{staticClass:"r-info"},[n("span",{staticClass:"name"},[e._v(e._s(e.userInfo.nick_name))]),n("div",{staticClass:"introduce"},[e._v("@"+e._s(e.userInfo.user_id))])])]),n("div",{staticClass:"account-wrap min-height-account"},[n("div",{staticClass:"title"},[e._v("已绑定账户")]),e.accountList?e._l(e.accountList,function(t,a){return n("div",{key:a,staticClass:"account-item"},[n("div",{staticClass:"type"},[n("strong",[e._v(e._s(t.type.toUpperCase()))])]),t.account&&t.is_visible?n("p",{staticClass:"key"},[e._v(e._s(t.account))]):n("p",[e._v("未绑定或已隐藏")])])}):e._e()],2),e.$store.state.userId!=e.userId?n("button",{staticClass:"send-msg-btn",on:{click:e.sendMsg}},[e._v("发消息")]):e._e()]):e._e()])]):e._e()])},r=[],s=(n("c5f6"),n("be94")),i=(n("e960"),n("450d"),n("b35b")),o=n.n(i),c=(n("0fb7"),n("f529")),u=n.n(c),d=(n("7f7f"),n("1951"),n("eedf")),p=n.n(d),l=n("2b0e"),h=n("2f62"),m=n("5975");l["default"].component(p.a.name,p.a),l["default"].component(u.a.name,u.a),l["default"].component(o.a.name,o.a);var f={name:"infoPopup",data:function(){return{accountList:null,userInfo:null}},computed:Object(s["a"])({},Object(h["d"])({members:function(e){return e.group.members},groupId:function(e){return e.group.groupId},sessionList:function(e){return e.chat.sessionList},meId:function(e){return e.userId},meInfo:function(e){return e.userInfo}})),methods:{sendMsg:function(){var e=this.userInfo.user_id,t=Number(e)0&&void 0!==arguments[0]?arguments[0]:0;a&&(document.body.removeChild(a.$el),a=null),a=new r({el:document.createElement("div"),router:n,computed:{$store:function(){return t}},data:function(){return{visible:!0,userId:e}}}),document.body.appendChild(a.$el)}};t["a"]=_},"5f89":function(e,t,n){"use strict";var a=n("0627"),r=n.n(a);r.a},6032:function(e,t,n){"use strict";n("cadf"),n("551c"),n("097d");var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"msgbox-fade"}},[e.visible?n("div",{staticClass:"pub-wrapper"},[n("div",{staticClass:"pub-mask"}),n("div",{staticClass:"pub-modal avater-modal"},[n("div",{staticClass:"modal-hd"},[n("div",{staticClass:"title"},[e._v("\n "+e._s(e.isMe?"编辑头像":"编辑群头像")+"\n ")]),n("i",{staticClass:"el-icon-close",on:{click:function(t){e.visible=!1}}})]),n("div",{staticClass:"modal-bd"},[n("el-upload",{staticClass:"avatar-uploader",attrs:{accept:"image/*",action:e.uploadUrl,"show-file-list":!1,data:e.uploadData,"on-success":e.handleAvatarSuccess,name:"cover_photo","before-upload":e.beforeAvatarUpload}},[e.imageUrl?n("img",{staticClass:"avatar",attrs:{src:e.imageUrl}}):n("i",{staticClass:"el-icon-plus avatar-uploader-icon"})])],1),n("div",{staticClass:"modal-fd"},[n("el-button",{on:{click:function(t){e.visible=!1}}},[e._v("取消")])],1)])]):e._e()])},r=[],s=(n("f751"),n("0fb7"),n("450d"),n("f529")),i=n.n(s),o=(n("f225"),n("89a9")),c=n.n(o),u=(n("7f7f"),n("1951"),n("eedf")),d=n.n(u),p=n("2b0e");p["default"].component(d.a.name,d.a),p["default"].component(c.a.name,c.a),p["default"].component(i.a.name,i.a);var l={name:"avatarPopup",data:function(){return{}},computed:{uploadUrl:function(){var e="";return"8080"===window.location.port&&(e="//test.mee.chat/"),this.isMe?"".concat(e,"user/changePhoto"):"".concat(e,"group/changeCover")},uploadData:function(){var e={user_id:this.$store.state.userId,token:this.$store.state.token};return this.isMe?e:Object.assign(e,{group_id:this.$store.state.curSession})}},methods:{handleAvatarSuccess:function(e,t){this.imageUrl=URL.createObjectURL(t.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(e){var t=e.type.indexOf("image")>-1,n=e.size/1024/1024<2;return t&&n||this.$showTips("请上传2M以内的图片"),t&&n}},created:function(){}},h=l,m=(n("b83c"),n("2877")),f=Object(m["a"])(h,a,r,!1,null,null,null);f.options.__file="index.vue";var g=f.exports;g.install=function(e,t){var n,a=e.extend(g);e.prototype.$editUserAvatar=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";n&&(document.body.removeChild(n.$el),n=null),n=new a({el:document.createElement("div"),computed:{$store:function(){return t}},data:function(){return{visible:!0,imageUrl:e,isMe:!0}}}),document.body.appendChild(n.$el)},e.prototype.$editGroupAvatar=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";n&&(document.body.removeChild(n.$el),n=null),n=new a({el:document.createElement("div"),computed:{$store:function(){return t}},data:function(){return{visible:!0,imageUrl:e,isMe:!1}}}),document.body.appendChild(n.$el)}};t["a"]=g},6632:function(e,t,n){"use strict";var a=n("38dd"),r=n.n(a);r.a},"76a4":function(e,t,n){"use strict";var a=n("53ca"),r=!1;function s(e){if(e)return i(e)}function i(e){for(var t in s.prototype)e[t]=s.prototype[t];return e}function o(e,t){if(!(this instanceof o))return new o(e,t);e&&"object"===Object(a["a"])(e)&&(t=e,e=void 0),s(this),t=t||{},t.path=t.path||"/",this.opts=t,this.url=e,this.lastPing=null,this.socketCache=[],this.socketMaxCache=5,this.readyState="closed",this.binaryType=t.binaryType||"blob",this._reconnectTimes=0,this._reconnectionDelay=t.reconnectionDelay||1e3,this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.timeout(null===t.timeout?2e4:t.timeout),this.logStyle="color:blue; font-size:16px;font-weight:bold;",this.keepAliveInterval=15e3,this.keepAliveTimeout=null,this.keepAliveContent=t.keepAliveContent||1,this.autoConnect=!1!==t.autoConnect,this.autoConnect&&this.connect()}s.prototype.on=s.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},s.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},s.prototype.off=s.prototype.removeListener=s.prototype.removeAllListeners=s.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0===arguments.length)return this._callbacks={},this;var n,a=this._callbacks["$"+e];if(!a)return this;if(1===arguments.length)return delete this._callbacks["$"+e],this;for(var r=0;r-1:!!e.user_name&&e.user_name.indexOf(n)>-1,a=!!e.nick_name&&e.nick_name.indexOf(n)>-1,t||a}),this.isSearch=!0):this.isSearch=!1}}},i={data:function(){return{isSearchGroup:!1,searchGroupList:[]}},methods:{searchUser:function(e,t){var n=this,a=e.target.value,s=this.popInviteType;a?(t.length>=this.membersNum||1==s||2==s?this.searchGroupList=t.filter(function(e){var t,n;return t=!!e.user_name&&e.user_name.indexOf(a)>-1,n=!!e.nick_name&&e.nick_name.indexOf(a)>-1,t||n}):r["a"].group.searchMember({group_id:this.group.groupId,keyword:this.searchTxt}).then(function(e){var t=e.data;n.searchGroupList=t.data}),this.isSearchGroup=!0):this.isSearchGroup=!1}}},o={data:function(){return{atInd:0}},methods:{atPerson:function(e){var t=this.$refs.chatInput,n=t.selectionStart,a=n-this.keyAfterAt.length;this.inputMsg=this.inputMsg.slice(0,a)+"".concat(e," ")+this.inputMsg.slice(n),this.atInd=0,t.focus(),this.$nextTick(function(){t.setSelectionRange(a+e.length+1,a+e.length+1)}),this.$store.commit("updateIsNewAt",{isNewAt:this.group.isNewAt,isNewAtFound:!0}),this.$store.commit("updateGroupSearchList",[])},handleUp:function(){this.atInd>0&&this.atInd--},handleDown:function(){var e=this.filterMembers.length;this.atInd-1,a=!!t.nick_name&&t.nick_name.indexOf(e)>-1,n||a});this.$store.commit("updateGroupSearchList",n)}},inputMsg:function(e,t){this.fixIOS(),this.handleSelectionChange()}},methods:{getStrBeforeSelection:function(){var e=this.$refs.chatInput;if(!e)return"";var t=e.selectionStart,n=this.inputMsg.slice(0,t);return n},getStrAfterSelection:function(){var e=this.$refs.chatInput;if(!e)return"";var t=e.selectionStart,n=this.inputMsg.slice(t);return n},handleLeft:function(e){var t=this.$refs.chatInput,n=t.selectionStart;if(0!==n){var a=this.getStrBeforeSelection(),r=this.group.members;for(var s in r){var i=r[s].user_name,o=new RegExp("@".concat(i," $"));if(o.test(a))return e.preventDefault(),void t.setSelectionRange(n-i.length-2,n-i.length-2)}}},handleRight:function(e){var t=this.$refs.chatInput,n=t.selectionStart,a=this.getStrAfterSelection(),r=this.group.members;for(var s in r){var i=r[s].user_name,o=new RegExp("^@".concat(i," "));if(o.test(a))return e.preventDefault(),void t.setSelectionRange(n+i.length+2,n+i.length+2)}},handleDel:function(e){var t=this,n=this.$refs.chatInput,r=n.selectionStart;if(0!==r){var s=this.getStrBeforeSelection(),i=this.group.members,o=function(a){var o=i[a].user_name,c=new RegExp("@".concat(o," $"));if(c.test(s))return e.preventDefault(),t.inputMsg=t.inputMsg.slice(0,r-o.length-2)+t.inputMsg.slice(r),t.$nextTick(function(){n.setSelectionRange(r-o.length-2,r-o.length-2)}),{v:void 0}};for(var c in i){var u=o(c);if("object"===Object(a["a"])(u))return u.v}}},handleKeyDown:function(e){if(!this.atShow)return e.altKey||e.ctrlKey?this.inputMsg=this.inputMsg+"\n":(e.returnValue=!1,this.handleSend(e)),!1;e.preventDefault();var t=this.filterMembers[this.atInd];this.atPerson(t.user_name)},handleFocus:function(){this.fixIOS(),document.addEventListener("selectionchange",this.handleSelectionChange)},handleBlur:function(){this.fixIOS(!1),document.removeEventListener("selectionchange",this.handleSelectionChange),this.updateChatInputFocus(!1)},handleEsc:function(){this.selectionAfterAt=!1},handleGlobalClick:function(){this.selectionAfterAt=!1},handleSelectionChange:function(){var e=this.$refs.chatInput;if(e){var t=e.selectionStart,n=this.$refs.chatInput.selectionEnd;if(t===n){var a=this.getStrBeforeSelection();if(this.selectionAfterAt=/@/.test(a),this.selectionAfterAt){this.keyAfterAt=a.slice(a.lastIndexOf("@")+1);var r=this.keyAfterAt.indexOf(this.lastKeyAfterAt)<0;this.$store.commit("updateIsNewAt",{isNewAt:r,isNewAtFound:!r&&this.group.isNewAtFound}),r&&this.$store.commit("updateGroupSearchList",[]),this.lastKeyAfterAt=this.keyAfterAt}}}},fixIOS:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=navigator.userAgent,n=!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);if(n){var a=this.$refs.scrollWrap;if(!a)return;a.style.overflowY=e?"hidden":"scroll"}}}}},"8ad8":function(e,t,n){"use strict";var a=n("00f6"),r=n.n(a);r.a},"8d4d":function(e,t,n){"use strict";n("96cf");var a=n("1da1"),r=n("d4ec"),s=n("bee2"),i=n("99de"),o=n("7e84"),c=n("262e"),u=n("411a"),d=n("2593"),p=n("33f8"),l=function(e){function t(){return Object(r["a"])(this,t),Object(i["a"])(this,Object(o["a"])(t).call(this,"message"))}return Object(c["a"])(t,e),Object(s["a"])(t,[{key:"getMsg",value:function(){var e=Object(a["a"])(regeneratorRuntime.mark(function e(t){var n,a,r,s,i,o,c,u,l,h,m,f=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(n=f.length>1&&void 0!==f[1]?f[1]:100,t){e.next=3;break}return e.abrupt("return",null);case 3:return e.next=5,this.getObjTable();case 5:return a=e.sent,r=[t,0],s=[t,999999999999999],i=IDBKeyRange.bound(r,s),e.next=11,a.index("session_id").openCursor(i,"prev");case 11:o=e.sent,c=[],u={};case 14:if(!o||!o.value){e.next=29;break}if(l=o.value,!(c.length1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2500;u?(u.show=!0,u.text=e):(u=new p({el:document.createElement("div"),data:function(){return{text:e,show:!0}}}),document.body.appendChild(u.$el)),t&&setTimeout(function(){u.show=!1},n)}function h(){u&&(u.show=!1)}function m(){a["default"].prototype.$showTips=l,a["default"].prototype.$hideTips=h}t["a"]=m},b83c:function(e,t,n){"use strict";var a=n("192d"),r=n.n(a);r.a},c375:function(e,t,n){"use strict";n.d(t,"a",function(){return l}),n.d(t,"b",function(){return p});var a=n("2b0e"),r=n("8c4f"),s=function(){return n.e("chunk-dc040b34").then(n.bind(null,"a510"))},i=function(){return n.e("chunk-2c06dfd2").then(n.bind(null,"c918"))},o=function(){return n.e("chunk-4ae53135").then(n.bind(null,"3d61"))},c=function(){return Promise.all([n.e("chunk-87e4d9de"),n.e("chunk-27827e9c")]).then(n.bind(null,"d5e1"))},u=function(){return Promise.all([n.e("chunk-87e4d9de"),n.e("chunk-2bfa1569")]).then(n.bind(null,"7a9f"))},d=function(){return n.e("chunk-369c7fde").then(n.bind(null,"18d9"))};a["default"].use(r["a"]);var p=new r["a"]({routes:[{path:"/",alias:"/user/:id",name:"noChat",component:d},{path:"/group/:id",name:"groupChat",component:u},{path:"/pm/:id",name:"pmChat",component:u}]}),l=new r["a"]({routes:[{path:"/",alias:"/user/:id",name:"chatList",component:s},{path:"/me",name:"aboutMe",component:i},{path:"/editMe",name:"editMe",component:o},{path:"/group/:id",name:"groupChat",component:c},{path:"/pm/:id",name:"pmChat",component:c}]})},cf63:function(e,t,n){"use strict";var a=n("f1e5"),r=n.n(a);r.a},e332:function(e,t,n){"use strict";n.d(t,"b",function(){return a}),n.d(t,"c",function(){return r}),n.d(t,"a",function(){return s});n("cadf"),n("551c"),n("097d");function a(){var e={};return e="8080"===window.location.port||/^test|\.webdev2\./.test(window.location.host)?{protocol:"https",blockchain:"eos",port:"443",host:"localnet.eosget.io",chainId:"cf057bbfb72640471fd910bcb67639c22df9f92470936cddc1ade0e2f2e7dc4f"}:{protocol:EOS_PROTOCOL,blockchain:"eos",port:EOS_PORT,host:EOS_HOST,chainId:"aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906"},e}function r(){var e,t="https:"===document.location.protocol?"wss://":"ws://";return e="8080"===window.location.port||/^test|\.webdev2\./.test(window.location.host)?t+"test-ws.mee.chat":/^new[-.]/.test(window.location.host)?t+"new-ws.mee.chat":t+"ws.mee.chat",e}function s(){var e,t="https:"===document.location.protocol?"wss://":"ws://";return e="8080"===window.location.port||/^test|\.webdev2\./.test(window.location.host)?t+"test-ws-group.mee.chat":/^new[-.]/.test(window.location.host)?t+"new-ws-group.mee.chat":t+"ws-group.mee.chat",e}},f1e5:function(e,t,n){}}]);