Built motion from commit c49361c37b5f784889c8087ac6e0e91b7e6b561a. Version 3.0.0...
[motion-next.git] / server / services / ami / trigger / index.js
index dd56280..352280c 100644 (file)
@@ -1 +1 @@
-const a1134_0x1798=['Actions','./urlforward','html','custom:agentcalled','winapp','bind','data3','replace','motionbar','servicenowAccounts','channel','./script','data2','dynamics365Accounts','length','custom:agentnoanswer','zendeskAccounts','windowWidth','accounts','AccountId','uri','location','../../../config/logger','../ami','checkConditions','event','queue','util','user:%s','name','every','parse','600','templates','routeId','TemplateId','data4','custom:dialconnect','custom:closedinteraction','windowHeight','./integration','lastevent','emit','../../../rediscache','custom:rejectmessage','voiceExtensions','ChatWebsiteId','agent','custom:agentbusy','triggers','voiceQueues','custom:queuecallerabandon','data6','freshdeskAccounts','custom:agentnosuchnumber','operator','prototype','value','toLowerCase','custom:agentringnoanswer','browser','data5','account','vtigerAccounts','clone','stringify','popup','urlforward','custom:agentreject','syncAgentDial','interaction','zohoAccounts','isNil','trigger:%s','uriLocation','info','./cmContact','upperFirst','trigger:%s:%s','checkTrigger','chat','AllConditions','field','checkTriggers','exec','render','interface','agents','format','deskAccounts','freshsalesAccounts','custom:dialbegin','url','script','message','action','salesforceAccounts','contactmanager','exports','trigger','sugarcrmAccounts','800','AnyConditions','template\x20not\x20found','merge','custom:acceptmessage','some','syncCustomEvent','custom:agentcomplete','data1','custom:agentconnect','buildUri','membername'];(function(_0x50f159,_0x179878){const _0x367a8e=function(_0x57c23f){while(--_0x57c23f){_0x50f159['push'](_0x50f159['shift']());}};_0x367a8e(++_0x179878);}(a1134_0x1798,0x17f));const a1134_0x367a=function(_0x50f159,_0x179878){_0x50f159=_0x50f159-0x0;let _0x367a8e=a1134_0x1798[_0x50f159];return _0x367a8e;};const _0x86c411=a1134_0x367a;'use strict';const util=require(_0x86c411('0x60')),_=require('lodash'),url=require(_0x86c411('0x30')),Mustache=require('mustache'),urlforward=require(_0x86c411('0x46')),integration=require(_0x86c411('0x6d')),cmContact=require(_0x86c411('0x20')),script=require(_0x86c411('0x50')),logger=require(_0x86c411('0x5b'))(_0x86c411('0x37')),ami=require(_0x86c411('0x5c')),{getSocket}=require(_0x86c411('0x70')),io=getSocket(),operators={'equals':function(_0x57c23f,_0x52af50){return _0x57c23f==_0x52af50;},'not_equals':function(_0xb07a7a,_0x5b7eff){return _0xb07a7a!=_0x5b7eff;}},barAndWebActions=[_0x86c411('0x16'),_0x86c411('0x30'),_0x86c411('0x49')];function Trigger(_0x17a76c){const _0x67477c=_0x86c411;this[_0x67477c('0x5')]=_0x17a76c['triggers'],this[_0x67477c('0x2b')]=_0x17a76c[_0x67477c('0x2b')],this['voiceQueues']=_0x17a76c[_0x67477c('0x6')],this[_0x67477c('0x66')]=_0x17a76c['templates'],this[_0x67477c('0x1')]=_0x17a76c[_0x67477c('0x1')],this[_0x67477c('0x55')]=_0x17a76c[_0x67477c('0x55')],this[_0x67477c('0x9')]=_0x17a76c[_0x67477c('0x9')],this[_0x67477c('0x34')]=_0x17a76c[_0x67477c('0x34')],this[_0x67477c('0x38')]=_0x17a76c['sugarcrmAccounts'],this[_0x67477c('0x1b')]=_0x17a76c[_0x67477c('0x1b')],this['deskAccounts']=_0x17a76c[_0x67477c('0x2d')],this['vtigerAccounts']=_0x17a76c['vtigerAccounts'],this[_0x67477c('0x4e')]=_0x17a76c[_0x67477c('0x4e')],this[_0x67477c('0x52')]=_0x17a76c[_0x67477c('0x52')],this['freshsalesAccounts']=_0x17a76c[_0x67477c('0x2e')],this[_0x67477c('0x57')]={'zendesk':this[_0x67477c('0x55')],'salesforce':this[_0x67477c('0x34')],'freshdesk':this['freshdeskAccounts'],'sugarcrm':this[_0x67477c('0x38')],'zoho':this[_0x67477c('0x1b')],'desk':this[_0x67477c('0x2d')],'vtiger':this[_0x67477c('0x13')],'dynamics365':this[_0x67477c('0x52')],'freshsales':this[_0x67477c('0x2e')],'servicenow':this[_0x67477c('0x4e')]},ami['on'](_0x67477c('0x48'),this[_0x67477c('0x3f')][_0x67477c('0x4a')](this)),ami['on'](_0x67477c('0x42'),this[_0x67477c('0x3f')]['bind'](this)),ami['on'](_0x67477c('0xf'),this['syncCustomEvent'][_0x67477c('0x4a')](this)),ami['on'](_0x67477c('0x40'),this[_0x67477c('0x3f')][_0x67477c('0x4a')](this)),ami['on'](_0x67477c('0xa'),this[_0x67477c('0x3f')][_0x67477c('0x4a')](this)),ami['on'](_0x67477c('0x54'),this[_0x67477c('0x3f')][_0x67477c('0x4a')](this)),ami['on'](_0x67477c('0x4'),this[_0x67477c('0x3f')][_0x67477c('0x4a')](this)),ami['on']('custom:agentcongestion',this[_0x67477c('0x3f')][_0x67477c('0x4a')](this)),ami['on'](_0x67477c('0x18'),this[_0x67477c('0x3f')][_0x67477c('0x4a')](this)),ami['on'](_0x67477c('0x7'),this[_0x67477c('0x3f')][_0x67477c('0x4a')](this)),ami['on']('custom:timeout',this[_0x67477c('0x3f')]['bind'](this)),ami['on'](_0x67477c('0x2f'),this['syncAgentDial']['bind'](this)),ami['on'](_0x67477c('0x6a'),this['syncAgentDial'][_0x67477c('0x4a')](this)),ami['on']('custom:dialend',this[_0x67477c('0x19')][_0x67477c('0x4a')](this)),ami['on']('custom:newinteraction',this[_0x67477c('0x3f')]['bind'](this)),ami['on'](_0x67477c('0x6b'),this[_0x67477c('0x3f')][_0x67477c('0x4a')](this)),ami['on']('custom:incomingmessage',this[_0x67477c('0x3f')][_0x67477c('0x4a')](this)),ami['on']('custom:outgoingmessage',this['syncCustomEvent'][_0x67477c('0x4a')](this)),ami['on'](_0x67477c('0x3d'),this['syncCustomEvent'][_0x67477c('0x4a')](this)),ami['on'](_0x67477c('0x0'),this['syncCustomEvent'][_0x67477c('0x4a')](this));}Trigger['prototype'][_0x86c411('0x6f')]=function(_0x2a1314,_0x2b398f,_0x18d6b0){const _0x31d028=_0x86c411;logger[_0x31d028('0x1f')](_0x2a1314,_0x2b398f,JSON[_0x31d028('0x15')](_0x18d6b0)),io['to'](_0x2a1314)[_0x31d028('0x6f')](_0x2b398f,_0x18d6b0);},Trigger[_0x86c411('0xc')][_0x86c411('0x3f')]=function(_0x5b8ba8){const _0x1b21fa=_0x86c411,_0x3a69fd=_[_0x1b21fa('0x14')](_0x5b8ba8);this['checkTriggers'](_0x3a69fd);},Trigger['prototype']['syncAgentDial']=function(_0x5a8f16){const _0x8a91a4=_0x86c411;this[_0x8a91a4('0x2b')][_0x5a8f16['interface']]&&this[_0x8a91a4('0x3f')](_0x5a8f16);},Trigger[_0x86c411('0xc')][_0x86c411('0x27')]=function(_0x3a95e2){const _0x51aa75=_0x86c411;let _0x465987;for(const _0x4f1dd9 in this[_0x51aa75('0x5')]){if(typeof this[_0x51aa75('0x5')][_0x4f1dd9]!=='undefined'){if(this[_0x51aa75('0x5')][_0x4f1dd9]['status']){_0x465987=this[_0x51aa75('0x23')](this[_0x51aa75('0x5')][_0x4f1dd9],_0x3a95e2);if(_0x465987){_['merge'](_0x3a95e2,_0x3a95e2['variables']);for(let _0x7ea694=0x0,_0x33cc27;_0x7ea694<this['triggers'][_0x4f1dd9][_0x51aa75('0x45')][_0x51aa75('0x53')];_0x7ea694+=0x1){_0x33cc27=this[_0x51aa75('0x5')][_0x4f1dd9][_0x51aa75('0x45')][_0x7ea694];if(this[_0x51aa75('0x2b')][_0x3a95e2['interface']])switch(_0x33cc27[_0x51aa75('0x33')]['toLowerCase']()){case _0x51aa75('0x35'):break;case _0x51aa75('0x4d'):case _0x51aa75('0x10'):{const _0xf12348={};switch(barAndWebActions[_0x33cc27[_0x51aa75('0x41')]]){case _0x51aa75('0x16'):_0xf12348[_0x51aa75('0x68')]=_0x33cc27[_0x51aa75('0x51')],_0xf12348[_0x51aa75('0x47')]=this['templates'][_0x33cc27[_0x51aa75('0x51')]]?Mustache[_0x51aa75('0x29')](this[_0x51aa75('0x66')][_0x33cc27[_0x51aa75('0x51')]][_0x51aa75('0x47')],_0x3a95e2):_0x51aa75('0x3b');break;case _0x51aa75('0x30'):_0xf12348[_0x51aa75('0x59')]=this[_0x51aa75('0x43')](_0x33cc27[_0x51aa75('0x51')],_0x3a95e2,_[_0x51aa75('0x1c')](_0x33cc27[_0x51aa75('0x4b')])?!![]:parseInt(_0x33cc27[_0x51aa75('0x4b')],0xa));_[_0x51aa75('0x1c')](_0x33cc27[_0x51aa75('0x69')])?_0xf12348[_0x51aa75('0x5a')]='0':(_0xf12348[_0x51aa75('0x1e')]=_0x33cc27[_0x51aa75('0x69')],_0xf12348[_0x51aa75('0x56')]=_[_0x51aa75('0x1c')](_0x33cc27[_0x51aa75('0x11')])?_0x51aa75('0x39'):_0x33cc27[_0x51aa75('0x11')],_0xf12348[_0x51aa75('0x6c')]=_[_0x51aa75('0x1c')](_0x33cc27[_0x51aa75('0x8')])?_0x51aa75('0x65'):_0x33cc27[_0x51aa75('0x8')]);break;case _0x51aa75('0x49'):_0xf12348['winApplication']=_0x33cc27['data2']?Mustache[_0x51aa75('0x29')](_0x33cc27[_0x51aa75('0x51')],_0x3a95e2):'',_0xf12348['winArguments']=_0x33cc27[_0x51aa75('0x4b')]?Mustache[_0x51aa75('0x29')](_0x33cc27[_0x51aa75('0x4b')],_0x3a95e2):'';break;}this[_0x51aa75('0x6f')](util[_0x51aa75('0x2c')](_0x51aa75('0x61'),this['agents'][_0x3a95e2[_0x51aa75('0x2a')]][_0x51aa75('0x62')]),util[_0x51aa75('0x2c')](_0x51aa75('0x22'),_0x33cc27['action'][_0x51aa75('0xe')](),barAndWebActions[_0x33cc27[_0x51aa75('0x41')]]),_['merge'](_0xf12348,_0x3a95e2));break;}case'jscripty':this[_0x51aa75('0x6f')](util['format']('user:%s',this[_0x51aa75('0x2b')][_0x3a95e2[_0x51aa75('0x2a')]][_0x51aa75('0x62')]),util[_0x51aa75('0x2c')](_0x51aa75('0x1d'),_0x33cc27[_0x51aa75('0x33')]['toLowerCase']()),_[_0x51aa75('0x3c')]({'ProjectId':parseInt(_0x33cc27[_0x51aa75('0x41')],0xa)},_0x3a95e2));break;default:this[_0x51aa75('0x6f')](util[_0x51aa75('0x2c')](_0x51aa75('0x61'),this[_0x51aa75('0x2b')][_0x3a95e2[_0x51aa75('0x2a')]][_0x51aa75('0x62')]),util['format']('trigger:%s',_0x33cc27['action'][_0x51aa75('0xe')]()),_[_0x51aa75('0x3c')]({},_0x33cc27,_0x3a95e2));}switch(_0x33cc27['action'][_0x51aa75('0xe')]()){case _0x51aa75('0x35'):cmContact[_0x51aa75('0x28')](this[_0x51aa75('0x2b')][_0x3a95e2['interface']],this['triggers'][_0x4f1dd9],_0x33cc27,_0x3a95e2);break;case'integration':integration[_0x51aa75('0x28')](_0x33cc27,_0x3a95e2,this[_0x51aa75('0x57')],this[_0x51aa75('0x2b')][_0x3a95e2['interface']],this[_0x51aa75('0x6')][_0x3a95e2[_0x51aa75('0x5f')]],this[_0x51aa75('0x1')][_0x3a95e2[_0x51aa75('0x67')]]);break;case _0x51aa75('0x17'):urlforward[_0x51aa75('0x28')](_0x33cc27,_0x3a95e2);break;case _0x51aa75('0x31'):script['exec'](_0x33cc27,_0x3a95e2);break;}}}}}}},Trigger[_0x86c411('0xc')][_0x86c411('0x43')]=function(_0x29c5bc,_0x56605f,_0x3496f3){const _0x2f7937=_0x86c411,_0x223624=url[_0x2f7937('0x64')](Mustache['render'](_0x29c5bc,_0x56605f),!![]);_0x3496f3&&_[_0x2f7937('0x3c')](_0x223624['query'],_0x56605f);delete _0x223624['search'];let _0x444b4d=url['format'](_0x223624);return _0x444b4d=_0x444b4d[_0x2f7937('0x4c')](/\/\?/g,'?'),_0x444b4d;},Trigger['prototype'][_0x86c411('0x23')]=function(_0x166243,_0x1ae49f){const _0x4271e6=_0x86c411;let _0x2684e2=!![],_0x5da723=!![];return _0x166243[_0x4271e6('0x25')][_0x4271e6('0x53')]&&(_0x2684e2=_[_0x4271e6('0x63')](_0x166243[_0x4271e6('0x25')],this[_0x4271e6('0x5d')](_0x1ae49f,_0x166243['channel']))),_0x166243[_0x4271e6('0x3a')][_0x4271e6('0x53')]&&(_0x5da723=_[_0x4271e6('0x3e')](_0x166243['AnyConditions'],this['checkConditions'](_0x1ae49f,_0x166243[_0x4271e6('0x4f')]))),_0x2684e2&&_0x5da723;},Trigger[_0x86c411('0xc')]['checkConditions']=function(_0x373e4d,_0x513b45){return function(_0x5eb340){const _0x380a48=a1134_0x367a;switch(_0x5eb340[_0x380a48('0x26')]){case _0x380a48('0x12'):if(_0x373e4d[_0x380a48('0x4f')]===_0x513b45)return _0x513b45===_0x380a48('0x24')?_0x373e4d[_0x380a48('0x2')]?operators[_0x5eb340['operator']](Number(_0x5eb340[_0x380a48('0xd')]),_0x373e4d[_0x380a48('0x2')]):![]:_0x373e4d[_['upperFirst'](_0x513b45)+_0x380a48('0x58')]?operators[_0x5eb340[_0x380a48('0xb')]](Number(_0x5eb340[_0x380a48('0xd')]),_0x373e4d[_[_0x380a48('0x21')](_0x513b45)+'AccountId']):![];break;case _0x380a48('0x1a'):case _0x380a48('0x32'):if(_0x373e4d[_0x380a48('0x4f')]===_0x513b45)return _0x373e4d[_0x380a48('0x5e')]?operators[_0x5eb340[_0x380a48('0xb')]](_0x5eb340[_0x380a48('0xd')],_0x373e4d[_0x380a48('0x5e')]):![];break;case _0x380a48('0x5f'):return _0x373e4d[_0x380a48('0x5f')]?operators[_0x5eb340[_0x380a48('0xb')]](_0x5eb340[_0x380a48('0xd')],_0x373e4d[_0x380a48('0x5f')]):![];case _0x380a48('0x3'):return _0x373e4d[_0x380a48('0x44')]?operators[_0x5eb340['operator']](_0x5eb340['value'],_0x373e4d[_0x380a48('0x44')]):![];case _0x380a48('0x6e'):return _0x373e4d[_0x380a48('0x6e')]?operators[_0x5eb340[_0x380a48('0xb')]](_0x5eb340['value'],_0x373e4d[_0x380a48('0x6e')]):![];case _0x380a48('0x67'):return _0x373e4d[_0x380a48('0x67')]?operators[_0x5eb340['operator']](_0x5eb340[_0x380a48('0xd')],_0x373e4d[_0x380a48('0x67')]):![];}return![];};},module[_0x86c411('0x36')]=Trigger;
\ No newline at end of file
+const a1134_0x39a2=['urlforward','freshsalesAccounts','status','custom:agentnosuchnumber','winapp','ChatWebsiteId','data4','./cmContact','action','jscripty','custom:outgoingmessage','toLowerCase','search','syncAgentDial','template\x20not\x20found','../ami','custom:dialbegin','winApplication','merge','Actions','message','600','triggers','bind','value','zohoAccounts','buildUri','html','channel','data5','custom:agentringnoanswer','./script','parse','operator','freshdeskAccounts','prototype','interface','dynamics365Accounts','../../../config/logger','util','uri','contactmanager','script','TemplateId','vtigerAccounts','custom:agentcongestion','custom:agentnoanswer','render','custom:rejectmessage','emit','windowWidth','custom:acceptmessage','custom:agentbusy','replace','custom:incomingmessage','format','checkTrigger','data2','queue','location','user:%s','name','custom:queuecallerabandon','custom:agentcalled','motionbar','./integration','membername','deskAccounts','info','voiceQueues','exec','browser','data1','templates','upperFirst','checkConditions','popup','AccountId','sugarcrmAccounts','zendeskAccounts','800','checkTriggers','custom:timeout','event','syncCustomEvent','interaction','account','some','url','lastevent','windowHeight','servicenowAccounts','isNil','../../../rediscache','custom:dialconnect','custom:agentcomplete','custom:closedinteraction','agent','AnyConditions','data3','accounts','trigger:%s','mustache','AllConditions','length','custom:agentreject','undefined','chat','trigger','./urlforward','exports','variables','trigger:%s:%s','agents','custom:dialend','routeId'];(function(_0xf30b4,_0x39a275){const _0x30c3b7=function(_0x44da7b){while(--_0x44da7b){_0xf30b4['push'](_0xf30b4['shift']());}};_0x30c3b7(++_0x39a275);}(a1134_0x39a2,0x88));const a1134_0x30c3=function(_0xf30b4,_0x39a275){_0xf30b4=_0xf30b4-0x0;let _0x30c3b7=a1134_0x39a2[_0xf30b4];return _0x30c3b7;};const _0x46733a=a1134_0x30c3;'use strict';const util=require(_0x46733a('0x13')),_=require('lodash'),url=require(_0x46733a('0x44')),Mustache=require(_0x46733a('0x52')),urlforward=require(_0x46733a('0x59')),integration=require(_0x46733a('0x2d')),cmContact=require(_0x46733a('0x67')),script=require(_0x46733a('0xb')),logger=require(_0x46733a('0x12'))(_0x46733a('0x58')),ami=require(_0x46733a('0x6f')),{getSocket}=require(_0x46733a('0x49')),io=getSocket(),operators={'equals':function(_0x44da7b,_0x5be175){return _0x44da7b==_0x5be175;},'not_equals':function(_0x2c0f6f,_0x30beed){return _0x2c0f6f!=_0x30beed;}},barAndWebActions=[_0x46733a('0x38'),_0x46733a('0x44'),_0x46733a('0x64')];function Trigger(_0x305934){const _0x3dbaf3=_0x46733a;this[_0x3dbaf3('0x2')]=_0x305934['triggers'],this[_0x3dbaf3('0x5d')]=_0x305934[_0x3dbaf3('0x5d')],this[_0x3dbaf3('0x31')]=_0x305934['voiceQueues'],this[_0x3dbaf3('0x35')]=_0x305934[_0x3dbaf3('0x35')],this['voiceExtensions']=_0x305934['voiceExtensions'],this[_0x3dbaf3('0x3b')]=_0x305934[_0x3dbaf3('0x3b')],this[_0x3dbaf3('0xe')]=_0x305934[_0x3dbaf3('0xe')],this['salesforceAccounts']=_0x305934['salesforceAccounts'],this[_0x3dbaf3('0x3a')]=_0x305934[_0x3dbaf3('0x3a')],this[_0x3dbaf3('0x5')]=_0x305934['zohoAccounts'],this[_0x3dbaf3('0x2f')]=_0x305934[_0x3dbaf3('0x2f')],this[_0x3dbaf3('0x18')]=_0x305934[_0x3dbaf3('0x18')],this[_0x3dbaf3('0x47')]=_0x305934[_0x3dbaf3('0x47')],this[_0x3dbaf3('0x11')]=_0x305934[_0x3dbaf3('0x11')],this[_0x3dbaf3('0x61')]=_0x305934[_0x3dbaf3('0x61')],this['accounts']={'zendesk':this[_0x3dbaf3('0x3b')],'salesforce':this['salesforceAccounts'],'freshdesk':this[_0x3dbaf3('0xe')],'sugarcrm':this['sugarcrmAccounts'],'zoho':this[_0x3dbaf3('0x5')],'desk':this[_0x3dbaf3('0x2f')],'vtiger':this[_0x3dbaf3('0x18')],'dynamics365':this['dynamics365Accounts'],'freshsales':this[_0x3dbaf3('0x61')],'servicenow':this[_0x3dbaf3('0x47')]},ami['on'](_0x3dbaf3('0x2b'),this['syncCustomEvent'][_0x3dbaf3('0x3')](this)),ami['on']('custom:agentconnect',this['syncCustomEvent']['bind'](this)),ami['on'](_0x3dbaf3('0xa'),this[_0x3dbaf3('0x40')][_0x3dbaf3('0x3')](this)),ami['on'](_0x3dbaf3('0x4b'),this[_0x3dbaf3('0x40')][_0x3dbaf3('0x3')](this)),ami['on'](_0x3dbaf3('0x63'),this[_0x3dbaf3('0x40')][_0x3dbaf3('0x3')](this)),ami['on'](_0x3dbaf3('0x1a'),this['syncCustomEvent'][_0x3dbaf3('0x3')](this)),ami['on'](_0x3dbaf3('0x20'),this[_0x3dbaf3('0x40')][_0x3dbaf3('0x3')](this)),ami['on'](_0x3dbaf3('0x19'),this[_0x3dbaf3('0x40')]['bind'](this)),ami['on'](_0x3dbaf3('0x55'),this['syncCustomEvent'][_0x3dbaf3('0x3')](this)),ami['on'](_0x3dbaf3('0x2a'),this[_0x3dbaf3('0x40')][_0x3dbaf3('0x3')](this)),ami['on'](_0x3dbaf3('0x3e'),this[_0x3dbaf3('0x40')][_0x3dbaf3('0x3')](this)),ami['on'](_0x3dbaf3('0x70'),this[_0x3dbaf3('0x6d')][_0x3dbaf3('0x3')](this)),ami['on'](_0x3dbaf3('0x4a'),this[_0x3dbaf3('0x6d')][_0x3dbaf3('0x3')](this)),ami['on'](_0x3dbaf3('0x5e'),this[_0x3dbaf3('0x6d')][_0x3dbaf3('0x3')](this)),ami['on']('custom:newinteraction',this['syncCustomEvent'][_0x3dbaf3('0x3')](this)),ami['on'](_0x3dbaf3('0x4c'),this[_0x3dbaf3('0x40')]['bind'](this)),ami['on'](_0x3dbaf3('0x22'),this['syncCustomEvent'][_0x3dbaf3('0x3')](this)),ami['on'](_0x3dbaf3('0x6a'),this[_0x3dbaf3('0x40')][_0x3dbaf3('0x3')](this)),ami['on'](_0x3dbaf3('0x1f'),this[_0x3dbaf3('0x40')]['bind'](this)),ami['on'](_0x3dbaf3('0x1c'),this[_0x3dbaf3('0x40')][_0x3dbaf3('0x3')](this));}Trigger['prototype'][_0x46733a('0x1d')]=function(_0xd7662,_0xc8fe8c,_0x1327c2){const _0x3dafbf=_0x46733a;logger[_0x3dafbf('0x30')](_0xd7662,_0xc8fe8c,JSON['stringify'](_0x1327c2)),io['to'](_0xd7662)[_0x3dafbf('0x1d')](_0xc8fe8c,_0x1327c2);},Trigger['prototype'][_0x46733a('0x40')]=function(_0x18bedb){const _0x29eeab=_0x46733a,_0xc50e84=_['clone'](_0x18bedb);this[_0x29eeab('0x3d')](_0xc50e84);},Trigger[_0x46733a('0xf')]['syncAgentDial']=function(_0x4c548f){const _0x4436b8=_0x46733a;this['agents'][_0x4c548f[_0x4436b8('0x10')]]&&this[_0x4436b8('0x40')](_0x4c548f);},Trigger[_0x46733a('0xf')][_0x46733a('0x3d')]=function(_0x3fbc8b){const _0x30867c=_0x46733a;let _0x4476e2;for(const _0x86a3e9 in this[_0x30867c('0x2')]){if(typeof this[_0x30867c('0x2')][_0x86a3e9]!==_0x30867c('0x56')){if(this[_0x30867c('0x2')][_0x86a3e9][_0x30867c('0x62')]){_0x4476e2=this['checkTrigger'](this[_0x30867c('0x2')][_0x86a3e9],_0x3fbc8b);if(_0x4476e2){_[_0x30867c('0x72')](_0x3fbc8b,_0x3fbc8b[_0x30867c('0x5b')]);for(let _0x32d430=0x0,_0x490417;_0x32d430<this['triggers'][_0x86a3e9]['Actions'][_0x30867c('0x54')];_0x32d430+=0x1){_0x490417=this['triggers'][_0x86a3e9][_0x30867c('0x73')][_0x32d430];if(this[_0x30867c('0x5d')][_0x3fbc8b[_0x30867c('0x10')]])switch(_0x490417[_0x30867c('0x68')][_0x30867c('0x6b')]()){case _0x30867c('0x15'):break;case _0x30867c('0x2c'):case _0x30867c('0x33'):{const _0x4d211f={};switch(barAndWebActions[_0x490417['data1']]){case _0x30867c('0x38'):_0x4d211f[_0x30867c('0x17')]=_0x490417[_0x30867c('0x25')],_0x4d211f[_0x30867c('0x7')]=this['templates'][_0x490417['data2']]?Mustache[_0x30867c('0x1b')](this['templates'][_0x490417[_0x30867c('0x25')]]['html'],_0x3fbc8b):_0x30867c('0x6e');break;case'url':_0x4d211f[_0x30867c('0x14')]=this['buildUri'](_0x490417[_0x30867c('0x25')],_0x3fbc8b,_['isNil'](_0x490417['data3'])?!![]:parseInt(_0x490417['data3'],0xa));_['isNil'](_0x490417['data4'])?_0x4d211f[_0x30867c('0x27')]='0':(_0x4d211f['uriLocation']=_0x490417[_0x30867c('0x66')],_0x4d211f[_0x30867c('0x1e')]=_['isNil'](_0x490417['data5'])?_0x30867c('0x3c'):_0x490417[_0x30867c('0x9')],_0x4d211f[_0x30867c('0x46')]=_[_0x30867c('0x48')](_0x490417['data6'])?_0x30867c('0x1'):_0x490417['data6']);break;case'winapp':_0x4d211f[_0x30867c('0x71')]=_0x490417['data2']?Mustache['render'](_0x490417[_0x30867c('0x25')],_0x3fbc8b):'',_0x4d211f['winArguments']=_0x490417['data3']?Mustache[_0x30867c('0x1b')](_0x490417[_0x30867c('0x4f')],_0x3fbc8b):'';break;}this['emit'](util[_0x30867c('0x23')](_0x30867c('0x28'),this[_0x30867c('0x5d')][_0x3fbc8b[_0x30867c('0x10')]][_0x30867c('0x29')]),util[_0x30867c('0x23')](_0x30867c('0x5c'),_0x490417[_0x30867c('0x68')]['toLowerCase'](),barAndWebActions[_0x490417[_0x30867c('0x34')]]),_[_0x30867c('0x72')](_0x4d211f,_0x3fbc8b));break;}case _0x30867c('0x69'):this['emit'](util[_0x30867c('0x23')](_0x30867c('0x28'),this[_0x30867c('0x5d')][_0x3fbc8b[_0x30867c('0x10')]][_0x30867c('0x29')]),util[_0x30867c('0x23')](_0x30867c('0x51'),_0x490417['action'][_0x30867c('0x6b')]()),_['merge']({'ProjectId':parseInt(_0x490417[_0x30867c('0x34')],0xa)},_0x3fbc8b));break;default:this[_0x30867c('0x1d')](util[_0x30867c('0x23')](_0x30867c('0x28'),this[_0x30867c('0x5d')][_0x3fbc8b[_0x30867c('0x10')]]['name']),util['format'](_0x30867c('0x51'),_0x490417['action'][_0x30867c('0x6b')]()),_[_0x30867c('0x72')]({},_0x490417,_0x3fbc8b));}switch(_0x490417[_0x30867c('0x68')][_0x30867c('0x6b')]()){case _0x30867c('0x15'):cmContact['exec'](this[_0x30867c('0x5d')][_0x3fbc8b['interface']],this[_0x30867c('0x2')][_0x86a3e9],_0x490417,_0x3fbc8b);break;case'integration':integration[_0x30867c('0x32')](_0x490417,_0x3fbc8b,this[_0x30867c('0x50')],this[_0x30867c('0x5d')][_0x3fbc8b[_0x30867c('0x10')]],this[_0x30867c('0x31')][_0x3fbc8b[_0x30867c('0x26')]],this['voiceExtensions'][_0x3fbc8b['routeId']]);break;case _0x30867c('0x60'):urlforward['exec'](_0x490417,_0x3fbc8b);break;case _0x30867c('0x16'):script[_0x30867c('0x32')](_0x490417,_0x3fbc8b);break;}}}}}}},Trigger[_0x46733a('0xf')][_0x46733a('0x6')]=function(_0x351910,_0x4aef52,_0x266b9b){const _0x46a8ce=_0x46733a,_0x5db053=url[_0x46a8ce('0xc')](Mustache[_0x46a8ce('0x1b')](_0x351910,_0x4aef52),!![]);_0x266b9b&&_[_0x46a8ce('0x72')](_0x5db053['query'],_0x4aef52);delete _0x5db053[_0x46a8ce('0x6c')];let _0x555c60=url[_0x46a8ce('0x23')](_0x5db053);return _0x555c60=_0x555c60[_0x46a8ce('0x21')](/\/\?/g,'?'),_0x555c60;},Trigger[_0x46733a('0xf')][_0x46733a('0x24')]=function(_0x2f79f2,_0x5c1dee){const _0x57d986=_0x46733a;let _0x3d2a2c=!![],_0x4ca5e8=!![];return _0x2f79f2[_0x57d986('0x53')][_0x57d986('0x54')]&&(_0x3d2a2c=_['every'](_0x2f79f2[_0x57d986('0x53')],this['checkConditions'](_0x5c1dee,_0x2f79f2[_0x57d986('0x8')]))),_0x2f79f2[_0x57d986('0x4e')]['length']&&(_0x4ca5e8=_[_0x57d986('0x43')](_0x2f79f2[_0x57d986('0x4e')],this[_0x57d986('0x37')](_0x5c1dee,_0x2f79f2[_0x57d986('0x8')]))),_0x3d2a2c&&_0x4ca5e8;},Trigger[_0x46733a('0xf')][_0x46733a('0x37')]=function(_0x10b9cb,_0x3082fc){return function(_0x5eacf0){const _0x4e3948=a1134_0x30c3;switch(_0x5eacf0['field']){case _0x4e3948('0x42'):if(_0x10b9cb[_0x4e3948('0x8')]===_0x3082fc)return _0x3082fc===_0x4e3948('0x57')?_0x10b9cb['ChatWebsiteId']?operators[_0x5eacf0['operator']](Number(_0x5eacf0[_0x4e3948('0x4')]),_0x10b9cb[_0x4e3948('0x65')]):![]:_0x10b9cb[_[_0x4e3948('0x36')](_0x3082fc)+_0x4e3948('0x39')]?operators[_0x5eacf0[_0x4e3948('0xd')]](Number(_0x5eacf0['value']),_0x10b9cb[_['upperFirst'](_0x3082fc)+'AccountId']):![];break;case _0x4e3948('0x41'):case _0x4e3948('0x0'):if(_0x10b9cb[_0x4e3948('0x8')]===_0x3082fc)return _0x10b9cb[_0x4e3948('0x3f')]?operators[_0x5eacf0[_0x4e3948('0xd')]](_0x5eacf0[_0x4e3948('0x4')],_0x10b9cb[_0x4e3948('0x3f')]):![];break;case _0x4e3948('0x26'):return _0x10b9cb['queue']?operators[_0x5eacf0[_0x4e3948('0xd')]](_0x5eacf0[_0x4e3948('0x4')],_0x10b9cb[_0x4e3948('0x26')]):![];case _0x4e3948('0x4d'):return _0x10b9cb[_0x4e3948('0x2e')]?operators[_0x5eacf0['operator']](_0x5eacf0[_0x4e3948('0x4')],_0x10b9cb['membername']):![];case _0x4e3948('0x45'):return _0x10b9cb[_0x4e3948('0x45')]?operators[_0x5eacf0['operator']](_0x5eacf0['value'],_0x10b9cb[_0x4e3948('0x45')]):![];case _0x4e3948('0x5f'):return _0x10b9cb[_0x4e3948('0x5f')]?operators[_0x5eacf0[_0x4e3948('0xd')]](_0x5eacf0[_0x4e3948('0x4')],_0x10b9cb['routeId']):![];}return![];};},module[_0x46733a('0x5a')]=Trigger;
\ No newline at end of file