Built motion from commit e1760111.|2.6.18
[motion2.git] / server / api / whatsappMessage / whatsappMessage.controller.js
index 0bac3a3..c4f849e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x349f=['find','body','describe','whatsapp-interactions','accept','readAt','format','UserId','user','agent','CmContact','Contact','get','WhatsappInteraction','WhatsappInteractionId','role','interaction','null','AcceptMessage','manual','interface','SIP/%s','channel','event','EventManager','acceptmessage','whatsapp','[WHATSAPPMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectMessage','rejectmessage','WhatsappAccount','WhatsappAccountId','WhatsppMessage,\x20%s,\x20%s,\x20%s','received\x20delivery\x20report\x20from','MessageSid','messageId','MessageStatus','WhatsappAccount,\x20%s,\x20%s,\x20%s','twilio','inspect','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../mysqldb','redis','defaults','localhost','./whatsappMessage.socket','jayson/promise','client','then','info','WhatsappMessage,\x20%s,\x20%s','request\x20sent','debug','WhatsappMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','sendStatus','status','end','json','set','Content-Range','reject','save','update','destroy','stack','name','send','index','map','WhatsappMessage','fieldName','type','key','model','query','filters','intersection','attributes','hasOwnProperty','limit','offset','order','sort','where','filter','merge','VIRTUAL','count','includeAll','include','catch','show','params','keys','rawAttributes','fields','length','options'];(function(_0x2b32cc,_0x26b879){var _0x210057=function(_0x205fe2){while(--_0x205fe2){_0x2b32cc['push'](_0x2b32cc['shift']());}};_0x210057(++_0x26b879);}(_0x349f,0xa8));var _0xf349=function(_0x295c8b,_0x5b9d11){_0x295c8b=_0x295c8b-0x0;var _0x1e342f=_0x349f[_0x295c8b];return _0x1e342f;};'use strict';var pdf=require(_0xf349('0x0'));var emlformat=require(_0xf349('0x1'));var rimraf=require(_0xf349('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0xf349('0x3'));var rp=require(_0xf349('0x4'));var moment=require(_0xf349('0x5'));var BPromise=require(_0xf349('0x6'));var Mustache=require(_0xf349('0x7'));var util=require(_0xf349('0x8'));var path=require(_0xf349('0x9'));var sox=require(_0xf349('0xa'));var csv=require(_0xf349('0xb'));var ejs=require(_0xf349('0xc'));var fs=require('fs');var _=require('lodash');var squel=require(_0xf349('0xd'));var crypto=require(_0xf349('0xe'));var jsforce=require(_0xf349('0xf'));var deskjs=require(_0xf349('0x10'));var toCsv=require(_0xf349('0xb'));var querystring=require(_0xf349('0x11'));var Papa=require(_0xf349('0x12'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xf349('0x13'));var as=require(_0xf349('0x14'));var hardwareService=require(_0xf349('0x15'));var logger=require(_0xf349('0x16'))(_0xf349('0x17'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xf349('0x18'))['db'];config[_0xf349('0x19')]=_[_0xf349('0x1a')](config[_0xf349('0x19')],{'host':_0xf349('0x1b'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xf349('0x19')]));require(_0xf349('0x1c'))['register'](socket);var jayson=require(_0xf349('0x1d'));var client=jayson[_0xf349('0x1e')]['http']({'port':0x232c});var client9002=jayson[_0xf349('0x1e')]['http']({'port':0x232a});function respondWithRpcPromise(_0x401ada,_0x3bc4e4,_0x26b561,_0x1e2dcd){return new BPromise(function(_0x14c06d,_0x3a591e){var _0x2666be=_0x1e2dcd||client;return _0x2666be['request'](_0x401ada,_0x26b561)[_0xf349('0x1f')](function(_0x5aec49){logger[_0xf349('0x20')](_0xf349('0x21'),_0x3bc4e4,_0xf349('0x22'));logger[_0xf349('0x23')](_0xf349('0x24'),_0x3bc4e4,_0xf349('0x22'),JSON[_0xf349('0x25')](_0x5aec49));if(_0x5aec49[_0xf349('0x26')]){if(_0x5aec49['error'][_0xf349('0x27')]===0x1f4){logger['error'](_0xf349('0x21'),_0x3bc4e4,_0x5aec49[_0xf349('0x26')][_0xf349('0x28')]);return _0x3a591e(_0x5aec49['error'][_0xf349('0x28')]);}logger[_0xf349('0x26')](_0xf349('0x21'),_0x3bc4e4,_0x5aec49['error'][_0xf349('0x28')]);return _0x14c06d(_0x5aec49[_0xf349('0x26')]['message']);}else{logger['info']('WhatsappMessage,\x20%s,\x20%s',_0x3bc4e4,_0xf349('0x22'));_0x14c06d(_0x5aec49[_0xf349('0x29')][_0xf349('0x28')]);}})['catch'](function(_0x3de06b){logger[_0xf349('0x26')](_0xf349('0x21'),_0x3bc4e4,_0x3de06b);_0x3a591e(_0x3de06b);});});}function respondWithStatusCode(_0x428396,_0x142d95){_0x142d95=_0x142d95||0xcc;return function(_0x222e95){if(_0x222e95){return _0x428396[_0xf349('0x2a')](_0x142d95);}return _0x428396[_0xf349('0x2b')](_0x142d95)[_0xf349('0x2c')]();};}function respondWithResult(_0x1346dd,_0x403816){_0x403816=_0x403816||0xc8;return function(_0x345302){if(_0x345302){return _0x1346dd[_0xf349('0x2b')](_0x403816)[_0xf349('0x2d')](_0x345302);}};}function respondWithFilteredResult(_0x53aa55,_0x58e542){return function(_0x554bc4){if(_0x554bc4){var _0x4f2ae2=_0x554bc4['count'],_0x38d1e5=_0x58e542['offset'],_0x4938fa=_0x58e542['offset']+_0x58e542['limit'],_0x1bd380;if(_0x4938fa>=_0x4f2ae2){_0x4938fa=_0x4f2ae2;_0x1bd380=0xc8;}else{_0x1bd380=0xce;}_0x53aa55[_0xf349('0x2b')](_0x1bd380);return _0x53aa55[_0xf349('0x2e')](_0xf349('0x2f'),_0x38d1e5+'-'+_0x4938fa+'/'+_0x4f2ae2)[_0xf349('0x2d')](_0x554bc4);}return null;};}function patchUpdates(_0x32142f){return function(_0x51329b){try{jsonpatch['apply'](_0x51329b,_0x32142f,!![]);}catch(_0x2c0f9c){return BPromise[_0xf349('0x30')](_0x2c0f9c);}return _0x51329b[_0xf349('0x31')]();};}function saveUpdates(_0x3c104a,_0x282545){return function(_0x5b08b7){if(_0x5b08b7){return _0x5b08b7[_0xf349('0x32')](_0x3c104a)[_0xf349('0x1f')](function(_0x4ed804){return _0x4ed804;});}return null;};}function removeEntity(_0x5ce13b,_0x530897){return function(_0x305122){if(_0x305122){return _0x305122[_0xf349('0x33')]()[_0xf349('0x1f')](function(){_0x5ce13b['status'](0xcc)[_0xf349('0x2c')]();});}};}function handleEntityNotFound(_0x21c1ec,_0x31fccc){return function(_0xc11a94){if(!_0xc11a94){_0x21c1ec[_0xf349('0x2a')](0x194);}return _0xc11a94;};}function handleError(_0x5eae93,_0x6dea95){_0x6dea95=_0x6dea95||0x1f4;return function(_0x5a1ac6){logger[_0xf349('0x26')](_0x5a1ac6[_0xf349('0x34')]);if(_0x5a1ac6[_0xf349('0x35')]){delete _0x5a1ac6[_0xf349('0x35')];}_0x5eae93[_0xf349('0x2b')](_0x6dea95)[_0xf349('0x36')](_0x5a1ac6);};}exports[_0xf349('0x37')]=function(_0x57dab6,_0x5192d0){var _0x4d80cb={},_0x3f7bc8={},_0x135c00={'count':0x0,'rows':[]};var _0x5a428d=_[_0xf349('0x38')](db[_0xf349('0x39')]['rawAttributes'],function(_0x1ae8a5){return{'name':_0x1ae8a5[_0xf349('0x3a')],'type':_0x1ae8a5[_0xf349('0x3b')][_0xf349('0x3c')]};});_0x3f7bc8[_0xf349('0x3d')]=_[_0xf349('0x38')](_0x5a428d,'name');_0x3f7bc8[_0xf349('0x3e')]=_['keys'](_0x57dab6['query']);_0x3f7bc8[_0xf349('0x3f')]=_[_0xf349('0x40')](_0x3f7bc8[_0xf349('0x3d')],_0x3f7bc8[_0xf349('0x3e')]);_0x4d80cb['attributes']=_[_0xf349('0x40')](_0x3f7bc8[_0xf349('0x3d')],qs['fields'](_0x57dab6[_0xf349('0x3e')]['fields']));_0x4d80cb['attributes']=_0x4d80cb[_0xf349('0x41')]['length']?_0x4d80cb[_0xf349('0x41')]:_0x3f7bc8['model'];if(!_0x57dab6[_0xf349('0x3e')][_0xf349('0x42')]('nolimit')){_0x4d80cb[_0xf349('0x43')]=qs[_0xf349('0x43')](_0x57dab6[_0xf349('0x3e')]['limit']);_0x4d80cb[_0xf349('0x44')]=qs[_0xf349('0x44')](_0x57dab6[_0xf349('0x3e')]['offset']);}_0x4d80cb[_0xf349('0x45')]=qs[_0xf349('0x46')](_0x57dab6[_0xf349('0x3e')][_0xf349('0x46')]);_0x4d80cb[_0xf349('0x47')]=qs[_0xf349('0x3f')](_['pick'](_0x57dab6[_0xf349('0x3e')],_0x3f7bc8[_0xf349('0x3f')]),_0x5a428d);if(_0x57dab6['query'][_0xf349('0x48')]){_0x4d80cb[_0xf349('0x47')]=_[_0xf349('0x49')](_0x4d80cb[_0xf349('0x47')],{'$or':_[_0xf349('0x38')](_0x5a428d,function(_0x51fed8){if(_0x51fed8[_0xf349('0x3b')]!==_0xf349('0x4a')){var _0x1cb03a={};_0x1cb03a[_0x51fed8[_0xf349('0x35')]]={'$like':'%'+_0x57dab6[_0xf349('0x3e')][_0xf349('0x48')]+'%'};return _0x1cb03a;}})});}_0x4d80cb=_['merge']({},_0x4d80cb,_0x57dab6['options']);var _0x5233c7={'where':_0x4d80cb[_0xf349('0x47')]};return db[_0xf349('0x39')][_0xf349('0x4b')](_0x5233c7)[_0xf349('0x1f')](function(_0x18e3fe){_0x135c00[_0xf349('0x4b')]=_0x18e3fe;if(_0x57dab6[_0xf349('0x3e')][_0xf349('0x4c')]){_0x4d80cb[_0xf349('0x4d')]=[{'all':!![]}];}return db[_0xf349('0x39')]['findAll'](_0x4d80cb);})['then'](function(_0x352e4f){_0x135c00['rows']=_0x352e4f;return _0x135c00;})[_0xf349('0x1f')](respondWithFilteredResult(_0x5192d0,_0x4d80cb))[_0xf349('0x4e')](handleError(_0x5192d0,null));};exports[_0xf349('0x4f')]=function(_0x465ca7,_0x4ff327){var _0x34f17c={'raw':!![],'where':{'id':_0x465ca7[_0xf349('0x50')]['id']}},_0x7a8b1={};_0x7a8b1[_0xf349('0x3d')]=_[_0xf349('0x51')](db[_0xf349('0x39')][_0xf349('0x52')]);_0x7a8b1[_0xf349('0x3e')]=_['keys'](_0x465ca7[_0xf349('0x3e')]);_0x7a8b1[_0xf349('0x3f')]=_[_0xf349('0x40')](_0x7a8b1[_0xf349('0x3d')],_0x7a8b1[_0xf349('0x3e')]);_0x34f17c['attributes']=_[_0xf349('0x40')](_0x7a8b1[_0xf349('0x3d')],qs[_0xf349('0x53')](_0x465ca7[_0xf349('0x3e')][_0xf349('0x53')]));_0x34f17c[_0xf349('0x41')]=_0x34f17c[_0xf349('0x41')][_0xf349('0x54')]?_0x34f17c['attributes']:_0x7a8b1['model'];if(_0x465ca7[_0xf349('0x3e')]['includeAll']){_0x34f17c[_0xf349('0x4d')]=[{'all':!![]}];}_0x34f17c=_[_0xf349('0x49')]({},_0x34f17c,_0x465ca7[_0xf349('0x55')]);return db[_0xf349('0x39')][_0xf349('0x56')](_0x34f17c)[_0xf349('0x1f')](handleEntityNotFound(_0x4ff327,null))[_0xf349('0x1f')](respondWithResult(_0x4ff327,null))['catch'](handleError(_0x4ff327,null));};exports['create']=function(_0x48c6be,_0x169b3e){return db[_0xf349('0x39')]['create'](_0x48c6be['body'],{})[_0xf349('0x1f')](respondWithResult(_0x169b3e,0xc9))[_0xf349('0x4e')](handleError(_0x169b3e,null));};exports['update']=function(_0x32a371,_0x46cc4e){if(_0x32a371[_0xf349('0x57')]['id']){delete _0x32a371[_0xf349('0x57')]['id'];}return db[_0xf349('0x39')][_0xf349('0x56')]({'where':{'id':_0x32a371[_0xf349('0x50')]['id']}})[_0xf349('0x1f')](handleEntityNotFound(_0x46cc4e,null))[_0xf349('0x1f')](saveUpdates(_0x32a371['body'],null))['then'](respondWithResult(_0x46cc4e,null))[_0xf349('0x4e')](handleError(_0x46cc4e,null));};exports['destroy']=function(_0x4979c7,_0x1264c4){return db[_0xf349('0x39')][_0xf349('0x56')]({'where':{'id':_0x4979c7[_0xf349('0x50')]['id']}})['then'](handleEntityNotFound(_0x1264c4,null))['then'](removeEntity(_0x1264c4,null))[_0xf349('0x4e')](handleError(_0x1264c4,null));};exports[_0xf349('0x58')]=function(_0x38b8d8,_0x4a2e7e){return db[_0xf349('0x39')][_0xf349('0x58')]()[_0xf349('0x1f')](respondWithResult(_0x4a2e7e,null))[_0xf349('0x4e')](handleError(_0x4a2e7e,null));};var interaction_log=require(_0xf349('0x16'))(_0xf349('0x59'));exports[_0xf349('0x5a')]=function(_0x125d26,_0x3a1ed0,_0x27c999){var _0x2f1e51={'agent':{},'channel':'whatsapp'};if(_0x125d26['body']['id']){delete _0x125d26[_0xf349('0x57')]['id'];}_0x125d26[_0xf349('0x57')]['read']=!![];_0x125d26[_0xf349('0x57')][_0xf349('0x5b')]=moment()[_0xf349('0x5c')]('YYYY-MM-DD\x20HH:mm:ss');_0x125d26['body'][_0xf349('0x5d')]=_0x125d26[_0xf349('0x57')][_0xf349('0x5d')]||_0x125d26[_0xf349('0x5e')]['id'];_0x2f1e51[_0xf349('0x5f')]['id']=_0x125d26[_0xf349('0x57')][_0xf349('0x5d')];return db[_0xf349('0x39')][_0xf349('0x56')]({'where':{'id':_0x125d26[_0xf349('0x50')]['id'],'UserId':null},'include':[{'model':db[_0xf349('0x60')],'as':_0xf349('0x61')}]})[_0xf349('0x1f')](handleEntityNotFound(_0x3a1ed0,null))[_0xf349('0x1f')](saveUpdates(_0x125d26['body'],null))[_0xf349('0x1f')](function(_0x2e09a9){if(_0x2e09a9){_0x2f1e51[_0xf349('0x28')]=_0x2e09a9[_0xf349('0x62')]({'plain':!![]});return db[_0xf349('0x63')][_0xf349('0x56')]({'where':{'id':_0x2e09a9[_0xf349('0x64')]}});}return null;})[_0xf349('0x1f')](handleEntityNotFound(_0x3a1ed0,null))[_0xf349('0x1f')](function(_0x4c5b7b){if(_0x4c5b7b){return _0x4c5b7b[_0xf349('0x32')]({'UserId':_0x125d26[_0xf349('0x57')][_0xf349('0x5d')],'read1stAt':_['isNil'](_0x4c5b7b['read1stAt'])?moment()['format']('YYYY-MM-DD\x20HH:mm:ss'):undefined});}return null;})[_0xf349('0x1f')](function(_0x2e6e9a){if(_0x2e6e9a){_0x2f1e51['interaction']=_0x2e6e9a[_0xf349('0x62')]({'plain':!![]});interaction_log[_0xf349('0x20')]('[WHATSAPPMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x125d26[_0xf349('0x5e')]['id'],_0x125d26[_0xf349('0x5e')][_0xf349('0x35')],_0x125d26[_0xf349('0x5e')][_0xf349('0x65')],_0x2f1e51[_0xf349('0x66')]['id'],_0x125d26[_0xf349('0x57')]?JSON[_0xf349('0x25')](_0x125d26[_0xf349('0x57')]):_0xf349('0x67'));return respondWithRpcPromise(_0xf349('0x68'),'acceptMessage',_0x2f1e51);}return null;})[_0xf349('0x1f')](function(_0x4247c5){if(_0x4247c5){if(_0x125d26['body'][_0xf349('0x69')]){_0x2f1e51[_0xf349('0x28')][_0xf349('0x6a')]=util[_0xf349('0x5c')](_0xf349('0x6b'),_0x125d26[_0xf349('0x5e')][_0xf349('0x35')]);_0x2f1e51[_0xf349('0x28')]['channel']=_0x2f1e51[_0xf349('0x6c')];_0x2f1e51[_0xf349('0x28')][_0xf349('0x6d')]=_0xf349('0x5a');return respondWithRpcPromise(_0xf349('0x6e'),_0xf349('0x6e'),{'event':_0xf349('0x6f'),'message':_0x2f1e51[_0xf349('0x28')]},client9002)['then'](function(){return _0x2f1e51;});}return _0x2f1e51;}return null;})[_0xf349('0x1f')](respondWithResult(_0x3a1ed0,null))['catch'](handleError(_0x3a1ed0,null));};var interaction_log=require(_0xf349('0x16'))(_0xf349('0x59'));exports[_0xf349('0x30')]=function(_0x1187b0,_0x31ae70,_0x4f1493){var _0x4c06fc={'agent':{},'channel':_0xf349('0x70')};if(_0x1187b0[_0xf349('0x57')]['id']){delete _0x1187b0['body']['id'];}_0x1187b0[_0xf349('0x57')]['UserId']=_0x1187b0['body'][_0xf349('0x5d')]||_0x1187b0['user']['id'];_0x4c06fc[_0xf349('0x5f')]['id']=_0x1187b0[_0xf349('0x57')][_0xf349('0x5d')];return db[_0xf349('0x39')]['find']({'where':{'id':_0x1187b0[_0xf349('0x50')]['id'],'UserId':null}})[_0xf349('0x1f')](handleEntityNotFound(_0x31ae70,null))[_0xf349('0x1f')](function(_0x1d062b){if(_0x1d062b){_0x4c06fc[_0xf349('0x28')]=_0x1d062b[_0xf349('0x62')]({'plain':!![]});return db[_0xf349('0x63')]['find']({'where':{'id':_0x1d062b['WhatsappInteractionId']}});}return null;})[_0xf349('0x1f')](handleEntityNotFound(_0x31ae70,null))['then'](function(_0x3b2d2b){if(_0x3b2d2b){_0x4c06fc['interaction']=_0x3b2d2b['get']({'plain':!![]});interaction_log['info'](_0xf349('0x71'),_0x1187b0[_0xf349('0x5e')]['id'],_0x1187b0['user'][_0xf349('0x35')],_0x1187b0[_0xf349('0x5e')]['role'],_0x4c06fc['interaction']['id'],_0x1187b0[_0xf349('0x57')]?JSON[_0xf349('0x25')](_0x1187b0[_0xf349('0x57')]):_0xf349('0x67'));return respondWithRpcPromise(_0xf349('0x72'),_0xf349('0x73'),_0x4c06fc);}return null;})[_0xf349('0x1f')](function(_0x4e8875){if(_0x4e8875){_0x4e8875[_0xf349('0x28')]['interface']=util[_0xf349('0x5c')](_0xf349('0x6b'),_0x1187b0['user'][_0xf349('0x35')]);_0x4e8875[_0xf349('0x28')][_0xf349('0x6c')]=_0x4c06fc[_0xf349('0x6c')];_0x4e8875[_0xf349('0x28')]['event']='reject';respondWithRpcPromise('EventManager',_0xf349('0x6e'),{'event':_0xf349('0x74'),'message':_0x4e8875[_0xf349('0x28')]},client9002);return _0x4c06fc;}return null;})[_0xf349('0x1f')](respondWithResult(_0x31ae70,null))['catch'](handleError(_0x31ae70,null));};exports[_0xf349('0x2b')]=function(_0x2bb713,_0x1e1afc,_0x2f2328){if(_0x2bb713[_0xf349('0x57')]['id']){delete _0x2bb713['body']['id'];}var _0x4db0c9;return db[_0xf349('0x39')][_0xf349('0x56')]({'where':{'id':_0x2bb713['params']['id']}})['then'](handleEntityNotFound(_0x1e1afc,null))['then'](function(_0x1449c8){if(_0x1449c8){_0x4db0c9=_0x1449c8;return db[_0xf349('0x75')][_0xf349('0x56')]({'where':{'id':_0x1449c8[_0xf349('0x76')]}});}})['then'](handleEntityNotFound(_0x1e1afc,null))[_0xf349('0x1f')](function(_0x420be1){if(_0x420be1){logger[_0xf349('0x23')](_0xf349('0x77'),_0xf349('0x2b'),_0xf349('0x78'),_0x420be1[_0xf349('0x3b')],util['inspect'](_0x2bb713[_0xf349('0x57')],{'showHidden':![],'depth':null}));switch(_0x420be1[_0xf349('0x3b')]){case'twilio':if(_0x2bb713['body'][_0xf349('0x79')]&&_0x2bb713['body']['MessageSid']===_0x4db0c9[_0xf349('0x7a')]&&_0x2bb713['body'][_0xf349('0x7b')]&&_0x2bb713[_0xf349('0x57')][_0xf349('0x7b')]==='read'){return _0x4db0c9[_0xf349('0x32')]({'read':!![]});}else{logger[_0xf349('0x26')](_0xf349('0x7c'),_0xf349('0x2b'),_0xf349('0x7d'),util[_0xf349('0x7e')](_0x2bb713[_0xf349('0x57')],{'showHidden':![],'depth':null}));}break;}return _0x4db0c9;}})[_0xf349('0x1f')](respondWithResult(_0x1e1afc,null))['catch'](handleError(_0x1e1afc,null));};
\ No newline at end of file
+var _0xa12b=['desk.js','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','redis','defaults','localhost','jayson/promise','client','http','request','then','info','WhatsappMessage,\x20%s,\x20%s','request\x20sent','debug','WhatsappMessage,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','sendStatus','status','end','offset','undefined','limit','set','Content-Range','apply','save','stack','name','send','index','map','WhatsappMessage','rawAttributes','fieldName','type','key','keys','query','filters','model','intersection','fields','attributes','length','hasOwnProperty','order','sort','where','pick','filter','merge','options','count','includeAll','include','findAll','rows','show','params','find','create','body','destroy','describe','whatsapp-interactions','accept','whatsapp','read','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','agent','get','update','[WHATSAPPMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','user','role','interaction','acceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','QueryTypes','SELECT','contact','User','email','internal','interface','SIP/%s','channel','motionChannel','event','EventManager','acceptmessage','reject','[WHATSAPPMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','null','RejectMessage','rejectMessage','sequelize','Sequelize','fullname','rejectmessage','WhatsappAccount','WhatsappAccountId','WhatsppMessage,\x20%s,\x20%s,\x20%s','received\x20delivery\x20report\x20from','inspect','twilio','MessageSid','messageId','MessageStatus','WhatsappAccount,\x20%s,\x20%s,\x20%s','eml-format','rimraf','zip-dir','fast-json-patch','moment','util','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce'];(function(_0x3017bf,_0x186bf5){var _0xfa01b4=function(_0x19d761){while(--_0x19d761){_0x3017bf['push'](_0x3017bf['shift']());}};_0xfa01b4(++_0x186bf5);}(_0xa12b,0x193));var _0xba12=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa12b[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0xba12('0x0'));var rimraf=require(_0xba12('0x1'));var zipdir=require(_0xba12('0x2'));var jsonpatch=require(_0xba12('0x3'));var rp=require('request-promise');var moment=require(_0xba12('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xba12('0x5'));var path=require(_0xba12('0x6'));var sox=require(_0xba12('0x7'));var csv=require(_0xba12('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xba12('0x9'));var _=require(_0xba12('0xa'));var squel=require(_0xba12('0xb'));var crypto=require(_0xba12('0xc'));var jsforce=require(_0xba12('0xd'));var deskjs=require(_0xba12('0xe'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xba12('0xf'));var authService=require(_0xba12('0x10'));var qs=require(_0xba12('0x11'));var as=require(_0xba12('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xba12('0x13'))(_0xba12('0x14'));var utils=require(_0xba12('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0xba12('0x16'));var db=require(_0xba12('0x17'))['db'];config[_0xba12('0x18')]=_[_0xba12('0x19')](config['redis'],{'host':_0xba12('0x1a'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./whatsappMessage.socket')['register'](socket);var jayson=require(_0xba12('0x1b'));var client=jayson[_0xba12('0x1c')][_0xba12('0x1d')]({'port':0x232c});var client9002=jayson['client'][_0xba12('0x1d')]({'port':0x232a});function respondWithRpcPromise(_0xc2a84b,_0x5dc294,_0x4f06fe,_0x1657ce){return new BPromise(function(_0x1f8aeb,_0x96384a){var _0x5be651=_0x1657ce||client;return _0x5be651[_0xba12('0x1e')](_0xc2a84b,_0x4f06fe)[_0xba12('0x1f')](function(_0xc15a97){logger[_0xba12('0x20')](_0xba12('0x21'),_0x5dc294,_0xba12('0x22'));logger[_0xba12('0x23')](_0xba12('0x24'),_0x5dc294,_0xba12('0x22'),JSON[_0xba12('0x25')](_0xc15a97));if(_0xc15a97['error']){if(_0xc15a97[_0xba12('0x26')]['code']===0x1f4){logger[_0xba12('0x26')](_0xba12('0x21'),_0x5dc294,_0xc15a97[_0xba12('0x26')][_0xba12('0x27')]);return _0x96384a(_0xc15a97['error']['message']);}logger[_0xba12('0x26')]('WhatsappMessage,\x20%s,\x20%s',_0x5dc294,_0xc15a97[_0xba12('0x26')][_0xba12('0x27')]);return _0x1f8aeb(_0xc15a97[_0xba12('0x26')][_0xba12('0x27')]);}else{logger['info'](_0xba12('0x21'),_0x5dc294,'request\x20sent');_0x1f8aeb(_0xc15a97['result'][_0xba12('0x27')]);}})[_0xba12('0x28')](function(_0xa156cb){logger[_0xba12('0x26')](_0xba12('0x21'),_0x5dc294,_0xa156cb);_0x96384a(_0xa156cb);});});}function respondWithStatusCode(_0x2e0905,_0x3d4c7d){_0x3d4c7d=_0x3d4c7d||0xcc;return function(_0x39a15a){if(_0x39a15a){return _0x2e0905[_0xba12('0x29')](_0x3d4c7d);}return _0x2e0905[_0xba12('0x2a')](_0x3d4c7d)[_0xba12('0x2b')]();};}function respondWithResult(_0x17f1aa,_0x220353){_0x220353=_0x220353||0xc8;return function(_0x3b21e3){if(_0x3b21e3){return _0x17f1aa[_0xba12('0x2a')](_0x220353)['json'](_0x3b21e3);}};}function respondWithFilteredResult(_0x3bd98c,_0x291656){return function(_0x16d8f8){if(_0x16d8f8){var _0x514d35=typeof _0x291656[_0xba12('0x2c')]===_0xba12('0x2d')&&typeof _0x291656['limit']===_0xba12('0x2d');var _0x2387b0=_0x16d8f8['count'];var _0x10c42c=_0x514d35?0x0:_0x291656[_0xba12('0x2c')];var _0x1e97c0=_0x514d35?_0x16d8f8['count']:_0x291656[_0xba12('0x2c')]+_0x291656[_0xba12('0x2e')];var _0x9ebc46;if(_0x1e97c0>=_0x2387b0){_0x1e97c0=_0x2387b0;_0x9ebc46=0xc8;}else{_0x9ebc46=0xce;}_0x3bd98c[_0xba12('0x2a')](_0x9ebc46);return _0x3bd98c[_0xba12('0x2f')](_0xba12('0x30'),_0x10c42c+'-'+_0x1e97c0+'/'+_0x2387b0)['json'](_0x16d8f8);}return null;};}function patchUpdates(_0x527e8f){return function(_0x16a8ca){try{jsonpatch[_0xba12('0x31')](_0x16a8ca,_0x527e8f,!![]);}catch(_0x4583e8){return BPromise['reject'](_0x4583e8);}return _0x16a8ca[_0xba12('0x32')]();};}function saveUpdates(_0xc929c,_0x1b1d50){return function(_0x52bf3a){if(_0x52bf3a){return _0x52bf3a['update'](_0xc929c)[_0xba12('0x1f')](function(_0x4b301f){return _0x4b301f;});}return null;};}function removeEntity(_0x420d43,_0xec6589){return function(_0x213eb9){if(_0x213eb9){return _0x213eb9['destroy']()[_0xba12('0x1f')](function(){_0x420d43[_0xba12('0x2a')](0xcc)[_0xba12('0x2b')]();});}};}function handleEntityNotFound(_0xe5861c,_0x46849e){return function(_0xac9918){if(!_0xac9918){_0xe5861c[_0xba12('0x29')](0x194);}return _0xac9918;};}function handleError(_0xd0b545,_0x1c4f08){_0x1c4f08=_0x1c4f08||0x1f4;return function(_0x2f140e){logger[_0xba12('0x26')](_0x2f140e[_0xba12('0x33')]);if(_0x2f140e[_0xba12('0x34')]){delete _0x2f140e['name'];}_0xd0b545[_0xba12('0x2a')](_0x1c4f08)[_0xba12('0x35')](_0x2f140e);};}exports[_0xba12('0x36')]=function(_0x3cd9eb,_0x5271e3){var _0x251724={},_0x3eaaa6={},_0x20d906={'count':0x0,'rows':[]};var _0x2d7bd5=_[_0xba12('0x37')](db[_0xba12('0x38')][_0xba12('0x39')],function(_0x665cb2){return{'name':_0x665cb2[_0xba12('0x3a')],'type':_0x665cb2[_0xba12('0x3b')][_0xba12('0x3c')]};});_0x3eaaa6['model']=_[_0xba12('0x37')](_0x2d7bd5,'name');_0x3eaaa6['query']=_[_0xba12('0x3d')](_0x3cd9eb[_0xba12('0x3e')]);_0x3eaaa6[_0xba12('0x3f')]=_['intersection'](_0x3eaaa6[_0xba12('0x40')],_0x3eaaa6[_0xba12('0x3e')]);_0x251724['attributes']=_[_0xba12('0x41')](_0x3eaaa6[_0xba12('0x40')],qs[_0xba12('0x42')](_0x3cd9eb[_0xba12('0x3e')][_0xba12('0x42')]));_0x251724['attributes']=_0x251724[_0xba12('0x43')][_0xba12('0x44')]?_0x251724[_0xba12('0x43')]:_0x3eaaa6[_0xba12('0x40')];if(!_0x3cd9eb[_0xba12('0x3e')][_0xba12('0x45')]('nolimit')){_0x251724[_0xba12('0x2e')]=qs[_0xba12('0x2e')](_0x3cd9eb[_0xba12('0x3e')]['limit']);_0x251724[_0xba12('0x2c')]=qs['offset'](_0x3cd9eb['query'][_0xba12('0x2c')]);}_0x251724[_0xba12('0x46')]=qs[_0xba12('0x47')](_0x3cd9eb['query']['sort']);_0x251724[_0xba12('0x48')]=qs['filters'](_[_0xba12('0x49')](_0x3cd9eb[_0xba12('0x3e')],_0x3eaaa6[_0xba12('0x3f')]),_0x2d7bd5);if(_0x3cd9eb[_0xba12('0x3e')][_0xba12('0x4a')]){_0x251724[_0xba12('0x48')]=_[_0xba12('0x4b')](_0x251724['where'],{'$or':_['map'](_0x2d7bd5,function(_0x17b00e){if(_0x17b00e[_0xba12('0x3b')]!=='VIRTUAL'){var _0x371778={};_0x371778[_0x17b00e[_0xba12('0x34')]]={'$like':'%'+_0x3cd9eb['query']['filter']+'%'};return _0x371778;}})});}_0x251724=_[_0xba12('0x4b')]({},_0x251724,_0x3cd9eb[_0xba12('0x4c')]);var _0x39900c={'where':_0x251724[_0xba12('0x48')]};return db[_0xba12('0x38')][_0xba12('0x4d')](_0x39900c)[_0xba12('0x1f')](function(_0x554a29){_0x20d906[_0xba12('0x4d')]=_0x554a29;if(_0x3cd9eb[_0xba12('0x3e')][_0xba12('0x4e')]){_0x251724[_0xba12('0x4f')]=[{'all':!![]}];}return db['WhatsappMessage'][_0xba12('0x50')](_0x251724);})[_0xba12('0x1f')](function(_0x4212c9){_0x20d906[_0xba12('0x51')]=_0x4212c9;return _0x20d906;})['then'](respondWithFilteredResult(_0x5271e3,_0x251724))[_0xba12('0x28')](handleError(_0x5271e3,null));};exports[_0xba12('0x52')]=function(_0x36215a,_0x11fcd5){var _0x3cfc34={'raw':!![],'where':{'id':_0x36215a[_0xba12('0x53')]['id']}},_0x3a179d={};_0x3a179d[_0xba12('0x40')]=_['keys'](db['WhatsappMessage'][_0xba12('0x39')]);_0x3a179d[_0xba12('0x3e')]=_[_0xba12('0x3d')](_0x36215a[_0xba12('0x3e')]);_0x3a179d[_0xba12('0x3f')]=_[_0xba12('0x41')](_0x3a179d['model'],_0x3a179d[_0xba12('0x3e')]);_0x3cfc34[_0xba12('0x43')]=_[_0xba12('0x41')](_0x3a179d[_0xba12('0x40')],qs['fields'](_0x36215a[_0xba12('0x3e')][_0xba12('0x42')]));_0x3cfc34[_0xba12('0x43')]=_0x3cfc34[_0xba12('0x43')]['length']?_0x3cfc34['attributes']:_0x3a179d[_0xba12('0x40')];if(_0x36215a[_0xba12('0x3e')][_0xba12('0x4e')]){_0x3cfc34[_0xba12('0x4f')]=[{'all':!![]}];}_0x3cfc34=_[_0xba12('0x4b')]({},_0x3cfc34,_0x36215a[_0xba12('0x4c')]);return db[_0xba12('0x38')][_0xba12('0x54')](_0x3cfc34)['then'](handleEntityNotFound(_0x11fcd5,null))['then'](respondWithResult(_0x11fcd5,null))[_0xba12('0x28')](handleError(_0x11fcd5,null));};exports[_0xba12('0x55')]=function(_0x4403c9,_0x5df295){return db[_0xba12('0x38')]['create'](_0x4403c9[_0xba12('0x56')],{})[_0xba12('0x1f')](respondWithResult(_0x5df295,0xc9))[_0xba12('0x28')](handleError(_0x5df295,null));};exports['update']=function(_0x349439,_0x505b83){if(_0x349439['body']['id']){delete _0x349439['body']['id'];}return db[_0xba12('0x38')][_0xba12('0x54')]({'where':{'id':_0x349439[_0xba12('0x53')]['id']}})[_0xba12('0x1f')](handleEntityNotFound(_0x505b83,null))[_0xba12('0x1f')](saveUpdates(_0x349439['body'],null))[_0xba12('0x1f')](respondWithResult(_0x505b83,null))[_0xba12('0x28')](handleError(_0x505b83,null));};exports[_0xba12('0x57')]=function(_0x97510a,_0x5d92e1){return db[_0xba12('0x38')]['find']({'where':{'id':_0x97510a[_0xba12('0x53')]['id']}})[_0xba12('0x1f')](handleEntityNotFound(_0x5d92e1,null))[_0xba12('0x1f')](removeEntity(_0x5d92e1,null))[_0xba12('0x28')](handleError(_0x5d92e1,null));};exports[_0xba12('0x58')]=function(_0xc54f3d,_0x13d025){return db[_0xba12('0x38')][_0xba12('0x58')]()['then'](respondWithResult(_0x13d025,null))[_0xba12('0x28')](handleError(_0x13d025,null));};var interaction_log=require(_0xba12('0x13'))(_0xba12('0x59'));exports[_0xba12('0x5a')]=function(_0x4074d9,_0x586144,_0x35f920){var _0x326a4a={'agent':{},'channel':_0xba12('0x5b')};if(_0x4074d9['body']['id']){delete _0x4074d9['body']['id'];}_0x4074d9[_0xba12('0x56')][_0xba12('0x5c')]=!![];_0x4074d9[_0xba12('0x56')][_0xba12('0x5d')]=moment()[_0xba12('0x5e')](_0xba12('0x5f'));_0x4074d9['body'][_0xba12('0x60')]=_0x4074d9[_0xba12('0x56')]['UserId']||_0x4074d9['user']['id'];_0x326a4a[_0xba12('0x61')]['id']=_0x4074d9[_0xba12('0x56')][_0xba12('0x60')];return db['WhatsappMessage'][_0xba12('0x54')]({'where':{'id':_0x4074d9[_0xba12('0x53')]['id'],'UserId':null}})[_0xba12('0x1f')](handleEntityNotFound(_0x586144,null))['then'](saveUpdates(_0x4074d9[_0xba12('0x56')],null))['then'](function(_0x34f9ba){if(_0x34f9ba){_0x326a4a[_0xba12('0x27')]=_0x34f9ba[_0xba12('0x62')]({'plain':!![]});return db['WhatsappInteraction'][_0xba12('0x54')]({'where':{'id':_0x34f9ba['WhatsappInteractionId']}});}return null;})[_0xba12('0x1f')](handleEntityNotFound(_0x586144,null))['then'](function(_0x2790d3){if(_0x2790d3){return _0x2790d3[_0xba12('0x63')]({'UserId':_0x4074d9[_0xba12('0x56')][_0xba12('0x60')],'read1stAt':_['isNil'](_0x2790d3['read1stAt'])?moment()[_0xba12('0x5e')](_0xba12('0x5f')):undefined});}return null;})[_0xba12('0x1f')](function(_0x4a07d3){if(_0x4a07d3){_0x326a4a['interaction']=_0x4a07d3[_0xba12('0x62')]({'plain':!![]});interaction_log[_0xba12('0x20')](_0xba12('0x64'),_0x4074d9[_0xba12('0x65')]['id'],_0x4074d9[_0xba12('0x65')][_0xba12('0x34')],_0x4074d9['user'][_0xba12('0x66')],_0x326a4a[_0xba12('0x67')]['id'],_0x4074d9[_0xba12('0x56')]?JSON['stringify'](_0x4074d9[_0xba12('0x56')]):'null');return respondWithRpcPromise('AcceptMessage',_0xba12('0x68'),_0x326a4a);}return null;})['then'](function(_0x5ecf61){var _0x1f3d39=_0xba12('0x69')+_0x5ecf61[_0xba12('0x27')][_0xba12('0x6a')];return db['sequelize']['query'](_0x1f3d39,{'type':db['Sequelize'][_0xba12('0x6b')][_0xba12('0x6c')],'raw':!![]})[_0xba12('0x1f')](function(_0x13ce08){return _0x13ce08;});})[_0xba12('0x1f')](function(_0x187290){if(_0x187290){_0x326a4a[_0xba12('0x27')][_0xba12('0x6d')]=_0x187290[0x0];if(!_0x4074d9['body'][_0xba12('0x60')])return;return db[_0xba12('0x6e')][_0xba12('0x54')]({'where':{'id':_0x4074d9[_0xba12('0x56')][_0xba12('0x60')],'role':'agent'},'attributes':['id',_0xba12('0x34'),'fullname',_0xba12('0x6f'),_0xba12('0x70')],'raw':!![]});}return null;})[_0xba12('0x1f')](function(_0xc2e98b){if(!_0xc2e98b)return null;_0x326a4a[_0xba12('0x27')][_0xba12('0x61')]=_0xc2e98b;return _0x326a4a;})['then'](function(_0x3a47ef){if(_0x3a47ef){if(_0x4074d9[_0xba12('0x56')]['manual']){_0x326a4a[_0xba12('0x27')][_0xba12('0x71')]=util[_0xba12('0x5e')](_0xba12('0x72'),_0x4074d9[_0xba12('0x65')][_0xba12('0x34')]);_0x326a4a[_0xba12('0x27')][_0xba12('0x73')]=_0x326a4a[_0xba12('0x73')];_0x326a4a['message'][_0xba12('0x74')]=_0x326a4a[_0xba12('0x73')];_0x326a4a['message'][_0xba12('0x75')]=_0xba12('0x5a');return respondWithRpcPromise(_0xba12('0x76'),_0xba12('0x76'),{'event':_0xba12('0x77'),'message':_0x326a4a['message']},client9002)[_0xba12('0x1f')](function(){return _0x326a4a;});}return _0x326a4a;}return null;})['then'](respondWithResult(_0x586144,null))[_0xba12('0x28')](handleError(_0x586144,null));};var interaction_log=require(_0xba12('0x13'))(_0xba12('0x59'));exports[_0xba12('0x78')]=function(_0x2ec37a,_0x547292,_0x40848f){var _0x4009ae={'agent':{},'channel':_0xba12('0x5b')};if(_0x2ec37a['body']['id']){delete _0x2ec37a[_0xba12('0x56')]['id'];}_0x2ec37a[_0xba12('0x56')][_0xba12('0x60')]=_0x2ec37a[_0xba12('0x56')][_0xba12('0x60')]||_0x2ec37a['user']['id'];_0x4009ae[_0xba12('0x61')]['id']=_0x2ec37a[_0xba12('0x56')]['UserId'];return db[_0xba12('0x38')][_0xba12('0x54')]({'where':{'id':_0x2ec37a[_0xba12('0x53')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x547292,null))[_0xba12('0x1f')](function(_0xe9d80f){if(_0xe9d80f){_0x4009ae['message']=_0xe9d80f[_0xba12('0x62')]({'plain':!![]});return db['WhatsappInteraction'][_0xba12('0x54')]({'where':{'id':_0xe9d80f['WhatsappInteractionId']}});}return null;})[_0xba12('0x1f')](handleEntityNotFound(_0x547292,null))['then'](function(_0x2b190d){if(_0x2b190d){_0x4009ae[_0xba12('0x67')]=_0x2b190d[_0xba12('0x62')]({'plain':!![]});interaction_log['info'](_0xba12('0x79'),_0x2ec37a[_0xba12('0x65')]['id'],_0x2ec37a[_0xba12('0x65')][_0xba12('0x34')],_0x2ec37a['user'][_0xba12('0x66')],_0x4009ae[_0xba12('0x67')]['id'],_0x2ec37a[_0xba12('0x56')]?JSON['stringify'](_0x2ec37a[_0xba12('0x56')]):_0xba12('0x7a'));return respondWithRpcPromise(_0xba12('0x7b'),_0xba12('0x7c'),_0x4009ae);}return null;})['then'](function(_0x23b445){var _0x2fa539='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0x23b445[_0xba12('0x27')][_0xba12('0x6a')];return db[_0xba12('0x7d')][_0xba12('0x3e')](_0x2fa539,{'type':db[_0xba12('0x7e')]['QueryTypes']['SELECT'],'raw':!![]})[_0xba12('0x1f')](function(_0x3af682){return _0x3af682;});})[_0xba12('0x1f')](function(_0x321724){if(_0x321724){_0x4009ae['message']['contact']=_0x321724[0x0];if(!_0x2ec37a[_0xba12('0x56')][_0xba12('0x60')])return;return db['User']['find']({'where':{'id':_0x2ec37a['body'][_0xba12('0x60')],'role':_0xba12('0x61')},'attributes':['id',_0xba12('0x34'),_0xba12('0x7f'),_0xba12('0x6f'),_0xba12('0x70')],'raw':!![]});}return null;})[_0xba12('0x1f')](function(_0x535c9a){if(!_0x535c9a)return null;_0x4009ae[_0xba12('0x27')][_0xba12('0x61')]=_0x535c9a;return _0x4009ae;})[_0xba12('0x1f')](function(_0x2cc4bf){if(_0x2cc4bf){_0x2cc4bf[_0xba12('0x27')]['interface']=util[_0xba12('0x5e')](_0xba12('0x72'),_0x2ec37a[_0xba12('0x65')][_0xba12('0x34')]);_0x2cc4bf['message']['channel']=_0x4009ae['channel'];_0x2cc4bf[_0xba12('0x27')][_0xba12('0x74')]=_0x4009ae[_0xba12('0x73')];_0x2cc4bf[_0xba12('0x27')][_0xba12('0x75')]='reject';respondWithRpcPromise('EventManager',_0xba12('0x76'),{'event':_0xba12('0x80'),'message':_0x2cc4bf['message']},client9002);return _0x4009ae;}return null;})[_0xba12('0x1f')](respondWithResult(_0x547292,null))[_0xba12('0x28')](handleError(_0x547292,null));};exports[_0xba12('0x2a')]=function(_0x1b6a26,_0xac7e4c,_0x46f100){if(_0x1b6a26['body']['id']){delete _0x1b6a26['body']['id'];}var _0x5f369b;return db[_0xba12('0x38')][_0xba12('0x54')]({'where':{'id':_0x1b6a26['params']['id']}})['then'](handleEntityNotFound(_0xac7e4c,null))['then'](function(_0x23a547){if(_0x23a547){_0x5f369b=_0x23a547;return db[_0xba12('0x81')]['find']({'where':{'id':_0x23a547[_0xba12('0x82')]}});}})[_0xba12('0x1f')](handleEntityNotFound(_0xac7e4c,null))[_0xba12('0x1f')](function(_0x4f8d52){if(_0x4f8d52){logger[_0xba12('0x23')](_0xba12('0x83'),_0xba12('0x2a'),_0xba12('0x84'),_0x4f8d52[_0xba12('0x3b')],util[_0xba12('0x85')](_0x1b6a26[_0xba12('0x56')],{'showHidden':![],'depth':null}));switch(_0x4f8d52[_0xba12('0x3b')]){case _0xba12('0x86'):if(_0x1b6a26[_0xba12('0x56')][_0xba12('0x87')]&&_0x1b6a26[_0xba12('0x56')][_0xba12('0x87')]===_0x5f369b[_0xba12('0x88')]&&_0x1b6a26[_0xba12('0x56')][_0xba12('0x89')]&&_0x1b6a26[_0xba12('0x56')][_0xba12('0x89')]===_0xba12('0x5c')){return _0x5f369b[_0xba12('0x63')]({'read':!![]});}else{logger[_0xba12('0x26')](_0xba12('0x8a'),_0xba12('0x2a'),_0xba12('0x86'),util[_0xba12('0x85')](_0x1b6a26[_0xba12('0x56')],{'showHidden':![],'depth':null}));}break;}return _0x5f369b;}})[_0xba12('0x1f')](respondWithResult(_0xac7e4c,null))[_0xba12('0x28')](handleError(_0xac7e4c,null));};
\ No newline at end of file