Built motion from commit 9ab4571.|0.0.110
[motion.git] / server / config / ami / acw.js
index 771d3e6..316e396 100644 (file)
@@ -1 +1 @@
-var _0x9b1c=["\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(_0x9b1c[0]);var _=require(_0x9b1c[1]);var VoiceQueue=require(_0x9b1c[3])[_0x9b1c[2]];var Agent=require(_0x9b1c[3])[_0x9b1c[4]];var Action=require(_0x9b1c[3])[_0x9b1c[5]];var ReportAgent=require(_0x9b1c[3])[_0x9b1c[6]];var _voiceQueues;var _agents;var activeAcw={};function ACW(_0x6e22xb){console[_0x9b1c[8]](_0x9b1c[7]);VoiceQueue[_0x9b1c[14]]()[_0x9b1c[12]](function(_0x6e22x10){_voiceQueues=_0x6e22x10;synchCollection(VoiceQueue,_voiceQueues,_0x9b1c[13]);return Agent[_0x9b1c[16]](_0x9b1c[15])[_0x9b1c[14]]()})[_0x9b1c[12]](function(_0x6e22xd){_agents=_0x6e22xd;synchCollection(Agent,_agents,_0x9b1c[10]);Action[_0x9b1c[11]](function(_0x6e22xe,_0x6e22xf){return onSave(_0x6e22xe,_0x6e22xf)})})[_0x9b1c[9]](function(_0x6e22xc){console[_0x9b1c[8]](_0x6e22xc)})}function onSave(_0x6e22xe,_0x6e22xf){if(_0x6e22xe[_0x9b1c[13]]===_0x9b1c[17]&&activeAcw[_0x6e22xf[_0x9b1c[18]][_0x9b1c[15]]]){var _0x6e22x12;if(activeAcw[_0x6e22xf[_0x9b1c[18]][_0x9b1c[15]]][_0x9b1c[17]]){_0x6e22x12=activeAcw[_0x6e22xf[_0x9b1c[18]][_0x9b1c[15]]][_0x9b1c[19]]}else {clearTimeout(activeAcw[_0x6e22xf[_0x9b1c[18]][_0x9b1c[15]]][_0x9b1c[20]]);_0x6e22x12=moment[_0x9b1c[23]](moment()-activeAcw[_0x6e22xf[_0x9b1c[18]][_0x9b1c[15]]][_0x9b1c[22]])[_0x9b1c[21]]()};return ReportAgent[_0x9b1c[27]]({agentacw:true,acwtime:_0x6e22x12},{where:{uniqueid:activeAcw[_0x6e22xf[_0x9b1c[18]][_0x9b1c[15]]][_0x9b1c[24]],destuniqueid:activeAcw[_0x6e22xf[_0x9b1c[18]][_0x9b1c[15]]][_0x9b1c[25]]},transaction:_0x6e22xf[_0x9b1c[26]],individualHooks:true})[_0x9b1c[12]](function(){delete activeAcw[_0x6e22xf[_0x9b1c[18]][_0x9b1c[15]]]})[_0x9b1c[9]](function(_0x6e22xc){console[_0x9b1c[8]](_0x6e22xc)})}}ACW[_0x9b1c[29]][_0x9b1c[28]]=function(_0x6e22x13){var _0x6e22x14=_[_0x9b1c[31]](_voiceQueues,{name:_0x6e22x13[_0x9b1c[30]],acw:true});if(_0x6e22x14){var _0x6e22x15=_[_0x9b1c[31]](_agents,{name:_0x6e22x13[_0x9b1c[32]]});Action[_0x9b1c[37]]({name:_0x9b1c[38],data1:_0x9b1c[36],data2:_0x6e22x14[_0x9b1c[34]],data3:_0x6e22x13[_0x9b1c[24]],data4:_0x6e22x13[_0x9b1c[30]]},{body:{agent:_0x6e22x15[_0x9b1c[10]],type:_0x9b1c[36]}})[_0x9b1c[12]](function(){console[_0x9b1c[8]](_0x9b1c[33]);activeAcw[_0x6e22x15[_0x9b1c[10]]]={uniqueid:_0x6e22x13[_0x9b1c[24]],destuniqueid:_0x6e22x13[_0x9b1c[25]],acwTime:_0x6e22x14[_0x9b1c[34]],acwAt:moment(),unpause:false};activeAcw[_0x6e22x15[_0x9b1c[10]]][_0x9b1c[20]]=setTimeout(function(){console[_0x9b1c[8]](_0x9b1c[35]);activeAcw[_0x6e22x15[_0x9b1c[10]]][_0x9b1c[17]]=true;return Action[_0x9b1c[37]]({name:_0x9b1c[17],data1:_0x9b1c[36],data2:_0x6e22x14[_0x9b1c[34]],data3:_0x6e22x13[_0x9b1c[24]],data4:_0x6e22x13[_0x9b1c[30]]},{body:{agent:_0x6e22x15[_0x9b1c[10]],type:_0x9b1c[36]}})[_0x9b1c[9]](function(_0x6e22xc){console[_0x9b1c[8]](_0x6e22xc)})},_0x6e22x14[_0x9b1c[34]]*1000)})[_0x9b1c[9]](function(_0x6e22xc){console[_0x9b1c[8]](_0x6e22xc)})}};function synchCollection(_0x6e22x17,_0x6e22x18,_0x6e22x19){var _0x6e22x1a={};_0x6e22x17[_0x9b1c[11]](function(_0x6e22xe){_0x6e22x1a[_0x6e22x19]=_0x6e22xe[_0x6e22x19];updateCollection(_0x6e22x18,_0x6e22xe,_0x6e22x1a)});_0x6e22x17[_0x9b1c[39]](function(_0x6e22xe){_0x6e22x1a[_0x6e22x19]=_0x6e22xe[_0x6e22x19];updateCollection(_0x6e22x18,_0x6e22xe,_0x6e22x1a)});_0x6e22x17[_0x9b1c[41]](function(_0x6e22xe){_0x6e22x1a[_0x6e22x19]=_0x6e22xe[_0x6e22x19];_[_0x9b1c[40]](_0x6e22x18,_0x6e22x1a)})}function updateCollection(_0x6e22x1c,_0x6e22xe,_0x6e22x1a){var _0x6e22x1d=_[_0x9b1c[31]](_0x6e22x1c,_0x6e22x1a);var _0x6e22x1e=_0x6e22x1c[_0x9b1c[42]](_0x6e22x1d);if(_0x6e22x1d){_[_0x9b1c[43]](_0x6e22x1c[_0x6e22x1e],_0x6e22xe)}else {_0x6e22x1c[_0x9b1c[44]](_0x6e22xe)}}module[_0x9b1c[45]]=ACW
\ No newline at end of file
+var _0x1ffc=["\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(_0x1ffc[0]);var _=require(_0x1ffc[1]);var VoiceQueue=require(_0x1ffc[3])[_0x1ffc[2]];var Agent=require(_0x1ffc[3])[_0x1ffc[4]];var Action=require(_0x1ffc[3])[_0x1ffc[5]];var ReportAgent=require(_0x1ffc[3])[_0x1ffc[6]];var _voiceQueues;var _agents;var activeAcw={};function ACW(_0x1b9axb){console[_0x1ffc[8]](_0x1ffc[7]);VoiceQueue[_0x1ffc[14]]()[_0x1ffc[12]](function(_0x1b9ax10){_voiceQueues=_0x1b9ax10;synchCollection(VoiceQueue,_voiceQueues,_0x1ffc[13]);return Agent[_0x1ffc[16]](_0x1ffc[15])[_0x1ffc[14]]()})[_0x1ffc[12]](function(_0x1b9axd){_agents=_0x1b9axd;synchCollection(Agent,_agents,_0x1ffc[10]);Action[_0x1ffc[11]](function(_0x1b9axe,_0x1b9axf){return onSave(_0x1b9axe,_0x1b9axf)})})[_0x1ffc[9]](function(_0x1b9axc){console[_0x1ffc[8]](_0x1b9axc)})}function onSave(_0x1b9axe,_0x1b9axf){if(_0x1b9axe[_0x1ffc[13]]===_0x1ffc[17]&&activeAcw[_0x1b9axf[_0x1ffc[18]][_0x1ffc[15]]]){var _0x1b9ax12;if(activeAcw[_0x1b9axf[_0x1ffc[18]][_0x1ffc[15]]][_0x1ffc[17]]){_0x1b9ax12=activeAcw[_0x1b9axf[_0x1ffc[18]][_0x1ffc[15]]][_0x1ffc[19]]}else {clearTimeout(activeAcw[_0x1b9axf[_0x1ffc[18]][_0x1ffc[15]]][_0x1ffc[20]]);_0x1b9ax12=moment[_0x1ffc[23]](moment()-activeAcw[_0x1b9axf[_0x1ffc[18]][_0x1ffc[15]]][_0x1ffc[22]])[_0x1ffc[21]]()};return ReportAgent[_0x1ffc[27]]({agentacw:true,acwtime:_0x1b9ax12},{where:{uniqueid:activeAcw[_0x1b9axf[_0x1ffc[18]][_0x1ffc[15]]][_0x1ffc[24]],destuniqueid:activeAcw[_0x1b9axf[_0x1ffc[18]][_0x1ffc[15]]][_0x1ffc[25]]},transaction:_0x1b9axf[_0x1ffc[26]],individualHooks:true})[_0x1ffc[12]](function(){delete activeAcw[_0x1b9axf[_0x1ffc[18]][_0x1ffc[15]]]})[_0x1ffc[9]](function(_0x1b9axc){console[_0x1ffc[8]](_0x1b9axc)})}}ACW[_0x1ffc[29]][_0x1ffc[28]]=function(_0x1b9ax13){var _0x1b9ax14=_[_0x1ffc[31]](_voiceQueues,{name:_0x1b9ax13[_0x1ffc[30]],acw:true});if(_0x1b9ax14){var _0x1b9ax15=_[_0x1ffc[31]](_agents,{name:_0x1b9ax13[_0x1ffc[32]]});Action[_0x1ffc[37]]({name:_0x1ffc[38],data1:_0x1ffc[36],data2:_0x1b9ax14[_0x1ffc[34]],data3:_0x1b9ax13[_0x1ffc[24]],data4:_0x1b9ax13[_0x1ffc[30]]},{body:{agent:_0x1b9ax15[_0x1ffc[10]],type:_0x1ffc[36]}})[_0x1ffc[12]](function(){console[_0x1ffc[8]](_0x1ffc[33]);activeAcw[_0x1b9ax15[_0x1ffc[10]]]={uniqueid:_0x1b9ax13[_0x1ffc[24]],destuniqueid:_0x1b9ax13[_0x1ffc[25]],acwTime:_0x1b9ax14[_0x1ffc[34]],acwAt:moment(),unpause:false};activeAcw[_0x1b9ax15[_0x1ffc[10]]][_0x1ffc[20]]=setTimeout(function(){console[_0x1ffc[8]](_0x1ffc[35]);activeAcw[_0x1b9ax15[_0x1ffc[10]]][_0x1ffc[17]]=true;return Action[_0x1ffc[37]]({name:_0x1ffc[17],data1:_0x1ffc[36],data2:_0x1b9ax14[_0x1ffc[34]],data3:_0x1b9ax13[_0x1ffc[24]],data4:_0x1b9ax13[_0x1ffc[30]]},{body:{agent:_0x1b9ax15[_0x1ffc[10]],type:_0x1ffc[36]}})[_0x1ffc[9]](function(_0x1b9axc){console[_0x1ffc[8]](_0x1b9axc)})},_0x1b9ax14[_0x1ffc[34]]*1000)})[_0x1ffc[9]](function(_0x1b9axc){console[_0x1ffc[8]](_0x1b9axc)})}};function synchCollection(_0x1b9ax17,_0x1b9ax18,_0x1b9ax19){var _0x1b9ax1a={};_0x1b9ax17[_0x1ffc[11]](function(_0x1b9axe){_0x1b9ax1a[_0x1b9ax19]=_0x1b9axe[_0x1b9ax19];updateCollection(_0x1b9ax18,_0x1b9axe,_0x1b9ax1a)});_0x1b9ax17[_0x1ffc[39]](function(_0x1b9axe){_0x1b9ax1a[_0x1b9ax19]=_0x1b9axe[_0x1b9ax19];updateCollection(_0x1b9ax18,_0x1b9axe,_0x1b9ax1a)});_0x1b9ax17[_0x1ffc[41]](function(_0x1b9axe){_0x1b9ax1a[_0x1b9ax19]=_0x1b9axe[_0x1b9ax19];_[_0x1ffc[40]](_0x1b9ax18,_0x1b9ax1a)})}function updateCollection(_0x1b9ax1c,_0x1b9axe,_0x1b9ax1a){var _0x1b9ax1d=_[_0x1ffc[31]](_0x1b9ax1c,_0x1b9ax1a);var _0x1b9ax1e=_0x1b9ax1c[_0x1ffc[42]](_0x1b9ax1d);if(_0x1b9ax1d){_[_0x1ffc[43]](_0x1b9ax1c[_0x1b9ax1e],_0x1b9axe)}else {_0x1b9ax1c[_0x1ffc[44]](_0x1b9axe)}}module[_0x1ffc[45]]=ACW
\ No newline at end of file