Built motion from commit 450cc5d.|0.0.139
[motion.git] / server / config / ami / acw.js
index f5122c8..fc546f3 100644 (file)
@@ -1 +1 @@
-var _0x440a=["\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x41\x63\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x41\x43\x57\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x69\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x74\x68\x65\x6E","\x6E\x61\x6D\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x75\x6E\x70\x61\x75\x73\x65","\x62\x6F\x64\x79","\x61\x63\x77\x54\x69\x6D\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x61\x73\x53\x65\x63\x6F\x6E\x64\x73","\x61\x63\x77\x41\x74","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x73\x74\x75\x6E\x69\x71\x75\x65\x69\x64","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x71\x75\x65\x75\x65","\x66\x69\x6E\x64","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x50\x41\x55\x53\x45\x44\x20\x42\x59\x20\x41\x43\x57","\x61\x63\x77\x54\x69\x6D\x65\x6F\x75\x74","\x55\x4E\x50\x41\x55\x53\x45\x44\x20\x42\x59\x20\x41\x43\x57","\x41\x43\x57","\x63\x72\x65\x61\x74\x65","\x70\x61\x75\x73\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78\x4F\x66","\x6D\x65\x72\x67\x65","\x75\x6E\x73\x68\x69\x66\x74","\x65\x78\x70\x6F\x72\x74\x73"];var moment=require(_0x440a[0]);var _=require(_0x440a[1]);var VoiceQueue=require(_0x440a[3])[_0x440a[2]];var Agent=require(_0x440a[3])[_0x440a[4]];var Action=require(_0x440a[3])[_0x440a[5]];var ReportAgent=require(_0x440a[3])[_0x440a[6]];var _voiceQueues;var _agents;var activeAcw={};function ACW(_0x9100xb){console[_0x440a[8]](_0x440a[7]);VoiceQueue[_0x440a[14]]()[_0x440a[12]](function(_0x9100x10){_voiceQueues=_0x9100x10;synchCollection(VoiceQueue,_voiceQueues,_0x440a[13]);return Agent[_0x440a[16]](_0x440a[15])[_0x440a[14]]()})[_0x440a[12]](function(_0x9100xd){_agents=_0x9100xd;synchCollection(Agent,_agents,_0x440a[10]);Action[_0x440a[11]](function(_0x9100xe,_0x9100xf){return onSave(_0x9100xe,_0x9100xf)})})[_0x440a[9]](function(_0x9100xc){console[_0x440a[8]](_0x9100xc)})}function onSave(_0x9100xe,_0x9100xf){if(_0x9100xe[_0x440a[13]]===_0x440a[17]&&activeAcw[_0x9100xf[_0x440a[18]][_0x440a[15]]]){var _0x9100x12;if(activeAcw[_0x9100xf[_0x440a[18]][_0x440a[15]]][_0x440a[17]]){_0x9100x12=activeAcw[_0x9100xf[_0x440a[18]][_0x440a[15]]][_0x440a[19]]}else {clearTimeout(activeAcw[_0x9100xf[_0x440a[18]][_0x440a[15]]][_0x440a[20]]);_0x9100x12=moment[_0x440a[23]](moment()-activeAcw[_0x9100xf[_0x440a[18]][_0x440a[15]]][_0x440a[22]])[_0x440a[21]]()};return ReportAgent[_0x440a[27]]({agentacw:true,acwtime:_0x9100x12},{where:{uniqueid:activeAcw[_0x9100xf[_0x440a[18]][_0x440a[15]]][_0x440a[24]],destuniqueid:activeAcw[_0x9100xf[_0x440a[18]][_0x440a[15]]][_0x440a[25]]},transaction:_0x9100xf[_0x440a[26]],individualHooks:true})[_0x440a[12]](function(){delete activeAcw[_0x9100xf[_0x440a[18]][_0x440a[15]]]})[_0x440a[9]](function(_0x9100xc){console[_0x440a[8]](_0x9100xc)})}}ACW[_0x440a[29]][_0x440a[28]]=function(_0x9100x13){var _0x9100x14=_[_0x440a[31]](_voiceQueues,{name:_0x9100x13[_0x440a[30]],acw:true});if(_0x9100x14){var _0x9100x15=_[_0x440a[31]](_agents,{name:_0x9100x13[_0x440a[32]]});Action[_0x440a[37]]({name:_0x440a[38],data1:_0x9100x13[_0x440a[30]],data2:_0x9100x14[_0x440a[34]],data3:_0x9100x13[_0x440a[24]],data4:_0x440a[36]},{body:{agent:_0x9100x15[_0x440a[10]],type:_0x440a[36]}})[_0x440a[12]](function(){console[_0x440a[8]](_0x440a[33]);activeAcw[_0x9100x15[_0x440a[10]]]={uniqueid:_0x9100x13[_0x440a[24]],destuniqueid:_0x9100x13[_0x440a[25]],acwTime:_0x9100x14[_0x440a[34]],acwAt:moment(),unpause:false};activeAcw[_0x9100x15[_0x440a[10]]][_0x440a[20]]=setTimeout(function(){console[_0x440a[8]](_0x440a[35]);activeAcw[_0x9100x15[_0x440a[10]]][_0x440a[17]]=true;return Action[_0x440a[37]]({name:_0x440a[17],data1:_0x9100x13[_0x440a[30]],data2:_0x9100x14[_0x440a[34]],data3:_0x9100x13[_0x440a[24]],data4:_0x440a[36]},{body:{agent:_0x9100x15[_0x440a[10]],type:_0x440a[36]}})[_0x440a[9]](function(_0x9100xc){console[_0x440a[8]](_0x9100xc)})},_0x9100x14[_0x440a[34]]*1000)})[_0x440a[9]](function(_0x9100xc){console[_0x440a[8]](_0x9100xc)})}};function synchCollection(_0x9100x17,_0x9100x18,_0x9100x19){var _0x9100x1a={};_0x9100x17[_0x440a[11]](function(_0x9100xe){_0x9100x1a[_0x9100x19]=_0x9100xe[_0x9100x19];updateCollection(_0x9100x18,_0x9100xe,_0x9100x1a)});_0x9100x17[_0x440a[39]](function(_0x9100xe){_0x9100x1a[_0x9100x19]=_0x9100xe[_0x9100x19];updateCollection(_0x9100x18,_0x9100xe,_0x9100x1a)});_0x9100x17[_0x440a[41]](function(_0x9100xe){_0x9100x1a[_0x9100x19]=_0x9100xe[_0x9100x19];_[_0x440a[40]](_0x9100x18,_0x9100x1a)})}function updateCollection(_0x9100x1c,_0x9100xe,_0x9100x1a){var _0x9100x1d=_[_0x440a[31]](_0x9100x1c,_0x9100x1a);var _0x9100x1e=_0x9100x1c[_0x440a[42]](_0x9100x1d);if(_0x9100x1d){_[_0x440a[43]](_0x9100x1c[_0x9100x1e],_0x9100xe)}else {_0x9100x1c[_0x440a[44]](_0x9100xe)}}module[_0x440a[45]]=ACW
\ No newline at end of file
+var _0x720e=["\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x41\x63\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x41\x43\x57\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x69\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x74\x68\x65\x6E","\x6E\x61\x6D\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x70\x61\x75\x73\x65","\x75\x6E\x70\x61\x75\x73\x65","\x62\x6F\x64\x79","\x61\x63\x77\x54\x69\x6D\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x61\x73\x53\x65\x63\x6F\x6E\x64\x73","\x61\x63\x77\x41\x74","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x66\x69\x6E\x61\x6C\x6C\x79","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x73\x74\x75\x6E\x69\x71\x75\x65\x69\x64","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x71\x75\x65\x75\x65","\x66\x69\x6E\x64","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x50\x41\x55\x53\x45\x44\x20\x42\x59\x20\x41\x43\x57","\x61\x63\x77\x54\x69\x6D\x65\x6F\x75\x74","\x55\x4E\x50\x41\x55\x53\x45\x44\x20\x42\x59\x20\x41\x43\x57","\x41\x43\x57","\x63\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78\x4F\x66","\x6D\x65\x72\x67\x65","\x75\x6E\x73\x68\x69\x66\x74","\x65\x78\x70\x6F\x72\x74\x73"];var moment=require(_0x720e[0]);var _=require(_0x720e[1]);var VoiceQueue=require(_0x720e[3])[_0x720e[2]];var Agent=require(_0x720e[3])[_0x720e[4]];var Action=require(_0x720e[3])[_0x720e[5]];var ReportAgent=require(_0x720e[3])[_0x720e[6]];var _voiceQueues;var _agents;var activeAcw={};function ACW(_0x753axb){console[_0x720e[8]](_0x720e[7]);VoiceQueue[_0x720e[14]]()[_0x720e[12]](function(_0x753ax10){_voiceQueues= _0x753ax10;synchCollection(VoiceQueue,_voiceQueues,_0x720e[13]);return Agent[_0x720e[16]](_0x720e[15])[_0x720e[14]]()})[_0x720e[12]](function(_0x753axd){_agents= _0x753axd;synchCollection(Agent,_agents,_0x720e[10]);Action[_0x720e[11]](function(_0x753axe,_0x753axf){return onSave(_0x753axe,_0x753axf)})})[_0x720e[9]](function(_0x753axc){console[_0x720e[8]](_0x753axc)})}function onSave(_0x753axe,_0x753axf){var _0x753ax12;if((_0x753axe[_0x720e[13]]=== _0x720e[17]|| _0x753axe[_0x720e[13]]=== _0x720e[18])&& activeAcw[_0x753axf[_0x720e[19]][_0x720e[15]]]){if(_0x753axe[_0x720e[13]]=== _0x720e[18]&& activeAcw[_0x753axf[_0x720e[19]][_0x720e[15]]][_0x720e[18]]){_0x753ax12= activeAcw[_0x753axf[_0x720e[19]][_0x720e[15]]][_0x720e[20]]}else {clearTimeout(activeAcw[_0x753axf[_0x720e[19]][_0x720e[15]]][_0x720e[21]]);_0x753ax12= moment[_0x720e[24]](moment()- activeAcw[_0x753axf[_0x720e[19]][_0x720e[15]]][_0x720e[23]])[_0x720e[22]]()};return ReportAgent[_0x720e[29]]({agentacw:true,acwtime:_0x753ax12},{where:{uniqueid:activeAcw[_0x753axf[_0x720e[19]][_0x720e[15]]][_0x720e[26]],destuniqueid:activeAcw[_0x753axf[_0x720e[19]][_0x720e[15]]][_0x720e[27]]},transaction:_0x753axf[_0x720e[28]],individualHooks:true})[_0x720e[9]](function(_0x753axc){console[_0x720e[8]](_0x753axc)})[_0x720e[25]](function(){delete activeAcw[_0x753axf[_0x720e[19]][_0x720e[15]]]})}}ACW[_0x720e[31]][_0x720e[30]]= function(_0x753ax13){var _0x753ax14=_[_0x720e[33]](_voiceQueues,{name:_0x753ax13[_0x720e[32]],acw:true});if(_0x753ax14){var _0x753ax15=_[_0x720e[33]](_agents,{name:_0x753ax13[_0x720e[34]]});Action[_0x720e[39]]({name:_0x720e[17],data1:_0x720e[38],data2:_0x753ax14[_0x720e[36]],data3:_0x753ax13[_0x720e[26]],data4:_0x753ax13[_0x720e[32]]},{body:{agent:_0x753ax15[_0x720e[10]],type:_0x720e[38]}})[_0x720e[12]](function(){console[_0x720e[8]](_0x720e[35]);activeAcw[_0x753ax15[_0x720e[10]]]= {uniqueid:_0x753ax13[_0x720e[26]],destuniqueid:_0x753ax13[_0x720e[27]],acwTime:_0x753ax14[_0x720e[36]],acwAt:moment(),unpause:false};activeAcw[_0x753ax15[_0x720e[10]]][_0x720e[21]]= setTimeout(function(){console[_0x720e[8]](_0x720e[37]);activeAcw[_0x753ax15[_0x720e[10]]][_0x720e[18]]= true;return Action[_0x720e[39]]({name:_0x720e[18],data1:_0x720e[38],data2:_0x753ax14[_0x720e[36]],data3:_0x753ax13[_0x720e[26]],data4:_0x753ax13[_0x720e[32]]},{body:{agent:_0x753ax15[_0x720e[10]],type:_0x720e[38]}})[_0x720e[9]](function(_0x753axc){console[_0x720e[8]](_0x753axc)})},_0x753ax14[_0x720e[36]]* 1000)})[_0x720e[9]](function(_0x753axc){console[_0x720e[8]](_0x753axc)})}};function synchCollection(_0x753ax17,_0x753ax18,_0x753ax19){var _0x753ax1a={};_0x753ax17[_0x720e[11]](function(_0x753axe){_0x753ax1a[_0x753ax19]= _0x753axe[_0x753ax19];updateCollection(_0x753ax18,_0x753axe,_0x753ax1a)});_0x753ax17[_0x720e[40]](function(_0x753axe){_0x753ax1a[_0x753ax19]= _0x753axe[_0x753ax19];updateCollection(_0x753ax18,_0x753axe,_0x753ax1a)});_0x753ax17[_0x720e[42]](function(_0x753axe){_0x753ax1a[_0x753ax19]= _0x753axe[_0x753ax19];_[_0x720e[41]](_0x753ax18,_0x753ax1a)})}function updateCollection(_0x753ax1c,_0x753axe,_0x753ax1a){var _0x753ax1d=_[_0x720e[33]](_0x753ax1c,_0x753ax1a);var _0x753ax1e=_0x753ax1c[_0x720e[43]](_0x753ax1d);if(_0x753ax1d){_[_0x720e[44]](_0x753ax1c[_0x753ax1e],_0x753axe)}else {_0x753ax1c[_0x720e[45]](_0x753axe)}}module[_0x720e[46]]= ACW
\ No newline at end of file