Built motion from commit f738f9592c388b9f9eb3948f400a5c9d717a3561. Version 3.0.0...
[motion-next.git] / server / services / routing / model / agent.js
index e06f1ca..f0be86c 100644 (file)
@@ -1 +1 @@
-const a1329_0x11ef=['mailStatusTime','fax','faxPause','smsStatus','moment','whatsappStatus','emit','faxCapacity','StatusTime','exports','whatsappStatusTime','chat','md5','online','prototype','idle','format','lodash','mailPause','chatStatus','../../../rediscache','getChannelStatus','chatCapacity','smsStatusTime','whatsapp','faxStatusTime','openchannel','smsCapacity','sms','updateRealtime','chatCurrentCapacity','busy','working','mailStatus','voicePause','mail','chatPause','name','smsPause','faxStatus','stringify','mailCurrentCapacity','CurrentCapacity','unknown','chatStatusTime','whatsappCapacity','whatsappCurrentCapacity','openchannelCurrentCapacity','length','openchannelCapacity','Capacity','openchannelPause','mailCapacity','openchannelStatusTime','smsCurrentCapacity','faxCurrentCapacity','Status'];(function(_0x5c0d30,_0x4db46f){const _0x11efa4=function(_0x38d018){while(--_0x38d018){_0x5c0d30['push'](_0x5c0d30['shift']());}};_0x11efa4(++_0x4db46f);}(a1329_0x11ef,0xbb));const a1329_0x38d0=function(_0x5c0d30,_0x4db46f){_0x5c0d30=_0x5c0d30-0x1bb;let _0x11efa4=a1329_0x11ef[_0x5c0d30];return _0x11efa4;};const a1329_0x18d6e4=a1329_0x38d0;'use strict';const _=require(a1329_0x18d6e4(0x1bc)),moment=require(a1329_0x18d6e4(0x1e8)),md5=require(a1329_0x18d6e4(0x1f0)),{getSocket}=require(a1329_0x18d6e4(0x1bf)),io=getSocket();function Agent(_0x4bf60e){const _0x96fcf9=a1329_0x18d6e4;this['id']=_0x4bf60e['id']||0x0,this['name']=_0x4bf60e[_0x96fcf9(0x1d0)]||'',this[_0x96fcf9(0x1f1)]=_0x4bf60e[_0x96fcf9(0x1f1)]||!![],this[_0x96fcf9(0x1cd)]=_0x4bf60e[_0x96fcf9(0x1cd)]||![],this[_0x96fcf9(0x1cf)]=_0x4bf60e['chatPause']||![],this[_0x96fcf9(0x1bd)]=_0x4bf60e[_0x96fcf9(0x1bd)]||![],this[_0x96fcf9(0x1e6)]=_0x4bf60e[_0x96fcf9(0x1e6)]||![],this[_0x96fcf9(0x1d1)]=_0x4bf60e[_0x96fcf9(0x1d1)]||![],this['openchannelPause']=_0x4bf60e[_0x96fcf9(0x1de)]||![],this['chatStatus']=_0x96fcf9(0x1d6),this[_0x96fcf9(0x1d7)]=0x0,this[_0x96fcf9(0x1c1)]=_0x4bf60e[_0x96fcf9(0x1c1)]||0x0,this[_0x96fcf9(0x1c9)]=0x0,this[_0x96fcf9(0x1cc)]=_0x96fcf9(0x1d6),this[_0x96fcf9(0x1e4)]=0x0,this[_0x96fcf9(0x1df)]=_0x4bf60e[_0x96fcf9(0x1df)]||0x0,this[_0x96fcf9(0x1d4)]=0x0,this[_0x96fcf9(0x1d2)]='unknown',this[_0x96fcf9(0x1c4)]=0x0,this['faxCapacity']=_0x4bf60e[_0x96fcf9(0x1eb)]||0x0,this[_0x96fcf9(0x1e2)]=0x0,this[_0x96fcf9(0x1e7)]=_0x96fcf9(0x1d6),this[_0x96fcf9(0x1c2)]=0x0,this[_0x96fcf9(0x1c6)]=_0x4bf60e['smsCapacity']||0x0,this[_0x96fcf9(0x1e1)]=0x0,this[_0x96fcf9(0x1e9)]=_0x96fcf9(0x1d6),this['whatsappStatusTime']=0x0,this[_0x96fcf9(0x1d8)]=_0x4bf60e['whatsappCapacity']||0x0,this[_0x96fcf9(0x1d9)]=0x0,this['openchannelStatus']='unknown',this[_0x96fcf9(0x1e0)]=0x0,this[_0x96fcf9(0x1dc)]=_0x4bf60e[_0x96fcf9(0x1dc)]||0x0,this[_0x96fcf9(0x1da)]=0x0,this[_0x96fcf9(0x1ca)]=![],this['busyQueue']=undefined,this[_0x96fcf9(0x1f0)]='',this[_0x96fcf9(0x1c8)]();}Agent[a1329_0x18d6e4(0x1f2)]['getChannelStatus']=function(_0x4f8932){const _0x37a4c2=a1329_0x18d6e4;return this[_0x4f8932+'CurrentCapacity']>0x0?this[_0x4f8932+'Capacity']>0x0&&this[_0x4f8932+_0x37a4c2(0x1d5)]>=this[_0x4f8932+_0x37a4c2(0x1dd)]?'maxcapacity':_0x37a4c2(0x1cb):_0x37a4c2(0x1f3);},Agent['prototype'][a1329_0x18d6e4(0x1c8)]=function(){const _0x4b1a6e=a1329_0x18d6e4,_0x2c006a=[_0x4b1a6e(0x1ce),_0x4b1a6e(0x1ef),_0x4b1a6e(0x1c5),_0x4b1a6e(0x1e5),_0x4b1a6e(0x1c7),_0x4b1a6e(0x1c3)];for(let _0x345902=0x0;_0x345902<_0x2c006a[_0x4b1a6e(0x1db)];_0x345902+=0x1){const _0x1ff538=this[_0x4b1a6e(0x1c0)](_0x2c006a[_0x345902]);this[_0x2c006a[_0x345902]+_0x4b1a6e(0x1e3)]!==_0x1ff538&&(this[_0x2c006a[_0x345902]+_0x4b1a6e(0x1ec)]=_['toNumber'](moment()[_0x4b1a6e(0x1bb)]('x'))),this[_0x2c006a[_0x345902]+_0x4b1a6e(0x1e3)]=_0x1ff538;}const _0x330221={'id':this['id'],'name':this['name'],'online':this[_0x4b1a6e(0x1f1)],'voicePause':this[_0x4b1a6e(0x1cd)],'chatPause':this[_0x4b1a6e(0x1cf)],'mailPause':this[_0x4b1a6e(0x1bd)],'smsPause':this[_0x4b1a6e(0x1d1)],'faxPause':this[_0x4b1a6e(0x1e6)],'openchannelPause':this[_0x4b1a6e(0x1de)],'chatStatus':this[_0x4b1a6e(0x1be)],'chatStatusTime':this[_0x4b1a6e(0x1d7)],'chatCapacity':this[_0x4b1a6e(0x1c1)],'chatCurrentCapacity':this[_0x4b1a6e(0x1c9)],'mailStatus':this['mailStatus'],'mailStatusTime':this[_0x4b1a6e(0x1e4)],'mailCapacity':this['mailCapacity'],'mailCurrentCapacity':this[_0x4b1a6e(0x1d4)],'faxStatus':this[_0x4b1a6e(0x1d2)],'faxStatusTime':this[_0x4b1a6e(0x1c4)],'faxCapacity':this[_0x4b1a6e(0x1eb)],'faxCurrentCapacity':this[_0x4b1a6e(0x1e2)],'smsStatus':this[_0x4b1a6e(0x1e7)],'smsStatusTime':this['smsStatusTime'],'smsCapacity':this[_0x4b1a6e(0x1c6)],'smsCurrentCapacity':this['smsCurrentCapacity'],'whatsappStatus':this[_0x4b1a6e(0x1e9)],'whatsappStatusTime':this[_0x4b1a6e(0x1ee)],'whatsappCapacity':this['whatsappCapacity'],'whatsappCurrentCapacity':this[_0x4b1a6e(0x1d9)],'openchannelStatus':this['openchannelStatus'],'openchannelStatusTime':this[_0x4b1a6e(0x1e0)],'openchannelCapacity':this[_0x4b1a6e(0x1dc)],'openchannelCurrentCapacity':this['openchannelCurrentCapacity'],'busy':this[_0x4b1a6e(0x1ca)],'busyQueue':this['busyQueue']},_0xf025e2=md5(JSON[_0x4b1a6e(0x1d3)](_0x330221));this[_0x4b1a6e(0x1f0)]!==_0xf025e2&&(this[_0x4b1a6e(0x1f0)]=_0xf025e2,io[_0x4b1a6e(0x1ea)]('user:save',_0x330221));},module[a1329_0x18d6e4(0x1ed)]=Agent;
\ No newline at end of file
+const a1333_0x1a0b=['openchannel','chat','length','chatPause','smsStatus','mail','emit','name','sms','faxCapacity','smsPause','openchannelStatus','mailStatusTime','voicePause','whatsappCapacity','Status','smsStatusTime','mailPause','busy','faxStatusTime','chatStatusTime','faxCurrentCapacity','openchannelPause','prototype','toNumber','mailStatus','whatsappCurrentCapacity','openchannelCapacity','openchannelCurrentCapacity','faxPause','whatsappStatusTime','fax','lodash','getChannelStatus','faxStatus','StatusTime','idle','whatsappStatus','smsCapacity','user:save','CurrentCapacity','unknown','mailCurrentCapacity','md5','exports','whatsapp','busyQueue','chatStatus','online','mailCapacity','../../../rediscache','openchannelStatusTime','chatCapacity','updateRealtime','chatCurrentCapacity'];(function(_0xc9459c,_0x120421){const _0x1a0b21=function(_0x4e7ecd){while(--_0x4e7ecd){_0xc9459c['push'](_0xc9459c['shift']());}};_0x1a0b21(++_0x120421);}(a1333_0x1a0b,0x159));const a1333_0x4e7e=function(_0xc9459c,_0x120421){_0xc9459c=_0xc9459c-0x11b;let _0x1a0b21=a1333_0x1a0b[_0xc9459c];return _0x1a0b21;};const a1333_0x5525ee=a1333_0x4e7e;'use strict';const _=require(a1333_0x5525ee(0x12c)),moment=require('moment'),md5=require(a1333_0x5525ee(0x137)),{getSocket}=require(a1333_0x5525ee(0x13e)),io=getSocket();function Agent(_0x4dbdac){const _0x37ab6c=a1333_0x5525ee;this['id']=_0x4dbdac['id']||0x0,this[_0x37ab6c(0x14a)]=_0x4dbdac[_0x37ab6c(0x14a)]||'',this[_0x37ab6c(0x13c)]=_0x4dbdac[_0x37ab6c(0x13c)]||!![],this[_0x37ab6c(0x150)]=_0x4dbdac['voicePause']||![],this['chatPause']=_0x4dbdac[_0x37ab6c(0x146)]||![],this[_0x37ab6c(0x11d)]=_0x4dbdac[_0x37ab6c(0x11d)]||![],this[_0x37ab6c(0x129)]=_0x4dbdac[_0x37ab6c(0x129)]||![],this['smsPause']=_0x4dbdac[_0x37ab6c(0x14d)]||![],this[_0x37ab6c(0x122)]=_0x4dbdac[_0x37ab6c(0x122)]||![],this[_0x37ab6c(0x13b)]=_0x37ab6c(0x135),this[_0x37ab6c(0x120)]=0x0,this[_0x37ab6c(0x140)]=_0x4dbdac[_0x37ab6c(0x140)]||0x0,this[_0x37ab6c(0x142)]=0x0,this['mailStatus']=_0x37ab6c(0x135),this[_0x37ab6c(0x14f)]=0x0,this[_0x37ab6c(0x13d)]=_0x4dbdac[_0x37ab6c(0x13d)]||0x0,this[_0x37ab6c(0x136)]=0x0,this[_0x37ab6c(0x12e)]='unknown',this['faxStatusTime']=0x0,this[_0x37ab6c(0x14c)]=_0x4dbdac[_0x37ab6c(0x14c)]||0x0,this[_0x37ab6c(0x121)]=0x0,this[_0x37ab6c(0x147)]=_0x37ab6c(0x135),this['smsStatusTime']=0x0,this['smsCapacity']=_0x4dbdac[_0x37ab6c(0x132)]||0x0,this['smsCurrentCapacity']=0x0,this[_0x37ab6c(0x131)]=_0x37ab6c(0x135),this[_0x37ab6c(0x12a)]=0x0,this[_0x37ab6c(0x151)]=_0x4dbdac[_0x37ab6c(0x151)]||0x0,this[_0x37ab6c(0x126)]=0x0,this[_0x37ab6c(0x14e)]=_0x37ab6c(0x135),this[_0x37ab6c(0x13f)]=0x0,this[_0x37ab6c(0x127)]=_0x4dbdac['openchannelCapacity']||0x0,this['openchannelCurrentCapacity']=0x0,this[_0x37ab6c(0x11e)]=![],this[_0x37ab6c(0x13a)]=undefined,this[_0x37ab6c(0x137)]='',this[_0x37ab6c(0x141)]();}Agent[a1333_0x5525ee(0x123)]['getChannelStatus']=function(_0x982b0d){const _0x2cca1d=a1333_0x5525ee;return this[_0x982b0d+_0x2cca1d(0x134)]>0x0?this[_0x982b0d+'Capacity']>0x0&&this[_0x982b0d+'CurrentCapacity']>=this[_0x982b0d+'Capacity']?'maxcapacity':'working':_0x2cca1d(0x130);},Agent[a1333_0x5525ee(0x123)]['updateRealtime']=function(){const _0x4f5298=a1333_0x5525ee,_0x3780b6=[_0x4f5298(0x148),_0x4f5298(0x144),_0x4f5298(0x143),_0x4f5298(0x12b),_0x4f5298(0x14b),_0x4f5298(0x139)];for(let _0x97c515=0x0;_0x97c515<_0x3780b6[_0x4f5298(0x145)];_0x97c515+=0x1){const _0x29d0ea=this[_0x4f5298(0x12d)](_0x3780b6[_0x97c515]);this[_0x3780b6[_0x97c515]+_0x4f5298(0x11b)]!==_0x29d0ea&&(this[_0x3780b6[_0x97c515]+_0x4f5298(0x12f)]=_[_0x4f5298(0x124)](moment()['format']('x'))),this[_0x3780b6[_0x97c515]+_0x4f5298(0x11b)]=_0x29d0ea;}const _0x5af9f5={'id':this['id'],'name':this[_0x4f5298(0x14a)],'online':this[_0x4f5298(0x13c)],'voicePause':this[_0x4f5298(0x150)],'chatPause':this[_0x4f5298(0x146)],'mailPause':this['mailPause'],'smsPause':this['smsPause'],'faxPause':this[_0x4f5298(0x129)],'openchannelPause':this[_0x4f5298(0x122)],'chatStatus':this['chatStatus'],'chatStatusTime':this['chatStatusTime'],'chatCapacity':this[_0x4f5298(0x140)],'chatCurrentCapacity':this[_0x4f5298(0x142)],'mailStatus':this[_0x4f5298(0x125)],'mailStatusTime':this[_0x4f5298(0x14f)],'mailCapacity':this[_0x4f5298(0x13d)],'mailCurrentCapacity':this[_0x4f5298(0x136)],'faxStatus':this[_0x4f5298(0x12e)],'faxStatusTime':this[_0x4f5298(0x11f)],'faxCapacity':this[_0x4f5298(0x14c)],'faxCurrentCapacity':this[_0x4f5298(0x121)],'smsStatus':this[_0x4f5298(0x147)],'smsStatusTime':this[_0x4f5298(0x11c)],'smsCapacity':this[_0x4f5298(0x132)],'smsCurrentCapacity':this['smsCurrentCapacity'],'whatsappStatus':this[_0x4f5298(0x131)],'whatsappStatusTime':this[_0x4f5298(0x12a)],'whatsappCapacity':this[_0x4f5298(0x151)],'whatsappCurrentCapacity':this[_0x4f5298(0x126)],'openchannelStatus':this['openchannelStatus'],'openchannelStatusTime':this[_0x4f5298(0x13f)],'openchannelCapacity':this[_0x4f5298(0x127)],'openchannelCurrentCapacity':this[_0x4f5298(0x128)],'busy':this['busy'],'busyQueue':this[_0x4f5298(0x13a)]},_0x12cbc6=md5(JSON['stringify'](_0x5af9f5));this['md5']!==_0x12cbc6&&(this[_0x4f5298(0x137)]=_0x12cbc6,io[_0x4f5298(0x149)](_0x4f5298(0x133),_0x5af9f5));},module[a1333_0x5525ee(0x138)]=Agent;
\ No newline at end of file