40d5e95b95e6fe97a9137ae94345bd425da713be
[motion2.git] / server / api / smsMessage / smsMessage.model.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x21f3=['application/json','message','refid','status','Token\x20not\x20received','finally','utf8mb4','utf8mb4_unicode_ci','lodash','util','api','moment','bluebird','path','rimraf','exports','SmsMessage','sms_messages','messageId','fti_sms_messages','body','FULLTEXT','models','toLowerCase','out','secret','isNil','UserId','SmsInteractionId','SmsInteraction','findOne','then','update','direction','catch','error','find','type','twilio','accountSid','authToken','messages','create','phone','/api/sms/messages/','/status?token=','token','sid','afterCreate','inspect','SmsMessage,\x20%s,\x20%s,\x20%s','Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken','skebby','https://api.skebby.it/API/v1.0/REST/','username','password','smsMethod','login?username=','&password=','GET','split','sms','POST','user_key','session_key','total_sent','internal_order_id','deliveryReport','read','connectel','senderString','https://smsapi.connectel.se/api/v2/send/','Missing\x20parameters:\x20authToken','xCALLY\x20Motion','format','toString','base64','http_code','data','queued_count','message_id','clickSend','Missing\x20parameters:\x20username,\x20password','plivo','authId','remote','%s:%s','https://api.plivo.com/v1/Account/%s/Message/','message_uuid','infobip','baseUrl','/auth/1/session','/sms/2/text/advanced','Missing\x20parameters:\x20base_url','csc','crypto','login','sender','text','sort','length','apiKey','md5','digest','signature=','/external/get/send.php?','id_sms','Missing\x20parameters:\x20apiKey','https://platform.clickatell.com/messages','apiMessageId','clickatell','bandwidth','https://messaging.bandwidth.com/api/v2/users/','accountId','/messages','applicationId','Basic\x20%s','intelepeer','Bearer\x20','https://api.intelepeer.com/_rest/v4/app/sms/mdr'];(function(_0x3f6ed8,_0x1ac76b){var _0x5b6a94=function(_0x13d95){while(--_0x13d95){_0x3f6ed8['push'](_0x3f6ed8['shift']());}};_0x5b6a94(++_0x1ac76b);}(_0x21f3,0x80));var _0x321f=function(_0x319671,_0x26dc86){_0x319671=_0x319671-0x0;var _0x329dcb=_0x21f3[_0x319671];return _0x329dcb;};'use strict';var _=require(_0x321f('0x0'));var util=require(_0x321f('0x1'));var logger=require('../../config/logger')(_0x321f('0x2'));var moment=require(_0x321f('0x3'));var BPromise=require(_0x321f('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x321f('0x5'));var rimraf=require(_0x321f('0x6'));var config=require('../../config/environment');var attributes=require('./smsMessage.attributes');module[_0x321f('0x7')]=function(_0x4894bb,_0x53c193){return _0x4894bb['define'](_0x321f('0x8'),attributes,{'tableName':_0x321f('0x9'),'paranoid':![],'indexes':[{'name':_0x321f('0xa'),'fields':['messageId']},{'name':_0x321f('0xb'),'fields':[_0x321f('0xc')],'type':_0x321f('0xd')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x43eb93,_0x43c127,_0x42d578){var _0x4ff637=_0x4894bb[_0x321f('0xe')];var _0x36fc85=_0x43eb93['get']({'plain':!![]});if(_0x36fc85['direction'][_0x321f('0xf')]()==='in'||_0x36fc85['direction'][_0x321f('0xf')]()===_0x321f('0x10')&&!_0x36fc85[_0x321f('0x11')]&&!_[_0x321f('0x12')](_0x36fc85[_0x321f('0x13')])&&!_[_0x321f('0x12')](_0x36fc85[_0x321f('0x14')])){_0x4ff637[_0x321f('0x15')][_0x321f('0x16')]({'where':{'id':_0x36fc85[_0x321f('0x14')]}})[_0x321f('0x17')](function(_0x2274d0){if(_0x2274d0){_0x2274d0[_0x321f('0x18')]({'lastMsgAt':_0x36fc85['createdAt'],'lastMsgDirection':_0x36fc85[_0x321f('0x19')][_0x321f('0xf')]()});}})[_0x321f('0x1a')](function(_0x287770){console[_0x321f('0x1b')](_0x287770);});}if(_0x36fc85[_0x321f('0x19')]===_0x321f('0x10')&&!_0x36fc85[_0x321f('0x11')]){var _0x1de8a4;_0x4ff637['SmsAccount'][_0x321f('0x1c')]({'where':{'id':_0x36fc85['SmsAccountId']},'raw':!![]})[_0x321f('0x17')](function(_0x290c62){_0x1de8a4=_0x290c62;if(_0x1de8a4&&_0x1de8a4[_0x321f('0x1d')]){switch(_0x1de8a4['type']){case _0x321f('0x1e'):var _0xbf31ba=require(_0x321f('0x1e'));if(_0x1de8a4[_0x321f('0x1f')]&&_0x1de8a4[_0x321f('0x20')]&&_0x1de8a4['phone']){var _0x1e6123=new _0xbf31ba(_0x1de8a4[_0x321f('0x1f')],_0x1de8a4['authToken']);_0x1e6123[_0x321f('0x21')][_0x321f('0x22')]({'body':_0x36fc85[_0x321f('0xc')],'to':_0x36fc85[_0x321f('0x23')],'from':_0x1de8a4[_0x321f('0x23')],'statusCallback':_0x1de8a4['remote']+_0x321f('0x24')+_0x36fc85['id']+_0x321f('0x25')+_0x1de8a4[_0x321f('0x26')]})[_0x321f('0x17')](function(_0x1472af){if(_0x1472af[_0x321f('0x27')]){return _0x43eb93['update']({'messageId':_0x1472af[_0x321f('0x27')]});}})[_0x321f('0x1a')](function(_0x14512d){logger[_0x321f('0x1b')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x321f('0x28'),_0x321f('0x1e'),util[_0x321f('0x29')](_0x14512d,{'showHidden':![],'depth':null}));});}else{logger[_0x321f('0x1b')](_0x321f('0x2a'),_0x321f('0x28'),_0x321f('0x1e'),_0x321f('0x2b'));}break;case _0x321f('0x2c'):var _0x2999cd=_0x321f('0x2d');if(_0x1de8a4[_0x321f('0x2e')]&&_0x1de8a4[_0x321f('0x2f')]){var _0x2977d5={'recipient':[_0x36fc85[_0x321f('0x23')]],'message':_0x36fc85[_0x321f('0xc')],'message_type':_0x1de8a4[_0x321f('0x30')]};if(_0x1de8a4[_0x321f('0x30')]&&_0x1de8a4[_0x321f('0x30')]!=='SI'){_0x2977d5['sender']=_0x1de8a4[_0x321f('0x23')];}var _0x1f1e4b={'url':_0x2999cd+_0x321f('0x31')+_0x1de8a4[_0x321f('0x2e')]+_0x321f('0x32')+_0x1de8a4[_0x321f('0x2f')],'method':_0x321f('0x33')};rp(_0x1f1e4b)['then'](function(_0x120975){var _0x309d5d=_0x120975[_0x321f('0x34')](';');var _0x565046={'user_key':_0x309d5d[0x0],'session_key':_0x309d5d[0x1]};_0x1f1e4b={'url':_0x2999cd+_0x321f('0x35'),'method':_0x321f('0x36'),'headers':{'user_key':_0x565046[_0x321f('0x37')],'Session_key':_0x565046[_0x321f('0x38')]},'json':!![],'body':_0x2977d5};return rp(_0x1f1e4b);})[_0x321f('0x17')](function(_0x43164a){if(_0x43164a[_0x321f('0x39')]>=0x1){var _0xe9faf4={'messageId':_0x43164a[_0x321f('0x3a')]};if(_0x1de8a4[_0x321f('0x30')]!=='GP'||!_0x1de8a4[_0x321f('0x3b')]){_0xe9faf4[_0x321f('0x3c')]=!![];}return _0x43eb93['update'](_0xe9faf4);}else{return logger[_0x321f('0x1b')](_0x321f('0x2a'),_0x321f('0x28'),_0x321f('0x2c'),util[_0x321f('0x29')](_0x43164a,{'showHidden':![],'depth':null}));}})[_0x321f('0x1a')](function(_0x56d83c){return logger['error'](_0x321f('0x2a'),_0x321f('0x28'),_0x321f('0x2c'),util[_0x321f('0x29')](_0x56d83c,{'showHidden':![],'depth':null}));});}else{logger[_0x321f('0x1b')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate',_0x321f('0x2c'),'Missing\x20parameters:\x20username,\x20password');}break;case _0x321f('0x3d'):if(_0x1de8a4[_0x321f('0x20')]){var _0x269d5b={'recipient':_0x36fc85[_0x321f('0x23')],'message':_0x36fc85[_0x321f('0xc')],'sender':_0x1de8a4[_0x321f('0x3e')]||_0x1de8a4['phone'],'authorization':_0x1de8a4[_0x321f('0x20')]};var _0x43c127={'method':_0x321f('0x36'),'uri':_0x321f('0x3f'),'body':_0x269d5b,'json':!![]};rp(_0x43c127)[_0x321f('0x17')](function(_0x4203a9){var _0x4798af={'messageId':_0x4203a9['requestid']};if(!_0x1de8a4[_0x321f('0x3b')]){_0x4798af[_0x321f('0x3c')]=!![];}return _0x43eb93['update'](_0x4798af);})[_0x321f('0x1a')](function(_0x22cab8){logger[_0x321f('0x1b')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x321f('0x28'),'connectel',util['inspect'](_0x22cab8,{'showHidden':![],'depth':null}));});}else{logger[_0x321f('0x1b')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x321f('0x28'),_0x321f('0x3d'),_0x321f('0x40'));}break;case'clicksend':if(_0x1de8a4[_0x321f('0x2e')]&&_0x1de8a4['password']){var _0x269d5b={'messages':[{'source':_0x321f('0x41'),'to':_0x36fc85['phone'],'body':_0x36fc85['body'],'from':_0x1de8a4['senderString']||_0x1de8a4[_0x321f('0x23')]}]};var _0x4b4997=util[_0x321f('0x42')]('%s:%s',_0x1de8a4['username'],_0x1de8a4['password']);var _0x43c127={'method':'POST','uri':'https://rest.clicksend.com/v3/sms/send','body':_0x269d5b,'headers':{'Authorization':util[_0x321f('0x42')]('Basic\x20%s',new Buffer(_0x4b4997)[_0x321f('0x43')](_0x321f('0x44')))},'json':!![]};rp(_0x43c127)['then'](function(_0x5dca51){if(_0x5dca51[_0x321f('0x45')]>=0xc8&&_0x5dca51['http_code']<=0xce){if(_0x5dca51[_0x321f('0x46')]&&_0x5dca51[_0x321f('0x46')][_0x321f('0x47')]>0x0){var _0x2b9af6=_['head'](_0x5dca51[_0x321f('0x46')]['messages']);var _0x3926bb={'messageId':_0x2b9af6[_0x321f('0x48')]};if(!_0x1de8a4[_0x321f('0x3b')]){_0x3926bb['read']=!![];}return _0x43eb93[_0x321f('0x18')](_0x3926bb);}else{logger[_0x321f('0x1b')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate',_0x321f('0x49'),util[_0x321f('0x29')](_0x5dca51,{'showHidden':![],'depth':null}));}}else{logger[_0x321f('0x1b')](_0x321f('0x2a'),_0x321f('0x28'),'clickSend',util[_0x321f('0x29')](_0x5dca51,{'showHidden':![],'depth':null}));}})['catch'](function(_0x1e6088){logger[_0x321f('0x1b')](_0x321f('0x2a'),_0x321f('0x28'),'clickSend',util[_0x321f('0x29')](_0x1e6088,{'showHidden':![],'depth':null}));});}else{logger[_0x321f('0x1b')](_0x321f('0x2a'),'afterCreate','clickSend',_0x321f('0x4a'));}break;case _0x321f('0x4b'):if(_0x1de8a4[_0x321f('0x4c')]&&_0x1de8a4['authToken']){var _0x269d5b={'dst':_0x36fc85[_0x321f('0x23')],'text':_0x36fc85[_0x321f('0xc')],'src':_0x1de8a4['senderString']||_0x1de8a4[_0x321f('0x23')],'url':_0x1de8a4[_0x321f('0x4d')]+_0x321f('0x24')+_0x36fc85['id']+_0x321f('0x25')+_0x1de8a4['token']};var _0x4b4997=util[_0x321f('0x42')](_0x321f('0x4e'),_0x1de8a4['authId'],_0x1de8a4['authToken']);var _0x43c127={'method':'POST','uri':util[_0x321f('0x42')](_0x321f('0x4f'),_0x1de8a4['authId']),'body':_0x269d5b,'headers':{'Authorization':util[_0x321f('0x42')]('Basic\x20%s',new Buffer(_0x4b4997)[_0x321f('0x43')](_0x321f('0x44')))},'json':!![]};rp(_0x43c127)['then'](function(_0x46eb6f){var _0x5bacc3={'messageId':_0x46eb6f[_0x321f('0x50')][0x0]};return _0x43eb93[_0x321f('0x18')](_0x5bacc3);})[_0x321f('0x1a')](function(_0x302596){logger['error'](_0x321f('0x2a'),'afterCreate',_0x321f('0x4b'),util[_0x321f('0x29')](_0x302596,{'showHidden':![],'depth':null}));});}else{logger['error'](_0x321f('0x2a'),_0x321f('0x28'),_0x321f('0x4b'),'Missing\x20parameters:\x20authId,\x20authToken');}break;case _0x321f('0x51'):if(_0x1de8a4[_0x321f('0x2e')]&&_0x1de8a4[_0x321f('0x2f')]){if(_0x1de8a4[_0x321f('0x52')]){var _0xebb7e0={'method':_0x321f('0x36'),'uri':_0x1de8a4['baseUrl']+_0x321f('0x53'),'body':{'username':_0x1de8a4[_0x321f('0x2e')],'password':_0x1de8a4['password']},'json':!![]};return rp(_0xebb7e0)[_0x321f('0x17')](function(_0x3ec50f){var _0x433587={'method':_0x321f('0x36'),'uri':_0x1de8a4[_0x321f('0x52')]+_0x321f('0x54'),'body':{'messages':[{'from':_0x1de8a4[_0x321f('0x23')],'destinations':[{'to':_0x36fc85[_0x321f('0x23')]}],'text':_0x36fc85[_0x321f('0xc')],'notifyUrl':_0x1de8a4[_0x321f('0x4d')]+_0x321f('0x24')+_0x36fc85['id']+_0x321f('0x25')+_0x1de8a4[_0x321f('0x26')],'notifyContentType':'application/json','callbackData':_0x1de8a4[_0x321f('0x23')]+';'+_0x36fc85['body']}]},'headers':{'Authorization':'IBSSO\x20'+_0x3ec50f[_0x321f('0x26')]},'json':!![]};return rp(_0x433587)[_0x321f('0x17')](function(_0x56f89a){if(_0x56f89a[_0x321f('0x21')]){var _0x370d16={'messageId':_0x56f89a[_0x321f('0x21')][0x0][_0x321f('0xa')]};if(!_0x1de8a4[_0x321f('0x3b')]){_0x370d16[_0x321f('0x3c')]=!![];}return _0x43eb93[_0x321f('0x18')](_0x370d16);}else{return logger['error'](_0x321f('0x2a'),_0x321f('0x28'),_0x321f('0x51'),util[_0x321f('0x29')](_0x56f89a,{'showHidden':![],'depth':null}));}});})[_0x321f('0x1a')](function(_0x39f0b1){return logger[_0x321f('0x1b')](_0x321f('0x2a'),'afterCreate','infobip',util[_0x321f('0x29')](_0x39f0b1,{'showHidden':![],'depth':null}));});}else{logger['error'](_0x321f('0x2a'),_0x321f('0x28'),_0x321f('0x51'),_0x321f('0x55'));}}else{logger[_0x321f('0x1b')](_0x321f('0x2a'),_0x321f('0x28'),'infobip',_0x321f('0x4a'));}break;case _0x321f('0x56'):var _0x524ba5=require(_0x321f('0x57'));if(_0x1de8a4['apiKey']){var _0x5230cc={};_0x5230cc[_0x321f('0x58')]=_0x1de8a4[_0x321f('0x2e')];_0x5230cc[_0x321f('0x23')]=_0x36fc85[_0x321f('0x23')];_0x5230cc[_0x321f('0x59')]=_0x1de8a4[_0x321f('0x23')];_0x5230cc[_0x321f('0x5a')]=_0x36fc85[_0x321f('0xc')];_0x5230cc['timestamp']=+new Date();var _0x31fb7d='';var _0x17fb54='';var _0x26847d=Object['keys'](_0x5230cc);_0x26847d[_0x321f('0x5b')]();for(var _0x26f332=0x0;_0x26f332<_0x26847d[_0x321f('0x5c')];_0x26f332++){if(_0x31fb7d!=''){_0x31fb7d+='&';}_0x31fb7d+=_0x26847d[_0x26f332]+'='+encodeURIComponent(_0x5230cc[_0x26847d[_0x26f332]]);_0x17fb54+=_0x5230cc[_0x26847d[_0x26f332]];}_0x17fb54+=_0x1de8a4[_0x321f('0x5d')];_0x17fb54=_0x524ba5['createHash'](_0x321f('0x5e'))['update'](_0x17fb54)[_0x321f('0x5f')]('hex');if(_0x31fb7d!==''){_0x31fb7d+='&';}_0x31fb7d+=_0x321f('0x60')+_0x17fb54;var _0x1f1e4b={'method':_0x321f('0x33'),'uri':_0x1de8a4[_0x321f('0x52')]+_0x321f('0x61')+_0x31fb7d,'json':!![]};return rp(_0x1f1e4b)['then'](function(_0x428f5f){var _0x1b6fbe=Object['keys'](_0x428f5f);if(_0x428f5f[_0x1b6fbe[0x0]]['error']&&parseInt(_0x428f5f[_0x1b6fbe[0x0]][_0x321f('0x1b')])===0x0){var _0x54a19a={'messageId':_0x428f5f[_0x1b6fbe[0x0]][_0x321f('0x62')]};if(!_0x1de8a4[_0x321f('0x3b')]){_0x54a19a['read']=!![];}return _0x43eb93['update'](_0x54a19a);}else{return logger[_0x321f('0x1b')](_0x321f('0x2a'),_0x321f('0x28'),'csc',util['inspect'](_0x428f5f['error'],{'showHidden':![],'depth':null}));}})[_0x321f('0x1a')](function(_0x3d81ba){return logger[_0x321f('0x1b')](_0x321f('0x2a'),'afterCreate',_0x321f('0x56'),util['inspect'](_0x3d81ba,{'showHidden':![],'depth':null}));});}else{logger[_0x321f('0x1b')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x321f('0x28'),_0x321f('0x56'),_0x321f('0x63'));}break;case'clickatell':if(_0x1de8a4['apiKey']){var _0x29d07b={'method':'POST','uri':_0x321f('0x64'),'headers':{'Authorization':_0x1de8a4[_0x321f('0x5d')]},'body':{'content':_0x36fc85[_0x321f('0xc')],'to':[_0x36fc85[_0x321f('0x23')]],'from':_0x1de8a4[_0x321f('0x23')],'binary':![],'clientMessageId':'uuid','charset':'UTF-8'},'json':!![]};rp(_0x29d07b)['then'](function(_0xf6f945){if(!_0xf6f945[_0x321f('0x1b')]){var _0x30149f={'messageId':_0xf6f945[_0x321f('0x21')][0x0][_0x321f('0x65')]};if(!_0x1de8a4[_0x321f('0x3b')]){_0x30149f['read']=!![];}return _0x43eb93[_0x321f('0x18')](_0x30149f);}else{return logger['error'](_0x321f('0x2a'),_0x321f('0x28'),_0x321f('0x66'),util[_0x321f('0x29')](_0xf6f945[_0x321f('0x1b')],{'showHidden':![],'depth':null}));}})['catch'](function(_0x2a3ce4){return logger['error'](_0x321f('0x2a'),'afterCreate','clickatell',util['inspect'](_0x2a3ce4,{'showHidden':![],'depth':null}));});}else{logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate',_0x321f('0x66'),_0x321f('0x63'));}break;case _0x321f('0x67'):if(_0x1de8a4[_0x321f('0x2e')]&&_0x1de8a4[_0x321f('0x2f')]){var _0x4b4997=util[_0x321f('0x42')]('%s:%s',_0x1de8a4[_0x321f('0x2e')],_0x1de8a4[_0x321f('0x2f')]);var _0x43c127={'method':'POST','uri':_0x321f('0x68')+_0x1de8a4[_0x321f('0x69')]+_0x321f('0x6a'),'body':{'to':[_0x36fc85[_0x321f('0x23')]],'text':_0x36fc85[_0x321f('0xc')],'from':_0x1de8a4[_0x321f('0x23')],'applicationId':_0x1de8a4[_0x321f('0x6b')]},'headers':{'Authorization':util[_0x321f('0x42')](_0x321f('0x6c'),new Buffer(_0x4b4997)[_0x321f('0x43')]('base64'))},'json':!![]};rp(_0x43c127)[_0x321f('0x17')](function(_0xccb6f1){if(_0xccb6f1['id']){var _0x4a3a13={'messageId':_0xccb6f1['id']};return _0x43eb93[_0x321f('0x18')](_0x4a3a13);}else{logger[_0x321f('0x1b')](_0x321f('0x2a'),_0x321f('0x28'),_0x321f('0x67'),util[_0x321f('0x29')](_0xccb6f1,{'showHidden':![],'depth':null}));}})[_0x321f('0x1a')](function(_0x16391b){logger[_0x321f('0x1b')](_0x321f('0x2a'),_0x321f('0x28'),_0x321f('0x67'),util[_0x321f('0x29')](_0x16391b,{'showHidden':![],'depth':null}));});}else{logger[_0x321f('0x1b')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x321f('0x28'),_0x321f('0x67'),_0x321f('0x4a'));}break;case _0x321f('0x6d'):if(_0x1de8a4['apiKey']){var _0xc9270a={};var _0x1f1e4b={'method':_0x321f('0x36'),'uri':'https://api.intelepeer.com/_rest/v4/app/sms/send','headers':{'Authorization':_0x321f('0x6e')+_0x1de8a4[_0x321f('0x5d')],'Content-Type':'application/json'},'body':{'from':_0x1de8a4[_0x321f('0x23')],'to':_0x36fc85[_0x321f('0x23')],'text':_0x36fc85[_0x321f('0xc')]},'json':!![]};return rp(_0x1f1e4b)['then'](function(_0x5a981d){if(_0x5a981d['code']==0xca){_0xc9270a['message']=_0x5a981d;var _0x2b472c={'method':_0x321f('0x36'),'uri':_0x321f('0x6f'),'headers':{'Authorization':'Bearer\x20'+_0x1de8a4[_0x321f('0x5d')],'Content-Type':_0x321f('0x70')},'body':{'refid':_0xc9270a[_0x321f('0x71')][_0x321f('0x72')]},'json':!![]};return rp(_0x2b472c)[_0x321f('0x17')](function(_0x2b3fdd){_0xc9270a[_0x321f('0x73')]=_0x2b3fdd;var _0x231375={'messageId':_0xc9270a[_0x321f('0x71')][_0x321f('0x72')],'read':!![]};return _0x43eb93[_0x321f('0x18')](_0x231375);});}else{return logger[_0x321f('0x1b')](_0x321f('0x2a'),_0x321f('0x28'),'intelepeer',util['inspect'](_0x5a981d,{'showHidden':![],'depth':null}));}})[_0x321f('0x1a')](function(_0x4e5361){return logger[_0x321f('0x1b')](_0x321f('0x2a'),_0x321f('0x28'),_0x321f('0x6d'),util[_0x321f('0x29')](_0x4e5361,{'showHidden':![],'depth':null}));});}else{return logger[_0x321f('0x1b')](_0x321f('0x2a'),_0x321f('0x28'),_0x321f('0x6d'),_0x321f('0x74'));}break;}}})[_0x321f('0x75')](function(){_0x42d578();});}else{_0x42d578();}}},'charset':_0x321f('0x76'),'collate':_0x321f('0x77')});};